1
0
mirror of https://github.com/yldio/copilot.git synced 2024-11-28 14:10:04 +02:00

support ENV names in credentials json

This commit is contained in:
Sérgio Ramos 2017-04-27 19:43:32 +01:00
parent 04e604eb8e
commit 11a88820e7
2 changed files with 38 additions and 18 deletions

View File

@ -20,8 +20,28 @@ const json = (() => {
})(); })();
module.exports = { module.exports = {
url: process.env.SDC_URL || json.url || '', url: (
account: process.env.SDC_ACCOUNT || json.account || '', process.env.SDC_URL ||
user: process.env.SDC_USER || json.user || '', json.SDC_URL ||
keyId: process.env.SDC_KEY_ID || json.keyId || '' json.url ||
''
),
account: (
process.env.SDC_ACCOUNT ||
json.SDC_ACCOUNT ||
json.account ||
''
),
user: (
process.env.SDC_USER ||
json.SDC_USER ||
json.user ||
''
),
keyId: (
process.env.SDC_KEY_ID ||
json.SDC_KEY_ID ||
json.keyId ||
''
)
}; };

View File

@ -1306,7 +1306,19 @@ escope@^3.6.0:
esrecurse "^4.1.0" esrecurse "^4.1.0"
estraverse "^4.1.1" estraverse "^4.1.1"
eslint: eslint-config-prettier@^1.7.0:
version "1.7.0"
resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-1.7.0.tgz#cda3ce22df1e852daa9370f1f3446e8b8a02ce44"
dependencies:
get-stdin "^5.0.1"
eslint-plugin-prettier@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-2.0.1.tgz#2ae1216cf053dd728360ca8560bf1aabc8af3fa9"
dependencies:
requireindex "~1.1.0"
eslint@^3.19.0:
version "3.19.0" version "3.19.0"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-3.19.0.tgz#c8fc6201c7f40dd08941b87c085767386a679acc" resolved "https://registry.yarnpkg.com/eslint/-/eslint-3.19.0.tgz#c8fc6201c7f40dd08941b87c085767386a679acc"
dependencies: dependencies:
@ -1346,18 +1358,6 @@ eslint:
text-table "~0.2.0" text-table "~0.2.0"
user-home "^2.0.0" user-home "^2.0.0"
eslint-config-prettier:
version "1.7.0"
resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-1.7.0.tgz#cda3ce22df1e852daa9370f1f3446e8b8a02ce44"
dependencies:
get-stdin "^5.0.1"
eslint-plugin-prettier:
version "2.0.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-2.0.1.tgz#2ae1216cf053dd728360ca8560bf1aabc8af3fa9"
dependencies:
requireindex "~1.1.0"
espower-location-detector@^1.0.0: espower-location-detector@^1.0.0:
version "1.0.0" version "1.0.0"
resolved "https://registry.yarnpkg.com/espower-location-detector/-/espower-location-detector-1.0.0.tgz#a17b7ecc59d30e179e2bef73fb4137704cb331b5" resolved "https://registry.yarnpkg.com/espower-location-detector/-/espower-location-detector-1.0.0.tgz#a17b7ecc59d30e179e2bef73fb4137704cb331b5"
@ -3152,7 +3152,7 @@ preserve@^0.2.0:
version "0.2.0" version "0.2.0"
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
prettier: prettier@^1.2.2:
version "1.2.2" version "1.2.2"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.2.2.tgz#22d17c1132faaaea1f1d4faea31f19f7a1959f3e" resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.2.2.tgz#22d17c1132faaaea1f1d4faea31f19f7a1959f3e"
dependencies: dependencies: