@arkenv/nextjs 1.0.0-alpha.10 → 1.0.0-alpha.12

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 (120) hide show
  1. package/README.md +10 -1
  2. package/dist/arkenv-internal-QxkUlA5J.cjs +2 -0
  3. package/dist/arkenv-internal-QxkUlA5J.cjs.map +1 -0
  4. package/dist/arkenv-internal-Ws3srax6.js +2 -0
  5. package/dist/arkenv-internal-Ws3srax6.js.map +1 -0
  6. package/dist/auto-extend-CYzZnEvT.cjs +2 -0
  7. package/dist/auto-extend-CYzZnEvT.cjs.map +1 -0
  8. package/dist/auto-extend-DjiqIbgM.js +2 -0
  9. package/dist/auto-extend-DjiqIbgM.js.map +1 -0
  10. package/dist/client.cjs +1 -1
  11. package/dist/client.cjs.map +1 -1
  12. package/dist/client.d.cts +3 -3
  13. package/dist/client.d.ts +3 -3
  14. package/dist/client.js +1 -1
  15. package/dist/client.js.map +1 -1
  16. package/dist/config/index.cjs +1 -1
  17. package/dist/config/index.d.cts +2 -2
  18. package/dist/config/index.d.ts +2 -2
  19. package/dist/config/index.js +1 -1
  20. package/dist/config-Deut5Vf8.js +99 -0
  21. package/dist/config-Deut5Vf8.js.map +1 -0
  22. package/dist/config-Oq8dsEPM.cjs +99 -0
  23. package/dist/config-Oq8dsEPM.cjs.map +1 -0
  24. package/dist/empty-client-env.cjs +2 -0
  25. package/dist/empty-client-env.cjs.map +1 -0
  26. package/dist/empty-client-env.d.cts +10 -0
  27. package/dist/empty-client-env.d.cts.map +1 -0
  28. package/dist/empty-client-env.d.ts +10 -0
  29. package/dist/empty-client-env.d.ts.map +1 -0
  30. package/dist/empty-client-env.js +2 -0
  31. package/dist/empty-client-env.js.map +1 -0
  32. package/dist/{index-96RGPyfa.d.cts → index-BS1wAitS.d.cts} +91 -31
  33. package/dist/{index-96RGPyfa.d.cts.map → index-BS1wAitS.d.cts.map} +1 -1
  34. package/dist/{index-BFQlm61W.d.ts → index-CBjJM83X.d.ts} +54 -14
  35. package/dist/index-CBjJM83X.d.ts.map +1 -0
  36. package/dist/{index-bjEZwPUt.d.ts → index-Cq_qJ68V.d.ts} +91 -31
  37. package/dist/{index-bjEZwPUt.d.ts.map → index-Cq_qJ68V.d.ts.map} +1 -1
  38. package/dist/{index-CNzwVE5N.d.cts → index-RdYGBD_V.d.cts} +54 -14
  39. package/dist/index-RdYGBD_V.d.cts.map +1 -0
  40. package/dist/index.cjs +1 -1
  41. package/dist/index.cjs.map +1 -1
  42. package/dist/index.d.cts +11 -5
  43. package/dist/index.d.cts.map +1 -1
  44. package/dist/index.d.ts +12 -6
  45. package/dist/index.d.ts.map +1 -1
  46. package/dist/index.js +1 -1
  47. package/dist/index.js.map +1 -1
  48. package/dist/react-server.cjs +1 -1
  49. package/dist/react-server.cjs.map +1 -1
  50. package/dist/react-server.d.cts +11 -5
  51. package/dist/react-server.d.cts.map +1 -1
  52. package/dist/react-server.d.ts +12 -6
  53. package/dist/react-server.d.ts.map +1 -1
  54. package/dist/react-server.js +1 -1
  55. package/dist/react-server.js.map +1 -1
  56. package/dist/{script-7FFqInPq.d.ts → script-Cy9x6rp9.d.ts} +1 -1
  57. package/dist/{script-7FFqInPq.d.ts.map → script-Cy9x6rp9.d.ts.map} +1 -1
  58. package/dist/{script-D-MYC2Uf.cjs → script-DAdH4IEa.cjs} +2 -2
  59. package/dist/{script-D-MYC2Uf.cjs.map → script-DAdH4IEa.cjs.map} +1 -1
  60. package/dist/server.cjs +1 -1
  61. package/dist/server.cjs.map +1 -1
  62. package/dist/server.d.cts +24 -5
  63. package/dist/server.d.cts.map +1 -1
  64. package/dist/server.d.ts +24 -5
  65. package/dist/server.d.ts.map +1 -1
  66. package/dist/server.js +1 -1
  67. package/dist/server.js.map +1 -1
  68. package/dist/standard/client.cjs +1 -1
  69. package/dist/standard/client.cjs.map +1 -1
  70. package/dist/standard/client.d.cts +3 -3
  71. package/dist/standard/client.d.ts +3 -3
  72. package/dist/standard/client.js +1 -1
  73. package/dist/standard/client.js.map +1 -1
  74. package/dist/standard/config.cjs +1 -1
  75. package/dist/standard/config.cjs.map +1 -1
  76. package/dist/standard/config.d.cts +6 -5
  77. package/dist/standard/config.d.cts.map +1 -1
  78. package/dist/standard/config.d.ts +6 -5
  79. package/dist/standard/config.d.ts.map +1 -1
  80. package/dist/standard/config.js +1 -1
  81. package/dist/standard/config.js.map +1 -1
  82. package/dist/standard/index.cjs +1 -1
  83. package/dist/standard/index.cjs.map +1 -1
  84. package/dist/standard/index.d.cts +4 -4
  85. package/dist/standard/index.d.ts +4 -4
  86. package/dist/standard/index.js +1 -1
  87. package/dist/standard/index.js.map +1 -1
  88. package/dist/standard/server.cjs +1 -1
  89. package/dist/standard/server.cjs.map +1 -1
  90. package/dist/standard/server.d.cts +27 -7
  91. package/dist/standard/server.d.cts.map +1 -1
  92. package/dist/standard/server.d.ts +28 -7
  93. package/dist/standard/server.d.ts.map +1 -1
  94. package/dist/standard/server.js +1 -1
  95. package/dist/standard/server.js.map +1 -1
  96. package/dist/standard/shared.cjs +1 -1
  97. package/dist/standard/shared.cjs.map +1 -1
  98. package/dist/standard/shared.d.cts +2 -2
  99. package/dist/standard/shared.d.ts +2 -2
  100. package/dist/standard/shared.js +1 -1
  101. package/dist/standard/shared.js.map +1 -1
  102. package/dist/strict-client-env-CHDTZoLe.js +6 -0
  103. package/dist/strict-client-env-CHDTZoLe.js.map +1 -0
  104. package/dist/strict-client-env-MouPnkRr.cjs +6 -0
  105. package/dist/strict-client-env-MouPnkRr.cjs.map +1 -0
  106. package/dist/{types-BzMGTYWv.d.ts → types-BfMBbrMm.d.ts} +2 -2
  107. package/dist/{types-BzMGTYWv.d.ts.map → types-BfMBbrMm.d.ts.map} +1 -1
  108. package/dist/{types-44R9mgTa.d.cts → types-BlRHnQwj.d.cts} +2 -2
  109. package/dist/{types-44R9mgTa.d.cts.map → types-BlRHnQwj.d.cts.map} +1 -1
  110. package/package.json +12 -5
  111. package/dist/arkenv-internal-Cll5pV_F.cjs +0 -2
  112. package/dist/arkenv-internal-Cll5pV_F.cjs.map +0 -1
  113. package/dist/arkenv-internal-DEN5DTmX.js +0 -2
  114. package/dist/arkenv-internal-DEN5DTmX.js.map +0 -1
  115. package/dist/config-CStvXoN3.cjs +0 -93
  116. package/dist/config-CStvXoN3.cjs.map +0 -1
  117. package/dist/config-D2j45WDh.js +0 -93
  118. package/dist/config-D2j45WDh.js.map +0 -1
  119. package/dist/index-BFQlm61W.d.ts.map +0 -1
  120. package/dist/index-CNzwVE5N.d.cts.map +0 -1
@@ -93,79 +93,139 @@ type Dict<T> = Record<string, T | undefined>;
93
93
  * Copied from standard-schema (MIT License)
94
94
  * Copyright (c) 2024 Colin McDannell
95
95
  */
96
- /** The Standard Typed interface. This is a base type extended by other specs. */
96
+ /**
97
+ * The Standard Typed interface. This is a base type extended by other specs.
98
+ */
97
99
  interface StandardTypedV1<Input = unknown, Output = Input> {
98
- /** The Standard properties. */
100
+ /**
101
+ * The Standard properties.
102
+ */
99
103
  readonly "~standard": StandardTypedV1.Props<Input, Output>;
100
104
  }
101
105
  declare namespace StandardTypedV1 {
102
- /** The Standard Typed properties interface. */
106
+ /**
107
+ * The Standard Typed properties interface.
108
+ */
103
109
  interface Props<Input = unknown, Output = Input> {
104
- /** The version number of the standard. */
110
+ /**
111
+ * The version number of the standard.
112
+ */
105
113
  readonly version: 1;
106
- /** The vendor name of the schema library. */
114
+ /**
115
+ * The vendor name of the schema library.
116
+ */
107
117
  readonly vendor: string;
108
- /** Inferred types associated with the schema. */
118
+ /**
119
+ * Inferred types associated with the schema.
120
+ */
109
121
  readonly types?: Types<Input, Output> | undefined;
110
122
  }
111
- /** The Standard Typed types interface. */
123
+ /**
124
+ * The Standard Typed types interface.
125
+ */
112
126
  interface Types<Input = unknown, Output = Input> {
113
- /** The input type of the schema. */
127
+ /**
128
+ * The input type of the schema.
129
+ */
114
130
  readonly input: Input;
115
- /** The output type of the schema. */
131
+ /**
132
+ * The output type of the schema.
133
+ */
116
134
  readonly output: Output;
117
135
  }
118
- /** Infers the input type of a Standard Typed. */
136
+ /**
137
+ * Infers the input type of a Standard Typed.
138
+ */
119
139
  type InferInput<Schema extends StandardTypedV1> = NonNullable<Schema["~standard"]["types"]>["input"];
120
- /** Infers the output type of a Standard Typed. */
140
+ /**
141
+ * Infers the output type of a Standard Typed.
142
+ */
121
143
  type InferOutput<Schema extends StandardTypedV1> = NonNullable<Schema["~standard"]["types"]>["output"];
122
144
  }
123
- /** The Standard Schema interface. */
145
+ /**
146
+ * The Standard Schema interface.
147
+ */
124
148
  interface StandardSchemaV1<Input = unknown, Output = Input> {
125
- /** The Standard Schema properties. */
149
+ /**
150
+ * The Standard Schema properties.
151
+ */
126
152
  readonly "~standard": StandardSchemaV1.Props<Input, Output>;
127
153
  }
128
154
  declare namespace StandardSchemaV1 {
129
- /** The Standard Schema properties interface. */
155
+ /**
156
+ * The Standard Schema properties interface.
157
+ */
130
158
  interface Props<Input = unknown, Output = Input> extends StandardTypedV1.Props<Input, Output> {
131
- /** Validates unknown input values. */
159
+ /**
160
+ * Validates unknown input values.
161
+ */
132
162
  readonly validate: (value: unknown, options?: StandardSchemaV1.Options | undefined) => Result<Output> | Promise<Result<Output>>;
133
163
  }
134
- /** The result interface of the validate function. */
164
+ /**
165
+ * The result interface of the validate function.
166
+ */
135
167
  type Result<Output> = SuccessResult<Output> | FailureResult;
136
- /** The result interface if validation succeeds. */
168
+ /**
169
+ * The result interface if validation succeeds.
170
+ */
137
171
  interface SuccessResult<Output> {
138
- /** The typed output value. */
172
+ /**
173
+ * The typed output value.
174
+ */
139
175
  readonly value: Output;
140
- /** A falsy value for `issues` indicates success. */
176
+ /**
177
+ * A falsy value for `issues` indicates success.
178
+ */
141
179
  readonly issues?: undefined;
142
180
  }
143
181
  interface Options {
144
- /** Explicit support for additional vendor-specific parameters, if needed. */
182
+ /**
183
+ * Explicit support for additional vendor-specific parameters, if needed.
184
+ */
145
185
  readonly libraryOptions?: Record<string, unknown> | undefined;
146
186
  }
147
- /** The result interface if validation fails. */
187
+ /**
188
+ * The result interface if validation fails.
189
+ */
148
190
  interface FailureResult {
149
- /** The issues of failed validation. */
191
+ /**
192
+ * The issues of failed validation.
193
+ */
150
194
  readonly issues: ReadonlyArray<Issue>;
151
195
  }
152
- /** The issue interface of the failure output. */
196
+ /**
197
+ * The issue interface of the failure output.
198
+ */
153
199
  interface Issue {
154
- /** The error message of the issue. */
200
+ /**
201
+ * The error message of the issue.
202
+ */
155
203
  readonly message: string;
156
- /** The path of the issue, if any. */
204
+ /**
205
+ * The path of the issue, if any.
206
+ */
157
207
  readonly path?: ReadonlyArray<PropertyKey | PathSegment> | undefined;
158
208
  }
159
- /** The path segment interface of the issue. */
209
+ /**
210
+ * The path segment interface of the issue.
211
+ */
160
212
  interface PathSegment {
161
- /** The key representing a path segment. */
213
+ /**
214
+ * The key representing a path segment.
215
+ */
162
216
  readonly key: PropertyKey;
163
217
  }
164
- /** The Standard types interface. */
218
+ /**
219
+ * The Standard types interface.
220
+ */
165
221
  interface Types<Input = unknown, Output = Input> extends StandardTypedV1.Types<Input, Output> {}
166
- /** Infers the input type of a Standard. */
222
+ /**
223
+ * Infers the input type of a Standard.
224
+ */
167
225
  type InferInput<Schema extends StandardTypedV1> = StandardTypedV1.InferInput<Schema>;
168
- /** Infers the output type of a Standard. */
226
+ /**
227
+ * Infers the output type of a Standard.
228
+ */
169
229
  type InferOutput<Schema extends StandardTypedV1> = StandardTypedV1.InferOutput<Schema>;
170
230
  }
171
231
  //#endregion
@@ -187,4 +247,4 @@ type InferType<T> = T extends StandardSchemaV1<infer _Input, infer Output> ? Out
187
247
  type SchemaShape = Record<string, unknown>;
188
248
  //#endregion
189
249
  export { $ as a, Dict as i, InferType as n, StandardSchemaV1 as r, SchemaShape as t };
190
- //# sourceMappingURL=index-bjEZwPUt.d.ts.map
250
+ //# sourceMappingURL=index-Cq_qJ68V.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-bjEZwPUt.d.ts","names":["_$arktype","_$arktype_internal_keywords_string_ts0","_$arktype_internal_attributes_ts0","$","trim","To","Submodule","normalize","capitalize","stringDate","stringInteger","ip","stringJson","lower","stringNumeric","url","uuid","Scope","string","In","root","alpha","alphanumeric","hex","base64","creditCard","date","digits","email","integer","json","numeric","regex","semver","upper","preformatted","host","number","NaN","Infinity","epoch","safe","NegativeInfinity","port","Dict","T","Record","StandardTypedV1","Input","Output","Props","Schema","Types","NonNullable","version","vendor","types","input","output","InferInput","InferOutput","StandardSchemaV1","Options","Result","Promise","SuccessResult","FailureResult","Record","Issue","ReadonlyArray","PropertyKey","PathSegment","validate","value","options","issues","libraryOptions","message","path","key","StandardJSONSchemaV1","Converter","Target","jsonSchema","target","type","Dict","StandardSchemaV1","InferType","T","errors","Any","_Input","Output","value","R","t","U","_Scope","$","Type","SchemaShape","Record","CompiledEnvSchema"],"sources":["../../internal/scope/dist/index.d.ts","../../internal/types/dist/helpers.d.ts","../../internal/types/dist/standard-schema.d.ts","../../internal/types/dist/infer-type.d.ts","../../internal/types/dist/schema.d.ts"],"mappings":";;;;;;;;AAEoF;;;;cAQtEG,CAAAA,EAAGH,SAAAA,CAAUiB,KAAAA;EACzBC,MAAAA,EAAQlB,SAAAA,CAAUM,SAAAA;IAChBF,IAAAA,EAAMJ,SAAAA,CAAUM,SAAAA,CAAUL,sCAAAA,CAAuCG,IAAAA,CAAKD,CAAAA;MACpE,cAAA,GAAiBgB,EAAAA,aAAejB,iCAAAA,CAAkCG,EAAAA;IAAAA;IAEpEE,SAAAA,EAAWP,SAAAA,CAAUM,SAAAA,CAAUL,sCAAAA,CAAuCM,SAAAA,CAAUJ,CAAAA;MAC9E,cAAA,GAAiBgB,EAAAA,aAAejB,iCAAAA,CAAkCG,EAAAA;IAAAA;IAEpEe,IAAAA;IACAC,KAAAA;IACAC,YAAAA;IACAC,GAAAA;IACAC,MAAAA,EAAQxB,SAAAA,CAAUM,SAAAA;MAChBc,IAAAA;MACAL,GAAAA;I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AA,IAAmBA,eAAAA,CAAgBa,WAAAA,CAAYT,MAAAA;AAAAA;;;;;;AF9EC;;;;;;KGUxEqC,SAAAA,MAAeC,CAAAA,SAAUF,gBAAAA,+BAA+CM,MAAAA,GAASJ,CAAAA,WAAWK,KAAAA,EAAOR,IAAAA,wBAA2BS,CAAAA,SAAUV,IAAAA,CAAKK,MAAAA,WAAiBK,CAAAA,GAAIN,CAAAA;EAC1KO,CAAAA;AAAAA,IACAC,CAAAA,GAAIR,CAAAA,SAAUJ,IAAAA,CAAKM,GAAAA,0BAA6BM,CAAAA;;;KCZxCI,WAAAA,GAAcC,MAAAA"}
1
+ {"version":3,"file":"index-Cq_qJ68V.d.ts","names":["_$arktype","_$arktype_internal_keywords_string_ts0","_$arktype_internal_attributes_ts0","$","trim","To","Submodule","normalize","capitalize","stringDate","stringInteger","ip","stringJson","lower","stringNumeric","url","uuid","Scope","string","In","root","alpha","alphanumeric","hex","base64","creditCard","date","digits","email","integer","json","numeric","regex","semver","upper","preformatted","host","number","NaN","Infinity","epoch","safe","NegativeInfinity","port","Dict","T","Record","StandardTypedV1","Input","Output","Props","Schema","Types","NonNullable","version","vendor","types","input","output","InferInput","InferOutput","StandardSchemaV1","Options","Result","Promise","SuccessResult","FailureResult","Record","Issue","ReadonlyArray","PropertyKey","PathSegment","validate","value","options","issues","libraryOptions","message","path","key","StandardJSONSchemaV1","Converter","Target","jsonSchema","target","type","Dict","StandardSchemaV1","InferType","T","errors","Any","_Input","Output","value","R","t","U","_Scope","$","Type","SchemaShape","Record","CompiledEnvSchema"],"sources":["../../internal/scope/dist/index.d.ts","../../internal/types/dist/helpers.d.ts","../../internal/types/dist/standard-schema.d.ts","../../internal/types/dist/infer-type.d.ts","../../internal/types/dist/schema.d.ts"],"mappings":";;;;;;;;AAEoF;;;;cAQtEG,CAAAA,EAAGH,SAAAA,CAAUiB,KAAAA;EACzBC,MAAAA,EAAQlB,SAAAA,CAAUM,SAAAA;IAChBF,IAAAA,EAAMJ,SAAA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qEUyD,KAAAA;IFrEqDzD;;;IAAAA,SEyElDkE,OAAAA;IFtEP7E;;;IAAAA,SE0EO8E,IAAAA,GAAOT,aAAAA,CAAcC,WAAAA,GAAcC,WAAAA;EAAAA;EFzE9C;;;EAAA,UE8EQA,WAAAA;IF5EiBtE;;;IAAAA,SEgFd8E,GAAAA,EAAKT,WAAAA;EAAAA;EF/EgBpE;;;EAAAA,UEoFxBkD,KAAAA,2BAAgCJ,KAAAA,UAAeD,eAAAA,CAAgBK,KAAAA,CAAMJ,KAAAA,EAAOC,MAAAA;EFlFzDhD;;;EAAAA,KEuFxB0D,UAAAA,gBAA0BZ,eAAAA,IAAmBA,eAAAA,CAAgBY,UAAAA,CAAWR,MAAAA;EFpF7EnB;;;EAAAA,KEwFK4B,WAAAA,gBAA2Bb,eAAAA,IAAmBA,eAAAA,CAAgBa,WAAAA,CAAYT,MAAAA;AAAAA;;;;;;AF1IC;;;;;;KGUxEqC,SAAAA,MAAeC,CAAAA,SAAUF,gBAAAA,+BAA+CM,MAAAA,GAASJ,CAAAA,WAAWK,KAAAA,EAAOR,IAAAA,wBAA2BS,CAAAA,SAAUV,IAAAA,CAAKK,MAAAA,WAAiBK,CAAAA,GAAIN,CAAAA;EAC1KO,CAAAA;AAAAA,IACAC,CAAAA,GAAIR,CAAAA,SAAUJ,IAAAA,CAAKM,GAAAA,0BAA6BM,CAAAA;;;KCZxCI,WAAAA,GAAcC,MAAAA"}
@@ -3,12 +3,12 @@ import { extractClientKeys, extractSharedKeys } from "@arkenv/build";
3
3
  //#region ../internal/log/dist/index.d.ts
4
4
  //#endregion
5
5
  //#region src/types.d.ts
6
- /** Supported log level thresholds, from most to least verbose. */
6
+ /**
7
+ * Supported log level thresholds, from most to least verbose.
8
+ */
7
9
  type LogLevel = "debug" | "info" | "warn" | "error" | "silent";
8
10
  /**
9
11
  * Shared logger interface for ArkEnv packages.
10
- *
11
- * CLI-specific features (spinners, JSON reporters, `flush`) stay outside this type.
12
12
  */
13
13
  type Logger = {
14
14
  debug: (message: string, ...optionalParams: unknown[]) => void;
@@ -16,9 +16,24 @@ type Logger = {
16
16
  warn: (message: string, ...optionalParams: unknown[]) => void;
17
17
  error: (message: string, ...optionalParams: unknown[]) => void;
18
18
  };
19
- /** Programmatic logger configuration. Takes precedence over `ARKENV_LOG_LEVEL`. */
19
+ /**
20
+ * Programmatic logger configuration. Takes precedence over `ARKENV_LOG_LEVEL`.
21
+ */
20
22
  //#endregion
21
23
  //#region src/config/types.d.ts
24
+ /**
25
+ * Context object Next.js passes to a function-form `next.config`.
26
+ *
27
+ * `defaultConfig` is `{}` so callers can spread it while remaining a
28
+ * supertype of Next.js's `NextConfig` interface.
29
+ */
30
+ type NextConfigContext = {
31
+ defaultConfig: {};
32
+ };
33
+ /**
34
+ * Function-form Next.js config: sync or async, receiving the current phase.
35
+ */
36
+ type NextConfigFactory<T extends object = object> = (phase: string, context: NextConfigContext) => T | Promise<T>;
22
37
  /**
23
38
  * Configuration options for the ArkEnv Next.js integration.
24
39
  *
@@ -26,7 +41,6 @@ type Logger = {
26
41
  * ```ts
27
42
  * const configOptions: ArkEnvConfigOptions = {
28
43
  * schemaPath: "./src/env.ts",
29
- * outputPath: "./src/generated/env.gen.ts"
30
44
  * };
31
45
  * ```
32
46
  */
@@ -54,7 +68,6 @@ type ArkEnvConfigOptions = {
54
68
  * @example
55
69
  * ```ts
56
70
  * export default withArkEnv(nextConfig, {
57
- * outputPath: "./src/generated/env.gen.ts"
58
71
  * });
59
72
  * ```
60
73
  */
@@ -67,7 +80,11 @@ type ArkEnvConfigOptions = {
67
80
  *
68
81
  * @default "flat"
69
82
  */
70
- layout?: "flat" | "strict" /** @deprecated Use `"flat"` instead. `"simple"` will be removed in the next major version. */ | "simple";
83
+ layout?: "flat" | "strict"
84
+ /**
85
+ * @deprecated Use `"flat"` instead. `"simple"` will be removed in the next major version.
86
+ */
87
+ | "simple";
71
88
  /**
72
89
  * Force standard mode code generation.
73
90
  *
@@ -131,25 +148,48 @@ declare function extractKeys(content: string): {
131
148
  };
132
149
  //#endregion
133
150
  //#region src/config/setup.d.ts
151
+ type SetupResult = {
152
+ resolvedLayout: "flat" | "strict" | "simple";
153
+ baseDir: string | undefined;
154
+ clientEnvPath: string | undefined;
155
+ outputPath: string;
156
+ };
134
157
  /**
135
158
  * Run ArkEnv codegen and setup without wrapping nextConfig.
136
159
  *
137
160
  * @param options Optional configuration paths for schema and output files
138
161
  * @param internalOptions Optional configuration for internal testing hooks
162
+ * @returns Resolved layout paths used by `withArkEnv` for alias registration
139
163
  * @throws An error if the schema file cannot be found or if code generation fails
140
164
  */
141
165
  declare function setupArkEnv(options?: ArkEnvConfigOptions, internalOptions?: {
142
166
  _jitiAliases?: Record<string, string>;
143
- }): void;
167
+ }): SetupResult;
144
168
  /**
145
- * Wrap a Next.js configuration object to automatically generate the `runtimeEnv` block in `env.gen.ts`.
169
+ * Wrap a Next.js configuration object or function to generate `runtimeEnv` in
170
+ * `env.gen.ts`, register `#arkenv/client-env` in strict layout for auto-extend,
171
+ * and configure Turbopack/Webpack aliases for virtualized `.arkenv/` placement.
172
+ *
173
+ * Function-form configs (sync or async) are preserved: ArkEnv awaits the user's
174
+ * factory, then applies aliases to the resolved object.
146
175
  *
147
- * @param nextConfig The Next.js configuration object or function
176
+ * @param nextConfig The Next.js configuration object or `(phase, context)` factory
148
177
  * @param options Optional configuration paths for schema and output files
149
- * @returns The Next.js configuration object unchanged
178
+ * @returns The Next.js configuration object, or an async factory that resolves to it
150
179
  * @throws An error if the schema file cannot be found or if code generation fails
180
+ *
181
+ * @example
182
+ * ```ts
183
+ * export default withArkEnv({ reactStrictMode: true });
184
+ *
185
+ * export default withArkEnv(async (phase, { defaultConfig }) => ({
186
+ * ...defaultConfig,
187
+ * reactStrictMode: phase !== "phase-test",
188
+ * }));
189
+ * ```
151
190
  */
152
- declare function withArkEnv<T>(nextConfig: T, options?: ArkEnvConfigOptions): T;
191
+ declare function withArkEnv<T extends object>(nextConfig: NextConfigFactory<T>, options?: ArkEnvConfigOptions): (phase: string, context: NextConfigContext) => Promise<T>;
192
+ declare function withArkEnv<T extends object>(nextConfig: T, options?: ArkEnvConfigOptions): T;
153
193
  //#endregion
154
- export { extractKeys as a, withArkEnv as i, extractSharedKeys as n, runCodegen as o, setupArkEnv as r, ArkEnvConfigOptions as s, extractClientKeys as t };
155
- //# sourceMappingURL=index-CNzwVE5N.d.cts.map
194
+ export { extractKeys as a, NextConfigContext as c, withArkEnv as i, NextConfigFactory as l, extractSharedKeys as n, runCodegen as o, setupArkEnv as r, ArkEnvConfigOptions as s, extractClientKeys as t };
195
+ //# sourceMappingURL=index-RdYGBD_V.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-RdYGBD_V.d.cts","names":["formatErrorCause","cause","logErrorWithCauseVia","message","log","header","LogLevel","Logger","debug","optionalParams","info","warn","error","LoggerConfig","level","BUILD_PREFIX","WATCHER_PREFIX","formatBuildError","BuildLogHelpers","logBuildWarning","logBuildError","logBuildErrorDetail","logBuildErrorBlankLine","logBuildErrorWithCause","logWatcherError","logWatcherErrorWithCause","createBuildLogHelpers","logger","resolveLogger","bindDefaultBuildLog","isNode","shouldDisableColors","createConsoleLogger","config","defaultLogger","configureDefaultLogger","ArkEnvLogOptions","logLevel","ArkEnvPluginConfig","T","Record","splitPluginConfig","pluginConfig","logOptions","resolveLoggerFromOptions","options","resolveBuildLog","parseLogLevel","value","readEnvLogLevel","resolveLogLevel","shouldLog","Exclude","configuredLevel","messageLevel"],"sources":["../../internal/log/dist/index.d.ts","../src/config/types.ts","../src/config/codegen.ts","../src/config/extract.ts","../src/config/setup.ts"],"mappings":";;;;;;;;KAgBKM,QAAAA;;;;KAIAC,MAAAA;EACHC,KAAAA,GAAQL,OAAAA,aAAoBM,cAAAA;EAC5BC,IAAAA,GAAOP,OAAAA,aAAoBM,cAAAA;EAC3BE,IAAAA,GAAOR,OAAAA,aAAoBM,cAAAA;EAC3BG,KAAAA,GAAQT,OAAAA,aAAoBM,c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`Module`}}),require(`./config-CStvXoN3.cjs`);const e=require(`./arkenv-internal-Cll5pV_F.cjs`),t=require(`./script-D-MYC2Uf.cjs`);let n=require(`@arkenv/core`);function r(t,r){return t&&typeof t==`object`&&(`runtimeEnv`in t||`server`in t||`client`in t||`shared`in t)?e.t(t,!1,void 0,n.arkenv,n.getSchemaKeys):e.t(t,r,{isServer:!1},n.arkenv,n.getSchemaKeys)}exports.ArkEnvScript=t.t,exports.arkenv=r,exports.default=r;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`./config-Oq8dsEPM.cjs`);const e=require(`./arkenv-internal-QxkUlA5J.cjs`),t=require(`./script-DAdH4IEa.cjs`);let n=require(`@arkenv/core`);function r(t,r){return t&&typeof t==`object`&&(`runtimeEnv`in t||`server`in t||`client`in t||`shared`in t)?e.t(t,!1,void 0,n.arkenv,n.getSchemaKeys):e.t(t,r,{isServer:!1},n.arkenv,n.getSchemaKeys)}exports.ArkEnvScript=t.t,exports.arkenv=r,exports.default=r;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["arkenvInternal","coreArkenv","getSchemaKeys"],"sources":["../src/index.ts"],"sourcesContent":["import type { EnvSchema, Infer } from \"@arkenv/core\";\nimport { arkenv as coreArkenv, getSchemaKeys } from \"@arkenv/core\";\nimport type { $ } from \"@repo/scope\";\nimport type { SchemaShape } from \"@repo/types\";\nimport type { type as at, distill } from \"arktype\";\nimport { arkenvInternal } from \"./arkenv-internal\";\nimport type { MergeExtends } from \"./types\";\n\n/**\n * Extract keys from a schema type that are visible on the client:\n * - Keys prefixed with `NEXT_PUBLIC_`\n * - `NODE_ENV` (implicitly shared by Next.js)\n * - Keys listed in `exposeToClient`\n */\ntype ClientVisibleKeys<\n\tTSchema extends SchemaShape,\n\tTExpose extends keyof TSchema,\n> = {\n\t[K in keyof TSchema]: K extends `NEXT_PUBLIC_${string}`\n\t\t? K\n\t\t: K extends \"NODE_ENV\"\n\t\t\t? K\n\t\t\t: K extends TExpose\n\t\t\t\t? K\n\t\t\t\t: never;\n}[keyof TSchema];\n\n/**\n * Create a validated, type-safe environment configuration for Next.js applications (Client-side / SSR entry point).\n */\nexport function arkenv<\n\tconst TSchema extends SchemaShape & { runtimeEnv?: never } = {},\n\tconst TExpose extends keyof TSchema = never,\n\tconst TExtends extends readonly unknown[] = [],\n>(\n\tschema: EnvSchema<TSchema>,\n\toptions?: {\n\t\t/**\n\t\t * Custom environment variables to expose to the client bundle.\n\t\t * By default, variables prefixed with `NEXT_PUBLIC_` and `NODE_ENV` are exposed automatically.\n\t\t * Use this option to expose custom variables that do not have the `NEXT_PUBLIC_` prefix.\n\t\t */\n\t\texposeToClient?: readonly TExpose[];\n\t\t/** @deprecated Use `exposeToClient` instead */\n\t\texpose?: readonly TExpose[];\n\t\t/** @deprecated Use `exposeToClient` instead */\n\t\tshared?: readonly TExpose[];\n\t\textends?: [...TExtends];\n\t\truntimeEnv?: Record<string, unknown>;\n\t},\n): Readonly<\n\tPick<\n\t\tdistill.Out<at.infer<TSchema, $>>,\n\t\tExtract<\n\t\t\tkeyof distill.Out<at.infer<TSchema, $>>,\n\t\t\tClientVisibleKeys<TSchema, TExpose>\n\t\t>\n\t> &\n\t\tMergeExtends<TExtends>\n>;\n\n/**\n * @deprecated Use the unified flat layout signature instead: `arkenv(schema, options)`\n */\nexport function arkenv<\n\tconst TServer extends SchemaShape = {},\n\tconst TClient extends SchemaShape = {},\n\tconst TShared extends SchemaShape = {},\n>(options: {\n\tserver?: EnvSchema<TServer>;\n\tclient?: EnvSchema<TClient> & {\n\t\t[K in keyof TClient]: K extends `NEXT_PUBLIC_${string}` ? unknown : never;\n\t};\n\tshared?: EnvSchema<TShared>;\n\truntimeEnv: Record<keyof TClient | keyof TShared, unknown> &\n\t\tRecord<string, unknown>;\n}): Readonly<Infer<TServer & TClient & TShared>>;\n\nexport function arkenv(schemaOrOptions: any, optionsOrIsServer?: any): any {\n\tconst isLegacy =\n\t\tschemaOrOptions &&\n\t\ttypeof schemaOrOptions === \"object\" &&\n\t\t(\"runtimeEnv\" in schemaOrOptions ||\n\t\t\t\"server\" in schemaOrOptions ||\n\t\t\t\"client\" in schemaOrOptions ||\n\t\t\t\"shared\" in schemaOrOptions);\n\n\tif (isLegacy) {\n\t\treturn arkenvInternal(\n\t\t\tschemaOrOptions,\n\t\t\tfalse,\n\t\t\tundefined,\n\t\t\tcoreArkenv,\n\t\t\tgetSchemaKeys,\n\t\t);\n\t}\n\n\treturn arkenvInternal(\n\t\tschemaOrOptions,\n\t\toptionsOrIsServer,\n\t\t{ isServer: false },\n\t\tcoreArkenv,\n\t\tgetSchemaKeys,\n\t);\n}\n\nexport type { ArkEnvScriptProps } from \"./script\";\nexport { ArkEnvScript } from \"./script\";\n\n/**\n * ArkEnv's Next.js integration export\n *\n * {@link https://arkenv.js.org | ArkEnv} is a typesafe environment variables validator from editor to runtime.\n */\nexport default arkenv;\n"],"mappings":"mPA8EA,SAAgB,EAAO,EAAsB,EAA8B,CAmB1E,OAjBC,GACA,OAAO,GAAoB,WAC1B,eAAgB,GAChB,WAAY,GACZ,WAAY,GACZ,WAAY,GAGNA,EAAAA,EACN,EACA,GACA,IAAA,GACAC,EAAAA,OACAC,EAAAA,cACA,CAGKF,EAAAA,EACN,EACA,EACA,CAAE,SAAU,GAAO,CACnBC,EAAAA,OACAC,EAAAA,cACA"}
1
+ {"version":3,"file":"index.cjs","names":["arkenvInternal","coreArkenv","getSchemaKeys"],"sources":["../src/index.ts"],"sourcesContent":["import type { EnvSchema, Infer } from \"@arkenv/core\";\nimport { arkenv as coreArkenv, getSchemaKeys } from \"@arkenv/core\";\nimport type { $ } from \"@repo/scope\";\nimport type { SchemaShape } from \"@repo/types\";\nimport type { type as at, distill } from \"arktype\";\nimport { arkenvInternal } from \"./arkenv-internal\";\nimport type { MergeExtends } from \"./types\";\n\n/**\n * Extract keys from a schema type that are visible on the client:\n * - Keys prefixed with `NEXT_PUBLIC_`\n * - `NODE_ENV` (implicitly shared by Next.js)\n * - Keys listed in `exposeToClient`\n */\ntype ClientVisibleKeys<\n\tTSchema extends SchemaShape,\n\tTExpose extends keyof TSchema,\n> = {\n\t[K in keyof TSchema]: K extends `NEXT_PUBLIC_${string}`\n\t\t? K\n\t\t: K extends \"NODE_ENV\"\n\t\t\t? K\n\t\t\t: K extends TExpose\n\t\t\t\t? K\n\t\t\t\t: never;\n}[keyof TSchema];\n\n/**\n * Create a validated, typesafe environment configuration for Next.js applications (Client-side / SSR entry point).\n */\nexport function arkenv<\n\tconst TSchema extends SchemaShape & { runtimeEnv?: never } = {},\n\tconst TExpose extends keyof TSchema = never,\n\tconst TExtends extends readonly unknown[] = [],\n>(\n\tschema: EnvSchema<TSchema>,\n\toptions?: {\n\t\t/**\n\t\t * Custom environment variables to expose to the client bundle.\n\t\t * By default, variables prefixed with `NEXT_PUBLIC_` and `NODE_ENV` are exposed automatically.\n\t\t * Use this option to expose custom variables that do not have the `NEXT_PUBLIC_` prefix.\n\t\t */\n\t\texposeToClient?: readonly TExpose[];\n\t\t/**\n\t\t * @deprecated Use `exposeToClient` instead\n\t\t */\n\t\texpose?: readonly TExpose[];\n\t\t/**\n\t\t * @deprecated Use `exposeToClient` instead\n\t\t */\n\t\tshared?: readonly TExpose[];\n\t\textends?: [...TExtends];\n\t\truntimeEnv?: Record<string, unknown>;\n\t},\n): Readonly<\n\tPick<\n\t\tdistill.Out<at.infer<TSchema, $>>,\n\t\tExtract<\n\t\t\tkeyof distill.Out<at.infer<TSchema, $>>,\n\t\t\tClientVisibleKeys<TSchema, TExpose>\n\t\t>\n\t> &\n\t\tMergeExtends<TExtends>\n>;\n\n/**\n * @deprecated Use the unified flat layout signature instead: `arkenv(schema, options)`\n */\nexport function arkenv<\n\tconst TServer extends SchemaShape = {},\n\tconst TClient extends SchemaShape = {},\n\tconst TShared extends SchemaShape = {},\n>(options: {\n\tserver?: EnvSchema<TServer>;\n\tclient?: EnvSchema<TClient> & {\n\t\t[K in keyof TClient]: K extends `NEXT_PUBLIC_${string}` ? unknown : never;\n\t};\n\tshared?: EnvSchema<TShared>;\n\truntimeEnv: Record<keyof TClient | keyof TShared, unknown> &\n\t\tRecord<string, unknown>;\n}): Readonly<Infer<TServer & TClient & TShared>>;\n\nexport function arkenv(schemaOrOptions: any, optionsOrIsServer?: any): any {\n\tconst isLegacy =\n\t\tschemaOrOptions &&\n\t\ttypeof schemaOrOptions === \"object\" &&\n\t\t(\"runtimeEnv\" in schemaOrOptions ||\n\t\t\t\"server\" in schemaOrOptions ||\n\t\t\t\"client\" in schemaOrOptions ||\n\t\t\t\"shared\" in schemaOrOptions);\n\n\tif (isLegacy) {\n\t\treturn arkenvInternal(\n\t\t\tschemaOrOptions,\n\t\t\tfalse,\n\t\t\tundefined,\n\t\t\tcoreArkenv,\n\t\t\tgetSchemaKeys,\n\t\t);\n\t}\n\n\treturn arkenvInternal(\n\t\tschemaOrOptions,\n\t\toptionsOrIsServer,\n\t\t{ isServer: false },\n\t\tcoreArkenv,\n\t\tgetSchemaKeys,\n\t);\n}\n\nexport type { ArkEnvScriptProps } from \"./script\";\nexport { ArkEnvScript } from \"./script\";\n\nexport default arkenv;\n"],"mappings":"mPAkFA,SAAgB,EAAO,EAAsB,EAA8B,CAmB1E,OAjBC,GACA,OAAO,GAAoB,WAC1B,eAAgB,GAChB,WAAY,GACZ,WAAY,GACZ,WAAY,GAGNA,EAAAA,EACN,EACA,GACA,IAAA,GACAC,EAAAA,OACAC,EAAAA,cACA,CAGKF,EAAAA,EACN,EACA,EACA,CAAE,SAAU,GAAO,CACnBC,EAAAA,OACAC,EAAAA,cACA"}
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { a as $, t as SchemaShape } from "./index-96RGPyfa.cjs";
2
- import { t as MergeExtends } from "./types-44R9mgTa.cjs";
1
+ import { a as $, t as SchemaShape } from "./index-BS1wAitS.cjs";
2
+ import { t as MergeExtends } from "./types-BlRHnQwj.cjs";
3
3
  import { n as ArkEnvScriptProps, t as ArkEnvScript } from "./script-BHFJ0MU_.cjs";
4
4
  import { EnvSchema, Infer } from "@arkenv/core";
5
5
  import { distill, type } from "arktype";
@@ -13,7 +13,7 @@ import { distill, type } from "arktype";
13
13
  */
14
14
  type ClientVisibleKeys<TSchema extends SchemaShape, TExpose extends keyof TSchema> = { [K in keyof TSchema]: K extends `NEXT_PUBLIC_${string}` ? K : K extends "NODE_ENV" ? K : K extends TExpose ? K : never }[keyof TSchema];
15
15
  /**
16
- * Create a validated, type-safe environment configuration for Next.js applications (Client-side / SSR entry point).
16
+ * Create a validated, typesafe environment configuration for Next.js applications (Client-side / SSR entry point).
17
17
  */
18
18
  declare function arkenv<const TSchema extends SchemaShape & {
19
19
  runtimeEnv?: never;
@@ -23,8 +23,14 @@ declare function arkenv<const TSchema extends SchemaShape & {
23
23
  * By default, variables prefixed with `NEXT_PUBLIC_` and `NODE_ENV` are exposed automatically.
24
24
  * Use this option to expose custom variables that do not have the `NEXT_PUBLIC_` prefix.
25
25
  */
26
- exposeToClient?: readonly TExpose[]; /** @deprecated Use `exposeToClient` instead */
27
- expose?: readonly TExpose[]; /** @deprecated Use `exposeToClient` instead */
26
+ exposeToClient?: readonly TExpose[];
27
+ /**
28
+ * @deprecated Use `exposeToClient` instead
29
+ */
30
+ expose?: readonly TExpose[];
31
+ /**
32
+ * @deprecated Use `exposeToClient` instead
33
+ */
28
34
  shared?: readonly TExpose[];
29
35
  extends?: [...TExtends];
30
36
  runtimeEnv?: Record<string, unknown>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;;;AAM4C;;;;KAQvC,iBAAA,iBACY,WAAA,wBACM,OAAA,kBAEV,OAAA,GAAU,CAAA,mCACnB,CAAA,GACA,CAAA,sBACC,CAAA,GACA,CAAA,SAAU,OAAA,GACT,CAAA,iBAEE,OAAA;;;;iBAKQ,MAAA,uBACO,WAAA;EAAgB,UAA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3BhB;;;EA+BF,MAAA,YAAkB,OAAA;EAClB,OAAA,OAAc,QAAA;EACd,UAAA,GAAa,MAAA;AAAA,IAEZ,QAAA,CACF,IAAA,CACC,OAAA,CAAQ,GAAA,CAAI,IAAA,CAAG,KAAA,CAAM,OAAA,EAAS,CAAA,IAC9B,OAAA,OACO,OAAA,CAAQ,GAAA,CAAI,IAAA,CAAG,KAAA,CAAM,OAAA,EAAS,CAAA,IACpC,iBAAA,CAAkB,OAAA,EAAS,OAAA,MAG5B,YAAA,CAAa,QAAA;;;AAhCf;iBAsCgB,MAAA,uBACO,WAAA,6BACA,WAAA,6BACA,WAAA,MAAA,CACrB,OAAA;EACD,MAAA,GAAS,SAAA,CAAU,OAAA;EACnB,MAAA,GAAS,SAAA,CAAU,OAAA,kBACN,OAAA,GAAU,CAAA;EAEvB,MAAA,GAAS,SAAA,CAAU,OAAA;EACnB,UAAA,EAAY,MAAA,OAAa,OAAA,SAAgB,OAAA,aACxC,MAAA;AAAA,IACE,QAAA,CAAS,KAAA,CAAM,OAAA,GAAU,OAAA,GAAU,OAAA"}
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { a as $, t as SchemaShape } from "./index-bjEZwPUt.js";
2
- import { t as MergeExtends } from "./types-BzMGTYWv.js";
3
- import { n as ArkEnvScriptProps, t as ArkEnvScript } from "./script-7FFqInPq.js";
1
+ import { a as $, t as SchemaShape } from "./index-Cq_qJ68V.js";
2
+ import { t as MergeExtends } from "./types-BfMBbrMm.js";
3
+ import { n as ArkEnvScriptProps, t as ArkEnvScript } from "./script-Cy9x6rp9.js";
4
4
  import { EnvSchema, Infer } from "@arkenv/core";
5
5
  import { distill, type } from "arktype";
6
6
 
@@ -13,7 +13,7 @@ import { distill, type } from "arktype";
13
13
  */
14
14
  type ClientVisibleKeys<TSchema extends SchemaShape, TExpose extends keyof TSchema> = { [K in keyof TSchema]: K extends `NEXT_PUBLIC_${string}` ? K : K extends "NODE_ENV" ? K : K extends TExpose ? K : never }[keyof TSchema];
15
15
  /**
16
- * Create a validated, type-safe environment configuration for Next.js applications (Client-side / SSR entry point).
16
+ * Create a validated, typesafe environment configuration for Next.js applications (Client-side / SSR entry point).
17
17
  */
18
18
  declare function arkenv<const TSchema extends SchemaShape & {
19
19
  runtimeEnv?: never;
@@ -23,8 +23,14 @@ declare function arkenv<const TSchema extends SchemaShape & {
23
23
  * By default, variables prefixed with `NEXT_PUBLIC_` and `NODE_ENV` are exposed automatically.
24
24
  * Use this option to expose custom variables that do not have the `NEXT_PUBLIC_` prefix.
25
25
  */
26
- exposeToClient?: readonly TExpose[]; /** @deprecated Use `exposeToClient` instead */
27
- expose?: readonly TExpose[]; /** @deprecated Use `exposeToClient` instead */
26
+ exposeToClient?: readonly TExpose[];
27
+ /**
28
+ * @deprecated Use `exposeToClient` instead
29
+ */
30
+ expose?: readonly TExpose[];
31
+ /**
32
+ * @deprecated Use `exposeToClient` instead
33
+ */
28
34
  shared?: readonly TExpose[];
29
35
  extends?: [...TExtends];
30
36
  runtimeEnv?: Record<string, unknown>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;;;AAM4C;;;;KAQvC,iBAAA,iBACY,WAAA,wBACM,OAAA,kBAEV,OAAA,GAAU,CAAA,mCACnB,CAAA,GACA,CAAA,sBACC,CAAA,GACA,CAAA,SAAU,OAAA,GACT,CAAA,iBAEE,OAAA;;;;iBAKQ,MAAA,uBACO,WAAA;EAAgB,UAAA;AAAA,oCACV,OAAA,yDAAA,CAG5B,MAAA,EAAQ,SAAA,CAAU,OAAA,GAClB,OAAA;EAXO;;;;;EAiBN,cAAA,YAA0B,OAAA,IA1BL;EA4BrB,MAAA,YAAkB,OAAA,IA1BP;EA4BX,MAAA,YAAkB,OAAA;EAClB,OAAA,OAAc,QAAA;EACd,UAAA,GAAa,MAAA;AAAA,IAEZ,QAAA,CACF,IAAA,CACC,OAAA,CAAQ,GAAA,CAAI,IAAA,CAAG,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AAA,MAG5B,YAAA,CAAa,QAAA;;;AAhCf;iBAsCgB,MAAA,uBACO,WAAA,6BACA,WAAA,6BACA,WAAA,MAAA,CACrB,OAAA;EACD,MAAA,GAAS,SAAA,CAAU,OAAA;EACnB,MAAA,GAAS,SAAA,CAAU,OAAA,kBACN,OAAA,GAAU,CAAA;EAEvB,MAAA,GAAS,SAAA,CAAU,OAAA;EACnB,UAAA,EAAY,MAAA,OAAa,OAAA,SAAgB,OAAA,aACxC,MAAA;AAAA,IACE,QAAA,CAAS,KAAA,CAAM,OAAA,GAAU,OAAA,GAAU,OAAA"}
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import{t as e}from"./arkenv-internal-DEN5DTmX.js";import{t}from"./script-CZOPkAw3.js";import{arkenv as n,getSchemaKeys as r}from"@arkenv/core";function i(t,i){return t&&typeof t==`object`&&(`runtimeEnv`in t||`server`in t||`client`in t||`shared`in t)?e(t,!1,void 0,n,r):e(t,i,{isServer:!1},n,r)}export{t as ArkEnvScript,i as arkenv,i as default};
1
+ import{t as e}from"./arkenv-internal-Ws3srax6.js";import{t}from"./script-CZOPkAw3.js";import{arkenv as n,getSchemaKeys as r}from"@arkenv/core";function i(t,i){return t&&typeof t==`object`&&(`runtimeEnv`in t||`server`in t||`client`in t||`shared`in t)?e(t,!1,void 0,n,r):e(t,i,{isServer:!1},n,r)}export{t as ArkEnvScript,i as arkenv,i as default};
2
2
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["coreArkenv"],"sources":["../src/index.ts"],"sourcesContent":["import type { EnvSchema, Infer } from \"@arkenv/core\";\nimport { arkenv as coreArkenv, getSchemaKeys } from \"@arkenv/core\";\nimport type { $ } from \"@repo/scope\";\nimport type { SchemaShape } from \"@repo/types\";\nimport type { type as at, distill } from \"arktype\";\nimport { arkenvInternal } from \"./arkenv-internal\";\nimport type { MergeExtends } from \"./types\";\n\n/**\n * Extract keys from a schema type that are visible on the client:\n * - Keys prefixed with `NEXT_PUBLIC_`\n * - `NODE_ENV` (implicitly shared by Next.js)\n * - Keys listed in `exposeToClient`\n */\ntype ClientVisibleKeys<\n\tTSchema extends SchemaShape,\n\tTExpose extends keyof TSchema,\n> = {\n\t[K in keyof TSchema]: K extends `NEXT_PUBLIC_${string}`\n\t\t? K\n\t\t: K extends \"NODE_ENV\"\n\t\t\t? K\n\t\t\t: K extends TExpose\n\t\t\t\t? K\n\t\t\t\t: never;\n}[keyof TSchema];\n\n/**\n * Create a validated, type-safe environment configuration for Next.js applications (Client-side / SSR entry point).\n */\nexport function arkenv<\n\tconst TSchema extends SchemaShape & { runtimeEnv?: never } = {},\n\tconst TExpose extends keyof TSchema = never,\n\tconst TExtends extends readonly unknown[] = [],\n>(\n\tschema: EnvSchema<TSchema>,\n\toptions?: {\n\t\t/**\n\t\t * Custom environment variables to expose to the client bundle.\n\t\t * By default, variables prefixed with `NEXT_PUBLIC_` and `NODE_ENV` are exposed automatically.\n\t\t * Use this option to expose custom variables that do not have the `NEXT_PUBLIC_` prefix.\n\t\t */\n\t\texposeToClient?: readonly TExpose[];\n\t\t/** @deprecated Use `exposeToClient` instead */\n\t\texpose?: readonly TExpose[];\n\t\t/** @deprecated Use `exposeToClient` instead */\n\t\tshared?: readonly TExpose[];\n\t\textends?: [...TExtends];\n\t\truntimeEnv?: Record<string, unknown>;\n\t},\n): Readonly<\n\tPick<\n\t\tdistill.Out<at.infer<TSchema, $>>,\n\t\tExtract<\n\t\t\tkeyof distill.Out<at.infer<TSchema, $>>,\n\t\t\tClientVisibleKeys<TSchema, TExpose>\n\t\t>\n\t> &\n\t\tMergeExtends<TExtends>\n>;\n\n/**\n * @deprecated Use the unified flat layout signature instead: `arkenv(schema, options)`\n */\nexport function arkenv<\n\tconst TServer extends SchemaShape = {},\n\tconst TClient extends SchemaShape = {},\n\tconst TShared extends SchemaShape = {},\n>(options: {\n\tserver?: EnvSchema<TServer>;\n\tclient?: EnvSchema<TClient> & {\n\t\t[K in keyof TClient]: K extends `NEXT_PUBLIC_${string}` ? unknown : never;\n\t};\n\tshared?: EnvSchema<TShared>;\n\truntimeEnv: Record<keyof TClient | keyof TShared, unknown> &\n\t\tRecord<string, unknown>;\n}): Readonly<Infer<TServer & TClient & TShared>>;\n\nexport function arkenv(schemaOrOptions: any, optionsOrIsServer?: any): any {\n\tconst isLegacy =\n\t\tschemaOrOptions &&\n\t\ttypeof schemaOrOptions === \"object\" &&\n\t\t(\"runtimeEnv\" in schemaOrOptions ||\n\t\t\t\"server\" in schemaOrOptions ||\n\t\t\t\"client\" in schemaOrOptions ||\n\t\t\t\"shared\" in schemaOrOptions);\n\n\tif (isLegacy) {\n\t\treturn arkenvInternal(\n\t\t\tschemaOrOptions,\n\t\t\tfalse,\n\t\t\tundefined,\n\t\t\tcoreArkenv,\n\t\t\tgetSchemaKeys,\n\t\t);\n\t}\n\n\treturn arkenvInternal(\n\t\tschemaOrOptions,\n\t\toptionsOrIsServer,\n\t\t{ isServer: false },\n\t\tcoreArkenv,\n\t\tgetSchemaKeys,\n\t);\n}\n\nexport type { ArkEnvScriptProps } from \"./script\";\nexport { ArkEnvScript } from \"./script\";\n\n/**\n * ArkEnv's Next.js integration export\n *\n * {@link https://arkenv.js.org | ArkEnv} is a typesafe environment variables validator from editor to runtime.\n */\nexport default arkenv;\n"],"mappings":"+IA8EA,SAAgB,EAAO,EAAsB,EAA8B,CAmB1E,OAjBC,GACA,OAAO,GAAoB,WAC1B,eAAgB,GAChB,WAAY,GACZ,WAAY,GACZ,WAAY,GAGN,EACN,EACA,GACA,IAAA,GACAA,EACA,EACA,CAGK,EACN,EACA,EACA,CAAE,SAAU,GAAO,CACnBA,EACA,EACA"}
1
+ {"version":3,"file":"index.js","names":["coreArkenv"],"sources":["../src/index.ts"],"sourcesContent":["import type { EnvSchema, Infer } from \"@arkenv/core\";\nimport { arkenv as coreArkenv, getSchemaKeys } from \"@arkenv/core\";\nimport type { $ } from \"@repo/scope\";\nimport type { SchemaShape } from \"@repo/types\";\nimport type { type as at, distill } from \"arktype\";\nimport { arkenvInternal } from \"./arkenv-internal\";\nimport type { MergeExtends } from \"./types\";\n\n/**\n * Extract keys from a schema type that are visible on the client:\n * - Keys prefixed with `NEXT_PUBLIC_`\n * - `NODE_ENV` (implicitly shared by Next.js)\n * - Keys listed in `exposeToClient`\n */\ntype ClientVisibleKeys<\n\tTSchema extends SchemaShape,\n\tTExpose extends keyof TSchema,\n> = {\n\t[K in keyof TSchema]: K extends `NEXT_PUBLIC_${string}`\n\t\t? K\n\t\t: K extends \"NODE_ENV\"\n\t\t\t? K\n\t\t\t: K extends TExpose\n\t\t\t\t? K\n\t\t\t\t: never;\n}[keyof TSchema];\n\n/**\n * Create a validated, typesafe environment configuration for Next.js applications (Client-side / SSR entry point).\n */\nexport function arkenv<\n\tconst TSchema extends SchemaShape & { runtimeEnv?: never } = {},\n\tconst TExpose extends keyof TSchema = never,\n\tconst TExtends extends readonly unknown[] = [],\n>(\n\tschema: EnvSchema<TSchema>,\n\toptions?: {\n\t\t/**\n\t\t * Custom environment variables to expose to the client bundle.\n\t\t * By default, variables prefixed with `NEXT_PUBLIC_` and `NODE_ENV` are exposed automatically.\n\t\t * Use this option to expose custom variables that do not have the `NEXT_PUBLIC_` prefix.\n\t\t */\n\t\texposeToClient?: readonly TExpose[];\n\t\t/**\n\t\t * @deprecated Use `exposeToClient` instead\n\t\t */\n\t\texpose?: readonly TExpose[];\n\t\t/**\n\t\t * @deprecated Use `exposeToClient` instead\n\t\t */\n\t\tshared?: readonly TExpose[];\n\t\textends?: [...TExtends];\n\t\truntimeEnv?: Record<string, unknown>;\n\t},\n): Readonly<\n\tPick<\n\t\tdistill.Out<at.infer<TSchema, $>>,\n\t\tExtract<\n\t\t\tkeyof distill.Out<at.infer<TSchema, $>>,\n\t\t\tClientVisibleKeys<TSchema, TExpose>\n\t\t>\n\t> &\n\t\tMergeExtends<TExtends>\n>;\n\n/**\n * @deprecated Use the unified flat layout signature instead: `arkenv(schema, options)`\n */\nexport function arkenv<\n\tconst TServer extends SchemaShape = {},\n\tconst TClient extends SchemaShape = {},\n\tconst TShared extends SchemaShape = {},\n>(options: {\n\tserver?: EnvSchema<TServer>;\n\tclient?: EnvSchema<TClient> & {\n\t\t[K in keyof TClient]: K extends `NEXT_PUBLIC_${string}` ? unknown : never;\n\t};\n\tshared?: EnvSchema<TShared>;\n\truntimeEnv: Record<keyof TClient | keyof TShared, unknown> &\n\t\tRecord<string, unknown>;\n}): Readonly<Infer<TServer & TClient & TShared>>;\n\nexport function arkenv(schemaOrOptions: any, optionsOrIsServer?: any): any {\n\tconst isLegacy =\n\t\tschemaOrOptions &&\n\t\ttypeof schemaOrOptions === \"object\" &&\n\t\t(\"runtimeEnv\" in schemaOrOptions ||\n\t\t\t\"server\" in schemaOrOptions ||\n\t\t\t\"client\" in schemaOrOptions ||\n\t\t\t\"shared\" in schemaOrOptions);\n\n\tif (isLegacy) {\n\t\treturn arkenvInternal(\n\t\t\tschemaOrOptions,\n\t\t\tfalse,\n\t\t\tundefined,\n\t\t\tcoreArkenv,\n\t\t\tgetSchemaKeys,\n\t\t);\n\t}\n\n\treturn arkenvInternal(\n\t\tschemaOrOptions,\n\t\toptionsOrIsServer,\n\t\t{ isServer: false },\n\t\tcoreArkenv,\n\t\tgetSchemaKeys,\n\t);\n}\n\nexport type { ArkEnvScriptProps } from \"./script\";\nexport { ArkEnvScript } from \"./script\";\n\nexport default arkenv;\n"],"mappings":"+IAkFA,SAAgB,EAAO,EAAsB,EAA8B,CAmB1E,OAjBC,GACA,OAAO,GAAoB,WAC1B,eAAgB,GAChB,WAAY,GACZ,WAAY,GACZ,WAAY,GAGN,EACN,EACA,GACA,IAAA,GACAA,EACA,EACA,CAGK,EACN,EACA,EACA,CAAE,SAAU,GAAO,CACnBA,EACA,EACA"}
@@ -1,2 +1,2 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`./config-CStvXoN3.cjs`);const e=require(`./arkenv-internal-Cll5pV_F.cjs`),t=require(`./script-D-MYC2Uf.cjs`);let n=require(`@arkenv/core`);function r(t,r){return t&&typeof t==`object`&&(`runtimeEnv`in t||`server`in t||`client`in t||`shared`in t)?e.t(t,!0,void 0,n.arkenv,n.getSchemaKeys):e.t(t,r,{isServer:!0},n.arkenv,n.getSchemaKeys)}exports.ArkEnvScript=t.t,exports.arkenv=r,exports.default=r;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`./config-Oq8dsEPM.cjs`);const e=require(`./arkenv-internal-QxkUlA5J.cjs`),t=require(`./script-DAdH4IEa.cjs`);let n=require(`@arkenv/core`);function r(t,r){return t&&typeof t==`object`&&(`runtimeEnv`in t||`server`in t||`client`in t||`shared`in t)?e.t(t,!0,void 0,n.arkenv,n.getSchemaKeys):e.t(t,r,{isServer:!0},n.arkenv,n.getSchemaKeys)}exports.ArkEnvScript=t.t,exports.arkenv=r,exports.default=r;
2
2
  //# sourceMappingURL=react-server.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"react-server.cjs","names":["arkenvInternal","coreArkenv","getSchemaKeys"],"sources":["../src/react-server.ts"],"sourcesContent":["import type { EnvSchema, Infer } from \"@arkenv/core\";\nimport { arkenv as coreArkenv, getSchemaKeys } from \"@arkenv/core\";\nimport type { $ } from \"@repo/scope\";\nimport type { SchemaShape } from \"@repo/types\";\nimport type { type as at, distill } from \"arktype\";\nimport { arkenvInternal } from \"./arkenv-internal\";\nimport type { MergeExtends } from \"./types\";\n\n/**\n * Create a validated, type-safe environment configuration for Next.js applications (Server-side RSC entry point).\n */\nexport function arkenv<\n\tconst TSchema extends SchemaShape & { runtimeEnv?: never } = {},\n\tconst TShared extends keyof TSchema = never,\n\tconst TExtends extends readonly unknown[] = [],\n>(\n\tschema: EnvSchema<TSchema>,\n\toptions?: {\n\t\t/**\n\t\t * Custom environment variables to expose to the client bundle.\n\t\t * By default, variables prefixed with `NEXT_PUBLIC_` and `NODE_ENV` are exposed automatically.\n\t\t * Use this option to expose custom variables that do not have the `NEXT_PUBLIC_` prefix.\n\t\t */\n\t\texposeToClient?: readonly TShared[];\n\t\t/** @deprecated Use `exposeToClient` instead */\n\t\texpose?: readonly TShared[];\n\t\t/** @deprecated Use `exposeToClient` instead */\n\t\tshared?: readonly TShared[];\n\t\textends?: [...TExtends];\n\t\truntimeEnv?: Record<string, unknown>;\n\t},\n): Readonly<distill.Out<at.infer<TSchema, $>> & MergeExtends<TExtends>>;\n\n/**\n * @deprecated Use the unified flat layout signature instead: `arkenv(schema, options)`\n */\nexport function arkenv<\n\tconst TServer extends SchemaShape = {},\n\tconst TClient extends SchemaShape = {},\n\tconst TShared extends SchemaShape = {},\n>(options: {\n\tserver?: EnvSchema<TServer>;\n\tclient?: EnvSchema<TClient> & {\n\t\t[K in keyof TClient]: K extends `NEXT_PUBLIC_${string}` ? unknown : never;\n\t};\n\tshared?: EnvSchema<TShared>;\n\truntimeEnv: Record<keyof TClient | keyof TShared, unknown> &\n\t\tRecord<string, unknown>;\n}): Readonly<Infer<TServer & TClient & TShared>>;\n\nexport function arkenv(schemaOrOptions: any, optionsOrIsServer?: any): any {\n\tconst isLegacy =\n\t\tschemaOrOptions &&\n\t\ttypeof schemaOrOptions === \"object\" &&\n\t\t(\"runtimeEnv\" in schemaOrOptions ||\n\t\t\t\"server\" in schemaOrOptions ||\n\t\t\t\"client\" in schemaOrOptions ||\n\t\t\t\"shared\" in schemaOrOptions);\n\n\tif (isLegacy) {\n\t\treturn arkenvInternal(\n\t\t\tschemaOrOptions,\n\t\t\ttrue,\n\t\t\tundefined,\n\t\t\tcoreArkenv,\n\t\t\tgetSchemaKeys,\n\t\t);\n\t}\n\n\treturn arkenvInternal(\n\t\tschemaOrOptions,\n\t\toptionsOrIsServer,\n\t\t{ isServer: true },\n\t\tcoreArkenv,\n\t\tgetSchemaKeys,\n\t);\n}\n\nexport type { ArkEnvScriptProps } from \"./script\";\nexport { ArkEnvScript } from \"./script\";\n\n/**\n * ArkEnv's Next.js integration export\n *\n * {@link https://arkenv.js.org | ArkEnv} is a typesafe environment variables validator from editor to runtime.\n */\nexport default arkenv;\n"],"mappings":"mPAkDA,SAAgB,EAAO,EAAsB,EAA8B,CAmB1E,OAjBC,GACA,OAAO,GAAoB,WAC1B,eAAgB,GAChB,WAAY,GACZ,WAAY,GACZ,WAAY,GAGNA,EAAAA,EACN,EACA,GACA,IAAA,GACAC,EAAAA,OACAC,EAAAA,cACA,CAGKF,EAAAA,EACN,EACA,EACA,CAAE,SAAU,GAAM,CAClBC,EAAAA,OACAC,EAAAA,cACA"}
1
+ {"version":3,"file":"react-server.cjs","names":["arkenvInternal","coreArkenv","getSchemaKeys"],"sources":["../src/react-server.ts"],"sourcesContent":["import type { EnvSchema, Infer } from \"@arkenv/core\";\nimport { arkenv as coreArkenv, getSchemaKeys } from \"@arkenv/core\";\nimport type { $ } from \"@repo/scope\";\nimport type { SchemaShape } from \"@repo/types\";\nimport type { type as at, distill } from \"arktype\";\nimport { arkenvInternal } from \"./arkenv-internal\";\nimport type { MergeExtends } from \"./types\";\n\n/**\n * Create a validated, typesafe environment configuration for Next.js applications (Server-side RSC entry point).\n */\nexport function arkenv<\n\tconst TSchema extends SchemaShape & { runtimeEnv?: never } = {},\n\tconst TShared extends keyof TSchema = never,\n\tconst TExtends extends readonly unknown[] = [],\n>(\n\tschema: EnvSchema<TSchema>,\n\toptions?: {\n\t\t/**\n\t\t * Custom environment variables to expose to the client bundle.\n\t\t * By default, variables prefixed with `NEXT_PUBLIC_` and `NODE_ENV` are exposed automatically.\n\t\t * Use this option to expose custom variables that do not have the `NEXT_PUBLIC_` prefix.\n\t\t */\n\t\texposeToClient?: readonly TShared[];\n\t\t/**\n\t\t * @deprecated Use `exposeToClient` instead\n\t\t */\n\t\texpose?: readonly TShared[];\n\t\t/**\n\t\t * @deprecated Use `exposeToClient` instead\n\t\t */\n\t\tshared?: readonly TShared[];\n\t\textends?: [...TExtends];\n\t\truntimeEnv?: Record<string, unknown>;\n\t},\n): Readonly<distill.Out<at.infer<TSchema, $>> & MergeExtends<TExtends>>;\n\n/**\n * @deprecated Use the unified flat layout signature instead: `arkenv(schema, options)`\n */\nexport function arkenv<\n\tconst TServer extends SchemaShape = {},\n\tconst TClient extends SchemaShape = {},\n\tconst TShared extends SchemaShape = {},\n>(options: {\n\tserver?: EnvSchema<TServer>;\n\tclient?: EnvSchema<TClient> & {\n\t\t[K in keyof TClient]: K extends `NEXT_PUBLIC_${string}` ? unknown : never;\n\t};\n\tshared?: EnvSchema<TShared>;\n\truntimeEnv: Record<keyof TClient | keyof TShared, unknown> &\n\t\tRecord<string, unknown>;\n}): Readonly<Infer<TServer & TClient & TShared>>;\n\nexport function arkenv(schemaOrOptions: any, optionsOrIsServer?: any): any {\n\tconst isLegacy =\n\t\tschemaOrOptions &&\n\t\ttypeof schemaOrOptions === \"object\" &&\n\t\t(\"runtimeEnv\" in schemaOrOptions ||\n\t\t\t\"server\" in schemaOrOptions ||\n\t\t\t\"client\" in schemaOrOptions ||\n\t\t\t\"shared\" in schemaOrOptions);\n\n\tif (isLegacy) {\n\t\treturn arkenvInternal(\n\t\t\tschemaOrOptions,\n\t\t\ttrue,\n\t\t\tundefined,\n\t\t\tcoreArkenv,\n\t\t\tgetSchemaKeys,\n\t\t);\n\t}\n\n\treturn arkenvInternal(\n\t\tschemaOrOptions,\n\t\toptionsOrIsServer,\n\t\t{ isServer: true },\n\t\tcoreArkenv,\n\t\tgetSchemaKeys,\n\t);\n}\n\nexport type { ArkEnvScriptProps } from \"./script\";\nexport { ArkEnvScript } from \"./script\";\n\nexport default arkenv;\n"],"mappings":"mPAsDA,SAAgB,EAAO,EAAsB,EAA8B,CAmB1E,OAjBC,GACA,OAAO,GAAoB,WAC1B,eAAgB,GAChB,WAAY,GACZ,WAAY,GACZ,WAAY,GAGNA,EAAAA,EACN,EACA,GACA,IAAA,GACAC,EAAAA,OACAC,EAAAA,cACA,CAGKF,EAAAA,EACN,EACA,EACA,CAAE,SAAU,GAAM,CAClBC,EAAAA,OACAC,EAAAA,cACA"}
@@ -1,12 +1,12 @@
1
- import { a as $, t as SchemaShape } from "./index-96RGPyfa.cjs";
2
- import { t as MergeExtends } from "./types-44R9mgTa.cjs";
1
+ import { a as $, t as SchemaShape } from "./index-BS1wAitS.cjs";
2
+ import { t as MergeExtends } from "./types-BlRHnQwj.cjs";
3
3
  import { n as ArkEnvScriptProps, t as ArkEnvScript } from "./script-BHFJ0MU_.cjs";
4
4
  import { EnvSchema, Infer } from "@arkenv/core";
5
5
  import { distill, type } from "arktype";
6
6
 
7
7
  //#region src/react-server.d.ts
8
8
  /**
9
- * Create a validated, type-safe environment configuration for Next.js applications (Server-side RSC entry point).
9
+ * Create a validated, typesafe environment configuration for Next.js applications (Server-side RSC entry point).
10
10
  */
11
11
  declare function arkenv<const TSchema extends SchemaShape & {
12
12
  runtimeEnv?: never;
@@ -16,8 +16,14 @@ declare function arkenv<const TSchema extends SchemaShape & {
16
16
  * By default, variables prefixed with `NEXT_PUBLIC_` and `NODE_ENV` are exposed automatically.
17
17
  * Use this option to expose custom variables that do not have the `NEXT_PUBLIC_` prefix.
18
18
  */
19
- exposeToClient?: readonly TShared[]; /** @deprecated Use `exposeToClient` instead */
20
- expose?: readonly TShared[]; /** @deprecated Use `exposeToClient` instead */
19
+ exposeToClient?: readonly TShared[];
20
+ /**
21
+ * @deprecated Use `exposeToClient` instead
22
+ */
23
+ expose?: readonly TShared[];
24
+ /**
25
+ * @deprecated Use `exposeToClient` instead
26
+ */
21
27
  shared?: readonly TShared[];
22
28
  extends?: [...TExtends];
23
29
  runtimeEnv?: Record<string, unknown>;
@@ -1 +1 @@
1
- {"version":3,"file":"react-server.d.cts","names":[],"sources":["../src/react-server.ts"],"mappings":";;;;;;;;;AAWA;iBAAgB,MAAA,uBACO,WAAA;EAAgB,UAAA;AAAA,oCACV,OAAA,yDAAA,CAG5B,MAAA,EAAQ,SAAA,CAAU,OAAA,GAClB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CAAA;EAEvB,MAAA,GAAS,SAAA,CAAU,OAAA;EACnB,UAAA,EAAY,MAAA,OAAa,OAAA,SAAgB,OAAA,aACxC,MAAA;AAAA,IACE,QAAA,CAAS,KAAA,CAAM,OAAA,GAAU,OAAA,GAAU,OAAA"}
@@ -1,12 +1,12 @@
1
- import { a as $, t as SchemaShape } from "./index-bjEZwPUt.js";
2
- import { t as MergeExtends } from "./types-BzMGTYWv.js";
3
- import { n as ArkEnvScriptProps, t as ArkEnvScript } from "./script-7FFqInPq.js";
1
+ import { a as $, t as SchemaShape } from "./index-Cq_qJ68V.js";
2
+ import { t as MergeExtends } from "./types-BfMBbrMm.js";
3
+ import { n as ArkEnvScriptProps, t as ArkEnvScript } from "./script-Cy9x6rp9.js";
4
4
  import { EnvSchema, Infer } from "@arkenv/core";
5
5
  import { distill, type } from "arktype";
6
6
 
7
7
  //#region src/react-server.d.ts
8
8
  /**
9
- * Create a validated, type-safe environment configuration for Next.js applications (Server-side RSC entry point).
9
+ * Create a validated, typesafe environment configuration for Next.js applications (Server-side RSC entry point).
10
10
  */
11
11
  declare function arkenv<const TSchema extends SchemaShape & {
12
12
  runtimeEnv?: never;
@@ -16,8 +16,14 @@ declare function arkenv<const TSchema extends SchemaShape & {
16
16
  * By default, variables prefixed with `NEXT_PUBLIC_` and `NODE_ENV` are exposed automatically.
17
17
  * Use this option to expose custom variables that do not have the `NEXT_PUBLIC_` prefix.
18
18
  */
19
- exposeToClient?: readonly TShared[]; /** @deprecated Use `exposeToClient` instead */
20
- expose?: readonly TShared[]; /** @deprecated Use `exposeToClient` instead */
19
+ exposeToClient?: readonly TShared[];
20
+ /**
21
+ * @deprecated Use `exposeToClient` instead
22
+ */
23
+ expose?: readonly TShared[];
24
+ /**
25
+ * @deprecated Use `exposeToClient` instead
26
+ */
21
27
  shared?: readonly TShared[];
22
28
  extends?: [...TExtends];
23
29
  runtimeEnv?: Record<string, unknown>;
@@ -1 +1 @@
1
- {"version":3,"file":"react-server.d.ts","names":[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C,MAAA,uBACO,WAAA,6BACA,WAAA,6BACA,WAAA,MAAA,CACrB,OAAA;EACD,MAAA,GAAS,SAAA,CAAU,OAAA;EACnB,MAAA,GAAS,SAAA,CAAU,OAAA,kBACN,OAAA,GAAU,CAAA;EAEvB,MAAA,GAAS,SAAA,CAAU,OAAA;EACnB,UAAA,EAAY,MAAA,OAAa,OAAA,SAAgB,OAAA,aACxC,MAAA;AAAA,IACE,QAAA,CAAS,KAAA,CAAM,OAAA,GAAU,OAAA,GAAU,OAAA"}
@@ -1,2 +1,2 @@
1
- import{t as e}from"./arkenv-internal-DEN5DTmX.js";import{t}from"./script-CZOPkAw3.js";import{arkenv as n,getSchemaKeys as r}from"@arkenv/core";function i(t,i){return t&&typeof t==`object`&&(`runtimeEnv`in t||`server`in t||`client`in t||`shared`in t)?e(t,!0,void 0,n,r):e(t,i,{isServer:!0},n,r)}export{t as ArkEnvScript,i as arkenv,i as default};
1
+ import{t as e}from"./arkenv-internal-Ws3srax6.js";import{t}from"./script-CZOPkAw3.js";import{arkenv as n,getSchemaKeys as r}from"@arkenv/core";function i(t,i){return t&&typeof t==`object`&&(`runtimeEnv`in t||`server`in t||`client`in t||`shared`in t)?e(t,!0,void 0,n,r):e(t,i,{isServer:!0},n,r)}export{t as ArkEnvScript,i as arkenv,i as default};
2
2
  //# sourceMappingURL=react-server.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"react-server.js","names":["coreArkenv"],"sources":["../src/react-server.ts"],"sourcesContent":["import type { EnvSchema, Infer } from \"@arkenv/core\";\nimport { arkenv as coreArkenv, getSchemaKeys } from \"@arkenv/core\";\nimport type { $ } from \"@repo/scope\";\nimport type { SchemaShape } from \"@repo/types\";\nimport type { type as at, distill } from \"arktype\";\nimport { arkenvInternal } from \"./arkenv-internal\";\nimport type { MergeExtends } from \"./types\";\n\n/**\n * Create a validated, type-safe environment configuration for Next.js applications (Server-side RSC entry point).\n */\nexport function arkenv<\n\tconst TSchema extends SchemaShape & { runtimeEnv?: never } = {},\n\tconst TShared extends keyof TSchema = never,\n\tconst TExtends extends readonly unknown[] = [],\n>(\n\tschema: EnvSchema<TSchema>,\n\toptions?: {\n\t\t/**\n\t\t * Custom environment variables to expose to the client bundle.\n\t\t * By default, variables prefixed with `NEXT_PUBLIC_` and `NODE_ENV` are exposed automatically.\n\t\t * Use this option to expose custom variables that do not have the `NEXT_PUBLIC_` prefix.\n\t\t */\n\t\texposeToClient?: readonly TShared[];\n\t\t/** @deprecated Use `exposeToClient` instead */\n\t\texpose?: readonly TShared[];\n\t\t/** @deprecated Use `exposeToClient` instead */\n\t\tshared?: readonly TShared[];\n\t\textends?: [...TExtends];\n\t\truntimeEnv?: Record<string, unknown>;\n\t},\n): Readonly<distill.Out<at.infer<TSchema, $>> & MergeExtends<TExtends>>;\n\n/**\n * @deprecated Use the unified flat layout signature instead: `arkenv(schema, options)`\n */\nexport function arkenv<\n\tconst TServer extends SchemaShape = {},\n\tconst TClient extends SchemaShape = {},\n\tconst TShared extends SchemaShape = {},\n>(options: {\n\tserver?: EnvSchema<TServer>;\n\tclient?: EnvSchema<TClient> & {\n\t\t[K in keyof TClient]: K extends `NEXT_PUBLIC_${string}` ? unknown : never;\n\t};\n\tshared?: EnvSchema<TShared>;\n\truntimeEnv: Record<keyof TClient | keyof TShared, unknown> &\n\t\tRecord<string, unknown>;\n}): Readonly<Infer<TServer & TClient & TShared>>;\n\nexport function arkenv(schemaOrOptions: any, optionsOrIsServer?: any): any {\n\tconst isLegacy =\n\t\tschemaOrOptions &&\n\t\ttypeof schemaOrOptions === \"object\" &&\n\t\t(\"runtimeEnv\" in schemaOrOptions ||\n\t\t\t\"server\" in schemaOrOptions ||\n\t\t\t\"client\" in schemaOrOptions ||\n\t\t\t\"shared\" in schemaOrOptions);\n\n\tif (isLegacy) {\n\t\treturn arkenvInternal(\n\t\t\tschemaOrOptions,\n\t\t\ttrue,\n\t\t\tundefined,\n\t\t\tcoreArkenv,\n\t\t\tgetSchemaKeys,\n\t\t);\n\t}\n\n\treturn arkenvInternal(\n\t\tschemaOrOptions,\n\t\toptionsOrIsServer,\n\t\t{ isServer: true },\n\t\tcoreArkenv,\n\t\tgetSchemaKeys,\n\t);\n}\n\nexport type { ArkEnvScriptProps } from \"./script\";\nexport { ArkEnvScript } from \"./script\";\n\n/**\n * ArkEnv's Next.js integration export\n *\n * {@link https://arkenv.js.org | ArkEnv} is a typesafe environment variables validator from editor to runtime.\n */\nexport default arkenv;\n"],"mappings":"+IAkDA,SAAgB,EAAO,EAAsB,EAA8B,CAmB1E,OAjBC,GACA,OAAO,GAAoB,WAC1B,eAAgB,GAChB,WAAY,GACZ,WAAY,GACZ,WAAY,GAGN,EACN,EACA,GACA,IAAA,GACAA,EACA,EACA,CAGK,EACN,EACA,EACA,CAAE,SAAU,GAAM,CAClBA,EACA,EACA"}
1
+ {"version":3,"file":"react-server.js","names":["coreArkenv"],"sources":["../src/react-server.ts"],"sourcesContent":["import type { EnvSchema, Infer } from \"@arkenv/core\";\nimport { arkenv as coreArkenv, getSchemaKeys } from \"@arkenv/core\";\nimport type { $ } from \"@repo/scope\";\nimport type { SchemaShape } from \"@repo/types\";\nimport type { type as at, distill } from \"arktype\";\nimport { arkenvInternal } from \"./arkenv-internal\";\nimport type { MergeExtends } from \"./types\";\n\n/**\n * Create a validated, typesafe environment configuration for Next.js applications (Server-side RSC entry point).\n */\nexport function arkenv<\n\tconst TSchema extends SchemaShape & { runtimeEnv?: never } = {},\n\tconst TShared extends keyof TSchema = never,\n\tconst TExtends extends readonly unknown[] = [],\n>(\n\tschema: EnvSchema<TSchema>,\n\toptions?: {\n\t\t/**\n\t\t * Custom environment variables to expose to the client bundle.\n\t\t * By default, variables prefixed with `NEXT_PUBLIC_` and `NODE_ENV` are exposed automatically.\n\t\t * Use this option to expose custom variables that do not have the `NEXT_PUBLIC_` prefix.\n\t\t */\n\t\texposeToClient?: readonly TShared[];\n\t\t/**\n\t\t * @deprecated Use `exposeToClient` instead\n\t\t */\n\t\texpose?: readonly TShared[];\n\t\t/**\n\t\t * @deprecated Use `exposeToClient` instead\n\t\t */\n\t\tshared?: readonly TShared[];\n\t\textends?: [...TExtends];\n\t\truntimeEnv?: Record<string, unknown>;\n\t},\n): Readonly<distill.Out<at.infer<TSchema, $>> & MergeExtends<TExtends>>;\n\n/**\n * @deprecated Use the unified flat layout signature instead: `arkenv(schema, options)`\n */\nexport function arkenv<\n\tconst TServer extends SchemaShape = {},\n\tconst TClient extends SchemaShape = {},\n\tconst TShared extends SchemaShape = {},\n>(options: {\n\tserver?: EnvSchema<TServer>;\n\tclient?: EnvSchema<TClient> & {\n\t\t[K in keyof TClient]: K extends `NEXT_PUBLIC_${string}` ? unknown : never;\n\t};\n\tshared?: EnvSchema<TShared>;\n\truntimeEnv: Record<keyof TClient | keyof TShared, unknown> &\n\t\tRecord<string, unknown>;\n}): Readonly<Infer<TServer & TClient & TShared>>;\n\nexport function arkenv(schemaOrOptions: any, optionsOrIsServer?: any): any {\n\tconst isLegacy =\n\t\tschemaOrOptions &&\n\t\ttypeof schemaOrOptions === \"object\" &&\n\t\t(\"runtimeEnv\" in schemaOrOptions ||\n\t\t\t\"server\" in schemaOrOptions ||\n\t\t\t\"client\" in schemaOrOptions ||\n\t\t\t\"shared\" in schemaOrOptions);\n\n\tif (isLegacy) {\n\t\treturn arkenvInternal(\n\t\t\tschemaOrOptions,\n\t\t\ttrue,\n\t\t\tundefined,\n\t\t\tcoreArkenv,\n\t\t\tgetSchemaKeys,\n\t\t);\n\t}\n\n\treturn arkenvInternal(\n\t\tschemaOrOptions,\n\t\toptionsOrIsServer,\n\t\t{ isServer: true },\n\t\tcoreArkenv,\n\t\tgetSchemaKeys,\n\t);\n}\n\nexport type { ArkEnvScriptProps } from \"./script\";\nexport { ArkEnvScript } from \"./script\";\n\nexport default arkenv;\n"],"mappings":"+IAsDA,SAAgB,EAAO,EAAsB,EAA8B,CAmB1E,OAjBC,GACA,OAAO,GAAoB,WAC1B,eAAgB,GAChB,WAAY,GACZ,WAAY,GACZ,WAAY,GAGN,EACN,EACA,GACA,IAAA,GACAA,EACA,EACA,CAGK,EACN,EACA,EACA,CAAE,SAAU,GAAM,CAClBA,EACA,EACA"}