nitro-nightly 3.0.1-20260106-122901-e9c3a660 → 3.0.1-20260106-130706-e20c92d9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_build/rolldown.mjs +7 -9
- package/dist/_build/rollup.mjs +7 -9
- package/dist/_build/shared.mjs +1 -1
- package/dist/_build/shared3.mjs +1 -1
- package/dist/_build/shared4.mjs +10 -8
- package/dist/_build/vite.build.mjs +4 -6
- package/dist/_build/vite.plugin.mjs +5 -5
- package/dist/_dev.mjs +2 -2
- package/dist/_libs/@hiogawa/vite-plugin-fullstack.mjs +1 -1
- package/dist/_libs/@rollup/plugin-commonjs.mjs +2031 -2031
- package/dist/_libs/@rollup/plugin-inject.mjs +1 -1
- package/dist/_libs/@rollup/plugin-node-resolve.mjs +1 -1
- package/dist/_libs/@rollup/plugin-replace.mjs +1 -1
- package/dist/_libs/c12.mjs +1114 -1114
- package/dist/_libs/chokidar.mjs +2 -2
- package/dist/_libs/confbox.mjs +730 -730
- package/dist/_libs/giget.mjs +22 -22
- package/dist/_libs/local-pkg.mjs +5 -5
- package/dist/_libs/tinyglobby.mjs +1 -1
- package/dist/_libs/tsconfck.mjs +1 -1
- package/dist/_libs/unimport.mjs +209 -200
- package/dist/_libs/unwasm.mjs +2 -2
- package/dist/_nitro.mjs +5 -6
- package/dist/_nitro2.mjs +5 -6
- package/dist/_presets.mjs +7 -7
- package/dist/builder.mjs +4 -4
- package/dist/vite.mjs +4 -6
- package/package.json +1 -1
package/dist/_libs/c12.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { i as __toESM, n as __exportAll, r as __require, t as __commonJSMin } from "../_rolldown.mjs";
|
|
2
|
-
import path, { isAbsolute, resolve } from "node:path";
|
|
3
|
-
import process$1 from "node:process";
|
|
4
2
|
import fs, { existsSync, lstatSync, promises, readFileSync, realpathSync, statSync } from "node:fs";
|
|
3
|
+
import { readFile, rm, writeFile } from "node:fs/promises";
|
|
5
4
|
import { URL as URL$1, fileURLToPath, pathToFileURL } from "node:url";
|
|
5
|
+
import { homedir } from "node:os";
|
|
6
|
+
import path, { isAbsolute, resolve } from "node:path";
|
|
6
7
|
import assert from "node:assert";
|
|
8
|
+
import process$1 from "node:process";
|
|
7
9
|
import v8 from "node:v8";
|
|
8
10
|
import { format, inspect } from "node:util";
|
|
9
|
-
import { readFile, rm, writeFile } from "node:fs/promises";
|
|
10
|
-
import { homedir } from "node:os";
|
|
11
11
|
import { createJiti } from "jiti";
|
|
12
12
|
import destr from "destr";
|
|
13
13
|
import { defu } from "defu";
|
|
@@ -175,605 +175,346 @@ const parse$1 = function(p) {
|
|
|
175
175
|
};
|
|
176
176
|
|
|
177
177
|
//#endregion
|
|
178
|
-
//#region node_modules/.pnpm/
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
end: v.exec(e)?.[0] || ""
|
|
238
|
-
}
|
|
239
|
-
};
|
|
240
|
-
}
|
|
241
|
-
function N$1(e, t, n) {
|
|
242
|
-
!t || typeof t != "object" || Object.defineProperty(t, m, {
|
|
243
|
-
enumerable: !1,
|
|
244
|
-
configurable: !0,
|
|
245
|
-
writable: !0,
|
|
246
|
-
value: x$2(e, n)
|
|
247
|
-
});
|
|
248
|
-
}
|
|
249
|
-
function C(e, t) {
|
|
250
|
-
if (!e || typeof e != "object" || !(m in e)) return {
|
|
251
|
-
indent: t?.indent ?? 2,
|
|
252
|
-
whitespace: {
|
|
253
|
-
start: "",
|
|
254
|
-
end: ""
|
|
255
|
-
}
|
|
256
|
-
};
|
|
257
|
-
const n = e[m];
|
|
258
|
-
return {
|
|
259
|
-
indent: t?.indent || _(n.sample || "").indent,
|
|
260
|
-
whitespace: n.whiteSpace || {
|
|
261
|
-
start: "",
|
|
262
|
-
end: ""
|
|
263
|
-
}
|
|
178
|
+
//#region node_modules/.pnpm/dotenv@17.2.3/node_modules/dotenv/package.json
|
|
179
|
+
var require_package = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
180
|
+
module.exports = {
|
|
181
|
+
"name": "dotenv",
|
|
182
|
+
"version": "17.2.3",
|
|
183
|
+
"description": "Loads environment variables from .env file",
|
|
184
|
+
"main": "lib/main.js",
|
|
185
|
+
"types": "lib/main.d.ts",
|
|
186
|
+
"exports": {
|
|
187
|
+
".": {
|
|
188
|
+
"types": "./lib/main.d.ts",
|
|
189
|
+
"require": "./lib/main.js",
|
|
190
|
+
"default": "./lib/main.js"
|
|
191
|
+
},
|
|
192
|
+
"./config": "./config.js",
|
|
193
|
+
"./config.js": "./config.js",
|
|
194
|
+
"./lib/env-options": "./lib/env-options.js",
|
|
195
|
+
"./lib/env-options.js": "./lib/env-options.js",
|
|
196
|
+
"./lib/cli-options": "./lib/cli-options.js",
|
|
197
|
+
"./lib/cli-options.js": "./lib/cli-options.js",
|
|
198
|
+
"./package.json": "./package.json"
|
|
199
|
+
},
|
|
200
|
+
"scripts": {
|
|
201
|
+
"dts-check": "tsc --project tests/types/tsconfig.json",
|
|
202
|
+
"lint": "standard",
|
|
203
|
+
"pretest": "npm run lint && npm run dts-check",
|
|
204
|
+
"test": "tap run tests/**/*.js --allow-empty-coverage --disable-coverage --timeout=60000",
|
|
205
|
+
"test:coverage": "tap run tests/**/*.js --show-full-coverage --timeout=60000 --coverage-report=text --coverage-report=lcov",
|
|
206
|
+
"prerelease": "npm test",
|
|
207
|
+
"release": "standard-version"
|
|
208
|
+
},
|
|
209
|
+
"repository": {
|
|
210
|
+
"type": "git",
|
|
211
|
+
"url": "git://github.com/motdotla/dotenv.git"
|
|
212
|
+
},
|
|
213
|
+
"homepage": "https://github.com/motdotla/dotenv#readme",
|
|
214
|
+
"funding": "https://dotenvx.com",
|
|
215
|
+
"keywords": [
|
|
216
|
+
"dotenv",
|
|
217
|
+
"env",
|
|
218
|
+
".env",
|
|
219
|
+
"environment",
|
|
220
|
+
"variables",
|
|
221
|
+
"config",
|
|
222
|
+
"settings"
|
|
223
|
+
],
|
|
224
|
+
"readmeFilename": "README.md",
|
|
225
|
+
"license": "BSD-2-Clause",
|
|
226
|
+
"devDependencies": {
|
|
227
|
+
"@types/node": "^18.11.3",
|
|
228
|
+
"decache": "^4.6.2",
|
|
229
|
+
"sinon": "^14.0.1",
|
|
230
|
+
"standard": "^17.0.0",
|
|
231
|
+
"standard-version": "^9.5.0",
|
|
232
|
+
"tap": "^19.2.0",
|
|
233
|
+
"typescript": "^4.8.4"
|
|
234
|
+
},
|
|
235
|
+
"engines": { "node": ">=12" },
|
|
236
|
+
"browser": { "fs": false }
|
|
264
237
|
};
|
|
265
|
-
}
|
|
238
|
+
}));
|
|
266
239
|
|
|
267
240
|
//#endregion
|
|
268
|
-
//#region node_modules/.pnpm/
|
|
269
|
-
|
|
270
|
-
const
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
241
|
+
//#region node_modules/.pnpm/dotenv@17.2.3/node_modules/dotenv/lib/main.js
|
|
242
|
+
var require_main = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
243
|
+
const fs$1 = __require("fs");
|
|
244
|
+
const path$1 = __require("path");
|
|
245
|
+
const os$1 = __require("os");
|
|
246
|
+
const crypto = __require("crypto");
|
|
247
|
+
const version = require_package().version;
|
|
248
|
+
const TIPS = [
|
|
249
|
+
"🔐 encrypt with Dotenvx: https://dotenvx.com",
|
|
250
|
+
"🔐 prevent committing .env to code: https://dotenvx.com/precommit",
|
|
251
|
+
"🔐 prevent building .env in docker: https://dotenvx.com/prebuild",
|
|
252
|
+
"📡 add observability to secrets: https://dotenvx.com/ops",
|
|
253
|
+
"👥 sync secrets across teammates & machines: https://dotenvx.com/ops",
|
|
254
|
+
"🗂️ backup and recover secrets: https://dotenvx.com/ops",
|
|
255
|
+
"✅ audit secrets and track compliance: https://dotenvx.com/ops",
|
|
256
|
+
"🔄 add secrets lifecycle management: https://dotenvx.com/ops",
|
|
257
|
+
"🔑 add access controls to secrets: https://dotenvx.com/ops",
|
|
258
|
+
"🛠️ run anywhere with `dotenvx run -- yourcommand`",
|
|
259
|
+
"⚙️ specify custom .env file path with { path: '/custom/path/.env' }",
|
|
260
|
+
"⚙️ enable debug logging with { debug: true }",
|
|
261
|
+
"⚙️ override existing env vars with { override: true }",
|
|
262
|
+
"⚙️ suppress all logs with { quiet: true }",
|
|
263
|
+
"⚙️ write to custom object with { processEnv: myObject }",
|
|
264
|
+
"⚙️ load multiple .env files with { path: ['.env.local', '.env'] }"
|
|
265
|
+
];
|
|
266
|
+
function _getRandomTip() {
|
|
267
|
+
return TIPS[Math.floor(Math.random() * TIPS.length)];
|
|
283
268
|
}
|
|
284
|
-
function
|
|
285
|
-
|
|
269
|
+
function parseBoolean(value) {
|
|
270
|
+
if (typeof value === "string") return ![
|
|
271
|
+
"false",
|
|
272
|
+
"0",
|
|
273
|
+
"no",
|
|
274
|
+
"off",
|
|
275
|
+
""
|
|
276
|
+
].includes(value.toLowerCase());
|
|
277
|
+
return Boolean(value);
|
|
286
278
|
}
|
|
287
|
-
function
|
|
288
|
-
|
|
289
|
-
if (n.charCodeAt(e) === 48) e++;
|
|
290
|
-
else for (e++; e < n.length && L(n.charCodeAt(e));) e++;
|
|
291
|
-
if (e < n.length && n.charCodeAt(e) === 46) if (e++, e < n.length && L(n.charCodeAt(e))) for (e++; e < n.length && L(n.charCodeAt(e));) e++;
|
|
292
|
-
else return b$1 = 3, n.substring(i, e);
|
|
293
|
-
let T$1 = e;
|
|
294
|
-
if (e < n.length && (n.charCodeAt(e) === 69 || n.charCodeAt(e) === 101)) if (e++, (e < n.length && n.charCodeAt(e) === 43 || n.charCodeAt(e) === 45) && e++, e < n.length && L(n.charCodeAt(e))) {
|
|
295
|
-
for (e++; e < n.length && L(n.charCodeAt(e));) e++;
|
|
296
|
-
T$1 = e;
|
|
297
|
-
} else b$1 = 3;
|
|
298
|
-
return n.substring(i, T$1);
|
|
279
|
+
function supportsAnsi() {
|
|
280
|
+
return process.stdout.isTTY;
|
|
299
281
|
}
|
|
300
|
-
function
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
282
|
+
function dim(text) {
|
|
283
|
+
return supportsAnsi() ? `\x1b[2m${text}\x1b[0m` : text;
|
|
284
|
+
}
|
|
285
|
+
const LINE = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/gm;
|
|
286
|
+
function parse(src) {
|
|
287
|
+
const obj = {};
|
|
288
|
+
let lines = src.toString();
|
|
289
|
+
lines = lines.replace(/\r\n?/gm, "\n");
|
|
290
|
+
let match;
|
|
291
|
+
while ((match = LINE.exec(lines)) != null) {
|
|
292
|
+
const key = match[1];
|
|
293
|
+
let value = match[2] || "";
|
|
294
|
+
value = value.trim();
|
|
295
|
+
const maybeQuote = value[0];
|
|
296
|
+
value = value.replace(/^(['"`])([\s\S]*)\1$/gm, "$2");
|
|
297
|
+
if (maybeQuote === "\"") {
|
|
298
|
+
value = value.replace(/\\n/g, "\n");
|
|
299
|
+
value = value.replace(/\\r/g, "\r");
|
|
311
300
|
}
|
|
312
|
-
|
|
313
|
-
if (i += n.substring(T$1, e), e++, e >= g$1) {
|
|
314
|
-
b$1 = 2;
|
|
315
|
-
break;
|
|
316
|
-
}
|
|
317
|
-
switch (n.charCodeAt(e++)) {
|
|
318
|
-
case 34:
|
|
319
|
-
i += "\"";
|
|
320
|
-
break;
|
|
321
|
-
case 92:
|
|
322
|
-
i += "\\";
|
|
323
|
-
break;
|
|
324
|
-
case 47:
|
|
325
|
-
i += "/";
|
|
326
|
-
break;
|
|
327
|
-
case 98:
|
|
328
|
-
i += "\b";
|
|
329
|
-
break;
|
|
330
|
-
case 102:
|
|
331
|
-
i += "\f";
|
|
332
|
-
break;
|
|
333
|
-
case 110:
|
|
334
|
-
i += `
|
|
335
|
-
`;
|
|
336
|
-
break;
|
|
337
|
-
case 114:
|
|
338
|
-
i += "\r";
|
|
339
|
-
break;
|
|
340
|
-
case 116:
|
|
341
|
-
i += " ";
|
|
342
|
-
break;
|
|
343
|
-
case 117:
|
|
344
|
-
const t = I$1(4);
|
|
345
|
-
t >= 0 ? i += String.fromCharCode(t) : b$1 = 4;
|
|
346
|
-
break;
|
|
347
|
-
default: b$1 = 5;
|
|
348
|
-
}
|
|
349
|
-
T$1 = e;
|
|
350
|
-
continue;
|
|
351
|
-
}
|
|
352
|
-
if (s >= 0 && s <= 31) if (r(s)) {
|
|
353
|
-
i += n.substring(T$1, e), b$1 = 2;
|
|
354
|
-
break;
|
|
355
|
-
} else b$1 = 6;
|
|
356
|
-
e++;
|
|
357
|
-
}
|
|
358
|
-
return i;
|
|
359
|
-
}
|
|
360
|
-
function w$1() {
|
|
361
|
-
if (u = "", b$1 = 0, p = e, o = A, B = O$1, e >= g$1) return p = g$1, k$1 = 17;
|
|
362
|
-
let i = n.charCodeAt(e);
|
|
363
|
-
if (J(i)) {
|
|
364
|
-
do
|
|
365
|
-
e++, u += String.fromCharCode(i), i = n.charCodeAt(e);
|
|
366
|
-
while (J(i));
|
|
367
|
-
return k$1 = 15;
|
|
368
|
-
}
|
|
369
|
-
if (r(i)) return e++, u += String.fromCharCode(i), i === 13 && n.charCodeAt(e) === 10 && (e++, u += `
|
|
370
|
-
`), A++, O$1 = e, k$1 = 14;
|
|
371
|
-
switch (i) {
|
|
372
|
-
case 123: return e++, k$1 = 1;
|
|
373
|
-
case 125: return e++, k$1 = 2;
|
|
374
|
-
case 91: return e++, k$1 = 3;
|
|
375
|
-
case 93: return e++, k$1 = 4;
|
|
376
|
-
case 58: return e++, k$1 = 6;
|
|
377
|
-
case 44: return e++, k$1 = 5;
|
|
378
|
-
case 34: return e++, u = a(), k$1 = 10;
|
|
379
|
-
case 47:
|
|
380
|
-
const T$1 = e - 1;
|
|
381
|
-
if (n.charCodeAt(e + 1) === 47) {
|
|
382
|
-
for (e += 2; e < g$1 && !r(n.charCodeAt(e));) e++;
|
|
383
|
-
return u = n.substring(T$1, e), k$1 = 12;
|
|
384
|
-
}
|
|
385
|
-
if (n.charCodeAt(e + 1) === 42) {
|
|
386
|
-
e += 2;
|
|
387
|
-
const s = g$1 - 1;
|
|
388
|
-
let c = !1;
|
|
389
|
-
for (; e < s;) {
|
|
390
|
-
const t = n.charCodeAt(e);
|
|
391
|
-
if (t === 42 && n.charCodeAt(e + 1) === 47) {
|
|
392
|
-
e += 2, c = !0;
|
|
393
|
-
break;
|
|
394
|
-
}
|
|
395
|
-
e++, r(t) && (t === 13 && n.charCodeAt(e) === 10 && e++, A++, O$1 = e);
|
|
396
|
-
}
|
|
397
|
-
return c || (e++, b$1 = 1), u = n.substring(T$1, e), k$1 = 13;
|
|
398
|
-
}
|
|
399
|
-
return u += String.fromCharCode(i), e++, k$1 = 16;
|
|
400
|
-
case 45: if (u += String.fromCharCode(i), e++, e === g$1 || !L(n.charCodeAt(e))) return k$1 = 16;
|
|
401
|
-
case 48:
|
|
402
|
-
case 49:
|
|
403
|
-
case 50:
|
|
404
|
-
case 51:
|
|
405
|
-
case 52:
|
|
406
|
-
case 53:
|
|
407
|
-
case 54:
|
|
408
|
-
case 55:
|
|
409
|
-
case 56:
|
|
410
|
-
case 57: return u += F(), k$1 = 11;
|
|
411
|
-
default:
|
|
412
|
-
for (; e < g$1 && v$1(i);) e++, i = n.charCodeAt(e);
|
|
413
|
-
if (p !== e) {
|
|
414
|
-
switch (u = n.substring(p, e), u) {
|
|
415
|
-
case "true": return k$1 = 8;
|
|
416
|
-
case "false": return k$1 = 9;
|
|
417
|
-
case "null": return k$1 = 7;
|
|
418
|
-
}
|
|
419
|
-
return k$1 = 16;
|
|
420
|
-
}
|
|
421
|
-
return u += String.fromCharCode(i), e++, k$1 = 16;
|
|
301
|
+
obj[key] = value;
|
|
422
302
|
}
|
|
303
|
+
return obj;
|
|
423
304
|
}
|
|
424
|
-
function
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
case 44:
|
|
434
|
-
case 47: return !1;
|
|
305
|
+
function _parseVault(options) {
|
|
306
|
+
options = options || {};
|
|
307
|
+
const vaultPath = _vaultPath(options);
|
|
308
|
+
options.path = vaultPath;
|
|
309
|
+
const result = DotenvModule.configDotenv(options);
|
|
310
|
+
if (!result.parsed) {
|
|
311
|
+
const err = /* @__PURE__ */ new Error(`MISSING_DATA: Cannot parse ${vaultPath} for an unknown reason`);
|
|
312
|
+
err.code = "MISSING_DATA";
|
|
313
|
+
throw err;
|
|
435
314
|
}
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
let i;
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
return {
|
|
446
|
-
setPosition: V,
|
|
447
|
-
getPosition: () => e,
|
|
448
|
-
scan: l ? j$1 : w$1,
|
|
449
|
-
getToken: () => k$1,
|
|
450
|
-
getTokenValue: () => u,
|
|
451
|
-
getTokenOffset: () => p,
|
|
452
|
-
getTokenLength: () => e - p,
|
|
453
|
-
getTokenStartLine: () => o,
|
|
454
|
-
getTokenStartCharacter: () => p - B,
|
|
455
|
-
getTokenError: () => b$1
|
|
456
|
-
};
|
|
457
|
-
}
|
|
458
|
-
function J(n) {
|
|
459
|
-
return n === 32 || n === 9;
|
|
460
|
-
}
|
|
461
|
-
function r(n) {
|
|
462
|
-
return n === 10 || n === 13;
|
|
463
|
-
}
|
|
464
|
-
function L(n) {
|
|
465
|
-
return n >= 48 && n <= 57;
|
|
466
|
-
}
|
|
467
|
-
var Q;
|
|
468
|
-
(function(n) {
|
|
469
|
-
n[n.lineFeed = 10] = "lineFeed", n[n.carriageReturn = 13] = "carriageReturn", n[n.space = 32] = "space", n[n._0 = 48] = "_0", n[n._1 = 49] = "_1", n[n._2 = 50] = "_2", n[n._3 = 51] = "_3", n[n._4 = 52] = "_4", n[n._5 = 53] = "_5", n[n._6 = 54] = "_6", n[n._7 = 55] = "_7", n[n._8 = 56] = "_8", n[n._9 = 57] = "_9", n[n.a = 97] = "a", n[n.b = 98] = "b", n[n.c = 99] = "c", n[n.d = 100] = "d", n[n.e = 101] = "e", n[n.f = 102] = "f", n[n.g = 103] = "g", n[n.h = 104] = "h", n[n.i = 105] = "i", n[n.j = 106] = "j", n[n.k = 107] = "k", n[n.l = 108] = "l", n[n.m = 109] = "m", n[n.n = 110] = "n", n[n.o = 111] = "o", n[n.p = 112] = "p", n[n.q = 113] = "q", n[n.r = 114] = "r", n[n.s = 115] = "s", n[n.t = 116] = "t", n[n.u = 117] = "u", n[n.v = 118] = "v", n[n.w = 119] = "w", n[n.x = 120] = "x", n[n.y = 121] = "y", n[n.z = 122] = "z", n[n.A = 65] = "A", n[n.B = 66] = "B", n[n.C = 67] = "C", n[n.D = 68] = "D", n[n.E = 69] = "E", n[n.F = 70] = "F", n[n.G = 71] = "G", n[n.H = 72] = "H", n[n.I = 73] = "I", n[n.J = 74] = "J", n[n.K = 75] = "K", n[n.L = 76] = "L", n[n.M = 77] = "M", n[n.N = 78] = "N", n[n.O = 79] = "O", n[n.P = 80] = "P", n[n.Q = 81] = "Q", n[n.R = 82] = "R", n[n.S = 83] = "S", n[n.T = 84] = "T", n[n.U = 85] = "U", n[n.V = 86] = "V", n[n.W = 87] = "W", n[n.X = 88] = "X", n[n.Y = 89] = "Y", n[n.Z = 90] = "Z", n[n.asterisk = 42] = "asterisk", n[n.backslash = 92] = "backslash", n[n.closeBrace = 125] = "closeBrace", n[n.closeBracket = 93] = "closeBracket", n[n.colon = 58] = "colon", n[n.comma = 44] = "comma", n[n.dot = 46] = "dot", n[n.doubleQuote = 34] = "doubleQuote", n[n.minus = 45] = "minus", n[n.openBrace = 123] = "openBrace", n[n.openBracket = 91] = "openBracket", n[n.plus = 43] = "plus", n[n.slash = 47] = "slash", n[n.formFeed = 12] = "formFeed", n[n.tab = 9] = "tab";
|
|
470
|
-
})(Q || (Q = {})), new Array(20).fill(0).map((n, l) => " ".repeat(l));
|
|
471
|
-
const N = 200;
|
|
472
|
-
new Array(N).fill(0).map((n, l) => `
|
|
473
|
-
` + " ".repeat(l)), new Array(N).fill(0).map((n, l) => "\r" + " ".repeat(l)), new Array(N).fill(0).map((n, l) => `\r
|
|
474
|
-
` + " ".repeat(l)), new Array(N).fill(0).map((n, l) => `
|
|
475
|
-
` + " ".repeat(l)), new Array(N).fill(0).map((n, l) => "\r" + " ".repeat(l)), new Array(N).fill(0).map((n, l) => `\r
|
|
476
|
-
` + " ".repeat(l));
|
|
477
|
-
var U;
|
|
478
|
-
(function(n) {
|
|
479
|
-
n.DEFAULT = { allowTrailingComma: !1 };
|
|
480
|
-
})(U || (U = {}));
|
|
481
|
-
function S$1(n, l = [], g$1 = U.DEFAULT) {
|
|
482
|
-
let e = null, u = [];
|
|
483
|
-
const p = [];
|
|
484
|
-
function k$1(o) {
|
|
485
|
-
Array.isArray(u) ? u.push(o) : e !== null && (u[e] = o);
|
|
486
|
-
}
|
|
487
|
-
return P(n, {
|
|
488
|
-
onObjectBegin: () => {
|
|
489
|
-
const o = {};
|
|
490
|
-
k$1(o), p.push(u), u = o, e = null;
|
|
491
|
-
},
|
|
492
|
-
onObjectProperty: (o) => {
|
|
493
|
-
e = o;
|
|
494
|
-
},
|
|
495
|
-
onObjectEnd: () => {
|
|
496
|
-
u = p.pop();
|
|
497
|
-
},
|
|
498
|
-
onArrayBegin: () => {
|
|
499
|
-
const o = [];
|
|
500
|
-
k$1(o), p.push(u), u = o, e = null;
|
|
501
|
-
},
|
|
502
|
-
onArrayEnd: () => {
|
|
503
|
-
u = p.pop();
|
|
504
|
-
},
|
|
505
|
-
onLiteralValue: k$1,
|
|
506
|
-
onError: (o, O$1, B) => {
|
|
507
|
-
l.push({
|
|
508
|
-
error: o,
|
|
509
|
-
offset: O$1,
|
|
510
|
-
length: B
|
|
511
|
-
});
|
|
315
|
+
const keys = _dotenvKey(options).split(",");
|
|
316
|
+
const length = keys.length;
|
|
317
|
+
let decrypted;
|
|
318
|
+
for (let i = 0; i < length; i++) try {
|
|
319
|
+
const attrs = _instructions(result, keys[i].trim());
|
|
320
|
+
decrypted = DotenvModule.decrypt(attrs.ciphertext, attrs.key);
|
|
321
|
+
break;
|
|
322
|
+
} catch (error) {
|
|
323
|
+
if (i + 1 >= length) throw error;
|
|
512
324
|
}
|
|
513
|
-
|
|
514
|
-
}
|
|
515
|
-
function P(n, l, g$1 = U.DEFAULT) {
|
|
516
|
-
const e = $(n, !1), u = [];
|
|
517
|
-
let p = 0;
|
|
518
|
-
function k$1(f) {
|
|
519
|
-
return f ? () => p === 0 && f(e.getTokenOffset(), e.getTokenLength(), e.getTokenStartLine(), e.getTokenStartCharacter()) : () => !0;
|
|
325
|
+
return DotenvModule.parse(decrypted);
|
|
520
326
|
}
|
|
521
|
-
function
|
|
522
|
-
|
|
327
|
+
function _warn(message) {
|
|
328
|
+
console.error(`[dotenv@${version}][WARN] ${message}`);
|
|
523
329
|
}
|
|
524
|
-
function
|
|
525
|
-
|
|
330
|
+
function _debug(message) {
|
|
331
|
+
console.log(`[dotenv@${version}][DEBUG] ${message}`);
|
|
526
332
|
}
|
|
527
|
-
function
|
|
528
|
-
|
|
529
|
-
p > 0 ? p++ : f(e.getTokenOffset(), e.getTokenLength(), e.getTokenStartLine(), e.getTokenStartCharacter(), () => u.slice()) === !1 && (p = 1);
|
|
530
|
-
} : () => !0;
|
|
333
|
+
function _log(message) {
|
|
334
|
+
console.log(`[dotenv@${version}] ${message}`);
|
|
531
335
|
}
|
|
532
|
-
function
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
336
|
+
function _dotenvKey(options) {
|
|
337
|
+
if (options && options.DOTENV_KEY && options.DOTENV_KEY.length > 0) return options.DOTENV_KEY;
|
|
338
|
+
if (process.env.DOTENV_KEY && process.env.DOTENV_KEY.length > 0) return process.env.DOTENV_KEY;
|
|
339
|
+
return "";
|
|
536
340
|
}
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
t(15);
|
|
547
|
-
break;
|
|
548
|
-
case 3:
|
|
549
|
-
t(13);
|
|
550
|
-
break;
|
|
551
|
-
case 1:
|
|
552
|
-
T$1 || t(11);
|
|
553
|
-
break;
|
|
554
|
-
case 2:
|
|
555
|
-
t(12);
|
|
556
|
-
break;
|
|
557
|
-
case 6:
|
|
558
|
-
t(16);
|
|
559
|
-
break;
|
|
560
|
-
}
|
|
561
|
-
switch (f) {
|
|
562
|
-
case 12:
|
|
563
|
-
case 13:
|
|
564
|
-
T$1 ? t(10) : j$1();
|
|
565
|
-
break;
|
|
566
|
-
case 16:
|
|
567
|
-
t(1);
|
|
568
|
-
break;
|
|
569
|
-
case 15:
|
|
570
|
-
case 14: break;
|
|
571
|
-
default: return f;
|
|
341
|
+
function _instructions(result, dotenvKey) {
|
|
342
|
+
let uri;
|
|
343
|
+
try {
|
|
344
|
+
uri = new URL(dotenvKey);
|
|
345
|
+
} catch (error) {
|
|
346
|
+
if (error.code === "ERR_INVALID_URL") {
|
|
347
|
+
const err = /* @__PURE__ */ new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");
|
|
348
|
+
err.code = "INVALID_DOTENV_KEY";
|
|
349
|
+
throw err;
|
|
572
350
|
}
|
|
351
|
+
throw error;
|
|
573
352
|
}
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
353
|
+
const key = uri.password;
|
|
354
|
+
if (!key) {
|
|
355
|
+
const err = /* @__PURE__ */ new Error("INVALID_DOTENV_KEY: Missing key part");
|
|
356
|
+
err.code = "INVALID_DOTENV_KEY";
|
|
357
|
+
throw err;
|
|
358
|
+
}
|
|
359
|
+
const environment = uri.searchParams.get("environment");
|
|
360
|
+
if (!environment) {
|
|
361
|
+
const err = /* @__PURE__ */ new Error("INVALID_DOTENV_KEY: Missing environment part");
|
|
362
|
+
err.code = "INVALID_DOTENV_KEY";
|
|
363
|
+
throw err;
|
|
364
|
+
}
|
|
365
|
+
const environmentKey = `DOTENV_VAULT_${environment.toUpperCase()}`;
|
|
366
|
+
const ciphertext = result.parsed[environmentKey];
|
|
367
|
+
if (!ciphertext) {
|
|
368
|
+
const err = /* @__PURE__ */ new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${environmentKey} in your .env.vault file.`);
|
|
369
|
+
err.code = "NOT_FOUND_DOTENV_ENVIRONMENT";
|
|
370
|
+
throw err;
|
|
585
371
|
}
|
|
372
|
+
return {
|
|
373
|
+
ciphertext,
|
|
374
|
+
key
|
|
375
|
+
};
|
|
586
376
|
}
|
|
587
|
-
function
|
|
588
|
-
|
|
589
|
-
|
|
377
|
+
function _vaultPath(options) {
|
|
378
|
+
let possibleVaultPath = null;
|
|
379
|
+
if (options && options.path && options.path.length > 0) if (Array.isArray(options.path)) {
|
|
380
|
+
for (const filepath of options.path) if (fs$1.existsSync(filepath)) possibleVaultPath = filepath.endsWith(".vault") ? filepath : `${filepath}.vault`;
|
|
381
|
+
} else possibleVaultPath = options.path.endsWith(".vault") ? options.path : `${options.path}.vault`;
|
|
382
|
+
else possibleVaultPath = path$1.resolve(process.cwd(), ".env.vault");
|
|
383
|
+
if (fs$1.existsSync(possibleVaultPath)) return possibleVaultPath;
|
|
384
|
+
return null;
|
|
590
385
|
}
|
|
591
|
-
function
|
|
592
|
-
|
|
593
|
-
case 11:
|
|
594
|
-
const f = e.getTokenValue();
|
|
595
|
-
let m$1 = Number(f);
|
|
596
|
-
isNaN(m$1) && (t(2), m$1 = 0), w$1(m$1);
|
|
597
|
-
break;
|
|
598
|
-
case 7:
|
|
599
|
-
w$1(null);
|
|
600
|
-
break;
|
|
601
|
-
case 8:
|
|
602
|
-
w$1(!0);
|
|
603
|
-
break;
|
|
604
|
-
case 9:
|
|
605
|
-
w$1(!1);
|
|
606
|
-
break;
|
|
607
|
-
default: return !1;
|
|
608
|
-
}
|
|
609
|
-
return c(), !0;
|
|
386
|
+
function _resolveHome(envPath) {
|
|
387
|
+
return envPath[0] === "~" ? path$1.join(os$1.homedir(), envPath.slice(1)) : envPath;
|
|
610
388
|
}
|
|
611
|
-
function
|
|
612
|
-
|
|
389
|
+
function _configVault(options) {
|
|
390
|
+
const debug = parseBoolean(process.env.DOTENV_CONFIG_DEBUG || options && options.debug);
|
|
391
|
+
const quiet = parseBoolean(process.env.DOTENV_CONFIG_QUIET || options && options.quiet);
|
|
392
|
+
if (debug || !quiet) _log("Loading env from encrypted .env.vault");
|
|
393
|
+
const parsed = DotenvModule._parseVault(options);
|
|
394
|
+
let processEnv = process.env;
|
|
395
|
+
if (options && options.processEnv != null) processEnv = options.processEnv;
|
|
396
|
+
DotenvModule.populate(processEnv, parsed, options);
|
|
397
|
+
return { parsed };
|
|
613
398
|
}
|
|
614
|
-
function
|
|
615
|
-
|
|
616
|
-
let
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
399
|
+
function configDotenv(options) {
|
|
400
|
+
const dotenvPath = path$1.resolve(process.cwd(), ".env");
|
|
401
|
+
let encoding = "utf8";
|
|
402
|
+
let processEnv = process.env;
|
|
403
|
+
if (options && options.processEnv != null) processEnv = options.processEnv;
|
|
404
|
+
let debug = parseBoolean(processEnv.DOTENV_CONFIG_DEBUG || options && options.debug);
|
|
405
|
+
let quiet = parseBoolean(processEnv.DOTENV_CONFIG_QUIET || options && options.quiet);
|
|
406
|
+
if (options && options.encoding) encoding = options.encoding;
|
|
407
|
+
else if (debug) _debug("No encoding is specified. UTF-8 is used by default");
|
|
408
|
+
let optionPaths = [dotenvPath];
|
|
409
|
+
if (options && options.path) if (!Array.isArray(options.path)) optionPaths = [_resolveHome(options.path)];
|
|
410
|
+
else {
|
|
411
|
+
optionPaths = [];
|
|
412
|
+
for (const filepath of options.path) optionPaths.push(_resolveHome(filepath));
|
|
622
413
|
}
|
|
623
|
-
|
|
414
|
+
let lastError;
|
|
415
|
+
const parsedAll = {};
|
|
416
|
+
for (const path$2 of optionPaths) try {
|
|
417
|
+
const parsed = DotenvModule.parse(fs$1.readFileSync(path$2, { encoding }));
|
|
418
|
+
DotenvModule.populate(parsedAll, parsed, options);
|
|
419
|
+
} catch (e) {
|
|
420
|
+
if (debug) _debug(`Failed to load ${path$2} ${e.message}`);
|
|
421
|
+
lastError = e;
|
|
422
|
+
}
|
|
423
|
+
const populated = DotenvModule.populate(processEnv, parsedAll, options);
|
|
424
|
+
debug = parseBoolean(processEnv.DOTENV_CONFIG_DEBUG || debug);
|
|
425
|
+
quiet = parseBoolean(processEnv.DOTENV_CONFIG_QUIET || quiet);
|
|
426
|
+
if (debug || !quiet) {
|
|
427
|
+
const keysCount = Object.keys(populated).length;
|
|
428
|
+
const shortPaths = [];
|
|
429
|
+
for (const filePath of optionPaths) try {
|
|
430
|
+
const relative$2 = path$1.relative(process.cwd(), filePath);
|
|
431
|
+
shortPaths.push(relative$2);
|
|
432
|
+
} catch (e) {
|
|
433
|
+
if (debug) _debug(`Failed to load ${filePath} ${e.message}`);
|
|
434
|
+
lastError = e;
|
|
435
|
+
}
|
|
436
|
+
_log(`injecting env (${keysCount}) from ${shortPaths.join(",")} ${dim(`-- tip: ${_getRandomTip()}`)}`);
|
|
437
|
+
}
|
|
438
|
+
if (lastError) return {
|
|
439
|
+
parsed: parsedAll,
|
|
440
|
+
error: lastError
|
|
441
|
+
};
|
|
442
|
+
else return { parsed: parsedAll };
|
|
624
443
|
}
|
|
625
|
-
function
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
} else m$1 && t(6, [], []);
|
|
632
|
-
f ? (u.push(0), f = !1) : u[u.length - 1]++, E$1() || t(4, [], [4, 5]), m$1 = !0;
|
|
444
|
+
function config(options) {
|
|
445
|
+
if (_dotenvKey(options).length === 0) return DotenvModule.configDotenv(options);
|
|
446
|
+
const vaultPath = _vaultPath(options);
|
|
447
|
+
if (!vaultPath) {
|
|
448
|
+
_warn(`You set DOTENV_KEY but you are missing a .env.vault file at ${vaultPath}. Did you forget to build it?`);
|
|
449
|
+
return DotenvModule.configDotenv(options);
|
|
633
450
|
}
|
|
634
|
-
return
|
|
451
|
+
return DotenvModule._configVault(options);
|
|
635
452
|
}
|
|
636
|
-
function
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
453
|
+
function decrypt(encrypted, keyStr) {
|
|
454
|
+
const key = Buffer.from(keyStr.slice(-64), "hex");
|
|
455
|
+
let ciphertext = Buffer.from(encrypted, "base64");
|
|
456
|
+
const nonce = ciphertext.subarray(0, 12);
|
|
457
|
+
const authTag = ciphertext.subarray(-16);
|
|
458
|
+
ciphertext = ciphertext.subarray(12, -16);
|
|
459
|
+
try {
|
|
460
|
+
const aesgcm = crypto.createDecipheriv("aes-256-gcm", key, nonce);
|
|
461
|
+
aesgcm.setAuthTag(authTag);
|
|
462
|
+
return `${aesgcm.update(ciphertext)}${aesgcm.final()}`;
|
|
463
|
+
} catch (error) {
|
|
464
|
+
const isRange = error instanceof RangeError;
|
|
465
|
+
const invalidKeyLength = error.message === "Invalid key length";
|
|
466
|
+
const decryptionFailed = error.message === "Unsupported state or unable to authenticate data";
|
|
467
|
+
if (isRange || invalidKeyLength) {
|
|
468
|
+
const err = /* @__PURE__ */ new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");
|
|
469
|
+
err.code = "INVALID_DOTENV_KEY";
|
|
470
|
+
throw err;
|
|
471
|
+
} else if (decryptionFailed) {
|
|
472
|
+
const err = /* @__PURE__ */ new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");
|
|
473
|
+
err.code = "DECRYPTION_FAILED";
|
|
474
|
+
throw err;
|
|
475
|
+
} else throw error;
|
|
642
476
|
}
|
|
643
477
|
}
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
n[n.OpenBraceToken = 1] = "OpenBraceToken", n[n.CloseBraceToken = 2] = "CloseBraceToken", n[n.OpenBracketToken = 3] = "OpenBracketToken", n[n.CloseBracketToken = 4] = "CloseBracketToken", n[n.CommaToken = 5] = "CommaToken", n[n.ColonToken = 6] = "ColonToken", n[n.NullKeyword = 7] = "NullKeyword", n[n.TrueKeyword = 8] = "TrueKeyword", n[n.FalseKeyword = 9] = "FalseKeyword", n[n.StringLiteral = 10] = "StringLiteral", n[n.NumericLiteral = 11] = "NumericLiteral", n[n.LineCommentTrivia = 12] = "LineCommentTrivia", n[n.BlockCommentTrivia = 13] = "BlockCommentTrivia", n[n.LineBreakTrivia = 14] = "LineBreakTrivia", n[n.Trivia = 15] = "Trivia", n[n.Unknown = 16] = "Unknown", n[n.EOF = 17] = "EOF";
|
|
653
|
-
})(H || (H = {}));
|
|
654
|
-
const K = S$1;
|
|
655
|
-
var q;
|
|
656
|
-
(function(n) {
|
|
657
|
-
n[n.InvalidSymbol = 1] = "InvalidSymbol", n[n.InvalidNumberFormat = 2] = "InvalidNumberFormat", n[n.PropertyNameExpected = 3] = "PropertyNameExpected", n[n.ValueExpected = 4] = "ValueExpected", n[n.ColonExpected = 5] = "ColonExpected", n[n.CommaExpected = 6] = "CommaExpected", n[n.CloseBraceExpected = 7] = "CloseBraceExpected", n[n.CloseBracketExpected = 8] = "CloseBracketExpected", n[n.EndOfFileExpected = 9] = "EndOfFileExpected", n[n.InvalidCommentToken = 10] = "InvalidCommentToken", n[n.UnexpectedEndOfComment = 11] = "UnexpectedEndOfComment", n[n.UnexpectedEndOfString = 12] = "UnexpectedEndOfString", n[n.UnexpectedEndOfNumber = 13] = "UnexpectedEndOfNumber", n[n.InvalidUnicode = 14] = "InvalidUnicode", n[n.InvalidEscapeCharacter = 15] = "InvalidEscapeCharacter", n[n.InvalidCharacter = 16] = "InvalidCharacter";
|
|
658
|
-
})(q || (q = {}));
|
|
659
|
-
function x$1(n, l) {
|
|
660
|
-
const g$1 = JSON.parse(n, l?.reviver);
|
|
661
|
-
return N$1(n, g$1, l), g$1;
|
|
662
|
-
}
|
|
663
|
-
function h(n, l) {
|
|
664
|
-
const g$1 = K(n, l?.errors, l);
|
|
665
|
-
return N$1(n, g$1, l), g$1;
|
|
666
|
-
}
|
|
667
|
-
|
|
668
|
-
//#endregion
|
|
669
|
-
//#region node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/ini.mjs
|
|
670
|
-
var O, x;
|
|
671
|
-
function j() {
|
|
672
|
-
if (x) return O;
|
|
673
|
-
x = 1;
|
|
674
|
-
const { hasOwnProperty: y } = Object.prototype, d$1 = (e, t = {}) => {
|
|
675
|
-
typeof t == "string" && (t = { section: t }), t.align = t.align === !0, t.newline = t.newline === !0, t.sort = t.sort === !0, t.whitespace = t.whitespace === !0 || t.align === !0, t.platform = t.platform || typeof process < "u" && process.platform, t.bracketedArray = t.bracketedArray !== !1;
|
|
676
|
-
const s = t.platform === "win32" ? `\r
|
|
677
|
-
` : `
|
|
678
|
-
`, r$1 = t.whitespace ? " = " : "=", c = [], o = t.sort ? Object.keys(e).sort() : Object.keys(e);
|
|
679
|
-
let g$1 = 0;
|
|
680
|
-
t.align && (g$1 = h$2(o.filter((n) => e[n] === null || Array.isArray(e[n]) || typeof e[n] != "object").map((n) => Array.isArray(e[n]) ? `${n}[]` : n).concat([""]).reduce((n, i) => h$2(n).length >= h$2(i).length ? n : i)).length);
|
|
681
|
-
let l = "";
|
|
682
|
-
const m$1 = t.bracketedArray ? "[]" : "";
|
|
683
|
-
for (const n of o) {
|
|
684
|
-
const i = e[n];
|
|
685
|
-
if (i && Array.isArray(i)) for (const f of i) l += h$2(`${n}${m$1}`).padEnd(g$1, " ") + r$1 + h$2(f) + s;
|
|
686
|
-
else i && typeof i == "object" ? c.push(n) : l += h$2(n).padEnd(g$1, " ") + r$1 + h$2(i) + s;
|
|
478
|
+
function populate(processEnv, parsed, options = {}) {
|
|
479
|
+
const debug = Boolean(options && options.debug);
|
|
480
|
+
const override = Boolean(options && options.override);
|
|
481
|
+
const populated = {};
|
|
482
|
+
if (typeof parsed !== "object") {
|
|
483
|
+
const err = /* @__PURE__ */ new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");
|
|
484
|
+
err.code = "OBJECT_REQUIRED";
|
|
485
|
+
throw err;
|
|
687
486
|
}
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
section: f
|
|
693
|
-
});
|
|
694
|
-
l.length && u.length && (l += s), l += u;
|
|
695
|
-
}
|
|
696
|
-
return l;
|
|
697
|
-
};
|
|
698
|
-
function k$1(e, t) {
|
|
699
|
-
var s = 0, r$1 = 0, c = 0, o = [];
|
|
700
|
-
do
|
|
701
|
-
if (c = e.indexOf(t, s), c !== -1) {
|
|
702
|
-
if (s = c + t.length, c > 0 && e[c - 1] === "\\") continue;
|
|
703
|
-
o.push(e.slice(r$1, c)), r$1 = c + t.length;
|
|
704
|
-
}
|
|
705
|
-
while (c !== -1);
|
|
706
|
-
return o.push(e.slice(r$1)), o;
|
|
707
|
-
}
|
|
708
|
-
const w$1 = (e, t = {}) => {
|
|
709
|
-
t.bracketedArray = t.bracketedArray !== !1;
|
|
710
|
-
const s = Object.create(null);
|
|
711
|
-
let r$1 = s, c = null;
|
|
712
|
-
const o = /^\[([^\]]*)\]\s*$|^([^=]+)(=(.*))?$/i, g$1 = e.split(/[\r\n]+/g), l = {};
|
|
713
|
-
for (const n of g$1) {
|
|
714
|
-
if (!n || n.match(/^\s*[;#]/) || n.match(/^\s*$/)) continue;
|
|
715
|
-
const i = n.match(o);
|
|
716
|
-
if (!i) continue;
|
|
717
|
-
if (i[1] !== void 0) {
|
|
718
|
-
if (c = A(i[1]), c === "__proto__") {
|
|
719
|
-
r$1 = Object.create(null);
|
|
720
|
-
continue;
|
|
721
|
-
}
|
|
722
|
-
r$1 = s[c] = s[c] || Object.create(null);
|
|
723
|
-
continue;
|
|
487
|
+
for (const key of Object.keys(parsed)) if (Object.prototype.hasOwnProperty.call(processEnv, key)) {
|
|
488
|
+
if (override === true) {
|
|
489
|
+
processEnv[key] = parsed[key];
|
|
490
|
+
populated[key] = parsed[key];
|
|
724
491
|
}
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
t.bracketedArray ? u = f.length > 2 && f.slice(-2) === "[]" : (l[f] = (l?.[f] || 0) + 1, u = l[f] > 1);
|
|
728
|
-
const a = u && f.endsWith("[]") ? f.slice(0, -2) : f;
|
|
729
|
-
if (a === "__proto__") continue;
|
|
730
|
-
const p = i[3] ? A(i[4]) : !0, b$1 = p === "true" || p === "false" || p === "null" ? JSON.parse(p) : p;
|
|
731
|
-
u && (y.call(r$1, a) ? Array.isArray(r$1[a]) || (r$1[a] = [r$1[a]]) : r$1[a] = []), Array.isArray(r$1[a]) ? r$1[a].push(b$1) : r$1[a] = b$1;
|
|
732
|
-
}
|
|
733
|
-
const m$1 = [];
|
|
734
|
-
for (const n of Object.keys(s)) {
|
|
735
|
-
if (!y.call(s, n) || typeof s[n] != "object" || Array.isArray(s[n])) continue;
|
|
736
|
-
const i = k$1(n, ".");
|
|
737
|
-
r$1 = s;
|
|
738
|
-
const f = i.pop(), u = f.replace(/\\\./g, ".");
|
|
739
|
-
for (const a of i) a !== "__proto__" && ((!y.call(r$1, a) || typeof r$1[a] != "object") && (r$1[a] = Object.create(null)), r$1 = r$1[a]);
|
|
740
|
-
r$1 === s && u === f || (r$1[u] = s[n], m$1.push(n));
|
|
741
|
-
}
|
|
742
|
-
for (const n of m$1) delete s[n];
|
|
743
|
-
return s;
|
|
744
|
-
}, _$1 = (e) => e.startsWith("\"") && e.endsWith("\"") || e.startsWith("'") && e.endsWith("'"), h$2 = (e) => typeof e != "string" || e.match(/[=\r\n]/) || e.match(/^\[/) || e.length > 1 && _$1(e) || e !== e.trim() ? JSON.stringify(e) : e.split(";").join("\\;").split("#").join("\\#"), A = (e) => {
|
|
745
|
-
if (e = (e || "").trim(), _$1(e)) {
|
|
746
|
-
e.charAt(0) === "'" && (e = e.slice(1, -1));
|
|
747
|
-
try {
|
|
748
|
-
e = JSON.parse(e);
|
|
749
|
-
} catch {}
|
|
492
|
+
if (debug) if (override === true) _debug(`"${key}" is already defined and WAS overwritten`);
|
|
493
|
+
else _debug(`"${key}" is already defined and was NOT overwritten`);
|
|
750
494
|
} else {
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
const o = e.charAt(r$1);
|
|
754
|
-
if (t) "\\;#".indexOf(o) !== -1 ? s += o : s += "\\" + o, t = !1;
|
|
755
|
-
else {
|
|
756
|
-
if (";#".indexOf(o) !== -1) break;
|
|
757
|
-
o === "\\" ? t = !0 : s += o;
|
|
758
|
-
}
|
|
759
|
-
}
|
|
760
|
-
return t && (s += "\\"), s.trim();
|
|
495
|
+
processEnv[key] = parsed[key];
|
|
496
|
+
populated[key] = parsed[key];
|
|
761
497
|
}
|
|
762
|
-
return
|
|
498
|
+
return populated;
|
|
499
|
+
}
|
|
500
|
+
const DotenvModule = {
|
|
501
|
+
configDotenv,
|
|
502
|
+
_configVault,
|
|
503
|
+
_parseVault,
|
|
504
|
+
config,
|
|
505
|
+
decrypt,
|
|
506
|
+
parse,
|
|
507
|
+
populate
|
|
763
508
|
};
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
}
|
|
773
|
-
var I = j();
|
|
774
|
-
function S(y, d$1) {
|
|
775
|
-
return I.parse(y, d$1);
|
|
776
|
-
}
|
|
509
|
+
module.exports.configDotenv = DotenvModule.configDotenv;
|
|
510
|
+
module.exports._configVault = DotenvModule._configVault;
|
|
511
|
+
module.exports._parseVault = DotenvModule._parseVault;
|
|
512
|
+
module.exports.config = DotenvModule.config;
|
|
513
|
+
module.exports.decrypt = DotenvModule.decrypt;
|
|
514
|
+
module.exports.parse = DotenvModule.parse;
|
|
515
|
+
module.exports.populate = DotenvModule.populate;
|
|
516
|
+
module.exports = DotenvModule;
|
|
517
|
+
}));
|
|
777
518
|
|
|
778
519
|
//#endregion
|
|
779
520
|
//#region node_modules/.pnpm/exsolve@1.0.8/node_modules/exsolve/dist/index.mjs
|
|
@@ -1774,603 +1515,862 @@ function _parseInput(input) {
|
|
|
1774
1515
|
}
|
|
1775
1516
|
|
|
1776
1517
|
//#endregion
|
|
1777
|
-
//#region node_modules/.pnpm/
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1518
|
+
//#region node_modules/.pnpm/rc9@2.1.2/node_modules/rc9/dist/index.mjs
|
|
1519
|
+
function isBuffer(obj) {
|
|
1520
|
+
return obj && obj.constructor && typeof obj.constructor.isBuffer === "function" && obj.constructor.isBuffer(obj);
|
|
1521
|
+
}
|
|
1522
|
+
function keyIdentity(key) {
|
|
1523
|
+
return key;
|
|
1524
|
+
}
|
|
1525
|
+
function flatten(target, opts) {
|
|
1526
|
+
opts = opts || {};
|
|
1527
|
+
const delimiter$1 = opts.delimiter || ".";
|
|
1528
|
+
const maxDepth = opts.maxDepth;
|
|
1529
|
+
const transformKey = opts.transformKey || keyIdentity;
|
|
1530
|
+
const output = {};
|
|
1531
|
+
function step(object, prev, currentDepth) {
|
|
1532
|
+
currentDepth = currentDepth || 1;
|
|
1533
|
+
Object.keys(object).forEach(function(key) {
|
|
1534
|
+
const value = object[key];
|
|
1535
|
+
const isarray = opts.safe && Array.isArray(value);
|
|
1536
|
+
const type$1 = Object.prototype.toString.call(value);
|
|
1537
|
+
const isbuffer = isBuffer(value);
|
|
1538
|
+
const isobject = type$1 === "[object Object]" || type$1 === "[object Array]";
|
|
1539
|
+
const newKey = prev ? prev + delimiter$1 + transformKey(key) : transformKey(key);
|
|
1540
|
+
if (!isarray && !isbuffer && isobject && Object.keys(value).length && (!opts.maxDepth || currentDepth < maxDepth)) return step(value, newKey, currentDepth + 1);
|
|
1541
|
+
output[newKey] = value;
|
|
1542
|
+
});
|
|
1543
|
+
}
|
|
1544
|
+
step(target);
|
|
1545
|
+
return output;
|
|
1546
|
+
}
|
|
1547
|
+
function unflatten(target, opts) {
|
|
1548
|
+
opts = opts || {};
|
|
1549
|
+
const delimiter$1 = opts.delimiter || ".";
|
|
1550
|
+
const overwrite = opts.overwrite || false;
|
|
1551
|
+
const transformKey = opts.transformKey || keyIdentity;
|
|
1552
|
+
const result = {};
|
|
1553
|
+
if (isBuffer(target) || Object.prototype.toString.call(target) !== "[object Object]") return target;
|
|
1554
|
+
function getkey(key) {
|
|
1555
|
+
const parsedKey = Number(key);
|
|
1556
|
+
return isNaN(parsedKey) || key.indexOf(".") !== -1 || opts.object ? key : parsedKey;
|
|
1557
|
+
}
|
|
1558
|
+
function addKeys(keyPrefix, recipient, target$1) {
|
|
1559
|
+
return Object.keys(target$1).reduce(function(result$1, key) {
|
|
1560
|
+
result$1[keyPrefix + delimiter$1 + key] = target$1[key];
|
|
1561
|
+
return result$1;
|
|
1562
|
+
}, recipient);
|
|
1563
|
+
}
|
|
1564
|
+
function isEmpty(val) {
|
|
1565
|
+
const type$1 = Object.prototype.toString.call(val);
|
|
1566
|
+
const isArray = type$1 === "[object Array]";
|
|
1567
|
+
const isObject = type$1 === "[object Object]";
|
|
1568
|
+
if (!val) return true;
|
|
1569
|
+
else if (isArray) return !val.length;
|
|
1570
|
+
else if (isObject) return !Object.keys(val).length;
|
|
1786
1571
|
}
|
|
1572
|
+
target = Object.keys(target).reduce(function(result$1, key) {
|
|
1573
|
+
const type$1 = Object.prototype.toString.call(target[key]);
|
|
1574
|
+
if (!(type$1 === "[object Object]" || type$1 === "[object Array]") || isEmpty(target[key])) {
|
|
1575
|
+
result$1[key] = target[key];
|
|
1576
|
+
return result$1;
|
|
1577
|
+
} else return addKeys(key, result$1, flatten(target[key], opts));
|
|
1578
|
+
}, {});
|
|
1579
|
+
Object.keys(target).forEach(function(key) {
|
|
1580
|
+
const split = key.split(delimiter$1).map(transformKey);
|
|
1581
|
+
let key1 = getkey(split.shift());
|
|
1582
|
+
let key2 = getkey(split[0]);
|
|
1583
|
+
let recipient = result;
|
|
1584
|
+
while (key2 !== void 0) {
|
|
1585
|
+
if (key1 === "__proto__") return;
|
|
1586
|
+
const type$1 = Object.prototype.toString.call(recipient[key1]);
|
|
1587
|
+
const isobject = type$1 === "[object Object]" || type$1 === "[object Array]";
|
|
1588
|
+
if (!overwrite && !isobject && typeof recipient[key1] !== "undefined") return;
|
|
1589
|
+
if (overwrite && !isobject || !overwrite && recipient[key1] == null) recipient[key1] = typeof key2 === "number" && !opts.object ? [] : {};
|
|
1590
|
+
recipient = recipient[key1];
|
|
1591
|
+
if (split.length > 0) {
|
|
1592
|
+
key1 = getkey(split.shift());
|
|
1593
|
+
key2 = getkey(split[0]);
|
|
1594
|
+
}
|
|
1595
|
+
}
|
|
1596
|
+
recipient[key1] = unflatten(target[key], opts);
|
|
1597
|
+
});
|
|
1598
|
+
return result;
|
|
1599
|
+
}
|
|
1600
|
+
const RE_KEY_VAL = /^\s*([^\s=]+)\s*=\s*(.*)?\s*$/;
|
|
1601
|
+
const RE_LINES = /\n|\r|\r\n/;
|
|
1602
|
+
const defaults = {
|
|
1603
|
+
name: ".conf",
|
|
1604
|
+
dir: process.cwd(),
|
|
1605
|
+
flat: false
|
|
1787
1606
|
};
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
...
|
|
1792
|
-
...
|
|
1607
|
+
function withDefaults(options) {
|
|
1608
|
+
if (typeof options === "string") options = { name: options };
|
|
1609
|
+
return {
|
|
1610
|
+
...defaults,
|
|
1611
|
+
...options
|
|
1793
1612
|
};
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
const
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1613
|
+
}
|
|
1614
|
+
function parse(contents, options = {}) {
|
|
1615
|
+
const config = {};
|
|
1616
|
+
const lines = contents.split(RE_LINES);
|
|
1617
|
+
for (const line of lines) {
|
|
1618
|
+
const match = line.match(RE_KEY_VAL);
|
|
1619
|
+
if (!match) continue;
|
|
1620
|
+
const key = match[1];
|
|
1621
|
+
if (!key || key === "__proto__" || key === "constructor") continue;
|
|
1622
|
+
const value = destr((match[2] || "").trim());
|
|
1623
|
+
if (key.endsWith("[]")) {
|
|
1624
|
+
const nkey = key.slice(0, Math.max(0, key.length - 2));
|
|
1625
|
+
config[nkey] = (config[nkey] || []).concat(value);
|
|
1626
|
+
continue;
|
|
1627
|
+
}
|
|
1628
|
+
config[key] = value;
|
|
1808
1629
|
}
|
|
1809
|
-
|
|
1630
|
+
return options.flat ? config : unflatten(config, { overwrite: true });
|
|
1810
1631
|
}
|
|
1811
|
-
function
|
|
1812
|
-
|
|
1632
|
+
function parseFile(path$2, options) {
|
|
1633
|
+
if (!existsSync(path$2)) return {};
|
|
1634
|
+
return parse(readFileSync(path$2, "utf8"), options);
|
|
1813
1635
|
}
|
|
1814
|
-
function
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
return resolveModulePath(id, {
|
|
1818
|
-
...opts,
|
|
1819
|
-
from: opts.from || opts.parent || opts.url
|
|
1820
|
-
});
|
|
1636
|
+
function read(options) {
|
|
1637
|
+
options = withDefaults(options);
|
|
1638
|
+
return parseFile(resolve(options.dir, options.name), options);
|
|
1821
1639
|
}
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
let parsed;
|
|
1851
|
-
try {
|
|
1852
|
-
parsed = x$1(blob);
|
|
1853
|
-
} catch {
|
|
1854
|
-
parsed = h(blob);
|
|
1640
|
+
function readUser(options) {
|
|
1641
|
+
options = withDefaults(options);
|
|
1642
|
+
options.dir = process.env.XDG_CONFIG_HOME || homedir();
|
|
1643
|
+
return read(options);
|
|
1644
|
+
}
|
|
1645
|
+
|
|
1646
|
+
//#endregion
|
|
1647
|
+
//#region node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/shared/confbox.DA7CpUDY.mjs
|
|
1648
|
+
const b = /^(?:( )+|\t+)/, d = "space", h$1 = "tab";
|
|
1649
|
+
function g(e, t) {
|
|
1650
|
+
const n = /* @__PURE__ */ new Map();
|
|
1651
|
+
let s = 0, o, i;
|
|
1652
|
+
for (const c of e.split(/\n/g)) {
|
|
1653
|
+
if (!c) continue;
|
|
1654
|
+
let f, a, l, p, r$1;
|
|
1655
|
+
const y = c.match(b);
|
|
1656
|
+
if (y === null) s = 0, o = "";
|
|
1657
|
+
else {
|
|
1658
|
+
if (f = y[0].length, a = y[1] ? d : h$1, t && a === d && f === 1) continue;
|
|
1659
|
+
a !== o && (s = 0), o = a, l = 1, p = 0;
|
|
1660
|
+
const u = f - s;
|
|
1661
|
+
if (s = f, u === 0) l = 0, p = 1;
|
|
1662
|
+
else {
|
|
1663
|
+
const I$1 = u > 0 ? u : -u;
|
|
1664
|
+
i = T(a, I$1);
|
|
1665
|
+
}
|
|
1666
|
+
r$1 = n.get(i), r$1 = r$1 === void 0 ? [1, 0] : [r$1[0] + l, r$1[1] + p], n.set(i, r$1);
|
|
1667
|
+
}
|
|
1855
1668
|
}
|
|
1856
|
-
|
|
1857
|
-
return parsed;
|
|
1669
|
+
return n;
|
|
1858
1670
|
}
|
|
1859
|
-
|
|
1860
|
-
return
|
|
1861
|
-
...options,
|
|
1862
|
-
startingFrom: _resolvePath(id, options)
|
|
1863
|
-
});
|
|
1671
|
+
function T(e, t) {
|
|
1672
|
+
return (e === d ? "s" : "t") + String(t);
|
|
1864
1673
|
}
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
};
|
|
1871
|
-
async function findWorkspaceDir(id = process.cwd(), options = {}) {
|
|
1872
|
-
const startingFrom = _resolvePath(id, options);
|
|
1873
|
-
const tests = options.tests || [
|
|
1874
|
-
"workspaceFile",
|
|
1875
|
-
"gitConfig",
|
|
1876
|
-
"lockFile",
|
|
1877
|
-
"packageJson"
|
|
1878
|
-
];
|
|
1879
|
-
for (const testName of tests) {
|
|
1880
|
-
const test = workspaceTests[testName];
|
|
1881
|
-
if (options[testName] === false || !test) continue;
|
|
1882
|
-
const direction = options[testName] || (testName === "gitConfig" ? "closest" : "furthest");
|
|
1883
|
-
const detected = await test({
|
|
1884
|
-
...options,
|
|
1885
|
-
startingFrom,
|
|
1886
|
-
reverse: direction === "furthest"
|
|
1887
|
-
}).catch(() => {});
|
|
1888
|
-
if (detected) return detected;
|
|
1889
|
-
}
|
|
1890
|
-
throw new Error(`Cannot detect workspace root from ${id}`);
|
|
1674
|
+
function w(e) {
|
|
1675
|
+
return {
|
|
1676
|
+
type: e[0] === "s" ? d : h$1,
|
|
1677
|
+
amount: Number(e.slice(1))
|
|
1678
|
+
};
|
|
1891
1679
|
}
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
});
|
|
1680
|
+
function E(e) {
|
|
1681
|
+
let t, n = 0, s = 0;
|
|
1682
|
+
for (const [o, [i, c]] of e) (i > n || i === n && c > s) && (n = i, s = c, t = o);
|
|
1683
|
+
return t;
|
|
1897
1684
|
}
|
|
1898
|
-
|
|
1899
|
-
return
|
|
1685
|
+
function S$2(e, t) {
|
|
1686
|
+
return (e === d ? " " : " ").repeat(t);
|
|
1900
1687
|
}
|
|
1901
|
-
function
|
|
1902
|
-
|
|
1688
|
+
function _(e) {
|
|
1689
|
+
if (typeof e != "string") throw new TypeError("Expected a string");
|
|
1690
|
+
let t = g(e, !0);
|
|
1691
|
+
t.size === 0 && (t = g(e, !1));
|
|
1692
|
+
const n = E(t);
|
|
1693
|
+
let s, o = 0, i = "";
|
|
1694
|
+
return n !== void 0 && ({type: s, amount: o} = w(n), i = S$2(s, o)), {
|
|
1695
|
+
amount: o,
|
|
1696
|
+
type: s,
|
|
1697
|
+
indent: i
|
|
1698
|
+
};
|
|
1903
1699
|
}
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
"main": "lib/main.js",
|
|
1913
|
-
"types": "lib/main.d.ts",
|
|
1914
|
-
"exports": {
|
|
1915
|
-
".": {
|
|
1916
|
-
"types": "./lib/main.d.ts",
|
|
1917
|
-
"require": "./lib/main.js",
|
|
1918
|
-
"default": "./lib/main.js"
|
|
1919
|
-
},
|
|
1920
|
-
"./config": "./config.js",
|
|
1921
|
-
"./config.js": "./config.js",
|
|
1922
|
-
"./lib/env-options": "./lib/env-options.js",
|
|
1923
|
-
"./lib/env-options.js": "./lib/env-options.js",
|
|
1924
|
-
"./lib/cli-options": "./lib/cli-options.js",
|
|
1925
|
-
"./lib/cli-options.js": "./lib/cli-options.js",
|
|
1926
|
-
"./package.json": "./package.json"
|
|
1927
|
-
},
|
|
1928
|
-
"scripts": {
|
|
1929
|
-
"dts-check": "tsc --project tests/types/tsconfig.json",
|
|
1930
|
-
"lint": "standard",
|
|
1931
|
-
"pretest": "npm run lint && npm run dts-check",
|
|
1932
|
-
"test": "tap run tests/**/*.js --allow-empty-coverage --disable-coverage --timeout=60000",
|
|
1933
|
-
"test:coverage": "tap run tests/**/*.js --show-full-coverage --timeout=60000 --coverage-report=text --coverage-report=lcov",
|
|
1934
|
-
"prerelease": "npm test",
|
|
1935
|
-
"release": "standard-version"
|
|
1936
|
-
},
|
|
1937
|
-
"repository": {
|
|
1938
|
-
"type": "git",
|
|
1939
|
-
"url": "git://github.com/motdotla/dotenv.git"
|
|
1940
|
-
},
|
|
1941
|
-
"homepage": "https://github.com/motdotla/dotenv#readme",
|
|
1942
|
-
"funding": "https://dotenvx.com",
|
|
1943
|
-
"keywords": [
|
|
1944
|
-
"dotenv",
|
|
1945
|
-
"env",
|
|
1946
|
-
".env",
|
|
1947
|
-
"environment",
|
|
1948
|
-
"variables",
|
|
1949
|
-
"config",
|
|
1950
|
-
"settings"
|
|
1951
|
-
],
|
|
1952
|
-
"readmeFilename": "README.md",
|
|
1953
|
-
"license": "BSD-2-Clause",
|
|
1954
|
-
"devDependencies": {
|
|
1955
|
-
"@types/node": "^18.11.3",
|
|
1956
|
-
"decache": "^4.6.2",
|
|
1957
|
-
"sinon": "^14.0.1",
|
|
1958
|
-
"standard": "^17.0.0",
|
|
1959
|
-
"standard-version": "^9.5.0",
|
|
1960
|
-
"tap": "^19.2.0",
|
|
1961
|
-
"typescript": "^4.8.4"
|
|
1962
|
-
},
|
|
1963
|
-
"engines": { "node": ">=12" },
|
|
1964
|
-
"browser": { "fs": false }
|
|
1700
|
+
const m = Symbol.for("__confbox_fmt__"), k = /^(\s+)/, v = /(\s+)$/;
|
|
1701
|
+
function x$2(e, t = {}) {
|
|
1702
|
+
return {
|
|
1703
|
+
sample: t.indent === void 0 && t.preserveIndentation !== !1 && e.slice(0, t?.sampleSize || 1024),
|
|
1704
|
+
whiteSpace: t.preserveWhitespace === !1 ? void 0 : {
|
|
1705
|
+
start: k.exec(e)?.[0] || "",
|
|
1706
|
+
end: v.exec(e)?.[0] || ""
|
|
1707
|
+
}
|
|
1965
1708
|
};
|
|
1966
|
-
}
|
|
1709
|
+
}
|
|
1710
|
+
function N$1(e, t, n) {
|
|
1711
|
+
!t || typeof t != "object" || Object.defineProperty(t, m, {
|
|
1712
|
+
enumerable: !1,
|
|
1713
|
+
configurable: !0,
|
|
1714
|
+
writable: !0,
|
|
1715
|
+
value: x$2(e, n)
|
|
1716
|
+
});
|
|
1717
|
+
}
|
|
1718
|
+
function C(e, t) {
|
|
1719
|
+
if (!e || typeof e != "object" || !(m in e)) return {
|
|
1720
|
+
indent: t?.indent ?? 2,
|
|
1721
|
+
whitespace: {
|
|
1722
|
+
start: "",
|
|
1723
|
+
end: ""
|
|
1724
|
+
}
|
|
1725
|
+
};
|
|
1726
|
+
const n = e[m];
|
|
1727
|
+
return {
|
|
1728
|
+
indent: t?.indent || _(n.sample || "").indent,
|
|
1729
|
+
whitespace: n.whiteSpace || {
|
|
1730
|
+
start: "",
|
|
1731
|
+
end: ""
|
|
1732
|
+
}
|
|
1733
|
+
};
|
|
1734
|
+
}
|
|
1967
1735
|
|
|
1968
1736
|
//#endregion
|
|
1969
|
-
//#region node_modules/.pnpm/
|
|
1970
|
-
|
|
1971
|
-
const
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
"🔄 add secrets lifecycle management: https://dotenvx.com/ops",
|
|
1985
|
-
"🔑 add access controls to secrets: https://dotenvx.com/ops",
|
|
1986
|
-
"🛠️ run anywhere with `dotenvx run -- yourcommand`",
|
|
1987
|
-
"⚙️ specify custom .env file path with { path: '/custom/path/.env' }",
|
|
1988
|
-
"⚙️ enable debug logging with { debug: true }",
|
|
1989
|
-
"⚙️ override existing env vars with { override: true }",
|
|
1990
|
-
"⚙️ suppress all logs with { quiet: true }",
|
|
1991
|
-
"⚙️ write to custom object with { processEnv: myObject }",
|
|
1992
|
-
"⚙️ load multiple .env files with { path: ['.env.local', '.env'] }"
|
|
1993
|
-
];
|
|
1994
|
-
function _getRandomTip() {
|
|
1995
|
-
return TIPS[Math.floor(Math.random() * TIPS.length)];
|
|
1996
|
-
}
|
|
1997
|
-
function parseBoolean(value) {
|
|
1998
|
-
if (typeof value === "string") return ![
|
|
1999
|
-
"false",
|
|
2000
|
-
"0",
|
|
2001
|
-
"no",
|
|
2002
|
-
"off",
|
|
2003
|
-
""
|
|
2004
|
-
].includes(value.toLowerCase());
|
|
2005
|
-
return Boolean(value);
|
|
1737
|
+
//#region node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/shared/confbox.DnMsyigM.mjs
|
|
1738
|
+
function $(n, l = !1) {
|
|
1739
|
+
const g$1 = n.length;
|
|
1740
|
+
let e = 0, u = "", p = 0, k$1 = 16, A = 0, o = 0, O$1 = 0, B = 0, b$1 = 0;
|
|
1741
|
+
function I$1(i, T$1) {
|
|
1742
|
+
let s = 0, c = 0;
|
|
1743
|
+
for (; s < i;) {
|
|
1744
|
+
let t = n.charCodeAt(e);
|
|
1745
|
+
if (t >= 48 && t <= 57) c = c * 16 + t - 48;
|
|
1746
|
+
else if (t >= 65 && t <= 70) c = c * 16 + t - 65 + 10;
|
|
1747
|
+
else if (t >= 97 && t <= 102) c = c * 16 + t - 97 + 10;
|
|
1748
|
+
else break;
|
|
1749
|
+
e++, s++;
|
|
1750
|
+
}
|
|
1751
|
+
return s < i && (c = -1), c;
|
|
2006
1752
|
}
|
|
2007
|
-
function
|
|
2008
|
-
|
|
1753
|
+
function V(i) {
|
|
1754
|
+
e = i, u = "", p = 0, k$1 = 16, b$1 = 0;
|
|
2009
1755
|
}
|
|
2010
|
-
function
|
|
2011
|
-
|
|
1756
|
+
function F() {
|
|
1757
|
+
let i = e;
|
|
1758
|
+
if (n.charCodeAt(e) === 48) e++;
|
|
1759
|
+
else for (e++; e < n.length && L(n.charCodeAt(e));) e++;
|
|
1760
|
+
if (e < n.length && n.charCodeAt(e) === 46) if (e++, e < n.length && L(n.charCodeAt(e))) for (e++; e < n.length && L(n.charCodeAt(e));) e++;
|
|
1761
|
+
else return b$1 = 3, n.substring(i, e);
|
|
1762
|
+
let T$1 = e;
|
|
1763
|
+
if (e < n.length && (n.charCodeAt(e) === 69 || n.charCodeAt(e) === 101)) if (e++, (e < n.length && n.charCodeAt(e) === 43 || n.charCodeAt(e) === 45) && e++, e < n.length && L(n.charCodeAt(e))) {
|
|
1764
|
+
for (e++; e < n.length && L(n.charCodeAt(e));) e++;
|
|
1765
|
+
T$1 = e;
|
|
1766
|
+
} else b$1 = 3;
|
|
1767
|
+
return n.substring(i, T$1);
|
|
2012
1768
|
}
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
while ((match = LINE.exec(lines)) != null) {
|
|
2020
|
-
const key = match[1];
|
|
2021
|
-
let value = match[2] || "";
|
|
2022
|
-
value = value.trim();
|
|
2023
|
-
const maybeQuote = value[0];
|
|
2024
|
-
value = value.replace(/^(['"`])([\s\S]*)\1$/gm, "$2");
|
|
2025
|
-
if (maybeQuote === "\"") {
|
|
2026
|
-
value = value.replace(/\\n/g, "\n");
|
|
2027
|
-
value = value.replace(/\\r/g, "\r");
|
|
1769
|
+
function a() {
|
|
1770
|
+
let i = "", T$1 = e;
|
|
1771
|
+
for (;;) {
|
|
1772
|
+
if (e >= g$1) {
|
|
1773
|
+
i += n.substring(T$1, e), b$1 = 2;
|
|
1774
|
+
break;
|
|
2028
1775
|
}
|
|
2029
|
-
|
|
1776
|
+
const s = n.charCodeAt(e);
|
|
1777
|
+
if (s === 34) {
|
|
1778
|
+
i += n.substring(T$1, e), e++;
|
|
1779
|
+
break;
|
|
1780
|
+
}
|
|
1781
|
+
if (s === 92) {
|
|
1782
|
+
if (i += n.substring(T$1, e), e++, e >= g$1) {
|
|
1783
|
+
b$1 = 2;
|
|
1784
|
+
break;
|
|
1785
|
+
}
|
|
1786
|
+
switch (n.charCodeAt(e++)) {
|
|
1787
|
+
case 34:
|
|
1788
|
+
i += "\"";
|
|
1789
|
+
break;
|
|
1790
|
+
case 92:
|
|
1791
|
+
i += "\\";
|
|
1792
|
+
break;
|
|
1793
|
+
case 47:
|
|
1794
|
+
i += "/";
|
|
1795
|
+
break;
|
|
1796
|
+
case 98:
|
|
1797
|
+
i += "\b";
|
|
1798
|
+
break;
|
|
1799
|
+
case 102:
|
|
1800
|
+
i += "\f";
|
|
1801
|
+
break;
|
|
1802
|
+
case 110:
|
|
1803
|
+
i += `
|
|
1804
|
+
`;
|
|
1805
|
+
break;
|
|
1806
|
+
case 114:
|
|
1807
|
+
i += "\r";
|
|
1808
|
+
break;
|
|
1809
|
+
case 116:
|
|
1810
|
+
i += " ";
|
|
1811
|
+
break;
|
|
1812
|
+
case 117:
|
|
1813
|
+
const t = I$1(4);
|
|
1814
|
+
t >= 0 ? i += String.fromCharCode(t) : b$1 = 4;
|
|
1815
|
+
break;
|
|
1816
|
+
default: b$1 = 5;
|
|
1817
|
+
}
|
|
1818
|
+
T$1 = e;
|
|
1819
|
+
continue;
|
|
1820
|
+
}
|
|
1821
|
+
if (s >= 0 && s <= 31) if (r(s)) {
|
|
1822
|
+
i += n.substring(T$1, e), b$1 = 2;
|
|
1823
|
+
break;
|
|
1824
|
+
} else b$1 = 6;
|
|
1825
|
+
e++;
|
|
1826
|
+
}
|
|
1827
|
+
return i;
|
|
1828
|
+
}
|
|
1829
|
+
function w$1() {
|
|
1830
|
+
if (u = "", b$1 = 0, p = e, o = A, B = O$1, e >= g$1) return p = g$1, k$1 = 17;
|
|
1831
|
+
let i = n.charCodeAt(e);
|
|
1832
|
+
if (J(i)) {
|
|
1833
|
+
do
|
|
1834
|
+
e++, u += String.fromCharCode(i), i = n.charCodeAt(e);
|
|
1835
|
+
while (J(i));
|
|
1836
|
+
return k$1 = 15;
|
|
1837
|
+
}
|
|
1838
|
+
if (r(i)) return e++, u += String.fromCharCode(i), i === 13 && n.charCodeAt(e) === 10 && (e++, u += `
|
|
1839
|
+
`), A++, O$1 = e, k$1 = 14;
|
|
1840
|
+
switch (i) {
|
|
1841
|
+
case 123: return e++, k$1 = 1;
|
|
1842
|
+
case 125: return e++, k$1 = 2;
|
|
1843
|
+
case 91: return e++, k$1 = 3;
|
|
1844
|
+
case 93: return e++, k$1 = 4;
|
|
1845
|
+
case 58: return e++, k$1 = 6;
|
|
1846
|
+
case 44: return e++, k$1 = 5;
|
|
1847
|
+
case 34: return e++, u = a(), k$1 = 10;
|
|
1848
|
+
case 47:
|
|
1849
|
+
const T$1 = e - 1;
|
|
1850
|
+
if (n.charCodeAt(e + 1) === 47) {
|
|
1851
|
+
for (e += 2; e < g$1 && !r(n.charCodeAt(e));) e++;
|
|
1852
|
+
return u = n.substring(T$1, e), k$1 = 12;
|
|
1853
|
+
}
|
|
1854
|
+
if (n.charCodeAt(e + 1) === 42) {
|
|
1855
|
+
e += 2;
|
|
1856
|
+
const s = g$1 - 1;
|
|
1857
|
+
let c = !1;
|
|
1858
|
+
for (; e < s;) {
|
|
1859
|
+
const t = n.charCodeAt(e);
|
|
1860
|
+
if (t === 42 && n.charCodeAt(e + 1) === 47) {
|
|
1861
|
+
e += 2, c = !0;
|
|
1862
|
+
break;
|
|
1863
|
+
}
|
|
1864
|
+
e++, r(t) && (t === 13 && n.charCodeAt(e) === 10 && e++, A++, O$1 = e);
|
|
1865
|
+
}
|
|
1866
|
+
return c || (e++, b$1 = 1), u = n.substring(T$1, e), k$1 = 13;
|
|
1867
|
+
}
|
|
1868
|
+
return u += String.fromCharCode(i), e++, k$1 = 16;
|
|
1869
|
+
case 45: if (u += String.fromCharCode(i), e++, e === g$1 || !L(n.charCodeAt(e))) return k$1 = 16;
|
|
1870
|
+
case 48:
|
|
1871
|
+
case 49:
|
|
1872
|
+
case 50:
|
|
1873
|
+
case 51:
|
|
1874
|
+
case 52:
|
|
1875
|
+
case 53:
|
|
1876
|
+
case 54:
|
|
1877
|
+
case 55:
|
|
1878
|
+
case 56:
|
|
1879
|
+
case 57: return u += F(), k$1 = 11;
|
|
1880
|
+
default:
|
|
1881
|
+
for (; e < g$1 && v$1(i);) e++, i = n.charCodeAt(e);
|
|
1882
|
+
if (p !== e) {
|
|
1883
|
+
switch (u = n.substring(p, e), u) {
|
|
1884
|
+
case "true": return k$1 = 8;
|
|
1885
|
+
case "false": return k$1 = 9;
|
|
1886
|
+
case "null": return k$1 = 7;
|
|
1887
|
+
}
|
|
1888
|
+
return k$1 = 16;
|
|
1889
|
+
}
|
|
1890
|
+
return u += String.fromCharCode(i), e++, k$1 = 16;
|
|
2030
1891
|
}
|
|
2031
|
-
return obj;
|
|
2032
1892
|
}
|
|
2033
|
-
function
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
const length = keys.length;
|
|
2045
|
-
let decrypted;
|
|
2046
|
-
for (let i = 0; i < length; i++) try {
|
|
2047
|
-
const attrs = _instructions(result, keys[i].trim());
|
|
2048
|
-
decrypted = DotenvModule.decrypt(attrs.ciphertext, attrs.key);
|
|
2049
|
-
break;
|
|
2050
|
-
} catch (error) {
|
|
2051
|
-
if (i + 1 >= length) throw error;
|
|
1893
|
+
function v$1(i) {
|
|
1894
|
+
if (J(i) || r(i)) return !1;
|
|
1895
|
+
switch (i) {
|
|
1896
|
+
case 125:
|
|
1897
|
+
case 93:
|
|
1898
|
+
case 123:
|
|
1899
|
+
case 91:
|
|
1900
|
+
case 34:
|
|
1901
|
+
case 58:
|
|
1902
|
+
case 44:
|
|
1903
|
+
case 47: return !1;
|
|
2052
1904
|
}
|
|
2053
|
-
return
|
|
2054
|
-
}
|
|
2055
|
-
function _warn(message) {
|
|
2056
|
-
console.error(`[dotenv@${version}][WARN] ${message}`);
|
|
2057
|
-
}
|
|
2058
|
-
function _debug(message) {
|
|
2059
|
-
console.log(`[dotenv@${version}][DEBUG] ${message}`);
|
|
1905
|
+
return !0;
|
|
2060
1906
|
}
|
|
2061
|
-
function
|
|
2062
|
-
|
|
1907
|
+
function j$1() {
|
|
1908
|
+
let i;
|
|
1909
|
+
do
|
|
1910
|
+
i = w$1();
|
|
1911
|
+
while (i >= 12 && i <= 15);
|
|
1912
|
+
return i;
|
|
2063
1913
|
}
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
1914
|
+
return {
|
|
1915
|
+
setPosition: V,
|
|
1916
|
+
getPosition: () => e,
|
|
1917
|
+
scan: l ? j$1 : w$1,
|
|
1918
|
+
getToken: () => k$1,
|
|
1919
|
+
getTokenValue: () => u,
|
|
1920
|
+
getTokenOffset: () => p,
|
|
1921
|
+
getTokenLength: () => e - p,
|
|
1922
|
+
getTokenStartLine: () => o,
|
|
1923
|
+
getTokenStartCharacter: () => p - B,
|
|
1924
|
+
getTokenError: () => b$1
|
|
1925
|
+
};
|
|
1926
|
+
}
|
|
1927
|
+
function J(n) {
|
|
1928
|
+
return n === 32 || n === 9;
|
|
1929
|
+
}
|
|
1930
|
+
function r(n) {
|
|
1931
|
+
return n === 10 || n === 13;
|
|
1932
|
+
}
|
|
1933
|
+
function L(n) {
|
|
1934
|
+
return n >= 48 && n <= 57;
|
|
1935
|
+
}
|
|
1936
|
+
var Q;
|
|
1937
|
+
(function(n) {
|
|
1938
|
+
n[n.lineFeed = 10] = "lineFeed", n[n.carriageReturn = 13] = "carriageReturn", n[n.space = 32] = "space", n[n._0 = 48] = "_0", n[n._1 = 49] = "_1", n[n._2 = 50] = "_2", n[n._3 = 51] = "_3", n[n._4 = 52] = "_4", n[n._5 = 53] = "_5", n[n._6 = 54] = "_6", n[n._7 = 55] = "_7", n[n._8 = 56] = "_8", n[n._9 = 57] = "_9", n[n.a = 97] = "a", n[n.b = 98] = "b", n[n.c = 99] = "c", n[n.d = 100] = "d", n[n.e = 101] = "e", n[n.f = 102] = "f", n[n.g = 103] = "g", n[n.h = 104] = "h", n[n.i = 105] = "i", n[n.j = 106] = "j", n[n.k = 107] = "k", n[n.l = 108] = "l", n[n.m = 109] = "m", n[n.n = 110] = "n", n[n.o = 111] = "o", n[n.p = 112] = "p", n[n.q = 113] = "q", n[n.r = 114] = "r", n[n.s = 115] = "s", n[n.t = 116] = "t", n[n.u = 117] = "u", n[n.v = 118] = "v", n[n.w = 119] = "w", n[n.x = 120] = "x", n[n.y = 121] = "y", n[n.z = 122] = "z", n[n.A = 65] = "A", n[n.B = 66] = "B", n[n.C = 67] = "C", n[n.D = 68] = "D", n[n.E = 69] = "E", n[n.F = 70] = "F", n[n.G = 71] = "G", n[n.H = 72] = "H", n[n.I = 73] = "I", n[n.J = 74] = "J", n[n.K = 75] = "K", n[n.L = 76] = "L", n[n.M = 77] = "M", n[n.N = 78] = "N", n[n.O = 79] = "O", n[n.P = 80] = "P", n[n.Q = 81] = "Q", n[n.R = 82] = "R", n[n.S = 83] = "S", n[n.T = 84] = "T", n[n.U = 85] = "U", n[n.V = 86] = "V", n[n.W = 87] = "W", n[n.X = 88] = "X", n[n.Y = 89] = "Y", n[n.Z = 90] = "Z", n[n.asterisk = 42] = "asterisk", n[n.backslash = 92] = "backslash", n[n.closeBrace = 125] = "closeBrace", n[n.closeBracket = 93] = "closeBracket", n[n.colon = 58] = "colon", n[n.comma = 44] = "comma", n[n.dot = 46] = "dot", n[n.doubleQuote = 34] = "doubleQuote", n[n.minus = 45] = "minus", n[n.openBrace = 123] = "openBrace", n[n.openBracket = 91] = "openBracket", n[n.plus = 43] = "plus", n[n.slash = 47] = "slash", n[n.formFeed = 12] = "formFeed", n[n.tab = 9] = "tab";
|
|
1939
|
+
})(Q || (Q = {})), new Array(20).fill(0).map((n, l) => " ".repeat(l));
|
|
1940
|
+
const N = 200;
|
|
1941
|
+
new Array(N).fill(0).map((n, l) => `
|
|
1942
|
+
` + " ".repeat(l)), new Array(N).fill(0).map((n, l) => "\r" + " ".repeat(l)), new Array(N).fill(0).map((n, l) => `\r
|
|
1943
|
+
` + " ".repeat(l)), new Array(N).fill(0).map((n, l) => `
|
|
1944
|
+
` + " ".repeat(l)), new Array(N).fill(0).map((n, l) => "\r" + " ".repeat(l)), new Array(N).fill(0).map((n, l) => `\r
|
|
1945
|
+
` + " ".repeat(l));
|
|
1946
|
+
var U;
|
|
1947
|
+
(function(n) {
|
|
1948
|
+
n.DEFAULT = { allowTrailingComma: !1 };
|
|
1949
|
+
})(U || (U = {}));
|
|
1950
|
+
function S$1(n, l = [], g$1 = U.DEFAULT) {
|
|
1951
|
+
let e = null, u = [];
|
|
1952
|
+
const p = [];
|
|
1953
|
+
function k$1(o) {
|
|
1954
|
+
Array.isArray(u) ? u.push(o) : e !== null && (u[e] = o);
|
|
2068
1955
|
}
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
}
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
}
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
const ciphertext = result.parsed[environmentKey];
|
|
2095
|
-
if (!ciphertext) {
|
|
2096
|
-
const err = /* @__PURE__ */ new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${environmentKey} in your .env.vault file.`);
|
|
2097
|
-
err.code = "NOT_FOUND_DOTENV_ENVIRONMENT";
|
|
2098
|
-
throw err;
|
|
1956
|
+
return P(n, {
|
|
1957
|
+
onObjectBegin: () => {
|
|
1958
|
+
const o = {};
|
|
1959
|
+
k$1(o), p.push(u), u = o, e = null;
|
|
1960
|
+
},
|
|
1961
|
+
onObjectProperty: (o) => {
|
|
1962
|
+
e = o;
|
|
1963
|
+
},
|
|
1964
|
+
onObjectEnd: () => {
|
|
1965
|
+
u = p.pop();
|
|
1966
|
+
},
|
|
1967
|
+
onArrayBegin: () => {
|
|
1968
|
+
const o = [];
|
|
1969
|
+
k$1(o), p.push(u), u = o, e = null;
|
|
1970
|
+
},
|
|
1971
|
+
onArrayEnd: () => {
|
|
1972
|
+
u = p.pop();
|
|
1973
|
+
},
|
|
1974
|
+
onLiteralValue: k$1,
|
|
1975
|
+
onError: (o, O$1, B) => {
|
|
1976
|
+
l.push({
|
|
1977
|
+
error: o,
|
|
1978
|
+
offset: O$1,
|
|
1979
|
+
length: B
|
|
1980
|
+
});
|
|
2099
1981
|
}
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
1982
|
+
}, g$1), u[0];
|
|
1983
|
+
}
|
|
1984
|
+
function P(n, l, g$1 = U.DEFAULT) {
|
|
1985
|
+
const e = $(n, !1), u = [];
|
|
1986
|
+
let p = 0;
|
|
1987
|
+
function k$1(f) {
|
|
1988
|
+
return f ? () => p === 0 && f(e.getTokenOffset(), e.getTokenLength(), e.getTokenStartLine(), e.getTokenStartCharacter()) : () => !0;
|
|
2104
1989
|
}
|
|
2105
|
-
function
|
|
2106
|
-
|
|
2107
|
-
if (options && options.path && options.path.length > 0) if (Array.isArray(options.path)) {
|
|
2108
|
-
for (const filepath of options.path) if (fs$1.existsSync(filepath)) possibleVaultPath = filepath.endsWith(".vault") ? filepath : `${filepath}.vault`;
|
|
2109
|
-
} else possibleVaultPath = options.path.endsWith(".vault") ? options.path : `${options.path}.vault`;
|
|
2110
|
-
else possibleVaultPath = path$1.resolve(process.cwd(), ".env.vault");
|
|
2111
|
-
if (fs$1.existsSync(possibleVaultPath)) return possibleVaultPath;
|
|
2112
|
-
return null;
|
|
1990
|
+
function A(f) {
|
|
1991
|
+
return f ? (m$1) => p === 0 && f(m$1, e.getTokenOffset(), e.getTokenLength(), e.getTokenStartLine(), e.getTokenStartCharacter()) : () => !0;
|
|
2113
1992
|
}
|
|
2114
|
-
function
|
|
2115
|
-
return
|
|
1993
|
+
function o(f) {
|
|
1994
|
+
return f ? (m$1) => p === 0 && f(m$1, e.getTokenOffset(), e.getTokenLength(), e.getTokenStartLine(), e.getTokenStartCharacter(), () => u.slice()) : () => !0;
|
|
2116
1995
|
}
|
|
2117
|
-
function
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
const parsed = DotenvModule._parseVault(options);
|
|
2122
|
-
let processEnv = process.env;
|
|
2123
|
-
if (options && options.processEnv != null) processEnv = options.processEnv;
|
|
2124
|
-
DotenvModule.populate(processEnv, parsed, options);
|
|
2125
|
-
return { parsed };
|
|
1996
|
+
function O$1(f) {
|
|
1997
|
+
return f ? () => {
|
|
1998
|
+
p > 0 ? p++ : f(e.getTokenOffset(), e.getTokenLength(), e.getTokenStartLine(), e.getTokenStartCharacter(), () => u.slice()) === !1 && (p = 1);
|
|
1999
|
+
} : () => !0;
|
|
2126
2000
|
}
|
|
2127
|
-
function
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2001
|
+
function B(f) {
|
|
2002
|
+
return f ? () => {
|
|
2003
|
+
p > 0 && p--, p === 0 && f(e.getTokenOffset(), e.getTokenLength(), e.getTokenStartLine(), e.getTokenStartCharacter());
|
|
2004
|
+
} : () => !0;
|
|
2005
|
+
}
|
|
2006
|
+
const b$1 = O$1(l.onObjectBegin), I$1 = o(l.onObjectProperty), V = B(l.onObjectEnd), F = O$1(l.onArrayBegin), a = B(l.onArrayEnd), w$1 = o(l.onLiteralValue), v$1 = A(l.onSeparator), j$1 = k$1(l.onComment), i = A(l.onError), T$1 = g$1 && g$1.disallowComments, s = g$1 && g$1.allowTrailingComma;
|
|
2007
|
+
function c() {
|
|
2008
|
+
for (;;) {
|
|
2009
|
+
const f = e.scan();
|
|
2010
|
+
switch (e.getTokenError()) {
|
|
2011
|
+
case 4:
|
|
2012
|
+
t(14);
|
|
2013
|
+
break;
|
|
2014
|
+
case 5:
|
|
2015
|
+
t(15);
|
|
2016
|
+
break;
|
|
2017
|
+
case 3:
|
|
2018
|
+
t(13);
|
|
2019
|
+
break;
|
|
2020
|
+
case 1:
|
|
2021
|
+
T$1 || t(11);
|
|
2022
|
+
break;
|
|
2023
|
+
case 2:
|
|
2024
|
+
t(12);
|
|
2025
|
+
break;
|
|
2026
|
+
case 6:
|
|
2027
|
+
t(16);
|
|
2028
|
+
break;
|
|
2029
|
+
}
|
|
2030
|
+
switch (f) {
|
|
2031
|
+
case 12:
|
|
2032
|
+
case 13:
|
|
2033
|
+
T$1 ? t(10) : j$1();
|
|
2034
|
+
break;
|
|
2035
|
+
case 16:
|
|
2036
|
+
t(1);
|
|
2037
|
+
break;
|
|
2038
|
+
case 15:
|
|
2039
|
+
case 14: break;
|
|
2040
|
+
default: return f;
|
|
2041
|
+
}
|
|
2150
2042
|
}
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
if (debug) _debug(`Failed to load ${filePath} ${e.message}`);
|
|
2162
|
-
lastError = e;
|
|
2043
|
+
}
|
|
2044
|
+
function t(f, m$1 = [], y = []) {
|
|
2045
|
+
if (i(f), m$1.length + y.length > 0) {
|
|
2046
|
+
let _$1 = e.getToken();
|
|
2047
|
+
for (; _$1 !== 17;) {
|
|
2048
|
+
if (m$1.indexOf(_$1) !== -1) {
|
|
2049
|
+
c();
|
|
2050
|
+
break;
|
|
2051
|
+
} else if (y.indexOf(_$1) !== -1) break;
|
|
2052
|
+
_$1 = c();
|
|
2163
2053
|
}
|
|
2164
|
-
_log(`injecting env (${keysCount}) from ${shortPaths.join(",")} ${dim(`-- tip: ${_getRandomTip()}`)}`);
|
|
2165
2054
|
}
|
|
2166
|
-
if (lastError) return {
|
|
2167
|
-
parsed: parsedAll,
|
|
2168
|
-
error: lastError
|
|
2169
|
-
};
|
|
2170
|
-
else return { parsed: parsedAll };
|
|
2171
2055
|
}
|
|
2172
|
-
function
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2056
|
+
function D(f) {
|
|
2057
|
+
const m$1 = e.getTokenValue();
|
|
2058
|
+
return f ? w$1(m$1) : (I$1(m$1), u.push(m$1)), c(), !0;
|
|
2059
|
+
}
|
|
2060
|
+
function G() {
|
|
2061
|
+
switch (e.getToken()) {
|
|
2062
|
+
case 11:
|
|
2063
|
+
const f = e.getTokenValue();
|
|
2064
|
+
let m$1 = Number(f);
|
|
2065
|
+
isNaN(m$1) && (t(2), m$1 = 0), w$1(m$1);
|
|
2066
|
+
break;
|
|
2067
|
+
case 7:
|
|
2068
|
+
w$1(null);
|
|
2069
|
+
break;
|
|
2070
|
+
case 8:
|
|
2071
|
+
w$1(!0);
|
|
2072
|
+
break;
|
|
2073
|
+
case 9:
|
|
2074
|
+
w$1(!1);
|
|
2075
|
+
break;
|
|
2076
|
+
default: return !1;
|
|
2178
2077
|
}
|
|
2179
|
-
return
|
|
2078
|
+
return c(), !0;
|
|
2180
2079
|
}
|
|
2181
|
-
function
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
const isRange = error instanceof RangeError;
|
|
2193
|
-
const invalidKeyLength = error.message === "Invalid key length";
|
|
2194
|
-
const decryptionFailed = error.message === "Unsupported state or unable to authenticate data";
|
|
2195
|
-
if (isRange || invalidKeyLength) {
|
|
2196
|
-
const err = /* @__PURE__ */ new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");
|
|
2197
|
-
err.code = "INVALID_DOTENV_KEY";
|
|
2198
|
-
throw err;
|
|
2199
|
-
} else if (decryptionFailed) {
|
|
2200
|
-
const err = /* @__PURE__ */ new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");
|
|
2201
|
-
err.code = "DECRYPTION_FAILED";
|
|
2202
|
-
throw err;
|
|
2203
|
-
} else throw error;
|
|
2080
|
+
function M() {
|
|
2081
|
+
return e.getToken() !== 10 ? (t(3, [], [2, 5]), !1) : (D(!1), e.getToken() === 6 ? (v$1(":"), c(), E$1() || t(4, [], [2, 5])) : t(5, [], [2, 5]), u.pop(), !0);
|
|
2082
|
+
}
|
|
2083
|
+
function X() {
|
|
2084
|
+
b$1(), c();
|
|
2085
|
+
let f = !1;
|
|
2086
|
+
for (; e.getToken() !== 2 && e.getToken() !== 17;) {
|
|
2087
|
+
if (e.getToken() === 5) {
|
|
2088
|
+
if (f || t(4, [], []), v$1(","), c(), e.getToken() === 2 && s) break;
|
|
2089
|
+
} else f && t(6, [], []);
|
|
2090
|
+
M() || t(4, [], [2, 5]), f = !0;
|
|
2204
2091
|
}
|
|
2092
|
+
return V(), e.getToken() !== 2 ? t(7, [2], []) : c(), !0;
|
|
2205
2093
|
}
|
|
2206
|
-
function
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2094
|
+
function Y() {
|
|
2095
|
+
F(), c();
|
|
2096
|
+
let f = !0, m$1 = !1;
|
|
2097
|
+
for (; e.getToken() !== 4 && e.getToken() !== 17;) {
|
|
2098
|
+
if (e.getToken() === 5) {
|
|
2099
|
+
if (m$1 || t(4, [], []), v$1(","), c(), e.getToken() === 4 && s) break;
|
|
2100
|
+
} else m$1 && t(6, [], []);
|
|
2101
|
+
f ? (u.push(0), f = !1) : u[u.length - 1]++, E$1() || t(4, [], [4, 5]), m$1 = !0;
|
|
2214
2102
|
}
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
processEnv[key] = parsed[key];
|
|
2224
|
-
populated[key] = parsed[key];
|
|
2103
|
+
return a(), f || u.pop(), e.getToken() !== 4 ? t(8, [4], []) : c(), !0;
|
|
2104
|
+
}
|
|
2105
|
+
function E$1() {
|
|
2106
|
+
switch (e.getToken()) {
|
|
2107
|
+
case 3: return Y();
|
|
2108
|
+
case 1: return X();
|
|
2109
|
+
case 10: return D(!0);
|
|
2110
|
+
default: return G();
|
|
2225
2111
|
}
|
|
2226
|
-
return populated;
|
|
2227
2112
|
}
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2113
|
+
return c(), e.getToken() === 17 ? g$1.allowEmptyContent ? !0 : (t(4, [], []), !1) : E$1() ? (e.getToken() !== 17 && t(9, [], []), !0) : (t(4, [], []), !1);
|
|
2114
|
+
}
|
|
2115
|
+
var W;
|
|
2116
|
+
(function(n) {
|
|
2117
|
+
n[n.None = 0] = "None", n[n.UnexpectedEndOfComment = 1] = "UnexpectedEndOfComment", n[n.UnexpectedEndOfString = 2] = "UnexpectedEndOfString", n[n.UnexpectedEndOfNumber = 3] = "UnexpectedEndOfNumber", n[n.InvalidUnicode = 4] = "InvalidUnicode", n[n.InvalidEscapeCharacter = 5] = "InvalidEscapeCharacter", n[n.InvalidCharacter = 6] = "InvalidCharacter";
|
|
2118
|
+
})(W || (W = {}));
|
|
2119
|
+
var H;
|
|
2120
|
+
(function(n) {
|
|
2121
|
+
n[n.OpenBraceToken = 1] = "OpenBraceToken", n[n.CloseBraceToken = 2] = "CloseBraceToken", n[n.OpenBracketToken = 3] = "OpenBracketToken", n[n.CloseBracketToken = 4] = "CloseBracketToken", n[n.CommaToken = 5] = "CommaToken", n[n.ColonToken = 6] = "ColonToken", n[n.NullKeyword = 7] = "NullKeyword", n[n.TrueKeyword = 8] = "TrueKeyword", n[n.FalseKeyword = 9] = "FalseKeyword", n[n.StringLiteral = 10] = "StringLiteral", n[n.NumericLiteral = 11] = "NumericLiteral", n[n.LineCommentTrivia = 12] = "LineCommentTrivia", n[n.BlockCommentTrivia = 13] = "BlockCommentTrivia", n[n.LineBreakTrivia = 14] = "LineBreakTrivia", n[n.Trivia = 15] = "Trivia", n[n.Unknown = 16] = "Unknown", n[n.EOF = 17] = "EOF";
|
|
2122
|
+
})(H || (H = {}));
|
|
2123
|
+
const K = S$1;
|
|
2124
|
+
var q;
|
|
2125
|
+
(function(n) {
|
|
2126
|
+
n[n.InvalidSymbol = 1] = "InvalidSymbol", n[n.InvalidNumberFormat = 2] = "InvalidNumberFormat", n[n.PropertyNameExpected = 3] = "PropertyNameExpected", n[n.ValueExpected = 4] = "ValueExpected", n[n.ColonExpected = 5] = "ColonExpected", n[n.CommaExpected = 6] = "CommaExpected", n[n.CloseBraceExpected = 7] = "CloseBraceExpected", n[n.CloseBracketExpected = 8] = "CloseBracketExpected", n[n.EndOfFileExpected = 9] = "EndOfFileExpected", n[n.InvalidCommentToken = 10] = "InvalidCommentToken", n[n.UnexpectedEndOfComment = 11] = "UnexpectedEndOfComment", n[n.UnexpectedEndOfString = 12] = "UnexpectedEndOfString", n[n.UnexpectedEndOfNumber = 13] = "UnexpectedEndOfNumber", n[n.InvalidUnicode = 14] = "InvalidUnicode", n[n.InvalidEscapeCharacter = 15] = "InvalidEscapeCharacter", n[n.InvalidCharacter = 16] = "InvalidCharacter";
|
|
2127
|
+
})(q || (q = {}));
|
|
2128
|
+
function x$1(n, l) {
|
|
2129
|
+
const g$1 = JSON.parse(n, l?.reviver);
|
|
2130
|
+
return N$1(n, g$1, l), g$1;
|
|
2131
|
+
}
|
|
2132
|
+
function h(n, l) {
|
|
2133
|
+
const g$1 = K(n, l?.errors, l);
|
|
2134
|
+
return N$1(n, g$1, l), g$1;
|
|
2135
|
+
}
|
|
2136
|
+
|
|
2137
|
+
//#endregion
|
|
2138
|
+
//#region node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/ini.mjs
|
|
2139
|
+
var O, x;
|
|
2140
|
+
function j() {
|
|
2141
|
+
if (x) return O;
|
|
2142
|
+
x = 1;
|
|
2143
|
+
const { hasOwnProperty: y } = Object.prototype, d$1 = (e, t = {}) => {
|
|
2144
|
+
typeof t == "string" && (t = { section: t }), t.align = t.align === !0, t.newline = t.newline === !0, t.sort = t.sort === !0, t.whitespace = t.whitespace === !0 || t.align === !0, t.platform = t.platform || typeof process < "u" && process.platform, t.bracketedArray = t.bracketedArray !== !1;
|
|
2145
|
+
const s = t.platform === "win32" ? `\r
|
|
2146
|
+
` : `
|
|
2147
|
+
`, r$1 = t.whitespace ? " = " : "=", c = [], o = t.sort ? Object.keys(e).sort() : Object.keys(e);
|
|
2148
|
+
let g$1 = 0;
|
|
2149
|
+
t.align && (g$1 = h$2(o.filter((n) => e[n] === null || Array.isArray(e[n]) || typeof e[n] != "object").map((n) => Array.isArray(e[n]) ? `${n}[]` : n).concat([""]).reduce((n, i) => h$2(n).length >= h$2(i).length ? n : i)).length);
|
|
2150
|
+
let l = "";
|
|
2151
|
+
const m$1 = t.bracketedArray ? "[]" : "";
|
|
2152
|
+
for (const n of o) {
|
|
2153
|
+
const i = e[n];
|
|
2154
|
+
if (i && Array.isArray(i)) for (const f of i) l += h$2(`${n}${m$1}`).padEnd(g$1, " ") + r$1 + h$2(f) + s;
|
|
2155
|
+
else i && typeof i == "object" ? c.push(n) : l += h$2(n).padEnd(g$1, " ") + r$1 + h$2(i) + s;
|
|
2156
|
+
}
|
|
2157
|
+
t.section && l.length && (l = "[" + h$2(t.section) + "]" + (t.newline ? s + s : s) + l);
|
|
2158
|
+
for (const n of c) {
|
|
2159
|
+
const i = k$1(n, ".").join("\\."), f = (t.section ? t.section + "." : "") + i, u = d$1(e[n], {
|
|
2160
|
+
...t,
|
|
2161
|
+
section: f
|
|
2162
|
+
});
|
|
2163
|
+
l.length && u.length && (l += s), l += u;
|
|
2164
|
+
}
|
|
2165
|
+
return l;
|
|
2166
|
+
};
|
|
2167
|
+
function k$1(e, t) {
|
|
2168
|
+
var s = 0, r$1 = 0, c = 0, o = [];
|
|
2169
|
+
do
|
|
2170
|
+
if (c = e.indexOf(t, s), c !== -1) {
|
|
2171
|
+
if (s = c + t.length, c > 0 && e[c - 1] === "\\") continue;
|
|
2172
|
+
o.push(e.slice(r$1, c)), r$1 = c + t.length;
|
|
2173
|
+
}
|
|
2174
|
+
while (c !== -1);
|
|
2175
|
+
return o.push(e.slice(r$1)), o;
|
|
2176
|
+
}
|
|
2177
|
+
const w$1 = (e, t = {}) => {
|
|
2178
|
+
t.bracketedArray = t.bracketedArray !== !1;
|
|
2179
|
+
const s = Object.create(null);
|
|
2180
|
+
let r$1 = s, c = null;
|
|
2181
|
+
const o = /^\[([^\]]*)\]\s*$|^([^=]+)(=(.*))?$/i, g$1 = e.split(/[\r\n]+/g), l = {};
|
|
2182
|
+
for (const n of g$1) {
|
|
2183
|
+
if (!n || n.match(/^\s*[;#]/) || n.match(/^\s*$/)) continue;
|
|
2184
|
+
const i = n.match(o);
|
|
2185
|
+
if (!i) continue;
|
|
2186
|
+
if (i[1] !== void 0) {
|
|
2187
|
+
if (c = A(i[1]), c === "__proto__") {
|
|
2188
|
+
r$1 = Object.create(null);
|
|
2189
|
+
continue;
|
|
2190
|
+
}
|
|
2191
|
+
r$1 = s[c] = s[c] || Object.create(null);
|
|
2192
|
+
continue;
|
|
2193
|
+
}
|
|
2194
|
+
const f = A(i[2]);
|
|
2195
|
+
let u;
|
|
2196
|
+
t.bracketedArray ? u = f.length > 2 && f.slice(-2) === "[]" : (l[f] = (l?.[f] || 0) + 1, u = l[f] > 1);
|
|
2197
|
+
const a = u && f.endsWith("[]") ? f.slice(0, -2) : f;
|
|
2198
|
+
if (a === "__proto__") continue;
|
|
2199
|
+
const p = i[3] ? A(i[4]) : !0, b$1 = p === "true" || p === "false" || p === "null" ? JSON.parse(p) : p;
|
|
2200
|
+
u && (y.call(r$1, a) ? Array.isArray(r$1[a]) || (r$1[a] = [r$1[a]]) : r$1[a] = []), Array.isArray(r$1[a]) ? r$1[a].push(b$1) : r$1[a] = b$1;
|
|
2201
|
+
}
|
|
2202
|
+
const m$1 = [];
|
|
2203
|
+
for (const n of Object.keys(s)) {
|
|
2204
|
+
if (!y.call(s, n) || typeof s[n] != "object" || Array.isArray(s[n])) continue;
|
|
2205
|
+
const i = k$1(n, ".");
|
|
2206
|
+
r$1 = s;
|
|
2207
|
+
const f = i.pop(), u = f.replace(/\\\./g, ".");
|
|
2208
|
+
for (const a of i) a !== "__proto__" && ((!y.call(r$1, a) || typeof r$1[a] != "object") && (r$1[a] = Object.create(null)), r$1 = r$1[a]);
|
|
2209
|
+
r$1 === s && u === f || (r$1[u] = s[n], m$1.push(n));
|
|
2210
|
+
}
|
|
2211
|
+
for (const n of m$1) delete s[n];
|
|
2212
|
+
return s;
|
|
2213
|
+
}, _$1 = (e) => e.startsWith("\"") && e.endsWith("\"") || e.startsWith("'") && e.endsWith("'"), h$2 = (e) => typeof e != "string" || e.match(/[=\r\n]/) || e.match(/^\[/) || e.length > 1 && _$1(e) || e !== e.trim() ? JSON.stringify(e) : e.split(";").join("\\;").split("#").join("\\#"), A = (e) => {
|
|
2214
|
+
if (e = (e || "").trim(), _$1(e)) {
|
|
2215
|
+
e.charAt(0) === "'" && (e = e.slice(1, -1));
|
|
2216
|
+
try {
|
|
2217
|
+
e = JSON.parse(e);
|
|
2218
|
+
} catch {}
|
|
2219
|
+
} else {
|
|
2220
|
+
let t = !1, s = "";
|
|
2221
|
+
for (let r$1 = 0, c = e.length; r$1 < c; r$1++) {
|
|
2222
|
+
const o = e.charAt(r$1);
|
|
2223
|
+
if (t) "\\;#".indexOf(o) !== -1 ? s += o : s += "\\" + o, t = !1;
|
|
2224
|
+
else {
|
|
2225
|
+
if (";#".indexOf(o) !== -1) break;
|
|
2226
|
+
o === "\\" ? t = !0 : s += o;
|
|
2227
|
+
}
|
|
2228
|
+
}
|
|
2229
|
+
return t && (s += "\\"), s.trim();
|
|
2230
|
+
}
|
|
2231
|
+
return e;
|
|
2236
2232
|
};
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
}));
|
|
2246
|
-
|
|
2247
|
-
//#endregion
|
|
2248
|
-
//#region node_modules/.pnpm/rc9@2.1.2/node_modules/rc9/dist/index.mjs
|
|
2249
|
-
function isBuffer(obj) {
|
|
2250
|
-
return obj && obj.constructor && typeof obj.constructor.isBuffer === "function" && obj.constructor.isBuffer(obj);
|
|
2233
|
+
return O = {
|
|
2234
|
+
parse: w$1,
|
|
2235
|
+
decode: w$1,
|
|
2236
|
+
stringify: d$1,
|
|
2237
|
+
encode: d$1,
|
|
2238
|
+
safe: h$2,
|
|
2239
|
+
unsafe: A
|
|
2240
|
+
}, O;
|
|
2251
2241
|
}
|
|
2252
|
-
|
|
2253
|
-
|
|
2242
|
+
var I = j();
|
|
2243
|
+
function S(y, d$1) {
|
|
2244
|
+
return I.parse(y, d$1);
|
|
2254
2245
|
}
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
const type$1 = Object.prototype.toString.call(value);
|
|
2267
|
-
const isbuffer = isBuffer(value);
|
|
2268
|
-
const isobject = type$1 === "[object Object]" || type$1 === "[object Array]";
|
|
2269
|
-
const newKey = prev ? prev + delimiter$1 + transformKey(key) : transformKey(key);
|
|
2270
|
-
if (!isarray && !isbuffer && isobject && Object.keys(value).length && (!opts.maxDepth || currentDepth < maxDepth)) return step(value, newKey, currentDepth + 1);
|
|
2271
|
-
output[newKey] = value;
|
|
2272
|
-
});
|
|
2246
|
+
|
|
2247
|
+
//#endregion
|
|
2248
|
+
//#region node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.mjs
|
|
2249
|
+
const defaultFindOptions = {
|
|
2250
|
+
startingFrom: ".",
|
|
2251
|
+
rootPattern: /^node_modules$/,
|
|
2252
|
+
reverse: false,
|
|
2253
|
+
test: (filePath) => {
|
|
2254
|
+
try {
|
|
2255
|
+
if (statSync(filePath).isFile()) return true;
|
|
2256
|
+
} catch {}
|
|
2273
2257
|
}
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
const
|
|
2282
|
-
const
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2258
|
+
};
|
|
2259
|
+
async function findFile(filename, _options = {}) {
|
|
2260
|
+
const filenames = Array.isArray(filename) ? filename : [filename];
|
|
2261
|
+
const options = {
|
|
2262
|
+
...defaultFindOptions,
|
|
2263
|
+
..._options
|
|
2264
|
+
};
|
|
2265
|
+
const basePath = resolve$1(options.startingFrom);
|
|
2266
|
+
const leadingSlash = basePath[0] === "/";
|
|
2267
|
+
const segments = basePath.split("/").filter(Boolean);
|
|
2268
|
+
if (filenames.includes(segments.at(-1)) && await options.test(basePath)) return basePath;
|
|
2269
|
+
if (leadingSlash) segments[0] = "/" + segments[0];
|
|
2270
|
+
let root = segments.findIndex((r$1) => r$1.match(options.rootPattern));
|
|
2271
|
+
if (root === -1) root = 0;
|
|
2272
|
+
if (options.reverse) for (let index = root + 1; index <= segments.length; index++) for (const filename2 of filenames) {
|
|
2273
|
+
const filePath = join$1(...segments.slice(0, index), filename2);
|
|
2274
|
+
if (await options.test(filePath)) return filePath;
|
|
2287
2275
|
}
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
return result$1;
|
|
2292
|
-
}, recipient);
|
|
2276
|
+
else for (let index = segments.length; index > root; index--) for (const filename2 of filenames) {
|
|
2277
|
+
const filePath = join$1(...segments.slice(0, index), filename2);
|
|
2278
|
+
if (await options.test(filePath)) return filePath;
|
|
2293
2279
|
}
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2280
|
+
throw new Error(`Cannot find matching ${filename} in ${options.startingFrom} or parent directories`);
|
|
2281
|
+
}
|
|
2282
|
+
function findNearestFile(filename, options = {}) {
|
|
2283
|
+
return findFile(filename, options);
|
|
2284
|
+
}
|
|
2285
|
+
function _resolvePath(id, opts = {}) {
|
|
2286
|
+
if (id instanceof URL || id.startsWith("file://")) return normalize$1(fileURLToPath(id));
|
|
2287
|
+
if (isAbsolute$1(id)) return normalize$1(id);
|
|
2288
|
+
return resolveModulePath(id, {
|
|
2289
|
+
...opts,
|
|
2290
|
+
from: opts.from || opts.parent || opts.url
|
|
2291
|
+
});
|
|
2292
|
+
}
|
|
2293
|
+
const lockFiles = [
|
|
2294
|
+
"yarn.lock",
|
|
2295
|
+
"package-lock.json",
|
|
2296
|
+
"pnpm-lock.yaml",
|
|
2297
|
+
"npm-shrinkwrap.json",
|
|
2298
|
+
"bun.lockb",
|
|
2299
|
+
"bun.lock",
|
|
2300
|
+
"deno.lock"
|
|
2301
|
+
];
|
|
2302
|
+
const packageFiles = [
|
|
2303
|
+
"package.json",
|
|
2304
|
+
"package.json5",
|
|
2305
|
+
"package.yaml"
|
|
2306
|
+
];
|
|
2307
|
+
const workspaceFiles = [
|
|
2308
|
+
"pnpm-workspace.yaml",
|
|
2309
|
+
"lerna.json",
|
|
2310
|
+
"turbo.json",
|
|
2311
|
+
"rush.json",
|
|
2312
|
+
"deno.json",
|
|
2313
|
+
"deno.jsonc"
|
|
2314
|
+
];
|
|
2315
|
+
const FileCache = /* @__PURE__ */ new Map();
|
|
2316
|
+
async function readPackageJSON(id, options = {}) {
|
|
2317
|
+
const resolvedPath = await resolvePackageJSON(id, options);
|
|
2318
|
+
const cache$1 = options.cache && typeof options.cache !== "boolean" ? options.cache : FileCache;
|
|
2319
|
+
if (options.cache && cache$1.has(resolvedPath)) return cache$1.get(resolvedPath);
|
|
2320
|
+
const blob = await promises.readFile(resolvedPath, "utf8");
|
|
2321
|
+
let parsed;
|
|
2322
|
+
try {
|
|
2323
|
+
parsed = x$1(blob);
|
|
2324
|
+
} catch {
|
|
2325
|
+
parsed = h(blob);
|
|
2301
2326
|
}
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
Object.keys(target).forEach(function(key) {
|
|
2310
|
-
const split = key.split(delimiter$1).map(transformKey);
|
|
2311
|
-
let key1 = getkey(split.shift());
|
|
2312
|
-
let key2 = getkey(split[0]);
|
|
2313
|
-
let recipient = result;
|
|
2314
|
-
while (key2 !== void 0) {
|
|
2315
|
-
if (key1 === "__proto__") return;
|
|
2316
|
-
const type$1 = Object.prototype.toString.call(recipient[key1]);
|
|
2317
|
-
const isobject = type$1 === "[object Object]" || type$1 === "[object Array]";
|
|
2318
|
-
if (!overwrite && !isobject && typeof recipient[key1] !== "undefined") return;
|
|
2319
|
-
if (overwrite && !isobject || !overwrite && recipient[key1] == null) recipient[key1] = typeof key2 === "number" && !opts.object ? [] : {};
|
|
2320
|
-
recipient = recipient[key1];
|
|
2321
|
-
if (split.length > 0) {
|
|
2322
|
-
key1 = getkey(split.shift());
|
|
2323
|
-
key2 = getkey(split[0]);
|
|
2324
|
-
}
|
|
2325
|
-
}
|
|
2326
|
-
recipient[key1] = unflatten(target[key], opts);
|
|
2327
|
+
cache$1.set(resolvedPath, parsed);
|
|
2328
|
+
return parsed;
|
|
2329
|
+
}
|
|
2330
|
+
async function resolvePackageJSON(id = process.cwd(), options = {}) {
|
|
2331
|
+
return findNearestFile("package.json", {
|
|
2332
|
+
...options,
|
|
2333
|
+
startingFrom: _resolvePath(id, options)
|
|
2327
2334
|
});
|
|
2328
|
-
return result;
|
|
2329
2335
|
}
|
|
2330
|
-
const
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
flat: false
|
|
2336
|
+
const workspaceTests = {
|
|
2337
|
+
workspaceFile: (opts) => findFile(workspaceFiles, opts).then((r$1) => dirname$1(r$1)),
|
|
2338
|
+
gitConfig: (opts) => findFile(".git/config", opts).then((r$1) => resolve$1(r$1, "../..")),
|
|
2339
|
+
lockFile: (opts) => findFile(lockFiles, opts).then((r$1) => dirname$1(r$1)),
|
|
2340
|
+
packageJson: (opts) => findFile(packageFiles, opts).then((r$1) => dirname$1(r$1))
|
|
2336
2341
|
};
|
|
2337
|
-
function
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
const
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
const
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
config[nkey] = (config[nkey] || []).concat(value);
|
|
2356
|
-
continue;
|
|
2357
|
-
}
|
|
2358
|
-
config[key] = value;
|
|
2342
|
+
async function findWorkspaceDir(id = process.cwd(), options = {}) {
|
|
2343
|
+
const startingFrom = _resolvePath(id, options);
|
|
2344
|
+
const tests = options.tests || [
|
|
2345
|
+
"workspaceFile",
|
|
2346
|
+
"gitConfig",
|
|
2347
|
+
"lockFile",
|
|
2348
|
+
"packageJson"
|
|
2349
|
+
];
|
|
2350
|
+
for (const testName of tests) {
|
|
2351
|
+
const test = workspaceTests[testName];
|
|
2352
|
+
if (options[testName] === false || !test) continue;
|
|
2353
|
+
const direction = options[testName] || (testName === "gitConfig" ? "closest" : "furthest");
|
|
2354
|
+
const detected = await test({
|
|
2355
|
+
...options,
|
|
2356
|
+
startingFrom,
|
|
2357
|
+
reverse: direction === "furthest"
|
|
2358
|
+
}).catch(() => {});
|
|
2359
|
+
if (detected) return detected;
|
|
2359
2360
|
}
|
|
2360
|
-
|
|
2361
|
+
throw new Error(`Cannot detect workspace root from ${id}`);
|
|
2361
2362
|
}
|
|
2362
|
-
function
|
|
2363
|
-
|
|
2364
|
-
|
|
2363
|
+
async function resolveGitConfig(dir, opts) {
|
|
2364
|
+
return findNearestFile(".git/config", {
|
|
2365
|
+
...opts,
|
|
2366
|
+
startingFrom: dir
|
|
2367
|
+
});
|
|
2365
2368
|
}
|
|
2366
|
-
function
|
|
2367
|
-
|
|
2368
|
-
return parseFile(resolve(options.dir, options.name), options);
|
|
2369
|
+
async function readGitConfig(dir, opts) {
|
|
2370
|
+
return parseGitConfig(await readFile(await resolveGitConfig(dir, opts), "utf8"));
|
|
2369
2371
|
}
|
|
2370
|
-
function
|
|
2371
|
-
|
|
2372
|
-
options.dir = process.env.XDG_CONFIG_HOME || homedir();
|
|
2373
|
-
return read(options);
|
|
2372
|
+
function parseGitConfig(ini) {
|
|
2373
|
+
return S(ini.replaceAll(/^\[(\w+) "(.+)"\]$/gm, "[$1.$2]"));
|
|
2374
2374
|
}
|
|
2375
2375
|
|
|
2376
2376
|
//#endregion
|
|
@@ -2547,11 +2547,11 @@ function getDotEnvVars(targetEnvironment) {
|
|
|
2547
2547
|
}
|
|
2548
2548
|
const _normalize = (p) => p?.replace(/\\/g, "/");
|
|
2549
2549
|
const ASYNC_LOADERS = {
|
|
2550
|
-
".yaml": () => import("./confbox.mjs").then((n) => n.
|
|
2551
|
-
".yml": () => import("./confbox.mjs").then((n) => n.
|
|
2550
|
+
".yaml": () => import("./confbox.mjs").then((n) => n.c).then((r$1) => r$1.parseYAML),
|
|
2551
|
+
".yml": () => import("./confbox.mjs").then((n) => n.c).then((r$1) => r$1.parseYAML),
|
|
2552
2552
|
".jsonc": () => import("./confbox.mjs").then((n) => n.t).then((r$1) => r$1.parseJSONC),
|
|
2553
|
-
".json5": () => import("./confbox.mjs").then((n) => n.
|
|
2554
|
-
".toml": () => import("./confbox.mjs").then((n) => n.
|
|
2553
|
+
".json5": () => import("./confbox.mjs").then((n) => n.u).then((r$1) => r$1.parseJSON5),
|
|
2554
|
+
".toml": () => import("./confbox.mjs").then((n) => n.a).then((r$1) => r$1.parseTOML)
|
|
2555
2555
|
};
|
|
2556
2556
|
const SUPPORTED_EXTENSIONS = Object.freeze([
|
|
2557
2557
|
".js",
|
|
@@ -2863,4 +2863,4 @@ async function watchConfig(options) {
|
|
|
2863
2863
|
}
|
|
2864
2864
|
|
|
2865
2865
|
//#endregion
|
|
2866
|
-
export { resolve$1 as A, extname$2 as C, normalizeWindowsPath as D, normalize$1 as E, parse$1 as O, dirname$1 as S, join$1 as T,
|
|
2866
|
+
export { resolve$1 as A, extname$2 as C, normalizeWindowsPath as D, normalize$1 as E, parse$1 as O, dirname$1 as S, join$1 as T, C as _, setupDotenv as a, resolveModuleURL as b, findFile as c, parseGitConfig as d, readGitConfig as f, h as g, resolvePackageJSON as h, loadDotenv as i, relative$1 as k, findNearestFile as l, resolveGitConfig as m, dist_exports as n, watchConfig as o, readPackageJSON as p, loadConfig as r, debounce as s, SUPPORTED_EXTENSIONS as t, findWorkspaceDir as u, N$1 as v, isAbsolute$1 as w, basename$1 as x, resolveModulePath as y };
|