@ama-sdk/schematics 12.4.0-prerelease.23 → 12.4.0-prerelease.25
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/migration.json +5 -0
- package/package.json +15 -11
- 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 +13 -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 +12 -0
- package/schematics/ng-update/typescript/v12.3/coverage-ignore.d.ts +8 -0
- package/schematics/ng-update/typescript/v12.3/coverage-ignore.d.ts.map +1 -0
- package/schematics/ng-update/typescript/v12.3/coverage-ignore.js +61 -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/jest.config.js.template +7 -1
package/migration.json
CHANGED
|
@@ -30,6 +30,11 @@
|
|
|
30
30
|
"version": "12.1.3",
|
|
31
31
|
"description": "Updates of @ama-sdk/schematics to v12.1.3",
|
|
32
32
|
"factory": "./schematics/ng-update/index#updateV12_1_3"
|
|
33
|
+
},
|
|
34
|
+
"migration-v12_3": {
|
|
35
|
+
"version": "12.3.0-prerelease.0",
|
|
36
|
+
"description": "Updates of @ama-sdk/schematics to v12.3.*",
|
|
37
|
+
"factory": "./schematics/ng-update/index#updateV12_3"
|
|
33
38
|
}
|
|
34
39
|
}
|
|
35
40
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ama-sdk/schematics",
|
|
3
|
-
"version": "12.4.0-prerelease.
|
|
3
|
+
"version": "12.4.0-prerelease.25",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -59,24 +59,28 @@
|
|
|
59
59
|
},
|
|
60
60
|
"type-fest": {
|
|
61
61
|
"optional": true
|
|
62
|
+
},
|
|
63
|
+
"typescript": {
|
|
64
|
+
"optional": true
|
|
62
65
|
}
|
|
63
66
|
},
|
|
64
67
|
"peerDependencies": {
|
|
65
|
-
"@ama-sdk/core": "^12.4.0-prerelease.
|
|
68
|
+
"@ama-sdk/core": "^12.4.0-prerelease.25",
|
|
66
69
|
"@angular-devkit/core": "^19.0.0",
|
|
67
70
|
"@angular-devkit/schematics-cli": "^19.0.0",
|
|
68
71
|
"@angular/cli": "^19.0.0",
|
|
69
|
-
"@o3r/schematics": "^12.4.0-prerelease.
|
|
70
|
-
"@o3r/telemetry": "^12.4.0-prerelease.
|
|
72
|
+
"@o3r/schematics": "^12.4.0-prerelease.25",
|
|
73
|
+
"@o3r/telemetry": "^12.4.0-prerelease.25",
|
|
71
74
|
"@openapitools/openapi-generator-cli": "^2.15.0",
|
|
72
75
|
"openapi-types": "^12.0.0",
|
|
73
76
|
"ts-node": "~10.9.2",
|
|
74
|
-
"type-fest": "^4.30.1"
|
|
77
|
+
"type-fest": "^4.30.1",
|
|
78
|
+
"typescript": "^5.5.4"
|
|
75
79
|
},
|
|
76
80
|
"dependencies": {
|
|
77
81
|
"@angular-devkit/core": "~19.2.0",
|
|
78
82
|
"@angular-devkit/schematics": "~19.2.0",
|
|
79
|
-
"@o3r/schematics": "^12.4.0-prerelease.
|
|
83
|
+
"@o3r/schematics": "^12.4.0-prerelease.25",
|
|
80
84
|
"chokidar": "^4.0.3",
|
|
81
85
|
"globby": "^11.1.0",
|
|
82
86
|
"js-yaml": "^4.1.0",
|
|
@@ -87,16 +91,16 @@
|
|
|
87
91
|
"tslib": "^2.6.2"
|
|
88
92
|
},
|
|
89
93
|
"devDependencies": {
|
|
90
|
-
"@ama-sdk/core": "^12.4.0-prerelease.
|
|
94
|
+
"@ama-sdk/core": "^12.4.0-prerelease.25",
|
|
91
95
|
"@angular-devkit/schematics-cli": "~19.2.0",
|
|
92
96
|
"@angular/cli": "~19.2.0",
|
|
93
97
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.0",
|
|
94
98
|
"@nx/eslint-plugin": "~20.8.0",
|
|
95
99
|
"@nx/jest": "~20.8.0",
|
|
96
|
-
"@o3r/build-helpers": "^12.4.0-prerelease.
|
|
97
|
-
"@o3r/eslint-plugin": "^12.4.0-prerelease.
|
|
98
|
-
"@o3r/telemetry": "^12.4.0-prerelease.
|
|
99
|
-
"@o3r/test-helpers": "^12.4.0-prerelease.
|
|
100
|
+
"@o3r/build-helpers": "^12.4.0-prerelease.25",
|
|
101
|
+
"@o3r/eslint-plugin": "^12.4.0-prerelease.25",
|
|
102
|
+
"@o3r/telemetry": "^12.4.0-prerelease.25",
|
|
103
|
+
"@o3r/test-helpers": "^12.4.0-prerelease.25",
|
|
100
104
|
"@openapitools/openapi-generator-cli": "~2.20.0",
|
|
101
105
|
"@schematics/angular": "~19.2.0",
|
|
102
106
|
"@stylistic/eslint-plugin": "~3.1.0",
|
|
@@ -23,4 +23,8 @@ export declare function updateV11_4(): Rule;
|
|
|
23
23
|
* Update of Ama-sdk library V12.1.3
|
|
24
24
|
*/
|
|
25
25
|
export declare function updateV12_1_3(): Rule;
|
|
26
|
+
/**
|
|
27
|
+
* update of Otter library V12.3
|
|
28
|
+
*/
|
|
29
|
+
export declare function updateV12_3(): Rule;
|
|
26
30
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-update/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,IAAI,EACV,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-update/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,IAAI,EACV,MAAM,4BAA4B,CAAC;AAcpC;;GAEG;AAEH,wBAAgB,WAAW,IAAI,IAAI,CAQlC;AAED;;GAEG;AAEH,wBAAgB,WAAW,IAAI,IAAI,CAQlC;AAED;;GAEG;AAEH,wBAAgB,WAAW,IAAI,IAAI,CAQlC;AAED;;GAEG;AAEH,wBAAgB,WAAW,IAAI,IAAI,CAQlC;AAED;;GAEG;AAEH,wBAAgB,WAAW,IAAI,IAAI,CAQlC;AAED;;GAEG;AAEH,wBAAgB,aAAa,IAAI,IAAI,CAQpC;AAED;;GAEG;AAEH,wBAAgB,WAAW,IAAI,IAAI,CAQlC"}
|
|
@@ -6,6 +6,7 @@ exports.updateV10_3 = updateV10_3;
|
|
|
6
6
|
exports.updateV11_0 = updateV11_0;
|
|
7
7
|
exports.updateV11_4 = updateV11_4;
|
|
8
8
|
exports.updateV12_1_3 = updateV12_1_3;
|
|
9
|
+
exports.updateV12_3 = updateV12_3;
|
|
9
10
|
const is_typescript_project_1 = require("../helpers/is-typescript-project");
|
|
10
11
|
const typescript_1 = require("./typescript");
|
|
11
12
|
/**
|
|
@@ -80,4 +81,16 @@ function updateV12_1_3() {
|
|
|
80
81
|
return tree;
|
|
81
82
|
};
|
|
82
83
|
}
|
|
84
|
+
/**
|
|
85
|
+
* update of Otter library V12.3
|
|
86
|
+
*/
|
|
87
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention -- function name contains the version
|
|
88
|
+
function updateV12_3() {
|
|
89
|
+
return (tree, context) => {
|
|
90
|
+
if ((0, is_typescript_project_1.isTypescriptSdk)(tree)) {
|
|
91
|
+
return (0, typescript_1.updateV12_3)()(tree, context);
|
|
92
|
+
}
|
|
93
|
+
return tree;
|
|
94
|
+
};
|
|
95
|
+
}
|
|
83
96
|
//# sourceMappingURL=index.js.map
|
|
@@ -23,4 +23,8 @@ export declare function updateV11_4(): Rule;
|
|
|
23
23
|
* Update of Ama-sdk library V12.1.3
|
|
24
24
|
*/
|
|
25
25
|
export declare function updateV12_1_3(): Rule;
|
|
26
|
+
/**
|
|
27
|
+
* Update of Ama-sdk library V12.3
|
|
28
|
+
*/
|
|
29
|
+
export declare function updateV12_3(): Rule;
|
|
26
30
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../schematics/ng-update/typescript/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,IAAI,EACL,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../schematics/ng-update/typescript/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,IAAI,EACL,MAAM,4BAA4B,CAAC;AA4BpC;;GAEG;AAEH,wBAAgB,WAAW,IAAI,IAAI,CAQlC;AAED;;GAEG;AAEH,wBAAgB,WAAW,IAAI,IAAI,CAMlC;AAED;;GAEG;AAEH,wBAAgB,WAAW,IAAI,IAAI,CAMlC;AAED;;GAEG;AAEH,wBAAgB,WAAW,IAAI,IAAI,CAOlC;AAED;;GAEG;AAEH,wBAAgB,WAAW,IAAI,IAAI,CAMlC;AAED;;GAEG;AAEH,wBAAgB,aAAa,IAAI,IAAI,CAMpC;AAED;;GAEG;AAEH,wBAAgB,WAAW,IAAI,IAAI,CAMlC"}
|
|
@@ -6,6 +6,7 @@ exports.updateV10_3 = updateV10_3;
|
|
|
6
6
|
exports.updateV11_0 = updateV11_0;
|
|
7
7
|
exports.updateV11_4 = updateV11_4;
|
|
8
8
|
exports.updateV12_1_3 = updateV12_1_3;
|
|
9
|
+
exports.updateV12_3 = updateV12_3;
|
|
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");
|
|
@@ -14,6 +15,7 @@ const update_openapitools_1 = require("./v11.0/update-openapitools");
|
|
|
14
15
|
const update_regen_script_1 = require("./v11.0/update-regen-script");
|
|
15
16
|
const create_gitattributes_1 = require("./v11.4/create-gitattributes");
|
|
16
17
|
const clean_packagejson_exports_1 = require("./v12.1/clean-packagejson-exports");
|
|
18
|
+
const coverage_ignore_1 = require("./v12.3/coverage-ignore");
|
|
17
19
|
/**
|
|
18
20
|
* update of Otter library V10.0
|
|
19
21
|
*/
|
|
@@ -77,4 +79,14 @@ function updateV12_1_3() {
|
|
|
77
79
|
];
|
|
78
80
|
return (0, schematics_1.chain)(updateRules);
|
|
79
81
|
}
|
|
82
|
+
/**
|
|
83
|
+
* Update of Ama-sdk library V12.3
|
|
84
|
+
*/
|
|
85
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention -- function name contains the version
|
|
86
|
+
function updateV12_3() {
|
|
87
|
+
const updateRules = [
|
|
88
|
+
coverage_ignore_1.updateJestConfigCoveragePathIgnorePatterns
|
|
89
|
+
];
|
|
90
|
+
return (0, schematics_1.chain)(updateRules);
|
|
91
|
+
}
|
|
80
92
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Rule } from '@angular-devkit/schematics';
|
|
2
|
+
/**
|
|
3
|
+
* Update Jest config to ignore coverage of generated path
|
|
4
|
+
* @param tree
|
|
5
|
+
* @param context
|
|
6
|
+
*/
|
|
7
|
+
export declare const updateJestConfigCoveragePathIgnorePatterns: Rule;
|
|
8
|
+
//# sourceMappingURL=coverage-ignore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coverage-ignore.d.ts","sourceRoot":"","sources":["../../../../../schematics/ng-update/typescript/v12.3/coverage-ignore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,IAAI,EACL,MAAM,4BAA4B,CAAC;AAUpC;;;;GAIG;AACH,eAAO,MAAM,0CAA0C,EAAE,IAiExD,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateJestConfigCoveragePathIgnorePatterns = void 0;
|
|
4
|
+
const ts = require("typescript");
|
|
5
|
+
const coveragePathIgnorePatterns = [
|
|
6
|
+
'<rootDir>/src/api/**/*.ts',
|
|
7
|
+
'<rootDir>/src/models/base/**/*.ts',
|
|
8
|
+
'<rootDir>/src/spec/api-mock.ts',
|
|
9
|
+
'<rootDir>/src/spec/operation-adapter.ts'
|
|
10
|
+
];
|
|
11
|
+
/**
|
|
12
|
+
* Update Jest config to ignore coverage of generated path
|
|
13
|
+
* @param tree
|
|
14
|
+
* @param context
|
|
15
|
+
*/
|
|
16
|
+
const updateJestConfigCoveragePathIgnorePatterns = (tree, context) => {
|
|
17
|
+
const filePath = 'jest.config.js';
|
|
18
|
+
if (!tree.exists(filePath)) {
|
|
19
|
+
context.logger.info(`No ${filePath} found, the coverage ignore pattern won't be added.`);
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
const tsSourceFile = ts.createSourceFile(filePath, tree.readText(filePath), ts.ScriptTarget.Latest, true);
|
|
23
|
+
const result = ts.transform(tsSourceFile, [
|
|
24
|
+
(ctx) => (rootNode) => {
|
|
25
|
+
const { factory } = ctx;
|
|
26
|
+
return ts.visitNode(rootNode, (node) => {
|
|
27
|
+
return ts.visitEachChild(node, (statement) => {
|
|
28
|
+
if (ts.isExpressionStatement(statement)
|
|
29
|
+
&& ts.isBinaryExpression(statement.expression)
|
|
30
|
+
&& /module\.exports/.test(statement.expression.left.getText(rootNode))
|
|
31
|
+
&& ts.isObjectLiteralExpression(statement.expression.right)
|
|
32
|
+
&& !statement.expression.right.properties.some((prop) => ts.isPropertyAssignment(prop) && prop.name.getText(rootNode) === 'coveragePathIgnorePatterns')) {
|
|
33
|
+
return factory.updateExpressionStatement(statement, factory.updateBinaryExpression(statement.expression, statement.expression.left, statement.expression.operatorToken, factory.updateObjectLiteralExpression(statement.expression.right, [
|
|
34
|
+
...statement.expression.right.properties,
|
|
35
|
+
factory.createPropertyAssignment('coveragePathIgnorePatterns', factory.createArrayLiteralExpression(coveragePathIgnorePatterns.map((pattern) => factory.createStringLiteral(pattern, true)), true))
|
|
36
|
+
])));
|
|
37
|
+
}
|
|
38
|
+
}, ctx);
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
]);
|
|
42
|
+
const transformedSourceFile = result.transformed[0];
|
|
43
|
+
const printer = ts.createPrinter({
|
|
44
|
+
removeComments: false,
|
|
45
|
+
newLine: ts.NewLineKind.LineFeed
|
|
46
|
+
});
|
|
47
|
+
const content = printer.printFile(transformedSourceFile)
|
|
48
|
+
.split('\n')
|
|
49
|
+
// migrate from 4 spaces to 2 spaces indent
|
|
50
|
+
.map((line) => {
|
|
51
|
+
const match = line.match(/^ */);
|
|
52
|
+
const numberSpaces = match ? match[0].length : 0;
|
|
53
|
+
const newNumber = (numberSpaces - numberSpaces % 2) / 2;
|
|
54
|
+
return line.replace(/^ */, Array.from({ length: newNumber }).fill(' ').join(''));
|
|
55
|
+
})
|
|
56
|
+
.join('\n');
|
|
57
|
+
tree.overwrite(filePath, content);
|
|
58
|
+
return tree;
|
|
59
|
+
};
|
|
60
|
+
exports.updateJestConfigCoveragePathIgnorePatterns = updateJestConfigCoveragePathIgnorePatterns;
|
|
61
|
+
//# sourceMappingURL=coverage-ignore.js.map
|
|
Binary file
|
|
Binary file
|
|
@@ -22,5 +22,11 @@ module.exports = {
|
|
|
22
22
|
stringifyContentPathRegex: '\\.html$',
|
|
23
23
|
}
|
|
24
24
|
]
|
|
25
|
-
}
|
|
25
|
+
},
|
|
26
|
+
coveragePathIgnorePatterns: [
|
|
27
|
+
'<rootDir>/src/api/**/*.ts',
|
|
28
|
+
'<rootDir>/src/models/base/**/*.ts',
|
|
29
|
+
'<rootDir>/src/spec/api-mock.ts',
|
|
30
|
+
'<rootDir>/src/spec/operation-adapter.ts'
|
|
31
|
+
]
|
|
26
32
|
};
|