@schematics/angular 12.0.0-rc.0 → 12.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/README.md +20 -20
- package/app-shell/app-shell-long.md +2 -2
- package/app-shell/index.d.ts +7 -0
- package/app-shell/index.js +17 -19
- package/app-shell/schema.d.ts +4 -4
- package/app-shell/schema.json +2 -4
- package/application/index.d.ts +7 -0
- package/application/index.js +46 -47
- package/application/other-files/app.component.html.template +0 -11
- package/application/schema.json +15 -13
- package/class/index.d.ts +7 -0
- package/class/index.js +9 -9
- package/class/schema.json +1 -3
- package/collection.json +13 -13
- package/component/index.d.ts +7 -0
- package/component/index.js +23 -20
- package/component/schema.json +3 -10
- package/directive/index.d.ts +7 -0
- package/directive/index.js +13 -13
- package/directive/schema.json +1 -3
- package/e2e/e2e-long.md +1 -1
- package/e2e/index.d.ts +7 -0
- package/e2e/index.js +20 -8
- package/e2e/schema.json +1 -3
- package/enum/files/{__name@dasherize__.enum.ts.template → __name@dasherize____type__.ts.template} +0 -0
- package/enum/index.d.ts +7 -0
- package/enum/index.js +8 -7
- package/enum/schema.d.ts +4 -0
- package/enum/schema.json +5 -3
- package/guard/files/__name@dasherize__.guard.ts.template +1 -1
- package/guard/index.d.ts +7 -0
- package/guard/index.js +20 -12
- package/guard/schema.json +3 -12
- package/interceptor/index.d.ts +7 -0
- package/interceptor/index.js +4 -4
- package/interface/index.d.ts +7 -0
- package/interface/index.js +3 -3
- package/interface/schema.json +1 -3
- package/library/index.d.ts +7 -0
- package/library/index.js +4 -4
- package/library/library-long.md +1 -1
- package/migrations/update-10/add-deprecation-rule-tslint.d.ts +7 -0
- package/migrations/update-10/add-deprecation-rule-tslint.js +8 -1
- package/migrations/update-10/remove-es5-browser-support.d.ts +1 -1
- package/migrations/update-10/remove-es5-browser-support.js +5 -9
- package/migrations/update-10/remove-solution-style-tsconfig.d.ts +7 -0
- package/migrations/update-10/remove-solution-style-tsconfig.js +4 -3
- package/migrations/update-10/rename-browserslist-config.d.ts +7 -0
- package/migrations/update-10/rename-browserslist-config.js +3 -3
- package/migrations/update-10/update-angular-config.d.ts +1 -1
- package/migrations/update-10/update-angular-config.js +2 -2
- package/migrations/update-10/update-dependencies.d.ts +1 -1
- package/migrations/update-10/update-dependencies.js +7 -0
- package/migrations/update-10/update-libraries-tslib.d.ts +1 -1
- package/migrations/update-10/update-libraries-tslib.js +1 -1
- package/migrations/update-10/update-module-and-target-compiler-options.d.ts +7 -0
- package/migrations/update-10/update-module-and-target-compiler-options.js +11 -12
- package/migrations/update-10/update-tslint.d.ts +7 -0
- package/migrations/update-10/update-tslint.js +13 -8
- package/migrations/update-11/add-declaration-map-compiler-option.d.ts +1 -1
- package/migrations/update-11/add-declaration-map-compiler-option.js +1 -1
- package/migrations/update-11/replace-ng-packagr-builder.d.ts +1 -1
- package/migrations/update-11/replace-ng-packagr-builder.js +3 -3
- package/migrations/update-11/update-angular-config.d.ts +1 -1
- package/migrations/update-11/update-angular-config.js +3 -3
- package/migrations/update-11/update-dependencies.d.ts +1 -1
- package/migrations/update-11/update-dependencies.js +7 -0
- package/migrations/update-12/production-default-config.d.ts +1 -1
- package/migrations/update-12/production-default-config.js +4 -3
- package/migrations/update-12/remove-emit-decorator-metadata.d.ts +7 -0
- package/migrations/update-12/remove-emit-decorator-metadata.js +15 -3
- package/migrations/update-12/update-angular-config.d.ts +1 -1
- package/migrations/update-12/update-angular-config.js +6 -5
- package/migrations/update-12/update-lazy-module-paths.d.ts +1 -1
- package/migrations/update-12/update-lazy-module-paths.js +9 -4
- package/migrations/update-12/update-web-workers.d.ts +1 -1
- package/migrations/update-12/update-web-workers.js +7 -0
- package/migrations/update-12/update-zonejs.d.ts +7 -0
- package/migrations/update-12/update-zonejs.js +3 -4
- package/migrations/update-9/add-tslib.d.ts +1 -1
- package/migrations/update-9/add-tslib.js +8 -1
- package/migrations/update-9/index.d.ts +1 -1
- package/migrations/update-9/index.js +2 -2
- package/migrations/update-9/ivy-libraries.d.ts +1 -1
- package/migrations/update-9/ivy-libraries.js +2 -2
- package/migrations/update-9/ngsw-config.d.ts +1 -1
- package/migrations/update-9/ngsw-config.js +7 -0
- package/migrations/update-9/remove-tsickle.d.ts +1 -1
- package/migrations/update-9/remove-tsickle.js +7 -0
- package/migrations/update-9/schematic-options.d.ts +7 -0
- package/migrations/update-9/schematic-options.js +3 -3
- package/migrations/update-9/update-app-tsconfigs.d.ts +7 -0
- package/migrations/update-9/update-app-tsconfigs.js +3 -3
- package/migrations/update-9/update-dependencies.d.ts +1 -1
- package/migrations/update-9/update-dependencies.js +7 -0
- package/migrations/update-9/update-i18n.d.ts +7 -0
- package/migrations/update-9/update-i18n.js +9 -4
- package/migrations/update-9/update-server-main-file.d.ts +1 -1
- package/migrations/update-9/update-server-main-file.js +12 -5
- package/migrations/update-9/update-workspace-config.d.ts +7 -0
- package/migrations/update-9/update-workspace-config.js +7 -0
- package/migrations/update-9/utils.d.ts +7 -0
- package/migrations/update-9/utils.js +3 -3
- package/module/index.d.ts +7 -0
- package/module/index.js +14 -16
- package/module/schema.json +2 -4
- package/ng-new/index.d.ts +1 -1
- package/ng-new/index.js +3 -5
- package/package.json +4 -4
- package/pipe/index.d.ts +7 -0
- package/pipe/index.js +8 -8
- package/pipe/schema.json +1 -3
- package/resolver/index.d.ts +7 -0
- package/resolver/index.js +9 -11
- package/resolver/schema.json +1 -3
- package/service/index.d.ts +7 -0
- package/service/index.js +4 -4
- package/service-worker/index.d.ts +7 -0
- package/service-worker/index.js +2 -2
- package/service-worker/schema.d.ts +13 -13
- package/service-worker/schema.json +1 -3
- package/universal/index.d.ts +7 -0
- package/universal/index.js +15 -14
- package/universal/schema.d.ts +4 -4
- package/universal/schema.json +6 -5
- package/utility/ast-utils.d.ts +7 -0
- package/utility/ast-utils.js +40 -45
- package/utility/change.d.ts +1 -1
- package/utility/change.js +13 -4
- package/utility/dependencies.d.ts +1 -1
- package/utility/dependencies.js +7 -0
- package/utility/find-module.d.ts +1 -1
- package/utility/find-module.js +14 -14
- package/utility/json-file.d.ts +1 -1
- package/utility/json-file.js +2 -2
- package/utility/latest-versions.d.ts +1 -1
- package/utility/latest-versions.js +3 -3
- package/utility/lint-fix.d.ts +1 -1
- package/utility/lint-fix.js +4 -4
- package/utility/ng-ast-utils.d.ts +7 -0
- package/utility/ng-ast-utils.js +8 -7
- package/utility/parse-name.d.ts +1 -1
- package/utility/parse-name.js +3 -3
- package/utility/paths.d.ts +1 -1
- package/utility/paths.js +1 -1
- package/utility/project-targets.d.ts +1 -1
- package/utility/project-targets.js +1 -1
- package/utility/test/create-app-module.d.ts +1 -1
- package/utility/test/create-app-module.js +7 -0
- package/utility/test/get-file-content.d.ts +1 -1
- package/utility/test/get-file-content.js +7 -0
- package/utility/test/index.d.ts +1 -1
- package/utility/test/index.js +7 -7
- package/utility/validation.d.ts +7 -0
- package/utility/validation.js +5 -5
- package/utility/workspace-models.d.ts +3 -3
- package/utility/workspace-models.js +3 -3
- package/utility/workspace.d.ts +1 -1
- package/utility/workspace.js +3 -3
- package/web-worker/index.d.ts +7 -0
- package/web-worker/index.js +8 -6
- package/web-worker/schema.json +1 -4
- package/workspace/files/package.json.template +2 -5
- package/workspace/index.d.ts +7 -0
- package/workspace/index.js +3 -3
- package/workspace/schema.json +1 -4
package/utility/json-file.d.ts
CHANGED
package/utility/json-file.js
CHANGED
|
@@ -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
|
|
@@ -49,7 +49,7 @@ class JSONFile {
|
|
|
49
49
|
let getInsertionIndex;
|
|
50
50
|
if (insertInOrder === undefined) {
|
|
51
51
|
const property = jsonPath.slice(-1)[0];
|
|
52
|
-
getInsertionIndex = properties => [...properties, property].sort().findIndex(p => p === property);
|
|
52
|
+
getInsertionIndex = (properties) => [...properties, property].sort().findIndex((p) => p === property);
|
|
53
53
|
}
|
|
54
54
|
else if (insertInOrder !== false) {
|
|
55
55
|
getInsertionIndex = insertInOrder;
|
|
@@ -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
|
|
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
10
10
|
exports.latestVersions = void 0;
|
|
11
11
|
exports.latestVersions = {
|
|
12
12
|
// These versions should be kept up to date with latest Angular peer dependencies.
|
|
13
|
-
Angular: '~12.0.0
|
|
13
|
+
Angular: '~12.0.0',
|
|
14
14
|
RxJs: '~6.6.0',
|
|
15
15
|
ZoneJs: '~0.11.4',
|
|
16
16
|
TypeScript: '~4.2.3',
|
|
@@ -19,5 +19,5 @@ exports.latestVersions = {
|
|
|
19
19
|
// published together from the same monorepo, and they are both
|
|
20
20
|
// non-experimental, they will always have the same version.
|
|
21
21
|
DevkitBuildAngular: '~' + require('../package.json')['version'],
|
|
22
|
-
ngPackagr: '^12.0.0
|
|
22
|
+
ngPackagr: '^12.0.0',
|
|
23
23
|
};
|
package/utility/lint-fix.d.ts
CHANGED
package/utility/lint-fix.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.applyLintFix = 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.applyLintFix = void 0;
|
|
11
11
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
12
12
|
const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
13
13
|
function applyLintFix(path = '/') {
|
|
@@ -15,7 +15,7 @@ function applyLintFix(path = '/') {
|
|
|
15
15
|
// Find the closest tslint.json or tslint.yaml
|
|
16
16
|
let dir = tree.getDir(path.substr(0, path.lastIndexOf('/')));
|
|
17
17
|
do {
|
|
18
|
-
if (dir.subfiles.some(f => f === 'tslint.json' || f === 'tslint.yaml')) {
|
|
18
|
+
if (dir.subfiles.some((f) => f === 'tslint.json' || f === 'tslint.yaml')) {
|
|
19
19
|
break;
|
|
20
20
|
}
|
|
21
21
|
dir = dir.parent;
|
|
@@ -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 '../third_party/github.com/Microsoft/TypeScript/lib/typescript';
|
|
3
10
|
export declare function findBootstrapModuleCall(host: Tree, mainPath: string): ts.CallExpression | null;
|
package/utility/ng-ast-utils.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
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");
|
|
@@ -26,8 +26,9 @@ function findBootstrapModuleCall(host, mainPath) {
|
|
|
26
26
|
let bootstrapCallNode = null;
|
|
27
27
|
bootstrapCallNode = ast_utils_1.findNode(node, ts.SyntaxKind.Identifier, 'bootstrapModule');
|
|
28
28
|
// Walk up the parent until CallExpression is found.
|
|
29
|
-
while (bootstrapCallNode &&
|
|
30
|
-
|
|
29
|
+
while (bootstrapCallNode &&
|
|
30
|
+
bootstrapCallNode.parent &&
|
|
31
|
+
bootstrapCallNode.parent.kind !== ts.SyntaxKind.CallExpression) {
|
|
31
32
|
bootstrapCallNode = bootstrapCallNode.parent;
|
|
32
33
|
}
|
|
33
34
|
if (bootstrapCallNode !== null &&
|
|
@@ -55,10 +56,10 @@ function findBootstrapModulePath(host, mainPath) {
|
|
|
55
56
|
const allNodes = ast_utils_1.getSourceNodes(source);
|
|
56
57
|
const bootstrapModuleRelativePath = allNodes
|
|
57
58
|
.filter(ts.isImportDeclaration)
|
|
58
|
-
.filter(imp => {
|
|
59
|
+
.filter((imp) => {
|
|
59
60
|
return ast_utils_1.findNode(imp, ts.SyntaxKind.Identifier, bootstrapModule.getText());
|
|
60
61
|
})
|
|
61
|
-
.map(imp => {
|
|
62
|
+
.map((imp) => {
|
|
62
63
|
const modulePathStringLiteral = imp.moduleSpecifier;
|
|
63
64
|
return modulePathStringLiteral.text;
|
|
64
65
|
})[0];
|
package/utility/parse-name.d.ts
CHANGED
package/utility/parse-name.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.parseName = 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.parseName = void 0;
|
|
11
11
|
// import { relative, Path } from "../../../angular_devkit/core/src/virtual-fs";
|
|
12
12
|
const core_1 = require("@angular-devkit/core");
|
|
13
13
|
function parseName(path, name) {
|
package/utility/paths.d.ts
CHANGED
package/utility/paths.js
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
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
|
+
*/
|
|
2
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
10
|
exports.createAppModule = void 0;
|
|
4
11
|
function createAppModule(tree, path) {
|
|
@@ -1,4 +1,11 @@
|
|
|
1
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
|
+
*/
|
|
2
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
10
|
exports.getFileContent = void 0;
|
|
4
11
|
function getFileContent(tree, path) {
|
package/utility/test/index.d.ts
CHANGED
package/utility/test/index.js
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
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
|
+
*/
|
|
2
9
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
10
|
if (k2 === undefined) k2 = k;
|
|
4
11
|
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
@@ -10,12 +17,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
10
17
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
18
|
};
|
|
12
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
/**
|
|
14
|
-
* @license
|
|
15
|
-
* Copyright Google Inc. All Rights Reserved.
|
|
16
|
-
*
|
|
17
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
18
|
-
* found in the LICENSE file at https://angular.io/license
|
|
19
|
-
*/
|
|
20
20
|
__exportStar(require("./create-app-module"), exports);
|
|
21
21
|
__exportStar(require("./get-file-content"), exports);
|
package/utility/validation.d.ts
CHANGED
|
@@ -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
|
export declare function validateName(name: string): void;
|
|
2
9
|
export declare const htmlSelectorRe: RegExp;
|
|
3
10
|
export declare function validateHtmlSelector(selector: string): void;
|
package/utility/validation.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.validateProjectName = exports.validateHtmlSelector = exports.htmlSelectorRe = exports.validateName = 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.validateProjectName = exports.validateHtmlSelector = exports.htmlSelectorRe = exports.validateName = void 0;
|
|
11
11
|
const core_1 = require("@angular-devkit/core");
|
|
12
12
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
13
13
|
function validateName(name) {
|
|
@@ -63,11 +63,11 @@ function getRegExpFailPosition(str) {
|
|
|
63
63
|
const parts = str.indexOf('-') >= 0 ? str.split('-') : [str];
|
|
64
64
|
const matched = [];
|
|
65
65
|
const projectNameRegexp = /^[a-zA-Z][.0-9a-zA-Z]*(-[.0-9a-zA-Z]*)*$/;
|
|
66
|
-
parts.forEach(part => {
|
|
66
|
+
parts.forEach((part) => {
|
|
67
67
|
if (part.match(projectNameRegexp)) {
|
|
68
68
|
matched.push(part);
|
|
69
69
|
}
|
|
70
70
|
});
|
|
71
71
|
const compare = matched.join('-');
|
|
72
|
-
return
|
|
72
|
+
return str !== compare ? compare.length : null;
|
|
73
73
|
}
|
|
@@ -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
|
|
@@ -123,8 +123,8 @@ export interface WorkspaceSchema {
|
|
|
123
123
|
}
|
|
124
124
|
export interface WorkspaceProject<TProjectType extends ProjectType = ProjectType.Application> {
|
|
125
125
|
/**
|
|
126
|
-
|
|
127
|
-
|
|
126
|
+
* Project type.
|
|
127
|
+
*/
|
|
128
128
|
projectType: ProjectType;
|
|
129
129
|
root: string;
|
|
130
130
|
sourceRoot: string;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Builders = exports.ProjectType = 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.Builders = exports.ProjectType = void 0;
|
|
11
11
|
var ProjectType;
|
|
12
12
|
(function (ProjectType) {
|
|
13
13
|
ProjectType["Application"] = "application";
|
package/utility/workspace.d.ts
CHANGED
package/utility/workspace.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.allTargetOptions = exports.allWorkspaceTargets = exports.createDefaultPath = exports.buildDefaultPath = exports.getWorkspace = exports.updateWorkspace = 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.allTargetOptions = exports.allWorkspaceTargets = exports.createDefaultPath = exports.buildDefaultPath = exports.getWorkspace = exports.updateWorkspace = void 0;
|
|
11
11
|
const core_1 = require("@angular-devkit/core");
|
|
12
12
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
13
13
|
const workspace_models_1 = require("./workspace-models");
|
package/web-worker/index.d.ts
CHANGED
|
@@ -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 { Rule } from '@angular-devkit/schematics';
|
|
2
9
|
import { Schema as WebWorkerOptions } from './schema';
|
|
3
10
|
export default function (options: WebWorkerOptions): Rule;
|
package/web-worker/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
2
|
/**
|
|
4
3
|
* @license
|
|
5
|
-
* Copyright Google
|
|
4
|
+
* Copyright Google LLC All Rights Reserved.
|
|
6
5
|
*
|
|
7
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
8
7
|
* found in the LICENSE file at https://angular.io/license
|
|
9
8
|
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
const core_1 = require("@angular-devkit/core");
|
|
11
11
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
12
12
|
const json_file_1 = require("../utility/json-file");
|
|
@@ -44,10 +44,11 @@ function addSnippet(options) {
|
|
|
44
44
|
return;
|
|
45
45
|
}
|
|
46
46
|
const fileRegExp = new RegExp(`^${options.name}.*\.ts`);
|
|
47
|
-
const siblingModules = host
|
|
48
|
-
|
|
47
|
+
const siblingModules = host
|
|
48
|
+
.getDir(options.path)
|
|
49
|
+
.subfiles // Find all files that start with the same name, are ts files,
|
|
49
50
|
// and aren't spec or module files.
|
|
50
|
-
.filter(f => fileRegExp.test(f) && !/(module|spec)\.ts$/.test(f))
|
|
51
|
+
.filter((f) => fileRegExp.test(f) && !/(module|spec)\.ts$/.test(f))
|
|
51
52
|
// Sort alphabetically for consistency.
|
|
52
53
|
.sort();
|
|
53
54
|
if (siblingModules.length === 0) {
|
|
@@ -96,7 +97,8 @@ function default_1(options) {
|
|
|
96
97
|
if (!projectTarget) {
|
|
97
98
|
throw new Error(`Target is not defined for this project.`);
|
|
98
99
|
}
|
|
99
|
-
const projectTargetOptions = (projectTarget.options ||
|
|
100
|
+
const projectTargetOptions = (projectTarget.options ||
|
|
101
|
+
{});
|
|
100
102
|
if (options.path === undefined) {
|
|
101
103
|
options.path = workspace_1.buildDefaultPath(project);
|
|
102
104
|
}
|
package/web-worker/schema.json
CHANGED
|
@@ -6,8 +6,7 @@
|
|
|
6
6
|
"start": "ng serve",
|
|
7
7
|
"build": "ng build",
|
|
8
8
|
"watch": "ng build --watch --configuration development"<% if (!minimal) { %>,
|
|
9
|
-
"test": "ng test"
|
|
10
|
-
"lint": "ng lint"<% } %>
|
|
9
|
+
"test": "ng test"<% } %>
|
|
11
10
|
},
|
|
12
11
|
"private": true,
|
|
13
12
|
"dependencies": {
|
|
@@ -29,13 +28,11 @@
|
|
|
29
28
|
"@types/jasmine": "~3.6.0",<% } %>
|
|
30
29
|
"@types/node": "^12.11.1",<% if (!minimal) { %>
|
|
31
30
|
"jasmine-core": "~3.7.0",
|
|
32
|
-
"jasmine-spec-reporter": "~7.0.0",
|
|
33
31
|
"karma": "~6.3.0",
|
|
34
32
|
"karma-chrome-launcher": "~3.1.0",
|
|
35
33
|
"karma-coverage": "~2.0.3",
|
|
36
34
|
"karma-jasmine": "~4.0.0",
|
|
37
|
-
"karma-jasmine-html-reporter": "^1.5.0"
|
|
38
|
-
"ts-node": "~9.1.1",<% } %>
|
|
35
|
+
"karma-jasmine-html-reporter": "^1.5.0",<% } %>
|
|
39
36
|
"typescript": "<%= latestVersions.TypeScript %>"
|
|
40
37
|
}
|
|
41
38
|
}
|
package/workspace/index.d.ts
CHANGED
|
@@ -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 { Rule } from '@angular-devkit/schematics';
|
|
2
9
|
import { Schema as WorkspaceOptions } from './schema';
|
|
3
10
|
export default function (options: WorkspaceOptions): Rule;
|
package/workspace/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
2
|
/**
|
|
4
3
|
* @license
|
|
5
|
-
* Copyright Google
|
|
4
|
+
* Copyright Google LLC All Rights Reserved.
|
|
6
5
|
*
|
|
7
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
8
7
|
* found in the LICENSE file at https://angular.io/license
|
|
9
8
|
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
const core_1 = require("@angular-devkit/core");
|
|
11
11
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
12
12
|
const latest_versions_1 = require("../utility/latest-versions");
|
|
13
13
|
function default_1(options) {
|
|
14
14
|
return schematics_1.mergeWith(schematics_1.apply(schematics_1.url('./files'), [
|
|
15
|
-
options.minimal ? schematics_1.filter(path => !path.endsWith('editorconfig.template')) : schematics_1.noop(),
|
|
15
|
+
options.minimal ? schematics_1.filter((path) => !path.endsWith('editorconfig.template')) : schematics_1.noop(),
|
|
16
16
|
schematics_1.applyTemplates({
|
|
17
17
|
utils: core_1.strings,
|
|
18
18
|
...options,
|