Skip to content

Commit 555b5be

Browse files
committed
fix(@angular/cli): allow some schematic commands to allow private
Fix #10182
1 parent 359ccbe commit 555b5be

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

packages/@angular/cli/commands/add.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const SilentError = require('silent-error');
1111
export default class AddCommand extends SchematicCommand {
1212
readonly name = 'add';
1313
readonly description = 'Add support for a library to your project.';
14+
readonly allowPrivateSchematics = true;
1415
scope = CommandScope.inProject;
1516
arguments = ['collection'];
1617
options: Option[] = [];

packages/@angular/cli/models/schematic-command.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export interface GetOptionsResult {
3434

3535
export abstract class SchematicCommand extends Command {
3636
readonly options: Option[] = [];
37+
readonly allowPrivateSchematics: boolean = false;
3738
private _host = new NodeJsSyncHost();
3839
private _workspace: experimental.workspace.Workspace;
3940
private _deAliasedName: string;
@@ -140,6 +141,7 @@ export abstract class SchematicCommand extends Command {
140141
options: schematicOptions,
141142
debug: debug,
142143
logger: this.logger,
144+
allowPrivate: this.allowPrivateSchematics,
143145
})
144146
.subscribe({
145147
error: (err: Error) => {

0 commit comments

Comments
 (0)