Ainda vou aprimorar o código
Dentro da pasta prisma
, criar uma pasta chamada schemas.
No schemas, você pode criar seus modelos separados.
dentro do package.json
"scripts": {
/** | |
* Converter for converting a string CodeValue on the DTO into a Code object with type ITEM_TYPE_CODE | |
*/ | |
Converter<String, Code> itemTypeCodeConverter = new Converter<String, Code>() { | |
public Code convert(MappingContext<String, Code> context) { | |
Code itemTypeCode = null; | |
for (Code code : ModelMapperExampleApplication.storedCodes) { | |
if (code.getCodeType().equals(ModelMapperExampleApplication.ITEM_TYPE_CODE) | |
&& code.getCodeValue().equals(context.getSource())) { | |
itemTypeCode = code; |
/* eslint-disable @typescript-eslint/no-var-requires */ | |
const fs = require('fs') | |
const path = require('path') | |
const generateEnvFile = config => { | |
const envContent = Object.entries(config) | |
.map(([key, value]) => `${key}=${value}`) | |
.join('\n') | |
return envContent |
// Implementation | |
export class UserRepository extends PrismaRepository<'user'> {} | |
import { PrismaClient } from '@prisma/client'; | |
import { PrismaService } from '../integrations/prismaService'; | |
export class PrismaRepository< | |
K extends Exclude<keyof PrismaClient, symbol | `$${string}`>, | |
> { |
/** | |
* Stop an iframe or HTML5 <video> from playing | |
* @param {Element} element The element that contains the video | |
*/ | |
var stopVideo = function ( element ) { | |
var iframe = element.querySelector( 'iframe'); | |
var video = element.querySelector( 'video' ); | |
if ( iframe ) { | |
var iframeSrc = iframe.src; | |
iframe.src = iframeSrc; |
interface RequestOptions { | |
baseUrl?: string | |
prefix?: string | |
endpoint: string | |
config?: RequestInit | |
} | |
export async function request<T, TError>({ | |
...props | |
}: RequestOptions): Promise<{ |
- name: Find and replace .html | |
run: for file in $(find ./build -name "*.html"); do mv "$file" "${file%%.html}"; done | |
- name: Resolve index to index.html | |
run: $(cd ./build && mv index index.html) | |
- name: Add content type to html files | |
run: aws s3 sync - delete - acl public-read - content-type "text/html" - metadata-directive REPLACE ./build/ s3://dev.noverde.com.br/ - exclude "assets/*" - exclude "_next/*" | |
- name: Sync all files | |
run: aws s3 sync - acl public-read ./build/ s3://dev.noverde.com.br/ - exclude "*.*" - include "assets/*" - include "_next/*" | |
- name: Invalidate CloudFront cache | |
run: aws cloudfront create-invalidation - distribution-id EORN48ONQC20O - paths "/*" |
<html> | |
<head> | |
<style type="text/css"> | |
.ccc{ background-color: blue; } | |
</style> | |
</head> | |
<body> | |
<script type="text/javascript"> | |
function createClass(name,rules){ |
sudo yarn global upgrade --latest @vue/cli |
const acceptedAt = new Date() | |
.toISOString() | |
.replace(/T/, ' ') | |
.replace(/\..+/, '') |