@e-n-v/env 0.0.5 → 0.0.8
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/{BooleanMap-DmFnCA-O.d.ts → BooleanMap-BPQuO3Ae.d.ts} +1 -3
- package/dist/{BooleanMap-B2eIP3tZ.d.cts → BooleanMap-CX_YrPCf.d.cts} +1 -3
- package/dist/EnvChannelOptions-BbKeuO-o.d.cts +366 -0
- package/dist/EnvChannelOptions-BbKeuO-o.d.ts +366 -0
- package/dist/{EnvSource-DA3ZGlES.js → EnvSource-WAGWqRVM.js} +6 -10
- package/dist/{EnvSource-BVnmdHku.cjs → EnvSource-s8F_M_6O.cjs} +21 -28
- package/dist/EnvVarSchema-CDZGmnex.cjs +15 -0
- package/dist/EnvVarSchema-Dr6q7jf6.js +10 -0
- package/dist/{ProcessEnvChannel-Do4-yiLI.d.ts → ProcessEnvChannel-CwhV7_EB.d.ts} +2 -4
- package/dist/{ProcessEnvChannel-D465c-dp.d.cts → ProcessEnvChannel-DWHPZePe.d.cts} +2 -4
- package/dist/{StringEnvVarSchema-B8MT7htU.d.ts → StringEnvVarSchema-D9Jr1Aws.d.cts} +5 -3
- package/dist/{StringEnvVarSchema-BF6C0nyT.d.cts → StringEnvVarSchema-D9Jr1Aws.d.ts} +5 -3
- package/dist/channels.cjs +3 -4
- package/dist/channels.d.cts +3 -4
- package/dist/channels.d.ts +3 -4
- package/dist/channels.js +2 -4
- package/dist/cli.cjs +10 -23
- package/dist/cli.d.cts +1 -1
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +7 -13
- package/dist/core.cjs +13 -14
- package/dist/core.d.cts +147 -6
- package/dist/core.d.ts +147 -6
- package/dist/core.js +9 -11
- package/dist/{custom-Bt_wnxIu.js → custom-Bd-jLg80.js} +3 -12
- package/dist/{custom-D_Rqjm09.cjs → custom-Dyb9TnER.cjs} +48 -58
- package/dist/files.cjs +6 -6
- package/dist/files.d.cts +2 -2
- package/dist/files.d.ts +2 -2
- package/dist/files.js +2 -5
- package/dist/{parse-DwtLpVhC.d.ts → index-B2eNij2x.d.cts} +1 -2
- package/dist/{parse-BT1QSa5e.d.cts → index-BHTM8nxS.d.ts} +1 -2
- package/dist/{prompt-yKdccbtZ.d.ts → index-BKBW9Dxs.d.cts} +3 -4
- package/dist/{prompt-C5WudV9x.d.cts → index-CEyOIRdj.d.ts} +3 -4
- package/dist/{EnvModel-CrGclUpJ.d.cts → index-Cb0abjLf.d.ts} +59 -7
- package/dist/{EnvModel-D8rt0EJ6.d.ts → index-Cz3frUwZ.d.cts} +58 -6
- package/dist/index.cjs +33 -0
- package/dist/index.d.cts +19 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +15 -0
- package/dist/model.cjs +10 -11
- package/dist/model.d.cts +2 -35
- package/dist/model.d.ts +2 -35
- package/dist/model.js +2 -6
- package/dist/parse.cjs +14 -14
- package/dist/parse.d.cts +5 -8
- package/dist/parse.d.ts +5 -8
- package/dist/parse.js +4 -7
- package/dist/preprocessors-BKuIcZa1.d.ts +83 -0
- package/dist/preprocessors-DFVyF0c7.d.cts +83 -0
- package/dist/prompt.cjs +12 -15
- package/dist/prompt.d.cts +5 -10
- package/dist/prompt.d.ts +5 -10
- package/dist/prompt.js +3 -9
- package/dist/{redis-EcC7TX3K.cjs → redis-CyTF0SYT.cjs} +321 -253
- package/dist/{redis-CJOpRPjc.js → redis-D18f4ztf.js} +76 -37
- package/dist/{index-Dq_0aeAL.d.ts → redis-DsW-Vkwq.d.cts} +26 -6
- package/dist/{index-D8pslhp4.d.cts → redis-tRD4nAy_.d.ts} +26 -6
- package/dist/{resolveChannel-v9BDsw-M.js → resolveChannel-D1Fzl4TL.js} +59 -63
- package/dist/{resolveChannel-CjAuxy3p.cjs → resolveChannel-DxZNYdDe.cjs} +84 -92
- package/dist/{chunk-pbleEpgJ.cjs → rolldown-runtime-C0BPl7ul.cjs} +15 -16
- package/dist/{chunk-Bp6m_JJh.js → rolldown-runtime-D7D4PA-g.js} +4 -4
- package/dist/{schema-jN4EtvEP.d.ts → schema-B-JLVS42.d.ts} +1 -3
- package/dist/{schema-DH4GiW9A.d.cts → schema-B1i83alz.d.cts} +1 -3
- package/dist/schema-CtP5lpU1.js +11 -0
- package/dist/schema-D9nJKipf.cjs +22 -0
- package/dist/schemas/zod.cjs +112 -359
- package/dist/schemas/zod.d.cts +117 -87
- package/dist/schemas/zod.d.ts +117 -87
- package/dist/schemas/zod.js +116 -377
- package/dist/schemas.cjs +152 -133
- package/dist/schemas.d.cts +2 -3
- package/dist/schemas.d.ts +2 -3
- package/dist/schemas.js +2 -6
- package/dist/{src-Cjo2XA4n.cjs → src-5GYFbR9n.cjs} +21 -25
- package/dist/{src-BBwjK5SK.js → src-8rEOvFG5.js} +11 -15
- package/dist/{src-Dtv7TlJx.js → src-CdzAzdq-.js} +100 -114
- package/dist/{src-CLTURaoo.js → src-Cg49gGJb.js} +18 -44
- package/dist/{src-DWYoqPX1.cjs → src-CttkcdpE.cjs} +114 -133
- package/dist/{src-XjL5cyPG.cjs → src-D5KzIEH_.cjs} +130 -107
- package/dist/src-DB0Har0j.cjs +1632 -0
- package/dist/{src-CVdUqK3q.js → src-DWc-WWjX.js} +107 -86
- package/dist/{src-B7FG1rak.js → src-DvUBRBe3.js} +205 -116
- package/dist/{src-meUnCASg.cjs → src-TZx_e95f.cjs} +87 -132
- package/dist/{vars-BNVI6k89.d.ts → vars-DtzGL5Nc.d.cts} +1 -4
- package/dist/{vars-CptZRPX5.d.cts → vars-obKYxaSu.d.ts} +1 -4
- package/dist/vars.cjs +175 -138
- package/dist/vars.d.cts +3 -7
- package/dist/vars.d.ts +3 -7
- package/dist/vars.js +21 -9
- package/package.json +9 -8
- package/dist/EnvChannelOptions-BPkWDrmr.d.cts +0 -108
- package/dist/EnvChannelOptions-CRwDLWjd.d.ts +0 -108
- package/dist/coerce-DNIuYAx4.js +0 -11028
- package/dist/coerce-b7UVodS9.cjs +0 -12365
- package/dist/model-Dic8IJsf.d.ts +0 -29
- package/dist/model-ft0WhSSS.d.cts +0 -29
- package/dist/root.cjs +0 -36
- package/dist/root.d.cts +0 -21
- package/dist/root.d.ts +0 -21
- package/dist/root.js +0 -21
- package/dist/src-DZmpNGrQ.cjs +0 -1411
- package/dist/validate-BxA3a-ns.d.cts +0 -203
- package/dist/validate-CyxrRacF.d.ts +0 -203
- package/dist/vars-CYOaskkK.cjs +0 -27
- package/dist/vars-DOW0LiiN.js +0 -22
- /package/dist/{EnvChannel-LMIRYvT1.d.cts → EnvChannel-CfSwa_25.d.cts} +0 -0
- /package/dist/{EnvChannel-w27PEm7x.d.ts → EnvChannel-CfSwa_25.d.ts} +0 -0
|
@@ -1,33 +1,28 @@
|
|
|
1
|
-
const
|
|
2
|
-
const
|
|
3
|
-
const require_src = require(
|
|
4
|
-
const
|
|
1
|
+
const require_rolldown_runtime = require("./rolldown-runtime-C0BPl7ul.cjs");
|
|
2
|
+
const require_src = require("./src-TZx_e95f.cjs");
|
|
3
|
+
const require_src$1 = require("./src-D5KzIEH_.cjs");
|
|
4
|
+
const require_resolveChannel = require("./resolveChannel-DxZNYdDe.cjs");
|
|
5
5
|
let node_path = require("node:path");
|
|
6
|
-
node_path = require_chunk.__toESM(node_path);
|
|
7
|
-
let node_url = require("node:url");
|
|
8
|
-
node_url = require_chunk.__toESM(node_url);
|
|
9
6
|
let node_process = require("node:process");
|
|
10
|
-
|
|
11
|
-
let
|
|
12
|
-
__clack_core = require_chunk.__toESM(__clack_core);
|
|
7
|
+
let _clack_core = require("@clack/core");
|
|
8
|
+
let node_url = require("node:url");
|
|
13
9
|
let picocolors = require("picocolors");
|
|
14
|
-
picocolors =
|
|
10
|
+
picocolors = require_rolldown_runtime.__toESM(picocolors, 1);
|
|
11
|
+
let node_child_process = require("node:child_process");
|
|
12
|
+
let node_os = require("node:os");
|
|
15
13
|
let node_readline = require("node:readline");
|
|
16
|
-
node_readline = require_chunk.__toESM(node_readline);
|
|
17
|
-
|
|
18
14
|
//#region ../prompt/src/options/defaults.ts
|
|
19
|
-
var defaults_exports = /* @__PURE__ */
|
|
15
|
+
var defaults_exports = /* @__PURE__ */ require_rolldown_runtime.__exportAll({
|
|
20
16
|
ENV_PATH: () => ENV_PATH,
|
|
21
17
|
SECRET_PATTERNS: () => SECRET_PATTERNS,
|
|
22
|
-
TRUNCATE_LENGTH: () =>
|
|
18
|
+
TRUNCATE_LENGTH: () => 40
|
|
23
19
|
});
|
|
24
20
|
const ENV_PATH = ".env";
|
|
25
|
-
const TRUNCATE_LENGTH = 40;
|
|
26
21
|
const SECRET_PATTERNS = Object.freeze([
|
|
27
22
|
/password/i,
|
|
28
23
|
/passphrase/i,
|
|
29
24
|
/secret/i,
|
|
30
|
-
/(?<!expires[_-]?in[_-]?)token(?![_-]
|
|
25
|
+
/(?<!(?:^|[_-])(?:expires[_-]?in|expiry|expiration|ttl|lifetime|duration|age|max[_-]?age|validity)[_-])token(?(?:$|[_-]))/i,
|
|
31
26
|
/api[_-]?key/i,
|
|
32
27
|
/client[_-]?secret/i,
|
|
33
28
|
/private[_-]?key/i,
|
|
@@ -36,7 +31,6 @@ const SECRET_PATTERNS = Object.freeze([
|
|
|
36
31
|
/access[_-]?key/i,
|
|
37
32
|
/credential/i
|
|
38
33
|
]);
|
|
39
|
-
|
|
40
34
|
//#endregion
|
|
41
35
|
//#region ../prompt/src/visuals/Theme.ts
|
|
42
36
|
var Theme = class Theme {
|
|
@@ -79,28 +73,9 @@ var Theme = class Theme {
|
|
|
79
73
|
return picocolors.default.bgBlack;
|
|
80
74
|
}
|
|
81
75
|
};
|
|
82
|
-
|
|
83
|
-
//#endregion
|
|
84
|
-
//#region ../prompt/src/visuals/symbols.ts
|
|
85
|
-
const S_BAR = "│";
|
|
86
|
-
const S_BAR_END = "└";
|
|
87
|
-
const S_BAR_START = "┌";
|
|
88
|
-
const S_STEP_ACTIVE = "◆";
|
|
89
|
-
const S_STEP_SUBMIT = "✔";
|
|
90
|
-
const S_STEP_SKIP = "⏭";
|
|
91
|
-
const S_STEP_CANCEL = "✕";
|
|
92
|
-
const S_STEP_ERROR = "▲";
|
|
93
|
-
const S_STEP_PREVIOUS = "⏮";
|
|
94
|
-
const S_TOOL_ACTIVE = "■";
|
|
95
|
-
const S_TOOL_INACTIVE = "□";
|
|
96
|
-
const S_RADIO_ACTIVE = "●";
|
|
97
|
-
const S_RADIO_INACTIVE = "○";
|
|
98
|
-
const S_CURSOR = "█";
|
|
99
|
-
const SECRET_MASK = "•";
|
|
100
|
-
|
|
101
76
|
//#endregion
|
|
102
77
|
//#region ../prompt/src/prompts/ThemedPrompt.ts
|
|
103
|
-
var ThemedPrompt = class extends
|
|
78
|
+
var ThemedPrompt = class extends _clack_core.Prompt {
|
|
104
79
|
theme;
|
|
105
80
|
constructor(opts, trackValue = false) {
|
|
106
81
|
super(opts, trackValue);
|
|
@@ -112,11 +87,11 @@ var ThemedPrompt = class extends __clack_core.Prompt {
|
|
|
112
87
|
getSymbol() {
|
|
113
88
|
switch (this.state) {
|
|
114
89
|
case "initial":
|
|
115
|
-
case "active": return this.theme.primary(
|
|
116
|
-
case "error": return this.theme.warn(
|
|
117
|
-
case "submit": return this.theme.primary(
|
|
118
|
-
case "cancel": return this.theme.error(
|
|
119
|
-
default: return this.theme.primary(
|
|
90
|
+
case "active": return this.theme.primary("◆");
|
|
91
|
+
case "error": return this.theme.warn("▲");
|
|
92
|
+
case "submit": return this.theme.primary("✔");
|
|
93
|
+
case "cancel": return this.theme.error("✕");
|
|
94
|
+
default: return this.theme.primary("◆");
|
|
120
95
|
}
|
|
121
96
|
}
|
|
122
97
|
/**
|
|
@@ -129,10 +104,10 @@ var ThemedPrompt = class extends __clack_core.Prompt {
|
|
|
129
104
|
* Get bar symbols with appropriate coloring
|
|
130
105
|
*/
|
|
131
106
|
getBar() {
|
|
132
|
-
return this.getBarColor(
|
|
107
|
+
return this.getBarColor("│");
|
|
133
108
|
}
|
|
134
109
|
getBarEnd() {
|
|
135
|
-
return this.getBarColor(
|
|
110
|
+
return this.getBarColor("└");
|
|
136
111
|
}
|
|
137
112
|
/**
|
|
138
113
|
* Color utilities for consistent theming
|
|
@@ -151,14 +126,13 @@ var ThemedPrompt = class extends __clack_core.Prompt {
|
|
|
151
126
|
};
|
|
152
127
|
}
|
|
153
128
|
};
|
|
154
|
-
|
|
155
129
|
//#endregion
|
|
156
130
|
//#region ../prompt/src/prompts/utils/ClackPromptInternals.ts
|
|
157
131
|
/** Hacks to access private members of Clack prompts */
|
|
158
132
|
var ClackPromptInternals = class {
|
|
159
133
|
prompt;
|
|
160
|
-
constructor(prompt
|
|
161
|
-
this.prompt = prompt
|
|
134
|
+
constructor(prompt) {
|
|
135
|
+
this.prompt = prompt;
|
|
162
136
|
}
|
|
163
137
|
set track(enabled) {
|
|
164
138
|
this.prompt._track = enabled;
|
|
@@ -167,7 +141,6 @@ var ClackPromptInternals = class {
|
|
|
167
141
|
return this.prompt._track;
|
|
168
142
|
}
|
|
169
143
|
};
|
|
170
|
-
|
|
171
144
|
//#endregion
|
|
172
145
|
//#region ../prompt/src/prompts/utils/padActiveRender.ts
|
|
173
146
|
/**
|
|
@@ -185,19 +158,20 @@ function padActiveRender(render) {
|
|
|
185
158
|
return result + "\n";
|
|
186
159
|
};
|
|
187
160
|
}
|
|
188
|
-
|
|
189
161
|
//#endregion
|
|
190
162
|
//#region ../prompt/src/prompts/toolbar/Toolbar.ts
|
|
191
163
|
var Toolbar = class {
|
|
192
164
|
_isOpen = false;
|
|
193
165
|
cursor = 0;
|
|
194
166
|
previous;
|
|
167
|
+
link;
|
|
195
168
|
theme;
|
|
196
169
|
actions;
|
|
197
170
|
secret;
|
|
198
171
|
constructor(config) {
|
|
199
172
|
this.previous = config.previous;
|
|
200
173
|
this.secret = config.secret;
|
|
174
|
+
this.link = config.link;
|
|
201
175
|
this.theme = config.theme;
|
|
202
176
|
this.actions = config.actions;
|
|
203
177
|
}
|
|
@@ -248,7 +222,7 @@ var Toolbar = class {
|
|
|
248
222
|
const separator = this.theme.subtle(" / ");
|
|
249
223
|
return `${options.map((option, index) => {
|
|
250
224
|
const isFocused = index === this.cursor;
|
|
251
|
-
const label = `${isFocused ?
|
|
225
|
+
const label = `${isFocused ? "■" : "□"} ${option.label}`;
|
|
252
226
|
return isFocused ? this.theme.primary(label) : this.theme.subtle(label);
|
|
253
227
|
}).join(separator)}${separator}${this.theme.subtle("Tab to return")}`;
|
|
254
228
|
}
|
|
@@ -294,10 +268,14 @@ var Toolbar = class {
|
|
|
294
268
|
label: this.secret === "shown" ? "Hide" : "Show",
|
|
295
269
|
action: this.actions.toggleSecret
|
|
296
270
|
});
|
|
271
|
+
if (this.link) options.push({
|
|
272
|
+
key: "openLink",
|
|
273
|
+
label: "Open link",
|
|
274
|
+
action: this.actions.openLink
|
|
275
|
+
});
|
|
297
276
|
return options;
|
|
298
277
|
}
|
|
299
278
|
};
|
|
300
|
-
|
|
301
279
|
//#endregion
|
|
302
280
|
//#region ../prompt/src/prompts/state/EnvPromptModeDetails.ts
|
|
303
281
|
/**
|
|
@@ -336,7 +314,6 @@ function createState(modeDetails) {
|
|
|
336
314
|
...computeState(modeDetails)
|
|
337
315
|
};
|
|
338
316
|
}
|
|
339
|
-
|
|
340
317
|
//#endregion
|
|
341
318
|
//#region ../prompt/src/prompts/state/EnvPromptMode.ts
|
|
342
319
|
/**
|
|
@@ -499,7 +476,6 @@ var EnvPromptMode = class {
|
|
|
499
476
|
return this.intention;
|
|
500
477
|
}
|
|
501
478
|
};
|
|
502
|
-
|
|
503
479
|
//#endregion
|
|
504
480
|
//#region ../prompt/src/prompts/processing/processValue.ts
|
|
505
481
|
/**
|
|
@@ -518,14 +494,15 @@ function processValue(envKey, value, schema, preprocess) {
|
|
|
518
494
|
if (typeof preprocess === "function") return preprocess;
|
|
519
495
|
return require_src.resolvePreprocessor(schema.type);
|
|
520
496
|
})();
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
497
|
+
let processedValue = value;
|
|
498
|
+
if (activePreprocessor) try {
|
|
499
|
+
processedValue = activePreprocessor(value);
|
|
500
|
+
} catch {
|
|
501
|
+
processedValue = value;
|
|
502
|
+
}
|
|
503
|
+
if (!schema.process) throw new Error(`No processor configured for ${envKey}`);
|
|
527
504
|
return {
|
|
528
|
-
value: schema.process(
|
|
505
|
+
value: schema.process(processedValue),
|
|
529
506
|
rawValue: value,
|
|
530
507
|
isValid: true
|
|
531
508
|
};
|
|
@@ -538,7 +515,6 @@ function processValue(envKey, value, schema, preprocess) {
|
|
|
538
515
|
};
|
|
539
516
|
}
|
|
540
517
|
}
|
|
541
|
-
|
|
542
518
|
//#endregion
|
|
543
519
|
//#region ../prompt/src/prompts/EnvPrompt.ts
|
|
544
520
|
var EnvPrompt = class extends ThemedPrompt {
|
|
@@ -573,7 +549,7 @@ var EnvPrompt = class extends ThemedPrompt {
|
|
|
573
549
|
/** State machine managing prompt interaction modes. */
|
|
574
550
|
mode;
|
|
575
551
|
constructor(schema, opts) {
|
|
576
|
-
const { pad = true
|
|
552
|
+
const { pad = true, ...promptOpts } = opts;
|
|
577
553
|
const promptOptions = {
|
|
578
554
|
...promptOpts,
|
|
579
555
|
default: schema.default,
|
|
@@ -614,11 +590,13 @@ var EnvPrompt = class extends ThemedPrompt {
|
|
|
614
590
|
this.toolbar = new Toolbar({
|
|
615
591
|
previous: this.index > 0,
|
|
616
592
|
secret: hasSecret ? this.mode.isSecretRevealed() ? "shown" : "hidden" : false,
|
|
593
|
+
link: this.schema.link,
|
|
617
594
|
theme: this.theme,
|
|
618
595
|
actions: {
|
|
619
596
|
toggleSecret: () => this.handleToggleSecret(),
|
|
620
597
|
skip: () => this.handleSkip(),
|
|
621
|
-
previous: () => this.handlePrevious()
|
|
598
|
+
previous: () => this.handlePrevious(),
|
|
599
|
+
openLink: () => this.handleOpenLink()
|
|
622
600
|
}
|
|
623
601
|
});
|
|
624
602
|
this.on("finalize", () => {
|
|
@@ -720,10 +698,10 @@ var EnvPrompt = class extends ThemedPrompt {
|
|
|
720
698
|
return `${value.substring(0, this.truncate)}...`;
|
|
721
699
|
}
|
|
722
700
|
renderSkipped() {
|
|
723
|
-
return `${this.colors.dim(this.theme.primary(
|
|
701
|
+
return `${this.colors.dim(this.theme.primary("⏭"))} ${this.colors.subtle(this.colors.bold(this.key))}`;
|
|
724
702
|
}
|
|
725
703
|
renderPrevious() {
|
|
726
|
-
return `${this.colors.dim(this.theme.primary(
|
|
704
|
+
return `${this.colors.dim(this.theme.primary("⏮"))} ${this.colors.subtle(this.colors.bold(this.key))}`;
|
|
727
705
|
}
|
|
728
706
|
renderOutcomeResult() {
|
|
729
707
|
const intention = this.mode.intention;
|
|
@@ -731,7 +709,7 @@ var EnvPrompt = class extends ThemedPrompt {
|
|
|
731
709
|
if (intention === "previous") return this.renderPrevious();
|
|
732
710
|
}
|
|
733
711
|
renderCancelled() {
|
|
734
|
-
return `${this.theme.error(
|
|
712
|
+
return `${this.theme.error("✕")} ${this.colors.subtle(this.colors.bold(this.key))}`;
|
|
735
713
|
}
|
|
736
714
|
toggleSecretReveal() {
|
|
737
715
|
if (!this.mode.hasSecret()) return;
|
|
@@ -758,6 +736,26 @@ var EnvPrompt = class extends ThemedPrompt {
|
|
|
758
736
|
this.value = void 0;
|
|
759
737
|
this.state = "submit";
|
|
760
738
|
}
|
|
739
|
+
handleOpenLink() {
|
|
740
|
+
const link = this.schema.link;
|
|
741
|
+
if (!link) return;
|
|
742
|
+
let url;
|
|
743
|
+
try {
|
|
744
|
+
url = new URL(link);
|
|
745
|
+
} catch {
|
|
746
|
+
console.error("Failed to open link");
|
|
747
|
+
return;
|
|
748
|
+
}
|
|
749
|
+
if (url.protocol !== "http:" && url.protocol !== "https:") {
|
|
750
|
+
console.error("Failed to open link");
|
|
751
|
+
return;
|
|
752
|
+
}
|
|
753
|
+
this.mode.suppressValidation();
|
|
754
|
+
const [executable, args] = (0, node_os.platform)() === "win32" ? ["rundll32.exe", ["url.dll,FileProtocolHandler", url.href]] : (0, node_os.platform)() === "darwin" ? ["open", [url.href]] : ["xdg-open", [url.href]];
|
|
755
|
+
(0, node_child_process.execFile)(executable, args, (error) => {
|
|
756
|
+
if (error) console.error("Failed to open link");
|
|
757
|
+
});
|
|
758
|
+
}
|
|
761
759
|
consumeSkipValidation() {
|
|
762
760
|
if (this.mode.state.shouldSkipValidation) {
|
|
763
761
|
this.mode.restoreValidation();
|
|
@@ -792,7 +790,6 @@ var EnvPrompt = class extends ThemedPrompt {
|
|
|
792
790
|
return labels.length > 0 ? labels.join(", ") : void 0;
|
|
793
791
|
}
|
|
794
792
|
};
|
|
795
|
-
|
|
796
793
|
//#endregion
|
|
797
794
|
//#region ../prompt/src/prompts/utils/selectableOptions.ts
|
|
798
795
|
function buildSelectableOptions(params) {
|
|
@@ -836,7 +833,6 @@ function getOptionAtCursor(options, cursor) {
|
|
|
836
833
|
index
|
|
837
834
|
};
|
|
838
835
|
}
|
|
839
|
-
|
|
840
836
|
//#endregion
|
|
841
837
|
//#region ../prompt/src/prompts/typed/EnvBooleanPrompt.ts
|
|
842
838
|
var EnvBooleanPrompt = class extends EnvPrompt {
|
|
@@ -856,11 +852,11 @@ var EnvBooleanPrompt = class extends EnvPrompt {
|
|
|
856
852
|
output += `${this.getSymbol()} ${this.colors.bold(this.colors.white(this.key))}`;
|
|
857
853
|
if (this.schema.description) output += ` ${this.colors.subtle(this.schema.description)}`;
|
|
858
854
|
output += "\n";
|
|
859
|
-
const options
|
|
855
|
+
const options = this.buildOptions();
|
|
860
856
|
const dimInputs = !this.error && this.mode.isToolbarOpen();
|
|
861
|
-
options
|
|
857
|
+
options.forEach((option, index) => {
|
|
862
858
|
const isSelected = index === this.cursor;
|
|
863
|
-
const circle = dimInputs ? this.colors.dim(isSelected ?
|
|
859
|
+
const circle = dimInputs ? this.colors.dim(isSelected ? "●" : "○") : isSelected ? this.theme.primary("●") : this.colors.dim("○");
|
|
864
860
|
const formatText = (value) => {
|
|
865
861
|
if (dimInputs) return this.colors.dim(value);
|
|
866
862
|
if (isSelected) return this.colors.white(value);
|
|
@@ -892,9 +888,9 @@ var EnvBooleanPrompt = class extends EnvPrompt {
|
|
|
892
888
|
this.on("cursor", (action) => {
|
|
893
889
|
this.clearErrorState();
|
|
894
890
|
if (!this.error && this.mode.isToolbarOpen()) return;
|
|
895
|
-
const options
|
|
896
|
-
if (!options
|
|
897
|
-
const lastIndex = options
|
|
891
|
+
const options = this.buildOptions();
|
|
892
|
+
if (!options.length) return;
|
|
893
|
+
const lastIndex = options.length - 1;
|
|
898
894
|
switch (action) {
|
|
899
895
|
case "up":
|
|
900
896
|
this.cursor = this.cursor === 0 ? lastIndex : this.cursor - 1;
|
|
@@ -905,7 +901,6 @@ var EnvBooleanPrompt = class extends EnvPrompt {
|
|
|
905
901
|
default:
|
|
906
902
|
if (this.cursor > lastIndex) this.cursor = lastIndex;
|
|
907
903
|
if (this.cursor < 0) this.cursor = 0;
|
|
908
|
-
break;
|
|
909
904
|
}
|
|
910
905
|
this.updateValue();
|
|
911
906
|
});
|
|
@@ -954,7 +949,6 @@ var EnvBooleanPrompt = class extends EnvPrompt {
|
|
|
954
949
|
return option;
|
|
955
950
|
}
|
|
956
951
|
};
|
|
957
|
-
|
|
958
952
|
//#endregion
|
|
959
953
|
//#region ../prompt/src/prompts/typed/EnvEnumPrompt.ts
|
|
960
954
|
var EnvEnumPrompt = class extends EnvPrompt {
|
|
@@ -975,11 +969,11 @@ var EnvEnumPrompt = class extends EnvPrompt {
|
|
|
975
969
|
output += `${this.getSymbol()} ${this.colors.bold(this.colors.white(this.key))}`;
|
|
976
970
|
if (this.schema.description) output += ` ${this.colors.subtle(this.schema.description)}`;
|
|
977
971
|
output += "\n";
|
|
978
|
-
const options
|
|
972
|
+
const options = this.buildOptions();
|
|
979
973
|
const dimInputs = !this.error && this.mode.isToolbarOpen();
|
|
980
|
-
options
|
|
974
|
+
options.forEach((option, index) => {
|
|
981
975
|
const isSelected = index === this.cursor;
|
|
982
|
-
const circle = dimInputs ? this.colors.dim(isSelected ?
|
|
976
|
+
const circle = dimInputs ? this.colors.dim(isSelected ? "●" : "○") : isSelected ? this.theme.primary("●") : this.colors.dim("○");
|
|
983
977
|
const formatText = (value) => {
|
|
984
978
|
if (dimInputs) return this.colors.dim(value);
|
|
985
979
|
if (isSelected) return this.colors.white(value);
|
|
@@ -1015,9 +1009,9 @@ var EnvEnumPrompt = class extends EnvPrompt {
|
|
|
1015
1009
|
this.on("cursor", (action) => {
|
|
1016
1010
|
this.clearErrorState();
|
|
1017
1011
|
if (!this.error && this.mode.isToolbarOpen()) return;
|
|
1018
|
-
const options
|
|
1019
|
-
if (!options
|
|
1020
|
-
const lastIndex = options
|
|
1012
|
+
const options = this.buildOptions();
|
|
1013
|
+
if (!options.length) return;
|
|
1014
|
+
const lastIndex = options.length - 1;
|
|
1021
1015
|
switch (action) {
|
|
1022
1016
|
case "up":
|
|
1023
1017
|
this.cursor = this.cursor === 0 ? lastIndex : this.cursor - 1;
|
|
@@ -1028,7 +1022,6 @@ var EnvEnumPrompt = class extends EnvPrompt {
|
|
|
1028
1022
|
default:
|
|
1029
1023
|
if (this.cursor > lastIndex) this.cursor = lastIndex;
|
|
1030
1024
|
if (this.cursor < 0) this.cursor = 0;
|
|
1031
|
-
break;
|
|
1032
1025
|
}
|
|
1033
1026
|
this.updateValue();
|
|
1034
1027
|
});
|
|
@@ -1046,8 +1039,8 @@ var EnvEnumPrompt = class extends EnvPrompt {
|
|
|
1046
1039
|
return;
|
|
1047
1040
|
}
|
|
1048
1041
|
if (selected.invalid) {
|
|
1049
|
-
const fallback
|
|
1050
|
-
this.setCommittedValue(fallback
|
|
1042
|
+
const fallback = this.default ?? this.values[0];
|
|
1043
|
+
this.setCommittedValue(fallback);
|
|
1051
1044
|
return;
|
|
1052
1045
|
}
|
|
1053
1046
|
const fallback = this.default ?? this.values[0];
|
|
@@ -1078,7 +1071,6 @@ var EnvEnumPrompt = class extends EnvPrompt {
|
|
|
1078
1071
|
return option;
|
|
1079
1072
|
}
|
|
1080
1073
|
};
|
|
1081
|
-
|
|
1082
1074
|
//#endregion
|
|
1083
1075
|
//#region ../prompt/src/prompts/typed/EnvNumberPrompt.ts
|
|
1084
1076
|
var EnvNumberPrompt = class extends EnvPrompt {
|
|
@@ -1114,7 +1106,7 @@ var EnvNumberPrompt = class extends EnvPrompt {
|
|
|
1114
1106
|
}
|
|
1115
1107
|
this.buildSelectionOptions().forEach((option, index) => {
|
|
1116
1108
|
const isSelected = index === this.mode.getCursor();
|
|
1117
|
-
const circle = dimInputs ? this.colors.dim(isSelected ?
|
|
1109
|
+
const circle = dimInputs ? this.colors.dim(isSelected ? "●" : "○") : isSelected ? this.theme.primary("●") : this.colors.dim("○");
|
|
1118
1110
|
if (option.type === "other") {
|
|
1119
1111
|
if (this.mode.isInInteraction("typing")) {
|
|
1120
1112
|
const displayText = dimInputs ? this.colors.dim(this.getInputDisplay(false)) : this.colors.white(this.getInputDisplay(true));
|
|
@@ -1122,8 +1114,8 @@ var EnvNumberPrompt = class extends EnvPrompt {
|
|
|
1122
1114
|
} else if (isSelected) if (dimInputs) output += `${this.getBar()} ${circle} ${this.colors.dim(option.label)}\n`;
|
|
1123
1115
|
else output += `${this.getBar()} ${circle} ${this.colors.white(this.getInputDisplay(true))}\n`;
|
|
1124
1116
|
else {
|
|
1125
|
-
const text
|
|
1126
|
-
output += `${this.getBar()} ${circle} ${text
|
|
1117
|
+
const text = dimInputs ? this.colors.dim(option.label) : this.colors.subtle(option.label);
|
|
1118
|
+
output += `${this.getBar()} ${circle} ${text}\n`;
|
|
1127
1119
|
}
|
|
1128
1120
|
return;
|
|
1129
1121
|
}
|
|
@@ -1228,7 +1220,6 @@ var EnvNumberPrompt = class extends EnvPrompt {
|
|
|
1228
1220
|
this.otherInputCache = "";
|
|
1229
1221
|
}
|
|
1230
1222
|
this.mode.moveCursor("down", maxIndexDown);
|
|
1231
|
-
break;
|
|
1232
1223
|
}
|
|
1233
1224
|
this.updateValue();
|
|
1234
1225
|
});
|
|
@@ -1286,8 +1277,8 @@ var EnvNumberPrompt = class extends EnvPrompt {
|
|
|
1286
1277
|
"tab"
|
|
1287
1278
|
].includes(info.name || "");
|
|
1288
1279
|
if (!isArrowKey && !isControlKey) {
|
|
1289
|
-
const textInputIndex
|
|
1290
|
-
this.mode.setCursor(textInputIndex
|
|
1280
|
+
const textInputIndex = this.getTextInputIndex();
|
|
1281
|
+
this.mode.setCursor(textInputIndex);
|
|
1291
1282
|
const existingInput = this.mode.getInputValue() || this.userInput || this.otherInputCache || "";
|
|
1292
1283
|
this.mode.enterTyping(existingInput);
|
|
1293
1284
|
const nextInput = `${existingInput}${char}`;
|
|
@@ -1317,7 +1308,7 @@ var EnvNumberPrompt = class extends EnvPrompt {
|
|
|
1317
1308
|
if (!includeCursor) return inputValue;
|
|
1318
1309
|
const rawCursor = this.mode.isInInteraction("typing") ? Math.max(0, this._cursor ?? inputValue.length) : 0;
|
|
1319
1310
|
const cursorIndex = Math.min(rawCursor, inputValue.length);
|
|
1320
|
-
if (cursorIndex >= inputValue.length) return `${inputValue}
|
|
1311
|
+
if (cursorIndex >= inputValue.length) return `${inputValue}█`;
|
|
1321
1312
|
const before = inputValue.slice(0, cursorIndex);
|
|
1322
1313
|
const cursorChar = inputValue.charAt(cursorIndex) || " ";
|
|
1323
1314
|
const after = inputValue.slice(cursorIndex + 1);
|
|
@@ -1463,7 +1454,6 @@ var EnvNumberPrompt = class extends EnvPrompt {
|
|
|
1463
1454
|
return index === -1 ? options.length - 1 : index;
|
|
1464
1455
|
}
|
|
1465
1456
|
};
|
|
1466
|
-
|
|
1467
1457
|
//#endregion
|
|
1468
1458
|
//#region ../prompt/src/utils/secrets.ts
|
|
1469
1459
|
function isSecretMatch(value, pattern) {
|
|
@@ -1483,7 +1473,7 @@ function isSecretKey(key, description, patterns) {
|
|
|
1483
1473
|
for (const pattern of patterns) if (isSecretMatch(key, pattern) || isSecretMatch(description, pattern)) return true;
|
|
1484
1474
|
return false;
|
|
1485
1475
|
}
|
|
1486
|
-
function maskSecretValue(value, maskChar =
|
|
1476
|
+
function maskSecretValue(value, maskChar = "•") {
|
|
1487
1477
|
if (!value) return value;
|
|
1488
1478
|
return value.replace(/./g, maskChar);
|
|
1489
1479
|
}
|
|
@@ -1492,7 +1482,6 @@ function resolveShouldMask(key, schema, patterns) {
|
|
|
1492
1482
|
if ("secret" in schema && schema.secret !== void 0) return schema.secret;
|
|
1493
1483
|
return isSecretKey(key, schema.description, patterns);
|
|
1494
1484
|
}
|
|
1495
|
-
|
|
1496
1485
|
//#endregion
|
|
1497
1486
|
//#region ../prompt/src/prompts/typed/EnvStringPrompt.ts
|
|
1498
1487
|
var EnvStringPrompt = class extends EnvPrompt {
|
|
@@ -1525,7 +1514,7 @@ var EnvStringPrompt = class extends EnvPrompt {
|
|
|
1525
1514
|
}
|
|
1526
1515
|
this.buildSelectionOptions().forEach((option, index) => {
|
|
1527
1516
|
const isSelected = index === this.mode.getCursor();
|
|
1528
|
-
const circle = dimInputs ? this.colors.dim(isSelected ?
|
|
1517
|
+
const circle = dimInputs ? this.colors.dim(isSelected ? "●" : "○") : isSelected ? this.theme.primary("●") : this.colors.dim("○");
|
|
1529
1518
|
if (option.type === "other") {
|
|
1530
1519
|
if (this.mode.isInInteraction("typing")) {
|
|
1531
1520
|
const displayText = dimInputs ? this.colors.dim(this.getInputDisplay(false)) : this.colors.white(this.getInputDisplay(true));
|
|
@@ -1533,8 +1522,8 @@ var EnvStringPrompt = class extends EnvPrompt {
|
|
|
1533
1522
|
} else if (isSelected) if (dimInputs) output += `${this.getBar()} ${circle} ${this.colors.dim(option.label)}\n`;
|
|
1534
1523
|
else output += `${this.getBar()} ${circle} ${this.colors.white(this.getInputDisplay(true))}\n`;
|
|
1535
1524
|
else {
|
|
1536
|
-
const text
|
|
1537
|
-
output += `${this.getBar()} ${circle} ${text
|
|
1525
|
+
const text = dimInputs ? this.colors.dim(option.label) : this.colors.subtle(option.label);
|
|
1526
|
+
output += `${this.getBar()} ${circle} ${text}\n`;
|
|
1538
1527
|
}
|
|
1539
1528
|
return;
|
|
1540
1529
|
}
|
|
@@ -1708,8 +1697,8 @@ var EnvStringPrompt = class extends EnvPrompt {
|
|
|
1708
1697
|
"tab"
|
|
1709
1698
|
].includes(info.name || "");
|
|
1710
1699
|
if (!isArrowKey && !isControlKey) {
|
|
1711
|
-
const textInputIndex
|
|
1712
|
-
this.mode.setCursor(textInputIndex
|
|
1700
|
+
const textInputIndex = this.getTextInputIndex();
|
|
1701
|
+
this.mode.setCursor(textInputIndex);
|
|
1713
1702
|
const existingInput = this.mode.getInputValue() || this.userInput || this.otherInputCache || "";
|
|
1714
1703
|
this.mode.enterTyping(existingInput);
|
|
1715
1704
|
const nextInput = `${existingInput}${char}`;
|
|
@@ -1851,7 +1840,7 @@ var EnvStringPrompt = class extends EnvPrompt {
|
|
|
1851
1840
|
return this.truncateValue(display);
|
|
1852
1841
|
}
|
|
1853
1842
|
maskValue(value) {
|
|
1854
|
-
return maskSecretValue(value,
|
|
1843
|
+
return maskSecretValue(value, "•");
|
|
1855
1844
|
}
|
|
1856
1845
|
getTextInputIndex() {
|
|
1857
1846
|
if (!this.hasPresetOptions()) return 0;
|
|
@@ -1865,9 +1854,9 @@ var EnvStringPrompt = class extends EnvPrompt {
|
|
|
1865
1854
|
const base = isMasked ? this.maskValue(inputValue) : inputValue;
|
|
1866
1855
|
if (!includeCursor) return base;
|
|
1867
1856
|
const rawCursor = this.mode.isInInteraction("typing") ? Math.max(0, this._cursor ?? inputValue.length) : 0;
|
|
1868
|
-
const maskLength = isMasked ? Math.max(1,
|
|
1857
|
+
const maskLength = isMasked ? Math.max(1, 1) : 1;
|
|
1869
1858
|
const cursorIndex = Math.min(rawCursor * maskLength, base.length);
|
|
1870
|
-
if (cursorIndex >= base.length) return `${base}
|
|
1859
|
+
if (cursorIndex >= base.length) return `${base}█`;
|
|
1871
1860
|
const segmentLength = maskLength;
|
|
1872
1861
|
const before = base.slice(0, cursorIndex);
|
|
1873
1862
|
const cursorSegment = base.slice(cursorIndex, cursorIndex + segmentLength) || " ";
|
|
@@ -1900,7 +1889,6 @@ var EnvStringPrompt = class extends EnvPrompt {
|
|
|
1900
1889
|
});
|
|
1901
1890
|
}
|
|
1902
1891
|
};
|
|
1903
|
-
|
|
1904
1892
|
//#endregion
|
|
1905
1893
|
//#region ../prompt/src/prompts/create/createPrompt.ts
|
|
1906
1894
|
function createPrompt({ key, schema, currentValue, theme, truncate, shouldMask, index, total, input, output, preprocessors: preprocessors$1 }) {
|
|
@@ -1945,7 +1933,6 @@ function createPrompt({ key, schema, currentValue, theme, truncate, shouldMask,
|
|
|
1945
1933
|
});
|
|
1946
1934
|
}
|
|
1947
1935
|
}
|
|
1948
|
-
|
|
1949
1936
|
//#endregion
|
|
1950
1937
|
//#region ../prompt/src/utils/clearConsoleLines.ts
|
|
1951
1938
|
function clearConsoleLines(lineCount) {
|
|
@@ -1960,7 +1947,6 @@ function clearConsoleLines(lineCount) {
|
|
|
1960
1947
|
(0, node_readline.cursorTo)(output, 0);
|
|
1961
1948
|
} catch {}
|
|
1962
1949
|
}
|
|
1963
|
-
|
|
1964
1950
|
//#endregion
|
|
1965
1951
|
//#region ../prompt/src/utils/getDisplayEnvPath.ts
|
|
1966
1952
|
function getDisplayEnvPath(envPath, cwd = process.cwd()) {
|
|
@@ -1969,7 +1955,6 @@ function getDisplayEnvPath(envPath, cwd = process.cwd()) {
|
|
|
1969
1955
|
if (relativeEnvPath.startsWith(".")) return relativeEnvPath;
|
|
1970
1956
|
return `./${relativeEnvPath}`;
|
|
1971
1957
|
}
|
|
1972
|
-
|
|
1973
1958
|
//#endregion
|
|
1974
1959
|
//#region ../prompt/src/session/Session.ts
|
|
1975
1960
|
var Session = class Session {
|
|
@@ -2016,7 +2001,7 @@ var Session = class Session {
|
|
|
2016
2001
|
}
|
|
2017
2002
|
const shouldMask = resolveShouldMask(key, envVarSchema, this.secrets);
|
|
2018
2003
|
const storedValue = this.newValues[key] ?? currentValues[key];
|
|
2019
|
-
const prompt
|
|
2004
|
+
const prompt = createPrompt({
|
|
2020
2005
|
key,
|
|
2021
2006
|
schema: envVarSchema,
|
|
2022
2007
|
currentValue: storedValue && storedValue.trim() !== "" ? storedValue : void 0,
|
|
@@ -2029,10 +2014,10 @@ var Session = class Session {
|
|
|
2029
2014
|
output: this.output,
|
|
2030
2015
|
preprocessors: this.preprocessors
|
|
2031
2016
|
});
|
|
2032
|
-
const value = await prompt
|
|
2017
|
+
const value = await prompt.prompt();
|
|
2033
2018
|
addedLines++;
|
|
2034
|
-
const outcome = prompt
|
|
2035
|
-
if ((0,
|
|
2019
|
+
const outcome = prompt.getOutcome();
|
|
2020
|
+
if ((0, _clack_core.isCancel)(value) || typeof value === "symbol" && value?.description === "clack:cancel") {
|
|
2036
2021
|
this.output.write(`${picocolors.default.red("│")} \n`);
|
|
2037
2022
|
this.output.write(`${picocolors.default.red("└")} ${picocolors.default.red("Setup cancelled.")}\n\n`);
|
|
2038
2023
|
return "cancelled";
|
|
@@ -2055,12 +2040,12 @@ var Session = class Session {
|
|
|
2055
2040
|
currentValues = await this.channel.get();
|
|
2056
2041
|
this.newValues[key] = stringValue;
|
|
2057
2042
|
} catch (error) {
|
|
2058
|
-
this.output.write(`${picocolors.default.gray(
|
|
2043
|
+
this.output.write(`${picocolors.default.gray("└")} ${picocolors.default.red(`Failed to save ${key}: ${error}`)}\n\n`);
|
|
2059
2044
|
return "error";
|
|
2060
2045
|
}
|
|
2061
2046
|
index++;
|
|
2062
2047
|
}
|
|
2063
|
-
this.output.write(`${picocolors.default.gray(
|
|
2048
|
+
this.output.write(`${picocolors.default.gray("│")}\n${picocolors.default.gray("└")} ${this.theme.primary("Setup complete!")}\n\n`);
|
|
2064
2049
|
return "success";
|
|
2065
2050
|
}
|
|
2066
2051
|
renderSetupHeader() {
|
|
@@ -2073,7 +2058,7 @@ var Session = class Session {
|
|
|
2073
2058
|
`${picocolors.default.gray("│")} ${clickableEnvPath}${picocolors.default.gray(` · ${variableLabel}`)}`,
|
|
2074
2059
|
`${picocolors.default.gray("│")} `
|
|
2075
2060
|
].join("\n");
|
|
2076
|
-
this.output.write(`\n${picocolors.default.gray(
|
|
2061
|
+
this.output.write(`\n${picocolors.default.gray("┌")} ${headerBody}\n`);
|
|
2077
2062
|
}
|
|
2078
2063
|
toHyperlink(text, url) {
|
|
2079
2064
|
const escapeCode = "\x1B";
|
|
@@ -2082,7 +2067,6 @@ var Session = class Session {
|
|
|
2082
2067
|
return `${oscSequence}${url}${stringTerminator}${text}${oscSequence}${stringTerminator}`;
|
|
2083
2068
|
}
|
|
2084
2069
|
};
|
|
2085
|
-
|
|
2086
2070
|
//#endregion
|
|
2087
2071
|
//#region ../prompt/src/options/resolve.ts
|
|
2088
2072
|
function resolveTheme(themeOption) {
|
|
@@ -2097,7 +2081,6 @@ function resolveEnvFilePath(pathOption, rootDir) {
|
|
|
2097
2081
|
if (!rootDir) return pathOption;
|
|
2098
2082
|
return (0, node_path.resolve)(rootDir, pathOption);
|
|
2099
2083
|
}
|
|
2100
|
-
|
|
2101
2084
|
//#endregion
|
|
2102
2085
|
//#region ../prompt/src/utils/isEnvChannel.ts
|
|
2103
2086
|
/**
|
|
@@ -2106,7 +2089,6 @@ function resolveEnvFilePath(pathOption, rootDir) {
|
|
|
2106
2089
|
function isEnvChannel(value) {
|
|
2107
2090
|
return typeof value === "object" && value !== null && "get" in value && "set" in value && typeof value.get === "function" && typeof value.set === "function";
|
|
2108
2091
|
}
|
|
2109
|
-
|
|
2110
2092
|
//#endregion
|
|
2111
2093
|
//#region ../prompt/src/prompt.ts
|
|
2112
2094
|
/**
|
|
@@ -2130,8 +2112,8 @@ async function prompt(modelOrOptions, interactiveOptions) {
|
|
|
2130
2112
|
} else throw new Error("Either provide a model or schemas in options");
|
|
2131
2113
|
}
|
|
2132
2114
|
const rootDirectory = resolveRootDirectory(finalOptions.root);
|
|
2133
|
-
const path = resolveEnvFilePath(finalOptions.path ??
|
|
2134
|
-
const truncate = finalOptions.truncate ??
|
|
2115
|
+
const path = resolveEnvFilePath(finalOptions.path ?? ".env", rootDirectory);
|
|
2116
|
+
const truncate = finalOptions.truncate ?? 40;
|
|
2135
2117
|
const secrets = finalOptions.secrets ?? SECRET_PATTERNS;
|
|
2136
2118
|
const input = node_process.stdin;
|
|
2137
2119
|
const output = node_process.stdout;
|
|
@@ -2149,17 +2131,16 @@ async function prompt(modelOrOptions, interactiveOptions) {
|
|
|
2149
2131
|
preprocess: preprocessConfig
|
|
2150
2132
|
}).run();
|
|
2151
2133
|
}
|
|
2152
|
-
|
|
2153
2134
|
//#endregion
|
|
2154
|
-
Object.defineProperty(exports,
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2135
|
+
Object.defineProperty(exports, "defaults_exports", {
|
|
2136
|
+
enumerable: true,
|
|
2137
|
+
get: function() {
|
|
2138
|
+
return defaults_exports;
|
|
2139
|
+
}
|
|
2140
|
+
});
|
|
2141
|
+
Object.defineProperty(exports, "prompt", {
|
|
2142
|
+
enumerable: true,
|
|
2143
|
+
get: function() {
|
|
2144
|
+
return prompt;
|
|
2145
|
+
}
|
|
2159
2146
|
});
|
|
2160
|
-
Object.defineProperty(exports, 'prompt', {
|
|
2161
|
-
enumerable: true,
|
|
2162
|
-
get: function () {
|
|
2163
|
-
return prompt;
|
|
2164
|
-
}
|
|
2165
|
-
});
|