@super-repo/envx 0.2.3-b.1 → 0.2.3-b.3

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.
@@ -1,4 +1,4 @@
1
- import { a as resolveEnvPaths, c as loadDotenvxConfig, d as encryptFiles, f as parseEnv, i as loadEnv, l as expandEnvSrc, n as findWorkspaceRoot, o as validateCmdVariable, p as isEncrypted, r as listEnvFiles, s as log, t as writeProcessed, u as decryptFiles } from "./src-Bu_9Htex.js";
1
+ import { _ as isEncrypted, a as encryptFiles, c as findWorkspaceRoot, d as resolveCwdOrWorkspace, f as resolveEnvPaths, g as parseEnv, h as log, i as decryptFiles, l as listEnvFiles, m as expandEnvSrc, n as loadDotenvxConfig, o as DEFAULT_NODE_ENV_MAP, p as validateCmdVariable, r as rotateFiles, s as detectEnvironment, t as writeProcessed, u as loadEnv } from "./src-CwrtyfZE.js";
2
2
  import * as fs from "fs";
3
3
  import * as path from "path";
4
4
  import yargs from "yargs";
@@ -206,6 +206,129 @@ var expandCommand = {
206
206
  }
207
207
  };
208
208
  //#endregion
209
+ //#region src/commands/info.ts
210
+ /**
211
+ * Print everything envx knows about the current invocation: which
212
+ * config file it found, the resolved settings, which platform signals
213
+ * are present, what auto-detection produced, the NODE_ENV → suffix
214
+ * map (built-in + user overrides), and the env file paths it would
215
+ * load. Read-only — does not mutate process.env or write any files.
216
+ */
217
+ var infoCommand = {
218
+ command: "info",
219
+ describe: "Show resolved configuration, auto-detection details, NODE_ENV mappings, and which env files would be loaded.",
220
+ builder: (yargs) => yargs.help("h").alias("h", "help"),
221
+ handler: (argv) => {
222
+ const cfg = argv["__envxConfig"] ?? {};
223
+ const cfgSource = argv["__envxConfigSource"];
224
+ const cfgOrigin = argv["__envxConfigOrigin"];
225
+ const workspaceRoot = findWorkspaceRoot();
226
+ const cwd = process.cwd();
227
+ log.info("envx info");
228
+ log.dim("─".repeat(60));
229
+ log.info("Workspace");
230
+ line("cwd", cwd);
231
+ line("workspace root", workspaceRoot === cwd ? `${workspaceRoot} (none detected — using cwd)` : workspaceRoot);
232
+ blank();
233
+ log.info("Config");
234
+ line("source", cfgSource ?? "(none — built-in defaults)");
235
+ line("origin", cfgOrigin ?? "defaults");
236
+ blank();
237
+ log.info("Resolved settings");
238
+ line("envFiles", argv["env"] ?? cfg.envFiles ?? [".env"]);
239
+ line("envPath", argv["env-path"] ?? cfg.envPath ?? "(none)");
240
+ line("cascade", formatCascade(argv["cascade"] ?? cfg.cascade));
241
+ line("envKeysFile", formatPath(argv["env-keys-file"] ?? cfg.envKeysFile, cwd, workspaceRoot));
242
+ line("override", argv["override"] ?? cfg.override ?? false);
243
+ line("quiet", argv["quiet"] ?? cfg.quiet ?? true);
244
+ line("autoDetect", cfg.autoDetect ?? true);
245
+ line("expand", cfg.expand ?? false);
246
+ line("required", cfg.required && cfg.required.length > 0 ? cfg.required : "(none)");
247
+ line("defaults", cfg.defaults && Object.keys(cfg.defaults).length > 0 ? cfg.defaults : "(none)");
248
+ line("workspaceRoot (config)", cfg.workspaceRoot ?? "(auto-detect via findWorkspaceRoot)");
249
+ blank();
250
+ log.info("Platform signals (process.env)");
251
+ line("VERCEL", process.env["VERCEL"] ?? "(unset)");
252
+ line("VERCEL_ENV", process.env["VERCEL_ENV"] ?? "(unset)");
253
+ line("NETLIFY", process.env["NETLIFY"] ?? "(unset)");
254
+ line("CONTEXT", process.env["CONTEXT"] ?? "(unset)");
255
+ line("NODE_ENV", process.env.NODE_ENV ?? "(unset)");
256
+ blank();
257
+ log.info("Auto-detection");
258
+ const autoDetect = cfg.autoDetect ?? true;
259
+ if (!autoDetect) line("status", "disabled (autoDetect: false)");
260
+ else {
261
+ const detected = detectEnvironment({ ...cfg.nodeEnvMap !== void 0 ? { nodeEnvMap: cfg.nodeEnvMap } : {} });
262
+ line("source", pickDetectionSource());
263
+ line("detected", detected);
264
+ line("→ env file", detected === "root" ? ".env" : `.env.${detected}`);
265
+ }
266
+ blank();
267
+ log.info("NODE_ENV → suffix mapping");
268
+ log.dim(" (any NODE_ENV value not in this map passes through lowercased,");
269
+ log.dim(" so e.g. NODE_ENV=qa loads .env.qa)");
270
+ const userMap = cfg.nodeEnvMap ?? {};
271
+ const merged = {
272
+ ...DEFAULT_NODE_ENV_MAP,
273
+ ...userMap
274
+ };
275
+ const allKeys = Array.from(new Set([...Object.keys(merged)])).sort();
276
+ for (const k of allKeys) {
277
+ const v = merged[k] ?? "";
278
+ const suffix = v === "" ? "(no suffix → .env)" : `.env.${v}`;
279
+ const origin = userMap[k] === void 0 ? "default" : DEFAULT_NODE_ENV_MAP[k] === void 0 ? "config" : "config (override)";
280
+ line(` ${k.padEnd(14)} → ${suffix}`, origin);
281
+ }
282
+ blank();
283
+ log.info("Resolved env file paths (would be loaded in this order)");
284
+ const paths = resolveEnvPaths({
285
+ ...argv["env"] !== void 0 ? { envFiles: argv["env"] } : {},
286
+ ...argv["cascade"] !== void 0 ? { cascade: argv["cascade"] } : {},
287
+ autoDetect,
288
+ ...cfg.nodeEnvMap !== void 0 ? { nodeEnvMap: cfg.nodeEnvMap } : {}
289
+ });
290
+ if (paths.length === 0) line("(none)", "");
291
+ else {
292
+ const subdir = argv["env-path"] ?? (argv["vault"] ? "vault" : "");
293
+ for (const p of paths) {
294
+ if (path.isAbsolute(p)) {
295
+ log.dim(` ${p}`);
296
+ continue;
297
+ }
298
+ const resolved = subdir ? resolveCwdOrWorkspace(path.join(subdir, p)) : resolveCwdOrWorkspace(p);
299
+ log.dim(` ${p} → ${resolved}`);
300
+ }
301
+ }
302
+ }
303
+ };
304
+ function line(key, value, suffix) {
305
+ const v = value === void 0 || value === null ? "(unset)" : Array.isArray(value) ? value.length === 0 ? "[]" : JSON.stringify(value) : typeof value === "object" ? JSON.stringify(value) : String(value);
306
+ const tail = suffix ? ` ${dim(`(${suffix})`)}` : "";
307
+ log.dim(` ${key.padEnd(14)} ${v}${tail}`);
308
+ }
309
+ function blank() {
310
+ console.log("");
311
+ }
312
+ function dim(s) {
313
+ return `\x1b[2m${s}\x1b[22m`;
314
+ }
315
+ function formatCascade(cascade) {
316
+ if (cascade === void 0 || cascade === false) return "(off)";
317
+ if (cascade === true) return "true (uses auto-detected env name)";
318
+ return String(cascade);
319
+ }
320
+ function pickDetectionSource() {
321
+ if (process.env["VERCEL"]) return "Vercel (VERCEL_ENV)";
322
+ if (process.env["NETLIFY"]) return "Netlify (CONTEXT)";
323
+ if (process.env.NODE_ENV) return "NODE_ENV";
324
+ return "(no signals — fallback to .env)";
325
+ }
326
+ function formatPath(raw, cwd, wsRoot) {
327
+ if (!raw) return `${resolveCwdOrWorkspace(".env.keys", cwd)} (default: cwd-first, ws-root fallback)`;
328
+ if (path.isAbsolute(raw)) return `${raw} (absolute)`;
329
+ return `${raw} → ${path.resolve(cwd, raw)} (or ${path.resolve(wsRoot, raw)} if not at cwd)`;
330
+ }
331
+ //#endregion
209
332
  //#region src/commands/print.ts
210
333
  var printCommand = {
211
334
  command: "print <variable>",
@@ -231,6 +354,59 @@ var printCommand = {
231
354
  }
232
355
  };
233
356
  //#endregion
357
+ //#region src/commands/rotate.ts
358
+ /**
359
+ * Rotate the asymmetric keypair for one or more env files. Generates a
360
+ * fresh secp256k1 keypair, decrypts existing values with the old
361
+ * private key, re-encrypts with the new public key, and updates both
362
+ * the `ENVX_PUBLIC_KEY*` header in the env file and the
363
+ * `ENVX_PRIVATE_KEY*` entry in `.env.keys`.
364
+ *
365
+ * Files without a public-key header surface an error — run
366
+ * `envx encrypt` against them first to set up the keypair.
367
+ */
368
+ var rotateCommand = {
369
+ command: "rotate",
370
+ describe: "Rotate the asymmetric keypair for one or more env files.",
371
+ builder: (yargs) => yargs.option("env-keys-file", {
372
+ alias: "fk",
373
+ type: "string",
374
+ describe: "Path to the .env.keys file (default: ./.env.keys at cwd). Relative paths resolve against each env file's directory."
375
+ }).option("key", {
376
+ alias: "k",
377
+ type: "array",
378
+ string: true,
379
+ describe: "Specific keys (or picomatch globs) to rotate. Default: all encrypted keys."
380
+ }).option("exclude-key", {
381
+ alias: "ek",
382
+ type: "array",
383
+ string: true,
384
+ describe: "Keys (or picomatch globs) to leave with their existing ciphertext."
385
+ }).help("h").alias("h", "help"),
386
+ handler: (argv) => {
387
+ const envFiles = argv["env"] ?? [".env"];
388
+ const keys = argv["key"];
389
+ const excludeKeys = argv["exclude-key"];
390
+ const envKeysFile = argv["env-keys-file"];
391
+ const result = rotateFiles({
392
+ envFiles,
393
+ ...keys ? { keys } : {},
394
+ ...excludeKeys ? { excludeKeys } : {},
395
+ ...envKeysFile ? { envKeysFile } : {}
396
+ });
397
+ let hadError = false;
398
+ for (const processed of result.processedEnvs) if (processed.error) {
399
+ hadError = true;
400
+ log.error(`${processed.envFilepath}: ${processed.error.message}`);
401
+ if (processed.error.help) log.dim(processed.error.help);
402
+ }
403
+ const { written } = writeProcessed(result.processedEnvs);
404
+ for (const w of written) log.success(`rotated ${w}`);
405
+ if (written.length === 0 && result.unchangedFilepaths.length > 0 && !hadError) log.dim(`no changes (${result.unchangedFilepaths.join(", ")})`);
406
+ if (hadError) process.exitCode = 1;
407
+ }
408
+ };
409
+ //#endregion
234
410
  //#region src/commands/run.ts
235
411
  var runCommand = {
236
412
  command: "run [command..]",
@@ -243,6 +419,7 @@ var runCommand = {
243
419
  }),
244
420
  handler: (argv) => {
245
421
  const command = (argv["command"] ?? []).join(" ");
422
+ const cfg = argv["__envxConfig"] ?? {};
246
423
  loadEnv({
247
424
  envFiles: argv["env"],
248
425
  variables: argv["variables"],
@@ -250,7 +427,13 @@ var runCommand = {
250
427
  vault: argv["vault"],
251
428
  envPath: argv["env-path"],
252
429
  override: argv["override"],
253
- quiet: argv["quiet"]
430
+ quiet: argv["quiet"],
431
+ ...cfg.autoDetect !== void 0 ? { autoDetect: cfg.autoDetect } : {},
432
+ ...cfg.nodeEnvMap !== void 0 ? { nodeEnvMap: cfg.nodeEnvMap } : {},
433
+ ...cfg.required !== void 0 ? { required: cfg.required } : {},
434
+ ...cfg.expand !== void 0 ? { expand: cfg.expand } : {},
435
+ ...cfg.defaults !== void 0 ? { defaults: cfg.defaults } : {},
436
+ ...cfg.workspaceRoot !== void 0 ? { workspaceRoot: cfg.workspaceRoot } : {}
254
437
  });
255
438
  if (!command) return;
256
439
  log.info(`Running: ${command}`);
@@ -315,6 +498,9 @@ function createCli(argvInput) {
315
498
  }
316
499
  if (loaded.source) log.dim(`config: ${loaded.source} (${loaded.origin})`);
317
500
  const cfg = loaded.config;
501
+ argv["__envxConfig"] = cfg;
502
+ argv["__envxConfigSource"] = loaded.source;
503
+ argv["__envxConfigOrigin"] = loaded.origin;
318
504
  if (argv["cascade"] === void 0 && cfg.cascade !== void 0) argv["cascade"] = cfg.cascade;
319
505
  if (argv["override"] === void 0) argv["override"] = cfg.override ?? false;
320
506
  if (argv["quiet"] === void 0) argv["quiet"] = cfg.quiet ?? true;
@@ -330,8 +516,7 @@ function createCli(argvInput) {
330
516
  else if (cfg.envFiles && cfg.envFiles.length > 0) files = [...cfg.envFiles];
331
517
  else if (typeof argv["env-path"] === "string") {
332
518
  const subdir = argv["env-path"];
333
- const wsRoot = findWorkspaceRoot();
334
- const discovered = listEnvFiles(path.resolve(wsRoot, subdir));
519
+ const discovered = listEnvFiles(resolveCwdOrWorkspace(subdir));
335
520
  if (discovered.length > 0) {
336
521
  files = discovered;
337
522
  log.dim(`env-path ${subdir}: discovered ${String(discovered.length)} file(s) — ${discovered.join(", ")}`);
@@ -341,14 +526,13 @@ function createCli(argvInput) {
341
526
  }
342
527
  } else files = [".env"];
343
528
  if (typeof argv["env-path"] === "string") {
344
- const wsRoot = findWorkspaceRoot();
345
- const dir = path.resolve(wsRoot, argv["env-path"]);
529
+ const dir = resolveCwdOrWorkspace(argv["env-path"]);
346
530
  files = files.map((f) => path.isAbsolute(f) ? f : path.join(dir, f));
347
531
  }
348
532
  argv["env"] = files;
349
- }).command(runCommand).command(printCommand).command(debugCommand).command(encryptCommand).command(decryptCommand).command(expandCommand).help("h").alias("h", "help").version().strictCommands().demandCommand(0).recommendCommands().epilog("Examples:\n envx -- node app.js # load .env (auto-detected) and run\n envx --env dev -- pnpm start # load .env.dev\n envx print DATABASE_URL # print one variable\n envx debug --cascade prod # show resolved paths\n envx encrypt -e .env.prod # encrypt values in .env.prod\n envx decrypt -e .env.prod -k FOO # decrypt only FOO\n envx expand -e vault/.env.prod # decrypt + expand to stdout\n envx -c ./my.config.json run -- node app.js");
533
+ }).command(runCommand).command(printCommand).command(debugCommand).command(encryptCommand).command(decryptCommand).command(expandCommand).command(rotateCommand).command(infoCommand).help("h").alias("h", "help").version().strictCommands().demandCommand(0).recommendCommands().epilog("Examples:\n envx -- node app.js # load .env (auto-detected) and run\n envx --env dev -- pnpm start # load .env.dev\n envx print DATABASE_URL # print one variable\n envx debug --cascade prod # show resolved paths\n envx encrypt -e .env.prod # encrypt values in .env.prod\n envx decrypt -e .env.prod -k FOO # decrypt only FOO\n envx expand -e vault/.env.prod # decrypt + expand to stdout\n envx -c ./my.config.json run -- node app.js");
350
534
  }
351
535
  //#endregion
352
536
  export { createCli as t };
353
537
 
354
- //# sourceMappingURL=commands-CcoGlJ3P.js.map
538
+ //# sourceMappingURL=commands-DNf_gJRx.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commands-DNf_gJRx.js","names":[],"sources":["../../src/commands/debug.ts","../../src/commands/decrypt.ts","../../src/commands/encrypt.ts","../../src/commands/expand.ts","../../src/commands/info.ts","../../src/commands/print.ts","../../src/commands/rotate.ts","../../src/commands/run.ts","../../src/commands/index.ts"],"sourcesContent":["import type { CommandModule } from \"yargs\";\n\nimport { resolveEnvPaths, validateCmdVariable } from \"@honeycluster/libs\";\nimport { log } from \"@honeycluster/common\";\n\n// #region -- debug command ---------------------------------\n\nexport const debugCommand: CommandModule = {\n command: \"debug\",\n describe:\n \"Show which env files would be loaded and which variables would be applied, without loading them.\",\n handler: (argv) => {\n const paths = resolveEnvPaths({\n envFiles: argv[\"env\"] as string[] | undefined,\n cascade: argv[\"cascade\"] as string | undefined,\n });\n\n const rawVars = argv[\"variables\"] as string[] | undefined;\n const variables = rawVars\n ? Object.fromEntries(rawVars.map(validateCmdVariable))\n : {};\n\n log.info(`Paths: ${JSON.stringify(paths)}`);\n log.info(`Variables: ${JSON.stringify(variables)}`);\n },\n};\n\n// #endregion -----------------------------------------------\n","import type { CommandModule } from \"yargs\";\n\nimport { decryptFiles, writeProcessed } from \"@honeycluster/libs\";\n\nimport { log } from \"@honeycluster/common\";\n\n// #region -- decrypt command -------------------------------\n\n/** Mirror of `dotenvx decrypt` from upstream — see also encrypt.ts. */\nexport const decryptCommand: CommandModule = {\n command: \"decrypt\",\n describe:\n \"Decrypt the values in one or more .env files in place using the matching private key in .env.keys.\",\n builder: (yargs) =>\n yargs\n .option(\"env-keys-file\", {\n alias: \"fk\",\n type: \"string\",\n describe:\n \"Path to the .env.keys file (default: ./.env.keys at cwd, regardless of --dir / --env-path).\",\n })\n .option(\"key\", {\n alias: \"k\",\n type: \"array\",\n string: true,\n describe:\n \"Specific keys (or picomatch globs) to decrypt. Default: all keys.\",\n })\n .option(\"exclude-key\", {\n alias: \"ek\",\n type: \"array\",\n string: true,\n describe: \"Keys (or picomatch globs) to leave encrypted.\",\n })\n .option(\"stdout\", {\n type: \"boolean\",\n default: false,\n describe:\n \"Write the decrypted env contents to stdout instead of saving in place.\",\n })\n .help(\"h\")\n .alias(\"h\", \"help\"),\n handler: (argv) => {\n const envFiles = (argv[\"env\"] as string[] | undefined) ?? [\".env\"];\n const keys = argv[\"key\"] as string[] | undefined;\n const excludeKeys = argv[\"exclude-key\"] as string[] | undefined;\n const envKeysFile = argv[\"env-keys-file\"] as string | undefined;\n const stdout = (argv[\"stdout\"] as boolean | undefined) ?? false;\n\n const result = decryptFiles({\n envFiles,\n ...(keys ? { keys } : {}),\n ...(excludeKeys ? { excludeKeys } : {}),\n ...(envKeysFile ? { envKeysFile } : {}),\n });\n\n let hadError = false;\n\n for (const processed of result.processedEnvs) {\n if (processed.error) {\n hadError = true;\n log.error(`${processed.envFilepath}: ${processed.error.message}`);\n if (processed.error.help) log.dim(processed.error.help);\n continue;\n }\n if (stdout) {\n process.stdout.write(processed.envSrc);\n }\n }\n\n if (!stdout) {\n const { written } = writeProcessed(result.processedEnvs);\n for (const w of written) log.success(`decrypted ${w}`);\n if (\n written.length === 0 &&\n result.unchangedFilepaths.length > 0 &&\n !hadError\n ) {\n log.dim(`no changes (${result.unchangedFilepaths.join(\", \")})`);\n }\n }\n\n if (hadError) process.exitCode = 1;\n },\n};\n\n// #endregion -----------------------------------------------\n","import type { CommandModule } from \"yargs\";\n\nimport { encryptFiles, writeProcessed } from \"@honeycluster/libs\";\n\nimport { log } from \"@honeycluster/common\";\n\n// #region -- encrypt command -------------------------------\n\n/**\n * Mirrors the upstream `dotenvx encrypt` flags so existing muscle\n * memory carries over. The `--env` global doubles as the file list\n * (the upstream calls it `--env-file`); this CLI keeps a single\n * canonical name across subcommands.\n */\nexport const encryptCommand: CommandModule = {\n command: \"encrypt\",\n describe:\n \"Encrypt the values in one or more .env files. Generates a private key in .env.keys on first run.\",\n builder: (yargs) =>\n yargs\n .option(\"env-keys-file\", {\n alias: \"fk\",\n type: \"string\",\n describe:\n \"Path to the .env.keys file (default: ./.env.keys at cwd, regardless of --dir / --env-path).\",\n })\n .option(\"key\", {\n alias: \"k\",\n type: \"array\",\n string: true,\n describe:\n \"Specific keys (or picomatch globs) to encrypt. Default: all keys.\",\n })\n .option(\"exclude-key\", {\n alias: \"ek\",\n type: \"array\",\n string: true,\n describe: \"Keys (or picomatch globs) to leave plaintext.\",\n })\n .option(\"stdout\", {\n type: \"boolean\",\n default: false,\n describe:\n \"Write the encrypted env contents to stdout instead of saving in place.\",\n })\n .help(\"h\")\n .alias(\"h\", \"help\"),\n handler: (argv) => {\n const envFiles = (argv[\"env\"] as string[] | undefined) ?? [\".env\"];\n const keys = argv[\"key\"] as string[] | undefined;\n const excludeKeys = argv[\"exclude-key\"] as string[] | undefined;\n const envKeysFile = argv[\"env-keys-file\"] as string | undefined;\n const stdout = (argv[\"stdout\"] as boolean | undefined) ?? false;\n\n const result = encryptFiles({\n envFiles,\n ...(keys ? { keys } : {}),\n ...(excludeKeys ? { excludeKeys } : {}),\n ...(envKeysFile ? { envKeysFile } : {}),\n });\n\n let hadError = false;\n\n for (const processed of result.processedEnvs) {\n if (processed.error) {\n hadError = true;\n log.error(`${processed.envFilepath}: ${processed.error.message}`);\n if (processed.error.help) log.dim(processed.error.help);\n continue;\n }\n\n if (stdout) {\n process.stdout.write(processed.envSrc);\n continue;\n }\n\n if (processed.privateKeyAdded) {\n log.success(\n `key added to .env.keys (${processed.privateKeyName ?? \"<unknown>\"})`,\n );\n }\n }\n\n if (!stdout) {\n const { written } = writeProcessed(result.processedEnvs);\n for (const w of written) log.success(`encrypted ${w}`);\n if (\n written.length === 0 &&\n result.unchangedFilepaths.length > 0 &&\n !hadError\n ) {\n log.dim(`no changes (${result.unchangedFilepaths.join(\", \")})`);\n }\n }\n\n if (hadError) process.exitCode = 1;\n },\n};\n\n// #endregion -----------------------------------------------\n","import * as fs from \"fs\";\nimport * as path from \"path\";\nimport type { CommandModule } from \"yargs\";\n\nimport {\n decryptFiles,\n expandEnvSrc,\n isEncrypted,\n parseEnv,\n} from \"@honeycluster/libs\";\n\nimport { log } from \"@honeycluster/common\";\n\n// #region -- expand command --------------------------------\n\n/**\n * Decrypts (when needed) and expands variable references in an env\n * file. Mirrors the workflow `decrypt-vault` action — but cycle-safe,\n * supports `${VAR:-default}` / `${VAR:?msg}`, and never silently\n * truncates after N passes.\n */\nexport const expandCommand: CommandModule = {\n command: \"expand\",\n describe:\n \"Decrypt (if needed) and expand ${VAR}/$VAR references in an env file. Outputs to stdout by default.\",\n builder: (yargs) =>\n yargs\n .option(\"output\", {\n type: \"string\",\n describe: \"Write the expanded result to this file (default: stdout).\",\n })\n .option(\"env-keys-file\", {\n alias: \"fk\",\n type: \"string\",\n describe:\n \"Path to .env.keys (default: ./.env.keys at cwd, regardless of --dir / --env-path).\",\n })\n .option(\"on-missing\", {\n type: \"string\",\n choices: [\"leave\", \"empty\", \"throw\"] as const,\n default: \"leave\" as const,\n describe:\n \"How to handle ${UNRESOLVED_VAR}: leave it literal, substitute empty, or fail.\",\n })\n .help(\"h\")\n .alias(\"h\", \"help\"),\n handler: (argv) => {\n const envFiles = (argv[\"env\"] as string[] | undefined) ?? [\".env\"];\n if (envFiles.length !== 1) {\n log.error(\n `expand operates on a single env file at a time; got ${String(envFiles.length)}.`,\n );\n process.exit(1);\n }\n const envFile = envFiles[0]!;\n const filepath = path.resolve(envFile);\n if (!fs.existsSync(filepath)) {\n log.error(`env file not found: ${envFile}`);\n process.exit(1);\n }\n\n let envSrc = fs.readFileSync(filepath, \"utf8\");\n const hasEncrypted = parseEnv(envSrc).some(\n (l) => l.type === \"kv\" && isEncrypted(l.value),\n );\n\n if (hasEncrypted) {\n const envKeysFile = argv[\"env-keys-file\"] as string | undefined;\n const dec = decryptFiles({\n envFiles: [envFile],\n ...(envKeysFile ? { envKeysFile } : {}),\n });\n const processed = dec.processedEnvs[0];\n if (processed?.error) {\n log.error(`${envFile}: ${processed.error.message}`);\n if (processed.error.help) log.dim(processed.error.help);\n process.exit(1);\n }\n envSrc = processed!.envSrc;\n }\n\n const onMissing = argv[\"on-missing\"] as \"leave\" | \"empty\" | \"throw\";\n const result = expandEnvSrc(envSrc, { onMissing });\n\n for (const v of result.unresolved) {\n log.warn(`unresolved variable: ${v}`);\n }\n for (const cycle of result.cycles) {\n log.warn(`cycle: ${cycle.join(\" → \")}`);\n }\n\n const output = argv[\"output\"] as string | undefined;\n if (output) {\n fs.writeFileSync(path.resolve(output), result.envSrc);\n log.success(`expanded ${envFile} → ${output}`);\n } else {\n process.stdout.write(result.envSrc);\n if (!result.envSrc.endsWith(\"\\n\")) process.stdout.write(\"\\n\");\n }\n },\n};\n\n// #endregion -----------------------------------------------\n","import * as path from \"path\";\nimport type { CommandModule } from \"yargs\";\n\nimport {\n DEFAULT_NODE_ENV_MAP,\n detectEnvironment,\n findWorkspaceRoot,\n resolveCwdOrWorkspace,\n resolveEnvPaths,\n type DotenvxConfig,\n} from \"@honeycluster/libs\";\nimport { log } from \"@honeycluster/common\";\n\n// #region -- info command ----------------------------------\n\n/**\n * Print everything envx knows about the current invocation: which\n * config file it found, the resolved settings, which platform signals\n * are present, what auto-detection produced, the NODE_ENV → suffix\n * map (built-in + user overrides), and the env file paths it would\n * load. Read-only — does not mutate process.env or write any files.\n */\nexport const infoCommand: CommandModule = {\n command: \"info\",\n describe:\n \"Show resolved configuration, auto-detection details, NODE_ENV mappings, and which env files would be loaded.\",\n builder: (yargs) => yargs.help(\"h\").alias(\"h\", \"help\"),\n handler: (argv) => {\n const cfg = (argv[\"__envxConfig\"] as DotenvxConfig | undefined) ?? {};\n const cfgSource = argv[\"__envxConfigSource\"] as string | null | undefined;\n const cfgOrigin = argv[\"__envxConfigOrigin\"] as string | undefined;\n\n const workspaceRoot = findWorkspaceRoot();\n const cwd = process.cwd();\n\n // ── header ─────────────────────────────────────────────\n log.info(\"envx info\");\n log.dim(\"─\".repeat(60));\n\n // ── workspace ──────────────────────────────────────────\n log.info(\"Workspace\");\n line(\"cwd\", cwd);\n line(\"workspace root\", workspaceRoot === cwd ? `${workspaceRoot} (none detected — using cwd)` : workspaceRoot);\n blank();\n\n // ── config source ──────────────────────────────────────\n log.info(\"Config\");\n line(\"source\", cfgSource ?? \"(none — built-in defaults)\");\n line(\"origin\", cfgOrigin ?? \"defaults\");\n blank();\n\n // ── resolved settings ──────────────────────────────────\n log.info(\"Resolved settings\");\n line(\"envFiles\", argv[\"env\"] ?? cfg.envFiles ?? [\".env\"]);\n line(\"envPath\", argv[\"env-path\"] ?? cfg.envPath ?? \"(none)\");\n line(\"cascade\", formatCascade(argv[\"cascade\"] ?? cfg.cascade));\n line(\n \"envKeysFile\",\n formatPath(\n (argv[\"env-keys-file\"] as string | undefined) ?? cfg.envKeysFile,\n cwd,\n workspaceRoot,\n ),\n );\n line(\"override\", argv[\"override\"] ?? cfg.override ?? false);\n line(\"quiet\", argv[\"quiet\"] ?? cfg.quiet ?? true);\n line(\"autoDetect\", cfg.autoDetect ?? true);\n line(\"expand\", cfg.expand ?? false);\n line(\"required\", cfg.required && cfg.required.length > 0 ? cfg.required : \"(none)\");\n line(\n \"defaults\",\n cfg.defaults && Object.keys(cfg.defaults).length > 0 ? cfg.defaults : \"(none)\",\n );\n line(\n \"workspaceRoot (config)\",\n cfg.workspaceRoot ?? \"(auto-detect via findWorkspaceRoot)\",\n );\n blank();\n\n // ── platform signals ───────────────────────────────────\n log.info(\"Platform signals (process.env)\");\n line(\"VERCEL\", process.env[\"VERCEL\"] ?? \"(unset)\");\n line(\"VERCEL_ENV\", process.env[\"VERCEL_ENV\"] ?? \"(unset)\");\n line(\"NETLIFY\", process.env[\"NETLIFY\"] ?? \"(unset)\");\n line(\"CONTEXT\", process.env[\"CONTEXT\"] ?? \"(unset)\");\n line(\"NODE_ENV\", process.env[\"NODE_ENV\"] ?? \"(unset)\");\n blank();\n\n // ── auto-detection result ──────────────────────────────\n log.info(\"Auto-detection\");\n const autoDetect = cfg.autoDetect ?? true;\n if (!autoDetect) {\n line(\"status\", \"disabled (autoDetect: false)\");\n } else {\n const detected = detectEnvironment({\n ...(cfg.nodeEnvMap !== undefined ? { nodeEnvMap: cfg.nodeEnvMap } : {}),\n });\n const source = pickDetectionSource();\n line(\"source\", source);\n line(\"detected\", detected);\n line(\n \"→ env file\",\n detected === \"root\" ? \".env\" : `.env.${detected}`,\n );\n }\n blank();\n\n // ── NODE_ENV → suffix map ──────────────────────────────\n log.info(\"NODE_ENV → suffix mapping\");\n log.dim(\" (any NODE_ENV value not in this map passes through lowercased,\");\n log.dim(\" so e.g. NODE_ENV=qa loads .env.qa)\");\n const userMap = cfg.nodeEnvMap ?? {};\n const merged = { ...DEFAULT_NODE_ENV_MAP, ...userMap };\n const allKeys = Array.from(new Set([...Object.keys(merged)])).sort();\n for (const k of allKeys) {\n const v = merged[k] ?? \"\";\n const suffix = v === \"\" ? \"(no suffix → .env)\" : `.env.${v}`;\n const origin =\n userMap[k] === undefined\n ? \"default\"\n : DEFAULT_NODE_ENV_MAP[k] === undefined\n ? \"config\"\n : \"config (override)\";\n line(` ${k.padEnd(14)} → ${suffix}`, origin);\n }\n blank();\n\n // ── resolved file paths ────────────────────────────────\n log.info(\"Resolved env file paths (would be loaded in this order)\");\n const paths = resolveEnvPaths({\n ...(argv[\"env\"] !== undefined ? { envFiles: argv[\"env\"] as string[] } : {}),\n ...(argv[\"cascade\"] !== undefined\n ? { cascade: argv[\"cascade\"] as string }\n : {}),\n autoDetect,\n ...(cfg.nodeEnvMap !== undefined ? { nodeEnvMap: cfg.nodeEnvMap } : {}),\n });\n if (paths.length === 0) {\n line(\"(none)\", \"\");\n } else {\n const subdir =\n (argv[\"env-path\"] as string | undefined) ??\n ((argv[\"vault\"] as boolean | undefined) ? \"vault\" : \"\");\n for (const p of paths) {\n if (path.isAbsolute(p)) {\n log.dim(` ${p}`);\n continue;\n }\n const resolved = subdir\n ? resolveCwdOrWorkspace(path.join(subdir, p))\n : resolveCwdOrWorkspace(p);\n log.dim(` ${p} → ${resolved}`);\n }\n }\n },\n};\n\n// #endregion -----------------------------------------------\n\n// #region -- helpers ---------------------------------------\n\nfunction line(key: string, value: unknown, suffix?: string): void {\n const v =\n value === undefined || value === null\n ? \"(unset)\"\n : Array.isArray(value)\n ? value.length === 0\n ? \"[]\"\n : JSON.stringify(value)\n : typeof value === \"object\"\n ? JSON.stringify(value)\n : String(value);\n const tail = suffix ? ` ${dim(`(${suffix})`)}` : \"\";\n log.dim(` ${key.padEnd(14)} ${v}${tail}`);\n}\n\nfunction blank(): void {\n console.log(\"\");\n}\n\nfunction dim(s: string): string {\n return `\\x1b[2m${s}\\x1b[22m`;\n}\n\nfunction formatCascade(cascade: unknown): string {\n if (cascade === undefined || cascade === false) return \"(off)\";\n if (cascade === true) return \"true (uses auto-detected env name)\";\n return String(cascade);\n}\n\nfunction pickDetectionSource(): string {\n if (process.env[\"VERCEL\"]) return \"Vercel (VERCEL_ENV)\";\n if (process.env[\"NETLIFY\"]) return \"Netlify (CONTEXT)\";\n if (process.env[\"NODE_ENV\"]) return \"NODE_ENV\";\n return \"(no signals — fallback to .env)\";\n}\n\nfunction formatPath(\n raw: string | undefined,\n cwd: string,\n wsRoot: string,\n): string {\n if (!raw) {\n // Default keys-file lookup.\n const resolved = resolveCwdOrWorkspace(\".env.keys\", cwd);\n return `${resolved} (default: cwd-first, ws-root fallback)`;\n }\n if (path.isAbsolute(raw)) return `${raw} (absolute)`;\n const cwdResolved = path.resolve(cwd, raw);\n const wsResolved = path.resolve(wsRoot, raw);\n return `${raw} → ${cwdResolved} (or ${wsResolved} if not at cwd)`;\n}\n\n// #endregion -----------------------------------------------\n","import type { CommandModule } from \"yargs\";\n\nimport { loadEnv } from \"@honeycluster/libs\";\n\n// #region -- print command ---------------------------------\n\nexport const printCommand: CommandModule = {\n command: \"print <variable>\",\n describe: \"Load env files and print the value of a single variable.\",\n builder: (yargs) =>\n yargs.positional(\"variable\", {\n describe: \"Name of the variable to print\",\n type: \"string\",\n demandOption: true,\n }),\n handler: (argv) => {\n loadEnv({\n envFiles: argv[\"env\"] as string[] | undefined,\n variables: argv[\"variables\"] as string[] | undefined,\n cascade: argv[\"cascade\"] as string | undefined,\n vault: argv[\"vault\"] as boolean | undefined,\n envPath: argv[\"env-path\"] as string | undefined,\n override: argv[\"override\"] as boolean | undefined,\n quiet: argv[\"quiet\"] as boolean | undefined,\n });\n\n const name = argv[\"variable\"] as string;\n const value = process.env[name];\n process.stdout.write(value != null ? `${value}\\n` : \"\\n\");\n },\n};\n\n// #endregion -----------------------------------------------\n","import type { CommandModule } from \"yargs\";\n\nimport { rotateFiles, writeProcessed } from \"@honeycluster/libs\";\nimport { log } from \"@honeycluster/common\";\n\n// #region -- rotate command --------------------------------\n\n/**\n * Rotate the asymmetric keypair for one or more env files. Generates a\n * fresh secp256k1 keypair, decrypts existing values with the old\n * private key, re-encrypts with the new public key, and updates both\n * the `ENVX_PUBLIC_KEY*` header in the env file and the\n * `ENVX_PRIVATE_KEY*` entry in `.env.keys`.\n *\n * Files without a public-key header surface an error — run\n * `envx encrypt` against them first to set up the keypair.\n */\nexport const rotateCommand: CommandModule = {\n command: \"rotate\",\n describe: \"Rotate the asymmetric keypair for one or more env files.\",\n builder: (yargs) =>\n yargs\n .option(\"env-keys-file\", {\n alias: \"fk\",\n type: \"string\",\n describe:\n \"Path to the .env.keys file (default: ./.env.keys at cwd). Relative paths resolve against each env file's directory.\",\n })\n .option(\"key\", {\n alias: \"k\",\n type: \"array\",\n string: true,\n describe:\n \"Specific keys (or picomatch globs) to rotate. Default: all encrypted keys.\",\n })\n .option(\"exclude-key\", {\n alias: \"ek\",\n type: \"array\",\n string: true,\n describe: \"Keys (or picomatch globs) to leave with their existing ciphertext.\",\n })\n .help(\"h\")\n .alias(\"h\", \"help\"),\n handler: (argv) => {\n const envFiles = (argv[\"env\"] as string[] | undefined) ?? [\".env\"];\n const keys = argv[\"key\"] as string[] | undefined;\n const excludeKeys = argv[\"exclude-key\"] as string[] | undefined;\n const envKeysFile = argv[\"env-keys-file\"] as string | undefined;\n\n const result = rotateFiles({\n envFiles,\n ...(keys ? { keys } : {}),\n ...(excludeKeys ? { excludeKeys } : {}),\n ...(envKeysFile ? { envKeysFile } : {}),\n });\n\n let hadError = false;\n\n for (const processed of result.processedEnvs) {\n if (processed.error) {\n hadError = true;\n log.error(`${processed.envFilepath}: ${processed.error.message}`);\n if (processed.error.help) log.dim(processed.error.help);\n }\n }\n\n const { written } = writeProcessed(result.processedEnvs);\n for (const w of written) log.success(`rotated ${w}`);\n if (written.length === 0 && result.unchangedFilepaths.length > 0 && !hadError) {\n log.dim(`no changes (${result.unchangedFilepaths.join(\", \")})`);\n }\n\n if (hadError) process.exitCode = 1;\n },\n};\n\n// #endregion -----------------------------------------------\n","import { execSync } from \"child_process\";\nimport type { CommandModule } from \"yargs\";\n\nimport { loadEnv, type DotenvxConfig } from \"@honeycluster/libs\";\nimport { log } from \"@honeycluster/common\";\n\n// #region -- run command -----------------------------------\n\nexport const runCommand: CommandModule = {\n command: \"run [command..]\",\n aliases: [\"$0\"],\n describe:\n \"Load env files into process.env and execute a command. Default subcommand — `dotenvx-run [command]` is equivalent.\",\n builder: (yargs) =>\n yargs.positional(\"command\", {\n describe: \"Command to execute after loading env files\",\n type: \"string\",\n array: true,\n }),\n handler: (argv) => {\n const command = ((argv[\"command\"] as string[] | undefined) ?? []).join(\" \");\n const cfg = (argv[\"__envxConfig\"] as DotenvxConfig | undefined) ?? {};\n\n loadEnv({\n envFiles: argv[\"env\"] as string[] | undefined,\n variables: argv[\"variables\"] as string[] | undefined,\n // CLI passes a string name; config passes a boolean toggle.\n cascade: argv[\"cascade\"] as string | boolean | undefined,\n vault: argv[\"vault\"] as boolean | undefined,\n envPath: argv[\"env-path\"] as string | undefined,\n override: argv[\"override\"] as boolean | undefined,\n quiet: argv[\"quiet\"] as boolean | undefined,\n ...(cfg.autoDetect !== undefined ? { autoDetect: cfg.autoDetect } : {}),\n ...(cfg.nodeEnvMap !== undefined ? { nodeEnvMap: cfg.nodeEnvMap } : {}),\n ...(cfg.required !== undefined ? { required: cfg.required } : {}),\n ...(cfg.expand !== undefined ? { expand: cfg.expand } : {}),\n ...(cfg.defaults !== undefined ? { defaults: cfg.defaults } : {}),\n ...(cfg.workspaceRoot !== undefined ? { workspaceRoot: cfg.workspaceRoot } : {}),\n });\n\n if (!command) return;\n\n log.info(`Running: ${command}`);\n try {\n execSync(command, { stdio: \"inherit\" });\n log.success(`Command completed: ${command}`);\n } catch (error) {\n const msg = error instanceof Error ? error.message : String(error);\n log.error(`Command failed: ${msg}`);\n process.exit(1);\n }\n },\n};\n\n// #endregion -----------------------------------------------\n","import yargs from \"yargs\";\nimport type { Argv } from \"yargs\";\n\nimport * as path from \"path\";\n\nimport {\n listEnvFiles,\n loadDotenvxConfig,\n resolveCwdOrWorkspace,\n} from \"@honeycluster/libs\";\n\nimport { log } from \"@honeycluster/common\";\nimport { debugCommand } from \"./debug.js\";\nimport { decryptCommand } from \"./decrypt.js\";\nimport { encryptCommand } from \"./encrypt.js\";\nimport { expandCommand } from \"./expand.js\";\nimport { infoCommand } from \"./info.js\";\nimport { printCommand } from \"./print.js\";\nimport { rotateCommand } from \"./rotate.js\";\nimport { runCommand } from \"./run.js\";\n\n// #region -- CLI Factory -----------------------------------\n\n/**\n * Build the yargs CLI for `dotenvx-run`. Global options (env, variables,\n * cascade, vault, override, quiet) are registered on the root so every\n * subcommand inherits them.\n */\nexport function createCli(argvInput: string[]): Argv {\n return yargs(argvInput)\n .scriptName(\"envx\")\n .usage(\"$0 <command> [options]\")\n .option(\"config\", {\n alias: \"c\",\n type: \"string\",\n describe:\n \"Path to an envx config file (default: discovered from package.json `envx.config` or envx.config.{ts,js,json}).\",\n })\n .option(\"env\", {\n alias: \"e\",\n type: \"array\",\n describe:\n \"Env files to load. Default: [\\\".env\\\"] (or `envFiles` from config; or every .env* under --env-path when set). Auto-detects environment when omitted.\",\n })\n .option(\"env-path\", {\n alias: [\"dir\", \"d\"],\n type: \"string\",\n describe:\n \"Subdirectory of the workspace root holding the env files (e.g. `vault`). When set and --env is omitted, every .env* file in that directory is included.\",\n })\n .option(\"variables\", {\n alias: \"v\",\n type: \"array\",\n describe: \"Inline variables in the form name=value (repeatable).\",\n default: [],\n })\n .option(\"cascade\", {\n type: \"string\",\n describe:\n \"Cascade load order: .env, .env.<cascade>, .env.local, .env.<cascade>.local\",\n })\n .option(\"vault\", {\n alias: \"va\",\n type: \"boolean\",\n describe: \"Shortcut for `--env-path vault`.\",\n })\n .option(\"override\", {\n alias: \"o\",\n type: \"boolean\",\n describe: \"Override existing process.env values. Conflicts with --cascade.\",\n })\n .option(\"quiet\", {\n alias: \"q\",\n type: \"boolean\",\n describe: \"Suppress dotenv's own output.\",\n })\n .middleware((argv) => {\n const configPath = argv[\"config\"] as string | undefined;\n let loaded;\n try {\n loaded = loadDotenvxConfig({\n ...(configPath ? { configPath } : {}),\n });\n } catch (e) {\n log.error(`config error: ${(e as Error).message}`);\n process.exit(1);\n }\n if (loaded.source) {\n log.dim(`config: ${loaded.source} (${loaded.origin})`);\n }\n const cfg = loaded.config;\n // Stash the loaded config + source on argv so command handlers\n // (notably `info`) can introspect what envx resolved without\n // re-running the config discovery.\n argv[\"__envxConfig\"] = cfg;\n argv[\"__envxConfigSource\"] = loaded.source;\n argv[\"__envxConfigOrigin\"] = loaded.origin;\n\n // Apply config defaults only where the CLI didn't supply a value.\n if (argv[\"cascade\"] === undefined && cfg.cascade !== undefined) {\n argv[\"cascade\"] = cfg.cascade;\n }\n if (argv[\"override\"] === undefined) {\n argv[\"override\"] = cfg.override ?? false;\n }\n if (argv[\"quiet\"] === undefined) {\n argv[\"quiet\"] = cfg.quiet ?? true;\n }\n if (argv[\"vault\"] === undefined) {\n argv[\"vault\"] = false;\n }\n if (argv[\"env-keys-file\"] === undefined && cfg.envKeysFile !== undefined) {\n argv[\"env-keys-file\"] = cfg.envKeysFile;\n }\n\n // env-path: CLI > config > --vault shortcut\n if (argv[\"env-path\"] === undefined) {\n if (cfg.envPath !== undefined) argv[\"env-path\"] = cfg.envPath;\n else if (argv[\"vault\"]) argv[\"env-path\"] = \"vault\";\n }\n\n // env files: CLI > config > \"all .env* in env-path\" > [\".env\"]\n const userPassedEnv = Array.isArray(argv[\"env\"]) && argv[\"env\"].length > 0;\n let files: string[];\n if (userPassedEnv) {\n files = argv[\"env\"] as string[];\n } else if (cfg.envFiles && cfg.envFiles.length > 0) {\n files = [...cfg.envFiles];\n } else if (typeof argv[\"env-path\"] === \"string\") {\n // \"all files in the env-path are included\" — discover them.\n // env-path resolves cwd-first; walk-up to workspace root only\n // if the cwd-relative dir doesn't exist.\n const subdir = argv[\"env-path\"] as string;\n const dir = resolveCwdOrWorkspace(subdir);\n const discovered = listEnvFiles(dir);\n if (discovered.length > 0) {\n files = discovered;\n log.dim(\n `env-path ${subdir}: discovered ${String(discovered.length)} file(s) — ${discovered.join(\", \")}`,\n );\n } else {\n files = [\".env\"];\n log.warn(\n `env-path ${subdir}: no .env* files found; falling back to [\".env\"]`,\n );\n }\n } else {\n files = [\".env\"];\n }\n\n // When env-path is set, resolve every relative file against that\n // directory up-front. encrypt/decrypt/expand operate on the\n // resulting paths verbatim — no per-command envPath plumbing.\n if (typeof argv[\"env-path\"] === \"string\") {\n const dir = resolveCwdOrWorkspace(argv[\"env-path\"] as string);\n files = files.map((f) => (path.isAbsolute(f) ? f : path.join(dir, f)));\n }\n argv[\"env\"] = files;\n })\n .command(runCommand)\n .command(printCommand)\n .command(debugCommand)\n .command(encryptCommand)\n .command(decryptCommand)\n .command(expandCommand)\n .command(rotateCommand)\n .command(infoCommand)\n .help(\"h\")\n .alias(\"h\", \"help\")\n .version()\n .strictCommands()\n .demandCommand(0)\n .recommendCommands()\n .epilog(\n \"Examples:\\n\" +\n \" envx -- node app.js # load .env (auto-detected) and run\\n\" +\n \" envx --env dev -- pnpm start # load .env.dev\\n\" +\n \" envx print DATABASE_URL # print one variable\\n\" +\n \" envx debug --cascade prod # show resolved paths\\n\" +\n \" envx encrypt -e .env.prod # encrypt values in .env.prod\\n\" +\n \" envx decrypt -e .env.prod -k FOO # decrypt only FOO\\n\" +\n \" envx expand -e vault/.env.prod # decrypt + expand to stdout\\n\" +\n \" envx -c ./my.config.json run -- node app.js\",\n );\n}\n\n// #endregion -----------------------------------------------\n"],"mappings":";;;;;;AAOA,IAAa,eAA8B;CACzC,SAAS;CACT,UACE;CACF,UAAU,SAAS;EACjB,MAAM,QAAQ,gBAAgB;GAC5B,UAAU,KAAK;GACf,SAAS,KAAK;GACf,CAAC;EAEF,MAAM,UAAU,KAAK;EACrB,MAAM,YAAY,UACd,OAAO,YAAY,QAAQ,IAAI,oBAAoB,CAAC,GACpD,EAAE;EAEN,IAAI,KAAK,UAAU,KAAK,UAAU,MAAM,GAAG;EAC3C,IAAI,KAAK,cAAc,KAAK,UAAU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