@arkenv/nextjs 1.0.0-alpha.4 → 1.0.0-alpha.5

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 (85) hide show
  1. package/dist/arkenv-internal-Do5bRP26.js +2 -0
  2. package/dist/arkenv-internal-Do5bRP26.js.map +1 -0
  3. package/dist/arkenv-internal-Dz0mDRKT.cjs +2 -0
  4. package/dist/arkenv-internal-Dz0mDRKT.cjs.map +1 -0
  5. package/dist/client.cjs +1 -1
  6. package/dist/client.cjs.map +1 -1
  7. package/dist/client.d.cts +3 -0
  8. package/dist/client.d.cts.map +1 -1
  9. package/dist/client.d.ts +5 -2
  10. package/dist/client.d.ts.map +1 -1
  11. package/dist/client.js +1 -1
  12. package/dist/client.js.map +1 -1
  13. package/dist/config-DNJIS9zz.cjs +103 -0
  14. package/dist/config-DNJIS9zz.cjs.map +1 -0
  15. package/dist/config.cjs +1 -1
  16. package/dist/config.d.cts +31 -31
  17. package/dist/config.d.cts.map +1 -1
  18. package/dist/config.d.ts +31 -31
  19. package/dist/config.d.ts.map +1 -1
  20. package/dist/config.js +65 -44
  21. package/dist/config.js.map +1 -1
  22. package/dist/{index-DeuykBvh.d.ts → index-Dypl5Zzg.d.ts} +1 -1
  23. package/dist/{index-DeuykBvh.d.ts.map → index-Dypl5Zzg.d.ts.map} +1 -1
  24. package/dist/index.cjs +1 -1
  25. package/dist/index.cjs.map +1 -1
  26. package/dist/index.d.cts +29 -7
  27. package/dist/index.d.cts.map +1 -1
  28. package/dist/index.d.ts +29 -7
  29. package/dist/index.d.ts.map +1 -1
  30. package/dist/index.js +1 -1
  31. package/dist/index.js.map +1 -1
  32. package/dist/react-server.cjs +1 -1
  33. package/dist/react-server.cjs.map +1 -1
  34. package/dist/react-server.d.cts +22 -7
  35. package/dist/react-server.d.cts.map +1 -1
  36. package/dist/react-server.d.ts +22 -7
  37. package/dist/react-server.d.ts.map +1 -1
  38. package/dist/react-server.js +1 -1
  39. package/dist/react-server.js.map +1 -1
  40. package/dist/script-CUpLLTKJ.cjs +2 -0
  41. package/dist/script-CUpLLTKJ.cjs.map +1 -0
  42. package/dist/script-DB7wIIvT.js +2 -0
  43. package/dist/script-DB7wIIvT.js.map +1 -0
  44. package/dist/script-DSWuhk88.d.cts +21 -0
  45. package/dist/script-DSWuhk88.d.cts.map +1 -0
  46. package/dist/script-Ii42Y-xZ.d.ts +21 -0
  47. package/dist/script-Ii42Y-xZ.d.ts.map +1 -0
  48. package/dist/server.cjs +1 -1
  49. package/dist/server.cjs.map +1 -1
  50. package/dist/server.d.cts +3 -0
  51. package/dist/server.d.cts.map +1 -1
  52. package/dist/server.d.ts +5 -2
  53. package/dist/server.d.ts.map +1 -1
  54. package/dist/server.js +1 -1
  55. package/dist/server.js.map +1 -1
  56. package/dist/shared.cjs +1 -1
  57. package/dist/shared.d.ts +2 -2
  58. package/dist/shared.js +1 -1
  59. package/dist/standard/client.cjs +1 -1
  60. package/dist/standard/client.d.ts +1 -1
  61. package/dist/standard/client.js +1 -1
  62. package/dist/standard/config.cjs +1 -1
  63. package/dist/standard/index.cjs +1 -1
  64. package/dist/standard/index.cjs.map +1 -1
  65. package/dist/standard/index.d.cts +17 -0
  66. package/dist/standard/index.d.cts.map +1 -1
  67. package/dist/standard/index.d.ts +18 -1
  68. package/dist/standard/index.d.ts.map +1 -1
  69. package/dist/standard/index.js +1 -1
  70. package/dist/standard/index.js.map +1 -1
  71. package/dist/standard/server.cjs +1 -1
  72. package/dist/standard/server.d.ts +1 -1
  73. package/dist/standard/server.js +1 -1
  74. package/dist/standard/shared.cjs +1 -1
  75. package/dist/standard/shared.d.ts +1 -1
  76. package/dist/standard/shared.js +1 -1
  77. package/dist/{types-BMCEEpJO.d.ts → types-gP-eTDyz.d.ts} +2 -2
  78. package/dist/{types-BMCEEpJO.d.ts.map → types-gP-eTDyz.d.ts.map} +1 -1
  79. package/package.json +14 -7
  80. package/dist/arkenv-internal-BquzddQ6.cjs +0 -2
  81. package/dist/arkenv-internal-BquzddQ6.cjs.map +0 -1
  82. package/dist/arkenv-internal-C3vJH4bg.js +0 -2
  83. package/dist/arkenv-internal-C3vJH4bg.js.map +0 -1
  84. package/dist/config-DBm5EQBG.cjs +0 -82
  85. package/dist/config-DBm5EQBG.cjs.map +0 -1
@@ -1,14 +1,29 @@
1
- import { t as SchemaShape } from "./index-96RGPyfa.cjs";
1
+ import { a as $, t as SchemaShape } from "./index-96RGPyfa.cjs";
2
+ import { t as MergeExtends } from "./types-44R9mgTa.cjs";
3
+ import { n as ArkEnvScriptProps, t as ArkEnvScript } from "./script-DSWuhk88.cjs";
2
4
  import { EnvSchema, Infer, Infer as Infer$1, type } from "@arkenv/core";
5
+ import { distill, type as type$1 } from "arktype";
3
6
 
4
7
  //#region src/react-server.d.ts
5
8
  /**
6
9
  * Create a validated, type-safe environment configuration for Next.js applications (Server-side RSC entry point).
7
- *
8
- * @param options The environment validation configuration options
9
- * @returns A validated, readonly environment variables object wrapped in a security proxy
10
- * @throws An error if any client-side variable is not prefixed with `NEXT_PUBLIC_`
11
- * @throws An error if any client or shared variable is missing from `runtimeEnv`
10
+ */
11
+ declare function arkenv<const TSchema extends SchemaShape & {
12
+ runtimeEnv?: never;
13
+ } = {}, const TShared extends keyof TSchema = never, const TExtends extends readonly unknown[] = []>(schema: EnvSchema<TSchema>, options?: {
14
+ /**
15
+ * Custom environment variables to expose to the client bundle.
16
+ * By default, variables prefixed with `NEXT_PUBLIC_` and `NODE_ENV` are exposed automatically.
17
+ * Use this option to expose custom variables that do not have the `NEXT_PUBLIC_` prefix.
18
+ */
19
+ exposeToClient?: readonly TShared[]; /** @deprecated Use `exposeToClient` instead */
20
+ expose?: readonly TShared[]; /** @deprecated Use `exposeToClient` instead */
21
+ shared?: readonly TShared[];
22
+ extends?: [...TExtends];
23
+ runtimeEnv?: Record<string, unknown>;
24
+ }): Readonly<distill.Out<type$1.infer<TSchema, $>> & MergeExtends<TExtends>>;
25
+ /**
26
+ * @deprecated Use the unified flat layout signature instead: `arkenv(schema, options)`
12
27
  */
13
28
  declare function arkenv<const TServer extends SchemaShape = {}, const TClient extends SchemaShape = {}, const TShared extends SchemaShape = {}>(options: {
14
29
  server?: EnvSchema<TServer>;
@@ -17,5 +32,5 @@ declare function arkenv<const TServer extends SchemaShape = {}, const TClient ex
17
32
  runtimeEnv: Record<keyof TClient | keyof TShared, unknown> & Record<string, unknown>;
18
33
  }): Readonly<Infer$1<TServer & TClient & TShared>>;
19
34
  //#endregion
20
- export { type Infer, arkenv, arkenv as default, type };
35
+ export { ArkEnvScript, type ArkEnvScriptProps, type Infer, arkenv, arkenv as default, type };
21
36
  //# sourceMappingURL=react-server.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"react-server.d.cts","names":[],"sources":["../src/react-server.ts"],"mappings":";;;;;;AAaA;;;;;;iBAAgB,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,OAAA,CAAM,OAAA,GAAU,OAAA,GAAU,OAAA"}
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,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,MAAA,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,OAAA,CAAM,OAAA,GAAU,OAAA,GAAU,OAAA"}
@@ -1,14 +1,29 @@
1
- import { t as SchemaShape } from "./index-DeuykBvh.js";
1
+ import { a as $, t as SchemaShape } from "./index-Dypl5Zzg.js";
2
+ import { t as MergeExtends } from "./types-gP-eTDyz.js";
3
+ import { n as ArkEnvScriptProps, t as ArkEnvScript } from "./script-Ii42Y-xZ.js";
2
4
  import { EnvSchema, Infer, Infer as Infer$1, type } from "@arkenv/core";
5
+ import { distill, type as type$1 } from "arktype";
3
6
 
4
7
  //#region src/react-server.d.ts
5
8
  /**
6
9
  * Create a validated, type-safe environment configuration for Next.js applications (Server-side RSC entry point).
7
- *
8
- * @param options The environment validation configuration options
9
- * @returns A validated, readonly environment variables object wrapped in a security proxy
10
- * @throws An error if any client-side variable is not prefixed with `NEXT_PUBLIC_`
11
- * @throws An error if any client or shared variable is missing from `runtimeEnv`
10
+ */
11
+ declare function arkenv<const TSchema extends SchemaShape & {
12
+ runtimeEnv?: never;
13
+ } = {}, const TShared extends keyof TSchema = never, const TExtends extends readonly unknown[] = []>(schema: EnvSchema<TSchema>, options?: {
14
+ /**
15
+ * Custom environment variables to expose to the client bundle.
16
+ * By default, variables prefixed with `NEXT_PUBLIC_` and `NODE_ENV` are exposed automatically.
17
+ * Use this option to expose custom variables that do not have the `NEXT_PUBLIC_` prefix.
18
+ */
19
+ exposeToClient?: readonly TShared[]; /** @deprecated Use `exposeToClient` instead */
20
+ expose?: readonly TShared[]; /** @deprecated Use `exposeToClient` instead */
21
+ shared?: readonly TShared[];
22
+ extends?: [...TExtends];
23
+ runtimeEnv?: Record<string, unknown>;
24
+ }): Readonly<distill.Out<type$1.infer<TSchema, $>> & MergeExtends<TExtends>>;
25
+ /**
26
+ * @deprecated Use the unified flat layout signature instead: `arkenv(schema, options)`
12
27
  */
13
28
  declare function arkenv<const TServer extends SchemaShape = {}, const TClient extends SchemaShape = {}, const TShared extends SchemaShape = {}>(options: {
14
29
  server?: EnvSchema<TServer>;
@@ -17,5 +32,5 @@ declare function arkenv<const TServer extends SchemaShape = {}, const TClient ex
17
32
  runtimeEnv: Record<keyof TClient | keyof TShared, unknown> & Record<string, unknown>;
18
33
  }): Readonly<Infer$1<TServer & TClient & TShared>>;
19
34
  //#endregion
20
- export { type Infer, arkenv, arkenv as default, type };
35
+ export { ArkEnvScript, type ArkEnvScriptProps, type Infer, arkenv, arkenv as default, type };
21
36
  //# sourceMappingURL=react-server.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"react-server.d.ts","names":[],"sources":["../src/react-server.ts"],"mappings":";;;;;;AAaA;;;;;;iBAAgB,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,OAAA,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,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,MAAA,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,OAAA,CAAM,OAAA,GAAU,OAAA,GAAU,OAAA"}
@@ -1,2 +1,2 @@
1
- import{t as e}from"./arkenv-internal-C3vJH4bg.js";import{arkenv as t,getSchemaKeys as n,type as r}from"@arkenv/core";function i(r){return e(r,!0,void 0,t,n)}export{i as arkenv,i as default,r as type};
1
+ import{t as e}from"./arkenv-internal-Do5bRP26.js";import{t}from"./script-DB7wIIvT.js";import{arkenv as n,getSchemaKeys as r,type as i}from"@arkenv/core";function a(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,a as arkenv,a as default,i as type};
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 { SchemaShape } from \"@repo/types\";\nimport { arkenvInternal } from \"./arkenv-internal\";\n\n/**\n * Create a validated, type-safe environment configuration for Next.js applications (Server-side RSC entry point).\n *\n * @param options The environment validation configuration options\n * @returns A validated, readonly environment variables object wrapped in a security proxy\n * @throws An error if any client-side variable is not prefixed with `NEXT_PUBLIC_`\n * @throws An error if any client or shared variable is missing from `runtimeEnv`\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\ttype ReturnType = Readonly<Infer<TServer & TClient & TShared>>;\n\treturn arkenvInternal(\n\t\toptions,\n\t\ttrue,\n\t\tundefined,\n\t\tcoreArkenv,\n\t\tgetSchemaKeys,\n\t) as ReturnType;\n}\n\nexport type { Infer } from \"@arkenv/core\";\nexport { type } from \"@arkenv/core\";\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":"qHAaA,SAAgB,EAId,EAQ+C,CAEhD,OAAO,EACN,EACA,GACA,IAAA,GACAA,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, 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 { Infer } from \"@arkenv/core\";\nexport { type } from \"@arkenv/core\";\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":"yJAkDA,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"}
@@ -0,0 +1,2 @@
1
+ require(`./config-DNJIS9zz.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-CUpLLTKJ.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"script-CUpLLTKJ.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"}
@@ -0,0 +1,2 @@
1
+ import{jsx as e}from"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 e(`script`,{id:`arkenv-script`,dangerouslySetInnerHTML:{__html:`globalThis.__arkenv_env__ = ${JSON.stringify(n).replace(/</g,`\\u003c`)};`}})}export{t};
2
+ //# sourceMappingURL=script-DB7wIIvT.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"script-DB7wIIvT.js","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":"wCAeA,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,EAAC,SAAD,CACC,GAAG,gBACH,wBAAyB,CAAE,OAAQ,+BALgB,KAAK,UAAU,EAAU,CAAC,QAAQ,KAAM,UAAU,CAAC,GAKpD,CACjD,CAAA"}
@@ -0,0 +1,21 @@
1
+ import React from "react";
2
+
3
+ //#region src/script.d.ts
4
+ type ArkEnvScriptProps = {
5
+ /**
6
+ * Optional custom environment variable map. If provided, any keys starting
7
+ * with `NEXT_PUBLIC_` will be merged with public keys from `process.env`.
8
+ */
9
+ env?: Record<string, string | undefined>;
10
+ };
11
+ /**
12
+ * A React Component to serialize and inject NEXT_PUBLIC_* environment variables into the browser
13
+ * during Server-Side Rendering (SSR). Placed in your root layout (layout.tsx), it sets
14
+ * globalThis.__arkenv_env__ to ensure client-side components have access to runtime environment values.
15
+ */
16
+ declare function ArkEnvScript({
17
+ env
18
+ }?: ArkEnvScriptProps): React.ReactElement;
19
+ //#endregion
20
+ export { ArkEnvScriptProps as n, ArkEnvScript as t };
21
+ //# sourceMappingURL=script-DSWuhk88.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"script-DSWuhk88.d.cts","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"}
@@ -0,0 +1,21 @@
1
+ import React from "react";
2
+
3
+ //#region src/script.d.ts
4
+ type ArkEnvScriptProps = {
5
+ /**
6
+ * Optional custom environment variable map. If provided, any keys starting
7
+ * with `NEXT_PUBLIC_` will be merged with public keys from `process.env`.
8
+ */
9
+ env?: Record<string, string | undefined>;
10
+ };
11
+ /**
12
+ * A React Component to serialize and inject NEXT_PUBLIC_* environment variables into the browser
13
+ * during Server-Side Rendering (SSR). Placed in your root layout (layout.tsx), it sets
14
+ * globalThis.__arkenv_env__ to ensure client-side components have access to runtime environment values.
15
+ */
16
+ declare function ArkEnvScript({
17
+ env
18
+ }?: ArkEnvScriptProps): React.ReactElement;
19
+ //#endregion
20
+ export { ArkEnvScriptProps as n, ArkEnvScript as t };
21
+ //# sourceMappingURL=script-Ii42Y-xZ.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"script-Ii42Y-xZ.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-DBm5EQBG.cjs`);const e=require(`./arkenv-internal-BquzddQ6.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},t.arkenv,t.getSchemaKeys)}exports.arkenv=n,exports.default=n,Object.defineProperty(exports,`type`,{enumerable:!0,get:function(){return t.type}});
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`./config-DNJIS9zz.cjs`);const e=require(`./arkenv-internal-Dz0mDRKT.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,Object.defineProperty(exports,`type`,{enumerable:!0,get:function(){return t.type}});
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\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 },\n\t\tcoreArkenv,\n\t\tgetSchemaKeys,\n\t);\n}\n\nexport { type } from \"@arkenv/core\";\n\nexport default arkenv;\n"],"mappings":"uOAoCA,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,CAClBC,EAAAA,OACAC,EAAAA,cACA"}
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 { type } from \"@arkenv/core\";\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"}
package/dist/server.d.cts CHANGED
@@ -10,6 +10,9 @@ declare function arkenv<const TSchema extends SchemaShape = {}, const TExtends e
10
10
  extends?: [...TExtends];
11
11
  runtimeEnv?: Dict<string>;
12
12
  }): Readonly<distill.Out<type$1.infer<TSchema, $>> & MergeExtends<TExtends>>;
13
+ /**
14
+ * @deprecated Use the unified flat layout signature instead: `arkenv(schema, options)`
15
+ */
13
16
  declare function arkenv<const TServer extends SchemaShape = {}, const TShared extends SchemaShape = {}, const TExtends extends readonly unknown[] = []>(options: {
14
17
  server?: EnvSchema<TServer>;
15
18
  shared?: EnvSchema<TShared>;
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.cts","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,MAAA,CAAG,KAAA,CAAM,OAAA,EAAS,CAAA,KAAM,YAAA,CAAa,QAAA;AAAA,iBAE7C,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,MAAA,CAAG,KAAA,CAAM,OAAA,GAAU,OAAA,EAAS,CAAA,KAAM,YAAA,CAAa,QAAA"}
1
+ {"version":3,"file":"server.d.cts","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,MAAA,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,MAAA,CAAG,KAAA,CAAM,OAAA,GAAU,OAAA,EAAS,CAAA,KAAM,YAAA,CAAa,QAAA"}
package/dist/server.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { a as $, i as Dict, t as SchemaShape } from "./index-DeuykBvh.js";
2
- import { t as MergeExtends } from "./types-BMCEEpJO.js";
1
+ import { a as $, i as Dict, t as SchemaShape } from "./index-Dypl5Zzg.js";
2
+ import { t as MergeExtends } from "./types-gP-eTDyz.js";
3
3
  import { EnvSchema, type } from "@arkenv/core";
4
4
  import { distill, type as type$1 } from "arktype";
5
5
 
@@ -11,6 +11,9 @@ declare function arkenv<const TSchema extends SchemaShape = {}, const TExtends e
11
11
  extends?: [...TExtends];
12
12
  runtimeEnv?: Dict<string>;
13
13
  }): Readonly<distill.Out<type$1.infer<TSchema, $>> & MergeExtends<TExtends>>;
14
+ /**
15
+ * @deprecated Use the unified flat layout signature instead: `arkenv(schema, options)`
16
+ */
14
17
  declare function arkenv<const TServer extends SchemaShape = {}, const TShared extends SchemaShape = {}, const TExtends extends readonly unknown[] = []>(options: {
15
18
  server?: EnvSchema<TServer>;
16
19
  shared?: EnvSchema<TShared>;
@@ -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,MAAA,CAAG,KAAA,CAAM,OAAA,EAAS,CAAA,KAAM,YAAA,CAAa,QAAA;AAAA,iBAE7C,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,MAAA,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":";;;;;;;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,MAAA,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,MAAA,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-C3vJH4bg.js";import{arkenv as t,getSchemaKeys as n,type as r}from"@arkenv/core";import"server-only";function i(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},t,n)}export{i as arkenv,i as default,r as type};
1
+ import{t as e}from"./arkenv-internal-Do5bRP26.js";import{arkenv as t,getSchemaKeys as n,type as r}from"@arkenv/core";import"server-only";function i(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{i as arkenv,i as default,r as type};
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\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 },\n\t\tcoreArkenv,\n\t\tgetSchemaKeys,\n\t);\n}\n\nexport { type } from \"@arkenv/core\";\n\nexport default arkenv;\n"],"mappings":"yIAoCA,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,CAClBA,EACA,EACA"}
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 { type } from \"@arkenv/core\";\n\nexport default arkenv;\n"],"mappings":"yIAuCA,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"}
package/dist/shared.cjs CHANGED
@@ -1,2 +1,2 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`./config-DBm5EQBG.cjs`);const e=require(`./arkenv-internal-BquzddQ6.cjs`);let t=require(`@arkenv/core`);function n(n,r){return e.t(n,r,{isServer:typeof window>`u`,isShared:!0},t.arkenv,t.getSchemaKeys)}exports.arkenv=n,exports.default=n,Object.defineProperty(exports,`type`,{enumerable:!0,get:function(){return t.type}});
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`./config-DNJIS9zz.cjs`);const e=require(`./arkenv-internal-Dz0mDRKT.cjs`);let t=require(`@arkenv/core`);function n(n,r){return e.t(n,r,{isServer:typeof window>`u`,isShared:!0},t.arkenv,t.getSchemaKeys)}exports.arkenv=n,exports.default=n,Object.defineProperty(exports,`type`,{enumerable:!0,get:function(){return t.type}});
2
2
  //# sourceMappingURL=shared.cjs.map
package/dist/shared.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { a as $, i as Dict, t as SchemaShape } from "./index-DeuykBvh.js";
2
- import { t as MergeExtends } from "./types-BMCEEpJO.js";
1
+ import { a as $, i as Dict, t as SchemaShape } from "./index-Dypl5Zzg.js";
2
+ import { t as MergeExtends } from "./types-gP-eTDyz.js";
3
3
  import { EnvSchema, type } from "@arkenv/core";
4
4
  import { distill, type as type$1 } from "arktype";
5
5
 
package/dist/shared.js CHANGED
@@ -1,2 +1,2 @@
1
- import{t as e}from"./arkenv-internal-C3vJH4bg.js";import{arkenv as t,getSchemaKeys as n,type as r}from"@arkenv/core";function i(r,i){return e(r,i,{isServer:typeof window>`u`,isShared:!0},t,n)}export{i as arkenv,i as default,r as type};
1
+ import{t as e}from"./arkenv-internal-Do5bRP26.js";import{arkenv as t,getSchemaKeys as n,type as r}from"@arkenv/core";function i(r,i){return e(r,i,{isServer:typeof window>`u`,isShared:!0},t,n)}export{i as arkenv,i as default,r as type};
2
2
  //# sourceMappingURL=shared.js.map
@@ -1,2 +1,2 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../config-DBm5EQBG.cjs`);const e=require(`../arkenv-internal-BquzddQ6.cjs`);let t=require(`@arkenv/standard`);function n(n,r){if(n&&typeof n==`object`&&(`runtimeEnv`in n||`client`in n||`shared`in n)){if(`server`in n)throw Error(`client entry point only accepts 'client' and 'shared' schemas.`);return e.t(n,!1,void 0,t.arkenv,t.getSchemaKeys)}return e.t(n,r,{isServer:!1},t.arkenv,t.getSchemaKeys)}exports.arkenv=n,exports.default=n;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../config-DNJIS9zz.cjs`);const e=require(`../arkenv-internal-Dz0mDRKT.cjs`);let t=require(`@arkenv/standard`);function n(n,r){if(n&&typeof n==`object`&&(`runtimeEnv`in n||`client`in n||`shared`in n)){if(`server`in n)throw Error(`client entry point only accepts 'client' and 'shared' schemas.`);return e.t(n,!1,void 0,t.arkenv,t.getSchemaKeys)}return e.t(n,r,{isServer:!1},t.arkenv,t.getSchemaKeys)}exports.arkenv=n,exports.default=n;
2
2
  //# sourceMappingURL=client.cjs.map
@@ -1,4 +1,4 @@
1
- import { i as Dict, r as StandardSchemaV1 } from "../index-DeuykBvh.js";
1
+ import { i as Dict, r as StandardSchemaV1 } from "../index-Dypl5Zzg.js";
2
2
 
3
3
  //#region src/standard/client.d.ts
4
4
  /**
@@ -1,2 +1,2 @@
1
- import{t as e}from"../arkenv-internal-C3vJH4bg.js";import{arkenv as t,getSchemaKeys as n}from"@arkenv/standard";function r(r,i){if(r&&typeof r==`object`&&(`runtimeEnv`in r||`client`in r||`shared`in r)){if(`server`in r)throw Error(`client entry point only accepts 'client' and 'shared' schemas.`);return e(r,!1,void 0,t,n)}return e(r,i,{isServer:!1},t,n)}export{r as arkenv,r as default};
1
+ import{t as e}from"../arkenv-internal-Do5bRP26.js";import{arkenv as t,getSchemaKeys as n}from"@arkenv/standard";function r(r,i){if(r&&typeof r==`object`&&(`runtimeEnv`in r||`client`in r||`shared`in r)){if(`server`in r)throw Error(`client entry point only accepts 'client' and 'shared' schemas.`);return e(r,!1,void 0,t,n)}return e(r,i,{isServer:!1},t,n)}export{r as arkenv,r as default};
2
2
  //# sourceMappingURL=client.js.map
@@ -1,2 +1,2 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../config-DBm5EQBG.cjs`);function t(t,n){return e.a(t,{...n,standard:!0})}exports.withArkEnv=t;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../config-DNJIS9zz.cjs`);function t(t,n){return e.i(t,{...n,standard:!0})}exports.withArkEnv=t;
2
2
  //# sourceMappingURL=config.cjs.map
@@ -1,2 +1,2 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../config-DBm5EQBG.cjs`);const e=require(`../arkenv-internal-BquzddQ6.cjs`);let t=require(`@arkenv/standard`);function n(n){return e.t(n,!1,void 0,t.arkenv,t.getSchemaKeys)}exports.arkenv=n,exports.default=n;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../config-DNJIS9zz.cjs`);const e=require(`../arkenv-internal-Dz0mDRKT.cjs`);let t=require(`@arkenv/standard`);function n(n,r){return n&&typeof n==`object`&&(`runtimeEnv`in n||`server`in n||`client`in n||`shared`in n)?e.t(n,!1,void 0,t.arkenv,t.getSchemaKeys):e.t(n,r,{isServer:!1},t.arkenv,t.getSchemaKeys)}exports.arkenv=n,exports.default=n;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["arkenvInternal","coreArkenv","getSchemaKeys"],"sources":["../../src/standard/index.ts"],"sourcesContent":["import { arkenv as coreArkenv, getSchemaKeys } from \"@arkenv/standard\";\nimport type { StandardSchemaV1 } from \"@repo/types\";\nimport { arkenvInternal } from \"@/arkenv-internal\";\n\n/**\n * Create a validated, type-safe environment configuration for Next.js applications in Standard Mode.\n *\n * @param options The environment validation configuration options\n * @returns A validated, readonly environment variables object wrapped in a security proxy\n */\nexport function arkenv<\n\tconst TServer extends Record<string, StandardSchemaV1> = {},\n\tconst TClient extends Record<string, StandardSchemaV1> = {},\n\tconst TShared extends Record<string, StandardSchemaV1> = {},\n>(options: {\n\tserver?: TServer;\n\tclient?: TClient & {\n\t\t[K in keyof TClient]: K extends `NEXT_PUBLIC_${string}` ? unknown : never;\n\t};\n\tshared?: TShared;\n\truntimeEnv: Record<keyof TClient | keyof TShared, unknown> &\n\t\tRecord<string, unknown>;\n}): Readonly<{\n\t[K in keyof (TServer & TClient & TShared)]: StandardSchemaV1.InferOutput<\n\t\t(TServer & TClient & TShared)[K]\n\t>;\n}> {\n\ttype ReturnType = Readonly<{\n\t\t[K in keyof (TServer & TClient & TShared)]: StandardSchemaV1.InferOutput<\n\t\t\t(TServer & TClient & TShared)[K]\n\t\t>;\n\t}>;\n\treturn arkenvInternal(\n\t\toptions,\n\t\tfalse,\n\t\tundefined,\n\t\tcoreArkenv,\n\t\tgetSchemaKeys,\n\t) as ReturnType;\n}\n\nexport default arkenv;\n"],"mappings":"sNAUA,SAAgB,EAId,EAYC,CAMF,OAAOA,EAAAA,EACN,EACA,GACA,IAAA,GACAC,EAAAA,OACAC,EAAAA,cACA"}
1
+ {"version":3,"file":"index.cjs","names":["arkenvInternal","coreArkenv","getSchemaKeys"],"sources":["../../src/standard/index.ts"],"sourcesContent":["import { arkenv as coreArkenv, getSchemaKeys } from \"@arkenv/standard\";\nimport type { StandardSchemaV1 } from \"@repo/types\";\nimport { arkenvInternal } from \"@/arkenv-internal\";\nimport type { MergeExtends } from \"../types\";\n\ntype ClientVisibleKeys<\n\tTSchema extends Record<string, StandardSchemaV1>,\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 in Standard Mode.\n *\n * @param schema A flat schema of environment variable Standard Schema validators\n * @param options Optional configuration including client-side variables and extends\n * @returns A validated, readonly environment variables object wrapped in a security proxy\n */\nexport function arkenv<\n\tconst TSchema extends Record<string, StandardSchemaV1> = {},\n\tconst TExpose extends keyof TSchema = never,\n\tconst TExtends extends readonly unknown[] = [],\n>(\n\tschema: TSchema,\n\toptions?: {\n\t\texposeToClient?: readonly TExpose[];\n\t\texpose?: readonly TExpose[];\n\t\tshared?: readonly TExpose[];\n\t\textends?: [...TExtends];\n\t\truntimeEnv?: Record<string, unknown>;\n\t},\n): Readonly<\n\tPick<\n\t\t{ [K in keyof TSchema]: StandardSchemaV1.InferOutput<TSchema[K]> },\n\t\tExtract<keyof TSchema, ClientVisibleKeys<TSchema, TExpose>>\n\t> &\n\t\tMergeExtends<TExtends>\n>;\n\n/**\n * Create a validated, type-safe environment configuration for Next.js applications in Standard Mode.\n *\n * @deprecated Use the unified flat layout signature instead: `arkenv(schema, options)`\n * @param options The environment validation configuration options\n * @returns A validated, readonly environment variables object wrapped in a security proxy\n */\nexport function arkenv<\n\tconst TServer extends Record<string, StandardSchemaV1> = {},\n\tconst TClient extends Record<string, StandardSchemaV1> = {},\n\tconst TShared extends Record<string, StandardSchemaV1> = {},\n>(options: {\n\tserver?: TServer;\n\tclient?: TClient & {\n\t\t[K in keyof TClient]: K extends `NEXT_PUBLIC_${string}` ? unknown : never;\n\t};\n\tshared?: TShared;\n\truntimeEnv: Record<keyof TClient | keyof TShared, unknown> &\n\t\tRecord<string, unknown>;\n}): Readonly<{\n\t[K in keyof (TServer & TClient & TShared)]: StandardSchemaV1.InferOutput<\n\t\t(TServer & TClient & TShared)[K]\n\t>;\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\"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 default arkenv;\n"],"mappings":"sNAuEA,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,9 +1,26 @@
1
1
  import { r as StandardSchemaV1 } from "../index-96RGPyfa.cjs";
2
+ import { t as MergeExtends } from "../types-44R9mgTa.cjs";
2
3
 
3
4
  //#region src/standard/index.d.ts
5
+ type ClientVisibleKeys<TSchema extends Record<string, StandardSchemaV1>, 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];
4
6
  /**
5
7
  * Create a validated, type-safe environment configuration for Next.js applications in Standard Mode.
6
8
  *
9
+ * @param schema A flat schema of environment variable Standard Schema validators
10
+ * @param options Optional configuration including client-side variables and extends
11
+ * @returns A validated, readonly environment variables object wrapped in a security proxy
12
+ */
13
+ declare function arkenv<const TSchema extends Record<string, StandardSchemaV1> = {}, const TExpose extends keyof TSchema = never, const TExtends extends readonly unknown[] = []>(schema: TSchema, options?: {
14
+ exposeToClient?: readonly TExpose[];
15
+ expose?: readonly TExpose[];
16
+ shared?: readonly TExpose[];
17
+ extends?: [...TExtends];
18
+ runtimeEnv?: Record<string, unknown>;
19
+ }): Readonly<Pick<{ [K in keyof TSchema]: StandardSchemaV1.InferOutput<TSchema[K]> }, Extract<keyof TSchema, ClientVisibleKeys<TSchema, TExpose>>> & MergeExtends<TExtends>>;
20
+ /**
21
+ * Create a validated, type-safe environment configuration for Next.js applications in Standard Mode.
22
+ *
23
+ * @deprecated Use the unified flat layout signature instead: `arkenv(schema, options)`
7
24
  * @param options The environment validation configuration options
8
25
  * @returns A validated, readonly environment variables object wrapped in a security proxy
9
26
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../../src/standard/index.ts"],"mappings":";;;;;AAUA;;;;iBAAgB,MAAA,uBACO,MAAA,SAAe,gBAAA,8BACf,MAAA,SAAe,gBAAA,8BACf,MAAA,SAAe,gBAAA,OAAA,CACpC,OAAA;EACD,MAAA,GAAS,OAAA;EACT,MAAA,GAAS,OAAA,iBACI,OAAA,GAAU,CAAA;EAEvB,MAAA,GAAS,OAAA;EACT,UAAA,EAAY,MAAA,OAAa,OAAA,SAAgB,OAAA,aACxC,MAAA;AAAA,IACE,QAAA,gBACU,OAAA,GAAU,OAAA,GAAU,OAAA,IAAW,gBAAA,CAAiB,WAAA,EAC3D,OAAA,GAAU,OAAA,GAAU,OAAA,EAAS,CAAA"}
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../../src/standard/index.ts"],"mappings":";;;;KAKK,iBAAA,iBACY,MAAA,SAAe,gBAAA,yBACT,OAAA,kBAEV,OAAA,GAAU,CAAA,mCACnB,CAAA,GACA,CAAA,sBACC,CAAA,GACA,CAAA,SAAU,OAAA,GACT,CAAA,iBAEE,OAAA;;;;;;;;iBASQ,MAAA,uBACO,MAAA,SAAe,gBAAA,oCACT,OAAA,yDAAA,CAG5B,MAAA,EAAQ,OAAA,EACR,OAAA;EACC,cAAA,YAA0B,OAAA;EAC1B,MAAA,YAAkB,OAAA;EAClB,MAAA,YAAkB,OAAA;EAClB,OAAA,OAAc,QAAA;EACd,UAAA,GAAa,MAAA;AAAA,IAEZ,QAAA,CACF,IAAA,eACe,OAAA,GAAU,gBAAA,CAAiB,WAAA,CAAY,OAAA,CAAQ,CAAA,MAC7D,OAAA,OAAc,OAAA,EAAS,iBAAA,CAAkB,OAAA,EAAS,OAAA,MAElD,YAAA,CAAa,QAAA;;;;;;;;iBAUC,MAAA,uBACO,MAAA,SAAe,gBAAA,8BACf,MAAA,SAAe,gBAAA,8BACf,MAAA,SAAe,gBAAA,OAAA,CACpC,OAAA;EACD,MAAA,GAAS,OAAA;EACT,MAAA,GAAS,OAAA,iBACI,OAAA,GAAU,CAAA;EAEvB,MAAA,GAAS,OAAA;EACT,UAAA,EAAY,MAAA,OAAa,OAAA,SAAgB,OAAA,aACxC,MAAA;AAAA,IACE,QAAA,gBACU,OAAA,GAAU,OAAA,GAAU,OAAA,IAAW,gBAAA,CAAiB,WAAA,EAC3D,OAAA,GAAU,OAAA,GAAU,OAAA,EAAS,CAAA"}
@@ -1,9 +1,26 @@
1
- import { r as StandardSchemaV1 } from "../index-DeuykBvh.js";
1
+ import { r as StandardSchemaV1 } from "../index-Dypl5Zzg.js";
2
+ import { t as MergeExtends } from "../types-gP-eTDyz.js";
2
3
 
3
4
  //#region src/standard/index.d.ts
5
+ type ClientVisibleKeys<TSchema extends Record<string, StandardSchemaV1>, 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];
4
6
  /**
5
7
  * Create a validated, type-safe environment configuration for Next.js applications in Standard Mode.
6
8
  *
9
+ * @param schema A flat schema of environment variable Standard Schema validators
10
+ * @param options Optional configuration including client-side variables and extends
11
+ * @returns A validated, readonly environment variables object wrapped in a security proxy
12
+ */
13
+ declare function arkenv<const TSchema extends Record<string, StandardSchemaV1> = {}, const TExpose extends keyof TSchema = never, const TExtends extends readonly unknown[] = []>(schema: TSchema, options?: {
14
+ exposeToClient?: readonly TExpose[];
15
+ expose?: readonly TExpose[];
16
+ shared?: readonly TExpose[];
17
+ extends?: [...TExtends];
18
+ runtimeEnv?: Record<string, unknown>;
19
+ }): Readonly<Pick<{ [K in keyof TSchema]: StandardSchemaV1.InferOutput<TSchema[K]> }, Extract<keyof TSchema, ClientVisibleKeys<TSchema, TExpose>>> & MergeExtends<TExtends>>;
20
+ /**
21
+ * Create a validated, type-safe environment configuration for Next.js applications in Standard Mode.
22
+ *
23
+ * @deprecated Use the unified flat layout signature instead: `arkenv(schema, options)`
7
24
  * @param options The environment validation configuration options
8
25
  * @returns A validated, readonly environment variables object wrapped in a security proxy
9
26
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/standard/index.ts"],"mappings":";;;;;AAUA;;;;iBAAgB,MAAA,uBACO,MAAA,SAAe,gBAAA,8BACf,MAAA,SAAe,gBAAA,8BACf,MAAA,SAAe,gBAAA,OAAA,CACpC,OAAA;EACD,MAAA,GAAS,OAAA;EACT,MAAA,GAAS,OAAA,iBACI,OAAA,GAAU,CAAA;EAEvB,MAAA,GAAS,OAAA;EACT,UAAA,EAAY,MAAA,OAAa,OAAA,SAAgB,OAAA,aACxC,MAAA;AAAA,IACE,QAAA,gBACU,OAAA,GAAU,OAAA,GAAU,OAAA,IAAW,gBAAA,CAAiB,WAAA,EAC3D,OAAA,GAAU,OAAA,GAAU,OAAA,EAAS,CAAA"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/standard/index.ts"],"mappings":";;;;KAKK,iBAAA,iBACY,MAAA,SAAe,gBAAA,yBACT,OAAA,kBAEV,OAAA,GAAU,CAAA,mCACnB,CAAA,GACA,CAAA,sBACC,CAAA,GACA,CAAA,SAAU,OAAA,GACT,CAAA,iBAEE,OAAA;;;;;;;;iBASQ,MAAA,uBACO,MAAA,SAAe,gBAAA,oCACT,OAAA,yDAAA,CAG5B,MAAA,EAAQ,OAAA,EACR,OAAA;EACC,cAAA,YAA0B,OAAA;EAC1B,MAAA,YAAkB,OAAA;EAClB,MAAA,YAAkB,OAAA;EAClB,OAAA,OAAc,QAAA;EACd,UAAA,GAAa,MAAA;AAAA,IAEZ,QAAA,CACF,IAAA,eACe,OAAA,GAAU,gBAAA,CAAiB,WAAA,CAAY,OAAA,CAAQ,CAAA,MAC7D,OAAA,OAAc,OAAA,EAAS,iBAAA,CAAkB,OAAA,EAAS,OAAA,MAElD,YAAA,CAAa,QAAA;;;;;;;;iBAUC,MAAA,uBACO,MAAA,SAAe,gBAAA,8BACf,MAAA,SAAe,gBAAA,8BACf,MAAA,SAAe,gBAAA,OAAA,CACpC,OAAA;EACD,MAAA,GAAS,OAAA;EACT,MAAA,GAAS,OAAA,iBACI,OAAA,GAAU,CAAA;EAEvB,MAAA,GAAS,OAAA;EACT,UAAA,EAAY,MAAA,OAAa,OAAA,SAAgB,OAAA,aACxC,MAAA;AAAA,IACE,QAAA,gBACU,OAAA,GAAU,OAAA,GAAU,OAAA,IAAW,gBAAA,CAAiB,WAAA,EAC3D,OAAA,GAAU,OAAA,GAAU,OAAA,EAAS,CAAA"}
@@ -1,2 +1,2 @@
1
- import{t as e}from"../arkenv-internal-C3vJH4bg.js";import{arkenv as t,getSchemaKeys as n}from"@arkenv/standard";function r(r){return e(r,!1,void 0,t,n)}export{r as arkenv,r as default};
1
+ import{t as e}from"../arkenv-internal-Do5bRP26.js";import{arkenv as t,getSchemaKeys as n}from"@arkenv/standard";function r(r,i){return r&&typeof r==`object`&&(`runtimeEnv`in r||`server`in r||`client`in r||`shared`in r)?e(r,!1,void 0,t,n):e(r,i,{isServer:!1},t,n)}export{r as arkenv,r as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["coreArkenv"],"sources":["../../src/standard/index.ts"],"sourcesContent":["import { arkenv as coreArkenv, getSchemaKeys } from \"@arkenv/standard\";\nimport type { StandardSchemaV1 } from \"@repo/types\";\nimport { arkenvInternal } from \"@/arkenv-internal\";\n\n/**\n * Create a validated, type-safe environment configuration for Next.js applications in Standard Mode.\n *\n * @param options The environment validation configuration options\n * @returns A validated, readonly environment variables object wrapped in a security proxy\n */\nexport function arkenv<\n\tconst TServer extends Record<string, StandardSchemaV1> = {},\n\tconst TClient extends Record<string, StandardSchemaV1> = {},\n\tconst TShared extends Record<string, StandardSchemaV1> = {},\n>(options: {\n\tserver?: TServer;\n\tclient?: TClient & {\n\t\t[K in keyof TClient]: K extends `NEXT_PUBLIC_${string}` ? unknown : never;\n\t};\n\tshared?: TShared;\n\truntimeEnv: Record<keyof TClient | keyof TShared, unknown> &\n\t\tRecord<string, unknown>;\n}): Readonly<{\n\t[K in keyof (TServer & TClient & TShared)]: StandardSchemaV1.InferOutput<\n\t\t(TServer & TClient & TShared)[K]\n\t>;\n}> {\n\ttype ReturnType = Readonly<{\n\t\t[K in keyof (TServer & TClient & TShared)]: StandardSchemaV1.InferOutput<\n\t\t\t(TServer & TClient & TShared)[K]\n\t\t>;\n\t}>;\n\treturn arkenvInternal(\n\t\toptions,\n\t\tfalse,\n\t\tundefined,\n\t\tcoreArkenv,\n\t\tgetSchemaKeys,\n\t) as ReturnType;\n}\n\nexport default arkenv;\n"],"mappings":"gHAUA,SAAgB,EAId,EAYC,CAMF,OAAO,EACN,EACA,GACA,IAAA,GACAA,EACA,EACA"}
1
+ {"version":3,"file":"index.js","names":["coreArkenv"],"sources":["../../src/standard/index.ts"],"sourcesContent":["import { arkenv as coreArkenv, getSchemaKeys } from \"@arkenv/standard\";\nimport type { StandardSchemaV1 } from \"@repo/types\";\nimport { arkenvInternal } from \"@/arkenv-internal\";\nimport type { MergeExtends } from \"../types\";\n\ntype ClientVisibleKeys<\n\tTSchema extends Record<string, StandardSchemaV1>,\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 in Standard Mode.\n *\n * @param schema A flat schema of environment variable Standard Schema validators\n * @param options Optional configuration including client-side variables and extends\n * @returns A validated, readonly environment variables object wrapped in a security proxy\n */\nexport function arkenv<\n\tconst TSchema extends Record<string, StandardSchemaV1> = {},\n\tconst TExpose extends keyof TSchema = never,\n\tconst TExtends extends readonly unknown[] = [],\n>(\n\tschema: TSchema,\n\toptions?: {\n\t\texposeToClient?: readonly TExpose[];\n\t\texpose?: readonly TExpose[];\n\t\tshared?: readonly TExpose[];\n\t\textends?: [...TExtends];\n\t\truntimeEnv?: Record<string, unknown>;\n\t},\n): Readonly<\n\tPick<\n\t\t{ [K in keyof TSchema]: StandardSchemaV1.InferOutput<TSchema[K]> },\n\t\tExtract<keyof TSchema, ClientVisibleKeys<TSchema, TExpose>>\n\t> &\n\t\tMergeExtends<TExtends>\n>;\n\n/**\n * Create a validated, type-safe environment configuration for Next.js applications in Standard Mode.\n *\n * @deprecated Use the unified flat layout signature instead: `arkenv(schema, options)`\n * @param options The environment validation configuration options\n * @returns A validated, readonly environment variables object wrapped in a security proxy\n */\nexport function arkenv<\n\tconst TServer extends Record<string, StandardSchemaV1> = {},\n\tconst TClient extends Record<string, StandardSchemaV1> = {},\n\tconst TShared extends Record<string, StandardSchemaV1> = {},\n>(options: {\n\tserver?: TServer;\n\tclient?: TClient & {\n\t\t[K in keyof TClient]: K extends `NEXT_PUBLIC_${string}` ? unknown : never;\n\t};\n\tshared?: TShared;\n\truntimeEnv: Record<keyof TClient | keyof TShared, unknown> &\n\t\tRecord<string, unknown>;\n}): Readonly<{\n\t[K in keyof (TServer & TClient & TShared)]: StandardSchemaV1.InferOutput<\n\t\t(TServer & TClient & TShared)[K]\n\t>;\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\"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 default arkenv;\n"],"mappings":"gHAuEA,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-DBm5EQBG.cjs`);const e=require(`../arkenv-internal-BquzddQ6.cjs`);require(`server-only`);let t=require(`@arkenv/standard`);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},t.arkenv,t.getSchemaKeys)}exports.arkenv=n,exports.default=n;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../config-DNJIS9zz.cjs`);const e=require(`../arkenv-internal-Dz0mDRKT.cjs`);require(`server-only`);let t=require(`@arkenv/standard`);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},t.arkenv,t.getSchemaKeys)}exports.arkenv=n,exports.default=n;
2
2
  //# sourceMappingURL=server.cjs.map
@@ -1,4 +1,4 @@
1
- import { i as Dict, r as StandardSchemaV1 } from "../index-DeuykBvh.js";
1
+ import { i as Dict, r as StandardSchemaV1 } from "../index-Dypl5Zzg.js";
2
2
  //#region src/standard/server.d.ts
3
3
  /**
4
4
  * Create a validated, type-safe environment configuration for Next.js applications (Server entry point, Standard Mode).
@@ -1,2 +1,2 @@
1
- import{t as e}from"../arkenv-internal-C3vJH4bg.js";import"server-only";import{arkenv as t,getSchemaKeys as n}from"@arkenv/standard";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},t,n)}export{r as arkenv,r as default};
1
+ import{t as e}from"../arkenv-internal-Do5bRP26.js";import"server-only";import{arkenv as t,getSchemaKeys as n}from"@arkenv/standard";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},t,n)}export{r as arkenv,r as default};
2
2
  //# sourceMappingURL=server.js.map
@@ -1,2 +1,2 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../config-DBm5EQBG.cjs`);const e=require(`../arkenv-internal-BquzddQ6.cjs`);let t=require(`@arkenv/standard`);function n(n,r){return e.t(n,r,{isServer:typeof window>`u`,isShared:!0},t.arkenv,t.getSchemaKeys)}exports.arkenv=n,exports.default=n;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../config-DNJIS9zz.cjs`);const e=require(`../arkenv-internal-Dz0mDRKT.cjs`);let t=require(`@arkenv/standard`);function n(n,r){return e.t(n,r,{isServer:typeof window>`u`,isShared:!0},t.arkenv,t.getSchemaKeys)}exports.arkenv=n,exports.default=n;
2
2
  //# sourceMappingURL=shared.cjs.map
@@ -1,4 +1,4 @@
1
- import { i as Dict, r as StandardSchemaV1 } from "../index-DeuykBvh.js";
1
+ import { i as Dict, r as StandardSchemaV1 } from "../index-Dypl5Zzg.js";
2
2
 
3
3
  //#region src/standard/shared.d.ts
4
4
  /**
@@ -1,2 +1,2 @@
1
- import{t as e}from"../arkenv-internal-C3vJH4bg.js";import{arkenv as t,getSchemaKeys as n}from"@arkenv/standard";function r(r,i){return e(r,i,{isServer:typeof window>`u`,isShared:!0},t,n)}export{r as arkenv,r as default};
1
+ import{t as e}from"../arkenv-internal-Do5bRP26.js";import{arkenv as t,getSchemaKeys as n}from"@arkenv/standard";function r(r,i){return e(r,i,{isServer:typeof window>`u`,isShared:!0},t,n)}export{r as arkenv,r as default};
2
2
  //# sourceMappingURL=shared.js.map
@@ -1,4 +1,4 @@
1
- import { n as InferType } from "./index-DeuykBvh.js";
1
+ import { n as InferType } from "./index-Dypl5Zzg.js";
2
2
 
3
3
  //#region src/types.d.ts
4
4
  /**
@@ -9,4 +9,4 @@ type ResolveExtendsElement<T> = [InferType<T>] extends [never] ? T : InferType<T
9
9
  type MergeExtends<TExtends extends readonly unknown[] | undefined> = TExtends extends readonly unknown[] ? UnionToIntersection<ResolveExtendsElement<TExtends[number]>> : {};
10
10
  //#endregion
11
11
  export { MergeExtends as t };
12
- //# sourceMappingURL=types-BMCEEpJO.d.ts.map
12
+ //# sourceMappingURL=types-gP-eTDyz.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types-BMCEEpJO.d.ts","names":[],"sources":["../src/types.ts"],"mappings":";;;;;AAMA;KAAY,mBAAA,OACX,CAAA,gBACI,CAAA,EAAG,CAAA,6BAEG,CAAA,sBACR,CAAA;AAAA,KAGS,qBAAA,OAA4B,SAAA,CAAU,CAAA,qBAC/C,CAAA,GACA,SAAA,CAAU,CAAA;AAAA,KAED,YAAA,oDACX,QAAA,8BACG,mBAAA,CAAoB,qBAAA,CAAsB,QAAA"}
1
+ {"version":3,"file":"types-gP-eTDyz.d.ts","names":[],"sources":["../src/types.ts"],"mappings":";;;;;AAMA;KAAY,mBAAA,OACX,CAAA,gBACI,CAAA,EAAG,CAAA,6BAEG,CAAA,sBACR,CAAA;AAAA,KAGS,qBAAA,OAA4B,SAAA,CAAU,CAAA,qBAC/C,CAAA,GACA,SAAA,CAAU,CAAA;AAAA,KAED,YAAA,oDACX,QAAA,8BACG,mBAAA,CAAoB,qBAAA,CAAsB,QAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arkenv/nextjs",
3
- "version": "1.0.0-alpha.4",
3
+ "version": "1.0.0-alpha.5",
4
4
  "author": "Yam Borodetsky <yam@yam.codes>",
5
5
  "repository": {
6
6
  "type": "git",
@@ -10,27 +10,32 @@
10
10
  "module": "./dist/index.js",
11
11
  "dependencies": {
12
12
  "chokidar": "^4.0.3",
13
- "server-only": "^0.0.1"
13
+ "jiti": "2.7.0",
14
+ "server-only": "^0.0.1",
15
+ "@arkenv/build": "0.0.1"
14
16
  },
15
17
  "devDependencies": {
16
18
  "@size-limit/preset-small-lib": "12.1.0",
19
+ "@types/react": "19.2.14",
17
20
  "arktype": "2.2.0",
18
21
  "next": "16.2.6",
22
+ "react": "19.2.5",
19
23
  "rimraf": "6.1.3",
20
24
  "size-limit": "12.1.0",
21
25
  "tsdown": "0.21.10",
22
26
  "typescript": "6.0.3",
23
27
  "vitest": "4.1.5",
24
28
  "@arkenv/core": "1.0.0-alpha.2",
25
- "@arkenv/standard": "1.0.0-alpha.3",
26
29
  "@repo/scope": "0.1.3",
30
+ "@arkenv/standard": "1.0.0-alpha.3",
27
31
  "@repo/types": "0.1.0"
28
32
  },
29
33
  "peerDependencies": {
30
34
  "@arkenv/core": "^1.0.0",
31
35
  "@arkenv/standard": "^1.0.0",
32
36
  "arktype": "^2.1.22",
33
- "next": "^13.4.0 || ^14.0.0 || ^15.0.0 || ^16.0.0-0"
37
+ "next": "^13.4.0 || ^14.0.0 || ^15.0.0 || ^16.0.0-0",
38
+ "react": "19.2.5"
34
39
  },
35
40
  "peerDependenciesMeta": {
36
41
  "@arkenv/core": {
@@ -61,7 +66,7 @@
61
66
  },
62
67
  ".": {
63
68
  "react-server": {
64
- "types": "./dist/index.d.ts",
69
+ "types": "./dist/react-server.d.ts",
65
70
  "import": "./dist/react-server.js",
66
71
  "require": "./dist/react-server.cjs"
67
72
  },
@@ -168,15 +173,17 @@
168
173
  {
169
174
  "name": "@arkenv/nextjs/config",
170
175
  "path": "dist/config.js",
171
- "limit": "3 kB",
176
+ "limit": "4 kB",
172
177
  "import": "*",
173
178
  "ignore": [
174
179
  "next",
175
180
  "arktype",
176
181
  "arkenv",
177
182
  "chokidar",
183
+ "jiti",
178
184
  "node:fs",
179
- "node:path"
185
+ "node:path",
186
+ "node:url"
180
187
  ]
181
188
  }
182
189
  ],