@swmansion/argent 0.29.1-next.2 → 0.29.1-next.21
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/README.md +1 -1
- package/dist/cli-cmds.mjs +8207 -2882
- package/dist/client.js +410 -329
- package/dist/installer.mjs +1628 -1390
- package/dist/mcp-server.mjs +3097 -1792
- package/dist/tool-args.generated.d.ts +3 -3
- package/dist/tool-server.cjs +26513 -11841
- package/package.json +15 -15
- package/rules/argent.md +1 -1
- package/skills/argent-create-flow/references/flow-yaml.md +3 -3
- package/skills/argent-device-interact/SKILL.md +8 -6
- package/skills/argent-metro-debugger/SKILL.md +2 -2
package/dist/installer.mjs
CHANGED
|
@@ -6,7 +6,7 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
|
6
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
8
|
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
9
|
-
get: (
|
|
9
|
+
get: (a2, b) => (typeof require !== "undefined" ? require : a2)[b]
|
|
10
10
|
}) : x)(function(x) {
|
|
11
11
|
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
12
12
|
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
@@ -51,16 +51,16 @@ var require_src = __commonJS({
|
|
|
51
51
|
var CSI2 = `${ESC2}[`;
|
|
52
52
|
var beep = "\x07";
|
|
53
53
|
var cursor3 = {
|
|
54
|
-
to(x,
|
|
55
|
-
if (!
|
|
56
|
-
return `${CSI2}${
|
|
54
|
+
to(x, y2) {
|
|
55
|
+
if (!y2) return `${CSI2}${x + 1}G`;
|
|
56
|
+
return `${CSI2}${y2 + 1};${x + 1}H`;
|
|
57
57
|
},
|
|
58
|
-
move(x,
|
|
58
|
+
move(x, y2) {
|
|
59
59
|
let ret = "";
|
|
60
60
|
if (x < 0) ret += `${CSI2}${-x}D`;
|
|
61
61
|
else if (x > 0) ret += `${CSI2}${x}C`;
|
|
62
|
-
if (
|
|
63
|
-
else if (
|
|
62
|
+
if (y2 < 0) ret += `${CSI2}${-y2}A`;
|
|
63
|
+
else if (y2 > 0) ret += `${CSI2}${y2}B`;
|
|
64
64
|
return ret;
|
|
65
65
|
},
|
|
66
66
|
up: (count = 1) => `${CSI2}${count}A`,
|
|
@@ -1189,322 +1189,395 @@ var init_esm = __esm({
|
|
|
1189
1189
|
}
|
|
1190
1190
|
});
|
|
1191
1191
|
|
|
1192
|
-
// ../../node_modules/dotenv/
|
|
1193
|
-
var
|
|
1194
|
-
"../../node_modules/dotenv/
|
|
1195
|
-
var
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
"\u25C8 encrypted .env [www.dotenvx.com]",
|
|
1201
|
-
"\u25C8 secrets for agents [www.dotenvx.com]",
|
|
1202
|
-
"\u2301 auth for agents [www.vestauth.com]",
|
|
1203
|
-
"\u2318 custom filepath { path: '/custom/path/.env' }",
|
|
1204
|
-
"\u2318 enable debugging { debug: true }",
|
|
1205
|
-
"\u2318 override existing { override: true }",
|
|
1206
|
-
"\u2318 suppress logs { quiet: true }",
|
|
1207
|
-
"\u2318 multiple files { path: ['.env.local', '.env'] }"
|
|
1208
|
-
];
|
|
1209
|
-
function _getRandomTip() {
|
|
1210
|
-
return TIPS[Math.floor(Math.random() * TIPS.length)];
|
|
1211
|
-
}
|
|
1212
|
-
function parseBoolean(value) {
|
|
1213
|
-
if (typeof value === "string") {
|
|
1214
|
-
return !["false", "0", "no", "off", ""].includes(value.toLowerCase());
|
|
1215
|
-
}
|
|
1216
|
-
return Boolean(value);
|
|
1217
|
-
}
|
|
1218
|
-
function supportsAnsi() {
|
|
1219
|
-
return process.stdout.isTTY;
|
|
1220
|
-
}
|
|
1221
|
-
function dim(text2) {
|
|
1222
|
-
return supportsAnsi() ? `\x1B[2m${text2}\x1B[0m` : text2;
|
|
1223
|
-
}
|
|
1224
|
-
var LINE = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;
|
|
1225
|
-
function parse4(src) {
|
|
1226
|
-
const obj = {};
|
|
1227
|
-
let lines = src.toString();
|
|
1228
|
-
lines = lines.replace(/\r\n?/mg, "\n");
|
|
1229
|
-
let match;
|
|
1230
|
-
while ((match = LINE.exec(lines)) != null) {
|
|
1231
|
-
const key = match[1];
|
|
1232
|
-
let value = match[2] || "";
|
|
1233
|
-
value = value.trim();
|
|
1234
|
-
const maybeQuote = value[0];
|
|
1235
|
-
value = value.replace(/^(['"`])([\s\S]*)\1$/mg, "$2");
|
|
1236
|
-
if (maybeQuote === '"') {
|
|
1237
|
-
value = value.replace(/\\n/g, "\n");
|
|
1238
|
-
value = value.replace(/\\r/g, "\r");
|
|
1239
|
-
}
|
|
1240
|
-
obj[key] = value;
|
|
1241
|
-
}
|
|
1242
|
-
return obj;
|
|
1243
|
-
}
|
|
1244
|
-
function _parseVault(options) {
|
|
1245
|
-
options = options || {};
|
|
1246
|
-
const vaultPath = _vaultPath(options);
|
|
1247
|
-
options.path = vaultPath;
|
|
1248
|
-
const result = DotenvModule.configDotenv(options);
|
|
1249
|
-
if (!result.parsed) {
|
|
1250
|
-
const err = new Error(`MISSING_DATA: Cannot parse ${vaultPath} for an unknown reason`);
|
|
1251
|
-
err.code = "MISSING_DATA";
|
|
1252
|
-
throw err;
|
|
1192
|
+
// ../../node_modules/dotenv/dist/index.cjs
|
|
1193
|
+
var require_dist = __commonJS({
|
|
1194
|
+
"../../node_modules/dotenv/dist/index.cjs"(exports, module) {
|
|
1195
|
+
var j = (e, n3) => () => {
|
|
1196
|
+
try {
|
|
1197
|
+
return n3 || e((n3 = { exports: {} }).exports, n3), n3.exports;
|
|
1198
|
+
} catch (t2) {
|
|
1199
|
+
throw n3 = 0, t2;
|
|
1253
1200
|
}
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
if (i2 + 1 >= length) {
|
|
1265
|
-
throw error;
|
|
1266
|
-
}
|
|
1201
|
+
};
|
|
1202
|
+
var k = j((xe, U2) => {
|
|
1203
|
+
function G(e) {
|
|
1204
|
+
return typeof e == "string" ? !["false", "0", "no", "off", ""].includes(e.toLowerCase()) : !!e;
|
|
1205
|
+
}
|
|
1206
|
+
function Y(e = process.env) {
|
|
1207
|
+
let n3 = {};
|
|
1208
|
+
for (let t2 of ["ENCODING", "PATH", "QUIET", "DEBUG", "OVERRIDE", "FAST"]) {
|
|
1209
|
+
let o = e[`DOTENV_${t2}`] != null ? e[`DOTENV_${t2}`] : e[`DOTENV_CONFIG_${t2}`];
|
|
1210
|
+
o != null && (n3[t2.toLowerCase()] = t2 === "ENCODING" || t2 === "PATH" ? o : G(o));
|
|
1267
1211
|
}
|
|
1212
|
+
return n3;
|
|
1268
1213
|
}
|
|
1269
|
-
|
|
1270
|
-
}
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1214
|
+
U2.exports = { parseBoolean: G, optionsFromEnv: Y };
|
|
1215
|
+
});
|
|
1216
|
+
var N = j((ye, x) => {
|
|
1217
|
+
var z = __require("fs"), I2 = __require("path"), Z = __require("os"), { URL: ee, fileURLToPath: te } = __require("url"), { parseBoolean: $, optionsFromEnv: B } = k(), re2 = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg, b = new Uint8Array(256);
|
|
1218
|
+
for (let e = 48; e <= 57; e++) b[e] = 1;
|
|
1219
|
+
for (let e = 65; e <= 90; e++) b[e] = 1;
|
|
1220
|
+
for (let e = 97; e <= 122; e++) b[e] = 1;
|
|
1221
|
+
b[45] = 1;
|
|
1222
|
+
b[46] = 1;
|
|
1223
|
+
b[95] = 1;
|
|
1224
|
+
function ne(e) {
|
|
1225
|
+
let n3 = {}, t2 = e.toString();
|
|
1226
|
+
t2 = t2.replace(/\r\n?/mg, `
|
|
1227
|
+
`);
|
|
1228
|
+
let o;
|
|
1229
|
+
for (; (o = re2.exec(t2)) != null; ) {
|
|
1230
|
+
let r2 = o[1], s = o[2] || "";
|
|
1231
|
+
s = s.trim();
|
|
1232
|
+
let i2 = s[0];
|
|
1233
|
+
s = s.replace(/^(['"`])([\s\S]*)\1$/mg, "$2"), i2 === '"' && (s = s.replace(/\\n/g, `
|
|
1234
|
+
`), s = s.replace(/\\r/g, "\r")), n3[r2] = s;
|
|
1235
|
+
}
|
|
1236
|
+
return n3;
|
|
1237
|
+
}
|
|
1238
|
+
function w(e) {
|
|
1239
|
+
return e <= 32 ? e === 32 || e >= 9 && e <= 13 : e >= 160 && (e === 160 || e === 5760 || e >= 8192 && e <= 8202 || e === 8232 || e === 8233 || e === 8239 || e === 8287 || e === 12288 || e === 65279);
|
|
1240
|
+
}
|
|
1241
|
+
function q(e) {
|
|
1242
|
+
return e === 10 || e === 8232 || e === 8233;
|
|
1243
|
+
}
|
|
1244
|
+
function oe(e) {
|
|
1245
|
+
let n3 = {}, t2 = typeof e == "string" ? e : e.toString();
|
|
1246
|
+
t2.indexOf("\r") !== -1 && (t2 = t2.replace(/\r\n?/g, `
|
|
1247
|
+
`));
|
|
1248
|
+
let o = t2.length, r2 = 0;
|
|
1249
|
+
for (; r2 < o; ) {
|
|
1250
|
+
let s = t2.charCodeAt(r2);
|
|
1251
|
+
for (; r2 < o && w(s); ) r2++, s = t2.charCodeAt(r2);
|
|
1252
|
+
if (r2 >= o) break;
|
|
1253
|
+
if (s === 35) {
|
|
1254
|
+
for (; r2 < o && !q(t2.charCodeAt(r2)); ) r2++;
|
|
1255
|
+
continue;
|
|
1256
|
+
}
|
|
1257
|
+
let i2 = -1;
|
|
1258
|
+
if (s === 101 && r2 + 6 < o && t2.charCodeAt(r2 + 1) === 120 && t2.charCodeAt(r2 + 2) === 112 && t2.charCodeAt(r2 + 3) === 111 && t2.charCodeAt(r2 + 4) === 114 && t2.charCodeAt(r2 + 5) === 116) {
|
|
1259
|
+
let v = t2.charCodeAt(r2 + 6);
|
|
1260
|
+
if (w(v)) {
|
|
1261
|
+
let u3 = r2 + 7;
|
|
1262
|
+
for (; u3 < o && w(t2.charCodeAt(u3)); ) u3++;
|
|
1263
|
+
b[t2.charCodeAt(u3)] && (i2 = r2 + 6, r2 = u3);
|
|
1264
|
+
} else s = t2.charCodeAt(r2);
|
|
1265
|
+
}
|
|
1266
|
+
let l2 = r2, d = 0;
|
|
1267
|
+
for (; r2 < o && (d = t2.charCodeAt(r2), b[d]); ) r2++;
|
|
1268
|
+
if (r2 === l2) {
|
|
1269
|
+
for (; r2 < o && !q(t2.charCodeAt(r2)); ) r2++;
|
|
1270
|
+
continue;
|
|
1271
|
+
}
|
|
1272
|
+
let h2 = t2.slice(l2, r2), f = r2;
|
|
1273
|
+
if (r2 >= o && (d = 0), w(d)) do
|
|
1274
|
+
r2++, d = r2 < o ? t2.charCodeAt(r2) : 0;
|
|
1275
|
+
while (w(d));
|
|
1276
|
+
if (d === 61) r2++;
|
|
1277
|
+
else if (d === 58 && r2 === f && r2 + 1 < o && w(t2.charCodeAt(r2 + 1))) r2 += 2;
|
|
1278
|
+
else {
|
|
1279
|
+
for (r2 = i2 === -1 ? f : i2; r2 < o && !q(t2.charCodeAt(r2)); ) r2++;
|
|
1280
|
+
continue;
|
|
1281
|
+
}
|
|
1282
|
+
let c2 = r2, a2 = r2;
|
|
1283
|
+
for (; a2 < o && w(t2.charCodeAt(a2)); ) a2++;
|
|
1284
|
+
let g = t2.charCodeAt(a2), p, y2 = false;
|
|
1285
|
+
if (g === 39 || g === 34 || g === 96) {
|
|
1286
|
+
let v = t2[a2], u3 = t2.indexOf(v, a2 + 1), m2 = -1, C2 = -1;
|
|
1287
|
+
for (; u3 !== -1; ) {
|
|
1288
|
+
let O = t2.charCodeAt(u3 - 1) === 92, E = u3 + 1;
|
|
1289
|
+
for (; E < o && !q(t2.charCodeAt(E)) && w(t2.charCodeAt(E)); ) E++;
|
|
1290
|
+
if ((E === o || q(t2.charCodeAt(E)) || t2.charCodeAt(E) === 35) && (m2 = u3, C2 = E), !O) break;
|
|
1291
|
+
u3 = t2.indexOf(v, u3 + 1);
|
|
1292
|
+
}
|
|
1293
|
+
if (m2 !== -1) {
|
|
1294
|
+
if (p = t2.slice(a2 + 1, m2), r2 = C2, t2.charCodeAt(r2) === 35) for (; r2 < o && !q(t2.charCodeAt(r2)); ) r2++;
|
|
1295
|
+
y2 = true;
|
|
1296
|
+
}
|
|
1297
|
+
}
|
|
1298
|
+
if (!y2) {
|
|
1299
|
+
let v = t2.indexOf(`
|
|
1300
|
+
`, c2);
|
|
1301
|
+
v === -1 && (v = o);
|
|
1302
|
+
let u3;
|
|
1303
|
+
if (o < 4096) u3 = t2.indexOf("#", c2), (u3 === -1 || u3 > v) && (u3 = v);
|
|
1304
|
+
else for (u3 = c2; u3 < v && t2.charCodeAt(u3) !== 35; ) u3++;
|
|
1305
|
+
let m2 = c2, C2 = u3;
|
|
1306
|
+
for (; m2 < C2 && w(t2.charCodeAt(m2)); ) m2++;
|
|
1307
|
+
for (; C2 > m2 && w(t2.charCodeAt(C2 - 1)); ) C2--;
|
|
1308
|
+
let O = t2.charCodeAt(m2);
|
|
1309
|
+
if (p = t2.slice(m2, C2), p.includes("\u2028") || p.includes("\u2029") ? p = p.replace(/^(['"`])([\s\S]*)\1$/mg, "$2") : C2 - m2 >= 2 && (O === 39 || O === 34 || O === 96) && t2.charCodeAt(C2 - 1) === O && (p = t2.slice(m2 + 1, C2 - 1)), r2 = u3, u3 < v) for (; r2 < o && !q(t2.charCodeAt(r2)); ) r2++;
|
|
1310
|
+
}
|
|
1311
|
+
g === 34 && (y2 || a2 < r2) && p.indexOf("\\") !== -1 && (p = p.replace(/\\n/g, `
|
|
1312
|
+
`).replace(/\\r/g, "\r")), n3[h2] = p;
|
|
1313
|
+
}
|
|
1314
|
+
return n3;
|
|
1283
1315
|
}
|
|
1284
|
-
|
|
1285
|
-
return
|
|
1316
|
+
function se(e, n3) {
|
|
1317
|
+
return n3 && $(n3.fast) ? oe(e) : ne(e);
|
|
1286
1318
|
}
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
function _instructions(result, dotenvKey) {
|
|
1290
|
-
let uri;
|
|
1291
|
-
try {
|
|
1292
|
-
uri = new URL(dotenvKey);
|
|
1293
|
-
} catch (error) {
|
|
1294
|
-
if (error.code === "ERR_INVALID_URL") {
|
|
1295
|
-
const err = new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");
|
|
1296
|
-
err.code = "INVALID_DOTENV_KEY";
|
|
1297
|
-
throw err;
|
|
1298
|
-
}
|
|
1299
|
-
throw error;
|
|
1319
|
+
function T(e) {
|
|
1320
|
+
console.log(`\u2506 ${e}`);
|
|
1300
1321
|
}
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
const err = new Error("INVALID_DOTENV_KEY: Missing key part");
|
|
1304
|
-
err.code = "INVALID_DOTENV_KEY";
|
|
1305
|
-
throw err;
|
|
1322
|
+
function ie(e) {
|
|
1323
|
+
console.error(`\u25C7 ${e}`);
|
|
1306
1324
|
}
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
const err = new Error("INVALID_DOTENV_KEY: Missing environment part");
|
|
1310
|
-
err.code = "INVALID_DOTENV_KEY";
|
|
1311
|
-
throw err;
|
|
1325
|
+
function V(e) {
|
|
1326
|
+
return e[0] === "~" ? I2.join(Z.homedir(), e.slice(1)) : e;
|
|
1312
1327
|
}
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
err.code = "NOT_FOUND_DOTENV_ENVIRONMENT";
|
|
1318
|
-
throw err;
|
|
1328
|
+
function ce(e = {}) {
|
|
1329
|
+
let n3 = { ...e };
|
|
1330
|
+
for (let t2 of Object.keys(n3)) n3[t2] === void 0 && delete n3[t2];
|
|
1331
|
+
return { ...B(), ...n3 };
|
|
1319
1332
|
}
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1333
|
+
function ae(e) {
|
|
1334
|
+
e = ce(e);
|
|
1335
|
+
let n3 = I2.resolve(process.cwd(), ".env"), t2 = "utf8", o = process.env;
|
|
1336
|
+
e && e.processEnv != null && (o = e.processEnv);
|
|
1337
|
+
let r2 = $(e && e.debug);
|
|
1338
|
+
e && e.encoding ? t2 = e.encoding : r2 && T("no encoding is specified (UTF-8 is used by default)");
|
|
1339
|
+
let s = [n3];
|
|
1340
|
+
if (e && e.path) if (!Array.isArray(e.path)) s = [V(e.path)];
|
|
1341
|
+
else {
|
|
1342
|
+
s = [];
|
|
1343
|
+
for (let c2 of e.path) s.push(V(c2));
|
|
1344
|
+
}
|
|
1345
|
+
let i2, l2 = {}, d = { fast: e.fast };
|
|
1346
|
+
for (let c2 of s) try {
|
|
1347
|
+
let a2 = A.parse(z.readFileSync(c2, { encoding: t2 }), d);
|
|
1348
|
+
A.populate(l2, a2, e);
|
|
1349
|
+
} catch (a2) {
|
|
1350
|
+
r2 && T(`failed to load ${c2} ${a2.message}`), i2 = a2;
|
|
1351
|
+
}
|
|
1352
|
+
let h2 = A.populate(o, l2, e), f = $(Object.prototype.hasOwnProperty.call(e, "quiet") ? e.quiet : B(o).quiet);
|
|
1353
|
+
if (r2 || !f) {
|
|
1354
|
+
let c2 = Object.keys(h2).length, a2 = [];
|
|
1355
|
+
for (let g of s) try {
|
|
1356
|
+
let p = I2.relative(process.cwd(), g instanceof ee ? te(g) : g);
|
|
1357
|
+
a2.push(p);
|
|
1358
|
+
} catch (p) {
|
|
1359
|
+
r2 && T(`failed to load ${g} ${p.message}`), i2 = p;
|
|
1330
1360
|
}
|
|
1331
|
-
|
|
1332
|
-
possibleVaultPath = options.path.endsWith(".vault") ? options.path : `${options.path}.vault`;
|
|
1361
|
+
ie(`injected env (${c2}) from ${a2.join(",")}`);
|
|
1333
1362
|
}
|
|
1334
|
-
|
|
1335
|
-
possibleVaultPath = path26.resolve(process.cwd(), ".env.vault");
|
|
1363
|
+
return i2 ? { parsed: l2, error: i2 } : { parsed: l2 };
|
|
1336
1364
|
}
|
|
1337
|
-
|
|
1338
|
-
return
|
|
1365
|
+
function le(e) {
|
|
1366
|
+
return A.configDotenv(e);
|
|
1339
1367
|
}
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
function _configVault(options) {
|
|
1346
|
-
const debug = parseBoolean(process.env.DOTENV_CONFIG_DEBUG || options && options.debug);
|
|
1347
|
-
const quiet = parseBoolean(process.env.DOTENV_CONFIG_QUIET || options && options.quiet);
|
|
1348
|
-
if (debug || !quiet) {
|
|
1349
|
-
_log("loading env from encrypted .env.vault");
|
|
1350
|
-
}
|
|
1351
|
-
const parsed = DotenvModule._parseVault(options);
|
|
1352
|
-
let processEnv = process.env;
|
|
1353
|
-
if (options && options.processEnv != null) {
|
|
1354
|
-
processEnv = options.processEnv;
|
|
1355
|
-
}
|
|
1356
|
-
DotenvModule.populate(processEnv, parsed, options);
|
|
1357
|
-
return { parsed };
|
|
1358
|
-
}
|
|
1359
|
-
function configDotenv(options) {
|
|
1360
|
-
const dotenvPath = path26.resolve(process.cwd(), ".env");
|
|
1361
|
-
let encoding = "utf8";
|
|
1362
|
-
let processEnv = process.env;
|
|
1363
|
-
if (options && options.processEnv != null) {
|
|
1364
|
-
processEnv = options.processEnv;
|
|
1365
|
-
}
|
|
1366
|
-
let debug = parseBoolean(processEnv.DOTENV_CONFIG_DEBUG || options && options.debug);
|
|
1367
|
-
let quiet = parseBoolean(processEnv.DOTENV_CONFIG_QUIET || options && options.quiet);
|
|
1368
|
-
if (options && options.encoding) {
|
|
1369
|
-
encoding = options.encoding;
|
|
1370
|
-
} else {
|
|
1371
|
-
if (debug) {
|
|
1372
|
-
_debug("no encoding is specified (UTF-8 is used by default)");
|
|
1368
|
+
function fe(e, n3, t2 = {}) {
|
|
1369
|
+
let o = $(t2 && t2.debug), r2 = $(t2 && t2.override), s = {};
|
|
1370
|
+
if (e === null || typeof e != "object" || n3 === null || typeof n3 != "object") {
|
|
1371
|
+
let i2 = new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");
|
|
1372
|
+
throw i2.code = "OBJECT_REQUIRED", i2;
|
|
1373
1373
|
}
|
|
1374
|
+
for (let i2 of Object.keys(n3)) Object.prototype.hasOwnProperty.call(e, i2) ? (r2 === true && (e[i2] = n3[i2], s[i2] = n3[i2]), o && T(r2 === true ? `"${i2}" is already defined and WAS overwritten` : `"${i2}" is already defined and was NOT overwritten`)) : (e[i2] = n3[i2], s[i2] = n3[i2]);
|
|
1375
|
+
return s;
|
|
1374
1376
|
}
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1377
|
+
var A = { configDotenv: ae, config: le, parse: se, populate: fe };
|
|
1378
|
+
x.exports.configDotenv = A.configDotenv;
|
|
1379
|
+
x.exports.config = A.config;
|
|
1380
|
+
x.exports.parse = A.parse;
|
|
1381
|
+
x.exports.populate = A.populate;
|
|
1382
|
+
x.exports = A;
|
|
1383
|
+
});
|
|
1384
|
+
var M = j((Te, W2) => {
|
|
1385
|
+
var _ = __require("child_process"), ue = __require("fs"), L = __require("path");
|
|
1386
|
+
function de(e) {
|
|
1387
|
+
let n3 = ['"'], t2 = 0;
|
|
1388
|
+
for (let o of e) {
|
|
1389
|
+
if (o === "\\") {
|
|
1390
|
+
t2++;
|
|
1391
|
+
continue;
|
|
1383
1392
|
}
|
|
1393
|
+
o === '"' ? n3.push("\\".repeat(t2 * 2 + 1), '"') : n3.push("\\".repeat(t2), o), t2 = 0;
|
|
1384
1394
|
}
|
|
1395
|
+
return n3.push("\\".repeat(t2 * 2), '"'), n3.join("");
|
|
1385
1396
|
}
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
} catch (e) {
|
|
1393
|
-
if (debug) {
|
|
1394
|
-
_debug(`failed to load ${path27} ${e.message}`);
|
|
1397
|
+
function H(e, n3 = 1) {
|
|
1398
|
+
for (let t2 = 0; t2 < n3; t2++) {
|
|
1399
|
+
let o = [];
|
|
1400
|
+
for (let r2 of e) {
|
|
1401
|
+
let s = r2.charCodeAt(0), i2 = s >= 48 && s <= 57 || s >= 65 && s <= 90 || s >= 97 && s <= 122, l2 = "\\/:._-".includes(r2);
|
|
1402
|
+
!i2 && !l2 && s < 128 && o.push("^"), o.push(r2);
|
|
1395
1403
|
}
|
|
1396
|
-
|
|
1404
|
+
e = o.join("");
|
|
1397
1405
|
}
|
|
1406
|
+
return e;
|
|
1407
|
+
}
|
|
1408
|
+
function P(e, n3) {
|
|
1409
|
+
let t2 = Object.keys(e).reverse().find((o) => o.toUpperCase() === n3);
|
|
1410
|
+
return t2 === void 0 ? void 0 : e[t2];
|
|
1398
1411
|
}
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
const keysCount = Object.keys(populated).length;
|
|
1404
|
-
const shortPaths = [];
|
|
1405
|
-
for (const filePath of optionPaths) {
|
|
1412
|
+
function pe(e, n3, t2) {
|
|
1413
|
+
let o = (P(n3, "PATHEXT") || ".COM;.EXE;.BAT;.CMD").split(";").filter(Boolean), s = o.some((l2) => e.toLowerCase().endsWith(l2.toLowerCase())) ? ["", ...o] : [...o, ""], i2 = /[\\/]/.test(e) ? [t2] : [t2, ...(P(n3, "PATH") || "").split(";")];
|
|
1414
|
+
for (let l2 of i2) for (let d of s) {
|
|
1415
|
+
let h2 = L.resolve(t2, l2.replace(/^"|"$/g, ""), e + d);
|
|
1406
1416
|
try {
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
} catch (e) {
|
|
1410
|
-
if (debug) {
|
|
1411
|
-
_debug(`failed to load ${filePath} ${e.message}`);
|
|
1412
|
-
}
|
|
1413
|
-
lastError = e;
|
|
1417
|
+
if (ue.statSync(h2).isFile()) return h2;
|
|
1418
|
+
} catch {
|
|
1414
1419
|
}
|
|
1415
1420
|
}
|
|
1416
|
-
_log(`injected env (${keysCount}) from ${shortPaths.join(",")} ${dim(`// tip: ${_getRandomTip()}`)}`);
|
|
1417
1421
|
}
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
return
|
|
1422
|
+
function he(e, n3, t2) {
|
|
1423
|
+
if (process.platform !== "win32") return _.spawn(e, n3, t2);
|
|
1424
|
+
let o = t2.env || process.env, r2 = pe(e, o, t2.cwd || process.cwd());
|
|
1425
|
+
if (r2 && /\.(?:exe|com)$/i.test(r2)) return _.spawn(r2, n3, t2);
|
|
1426
|
+
let s = /\.(?:bat|cmd)$/i.test(r2 || e), i2 = [H(L.normalize(r2 || e))];
|
|
1427
|
+
for (let d of n3) i2.push(H(de(d), s ? 2 : 1));
|
|
1428
|
+
let l2 = i2.join(" ");
|
|
1429
|
+
return _.spawn(P(o, "COMSPEC") || "cmd.exe", ["/d", "/v:off", "/s", "/c", `"${l2}"`], { ...t2, windowsVerbatimArguments: true });
|
|
1422
1430
|
}
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1431
|
+
W2.exports = he;
|
|
1432
|
+
});
|
|
1433
|
+
var X = j(($e, F) => {
|
|
1434
|
+
var ge = __require("fs"), me = __require("os"), Q = __require("path"), ve = __require("child_process"), Ce = M(), R2 = N(), { optionsFromEnv: J } = k();
|
|
1435
|
+
function D() {
|
|
1436
|
+
console.log(["Usage: dotenv run [--help] [-q|--quiet] [--debug] [--override] [--fast] [-f|--file <paths>] [--] <command> [args...]", "", "Run a command with environment variables from a .env file.", "Place dotenv options before the command; all following arguments go to the command.", "", "Options:", " -f, --file <paths> .env paths, comma-separated or repeated (default: .env)", " -q, --quiet suppress the injected env message", " --debug enable debug logging", " --override override existing environment variables", " --fast use the faster character-scanner parser", "", "Environment variables (DOTENV_CONFIG_* names remain as fallbacks):", " DOTENV_PATH, DOTENV_ENCODING, DOTENV_QUIET,", " DOTENV_DEBUG, DOTENV_OVERRIDE,", " DOTENV_FAST"].join(`
|
|
1437
|
+
`));
|
|
1438
|
+
}
|
|
1439
|
+
function we(e) {
|
|
1440
|
+
let n3 = [], t2 = false, o, r2, s, i2, l2 = -1;
|
|
1441
|
+
for (let h2 = 0; h2 < e.length; h2++) {
|
|
1442
|
+
let f = e[h2];
|
|
1443
|
+
if (f === "--") {
|
|
1444
|
+
l2 = h2 + 1;
|
|
1445
|
+
break;
|
|
1446
|
+
}
|
|
1447
|
+
if (f === "--help" || f === "-h") return { help: true };
|
|
1448
|
+
if (f === "--quiet" || f === "-q") {
|
|
1449
|
+
o = true;
|
|
1450
|
+
continue;
|
|
1451
|
+
}
|
|
1452
|
+
if (f === "--debug") {
|
|
1453
|
+
r2 = true;
|
|
1454
|
+
continue;
|
|
1455
|
+
}
|
|
1456
|
+
if (f === "--override") {
|
|
1457
|
+
s = true;
|
|
1458
|
+
continue;
|
|
1459
|
+
}
|
|
1460
|
+
if (f === "--fast") {
|
|
1461
|
+
i2 = true;
|
|
1462
|
+
continue;
|
|
1463
|
+
}
|
|
1464
|
+
if (f === "-f" || f === "--file" || f.startsWith("-f=") || f.startsWith("--file=")) {
|
|
1465
|
+
let c2 = f.indexOf("="), a2 = c2 === -1 ? f : f.slice(0, c2), g = c2 === -1 ? e[++h2] : f.slice(c2 + 1);
|
|
1466
|
+
if (!g || g === "--") return { error: `${a2} requires a path` };
|
|
1467
|
+
let p = g.split(",").map((y2) => y2.trim()).filter(Boolean);
|
|
1468
|
+
if (p.length === 0) return { error: `${a2} requires a path` };
|
|
1469
|
+
n3.push(...p), t2 = true;
|
|
1470
|
+
continue;
|
|
1471
|
+
}
|
|
1472
|
+
if (f.startsWith("-")) return { error: `unknown option: ${f}` };
|
|
1473
|
+
l2 = h2;
|
|
1474
|
+
break;
|
|
1475
|
+
}
|
|
1476
|
+
let d = l2 === -1 ? [] : e.slice(l2);
|
|
1477
|
+
return { paths: n3, pathSet: t2, quiet: o, debug: r2, override: s, fast: i2, command: d };
|
|
1427
1478
|
}
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
_warn(`you set DOTENV_KEY but you are missing a .env.vault file at ${vaultPath}`);
|
|
1431
|
-
return DotenvModule.configDotenv(options);
|
|
1479
|
+
function Ae(e) {
|
|
1480
|
+
return e[0] === "~" ? Q.join(me.homedir(), e.slice(1)) : e;
|
|
1432
1481
|
}
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
const key = Buffer.from(keyStr.slice(-64), "hex");
|
|
1437
|
-
let ciphertext = Buffer.from(encrypted, "base64");
|
|
1438
|
-
const nonce = ciphertext.subarray(0, 12);
|
|
1439
|
-
const authTag = ciphertext.subarray(-16);
|
|
1440
|
-
ciphertext = ciphertext.subarray(12, -16);
|
|
1441
|
-
try {
|
|
1442
|
-
const aesgcm = crypto3.createDecipheriv("aes-256-gcm", key, nonce);
|
|
1443
|
-
aesgcm.setAuthTag(authTag);
|
|
1444
|
-
return `${aesgcm.update(ciphertext)}${aesgcm.final()}`;
|
|
1445
|
-
} catch (error) {
|
|
1446
|
-
const isRange = error instanceof RangeError;
|
|
1447
|
-
const invalidKeyLength = error.message === "Invalid key length";
|
|
1448
|
-
const decryptionFailed = error.message === "Unsupported state or unable to authenticate data";
|
|
1449
|
-
if (isRange || invalidKeyLength) {
|
|
1450
|
-
const err = new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");
|
|
1451
|
-
err.code = "INVALID_DOTENV_KEY";
|
|
1452
|
-
throw err;
|
|
1453
|
-
} else if (decryptionFailed) {
|
|
1454
|
-
const err = new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");
|
|
1455
|
-
err.code = "DECRYPTION_FAILED";
|
|
1456
|
-
throw err;
|
|
1457
|
-
} else {
|
|
1458
|
-
throw error;
|
|
1459
|
-
}
|
|
1482
|
+
function Ee(e) {
|
|
1483
|
+
let n3 = J(), t2 = { encoding: n3.encoding || "utf8", quiet: n3.quiet, debug: n3.debug === true, override: n3.override === true, fast: n3.fast === true, paths: [".env"], defaultPath: true };
|
|
1484
|
+
return n3.path != null && (t2.paths = [n3.path], t2.defaultPath = false), e.pathSet && (t2.paths = e.paths, t2.defaultPath = false), e.quiet != null && (t2.quiet = e.quiet), e.debug != null && (t2.debug = e.debug), e.override != null && (t2.override = e.override), e.fast != null && (t2.fast = e.fast), t2;
|
|
1460
1485
|
}
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1486
|
+
function be(e) {
|
|
1487
|
+
let n3 = {}, t2 = [], o = { override: e.override, debug: e.debug };
|
|
1488
|
+
for (let s of e.paths) {
|
|
1489
|
+
let i2 = Q.resolve(process.cwd(), Ae(s));
|
|
1490
|
+
try {
|
|
1491
|
+
let l2 = R2.parse(ge.readFileSync(i2, { encoding: e.encoding }), { fast: e.fast });
|
|
1492
|
+
R2.populate(n3, l2, o), t2.push(s);
|
|
1493
|
+
} catch (l2) {
|
|
1494
|
+
if (e.debug && console.log(`\u2506 failed to load ${s} ${l2.message}`), !(e.defaultPath && l2.code === "ENOENT")) throw l2;
|
|
1495
|
+
}
|
|
1496
|
+
}
|
|
1497
|
+
return { injected: R2.populate(process.env, n3, o), loadedPaths: t2 };
|
|
1470
1498
|
}
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1499
|
+
function K(e) {
|
|
1500
|
+
let n3 = e[0];
|
|
1501
|
+
if (n3 === "--help" || n3 === "-h") {
|
|
1502
|
+
D();
|
|
1503
|
+
return;
|
|
1504
|
+
}
|
|
1505
|
+
if (n3 !== "run") {
|
|
1506
|
+
D(), process.exitCode = 1;
|
|
1507
|
+
return;
|
|
1508
|
+
}
|
|
1509
|
+
let t2 = we(e.slice(1));
|
|
1510
|
+
if (t2.help) {
|
|
1511
|
+
D();
|
|
1512
|
+
return;
|
|
1513
|
+
}
|
|
1514
|
+
if (t2.error) {
|
|
1515
|
+
console.error(`dotenv: ${t2.error}`), D(), process.exitCode = 1;
|
|
1516
|
+
return;
|
|
1517
|
+
}
|
|
1518
|
+
if (t2.command.length === 0) {
|
|
1519
|
+
D(), process.exitCode = 1;
|
|
1520
|
+
return;
|
|
1521
|
+
}
|
|
1522
|
+
let o = Ee(t2);
|
|
1523
|
+
try {
|
|
1524
|
+
let c2 = be(o);
|
|
1525
|
+
if (!(o.quiet == null ? J().quiet : o.quiet)) {
|
|
1526
|
+
let g = `\u25C7 injected env (${Object.keys(c2.injected).length})`;
|
|
1527
|
+
c2.loadedPaths.length > 0 && (g += ` from ${c2.loadedPaths.join(", ")}`), console.error(g);
|
|
1476
1528
|
}
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1529
|
+
} catch (c2) {
|
|
1530
|
+
console.error(`dotenv: ${c2.message}`), process.exitCode = 1;
|
|
1531
|
+
return;
|
|
1532
|
+
}
|
|
1533
|
+
let r2 = !!process.stdin.isTTY, s = process.platform !== "win32" && !r2, i2 = Ce(t2.command[0], t2.command.slice(1), { stdio: "inherit", detached: s }), l2 = /* @__PURE__ */ new Map(), d = 0;
|
|
1534
|
+
function h2(c2) {
|
|
1535
|
+
if (!(!i2.pid || i2.exitCode !== null || i2.signalCode !== null)) {
|
|
1536
|
+
if (process.platform === "win32") {
|
|
1537
|
+
ve.spawnSync("taskkill", ["/pid", String(i2.pid), "/T", "/F"], { stdio: "ignore" });
|
|
1538
|
+
return;
|
|
1539
|
+
}
|
|
1540
|
+
try {
|
|
1541
|
+
process.kill(s ? -i2.pid : i2.pid, c2);
|
|
1542
|
+
} catch (a2) {
|
|
1543
|
+
if (a2.code !== "ESRCH") throw a2;
|
|
1482
1544
|
}
|
|
1483
1545
|
}
|
|
1484
|
-
} else {
|
|
1485
|
-
processEnv[key] = parsed[key];
|
|
1486
|
-
populated[key] = parsed[key];
|
|
1487
1546
|
}
|
|
1547
|
+
function f() {
|
|
1548
|
+
for (let [c2, a2] of l2) process.removeListener(c2, a2);
|
|
1549
|
+
}
|
|
1550
|
+
for (let c2 of ["SIGINT", "SIGTERM", "SIGHUP", "SIGQUIT"]) {
|
|
1551
|
+
let a2 = () => {
|
|
1552
|
+
if (c2 === "SIGINT") {
|
|
1553
|
+
if (d++, r2 && process.platform !== "win32" && d === 1) return;
|
|
1554
|
+
if (d > 1) {
|
|
1555
|
+
h2(d === 2 ? "SIGTERM" : "SIGKILL");
|
|
1556
|
+
return;
|
|
1557
|
+
}
|
|
1558
|
+
}
|
|
1559
|
+
h2(c2);
|
|
1560
|
+
};
|
|
1561
|
+
l2.set(c2, a2), process.on(c2, a2);
|
|
1562
|
+
}
|
|
1563
|
+
i2.on("error", function(c2) {
|
|
1564
|
+
f(), console.error(`dotenv: ${c2.message}`), process.exitCode = 1;
|
|
1565
|
+
}), i2.on("exit", function(c2, a2) {
|
|
1566
|
+
f(), typeof c2 == "number" ? process.exit(c2) : (setInterval(() => {
|
|
1567
|
+
}, 1e3), process.kill(process.pid, a2));
|
|
1568
|
+
});
|
|
1488
1569
|
}
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
module.exports.configDotenv = DotenvModule.configDotenv;
|
|
1501
|
-
module.exports._configVault = DotenvModule._configVault;
|
|
1502
|
-
module.exports._parseVault = DotenvModule._parseVault;
|
|
1503
|
-
module.exports.config = DotenvModule.config;
|
|
1504
|
-
module.exports.decrypt = DotenvModule.decrypt;
|
|
1505
|
-
module.exports.parse = DotenvModule.parse;
|
|
1506
|
-
module.exports.populate = DotenvModule.populate;
|
|
1507
|
-
module.exports = DotenvModule;
|
|
1570
|
+
F.exports = K;
|
|
1571
|
+
__require.main === F && K(process.argv.slice(2));
|
|
1572
|
+
});
|
|
1573
|
+
var S = N();
|
|
1574
|
+
var qe = X();
|
|
1575
|
+
module.exports = S;
|
|
1576
|
+
module.exports.config = S.config;
|
|
1577
|
+
module.exports.configDotenv = S.configDotenv;
|
|
1578
|
+
module.exports.parse = S.parse;
|
|
1579
|
+
module.exports.populate = S.populate;
|
|
1580
|
+
__require.main === module && qe(process.argv.slice(2));
|
|
1508
1581
|
}
|
|
1509
1582
|
});
|
|
1510
1583
|
|
|
@@ -1662,19 +1735,19 @@ var require_identifiers = __commonJS({
|
|
|
1662
1735
|
"../../node_modules/semver/internal/identifiers.js"(exports, module) {
|
|
1663
1736
|
"use strict";
|
|
1664
1737
|
var numeric = /^[0-9]+$/;
|
|
1665
|
-
var compareIdentifiers = (
|
|
1666
|
-
if (typeof
|
|
1667
|
-
return
|
|
1738
|
+
var compareIdentifiers = (a2, b) => {
|
|
1739
|
+
if (typeof a2 === "number" && typeof b === "number") {
|
|
1740
|
+
return a2 === b ? 0 : a2 < b ? -1 : 1;
|
|
1668
1741
|
}
|
|
1669
|
-
const anum = numeric.test(
|
|
1742
|
+
const anum = numeric.test(a2);
|
|
1670
1743
|
const bnum = numeric.test(b);
|
|
1671
1744
|
if (anum && bnum) {
|
|
1672
|
-
|
|
1745
|
+
a2 = +a2;
|
|
1673
1746
|
b = +b;
|
|
1674
1747
|
}
|
|
1675
|
-
return
|
|
1748
|
+
return a2 === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a2 < b ? -1 : 1;
|
|
1676
1749
|
};
|
|
1677
|
-
var rcompareIdentifiers = (
|
|
1750
|
+
var rcompareIdentifiers = (a2, b) => compareIdentifiers(b, a2);
|
|
1678
1751
|
module.exports = {
|
|
1679
1752
|
compareIdentifiers,
|
|
1680
1753
|
rcompareIdentifiers
|
|
@@ -1817,19 +1890,19 @@ var require_semver = __commonJS({
|
|
|
1817
1890
|
}
|
|
1818
1891
|
let i2 = 0;
|
|
1819
1892
|
do {
|
|
1820
|
-
const
|
|
1893
|
+
const a2 = this.prerelease[i2];
|
|
1821
1894
|
const b = other.prerelease[i2];
|
|
1822
|
-
debug("prerelease compare", i2,
|
|
1823
|
-
if (
|
|
1895
|
+
debug("prerelease compare", i2, a2, b);
|
|
1896
|
+
if (a2 === void 0 && b === void 0) {
|
|
1824
1897
|
return 0;
|
|
1825
1898
|
} else if (b === void 0) {
|
|
1826
1899
|
return 1;
|
|
1827
|
-
} else if (
|
|
1900
|
+
} else if (a2 === void 0) {
|
|
1828
1901
|
return -1;
|
|
1829
|
-
} else if (
|
|
1902
|
+
} else if (a2 === b) {
|
|
1830
1903
|
continue;
|
|
1831
1904
|
} else {
|
|
1832
|
-
return compareIdentifiers(
|
|
1905
|
+
return compareIdentifiers(a2, b);
|
|
1833
1906
|
}
|
|
1834
1907
|
} while (++i2);
|
|
1835
1908
|
}
|
|
@@ -1839,19 +1912,19 @@ var require_semver = __commonJS({
|
|
|
1839
1912
|
}
|
|
1840
1913
|
let i2 = 0;
|
|
1841
1914
|
do {
|
|
1842
|
-
const
|
|
1915
|
+
const a2 = this.build[i2];
|
|
1843
1916
|
const b = other.build[i2];
|
|
1844
|
-
debug("build compare", i2,
|
|
1845
|
-
if (
|
|
1917
|
+
debug("build compare", i2, a2, b);
|
|
1918
|
+
if (a2 === void 0 && b === void 0) {
|
|
1846
1919
|
return 0;
|
|
1847
1920
|
} else if (b === void 0) {
|
|
1848
1921
|
return 1;
|
|
1849
|
-
} else if (
|
|
1922
|
+
} else if (a2 === void 0) {
|
|
1850
1923
|
return -1;
|
|
1851
|
-
} else if (
|
|
1924
|
+
} else if (a2 === b) {
|
|
1852
1925
|
continue;
|
|
1853
1926
|
} else {
|
|
1854
|
-
return compareIdentifiers(
|
|
1927
|
+
return compareIdentifiers(a2, b);
|
|
1855
1928
|
}
|
|
1856
1929
|
} while (++i2);
|
|
1857
1930
|
}
|
|
@@ -2095,7 +2168,7 @@ var require_major = __commonJS({
|
|
|
2095
2168
|
"../../node_modules/semver/functions/major.js"(exports, module) {
|
|
2096
2169
|
"use strict";
|
|
2097
2170
|
var SemVer = require_semver();
|
|
2098
|
-
var major2 = (
|
|
2171
|
+
var major2 = (a2, loose) => new SemVer(a2, loose).major;
|
|
2099
2172
|
module.exports = major2;
|
|
2100
2173
|
}
|
|
2101
2174
|
});
|
|
@@ -2105,7 +2178,7 @@ var require_minor = __commonJS({
|
|
|
2105
2178
|
"../../node_modules/semver/functions/minor.js"(exports, module) {
|
|
2106
2179
|
"use strict";
|
|
2107
2180
|
var SemVer = require_semver();
|
|
2108
|
-
var minor = (
|
|
2181
|
+
var minor = (a2, loose) => new SemVer(a2, loose).minor;
|
|
2109
2182
|
module.exports = minor;
|
|
2110
2183
|
}
|
|
2111
2184
|
});
|
|
@@ -2115,7 +2188,7 @@ var require_patch = __commonJS({
|
|
|
2115
2188
|
"../../node_modules/semver/functions/patch.js"(exports, module) {
|
|
2116
2189
|
"use strict";
|
|
2117
2190
|
var SemVer = require_semver();
|
|
2118
|
-
var patch = (
|
|
2191
|
+
var patch = (a2, loose) => new SemVer(a2, loose).patch;
|
|
2119
2192
|
module.exports = patch;
|
|
2120
2193
|
}
|
|
2121
2194
|
});
|
|
@@ -2138,7 +2211,7 @@ var require_compare = __commonJS({
|
|
|
2138
2211
|
"../../node_modules/semver/functions/compare.js"(exports, module) {
|
|
2139
2212
|
"use strict";
|
|
2140
2213
|
var SemVer = require_semver();
|
|
2141
|
-
var compare = (
|
|
2214
|
+
var compare = (a2, b, loose) => new SemVer(a2, loose).compare(new SemVer(b, loose));
|
|
2142
2215
|
module.exports = compare;
|
|
2143
2216
|
}
|
|
2144
2217
|
});
|
|
@@ -2148,7 +2221,7 @@ var require_rcompare = __commonJS({
|
|
|
2148
2221
|
"../../node_modules/semver/functions/rcompare.js"(exports, module) {
|
|
2149
2222
|
"use strict";
|
|
2150
2223
|
var compare = require_compare();
|
|
2151
|
-
var rcompare = (
|
|
2224
|
+
var rcompare = (a2, b, loose) => compare(b, a2, loose);
|
|
2152
2225
|
module.exports = rcompare;
|
|
2153
2226
|
}
|
|
2154
2227
|
});
|
|
@@ -2158,7 +2231,7 @@ var require_compare_loose = __commonJS({
|
|
|
2158
2231
|
"../../node_modules/semver/functions/compare-loose.js"(exports, module) {
|
|
2159
2232
|
"use strict";
|
|
2160
2233
|
var compare = require_compare();
|
|
2161
|
-
var compareLoose = (
|
|
2234
|
+
var compareLoose = (a2, b) => compare(a2, b, true);
|
|
2162
2235
|
module.exports = compareLoose;
|
|
2163
2236
|
}
|
|
2164
2237
|
});
|
|
@@ -2168,8 +2241,8 @@ var require_compare_build = __commonJS({
|
|
|
2168
2241
|
"../../node_modules/semver/functions/compare-build.js"(exports, module) {
|
|
2169
2242
|
"use strict";
|
|
2170
2243
|
var SemVer = require_semver();
|
|
2171
|
-
var compareBuild = (
|
|
2172
|
-
const versionA = new SemVer(
|
|
2244
|
+
var compareBuild = (a2, b, loose) => {
|
|
2245
|
+
const versionA = new SemVer(a2, loose);
|
|
2173
2246
|
const versionB = new SemVer(b, loose);
|
|
2174
2247
|
return versionA.compare(versionB) || versionA.compareBuild(versionB);
|
|
2175
2248
|
};
|
|
@@ -2182,7 +2255,7 @@ var require_sort = __commonJS({
|
|
|
2182
2255
|
"../../node_modules/semver/functions/sort.js"(exports, module) {
|
|
2183
2256
|
"use strict";
|
|
2184
2257
|
var compareBuild = require_compare_build();
|
|
2185
|
-
var sort = (list, loose) => list.sort((
|
|
2258
|
+
var sort = (list, loose) => list.sort((a2, b) => compareBuild(a2, b, loose));
|
|
2186
2259
|
module.exports = sort;
|
|
2187
2260
|
}
|
|
2188
2261
|
});
|
|
@@ -2192,7 +2265,7 @@ var require_rsort = __commonJS({
|
|
|
2192
2265
|
"../../node_modules/semver/functions/rsort.js"(exports, module) {
|
|
2193
2266
|
"use strict";
|
|
2194
2267
|
var compareBuild = require_compare_build();
|
|
2195
|
-
var rsort = (list, loose) => list.sort((
|
|
2268
|
+
var rsort = (list, loose) => list.sort((a2, b) => compareBuild(b, a2, loose));
|
|
2196
2269
|
module.exports = rsort;
|
|
2197
2270
|
}
|
|
2198
2271
|
});
|
|
@@ -2202,7 +2275,7 @@ var require_gt = __commonJS({
|
|
|
2202
2275
|
"../../node_modules/semver/functions/gt.js"(exports, module) {
|
|
2203
2276
|
"use strict";
|
|
2204
2277
|
var compare = require_compare();
|
|
2205
|
-
var gt = (
|
|
2278
|
+
var gt = (a2, b, loose) => compare(a2, b, loose) > 0;
|
|
2206
2279
|
module.exports = gt;
|
|
2207
2280
|
}
|
|
2208
2281
|
});
|
|
@@ -2212,7 +2285,7 @@ var require_lt = __commonJS({
|
|
|
2212
2285
|
"../../node_modules/semver/functions/lt.js"(exports, module) {
|
|
2213
2286
|
"use strict";
|
|
2214
2287
|
var compare = require_compare();
|
|
2215
|
-
var lt = (
|
|
2288
|
+
var lt = (a2, b, loose) => compare(a2, b, loose) < 0;
|
|
2216
2289
|
module.exports = lt;
|
|
2217
2290
|
}
|
|
2218
2291
|
});
|
|
@@ -2222,7 +2295,7 @@ var require_eq = __commonJS({
|
|
|
2222
2295
|
"../../node_modules/semver/functions/eq.js"(exports, module) {
|
|
2223
2296
|
"use strict";
|
|
2224
2297
|
var compare = require_compare();
|
|
2225
|
-
var eq = (
|
|
2298
|
+
var eq = (a2, b, loose) => compare(a2, b, loose) === 0;
|
|
2226
2299
|
module.exports = eq;
|
|
2227
2300
|
}
|
|
2228
2301
|
});
|
|
@@ -2232,7 +2305,7 @@ var require_neq = __commonJS({
|
|
|
2232
2305
|
"../../node_modules/semver/functions/neq.js"(exports, module) {
|
|
2233
2306
|
"use strict";
|
|
2234
2307
|
var compare = require_compare();
|
|
2235
|
-
var neq = (
|
|
2308
|
+
var neq = (a2, b, loose) => compare(a2, b, loose) !== 0;
|
|
2236
2309
|
module.exports = neq;
|
|
2237
2310
|
}
|
|
2238
2311
|
});
|
|
@@ -2242,7 +2315,7 @@ var require_gte = __commonJS({
|
|
|
2242
2315
|
"../../node_modules/semver/functions/gte.js"(exports, module) {
|
|
2243
2316
|
"use strict";
|
|
2244
2317
|
var compare = require_compare();
|
|
2245
|
-
var gte = (
|
|
2318
|
+
var gte = (a2, b, loose) => compare(a2, b, loose) >= 0;
|
|
2246
2319
|
module.exports = gte;
|
|
2247
2320
|
}
|
|
2248
2321
|
});
|
|
@@ -2252,7 +2325,7 @@ var require_lte = __commonJS({
|
|
|
2252
2325
|
"../../node_modules/semver/functions/lte.js"(exports, module) {
|
|
2253
2326
|
"use strict";
|
|
2254
2327
|
var compare = require_compare();
|
|
2255
|
-
var lte = (
|
|
2328
|
+
var lte = (a2, b, loose) => compare(a2, b, loose) <= 0;
|
|
2256
2329
|
module.exports = lte;
|
|
2257
2330
|
}
|
|
2258
2331
|
});
|
|
@@ -2267,38 +2340,38 @@ var require_cmp = __commonJS({
|
|
|
2267
2340
|
var gte = require_gte();
|
|
2268
2341
|
var lt = require_lt();
|
|
2269
2342
|
var lte = require_lte();
|
|
2270
|
-
var cmp = (
|
|
2343
|
+
var cmp = (a2, op, b, loose) => {
|
|
2271
2344
|
switch (op) {
|
|
2272
2345
|
case "===":
|
|
2273
|
-
if (typeof
|
|
2274
|
-
|
|
2346
|
+
if (typeof a2 === "object") {
|
|
2347
|
+
a2 = a2.version;
|
|
2275
2348
|
}
|
|
2276
2349
|
if (typeof b === "object") {
|
|
2277
2350
|
b = b.version;
|
|
2278
2351
|
}
|
|
2279
|
-
return
|
|
2352
|
+
return a2 === b;
|
|
2280
2353
|
case "!==":
|
|
2281
|
-
if (typeof
|
|
2282
|
-
|
|
2354
|
+
if (typeof a2 === "object") {
|
|
2355
|
+
a2 = a2.version;
|
|
2283
2356
|
}
|
|
2284
2357
|
if (typeof b === "object") {
|
|
2285
2358
|
b = b.version;
|
|
2286
2359
|
}
|
|
2287
|
-
return
|
|
2360
|
+
return a2 !== b;
|
|
2288
2361
|
case "":
|
|
2289
2362
|
case "=":
|
|
2290
2363
|
case "==":
|
|
2291
|
-
return eq(
|
|
2364
|
+
return eq(a2, b, loose);
|
|
2292
2365
|
case "!=":
|
|
2293
|
-
return neq(
|
|
2366
|
+
return neq(a2, b, loose);
|
|
2294
2367
|
case ">":
|
|
2295
|
-
return gt(
|
|
2368
|
+
return gt(a2, b, loose);
|
|
2296
2369
|
case ">=":
|
|
2297
|
-
return gte(
|
|
2370
|
+
return gte(a2, b, loose);
|
|
2298
2371
|
case "<":
|
|
2299
|
-
return lt(
|
|
2372
|
+
return lt(a2, b, loose);
|
|
2300
2373
|
case "<=":
|
|
2301
|
-
return lte(
|
|
2374
|
+
return lte(a2, b, loose);
|
|
2302
2375
|
default:
|
|
2303
2376
|
throw new TypeError(`Invalid operator: ${op}`);
|
|
2304
2377
|
}
|
|
@@ -3203,7 +3276,7 @@ var require_simplify = __commonJS({
|
|
|
3203
3276
|
const set = [];
|
|
3204
3277
|
let first = null;
|
|
3205
3278
|
let prev = null;
|
|
3206
|
-
const v = versions.sort((
|
|
3279
|
+
const v = versions.sort((a2, b) => compare(a2, b, options));
|
|
3207
3280
|
for (const version of v) {
|
|
3208
3281
|
const included = satisfies(version, range, options);
|
|
3209
3282
|
if (included) {
|
|
@@ -3387,19 +3460,19 @@ var require_subset = __commonJS({
|
|
|
3387
3460
|
}
|
|
3388
3461
|
return true;
|
|
3389
3462
|
};
|
|
3390
|
-
var higherGT = (
|
|
3391
|
-
if (!
|
|
3463
|
+
var higherGT = (a2, b, options) => {
|
|
3464
|
+
if (!a2) {
|
|
3392
3465
|
return b;
|
|
3393
3466
|
}
|
|
3394
|
-
const comp = compare(
|
|
3395
|
-
return comp > 0 ?
|
|
3467
|
+
const comp = compare(a2.semver, b.semver, options);
|
|
3468
|
+
return comp > 0 ? a2 : comp < 0 ? b : b.operator === ">" && a2.operator === ">=" ? b : a2;
|
|
3396
3469
|
};
|
|
3397
|
-
var lowerLT = (
|
|
3398
|
-
if (!
|
|
3470
|
+
var lowerLT = (a2, b, options) => {
|
|
3471
|
+
if (!a2) {
|
|
3399
3472
|
return b;
|
|
3400
3473
|
}
|
|
3401
|
-
const comp = compare(
|
|
3402
|
-
return comp < 0 ?
|
|
3474
|
+
const comp = compare(a2.semver, b.semver, options);
|
|
3475
|
+
return comp < 0 ? a2 : comp > 0 ? b : b.operator === "<" && a2.operator === "<=" ? b : a2;
|
|
3403
3476
|
};
|
|
3404
3477
|
module.exports = subset;
|
|
3405
3478
|
}
|
|
@@ -4126,36 +4199,38 @@ var require_Alias = __commonJS({
|
|
|
4126
4199
|
if (node.anchor === this.source)
|
|
4127
4200
|
found = node;
|
|
4128
4201
|
}
|
|
4202
|
+
if (found && ctx) {
|
|
4203
|
+
const { anchors: anchors2, doc: doc2, maxAliasCount } = ctx;
|
|
4204
|
+
let data = anchors2.get(found);
|
|
4205
|
+
if (!data) {
|
|
4206
|
+
toJS.toJS(found, null, ctx);
|
|
4207
|
+
data = anchors2.get(found);
|
|
4208
|
+
}
|
|
4209
|
+
if (data?.res === void 0) {
|
|
4210
|
+
const msg = "This should not happen: Alias anchor was not resolved?";
|
|
4211
|
+
throw new ReferenceError(msg);
|
|
4212
|
+
}
|
|
4213
|
+
if (maxAliasCount >= 0) {
|
|
4214
|
+
data.count += 1;
|
|
4215
|
+
if (data.aliasCount === 0)
|
|
4216
|
+
data.aliasCount = getAliasCount(doc2, found, anchors2);
|
|
4217
|
+
if (data.count * data.aliasCount > maxAliasCount) {
|
|
4218
|
+
const msg = "Excessive alias count indicates a resource exhaustion attack";
|
|
4219
|
+
throw new ReferenceError(msg);
|
|
4220
|
+
}
|
|
4221
|
+
}
|
|
4222
|
+
}
|
|
4129
4223
|
return found;
|
|
4130
4224
|
}
|
|
4131
4225
|
toJSON(_arg, ctx) {
|
|
4132
4226
|
if (!ctx)
|
|
4133
4227
|
return { source: this.source };
|
|
4134
|
-
const
|
|
4135
|
-
const source = this.resolve(doc, ctx);
|
|
4228
|
+
const source = this.resolve(ctx.doc, ctx);
|
|
4136
4229
|
if (!source) {
|
|
4137
4230
|
const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;
|
|
4138
4231
|
throw new ReferenceError(msg);
|
|
4139
4232
|
}
|
|
4140
|
-
|
|
4141
|
-
if (!data) {
|
|
4142
|
-
toJS.toJS(source, null, ctx);
|
|
4143
|
-
data = anchors2.get(source);
|
|
4144
|
-
}
|
|
4145
|
-
if (data?.res === void 0) {
|
|
4146
|
-
const msg = "This should not happen: Alias anchor was not resolved?";
|
|
4147
|
-
throw new ReferenceError(msg);
|
|
4148
|
-
}
|
|
4149
|
-
if (maxAliasCount >= 0) {
|
|
4150
|
-
data.count += 1;
|
|
4151
|
-
if (data.aliasCount === 0)
|
|
4152
|
-
data.aliasCount = getAliasCount(doc, source, anchors2);
|
|
4153
|
-
if (data.count * data.aliasCount > maxAliasCount) {
|
|
4154
|
-
const msg = "Excessive alias count indicates a resource exhaustion attack";
|
|
4155
|
-
throw new ReferenceError(msg);
|
|
4156
|
-
}
|
|
4157
|
-
}
|
|
4158
|
-
return data.res;
|
|
4233
|
+
return ctx.anchors.get(source).res;
|
|
4159
4234
|
}
|
|
4160
4235
|
toString(ctx, _onComment, _onChompKeep) {
|
|
4161
4236
|
const src = `*${this.source}`;
|
|
@@ -4312,9 +4387,9 @@ var require_Collection = __commonJS({
|
|
|
4312
4387
|
for (let i2 = path26.length - 1; i2 >= 0; --i2) {
|
|
4313
4388
|
const k = path26[i2];
|
|
4314
4389
|
if (typeof k === "number" && Number.isInteger(k) && k >= 0) {
|
|
4315
|
-
const
|
|
4316
|
-
|
|
4317
|
-
v =
|
|
4390
|
+
const a2 = [];
|
|
4391
|
+
a2[k] = v;
|
|
4392
|
+
v = a2;
|
|
4318
4393
|
} else {
|
|
4319
4394
|
v = /* @__PURE__ */ new Map([[k, v]]);
|
|
4320
4395
|
}
|
|
@@ -4404,8 +4479,8 @@ var require_Collection = __commonJS({
|
|
|
4404
4479
|
return this.items.every((node) => {
|
|
4405
4480
|
if (!identity2.isPair(node))
|
|
4406
4481
|
return false;
|
|
4407
|
-
const
|
|
4408
|
-
return
|
|
4482
|
+
const n3 = node.value;
|
|
4483
|
+
return n3 == null || allowScalar && identity2.isScalar(n3) && n3.value == null && !n3.commentBefore && !n3.comment && !n3.tag;
|
|
4409
4484
|
});
|
|
4410
4485
|
}
|
|
4411
4486
|
/**
|
|
@@ -4987,7 +5062,7 @@ var require_stringify = __commonJS({
|
|
|
4987
5062
|
}
|
|
4988
5063
|
}
|
|
4989
5064
|
let tagObj = void 0;
|
|
4990
|
-
const node = identity2.isNode(item) ? item : ctx.doc.createNode(item, { onTagObj: (
|
|
5065
|
+
const node = identity2.isNode(item) ? item : ctx.doc.createNode(item, { onTagObj: (o) => tagObj = o });
|
|
4991
5066
|
tagObj ?? (tagObj = getTagObject(ctx.doc.schema.tags, node));
|
|
4992
5067
|
const props = stringifyProps(node, tagObj, ctx);
|
|
4993
5068
|
if (props.length > 0)
|
|
@@ -5848,18 +5923,18 @@ var require_stringifyNumber = __commonJS({
|
|
|
5848
5923
|
const num = typeof value === "number" ? value : Number(value);
|
|
5849
5924
|
if (!isFinite(num))
|
|
5850
5925
|
return isNaN(num) ? ".nan" : num < 0 ? "-.inf" : ".inf";
|
|
5851
|
-
let
|
|
5852
|
-
if (!format2 && minFractionDigits && (!tag || tag === "tag:yaml.org,2002:float") && /^-?\d/.test(
|
|
5853
|
-
let i2 =
|
|
5926
|
+
let n3 = Object.is(value, -0) ? "-0" : JSON.stringify(value);
|
|
5927
|
+
if (!format2 && minFractionDigits && (!tag || tag === "tag:yaml.org,2002:float") && /^-?\d/.test(n3) && !n3.includes("e")) {
|
|
5928
|
+
let i2 = n3.indexOf(".");
|
|
5854
5929
|
if (i2 < 0) {
|
|
5855
|
-
i2 =
|
|
5856
|
-
|
|
5930
|
+
i2 = n3.length;
|
|
5931
|
+
n3 += ".";
|
|
5857
5932
|
}
|
|
5858
|
-
let d = minFractionDigits - (
|
|
5933
|
+
let d = minFractionDigits - (n3.length - i2 - 1);
|
|
5859
5934
|
while (d-- > 0)
|
|
5860
|
-
|
|
5935
|
+
n3 += "0";
|
|
5861
5936
|
}
|
|
5862
|
-
return
|
|
5937
|
+
return n3;
|
|
5863
5938
|
}
|
|
5864
5939
|
exports.stringifyNumber = stringifyNumber;
|
|
5865
5940
|
}
|
|
@@ -6103,10 +6178,10 @@ var require_binary = __commonJS({
|
|
|
6103
6178
|
type ?? (type = Scalar.Scalar.BLOCK_LITERAL);
|
|
6104
6179
|
if (type !== Scalar.Scalar.QUOTE_DOUBLE) {
|
|
6105
6180
|
const lineWidth = Math.max(ctx.options.lineWidth - ctx.indent.length, ctx.options.minContentWidth);
|
|
6106
|
-
const
|
|
6107
|
-
const lines = new Array(
|
|
6108
|
-
for (let i2 = 0,
|
|
6109
|
-
lines[i2] = str.substr(
|
|
6181
|
+
const n3 = Math.ceil(str.length / lineWidth);
|
|
6182
|
+
const lines = new Array(n3);
|
|
6183
|
+
for (let i2 = 0, o = 0; i2 < n3; ++i2, o += lineWidth) {
|
|
6184
|
+
lines[i2] = str.substr(o, lineWidth);
|
|
6110
6185
|
}
|
|
6111
6186
|
str = lines.join(type === Scalar.Scalar.BLOCK_LITERAL ? "\n" : " ");
|
|
6112
6187
|
}
|
|
@@ -6377,11 +6452,11 @@ var require_int2 = __commonJS({
|
|
|
6377
6452
|
str = `0x${str}`;
|
|
6378
6453
|
break;
|
|
6379
6454
|
}
|
|
6380
|
-
const
|
|
6381
|
-
return sign === "-" ? BigInt(-1) *
|
|
6455
|
+
const n4 = BigInt(str);
|
|
6456
|
+
return sign === "-" ? BigInt(-1) * n4 : n4;
|
|
6382
6457
|
}
|
|
6383
|
-
const
|
|
6384
|
-
return sign === "-" ? -1 *
|
|
6458
|
+
const n3 = parseInt(str, radix);
|
|
6459
|
+
return sign === "-" ? -1 * n3 : n3;
|
|
6385
6460
|
}
|
|
6386
6461
|
function intStringify(node, radix, prefix) {
|
|
6387
6462
|
const { value } = node;
|
|
@@ -6530,15 +6605,15 @@ var require_timestamp = __commonJS({
|
|
|
6530
6605
|
function parseSexagesimal(str, asBigInt) {
|
|
6531
6606
|
const sign = str[0];
|
|
6532
6607
|
const parts = sign === "-" || sign === "+" ? str.substring(1) : str;
|
|
6533
|
-
const num = (
|
|
6608
|
+
const num = (n3) => asBigInt ? BigInt(n3) : Number(n3);
|
|
6534
6609
|
const res = parts.replace(/_/g, "").split(":").reduce((res2, p) => res2 * num(60) + num(p), num(0));
|
|
6535
6610
|
return sign === "-" ? num(-1) * res : res;
|
|
6536
6611
|
}
|
|
6537
6612
|
function stringifySexagesimal(node) {
|
|
6538
6613
|
let { value } = node;
|
|
6539
|
-
let num = (
|
|
6614
|
+
let num = (n3) => n3;
|
|
6540
6615
|
if (typeof value === "bigint")
|
|
6541
|
-
num = (
|
|
6616
|
+
num = (n3) => BigInt(n3);
|
|
6542
6617
|
else if (isNaN(value) || !isFinite(value))
|
|
6543
6618
|
return stringifyNumber.stringifyNumber(node);
|
|
6544
6619
|
let sign = "";
|
|
@@ -6558,7 +6633,7 @@ var require_timestamp = __commonJS({
|
|
|
6558
6633
|
parts.unshift(value);
|
|
6559
6634
|
}
|
|
6560
6635
|
}
|
|
6561
|
-
return sign + parts.map((
|
|
6636
|
+
return sign + parts.map((n3) => String(n3).padStart(2, "0")).join(":").replace(/000000\d*$/, "");
|
|
6562
6637
|
}
|
|
6563
6638
|
var intTime = {
|
|
6564
6639
|
identify: (value) => typeof value === "bigint" || Number.isInteger(value),
|
|
@@ -6757,7 +6832,7 @@ var require_Schema = __commonJS({
|
|
|
6757
6832
|
var seq = require_seq();
|
|
6758
6833
|
var string = require_string();
|
|
6759
6834
|
var tags = require_tags();
|
|
6760
|
-
var sortMapEntriesByKey = (
|
|
6835
|
+
var sortMapEntriesByKey = (a2, b) => a2.key < b.key ? -1 : a2.key > b.key ? 1 : 0;
|
|
6761
6836
|
var Schema = class _Schema {
|
|
6762
6837
|
constructor({ compat, customTags, merge, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) {
|
|
6763
6838
|
this.compat = Array.isArray(compat) ? tags.getTags(compat, "compat") : compat ? tags.getTags(null, compat) : null;
|
|
@@ -7437,7 +7512,7 @@ var require_util_map_includes = __commonJS({
|
|
|
7437
7512
|
const { uniqueKeys } = ctx.options;
|
|
7438
7513
|
if (uniqueKeys === false)
|
|
7439
7514
|
return false;
|
|
7440
|
-
const isEqual = typeof uniqueKeys === "function" ? uniqueKeys : (
|
|
7515
|
+
const isEqual = typeof uniqueKeys === "function" ? uniqueKeys : (a2, b) => a2 === b || identity2.isScalar(a2) && identity2.isScalar(b) && a2.value === b.value;
|
|
7441
7516
|
return items.some((pair) => isEqual(pair.key, search));
|
|
7442
7517
|
}
|
|
7443
7518
|
exports.mapIncludes = mapIncludes;
|
|
@@ -8029,9 +8104,9 @@ var require_resolve_block_scalar = __commonJS({
|
|
|
8029
8104
|
if (!chomp && (ch === "-" || ch === "+"))
|
|
8030
8105
|
chomp = ch;
|
|
8031
8106
|
else {
|
|
8032
|
-
const
|
|
8033
|
-
if (!indent &&
|
|
8034
|
-
indent =
|
|
8107
|
+
const n3 = Number(ch);
|
|
8108
|
+
if (!indent && n3)
|
|
8109
|
+
indent = n3;
|
|
8035
8110
|
else if (error === -1)
|
|
8036
8111
|
error = offset + i2;
|
|
8037
8112
|
}
|
|
@@ -8157,37 +8232,38 @@ var require_resolve_flow_scalar = __commonJS({
|
|
|
8157
8232
|
}
|
|
8158
8233
|
if (badChar)
|
|
8159
8234
|
onError(0, "BAD_SCALAR_START", `Plain value cannot start with ${badChar}`);
|
|
8160
|
-
return
|
|
8235
|
+
return unfoldLines(source);
|
|
8161
8236
|
}
|
|
8162
8237
|
function singleQuotedValue(source, onError) {
|
|
8163
8238
|
if (source[source.length - 1] !== "'" || source.length === 1)
|
|
8164
8239
|
onError(source.length, "MISSING_CHAR", "Missing closing 'quote");
|
|
8165
|
-
return
|
|
8240
|
+
return unfoldLines(source.slice(1, -1)).replace(/''/g, "'");
|
|
8166
8241
|
}
|
|
8167
|
-
function
|
|
8168
|
-
|
|
8242
|
+
function unfoldLines(source) {
|
|
8243
|
+
const line = /(.*?)\r?\n/sy;
|
|
8244
|
+
let match = line.exec(source);
|
|
8245
|
+
if (!match)
|
|
8246
|
+
return source;
|
|
8247
|
+
let trimEnd, trimBoth;
|
|
8169
8248
|
try {
|
|
8170
|
-
|
|
8171
|
-
|
|
8249
|
+
trimEnd = new RegExp("(?<![ ])[ ]+$");
|
|
8250
|
+
trimBoth = new RegExp("^[ ]+|(?<![ ])[ ]+$", "g");
|
|
8172
8251
|
} catch {
|
|
8173
|
-
|
|
8174
|
-
|
|
8252
|
+
trimEnd = /[ \t]+$/;
|
|
8253
|
+
trimBoth = /^[ \t]+|[ \t]+$/g;
|
|
8175
8254
|
}
|
|
8176
|
-
let
|
|
8177
|
-
if (!match)
|
|
8178
|
-
return source;
|
|
8179
|
-
let res = match[1];
|
|
8255
|
+
let res = match[1].replace(trimEnd, "");
|
|
8180
8256
|
let sep8 = " ";
|
|
8181
|
-
let pos =
|
|
8182
|
-
line.lastIndex = pos;
|
|
8257
|
+
let pos = line.lastIndex;
|
|
8183
8258
|
while (match = line.exec(source)) {
|
|
8184
|
-
|
|
8259
|
+
const lm = match[1].replace(trimBoth, "");
|
|
8260
|
+
if (lm === "") {
|
|
8185
8261
|
if (sep8 === "\n")
|
|
8186
8262
|
res += sep8;
|
|
8187
8263
|
else
|
|
8188
8264
|
sep8 = "\n";
|
|
8189
8265
|
} else {
|
|
8190
|
-
res += sep8 +
|
|
8266
|
+
res += sep8 + lm;
|
|
8191
8267
|
sep8 = " ";
|
|
8192
8268
|
}
|
|
8193
8269
|
pos = line.lastIndex;
|
|
@@ -9251,8 +9327,8 @@ var require_lexer = __commonJS({
|
|
|
9251
9327
|
return this.buffer[i2 + 1] === "\n";
|
|
9252
9328
|
return false;
|
|
9253
9329
|
}
|
|
9254
|
-
charAt(
|
|
9255
|
-
return this.buffer[this.pos +
|
|
9330
|
+
charAt(n3) {
|
|
9331
|
+
return this.buffer[this.pos + n3];
|
|
9256
9332
|
}
|
|
9257
9333
|
continueScalar(offset) {
|
|
9258
9334
|
let ch = this.buffer[offset];
|
|
@@ -9286,8 +9362,8 @@ var require_lexer = __commonJS({
|
|
|
9286
9362
|
end -= 1;
|
|
9287
9363
|
return this.buffer.substring(this.pos, end);
|
|
9288
9364
|
}
|
|
9289
|
-
hasChars(
|
|
9290
|
-
return this.pos +
|
|
9365
|
+
hasChars(n3) {
|
|
9366
|
+
return this.pos + n3 <= this.buffer.length;
|
|
9291
9367
|
}
|
|
9292
9368
|
setNext(state2) {
|
|
9293
9369
|
this.buffer = this.buffer.substring(this.pos);
|
|
@@ -9296,8 +9372,8 @@ var require_lexer = __commonJS({
|
|
|
9296
9372
|
this.next = state2;
|
|
9297
9373
|
return null;
|
|
9298
9374
|
}
|
|
9299
|
-
peek(
|
|
9300
|
-
return this.buffer.substr(this.pos,
|
|
9375
|
+
peek(n3) {
|
|
9376
|
+
return this.buffer.substr(this.pos, n3);
|
|
9301
9377
|
}
|
|
9302
9378
|
*parseNext(next) {
|
|
9303
9379
|
switch (next) {
|
|
@@ -9346,8 +9422,8 @@ var require_lexer = __commonJS({
|
|
|
9346
9422
|
else
|
|
9347
9423
|
break;
|
|
9348
9424
|
}
|
|
9349
|
-
const
|
|
9350
|
-
yield* this.pushCount(line.length -
|
|
9425
|
+
const n3 = (yield* this.pushCount(dirEnd)) + (yield* this.pushSpaces(true));
|
|
9426
|
+
yield* this.pushCount(line.length - n3);
|
|
9351
9427
|
this.pushNewline();
|
|
9352
9428
|
return "stream";
|
|
9353
9429
|
}
|
|
@@ -9385,9 +9461,9 @@ var require_lexer = __commonJS({
|
|
|
9385
9461
|
if (!ch1 && !this.atEnd)
|
|
9386
9462
|
return this.setNext("block-start");
|
|
9387
9463
|
if ((ch0 === "-" || ch0 === "?" || ch0 === ":") && isEmpty(ch1)) {
|
|
9388
|
-
const
|
|
9464
|
+
const n3 = (yield* this.pushCount(1)) + (yield* this.pushSpaces(true));
|
|
9389
9465
|
this.indentNext = this.indentValue + 1;
|
|
9390
|
-
this.indentValue +=
|
|
9466
|
+
this.indentValue += n3;
|
|
9391
9467
|
return "block-start";
|
|
9392
9468
|
}
|
|
9393
9469
|
return "doc";
|
|
@@ -9397,10 +9473,10 @@ var require_lexer = __commonJS({
|
|
|
9397
9473
|
const line = this.getLine();
|
|
9398
9474
|
if (line === null)
|
|
9399
9475
|
return this.setNext("doc");
|
|
9400
|
-
let
|
|
9401
|
-
switch (line[
|
|
9476
|
+
let n3 = yield* this.pushIndicators();
|
|
9477
|
+
switch (line[n3]) {
|
|
9402
9478
|
case "#":
|
|
9403
|
-
yield* this.pushCount(line.length -
|
|
9479
|
+
yield* this.pushCount(line.length - n3);
|
|
9404
9480
|
// fallthrough
|
|
9405
9481
|
case void 0:
|
|
9406
9482
|
yield* this.pushNewline();
|
|
@@ -9423,9 +9499,9 @@ var require_lexer = __commonJS({
|
|
|
9423
9499
|
return yield* this.parseQuotedScalar();
|
|
9424
9500
|
case "|":
|
|
9425
9501
|
case ">":
|
|
9426
|
-
|
|
9427
|
-
|
|
9428
|
-
yield* this.pushCount(line.length -
|
|
9502
|
+
n3 += yield* this.parseBlockScalarHeader();
|
|
9503
|
+
n3 += yield* this.pushSpaces(true);
|
|
9504
|
+
yield* this.pushCount(line.length - n3);
|
|
9429
9505
|
yield* this.pushNewline();
|
|
9430
9506
|
return yield* this.parseBlockScalar();
|
|
9431
9507
|
default:
|
|
@@ -9456,18 +9532,18 @@ var require_lexer = __commonJS({
|
|
|
9456
9532
|
return yield* this.parseLineStart();
|
|
9457
9533
|
}
|
|
9458
9534
|
}
|
|
9459
|
-
let
|
|
9460
|
-
while (line[
|
|
9461
|
-
|
|
9462
|
-
|
|
9535
|
+
let n3 = 0;
|
|
9536
|
+
while (line[n3] === ",") {
|
|
9537
|
+
n3 += yield* this.pushCount(1);
|
|
9538
|
+
n3 += yield* this.pushSpaces(true);
|
|
9463
9539
|
this.flowKey = false;
|
|
9464
9540
|
}
|
|
9465
|
-
|
|
9466
|
-
switch (line[
|
|
9541
|
+
n3 += yield* this.pushIndicators();
|
|
9542
|
+
switch (line[n3]) {
|
|
9467
9543
|
case void 0:
|
|
9468
9544
|
return "flow";
|
|
9469
9545
|
case "#":
|
|
9470
|
-
yield* this.pushCount(line.length -
|
|
9546
|
+
yield* this.pushCount(line.length - n3);
|
|
9471
9547
|
return "flow";
|
|
9472
9548
|
case "{":
|
|
9473
9549
|
case "[":
|
|
@@ -9511,10 +9587,10 @@ var require_lexer = __commonJS({
|
|
|
9511
9587
|
end = this.buffer.indexOf("'", end + 2);
|
|
9512
9588
|
} else {
|
|
9513
9589
|
while (end !== -1) {
|
|
9514
|
-
let
|
|
9515
|
-
while (this.buffer[end - 1 -
|
|
9516
|
-
|
|
9517
|
-
if (
|
|
9590
|
+
let n3 = 0;
|
|
9591
|
+
while (this.buffer[end - 1 - n3] === "\\")
|
|
9592
|
+
n3 += 1;
|
|
9593
|
+
if (n3 % 2 === 0)
|
|
9518
9594
|
break;
|
|
9519
9595
|
end = this.buffer.indexOf('"', end + 1);
|
|
9520
9596
|
}
|
|
@@ -9668,11 +9744,11 @@ var require_lexer = __commonJS({
|
|
|
9668
9744
|
yield* this.pushToIndex(end + 1, true);
|
|
9669
9745
|
return inFlow ? "flow" : "doc";
|
|
9670
9746
|
}
|
|
9671
|
-
*pushCount(
|
|
9672
|
-
if (
|
|
9673
|
-
yield this.buffer.substr(this.pos,
|
|
9674
|
-
this.pos +=
|
|
9675
|
-
return
|
|
9747
|
+
*pushCount(n3) {
|
|
9748
|
+
if (n3 > 0) {
|
|
9749
|
+
yield this.buffer.substr(this.pos, n3);
|
|
9750
|
+
this.pos += n3;
|
|
9751
|
+
return n3;
|
|
9676
9752
|
}
|
|
9677
9753
|
return 0;
|
|
9678
9754
|
}
|
|
@@ -9687,16 +9763,16 @@ var require_lexer = __commonJS({
|
|
|
9687
9763
|
return 0;
|
|
9688
9764
|
}
|
|
9689
9765
|
*pushIndicators() {
|
|
9690
|
-
let
|
|
9766
|
+
let n3 = 0;
|
|
9691
9767
|
loop: while (true) {
|
|
9692
9768
|
switch (this.charAt(0)) {
|
|
9693
9769
|
case "!":
|
|
9694
|
-
|
|
9695
|
-
|
|
9770
|
+
n3 += yield* this.pushTag();
|
|
9771
|
+
n3 += yield* this.pushSpaces(true);
|
|
9696
9772
|
continue loop;
|
|
9697
9773
|
case "&":
|
|
9698
|
-
|
|
9699
|
-
|
|
9774
|
+
n3 += yield* this.pushUntil(isNotAnchorChar);
|
|
9775
|
+
n3 += yield* this.pushSpaces(true);
|
|
9700
9776
|
continue loop;
|
|
9701
9777
|
case "-":
|
|
9702
9778
|
// this is an error
|
|
@@ -9710,15 +9786,15 @@ var require_lexer = __commonJS({
|
|
|
9710
9786
|
this.indentNext = this.indentValue + 1;
|
|
9711
9787
|
else if (this.flowKey)
|
|
9712
9788
|
this.flowKey = false;
|
|
9713
|
-
|
|
9714
|
-
|
|
9789
|
+
n3 += yield* this.pushCount(1);
|
|
9790
|
+
n3 += yield* this.pushSpaces(true);
|
|
9715
9791
|
continue loop;
|
|
9716
9792
|
}
|
|
9717
9793
|
}
|
|
9718
9794
|
}
|
|
9719
9795
|
break loop;
|
|
9720
9796
|
}
|
|
9721
|
-
return
|
|
9797
|
+
return n3;
|
|
9722
9798
|
}
|
|
9723
9799
|
*pushTag() {
|
|
9724
9800
|
if (this.charAt(1) === "<") {
|
|
@@ -9756,12 +9832,12 @@ var require_lexer = __commonJS({
|
|
|
9756
9832
|
do {
|
|
9757
9833
|
ch = this.buffer[++i2];
|
|
9758
9834
|
} while (ch === " " || allowTabs && ch === " ");
|
|
9759
|
-
const
|
|
9760
|
-
if (
|
|
9761
|
-
yield this.buffer.substr(this.pos,
|
|
9835
|
+
const n3 = i2 - this.pos;
|
|
9836
|
+
if (n3 > 0) {
|
|
9837
|
+
yield this.buffer.substr(this.pos, n3);
|
|
9762
9838
|
this.pos = i2;
|
|
9763
9839
|
}
|
|
9764
|
-
return
|
|
9840
|
+
return n3;
|
|
9765
9841
|
}
|
|
9766
9842
|
*pushUntil(test) {
|
|
9767
9843
|
let i2 = this.pos;
|
|
@@ -10036,8 +10112,8 @@ var require_parser = __commonJS({
|
|
|
10036
10112
|
}
|
|
10037
10113
|
yield* this.pop();
|
|
10038
10114
|
}
|
|
10039
|
-
peek(
|
|
10040
|
-
return this.stack[this.stack.length -
|
|
10115
|
+
peek(n3) {
|
|
10116
|
+
return this.stack[this.stack.length - n3];
|
|
10041
10117
|
}
|
|
10042
10118
|
*pop(error) {
|
|
10043
10119
|
const token = error ?? this.stack.pop();
|
|
@@ -10778,7 +10854,7 @@ var require_public_api = __commonJS({
|
|
|
10778
10854
|
});
|
|
10779
10855
|
|
|
10780
10856
|
// ../../node_modules/yaml/dist/index.js
|
|
10781
|
-
var
|
|
10857
|
+
var require_dist2 = __commonJS({
|
|
10782
10858
|
"../../node_modules/yaml/dist/index.js"(exports) {
|
|
10783
10859
|
"use strict";
|
|
10784
10860
|
var composer = require_composer();
|
|
@@ -10854,8 +10930,8 @@ var require_config_parse = __commonJS({
|
|
|
10854
10930
|
const value = trimConfigValue(stdout2);
|
|
10855
10931
|
if (!value)
|
|
10856
10932
|
return 0;
|
|
10857
|
-
const
|
|
10858
|
-
return Number.isFinite(
|
|
10933
|
+
const n3 = Number(value);
|
|
10934
|
+
return Number.isFinite(n3) && n3 > 0 ? n3 : 0;
|
|
10859
10935
|
}
|
|
10860
10936
|
function parseBeforeAgeMs(stdout2, now = Date.now()) {
|
|
10861
10937
|
const value = trimConfigValue(stdout2);
|
|
@@ -11070,7 +11146,7 @@ var require_pick_target = __commonJS({
|
|
|
11070
11146
|
});
|
|
11071
11147
|
|
|
11072
11148
|
// ../update-core/dist/index.js
|
|
11073
|
-
var
|
|
11149
|
+
var require_dist3 = __commonJS({
|
|
11074
11150
|
"../update-core/dist/index.js"(exports) {
|
|
11075
11151
|
"use strict";
|
|
11076
11152
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -11457,13 +11533,13 @@ function wrapAnsi(string, columns, options) {
|
|
|
11457
11533
|
// ../../node_modules/@clack/core/dist/index.mjs
|
|
11458
11534
|
var import_sisteransi = __toESM(require_src(), 1);
|
|
11459
11535
|
import { ReadStream } from "node:tty";
|
|
11460
|
-
function findCursor(s,
|
|
11536
|
+
function findCursor(s, o, l2) {
|
|
11461
11537
|
if (!l2.some((r2) => !r2.disabled))
|
|
11462
11538
|
return s;
|
|
11463
|
-
const t2 = s +
|
|
11464
|
-
return l2[e]
|
|
11539
|
+
const t2 = s + o, n3 = Math.max(l2.length - 1, 0), e = t2 < 0 ? n3 : t2 > n3 ? 0 : t2;
|
|
11540
|
+
return l2[e]?.disabled ? findCursor(e, o < 0 ? -1 : 1, l2) : e;
|
|
11465
11541
|
}
|
|
11466
|
-
var a$
|
|
11542
|
+
var a$1 = ["up", "down", "left", "right", "space", "enter", "cancel"];
|
|
11467
11543
|
var t = [
|
|
11468
11544
|
"January",
|
|
11469
11545
|
"February",
|
|
@@ -11479,7 +11555,7 @@ var t = [
|
|
|
11479
11555
|
"December"
|
|
11480
11556
|
];
|
|
11481
11557
|
var settings = {
|
|
11482
|
-
actions: new Set(a$
|
|
11558
|
+
actions: new Set(a$1),
|
|
11483
11559
|
aliases: /* @__PURE__ */ new Map([
|
|
11484
11560
|
// vim support
|
|
11485
11561
|
["k", "up"],
|
|
@@ -11495,21 +11571,28 @@ var settings = {
|
|
|
11495
11571
|
error: "Something went wrong"
|
|
11496
11572
|
},
|
|
11497
11573
|
withGuide: true,
|
|
11574
|
+
accessible: void 0,
|
|
11498
11575
|
date: {
|
|
11499
11576
|
monthNames: [...t],
|
|
11500
11577
|
messages: {
|
|
11501
11578
|
required: "Please enter a valid date",
|
|
11502
11579
|
invalidMonth: "There are only 12 months in a year",
|
|
11503
|
-
invalidDay: (
|
|
11504
|
-
afterMin: (
|
|
11505
|
-
beforeMax: (
|
|
11580
|
+
invalidDay: (n3, e) => `There are only ${n3} days in ${e}`,
|
|
11581
|
+
afterMin: (n3) => `Date must be on or after ${n3.toISOString().slice(0, 10)}`,
|
|
11582
|
+
beforeMax: (n3) => `Date must be on or before ${n3.toISOString().slice(0, 10)}`
|
|
11506
11583
|
}
|
|
11507
11584
|
}
|
|
11508
11585
|
};
|
|
11509
|
-
function
|
|
11510
|
-
if (
|
|
11511
|
-
|
|
11512
|
-
|
|
11586
|
+
function isAccessible(n3) {
|
|
11587
|
+
if (n3 !== void 0) return n3;
|
|
11588
|
+
if (settings.accessible !== void 0) return settings.accessible;
|
|
11589
|
+
const e = process.env.ACCESSIBLE;
|
|
11590
|
+
return e !== void 0 && e !== "" && e !== "0" && e !== "false";
|
|
11591
|
+
}
|
|
11592
|
+
function isActionKey(n3, e) {
|
|
11593
|
+
if (typeof n3 == "string")
|
|
11594
|
+
return settings.aliases.get(n3) === e;
|
|
11595
|
+
for (const s of n3)
|
|
11513
11596
|
if (s !== void 0 && isActionKey(s, e))
|
|
11514
11597
|
return true;
|
|
11515
11598
|
return false;
|
|
@@ -11519,8 +11602,8 @@ function diffLines(i2, s) {
|
|
|
11519
11602
|
const e = i2.split(`
|
|
11520
11603
|
`), t2 = s.split(`
|
|
11521
11604
|
`), r2 = Math.max(e.length, t2.length), f = [];
|
|
11522
|
-
for (let
|
|
11523
|
-
e[
|
|
11605
|
+
for (let n3 = 0; n3 < r2; n3++)
|
|
11606
|
+
e[n3] !== t2[n3] && f.push(n3);
|
|
11524
11607
|
return {
|
|
11525
11608
|
lines: f,
|
|
11526
11609
|
numLinesBefore: e.length,
|
|
@@ -11534,14 +11617,14 @@ function isCancel(e) {
|
|
|
11534
11617
|
return e === CANCEL_SYMBOL;
|
|
11535
11618
|
}
|
|
11536
11619
|
function setRawMode(e, r2) {
|
|
11537
|
-
const
|
|
11538
|
-
|
|
11620
|
+
const o = e;
|
|
11621
|
+
o.isTTY && o.setRawMode(r2);
|
|
11539
11622
|
}
|
|
11540
11623
|
function block({
|
|
11541
11624
|
input: e = stdin,
|
|
11542
11625
|
output: r2 = stdout,
|
|
11543
|
-
overwrite:
|
|
11544
|
-
hideCursor:
|
|
11626
|
+
overwrite: o = true,
|
|
11627
|
+
hideCursor: n3 = true
|
|
11545
11628
|
} = {}) {
|
|
11546
11629
|
const s = l.createInterface({
|
|
11547
11630
|
input: e,
|
|
@@ -11550,50 +11633,46 @@ function block({
|
|
|
11550
11633
|
tabSize: 1
|
|
11551
11634
|
});
|
|
11552
11635
|
l.emitKeypressEvents(e, s), e instanceof ReadStream && e.isTTY && e.setRawMode(true);
|
|
11553
|
-
const
|
|
11636
|
+
const t2 = (f, { name: a2, sequence: w }) => {
|
|
11554
11637
|
const c2 = String(f);
|
|
11555
|
-
if (isActionKey([c2,
|
|
11556
|
-
|
|
11638
|
+
if (isActionKey([c2, a2, w], "cancel")) {
|
|
11639
|
+
n3 && r2.write(import_sisteransi.cursor.show), process.exit(0);
|
|
11557
11640
|
return;
|
|
11558
11641
|
}
|
|
11559
|
-
if (!
|
|
11560
|
-
const i2 =
|
|
11642
|
+
if (!o) return;
|
|
11643
|
+
const i2 = a2 === "return" ? 0 : -1, m2 = a2 === "return" ? -1 : 0;
|
|
11561
11644
|
l.moveCursor(r2, i2, m2, () => {
|
|
11562
11645
|
l.clearLine(r2, 1, () => {
|
|
11563
|
-
e.once("keypress",
|
|
11646
|
+
e.once("keypress", t2);
|
|
11564
11647
|
});
|
|
11565
11648
|
});
|
|
11566
11649
|
};
|
|
11567
|
-
return
|
|
11568
|
-
e.off("keypress",
|
|
11650
|
+
return n3 && r2.write(import_sisteransi.cursor.hide), e.once("keypress", t2), () => {
|
|
11651
|
+
e.off("keypress", t2), n3 && r2.write(import_sisteransi.cursor.show), e instanceof ReadStream && e.isTTY && !R && e.setRawMode(false), s.terminal = false, s.close();
|
|
11569
11652
|
};
|
|
11570
11653
|
}
|
|
11571
11654
|
var getColumns = (e) => "columns" in e && typeof e.columns == "number" ? e.columns : 80;
|
|
11572
11655
|
var getRows = (e) => "rows" in e && typeof e.rows == "number" ? e.rows : 20;
|
|
11573
|
-
function wrapTextWithPrefix(e, r2,
|
|
11656
|
+
function wrapTextWithPrefix(e, r2, o, n3 = o, s = o, t2) {
|
|
11574
11657
|
const f = getColumns(e ?? stdout);
|
|
11575
|
-
return wrapAnsi(r2, f -
|
|
11658
|
+
return wrapAnsi(r2, f - o.length, {
|
|
11576
11659
|
hard: true,
|
|
11577
11660
|
trim: false
|
|
11578
11661
|
}).split(`
|
|
11579
11662
|
`).map((c2, i2, m2) => {
|
|
11580
|
-
const d =
|
|
11581
|
-
return i2 === 0 ? `${
|
|
11663
|
+
const d = t2 ? t2(c2, i2) : c2;
|
|
11664
|
+
return i2 === 0 ? `${n3}${d}` : i2 === m2.length - 1 ? `${s}${d}` : `${o}${d}`;
|
|
11582
11665
|
}).join(`
|
|
11583
11666
|
`);
|
|
11584
11667
|
}
|
|
11585
|
-
function runValidation(e,
|
|
11668
|
+
function runValidation(e, a2) {
|
|
11586
11669
|
if ("~standard" in e) {
|
|
11587
|
-
const
|
|
11588
|
-
|
|
11589
|
-
throw new TypeError(
|
|
11590
|
-
"Schema validation must be synchronous. Update `validate()` and remove any asynchronous logic."
|
|
11591
|
-
);
|
|
11592
|
-
return a3.issues?.at(0)?.message;
|
|
11670
|
+
const n3 = e["~standard"].validate(a2);
|
|
11671
|
+
return n3 instanceof Promise ? n3.then((r2) => r2.issues?.at(0)?.message) : n3.issues?.at(0)?.message;
|
|
11593
11672
|
}
|
|
11594
|
-
return e(
|
|
11673
|
+
return e(a2);
|
|
11595
11674
|
}
|
|
11596
|
-
var
|
|
11675
|
+
var y = class {
|
|
11597
11676
|
input;
|
|
11598
11677
|
output;
|
|
11599
11678
|
_abortSignal;
|
|
@@ -11608,9 +11687,17 @@ var V = class {
|
|
|
11608
11687
|
error = "";
|
|
11609
11688
|
value;
|
|
11610
11689
|
userInput = "";
|
|
11690
|
+
/**
|
|
11691
|
+
* Whether accessible (static, screen-reader friendly) output is enabled for
|
|
11692
|
+
* this prompt, resolved from the `accessible` option, the global setting,
|
|
11693
|
+
* and the `ACCESSIBLE` env var.
|
|
11694
|
+
*/
|
|
11695
|
+
get accessible() {
|
|
11696
|
+
return isAccessible(this.opts.accessible);
|
|
11697
|
+
}
|
|
11611
11698
|
constructor(t2, e = true) {
|
|
11612
|
-
const { input: i2 = stdin, output:
|
|
11613
|
-
this.opts =
|
|
11699
|
+
const { input: i2 = stdin, output: s = stdout, render: r2, signal: n3, ...o } = t2;
|
|
11700
|
+
this.opts = o, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = r2.bind(this), this._track = e, this._abortSignal = n3, this.input = i2, this.output = s;
|
|
11614
11701
|
}
|
|
11615
11702
|
/**
|
|
11616
11703
|
* Unsubscribe all listeners
|
|
@@ -11648,11 +11735,11 @@ var V = class {
|
|
|
11648
11735
|
* @param data - The data to pass to the callback
|
|
11649
11736
|
*/
|
|
11650
11737
|
emit(t2, ...e) {
|
|
11651
|
-
const i2 = this._subscribers.get(t2) ?? [],
|
|
11652
|
-
for (const
|
|
11653
|
-
|
|
11654
|
-
for (const
|
|
11655
|
-
|
|
11738
|
+
const i2 = this._subscribers.get(t2) ?? [], s = [];
|
|
11739
|
+
for (const r2 of i2)
|
|
11740
|
+
r2.cb(...e), r2.once && s.push(() => i2.splice(i2.indexOf(r2), 1));
|
|
11741
|
+
for (const r2 of s)
|
|
11742
|
+
r2();
|
|
11656
11743
|
}
|
|
11657
11744
|
prompt() {
|
|
11658
11745
|
return new Promise((t2) => {
|
|
@@ -11695,15 +11782,18 @@ var V = class {
|
|
|
11695
11782
|
_clearUserInput() {
|
|
11696
11783
|
this.rl?.write(null, { ctrl: true, name: "u" }), this._setUserInput("");
|
|
11697
11784
|
}
|
|
11698
|
-
onKeypress(t2, e) {
|
|
11699
|
-
if (this.
|
|
11700
|
-
if (this.
|
|
11701
|
-
|
|
11702
|
-
|
|
11785
|
+
async onKeypress(t2, e) {
|
|
11786
|
+
if (this.state !== "validating") {
|
|
11787
|
+
if (this._track && e.name !== "return" && (e.name && this._isActionKey(t2, e) && this.rl?.write(null, { ctrl: true, name: "h" }), this._cursor = this.rl?.cursor ?? 0, this._setUserInput(this.rl?.line)), this.state === "error" && (this.state = "active"), e?.name && (!this._track && settings.aliases.has(e.name) && this.emit("cursor", settings.aliases.get(e.name)), settings.actions.has(e.name) && this.emit("cursor", e.name)), t2 && (t2.toLowerCase() === "y" || t2.toLowerCase() === "n") && this.emit("confirm", t2.toLowerCase() === "y"), this.emit("key", t2, e), e?.name === "return" && this._shouldSubmit(t2, e)) {
|
|
11788
|
+
if (this.opts.validate) {
|
|
11789
|
+
const i2 = runValidation(this.opts.validate, this.value);
|
|
11790
|
+
let s;
|
|
11791
|
+
i2 instanceof Promise ? (this.state = "validating", this.render(), s = await i2) : s = i2, s && (this.error = s instanceof Error ? s.message : s, this.state = "error", this.rl?.write(this.userInput));
|
|
11792
|
+
}
|
|
11793
|
+
this.state !== "error" && (this.state = "submit");
|
|
11703
11794
|
}
|
|
11704
|
-
this.state
|
|
11795
|
+
isActionKey([t2, e?.name, e?.sequence], "cancel") && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close();
|
|
11705
11796
|
}
|
|
11706
|
-
isActionKey([t2, e?.name, e?.sequence], "cancel") && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close();
|
|
11707
11797
|
}
|
|
11708
11798
|
close() {
|
|
11709
11799
|
this.input.unpipe(), this.input.removeListener("keypress", this.onKeypress), this.output.write(`
|
|
@@ -11725,28 +11815,28 @@ var V = class {
|
|
|
11725
11815
|
else {
|
|
11726
11816
|
const e = diffLines(this._prevFrame, t2), i2 = getRows(this.output);
|
|
11727
11817
|
if (this.restoreCursor(), e) {
|
|
11728
|
-
const
|
|
11729
|
-
let
|
|
11730
|
-
if (
|
|
11818
|
+
const s = Math.max(0, e.numLinesAfter - i2), r2 = Math.max(0, e.numLinesBefore - i2);
|
|
11819
|
+
let n3 = e.lines.find((o) => o >= s);
|
|
11820
|
+
if (n3 === void 0) {
|
|
11731
11821
|
this._prevFrame = t2;
|
|
11732
11822
|
return;
|
|
11733
11823
|
}
|
|
11734
11824
|
if (e.lines.length === 1) {
|
|
11735
|
-
this.output.write(import_sisteransi.cursor.move(0,
|
|
11736
|
-
const
|
|
11825
|
+
this.output.write(import_sisteransi.cursor.move(0, n3 - r2)), this.output.write(import_sisteransi.erase.lines(1));
|
|
11826
|
+
const o = t2.split(`
|
|
11737
11827
|
`);
|
|
11738
|
-
this.output.write(
|
|
11828
|
+
this.output.write(o[n3]), this._prevFrame = t2, this.output.write(import_sisteransi.cursor.move(0, o.length - n3 - 1));
|
|
11739
11829
|
return;
|
|
11740
11830
|
} else if (e.lines.length > 1) {
|
|
11741
|
-
if (
|
|
11742
|
-
|
|
11831
|
+
if (s < r2)
|
|
11832
|
+
n3 = s;
|
|
11743
11833
|
else {
|
|
11744
|
-
const h2 =
|
|
11834
|
+
const h2 = n3 - r2;
|
|
11745
11835
|
h2 > 0 && this.output.write(import_sisteransi.cursor.move(0, h2));
|
|
11746
11836
|
}
|
|
11747
11837
|
this.output.write(import_sisteransi.erase.down());
|
|
11748
11838
|
const f = t2.split(`
|
|
11749
|
-
`).slice(
|
|
11839
|
+
`).slice(n3);
|
|
11750
11840
|
this.output.write(f.join(`
|
|
11751
11841
|
`)), this._prevFrame = t2;
|
|
11752
11842
|
return;
|
|
@@ -11758,7 +11848,7 @@ var V = class {
|
|
|
11758
11848
|
}
|
|
11759
11849
|
}
|
|
11760
11850
|
};
|
|
11761
|
-
var r = class extends
|
|
11851
|
+
var r = class extends y {
|
|
11762
11852
|
get cursor() {
|
|
11763
11853
|
return this.value ? 0 : 1;
|
|
11764
11854
|
}
|
|
@@ -11775,11 +11865,11 @@ var r = class extends V {
|
|
|
11775
11865
|
});
|
|
11776
11866
|
}
|
|
11777
11867
|
};
|
|
11778
|
-
var a
|
|
11868
|
+
var a = class extends y {
|
|
11779
11869
|
options;
|
|
11780
11870
|
cursor = 0;
|
|
11781
11871
|
get _value() {
|
|
11782
|
-
return this.options[this.cursor]
|
|
11872
|
+
return this.options[this.cursor]?.value;
|
|
11783
11873
|
}
|
|
11784
11874
|
get _enabledOptions() {
|
|
11785
11875
|
return this.options.filter((e) => e.disabled !== true);
|
|
@@ -11806,7 +11896,7 @@ var a$1 = class a extends V {
|
|
|
11806
11896
|
this.options.findIndex(({ value: t2 }) => t2 === e.cursorAt),
|
|
11807
11897
|
0
|
|
11808
11898
|
);
|
|
11809
|
-
this.cursor = this.options[i2]
|
|
11899
|
+
this.cursor = this.options[i2]?.disabled ? findCursor(i2, 1, this.options) : i2, this.on("key", (t2, l2) => {
|
|
11810
11900
|
l2.name === "a" && this.toggleAll(), l2.name === "i" && this.toggleInvert();
|
|
11811
11901
|
}), this.on("cursor", (t2) => {
|
|
11812
11902
|
switch (t2) {
|
|
@@ -11825,19 +11915,20 @@ var a$1 = class a extends V {
|
|
|
11825
11915
|
});
|
|
11826
11916
|
}
|
|
11827
11917
|
};
|
|
11828
|
-
var
|
|
11918
|
+
var n$1 = class n extends y {
|
|
11829
11919
|
options;
|
|
11830
11920
|
cursor = 0;
|
|
11831
11921
|
get _selectedValue() {
|
|
11832
11922
|
return this.options[this.cursor];
|
|
11833
11923
|
}
|
|
11834
11924
|
changeValue() {
|
|
11835
|
-
|
|
11925
|
+
const e = this._selectedValue;
|
|
11926
|
+
this.value = e === void 0 ? void 0 : e.value;
|
|
11836
11927
|
}
|
|
11837
|
-
constructor(
|
|
11838
|
-
super(
|
|
11839
|
-
const
|
|
11840
|
-
this.cursor = this.options[
|
|
11928
|
+
constructor(e) {
|
|
11929
|
+
super(e, false), this.options = e.options;
|
|
11930
|
+
const o = this.options.findIndex(({ value: s }) => s === e.initialValue), t2 = o === -1 ? 0 : o;
|
|
11931
|
+
this.cursor = this.options[t2]?.disabled ? findCursor(t2, 1, this.options) : t2, this.changeValue(), this.on("cursor", (s) => {
|
|
11841
11932
|
switch (s) {
|
|
11842
11933
|
case "left":
|
|
11843
11934
|
case "up":
|
|
@@ -11852,15 +11943,15 @@ var a2 = class extends V {
|
|
|
11852
11943
|
});
|
|
11853
11944
|
}
|
|
11854
11945
|
};
|
|
11855
|
-
var
|
|
11946
|
+
var n2 = class extends y {
|
|
11856
11947
|
get userInputWithCursor() {
|
|
11857
11948
|
if (this.state === "submit")
|
|
11858
11949
|
return this.userInput;
|
|
11859
11950
|
const t2 = this.userInput;
|
|
11860
11951
|
if (this.cursor >= t2.length)
|
|
11861
11952
|
return `${this.userInput}\u2588`;
|
|
11862
|
-
const
|
|
11863
|
-
return `${
|
|
11953
|
+
const r2 = t2.slice(0, this.cursor), s = t2.slice(this.cursor, this.cursor + 1), e = t2.slice(this.cursor + 1);
|
|
11954
|
+
return `${r2}${styleText("inverse", s)}${e}`;
|
|
11864
11955
|
}
|
|
11865
11956
|
get cursor() {
|
|
11866
11957
|
return this._cursor;
|
|
@@ -11869,8 +11960,8 @@ var n = class extends V {
|
|
|
11869
11960
|
super({
|
|
11870
11961
|
...t2,
|
|
11871
11962
|
initialUserInput: t2.initialUserInput ?? t2.initialValue
|
|
11872
|
-
}), this.on("userInput", (
|
|
11873
|
-
this._setValue(
|
|
11963
|
+
}), this.on("userInput", (r2) => {
|
|
11964
|
+
this._setValue(r2);
|
|
11874
11965
|
}), this.on("finalize", () => {
|
|
11875
11966
|
this.value || (this.value = t2.defaultValue), this.value === void 0 && (this.value = "");
|
|
11876
11967
|
});
|
|
@@ -11891,7 +11982,7 @@ function isUnicodeSupported() {
|
|
|
11891
11982
|
}
|
|
11892
11983
|
var unicode = isUnicodeSupported();
|
|
11893
11984
|
var isCI = () => process.env.CI === "true";
|
|
11894
|
-
var unicodeOr = (
|
|
11985
|
+
var unicodeOr = (o, e) => unicode ? o : e;
|
|
11895
11986
|
var S_STEP_ACTIVE = unicodeOr("\u25C6", "*");
|
|
11896
11987
|
var S_STEP_CANCEL = unicodeOr("\u25A0", "x");
|
|
11897
11988
|
var S_STEP_ERROR = unicodeOr("\u25B2", "x");
|
|
@@ -11917,8 +12008,8 @@ var S_INFO = unicodeOr("\u25CF", "\u2022");
|
|
|
11917
12008
|
var S_SUCCESS = unicodeOr("\u25C6", "*");
|
|
11918
12009
|
var S_WARN = unicodeOr("\u25B2", "!");
|
|
11919
12010
|
var S_ERROR = unicodeOr("\u25A0", "x");
|
|
11920
|
-
var symbol = (
|
|
11921
|
-
switch (
|
|
12011
|
+
var symbol = (o) => {
|
|
12012
|
+
switch (o) {
|
|
11922
12013
|
case "initial":
|
|
11923
12014
|
case "active":
|
|
11924
12015
|
return styleText2("cyan", S_STEP_ACTIVE);
|
|
@@ -11928,10 +12019,12 @@ var symbol = (o2) => {
|
|
|
11928
12019
|
return styleText2("yellow", S_STEP_ERROR);
|
|
11929
12020
|
case "submit":
|
|
11930
12021
|
return styleText2("green", S_STEP_SUBMIT);
|
|
12022
|
+
case "validating":
|
|
12023
|
+
return styleText2("dim", S_STEP_ACTIVE);
|
|
11931
12024
|
}
|
|
11932
12025
|
};
|
|
11933
|
-
var symbolBar = (
|
|
11934
|
-
switch (
|
|
12026
|
+
var symbolBar = (o) => {
|
|
12027
|
+
switch (o) {
|
|
11935
12028
|
case "initial":
|
|
11936
12029
|
case "active":
|
|
11937
12030
|
return styleText2("cyan", S_BAR);
|
|
@@ -11943,105 +12036,109 @@ var symbolBar = (o2) => {
|
|
|
11943
12036
|
return styleText2("green", S_BAR);
|
|
11944
12037
|
}
|
|
11945
12038
|
};
|
|
11946
|
-
function formatInstructionFooter(
|
|
11947
|
-
const r2 = [`${e ? `${styleText2("cyan", S_BAR)} ` : ""}${
|
|
12039
|
+
function formatInstructionFooter(o, e) {
|
|
12040
|
+
const r2 = [`${e ? `${styleText2("cyan", S_BAR)} ` : ""}${o.join(" \u2022 ")}`];
|
|
11948
12041
|
return e && r2.push(styleText2("cyan", S_BAR_END)), r2;
|
|
11949
12042
|
}
|
|
11950
|
-
var
|
|
11951
|
-
let r2 =
|
|
11952
|
-
if (
|
|
11953
|
-
for (let i2 =
|
|
11954
|
-
;
|
|
12043
|
+
var I = (l2, e, w, p, b, C2 = false) => {
|
|
12044
|
+
let r2 = e, O = 0;
|
|
12045
|
+
if (C2)
|
|
12046
|
+
for (let i2 = p - 1; i2 >= w; i2--) {
|
|
12047
|
+
const m2 = l2[i2];
|
|
12048
|
+
if (m2 && (r2 -= m2.length), O++, r2 <= b) break;
|
|
12049
|
+
}
|
|
11955
12050
|
else
|
|
11956
|
-
for (let i2 =
|
|
11957
|
-
;
|
|
11958
|
-
|
|
12051
|
+
for (let i2 = w; i2 < p; i2++) {
|
|
12052
|
+
const m2 = l2[i2];
|
|
12053
|
+
if (m2 && (r2 -= m2.length), O++, r2 <= b) break;
|
|
12054
|
+
}
|
|
12055
|
+
return { lineCount: r2, removals: O };
|
|
11959
12056
|
};
|
|
11960
12057
|
var limitOptions = ({
|
|
11961
12058
|
cursor: l2,
|
|
11962
|
-
options:
|
|
11963
|
-
style:
|
|
11964
|
-
output:
|
|
11965
|
-
maxItems:
|
|
11966
|
-
columnPadding:
|
|
12059
|
+
options: e,
|
|
12060
|
+
style: w,
|
|
12061
|
+
output: p = process.stdout,
|
|
12062
|
+
maxItems: b = Number.POSITIVE_INFINITY,
|
|
12063
|
+
columnPadding: C2 = 0,
|
|
11967
12064
|
rowPadding: r2 = 4
|
|
11968
12065
|
}) => {
|
|
11969
|
-
const i2 = getColumns(
|
|
11970
|
-
let
|
|
11971
|
-
l2 >=
|
|
11972
|
-
Math.min(l2 -
|
|
12066
|
+
const i2 = getColumns(p) - C2, m2 = getRows(p), M = styleText2("dim", "..."), v = Math.max(m2 - r2, 0), a2 = Math.max(Math.min(b, v), 5);
|
|
12067
|
+
let f = 0;
|
|
12068
|
+
l2 >= a2 - 3 && (f = Math.max(
|
|
12069
|
+
Math.min(l2 - a2 + 3, e.length - a2),
|
|
11973
12070
|
0
|
|
11974
12071
|
));
|
|
11975
|
-
let
|
|
12072
|
+
let d = a2 < e.length && f > 0, c2 = a2 < e.length && f + a2 < e.length;
|
|
11976
12073
|
const W2 = Math.min(
|
|
11977
|
-
|
|
11978
|
-
|
|
11979
|
-
),
|
|
11980
|
-
let
|
|
11981
|
-
|
|
11982
|
-
const
|
|
11983
|
-
for (let t2 =
|
|
11984
|
-
const
|
|
12074
|
+
f + a2,
|
|
12075
|
+
e.length
|
|
12076
|
+
), s = [];
|
|
12077
|
+
let g = 0;
|
|
12078
|
+
d && g++, c2 && g++;
|
|
12079
|
+
const T = f + (d ? 1 : 0), y2 = W2 - (c2 ? 1 : 0);
|
|
12080
|
+
for (let t2 = T; t2 < y2; t2++) {
|
|
12081
|
+
const n3 = e[t2], o = n3 ? w(n3, t2 === l2) : "", h2 = wrapAnsi(o, i2, {
|
|
11985
12082
|
hard: true,
|
|
11986
12083
|
trim: false
|
|
11987
12084
|
}).split(`
|
|
11988
12085
|
`);
|
|
11989
|
-
|
|
11990
|
-
}
|
|
11991
|
-
if (
|
|
11992
|
-
let t2 = 0,
|
|
11993
|
-
const
|
|
11994
|
-
let
|
|
11995
|
-
const
|
|
11996
|
-
e,
|
|
12086
|
+
s.push(h2), g += h2.length;
|
|
12087
|
+
}
|
|
12088
|
+
if (g > v) {
|
|
12089
|
+
let t2 = 0, n3 = 0, o = g;
|
|
12090
|
+
const h2 = l2 - T;
|
|
12091
|
+
let u3 = v;
|
|
12092
|
+
const L = () => I(s, o, 0, h2, u3), E = () => I(
|
|
11997
12093
|
s,
|
|
11998
|
-
|
|
11999
|
-
|
|
12000
|
-
|
|
12094
|
+
o,
|
|
12095
|
+
h2 + 1,
|
|
12096
|
+
s.length,
|
|
12097
|
+
u3,
|
|
12001
12098
|
true
|
|
12002
12099
|
);
|
|
12003
|
-
|
|
12004
|
-
}
|
|
12005
|
-
const
|
|
12006
|
-
|
|
12007
|
-
for (const t2 of
|
|
12008
|
-
for (const
|
|
12009
|
-
|
|
12010
|
-
return
|
|
12100
|
+
d ? ({ lineCount: o, removals: t2 } = L(), o > u3 && (c2 || (u3 -= 1), { lineCount: o, removals: n3 } = E())) : (c2 || (u3 -= 1), { lineCount: o, removals: n3 } = E(), o > u3 && (u3 -= 1, { lineCount: o, removals: t2 } = L())), t2 > 0 && (d = true, s.splice(0, t2)), n3 > 0 && (c2 = true, s.splice(s.length - n3, n3));
|
|
12101
|
+
}
|
|
12102
|
+
const x = [];
|
|
12103
|
+
d && x.push(M);
|
|
12104
|
+
for (const t2 of s)
|
|
12105
|
+
for (const n3 of t2)
|
|
12106
|
+
x.push(n3);
|
|
12107
|
+
return c2 && x.push(M), x;
|
|
12011
12108
|
};
|
|
12012
|
-
var confirm = (
|
|
12013
|
-
const
|
|
12109
|
+
var confirm = (e) => {
|
|
12110
|
+
const a2 = e.active ?? "Yes", o = e.inactive ?? "No";
|
|
12014
12111
|
return new r({
|
|
12015
|
-
active:
|
|
12016
|
-
inactive:
|
|
12017
|
-
signal:
|
|
12018
|
-
input:
|
|
12019
|
-
output:
|
|
12020
|
-
initialValue:
|
|
12112
|
+
active: a2,
|
|
12113
|
+
inactive: o,
|
|
12114
|
+
signal: e.signal,
|
|
12115
|
+
input: e.input,
|
|
12116
|
+
output: e.output,
|
|
12117
|
+
initialValue: e.initialValue ?? true,
|
|
12021
12118
|
render() {
|
|
12022
|
-
const
|
|
12023
|
-
|
|
12024
|
-
|
|
12119
|
+
const i2 = e.withGuide ?? settings.withGuide, u3 = `${symbol(this.state)} `, l2 = i2 ? `${styleText2("gray", S_BAR)} ` : "", f = wrapTextWithPrefix(
|
|
12120
|
+
e.output,
|
|
12121
|
+
e.message,
|
|
12025
12122
|
l2,
|
|
12026
12123
|
u3
|
|
12027
|
-
),
|
|
12124
|
+
), s = `${i2 ? `${styleText2("gray", S_BAR)}
|
|
12028
12125
|
` : ""}${f}
|
|
12029
|
-
`, c2 = this.value ?
|
|
12126
|
+
`, c2 = this.value ? a2 : o;
|
|
12030
12127
|
switch (this.state) {
|
|
12031
12128
|
case "submit": {
|
|
12032
|
-
const r2 =
|
|
12033
|
-
return `${
|
|
12129
|
+
const r2 = i2 ? `${styleText2("gray", S_BAR)} ` : "";
|
|
12130
|
+
return `${s}${r2}${styleText2("dim", c2)}`;
|
|
12034
12131
|
}
|
|
12035
12132
|
case "cancel": {
|
|
12036
|
-
const r2 =
|
|
12037
|
-
return `${
|
|
12133
|
+
const r2 = i2 ? `${styleText2("gray", S_BAR)} ` : "";
|
|
12134
|
+
return `${s}${r2}${styleText2(["strikethrough", "dim"], c2)}${i2 ? `
|
|
12038
12135
|
${styleText2("gray", S_BAR)}` : ""}`;
|
|
12039
12136
|
}
|
|
12040
12137
|
default: {
|
|
12041
|
-
const r2 =
|
|
12042
|
-
return `${
|
|
12138
|
+
const r2 = i2 ? `${styleText2("cyan", S_BAR)} ` : "", g = i2 ? styleText2("cyan", S_BAR_END) : "";
|
|
12139
|
+
return `${s}${r2}${this.value ? `${styleText2("green", S_RADIO_ACTIVE)} ${a2}` : `${styleText2("dim", S_RADIO_INACTIVE)} ${styleText2("dim", a2)}`}${e.vertical ? i2 ? `
|
|
12043
12140
|
${styleText2("cyan", S_BAR)} ` : `
|
|
12044
|
-
` : ` ${styleText2("dim", "/")} `}${this.value ? `${styleText2("dim", S_RADIO_INACTIVE)} ${styleText2("dim",
|
|
12141
|
+
` : ` ${styleText2("dim", "/")} `}${this.value ? `${styleText2("dim", S_RADIO_INACTIVE)} ${styleText2("dim", o)}` : `${styleText2("green", S_RADIO_ACTIVE)} ${o}`}
|
|
12045
12142
|
${g}
|
|
12046
12143
|
`;
|
|
12047
12144
|
}
|
|
@@ -12054,22 +12151,22 @@ var MULTISELECT_INSTRUCTIONS = [
|
|
|
12054
12151
|
`${styleText2("dim", "Space:")} select`,
|
|
12055
12152
|
`${styleText2("dim", "Enter:")} confirm`
|
|
12056
12153
|
];
|
|
12057
|
-
var m = (
|
|
12058
|
-
`).map((d) =>
|
|
12154
|
+
var m = (i2, u3) => i2.split(`
|
|
12155
|
+
`).map((d) => u3(d)).join(`
|
|
12059
12156
|
`);
|
|
12060
|
-
var multiselect = (
|
|
12061
|
-
const
|
|
12157
|
+
var multiselect = (i2) => {
|
|
12158
|
+
const u3 = (t2, a2) => {
|
|
12062
12159
|
const r2 = t2.label ?? String(t2.value);
|
|
12063
|
-
return
|
|
12064
|
-
}, d =
|
|
12065
|
-
return new a
|
|
12066
|
-
options:
|
|
12067
|
-
signal:
|
|
12068
|
-
input:
|
|
12069
|
-
output:
|
|
12070
|
-
initialValues:
|
|
12160
|
+
return a2 === "disabled" ? `${styleText2("gray", S_CHECKBOX_INACTIVE)} ${m(r2, (o) => styleText2(["strikethrough", "gray"], o))}${t2.hint ? ` ${styleText2("dim", `(${t2.hint ?? "disabled"})`)}` : ""}` : a2 === "active" ? `${styleText2("cyan", S_CHECKBOX_ACTIVE)} ${r2}${t2.hint ? ` ${styleText2("dim", `(${t2.hint})`)}` : ""}` : a2 === "selected" ? `${styleText2("green", S_CHECKBOX_SELECTED)} ${m(r2, (o) => styleText2("dim", o))}${t2.hint ? ` ${styleText2("dim", `(${t2.hint})`)}` : ""}` : a2 === "cancelled" ? `${m(r2, (o) => styleText2(["strikethrough", "dim"], o))}` : a2 === "active-selected" ? `${styleText2("green", S_CHECKBOX_SELECTED)} ${r2}${t2.hint ? ` ${styleText2("dim", `(${t2.hint})`)}` : ""}` : a2 === "submitted" ? `${m(r2, (o) => styleText2("dim", o))}` : `${styleText2("dim", S_CHECKBOX_INACTIVE)} ${m(r2, (o) => styleText2("dim", o))}`;
|
|
12161
|
+
}, d = i2.required ?? true, x = i2.showInstructions ?? true;
|
|
12162
|
+
return new a({
|
|
12163
|
+
options: i2.options,
|
|
12164
|
+
signal: i2.signal,
|
|
12165
|
+
input: i2.input,
|
|
12166
|
+
output: i2.output,
|
|
12167
|
+
initialValues: i2.initialValues,
|
|
12071
12168
|
required: d,
|
|
12072
|
-
cursorAt:
|
|
12169
|
+
cursorAt: i2.cursorAt,
|
|
12073
12170
|
validate(t2) {
|
|
12074
12171
|
if (d && (t2 === void 0 || t2.length === 0))
|
|
12075
12172
|
return `Please select at least one option.
|
|
@@ -12085,76 +12182,76 @@ ${styleText2(
|
|
|
12085
12182
|
)}`;
|
|
12086
12183
|
},
|
|
12087
12184
|
render() {
|
|
12088
|
-
const t2 =
|
|
12089
|
-
|
|
12090
|
-
|
|
12185
|
+
const t2 = i2.withGuide ?? settings.withGuide, a2 = wrapTextWithPrefix(
|
|
12186
|
+
i2.output,
|
|
12187
|
+
i2.message,
|
|
12091
12188
|
t2 ? `${symbolBar(this.state)} ` : "",
|
|
12092
12189
|
`${symbol(this.state)} `
|
|
12093
12190
|
), r2 = `${t2 ? `${styleText2("gray", S_BAR)}
|
|
12094
|
-
` : ""}${
|
|
12095
|
-
`,
|
|
12096
|
-
if (
|
|
12097
|
-
return
|
|
12098
|
-
const s =
|
|
12099
|
-
return
|
|
12191
|
+
` : ""}${a2}
|
|
12192
|
+
`, o = this.value ?? [], g = (n3, l2) => {
|
|
12193
|
+
if (n3.disabled)
|
|
12194
|
+
return u3(n3, "disabled");
|
|
12195
|
+
const s = o.includes(n3.value);
|
|
12196
|
+
return l2 && s ? u3(n3, "active-selected") : s ? u3(n3, "selected") : u3(n3, l2 ? "active" : "inactive");
|
|
12100
12197
|
};
|
|
12101
12198
|
switch (this.state) {
|
|
12102
12199
|
case "submit": {
|
|
12103
|
-
const
|
|
12104
|
-
|
|
12105
|
-
|
|
12200
|
+
const n3 = this.options.filter(({ value: s }) => o.includes(s)).map((s) => u3(s, "submitted")).join(styleText2("dim", ", ")) || styleText2("dim", "none"), l2 = wrapTextWithPrefix(
|
|
12201
|
+
i2.output,
|
|
12202
|
+
n3,
|
|
12106
12203
|
t2 ? `${styleText2("gray", S_BAR)} ` : ""
|
|
12107
12204
|
);
|
|
12108
|
-
return `${r2}${
|
|
12205
|
+
return `${r2}${l2}`;
|
|
12109
12206
|
}
|
|
12110
12207
|
case "cancel": {
|
|
12111
|
-
const
|
|
12112
|
-
if (
|
|
12208
|
+
const n3 = this.options.filter(({ value: s }) => o.includes(s)).map((s) => u3(s, "cancelled")).join(styleText2("dim", ", "));
|
|
12209
|
+
if (n3.trim() === "")
|
|
12113
12210
|
return `${r2}${styleText2("gray", S_BAR)}`;
|
|
12114
|
-
const
|
|
12115
|
-
|
|
12116
|
-
|
|
12211
|
+
const l2 = wrapTextWithPrefix(
|
|
12212
|
+
i2.output,
|
|
12213
|
+
n3,
|
|
12117
12214
|
t2 ? `${styleText2("gray", S_BAR)} ` : ""
|
|
12118
12215
|
);
|
|
12119
|
-
return `${r2}${
|
|
12216
|
+
return `${r2}${l2}${t2 ? `
|
|
12120
12217
|
${styleText2("gray", S_BAR)}` : ""}`;
|
|
12121
12218
|
}
|
|
12122
12219
|
case "error": {
|
|
12123
|
-
const
|
|
12220
|
+
const n3 = t2 ? `${styleText2("yellow", S_BAR)} ` : "", l2 = this.error.split(`
|
|
12124
12221
|
`).map(
|
|
12125
|
-
($,
|
|
12222
|
+
($, v) => v === 0 ? `${t2 ? `${styleText2("yellow", S_BAR_END)} ` : ""}${styleText2("yellow", $)}` : ` ${$}`
|
|
12126
12223
|
).join(`
|
|
12127
12224
|
`), s = r2.split(`
|
|
12128
|
-
`).length,
|
|
12225
|
+
`).length, h2 = l2.split(`
|
|
12129
12226
|
`).length + 1;
|
|
12130
|
-
return `${r2}${
|
|
12131
|
-
output:
|
|
12227
|
+
return `${r2}${n3}${limitOptions({
|
|
12228
|
+
output: i2.output,
|
|
12132
12229
|
options: this.options,
|
|
12133
12230
|
cursor: this.cursor,
|
|
12134
|
-
maxItems:
|
|
12135
|
-
columnPadding:
|
|
12136
|
-
rowPadding: s +
|
|
12137
|
-
style:
|
|
12231
|
+
maxItems: i2.maxItems,
|
|
12232
|
+
columnPadding: n3.length,
|
|
12233
|
+
rowPadding: s + h2,
|
|
12234
|
+
style: g
|
|
12138
12235
|
}).join(`
|
|
12139
|
-
${
|
|
12140
|
-
${
|
|
12236
|
+
${n3}`)}
|
|
12237
|
+
${l2}
|
|
12141
12238
|
`;
|
|
12142
12239
|
}
|
|
12143
12240
|
default: {
|
|
12144
|
-
const
|
|
12145
|
-
`).length, s = formatInstructionFooter(MULTISELECT_INSTRUCTIONS, t2),
|
|
12241
|
+
const n3 = t2 ? `${styleText2("cyan", S_BAR)} ` : "", l2 = r2.split(`
|
|
12242
|
+
`).length, s = x ? formatInstructionFooter(MULTISELECT_INSTRUCTIONS, t2) : t2 ? [styleText2("cyan", S_BAR_END)] : [], h2 = s.join(`
|
|
12146
12243
|
`), $ = s.length + 1;
|
|
12147
|
-
return `${r2}${
|
|
12148
|
-
output:
|
|
12244
|
+
return `${r2}${n3}${limitOptions({
|
|
12245
|
+
output: i2.output,
|
|
12149
12246
|
options: this.options,
|
|
12150
12247
|
cursor: this.cursor,
|
|
12151
|
-
maxItems:
|
|
12152
|
-
columnPadding:
|
|
12153
|
-
rowPadding:
|
|
12154
|
-
style:
|
|
12248
|
+
maxItems: i2.maxItems,
|
|
12249
|
+
columnPadding: n3.length,
|
|
12250
|
+
rowPadding: l2 + $,
|
|
12251
|
+
style: g
|
|
12155
12252
|
}).join(`
|
|
12156
|
-
${
|
|
12157
|
-
${
|
|
12253
|
+
${n3}`)}
|
|
12254
|
+
${h2}
|
|
12158
12255
|
`;
|
|
12159
12256
|
}
|
|
12160
12257
|
}
|
|
@@ -12169,16 +12266,16 @@ var log = {
|
|
|
12169
12266
|
spacing: l2 = 1,
|
|
12170
12267
|
withGuide: c2
|
|
12171
12268
|
} = {}) => {
|
|
12172
|
-
const t2 = [],
|
|
12269
|
+
const t2 = [], o = c2 ?? settings.withGuide, f = o ? r2 : "", O = o ? `${e} ` : "", u3 = o ? `${r2} ` : "";
|
|
12173
12270
|
for (let i2 = 0; i2 < l2; i2++)
|
|
12174
12271
|
t2.push(f);
|
|
12175
12272
|
const g = Array.isArray(s) ? s : s.split(`
|
|
12176
12273
|
`);
|
|
12177
12274
|
if (g.length > 0) {
|
|
12178
|
-
const [i2, ...
|
|
12179
|
-
i2.length > 0 ? t2.push(`${O}${i2}`) : t2.push(
|
|
12180
|
-
for (const p of
|
|
12181
|
-
p.length > 0 ? t2.push(`${u3}${p}`) : t2.push(
|
|
12275
|
+
const [i2, ...y2] = g;
|
|
12276
|
+
i2.length > 0 ? t2.push(`${O}${i2}`) : t2.push(o ? e : "");
|
|
12277
|
+
for (const p of y2)
|
|
12278
|
+
p.length > 0 ? t2.push(`${u3}${p}`) : t2.push(o ? r2 : "");
|
|
12182
12279
|
}
|
|
12183
12280
|
m2.write(`${t2.join(`
|
|
12184
12281
|
`)}
|
|
@@ -12204,50 +12301,50 @@ var log = {
|
|
|
12204
12301
|
log.message(s, { ...e, symbol: styleText2("red", S_ERROR) });
|
|
12205
12302
|
}
|
|
12206
12303
|
};
|
|
12207
|
-
var cancel = (
|
|
12304
|
+
var cancel = (o = "", t2) => {
|
|
12208
12305
|
const i2 = t2?.output ?? process.stdout, e = t2?.withGuide ?? settings.withGuide ? `${styleText2("gray", S_BAR_END)} ` : "";
|
|
12209
|
-
i2.write(`${e}${styleText2("red",
|
|
12306
|
+
i2.write(`${e}${styleText2("red", o)}
|
|
12210
12307
|
|
|
12211
12308
|
`);
|
|
12212
12309
|
};
|
|
12213
|
-
var intro = (
|
|
12310
|
+
var intro = (o = "", t2) => {
|
|
12214
12311
|
const i2 = t2?.output ?? process.stdout, e = t2?.withGuide ?? settings.withGuide ? `${styleText2("gray", S_BAR_START)} ` : "";
|
|
12215
|
-
i2.write(`${e}${
|
|
12312
|
+
i2.write(`${e}${o}
|
|
12216
12313
|
`);
|
|
12217
12314
|
};
|
|
12218
|
-
var outro = (
|
|
12315
|
+
var outro = (o = "", t2) => {
|
|
12219
12316
|
const i2 = t2?.output ?? process.stdout, e = t2?.withGuide ?? settings.withGuide ? `${styleText2("gray", S_BAR)}
|
|
12220
12317
|
${styleText2("gray", S_BAR_END)} ` : "";
|
|
12221
|
-
i2.write(`${e}${
|
|
12318
|
+
i2.write(`${e}${o}
|
|
12222
12319
|
|
|
12223
12320
|
`);
|
|
12224
12321
|
};
|
|
12225
|
-
var W$1 = (
|
|
12226
|
-
var C = (
|
|
12227
|
-
const
|
|
12322
|
+
var W$1 = (o) => o;
|
|
12323
|
+
var C = (o, e, s) => {
|
|
12324
|
+
const a2 = {
|
|
12228
12325
|
hard: true,
|
|
12229
12326
|
trim: false
|
|
12230
|
-
}, i2 = wrapAnsi(
|
|
12231
|
-
`), c2 = i2.reduce((
|
|
12232
|
-
return wrapAnsi(
|
|
12327
|
+
}, i2 = wrapAnsi(o, e, a2).split(`
|
|
12328
|
+
`), c2 = i2.reduce((n3, t2) => Math.max(dist_default2(t2), n3), 0), u3 = i2.map(s).reduce((n3, t2) => Math.max(dist_default2(t2), n3), 0), g = e - (u3 - c2);
|
|
12329
|
+
return wrapAnsi(o, g, a2);
|
|
12233
12330
|
};
|
|
12234
|
-
var note = (
|
|
12235
|
-
const
|
|
12236
|
-
`).map(c2), ""],
|
|
12331
|
+
var note = (o = "", e = "", s) => {
|
|
12332
|
+
const a2 = s?.output ?? process$1.stdout, i2 = s?.withGuide ?? settings.withGuide, c2 = s?.format ?? W$1, g = ["", ...C(o, getColumns(a2) - 6, c2).split(`
|
|
12333
|
+
`).map(c2), ""], n3 = dist_default2(e), t2 = Math.max(
|
|
12237
12334
|
g.reduce((m2, F) => {
|
|
12238
12335
|
const O = dist_default2(F);
|
|
12239
12336
|
return O > m2 ? O : m2;
|
|
12240
12337
|
}, 0),
|
|
12241
|
-
|
|
12338
|
+
n3
|
|
12242
12339
|
) + 2, h2 = g.map(
|
|
12243
12340
|
(m2) => `${styleText2("gray", S_BAR)} ${m2}${" ".repeat(t2 - dist_default2(m2))}${styleText2("gray", S_BAR)}`
|
|
12244
12341
|
).join(`
|
|
12245
12342
|
`), T = i2 ? `${styleText2("gray", S_BAR)}
|
|
12246
12343
|
` : "", l$1 = i2 ? S_CONNECT_LEFT : S_CORNER_BOTTOM_LEFT;
|
|
12247
|
-
|
|
12344
|
+
a2.write(
|
|
12248
12345
|
`${T}${styleText2("green", S_STEP_SUBMIT)} ${styleText2("reset", e)} ${styleText2(
|
|
12249
12346
|
"gray",
|
|
12250
|
-
S_BAR_H.repeat(Math.max(t2 -
|
|
12347
|
+
S_BAR_H.repeat(Math.max(t2 - n3 - 1, 1)) + S_CORNER_TOP_RIGHT
|
|
12251
12348
|
)}
|
|
12252
12349
|
${h2}
|
|
12253
12350
|
${styleText2("gray", l$1 + S_BAR_H.repeat(t2 + 2) + S_CORNER_BOTTOM_RIGHT)}
|
|
@@ -12258,77 +12355,77 @@ var W = (l2) => styleText2("magenta", l2);
|
|
|
12258
12355
|
var spinner = ({
|
|
12259
12356
|
indicator: l2 = "dots",
|
|
12260
12357
|
onCancel: h2,
|
|
12261
|
-
output:
|
|
12358
|
+
output: n3 = process.stdout,
|
|
12262
12359
|
cancelMessage: G,
|
|
12263
12360
|
errorMessage: O,
|
|
12264
12361
|
frames: E = unicode ? ["\u25D2", "\u25D0", "\u25D3", "\u25D1"] : ["\u2022", "o", "O", "0"],
|
|
12265
12362
|
delay: F = unicode ? 80 : 120,
|
|
12266
12363
|
signal: m2,
|
|
12267
|
-
...
|
|
12364
|
+
...I2
|
|
12268
12365
|
} = {}) => {
|
|
12269
12366
|
const u3 = isCI();
|
|
12270
12367
|
let M, T, d = false, S = false, s = "", p, w = performance.now();
|
|
12271
|
-
const x = getColumns(
|
|
12368
|
+
const x = getColumns(n3), k = I2?.styleFrame ?? W, g = (e) => {
|
|
12272
12369
|
const r2 = e > 1 ? O ?? settings.messages.error : G ?? settings.messages.cancel;
|
|
12273
|
-
S = e === 1, d && (
|
|
12370
|
+
S = e === 1, d && (a2(r2, e), S && typeof h2 == "function" && h2());
|
|
12274
12371
|
}, f = () => g(2), i2 = () => g(1), A = () => {
|
|
12275
12372
|
process.on("uncaughtExceptionMonitor", f), process.on("unhandledRejection", f), process.on("SIGINT", i2), process.on("SIGTERM", i2), process.on("exit", g), m2 && m2.addEventListener("abort", i2);
|
|
12276
12373
|
}, H = () => {
|
|
12277
12374
|
process.removeListener("uncaughtExceptionMonitor", f), process.removeListener("unhandledRejection", f), process.removeListener("SIGINT", i2), process.removeListener("SIGTERM", i2), process.removeListener("exit", g), m2 && m2.removeEventListener("abort", i2);
|
|
12278
|
-
},
|
|
12375
|
+
}, y2 = () => {
|
|
12279
12376
|
if (p === void 0) return;
|
|
12280
|
-
u3 &&
|
|
12377
|
+
u3 && n3.write(`
|
|
12281
12378
|
`);
|
|
12282
12379
|
const r2 = wrapAnsi(p, x, {
|
|
12283
12380
|
hard: true,
|
|
12284
12381
|
trim: false
|
|
12285
12382
|
}).split(`
|
|
12286
12383
|
`);
|
|
12287
|
-
r2.length > 1 &&
|
|
12384
|
+
r2.length > 1 && n3.write(import_sisteransi2.cursor.up(r2.length - 1)), n3.write(import_sisteransi2.cursor.to(0)), n3.write(import_sisteransi2.erase.down());
|
|
12288
12385
|
}, C2 = (e) => e.replace(/\.+$/, ""), _ = (e) => {
|
|
12289
|
-
const r2 = (performance.now() - e) / 1e3, t2 = Math.floor(r2 / 60),
|
|
12290
|
-
return t2 > 0 ? `[${t2}m ${
|
|
12291
|
-
}, N =
|
|
12292
|
-
d = true, M = block({ output:
|
|
12386
|
+
const r2 = (performance.now() - e) / 1e3, t2 = Math.floor(r2 / 60), o = Math.floor(r2 % 60);
|
|
12387
|
+
return t2 > 0 ? `[${t2}m ${o}s]` : `[${o}s]`;
|
|
12388
|
+
}, N = I2.withGuide ?? settings.withGuide, P = (e = "") => {
|
|
12389
|
+
d = true, M = block({ output: n3 }), s = C2(e), w = performance.now(), N && n3.write(`${styleText2("gray", S_BAR)}
|
|
12293
12390
|
`);
|
|
12294
12391
|
let r2 = 0, t2 = 0;
|
|
12295
12392
|
A(), T = setInterval(() => {
|
|
12296
12393
|
if (u3 && s === p)
|
|
12297
12394
|
return;
|
|
12298
|
-
|
|
12299
|
-
const
|
|
12395
|
+
y2(), p = s;
|
|
12396
|
+
const o = k(E[r2]);
|
|
12300
12397
|
let v;
|
|
12301
12398
|
if (u3)
|
|
12302
|
-
v = `${
|
|
12399
|
+
v = `${o} ${s}...`;
|
|
12303
12400
|
else if (l2 === "timer")
|
|
12304
|
-
v = `${
|
|
12401
|
+
v = `${o} ${s} ${_(w)}`;
|
|
12305
12402
|
else {
|
|
12306
12403
|
const B = ".".repeat(Math.floor(t2)).slice(0, 3);
|
|
12307
|
-
v = `${
|
|
12404
|
+
v = `${o} ${s}${B}`;
|
|
12308
12405
|
}
|
|
12309
12406
|
const j = wrapAnsi(v, x, {
|
|
12310
12407
|
hard: true,
|
|
12311
12408
|
trim: false
|
|
12312
12409
|
});
|
|
12313
|
-
|
|
12410
|
+
n3.write(j), r2 = r2 + 1 < E.length ? r2 + 1 : 0, t2 = t2 < 4 ? t2 + 0.125 : 0;
|
|
12314
12411
|
}, F);
|
|
12315
|
-
},
|
|
12412
|
+
}, a2 = (e = "", r2 = 0, t2 = false) => {
|
|
12316
12413
|
if (!d) return;
|
|
12317
|
-
d = false, clearInterval(T),
|
|
12318
|
-
const
|
|
12319
|
-
s = e ?? s, t2 || (l2 === "timer" ?
|
|
12320
|
-
`) :
|
|
12414
|
+
d = false, clearInterval(T), y2();
|
|
12415
|
+
const o = r2 === 0 ? styleText2("green", S_STEP_SUBMIT) : r2 === 1 ? styleText2("red", S_STEP_CANCEL) : styleText2("red", S_STEP_ERROR);
|
|
12416
|
+
s = e ?? s, t2 || (l2 === "timer" ? n3.write(`${o} ${s} ${_(w)}
|
|
12417
|
+
`) : n3.write(`${o} ${s}
|
|
12321
12418
|
`)), H(), M();
|
|
12322
12419
|
};
|
|
12323
12420
|
return {
|
|
12324
12421
|
start: P,
|
|
12325
|
-
stop: (e = "") =>
|
|
12422
|
+
stop: (e = "") => a2(e, 0),
|
|
12326
12423
|
message: (e = "") => {
|
|
12327
12424
|
s = C2(e ?? s);
|
|
12328
12425
|
},
|
|
12329
|
-
cancel: (e = "") =>
|
|
12330
|
-
error: (e = "") =>
|
|
12331
|
-
clear: () =>
|
|
12426
|
+
cancel: (e = "") => a2(e, 1),
|
|
12427
|
+
error: (e = "") => a2(e, 2),
|
|
12428
|
+
clear: () => a2("", 0, true),
|
|
12332
12429
|
get isCancelled() {
|
|
12333
12430
|
return S;
|
|
12334
12431
|
}
|
|
@@ -12343,74 +12440,76 @@ var SELECT_INSTRUCTIONS = [
|
|
|
12343
12440
|
`${styleText2("dim", "\u2191/\u2193")} to navigate`,
|
|
12344
12441
|
`${styleText2("dim", "Enter:")} confirm`
|
|
12345
12442
|
];
|
|
12346
|
-
var c = (t2,
|
|
12443
|
+
var c = (t2, o) => t2.includes(`
|
|
12347
12444
|
`) ? t2.split(`
|
|
12348
|
-
`).map((
|
|
12349
|
-
`) :
|
|
12445
|
+
`).map((d) => o(d)).join(`
|
|
12446
|
+
`) : o(t2);
|
|
12350
12447
|
var select = (t2) => {
|
|
12351
|
-
const
|
|
12352
|
-
|
|
12448
|
+
const o = (n3, m2) => {
|
|
12449
|
+
if (n3 === void 0)
|
|
12450
|
+
return "";
|
|
12451
|
+
const s = n3.label ?? String(n3.value);
|
|
12353
12452
|
switch (m2) {
|
|
12354
12453
|
case "disabled":
|
|
12355
|
-
return `${styleText2("gray", S_RADIO_INACTIVE)} ${c(s, (
|
|
12454
|
+
return `${styleText2("gray", S_RADIO_INACTIVE)} ${c(s, (i2) => styleText2("gray", i2))}${n3.hint ? ` ${styleText2("dim", `(${n3.hint ?? "disabled"})`)}` : ""}`;
|
|
12356
12455
|
case "selected":
|
|
12357
|
-
return `${c(s, (
|
|
12456
|
+
return `${c(s, (i2) => styleText2("dim", i2))}`;
|
|
12358
12457
|
case "active":
|
|
12359
|
-
return `${styleText2("green", S_RADIO_ACTIVE)} ${s}${
|
|
12458
|
+
return `${styleText2("green", S_RADIO_ACTIVE)} ${s}${n3.hint ? ` ${styleText2("dim", `(${n3.hint})`)}` : ""}`;
|
|
12360
12459
|
case "cancelled":
|
|
12361
|
-
return `${c(s, (
|
|
12460
|
+
return `${c(s, (i2) => styleText2(["strikethrough", "dim"], i2))}`;
|
|
12362
12461
|
default:
|
|
12363
|
-
return `${styleText2("dim", S_RADIO_INACTIVE)} ${c(s, (
|
|
12462
|
+
return `${styleText2("dim", S_RADIO_INACTIVE)} ${c(s, (i2) => styleText2("dim", i2))}`;
|
|
12364
12463
|
}
|
|
12365
|
-
};
|
|
12366
|
-
return new
|
|
12464
|
+
}, d = t2.showInstructions ?? true;
|
|
12465
|
+
return new n$1({
|
|
12367
12466
|
options: t2.options,
|
|
12368
12467
|
signal: t2.signal,
|
|
12369
12468
|
input: t2.input,
|
|
12370
12469
|
output: t2.output,
|
|
12371
12470
|
initialValue: t2.initialValue,
|
|
12372
12471
|
render() {
|
|
12373
|
-
const
|
|
12472
|
+
const n3 = t2.withGuide ?? settings.withGuide, m2 = `${symbol(this.state)} `, s = `${symbolBar(this.state)} `, i2 = wrapTextWithPrefix(
|
|
12374
12473
|
t2.output,
|
|
12375
12474
|
t2.message,
|
|
12376
12475
|
s,
|
|
12377
12476
|
m2
|
|
12378
|
-
), u3 = `${
|
|
12379
|
-
` : ""}${
|
|
12477
|
+
), u3 = `${n3 ? `${styleText2("gray", S_BAR)}
|
|
12478
|
+
` : ""}${i2}
|
|
12380
12479
|
`;
|
|
12381
12480
|
switch (this.state) {
|
|
12382
12481
|
case "submit": {
|
|
12383
|
-
const r2 =
|
|
12482
|
+
const r2 = n3 ? `${styleText2("gray", S_BAR)} ` : "", a2 = wrapTextWithPrefix(
|
|
12384
12483
|
t2.output,
|
|
12385
|
-
|
|
12484
|
+
o(this.options[this.cursor], "selected"),
|
|
12386
12485
|
r2
|
|
12387
12486
|
);
|
|
12388
|
-
return `${u3}${
|
|
12487
|
+
return `${u3}${a2}`;
|
|
12389
12488
|
}
|
|
12390
12489
|
case "cancel": {
|
|
12391
|
-
const r2 =
|
|
12490
|
+
const r2 = n3 ? `${styleText2("gray", S_BAR)} ` : "", a2 = wrapTextWithPrefix(
|
|
12392
12491
|
t2.output,
|
|
12393
|
-
|
|
12492
|
+
o(this.options[this.cursor], "cancelled"),
|
|
12394
12493
|
r2
|
|
12395
12494
|
);
|
|
12396
|
-
return `${u3}${
|
|
12495
|
+
return `${u3}${a2}${n3 ? `
|
|
12397
12496
|
${styleText2("gray", S_BAR)}` : ""}`;
|
|
12398
12497
|
}
|
|
12399
12498
|
default: {
|
|
12400
|
-
const r2 =
|
|
12401
|
-
`).length,
|
|
12402
|
-
`), b =
|
|
12499
|
+
const r2 = n3 ? `${styleText2("cyan", S_BAR)} ` : "", a2 = u3.split(`
|
|
12500
|
+
`).length, p = d ? formatInstructionFooter(SELECT_INSTRUCTIONS, n3) : n3 ? [styleText2("cyan", S_BAR_END)] : [], f = p.join(`
|
|
12501
|
+
`), b = p.length + 1;
|
|
12403
12502
|
return `${u3}${r2}${limitOptions({
|
|
12404
12503
|
output: t2.output,
|
|
12405
12504
|
cursor: this.cursor,
|
|
12406
12505
|
options: this.options,
|
|
12407
12506
|
maxItems: t2.maxItems,
|
|
12408
12507
|
columnPadding: r2.length,
|
|
12409
|
-
rowPadding:
|
|
12410
|
-
style: (
|
|
12508
|
+
rowPadding: a2 + b,
|
|
12509
|
+
style: (g, x) => o(g, g.disabled ? "disabled" : x ? "active" : "inactive")
|
|
12411
12510
|
}).join(`
|
|
12412
12511
|
${r2}`)}
|
|
12413
|
-
${
|
|
12512
|
+
${f}
|
|
12414
12513
|
`;
|
|
12415
12514
|
}
|
|
12416
12515
|
}
|
|
@@ -12418,7 +12517,7 @@ ${h2}
|
|
|
12418
12517
|
}).prompt();
|
|
12419
12518
|
};
|
|
12420
12519
|
var i = `${styleText2("gray", S_BAR)} `;
|
|
12421
|
-
var text = (t2) => new
|
|
12520
|
+
var text = (t2) => new n2({
|
|
12422
12521
|
validate: t2.validate,
|
|
12423
12522
|
placeholder: t2.placeholder,
|
|
12424
12523
|
defaultValue: t2.defaultValue,
|
|
@@ -12427,30 +12526,39 @@ var text = (t2) => new n({
|
|
|
12427
12526
|
signal: t2.signal,
|
|
12428
12527
|
input: t2.input,
|
|
12429
12528
|
render() {
|
|
12430
|
-
const
|
|
12529
|
+
const r2 = t2?.withGuide ?? settings.withGuide, l2 = `${`${r2 ? `${styleText2("gray", S_BAR)}
|
|
12431
12530
|
` : ""}${symbol(this.state)} `}${t2.message}
|
|
12432
|
-
`,
|
|
12531
|
+
`, d = t2.placeholder && t2.placeholder.length > 0 ? (
|
|
12532
|
+
// biome-ignore lint/style/noNonNullAssertion: guarded by placeholder.length > 0
|
|
12533
|
+
styleText2("inverse", t2.placeholder[0]) + styleText2("dim", t2.placeholder.slice(1))
|
|
12534
|
+
) : styleText2(["inverse", "hidden"], "_"), o = this.userInput ? this.userInputWithCursor : d, s = this.value ?? "";
|
|
12433
12535
|
switch (this.state) {
|
|
12536
|
+
case "validating": {
|
|
12537
|
+
const n3 = r2 ? `${styleText2("cyan", S_BAR)} ` : "", i2 = r2 ? styleText2("cyan", S_BAR_END) : "", c2 = styleText2("dim", o), $ = styleText2("dim", "Validating...");
|
|
12538
|
+
return `${l2}${n3}${c2}
|
|
12539
|
+
${i2} ${$}
|
|
12540
|
+
`;
|
|
12541
|
+
}
|
|
12434
12542
|
case "error": {
|
|
12435
|
-
const
|
|
12436
|
-
return `${
|
|
12437
|
-
${
|
|
12438
|
-
${
|
|
12543
|
+
const n3 = this.error ? ` ${styleText2("yellow", this.error)}` : "", i2 = r2 ? `${styleText2("yellow", S_BAR)} ` : "", c2 = r2 ? styleText2("yellow", S_BAR_END) : "";
|
|
12544
|
+
return `${l2.trim()}
|
|
12545
|
+
${i2}${o}
|
|
12546
|
+
${c2}${n3}
|
|
12439
12547
|
`;
|
|
12440
12548
|
}
|
|
12441
12549
|
case "submit": {
|
|
12442
|
-
const
|
|
12443
|
-
return `${
|
|
12550
|
+
const n3 = s ? `${r2 ? " " : ""}${styleText2("dim", s)}` : "", i2 = r2 ? styleText2("gray", S_BAR) : "";
|
|
12551
|
+
return `${l2}${i2}${n3}`;
|
|
12444
12552
|
}
|
|
12445
12553
|
case "cancel": {
|
|
12446
|
-
const
|
|
12447
|
-
return `${
|
|
12448
|
-
${
|
|
12554
|
+
const n3 = s ? ` ${styleText2(["strikethrough", "dim"], s)}` : "", i2 = r2 ? styleText2("gray", S_BAR) : "";
|
|
12555
|
+
return `${l2}${i2}${n3}${s.trim() ? `
|
|
12556
|
+
${i2}` : ""}`;
|
|
12449
12557
|
}
|
|
12450
12558
|
default: {
|
|
12451
|
-
const
|
|
12452
|
-
return `${
|
|
12453
|
-
${
|
|
12559
|
+
const n3 = r2 ? `${styleText2("cyan", S_BAR)} ` : "", i2 = r2 ? styleText2("cyan", S_BAR_END) : "";
|
|
12560
|
+
return `${l2}${n3}${o}
|
|
12561
|
+
${i2}
|
|
12454
12562
|
`;
|
|
12455
12563
|
}
|
|
12456
12564
|
}
|
|
@@ -12764,7 +12872,7 @@ function getStringFromEnv(key) {
|
|
|
12764
12872
|
}
|
|
12765
12873
|
|
|
12766
12874
|
// ../../node_modules/@opentelemetry/core/build/esm/version.js
|
|
12767
|
-
var VERSION2 = "2.
|
|
12875
|
+
var VERSION2 = "2.12.0";
|
|
12768
12876
|
|
|
12769
12877
|
// ../../node_modules/@opentelemetry/semantic-conventions/build/esm/stable_attributes.js
|
|
12770
12878
|
var ATTR_EXCEPTION_MESSAGE = "exception.message";
|
|
@@ -13529,7 +13637,7 @@ function normalizeAnyValue(value) {
|
|
|
13529
13637
|
}
|
|
13530
13638
|
return [
|
|
13531
13639
|
"map",
|
|
13532
|
-
Object.entries(value).sort(([
|
|
13640
|
+
Object.entries(value).sort(([a2], [b]) => a2.localeCompare(b)).map(([k, v]) => [k, normalizeAnyValue(v)])
|
|
13533
13641
|
];
|
|
13534
13642
|
}
|
|
13535
13643
|
function getInstrumentationScopeKey(scope) {
|
|
@@ -13570,7 +13678,7 @@ var LoggerMetrics = class {
|
|
|
13570
13678
|
};
|
|
13571
13679
|
|
|
13572
13680
|
// ../../node_modules/@opentelemetry/sdk-logs/build/esm/version.js
|
|
13573
|
-
var VERSION3 = "0.
|
|
13681
|
+
var VERSION3 = "0.223.0";
|
|
13574
13682
|
|
|
13575
13683
|
// ../../node_modules/@opentelemetry/sdk-logs/build/esm/internal/LoggerProviderSharedState.js
|
|
13576
13684
|
var DEFAULT_LOGGER_CONFIG = {
|
|
@@ -14219,7 +14327,7 @@ var ATTR_SERVER_PORT = "server.port";
|
|
|
14219
14327
|
var ATTR_ERROR_TYPE2 = "error.type";
|
|
14220
14328
|
|
|
14221
14329
|
// ../../node_modules/@opentelemetry/otlp-exporter-base/build/esm/version.js
|
|
14222
|
-
var VERSION4 = "0.
|
|
14330
|
+
var VERSION4 = "0.223.0";
|
|
14223
14331
|
|
|
14224
14332
|
// ../../node_modules/@opentelemetry/otlp-exporter-base/build/esm/ExporterMetrics.js
|
|
14225
14333
|
var componentCounter2 = /* @__PURE__ */ new Map();
|
|
@@ -15193,7 +15301,7 @@ function updateConfig(mutate, scope = "global", options = {}) {
|
|
|
15193
15301
|
}
|
|
15194
15302
|
|
|
15195
15303
|
// ../configuration-core/src/secrets.ts
|
|
15196
|
-
var import_dotenv = __toESM(
|
|
15304
|
+
var import_dotenv = __toESM(require_dist(), 1);
|
|
15197
15305
|
import * as fs4 from "node:fs";
|
|
15198
15306
|
import * as path5 from "node:path";
|
|
15199
15307
|
|
|
@@ -15738,6 +15846,11 @@ var FAILURE_CODES = {
|
|
|
15738
15846
|
// a device that is not foldable, no hinge route, a remote simulator.
|
|
15739
15847
|
IOS_FOLD_FAILED: "IOS_FOLD_FAILED",
|
|
15740
15848
|
IOS_FOLD_UNSUPPORTED: "IOS_FOLD_UNSUPPORTED",
|
|
15849
|
+
// The hinge of a foldable Android emulator: the console refused the move or
|
|
15850
|
+
// the guest never committed the state vs. nothing to fold — a phone profile,
|
|
15851
|
+
// a physical device.
|
|
15852
|
+
ANDROID_FOLD_FAILED: "ANDROID_FOLD_FAILED",
|
|
15853
|
+
ANDROID_FOLD_UNSUPPORTED: "ANDROID_FOLD_UNSUPPORTED",
|
|
15741
15854
|
PASTE_CLIPBOARD_SET_FAILED: "PASTE_CLIPBOARD_SET_FAILED",
|
|
15742
15855
|
PASTE_CLIPBOARD_UNSUPPORTED: "PASTE_CLIPBOARD_UNSUPPORTED",
|
|
15743
15856
|
SETTINGS_PERMISSION_UNSUPPORTED: "SETTINGS_PERMISSION_UNSUPPORTED",
|
|
@@ -16739,7 +16852,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
|
|
|
16739
16852
|
var SESSION_ID = randomUUID4();
|
|
16740
16853
|
function readCliVersion() {
|
|
16741
16854
|
if (true) {
|
|
16742
|
-
return "0.29.1-next.
|
|
16855
|
+
return "0.29.1-next.21";
|
|
16743
16856
|
}
|
|
16744
16857
|
return "0.0.0";
|
|
16745
16858
|
}
|
|
@@ -17394,105 +17507,13 @@ import * as dns from "node:dns";
|
|
|
17394
17507
|
import * as os2 from "node:os";
|
|
17395
17508
|
import { execFileSync as execFileSync3, execSync } from "node:child_process";
|
|
17396
17509
|
|
|
17397
|
-
// ../../node_modules/smol-toml/dist/date.js
|
|
17398
|
-
var DATE_TIME_RE = /^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i;
|
|
17399
|
-
var TomlDate = class _TomlDate extends Date {
|
|
17400
|
-
#hasDate = false;
|
|
17401
|
-
#hasTime = false;
|
|
17402
|
-
#offset = null;
|
|
17403
|
-
constructor(date) {
|
|
17404
|
-
let hasDate = true;
|
|
17405
|
-
let hasTime = true;
|
|
17406
|
-
let offset = "Z";
|
|
17407
|
-
if (typeof date === "string") {
|
|
17408
|
-
let match = date.match(DATE_TIME_RE);
|
|
17409
|
-
if (match) {
|
|
17410
|
-
if (!match[1]) {
|
|
17411
|
-
hasDate = false;
|
|
17412
|
-
date = `0000-01-01T${date}`;
|
|
17413
|
-
}
|
|
17414
|
-
hasTime = !!match[2];
|
|
17415
|
-
hasTime && date[10] === " " && (date = date.replace(" ", "T"));
|
|
17416
|
-
if (match[2] && +match[2] > 23) {
|
|
17417
|
-
date = "";
|
|
17418
|
-
} else {
|
|
17419
|
-
offset = match[3] || null;
|
|
17420
|
-
date = date.toUpperCase();
|
|
17421
|
-
if (!offset && hasTime)
|
|
17422
|
-
date += "Z";
|
|
17423
|
-
}
|
|
17424
|
-
} else {
|
|
17425
|
-
date = "";
|
|
17426
|
-
}
|
|
17427
|
-
}
|
|
17428
|
-
super(date);
|
|
17429
|
-
if (!isNaN(this.getTime())) {
|
|
17430
|
-
this.#hasDate = hasDate;
|
|
17431
|
-
this.#hasTime = hasTime;
|
|
17432
|
-
this.#offset = offset;
|
|
17433
|
-
}
|
|
17434
|
-
}
|
|
17435
|
-
isDateTime() {
|
|
17436
|
-
return this.#hasDate && this.#hasTime;
|
|
17437
|
-
}
|
|
17438
|
-
isLocal() {
|
|
17439
|
-
return !this.#hasDate || !this.#hasTime || !this.#offset;
|
|
17440
|
-
}
|
|
17441
|
-
isDate() {
|
|
17442
|
-
return this.#hasDate && !this.#hasTime;
|
|
17443
|
-
}
|
|
17444
|
-
isTime() {
|
|
17445
|
-
return this.#hasTime && !this.#hasDate;
|
|
17446
|
-
}
|
|
17447
|
-
isValid() {
|
|
17448
|
-
return this.#hasDate || this.#hasTime;
|
|
17449
|
-
}
|
|
17450
|
-
toISOString() {
|
|
17451
|
-
let iso = super.toISOString();
|
|
17452
|
-
if (this.isDate())
|
|
17453
|
-
return iso.slice(0, 10);
|
|
17454
|
-
if (this.isTime())
|
|
17455
|
-
return iso.slice(11, 23);
|
|
17456
|
-
if (this.#offset === null)
|
|
17457
|
-
return iso.slice(0, -1);
|
|
17458
|
-
if (this.#offset === "Z")
|
|
17459
|
-
return iso;
|
|
17460
|
-
let offset = +this.#offset.slice(1, 3) * 60 + +this.#offset.slice(4, 6);
|
|
17461
|
-
offset = this.#offset[0] === "-" ? offset : -offset;
|
|
17462
|
-
let offsetDate = new Date(this.getTime() - offset * 6e4);
|
|
17463
|
-
return offsetDate.toISOString().slice(0, -1) + this.#offset;
|
|
17464
|
-
}
|
|
17465
|
-
static wrapAsOffsetDateTime(jsDate, offset = "Z") {
|
|
17466
|
-
let date = new _TomlDate(jsDate);
|
|
17467
|
-
date.#offset = offset;
|
|
17468
|
-
return date;
|
|
17469
|
-
}
|
|
17470
|
-
static wrapAsLocalDateTime(jsDate) {
|
|
17471
|
-
let date = new _TomlDate(jsDate);
|
|
17472
|
-
date.#offset = null;
|
|
17473
|
-
return date;
|
|
17474
|
-
}
|
|
17475
|
-
static wrapAsLocalDate(jsDate) {
|
|
17476
|
-
let date = new _TomlDate(jsDate);
|
|
17477
|
-
date.#hasTime = false;
|
|
17478
|
-
date.#offset = null;
|
|
17479
|
-
return date;
|
|
17480
|
-
}
|
|
17481
|
-
static wrapAsLocalTime(jsDate) {
|
|
17482
|
-
let date = new _TomlDate(jsDate);
|
|
17483
|
-
date.#hasDate = false;
|
|
17484
|
-
date.#offset = null;
|
|
17485
|
-
return date;
|
|
17486
|
-
}
|
|
17487
|
-
};
|
|
17488
|
-
|
|
17489
17510
|
// ../../node_modules/smol-toml/dist/error.js
|
|
17490
17511
|
function getLineColFromPtr(string, ptr) {
|
|
17491
|
-
let lines = string.slice(0, ptr).split(/\r
|
|
17512
|
+
let lines = string.slice(0, ptr).split(/\r?\n/);
|
|
17492
17513
|
return [lines.length, lines.pop().length + 1];
|
|
17493
17514
|
}
|
|
17494
17515
|
function makeCodeBlock(string, line, column) {
|
|
17495
|
-
let lines = string.split(/\r
|
|
17516
|
+
let lines = string.split(/\r?\n/);
|
|
17496
17517
|
let codeblock = "";
|
|
17497
17518
|
let numberLen = (Math.log10(line + 1) | 0) + 1;
|
|
17498
17519
|
for (let i2 = line - 1; i2 <= line + 1; i2++) {
|
|
@@ -17510,7 +17531,7 @@ function makeCodeBlock(string, line, column) {
|
|
|
17510
17531
|
}
|
|
17511
17532
|
return codeblock;
|
|
17512
17533
|
}
|
|
17513
|
-
var TomlError = class extends Error {
|
|
17534
|
+
var TomlError = class _TomlError extends Error {
|
|
17514
17535
|
line;
|
|
17515
17536
|
column;
|
|
17516
17537
|
codeblock;
|
|
@@ -17524,59 +17545,59 @@ ${codeblock}`, options);
|
|
|
17524
17545
|
this.column = column;
|
|
17525
17546
|
this.codeblock = codeblock;
|
|
17526
17547
|
}
|
|
17548
|
+
/** @internal */
|
|
17549
|
+
static x(message, ctx, ptr) {
|
|
17550
|
+
throw new _TomlError(message, { toml: ctx.s, ptr: ptr ?? ctx.p });
|
|
17551
|
+
}
|
|
17527
17552
|
};
|
|
17528
17553
|
|
|
17529
17554
|
// ../../node_modules/smol-toml/dist/primitive.js
|
|
17530
|
-
|
|
17531
|
-
|
|
17532
|
-
|
|
17533
|
-
function parseString(str, ptr) {
|
|
17534
|
-
let c2 = str[ptr++];
|
|
17555
|
+
function parseString(ctx) {
|
|
17556
|
+
let startPtr = ctx.p;
|
|
17557
|
+
let c2 = ctx.s.charCodeAt(ctx.p++);
|
|
17535
17558
|
let first = c2;
|
|
17536
|
-
let isLiteral = c2 ===
|
|
17537
|
-
let isMultiline = c2 ===
|
|
17559
|
+
let isLiteral = c2 === 39;
|
|
17560
|
+
let isMultiline = c2 === ctx.s.charCodeAt(ctx.p) && c2 === ctx.s.charCodeAt(ctx.p + 1);
|
|
17538
17561
|
if (isMultiline) {
|
|
17539
|
-
if (
|
|
17540
|
-
|
|
17541
|
-
else if (
|
|
17542
|
-
|
|
17562
|
+
if ((c2 = ctx.s.charCodeAt(ctx.p += 2)) === 10)
|
|
17563
|
+
ctx.p++;
|
|
17564
|
+
else if (c2 === 13 && ctx.s.charCodeAt(ctx.p + 1) === 10)
|
|
17565
|
+
ctx.p += 2;
|
|
17543
17566
|
}
|
|
17544
17567
|
let parsed = "";
|
|
17545
|
-
let sliceStart =
|
|
17568
|
+
let sliceStart = ctx.p;
|
|
17546
17569
|
let state2 = 0;
|
|
17547
|
-
for (
|
|
17548
|
-
c2 =
|
|
17549
|
-
if (isMultiline && (c2 ===
|
|
17570
|
+
for (; ctx.p < ctx.s.length; ctx.p++) {
|
|
17571
|
+
c2 = ctx.s.charCodeAt(ctx.p);
|
|
17572
|
+
if (isMultiline && (c2 === 10 || c2 === 13 && ctx.s.charCodeAt(ctx.p + 1) === 10)) {
|
|
17550
17573
|
state2 = state2 && 3;
|
|
17551
|
-
} else if (c2 <
|
|
17552
|
-
|
|
17553
|
-
|
|
17554
|
-
ptr: i2
|
|
17555
|
-
});
|
|
17556
|
-
} else if ((!state2 || state2 === 3) && c2 === first && (!isMultiline || str[i2 + 1] === first && str[i2 + 2] === first)) {
|
|
17574
|
+
} else if (c2 < 32 && c2 !== 9 || c2 === 127) {
|
|
17575
|
+
TomlError.x("control characters are not allowed in strings", ctx);
|
|
17576
|
+
} else if ((!state2 || state2 === 3) && c2 === first && (!isMultiline || ctx.s.charCodeAt(ctx.p + 1) === first && ctx.s.charCodeAt(ctx.p + 2) === first)) {
|
|
17557
17577
|
if (isMultiline) {
|
|
17558
|
-
if (
|
|
17559
|
-
|
|
17560
|
-
if (
|
|
17561
|
-
|
|
17578
|
+
if (ctx.s.charCodeAt(ctx.p + 3) === first)
|
|
17579
|
+
ctx.p++;
|
|
17580
|
+
if (ctx.s.charCodeAt(ctx.p + 3) === first)
|
|
17581
|
+
ctx.p++;
|
|
17562
17582
|
}
|
|
17563
|
-
|
|
17564
|
-
|
|
17565
|
-
|
|
17566
|
-
|
|
17567
|
-
|
|
17568
|
-
|
|
17583
|
+
if (!state2) {
|
|
17584
|
+
let s = ctx.s.slice(sliceStart, ctx.p);
|
|
17585
|
+
parsed = parsed ? parsed + s : s;
|
|
17586
|
+
}
|
|
17587
|
+
ctx.p += isMultiline ? 3 : 1;
|
|
17588
|
+
return parsed;
|
|
17569
17589
|
} else if (!state2) {
|
|
17570
|
-
if (!isLiteral && c2 ===
|
|
17571
|
-
parsed +=
|
|
17590
|
+
if (!isLiteral && c2 === 92) {
|
|
17591
|
+
parsed += ctx.s.slice(sliceStart, sliceStart = ctx.p);
|
|
17572
17592
|
state2 = 1;
|
|
17573
17593
|
}
|
|
17574
17594
|
} else if (state2 === 1) {
|
|
17575
|
-
if (c2 ===
|
|
17595
|
+
if (c2 === 120 || c2 === 117 || c2 === 85) {
|
|
17596
|
+
let errPtr = ctx.p++ - 1;
|
|
17576
17597
|
let value = 0;
|
|
17577
|
-
let len = c2 ===
|
|
17578
|
-
for (let j = 0; j < len; j++,
|
|
17579
|
-
let hex =
|
|
17598
|
+
let len = c2 === 120 ? 2 : c2 === 117 ? 4 : 8;
|
|
17599
|
+
for (let j = 0; j < len; j++, ctx.p++) {
|
|
17600
|
+
let hex = ctx.s.charCodeAt(ctx.p);
|
|
17580
17601
|
let digit = (
|
|
17581
17602
|
/* 0-9 */
|
|
17582
17603
|
hex >= 48 && hex <= 57 ? hex - 48 : (
|
|
@@ -17588,369 +17609,518 @@ function parseString(str, ptr) {
|
|
|
17588
17609
|
)
|
|
17589
17610
|
);
|
|
17590
17611
|
if (digit < 0)
|
|
17591
|
-
|
|
17612
|
+
TomlError.x("invalid non-hex character in unicode escape", ctx);
|
|
17592
17613
|
value = value << 4 | digit;
|
|
17593
17614
|
}
|
|
17594
17615
|
if (value < 0 || value > 1114111 || value >= 55296 && value <= 57343) {
|
|
17595
|
-
|
|
17616
|
+
TomlError.x("invalid unicode escape", ctx, errPtr);
|
|
17596
17617
|
}
|
|
17597
17618
|
parsed += String.fromCodePoint(value);
|
|
17598
|
-
sliceStart =
|
|
17619
|
+
sliceStart = ctx.p--;
|
|
17599
17620
|
state2 = 0;
|
|
17600
|
-
} else if (c2 ===
|
|
17621
|
+
} else if (isMultiline && (c2 === 32 || c2 === 9)) {
|
|
17601
17622
|
state2 = 2;
|
|
17602
17623
|
} else {
|
|
17603
|
-
if (c2 ===
|
|
17624
|
+
if (c2 === 98)
|
|
17604
17625
|
parsed += "\b";
|
|
17605
|
-
else if (c2 ===
|
|
17626
|
+
else if (c2 === 116)
|
|
17606
17627
|
parsed += " ";
|
|
17607
|
-
else if (c2 ===
|
|
17628
|
+
else if (c2 === 110)
|
|
17608
17629
|
parsed += "\n";
|
|
17609
|
-
else if (c2 ===
|
|
17630
|
+
else if (c2 === 102)
|
|
17610
17631
|
parsed += "\f";
|
|
17611
|
-
else if (c2 ===
|
|
17632
|
+
else if (c2 === 114)
|
|
17612
17633
|
parsed += "\r";
|
|
17613
|
-
else if (c2 ===
|
|
17634
|
+
else if (c2 === 101)
|
|
17614
17635
|
parsed += "\x1B";
|
|
17615
|
-
else if (c2 ===
|
|
17636
|
+
else if (c2 === 34)
|
|
17616
17637
|
parsed += '"';
|
|
17617
|
-
else if (c2 ===
|
|
17638
|
+
else if (c2 === 92)
|
|
17618
17639
|
parsed += "\\";
|
|
17619
17640
|
else
|
|
17620
|
-
|
|
17621
|
-
sliceStart =
|
|
17641
|
+
TomlError.x("unrecognised escape sequence", ctx);
|
|
17642
|
+
sliceStart = ctx.p + 1;
|
|
17622
17643
|
state2 = 0;
|
|
17623
17644
|
}
|
|
17624
|
-
} else if (c2 !==
|
|
17625
|
-
if (state2 === 2)
|
|
17626
|
-
|
|
17627
|
-
|
|
17628
|
-
|
|
17629
|
-
});
|
|
17630
|
-
}
|
|
17631
|
-
state2 = !isLiteral && c2 === "\\" ? 1 : 0;
|
|
17632
|
-
sliceStart = i2;
|
|
17633
|
-
}
|
|
17634
|
-
}
|
|
17635
|
-
throw new TomlError("unfinished string", { toml: str, ptr });
|
|
17636
|
-
}
|
|
17637
|
-
function parseValue(value, toml, ptr, integersAsBigInt) {
|
|
17638
|
-
if (value === "true")
|
|
17639
|
-
return true;
|
|
17640
|
-
if (value === "false")
|
|
17641
|
-
return false;
|
|
17642
|
-
if (value === "-inf")
|
|
17643
|
-
return -Infinity;
|
|
17644
|
-
if (value === "inf" || value === "+inf")
|
|
17645
|
-
return Infinity;
|
|
17646
|
-
if (value === "nan" || value === "+nan" || value === "-nan")
|
|
17647
|
-
return NaN;
|
|
17648
|
-
if (value === "-0")
|
|
17649
|
-
return integersAsBigInt ? 0n : 0;
|
|
17650
|
-
let isInt = INT_REGEX.test(value);
|
|
17651
|
-
if (isInt || FLOAT_REGEX.test(value)) {
|
|
17652
|
-
if (LEADING_ZERO.test(value)) {
|
|
17653
|
-
throw new TomlError("leading zeroes are not allowed", {
|
|
17654
|
-
toml,
|
|
17655
|
-
ptr
|
|
17656
|
-
});
|
|
17657
|
-
}
|
|
17658
|
-
value = value.replace(/_/g, "");
|
|
17659
|
-
let numeric = +value;
|
|
17660
|
-
if (isNaN(numeric)) {
|
|
17661
|
-
throw new TomlError("invalid number", {
|
|
17662
|
-
toml,
|
|
17663
|
-
ptr
|
|
17664
|
-
});
|
|
17665
|
-
}
|
|
17666
|
-
if (isInt) {
|
|
17667
|
-
if ((isInt = !Number.isSafeInteger(numeric)) && !integersAsBigInt) {
|
|
17668
|
-
throw new TomlError("integer value cannot be represented losslessly", {
|
|
17669
|
-
toml,
|
|
17670
|
-
ptr
|
|
17671
|
-
});
|
|
17672
|
-
}
|
|
17673
|
-
if (isInt || integersAsBigInt === true)
|
|
17674
|
-
numeric = BigInt(value);
|
|
17645
|
+
} else if (c2 !== 32 && c2 !== 9) {
|
|
17646
|
+
if (state2 === 2)
|
|
17647
|
+
TomlError.x("invalid escape: only line-ending whitespace may be escaped", ctx, sliceStart);
|
|
17648
|
+
state2 = !isLiteral && c2 === 92 ? 1 : 0;
|
|
17649
|
+
sliceStart = ctx.p;
|
|
17675
17650
|
}
|
|
17676
|
-
return numeric;
|
|
17677
|
-
}
|
|
17678
|
-
const date = new TomlDate(value);
|
|
17679
|
-
if (!date.isValid()) {
|
|
17680
|
-
throw new TomlError("invalid value", {
|
|
17681
|
-
toml,
|
|
17682
|
-
ptr
|
|
17683
|
-
});
|
|
17684
17651
|
}
|
|
17685
|
-
|
|
17652
|
+
TomlError.x("unfinished string", ctx, startPtr);
|
|
17686
17653
|
}
|
|
17687
17654
|
|
|
17688
|
-
// ../../node_modules/smol-toml/dist/
|
|
17689
|
-
|
|
17690
|
-
|
|
17691
|
-
|
|
17692
|
-
|
|
17693
|
-
|
|
17694
|
-
|
|
17695
|
-
|
|
17696
|
-
|
|
17697
|
-
let
|
|
17698
|
-
|
|
17699
|
-
|
|
17700
|
-
|
|
17701
|
-
|
|
17702
|
-
|
|
17703
|
-
|
|
17704
|
-
|
|
17705
|
-
|
|
17706
|
-
|
|
17707
|
-
|
|
17708
|
-
|
|
17709
|
-
|
|
17710
|
-
}
|
|
17711
|
-
|
|
17712
|
-
|
|
17713
|
-
|
|
17714
|
-
|
|
17715
|
-
|
|
17716
|
-
|
|
17717
|
-
|
|
17718
|
-
|
|
17655
|
+
// ../../node_modules/smol-toml/dist/date.js
|
|
17656
|
+
var DATE_TIME_RE = /^(\d{4}-\d{2}-\d{2})?[Tt ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|z|[-+]\d{2}:\d{2})?$/i;
|
|
17657
|
+
var TomlDate = class _TomlDate extends Date {
|
|
17658
|
+
#hasDate = false;
|
|
17659
|
+
#hasTime = false;
|
|
17660
|
+
#offset = null;
|
|
17661
|
+
constructor(date, fasttype, unsafeDelim) {
|
|
17662
|
+
let hasDate = true;
|
|
17663
|
+
let hasTime = true;
|
|
17664
|
+
let offset = "Z";
|
|
17665
|
+
let c2;
|
|
17666
|
+
if (typeof date === "string") {
|
|
17667
|
+
if (fasttype)
|
|
17668
|
+
prep: {
|
|
17669
|
+
if (fasttype < 3) {
|
|
17670
|
+
if (+date.slice(11, 13) > 23) {
|
|
17671
|
+
date = "";
|
|
17672
|
+
break prep;
|
|
17673
|
+
}
|
|
17674
|
+
if (fasttype === 2) {
|
|
17675
|
+
offset = null;
|
|
17676
|
+
date += "Z";
|
|
17677
|
+
} else if ((c2 = date.charCodeAt(date.length - 1)) !== 90 && c2 !== 122) {
|
|
17678
|
+
offset = date.slice(date.length - 6);
|
|
17679
|
+
}
|
|
17680
|
+
if (unsafeDelim)
|
|
17681
|
+
date = date.slice(0, 10) + "T" + date.slice(11);
|
|
17682
|
+
} else if (fasttype === 4) {
|
|
17683
|
+
date = +date.slice(0, 2) > 23 ? "" : `0000-01-01T${date}Z`;
|
|
17684
|
+
}
|
|
17685
|
+
hasDate = fasttype !== 4;
|
|
17686
|
+
hasTime = fasttype !== 3;
|
|
17687
|
+
}
|
|
17688
|
+
else {
|
|
17689
|
+
let match = date.match(DATE_TIME_RE);
|
|
17690
|
+
if (match) {
|
|
17691
|
+
if (!match[1]) {
|
|
17692
|
+
hasDate = false;
|
|
17693
|
+
date = `0000-01-01T${date}`;
|
|
17694
|
+
}
|
|
17695
|
+
hasTime = !!match[2];
|
|
17696
|
+
hasTime && date[10] === " " && (date = date.replace(" ", "T"));
|
|
17697
|
+
if (match[2] && +match[2] > 23) {
|
|
17698
|
+
date = "";
|
|
17699
|
+
} else {
|
|
17700
|
+
offset = match[3] || null;
|
|
17701
|
+
if (!offset && hasTime)
|
|
17702
|
+
date += "Z";
|
|
17703
|
+
}
|
|
17704
|
+
} else {
|
|
17705
|
+
date = "";
|
|
17706
|
+
}
|
|
17707
|
+
}
|
|
17708
|
+
}
|
|
17709
|
+
super(date);
|
|
17710
|
+
if (!isNaN(this.getTime())) {
|
|
17711
|
+
this.#hasDate = hasDate;
|
|
17712
|
+
this.#hasTime = hasTime;
|
|
17713
|
+
this.#offset = offset;
|
|
17714
|
+
}
|
|
17719
17715
|
}
|
|
17720
|
-
|
|
17721
|
-
|
|
17722
|
-
function skipUntil(str, ptr, sep8, end, banNewLines = false) {
|
|
17723
|
-
if (!end) {
|
|
17724
|
-
ptr = indexOfNewline(str, ptr);
|
|
17725
|
-
return ptr < 0 ? str.length : ptr;
|
|
17716
|
+
isDateTime() {
|
|
17717
|
+
return this.#hasDate && this.#hasTime;
|
|
17726
17718
|
}
|
|
17727
|
-
|
|
17728
|
-
|
|
17729
|
-
if (c2 === "#") {
|
|
17730
|
-
i2 = indexOfNewline(str, i2);
|
|
17731
|
-
} else if (c2 === sep8) {
|
|
17732
|
-
return i2 + 1;
|
|
17733
|
-
} else if (c2 === end || banNewLines && (c2 === "\n" || c2 === "\r" && str[i2 + 1] === "\n")) {
|
|
17734
|
-
return i2;
|
|
17735
|
-
}
|
|
17719
|
+
isLocal() {
|
|
17720
|
+
return !this.#hasDate || !this.#hasTime || !this.#offset;
|
|
17736
17721
|
}
|
|
17737
|
-
|
|
17738
|
-
|
|
17739
|
-
|
|
17740
|
-
|
|
17741
|
-
|
|
17722
|
+
isDate() {
|
|
17723
|
+
return this.#hasDate && !this.#hasTime;
|
|
17724
|
+
}
|
|
17725
|
+
isTime() {
|
|
17726
|
+
return this.#hasTime && !this.#hasDate;
|
|
17727
|
+
}
|
|
17728
|
+
isValid() {
|
|
17729
|
+
return this.#hasDate || this.#hasTime;
|
|
17730
|
+
}
|
|
17731
|
+
toISOString() {
|
|
17732
|
+
let iso = super.toISOString();
|
|
17733
|
+
if (this.isDate())
|
|
17734
|
+
return iso.slice(0, 10);
|
|
17735
|
+
if (this.isTime())
|
|
17736
|
+
return iso.slice(11, 23);
|
|
17737
|
+
if (this.#offset === null)
|
|
17738
|
+
return iso.slice(0, -1);
|
|
17739
|
+
if (this.#offset === "Z" || this.#offset === "z")
|
|
17740
|
+
return iso;
|
|
17741
|
+
let offset = +this.#offset.slice(1, 3) * 60 + +this.#offset.slice(4, 6);
|
|
17742
|
+
offset = this.#offset[0] === "-" ? offset : -offset;
|
|
17743
|
+
let offsetDate = new Date(this.getTime() - offset * 6e4);
|
|
17744
|
+
return offsetDate.toISOString().slice(0, -1) + this.#offset;
|
|
17745
|
+
}
|
|
17746
|
+
static wrapAsOffsetDateTime(jsDate, offset = "Z") {
|
|
17747
|
+
let date = new _TomlDate(jsDate);
|
|
17748
|
+
date.#offset = offset;
|
|
17749
|
+
return date;
|
|
17750
|
+
}
|
|
17751
|
+
static wrapAsLocalDateTime(jsDate) {
|
|
17752
|
+
let date = new _TomlDate(jsDate);
|
|
17753
|
+
date.#offset = null;
|
|
17754
|
+
return date;
|
|
17755
|
+
}
|
|
17756
|
+
static wrapAsLocalDate(jsDate) {
|
|
17757
|
+
let date = new _TomlDate(jsDate);
|
|
17758
|
+
date.#hasTime = false;
|
|
17759
|
+
date.#offset = null;
|
|
17760
|
+
return date;
|
|
17761
|
+
}
|
|
17762
|
+
static wrapAsLocalTime(jsDate) {
|
|
17763
|
+
let date = new _TomlDate(jsDate);
|
|
17764
|
+
date.#hasDate = false;
|
|
17765
|
+
date.#offset = null;
|
|
17766
|
+
return date;
|
|
17767
|
+
}
|
|
17768
|
+
};
|
|
17742
17769
|
|
|
17743
17770
|
// ../../node_modules/smol-toml/dist/extract.js
|
|
17744
|
-
function
|
|
17745
|
-
|
|
17746
|
-
|
|
17747
|
-
|
|
17748
|
-
|
|
17749
|
-
|
|
17771
|
+
function isDigit(char, base = 10) {
|
|
17772
|
+
return base === 16 ? char > 47 && char < 58 || char > 64 && char < 71 || char > 96 && char < 103 : char > 47 && char < 48 + base;
|
|
17773
|
+
}
|
|
17774
|
+
function isEndOfValue(char, delim) {
|
|
17775
|
+
return char === 32 || char === 9 || char === 10 || char === 13 || // Structure end or next value delimiter
|
|
17776
|
+
delim && (char === delim || char === 44) || // Comment
|
|
17777
|
+
char === 35;
|
|
17778
|
+
}
|
|
17779
|
+
function extractValue(ctx, end) {
|
|
17780
|
+
let errPtr = ctx.p;
|
|
17781
|
+
let c2 = ctx.s.charCodeAt(ctx.p);
|
|
17782
|
+
if (c2 === 91 || c2 === 123) {
|
|
17783
|
+
ctx.d-- || TomlError.x("document contains excessively nested structures. aborting.", ctx);
|
|
17784
|
+
let value = c2 === 91 ? parseArray(ctx) : parseInlineTable(ctx);
|
|
17785
|
+
ctx.d++;
|
|
17786
|
+
return value;
|
|
17750
17787
|
}
|
|
17751
|
-
|
|
17752
|
-
|
|
17753
|
-
function extractValue(str, ptr, end, depth, integersAsBigInt) {
|
|
17754
|
-
if (depth === 0) {
|
|
17755
|
-
throw new TomlError("document contains excessively nested structures. aborting.", {
|
|
17756
|
-
toml: str,
|
|
17757
|
-
ptr
|
|
17758
|
-
});
|
|
17788
|
+
if (c2 === 34 || c2 === 39) {
|
|
17789
|
+
return parseString(ctx);
|
|
17759
17790
|
}
|
|
17760
|
-
|
|
17761
|
-
|
|
17762
|
-
|
|
17763
|
-
|
|
17764
|
-
|
|
17765
|
-
|
|
17766
|
-
|
|
17767
|
-
|
|
17768
|
-
|
|
17769
|
-
|
|
17770
|
-
|
|
17771
|
-
|
|
17772
|
-
|
|
17791
|
+
if (c2 === 116) {
|
|
17792
|
+
if (ctx.s.charCodeAt(++ctx.p) !== 114 || ctx.s.charCodeAt(++ctx.p) !== 117 || ctx.s.charCodeAt(++ctx.p) !== 101)
|
|
17793
|
+
TomlError.x("invalid value", ctx, errPtr);
|
|
17794
|
+
return ctx.p++, true;
|
|
17795
|
+
}
|
|
17796
|
+
if (c2 === 102) {
|
|
17797
|
+
if (ctx.s.charCodeAt(++ctx.p) !== 97 || ctx.s.charCodeAt(++ctx.p) !== 108 || ctx.s.charCodeAt(++ctx.p) !== 115 || ctx.s.charCodeAt(++ctx.p) !== 101)
|
|
17798
|
+
TomlError.x("invalid value", ctx, errPtr);
|
|
17799
|
+
return ctx.p++, false;
|
|
17800
|
+
}
|
|
17801
|
+
if (c2 === 43 || c2 === 45) {
|
|
17802
|
+
return parseNumber(ctx, ctx.p, ctx.s.charCodeAt(++ctx.p), 44 - c2, end);
|
|
17803
|
+
}
|
|
17804
|
+
if (ctx.s.charCodeAt(ctx.p + 4) === 45 && ctx.s.charCodeAt(ctx.p + 7) === 45) {
|
|
17805
|
+
return parseDate(ctx, c2, end);
|
|
17806
|
+
}
|
|
17807
|
+
if (ctx.s.charCodeAt(ctx.p + 2) === 58) {
|
|
17808
|
+
return parseTime(ctx, c2, end);
|
|
17809
|
+
}
|
|
17810
|
+
return parseNumber(ctx, ctx.p, c2, 0, end);
|
|
17811
|
+
}
|
|
17812
|
+
function parseNumber(ctx, startPtr, startChr, sign, endChr) {
|
|
17813
|
+
let c2 = startChr;
|
|
17814
|
+
let state2 = 0;
|
|
17815
|
+
let hasUnderscores = false;
|
|
17816
|
+
if (c2 === 105) {
|
|
17817
|
+
if (ctx.s.charCodeAt(++ctx.p) !== 110 || ctx.s.charCodeAt(++ctx.p) !== 102)
|
|
17818
|
+
TomlError.x("invalid value", ctx, startPtr);
|
|
17819
|
+
return ctx.p++, (sign || 1) / 0;
|
|
17820
|
+
}
|
|
17821
|
+
if (c2 === 110) {
|
|
17822
|
+
if (ctx.s.charCodeAt(++ctx.p) !== 97 || ctx.s.charCodeAt(++ctx.p) !== 110)
|
|
17823
|
+
TomlError.x("invalid value", ctx, startPtr);
|
|
17824
|
+
return ctx.p++, NaN;
|
|
17825
|
+
}
|
|
17826
|
+
if (c2 === 48) {
|
|
17827
|
+
if (++ctx.p >= ctx.s.length || isEndOfValue(c2 = ctx.s.charCodeAt(ctx.p), endChr))
|
|
17828
|
+
return ctx.bi === true ? 0n : 0;
|
|
17829
|
+
if (!sign) {
|
|
17830
|
+
if (c2 === 120)
|
|
17831
|
+
return parseIntegerBaseN(ctx, startPtr, 16, endChr);
|
|
17832
|
+
else if (c2 === 98)
|
|
17833
|
+
return parseIntegerBaseN(ctx, startPtr, 2, endChr);
|
|
17834
|
+
else if (c2 === 111)
|
|
17835
|
+
return parseIntegerBaseN(ctx, startPtr, 8, endChr);
|
|
17836
|
+
}
|
|
17837
|
+
if (c2 === 46)
|
|
17838
|
+
state2 = 2;
|
|
17839
|
+
else if (c2 === 101 || c2 === 69)
|
|
17840
|
+
state2 = 4;
|
|
17841
|
+
else
|
|
17842
|
+
TomlError.x("illegal leading zero", ctx, startPtr);
|
|
17843
|
+
} else if (!isDigit(c2))
|
|
17844
|
+
TomlError.x("invalid value", ctx, startPtr);
|
|
17845
|
+
while (++ctx.p < ctx.s.length && (c2 = ctx.s.charCodeAt(ctx.p), !isEndOfValue(c2, endChr))) {
|
|
17846
|
+
if (!state2)
|
|
17847
|
+
state2 = 1;
|
|
17848
|
+
if (c2 === 95) {
|
|
17849
|
+
if (!(state2 & 1))
|
|
17850
|
+
TomlError.x("illegal underscore", ctx);
|
|
17851
|
+
state2 += 11;
|
|
17852
|
+
hasUnderscores = true;
|
|
17853
|
+
} else if (state2 === 1 && c2 === 46)
|
|
17854
|
+
state2 = 2;
|
|
17855
|
+
else if ((state2 === 1 || state2 === 3) && (c2 === 101 || c2 === 69))
|
|
17856
|
+
state2 = 4;
|
|
17857
|
+
else if (state2 === 4 && (c2 === 43 || c2 === 45)) {
|
|
17858
|
+
state2 = 6;
|
|
17859
|
+
} else if (!isDigit(c2))
|
|
17860
|
+
TomlError.x(`illegal character in numeric literal`, ctx);
|
|
17861
|
+
else if (state2 > 9)
|
|
17862
|
+
state2 -= 11;
|
|
17863
|
+
else if (!(state2 & 1))
|
|
17864
|
+
state2++;
|
|
17865
|
+
}
|
|
17866
|
+
if (!state2) {
|
|
17867
|
+
let val = (startChr - 48) * (sign || 1);
|
|
17868
|
+
return ctx.bi === true ? BigInt(val) : val;
|
|
17869
|
+
}
|
|
17870
|
+
if (!(state2 & 1))
|
|
17871
|
+
TomlError.x("unfinished numeric value", ctx, startPtr);
|
|
17872
|
+
let str = ctx.s.slice(startPtr, ctx.p);
|
|
17873
|
+
if (hasUnderscores)
|
|
17874
|
+
str = str.replaceAll("_", "");
|
|
17875
|
+
return state2 > 1 ? parseFloat(str) : parseInteger(ctx, str, 10, startPtr);
|
|
17876
|
+
}
|
|
17877
|
+
function parseIntegerBaseN(ctx, startPtr, base, endChr) {
|
|
17878
|
+
let c2, underscore = 1;
|
|
17879
|
+
while (++ctx.p < ctx.s.length && (c2 = ctx.s.charCodeAt(ctx.p), !isEndOfValue(c2, endChr))) {
|
|
17880
|
+
if (c2 === 95) {
|
|
17881
|
+
if (underscore & 1)
|
|
17882
|
+
TomlError.x("illegal underscore", ctx);
|
|
17883
|
+
underscore = 3;
|
|
17884
|
+
} else if (!isDigit(c2, base))
|
|
17885
|
+
TomlError.x(`illegal character in numeric literal`, ctx);
|
|
17886
|
+
else if (underscore & 1)
|
|
17887
|
+
underscore--;
|
|
17888
|
+
}
|
|
17889
|
+
if (underscore & 1)
|
|
17890
|
+
TomlError.x("unfinished numeric value", ctx);
|
|
17891
|
+
let str = ctx.s.slice(startPtr + 2, ctx.p);
|
|
17892
|
+
if (underscore)
|
|
17893
|
+
str = str.replaceAll("_", "");
|
|
17894
|
+
return parseInteger(ctx, str, base, startPtr);
|
|
17895
|
+
}
|
|
17896
|
+
function parseInteger(ctx, str, base, startPtr) {
|
|
17897
|
+
if (ctx.bi !== true)
|
|
17898
|
+
int: {
|
|
17899
|
+
let val = parseInt(str, base);
|
|
17900
|
+
if (!Number.isSafeInteger(val)) {
|
|
17901
|
+
if (ctx.bi)
|
|
17902
|
+
break int;
|
|
17903
|
+
TomlError.x("integer value cannot be represented losslessly", ctx, startPtr);
|
|
17904
|
+
}
|
|
17905
|
+
return val;
|
|
17906
|
+
}
|
|
17907
|
+
return base === 10 ? BigInt(str) : BigInt((base === 2 ? "0b" : base === 8 ? "0o" : "0x") + str);
|
|
17908
|
+
}
|
|
17909
|
+
function parseDate(ctx, c2, endChr) {
|
|
17910
|
+
let startPtr = ctx.p++, unsafeSeparator;
|
|
17911
|
+
if (!isDigit(c2) || !isDigit(ctx.s.charCodeAt(ctx.p++)) || !isDigit(ctx.s.charCodeAt(ctx.p++)) || !isDigit(ctx.s.charCodeAt(ctx.p++))) {
|
|
17912
|
+
return parseNumber(ctx, ctx.p = startPtr, c2, 0, endChr);
|
|
17913
|
+
}
|
|
17914
|
+
ctx.p += 5;
|
|
17915
|
+
if (!isDigit(ctx.s.charCodeAt(ctx.p++)))
|
|
17916
|
+
TomlError.x("invalid date-time: date part is malformed", ctx, startPtr);
|
|
17917
|
+
if (ctx.p >= ctx.s.length || ((c2 = ctx.s.charCodeAt(ctx.p)) !== 32 || (unsafeSeparator = true, !isDigit(ctx.s.charCodeAt(ctx.p + 1)))) && c2 !== 84 && c2 !== 116) {
|
|
17918
|
+
let t3 = ctx.s.slice(startPtr, ctx.p);
|
|
17919
|
+
return readDate(ctx, t3, 3, false, startPtr);
|
|
17920
|
+
}
|
|
17921
|
+
if (ctx.s.charCodeAt(ctx.p += 3) !== 58)
|
|
17922
|
+
TomlError.x("invalid date-time: time part is malformed", ctx, startPtr);
|
|
17923
|
+
if (ctx.s.charCodeAt(ctx.p += 3) === 58)
|
|
17924
|
+
ctx.p += 3;
|
|
17925
|
+
if (ctx.s.charCodeAt(ctx.p) === 46)
|
|
17926
|
+
while (isDigit(ctx.s.charCodeAt(++ctx.p)))
|
|
17927
|
+
;
|
|
17928
|
+
if (c2 = ctx.s.charCodeAt(ctx.p)) {
|
|
17929
|
+
if (c2 === 90 || c2 === 122) {
|
|
17930
|
+
let t3 = ctx.s.slice(startPtr, ++ctx.p);
|
|
17931
|
+
return readDate(ctx, t3, 1, unsafeSeparator, startPtr, "[+00:00]");
|
|
17932
|
+
}
|
|
17933
|
+
if (c2 === 43 || c2 === 45) {
|
|
17934
|
+
let t3 = ctx.s.slice(startPtr, ctx.p += 6);
|
|
17935
|
+
return readDate(ctx, t3, 1, unsafeSeparator, startPtr, !ctx.ld && "[" + ctx.s.slice(ctx.p - 6, ctx.p) + "]");
|
|
17773
17936
|
}
|
|
17774
|
-
return [value, endPtr2];
|
|
17775
17937
|
}
|
|
17776
|
-
|
|
17777
|
-
|
|
17778
|
-
|
|
17779
|
-
|
|
17780
|
-
|
|
17781
|
-
|
|
17782
|
-
|
|
17783
|
-
|
|
17784
|
-
|
|
17785
|
-
|
|
17786
|
-
|
|
17787
|
-
|
|
17938
|
+
let t2 = ctx.s.slice(startPtr, ctx.p);
|
|
17939
|
+
return readDate(ctx, t2, 2, unsafeSeparator, startPtr);
|
|
17940
|
+
}
|
|
17941
|
+
function parseTime(ctx, c2, endChr) {
|
|
17942
|
+
let start = ctx.p;
|
|
17943
|
+
if (!isDigit(c2) || !isDigit(ctx.s.charCodeAt(++ctx.p))) {
|
|
17944
|
+
return parseNumber(ctx, --ctx.p, c2, 0, endChr);
|
|
17945
|
+
}
|
|
17946
|
+
if (ctx.s.charCodeAt(ctx.p += 4) === 58)
|
|
17947
|
+
ctx.p += 3;
|
|
17948
|
+
if (ctx.s.charCodeAt(ctx.p) === 46)
|
|
17949
|
+
while (isDigit(ctx.s.charCodeAt(++ctx.p)))
|
|
17950
|
+
;
|
|
17951
|
+
let t2 = ctx.s.slice(start, ctx.p);
|
|
17952
|
+
return readDate(ctx, t2, 4, false, start);
|
|
17953
|
+
}
|
|
17954
|
+
function readDate(ctx, str, type, unsafeDelim, errPtr, temporalSuffix) {
|
|
17955
|
+
if (ctx.ld) {
|
|
17956
|
+
let date = new TomlDate(str, type, unsafeDelim);
|
|
17957
|
+
if (!date.isValid())
|
|
17958
|
+
TomlError.x("invalid date", ctx, errPtr);
|
|
17959
|
+
return date;
|
|
17960
|
+
}
|
|
17961
|
+
try {
|
|
17962
|
+
if (temporalSuffix)
|
|
17963
|
+
str += temporalSuffix;
|
|
17964
|
+
switch (type) {
|
|
17965
|
+
case 1:
|
|
17966
|
+
return Temporal.ZonedDateTime.from(str);
|
|
17967
|
+
case 2:
|
|
17968
|
+
return Temporal.PlainDateTime.from(str);
|
|
17969
|
+
case 3:
|
|
17970
|
+
return Temporal.PlainDate.from(str);
|
|
17971
|
+
case 4:
|
|
17972
|
+
return Temporal.PlainTime.from(str);
|
|
17788
17973
|
}
|
|
17789
|
-
|
|
17974
|
+
} catch (e) {
|
|
17975
|
+
TomlError.x(e instanceof Error ? e.message : "" + e, ctx, errPtr);
|
|
17790
17976
|
}
|
|
17791
|
-
|
|
17792
|
-
|
|
17793
|
-
|
|
17794
|
-
|
|
17795
|
-
|
|
17796
|
-
|
|
17797
|
-
|
|
17977
|
+
}
|
|
17978
|
+
|
|
17979
|
+
// ../../node_modules/smol-toml/dist/util.js
|
|
17980
|
+
function skipComment(ctx) {
|
|
17981
|
+
for (; ctx.p < ctx.s.length; ctx.p++) {
|
|
17982
|
+
let c2 = ctx.s.charCodeAt(ctx.p);
|
|
17983
|
+
if (c2 === 10)
|
|
17984
|
+
break;
|
|
17985
|
+
if (c2 === 13 && ctx.s.charCodeAt(ctx.p + 1) === 10) {
|
|
17986
|
+
ctx.p++;
|
|
17987
|
+
break;
|
|
17988
|
+
}
|
|
17989
|
+
if (c2 < 32 && c2 !== 9 || c2 === 127) {
|
|
17990
|
+
TomlError.x("control characters are not allowed in comments", ctx);
|
|
17991
|
+
}
|
|
17798
17992
|
}
|
|
17799
|
-
|
|
17800
|
-
|
|
17801
|
-
|
|
17802
|
-
|
|
17993
|
+
}
|
|
17994
|
+
function skipVoid(ctx, banNewLines, banComments) {
|
|
17995
|
+
let c2;
|
|
17996
|
+
while (ctx.p < ctx.s.length) {
|
|
17997
|
+
while (ctx.p < ctx.s.length && ((c2 = ctx.s.charCodeAt(ctx.p)) === 32 || c2 === 9 || !banNewLines && (c2 === 10 || c2 === 13 && ctx.s.charCodeAt(ctx.p + 1) === 10)))
|
|
17998
|
+
ctx.p++;
|
|
17999
|
+
if (banComments || c2 !== 35)
|
|
18000
|
+
break;
|
|
18001
|
+
skipComment(ctx);
|
|
17803
18002
|
}
|
|
17804
|
-
return [
|
|
17805
|
-
parseValue(slice[0], str, ptr, integersAsBigInt),
|
|
17806
|
-
endPtr
|
|
17807
|
-
];
|
|
17808
18003
|
}
|
|
17809
18004
|
|
|
17810
18005
|
// ../../node_modules/smol-toml/dist/struct.js
|
|
17811
|
-
|
|
17812
|
-
|
|
17813
|
-
let
|
|
18006
|
+
function parseKey(ctx, end = 61) {
|
|
18007
|
+
let startPtr;
|
|
18008
|
+
let state2 = 0;
|
|
17814
18009
|
let parsed = [];
|
|
17815
|
-
let
|
|
17816
|
-
|
|
17817
|
-
throw new TomlError("incomplete key-value: cannot find end of key", {
|
|
17818
|
-
toml: str,
|
|
17819
|
-
ptr
|
|
17820
|
-
});
|
|
17821
|
-
}
|
|
18010
|
+
let sliceStart;
|
|
18011
|
+
let c2 = ctx.s.charCodeAt(startPtr = ctx.p);
|
|
17822
18012
|
do {
|
|
17823
|
-
|
|
17824
|
-
|
|
17825
|
-
|
|
17826
|
-
|
|
17827
|
-
|
|
17828
|
-
|
|
17829
|
-
|
|
17830
|
-
|
|
17831
|
-
|
|
17832
|
-
|
|
17833
|
-
|
|
17834
|
-
|
|
17835
|
-
|
|
17836
|
-
|
|
17837
|
-
|
|
17838
|
-
|
|
17839
|
-
|
|
17840
|
-
|
|
17841
|
-
|
|
17842
|
-
|
|
17843
|
-
|
|
17844
|
-
|
|
17845
|
-
ptr: eos
|
|
17846
|
-
});
|
|
17847
|
-
}
|
|
17848
|
-
if (endPtr < eos) {
|
|
17849
|
-
endPtr = str.indexOf(end, eos);
|
|
17850
|
-
if (endPtr < 0) {
|
|
17851
|
-
throw new TomlError("incomplete key-value: cannot find end of key", {
|
|
17852
|
-
toml: str,
|
|
17853
|
-
ptr
|
|
17854
|
-
});
|
|
17855
|
-
}
|
|
17856
|
-
}
|
|
17857
|
-
parsed.push(part);
|
|
17858
|
-
} else {
|
|
17859
|
-
dot = str.indexOf(".", ptr);
|
|
17860
|
-
let part = str.slice(ptr, dot < 0 || dot > endPtr ? endPtr : dot);
|
|
17861
|
-
if (!KEY_PART_RE.test(part)) {
|
|
17862
|
-
throw new TomlError("only letter, numbers, dashes and underscores are allowed in keys", {
|
|
17863
|
-
toml: str,
|
|
17864
|
-
ptr
|
|
17865
|
-
});
|
|
17866
|
-
}
|
|
17867
|
-
parsed.push(part.trimEnd());
|
|
18013
|
+
if (c2 === end) {
|
|
18014
|
+
if (!state2)
|
|
18015
|
+
TomlError.x("unexpected end of key", ctx);
|
|
18016
|
+
if (state2 === 1)
|
|
18017
|
+
parsed.push(ctx.s.slice(sliceStart, ctx.p));
|
|
18018
|
+
return ctx.p++, parsed;
|
|
18019
|
+
} else if (c2 === 46) {
|
|
18020
|
+
if (!state2)
|
|
18021
|
+
TomlError.x("illegal empty bare key", ctx);
|
|
18022
|
+
if (state2 === 1)
|
|
18023
|
+
parsed.push(ctx.s.slice(sliceStart, ctx.p));
|
|
18024
|
+
state2 = 0;
|
|
18025
|
+
} else if (!state2 && (c2 === 34 || c2 === 39)) {
|
|
18026
|
+
if (c2 === ctx.s.charCodeAt(ctx.p + 1) && c2 === ctx.s.charCodeAt(ctx.p + 2))
|
|
18027
|
+
TomlError.x("illegal quoted key: multiline strings are not allowed", ctx);
|
|
18028
|
+
parsed.push(parseString(ctx));
|
|
18029
|
+
state2 = 2;
|
|
18030
|
+
ctx.p--;
|
|
18031
|
+
} else if (c2 === 32 || c2 === 9) {
|
|
18032
|
+
if (state2 === 1) {
|
|
18033
|
+
parsed.push(ctx.s.slice(sliceStart, ctx.p));
|
|
18034
|
+
state2 = 2;
|
|
17868
18035
|
}
|
|
18036
|
+
} else if (state2 === 2 || c2 < 48 && c2 !== 45 || c2 > 57 && c2 < 65 || c2 > 90 && c2 < 97 && c2 !== 95 || c2 > 122) {
|
|
18037
|
+
TomlError.x("illegal character in key", ctx);
|
|
18038
|
+
} else if (!state2) {
|
|
18039
|
+
state2 = 1;
|
|
18040
|
+
sliceStart = ctx.p;
|
|
17869
18041
|
}
|
|
17870
|
-
} while (
|
|
17871
|
-
|
|
18042
|
+
} while (c2 = ctx.s.charCodeAt(++ctx.p));
|
|
18043
|
+
TomlError.x("incomplete key-value: cannot find end of key", ctx, startPtr);
|
|
17872
18044
|
}
|
|
17873
|
-
function parseInlineTable(
|
|
17874
|
-
let
|
|
18045
|
+
function parseInlineTable(ctx) {
|
|
18046
|
+
let startPtr = ctx.p++;
|
|
18047
|
+
let res = /* @__PURE__ */ Object.create(null);
|
|
17875
18048
|
let seen = /* @__PURE__ */ new Set();
|
|
17876
18049
|
let c2;
|
|
17877
|
-
|
|
17878
|
-
|
|
17879
|
-
if (c2 ===
|
|
17880
|
-
|
|
17881
|
-
|
|
17882
|
-
|
|
17883
|
-
|
|
17884
|
-
|
|
17885
|
-
|
|
17886
|
-
|
|
17887
|
-
|
|
17888
|
-
|
|
17889
|
-
|
|
17890
|
-
|
|
17891
|
-
|
|
17892
|
-
|
|
17893
|
-
|
|
17894
|
-
|
|
17895
|
-
|
|
17896
|
-
|
|
17897
|
-
|
|
17898
|
-
|
|
17899
|
-
});
|
|
17900
|
-
}
|
|
17901
|
-
if (!hasOwn && k === "__proto__") {
|
|
17902
|
-
Object.defineProperty(t2, k, { enumerable: true, configurable: true, writable: true });
|
|
17903
|
-
}
|
|
18050
|
+
while (ctx.p < ctx.s.length) {
|
|
18051
|
+
skipVoid(ctx);
|
|
18052
|
+
if ((c2 = ctx.s.charCodeAt(ctx.p)) === 125) {
|
|
18053
|
+
ctx.p++;
|
|
18054
|
+
return res;
|
|
18055
|
+
}
|
|
18056
|
+
let k;
|
|
18057
|
+
let t2 = res;
|
|
18058
|
+
let hasOwn = false;
|
|
18059
|
+
let errPtr = ctx.p;
|
|
18060
|
+
let key = parseKey(ctx);
|
|
18061
|
+
for (let i2 = 0; i2 < key.length; i2++) {
|
|
18062
|
+
if (i2)
|
|
18063
|
+
t2 = hasOwn ? t2[k] : t2[k] = /* @__PURE__ */ Object.create(null);
|
|
18064
|
+
k = key[i2];
|
|
18065
|
+
if ((hasOwn = Object.hasOwn(t2, k)) && (typeof t2[k] !== "object" || seen.has(t2[k]))) {
|
|
18066
|
+
TomlError.x("trying to redefine an already defined value", ctx, errPtr);
|
|
18067
|
+
}
|
|
18068
|
+
let unsafe = k === "__proto__";
|
|
18069
|
+
if (ctx.uk && (unsafe || k === "constructor")) {
|
|
18070
|
+
t2 = ctx.uk !== 1 && TomlError.x("document contains an unsafe property", ctx, errPtr);
|
|
18071
|
+
break;
|
|
17904
18072
|
}
|
|
17905
|
-
if (hasOwn) {
|
|
17906
|
-
|
|
17907
|
-
toml: str,
|
|
17908
|
-
ptr
|
|
17909
|
-
});
|
|
18073
|
+
if (!hasOwn && unsafe) {
|
|
18074
|
+
Object.defineProperty(t2, k, { enumerable: true, configurable: true, writable: true });
|
|
17910
18075
|
}
|
|
17911
|
-
|
|
18076
|
+
}
|
|
18077
|
+
if (hasOwn) {
|
|
18078
|
+
TomlError.x("trying to redefine an already defined value", ctx, errPtr);
|
|
18079
|
+
}
|
|
18080
|
+
skipVoid(ctx, true, true);
|
|
18081
|
+
let value = extractValue(
|
|
18082
|
+
ctx,
|
|
18083
|
+
125
|
|
18084
|
+
/* } */
|
|
18085
|
+
);
|
|
18086
|
+
if (t2 && typeof (t2[k] = value) === "object")
|
|
17912
18087
|
seen.add(value);
|
|
17913
|
-
|
|
17914
|
-
|
|
18088
|
+
skipVoid(ctx);
|
|
18089
|
+
if ((c2 = ctx.s.charCodeAt(ctx.p++)) === 125) {
|
|
18090
|
+
return res;
|
|
17915
18091
|
}
|
|
18092
|
+
if (c2 !== 44)
|
|
18093
|
+
TomlError.x("expected comma or end of structure", ctx, ctx.p - 1);
|
|
17916
18094
|
}
|
|
17917
|
-
|
|
17918
|
-
throw new TomlError("unfinished table encountered", {
|
|
17919
|
-
toml: str,
|
|
17920
|
-
ptr
|
|
17921
|
-
});
|
|
17922
|
-
}
|
|
17923
|
-
return [res, ptr];
|
|
18095
|
+
TomlError.x("unfinished table", ctx, startPtr);
|
|
17924
18096
|
}
|
|
17925
|
-
function parseArray(
|
|
18097
|
+
function parseArray(ctx) {
|
|
18098
|
+
let startPtr = ctx.p++;
|
|
17926
18099
|
let res = [];
|
|
17927
18100
|
let c2;
|
|
17928
|
-
|
|
17929
|
-
|
|
17930
|
-
if (c2 ===
|
|
17931
|
-
|
|
17932
|
-
|
|
17933
|
-
|
|
17934
|
-
|
|
17935
|
-
|
|
17936
|
-
|
|
17937
|
-
|
|
17938
|
-
|
|
17939
|
-
|
|
17940
|
-
|
|
17941
|
-
|
|
17942
|
-
|
|
17943
|
-
|
|
17944
|
-
|
|
17945
|
-
toml: str,
|
|
17946
|
-
ptr
|
|
17947
|
-
});
|
|
18101
|
+
while (ctx.p < ctx.s.length) {
|
|
18102
|
+
skipVoid(ctx);
|
|
18103
|
+
if ((c2 = ctx.s.charCodeAt(ctx.p)) === 93) {
|
|
18104
|
+
ctx.p++;
|
|
18105
|
+
return res;
|
|
18106
|
+
}
|
|
18107
|
+
res.push(extractValue(
|
|
18108
|
+
ctx,
|
|
18109
|
+
93
|
|
18110
|
+
/* ] */
|
|
18111
|
+
));
|
|
18112
|
+
skipVoid(ctx);
|
|
18113
|
+
if ((c2 = ctx.s.charCodeAt(ctx.p++)) === 93) {
|
|
18114
|
+
return res;
|
|
18115
|
+
}
|
|
18116
|
+
if (c2 !== 44)
|
|
18117
|
+
TomlError.x("expected comma or end of structure", ctx, ctx.p - 1);
|
|
17948
18118
|
}
|
|
17949
|
-
|
|
18119
|
+
TomlError.x("unfinished array", ctx, startPtr);
|
|
17950
18120
|
}
|
|
17951
18121
|
|
|
17952
18122
|
// ../../node_modules/smol-toml/dist/parse.js
|
|
17953
|
-
function peekTable(key, table, meta, type) {
|
|
18123
|
+
function peekTable(ctx, key, table, meta, type) {
|
|
17954
18124
|
let t2 = table;
|
|
17955
18125
|
let m2 = meta;
|
|
17956
18126
|
let k;
|
|
@@ -17958,7 +18128,7 @@ function peekTable(key, table, meta, type) {
|
|
|
17958
18128
|
let state2;
|
|
17959
18129
|
for (let i2 = 0; i2 < key.length; i2++) {
|
|
17960
18130
|
if (i2) {
|
|
17961
|
-
t2 = hasOwn ? t2[k] : t2[k] =
|
|
18131
|
+
t2 = hasOwn ? t2[k] : t2[k] = /* @__PURE__ */ Object.create(null);
|
|
17962
18132
|
m2 = (state2 = m2[k]).c;
|
|
17963
18133
|
if (type === 0 && (state2.t === 1 || state2.t === 2)) {
|
|
17964
18134
|
return null;
|
|
@@ -17974,7 +18144,10 @@ function peekTable(key, table, meta, type) {
|
|
|
17974
18144
|
return null;
|
|
17975
18145
|
}
|
|
17976
18146
|
if (!hasOwn) {
|
|
17977
|
-
|
|
18147
|
+
let unsafe = k === "__proto__";
|
|
18148
|
+
if (ctx.uk && (unsafe || k === "constructor"))
|
|
18149
|
+
return false;
|
|
18150
|
+
if (unsafe) {
|
|
17978
18151
|
Object.defineProperty(t2, k, { enumerable: true, configurable: true, writable: true });
|
|
17979
18152
|
Object.defineProperty(m2, k, { enumerable: true, configurable: true, writable: true });
|
|
17980
18153
|
}
|
|
@@ -17982,7 +18155,7 @@ function peekTable(key, table, meta, type) {
|
|
|
17982
18155
|
t: i2 < key.length - 1 && type === 2 ? 3 : type,
|
|
17983
18156
|
d: false,
|
|
17984
18157
|
i: 0,
|
|
17985
|
-
c:
|
|
18158
|
+
c: /* @__PURE__ */ Object.create(null)
|
|
17986
18159
|
};
|
|
17987
18160
|
}
|
|
17988
18161
|
}
|
|
@@ -17995,94 +18168,124 @@ function peekTable(key, table, meta, type) {
|
|
|
17995
18168
|
state2.d = true;
|
|
17996
18169
|
t2[k] = [];
|
|
17997
18170
|
}
|
|
17998
|
-
t2[k].push(t2 =
|
|
17999
|
-
state2.c[state2.i++] = state2 = { t: 1, d: false, i: 0, c:
|
|
18171
|
+
t2[k].push(t2 = /* @__PURE__ */ Object.create(null));
|
|
18172
|
+
state2.c[state2.i++] = state2 = { t: 1, d: false, i: 0, c: /* @__PURE__ */ Object.create(null) };
|
|
18000
18173
|
}
|
|
18001
18174
|
if (state2.d) {
|
|
18002
18175
|
return null;
|
|
18003
18176
|
}
|
|
18004
18177
|
state2.d = true;
|
|
18005
18178
|
if (type === 1) {
|
|
18006
|
-
t2 = hasOwn ? t2[k] : t2[k] =
|
|
18179
|
+
t2 = hasOwn ? t2[k] : t2[k] = /* @__PURE__ */ Object.create(null);
|
|
18007
18180
|
} else if (type === 0 && hasOwn) {
|
|
18008
18181
|
return null;
|
|
18009
18182
|
}
|
|
18010
18183
|
return [k, t2, state2.c];
|
|
18011
18184
|
}
|
|
18012
|
-
function
|
|
18013
|
-
|
|
18014
|
-
|
|
18185
|
+
function validateTablePeek(ctx, peek, ptr) {
|
|
18186
|
+
if (peek === null || ctx.uk === 2)
|
|
18187
|
+
TomlError.x(peek === null ? "trying to redefine an already defined table or value" : "document contains an unsafe property", ctx, ptr);
|
|
18188
|
+
}
|
|
18189
|
+
function parse(toml, options = {}) {
|
|
18190
|
+
let ctx = {
|
|
18191
|
+
s: toml,
|
|
18192
|
+
p: 0,
|
|
18193
|
+
d: options.maxDepth ?? 1e3,
|
|
18194
|
+
bi: options.integersAsBigInt ?? false,
|
|
18195
|
+
ld: options.useLegacyDate ?? true,
|
|
18196
|
+
uk: options.unsafeKeyBehaviour === "throw" ? 2 : options.unsafeKeyBehaviour === "drop" ? 1 : 0
|
|
18197
|
+
};
|
|
18198
|
+
let res = /* @__PURE__ */ Object.create(null);
|
|
18199
|
+
let meta = /* @__PURE__ */ Object.create(null);
|
|
18200
|
+
let tmp;
|
|
18201
|
+
let skipping = false;
|
|
18015
18202
|
let tbl = res;
|
|
18016
18203
|
let m2 = meta;
|
|
18017
|
-
|
|
18018
|
-
|
|
18019
|
-
|
|
18020
|
-
|
|
18204
|
+
if (toml.charCodeAt(0) === 65279)
|
|
18205
|
+
ctx.p++;
|
|
18206
|
+
skipVoid(ctx);
|
|
18207
|
+
while (ctx.p < toml.length) {
|
|
18208
|
+
if (toml.charCodeAt(ctx.p) === 91) {
|
|
18209
|
+
let isTableArray = toml.charCodeAt(++ctx.p) === 91;
|
|
18210
|
+
tmp = ctx.p += +isTableArray;
|
|
18211
|
+
skipping = false;
|
|
18212
|
+
let k = parseKey(
|
|
18213
|
+
ctx,
|
|
18214
|
+
93
|
|
18215
|
+
/* ] */
|
|
18216
|
+
);
|
|
18021
18217
|
if (isTableArray) {
|
|
18022
|
-
if (toml
|
|
18023
|
-
|
|
18024
|
-
toml,
|
|
18025
|
-
ptr: k[1] - 1
|
|
18026
|
-
});
|
|
18218
|
+
if (toml.charCodeAt(ctx.p) !== 93) {
|
|
18219
|
+
TomlError.x("expected end of table array declaration", ctx);
|
|
18027
18220
|
}
|
|
18028
|
-
|
|
18221
|
+
ctx.p++;
|
|
18029
18222
|
}
|
|
18030
18223
|
let p = peekTable(
|
|
18031
|
-
|
|
18224
|
+
ctx,
|
|
18225
|
+
k,
|
|
18032
18226
|
res,
|
|
18033
18227
|
meta,
|
|
18034
18228
|
isTableArray ? 2 : 1
|
|
18035
18229
|
/* Type.EXPLICIT */
|
|
18036
18230
|
);
|
|
18037
18231
|
if (!p) {
|
|
18038
|
-
|
|
18039
|
-
|
|
18040
|
-
|
|
18041
|
-
|
|
18232
|
+
validateTablePeek(ctx, p, tmp);
|
|
18233
|
+
skipping = true;
|
|
18234
|
+
} else {
|
|
18235
|
+
m2 = p[2];
|
|
18236
|
+
tbl = p[1];
|
|
18042
18237
|
}
|
|
18043
|
-
m2 = p[2];
|
|
18044
|
-
tbl = p[1];
|
|
18045
|
-
ptr = k[1];
|
|
18046
18238
|
} else {
|
|
18047
|
-
|
|
18239
|
+
tmp = ctx.p;
|
|
18240
|
+
let k = parseKey(ctx);
|
|
18048
18241
|
let p = peekTable(
|
|
18049
|
-
|
|
18242
|
+
ctx,
|
|
18243
|
+
k,
|
|
18050
18244
|
tbl,
|
|
18051
18245
|
m2,
|
|
18052
18246
|
0
|
|
18053
18247
|
/* Type.DOTTED */
|
|
18054
18248
|
);
|
|
18055
|
-
if (!p)
|
|
18056
|
-
|
|
18057
|
-
|
|
18058
|
-
|
|
18059
|
-
|
|
18060
|
-
|
|
18061
|
-
let v = extractValue(toml, k[1], void 0, maxDepth, integersAsBigInt);
|
|
18062
|
-
p[1][p[0]] = v[0];
|
|
18063
|
-
ptr = v[1];
|
|
18249
|
+
if (!p && !skipping)
|
|
18250
|
+
validateTablePeek(ctx, p, tmp);
|
|
18251
|
+
skipVoid(ctx, true, true);
|
|
18252
|
+
let v = extractValue(ctx, void 0);
|
|
18253
|
+
if (p && !skipping)
|
|
18254
|
+
p[1][p[0]] = v;
|
|
18064
18255
|
}
|
|
18065
|
-
|
|
18066
|
-
if (toml
|
|
18067
|
-
|
|
18068
|
-
toml,
|
|
18069
|
-
ptr
|
|
18070
|
-
});
|
|
18256
|
+
skipVoid(ctx, true);
|
|
18257
|
+
if (ctx.p < toml.length && (tmp = toml.charCodeAt(ctx.p)) !== 10 && (tmp !== 13 || toml.charCodeAt(ctx.p + 1) !== 10)) {
|
|
18258
|
+
TomlError.x("each key-value declaration must be followed by an end-of-line", ctx);
|
|
18071
18259
|
}
|
|
18072
|
-
|
|
18260
|
+
skipVoid(ctx);
|
|
18073
18261
|
}
|
|
18074
18262
|
return res;
|
|
18075
18263
|
}
|
|
18076
18264
|
|
|
18077
18265
|
// ../../node_modules/smol-toml/dist/stringify.js
|
|
18078
18266
|
var BARE_KEY = /^[a-z0-9-_]+$/i;
|
|
18267
|
+
var HAS_WELLFORMED = !!"".isWellFormed;
|
|
18079
18268
|
function extendedTypeOf(obj) {
|
|
18080
18269
|
let type = typeof obj;
|
|
18081
18270
|
if (type === "object") {
|
|
18082
18271
|
if (Array.isArray(obj))
|
|
18083
18272
|
return "array";
|
|
18084
|
-
if (obj instanceof Date)
|
|
18273
|
+
if (typeof obj.getUTCDate === "function" && obj instanceof Date)
|
|
18085
18274
|
return "date";
|
|
18275
|
+
if (globalThis.Temporal) {
|
|
18276
|
+
if (obj.until) {
|
|
18277
|
+
if (obj instanceof Temporal.ZonedDateTime)
|
|
18278
|
+
return "temporal/tz+uc";
|
|
18279
|
+
if (obj instanceof Temporal.PlainDateTime || obj instanceof Temporal.PlainDate)
|
|
18280
|
+
return "temporal/uc";
|
|
18281
|
+
if (obj instanceof Temporal.PlainTime || obj instanceof Temporal.Instant)
|
|
18282
|
+
return "temporal";
|
|
18283
|
+
if (obj instanceof Temporal.PlainYearMonth)
|
|
18284
|
+
return "temporal/x";
|
|
18285
|
+
} else if (obj.toPlainDate && obj instanceof Temporal.PlainMonthDay || obj.negated && obj instanceof Temporal.Duration) {
|
|
18286
|
+
return "temporal/x";
|
|
18287
|
+
}
|
|
18288
|
+
}
|
|
18086
18289
|
}
|
|
18087
18290
|
return type;
|
|
18088
18291
|
}
|
|
@@ -18093,44 +18296,76 @@ function isArrayOfTables(obj) {
|
|
|
18093
18296
|
}
|
|
18094
18297
|
return obj.length != 0;
|
|
18095
18298
|
}
|
|
18299
|
+
function formatWellFormedStringUnchecked(s) {
|
|
18300
|
+
return JSON.stringify(s).replaceAll("\x7F", "\\u007f");
|
|
18301
|
+
}
|
|
18096
18302
|
function formatString(s) {
|
|
18097
|
-
return
|
|
18303
|
+
return formatWellFormedStringUnchecked(HAS_WELLFORMED ? s.toWellFormed() : s);
|
|
18098
18304
|
}
|
|
18099
|
-
function
|
|
18305
|
+
function formatKey(s) {
|
|
18306
|
+
if (BARE_KEY.test(s))
|
|
18307
|
+
return s;
|
|
18308
|
+
if (HAS_WELLFORMED && !s.isWellFormed())
|
|
18309
|
+
throw new RangeError("key contains illegal lone surrogates");
|
|
18310
|
+
return formatWellFormedStringUnchecked(s);
|
|
18311
|
+
}
|
|
18312
|
+
function stringifyValue(val, type, depth, numberAsFloat, strictTemporal) {
|
|
18100
18313
|
if (depth === 0) {
|
|
18101
18314
|
throw new Error("Could not stringify the object: maximum object depth exceeded");
|
|
18102
18315
|
}
|
|
18103
|
-
|
|
18104
|
-
|
|
18105
|
-
|
|
18106
|
-
|
|
18107
|
-
|
|
18108
|
-
|
|
18109
|
-
|
|
18110
|
-
|
|
18111
|
-
|
|
18112
|
-
|
|
18113
|
-
|
|
18114
|
-
|
|
18115
|
-
|
|
18116
|
-
|
|
18117
|
-
|
|
18118
|
-
|
|
18119
|
-
|
|
18120
|
-
|
|
18121
|
-
|
|
18122
|
-
|
|
18123
|
-
|
|
18124
|
-
|
|
18125
|
-
|
|
18126
|
-
|
|
18127
|
-
|
|
18128
|
-
|
|
18129
|
-
|
|
18130
|
-
|
|
18316
|
+
switch (type) {
|
|
18317
|
+
// @ts-expect-error -- intentional fallthrough case
|
|
18318
|
+
case "number":
|
|
18319
|
+
if (isNaN(val))
|
|
18320
|
+
return "nan";
|
|
18321
|
+
if (val === Infinity)
|
|
18322
|
+
return "inf";
|
|
18323
|
+
if (val === -Infinity)
|
|
18324
|
+
return "-inf";
|
|
18325
|
+
if (Number.isInteger(val) && (numberAsFloat || !Number.isSafeInteger(val)))
|
|
18326
|
+
return val.toFixed(1);
|
|
18327
|
+
case "bigint":
|
|
18328
|
+
case "boolean":
|
|
18329
|
+
case "temporal":
|
|
18330
|
+
return val.toString();
|
|
18331
|
+
case "string":
|
|
18332
|
+
return formatString(val);
|
|
18333
|
+
case "date":
|
|
18334
|
+
if (isNaN(val.getTime()))
|
|
18335
|
+
throw new TypeError("cannot serialize invalid date");
|
|
18336
|
+
return val.toISOString();
|
|
18337
|
+
case "object":
|
|
18338
|
+
return stringifyInlineTable(val, depth, numberAsFloat, strictTemporal);
|
|
18339
|
+
case "array":
|
|
18340
|
+
return stringifyArray(val, depth, numberAsFloat, strictTemporal);
|
|
18341
|
+
// @ts-expect-error -- intentional fallthrough case
|
|
18342
|
+
case "temporal/tz+uc":
|
|
18343
|
+
if (strictTemporal) {
|
|
18344
|
+
let tz = val.timeZoneId;
|
|
18345
|
+
let tzc = tz.charCodeAt(0);
|
|
18346
|
+
if (
|
|
18347
|
+
// Classic offset
|
|
18348
|
+
tzc !== 43 && tzc !== 45 && // Fast pre-check pass; see below for the actually accepted values
|
|
18349
|
+
(tzc !== 85 && tzc !== 71 && tzc !== 90 && tzc !== 69 || // UTC and its aliases; Temporal implementations don't all canonicalise unfortunately
|
|
18350
|
+
tz !== "UTC" && tz !== "UCT" && tz !== "Universal" && tz !== "Zulu" && // GMT is a TZ but it's for all intents and purposes equivalent to UTC. Safe to downgrade.
|
|
18351
|
+
!tz.startsWith("GMT") && tz !== "Greenwich" && // Etc/* are all safe to downgrade to offset (either UTC, GMT, or offset)
|
|
18352
|
+
!tz.startsWith("Etc/"))
|
|
18353
|
+
) {
|
|
18354
|
+
throw new TypeError("Temporal objects with an IANA timezone are not allowed in Temporal strict mode");
|
|
18355
|
+
}
|
|
18356
|
+
}
|
|
18357
|
+
case "temporal/uc":
|
|
18358
|
+
if (strictTemporal && val.calendarId !== "iso8601")
|
|
18359
|
+
throw new TypeError("Temporal objects with a non-default calendar are not allowed in Temporal strict mode");
|
|
18360
|
+
return val.toString({
|
|
18361
|
+
calendarName: "never",
|
|
18362
|
+
timeZoneName: "never"
|
|
18363
|
+
});
|
|
18364
|
+
case "temporal/x":
|
|
18365
|
+
throw new TypeError("Unsupported " + val[Symbol.toStringTag]);
|
|
18131
18366
|
}
|
|
18132
18367
|
}
|
|
18133
|
-
function stringifyInlineTable(obj, depth, numberAsFloat) {
|
|
18368
|
+
function stringifyInlineTable(obj, depth, numberAsFloat, strictTemporal) {
|
|
18134
18369
|
let keys = Object.keys(obj);
|
|
18135
18370
|
if (keys.length === 0)
|
|
18136
18371
|
return "{}";
|
|
@@ -18139,13 +18374,11 @@ function stringifyInlineTable(obj, depth, numberAsFloat) {
|
|
|
18139
18374
|
let k = keys[i2];
|
|
18140
18375
|
if (i2)
|
|
18141
18376
|
res += ", ";
|
|
18142
|
-
res +=
|
|
18143
|
-
res += " = ";
|
|
18144
|
-
res += stringifyValue(obj[k], extendedTypeOf(obj[k]), depth - 1, numberAsFloat);
|
|
18377
|
+
res += formatKey(k) + " = " + stringifyValue(obj[k], extendedTypeOf(obj[k]), depth - 1, numberAsFloat, strictTemporal);
|
|
18145
18378
|
}
|
|
18146
18379
|
return res + " }";
|
|
18147
18380
|
}
|
|
18148
|
-
function stringifyArray(array, depth, numberAsFloat) {
|
|
18381
|
+
function stringifyArray(array, depth, numberAsFloat, strictTemporal) {
|
|
18149
18382
|
if (array.length === 0)
|
|
18150
18383
|
return "[]";
|
|
18151
18384
|
let res = "[ ";
|
|
@@ -18155,11 +18388,11 @@ function stringifyArray(array, depth, numberAsFloat) {
|
|
|
18155
18388
|
if (array[i2] === null || array[i2] === void 0) {
|
|
18156
18389
|
throw new TypeError("arrays cannot contain null or undefined values");
|
|
18157
18390
|
}
|
|
18158
|
-
res += stringifyValue(array[i2], extendedTypeOf(array[i2]), depth - 1, numberAsFloat);
|
|
18391
|
+
res += stringifyValue(array[i2], extendedTypeOf(array[i2]), depth - 1, numberAsFloat, strictTemporal);
|
|
18159
18392
|
}
|
|
18160
18393
|
return res + " ]";
|
|
18161
18394
|
}
|
|
18162
|
-
function stringifyArrayTable(array, key, depth, numberAsFloat) {
|
|
18395
|
+
function stringifyArrayTable(array, key, depth, numberAsFloat, strictTemporal) {
|
|
18163
18396
|
if (depth === 0) {
|
|
18164
18397
|
throw new Error("Could not stringify the object: maximum object depth exceeded");
|
|
18165
18398
|
}
|
|
@@ -18167,11 +18400,11 @@ function stringifyArrayTable(array, key, depth, numberAsFloat) {
|
|
|
18167
18400
|
for (let i2 = 0; i2 < array.length; i2++) {
|
|
18168
18401
|
res += `${res && "\n"}[[${key}]]
|
|
18169
18402
|
`;
|
|
18170
|
-
res += stringifyTable(0, array[i2], key, depth, numberAsFloat);
|
|
18403
|
+
res += stringifyTable(0, array[i2], key, depth, numberAsFloat, strictTemporal);
|
|
18171
18404
|
}
|
|
18172
18405
|
return res;
|
|
18173
18406
|
}
|
|
18174
|
-
function stringifyTable(tableKey, obj, prefix, depth, numberAsFloat) {
|
|
18407
|
+
function stringifyTable(tableKey, obj, prefix, depth, numberAsFloat, strictTemporal) {
|
|
18175
18408
|
if (depth === 0) {
|
|
18176
18409
|
throw new Error("Could not stringify the object: maximum object depth exceeded");
|
|
18177
18410
|
}
|
|
@@ -18185,16 +18418,16 @@ function stringifyTable(tableKey, obj, prefix, depth, numberAsFloat) {
|
|
|
18185
18418
|
if (type === "symbol" || type === "function") {
|
|
18186
18419
|
throw new TypeError(`cannot serialize values of type '${type}'`);
|
|
18187
18420
|
}
|
|
18188
|
-
let key =
|
|
18421
|
+
let key = formatKey(k);
|
|
18189
18422
|
if (type === "array" && isArrayOfTables(obj[k])) {
|
|
18190
|
-
tables += (tables && "\n") + stringifyArrayTable(obj[k], prefix ? `${prefix}.${key}` : key, depth - 1, numberAsFloat);
|
|
18423
|
+
tables += (tables && "\n") + stringifyArrayTable(obj[k], prefix ? `${prefix}.${key}` : key, depth - 1, numberAsFloat, strictTemporal);
|
|
18191
18424
|
} else if (type === "object") {
|
|
18192
18425
|
let tblKey = prefix ? `${prefix}.${key}` : key;
|
|
18193
|
-
tables += (tables && "\n") + stringifyTable(tblKey, obj[k], tblKey, depth - 1, numberAsFloat);
|
|
18426
|
+
tables += (tables && "\n") + stringifyTable(tblKey, obj[k], tblKey, depth - 1, numberAsFloat, strictTemporal);
|
|
18194
18427
|
} else {
|
|
18195
18428
|
preamble += key;
|
|
18196
18429
|
preamble += " = ";
|
|
18197
|
-
preamble += stringifyValue(obj[k], type, depth, numberAsFloat);
|
|
18430
|
+
preamble += stringifyValue(obj[k], type, depth, numberAsFloat, strictTemporal);
|
|
18198
18431
|
preamble += "\n";
|
|
18199
18432
|
}
|
|
18200
18433
|
}
|
|
@@ -18205,18 +18438,18 @@ ${preamble}` : `[${tableKey}]`;
|
|
|
18205
18438
|
return preamble && tables ? `${preamble}
|
|
18206
18439
|
${tables}` : preamble || tables;
|
|
18207
18440
|
}
|
|
18208
|
-
function stringify(obj, { maxDepth = 1e3, numbersAsFloat = false } = {}) {
|
|
18441
|
+
function stringify(obj, { maxDepth = 1e3, numbersAsFloat = false, strictTemporal = false } = {}) {
|
|
18209
18442
|
if (extendedTypeOf(obj) !== "object") {
|
|
18210
18443
|
throw new TypeError("stringify can only be called with an object");
|
|
18211
18444
|
}
|
|
18212
|
-
let str = stringifyTable(0, obj, "", maxDepth, numbersAsFloat);
|
|
18445
|
+
let str = stringifyTable(0, obj, "", maxDepth, numbersAsFloat, strictTemporal);
|
|
18213
18446
|
if (str[str.length - 1] !== "\n")
|
|
18214
18447
|
return str + "\n";
|
|
18215
18448
|
return str;
|
|
18216
18449
|
}
|
|
18217
18450
|
|
|
18218
18451
|
// ../argent-installer/src/utils.ts
|
|
18219
|
-
var import_yaml = __toESM(
|
|
18452
|
+
var import_yaml = __toESM(require_dist2(), 1);
|
|
18220
18453
|
|
|
18221
18454
|
// ../../node_modules/jsonc-parser/lib/esm/impl/scanner.js
|
|
18222
18455
|
function createScanner(text2, ignoreTrivia = false) {
|
|
@@ -18257,15 +18490,15 @@ function createScanner(text2, ignoreTrivia = false) {
|
|
|
18257
18490
|
pos++;
|
|
18258
18491
|
} else {
|
|
18259
18492
|
pos++;
|
|
18260
|
-
while (pos < text2.length &&
|
|
18493
|
+
while (pos < text2.length && isDigit2(text2.charCodeAt(pos))) {
|
|
18261
18494
|
pos++;
|
|
18262
18495
|
}
|
|
18263
18496
|
}
|
|
18264
18497
|
if (pos < text2.length && text2.charCodeAt(pos) === 46) {
|
|
18265
18498
|
pos++;
|
|
18266
|
-
if (pos < text2.length &&
|
|
18499
|
+
if (pos < text2.length && isDigit2(text2.charCodeAt(pos))) {
|
|
18267
18500
|
pos++;
|
|
18268
|
-
while (pos < text2.length &&
|
|
18501
|
+
while (pos < text2.length && isDigit2(text2.charCodeAt(pos))) {
|
|
18269
18502
|
pos++;
|
|
18270
18503
|
}
|
|
18271
18504
|
} else {
|
|
@@ -18279,9 +18512,9 @@ function createScanner(text2, ignoreTrivia = false) {
|
|
|
18279
18512
|
if (pos < text2.length && text2.charCodeAt(pos) === 43 || text2.charCodeAt(pos) === 45) {
|
|
18280
18513
|
pos++;
|
|
18281
18514
|
}
|
|
18282
|
-
if (pos < text2.length &&
|
|
18515
|
+
if (pos < text2.length && isDigit2(text2.charCodeAt(pos))) {
|
|
18283
18516
|
pos++;
|
|
18284
|
-
while (pos < text2.length &&
|
|
18517
|
+
while (pos < text2.length && isDigit2(text2.charCodeAt(pos))) {
|
|
18285
18518
|
pos++;
|
|
18286
18519
|
}
|
|
18287
18520
|
end = pos;
|
|
@@ -18468,7 +18701,7 @@ function createScanner(text2, ignoreTrivia = false) {
|
|
|
18468
18701
|
case 45:
|
|
18469
18702
|
value += String.fromCharCode(code);
|
|
18470
18703
|
pos++;
|
|
18471
|
-
if (pos === len || !
|
|
18704
|
+
if (pos === len || !isDigit2(text2.charCodeAt(pos))) {
|
|
18472
18705
|
return token = 16;
|
|
18473
18706
|
}
|
|
18474
18707
|
// found a minus, followed by a number so
|
|
@@ -18552,7 +18785,7 @@ function isWhiteSpace(ch) {
|
|
|
18552
18785
|
function isLineBreak(ch) {
|
|
18553
18786
|
return ch === 10 || ch === 13;
|
|
18554
18787
|
}
|
|
18555
|
-
function
|
|
18788
|
+
function isDigit2(ch) {
|
|
18556
18789
|
return ch >= 48 && ch <= 57;
|
|
18557
18790
|
}
|
|
18558
18791
|
var CharacterCodes;
|
|
@@ -19152,15 +19385,15 @@ function visit(text2, visitor, options = ParseOptions.DEFAULT) {
|
|
|
19152
19385
|
}
|
|
19153
19386
|
}
|
|
19154
19387
|
}
|
|
19155
|
-
function handleError(error, skipUntilAfter = [],
|
|
19388
|
+
function handleError(error, skipUntilAfter = [], skipUntil = []) {
|
|
19156
19389
|
onError(error);
|
|
19157
|
-
if (skipUntilAfter.length +
|
|
19390
|
+
if (skipUntilAfter.length + skipUntil.length > 0) {
|
|
19158
19391
|
let token = _scanner.getToken();
|
|
19159
19392
|
while (token !== 17) {
|
|
19160
19393
|
if (skipUntilAfter.indexOf(token) !== -1) {
|
|
19161
19394
|
scanNext();
|
|
19162
19395
|
break;
|
|
19163
|
-
} else if (
|
|
19396
|
+
} else if (skipUntil.indexOf(token) !== -1) {
|
|
19164
19397
|
break;
|
|
19165
19398
|
}
|
|
19166
19399
|
token = scanNext();
|
|
@@ -19220,7 +19453,7 @@ function visit(text2, visitor, options = ParseOptions.DEFAULT) {
|
|
|
19220
19453
|
if (_scanner.getToken() === 6) {
|
|
19221
19454
|
onSeparator(":");
|
|
19222
19455
|
scanNext();
|
|
19223
|
-
if (!
|
|
19456
|
+
if (!parseValue()) {
|
|
19224
19457
|
handleError(4, [], [
|
|
19225
19458
|
2,
|
|
19226
19459
|
5
|
|
@@ -19298,7 +19531,7 @@ function visit(text2, visitor, options = ParseOptions.DEFAULT) {
|
|
|
19298
19531
|
} else {
|
|
19299
19532
|
_jsonPath[_jsonPath.length - 1]++;
|
|
19300
19533
|
}
|
|
19301
|
-
if (!
|
|
19534
|
+
if (!parseValue()) {
|
|
19302
19535
|
handleError(4, [], [
|
|
19303
19536
|
4,
|
|
19304
19537
|
5
|
|
@@ -19321,7 +19554,7 @@ function visit(text2, visitor, options = ParseOptions.DEFAULT) {
|
|
|
19321
19554
|
}
|
|
19322
19555
|
return true;
|
|
19323
19556
|
}
|
|
19324
|
-
function
|
|
19557
|
+
function parseValue() {
|
|
19325
19558
|
switch (_scanner.getToken()) {
|
|
19326
19559
|
case 3:
|
|
19327
19560
|
return parseArray2();
|
|
@@ -19341,7 +19574,7 @@ function visit(text2, visitor, options = ParseOptions.DEFAULT) {
|
|
|
19341
19574
|
handleError(4, [], []);
|
|
19342
19575
|
return false;
|
|
19343
19576
|
}
|
|
19344
|
-
if (!
|
|
19577
|
+
if (!parseValue()) {
|
|
19345
19578
|
handleError(4, [], []);
|
|
19346
19579
|
return false;
|
|
19347
19580
|
}
|
|
@@ -19570,10 +19803,10 @@ function modify(text2, path26, value, options) {
|
|
|
19570
19803
|
return setProperty(text2, path26, value, options);
|
|
19571
19804
|
}
|
|
19572
19805
|
function applyEdits(text2, edits) {
|
|
19573
|
-
let sortedEdits = edits.slice(0).sort((
|
|
19574
|
-
const diff =
|
|
19806
|
+
let sortedEdits = edits.slice(0).sort((a2, b) => {
|
|
19807
|
+
const diff = a2.offset - b.offset;
|
|
19575
19808
|
if (diff === 0) {
|
|
19576
|
-
return
|
|
19809
|
+
return a2.length - b.length;
|
|
19577
19810
|
}
|
|
19578
19811
|
return diff;
|
|
19579
19812
|
});
|
|
@@ -19607,7 +19840,7 @@ function resolvePackageRoot(dirname18) {
|
|
|
19607
19840
|
import * as fs11 from "node:fs";
|
|
19608
19841
|
import * as path12 from "node:path";
|
|
19609
19842
|
function formatShellCommand(cmd) {
|
|
19610
|
-
const parts = [cmd.bin, ...cmd.args.map((
|
|
19843
|
+
const parts = [cmd.bin, ...cmd.args.map((a2) => a2.includes(" ") ? `"${a2}"` : a2)];
|
|
19611
19844
|
return parts.join(" ");
|
|
19612
19845
|
}
|
|
19613
19846
|
function shellQuotePath(dir) {
|
|
@@ -19938,52 +20171,6 @@ function resolveInstallModeFromFlags(opts) {
|
|
|
19938
20171
|
return null;
|
|
19939
20172
|
}
|
|
19940
20173
|
|
|
19941
|
-
// ../argent-installer/src/install-targets.ts
|
|
19942
|
-
function parseTargetFlags(args) {
|
|
19943
|
-
return { global: args.includes("--global"), local: args.includes("--local") };
|
|
19944
|
-
}
|
|
19945
|
-
function decideInstallTargets(ctx) {
|
|
19946
|
-
const { flags } = ctx;
|
|
19947
|
-
if (flags.global || flags.local) {
|
|
19948
|
-
const targets = [];
|
|
19949
|
-
if (flags.global) targets.push("global");
|
|
19950
|
-
if (flags.local) targets.push("local");
|
|
19951
|
-
return { kind: "targets", targets, reason: "flags" };
|
|
19952
|
-
}
|
|
19953
|
-
if (ctx.globalPresent && ctx.localPresent) {
|
|
19954
|
-
if (ctx.nonInteractive) {
|
|
19955
|
-
return {
|
|
19956
|
-
kind: "targets",
|
|
19957
|
-
targets: ctx.nonInteractiveBothDefault,
|
|
19958
|
-
reason: "noninteractive-both"
|
|
19959
|
-
};
|
|
19960
|
-
}
|
|
19961
|
-
return { kind: "prompt" };
|
|
19962
|
-
}
|
|
19963
|
-
return { kind: "targets", targets: [ctx.defaultTarget], reason: "single" };
|
|
19964
|
-
}
|
|
19965
|
-
async function promptInstallTargets(verb) {
|
|
19966
|
-
const selected = await multiselect({
|
|
19967
|
-
message: `argent is installed both globally and in this project. Which should ${verb === "update" ? "update" : "removal"} affect?`,
|
|
19968
|
-
options: [
|
|
19969
|
-
{
|
|
19970
|
-
value: "global",
|
|
19971
|
-
label: "Global install",
|
|
19972
|
-
hint: "the argent command on your PATH"
|
|
19973
|
-
},
|
|
19974
|
-
{
|
|
19975
|
-
value: "local",
|
|
19976
|
-
label: "This project's devDependency",
|
|
19977
|
-
hint: `${PACKAGE_NAME} in this project's node_modules`
|
|
19978
|
-
}
|
|
19979
|
-
],
|
|
19980
|
-
initialValues: verb === "update" ? ["global", "local"] : ["local"],
|
|
19981
|
-
required: true
|
|
19982
|
-
});
|
|
19983
|
-
if (isCancel(selected)) return "cancel";
|
|
19984
|
-
return selected;
|
|
19985
|
-
}
|
|
19986
|
-
|
|
19987
20174
|
// ../argent-installer/src/utils.ts
|
|
19988
20175
|
var PACKAGE_ROOT = resolvePackageRoot(import.meta.dirname);
|
|
19989
20176
|
function resolveBundledDir(dirName) {
|
|
@@ -20273,7 +20460,7 @@ async function isOnline(timeoutMs = PROBE_TIMEOUT_MS) {
|
|
|
20273
20460
|
}
|
|
20274
20461
|
|
|
20275
20462
|
// ../argent-installer/src/mcp-configs.ts
|
|
20276
|
-
var import_yaml2 = __toESM(
|
|
20463
|
+
var import_yaml2 = __toESM(require_dist2(), 1);
|
|
20277
20464
|
|
|
20278
20465
|
// ../argent-installer/node_modules/escape-string-regexp/index.js
|
|
20279
20466
|
function escapeStringRegexp(string) {
|
|
@@ -20349,7 +20536,7 @@ function normalizeServerEntry(raw) {
|
|
|
20349
20536
|
return { command, args, ...env ? { env } : {} };
|
|
20350
20537
|
}
|
|
20351
20538
|
if (typeof raw.command === "string") {
|
|
20352
|
-
const args = Array.isArray(raw.args) ? raw.args.filter((
|
|
20539
|
+
const args = Array.isArray(raw.args) ? raw.args.filter((a2) => typeof a2 === "string") : [];
|
|
20353
20540
|
return { command: raw.command, args, ...env ? { env } : {} };
|
|
20354
20541
|
}
|
|
20355
20542
|
}
|
|
@@ -21386,7 +21573,7 @@ var ALL_ADAPTERS = [
|
|
|
21386
21573
|
kiroAdapter
|
|
21387
21574
|
];
|
|
21388
21575
|
function detectAdapters() {
|
|
21389
|
-
return ALL_ADAPTERS.filter((
|
|
21576
|
+
return ALL_ADAPTERS.filter((a2) => a2.detect());
|
|
21390
21577
|
}
|
|
21391
21578
|
function findConfiguredAdapterScopes(adapters, projectRoot) {
|
|
21392
21579
|
const results = [];
|
|
@@ -21509,6 +21696,11 @@ function getManagedContentTargets(adapters, root, scope) {
|
|
|
21509
21696
|
addManagedTarget(targets.agentTargets, adapter.name, path17.join(base, "agents"), root);
|
|
21510
21697
|
break;
|
|
21511
21698
|
}
|
|
21699
|
+
case "Kiro": {
|
|
21700
|
+
const kiroBase = scope === "global" ? path17.join(homedir4(), ".kiro") : path17.join(root, ".kiro");
|
|
21701
|
+
addManagedTarget(targets.skillTargets, adapter.name, path17.join(kiroBase, "skills"), root);
|
|
21702
|
+
break;
|
|
21703
|
+
}
|
|
21512
21704
|
}
|
|
21513
21705
|
}
|
|
21514
21706
|
return targets;
|
|
@@ -22335,43 +22527,43 @@ function previouslyConfiguredAdapters(eligible, installMode) {
|
|
|
22335
22527
|
const wantedScope = installMode === "local" ? "project" : "global";
|
|
22336
22528
|
const scopes = findConfiguredAdapterScopes(eligible, process.cwd());
|
|
22337
22529
|
const configured = new Set(scopes.filter((s) => s.scope === wantedScope).map((s) => s.adapter));
|
|
22338
|
-
return eligible.filter((
|
|
22530
|
+
return eligible.filter((a2) => configured.has(a2));
|
|
22339
22531
|
}
|
|
22340
22532
|
async function chooseAdapters(opts) {
|
|
22341
22533
|
let eligible = ALL_ADAPTERS;
|
|
22342
22534
|
if (opts.installMode === "local") {
|
|
22343
|
-
const globalOnly = ALL_ADAPTERS.filter((
|
|
22535
|
+
const globalOnly = ALL_ADAPTERS.filter((a2) => a2.projectPath(process.cwd()) == null);
|
|
22344
22536
|
if (globalOnly.length > 0) {
|
|
22345
|
-
eligible = ALL_ADAPTERS.filter((
|
|
22537
|
+
eligible = ALL_ADAPTERS.filter((a2) => a2.projectPath(process.cwd()) != null);
|
|
22346
22538
|
log.info(
|
|
22347
22539
|
import_picocolors4.default.dim(
|
|
22348
|
-
`Local mode configures project files only \u2014 ${globalOnly.map((
|
|
22540
|
+
`Local mode configures project files only \u2014 ${globalOnly.map((a2) => a2.name).join(", ")} (global-only config) not offered.`
|
|
22349
22541
|
)
|
|
22350
22542
|
);
|
|
22351
22543
|
}
|
|
22352
22544
|
}
|
|
22353
|
-
const detected = detectAdapters().filter((
|
|
22354
|
-
const detectedNames = detected.map((
|
|
22545
|
+
const detected = detectAdapters().filter((a2) => eligible.includes(a2));
|
|
22546
|
+
const detectedNames = detected.map((a2) => a2.name);
|
|
22355
22547
|
const previouslyConfigured = previouslyConfiguredAdapters(eligible, opts.installMode);
|
|
22356
|
-
const previouslyConfiguredNames = previouslyConfigured.map((
|
|
22357
|
-
const preselected = [...detected, ...previouslyConfigured.filter((
|
|
22548
|
+
const previouslyConfiguredNames = previouslyConfigured.map((a2) => a2.name);
|
|
22549
|
+
const preselected = [...detected, ...previouslyConfigured.filter((a2) => !detected.includes(a2))];
|
|
22358
22550
|
if (opts.nonInteractive) {
|
|
22359
22551
|
return { selected: preselected.length > 0 ? preselected : eligible, detected };
|
|
22360
22552
|
}
|
|
22361
|
-
const choices = eligible.map((
|
|
22553
|
+
const choices = eligible.map((a2) => {
|
|
22362
22554
|
const parts = [];
|
|
22363
|
-
if (detectedNames.includes(
|
|
22364
|
-
else if (previouslyConfiguredNames.includes(
|
|
22365
|
-
const hasProject =
|
|
22366
|
-
const hasGlobal =
|
|
22555
|
+
if (detectedNames.includes(a2.name)) parts.push("detected");
|
|
22556
|
+
else if (previouslyConfiguredNames.includes(a2.name)) parts.push("already configured");
|
|
22557
|
+
const hasProject = a2.projectPath(process.cwd()) != null;
|
|
22558
|
+
const hasGlobal = a2.globalPath() != null;
|
|
22367
22559
|
if (!hasProject && hasGlobal) {
|
|
22368
|
-
parts.push(import_picocolors4.default.italic(import_picocolors4.default.cyan(`\u24D8 will be installed into ${
|
|
22560
|
+
parts.push(import_picocolors4.default.italic(import_picocolors4.default.cyan(`\u24D8 will be installed into ${a2.name}'s global config`)));
|
|
22369
22561
|
} else if (hasProject && !hasGlobal) {
|
|
22370
|
-
parts.push(import_picocolors4.default.italic(import_picocolors4.default.cyan(`\u24D8 will be installed into ${
|
|
22562
|
+
parts.push(import_picocolors4.default.italic(import_picocolors4.default.cyan(`\u24D8 will be installed into ${a2.name}'s project config`)));
|
|
22371
22563
|
}
|
|
22372
22564
|
return {
|
|
22373
|
-
value:
|
|
22374
|
-
label:
|
|
22565
|
+
value: a2,
|
|
22566
|
+
label: a2.name,
|
|
22375
22567
|
hint: parts.length > 0 ? parts.join(", ") : void 0
|
|
22376
22568
|
};
|
|
22377
22569
|
});
|
|
@@ -22444,12 +22636,12 @@ function writeMcpConfigs(args) {
|
|
|
22444
22636
|
let localCmdMode = null;
|
|
22445
22637
|
if (installMode === "local") {
|
|
22446
22638
|
localCmdMode = resolveLocalCommandMode(effectiveRoot);
|
|
22447
|
-
const unsupported = adapters.filter((
|
|
22639
|
+
const unsupported = adapters.filter((a2) => a2.projectPath(effectiveRoot) == null);
|
|
22448
22640
|
if (unsupported.length > 0) {
|
|
22449
22641
|
log.warn(
|
|
22450
|
-
`Skipping ${unsupported.map((
|
|
22642
|
+
`Skipping ${unsupported.map((a2) => a2.name).join(", ")} \u2014 no project-level config file (local mode commits project files only).`
|
|
22451
22643
|
);
|
|
22452
|
-
adapters = adapters.filter((
|
|
22644
|
+
adapters = adapters.filter((a2) => a2.projectPath(effectiveRoot) != null);
|
|
22453
22645
|
}
|
|
22454
22646
|
if (adapters.length === 0) {
|
|
22455
22647
|
log.warn(
|
|
@@ -22674,8 +22866,8 @@ async function cleanupStaleMcpConfigs(args) {
|
|
|
22674
22866
|
var import_picocolors8 = __toESM(require_picocolors(), 1);
|
|
22675
22867
|
async function configureAllowlist(args) {
|
|
22676
22868
|
const { adapters, effectiveRoot, scope, nonInteractive } = args;
|
|
22677
|
-
const adaptersWithAllowlist = adapters.filter((
|
|
22678
|
-
const adaptersWithoutAllowlist = adapters.filter((
|
|
22869
|
+
const adaptersWithAllowlist = adapters.filter((a2) => a2.addAllowlist);
|
|
22870
|
+
const adaptersWithoutAllowlist = adapters.filter((a2) => !a2.addAllowlist);
|
|
22679
22871
|
let enabled = false;
|
|
22680
22872
|
if (adaptersWithAllowlist.length > 0) {
|
|
22681
22873
|
log.info(
|
|
@@ -22926,7 +23118,7 @@ async function init2(args) {
|
|
|
22926
23118
|
installMode: tel.installMode
|
|
22927
23119
|
});
|
|
22928
23120
|
tel.editorsConfiguredCount = selectedAdapters.length;
|
|
22929
|
-
log.info(`Editors: ${selectedAdapters.map((
|
|
23121
|
+
log.info(`Editors: ${selectedAdapters.map((a2) => import_picocolors10.default.cyan(a2.name)).join(", ")}`);
|
|
22930
23122
|
const { scope, customRoot } = await chooseScope({
|
|
22931
23123
|
installMode: tel.installMode,
|
|
22932
23124
|
nonInteractive: parsed.nonInteractive
|
|
@@ -22943,7 +23135,7 @@ async function init2(args) {
|
|
|
22943
23135
|
});
|
|
22944
23136
|
tel.editorsConfiguredCount = writtenAdapters.length;
|
|
22945
23137
|
track("installation:editors_select", {
|
|
22946
|
-
editors: writtenAdapters.map((
|
|
23138
|
+
editors: writtenAdapters.map((a2) => sanitizeEditorName(a2.name)),
|
|
22947
23139
|
detected_editor_count: detected.length,
|
|
22948
23140
|
scope,
|
|
22949
23141
|
install_mode: tel.installMode
|
|
@@ -23085,7 +23277,7 @@ function printSummary({
|
|
|
23085
23277
|
}) {
|
|
23086
23278
|
const summaryLines = [
|
|
23087
23279
|
`${import_picocolors10.default.green("Install mode")} ${installMode === "local" ? "local (devDependency)" : "global"}`,
|
|
23088
|
-
selectedAdapters.length > 0 ? `${import_picocolors10.default.green("MCP server")} configured for ${selectedAdapters.map((
|
|
23280
|
+
selectedAdapters.length > 0 ? `${import_picocolors10.default.green("MCP server")} configured for ${selectedAdapters.map((a2) => a2.name).join(", ")} (${scope})` : `${import_picocolors10.default.yellow("MCP server")} NOT configured \u2014 no editor config was written`,
|
|
23089
23281
|
`${import_picocolors10.default.green("Auto-approve")} ${allowlistEnabled ? "enabled" : "skipped"}`,
|
|
23090
23282
|
`${import_picocolors10.default.green("Skills")} ${skillsMethod === "manual" ? "instructions printed" : "installed"}`,
|
|
23091
23283
|
`${import_picocolors10.default.green("Rules & agents")} ${copiedRules ? "copied" : "n/a"}`
|
|
@@ -23134,8 +23326,54 @@ var import_picocolors11 = __toESM(require_picocolors(), 1);
|
|
|
23134
23326
|
var import_semver5 = __toESM(require_semver2(), 1);
|
|
23135
23327
|
import * as path24 from "node:path";
|
|
23136
23328
|
|
|
23329
|
+
// ../argent-installer/src/install-targets.ts
|
|
23330
|
+
function parseTargetFlags(args) {
|
|
23331
|
+
return { global: args.includes("--global"), local: args.includes("--local") };
|
|
23332
|
+
}
|
|
23333
|
+
function decideInstallTargets(ctx) {
|
|
23334
|
+
const { flags } = ctx;
|
|
23335
|
+
if (flags.global || flags.local) {
|
|
23336
|
+
const targets = [];
|
|
23337
|
+
if (flags.global) targets.push("global");
|
|
23338
|
+
if (flags.local) targets.push("local");
|
|
23339
|
+
return { kind: "targets", targets, reason: "flags" };
|
|
23340
|
+
}
|
|
23341
|
+
if (ctx.globalPresent && ctx.localPresent) {
|
|
23342
|
+
if (ctx.nonInteractive) {
|
|
23343
|
+
return {
|
|
23344
|
+
kind: "targets",
|
|
23345
|
+
targets: ctx.nonInteractiveBothDefault,
|
|
23346
|
+
reason: "noninteractive-both"
|
|
23347
|
+
};
|
|
23348
|
+
}
|
|
23349
|
+
return { kind: "prompt" };
|
|
23350
|
+
}
|
|
23351
|
+
return { kind: "targets", targets: [ctx.defaultTarget], reason: "single" };
|
|
23352
|
+
}
|
|
23353
|
+
async function promptInstallTargets(verb) {
|
|
23354
|
+
const selected = await multiselect({
|
|
23355
|
+
message: `argent is installed both globally and in this project. Which should ${verb === "update" ? "update" : "removal"} affect?`,
|
|
23356
|
+
options: [
|
|
23357
|
+
{
|
|
23358
|
+
value: "global",
|
|
23359
|
+
label: "Global install",
|
|
23360
|
+
hint: "the argent command on your PATH"
|
|
23361
|
+
},
|
|
23362
|
+
{
|
|
23363
|
+
value: "local",
|
|
23364
|
+
label: "This project's devDependency",
|
|
23365
|
+
hint: `${PACKAGE_NAME} in this project's node_modules`
|
|
23366
|
+
}
|
|
23367
|
+
],
|
|
23368
|
+
initialValues: verb === "update" ? ["global", "local"] : ["local"],
|
|
23369
|
+
required: true
|
|
23370
|
+
});
|
|
23371
|
+
if (isCancel(selected)) return "cancel";
|
|
23372
|
+
return selected;
|
|
23373
|
+
}
|
|
23374
|
+
|
|
23137
23375
|
// ../argent-installer/src/update-target.ts
|
|
23138
|
-
var import_update_core = __toESM(
|
|
23376
|
+
var import_update_core = __toESM(require_dist3(), 1);
|
|
23139
23377
|
async function resolveInstallableUpdateTarget(pm, current) {
|
|
23140
23378
|
const info = await (0, import_update_core.fetchRegistryInfo)(`${NPM_REGISTRY}/${PACKAGE_NAME}`);
|
|
23141
23379
|
if (info === null) return null;
|
|
@@ -23373,7 +23611,7 @@ var execFileAsync = promisify(execFile);
|
|
|
23373
23611
|
var MAX_CONTENT_BYTES = 32 * 1024 * 1024;
|
|
23374
23612
|
|
|
23375
23613
|
// ../argent-tools-client/src/flow-files.ts
|
|
23376
|
-
var import_yaml3 = __toESM(
|
|
23614
|
+
var import_yaml3 = __toESM(require_dist2(), 1);
|
|
23377
23615
|
import { readdir as readdir4, readFile as readFile4, realpath as realpath3, stat as stat3 } from "node:fs/promises";
|
|
23378
23616
|
import * as path22 from "node:path";
|
|
23379
23617
|
var INLINE_MEMBERS_BYTES = 256 * 1024;
|
|
@@ -23923,7 +24161,7 @@ async function update(args) {
|
|
|
23923
24161
|
|
|
23924
24162
|
// ../argent-installer/src/uninstall.ts
|
|
23925
24163
|
var import_picocolors12 = __toESM(require_picocolors(), 1);
|
|
23926
|
-
var import_yaml4 = __toESM(
|
|
24164
|
+
var import_yaml4 = __toESM(require_dist2(), 1);
|
|
23927
24165
|
import * as fs19 from "node:fs";
|
|
23928
24166
|
import * as path25 from "node:path";
|
|
23929
24167
|
var UNINSTALL_TOOLSERVER_STOP_FAILED = {
|
|
@@ -23990,7 +24228,7 @@ function removeBundledContent(sourceDir, targetDir) {
|
|
|
23990
24228
|
}
|
|
23991
24229
|
}
|
|
23992
24230
|
directories.sort(
|
|
23993
|
-
(
|
|
24231
|
+
(a2, b) => b.split(path25.sep).length - a2.split(path25.sep).length || b.length - a2.length
|
|
23994
24232
|
);
|
|
23995
24233
|
for (const relativePath of directories) {
|
|
23996
24234
|
const targetPath = path25.join(targetDir, relativePath);
|
|
@@ -24452,11 +24690,11 @@ export {
|
|
|
24452
24690
|
};
|
|
24453
24691
|
/*! Bundled license information:
|
|
24454
24692
|
|
|
24455
|
-
smol-toml/dist/date.js:
|
|
24456
24693
|
smol-toml/dist/error.js:
|
|
24457
24694
|
smol-toml/dist/primitive.js:
|
|
24458
|
-
smol-toml/dist/
|
|
24695
|
+
smol-toml/dist/date.js:
|
|
24459
24696
|
smol-toml/dist/extract.js:
|
|
24697
|
+
smol-toml/dist/util.js:
|
|
24460
24698
|
smol-toml/dist/struct.js:
|
|
24461
24699
|
smol-toml/dist/parse.js:
|
|
24462
24700
|
smol-toml/dist/stringify.js:
|