@o3r/create 9.7.0-alpha.0 → 10.0.0-alpha.1
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 +15 -3
- package/package.json +24 -23
package/index.js
CHANGED
|
@@ -96,12 +96,22 @@ const isNgNewOptions = (arg) => {
|
|
|
96
96
|
return entries.some(([key]) => [`--${key}`, `--no-${key}`, `--${key.replaceAll(/([A-Z])/g, '-$1').toLowerCase()}`, `--no-${key.replaceAll(/([A-Z])/g, '-$1').toLowerCase()}`].includes(arg));
|
|
97
97
|
}
|
|
98
98
|
else if (arg.startsWith('-')) {
|
|
99
|
-
return entries.some(([
|
|
99
|
+
return entries.some(([, { alias }]) => alias && arg === `-${alias}`);
|
|
100
100
|
}
|
|
101
101
|
return true;
|
|
102
102
|
};
|
|
103
|
+
const schematicsCliOptions = Object.entries(argv)
|
|
104
|
+
.filter(([key]) => key !== '_')
|
|
105
|
+
.map(([key, value]) => value === true && [key] || value === false && key.length > 1 && [`no-${key}`] || [key, value])
|
|
106
|
+
.map(([key, value]) => {
|
|
107
|
+
const optionKey = key.length > 1 ? `--${key}` : `-${key}`;
|
|
108
|
+
return typeof value === 'undefined' ? [optionKey] : [optionKey, value];
|
|
109
|
+
});
|
|
103
110
|
const createNgProject = () => {
|
|
104
|
-
const
|
|
111
|
+
const options = schematicsCliOptions
|
|
112
|
+
.filter(([key]) => isNgNewOptions(key))
|
|
113
|
+
.flat();
|
|
114
|
+
const { error } = (0, node_child_process_1.spawnSync)(process.execPath, [binPath, 'new', ...argv._, ...options, '--skip-install'], {
|
|
105
115
|
stdio: 'inherit'
|
|
106
116
|
});
|
|
107
117
|
if (error) {
|
|
@@ -112,7 +122,9 @@ const createNgProject = () => {
|
|
|
112
122
|
};
|
|
113
123
|
const addOtterFramework = (relativeDirectory = '.') => {
|
|
114
124
|
const cwd = (0, node_path_1.resolve)(process.cwd(), relativeDirectory);
|
|
115
|
-
const
|
|
125
|
+
const options = schematicsCliOptions
|
|
126
|
+
.flat();
|
|
127
|
+
const { error } = (0, node_child_process_1.spawnSync)(process.execPath, [binPath, 'add', `@o3r/core@${version || 'latest'}`, ...options], {
|
|
116
128
|
stdio: 'inherit',
|
|
117
129
|
cwd
|
|
118
130
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@o3r/create",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "10.0.0-alpha.1",
|
|
4
4
|
"description": "Create a new Otter based application",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"create",
|
|
@@ -15,42 +15,43 @@
|
|
|
15
15
|
"prepare:publish": "prepare-publish ./dist"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@angular/cli": "~
|
|
19
|
-
"@schematics/angular": "~
|
|
20
|
-
"minimist": "^1.2.6"
|
|
18
|
+
"@angular/cli": "~17.0.3",
|
|
19
|
+
"@schematics/angular": "~17.0.3",
|
|
20
|
+
"minimist": "^1.2.6",
|
|
21
|
+
"tslib": "^2.5.3"
|
|
21
22
|
},
|
|
22
23
|
"devDependencies": {
|
|
23
|
-
"@angular-eslint/eslint-plugin": "~
|
|
24
|
-
"@angular-eslint/eslint-plugin-template": "~
|
|
25
|
-
"@nx/eslint
|
|
26
|
-
"@nx/
|
|
27
|
-
"@nx/
|
|
28
|
-
"@nx/
|
|
29
|
-
"@o3r/build-helpers": "^
|
|
30
|
-
"@o3r/
|
|
31
|
-
"@o3r/eslint-
|
|
32
|
-
"@o3r/
|
|
24
|
+
"@angular-eslint/eslint-plugin": "~17.1.0",
|
|
25
|
+
"@angular-eslint/eslint-plugin-template": "~17.1.0",
|
|
26
|
+
"@nx/eslint": "~17.1.1",
|
|
27
|
+
"@nx/eslint-plugin": "~17.1.1",
|
|
28
|
+
"@nx/jest": "~17.1.1",
|
|
29
|
+
"@nx/js": "~17.1.1",
|
|
30
|
+
"@o3r/build-helpers": "^10.0.0-alpha.1",
|
|
31
|
+
"@o3r/eslint-config-otter": "^10.0.0-alpha.1",
|
|
32
|
+
"@o3r/eslint-plugin": "^10.0.0-alpha.1",
|
|
33
|
+
"@o3r/test-helpers": "^10.0.0-alpha.1",
|
|
33
34
|
"@types/jest": "~29.5.2",
|
|
34
35
|
"@types/minimist": "^1.2.2",
|
|
35
|
-
"@types/node": "^
|
|
36
|
-
"@typescript-eslint/eslint-plugin": "
|
|
37
|
-
"@typescript-eslint/parser": "^
|
|
38
|
-
"cpy-cli": "^
|
|
36
|
+
"@types/node": "^20.0.0",
|
|
37
|
+
"@typescript-eslint/eslint-plugin": "6.11.0",
|
|
38
|
+
"@typescript-eslint/parser": "^6.11.0",
|
|
39
|
+
"cpy-cli": "^5.0.0",
|
|
39
40
|
"eslint": "^8.42.0",
|
|
40
41
|
"eslint-import-resolver-node": "^0.3.4",
|
|
41
42
|
"eslint-plugin-jest": "~27.6.0",
|
|
42
|
-
"eslint-plugin-jsdoc": "~
|
|
43
|
+
"eslint-plugin-jsdoc": "~48.0.0",
|
|
43
44
|
"eslint-plugin-prefer-arrow": "~1.2.3",
|
|
44
|
-
"eslint-plugin-unicorn": "^
|
|
45
|
+
"eslint-plugin-unicorn": "^50.0.0",
|
|
45
46
|
"jest": "~29.7.0",
|
|
46
47
|
"jest-junit": "~16.0.0",
|
|
47
48
|
"jsonc-eslint-parser": "~2.4.0",
|
|
48
|
-
"nx": "~
|
|
49
|
+
"nx": "~17.1.1",
|
|
49
50
|
"rimraf": "^5.0.1",
|
|
50
51
|
"rxjs": "^7.8.1",
|
|
51
52
|
"ts-jest": "~29.1.1",
|
|
52
|
-
"type-fest": "^3.
|
|
53
|
-
"typescript": "~5.
|
|
53
|
+
"type-fest": "^4.3.1",
|
|
54
|
+
"typescript": "~5.2.2"
|
|
54
55
|
},
|
|
55
56
|
"engines": {
|
|
56
57
|
"node": ">=18.0.0"
|