@angular-devkit/schematics 18.1.1 → 18.2.0-next.1
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/package.json +2 -2
- package/src/engine/engine.js +5 -6
- package/src/rules/template.js +3 -2
- package/src/tree/action.js +2 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-devkit/schematics",
|
|
3
|
-
"version": "18.
|
|
3
|
+
"version": "18.2.0-next.1",
|
|
4
4
|
"description": "Angular Schematics - Library",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"typings": "src/index.d.ts",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"tooling"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@angular-devkit/core": "18.
|
|
21
|
+
"@angular-devkit/core": "18.2.0-next.1",
|
|
22
22
|
"jsonc-parser": "3.3.1",
|
|
23
23
|
"magic-string": "0.30.10",
|
|
24
24
|
"ora": "5.4.1",
|
package/src/engine/engine.js
CHANGED
|
@@ -273,13 +273,12 @@ class SchematicEngine {
|
|
|
273
273
|
return () => new null_1.NullTree();
|
|
274
274
|
case 'empty:':
|
|
275
275
|
return () => (0, static_1.empty)();
|
|
276
|
-
default:
|
|
277
|
-
const hostSource = this._host.createSourceFromUrl(url, context);
|
|
278
|
-
if (!hostSource) {
|
|
279
|
-
throw new UnknownUrlSourceProtocol(url.toString());
|
|
280
|
-
}
|
|
281
|
-
return hostSource;
|
|
282
276
|
}
|
|
277
|
+
const hostSource = this._host.createSourceFromUrl(url, context);
|
|
278
|
+
if (!hostSource) {
|
|
279
|
+
throw new UnknownUrlSourceProtocol(url.toString());
|
|
280
|
+
}
|
|
281
|
+
return hostSource;
|
|
283
282
|
}
|
|
284
283
|
executePostTasks() {
|
|
285
284
|
const executors = new Map();
|
package/src/rules/template.js
CHANGED
|
@@ -105,11 +105,12 @@ function applyPathTemplate(data, options = {
|
|
|
105
105
|
if (!(pipe in data)) {
|
|
106
106
|
throw new UnknownPipeException(pipe);
|
|
107
107
|
}
|
|
108
|
-
|
|
108
|
+
const pipeFn = data[pipe];
|
|
109
|
+
if (typeof pipeFn != 'function') {
|
|
109
110
|
throw new InvalidPipeException(pipe);
|
|
110
111
|
}
|
|
111
112
|
// Coerce to string.
|
|
112
|
-
return '' +
|
|
113
|
+
return '' + pipeFn(acc);
|
|
113
114
|
}, '' + replacement);
|
|
114
115
|
}
|
|
115
116
|
path = path.substring(0, start) + replacement + path.substring(end + ieL);
|
package/src/tree/action.js
CHANGED
|
@@ -59,7 +59,7 @@ class ActionList {
|
|
|
59
59
|
case 'd':
|
|
60
60
|
toDelete.add(action.path);
|
|
61
61
|
break;
|
|
62
|
-
case 'r':
|
|
62
|
+
case 'r': {
|
|
63
63
|
const maybeCreate = toCreate.get(action.path);
|
|
64
64
|
const maybeOverwrite = toOverwrite.get(action.path);
|
|
65
65
|
if (maybeCreate) {
|
|
@@ -84,6 +84,7 @@ class ActionList {
|
|
|
84
84
|
toRename.set(action.path, action.to);
|
|
85
85
|
}
|
|
86
86
|
break;
|
|
87
|
+
}
|
|
87
88
|
}
|
|
88
89
|
}
|
|
89
90
|
this._actions = [];
|