@lumerahq/cli 0.20.0-dev.0 → 0.20.0-dev.1
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.
|
@@ -43,16 +43,20 @@ async function flags(subcommand, args) {
|
|
|
43
43
|
process.exit(1);
|
|
44
44
|
}
|
|
45
45
|
const defIdx = args.indexOf("--default");
|
|
46
|
+
if (defIdx !== -1 && args[defIdx + 1] === void 0) {
|
|
47
|
+
console.error(pc.red("--default requires a value"));
|
|
48
|
+
process.exit(1);
|
|
49
|
+
}
|
|
46
50
|
const fallback = defIdx !== -1 ? args[defIdx + 1] : void 0;
|
|
47
51
|
const all = featureFlags();
|
|
48
52
|
if (!(key in all)) {
|
|
49
53
|
if (fallback !== void 0) {
|
|
50
|
-
|
|
54
|
+
emit(fallback);
|
|
51
55
|
return;
|
|
52
56
|
}
|
|
53
57
|
process.exit(1);
|
|
54
58
|
}
|
|
55
|
-
|
|
59
|
+
emit(all[key]);
|
|
56
60
|
break;
|
|
57
61
|
}
|
|
58
62
|
case void 0:
|
|
@@ -81,7 +85,11 @@ async function flags(subcommand, args) {
|
|
|
81
85
|
function formatValue(v) {
|
|
82
86
|
return typeof v === "string" ? v : JSON.stringify(v);
|
|
83
87
|
}
|
|
84
|
-
function
|
|
88
|
+
function emit(v) {
|
|
89
|
+
if (process.env.LUMERA_JSON === "1") {
|
|
90
|
+
console.log(JSON.stringify(v));
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
85
93
|
console.log(formatValue(v));
|
|
86
94
|
}
|
|
87
95
|
export {
|
package/dist/index.js
CHANGED
|
@@ -279,7 +279,7 @@ async function main() {
|
|
|
279
279
|
break;
|
|
280
280
|
// Feature flags (read the in-sandbox snapshot)
|
|
281
281
|
case "flags":
|
|
282
|
-
await import("./flags-
|
|
282
|
+
await import("./flags-UZW4D2SO.js").then((m) => m.flags(subcommand, args.slice(2)));
|
|
283
283
|
break;
|
|
284
284
|
// Auth
|
|
285
285
|
case "login":
|