Skip to content

Commit ee3be89

Browse files
alan-agius4vikerman
authored andcommitted
fix(@angular-devkit/build-angular): add pattern validations for browserTarget and serverTarget
1 parent c48a9d6 commit ee3be89

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

packages/angular_devkit/build_angular/src/app-shell/schema.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@
66
"properties": {
77
"browserTarget": {
88
"type": "string",
9-
"description": "Target to build."
9+
"description": "Target to build.",
10+
"pattern": "^[^:\\s]+:[^:\\s]+(:[^\\s]+)?$"
1011
},
1112
"serverTarget": {
1213
"type": "string",
13-
"description": "Server target to use for rendering the app shell."
14+
"description": "Server target to use for rendering the app shell.",
15+
"pattern": "^[^:\\s]+:[^:\\s]+(:[^\\s]+)?$"
1416
},
1517
"appModuleBundle": {
1618
"type": "string",

packages/angular_devkit/build_angular/src/dev-server/schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"browserTarget": {
88
"type": "string",
99
"description": "Target to serve.",
10-
"pattern": ".+:.+(:.+)?"
10+
"pattern": "^[^:\\s]+:[^:\\s]+(:[^\\s]+)?$"
1111
},
1212
"port": {
1313
"type": "number",

packages/angular_devkit/build_angular/src/extract-i18n/schema.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"properties": {
77
"browserTarget": {
88
"type": "string",
9-
"description": "Target to extract from."
9+
"description": "Target to extract from.",
10+
"pattern": "^[^:\\s]+:[^:\\s]+(:[^\\s]+)?$"
1011
},
1112
"format": {
1213
"type": "string",

packages/angular_devkit/build_angular/src/protractor/schema.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
},
1111
"devServerTarget": {
1212
"type": "string",
13-
"description": "Dev server target to run tests against."
13+
"description": "Dev server target to run tests against.",
14+
"pattern": "^([^:\\s]+:[^:\\s]+(:[^\\s]+)?)?$"
1415
},
1516
"specs": {
1617
"type": "array",

0 commit comments

Comments
 (0)