@expressots/cli 1.12.0 → 3.0.0-beta.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/bin/cli.d.ts +5 -1
- package/bin/cli.js +7 -0
- package/bin/commands/project.commands.js +26 -22
- package/bin/generate/templates/nonopinionated/module.tpl +1 -2
- package/bin/generate/templates/opinionated/controller-service-delete.tpl +6 -14
- package/bin/generate/templates/opinionated/controller-service-get.tpl +7 -15
- package/bin/generate/templates/opinionated/controller-service-patch.tpl +7 -17
- package/bin/generate/templates/opinionated/controller-service-post.tpl +7 -14
- package/bin/generate/templates/opinionated/controller-service-put.tpl +7 -17
- package/bin/generate/templates/opinionated/controller-service.tpl +1 -2
- package/bin/generate/templates/opinionated/module-service.tpl +1 -2
- package/bin/generate/templates/opinionated/module.tpl +1 -2
- package/bin/generate/utils/command-utils.d.ts +1 -1
- package/bin/generate/utils/command-utils.js +12 -12
- package/bin/generate/utils/nonopininated-cmd.d.ts +1 -1
- package/bin/generate/utils/nonopininated-cmd.js +12 -12
- package/bin/generate/utils/opinionated-cmd.d.ts +1 -1
- package/bin/generate/utils/opinionated-cmd.js +12 -12
- package/bin/generate/utils/string-utils.d.ts +36 -0
- package/bin/generate/utils/string-utils.js +71 -0
- package/bin/help/form.js +5 -1
- package/bin/index.d.ts +0 -1
- package/bin/index.js +0 -1
- package/bin/info/form.js +3 -13
- package/bin/new/cli.js +1 -1
- package/bin/new/form.d.ts +3 -2
- package/bin/new/form.js +42 -23
- package/bin/providers/add/cli.d.ts +1 -0
- package/bin/providers/add/cli.js +27 -4
- package/bin/providers/add/form.d.ts +2 -1
- package/bin/providers/add/form.js +72 -39
- package/bin/providers/create/form.js +1 -1
- package/bin/utils/add-module-to-container.js +16 -11
- package/bin/utils/compiler.d.ts +1 -1
- package/package.json +19 -20
- package/bin/@types/config.d.ts +0 -39
- package/bin/@types/config.js +0 -2
- package/bin/@types/index.d.ts +0 -1
- package/bin/@types/index.js +0 -17
- package/bin/app.container.d.ts +0 -1
- package/bin/app.container.js +0 -8
- package/bin/commands/__tests__/project.commands.spec.d.ts +0 -1
- package/bin/commands/__tests__/project.commands.spec.js +0 -8
- package/bin/types.d.ts +0 -1
- package/bin/types.js +0 -17
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expressots/cli",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-beta.2",
|
|
4
4
|
"description": "Expressots CLI - modern, fast, lightweight nodejs web framework (@cli)",
|
|
5
5
|
"author": "Richard Zampieri",
|
|
6
6
|
"license": "MIT",
|
|
@@ -8,10 +8,11 @@
|
|
|
8
8
|
"url": "https://github.com/expressots/expressots-cli/issues"
|
|
9
9
|
},
|
|
10
10
|
"bin": {
|
|
11
|
-
"expressots": "bin/cli.js"
|
|
11
|
+
"expressots": "bin/cli.js",
|
|
12
|
+
"ex": "bin/cli.js"
|
|
12
13
|
},
|
|
13
14
|
"engines": {
|
|
14
|
-
"node": ">=18.0
|
|
15
|
+
"node": ">=20.18.0"
|
|
15
16
|
},
|
|
16
17
|
"funding": {
|
|
17
18
|
"type": "github",
|
|
@@ -34,23 +35,22 @@
|
|
|
34
35
|
"prepare": "husky",
|
|
35
36
|
"start:build": "npm run build && npm run start",
|
|
36
37
|
"start": "node ./bin/cli.js",
|
|
37
|
-
"start:dev": "
|
|
38
|
-
"build": "npm run clean && tsc -p tsconfig.json &&
|
|
39
|
-
"cp:templates": "cp
|
|
40
|
-
"clean": "
|
|
38
|
+
"start:dev": "tsx ./src/cli.ts",
|
|
39
|
+
"build": "npm run clean && tsc -p tsconfig.json && npm run cp:templates && node scripts/chmod.js ./bin/cli.js",
|
|
40
|
+
"cp:templates": "node scripts/cp.js ./src/generate/templates ./bin/generate/",
|
|
41
|
+
"clean": "node scripts/rm.js bin",
|
|
41
42
|
"prepublish": "npm run build && npm pack",
|
|
42
43
|
"publish": "npm publish --tag latest",
|
|
43
44
|
"format": "prettier --write \"./src/**/*.ts\" --cache",
|
|
44
45
|
"lint": "eslint \"./src/**/*.ts\"",
|
|
45
46
|
"lint:fix": "eslint \"./src/**/*.ts\" --fix",
|
|
46
47
|
"release": "release-it",
|
|
47
|
-
"test": "
|
|
48
|
-
"
|
|
49
|
-
"
|
|
48
|
+
"test": "jest",
|
|
49
|
+
"coverage": "jest --coverage",
|
|
50
|
+
"test:watch": "jest --watch"
|
|
50
51
|
},
|
|
51
52
|
"dependencies": {
|
|
52
|
-
"
|
|
53
|
-
"axios": "^1.7.3",
|
|
53
|
+
"axios": "1.7.7",
|
|
54
54
|
"chalk-animation": "2.0.3",
|
|
55
55
|
"cli-progress": "3.12.0",
|
|
56
56
|
"cli-table3": "0.6.5",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"glob": "10.4.5",
|
|
59
59
|
"inquirer": "8.2.6",
|
|
60
60
|
"mustache": "4.2.0",
|
|
61
|
-
"semver": "7.6.
|
|
61
|
+
"semver": "7.6.3",
|
|
62
62
|
"ts-node": "10.9.2",
|
|
63
63
|
"yargs": "17.7.2"
|
|
64
64
|
},
|
|
@@ -66,31 +66,30 @@
|
|
|
66
66
|
"@codecov/vite-plugin": "^0.0.1-beta.9",
|
|
67
67
|
"@commitlint/cli": "19.2.1",
|
|
68
68
|
"@commitlint/config-conventional": "19.1.0",
|
|
69
|
+
"@expressots/shared": "0.3.0",
|
|
69
70
|
"@release-it/conventional-changelog": "7.0.2",
|
|
70
71
|
"@types/chalk-animation": "1.6.1",
|
|
71
72
|
"@types/cli-progress": "3.11.0",
|
|
72
73
|
"@types/degit": "2.8.3",
|
|
73
74
|
"@types/inquirer": "9.0.3",
|
|
75
|
+
"@types/jest": "^29.5.14",
|
|
74
76
|
"@types/mustache": "4.2.2",
|
|
75
77
|
"@types/node": "20.12.7",
|
|
76
78
|
"@types/yargs": "17.0.22",
|
|
77
79
|
"@typescript-eslint/eslint-plugin": "7.6.0",
|
|
78
80
|
"@typescript-eslint/parser": "7.6.0",
|
|
79
|
-
"@vitest/coverage-v8": "1.4.0",
|
|
80
81
|
"chalk": "4.1.2",
|
|
81
82
|
"eslint": "8.57.0",
|
|
82
83
|
"eslint-config-prettier": "9.1.0",
|
|
83
84
|
"husky": "9.0.11",
|
|
85
|
+
"jest": "^29.7.0",
|
|
84
86
|
"prettier": "3.2.5",
|
|
85
87
|
"reflect-metadata": "0.2.2",
|
|
86
88
|
"release-it": "16.3.0",
|
|
87
|
-
"rimraf": "5.0.5",
|
|
88
89
|
"shx": "0.3.4",
|
|
89
|
-
"ts-
|
|
90
|
-
"
|
|
91
|
-
"
|
|
92
|
-
"vite-tsconfig-paths": "4.3.2",
|
|
93
|
-
"vitest": "1.4.0"
|
|
90
|
+
"ts-jest": "^29.2.5",
|
|
91
|
+
"tsx": "^4.19.2",
|
|
92
|
+
"typescript": "5.2.2"
|
|
94
93
|
},
|
|
95
94
|
"release-it": {
|
|
96
95
|
"git": {
|
package/bin/@types/config.d.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
export declare const enum Pattern {
|
|
2
|
-
LOWER_CASE = "lowercase",
|
|
3
|
-
KEBAB_CASE = "kebab-case",
|
|
4
|
-
PASCAL_CASE = "PascalCase",
|
|
5
|
-
CAMEL_CASE = "camelCase"
|
|
6
|
-
}
|
|
7
|
-
interface IProviders {
|
|
8
|
-
prisma?: {
|
|
9
|
-
schemaName: string;
|
|
10
|
-
schemaPath: string;
|
|
11
|
-
entitiesPath: string;
|
|
12
|
-
entityNamePattern: string;
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* The configuration object for the Expresso CLI.
|
|
17
|
-
*
|
|
18
|
-
* @property {Pattern} scaffoldPattern - The pattern to use when scaffolding files.
|
|
19
|
-
* @property {string} sourceRoot - The root directory for the source files.
|
|
20
|
-
* @property {boolean} opinionated - Whether or not to use the opinionated configuration.
|
|
21
|
-
*
|
|
22
|
-
* @see [ExpressoConfig](https://expresso-ts.com/docs)
|
|
23
|
-
*/
|
|
24
|
-
export interface ExpressoConfig {
|
|
25
|
-
scaffoldPattern: Pattern;
|
|
26
|
-
sourceRoot: string;
|
|
27
|
-
opinionated: boolean;
|
|
28
|
-
providers?: IProviders;
|
|
29
|
-
scaffoldSchematics?: {
|
|
30
|
-
entity?: string;
|
|
31
|
-
controller?: string;
|
|
32
|
-
usecase?: string;
|
|
33
|
-
dto?: string;
|
|
34
|
-
module?: string;
|
|
35
|
-
provider?: string;
|
|
36
|
-
middleware?: string;
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
export {};
|
package/bin/@types/config.js
DELETED
package/bin/@types/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./config";
|
package/bin/@types/index.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./config"), exports);
|
package/bin/app.container.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/bin/app.container.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const vitest_1 = require("vitest");
|
|
4
|
-
(0, vitest_1.describe)("project.commands", () => {
|
|
5
|
-
(0, vitest_1.it)("should return a list of commands", () => {
|
|
6
|
-
(0, vitest_1.expect)(true).toBe(true);
|
|
7
|
-
});
|
|
8
|
-
});
|
package/bin/types.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./@types";
|
package/bin/types.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./@types"), exports);
|