@koalarx/nest-cli 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/code-base/startup-project/.swcrc +24 -0
- package/code-base/startup-project/Dockerfile +37 -0
- package/code-base/startup-project/nest-cli.json +12 -29
- package/code-base/startup-project/tsconfig.build.json +4 -0
- package/code-base/startup-project/tsconfig.json +11 -16
- package/code-base/startup-project/vitest.config.e2e.mts +1 -1
- package/code-base/startup-project/vitest.config.mts +8 -1
- package/index.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/swcrc",
|
|
3
|
+
"sourceMaps": true,
|
|
4
|
+
"module": {
|
|
5
|
+
"type": "commonjs",
|
|
6
|
+
"strict": true
|
|
7
|
+
},
|
|
8
|
+
"inputSourceMap":true,
|
|
9
|
+
"jsc": {
|
|
10
|
+
"target": "es2022",
|
|
11
|
+
"parser": {
|
|
12
|
+
"syntax": "typescript",
|
|
13
|
+
"decorators": true,
|
|
14
|
+
"dynamicImport": true
|
|
15
|
+
},
|
|
16
|
+
"baseUrl": "./",
|
|
17
|
+
"paths": {
|
|
18
|
+
"@/*": [
|
|
19
|
+
"src/*"
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"minify": true
|
|
24
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
FROM node:20.18.0 AS builder
|
|
2
|
+
|
|
3
|
+
# Criando diretório de trabalho
|
|
4
|
+
WORKDIR /home/node/app
|
|
5
|
+
|
|
6
|
+
# Copiando arquivos de configuração
|
|
7
|
+
COPY package.json ./
|
|
8
|
+
COPY package-lock.json ./
|
|
9
|
+
COPY prisma ./prisma/
|
|
10
|
+
|
|
11
|
+
# Instalando dependências
|
|
12
|
+
RUN npm ci --force
|
|
13
|
+
|
|
14
|
+
# Copiando arquivos do app
|
|
15
|
+
COPY . .
|
|
16
|
+
|
|
17
|
+
# Compilando app
|
|
18
|
+
RUN npm run build
|
|
19
|
+
|
|
20
|
+
FROM node:20.18.0
|
|
21
|
+
|
|
22
|
+
# Criando diretório de trabalho
|
|
23
|
+
WORKDIR /home/node/app
|
|
24
|
+
|
|
25
|
+
COPY --chown=node:node --from=builder /home/node/app/node_modules ./node_modules
|
|
26
|
+
COPY --chown=node:node --from=builder /home/node/app/package.json ./dist/package.json
|
|
27
|
+
COPY --chown=node:node --from=builder /home/node/app/package*.json ./
|
|
28
|
+
COPY --chown=node:node --from=builder /home/node/app/dist ./dist
|
|
29
|
+
COPY --chown=node:node --from=builder /home/node/app/prisma ./prisma
|
|
30
|
+
|
|
31
|
+
ENV NODE_ENV production
|
|
32
|
+
|
|
33
|
+
USER node
|
|
34
|
+
|
|
35
|
+
EXPOSE 3000
|
|
36
|
+
|
|
37
|
+
CMD npx prisma migrate deploy && npm run start:prod
|
|
@@ -1,35 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/nest-cli",
|
|
3
3
|
"collection": "@nestjs/schematics",
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
"sourceRoot": "src",
|
|
5
|
+
"entryFile": "infra/main",
|
|
6
|
+
"compilerOptions": {
|
|
7
|
+
"builder": "swc",
|
|
8
|
+
"plugins": [
|
|
9
|
+
{
|
|
10
|
+
"name": "@nestjs/swagger",
|
|
11
|
+
"options": {
|
|
12
|
+
"classValidatorShim": false,
|
|
13
|
+
"introspectComments": true
|
|
14
|
+
}
|
|
13
15
|
}
|
|
14
|
-
|
|
15
|
-
"example": {
|
|
16
|
-
"type": "application",
|
|
17
|
-
"root": "apps/example",
|
|
18
|
-
"entryFile": "example/src/infra/main",
|
|
19
|
-
"sourceRoot": "apps/example/src",
|
|
20
|
-
"compilerOptions": {
|
|
21
|
-
"deleteOutDir": true,
|
|
22
|
-
"tsConfigPath": "apps/example/tsconfig.app.json",
|
|
23
|
-
"plugins": [
|
|
24
|
-
{
|
|
25
|
-
"name": "@nestjs/swagger",
|
|
26
|
-
"options": {
|
|
27
|
-
"classValidatorShim": false,
|
|
28
|
-
"introspectComments": true
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
]
|
|
32
|
-
}
|
|
33
|
-
}
|
|
16
|
+
]
|
|
34
17
|
}
|
|
35
18
|
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
|
-
"module": "
|
|
4
|
-
"
|
|
5
|
-
"baseUrl": "./",
|
|
6
|
-
"types": ["vitest/globals"],
|
|
7
|
-
"paths": {
|
|
8
|
-
"@/*": ["./apps/example/src/*"],
|
|
9
|
-
"@koalarx/nest/*": ["./apps/koala-nest/src/*"]
|
|
10
|
-
},
|
|
3
|
+
"module": "commonjs",
|
|
4
|
+
"declaration": true,
|
|
11
5
|
"removeComments": true,
|
|
12
6
|
"emitDecoratorMetadata": true,
|
|
13
7
|
"experimentalDecorators": true,
|
|
14
8
|
"allowSyntheticDefaultImports": true,
|
|
15
9
|
"target": "es2022",
|
|
10
|
+
"sourceMap": true,
|
|
11
|
+
"outDir": "./dist",
|
|
12
|
+
"baseUrl": "./",
|
|
13
|
+
"paths": {
|
|
14
|
+
"@/*": ["./src/*"]
|
|
15
|
+
},
|
|
16
16
|
"incremental": true,
|
|
17
17
|
"skipLibCheck": true,
|
|
18
18
|
"strictNullChecks": true,
|
|
@@ -20,12 +20,7 @@
|
|
|
20
20
|
"strictBindCallApply": false,
|
|
21
21
|
"forceConsistentCasingInFileNames": false,
|
|
22
22
|
"noFallthroughCasesInSwitch": false,
|
|
23
|
-
"resolveJsonModule": true
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"node_modules",
|
|
27
|
-
"dist",
|
|
28
|
-
"vitest.config.e2e.mts",
|
|
29
|
-
"vitest.config.mts"
|
|
30
|
-
]
|
|
23
|
+
"resolveJsonModule": true,
|
|
24
|
+
"types": ["vitest/globals"]
|
|
25
|
+
}
|
|
31
26
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import swc from "unplugin-swc";
|
|
1
2
|
import tsConfigPatchs from 'vite-tsconfig-paths'
|
|
2
3
|
import { defineConfig } from 'vitest/config'
|
|
3
4
|
|
|
@@ -6,5 +7,11 @@ export default defineConfig({
|
|
|
6
7
|
globals: true,
|
|
7
8
|
root: './'
|
|
8
9
|
},
|
|
9
|
-
plugins: [
|
|
10
|
+
plugins: [
|
|
11
|
+
tsConfigPatchs(),
|
|
12
|
+
swc.vite({
|
|
13
|
+
module: { type: "es6" },
|
|
14
|
+
sourceMaps: true,
|
|
15
|
+
}),
|
|
16
|
+
],
|
|
10
17
|
})
|
package/index.js
CHANGED
|
@@ -30,7 +30,7 @@ var import_inquirer = __toESM(require("inquirer"));
|
|
|
30
30
|
// package.json
|
|
31
31
|
var package_default = {
|
|
32
32
|
name: "@koalarx/nest-cli",
|
|
33
|
-
version: "1.0.
|
|
33
|
+
version: "1.0.4",
|
|
34
34
|
description: "Biblioteca de CLI para cria\xE7\xE3o de projetos utilizando Koala Nest",
|
|
35
35
|
scripts: {
|
|
36
36
|
test: "vitest run",
|