@arkenv/nextjs 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/react-server.cjs.map +1 -1
- package/dist/react-server.d.cts +1 -1
- package/dist/react-server.d.cts.map +1 -1
- package/dist/react-server.d.ts +1 -1
- package/dist/react-server.d.ts.map +1 -1
- package/dist/react-server.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["createEnvInternal","arkenv"],"sources":["../src/index.ts"],"sourcesContent":["import type { $ } from \"@repo/scope\";\nimport type { SchemaShape } from \"@repo/types\";\nimport type { type as at, distill } from \"arktype\";\nimport { createEnvInternal } from \"./create-env\";\n\n/**\n * Create a validated, type-safe environment configuration for Next.js applications (Client-side / SSR 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 createEnv<\n\tconst TServer extends SchemaShape = {},\n\tconst TClient extends SchemaShape = {},\n\tconst TShared extends SchemaShape = {},\n>(options: {\n\tserver?: TServer;\n\tclient?: {\n\t\t[K in keyof TClient]: K extends `NEXT_PUBLIC_${string}
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["createEnvInternal","arkenv"],"sources":["../src/index.ts"],"sourcesContent":["import type { $ } from \"@repo/scope\";\nimport type { SchemaShape } from \"@repo/types\";\nimport type { type as at, distill } from \"arktype\";\nimport { createEnvInternal } from \"./create-env\";\n\n/**\n * Create a validated, type-safe environment configuration for Next.js applications (Client-side / SSR 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 createEnv<\n\tconst TServer extends SchemaShape = {},\n\tconst TClient extends SchemaShape = {},\n\tconst TShared extends SchemaShape = {},\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<distill.Out<at.infer<TServer & TClient & TShared, $>>> {\n\ttype ReturnType = Readonly<\n\t\tdistill.Out<at.infer<TServer & TClient & TShared, $>>\n\t>;\n\treturn createEnvInternal(options, false) as ReturnType;\n}\n\nexport { type } from \"arkenv\";\n\n/**\n * ArkEnv's Next.js integration export, an alias for {@link createEnv}\n *\n * {@link https://arkenv.js.org | ArkEnv} is a typesafe environment variables validator from editor to runtime.\n */\nconst arkenv = createEnv;\nexport default arkenv;\n"],"mappings":"oKAaA,SAAgB,EAId,EAQkE,CAInE,OAAOA,EAAAA,EAAkB,EAAS,GAAM,CAUzC,MAAMC,EAAS"}
|
package/dist/index.d.cts
CHANGED
|
@@ -13,7 +13,7 @@ import { type } from "arkenv";
|
|
|
13
13
|
*/
|
|
14
14
|
declare function createEnv<const TServer extends SchemaShape = {}, const TClient extends SchemaShape = {}, const TShared extends SchemaShape = {}>(options: {
|
|
15
15
|
server?: TServer;
|
|
16
|
-
client?: { [K in keyof TClient]: K extends `NEXT_PUBLIC_${string}` ?
|
|
16
|
+
client?: TClient & { [K in keyof TClient]: K extends `NEXT_PUBLIC_${string}` ? unknown : never };
|
|
17
17
|
shared?: TShared;
|
|
18
18
|
runtimeEnv: Record<keyof TClient | keyof TShared, unknown> & Record<string, unknown>;
|
|
19
19
|
}): Readonly<distill.Out<type$1.infer<TServer & TClient & TShared, $>>>;
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;AAaA;;;;;;iBAAgB,SAAA,uBACO,WAAA,6BACA,WAAA,6BACA,WAAA,MAAA,CACrB,OAAA;EACD,MAAA,GAAS,OAAA;EACT,MAAA,
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;AAaA;;;;;;iBAAgB,SAAA,uBACO,WAAA,6BACA,WAAA,6BACA,WAAA,MAAA,CACrB,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,CAAS,OAAA,CAAQ,GAAA,CAAI,MAAA,CAAG,KAAA,CAAM,OAAA,GAAU,OAAA,GAAU,OAAA,EAAS,CAAA;;;;;;cAczD,MAAA,SAAM,SAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ import { distill, type as type$1 } from "arktype";
|
|
|
13
13
|
*/
|
|
14
14
|
declare function createEnv<const TServer extends SchemaShape = {}, const TClient extends SchemaShape = {}, const TShared extends SchemaShape = {}>(options: {
|
|
15
15
|
server?: TServer;
|
|
16
|
-
client?: { [K in keyof TClient]: K extends `NEXT_PUBLIC_${string}` ?
|
|
16
|
+
client?: TClient & { [K in keyof TClient]: K extends `NEXT_PUBLIC_${string}` ? unknown : never };
|
|
17
17
|
shared?: TShared;
|
|
18
18
|
runtimeEnv: Record<keyof TClient | keyof TShared, unknown> & Record<string, unknown>;
|
|
19
19
|
}): Readonly<distill.Out<type$1.infer<TServer & TClient & TShared, $>>>;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;AAaA;;;;;;iBAAgB,SAAA,uBACO,WAAA,6BACA,WAAA,6BACA,WAAA,MAAA,CACrB,OAAA;EACD,MAAA,GAAS,OAAA;EACT,MAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;AAaA;;;;;;iBAAgB,SAAA,uBACO,WAAA,6BACA,WAAA,6BACA,WAAA,MAAA,CACrB,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,CAAS,OAAA,CAAQ,GAAA,CAAI,MAAA,CAAG,KAAA,CAAM,OAAA,GAAU,OAAA,GAAU,OAAA,EAAS,CAAA;;;;;;cAczD,MAAA,SAAM,SAAA"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["import type { $ } from \"@repo/scope\";\nimport type { SchemaShape } from \"@repo/types\";\nimport type { type as at, distill } from \"arktype\";\nimport { createEnvInternal } from \"./create-env\";\n\n/**\n * Create a validated, type-safe environment configuration for Next.js applications (Client-side / SSR 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 createEnv<\n\tconst TServer extends SchemaShape = {},\n\tconst TClient extends SchemaShape = {},\n\tconst TShared extends SchemaShape = {},\n>(options: {\n\tserver?: TServer;\n\tclient?: {\n\t\t[K in keyof TClient]: K extends `NEXT_PUBLIC_${string}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["import type { $ } from \"@repo/scope\";\nimport type { SchemaShape } from \"@repo/types\";\nimport type { type as at, distill } from \"arktype\";\nimport { createEnvInternal } from \"./create-env\";\n\n/**\n * Create a validated, type-safe environment configuration for Next.js applications (Client-side / SSR 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 createEnv<\n\tconst TServer extends SchemaShape = {},\n\tconst TClient extends SchemaShape = {},\n\tconst TShared extends SchemaShape = {},\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<distill.Out<at.infer<TServer & TClient & TShared, $>>> {\n\ttype ReturnType = Readonly<\n\t\tdistill.Out<at.infer<TServer & TClient & TShared, $>>\n\t>;\n\treturn createEnvInternal(options, false) as ReturnType;\n}\n\nexport { type } from \"arkenv\";\n\n/**\n * ArkEnv's Next.js integration export, an alias for {@link createEnv}\n *\n * {@link https://arkenv.js.org | ArkEnv} is a typesafe environment variables validator from editor to runtime.\n */\nconst arkenv = createEnv;\nexport default arkenv;\n"],"mappings":"2EAaA,SAAgB,EAId,EAQkE,CAInE,OAAO,EAAkB,EAAS,GAAM,CAUzC,MAAM,EAAS"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-server.cjs","names":["createEnvInternal","arkenv"],"sources":["../src/react-server.ts"],"sourcesContent":["import type { $ } from \"@repo/scope\";\nimport type { SchemaShape } from \"@repo/types\";\nimport type { type as at, distill } from \"arktype\";\nimport { createEnvInternal } from \"./create-env\";\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 createEnv<\n\tconst TServer extends SchemaShape = {},\n\tconst TClient extends SchemaShape = {},\n\tconst TShared extends SchemaShape = {},\n>(options: {\n\tserver?: TServer;\n\tclient?: {\n\t\t[K in keyof TClient]: K extends `NEXT_PUBLIC_${string}
|
|
1
|
+
{"version":3,"file":"react-server.cjs","names":["createEnvInternal","arkenv"],"sources":["../src/react-server.ts"],"sourcesContent":["import type { $ } from \"@repo/scope\";\nimport type { SchemaShape } from \"@repo/types\";\nimport type { type as at, distill } from \"arktype\";\nimport { createEnvInternal } from \"./create-env\";\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 createEnv<\n\tconst TServer extends SchemaShape = {},\n\tconst TClient extends SchemaShape = {},\n\tconst TShared extends SchemaShape = {},\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<distill.Out<at.infer<TServer & TClient & TShared, $>>> {\n\ttype ReturnType = Readonly<\n\t\tdistill.Out<at.infer<TServer & TClient & TShared, $>>\n\t>;\n\treturn createEnvInternal(options, true) as ReturnType;\n}\n\nexport { type } from \"arkenv\";\n\n/**\n * ArkEnv's Next.js integration export, an alias for {@link createEnv}\n *\n * {@link https://arkenv.js.org | ArkEnv} is a typesafe environment variables validator from editor to runtime.\n */\nconst arkenv = createEnv;\nexport default arkenv;\n"],"mappings":"oKAaA,SAAgB,EAId,EAQkE,CAInE,OAAOA,EAAAA,EAAkB,EAAS,GAAK,CAUxC,MAAMC,EAAS"}
|
package/dist/react-server.d.cts
CHANGED
|
@@ -13,7 +13,7 @@ import { type } from "arkenv";
|
|
|
13
13
|
*/
|
|
14
14
|
declare function createEnv<const TServer extends SchemaShape = {}, const TClient extends SchemaShape = {}, const TShared extends SchemaShape = {}>(options: {
|
|
15
15
|
server?: TServer;
|
|
16
|
-
client?: { [K in keyof TClient]: K extends `NEXT_PUBLIC_${string}` ?
|
|
16
|
+
client?: TClient & { [K in keyof TClient]: K extends `NEXT_PUBLIC_${string}` ? unknown : never };
|
|
17
17
|
shared?: TShared;
|
|
18
18
|
runtimeEnv: Record<keyof TClient | keyof TShared, unknown> & Record<string, unknown>;
|
|
19
19
|
}): Readonly<distill.Out<type$1.infer<TServer & TClient & TShared, $>>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-server.d.cts","names":[],"sources":["../src/react-server.ts"],"mappings":";;;;;;;AAaA;;;;;;iBAAgB,SAAA,uBACO,WAAA,6BACA,WAAA,6BACA,WAAA,MAAA,CACrB,OAAA;EACD,MAAA,GAAS,OAAA;EACT,MAAA,
|
|
1
|
+
{"version":3,"file":"react-server.d.cts","names":[],"sources":["../src/react-server.ts"],"mappings":";;;;;;;AAaA;;;;;;iBAAgB,SAAA,uBACO,WAAA,6BACA,WAAA,6BACA,WAAA,MAAA,CACrB,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,CAAS,OAAA,CAAQ,GAAA,CAAI,MAAA,CAAG,KAAA,CAAM,OAAA,GAAU,OAAA,GAAU,OAAA,EAAS,CAAA;;;;;;cAczD,MAAA,SAAM,SAAA"}
|
package/dist/react-server.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ import { distill, type as type$1 } from "arktype";
|
|
|
13
13
|
*/
|
|
14
14
|
declare function createEnv<const TServer extends SchemaShape = {}, const TClient extends SchemaShape = {}, const TShared extends SchemaShape = {}>(options: {
|
|
15
15
|
server?: TServer;
|
|
16
|
-
client?: { [K in keyof TClient]: K extends `NEXT_PUBLIC_${string}` ?
|
|
16
|
+
client?: TClient & { [K in keyof TClient]: K extends `NEXT_PUBLIC_${string}` ? unknown : never };
|
|
17
17
|
shared?: TShared;
|
|
18
18
|
runtimeEnv: Record<keyof TClient | keyof TShared, unknown> & Record<string, unknown>;
|
|
19
19
|
}): Readonly<distill.Out<type$1.infer<TServer & TClient & TShared, $>>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-server.d.ts","names":[],"sources":["../src/react-server.ts"],"mappings":";;;;;;;AAaA;;;;;;iBAAgB,SAAA,uBACO,WAAA,6BACA,WAAA,6BACA,WAAA,MAAA,CACrB,OAAA;EACD,MAAA,GAAS,OAAA;EACT,MAAA,
|
|
1
|
+
{"version":3,"file":"react-server.d.ts","names":[],"sources":["../src/react-server.ts"],"mappings":";;;;;;;AAaA;;;;;;iBAAgB,SAAA,uBACO,WAAA,6BACA,WAAA,6BACA,WAAA,MAAA,CACrB,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,CAAS,OAAA,CAAQ,GAAA,CAAI,MAAA,CAAG,KAAA,CAAM,OAAA,GAAU,OAAA,GAAU,OAAA,EAAS,CAAA;;;;;;cAczD,MAAA,SAAM,SAAA"}
|
package/dist/react-server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-server.js","names":[],"sources":["../src/react-server.ts"],"sourcesContent":["import type { $ } from \"@repo/scope\";\nimport type { SchemaShape } from \"@repo/types\";\nimport type { type as at, distill } from \"arktype\";\nimport { createEnvInternal } from \"./create-env\";\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 createEnv<\n\tconst TServer extends SchemaShape = {},\n\tconst TClient extends SchemaShape = {},\n\tconst TShared extends SchemaShape = {},\n>(options: {\n\tserver?: TServer;\n\tclient?: {\n\t\t[K in keyof TClient]: K extends `NEXT_PUBLIC_${string}
|
|
1
|
+
{"version":3,"file":"react-server.js","names":[],"sources":["../src/react-server.ts"],"sourcesContent":["import type { $ } from \"@repo/scope\";\nimport type { SchemaShape } from \"@repo/types\";\nimport type { type as at, distill } from \"arktype\";\nimport { createEnvInternal } from \"./create-env\";\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 createEnv<\n\tconst TServer extends SchemaShape = {},\n\tconst TClient extends SchemaShape = {},\n\tconst TShared extends SchemaShape = {},\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<distill.Out<at.infer<TServer & TClient & TShared, $>>> {\n\ttype ReturnType = Readonly<\n\t\tdistill.Out<at.infer<TServer & TClient & TShared, $>>\n\t>;\n\treturn createEnvInternal(options, true) as ReturnType;\n}\n\nexport { type } from \"arkenv\";\n\n/**\n * ArkEnv's Next.js integration export, an alias for {@link createEnv}\n *\n * {@link https://arkenv.js.org | ArkEnv} is a typesafe environment variables validator from editor to runtime.\n */\nconst arkenv = createEnv;\nexport default arkenv;\n"],"mappings":"2EAaA,SAAgB,EAId,EAQkE,CAInE,OAAO,EAAkB,EAAS,GAAK,CAUxC,MAAM,EAAS"}
|