nest-combo 1.2.0 → 1.2.2
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/.prettierignore +5 -0
- package/README.MD +17 -75
- package/bin/cli.js +157 -202
- package/index.html +1 -1
- package/jest.config.mjs +198 -0
- package/lib/generate.js +13 -35
- package/lib/installDependencies.js +65 -0
- package/lib/nestBynary.js +38 -0
- package/lib/outputs.js +73 -0
- package/lib/resources.js +62 -0
- package/lib/utils.js +52 -20
- package/package.json +18 -3
- package/lib/install.js +0 -22
- package/project.example.yml +0 -48
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nest-combo",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"main": "lib/generate.js",
|
|
5
|
-
"description": "
|
|
5
|
+
"description": "nest-combo is a CLI tool designed to supercharge your NestJS development workflow. Define your entire project structure in a yml file and generate modules, controllers, services, and more with a single command.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"bin": {
|
|
8
8
|
"nest-combo": "bin/cli.js"
|
|
@@ -11,10 +11,15 @@
|
|
|
11
11
|
"lib": "lib"
|
|
12
12
|
},
|
|
13
13
|
"scripts": {
|
|
14
|
-
"
|
|
14
|
+
"lint": "eslint . --ext .js",
|
|
15
|
+
"format": "prettier --write .",
|
|
16
|
+
"test": "jest --maxWorkers=20%",
|
|
17
|
+
"test:watch": "jest --watch",
|
|
18
|
+
"test:coverage": "jest --coverage"
|
|
15
19
|
},
|
|
16
20
|
"keywords": [
|
|
17
21
|
"nestjs",
|
|
22
|
+
"nestjs-cli",
|
|
18
23
|
"cli",
|
|
19
24
|
"generator",
|
|
20
25
|
"module",
|
|
@@ -31,5 +36,15 @@
|
|
|
31
36
|
"repository": {
|
|
32
37
|
"type": "git",
|
|
33
38
|
"url": "https://github.com/vinisalves/nest-combo.git"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@eslint/js": "^9.23.0",
|
|
42
|
+
"eslint": "^9.23.0",
|
|
43
|
+
"eslint-config-prettier": "^10.1.1",
|
|
44
|
+
"eslint-plugin-prettier": "^5.2.5",
|
|
45
|
+
"globals": "^16.0.0",
|
|
46
|
+
"jest": "^29.7.0",
|
|
47
|
+
"prettier": "^3.5.3",
|
|
48
|
+
"ts-jest": "^29.3.0"
|
|
34
49
|
}
|
|
35
50
|
}
|
package/lib/install.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import chalk from "chalk";
|
|
2
|
-
import { execSync } from "child_process";
|
|
3
|
-
import path from "path";
|
|
4
|
-
function installDependencies(projectName, dependencies) {
|
|
5
|
-
const cdCommand = `cd ${projectName}`;
|
|
6
|
-
const workingDirectory = path.join(process.cwd(), projectName);
|
|
7
|
-
|
|
8
|
-
execSync(cdCommand, { stdio: "inherit" });
|
|
9
|
-
try {
|
|
10
|
-
if (Array.isArray(dependencies)) {
|
|
11
|
-
for (const depency of dependencies) {
|
|
12
|
-
chalk.cyan(`- ${depency}`);
|
|
13
|
-
}
|
|
14
|
-
const command = `npm i ${dependencies.join(" ")}`;
|
|
15
|
-
execSync(command, { stdio: "inherit", cwd: workingDirectory });
|
|
16
|
-
}
|
|
17
|
-
} catch (error) {
|
|
18
|
-
chalk.red(`Error installing dependencies`);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export { installDependencies };
|
package/project.example.yml
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
#YML example for loading a full project from scracth
|
|
2
|
-
nest-combo:
|
|
3
|
-
project-name: my-new-project
|
|
4
|
-
open-vscode: true # open vscode when process is finished
|
|
5
|
-
package-manager: npm # npm | yarn | pnmp
|
|
6
|
-
dependencies:
|
|
7
|
-
- "@nestjs/config"
|
|
8
|
-
- "@nestjs/bull"
|
|
9
|
-
- "class-transformer"
|
|
10
|
-
- "class-validator"
|
|
11
|
-
- "nestjs-twilio"
|
|
12
|
-
modules:
|
|
13
|
-
- name: core
|
|
14
|
-
resources:
|
|
15
|
-
- module
|
|
16
|
-
modules:
|
|
17
|
-
- name: user
|
|
18
|
-
resources:
|
|
19
|
-
- module
|
|
20
|
-
- controller
|
|
21
|
-
- service
|
|
22
|
-
options:
|
|
23
|
-
- --no-spec
|
|
24
|
-
modules:
|
|
25
|
-
- name: subUsers
|
|
26
|
-
resources:
|
|
27
|
-
- module
|
|
28
|
-
- controller
|
|
29
|
-
- service
|
|
30
|
-
options:
|
|
31
|
-
- --no-spec
|
|
32
|
-
|
|
33
|
-
- name: auth
|
|
34
|
-
resources:
|
|
35
|
-
- module
|
|
36
|
-
- controller
|
|
37
|
-
- service
|
|
38
|
-
- interceptor
|
|
39
|
-
- name: product
|
|
40
|
-
resources:
|
|
41
|
-
- module
|
|
42
|
-
- controller
|
|
43
|
-
- service
|
|
44
|
-
- name: payment
|
|
45
|
-
resources:
|
|
46
|
-
- module
|
|
47
|
-
- controller
|
|
48
|
-
- service
|