{"version":3,"file":"config.cjs","names":["path","fs"],"sources":["../src/config.ts"],"sourcesContent":["import fs from \"node:fs\";\nimport path from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\nimport {\n\textractKeys as coreExtractKeys,\n\textractClientKeys,\n\textractSharedKeys,\n\tfindSchemaPath,\n\tformatMissingSchemaError,\n\tresolveLayout,\n\twatchSchema,\n} from \"@arkenv/build\";\nimport { createJiti } from \"jiti\";\n\nexport { extractClientKeys, extractSharedKeys };\n\nlet hasWarnedSimpleLayout = false;\n\nfunction normalizeLayout(\n\tlayout: ArkEnvConfigOptions[\"layout\"],\n): \"simple\" | \"strict\" | undefined {\n\tif (layout === \"simple\") {\n\t\tif (process.env.NODE_ENV === \"development\" && !hasWarnedSimpleLayout) {\n\t\t\thasWarnedSimpleLayout = true;\n\t\t\tconsole.warn(\n\t\t\t\t\"⚠️ [arkenv] The 'simple' layout option is deprecated and will be removed in the next major version. Use 'flat' instead.\",\n\t\t\t);\n\t\t}\n\t\treturn \"simple\";\n\t}\n\tif (layout === \"flat\") {\n\t\treturn \"simple\";\n\t}\n\treturn layout;\n}\n\n/**\n * Configuration options for the ArkEnv Next.js integration.\n *\n * @example\n * ```ts\n * const configOptions: ArkEnvConfigOptions = {\n *   schemaPath: \"./src/env.ts\",\n *   outputPath: \"./src/generated/env.gen.ts\"\n * };\n * ```\n */\nexport type ArkEnvConfigOptions = {\n\t/**\n\t * Specify the path to the schema definition file.\n\t *\n\t * Defaults to searching for `\"src/env.ts\"` or `\"env.ts\"` in the project root.\n\t *\n\t * @default \"src/env.ts\"\n\t * @example\n\t * ```ts\n\t * export default withArkEnv(nextConfig, {\n\t *   schemaPath: \"./src/env.ts\"\n\t * });\n\t * ```\n\t */\n\tschemaPath?: string;\n\n\t/**\n\t * Specify the path where the generated file (`env.gen.ts`) should be written.\n\t *\n\t * Defaults to `\"generated/env.gen.ts\"` in the same directory as the schema file.\n\t *\n\t * @default \"[schemaDirectory]/generated/env.gen.ts\"\n\t * @example\n\t * ```ts\n\t * export default withArkEnv(nextConfig, {\n\t *   outputPath: \"./src/generated/env.gen.ts\"\n\t * });\n\t * ```\n\t */\n\toutputPath?: string;\n\n\t/**\n\t * Specify the configuration layout.\n\t *\n\t * - `\"flat\"` (default): A single `env.ts` schema file.\n\t * - `\"strict\"`: A split schema layout (`env/client.ts`, `env/server.ts`, and optionally `env/internal/shared.ts`).\n\t *\n\t * @default \"flat\"\n\t */\n\tlayout?:\n\t\t| \"flat\"\n\t\t| \"strict\"\n\t\t/** @deprecated Use `\"flat\"` instead. `\"simple\"` will be removed in the next major version. */\n\t\t| \"simple\";\n\n\t/**\n\t * Enable or disable build-time environment variable validation during build/dev startup.\n\t *\n\t * @default true\n\t */\n\tvalidate?: boolean;\n\n\t/**\n\t * Enable or disable automatic code generation of the `env.gen.ts` file.\n\t *\n\t * @default true\n\t */\n\tcodegen?: boolean;\n};\n\n/**\n * Run ArkEnv codegen and setup without wrapping nextConfig.\n *\n * @param options Optional configuration paths for schema and output files\n * @param internalOptions Optional configuration for internal testing hooks\n * @throws An error if the schema file cannot be found or if code generation fails\n */\nexport function setupArkEnv(\n\toptions?: ArkEnvConfigOptions,\n\tinternalOptions?: { _jitiAliases?: Record<string, string> },\n): void {\n\t// 1. Locate the env.ts schema file or strict schema directory\n\tconst schemaPath = options?.schemaPath\n\t\t? path.resolve(options.schemaPath)\n\t\t: findSchemaPath();\n\n\t// Auto-detect layout if not specified\n\tlet exists = false;\n\tif (schemaPath) {\n\t\tif (fs.existsSync(schemaPath)) {\n\t\t\texists = true;\n\t\t} else {\n\t\t\tconst ext = path.extname(schemaPath);\n\t\t\tif (ext) {\n\t\t\t\tconst baseWithoutExt = schemaPath.slice(0, -ext.length);\n\t\t\t\tif (fs.existsSync(baseWithoutExt)) {\n\t\t\t\t\texists = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tif (!schemaPath || !exists) {\n\t\tthrow new Error(\n\t\t\tformatMissingSchemaError({\n\t\t\t\tschemaPath: options?.schemaPath,\n\t\t\t\toptionsHint: \"setupArkEnv options\",\n\t\t\t}),\n\t\t);\n\t}\n\n\tconst normalizedLayout = normalizeLayout(options?.layout);\n\n\tconst { layout: resolvedLayout, baseDir } = resolveLayout(\n\t\tschemaPath,\n\t\tnormalizedLayout,\n\t);\n\n\t// 2. Determine outputPath (defaults to generated/env.gen.ts in the same directory as schemaPath/baseDir)\n\tconst defaultOutputDir =\n\t\tresolvedLayout === \"strict\" && baseDir ? baseDir : path.dirname(schemaPath);\n\tconst defaultOutputPath = path.join(\n\t\tdefaultOutputDir,\n\t\t\"generated\",\n\t\t\"env.gen.ts\",\n\t);\n\tconst outputPath = options?.outputPath\n\t\t? path.resolve(options.outputPath)\n\t\t: defaultOutputPath;\n\n\t// 3. Run initial code generation if enabled\n\tconst codegen = options?.codegen ?? true;\n\tif (codegen) {\n\t\ttry {\n\t\t\trunCodegen(schemaPath, outputPath, resolvedLayout);\n\t\t} catch (error: unknown) {\n\t\t\tconst message = error instanceof Error ? error.message : String(error);\n\t\t\tthrow new Error(`[ArkEnv] Failed to generate env.gen.ts: ${message}`);\n\t\t}\n\t}\n\n\t// 4. Validate schema against environment variables\n\tconst runValidation = options?.validate ?? true;\n\tif (runValidation) {\n\t\ttry {\n\t\t\t(globalThis as any).__arkenv_force_server__ = true;\n\t\t\tconst fileToEvaluate =\n\t\t\t\tresolvedLayout === \"strict\" && baseDir\n\t\t\t\t\t? path.join(baseDir, \"server.ts\")\n\t\t\t\t\t: schemaPath;\n\n\t\t\tconst filenameForJiti =\n\t\t\t\ttypeof __filename !== \"undefined\"\n\t\t\t\t\t? __filename\n\t\t\t\t\t: typeof import.meta !== \"undefined\" && import.meta.url\n\t\t\t\t\t\t? fileURLToPath(import.meta.url)\n\t\t\t\t\t\t: \"\";\n\t\t\tconst dir = path.dirname(filenameForJiti);\n\t\t\tconst sharedPath = fs.existsSync(path.join(dir, \"shared.ts\"))\n\t\t\t\t? path.join(dir, \"shared.ts\")\n\t\t\t\t: path.join(dir, \"shared.js\");\n\n\t\t\tconst aliases: Record<string, string> = {\n\t\t\t\t\"server-only\": sharedPath,\n\t\t\t\t\"./script\": sharedPath,\n\t\t\t\t\"./script.tsx\": sharedPath,\n\t\t\t\t...internalOptions?._jitiAliases,\n\t\t\t};\n\n\t\t\tconst jiti = createJiti(fileToEvaluate, {\n\t\t\t\tmoduleCache: false,\n\t\t\t\tfsCache: false,\n\t\t\t\ttsconfigPaths: true,\n\t\t\t\talias: aliases,\n\t\t\t});\n\t\t\tjiti(fileToEvaluate);\n\t\t} catch (error: unknown) {\n\t\t\tconsole.error(\"\\n❌ [ArkEnv] Environment validation failed:\");\n\t\t\tconsole.error(error instanceof Error ? error.message : String(error));\n\t\t\tconsole.error(\"\");\n\t\t\tprocess.exit(1);\n\t\t} finally {\n\t\t\tdelete (globalThis as any).__arkenv_force_server__;\n\t\t}\n\t}\n\n\t// 5. Initialize development file watcher if in dev mode and codegen is enabled\n\tconst isDev =\n\t\tprocess.env.NODE_ENV === \"development\" ||\n\t\tprocess.env.NEXT_PHASE === \"phase-development-server\";\n\tif (isDev && codegen) {\n\t\tconst watchPaths =\n\t\t\tresolvedLayout === \"strict\" && baseDir\n\t\t\t\t? [\n\t\t\t\t\t\tpath.join(baseDir, \"internal\", \"shared.ts\"),\n\t\t\t\t\t\tpath.join(baseDir, \"client.ts\"),\n\t\t\t\t\t\tpath.join(baseDir, \"server.ts\"),\n\t\t\t\t\t].filter(fs.existsSync)\n\t\t\t\t: [schemaPath];\n\t\twatchSchema(watchPaths, () => {\n\t\t\trunCodegen(schemaPath, outputPath, resolvedLayout);\n\t\t});\n\t}\n}\n\n/**\n * Wrap a Next.js configuration object to automatically generate the `runtimeEnv` block in `env.gen.ts`.\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 * @throws An error if the schema file cannot be found or if code generation fails\n */\nexport function withArkEnv<T>(nextConfig: T, options?: ArkEnvConfigOptions): T {\n\tsetupArkEnv(options);\n\treturn nextConfig;\n}\n\n/**\n * Run code generation to read the schema file and generate the env.gen.ts factory.\n *\n * @param schemaPath The absolute path to the schema file or directory\n * @param outputPath The absolute path to the generated output file\n * @param layoutOption The explicit layout to use; auto-detected from the filesystem when omitted\n * @throws An error if strict layout files are missing when `layoutOption` is `\"strict\"`\n */\nexport function runCodegen(\n\tschemaPath: string,\n\toutputPath: string,\n\tlayoutOption?: ArkEnvConfigOptions[\"layout\"],\n) {\n\tconst normalizedLayout = normalizeLayout(layoutOption);\n\n\tconst { layout: resolvedLayout, baseDir } = resolveLayout(\n\t\tschemaPath,\n\t\tnormalizedLayout,\n\t);\n\n\tlet generatedCode = \"\";\n\tif (resolvedLayout === \"strict\") {\n\t\tconst clientPath = path.join(baseDir, \"client.ts\");\n\t\tconst sharedPath = path.join(baseDir, \"internal\", \"shared.ts\");\n\n\t\tconst clientContent = fs.existsSync(clientPath)\n\t\t\t? fs.readFileSync(clientPath, \"utf-8\")\n\t\t\t: \"\";\n\t\tconst sharedContent = fs.existsSync(sharedPath)\n\t\t\t? fs.readFileSync(sharedPath, \"utf-8\")\n\t\t\t: \"\";\n\n\t\tconst clientKeys = extractClientKeys(clientContent);\n\t\tconst sharedKeys = extractSharedKeys(sharedContent);\n\n\t\tgeneratedCode = generateClientFactoryCode(clientKeys, sharedKeys);\n\t} else {\n\t\tconst fileContent = fs.readFileSync(schemaPath, \"utf-8\");\n\t\tconst { clientKeys, sharedKeys, isLegacy } = extractKeys(fileContent);\n\t\tif (isLegacy) {\n\t\t\tgeneratedCode = generateFactoryCode(clientKeys, sharedKeys);\n\t\t} else {\n\t\t\tgeneratedCode = generateFlatFactoryCode(clientKeys, sharedKeys);\n\t\t}\n\t}\n\n\t// Ensure parent directory exists\n\tconst outputDir = path.dirname(outputPath);\n\tif (!fs.existsSync(outputDir)) {\n\t\tfs.mkdirSync(outputDir, { recursive: true });\n\t}\n\n\t// Write if changed to avoid unnecessary filesystem/watcher triggers\n\tlet shouldWrite = true;\n\tif (fs.existsSync(outputPath)) {\n\t\tconst existingContent = fs.readFileSync(outputPath, \"utf-8\");\n\t\tif (existingContent === generatedCode) {\n\t\t\tshouldWrite = false;\n\t\t}\n\t}\n\n\tif (shouldWrite) {\n\t\tfs.writeFileSync(outputPath, generatedCode, \"utf-8\");\n\t}\n}\n\n/**\n * Statically extract client and shared keys from the schema content using NEXT_PUBLIC_ prefix.\n *\n * @param content The schema file string content\n * @returns An object containing the extracted client and shared keys\n */\nexport function extractKeys(content: string): {\n\tclientKeys: string[];\n\tsharedKeys: string[];\n\tserverKeys: string[];\n\tisLegacy?: boolean;\n} {\n\treturn coreExtractKeys(content, \"NEXT_PUBLIC_\");\n}\n\n/**\n * Generate the triple-tab indented runtime environment variables mapping.\n */\nfunction generateRuntimeEnvLines(\n\tclientKeys: string[],\n\tsharedKeys: string[],\n): string {\n\tconst allKeys = Array.from(new Set([...clientKeys, ...sharedKeys]));\n\treturn allKeys\n\t\t.map(\n\t\t\t(key) =>\n\t\t\t\t`\\t\\t\\t${key}: typeof window !== \"undefined\" ? (globalThis as any).__arkenv_env__?.${key} ?? process.env.${key} : process.env.${key},`,\n\t\t)\n\t\t.join(\"\\n\");\n}\n\nconst GENERATED_HEADER = `/* eslint-disable */\n// biome-ignore format: auto-generated\n// Generated by ArkEnv. DO NOT EDIT DIRECTLY.\n`;\n\nconst GENERATED_FOOTER = `\nexport default createEnv;\n`;\n\n/**\n * Generate the TypeScript factory code for the tailored createEnv helper.\n *\n * @param clientKeys The client environment variable keys\n * @param sharedKeys The shared environment variable keys\n * @returns The generated TypeScript source code string\n */\nfunction generateFactoryCode(\n\tclientKeys: string[],\n\tsharedKeys: string[],\n): string {\n\tconst runtimeEnvLines = generateRuntimeEnvLines(clientKeys, sharedKeys);\n\n\treturn `${GENERATED_HEADER}\nimport { createEnv as coreCreateEnv } from \"@arkenv/nextjs\";\n\nexport { type } from \"@arkenv/nextjs\";\n\nexport function createEnv<\n\tconst TServer extends Record<string, any> = {},\n\tconst TClient extends Record<string, any> = {},\n\tconst TShared extends Record<string, any> = {},\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}) {\n\treturn coreCreateEnv({\n\t\t...options,\n\t\truntimeEnv: {\n${runtimeEnvLines}\n\t\t},\n\t} as any) as any;\n}\n${GENERATED_FOOTER}`;\n}\n\n/**\n * Generate the TypeScript factory code for the Flat Layout createEnv helper.\n *\n * @remarks\n * **Architecture tripwire:** Do not statically compile the schema here or\n * reference internal-only types (the `$` scope or `MergeExtends`).\n *\n * - **Generic wrapper:** The factory must stay generic because the concrete\n *   schema is owned by the user-land `env.ts`.\n * - **Type strategy:** It intentionally returns the full schema type to ensure\n *   flawless Server Component autocomplete.\n * - **Security boundary:** Client-side protection is deliberately deferred to\n *   the runtime Proxy in `@arkenv/nextjs`, which throws on unauthorized access.\n *\n * 📖 See ADR-0010: Flat layout codegen and type inference strategy\n * (`docs/adr/0010-flat-layout-codegen-type-strategy.md`).\n */\nfunction generateFlatFactoryCode(\n\tclientKeys: string[],\n\tsharedKeys: string[],\n): string {\n\tconst runtimeEnvLines = generateRuntimeEnvLines(clientKeys, sharedKeys);\n\n\treturn `${GENERATED_HEADER}\nimport { createEnv as coreCreateEnv } from \"@arkenv/nextjs\";\nimport type { type as at, distill } from \"arktype\";\n\nexport { type } from \"@arkenv/nextjs\";\n\nexport function createEnv<\n\tconst TSchema extends Record<string, unknown> & { runtimeEnv?: never } = {},\n\tconst TExpose extends keyof TSchema = never,\n\tconst TExtends extends readonly unknown[] = [],\n>(\n\tschema: TSchema,\n\toptions?: {\n\t\t/**\n\t\t * Custom environment variables to expose to the client bundle.\n\t\t * By default, variables prefixed with \\`NEXT_PUBLIC_\\` and \\`NODE_ENV\\` are exposed automatically.\n\t\t * Use this option to expose custom variables that do not have the \\`NEXT_PUBLIC_\\` prefix.\n\t\t */\n\t\texposeToClient?: readonly TExpose[];\n\t\textends?: [...TExtends];\n\t},\n): Readonly<distill.Out<at.infer<TSchema>>> {\n\t// Types expose the full schema for a great DX on the server; the runtime\n\t// Proxy from \\`@arkenv/nextjs\\` enforces the security boundary by throwing\n\t// when a server-only variable is accessed on the client.\n\tconst env = coreCreateEnv(schema as any, {\n\t\t...options,\n\t\truntimeEnv: {\n${runtimeEnvLines}\n\t\t},\n\t} as any);\n\treturn env as unknown as Readonly<distill.Out<at.infer<TSchema>>>;\n}\n${GENERATED_FOOTER}`;\n}\n\n/**\n * Generate the TypeScript factory code for the strict-layout `createEnv` helper.\n *\n * Unlike `generateFactoryCode`, this variant imports from `@arkenv/nextjs/client`\n * and exposes a positional-schema signature suited for split-file projects.\n *\n * @param clientKeys The env var keys extracted from `client.ts`\n * @param sharedKeys The env var keys extracted from `internal/shared.ts`\n * @returns The generated TypeScript source code string\n */\nfunction generateClientFactoryCode(\n\tclientKeys: string[],\n\tsharedKeys: string[],\n): string {\n\tconst runtimeEnvLines = generateRuntimeEnvLines(clientKeys, sharedKeys);\n\n\treturn `${GENERATED_HEADER}\nimport { createEnv as coreCreateEnv } from \"@arkenv/nextjs/client\";\n\nexport { type } from \"@arkenv/nextjs/client\";\n\nexport function createEnv<\n\tconst TSchema extends Record<string, any> = {},\n\tconst TExtends extends readonly unknown[] = [],\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?: [...TExtends];\n\t},\n) {\n\treturn coreCreateEnv<TSchema, TExtends>(schema as any, {\n\t\t...options,\n\t\truntimeEnv: {\n${runtimeEnvLines}\n\t\t},\n\t} as any);\n}\n${GENERATED_FOOTER}`;\n}\n"],"mappings":"8qBAgBI,EAAwB,GAE5B,SAAS,EACR,EACkC,CAalC,OAZI,IAAW,UACV,QAAQ,IAAI,WAAa,eAAiB,CAAC,IAC9C,EAAwB,GACxB,QAAQ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