@agilecustoms/envctl 1.28.2 → 1.28.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -52,9 +52,9 @@ export class HttpClient {
|
|
|
52
52
|
response = await fetch(url, options);
|
|
53
53
|
}
|
|
54
54
|
catch (error) {
|
|
55
|
-
if (error.cause && error.cause.errno
|
|
55
|
+
if (error.cause && error.cause.errno === -3008) {
|
|
56
56
|
const host = error.cause.hostname;
|
|
57
|
-
if (host
|
|
57
|
+
if (host === DEFAULT_HOST) {
|
|
58
58
|
throw new KnownException('Can not reach backend. Network issue?');
|
|
59
59
|
}
|
|
60
60
|
else {
|
package/dist/commands/_keys.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export const _keys = {
|
|
2
2
|
FORCE: 'Force deletion without confirmation',
|
|
3
|
-
KEY: 'Environment name/identifier - taken from remote
|
|
3
|
+
KEY: 'Environment name/identifier - taken from remote state key, must be unique for a given customer',
|
|
4
4
|
PROFILE: 'Profile to use'
|
|
5
5
|
};
|
|
@@ -36,7 +36,7 @@ export class LocalStateService {
|
|
|
36
36
|
if (!this.config) {
|
|
37
37
|
throw new Error('call init or load first');
|
|
38
38
|
}
|
|
39
|
-
const mergedConfig = { ...this.
|
|
39
|
+
const mergedConfig = { ...this.config, ...config };
|
|
40
40
|
const data = JSON.stringify(mergedConfig, null, 2);
|
|
41
41
|
const filePath = this.filePath();
|
|
42
42
|
fs.writeFileSync(filePath, data);
|
|
@@ -189,15 +189,9 @@ export class TerraformAdapter {
|
|
|
189
189
|
if (this.nonInteractive && !args.some(arg => arg.startsWith('-input'))) {
|
|
190
190
|
extraArgs.push('-input=false');
|
|
191
191
|
}
|
|
192
|
-
const specialFields = {};
|
|
193
192
|
const varKey = this.configService.getVarKey();
|
|
194
|
-
if (varKey) {
|
|
195
|
-
|
|
196
|
-
}
|
|
197
|
-
for (const name of Object.keys(specialFields)) {
|
|
198
|
-
if (varDefs[name] && !argVars[name]) {
|
|
199
|
-
extraArgs.push('-var=' + name + '=' + specialFields[name]);
|
|
200
|
-
}
|
|
193
|
+
if (varKey && varDefs[varKey] && !argVars[varKey]) {
|
|
194
|
+
extraArgs.push(`-var=${varKey}=${key}`);
|
|
201
195
|
}
|
|
202
196
|
return [...extraArgs, ...args];
|
|
203
197
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agilecustoms/envctl",
|
|
3
|
-
"version": "1.28.
|
|
4
|
-
"description": "node.js CLI client for
|
|
3
|
+
"version": "1.28.3",
|
|
4
|
+
"description": "node.js CLI client for managing environments",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"terraform wrapper",
|
|
7
7
|
"auto deletion"
|