@arkenv/nextjs 1.0.0-alpha.3 → 1.0.0-alpha.4
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/arkenv-internal-BquzddQ6.cjs +2 -0
- package/dist/arkenv-internal-BquzddQ6.cjs.map +1 -0
- package/dist/arkenv-internal-C3vJH4bg.js +2 -0
- package/dist/arkenv-internal-C3vJH4bg.js.map +1 -0
- package/dist/client.cjs +1 -1
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +3 -3
- package/dist/client.d.cts.map +1 -1
- package/dist/client.d.ts +3 -3
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +1 -1
- package/dist/client.js.map +1 -1
- package/dist/config-DBm5EQBG.cjs +82 -0
- package/dist/config-DBm5EQBG.cjs.map +1 -0
- package/dist/config.cjs +1 -76
- package/dist/config.d.cts +13 -1
- package/dist/config.d.cts.map +1 -1
- package/dist/config.d.ts +13 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +21 -15
- package/dist/config.js.map +1 -1
- package/dist/{index-DvODqC0J.d.ts → index-96RGPyfa.d.cts} +2 -2
- package/dist/{index-CRUkF6-E.d.cts.map → index-96RGPyfa.d.cts.map} +1 -1
- package/dist/{index-CRUkF6-E.d.cts → index-DeuykBvh.d.ts} +2 -2
- package/dist/{index-DvODqC0J.d.ts.map → index-DeuykBvh.d.ts.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/react-server.cjs +1 -1
- package/dist/react-server.cjs.map +1 -1
- package/dist/react-server.d.cts +2 -2
- package/dist/react-server.d.cts.map +1 -1
- package/dist/react-server.d.ts +2 -2
- package/dist/react-server.d.ts.map +1 -1
- package/dist/react-server.js +1 -1
- package/dist/react-server.js.map +1 -1
- package/dist/server.cjs +1 -1
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.cts +3 -3
- package/dist/server.d.cts.map +1 -1
- package/dist/server.d.ts +3 -3
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +1 -1
- package/dist/server.js.map +1 -1
- package/dist/shared.cjs +1 -1
- package/dist/shared.cjs.map +1 -1
- package/dist/shared.d.cts +3 -3
- package/dist/shared.d.cts.map +1 -1
- package/dist/shared.d.ts +3 -3
- package/dist/shared.d.ts.map +1 -1
- package/dist/shared.js +1 -1
- package/dist/shared.js.map +1 -1
- package/dist/standard/client.cjs +2 -0
- package/dist/standard/client.cjs.map +1 -0
- package/dist/standard/client.d.cts +30 -0
- package/dist/standard/client.d.cts.map +1 -0
- package/dist/standard/client.d.ts +30 -0
- package/dist/standard/client.d.ts.map +1 -0
- package/dist/standard/client.js +2 -0
- package/dist/standard/client.js.map +1 -0
- package/dist/standard/config.cjs +2 -0
- package/dist/standard/config.cjs.map +1 -0
- package/dist/standard/config.d.cts +14 -0
- package/dist/standard/config.d.cts.map +1 -0
- package/dist/standard/config.d.ts +14 -0
- package/dist/standard/config.d.ts.map +1 -0
- package/dist/standard/config.js +2 -0
- package/dist/standard/config.js.map +1 -0
- package/dist/standard/index.cjs +2 -0
- package/dist/standard/index.cjs.map +1 -0
- package/dist/standard/index.d.cts +18 -0
- package/dist/standard/index.d.cts.map +1 -0
- package/dist/standard/index.d.ts +18 -0
- package/dist/standard/index.d.ts.map +1 -0
- package/dist/standard/index.js +2 -0
- package/dist/standard/index.js.map +1 -0
- package/dist/standard/server.cjs +2 -0
- package/dist/standard/server.cjs.map +1 -0
- package/dist/standard/server.d.cts +18 -0
- package/dist/standard/server.d.cts.map +1 -0
- package/dist/standard/server.d.ts +18 -0
- package/dist/standard/server.d.ts.map +1 -0
- package/dist/standard/server.js +2 -0
- package/dist/standard/server.js.map +1 -0
- package/dist/standard/shared.cjs +2 -0
- package/dist/standard/shared.cjs.map +1 -0
- package/dist/standard/shared.d.cts +13 -0
- package/dist/standard/shared.d.cts.map +1 -0
- package/dist/standard/shared.d.ts +13 -0
- package/dist/standard/shared.d.ts.map +1 -0
- package/dist/standard/shared.js +2 -0
- package/dist/standard/shared.js.map +1 -0
- package/dist/{types-BTG7L0mq.d.cts → types-44R9mgTa.d.cts} +2 -2
- package/dist/{types-BTG7L0mq.d.cts.map → types-44R9mgTa.d.cts.map} +1 -1
- package/dist/{types-8YUW70UX.d.ts → types-BMCEEpJO.d.ts} +2 -2
- package/dist/{types-8YUW70UX.d.ts.map → types-BMCEEpJO.d.ts.map} +1 -1
- package/package.json +42 -4
- package/dist/arkenv-internal-BI25fuIK.cjs +0 -2
- package/dist/arkenv-internal-BI25fuIK.cjs.map +0 -1
- package/dist/arkenv-internal-DOhvmOZ_.js +0 -2
- package/dist/arkenv-internal-DOhvmOZ_.js.map +0 -1
- package/dist/config.cjs.map +0 -1
package/dist/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","names":[],"sources":["../src/server.ts"],"sourcesContent":["import \"server-only\";\nimport type {
|
|
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"}
|
package/dist/shared.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`./arkenv-internal-
|
|
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}});
|
|
2
2
|
//# sourceMappingURL=shared.cjs.map
|
package/dist/shared.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.cjs","names":["
|
|
1
|
+
{"version":3,"file":"shared.cjs","names":["arkenvInternal","coreArkenv","getSchemaKeys"],"sources":["../src/shared.ts"],"sourcesContent":["import 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 (Shared 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\tconst isServer = typeof window === \"undefined\";\n\treturn arkenvInternal(\n\t\tschema,\n\t\toptions,\n\t\t{\n\t\t\tisServer,\n\t\t\tisShared: true,\n\t\t},\n\t\tcoreArkenv,\n\t\tgetSchemaKeys,\n\t) as any;\n}\n\nexport { type } from \"@arkenv/core\";\n\nexport default arkenv;\n"],"mappings":"gNAWA,SAAgB,EAIf,EACA,EAIuE,CAEvE,OAAOA,EAAAA,EACN,EACA,EACA,CACC,SALe,OAAO,OAAW,IAMjC,SAAU,GACV,CACDC,EAAAA,OACAC,EAAAA,cACA"}
|
package/dist/shared.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as MergeExtends } from "./types-
|
|
1
|
+
import { a as $, i as Dict, t as SchemaShape } from "./index-96RGPyfa.cjs";
|
|
2
|
+
import { t as MergeExtends } from "./types-44R9mgTa.cjs";
|
|
3
|
+
import { EnvSchema, type } from "@arkenv/core";
|
|
3
4
|
import { distill, type as type$1 } from "arktype";
|
|
4
|
-
import { EnvSchema, type } from "arkenv";
|
|
5
5
|
|
|
6
6
|
//#region src/shared.d.ts
|
|
7
7
|
/**
|
package/dist/shared.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.cts","names":[],"sources":["../src/shared.ts"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"shared.d.cts","names":[],"sources":["../src/shared.ts"],"mappings":";;;;;;;AAWA;;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"}
|
package/dist/shared.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as MergeExtends } from "./types-
|
|
3
|
-
import { EnvSchema, type } from "arkenv";
|
|
1
|
+
import { a as $, i as Dict, t as SchemaShape } from "./index-DeuykBvh.js";
|
|
2
|
+
import { t as MergeExtends } from "./types-BMCEEpJO.js";
|
|
3
|
+
import { EnvSchema, type } from "@arkenv/core";
|
|
4
4
|
import { distill, type as type$1 } from "arktype";
|
|
5
5
|
|
|
6
6
|
//#region src/shared.d.ts
|
package/dist/shared.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","names":[],"sources":["../src/shared.ts"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"shared.d.ts","names":[],"sources":["../src/shared.ts"],"mappings":";;;;;;;AAWA;;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"}
|
package/dist/shared.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t as e}from"./arkenv-internal-
|
|
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};
|
|
2
2
|
//# sourceMappingURL=shared.js.map
|
package/dist/shared.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.js","names":[],"sources":["../src/shared.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"shared.js","names":["coreArkenv"],"sources":["../src/shared.ts"],"sourcesContent":["import 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 (Shared 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\tconst isServer = typeof window === \"undefined\";\n\treturn arkenvInternal(\n\t\tschema,\n\t\toptions,\n\t\t{\n\t\t\tisServer,\n\t\t\tisShared: true,\n\t\t},\n\t\tcoreArkenv,\n\t\tgetSchemaKeys,\n\t) as any;\n}\n\nexport { type } from \"@arkenv/core\";\n\nexport default arkenv;\n"],"mappings":"qHAWA,SAAgB,EAIf,EACA,EAIuE,CAEvE,OAAO,EACN,EACA,EACA,CACC,SALe,OAAO,OAAW,IAMjC,SAAU,GACV,CACDA,EACA,EACA"}
|
|
@@ -0,0 +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;
|
|
2
|
+
//# sourceMappingURL=client.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.cjs","names":["arkenvInternal","coreArkenv","getSchemaKeys"],"sources":["../../src/standard/client.ts"],"sourcesContent":["import { arkenv as coreArkenv, getSchemaKeys } from \"@arkenv/standard\";\nimport type { Dict, StandardSchemaV1 } from \"@repo/types\";\nimport { arkenvInternal } from \"@/arkenv-internal\";\n\n/**\n * Create a validated, type-safe environment configuration for Next.js applications (Client entry point, Standard Mode).\n *\n * @param schema A flat schema of `NEXT_PUBLIC_*` Standard Schema validators\n * @param options Optional extends and runtimeEnv overrides\n * @returns A validated, readonly environment variables object\n */\nexport function arkenv<\n\tconst TSchema extends Record<string, StandardSchemaV1> = {},\n>(\n\tschema: TSchema & {\n\t\t[K in keyof TSchema]: K extends `NEXT_PUBLIC_${string}` ? unknown : never;\n\t},\n\toptions?: {\n\t\textends?: readonly unknown[];\n\t\truntimeEnv: Record<keyof TSchema, string | undefined> & Dict<string>;\n\t},\n): Readonly<{ [K in keyof TSchema]: StandardSchemaV1.InferOutput<TSchema[K]> }>;\n\n/**\n * Create a validated, type-safe environment configuration for Next.js applications using\n * the split client/shared schema pattern (Client entry point, Standard Mode).\n *\n * @param options The environment validation configuration with client and shared schemas\n * @returns A validated, readonly environment variables object\n */\nexport function arkenv<\n\tconst TClient extends Record<string, StandardSchemaV1> = {},\n\tconst TShared extends Record<string, StandardSchemaV1> = {},\n>(options: {\n\tclient?: TClient & {\n\t\t[K in keyof TClient]: K extends `NEXT_PUBLIC_${string}` ? unknown : never;\n\t};\n\tshared?: TShared;\n\textends?: readonly unknown[];\n\truntimeEnv: Record<keyof TClient | keyof TShared, unknown> &\n\t\tRecord<string, unknown>;\n}): Readonly<{\n\t[K in keyof (TClient & TShared)]: StandardSchemaV1.InferOutput<\n\t\t(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\"client\" in schemaOrOptions ||\n\t\t\t\"shared\" in schemaOrOptions);\n\n\tif (isLegacy) {\n\t\tif (\"server\" in schemaOrOptions) {\n\t\t\tthrow new Error(\n\t\t\t\t\"client entry point only accepts 'client' and 'shared' schemas.\",\n\t\t\t);\n\t\t}\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":"sNA+CA,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,GAAO,CACnBC,EAAAA,OACAC,EAAAA,cACA"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { i as Dict, r as StandardSchemaV1 } from "../index-96RGPyfa.cjs";
|
|
2
|
+
|
|
3
|
+
//#region src/standard/client.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Create a validated, type-safe environment configuration for Next.js applications (Client entry point, Standard Mode).
|
|
6
|
+
*
|
|
7
|
+
* @param schema A flat schema of `NEXT_PUBLIC_*` Standard Schema validators
|
|
8
|
+
* @param options Optional extends and runtimeEnv overrides
|
|
9
|
+
* @returns A validated, readonly environment variables object
|
|
10
|
+
*/
|
|
11
|
+
declare function arkenv<const TSchema extends Record<string, StandardSchemaV1> = {}>(schema: TSchema & { [K in keyof TSchema]: K extends `NEXT_PUBLIC_${string}` ? unknown : never }, options?: {
|
|
12
|
+
extends?: readonly unknown[];
|
|
13
|
+
runtimeEnv: Record<keyof TSchema, string | undefined> & Dict<string>;
|
|
14
|
+
}): Readonly<{ [K in keyof TSchema]: StandardSchemaV1.InferOutput<TSchema[K]> }>;
|
|
15
|
+
/**
|
|
16
|
+
* Create a validated, type-safe environment configuration for Next.js applications using
|
|
17
|
+
* the split client/shared schema pattern (Client entry point, Standard Mode).
|
|
18
|
+
*
|
|
19
|
+
* @param options The environment validation configuration with client and shared schemas
|
|
20
|
+
* @returns A validated, readonly environment variables object
|
|
21
|
+
*/
|
|
22
|
+
declare function arkenv<const TClient extends Record<string, StandardSchemaV1> = {}, const TShared extends Record<string, StandardSchemaV1> = {}>(options: {
|
|
23
|
+
client?: TClient & { [K in keyof TClient]: K extends `NEXT_PUBLIC_${string}` ? unknown : never };
|
|
24
|
+
shared?: TShared;
|
|
25
|
+
extends?: readonly unknown[];
|
|
26
|
+
runtimeEnv: Record<keyof TClient | keyof TShared, unknown> & Record<string, unknown>;
|
|
27
|
+
}): Readonly<{ [K in keyof (TClient & TShared)]: StandardSchemaV1.InferOutput<(TClient & TShared)[K]> }>;
|
|
28
|
+
//#endregion
|
|
29
|
+
export { arkenv, arkenv as default };
|
|
30
|
+
//# sourceMappingURL=client.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.cts","names":[],"sources":["../../src/standard/client.ts"],"mappings":";;;;;AAWA;;;;;iBAAgB,MAAA,uBACO,MAAA,SAAe,gBAAA,OAAA,CAErC,MAAA,EAAQ,OAAA,iBACK,OAAA,GAAU,CAAA,sDAEvB,OAAA;EACC,OAAA;EACA,UAAA,EAAY,MAAA,OAAa,OAAA,wBAA+B,IAAA;AAAA,IAEvD,QAAA,eAAuB,OAAA,GAAU,gBAAA,CAAiB,WAAA,CAAY,OAAA,CAAQ,CAAA;;;;;;;;iBASzD,MAAA,uBACO,MAAA,SAAe,gBAAA,8BACf,MAAA,SAAe,gBAAA,OAAA,CACpC,OAAA;EACD,MAAA,GAAS,OAAA,iBACI,OAAA,GAAU,CAAA;EAEvB,MAAA,GAAS,OAAA;EACT,OAAA;EACA,UAAA,EAAY,MAAA,OAAa,OAAA,SAAgB,OAAA,aACxC,MAAA;AAAA,IACE,QAAA,gBACU,OAAA,GAAU,OAAA,IAAW,gBAAA,CAAiB,WAAA,EACjD,OAAA,GAAU,OAAA,EAAS,CAAA"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { i as Dict, r as StandardSchemaV1 } from "../index-DeuykBvh.js";
|
|
2
|
+
|
|
3
|
+
//#region src/standard/client.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Create a validated, type-safe environment configuration for Next.js applications (Client entry point, Standard Mode).
|
|
6
|
+
*
|
|
7
|
+
* @param schema A flat schema of `NEXT_PUBLIC_*` Standard Schema validators
|
|
8
|
+
* @param options Optional extends and runtimeEnv overrides
|
|
9
|
+
* @returns A validated, readonly environment variables object
|
|
10
|
+
*/
|
|
11
|
+
declare function arkenv<const TSchema extends Record<string, StandardSchemaV1> = {}>(schema: TSchema & { [K in keyof TSchema]: K extends `NEXT_PUBLIC_${string}` ? unknown : never }, options?: {
|
|
12
|
+
extends?: readonly unknown[];
|
|
13
|
+
runtimeEnv: Record<keyof TSchema, string | undefined> & Dict<string>;
|
|
14
|
+
}): Readonly<{ [K in keyof TSchema]: StandardSchemaV1.InferOutput<TSchema[K]> }>;
|
|
15
|
+
/**
|
|
16
|
+
* Create a validated, type-safe environment configuration for Next.js applications using
|
|
17
|
+
* the split client/shared schema pattern (Client entry point, Standard Mode).
|
|
18
|
+
*
|
|
19
|
+
* @param options The environment validation configuration with client and shared schemas
|
|
20
|
+
* @returns A validated, readonly environment variables object
|
|
21
|
+
*/
|
|
22
|
+
declare function arkenv<const TClient extends Record<string, StandardSchemaV1> = {}, const TShared extends Record<string, StandardSchemaV1> = {}>(options: {
|
|
23
|
+
client?: TClient & { [K in keyof TClient]: K extends `NEXT_PUBLIC_${string}` ? unknown : never };
|
|
24
|
+
shared?: TShared;
|
|
25
|
+
extends?: readonly unknown[];
|
|
26
|
+
runtimeEnv: Record<keyof TClient | keyof TShared, unknown> & Record<string, unknown>;
|
|
27
|
+
}): Readonly<{ [K in keyof (TClient & TShared)]: StandardSchemaV1.InferOutput<(TClient & TShared)[K]> }>;
|
|
28
|
+
//#endregion
|
|
29
|
+
export { arkenv, arkenv as default };
|
|
30
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","names":[],"sources":["../../src/standard/client.ts"],"mappings":";;;;;AAWA;;;;;iBAAgB,MAAA,uBACO,MAAA,SAAe,gBAAA,OAAA,CAErC,MAAA,EAAQ,OAAA,iBACK,OAAA,GAAU,CAAA,sDAEvB,OAAA;EACC,OAAA;EACA,UAAA,EAAY,MAAA,OAAa,OAAA,wBAA+B,IAAA;AAAA,IAEvD,QAAA,eAAuB,OAAA,GAAU,gBAAA,CAAiB,WAAA,CAAY,OAAA,CAAQ,CAAA;;;;;;;;iBASzD,MAAA,uBACO,MAAA,SAAe,gBAAA,8BACf,MAAA,SAAe,gBAAA,OAAA,CACpC,OAAA;EACD,MAAA,GAAS,OAAA,iBACI,OAAA,GAAU,CAAA;EAEvB,MAAA,GAAS,OAAA;EACT,OAAA;EACA,UAAA,EAAY,MAAA,OAAa,OAAA,SAAgB,OAAA,aACxC,MAAA;AAAA,IACE,QAAA,gBACU,OAAA,GAAU,OAAA,IAAW,gBAAA,CAAiB,WAAA,EACjD,OAAA,GAAU,OAAA,EAAS,CAAA"}
|
|
@@ -0,0 +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};
|
|
2
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","names":["coreArkenv"],"sources":["../../src/standard/client.ts"],"sourcesContent":["import { arkenv as coreArkenv, getSchemaKeys } from \"@arkenv/standard\";\nimport type { Dict, StandardSchemaV1 } from \"@repo/types\";\nimport { arkenvInternal } from \"@/arkenv-internal\";\n\n/**\n * Create a validated, type-safe environment configuration for Next.js applications (Client entry point, Standard Mode).\n *\n * @param schema A flat schema of `NEXT_PUBLIC_*` Standard Schema validators\n * @param options Optional extends and runtimeEnv overrides\n * @returns A validated, readonly environment variables object\n */\nexport function arkenv<\n\tconst TSchema extends Record<string, StandardSchemaV1> = {},\n>(\n\tschema: TSchema & {\n\t\t[K in keyof TSchema]: K extends `NEXT_PUBLIC_${string}` ? unknown : never;\n\t},\n\toptions?: {\n\t\textends?: readonly unknown[];\n\t\truntimeEnv: Record<keyof TSchema, string | undefined> & Dict<string>;\n\t},\n): Readonly<{ [K in keyof TSchema]: StandardSchemaV1.InferOutput<TSchema[K]> }>;\n\n/**\n * Create a validated, type-safe environment configuration for Next.js applications using\n * the split client/shared schema pattern (Client entry point, Standard Mode).\n *\n * @param options The environment validation configuration with client and shared schemas\n * @returns A validated, readonly environment variables object\n */\nexport function arkenv<\n\tconst TClient extends Record<string, StandardSchemaV1> = {},\n\tconst TShared extends Record<string, StandardSchemaV1> = {},\n>(options: {\n\tclient?: TClient & {\n\t\t[K in keyof TClient]: K extends `NEXT_PUBLIC_${string}` ? unknown : never;\n\t};\n\tshared?: TShared;\n\textends?: readonly unknown[];\n\truntimeEnv: Record<keyof TClient | keyof TShared, unknown> &\n\t\tRecord<string, unknown>;\n}): Readonly<{\n\t[K in keyof (TClient & TShared)]: StandardSchemaV1.InferOutput<\n\t\t(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\"client\" in schemaOrOptions ||\n\t\t\t\"shared\" in schemaOrOptions);\n\n\tif (isLegacy) {\n\t\tif (\"server\" in schemaOrOptions) {\n\t\t\tthrow new Error(\n\t\t\t\t\"client entry point only accepts 'client' and 'shared' schemas.\",\n\t\t\t);\n\t\t}\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":"gHA+CA,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,GAAO,CACnBA,EACA,EACA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.cjs","names":["originalWithArkEnv"],"sources":["../../src/standard/config.ts"],"sourcesContent":["import {\n\ttype ArkEnvConfigOptions,\n\twithArkEnv as originalWithArkEnv,\n} from \"@/config\";\n\n/**\n * Wrap a Next.js configuration object to automatically generate the `runtimeEnv` block in `env.gen.ts` (Standard Mode).\n *\n * @param nextConfig The Next.js configuration object or function\n * @param options Optional configuration paths for schema and output files\n * @returns The Next.js configuration object unchanged\n */\nexport function withArkEnv<T>(nextConfig: T, options?: ArkEnvConfigOptions): T {\n\treturn originalWithArkEnv(nextConfig, {\n\t\t...options,\n\t\tstandard: true,\n\t});\n}\n"],"mappings":"6GAYA,SAAgB,EAAc,EAAe,EAAkC,CAC9E,OAAOA,EAAAA,EAAmB,EAAY,CACrC,GAAG,EACH,SAAU,GACV,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ArkEnvConfigOptions } from "../config.cjs";
|
|
2
|
+
|
|
3
|
+
//#region src/standard/config.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Wrap a Next.js configuration object to automatically generate the `runtimeEnv` block in `env.gen.ts` (Standard Mode).
|
|
6
|
+
*
|
|
7
|
+
* @param nextConfig The Next.js configuration object or function
|
|
8
|
+
* @param options Optional configuration paths for schema and output files
|
|
9
|
+
* @returns The Next.js configuration object unchanged
|
|
10
|
+
*/
|
|
11
|
+
declare function withArkEnv<T>(nextConfig: T, options?: ArkEnvConfigOptions): T;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { withArkEnv };
|
|
14
|
+
//# sourceMappingURL=config.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.cts","names":[],"sources":["../../src/standard/config.ts"],"mappings":";;;;;AAYA;;;;;iBAAgB,UAAA,GAAA,CAAc,UAAA,EAAY,CAAA,EAAG,OAAA,GAAU,mBAAA,GAAsB,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ArkEnvConfigOptions } from "../config.js";
|
|
2
|
+
|
|
3
|
+
//#region src/standard/config.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Wrap a Next.js configuration object to automatically generate the `runtimeEnv` block in `env.gen.ts` (Standard Mode).
|
|
6
|
+
*
|
|
7
|
+
* @param nextConfig The Next.js configuration object or function
|
|
8
|
+
* @param options Optional configuration paths for schema and output files
|
|
9
|
+
* @returns The Next.js configuration object unchanged
|
|
10
|
+
*/
|
|
11
|
+
declare function withArkEnv<T>(nextConfig: T, options?: ArkEnvConfigOptions): T;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { withArkEnv };
|
|
14
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","names":[],"sources":["../../src/standard/config.ts"],"mappings":";;;;;AAYA;;;;;iBAAgB,UAAA,GAAA,CAAc,UAAA,EAAY,CAAA,EAAG,OAAA,GAAU,mBAAA,GAAsB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","names":["originalWithArkEnv"],"sources":["../../src/standard/config.ts"],"sourcesContent":["import {\n\ttype ArkEnvConfigOptions,\n\twithArkEnv as originalWithArkEnv,\n} from \"@/config\";\n\n/**\n * Wrap a Next.js configuration object to automatically generate the `runtimeEnv` block in `env.gen.ts` (Standard Mode).\n *\n * @param nextConfig The Next.js configuration object or function\n * @param options Optional configuration paths for schema and output files\n * @returns The Next.js configuration object unchanged\n */\nexport function withArkEnv<T>(nextConfig: T, options?: ArkEnvConfigOptions): T {\n\treturn originalWithArkEnv(nextConfig, {\n\t\t...options,\n\t\tstandard: true,\n\t});\n}\n"],"mappings":"0CAYA,SAAgB,EAAc,EAAe,EAAkC,CAC9E,OAAOA,EAAmB,EAAY,CACrC,GAAG,EACH,SAAU,GACV,CAAC"}
|
|
@@ -0,0 +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;
|
|
2
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { r as StandardSchemaV1 } from "../index-96RGPyfa.cjs";
|
|
2
|
+
|
|
3
|
+
//#region src/standard/index.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Create a validated, type-safe environment configuration for Next.js applications in Standard Mode.
|
|
6
|
+
*
|
|
7
|
+
* @param options The environment validation configuration options
|
|
8
|
+
* @returns A validated, readonly environment variables object wrapped in a security proxy
|
|
9
|
+
*/
|
|
10
|
+
declare function arkenv<const TServer extends Record<string, StandardSchemaV1> = {}, const TClient extends Record<string, StandardSchemaV1> = {}, const TShared extends Record<string, StandardSchemaV1> = {}>(options: {
|
|
11
|
+
server?: TServer;
|
|
12
|
+
client?: TClient & { [K in keyof TClient]: K extends `NEXT_PUBLIC_${string}` ? unknown : never };
|
|
13
|
+
shared?: TShared;
|
|
14
|
+
runtimeEnv: Record<keyof TClient | keyof TShared, unknown> & Record<string, unknown>;
|
|
15
|
+
}): Readonly<{ [K in keyof (TServer & TClient & TShared)]: StandardSchemaV1.InferOutput<(TServer & TClient & TShared)[K]> }>;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { arkenv, arkenv as default };
|
|
18
|
+
//# sourceMappingURL=index.d.cts.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { r as StandardSchemaV1 } from "../index-DeuykBvh.js";
|
|
2
|
+
|
|
3
|
+
//#region src/standard/index.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Create a validated, type-safe environment configuration for Next.js applications in Standard Mode.
|
|
6
|
+
*
|
|
7
|
+
* @param options The environment validation configuration options
|
|
8
|
+
* @returns A validated, readonly environment variables object wrapped in a security proxy
|
|
9
|
+
*/
|
|
10
|
+
declare function arkenv<const TServer extends Record<string, StandardSchemaV1> = {}, const TClient extends Record<string, StandardSchemaV1> = {}, const TShared extends Record<string, StandardSchemaV1> = {}>(options: {
|
|
11
|
+
server?: TServer;
|
|
12
|
+
client?: TClient & { [K in keyof TClient]: K extends `NEXT_PUBLIC_${string}` ? unknown : never };
|
|
13
|
+
shared?: TShared;
|
|
14
|
+
runtimeEnv: Record<keyof TClient | keyof TShared, unknown> & Record<string, unknown>;
|
|
15
|
+
}): Readonly<{ [K in keyof (TServer & TClient & TShared)]: StandardSchemaV1.InferOutput<(TServer & TClient & TShared)[K]> }>;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { arkenv, arkenv as default };
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +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;
|
|
2
|
+
//# sourceMappingURL=server.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.cjs","names":["arkenvInternal","coreArkenv","getSchemaKeys"],"sources":["../../src/standard/server.ts"],"sourcesContent":["import \"server-only\";\nimport { arkenv as coreArkenv, getSchemaKeys } from \"@arkenv/standard\";\nimport type { Dict, StandardSchemaV1 } from \"@repo/types\";\nimport { arkenvInternal } from \"@/arkenv-internal\";\n\n/**\n * Create a validated, type-safe environment configuration for Next.js applications (Server entry point, Standard Mode).\n */\nexport function arkenv<\n\tconst TSchema extends Record<string, StandardSchemaV1> = {},\n>(\n\tschema: TSchema,\n\toptions?: {\n\t\textends?: readonly unknown[];\n\t\truntimeEnv?: Dict<string>;\n\t},\n): Readonly<{ [K in keyof TSchema]: StandardSchemaV1.InferOutput<TSchema[K]> }>;\n\nexport function arkenv<\n\tconst TServer extends Record<string, StandardSchemaV1> = {},\n\tconst TShared extends Record<string, StandardSchemaV1> = {},\n>(options: {\n\tserver?: TServer;\n\tshared?: TShared;\n\textends?: readonly unknown[];\n\truntimeEnv?: Record<keyof TShared, string | undefined> & Dict<string>;\n}): Readonly<{\n\t[K in keyof (TServer & TShared)]: StandardSchemaV1.InferOutput<\n\t\t(TServer & 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\"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 default arkenv;\n"],"mappings":"6OAgCA,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"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { i as Dict, r as StandardSchemaV1 } from "../index-96RGPyfa.cjs";
|
|
2
|
+
//#region src/standard/server.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Create a validated, type-safe environment configuration for Next.js applications (Server entry point, Standard Mode).
|
|
5
|
+
*/
|
|
6
|
+
declare function arkenv<const TSchema extends Record<string, StandardSchemaV1> = {}>(schema: TSchema, options?: {
|
|
7
|
+
extends?: readonly unknown[];
|
|
8
|
+
runtimeEnv?: Dict<string>;
|
|
9
|
+
}): Readonly<{ [K in keyof TSchema]: StandardSchemaV1.InferOutput<TSchema[K]> }>;
|
|
10
|
+
declare function arkenv<const TServer extends Record<string, StandardSchemaV1> = {}, const TShared extends Record<string, StandardSchemaV1> = {}>(options: {
|
|
11
|
+
server?: TServer;
|
|
12
|
+
shared?: TShared;
|
|
13
|
+
extends?: readonly unknown[];
|
|
14
|
+
runtimeEnv?: Record<keyof TShared, string | undefined> & Dict<string>;
|
|
15
|
+
}): Readonly<{ [K in keyof (TServer & TShared)]: StandardSchemaV1.InferOutput<(TServer & TShared)[K]> }>;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { arkenv, arkenv as default };
|
|
18
|
+
//# sourceMappingURL=server.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.d.cts","names":[],"sources":["../../src/standard/server.ts"],"mappings":";;;;AAQA;iBAAgB,MAAA,uBACO,MAAA,SAAe,gBAAA,OAAA,CAErC,MAAA,EAAQ,OAAA,EACR,OAAA;EACC,OAAA;EACA,UAAA,GAAa,IAAA;AAAA,IAEZ,QAAA,eAAuB,OAAA,GAAU,gBAAA,CAAiB,WAAA,CAAY,OAAA,CAAQ,CAAA;AAAA,iBAEzD,MAAA,uBACO,MAAA,SAAe,gBAAA,8BACf,MAAA,SAAe,gBAAA,OAAA,CACpC,OAAA;EACD,MAAA,GAAS,OAAA;EACT,MAAA,GAAS,OAAA;EACT,OAAA;EACA,UAAA,GAAa,MAAA,OAAa,OAAA,wBAA+B,IAAA;AAAA,IACtD,QAAA,gBACU,OAAA,GAAU,OAAA,IAAW,gBAAA,CAAiB,WAAA,EACjD,OAAA,GAAU,OAAA,EAAS,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { i as Dict, r as StandardSchemaV1 } from "../index-DeuykBvh.js";
|
|
2
|
+
//#region src/standard/server.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Create a validated, type-safe environment configuration for Next.js applications (Server entry point, Standard Mode).
|
|
5
|
+
*/
|
|
6
|
+
declare function arkenv<const TSchema extends Record<string, StandardSchemaV1> = {}>(schema: TSchema, options?: {
|
|
7
|
+
extends?: readonly unknown[];
|
|
8
|
+
runtimeEnv?: Dict<string>;
|
|
9
|
+
}): Readonly<{ [K in keyof TSchema]: StandardSchemaV1.InferOutput<TSchema[K]> }>;
|
|
10
|
+
declare function arkenv<const TServer extends Record<string, StandardSchemaV1> = {}, const TShared extends Record<string, StandardSchemaV1> = {}>(options: {
|
|
11
|
+
server?: TServer;
|
|
12
|
+
shared?: TShared;
|
|
13
|
+
extends?: readonly unknown[];
|
|
14
|
+
runtimeEnv?: Record<keyof TShared, string | undefined> & Dict<string>;
|
|
15
|
+
}): Readonly<{ [K in keyof (TServer & TShared)]: StandardSchemaV1.InferOutput<(TServer & TShared)[K]> }>;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { arkenv, arkenv as default };
|
|
18
|
+
//# sourceMappingURL=server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.d.ts","names":[],"sources":["../../src/standard/server.ts"],"mappings":";;;;AAQA;iBAAgB,MAAA,uBACO,MAAA,SAAe,gBAAA,OAAA,CAErC,MAAA,EAAQ,OAAA,EACR,OAAA;EACC,OAAA;EACA,UAAA,GAAa,IAAA;AAAA,IAEZ,QAAA,eAAuB,OAAA,GAAU,gBAAA,CAAiB,WAAA,CAAY,OAAA,CAAQ,CAAA;AAAA,iBAEzD,MAAA,uBACO,MAAA,SAAe,gBAAA,8BACf,MAAA,SAAe,gBAAA,OAAA,CACpC,OAAA;EACD,MAAA,GAAS,OAAA;EACT,MAAA,GAAS,OAAA;EACT,OAAA;EACA,UAAA,GAAa,MAAA,OAAa,OAAA,wBAA+B,IAAA;AAAA,IACtD,QAAA,gBACU,OAAA,GAAU,OAAA,IAAW,gBAAA,CAAiB,WAAA,EACjD,OAAA,GAAU,OAAA,EAAS,CAAA"}
|
|
@@ -0,0 +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};
|
|
2
|
+
//# sourceMappingURL=server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.js","names":["coreArkenv"],"sources":["../../src/standard/server.ts"],"sourcesContent":["import \"server-only\";\nimport { arkenv as coreArkenv, getSchemaKeys } from \"@arkenv/standard\";\nimport type { Dict, StandardSchemaV1 } from \"@repo/types\";\nimport { arkenvInternal } from \"@/arkenv-internal\";\n\n/**\n * Create a validated, type-safe environment configuration for Next.js applications (Server entry point, Standard Mode).\n */\nexport function arkenv<\n\tconst TSchema extends Record<string, StandardSchemaV1> = {},\n>(\n\tschema: TSchema,\n\toptions?: {\n\t\textends?: readonly unknown[];\n\t\truntimeEnv?: Dict<string>;\n\t},\n): Readonly<{ [K in keyof TSchema]: StandardSchemaV1.InferOutput<TSchema[K]> }>;\n\nexport function arkenv<\n\tconst TServer extends Record<string, StandardSchemaV1> = {},\n\tconst TShared extends Record<string, StandardSchemaV1> = {},\n>(options: {\n\tserver?: TServer;\n\tshared?: TShared;\n\textends?: readonly unknown[];\n\truntimeEnv?: Record<keyof TShared, string | undefined> & Dict<string>;\n}): Readonly<{\n\t[K in keyof (TServer & TShared)]: StandardSchemaV1.InferOutput<\n\t\t(TServer & 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\"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 default arkenv;\n"],"mappings":"oIAgCA,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"}
|
|
@@ -0,0 +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;
|
|
2
|
+
//# sourceMappingURL=shared.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.cjs","names":["arkenvInternal","coreArkenv","getSchemaKeys"],"sources":["../../src/standard/shared.ts"],"sourcesContent":["import { arkenv as coreArkenv, getSchemaKeys } from \"@arkenv/standard\";\nimport type { Dict, StandardSchemaV1 } from \"@repo/types\";\nimport { arkenvInternal } from \"@/arkenv-internal\";\n\n/**\n * Create a validated, type-safe environment configuration for Next.js applications (Shared entry point, Standard Mode).\n */\nexport function arkenv<\n\tconst TSchema extends Record<string, StandardSchemaV1> = {},\n>(\n\tschema: TSchema,\n\toptions?: {\n\t\textends?: readonly unknown[];\n\t\truntimeEnv?: Dict<string>;\n\t},\n): Readonly<{\n\t[K in keyof TSchema]: StandardSchemaV1.InferOutput<TSchema[K]>;\n}> {\n\tconst isServer = typeof window === \"undefined\";\n\treturn arkenvInternal(\n\t\tschema,\n\t\toptions,\n\t\t{\n\t\t\tisServer,\n\t\t\tisShared: true,\n\t\t},\n\t\tcoreArkenv,\n\t\tgetSchemaKeys,\n\t) as any;\n}\n\nexport default arkenv;\n"],"mappings":"sNAOA,SAAgB,EAGf,EACA,EAME,CAEF,OAAOA,EAAAA,EACN,EACA,EACA,CACC,SALe,OAAO,OAAW,IAMjC,SAAU,GACV,CACDC,EAAAA,OACAC,EAAAA,cACA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { i as Dict, r as StandardSchemaV1 } from "../index-96RGPyfa.cjs";
|
|
2
|
+
|
|
3
|
+
//#region src/standard/shared.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Create a validated, type-safe environment configuration for Next.js applications (Shared entry point, Standard Mode).
|
|
6
|
+
*/
|
|
7
|
+
declare function arkenv<const TSchema extends Record<string, StandardSchemaV1> = {}>(schema: TSchema, options?: {
|
|
8
|
+
extends?: readonly unknown[];
|
|
9
|
+
runtimeEnv?: Dict<string>;
|
|
10
|
+
}): Readonly<{ [K in keyof TSchema]: StandardSchemaV1.InferOutput<TSchema[K]> }>;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { arkenv, arkenv as default };
|
|
13
|
+
//# sourceMappingURL=shared.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.d.cts","names":[],"sources":["../../src/standard/shared.ts"],"mappings":";;;;;AAOA;iBAAgB,MAAA,uBACO,MAAA,SAAe,gBAAA,OAAA,CAErC,MAAA,EAAQ,OAAA,EACR,OAAA;EACC,OAAA;EACA,UAAA,GAAa,IAAA;AAAA,IAEZ,QAAA,eACU,OAAA,GAAU,gBAAA,CAAiB,WAAA,CAAY,OAAA,CAAQ,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { i as Dict, r as StandardSchemaV1 } from "../index-DeuykBvh.js";
|
|
2
|
+
|
|
3
|
+
//#region src/standard/shared.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Create a validated, type-safe environment configuration for Next.js applications (Shared entry point, Standard Mode).
|
|
6
|
+
*/
|
|
7
|
+
declare function arkenv<const TSchema extends Record<string, StandardSchemaV1> = {}>(schema: TSchema, options?: {
|
|
8
|
+
extends?: readonly unknown[];
|
|
9
|
+
runtimeEnv?: Dict<string>;
|
|
10
|
+
}): Readonly<{ [K in keyof TSchema]: StandardSchemaV1.InferOutput<TSchema[K]> }>;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { arkenv, arkenv as default };
|
|
13
|
+
//# sourceMappingURL=shared.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.d.ts","names":[],"sources":["../../src/standard/shared.ts"],"mappings":";;;;;AAOA;iBAAgB,MAAA,uBACO,MAAA,SAAe,gBAAA,OAAA,CAErC,MAAA,EAAQ,OAAA,EACR,OAAA;EACC,OAAA;EACA,UAAA,GAAa,IAAA;AAAA,IAEZ,QAAA,eACU,OAAA,GAAU,gBAAA,CAAiB,WAAA,CAAY,OAAA,CAAQ,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.js","names":["coreArkenv"],"sources":["../../src/standard/shared.ts"],"sourcesContent":["import { arkenv as coreArkenv, getSchemaKeys } from \"@arkenv/standard\";\nimport type { Dict, StandardSchemaV1 } from \"@repo/types\";\nimport { arkenvInternal } from \"@/arkenv-internal\";\n\n/**\n * Create a validated, type-safe environment configuration for Next.js applications (Shared entry point, Standard Mode).\n */\nexport function arkenv<\n\tconst TSchema extends Record<string, StandardSchemaV1> = {},\n>(\n\tschema: TSchema,\n\toptions?: {\n\t\textends?: readonly unknown[];\n\t\truntimeEnv?: Dict<string>;\n\t},\n): Readonly<{\n\t[K in keyof TSchema]: StandardSchemaV1.InferOutput<TSchema[K]>;\n}> {\n\tconst isServer = typeof window === \"undefined\";\n\treturn arkenvInternal(\n\t\tschema,\n\t\toptions,\n\t\t{\n\t\t\tisServer,\n\t\t\tisShared: true,\n\t\t},\n\t\tcoreArkenv,\n\t\tgetSchemaKeys,\n\t) as any;\n}\n\nexport default arkenv;\n"],"mappings":"gHAOA,SAAgB,EAGf,EACA,EAME,CAEF,OAAO,EACN,EACA,EACA,CACC,SALe,OAAO,OAAW,IAMjC,SAAU,GACV,CACDA,EACA,EACA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as InferType } from "./index-
|
|
1
|
+
import { n as InferType } from "./index-96RGPyfa.cjs";
|
|
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-
|
|
12
|
+
//# sourceMappingURL=types-44R9mgTa.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types-
|
|
1
|
+
{"version":3,"file":"types-44R9mgTa.d.cts","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,4 +1,4 @@
|
|
|
1
|
-
import { n as InferType } from "./index-
|
|
1
|
+
import { n as InferType } from "./index-DeuykBvh.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-
|
|
12
|
+
//# sourceMappingURL=types-BMCEEpJO.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types-
|
|
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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arkenv/nextjs",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.4",
|
|
4
4
|
"author": "Yam Borodetsky <yam@yam.codes>",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -21,15 +21,28 @@
|
|
|
21
21
|
"tsdown": "0.21.10",
|
|
22
22
|
"typescript": "6.0.3",
|
|
23
23
|
"vitest": "4.1.5",
|
|
24
|
+
"@arkenv/core": "1.0.0-alpha.2",
|
|
25
|
+
"@arkenv/standard": "1.0.0-alpha.3",
|
|
24
26
|
"@repo/scope": "0.1.3",
|
|
25
|
-
"@repo/types": "0.1.0"
|
|
26
|
-
"arkenv": "1.0.0-alpha.2"
|
|
27
|
+
"@repo/types": "0.1.0"
|
|
27
28
|
},
|
|
28
29
|
"peerDependencies": {
|
|
29
|
-
"arkenv": "^1.0.0",
|
|
30
|
+
"@arkenv/core": "^1.0.0",
|
|
31
|
+
"@arkenv/standard": "^1.0.0",
|
|
30
32
|
"arktype": "^2.1.22",
|
|
31
33
|
"next": "^13.4.0 || ^14.0.0 || ^15.0.0 || ^16.0.0-0"
|
|
32
34
|
},
|
|
35
|
+
"peerDependenciesMeta": {
|
|
36
|
+
"@arkenv/core": {
|
|
37
|
+
"optional": true
|
|
38
|
+
},
|
|
39
|
+
"@arkenv/standard": {
|
|
40
|
+
"optional": true
|
|
41
|
+
},
|
|
42
|
+
"arktype": {
|
|
43
|
+
"optional": true
|
|
44
|
+
}
|
|
45
|
+
},
|
|
33
46
|
"exports": {
|
|
34
47
|
"./shared": {
|
|
35
48
|
"types": "./dist/shared.d.ts",
|
|
@@ -62,6 +75,31 @@
|
|
|
62
75
|
"types": "./dist/config.d.ts",
|
|
63
76
|
"import": "./dist/config.js",
|
|
64
77
|
"require": "./dist/config.cjs"
|
|
78
|
+
},
|
|
79
|
+
"./standard/shared": {
|
|
80
|
+
"types": "./dist/standard/shared.d.ts",
|
|
81
|
+
"import": "./dist/standard/shared.js",
|
|
82
|
+
"require": "./dist/standard/shared.cjs"
|
|
83
|
+
},
|
|
84
|
+
"./standard/server": {
|
|
85
|
+
"types": "./dist/standard/server.d.ts",
|
|
86
|
+
"import": "./dist/standard/server.js",
|
|
87
|
+
"require": "./dist/standard/server.cjs"
|
|
88
|
+
},
|
|
89
|
+
"./standard/client": {
|
|
90
|
+
"types": "./dist/standard/client.d.ts",
|
|
91
|
+
"import": "./dist/standard/client.js",
|
|
92
|
+
"require": "./dist/standard/client.cjs"
|
|
93
|
+
},
|
|
94
|
+
"./standard": {
|
|
95
|
+
"types": "./dist/standard/index.d.ts",
|
|
96
|
+
"import": "./dist/standard/index.js",
|
|
97
|
+
"require": "./dist/standard/index.cjs"
|
|
98
|
+
},
|
|
99
|
+
"./standard/config": {
|
|
100
|
+
"types": "./dist/standard/config.d.ts",
|
|
101
|
+
"import": "./dist/standard/config.js",
|
|
102
|
+
"require": "./dist/standard/config.cjs"
|
|
65
103
|
}
|
|
66
104
|
},
|
|
67
105
|
"bugs": "https://github.com/yamcodes/arkenv/labels/%40arkenv%2Fnextjs",
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
require(`./config.cjs`);let e=require(`arkenv`);const t=Symbol.for(`arkenv.extended_env`),n=Symbol.for(`arkenv.keys`),r=Symbol.for(`arkenv.server_only_keys`);function i(e){if(!e||typeof e!=`object`&&typeof e!=`function`)return[];if(e.json&&typeof e.json==`object`&&e.json.domain===`object`){let t=[];if(Array.isArray(e.json.required))for(let n of e.json.required)n&&typeof n==`object`&&`key`in n&&t.push(n.key);if(Array.isArray(e.json.optional))for(let n of e.json.optional)n&&typeof n==`object`&&`key`in n&&t.push(n.key);return t}return`shape`in e&&e.shape&&typeof e.shape==`object`?Object.keys(e.shape):`entries`in e&&e.entries&&typeof e.entries==`object`?Object.keys(e.entries):Object.keys(e)}function a(a,o,s){let c={},l={},u={},d=[],f={},p=!1;if(typeof o==`boolean`)c=a.server||{},l=a.client||{},u=a.shared||{},d=a.extends||[],f=a.runtimeEnv||{},p=o;else{let e=a||{},t=o||{};d=t.extends||[],f=t.runtimeEnv||{},p=!!s?.isServer,s?.isShared?u=e:p?c=e:l=e}let m={},h=new Set,g=new Set;for(let e of Object.keys(c))h.add(e),!(e in l)&&!(e in u)&&g.add(e);for(let e of Object.keys(l))h.add(e);for(let e of Object.keys(u))h.add(e);let _={};if(d&&Array.isArray(d)){for(let a of d)if(a&&(typeof a==`object`||typeof a==`function`)){let o=a[t];if(o){m={...m,...o};let e=a[n];if(e instanceof Set)for(let t of e)h.add(t);let t=a[r];if(t instanceof Set)for(let e of t)g.add(e)}else{for(let e of Object.keys(m))m[e]!==void 0&&(_[e]=m[e]);for(let e of Object.keys(f))f[e]!==void 0&&(_[e]=f[e]);if(p)for(let e of Object.keys(c))_[e]===void 0&&process.env[e]!==void 0&&(_[e]=process.env[e]);let t=(0,e.arkenv)(a,{env:_,safe:!1});m={...m,...t};let n=i(a);for(let e of n)h.add(e),p&&!e.startsWith(`NEXT_PUBLIC_`)&&!s?.isShared&&g.add(e)}}}for(let e of Object.keys(l))g.delete(e);for(let e of Object.keys(u))g.delete(e);for(let e of Object.keys(l))if(!e.startsWith(`NEXT_PUBLIC_`))throw Error(`Client-side environment variables must be prefixed with 'NEXT_PUBLIC_'. Found invalid key: ${e}`);let v=[...Object.keys(l),...Object.keys(u)];for(let e of v)if(!(e in f))throw Error(`Missing key in runtimeEnv: ${e}. All client and shared environment variables must be explicitly destructured in runtimeEnv.`);for(let e of Object.keys(f))if(!h.has(e))throw Error(`Environment variable '${e}' is passed to runtimeEnv but is not defined in the schema.`);for(let e of Object.keys(m))m[e]!==void 0&&(_[e]=m[e]);for(let e of Object.keys(f))f[e]!==void 0&&(_[e]=f[e]);if(p)for(let e of Object.keys(c))_[e]===void 0&&process.env[e]!==void 0&&(_[e]=process.env[e]);let y=(0,e.arkenv)(p?{...c,...l,...u}:{...l,...u},{env:_,safe:!1}),b={...m,...y};return new Proxy(b,{get(e,i,a){if(i===t)return e;if(i===n)return h;if(i===r)return g;if(typeof i==`symbol`)return Reflect.get(e,i,a);if(typeof i==`string`){if(g.has(i)&&!p)throw Error(`Accessing server-side environment variable '${i}' on the client is not allowed.`);if(!h.has(i)&&!(i in Object.prototype)&&!(i===`__esModule`||i===`$$typeof`||i===`toJSON`||i===`inspect`))throw Error(`Environment variable '${i}' is not defined in the schema.`)}return Reflect.get(e,i,a)}})}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return a}});
|
|
2
|
-
//# sourceMappingURL=arkenv-internal-BI25fuIK.cjs.map
|