@maltty/cli 1.0.0-rc.0 → 1.0.0-rc.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/{_format-CeQhQTl5.js → _format-XTN-U4H5.js} +4 -2
- package/dist/{_format-CeQhQTl5.js.map → _format-XTN-U4H5.js.map} +1 -1
- package/dist/attemptAsync-D_oWcKfe.js +74 -0
- package/dist/attemptAsync-D_oWcKfe.js.map +1 -0
- package/dist/commands/add/command.d.ts +0 -1
- package/dist/commands/add/command.d.ts.map +1 -1
- package/dist/commands/add/command.js +4 -4
- package/dist/commands/add/command.js.map +1 -1
- package/dist/commands/add/config.d.ts +0 -1
- package/dist/commands/add/config.d.ts.map +1 -1
- package/dist/commands/add/config.js +3 -3
- package/dist/commands/add/config.js.map +1 -1
- package/dist/commands/add/index.d.ts +0 -1
- package/dist/commands/add/index.d.ts.map +1 -1
- package/dist/commands/add/index.js.map +1 -1
- package/dist/commands/add/middleware.d.ts +0 -1
- package/dist/commands/add/middleware.d.ts.map +1 -1
- package/dist/commands/add/middleware.js +3 -3
- package/dist/commands/add/middleware.js.map +1 -1
- package/dist/commands/build.d.ts +7 -8
- package/dist/commands/build.d.ts.map +1 -1
- package/dist/commands/build.js +3 -3
- package/dist/commands/build.js.map +1 -1
- package/dist/commands/commands.d.ts +6 -7
- package/dist/commands/commands.d.ts.map +1 -1
- package/dist/commands/commands.js +5 -5
- package/dist/commands/commands.js.map +1 -1
- package/dist/commands/dev.d.ts +5 -6
- package/dist/commands/dev.d.ts.map +1 -1
- package/dist/commands/dev.js +3 -3
- package/dist/commands/dev.js.map +1 -1
- package/dist/commands/doctor.d.ts +5 -6
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +7 -6
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/init.d.ts +0 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +5 -5
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/run.d.ts +11 -12
- package/dist/commands/run.d.ts.map +1 -1
- package/dist/commands/run.js +6 -6
- package/dist/commands/run.js.map +1 -1
- package/dist/commands/stories.d.ts +3 -4
- package/dist/commands/stories.d.ts.map +1 -1
- package/dist/commands/stories.js.map +1 -1
- package/dist/{config-helpers-pv_2Spux.js → config-helpers-DAy-Arox.js} +1 -1
- package/dist/{config-helpers-pv_2Spux.js.map → config-helpers-DAy-Arox.js.map} +1 -1
- package/dist/{defu-BBwssjW3.js → defu-BOMYL43b.js} +1 -13
- package/dist/{defu-BBwssjW3.js.map → defu-BOMYL43b.js.map} +1 -1
- package/dist/{detect-AOq1ehTE.js → detect-Gdceq3rh.js} +4 -4
- package/dist/{detect-AOq1ehTE.js.map → detect-Gdceq3rh.js.map} +1 -1
- package/dist/{dist-Xa07jNxS.js → dist-BGEDDbkB.js} +1430 -859
- package/dist/dist-BGEDDbkB.js.map +1 -0
- package/dist/{dist-DW_gRP7_.js → dist-FY8K5na4.js} +37 -8
- package/dist/dist-FY8K5na4.js.map +1 -0
- package/dist/fs-Uxhr-pvi-AfTuGWmD.js +98 -0
- package/dist/fs-Uxhr-pvi-AfTuGWmD.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/{jiti-CxWlVmZ_.js → jiti-DLiXBetA.js} +15 -10
- package/dist/{jiti-CxWlVmZ_.js.map → jiti-DLiXBetA.js.map} +1 -1
- package/dist/json-DjLTvRvF.js +82 -0
- package/dist/json-DjLTvRvF.js.map +1 -0
- package/dist/{json5-z-PGDMyy.js → json5-Dgws4cj9.js} +22 -8
- package/dist/{json5-z-PGDMyy.js.map → json5-Dgws4cj9.js.map} +1 -1
- package/dist/{jsonc-DqZkfC3S.js → jsonc-B3DUZTiW.js} +9 -15
- package/dist/jsonc-B3DUZTiW.js.map +1 -0
- package/dist/jsonc-BjIiMOLf.js +2 -0
- package/dist/{main-C_8x2aB3.js → main-CMmTVJ4V.js} +2 -2
- package/dist/{main-C_8x2aB3.js.map → main-CMmTVJ4V.js.map} +1 -1
- package/dist/{manifest-BIKVDJML.js → manifest-C192Fk9X.js} +3 -3
- package/dist/{manifest-BIKVDJML.js.map → manifest-C192Fk9X.js.map} +1 -1
- package/dist/{multipart-parser-MNkxNO83.js → multipart-parser-XnJOfY8C.js} +14 -4
- package/dist/{multipart-parser-MNkxNO83.js.map → multipart-parser-XnJOfY8C.js.map} +1 -1
- package/dist/{node-C91xGGqn.js → node-Bbe24r0m.js} +28 -105
- package/dist/node-Bbe24r0m.js.map +1 -0
- package/dist/{node-Drmc03fL.js → node-lkjrm0W1.js} +95 -33
- package/dist/{node-Drmc03fL.js.map → node-lkjrm0W1.js.map} +1 -1
- package/dist/{ohash-BPoV4zBH.js → ohash-Cgvv31gH.js} +5 -3
- package/dist/ohash-Cgvv31gH.js.map +1 -0
- package/dist/pnpm-workspace.yaml +10 -10
- package/dist/{chunk-DsIazq42.js → rolldown-runtime-C7HZzL1F.js} +2 -2
- package/dist/{toml-LuHsHQtV.js → toml-BrfNstp2.js} +34 -3
- package/dist/{toml-LuHsHQtV.js.map → toml-BrfNstp2.js.map} +1 -1
- package/dist/{utils-DlIJNGLQ.js → utils-ioeFEbm4.js} +208 -236
- package/dist/utils-ioeFEbm4.js.map +1 -0
- package/dist/{validate-C_SXBoLq.js → validate-CX8axBK6.js} +1 -1
- package/dist/{validate-C_SXBoLq.js.map → validate-CX8axBK6.js.map} +1 -1
- package/dist/{write-CSwG4Stj.js → write-C6VsyUuc.js} +6 -4
- package/dist/{write-CSwG4Stj.js.map → write-C6VsyUuc.js.map} +1 -1
- package/dist/{yaml-BS9RDuUr.js → yaml-Cp5SldPx.js} +78 -18
- package/dist/yaml-Cp5SldPx.js.map +1 -0
- package/package.json +14 -14
- package/dist/attemptAsync-BdXzRSIT.js +0 -42
- package/dist/attemptAsync-BdXzRSIT.js.map +0 -1
- package/dist/dist-DW_gRP7_.js.map +0 -1
- package/dist/dist-Xa07jNxS.js.map +0 -1
- package/dist/json-D7WbuVK1.js +0 -43
- package/dist/json-D7WbuVK1.js.map +0 -1
- package/dist/jsonc-DqZkfC3S.js.map +0 -1
- package/dist/jsonc-KADMdSjU.js +0 -2
- package/dist/node-C91xGGqn.js.map +0 -1
- package/dist/ohash-BPoV4zBH.js.map +0 -1
- package/dist/utils-DlIJNGLQ.js.map +0 -1
- package/dist/yaml-BS9RDuUr.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils-ioeFEbm4.js","names":["read","extname","e","resolve","join","isAbsolute","parseJSON","parseJSONC","dirname","resolve","loadConfig","rc9.read","rc9.readUser","dirname","basename","join","extname"],"sources":["../../utils/dist/tag.js","../../../node_modules/.pnpm/exsolve@1.1.1/node_modules/exsolve/dist/index.mjs","../../../node_modules/.pnpm/rc9@3.0.1/node_modules/rc9/dist/_chunks/libs/flat.mjs","../../../node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.mjs","../../../node_modules/.pnpm/rc9@3.0.1/node_modules/rc9/dist/index.mjs","../../../node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/json.mjs","../../../node_modules/.pnpm/pkg-types@2.3.1/node_modules/pkg-types/dist/index.mjs","../../../node_modules/.pnpm/c12@4.0.0-beta.5_chokidar@5.0.0_dotenv@17.4.2_giget@1.2.5_jiti@2.7.0_magicast@0.5.3/node_modules/c12/dist/index.mjs","../../utils/dist/validate.js","../../config/dist/utils.js"],"sourcesContent":["//#region src/tag.ts\n/**\n* Property key used to brand objects with a tag string.\n*\n* Defined via `Object.defineProperty` as non-enumerable, non-writable, and\n* non-configurable, so it does not appear in `Object.keys`, `JSON.stringify`,\n* `for...in`, or spread.\n*/\nconst TAG = \"__tag\";\n/**\n* Create a shallow copy of `obj` with a non-enumerable {@link TAG} property.\n*\n* The original object is not mutated. The tag is defined as non-enumerable,\n* non-writable, and non-configurable via `Object.defineProperty`.\n*\n* @param obj - The source object to copy and tag.\n* @param tag - The tag string to brand the copy with.\n* @returns A new object with all own enumerable properties of `obj` plus the hidden tag.\n*/\nfunction withTag(obj, tag) {\n\tconst copy = { ...obj };\n\tObject.defineProperty(copy, TAG, {\n\t\tconfigurable: false,\n\t\tenumerable: false,\n\t\tvalue: tag,\n\t\twritable: false\n\t});\n\treturn copy;\n}\n/**\n* Type guard that checks whether `value` carries the given tag.\n*\n* @param value - The value to inspect.\n* @param tag - The expected tag string.\n* @returns `true` when `value` is a non-null object whose `[TAG]` equals `tag`.\n*/\nfunction hasTag(value, tag) {\n\tif (typeof value !== \"object\" || value === null) return false;\n\treturn value[TAG] === tag;\n}\n/**\n* Read the tag from a value, if present.\n*\n* @param value - The value to inspect.\n* @returns The tag string, or `undefined` when the value is untagged.\n*/\nfunction getTag(value) {\n\tif (typeof value !== \"object\" || value === null) return;\n\tconst tag = value[TAG];\n\tif (typeof tag === \"string\") return tag;\n}\n//#endregion\nexport { TAG, getTag, hasTag, withTag };\n\n//# sourceMappingURL=tag.js.map","import fs, { lstatSync, realpathSync, statSync } from \"node:fs\";\nimport { URL as URL$1, fileURLToPath, pathToFileURL } from \"node:url\";\nimport path, { isAbsolute } from \"node:path\";\nimport assert from \"node:assert\";\nimport process$1 from \"node:process\";\nimport { format, inspect } from \"node:util\";\nconst nodeBuiltins = [\n\t\"_http_agent\",\n\t\"_http_client\",\n\t\"_http_common\",\n\t\"_http_incoming\",\n\t\"_http_outgoing\",\n\t\"_http_server\",\n\t\"_stream_duplex\",\n\t\"_stream_passthrough\",\n\t\"_stream_readable\",\n\t\"_stream_transform\",\n\t\"_stream_wrap\",\n\t\"_stream_writable\",\n\t\"_tls_common\",\n\t\"_tls_wrap\",\n\t\"assert\",\n\t\"assert/strict\",\n\t\"async_hooks\",\n\t\"buffer\",\n\t\"child_process\",\n\t\"cluster\",\n\t\"console\",\n\t\"constants\",\n\t\"crypto\",\n\t\"dgram\",\n\t\"diagnostics_channel\",\n\t\"dns\",\n\t\"dns/promises\",\n\t\"domain\",\n\t\"events\",\n\t\"fs\",\n\t\"fs/promises\",\n\t\"http\",\n\t\"http2\",\n\t\"https\",\n\t\"inspector\",\n\t\"inspector/promises\",\n\t\"module\",\n\t\"net\",\n\t\"os\",\n\t\"path\",\n\t\"path/posix\",\n\t\"path/win32\",\n\t\"perf_hooks\",\n\t\"process\",\n\t\"punycode\",\n\t\"querystring\",\n\t\"readline\",\n\t\"readline/promises\",\n\t\"repl\",\n\t\"stream\",\n\t\"stream/consumers\",\n\t\"stream/promises\",\n\t\"stream/web\",\n\t\"string_decoder\",\n\t\"sys\",\n\t\"timers\",\n\t\"timers/promises\",\n\t\"tls\",\n\t\"trace_events\",\n\t\"tty\",\n\t\"url\",\n\t\"util\",\n\t\"util/types\",\n\t\"v8\",\n\t\"vm\",\n\t\"wasi\",\n\t\"worker_threads\",\n\t\"zlib\"\n];\nconst classRegExp = /^([A-Z][a-z\\d]*)+$/;\nconst kTypes = /* @__PURE__ */ new Set([\n\t\"string\",\n\t\"function\",\n\t\"number\",\n\t\"object\",\n\t\"Function\",\n\t\"Object\",\n\t\"boolean\",\n\t\"bigint\",\n\t\"symbol\"\n]);\nconst messages = /* @__PURE__ */ new Map();\nfunction formatList(array, type = \"and\") {\n\tswitch (array.length) {\n\t\tcase 0: return \"\";\n\t\tcase 1: return `${array[0]}`;\n\t\tcase 2: return `${array[0]} ${type} ${array[1]}`;\n\t\tcase 3: return `${array[0]}, ${array[1]}, ${type} ${array[2]}`;\n\t\tdefault: return `${array.slice(0, -1).join(\", \")}, ${type} ${array.at(-1)}`;\n\t}\n}\nfunction getExpectedArgumentLength(message) {\n\tlet expectedLength = 0;\n\tconst regex = /%[dfijoOs]/g;\n\twhile (regex.exec(message) !== null) expectedLength++;\n\treturn expectedLength;\n}\nfunction createError(sym, value, constructor) {\n\tmessages.set(sym, value);\n\treturn makeNodeErrorWithCode(constructor, sym);\n}\nconst kIsNodeError = Symbol(\"kIsNodeError\");\nfunction makeNodeErrorWithCode(Base, key) {\n\tconst message = messages.get(key);\n\tconst expectedLength = typeof message === \"string\" ? getExpectedArgumentLength(message) : -1;\n\tswitch (expectedLength) {\n\t\tcase 0: {\n\t\t\tclass NodeError extends Base {\n\t\t\t\tcode = key;\n\t\t\t\tconstructor(...args) {\n\t\t\t\t\tassert.ok(args.length === 0, `Code: ${key}; The provided arguments length (${args.length}) does not match the required ones (${expectedLength}).`);\n\t\t\t\t\tsuper(message);\n\t\t\t\t}\n\t\t\t\tget [\"constructor\"]() {\n\t\t\t\t\treturn Base;\n\t\t\t\t}\n\t\t\t\tget [kIsNodeError]() {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\ttoString() {\n\t\t\t\t\treturn `${this.name} [${key}]: ${this.message}`;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn NodeError;\n\t\t}\n\t\tcase -1: {\n\t\t\tclass NodeError extends Base {\n\t\t\t\tcode = key;\n\t\t\t\tconstructor(...args) {\n\t\t\t\t\tsuper();\n\t\t\t\t\tObject.defineProperty(this, \"message\", {\n\t\t\t\t\t\tvalue: getMessage(key, args, this),\n\t\t\t\t\t\tenumerable: false,\n\t\t\t\t\t\twritable: true,\n\t\t\t\t\t\tconfigurable: true\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tget [\"constructor\"]() {\n\t\t\t\t\treturn Base;\n\t\t\t\t}\n\t\t\t\tget [kIsNodeError]() {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\ttoString() {\n\t\t\t\t\treturn `${this.name} [${key}]: ${this.message}`;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn NodeError;\n\t\t}\n\t\tdefault: {\n\t\t\tclass NodeError extends Base {\n\t\t\t\tcode = key;\n\t\t\t\tconstructor(...args) {\n\t\t\t\t\tassert.ok(args.length === expectedLength, `Code: ${key}; The provided arguments length (${args.length}) does not match the required ones (${expectedLength}).`);\n\t\t\t\t\targs.unshift(message);\n\t\t\t\t\tsuper(Reflect.apply(format, null, args));\n\t\t\t\t}\n\t\t\t\tget [\"constructor\"]() {\n\t\t\t\t\treturn Base;\n\t\t\t\t}\n\t\t\t\tget [kIsNodeError]() {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\ttoString() {\n\t\t\t\t\treturn `${this.name} [${key}]: ${this.message}`;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn NodeError;\n\t\t}\n\t}\n}\nfunction getMessage(key, parameters, self) {\n\tconst message = messages.get(key);\n\tassert.ok(message !== void 0, \"expected `message` to be found\");\n\tif (typeof message === \"function\") {\n\t\tassert.ok(message.length <= parameters.length, `Code: ${key}; The provided arguments length (${parameters.length}) does not match the required ones (${message.length}).`);\n\t\treturn Reflect.apply(message, self, parameters);\n\t}\n\tconst expectedLength = getExpectedArgumentLength(message);\n\tassert.ok(expectedLength === parameters.length, `Code: ${key}; The provided arguments length (${parameters.length}) does not match the required ones (${expectedLength}).`);\n\tif (parameters.length === 0) return message;\n\tparameters.unshift(message);\n\treturn Reflect.apply(format, null, parameters);\n}\nfunction determineSpecificType(value) {\n\tif (value === null) return \"null\";\n\telse if (value === void 0) return \"undefined\";\n\tconst type = typeof value;\n\tswitch (type) {\n\t\tcase \"bigint\": return `type bigint (${value}n)`;\n\t\tcase \"number\":\n\t\t\tif (value === 0) return 1 / value === Number.NEGATIVE_INFINITY ? \"type number (-0)\" : \"type number (0)\";\n\t\t\telse if (Number.isNaN(value)) return \"type number (NaN)\";\n\t\t\telse if (value === Number.POSITIVE_INFINITY) return \"type number (Infinity)\";\n\t\t\telse if (value === Number.NEGATIVE_INFINITY) return \"type number (-Infinity)\";\n\t\t\treturn `type number (${value})`;\n\t\tcase \"boolean\": return value ? \"type boolean (true)\" : \"type boolean (false)\";\n\t\tcase \"symbol\": return `type symbol (${String(value)})`;\n\t\tcase \"function\": return `function ${value.name}`;\n\t\tcase \"object\":\n\t\t\tif (value.constructor && value.constructor.name) return `an instance of ${value.constructor.name}`;\n\t\t\treturn `${inspect(value, { depth: -1 })}`;\n\t\tcase \"string\": {\n\t\t\tlet string = value;\n\t\t\tif (string.length > 28) string = `${string.slice(0, 25)}...`;\n\t\t\tif (!string.includes(\"'\")) return `type string ('${string}')`;\n\t\t\treturn `type string (${JSON.stringify(string)})`;\n\t\t}\n\t\tdefault: {\n\t\t\tlet inspected = inspect(value, { colors: false });\n\t\t\tif (inspected.length > 28) inspected = `${inspected.slice(0, 25)}...`;\n\t\t\treturn `type ${type} (${inspected})`;\n\t\t}\n\t}\n}\ncreateError(\"ERR_INVALID_ARG_TYPE\", (name, expected, actual) => {\n\tassert.ok(typeof name === \"string\", \"'name' must be a string\");\n\tif (!Array.isArray(expected)) expected = [expected];\n\tlet message = \"The \";\n\tif (name.endsWith(\" argument\")) message += `${name} `;\n\telse {\n\t\tconst type = name.includes(\".\") ? \"property\" : \"argument\";\n\t\tmessage += `\"${name}\" ${type} `;\n\t}\n\tmessage += \"must be \";\n\tconst types = [];\n\tconst instances = [];\n\tconst other = [];\n\tfor (const value of expected) {\n\t\tassert.ok(typeof value === \"string\", \"All expected entries have to be of type string\");\n\t\tif (kTypes.has(value)) types.push(value.toLowerCase());\n\t\telse if (classRegExp.exec(value) === null) {\n\t\t\tassert.ok(value !== \"object\", \"The value \\\"object\\\" should be written as \\\"Object\\\"\");\n\t\t\tother.push(value);\n\t\t} else instances.push(value);\n\t}\n\tif (instances.length > 0) {\n\t\tconst pos = types.indexOf(\"object\");\n\t\tif (pos !== -1) {\n\t\t\ttypes.splice(pos, 1);\n\t\t\tinstances.push(\"Object\");\n\t\t}\n\t}\n\tif (types.length > 0) {\n\t\tmessage += `${types.length > 1 ? \"one of type\" : \"of type\"} ${formatList(types, \"or\")}`;\n\t\tif (instances.length > 0 || other.length > 0) message += \" or \";\n\t}\n\tif (instances.length > 0) {\n\t\tmessage += `an instance of ${formatList(instances, \"or\")}`;\n\t\tif (other.length > 0) message += \" or \";\n\t}\n\tif (other.length > 0) if (other.length > 1) message += `one of ${formatList(other, \"or\")}`;\n\telse {\n\t\tif (other[0]?.toLowerCase() !== other[0]) message += \"an \";\n\t\tmessage += `${other[0]}`;\n\t}\n\tmessage += `. Received ${determineSpecificType(actual)}`;\n\treturn message;\n}, TypeError);\nconst ERR_INVALID_MODULE_SPECIFIER = createError(\"ERR_INVALID_MODULE_SPECIFIER\", (request, reason, base) => {\n\treturn `Invalid module \"${request}\" ${reason}${base ? ` imported from ${base}` : \"\"}`;\n}, TypeError);\nconst ERR_INVALID_PACKAGE_CONFIG = createError(\"ERR_INVALID_PACKAGE_CONFIG\", (path, base, message) => {\n\treturn `Invalid package config ${path}${base ? ` while importing ${base}` : \"\"}${message ? `. ${message}` : \"\"}`;\n}, Error);\nconst ERR_INVALID_PACKAGE_TARGET = createError(\"ERR_INVALID_PACKAGE_TARGET\", (packagePath, key, target, isImport = false, base) => {\n\tconst relatedError = typeof target === \"string\" && !isImport && target.length > 0 && !target.startsWith(\"./\");\n\tif (key === \".\") {\n\t\tassert.ok(isImport === false);\n\t\treturn `Invalid \"exports\" main target ${JSON.stringify(target)} defined in the package config ${packagePath}package.json${base ? ` imported from ${base}` : \"\"}${relatedError ? \"; targets must start with \\\"./\\\"\" : \"\"}`;\n\t}\n\treturn `Invalid \"${isImport ? \"imports\" : \"exports\"}\" target ${JSON.stringify(target)} defined for '${key}' in the package config ${packagePath}package.json${base ? ` imported from ${base}` : \"\"}${relatedError ? \"; targets must start with \\\"./\\\"\" : \"\"}`;\n}, Error);\nconst ERR_MODULE_NOT_FOUND = createError(\"ERR_MODULE_NOT_FOUND\", function(path, base, exactUrl = false) {\n\tif (exactUrl && typeof exactUrl === \"string\") this.url = `${exactUrl}`;\n\treturn `Cannot find ${exactUrl ? \"module\" : \"package\"} '${path}' imported from ${base}`;\n}, Error);\nconst ERR_PACKAGE_IMPORT_NOT_DEFINED = createError(\"ERR_PACKAGE_IMPORT_NOT_DEFINED\", (specifier, packagePath, base) => {\n\treturn `Package import specifier \"${specifier}\" is not defined${packagePath ? ` in package ${packagePath || \"\"}package.json` : \"\"} imported from ${base}`;\n}, TypeError);\nconst ERR_PACKAGE_PATH_NOT_EXPORTED = createError(\"ERR_PACKAGE_PATH_NOT_EXPORTED\", (packagePath, subpath, base) => {\n\tif (subpath === \".\") return `No \"exports\" main defined in ${packagePath}package.json${base ? ` imported from ${base}` : \"\"}`;\n\treturn `Package subpath '${subpath}' is not defined by \"exports\" in ${packagePath}package.json${base ? ` imported from ${base}` : \"\"}`;\n}, Error);\nconst ERR_UNSUPPORTED_DIR_IMPORT = createError(\"ERR_UNSUPPORTED_DIR_IMPORT\", function(path, base, exactUrl = void 0) {\n\tthis.url = exactUrl;\n\treturn `Directory import '${path}' is not supported resolving ES modules imported from ${base}`;\n}, Error);\nconst ERR_UNSUPPORTED_RESOLVE_REQUEST = createError(\"ERR_UNSUPPORTED_RESOLVE_REQUEST\", \"Failed to resolve module specifier \\\"%s\\\" from \\\"%s\\\": Invalid relative URL or base scheme is not hierarchical.\", TypeError);\nconst ERR_UNKNOWN_FILE_EXTENSION = createError(\"ERR_UNKNOWN_FILE_EXTENSION\", (extension, path) => {\n\treturn `Unknown file extension \"${extension}\" for ${path}`;\n}, TypeError);\ncreateError(\"ERR_INVALID_ARG_VALUE\", (name, value, reason = \"is invalid\") => {\n\tlet inspected = inspect(value);\n\tif (inspected.length > 128) inspected = `${inspected.slice(0, 128)}...`;\n\treturn `The ${name.includes(\".\") ? \"property\" : \"argument\"} '${name}' ${reason}. Received ${inspected}`;\n}, TypeError);\nconst hasOwnProperty$1 = {}.hasOwnProperty;\nconst cache = /* @__PURE__ */ new Map();\nfunction read(jsonPath, { base, specifier }) {\n\tconst existing = cache.get(jsonPath);\n\tif (existing) return existing;\n\tlet string;\n\ttry {\n\t\tstring = fs.readFileSync(path.toNamespacedPath(jsonPath), \"utf8\");\n\t} catch (error) {\n\t\tconst exception = error;\n\t\tif (exception.code !== \"ENOENT\") throw exception;\n\t}\n\tconst result = {\n\t\texists: false,\n\t\tpjsonPath: jsonPath,\n\t\tmain: void 0,\n\t\tname: void 0,\n\t\ttype: \"none\",\n\t\texports: void 0,\n\t\timports: void 0\n\t};\n\tif (string !== void 0) {\n\t\tlet parsed;\n\t\ttry {\n\t\t\tparsed = JSON.parse(string);\n\t\t} catch (error_) {\n\t\t\tconst error = new ERR_INVALID_PACKAGE_CONFIG(jsonPath, (base ? `\"${specifier}\" from ` : \"\") + fileURLToPath(base || specifier), error_.message);\n\t\t\terror.cause = error_;\n\t\t\tthrow error;\n\t\t}\n\t\tresult.exists = true;\n\t\tif (hasOwnProperty$1.call(parsed, \"name\") && typeof parsed.name === \"string\") result.name = parsed.name;\n\t\tif (hasOwnProperty$1.call(parsed, \"main\") && typeof parsed.main === \"string\") result.main = parsed.main;\n\t\tif (hasOwnProperty$1.call(parsed, \"exports\")) result.exports = parsed.exports;\n\t\tif (hasOwnProperty$1.call(parsed, \"imports\")) result.imports = parsed.imports;\n\t\tif (hasOwnProperty$1.call(parsed, \"type\") && (parsed.type === \"commonjs\" || parsed.type === \"module\")) result.type = parsed.type;\n\t}\n\tcache.set(jsonPath, result);\n\treturn result;\n}\nfunction getPackageScopeConfig(resolved) {\n\tlet packageJSONUrl = new URL(\"package.json\", resolved);\n\twhile (true) {\n\t\tif (packageJSONUrl.pathname.endsWith(\"node_modules/package.json\")) break;\n\t\tconst packageConfig = read(fileURLToPath(packageJSONUrl), { specifier: resolved });\n\t\tif (packageConfig.exists) return packageConfig;\n\t\tconst lastPackageJSONUrl = packageJSONUrl;\n\t\tpackageJSONUrl = new URL(\"../package.json\", packageJSONUrl);\n\t\tif (packageJSONUrl.pathname === lastPackageJSONUrl.pathname) break;\n\t}\n\treturn {\n\t\tpjsonPath: fileURLToPath(packageJSONUrl),\n\t\texists: false,\n\t\ttype: \"none\"\n\t};\n}\nconst hasOwnProperty = {}.hasOwnProperty;\nconst extensionFormatMap = {\n\t__proto__: null,\n\t\".json\": \"json\",\n\t\".cjs\": \"commonjs\",\n\t\".cts\": \"commonjs\",\n\t\".js\": \"module\",\n\t\".ts\": \"module\",\n\t\".mts\": \"module\",\n\t\".mjs\": \"module\"\n};\nconst protocolHandlers = {\n\t__proto__: null,\n\t\"data:\": getDataProtocolModuleFormat,\n\t\"file:\": getFileProtocolModuleFormat,\n\t\"node:\": () => \"builtin\"\n};\nfunction mimeToFormat(mime) {\n\tif (mime && /^\\s*(text|application)\\/javascript\\s*(;\\s*charset=utf-?8\\s*)?$/i.test(mime)) return \"module\";\n\tif (mime === \"application/json\") return \"json\";\n\treturn null;\n}\nfunction getDataProtocolModuleFormat(parsed) {\n\tconst { 1: mime } = /^([^/]+\\/[^;,]+)(?:[^,]*?)(;base64)?,/.exec(parsed.pathname) || [\n\t\tnull,\n\t\tnull,\n\t\tnull\n\t];\n\treturn mimeToFormat(mime);\n}\nconst DOT_CODE = 46;\nconst SLASH_CODE = 47;\nfunction extname(url) {\n\tconst pathname = url.pathname;\n\tfor (let i = pathname.length - 1; i > 0; i--) switch (pathname.charCodeAt(i)) {\n\t\tcase SLASH_CODE: return \"\";\n\t\tcase DOT_CODE: return pathname.charCodeAt(i - 1) === SLASH_CODE ? \"\" : pathname.slice(i);\n\t}\n\treturn \"\";\n}\nfunction getFileProtocolModuleFormat(url, _context, ignoreErrors) {\n\tconst ext = extname(url);\n\tif (ext === \".js\") {\n\t\tconst { type: packageType } = getPackageScopeConfig(url);\n\t\tif (packageType !== \"none\") return packageType;\n\t\treturn \"commonjs\";\n\t}\n\tif (ext === \"\") {\n\t\tconst { type: packageType } = getPackageScopeConfig(url);\n\t\tif (packageType === \"module\") return \"module\";\n\t\tif (packageType !== \"none\") return packageType;\n\t\treturn \"commonjs\";\n\t}\n\tconst format = extensionFormatMap[ext];\n\tif (format) return format;\n\tif (ignoreErrors) return;\n\tthrow new ERR_UNKNOWN_FILE_EXTENSION(ext, fileURLToPath(url));\n}\nfunction defaultGetFormatWithoutErrors(url, context) {\n\tconst protocol = url.protocol;\n\tif (!hasOwnProperty.call(protocolHandlers, protocol)) return null;\n\treturn protocolHandlers[protocol](url, context, true) || null;\n}\nconst RegExpPrototypeSymbolReplace = RegExp.prototype[Symbol.replace];\nconst own = {}.hasOwnProperty;\nconst invalidSegmentRegEx = /(^|\\\\|\\/)((\\.|%2e)(\\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))?(\\\\|\\/|$)/i;\nconst deprecatedInvalidSegmentRegEx = /(^|\\\\|\\/)((\\.|%2e)(\\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))(\\\\|\\/|$)/i;\nconst invalidPackageNameRegEx = /^\\.|%|\\\\/;\nconst patternRegEx = /\\*/g;\nconst encodedSeparatorRegEx = /%2f|%5c/i;\nconst emittedPackageWarnings = /* @__PURE__ */ new Set();\nconst doubleSlashRegEx = /[/\\\\]{2}/;\nfunction emitInvalidSegmentDeprecation(target, request, match, packageJsonUrl, internal, base, isTarget) {\n\tif (process$1.noDeprecation) return;\n\tconst pjsonPath = fileURLToPath(packageJsonUrl);\n\tconst double = doubleSlashRegEx.exec(isTarget ? target : request) !== null;\n\tprocess$1.emitWarning(`Use of deprecated ${double ? \"double slash\" : \"leading or trailing slash matching\"} resolving \"${target}\" for module request \"${request}\" ${request === match ? \"\" : `matched to \"${match}\" `}in the \"${internal ? \"imports\" : \"exports\"}\" field module resolution of the package at ${pjsonPath}${base ? ` imported from ${fileURLToPath(base)}` : \"\"}.`, \"DeprecationWarning\", \"DEP0166\");\n}\nfunction emitLegacyIndexDeprecation(url, packageJsonUrl, base, main) {\n\tif (process$1.noDeprecation) return;\n\tif (defaultGetFormatWithoutErrors(url, { parentURL: base.href }) !== \"module\") return;\n\tconst urlPath = fileURLToPath(url.href);\n\tconst packagePath = fileURLToPath(new URL$1(\".\", packageJsonUrl));\n\tconst basePath = fileURLToPath(base);\n\tif (!main) process$1.emitWarning(`No \"main\" or \"exports\" field defined in the package.json for ${packagePath} resolving the main entry point \"${urlPath.slice(packagePath.length)}\", imported from ${basePath}.\\nDefault \"index\" lookups for the main are deprecated for ES modules.`, \"DeprecationWarning\", \"DEP0151\");\n\telse if (path.resolve(packagePath, main) !== urlPath) process$1.emitWarning(`Package ${packagePath} has a \"main\" field set to \"${main}\", excluding the full filename and extension to the resolved file at \"${urlPath.slice(packagePath.length)}\", imported from ${basePath}.\\n Automatic extension resolution of the \"main\" field is deprecated for ES modules.`, \"DeprecationWarning\", \"DEP0151\");\n}\nfunction tryStatSync(path) {\n\ttry {\n\t\treturn statSync(path);\n\t} catch {}\n}\nfunction fileExists(url) {\n\tconst stats = statSync(url, { throwIfNoEntry: false });\n\tconst isFile = stats ? stats.isFile() : void 0;\n\treturn isFile === null || isFile === void 0 ? false : isFile;\n}\nfunction legacyMainResolve(packageJsonUrl, packageConfig, base) {\n\tlet guess;\n\tif (packageConfig.main !== void 0) {\n\t\tguess = new URL$1(packageConfig.main, packageJsonUrl);\n\t\tif (fileExists(guess)) return guess;\n\t\tconst tries = [\n\t\t\t`./${packageConfig.main}.js`,\n\t\t\t`./${packageConfig.main}.json`,\n\t\t\t`./${packageConfig.main}.node`,\n\t\t\t`./${packageConfig.main}/index.js`,\n\t\t\t`./${packageConfig.main}/index.json`,\n\t\t\t`./${packageConfig.main}/index.node`\n\t\t];\n\t\tlet i = -1;\n\t\twhile (++i < tries.length) {\n\t\t\tguess = new URL$1(tries[i], packageJsonUrl);\n\t\t\tif (fileExists(guess)) break;\n\t\t\tguess = void 0;\n\t\t}\n\t\tif (guess) {\n\t\t\temitLegacyIndexDeprecation(guess, packageJsonUrl, base, packageConfig.main);\n\t\t\treturn guess;\n\t\t}\n\t}\n\tconst tries = [\n\t\t\"./index.js\",\n\t\t\"./index.json\",\n\t\t\"./index.node\"\n\t];\n\tlet i = -1;\n\twhile (++i < tries.length) {\n\t\tguess = new URL$1(tries[i], packageJsonUrl);\n\t\tif (fileExists(guess)) break;\n\t\tguess = void 0;\n\t}\n\tif (guess) {\n\t\temitLegacyIndexDeprecation(guess, packageJsonUrl, base, packageConfig.main);\n\t\treturn guess;\n\t}\n\tthrow new ERR_MODULE_NOT_FOUND(fileURLToPath(new URL$1(\".\", packageJsonUrl)), fileURLToPath(base));\n}\nfunction finalizeResolution(resolved, base, preserveSymlinks) {\n\tif (encodedSeparatorRegEx.exec(resolved.pathname) !== null) throw new ERR_INVALID_MODULE_SPECIFIER(resolved.pathname, String.raw`must not include encoded \"/\" or \"\\\" characters`, fileURLToPath(base));\n\tlet filePath;\n\ttry {\n\t\tfilePath = fileURLToPath(resolved);\n\t} catch (error) {\n\t\tObject.defineProperty(error, \"input\", { value: String(resolved) });\n\t\tObject.defineProperty(error, \"module\", { value: String(base) });\n\t\tthrow error;\n\t}\n\tconst stats = tryStatSync(filePath.endsWith(\"/\") ? filePath.slice(-1) : filePath);\n\tif (stats && stats.isDirectory()) {\n\t\tconst error = new ERR_UNSUPPORTED_DIR_IMPORT(filePath, fileURLToPath(base));\n\t\terror.url = String(resolved);\n\t\tthrow error;\n\t}\n\tif (!stats || !stats.isFile()) {\n\t\tconst error = new ERR_MODULE_NOT_FOUND(filePath || resolved.pathname, base && fileURLToPath(base), true);\n\t\terror.url = String(resolved);\n\t\tthrow error;\n\t}\n\tif (!preserveSymlinks) {\n\t\tconst real = realpathSync(filePath);\n\t\tconst { search, hash } = resolved;\n\t\tresolved = pathToFileURL(real + (filePath.endsWith(path.sep) ? \"/\" : \"\"));\n\t\tresolved.search = search;\n\t\tresolved.hash = hash;\n\t}\n\treturn resolved;\n}\nfunction importNotDefined(specifier, packageJsonUrl, base) {\n\treturn new ERR_PACKAGE_IMPORT_NOT_DEFINED(specifier, packageJsonUrl && fileURLToPath(new URL$1(\".\", packageJsonUrl)), fileURLToPath(base));\n}\nfunction exportsNotFound(subpath, packageJsonUrl, base) {\n\treturn new ERR_PACKAGE_PATH_NOT_EXPORTED(fileURLToPath(new URL$1(\".\", packageJsonUrl)), subpath, base && fileURLToPath(base));\n}\nfunction throwInvalidSubpath(request, match, packageJsonUrl, internal, base) {\n\tthrow new ERR_INVALID_MODULE_SPECIFIER(request, `request is not a valid match in pattern \"${match}\" for the \"${internal ? \"imports\" : \"exports\"}\" resolution of ${fileURLToPath(packageJsonUrl)}`, base && fileURLToPath(base));\n}\nfunction invalidPackageTarget(subpath, target, packageJsonUrl, internal, base) {\n\ttarget = typeof target === \"object\" && target !== null ? JSON.stringify(target, null, \"\") : `${target}`;\n\treturn new ERR_INVALID_PACKAGE_TARGET(fileURLToPath(new URL$1(\".\", packageJsonUrl)), subpath, target, internal, base && fileURLToPath(base));\n}\nfunction resolvePackageTargetString(target, subpath, match, packageJsonUrl, base, pattern, internal, isPathMap, conditions) {\n\tif (subpath !== \"\" && !pattern && target.at(-1) !== \"/\") throw invalidPackageTarget(match, target, packageJsonUrl, internal, base);\n\tif (!target.startsWith(\"./\")) {\n\t\tif (internal && !target.startsWith(\"../\") && !target.startsWith(\"/\")) {\n\t\t\tlet isURL = false;\n\t\t\ttry {\n\t\t\t\tnew URL$1(target);\n\t\t\t\tisURL = true;\n\t\t\t} catch {}\n\t\t\tif (!isURL) return packageResolve(pattern ? RegExpPrototypeSymbolReplace.call(patternRegEx, target, () => subpath) : target + subpath, packageJsonUrl, conditions);\n\t\t}\n\t\tthrow invalidPackageTarget(match, target, packageJsonUrl, internal, base);\n\t}\n\tif (invalidSegmentRegEx.exec(target.slice(2)) !== null) if (deprecatedInvalidSegmentRegEx.exec(target.slice(2)) === null) {\n\t\tif (!isPathMap) {\n\t\t\tconst request = pattern ? match.replace(\"*\", () => subpath) : match + subpath;\n\t\t\temitInvalidSegmentDeprecation(pattern ? RegExpPrototypeSymbolReplace.call(patternRegEx, target, () => subpath) : target, request, match, packageJsonUrl, internal, base, true);\n\t\t}\n\t} else throw invalidPackageTarget(match, target, packageJsonUrl, internal, base);\n\tconst resolved = new URL$1(target, packageJsonUrl);\n\tconst resolvedPath = resolved.pathname;\n\tconst packagePath = new URL$1(\".\", packageJsonUrl).pathname;\n\tif (!resolvedPath.startsWith(packagePath)) throw invalidPackageTarget(match, target, packageJsonUrl, internal, base);\n\tif (subpath === \"\") return resolved;\n\tif (invalidSegmentRegEx.exec(subpath) !== null) {\n\t\tconst request = pattern ? match.replace(\"*\", () => subpath) : match + subpath;\n\t\tif (deprecatedInvalidSegmentRegEx.exec(subpath) === null) {\n\t\t\tif (!isPathMap) emitInvalidSegmentDeprecation(pattern ? RegExpPrototypeSymbolReplace.call(patternRegEx, target, () => subpath) : target, request, match, packageJsonUrl, internal, base, false);\n\t\t} else throwInvalidSubpath(request, match, packageJsonUrl, internal, base);\n\t}\n\tif (pattern) return new URL$1(RegExpPrototypeSymbolReplace.call(patternRegEx, resolved.href, () => subpath));\n\treturn new URL$1(subpath, resolved);\n}\nfunction isArrayIndex(key) {\n\tconst keyNumber = Number(key);\n\tif (`${keyNumber}` !== key) return false;\n\treturn keyNumber >= 0 && keyNumber < 4294967295;\n}\nfunction resolvePackageTarget(packageJsonUrl, target, subpath, packageSubpath, base, pattern, internal, isPathMap, conditions) {\n\tif (typeof target === \"string\") return resolvePackageTargetString(target, subpath, packageSubpath, packageJsonUrl, base, pattern, internal, isPathMap, conditions);\n\tif (Array.isArray(target)) {\n\t\tconst targetList = target;\n\t\tif (targetList.length === 0) return null;\n\t\tlet lastException;\n\t\tlet i = -1;\n\t\twhile (++i < targetList.length) {\n\t\t\tconst targetItem = targetList[i];\n\t\t\tlet resolveResult;\n\t\t\ttry {\n\t\t\t\tresolveResult = resolvePackageTarget(packageJsonUrl, targetItem, subpath, packageSubpath, base, pattern, internal, isPathMap, conditions);\n\t\t\t} catch (error) {\n\t\t\t\tconst exception = error;\n\t\t\t\tlastException = exception;\n\t\t\t\tif (exception.code === \"ERR_INVALID_PACKAGE_TARGET\") continue;\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t\tif (resolveResult === void 0) continue;\n\t\t\tif (resolveResult === null) {\n\t\t\t\tlastException = null;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\treturn resolveResult;\n\t\t}\n\t\tif (lastException === void 0 || lastException === null) return lastException;\n\t\tthrow lastException;\n\t}\n\tif (typeof target === \"object\" && target !== null) {\n\t\tconst keys = Object.getOwnPropertyNames(target);\n\t\tlet i = -1;\n\t\twhile (++i < keys.length) {\n\t\t\tconst key = keys[i];\n\t\t\tif (isArrayIndex(key)) throw new ERR_INVALID_PACKAGE_CONFIG(fileURLToPath(packageJsonUrl), fileURLToPath(base), \"\\\"exports\\\" cannot contain numeric property keys.\");\n\t\t}\n\t\ti = -1;\n\t\twhile (++i < keys.length) {\n\t\t\tconst key = keys[i];\n\t\t\tif (key === \"default\" || conditions && conditions.has(key)) {\n\t\t\t\tconst conditionalTarget = target[key];\n\t\t\t\tconst resolveResult = resolvePackageTarget(packageJsonUrl, conditionalTarget, subpath, packageSubpath, base, pattern, internal, isPathMap, conditions);\n\t\t\t\tif (resolveResult === void 0) continue;\n\t\t\t\treturn resolveResult;\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}\n\tif (target === null) return null;\n\tthrow invalidPackageTarget(packageSubpath, target, packageJsonUrl, internal, base);\n}\nfunction isConditionalExportsMainSugar(exports, packageJsonUrl, base) {\n\tif (typeof exports === \"string\" || Array.isArray(exports)) return true;\n\tif (typeof exports !== \"object\" || exports === null) return false;\n\tconst keys = Object.getOwnPropertyNames(exports);\n\tlet isConditionalSugar = false;\n\tlet i = 0;\n\tlet keyIndex = -1;\n\twhile (++keyIndex < keys.length) {\n\t\tconst key = keys[keyIndex];\n\t\tconst currentIsConditionalSugar = key === \"\" || key[0] !== \".\";\n\t\tif (i++ === 0) isConditionalSugar = currentIsConditionalSugar;\n\t\telse if (isConditionalSugar !== currentIsConditionalSugar) throw new ERR_INVALID_PACKAGE_CONFIG(fileURLToPath(packageJsonUrl), fileURLToPath(base), \"\\\"exports\\\" cannot contain some keys starting with '.' and some not. The exports object must either be an object of package subpath keys or an object of main entry condition name keys only.\");\n\t}\n\treturn isConditionalSugar;\n}\nfunction emitTrailingSlashPatternDeprecation(match, pjsonUrl, base) {\n\tif (process$1.noDeprecation) return;\n\tconst pjsonPath = fileURLToPath(pjsonUrl);\n\tif (emittedPackageWarnings.has(pjsonPath + \"|\" + match)) return;\n\temittedPackageWarnings.add(pjsonPath + \"|\" + match);\n\tprocess$1.emitWarning(`Use of deprecated trailing slash pattern mapping \"${match}\" in the \"exports\" field module resolution of the package at ${pjsonPath}${base ? ` imported from ${fileURLToPath(base)}` : \"\"}. Mapping specifiers ending in \"/\" is no longer supported.`, \"DeprecationWarning\", \"DEP0155\");\n}\nfunction packageExportsResolve(packageJsonUrl, packageSubpath, packageConfig, base, conditions) {\n\tlet exports = packageConfig.exports;\n\tif (isConditionalExportsMainSugar(exports, packageJsonUrl, base)) exports = { \".\": exports };\n\tif (own.call(exports, packageSubpath) && !packageSubpath.includes(\"*\") && !packageSubpath.endsWith(\"/\")) {\n\t\tconst target = exports[packageSubpath];\n\t\tconst resolveResult = resolvePackageTarget(packageJsonUrl, target, \"\", packageSubpath, base, false, false, false, conditions);\n\t\tif (resolveResult === null || resolveResult === void 0) throw exportsNotFound(packageSubpath, packageJsonUrl, base);\n\t\treturn resolveResult;\n\t}\n\tlet bestMatch = \"\";\n\tlet bestMatchSubpath = \"\";\n\tconst keys = Object.getOwnPropertyNames(exports);\n\tlet i = -1;\n\twhile (++i < keys.length) {\n\t\tconst key = keys[i];\n\t\tconst patternIndex = key.indexOf(\"*\");\n\t\tif (patternIndex !== -1 && packageSubpath.startsWith(key.slice(0, patternIndex))) {\n\t\t\tif (packageSubpath.endsWith(\"/\")) emitTrailingSlashPatternDeprecation(packageSubpath, packageJsonUrl, base);\n\t\t\tconst patternTrailer = key.slice(patternIndex + 1);\n\t\t\tif (packageSubpath.length >= key.length && packageSubpath.endsWith(patternTrailer) && patternKeyCompare(bestMatch, key) === 1 && key.lastIndexOf(\"*\") === patternIndex) {\n\t\t\t\tbestMatch = key;\n\t\t\t\tbestMatchSubpath = packageSubpath.slice(patternIndex, packageSubpath.length - patternTrailer.length);\n\t\t\t}\n\t\t}\n\t}\n\tif (bestMatch) {\n\t\tconst target = exports[bestMatch];\n\t\tconst resolveResult = resolvePackageTarget(packageJsonUrl, target, bestMatchSubpath, bestMatch, base, true, false, packageSubpath.endsWith(\"/\"), conditions);\n\t\tif (resolveResult === null || resolveResult === void 0) throw exportsNotFound(packageSubpath, packageJsonUrl, base);\n\t\treturn resolveResult;\n\t}\n\tthrow exportsNotFound(packageSubpath, packageJsonUrl, base);\n}\nfunction patternKeyCompare(a, b) {\n\tconst aPatternIndex = a.indexOf(\"*\");\n\tconst bPatternIndex = b.indexOf(\"*\");\n\tconst baseLengthA = aPatternIndex === -1 ? a.length : aPatternIndex + 1;\n\tconst baseLengthB = bPatternIndex === -1 ? b.length : bPatternIndex + 1;\n\tif (baseLengthA > baseLengthB) return -1;\n\tif (baseLengthB > baseLengthA) return 1;\n\tif (aPatternIndex === -1) return 1;\n\tif (bPatternIndex === -1) return -1;\n\tif (a.length > b.length) return -1;\n\tif (b.length > a.length) return 1;\n\treturn 0;\n}\nfunction packageImportsResolve(name, base, conditions) {\n\tif (name === \"#\" || name.endsWith(\"/\")) throw new ERR_INVALID_MODULE_SPECIFIER(name, \"is not a valid internal imports specifier name\", fileURLToPath(base));\n\tlet packageJsonUrl;\n\tconst packageConfig = getPackageScopeConfig(base);\n\tif (packageConfig.exists) {\n\t\tpackageJsonUrl = pathToFileURL(packageConfig.pjsonPath);\n\t\tconst imports = packageConfig.imports;\n\t\tif (imports) if (own.call(imports, name) && !name.includes(\"*\")) {\n\t\t\tconst resolveResult = resolvePackageTarget(packageJsonUrl, imports[name], \"\", name, base, false, true, false, conditions);\n\t\t\tif (resolveResult !== null && resolveResult !== void 0) return resolveResult;\n\t\t} else {\n\t\t\tlet bestMatch = \"\";\n\t\t\tlet bestMatchSubpath = \"\";\n\t\t\tconst keys = Object.getOwnPropertyNames(imports);\n\t\t\tlet i = -1;\n\t\t\twhile (++i < keys.length) {\n\t\t\t\tconst key = keys[i];\n\t\t\t\tconst patternIndex = key.indexOf(\"*\");\n\t\t\t\tif (patternIndex !== -1 && name.startsWith(key.slice(0, patternIndex))) {\n\t\t\t\t\tconst patternTrailer = key.slice(patternIndex + 1);\n\t\t\t\t\tif (name.length >= key.length && name.endsWith(patternTrailer) && patternKeyCompare(bestMatch, key) === 1 && key.lastIndexOf(\"*\") === patternIndex) {\n\t\t\t\t\t\tbestMatch = key;\n\t\t\t\t\t\tbestMatchSubpath = name.slice(patternIndex, name.length - patternTrailer.length);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (bestMatch) {\n\t\t\t\tconst target = imports[bestMatch];\n\t\t\t\tconst resolveResult = resolvePackageTarget(packageJsonUrl, target, bestMatchSubpath, bestMatch, base, true, true, false, conditions);\n\t\t\t\tif (resolveResult !== null && resolveResult !== void 0) return resolveResult;\n\t\t\t}\n\t\t}\n\t}\n\tthrow importNotDefined(name, packageJsonUrl, base);\n}\nfunction parsePackageName(specifier, base) {\n\tlet separatorIndex = specifier.indexOf(\"/\");\n\tlet validPackageName = true;\n\tlet isScoped = false;\n\tif (specifier[0] === \"@\") {\n\t\tisScoped = true;\n\t\tif (separatorIndex === -1 || specifier.length === 0) validPackageName = false;\n\t\telse separatorIndex = specifier.indexOf(\"/\", separatorIndex + 1);\n\t}\n\tconst packageName = separatorIndex === -1 ? specifier : specifier.slice(0, separatorIndex);\n\tif (invalidPackageNameRegEx.exec(packageName) !== null) validPackageName = false;\n\tif (!validPackageName) throw new ERR_INVALID_MODULE_SPECIFIER(specifier, \"is not a valid package name\", fileURLToPath(base));\n\treturn {\n\t\tpackageName,\n\t\tpackageSubpath: \".\" + (separatorIndex === -1 ? \"\" : specifier.slice(separatorIndex)),\n\t\tisScoped\n\t};\n}\nfunction packageResolve(specifier, base, conditions) {\n\tif (nodeBuiltins.includes(specifier)) return new URL$1(\"node:\" + specifier);\n\tconst { packageName, packageSubpath, isScoped } = parsePackageName(specifier, base);\n\tconst packageConfig = getPackageScopeConfig(base);\n\tif (packageConfig.exists && packageConfig.name === packageName && packageConfig.exports !== void 0 && packageConfig.exports !== null) return packageExportsResolve(pathToFileURL(packageConfig.pjsonPath), packageSubpath, packageConfig, base, conditions);\n\tlet packageJsonUrl = new URL$1(\"./node_modules/\" + packageName + \"/package.json\", base);\n\tlet packageJsonPath = fileURLToPath(packageJsonUrl);\n\tlet lastPath;\n\tdo {\n\t\tconst stat = tryStatSync(packageJsonPath.slice(0, -13));\n\t\tif (!stat || !stat.isDirectory()) {\n\t\t\tlastPath = packageJsonPath;\n\t\t\tpackageJsonUrl = new URL$1((isScoped ? \"../../../../node_modules/\" : \"../../../node_modules/\") + packageName + \"/package.json\", packageJsonUrl);\n\t\t\tpackageJsonPath = fileURLToPath(packageJsonUrl);\n\t\t\tcontinue;\n\t\t}\n\t\tconst packageConfig = read(packageJsonPath, {\n\t\t\tbase,\n\t\t\tspecifier\n\t\t});\n\t\tif (packageConfig.exports !== void 0 && packageConfig.exports !== null) return packageExportsResolve(packageJsonUrl, packageSubpath, packageConfig, base, conditions);\n\t\tif (packageSubpath === \".\") return legacyMainResolve(packageJsonUrl, packageConfig, base);\n\t\treturn new URL$1(packageSubpath, packageJsonUrl);\n\t} while (packageJsonPath.length !== lastPath.length);\n\tthrow new ERR_MODULE_NOT_FOUND(packageName, fileURLToPath(base), false);\n}\nfunction isRelativeSpecifier(specifier) {\n\tif (specifier[0] === \".\") {\n\t\tif (specifier.length === 1 || specifier[1] === \"/\") return true;\n\t\tif (specifier[1] === \".\" && (specifier.length === 2 || specifier[2] === \"/\")) return true;\n\t}\n\treturn false;\n}\nfunction shouldBeTreatedAsRelativeOrAbsolutePath(specifier) {\n\tif (specifier === \"\") return false;\n\tif (specifier[0] === \"/\") return true;\n\treturn isRelativeSpecifier(specifier);\n}\nfunction moduleResolve(specifier, base, conditions, preserveSymlinks) {\n\tconst protocol = base.protocol;\n\tconst isData = protocol === \"data:\";\n\tlet resolved;\n\tif (shouldBeTreatedAsRelativeOrAbsolutePath(specifier)) try {\n\t\tresolved = new URL$1(specifier, base);\n\t} catch (error_) {\n\t\tconst error = new ERR_UNSUPPORTED_RESOLVE_REQUEST(specifier, base);\n\t\terror.cause = error_;\n\t\tthrow error;\n\t}\n\telse if (protocol === \"file:\" && specifier[0] === \"#\") resolved = packageImportsResolve(specifier, base, conditions);\n\telse try {\n\t\tresolved = new URL$1(specifier);\n\t} catch (error_) {\n\t\tif (isData && !nodeBuiltins.includes(specifier)) {\n\t\t\tconst error = new ERR_UNSUPPORTED_RESOLVE_REQUEST(specifier, base);\n\t\t\terror.cause = error_;\n\t\t\tthrow error;\n\t\t}\n\t\tresolved = packageResolve(specifier, base, conditions);\n\t}\n\tassert.ok(resolved !== void 0, \"expected to be defined\");\n\tif (resolved.protocol !== \"file:\") return resolved;\n\treturn finalizeResolution(resolved, base, preserveSymlinks);\n}\nconst DEFAULT_CONDITIONS_SET = /* #__PURE__ */ new Set([\"node\", \"import\"]);\nconst DEFAULT_CONDITIONS_KEY = \"2:6:import4:node\";\nconst isWindows = /* #__PURE__ */ (() => process.platform === \"win32\")();\nconst globalCache = /* #__PURE__ */ (() => globalThis[\"__EXSOLVE_CACHE__\"] ||= /* @__PURE__ */ new Map())();\nfunction resolveModuleURL(input, options) {\n\tconst parsedInput = _parseInput(input);\n\tif (\"external\" in parsedInput) return parsedInput.external;\n\tconst specifier = parsedInput.specifier;\n\tlet url = parsedInput.url;\n\tlet absolutePath = parsedInput.absolutePath;\n\tlet cacheKey;\n\tlet cacheObj;\n\tif (options?.cache !== false) {\n\t\tcacheKey = _cacheKey(absolutePath || specifier, options);\n\t\tcacheObj = options?.cache && typeof options?.cache === \"object\" ? options.cache : globalCache;\n\t}\n\tif (cacheObj) {\n\t\tconst cached = cacheObj.get(cacheKey);\n\t\tif (typeof cached === \"string\") return cached;\n\t\tif (cached instanceof Error) {\n\t\t\tif (options?.try) return;\n\t\t\tthrow cached;\n\t\t}\n\t}\n\tif (absolutePath) try {\n\t\tconst stat = lstatSync(absolutePath);\n\t\tif (stat.isSymbolicLink()) {\n\t\t\tabsolutePath = realpathSync(absolutePath);\n\t\t\turl = pathToFileURL(absolutePath);\n\t\t}\n\t\tif (stat.isFile()) {\n\t\t\tif (cacheObj) cacheObj.set(cacheKey, url.href);\n\t\t\treturn url.href;\n\t\t}\n\t} catch (error) {\n\t\tif (error?.code !== \"ENOENT\") {\n\t\t\tif (cacheObj) cacheObj.set(cacheKey, error);\n\t\t\tthrow error;\n\t\t}\n\t}\n\tconst conditionsSet = options?.conditions ? new Set(options.conditions) : DEFAULT_CONDITIONS_SET;\n\tconst target = specifier || url.href;\n\tconst bases = _normalizeBases(options?.from);\n\tconst suffixes = options?.suffixes || [\"\"];\n\tconst extensions = options?.extensions ? [\"\", ...options.extensions] : [\"\"];\n\tlet resolved;\n\tfor (const base of bases) {\n\t\tfor (const suffix of suffixes) {\n\t\t\tlet name = _join(target, suffix);\n\t\t\tif (name === \".\") name += \"/.\";\n\t\t\tfor (const extension of extensions) {\n\t\t\t\tresolved = _tryModuleResolve(name + extension, base, conditionsSet);\n\t\t\t\tif (resolved) break;\n\t\t\t}\n\t\t\tif (resolved) break;\n\t\t}\n\t\tif (resolved) break;\n\t}\n\tif (!resolved) {\n\t\tconst error = /* @__PURE__ */ new Error(`Cannot resolve module \"${input}\" (from: ${bases.map((u) => _fmtPath(u)).join(\", \")})`);\n\t\terror.code = \"ERR_MODULE_NOT_FOUND\";\n\t\tif (cacheObj) cacheObj.set(cacheKey, error);\n\t\tif (options?.try) return;\n\t\tthrow error;\n\t}\n\tif (cacheObj) cacheObj.set(cacheKey, resolved.href);\n\treturn resolved.href;\n}\nfunction resolveModulePath(id, options) {\n\tconst resolved = resolveModuleURL(id, options);\n\tif (!resolved) return;\n\tif (!resolved.startsWith(\"file://\") && options?.try) return;\n\tconst absolutePath = fileURLToPath(resolved);\n\treturn isWindows ? _normalizeWinPath(absolutePath) : absolutePath;\n}\nfunction createResolver(defaults) {\n\tif (defaults?.from) defaults = {\n\t\t...defaults,\n\t\tfrom: _normalizeBases(defaults?.from)\n\t};\n\treturn {\n\t\tresolveModuleURL: (id, opts) => resolveModuleURL(id, {\n\t\t\t...defaults,\n\t\t\t...opts\n\t\t}),\n\t\tresolveModulePath: (id, opts) => resolveModulePath(id, {\n\t\t\t...defaults,\n\t\t\t...opts\n\t\t}),\n\t\tclearResolveCache: () => {\n\t\t\tif (defaults?.cache !== false) if (defaults?.cache && typeof defaults?.cache === \"object\") defaults.cache.clear();\n\t\t\telse globalCache.clear();\n\t\t}\n\t};\n}\nfunction clearResolveCache() {\n\tglobalCache.clear();\n}\nfunction _tryModuleResolve(specifier, base, conditions) {\n\ttry {\n\t\treturn moduleResolve(specifier, base, conditions);\n\t} catch {}\n}\nfunction _normalizeBases(inputs) {\n\tconst urls = (Array.isArray(inputs) ? inputs : [inputs]).flatMap((input) => _normalizeBase(input));\n\tif (urls.length === 0) return [pathToFileURL(\"./\")];\n\treturn urls;\n}\nfunction _normalizeBase(input) {\n\tif (!input) return [];\n\tif (_isURL(input)) return [input];\n\tif (typeof input !== \"string\") return [];\n\tif (/^(?:node|data|http|https|file):/.test(input)) return new URL(input);\n\ttry {\n\t\tif (input.endsWith(\"/\") || statSync(input).isDirectory()) return pathToFileURL(input + \"/\");\n\t\treturn pathToFileURL(input);\n\t} catch {\n\t\treturn [pathToFileURL(input + \"/\"), pathToFileURL(input)];\n\t}\n}\nfunction _fmtPath(input) {\n\ttry {\n\t\treturn fileURLToPath(input);\n\t} catch {\n\t\treturn input;\n\t}\n}\nfunction _cacheKey(id, options) {\n\tlet from;\n\tif (Array.isArray(options?.from)) from = options.from;\n\telse if (options?.from) from = [options.from];\n\treturn _cacheKeyValues([id]) + _conditionsKey(options?.conditions) + _cacheKeyValues(options?.extensions) + _cacheKeyValues(from) + _cacheKeyValues(options?.suffixes);\n}\nfunction _conditionsKey(conditions) {\n\tif (!conditions) return DEFAULT_CONDITIONS_KEY;\n\treturn _cacheKeyValues([...new Set(conditions)].sort());\n}\nfunction _cacheKeyValues(values) {\n\tif (!values) return \"-\";\n\tlet key = `${values.length}:`;\n\tfor (const value of values) {\n\t\tconst stringValue = String(value);\n\t\tkey += `${stringValue.length}:${stringValue}`;\n\t}\n\treturn key;\n}\nfunction _join(a, b) {\n\tif (!a || !b || b === \"/\") return a;\n\treturn (a.endsWith(\"/\") ? a : a + \"/\") + (b.startsWith(\"/\") ? b.slice(1) : b);\n}\nfunction _normalizeWinPath(path) {\n\treturn path.replace(/\\\\/g, \"/\").replace(/^[a-z]:\\//, (r) => r.toUpperCase());\n}\nfunction _isURL(input) {\n\treturn input instanceof URL || input?.constructor?.name === \"URL\";\n}\nfunction _parseInput(input) {\n\tif (typeof input === \"string\") {\n\t\tif (input.startsWith(\"file:\")) {\n\t\t\tconst url = new URL(input);\n\t\t\treturn {\n\t\t\t\turl,\n\t\t\t\tabsolutePath: fileURLToPath(url)\n\t\t\t};\n\t\t}\n\t\tif (isAbsolute(input)) return {\n\t\t\turl: pathToFileURL(input),\n\t\t\tabsolutePath: input\n\t\t};\n\t\tif (/^(?:node|data|http|https):/.test(input)) return { external: input };\n\t\tif (nodeBuiltins.includes(input) && !input.includes(\":\")) return { external: `node:${input}` };\n\t\treturn { specifier: input };\n\t}\n\tif (_isURL(input)) {\n\t\tif (input.protocol === \"file:\") return {\n\t\t\turl: input,\n\t\t\tabsolutePath: fileURLToPath(input)\n\t\t};\n\t\treturn { external: input.href };\n\t}\n\tthrow new TypeError(\"id must be a `string` or `URL`\");\n}\nexport { clearResolveCache, createResolver, resolveModulePath, resolveModuleURL };\n","//#region node_modules/.pnpm/flat@6.0.1/node_modules/flat/index.js\nfunction isBuffer(obj) {\n\treturn obj && obj.constructor && typeof obj.constructor.isBuffer === \"function\" && obj.constructor.isBuffer(obj);\n}\nfunction keyIdentity(key) {\n\treturn key;\n}\nfunction flatten(target, opts) {\n\topts = opts || {};\n\tconst delimiter = opts.delimiter || \".\";\n\tconst maxDepth = opts.maxDepth;\n\tconst transformKey = opts.transformKey || keyIdentity;\n\tconst output = {};\n\tfunction step(object, prev, currentDepth) {\n\t\tcurrentDepth = currentDepth || 1;\n\t\tObject.keys(object).forEach(function(key) {\n\t\t\tconst value = object[key];\n\t\t\tconst isarray = opts.safe && Array.isArray(value);\n\t\t\tconst type = Object.prototype.toString.call(value);\n\t\t\tconst isbuffer = isBuffer(value);\n\t\t\tconst isobject = type === \"[object Object]\" || type === \"[object Array]\";\n\t\t\tconst newKey = prev ? prev + delimiter + transformKey(key) : transformKey(key);\n\t\t\tif (!isarray && !isbuffer && isobject && Object.keys(value).length && (!opts.maxDepth || currentDepth < maxDepth)) return step(value, newKey, currentDepth + 1);\n\t\t\toutput[newKey] = value;\n\t\t});\n\t}\n\tstep(target);\n\treturn output;\n}\nfunction unflatten(target, opts) {\n\topts = opts || {};\n\tconst delimiter = opts.delimiter || \".\";\n\tconst overwrite = opts.overwrite || false;\n\tconst transformKey = opts.transformKey || keyIdentity;\n\tconst result = {};\n\tif (isBuffer(target) || Object.prototype.toString.call(target) !== \"[object Object]\") return target;\n\tfunction getkey(key) {\n\t\tconst parsedKey = Number(key);\n\t\treturn isNaN(parsedKey) || key.indexOf(\".\") !== -1 || opts.object ? key : parsedKey;\n\t}\n\tfunction addKeys(keyPrefix, recipient, target) {\n\t\treturn Object.keys(target).reduce(function(result, key) {\n\t\t\tresult[keyPrefix + delimiter + key] = target[key];\n\t\t\treturn result;\n\t\t}, recipient);\n\t}\n\tfunction isEmpty(val) {\n\t\tconst type = Object.prototype.toString.call(val);\n\t\tconst isArray = type === \"[object Array]\";\n\t\tconst isObject = type === \"[object Object]\";\n\t\tif (!val) return true;\n\t\telse if (isArray) return !val.length;\n\t\telse if (isObject) return !Object.keys(val).length;\n\t}\n\ttarget = Object.keys(target).reduce(function(result, key) {\n\t\tconst type = Object.prototype.toString.call(target[key]);\n\t\tif (!(type === \"[object Object]\" || type === \"[object Array]\") || isEmpty(target[key])) {\n\t\t\tresult[key] = target[key];\n\t\t\treturn result;\n\t\t} else return addKeys(key, result, flatten(target[key], opts));\n\t}, {});\n\tObject.keys(target).forEach(function(key) {\n\t\tconst split = key.split(delimiter).map(transformKey);\n\t\tlet key1 = getkey(split.shift());\n\t\tlet key2 = getkey(split[0]);\n\t\tlet recipient = result;\n\t\twhile (key2 !== void 0) {\n\t\t\tif (key1 === \"__proto__\") return;\n\t\t\tconst type = Object.prototype.toString.call(recipient[key1]);\n\t\t\tconst isobject = type === \"[object Object]\" || type === \"[object Array]\";\n\t\t\tif (!overwrite && !isobject && typeof recipient[key1] !== \"undefined\") return;\n\t\t\tif (overwrite && !isobject || !overwrite && recipient[key1] == null) recipient[key1] = typeof key2 === \"number\" && !opts.object ? [] : {};\n\t\t\trecipient = recipient[key1];\n\t\t\tif (split.length > 0) {\n\t\t\t\tkey1 = getkey(split.shift());\n\t\t\t\tkey2 = getkey(split[0]);\n\t\t\t}\n\t\t}\n\t\trecipient[key1] = unflatten(target[key], opts);\n\t});\n\treturn result;\n}\n//#endregion\nexport { unflatten as n, flatten as t };\n","const suspectProtoRx = /\"(?:_|\\\\u0{2}5[Ff]){2}(?:p|\\\\u0{2}70)(?:r|\\\\u0{2}72)(?:o|\\\\u0{2}6[Ff])(?:t|\\\\u0{2}74)(?:o|\\\\u0{2}6[Ff])(?:_|\\\\u0{2}5[Ff]){2}\"\\s*:/;\nconst suspectConstructorRx = /\"(?:c|\\\\u0063)(?:o|\\\\u006[Ff])(?:n|\\\\u006[Ee])(?:s|\\\\u0073)(?:t|\\\\u0074)(?:r|\\\\u0072)(?:u|\\\\u0075)(?:c|\\\\u0063)(?:t|\\\\u0074)(?:o|\\\\u006[Ff])(?:r|\\\\u0072)\"\\s*:/;\nconst JsonSigRx = /^\\s*[\"[{]|^\\s*-?\\d{1,16}(\\.\\d{1,17})?([Ee][+-]?\\d+)?\\s*$/;\nfunction jsonParseTransform(key, value) {\n if (key === \"__proto__\" || key === \"constructor\" && value && typeof value === \"object\" && \"prototype\" in value) {\n warnKeyDropped(key);\n return;\n }\n return value;\n}\nfunction warnKeyDropped(key) {\n console.warn(`[destr] Dropping \"${key}\" key to prevent prototype pollution.`);\n}\nfunction destr(value, options = {}) {\n if (typeof value !== \"string\") {\n return value;\n }\n if (value[0] === '\"' && value[value.length - 1] === '\"' && value.indexOf(\"\\\\\") === -1) {\n return value.slice(1, -1);\n }\n const _value = value.trim();\n if (_value.length <= 9) {\n switch (_value.toLowerCase()) {\n case \"true\": {\n return true;\n }\n case \"false\": {\n return false;\n }\n case \"undefined\": {\n return void 0;\n }\n case \"null\": {\n return null;\n }\n case \"nan\": {\n return Number.NaN;\n }\n case \"infinity\": {\n return Number.POSITIVE_INFINITY;\n }\n case \"-infinity\": {\n return Number.NEGATIVE_INFINITY;\n }\n }\n }\n if (!JsonSigRx.test(value)) {\n if (options.strict) {\n throw new SyntaxError(\"[destr] Invalid JSON\");\n }\n return value;\n }\n try {\n if (suspectProtoRx.test(value) || suspectConstructorRx.test(value)) {\n if (options.strict) {\n throw new Error(\"[destr] Possible prototype pollution\");\n }\n return JSON.parse(value, jsonParseTransform);\n }\n return JSON.parse(value);\n } catch (error) {\n if (options.strict) {\n throw error;\n }\n return value;\n }\n}\nfunction safeDestr(value, options = {}) {\n return destr(value, { ...options, strict: true });\n}\n\nexport { destr as default, destr, safeDestr };\n","import { n as unflatten, t as flatten } from \"./_chunks/libs/flat.mjs\";\nimport { existsSync, readFileSync, writeFileSync } from \"node:fs\";\nimport { resolve } from \"node:path\";\nimport { homedir } from \"node:os\";\nimport destr from \"destr\";\nimport { defu } from \"defu\";\n//#region src/index.ts\nconst RE_KEY_VAL = /^\\s*([^\\s=]+)\\s*=\\s*(.*)?\\s*$/;\nconst RE_LINES = /\\n|\\r|\\r\\n/;\n/**\n* The default options for the configuration file.\n*/\nconst defaults = {\n\tname: \".conf\",\n\tdir: process.cwd(),\n\tflat: false\n};\nfunction withDefaults(options) {\n\tif (typeof options === \"string\") options = { name: options };\n\treturn {\n\t\t...defaults,\n\t\t...options\n\t};\n}\nfunction parse(contents, options = {}) {\n\tconst config = {};\n\tconst lines = contents.split(RE_LINES);\n\tfor (const line of lines) {\n\t\tconst match = line.match(RE_KEY_VAL);\n\t\tif (!match) continue;\n\t\tconst key = match[1];\n\t\tif (!key || key === \"__proto__\" || key === \"constructor\") continue;\n\t\tconst value = destr((match[2] || \"\").trim());\n\t\tif (key.endsWith(\"[]\")) {\n\t\t\tconst nkey = key.slice(0, Math.max(0, key.length - 2));\n\t\t\tconfig[nkey] = (config[nkey] || []).concat(value);\n\t\t\tcontinue;\n\t\t}\n\t\tconfig[key] = value;\n\t}\n\treturn options.flat ? config : unflatten(config, { overwrite: true });\n}\n/**\n* Parses a configuration string into an object.\n* @param {string} contents - The configuration data as a raw string.\n* @param {RCOptions} [options={}] - Options to control the parsing behaviour. See {@link RCOptions}.\n* @returns {RC} - The parsed configuration object. See {@link RC}.\n*/\nfunction parseFile(path, options) {\n\tif (!existsSync(path)) return {};\n\treturn parse(readFileSync(path, \"utf8\"), options);\n}\n/**\n* Reads a configuration file from a default or specified location and parses its contents.\n* @param {RCOptions|string} [options] - Options for reading the configuration file, or the name of the configuration file. See {@link RCOptions}.\n* @returns {RC} - The parsed configuration object. See {@link RC}.\n*/\nfunction read(options) {\n\toptions = withDefaults(options);\n\treturn parseFile(resolve(options.dir, options.name), options);\n}\n/**\n* Reads a custom configuration file from a default or specified location and parses its contents.\n* @param {RCOptions|string} [options] - Options for reading the configuration file, or the name of the configuration file. See {@link RCOptions}.\n* @returns {RC} - The parsed configuration object.\n* @deprecated Use {@link readUserConfig} instead, which uses `~/.config` following XDG conventions.\n*/\nfunction readUser(options) {\n\toptions = withDefaults(options);\n\toptions.dir = process.env.XDG_CONFIG_HOME || homedir();\n\treturn read(options);\n}\n/**\n* Serialises a configuration object to a string format.\n* @param {RC} config - The configuration object to serialise. See {@link RC}.\n* @returns {string} - The serialised configuration string.\n*/\nfunction serialize(config) {\n\treturn Object.entries(flatten(config)).map(([key, value]) => `${key}=${JSON.stringify(value)}`).join(\"\\n\");\n}\n/**\n* Writes a configuration object to a file in a default or specified location.\n* @param {RC} config - The configuration object to write. See {@link RC}.\n* @param {RCOptions|string} [options] - Options for writing the configuration file, or the name of the configuration file. See {@link RCOptions}.\n*/\nfunction write(config, options) {\n\toptions = withDefaults(options);\n\twriteFileSync(resolve(options.dir, options.name), serialize(config), { encoding: \"utf8\" });\n}\n/**\n* Writes a custom configuration object to a file in a default or specified location.\n* @param {RC} config - The configuration object to write. See {@link RC}.\n* @param {RCOptions|string} [options] - Options for writing the configuration file, or the name of the configuration file. See {@link RCOptions}.\n* @deprecated Use {@link writeUserConfig} instead, which uses `~/.config` following XDG conventions.\n*/\nfunction writeUser(config, options) {\n\toptions = withDefaults(options);\n\toptions.dir = process.env.XDG_CONFIG_HOME || homedir();\n\twrite(config, options);\n}\n/**\n* Reads a configuration file from `$XDG_CONFIG_HOME` or `$HOME/.config` and parses its contents.\n* @param {RCOptions|string} [options] - Options for reading the configuration file, or the name of the configuration file. See {@link RCOptions}.\n* @returns {RC} - The parsed configuration object.\n*/\nfunction readUserConfig(options) {\n\toptions = withDefaults(options);\n\toptions.dir = process.env.XDG_CONFIG_HOME || resolve(homedir(), \".config\");\n\treturn read(options);\n}\n/**\n* Writes a configuration object to a file in `$XDG_CONFIG_HOME` or `$HOME/.config`.\n* @param {RC} config - The configuration object to write. See {@link RC}.\n* @param {RCOptions|string} [options] - Options for writing the configuration file, or the name of the configuration file. See {@link RCOptions}.\n*/\nfunction writeUserConfig(config, options) {\n\toptions = withDefaults(options);\n\toptions.dir = process.env.XDG_CONFIG_HOME || resolve(homedir(), \".config\");\n\twrite(config, options);\n}\n/**\n* Updates a configuration object in `$XDG_CONFIG_HOME` or `$HOME/.config` by merging and writing the result.\n* @param {RC} config - The configuration object to update. See {@link RC}.\n* @param {RCOptions|string} [options] - Options for updating the configuration file, or the name of the configuration file. See {@link RCOptions}.\n* @returns {RC} - The updated configuration object.\n*/\nfunction updateUserConfig(config, options) {\n\toptions = withDefaults(options);\n\toptions.dir = process.env.XDG_CONFIG_HOME || resolve(homedir(), \".config\");\n\treturn update(config, options);\n}\n/**\n* Updates an existing configuration object by merging it with the contents of a configuration file and writing the result.\n* @param {RC} config - The configuration object to update. See {@link RC}.\n* @param {RCOptions|string} [options] - Options for updating the configuration file, or the name of the configuration file. See {@link RCOptions}.\n* @returns {RC} - The updated configuration object. See {@link RC}.\n*/\nfunction update(config, options) {\n\toptions = withDefaults(options);\n\tif (!options.flat) config = unflatten(config, { overwrite: true });\n\tconst newConfig = defu(config, read(options));\n\twrite(newConfig, options);\n\treturn newConfig;\n}\n/**\n* Updates a custom configuration object by merging it with the contents of a configuration file in a default location and writing the result.\n* @param {RC} config - The configuration object to update. See {@link RC}.\n* @param {RCOptions|string} [options] - Options for updating the configuration file, or the name of the configuration file. See {@link RCOptions}.\n* @returns {RC} - The updated configuration object. See {@link RC}.\n* @deprecated Use {@link updateUserConfig} instead, which uses `~/.config` following XDG conventions.\n*/\nfunction updateUser(config, options) {\n\toptions = withDefaults(options);\n\toptions.dir = process.env.XDG_CONFIG_HOME || homedir();\n\treturn update(config, options);\n}\n//#endregion\nexport { defaults, parse, parseFile, read, readUser, readUserConfig, serialize, update, updateUser, updateUserConfig, write, writeUser, writeUserConfig };\n","import{n as e,t}from\"./_format.mjs\";function n(t,n){let r=JSON.parse(t,n?.reviver);return e(t,r,n),r}function r(e,n){let r=t(e,n),i=JSON.stringify(e,n?.replacer,r.indent);return r.whitespace.start+i+r.whitespace.end}export{r as n,n as t};","import { promises, statSync } from \"node:fs\";\nimport { dirname, isAbsolute, join, normalize, resolve } from \"pathe\";\nimport { parseJSON, parseJSON5, parseJSONC, parseYAML, stringifyJSON, stringifyJSON5, stringifyJSONC, stringifyYAML } from \"confbox\";\nimport { resolveModulePath } from \"exsolve\";\nimport { fileURLToPath } from \"node:url\";\nimport { readFile, writeFile } from \"node:fs/promises\";\nimport { parseINI, stringifyINI } from \"confbox/ini\";\nconst defaultFindOptions = {\n\tstartingFrom: \".\",\n\trootPattern: /^node_modules$/,\n\treverse: false,\n\ttest: (filePath) => {\n\t\ttry {\n\t\t\tif (statSync(filePath).isFile()) return true;\n\t\t} catch {}\n\t}\n};\nasync function findFile(filename, _options = {}) {\n\tconst filenames = Array.isArray(filename) ? filename : [filename];\n\tconst options = {\n\t\t...defaultFindOptions,\n\t\t..._options\n\t};\n\tconst basePath = resolve(options.startingFrom);\n\tconst leadingSlash = basePath[0] === \"/\";\n\tconst segments = basePath.split(\"/\").filter(Boolean);\n\tif (filenames.includes(segments.at(-1)) && await options.test(basePath)) return basePath;\n\tif (leadingSlash) segments[0] = \"/\" + segments[0];\n\tlet root = segments.findIndex((r) => r.match(options.rootPattern));\n\tif (root === -1) root = 0;\n\tif (options.reverse) for (let index = root + 1; index <= segments.length; index++) for (const filename of filenames) {\n\t\tconst filePath = join(...segments.slice(0, index), filename);\n\t\tif (await options.test(filePath)) return filePath;\n\t}\n\telse for (let index = segments.length; index > root; index--) for (const filename of filenames) {\n\t\tconst filePath = join(...segments.slice(0, index), filename);\n\t\tif (await options.test(filePath)) return filePath;\n\t}\n\tthrow new Error(`Cannot find matching ${filename} in ${options.startingFrom} or parent directories`);\n}\nfunction findNearestFile(filename, options = {}) {\n\treturn findFile(filename, options);\n}\nfunction findFarthestFile(filename, options = {}) {\n\treturn findFile(filename, {\n\t\t...options,\n\t\treverse: true\n\t});\n}\nfunction _resolvePath(id, opts = {}) {\n\tif (id instanceof URL || id.startsWith(\"file://\")) return normalize(fileURLToPath(id));\n\tif (isAbsolute(id)) return normalize(id);\n\treturn resolveModulePath(id, {\n\t\t...opts,\n\t\tfrom: opts.from || opts.parent || opts.url\n\t});\n}\nconst FileCache$1 = /* @__PURE__ */ new Map();\nfunction defineTSConfig(tsconfig) {\n\treturn tsconfig;\n}\nasync function readTSConfig(id, options = {}) {\n\tconst resolvedPath = await resolveTSConfig(id, options);\n\tconst cache = options.cache && typeof options.cache !== \"boolean\" ? options.cache : FileCache$1;\n\tif (options.cache && cache.has(resolvedPath)) return cache.get(resolvedPath);\n\tconst parsed = parseJSONC(await promises.readFile(resolvedPath, \"utf8\"));\n\tcache.set(resolvedPath, parsed);\n\treturn parsed;\n}\nasync function writeTSConfig(path, tsconfig) {\n\tawait promises.writeFile(path, stringifyJSONC(tsconfig));\n}\nasync function resolveTSConfig(id = process.cwd(), options = {}) {\n\treturn findNearestFile(\"tsconfig.json\", {\n\t\t...options,\n\t\tstartingFrom: _resolvePath(id, options)\n\t});\n}\nconst lockFiles = [\n\t\"yarn.lock\",\n\t\"package-lock.json\",\n\t\"pnpm-lock.yaml\",\n\t\"npm-shrinkwrap.json\",\n\t\"bun.lockb\",\n\t\"bun.lock\",\n\t\"deno.lock\"\n];\nconst packageFiles = [\n\t\"package.json\",\n\t\"package.json5\",\n\t\"package.yaml\"\n];\nconst workspaceFiles = [\n\t\"pnpm-workspace.yaml\",\n\t\"lerna.json\",\n\t\"turbo.json\",\n\t\"rush.json\",\n\t\"deno.json\",\n\t\"deno.jsonc\"\n];\nconst FileCache = /* @__PURE__ */ new Map();\nfunction definePackageJSON(pkg) {\n\treturn pkg;\n}\nasync function findPackage(id = process.cwd(), options = {}) {\n\treturn findNearestFile(packageFiles, {\n\t\t...options,\n\t\tstartingFrom: _resolvePath(id, options)\n\t});\n}\nasync function readPackage(id, options = {}) {\n\tconst resolvedPath = await findPackage(id, options);\n\tconst cache = options.cache && typeof options.cache !== \"boolean\" ? options.cache : FileCache;\n\tif (options.cache && cache.has(resolvedPath)) return cache.get(resolvedPath);\n\tconst blob = await promises.readFile(resolvedPath, \"utf8\");\n\tlet parsed;\n\tif (resolvedPath.endsWith(\".json5\")) parsed = parseJSON5(blob);\n\telse if (resolvedPath.endsWith(\".yaml\")) parsed = parseYAML(blob);\n\telse try {\n\t\tparsed = parseJSON(blob);\n\t} catch {\n\t\tparsed = parseJSONC(blob);\n\t}\n\tcache.set(resolvedPath, parsed);\n\treturn parsed;\n}\nasync function writePackage(path, pkg) {\n\tlet content;\n\tif (path.endsWith(\".json5\")) content = stringifyJSON5(pkg);\n\telse if (path.endsWith(\".yaml\")) content = stringifyYAML(pkg);\n\telse content = stringifyJSON(pkg);\n\tawait promises.writeFile(path, content);\n}\nasync function readPackageJSON(id, options = {}) {\n\tconst resolvedPath = await resolvePackageJSON(id, options);\n\tconst cache = options.cache && typeof options.cache !== \"boolean\" ? options.cache : FileCache;\n\tif (options.cache && cache.has(resolvedPath)) return cache.get(resolvedPath);\n\tconst blob = await promises.readFile(resolvedPath, \"utf8\");\n\tlet parsed;\n\ttry {\n\t\tparsed = parseJSON(blob);\n\t} catch {\n\t\tparsed = parseJSONC(blob);\n\t}\n\tcache.set(resolvedPath, parsed);\n\treturn parsed;\n}\nasync function writePackageJSON(path, pkg) {\n\tawait promises.writeFile(path, stringifyJSON(pkg));\n}\nasync function resolvePackageJSON(id = process.cwd(), options = {}) {\n\treturn findNearestFile(\"package.json\", {\n\t\t...options,\n\t\tstartingFrom: _resolvePath(id, options)\n\t});\n}\nasync function resolveLockfile(id = process.cwd(), options = {}) {\n\treturn findNearestFile(lockFiles, {\n\t\t...options,\n\t\tstartingFrom: _resolvePath(id, options)\n\t});\n}\nconst workspaceTests = {\n\tworkspaceFile: (opts) => findFile(workspaceFiles, opts).then((r) => dirname(r)),\n\tgitConfig: (opts) => findFile(\".git/config\", opts).then((r) => resolve(r, \"../..\")),\n\tlockFile: (opts) => findFile(lockFiles, opts).then((r) => dirname(r)),\n\tpackageJson: (opts) => findFile(packageFiles, opts).then((r) => dirname(r))\n};\nasync function findWorkspaceDir(id = process.cwd(), options = {}) {\n\tconst startingFrom = _resolvePath(id, options);\n\tconst tests = options.tests || [\n\t\t\"workspaceFile\",\n\t\t\"gitConfig\",\n\t\t\"lockFile\",\n\t\t\"packageJson\"\n\t];\n\tfor (const testName of tests) {\n\t\tconst test = workspaceTests[testName];\n\t\tif (options[testName] === false || !test) continue;\n\t\tconst direction = options[testName] || (testName === \"gitConfig\" ? \"closest\" : \"furthest\");\n\t\tconst detected = await test({\n\t\t\t...options,\n\t\t\tstartingFrom,\n\t\t\treverse: direction === \"furthest\"\n\t\t}).catch(() => {});\n\t\tif (detected) return detected;\n\t}\n\tthrow new Error(`Cannot detect workspace root from ${id}`);\n}\nasync function updatePackage(id, callback, options = {}) {\n\tconst resolvedPath = await findPackage(id, options);\n\tconst pkg = await readPackage(id, options);\n\tawait writePackage(resolvedPath, await callback(new Proxy(pkg, { get(target, prop) {\n\t\tif (typeof prop === \"string\" && objectKeys.has(prop) && !Object.hasOwn(target, prop)) target[prop] = {};\n\t\treturn Reflect.get(target, prop);\n\t} })) || pkg);\n}\nfunction sortPackage(pkg) {\n\tconst sorted = {};\n\tconst originalKeys = Object.keys(pkg);\n\tconst knownKeysPresent = defaultFieldOrder.filter((key) => Object.hasOwn(pkg, key));\n\tfor (const key of originalKeys) {\n\t\tconst currentIndex = knownKeysPresent.indexOf(key);\n\t\tif (currentIndex === -1) {\n\t\t\tsorted[key] = pkg[key];\n\t\t\tcontinue;\n\t\t}\n\t\tfor (let i = 0; i <= currentIndex; i++) {\n\t\t\tconst knownKey = knownKeysPresent[i];\n\t\t\tif (!Object.hasOwn(sorted, knownKey)) sorted[knownKey] = pkg[knownKey];\n\t\t}\n\t}\n\tfor (const key of [...dependencyKeys, \"scripts\"]) {\n\t\tconst value = sorted[key];\n\t\tif (isObject(value)) sorted[key] = sortObject(value);\n\t}\n\treturn sorted;\n}\nfunction normalizePackage(pkg) {\n\tconst normalized = sortPackage(pkg);\n\tfor (const key of dependencyKeys) {\n\t\tif (!Object.hasOwn(normalized, key)) continue;\n\t\tconst value = normalized[key];\n\t\tif (!isObject(value)) delete normalized[key];\n\t}\n\treturn normalized;\n}\nfunction isObject(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\nfunction sortObject(obj) {\n\treturn Object.fromEntries(Object.entries(obj).sort(([a], [b]) => a.localeCompare(b)));\n}\nconst dependencyKeys = [\n\t\"dependencies\",\n\t\"devDependencies\",\n\t\"optionalDependencies\",\n\t\"peerDependencies\"\n];\nconst objectKeys = new Set([\n\t\"typesVersions\",\n\t\"scripts\",\n\t\"resolutions\",\n\t\"overrides\",\n\t\"dependencies\",\n\t\"devDependencies\",\n\t\"dependenciesMeta\",\n\t\"peerDependencies\",\n\t\"peerDependenciesMeta\",\n\t\"optionalDependencies\",\n\t\"engines\",\n\t\"publishConfig\"\n]);\nconst defaultFieldOrder = [\n\t\"$schema\",\n\t\"name\",\n\t\"version\",\n\t\"private\",\n\t\"description\",\n\t\"keywords\",\n\t\"homepage\",\n\t\"bugs\",\n\t\"repository\",\n\t\"funding\",\n\t\"license\",\n\t\"author\",\n\t\"sideEffects\",\n\t\"type\",\n\t\"imports\",\n\t\"exports\",\n\t\"main\",\n\t\"module\",\n\t\"browser\",\n\t\"types\",\n\t\"typesVersions\",\n\t\"typings\",\n\t\"bin\",\n\t\"man\",\n\t\"files\",\n\t\"workspaces\",\n\t\"scripts\",\n\t\"resolutions\",\n\t\"overrides\",\n\t\"dependencies\",\n\t\"devDependencies\",\n\t\"dependenciesMeta\",\n\t\"peerDependencies\",\n\t\"peerDependenciesMeta\",\n\t\"optionalDependencies\",\n\t\"bundledDependencies\",\n\t\"bundleDependencies\",\n\t\"packageManager\",\n\t\"engines\",\n\t\"publishConfig\"\n];\nfunction defineGitConfig(config) {\n\treturn config;\n}\nasync function resolveGitConfig(dir, opts) {\n\treturn findNearestFile(\".git/config\", {\n\t\t...opts,\n\t\tstartingFrom: dir\n\t});\n}\nasync function readGitConfig(dir, opts) {\n\treturn parseGitConfig(await readFile(await resolveGitConfig(dir, opts), \"utf8\"));\n}\nasync function writeGitConfig(path, config) {\n\tawait writeFile(path, stringifyGitConfig(config));\n}\nfunction parseGitConfig(ini) {\n\treturn parseINI(ini.replaceAll(/^\\[(\\w+) \"(.+)\"\\]$/gm, \"[$1.$2]\"));\n}\nfunction stringifyGitConfig(config) {\n\treturn stringifyINI(config).replaceAll(/^\\[(\\w+)\\.(\\w+)\\]$/gm, \"[$1 \\\"$2\\\"]\");\n}\nexport { defineGitConfig, definePackageJSON, defineTSConfig, findFarthestFile, findFile, findNearestFile, findPackage, findWorkspaceDir, normalizePackage, parseGitConfig, readGitConfig, readPackage, readPackageJSON, readTSConfig, resolveGitConfig, resolveLockfile, resolvePackageJSON, resolveTSConfig, sortPackage, stringifyGitConfig, updatePackage, writeGitConfig, writePackage, writePackageJSON, writeTSConfig };\n","import { t as debounce } from \"./_chunks/libs/perfect-debounce.mjs\";\nimport { existsSync, readFileSync, statSync } from \"node:fs\";\nimport * as nodeUtil from \"node:util\";\nimport { basename, dirname, extname, join, normalize, resolve } from \"pathe\";\nimport { readFile, rm } from \"node:fs/promises\";\nimport { pathToFileURL } from \"node:url\";\nimport { homedir } from \"node:os\";\nimport { resolveModulePath } from \"exsolve\";\nimport * as rc9 from \"rc9\";\nimport { defu } from \"defu\";\nimport { findWorkspaceDir, readPackageJSON } from \"pkg-types\";\nasync function setupDotenv(options) {\n\tconst targetEnvironment = options.env ?? process.env;\n\tconst environment = await loadDotenv({\n\t\tcwd: options.cwd,\n\t\tfileName: options.fileName ?? \".env\",\n\t\tenv: targetEnvironment,\n\t\tinterpolate: options.interpolate ?? true,\n\t\texpandFileReferences: options.expandFileReferences ?? false\n\t});\n\tconst dotenvVars = getDotEnvVars(targetEnvironment);\n\tfor (const key in environment) {\n\t\tif (key.startsWith(\"_\")) continue;\n\t\tif (targetEnvironment[key] === void 0 || dotenvVars.has(key)) targetEnvironment[key] = environment[key];\n\t}\n\treturn environment;\n}\nasync function loadDotenv(options) {\n\tconst environment = Object.create(null);\n\tconst cwd = resolve(options.cwd || \".\");\n\tconst _fileName = options.fileName || \".env\";\n\tconst dotenvFiles = typeof _fileName === \"string\" ? [_fileName] : _fileName;\n\tconst dotenvVars = getDotEnvVars(options.env || {});\n\tObject.assign(environment, options.env);\n\tfor (const file of dotenvFiles) {\n\t\tconst dotenvFile = resolve(cwd, file);\n\t\tif (!statSync(dotenvFile, { throwIfNoEntry: false })?.isFile()) continue;\n\t\tconst parsed = await readEnvFile(dotenvFile);\n\t\tfor (const key in parsed) {\n\t\t\tif (key in environment && !dotenvVars.has(key)) continue;\n\t\t\tenvironment[key] = parsed[key];\n\t\t\tdotenvVars.add(key);\n\t\t}\n\t}\n\tif (options.expandFileReferences) {\n\t\tfor (const key in environment) if (key.endsWith(\"_FILE\")) {\n\t\t\tconst targetKey = key.slice(0, -5);\n\t\t\tif (environment[targetKey] === void 0) {\n\t\t\t\tconst filePath = environment[key];\n\t\t\t\tif (filePath && statSync(filePath, { throwIfNoEntry: false })?.isFile()) {\n\t\t\t\t\tenvironment[targetKey] = readFileSync(filePath, \"utf8\").trim();\n\t\t\t\t\tdotenvVars.add(targetKey);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tif (options.interpolate) interpolate(environment);\n\treturn environment;\n}\nlet _parseEnv = nodeUtil.parseEnv;\nasync function readEnvFile(path) {\n\tconst src = readFileSync(path, \"utf8\");\n\tif (!_parseEnv) try {\n\t\tconst dotenv = await import(\"dotenv\");\n\t\t_parseEnv = (src) => dotenv.parse(src);\n\t} catch {\n\t\tthrow new Error(\"Failed to parse .env file: `node:util.parseEnv` is not available and `dotenv` package is not installed. Please upgrade your runtime or install `dotenv` as a dependency.\");\n\t}\n\treturn _parseEnv(src);\n}\nfunction interpolate(target, source = {}, parse = (v) => v) {\n\tfunction getValue(key) {\n\t\treturn source[key] === void 0 ? target[key] : source[key];\n\t}\n\tfunction interpolate(value, parents = []) {\n\t\tif (typeof value !== \"string\") return value;\n\t\treturn parse((value.match(/(.?\\${?(?:[\\w:]+)?}?)/g) || []).reduce((newValue, match) => {\n\t\t\tconst parts = /(.?)\\${?([\\w:]+)?}?/g.exec(match) || [];\n\t\t\tconst prefix = parts[1];\n\t\t\tlet value, replacePart;\n\t\t\tif (prefix === \"\\\\\") {\n\t\t\t\treplacePart = parts[0] || \"\";\n\t\t\t\tvalue = replacePart.replace(String.raw`\\$`, \"$\");\n\t\t\t} else {\n\t\t\t\tconst key = parts[2];\n\t\t\t\treplacePart = (parts[0] || \"\").slice(prefix.length);\n\t\t\t\tif (parents.includes(key)) {\n\t\t\t\t\tconsole.warn(`Please avoid recursive environment variables ( loop: ${parents.join(\" > \")} > ${key} )`);\n\t\t\t\t\treturn \"\";\n\t\t\t\t}\n\t\t\t\tvalue = getValue(key);\n\t\t\t\tvalue = interpolate(value, [...parents, key]);\n\t\t\t}\n\t\t\treturn value === void 0 ? newValue : newValue.replace(replacePart, value);\n\t\t}, value));\n\t}\n\tfor (const key in target) target[key] = interpolate(getValue(key));\n}\nfunction getDotEnvVars(targetEnvironment) {\n\tconst globalRegistry = globalThis.__c12_dotenv_vars__ ||= /* @__PURE__ */ new Map();\n\tif (!globalRegistry.has(targetEnvironment)) globalRegistry.set(targetEnvironment, /* @__PURE__ */ new Set());\n\treturn globalRegistry.get(targetEnvironment);\n}\nconst _normalize = (p) => p?.replace(/\\\\/g, \"/\");\nlet importCounter = 0;\nconst ASYNC_LOADERS = {\n\t\".yaml\": () => import(\"confbox/yaml\").then((r) => r.parseYAML),\n\t\".yml\": () => import(\"confbox/yaml\").then((r) => r.parseYAML),\n\t\".jsonc\": () => import(\"confbox/jsonc\").then((r) => r.parseJSONC),\n\t\".json5\": () => import(\"confbox/json5\").then((r) => r.parseJSON5),\n\t\".toml\": () => import(\"confbox/toml\").then((r) => r.parseTOML)\n};\nconst SUPPORTED_EXTENSIONS = Object.freeze([\n\t\".js\",\n\t\".ts\",\n\t\".mjs\",\n\t\".cjs\",\n\t\".mts\",\n\t\".cts\",\n\t\".json\",\n\t\".jsonc\",\n\t\".json5\",\n\t\".yaml\",\n\t\".yml\",\n\t\".toml\"\n]);\nasync function loadConfig(options) {\n\toptions.cwd = resolve(process.cwd(), options.cwd || \".\");\n\toptions.name = options.name || \"config\";\n\toptions.envName = options.envName ?? process.env.NODE_ENV;\n\toptions.configFile = options.configFile ?? (options.name === \"config\" ? \"config\" : `${options.name}.config`);\n\toptions.rcFile = options.rcFile ?? `.${options.name}rc`;\n\tif (options.extend !== false) options.extend = {\n\t\textendKey: \"extends\",\n\t\t...options.extend\n\t};\n\tconst _merger = options.merger || defu;\n\tconst r = {\n\t\tconfig: {},\n\t\tcwd: options.cwd,\n\t\tconfigFile: resolve(options.cwd, options.configFile),\n\t\tlayers: [],\n\t\t_configFile: void 0\n\t};\n\tconst rawConfigs = {\n\t\toverrides: options.overrides,\n\t\tmain: void 0,\n\t\trc: void 0,\n\t\tpackageJson: void 0,\n\t\tdefaultConfig: options.defaultConfig\n\t};\n\tif (options.dotenv) await setupDotenv({\n\t\tcwd: options.cwd,\n\t\t...options.dotenv === true ? {} : options.dotenv\n\t});\n\tconst _mainConfig = await resolveConfig(\".\", options);\n\tif (_mainConfig.configFile) {\n\t\trawConfigs.main = _mainConfig.config;\n\t\tr.configFile = _mainConfig.configFile;\n\t\tr._configFile = _mainConfig._configFile;\n\t}\n\tif (_mainConfig.meta) r.meta = _mainConfig.meta;\n\tif (options.rcFile) {\n\t\tconst rcSources = [];\n\t\trcSources.push(rc9.read({\n\t\t\tname: options.rcFile,\n\t\t\tdir: options.cwd\n\t\t}));\n\t\tif (options.globalRc) {\n\t\t\tconst workspaceDir = await findWorkspaceDir(options.cwd).catch(() => {});\n\t\t\tif (workspaceDir) rcSources.push(rc9.read({\n\t\t\t\tname: options.rcFile,\n\t\t\t\tdir: workspaceDir\n\t\t\t}));\n\t\t\trcSources.push(rc9.readUser({\n\t\t\t\tname: options.rcFile,\n\t\t\t\tdir: options.cwd\n\t\t\t}));\n\t\t}\n\t\trawConfigs.rc = _merger({}, ...rcSources);\n\t}\n\tif (options.packageJson) {\n\t\tconst keys = (Array.isArray(options.packageJson) ? options.packageJson : [typeof options.packageJson === \"string\" ? options.packageJson : options.name]).filter((t) => t && typeof t === \"string\");\n\t\tconst pkgJsonFile = await readPackageJSON(options.cwd).catch(() => {});\n\t\trawConfigs.packageJson = _merger({}, ...keys.map((key) => pkgJsonFile?.[key]));\n\t}\n\tconst configs = {};\n\tfor (const key in rawConfigs) {\n\t\tconst value = rawConfigs[key];\n\t\tconfigs[key] = await (typeof value === \"function\" ? value({\n\t\t\tconfigs,\n\t\t\trawConfigs\n\t\t}) : value);\n\t}\n\tif (Array.isArray(configs.main)) r.config = configs.main;\n\telse {\n\t\tr.config = _merger(configs.overrides, configs.main, configs.rc, configs.packageJson, configs.defaultConfig);\n\t\tif (options.extend) {\n\t\t\tawait extendConfig(r.config, options);\n\t\t\tr.layers = r.config._layers;\n\t\t\tdelete r.config._layers;\n\t\t\tr.config = _merger(r.config, ...r.layers.map((e) => e.config));\n\t\t}\n\t}\n\tr.layers = [...[\n\t\tconfigs.overrides && {\n\t\t\tconfig: configs.overrides,\n\t\t\tconfigFile: void 0,\n\t\t\tcwd: void 0\n\t\t},\n\t\t{\n\t\t\tconfig: configs.main,\n\t\t\tconfigFile: options.configFile,\n\t\t\tcwd: options.cwd\n\t\t},\n\t\tconfigs.rc && {\n\t\t\tconfig: configs.rc,\n\t\t\tconfigFile: options.rcFile\n\t\t},\n\t\tconfigs.packageJson && {\n\t\t\tconfig: configs.packageJson,\n\t\t\tconfigFile: \"package.json\"\n\t\t}\n\t].filter((l) => l && l.config), ...r.layers];\n\tif (options.defaults) r.config = _merger(r.config, options.defaults);\n\tif (options.omit$Keys) {\n\t\tfor (const key in r.config) if (key.startsWith(\"$\")) delete r.config[key];\n\t}\n\tif (options.configFileRequired && !r._configFile) throw new Error(`Required config (${r.configFile}) cannot be resolved.`);\n\treturn r;\n}\nasync function extendConfig(config, options) {\n\tconfig._layers = config._layers || [];\n\tif (!options.extend) return;\n\tlet keys = options.extend.extendKey;\n\tif (typeof keys === \"string\") keys = [keys];\n\tconst extendSources = [];\n\tfor (const key of keys) {\n\t\textendSources.push(...(Array.isArray(config[key]) ? config[key] : [config[key]]).filter(Boolean));\n\t\tdelete config[key];\n\t}\n\tfor (let extendSource of extendSources) {\n\t\tconst originalExtendSource = extendSource;\n\t\tlet sourceOptions = {};\n\t\tif (extendSource.source) {\n\t\t\tsourceOptions = extendSource.options || {};\n\t\t\textendSource = extendSource.source;\n\t\t}\n\t\tif (Array.isArray(extendSource)) {\n\t\t\tsourceOptions = extendSource[1] || {};\n\t\t\textendSource = extendSource[0];\n\t\t}\n\t\tif (typeof extendSource !== \"string\") {\n\t\t\tconsole.warn(`Cannot extend config from \\`${JSON.stringify(originalExtendSource)}\\` in ${options.cwd}`);\n\t\t\tcontinue;\n\t\t}\n\t\tconst _config = await resolveConfig(extendSource, options, sourceOptions);\n\t\tif (!_config.config) {\n\t\t\tconsole.warn(`Cannot extend config from \\`${extendSource}\\` in ${options.cwd}`);\n\t\t\tcontinue;\n\t\t}\n\t\tawait extendConfig(_config.config, {\n\t\t\t...options,\n\t\t\tcwd: _config.cwd\n\t\t});\n\t\tconfig._layers.push(_config);\n\t\tif (_config.config._layers) {\n\t\t\tconfig._layers.push(..._config.config._layers);\n\t\t\tdelete _config.config._layers;\n\t\t}\n\t}\n}\nconst GIGET_PREFIXES = [\n\t\"gh:\",\n\t\"github:\",\n\t\"gitlab:\",\n\t\"bitbucket:\",\n\t\"https://\",\n\t\"http://\"\n];\nconst NPM_PACKAGE_RE = /^(@[\\da-z~-][\\d._a-z~-]*\\/)?[\\da-z~-][\\d._a-z~-]*($|\\/.*)/;\nasync function resolveConfig(source, options, sourceOptions = {}) {\n\tif (options.resolve) {\n\t\tconst res = await options.resolve(source, options);\n\t\tif (res) return res;\n\t}\n\tconst _merger = options.merger || defu;\n\tconst customProviderKeys = Object.keys(sourceOptions.giget?.providers || {}).map((key) => `${key}:`);\n\tconst gigetPrefixes = customProviderKeys.length > 0 ? [...new Set([...customProviderKeys, ...GIGET_PREFIXES])] : GIGET_PREFIXES;\n\tif (options.giget !== false && gigetPrefixes.some((prefix) => source.startsWith(prefix))) {\n\t\tconst { downloadTemplate } = await import(\"giget\").catch((error) => {\n\t\t\tthrow new Error(`Extending config from \\`${source}\\` requires \\`giget\\` peer dependency to be installed.\\n\\nInstall it with: \\`npx nypm i giget\\``, { cause: error });\n\t\t});\n\t\tconst { digest } = await import(\"./_chunks/libs/ohash.mjs\").then((n) => n.n);\n\t\tconst cloneName = source.replace(/\\W+/g, \"_\").split(\"_\").splice(0, 3).join(\"_\") + \"_\" + digest(source).slice(0, 10).replace(/[-_]/g, \"\");\n\t\tlet cloneDir;\n\t\tconst localNodeModules = resolve(options.cwd, \"node_modules\");\n\t\tconst parentDir = dirname(options.cwd);\n\t\tif (basename(parentDir) === \".c12\") cloneDir = join(parentDir, cloneName);\n\t\telse if (existsSync(localNodeModules)) cloneDir = join(localNodeModules, \".c12\", cloneName);\n\t\telse cloneDir = process.env.XDG_CACHE_HOME ? resolve(process.env.XDG_CACHE_HOME, \"c12\", cloneName) : resolve(homedir(), \".cache/c12\", cloneName);\n\t\tif (existsSync(cloneDir) && !sourceOptions.install) await rm(cloneDir, { recursive: true });\n\t\tsource = (await downloadTemplate(source, {\n\t\t\tdir: cloneDir,\n\t\t\tinstall: sourceOptions.install,\n\t\t\tforce: sourceOptions.install,\n\t\t\tauth: sourceOptions.auth,\n\t\t\t...options.giget,\n\t\t\t...sourceOptions.giget\n\t\t})).dir;\n\t}\n\tif (NPM_PACKAGE_RE.test(source)) source = tryResolve(source, options) || source;\n\tconst ext = extname(source);\n\tconst isDir = _isDirectory(resolve(options.cwd, source)) ?? (!ext || ext === basename(source));\n\tconst cwd = resolve(options.cwd, isDir ? source : dirname(source));\n\tif (isDir) source = options.configFile;\n\tconst res = {\n\t\tconfig: void 0,\n\t\tconfigFile: void 0,\n\t\tcwd,\n\t\tsource,\n\t\tsourceOptions\n\t};\n\tres.configFile = tryResolve(resolve(cwd, source), options) || tryResolve(resolve(cwd, \".config\", source.replace(/\\.config$/, \"\")), options) || tryResolve(resolve(cwd, \".config\", source), options) || source;\n\tif (!existsSync(res.configFile)) return res;\n\tres._configFile = res.configFile;\n\tconst configFileExt = extname(res.configFile) || \"\";\n\tif (configFileExt in ASYNC_LOADERS) res.config = (await ASYNC_LOADERS[configFileExt]())(await readFile(res.configFile, \"utf8\"));\n\telse {\n\t\tconst _resolveModule = options.resolveModule || ((mod) => mod.default || mod);\n\t\tif (options.import) res.config = _resolveModule(await options.import(res.configFile));\n\t\telse {\n\t\t\tconst _configURL = pathToFileURL(res.configFile);\n\t\t\t_configURL.search = `_${++importCounter}`;\n\t\t\tres.config = await import(_configURL.href).then(_resolveModule, async (error) => {\n\t\t\t\tconst { createJiti } = await import(\"jiti\").catch(() => {\n\t\t\t\t\tthrow new Error(`Failed to load config file \\`${res.configFile}\\`: ${error?.message}. Hint install \\`jiti\\` for compatibility.`, { cause: error });\n\t\t\t\t});\n\t\t\t\tconst jiti = createJiti(join(options.cwd || \".\", options.configFile || \"/\"), {\n\t\t\t\t\tinteropDefault: true,\n\t\t\t\t\tmoduleCache: false,\n\t\t\t\t\textensions: [...SUPPORTED_EXTENSIONS],\n\t\t\t\t\t...options.jitiOptions\n\t\t\t\t});\n\t\t\t\toptions.import = (id) => jiti.import(id);\n\t\t\t\treturn _resolveModule(await options.import(res.configFile));\n\t\t\t});\n\t\t}\n\t}\n\tif (typeof res.config === \"function\") res.config = await res.config(options.context);\n\tif (options.envName) {\n\t\tconst envConfig = {\n\t\t\t...res.config[\"$\" + options.envName],\n\t\t\t...res.config.$env?.[options.envName]\n\t\t};\n\t\tif (Object.keys(envConfig).length > 0) res.config = _merger(envConfig, res.config);\n\t}\n\tres.meta = defu(res.sourceOptions.meta, res.config.$meta);\n\tdelete res.config.$meta;\n\tif (res.sourceOptions.overrides) res.config = _merger(res.sourceOptions.overrides, res.config);\n\tres.configFile = _normalize(res.configFile);\n\tres.source = _normalize(res.source);\n\treturn res;\n}\nfunction tryResolve(id, options) {\n\tconst res = resolveModulePath(id, {\n\t\ttry: true,\n\t\tfrom: pathToFileURL(join(options.cwd || \".\", options.configFile || \"/\")),\n\t\tsuffixes: [\"\", \"/index\"],\n\t\textensions: SUPPORTED_EXTENSIONS,\n\t\tcache: false\n\t});\n\treturn res ? normalize(res) : void 0;\n}\nfunction _isDirectory(path) {\n\ttry {\n\t\treturn statSync(path).isDirectory();\n\t} catch {\n\t\treturn null;\n\t}\n}\nfunction createDefineConfig() {\n\treturn (input) => input;\n}\nconst eventMap = {\n\tadd: \"created\",\n\tchange: \"updated\",\n\tunlink: \"removed\"\n};\nasync function watchConfig(options) {\n\tlet config = await loadConfig(options);\n\tconst configName = options.name || \"config\";\n\tconst configFileName = options.configFile ?? (options.name === \"config\" ? \"config\" : `${options.name}.config`);\n\tconst watchingFiles = [...new Set((config.layers || []).filter((l) => l.cwd).flatMap((l) => [\n\t\t...SUPPORTED_EXTENSIONS.flatMap((ext) => [\n\t\t\tresolve(l.cwd, configFileName + ext),\n\t\t\tresolve(l.cwd, \".config\", configFileName + ext),\n\t\t\tresolve(l.cwd, \".config\", configFileName.replace(/\\.config$/, \"\") + ext)\n\t\t]),\n\t\tl.source && resolve(l.cwd, l.source),\n\t\toptions.rcFile && resolve(l.cwd, typeof options.rcFile === \"string\" ? options.rcFile : `.${configName}rc`),\n\t\toptions.packageJson && resolve(l.cwd, \"package.json\")\n\t]).filter(Boolean))];\n\tconst watch = await import(\"chokidar\").then((r) => r.watch || r.default || r);\n\tconst { diff } = await import(\"./_chunks/libs/ohash.mjs\").then((n) => n.t);\n\tconst _fswatcher = watch(watchingFiles, {\n\t\tignoreInitial: true,\n\t\t...options.chokidarOptions\n\t});\n\tconst onChange = async (event, path) => {\n\t\tconst type = eventMap[event];\n\t\tif (!type) return;\n\t\tif (options.onWatch) await options.onWatch({\n\t\t\ttype,\n\t\t\tpath\n\t\t});\n\t\tconst oldConfig = config;\n\t\ttry {\n\t\t\tconfig = await loadConfig(options);\n\t\t} catch (error) {\n\t\t\tconsole.warn(`Failed to load config ${path}\\n${error}`);\n\t\t\treturn;\n\t\t}\n\t\tconst changeCtx = {\n\t\t\tnewConfig: config,\n\t\t\toldConfig,\n\t\t\tgetDiff: () => diff(oldConfig.config, config.config)\n\t\t};\n\t\tif (options.acceptHMR) {\n\t\t\tif (await options.acceptHMR(changeCtx)) return;\n\t\t}\n\t\tif (options.onUpdate) await options.onUpdate(changeCtx);\n\t};\n\tif (options.debounce === false) _fswatcher.on(\"all\", onChange);\n\telse _fswatcher.on(\"all\", debounce(onChange, options.debounce ?? 100));\n\tconst utils = {\n\t\twatchingFiles,\n\t\tunwatch: async () => {\n\t\t\tawait _fswatcher.close();\n\t\t}\n\t};\n\treturn new Proxy(utils, { get(_, prop) {\n\t\tif (prop in utils) return utils[prop];\n\t\treturn config[prop];\n\t} });\n}\nexport { SUPPORTED_EXTENSIONS, createDefineConfig, loadConfig, loadDotenv, setupDotenv, watchConfig };\n","import { n as ok, t as err } from \"./result-BFErFpFT.js\";\n//#region src/validate.ts\n/**\n* Validate unknown input against a Zod schema.\n*\n* When validation fails, issues are automatically formatted into a human-readable\n* message. If a `createError` factory is provided, it receives the formatted\n* issues and message. Otherwise, a plain `Error` with the formatted message is\n* returned.\n*\n* @param options - The validation options.\n* @param options.schema - The Zod schema to validate against.\n* @param options.params - The unknown value to validate.\n* @param options.createError - Optional factory invoked when validation fails.\n* @returns A Result tuple - either [Error, null] on failure or [null, T] on success.\n*/\nfunction validate({ schema, params, createError }) {\n\tconst result = schema.safeParse(params);\n\tif (!result.success) {\n\t\tconst formatted = formatZodIssues(result.error.issues);\n\t\tif (createError) return err(createError(formatted));\n\t\treturn err(formatted.message);\n\t}\n\treturn ok(result.data);\n}\n/**\n* Format raw Zod validation issues into structured objects and a human-readable string.\n*\n* @private\n* @param issues - Raw Zod validation issues.\n* @param separator - Separator between formatted issue strings.\n* @returns An object containing the formatted issues array and a joined message string.\n*/\nfunction formatZodIssues(issues, separator = \"\\n \") {\n\tconst formatted = issues.map((issue) => ({\n\t\tmessage: issue.message,\n\t\tpath: issue.path.map(String).join(\".\")\n\t}));\n\treturn {\n\t\tissues: formatted,\n\t\tmessage: formatted.map((item) => {\n\t\t\tif (item.path.length > 0) return `${item.path}: ${item.message}`;\n\t\t\treturn item.message;\n\t\t}).join(separator)\n\t};\n}\n//#endregion\nexport { validate };\n\n//# sourceMappingURL=validate.js.map","import { withTag } from \"@maltty/utils/tag\";\nimport { err, ok, toError } from \"@maltty/utils/fp\";\nimport { loadConfig as loadConfig$1 } from \"c12\";\nimport { attemptAsync } from \"es-toolkit\";\nimport { validate } from \"@maltty/utils/validate\";\nimport { z } from \"zod\";\n//#region src/utils/compile.ts\n/**\n* All supported cross-compilation targets with human-readable labels.\n*\n* This is the single source of truth — the {@link CompileTarget} union type\n* and the Zod validation schema are both derived from this array.\n*\n* Targets marked `default: true` are compiled when no explicit targets are configured,\n* covering ~95% of developer environments.\n*/\nconst compileTargets = [\n\t{\n\t\ttarget: \"darwin-arm64\",\n\t\tlabel: \"macOS Apple Silicon\",\n\t\tdefault: true\n\t},\n\t{\n\t\ttarget: \"darwin-x64\",\n\t\tlabel: \"macOS Intel\",\n\t\tdefault: true\n\t},\n\t{\n\t\ttarget: \"linux-arm64\",\n\t\tlabel: \"Linux ARM64\",\n\t\tdefault: false\n\t},\n\t{\n\t\ttarget: \"linux-x64\",\n\t\tlabel: \"Linux x64\",\n\t\tdefault: true\n\t},\n\t{\n\t\ttarget: \"linux-x64-musl\",\n\t\tlabel: \"Linux x64 (musl)\",\n\t\tdefault: false\n\t},\n\t{\n\t\ttarget: \"windows-arm64\",\n\t\tlabel: \"Windows ARM64\",\n\t\tdefault: false\n\t},\n\t{\n\t\ttarget: \"windows-x64\",\n\t\tlabel: \"Windows x64\",\n\t\tdefault: true\n\t}\n];\n//#endregion\n//#region src/utils/schema.ts\n/**\n* @private\n*/\nconst compileTargetValues = compileTargets.map((entry) => entry.target);\n/**\n* @private\n*/\nconst CompileTargetSchema = z.enum(compileTargetValues);\n/**\n* @private\n*/\nconst BuildOptionsSchema = z.object({\n\tclean: z.boolean().optional(),\n\tdefine: z.record(z.string(), z.string()).optional(),\n\texternal: z.array(z.string()).optional(),\n\tminify: z.boolean().optional(),\n\tout: z.string().optional(),\n\tsourcemap: z.boolean().optional(),\n\ttarget: z.string().optional()\n}).strict();\n/**\n* @private\n*/\nconst CompileOptionsSchema = z.object({\n\tautoloadDotenv: z.boolean().optional(),\n\tname: z.string().optional(),\n\tout: z.string().optional(),\n\ttargets: z.array(CompileTargetSchema).optional()\n}).strict();\n/**\n* Zod schema validating the {@link MalttyConfig} shape.\n*/\nconst MalttyConfigSchema = z.object({\n\tbuild: BuildOptionsSchema.optional(),\n\tcommands: z.string().optional(),\n\tcompile: z.union([z.boolean(), CompileOptionsSchema]).optional(),\n\tentry: z.string().optional(),\n\tinclude: z.array(z.string()).optional()\n}).strict();\n/**\n* Validate arbitrary data against the {@link MalttyConfigSchema}.\n*\n* @param data - The unknown value to validate.\n* @returns A Result tuple - `[null, MalttyConfig]` on success or `[Error, null]` on failure.\n*/\nfunction validateConfig(data) {\n\treturn validate({\n\t\tschema: MalttyConfigSchema,\n\t\tparams: data,\n\t\tcreateError: ({ message }) => /* @__PURE__ */ new Error(`Invalid maltty config:\\n ${message}`)\n\t});\n}\n//#endregion\n//#region src/utils/loader.ts\n/**\n* Load and validate a `maltty.config.ts` file using c12.\n*\n* Searches for a config file named `maltty` (e.g. `maltty.config.ts`, `maltty.config.mts`)\n* in the given working directory, validates it against the build config schema,\n* and returns a tagged config object.\n*\n* @param options - Optional loader configuration.\n* @returns A Result tuple - `[null, LoadConfigResult]` on success or `[Error, null]` on failure.\n*/\nasync function loadConfig(options) {\n\tconst { cwd, defaults, overrides } = options ?? {};\n\tconst [loadError, loaded] = await attemptAsync(() => loadConfig$1({\n\t\tcwd,\n\t\tdefaults,\n\t\tname: \"maltty\",\n\t\toverrides\n\t}));\n\tif (loadError) return err(`Failed to load maltty config: ${toError(loadError).message}`);\n\tif (!loaded) return err(\"Failed to load maltty config: no configuration was returned\");\n\tconst [validateError, config] = validateConfig(loaded.config);\n\tif (validateError) return err(validateError);\n\treturn ok({\n\t\tconfig: withTag(config, \"MalttyConfig\"),\n\t\tconfigFile: loaded.configFile\n\t});\n}\n//#endregion\nexport { MalttyConfigSchema, compileTargets, loadConfig, validateConfig };\n\n//# sourceMappingURL=utils.js.map"],"x_google_ignoreList":[1,2,3,4,5,6,7],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAQA,MAAM,MAAM;;;;;;;;;;;AAWZ,SAAS,QAAQ,KAAK,KAAK;CAC1B,MAAM,OAAO,EAAE,GAAG,IAAI;CACtB,OAAO,eAAe,MAAM,KAAK;EAChC,cAAc;EACd,YAAY;EACZ,OAAO;EACP,UAAU;CACX,CAAC;CACD,OAAO;AACR;;;ACtBA,MAAM,eAAe;CACpB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AACA,MAAM,cAAc;AACpB,MAAM,yBAAyB,IAAI,IAAI;CACtC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD,CAAC;AACD,MAAM,2BAA2B,IAAI,IAAI;AACzC,SAAS,WAAW,OAAO,OAAO,OAAO;CACxC,QAAQ,MAAM,QAAd;EACC,KAAK,GAAG,OAAO;EACf,KAAK,GAAG,OAAO,GAAG,MAAM;EACxB,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,GAAG,KAAK,GAAG,MAAM;EAC5C,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,IAAI,MAAM,G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EACA;EACA,MAAM;EACN;CACD,CAAC,CAAC;CACF,IAAI,WAAW,OAAO,IAAI,iCAAiC,QAAQ,SAAS,CAAC,CAAC,SAAS;CACvF,IAAI,CAAC,QAAQ,OAAO,IAAI,6DAA6D;CACrF,MAAM,CAAC,eAAe,UAAU,eAAe,OAAO,MAAM;CAC5D,IAAI,eAAe,OAAO,IAAI,aAAa;CAC3C,OAAO,GAAG;EACT,QAAQ,QAAQ,QAAQ,cAAc;EACtC,YAAY,OAAO;CACpB,CAAC;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate-
|
|
1
|
+
{"version":3,"file":"validate-CX8axBK6.js","names":[],"sources":["../src/lib/validate.ts"],"sourcesContent":["export const KEBAB_CASE_CHARS_RE = /^[a-z][\\da-z-]*$/ as RegExp\n\n/**\n * Check whether a string is valid kebab-case.\n *\n * @param value - The string to validate.\n * @returns True when the string is kebab-case.\n */\nexport function isKebabCase(value: string): boolean {\n if (!KEBAB_CASE_CHARS_RE.test(value)) {\n return false\n }\n if (value.endsWith('-')) {\n return false\n }\n if (value.includes('--')) {\n return false\n }\n return true\n}\n"],"mappings":";AAAA,MAAa,sBAAsB;;;;;;;AAQnC,SAAgB,YAAY,OAAwB;CAClD,IAAI,CAAC,oBAAoB,KAAK,KAAK,GACjC,OAAO;CAET,IAAI,MAAM,SAAS,GAAG,GACpB,OAAO;CAET,IAAI,MAAM,SAAS,IAAI,GACrB,OAAO;CAET,OAAO;AACT"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { i as toError, r as ok, t as attemptAsync } from "./attemptAsync-
|
|
2
|
-
import {
|
|
1
|
+
import { i as toError, r as ok, t as attemptAsync } from "./attemptAsync-D_oWcKfe.js";
|
|
2
|
+
import { t as path_exports } from "./node-Bbe24r0m.js";
|
|
3
|
+
import { t as fs_exports } from "./fs-Uxhr-pvi-AfTuGWmD.js";
|
|
3
4
|
import { dirname, join, relative } from "node:path";
|
|
4
5
|
import { readFile, readdir } from "node:fs/promises";
|
|
5
6
|
import { Liquid } from "liquidjs";
|
|
@@ -19,7 +20,8 @@ async function renderTemplate(params) {
|
|
|
19
20
|
const entries = await collectLiquidFiles(params.templateDir);
|
|
20
21
|
if (entries.length === 0) return ok([]);
|
|
21
22
|
const results = await Promise.all(entries.map(async (entry) => {
|
|
22
|
-
const
|
|
23
|
+
const absolutePath = join(params.templateDir, entry);
|
|
24
|
+
const [renderError, content] = await renderSingleFile(engine, absolutePath, params.variables);
|
|
23
25
|
if (renderError) return renderError;
|
|
24
26
|
return {
|
|
25
27
|
content,
|
|
@@ -149,4 +151,4 @@ async function writeSingleFile(file, outputDir, overwrite) {
|
|
|
149
151
|
//#endregion
|
|
150
152
|
export { renderTemplate as n, writeFiles as t };
|
|
151
153
|
|
|
152
|
-
//# sourceMappingURL=write-
|
|
154
|
+
//# sourceMappingURL=write-C6VsyUuc.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"write-
|
|
1
|
+
{"version":3,"file":"write-C6VsyUuc.js","names":["path","fs"],"sources":["../src/lib/render.ts","../src/lib/write.ts"],"sourcesContent":["import { readdir, readFile } from 'node:fs/promises'\nimport { join, relative } from 'node:path'\n\nimport { attemptAsync, ok, toError } from '@maltty/utils/fp'\nimport type { ResultAsync } from '@maltty/utils/fp'\nimport { path } from '@maltty/utils/node'\nimport { Liquid } from 'liquidjs'\n\nimport type { GenerateError, RenderedFile, RenderTemplateParams } from './types.js'\n\n/**\n * Render all `.liquid` templates in a directory using LiquidJS.\n *\n * Recursively collects `.liquid` files under `templateDir`, renders each\n * with the provided variables, and strips the `.liquid` extension from\n * the output path. Files named `gitignore.liquid` are mapped to `.gitignore`.\n *\n * @param params - Template directory and variable bindings.\n * @returns An async Result containing rendered files or a GenerateError.\n */\nexport async function renderTemplate(\n params: RenderTemplateParams\n): ResultAsync<readonly RenderedFile[], GenerateError> {\n const engine = new Liquid({ root: params.templateDir })\n\n const entries = await collectLiquidFiles(params.templateDir)\n if (entries.length === 0) {\n return ok([])\n }\n\n const results = await Promise.all(\n entries.map(async (entry): Promise<RenderedFile | GenerateError> => {\n const absolutePath = join(params.templateDir, entry)\n const [renderError, content] = await renderSingleFile(engine, absolutePath, params.variables)\n if (renderError) {\n return renderError\n }\n const relativePath = mapOutputPath(entry)\n return { content, relativePath }\n })\n )\n\n const firstError = results.find(isGenerateError)\n if (firstError) {\n return [firstError as GenerateError, null]\n }\n\n return ok(results as readonly RenderedFile[])\n}\n\n// ---------------------------------------------------------------------------\n// Private helpers\n// ---------------------------------------------------------------------------\n\n/**\n * Recursively collect all `.liquid` file paths relative to root.\n *\n * @param root - The directory to scan.\n * @returns Relative paths of all `.liquid` files.\n * @private\n */\nasync function collectLiquidFiles(root: string): Promise<readonly string[]> {\n const dirEntries = await readdir(root, { recursive: true, withFileTypes: true })\n return dirEntries\n .filter((entry) => entry.isFile() && entry.name.endsWith('.liquid'))\n .map((entry) => {\n const parent = entry.parentPath\n return path.toPosixPath(relative(root, join(parent, entry.name)))\n })\n}\n\n/**\n * Render a single `.liquid` file with the given variables.\n *\n * @param engine - The LiquidJS engine instance.\n * @param absolutePath - Absolute path to the `.liquid` file.\n * @param variables - Template variable bindings.\n * @returns A Result tuple with the rendered content or a GenerateError.\n * @private\n */\nasync function renderSingleFile(\n engine: Liquid,\n absolutePath: string,\n variables: Record<string, unknown>\n): ResultAsync<string, GenerateError> {\n const [renderError, content] = await attemptAsync(async () => {\n const template = await readFile(absolutePath, 'utf8')\n return engine.parseAndRender(template, variables)\n })\n\n if (renderError) {\n return [\n {\n message: `Failed to render template: ${toError(renderError).message}`,\n path: absolutePath,\n type: 'render_error' as const,\n },\n null,\n ]\n }\n\n return ok(content)\n}\n\n/**\n * Map a `.liquid` relative path to its output path.\n *\n * Strips the `.liquid` extension and renames bare `gitignore` segments\n * to `.gitignore` so dotfiles survive version control.\n *\n * @param liquidPath - Relative path ending in `.liquid`.\n * @returns The output-relative path without the `.liquid` suffix.\n * @private\n */\nfunction mapOutputPath(liquidPath: string): string {\n const stripped = liquidPath.replace(/\\.liquid$/, '')\n return stripped.replaceAll(/(^|\\/)gitignore($|\\/)/g, '$1.gitignore$2')\n}\n\n/**\n * Type guard for GenerateError objects.\n *\n * @param value - The value to check.\n * @returns True when value has a `type` and `message` property matching GenerateError.\n * @private\n */\nfunction isGenerateError(value: unknown): value is GenerateError {\n if (typeof value !== 'object' || value === null) {\n return false\n }\n return 'type' in value && 'message' in value\n}\n","import { dirname, join } from 'node:path'\n\nimport { ok } from '@maltty/utils/fp'\nimport type { ResultAsync } from '@maltty/utils/fp'\nimport { fs } from '@maltty/utils/node'\n\nimport type { GenerateError, RenderedFile, WriteFilesParams, WriteResult } from './types.js'\n\n/**\n * Write rendered files to disk with optional conflict detection.\n *\n * For each file, resolves the target path under `outputDir`, creates parent\n * directories as needed, and writes the content. When `overwrite` is false,\n * existing files are skipped rather than overwritten.\n *\n * @param params - Files to write, target directory, and overwrite flag.\n * @returns An async Result with counts of written/skipped files or a GenerateError.\n */\nexport async function writeFiles(\n params: WriteFilesParams\n): ResultAsync<WriteResult, GenerateError> {\n const results = await Promise.all(\n params.files.map((file) => writeSingleFile(file, params.outputDir, params.overwrite))\n )\n\n const firstError = results.find((r): r is readonly [GenerateError, null] => r[0] !== null)\n if (firstError) {\n return [firstError[0], null]\n }\n\n const validStatuses = results.filter((r): r is readonly [null, FileWriteStatus] => r[1] !== null)\n\n const written = validStatuses\n .filter(([, status]) => status.action === 'written')\n .map(([, status]) => status.path)\n\n const skipped = validStatuses\n .filter(([, status]) => status.action === 'skipped')\n .map(([, status]) => status.path)\n\n return ok({ skipped, written })\n}\n\n/**\n * Status of a single file write operation.\n *\n * Tracks the path and whether the file was written or skipped.\n */\ninterface FileWriteStatus {\n readonly path: string\n readonly action: 'written' | 'skipped'\n}\n\n/**\n * Write a single rendered file to disk.\n *\n * @param file - The rendered file to write.\n * @param outputDir - The root output directory.\n * @param overwrite - Whether to overwrite existing files.\n * @returns A Result tuple with the write status or a GenerateError.\n * @private\n */\nasync function writeSingleFile(\n file: RenderedFile,\n outputDir: string,\n overwrite: boolean\n): ResultAsync<FileWriteStatus, GenerateError> {\n const targetPath = join(outputDir, file.relativePath)\n\n const pathExists = await fs.exists(targetPath)\n if (pathExists && !overwrite) {\n return ok({ action: 'skipped' as const, path: file.relativePath })\n }\n\n const [mkdirError] = await fs.mkdir(dirname(targetPath))\n if (mkdirError) {\n return [\n {\n message: `Failed to write file: ${mkdirError.message}`,\n path: targetPath,\n type: 'write_error' as const,\n },\n null,\n ]\n }\n\n const [writeError] = await fs.write(targetPath, file.content)\n if (writeError) {\n return [\n {\n message: `Failed to write file: ${writeError.message}`,\n path: targetPath,\n type: 'write_error' as const,\n },\n null,\n ]\n }\n\n return ok({ action: 'written' as const, path: file.relativePath })\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAoBA,eAAsB,eACpB,QACqD;CACrD,MAAM,SAAS,IAAI,OAAO,EAAE,MAAM,OAAO,YAAY,CAAC;CAEtD,MAAM,UAAU,MAAM,mBAAmB,OAAO,WAAW;CAC3D,IAAI,QAAQ,WAAW,GACrB,OAAO,GAAG,CAAC,CAAC;CAGd,MAAM,UAAU,MAAM,QAAQ,IAC5B,QAAQ,IAAI,OAAO,UAAiD;EAClE,MAAM,eAAe,KAAK,OAAO,aAAa,KAAK;EACnD,MAAM,CAAC,aAAa,WAAW,MAAM,iBAAiB,QAAQ,cAAc,OAAO,SAAS;EAC5F,IAAI,aACF,OAAO;EAGT,OAAO;GAAE;GAAS,cADG,cAAc,KACN;EAAE;CACjC,CAAC,CACH;CAEA,MAAM,aAAa,QAAQ,KAAK,eAAe;CAC/C,IAAI,YACF,OAAO,CAAC,YAA6B,IAAI;CAG3C,OAAO,GAAG,OAAkC;AAC9C;;;;;;;;AAaA,eAAe,mBAAmB,MAA0C;CAE1E,QAAO,MADkB,QAAQ,MAAM;EAAE,WAAW;EAAM,eAAe;CAAK,CAAC,EAAA,CAE5E,QAAQ,UAAU,MAA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