Skip to content

Permit passing config object via env vars #461

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -203,16 +203,12 @@
"requestHeaders": {
"type": [
"object"
],
"noCLI": true,
"noEnv": true
]
},
"requestQueryParameters": {
"type": [
"object"
],
"noCLI": true,
"noEnv": true
]
},
"socialSharing": {
"type": [
Expand Down Expand Up @@ -240,9 +236,7 @@
{
"$ref": "https://stac-extensions.github.io/authentication/v1.1.0/schema.json"
}
],
"noCLI": true,
"noEnv": true
]
}
}
}
2 changes: 1 addition & 1 deletion docker/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ env -0 | cut -f1 -d= | tr '\0' '\n' | grep "^SB_" | {
boolean)
bool "$value"
;;
integer | number)
integer | number | object)
object "$value"
;;
array)
Expand Down
6 changes: 0 additions & 6 deletions docs/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,6 @@ This is affected by [`allowedDomains`](#alloweddomains).

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

Please note that this option can only be provided through a config file and is not available via CLI/ENV.

## requestQueryParameters

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

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

Please note that this option can only be provided through a config file and is not available via CLI/ENV.

## socialSharing

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

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

The `authConfig` option can only be provided through a config file and is not available via CLI/ENV.

### API Keys

API keys can be configured to be sent via HTTP header or query parameter:
Expand Down
5 changes: 5 additions & 0 deletions vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ const argv = yargs(hideBin(process.argv))
.boolean(optionsForType("boolean"))
.number(optionsForType("number").concat(optionsForType("integer")))
.array(optionsForType("array"))
.option(
Object.fromEntries(
optionsForType("object").map((k) => [k, { coerce: JSON.parse }])
)
)
.argv;
// Clean-up arguments
delete argv._;
Expand Down