@ama-sdk/schematics 13.4.0-prerelease.12 → 13.4.0-prerelease.13
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/cli/update-spec-from-npm.cjs +5 -5
- package/package.json +10 -10
|
@@ -9,7 +9,7 @@ const promises_1 = require("node:fs/promises");
|
|
|
9
9
|
const node_module_1 = require("node:module");
|
|
10
10
|
const node_path_1 = require("node:path");
|
|
11
11
|
const minimist = require("minimist");
|
|
12
|
-
const
|
|
12
|
+
const schematics_1 = require("@ama-sdk/schematics");
|
|
13
13
|
const argv = minimist(process.argv.slice(2));
|
|
14
14
|
const packageName = argv._[0];
|
|
15
15
|
const { help, output, 'package-path': packagePath, quiet } = argv;
|
|
@@ -18,7 +18,7 @@ const noop = () => { };
|
|
|
18
18
|
const logger = quiet ? { error: noop, warn: noop, log: noop, info: noop, debug: noop } : console;
|
|
19
19
|
const SPEC_YML_EXTENSION = 'yml';
|
|
20
20
|
const DEFAULT_SPEC_EXPORT_PATH_IN_NPM_MODULE = 'openapi';
|
|
21
|
-
const supportedExtensions = [
|
|
21
|
+
const supportedExtensions = [schematics_1.SPEC_JSON_EXTENSION, schematics_1.SPEC_YAML_EXTENSION, SPEC_YML_EXTENSION];
|
|
22
22
|
if (help) {
|
|
23
23
|
// eslint-disable-next-line no-console -- even if we call the CLI with `--quiet` we want to log the help information
|
|
24
24
|
console.log(`This script can be used to update your local spec file from a given locally installed npm package.
|
|
@@ -26,7 +26,7 @@ if (help) {
|
|
|
26
26
|
|
|
27
27
|
package-name The full identifier of the npm package (e.g. @my-scope/my-package)
|
|
28
28
|
--package-path The relative path inside the npm package where to find the spec file (default: './openapi.yml')
|
|
29
|
-
--output The path where the spec file should be copied (default: './${
|
|
29
|
+
--output The path where the spec file should be copied (default: './${schematics_1.LOCAL_SPEC_FILENAME}.${schematics_1.SPEC_YAML_EXTENSION}')
|
|
30
30
|
--quiet Don't log anything
|
|
31
31
|
`);
|
|
32
32
|
process.exit(0);
|
|
@@ -58,9 +58,9 @@ const run = async () => {
|
|
|
58
58
|
if (!specDestinationPath) {
|
|
59
59
|
let specSourceExtension = (0, node_path_1.extname)(specSourcePath);
|
|
60
60
|
if (specSourceExtension === `.${SPEC_YML_EXTENSION}`) {
|
|
61
|
-
specSourceExtension = `.${
|
|
61
|
+
specSourceExtension = `.${schematics_1.SPEC_YAML_EXTENSION}`;
|
|
62
62
|
}
|
|
63
|
-
specDestinationPath = `./${
|
|
63
|
+
specDestinationPath = `./${schematics_1.LOCAL_SPEC_FILENAME}${specSourceExtension}`;
|
|
64
64
|
if ((0, node_fs_1.existsSync)(openApiConfigDefaultPath)) {
|
|
65
65
|
const openApiConfig = JSON.parse(await (0, promises_1.readFile)(openApiConfigDefaultPath, { encoding: 'utf8' }));
|
|
66
66
|
const generators = Object.values(openApiConfig['generator-cli']?.generators ?? {});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ama-sdk/schematics",
|
|
3
|
-
"version": "13.4.0-prerelease.
|
|
3
|
+
"version": "13.4.0-prerelease.13",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -61,12 +61,12 @@
|
|
|
61
61
|
}
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
|
-
"@ama-sdk/core": "13.4.0-prerelease.
|
|
64
|
+
"@ama-sdk/core": "13.4.0-prerelease.13",
|
|
65
65
|
"@angular-devkit/core": "^20.0.0",
|
|
66
66
|
"@angular-devkit/schematics-cli": "^20.0.0",
|
|
67
67
|
"@angular/cli": "^20.0.0",
|
|
68
|
-
"@o3r/schematics": "13.4.0-prerelease.
|
|
69
|
-
"@o3r/telemetry": "13.4.0-prerelease.
|
|
68
|
+
"@o3r/schematics": "13.4.0-prerelease.13",
|
|
69
|
+
"@o3r/telemetry": "13.4.0-prerelease.13",
|
|
70
70
|
"@openapitools/openapi-generator-cli": "^2.15.0",
|
|
71
71
|
"openapi-types": "^12.0.0",
|
|
72
72
|
"ts-node": "~10.9.2",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"dependencies": {
|
|
77
77
|
"@angular-devkit/core": "~20.3.0",
|
|
78
78
|
"@angular-devkit/schematics": "~20.3.0",
|
|
79
|
-
"@o3r/schematics": "13.4.0-prerelease.
|
|
79
|
+
"@o3r/schematics": "13.4.0-prerelease.13",
|
|
80
80
|
"chokidar": "^4.0.3",
|
|
81
81
|
"globby": "^11.1.0",
|
|
82
82
|
"js-yaml": "^4.1.0",
|
|
@@ -87,16 +87,16 @@
|
|
|
87
87
|
"tslib": "^2.6.2"
|
|
88
88
|
},
|
|
89
89
|
"devDependencies": {
|
|
90
|
-
"@ama-sdk/core": "13.4.0-prerelease.
|
|
90
|
+
"@ama-sdk/core": "13.4.0-prerelease.13",
|
|
91
91
|
"@angular-devkit/schematics-cli": "~20.3.0",
|
|
92
92
|
"@angular/cli": "~20.3.0",
|
|
93
93
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.0",
|
|
94
94
|
"@nx/eslint-plugin": "~21.6.0",
|
|
95
95
|
"@nx/jest": "~21.6.0",
|
|
96
|
-
"@o3r/build-helpers": "13.4.0-prerelease.
|
|
97
|
-
"@o3r/eslint-plugin": "13.4.0-prerelease.
|
|
98
|
-
"@o3r/telemetry": "13.4.0-prerelease.
|
|
99
|
-
"@o3r/test-helpers": "13.4.0-prerelease.
|
|
96
|
+
"@o3r/build-helpers": "13.4.0-prerelease.13",
|
|
97
|
+
"@o3r/eslint-plugin": "13.4.0-prerelease.13",
|
|
98
|
+
"@o3r/telemetry": "13.4.0-prerelease.13",
|
|
99
|
+
"@o3r/test-helpers": "13.4.0-prerelease.13",
|
|
100
100
|
"@openapitools/openapi-generator-cli": "~2.25.0",
|
|
101
101
|
"@schematics/angular": "~20.3.0",
|
|
102
102
|
"@stylistic/eslint-plugin": "~5.5.0",
|