@ama-sdk/create 10.0.0-prerelease.99 → 10.1.0-prerelease.0
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/README.md +4 -2
- package/index.js +12 -7
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -19,7 +19,8 @@ or
|
|
|
19
19
|
yarn create @ama-sdk typescript <project-name> [...options]
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
-
>
|
|
22
|
+
> [!WARNING]
|
|
23
|
+
> Please notice that the command `yarn create` is **not** available for versions *>= 2.0.0* (see [Yarn cli commands](https://yarnpkg.com/cli)).
|
|
23
24
|
|
|
24
25
|
You can generate an environment with a specific package manager thanks to the `--package-manager` options:
|
|
25
26
|
|
|
@@ -33,4 +34,5 @@ npm create @ama-sdk typescript <project-name> -- --package-manager=yarn [...opti
|
|
|
33
34
|
- `--package-manager`: Node package manager to be used (`npm` and `yarn` are available).
|
|
34
35
|
- `--debug`: Enable schematics debug mode (including dry run).
|
|
35
36
|
|
|
36
|
-
>
|
|
37
|
+
> [!NOTE]
|
|
38
|
+
> If the `--spec-path` is specified, the SDK will be generated based on this specification at the creation time.
|
package/index.js
CHANGED
|
@@ -57,30 +57,35 @@ const getYarnVersion = () => {
|
|
|
57
57
|
}
|
|
58
58
|
};
|
|
59
59
|
const schematicArgs = [
|
|
60
|
-
argv.debug !== undefined ? `--debug=${argv.debug}` : '--debug=false',
|
|
60
|
+
argv.debug !== undefined ? `--debug=${argv.debug}` : '--debug=false', // schematics enable debug mode per default when using schematics with relative path
|
|
61
61
|
'--name', name,
|
|
62
62
|
'--package', pck,
|
|
63
63
|
'--package-manager', packageManager,
|
|
64
64
|
'--directory', targetDirectory,
|
|
65
|
-
...(argv['spec-path'] ? ['--spec-path', argv['spec-path']] : [])
|
|
65
|
+
...(argv['spec-path'] ? ['--spec-path', argv['spec-path']] : []),
|
|
66
|
+
...(typeof argv['o3r-metrics'] !== 'undefined' ? [`--${!argv['o3r-metrics'] ? 'no-' : ''}o3r-metrics`] : [])
|
|
66
67
|
];
|
|
67
68
|
const getSchematicStepInfo = (schematic) => ({
|
|
68
69
|
args: [binPath, schematic, ...schematicArgs]
|
|
69
70
|
});
|
|
70
71
|
const run = () => {
|
|
72
|
+
const runner = process.platform === 'win32' ? `${packageManager}.cmd` : packageManager;
|
|
71
73
|
const steps = [
|
|
72
74
|
getSchematicStepInfo(schematicsToRun[0]),
|
|
73
75
|
...(packageManager === 'yarn'
|
|
74
|
-
? [{ runner
|
|
76
|
+
? [{ runner, args: ['set', 'version', getYarnVersion()], cwd: (0, node_path_1.resolve)(process.cwd(), targetDirectory) }]
|
|
75
77
|
: []),
|
|
76
78
|
...schematicsToRun.slice(1).map(getSchematicStepInfo)
|
|
77
79
|
];
|
|
78
80
|
const errors = steps
|
|
79
|
-
.map((step) => (0, node_child_process_1.spawnSync)(step.runner || process.execPath, step.args, { stdio: '
|
|
80
|
-
.
|
|
81
|
-
.filter((err) => !!err);
|
|
81
|
+
.map((step) => (0, node_child_process_1.spawnSync)(step.runner || process.execPath, step.args, { stdio: 'inherit', cwd: step.cwd || process.cwd() }))
|
|
82
|
+
.filter(({ error, status }) => (error || status !== 0));
|
|
82
83
|
if (errors.length > 0) {
|
|
83
|
-
errors.forEach((
|
|
84
|
+
errors.forEach(({ error }) => {
|
|
85
|
+
if (error) {
|
|
86
|
+
console.error(error);
|
|
87
|
+
}
|
|
88
|
+
});
|
|
84
89
|
process.exit(1);
|
|
85
90
|
}
|
|
86
91
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ama-sdk/create",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.1.0-prerelease.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -17,18 +17,18 @@
|
|
|
17
17
|
"prepare:publish": "prepare-publish ./dist"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@ama-sdk/core": "^10.
|
|
21
|
-
"@ama-sdk/schematics": "^10.
|
|
20
|
+
"@ama-sdk/core": "^10.1.0-prerelease.0",
|
|
21
|
+
"@ama-sdk/schematics": "^10.1.0-prerelease.0",
|
|
22
22
|
"@angular-devkit/core": "~17.2.0",
|
|
23
23
|
"@angular-devkit/schematics": "~17.2.0",
|
|
24
24
|
"@angular-devkit/schematics-cli": "~17.2.0",
|
|
25
25
|
"@angular/cli": "~17.2.0",
|
|
26
|
-
"@o3r/schematics": "^10.
|
|
26
|
+
"@o3r/schematics": "^10.1.0-prerelease.0",
|
|
27
27
|
"@openapitools/openapi-generator-cli": "~2.9.0",
|
|
28
28
|
"@schematics/angular": "~17.2.0",
|
|
29
29
|
"minimist": "^1.2.6",
|
|
30
30
|
"rxjs": "^7.8.1",
|
|
31
|
-
"typescript": "~5.
|
|
31
|
+
"typescript": "~5.3.3"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@angular-eslint/eslint-plugin": "~17.2.0",
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
"@nx/eslint-plugin": "~18.0.2",
|
|
38
38
|
"@nx/jest": "~18.0.2",
|
|
39
39
|
"@nx/js": "~18.0.2",
|
|
40
|
-
"@o3r/build-helpers": "^10.
|
|
41
|
-
"@o3r/eslint-config-otter": "^10.
|
|
42
|
-
"@o3r/eslint-plugin": "^10.
|
|
43
|
-
"@o3r/test-helpers": "^10.
|
|
40
|
+
"@o3r/build-helpers": "^10.1.0-prerelease.0",
|
|
41
|
+
"@o3r/eslint-config-otter": "^10.1.0-prerelease.0",
|
|
42
|
+
"@o3r/eslint-plugin": "^10.1.0-prerelease.0",
|
|
43
|
+
"@o3r/test-helpers": "^10.1.0-prerelease.0",
|
|
44
44
|
"@stylistic/eslint-plugin-ts": "^1.5.4",
|
|
45
45
|
"@types/jest": "~29.5.2",
|
|
46
46
|
"@types/minimist": "^1.2.2",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"eslint": "^8.42.0",
|
|
54
54
|
"eslint-import-resolver-node": "^0.3.4",
|
|
55
55
|
"eslint-plugin-jest": "~27.9.0",
|
|
56
|
-
"eslint-plugin-jsdoc": "~48.
|
|
56
|
+
"eslint-plugin-jsdoc": "~48.2.0",
|
|
57
57
|
"eslint-plugin-prefer-arrow": "~1.2.3",
|
|
58
58
|
"eslint-plugin-unicorn": "^51.0.0",
|
|
59
59
|
"jest": "~29.7.0",
|