@neon/env 1.6.14 → 2.0.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.
- package/README.md +30 -12
- package/dist/cli.js +5 -9
- package/dist/cli.js.map +1 -1
- package/dist/env.js +49 -110
- package/dist/env.js.map +1 -1
- package/dist/index.d.ts +50 -54
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +72 -55
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -2,8 +2,6 @@ import { Config, NeonApi, resolveConfig } from "@neon/config/v1";
|
|
|
2
2
|
|
|
3
3
|
// ../../internals/env-core/dist/env.d.ts
|
|
4
4
|
|
|
5
|
-
// src/env.d.ts
|
|
6
|
-
|
|
7
5
|
declare const NEON_ENV_VAR_KEYS: {
|
|
8
6
|
/**
|
|
9
7
|
* Branch identity. `NEON_BRANCH` carries the branch **name** and is injected into the
|
|
@@ -12,6 +10,13 @@ declare const NEON_ENV_VAR_KEYS: {
|
|
|
12
10
|
*/
|
|
13
11
|
readonly branch: {
|
|
14
12
|
readonly name: "NEON_BRANCH";
|
|
13
|
+
readonly id: "NEON_BRANCH_ID";
|
|
14
|
+
/**
|
|
15
|
+
* Shared by every function on the branch, with a leading dot
|
|
16
|
+
* (`.compute.c-2.us-east-2.aws.neon.tech`). A function's host is
|
|
17
|
+
* `<NEON_BRANCH_ID>-<slug><NEON_FUNCTION_HOST_SUFFIX>`.
|
|
18
|
+
*/
|
|
19
|
+
readonly functionHostSuffix: "NEON_FUNCTION_HOST_SUFFIX";
|
|
15
20
|
};
|
|
16
21
|
readonly postgres: {
|
|
17
22
|
readonly databaseUrl: "DATABASE_URL";
|
|
@@ -51,20 +56,23 @@ declare const NEON_ENV_VAR_KEYS: {
|
|
|
51
56
|
readonly baseUrl: "NEON_AI_GATEWAY_BASE_URL";
|
|
52
57
|
};
|
|
53
58
|
};
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
/** `all-live` lists deployed functions. Policy mode derives declared slugs from the connection host. */
|
|
59
|
+
/**
|
|
60
|
+
* When an unscoped resolve includes `NEON_FUNCTION_HOST_SUFFIX`: `declared` when the policy
|
|
61
|
+
* declares a function, `always` for a branch read without a policy.
|
|
62
|
+
*/
|
|
59
63
|
|
|
60
64
|
/**
|
|
61
65
|
* Branch identity for the resolved branch. Always present on a `fetchEnv` result (the branch
|
|
62
66
|
* name is always known); on a `parseEnv` result it's present only when `NEON_BRANCH` was
|
|
63
67
|
* injected into `process.env` (the Functions runtime injects it by default, as do `neon dev` /
|
|
64
68
|
* `neon-env run` / `env pull`). `name` is the branch **name** (e.g. `main`, `preview/foo`).
|
|
69
|
+
* `id` and `functionHostSuffix` are what `functionBaseUrl` builds a function's URL from; they
|
|
70
|
+
* are absent from env written before they existed.
|
|
65
71
|
*/
|
|
66
72
|
interface NeonBranchEnv {
|
|
67
73
|
name: string;
|
|
74
|
+
id?: string;
|
|
75
|
+
functionHostSuffix?: string;
|
|
68
76
|
}
|
|
69
77
|
/** Per-namespace inner shapes. Exposed so consumers can name the parts independently. */
|
|
70
78
|
interface NeonPostgresEnv {
|
|
@@ -136,9 +144,6 @@ interface NeonAiGatewayEnv {
|
|
|
136
144
|
apiKey: string;
|
|
137
145
|
baseUrl: string;
|
|
138
146
|
}
|
|
139
|
-
interface NeonFunctionUrlEnv {
|
|
140
|
-
baseUrl: string;
|
|
141
|
-
}
|
|
142
147
|
/**
|
|
143
148
|
* Empty record alias used as the "false" branch of the conditional namespace adds below.
|
|
144
149
|
* `Record<never, never>` is the no-op for intersection — the cleaner alternative to `{}`,
|
|
@@ -197,19 +202,6 @@ type RealtimeOn<C extends Config> = [NonNullable<C["preview"]>] extends [never]
|
|
|
197
202
|
realtime: infer R;
|
|
198
203
|
} ? ServiceOn<NonNullable<R>> : false;
|
|
199
204
|
type AiGatewayOn<C extends Config> = OrBool<HasGaToggle<C["aiGateway"]>, HasPreviewAiGateway<C>>;
|
|
200
|
-
/** The tuple guard prevents a missing preview block from enabling functions. */
|
|
201
|
-
type HasPreviewFunctions<C extends Config> = [NonNullable<C["preview"]>] extends [never] ? false : NonNullable<C["preview"]> extends {
|
|
202
|
-
functions: infer F;
|
|
203
|
-
} ? HasKeys<NonNullable<F>> : false;
|
|
204
|
-
type HasFunctions<C extends Config> = OrBool<HasGaRecord<C["functions"]>, HasPreviewFunctions<C>>;
|
|
205
|
-
type GaFunctionsOfConfig<C extends Config> = [NonNullable<C["functions"]>] extends [never] ? Record<never, never> : string extends keyof NonNullable<C["functions"]> ? Record<never, never> : NonNullable<C["functions"]>;
|
|
206
|
-
type PreviewFunctionsOfConfig<C extends Config> = [NonNullable<C["preview"]>] extends [never] ? Record<never, never> : NonNullable<C["preview"]> extends {
|
|
207
|
-
functions: infer F;
|
|
208
|
-
} ? F : Record<never, never>;
|
|
209
|
-
type FunctionsOfConfig<C extends Config> = [keyof GaFunctionsOfConfig<C>] extends [never] ? PreviewFunctionsOfConfig<C> : [keyof PreviewFunctionsOfConfig<C>] extends [never] ? GaFunctionsOfConfig<C> : GaFunctionsOfConfig<C> & PreviewFunctionsOfConfig<C>;
|
|
210
|
-
type FunctionSlugOfConfig<C extends Config> = Extract<keyof FunctionsOfConfig<C>, string>;
|
|
211
|
-
type NeonFunctionsEnv<C extends Config> = { [S in FunctionSlugOfConfig<C>]: NeonFunctionUrlEnv };
|
|
212
|
-
type FunctionBaseUrlKeyOf<C extends Config> = FunctionSlugOfConfig<C> extends infer S ? S extends string ? FunctionBaseUrlKey<S> : never : never;
|
|
213
205
|
/**
|
|
214
206
|
* Static, namespaced shape of `fetchEnv` / `parseEnv`'s return value. Generic over the
|
|
215
207
|
* {@link Config} so the type system knows which optional namespaces are present.
|
|
@@ -224,7 +216,6 @@ type FunctionBaseUrlKeyOf<C extends Config> = FunctionSlugOfConfig<C> extends in
|
|
|
224
216
|
* - `realtime` is added iff `config.preview.realtime` is statically enabled.
|
|
225
217
|
* - `storage` is added iff `config.buckets` (or deprecated `preview.buckets`) declares at least one bucket.
|
|
226
218
|
* - `aiGateway` is added iff `config.aiGateway` (or deprecated `preview.aiGateway`) is statically enabled.
|
|
227
|
-
* - `functions` is added iff `config.functions` (or deprecated `preview.functions`) declares at least one slug.
|
|
228
219
|
*/
|
|
229
220
|
type NeonEnv<C extends Config = Config> = {
|
|
230
221
|
postgres: NeonPostgresEnv;
|
|
@@ -243,8 +234,6 @@ type NeonEnv<C extends Config = Config> = {
|
|
|
243
234
|
storage: NeonStorageEnv;
|
|
244
235
|
} : NoNamespace) & (AiGatewayOn<C> extends true ? {
|
|
245
236
|
aiGateway: NeonAiGatewayEnv;
|
|
246
|
-
} : NoNamespace) & (HasFunctions<C> extends true ? {
|
|
247
|
-
functions: NeonFunctionsEnv<C>;
|
|
248
237
|
} : NoNamespace);
|
|
249
238
|
/**
|
|
250
239
|
* OS-level env-var keys grouped by the {@link NeonEnv} namespace they populate. Only the
|
|
@@ -255,7 +244,7 @@ type NeonEnv<C extends Config = Config> = {
|
|
|
255
244
|
*/
|
|
256
245
|
interface EnvKeysByNamespace {
|
|
257
246
|
postgres: "DATABASE_URL" | "DATABASE_URL_UNPOOLED";
|
|
258
|
-
branch: "NEON_BRANCH";
|
|
247
|
+
branch: "NEON_BRANCH" | "NEON_BRANCH_ID" | "NEON_FUNCTION_HOST_SUFFIX";
|
|
259
248
|
auth: "NEON_AUTH_BASE_URL" | "NEON_AUTH_JWKS_URL";
|
|
260
249
|
dataApi: "NEON_DATA_API_URL";
|
|
261
250
|
realtime: "NEON_REALTIME_URL" | "NEON_REALTIME_SECRET";
|
|
@@ -277,6 +266,8 @@ interface EnvKeyToProp {
|
|
|
277
266
|
DATABASE_URL: "databaseUrl";
|
|
278
267
|
DATABASE_URL_UNPOOLED: "databaseUrlUnpooled";
|
|
279
268
|
NEON_BRANCH: "name";
|
|
269
|
+
NEON_BRANCH_ID: "id";
|
|
270
|
+
NEON_FUNCTION_HOST_SUFFIX: "functionHostSuffix";
|
|
280
271
|
NEON_AUTH_BASE_URL: "baseUrl";
|
|
281
272
|
NEON_AUTH_JWKS_URL: "jwksUrl";
|
|
282
273
|
NEON_DATA_API_URL: "url";
|
|
@@ -295,7 +286,7 @@ interface EnvKeyToProp {
|
|
|
295
286
|
* `keys` filter — selecting a var from a namespace the policy does not enable is a type error
|
|
296
287
|
* (e.g. `NEON_AUTH_BASE_URL` is only offered once the policy turns on `auth`).
|
|
297
288
|
*/
|
|
298
|
-
type SelectableEnvKey<C extends Config> = EnvKeysByNamespace[keyof NeonEnv<C> & keyof EnvKeysByNamespace]
|
|
289
|
+
type SelectableEnvKey<C extends Config> = EnvKeysByNamespace[keyof NeonEnv<C> & keyof EnvKeysByNamespace];
|
|
299
290
|
/**
|
|
300
291
|
* The result shape of a **filtered** `parseEnv(config, keys)` call: the namespaced
|
|
301
292
|
* {@link NeonEnv} restricted to exactly the selected OS-level keys `K`. Namespaces with no
|
|
@@ -311,21 +302,13 @@ type SelectableEnvKey<C extends Config> = EnvKeysByNamespace[keyof NeonEnv<C> &
|
|
|
311
302
|
* camelCase property and looks the value type up on the canonical namespace interface, so it
|
|
312
303
|
* stays correct if a field ever stops being a plain `string`.
|
|
313
304
|
*/
|
|
314
|
-
type
|
|
315
|
-
type FunctionSlugFromKey<K extends string> = K extends `NEON_FUNCTION_${infer S}_BASE_URL` ? Lowercase<S> : never;
|
|
316
|
-
type FunctionsFilteredEnv<K extends string> = [SelectedFunctionKeys<K>] extends [never] ? unknown : {
|
|
317
|
-
functions: { [P in SelectedFunctionKeys<K> as FunctionSlugFromKey<P>]: NeonFunctionUrlEnv };
|
|
318
|
-
};
|
|
319
|
-
type OptionalFunctionsFilteredEnv<K extends string> = [SelectedFunctionKeys<K>] extends [never] ? unknown : {
|
|
320
|
-
functions?: { [P in SelectedFunctionKeys<K> as FunctionSlugFromKey<P>]?: NeonFunctionUrlEnv };
|
|
321
|
-
};
|
|
322
|
-
type FilteredNeonEnv<K extends string> = { [N in keyof EnvKeysByNamespace as [Extract<K, EnvKeysByNamespace[N]>] extends [never] ? never : N]: { [P in Extract<K, EnvKeysByNamespace[N]> as EnvKeyToProp[P & keyof EnvKeyToProp]]: NamespaceEnv[N][EnvKeyToProp[P & keyof EnvKeyToProp] & keyof NamespaceEnv[N]] } } & FunctionsFilteredEnv<K>;
|
|
305
|
+
type FilteredNeonEnv<K extends string> = { [N in keyof EnvKeysByNamespace as [Extract<K, EnvKeysByNamespace[N]>] extends [never] ? never : N]: { [P in Extract<K, EnvKeysByNamespace[N]> as EnvKeyToProp[P & keyof EnvKeyToProp]]: NonNullable<NamespaceEnv[N][EnvKeyToProp[P & keyof EnvKeyToProp] & keyof NamespaceEnv[N]]> } };
|
|
323
306
|
/**
|
|
324
307
|
* A filtered result when the exact runtime contents of a key array are unknown. Both the
|
|
325
308
|
* namespace and its selected properties are optional because the array may omit any member of
|
|
326
309
|
* its element union, or be empty.
|
|
327
310
|
*/
|
|
328
|
-
type OptionalFilteredNeonEnv<K extends string> = { [N in keyof EnvKeysByNamespace as [Extract<K, EnvKeysByNamespace[N]>] extends [never] ? never : N]?: { [P in Extract<K, EnvKeysByNamespace[N]> as EnvKeyToProp[P & keyof EnvKeyToProp]]?: NamespaceEnv[N][EnvKeyToProp[P & keyof EnvKeyToProp] & keyof NamespaceEnv[N]] } }
|
|
311
|
+
type OptionalFilteredNeonEnv<K extends string> = { [N in keyof EnvKeysByNamespace as [Extract<K, EnvKeysByNamespace[N]>] extends [never] ? never : N]?: { [P in Extract<K, EnvKeysByNamespace[N]> as EnvKeyToProp[P & keyof EnvKeyToProp]]?: NamespaceEnv[N][EnvKeyToProp[P & keyof EnvKeyToProp] & keyof NamespaceEnv[N]] } };
|
|
329
312
|
/** Whether `T` is a union rather than one concrete type. */
|
|
330
313
|
type IsUnion<T, Whole = T> = T extends Whole ? [Whole] extends [T] ? false : true : never;
|
|
331
314
|
/** Whether any fixed tuple position can hold more than one key at runtime. */
|
|
@@ -495,9 +478,32 @@ declare function toEntries(env: ResolvedNeonEnv): Record<string, string>;
|
|
|
495
478
|
* property is optional so a filtered result — which legitimately carries only what was asked
|
|
496
479
|
* for — projects to exactly the vars it holds instead of failing to type-check.
|
|
497
480
|
*/
|
|
498
|
-
type ResolvedNeonEnv = { [N in keyof NamespaceEnv]?: Partial<NamespaceEnv[N]> }
|
|
499
|
-
|
|
500
|
-
|
|
481
|
+
type ResolvedNeonEnv = { [N in keyof NamespaceEnv]?: Partial<NamespaceEnv[N]> };
|
|
482
|
+
/**
|
|
483
|
+
* `functionBaseUrl` — the URL another Neon Function on the same branch answers at, built from
|
|
484
|
+
* the variables the Functions runtime injects into every function, so a deployed function needs
|
|
485
|
+
* no extra env. `neon env pull` writes the same variables locally and `neon dev` adds the
|
|
486
|
+
* localhost port of each function it serves.
|
|
487
|
+
*/
|
|
488
|
+
/** The variables {@link functionBaseUrl} reads. `process.env` satisfies it. */
|
|
489
|
+
type FunctionBaseUrlEnv = Readonly<Record<string, string | undefined>>;
|
|
490
|
+
/**
|
|
491
|
+
* The base URL of function `slug` on the current branch, without a trailing slash:
|
|
492
|
+
* `https://<NEON_BRANCH_ID>-<slug><NEON_FUNCTION_HOST_SUFFIX>`, or `http://localhost:<port>`
|
|
493
|
+
* when `neon dev` serves that function.
|
|
494
|
+
*
|
|
495
|
+
* @example
|
|
496
|
+
* ```ts
|
|
497
|
+
* import { functionBaseUrl } from "@neon/env";
|
|
498
|
+
*
|
|
499
|
+
* const res = await fetch(`${functionBaseUrl("hello")}/greet`);
|
|
500
|
+
* ```
|
|
501
|
+
*
|
|
502
|
+
* @throws {TypeError} when `slug` is not a valid function slug (`[a-z0-9]{1,20}`).
|
|
503
|
+
* @throws {PlatformError} `PLATFORM_ENV_NOT_INJECTED` when the variables are missing or do
|
|
504
|
+
* not form a valid hostname.
|
|
505
|
+
*/
|
|
506
|
+
declare function functionBaseUrl(slug: string, env?: FunctionBaseUrlEnv): string;
|
|
501
507
|
/** The static `functions` record of a config (GA or deprecated `preview.functions`). */
|
|
502
508
|
type GaFunctionsOf<C extends Config> = [NonNullable<C["functions"]>] extends [never] ? Record<never, never> : string extends keyof NonNullable<C["functions"]> ? Record<never, never> : NonNullable<C["functions"]>;
|
|
503
509
|
type PreviewFunctionsHome<C extends Config> = [NonNullable<C["preview"]>] extends [never] ? Record<never, never> : NonNullable<C["preview"]> extends {
|
|
@@ -531,16 +537,6 @@ type FunctionEnvKeysOf<C extends Config, S extends string> = S extends keyof Pre
|
|
|
531
537
|
* The extra `function` namespace added to `parseEnv`'s result when called with a function
|
|
532
538
|
* slug scope: the declared env-var keys for that function, each resolved to a `string`.
|
|
533
539
|
*/
|
|
534
|
-
/**
|
|
535
|
-
* What `parseEnv` returns without a key filter: {@link NeonEnv} with `functions` optional,
|
|
536
|
-
* because the deployed Functions runtime does not inject `NEON_FUNCTION_<SLUG>_BASE_URL`.
|
|
537
|
-
* Select the key (`parseEnv(config, ["NEON_FUNCTION_HELLO_BASE_URL"])`) to require it.
|
|
538
|
-
*/
|
|
539
|
-
type ParsedNeonEnv<C extends Config> = NeonEnv<C> extends {
|
|
540
|
-
functions: infer F;
|
|
541
|
-
} ? Omit<NeonEnv<C>, "functions"> & {
|
|
542
|
-
functions?: F;
|
|
543
|
-
} : NeonEnv<C>;
|
|
544
540
|
type NeonFunctionEnv<C extends Config, S extends string> = {
|
|
545
541
|
function: Record<FunctionEnvKeysOf<C, S>, string>;
|
|
546
542
|
};
|
|
@@ -593,8 +589,8 @@ type NeonFunctionEnv<C extends Config, S extends string> = {
|
|
|
593
589
|
* postgres.databaseUrl; // string — `databaseUrlUnpooled` is absent
|
|
594
590
|
* ```
|
|
595
591
|
*/
|
|
596
|
-
declare function parseEnv<const C extends Config>(config: C):
|
|
597
|
-
declare function parseEnv<const C extends Config, const S extends FunctionSlugOf<C>>(config: C, scope: FunctionScopeField<C, S>):
|
|
592
|
+
declare function parseEnv<const C extends Config>(config: C): NeonEnv<C>;
|
|
593
|
+
declare function parseEnv<const C extends Config, const S extends FunctionSlugOf<C>>(config: C, scope: FunctionScopeField<C, S>): NeonEnv<C> & NeonFunctionEnv<C, S>;
|
|
598
594
|
declare function parseEnv<const C extends Config, const K extends SelectableEnvKey<C>>(config: C, keys: readonly K[]): FilteredNeonEnv<K>;
|
|
599
|
-
export { type FetchEnvOptions, type FilteredNeonEnv, type
|
|
595
|
+
export { type FetchEnvOptions, type FilteredNeonEnv, type FunctionBaseUrlEnv, type FunctionSlugOf, NEON_ENV_VAR_KEYS, type NeonAiGatewayEnv, type NeonAuthEnv, type NeonBranchEnv, type NeonDataApiEnv, type NeonEnv, type NeonFunctionEnv, type NeonPostgresEnv, type NeonRealtimeEnv, type NeonStorageEnv, type ResolvedNeonEnv, type SelectableEnvKey, type SelectedNeonEnv, fetchEnv, functionBaseUrl, parseEnv, toEntries };
|
|
600
596
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":["Config","CredentialScope","NeonApi","NeonBranchSnapshot","NeonCredentialMeta","ResolvedPreviewConfig","resolveConfig","NEON_ENV_VAR_KEYS","FunctionBaseUrlKey","Slug","Uppercase","functionBaseUrlKey","S","parseFunctionBaseUrlKey","isFunctionBaseUrlKey","FunctionUrlMode","NeonBranchEnv","NeonPostgresEnv","NeonAuthEnv","NeonDataApiEnv","NeonRealtimeEnv","NeonStorageEnv","NeonAiGatewayEnv","NeonFunctionUrlEnv","NoNamespace","Record","ServiceOn","T","HasKeys","OrBool","A","B","HasGaRecord","NonNullable","HasGaToggle","HasPreviewBuckets","C","HasBuckets","HasPreviewAiGateway","RealtimeOn","R","AiGatewayOn","HasPreviewFunctions","F","HasFunctions","GaFunctionsOfConfig","PreviewFunctionsOfConfig","FunctionsOfConfig","FunctionSlugOfConfig","Extract","NeonFunctionsEnv","FunctionBaseUrlKeyOf","NeonEnv","EnvKeysByNamespace","NamespaceEnv","EnvKeyToProp","SelectableEnvKey","SelectedFunctionKeys","K","FunctionSlugFromKey","Lowercase","FunctionsFilteredEnv","P","OptionalFunctionsFilteredEnv","FilteredNeonEnv","N","OptionalFilteredNeonEnv","IsUnion","Whole","TupleHasUnion","Head","Tail","SelectedNeonEnv","Keys","StorageCredentialEnvKey","StorageKeyPairError","TupleDefinitelyContains","Key","TupleDefinitelyContainsStoragePair","InvalidStorageKeyTuple","StorageKeyPairConstraint","FetchEnvKeysFromArgs","Args","StorageKeyPairArgsConstraint","StorageKeyUnionConstraint","FetchEnvOptions","fetchEnv","NoInfer","Promise","fetchEnvKeys","FetchEnvKeysOptions","ResolvedNeonEnv","FetchEnvKeysState","ReadonlyArray","fetchEnvKeysState","BranchPolicy","ReturnType","resolveBranchPolicy","Pick","previewCredentialScopes","credentialName","credentialEnvKeys","policyEnvKeys","isLiveCredential","defaultStorageCredential","defaultAiGatewayCredential","createApiFromOptions","toEntries","Partial","Config","FilteredNeonEnv","NeonEnv","SelectableEnvKey","GaFunctionsOf","C","NonNullable","Record","PreviewFunctionsHome","F","PreviewFunctionsOf","FunctionSlugOf","Extract","NoFunctionScopeHint","FunctionScopeField","S","FunctionEnvKeysOf","E","ParsedNeonEnv","Omit","NeonFunctionEnv","parseEnv","K","Config","NeonApi","resolveConfig","NEON_ENV_VAR_KEYS","branch","name","postgres","databaseUrl","databaseUrlUnpooled","auth","baseUrl","jwksUrl","dataApi","url","realtime","secret","storage","accessKeyId","secretAccessKey","endpoint","region","aiGateway","apiKey","FunctionBaseUrlKey","Uppercase","Slug","functionBaseUrlKey","slug","S","parseFunctionBaseUrlKey","key","isFunctionBaseUrlKey","NeonBranchEnv","NeonPostgresEnv","NeonAuthEnv","NeonDataApiEnv","NeonRealtimeEnv","NeonStorageEnv","NeonAiGatewayEnv","NeonFunctionUrlEnv","NoNamespace","Record","ServiceOn","T","enabled","HasKeys","OrBool","A","B","HasGaRecord","NonNullable","HasGaToggle","HasPreviewBuckets","C","buckets","HasBuckets","HasPreviewAiGateway","RealtimeOn","R","AiGatewayOn","HasPreviewFunctions","functions","F","HasFunctions","GaFunctionsOfConfig","PreviewFunctionsOfConfig","FunctionsOfConfig","FunctionSlugOfConfig","Extract","NeonFunctionsEnv","FunctionBaseUrlKeyOf","NeonEnv","EnvKeysByNamespace","NamespaceEnv","EnvKeyToProp","DATABASE_URL","DATABASE_URL_UNPOOLED","NEON_BRANCH","NEON_AUTH_BASE_URL","NEON_AUTH_JWKS_URL","NEON_DATA_API_URL","NEON_REALTIME_URL","NEON_REALTIME_SECRET","AWS_ACCESS_KEY_ID","AWS_SECRET_ACCESS_KEY","AWS_ENDPOINT_URL_S3","AWS_REGION","NEON_AI_GATEWAY_TOKEN","NEON_AI_GATEWAY_BASE_URL","SelectableEnvKey","SelectedFunctionKeys","K","FunctionSlugFromKey","Lowercase","FunctionsFilteredEnv","P","OptionalFunctionsFilteredEnv","FilteredNeonEnv","N","OptionalFilteredNeonEnv","IsUnion","Whole","TupleHasUnion","Head","Tail","SelectedNeonEnv","Keys","StorageCredentialEnvKey","StorageKeyPairError","TupleDefinitelyContains","Key","TupleDefinitelyContainsStoragePair","InvalidStorageKeyTuple","StorageKeyPairConstraint","FetchEnvKeysFromArgs","Args","keys","StorageKeyPairArgsConstraint","StorageKeyUnionConstraint","FetchEnvOptions","projectId","branchId","apiHost","api","roleName","databaseName","fetchEnv","options","config","args","NoInfer","Promise","toEntries","env","ResolvedNeonEnv","Partial","GaFunctionsOf","PreviewFunctionsHome","PreviewFunctionsOf","FunctionSlugOf","NoFunctionScopeHint","FunctionScopeField","FunctionEnvKeysOf","E","ParsedNeonEnv","Omit","NeonFunctionEnv","function","parseEnv","scope"],"sources":["../../../internals/env-core/dist/env.d.ts","../src/lib/parse-env.ts"],"sourcesContent":["import { Config, CredentialScope, NeonApi, NeonBranchSnapshot, NeonCredentialMeta, ResolvedPreviewConfig, resolveConfig } from \"@neon/config/v1\";\n\n// src/env.d.ts\n\ndeclare const NEON_ENV_VAR_KEYS: {\n /**\n * Branch identity. `NEON_BRANCH` carries the branch **name** and is injected into the\n * Neon Functions runtime on every branch (including the default) by default. `env pull` /\n * `neon dev` / `neon-env run` emit it too so local dev mirrors the deployed runtime.\n */\n readonly branch: {\n readonly name: \"NEON_BRANCH\";\n };\n readonly postgres: {\n readonly databaseUrl: \"DATABASE_URL\";\n readonly databaseUrlUnpooled: \"DATABASE_URL_UNPOOLED\";\n };\n readonly auth: {\n readonly baseUrl: \"NEON_AUTH_BASE_URL\";\n readonly jwksUrl: \"NEON_AUTH_JWKS_URL\";\n };\n readonly dataApi: {\n readonly url: \"NEON_DATA_API_URL\";\n };\n readonly realtime: {\n readonly url: \"NEON_REALTIME_URL\";\n readonly secret: \"NEON_REALTIME_SECRET\";\n };\n /**\n * Object storage (Preview). The S3 SDKs read `AWS_*` from their standard config chain, so\n * a branch credential + `neon dev` / `env pull` makes object storage work from env alone.\n * `region` is injected under the SDK-standard `AWS_REGION`.\n */\n readonly storage: {\n readonly accessKeyId: \"AWS_ACCESS_KEY_ID\";\n readonly secretAccessKey: \"AWS_SECRET_ACCESS_KEY\";\n readonly endpoint: \"AWS_ENDPOINT_URL_S3\";\n readonly region: \"AWS_REGION\";\n };\n /**\n * AI Gateway (Preview). Exposed under the Neon-branded env vars the deployed Functions\n * runtime injects: `apiKey` is the minted credential's bearer (`NEON_AI_GATEWAY_TOKEN`)\n * and `baseUrl` is the bare branch gateway host (`NEON_AI_GATEWAY_BASE_URL`,\n * `scheme://host`, no path). Clients like `@neon/ai-sdk-provider` read these and append the\n * dialect route (`/v1`, `/openai/v1`, `/anthropic/v1`) themselves (https://github.com/vercel/ai/pull/15997).\n */\n readonly aiGateway: {\n readonly apiKey: \"NEON_AI_GATEWAY_TOKEN\";\n readonly baseUrl: \"NEON_AI_GATEWAY_BASE_URL\";\n };\n};\ntype FunctionBaseUrlKey<Slug extends string = string> = `NEON_FUNCTION_${Uppercase<Slug>}_BASE_URL`;\ndeclare function functionBaseUrlKey<S extends string>(slug: S): FunctionBaseUrlKey<S>;\ndeclare function parseFunctionBaseUrlKey(key: string): string | null;\ndeclare function isFunctionBaseUrlKey(key: string): key is FunctionBaseUrlKey;\n/** `all-live` lists deployed functions. Policy mode derives declared slugs from the connection host. */\ntype FunctionUrlMode = \"policy\" | \"all-live\";\n/**\n * Branch identity for the resolved branch. Always present on a `fetchEnv` result (the branch\n * name is always known); on a `parseEnv` result it's present only when `NEON_BRANCH` was\n * injected into `process.env` (the Functions runtime injects it by default, as do `neon dev` /\n * `neon-env run` / `env pull`). `name` is the branch **name** (e.g. `main`, `preview/foo`).\n */\ninterface NeonBranchEnv {\n name: string;\n}\n/** Per-namespace inner shapes. Exposed so consumers can name the parts independently. */\ninterface NeonPostgresEnv {\n /**\n * Pooled connection string (via Neon's PgBouncer pooler). The right default for\n * serverless drivers (`@neondatabase/serverless`, edge runtimes, Postgres.js, …).\n */\n databaseUrl: string;\n /**\n * Direct (unpooled) connection string. Use this when you need session-level\n * features (`LISTEN`/`NOTIFY`, prepared statements across calls, transactions\n * spanning round-trips) that PgBouncer's transaction-mode pooling drops.\n */\n databaseUrlUnpooled: string;\n}\n/**\n * Bits of a Neon Auth integration for the resolved branch. Only present on `NeonEnv`\n * when the branch policy enables `auth`.\n *\n * Neon Auth exposes the `baseUrl` (which doubles as the publishable client identifier) and\n * the `jwksUrl` used to verify tokens it issues. `fetchEnv` reads both from the live\n * integration; `parseEnv` reads them from `process.env` (`NEON_AUTH_BASE_URL` /\n * `NEON_AUTH_JWKS_URL`).\n */\ninterface NeonAuthEnv {\n baseUrl: string;\n /** JWKS URL for verifying tokens issued by Neon Auth (`NEON_AUTH_JWKS_URL`). */\n jwksUrl: string;\n}\n/** Bits of a Neon Data API integration. Only present when the branch policy enables it. */\ninterface NeonDataApiEnv {\n url: string;\n}\n/** Connection values for a branch with Realtime enabled. */\ninterface NeonRealtimeEnv {\n /** WebSocket endpoint passed to `createRealtimeClient`. */\n url: string;\n /** Server-only key passed to `createRealtime`. Never expose it to browser code. */\n secret: string;\n}\n/**\n * S3-compatible object-storage access for the branch. Present on `NeonEnv` only\n * when the policy declares `buckets` (or deprecated `preview.buckets`). Combines a minted branch credential's access\n * keys (`accessKeyId` = the credential's full token id, e.g. `nak_live_…`, which is what the\n * storage gateway authenticates against; `secretAccessKey` = its\n * `s3_secret_access_key`) with the branch's non-secret connection details\n * (`endpoint`/`region`, from `GET .../storage`). Projects to the AWS SDK's\n * standard config env (`AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `AWS_ENDPOINT_URL_S3`,\n * `AWS_REGION`) so the S3 client works from env alone. Neon's storage gateway always\n * requires path-style addressing, so set `forcePathStyle: true` on your S3 client.\n */\ninterface NeonStorageEnv {\n accessKeyId: string;\n secretAccessKey: string;\n /** S3-compatible endpoint URL for the branch. */\n endpoint: string;\n /** AWS region string (e.g. `us-east-2`). Injected as `AWS_REGION`. */\n region: string;\n}\n/**\n * AI Gateway access for the branch. Present on `NeonEnv` only when the policy\n * enables `aiGateway` (or deprecated `preview.aiGateway`). `apiKey` is the minted credential's bearer (`api_token`);\n * `baseUrl` is the bare branch-scoped gateway host\n * (`https://<branchId>-api.ai.<region>.…`, no path). Projects to the Neon-branded env\n * (`NEON_AI_GATEWAY_TOKEN`, `NEON_AI_GATEWAY_BASE_URL`); clients like `@neon/ai-sdk-provider`\n * append the dialect route (`/v1`, `/openai/v1`, `/anthropic/v1`) themselves.\n */\ninterface NeonAiGatewayEnv {\n apiKey: string;\n baseUrl: string;\n}\ninterface NeonFunctionUrlEnv {\n baseUrl: string;\n}\n/**\n * Empty record alias used as the \"false\" branch of the conditional namespace adds below.\n * `Record<never, never>` is the no-op for intersection — the cleaner alternative to `{}`,\n * which biome rejects (it means \"any non-null\", not \"empty object\").\n */\ntype NoNamespace = Record<never, never>;\n/**\n * Resolve a **static** service toggle (the value of `config.auth` / `config.dataApi`) to a\n * type-level boolean. The whole-thing wrapping (`[T] extends […]`) turns off distribution\n * so a union/`undefined` is checked as one unit:\n *\n * - `false` / `{ enabled: false }` / `undefined` → `false`\n * - `true` / `{ enabled: true }` / any other object (`{}`, `{ enabled?: boolean }`) → `true`\n * (a present toggle defaults to enabled)\n * - the bare `boolean | ServiceToggle | undefined` (the default `Config` param, no literal\n * info) → `false`, so an untyped policy yields just `{ postgres }`.\n */\ntype ServiceOn<T> = [T] extends [false] ? false : [T] extends [{\n enabled: false;\n}] ? false : [T] extends [undefined] ? false : [T] extends [true] ? true : [T] extends [{\n enabled: true;\n}] ? true : [T] extends [object] ? true : false;\n/** True when `T` has at least one known key; `false` for `{}` / `never`. */\ntype HasKeys<T> = [keyof T] extends [never] ? false : true;\ntype OrBool<A extends boolean, B extends boolean> = A extends true ? true : B;\n/**\n * Whether a top-level optional record (GA `functions` / `buckets`) has known keys.\n * A string index signature (`Record<string, …>`, the default `Config` param) is treated\n * as empty so an untyped policy yields just `{ postgres }`, matching {@link HasPreviewBuckets}.\n */\ntype HasGaRecord<T> = [NonNullable<T>] extends [never] ? false : string extends keyof NonNullable<T> ? false : HasKeys<NonNullable<T>>;\ntype HasGaToggle<T> = [NonNullable<T>] extends [never] ? false : ServiceOn<NonNullable<T>>;\n/**\n * Whether the policy declares at least one object-storage bucket (`buckets` or\n * deprecated `preview.buckets`). Drives whether {@link NeonEnv} carries the `storage`\n * namespace.\n *\n * The leading `[never]` guard is load-bearing: when a policy has no `preview` at all,\n * `NonNullable<C[\"preview\"]>` is `never`, and without the guard the `extends { … }` probe\n * below would vacuously match (everything extends `never`-derived shapes) and `HasKeys<never>`\n * would resolve `true`, wrongly adding the namespace. The guard short-circuits to `false`.\n */\ntype HasPreviewBuckets<C extends Config> = [NonNullable<C[\"preview\"]>] extends [never] ? false : NonNullable<C[\"preview\"]> extends {\n buckets: infer B;\n} ? HasKeys<NonNullable<B>> : false;\ntype HasBuckets<C extends Config> = OrBool<HasGaRecord<C[\"buckets\"]>, HasPreviewBuckets<C>>;\n/**\n * Whether the policy enables the AI Gateway (`aiGateway` or deprecated `preview.aiGateway`).\n * Drives whether {@link NeonEnv} carries the `aiGateway` namespace.\n */\ntype HasPreviewAiGateway<C extends Config> = [NonNullable<C[\"preview\"]>] extends [never] ? false : NonNullable<C[\"preview\"]> extends {\n aiGateway: infer A;\n} ? ServiceOn<NonNullable<A>> : false;\n/** Whether the policy statically enables Realtime under `preview.realtime`. */\ntype RealtimeOn<C extends Config> = [NonNullable<C[\"preview\"]>] extends [never] ? false : NonNullable<C[\"preview\"]> extends {\n realtime: infer R;\n} ? ServiceOn<NonNullable<R>> : false;\ntype AiGatewayOn<C extends Config> = OrBool<HasGaToggle<C[\"aiGateway\"]>, HasPreviewAiGateway<C>>;\n/** The tuple guard prevents a missing preview block from enabling functions. */\ntype HasPreviewFunctions<C extends Config> = [NonNullable<C[\"preview\"]>] extends [never] ? false : NonNullable<C[\"preview\"]> extends {\n functions: infer F;\n} ? HasKeys<NonNullable<F>> : false;\ntype HasFunctions<C extends Config> = OrBool<HasGaRecord<C[\"functions\"]>, HasPreviewFunctions<C>>;\ntype GaFunctionsOfConfig<C extends Config> = [NonNullable<C[\"functions\"]>] extends [never] ? Record<never, never> : string extends keyof NonNullable<C[\"functions\"]> ? Record<never, never> : NonNullable<C[\"functions\"]>;\ntype PreviewFunctionsOfConfig<C extends Config> = [NonNullable<C[\"preview\"]>] extends [never] ? Record<never, never> : NonNullable<C[\"preview\"]> extends {\n functions: infer F;\n} ? F : Record<never, never>;\ntype FunctionsOfConfig<C extends Config> = [keyof GaFunctionsOfConfig<C>] extends [never] ? PreviewFunctionsOfConfig<C> : [keyof PreviewFunctionsOfConfig<C>] extends [never] ? GaFunctionsOfConfig<C> : GaFunctionsOfConfig<C> & PreviewFunctionsOfConfig<C>;\ntype FunctionSlugOfConfig<C extends Config> = Extract<keyof FunctionsOfConfig<C>, string>;\ntype NeonFunctionsEnv<C extends Config> = { [S in FunctionSlugOfConfig<C>]: NeonFunctionUrlEnv };\ntype FunctionBaseUrlKeyOf<C extends Config> = FunctionSlugOfConfig<C> extends infer S ? S extends string ? FunctionBaseUrlKey<S> : never : never;\n/**\n * Static, namespaced shape of `fetchEnv` / `parseEnv`'s return value. Generic over the\n * {@link Config} so the type system knows which optional namespaces are present.\n *\n * Because the secret-bearing toggles live in the **static** config (not inside a per-branch\n * closure), namespace presence is a direct read of those fields — no union-across-branches,\n * no default-config escape hatch:\n *\n * - `postgres` is always present.\n * - `auth` is added iff `config.auth` is statically enabled.\n * - `dataApi` is added iff `config.dataApi` is statically enabled.\n * - `realtime` is added iff `config.preview.realtime` is statically enabled.\n * - `storage` is added iff `config.buckets` (or deprecated `preview.buckets`) declares at least one bucket.\n * - `aiGateway` is added iff `config.aiGateway` (or deprecated `preview.aiGateway`) is statically enabled.\n * - `functions` is added iff `config.functions` (or deprecated `preview.functions`) declares at least one slug.\n */\ntype NeonEnv<C extends Config = Config> = {\n postgres: NeonPostgresEnv;\n /**\n * Branch identity (`NEON_BRANCH`). Optional because `parseEnv` only surfaces it when the\n * var was injected; `fetchEnv` always populates it.\n */\n branch?: NeonBranchEnv;\n} & (ServiceOn<NonNullable<C[\"auth\"]>> extends true ? {\n auth: NeonAuthEnv;\n} : NoNamespace) & (ServiceOn<NonNullable<C[\"dataApi\"]>> extends true ? {\n dataApi: NeonDataApiEnv;\n} : NoNamespace) & (RealtimeOn<C> extends true ? {\n realtime: NeonRealtimeEnv;\n} : NoNamespace) & (HasBuckets<C> extends true ? {\n storage: NeonStorageEnv;\n} : NoNamespace) & (AiGatewayOn<C> extends true ? {\n aiGateway: NeonAiGatewayEnv;\n} : NoNamespace) & (HasFunctions<C> extends true ? {\n functions: NeonFunctionsEnv<C>;\n} : NoNamespace);\n/**\n * OS-level env-var keys grouped by the {@link NeonEnv} namespace they populate. Only the\n * **input** vars `parseEnv` validates are listed — the output-only aliases in\n * {@link NEON_ENV_VAR_KEYS} (`NEON_AI_GATEWAY_TOKEN`, …) are intentionally absent, so they\n * are not selectable in a `parseEnv(config, keys)` filter. Keep in sync with\n * {@link EnvKeyToProp}.\n */\ninterface EnvKeysByNamespace {\n postgres: \"DATABASE_URL\" | \"DATABASE_URL_UNPOOLED\";\n branch: \"NEON_BRANCH\";\n auth: \"NEON_AUTH_BASE_URL\" | \"NEON_AUTH_JWKS_URL\";\n dataApi: \"NEON_DATA_API_URL\";\n realtime: \"NEON_REALTIME_URL\" | \"NEON_REALTIME_SECRET\";\n storage: \"AWS_ACCESS_KEY_ID\" | \"AWS_SECRET_ACCESS_KEY\" | \"AWS_ENDPOINT_URL_S3\" | \"AWS_REGION\";\n aiGateway: \"NEON_AI_GATEWAY_TOKEN\" | \"NEON_AI_GATEWAY_BASE_URL\";\n}\n/** The {@link NeonEnv} namespace interface backing each namespace key. */\ninterface NamespaceEnv {\n postgres: NeonPostgresEnv;\n branch: NeonBranchEnv;\n auth: NeonAuthEnv;\n dataApi: NeonDataApiEnv;\n realtime: NeonRealtimeEnv;\n storage: NeonStorageEnv;\n aiGateway: NeonAiGatewayEnv;\n}\n/** OS-level env-var key → the camelCase property it sets on its namespace object. */\ninterface EnvKeyToProp {\n DATABASE_URL: \"databaseUrl\";\n DATABASE_URL_UNPOOLED: \"databaseUrlUnpooled\";\n NEON_BRANCH: \"name\";\n NEON_AUTH_BASE_URL: \"baseUrl\";\n NEON_AUTH_JWKS_URL: \"jwksUrl\";\n NEON_DATA_API_URL: \"url\";\n NEON_REALTIME_URL: \"url\";\n NEON_REALTIME_SECRET: \"secret\";\n AWS_ACCESS_KEY_ID: \"accessKeyId\";\n AWS_SECRET_ACCESS_KEY: \"secretAccessKey\";\n AWS_ENDPOINT_URL_S3: \"endpoint\";\n AWS_REGION: \"region\";\n NEON_AI_GATEWAY_TOKEN: \"apiKey\";\n NEON_AI_GATEWAY_BASE_URL: \"baseUrl\";\n}\n/**\n * The OS-level env-var keys selectable for a given policy: the union of input vars across\n * exactly the namespaces {@link NeonEnv}<C> carries. Drives the typesafe autocomplete of the\n * `keys` filter — selecting a var from a namespace the policy does not enable is a type error\n * (e.g. `NEON_AUTH_BASE_URL` is only offered once the policy turns on `auth`).\n */\ntype SelectableEnvKey<C extends Config> = EnvKeysByNamespace[keyof NeonEnv<C> & keyof EnvKeysByNamespace] | FunctionBaseUrlKeyOf<C>;\n/**\n * The result shape of a **filtered** `parseEnv(config, keys)` call: the namespaced\n * {@link NeonEnv} restricted to exactly the selected OS-level keys `K`. Namespaces with no\n * selected key are dropped, and within a kept namespace only the selected properties survive\n * — selecting just `[\"DATABASE_URL\"]` yields `{ postgres: { databaseUrl: string } }`, with no\n * `databaseUrlUnpooled`.\n *\n * The policy gating lives on the `parseEnv` overload (which binds `K` to\n * {@link SelectableEnvKey}); this type only needs the selection, so it takes a bare\n * `K extends string` and filters with `Extract`. The outer mapped type's `as` clause drops\n * any namespace whose intersection with the selection is empty (`[…] extends [never]`,\n * tuple-wrapped to switch off distribution); the inner one re-keys each selected OS var to its\n * camelCase property and looks the value type up on the canonical namespace interface, so it\n * stays correct if a field ever stops being a plain `string`.\n */\ntype SelectedFunctionKeys<K extends string> = Extract<K, FunctionBaseUrlKey>;\ntype FunctionSlugFromKey<K extends string> = K extends `NEON_FUNCTION_${infer S}_BASE_URL` ? Lowercase<S> : never;\ntype FunctionsFilteredEnv<K extends string> = [SelectedFunctionKeys<K>] extends [never] ? unknown : {\n functions: { [P in SelectedFunctionKeys<K> as FunctionSlugFromKey<P>]: NeonFunctionUrlEnv };\n};\ntype OptionalFunctionsFilteredEnv<K extends string> = [SelectedFunctionKeys<K>] extends [never] ? unknown : {\n functions?: { [P in SelectedFunctionKeys<K> as FunctionSlugFromKey<P>]?: NeonFunctionUrlEnv };\n};\ntype FilteredNeonEnv<K extends string> = { [N in keyof EnvKeysByNamespace as [Extract<K, EnvKeysByNamespace[N]>] extends [never] ? never : N]: { [P in Extract<K, EnvKeysByNamespace[N]> as EnvKeyToProp[P & keyof EnvKeyToProp]]: NamespaceEnv[N][EnvKeyToProp[P & keyof EnvKeyToProp] & keyof NamespaceEnv[N]] } } & FunctionsFilteredEnv<K>;\n/**\n * A filtered result when the exact runtime contents of a key array are unknown. Both the\n * namespace and its selected properties are optional because the array may omit any member of\n * its element union, or be empty.\n */\ntype OptionalFilteredNeonEnv<K extends string> = { [N in keyof EnvKeysByNamespace as [Extract<K, EnvKeysByNamespace[N]>] extends [never] ? never : N]?: { [P in Extract<K, EnvKeysByNamespace[N]> as EnvKeyToProp[P & keyof EnvKeyToProp]]?: NamespaceEnv[N][EnvKeyToProp[P & keyof EnvKeyToProp] & keyof NamespaceEnv[N]] } } & OptionalFunctionsFilteredEnv<K>;\n/** Whether `T` is a union rather than one concrete type. */\ntype IsUnion<T, Whole = T> = T extends Whole ? [Whole] extends [T] ? false : true : never;\n/** Whether any fixed tuple position can hold more than one key at runtime. */\ntype TupleHasUnion<T extends readonly unknown[]> = T extends readonly [] ? false : T extends readonly [infer Head, ...infer Tail extends readonly unknown[]] ? true extends IsUnion<Head> ? true : TupleHasUnion<Tail> : true;\n/**\n * The sound result of selecting an array of OS-level env-var keys.\n *\n * Inline literal tuples remain exact. Widened arrays, rest tuples, and tuple positions whose\n * value is a union are conservative because their runtime contents may be any subset of the\n * element type. The leading conditional distributes unions of whole literal tuples, preserving\n * each exact alternative.\n */\ntype SelectedNeonEnv<Keys extends readonly string[]> = Keys extends readonly string[] ? number extends Keys[\"length\"] ? OptionalFilteredNeonEnv<Keys[number]> : TupleHasUnion<Keys> extends true ? OptionalFilteredNeonEnv<Keys[number]> : FilteredNeonEnv<Keys[number]> : never;\ntype StorageCredentialEnvKey = \"AWS_ACCESS_KEY_ID\" | \"AWS_SECRET_ACCESS_KEY\";\ntype StorageKeyPairError = {\n readonly \"fetchEnv keys must include AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY together\": never;\n};\ntype TupleDefinitelyContains<Keys extends readonly string[], Key extends string> = Keys extends readonly [infer Head extends string, ...infer Tail extends readonly string[]] ? [Head] extends [Key] ? true : TupleDefinitelyContains<Tail, Key> : false;\ntype TupleDefinitelyContainsStoragePair<Keys extends readonly string[]> = TupleDefinitelyContains<Keys, \"AWS_ACCESS_KEY_ID\"> extends true ? TupleDefinitelyContains<Keys, \"AWS_SECRET_ACCESS_KEY\"> extends true ? true : false : false;\n/**\n * Reject a fixed key tuple that contains only one half of the storage credential. Dynamic\n * arrays are checked at runtime because their contents are not known to TypeScript.\n */\ntype InvalidStorageKeyTuple<Keys extends readonly string[]> = Keys extends unknown ? number extends Keys[\"length\"] ? never : [Extract<Keys[number], StorageCredentialEnvKey>] extends [never] ? never : TupleDefinitelyContainsStoragePair<Keys> extends true ? never : Keys : never;\ntype StorageKeyPairConstraint<Keys extends readonly string[]> = [InvalidStorageKeyTuple<Keys>] extends [never] ? unknown : StorageKeyPairError;\ntype FetchEnvKeysFromArgs<Args extends readonly unknown[]> = Args[0] extends {\n keys: infer Keys extends readonly string[];\n} ? Keys : never;\ntype StorageKeyPairArgsConstraint<Args extends readonly unknown[]> = StorageKeyPairConstraint<FetchEnvKeysFromArgs<Args>>;\n/** Preserve the same pair rule for callers that explicitly provide the legacy `K` generic. */\ntype StorageKeyUnionConstraint<K extends string> = [Extract<K, StorageCredentialEnvKey>] extends [never] ? unknown : StorageCredentialEnvKey extends K ? unknown : StorageKeyPairError;\ninterface FetchEnvOptions {\n /**\n * Neon project id. **Required** — the management API addresses branches through their\n * project. Resolve it in your CLI (e.g. neonctl) and pass it in.\n */\n projectId: string;\n /**\n * Neon branch — its **name** (e.g. `main`) or its id (`br-…`). **Required** (or pass the\n * legacy {@link FetchEnvOptions.branchId}). Resolved against the project's branches by\n * id first, then by name, so either form works.\n */\n branch?: string;\n /**\n * @deprecated Legacy id-only field. Prefer {@link FetchEnvOptions.branch}, which accepts\n * a branch name or id. Still honored for backward compatibility; ignored when `branch`\n * is set.\n */\n branchId?: string;\n /**\n * Neon API key. Resolved via the standard chain (option → `NEON_API_KEY` →\n * `~/.config/neonctl/credentials.json`) when omitted. Ignored when a custom `api`\n * is supplied.\n */\n apiKey?: string;\n /**\n * Neon **management** API base URL (not the Auth base URL). Falls back to\n * `NEON_API_HOST`, then production. Ignored when a custom `api` is supplied.\n */\n apiHost?: string;\n /**\n * Inject a custom NeonApi adapter. Primarily used by tests; production callers can rely\n * on the default real adapter built from `apiKey`.\n */\n api?: NeonApi;\n /**\n * Role name to fetch credentials for. When omitted, the connection role is auto-picked:\n * the only role on the branch, else Neon's default owner (`neondb_owner`), else the\n * single role left after dropping the managed Auth/Data API roles\n * (`authenticator`/`anonymous`/`authenticated`). Throws {@link PlatformError} with\n * `PLATFORM_AMBIGUOUS_BRANCH_AUTH` only when more than one app role remains.\n */\n roleName?: string;\n /**\n * Database name. When omitted, it is auto-picked: Neon's default `neondb` if present,\n * else the only database on the branch. Throws {@link PlatformError} with\n * `PLATFORM_AMBIGUOUS_BRANCH_AUTH` when the branch has several databases and none is\n * `neondb` (pass `databaseName` to disambiguate), and `PLATFORM_BRANCH_NOT_FOUND` when\n * the branch has no databases or the requested `databaseName` does not exist.\n */\n databaseName?: string;\n}\n/**\n * Resolve the project + branch this process should target, then fetch live Neon\n * connection strings for that branch over the network. Async — calls the Neon API.\n *\n * Use this from build scripts and the `neon-env run` command, where top-level await is\n * fine. For application code that needs a synchronous bootstrap (most frameworks: Drizzle\n * config, Next.js, Vite, etc.), inject env vars via `neon-env run -- <cmd>` and use\n * {@link parseEnv} instead — same {@link NeonEnv} shape, but a sync call against\n * `process.env`.\n *\n * Filesystem- and env-agnostic: pass `projectId` and the target `branch` (name or id)\n * explicitly (resolve them in your CLI, e.g. neonctl).\n *\n * ```ts\n * import config from \"../neon\";\n * import { fetchEnv } from \"@neon/env\";\n *\n * const env = await fetchEnv(config, { projectId: \"patient-art-12345\", branch: \"main\" });\n * const db = drizzle(neon(env.postgres.databaseUrl), { schema });\n * ```\n *\n * Pass `keys` to fetch only some of them — see the overload below.\n *\n * The package does **not** read `process.env`, mutate it, or touch the filesystem. Everything\n * it returns comes from the Neon API, so a value the API cannot produce (a one-time secret\n * issued to a previous call) is minted afresh rather than recovered. Callers that hold\n * persisted secrets and want to keep them use {@link fetchEnvReusingSecrets}, which decides\n * what is still valid and narrows this call's `keys` accordingly.\n */\ndeclare function fetchEnv<const C extends Config, const Args extends readonly [options: FetchEnvOptions & {\n /**\n * Fetch only these OS-level env vars, instead of everything the policy enables. The\n * keys autocomplete from the policy ({@link SelectableEnvKey}), and the result is\n * narrowed to match ({@link SelectedNeonEnv}). Inline literal arrays produce an exact\n * result; runtime-built arrays make their possible namespaces and properties optional.\n * `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` must be selected together.\n *\n * The point is not just a smaller result: **work is skipped too.** Leave out\n * `AWS_ACCESS_KEY_ID` / `AWS_SECRET_ACCESS_KEY` / `NEON_AI_GATEWAY_TOKEN` and no branch\n * credential is minted at all, so a caller that already holds valid secrets can refresh\n * everything else without issuing a new one. The non-secret vars of the same features\n * (`AWS_ENDPOINT_URL_S3`, `AWS_REGION`, `NEON_AI_GATEWAY_BASE_URL`) are not\n * credential-backed and stay available on their own.\n *\n * The selection **intersects** with the policy rather than overriding it: naming a var\n * the branch policy does not enable is not an error, it simply yields nothing.\n */\n keys: readonly SelectableEnvKey<C>[];\n}]>(config: C, ...args: Args & StorageKeyPairArgsConstraint<NoInfer<Args>>): Promise<SelectedNeonEnv<FetchEnvKeysFromArgs<NoInfer<Args>>>>;\ndeclare function fetchEnv<const C extends Config, const K extends SelectableEnvKey<C> = never>(config: C, options: [NoInfer<K>] extends [never] ? never : FetchEnvOptions & {\n keys: readonly NoInfer<K>[];\n} & StorageKeyUnionConstraint<NoInfer<K>>): Promise<FilteredNeonEnv<NoInfer<K>>>;\ndeclare function fetchEnv<const C extends Config>(config: C, options: FetchEnvOptions & {\n keys?: never;\n}): Promise<NeonEnv<C>>;\n/** Diagnostic-only fallback: valid keyed calls resolve through the exact overload above. */\ndeclare function fetchEnv<const C extends Config, const Keys extends readonly SelectableEnvKey<C>[]>(config: C, options: FetchEnvOptions & {\n keys: Keys;\n} & StorageKeyPairError): Promise<never>;\n/**\n * The {@link fetchEnv} body, with the key selection as a plain argument and no generic\n * narrowing. Exists for callers that compute the selection at runtime — notably\n * {@link fetchEnvReusingSecrets}, which decides which keys it still needs by checking the\n * branch — since the public overload's `keys` is bound to a literal union those callers cannot\n * produce without asserting.\n *\n * `keys === null` selects everything the policy enables.\n */\ndeclare function fetchEnvKeys(config: Config, options: FetchEnvKeysOptions, keys: readonly string[] | null): Promise<ResolvedNeonEnv>;\ntype FetchEnvKeysState = {\n env: ResolvedNeonEnv;\n /** Prevents endpoint failure from being mistaken for a confirmed empty function list. */\n functionUrlsUnavailable: boolean;\n};\ntype FetchEnvKeysOptions = FetchEnvOptions & {\n functionUrls?: FunctionUrlMode;\n /**\n * Keys to skip even when {@link fetchEnvKeys} is unscoped (`keys === null`).\n * {@link fetchEnvReusingSecrets} uses this to keep already-verified secrets\n * without converting an unscoped fetch into a static policy-key list — that\n * list cannot name `NEON_FUNCTION_*_BASE_URL`, so it would drop function URLs.\n */\n omitKeys?: readonly string[];\n /**\n * Skip a second `listBranchFunctions` when the caller already listed.\n * `--service functions` uses this so a later `FeatureUnavailable` cannot be\n * swallowed as `skipped`.\n */\n listedFunctions?: ReadonlyArray<{\n slug: string;\n invocationUrl: string;\n }>;\n};\n/**\n * `policy` is the {@link resolveBranchPolicy} result for this same `config` and branch, when\n * the caller already has it.\n */\ndeclare function fetchEnvKeysState(config: Config, options: FetchEnvKeysOptions, keys: readonly string[] | null, policy?: BranchPolicy): Promise<FetchEnvKeysState>;\ntype BranchPolicy = {\n branch: NeonBranchSnapshot;\n desired: ReturnType<typeof resolveConfig>;\n};\n/**\n * Resolve the target branch and evaluate the policy against it — the first thing any\n * branch-scoped operation needs. Shared by {@link fetchEnv} and {@link fetchEnvReusingSecrets}\n * so the two agree on which branch they're talking about and what it has enabled.\n */\ndeclare function resolveBranchPolicy(config: Config, options: Pick<FetchEnvOptions, \"projectId\" | \"branch\" | \"branchId\">, api: NeonApi, /** The target branch, when the caller listed it already. */\nresolved?: NeonBranchSnapshot): Promise<BranchPolicy>;\n/**\n * Scopes a minted fallback credential should carry. Only object storage and the AI Gateway\n * *require* secrets; functions never force a credential. `functions:invoke` rides along only\n * when this path still has to mint (defaults already cover storage and the gateway).\n */\ndeclare function previewCredentialScopes(preview: ResolvedPreviewConfig | undefined, selected?: {\n storage: boolean;\n aiGateway: boolean;\n}): CredentialScope[];\n/** The `name` this tool stamps on every credential it mints, so it can recognize its own. */\ndeclare function credentialName(branchName: string): string;\n/** The env-var keys a branch credential's secrets surface under, in emit order. */\ndeclare function credentialEnvKeys(flags: {\n storage: boolean;\n aiGateway: boolean;\n}): string[];\n/**\n * Every OS-level env var a resolved branch policy produces, in emit order. Lets a caller\n * subtract the ones it already holds and pass the rest as {@link fetchEnv}'s `keys`, without\n * re-deriving which vars a policy implies.\n */\ndeclare function policyEnvKeys(desired: ReturnType<typeof resolveConfig>): string[];\n/** Whether an issued credential can still be used: not revoked, not past its expiry. */\ndeclare function isLiveCredential(meta: NeonCredentialMeta, now: number): boolean;\ndeclare function defaultStorageCredential(live: readonly NeonCredentialMeta[], now: number): NeonCredentialMeta | null;\ndeclare function defaultAiGatewayCredential(live: readonly NeonCredentialMeta[], now: number): NeonCredentialMeta | null;\ndeclare function createApiFromOptions(options: FetchEnvOptions): NeonApi;\n/**\n * Project a fully-resolved {@link NeonEnv} into the OS-level `{ KEY: value }` pairs used\n * for cross-process transport. Named after the web-platform `.entries()` convention\n * (`URLSearchParams` / `Headers` / `FormData`); returns a `Record` rather than an\n * iterator of tuples since that's the shape env injection needs (wrap with\n * `Object.entries(...)` if you want literal `[key, value]` pairs). Used by `neon-env run`\n * to inject the vars into a subprocess's `process.env`.\n *\n * Walks the value at runtime so it works for any `NeonEnv<C>` regardless of which\n * conditional namespaces are present.\n */\ndeclare function toEntries(env: ResolvedNeonEnv): Record<string, string>;\n/**\n * Any resolved env {@link toEntries} can project: a full {@link NeonEnv}, or the narrowed\n * result of a `keys`-filtered {@link fetchEnv} / {@link parseEnv} call. Every namespace and\n * property is optional so a filtered result — which legitimately carries only what was asked\n * for — projects to exactly the vars it holds instead of failing to type-check.\n */\ntype ResolvedNeonEnv = { [N in keyof NamespaceEnv]?: Partial<NamespaceEnv[N]> } & {\n functions?: Record<string, NeonFunctionUrlEnv>;\n};\nexport { BranchPolicy, FetchEnvKeysOptions, FetchEnvKeysState, FetchEnvOptions, FilteredNeonEnv, FunctionBaseUrlKey, FunctionUrlMode, NEON_ENV_VAR_KEYS, NeonAiGatewayEnv, NeonAuthEnv, NeonBranchEnv, NeonDataApiEnv, NeonEnv, NeonFunctionUrlEnv, NeonFunctionsEnv, NeonPostgresEnv, NeonRealtimeEnv, NeonStorageEnv, ResolvedNeonEnv, SelectableEnvKey, SelectedNeonEnv, createApiFromOptions, credentialEnvKeys, credentialName, defaultAiGatewayCredential, defaultStorageCredential, fetchEnv, fetchEnvKeys, fetchEnvKeysState, functionBaseUrlKey, isFunctionBaseUrlKey, isLiveCredential, parseFunctionBaseUrlKey, policyEnvKeys, previewCredentialScopes, resolveBranchPolicy, toEntries };\n//# sourceMappingURL=env.d.ts.map",null],"mappings":";;;;;;AAkDC,cA9CaO,iBA+CS,EAAA;EAAA;AAA4DE;AAAVC;AAAS;AAAA;EAC/C,SAAA8H,MAAA,EAAA;IAAyB5H,SAAAA,IAAAA,EAAAA,aAAAA;EAAuBA,CAAAA;EAAnBJ,SAAAA,QAAAA,EAAAA;IAAkB,SAAAmI,WAAA,EAAA,cAAA;IACjE9H,SAAAA,mBAAuB,EAAA,uBAAA;EAAA,CAAA;EAGpB,SAOVG,IAAAA,EAAAA;IAIAC,SAAAA,OAAAA,EAAe,oBAAA;IAsBfC,SAAAA,OAAW,EAAA,oBAAA;EAAA,CAAA;EAMG,SAIdE,OAAAA,EAAAA;IAiBAC,SAAAA,GAAAA,EAAAA,mBAAc;EAAA,CAAA;EAgBE,SAIhBE,QAAAA,EAAAA;IAQLC,SAAAA,GAAAA,EAAW,mBAAS;IAYpBE,SAAAA,MAAS,EAAA,sBAAA;EAAA,CAAA;EAAOC;AAA8BA;AAErCA;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F,CD5DXjF,CAAAA,EC4De8F,aD5Df9F,CC4D6BiF,CD5D7BjF,CAAAA;AAAiEG,iBCqE/F8F,QDrE+F9F,CAAAA,gBCsE9FyE,MDtE8FzE,EAAAA,gBCuE9FoF,cDvE8FpF,CCuE/E8E,CDvE+E9E,CAAAA,CAAAA,CAAAA,MAAAA,ECyEtG8E,CDzEsG9E,EAAAA,KAAAA,EC0EvGuF,kBD1EuGvF,CC0EpF8E,CD1EoF9E,EC0EjFwF,CD1EiFxF,CAAAA,CAAAA,EC2E5G2F,aD3E4G3F,CC2E9F8E,CD3E8F9E,CAAAA,GC2EzF6F,eD3EyF7F,CC2EzE8E,CD3EyE9E,EC2EtEwF,CD3EsExF,CAAAA;AAAZH,iBC4EnFiG,QD5EmFjG,CAAAA,gBC6ElF4E,MD7EkF5E,EAAAA,gBC8ElF+E,gBD9EkF/E,CC8EjEiF,CD9EiEjF,CAAAA,CAAAA,CAAAA,MAAAA,EC+EzFiF,CD/EyFjF,EAAAA,IAAAA,EAAAA,SC+EvEkG,CD/EuElG,EAAAA,CAAAA,EC+EjE6E,eD/EiE7E,CC+EjDkG,CD/EiDlG,CAAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":["Config","CredentialScope","NeonApi","NeonBranchSnapshot","NeonCredentialMeta","ResolvedPreviewConfig","resolveConfig","NEON_DEV_FUNCTION_PORTS","NEON_ENV_VAR_KEYS","FunctionHostSuffixMode","NeonBranchEnv","NeonPostgresEnv","NeonAuthEnv","NeonDataApiEnv","NeonRealtimeEnv","NeonStorageEnv","NeonAiGatewayEnv","NoNamespace","Record","ServiceOn","T","HasKeys","OrBool","A","B","HasGaRecord","NonNullable","HasGaToggle","HasPreviewBuckets","C","HasBuckets","HasPreviewAiGateway","RealtimeOn","R","AiGatewayOn","NeonEnv","EnvKeysByNamespace","NamespaceEnv","EnvKeyToProp","SelectableEnvKey","FilteredNeonEnv","K","N","Extract","P","OptionalFilteredNeonEnv","IsUnion","Whole","TupleHasUnion","Head","Tail","SelectedNeonEnv","Keys","StorageCredentialEnvKey","StorageKeyPairError","TupleDefinitelyContains","Key","TupleDefinitelyContainsStoragePair","InvalidStorageKeyTuple","StorageKeyPairConstraint","FetchEnvKeysFromArgs","Args","StorageKeyPairArgsConstraint","StorageKeyUnionConstraint","FetchEnvOptions","fetchEnv","NoInfer","Promise","fetchEnvKeys","FetchEnvKeysOptions","ResolvedNeonEnv","FetchEnvKeysState","fetchEnvKeysState","BranchPolicy","ReturnType","resolveBranchPolicy","Pick","previewCredentialScopes","credentialName","credentialEnvKeys","policyEnvKeys","isLiveCredential","defaultStorageCredential","defaultAiGatewayCredential","createApiFromOptions","toEntries","Partial","FunctionBaseUrlEnv","Record","Readonly","functionBaseUrl","Config","FilteredNeonEnv","NeonEnv","SelectableEnvKey","GaFunctionsOf","C","NonNullable","Record","PreviewFunctionsHome","F","PreviewFunctionsOf","FunctionSlugOf","Extract","NoFunctionScopeHint","FunctionScopeField","S","FunctionEnvKeysOf","E","NeonFunctionEnv","parseEnv","K","Config","NeonApi","resolveConfig","NEON_ENV_VAR_KEYS","branch","name","id","functionHostSuffix","postgres","databaseUrl","databaseUrlUnpooled","auth","baseUrl","jwksUrl","dataApi","url","realtime","secret","storage","accessKeyId","secretAccessKey","endpoint","region","aiGateway","apiKey","NeonBranchEnv","NeonPostgresEnv","NeonAuthEnv","NeonDataApiEnv","NeonRealtimeEnv","NeonStorageEnv","NeonAiGatewayEnv","NoNamespace","Record","ServiceOn","T","enabled","HasKeys","OrBool","A","B","HasGaRecord","NonNullable","HasGaToggle","HasPreviewBuckets","C","buckets","HasBuckets","HasPreviewAiGateway","RealtimeOn","R","AiGatewayOn","NeonEnv","EnvKeysByNamespace","NamespaceEnv","EnvKeyToProp","DATABASE_URL","DATABASE_URL_UNPOOLED","NEON_BRANCH","NEON_BRANCH_ID","NEON_FUNCTION_HOST_SUFFIX","NEON_AUTH_BASE_URL","NEON_AUTH_JWKS_URL","NEON_DATA_API_URL","NEON_REALTIME_URL","NEON_REALTIME_SECRET","AWS_ACCESS_KEY_ID","AWS_SECRET_ACCESS_KEY","AWS_ENDPOINT_URL_S3","AWS_REGION","NEON_AI_GATEWAY_TOKEN","NEON_AI_GATEWAY_BASE_URL","SelectableEnvKey","FilteredNeonEnv","Extract","K","N","P","OptionalFilteredNeonEnv","IsUnion","Whole","TupleHasUnion","Head","Tail","SelectedNeonEnv","Keys","StorageCredentialEnvKey","StorageKeyPairError","TupleDefinitelyContains","Key","TupleDefinitelyContainsStoragePair","InvalidStorageKeyTuple","StorageKeyPairConstraint","FetchEnvKeysFromArgs","Args","keys","StorageKeyPairArgsConstraint","StorageKeyUnionConstraint","FetchEnvOptions","projectId","branchId","apiHost","api","roleName","databaseName","fetchEnv","options","config","args","NoInfer","Promise","toEntries","env","ResolvedNeonEnv","Partial","FunctionBaseUrlEnv","Readonly","functionBaseUrl","slug","GaFunctionsOf","PreviewFunctionsHome","functions","F","PreviewFunctionsOf","FunctionSlugOf","NoFunctionScopeHint","FunctionScopeField","S","FunctionEnvKeysOf","E","NeonFunctionEnv","function","parseEnv","scope"],"sources":["../../../internals/env-core/dist/env.d.ts","../src/lib/function-base-url.ts","../src/lib/parse-env.ts"],"sourcesContent":["import { Config, CredentialScope, NeonApi, NeonBranchSnapshot, NeonCredentialMeta, ResolvedPreviewConfig, resolveConfig } from \"@neon/config/v1\";\n\n// src/env.d.ts\n\n/**\n * Set only by `neon dev`: a JSON object mapping each function it serves to its localhost port,\n * which `functionBaseUrl` prefers over the deployed hostname.\n */\ndeclare const NEON_DEV_FUNCTION_PORTS = \"NEON_DEV_FUNCTION_PORTS\";\ndeclare const NEON_ENV_VAR_KEYS: {\n /**\n * Branch identity. `NEON_BRANCH` carries the branch **name** and is injected into the\n * Neon Functions runtime on every branch (including the default) by default. `env pull` /\n * `neon dev` / `neon-env run` emit it too so local dev mirrors the deployed runtime.\n */\n readonly branch: {\n readonly name: \"NEON_BRANCH\";\n readonly id: \"NEON_BRANCH_ID\";\n /**\n * Shared by every function on the branch, with a leading dot\n * (`.compute.c-2.us-east-2.aws.neon.tech`). A function's host is\n * `<NEON_BRANCH_ID>-<slug><NEON_FUNCTION_HOST_SUFFIX>`.\n */\n readonly functionHostSuffix: \"NEON_FUNCTION_HOST_SUFFIX\";\n };\n readonly postgres: {\n readonly databaseUrl: \"DATABASE_URL\";\n readonly databaseUrlUnpooled: \"DATABASE_URL_UNPOOLED\";\n };\n readonly auth: {\n readonly baseUrl: \"NEON_AUTH_BASE_URL\";\n readonly jwksUrl: \"NEON_AUTH_JWKS_URL\";\n };\n readonly dataApi: {\n readonly url: \"NEON_DATA_API_URL\";\n };\n readonly realtime: {\n readonly url: \"NEON_REALTIME_URL\";\n readonly secret: \"NEON_REALTIME_SECRET\";\n };\n /**\n * Object storage (Preview). The S3 SDKs read `AWS_*` from their standard config chain, so\n * a branch credential + `neon dev` / `env pull` makes object storage work from env alone.\n * `region` is injected under the SDK-standard `AWS_REGION`.\n */\n readonly storage: {\n readonly accessKeyId: \"AWS_ACCESS_KEY_ID\";\n readonly secretAccessKey: \"AWS_SECRET_ACCESS_KEY\";\n readonly endpoint: \"AWS_ENDPOINT_URL_S3\";\n readonly region: \"AWS_REGION\";\n };\n /**\n * AI Gateway (Preview). Exposed under the Neon-branded env vars the deployed Functions\n * runtime injects: `apiKey` is the minted credential's bearer (`NEON_AI_GATEWAY_TOKEN`)\n * and `baseUrl` is the bare branch gateway host (`NEON_AI_GATEWAY_BASE_URL`,\n * `scheme://host`, no path). Clients like `@neon/ai-sdk-provider` read these and append the\n * dialect route (`/v1`, `/openai/v1`, `/anthropic/v1`) themselves (https://github.com/vercel/ai/pull/15997).\n */\n readonly aiGateway: {\n readonly apiKey: \"NEON_AI_GATEWAY_TOKEN\";\n readonly baseUrl: \"NEON_AI_GATEWAY_BASE_URL\";\n };\n};\n/**\n * When an unscoped resolve includes `NEON_FUNCTION_HOST_SUFFIX`: `declared` when the policy\n * declares a function, `always` for a branch read without a policy.\n */\ntype FunctionHostSuffixMode = \"declared\" | \"always\";\n/**\n * Branch identity for the resolved branch. Always present on a `fetchEnv` result (the branch\n * name is always known); on a `parseEnv` result it's present only when `NEON_BRANCH` was\n * injected into `process.env` (the Functions runtime injects it by default, as do `neon dev` /\n * `neon-env run` / `env pull`). `name` is the branch **name** (e.g. `main`, `preview/foo`).\n * `id` and `functionHostSuffix` are what `functionBaseUrl` builds a function's URL from; they\n * are absent from env written before they existed.\n */\ninterface NeonBranchEnv {\n name: string;\n id?: string;\n functionHostSuffix?: string;\n}\n/** Per-namespace inner shapes. Exposed so consumers can name the parts independently. */\ninterface NeonPostgresEnv {\n /**\n * Pooled connection string (via Neon's PgBouncer pooler). The right default for\n * serverless drivers (`@neondatabase/serverless`, edge runtimes, Postgres.js, …).\n */\n databaseUrl: string;\n /**\n * Direct (unpooled) connection string. Use this when you need session-level\n * features (`LISTEN`/`NOTIFY`, prepared statements across calls, transactions\n * spanning round-trips) that PgBouncer's transaction-mode pooling drops.\n */\n databaseUrlUnpooled: string;\n}\n/**\n * Bits of a Neon Auth integration for the resolved branch. Only present on `NeonEnv`\n * when the branch policy enables `auth`.\n *\n * Neon Auth exposes the `baseUrl` (which doubles as the publishable client identifier) and\n * the `jwksUrl` used to verify tokens it issues. `fetchEnv` reads both from the live\n * integration; `parseEnv` reads them from `process.env` (`NEON_AUTH_BASE_URL` /\n * `NEON_AUTH_JWKS_URL`).\n */\ninterface NeonAuthEnv {\n baseUrl: string;\n /** JWKS URL for verifying tokens issued by Neon Auth (`NEON_AUTH_JWKS_URL`). */\n jwksUrl: string;\n}\n/** Bits of a Neon Data API integration. Only present when the branch policy enables it. */\ninterface NeonDataApiEnv {\n url: string;\n}\n/** Connection values for a branch with Realtime enabled. */\ninterface NeonRealtimeEnv {\n /** WebSocket endpoint passed to `createRealtimeClient`. */\n url: string;\n /** Server-only key passed to `createRealtime`. Never expose it to browser code. */\n secret: string;\n}\n/**\n * S3-compatible object-storage access for the branch. Present on `NeonEnv` only\n * when the policy declares `buckets` (or deprecated `preview.buckets`). Combines a minted branch credential's access\n * keys (`accessKeyId` = the credential's full token id, e.g. `nak_live_…`, which is what the\n * storage gateway authenticates against; `secretAccessKey` = its\n * `s3_secret_access_key`) with the branch's non-secret connection details\n * (`endpoint`/`region`, from `GET .../storage`). Projects to the AWS SDK's\n * standard config env (`AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `AWS_ENDPOINT_URL_S3`,\n * `AWS_REGION`) so the S3 client works from env alone. Neon's storage gateway always\n * requires path-style addressing, so set `forcePathStyle: true` on your S3 client.\n */\ninterface NeonStorageEnv {\n accessKeyId: string;\n secretAccessKey: string;\n /** S3-compatible endpoint URL for the branch. */\n endpoint: string;\n /** AWS region string (e.g. `us-east-2`). Injected as `AWS_REGION`. */\n region: string;\n}\n/**\n * AI Gateway access for the branch. Present on `NeonEnv` only when the policy\n * enables `aiGateway` (or deprecated `preview.aiGateway`). `apiKey` is the minted credential's bearer (`api_token`);\n * `baseUrl` is the bare branch-scoped gateway host\n * (`https://<branchId>-api.ai.<region>.…`, no path). Projects to the Neon-branded env\n * (`NEON_AI_GATEWAY_TOKEN`, `NEON_AI_GATEWAY_BASE_URL`); clients like `@neon/ai-sdk-provider`\n * append the dialect route (`/v1`, `/openai/v1`, `/anthropic/v1`) themselves.\n */\ninterface NeonAiGatewayEnv {\n apiKey: string;\n baseUrl: string;\n}\n/**\n * Empty record alias used as the \"false\" branch of the conditional namespace adds below.\n * `Record<never, never>` is the no-op for intersection — the cleaner alternative to `{}`,\n * which biome rejects (it means \"any non-null\", not \"empty object\").\n */\ntype NoNamespace = Record<never, never>;\n/**\n * Resolve a **static** service toggle (the value of `config.auth` / `config.dataApi`) to a\n * type-level boolean. The whole-thing wrapping (`[T] extends […]`) turns off distribution\n * so a union/`undefined` is checked as one unit:\n *\n * - `false` / `{ enabled: false }` / `undefined` → `false`\n * - `true` / `{ enabled: true }` / any other object (`{}`, `{ enabled?: boolean }`) → `true`\n * (a present toggle defaults to enabled)\n * - the bare `boolean | ServiceToggle | undefined` (the default `Config` param, no literal\n * info) → `false`, so an untyped policy yields just `{ postgres }`.\n */\ntype ServiceOn<T> = [T] extends [false] ? false : [T] extends [{\n enabled: false;\n}] ? false : [T] extends [undefined] ? false : [T] extends [true] ? true : [T] extends [{\n enabled: true;\n}] ? true : [T] extends [object] ? true : false;\n/** True when `T` has at least one known key; `false` for `{}` / `never`. */\ntype HasKeys<T> = [keyof T] extends [never] ? false : true;\ntype OrBool<A extends boolean, B extends boolean> = A extends true ? true : B;\n/**\n * Whether a top-level optional record (GA `functions` / `buckets`) has known keys.\n * A string index signature (`Record<string, …>`, the default `Config` param) is treated\n * as empty so an untyped policy yields just `{ postgres }`, matching {@link HasPreviewBuckets}.\n */\ntype HasGaRecord<T> = [NonNullable<T>] extends [never] ? false : string extends keyof NonNullable<T> ? false : HasKeys<NonNullable<T>>;\ntype HasGaToggle<T> = [NonNullable<T>] extends [never] ? false : ServiceOn<NonNullable<T>>;\n/**\n * Whether the policy declares at least one object-storage bucket (`buckets` or\n * deprecated `preview.buckets`). Drives whether {@link NeonEnv} carries the `storage`\n * namespace.\n *\n * The leading `[never]` guard is load-bearing: when a policy has no `preview` at all,\n * `NonNullable<C[\"preview\"]>` is `never`, and without the guard the `extends { … }` probe\n * below would vacuously match (everything extends `never`-derived shapes) and `HasKeys<never>`\n * would resolve `true`, wrongly adding the namespace. The guard short-circuits to `false`.\n */\ntype HasPreviewBuckets<C extends Config> = [NonNullable<C[\"preview\"]>] extends [never] ? false : NonNullable<C[\"preview\"]> extends {\n buckets: infer B;\n} ? HasKeys<NonNullable<B>> : false;\ntype HasBuckets<C extends Config> = OrBool<HasGaRecord<C[\"buckets\"]>, HasPreviewBuckets<C>>;\n/**\n * Whether the policy enables the AI Gateway (`aiGateway` or deprecated `preview.aiGateway`).\n * Drives whether {@link NeonEnv} carries the `aiGateway` namespace.\n */\ntype HasPreviewAiGateway<C extends Config> = [NonNullable<C[\"preview\"]>] extends [never] ? false : NonNullable<C[\"preview\"]> extends {\n aiGateway: infer A;\n} ? ServiceOn<NonNullable<A>> : false;\n/** Whether the policy statically enables Realtime under `preview.realtime`. */\ntype RealtimeOn<C extends Config> = [NonNullable<C[\"preview\"]>] extends [never] ? false : NonNullable<C[\"preview\"]> extends {\n realtime: infer R;\n} ? ServiceOn<NonNullable<R>> : false;\ntype AiGatewayOn<C extends Config> = OrBool<HasGaToggle<C[\"aiGateway\"]>, HasPreviewAiGateway<C>>;\n/**\n * Static, namespaced shape of `fetchEnv` / `parseEnv`'s return value. Generic over the\n * {@link Config} so the type system knows which optional namespaces are present.\n *\n * Because the secret-bearing toggles live in the **static** config (not inside a per-branch\n * closure), namespace presence is a direct read of those fields — no union-across-branches,\n * no default-config escape hatch:\n *\n * - `postgres` is always present.\n * - `auth` is added iff `config.auth` is statically enabled.\n * - `dataApi` is added iff `config.dataApi` is statically enabled.\n * - `realtime` is added iff `config.preview.realtime` is statically enabled.\n * - `storage` is added iff `config.buckets` (or deprecated `preview.buckets`) declares at least one bucket.\n * - `aiGateway` is added iff `config.aiGateway` (or deprecated `preview.aiGateway`) is statically enabled.\n */\ntype NeonEnv<C extends Config = Config> = {\n postgres: NeonPostgresEnv;\n /**\n * Branch identity (`NEON_BRANCH`). Optional because `parseEnv` only surfaces it when the\n * var was injected; `fetchEnv` always populates it.\n */\n branch?: NeonBranchEnv;\n} & (ServiceOn<NonNullable<C[\"auth\"]>> extends true ? {\n auth: NeonAuthEnv;\n} : NoNamespace) & (ServiceOn<NonNullable<C[\"dataApi\"]>> extends true ? {\n dataApi: NeonDataApiEnv;\n} : NoNamespace) & (RealtimeOn<C> extends true ? {\n realtime: NeonRealtimeEnv;\n} : NoNamespace) & (HasBuckets<C> extends true ? {\n storage: NeonStorageEnv;\n} : NoNamespace) & (AiGatewayOn<C> extends true ? {\n aiGateway: NeonAiGatewayEnv;\n} : NoNamespace);\n/**\n * OS-level env-var keys grouped by the {@link NeonEnv} namespace they populate. Only the\n * **input** vars `parseEnv` validates are listed — the output-only aliases in\n * {@link NEON_ENV_VAR_KEYS} (`NEON_AI_GATEWAY_TOKEN`, …) are intentionally absent, so they\n * are not selectable in a `parseEnv(config, keys)` filter. Keep in sync with\n * {@link EnvKeyToProp}.\n */\ninterface EnvKeysByNamespace {\n postgres: \"DATABASE_URL\" | \"DATABASE_URL_UNPOOLED\";\n branch: \"NEON_BRANCH\" | \"NEON_BRANCH_ID\" | \"NEON_FUNCTION_HOST_SUFFIX\";\n auth: \"NEON_AUTH_BASE_URL\" | \"NEON_AUTH_JWKS_URL\";\n dataApi: \"NEON_DATA_API_URL\";\n realtime: \"NEON_REALTIME_URL\" | \"NEON_REALTIME_SECRET\";\n storage: \"AWS_ACCESS_KEY_ID\" | \"AWS_SECRET_ACCESS_KEY\" | \"AWS_ENDPOINT_URL_S3\" | \"AWS_REGION\";\n aiGateway: \"NEON_AI_GATEWAY_TOKEN\" | \"NEON_AI_GATEWAY_BASE_URL\";\n}\n/** The {@link NeonEnv} namespace interface backing each namespace key. */\ninterface NamespaceEnv {\n postgres: NeonPostgresEnv;\n branch: NeonBranchEnv;\n auth: NeonAuthEnv;\n dataApi: NeonDataApiEnv;\n realtime: NeonRealtimeEnv;\n storage: NeonStorageEnv;\n aiGateway: NeonAiGatewayEnv;\n}\n/** OS-level env-var key → the camelCase property it sets on its namespace object. */\ninterface EnvKeyToProp {\n DATABASE_URL: \"databaseUrl\";\n DATABASE_URL_UNPOOLED: \"databaseUrlUnpooled\";\n NEON_BRANCH: \"name\";\n NEON_BRANCH_ID: \"id\";\n NEON_FUNCTION_HOST_SUFFIX: \"functionHostSuffix\";\n NEON_AUTH_BASE_URL: \"baseUrl\";\n NEON_AUTH_JWKS_URL: \"jwksUrl\";\n NEON_DATA_API_URL: \"url\";\n NEON_REALTIME_URL: \"url\";\n NEON_REALTIME_SECRET: \"secret\";\n AWS_ACCESS_KEY_ID: \"accessKeyId\";\n AWS_SECRET_ACCESS_KEY: \"secretAccessKey\";\n AWS_ENDPOINT_URL_S3: \"endpoint\";\n AWS_REGION: \"region\";\n NEON_AI_GATEWAY_TOKEN: \"apiKey\";\n NEON_AI_GATEWAY_BASE_URL: \"baseUrl\";\n}\n/**\n * The OS-level env-var keys selectable for a given policy: the union of input vars across\n * exactly the namespaces {@link NeonEnv}<C> carries. Drives the typesafe autocomplete of the\n * `keys` filter — selecting a var from a namespace the policy does not enable is a type error\n * (e.g. `NEON_AUTH_BASE_URL` is only offered once the policy turns on `auth`).\n */\ntype SelectableEnvKey<C extends Config> = EnvKeysByNamespace[keyof NeonEnv<C> & keyof EnvKeysByNamespace];\n/**\n * The result shape of a **filtered** `parseEnv(config, keys)` call: the namespaced\n * {@link NeonEnv} restricted to exactly the selected OS-level keys `K`. Namespaces with no\n * selected key are dropped, and within a kept namespace only the selected properties survive\n * — selecting just `[\"DATABASE_URL\"]` yields `{ postgres: { databaseUrl: string } }`, with no\n * `databaseUrlUnpooled`.\n *\n * The policy gating lives on the `parseEnv` overload (which binds `K` to\n * {@link SelectableEnvKey}); this type only needs the selection, so it takes a bare\n * `K extends string` and filters with `Extract`. The outer mapped type's `as` clause drops\n * any namespace whose intersection with the selection is empty (`[…] extends [never]`,\n * tuple-wrapped to switch off distribution); the inner one re-keys each selected OS var to its\n * camelCase property and looks the value type up on the canonical namespace interface, so it\n * stays correct if a field ever stops being a plain `string`.\n */\ntype FilteredNeonEnv<K extends string> = { [N in keyof EnvKeysByNamespace as [Extract<K, EnvKeysByNamespace[N]>] extends [never] ? never : N]: { [P in Extract<K, EnvKeysByNamespace[N]> as EnvKeyToProp[P & keyof EnvKeyToProp]]: NonNullable<NamespaceEnv[N][EnvKeyToProp[P & keyof EnvKeyToProp] & keyof NamespaceEnv[N]]> } };\n/**\n * A filtered result when the exact runtime contents of a key array are unknown. Both the\n * namespace and its selected properties are optional because the array may omit any member of\n * its element union, or be empty.\n */\ntype OptionalFilteredNeonEnv<K extends string> = { [N in keyof EnvKeysByNamespace as [Extract<K, EnvKeysByNamespace[N]>] extends [never] ? never : N]?: { [P in Extract<K, EnvKeysByNamespace[N]> as EnvKeyToProp[P & keyof EnvKeyToProp]]?: NamespaceEnv[N][EnvKeyToProp[P & keyof EnvKeyToProp] & keyof NamespaceEnv[N]] } };\n/** Whether `T` is a union rather than one concrete type. */\ntype IsUnion<T, Whole = T> = T extends Whole ? [Whole] extends [T] ? false : true : never;\n/** Whether any fixed tuple position can hold more than one key at runtime. */\ntype TupleHasUnion<T extends readonly unknown[]> = T extends readonly [] ? false : T extends readonly [infer Head, ...infer Tail extends readonly unknown[]] ? true extends IsUnion<Head> ? true : TupleHasUnion<Tail> : true;\n/**\n * The sound result of selecting an array of OS-level env-var keys.\n *\n * Inline literal tuples remain exact. Widened arrays, rest tuples, and tuple positions whose\n * value is a union are conservative because their runtime contents may be any subset of the\n * element type. The leading conditional distributes unions of whole literal tuples, preserving\n * each exact alternative.\n */\ntype SelectedNeonEnv<Keys extends readonly string[]> = Keys extends readonly string[] ? number extends Keys[\"length\"] ? OptionalFilteredNeonEnv<Keys[number]> : TupleHasUnion<Keys> extends true ? OptionalFilteredNeonEnv<Keys[number]> : FilteredNeonEnv<Keys[number]> : never;\ntype StorageCredentialEnvKey = \"AWS_ACCESS_KEY_ID\" | \"AWS_SECRET_ACCESS_KEY\";\ntype StorageKeyPairError = {\n readonly \"fetchEnv keys must include AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY together\": never;\n};\ntype TupleDefinitelyContains<Keys extends readonly string[], Key extends string> = Keys extends readonly [infer Head extends string, ...infer Tail extends readonly string[]] ? [Head] extends [Key] ? true : TupleDefinitelyContains<Tail, Key> : false;\ntype TupleDefinitelyContainsStoragePair<Keys extends readonly string[]> = TupleDefinitelyContains<Keys, \"AWS_ACCESS_KEY_ID\"> extends true ? TupleDefinitelyContains<Keys, \"AWS_SECRET_ACCESS_KEY\"> extends true ? true : false : false;\n/**\n * Reject a fixed key tuple that contains only one half of the storage credential. Dynamic\n * arrays are checked at runtime because their contents are not known to TypeScript.\n */\ntype InvalidStorageKeyTuple<Keys extends readonly string[]> = Keys extends unknown ? number extends Keys[\"length\"] ? never : [Extract<Keys[number], StorageCredentialEnvKey>] extends [never] ? never : TupleDefinitelyContainsStoragePair<Keys> extends true ? never : Keys : never;\ntype StorageKeyPairConstraint<Keys extends readonly string[]> = [InvalidStorageKeyTuple<Keys>] extends [never] ? unknown : StorageKeyPairError;\ntype FetchEnvKeysFromArgs<Args extends readonly unknown[]> = Args[0] extends {\n keys: infer Keys extends readonly string[];\n} ? Keys : never;\ntype StorageKeyPairArgsConstraint<Args extends readonly unknown[]> = StorageKeyPairConstraint<FetchEnvKeysFromArgs<Args>>;\n/** Preserve the same pair rule for callers that explicitly provide the legacy `K` generic. */\ntype StorageKeyUnionConstraint<K extends string> = [Extract<K, StorageCredentialEnvKey>] extends [never] ? unknown : StorageCredentialEnvKey extends K ? unknown : StorageKeyPairError;\ninterface FetchEnvOptions {\n /**\n * Neon project id. **Required** — the management API addresses branches through their\n * project. Resolve it in your CLI (e.g. neonctl) and pass it in.\n */\n projectId: string;\n /**\n * Neon branch — its **name** (e.g. `main`) or its id (`br-…`). **Required** (or pass the\n * legacy {@link FetchEnvOptions.branchId}). Resolved against the project's branches by\n * id first, then by name, so either form works.\n */\n branch?: string;\n /**\n * @deprecated Legacy id-only field. Prefer {@link FetchEnvOptions.branch}, which accepts\n * a branch name or id. Still honored for backward compatibility; ignored when `branch`\n * is set.\n */\n branchId?: string;\n /**\n * Neon API key. Resolved via the standard chain (option → `NEON_API_KEY` →\n * `~/.config/neonctl/credentials.json`) when omitted. Ignored when a custom `api`\n * is supplied.\n */\n apiKey?: string;\n /**\n * Neon **management** API base URL (not the Auth base URL). Falls back to\n * `NEON_API_HOST`, then production. Ignored when a custom `api` is supplied.\n */\n apiHost?: string;\n /**\n * Inject a custom NeonApi adapter. Primarily used by tests; production callers can rely\n * on the default real adapter built from `apiKey`.\n */\n api?: NeonApi;\n /**\n * Role name to fetch credentials for. When omitted, the connection role is auto-picked:\n * the only role on the branch, else Neon's default owner (`neondb_owner`), else the\n * single role left after dropping the managed Auth/Data API roles\n * (`authenticator`/`anonymous`/`authenticated`). Throws {@link PlatformError} with\n * `PLATFORM_AMBIGUOUS_BRANCH_AUTH` only when more than one app role remains.\n */\n roleName?: string;\n /**\n * Database name. When omitted, it is auto-picked: Neon's default `neondb` if present,\n * else the only database on the branch. Throws {@link PlatformError} with\n * `PLATFORM_AMBIGUOUS_BRANCH_AUTH` when the branch has several databases and none is\n * `neondb` (pass `databaseName` to disambiguate), and `PLATFORM_BRANCH_NOT_FOUND` when\n * the branch has no databases or the requested `databaseName` does not exist.\n */\n databaseName?: string;\n}\n/**\n * Resolve the project + branch this process should target, then fetch live Neon\n * connection strings for that branch over the network. Async — calls the Neon API.\n *\n * Use this from build scripts and the `neon-env run` command, where top-level await is\n * fine. For application code that needs a synchronous bootstrap (most frameworks: Drizzle\n * config, Next.js, Vite, etc.), inject env vars via `neon-env run -- <cmd>` and use\n * {@link parseEnv} instead — same {@link NeonEnv} shape, but a sync call against\n * `process.env`.\n *\n * Filesystem- and env-agnostic: pass `projectId` and the target `branch` (name or id)\n * explicitly (resolve them in your CLI, e.g. neonctl).\n *\n * ```ts\n * import config from \"../neon\";\n * import { fetchEnv } from \"@neon/env\";\n *\n * const env = await fetchEnv(config, { projectId: \"patient-art-12345\", branch: \"main\" });\n * const db = drizzle(neon(env.postgres.databaseUrl), { schema });\n * ```\n *\n * Pass `keys` to fetch only some of them — see the overload below.\n *\n * The package does **not** read `process.env`, mutate it, or touch the filesystem. Everything\n * it returns comes from the Neon API, so a value the API cannot produce (a one-time secret\n * issued to a previous call) is minted afresh rather than recovered. Callers that hold\n * persisted secrets and want to keep them use {@link fetchEnvReusingSecrets}, which decides\n * what is still valid and narrows this call's `keys` accordingly.\n */\ndeclare function fetchEnv<const C extends Config, const Args extends readonly [options: FetchEnvOptions & {\n /**\n * Fetch only these OS-level env vars, instead of everything the policy enables. The\n * keys autocomplete from the policy ({@link SelectableEnvKey}), and the result is\n * narrowed to match ({@link SelectedNeonEnv}). Inline literal arrays produce an exact\n * result; runtime-built arrays make their possible namespaces and properties optional.\n * `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` must be selected together.\n *\n * The point is not just a smaller result: **work is skipped too.** Leave out\n * `AWS_ACCESS_KEY_ID` / `AWS_SECRET_ACCESS_KEY` / `NEON_AI_GATEWAY_TOKEN` and no branch\n * credential is minted at all, so a caller that already holds valid secrets can refresh\n * everything else without issuing a new one. The non-secret vars of the same features\n * (`AWS_ENDPOINT_URL_S3`, `AWS_REGION`, `NEON_AI_GATEWAY_BASE_URL`) are not\n * credential-backed and stay available on their own.\n *\n * The selection **intersects** with the policy rather than overriding it: naming a var\n * the branch policy does not enable is not an error, it simply yields nothing.\n */\n keys: readonly SelectableEnvKey<C>[];\n}]>(config: C, ...args: Args & StorageKeyPairArgsConstraint<NoInfer<Args>>): Promise<SelectedNeonEnv<FetchEnvKeysFromArgs<NoInfer<Args>>>>;\ndeclare function fetchEnv<const C extends Config, const K extends SelectableEnvKey<C> = never>(config: C, options: [NoInfer<K>] extends [never] ? never : FetchEnvOptions & {\n keys: readonly NoInfer<K>[];\n} & StorageKeyUnionConstraint<NoInfer<K>>): Promise<FilteredNeonEnv<NoInfer<K>>>;\ndeclare function fetchEnv<const C extends Config>(config: C, options: FetchEnvOptions & {\n keys?: never;\n}): Promise<NeonEnv<C>>;\n/** Diagnostic-only fallback: valid keyed calls resolve through the exact overload above. */\ndeclare function fetchEnv<const C extends Config, const Keys extends readonly SelectableEnvKey<C>[]>(config: C, options: FetchEnvOptions & {\n keys: Keys;\n} & StorageKeyPairError): Promise<never>;\n/**\n * The {@link fetchEnv} body, with the key selection as a plain argument and no generic\n * narrowing. Exists for callers that compute the selection at runtime — notably\n * {@link fetchEnvReusingSecrets}, which decides which keys it still needs by checking the\n * branch — since the public overload's `keys` is bound to a literal union those callers cannot\n * produce without asserting.\n *\n * `keys === null` selects everything the policy enables.\n */\ndeclare function fetchEnvKeys(config: Config, options: FetchEnvKeysOptions, keys: readonly string[] | null): Promise<ResolvedNeonEnv>;\ntype FetchEnvKeysState = {\n env: ResolvedNeonEnv;\n};\ntype FetchEnvKeysOptions = FetchEnvOptions & {\n /** Defaults to `declared`. See {@link FunctionHostSuffixMode}. */\n functionHostSuffix?: FunctionHostSuffixMode;\n /**\n * Keys to skip even when {@link fetchEnvKeys} is unscoped (`keys === null`).\n * {@link fetchEnvReusingSecrets} uses this to keep already-verified secrets\n * without converting an unscoped fetch into a static policy-key list.\n */\n omitKeys?: readonly string[];\n};\n/**\n * `policy` is the {@link resolveBranchPolicy} result for this same `config` and branch, when\n * the caller already has it.\n */\ndeclare function fetchEnvKeysState(config: Config, options: FetchEnvKeysOptions, keys: readonly string[] | null, policy?: BranchPolicy): Promise<FetchEnvKeysState>;\ntype BranchPolicy = {\n branch: NeonBranchSnapshot;\n desired: ReturnType<typeof resolveConfig>;\n};\n/**\n * Resolve the target branch and evaluate the policy against it — the first thing any\n * branch-scoped operation needs. Shared by {@link fetchEnv} and {@link fetchEnvReusingSecrets}\n * so the two agree on which branch they're talking about and what it has enabled.\n */\ndeclare function resolveBranchPolicy(config: Config, options: Pick<FetchEnvOptions, \"projectId\" | \"branch\" | \"branchId\">, api: NeonApi, /** The target branch, when the caller listed it already. */\nresolved?: NeonBranchSnapshot): Promise<BranchPolicy>;\n/**\n * Scopes a minted fallback credential should carry. Only object storage and the AI Gateway\n * *require* secrets; functions never force a credential. `functions:invoke` rides along only\n * when this path still has to mint (defaults already cover storage and the gateway).\n */\ndeclare function previewCredentialScopes(preview: ResolvedPreviewConfig | undefined, selected?: {\n storage: boolean;\n aiGateway: boolean;\n}): CredentialScope[];\n/** The `name` this tool stamps on every credential it mints, so it can recognize its own. */\ndeclare function credentialName(branchName: string): string;\n/** The env-var keys a branch credential's secrets surface under, in emit order. */\ndeclare function credentialEnvKeys(flags: {\n storage: boolean;\n aiGateway: boolean;\n}): string[];\n/**\n * Every OS-level env var a resolved branch policy produces, in emit order. Lets a caller\n * subtract the ones it already holds and pass the rest as {@link fetchEnv}'s `keys`, without\n * re-deriving which vars a policy implies.\n */\ndeclare function policyEnvKeys(desired: ReturnType<typeof resolveConfig>): string[];\n/** Whether an issued credential can still be used: not revoked, not past its expiry. */\ndeclare function isLiveCredential(meta: NeonCredentialMeta, now: number): boolean;\ndeclare function defaultStorageCredential(live: readonly NeonCredentialMeta[], now: number): NeonCredentialMeta | null;\ndeclare function defaultAiGatewayCredential(live: readonly NeonCredentialMeta[], now: number): NeonCredentialMeta | null;\ndeclare function createApiFromOptions(options: FetchEnvOptions): NeonApi;\n/**\n * Project a fully-resolved {@link NeonEnv} into the OS-level `{ KEY: value }` pairs used\n * for cross-process transport. Named after the web-platform `.entries()` convention\n * (`URLSearchParams` / `Headers` / `FormData`); returns a `Record` rather than an\n * iterator of tuples since that's the shape env injection needs (wrap with\n * `Object.entries(...)` if you want literal `[key, value]` pairs). Used by `neon-env run`\n * to inject the vars into a subprocess's `process.env`.\n *\n * Walks the value at runtime so it works for any `NeonEnv<C>` regardless of which\n * conditional namespaces are present.\n */\ndeclare function toEntries(env: ResolvedNeonEnv): Record<string, string>;\n/**\n * Any resolved env {@link toEntries} can project: a full {@link NeonEnv}, or the narrowed\n * result of a `keys`-filtered {@link fetchEnv} / {@link parseEnv} call. Every namespace and\n * property is optional so a filtered result — which legitimately carries only what was asked\n * for — projects to exactly the vars it holds instead of failing to type-check.\n */\ntype ResolvedNeonEnv = { [N in keyof NamespaceEnv]?: Partial<NamespaceEnv[N]> };\nexport { BranchPolicy, FetchEnvKeysOptions, FetchEnvKeysState, FetchEnvOptions, FilteredNeonEnv, FunctionHostSuffixMode, NEON_DEV_FUNCTION_PORTS, NEON_ENV_VAR_KEYS, NeonAiGatewayEnv, NeonAuthEnv, NeonBranchEnv, NeonDataApiEnv, NeonEnv, NeonPostgresEnv, NeonRealtimeEnv, NeonStorageEnv, ResolvedNeonEnv, SelectableEnvKey, SelectedNeonEnv, createApiFromOptions, credentialEnvKeys, credentialName, defaultAiGatewayCredential, defaultStorageCredential, fetchEnv, fetchEnvKeys, fetchEnvKeysState, isLiveCredential, policyEnvKeys, previewCredentialScopes, resolveBranchPolicy, toEntries };\n//# sourceMappingURL=env.d.ts.map",null,null],"mappings":";;;;AAkHyB,cAzGXQ,iBA0HU,EAAA;EAAA;AAgBE;AASD;AAYX;AAAOY;EAA8BA,SAAAA,MAAAA,EAAAA;IAErCA,SAAAA,IAAAA,EAAAA,aAAAA;IAAkCA,SAAAA,EAAAA,EAAAA,gBAAAA;IAA4BA;AAE/DA;AAAC;AAAA;AAEY;IACf,SAAAmG,kBAAA,EAAA,2BAAA;EAAyChG,CAAAA;EAAwBC,SAAAA,QAAAA,EAAAA;IAAC,SAAAiG,WAAA,EAAA,cAAA;IAMxEhG,SAAAA,mBAAW,EAAA,uBAAA;EAAA,CAAA;EAAmBL,SAAAA,IAAAA,EAAAA;IAAZM,SAAAA,OAAAA,EAAAA,oBAAAA;IAA2EN,SAAAA,OAAAA,EAAAA,oBAAAA;EAAZM,CAAAA;EAA6CN,SAAAA,OAAAA,EAAAA;IAAZM,SAAAA,GAAAA,EAAAA,mBAAAA;EAARL,CAAAA;EAAO,SAAA2G,QAAA,EAAA;IACjHrG,SAAAA,GAAAA,EAAW,mBAAA;IAAA,SAAAsG,MAAA,EAAA,sBAAA;EAAmB7G,CAAAA;EAAZM;AAAgEN;AAAZM;AAAVP;AAAS;EAAA,SAWrES,OAAAA,EAAAA;IAAiB,SAAAuG,WAAA,EAAA,mBAAA;IAAWnI,SAAAA,eAAAA,EAAAA,uBAAAA;IAAuB6B,SAAAA,QAAAA,EAAAA,qBAAAA;IAAZH,SAAAA,MAAAA,EAAAA,YAAAA;EAAiEG,CAAAA;EAAZH;AAEzEF;AAAZE;AAARL;AAAO;AAAA;AACI;EAAWrB,SAAAA,SAAAA,EAAAA;IAA6B6B,SAAAA,MAAAA,EAAAA,uBAAAA;IAAZJ,SAAAA,OA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