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

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 (116) hide show
  1. package/README.md +1 -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 +1 -1
  18. package/dist/config/index.d.ts +1 -1
  19. package/dist/config/index.js +1 -1
  20. package/dist/config-Bnir9dSk.js +97 -0
  21. package/dist/config-Bnir9dSk.js.map +1 -0
  22. package/dist/config-CU-9fwxw.cjs +97 -0
  23. package/dist/config-CU-9fwxw.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-CNzwVE5N.d.cts → index-CL9MPCBA.d.cts} +24 -10
  35. package/dist/index-CL9MPCBA.d.cts.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-BFQlm61W.d.ts → index-DLwzgCyF.d.ts} +24 -10
  39. package/dist/index-DLwzgCyF.d.ts.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-D-MYC2Uf.cjs → script-BBfmzIh4.cjs} +2 -2
  57. package/dist/{script-D-MYC2Uf.cjs.map → script-BBfmzIh4.cjs.map} +1 -1
  58. package/dist/{script-7FFqInPq.d.ts → script-Cy9x6rp9.d.ts} +1 -1
  59. package/dist/{script-7FFqInPq.d.ts.map → script-Cy9x6rp9.d.ts.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.d.cts +1 -1
  76. package/dist/standard/config.d.ts +1 -1
  77. package/dist/standard/config.js +1 -1
  78. package/dist/standard/index.cjs +1 -1
  79. package/dist/standard/index.cjs.map +1 -1
  80. package/dist/standard/index.d.cts +4 -4
  81. package/dist/standard/index.d.ts +4 -4
  82. package/dist/standard/index.js +1 -1
  83. package/dist/standard/index.js.map +1 -1
  84. package/dist/standard/server.cjs +1 -1
  85. package/dist/standard/server.cjs.map +1 -1
  86. package/dist/standard/server.d.cts +27 -7
  87. package/dist/standard/server.d.cts.map +1 -1
  88. package/dist/standard/server.d.ts +28 -7
  89. package/dist/standard/server.d.ts.map +1 -1
  90. package/dist/standard/server.js +1 -1
  91. package/dist/standard/server.js.map +1 -1
  92. package/dist/standard/shared.cjs +1 -1
  93. package/dist/standard/shared.cjs.map +1 -1
  94. package/dist/standard/shared.d.cts +2 -2
  95. package/dist/standard/shared.d.ts +2 -2
  96. package/dist/standard/shared.js +1 -1
  97. package/dist/standard/shared.js.map +1 -1
  98. package/dist/strict-client-env-CHDTZoLe.js +6 -0
  99. package/dist/strict-client-env-CHDTZoLe.js.map +1 -0
  100. package/dist/strict-client-env-MouPnkRr.cjs +6 -0
  101. package/dist/strict-client-env-MouPnkRr.cjs.map +1 -0
  102. package/dist/{types-BzMGTYWv.d.ts → types-BfMBbrMm.d.ts} +2 -2
  103. package/dist/{types-BzMGTYWv.d.ts.map → types-BfMBbrMm.d.ts.map} +1 -1
  104. package/dist/{types-44R9mgTa.d.cts → types-BlRHnQwj.d.cts} +2 -2
  105. package/dist/{types-44R9mgTa.d.cts.map → types-BlRHnQwj.d.cts.map} +1 -1
  106. package/package.json +12 -5
  107. package/dist/arkenv-internal-Cll5pV_F.cjs +0 -2
  108. package/dist/arkenv-internal-Cll5pV_F.cjs.map +0 -1
  109. package/dist/arkenv-internal-DEN5DTmX.js +0 -2
  110. package/dist/arkenv-internal-DEN5DTmX.js.map +0 -1
  111. package/dist/config-CStvXoN3.cjs +0 -93
  112. package/dist/config-CStvXoN3.cjs.map +0 -1
  113. package/dist/config-D2j45WDh.js +0 -93
  114. package/dist/config-D2j45WDh.js.map +0 -1
  115. package/dist/index-BFQlm61W.d.ts.map +0 -1
  116. package/dist/index-CNzwVE5N.d.cts.map +0 -1
@@ -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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AAAA;EAAAA;EFlDVtE;EAAAA,UEqDEoD,KAAAA,2BAAgCJ,KAAAA,UAAeD,eAAAA,CAAgBK,KAAAA,CAAMJ,KAAAA,EAAOC,MAAAA;EFnDpFlC;EAAAA,KEsDG4C,UAAAA,gBAA0BZ,eAAAA,IAAmBA,eAAAA,CAAgBY,UAAAA,CAAWR,MAAAA;EFlD7E3C;EAAAA,KEoDKoD,WAAAA,gBAA2Bb,eAAAA,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,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;IAAAA;MAEA,cAAA;IAAA;IAEFP,UAAAA,EAAYR,SAAAA,CAAUM,SAAAA,CAAUL,sCAAAA,CAAuCO,UAAAA,CAAWL,CAAAA;MAChF,cAAA,GAAiBgB,EAAAA,aAAejB,iCAAAA,CAAkCG,EAAAA;IAAAA;IAEpEoB,UAAAA;IACAC,IAAAA,EAAM1B,SAAAA,CAAUM,SAAAA,CAAUL,sCAAAA,CAAuCQ,UAAAA,CAAWN,CAAAA;MAC1E,cAAA;IAAA;IAEFwB,MAAAA;IACAC,KAAAA;IACAC,OAAAA,EAAS7B,SAAAA,CAAUM,SAAAA,CAAUL,sCAAAA,CAAuCS,aAAAA,CAAcP,CAAAA;MAChF,cAAA;IAAA;IAEFQ,EAAAA,EAAIX,SAAAA,CAAUM,SAAAA,CAAUL,sCAAAA,CAAuCU,EAAAA,CAAGR,CAAAA;MAChE,cA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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,7 +16,9 @@ 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
22
24
  /**
@@ -67,7 +69,11 @@ type ArkEnvConfigOptions = {
67
69
  *
68
70
  * @default "flat"
69
71
  */
70
- layout?: "flat" | "strict" /** @deprecated Use `"flat"` instead. `"simple"` will be removed in the next major version. */ | "simple";
72
+ layout?: "flat" | "strict"
73
+ /**
74
+ * @deprecated Use `"flat"` instead. `"simple"` will be removed in the next major version.
75
+ */
76
+ | "simple";
71
77
  /**
72
78
  * Force standard mode code generation.
73
79
  *
@@ -131,25 +137,33 @@ declare function extractKeys(content: string): {
131
137
  };
132
138
  //#endregion
133
139
  //#region src/config/setup.d.ts
140
+ type SetupResult = {
141
+ resolvedLayout: "flat" | "strict" | "simple";
142
+ baseDir: string | undefined;
143
+ clientEnvPath: string | undefined;
144
+ };
134
145
  /**
135
146
  * Run ArkEnv codegen and setup without wrapping nextConfig.
136
147
  *
137
148
  * @param options Optional configuration paths for schema and output files
138
149
  * @param internalOptions Optional configuration for internal testing hooks
150
+ * @returns Resolved layout paths used by `withArkEnv` for alias registration
139
151
  * @throws An error if the schema file cannot be found or if code generation fails
140
152
  */
141
153
  declare function setupArkEnv(options?: ArkEnvConfigOptions, internalOptions?: {
142
154
  _jitiAliases?: Record<string, string>;
143
- }): void;
155
+ }): SetupResult;
144
156
  /**
145
- * Wrap a Next.js configuration object to automatically generate the `runtimeEnv` block in `env.gen.ts`.
157
+ * Wrap a Next.js configuration object to automatically generate the `runtimeEnv`
158
+ * block in `env.gen.ts` and, in strict layout, register the `#arkenv/client-env`
159
+ * alias so `@arkenv/nextjs/server` can auto-extend the client env.
146
160
  *
147
- * @param nextConfig The Next.js configuration object or function
161
+ * @param nextConfig The Next.js configuration object (object-form only; function-form configs are not yet supported — see follow-up issue)
148
162
  * @param options Optional configuration paths for schema and output files
149
- * @returns The Next.js configuration object unchanged
163
+ * @returns The Next.js configuration object (with strict-layout aliases when applicable)
150
164
  * @throws An error if the schema file cannot be found or if code generation fails
151
165
  */
152
166
  declare function withArkEnv<T>(nextConfig: T, options?: ArkEnvConfigOptions): T;
153
167
  //#endregion
154
168
  export { extractKeys as a, withArkEnv as i, extractSharedKeys$1 as n, runCodegen as o, setupArkEnv as r, ArkEnvConfigOptions as s, extractClientKeys$1 as t };
155
- //# sourceMappingURL=index-BFQlm61W.d.ts.map
169
+ //# sourceMappingURL=index-DLwzgCyF.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-DLwzgCyF.d.ts","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,cAAAA;AAAAA;;;;;;;;AAdsE;;;;;AAMvF;;;;KCHD,mBAAA;EDQFN;;;;;;;;;;;;;ECMT,UAAA;;;AAdD;;;;;;;;;;;EA6BC,UAAA;EAwDA;;;;;;;AChED;EDkBC,MAAA;;;;;ECbiB;;;;;;;;;;ED+BjB,QAAA;EC/B6D;;;;AC2F9D;EFrDC,QAAA;;;;;;EAOA,OAAA;EEiDQ;;;;;EF1CR,MAAA,GAAS,MAAA;EG3BM;;;;;EHkCf,QAAA,GAAW,QAAA;AAAA;;;;;ADxFwF;;;;;AAMvF;;iBEkBG,UAAA,CACf,UAAA,UACA,UAAA,UACA,YAAA,GAAe,mBAAA,YACf,aAAA,YACA,UAAA,GAAa,IAAA,CAAK,mBAAA;;;;;;AF7BiF;;;iBGwHpF,WAAA,CAAY,OAAA;EAC3B,UAAA;EACA,UAAA;EACA,QAAA;AAAA;;;KCrEI,WAAA;EACJ,cAAA;EACA,OAAA;EACA,aAAA;AAAA;;;AJnDY;;;;;;iBI8DG,WAAA,CACf,OAAA,GAAU,mBAAA,EACV,eAAA;EAAoB,YAAA,GAAe,MAAA;AAAA,IACjC,WAAA;;;;;;;;;;;iBA4Ka,UAAA,GAAA,CAAc,UAAA,EAAY,CAAA,EAAG,OAAA,GAAU,mBAAA,GAAsB,CAAA"}
package/dist/index.cjs CHANGED
@@ -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,!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-CU-9fwxw.cjs`);const e=require(`./arkenv-internal-QxkUlA5J.cjs`),t=require(`./script-BBfmzIh4.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,O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OAAA;EA1BL;;;EA8BrB,MAAA,YAAkB,OAAA;EA3BhB;;;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,IA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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.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-CU-9fwxw.cjs`);const e=require(`./arkenv-internal-QxkUlA5J.cjs`),t=require(`./script-BBfmzIh4.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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A,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,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":[],"sources":["../src/react-server.ts"],"mappings":";;;;;;;;;AAWA;iBAAgB,MAAA,uBACO,WAAA;EAAgB,UAAA;AAAA,oCACV,OAAA,yDAAA,CAG5B,MAAA,EAAQ,SAAA,CAAU,OAAA,GAClB,OAAA;EAJ4B;;;;;EAU3B,cAAA,YAA0B,OAAA,IAKZ;EAHd,MAAA,YAAkB,OAAA,IAMa;EAJ/B,MAAA,YAAkB,OAAA;EAClB,OAAA,OAAc,QAAA;EACd,UAAA,GAAa,MAAA;AAAA,IAEZ,QAAA,CAAS,OAAA,CAAQ,GAAA,CAAI,IAAA,CAAG,KAAA,CAAM,OAAA,EAAS,CAAA,KAAM,YAAA,CAAa,QAAA;;;;iBAK7C,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
+ {"version":3,"file":"react-server.d.ts","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,OAAA;EAJ4B;;;;;EAU3B,cAAA,YAA0B,OAAA;EASZ;;;EALd,MAAA,YAAkB,OAAA;EAQI;;;EAJtB,MAAA,YAAkB,OAAA;EAClB,OAAA,OAAc,QAAA;EACd,UAAA,GAAa,MAAA;AAAA,IAEZ,QAAA,CAAS,OAAA,CAAQ,GAAA,CAAI,IAAA,CAAG,KAAA,CAAM,OAAA,EAAS,CAAA,KAAM,YAAA,CAAa,QAAA;;;;iBAK7C,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"}
@@ -1,2 +1,2 @@
1
- require(`./config-CStvXoN3.cjs`);let e=require(`react/jsx-runtime`);function t({env:t}={}){let n={};if(typeof process<`u`&&process.env)for(let e of Object.keys(process.env))e.startsWith(`NEXT_PUBLIC_`)&&(n[e]=process.env[e]);if(t)for(let e of Object.keys(t))e.startsWith(`NEXT_PUBLIC_`)&&(n[e]=t[e]);return(0,e.jsx)(`script`,{id:`arkenv-script`,dangerouslySetInnerHTML:{__html:`globalThis.__arkenv_env__ = ${JSON.stringify(n).replace(/</g,`\\u003c`)};`}})}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return t}});
2
- //# sourceMappingURL=script-D-MYC2Uf.cjs.map
1
+ require(`./config-CU-9fwxw.cjs`);let e=require(`react/jsx-runtime`);function t({env:t}={}){let n={};if(typeof process<`u`&&process.env)for(let e of Object.keys(process.env))e.startsWith(`NEXT_PUBLIC_`)&&(n[e]=process.env[e]);if(t)for(let e of Object.keys(t))e.startsWith(`NEXT_PUBLIC_`)&&(n[e]=t[e]);return(0,e.jsx)(`script`,{id:`arkenv-script`,dangerouslySetInnerHTML:{__html:`globalThis.__arkenv_env__ = ${JSON.stringify(n).replace(/</g,`\\u003c`)};`}})}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return t}});
2
+ //# sourceMappingURL=script-BBfmzIh4.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"script-D-MYC2Uf.cjs","names":[],"sources":["../src/script.tsx"],"sourcesContent":["import type React from \"react\";\n\nexport type ArkEnvScriptProps = {\n\t/**\n\t * Optional custom environment variable map. If provided, any keys starting\n\t * with `NEXT_PUBLIC_` will be merged with public keys from `process.env`.\n\t */\n\tenv?: Record<string, string | undefined>;\n};\n\n/**\n * A React Component to serialize and inject NEXT_PUBLIC_* environment variables into the browser\n * during Server-Side Rendering (SSR). Placed in your root layout (layout.tsx), it sets\n * globalThis.__arkenv_env__ to ensure client-side components have access to runtime environment values.\n */\nexport function ArkEnvScript({\n\tenv,\n}: ArkEnvScriptProps = {}): React.ReactElement {\n\tconst publicEnv: Record<string, string | undefined> = {};\n\n\tif (typeof process !== \"undefined\" && process.env) {\n\t\tfor (const key of Object.keys(process.env)) {\n\t\t\tif (key.startsWith(\"NEXT_PUBLIC_\")) {\n\t\t\t\tpublicEnv[key] = process.env[key];\n\t\t\t}\n\t\t}\n\t}\n\n\tif (env) {\n\t\tfor (const key of Object.keys(env)) {\n\t\t\tif (key.startsWith(\"NEXT_PUBLIC_\")) {\n\t\t\t\tpublicEnv[key] = env[key];\n\t\t\t}\n\t\t}\n\t}\n\n\tconst scriptContent = `globalThis.__arkenv_env__ = ${JSON.stringify(publicEnv).replace(/</g, \"\\\\u003c\")};`;\n\n\treturn (\n\t\t<script\n\t\t\tid=\"arkenv-script\"\n\t\t\tdangerouslySetInnerHTML={{ __html: scriptContent }}\n\t\t/>\n\t);\n}\n"],"mappings":"oEAeA,SAAgB,EAAa,CAC5B,OACsB,EAAE,CAAsB,CAC9C,IAAM,EAAgD,EAAE,CAExD,GAAI,OAAO,QAAY,KAAe,QAAQ,QACxC,IAAM,KAAO,OAAO,KAAK,QAAQ,IAAI,CACrC,EAAI,WAAW,eAAe,GACjC,EAAU,GAAO,QAAQ,IAAI,IAKhC,GAAI,MACE,IAAM,KAAO,OAAO,KAAK,EAAI,CAC7B,EAAI,WAAW,eAAe,GACjC,EAAU,GAAO,EAAI,IAOxB,OACC,EAAA,EAAA,KAAC,SAAD,CACC,GAAG,gBACH,wBAAyB,CAAE,OAAQ,+BALgB,KAAK,UAAU,EAAU,CAAC,QAAQ,KAAM,UAAU,CAAC,GAKpD,CACjD,CAAA"}
1
+ {"version":3,"file":"script-BBfmzIh4.cjs","names":[],"sources":["../src/script.tsx"],"sourcesContent":["import type React from \"react\";\n\nexport type ArkEnvScriptProps = {\n\t/**\n\t * Optional custom environment variable map. If provided, any keys starting\n\t * with `NEXT_PUBLIC_` will be merged with public keys from `process.env`.\n\t */\n\tenv?: Record<string, string | undefined>;\n};\n\n/**\n * A React Component to serialize and inject NEXT_PUBLIC_* environment variables into the browser\n * during Server-Side Rendering (SSR). Placed in your root layout (layout.tsx), it sets\n * globalThis.__arkenv_env__ to ensure client-side components have access to runtime environment values.\n */\nexport function ArkEnvScript({\n\tenv,\n}: ArkEnvScriptProps = {}): React.ReactElement {\n\tconst publicEnv: Record<string, string | undefined> = {};\n\n\tif (typeof process !== \"undefined\" && process.env) {\n\t\tfor (const key of Object.keys(process.env)) {\n\t\t\tif (key.startsWith(\"NEXT_PUBLIC_\")) {\n\t\t\t\tpublicEnv[key] = process.env[key];\n\t\t\t}\n\t\t}\n\t}\n\n\tif (env) {\n\t\tfor (const key of Object.keys(env)) {\n\t\t\tif (key.startsWith(\"NEXT_PUBLIC_\")) {\n\t\t\t\tpublicEnv[key] = env[key];\n\t\t\t}\n\t\t}\n\t}\n\n\tconst scriptContent = `globalThis.__arkenv_env__ = ${JSON.stringify(publicEnv).replace(/</g, \"\\\\u003c\")};`;\n\n\treturn (\n\t\t<script\n\t\t\tid=\"arkenv-script\"\n\t\t\tdangerouslySetInnerHTML={{ __html: scriptContent }}\n\t\t/>\n\t);\n}\n"],"mappings":"oEAeA,SAAgB,EAAa,CAC5B,OACsB,EAAE,CAAsB,CAC9C,IAAM,EAAgD,EAAE,CAExD,GAAI,OAAO,QAAY,KAAe,QAAQ,QACxC,IAAM,KAAO,OAAO,KAAK,QAAQ,IAAI,CACrC,EAAI,WAAW,eAAe,GACjC,EAAU,GAAO,QAAQ,IAAI,IAKhC,GAAI,MACE,IAAM,KAAO,OAAO,KAAK,EAAI,CAC7B,EAAI,WAAW,eAAe,GACjC,EAAU,GAAO,EAAI,IAOxB,OACC,EAAA,EAAA,KAAC,SAAD,CACC,GAAG,gBACH,wBAAyB,CAAE,OAAQ,+BALgB,KAAK,UAAU,EAAU,CAAC,QAAQ,KAAM,UAAU,CAAC,GAKpD,CACjD,CAAA"}
@@ -18,4 +18,4 @@ declare function ArkEnvScript({
18
18
  }?: ArkEnvScriptProps): React.ReactElement;
19
19
  //#endregion
20
20
  export { ArkEnvScriptProps as n, ArkEnvScript as t };
21
- //# sourceMappingURL=script-7FFqInPq.d.ts.map
21
+ //# sourceMappingURL=script-Cy9x6rp9.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"script-7FFqInPq.d.ts","names":[],"sources":["../src/script.tsx"],"mappings":";;;KAEY,iBAAA;;AAAZ;;;EAKC,GAAA,GAAM,MAAA;AAAA;AAQP;;;;;AAAA,iBAAgB,YAAA,CAAA;EACf;AAAA,IACE,iBAAA,GAAyB,KAAA,CAAM,YAAA"}
1
+ {"version":3,"file":"script-Cy9x6rp9.d.ts","names":[],"sources":["../src/script.tsx"],"mappings":";;;KAEY,iBAAA;;AAAZ;;;EAKC,GAAA,GAAM,MAAA;AAAA;AAQP;;;;;AAAA,iBAAgB,YAAA,CAAA;EACf;AAAA,IACE,iBAAA,GAAyB,KAAA,CAAM,YAAA"}
package/dist/server.cjs CHANGED
@@ -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`);let t=require(`@arkenv/core`);require(`server-only`);function n(n,r){if(n&&typeof n==`object`&&(`runtimeEnv`in n||`server`in n||`shared`in n)){if(`client`in n)throw Error(`server entry point only accepts 'server' and 'shared' schemas.`);return e.t(n,!0,void 0,t.arkenv,t.getSchemaKeys)}return e.t(n,r,{isServer:!0,strictLayout:`server`},t.arkenv,t.getSchemaKeys)}exports.arkenv=n,exports.default=n;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`./config-CU-9fwxw.cjs`);const e=require(`./arkenv-internal-QxkUlA5J.cjs`),t=require(`./strict-client-env-MouPnkRr.cjs`),n=require(`./auto-extend-CYzZnEvT.cjs`);let r=require(`@arkenv/core`);require(`server-only`);let i=require(`#arkenv/client-env`);function a(a,o){if(a&&typeof a==`object`&&(`runtimeEnv`in a||`server`in a||`shared`in a)){if(`client`in a)throw Error(`server entry point only accepts 'server' and 'shared' schemas.`);return e.t(a,!0,void 0,r.arkenv,r.getSchemaKeys)}return e.t(a,n.t(o,()=>t.i(i.env)),{isServer:!0,strictLayout:`server`},r.arkenv,r.getSchemaKeys)}exports.arkenv=a,exports.default=a;
2
2
  //# sourceMappingURL=server.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"server.cjs","names":["arkenvInternal","coreArkenv","getSchemaKeys"],"sources":["../src/server.ts"],"sourcesContent":["import \"server-only\";\nimport type { EnvSchema } from \"@arkenv/core\";\nimport { arkenv as coreArkenv, getSchemaKeys } from \"@arkenv/core\";\nimport type { $ } from \"@repo/scope\";\nimport type { Dict, 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 entry point).\n */\nexport function arkenv<\n\tconst TSchema extends SchemaShape = {},\n\tconst TExtends extends readonly unknown[] = [],\n>(\n\tschema: EnvSchema<TSchema>,\n\toptions?: {\n\t\textends?: [...TExtends];\n\t\truntimeEnv?: Dict<string>;\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 TShared extends SchemaShape = {},\n\tconst TExtends extends readonly unknown[] = [],\n>(options: {\n\tserver?: EnvSchema<TServer>;\n\tshared?: EnvSchema<TShared>;\n\textends?: [...TExtends];\n\truntimeEnv?: Record<keyof TShared, string | undefined> & Dict<string>;\n}): Readonly<\n\tdistill.Out<at.infer<TServer & TShared, $>> & MergeExtends<TExtends>\n>;\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\"shared\" in schemaOrOptions);\n\n\tif (isLegacy) {\n\t\tif (\"client\" in schemaOrOptions) {\n\t\t\tthrow new Error(\n\t\t\t\t\"server entry point only accepts 'server' and 'shared' schemas.\",\n\t\t\t);\n\t\t}\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, strictLayout: \"server\" },\n\t\tcoreArkenv,\n\t\tgetSchemaKeys,\n\t);\n}\n\nexport default arkenv;\n"],"mappings":"uOAuCA,SAAgB,EAAO,EAAsB,EAA8B,CAQ1E,GANC,GACA,OAAO,GAAoB,WAC1B,eAAgB,GAChB,WAAY,GACZ,WAAY,GAEA,CACb,GAAI,WAAY,EACf,MAAU,MACT,iEACA,CAEF,OAAOA,EAAAA,EACN,EACA,GACA,IAAA,GACAC,EAAAA,OACAC,EAAAA,cACA,CAGF,OAAOF,EAAAA,EACN,EACA,EACA,CAAE,SAAU,GAAM,aAAc,SAAU,CAC1CC,EAAAA,OACAC,EAAAA,cACA"}
1
+ {"version":3,"file":"server.cjs","names":["arkenvInternal","coreArkenv","getSchemaKeys","withAutoExtend","resolveStrictClientEnv","importedClientEnv"],"sources":["../src/server.ts"],"sourcesContent":["import \"server-only\";\nimport type { EnvSchema } from \"@arkenv/core\";\nimport { arkenv as coreArkenv, getSchemaKeys } from \"@arkenv/core\";\nimport type { $ } from \"@repo/scope\";\nimport type { Dict, SchemaShape } from \"@repo/types\";\nimport type { type as at, distill } from \"arktype\";\n// Static import so webpack/Turbopack can resolve the alias at bundle time.\n// Outside strict layout the package `imports` map points this at empty-client-env.\nimport { env as importedClientEnv } from \"#arkenv/client-env\";\nimport { arkenvInternal } from \"./arkenv-internal\";\nimport { withAutoExtend } from \"./auto-extend\";\nimport { resolveStrictClientEnv } from \"./strict-client-env\";\nimport type { MergeExtends } from \"./types\";\n\n/**\n * Client env type auto-merged in Next.js strict layout when `extends` is omitted.\n */\ntype AutoClientEnv = typeof import(\"#arkenv/client-env\") extends {\n\tenv: infer E;\n}\n\t? E\n\t: {};\n\n/**\n * Create a validated, typesafe environment configuration for Next.js applications (Server entry point).\n *\n * With `withArkEnv` in strict layout, omitting `extends` includes the client\n * env by default. Any explicit `extends` is used as-is and opts out of that\n * default; pass `extends: []` to include no extended env.\n */\nexport function arkenv<\n\tconst TSchema extends SchemaShape = {},\n\tconst TExtends extends readonly unknown[] = [],\n>(\n\tschema: EnvSchema<TSchema>,\n\toptions: {\n\t\t/**\n\t\t * Explicit envs to extend. Providing this option opts out of the default\n\t\t * strict-layout client merge; use `[]` to include no extended env.\n\t\t */\n\t\textends: [...TExtends];\n\t\truntimeEnv?: Dict<string>;\n\t},\n): Readonly<distill.Out<at.infer<TSchema, $>> & MergeExtends<TExtends>>;\n\nexport function arkenv<const TSchema extends SchemaShape = {}>(\n\tschema: EnvSchema<TSchema>,\n\toptions?: {\n\t\textends?: undefined;\n\t\truntimeEnv?: Dict<string>;\n\t},\n): Readonly<distill.Out<at.infer<TSchema, $>> & AutoClientEnv>;\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 TShared extends SchemaShape = {},\n\tconst TExtends extends readonly unknown[] = [],\n>(options: {\n\tserver?: EnvSchema<TServer>;\n\tshared?: EnvSchema<TShared>;\n\textends?: [...TExtends];\n\truntimeEnv?: Record<keyof TShared, string | undefined> & Dict<string>;\n}): Readonly<\n\tdistill.Out<at.infer<TServer & TShared, $>> & MergeExtends<TExtends>\n>;\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\"shared\" in schemaOrOptions);\n\n\tif (isLegacy) {\n\t\tif (\"client\" in schemaOrOptions) {\n\t\t\tthrow new Error(\n\t\t\t\t\"server entry point only accepts 'server' and 'shared' schemas.\",\n\t\t\t);\n\t\t}\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\twithAutoExtend(optionsOrIsServer, () =>\n\t\t\tresolveStrictClientEnv(importedClientEnv),\n\t\t),\n\t\t{ isServer: true, strictLayout: \"server\" },\n\t\tcoreArkenv,\n\t\tgetSchemaKeys,\n\t);\n}\n\nexport default arkenv;\n"],"mappings":"iWAqEA,SAAgB,EAAO,EAAsB,EAA8B,CAQ1E,GANC,GACA,OAAO,GAAoB,WAC1B,eAAgB,GAChB,WAAY,GACZ,WAAY,GAEA,CACb,GAAI,WAAY,EACf,MAAU,MACT,iEACA,CAEF,OAAOA,EAAAA,EACN,EACA,GACA,IAAA,GACAC,EAAAA,OACAC,EAAAA,cACA,CAGF,OAAOF,EAAAA,EACN,EACAG,EAAAA,EAAe,MACdC,EAAAA,EAAuBC,EAAAA,IAAkB,CACzC,CACD,CAAE,SAAU,GAAM,aAAc,SAAU,CAC1CJ,EAAAA,OACAC,EAAAA,cACA"}
package/dist/server.d.cts CHANGED
@@ -1,15 +1,34 @@
1
- import { a as $, i as Dict, t as SchemaShape } from "./index-96RGPyfa.cjs";
2
- import { t as MergeExtends } from "./types-44R9mgTa.cjs";
1
+ import { a as $, i as Dict, t as SchemaShape } from "./index-BS1wAitS.cjs";
2
+ import { t as MergeExtends } from "./types-BlRHnQwj.cjs";
3
3
  import { EnvSchema } from "@arkenv/core";
4
4
  import { distill, type } from "arktype";
5
+ import * as _$_arkenv_client_env0 from "#arkenv/client-env";
5
6
  //#region src/server.d.ts
6
7
  /**
7
- * Create a validated, type-safe environment configuration for Next.js applications (Server entry point).
8
+ * Client env type auto-merged in Next.js strict layout when `extends` is omitted.
8
9
  */
9
- declare function arkenv<const TSchema extends SchemaShape = {}, const TExtends extends readonly unknown[] = []>(schema: EnvSchema<TSchema>, options?: {
10
- extends?: [...TExtends];
10
+ type AutoClientEnv = typeof _$_arkenv_client_env0 extends {
11
+ env: infer E;
12
+ } ? E : {};
13
+ /**
14
+ * Create a validated, typesafe environment configuration for Next.js applications (Server entry point).
15
+ *
16
+ * With `withArkEnv` in strict layout, omitting `extends` includes the client
17
+ * env by default. Any explicit `extends` is used as-is and opts out of that
18
+ * default; pass `extends: []` to include no extended env.
19
+ */
20
+ declare function arkenv<const TSchema extends SchemaShape = {}, const TExtends extends readonly unknown[] = []>(schema: EnvSchema<TSchema>, options: {
21
+ /**
22
+ * Explicit envs to extend. Providing this option opts out of the default
23
+ * strict-layout client merge; use `[]` to include no extended env.
24
+ */
25
+ extends: [...TExtends];
11
26
  runtimeEnv?: Dict<string>;
12
27
  }): Readonly<distill.Out<type.infer<TSchema, $>> & MergeExtends<TExtends>>;
28
+ declare function arkenv<const TSchema extends SchemaShape = {}>(schema: EnvSchema<TSchema>, options?: {
29
+ extends?: undefined;
30
+ runtimeEnv?: Dict<string>;
31
+ }): Readonly<distill.Out<type.infer<TSchema, $>> & AutoClientEnv>;
13
32
  /**
14
33
  * @deprecated Use the unified flat layout signature instead: `arkenv(schema, options)`
15
34
  */
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.cts","names":[],"sources":["../src/server.ts"],"mappings":";;;;;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AA,uBACO,WAAA,6BACA,WAAA,sDAAA,CAErB,OAAA;EACD,MAAA,GAAS,SAAA,CAAU,OAAA;EACnB,MAAA,GAAS,SAAA,CAAU,OAAA;EACnB,OAAA,OAAc,QAAA;EACd,UAAA,GAAa,MAAA,OAAa,OAAA,wBAA+B,IAAA;AAAA,IACtD,QAAA,CACH,OAAA,CAAQ,GAAA,CAAI,IAAA,CAAG,KAAA,CAAM,OAAA,GAAU,OAAA,EAAS,CAAA,KAAM,YAAA,CAAa,QAAA"}
package/dist/server.d.ts CHANGED
@@ -1,16 +1,35 @@
1
- import { a as $, i as Dict, t as SchemaShape } from "./index-bjEZwPUt.js";
2
- import { t as MergeExtends } from "./types-BzMGTYWv.js";
1
+ import { a as $, i as Dict, t as SchemaShape } from "./index-Cq_qJ68V.js";
2
+ import { t as MergeExtends } from "./types-BfMBbrMm.js";
3
3
  import { EnvSchema } from "@arkenv/core";
4
+ import * as _$_arkenv_client_env0 from "#arkenv/client-env";
4
5
  import { distill, type } from "arktype";
5
6
 
6
7
  //#region src/server.d.ts
7
8
  /**
8
- * Create a validated, type-safe environment configuration for Next.js applications (Server entry point).
9
+ * Client env type auto-merged in Next.js strict layout when `extends` is omitted.
9
10
  */
10
- declare function arkenv<const TSchema extends SchemaShape = {}, const TExtends extends readonly unknown[] = []>(schema: EnvSchema<TSchema>, options?: {
11
- extends?: [...TExtends];
11
+ type AutoClientEnv = typeof _$_arkenv_client_env0 extends {
12
+ env: infer E;
13
+ } ? E : {};
14
+ /**
15
+ * Create a validated, typesafe environment configuration for Next.js applications (Server entry point).
16
+ *
17
+ * With `withArkEnv` in strict layout, omitting `extends` includes the client
18
+ * env by default. Any explicit `extends` is used as-is and opts out of that
19
+ * default; pass `extends: []` to include no extended env.
20
+ */
21
+ declare function arkenv<const TSchema extends SchemaShape = {}, const TExtends extends readonly unknown[] = []>(schema: EnvSchema<TSchema>, options: {
22
+ /**
23
+ * Explicit envs to extend. Providing this option opts out of the default
24
+ * strict-layout client merge; use `[]` to include no extended env.
25
+ */
26
+ extends: [...TExtends];
12
27
  runtimeEnv?: Dict<string>;
13
28
  }): Readonly<distill.Out<type.infer<TSchema, $>> & MergeExtends<TExtends>>;
29
+ declare function arkenv<const TSchema extends SchemaShape = {}>(schema: EnvSchema<TSchema>, options?: {
30
+ extends?: undefined;
31
+ runtimeEnv?: Dict<string>;
32
+ }): Readonly<distill.Out<type.infer<TSchema, $>> & AutoClientEnv>;
14
33
  /**
15
34
  * @deprecated Use the unified flat layout signature instead: `arkenv(schema, options)`
16
35
  */
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","names":[],"sources":["../src/server.ts"],"mappings":";;;;;;;AAYA;;iBAAgB,MAAA,uBACO,WAAA,sDAAA,CAGtB,MAAA,EAAQ,SAAA,CAAU,OAAA,GAClB,OAAA;EACC,OAAA,OAAc,QAAA;EACd,UAAA,GAAa,IAAA;AAAA,IAEZ,QAAA,CAAS,OAAA,CAAQ,GAAA,CAAI,IAAA,CAAG,KAAA,CAAM,OAAA,EAAS,CAAA,KAAM,YAAA,CAAa,QAAA;;;;iBAK7C,MAAA,uBACO,WAAA,6BACA,WAAA,sDAAA,CAErB,OAAA;EACD,MAAA,GAAS,SAAA,CAAU,OAAA;EACnB,MAAA,GAAS,SAAA,CAAU,OAAA;EACnB,OAAA,OAAc,QAAA;EACd,UAAA,GAAa,MAAA,OAAa,OAAA,wBAA+B,IAAA;AAAA,IACtD,QAAA,CACH,OAAA,CAAQ,GAAA,CAAI,IAAA,CAAG,KAAA,CAAM,OAAA,GAAU,OAAA,EAAS,CAAA,KAAM,YAAA,CAAa,QAAA"}
1
+ {"version":3,"file":"server.d.ts","names":[],"sources":["../src/server.ts"],"mappings":";;;;;;;;;AAY4C;KAKvC,aAAA,UAAa,qBAAA;EACjB,GAAA;AAAA,IAEE,CAAA;;;;;;;AAUH;iBAAgB,MAAA,uBACO,WAAA,sDAAA,CAGtB,MAAA,EAAQ,SAAA,CAAU,OAAA,GAClB,OAAA;EALqB;;;;EAUpB,OAAA,MAAa,QAAA;EACb,UAAA,GAAa,IAAA;AAAA,IAEZ,QAAA,CAAS,OAAA,CAAQ,GAAA,CAAI,IAAA,CAAG,KAAA,CAAM,OAAA,EAAS,CAAA,KAAM,YAAA,CAAa,QAAA;AAAA,iBAE7C,MAAA,uBAA6B,WAAA,MAAA,CAC5C,MAAA,EAAQ,SAAA,CAAU,OAAA,GAClB,OAAA;EACC,OAAA;EACA,UAAA,GAAa,IAAA;AAAA,IAEZ,QAAA,CAAS,OAAA,CAAQ,GAAA,CAAI,IAAA,CAAG,KAAA,CAAM,OAAA,EAAS,CAAA,KAAM,aAAA;;;;iBAKhC,MAAA,uBACO,WAAA,6BACA,WAAA,sDAAA,CAErB,OAAA;EACD,MAAA,GAAS,SAAA,CAAU,OAAA;EACnB,MAAA,GAAS,SAAA,CAAU,OAAA;EACnB,OAAA,OAAc,QAAA;EACd,UAAA,GAAa,MAAA,OAAa,OAAA,wBAA+B,IAAA;AAAA,IACtD,QAAA,CACH,OAAA,CAAQ,GAAA,CAAI,IAAA,CAAG,KAAA,CAAM,OAAA,GAAU,OAAA,EAAS,CAAA,KAAM,YAAA,CAAa,QAAA"}
package/dist/server.js CHANGED
@@ -1,2 +1,2 @@
1
- import{t as e}from"./arkenv-internal-DEN5DTmX.js";import{arkenv as t,getSchemaKeys as n}from"@arkenv/core";import"server-only";function r(r,i){if(r&&typeof r==`object`&&(`runtimeEnv`in r||`server`in r||`shared`in r)){if(`client`in r)throw Error(`server entry point only accepts 'server' and 'shared' schemas.`);return e(r,!0,void 0,t,n)}return e(r,i,{isServer:!0,strictLayout:`server`},t,n)}export{r as arkenv,r as default};
1
+ import{t as e}from"./arkenv-internal-Ws3srax6.js";import{i as t}from"./strict-client-env-CHDTZoLe.js";import{t as n}from"./auto-extend-DjiqIbgM.js";import{arkenv as r,getSchemaKeys as i}from"@arkenv/core";import"server-only";import{env as a}from"#arkenv/client-env";function o(o,s){if(o&&typeof o==`object`&&(`runtimeEnv`in o||`server`in o||`shared`in o)){if(`client`in o)throw Error(`server entry point only accepts 'server' and 'shared' schemas.`);return e(o,!0,void 0,r,i)}return e(o,n(s,()=>t(a)),{isServer:!0,strictLayout:`server`},r,i)}export{o as arkenv,o as default};
2
2
  //# sourceMappingURL=server.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"server.js","names":["coreArkenv"],"sources":["../src/server.ts"],"sourcesContent":["import \"server-only\";\nimport type { EnvSchema } from \"@arkenv/core\";\nimport { arkenv as coreArkenv, getSchemaKeys } from \"@arkenv/core\";\nimport type { $ } from \"@repo/scope\";\nimport type { Dict, 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 entry point).\n */\nexport function arkenv<\n\tconst TSchema extends SchemaShape = {},\n\tconst TExtends extends readonly unknown[] = [],\n>(\n\tschema: EnvSchema<TSchema>,\n\toptions?: {\n\t\textends?: [...TExtends];\n\t\truntimeEnv?: Dict<string>;\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 TShared extends SchemaShape = {},\n\tconst TExtends extends readonly unknown[] = [],\n>(options: {\n\tserver?: EnvSchema<TServer>;\n\tshared?: EnvSchema<TShared>;\n\textends?: [...TExtends];\n\truntimeEnv?: Record<keyof TShared, string | undefined> & Dict<string>;\n}): Readonly<\n\tdistill.Out<at.infer<TServer & TShared, $>> & MergeExtends<TExtends>\n>;\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\"shared\" in schemaOrOptions);\n\n\tif (isLegacy) {\n\t\tif (\"client\" in schemaOrOptions) {\n\t\t\tthrow new Error(\n\t\t\t\t\"server entry point only accepts 'server' and 'shared' schemas.\",\n\t\t\t);\n\t\t}\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, strictLayout: \"server\" },\n\t\tcoreArkenv,\n\t\tgetSchemaKeys,\n\t);\n}\n\nexport default arkenv;\n"],"mappings":"+HAuCA,SAAgB,EAAO,EAAsB,EAA8B,CAQ1E,GANC,GACA,OAAO,GAAoB,WAC1B,eAAgB,GAChB,WAAY,GACZ,WAAY,GAEA,CACb,GAAI,WAAY,EACf,MAAU,MACT,iEACA,CAEF,OAAO,EACN,EACA,GACA,IAAA,GACAA,EACA,EACA,CAGF,OAAO,EACN,EACA,EACA,CAAE,SAAU,GAAM,aAAc,SAAU,CAC1CA,EACA,EACA"}
1
+ {"version":3,"file":"server.js","names":["coreArkenv","importedClientEnv"],"sources":["../src/server.ts"],"sourcesContent":["import \"server-only\";\nimport type { EnvSchema } from \"@arkenv/core\";\nimport { arkenv as coreArkenv, getSchemaKeys } from \"@arkenv/core\";\nimport type { $ } from \"@repo/scope\";\nimport type { Dict, SchemaShape } from \"@repo/types\";\nimport type { type as at, distill } from \"arktype\";\n// Static import so webpack/Turbopack can resolve the alias at bundle time.\n// Outside strict layout the package `imports` map points this at empty-client-env.\nimport { env as importedClientEnv } from \"#arkenv/client-env\";\nimport { arkenvInternal } from \"./arkenv-internal\";\nimport { withAutoExtend } from \"./auto-extend\";\nimport { resolveStrictClientEnv } from \"./strict-client-env\";\nimport type { MergeExtends } from \"./types\";\n\n/**\n * Client env type auto-merged in Next.js strict layout when `extends` is omitted.\n */\ntype AutoClientEnv = typeof import(\"#arkenv/client-env\") extends {\n\tenv: infer E;\n}\n\t? E\n\t: {};\n\n/**\n * Create a validated, typesafe environment configuration for Next.js applications (Server entry point).\n *\n * With `withArkEnv` in strict layout, omitting `extends` includes the client\n * env by default. Any explicit `extends` is used as-is and opts out of that\n * default; pass `extends: []` to include no extended env.\n */\nexport function arkenv<\n\tconst TSchema extends SchemaShape = {},\n\tconst TExtends extends readonly unknown[] = [],\n>(\n\tschema: EnvSchema<TSchema>,\n\toptions: {\n\t\t/**\n\t\t * Explicit envs to extend. Providing this option opts out of the default\n\t\t * strict-layout client merge; use `[]` to include no extended env.\n\t\t */\n\t\textends: [...TExtends];\n\t\truntimeEnv?: Dict<string>;\n\t},\n): Readonly<distill.Out<at.infer<TSchema, $>> & MergeExtends<TExtends>>;\n\nexport function arkenv<const TSchema extends SchemaShape = {}>(\n\tschema: EnvSchema<TSchema>,\n\toptions?: {\n\t\textends?: undefined;\n\t\truntimeEnv?: Dict<string>;\n\t},\n): Readonly<distill.Out<at.infer<TSchema, $>> & AutoClientEnv>;\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 TShared extends SchemaShape = {},\n\tconst TExtends extends readonly unknown[] = [],\n>(options: {\n\tserver?: EnvSchema<TServer>;\n\tshared?: EnvSchema<TShared>;\n\textends?: [...TExtends];\n\truntimeEnv?: Record<keyof TShared, string | undefined> & Dict<string>;\n}): Readonly<\n\tdistill.Out<at.infer<TServer & TShared, $>> & MergeExtends<TExtends>\n>;\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\"shared\" in schemaOrOptions);\n\n\tif (isLegacy) {\n\t\tif (\"client\" in schemaOrOptions) {\n\t\t\tthrow new Error(\n\t\t\t\t\"server entry point only accepts 'server' and 'shared' schemas.\",\n\t\t\t);\n\t\t}\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\twithAutoExtend(optionsOrIsServer, () =>\n\t\t\tresolveStrictClientEnv(importedClientEnv),\n\t\t),\n\t\t{ isServer: true, strictLayout: \"server\" },\n\t\tcoreArkenv,\n\t\tgetSchemaKeys,\n\t);\n}\n\nexport default arkenv;\n"],"mappings":"0QAqEA,SAAgB,EAAO,EAAsB,EAA8B,CAQ1E,GANC,GACA,OAAO,GAAoB,WAC1B,eAAgB,GAChB,WAAY,GACZ,WAAY,GAEA,CACb,GAAI,WAAY,EACf,MAAU,MACT,iEACA,CAEF,OAAO,EACN,EACA,GACA,IAAA,GACAA,EACA,EACA,CAGF,OAAO,EACN,EACA,EAAe,MACd,EAAuBC,EAAkB,CACzC,CACD,CAAE,SAAU,GAAM,aAAc,SAAU,CAC1CD,EACA,EACA"}