Skip to content

Commit 058d624

Browse files
authored
fix(schematic): use oneOf rather than array types in the deploy schematic (#3092)
Use `oneOf` instead of `"type": ["a", "b"]` to fix the `ng deploy` command
1 parent b60670c commit 058d624

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/schematics/deploy/schema.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"pattern": "^[^:\\s]+:[^:\\s]+(:[^\\s]+)?$"
3131
},
3232
"ssr": {
33-
"type": ["boolean", "string"],
33+
"oneOf": [{ "type": "boolean" }, { "type": "string" }],
3434
"description": "Should we attempt to deploy the function to Cloud Functions (true or 'cloud-functions') / Cloud Run ('cloud-run') or just Hosting (false)"
3535
},
3636
"prerender": {
@@ -54,7 +54,7 @@
5454
"description": "The name of the Cloud Function or Cloud Run serviceId to deploy SSR to"
5555
},
5656
"functionsNodeVersion": {
57-
"type": ["number", "string"],
57+
"oneOf": [{ "type": "number" }, { "type": "string" }],
5858
"description": "Version of Node.js to run Cloud Functions / Run on"
5959
},
6060
"region": {
@@ -82,12 +82,12 @@
8282
"description": "Set a CPU limit in Kubernetes cpu units."
8383
},
8484
"maxConcurrency": {
85-
"type": ["number", "string"],
85+
"oneOf": [{ "type": "number" }, { "type": "string" }],
8686
"pattern": "^(\\d+|default)$",
8787
"description": "Set the maximum number of concurrent requests allowed per container instance. If concurrency is unspecified, any number of concurrent requests are allowed. To unset this field, provide the special value default."
8888
},
8989
"maxInstances": {
90-
"type": ["number", "string"],
90+
"oneOf": [{ "type": "number" }, { "type": "string" }],
9191
"pattern": "^(\\d+|default)$",
9292
"description": "The maximum number of container instances of the Service to run. Use 'default' to unset the limit and use the platform default."
9393
},
@@ -97,7 +97,7 @@
9797
"description": "Set a memory limit. Ex: 1Gi, 512Mi."
9898
},
9999
"minInstances": {
100-
"type": ["number", "string"],
100+
"oneOf": [{ "type": "number" }, { "type": "string" }],
101101
"pattern": "^(\\d+|default)$",
102102
"description": "The minimum number of container instances of the Service to run or 'default' to remove any minimum."
103103
},

0 commit comments

Comments
 (0)