@o3r/schematics 10.0.0-prerelease.62 → 10.0.0-prerelease.64
Sign up to get free protection for your applications and to get access to all the features.
- package/{src/cli → cli}/environment.d.ts.map +1 -1
- package/{src/cli → cli}/environment.js +1 -1
- package/cli/package.json +3 -0
- package/package.json +10 -9
- package/schematics/ng-add/index.d.ts.map +1 -1
- package/schematics/ng-add/index.js +4 -6
- package/schematics/ng-add/schema.d.ts +1 -1
- package/schematics/ng-add/schema.d.ts.map +1 -1
- package/src/interfaces/index.d.ts +1 -0
- package/src/interfaces/index.d.ts.map +1 -1
- package/src/interfaces/index.js +1 -0
- package/src/interfaces/index.js.map +1 -1
- package/src/{rule-factories/interfaces.d.ts → interfaces/rule-factories.d.ts} +2 -2
- package/src/interfaces/rule-factories.d.ts.map +1 -0
- package/src/{rule-factories/interfaces.js → interfaces/rule-factories.js} +1 -1
- package/src/interfaces/rule-factories.js.map +1 -0
- package/src/modules/modules.display.rule.d.ts.map +1 -1
- package/src/modules/modules.display.rule.js +3 -4
- 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 +2 -2
- package/src/modules/modules.helpers.js.map +1 -1
- package/src/public_api.d.ts +6 -1
- package/src/public_api.d.ts.map +1 -1
- package/src/public_api.js +6 -1
- package/src/public_api.js.map +1 -1
- package/src/rule-factories/add-imports/index.js.map +1 -1
- package/src/rule-factories/dev-tools/devtools-registration.js +7 -7
- package/src/rule-factories/dev-tools/devtools-registration.js.map +1 -1
- package/src/rule-factories/eslint-fix/index.d.ts +1 -1
- package/src/rule-factories/eslint-fix/index.d.ts.map +1 -1
- package/src/rule-factories/eslint-fix/index.js +2 -2
- package/src/rule-factories/eslint-fix/index.js.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 +1 -1
- package/src/rule-factories/index.d.ts.map +1 -1
- package/src/rule-factories/index.js +1 -1
- package/src/rule-factories/index.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.map +1 -1
- package/src/rule-factories/update-imports/index.d.ts +0 -1
- package/src/rule-factories/update-imports/index.d.ts.map +1 -1
- package/src/rule-factories/update-imports/index.js +0 -1
- package/src/rule-factories/update-imports/index.js.map +1 -1
- package/src/rule-factories/update-imports/list-of-vars.d.ts +4 -5
- package/src/rule-factories/update-imports/list-of-vars.d.ts.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 +1 -1
- package/src/rule-factories/update-imports/update-imports-with-scope.js +3 -3
- 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 +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/rules/install.d.ts +1 -1
- package/src/rules/install.d.ts.map +1 -1
- package/src/tasks/package-manager/add-dev-dependency.js +3 -3
- package/src/tasks/package-manager/add-dev-dependency.js.map +1 -1
- package/src/tasks/package-manager/interfaces.d.ts +1 -1
- package/src/tasks/package-manager/interfaces.d.ts.map +1 -1
- package/src/tasks/package-manager/npm-install.js +3 -3
- package/src/tasks/package-manager/npm-install.js.map +1 -1
- package/src/utility/component.d.ts +1 -1
- package/src/utility/component.d.ts.map +1 -1
- package/src/utility/dependencies.d.ts.map +1 -1
- package/src/utility/environment.d.ts +1 -0
- package/src/utility/environment.d.ts.map +1 -1
- package/src/utility/file-info.d.ts +1 -2
- package/src/utility/file-info.d.ts.map +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/gitignore.d.ts +1 -1
- package/src/utility/gitignore.d.ts.map +1 -1
- package/src/utility/monorepo.d.ts +1 -1
- package/src/utility/monorepo.d.ts.map +1 -1
- package/src/utility/package-manager-runner.d.ts +1 -1
- package/src/utility/package-manager-runner.d.ts.map +1 -1
- package/src/utility/routes.d.ts +1 -1
- package/src/utility/routes.d.ts.map +1 -1
- package/src/utility/sub-entry.d.ts +1 -1
- package/src/utility/sub-entry.d.ts.map +1 -1
- package/src/utility/template-property.helper.js.map +1 -1
- package/src/cli/environment.js.map +0 -1
- package/src/index.d.ts +0 -7
- package/src/index.d.ts.map +0 -1
- package/src/index.js +0 -10
- package/src/index.js.map +0 -1
- package/src/rule-factories/interfaces.d.ts.map +0 -1
- package/src/rule-factories/interfaces.js.map +0 -1
- package/src/rule-factories/update-imports/v7-to-v8-map-object.d.ts +0 -8
- package/src/rule-factories/update-imports/v7-to-v8-map-object.d.ts.map +0 -1
- package/src/rule-factories/update-imports/v7-to-v8-map-object.js +0 -2049
- package/src/rule-factories/update-imports/v7-to-v8-map-object.js.map +0 -1
- /package/{src/cli → cli}/environment.d.ts +0 -0
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["
|
1
|
+
{"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../../cli/environment.ts"],"names":[],"mappings":""}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
const index_1 = require("../utility/index");
|
3
|
+
const index_1 = require("../src/utility/index");
|
4
4
|
console.info(`Environment information: ${(0, index_1.getEnvironmentInfoStringify)()}`);
|
5
5
|
//# sourceMappingURL=environment.js.map
|
package/cli/package.json
ADDED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@o3r/schematics",
|
3
|
-
"version": "10.0.0-prerelease.
|
3
|
+
"version": "10.0.0-prerelease.64",
|
4
4
|
"publishConfig": {
|
5
5
|
"access": "public"
|
6
6
|
},
|
@@ -15,20 +15,22 @@
|
|
15
15
|
"nx": "nx",
|
16
16
|
"ng": "yarn nx",
|
17
17
|
"build": "yarn nx build schematics",
|
18
|
-
"postbuild": "patch-package-json-main",
|
18
|
+
"postbuild": "yarn cpy 'package.json' dist && patch-package-json-main",
|
19
19
|
"prepare:publish": "prepare-publish ./dist",
|
20
20
|
"prepare:build:builders": "yarn cpy 'schematics/**/*.json' dist/schematics && yarn cpy 'collection.json' dist",
|
21
|
-
"build:
|
21
|
+
"build:source": "tsc -b tsconfig.build.json --pretty",
|
22
|
+
"build:builders": "tsc -b tsconfig.builders.json --pretty && yarn generate-cjs-manifest",
|
23
|
+
"build:cli": "tsc -b tsconfig.cli.json --pretty && yarn generate-cjs-manifest"
|
22
24
|
},
|
23
25
|
"bin": {
|
24
|
-
"environment": "
|
26
|
+
"o3r-environment": "./cli/environment.js"
|
25
27
|
},
|
26
28
|
"peerDependencies": {
|
27
29
|
"@angular-devkit/architect": "~0.1700.0",
|
28
30
|
"@angular-devkit/core": "~17.0.0",
|
29
31
|
"@angular-devkit/schematics": "~17.0.0",
|
30
32
|
"@angular/cli": "~17.0.0",
|
31
|
-
"@o3r/telemetry": "^10.0.0-prerelease.
|
33
|
+
"@o3r/telemetry": "^10.0.0-prerelease.64",
|
32
34
|
"@schematics/angular": "~17.0.0",
|
33
35
|
"eslint": "^8.42.0",
|
34
36
|
"rxjs": "^7.8.1",
|
@@ -74,9 +76,9 @@
|
|
74
76
|
"@nx/eslint-plugin": "~17.3.0",
|
75
77
|
"@nx/jest": "~17.3.0",
|
76
78
|
"@nx/js": "~17.3.0",
|
77
|
-
"@o3r/build-helpers": "^10.0.0-prerelease.
|
78
|
-
"@o3r/eslint-plugin": "^10.0.0-prerelease.
|
79
|
-
"@o3r/telemetry": "^10.0.0-prerelease.
|
79
|
+
"@o3r/build-helpers": "^10.0.0-prerelease.64",
|
80
|
+
"@o3r/eslint-plugin": "^10.0.0-prerelease.64",
|
81
|
+
"@o3r/telemetry": "^10.0.0-prerelease.64",
|
80
82
|
"@schematics/angular": "~17.0.3",
|
81
83
|
"@stylistic/eslint-plugin-ts": "^1.5.4",
|
82
84
|
"@types/jest": "~29.5.2",
|
@@ -107,7 +109,6 @@
|
|
107
109
|
"node": ">=18.0.0"
|
108
110
|
},
|
109
111
|
"schematics": "./collection.json",
|
110
|
-
"type": "commonjs",
|
111
112
|
"contributors": [
|
112
113
|
{
|
113
114
|
"name": "Yannick Adam",
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAA0B,MAAM,4BAA4B,CAAC;AAM/E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAA0B,MAAM,4BAA4B,CAAC;AAM/E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAmCtD;;GAEG;AACH,eAAO,MAAM,KAAK,0CAAiD,CAAC"}
|
@@ -4,7 +4,7 @@ exports.ngAdd = void 0;
|
|
4
4
|
const fs = require("node:fs");
|
5
5
|
const path = require("node:path");
|
6
6
|
const rxjs_1 = require("rxjs");
|
7
|
-
const
|
7
|
+
const public_api_1 = require("../../src/public_api");
|
8
8
|
/**
|
9
9
|
* Add Otter schematics to an Angular Project
|
10
10
|
* @param options schematics options
|
@@ -12,14 +12,12 @@ const schematics_1 = require("@o3r/schematics");
|
|
12
12
|
function ngAddFn(options) {
|
13
13
|
const schematicsDependencies = ['@angular-devkit/architect', '@angular-devkit/schematics', '@angular-devkit/core', '@schematics/angular', 'globby'];
|
14
14
|
return () => async (tree, context) => {
|
15
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
16
|
-
const { AddDevInstall, getWorkspaceConfig } = await Promise.resolve().then(() => require('@o3r/schematics'));
|
17
15
|
context.logger.info('Running ng add for schematics');
|
18
16
|
const packageJsonPath = path.resolve(__dirname, '..', '..', 'package.json');
|
19
17
|
const treePackageJson = tree.readJson('./package.json');
|
20
18
|
const packageJsonContent = JSON.parse(fs.readFileSync(packageJsonPath, { encoding: 'utf-8' }));
|
21
19
|
const getDependencyVersion = (dependency) => packageJsonContent?.dependencies?.[dependency] || packageJsonContent?.peerDependencies?.[dependency];
|
22
|
-
const workspaceProject = options.projectName ? getWorkspaceConfig(tree)?.projects[options.projectName] : undefined;
|
20
|
+
const workspaceProject = options.projectName ? (0, public_api_1.getWorkspaceConfig)(tree)?.projects[options.projectName] : undefined;
|
23
21
|
const workingDirectory = workspaceProject?.root || '.';
|
24
22
|
let packageName = '';
|
25
23
|
for (const dependency of schematicsDependencies) {
|
@@ -28,7 +26,7 @@ function ngAddFn(options) {
|
|
28
26
|
treePackageJson.devDependencies = { ...treePackageJson.devDependencies, [dependency]: version };
|
29
27
|
packageName = `${packageName} ${dependency}${version ? '@' + version : ''}`;
|
30
28
|
}
|
31
|
-
context.addTask(new AddDevInstall({
|
29
|
+
context.addTask(new public_api_1.AddDevInstall({
|
32
30
|
hideOutput: false,
|
33
31
|
packageName,
|
34
32
|
workingDirectory,
|
@@ -42,5 +40,5 @@ function ngAddFn(options) {
|
|
42
40
|
/**
|
43
41
|
* Add Otter schematics to an Angular Project
|
44
42
|
*/
|
45
|
-
exports.ngAdd = (0,
|
43
|
+
exports.ngAdd = (0, public_api_1.createSchematicWithMetricsIfInstalled)(ngAddFn);
|
46
44
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAElE,MAAM,WAAW,qBAAsB,SAAQ,qBAAqB;IAClE,mBAAmB;IACnB,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAClC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC"}
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC"}
|
package/src/interfaces/index.js
CHANGED
@@ -3,4 +3,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
4
4
|
tslib_1.__exportStar(require("./angular-workspace"), exports);
|
5
5
|
tslib_1.__exportStar(require("./schematic-option"), exports);
|
6
|
+
tslib_1.__exportStar(require("./rule-factories"), exports);
|
6
7
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/interfaces/index.ts"],"names":[],"mappings":";;;AAAA,8DAAoC;AACpC,6DAAmC"}
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/interfaces/index.ts"],"names":[],"mappings":";;;AAAA,8DAAoC;AACpC,6DAAmC;AACnC,2DAAiC"}
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { Rule } from '@angular-devkit/schematics';
|
1
|
+
import type { Rule } from '@angular-devkit/schematics';
|
2
2
|
/** Rule Factory prototype */
|
3
3
|
export type RuleFactory = (options: {
|
4
4
|
[k: string]: unknown;
|
5
5
|
}, rootPath: string) => Rule;
|
6
|
-
//# sourceMappingURL=
|
6
|
+
//# sourceMappingURL=rule-factories.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"rule-factories.d.ts","sourceRoot":"","sources":["../../../src/interfaces/rule-factories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAEvD,6BAA6B;AAC7B,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,EAAE;IAAC,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CAAC,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"rule-factories.js","sourceRoot":"","sources":["../../../src/interfaces/rule-factories.ts"],"names":[],"mappings":""}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"modules.display.rule.d.ts","sourceRoot":"","sources":["../../../src/modules/modules.display.rule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAMvD,0CAA0C;AAC1C,MAAM,WAAW,wBAAwB;IACvC;;;OAGG;IACH,cAAc,EAAE,MAAM,EAAE,GAAG,SAAS,MAAM,EAAE,CAAC;IAC7C;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB,6DAA6D;IAC7D,cAAc,EAAE,OAAO,CAAC;IACxB,oEAAoE;IACpE,uBAAuB,EAAE,OAAO,CAAC;IACjC,8DAA8D;IAC9D,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,GAAG,IAAI,
|
1
|
+
{"version":3,"file":"modules.display.rule.d.ts","sourceRoot":"","sources":["../../../src/modules/modules.display.rule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAMvD,0CAA0C;AAC1C,MAAM,WAAW,wBAAwB;IACvC;;;OAGG;IACH,cAAc,EAAE,MAAM,EAAE,GAAG,SAAS,MAAM,EAAE,CAAC;IAC7C;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB,6DAA6D;IAC7D,cAAc,EAAE,OAAO,CAAC;IACxB,oEAAoE;IACpE,uBAAuB,EAAE,OAAO,CAAC;IACjC,8DAA8D;IAC9D,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,GAAG,IAAI,CAgCvF"}
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.displayModuleListRule = void 0;
|
4
4
|
const node_os_1 = require("node:os");
|
5
5
|
const modules_constants_1 = require("./modules.constants");
|
6
|
-
const
|
6
|
+
const index_1 = require("../utility/index");
|
7
7
|
const modules_helpers_1 = require("./modules.helpers");
|
8
8
|
/**
|
9
9
|
* Display the list of available Otter modules
|
@@ -14,8 +14,7 @@ function displayModuleListRule(options) {
|
|
14
14
|
const keyword = options?.keyword || modules_constants_1.OTTER_MODULE_KEYWORD;
|
15
15
|
return async (tree, context) => {
|
16
16
|
const tagMap = { [modules_constants_1.OTTER_KEYWORD_CMS]: 'CMS enabler' };
|
17
|
-
|
18
|
-
const workspaceConfig = (0, utility_1.getWorkspaceConfig)(tree);
|
17
|
+
const workspaceConfig = (0, index_1.getWorkspaceConfig)(tree);
|
19
18
|
try {
|
20
19
|
const modules = await (0, modules_helpers_1.getAvailableModulesWithLatestPackage)(keyword, {
|
21
20
|
scopeWhitelist,
|
@@ -25,7 +24,7 @@ function displayModuleListRule(options) {
|
|
25
24
|
});
|
26
25
|
const message = modules
|
27
26
|
.filter((mod) => !options?.onlyCmsModules || mod.keywords?.includes(modules_constants_1.OTTER_KEYWORD_CMS))
|
28
|
-
.map((mod) => (0, modules_helpers_1.formatModuleDescription)(mod, (0,
|
27
|
+
.map((mod) => (0, modules_helpers_1.formatModuleDescription)(mod, (0, index_1.getPackageManagerExecutor)(workspaceConfig, options?.packageName), tagMap))
|
29
28
|
.filter((msg) => !!msg)
|
30
29
|
.join(node_os_1.EOL + node_os_1.EOL);
|
31
30
|
if (message) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"modules.display.rule.js","sourceRoot":"","sources":["../../../src/modules/modules.display.rule.ts"],"names":[],"mappings":";;;AACA,qCAA8B;AAC9B,2DAA2G;AAC3G,
|
1
|
+
{"version":3,"file":"modules.display.rule.js","sourceRoot":"","sources":["../../../src/modules/modules.display.rule.ts"],"names":[],"mappings":";;;AACA,qCAA8B;AAC9B,2DAA2G;AAC3G,4CAAiF;AACjF,uDAAkG;AAsBlG;;;GAGG;AACH,SAAgB,qBAAqB,CAAC,OAA2C;IAE/E,MAAM,cAAc,GAAG,OAAO,EAAE,cAAc,IAAI,iDAA6B,CAAC;IAChF,MAAM,OAAO,GAAG,OAAO,EAAE,OAAO,IAAI,wCAAoB,CAAC;IAEzD,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;QAC7B,MAAM,MAAM,GAA2B,EAAE,CAAC,qCAAiB,CAAC,EAAE,aAAa,EAAE,CAAC;QAE9E,MAAM,eAAe,GAAG,IAAA,0BAAkB,EAAC,IAAI,CAAC,CAAC;QACjD,IAAI;YACF,MAAM,OAAO,GAAG,MAAM,IAAA,sDAAoC,EAAC,OAAO,EAAE;gBAClE,cAAc;gBACd,gBAAgB,EAAE,CAAC,CAAC,OAAO,EAAE,uBAAuB;gBACpD,MAAM,EAAE,OAAO,CAAC,MAAM;gBACtB,eAAe;aAChB,CAAC,CAAC;YACH,MAAM,OAAO,GAAG,OAAO;iBACpB,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,cAAc,IAAI,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAC,qCAAiB,CAAC,CAAC;iBACtF,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAA,yCAAuB,EAAC,GAAG,EAAE,IAAA,iCAAyB,EAAC,eAAe,EAAE,OAAO,EAAE,WAAW,CAAC,EAAE,MAAM,CAAC,CAAC;iBACpH,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC;iBACtB,IAAI,CAAC,aAAG,GAAG,aAAG,CAAC,CAAC;YACnB,IAAI,OAAO,EAAE;gBACX,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,iGAAiG,CAAC,CAAC;gBACvH,qEAAqE;gBACrE,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,aAAG,GAAG,OAAO,CAAC,CAAC;aACpC;SACF;QAAC,OAAO,CAAM,EAAE;YACf,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,mCAAmC,EAAE,CAAC,CAAC,CAAC;YAC7D,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,mCAAmC,CAAC,CAAC;SAC3D;QACD,OAAO,GAAG,EAAE,CAAC,IAAI,CAAC;IACpB,CAAC,CAAC;AACJ,CAAC;AAhCD,sDAgCC"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { NpmRegistryPackage } from './modules.constants';
|
2
2
|
import type { logging } from '@angular-devkit/core';
|
3
|
-
import { PackageManagerOptions } from '../utility';
|
3
|
+
import { type PackageManagerOptions } from '../utility/index';
|
4
4
|
/**
|
5
5
|
* Determine if the given keyword is an Otter tag
|
6
6
|
* @param keyword Keyword to identify
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"modules.helpers.d.ts","sourceRoot":"","sources":["../../../src/modules/modules.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAuH,MAAM,qBAAqB,CAAC;AAG9K,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAUpD,OAAO,EAAqB,qBAAqB,EAAE,MAAM,
|
1
|
+
{"version":3,"file":"modules.helpers.d.ts","sourceRoot":"","sources":["../../../src/modules/modules.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAuH,MAAM,qBAAqB,CAAC;AAG9K,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAUpD,OAAO,EAAqB,KAAK,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAkDjF;;;;GAIG;AACH,eAAO,MAAM,UAAU,0CAA2C,GAAG,+EAGpE,CAAC;AAEF,+CAA+C;AAC/C,MAAM,WAAW,sBAAuB,SAAQ,qBAAqB;IACnE;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;GAKG;AACH,wBAAsB,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,GAAG,SAAS,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,sBAAsB,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAsBxK;AAED,gEAAgE;AAChE,MAAM,WAAW,uCAAwC,SAAQ,sBAAsB;IACrF;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,MAAM,EAAE,CAAC;CAC/C;AAED;;;;;GAKG;AACH,wBAAsB,oCAAoC,CAAC,OAAO,oBAA+B,EAAE,OAAO,EAAE,uCAAuC,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAoBlL;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CACnC,UAAU,EAAE,kBAAkB,EAC9B,MAAM,SAAQ,EACd,WAAW,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,EACxC,MAAM,CAAC,EAAE,OAAO,CAAC,SAAS,UA8B7B"}
|
@@ -11,7 +11,7 @@ const path = require("node:path");
|
|
11
11
|
const node_util_1 = require("node:util");
|
12
12
|
const node_child_process_1 = require("node:child_process");
|
13
13
|
const chalk = require("chalk");
|
14
|
-
const
|
14
|
+
const index_1 = require("../utility/index");
|
15
15
|
const DEFAULT_NPM_REGISTRY = 'registry.npmjs.org';
|
16
16
|
async function promiseGetRequest(url) {
|
17
17
|
const res = await new Promise((resolve, reject) => (0, node_https_1.get)(url, resolve)
|
@@ -31,7 +31,7 @@ async function promiseGetRequest(url) {
|
|
31
31
|
* @param logger
|
32
32
|
*/
|
33
33
|
async function npmSearchExec(search, packageManagerOptions, logger) {
|
34
|
-
const manager = (0,
|
34
|
+
const manager = (0, index_1.getPackageManager)(packageManagerOptions);
|
35
35
|
switch (manager) {
|
36
36
|
case 'npm': {
|
37
37
|
const remoteModulesPromise = (0, node_util_1.promisify)(node_child_process_1.execFile)('npm', ['search', search, '--json']);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"modules.helpers.js","sourceRoot":"","sources":["../../../src/modules/modules.helpers.ts"],"names":[],"mappings":";;;AAAA,2DAA8K;AAI9K,gEAAoE;AACpE,mCAAmC;AACnC,2CAAiC;AACjC,qCAA8B;AAC9B,8BAA8B;AAC9B,kCAAkC;AAClC,yCAAsC;AACtC,2DAA8C;AAC9C,+BAA+B;AAC/B,
|
1
|
+
{"version":3,"file":"modules.helpers.js","sourceRoot":"","sources":["../../../src/modules/modules.helpers.ts"],"names":[],"mappings":";;;AAAA,2DAA8K;AAI9K,gEAAoE;AACpE,mCAAmC;AACnC,2CAAiC;AACjC,qCAA8B;AAC9B,8BAA8B;AAC9B,kCAAkC;AAClC,yCAAsC;AACtC,2DAA8C;AAC9C,+BAA+B;AAC/B,4CAAiF;AAEjF,MAAM,oBAAoB,GAAG,oBAAoB,CAAC;AAElD,KAAK,UAAU,iBAAiB,CAAuB,GAAW;IAChE,MAAM,GAAG,GAAG,MAAM,IAAI,OAAO,CAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,CAAC,IAAA,gBAAG,EAAC,GAAG,EAAE,OAAO,CAAC;SA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AAK,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,eAAe;QAC/E,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,IAAI,kBAAkB,CAAC;QAC1D,GAAG,CAAC,UAAU,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,UAAU,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAC7F,GAAG,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;KAC3F,CAAC;IACF,OAAO,KAAK,CAAC,IAAI,CAAC,aAAG,CAAC,CAAC;AACzB,CAAC;AAlCD,0DAkCC"}
|
package/src/public_api.d.ts
CHANGED
@@ -1,2 +1,7 @@
|
|
1
|
-
export * from './index';
|
1
|
+
export * from './interfaces/index';
|
2
|
+
export * from './rule-factories/index';
|
3
|
+
export * from './rules/index';
|
4
|
+
export * from './tasks/index';
|
5
|
+
export * from './utility/index';
|
6
|
+
export * from './modules/index';
|
2
7
|
//# sourceMappingURL=public_api.d.ts.map
|
package/src/public_api.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"public_api.d.ts","sourceRoot":"","sources":["../../src/public_api.ts"],"names":[],"mappings":"AAAA,cAAc,
|
1
|
+
{"version":3,"file":"public_api.d.ts","sourceRoot":"","sources":["../../src/public_api.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC"}
|
package/src/public_api.js
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const tslib_1 = require("tslib");
|
4
|
-
tslib_1.__exportStar(require("./index"), exports);
|
4
|
+
tslib_1.__exportStar(require("./interfaces/index"), exports);
|
5
|
+
tslib_1.__exportStar(require("./rule-factories/index"), exports);
|
6
|
+
tslib_1.__exportStar(require("./rules/index"), exports);
|
7
|
+
tslib_1.__exportStar(require("./tasks/index"), exports);
|
8
|
+
tslib_1.__exportStar(require("./utility/index"), exports);
|
9
|
+
tslib_1.__exportStar(require("./modules/index"), exports);
|
5
10
|
//# sourceMappingURL=public_api.js.map
|
package/src/public_api.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"public_api.js","sourceRoot":"","sources":["../../src/public_api.ts"],"names":[],"mappings":";;;AAAA,
|
1
|
+
{"version":3,"file":"public_api.js","sourceRoot":"","sources":["../../src/public_api.ts"],"names":[],"mappings":";;;AAAA,6DAAmC;AACnC,iEAAuC;AACvC,wDAA8B;AAC9B,wDAA8B;AAC9B,0DAAgC;AAChC,0DAAgC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/rule-factories/add-imports/index.ts"],"names":[],"mappings":";;;AACA,qEAAqE;AACrE,+
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/rule-factories/add-imports/index.ts"],"names":[],"mappings":";;;AACA,qEAAqE;AACrE,+DAAwF;AACxF,iCAAiC;AAEjC;;;;GAIG;AACI,MAAM,cAAc,GAAG,CAC5B,QAAgB,EAChB,OAGG,EACG,EAAE,CAAC,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE;IAC3B,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE;QAC1B,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,qCAAqC,QAAQ,kBAAkB,CAAC,CAAC;QACrF,OAAO;KACR;IACD,MAAM,UAAU,GAAG,EAAE,CAAC,gBAAgB,CACpC,QAAQ,EACR,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,EACvB,EAAE,CAAC,YAAY,CAAC,MAAM,EACtB,IAAI,CACL,CAAC;IACF,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;IAC5C,MAAM,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,GAAa,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CACjF,WAAW,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,IAAA,wBAAY,EAAC,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,CAAC,CAAC,CACtF,EAAE,EAAE,CAAC,CAAC;IACP,IAAA,8BAAqB,EAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IACzC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;IAC5B,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAxBW,QAAA,cAAc,kBAwBzB"}
|
@@ -4,11 +4,11 @@ exports.registerDevtoolsToApplication = exports.injectServiceInMain = void 0;
|
|
4
4
|
const schematics_1 = require("@angular-devkit/schematics");
|
5
5
|
const ts = require("typescript");
|
6
6
|
const ast_utils_1 = require("@schematics/angular/utility/ast-utils");
|
7
|
+
const index_1 = require("../../utility/index");
|
7
8
|
const utility_1 = require("../../utility");
|
8
|
-
const utility_2 = require("../../utility");
|
9
9
|
const change_1 = require("@schematics/angular/utility/change");
|
10
10
|
const registerModule = (options) => (tree, context) => {
|
11
|
-
const moduleFilePath = (0,
|
11
|
+
const moduleFilePath = (0, index_1.getAppModuleFilePath)(tree, context, options.projectName);
|
12
12
|
if (!moduleFilePath) {
|
13
13
|
return tree;
|
14
14
|
}
|
@@ -18,8 +18,8 @@ const registerModule = (options) => (tree, context) => {
|
|
18
18
|
return tree;
|
19
19
|
}
|
20
20
|
let recorder = tree.beginUpdate(moduleFilePath);
|
21
|
-
const { moduleIndex } = (0,
|
22
|
-
const addImportToModuleFile = (name, file, moduleFunction) => recorder = (0,
|
21
|
+
const { moduleIndex } = (0, index_1.getModuleIndex)(sourceFile, sourceFileContent);
|
22
|
+
const addImportToModuleFile = (name, file, moduleFunction) => recorder = (0, utility_1.addImportToModuleFile)(name, file, sourceFile, sourceFileContent, context, recorder, moduleFilePath, moduleIndex, moduleFunction);
|
23
23
|
addImportToModuleFile(options.moduleName, options.packageName, '.instrument({isActivatedOnBootstrap: true})');
|
24
24
|
tree.commitUpdate(recorder);
|
25
25
|
return tree;
|
@@ -32,7 +32,7 @@ const injectServiceInMain = (options) => (tree, context) => {
|
|
32
32
|
if (!options.serviceName) {
|
33
33
|
return tree;
|
34
34
|
}
|
35
|
-
const mainFilePath = (0,
|
35
|
+
const mainFilePath = (0, index_1.getMainFilePath)(tree, context, options.projectName);
|
36
36
|
if (!mainFilePath || !tree.exists(mainFilePath)) {
|
37
37
|
return tree;
|
38
38
|
}
|
@@ -69,13 +69,13 @@ exports.injectServiceInMain = injectServiceInMain;
|
|
69
69
|
* @param options
|
70
70
|
*/
|
71
71
|
const registerDevtoolsToApplication = (options) => (tree, context) => {
|
72
|
-
const workspace = (0,
|
72
|
+
const workspace = (0, index_1.getWorkspaceConfig)(tree);
|
73
73
|
const project = options.projectName ? workspace?.projects[options.projectName] : undefined;
|
74
74
|
if (!workspace || !project || project.projectType !== 'application') {
|
75
75
|
context.logger.warn(`Failed to determine the application to update, the devtool modules ${options.moduleName}.`);
|
76
76
|
return tree;
|
77
77
|
}
|
78
|
-
const schematicConfig = (0,
|
78
|
+
const schematicConfig = (0, index_1.getDefaultOptionsForSchematic)(workspace, options.packageName, 'ng-add', options);
|
79
79
|
if (!schematicConfig?.registerDevtool) {
|
80
80
|
return tree;
|
81
81
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"devtools-registration.js","sourceRoot":"","sources":["../../../../src/rule-factories/dev-tools/devtools-registration.ts"],"names":[],"mappings":";;;AAAA,2DAAyD;AACzD,iCAAiC;AACjC,qEAAiF;AACjF
|
1
|
+
{"version":3,"file":"devtools-registration.js","sourceRoot":"","sources":["../../../../src/rule-factories/dev-tools/devtools-registration.ts"],"names":[],"mappings":";;;AAAA,2DAAyD;AACzD,iCAAiC;AACjC,qEAAiF;AACjF,+CAA+I;AAE/I,2CAAkF;AAClF,+DAAyF;AAczF,MAAM,cAAc,GAAG,CAAC,OAA+B,EAAQ,EAAE,CAAC,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE;IAClF,MAAM,cAAc,GAAG,IAAA,4BAAoB,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;IAChF,IAAI,CAAC,cAAc,EAAE;QACnB,OAAO,IAAI,CAAC;KACb;IAED,MAAM,iBAAiB,GAAG,IAAI,CAAC,IAAI,CAAC,cAAc,CAAE,CAAC,QAAQ,EAAE,CAAC;IAChE,MAAM,UAAU,GAAG,EAAE,CAAC,gBAAgB,CACpC,cAAc,EACd,iBAAiB,EACjB,EAAE,CAAC,YAAY,CAAC,MAAM,EACtB,IAAI,CACL,CAAC;IAEF,IAAI,IAAA,sBAAU,EAAC,UAAU,EAAE,OAAO,CAAC,UAAU,EAAE,OAAO,CAAC,WAAW,CAAC,EAAE;QACnE,OAAO,IAAI,CAAC;KACb;IAED,IAAI,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;IAChD,MAAM,EAAE,WAAW,EAAE,GAAG,IAAA,sBAAc,EAAC,UAAU,EAAE,iBAAiB,CAAC,CAAC;IAEtE,MAAM,qBAAqB,GAAG,CAAC,IAAY,EAAE,IAAY,EAAE,cAAuB,EAAE,EAAE,CACpF,QAAQ,GAAG,IAAA,+BAAwB,EAAC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Q,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAE3F,IAAI,CAAC,SAAS,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,WAAW,KAAK,aAAa,EAAE;QACnE,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,sEAAsE,OAAO,CAAC,UAAU,GAAG,CAAC,CAAC;QACjH,OAAO,IAAI,CAAC;KACb;IAED,MAAM,eAAe,GAAG,IAAA,qCAA6B,EAAkC,SAAS,EAAE,OAAO,CAAC,WAAW,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;IAE1I,IAAI,CAAC,eAAe,EAAE,eAAe,EAAE;QACrC,OAAO,IAAI,CAAC;KACb;IAED,OAAO,IAAA,kBAAK,EAAC;QACX,cAAc,CAAC,OAAO,CAAC;QACvB,IAAA,2BAAmB,EAAC,OAAO,CAAC;QAC5B,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CACzB,uBAAuB,OAAO,CAAC,UAAU,mDAAmD,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,qCAAqC,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,GAAG,CACtL;KACF,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AACpB,CAAC,CAAC;AAtBW,QAAA,6BAA6B,iCAsBxC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/rule-factories/eslint-fix/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,IAAI,EAA0B,MAAM,4BAA4B,CAAC;AAE1F,OAAO,EAAiB,aAAa,EAAE,MAAM,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/rule-factories/eslint-fix/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,IAAI,EAA0B,MAAM,4BAA4B,CAAC;AAE1F,OAAO,EAAiB,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEjE;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,UAAU,SAAM,EAAE,SAAS,GAAE,MAAM,EAAW,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,IAAI,CAoE5G"}
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.applyEsLintFix = void 0;
|
4
4
|
const schematics_1 = require("@angular-devkit/schematics");
|
5
5
|
const node_path_1 = require("node:path");
|
6
|
-
const
|
6
|
+
const index_1 = require("../../tasks/index");
|
7
7
|
/**
|
8
8
|
* Apply EsLint fix
|
9
9
|
* @param prootPath Root path
|
@@ -55,7 +55,7 @@ You can consider to run later the following command to add otter linter rules: n
|
|
55
55
|
return acc;
|
56
56
|
}, new Set());
|
57
57
|
if (files.size) {
|
58
|
-
context.addTask(new
|
58
|
+
context.addTask(new index_1.EslintFixTask(Array.from(files), undefined, eslintFile, linterOptions));
|
59
59
|
}
|
60
60
|
return tree;
|
61
61
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/rule-factories/eslint-fix/index.ts"],"names":[],"mappings":";;;AAAA,2DAA0F;AAC1F,yCAA0C;AAC1C,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/rule-factories/eslint-fix/index.ts"],"names":[],"mappings":";;;AAAA,2DAA0F;AAC1F,yCAA0C;AAC1C,6CAAiE;AAEjE;;;;;;GAMG;AACH,SAAgB,cAAc,CAAC,UAAU,GAAG,GAAG,EAAE,YAAsB,CAAC,IAAI,CAAC,EAAE,OAAuB;IACpG,IAAI;QACF,OAAO,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC;KACxC;IAAC,MAAM;QACN,OAAO,IAAA,iBAAI,GAAE,CAAC;KACf;IAED,MAAM,aAAa,GAAkB;QACnC,eAAe,EAAE,IAAI;QACrB,YAAY,EAAE,IAAI;QAClB,GAA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AC,MAAM,CAAC,IAAI,CAAC;+GACqF,CAAC,CAAC;SAC5G;QAED,MAAM,KAAK,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC,GAAgB,EAAE,QAAQ,EAAE,EAAE;YAChE,IAAI,SAAS,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,GAAG,EAAE,CAAC,CAAC,IAAI,GAAG,IAAI,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,EAAE;gBAC9G,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;aACnB;YAED,OAAO,GAAG,CAAC;QACb,CAAC,EAAE,IAAI,GAAG,EAAU,CAAC,CAAC;QAEtB,IAAI,KAAK,CAAC,IAAI,EAAE;YACd,OAAO,CAAC,OAAO,CACb,IAAI,qBAAa,CACf,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EACjB,SAAS,EACT,UAAU,EACV,aAAa,CACd,CACF,CAAC;SACH;QAED,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;AACJ,CAAC;AApED,wCAoEC"}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.getTestFramework = void 0;
|
4
|
-
const
|
4
|
+
const index_1 = require("../../utility/index");
|
5
5
|
const testPackageMaps = {
|
6
6
|
'jest': ['jest'],
|
7
7
|
'jasmine': ['jasmine-core']
|
@@ -13,7 +13,7 @@ const testPackageMaps = {
|
|
13
13
|
*/
|
14
14
|
function getTestFramework(workspaceOptions, context) {
|
15
15
|
if (workspaceOptions) {
|
16
|
-
const testFramework = (0,
|
16
|
+
const testFramework = (0, index_1.getSchematicOptions)(workspaceOptions, context)?.testFramework;
|
17
17
|
if (testFramework) {
|
18
18
|
return testFramework;
|
19
19
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/rule-factories/get-test-frameworks/index.ts"],"names":[],"mappings":";;;AAEA
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/rule-factories/get-test-frameworks/index.ts"],"names":[],"mappings":";;;AAEA,+CAA0D;AAG1D,MAAM,eAAe,GAA8C;IACjE,MAAM,EAAE,CAAC,MAAM,CAAC;IAChB,SAAS,EAAE,CAAC,cAAc,CAAC;CAC5B,CAAC;AAEF;;;;GAIG;AACH,SAAgB,gBAAgB,CAAC,gBAAwC,EAAE,OAAyB;IAClG,IAAI,gBAAgB,EAAE;QACpB,MAAM,aAAa,GAAG,IAAA,2BAAmB,EAAC,gBAAgB,EAAE,OAAO,CAAC,EAAE,aAAa,CAAC;QACpF,IAAI,aAAa,EAAE;YACjB,OAAO,aAAa,CAAC;SACtB;KACF;IACD,OAAO,MAAM,CAAC,OAAO,CAAC,eAAe,CAAC;SACnC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,EAAE;QAClB,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE;YACvB,IAAI;gBACF,OAAO,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,GAAG,eAAe,CAAC,CAAC;aACjD;YAAC,MAAM;gBACN,OAAO,KAAK,CAAC;aACd;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,EAAE,CAAC,CAAC,CAA4B,CAAC;AACvC,CAAC;AAjBD,4CAiBC"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
export * from './add-imports/index';
|
2
2
|
export * from './eslint-fix/index';
|
3
|
-
export * from '
|
3
|
+
export * from '../interfaces/rule-factories';
|
4
4
|
export * from './get-test-frameworks/index';
|
5
5
|
export * from './check-packages-peers/index';
|
6
6
|
export * from './ng-add/index';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/rule-factories/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/rule-factories/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC"}
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
4
4
|
tslib_1.__exportStar(require("./add-imports/index"), exports);
|
5
5
|
tslib_1.__exportStar(require("./eslint-fix/index"), exports);
|
6
|
-
tslib_1.__exportStar(require("
|
6
|
+
tslib_1.__exportStar(require("../interfaces/rule-factories"), exports);
|
7
7
|
tslib_1.__exportStar(require("./get-test-frameworks/index"), exports);
|
8
8
|
tslib_1.__exportStar(require("./check-packages-peers/index"), exports);
|
9
9
|
tslib_1.__exportStar(require("./ng-add/index"), exports);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/rule-factories/index.ts"],"names":[],"mappings":";;;AAAA,8DAAoC;AACpC,6DAAmC;AACnC,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/rule-factories/index.ts"],"names":[],"mappings":";;;AAAA,8DAAoC;AACpC,6DAAmC;AACnC,uEAA6C;AAC7C,sEAA4C;AAC5C,uEAA6C;AAC7C,yDAA+B;AAC/B,kEAAwC;AACxC,iEAAuC;AACvC,oEAA0C;AAC1C,4DAAkC"}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { Rule } from '@angular-devkit/schematics';
|
2
2
|
import { NodeDependencyType } from '@schematics/angular/utility/dependencies';
|
3
3
|
import type { PackageJson } from 'type-fest';
|
4
|
-
import { SchematicOptionObject } from '../../interfaces';
|
4
|
+
import type { SchematicOptionObject } from '../../interfaces/index';
|
5
5
|
import type { NgAddPackageOptions } from '../../tasks/index';
|
6
6
|
/**
|
7
7
|
* Install via `ng add` a list of npm packages.
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/rule-factories/ng-add/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkC,IAAI,EAA+B,MAAM,4BAA4B,CAAC;
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/rule-factories/ng-add/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkC,IAAI,EAA+B,MAAM,4BAA4B,CAAC;AAE/G,OAAO,EAAuB,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAInG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAG7D;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,mBAAmB,EAAE,SAAS,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,CAAA;CAAE,EAAE,eAAe,SAAkB,GAAG,IAAI,CA0HzL;AAED;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,eAAe,EAAE,MAAM,EAAE,IAAI,gCAAiD,EAC5I,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,CAAC,EAAE,MAAM,QAgBzD;AAED;;;;GAIG;AACH,wBAAgB,mCAAmC,CAAC,WAAW,EAAE,WAAW,EAAE,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAY5G;AAED;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAAC,uBAAuB,EAAE,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,EAAE,aAAa,UAAQ,EAAE,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAgClK"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/rule-factories/ng-add/index.ts"],"names":[],"mappings":";;;AAAA,2DAA+G;AAC/G,4DAA0E;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/rule-factories/ng-add/index.ts"],"names":[],"mappings":";;;AAAA,2DAA+G;AAC/G,4DAA0E;AAC1E,2EAAmG;AACnG,qCAAiE;AACjE,kCAAkC;AAClC,+BAAqC;AAIrC,+CAAwL;AAExL;;;;;GAKG;AACH,SAAgB,aAAa,CAAC,QAAkB,EAAE,OAA8F,EAAE,eAAe,GAAG,eAAe;IACjL,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE;QACpB,OAAO,iBAAI,CAAC;KACb;IACD,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC;IAClD,wHAAwH;IACxH,MAAM,kBAAkB,GAAG,CAAC,OAAO,EAAE,gBAAgB,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,GAAG,CAAC;IACnI,MAAM,QAAQ,GAAG,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,GAAG,CAA+B,CAAC,WAAW,EAAE,KAAK,EAAE,EAAE,CACpG,CAAC,WAAW,EAAE,OAAO,OAAO,EAAE,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,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,cAAc,gBAAgB,CAAC;AAC/B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/rule-factories/update-imports/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC"}
|
@@ -4,5 +4,4 @@ const tslib_1 = require("tslib");
|
|
4
4
|
tslib_1.__exportStar(require("./list-of-vars"), exports);
|
5
5
|
tslib_1.__exportStar(require("./update-imports-with-scope"), exports);
|
6
6
|
tslib_1.__exportStar(require("./update-ts-imports"), exports);
|
7
|
-
tslib_1.__exportStar(require("./v7-to-v8-map-object"), exports);
|
8
7
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/rule-factories/update-imports/index.ts"],"names":[],"mappings":";;;AAAA,yDAA+B;AAC/B,sEAA4C;AAC5C,8DAAoC
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/rule-factories/update-imports/index.ts"],"names":[],"mappings":";;;AAAA,yDAA+B;AAC/B,sEAA4C;AAC5C,8DAAoC"}
|