@super-repo/envx 0.2.1-rc.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/README.md +194 -0
- package/dist/.tsbuildinfo +1 -0
- package/dist/auto.d.ts +2 -0
- package/dist/auto.d.ts.map +1 -0
- package/dist/auto.js +10 -0
- package/dist/auto.js.map +1 -0
- package/dist/bin/dotenvx.d.ts +3 -0
- package/dist/bin/dotenvx.d.ts.map +1 -0
- package/dist/bin/dotenvx.js +6 -0
- package/dist/bin/dotenvx.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +5 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/debug.d.ts +3 -0
- package/dist/commands/debug.d.ts.map +1 -0
- package/dist/commands/debug.js +21 -0
- package/dist/commands/debug.js.map +1 -0
- package/dist/commands/decrypt.d.ts +4 -0
- package/dist/commands/decrypt.d.ts.map +1 -0
- package/dist/commands/decrypt.js +73 -0
- package/dist/commands/decrypt.js.map +1 -0
- package/dist/commands/encrypt.d.ts +9 -0
- package/dist/commands/encrypt.d.ts.map +1 -0
- package/dist/commands/encrypt.js +82 -0
- package/dist/commands/encrypt.js.map +1 -0
- package/dist/commands/expand.d.ts +9 -0
- package/dist/commands/expand.d.ts.map +1 -0
- package/dist/commands/expand.js +83 -0
- package/dist/commands/expand.js.map +1 -0
- package/dist/commands/index.d.ts +8 -0
- package/dist/commands/index.d.ts.map +1 -0
- package/dist/commands/index.js +159 -0
- package/dist/commands/index.js.map +1 -0
- package/dist/commands/print.d.ts +3 -0
- package/dist/commands/print.d.ts.map +1 -0
- package/dist/commands/print.js +27 -0
- package/dist/commands/print.js.map +1 -0
- package/dist/commands/run.d.ts +3 -0
- package/dist/commands/run.d.ts.map +1 -0
- package/dist/commands/run.js +40 -0
- package/dist/commands/run.js.map +1 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +61 -0
- package/dist/index.js.map +1 -0
- package/package.json +57 -0
package/README.md
ADDED
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
# @honeycluster/envx
|
|
2
|
+
|
|
3
|
+
A small wrapper around [`@dotenvx/dotenvx`](https://www.npmjs.com/package/@dotenvx/dotenvx)
|
|
4
|
+
for monorepos. Auto-detects the active environment from common
|
|
5
|
+
platform signals, loads the matching `.env*` files from the workspace
|
|
6
|
+
root and the current package, and runs your command (or your code)
|
|
7
|
+
with that environment applied.
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
pnpm add @honeycluster/envx
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Programmatic API
|
|
14
|
+
|
|
15
|
+
### `import envx from "@honeycluster/envx"`
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import envx from "@honeycluster/envx";
|
|
19
|
+
|
|
20
|
+
// Three call shapes — all mutate process.env and return it for ergonomics.
|
|
21
|
+
|
|
22
|
+
const env = envx(); // load .env (auto-detect from NODE_ENV / VERCEL_ENV / NETLIFY)
|
|
23
|
+
const env = envx("prod"); // cascade-load .env, .env.prod, .env.local, .env.prod.local
|
|
24
|
+
const env = envx({ // full options
|
|
25
|
+
envFiles: ["vault/.env.prod"],
|
|
26
|
+
envPath: "vault",
|
|
27
|
+
variables: ["PORT=3000"],
|
|
28
|
+
override: false,
|
|
29
|
+
quiet: false,
|
|
30
|
+
});
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
The string form (`envx("prod")`) is shorthand for "scope this load to
|
|
34
|
+
the named environment" — it sets `cascade` so `.env.prod` and any local
|
|
35
|
+
overrides layer cleanly over `.env`.
|
|
36
|
+
|
|
37
|
+
`envx()` discovers `envx.config.{ts,js,json}` and `package.json`'s
|
|
38
|
+
`envx.config` automatically; the explicit args you pass override
|
|
39
|
+
matching fields from the config. See [`docs/CONFIG.md`](../../docs/CONFIG.md).
|
|
40
|
+
|
|
41
|
+
### `import "@honeycluster/envx/auto"` — side-effect
|
|
42
|
+
|
|
43
|
+
```ts
|
|
44
|
+
// In your app's entry file:
|
|
45
|
+
import "@honeycluster/envx/auto";
|
|
46
|
+
|
|
47
|
+
// envx() has already run by the time this line executes.
|
|
48
|
+
const env = process.env;
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
`@honeycluster/envx/config` is an alias of `/auto` (matches the
|
|
52
|
+
`dotenv/config` convention).
|
|
53
|
+
|
|
54
|
+
### Lower-level building blocks
|
|
55
|
+
|
|
56
|
+
The same helpers the CLI uses are also exported from
|
|
57
|
+
`@honeycluster/libs` if you want fine-grained control:
|
|
58
|
+
|
|
59
|
+
```ts
|
|
60
|
+
import {
|
|
61
|
+
detectEnvironment,
|
|
62
|
+
expandCascadePaths,
|
|
63
|
+
findWorkspaceRoot,
|
|
64
|
+
loadEnv,
|
|
65
|
+
resolveEnvPaths,
|
|
66
|
+
encryptFiles,
|
|
67
|
+
decryptFiles,
|
|
68
|
+
expandEnvSrc,
|
|
69
|
+
loadDotenvxConfig,
|
|
70
|
+
} from "@honeycluster/libs";
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## CLI
|
|
74
|
+
|
|
75
|
+
```sh
|
|
76
|
+
envx -- node app.js # load .env (auto-detected) and run
|
|
77
|
+
envx --env dev -- pnpm start # load .env.dev
|
|
78
|
+
envx print DATABASE_URL # print one variable
|
|
79
|
+
envx debug --cascade prod # show resolved paths
|
|
80
|
+
envx encrypt -e .env.prod # encrypt values in .env.prod
|
|
81
|
+
envx decrypt -e .env.prod -k FOO # decrypt only FOO
|
|
82
|
+
envx expand -e vault/.env.prod # decrypt + expand to stdout
|
|
83
|
+
envx -c ./envx.config.json run -- node app.js
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Bin commands
|
|
87
|
+
|
|
88
|
+
| bin | source | what it does |
|
|
89
|
+
| ---------------- | ---------------------------- | ----------------------------------------------- |
|
|
90
|
+
| `envx` | `dist/cli.js` | This package's CLI (subcommands below) |
|
|
91
|
+
| `dotenvx-proxy` | `dist/bin/dotenvx.js` | Passthrough to upstream `@dotenvx/dotenvx` |
|
|
92
|
+
|
|
93
|
+
### Subcommands
|
|
94
|
+
|
|
95
|
+
| command | what it does |
|
|
96
|
+
| --------- | -------------------------------------------------------------------------------------- |
|
|
97
|
+
| `run` | (default) load env files into `process.env` and execute a command |
|
|
98
|
+
| `print` | load env files and print a single variable's value |
|
|
99
|
+
| `debug` | show which files would be loaded without loading them |
|
|
100
|
+
| `encrypt` | encrypt values in one or more `.env*` files (writes `.env.keys` on first run) |
|
|
101
|
+
| `decrypt` | decrypt values back in place |
|
|
102
|
+
| `expand` | decrypt (if needed) and expand `${VAR}` / `$VAR` / `${VAR:-default}` / `${VAR:?msg}` |
|
|
103
|
+
|
|
104
|
+
### Global options
|
|
105
|
+
|
|
106
|
+
| option | alias | default | description |
|
|
107
|
+
| --------------- | ----------- | ----------- | ---------------------------------------------------------------------------------------- |
|
|
108
|
+
| `--config` | `-c` | _(auto)_ | Path to an `envx.config.{ts,js,json}`. Discovery order: flag → `package.json` `envx.config` → auto-discover. |
|
|
109
|
+
| `--env` | `-e` | `[".env"]` | Files to load (repeatable). Auto-discovered from `--env-path` when omitted. |
|
|
110
|
+
| `--env-path` | | _(none)_ | Subdirectory holding env files. When set + `--env` omitted, every `.env*` in the dir is included. |
|
|
111
|
+
| `--vault` | `--va` | `false` | Shortcut for `--env-path vault`. |
|
|
112
|
+
| `--variables` | `-v` | `[]` | Inline `name=value` overrides (repeatable). |
|
|
113
|
+
| `--cascade` | | _(off)_ | Cascade name; expands `.env`, `.env.<c>`, `.env.local`, `.env.<c>.local`. |
|
|
114
|
+
| `--override` | `-o` | `false` | Override existing `process.env` values. Conflicts with `--cascade`. |
|
|
115
|
+
| `--quiet` | `-q` | `true` | Suppress dotenv's own output. |
|
|
116
|
+
|
|
117
|
+
### Auto-detect rules
|
|
118
|
+
|
|
119
|
+
The auto-detected environment becomes the suffix on `.env.<env>`:
|
|
120
|
+
|
|
121
|
+
| signal | resolves to |
|
|
122
|
+
| ------------------------------------- | --------------- |
|
|
123
|
+
| `VERCEL_ENV=production` | `.env.prod` |
|
|
124
|
+
| `VERCEL_ENV=preview` (or unset) | `.env.dev` |
|
|
125
|
+
| Netlify `CONTEXT=production` | `.env.prod` |
|
|
126
|
+
| Netlify `CONTEXT=deploy-preview` / `branch-deploy` | `.env.dev` |
|
|
127
|
+
| `NODE_ENV=production` | `.env.prod` |
|
|
128
|
+
| `NODE_ENV=development` | `.env.dev` |
|
|
129
|
+
| `NODE_ENV=local` | `.env.local` |
|
|
130
|
+
| _no signals_ | `.env` |
|
|
131
|
+
|
|
132
|
+
Auto-detection only triggers when `--env` is left at its default
|
|
133
|
+
(`[".env"]`). Explicit `--env` always wins.
|
|
134
|
+
|
|
135
|
+
## Embedding the CLI
|
|
136
|
+
|
|
137
|
+
The yargs factory is exported under the `./commands` subpath if you
|
|
138
|
+
want to register `envx`'s commands inside your own tool:
|
|
139
|
+
|
|
140
|
+
```ts
|
|
141
|
+
import { createCli } from "@honeycluster/envx/commands";
|
|
142
|
+
|
|
143
|
+
createCli(process.argv.slice(2)).parseSync();
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
## Development
|
|
147
|
+
|
|
148
|
+
```sh
|
|
149
|
+
# From the package root
|
|
150
|
+
pnpm install
|
|
151
|
+
pnpm build # tsc + tsc-alias → dist/
|
|
152
|
+
pnpm dev # tsc --watch
|
|
153
|
+
pnpm test # vitest unit tests
|
|
154
|
+
pnpm test:integration # spawn-based subprocess tests
|
|
155
|
+
pnpm typecheck # tsc --noEmit
|
|
156
|
+
pnpm format # prettier --write src/
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
Tests live in `tests/`. The vitest config is at
|
|
160
|
+
`configs/vitest.config.ts`; the `test` script invokes vitest with
|
|
161
|
+
`--config` so the layout stays explicit. Integration fixtures live in
|
|
162
|
+
`tests/integration/__static__/` — each subdirectory is a self-contained
|
|
163
|
+
worked example (read the file content for the canonical demonstration
|
|
164
|
+
of every feature).
|
|
165
|
+
|
|
166
|
+
## Layout
|
|
167
|
+
|
|
168
|
+
```
|
|
169
|
+
packages/core/
|
|
170
|
+
├── src/
|
|
171
|
+
│ ├── index.ts # default export: envx() programmatic API
|
|
172
|
+
│ ├── auto.ts # `import "@honeycluster/envx/auto"` side-effect entry
|
|
173
|
+
│ ├── cli.ts # `envx` bin entry — wires yargs + parses argv
|
|
174
|
+
│ ├── bin/
|
|
175
|
+
│ │ └── dotenvx.ts # `dotenvx-proxy` legacy passthrough
|
|
176
|
+
│ └── commands/
|
|
177
|
+
│ ├── index.ts # createCli — registers subcommands + global options
|
|
178
|
+
│ ├── run.ts # `run [command..]`
|
|
179
|
+
│ ├── print.ts # `print <variable>`
|
|
180
|
+
│ ├── debug.ts # `debug`
|
|
181
|
+
│ ├── encrypt.ts # `encrypt`
|
|
182
|
+
│ ├── decrypt.ts # `decrypt`
|
|
183
|
+
│ └── expand.ts # `expand`
|
|
184
|
+
├── tests/
|
|
185
|
+
│ ├── *.test.ts # unit suites (env, factory, programmatic API)
|
|
186
|
+
│ └── integration/
|
|
187
|
+
│ ├── cli.test.ts # subprocess end-to-end suite
|
|
188
|
+
│ └── __static__/ # read-only fixtures (cp'd to tmp per test)
|
|
189
|
+
├── configs/
|
|
190
|
+
│ ├── tsconfig.build.json
|
|
191
|
+
│ └── vitest.config.ts
|
|
192
|
+
├── tsconfig.json
|
|
193
|
+
└── package.json
|
|
194
|
+
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"fileNames":["../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2016.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2018.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2019.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2021.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2023.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2024.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2025.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.esnext.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.date.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.array.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.error.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.object.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.string.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2023.array.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2023.collection.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2023.intl.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2024.collection.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2024.object.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2024.promise.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2024.regexp.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2024.string.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2025.collection.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2025.float16.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2025.intl.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2025.iterator.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2025.promise.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2025.regexp.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.esnext.array.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.esnext.collection.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.esnext.date.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.esnext.decorators.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.esnext.error.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.esnext.sharedmemory.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.esnext.temporal.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.esnext.typedarrays.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.decorators.d.ts","../../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../libs/dist/types.d.ts","../../libs/dist/crypto.d.ts","../../libs/dist/parser.d.ts","../../libs/dist/keys.d.ts","../../libs/dist/match.d.ts","../../libs/dist/encrypt.d.ts","../../libs/dist/decrypt.d.ts","../../libs/dist/expand.d.ts","../../libs/dist/config.d.ts","../../libs/dist/env.d.ts","../../libs/dist/index.d.ts","../src/index.ts","../src/auto.ts","../../../../node_modules/.pnpm/@types+yargs-parser@21.0.3/node_modules/@types/yargs-parser/index.d.ts","../../../../node_modules/.pnpm/@types+yargs@17.0.35/node_modules/@types/yargs/helpers.d.ts","../../../../node_modules/.pnpm/@types+yargs@17.0.35/node_modules/@types/yargs/helpers.d.mts","../../../../node_modules/.pnpm/@types+yargs@17.0.35/node_modules/@types/yargs/index.d.ts","../../../../node_modules/.pnpm/@types+yargs@17.0.35/node_modules/@types/yargs/index.d.mts","../../common/dist/logger.d.ts","../../common/dist/index.d.ts","../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","../src/cli.ts","../../../../node_modules/.pnpm/@dotenvx+dotenvx@1.65.0/node_modules/@dotenvx/dotenvx/src/lib/main.d.ts","../src/bin/dotenvx.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/compatibility/disposable.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/compatibility/indexable.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/compatibility/iterators.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/compatibility/index.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/globals.typedarray.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/buffer.buffer.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/globals.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/web-globals/abortcontroller.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/web-globals/domexception.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/web-globals/events.d.ts","../../../../node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/index.d.ts","../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/header.d.ts","../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/readable.d.ts","../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/file.d.ts","../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/fetch.d.ts","../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/formdata.d.ts","../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/connector.d.ts","../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/client.d.ts","../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/errors.d.ts","../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/dispatcher.d.ts","../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/global-dispatcher.d.ts","../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/global-origin.d.ts","../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/pool-stats.d.ts","../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/pool.d.ts","../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/handlers.d.ts","../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/balanced-pool.d.ts","../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/agent.d.ts","../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-interceptor.d.ts","../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-agent.d.ts","../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-client.d.ts","../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-pool.d.ts","../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-errors.d.ts","../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/proxy-agent.d.ts","../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/env-http-proxy-agent.d.ts","../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/retry-handler.d.ts","../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/retry-agent.d.ts","../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/api.d.ts","../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/interceptors.d.ts","../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/util.d.ts","../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/cookies.d.ts","../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/patch.d.ts","../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/websocket.d.ts","../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/eventsource.d.ts","../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/filereader.d.ts","../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/diagnostics-channel.d.ts","../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/content-type.d.ts","../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/cache.d.ts","../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/index.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/web-globals/fetch.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/web-globals/navigator.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/web-globals/storage.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/assert.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/assert/strict.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/async_hooks.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/buffer.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/child_process.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/cluster.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/console.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/constants.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/crypto.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/dgram.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/diagnostics_channel.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/dns.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/dns/promises.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/domain.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/events.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/fs.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/fs/promises.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/http.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/http2.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/https.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/inspector.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/inspector.generated.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/module.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/net.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/os.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/path.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/perf_hooks.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/process.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/punycode.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/querystring.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/readline.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/readline/promises.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/repl.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/sea.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/sqlite.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/stream.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/stream/promises.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/stream/consumers.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/stream/web.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/string_decoder.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/test.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/timers.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/timers/promises.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/tls.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/trace_events.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/tty.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/url.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/util.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/v8.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/vm.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/wasi.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/worker_threads.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/zlib.d.ts","../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/index.d.ts"],"fileIdsList":[[123,172,189,190,215],[123,169,170,172,189,190],[123,171,172,189,190],[172,189,190],[123,172,177,189,190,207],[123,172,173,178,183,189,190,192,204,215],[123,172,173,174,183,189,190,192],[123,172,189,190],[118,119,120,123,172,189,190],[123,172,175,189,190,216],[123,172,176,177,184,189,190,193],[123,172,177,189,190,204,212],[123,172,178,180,183,189,190,192],[123,171,172,179,189,190],[123,172,180,181,189,190],[123,172,182,183,189,190],[123,171,172,183,189,190],[123,172,183,184,185,189,190,204,215],[123,172,183,184,185,189,190,199,204,207],[123,165,172,180,183,186,189,190,192,204,215],[123,172,183,184,186,187,189,190,192,204,212,215],[123,172,186,188,189,190,204,212,215],[121,122,123,124,125,126,127,166,167,168,169,170,171,172,173,174,175,176,177,178,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],[123,172,183,189,190],[123,172,189,190,191,215],[123,172,180,183,189,190,192,204],[123,172,189,190,193],[123,172,189,190,194],[123,171,172,189,190,195],[123,169,170,171,172,173,174,175,176,177,178,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],[123,172,189,190,197],[123,172,189,190,198],[123,172,183,189,190,199,200],[123,172,189,190,199,201,216,218],[123,172,184,189,190],[123,172,183,189,190,204,205,207],[123,172,189,190,206,207],[123,172,189,190,204,205],[123,172,189,190,207],[123,172,189,190,208],[123,169,172,189,190,204,209,215],[123,172,183,189,190,210,211],[123,172,189,190,210,211],[123,172,177,189,190,192,204,212],[123,172,189,190,213],[123,172,189,190,192,214],[123,172,186,189,190,198,215],[123,172,177,189,190,216],[123,172,189,190,204,217],[123,172,189,190,191,218],[123,172,189,190,219],[123,165,172,189,190],[123,165,172,183,185,189,190,195,204,207,215,217,218,220],[123,172,189,190,204,221],[102,123,172,189,190],[101,123,172,189,190],[104,123,172,189,190],[123,137,141,172,189,190,215],[123,137,172,189,190,204,215],[123,132,172,189,190],[123,134,137,172,189,190,212,215],[123,172,189,190,192,212],[123,172,189,190,222],[123,132,172,189,190,222],[123,134,137,172,189,190,192,215],[123,129,130,133,136,172,183,189,190,204,215],[123,137,144,172,189,190],[123,129,135,172,189,190],[123,137,158,159,172,189,190],[123,133,137,172,189,190,207,215,222],[123,158,172,189,190,222],[123,131,132,172,189,190,222],[123,137,172,189,190],[123,131,132,133,134,135,136,137,138,139,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,159,160,161,162,163,164,172,189,190],[123,137,152,172,189,190],[123,137,144,145,172,189,190],[123,135,137,145,146,172,189,190],[123,136,172,189,190],[123,129,132,137,172,189,190],[123,137,141,145,146,172,189,190],[123,141,172,189,190],[123,135,137,140,172,189,190,215],[123,129,134,137,144,172,189,190],[123,172,189,190,204],[123,132,137,158,172,189,190,220,222],[106,123,172,189,190],[99,123,172,189,190],[116,123,172,189,190],[103,114,123,172,189,190],[98,105,107,123,172,189,190],[98,105,107,123,172,184,189,190,194],[98,105,107,108,109,110,111,112,113,123,172,189,190,194],[98,105,123,172,189,190],[98,105,107,123,172,173,189,190],[98,123,172,189,190],[88,123,172,189,190],[88,89,123,172,189,190],[88,89,90,91,92,93,94,95,96,97,123,172,189,190]],"fileInfos":[{"version":"bcd24271a113971ba9eb71ff8cb01bc6b0f872a85c23fdbe5d93065b375933cd","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f88bedbeb09c6f5a6645cb24c7c55f1aa22d19ae96c8e6959cbd8b85a707bc6","impliedFormat":1},{"version":"7fe93b39b810eadd916be8db880dd7f0f7012a5cc6ffb62de8f62a2117fa6f1f","impliedFormat":1},{"version":"bb0074cc08b84a2374af33d8bf044b80851ccc9e719a5e202eacf40db2c31600","impliedFormat":1},{"version":"1a7daebe4f45fb03d9ec53d60008fbf9ac45a697fdc89e4ce218bc94b94f94d6","impliedFormat":1},{"version":"f94b133a3cb14a288803be545ac2683e0d0ff6661bcd37e31aaaec54fc382aed","impliedFormat":1},{"version":"f59d0650799f8782fd74cf73c19223730c6d1b9198671b1c5b3a38e1188b5953","impliedFormat":1},{"version":"8a15b4607d9a499e2dbeed9ec0d3c0d7372c850b2d5f1fb259e8f6d41d468a84","impliedFormat":1},{"version":"26e0fe14baee4e127f4365d1ae0b276f400562e45e19e35fd2d4c296684715e6","impliedFormat":1},{"version":"1e9332c23e9a907175e0ffc6a49e236f97b48838cc8aec9ce7e4cec21e544b65","impliedFormat":1},{"version":"3753fbc1113dc511214802a2342280a8b284ab9094f6420e7aa171e868679f91","impliedFormat":1},{"version":"999ca32883495a866aa5737fe1babc764a469e4cde6ee6b136a4b9ae68853e4b","impliedFormat":1},{"version":"17f13ecb98cbc39243f2eee1f16d45cd8ec4706b03ee314f1915f1a8b42f6984","impliedFormat":1},{"version":"eadcffda2aa84802c73938e589b9e58248d74c59cb7fcbca6474e3435ac15504","affectsGlobalScope":true,"impliedFormat":1},{"version":"105ba8ff7ba746404fe1a2e189d1d3d2e0eb29a08c18dded791af02f29fb4711","affectsGlobalScope":true,"impliedFormat":1},{"version":"00343ca5b2e3d48fa5df1db6e32ea2a59afab09590274a6cccb1dbae82e60c7c","affectsGlobalScope":true,"impliedFormat":1},{"version":"ebd9f816d4002697cb2864bea1f0b70a103124e18a8cd9645eeccc09bdf80ab4","affectsGlobalScope":true,"impliedFormat":1},{"version":"2c1afac30a01772cd2a9a298a7ce7706b5892e447bb46bdbeef720f7b5da77ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"7b0225f483e4fa685625ebe43dd584bb7973bbd84e66a6ba7bbe175ee1048b4f","affectsGlobalScope":true,"impliedFormat":1},{"version":"c0a4b8ac6ce74679c1da2b3795296f5896e31c38e888469a8e0f99dc3305de60","affectsGlobalScope":true,"impliedFormat":1},{"version":"3084a7b5f569088e0146533a00830e206565de65cae2239509168b11434cd84f","affectsGlobalScope":true,"impliedFormat":1},{"version":"c5079c53f0f141a0698faa903e76cb41cd664e3efb01cc17a5c46ec2eb0bef42","affectsGlobalScope":true,"impliedFormat":1},{"version":"32cafbc484dea6b0ab62cf8473182bbcb23020d70845b406f80b7526f38ae862","affectsGlobalScope":true,"impliedFormat":1},{"version":"fca4cdcb6d6c5ef18a869003d02c9f0fd95df8cfaf6eb431cd3376bc034cad36","affectsGlobalScope":true,"impliedFormat":1},{"version":"b93ec88115de9a9dc1b602291b85baf825c85666bf25985cc5f698073892b467","affectsGlobalScope":true,"impliedFormat":1},{"version":"f5c06dcc3fe849fcb297c247865a161f995cc29de7aa823afdd75aaaddc1419b","affectsGlobalScope":true,"impliedFormat":1},{"version":"b77e16112127a4b169ef0b8c3a4d730edf459c5f25fe52d5e436a6919206c4d7","affectsGlobalScope":true,"impliedFormat":1},{"version":"fbffd9337146eff822c7c00acbb78b01ea7ea23987f6c961eba689349e744f8c","affectsGlobalScope":true,"impliedFormat":1},{"version":"a995c0e49b721312f74fdfb89e4ba29bd9824c770bbb4021d74d2bf560e4c6bd","affectsGlobalScope":true,"impliedFormat":1},{"version":"c7b3542146734342e440a84b213384bfa188835537ddbda50d30766f0593aff9","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce6180fa19b1cccd07ee7f7dbb9a367ac19c0ed160573e4686425060b6df7f57","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f02e2476bccb9dbe21280d6090f0df17d2f66b74711489415a8aa4df73c9675","affectsGlobalScope":true,"impliedFormat":1},{"version":"45e3ab34c1c013c8ab2dc1ba4c80c780744b13b5676800ae2e3be27ae862c40c","affectsGlobalScope":true,"impliedFormat":1},{"version":"805c86f6cca8d7702a62a844856dbaa2a3fd2abef0536e65d48732441dde5b5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"e42e397f1a5a77994f0185fd1466520691456c772d06bf843e5084ceb879a0ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"f4c2b41f90c95b1c532ecc874bd3c111865793b23aebcc1c3cbbabcd5d76ffb0","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab26191cfad5b66afa11b8bf935ef1cd88fabfcb28d30b2dfa6fad877d050332","affectsGlobalScope":true,"impliedFormat":1},{"version":"2088bc26531e38fb05eedac2951480db5309f6be3fa4a08d2221abb0f5b4200d","affectsGlobalScope":true,"impliedFormat":1},{"version":"cb9d366c425fea79716a8fb3af0d78e6b22ebbab3bd64d25063b42dc9f531c1e","affectsGlobalScope":true,"impliedFormat":1},{"version":"500934a8089c26d57ebdb688fc9757389bb6207a3c8f0674d68efa900d2abb34","affectsGlobalScope":true,"impliedFormat":1},{"version":"689da16f46e647cef0d64b0def88910e818a5877ca5379ede156ca3afb780ac3","affectsGlobalScope":true,"impliedFormat":1},{"version":"bc21cc8b6fee4f4c2440d08035b7ea3c06b3511314c8bab6bef7a92de58a2593","affectsGlobalScope":true,"impliedFormat":1},{"version":"7ca53d13d2957003abb47922a71866ba7cb2068f8d154877c596d63c359fed25","affectsGlobalScope":true,"impliedFormat":1},{"version":"54725f8c4df3d900cb4dac84b64689ce29548da0b4e9b7c2de61d41c79293611","affectsGlobalScope":true,"impliedFormat":1},{"version":"e5594bc3076ac29e6c1ebda77939bc4c8833de72f654b6e376862c0473199323","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f3eb332c2d73e729f3364fcc0c2b375e72a121e8157d25a82d67a138c83a95c","affectsGlobalScope":true,"impliedFormat":1},{"version":"6f4427f9642ce8d500970e4e69d1397f64072ab73b97e476b4002a646ac743b1","affectsGlobalScope":true,"impliedFormat":1},{"version":"48915f327cd1dea4d7bd358d9dc7732f58f9e1626a29cc0c05c8c692419d9bb7","affectsGlobalScope":true,"impliedFormat":1},{"version":"b7bf9377723203b5a6a4b920164df22d56a43f593269ba6ae1fdc97774b68855","affectsGlobalScope":true,"impliedFormat":1},{"version":"db9709688f82c9e5f65a119c64d835f906efe5f559d08b11642d56eb85b79357","affectsGlobalScope":true,"impliedFormat":1},{"version":"4b25b8c874acd1a4cf8444c3617e037d444d19080ac9f634b405583fd10ce1f7","affectsGlobalScope":true,"impliedFormat":1},{"version":"37be57d7c90cf1f8112ee2636a068d8fd181289f82b744160ec56a7dc158a9f5","affectsGlobalScope":true,"impliedFormat":1},{"version":"a917a49ac94cd26b754ab84e113369a75d1a47a710661d7cd25e961cc797065f","affectsGlobalScope":true,"impliedFormat":1},{"version":"6d3261badeb7843d157ef3e6f5d1427d0eeb0af0cf9df84a62cfd29fd47ac86e","affectsGlobalScope":true,"impliedFormat":1},{"version":"195daca651dde22f2167ac0d0a05e215308119a3100f5e6268e8317d05a92526","affectsGlobalScope":true,"impliedFormat":1},{"version":"8b11e4285cd2bb164a4dc09248bdec69e9842517db4ca47c1ba913011e44ff2f","affectsGlobalScope":true,"impliedFormat":1},{"version":"0508571a52475e245b02bc50fa1394065a0a3d05277fbf5120c3784b85651799","affectsGlobalScope":true,"impliedFormat":1},{"version":"8f9af488f510c3015af3cc8c267a9e9d96c4dd38a1fdff0e11dc5a544711415b","affectsGlobalScope":true,"impliedFormat":1},{"version":"fc611fea8d30ea72c6bbfb599c9b4d393ce22e2f5bfef2172534781e7d138104","affectsGlobalScope":true,"impliedFormat":1},{"version":"0bd714129fca875f7d4c477a1a392200b0bcd13fb2e80928cd334b63830ea047","affectsGlobalScope":true,"impliedFormat":1},{"version":"e2c9037ae6cd2c52d80ceef0b3c5ffdb488627d71529cf4f63776daf11161c9a","affectsGlobalScope":true,"impliedFormat":1},{"version":"135d5cf4d345f59f1a9caadfafcd858d3d9cc68290db616cc85797224448cccc","affectsGlobalScope":true,"impliedFormat":1},{"version":"bc238c3f81c2984751932b6aab223cd5b830e0ac6cad76389e5e9d2ffc03287d","affectsGlobalScope":true,"impliedFormat":1},{"version":"4a07f9b76d361f572620927e5735b77d6d2101c23cdd94383eb5b706e7b36357","affectsGlobalScope":true,"impliedFormat":1},{"version":"7c4e8dc6ab834cc6baa0227e030606d29e3e8449a9f67cdf5605ea5493c4db29","affectsGlobalScope":true,"impliedFormat":1},{"version":"de7ba0fd02e06cd9a5bd4ab441ed0e122735786e67dde1e849cced1cd8b46b78","affectsGlobalScope":true,"impliedFormat":1},{"version":"6148e4e88d720a06855071c3db02069434142a8332cf9c182cda551adedf3156","affectsGlobalScope":true,"impliedFormat":1},{"version":"d63dba625b108316a40c95a4425f8d4294e0deeccfd6c7e59d819efa19e23409","affectsGlobalScope":true,"impliedFormat":1},{"version":"0568d6befee03dd435bed4fc25c4e46865b24bdcb8c563fdc21f580a2c301904","affectsGlobalScope":true,"impliedFormat":1},{"version":"30d62269b05b584741f19a5369852d5d34895aa2ac4fd948956f886d15f9cc0d","affectsGlobalScope":true,"impliedFormat":1},{"version":"f128dae7c44d8f35ee42e0a437000a57c9f06cc04f8b4fb42eebf44954d53dc8","affectsGlobalScope":true,"impliedFormat":1},{"version":"ffbe6d7b295306b2ba88030f65b74c107d8d99bdcf596ea99c62a02f606108b0","affectsGlobalScope":true,"impliedFormat":1},{"version":"996fb27b15277369c68a4ba46ed138b4e9e839a02fb4ec756f7997629242fd9f","affectsGlobalScope":true,"impliedFormat":1},{"version":"79b712591b270d4778c89706ca2cfc56ddb8c3f895840e477388f1710dc5eda9","affectsGlobalScope":true,"impliedFormat":1},{"version":"20884846cef428b992b9bd032e70a4ef88e349263f63aeddf04dda837a7dba26","affectsGlobalScope":true,"impliedFormat":1},{"version":"5fcab789c73a97cd43828ee3cc94a61264cf24d4c44472ce64ced0e0f148bdb2","affectsGlobalScope":true,"impliedFormat":1},{"version":"db59a81f070c1880ad645b2c0275022baa6a0c4f0acdc58d29d349c6efcf0903","affectsGlobalScope":true,"impliedFormat":1},{"version":"673294292640f5722b700e7d814e17aaf7d93f83a48a2c9b38f33cbc940ad8b0","affectsGlobalScope":true,"impliedFormat":1},{"version":"d786b48f934cbca483b3c6d0a798cb43bbb4ada283e76fb22c28e53ae05b9e69","affectsGlobalScope":true,"impliedFormat":1},{"version":"1ecb8e347cb6b2a8927c09b86263663289418df375f5e68e11a0ae683776978f","affectsGlobalScope":true,"impliedFormat":1},{"version":"142efd4ce210576f777dc34df121777be89eda476942d6d6663b03dcb53be3ff","affectsGlobalScope":true,"impliedFormat":1},{"version":"379bc41580c2d774f82e828c70308f24a005b490c25ba34d679d84bcf05c3d9d","affectsGlobalScope":true,"impliedFormat":1},{"version":"ed484fb2aa8a1a23d0277056ec3336e0a0b52f9b8d6a961f338a642faf43235d","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ffedae1d1c2d53fdbca1c96d3c7dda544281f7d262f99b6880634f8fd8d9820","affectsGlobalScope":true,"impliedFormat":1},{"version":"83a730b125d477dd264df8ba479afab27a3dae7152b005c214ab94dc7ee44fd3","affectsGlobalScope":true,"impliedFormat":1},{"version":"1ce14b81c5cc821994aa8ec1d42b220dd41b27fcc06373bce3958af7421b77d4","affectsGlobalScope":true,"impliedFormat":1},{"version":"b3a048b3e9302ef9a34ef4ebb9aecfb28b66abb3bce577206a79fee559c230da","affectsGlobalScope":true,"impliedFormat":1},"e46ee5aa97025c779149dc3921b9d8f4b72275526ea249a70afbd62ad40ff5a0","5120448b1551ea2d705ae9fa706a84b41402b8301ae4edaf9ad20b1de526b80f","293fc7f20408c37c17c8f7c9c10b378a30d095e6f5e6d5dc3d8c7a81e5d5d093","699ea20c4f0c474b73d5c883f3d922ec73f0f7e459ecb193b7170e5ed294618e","8a6677a5c647b508ebd742c076d19e78d62463130ca19fd32296285e56a800e7","cfc33f250cb57aaaa512325da48a04447dd1f04c90a18a7e509cb704e1528476","a42f1be545ca6a1eca9067a8c1d2ecaa2aed1541ad675d7b037809d4b7d537c2","5284e0ea5ee65e094a46a2a3f10d5d7b069c703116d366624e5fb6801451dd15","3f9ac7da7afec3f3e0d18adaef47ff0a08587b8a386e7a95b1be0454c79fb955","3ee78b340d204ceb4a62c9a024943b4633dcb652618731280ff6f91bf4f48d4f","4ba15249bb585f8b07e351e046265f55b0b676f1ae92fbcce5d260a138d46a6d",{"version":"151a01af1fec81e41f884bac3474796e2d9e19d9edac0d685105ffcacbe8c0d3","signature":"fd820450a480d9eab6ee7a99c6ab6c8ff40bc756e91f0051be35c32790289057"},{"version":"7ec9552d6b4c7088a94861e1cc31a5f872b22392f30ef8479f0563a4e4daae1c","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"},{"version":"bae8d023ef6b23df7da26f51cea44321f95817c190342a36882e93b80d07a960","impliedFormat":1},{"version":"7f1fbc2170f86615a5c1527db124f8ab0391661e0792f692c4a70de3eb1a23ef","impliedFormat":1},{"version":"059b7930d2e7946e2b7cacdb256f5d1ccaa24f073e557b511295fb3af7d876d8","impliedFormat":99},{"version":"26a770cec4bd2e7dbba95c6e536390fffe83c6268b78974a93727903b515c4e7","impliedFormat":1},{"version":"dd5115b329c19c4385af13eda13e3ab03355e711c3f313173fd54ed7d08cfd39","impliedFormat":99},"a2d7a19e347c41428bf51b4cd9b1c501d4509ad6eec1afd65f84c502e3093a7b","bc947f0d6f5350066330a4d2f6418f38510595ded1f110cb2caa11f055c86de0",{"version":"bea675179e2c6f18594fd5683cef57d403342d787729beb400323d1c166bc787","signature":"4862a87ba81d355f9bee949a6016dacd1aa81e8925cfc313b57fe7d94a9fe462"},{"version":"6b272cc64eae77d9a03a14d15d75c11b81fec7b99897a43c9934c24c9c9bbd26","signature":"3dcc62569fce23d8c307cfdb6852e7453996d766c6d0017ce8a51db3eea5772d"},{"version":"9b350936d2e5816bc9e153695dfa5a3913e6562be20b439df048b1bb77bbc77a","signature":"264a3e1d0725bd9aaca8a0236140e7f26d4f11a538b9975e95fe3f2b81e2c6c6"},{"version":"4792c355a3bc7db80b808c8c25c4db758089c4136e794e1f20eb559781ccba08","signature":"6a1daaf080eac11b5d287690757cf1540ad672a4924002ce9c75e058d2146690"},{"version":"6b77f72d83a1111375e777f1ff57d13807ff2f48037469f890cfe83f85378c47","signature":"af5f8a673a744668cae824d33065380d02fc7107515fe74d44b7199a16a2f5f7"},{"version":"70450cf719a86632c198771df9af18dc9c962ac4feb9f2b9ae81c25ab1b3dca7","signature":"61e9d27609d2ea03715cd5518f66d92f4e93d3a5776e5a29fd1e92423d937ff4"},{"version":"e247c9c4573218207f4ffe1ab3aa0e9f93caf36fceac75b8d60fb1948b9a7fce","signature":"675f4a37bee665526b070c97ac0ff2cbd8ee3bd69bdd3d20c4c2680a342b0aec"},{"version":"25606e7f50e46d4c9136a14d3639e473044c9ac769be63eb251731af78e6129d","signature":"43e818adf60173644896298637f47b01d5819b17eda46eaa32d0c7d64724d012"},{"version":"f7bdd5bb42afc5007cc220d85d9bb0e994ccb9f96835b1cb795162e061018d1e","impliedFormat":1},{"version":"5dfdcf414088ca1426b12c06cbef2f2408addd1615bcb67f833b7f40e7cb688f","signature":"8b37beb696a32290589c5448651899d9772df568c4f5ac31df7d5b209e44f7e4"},{"version":"6c7176368037af28cb72f2392010fa1cef295d6d6744bca8cfb54985f3a18c3e","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab41ef1f2cdafb8df48be20cd969d875602483859dc194e9c97c8a576892c052","affectsGlobalScope":true,"impliedFormat":1},{"version":"437e20f2ba32abaeb7985e0afe0002de1917bc74e949ba585e49feba65da6ca1","affectsGlobalScope":true,"impliedFormat":1},{"version":"21d819c173c0cf7cc3ce57c3276e77fd9a8a01d35a06ad87158781515c9a438a","impliedFormat":1},{"version":"98cffbf06d6bab333473c70a893770dbe990783904002c4f1a960447b4b53dca","affectsGlobalScope":true,"impliedFormat":1},{"version":"3af97acf03cc97de58a3a4bc91f8f616408099bc4233f6d0852e72a8ffb91ac9","affectsGlobalScope":true,"impliedFormat":1},{"version":"808069bba06b6768b62fd22429b53362e7af342da4a236ed2d2e1c89fcca3b4a","affectsGlobalScope":true,"impliedFormat":1},{"version":"1db0b7dca579049ca4193d034d835f6bfe73096c73663e5ef9a0b5779939f3d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"9798340ffb0d067d69b1ae5b32faa17ab31b82466a3fc00d8f2f2df0c8554aaa","affectsGlobalScope":true,"impliedFormat":1},{"version":"f26b11d8d8e4b8028f1c7d618b22274c892e4b0ef5b3678a8ccbad85419aef43","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e9c23ba78aabc2e0a27033f18737a6df754067731e69dc5f52823957d60a4b6","impliedFormat":1},{"version":"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","impliedFormat":1},{"version":"763fe0f42b3d79b440a9b6e51e9ba3f3f91352469c1e4b3b67bfa4ff6352f3f4","impliedFormat":1},{"version":"25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","impliedFormat":1},{"version":"c464d66b20788266e5353b48dc4aa6bc0dc4a707276df1e7152ab0c9ae21fad8","impliedFormat":1},{"version":"78d0d27c130d35c60b5e5566c9f1e5be77caf39804636bc1a40133919a949f21","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"1d6e127068ea8e104a912e42fc0a110e2aa5a66a356a917a163e8cf9a65e4a75","impliedFormat":1},{"version":"5ded6427296cdf3b9542de4471d2aa8d3983671d4cac0f4bf9c637208d1ced43","impliedFormat":1},{"version":"7f182617db458e98fc18dfb272d40aa2fff3a353c44a89b2c0ccb3937709bfb5","impliedFormat":1},{"version":"cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","impliedFormat":1},{"version":"385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","impliedFormat":1},{"version":"9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","impliedFormat":1},{"version":"0b8a9268adaf4da35e7fa830c8981cfa22adbbe5b3f6f5ab91f6658899e657a7","impliedFormat":1},{"version":"11396ed8a44c02ab9798b7dca436009f866e8dae3c9c25e8c1fbc396880bf1bb","impliedFormat":1},{"version":"ba7bc87d01492633cb5a0e5da8a4a42a1c86270e7b3d2dea5d156828a84e4882","impliedFormat":1},{"version":"4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","impliedFormat":1},{"version":"c21dc52e277bcfc75fac0436ccb75c204f9e1b3fa5e12729670910639f27343e","impliedFormat":1},{"version":"13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","impliedFormat":1},{"version":"9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","impliedFormat":1},{"version":"4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","impliedFormat":1},{"version":"24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","impliedFormat":1},{"version":"ea0148f897b45a76544ae179784c95af1bd6721b8610af9ffa467a518a086a43","impliedFormat":1},{"version":"24c6a117721e606c9984335f71711877293a9651e44f59f3d21c1ea0856f9cc9","impliedFormat":1},{"version":"dd3273ead9fbde62a72949c97dbec2247ea08e0c6952e701a483d74ef92d6a17","impliedFormat":1},{"version":"405822be75ad3e4d162e07439bac80c6bcc6dbae1929e179cf467ec0b9ee4e2e","impliedFormat":1},{"version":"0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","impliedFormat":1},{"version":"e61be3f894b41b7baa1fbd6a66893f2579bfad01d208b4ff61daef21493ef0a8","impliedFormat":1},{"version":"bd0532fd6556073727d28da0edfd1736417a3f9f394877b6d5ef6ad88fba1d1a","impliedFormat":1},{"version":"89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","impliedFormat":1},{"version":"615ba88d0128ed16bf83ef8ccbb6aff05c3ee2db1cc0f89ab50a4939bfc1943f","impliedFormat":1},{"version":"a4d551dbf8746780194d550c88f26cf937caf8d56f102969a110cfaed4b06656","impliedFormat":1},{"version":"8bd86b8e8f6a6aa6c49b71e14c4ffe1211a0e97c80f08d2c8cc98838006e4b88","impliedFormat":1},{"version":"317e63deeb21ac07f3992f5b50cdca8338f10acd4fbb7257ebf56735bf52ab00","impliedFormat":1},{"version":"4732aec92b20fb28c5fe9ad99521fb59974289ed1e45aecb282616202184064f","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"bf67d53d168abc1298888693338cb82854bdb2e69ef83f8a0092093c2d562107","impliedFormat":1},{"version":"b52476feb4a0cbcb25e5931b930fc73cb6643fb1a5060bf8a3dda0eeae5b4b68","affectsGlobalScope":true,"impliedFormat":1},{"version":"f9501cc13ce624c72b61f12b3963e84fad210fbdf0ffbc4590e08460a3f04eba","affectsGlobalScope":true,"impliedFormat":1},{"version":"e7721c4f69f93c91360c26a0a84ee885997d748237ef78ef665b153e622b36c1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0fa06ada475b910e2106c98c68b10483dc8811d0c14a8a8dd36efb2672485b29","impliedFormat":1},{"version":"33e5e9aba62c3193d10d1d33ae1fa75c46a1171cf76fef750777377d53b0303f","impliedFormat":1},{"version":"2b06b93fd01bcd49d1a6bd1f9b65ddcae6480b9a86e9061634d6f8e354c1468f","impliedFormat":1},{"version":"6a0cd27e5dc2cfbe039e731cf879d12b0e2dded06d1b1dedad07f7712de0d7f4","affectsGlobalScope":true,"impliedFormat":1},{"version":"13f5c844119c43e51ce777c509267f14d6aaf31eafb2c2b002ca35584cd13b29","impliedFormat":1},{"version":"e60477649d6ad21542bd2dc7e3d9ff6853d0797ba9f689ba2f6653818999c264","impliedFormat":1},{"version":"c2510f124c0293ab80b1777c44d80f812b75612f297b9857406468c0f4dafe29","affectsGlobalScope":true,"impliedFormat":1},{"version":"5524481e56c48ff486f42926778c0a3cce1cc85dc46683b92b1271865bcf015a","impliedFormat":1},{"version":"4c829ab315f57c5442c6667b53769975acbf92003a66aef19bce151987675bd1","affectsGlobalScope":true,"impliedFormat":1},{"version":"b2ade7657e2db96d18315694789eff2ddd3d8aea7215b181f8a0b303277cc579","impliedFormat":1},{"version":"9855e02d837744303391e5623a531734443a5f8e6e8755e018c41d63ad797db2","impliedFormat":1},{"version":"4d631b81fa2f07a0e63a9a143d6a82c25c5f051298651a9b69176ba28930756d","impliedFormat":1},{"version":"836a356aae992ff3c28a0212e3eabcb76dd4b0cc06bcb9607aeef560661b860d","impliedFormat":1},{"version":"1e0d1f8b0adfa0b0330e028c7941b5a98c08b600efe7f14d2d2a00854fb2f393","impliedFormat":1},{"version":"41670ee38943d9cbb4924e436f56fc19ee94232bc96108562de1a734af20dc2c","affectsGlobalScope":true,"impliedFormat":1},{"version":"c906fb15bd2aabc9ed1e3f44eb6a8661199d6c320b3aa196b826121552cb3695","impliedFormat":1},{"version":"22295e8103f1d6d8ea4b5d6211e43421fe4564e34d0dd8e09e520e452d89e659","impliedFormat":1},{"version":"58647d85d0f722a1ce9de50955df60a7489f0593bf1a7015521efe901c06d770","impliedFormat":1},{"version":"6b4e081d55ac24fc8a4631d5dd77fe249fa25900abd7d046abb87d90e3b45645","impliedFormat":1},{"version":"a10f0e1854f3316d7ee437b79649e5a6ae3ae14ffe6322b02d4987071a95362e","impliedFormat":1},{"version":"e208f73ef6a980104304b0d2ca5f6bf1b85de6009d2c7e404028b875020fa8f2","impliedFormat":1},{"version":"d163b6bc2372b4f07260747cbc6c0a6405ab3fbcea3852305e98ac43ca59f5bc","impliedFormat":1},{"version":"e6fa9ad47c5f71ff733744a029d1dc472c618de53804eae08ffc243b936f87ff","affectsGlobalScope":true,"impliedFormat":1},{"version":"a6f137d651076822d4fe884287e68fd61785a0d3d1fdb250a5059b691fa897db","impliedFormat":1},{"version":"24826ed94a78d5c64bd857570fdbd96229ad41b5cb654c08d75a9845e3ab7dde","impliedFormat":1},{"version":"8b479a130ccb62e98f11f136d3ac80f2984fdc07616516d29881f3061f2dd472","impliedFormat":1},{"version":"928af3d90454bf656a52a48679f199f64c1435247d6189d1caf4c68f2eaf921f","affectsGlobalScope":true,"impliedFormat":1},{"version":"bceb58df66ab8fb00170df20cd813978c5ab84be1d285710c4eb005d8e9d8efb","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f16a7e4deafa527ed9995a772bb380eb7d3c2c0fd4ae178c5263ed18394db2c","impliedFormat":1},{"version":"933921f0bb0ec12ef45d1062a1fc0f27635318f4d294e4d99de9a5493e618ca2","impliedFormat":1},{"version":"71a0f3ad612c123b57239a7749770017ecfe6b66411488000aba83e4546fde25","impliedFormat":1},{"version":"77fbe5eecb6fac4b6242bbf6eebfc43e98ce5ccba8fa44e0ef6a95c945ff4d98","impliedFormat":1},{"version":"4f9d8ca0c417b67b69eeb54c7ca1bedd7b56034bb9bfd27c5d4f3bc4692daca7","impliedFormat":1},{"version":"814118df420c4e38fe5ae1b9a3bafb6e9c2aa40838e528cde908381867be6466","impliedFormat":1},{"version":"a3fc63c0d7b031693f665f5494412ba4b551fe644ededccc0ab5922401079c95","impliedFormat":1},{"version":"80523c00b8544a2000ae0143e4a90a00b47f99823eb7926c1e03c494216fc363","impliedFormat":1},{"version":"37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","impliedFormat":1},{"version":"45650f47bfb376c8a8ed39d4bcda5902ab899a3150029684ee4c10676d9fbaee","impliedFormat":1},{"version":"746911b62b329587939560deb5c036aca48aece03147b021fa680223255d5183","affectsGlobalScope":true,"impliedFormat":1},{"version":"18fd40412d102c5564136f29735e5d1c3b455b8a37f920da79561f1fde068208","impliedFormat":1},{"version":"c8d3e5a18ba35629954e48c4cc8f11dc88224650067a172685c736b27a34a4dc","impliedFormat":1},{"version":"f0be1b8078cd549d91f37c30c222c2a187ac1cf981d994fb476a1adc61387b14","affectsGlobalScope":true,"impliedFormat":1},{"version":"0aaed1d72199b01234152f7a60046bc947f1f37d78d182e9ae09c4289e06a592","impliedFormat":1},{"version":"2b55d426ff2b9087485e52ac4bc7cfafe1dc420fc76dad926cd46526567c501a","impliedFormat":1},{"version":"66ba1b2c3e3a3644a1011cd530fb444a96b1b2dfe2f5e837a002d41a1a799e60","impliedFormat":1},{"version":"7e514f5b852fdbc166b539fdd1f4e9114f29911592a5eb10a94bb3a13ccac3c4","impliedFormat":1},{"version":"5b7aa3c4c1a5d81b411e8cb302b45507fea9358d3569196b27eb1a27ae3a90ef","affectsGlobalScope":true,"impliedFormat":1},{"version":"5987a903da92c7462e0b35704ce7da94d7fdc4b89a984871c0e2b87a8aae9e69","affectsGlobalScope":true,"impliedFormat":1},{"version":"ea08a0345023ade2b47fbff5a76d0d0ed8bff10bc9d22b83f40858a8e941501c","impliedFormat":1},{"version":"47613031a5a31510831304405af561b0ffaedb734437c595256bb61a90f9311b","impliedFormat":1},{"version":"ae062ce7d9510060c5d7e7952ae379224fb3f8f2dd74e88959878af2057c143b","impliedFormat":1},{"version":"8a1a0d0a4a06a8d278947fcb66bf684f117bf147f89b06e50662d79a53be3e9f","affectsGlobalScope":true,"impliedFormat":1},{"version":"358765d5ea8afd285d4fd1532e78b88273f18cb3f87403a9b16fef61ac9fdcfe","impliedFormat":1},{"version":"9f55299850d4f0921e79b6bf344b47c420ce0f507b9dcf593e532b09ea7eeea1","impliedFormat":1}],"root":[99,100,[108,115],117],"options":{"composite":true,"declaration":true,"declarationMap":true,"esModuleInterop":true,"module":99,"outDir":"./","rootDir":"../src","skipLibCheck":true,"sourceMap":true,"strict":true,"target":99,"tsBuildInfoFile":"./.tsbuildinfo"},"referencedMap":[[116,1],[169,2],[170,2],[171,3],[123,4],[172,5],[173,6],[174,7],[118,8],[121,9],[119,8],[120,8],[175,10],[176,11],[177,12],[178,13],[179,14],[180,15],[181,15],[182,16],[183,17],[184,18],[185,19],[124,8],[122,8],[186,20],[187,21],[188,22],[222,23],[189,24],[190,8],[191,25],[192,26],[193,27],[194,28],[195,29],[196,30],[197,31],[198,32],[199,33],[200,33],[201,34],[202,8],[203,35],[204,36],[206,37],[205,38],[207,39],[208,40],[209,41],[210,42],[211,43],[212,44],[213,45],[214,46],[215,47],[216,48],[217,49],[218,50],[219,51],[125,8],[126,8],[127,8],[166,52],[167,8],[168,8],[220,53],[221,54],[101,8],[103,55],[102,56],[105,57],[104,56],[128,8],[86,8],[87,8],[15,8],[14,8],[2,8],[16,8],[17,8],[18,8],[19,8],[20,8],[21,8],[22,8],[23,8],[3,8],[24,8],[25,8],[4,8],[26,8],[30,8],[27,8],[28,8],[29,8],[31,8],[32,8],[33,8],[5,8],[34,8],[35,8],[36,8],[37,8],[6,8],[41,8],[38,8],[39,8],[40,8],[42,8],[7,8],[43,8],[48,8],[49,8],[44,8],[45,8],[46,8],[47,8],[8,8],[53,8],[50,8],[51,8],[52,8],[54,8],[9,8],[55,8],[56,8],[57,8],[59,8],[58,8],[60,8],[61,8],[10,8],[62,8],[63,8],[64,8],[11,8],[65,8],[66,8],[67,8],[68,8],[69,8],[70,8],[12,8],[71,8],[72,8],[73,8],[74,8],[75,8],[1,8],[76,8],[77,8],[13,8],[78,8],[79,8],[80,8],[81,8],[82,8],[83,8],[84,8],[85,8],[144,58],[154,59],[143,58],[164,60],[135,61],[134,62],[163,63],[157,64],[162,65],[137,66],[151,67],[136,68],[160,69],[132,70],[131,63],[161,71],[133,72],[138,73],[139,8],[142,73],[129,8],[165,74],[155,75],[146,76],[147,77],[149,78],[145,79],[148,80],[158,63],[140,81],[141,82],[150,83],[130,84],[153,75],[152,73],[156,8],[159,85],[107,86],[106,8],[100,87],[117,88],[115,89],[108,90],[109,90],[110,90],[111,91],[114,92],[112,93],[113,94],[99,95],[96,8],[89,8],[94,96],[93,97],[97,8],[95,8],[98,98],[91,8],[92,8],[90,8],[88,8]],"latestChangedDtsFile":"./auto.d.ts","version":"6.0.3"}
|
package/dist/auto.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auto.d.ts","sourceRoot":"","sources":["../src/auto.ts"],"names":[],"mappings":""}
|
package/dist/auto.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
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
|
+
import envx from "./index.js";
|
|
8
|
+
envx();
|
|
9
|
+
// #endregion -----------------------------------------------
|
|
10
|
+
//# sourceMappingURL=auto.js.map
|
package/dist/auto.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auto.js","sourceRoot":"","sources":["../src/auto.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAE5D,oEAAoE;AACpE,uEAAuE;AACvE,sEAAsE;AACtE,qEAAqE;AACrE,yCAAyC;AAEzC,OAAO,IAAI,MAAM,YAAY,CAAC;AAE9B,IAAI,EAAE,CAAC;AAEP,6DAA6D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dotenvx.d.ts","sourceRoot":"","sources":["../../src/bin/dotenvx.ts"],"names":[],"mappings":";AAKA,OAAO,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
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
|
+
import "@dotenvx/dotenvx";
|
|
6
|
+
//# sourceMappingURL=dotenvx.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dotenvx.js","sourceRoot":"","sources":["../../src/bin/dotenvx.ts"],"names":[],"mappings":";AAEA,0EAA0E;AAC1E,0EAA0E;AAC1E,gCAAgC;AAChC,OAAO,kBAAkB,CAAC"}
|
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":""}
|
package/dist/cli.js
ADDED
package/dist/cli.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug.d.ts","sourceRoot":"","sources":["../../src/commands/debug.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAO3C,eAAO,MAAM,YAAY,EAAE,aAkB1B,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { resolveEnvPaths, validateCmdVariable } from "@honeycluster/libs";
|
|
2
|
+
import { log } from "@honeycluster/common";
|
|
3
|
+
// #region -- debug command ---------------------------------
|
|
4
|
+
export const debugCommand = {
|
|
5
|
+
command: "debug",
|
|
6
|
+
describe: "Show which env files would be loaded and which variables would be applied, without loading them.",
|
|
7
|
+
handler: (argv) => {
|
|
8
|
+
const paths = resolveEnvPaths({
|
|
9
|
+
envFiles: argv["env"],
|
|
10
|
+
cascade: argv["cascade"],
|
|
11
|
+
});
|
|
12
|
+
const rawVars = argv["variables"];
|
|
13
|
+
const variables = rawVars
|
|
14
|
+
? Object.fromEntries(rawVars.map(validateCmdVariable))
|
|
15
|
+
: {};
|
|
16
|
+
log.info(`Paths: ${JSON.stringify(paths)}`);
|
|
17
|
+
log.info(`Variables: ${JSON.stringify(variables)}`);
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
// #endregion -----------------------------------------------
|
|
21
|
+
//# sourceMappingURL=debug.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug.js","sourceRoot":"","sources":["../../src/commands/debug.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAE3C,6DAA6D;AAE7D,MAAM,CAAC,MAAM,YAAY,GAAkB;IACzC,OAAO,EAAE,OAAO;IAChB,QAAQ,EACN,kGAAkG;IACpG,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE;QAChB,MAAM,KAAK,GAAG,eAAe,CAAC;YAC5B,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAyB;YAC7C,OAAO,EAAE,IAAI,CAAC,SAAS,CAAuB;SAC/C,CAAC,CAAC;QAEH,MAAM,OAAO,GAAG,IAAI,CAAC,WAAW,CAAyB,CAAC;QAC1D,MAAM,SAAS,GAAG,OAAO;YACvB,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;YACtD,CAAC,CAAC,EAAE,CAAC;QAEP,GAAG,CAAC,IAAI,CAAC,UAAU,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAC5C,GAAG,CAAC,IAAI,CAAC,cAAc,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;IACtD,CAAC;CACF,CAAC;AAEF,6DAA6D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decrypt.d.ts","sourceRoot":"","sources":["../../src/commands/decrypt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAQ3C,uEAAuE;AACvE,eAAO,MAAM,cAAc,EAAE,aA2E5B,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { decryptFiles, writeProcessed } from "@honeycluster/libs";
|
|
2
|
+
import { log } from "@honeycluster/common";
|
|
3
|
+
// #region -- decrypt command -------------------------------
|
|
4
|
+
/** Mirror of `dotenvx decrypt` from upstream — see also encrypt.ts. */
|
|
5
|
+
export const decryptCommand = {
|
|
6
|
+
command: "decrypt",
|
|
7
|
+
describe: "Decrypt the values in one or more .env files in place using the matching private key in .env.keys.",
|
|
8
|
+
builder: (yargs) => yargs
|
|
9
|
+
.option("env-keys-file", {
|
|
10
|
+
alias: "fk",
|
|
11
|
+
type: "string",
|
|
12
|
+
describe: "Path to the .env.keys file (default: alongside the env file).",
|
|
13
|
+
})
|
|
14
|
+
.option("key", {
|
|
15
|
+
alias: "k",
|
|
16
|
+
type: "array",
|
|
17
|
+
string: true,
|
|
18
|
+
describe: "Specific keys (or picomatch globs) to decrypt. Default: all keys.",
|
|
19
|
+
})
|
|
20
|
+
.option("exclude-key", {
|
|
21
|
+
alias: "ek",
|
|
22
|
+
type: "array",
|
|
23
|
+
string: true,
|
|
24
|
+
describe: "Keys (or picomatch globs) to leave encrypted.",
|
|
25
|
+
})
|
|
26
|
+
.option("stdout", {
|
|
27
|
+
type: "boolean",
|
|
28
|
+
default: false,
|
|
29
|
+
describe: "Write the decrypted env contents to stdout instead of saving in place.",
|
|
30
|
+
})
|
|
31
|
+
.help("h")
|
|
32
|
+
.alias("h", "help"),
|
|
33
|
+
handler: (argv) => {
|
|
34
|
+
const envFiles = argv["env"] ?? [".env"];
|
|
35
|
+
const keys = argv["key"];
|
|
36
|
+
const excludeKeys = argv["exclude-key"];
|
|
37
|
+
const envKeysFile = argv["env-keys-file"];
|
|
38
|
+
const stdout = argv["stdout"] ?? false;
|
|
39
|
+
const result = decryptFiles({
|
|
40
|
+
envFiles,
|
|
41
|
+
...(keys ? { keys } : {}),
|
|
42
|
+
...(excludeKeys ? { excludeKeys } : {}),
|
|
43
|
+
...(envKeysFile ? { envKeysFile } : {}),
|
|
44
|
+
});
|
|
45
|
+
let hadError = false;
|
|
46
|
+
for (const processed of result.processedEnvs) {
|
|
47
|
+
if (processed.error) {
|
|
48
|
+
hadError = true;
|
|
49
|
+
log.error(`${processed.envFilepath}: ${processed.error.message}`);
|
|
50
|
+
if (processed.error.help)
|
|
51
|
+
log.dim(processed.error.help);
|
|
52
|
+
continue;
|
|
53
|
+
}
|
|
54
|
+
if (stdout) {
|
|
55
|
+
process.stdout.write(processed.envSrc);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
if (!stdout) {
|
|
59
|
+
const { written } = writeProcessed(result.processedEnvs);
|
|
60
|
+
for (const w of written)
|
|
61
|
+
log.success(`decrypted ${w}`);
|
|
62
|
+
if (written.length === 0 &&
|
|
63
|
+
result.unchangedFilepaths.length > 0 &&
|
|
64
|
+
!hadError) {
|
|
65
|
+
log.dim(`no changes (${result.unchangedFilepaths.join(", ")})`);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
if (hadError)
|
|
69
|
+
process.exitCode = 1;
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
// #endregion -----------------------------------------------
|
|
73
|
+
//# sourceMappingURL=decrypt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":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AC;gBACpC,CAAC,QAAQ,EACT,CAAC;gBACD,GAAG,CAAC,GAAG,CAAC,eAAe,MAAM,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YAClE,CAAC;QACH,CAAC;QAED,IAAI,QAAQ;YAAE,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACrC,CAAC;CACF,CAAC;AAEF,6DAA6D"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { CommandModule } from "yargs";
|
|
2
|
+
/**
|
|
3
|
+
* Mirrors the upstream `dotenvx encrypt` flags so existing muscle
|
|
4
|
+
* memory carries over. The `--env` global doubles as the file list
|
|
5
|
+
* (the upstream calls it `--env-file`); this CLI keeps a single
|
|
6
|
+
* canonical name across subcommands.
|
|
7
|
+
*/
|
|
8
|
+
export declare const encryptCommand: CommandModule;
|
|
9
|
+
//# sourceMappingURL=encrypt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"encrypt.d.ts","sourceRoot":"","sources":["../../src/commands/encrypt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAQ3C;;;;;GAKG;AACH,eAAO,MAAM,cAAc,EAAE,aAmF5B,CAAC"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { encryptFiles, writeProcessed } from "@honeycluster/libs";
|
|
2
|
+
import { log } from "@honeycluster/common";
|
|
3
|
+
// #region -- encrypt command -------------------------------
|
|
4
|
+
/**
|
|
5
|
+
* Mirrors the upstream `dotenvx encrypt` flags so existing muscle
|
|
6
|
+
* memory carries over. The `--env` global doubles as the file list
|
|
7
|
+
* (the upstream calls it `--env-file`); this CLI keeps a single
|
|
8
|
+
* canonical name across subcommands.
|
|
9
|
+
*/
|
|
10
|
+
export const encryptCommand = {
|
|
11
|
+
command: "encrypt",
|
|
12
|
+
describe: "Encrypt the values in one or more .env files. Generates a private key in .env.keys on first run.",
|
|
13
|
+
builder: (yargs) => yargs
|
|
14
|
+
.option("env-keys-file", {
|
|
15
|
+
alias: "fk",
|
|
16
|
+
type: "string",
|
|
17
|
+
describe: "Path to the .env.keys file (default: alongside the env file).",
|
|
18
|
+
})
|
|
19
|
+
.option("key", {
|
|
20
|
+
alias: "k",
|
|
21
|
+
type: "array",
|
|
22
|
+
string: true,
|
|
23
|
+
describe: "Specific keys (or picomatch globs) to encrypt. Default: all keys.",
|
|
24
|
+
})
|
|
25
|
+
.option("exclude-key", {
|
|
26
|
+
alias: "ek",
|
|
27
|
+
type: "array",
|
|
28
|
+
string: true,
|
|
29
|
+
describe: "Keys (or picomatch globs) to leave plaintext.",
|
|
30
|
+
})
|
|
31
|
+
.option("stdout", {
|
|
32
|
+
type: "boolean",
|
|
33
|
+
default: false,
|
|
34
|
+
describe: "Write the encrypted env contents to stdout instead of saving in place.",
|
|
35
|
+
})
|
|
36
|
+
.help("h")
|
|
37
|
+
.alias("h", "help"),
|
|
38
|
+
handler: (argv) => {
|
|
39
|
+
const envFiles = argv["env"] ?? [".env"];
|
|
40
|
+
const keys = argv["key"];
|
|
41
|
+
const excludeKeys = argv["exclude-key"];
|
|
42
|
+
const envKeysFile = argv["env-keys-file"];
|
|
43
|
+
const stdout = argv["stdout"] ?? false;
|
|
44
|
+
const result = encryptFiles({
|
|
45
|
+
envFiles,
|
|
46
|
+
...(keys ? { keys } : {}),
|
|
47
|
+
...(excludeKeys ? { excludeKeys } : {}),
|
|
48
|
+
...(envKeysFile ? { envKeysFile } : {}),
|
|
49
|
+
});
|
|
50
|
+
let hadError = false;
|
|
51
|
+
for (const processed of result.processedEnvs) {
|
|
52
|
+
if (processed.error) {
|
|
53
|
+
hadError = true;
|
|
54
|
+
log.error(`${processed.envFilepath}: ${processed.error.message}`);
|
|
55
|
+
if (processed.error.help)
|
|
56
|
+
log.dim(processed.error.help);
|
|
57
|
+
continue;
|
|
58
|
+
}
|
|
59
|
+
if (stdout) {
|
|
60
|
+
process.stdout.write(processed.envSrc);
|
|
61
|
+
continue;
|
|
62
|
+
}
|
|
63
|
+
if (processed.privateKeyAdded) {
|
|
64
|
+
log.success(`key added to .env.keys (${processed.privateKeyName ?? "<unknown>"})`);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
if (!stdout) {
|
|
68
|
+
const { written } = writeProcessed(result.processedEnvs);
|
|
69
|
+
for (const w of written)
|
|
70
|
+
log.success(`encrypted ${w}`);
|
|
71
|
+
if (written.length === 0 &&
|
|
72
|
+
result.unchangedFilepaths.length > 0 &&
|
|
73
|
+
!hadError) {
|
|
74
|
+
log.dim(`no changes (${result.unchangedFilepaths.join(", ")})`);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
if (hadError)
|
|
78
|
+
process.exitCode = 1;
|
|
79
|
+
},
|
|
80
|
+
};
|
|
81
|
+
// #endregion -----------------------------------------------
|
|
82
|
+
//# sourceMappingURL=encrypt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"encrypt.js","sourceRoot":"","sources":["../../src/commands/encrypt.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAElE,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAE3C,6DAA6D;AAE7D;;;;;GAKG;AACH,MAAM,CAAC,MAAM,cAAc,GAAkB;IAC3C,OAAO,EAAE,SAAS;IAClB,QAAQ,EACN,kGAAkG;IACpG,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CACjB,KAAK;SACF,MAAM,CAAC,eAAe,EAAE;QACvB,KAAK,EAAE,IAAI;QACX,IAAI,EAAE,QAAQ;QACd,QAAQ,EACN,+DAA+D;KAClE,CAAC;SACD,MAAM,CAAC,KAAK,EAAE;QACb,KAAK,EAAE,GAAG;QACV,IAAI,EAAE,OAAO;QACb,MAAM,EAAE,IAAI;QACZ,QAAQ,EACN,mEAAmE;KACtE,CAAC;S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AAS,CAAC,WAAW,KAAK,SAAS,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;gBAClE,IAAI,SAAS,CAAC,KAAK,CAAC,IAAI;oBAAE,GAAG,CAAC,GAAG,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;gBACxD,SAAS;YACX,CAAC;YAED,IAAI,MAAM,EAAE,CAAC;gBACX,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;gBACvC,SAAS;YACX,CAAC;YAED,IAAI,SAAS,CAAC,eAAe,EAAE,CAAC;gBAC9B,GAAG,CAAC,OAAO,CACT,2BAA2B,SAAS,CAAC,cAAc,IAAI,WAAW,GAAG,CACtE,CAAC;YACJ,CAAC;QACH,CAAC;QAED,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,MAAM,EAAE,OAAO,EAAE,GAAG,cAAc,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;YACzD,KAAK,MAAM,CAAC,IAAI,OAAO;gBAAE,GAAG,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;YACvD,IACE,OAAO,CAAC,MAAM,KAAK,CAAC;gBACpB,MAAM,CAAC,kBAAkB,CAAC,MAAM,GAAG,CAAC;gBACpC,CAAC,QAAQ,EACT,CAAC;gBACD,GAAG,CAAC,GAAG,CAAC,eAAe,MAAM,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YAClE,CAAC;QACH,CAAC;QAED,IAAI,QAAQ;YAAE,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACrC,CAAC;CACF,CAAC;AAEF,6DAA6D"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { CommandModule } from "yargs";
|
|
2
|
+
/**
|
|
3
|
+
* Decrypts (when needed) and expands variable references in an env
|
|
4
|
+
* file. Mirrors the workflow `decrypt-vault` action — but cycle-safe,
|
|
5
|
+
* supports `${VAR:-default}` / `${VAR:?msg}`, and never silently
|
|
6
|
+
* truncates after N passes.
|
|
7
|
+
*/
|
|
8
|
+
export declare const expandCommand: CommandModule;
|
|
9
|
+
//# sourceMappingURL=expand.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"expand.d.ts","sourceRoot":"","sources":["../../src/commands/expand.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAa3C;;;;;GAKG;AACH,eAAO,MAAM,aAAa,EAAE,aA8E3B,CAAC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import * as fs from "fs";
|
|
2
|
+
import * as path from "path";
|
|
3
|
+
import { decryptFiles, expandEnvSrc, isEncrypted, parseEnv, } from "@honeycluster/libs";
|
|
4
|
+
import { log } from "@honeycluster/common";
|
|
5
|
+
// #region -- expand command --------------------------------
|
|
6
|
+
/**
|
|
7
|
+
* Decrypts (when needed) and expands variable references in an env
|
|
8
|
+
* file. Mirrors the workflow `decrypt-vault` action — but cycle-safe,
|
|
9
|
+
* supports `${VAR:-default}` / `${VAR:?msg}`, and never silently
|
|
10
|
+
* truncates after N passes.
|
|
11
|
+
*/
|
|
12
|
+
export const expandCommand = {
|
|
13
|
+
command: "expand",
|
|
14
|
+
describe: "Decrypt (if needed) and expand ${VAR}/$VAR references in an env file. Outputs to stdout by default.",
|
|
15
|
+
builder: (yargs) => yargs
|
|
16
|
+
.option("output", {
|
|
17
|
+
type: "string",
|
|
18
|
+
describe: "Write the expanded result to this file (default: stdout).",
|
|
19
|
+
})
|
|
20
|
+
.option("env-keys-file", {
|
|
21
|
+
alias: "fk",
|
|
22
|
+
type: "string",
|
|
23
|
+
describe: "Path to .env.keys (default: alongside the env file).",
|
|
24
|
+
})
|
|
25
|
+
.option("on-missing", {
|
|
26
|
+
type: "string",
|
|
27
|
+
choices: ["leave", "empty", "throw"],
|
|
28
|
+
default: "leave",
|
|
29
|
+
describe: "How to handle ${UNRESOLVED_VAR}: leave it literal, substitute empty, or fail.",
|
|
30
|
+
})
|
|
31
|
+
.help("h")
|
|
32
|
+
.alias("h", "help"),
|
|
33
|
+
handler: (argv) => {
|
|
34
|
+
const envFiles = argv["env"] ?? [".env"];
|
|
35
|
+
if (envFiles.length !== 1) {
|
|
36
|
+
log.error(`expand operates on a single env file at a time; got ${String(envFiles.length)}.`);
|
|
37
|
+
process.exit(1);
|
|
38
|
+
}
|
|
39
|
+
const envFile = envFiles[0];
|
|
40
|
+
const filepath = path.resolve(envFile);
|
|
41
|
+
if (!fs.existsSync(filepath)) {
|
|
42
|
+
log.error(`env file not found: ${envFile}`);
|
|
43
|
+
process.exit(1);
|
|
44
|
+
}
|
|
45
|
+
let envSrc = fs.readFileSync(filepath, "utf8");
|
|
46
|
+
const hasEncrypted = parseEnv(envSrc).some((l) => l.type === "kv" && isEncrypted(l.value));
|
|
47
|
+
if (hasEncrypted) {
|
|
48
|
+
const envKeysFile = argv["env-keys-file"];
|
|
49
|
+
const dec = decryptFiles({
|
|
50
|
+
envFiles: [envFile],
|
|
51
|
+
...(envKeysFile ? { envKeysFile } : {}),
|
|
52
|
+
});
|
|
53
|
+
const processed = dec.processedEnvs[0];
|
|
54
|
+
if (processed?.error) {
|
|
55
|
+
log.error(`${envFile}: ${processed.error.message}`);
|
|
56
|
+
if (processed.error.help)
|
|
57
|
+
log.dim(processed.error.help);
|
|
58
|
+
process.exit(1);
|
|
59
|
+
}
|
|
60
|
+
envSrc = processed.envSrc;
|
|
61
|
+
}
|
|
62
|
+
const onMissing = argv["on-missing"];
|
|
63
|
+
const result = expandEnvSrc(envSrc, { onMissing });
|
|
64
|
+
for (const v of result.unresolved) {
|
|
65
|
+
log.warn(`unresolved variable: ${v}`);
|
|
66
|
+
}
|
|
67
|
+
for (const cycle of result.cycles) {
|
|
68
|
+
log.warn(`cycle: ${cycle.join(" → ")}`);
|
|
69
|
+
}
|
|
70
|
+
const output = argv["output"];
|
|
71
|
+
if (output) {
|
|
72
|
+
fs.writeFileSync(path.resolve(output), result.envSrc);
|
|
73
|
+
log.success(`expanded ${envFile} → ${output}`);
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
process.stdout.write(result.envSrc);
|
|
77
|
+
if (!result.envSrc.endsWith("\n"))
|
|
78
|
+
process.stdout.write("\n");
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
// #endregion -----------------------------------------------
|
|
83
|
+
//# sourceMappingURL=expand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"expand.js","sourceRoot":"","sources":["../../src/commands/expand.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAG7B,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,QAAQ,GACT,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAE3C,6DAA6D;AAE7D;;;;;GAKG;AACH,MAAM,CAAC,MAAM,aAAa,GAAkB;IAC1C,OAAO,EAAE,QAAQ;IACjB,QAAQ,EACN,qGAAqG;IACvG,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CACjB,KAAK;SACF,MAAM,CAAC,QAAQ,EAAE;QAChB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,2DAA2D;KACtE,CAAC;SACD,MAAM,CAAC,eAAe,EAAE;QACvB,KAAK,EAAE,IAAI;QACX,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,sDAAsD;KACjE,CAAC;SACD,MAAM,CAAC,YAAY,EAAE;QACpB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAU;QAC7C,OAAO,EAAE,OAAgB;QACzB,QAAQ,EACN,+EAA+E;KAClF,CAAC;SACD,IAAI,CAAC,GAAG,CAAC;SACT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C,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;gBAAE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAChE,CAAC;IACH,CAAC;CACF,CAAC;AAEF,6DAA6D"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Argv } from "yargs";
|
|
2
|
+
/**
|
|
3
|
+
* Build the yargs CLI for `dotenvx-run`. Global options (env, variables,
|
|
4
|
+
* cascade, vault, override, quiet) are registered on the root so every
|
|
5
|
+
* subcommand inherits them.
|
|
6
|
+
*/
|
|
7
|
+
export declare function createCli(argvInput: string[]): Argv;
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAoBlC;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,IAAI,CAkJnD"}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import yargs from "yargs";
|
|
2
|
+
import * as path from "path";
|
|
3
|
+
import { findWorkspaceRoot, listEnvFiles, loadDotenvxConfig, } from "@honeycluster/libs";
|
|
4
|
+
import { log } from "@honeycluster/common";
|
|
5
|
+
import { debugCommand } from "./debug.js";
|
|
6
|
+
import { decryptCommand } from "./decrypt.js";
|
|
7
|
+
import { encryptCommand } from "./encrypt.js";
|
|
8
|
+
import { expandCommand } from "./expand.js";
|
|
9
|
+
import { printCommand } from "./print.js";
|
|
10
|
+
import { runCommand } from "./run.js";
|
|
11
|
+
// #region -- CLI Factory -----------------------------------
|
|
12
|
+
/**
|
|
13
|
+
* Build the yargs CLI for `dotenvx-run`. Global options (env, variables,
|
|
14
|
+
* cascade, vault, override, quiet) are registered on the root so every
|
|
15
|
+
* subcommand inherits them.
|
|
16
|
+
*/
|
|
17
|
+
export function createCli(argvInput) {
|
|
18
|
+
return yargs(argvInput)
|
|
19
|
+
.scriptName("envx")
|
|
20
|
+
.usage("$0 <command> [options]")
|
|
21
|
+
.option("config", {
|
|
22
|
+
alias: "c",
|
|
23
|
+
type: "string",
|
|
24
|
+
describe: "Path to an envx config file (default: discovered from package.json `envx.config` or envx.config.{ts,js,json}).",
|
|
25
|
+
})
|
|
26
|
+
.option("env", {
|
|
27
|
+
alias: "e",
|
|
28
|
+
type: "array",
|
|
29
|
+
describe: "Env files to load. Default: [\".env\"] (or `envFiles` from config; or every .env* under --env-path when set). Auto-detects environment when omitted.",
|
|
30
|
+
})
|
|
31
|
+
.option("env-path", {
|
|
32
|
+
type: "string",
|
|
33
|
+
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.",
|
|
34
|
+
})
|
|
35
|
+
.option("variables", {
|
|
36
|
+
alias: "v",
|
|
37
|
+
type: "array",
|
|
38
|
+
describe: "Inline variables in the form name=value (repeatable).",
|
|
39
|
+
default: [],
|
|
40
|
+
})
|
|
41
|
+
.option("cascade", {
|
|
42
|
+
type: "string",
|
|
43
|
+
describe: "Cascade load order: .env, .env.<cascade>, .env.local, .env.<cascade>.local",
|
|
44
|
+
})
|
|
45
|
+
.option("vault", {
|
|
46
|
+
alias: "va",
|
|
47
|
+
type: "boolean",
|
|
48
|
+
describe: "Shortcut for `--env-path vault`.",
|
|
49
|
+
})
|
|
50
|
+
.option("override", {
|
|
51
|
+
alias: "o",
|
|
52
|
+
type: "boolean",
|
|
53
|
+
describe: "Override existing process.env values. Conflicts with --cascade.",
|
|
54
|
+
})
|
|
55
|
+
.option("quiet", {
|
|
56
|
+
alias: "q",
|
|
57
|
+
type: "boolean",
|
|
58
|
+
describe: "Suppress dotenv's own output.",
|
|
59
|
+
})
|
|
60
|
+
.middleware((argv) => {
|
|
61
|
+
const configPath = argv["config"];
|
|
62
|
+
let loaded;
|
|
63
|
+
try {
|
|
64
|
+
loaded = loadDotenvxConfig({
|
|
65
|
+
...(configPath ? { configPath } : {}),
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
catch (e) {
|
|
69
|
+
log.error(`config error: ${e.message}`);
|
|
70
|
+
process.exit(1);
|
|
71
|
+
}
|
|
72
|
+
if (loaded.source) {
|
|
73
|
+
log.dim(`config: ${loaded.source} (${loaded.origin})`);
|
|
74
|
+
}
|
|
75
|
+
const cfg = loaded.config;
|
|
76
|
+
// Apply config defaults only where the CLI didn't supply a value.
|
|
77
|
+
if (argv["cascade"] === undefined && cfg.cascade !== undefined) {
|
|
78
|
+
argv["cascade"] = cfg.cascade;
|
|
79
|
+
}
|
|
80
|
+
if (argv["override"] === undefined) {
|
|
81
|
+
argv["override"] = cfg.override ?? false;
|
|
82
|
+
}
|
|
83
|
+
if (argv["quiet"] === undefined) {
|
|
84
|
+
argv["quiet"] = cfg.quiet ?? true;
|
|
85
|
+
}
|
|
86
|
+
if (argv["vault"] === undefined) {
|
|
87
|
+
argv["vault"] = false;
|
|
88
|
+
}
|
|
89
|
+
if (argv["env-keys-file"] === undefined && cfg.envKeysFile !== undefined) {
|
|
90
|
+
argv["env-keys-file"] = cfg.envKeysFile;
|
|
91
|
+
}
|
|
92
|
+
// env-path: CLI > config > --vault shortcut
|
|
93
|
+
if (argv["env-path"] === undefined) {
|
|
94
|
+
if (cfg.envPath !== undefined)
|
|
95
|
+
argv["env-path"] = cfg.envPath;
|
|
96
|
+
else if (argv["vault"])
|
|
97
|
+
argv["env-path"] = "vault";
|
|
98
|
+
}
|
|
99
|
+
// env files: CLI > config > "all .env* in env-path" > [".env"]
|
|
100
|
+
const userPassedEnv = Array.isArray(argv["env"]) && argv["env"].length > 0;
|
|
101
|
+
let files;
|
|
102
|
+
if (userPassedEnv) {
|
|
103
|
+
files = argv["env"];
|
|
104
|
+
}
|
|
105
|
+
else if (cfg.envFiles && cfg.envFiles.length > 0) {
|
|
106
|
+
files = [...cfg.envFiles];
|
|
107
|
+
}
|
|
108
|
+
else if (typeof argv["env-path"] === "string") {
|
|
109
|
+
// "all files in the env-path are included" — discover them.
|
|
110
|
+
const subdir = argv["env-path"];
|
|
111
|
+
const wsRoot = findWorkspaceRoot();
|
|
112
|
+
const dir = path.resolve(wsRoot, subdir);
|
|
113
|
+
const discovered = listEnvFiles(dir);
|
|
114
|
+
if (discovered.length > 0) {
|
|
115
|
+
files = discovered;
|
|
116
|
+
log.dim(`env-path ${subdir}: discovered ${String(discovered.length)} file(s) — ${discovered.join(", ")}`);
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
files = [".env"];
|
|
120
|
+
log.warn(`env-path ${subdir}: no .env* files found; falling back to [".env"]`);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
files = [".env"];
|
|
125
|
+
}
|
|
126
|
+
// When env-path is set, resolve every relative file against that
|
|
127
|
+
// directory up-front. encrypt/decrypt/expand operate on the
|
|
128
|
+
// resulting paths verbatim — no per-command envPath plumbing.
|
|
129
|
+
if (typeof argv["env-path"] === "string") {
|
|
130
|
+
const wsRoot = findWorkspaceRoot();
|
|
131
|
+
const dir = path.resolve(wsRoot, argv["env-path"]);
|
|
132
|
+
files = files.map((f) => (path.isAbsolute(f) ? f : path.join(dir, f)));
|
|
133
|
+
}
|
|
134
|
+
argv["env"] = files;
|
|
135
|
+
})
|
|
136
|
+
.command(runCommand)
|
|
137
|
+
.command(printCommand)
|
|
138
|
+
.command(debugCommand)
|
|
139
|
+
.command(encryptCommand)
|
|
140
|
+
.command(decryptCommand)
|
|
141
|
+
.command(expandCommand)
|
|
142
|
+
.help("h")
|
|
143
|
+
.alias("h", "help")
|
|
144
|
+
.version()
|
|
145
|
+
.strictCommands()
|
|
146
|
+
.demandCommand(0)
|
|
147
|
+
.recommendCommands()
|
|
148
|
+
.epilog("Examples:\n" +
|
|
149
|
+
" envx -- node app.js # load .env (auto-detected) and run\n" +
|
|
150
|
+
" envx --env dev -- pnpm start # load .env.dev\n" +
|
|
151
|
+
" envx print DATABASE_URL # print one variable\n" +
|
|
152
|
+
" envx debug --cascade prod # show resolved paths\n" +
|
|
153
|
+
" envx encrypt -e .env.prod # encrypt values in .env.prod\n" +
|
|
154
|
+
" envx decrypt -e .env.prod -k FOO # decrypt only FOO\n" +
|
|
155
|
+
" envx expand -e vault/.env.prod # decrypt + expand to stdout\n" +
|
|
156
|
+
" envx -c ./my.config.json run -- node app.js");
|
|
157
|
+
}
|
|
158
|
+
// #endregion -----------------------------------------------
|
|
159
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,OAAO,EACL,iBAAiB,EACjB,YAAY,EACZ,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,6DAA6D;AAE7D;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAAC,SAAmB;IAC3C,OAAO,KAAK,CAAC,SAAS,CAAC;SACpB,UAAU,CAAC,MAAM,CAAC;SAClB,KAAK,CAAC,wBAAwB,CAAC;SAC/B,MAAM,CAAC,QAAQ,EAAE;QAChB,KAAK,EAAE,GAAG;QACV,IAAI,EAAE,QAAQ;QACd,QAAQ,EACN,gHAAgH;KACnH,CA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AAE,aAwB1B,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { loadEnv } from "@honeycluster/libs";
|
|
2
|
+
// #region -- print command ---------------------------------
|
|
3
|
+
export const printCommand = {
|
|
4
|
+
command: "print <variable>",
|
|
5
|
+
describe: "Load env files and print the value of a single variable.",
|
|
6
|
+
builder: (yargs) => yargs.positional("variable", {
|
|
7
|
+
describe: "Name of the variable to print",
|
|
8
|
+
type: "string",
|
|
9
|
+
demandOption: true,
|
|
10
|
+
}),
|
|
11
|
+
handler: (argv) => {
|
|
12
|
+
loadEnv({
|
|
13
|
+
envFiles: argv["env"],
|
|
14
|
+
variables: argv["variables"],
|
|
15
|
+
cascade: argv["cascade"],
|
|
16
|
+
vault: argv["vault"],
|
|
17
|
+
envPath: argv["env-path"],
|
|
18
|
+
override: argv["override"],
|
|
19
|
+
quiet: argv["quiet"],
|
|
20
|
+
});
|
|
21
|
+
const name = argv["variable"];
|
|
22
|
+
const value = process.env[name];
|
|
23
|
+
process.stdout.write(value != null ? `${value}\n` : "\n");
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
// #endregion -----------------------------------------------
|
|
27
|
+
//# sourceMappingURL=print.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"print.js","sourceRoot":"","sources":["../../src/commands/print.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE7C,6DAA6D;AAE7D,MAAM,CAAC,MAAM,YAAY,GAAkB;IACzC,OAAO,EAAE,kBAAkB;IAC3B,QAAQ,EAAE,0DAA0D;IACpE,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CACjB,KAAK,CAAC,UAAU,CAAC,UAAU,EAAE;QAC3B,QAAQ,EAAE,+BAA+B;QACzC,IAAI,EAAE,QAAQ;QACd,YAAY,EAAE,IAAI;KACnB,CAAC;IACJ,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE;QAChB,OAAO,CAAC;YACN,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAyB;YAC7C,SAAS,EAAE,IAAI,CAAC,WAAW,CAAyB;YACpD,OAAO,EAAE,IAAI,CAAC,SAAS,CAAuB;YAC9C,KAAK,EAAE,IAAI,CAAC,OAAO,CAAwB;YAC3C,OAAO,EAAE,IAAI,CAAC,UAAU,CAAuB;YAC/C,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAwB;YACjD,KAAK,EAAE,IAAI,CAAC,OAAO,CAAwB;SAC5C,CAAC,CAAC;QAEH,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,CAAW,CAAC;QACxC,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAChC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IAC5D,CAAC;CACF,CAAC;AAEF,6DAA6D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/commands/run.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAO3C,eAAO,MAAM,UAAU,EAAE,aAoCxB,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { execSync } from "child_process";
|
|
2
|
+
import { loadEnv } from "@honeycluster/libs";
|
|
3
|
+
import { log } from "@honeycluster/common";
|
|
4
|
+
// #region -- run command -----------------------------------
|
|
5
|
+
export const runCommand = {
|
|
6
|
+
command: "run [command..]",
|
|
7
|
+
aliases: ["$0"],
|
|
8
|
+
describe: "Load env files into process.env and execute a command. Default subcommand — `dotenvx-run [command]` is equivalent.",
|
|
9
|
+
builder: (yargs) => yargs.positional("command", {
|
|
10
|
+
describe: "Command to execute after loading env files",
|
|
11
|
+
type: "string",
|
|
12
|
+
array: true,
|
|
13
|
+
}),
|
|
14
|
+
handler: (argv) => {
|
|
15
|
+
const command = (argv["command"] ?? []).join(" ");
|
|
16
|
+
loadEnv({
|
|
17
|
+
envFiles: argv["env"],
|
|
18
|
+
variables: argv["variables"],
|
|
19
|
+
cascade: argv["cascade"],
|
|
20
|
+
vault: argv["vault"],
|
|
21
|
+
envPath: argv["env-path"],
|
|
22
|
+
override: argv["override"],
|
|
23
|
+
quiet: argv["quiet"],
|
|
24
|
+
});
|
|
25
|
+
if (!command)
|
|
26
|
+
return;
|
|
27
|
+
log.info(`Running: ${command}`);
|
|
28
|
+
try {
|
|
29
|
+
execSync(command, { stdio: "inherit" });
|
|
30
|
+
log.success(`Command completed: ${command}`);
|
|
31
|
+
}
|
|
32
|
+
catch (error) {
|
|
33
|
+
const msg = error instanceof Error ? error.message : String(error);
|
|
34
|
+
log.error(`Command failed: ${msg}`);
|
|
35
|
+
process.exit(1);
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
// #endregion -----------------------------------------------
|
|
40
|
+
//# sourceMappingURL=run.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run.js","sourceRoot":"","sources":["../../src/commands/run.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAGzC,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAE3C,6DAA6D;AAE7D,MAAM,CAAC,MAAM,UAAU,GAAkB;IACvC,OAAO,EAAE,iBAAiB;IAC1B,OAAO,EAAE,CAAC,IAAI,CAAC;IACf,QAAQ,EACN,oHAAoH;IACtH,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CACjB,KAAK,CAAC,UAAU,CAAC,SAAS,EAAE;QAC1B,QAAQ,EAAE,4CAA4C;QACtD,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,IAAI;KACZ,C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*
|
|
5
|
+
* Modeled after the `dotenv` API but with explicit scoping. Three call
|
|
6
|
+
* shapes:
|
|
7
|
+
*
|
|
8
|
+
* ```ts
|
|
9
|
+
* import envx from "@honeycluster/envx";
|
|
10
|
+
*
|
|
11
|
+
* envx(); // load `.env` (auto-detect from NODE_ENV / VERCEL_ENV / NETLIFY)
|
|
12
|
+
* envx("prod"); // load `.env` with cascade=prod (.env, .env.prod, .env.local, .env.prod.local)
|
|
13
|
+
* envx({ envFiles: ["vault/.env.prod"], envPath: "vault", quiet: false }); // full options
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* In all cases `process.env` is mutated and returned for ergonomic
|
|
17
|
+
* destructuring. Config file discovery (`envx.config.{ts,js,json}` /
|
|
18
|
+
* `package.json` `envx.config`) runs automatically; CLI-level options
|
|
19
|
+
* still win when both are passed.
|
|
20
|
+
*/
|
|
21
|
+
declare function envx(): NodeJS.ProcessEnv;
|
|
22
|
+
declare function envx(scope: string): NodeJS.ProcessEnv;
|
|
23
|
+
declare function envx(opts: LoadEnvOptions): NodeJS.ProcessEnv;
|
|
24
|
+
export default envx;
|
|
25
|
+
export { envx };
|
|
26
|
+
export type { LoadEnvOptions };
|
|
27
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,oBAAoB,CAAC;AAE5B;;;;;;;;;;;;;;;;;;GAkBG;AACH,iBAAS,IAAI,IAAI,MAAM,CAAC,UAAU,CAAC;AACnC,iBAAS,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,UAAU,CAAC;AAChD,iBAAS,IAAI,CAAC,IAAI,EAAE,cAAc,GAAG,MAAM,CAAC,UAAU,CAAC;AA0DvD,eAAe,IAAI,CAAC;AACpB,OAAO,EAAE,IAAI,EAAE,CAAC;AAGhB,YAAY,EAAE,cAAc,EAAE,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
// #region -- Programmatic Entry Point ----------------------
|
|
2
|
+
import { loadEnv, loadDotenvxConfig, } from "@honeycluster/libs";
|
|
3
|
+
function envx(arg) {
|
|
4
|
+
// Resolve config-file defaults first; CLI/programmatic args override.
|
|
5
|
+
const { config } = loadDotenvxConfig();
|
|
6
|
+
let opts;
|
|
7
|
+
if (arg === undefined) {
|
|
8
|
+
opts = {
|
|
9
|
+
envFiles: config.envFiles ? [...config.envFiles] : [".env"],
|
|
10
|
+
...(config.cascade !== undefined ? { cascade: config.cascade } : {}),
|
|
11
|
+
...(config.envPath !== undefined ? { envPath: config.envPath } : {}),
|
|
12
|
+
...(config.override !== undefined ? { override: config.override } : {}),
|
|
13
|
+
...(config.quiet !== undefined ? { quiet: config.quiet } : {}),
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
else if (typeof arg === "string") {
|
|
17
|
+
// String form is a cascade scope shortcut: envx("prod") loads
|
|
18
|
+
// .env, .env.prod, .env.local, .env.prod.local in that order.
|
|
19
|
+
opts = {
|
|
20
|
+
envFiles: config.envFiles ? [...config.envFiles] : [".env"],
|
|
21
|
+
cascade: arg,
|
|
22
|
+
...(config.envPath !== undefined ? { envPath: config.envPath } : {}),
|
|
23
|
+
...(config.override !== undefined ? { override: config.override } : {}),
|
|
24
|
+
...(config.quiet !== undefined ? { quiet: config.quiet } : {}),
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
// Object form: caller's options layered over config defaults.
|
|
29
|
+
opts = {
|
|
30
|
+
envFiles: arg.envFiles ?? (config.envFiles ? [...config.envFiles] : [".env"]),
|
|
31
|
+
...(arg.cascade !== undefined
|
|
32
|
+
? { cascade: arg.cascade }
|
|
33
|
+
: config.cascade !== undefined
|
|
34
|
+
? { cascade: config.cascade }
|
|
35
|
+
: {}),
|
|
36
|
+
...(arg.envPath !== undefined
|
|
37
|
+
? { envPath: arg.envPath }
|
|
38
|
+
: config.envPath !== undefined
|
|
39
|
+
? { envPath: config.envPath }
|
|
40
|
+
: {}),
|
|
41
|
+
...(arg.vault !== undefined ? { vault: arg.vault } : {}),
|
|
42
|
+
...(arg.variables !== undefined ? { variables: arg.variables } : {}),
|
|
43
|
+
...(arg.override !== undefined
|
|
44
|
+
? { override: arg.override }
|
|
45
|
+
: config.override !== undefined
|
|
46
|
+
? { override: config.override }
|
|
47
|
+
: {}),
|
|
48
|
+
...(arg.quiet !== undefined
|
|
49
|
+
? { quiet: arg.quiet }
|
|
50
|
+
: config.quiet !== undefined
|
|
51
|
+
? { quiet: config.quiet }
|
|
52
|
+
: {}),
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
loadEnv(opts);
|
|
56
|
+
return process.env;
|
|
57
|
+
}
|
|
58
|
+
export default envx;
|
|
59
|
+
export { envx };
|
|
60
|
+
// #endregion -----------------------------------------------
|
|
61
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAE7D,OAAO,EACL,OAAO,EACP,iBAAiB,GAElB,MAAM,oBAAoB,CAAC;AAwB5B,SAAS,IAAI,CAAC,GAA6B;IACzC,sEAAsE;IACtE,MAAM,EAAE,MAAM,EAAE,GAAG,iBAAiB,EAAE,CAAC;IAEvC,IAAI,IAAoB,CAAC;IACzB,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;QACtB,IAAI,GAAG;YACL,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;YAC3D,GAAG,CAAC,MAAM,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,E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KAAK,KAAK,SAAS;gBACzB,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,CAAC,KAAK,EAAE;gBACtB,CAAC,CAAC,MAAM,CAAC,KAAK,KAAK,SAAS;oBAC1B,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE;oBACzB,CAAC,CAAC,EAAE,CAAC;SACV,CAAC;IACJ,CAAC;IAED,OAAO,CAAC,IAAI,CAAC,CAAC;IACd,OAAO,OAAO,CAAC,GAAG,CAAC;AACrB,CAAC;AAED,eAAe,IAAI,CAAC;AACpB,OAAO,EAAE,IAAI,EAAE,CAAC;AAKhB,6DAA6D"}
|
package/package.json
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@super-repo/envx",
|
|
3
|
+
"description": "A global executable to run applications with the ENV variables witin a monorepo loaded by dotenvx",
|
|
4
|
+
"version": "0.2.1-rc.1",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"envx": "./dist/cli.js",
|
|
8
|
+
"dotenvx-proxy": "./dist/bin/dotenvx.js"
|
|
9
|
+
},
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"default": "./dist/index.js"
|
|
14
|
+
},
|
|
15
|
+
"./auto": {
|
|
16
|
+
"types": "./dist/auto.d.ts",
|
|
17
|
+
"default": "./dist/auto.js"
|
|
18
|
+
},
|
|
19
|
+
"./config": {
|
|
20
|
+
"types": "./dist/auto.d.ts",
|
|
21
|
+
"default": "./dist/auto.js"
|
|
22
|
+
},
|
|
23
|
+
"./commands": {
|
|
24
|
+
"types": "./dist/commands/index.d.ts",
|
|
25
|
+
"default": "./dist/commands/index.js"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"dist"
|
|
30
|
+
],
|
|
31
|
+
"publishConfig": {
|
|
32
|
+
"access": "public"
|
|
33
|
+
},
|
|
34
|
+
"keywords": [
|
|
35
|
+
"cli"
|
|
36
|
+
],
|
|
37
|
+
"license": "MIT",
|
|
38
|
+
"rune": {
|
|
39
|
+
"config": "../../../config/rune-envx.config.ts"
|
|
40
|
+
},
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"@dotenvx/dotenvx": "^1.49.1",
|
|
43
|
+
"yargs": "^17.7.0",
|
|
44
|
+
"zod": "^3.25.0",
|
|
45
|
+
"@super-repo/envx-common": "0.0.1",
|
|
46
|
+
"@super-repo/envx-libs": "0.0.1"
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@types/node": "^22.10.0",
|
|
50
|
+
"@types/yargs": "^17.0.33",
|
|
51
|
+
"tsc-alias": "^1.8.16",
|
|
52
|
+
"tsx": "^4.21.0",
|
|
53
|
+
"typescript": "^6.0.3",
|
|
54
|
+
"vitest": "^4.1.5",
|
|
55
|
+
"@super-repo/cli": "0.2.1-rc.1"
|
|
56
|
+
}
|
|
57
|
+
}
|