@angular/cli 13.3.3 → 13.3.6
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.
|
@@ -36,6 +36,7 @@ const schematics_1 = require("@angular-devkit/schematics");
|
|
|
36
36
|
const tools_1 = require("@angular-devkit/schematics/tools");
|
|
37
37
|
const inquirer = __importStar(require("inquirer"));
|
|
38
38
|
const systemPath = __importStar(require("path"));
|
|
39
|
+
const path_1 = require("path");
|
|
39
40
|
const color_1 = require("../utilities/color");
|
|
40
41
|
const config_1 = require("../utilities/config");
|
|
41
42
|
const json_schema_1 = require("../utilities/json-schema");
|
|
@@ -303,19 +304,23 @@ class SchematicCommand extends command_1.Command {
|
|
|
303
304
|
return (this._workflow = workflow);
|
|
304
305
|
}
|
|
305
306
|
async getDefaultSchematicCollection() {
|
|
307
|
+
// Resolve relative collections from the location of `angular.json`
|
|
308
|
+
const resolveRelativeCollection = (collectionName) => collectionName.charAt(0) === '.'
|
|
309
|
+
? (0, path_1.resolve)(this.context.root, collectionName)
|
|
310
|
+
: collectionName;
|
|
306
311
|
let workspace = await (0, config_1.getWorkspace)('local');
|
|
307
312
|
if (workspace) {
|
|
308
313
|
const project = (0, config_1.getProjectByCwd)(workspace);
|
|
309
314
|
if (project && workspace.getProjectCli(project)) {
|
|
310
315
|
const value = workspace.getProjectCli(project)['defaultCollection'];
|
|
311
316
|
if (typeof value == 'string') {
|
|
312
|
-
return value;
|
|
317
|
+
return resolveRelativeCollection(value);
|
|
313
318
|
}
|
|
314
319
|
}
|
|
315
320
|
if (workspace.getCli()) {
|
|
316
321
|
const value = workspace.getCli()['defaultCollection'];
|
|
317
322
|
if (typeof value == 'string') {
|
|
318
|
-
return value;
|
|
323
|
+
return resolveRelativeCollection(value);
|
|
319
324
|
}
|
|
320
325
|
}
|
|
321
326
|
}
|
|
@@ -323,7 +328,7 @@ class SchematicCommand extends command_1.Command {
|
|
|
323
328
|
if (workspace && workspace.getCli()) {
|
|
324
329
|
const value = workspace.getCli()['defaultCollection'];
|
|
325
330
|
if (typeof value == 'string') {
|
|
326
|
-
return value;
|
|
331
|
+
return resolveRelativeCollection(value);
|
|
327
332
|
}
|
|
328
333
|
}
|
|
329
334
|
return this.defaultCollectionName;
|
|
@@ -151,7 +151,9 @@ function wrap(schematicFile, schematicDirectory, moduleCache, exportName) {
|
|
|
151
151
|
const schematicCode = (0, fs_1.readFileSync)(schematicFile, 'utf8');
|
|
152
152
|
// `module` is required due to @angular/localize ng-add being in UMD format
|
|
153
153
|
const headerCode = '(function() {\nvar exports = {};\nvar module = { exports };\n';
|
|
154
|
-
const footerCode = exportName
|
|
154
|
+
const footerCode = exportName
|
|
155
|
+
? `\nreturn module.exports['${exportName}'];});`
|
|
156
|
+
: '\nreturn module.exports;});';
|
|
155
157
|
const script = new vm_1.Script(headerCode + schematicCode + footerCode, {
|
|
156
158
|
filename: schematicFile,
|
|
157
159
|
lineOffset: 3,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/cli",
|
|
3
|
-
"version": "13.3.
|
|
3
|
+
"version": "13.3.6",
|
|
4
4
|
"description": "CLI tool for Angular",
|
|
5
5
|
"main": "lib/cli/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
},
|
|
29
29
|
"homepage": "https://github.com/angular/angular-cli",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@angular-devkit/architect": "0.1303.
|
|
32
|
-
"@angular-devkit/core": "13.3.
|
|
33
|
-
"@angular-devkit/schematics": "13.3.
|
|
34
|
-
"@schematics/angular": "13.3.
|
|
31
|
+
"@angular-devkit/architect": "0.1303.6",
|
|
32
|
+
"@angular-devkit/core": "13.3.6",
|
|
33
|
+
"@angular-devkit/schematics": "13.3.6",
|
|
34
|
+
"@schematics/angular": "13.3.6",
|
|
35
35
|
"@yarnpkg/lockfile": "1.1.0",
|
|
36
36
|
"ansi-colors": "4.1.1",
|
|
37
37
|
"debug": "4.3.3",
|
|
@@ -51,12 +51,12 @@
|
|
|
51
51
|
"ng-update": {
|
|
52
52
|
"migrations": "@schematics/angular/migrations/migration-collection.json",
|
|
53
53
|
"packageGroup": {
|
|
54
|
-
"@angular/cli": "13.3.
|
|
55
|
-
"@angular-devkit/architect": "0.1303.
|
|
56
|
-
"@angular-devkit/build-angular": "13.3.
|
|
57
|
-
"@angular-devkit/build-webpack": "0.1303.
|
|
58
|
-
"@angular-devkit/core": "13.3.
|
|
59
|
-
"@angular-devkit/schematics": "13.3.
|
|
54
|
+
"@angular/cli": "13.3.6",
|
|
55
|
+
"@angular-devkit/architect": "0.1303.6",
|
|
56
|
+
"@angular-devkit/build-angular": "13.3.6",
|
|
57
|
+
"@angular-devkit/build-webpack": "0.1303.6",
|
|
58
|
+
"@angular-devkit/core": "13.3.6",
|
|
59
|
+
"@angular-devkit/schematics": "13.3.6"
|
|
60
60
|
}
|
|
61
61
|
},
|
|
62
62
|
"engines": {
|