@ama-sdk/create 10.3.0-prerelease.9 → 11.0.0-next.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.
Files changed (3) hide show
  1. package/README.md +2 -1
  2. package/index.js +5 -5
  3. package/package.json +13 -13
package/README.md CHANGED
@@ -39,7 +39,8 @@ npm create @ama-sdk typescript <project-name> -- --package-manager=yarn [...opti
39
39
 
40
40
  - `--spec-path`: Path to the swagger/open-api specification used to generate the SDK
41
41
  - `--package-manager`: Node package manager to be used (`npm` and `yarn` are available).
42
- - `--debug`: Enable schematics debug mode (including dry run).
42
+ - `--debug --no-dry-run`: Enable schematics debug mode (dry-run is not currently supported).
43
+ - `--o3r-metrics`: Enable or disable the collection of anonymous data for Otter
43
44
  - `--exact-o3r-version` : use a pinned version for [otter packages](https://github.com/AmadeusITGroup/otter/blob/main/docs/README.md).
44
45
 
45
46
  > [!NOTE]
package/index.js CHANGED
@@ -3,7 +3,6 @@
3
3
  /* eslint-disable no-console */
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  const node_child_process_1 = require("node:child_process");
6
- const url = require("node:url");
7
6
  const node_path_1 = require("node:path");
8
7
  const minimist = require("minimist");
9
8
  const packageManagerEnv = process.env.npm_config_user_agent?.split('/')[0];
@@ -59,11 +58,12 @@ const schematicArgs = [
59
58
  '--package', pck,
60
59
  '--package-manager', packageManager,
61
60
  ...(argv['exact-o3r-version'] ? ['--exact-o3r-version'] : []),
62
- ...(typeof argv['o3r-metrics'] !== 'undefined' ? [`--${!argv['o3r-metrics'] ? 'no-' : ''}o3r-metrics`] : [])
61
+ ...(typeof argv['dry-run'] !== 'undefined' ? [`--${!argv['dry-run'] || argv['dry-run'] === 'false' ? 'no-' : ''}dry-run`] : []),
62
+ ...(typeof argv['o3r-metrics'] !== 'undefined' ? [`--${!argv['o3r-metrics'] || argv['o3r-metrics'] === 'false' ? 'no-' : ''}o3r-metrics`] : [])
63
63
  ];
64
64
  const resolveTargetDirectory = (0, node_path_1.resolve)(process.cwd(), targetDirectory);
65
65
  const run = () => {
66
- const isSpecPathUrl = url.URL.canParse(argv['spec-path']);
66
+ const isSpecRelativePath = !!argv['spec-path'] && !(0, node_path_1.parse)(argv['spec-path']).root;
67
67
  const runner = process.platform === 'win32' ? `${packageManager}.cmd` : packageManager;
68
68
  const steps = [
69
69
  { args: [binPath, `${schematicsPackage}:typescript-shell`, ...schematicArgs, '--directory', targetDirectory] },
@@ -75,13 +75,13 @@ const run = () => {
75
75
  binPath,
76
76
  `${schematicsPackage}:typescript-core`,
77
77
  ...schematicArgs,
78
- '--spec-path', isSpecPathUrl ? argv['spec-path'] : (0, node_path_1.relative)(resolveTargetDirectory, (0, node_path_1.resolve)(process.cwd(), argv['spec-path']))
78
+ '--spec-path', isSpecRelativePath ? (0, node_path_1.relative)(resolveTargetDirectory, (0, node_path_1.resolve)(process.cwd(), argv['spec-path'])) : argv['spec-path']
79
79
  ],
80
80
  cwd: resolveTargetDirectory
81
81
  }] : [])
82
82
  ];
83
83
  const errors = steps
84
- .map((step) => (0, node_child_process_1.spawnSync)(step.runner || process.execPath, step.args, { stdio: 'inherit', cwd: step.cwd || process.cwd() }))
84
+ .map((step) => (0, node_child_process_1.spawnSync)(step.runner || `"${process.execPath}"`, step.args, { stdio: 'inherit', cwd: step.cwd || process.cwd(), shell: true }))
85
85
  .filter(({ error, status }) => (error || status !== 0));
86
86
  if (errors.length > 0) {
87
87
  errors.forEach(({ error }) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ama-sdk/create",
3
- "version": "10.3.0-prerelease.9",
3
+ "version": "11.0.0-next.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -17,13 +17,13 @@
17
17
  "prepare:publish": "prepare-publish ./dist"
18
18
  },
19
19
  "dependencies": {
20
- "@ama-sdk/core": "10.3.0-prerelease.9",
21
- "@ama-sdk/schematics": "10.3.0-prerelease.9",
20
+ "@ama-sdk/core": "11.0.0-next.1",
21
+ "@ama-sdk/schematics": "11.0.0-next.1",
22
22
  "@angular-devkit/core": "~17.3.0",
23
23
  "@angular-devkit/schematics": "~17.3.0",
24
24
  "@angular-devkit/schematics-cli": "~17.3.0",
25
25
  "@angular/cli": "~17.3.0",
26
- "@o3r/schematics": "10.3.0-prerelease.9",
26
+ "@o3r/schematics": "11.0.0-next.1",
27
27
  "@openapitools/openapi-generator-cli": "~2.13.0",
28
28
  "@schematics/angular": "~17.3.0",
29
29
  "minimist": "^1.2.6",
@@ -33,14 +33,14 @@
33
33
  "devDependencies": {
34
34
  "@angular-eslint/eslint-plugin": "~17.3.0",
35
35
  "@angular-eslint/eslint-plugin-template": "~17.3.0",
36
- "@nx/eslint": "~18.2.0",
37
- "@nx/eslint-plugin": "~18.2.0",
38
- "@nx/jest": "~18.2.0",
39
- "@nx/js": "~18.2.0",
40
- "@o3r/build-helpers": "^10.3.0-prerelease.9",
41
- "@o3r/eslint-config-otter": "^10.3.0-prerelease.9",
42
- "@o3r/eslint-plugin": "^10.3.0-prerelease.9",
43
- "@o3r/test-helpers": "^10.3.0-prerelease.9",
36
+ "@nx/eslint": "~18.3.0",
37
+ "@nx/eslint-plugin": "~18.3.0",
38
+ "@nx/jest": "~18.3.0",
39
+ "@nx/js": "~18.3.0",
40
+ "@o3r/build-helpers": "^11.0.0-next.1",
41
+ "@o3r/eslint-config-otter": "^11.0.0-next.1",
42
+ "@o3r/eslint-plugin": "^11.0.0-next.1",
43
+ "@o3r/test-helpers": "^11.0.0-next.1",
44
44
  "@stylistic/eslint-plugin-ts": "^1.5.4",
45
45
  "@types/jest": "~29.5.2",
46
46
  "@types/minimist": "^1.2.2",
@@ -59,7 +59,7 @@
59
59
  "jest": "~29.7.0",
60
60
  "jest-junit": "~16.0.0",
61
61
  "jsonc-eslint-parser": "~2.4.0",
62
- "nx": "~18.2.0",
62
+ "nx": "~18.3.0",
63
63
  "pid-from-port": "^1.1.3",
64
64
  "rimraf": "^5.0.1",
65
65
  "rxjs": "^7.8.1",