@angular-devkit/schematics 18.1.0-next.0 → 18.1.0-next.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.
- package/package.json +12 -3
- package/src/engine/engine.d.ts +3 -4
- package/src/engine/engine.js +1 -1
- package/src/engine/index.d.ts +1 -1
- package/src/engine/index.js +1 -1
- package/src/engine/interface.d.ts +1 -2
- package/src/engine/interface.js +1 -1
- package/src/engine/schematic.d.ts +1 -1
- package/src/engine/schematic.js +1 -1
- package/src/exception/exception.d.ts +1 -1
- package/src/exception/exception.js +1 -1
- package/src/formats/format-validator.d.ts +1 -1
- package/src/formats/format-validator.js +2 -3
- package/src/formats/html-selector.d.ts +1 -1
- package/src/formats/html-selector.js +1 -1
- package/src/formats/index.d.ts +1 -1
- package/src/formats/index.js +1 -1
- package/src/formats/path.d.ts +1 -1
- package/src/formats/path.js +1 -1
- package/src/index.d.ts +1 -1
- package/src/index.js +1 -1
- package/src/rules/base.d.ts +1 -1
- package/src/rules/base.js +15 -16
- package/src/rules/call.d.ts +1 -1
- package/src/rules/call.js +4 -4
- package/src/rules/move.d.ts +1 -1
- package/src/rules/move.js +2 -3
- package/src/rules/random.d.ts +1 -1
- package/src/rules/random.js +2 -2
- package/src/rules/schematic.d.ts +1 -1
- package/src/rules/schematic.js +3 -4
- package/src/rules/template.d.ts +1 -1
- package/src/rules/template.js +9 -9
- package/src/rules/url.d.ts +1 -1
- package/src/rules/url.js +2 -3
- package/src/sink/dryrun.d.ts +1 -2
- package/src/sink/dryrun.js +1 -1
- package/src/sink/host.d.ts +1 -2
- package/src/sink/host.js +1 -1
- package/src/sink/sink.d.ts +1 -2
- package/src/sink/sink.js +1 -1
- package/src/tree/action.d.ts +1 -2
- package/src/tree/action.js +3 -3
- package/src/tree/delegate.d.ts +1 -2
- package/src/tree/delegate.js +1 -1
- package/src/tree/empty.d.ts +1 -1
- package/src/tree/empty.js +1 -1
- package/src/tree/entry.d.ts +1 -2
- package/src/tree/entry.js +1 -1
- package/src/tree/host-tree.d.ts +1 -2
- package/src/tree/host-tree.js +1 -1
- package/src/tree/interface.d.ts +1 -2
- package/src/tree/interface.js +1 -1
- package/src/tree/null.d.ts +1 -2
- package/src/tree/null.js +1 -1
- package/src/tree/recorder.d.ts +1 -2
- package/src/tree/recorder.js +1 -1
- package/src/tree/scoped.d.ts +1 -2
- package/src/tree/scoped.js +1 -1
- package/src/tree/static.d.ts +1 -1
- package/src/tree/static.js +5 -6
- package/src/workflow/base.d.ts +1 -1
- package/src/workflow/base.js +1 -1
- package/src/workflow/index.d.ts +1 -1
- package/src/workflow/index.js +1 -1
- package/src/workflow/interface.d.ts +1 -1
- package/src/workflow/interface.js +1 -1
- package/tasks/index.d.ts +1 -1
- package/tasks/index.js +1 -1
- package/tasks/node/index.d.ts +1 -1
- package/tasks/node/index.js +1 -1
- package/tasks/package-manager/executor.d.ts +1 -1
- package/tasks/package-manager/executor.js +2 -2
- package/tasks/package-manager/install-task.d.ts +1 -1
- package/tasks/package-manager/install-task.js +1 -1
- package/tasks/package-manager/link-task.d.ts +1 -1
- package/tasks/package-manager/link-task.js +1 -1
- package/tasks/package-manager/options.d.ts +1 -1
- package/tasks/package-manager/options.js +1 -1
- package/tasks/repo-init/executor.d.ts +1 -1
- package/tasks/repo-init/executor.js +2 -2
- package/tasks/repo-init/init-task.d.ts +1 -1
- package/tasks/repo-init/init-task.js +1 -1
- package/tasks/repo-init/options.d.ts +1 -1
- package/tasks/repo-init/options.js +1 -1
- package/tasks/run-schematic/executor.d.ts +1 -1
- package/tasks/run-schematic/executor.js +2 -2
- package/tasks/run-schematic/options.d.ts +1 -1
- package/tasks/run-schematic/options.js +1 -1
- package/tasks/run-schematic/task.d.ts +1 -1
- package/tasks/run-schematic/task.js +1 -1
- package/testing/index.d.ts +1 -1
- package/testing/index.js +1 -1
- package/testing/schematic-test-runner.d.ts +1 -1
- package/testing/schematic-test-runner.js +1 -1
- package/tools/description.d.ts +1 -1
- package/tools/description.js +1 -1
- package/tools/export-ref.d.ts +1 -1
- package/tools/export-ref.js +1 -1
- package/tools/fallback-engine-host.d.ts +1 -2
- package/tools/fallback-engine-host.js +1 -1
- package/tools/file-system-engine-host-base.d.ts +1 -2
- package/tools/file-system-engine-host-base.js +1 -1
- package/tools/file-system-engine-host.d.ts +1 -1
- package/tools/file-system-engine-host.js +1 -1
- package/tools/file-system-utility.d.ts +1 -1
- package/tools/file-system-utility.js +2 -3
- package/tools/index.d.ts +1 -1
- package/tools/index.js +1 -1
- package/tools/node-module-engine-host.d.ts +1 -1
- package/tools/node-module-engine-host.js +1 -1
- package/tools/node-modules-test-engine-host.d.ts +1 -1
- package/tools/node-modules-test-engine-host.js +1 -1
- package/tools/schema-option-transform.d.ts +1 -1
- package/tools/schema-option-transform.js +3 -3
- package/tools/workflow/node-workflow.d.ts +1 -1
- package/tools/workflow/node-workflow.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-devkit/schematics",
|
|
3
|
-
"version": "18.1.0-next.
|
|
3
|
+
"version": "18.1.0-next.2",
|
|
4
4
|
"description": "Angular Schematics - Library",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"typings": "src/index.d.ts",
|
|
@@ -18,12 +18,13 @@
|
|
|
18
18
|
"tooling"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@angular-devkit/core": "18.1.0-next.
|
|
21
|
+
"@angular-devkit/core": "18.1.0-next.2",
|
|
22
22
|
"jsonc-parser": "3.2.1",
|
|
23
23
|
"magic-string": "0.30.10",
|
|
24
24
|
"ora": "5.4.1",
|
|
25
25
|
"rxjs": "7.8.1"
|
|
26
26
|
},
|
|
27
|
+
"packageManager": "yarn@4.2.2",
|
|
27
28
|
"repository": {
|
|
28
29
|
"type": "git",
|
|
29
30
|
"url": "https://github.com/angular/angular-cli.git"
|
|
@@ -38,5 +39,13 @@
|
|
|
38
39
|
"bugs": {
|
|
39
40
|
"url": "https://github.com/angular/angular-cli/issues"
|
|
40
41
|
},
|
|
41
|
-
"homepage": "https://github.com/angular/angular-cli"
|
|
42
|
+
"homepage": "https://github.com/angular/angular-cli",
|
|
43
|
+
"dependenciesMeta": {
|
|
44
|
+
"esbuild": {
|
|
45
|
+
"built": true
|
|
46
|
+
},
|
|
47
|
+
"puppeteer": {
|
|
48
|
+
"built": true
|
|
49
|
+
}
|
|
50
|
+
}
|
|
42
51
|
}
|
package/src/engine/engine.d.ts
CHANGED
|
@@ -3,9 +3,8 @@
|
|
|
3
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
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
|
-
/// <reference types="node" />
|
|
9
8
|
import { BaseException } from '@angular-devkit/core';
|
|
10
9
|
import { Observable } from 'rxjs';
|
|
11
10
|
import { Url } from 'url';
|
|
@@ -39,8 +38,8 @@ export declare class UnknownTaskDependencyException extends BaseException {
|
|
|
39
38
|
export declare class CollectionImpl<CollectionT extends object, SchematicT extends object> implements Collection<CollectionT, SchematicT> {
|
|
40
39
|
private _description;
|
|
41
40
|
private _engine;
|
|
42
|
-
readonly baseDescriptions?: CollectionDescription<CollectionT
|
|
43
|
-
constructor(_description: CollectionDescription<CollectionT>, _engine: SchematicEngine<CollectionT, SchematicT>, baseDescriptions?: CollectionDescription<CollectionT
|
|
41
|
+
readonly baseDescriptions?: Array<CollectionDescription<CollectionT>> | undefined;
|
|
42
|
+
constructor(_description: CollectionDescription<CollectionT>, _engine: SchematicEngine<CollectionT, SchematicT>, baseDescriptions?: Array<CollectionDescription<CollectionT>> | undefined);
|
|
44
43
|
get description(): CollectionDescription<CollectionT>;
|
|
45
44
|
get name(): string;
|
|
46
45
|
createSchematic(name: string, allowPrivate?: boolean): Schematic<CollectionT, SchematicT>;
|
package/src/engine/engine.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
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
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.SchematicEngine = exports.TaskScheduler = exports.CollectionImpl = exports.UnknownTaskDependencyException = exports.UnregisteredTaskException = exports.SchematicEngineConflictingException = exports.PrivateSchematicException = exports.UnknownSchematicException = exports.CircularCollectionException = exports.UnknownCollectionException = exports.UnknownUrlSourceProtocol = void 0;
|
package/src/engine/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
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
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
export * from './engine';
|
|
9
9
|
export * from './interface';
|
package/src/engine/index.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
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
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
@@ -3,9 +3,8 @@
|
|
|
3
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
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
|
-
/// <reference types="node" />
|
|
9
8
|
import { logging } from '@angular-devkit/core';
|
|
10
9
|
import { Observable } from 'rxjs';
|
|
11
10
|
import { Url } from 'url';
|
package/src/engine/interface.js
CHANGED
|
@@ -4,6 +4,6 @@
|
|
|
4
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
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -3,7 +3,7 @@
|
|
|
3
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
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
import { BaseException } from '@angular-devkit/core';
|
|
9
9
|
import { Observable } from 'rxjs';
|
package/src/engine/schematic.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
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
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.SchematicImpl = exports.InvalidSchematicsNameException = void 0;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
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
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
import { BaseException } from '@angular-devkit/core';
|
|
9
9
|
export declare class SchematicsException extends BaseException {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
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
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.UnimplementedException = exports.UnsuccessfulWorkflowExecution = exports.MergeConflictException = exports.InvalidUpdateRecordException = exports.ContentHasMutatedException = exports.FileAlreadyExistException = exports.FileDoesNotExistException = exports.SchematicsException = void 0;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
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
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
import { JsonObject, JsonValue, schema } from '@angular-devkit/core';
|
|
9
9
|
export declare function formatValidator(data: JsonValue, dataSchema: JsonObject, formats: schema.SchemaFormat[]): Promise<schema.SchemaValidatorResult>;
|
|
@@ -4,10 +4,10 @@
|
|
|
4
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
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.formatValidator =
|
|
10
|
+
exports.formatValidator = formatValidator;
|
|
11
11
|
const core_1 = require("@angular-devkit/core");
|
|
12
12
|
async function formatValidator(data, dataSchema, formats) {
|
|
13
13
|
const registry = new core_1.schema.CoreSchemaRegistry();
|
|
@@ -17,4 +17,3 @@ async function formatValidator(data, dataSchema, formats) {
|
|
|
17
17
|
const validator = await registry.compile(dataSchema);
|
|
18
18
|
return validator(data);
|
|
19
19
|
}
|
|
20
|
-
exports.formatValidator = formatValidator;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
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
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
import { schema } from '@angular-devkit/core';
|
|
9
9
|
export declare const htmlSelectorFormat: schema.SchemaFormat;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
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
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.htmlSelectorFormat = void 0;
|
package/src/formats/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
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
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
import { schema } from '@angular-devkit/core';
|
|
9
9
|
export { htmlSelectorFormat } from './html-selector';
|
package/src/formats/index.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
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
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.standardFormats = exports.pathFormat = exports.htmlSelectorFormat = void 0;
|
package/src/formats/path.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
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
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
import { schema } from '@angular-devkit/core';
|
|
9
9
|
export declare const pathFormat: schema.SchemaFormat;
|
package/src/formats/path.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
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
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.pathFormat = void 0;
|
package/src/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
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
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
import { strings } from '@angular-devkit/core';
|
|
9
9
|
import * as formats from './formats/index';
|
package/src/index.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
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
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
package/src/rules/base.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
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
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
import { FileOperator, Rule, Source } from '../engine/interface';
|
|
9
9
|
import { FilePredicate, MergeStrategy, Tree } from '../tree/interface';
|
package/src/rules/base.js
CHANGED
|
@@ -4,10 +4,23 @@
|
|
|
4
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
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.
|
|
10
|
+
exports.source = source;
|
|
11
|
+
exports.empty = empty;
|
|
12
|
+
exports.chain = chain;
|
|
13
|
+
exports.apply = apply;
|
|
14
|
+
exports.mergeWith = mergeWith;
|
|
15
|
+
exports.noop = noop;
|
|
16
|
+
exports.filter = filter;
|
|
17
|
+
exports.asSource = asSource;
|
|
18
|
+
exports.branchAndMerge = branchAndMerge;
|
|
19
|
+
exports.when = when;
|
|
20
|
+
exports.partitionApplyMerge = partitionApplyMerge;
|
|
21
|
+
exports.forEach = forEach;
|
|
22
|
+
exports.composeFileOperators = composeFileOperators;
|
|
23
|
+
exports.applyToSubtree = applyToSubtree;
|
|
11
24
|
const rxjs_1 = require("rxjs");
|
|
12
25
|
const exception_1 = require("../exception/exception");
|
|
13
26
|
const host_tree_1 = require("../tree/host-tree");
|
|
@@ -21,14 +34,12 @@ const call_1 = require("./call");
|
|
|
21
34
|
function source(tree) {
|
|
22
35
|
return () => tree;
|
|
23
36
|
}
|
|
24
|
-
exports.source = source;
|
|
25
37
|
/**
|
|
26
38
|
* A source that returns an empty tree.
|
|
27
39
|
*/
|
|
28
40
|
function empty() {
|
|
29
41
|
return () => (0, static_1.empty)();
|
|
30
42
|
}
|
|
31
|
-
exports.empty = empty;
|
|
32
43
|
/**
|
|
33
44
|
* Chain multiple rules into a single rule.
|
|
34
45
|
*/
|
|
@@ -41,14 +52,12 @@ function chain(rules) {
|
|
|
41
52
|
return () => intermediateTree;
|
|
42
53
|
};
|
|
43
54
|
}
|
|
44
|
-
exports.chain = chain;
|
|
45
55
|
/**
|
|
46
56
|
* Apply multiple rules to a source, and returns the source transformed.
|
|
47
57
|
*/
|
|
48
58
|
function apply(source, rules) {
|
|
49
59
|
return (context) => (0, call_1.callRule)(chain(rules), (0, call_1.callSource)(source, context), context);
|
|
50
60
|
}
|
|
51
|
-
exports.apply = apply;
|
|
52
61
|
/**
|
|
53
62
|
* Merge an input tree with the source passed in.
|
|
54
63
|
*/
|
|
@@ -57,11 +66,9 @@ function mergeWith(source, strategy = interface_1.MergeStrategy.Default) {
|
|
|
57
66
|
return (0, call_1.callSource)(source, context).pipe((0, rxjs_1.map)((sourceTree) => tree.merge(sourceTree, strategy || context.strategy)), (0, rxjs_1.mapTo)(tree));
|
|
58
67
|
};
|
|
59
68
|
}
|
|
60
|
-
exports.mergeWith = mergeWith;
|
|
61
69
|
function noop() {
|
|
62
70
|
return () => { };
|
|
63
71
|
}
|
|
64
|
-
exports.noop = noop;
|
|
65
72
|
function filter(predicate) {
|
|
66
73
|
return (tree) => {
|
|
67
74
|
if (host_tree_1.HostTree.isHostTree(tree)) {
|
|
@@ -72,17 +79,14 @@ function filter(predicate) {
|
|
|
72
79
|
}
|
|
73
80
|
};
|
|
74
81
|
}
|
|
75
|
-
exports.filter = filter;
|
|
76
82
|
function asSource(rule) {
|
|
77
83
|
return (context) => (0, call_1.callRule)(rule, (0, static_1.empty)(), context);
|
|
78
84
|
}
|
|
79
|
-
exports.asSource = asSource;
|
|
80
85
|
function branchAndMerge(rule, strategy = interface_1.MergeStrategy.Default) {
|
|
81
86
|
return (tree, context) => {
|
|
82
87
|
return (0, call_1.callRule)(rule, tree.branch(), context).pipe((0, rxjs_1.map)((branch) => tree.merge(branch, strategy || context.strategy)), (0, rxjs_1.mapTo)(tree));
|
|
83
88
|
};
|
|
84
89
|
}
|
|
85
|
-
exports.branchAndMerge = branchAndMerge;
|
|
86
90
|
function when(predicate, operator) {
|
|
87
91
|
return (entry) => {
|
|
88
92
|
if (predicate(entry.path, entry)) {
|
|
@@ -93,7 +97,6 @@ function when(predicate, operator) {
|
|
|
93
97
|
}
|
|
94
98
|
};
|
|
95
99
|
}
|
|
96
|
-
exports.when = when;
|
|
97
100
|
function partitionApplyMerge(predicate, ruleYes, ruleNo) {
|
|
98
101
|
return (tree, context) => {
|
|
99
102
|
const [yes, no] = (0, static_1.partition)(tree, predicate);
|
|
@@ -103,7 +106,6 @@ function partitionApplyMerge(predicate, ruleYes, ruleNo) {
|
|
|
103
106
|
}));
|
|
104
107
|
};
|
|
105
108
|
}
|
|
106
|
-
exports.partitionApplyMerge = partitionApplyMerge;
|
|
107
109
|
function forEach(operator) {
|
|
108
110
|
return (tree) => {
|
|
109
111
|
tree.visit((path, entry) => {
|
|
@@ -127,7 +129,6 @@ function forEach(operator) {
|
|
|
127
129
|
});
|
|
128
130
|
};
|
|
129
131
|
}
|
|
130
|
-
exports.forEach = forEach;
|
|
131
132
|
function composeFileOperators(operators) {
|
|
132
133
|
return (entry) => {
|
|
133
134
|
let current = entry;
|
|
@@ -141,7 +142,6 @@ function composeFileOperators(operators) {
|
|
|
141
142
|
return current;
|
|
142
143
|
};
|
|
143
144
|
}
|
|
144
|
-
exports.composeFileOperators = composeFileOperators;
|
|
145
145
|
function applyToSubtree(path, rules) {
|
|
146
146
|
return (tree, context) => {
|
|
147
147
|
const scoped = new scoped_1.ScopedTree(tree, path);
|
|
@@ -155,4 +155,3 @@ function applyToSubtree(path, rules) {
|
|
|
155
155
|
}));
|
|
156
156
|
};
|
|
157
157
|
}
|
|
158
|
-
exports.applyToSubtree = applyToSubtree;
|
package/src/rules/call.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
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
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
import { BaseException } from '@angular-devkit/core';
|
|
9
9
|
import { Observable } from 'rxjs';
|
package/src/rules/call.js
CHANGED
|
@@ -4,10 +4,12 @@
|
|
|
4
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
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.
|
|
10
|
+
exports.InvalidSourceResultException = exports.InvalidRuleResultException = void 0;
|
|
11
|
+
exports.callSource = callSource;
|
|
12
|
+
exports.callRule = callRule;
|
|
11
13
|
const core_1 = require("@angular-devkit/core");
|
|
12
14
|
const rxjs_1 = require("rxjs");
|
|
13
15
|
const interface_1 = require("../tree/interface");
|
|
@@ -63,7 +65,6 @@ function callSource(source, context) {
|
|
|
63
65
|
throw new InvalidSourceResultException(result);
|
|
64
66
|
});
|
|
65
67
|
}
|
|
66
|
-
exports.callSource = callSource;
|
|
67
68
|
function callRule(rule, input, context) {
|
|
68
69
|
if ((0, rxjs_1.isObservable)(input)) {
|
|
69
70
|
return input.pipe((0, rxjs_1.mergeMap)((inputTree) => callRuleAsync(rule, inputTree, context)));
|
|
@@ -72,7 +73,6 @@ function callRule(rule, input, context) {
|
|
|
72
73
|
return (0, rxjs_1.defer)(() => callRuleAsync(rule, input, context));
|
|
73
74
|
}
|
|
74
75
|
}
|
|
75
|
-
exports.callRule = callRule;
|
|
76
76
|
async function callRuleAsync(rule, tree, context) {
|
|
77
77
|
let result = await rule(tree, context);
|
|
78
78
|
while (typeof result === 'function') {
|
package/src/rules/move.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
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
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
import { Rule } from '../engine/interface';
|
|
9
9
|
export declare function move(from: string, to?: string): Rule;
|
package/src/rules/move.js
CHANGED
|
@@ -4,10 +4,10 @@
|
|
|
4
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
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.move =
|
|
10
|
+
exports.move = move;
|
|
11
11
|
const core_1 = require("@angular-devkit/core");
|
|
12
12
|
const base_1 = require("./base");
|
|
13
13
|
function move(from, to) {
|
|
@@ -34,4 +34,3 @@ function move(from, to) {
|
|
|
34
34
|
return tree;
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
exports.move = move;
|
package/src/rules/random.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
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
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
import { Source } from '../engine/interface';
|
|
9
9
|
export interface RandomOptions {
|
package/src/rules/random.js
CHANGED
|
@@ -4,9 +4,10 @@
|
|
|
4
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
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.default = default_1;
|
|
10
11
|
const host_tree_1 = require("../tree/host-tree");
|
|
11
12
|
function generateStringOfLength(l) {
|
|
12
13
|
return new Array(l)
|
|
@@ -37,4 +38,3 @@ function default_1(options) {
|
|
|
37
38
|
return map;
|
|
38
39
|
};
|
|
39
40
|
}
|
|
40
|
-
exports.default = default_1;
|
package/src/rules/schematic.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
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
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
import { ExecutionOptions, Rule } from '../engine/interface';
|
|
9
9
|
/**
|
package/src/rules/schematic.js
CHANGED
|
@@ -4,10 +4,11 @@
|
|
|
4
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
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.
|
|
10
|
+
exports.externalSchematic = externalSchematic;
|
|
11
|
+
exports.schematic = schematic;
|
|
11
12
|
const rxjs_1 = require("rxjs");
|
|
12
13
|
const interface_1 = require("../tree/interface");
|
|
13
14
|
const static_1 = require("../tree/static");
|
|
@@ -28,7 +29,6 @@ function externalSchematic(collectionName, schematicName, options, executionOpti
|
|
|
28
29
|
}));
|
|
29
30
|
};
|
|
30
31
|
}
|
|
31
|
-
exports.externalSchematic = externalSchematic;
|
|
32
32
|
/**
|
|
33
33
|
* Run a schematic from the same collection.
|
|
34
34
|
*
|
|
@@ -47,4 +47,3 @@ function schematic(schematicName, options, executionOptions) {
|
|
|
47
47
|
}));
|
|
48
48
|
};
|
|
49
49
|
}
|
|
50
|
-
exports.schematic = schematic;
|
package/src/rules/template.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
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
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
import { BaseException } from '@angular-devkit/core';
|
|
9
9
|
import { FileOperator, Rule } from '../engine/interface';
|
package/src/rules/template.js
CHANGED
|
@@ -4,10 +4,17 @@
|
|
|
4
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
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.
|
|
10
|
+
exports.InvalidPipeException = exports.UnknownPipeException = exports.OptionIsNotDefinedException = exports.TEMPLATE_FILENAME_RE = void 0;
|
|
11
|
+
exports.applyContentTemplate = applyContentTemplate;
|
|
12
|
+
exports.contentTemplate = contentTemplate;
|
|
13
|
+
exports.applyPathTemplate = applyPathTemplate;
|
|
14
|
+
exports.pathTemplate = pathTemplate;
|
|
15
|
+
exports.renameTemplateFiles = renameTemplateFiles;
|
|
16
|
+
exports.template = template;
|
|
17
|
+
exports.applyTemplates = applyTemplates;
|
|
11
18
|
const core_1 = require("@angular-devkit/core");
|
|
12
19
|
const node_os_1 = require("node:os");
|
|
13
20
|
const base_1 = require("./base");
|
|
@@ -52,11 +59,9 @@ function applyContentTemplate(options) {
|
|
|
52
59
|
}
|
|
53
60
|
};
|
|
54
61
|
}
|
|
55
|
-
exports.applyContentTemplate = applyContentTemplate;
|
|
56
62
|
function contentTemplate(options) {
|
|
57
63
|
return (0, base_1.forEach)(applyContentTemplate(options));
|
|
58
64
|
}
|
|
59
|
-
exports.contentTemplate = contentTemplate;
|
|
60
65
|
function applyPathTemplate(data, options = {
|
|
61
66
|
interpolationStart: '__',
|
|
62
67
|
interpolationEnd: '__',
|
|
@@ -115,11 +120,9 @@ function applyPathTemplate(data, options = {
|
|
|
115
120
|
return { path: (0, core_1.normalize)(path), content };
|
|
116
121
|
};
|
|
117
122
|
}
|
|
118
|
-
exports.applyPathTemplate = applyPathTemplate;
|
|
119
123
|
function pathTemplate(options) {
|
|
120
124
|
return (0, base_1.forEach)(applyPathTemplate(options));
|
|
121
125
|
}
|
|
122
|
-
exports.pathTemplate = pathTemplate;
|
|
123
126
|
/**
|
|
124
127
|
* Remove every `.template` suffix from file names.
|
|
125
128
|
*/
|
|
@@ -136,7 +139,6 @@ function renameTemplateFiles() {
|
|
|
136
139
|
}
|
|
137
140
|
});
|
|
138
141
|
}
|
|
139
|
-
exports.renameTemplateFiles = renameTemplateFiles;
|
|
140
142
|
function template(options) {
|
|
141
143
|
return (0, base_1.chain)([
|
|
142
144
|
contentTemplate(options),
|
|
@@ -146,7 +148,6 @@ function template(options) {
|
|
|
146
148
|
pathTemplate(options),
|
|
147
149
|
]);
|
|
148
150
|
}
|
|
149
|
-
exports.template = template;
|
|
150
151
|
function applyTemplates(options) {
|
|
151
152
|
return (0, base_1.forEach)((0, base_1.when)((path) => path.endsWith('.template'), (0, base_1.composeFileOperators)([
|
|
152
153
|
applyContentTemplate(options),
|
|
@@ -160,4 +161,3 @@ function applyTemplates(options) {
|
|
|
160
161
|
},
|
|
161
162
|
])));
|
|
162
163
|
}
|
|
163
|
-
exports.applyTemplates = applyTemplates;
|
package/src/rules/url.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
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
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
import { Source } from '../engine/interface';
|
|
9
9
|
export declare function url(urlString: string): Source;
|
package/src/rules/url.js
CHANGED
|
@@ -4,13 +4,12 @@
|
|
|
4
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
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.url =
|
|
10
|
+
exports.url = url;
|
|
11
11
|
const url_1 = require("url");
|
|
12
12
|
function url(urlString) {
|
|
13
13
|
const url = (0, url_1.parse)(urlString);
|
|
14
14
|
return (context) => context.engine.createSourceFromUrl(url, context)(context);
|
|
15
15
|
}
|
|
16
|
-
exports.url = url;
|
package/src/sink/dryrun.d.ts
CHANGED
|
@@ -3,9 +3,8 @@
|
|
|
3
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
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
|
-
/// <reference types="node" />
|
|
9
8
|
import { virtualFs } from '@angular-devkit/core';
|
|
10
9
|
import { Observable, Subject } from 'rxjs';
|
|
11
10
|
import { HostSink } from './host';
|
package/src/sink/dryrun.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
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
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.DryRunSink = void 0;
|