Skip to content

Commit 523d971

Browse files
clydinhansl
authored andcommitted
feat(@angular-devkit/schematics): add allow private workflow option
1 parent d16432e commit 523d971

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

packages/angular_devkit/schematics/src/workflow/interface.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export interface WorkflowExecutionContext extends RequiredWorkflowExecutionConte
1818
debug: boolean;
1919
logger: logging.Logger;
2020
parentContext?: Readonly<WorkflowExecutionContext>;
21+
allowPrivate?: boolean;
2122
}
2223

2324
export interface Workflow {

packages/angular_devkit/schematics/tools/workflow/node-workflow.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ export class NodeWorkflow implements workflow.Workflow {
7979
/** Create the collection and the schematic. */
8080
const collection = this._engine.createCollection(options.collection);
8181
// Only allow private schematics if called from the same collection.
82-
const allowPrivate = parentContext && parentContext.collection === options.collection;
82+
const allowPrivate = options.allowPrivate
83+
|| (parentContext && parentContext.collection === options.collection);
8384
const schematic = collection.createSchematic(options.schematic, allowPrivate);
8485

8586
// We need two sinks if we want to output what will happen, and actually do the work.

0 commit comments

Comments
 (0)