@koalarx/nest-cli 1.2.14 → 1.2.15
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/index.js +60 -8
- package/index.ts +1 -9
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -31355,8 +31355,6 @@ var require_node_figlet = __commonJS((exports, module) => {
|
|
|
31355
31355
|
// src/index.ts
|
|
31356
31356
|
var import_commander = __toESM(require_commander(), 1);
|
|
31357
31357
|
var import_inquirer = __toESM(require_inquirer(), 1);
|
|
31358
|
-
import { readFileSync as readFileSync2 } from "fs";
|
|
31359
|
-
import path3 from "path";
|
|
31360
31358
|
|
|
31361
31359
|
// src/utils/copy-folder.ts
|
|
31362
31360
|
import fs from "fs";
|
|
@@ -31408,12 +31406,66 @@ function newProject(projectName) {
|
|
|
31408
31406
|
// src/index.ts
|
|
31409
31407
|
var import_chalk2 = __toESM(require_chalk(), 1);
|
|
31410
31408
|
var import_figlet = __toESM(require_node_figlet(), 1);
|
|
31411
|
-
|
|
31412
|
-
var
|
|
31413
|
-
|
|
31414
|
-
|
|
31415
|
-
|
|
31416
|
-
|
|
31409
|
+
// package.json
|
|
31410
|
+
var package_default = {
|
|
31411
|
+
name: "@koalarx/nest-cli",
|
|
31412
|
+
version: "1.2.15",
|
|
31413
|
+
description: "Biblioteca de CLI para criação de projetos utilizando Koala Nest",
|
|
31414
|
+
scripts: {
|
|
31415
|
+
test: "vitest run",
|
|
31416
|
+
"test:watch": "vitest",
|
|
31417
|
+
"test:cov": "vitest run --coverage",
|
|
31418
|
+
"test:debug": "vitest --inspect-brk --inspect --logHeapUsage --threads=false",
|
|
31419
|
+
build: "bun .github/scripts/publish.ts",
|
|
31420
|
+
prepare: "bun run build",
|
|
31421
|
+
prepublishOnly: "bun run test",
|
|
31422
|
+
version: "git add -A src",
|
|
31423
|
+
postversion: "git push && git push --tags",
|
|
31424
|
+
"deploy:hotfix": "npm version patch",
|
|
31425
|
+
"deploy:feature": "npm version minor",
|
|
31426
|
+
"deploy:release": "npm version major"
|
|
31427
|
+
},
|
|
31428
|
+
main: "index.js",
|
|
31429
|
+
bin: {
|
|
31430
|
+
"koala-nest": "index.js"
|
|
31431
|
+
},
|
|
31432
|
+
type: "module",
|
|
31433
|
+
repository: {
|
|
31434
|
+
type: "git",
|
|
31435
|
+
url: "git+https://github.com/igordrangel/koala-nest-cli.git"
|
|
31436
|
+
},
|
|
31437
|
+
keywords: [
|
|
31438
|
+
"Nest.js"
|
|
31439
|
+
],
|
|
31440
|
+
author: "Igor D. Rangel",
|
|
31441
|
+
license: "ISC",
|
|
31442
|
+
bugs: {
|
|
31443
|
+
url: "https://github.com/igordrangel/koala-nest-cli/issues"
|
|
31444
|
+
},
|
|
31445
|
+
homepage: "https://github.com/igordrangel/koala-nest-cli#readme",
|
|
31446
|
+
dependencies: {
|
|
31447
|
+
chalk: "^2.4.2",
|
|
31448
|
+
commander: "^2.19.0",
|
|
31449
|
+
figlet: "^1.2.1",
|
|
31450
|
+
inquirer: "^6.2.2",
|
|
31451
|
+
shelljs: "^0.8.3"
|
|
31452
|
+
},
|
|
31453
|
+
devDependencies: {
|
|
31454
|
+
"@rocketseat/eslint-config": "^1.2.0",
|
|
31455
|
+
"@types/node": "^18.14.0",
|
|
31456
|
+
"@types/node-fetch": "^2.6.4",
|
|
31457
|
+
"@typescript-eslint/eslint-plugin": "^5.0.0",
|
|
31458
|
+
"@typescript-eslint/parser": "^5.0.0",
|
|
31459
|
+
eslint: "^8.44.0",
|
|
31460
|
+
"eslint-config-prettier": "^8.8.0",
|
|
31461
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
31462
|
+
prettier: "^2.3.2",
|
|
31463
|
+
typescript: "^5.2.2"
|
|
31464
|
+
}
|
|
31465
|
+
};
|
|
31466
|
+
|
|
31467
|
+
// src/index.ts
|
|
31468
|
+
import_commander.default.version(package_default.version);
|
|
31417
31469
|
console.log(import_chalk2.default.cyan(import_figlet.default.textSync("Koala Nest CLI")));
|
|
31418
31470
|
import_commander.default.command("new [projectName]").description("Cria um novo projeto Nest com Koala Nest").action(async (projectName) => {
|
|
31419
31471
|
if (!projectName) {
|
package/index.ts
CHANGED
|
@@ -2,18 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
import program from 'commander'
|
|
4
4
|
import inquirer from 'inquirer'
|
|
5
|
-
import { readFileSync } from 'fs'
|
|
6
|
-
import path from 'path'
|
|
7
5
|
import { newProject } from './commands/new-project'
|
|
8
6
|
import chalk from 'chalk'
|
|
9
7
|
import figlet from 'figlet'
|
|
10
|
-
import
|
|
11
|
-
|
|
12
|
-
const __filename = fileURLToPath(import.meta.url)
|
|
13
|
-
const __dirname = path.dirname(__filename)
|
|
14
|
-
|
|
15
|
-
const packageJsonPath = path.join(__dirname, '../package.json')
|
|
16
|
-
const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf8'))
|
|
8
|
+
import packageJson from '../package.json' with { type: 'json' }
|
|
17
9
|
|
|
18
10
|
program.version(packageJson.version)
|
|
19
11
|
|