Skip to content

Commit 1d92235

Browse files
alukachm-mohr
andauthored
Permit passing config object via env vars (#461)
* Retain object types * Rm notes of unsupported CLI/ENV arguments * Update config.js.json to permit CLI/ENV contirbutions of objects * Last updates before release, v3.3.0 * Update translations (#526) * Support passing in objects in non-dockerized environments * New translations fields.json (French) (#527) * Fix config schema for requestHeaders * Permit requestHeaders setting via CLI & env --------- Co-authored-by: Matthias Mohr <[email protected]> Co-authored-by: Matthias Mohr <[email protected]>
1 parent d39fd27 commit 1d92235

File tree

4 files changed

+9
-16
lines changed

4 files changed

+9
-16
lines changed

config.schema.json

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -203,16 +203,12 @@
203203
"requestHeaders": {
204204
"type": [
205205
"object"
206-
],
207-
"noCLI": true,
208-
"noEnv": true
206+
]
209207
},
210208
"requestQueryParameters": {
211209
"type": [
212210
"object"
213-
],
214-
"noCLI": true,
215-
"noEnv": true
211+
]
216212
},
217213
"socialSharing": {
218214
"type": [
@@ -240,9 +236,7 @@
240236
{
241237
"$ref": "https://stac-extensions.github.io/authentication/v1.1.0/schema.json"
242238
}
243-
],
244-
"noCLI": true,
245-
"noEnv": true
239+
]
246240
}
247241
}
248242
}

docker/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ env -0 | cut -f1 -d= | tr '\0' '\n' | grep "^SB_" | {
7676
boolean)
7777
bool "$value"
7878
;;
79-
integer | number)
79+
integer | number | object)
8080
object "$value"
8181
;;
8282
array)

docs/options.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -285,8 +285,6 @@ This is affected by [`allowedDomains`](#alloweddomains).
285285

286286
Example: `{'Authorization': 'Bearer 134567984623223'}` adds a Bearer token to the HTTP headers.
287287

288-
Please note that this option can only be provided through a config file and is not available via CLI/ENV.
289-
290288
## requestQueryParameters
291289

292290
***experimental***
@@ -296,8 +294,6 @@ This is affected by [`allowedDomains`](#alloweddomains).
296294

297295
Example: `{'f': 'json'}` adds a `f` query parameter to the HTTP URL, e.g. `https://example.com?f=json`.
298296

299-
Please note that this option can only be provided through a config file and is not available via CLI/ENV.
300-
301297
## socialSharing
302298

303299
Lists the social sharing service for which buttons should be shown in the "Share" panel.
@@ -335,8 +331,6 @@ In addition the following properties are supported:
335331

336332
Authentication is generally affected by the [`allowedDomains`](#alloweddomains) option.
337333

338-
The `authConfig` option can only be provided through a config file and is not available via CLI/ENV.
339-
340334
### API Keys
341335

342336
API keys can be configured to be sent via HTTP header or query parameter:

vue.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ const argv = yargs(hideBin(process.argv))
1515
.boolean(optionsForType("boolean"))
1616
.number(optionsForType("number").concat(optionsForType("integer")))
1717
.array(optionsForType("array"))
18+
.option(
19+
Object.fromEntries(
20+
optionsForType("object").map((k) => [k, { coerce: JSON.parse }])
21+
)
22+
)
1823
.argv;
1924
// Clean-up arguments
2025
delete argv._;

0 commit comments

Comments
 (0)