@abp/ng.schematics 5.0.1 → 5.0.2

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.
Files changed (141) hide show
  1. package/README.md +3 -3
  2. package/collection.json +29 -29
  3. package/commands/api/files-enum/proxy/__namespace@dir__/__name@kebab__.enum.ts.template +8 -8
  4. package/commands/api/files-model/proxy/__namespace@dir__/models.ts.template +9 -9
  5. package/commands/api/files-service/proxy/__namespace@dir__/__name@kebab__.service.ts.template +25 -25
  6. package/commands/api/index.d.ts +2 -2
  7. package/commands/api/index.js +112 -112
  8. package/commands/api/schema.json +45 -45
  9. package/commands/proxy-add/index.d.ts +2 -2
  10. package/commands/proxy-add/index.js +41 -41
  11. package/commands/proxy-add/schema.json +45 -45
  12. package/commands/proxy-index/index.d.ts +4 -4
  13. package/commands/proxy-index/index.js +14 -14
  14. package/commands/proxy-index/schema.json +18 -18
  15. package/commands/proxy-refresh/index.d.ts +3 -3
  16. package/commands/proxy-refresh/index.js +27 -27
  17. package/commands/proxy-refresh/schema.json +45 -45
  18. package/commands/proxy-remove/index.d.ts +3 -3
  19. package/commands/proxy-remove/index.js +33 -33
  20. package/commands/proxy-remove/schema.json +45 -45
  21. package/constants/api.d.ts +1 -1
  22. package/constants/api.js +4 -4
  23. package/constants/index.d.ts +4 -4
  24. package/constants/index.js +16 -16
  25. package/constants/proxy.d.ts +4 -4
  26. package/constants/proxy.js +24 -24
  27. package/constants/system-types.d.ts +1 -1
  28. package/constants/system-types.js +27 -27
  29. package/constants/volo.d.ts +1 -1
  30. package/constants/volo.js +4 -4
  31. package/enums/binding-source-id.d.ts +6 -6
  32. package/enums/binding-source-id.js +10 -10
  33. package/enums/exception.d.ts +16 -16
  34. package/enums/exception.js +2 -2
  35. package/enums/import-keyword.d.ts +4 -4
  36. package/enums/import-keyword.js +8 -8
  37. package/enums/index.d.ts +4 -4
  38. package/enums/index.js +16 -16
  39. package/enums/method-modifier.d.ts +6 -6
  40. package/enums/method-modifier.js +10 -10
  41. package/index.d.ts +1 -1
  42. package/index.js +2 -2
  43. package/models/api-definition.d.ts +72 -72
  44. package/models/api-definition.js +2 -2
  45. package/models/generate-proxy-schema.d.ts +18 -18
  46. package/models/generate-proxy-schema.js +2 -2
  47. package/models/import.d.ts +11 -11
  48. package/models/import.js +13 -13
  49. package/models/index.d.ts +10 -10
  50. package/models/index.js +22 -22
  51. package/models/method.d.ts +31 -31
  52. package/models/method.js +61 -61
  53. package/models/model.d.ts +48 -48
  54. package/models/model.js +71 -71
  55. package/models/project.d.ts +5 -5
  56. package/models/project.js +2 -2
  57. package/models/proxy-config.d.ts +4 -4
  58. package/models/proxy-config.js +2 -2
  59. package/models/service.d.ts +21 -21
  60. package/models/service.js +11 -11
  61. package/models/tree.d.ts +1 -1
  62. package/models/tree.js +2 -2
  63. package/models/util.d.ts +7 -7
  64. package/models/util.js +2 -2
  65. package/package.json +1 -1
  66. package/test-setup.d.ts +1 -1
  67. package/test-setup.js +3 -3
  68. package/utils/angular/ast-utils.d.ts +115 -115
  69. package/utils/angular/ast-utils.js +598 -598
  70. package/utils/angular/change.d.ts +66 -66
  71. package/utils/angular/change.js +96 -96
  72. package/utils/angular/config.d.ts +455 -455
  73. package/utils/angular/config.js +70 -70
  74. package/utils/angular/dependencies.d.ts +23 -23
  75. package/utils/angular/dependencies.js +58 -58
  76. package/utils/angular/find-module.d.ts +35 -35
  77. package/utils/angular/find-module.js +105 -105
  78. package/utils/angular/index.d.ts +17 -17
  79. package/utils/angular/index.js +29 -29
  80. package/utils/angular/json-file.d.ts +23 -23
  81. package/utils/angular/json-file.js +61 -61
  82. package/utils/angular/json-utils.d.ts +14 -14
  83. package/utils/angular/json-utils.js +158 -158
  84. package/utils/angular/latest-versions.d.ts +18 -18
  85. package/utils/angular/latest-versions.js +26 -26
  86. package/utils/angular/lint-fix.d.ts +9 -9
  87. package/utils/angular/lint-fix.js +41 -41
  88. package/utils/angular/ng-ast-utils.d.ts +5 -5
  89. package/utils/angular/ng-ast-utils.js +75 -75
  90. package/utils/angular/parse-name.d.ts +13 -13
  91. package/utils/angular/parse-name.js +21 -21
  92. package/utils/angular/paths.d.ts +8 -8
  93. package/utils/angular/paths.js +21 -21
  94. package/utils/angular/project-targets.d.ts +9 -9
  95. package/utils/angular/project-targets.js +15 -15
  96. package/utils/angular/tsconfig.d.ts +16 -16
  97. package/utils/angular/tsconfig.js +62 -62
  98. package/utils/angular/validation.d.ts +4 -4
  99. package/utils/angular/validation.js +73 -73
  100. package/utils/angular/workspace-models.d.ts +159 -159
  101. package/utils/angular/workspace-models.js +29 -29
  102. package/utils/angular/workspace.d.ts +18 -18
  103. package/utils/angular/workspace.js +75 -75
  104. package/utils/api.d.ts +2 -2
  105. package/utils/api.js +8 -8
  106. package/utils/ast.d.ts +4 -4
  107. package/utils/ast.js +23 -23
  108. package/utils/barrel.d.ts +4 -4
  109. package/utils/barrel.js +92 -92
  110. package/utils/common.d.ts +6 -6
  111. package/utils/common.js +33 -33
  112. package/utils/enum.d.ts +18 -18
  113. package/utils/enum.js +40 -40
  114. package/utils/file.d.ts +2 -2
  115. package/utils/file.js +9 -9
  116. package/utils/generics.d.ts +24 -24
  117. package/utils/generics.js +87 -87
  118. package/utils/import.d.ts +3 -3
  119. package/utils/import.js +11 -11
  120. package/utils/index.d.ts +19 -19
  121. package/utils/index.js +31 -31
  122. package/utils/model.d.ts +11 -11
  123. package/utils/model.js +141 -141
  124. package/utils/namespace.d.ts +1 -1
  125. package/utils/namespace.js +18 -18
  126. package/utils/path.d.ts +2 -2
  127. package/utils/path.js +36 -36
  128. package/utils/rule.d.ts +4 -4
  129. package/utils/rule.js +27 -27
  130. package/utils/service.d.ts +6 -6
  131. package/utils/service.js +82 -82
  132. package/utils/source.d.ts +13 -13
  133. package/utils/source.js +162 -162
  134. package/utils/text.d.ts +9 -9
  135. package/utils/text.js +46 -46
  136. package/utils/tree.d.ts +13 -13
  137. package/utils/tree.js +56 -56
  138. package/utils/type.d.ts +12 -12
  139. package/utils/type.js +102 -102
  140. package/utils/workspace.d.ts +8 -8
  141. package/utils/workspace.js +66 -66
@@ -1,27 +1,27 @@
1
- "use strict";
2
- /**
3
- * @license
4
- * Copyright Google Inc. 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.latestVersions = void 0;
11
- exports.latestVersions = {
12
- // These versions should be kept up to date with latest Angular peer dependencies.
13
- Angular: '~10.0.0-rc.0',
14
- RxJs: '~6.6.0',
15
- ZoneJs: '~0.10.2',
16
- TypeScript: '~3.9.5',
17
- TsLib: '^2.0.0',
18
- // The versions below must be manually updated when making a new devkit release.
19
- // For our e2e tests, these versions must match the latest tag present on the branch.
20
- // During RC periods they will not match the latest RC until there's a new git tag, and
21
- // should not be updated.
22
- DevkitBuildAngular: '~0.1000.0-rc.0',
23
- DevkitBuildNgPackagr: '~0.1000.0-rc.0',
24
- DevkitBuildWebpack: '~0.1000.0-rc.0',
25
- ngPackagr: '^10.0.0',
26
- };
1
+ "use strict";
2
+ /**
3
+ * @license
4
+ * Copyright Google Inc. 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.latestVersions = void 0;
11
+ exports.latestVersions = {
12
+ // These versions should be kept up to date with latest Angular peer dependencies.
13
+ Angular: '~10.0.0-rc.0',
14
+ RxJs: '~6.6.0',
15
+ ZoneJs: '~0.10.2',
16
+ TypeScript: '~3.9.5',
17
+ TsLib: '^2.0.0',
18
+ // The versions below must be manually updated when making a new devkit release.
19
+ // For our e2e tests, these versions must match the latest tag present on the branch.
20
+ // During RC periods they will not match the latest RC until there's a new git tag, and
21
+ // should not be updated.
22
+ DevkitBuildAngular: '~0.1000.0-rc.0',
23
+ DevkitBuildNgPackagr: '~0.1000.0-rc.0',
24
+ DevkitBuildWebpack: '~0.1000.0-rc.0',
25
+ ngPackagr: '^10.0.0',
26
+ };
27
27
  //# sourceMappingURL=latest-versions.js.map
@@ -1,9 +1,9 @@
1
- /**
2
- * @license
3
- * Copyright Google Inc. 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 declare function applyLintFix(path?: string): Rule;
1
+ /**
2
+ * @license
3
+ * Copyright Google Inc. 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 declare function applyLintFix(path?: string): Rule;
@@ -1,42 +1,42 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.applyLintFix = void 0;
4
- /**
5
- * @license
6
- * Copyright Google Inc. All Rights Reserved.
7
- *
8
- * Use of this source code is governed by an MIT-style license that can be
9
- * found in the LICENSE file at https://angular.io/license
10
- */
11
- const schematics_1 = require("@angular-devkit/schematics");
12
- const tasks_1 = require("@angular-devkit/schematics/tasks");
13
- function applyLintFix(path = '/') {
14
- return (tree, context) => {
15
- // Find the closest tslint.json or tslint.yaml
16
- let dir = tree.getDir(path.substr(0, path.lastIndexOf('/')));
17
- do {
18
- if (dir.subfiles.some(f => f === 'tslint.json' || f === 'tslint.yaml')) {
19
- break;
20
- }
21
- dir = dir.parent;
22
- } while (dir !== null);
23
- if (dir === null) {
24
- throw new schematics_1.SchematicsException('Asked to run lint fixes, but could not find a tslint.json or tslint.yaml config file.');
25
- }
26
- // Only include files that have been touched.
27
- const files = tree.actions.reduce((acc, action) => {
28
- const path = action.path.substr(1); // Remove the starting '/'.
29
- if (path.endsWith('.ts') && dir && action.path.startsWith(dir.path)) {
30
- acc.add(path);
31
- }
32
- return acc;
33
- }, new Set());
34
- context.addTask(new tasks_1.TslintFixTask({
35
- ignoreErrors: true,
36
- tsConfigPath: 'tsconfig.json',
37
- files: [...files],
38
- }));
39
- };
40
- }
41
- exports.applyLintFix = applyLintFix;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.applyLintFix = void 0;
4
+ /**
5
+ * @license
6
+ * Copyright Google Inc. All Rights Reserved.
7
+ *
8
+ * Use of this source code is governed by an MIT-style license that can be
9
+ * found in the LICENSE file at https://angular.io/license
10
+ */
11
+ const schematics_1 = require("@angular-devkit/schematics");
12
+ const tasks_1 = require("@angular-devkit/schematics/tasks");
13
+ function applyLintFix(path = '/') {
14
+ return (tree, context) => {
15
+ // Find the closest tslint.json or tslint.yaml
16
+ let dir = tree.getDir(path.substr(0, path.lastIndexOf('/')));
17
+ do {
18
+ if (dir.subfiles.some(f => f === 'tslint.json' || f === 'tslint.yaml')) {
19
+ break;
20
+ }
21
+ dir = dir.parent;
22
+ } while (dir !== null);
23
+ if (dir === null) {
24
+ throw new schematics_1.SchematicsException('Asked to run lint fixes, but could not find a tslint.json or tslint.yaml config file.');
25
+ }
26
+ // Only include files that have been touched.
27
+ const files = tree.actions.reduce((acc, action) => {
28
+ const path = action.path.substr(1); // Remove the starting '/'.
29
+ if (path.endsWith('.ts') && dir && action.path.startsWith(dir.path)) {
30
+ acc.add(path);
31
+ }
32
+ return acc;
33
+ }, new Set());
34
+ context.addTask(new tasks_1.TslintFixTask({
35
+ ignoreErrors: true,
36
+ tsConfigPath: 'tsconfig.json',
37
+ files: [...files],
38
+ }));
39
+ };
40
+ }
41
+ exports.applyLintFix = applyLintFix;
42
42
  //# sourceMappingURL=lint-fix.js.map
@@ -1,5 +1,5 @@
1
- import { Tree } from '@angular-devkit/schematics';
2
- import * as ts from 'typescript';
3
- export declare function findBootstrapModuleCall(host: Tree, mainPath: string): ts.CallExpression | null;
4
- export declare function findBootstrapModulePath(host: Tree, mainPath: string): string;
5
- export declare function getAppModulePath(host: Tree, mainPath: string): string;
1
+ import { Tree } from '@angular-devkit/schematics';
2
+ import * as ts from 'typescript';
3
+ export declare function findBootstrapModuleCall(host: Tree, mainPath: string): ts.CallExpression | null;
4
+ export declare function findBootstrapModulePath(host: Tree, mainPath: string): string;
5
+ export declare function getAppModulePath(host: Tree, mainPath: string): string;
@@ -1,76 +1,76 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getAppModulePath = exports.findBootstrapModulePath = exports.findBootstrapModuleCall = void 0;
4
- /**
5
- * @license
6
- * Copyright Google Inc. All Rights Reserved.
7
- *
8
- * Use of this source code is governed by an MIT-style license that can be
9
- * found in the LICENSE file at https://angular.io/license
10
- */
11
- const core_1 = require("@angular-devkit/core");
12
- const schematics_1 = require("@angular-devkit/schematics");
13
- const path_1 = require("path");
14
- const ts = require("typescript");
15
- const ast_utils_1 = require("./ast-utils");
16
- function findBootstrapModuleCall(host, mainPath) {
17
- const mainBuffer = host.read(mainPath);
18
- if (!mainBuffer) {
19
- throw new schematics_1.SchematicsException(`Main file (${mainPath}) not found`);
20
- }
21
- const mainText = mainBuffer.toString('utf-8');
22
- const source = ts.createSourceFile(mainPath, mainText, ts.ScriptTarget.Latest, true);
23
- const allNodes = ast_utils_1.getSourceNodes(source);
24
- let bootstrapCall = null;
25
- for (const node of allNodes) {
26
- let bootstrapCallNode = null;
27
- bootstrapCallNode = ast_utils_1.findNode(node, ts.SyntaxKind.Identifier, 'bootstrapModule');
28
- // Walk up the parent until CallExpression is found.
29
- while (bootstrapCallNode &&
30
- bootstrapCallNode.parent &&
31
- bootstrapCallNode.parent.kind !== ts.SyntaxKind.CallExpression) {
32
- bootstrapCallNode = bootstrapCallNode.parent;
33
- }
34
- if (bootstrapCallNode !== null &&
35
- bootstrapCallNode.parent !== undefined &&
36
- bootstrapCallNode.parent.kind === ts.SyntaxKind.CallExpression) {
37
- bootstrapCall = bootstrapCallNode.parent;
38
- break;
39
- }
40
- }
41
- return bootstrapCall;
42
- }
43
- exports.findBootstrapModuleCall = findBootstrapModuleCall;
44
- function findBootstrapModulePath(host, mainPath) {
45
- const bootstrapCall = findBootstrapModuleCall(host, mainPath);
46
- if (!bootstrapCall) {
47
- throw new schematics_1.SchematicsException('Bootstrap call not found');
48
- }
49
- const bootstrapModule = bootstrapCall.arguments[0];
50
- const mainBuffer = host.read(mainPath);
51
- if (!mainBuffer) {
52
- throw new schematics_1.SchematicsException(`Client app main file (${mainPath}) not found`);
53
- }
54
- const mainText = mainBuffer.toString('utf-8');
55
- const source = ts.createSourceFile(mainPath, mainText, ts.ScriptTarget.Latest, true);
56
- const allNodes = ast_utils_1.getSourceNodes(source);
57
- const bootstrapModuleRelativePath = allNodes
58
- .filter(node => node.kind === ts.SyntaxKind.ImportDeclaration)
59
- .filter(imp => {
60
- return ast_utils_1.findNode(imp, ts.SyntaxKind.Identifier, bootstrapModule.getText());
61
- })
62
- .map((imp) => {
63
- const modulePathStringLiteral = imp.moduleSpecifier;
64
- return modulePathStringLiteral.text;
65
- })[0];
66
- return bootstrapModuleRelativePath;
67
- }
68
- exports.findBootstrapModulePath = findBootstrapModulePath;
69
- function getAppModulePath(host, mainPath) {
70
- const moduleRelativePath = findBootstrapModulePath(host, mainPath);
71
- const mainDir = path_1.dirname(mainPath);
72
- const modulePath = core_1.normalize(`/${mainDir}/${moduleRelativePath}.ts`);
73
- return modulePath;
74
- }
75
- exports.getAppModulePath = getAppModulePath;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getAppModulePath = exports.findBootstrapModulePath = exports.findBootstrapModuleCall = void 0;
4
+ /**
5
+ * @license
6
+ * Copyright Google Inc. All Rights Reserved.
7
+ *
8
+ * Use of this source code is governed by an MIT-style license that can be
9
+ * found in the LICENSE file at https://angular.io/license
10
+ */
11
+ const core_1 = require("@angular-devkit/core");
12
+ const schematics_1 = require("@angular-devkit/schematics");
13
+ const path_1 = require("path");
14
+ const ts = require("typescript");
15
+ const ast_utils_1 = require("./ast-utils");
16
+ function findBootstrapModuleCall(host, mainPath) {
17
+ const mainBuffer = host.read(mainPath);
18
+ if (!mainBuffer) {
19
+ throw new schematics_1.SchematicsException(`Main file (${mainPath}) not found`);
20
+ }
21
+ const mainText = mainBuffer.toString('utf-8');
22
+ const source = ts.createSourceFile(mainPath, mainText, ts.ScriptTarget.Latest, true);
23
+ const allNodes = ast_utils_1.getSourceNodes(source);
24
+ let bootstrapCall = null;
25
+ for (const node of allNodes) {
26
+ let bootstrapCallNode = null;
27
+ bootstrapCallNode = ast_utils_1.findNode(node, ts.SyntaxKind.Identifier, 'bootstrapModule');
28
+ // Walk up the parent until CallExpression is found.
29
+ while (bootstrapCallNode &&
30
+ bootstrapCallNode.parent &&
31
+ bootstrapCallNode.parent.kind !== ts.SyntaxKind.CallExpression) {
32
+ bootstrapCallNode = bootstrapCallNode.parent;
33
+ }
34
+ if (bootstrapCallNode !== null &&
35
+ bootstrapCallNode.parent !== undefined &&
36
+ bootstrapCallNode.parent.kind === ts.SyntaxKind.CallExpression) {
37
+ bootstrapCall = bootstrapCallNode.parent;
38
+ break;
39
+ }
40
+ }
41
+ return bootstrapCall;
42
+ }
43
+ exports.findBootstrapModuleCall = findBootstrapModuleCall;
44
+ function findBootstrapModulePath(host, mainPath) {
45
+ const bootstrapCall = findBootstrapModuleCall(host, mainPath);
46
+ if (!bootstrapCall) {
47
+ throw new schematics_1.SchematicsException('Bootstrap call not found');
48
+ }
49
+ const bootstrapModule = bootstrapCall.arguments[0];
50
+ const mainBuffer = host.read(mainPath);
51
+ if (!mainBuffer) {
52
+ throw new schematics_1.SchematicsException(`Client app main file (${mainPath}) not found`);
53
+ }
54
+ const mainText = mainBuffer.toString('utf-8');
55
+ const source = ts.createSourceFile(mainPath, mainText, ts.ScriptTarget.Latest, true);
56
+ const allNodes = ast_utils_1.getSourceNodes(source);
57
+ const bootstrapModuleRelativePath = allNodes
58
+ .filter(node => node.kind === ts.SyntaxKind.ImportDeclaration)
59
+ .filter(imp => {
60
+ return ast_utils_1.findNode(imp, ts.SyntaxKind.Identifier, bootstrapModule.getText());
61
+ })
62
+ .map((imp) => {
63
+ const modulePathStringLiteral = imp.moduleSpecifier;
64
+ return modulePathStringLiteral.text;
65
+ })[0];
66
+ return bootstrapModuleRelativePath;
67
+ }
68
+ exports.findBootstrapModulePath = findBootstrapModulePath;
69
+ function getAppModulePath(host, mainPath) {
70
+ const moduleRelativePath = findBootstrapModulePath(host, mainPath);
71
+ const mainDir = path_1.dirname(mainPath);
72
+ const modulePath = core_1.normalize(`/${mainDir}/${moduleRelativePath}.ts`);
73
+ return modulePath;
74
+ }
75
+ exports.getAppModulePath = getAppModulePath;
76
76
  //# sourceMappingURL=ng-ast-utils.js.map
@@ -1,13 +1,13 @@
1
- /**
2
- * @license
3
- * Copyright Google Inc. 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 { Path } from '@angular-devkit/core';
9
- export interface Location {
10
- name: string;
11
- path: Path;
12
- }
13
- export declare function parseName(path: string, name: string): Location;
1
+ /**
2
+ * @license
3
+ * Copyright Google Inc. 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 { Path } from '@angular-devkit/core';
9
+ export interface Location {
10
+ name: string;
11
+ path: Path;
12
+ }
13
+ export declare function parseName(path: string, name: string): Location;
@@ -1,22 +1,22 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.parseName = void 0;
4
- /**
5
- * @license
6
- * Copyright Google Inc. All Rights Reserved.
7
- *
8
- * Use of this source code is governed by an MIT-style license that can be
9
- * found in the LICENSE file at https://angular.io/license
10
- */
11
- // import { relative, Path } from "../../../angular_devkit/core/src/virtual-fs";
12
- const core_1 = require("@angular-devkit/core");
13
- function parseName(path, name) {
14
- const nameWithoutPath = core_1.basename(core_1.normalize(name));
15
- const namePath = core_1.dirname(core_1.join(core_1.normalize(path), name));
16
- return {
17
- name: nameWithoutPath,
18
- path: core_1.normalize('/' + namePath),
19
- };
20
- }
21
- exports.parseName = parseName;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.parseName = void 0;
4
+ /**
5
+ * @license
6
+ * Copyright Google Inc. All Rights Reserved.
7
+ *
8
+ * Use of this source code is governed by an MIT-style license that can be
9
+ * found in the LICENSE file at https://angular.io/license
10
+ */
11
+ // import { relative, Path } from "../../../angular_devkit/core/src/virtual-fs";
12
+ const core_1 = require("@angular-devkit/core");
13
+ function parseName(path, name) {
14
+ const nameWithoutPath = core_1.basename(core_1.normalize(name));
15
+ const namePath = core_1.dirname(core_1.join(core_1.normalize(path), name));
16
+ return {
17
+ name: nameWithoutPath,
18
+ path: core_1.normalize('/' + namePath),
19
+ };
20
+ }
21
+ exports.parseName = parseName;
22
22
  //# sourceMappingURL=parse-name.js.map
@@ -1,8 +1,8 @@
1
- /**
2
- * @license
3
- * Copyright Google Inc. 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
- export declare function relativePathToWorkspaceRoot(projectRoot: string | undefined): string;
1
+ /**
2
+ * @license
3
+ * Copyright Google Inc. 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
+ export declare function relativePathToWorkspaceRoot(projectRoot: string | undefined): string;
@@ -1,22 +1,22 @@
1
- "use strict";
2
- /**
3
- * @license
4
- * Copyright Google Inc. 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.relativePathToWorkspaceRoot = void 0;
11
- const core_1 = require("@angular-devkit/core");
12
- function relativePathToWorkspaceRoot(projectRoot) {
13
- const normalizedPath = core_1.split(core_1.normalize(projectRoot || ''));
14
- if (normalizedPath.length === 0 || !normalizedPath[0]) {
15
- return '.';
16
- }
17
- else {
18
- return normalizedPath.map(() => '..').join('/');
19
- }
20
- }
21
- exports.relativePathToWorkspaceRoot = relativePathToWorkspaceRoot;
1
+ "use strict";
2
+ /**
3
+ * @license
4
+ * Copyright Google Inc. 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.relativePathToWorkspaceRoot = void 0;
11
+ const core_1 = require("@angular-devkit/core");
12
+ function relativePathToWorkspaceRoot(projectRoot) {
13
+ const normalizedPath = core_1.split(core_1.normalize(projectRoot || ''));
14
+ if (normalizedPath.length === 0 || !normalizedPath[0]) {
15
+ return '.';
16
+ }
17
+ else {
18
+ return normalizedPath.map(() => '..').join('/');
19
+ }
20
+ }
21
+ exports.relativePathToWorkspaceRoot = relativePathToWorkspaceRoot;
22
22
  //# sourceMappingURL=paths.js.map
@@ -1,9 +1,9 @@
1
- /**
2
- * @license
3
- * Copyright Google Inc. 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 { SchematicsException } from '@angular-devkit/schematics';
9
- export declare function targetBuildNotFoundError(): SchematicsException;
1
+ /**
2
+ * @license
3
+ * Copyright Google Inc. 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 { SchematicsException } from '@angular-devkit/schematics';
9
+ export declare function targetBuildNotFoundError(): SchematicsException;
@@ -1,16 +1,16 @@
1
- "use strict";
2
- /**
3
- * @license
4
- * Copyright Google Inc. 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.targetBuildNotFoundError = void 0;
11
- const schematics_1 = require("@angular-devkit/schematics");
12
- function targetBuildNotFoundError() {
13
- return new schematics_1.SchematicsException(`Project target "build" not found.`);
14
- }
15
- exports.targetBuildNotFoundError = targetBuildNotFoundError;
1
+ "use strict";
2
+ /**
3
+ * @license
4
+ * Copyright Google Inc. 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.targetBuildNotFoundError = void 0;
11
+ const schematics_1 = require("@angular-devkit/schematics");
12
+ function targetBuildNotFoundError() {
13
+ return new schematics_1.SchematicsException(`Project target "build" not found.`);
14
+ }
15
+ exports.targetBuildNotFoundError = targetBuildNotFoundError;
16
16
  //# sourceMappingURL=project-targets.js.map
@@ -1,16 +1,16 @@
1
- /**
2
- * @license
3
- * Copyright Google Inc. 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, Tree } from '@angular-devkit/schematics';
9
- /**
10
- * Add project references in "Solution Style" tsconfig.
11
- */
12
- export declare function addTsConfigProjectReferences(paths: string[]): Rule;
13
- /**
14
- * Throws an exception when the base tsconfig doesn't exists.
15
- */
16
- export declare function verifyBaseTsConfigExists(host: Tree): void;
1
+ /**
2
+ * @license
3
+ * Copyright Google Inc. 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, Tree } from '@angular-devkit/schematics';
9
+ /**
10
+ * Add project references in "Solution Style" tsconfig.
11
+ */
12
+ export declare function addTsConfigProjectReferences(paths: string[]): Rule;
13
+ /**
14
+ * Throws an exception when the base tsconfig doesn't exists.
15
+ */
16
+ export declare function verifyBaseTsConfigExists(host: Tree): void;