@arki/env 0.0.11 → 0.2.0

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.
Files changed (130) hide show
  1. package/CHANGELOG.md +196 -0
  2. package/README.md +231 -62
  3. package/dist/api.json +597 -0
  4. package/dist/core/define-env.d.ts +29 -4
  5. package/dist/core/define-env.d.ts.map +1 -1
  6. package/dist/core/define-env.js +85 -15
  7. package/dist/core/define-env.js.map +1 -1
  8. package/dist/core/describe.d.ts +29 -0
  9. package/dist/core/describe.d.ts.map +1 -0
  10. package/dist/core/describe.js +25 -0
  11. package/dist/core/describe.js.map +1 -0
  12. package/dist/core/errors.d.ts +10 -0
  13. package/dist/core/errors.d.ts.map +1 -0
  14. package/dist/core/errors.js +13 -0
  15. package/dist/core/errors.js.map +1 -0
  16. package/dist/core/index.d.ts +7 -2
  17. package/dist/core/index.d.ts.map +1 -1
  18. package/dist/core/index.js +6 -2
  19. package/dist/core/index.js.map +1 -1
  20. package/dist/core/secret.d.ts +56 -0
  21. package/dist/core/secret.d.ts.map +1 -0
  22. package/dist/core/secret.js +85 -0
  23. package/dist/core/secret.js.map +1 -0
  24. package/dist/errors.json +128 -0
  25. package/dist/index.d.ts +2 -1
  26. package/dist/index.d.ts.map +1 -1
  27. package/dist/index.js +3 -2
  28. package/dist/index.js.map +1 -1
  29. package/dist/node/codec.d.ts +63 -0
  30. package/dist/node/codec.d.ts.map +1 -0
  31. package/dist/node/codec.js +182 -0
  32. package/dist/node/codec.js.map +1 -0
  33. package/dist/node/edit.d.ts +112 -0
  34. package/dist/node/edit.d.ts.map +1 -0
  35. package/dist/node/edit.js +268 -0
  36. package/dist/node/edit.js.map +1 -0
  37. package/dist/node/errors.d.ts +119 -0
  38. package/dist/node/errors.d.ts.map +1 -0
  39. package/dist/node/errors.js +144 -0
  40. package/dist/node/errors.js.map +1 -0
  41. package/dist/node/files.d.ts +9 -0
  42. package/dist/node/files.d.ts.map +1 -0
  43. package/dist/node/files.js +35 -0
  44. package/dist/node/files.js.map +1 -0
  45. package/dist/node/index.d.ts +20 -0
  46. package/dist/node/index.d.ts.map +1 -0
  47. package/dist/node/index.js +13 -0
  48. package/dist/node/index.js.map +1 -0
  49. package/dist/node/key-schemas.d.ts +25 -0
  50. package/dist/node/key-schemas.d.ts.map +1 -0
  51. package/dist/node/key-schemas.js +38 -0
  52. package/dist/node/key-schemas.js.map +1 -0
  53. package/dist/node/keys.d.ts +54 -0
  54. package/dist/node/keys.d.ts.map +1 -0
  55. package/dist/node/keys.js +76 -0
  56. package/dist/node/keys.js.map +1 -0
  57. package/dist/node/load.d.ts +103 -0
  58. package/dist/node/load.d.ts.map +1 -0
  59. package/dist/node/load.js +306 -0
  60. package/dist/node/load.js.map +1 -0
  61. package/dist/node/operation-telemetry.d.ts +3 -0
  62. package/dist/node/operation-telemetry.d.ts.map +1 -0
  63. package/dist/node/operation-telemetry.js +53 -0
  64. package/dist/node/operation-telemetry.js.map +1 -0
  65. package/dist/node/references.d.ts +16 -0
  66. package/dist/node/references.d.ts.map +1 -0
  67. package/dist/node/references.js +72 -0
  68. package/dist/node/references.js.map +1 -0
  69. package/dist/node/register.d.ts +2 -0
  70. package/dist/node/register.d.ts.map +1 -0
  71. package/dist/node/register.js +19 -0
  72. package/dist/node/register.js.map +1 -0
  73. package/dist/{contracts → presets}/common.d.ts +1 -1
  74. package/dist/presets/common.d.ts.map +1 -0
  75. package/dist/{contracts → presets}/common.js +4 -8
  76. package/dist/presets/common.js.map +1 -0
  77. package/dist/{contracts → presets}/index.d.ts +5 -5
  78. package/dist/presets/index.d.ts.map +1 -0
  79. package/dist/presets/index.js +15 -0
  80. package/dist/presets/index.js.map +1 -0
  81. package/dist/{contracts → presets}/parsing.d.ts +2 -2
  82. package/dist/presets/parsing.d.ts.map +1 -0
  83. package/dist/{contracts → presets}/parsing.js +13 -5
  84. package/dist/presets/parsing.js.map +1 -0
  85. package/dist/{contracts → presets}/urls.d.ts +1 -1
  86. package/dist/presets/urls.d.ts.map +1 -0
  87. package/dist/{contracts → presets}/urls.js +1 -1
  88. package/dist/presets/urls.js.map +1 -0
  89. package/docs/agent-guide.md +121 -0
  90. package/docs/upgrades/0.0.11-to-0.1.0.md +62 -0
  91. package/docs/upgrades/0.1.0-to-0.2.0.md +73 -0
  92. package/docs/upgrades/typed-node-outcomes.md +13 -0
  93. package/llms.txt +30 -0
  94. package/package.json +27 -20
  95. package/src/core/define-env.ts +101 -20
  96. package/src/core/describe.ts +52 -0
  97. package/src/core/errors.ts +14 -0
  98. package/src/core/index.ts +7 -2
  99. package/src/core/secret.ts +127 -0
  100. package/src/index.ts +3 -2
  101. package/src/node/codec.ts +220 -0
  102. package/src/node/edit.ts +279 -0
  103. package/src/node/errors.ts +147 -0
  104. package/src/node/files.ts +41 -0
  105. package/src/node/index.ts +48 -0
  106. package/src/node/key-schemas.ts +44 -0
  107. package/src/node/keys.ts +93 -0
  108. package/src/node/load.ts +386 -0
  109. package/src/node/operation-telemetry.ts +56 -0
  110. package/src/node/references.ts +90 -0
  111. package/src/node/register.ts +18 -0
  112. package/src/{contracts → presets}/common.ts +4 -8
  113. package/src/presets/index.ts +18 -0
  114. package/src/{contracts → presets}/parsing.ts +12 -5
  115. package/src/{contracts → presets}/urls.ts +1 -1
  116. package/dist/contracts/common.d.ts.map +0 -1
  117. package/dist/contracts/common.js.map +0 -1
  118. package/dist/contracts/index.d.ts.map +0 -1
  119. package/dist/contracts/index.js +0 -14
  120. package/dist/contracts/index.js.map +0 -1
  121. package/dist/contracts/parsing.d.ts.map +0 -1
  122. package/dist/contracts/parsing.js.map +0 -1
  123. package/dist/contracts/urls.d.ts.map +0 -1
  124. package/dist/contracts/urls.js.map +0 -1
  125. package/dist/dot.d.ts +0 -67
  126. package/dist/dot.d.ts.map +0 -1
  127. package/dist/dot.js +0 -65
  128. package/dist/dot.js.map +0 -1
  129. package/src/contracts/index.ts +0 -17
  130. package/src/dot.ts +0 -94
package/dist/api.json ADDED
@@ -0,0 +1,597 @@
1
+ {
2
+ "package": "@arki/env",
3
+ "version": "0.2.0",
4
+ "entries": [
5
+ {
6
+ "subpath": ".",
7
+ "name": "presets",
8
+ "kind": "variable",
9
+ "signature": "export declare const presets: { string: (defaultValue?: string) => import(\"zod\").ZodDefault<import(\"zod\").ZodString> | import(\"zod\").ZodString; number: (defaultValue?: number) => import(\"zod\").ZodCoercedNumber<unknown> | import(\"zod\").ZodDefault<import(\"zod\").ZodCoercedNumber<unknown>>; port: (defaultValue?: number) => import(\"zod\").ZodDefault<import(\"zod\").ZodCoercedNumber<unknown>>; nodeEnv: () => import(\"zod\").ZodDefault<import(\"zod\").ZodEnum<{ development: \"development\"; production: \"production\"; test: \"test\"; }>>; boolean: (defaultValue?: boolean) => import(\"zod\").ZodPipe<import(\"zod\").ZodDefault<import(\"zod\").ZodEnum<{ 0: \"0\"; 1: \"1\"; false: \"false\"; true: \"true\"; }>>, import(\"zod\").ZodTransform<boolean, \"0\" | \"1\" | \"false\" | \"true\">>; logLevel: (defaultValue?: 'debug' | 'info' | 'warn' | 'error') => import(\"zod\").ZodDefault<import(\"zod\").ZodEnum<{ debug: \"debug\"; error: \"error\"; info: \"info\"; warn: \"warn\"; }>>; json: <T extends import(\"zod\").ZodType>(schema: T) => import(\"zod\").ZodPipe<import(\"zod\").ZodPipe<import(\"zod\").ZodString, import(\"zod\").ZodTransform<unknown, string>>, T>; csvArray: <T extends import(\"zod\").ZodType>(itemSchema: T) => import(\"zod\").ZodPreprocess<import(\"zod\").ZodArray<T>, unknown>; csvSet: <T extends import(\"zod\").ZodType>(itemSchema: T) => import(\"zod\").ZodPreprocess<import(\"zod\").ZodArray<T>, unknown>; url: (defaultValue?: string) => import(\"zod\").ZodDefault<import(\"zod\").ZodURL> | import(\"zod\").ZodURL; databaseUrl: () => import(\"zod\").ZodURL; redisUrl: () => import(\"zod\").ZodURL; };",
10
+ "jsdocSummary": ""
11
+ },
12
+ {
13
+ "subpath": "./core",
14
+ "name": "defineEnv",
15
+ "kind": "function",
16
+ "signature": "export declare function defineEnv<TServer extends Record<string, StandardSchemaV1>, TClient extends Record<string, StandardSchemaV1> = NonNullable<unknown>, TShared extends Record<string, StandardSchemaV1> = NonNullable<unknown>, const TPrefix extends string = '', const TExtends extends Record<string, unknown>[] = []>(config: { /** * Label shown in validation-error logs, e.g. `'@acme/backend'`. Without it a misconfigured * deploy logs a bare \"Invalid environment variables\" with no hint which env failed — exactly the * blind failure this wrapper exists to prevent. */ name?: string; server: TServer; /** Client-side schema. Every key must start with `clientPrefix` (enforced by `createEnv`). */ client?: TClient; /** Prefix client keys must carry, e.g. `'VITE_'`. Defaults to `''` (no client vars). */ clientPrefix?: TPrefix; /** Shared vars available to both client and server, unprefixed (e.g. `NODE_ENV`). */ shared?: TShared; /** * Already-built envs to compose in (e.g. `@arki/auth`, `@arki/db`). Their parsed variables merge * into the result with full types; each was validated by its own `createEnv` at import time. */ extends?: TExtends; /** * Explicit runtime source. Omit it and `defineEnv` auto-builds one by reading `process.env` for * every declared key — correct for any server-side env. Provide it only when the auto-build would * be wrong: Vite/`start` apps whose client vars come from `import.meta.env` in the browser, or * keys with a fallback/alias (e.g. `DB_URL: process.env.DB_URL ?? process.env.DATABASE_URL`). */ runtimeEnv?: Record<string, string | boolean | number | undefined>; options?: { /** * `true` skips schema validation: values pass through raw. Default: validate on the first read, * in every environment, unless the process sets `SKIP_ENV_VALIDATION=1` (exactly `1`). That * variable is the only implicit opt-out, meant for Docker build stages that prerender without * secrets. `CI`, lint and `NODE_ENV` never skip. */ skipValidation?: boolean; /** * Treat empty-string env values as `undefined` so defaults apply (e.g. `PORT=` in `.env`, or a * Docker arg baked as `X=\"\"`). Defaults to `true` — set `false` only if an app intentionally * accepts `\"\"` as a valid required string. */ emptyStringAsUndefined?: boolean; onValidationError?: (issues: ValidationIssues) => never; }; }): CreateEnv<DefaultCombinedSchema<TServer, TClient, TShared>, TExtends>;",
17
+ "jsdocSummary": "Thin, type-preserving wrapper over `@t3-oss/env-core`'s `createEnv`. Generic over the server, client, shared and composed schemas so the parsed env keeps its exact inferred types — the wrapper adds the ARKI defaults (auto `runtimeEnv`, validation on in every environment, a legible labelled error handler) without widening any value to `unknown`."
18
+ },
19
+ {
20
+ "subpath": "./core",
21
+ "name": "describeEnv",
22
+ "kind": "function",
23
+ "signature": "export declare function describeEnv(env: object): EnvDescription | undefined;",
24
+ "jsdocSummary": "The description of an env built by `defineEnv`, or `undefined` for any other object."
25
+ },
26
+ {
27
+ "subpath": "./core",
28
+ "name": "EnvDescription",
29
+ "kind": "type",
30
+ "signature": "export type EnvDescription = { readonly name?: string; readonly keys: readonly EnvKeyDescription[]; };",
31
+ "jsdocSummary": "What an env declares, its `extends` included."
32
+ },
33
+ {
34
+ "subpath": "./core",
35
+ "name": "EnvKeyDescription",
36
+ "kind": "type",
37
+ "signature": "export type EnvKeyDescription = { readonly key: string; /** Declared with `secret()`: must never be plaintext in a tracked file. */ readonly secret: boolean; readonly scope: 'server' | 'client' | 'shared'; };",
38
+ "jsdocSummary": "One declared key."
39
+ },
40
+ {
41
+ "subpath": "./core",
42
+ "name": "formatIssues",
43
+ "kind": "function",
44
+ "signature": "export declare function formatIssues(name: string | undefined, issues: ValidationIssues): string;",
45
+ "jsdocSummary": "Fold validation issues into a human-legible, log-pipeline-safe string. The t3-oss default handler logs `issues` as a raw object, which platforms like Coolify collapse to `[Object]` — so the var that actually failed never reaches the logs. A flat ` path: message` list survives transport."
46
+ },
47
+ {
48
+ "subpath": "./core",
49
+ "name": "InvalidEnvironment",
50
+ "kind": "variable",
51
+ "signature": "export declare const InvalidEnvironment: import(\"@arki/failure\").FailureDefinition<\"env.invalid_environment\", import(\"@standard-schema/spec\").StandardSchemaV1<{ report: string; }, { report: string; }>>;",
52
+ "jsdocSummary": "The process environment does not match the schema, so the app must not boot."
53
+ },
54
+ {
55
+ "subpath": "./core",
56
+ "name": "isSecretSchema",
57
+ "kind": "function",
58
+ "signature": "export declare function isSecretSchema(schema: StandardSchemaV1): boolean;",
59
+ "jsdocSummary": "True for a schema built by {@link secret} (or its `.optional()`)."
60
+ },
61
+ {
62
+ "subpath": "./core",
63
+ "name": "presets",
64
+ "kind": "variable",
65
+ "signature": "export declare const presets: { string: (defaultValue?: string) => import(\"zod\").ZodDefault<import(\"zod\").ZodString> | import(\"zod\").ZodString; number: (defaultValue?: number) => import(\"zod\").ZodCoercedNumber<unknown> | import(\"zod\").ZodDefault<import(\"zod\").ZodCoercedNumber<unknown>>; port: (defaultValue?: number) => import(\"zod\").ZodDefault<import(\"zod\").ZodCoercedNumber<unknown>>; nodeEnv: () => import(\"zod\").ZodDefault<import(\"zod\").ZodEnum<{ development: \"development\"; production: \"production\"; test: \"test\"; }>>; boolean: (defaultValue?: boolean) => import(\"zod\").ZodPipe<import(\"zod\").ZodDefault<import(\"zod\").ZodEnum<{ 0: \"0\"; 1: \"1\"; false: \"false\"; true: \"true\"; }>>, import(\"zod\").ZodTransform<boolean, \"0\" | \"1\" | \"false\" | \"true\">>; logLevel: (defaultValue?: 'debug' | 'info' | 'warn' | 'error') => import(\"zod\").ZodDefault<import(\"zod\").ZodEnum<{ debug: \"debug\"; error: \"error\"; info: \"info\"; warn: \"warn\"; }>>; json: <T extends import(\"zod\").ZodType>(schema: T) => import(\"zod\").ZodPipe<import(\"zod\").ZodPipe<import(\"zod\").ZodString, import(\"zod\").ZodTransform<unknown, string>>, T>; csvArray: <T extends import(\"zod\").ZodType>(itemSchema: T) => import(\"zod\").ZodPreprocess<import(\"zod\").ZodArray<T>, unknown>; csvSet: <T extends import(\"zod\").ZodType>(itemSchema: T) => import(\"zod\").ZodPreprocess<import(\"zod\").ZodArray<T>, unknown>; url: (defaultValue?: string) => import(\"zod\").ZodDefault<import(\"zod\").ZodURL> | import(\"zod\").ZodURL; databaseUrl: () => import(\"zod\").ZodURL; redisUrl: () => import(\"zod\").ZodURL; };",
66
+ "jsdocSummary": ""
67
+ },
68
+ {
69
+ "subpath": "./core",
70
+ "name": "Redacted",
71
+ "kind": "class",
72
+ "signature": "export declare class Redacted<Value = string> { #private; constructor(value: Value); toString(): string; toJSON(): string; [inspect](): string; }",
73
+ "jsdocSummary": "A value that prints as `[redacted]`. Read it with {@link reveal}."
74
+ },
75
+ {
76
+ "subpath": "./core",
77
+ "name": "reveal",
78
+ "kind": "function",
79
+ "signature": "export declare function reveal<Value>(value: Redacted<Value> | Value): Value;",
80
+ "jsdocSummary": "The plain value of a secret. Also takes the raw value, because when validation is skipped (`skipValidation`, or `CI` builds) schemas do not run and the variable is still a plain string."
81
+ },
82
+ {
83
+ "subpath": "./core",
84
+ "name": "secret",
85
+ "kind": "function",
86
+ "signature": "export declare function secret<Schema extends StandardSchemaV1>(schema: Schema): SecretSchema<Schema>;",
87
+ "jsdocSummary": "Validate with `schema` (any Standard Schema), then wrap the value in a {@link Redacted}. For an optional secret, call `.optional()`: `secret(z.string()).optional()`. The inner result passes straight through: an async inner schema yields a promise, so `defineEnv`'s synchronous check fails with the same `UnexpectedFailure` it would give without `secret`, and a throwing validator still throws."
88
+ },
89
+ {
90
+ "subpath": "./core",
91
+ "name": "SECRET_SCHEMA",
92
+ "kind": "variable",
93
+ "signature": "export declare const SECRET_SCHEMA: unique symbol;",
94
+ "jsdocSummary": "Marks a schema built by {@link secret}, so `describeEnv` can tell secrets apart."
95
+ },
96
+ {
97
+ "subpath": "./node",
98
+ "name": "decryptEnvFile",
99
+ "kind": "function",
100
+ "signature": "export declare function decryptEnvFile(file: string, privateKeys: readonly EnvPrivateKey[], keys?: readonly string[]): string[] | import(\"@arki/failure\").Failure<\"env.decryption_failed\", undefined> | import(\"@arki/failure\").Failure<\"env.file_read_failed\", { file: string; }> | import(\"@arki/failure\").Failure<\"env.file_write_failed\", { file: string; }> | import(\"@arki/failure\").Failure<\"env.unrepresentable_value\", undefined>;",
101
+ "jsdocSummary": "Decrypt values in place with `privateKeys`: the listed keys, or every value. Returns the keys decrypted."
102
+ },
103
+ {
104
+ "subpath": "./node",
105
+ "name": "DecryptionFailed",
106
+ "kind": "variable",
107
+ "signature": "export declare const DecryptionFailed: import(\"@arki/failure\").FailureDefinition<\"env.decryption_failed\", undefined>;",
108
+ "jsdocSummary": "Ciphertext authentication or decoding failed."
109
+ },
110
+ {
111
+ "subpath": "./node",
112
+ "name": "decryptValue",
113
+ "kind": "function",
114
+ "signature": "export declare function decryptValue(value: string, privateKey: EnvPrivateKey): string | import(\"@arki/failure\").Failure<\"env.decryption_failed\", undefined>;",
115
+ "jsdocSummary": "Decrypt authenticated UTF-8, or return DecryptionFailed when the ciphertext/key does not match."
116
+ },
117
+ {
118
+ "subpath": "./node",
119
+ "name": "DEFAULT_RESOLVERS",
120
+ "kind": "variable",
121
+ "signature": "export declare const DEFAULT_RESOLVERS: Readonly<Record<string, ReferenceResolver>>;",
122
+ "jsdocSummary": "The resolvers used unless the caller supplies an explicit registry."
123
+ },
124
+ {
125
+ "subpath": "./node",
126
+ "name": "ENCRYPTED_PREFIX",
127
+ "kind": "variable",
128
+ "signature": "export declare const ENCRYPTED_PREFIX = \"encrypted:\";",
129
+ "jsdocSummary": "The prefix of a value encrypted in a dotenvx-format env file (`@arki/env/node`)."
130
+ },
131
+ {
132
+ "subpath": "./node",
133
+ "name": "encryptEnvFile",
134
+ "kind": "function",
135
+ "signature": "export declare function encryptEnvFile(file: string, keys?: readonly string[]): string[] | import(\"@arki/failure\").Failure<\"env.encryption_failed\", undefined> | import(\"@arki/failure\").Failure<\"env.file_read_failed\", { file: string; }> | import(\"@arki/failure\").Failure<\"env.file_write_failed\", { file: string; }> | import(\"@arki/failure\").Failure<\"env.missing_public_key\", { file: string; }> | import(\"@arki/failure\").Failure<\"env.unrepresentable_value\", undefined> | import(\"@arki/failure\").Failure<\"schema.async_required\", undefined> | import(\"@arki/failure\").Failure<\"schema.invalid_input\", { issues: readonly import(\"@standard-schema/spec\").StandardSchemaV1.Issue[]; }> | import(\"@arki/failure\").Failure<\"schema.validator_defect\", undefined>;",
136
+ "jsdocSummary": "Encrypt plaintext values in place: the listed keys, or every value. Returns the keys encrypted."
137
+ },
138
+ {
139
+ "subpath": "./node",
140
+ "name": "EncryptionFailed",
141
+ "kind": "variable",
142
+ "signature": "export declare const EncryptionFailed: import(\"@arki/failure\").FailureDefinition<\"env.encryption_failed\", undefined>;",
143
+ "jsdocSummary": "Cryptographic encryption failed."
144
+ },
145
+ {
146
+ "subpath": "./node",
147
+ "name": "encryptValue",
148
+ "kind": "function",
149
+ "signature": "export declare function encryptValue(value: string, publicKey: EnvPublicKey): string | import(\"@arki/failure\").Failure<\"env.encryption_failed\", undefined>;",
150
+ "jsdocSummary": "Encrypt `value` to a compressed or uncompressed secp256k1 public key (hex)."
151
+ },
152
+ {
153
+ "subpath": "./node",
154
+ "name": "ENV_FILES_ERROR_CODES",
155
+ "kind": "variable",
156
+ "signature": "export declare const ENV_FILES_ERROR_CODES: { readonly missingPrivateKey: \"env.missing_private_key\"; readonly cannotDecrypt: \"env.decryption_failed\"; readonly unresolvedReference: \"env.reference_failed\"; readonly cannotRead: \"env.file_read_failed\"; readonly cancelled: \"env.cancelled\"; readonly deadline: \"env.deadline\"; };",
157
+ "jsdocSummary": "Loader problem codes are derived from their canonical definitions."
158
+ },
159
+ {
160
+ "subpath": "./node",
161
+ "name": "EnvCancelled",
162
+ "kind": "variable",
163
+ "signature": "export declare const EnvCancelled: import(\"@arki/failure\").FailureDefinition<\"env.cancelled\", undefined>;",
164
+ "jsdocSummary": "Loading was cancelled."
165
+ },
166
+ {
167
+ "subpath": "./node",
168
+ "name": "EnvDeadline",
169
+ "kind": "variable",
170
+ "signature": "export declare const EnvDeadline: import(\"@arki/failure\").FailureDefinition<\"env.deadline\", undefined>;",
171
+ "jsdocSummary": "The aggregate load deadline elapsed."
172
+ },
173
+ {
174
+ "subpath": "./node",
175
+ "name": "envDirs",
176
+ "kind": "function",
177
+ "signature": "export declare function envDirs(root: string, cwd: string): readonly string[];",
178
+ "jsdocSummary": "The directories from `root` down to `cwd`, root first. Just `cwd` when it is not inside `root`."
179
+ },
180
+ {
181
+ "subpath": "./node",
182
+ "name": "EnvDocument",
183
+ "kind": "type",
184
+ "signature": "export type EnvDocument = { readonly lines: readonly string[]; readonly entries: readonly EnvEntry[]; };",
185
+ "jsdocSummary": "A parsed `.env` file: its lines as written, and every assignment in order."
186
+ },
187
+ {
188
+ "subpath": "./node",
189
+ "name": "EnvEntry",
190
+ "kind": "type",
191
+ "signature": "export type EnvEntry = { readonly key: string; readonly value: string; readonly start: number; readonly end: number; };",
192
+ "jsdocSummary": "One `KEY=value` assignment: its decoded value and the lines it spans (`end` exclusive)."
193
+ },
194
+ {
195
+ "subpath": "./node",
196
+ "name": "EnvFilesError",
197
+ "kind": "type",
198
+ "signature": "export type EnvFilesError = FailureOf<typeof EnvFilesFailed>['data']['errors'][number];",
199
+ "jsdocSummary": "One problem, by name. Messages never contain a value."
200
+ },
201
+ {
202
+ "subpath": "./node",
203
+ "name": "EnvFilesFailed",
204
+ "kind": "variable",
205
+ "signature": "export declare const EnvFilesFailed: import(\"@arki/failure\").FailureDefinition<\"env.files_failed\", import(\"@standard-schema/spec\").StandardSchemaV1<{ environment: string; errors: { code: \"env.cancelled\" | \"env.deadline\" | \"env.decryption_failed\" | \"env.file_read_failed\" | \"env.missing_private_key\" | \"env.reference_failed\"; message: string; file: string; key?: string | undefined; }[]; }, { environment: string; errors: { code: \"env.cancelled\" | \"env.deadline\" | \"env.decryption_failed\" | \"env.file_read_failed\" | \"env.missing_private_key\" | \"env.reference_failed\"; message: string; file: string; key?: string | undefined; }[]; }>>;",
206
+ "jsdocSummary": "One or more env entries could not be loaded. Public data excludes values and raw causes."
207
+ },
208
+ {
209
+ "subpath": "./node",
210
+ "name": "EnvFilesReport",
211
+ "kind": "type",
212
+ "signature": "export type EnvFilesReport = { readonly root: string; readonly environment: string; /** Files read, in load order. */ readonly files: readonly string[]; readonly values: readonly EnvFileValue[]; /** Keys written into the environment. */ readonly applied: readonly string[]; /** Keys the real environment set to a different value, so the file value was not used. */ readonly shadowed: readonly { readonly key: string; readonly file: string; readonly line: number; }[]; /** File entries never applied: loader-hijacking keys (`NODE_OPTIONS`, `LD_*`, `DYLD_*`) and references into public keys. */ readonly refused: readonly { readonly key: string; readonly file: string; readonly line: number; readonly reason: string; }[]; readonly errors: readonly EnvFilesError[]; };",
213
+ "jsdocSummary": "What a load found and did. Holds plaintext in `values`: never print it whole."
214
+ },
215
+ {
216
+ "subpath": "./node",
217
+ "name": "EnvFileValue",
218
+ "kind": "type",
219
+ "signature": "export type EnvFileValue = { readonly key: string; readonly file: string; readonly line: number; readonly kind: EnvValueKind; readonly value?: string; };",
220
+ "jsdocSummary": "The winning file entry of one key. `value` is the plaintext, absent when it could not be read."
221
+ },
222
+ {
223
+ "subpath": "./node",
224
+ "name": "envHeader",
225
+ "kind": "function",
226
+ "signature": "export declare function envHeader(fileName: string, publicKey: EnvPublicKey): string;",
227
+ "jsdocSummary": "The dotenvx header for a file: banner, public key, and a `# <file>` line."
228
+ },
229
+ {
230
+ "subpath": "./node",
231
+ "name": "EnvKeypair",
232
+ "kind": "type",
233
+ "signature": "export type EnvKeypair = { readonly publicKey: EnvPublicKey; readonly privateKey: EnvPrivateKey; };",
234
+ "jsdocSummary": "A keypair as dotenvx writes it: a compressed public key (66 hex chars), a private key (64)."
235
+ },
236
+ {
237
+ "subpath": "./node",
238
+ "name": "EnvPrivateKey",
239
+ "kind": "type",
240
+ "signature": "export type EnvPrivateKey = string & { readonly [privateKeyBrand]: true; };",
241
+ "jsdocSummary": "A validated secp256k1 private key. Never serialize it into diagnostics."
242
+ },
243
+ {
244
+ "subpath": "./node",
245
+ "name": "envPrivateKeySchema",
246
+ "kind": "variable",
247
+ "signature": "export declare const envPrivateKeySchema: StandardSchemaV1<unknown, EnvPrivateKey>;",
248
+ "jsdocSummary": "Standard Schema for an external private key; issue text never echoes the key."
249
+ },
250
+ {
251
+ "subpath": "./node",
252
+ "name": "EnvPublicKey",
253
+ "kind": "type",
254
+ "signature": "export type EnvPublicKey = string & { readonly [publicKeyBrand]: true; };",
255
+ "jsdocSummary": "A validated secp256k1 public key, distinct from its private key."
256
+ },
257
+ {
258
+ "subpath": "./node",
259
+ "name": "envPublicKeySchema",
260
+ "kind": "variable",
261
+ "signature": "export declare const envPublicKeySchema: StandardSchemaV1<unknown, EnvPublicKey>;",
262
+ "jsdocSummary": "Standard Schema for an external public key; issue text never echoes the key."
263
+ },
264
+ {
265
+ "subpath": "./node",
266
+ "name": "EnvValueKind",
267
+ "kind": "type",
268
+ "signature": "export type EnvValueKind = 'plain' | 'encrypted' | 'reference';",
269
+ "jsdocSummary": "How a value is stored in its file."
270
+ },
271
+ {
272
+ "subpath": "./node",
273
+ "name": "envValues",
274
+ "kind": "function",
275
+ "signature": "export declare function envValues(document: EnvDocument): Map<string, EnvEntry>;",
276
+ "jsdocSummary": "Every key with its last value, in first-seen order."
277
+ },
278
+ {
279
+ "subpath": "./node",
280
+ "name": "FileReadFailed",
281
+ "kind": "variable",
282
+ "signature": "export declare const FileReadFailed: import(\"@arki/failure\").FailureDefinition<\"env.file_read_failed\", import(\"@standard-schema/spec\").StandardSchemaV1<{ file: string; }, { file: string; }>>;",
283
+ "jsdocSummary": "An env file could not be read."
284
+ },
285
+ {
286
+ "subpath": "./node",
287
+ "name": "FileWriteFailed",
288
+ "kind": "variable",
289
+ "signature": "export declare const FileWriteFailed: import(\"@arki/failure\").FailureDefinition<\"env.file_write_failed\", import(\"@standard-schema/spec\").StandardSchemaV1<{ file: string; }, { file: string; }>>;",
290
+ "jsdocSummary": "An env file could not be replaced."
291
+ },
292
+ {
293
+ "subpath": "./node",
294
+ "name": "findPrivateKey",
295
+ "kind": "function",
296
+ "signature": "export declare function findPrivateKey(file: string, options: { readonly root: string; readonly env: Readonly<Record<string, string | undefined>>; }): import(\"@arki/failure\").Failure<\"env.file_read_failed\", { file: string; }> | import(\"@arki/failure\").Failure<\"schema.async_required\", undefined> | import(\"@arki/failure\").Failure<\"schema.invalid_input\", { issues: readonly import(\"@standard-schema/spec\").StandardSchemaV1.Issue[]; }> | import(\"@arki/failure\").Failure<\"schema.validator_defect\", undefined> | { keys: EnvPrivateKey[]; source: { path?: undefined; kind: \"env\"; name: string; }; } | { keys: EnvPrivateKey[]; source: { kind: \"file\"; name: string; path: string; }; } | undefined;",
297
+ "jsdocSummary": "The private key for `file`, or `undefined` when no source has one."
298
+ },
299
+ {
300
+ "subpath": "./node",
301
+ "name": "findRoot",
302
+ "kind": "function",
303
+ "signature": "export declare function findRoot(cwd: string): string;",
304
+ "jsdocSummary": "The nearest ancestor of `cwd` with `.git`, else with a `workspaces` package.json, else `cwd`."
305
+ },
306
+ {
307
+ "subpath": "./node",
308
+ "name": "formatEnvFilesErrors",
309
+ "kind": "function",
310
+ "signature": "export declare function formatEnvFilesErrors(failure: FailureOf<typeof EnvFilesFailed>): string;",
311
+ "jsdocSummary": "The report's errors as one message, one line each."
312
+ },
313
+ {
314
+ "subpath": "./node",
315
+ "name": "FoundPrivateKey",
316
+ "kind": "type",
317
+ "signature": "export type FoundPrivateKey = { readonly keys: readonly EnvPrivateKey[]; readonly source: PrivateKeySource; };",
318
+ "jsdocSummary": "The candidate keys for a file, and where they came from."
319
+ },
320
+ {
321
+ "subpath": "./node",
322
+ "name": "generateKeypair",
323
+ "kind": "function",
324
+ "signature": "export declare function generateKeypair(): import(\"@arki/failure\").Failure<\"env.key_generation_failed\", undefined> | { publicKey: EnvPublicKey; privateKey: EnvPrivateKey; };",
325
+ "jsdocSummary": "A new random keypair."
326
+ },
327
+ {
328
+ "subpath": "./node",
329
+ "name": "initEnvFile",
330
+ "kind": "function",
331
+ "signature": "export declare function initEnvFile(file: string, options: { readonly root: string; readonly env?: Readonly<Record<string, string | undefined>>; }): import(\"@arki/failure\").Failure<\"env.file_read_failed\", { file: string; }> | import(\"@arki/failure\").Failure<\"env.file_write_failed\", { file: string; }> | import(\"@arki/failure\").Failure<\"env.key_generation_failed\", undefined> | import(\"@arki/failure\").Failure<\"env.unrepresentable_value\", undefined> | import(\"@arki/failure\").Failure<\"schema.async_required\", undefined> | import(\"@arki/failure\").Failure<\"schema.invalid_input\", { issues: readonly import(\"@standard-schema/spec\").StandardSchemaV1.Issue[]; }> | import(\"@arki/failure\").Failure<\"schema.validator_defect\", undefined> | { file: string; publicKey: EnvPublicKey; headerAdded: boolean; keysWritten?: undefined; } | { file: string; publicKey: EnvPublicKey; headerAdded: boolean; keysWritten: string; };",
332
+ "jsdocSummary": "Give `file` a dotenvx header, creating the file if needed. Reuses the private key of the same environment when one is already reachable (so every `.env.development` in a repo shares one key); otherwise generates a keypair and stores the private key in `<root>/.env.keys`."
333
+ },
334
+ {
335
+ "subpath": "./node",
336
+ "name": "InitResult",
337
+ "kind": "type",
338
+ "signature": "export type InitResult = { readonly file: string; readonly publicKey: EnvPublicKey; /** `false` when the file already had a header. */ readonly headerAdded: boolean; /** Where a new private key was written; `undefined` when an existing key was reused. */ readonly keysWritten?: string; };",
339
+ "jsdocSummary": "What `initEnvFile` did."
340
+ },
341
+ {
342
+ "subpath": "./node",
343
+ "name": "isEncrypted",
344
+ "kind": "function",
345
+ "signature": "export declare function isEncrypted(value: string): boolean;",
346
+ "jsdocSummary": "True for a value written by {@link encryptValue} (or by dotenvx)."
347
+ },
348
+ {
349
+ "subpath": "./node",
350
+ "name": "isKeyName",
351
+ "kind": "function",
352
+ "signature": "export declare function isKeyName(key: string): boolean;",
353
+ "jsdocSummary": "True for the `DOTENV_PUBLIC_KEY*` / `DOTENV_PRIVATE_KEY*` names, which are never app values."
354
+ },
355
+ {
356
+ "subpath": "./node",
357
+ "name": "KeyGenerationFailed",
358
+ "kind": "variable",
359
+ "signature": "export declare const KeyGenerationFailed: import(\"@arki/failure\").FailureDefinition<\"env.key_generation_failed\", undefined>;",
360
+ "jsdocSummary": "The runtime could not generate a keypair."
361
+ },
362
+ {
363
+ "subpath": "./node",
364
+ "name": "keyNamesFor",
365
+ "kind": "function",
366
+ "signature": "export declare function keyNamesFor(fileName: string): { readonly publicKey: string; readonly privateKey: string; };",
367
+ "jsdocSummary": "The key names dotenvx uses for a file: `.env` → `DOTENV_PUBLIC_KEY` / `DOTENV_PRIVATE_KEY`, `.env.production` → `..._PRODUCTION`, `.env.ci.local` → `..._CI_LOCAL`."
368
+ },
369
+ {
370
+ "subpath": "./node",
371
+ "name": "KEYS_FILE",
372
+ "kind": "variable",
373
+ "signature": "export declare const KEYS_FILE = \".env.keys\";",
374
+ "jsdocSummary": "The git-ignored file that holds private keys, one `DOTENV_PRIVATE_KEY_<ENV>=<hex>` line each."
375
+ },
376
+ {
377
+ "subpath": "./node",
378
+ "name": "keysFileCandidates",
379
+ "kind": "function",
380
+ "signature": "export declare function keysFileCandidates(file: string, root: string): readonly string[];",
381
+ "jsdocSummary": "The `.env.keys` paths searched for `file`, nearest first."
382
+ },
383
+ {
384
+ "subpath": "./node",
385
+ "name": "loadEnvFiles",
386
+ "kind": "function",
387
+ "signature": "export declare function loadEnvFiles(options?: LoadEnvFilesOptions): import(\"@arki/failure\").Failure<\"env.cancelled\", undefined> | import(\"@arki/failure\").Failure<\"env.deadline\", undefined> | import(\"@arki/failure\").Failure<\"env.files_failed\", { environment: string; errors: { code: \"env.cancelled\" | \"env.deadline\" | \"env.decryption_failed\" | \"env.file_read_failed\" | \"env.missing_private_key\" | \"env.reference_failed\"; message: string; file: string; key?: string | undefined; }[]; }> | { root: string; environment: string; files: string[]; values: EnvFileValue[]; applied: string[]; shadowed: { key: string; file: string; line: number; }[]; refused: { key: string; file: string; line: number; reason: string; }[]; errors: { code: \"env.cancelled\" | \"env.deadline\" | \"env.decryption_failed\" | \"env.file_read_failed\" | \"env.missing_private_key\" | \"env.reference_failed\"; message: string; file: string; key?: string | undefined; }[]; };",
388
+ "jsdocSummary": "Load atomically into the env map: operational problems return canonical failures before applying values."
389
+ },
390
+ {
391
+ "subpath": "./node",
392
+ "name": "LoadEnvFilesOptions",
393
+ "kind": "type",
394
+ "signature": "export type LoadEnvFilesOptions = { /** Where to stop descending. Default: `process.cwd()`. */ readonly cwd?: string; /** Where to start. Default: the nearest ancestor with `.git`, else with a `workspaces` package.json, else `cwd`. */ readonly root?: string; /** Picks `.env.<environment>`. Default: `NODE_ENV`, else `development`. */ readonly environment?: string; /** File names read in every directory, later wins. Default: `.env.<environment>`, then `.env.local` (not under `test`). */ readonly files?: readonly string[]; /** The environment read and written. Default: `process.env`. */ readonly env?: Record<string, string | undefined>; /** `false` reads and decrypts without writing anything. Default: `true`. */ readonly write?: boolean; /** Reference resolvers by scheme. Default: `op`, `infisical`, `doppler`. */ readonly references?: Readonly<Record<string, ReferenceResolver>>; /** Cooperative cancellation between synchronous reads; passed to provider callbacks. */ readonly signal?: AbortSignal; /** Aggregate load budget, shared by all provider subprocesses. Default: 30 seconds. */ readonly timeoutMs?: number; };",
395
+ "jsdocSummary": "How `loadEnvFiles` finds, reads and applies the files."
396
+ },
397
+ {
398
+ "subpath": "./node",
399
+ "name": "MissingPrivateKey",
400
+ "kind": "variable",
401
+ "signature": "export declare const MissingPrivateKey: import(\"@arki/failure\").FailureDefinition<\"env.missing_private_key\", import(\"@standard-schema/spec\").StandardSchemaV1<{ file: string; }, { file: string; }>>;",
402
+ "jsdocSummary": "No private key is available."
403
+ },
404
+ {
405
+ "subpath": "./node",
406
+ "name": "MissingPublicKey",
407
+ "kind": "variable",
408
+ "signature": "export declare const MissingPublicKey: import(\"@arki/failure\").FailureDefinition<\"env.missing_public_key\", import(\"@standard-schema/spec\").StandardSchemaV1<{ file: string; }, { file: string; }>>;",
409
+ "jsdocSummary": "The target file has no public key."
410
+ },
411
+ {
412
+ "subpath": "./node",
413
+ "name": "parseEnv",
414
+ "kind": "function",
415
+ "signature": "export declare function parseEnv(text: string): EnvDocument;",
416
+ "jsdocSummary": "Parse `.env` text the way `dotenv` reads it: `export` prefixes, `#` comments, single, double and backtick quotes, multi-line quoted values, and `\\n` / `\\r` expanded inside double quotes. An unquoted value ends at the first `#`. A key that appears twice keeps both entries; readers take the last one, as dotenv does."
417
+ },
418
+ {
419
+ "subpath": "./node",
420
+ "name": "parsePrivateKey",
421
+ "kind": "function",
422
+ "signature": "export declare function parsePrivateKey(value: unknown): import(\"@arki/failure\").Failure<\"schema.async_required\", undefined> | import(\"@arki/failure\").Failure<\"schema.invalid_input\", { issues: readonly StandardSchemaV1.Issue[]; }> | import(\"@arki/failure\").Failure<\"schema.validator_defect\", undefined> | EnvPrivateKey;",
423
+ "jsdocSummary": "Parse an external private key without exposing its bytes in issues."
424
+ },
425
+ {
426
+ "subpath": "./node",
427
+ "name": "parsePublicKey",
428
+ "kind": "function",
429
+ "signature": "export declare function parsePublicKey(value: unknown): import(\"@arki/failure\").Failure<\"schema.async_required\", undefined> | import(\"@arki/failure\").Failure<\"schema.invalid_input\", { issues: readonly StandardSchemaV1.Issue[]; }> | import(\"@arki/failure\").Failure<\"schema.validator_defect\", undefined> | EnvPublicKey;",
430
+ "jsdocSummary": "Parse an external public key without manufacturing a brand."
431
+ },
432
+ {
433
+ "subpath": "./node",
434
+ "name": "PrivateKeySource",
435
+ "kind": "type",
436
+ "signature": "export type PrivateKeySource = { readonly kind: 'env'; readonly name: string; } | { readonly kind: 'file'; readonly name: string; readonly path: string; };",
437
+ "jsdocSummary": "Where a private key was found. Never carries the key itself."
438
+ },
439
+ {
440
+ "subpath": "./node",
441
+ "name": "publicKeyIn",
442
+ "kind": "function",
443
+ "signature": "export declare function publicKeyIn(file: string): import(\"@arki/failure\").Failure<\"env.file_read_failed\", { file: string; }> | import(\"@arki/failure\").Failure<\"schema.async_required\", undefined> | import(\"@arki/failure\").Failure<\"schema.invalid_input\", { issues: readonly import(\"@standard-schema/spec\").StandardSchemaV1.Issue[]; }> | import(\"@arki/failure\").Failure<\"schema.validator_defect\", undefined> | EnvPublicKey | undefined;",
444
+ "jsdocSummary": "The public key in a file's header, or `undefined` when it has none."
445
+ },
446
+ {
447
+ "subpath": "./node",
448
+ "name": "publicKeyOf",
449
+ "kind": "function",
450
+ "signature": "export declare function publicKeyOf(privateKey: EnvPrivateKey): EnvPublicKey;",
451
+ "jsdocSummary": "The compressed public key of an already validated private key."
452
+ },
453
+ {
454
+ "subpath": "./node",
455
+ "name": "readEnvValue",
456
+ "kind": "function",
457
+ "signature": "export declare function readEnvValue(document: EnvDocument, key: string): string | undefined;",
458
+ "jsdocSummary": "The last value of `key`, or `undefined`."
459
+ },
460
+ {
461
+ "subpath": "./node",
462
+ "name": "ReferenceFailed",
463
+ "kind": "variable",
464
+ "signature": "export declare const ReferenceFailed: import(\"@arki/failure\").FailureDefinition<\"env.reference_failed\", import(\"@standard-schema/spec\").StandardSchemaV1<{ scheme: string; }, { scheme: string; }>>;",
465
+ "jsdocSummary": "A secret provider rejected a read."
466
+ },
467
+ {
468
+ "subpath": "./node",
469
+ "name": "ReferenceOptions",
470
+ "kind": "type",
471
+ "signature": "export type ReferenceOptions = { readonly timeoutMs?: number; readonly signal?: AbortSignal; };",
472
+ "jsdocSummary": "The remaining aggregate budget and cooperative cancellation for a synchronous provider read."
473
+ },
474
+ {
475
+ "subpath": "./node",
476
+ "name": "ReferenceResolver",
477
+ "kind": "type",
478
+ "signature": "export type ReferenceResolver = (reference: string, options?: ReferenceOptions) => ReturnType<typeof runProvider>;",
479
+ "jsdocSummary": "A provider returns its value or the exact owned provider/cancellation/deadline outcomes."
480
+ },
481
+ {
482
+ "subpath": "./node",
483
+ "name": "referenceScheme",
484
+ "kind": "function",
485
+ "signature": "export declare function referenceScheme(value: string, resolvers: Readonly<Record<string, ReferenceResolver>>): string | undefined;",
486
+ "jsdocSummary": "Registered schemes are references; unknown URLs remain plain values."
487
+ },
488
+ {
489
+ "subpath": "./node",
490
+ "name": "removeEnvValue",
491
+ "kind": "function",
492
+ "signature": "export declare function removeEnvValue(text: string, key: string): string;",
493
+ "jsdocSummary": "The text without any assignment of `key`."
494
+ },
495
+ {
496
+ "subpath": "./node",
497
+ "name": "rotateEnvFiles",
498
+ "kind": "function",
499
+ "signature": "export declare function rotateEnvFiles(files: readonly string[], options: { readonly root: string; readonly env?: Readonly<Record<string, string | undefined>>; }): import(\"@arki/failure\").Failure<\"env.decryption_failed\", undefined> | import(\"@arki/failure\").Failure<\"env.encryption_failed\", undefined> | import(\"@arki/failure\").Failure<\"env.file_read_failed\", { file: string; }> | import(\"@arki/failure\").Failure<\"env.file_write_failed\", { file: string; }> | import(\"@arki/failure\").Failure<\"env.key_generation_failed\", undefined> | import(\"@arki/failure\").Failure<\"env.missing_private_key\", { file: string; }> | import(\"@arki/failure\").Failure<\"env.rotation_incomplete\", { keysFile: string; completedFiles: number; totalFiles: number; }> | import(\"@arki/failure\").Failure<\"env.unrepresentable_value\", undefined> | import(\"@arki/failure\").Failure<\"schema.async_required\", undefined> | import(\"@arki/failure\").Failure<\"schema.invalid_input\", { issues: readonly import(\"@standard-schema/spec\").StandardSchemaV1.Issue[]; }> | import(\"@arki/failure\").Failure<\"schema.validator_defect\", undefined> | { privateKeyName: string; files: { file: string; values: number; }[]; keysFile: string; };",
500
+ "jsdocSummary": "Re-encrypt every file of one environment to a new keypair, in one step: decrypt everything first (so a wrong key changes nothing), then write each file, then the new private key. All `files` must share a file name (`.env.production`), because they share a key name."
501
+ },
502
+ {
503
+ "subpath": "./node",
504
+ "name": "RotateResult",
505
+ "kind": "type",
506
+ "signature": "export type RotateResult = { readonly privateKeyName: string; readonly files: readonly { readonly file: string; readonly values: number; }[]; /** Where the new private key was written. */ readonly keysFile: string; };",
507
+ "jsdocSummary": "What `rotateEnvFiles` did."
508
+ },
509
+ {
510
+ "subpath": "./node",
511
+ "name": "RotationIncomplete",
512
+ "kind": "variable",
513
+ "signature": "export declare const RotationIncomplete: import(\"@arki/failure\").FailureDefinition<\"env.rotation_incomplete\", import(\"@standard-schema/spec\").StandardSchemaV1<{ keysFile: string; completedFiles: number; totalFiles: number; }, { keysFile: string; completedFiles: number; totalFiles: number; }>>;",
514
+ "jsdocSummary": "Rotation stopped after its recovery keys were saved."
515
+ },
516
+ {
517
+ "subpath": "./node",
518
+ "name": "secretValues",
519
+ "kind": "function",
520
+ "signature": "export declare function secretValues(): readonly string[];",
521
+ "jsdocSummary": "Every value this process loaded from an encrypted or referenced entry: what log masking hides."
522
+ },
523
+ {
524
+ "subpath": "./node",
525
+ "name": "setEnvFileValue",
526
+ "kind": "function",
527
+ "signature": "export declare function setEnvFileValue(file: string, key: string, value: string, options: { readonly plain: boolean; }): boolean | import(\"@arki/failure\").Failure<\"env.encryption_failed\", undefined> | import(\"@arki/failure\").Failure<\"env.file_read_failed\", { file: string; }> | import(\"@arki/failure\").Failure<\"env.file_write_failed\", { file: string; }> | import(\"@arki/failure\").Failure<\"env.missing_public_key\", { file: string; }> | import(\"@arki/failure\").Failure<\"env.unrepresentable_value\", undefined> | import(\"@arki/failure\").Failure<\"schema.async_required\", undefined> | import(\"@arki/failure\").Failure<\"schema.invalid_input\", { issues: readonly import(\"@standard-schema/spec\").StandardSchemaV1.Issue[]; }> | import(\"@arki/failure\").Failure<\"schema.validator_defect\", undefined>;",
528
+ "jsdocSummary": "Set `key` in `file`, encrypted to the file's public key unless `plain`. Returns `false` when the file already held exactly this plaintext value (an encrypted value is always rewritten, because the same plaintext never encrypts to the same bytes)."
529
+ },
530
+ {
531
+ "subpath": "./node",
532
+ "name": "setEnvValue",
533
+ "kind": "function",
534
+ "signature": "export declare function setEnvValue(text: string, key: string, value: string): string | import(\"@arki/failure\").Failure<\"env.unrepresentable_value\", undefined>;",
535
+ "jsdocSummary": "The text with `key` set to `value`. An existing assignment (the last one) is rewritten in place; a new key is appended. Every other line is kept as written."
536
+ },
537
+ {
538
+ "subpath": "./node",
539
+ "name": "UnrepresentableValue",
540
+ "kind": "variable",
541
+ "signature": "export declare const UnrepresentableValue: import(\"@arki/failure\").FailureDefinition<\"env.unrepresentable_value\", undefined>;",
542
+ "jsdocSummary": "A dotenv value has no lossless quoting."
543
+ },
544
+ {
545
+ "subpath": "./node",
546
+ "name": "writePrivateKey",
547
+ "kind": "function",
548
+ "signature": "export declare function writePrivateKey(keysPath: string, name: string, privateKey: EnvPrivateKey, comment: string, options?: { readonly preserve?: readonly EnvPrivateKey[]; }): import(\"@arki/failure\").Failure<\"env.file_read_failed\", { file: string; }> | import(\"@arki/failure\").Failure<\"env.file_write_failed\", { file: string; }> | import(\"@arki/failure\").Failure<\"env.unrepresentable_value\", undefined> | undefined;",
549
+ "jsdocSummary": "Store `privateKey` under `name` in a keys file, creating it with the dotenvx banner. An existing entry is replaced. The file is left readable by its owner only."
550
+ },
551
+ {
552
+ "subpath": "./presets",
553
+ "name": "commonPresets",
554
+ "kind": "variable",
555
+ "signature": "export declare const commonPresets: { string: (defaultValue?: string) => z.ZodDefault<z.ZodString> | z.ZodString; number: (defaultValue?: number) => z.ZodCoercedNumber<unknown> | z.ZodDefault<z.ZodCoercedNumber<unknown>>; port: (defaultValue?: number) => z.ZodDefault<z.ZodCoercedNumber<unknown>>; nodeEnv: () => z.ZodDefault<z.ZodEnum<{ development: \"development\"; production: \"production\"; test: \"test\"; }>>; boolean: (defaultValue?: boolean) => z.ZodPipe<z.ZodDefault<z.ZodEnum<{ 0: \"0\"; 1: \"1\"; false: \"false\"; true: \"true\"; }>>, z.ZodTransform<boolean, \"0\" | \"1\" | \"false\" | \"true\">>; logLevel: (defaultValue?: 'debug' | 'info' | 'warn' | 'error') => z.ZodDefault<z.ZodEnum<{ debug: \"debug\"; error: \"error\"; info: \"info\"; warn: \"warn\"; }>>; };",
556
+ "jsdocSummary": ""
557
+ },
558
+ {
559
+ "subpath": "./presets",
560
+ "name": "parsePresets",
561
+ "kind": "variable",
562
+ "signature": "export declare const parsePresets: { json: <T extends z.ZodType>(schema: T) => z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<unknown, string>>, T>; csvArray: <T extends z.ZodType>(itemSchema: T) => z.ZodPreprocess<z.ZodArray<T>, unknown>; csvSet: <T extends z.ZodType>(itemSchema: T) => z.ZodPreprocess<z.ZodArray<T>, unknown>; };",
563
+ "jsdocSummary": ""
564
+ },
565
+ {
566
+ "subpath": "./presets",
567
+ "name": "presets",
568
+ "kind": "variable",
569
+ "signature": "export declare const presets: { string: (defaultValue?: string) => import(\"zod\").ZodDefault<import(\"zod\").ZodString> | import(\"zod\").ZodString; number: (defaultValue?: number) => import(\"zod\").ZodCoercedNumber<unknown> | import(\"zod\").ZodDefault<import(\"zod\").ZodCoercedNumber<unknown>>; port: (defaultValue?: number) => import(\"zod\").ZodDefault<import(\"zod\").ZodCoercedNumber<unknown>>; nodeEnv: () => import(\"zod\").ZodDefault<import(\"zod\").ZodEnum<{ development: \"development\"; production: \"production\"; test: \"test\"; }>>; boolean: (defaultValue?: boolean) => import(\"zod\").ZodPipe<import(\"zod\").ZodDefault<import(\"zod\").ZodEnum<{ 0: \"0\"; 1: \"1\"; false: \"false\"; true: \"true\"; }>>, import(\"zod\").ZodTransform<boolean, \"0\" | \"1\" | \"false\" | \"true\">>; logLevel: (defaultValue?: 'debug' | 'info' | 'warn' | 'error') => import(\"zod\").ZodDefault<import(\"zod\").ZodEnum<{ debug: \"debug\"; error: \"error\"; info: \"info\"; warn: \"warn\"; }>>; json: <T extends import(\"zod\").ZodType>(schema: T) => import(\"zod\").ZodPipe<import(\"zod\").ZodPipe<import(\"zod\").ZodString, import(\"zod\").ZodTransform<unknown, string>>, T>; csvArray: <T extends import(\"zod\").ZodType>(itemSchema: T) => import(\"zod\").ZodPreprocess<import(\"zod\").ZodArray<T>, unknown>; csvSet: <T extends import(\"zod\").ZodType>(itemSchema: T) => import(\"zod\").ZodPreprocess<import(\"zod\").ZodArray<T>, unknown>; url: (defaultValue?: string) => import(\"zod\").ZodDefault<import(\"zod\").ZodURL> | import(\"zod\").ZodURL; databaseUrl: () => import(\"zod\").ZodURL; redisUrl: () => import(\"zod\").ZodURL; };",
570
+ "jsdocSummary": ""
571
+ },
572
+ {
573
+ "subpath": "./presets",
574
+ "name": "urlPresets",
575
+ "kind": "variable",
576
+ "signature": "export declare const urlPresets: { url: (defaultValue?: string) => z.ZodDefault<z.ZodURL> | z.ZodURL; databaseUrl: () => z.ZodURL; redisUrl: () => z.ZodURL; };",
577
+ "jsdocSummary": ""
578
+ }
579
+ ],
580
+ "groups": [],
581
+ "errorCodes": [
582
+ "env.cancelled",
583
+ "env.deadline",
584
+ "env.decryption_failed",
585
+ "env.encryption_failed",
586
+ "env.file_read_failed",
587
+ "env.file_write_failed",
588
+ "env.files_failed",
589
+ "env.invalid_environment",
590
+ "env.key_generation_failed",
591
+ "env.missing_private_key",
592
+ "env.missing_public_key",
593
+ "env.reference_failed",
594
+ "env.rotation_incomplete",
595
+ "env.unrepresentable_value"
596
+ ]
597
+ }