@super-repo/envx 0.2.2 → 0.2.3-b.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auto.js +3 -7
- package/dist/auto.js.map +1 -1
- package/dist/bin/dotenvx.d.ts +0 -2
- package/dist/bin/dotenvx.d.ts.map +1 -1
- package/dist/bin/dotenvx.js +0 -4
- package/dist/chunks/commands-CcoGlJ3P.js +354 -0
- package/dist/chunks/commands-CcoGlJ3P.js.map +1 -0
- package/dist/chunks/src-Bu_9Htex.js +0 -0
- package/dist/chunks/src-Bu_9Htex.js.map +1 -0
- package/dist/cli.d.ts +0 -1
- package/dist/cli.js +4 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands/debug.d.ts +1 -1
- package/dist/commands/decrypt.d.ts +1 -1
- package/dist/commands/encrypt.d.ts +1 -1
- package/dist/commands/expand.d.ts +1 -1
- package/dist/commands/expand.d.ts.map +1 -1
- package/dist/commands/index.d.ts +1 -1
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +2 -159
- package/dist/commands/print.d.ts +1 -1
- package/dist/commands/run.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +32 -58
- package/dist/index.js.map +1 -1
- package/package.json +13 -6
- package/dist/.tsbuildinfo +0 -1
- package/dist/bin/dotenvx.js.map +0 -1
- package/dist/commands/debug.js +0 -21
- package/dist/commands/debug.js.map +0 -1
- package/dist/commands/decrypt.js +0 -73
- package/dist/commands/decrypt.js.map +0 -1
- package/dist/commands/encrypt.js +0 -82
- package/dist/commands/encrypt.js.map +0 -1
- package/dist/commands/expand.js +0 -83
- package/dist/commands/expand.js.map +0 -1
- package/dist/commands/index.js.map +0 -1
- package/dist/commands/print.js +0 -27
- package/dist/commands/print.js.map +0 -1
- package/dist/commands/run.js +0 -40
- package/dist/commands/run.js.map +0 -1
package/dist/auto.js
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
// #region -- Side-effect entry point ----------------------
|
|
2
|
-
// `import "@honeycluster/envx/auto"` (or "/config") loads .env into
|
|
3
|
-
// process.env on import — same ergonomics as `import "dotenv/config"`.
|
|
4
|
-
// Picks up envx.config.* and the package.json `envx.config` discovery
|
|
5
|
-
// chain automatically. Use the named/default export from the package
|
|
6
|
-
// root when you want an explicit handle.
|
|
7
1
|
import envx from "./index.js";
|
|
2
|
+
//#region src/auto.ts
|
|
8
3
|
envx();
|
|
9
|
-
|
|
4
|
+
//#endregion
|
|
5
|
+
|
|
10
6
|
//# sourceMappingURL=auto.js.map
|
package/dist/auto.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auto.js","
|
|
1
|
+
{"version":3,"file":"auto.js","names":[],"sources":["../src/auto.ts"],"sourcesContent":["// #region -- Side-effect entry point ----------------------\n\n// `import \"@honeycluster/envx/auto\"` (or \"/config\") loads .env into\n// process.env on import — same ergonomics as `import \"dotenv/config\"`.\n// Picks up envx.config.* and the package.json `envx.config` discovery\n// chain automatically. Use the named/default export from the package\n// root when you want an explicit handle.\n\nimport envx from \"./index.js\";\n\nenvx();\n\n// #endregion -----------------------------------------------\n"],"mappings":";;AAUA,MAAM"}
|
package/dist/bin/dotenvx.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dotenvx.d.ts","sourceRoot":"","sources":["../../src/bin/dotenvx.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dotenvx.d.ts","sourceRoot":"","sources":["../../src/bin/dotenvx.ts"],"names":[],"mappings":"AAQA,OAAO,kBAAkB,CAAC"}
|
package/dist/bin/dotenvx.js
CHANGED
|
@@ -1,6 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
// Legacy passthrough — re-exposes the upstream `@dotenvx/dotenvx` package
|
|
3
|
-
// under the `legacy` bin so callers that need the original CLI can opt in
|
|
4
|
-
// without leaving this package.
|
|
5
2
|
import "@dotenvx/dotenvx";
|
|
6
|
-
//# sourceMappingURL=dotenvx.js.map
|
|
@@ -0,0 +1,354 @@
|
|
|
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";
|
|
2
|
+
import * as fs from "fs";
|
|
3
|
+
import * as path from "path";
|
|
4
|
+
import yargs from "yargs";
|
|
5
|
+
import { execSync } from "child_process";
|
|
6
|
+
//#region src/commands/debug.ts
|
|
7
|
+
var debugCommand = {
|
|
8
|
+
command: "debug",
|
|
9
|
+
describe: "Show which env files would be loaded and which variables would be applied, without loading them.",
|
|
10
|
+
handler: (argv) => {
|
|
11
|
+
const paths = resolveEnvPaths({
|
|
12
|
+
envFiles: argv["env"],
|
|
13
|
+
cascade: argv["cascade"]
|
|
14
|
+
});
|
|
15
|
+
const rawVars = argv["variables"];
|
|
16
|
+
const variables = rawVars ? Object.fromEntries(rawVars.map(validateCmdVariable)) : {};
|
|
17
|
+
log.info(`Paths: ${JSON.stringify(paths)}`);
|
|
18
|
+
log.info(`Variables: ${JSON.stringify(variables)}`);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region src/commands/decrypt.ts
|
|
23
|
+
/** Mirror of `dotenvx decrypt` from upstream — see also encrypt.ts. */
|
|
24
|
+
var decryptCommand = {
|
|
25
|
+
command: "decrypt",
|
|
26
|
+
describe: "Decrypt the values in one or more .env files in place using the matching private key in .env.keys.",
|
|
27
|
+
builder: (yargs) => yargs.option("env-keys-file", {
|
|
28
|
+
alias: "fk",
|
|
29
|
+
type: "string",
|
|
30
|
+
describe: "Path to the .env.keys file (default: ./.env.keys at cwd, regardless of --dir / --env-path)."
|
|
31
|
+
}).option("key", {
|
|
32
|
+
alias: "k",
|
|
33
|
+
type: "array",
|
|
34
|
+
string: true,
|
|
35
|
+
describe: "Specific keys (or picomatch globs) to decrypt. Default: all keys."
|
|
36
|
+
}).option("exclude-key", {
|
|
37
|
+
alias: "ek",
|
|
38
|
+
type: "array",
|
|
39
|
+
string: true,
|
|
40
|
+
describe: "Keys (or picomatch globs) to leave encrypted."
|
|
41
|
+
}).option("stdout", {
|
|
42
|
+
type: "boolean",
|
|
43
|
+
default: false,
|
|
44
|
+
describe: "Write the decrypted env contents to stdout instead of saving in place."
|
|
45
|
+
}).help("h").alias("h", "help"),
|
|
46
|
+
handler: (argv) => {
|
|
47
|
+
const envFiles = argv["env"] ?? [".env"];
|
|
48
|
+
const keys = argv["key"];
|
|
49
|
+
const excludeKeys = argv["exclude-key"];
|
|
50
|
+
const envKeysFile = argv["env-keys-file"];
|
|
51
|
+
const stdout = argv["stdout"] ?? false;
|
|
52
|
+
const result = decryptFiles({
|
|
53
|
+
envFiles,
|
|
54
|
+
...keys ? { keys } : {},
|
|
55
|
+
...excludeKeys ? { excludeKeys } : {},
|
|
56
|
+
...envKeysFile ? { envKeysFile } : {}
|
|
57
|
+
});
|
|
58
|
+
let hadError = false;
|
|
59
|
+
for (const processed of result.processedEnvs) {
|
|
60
|
+
if (processed.error) {
|
|
61
|
+
hadError = true;
|
|
62
|
+
log.error(`${processed.envFilepath}: ${processed.error.message}`);
|
|
63
|
+
if (processed.error.help) log.dim(processed.error.help);
|
|
64
|
+
continue;
|
|
65
|
+
}
|
|
66
|
+
if (stdout) process.stdout.write(processed.envSrc);
|
|
67
|
+
}
|
|
68
|
+
if (!stdout) {
|
|
69
|
+
const { written } = writeProcessed(result.processedEnvs);
|
|
70
|
+
for (const w of written) log.success(`decrypted ${w}`);
|
|
71
|
+
if (written.length === 0 && result.unchangedFilepaths.length > 0 && !hadError) log.dim(`no changes (${result.unchangedFilepaths.join(", ")})`);
|
|
72
|
+
}
|
|
73
|
+
if (hadError) process.exitCode = 1;
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
//#endregion
|
|
77
|
+
//#region src/commands/encrypt.ts
|
|
78
|
+
/**
|
|
79
|
+
* Mirrors the upstream `dotenvx encrypt` flags so existing muscle
|
|
80
|
+
* memory carries over. The `--env` global doubles as the file list
|
|
81
|
+
* (the upstream calls it `--env-file`); this CLI keeps a single
|
|
82
|
+
* canonical name across subcommands.
|
|
83
|
+
*/
|
|
84
|
+
var encryptCommand = {
|
|
85
|
+
command: "encrypt",
|
|
86
|
+
describe: "Encrypt the values in one or more .env files. Generates a private key in .env.keys on first run.",
|
|
87
|
+
builder: (yargs) => yargs.option("env-keys-file", {
|
|
88
|
+
alias: "fk",
|
|
89
|
+
type: "string",
|
|
90
|
+
describe: "Path to the .env.keys file (default: ./.env.keys at cwd, regardless of --dir / --env-path)."
|
|
91
|
+
}).option("key", {
|
|
92
|
+
alias: "k",
|
|
93
|
+
type: "array",
|
|
94
|
+
string: true,
|
|
95
|
+
describe: "Specific keys (or picomatch globs) to encrypt. Default: all keys."
|
|
96
|
+
}).option("exclude-key", {
|
|
97
|
+
alias: "ek",
|
|
98
|
+
type: "array",
|
|
99
|
+
string: true,
|
|
100
|
+
describe: "Keys (or picomatch globs) to leave plaintext."
|
|
101
|
+
}).option("stdout", {
|
|
102
|
+
type: "boolean",
|
|
103
|
+
default: false,
|
|
104
|
+
describe: "Write the encrypted env contents to stdout instead of saving in place."
|
|
105
|
+
}).help("h").alias("h", "help"),
|
|
106
|
+
handler: (argv) => {
|
|
107
|
+
const envFiles = argv["env"] ?? [".env"];
|
|
108
|
+
const keys = argv["key"];
|
|
109
|
+
const excludeKeys = argv["exclude-key"];
|
|
110
|
+
const envKeysFile = argv["env-keys-file"];
|
|
111
|
+
const stdout = argv["stdout"] ?? false;
|
|
112
|
+
const result = encryptFiles({
|
|
113
|
+
envFiles,
|
|
114
|
+
...keys ? { keys } : {},
|
|
115
|
+
...excludeKeys ? { excludeKeys } : {},
|
|
116
|
+
...envKeysFile ? { envKeysFile } : {}
|
|
117
|
+
});
|
|
118
|
+
let hadError = false;
|
|
119
|
+
for (const processed of result.processedEnvs) {
|
|
120
|
+
if (processed.error) {
|
|
121
|
+
hadError = true;
|
|
122
|
+
log.error(`${processed.envFilepath}: ${processed.error.message}`);
|
|
123
|
+
if (processed.error.help) log.dim(processed.error.help);
|
|
124
|
+
continue;
|
|
125
|
+
}
|
|
126
|
+
if (stdout) {
|
|
127
|
+
process.stdout.write(processed.envSrc);
|
|
128
|
+
continue;
|
|
129
|
+
}
|
|
130
|
+
if (processed.privateKeyAdded) log.success(`key added to .env.keys (${processed.privateKeyName ?? "<unknown>"})`);
|
|
131
|
+
}
|
|
132
|
+
if (!stdout) {
|
|
133
|
+
const { written } = writeProcessed(result.processedEnvs);
|
|
134
|
+
for (const w of written) log.success(`encrypted ${w}`);
|
|
135
|
+
if (written.length === 0 && result.unchangedFilepaths.length > 0 && !hadError) log.dim(`no changes (${result.unchangedFilepaths.join(", ")})`);
|
|
136
|
+
}
|
|
137
|
+
if (hadError) process.exitCode = 1;
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
//#endregion
|
|
141
|
+
//#region src/commands/expand.ts
|
|
142
|
+
/**
|
|
143
|
+
* Decrypts (when needed) and expands variable references in an env
|
|
144
|
+
* file. Mirrors the workflow `decrypt-vault` action — but cycle-safe,
|
|
145
|
+
* supports `${VAR:-default}` / `${VAR:?msg}`, and never silently
|
|
146
|
+
* truncates after N passes.
|
|
147
|
+
*/
|
|
148
|
+
var expandCommand = {
|
|
149
|
+
command: "expand",
|
|
150
|
+
describe: "Decrypt (if needed) and expand ${VAR}/$VAR references in an env file. Outputs to stdout by default.",
|
|
151
|
+
builder: (yargs) => yargs.option("output", {
|
|
152
|
+
type: "string",
|
|
153
|
+
describe: "Write the expanded result to this file (default: stdout)."
|
|
154
|
+
}).option("env-keys-file", {
|
|
155
|
+
alias: "fk",
|
|
156
|
+
type: "string",
|
|
157
|
+
describe: "Path to .env.keys (default: ./.env.keys at cwd, regardless of --dir / --env-path)."
|
|
158
|
+
}).option("on-missing", {
|
|
159
|
+
type: "string",
|
|
160
|
+
choices: [
|
|
161
|
+
"leave",
|
|
162
|
+
"empty",
|
|
163
|
+
"throw"
|
|
164
|
+
],
|
|
165
|
+
default: "leave",
|
|
166
|
+
describe: "How to handle ${UNRESOLVED_VAR}: leave it literal, substitute empty, or fail."
|
|
167
|
+
}).help("h").alias("h", "help"),
|
|
168
|
+
handler: (argv) => {
|
|
169
|
+
const envFiles = argv["env"] ?? [".env"];
|
|
170
|
+
if (envFiles.length !== 1) {
|
|
171
|
+
log.error(`expand operates on a single env file at a time; got ${String(envFiles.length)}.`);
|
|
172
|
+
process.exit(1);
|
|
173
|
+
}
|
|
174
|
+
const envFile = envFiles[0];
|
|
175
|
+
const filepath = path.resolve(envFile);
|
|
176
|
+
if (!fs.existsSync(filepath)) {
|
|
177
|
+
log.error(`env file not found: ${envFile}`);
|
|
178
|
+
process.exit(1);
|
|
179
|
+
}
|
|
180
|
+
let envSrc = fs.readFileSync(filepath, "utf8");
|
|
181
|
+
if (parseEnv(envSrc).some((l) => l.type === "kv" && isEncrypted(l.value))) {
|
|
182
|
+
const envKeysFile = argv["env-keys-file"];
|
|
183
|
+
const processed = decryptFiles({
|
|
184
|
+
envFiles: [envFile],
|
|
185
|
+
...envKeysFile ? { envKeysFile } : {}
|
|
186
|
+
}).processedEnvs[0];
|
|
187
|
+
if (processed?.error) {
|
|
188
|
+
log.error(`${envFile}: ${processed.error.message}`);
|
|
189
|
+
if (processed.error.help) log.dim(processed.error.help);
|
|
190
|
+
process.exit(1);
|
|
191
|
+
}
|
|
192
|
+
envSrc = processed.envSrc;
|
|
193
|
+
}
|
|
194
|
+
const onMissing = argv["on-missing"];
|
|
195
|
+
const result = expandEnvSrc(envSrc, { onMissing });
|
|
196
|
+
for (const v of result.unresolved) log.warn(`unresolved variable: ${v}`);
|
|
197
|
+
for (const cycle of result.cycles) log.warn(`cycle: ${cycle.join(" → ")}`);
|
|
198
|
+
const output = argv["output"];
|
|
199
|
+
if (output) {
|
|
200
|
+
fs.writeFileSync(path.resolve(output), result.envSrc);
|
|
201
|
+
log.success(`expanded ${envFile} → ${output}`);
|
|
202
|
+
} else {
|
|
203
|
+
process.stdout.write(result.envSrc);
|
|
204
|
+
if (!result.envSrc.endsWith("\n")) process.stdout.write("\n");
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
//#endregion
|
|
209
|
+
//#region src/commands/print.ts
|
|
210
|
+
var printCommand = {
|
|
211
|
+
command: "print <variable>",
|
|
212
|
+
describe: "Load env files and print the value of a single variable.",
|
|
213
|
+
builder: (yargs) => yargs.positional("variable", {
|
|
214
|
+
describe: "Name of the variable to print",
|
|
215
|
+
type: "string",
|
|
216
|
+
demandOption: true
|
|
217
|
+
}),
|
|
218
|
+
handler: (argv) => {
|
|
219
|
+
loadEnv({
|
|
220
|
+
envFiles: argv["env"],
|
|
221
|
+
variables: argv["variables"],
|
|
222
|
+
cascade: argv["cascade"],
|
|
223
|
+
vault: argv["vault"],
|
|
224
|
+
envPath: argv["env-path"],
|
|
225
|
+
override: argv["override"],
|
|
226
|
+
quiet: argv["quiet"]
|
|
227
|
+
});
|
|
228
|
+
const name = argv["variable"];
|
|
229
|
+
const value = process.env[name];
|
|
230
|
+
process.stdout.write(value != null ? `${value}\n` : "\n");
|
|
231
|
+
}
|
|
232
|
+
};
|
|
233
|
+
//#endregion
|
|
234
|
+
//#region src/commands/run.ts
|
|
235
|
+
var runCommand = {
|
|
236
|
+
command: "run [command..]",
|
|
237
|
+
aliases: ["$0"],
|
|
238
|
+
describe: "Load env files into process.env and execute a command. Default subcommand — `dotenvx-run [command]` is equivalent.",
|
|
239
|
+
builder: (yargs) => yargs.positional("command", {
|
|
240
|
+
describe: "Command to execute after loading env files",
|
|
241
|
+
type: "string",
|
|
242
|
+
array: true
|
|
243
|
+
}),
|
|
244
|
+
handler: (argv) => {
|
|
245
|
+
const command = (argv["command"] ?? []).join(" ");
|
|
246
|
+
loadEnv({
|
|
247
|
+
envFiles: argv["env"],
|
|
248
|
+
variables: argv["variables"],
|
|
249
|
+
cascade: argv["cascade"],
|
|
250
|
+
vault: argv["vault"],
|
|
251
|
+
envPath: argv["env-path"],
|
|
252
|
+
override: argv["override"],
|
|
253
|
+
quiet: argv["quiet"]
|
|
254
|
+
});
|
|
255
|
+
if (!command) return;
|
|
256
|
+
log.info(`Running: ${command}`);
|
|
257
|
+
try {
|
|
258
|
+
execSync(command, { stdio: "inherit" });
|
|
259
|
+
log.success(`Command completed: ${command}`);
|
|
260
|
+
} catch (error) {
|
|
261
|
+
const msg = error instanceof Error ? error.message : String(error);
|
|
262
|
+
log.error(`Command failed: ${msg}`);
|
|
263
|
+
process.exit(1);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
};
|
|
267
|
+
//#endregion
|
|
268
|
+
//#region src/commands/index.ts
|
|
269
|
+
/**
|
|
270
|
+
* Build the yargs CLI for `dotenvx-run`. Global options (env, variables,
|
|
271
|
+
* cascade, vault, override, quiet) are registered on the root so every
|
|
272
|
+
* subcommand inherits them.
|
|
273
|
+
*/
|
|
274
|
+
function createCli(argvInput) {
|
|
275
|
+
return yargs(argvInput).scriptName("envx").usage("$0 <command> [options]").option("config", {
|
|
276
|
+
alias: "c",
|
|
277
|
+
type: "string",
|
|
278
|
+
describe: "Path to an envx config file (default: discovered from package.json `envx.config` or envx.config.{ts,js,json})."
|
|
279
|
+
}).option("env", {
|
|
280
|
+
alias: "e",
|
|
281
|
+
type: "array",
|
|
282
|
+
describe: "Env files to load. Default: [\".env\"] (or `envFiles` from config; or every .env* under --env-path when set). Auto-detects environment when omitted."
|
|
283
|
+
}).option("env-path", {
|
|
284
|
+
alias: ["dir", "d"],
|
|
285
|
+
type: "string",
|
|
286
|
+
describe: "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."
|
|
287
|
+
}).option("variables", {
|
|
288
|
+
alias: "v",
|
|
289
|
+
type: "array",
|
|
290
|
+
describe: "Inline variables in the form name=value (repeatable).",
|
|
291
|
+
default: []
|
|
292
|
+
}).option("cascade", {
|
|
293
|
+
type: "string",
|
|
294
|
+
describe: "Cascade load order: .env, .env.<cascade>, .env.local, .env.<cascade>.local"
|
|
295
|
+
}).option("vault", {
|
|
296
|
+
alias: "va",
|
|
297
|
+
type: "boolean",
|
|
298
|
+
describe: "Shortcut for `--env-path vault`."
|
|
299
|
+
}).option("override", {
|
|
300
|
+
alias: "o",
|
|
301
|
+
type: "boolean",
|
|
302
|
+
describe: "Override existing process.env values. Conflicts with --cascade."
|
|
303
|
+
}).option("quiet", {
|
|
304
|
+
alias: "q",
|
|
305
|
+
type: "boolean",
|
|
306
|
+
describe: "Suppress dotenv's own output."
|
|
307
|
+
}).middleware((argv) => {
|
|
308
|
+
const configPath = argv["config"];
|
|
309
|
+
let loaded;
|
|
310
|
+
try {
|
|
311
|
+
loaded = loadDotenvxConfig({ ...configPath ? { configPath } : {} });
|
|
312
|
+
} catch (e) {
|
|
313
|
+
log.error(`config error: ${e.message}`);
|
|
314
|
+
process.exit(1);
|
|
315
|
+
}
|
|
316
|
+
if (loaded.source) log.dim(`config: ${loaded.source} (${loaded.origin})`);
|
|
317
|
+
const cfg = loaded.config;
|
|
318
|
+
if (argv["cascade"] === void 0 && cfg.cascade !== void 0) argv["cascade"] = cfg.cascade;
|
|
319
|
+
if (argv["override"] === void 0) argv["override"] = cfg.override ?? false;
|
|
320
|
+
if (argv["quiet"] === void 0) argv["quiet"] = cfg.quiet ?? true;
|
|
321
|
+
if (argv["vault"] === void 0) argv["vault"] = false;
|
|
322
|
+
if (argv["env-keys-file"] === void 0 && cfg.envKeysFile !== void 0) argv["env-keys-file"] = cfg.envKeysFile;
|
|
323
|
+
if (argv["env-path"] === void 0) {
|
|
324
|
+
if (cfg.envPath !== void 0) argv["env-path"] = cfg.envPath;
|
|
325
|
+
else if (argv["vault"]) argv["env-path"] = "vault";
|
|
326
|
+
}
|
|
327
|
+
const userPassedEnv = Array.isArray(argv["env"]) && argv["env"].length > 0;
|
|
328
|
+
let files;
|
|
329
|
+
if (userPassedEnv) files = argv["env"];
|
|
330
|
+
else if (cfg.envFiles && cfg.envFiles.length > 0) files = [...cfg.envFiles];
|
|
331
|
+
else if (typeof argv["env-path"] === "string") {
|
|
332
|
+
const subdir = argv["env-path"];
|
|
333
|
+
const wsRoot = findWorkspaceRoot();
|
|
334
|
+
const discovered = listEnvFiles(path.resolve(wsRoot, subdir));
|
|
335
|
+
if (discovered.length > 0) {
|
|
336
|
+
files = discovered;
|
|
337
|
+
log.dim(`env-path ${subdir}: discovered ${String(discovered.length)} file(s) — ${discovered.join(", ")}`);
|
|
338
|
+
} else {
|
|
339
|
+
files = [".env"];
|
|
340
|
+
log.warn(`env-path ${subdir}: no .env* files found; falling back to [".env"]`);
|
|
341
|
+
}
|
|
342
|
+
} else files = [".env"];
|
|
343
|
+
if (typeof argv["env-path"] === "string") {
|
|
344
|
+
const wsRoot = findWorkspaceRoot();
|
|
345
|
+
const dir = path.resolve(wsRoot, argv["env-path"]);
|
|
346
|
+
files = files.map((f) => path.isAbsolute(f) ? f : path.join(dir, f));
|
|
347
|
+
}
|
|
348
|
+
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");
|
|
350
|
+
}
|
|
351
|
+
//#endregion
|
|
352
|
+
export { createCli as t };
|
|
353
|
+
|
|
354
|
+
//# sourceMappingURL=commands-CcoGlJ3P.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commands-CcoGlJ3P.js","names":[],"sources":["../../src/commands/debug.ts","../../src/commands/decrypt.ts","../../src/commands/encrypt.ts","../../src/commands/expand.ts","../../src/commands/print.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 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 { execSync } from \"child_process\";\nimport type { CommandModule } from \"yargs\";\n\nimport { loadEnv } 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\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 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 findWorkspaceRoot,\n listEnvFiles,\n loadDotenvxConfig,\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 { printCommand } from \"./print.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 // 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 const subdir = argv[\"env-path\"] as string;\n const wsRoot = findWorkspaceRoot();\n const dir = path.resolve(wsRoot, 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 wsRoot = findWorkspaceRoot();\n const dir = path.resolve(wsRoot, 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 .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,UAAU,GAAG;;CAEtD;;;;AChBD,IAAa,iBAAgC;CAC3C,SAAS;CACT,UACE;CACF,UAAU,UACR,MACG,OAAO,iBAAiB;EACvB,OAAO;EACP,MAAM;EACN,UACE;EACH,CAAC,CACD,OAAO,OAAO;EACb,OAAO;EACP,MAAM;EACN,QAAQ;EACR,UACE;EACH,CAAC,CACD,OAAO,eAAe;EACrB,OAAO;EACP,MAAM;EACN,QAAQ;EACR,UAAU;EACX,CAAC,CACD,OAAO,UAAU;EAChB,MAAM;EACN,SAAS;EACT,UACE;EACH,CAAC,CACD,KAAK,IAAI,CACT,MAAM,KAAK,OAAO;CACvB,UAAU,SAAS;EACjB,MAAM,WAAY,KAAK,UAAmC,CAAC,OAAO;EAClE,MAAM,OAAO,KAAK;EAClB,MAAM,cAAc,KAAK;EACzB,MAAM,cAAc,KAAK;EACzB,MAAM,SAAU,KAAK,aAAqC;EAE1D,MAAM,SAAS,aAAa;GAC1B;GACA,GAAI,OAAO,EAAE,MAAM,GAAG,EAAE;GACxB,GAAI,cAAc,EAAE,aAAa,GAAG,EAAE;GACtC,GAAI,cAAc,EAAE,aAAa,GAAG,EAAE;GACvC,CAAC;EAEF,IAAI,WAAW;EAEf,KAAK,MAAM,aAAa,OAAO,eAAe;GAC5C,IAAI,UAAU,OAAO;IACnB,WAAW;IACX,IAAI,MAAM,GAAG,UAAU,YAAY,IAAI,UAAU,MAAM,UAAU;I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