@ama-sdk/schematics 11.4.0-prerelease.1 → 11.4.0-prerelease.10
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/clear-index.cjs +12 -1
- package/cli/files-pack.cjs +12 -1
- package/cli/update-spec-from-npm.cjs +12 -1
- package/migration.json +5 -0
- package/package.json +9 -8
- package/schematics/java/client-core/swagger-codegen-java-client/target/javaClient-swagger-codegen-tests.jar +0 -0
- package/schematics/java/client-core/swagger-codegen-java-client/target/javaClient-swagger-codegen.jar +0 -0
- package/schematics/migrate/index.d.ts.map +1 -1
- package/schematics/migrate/index.js +4 -0
- package/schematics/ng-update/index.d.ts +4 -0
- package/schematics/ng-update/index.d.ts.map +1 -1
- package/schematics/ng-update/index.js +12 -0
- package/schematics/ng-update/typescript/index.d.ts +4 -0
- package/schematics/ng-update/typescript/index.d.ts.map +1 -1
- package/schematics/ng-update/typescript/index.js +11 -0
- package/schematics/ng-update/typescript/v11.4/create-gitattributes.d.ts +7 -0
- package/schematics/ng-update/typescript/v11.4/create-gitattributes.d.ts.map +1 -0
- package/schematics/ng-update/typescript/v11.4/create-gitattributes.js +26 -0
- package/schematics/typescript/core/openapi-codegen-typescript/target/typescriptFetch-openapi-generator-tests.jar +0 -0
- package/schematics/typescript/core/openapi-codegen-typescript/target/typescriptFetch-openapi-generator.jar +0 -0
- package/schematics/typescript/shell/templates/base/.gitattributes.template +8 -0
package/cli/clear-index.cjs
CHANGED
|
@@ -17,7 +17,7 @@ if (help) {
|
|
|
17
17
|
`);
|
|
18
18
|
process.exit(0);
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
const run = async () => {
|
|
21
21
|
const models = await node_fs_1.promises.readdir(baseDir);
|
|
22
22
|
const shouldRemoveModels = (await Promise.all(models
|
|
23
23
|
.filter((file) => (0, node_fs_1.statSync)((0, node_path_1.resolve)(baseDir, file)).isDirectory())
|
|
@@ -31,5 +31,16 @@ void (async () => {
|
|
|
31
31
|
console.warn(`Removing ${model} model`);
|
|
32
32
|
return node_fs_1.promises.unlink((0, node_path_1.resolve)(baseDir, model, 'index.ts'));
|
|
33
33
|
}));
|
|
34
|
+
};
|
|
35
|
+
void (async () => {
|
|
36
|
+
let wrapper = (fn) => fn;
|
|
37
|
+
try {
|
|
38
|
+
const { createCliWithMetrics } = await Promise.resolve().then(() => require('@o3r/telemetry'));
|
|
39
|
+
wrapper = createCliWithMetrics;
|
|
40
|
+
}
|
|
41
|
+
catch {
|
|
42
|
+
// Do not throw if `@o3r/telemetry` is not installed
|
|
43
|
+
}
|
|
44
|
+
return wrapper(run, '@ama-sdk/schematics:clear-index')();
|
|
34
45
|
})();
|
|
35
46
|
//# sourceMappingURL=clear-index.cjs.map
|
package/cli/files-pack.cjs
CHANGED
|
@@ -61,7 +61,7 @@ const updateExports = async () => {
|
|
|
61
61
|
delete packageJson.scripts;
|
|
62
62
|
await node_fs_2.promises.writeFile(path.join(baseDir, distFolder, 'package.json'), JSON.stringify(packageJson, null, 2));
|
|
63
63
|
};
|
|
64
|
-
|
|
64
|
+
const run = async () => {
|
|
65
65
|
const copyToDist = (file, cwdForCopy) => {
|
|
66
66
|
const distFile = path.resolve(baseDir, distFolder, path.relative(cwdForCopy, file));
|
|
67
67
|
// eslint-disable-next-line no-console
|
|
@@ -92,5 +92,16 @@ void (async () => {
|
|
|
92
92
|
if (!noExports && !watch) {
|
|
93
93
|
await updateExports();
|
|
94
94
|
}
|
|
95
|
+
};
|
|
96
|
+
void (async () => {
|
|
97
|
+
let wrapper = (fn) => fn;
|
|
98
|
+
try {
|
|
99
|
+
const { createCliWithMetrics } = await Promise.resolve().then(() => require('@o3r/telemetry'));
|
|
100
|
+
wrapper = createCliWithMetrics;
|
|
101
|
+
}
|
|
102
|
+
catch {
|
|
103
|
+
// Do not throw if `@o3r/telemetry` is not installed
|
|
104
|
+
}
|
|
105
|
+
return wrapper(run, '@ama-sdk/schematics:files-pack')();
|
|
95
106
|
})();
|
|
96
107
|
//# sourceMappingURL=files-pack.cjs.map
|
|
@@ -35,7 +35,7 @@ if (!packageName) {
|
|
|
35
35
|
logger.error('Need to provide packageName, use `amasdk-update-spec-from-npm --help` for more information');
|
|
36
36
|
process.exit(-1);
|
|
37
37
|
}
|
|
38
|
-
|
|
38
|
+
const run = async () => {
|
|
39
39
|
let specSourcePath;
|
|
40
40
|
const appRequire = (0, node_module_1.createRequire)(node_path_1.posix.join(process.cwd(), 'package.json'));
|
|
41
41
|
const packageJsonPath = appRequire.resolve(`${packageName}/package.json`);
|
|
@@ -71,5 +71,16 @@ void (async () => {
|
|
|
71
71
|
}
|
|
72
72
|
logger.info(`Updating spec file from "${specSourcePath}" to "${specDestinationPath}" (CWD: "${process.cwd()}")`);
|
|
73
73
|
await (0, promises_1.copyFile)(specSourcePath, specDestinationPath);
|
|
74
|
+
};
|
|
75
|
+
void (async () => {
|
|
76
|
+
let wrapper = (fn) => fn;
|
|
77
|
+
try {
|
|
78
|
+
const { createCliWithMetrics } = await Promise.resolve().then(() => require('@o3r/telemetry'));
|
|
79
|
+
wrapper = createCliWithMetrics;
|
|
80
|
+
}
|
|
81
|
+
catch {
|
|
82
|
+
// Do not throw if `@o3r/telemetry` is not installed
|
|
83
|
+
}
|
|
84
|
+
return wrapper(run, '@ama-sdk/schematics:update-spec-from-npm')();
|
|
74
85
|
})();
|
|
75
86
|
//# sourceMappingURL=update-spec-from-npm.cjs.map
|
package/migration.json
CHANGED
|
@@ -20,6 +20,11 @@
|
|
|
20
20
|
"version": "11.0.0-alpha.0",
|
|
21
21
|
"description": "Updates of @ama-sdk/schematics to v11.0.*",
|
|
22
22
|
"factory": "./schematics/ng-update/index#updateV11_0"
|
|
23
|
+
},
|
|
24
|
+
"migration-v11_4": {
|
|
25
|
+
"version": "11.4.0-alpha.0",
|
|
26
|
+
"description": "Updates of @ama-sdk/schematics to v11.4.*",
|
|
27
|
+
"factory": "./schematics/ng-update/index#updateV11_4"
|
|
23
28
|
}
|
|
24
29
|
}
|
|
25
30
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ama-sdk/schematics",
|
|
3
|
-
"version": "11.4.0-prerelease.
|
|
3
|
+
"version": "11.4.0-prerelease.10",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -57,12 +57,12 @@
|
|
|
57
57
|
}
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
|
-
"@ama-sdk/core": "^11.4.0-prerelease.
|
|
60
|
+
"@ama-sdk/core": "^11.4.0-prerelease.10",
|
|
61
61
|
"@angular-devkit/core": "~18.2.0",
|
|
62
62
|
"@angular-devkit/schematics": "~18.2.0",
|
|
63
63
|
"@angular-devkit/schematics-cli": "^18.0.5",
|
|
64
64
|
"@angular/cli": "~18.2.0",
|
|
65
|
-
"@o3r/schematics": "^11.4.0-prerelease.
|
|
65
|
+
"@o3r/schematics": "^11.4.0-prerelease.10",
|
|
66
66
|
"@openapitools/openapi-generator-cli": "~2.13.0",
|
|
67
67
|
"@schematics/angular": "~18.2.0"
|
|
68
68
|
},
|
|
@@ -79,16 +79,17 @@
|
|
|
79
79
|
"tslib": "^2.6.2"
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
82
|
-
"@ama-sdk/core": "^11.4.0-prerelease.
|
|
82
|
+
"@ama-sdk/core": "^11.4.0-prerelease.10",
|
|
83
83
|
"@angular-devkit/schematics-cli": "^18.0.5",
|
|
84
84
|
"@angular-eslint/eslint-plugin": "~18.3.0",
|
|
85
85
|
"@angular/cli": "~18.2.0",
|
|
86
86
|
"@nx/eslint-plugin": "~19.5.0",
|
|
87
87
|
"@nx/jest": "~19.5.0",
|
|
88
|
-
"@o3r/build-helpers": "^11.4.0-prerelease.
|
|
89
|
-
"@o3r/eslint-plugin": "^11.4.0-prerelease.
|
|
90
|
-
"@o3r/schematics": "^11.4.0-prerelease.
|
|
91
|
-
"@o3r/
|
|
88
|
+
"@o3r/build-helpers": "^11.4.0-prerelease.10",
|
|
89
|
+
"@o3r/eslint-plugin": "^11.4.0-prerelease.10",
|
|
90
|
+
"@o3r/schematics": "^11.4.0-prerelease.10",
|
|
91
|
+
"@o3r/telemetry": "^11.4.0-prerelease.10",
|
|
92
|
+
"@o3r/test-helpers": "^11.4.0-prerelease.10",
|
|
92
93
|
"@openapitools/openapi-generator-cli": "~2.13.0",
|
|
93
94
|
"@schematics/angular": "~18.2.0",
|
|
94
95
|
"@stylistic/eslint-plugin-ts": "~2.4.0",
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/migrate/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,8BAA8B,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/migrate/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,8BAA8B,EAAE,MAAM,UAAU,CAAC;AA0C1D;;;GAGG;AACH,eAAO,MAAM,OAAO,YAAa,8BAA8B,wBAG9D,CAAC"}
|
|
@@ -8,11 +8,15 @@ const update_regen_script_1 = require("../ng-update/typescript/v11.0/update-rege
|
|
|
8
8
|
const semver_1 = require("semver");
|
|
9
9
|
const is_typescript_project_1 = require("../helpers/is-typescript-project");
|
|
10
10
|
const update_openapiversion_1 = require("../ng-update/typescript/v10.3/update-openapiversion");
|
|
11
|
+
const typescript_1 = require("../ng-update/typescript");
|
|
11
12
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
12
13
|
const tsMigrationMap = {
|
|
13
14
|
'~10.3.2': (0, update_openapiversion_1.updateOpenApiVersionInProject)(),
|
|
14
15
|
'11.0.*': [
|
|
15
16
|
update_regen_script_1.updateRegenScript
|
|
17
|
+
],
|
|
18
|
+
'11.4.0-alpha.0': [
|
|
19
|
+
typescript_1.updateV11_4
|
|
16
20
|
]
|
|
17
21
|
};
|
|
18
22
|
/* eslint-enable @typescript-eslint/naming-convention */
|
|
@@ -15,4 +15,8 @@ export declare function updateV10_3(): Rule;
|
|
|
15
15
|
* update of Otter library V11.0
|
|
16
16
|
*/
|
|
17
17
|
export declare function updateV11_0(): Rule;
|
|
18
|
+
/**
|
|
19
|
+
* update of Otter library V11.4
|
|
20
|
+
*/
|
|
21
|
+
export declare function updateV11_4(): Rule;
|
|
18
22
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-update/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-update/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAUvD;;GAEG;AACH,wBAAgB,WAAW,IAAI,IAAI,CAQlC;AAED;;GAEG;AACH,wBAAgB,WAAW,IAAI,IAAI,CAQlC;AAED;;GAEG;AACH,wBAAgB,WAAW,IAAI,IAAI,CAQlC;AAED;;GAEG;AACH,wBAAgB,WAAW,IAAI,IAAI,CAQlC;AAED;;GAEG;AACH,wBAAgB,WAAW,IAAI,IAAI,CAQlC"}
|
|
@@ -6,6 +6,7 @@ exports.updateV10_0 = updateV10_0;
|
|
|
6
6
|
exports.updateV10_1 = updateV10_1;
|
|
7
7
|
exports.updateV10_3 = updateV10_3;
|
|
8
8
|
exports.updateV11_0 = updateV11_0;
|
|
9
|
+
exports.updateV11_4 = updateV11_4;
|
|
9
10
|
const typescript_1 = require("./typescript");
|
|
10
11
|
const is_typescript_project_1 = require("../helpers/is-typescript-project");
|
|
11
12
|
/**
|
|
@@ -52,4 +53,15 @@ function updateV11_0() {
|
|
|
52
53
|
return tree;
|
|
53
54
|
};
|
|
54
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* update of Otter library V11.4
|
|
58
|
+
*/
|
|
59
|
+
function updateV11_4() {
|
|
60
|
+
return (tree, context) => {
|
|
61
|
+
if ((0, is_typescript_project_1.isTypescriptSdk)(tree)) {
|
|
62
|
+
return (0, typescript_1.updateV11_4)()(tree, context);
|
|
63
|
+
}
|
|
64
|
+
return tree;
|
|
65
|
+
};
|
|
66
|
+
}
|
|
55
67
|
//# sourceMappingURL=index.js.map
|
|
@@ -15,4 +15,8 @@ export declare function updateV10_3(): Rule;
|
|
|
15
15
|
* Update of Ama-sdk library V11
|
|
16
16
|
*/
|
|
17
17
|
export declare function updateV11_0(): Rule;
|
|
18
|
+
/**
|
|
19
|
+
* Update of Ama-sdk library V11.4
|
|
20
|
+
*/
|
|
21
|
+
export declare function updateV11_4(): Rule;
|
|
18
22
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../schematics/ng-update/typescript/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAS,IAAI,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../schematics/ng-update/typescript/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAS,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAQzD;;GAEG;AACH,wBAAgB,WAAW,IAAI,IAAI,CAQlC;AAED;;GAEG;AACH,wBAAgB,WAAW,IAAI,IAAI,CAMlC;AAED;;GAEG;AACH,wBAAgB,WAAW,IAAI,IAAI,CAMlC;AAED;;GAEG;AACH,wBAAgB,WAAW,IAAI,IAAI,CAOlC;AAED;;GAEG;AACH,wBAAgB,WAAW,IAAI,IAAI,CAMlC"}
|
|
@@ -6,12 +6,14 @@ exports.updateV10_0 = updateV10_0;
|
|
|
6
6
|
exports.updateV10_1 = updateV10_1;
|
|
7
7
|
exports.updateV10_3 = updateV10_3;
|
|
8
8
|
exports.updateV11_0 = updateV11_0;
|
|
9
|
+
exports.updateV11_4 = updateV11_4;
|
|
9
10
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
10
11
|
const script_removal_1 = require("./v10.0/script-removal");
|
|
11
12
|
const add_presets_renovate_1 = require("./v10.1/add-presets-renovate");
|
|
12
13
|
const update_openapiversion_1 = require("./v10.3/update-openapiversion");
|
|
13
14
|
const update_regen_script_1 = require("./v11.0/update-regen-script");
|
|
14
15
|
const update_openapitools_1 = require("./v11.0/update-openapitools");
|
|
16
|
+
const create_gitattributes_1 = require("./v11.4/create-gitattributes");
|
|
15
17
|
/**
|
|
16
18
|
* update of Otter library V10.0
|
|
17
19
|
*/
|
|
@@ -51,4 +53,13 @@ function updateV11_0() {
|
|
|
51
53
|
];
|
|
52
54
|
return (0, schematics_1.chain)(updateRules);
|
|
53
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* Update of Ama-sdk library V11.4
|
|
58
|
+
*/
|
|
59
|
+
function updateV11_4() {
|
|
60
|
+
const updateRules = [
|
|
61
|
+
create_gitattributes_1.createGitAttributesFile
|
|
62
|
+
];
|
|
63
|
+
return (0, schematics_1.chain)(updateRules);
|
|
64
|
+
}
|
|
54
65
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-gitattributes.d.ts","sourceRoot":"","sources":["../../../../../schematics/ng-update/typescript/v11.4/create-gitattributes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAEvD;;;GAGG;AACH,eAAO,MAAM,uBAAuB,EAAE,IAiBrC,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createGitAttributesFile = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Create a default git attributes file (if it does not already exist)
|
|
6
|
+
* @param tree
|
|
7
|
+
*/
|
|
8
|
+
const createGitAttributesFile = (tree) => {
|
|
9
|
+
const gitAttributesFilePath = '.gitattributes';
|
|
10
|
+
if (!tree.exists(gitAttributesFilePath)) {
|
|
11
|
+
tree.create(gitAttributesFilePath, `# Generated files
|
|
12
|
+
src/api/** linguist-generated
|
|
13
|
+
src/spec/api-mocks.ts linguist-generated
|
|
14
|
+
src/spec/operation-adapter.ts linguist-generated
|
|
15
|
+
|
|
16
|
+
# uncomment the following line if there is no core model:
|
|
17
|
+
# src/models/base/** linguist-generated
|
|
18
|
+
|
|
19
|
+
# in case of core models, the \`index.ts\` file should be ignored as follows:
|
|
20
|
+
# !src/models/base/<model>/index.ts
|
|
21
|
+
`);
|
|
22
|
+
}
|
|
23
|
+
return tree;
|
|
24
|
+
};
|
|
25
|
+
exports.createGitAttributesFile = createGitAttributesFile;
|
|
26
|
+
//# sourceMappingURL=create-gitattributes.js.map
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Generated files
|
|
2
|
+
src/spec/api-mocks.ts linguist-generated
|
|
3
|
+
src/spec/operation-adapter.ts linguist-generated
|
|
4
|
+
src/api/** linguist-generated
|
|
5
|
+
src/models/base/** linguist-generated
|
|
6
|
+
|
|
7
|
+
# in case of core models, the `index.ts` file should be ignored as follows:
|
|
8
|
+
# !src/models/base/<model>/index.ts
|