@o3r/schematics 11.6.0-prerelease.4 → 11.6.0-prerelease.40
Sign up to get free protection for your applications and to get access to all the features.
- package/cli/environment.js +1 -0
- package/package.json +28 -20
- package/schematics/ng-add/index.d.ts.map +1 -1
- package/schematics/ng-add/index.js +2 -2
- package/schematics/ng-add/schema.d.ts.map +1 -1
- package/src/interfaces/angular-workspace.d.ts.map +1 -1
- package/src/interfaces/index.d.ts +1 -1
- package/src/interfaces/index.d.ts.map +1 -1
- package/src/interfaces/index.js +1 -1
- package/src/interfaces/index.js.map +1 -1
- package/src/interfaces/rule-factories.d.ts.map +1 -1
- package/src/interfaces/schematic-option.d.ts.map +1 -1
- package/src/modules/index.d.ts +1 -1
- package/src/modules/index.d.ts.map +1 -1
- package/src/modules/index.js +1 -1
- package/src/modules/index.js.map +1 -1
- package/src/modules/modules.constants.d.ts.map +1 -1
- package/src/modules/modules.constants.js.map +1 -1
- package/src/modules/modules.display.rule.d.ts.map +1 -1
- package/src/modules/modules.display.rule.js +1 -2
- package/src/modules/modules.display.rule.js.map +1 -1
- package/src/modules/modules.helpers.d.ts +1 -1
- package/src/modules/modules.helpers.d.ts.map +1 -1
- package/src/modules/modules.helpers.js +5 -6
- package/src/modules/modules.helpers.js.map +1 -1
- package/src/public_api.d.ts +1 -1
- package/src/public_api.d.ts.map +1 -1
- package/src/public_api.js +1 -1
- package/src/public_api.js.map +1 -1
- package/src/rule-factories/add-imports/index.d.ts.map +1 -1
- package/src/rule-factories/add-imports/index.js +9 -5
- package/src/rule-factories/add-imports/index.js.map +1 -1
- package/src/rule-factories/check-packages-peers/index.d.ts.map +1 -1
- package/src/rule-factories/check-packages-peers/index.js +13 -12
- package/src/rule-factories/check-packages-peers/index.js.map +1 -1
- package/src/rule-factories/dev-tools/devtools-registration.d.ts +1 -3
- package/src/rule-factories/dev-tools/devtools-registration.d.ts.map +1 -1
- package/src/rule-factories/dev-tools/devtools-registration.js +34 -19
- package/src/rule-factories/dev-tools/devtools-registration.js.map +1 -1
- package/src/rule-factories/eslint-fix/index.d.ts +1 -2
- package/src/rule-factories/eslint-fix/index.d.ts.map +1 -1
- package/src/rule-factories/eslint-fix/index.js +17 -18
- package/src/rule-factories/eslint-fix/index.js.map +1 -1
- package/src/rule-factories/get-test-frameworks/index.d.ts.map +1 -1
- package/src/rule-factories/get-test-frameworks/index.js +2 -2
- package/src/rule-factories/get-test-frameworks/index.js.map +1 -1
- package/src/rule-factories/index.d.ts +2 -3
- package/src/rule-factories/index.d.ts.map +1 -1
- package/src/rule-factories/index.js +2 -3
- package/src/rule-factories/index.js.map +1 -1
- package/src/rule-factories/ng-add/dependencies.d.ts +16 -1
- package/src/rule-factories/ng-add/dependencies.d.ts.map +1 -1
- package/src/rule-factories/ng-add/dependencies.js +32 -17
- package/src/rule-factories/ng-add/dependencies.js.map +1 -1
- package/src/rule-factories/ng-add/index.d.ts +1 -1
- package/src/rule-factories/ng-add/index.d.ts.map +1 -1
- package/src/rule-factories/ng-add/index.js +1 -1
- package/src/rule-factories/ng-add/index.js.map +1 -1
- package/src/rule-factories/ng-add/ng-add.helpers.d.ts +1 -1
- package/src/rule-factories/ng-add/ng-add.helpers.d.ts.map +1 -1
- package/src/rule-factories/ng-add/ng-add.helpers.js +22 -23
- package/src/rule-factories/ng-add/ng-add.helpers.js.map +1 -1
- package/src/rule-factories/ng-add/schematics-register.d.ts.map +1 -1
- package/src/rule-factories/ng-add/schematics-register.js +36 -28
- package/src/rule-factories/ng-add/schematics-register.js.map +1 -1
- package/src/rule-factories/remove-packages/index.d.ts.map +1 -1
- package/src/rule-factories/remove-packages/index.js +9 -9
- package/src/rule-factories/remove-packages/index.js.map +1 -1
- package/src/rule-factories/update-imports/list-of-vars.js.map +1 -1
- package/src/rule-factories/update-imports/update-imports-with-scope.d.ts.map +1 -1
- package/src/rule-factories/update-imports/update-imports-with-scope.js +3 -2
- package/src/rule-factories/update-imports/update-imports-with-scope.js.map +1 -1
- package/src/rule-factories/update-imports/update-ts-imports.d.ts.map +1 -1
- package/src/rule-factories/update-imports/update-ts-imports.js +3 -3
- package/src/rule-factories/update-imports/update-ts-imports.js.map +1 -1
- package/src/rule-factories/vscode-extensions/index.d.ts.map +1 -1
- package/src/rule-factories/vscode-extensions/index.js +5 -5
- package/src/rule-factories/vscode-extensions/index.js.map +1 -1
- package/src/tasks/eslint/index.d.ts +1 -1
- package/src/tasks/eslint/index.d.ts.map +1 -1
- package/src/tasks/eslint/index.js +2 -2
- package/src/tasks/eslint/index.js.map +1 -1
- package/src/tasks/link/index.d.ts.map +1 -1
- package/src/tasks/link/index.js.map +1 -1
- package/src/tasks/ng-add/index.d.ts.map +1 -1
- package/src/tasks/package-manager/interfaces.d.ts.map +1 -1
- package/src/tasks/package-manager/npm-exec.d.ts.map +1 -1
- package/src/tasks/package-manager/npm-exec.js.map +1 -1
- package/src/tasks/package-manager/npm-install.d.ts.map +1 -1
- package/src/tasks/package-manager/npm-install.js +1 -1
- package/src/tasks/package-manager/npm-install.js.map +1 -1
- package/src/tasks/package-manager/npm-run.d.ts.map +1 -1
- package/src/tasks/package-manager/npm-run.js.map +1 -1
- package/src/utility/ast.d.ts.map +1 -1
- package/src/utility/ast.js +12 -15
- package/src/utility/ast.js.map +1 -1
- package/src/utility/builder.d.ts.map +1 -1
- package/src/utility/builder.js.map +1 -1
- package/src/utility/collection.d.ts.map +1 -1
- package/src/utility/collection.js +2 -3
- package/src/utility/collection.js.map +1 -1
- package/src/utility/component.d.ts.map +1 -1
- package/src/utility/component.js +2 -2
- package/src/utility/component.js.map +1 -1
- package/src/utility/dependencies.d.ts +1 -1
- package/src/utility/dependencies.d.ts.map +1 -1
- package/src/utility/dependencies.js +4 -5
- package/src/utility/dependencies.js.map +1 -1
- package/src/utility/environment.d.ts.map +1 -1
- package/src/utility/environment.js.map +1 -1
- package/src/utility/error.d.ts.map +1 -1
- package/src/utility/error.js.map +1 -1
- package/src/utility/file-info.d.ts +1 -1
- package/src/utility/file-info.d.ts.map +1 -1
- package/src/utility/file-info.js +1 -1
- package/src/utility/file-info.js.map +1 -1
- package/src/utility/generation.d.ts +1 -1
- package/src/utility/generation.d.ts.map +1 -1
- package/src/utility/generation.js +2 -15
- package/src/utility/generation.js.map +1 -1
- package/src/utility/gitignore.d.ts.map +1 -1
- package/src/utility/gitignore.js +2 -2
- package/src/utility/gitignore.js.map +1 -1
- package/src/utility/index.d.ts +2 -2
- package/src/utility/index.d.ts.map +1 -1
- package/src/utility/index.js +2 -2
- package/src/utility/index.js.map +1 -1
- package/src/utility/loaders.d.ts +1 -1
- package/src/utility/loaders.d.ts.map +1 -1
- package/src/utility/loaders.js +6 -6
- package/src/utility/loaders.js.map +1 -1
- package/src/utility/logo.d.ts +1 -1
- package/src/utility/logo.d.ts.map +1 -1
- package/src/utility/logo.js.map +1 -1
- package/src/utility/matching-peers.d.ts +3 -1
- package/src/utility/matching-peers.d.ts.map +1 -1
- package/src/utility/matching-peers.js +8 -6
- package/src/utility/matching-peers.js.map +1 -1
- package/src/utility/migration/migration.d.ts.map +1 -1
- package/src/utility/migration/migration.js +3 -3
- package/src/utility/migration/migration.js.map +1 -1
- package/src/utility/modules.d.ts +1 -1
- package/src/utility/modules.d.ts.map +1 -1
- package/src/utility/modules.js +16 -16
- package/src/utility/modules.js.map +1 -1
- package/src/utility/monorepo.d.ts +9 -4
- package/src/utility/monorepo.d.ts.map +1 -1
- package/src/utility/monorepo.js +0 -2
- package/src/utility/monorepo.js.map +1 -1
- package/src/utility/package-manager-runner.d.ts +2 -3
- package/src/utility/package-manager-runner.d.ts.map +1 -1
- package/src/utility/package-manager-runner.js +1 -4
- package/src/utility/package-manager-runner.js.map +1 -1
- package/src/utility/package-version.d.ts +0 -1
- package/src/utility/package-version.d.ts.map +1 -1
- package/src/utility/package-version.js +3 -4
- package/src/utility/package-version.js.map +1 -1
- package/src/utility/question.d.ts.map +1 -1
- package/src/utility/question.js.map +1 -1
- package/src/utility/routes.d.ts.map +1 -1
- package/src/utility/routes.js +6 -6
- package/src/utility/routes.js.map +1 -1
- package/src/utility/sub-entry.d.ts.map +1 -1
- package/src/utility/sub-entry.js.map +1 -1
- package/src/utility/template-property.helper.d.ts.map +1 -1
- package/src/utility/template-property.helper.js +2 -2
- package/src/utility/template-property.helper.js.map +1 -1
- package/src/utility/update-imports.d.ts +1 -1
- package/src/utility/update-imports.d.ts.map +1 -1
- package/src/utility/update-imports.js +10 -14
- package/src/utility/update-imports.js.map +1 -1
- package/src/utility/update-pipes.d.ts.map +1 -1
- package/src/utility/update-pipes.js +5 -5
- package/src/utility/update-pipes.js.map +1 -1
- package/src/utility/wrapper.d.ts.map +1 -1
- package/src/utility/wrapper.js +12 -11
- package/src/utility/wrapper.js.map +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"loaders.js","sourceRoot":"","sources":["../../../src/utility/loaders.ts"],"names":[],"mappings":";;
|
1
|
+
{"version":3,"file":"loaders.js","sourceRoot":"","sources":["../../../src/utility/loaders.ts"],"names":[],"mappings":";;AA6CA,0CAIC;AAQD,gDAKC;AAQD,4CAGC;AAQD,0CAQC;AAMD,wEAEC;AAQD,8CAGC;AASD,8CAQC;AAOD,gCAGC;AAQD,kGAOC;AAOD,sEAKC;AAOD,kFAEC;AAOD,sEAEC;AAMD,kFAEC;AA5LD,kCAAkC;AAKlC,2DAGoC;AACpC,2EAEkD;AAClD,yCAEmB;AASnB,SAAS,kBAAkB,CAAC,MAAsB,EAAE,SAAmB,EAAE,mBAA8C,EAAE,iBAA2B;IAClJ,IAAI,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACpF,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,SAAS,CAAC,QAAQ;SACf,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;SAC3C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,CAAC,OAAO,CAAC,IAAI,EAAE,eAAe,CAAC,EAAE,QAAQ,CAAC,CAAC;SACvG,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,gBAAgB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;AAC3D,CAAC;AAED;;;;GAIG;AACH,SAAgB,6BAA6B,CAAC,IAAU,EAAE,SAAiB;IACzE,MAAM,QAAQ,GAAG,CAAC,oBAAoB,EAAE,cAAc,CAAC,CAAC;IACxD,MAAM,gBAAgB,GAAG,IAAI,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,CAAC;IACxD,OAAO,iBAAiB,CAAC,IAAI,EAAE,GAAG,EAAE,QAAQ,CAAC;SAC1C,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,gBAAgB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;AAC3D,CAAC;AAED;;;;GAIG;AACH,SAAgB,mCAAmC,CAAC,IAAU,EAAE,SAAiB;IAC/E,OAAO,2CAA2C,CAAC,IAAI,EAAE,EAAE,EAAE,SAAS,CAAC,CAAC;AAC1E,CAAC;AAED;;;;GAIG;AACH,SAAgB,6BAA6B,CAAC,IAAU,EAAE,SAAiB;IACzE,OAAO,2CAA2C,CAAC,IAAI,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;AAC7E,CAAC;AAED;;;GAGG;AACH,SAAgB,mCAAmC,CAAC,IAAU;IAC5D,OAAO,6BAA6B,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AACnD,CAAC"}
|
package/src/utility/logo.d.ts
CHANGED
@@ -2,5 +2,5 @@
|
|
2
2
|
* Generate Logo for Otter Project
|
3
3
|
* @param size Size of the logo to generate
|
4
4
|
*/
|
5
|
-
export declare const getLogo: (size?: "medium" | "small") =>
|
5
|
+
export declare const getLogo: (size?: "medium" | "small") => "\n @ @\n ******/****************@*****@\n @****************************%\n *****************************@\n @********************************@\n ********@@*****@@@@@@****@@********@\n @@****@*******************************@@\n ***************@@****@*********@*****@\n @**************************%*********@ ..|''|| . .\n @**********************************@ .|' || .||. .||. .... ... ..\n @***************************(@ || || || || .|...|| ||' ''\n ****@ @******************************@ '|. || || || || ||\n@******& ***** ********************@*****@ ''|...|' '|.' '|.' '|...' .||.\n @******@*********@**************@*********@\n *****%************** ******@*************\n @***@*****@(*******@******@*******@(*****\n @**@************************************\n @*****************@*@****************@\n @@*******************************************(@\n @************************************************\n @**********************(((/********************@\n " | "\n ..|''|| . .\n .|' || .||. .||. .... ... ..\n || || || || .|...|| ||' ''\n '|. || || || || ||\n ''|...|' '|.' '|.' '|...' .||.\n ";
|
6
6
|
//# sourceMappingURL=logo.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"logo.d.ts","sourceRoot":"","sources":["../../../src/utility/logo.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"logo.d.ts","sourceRoot":"","sources":["../../../src/utility/logo.ts"],"names":[],"mappings":"AAgCA;;;GAGG;AACH,eAAO,MAAM,OAAO,UAAU,QAAQ,GAAG,OAAO,46CAM/C,CAAC"}
|
package/src/utility/logo.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"logo.js","sourceRoot":"","sources":["../../../src/utility/logo.ts"],"names":[],"mappings":";;;
|
1
|
+
{"version":3,"file":"logo.js","sourceRoot":"","sources":["../../../src/utility/logo.ts"],"names":[],"mappings":";;;AAAA,MAAM,UAAU,GAAG;;;;;;;;;;;;;;;;;;;;;;GAsBhB,CAAC;AAEJ,MAAM,SAAS,GAAG;;;;;;GAMf,CAAC;AAEJ;;;GAGG;AACI,MAAM,OAAO,GAAG,CAAC,OAA2B,QAAQ,EAAE,EAAE;IAC7D,MAAM,KAAK,GAAG;QACZ,MAAM,EAAE,UAAU;QAClB,KAAK,EAAE,SAAS;KAC8B,CAAC;IACjD,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC;AACrB,CAAC,CAAC;AANW,QAAA,OAAO,WAMlB"}
|
@@ -1,9 +1,11 @@
|
|
1
|
+
import * as fs from 'node:fs';
|
1
2
|
/**
|
2
3
|
* Retrieve the peer dependencies with the given pattern from the given package json file
|
3
4
|
* @param packageJsonPath
|
4
5
|
* @param pattern
|
6
|
+
* @param readFileSync
|
5
7
|
*/
|
6
|
-
export declare function getPeerDepWithPattern(packageJsonPath: string, pattern?: RegExp | string[]): {
|
8
|
+
export declare function getPeerDepWithPattern(packageJsonPath: string, pattern?: RegExp | string[], readFileSync?: typeof fs.readFileSync): {
|
7
9
|
packageName: string | undefined;
|
8
10
|
packageVersion: string | undefined;
|
9
11
|
matchingPackages: string[];
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"matching-peers.d.ts","sourceRoot":"","sources":["../../../src/utility/matching-peers.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"matching-peers.d.ts","sourceRoot":"","sources":["../../../src/utility/matching-peers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAK9B;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,eAAe,EAAE,MAAM,EAAE,OAAO,GAAE,MAAM,GAAG,MAAM,EAA4B,EAAE,YAAY,yBAAkB;;;;;;;EAgBlJ;AASD;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,eAAe,EAAE,MAAM,EAAE,YAAY,UAAO,EAAE,cAAc,SAAsB,EAAE,kBAAkB,SAAK;;;;EASzI;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,eAAe,EAAE,MAAM,EAAE,cAAc,SAAsB;;;;EAYhG"}
|
@@ -8,16 +8,18 @@ const fs = require("node:fs");
|
|
8
8
|
* Retrieve the peer dependencies with the given pattern from the given package json file
|
9
9
|
* @param packageJsonPath
|
10
10
|
* @param pattern
|
11
|
+
* @param readFileSync
|
11
12
|
*/
|
12
|
-
function getPeerDepWithPattern(packageJsonPath, pattern = /^@(otter|o3r|ama-sdk)
|
13
|
-
const packageJsonContent = JSON.parse(
|
13
|
+
function getPeerDepWithPattern(packageJsonPath, pattern = /^@(otter|o3r|ama-sdk)/, readFileSync = fs.readFileSync) {
|
14
|
+
const packageJsonContent = JSON.parse(readFileSync(packageJsonPath, { encoding: 'utf8' }));
|
14
15
|
const packageName = packageJsonContent.name;
|
15
16
|
const packageVersion = packageJsonContent.version;
|
16
17
|
const optionalPackages = Object.entries(packageJsonContent.peerDependenciesMeta || {})
|
17
18
|
.filter(([, dep]) => dep?.optional)
|
18
19
|
.map(([depName]) => depName);
|
19
20
|
const matchingPackagesVersions = Object.fromEntries(Object.entries(packageJsonContent.peerDependencies || {})
|
20
|
-
.filter(([peerDep]) => (Array.isArray(pattern) ? pattern.includes(peerDep) : pattern.test(peerDep)) && !optionalPackages.includes(peerDep))
|
21
|
+
.filter(([peerDep]) => (Array.isArray(pattern) ? pattern.includes(peerDep) : pattern.test(peerDep)) && !optionalPackages.includes(peerDep))
|
22
|
+
.map(([peerDep, range]) => ([peerDep, packageJsonContent.generatorDependencies?.[peerDep] || range])));
|
21
23
|
const matchingPackages = Object.keys(matchingPackagesVersions);
|
22
24
|
return { packageName, packageVersion, matchingPackages, matchingPackagesVersions };
|
23
25
|
}
|
@@ -39,8 +41,8 @@ function getO3rPeerDeps(packageJsonPath, filterBasics = true, packagePattern = /
|
|
39
41
|
return {
|
40
42
|
packageName: depsInfo.packageName,
|
41
43
|
packageVersion: versionRangePrefix + depsInfo.packageVersion,
|
42
|
-
o3rPeerDeps: filterBasics
|
43
|
-
depsInfo.matchingPackages.filter((peerDep) => !basicsPackageName.has(peerDep))
|
44
|
+
o3rPeerDeps: filterBasics
|
45
|
+
? depsInfo.matchingPackages.filter((peerDep) => !basicsPackageName.has(peerDep))
|
44
46
|
: depsInfo.matchingPackages
|
45
47
|
};
|
46
48
|
}
|
@@ -57,7 +59,7 @@ function getO3rGeneratorDeps(packageJsonPath, packagePattern = /^@(?:o3r|ama-sdk
|
|
57
59
|
.filter(([, dep]) => dep?.optional)
|
58
60
|
.map(([depName]) => depName);
|
59
61
|
const o3rGeneratorDeps = Object.keys(packageJsonContent.peerDependencies || [])
|
60
|
-
.filter(peerDep => packagePattern.test(peerDep) && !optionalPackages.includes(peerDep));
|
62
|
+
.filter((peerDep) => packagePattern.test(peerDep) && !optionalPackages.includes(peerDep));
|
61
63
|
return { packageName, packageVersion, o3rGeneratorDeps };
|
62
64
|
}
|
63
65
|
//# sourceMappingURL=matching-peers.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"matching-peers.js","sourceRoot":"","sources":["../../../src/utility/matching-peers.ts"],"names":[],"mappings":";;
|
1
|
+
{"version":3,"file":"matching-peers.js","sourceRoot":"","sources":["../../../src/utility/matching-peers.ts"],"names":[],"mappings":";;AAWA,sDAgBC;AAgBD,wCASC;AAOD,kDAYC;AAvED,8BAA8B;AAK9B;;;;;GAKG;AACH,SAAgB,qBAAqB,CAAC,eAAuB,EAAE,UAA6B,uBAAuB,EAAE,YAAY,GAAG,EAAE,CAAC,YAAY;IACjJ,MAAM,kBAAkB,GAAqE,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,eAAe,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;IAC7J,MAAM,WAAW,GAAG,kBAAkB,CAAC,IAAI,CAAC;IAC5C,MAAM,cAAc,GAAG,kBAAkB,CAAC,OAAO,CAAC;IAClD,MAAM,gBAAgB,GAAG,MAAM,CAAC,OAAO,CAAC,kBAAkB,CAAC,oBAAoB,IAAI,EAAE,CAAC;SACnF,MAAM,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC,GAAG,EAAE,QAAQ,CAAC;SAClC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC;IAE/B,MAAM,wBAAwB,GAAG,MAAM,CAAC,WAAW,CACjD,MAAM,CAAC,OAAO,CAAC,kBAAkB,CAAC,gBAAgB,IAAI,EAAE,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C,gBAAgB;KAC9B,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,SAAgB,mBAAmB,CAAC,eAAuB,EAAE,cAAc,GAAG,mBAAmB;IAC/F,MAAM,kBAAkB,GAAgB,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,eAAe,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;IAC3G,MAAM,WAAW,GAAG,kBAAkB,CAAC,IAAI,CAAC;IAC5C,MAAM,cAAc,GAAG,kBAAkB,CAAC,OAAO,CAAC;IAClD,MAAM,gBAAgB,GAAG,MAAM,CAAC,OAAO,CAAC,kBAAkB,CAAC,qBAAqB,IAAI,EAAE,CAAC;SACpF,MAAM,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC,GAAG,EAAE,QAAQ,CAAC;SAClC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC;IAE/B,MAAM,gBAAgB,GAAG,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,gBAAgB,IAAI,EAAE,CAAC;SAC5E,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;IAE5F,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,gBAAgB,EAAE,CAAC;AAC3D,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"migration.d.ts","sourceRoot":"","sources":["../../../../src/utility/migration/migration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
1
|
+
{"version":3,"file":"migration.d.ts","sourceRoot":"","sources":["../../../../src/utility/migration/migration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACV,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAEL,KAAK,IAAI,EACV,MAAM,4BAA4B,CAAC;AAOpC,4BAA4B;AAC5B,UAAU,wBAAwB;IAChC,2DAA2D;IAC3D,IAAI,EAAE,MAAM,CAAC;IAEb;;;OAGG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED,sDAAsD;AACtD,MAAM,WAAW,iBAAiB;IAChC,gDAAgD;IAChD,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,EAAE,CAAC;CAChC;AAED;;GAEG;AACH,UAAU,0BAA0B;IAClC,aAAa;IACb,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,YAAY,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,0BAA0B,YAgB1F,wBAAwB,KAAG,IAAI,CAQhD"}
|
@@ -12,11 +12,11 @@ function getMigrationRuleRunner(rulesMapping, options) {
|
|
12
12
|
const rangeMapping = Object.entries(rulesMapping)
|
13
13
|
.reduce((acc, [range, rule]) => {
|
14
14
|
const checkedRange = (0, semver_1.validRange)(range);
|
15
|
-
if (
|
16
|
-
|
15
|
+
if (checkedRange) {
|
16
|
+
acc.push([checkedRange, Array.isArray(rule) ? rule : [rule]]);
|
17
17
|
}
|
18
18
|
else {
|
19
|
-
|
19
|
+
options?.logger?.warn(`The range "${range}" is invalid and will be ignored in the Migration rule`);
|
20
20
|
}
|
21
21
|
return acc;
|
22
22
|
}, []);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"migration.js","sourceRoot":"","sources":["../../../../src/utility/migration/migration.ts"],"names":[],"mappings":";;
|
1
|
+
{"version":3,"file":"migration.js","sourceRoot":"","sources":["../../../../src/utility/migration/migration.ts"],"names":[],"mappings":";;AA4CA,wDAwBC;AAjED,2DAGoC;AACpC,mCAIgB;AA4BhB;;;;GAIG;AACH,SAAgB,sBAAsB,CAAC,YAA+B,EAAE,OAAoC;IAC1G,MAAM,YAAY,GAAG,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC;SAC9C,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC,EAAE,EAAE;QAC7B,MAAM,YAAY,GAAG,IAAA,mBAAU,EAAC,KAAK,CAAC,CAAC;QACvC,IAAI,YAAY,EAAE,CAAC;YACjB,GAAG,CAAC,IAAI,CAAC,CAAC,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAChE,CAAC;aAAM,CAAC;YACN,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,cAAc,KAAK,wDAAwD,CAAC,CAAC;QACrG,CAAC;QACD,OAAO,GAAG,CAAC;IACb,CAAC,EAAE,EAAwB,CAAC,CAAC;IAE/B;;;OAGG;IACH,OAAO,CAAC,MAAgC,EAAQ,EAAE;QAChD,MAAM,WAAW,GAAG,IAAI,cAAK,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,IAAI,MAAM,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;QAChG,OAAO,IAAA,kBAAK,EACV,YAAY;aACT,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,IAAA,mBAAU,EAAC,KAAK,EAAE,WAAW,CAAC,CAAC;aACnD,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,IAAA,kBAAK,EAAC,KAAK,CAAC,CAAC,CACrC,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC"}
|
package/src/utility/modules.d.ts
CHANGED
@@ -32,9 +32,9 @@ export declare function isApplicationThatUsesRouterModule(tree: Tree, options: {
|
|
32
32
|
* @param sourceFile
|
33
33
|
* @param sourceFileContent
|
34
34
|
* @param context
|
35
|
+
* @param recorder
|
35
36
|
* @param moduleFilePath
|
36
37
|
* @param moduleIndex
|
37
|
-
* @param recorder
|
38
38
|
* @param moduleFunction
|
39
39
|
* @param override
|
40
40
|
*/
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"modules.d.ts","sourceRoot":"","sources":["../../../src/utility/modules.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"modules.d.ts","sourceRoot":"","sources":["../../../src/utility/modules.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,gBAAgB,EAEhB,IAAI,EACJ,cAAc,EACf,MAAM,4BAA4B,CAAC;AAcpC,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAQjC;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,gBAAgB,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,sBAyDtG;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,gBAAgB,EAAE,WAAW,CAAC,EAAE,MAAM,sBAU1F;AAED;;;;;;GAMG;AACH,wBAAgB,iCAAiC,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE;IAAE,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,4BAgB1G;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,EAAE,CAAC,UAAU,EACzB,iBAAiB,EAAE,MAAM,EACzB,OAAO,EAAE,gBAAgB,EACzB,QAAQ,EAAE,cAAc,EACxB,cAAc,EAAE,MAAM,EACtB,WAAW,EAAE,MAAM,EACnB,cAAc,CAAC,EAAE,MAAM,EACvB,QAAQ,UAAQ,kBAqBjB;AAED;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,CAAC,UAAU,EAAE,QAAQ,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,OAAO,kBAMpK;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,CAAC,UAAU,EAAE,iBAAiB,EAAE,MAAM,EAAE,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,cAAc,EACrI,cAAc,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,MAAM,kBAY3G;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,kBAK3G"}
|
package/src/utility/modules.js
CHANGED
@@ -7,13 +7,13 @@ exports.addImportToModuleFile = addImportToModuleFile;
|
|
7
7
|
exports.insertImportToModuleFile = insertImportToModuleFile;
|
8
8
|
exports.addProviderToModuleFile = addProviderToModuleFile;
|
9
9
|
exports.insertBeforeModule = insertBeforeModule;
|
10
|
+
const fs = require("node:fs");
|
11
|
+
const path = require("node:path");
|
10
12
|
const schematics_1 = require("@angular-devkit/schematics");
|
11
|
-
const ts = require("typescript");
|
12
13
|
const ast_utils_1 = require("@schematics/angular/utility/ast-utils");
|
13
14
|
const change_1 = require("@schematics/angular/utility/change");
|
14
|
-
const fs = require("node:fs");
|
15
15
|
const globby_1 = require("globby");
|
16
|
-
const
|
16
|
+
const ts = require("typescript");
|
17
17
|
const ast_1 = require("./ast");
|
18
18
|
const loaders_1 = require("./loaders");
|
19
19
|
/**
|
@@ -32,7 +32,7 @@ function getAppModuleFilePath(tree, context, projectName) {
|
|
32
32
|
}
|
33
33
|
const mainFilePath = workspaceProject.architect.build.options.main ?? workspaceProject.architect.build.options.browser;
|
34
34
|
const mainFile = tree.read(mainFilePath).toString();
|
35
|
-
const bootstrapModuleRegexpResult = mainFile.match(/(?:bootstrapModule|bootstrapApplication)\((?:[
|
35
|
+
const bootstrapModuleRegexpResult = mainFile.match(/(?:bootstrapModule|bootstrapApplication)\((?:[^),]*,)*\s*([^ ),]*)\s*\)/m);
|
36
36
|
if (!bootstrapModuleRegexpResult || !bootstrapModuleRegexpResult[1]) {
|
37
37
|
throw new schematics_1.SchematicsException('Could not find bootstrap module or appConfig');
|
38
38
|
}
|
@@ -44,26 +44,26 @@ function getAppModuleFilePath(tree, context, projectName) {
|
|
44
44
|
}
|
45
45
|
/** Path to the main module file */
|
46
46
|
const moduleFilePath = path.join(path.dirname(mainFilePath), bootstrapModuleFileRegExpResult[1] + '.ts');
|
47
|
-
const exportAppModuleClassRegExp = new RegExp(`(?:class|const)\\s+${bootstrapModule}`, '
|
48
|
-
if (tree.exists(moduleFilePath) && tree.read(moduleFilePath).toString()
|
47
|
+
const exportAppModuleClassRegExp = new RegExp(`(?:class|const)\\s+${bootstrapModule}`, 'm');
|
48
|
+
if (tree.exists(moduleFilePath) && exportAppModuleClassRegExp.test(tree.read(moduleFilePath).toString())) {
|
49
49
|
return moduleFilePath;
|
50
50
|
}
|
51
51
|
const possibleAppModule = path.join(path.dirname(mainFilePath), path.dirname(bootstrapModuleFileRegExpResult[1]), 'app.module.ts');
|
52
|
-
if (tree.exists(possibleAppModule) && tree.read(possibleAppModule).toString()
|
52
|
+
if (tree.exists(possibleAppModule) && exportAppModuleClassRegExp.test(tree.read(possibleAppModule).toString())) {
|
53
53
|
return possibleAppModule;
|
54
54
|
}
|
55
55
|
// search app module source file in tree
|
56
56
|
const normalizedFilePath = moduleFilePath.split(path.sep).join(path.posix.sep);
|
57
57
|
const prog = ts.createProgram([normalizedFilePath], {});
|
58
58
|
const symbols = (0, ast_1.getExportedSymbolsFromFile)(prog, normalizedFilePath);
|
59
|
-
const bootstrapModuleSymbol = symbols.find(s => s.name === bootstrapModule);
|
59
|
+
const bootstrapModuleSymbol = symbols.find((s) => s.name === bootstrapModule);
|
60
60
|
const checker = prog.getTypeChecker();
|
61
61
|
if (bootstrapModuleSymbol) {
|
62
62
|
const pathPlusModuleString = checker.getFullyQualifiedName(bootstrapModuleSymbol);
|
63
|
-
const filePath = pathPlusModuleString?.replace(new RegExp(`.${bootstrapModule}`), '').replace(/['
|
63
|
+
const filePath = pathPlusModuleString?.replace(new RegExp(`.${bootstrapModule}`), '').replace(/["']/g, '');
|
64
64
|
const relativeFilePath = filePath ? path.relative(path.dirname(mainFilePath), `${filePath}.ts`) : undefined;
|
65
65
|
const filePathInTree = relativeFilePath ? path.join(path.dirname(mainFilePath), relativeFilePath) : undefined;
|
66
|
-
if (filePathInTree && tree.exists(filePathInTree) && tree.read(filePathInTree).toString()
|
66
|
+
if (filePathInTree && tree.exists(filePathInTree) && exportAppModuleClassRegExp.test(tree.read(filePathInTree).toString())) {
|
67
67
|
return filePathInTree;
|
68
68
|
}
|
69
69
|
}
|
@@ -94,10 +94,10 @@ function getMainFilePath(tree, context, projectName) {
|
|
94
94
|
*/
|
95
95
|
function isApplicationThatUsesRouterModule(tree, options) {
|
96
96
|
const workspaceProject = options.projectName ? (0, loaders_1.getWorkspaceConfig)(tree)?.projects[options.projectName] : undefined;
|
97
|
-
const cwd = process.cwd().replace(/[
|
98
|
-
const root = (workspaceProject?.root && cwd.endsWith(workspaceProject.root)) ? workspaceProject.root.replace(/[
|
99
|
-
return workspaceProject?.sourceRoot
|
100
|
-
(0, globby_1.sync)(path.posix.join(root, workspaceProject.sourceRoot, '**', '*.ts')).some((filePath) => {
|
97
|
+
const cwd = process.cwd().replace(/[/\\]+/g, '/');
|
98
|
+
const root = (workspaceProject?.root && cwd.endsWith(workspaceProject.root)) ? workspaceProject.root.replace(/[^/\\]+/g, '..') : '.';
|
99
|
+
return workspaceProject?.sourceRoot
|
100
|
+
&& (0, globby_1.sync)(path.posix.join(root, workspaceProject.sourceRoot, '**', '*.ts')).some((filePath) => {
|
101
101
|
const fileContent = fs.readFileSync(filePath).toString();
|
102
102
|
if (!/RouterModule/.test(fileContent)) {
|
103
103
|
return false;
|
@@ -117,9 +117,9 @@ function isApplicationThatUsesRouterModule(tree, options) {
|
|
117
117
|
* @param sourceFile
|
118
118
|
* @param sourceFileContent
|
119
119
|
* @param context
|
120
|
+
* @param recorder
|
120
121
|
* @param moduleFilePath
|
121
122
|
* @param moduleIndex
|
122
|
-
* @param recorder
|
123
123
|
* @param moduleFunction
|
124
124
|
* @param override
|
125
125
|
*/
|
@@ -196,7 +196,7 @@ function addProviderToModuleFile(name, file, sourceFile, sourceFileContent, cont
|
|
196
196
|
* @param moduleIndex
|
197
197
|
*/
|
198
198
|
function insertBeforeModule(line, file, recorder, moduleIndex) {
|
199
|
-
if (file.
|
199
|
+
if (!file.includes(line.replace(/\s*/g, ''))) {
|
200
200
|
return recorder.insertLeft(moduleIndex - 1, `${line}\n\n`);
|
201
201
|
}
|
202
202
|
return recorder;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"modules.js","sourceRoot":"","sources":["../../../src/utility/modules.ts"],"names":[],"mappings":";;
|
1
|
+
{"version":3,"file":"modules.js","sourceRoot":"","sources":["../../../src/utility/modules.ts"],"names":[],"mappings":";;AAoCA,oDAyDC;AAQD,0CAUC;AASD,8EAgBC;AAeD,sDA+BC;AAWD,4DAMC;AAcD,0DAaC;AASD,gDAKC;AAhPD,8BAA8B;AAC9B,kCAAkC;AAClC,2DAKoC;AACpC,qEAM+C;AAC/C,+DAE4C;AAC5C,mCAEgB;AAChB,iCAAiC;AACjC,+BAEe;AACf,uCAEmB;AAEnB;;;;;;GAMG;AACH,SAAgB,oBAAoB,CAAC,IAAU,EAAE,OAAyB,EAAE,WAA2B;IACrG,MAAM,gBAAgB,GAAG,WAAW,CAAC,CAAC,CAAC,IAAA,4BAAkB,EAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACnG,6BAA6B;IAC7B,IAA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,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC;QACjE,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,IAAI,qBAAqB,CAAC,CAAC;QAC1D,OAAO,QAAQ,CAAC;IAClB,CAAC;IACD,IAAA,+BAAmB,EAAC,UAAU,EAAE,cAAc,EAAE,IAAI,EAAE,IAAI,CAAC;SACxD,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;QAClB,IAAI,MAAM,YAAY,qBAAY,EAAE,CAAC;YACnC,QAAQ,GAAG,QAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,EAAE,cAAc,IAAI,MAAM,CAAC,GAAG,GAAG,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACrJ,CAAC;IACH,CAAC,CAAC,CAAC;IACL,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,kBAAkB,CAAC,IAAY,EAAE,IAAY,EAAE,QAAwB,EAAE,WAAmB;IAC1G,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC;QAC7C,OAAO,QAAQ,CAAC,UAAU,CAAC,WAAW,GAAG,CAAC,EAAE,GAAG,IAAI,MAAM,CAAC,CAAC;IAC7D,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
@@ -1,11 +1,10 @@
|
|
1
1
|
import type { SchematicContext, Tree } from '@angular-devkit/schematics';
|
2
|
-
import type {
|
2
|
+
import type { WorkspaceProject, WorkspaceSchema } from '../interfaces/index';
|
3
3
|
/**
|
4
4
|
* Find the relative path to a configuration file at the monorepo root
|
5
5
|
* @param tree
|
6
6
|
* @param files List of files to look for, the first of the list will be used
|
7
7
|
* @param originPath Path from where to calculate the relative path
|
8
|
-
* @returns
|
9
8
|
*/
|
10
9
|
export declare function findConfigFileRelativePath(tree: Tree, files: string[], originPath: string): string;
|
11
10
|
/**
|
@@ -29,9 +28,15 @@ export declare const LIBRARIES_FOLDER_NAME = "libs";
|
|
29
28
|
/** Default name of the folder where applications will be generated inside monorepo */
|
30
29
|
export declare const APPLICATIONS_FOLDER_NAME = "apps";
|
31
30
|
/** Default directories for generated apps/libs inside a monorepo */
|
32
|
-
export declare const DEFAULT_ROOT_FOLDERS:
|
31
|
+
export declare const DEFAULT_ROOT_FOLDERS: {
|
32
|
+
readonly libsDir: "libs";
|
33
|
+
readonly appsDir: "apps";
|
34
|
+
};
|
33
35
|
/** Root folders map for apps/libs inside a monorepo */
|
34
|
-
export declare const BASE_ROOT_FOLDERS_MAP:
|
36
|
+
export declare const BASE_ROOT_FOLDERS_MAP: {
|
37
|
+
readonly library: "libsDir";
|
38
|
+
readonly application: "appsDir";
|
39
|
+
};
|
35
40
|
/**
|
36
41
|
* Retrieve the project base root generation folder, based on the given projectType.
|
37
42
|
* - The default project root will be returned if there is no project root found in nx.json or angular.json (in schematics options)
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"monorepo.d.ts","sourceRoot":"","sources":["../../../src/utility/monorepo.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"monorepo.d.ts","sourceRoot":"","sources":["../../../src/utility/monorepo.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,gBAAgB,EAChB,IAAI,EACL,MAAM,4BAA4B,CAAC;AAIpC,OAAO,KAAK,EAEV,gBAAgB,EAChB,eAAe,EAChB,MAAM,qBAAqB,CAAC;AAQ7B;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,UAAU,EAAE,MAAM,UAOzF;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,WAErC;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,IAAI,kBAGhD;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,IAAI,WAEhD;AAED,mFAAmF;AACnF,eAAO,MAAM,qBAAqB,SAAS,CAAC;AAC5C,sFAAsF;AACtF,eAAO,MAAM,wBAAwB,SAAS,CAAC;AAE/C,oEAAoE;AACpE,eAAO,MAAM,oBAAoB;;;CAGG,CAAC;AAErC,uDAAuD;AACvD,eAAO,MAAM,qBAAqB;;;CAGiD,CAAC;AAEpF;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,eAAe,EAAE,WAAW,CAAC,EAAE,gBAAgB,CAAC,aAAa,CAAC,OAOtJ"}
|
package/src/utility/monorepo.js
CHANGED
@@ -14,7 +14,6 @@ const loaders_1 = require("./loaders");
|
|
14
14
|
* @param tree
|
15
15
|
* @param files List of files to look for, the first of the list will be used
|
16
16
|
* @param originPath Path from where to calculate the relative path
|
17
|
-
* @returns
|
18
17
|
*/
|
19
18
|
function findConfigFileRelativePath(tree, files, originPath) {
|
20
19
|
const foundFile = files.find((file) => tree.exists(`/${file}`));
|
@@ -73,7 +72,6 @@ function getPackagesBaseRootFolder(tree, context, config, projectType) {
|
|
73
72
|
const configName = projectType && exports.BASE_ROOT_FOLDERS_MAP[projectType];
|
74
73
|
const nxExplicitDir = configName && isNxContext(tree) && tree.readJson('/nx.json')?.workspaceLayout[configName];
|
75
74
|
const schematicConfigDir = configName && (0, collection_1.getSchematicOptions)(config, context)?.[configName];
|
76
|
-
// eslint-disable-next-line @typescript-eslint/restrict-plus-operands
|
77
75
|
return schematicConfigDir || nxExplicitDir || ((projectType && configName) ? exports.DEFAULT_ROOT_FOLDERS[configName] : '.');
|
78
76
|
}
|
79
77
|
//# sourceMappingURL=monorepo.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"monorepo.js","sourceRoot":"","sources":["../../../src/utility/monorepo.ts"],"names":[],"mappings":";;;
|
1
|
+
{"version":3,"file":"monorepo.js","sourceRoot":"","sources":["../../../src/utility/monorepo.ts"],"names":[],"mappings":";;;AA0BA,gEAOC;AAMD,kCAEC;AAOD,wDAGC;AAMD,wDAEC;AA4BD,8DAOC;AA9FD,kCAAkC;AAalC,6CAEsB;AACtB,uCAEmB;AAEnB;;;;;GAKG;AACH,SAAgB,0BAA0B,CAAC,IAAU,EAAE,KAAe,EAAE,UAAkB;IACxF,MAAM,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC;IAChE,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;QAC5B,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,UAAU,EAAE,IAAI,SAAS,EAAE,CAAC,CAAC;AAC1D,CAAC;AAED;;;GAGG;AACH,SAAgB,WAAW,CAAC,IAAU;IACpC,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;AACjC,CAAC;AAED;;;;GAIG;AACH,SAAgB,sBAAsB,CAAC,IAAU;IAC/C,MAAM,eAAe,GAAG,IAAA,4BAAkB,EAAC,IAAI,CAAC,CAAC;IACjD,OAAO,eAAe,IAAI,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC,MAAM,KAAK,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,EAAE,CAAC;AAC/I,CAAC;AAED;;;GAGG;AACH,SAAgB,sBAAsB,CAAC,IAAU;IAC/C,OAAO,CAAC,CAAE,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAiB,CAAC,UAAU,CAAC;AACtE,CAAC;AAED,mFAAmF;AACtE,QAAA,qBAAqB,GAAG,MAAM,CAAC;AAC5C,sFAAsF;AACzE,QAAA,wBAAwB,GAAG,MAAM,CAAC;AAE/C,oEAAoE;AACvD,QAAA,oBAAoB,GAAG;IAClC,OAAO,EAAE,6BAAqB;IAC9B,OAAO,EAAE,gCAAwB;CACC,CAAC;AAErC,uDAAuD;AAC1C,QAAA,qBAAqB,GAAG;IACnC,OAAO,EAAE,SAAS;IAClB,WAAW,EAAE,SAAS;CAC2D,CAAC;AAEpF;;;;;;;;GAQG;AACH,SAAgB,yBAAyB,CAAC,IAAU,EAAE,OAAyB,EAAE,MAAuB,EAAE,WAA6C;IACrJ,MAAM,UAAU,GAAG,WAAW,IAAI,6BAAqB,CAAC,WAAW,CAAC,CAAC;IACrE,MAAM,aAAa,GAAG,UAAU,IAAI,WAAW,CAAC,IAAI,CAAC,IAAK,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAS,EAAE,eAAe,CAAC,UAAU,CAAC,CAAC;IAEzH,MAAM,kBAAkB,GAAG,UAAU,IAAI,IAAA,gCAAmB,EAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC;IAE5F,OAAO,kBAAkB,IAAI,aAAa,IAAI,CAAC,CAAC,WAAW,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC,4BAAoB,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;AACvH,CAAC"}
|
@@ -31,17 +31,16 @@ export declare function getPackageManager(options?: PackageManagerOptions): Supp
|
|
31
31
|
* @param workspaceConfig Workspace configuration
|
32
32
|
* @param packageName Name of the package of the workspace to run the script (name from package.json)
|
33
33
|
*/
|
34
|
-
export declare function getPackageManagerRunner(workspaceConfig?: WorkspaceSchema | string | null, packageName?: string
|
34
|
+
export declare function getPackageManagerRunner(workspaceConfig?: WorkspaceSchema | string | null, packageName?: string): string;
|
35
35
|
/**
|
36
36
|
* Get command to execute bin command with your package manager
|
37
37
|
* @param workspaceConfig Workspace configuration
|
38
38
|
* @param packageName Name of the package of the workspace to execute the command
|
39
39
|
*/
|
40
|
-
export declare function getPackageManagerExecutor(workspaceConfig?: WorkspaceSchema | string | null, packageName?: string
|
40
|
+
export declare function getPackageManagerExecutor(workspaceConfig?: WorkspaceSchema | string | null, packageName?: string): string;
|
41
41
|
/**
|
42
42
|
* Determine if the given package is installed
|
43
43
|
* @param packageName name of the package to check
|
44
|
-
* @returns
|
45
44
|
*/
|
46
45
|
export declare function isPackageInstalled(packageName: string): boolean;
|
47
46
|
/**
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"package-manager-runner.d.ts","sourceRoot":"","sources":["../../../src/utility/package-manager-runner.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"package-manager-runner.d.ts","sourceRoot":"","sources":["../../../src/utility/package-manager-runner.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,OAAO,EACR,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EACV,eAAe,EAChB,MAAM,iCAAiC,CAAC;AAEzC,mCAAmC;AACnC,MAAM,MAAM,wBAAwB,GAAG,KAAK,GAAG,MAAM,CAAC;AAEtD,mCAAmC;AACnC,MAAM,MAAM,8BAA8B,GAAG,GAAG,wBAAwB,MAAM,GAAG,MAAM,CAAC;AAExF,mCAAmC;AACnC,MAAM,MAAM,gCAAgC,GAAG,GAAG,wBAAwB,OAAO,GAAG,MAAM,GAAG,KAAK,CAAC;AAOnG,0CAA0C;AAC1C,MAAM,WAAW,qBAAqB;IACpC,8BAA8B;IAC9B,eAAe,CAAC,EAAE,eAAe,GAAG,MAAM,GAAG,IAAI,CAAC;IAElD,4DAA4D;IAC5D,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEnC,8DAA8D;IAC9D,MAAM,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC;CAC5B;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,CAAC,EAAE,GAAG,GAAG,IAAI,IAAI,wBAAwB,CAEtF;AAYD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,CAAC,EAAE,qBAAqB,4BAWhE;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,eAAe,CAAC,EAAE,eAAe,GAAG,MAAM,GAAG,IAAI,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAMvH;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,eAAe,CAAC,EAAE,eAAe,GAAG,MAAM,GAAG,IAAI,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAMzH;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,WAMrD;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,CAAC,EAAE,qBAAqB,GAAG,MAAM,GAAG,SAAS,CAe5F;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,CAAC,EAAE,qBAAqB;;;EAKpE"}
|
@@ -7,8 +7,8 @@ exports.getPackageManagerExecutor = getPackageManagerExecutor;
|
|
7
7
|
exports.isPackageInstalled = isPackageInstalled;
|
8
8
|
exports.getPackageManagerVersion = getPackageManagerVersion;
|
9
9
|
exports.getPackageManagerInfo = getPackageManagerInfo;
|
10
|
-
const node_path_1 = require("node:path");
|
11
10
|
const node_child_process_1 = require("node:child_process");
|
11
|
+
const node_path_1 = require("node:path");
|
12
12
|
const PACKAGE_MANAGER_WORKSPACE_MAPPING = {
|
13
13
|
npm: '--workspace',
|
14
14
|
yarn: 'workspace'
|
@@ -73,7 +73,6 @@ function getPackageManagerExecutor(workspaceConfig, packageName) {
|
|
73
73
|
/**
|
74
74
|
* Determine if the given package is installed
|
75
75
|
* @param packageName name of the package to check
|
76
|
-
* @returns
|
77
76
|
*/
|
78
77
|
function isPackageInstalled(packageName) {
|
79
78
|
try {
|
@@ -95,9 +94,7 @@ function getPackageManagerVersion(options) {
|
|
95
94
|
env: {
|
96
95
|
...process.env,
|
97
96
|
// NPM updater notifier will prevents the child process from closing until it timeout after 3 minutes.
|
98
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
99
97
|
NO_UPDATE_NOTIFIER: '1',
|
100
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
101
98
|
NPM_CONFIG_UPDATE_NOTIFIER: 'false'
|
102
99
|
}
|
103
100
|
}).trim();
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"package-manager-runner.js","sourceRoot":"","sources":["../../../src/utility/package-manager-runner.ts"],"names":[],"mappings":";;
|
1
|
+
{"version":3,"file":"package-manager-runner.js","sourceRoot":"","sources":["../../../src/utility/package-manager-runner.ts"],"names":[],"mappings":";;AA2CA,8DAEC;AAiBD,8CAWC;AAOD,0DAMC;AAOD,8DAMC;AAMD,gDAMC;AAMD,4DAeC;AAMD,sDAKC;AA/ID,2DAE4B;AAC5B,yCAEmB;AAiBnB,MAAM,iCAAiC,GAAG;IACxC,GAAG,EAAE,aAAa;IAClB,IAAI,EAAE,WAAW;CAC0C,CAAC;AAc9D;;;GAGG;AACH,SAAgB,yBAAyB,CAAC,IAAU;IAClD,OAAO,IAAI,KAAK,MAAM,IAAI,IAAI,KAAK,KAAK,CAAC;AAC3C,CAAC;AAED;;;GAGG;AACH,SAAS,qBAAqB,CAAC,kBAA6C;IAC1E,MAAM,uBAAuB,GAAG,yBAAyB,CAAC,OAAO,CAAC,GAAG,EAAE,wBAAwB,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC;IACzI,MAAM,qBAAqB,GAAG,OAAO,CAAC,GAAG,EAAE,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC;IACpF,OAAO,kBAAkB,IAAI,uBAAuB,IAAI,qBAAqB,IAAI,KAAK,CAAC;AACzF,CAAC;AAED;;;;GAIG;AACH,SAAgB,iBAAiB,CAAC,OAA+B;IAC/D,IAAI,2BAA+C,CAAC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ClE,CAAC;IACD,OAAO,GAAG,UAAU,IAAI,iCAAiC,CAAC,UAAU,CAAC,IAAI,WAAW,OAAO,CAAC;AAC9F,CAAC;AAED;;;GAGG;AACH,SAAgB,kBAAkB,CAAC,WAAmB;IACpD,IAAI,CAAC;QACH,OAAO,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,iBAAK,CAAC,IAAI,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC,CAAC;IACpE,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,SAAgB,wBAAwB,CAAC,OAA+B;IACtE,IAAI,CAAC;QACH,OAAO,IAAA,6BAAQ,EAAC,GAAG,iBAAiB,CAAC,OAAO,CAAC,YAAY,EAAE;YACzD,QAAQ,EAAE,MAAM;YAChB,KAAK,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC;YACnC,GAAG,EAAE;gBACH,GAAG,OAAO,CAAC,GAAG;gBACd,uGAAuG;gBACvG,kBAAkB,EAAE,GAAG;gBACvB,0BAA0B,EAAE,OAAO;aACpC;SACF,CAAC,CAAC,IAAI,EAAE,CAAC;IACZ,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,SAAgB,qBAAqB,CAAC,OAA+B;IACnE,OAAO;QACL,IAAI,EAAE,iBAAiB,CAAC,OAAO,CAAC;QAChC,OAAO,EAAE,wBAAwB,CAAC,OAAO,CAAC;KAC3C,CAAC;AACJ,CAAC"}
|
@@ -9,7 +9,6 @@ export declare function getPackageVersion(packageJsonPath: string): string | und
|
|
9
9
|
* Note: It is using file system if no tree provided
|
10
10
|
* @param currentPath current path to inspect
|
11
11
|
* @param tree current path to inspect
|
12
|
-
* @returns
|
13
12
|
*/
|
14
13
|
export declare const findClosestPackageJson: (currentPath: string, tree?: Tree) => string | undefined;
|
15
14
|
//# sourceMappingURL=package-version.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"package-version.d.ts","sourceRoot":"","sources":["../../../src/utility/package-version.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"package-version.d.ts","sourceRoot":"","sources":["../../../src/utility/package-version.ts"],"names":[],"mappings":"AASA,OAAO,EACL,IAAI,EACL,MAAM,4BAA4B,CAAC;AAKpC;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,eAAe,EAAE,MAAM,sBAGxD;AAED;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,gBAAiB,MAAM,SAAS,IAAI,KAAG,MAAM,GAAG,SAQlF,CAAC"}
|
@@ -18,15 +18,14 @@ function getPackageVersion(packageJsonPath) {
|
|
18
18
|
* Note: It is using file system if no tree provided
|
19
19
|
* @param currentPath current path to inspect
|
20
20
|
* @param tree current path to inspect
|
21
|
-
* @returns
|
22
21
|
*/
|
23
22
|
const findClosestPackageJson = (currentPath, tree) => {
|
24
|
-
const dir = (tree ? node_path_1.posix.dirname : node_path_1.dirname)(currentPath);
|
23
|
+
const dir = (tree ? node_path_1.posix.dirname.bind(node_path_1.posix) : node_path_1.dirname)(currentPath);
|
25
24
|
if (dir === currentPath || currentPath === '/') {
|
26
25
|
return undefined;
|
27
26
|
}
|
28
|
-
const packageJsonPath = (tree ? node_path_1.posix.join : node_path_1.join)(dir, 'package.json');
|
29
|
-
return (tree ? tree.exists : node_fs_1.existsSync)(packageJsonPath) ? packageJsonPath : (0, exports.findClosestPackageJson)(dir, tree);
|
27
|
+
const packageJsonPath = (tree ? node_path_1.posix.join.bind(node_path_1.posix) : node_path_1.join)(dir, 'package.json');
|
28
|
+
return (tree ? tree.exists.bind(tree) : node_fs_1.existsSync)(packageJsonPath) ? packageJsonPath : (0, exports.findClosestPackageJson)(dir, tree);
|
30
29
|
};
|
31
30
|
exports.findClosestPackageJson = findClosestPackageJson;
|
32
31
|
//# sourceMappingURL=package-version.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"package-version.js","sourceRoot":"","sources":["../../../src/utility/package-version.ts"],"names":[],"mappings":";;;
|
1
|
+
{"version":3,"file":"package-version.js","sourceRoot":"","sources":["../../../src/utility/package-version.ts"],"names":[],"mappings":";;;AAoBA,8CAGC;AAvBD,8BAA8B;AAC9B,qCAEiB;AACjB,yCAImB;AAQnB;;;GAGG;AACH,SAAgB,iBAAiB,CAAC,eAAuB;IACvD,MAAM,kBAAkB,GAAgB,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,eAAe,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;IAC3G,OAAO,kBAAkB,CAAC,OAAO,CAAC;AACpC,CAAC;AAED;;;;;GAKG;AACI,MAAM,sBAAsB,GAAG,CAAC,WAAmB,EAAE,IAAW,EAAsB,EAAE;IAC7F,MAAM,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,iBAAK,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAK,CAAC,CAAC,CAAC,CAAC,mBAAO,CAAC,CAAC,WAAW,CAAC,CAAC;IACtE,IAAI,GAAG,KAAK,WAAW,IAAI,WAAW,KAAK,GAAG,EAAE,CAAC;QAC/C,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,MAAM,eAAe,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,iBAAK,CAAC,IAAI,CAAC,IAAI,CAAC,iBAAK,CAAC,CAAC,CAAC,CAAC,gBAAI,CAAC,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC;IACpF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,oBAAU,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,IAAA,8BAAsB,EAAC,GAAG,EAAE,IAAI,CAAC,CAAC;AAC7H,CAAC,CAAC;AARW,QAAA,sBAAsB,0BAQjC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"question.d.ts","sourceRoot":"","sources":["../../../src/utility/question.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"question.d.ts","sourceRoot":"","sources":["../../../src/utility/question.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,eAAO,MAAM,YAAY,aAAoB,MAAM,KAAG,OAAO,CAAC,MAAM,CAYnE,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"question.js","sourceRoot":"","sources":["../../../src/utility/question.ts"],"names":[],"mappings":";;;AAAA,
|
1
|
+
{"version":3,"file":"question.js","sourceRoot":"","sources":["../../../src/utility/question.ts"],"names":[],"mappings":";;;AAAA,iDAEuB;AAEvB;;;;GAIG;AACI,MAAM,YAAY,GAAG,KAAK,EAAE,QAAgB,EAAmB,EAAE;IACtE,MAAM,QAAQ,GAAG,IAAA,+BAAe,EAAC;QAC/B,QAAQ,EAAE,IAAI;QACd,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,MAAM,EAAE,OAAO,CAAC,MAAM;KACvB,CAAC,CAAC;IACH,MAAM,WAAW,GAAG,GAAG,EAAE,CAAC,IAAI,OAAO,CAAS,CAAC,OAAO,EAAE,EAAE;QACxD,QAAQ,CAAC,QAAQ,CAAC,GAAG,QAAQ,GAAG,EAAE,OAAO,CAAC,CAAC;IAC7C,CAAC,CAAC,CAAC;IACH,MAAM,MAAM,GAAG,MAAM,WAAW,EAAE,CAAC;IACnC,QAAQ,CAAC,KAAK,EAAE,CAAC;IACjB,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAZW,QAAA,YAAY,gBAYvB"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../src/utility/routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
1
|
+
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../src/utility/routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,IAAI,EACL,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC;;GAEG;AACH,MAAM,WAAW,KAAK;IACpB,yBAAyB;IACzB,IAAI,EAAE,MAAM,CAAC;IAEb,yCAAyC;IACzC,MAAM,EAAE,MAAM,CAAC;IAEf,kCAAkC;IAClC,MAAM,EAAE,MAAM,CAAC;CAChB;AAiCD;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,GAAG,EAAE,CAAC,mBAAmB,GAAG,IAAI,CAuBvI;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,GAAG,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC,uBAAuB,CAAC,GAAG,IAAI,CAuBvJ;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,UAAQ,gEAehI"}
|
package/src/utility/routes.js
CHANGED
@@ -10,9 +10,9 @@ const ts = require("typescript");
|
|
10
10
|
* @param path Path to test
|
11
11
|
*/
|
12
12
|
function hasRoutePath(route, path) {
|
13
|
-
return route.properties.some((property) => property.kind === ts.SyntaxKind.PropertyAssignment
|
14
|
-
property.name.text === 'path'
|
15
|
-
property.initializer.text === path);
|
13
|
+
return route.properties.some((property) => property.kind === ts.SyntaxKind.PropertyAssignment
|
14
|
+
&& property.name.text === 'path'
|
15
|
+
&& property.initializer.text === path);
|
16
16
|
}
|
17
17
|
/**
|
18
18
|
* Indicates if the given variable declaration is a Routes declaration.
|
@@ -45,7 +45,7 @@ function getRoutesDeclaration(tree, context, appRoutingModulePath) {
|
|
45
45
|
return sourceFile.statements
|
46
46
|
.filter((statement) => statement.kind === ts.SyntaxKind.VariableStatement)
|
47
47
|
.map((statement) => statement.declarationList.declarations)
|
48
|
-
.map((declarations) => declarations.filter(isRoutesDeclaration))
|
48
|
+
.map((declarations) => declarations.filter((route) => isRoutesDeclaration(route)))
|
49
49
|
.reduce((declaration, declarations) => declarations.length > 0 ? declarations[0] : declaration, null);
|
50
50
|
}
|
51
51
|
/**
|
@@ -85,9 +85,9 @@ function insertRoute(tree, context, appRoutingModulePath, route, standalone = fa
|
|
85
85
|
const routes = getRoutesNodeArray(tree, context, appRoutingModulePath);
|
86
86
|
if (routes) {
|
87
87
|
const noStarRoutes = routes.filter((r) => !hasRoutePath(r, '**'));
|
88
|
-
const index = noStarRoutes.length
|
88
|
+
const index = noStarRoutes.length > 0 ? noStarRoutes.at(-1).end : routes.end;
|
89
89
|
const routeString = `{path: '${route.path}', load${standalone ? 'Component' : 'Children'}: () => import('${route.import}').then((m) => m.${route.module})}`;
|
90
|
-
const content = noStarRoutes.length
|
90
|
+
const content = noStarRoutes.length > 0 ? `,\n${routeString}` : routeString;
|
91
91
|
const recorder = tree.beginUpdate(appRoutingModulePath);
|
92
92
|
recorder.insertLeft(index, content);
|
93
93
|
tree.commitUpdate(recorder);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"routes.js","sourceRoot":"","sources":["../../../src/utility/routes.ts"],"names":[],"mappings":";;
|
1
|
+
{"version":3,"file":"routes.js","sourceRoot":"","sources":["../../../src/utility/routes.ts"],"names":[],"mappings":";;AAyDA,oDAuBC;AAQD,gDAuBC;AAUD,kCAeC;AApID,iCAAiC;AAgBjC;;;;GAIG;AACH,SAAS,YAAY,CAAC,KAAiC,EAAE,IAAY;IACnE,OAAO,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CACxC,QAAQ,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,C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ED,OAAO,IAAI,CAAC;AACd,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"sub-entry.d.ts","sourceRoot":"","sources":["../../../src/utility/sub-entry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,
|
1
|
+
{"version":3,"file":"sub-entry.d.ts","sourceRoot":"","sources":["../../../src/utility/sub-entry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,IAAI,EACL,MAAM,4BAA4B,CAAC;AAEpC;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,WAEtE;AACD;;;;;;GAMG;AACH,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,QA2BhG"}
|