@abp/ng.schematics 6.0.0-rc.4 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/collection.json +5 -0
- package/commands/api/index.js +38 -28
- package/commands/api/index.js.map +1 -1
- package/commands/api/schema.json +9 -0
- package/commands/create-lib/files-package/__libraryName@kebab__/.eslintrc.json.template +44 -0
- package/commands/create-lib/files-package/__libraryName@kebab__/config/ng-package.json.template +7 -0
- package/commands/create-lib/files-package/__libraryName@kebab__/config/src/__libraryName@kebab__-config.module.ts.template +12 -0
- package/commands/create-lib/files-package/__libraryName@kebab__/config/src/enums/index.ts.template +1 -0
- package/commands/create-lib/files-package/__libraryName@kebab__/config/src/enums/route-names.ts.template +3 -0
- package/commands/create-lib/files-package/__libraryName@kebab__/config/src/providers/index.ts.template +1 -0
- package/commands/create-lib/files-package/__libraryName@kebab__/config/src/providers/route.provider.ts.template +26 -0
- package/commands/create-lib/files-package/__libraryName@kebab__/config/src/public-api.ts.template +3 -0
- package/commands/create-lib/files-package/__libraryName@kebab__/karma.conf.js.template +44 -0
- package/commands/create-lib/files-package/__libraryName@kebab__/ng-package.json.template +7 -0
- package/commands/create-lib/files-package/__libraryName@kebab__/package.json.template +11 -0
- package/commands/create-lib/files-package/__libraryName@kebab__/src/lib/__libraryName@kebab__-routing.module.ts.template +18 -0
- package/commands/create-lib/files-package/__libraryName@kebab__/src/lib/__libraryName@kebab__.module.ts.template +22 -0
- package/commands/create-lib/files-package/__libraryName@kebab__/src/public-api.ts.template +4 -0
- package/commands/create-lib/files-package/__libraryName@kebab__/src/test.ts.template +26 -0
- package/commands/create-lib/files-package/__libraryName@kebab__/tsconfig.lib.json.template +20 -0
- package/commands/create-lib/files-package/__libraryName@kebab__/tsconfig.lib.prod.json.template +10 -0
- package/commands/create-lib/files-package/__libraryName@kebab__/tsconfig.spec.json.template +17 -0
- package/commands/create-lib/files-secondary-entrypoint/__libraryName@kebab__/ng-package.json.template +7 -0
- package/commands/create-lib/files-secondary-entrypoint/__libraryName@kebab__/src/lib/__target@kebab__-__libraryName@kebab__.module.ts.template +11 -0
- package/commands/create-lib/files-secondary-entrypoint/__libraryName@kebab__/src/lib/index.ts.template +1 -0
- package/commands/create-lib/files-secondary-entrypoint/__libraryName@kebab__/src/public-api.ts.template +1 -0
- package/commands/create-lib/index.d.ts +6 -0
- package/commands/create-lib/index.js +124 -0
- package/commands/create-lib/index.js.map +1 -0
- package/commands/create-lib/models/generate-lib-schema.d.ts +13 -0
- package/commands/create-lib/models/generate-lib-schema.js +3 -0
- package/commands/create-lib/models/generate-lib-schema.js.map +1 -0
- package/commands/create-lib/models/index.d.ts +1 -0
- package/commands/create-lib/models/index.js +18 -0
- package/commands/create-lib/models/index.js.map +1 -0
- package/commands/create-lib/schema.json +36 -0
- package/commands/proxy-add/index.js +15 -15
- package/commands/proxy-add/index.js.map +1 -1
- package/commands/proxy-add/schema.json +9 -0
- package/commands/proxy-index/index.d.ts +3 -2
- package/commands/proxy-index/index.js +5 -5
- package/commands/proxy-index/index.js.map +1 -1
- package/commands/proxy-index/schema.json +9 -0
- package/commands/proxy-refresh/index.d.ts +2 -2
- package/commands/proxy-refresh/index.js +13 -13
- package/commands/proxy-refresh/index.js.map +1 -1
- package/commands/proxy-refresh/schema.json +10 -0
- package/commands/proxy-remove/index.d.ts +2 -2
- package/commands/proxy-remove/index.js +13 -13
- package/commands/proxy-remove/index.js.map +1 -1
- package/commands/proxy-remove/schema.json +9 -0
- package/constants/index.js +6 -2
- package/constants/index.js.map +1 -1
- package/constants/symbols.d.ts +1 -0
- package/constants/symbols.js +5 -0
- package/constants/symbols.js.map +1 -0
- package/enums/exception.d.ts +2 -1
- package/enums/index.js +6 -2
- package/enums/index.js.map +1 -1
- package/models/generate-proxy-schema.d.ts +4 -0
- package/models/index.js +6 -2
- package/models/index.js.map +1 -1
- package/models/method.js +3 -3
- package/models/method.js.map +1 -1
- package/package.json +6 -5
- package/test-setup.js +2 -2
- package/test-setup.js.map +1 -1
- package/utils/angular/ast-utils.d.ts +1 -14
- package/utils/angular/ast-utils.js +45 -117
- package/utils/angular/ast-utils.js.map +1 -1
- package/utils/angular/change.d.ts +6 -4
- package/utils/angular/change.js +29 -4
- package/utils/angular/change.js.map +1 -1
- package/utils/angular/dependencies.d.ts +1 -1
- package/utils/angular/dependencies.js +7 -9
- package/utils/angular/dependencies.js.map +1 -1
- package/utils/angular/dependency.d.ts +96 -0
- package/utils/angular/dependency.js +123 -0
- package/utils/angular/dependency.js.map +1 -0
- package/utils/angular/find-module.d.ts +2 -4
- package/utils/angular/find-module.js +22 -22
- package/utils/angular/find-module.js.map +1 -1
- package/utils/angular/generate-from-files.d.ts +17 -0
- package/utils/angular/generate-from-files.js +37 -0
- package/utils/angular/generate-from-files.js.map +1 -0
- package/utils/angular/index.d.ts +1 -5
- package/utils/angular/index.js +7 -7
- package/utils/angular/index.js.map +1 -1
- package/utils/angular/json-file.d.ts +4 -4
- package/utils/angular/json-file.js +24 -17
- package/utils/angular/json-file.js.map +1 -1
- package/utils/angular/ng-ast-utils.d.ts +7 -0
- package/utils/angular/ng-ast-utils.js +13 -21
- package/utils/angular/ng-ast-utils.js.map +1 -1
- package/utils/angular/parse-name.d.ts +1 -1
- package/utils/angular/parse-name.js +6 -6
- package/utils/angular/parse-name.js.map +1 -1
- package/utils/angular/paths.d.ts +1 -1
- package/utils/angular/paths.js +2 -2
- package/utils/angular/paths.js.map +1 -1
- package/utils/angular/project-targets.d.ts +1 -1
- package/utils/angular/project-targets.js +1 -1
- package/utils/angular/validation.d.ts +8 -2
- package/utils/angular/validation.js +10 -55
- package/utils/angular/validation.js.map +1 -1
- package/utils/angular/workspace-models.d.ts +16 -15
- package/utils/angular/workspace-models.js +9 -4
- package/utils/angular/workspace-models.js.map +1 -1
- package/utils/angular/workspace.d.ts +40 -5
- package/utils/angular/workspace.js +96 -38
- package/utils/angular/workspace.js.map +1 -1
- package/utils/angular-schematic/generate-lib.d.ts +3 -0
- package/utils/angular-schematic/generate-lib.js +54 -0
- package/utils/angular-schematic/generate-lib.js.map +1 -0
- package/utils/angular-schematic/index.d.ts +1 -0
- package/utils/angular-schematic/index.js +18 -0
- package/utils/angular-schematic/index.js.map +1 -0
- package/utils/api.js +1 -1
- package/utils/api.js.map +1 -1
- package/utils/ast.js +3 -3
- package/utils/ast.js.map +1 -1
- package/utils/barrel.js +1 -1
- package/utils/barrel.js.map +1 -1
- package/utils/common.js +1 -1
- package/utils/common.js.map +1 -1
- package/utils/enum.js +2 -2
- package/utils/enum.js.map +1 -1
- package/utils/generics.js +1 -2
- package/utils/generics.js.map +1 -1
- package/utils/index.js +6 -2
- package/utils/index.js.map +1 -1
- package/utils/methods.js +2 -1
- package/utils/methods.js.map +1 -1
- package/utils/model.js +17 -19
- package/utils/model.js.map +1 -1
- package/utils/namespace.js +1 -1
- package/utils/namespace.js.map +1 -1
- package/utils/path.js +1 -1
- package/utils/path.js.map +1 -1
- package/utils/rule.js +3 -3
- package/utils/rule.js.map +1 -1
- package/utils/service.js +15 -11
- package/utils/service.js.map +1 -1
- package/utils/source.js +19 -19
- package/utils/source.js.map +1 -1
- package/utils/text.js +18 -9
- package/utils/text.js.map +1 -1
- package/utils/type.js +6 -6
- package/utils/type.js.map +1 -1
- package/utils/workspace.d.ts +9 -1
- package/utils/workspace.js +51 -9
- package/utils/workspace.js.map +1 -1
- package/utils/angular/config.d.ts +0 -455
- package/utils/angular/config.js +0 -71
- package/utils/angular/config.js.map +0 -1
- package/utils/angular/json-utils.d.ts +0 -14
- package/utils/angular/json-utils.js +0 -159
- package/utils/angular/json-utils.js.map +0 -1
- package/utils/angular/latest-versions.d.ts +0 -18
- package/utils/angular/latest-versions.js +0 -27
- package/utils/angular/latest-versions.js.map +0 -1
- package/utils/angular/lint-fix.d.ts +0 -9
- package/utils/angular/lint-fix.js +0 -42
- package/utils/angular/lint-fix.js.map +0 -1
- package/utils/angular/tsconfig.d.ts +0 -16
- package/utils/angular/tsconfig.js +0 -63
- package/utils/angular/tsconfig.js.map +0 -1
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright Google LLC All Rights Reserved.
|
|
5
|
+
*
|
|
6
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
+
* found in the LICENSE file at https://angular.io/license
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.addDependency = exports.ExistingBehavior = exports.InstallBehavior = exports.DependencyType = void 0;
|
|
11
|
+
const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
12
|
+
const path = require("path");
|
|
13
|
+
const installTasks = new WeakMap();
|
|
14
|
+
/**
|
|
15
|
+
* An enum used to specify the type of a dependency found within a package manifest
|
|
16
|
+
* file (`package.json`).
|
|
17
|
+
*/
|
|
18
|
+
var DependencyType;
|
|
19
|
+
(function (DependencyType) {
|
|
20
|
+
DependencyType["Default"] = "dependencies";
|
|
21
|
+
DependencyType["Dev"] = "devDependencies";
|
|
22
|
+
DependencyType["Peer"] = "peerDependencies";
|
|
23
|
+
})(DependencyType = exports.DependencyType || (exports.DependencyType = {}));
|
|
24
|
+
/**
|
|
25
|
+
* An enum used to specify the dependency installation behavior for the {@link addDependency}
|
|
26
|
+
* schematics rule. The installation behavior affects if and when {@link NodePackageInstallTask}
|
|
27
|
+
* will be scheduled when using the rule.
|
|
28
|
+
*/
|
|
29
|
+
var InstallBehavior;
|
|
30
|
+
(function (InstallBehavior) {
|
|
31
|
+
/**
|
|
32
|
+
* No installation will occur as a result of the rule when specified.
|
|
33
|
+
*
|
|
34
|
+
* NOTE: This does not prevent other rules from scheduling a {@link NodePackageInstallTask}
|
|
35
|
+
* which may install the dependency.
|
|
36
|
+
*/
|
|
37
|
+
InstallBehavior[InstallBehavior["None"] = 0] = "None";
|
|
38
|
+
/**
|
|
39
|
+
* Automatically determine the need to schedule a {@link NodePackageInstallTask} based on
|
|
40
|
+
* previous usage of the {@link addDependency} within the schematic.
|
|
41
|
+
*/
|
|
42
|
+
InstallBehavior[InstallBehavior["Auto"] = 1] = "Auto";
|
|
43
|
+
/**
|
|
44
|
+
* Always schedule a {@link NodePackageInstallTask} when the rule is executed.
|
|
45
|
+
*/
|
|
46
|
+
InstallBehavior[InstallBehavior["Always"] = 2] = "Always";
|
|
47
|
+
})(InstallBehavior = exports.InstallBehavior || (exports.InstallBehavior = {}));
|
|
48
|
+
/**
|
|
49
|
+
* An enum used to specify the existing dependency behavior for the {@link addDependency}
|
|
50
|
+
* schematics rule. The existing behavior affects whether the named dependency will be added
|
|
51
|
+
* to the `package.json` when the dependency is already present with a differing specifier.
|
|
52
|
+
*/
|
|
53
|
+
var ExistingBehavior;
|
|
54
|
+
(function (ExistingBehavior) {
|
|
55
|
+
/**
|
|
56
|
+
* The dependency will not be added or otherwise changed if it already exists.
|
|
57
|
+
*/
|
|
58
|
+
ExistingBehavior[ExistingBehavior["Skip"] = 0] = "Skip";
|
|
59
|
+
/**
|
|
60
|
+
* The dependency's existing specifier will be replaced with the specifier provided in the
|
|
61
|
+
* {@link addDependency} call. A warning will also be shown during schematic execution to
|
|
62
|
+
* notify the user of the replacement.
|
|
63
|
+
*/
|
|
64
|
+
ExistingBehavior[ExistingBehavior["Replace"] = 1] = "Replace";
|
|
65
|
+
})(ExistingBehavior = exports.ExistingBehavior || (exports.ExistingBehavior = {}));
|
|
66
|
+
/**
|
|
67
|
+
* Adds a package as a dependency to a `package.json`. By default the `package.json` located
|
|
68
|
+
* at the schematic's root will be used. The `manifestPath` option can be used to explicitly specify
|
|
69
|
+
* a `package.json` in different location. The type of the dependency can also be specified instead
|
|
70
|
+
* of the default of the `dependencies` section by using the `type` option for either `devDependencies`
|
|
71
|
+
* or `peerDependencies`.
|
|
72
|
+
*
|
|
73
|
+
* When using this rule, {@link NodePackageInstallTask} does not need to be included directly by
|
|
74
|
+
* a schematic. A package manager install task will be automatically scheduled as needed.
|
|
75
|
+
*
|
|
76
|
+
* @param name The name of the package to add.
|
|
77
|
+
* @param specifier The package specifier for the package to add. Typically a SemVer range.
|
|
78
|
+
* @param options An optional object that can contain the `type` of the dependency
|
|
79
|
+
* and/or a path (`packageJsonPath`) of a manifest file (`package.json`) to modify.
|
|
80
|
+
* @returns A Schematics {@link Rule}
|
|
81
|
+
*/
|
|
82
|
+
function addDependency(name, specifier, options = {}) {
|
|
83
|
+
const { type = DependencyType.Default, packageJsonPath = '/package.json', install = InstallBehavior.Auto, existing = ExistingBehavior.Replace, } = options;
|
|
84
|
+
return (tree, context) => {
|
|
85
|
+
const manifest = tree.readJson(packageJsonPath);
|
|
86
|
+
const dependencySection = manifest[type];
|
|
87
|
+
if (!dependencySection) {
|
|
88
|
+
// Section is not present. The dependency can be added to a new object literal for the section.
|
|
89
|
+
manifest[type] = { [name]: specifier };
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
const existingSpecifier = dependencySection[name];
|
|
93
|
+
if (existingSpecifier === specifier) {
|
|
94
|
+
// Already present with same specifier
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
if (existingSpecifier) {
|
|
98
|
+
// Already present but different specifier
|
|
99
|
+
if (existing === ExistingBehavior.Skip) {
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
// ExistingBehavior.Replace is the only other behavior currently
|
|
103
|
+
context.logger.warn(`Package dependency "${name}" already exists with a different specifier. ` +
|
|
104
|
+
`"${existingSpecifier}" will be replaced with "${specifier}".`);
|
|
105
|
+
}
|
|
106
|
+
// Add new dependency in alphabetical order
|
|
107
|
+
const entries = Object.entries(dependencySection);
|
|
108
|
+
entries.push([name, specifier]);
|
|
109
|
+
entries.sort((a, b) => a[0].localeCompare(b[0]));
|
|
110
|
+
manifest[type] = Object.fromEntries(entries);
|
|
111
|
+
}
|
|
112
|
+
tree.overwrite(packageJsonPath, JSON.stringify(manifest, null, 2));
|
|
113
|
+
const installPaths = installTasks.get(context) ?? new Set();
|
|
114
|
+
if (install === InstallBehavior.Always ||
|
|
115
|
+
(install === InstallBehavior.Auto && !installPaths.has(packageJsonPath))) {
|
|
116
|
+
context.addTask(new tasks_1.NodePackageInstallTask({ workingDirectory: path.dirname(packageJsonPath) }));
|
|
117
|
+
installPaths.add(packageJsonPath);
|
|
118
|
+
installTasks.set(context, installPaths);
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
exports.addDependency = addDependency;
|
|
123
|
+
//# sourceMappingURL=dependency.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dependency.js","sourceRoot":"","sources":["../../../../../packages/schematics/src/utils/angular/dependency.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAGH,4DAA0E;AAC1E,6BAA6B;AAE7B,MAAM,YAAY,GAAG,IAAI,OAAO,EAAiC,CAAC;AAQlE;;;GAGG;AACH,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,0CAAwB,CAAA;IACxB,yCAAuB,CAAA;IACvB,2CAAyB,CAAA;AAC3B,CAAC,EAJW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAIzB;AAED;;;;GAIG;AACH,IAAY,eAiBX;AAjBD,WAAY,eAAe;IACzB;;;;;OAKG;IACH,qDAAI,CAAA;IACJ;;;OAGG;IACH,qDAAI,CAAA;IACJ;;OAEG;IACH,yDAAM,CAAA;AACR,CAAC,EAjBW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAiB1B;AAED;;;;GAIG;AACH,IAAY,gBAWX;AAXD,WAAY,gBAAgB;IAC1B;;OAEG;IACH,uDAAI,CAAA;IACJ;;;;OAIG;IACH,6DAAO,CAAA;AACT,CAAC,EAXW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAW3B;AAED;;;;;;;;;;;;;;;GAeG;AACH,SAAgB,aAAa,CAC3B,IAAY,EACZ,SAAiB,EACjB,UAsBI,EAAE;IAEN,MAAM,EACJ,IAAI,GAAG,cAAc,CA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AC;SAC9C;QAED,IAAI,CAAC,SAAS,CAAC,eAAe,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QAEnE,MAAM,YAAY,GAAG,YAAY,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,IAAI,GAAG,EAAU,CAAC;QACpE,IACE,OAAO,KAAK,eAAe,CAAC,MAAM;YAClC,CAAC,OAAO,KAAK,eAAe,CAAC,IAAI,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC,EACxE;YACA,OAAO,CAAC,OAAO,CACb,IAAI,8BAAsB,CAAC,EAAE,gBAAgB,EAAE,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE,CAAC,CAChF,CAAC;YACF,YAAY,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;YAClC,YAAY,CAAC,GAAG,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;SACzC;IACH,CAAC,CAAC;AACJ,CAAC;AApFD,sCAoFC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright Google
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
@@ -8,16 +8,14 @@
|
|
|
8
8
|
import { Path } from '@angular-devkit/core';
|
|
9
9
|
import { Tree } from '@angular-devkit/schematics';
|
|
10
10
|
export interface ModuleOptions {
|
|
11
|
-
project?: string;
|
|
12
11
|
module?: string;
|
|
13
12
|
name: string;
|
|
14
13
|
flat?: boolean;
|
|
15
14
|
path?: string;
|
|
16
|
-
route?: string;
|
|
17
|
-
selector?: string;
|
|
18
15
|
skipImport?: boolean;
|
|
19
16
|
moduleExt?: string;
|
|
20
17
|
routingModuleExt?: string;
|
|
18
|
+
standalone?: boolean;
|
|
21
19
|
}
|
|
22
20
|
export declare const MODULE_EXT = ".module.ts";
|
|
23
21
|
export declare const ROUTING_MODULE_EXT = "-routing.module.ts";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.buildRelativePath = exports.findModule = exports.findModuleFromOptions = exports.ROUTING_MODULE_EXT = exports.MODULE_EXT = void 0;
|
|
4
2
|
/**
|
|
5
3
|
* @license
|
|
6
|
-
* Copyright Google
|
|
4
|
+
* Copyright Google LLC All Rights Reserved.
|
|
7
5
|
*
|
|
8
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
9
7
|
* found in the LICENSE file at https://angular.io/license
|
|
10
8
|
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.buildRelativePath = exports.findModule = exports.findModuleFromOptions = exports.ROUTING_MODULE_EXT = exports.MODULE_EXT = void 0;
|
|
11
11
|
const core_1 = require("@angular-devkit/core");
|
|
12
12
|
exports.MODULE_EXT = '.module.ts';
|
|
13
13
|
exports.ROUTING_MODULE_EXT = '-routing.module.ts';
|
|
@@ -15,32 +15,32 @@ exports.ROUTING_MODULE_EXT = '-routing.module.ts';
|
|
|
15
15
|
* Find the module referred by a set of options passed to the schematics.
|
|
16
16
|
*/
|
|
17
17
|
function findModuleFromOptions(host, options) {
|
|
18
|
-
if (
|
|
18
|
+
if (options.standalone || options.skipImport) {
|
|
19
19
|
return undefined;
|
|
20
20
|
}
|
|
21
21
|
const moduleExt = options.moduleExt || exports.MODULE_EXT;
|
|
22
22
|
const routingModuleExt = options.routingModuleExt || exports.ROUTING_MODULE_EXT;
|
|
23
23
|
if (!options.module) {
|
|
24
24
|
const pathToCheck = (options.path || '') + '/' + options.name;
|
|
25
|
-
return core_1.normalize(findModule(host, pathToCheck, moduleExt, routingModuleExt));
|
|
25
|
+
return (0, core_1.normalize)(findModule(host, pathToCheck, moduleExt, routingModuleExt));
|
|
26
26
|
}
|
|
27
27
|
else {
|
|
28
|
-
const modulePath = core_1.normalize(`/${options.path}/${options.module}`);
|
|
29
|
-
const componentPath = core_1.normalize(`/${options.path}/${options.name}`);
|
|
30
|
-
const moduleBaseName = core_1.normalize(modulePath).split('/').pop();
|
|
31
|
-
const candidateSet = new Set([core_1.normalize(options.path || '/')]);
|
|
32
|
-
for (let dir = modulePath; dir != core_1.NormalizedRoot; dir = core_1.dirname(dir)) {
|
|
28
|
+
const modulePath = (0, core_1.normalize)(`/${options.path}/${options.module}`);
|
|
29
|
+
const componentPath = (0, core_1.normalize)(`/${options.path}/${options.name}`);
|
|
30
|
+
const moduleBaseName = (0, core_1.normalize)(modulePath).split('/').pop();
|
|
31
|
+
const candidateSet = new Set([(0, core_1.normalize)(options.path || '/')]);
|
|
32
|
+
for (let dir = modulePath; dir != core_1.NormalizedRoot; dir = (0, core_1.dirname)(dir)) {
|
|
33
33
|
candidateSet.add(dir);
|
|
34
34
|
}
|
|
35
|
-
for (let dir = componentPath; dir != core_1.NormalizedRoot; dir = core_1.dirname(dir)) {
|
|
35
|
+
for (let dir = componentPath; dir != core_1.NormalizedRoot; dir = (0, core_1.dirname)(dir)) {
|
|
36
36
|
candidateSet.add(dir);
|
|
37
37
|
}
|
|
38
38
|
const candidatesDirs = [...candidateSet].sort((a, b) => b.length - a.length);
|
|
39
39
|
for (const c of candidatesDirs) {
|
|
40
|
-
const candidateFiles = ['', `${moduleBaseName}.ts`, `${moduleBaseName}${moduleExt}`].map(x => core_1.join(c, x));
|
|
40
|
+
const candidateFiles = ['', `${moduleBaseName}.ts`, `${moduleBaseName}${moduleExt}`].map((x) => (0, core_1.join)(c, x));
|
|
41
41
|
for (const sc of candidateFiles) {
|
|
42
42
|
if (host.exists(sc)) {
|
|
43
|
-
return core_1.normalize(sc);
|
|
43
|
+
return (0, core_1.normalize)(sc);
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
}
|
|
@@ -56,14 +56,14 @@ function findModule(host, generateDir, moduleExt = exports.MODULE_EXT, routingMo
|
|
|
56
56
|
let dir = host.getDir('/' + generateDir);
|
|
57
57
|
let foundRoutingModule = false;
|
|
58
58
|
while (dir) {
|
|
59
|
-
const allMatches = dir.subfiles.filter(p => p.endsWith(moduleExt));
|
|
60
|
-
const filteredMatches = allMatches.filter(p => !p.endsWith(routingModuleExt));
|
|
59
|
+
const allMatches = dir.subfiles.filter((p) => p.endsWith(moduleExt));
|
|
60
|
+
const filteredMatches = allMatches.filter((p) => !p.endsWith(routingModuleExt));
|
|
61
61
|
foundRoutingModule = foundRoutingModule || allMatches.length !== filteredMatches.length;
|
|
62
62
|
if (filteredMatches.length == 1) {
|
|
63
|
-
return core_1.join(dir.path, filteredMatches[0]);
|
|
63
|
+
return (0, core_1.join)(dir.path, filteredMatches[0]);
|
|
64
64
|
}
|
|
65
65
|
else if (filteredMatches.length > 1) {
|
|
66
|
-
throw new Error(
|
|
66
|
+
throw new Error(`More than one module matches. Use the '--skip-import' option to skip importing ` +
|
|
67
67
|
'the component into the closest module or use the module option to specify a module.');
|
|
68
68
|
}
|
|
69
69
|
dir = dir.parent;
|
|
@@ -71,8 +71,8 @@ function findModule(host, generateDir, moduleExt = exports.MODULE_EXT, routingMo
|
|
|
71
71
|
const errorMsg = foundRoutingModule
|
|
72
72
|
? 'Could not find a non Routing NgModule.' +
|
|
73
73
|
`\nModules with suffix '${routingModuleExt}' are strictly reserved for routing.` +
|
|
74
|
-
|
|
75
|
-
:
|
|
74
|
+
`\nUse the '--skip-import' option to skip importing in NgModule.`
|
|
75
|
+
: `Could not find an NgModule. Use the '--skip-import' option to skip importing in NgModule.`;
|
|
76
76
|
throw new Error(errorMsg);
|
|
77
77
|
}
|
|
78
78
|
exports.findModule = findModule;
|
|
@@ -80,15 +80,15 @@ exports.findModule = findModule;
|
|
|
80
80
|
* Build a relative path from one file path to another file path.
|
|
81
81
|
*/
|
|
82
82
|
function buildRelativePath(from, to) {
|
|
83
|
-
from = core_1.normalize(from);
|
|
84
|
-
to = core_1.normalize(to);
|
|
83
|
+
from = (0, core_1.normalize)(from);
|
|
84
|
+
to = (0, core_1.normalize)(to);
|
|
85
85
|
// Convert to arrays.
|
|
86
86
|
const fromParts = from.split('/');
|
|
87
87
|
const toParts = to.split('/');
|
|
88
88
|
// Remove file names (preserving destination)
|
|
89
89
|
fromParts.pop();
|
|
90
90
|
const toFileName = toParts.pop();
|
|
91
|
-
const relativePath = core_1.relative(core_1.normalize(fromParts.join('/') || '/'), core_1.normalize(toParts.join('/') || '/'));
|
|
91
|
+
const relativePath = (0, core_1.relative)((0, core_1.normalize)(fromParts.join('/') || '/'), (0, core_1.normalize)(toParts.join('/') || '/'));
|
|
92
92
|
let pathPrefix = '';
|
|
93
93
|
// Set the path prefix for same dir or child dir, parent dir starts with `..`
|
|
94
94
|
if (!relativePath) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"find-module.js","sourceRoot":"","sources":["../../../../../packages/schematics/src/utils/angular/find-module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"find-module.js","sourceRoot":"","sources":["../../../../../packages/schematics/src/utils/angular/find-module.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,+CAAgG;AAcnF,QAAA,UAAU,GAAG,YAAY,CAAC;AAC1B,QAAA,kBAAkB,GAAG,oBAAoB,CAAC;AAEvD;;GAEG;AACH,SAAgB,qBAAqB,CAAC,IAAU,EAAE,OAAsB;IACtE,IAAI,OAAO,CAAC,UAAU,IAAI,OAAO,CAAC,UAAU,EAAE;QAC5C,OAAO,SAAS,CAAC;KAClB;IAED,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,IAAI,kBAAU,CAAC;IAClD,MAAM,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,IAAI,0BAAkB,CAAC;IAExE,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE;QACnB,MAAM,WAAW,GAAG,CAAC,OAAO,CAAC,IAAI,IAAI,EAAE,CAAC,GAAG,G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CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;QAC3C,UAAU,IAAI,GAAG,CAAC;KACnB;IAED,OAAO,UAAU,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,YAAY,GAAG,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC;AAC5E,CAAC;AA7BD,8CA6BC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.io/license
|
|
7
|
+
*/
|
|
8
|
+
import { Rule } from '@angular-devkit/schematics';
|
|
9
|
+
export interface GenerateFromFilesOptions {
|
|
10
|
+
flat?: boolean;
|
|
11
|
+
name: string;
|
|
12
|
+
path?: string;
|
|
13
|
+
prefix?: string;
|
|
14
|
+
project?: string;
|
|
15
|
+
skipTests?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare function generateFromFiles(options: GenerateFromFilesOptions, extraTemplateValues?: Record<string, string | ((v: string) => string)>): Rule;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright Google LLC All Rights Reserved.
|
|
5
|
+
*
|
|
6
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
+
* found in the LICENSE file at https://angular.io/license
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.generateFromFiles = void 0;
|
|
11
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
12
|
+
const parse_name_1 = require("./parse-name");
|
|
13
|
+
const validation_1 = require("./validation");
|
|
14
|
+
const workspace_1 = require("./workspace");
|
|
15
|
+
function generateFromFiles(options, extraTemplateValues = {}) {
|
|
16
|
+
return async (host) => {
|
|
17
|
+
options.path ?? (options.path = await (0, workspace_1.createDefaultPath)(host, options.project));
|
|
18
|
+
options.prefix ?? (options.prefix = '');
|
|
19
|
+
options.flat ?? (options.flat = true);
|
|
20
|
+
const parsedPath = (0, parse_name_1.parseName)(options.path, options.name);
|
|
21
|
+
options.name = parsedPath.name;
|
|
22
|
+
options.path = parsedPath.path;
|
|
23
|
+
(0, validation_1.validateClassName)(schematics_1.strings.classify(options.name));
|
|
24
|
+
const templateSource = (0, schematics_1.apply)((0, schematics_1.url)('./files'), [
|
|
25
|
+
options.skipTests ? (0, schematics_1.filter)((path) => !path.endsWith('.spec.ts.template')) : (0, schematics_1.noop)(),
|
|
26
|
+
(0, schematics_1.applyTemplates)({
|
|
27
|
+
...schematics_1.strings,
|
|
28
|
+
...options,
|
|
29
|
+
...extraTemplateValues,
|
|
30
|
+
}),
|
|
31
|
+
(0, schematics_1.move)(parsedPath.path + (options.flat ? '' : '/' + schematics_1.strings.dasherize(options.name))),
|
|
32
|
+
]);
|
|
33
|
+
return (0, schematics_1.chain)([(0, schematics_1.mergeWith)(templateSource)]);
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
exports.generateFromFiles = generateFromFiles;
|
|
37
|
+
//# sourceMappingURL=generate-from-files.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-from-files.js","sourceRoot":"","sources":["../../../../../packages/schematics/src/utils/angular/generate-from-files.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,2DAYoC;AACpC,6CAAyC;AACzC,6CAAiD;AACjD,2CAAgD;AAWhD,SAAgB,iBAAiB,CAC/B,OAAiC,EACjC,sBAAwE,EAAE;IAE1E,OAAO,KAAK,EAAE,IAAU,EAAE,EAAE;QAC1B,OAAO,CAAC,IAAI,KAAZ,OAAO,CAAC,IAAI,GAAK,MAAM,IAAA,6BAAiB,EAAC,IAAI,EAAE,OAAO,CAAC,OAAiB,CAAC,EAAC;QAC1E,OAAO,CAAC,MAAM,KAA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
export * from './dependencies';
|
|
5
4
|
export * from './find-module';
|
|
5
|
+
export * from './generate-from-files';
|
|
6
6
|
export * from './json-file';
|
|
7
|
-
export * from './json-utils';
|
|
8
|
-
export * from './latest-versions';
|
|
9
|
-
export * from './lint-fix';
|
|
10
7
|
export * from './ng-ast-utils';
|
|
11
8
|
export * from './parse-name';
|
|
12
9
|
export * from './paths';
|
|
13
10
|
export * from './project-targets';
|
|
14
|
-
export * from './tsconfig';
|
|
15
11
|
export * from './validation';
|
|
16
12
|
export * from './workspace';
|
|
17
13
|
export * from './workspace-models';
|
package/utils/angular/index.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
8
12
|
}));
|
|
9
13
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
15
|
};
|
|
12
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
17
|
__exportStar(require("./ast-utils"), exports);
|
|
14
18
|
__exportStar(require("./change"), exports);
|
|
15
|
-
__exportStar(require("./config"), exports);
|
|
16
19
|
__exportStar(require("./dependencies"), exports);
|
|
17
20
|
__exportStar(require("./find-module"), exports);
|
|
21
|
+
__exportStar(require("./generate-from-files"), exports);
|
|
18
22
|
__exportStar(require("./json-file"), exports);
|
|
19
|
-
__exportStar(require("./json-utils"), exports);
|
|
20
|
-
__exportStar(require("./latest-versions"), exports);
|
|
21
|
-
__exportStar(require("./lint-fix"), exports);
|
|
22
23
|
__exportStar(require("./ng-ast-utils"), exports);
|
|
23
24
|
__exportStar(require("./parse-name"), exports);
|
|
24
25
|
__exportStar(require("./paths"), exports);
|
|
25
26
|
__exportStar(require("./project-targets"), exports);
|
|
26
|
-
__exportStar(require("./tsconfig"), exports);
|
|
27
27
|
__exportStar(require("./validation"), exports);
|
|
28
28
|
__exportStar(require("./workspace"), exports);
|
|
29
29
|
__exportStar(require("./workspace-models"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/schematics/src/utils/angular/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/schematics/src/utils/angular/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,2CAAyB;AACzB,iDAA+B;AAC/B,gDAA8B;AAC9B,wDAAsC;AACtC,8CAA4B;AAC5B,iDAA+B;AAC/B,+CAA6B;AAC7B,0CAAwB;AACxB,oDAAkC;AAClC,+CAA6B;AAC7B,8CAA4B;AAC5B,qDAAmC"}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright Google
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
8
|
import { JsonValue } from '@angular-devkit/core';
|
|
9
9
|
import { Tree } from '@angular-devkit/schematics';
|
|
10
|
+
export declare type InsertionIndex = (properties: string[]) => number;
|
|
10
11
|
export declare type JSONPath = (string | number)[];
|
|
11
12
|
/** @internal */
|
|
12
13
|
export declare class JSONFile {
|
|
13
14
|
private readonly host;
|
|
14
15
|
private readonly path;
|
|
15
|
-
|
|
16
|
-
error: undefined | Error;
|
|
16
|
+
content: string;
|
|
17
17
|
constructor(host: Tree, path: string);
|
|
18
18
|
private _jsonAst;
|
|
19
19
|
private get JsonAst();
|
|
20
20
|
get(jsonPath: JSONPath): unknown;
|
|
21
|
-
modify(jsonPath: JSONPath, value: JsonValue | undefined,
|
|
21
|
+
modify(jsonPath: JSONPath, value: JsonValue | undefined, insertInOrder?: InsertionIndex | false): void;
|
|
22
22
|
remove(jsonPath: JSONPath): void;
|
|
23
23
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
|
-
* Copyright Google
|
|
4
|
+
* Copyright Google LLC All Rights Reserved.
|
|
5
5
|
*
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
@@ -14,41 +14,48 @@ class JSONFile {
|
|
|
14
14
|
constructor(host, path) {
|
|
15
15
|
this.host = host;
|
|
16
16
|
this.path = path;
|
|
17
|
-
|
|
18
|
-
if (buffer) {
|
|
19
|
-
this.content = buffer.toString();
|
|
20
|
-
}
|
|
21
|
-
else {
|
|
22
|
-
this.error = new Error(`Could not read ${path}.`);
|
|
23
|
-
}
|
|
17
|
+
this.content = this.host.readText(this.path);
|
|
24
18
|
}
|
|
25
19
|
get JsonAst() {
|
|
26
20
|
if (this._jsonAst) {
|
|
27
21
|
return this._jsonAst;
|
|
28
22
|
}
|
|
29
|
-
|
|
23
|
+
const errors = [];
|
|
24
|
+
this._jsonAst = (0, jsonc_parser_1.parseTree)(this.content, errors, { allowTrailingComma: true });
|
|
25
|
+
if (errors.length) {
|
|
26
|
+
const { error, offset } = errors[0];
|
|
27
|
+
throw new Error(`Failed to parse "${this.path}" as JSON AST Object. ${(0, jsonc_parser_1.printParseErrorCode)(error)} at location: ${offset}.`);
|
|
28
|
+
}
|
|
30
29
|
return this._jsonAst;
|
|
31
30
|
}
|
|
32
31
|
get(jsonPath) {
|
|
32
|
+
const jsonAstNode = this.JsonAst;
|
|
33
|
+
if (!jsonAstNode) {
|
|
34
|
+
return undefined;
|
|
35
|
+
}
|
|
33
36
|
if (jsonPath.length === 0) {
|
|
34
|
-
return jsonc_parser_1.getNodeValue(
|
|
37
|
+
return (0, jsonc_parser_1.getNodeValue)(jsonAstNode);
|
|
35
38
|
}
|
|
36
|
-
const node = jsonc_parser_1.findNodeAtLocation(
|
|
37
|
-
return node === undefined ? undefined : jsonc_parser_1.getNodeValue(node);
|
|
39
|
+
const node = (0, jsonc_parser_1.findNodeAtLocation)(jsonAstNode, jsonPath);
|
|
40
|
+
return node === undefined ? undefined : (0, jsonc_parser_1.getNodeValue)(node);
|
|
38
41
|
}
|
|
39
|
-
modify(jsonPath, value,
|
|
40
|
-
|
|
42
|
+
modify(jsonPath, value, insertInOrder) {
|
|
43
|
+
let getInsertionIndex;
|
|
44
|
+
if (insertInOrder === undefined) {
|
|
41
45
|
const property = jsonPath.slice(-1)[0];
|
|
42
|
-
getInsertionIndex = properties => [...properties, property].sort().findIndex(p => p === property);
|
|
46
|
+
getInsertionIndex = (properties) => [...properties, property].sort().findIndex((p) => p === property);
|
|
47
|
+
}
|
|
48
|
+
else if (insertInOrder !== false) {
|
|
49
|
+
getInsertionIndex = insertInOrder;
|
|
43
50
|
}
|
|
44
|
-
const edits = jsonc_parser_1.modify(this.content, jsonPath, value, {
|
|
51
|
+
const edits = (0, jsonc_parser_1.modify)(this.content, jsonPath, value, {
|
|
45
52
|
getInsertionIndex,
|
|
46
53
|
formattingOptions: {
|
|
47
54
|
insertSpaces: true,
|
|
48
55
|
tabSize: 2,
|
|
49
56
|
},
|
|
50
57
|
});
|
|
51
|
-
this.content = jsonc_parser_1.applyEdits(this.content, edits);
|
|
58
|
+
this.content = (0, jsonc_parser_1.applyEdits)(this.content, edits);
|
|
52
59
|
this.host.overwrite(this.path, this.content);
|
|
53
60
|
this._jsonAst = undefined;
|
|
54
61
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json-file.js","sourceRoot":"","sources":["../../../../../packages/schematics/src/utils/angular/json-file.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAIH,+
|
|
1
|
+
{"version":3,"file":"json-file.js","sourceRoot":"","sources":["../../../../../packages/schematics/src/utils/angular/json-file.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAIH,+CASsB;AAKtB,gBAAgB;AAChB,MAAa,QAAQ;IAGnB,YAA6B,IAAU,EAAmB,IAAY;QAAzC,SAAI,GAAJ,IAAI,CAAM;QAAmB,SAAI,GAAJ,IAAI,CAAQ;QACpE,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC/C,CAAC;IAGD,IAAY,OAAO;QACjB,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,OAAO,IAAI,CAAC,QAAQ,CAAC;SACtB;QAED,MAAM,MAAM,GAAiB,EAAE,CAAC;QAChC,IAAI,CAAC,QAAQ,GAAG,IAAA,wBAAS,EAAC,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,kBAAkB,EAAE,IAAI,EAAE,CAAC,CAAC;QAC9E,IAAI,MAAM,CAAC,MAAM,EAAE;YACjB,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;YACpC,MAAM,IAAI,KAAK,CACb,oBAAoB,IAAI,CAAC,IAAI,yBAAyB,IAAA,kCAAmB,EACvE,KAAK,CACN,iBAAiB,MAAM,GAAG,CAC5B,CAAC;SACH;QAED,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED,GAAG,CAAC,QAAkB;QACpB,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAA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C,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC;IAC5B,CAAC;IAED,MAAM,CAAC,QAAkB;QACvB,IAAI,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,SAAS,EAAE;YACpC,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;SAClC;IACH,CAAC;CACF;AA1ED,4BA0EC"}
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.io/license
|
|
7
|
+
*/
|
|
1
8
|
import { Tree } from '@angular-devkit/schematics';
|
|
2
9
|
import * as ts from 'typescript';
|
|
3
10
|
export declare function findBootstrapModuleCall(host: Tree, mainPath: string): ts.CallExpression | null;
|
|
@@ -1,30 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getAppModulePath = exports.findBootstrapModulePath = exports.findBootstrapModuleCall = void 0;
|
|
4
2
|
/**
|
|
5
3
|
* @license
|
|
6
|
-
* Copyright Google
|
|
4
|
+
* Copyright Google LLC All Rights Reserved.
|
|
7
5
|
*
|
|
8
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
9
7
|
* found in the LICENSE file at https://angular.io/license
|
|
10
8
|
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.getAppModulePath = exports.findBootstrapModulePath = exports.findBootstrapModuleCall = void 0;
|
|
11
11
|
const core_1 = require("@angular-devkit/core");
|
|
12
12
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
13
13
|
const path_1 = require("path");
|
|
14
14
|
const ts = require("typescript");
|
|
15
15
|
const ast_utils_1 = require("./ast-utils");
|
|
16
16
|
function findBootstrapModuleCall(host, mainPath) {
|
|
17
|
-
const
|
|
18
|
-
if (!mainBuffer) {
|
|
19
|
-
throw new schematics_1.SchematicsException(`Main file (${mainPath}) not found`);
|
|
20
|
-
}
|
|
21
|
-
const mainText = mainBuffer.toString('utf-8');
|
|
17
|
+
const mainText = host.readText(mainPath);
|
|
22
18
|
const source = ts.createSourceFile(mainPath, mainText, ts.ScriptTarget.Latest, true);
|
|
23
|
-
const allNodes = ast_utils_1.getSourceNodes(source);
|
|
19
|
+
const allNodes = (0, ast_utils_1.getSourceNodes)(source);
|
|
24
20
|
let bootstrapCall = null;
|
|
25
21
|
for (const node of allNodes) {
|
|
26
22
|
let bootstrapCallNode = null;
|
|
27
|
-
bootstrapCallNode = ast_utils_1.findNode(node, ts.SyntaxKind.Identifier, 'bootstrapModule');
|
|
23
|
+
bootstrapCallNode = (0, ast_utils_1.findNode)(node, ts.SyntaxKind.Identifier, 'bootstrapModule');
|
|
28
24
|
// Walk up the parent until CallExpression is found.
|
|
29
25
|
while (bootstrapCallNode &&
|
|
30
26
|
bootstrapCallNode.parent &&
|
|
@@ -47,19 +43,15 @@ function findBootstrapModulePath(host, mainPath) {
|
|
|
47
43
|
throw new schematics_1.SchematicsException('Bootstrap call not found');
|
|
48
44
|
}
|
|
49
45
|
const bootstrapModule = bootstrapCall.arguments[0];
|
|
50
|
-
const
|
|
51
|
-
if (!mainBuffer) {
|
|
52
|
-
throw new schematics_1.SchematicsException(`Client app main file (${mainPath}) not found`);
|
|
53
|
-
}
|
|
54
|
-
const mainText = mainBuffer.toString('utf-8');
|
|
46
|
+
const mainText = host.readText(mainPath);
|
|
55
47
|
const source = ts.createSourceFile(mainPath, mainText, ts.ScriptTarget.Latest, true);
|
|
56
|
-
const allNodes = ast_utils_1.getSourceNodes(source);
|
|
48
|
+
const allNodes = (0, ast_utils_1.getSourceNodes)(source);
|
|
57
49
|
const bootstrapModuleRelativePath = allNodes
|
|
58
|
-
.filter(
|
|
50
|
+
.filter(ts.isImportDeclaration)
|
|
59
51
|
.filter(imp => {
|
|
60
|
-
return ast_utils_1.findNode(imp, ts.SyntaxKind.Identifier, bootstrapModule.getText());
|
|
52
|
+
return (0, ast_utils_1.findNode)(imp, ts.SyntaxKind.Identifier, bootstrapModule.getText());
|
|
61
53
|
})
|
|
62
|
-
.map(
|
|
54
|
+
.map(imp => {
|
|
63
55
|
const modulePathStringLiteral = imp.moduleSpecifier;
|
|
64
56
|
return modulePathStringLiteral.text;
|
|
65
57
|
})[0];
|
|
@@ -68,8 +60,8 @@ function findBootstrapModulePath(host, mainPath) {
|
|
|
68
60
|
exports.findBootstrapModulePath = findBootstrapModulePath;
|
|
69
61
|
function getAppModulePath(host, mainPath) {
|
|
70
62
|
const moduleRelativePath = findBootstrapModulePath(host, mainPath);
|
|
71
|
-
const mainDir = path_1.dirname(mainPath);
|
|
72
|
-
const modulePath = core_1.normalize(`/${mainDir}/${moduleRelativePath}.ts`);
|
|
63
|
+
const mainDir = (0, path_1.dirname)(mainPath);
|
|
64
|
+
const modulePath = (0, core_1.normalize)(`/${mainDir}/${moduleRelativePath}.ts`);
|
|
73
65
|
return modulePath;
|
|
74
66
|
}
|
|
75
67
|
exports.getAppModulePath = getAppModulePath;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-ast-utils.js","sourceRoot":"","sources":["../../../../../packages/schematics/src/utils/angular/ng-ast-utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ng-ast-utils.js","sourceRoot":"","sources":["../../../../../packages/schematics/src/utils/angular/ng-ast-utils.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,+CAAiD;AACjD,2DAAuE;AACvE,+BAA+B;AAC/B,iCAAiC;AACjC,2CAAuD;AAEvD,SAAgB,uBAAuB,CAAC,IAAU,EAAE,QAAgB;IAClE,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACzC,MAAM,MAAM,GAAG,EAAE,CAAC,gBAAgB,CAAC,QAAQ,EA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