Skip to content
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.

Commit

Permalink
can get values from env vars now
Browse files Browse the repository at this point in the history
  • Loading branch information
mkloubert committed Jan 1, 2018
1 parent f477346 commit e8cdaea
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

## 0.11.0 (January 1st, 2018; SFTP and values)

* can load [placeholders](https://github.com/mkloubert/vscode-deploy-reloaded/wiki/values) from files now
* can get [placeholders](https://github.com/mkloubert/vscode-deploy-reloaded/wiki/values) from files and environment variables now
* fixed `tryKeyboard` support in [SFTP targets](https://github.com/mkloubert/vscode-deploy-reloaded/wiki/target_sftp)

## 0.10.0 (December 30th, 2017; shell commands, S3 and external sources)
Expand Down
48 changes: 47 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"license": "LGPL-3.0",
"preview": true,
"categories": [
"Azure",
"Other"
],
"keywords": [
Expand Down Expand Up @@ -40663,6 +40664,51 @@
"code"
]
},
{
"type": "object",
"properties": {
"alias": {
"description": "The optional alias to use.",
"type": "string"
},
"cache": {
"description": "Cache value or not.",
"type": "boolean",
"default": true
},
"if": {
"description": "(JavaScript) Code, which indicates, if entry is available or not.",
"type": "string"
},
"name": {
"description": "The name of that value.",
"type": "string"
},
"platforms": {
"description": "One or more platform names the value is available for.",
"type": "array",
"items": {
"description": "The name of the platform.",
"type": "string",
"enum": [
"darwin",
"freebsd",
"linux",
"sunos",
"win32"
]
}
},
"type": {
"enum": [
"env",
"environment"
],
"type": "string",
"description": "A value from a process' environment variable."
}
}
},
{
"type": "object",
"properties": {
Expand Down Expand Up @@ -40827,4 +40873,4 @@
"uglify-js": "^3.2.2",
"uuid": "^3.1.0"
}
}
}
5 changes: 5 additions & 0 deletions src/values.ts
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,11 @@ export function loadFromItems(items: WithValueItems, opts?: LoadFromItemsOptions
newValue = new CodeValue(<CodeValueItem>VI, NAME);
break;

case 'env':
case 'environment':
newValue = new EnvVarValue(NAME, <EnvVarValueItem>VI);
break;

case 'file':
newValue = new FileValue(
<FileValueItem>VI,
Expand Down

0 comments on commit e8cdaea

Please sign in to comment.