Skip to content

Commit

Permalink
fix(@angular-devkit/core): allow prompt providers to access property …
Browse files Browse the repository at this point in the history
…types

This allows prompt providers to adjust their logic based on the type of property requested.
  • Loading branch information
clydin authored and alan-agius4 committed Oct 21, 2020
1 parent 4737301 commit 83c9120
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions etc/api/angular_devkit/core/src/_golden-api.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -715,6 +715,7 @@ export interface PromptDefinition {
}>;
message: string;
multiselect?: boolean;
propertyTypes: Set<string>;
raw?: string | JsonObject;
type: string;
validator?: (value: JsonValue) => boolean | string | Promise<boolean | string>;
Expand Down
1 change: 1 addition & 0 deletions packages/angular_devkit/core/src/json/schema/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ export interface PromptDefinition {

raw?: string | JsonObject;
multiselect?: boolean;
propertyTypes: Set<string>;
}

export type PromptProvider = (definitions: Array<PromptDefinition>)
Expand Down
1 change: 1 addition & 0 deletions packages/angular_devkit/core/src/json/schema/registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,7 @@ export class CoreSchemaRegistry implements SchemaRegistry {
raw: schema,
items,
multiselect,
propertyTypes,
default:
typeof (parentSchema as JsonObject).default == 'object' &&
(parentSchema as JsonObject).default !== null &&
Expand Down

0 comments on commit 83c9120

Please sign in to comment.