@soat/cli 0.14.1 → 0.14.2
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.
- package/dist/index.mjs +6 -7
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -11,7 +11,7 @@ import { load } from "js-yaml";
|
|
|
11
11
|
import * as os from "node:os";
|
|
12
12
|
|
|
13
13
|
//#region package.json
|
|
14
|
-
var version = "0.14.
|
|
14
|
+
var version = "0.14.2";
|
|
15
15
|
|
|
16
16
|
//#endregion
|
|
17
17
|
//#region src/cli-wrappers/wrappers/formations.ts
|
|
@@ -67,6 +67,7 @@ var readTemplateFromPath = args => {
|
|
|
67
67
|
throw new Error(`Template file must contain valid JSON or YAML: ${templatePath}`);
|
|
68
68
|
}
|
|
69
69
|
};
|
|
70
|
+
var OMIT_PARAMETER = Symbol("omit-parameter");
|
|
70
71
|
var resolveEnvRef = args => {
|
|
71
72
|
const {
|
|
72
73
|
value,
|
|
@@ -75,8 +76,7 @@ var resolveEnvRef = args => {
|
|
|
75
76
|
const atRef = /^@([A-Za-z_][A-Za-z0-9_]*)$/.exec(value);
|
|
76
77
|
if (atRef) {
|
|
77
78
|
const resolved = env[atRef[1]];
|
|
78
|
-
|
|
79
|
-
return resolved;
|
|
79
|
+
return resolved === void 0 ? OMIT_PARAMETER : resolved;
|
|
80
80
|
}
|
|
81
81
|
const simple = /^\$([A-Za-z_][A-Za-z0-9_]*)$/.exec(value);
|
|
82
82
|
if (simple) {
|
|
@@ -103,10 +103,9 @@ var resolveParameterPair = args => {
|
|
|
103
103
|
const key = pair.trim();
|
|
104
104
|
if (!key) throw new Error(`Invalid --${PARAMETER_FLAG} value "${pair}". Parameter key cannot be empty.`);
|
|
105
105
|
const resolved = env[key];
|
|
106
|
-
if (resolved === void 0) throw new Error(`Missing environment variable: ${key}`);
|
|
107
106
|
return {
|
|
108
107
|
key,
|
|
109
|
-
value: resolved
|
|
108
|
+
value: resolved === void 0 ? OMIT_PARAMETER : resolved
|
|
110
109
|
};
|
|
111
110
|
}
|
|
112
111
|
const key = pair.slice(0, eqIdx).trim();
|
|
@@ -130,7 +129,7 @@ var formationsWrapper = {
|
|
|
130
129
|
type: "string"
|
|
131
130
|
}, {
|
|
132
131
|
name: "parameter",
|
|
133
|
-
description: "Template parameter in key=value format (repeatable). Values support env var references: $VAR, ${VAR}, or @VAR_NAME (shell-safe). Omit the value entirely (--parameter KEY) to auto-read KEY from the merged env.",
|
|
132
|
+
description: "Template parameter in key=value format (repeatable). Values support env var references: $VAR, ${VAR}, or @VAR_NAME (shell-safe). Omit the value entirely (--parameter KEY) to auto-read KEY from the merged env. For @VAR_NAME and bare KEY, an unset env var omits the parameter instead of failing, so the server reuses a previous value (formation parameters declared `use_previous_value`) or errors if none exists.",
|
|
134
133
|
required: false,
|
|
135
134
|
type: "string"
|
|
136
135
|
}, {
|
|
@@ -182,7 +181,7 @@ var formationsWrapper = {
|
|
|
182
181
|
pair,
|
|
183
182
|
env: mergedEnv
|
|
184
183
|
});
|
|
185
|
-
resolvedParameters[key] = value;
|
|
184
|
+
if (value !== OMIT_PARAMETER) resolvedParameters[key] = value;
|
|
186
185
|
}
|
|
187
186
|
forcedBody[PARAMETERS_FIELD] = resolvedParameters;
|
|
188
187
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soat/cli",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@inquirer/input": "^5.1.2",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"@ttoss/logger": "^0.8.19",
|
|
9
9
|
"commander": "^15.0.0",
|
|
10
10
|
"js-yaml": "^5.2.1",
|
|
11
|
-
"@soat/sdk": "0.14.
|
|
11
|
+
"@soat/sdk": "0.14.2"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
14
|
"@ttoss/config": "^1.37.17",
|