@rzl-zone/build-tools 0.0.13 → 0.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/dist/.references/index.d.cts +1 -1
  2. package/dist/.references/index.d.ts +1 -1
  3. package/dist/bundler/rolldown.cjs +2 -2
  4. package/dist/bundler/rolldown.d.cts +2 -2
  5. package/dist/bundler/rolldown.d.ts +2 -2
  6. package/dist/bundler/rolldown.js +1 -1
  7. package/dist/bundler/tsdown.cjs +4 -4
  8. package/dist/bundler/tsdown.cjs.map +1 -1
  9. package/dist/bundler/tsdown.d.cts +8 -10
  10. package/dist/bundler/tsdown.d.ts +8 -10
  11. package/dist/bundler/tsdown.js +4 -4
  12. package/dist/bundler/tsdown.js.map +1 -1
  13. package/dist/bundler/utils.cjs +2 -2
  14. package/dist/bundler/utils.d.cts +2 -2
  15. package/dist/bundler/utils.d.ts +2 -2
  16. package/dist/bundler/utils.js +2 -2
  17. package/dist/{client-DowGlRm4.cjs → client-6kvCwMAP.cjs} +3 -3
  18. package/dist/{client-DowGlRm4.cjs.map → client-6kvCwMAP.cjs.map} +1 -1
  19. package/dist/{client-DgQRjdo8.js → client-fLOTSaWY.js} +3 -3
  20. package/dist/{client-DgQRjdo8.js.map → client-fLOTSaWY.js.map} +1 -1
  21. package/dist/commander-kit/index.cjs +5 -5
  22. package/dist/commander-kit/index.cjs.map +1 -1
  23. package/dist/commander-kit/index.d.cts +3 -3
  24. package/dist/commander-kit/index.d.ts +3 -3
  25. package/dist/commander-kit/index.js +5 -5
  26. package/dist/commander-kit/index.js.map +1 -1
  27. package/dist/{extra-B0cm-axJ.d.cts → extra-B9B5shoY.d.cts} +2 -2
  28. package/dist/{extra-B0cm-axJ.d.ts → extra-B9B5shoY.d.ts} +2 -2
  29. package/dist/{fast-globe-options-DXVzXC8B.d.cts → fast-globe-options-BBkxmhty.d.cts} +96 -4
  30. package/dist/{fast-globe-options-CUaH5spu.d.ts → fast-globe-options-Di1Z8m7n.d.ts} +96 -4
  31. package/dist/{formatter-C-Yt_Gvf.cjs → formatter-BAkIXFPg.cjs} +2 -2
  32. package/dist/{formatter-C-Yt_Gvf.cjs.map → formatter-BAkIXFPg.cjs.map} +1 -1
  33. package/dist/{formatter-BFgV1HhV.js → formatter-CIMnJqKX.js} +2 -2
  34. package/dist/{formatter-BFgV1HhV.js.map → formatter-CIMnJqKX.js.map} +1 -1
  35. package/dist/{identity-DPB1Qgy4.js → identity-ClU64-C5.js} +5 -5
  36. package/dist/{identity-DPB1Qgy4.js.map → identity-ClU64-C5.js.map} +1 -1
  37. package/dist/{identity-8Wy_JtzU.cjs → identity-DiOI-xFi.cjs} +5 -5
  38. package/dist/{identity-8Wy_JtzU.cjs.map → identity-DiOI-xFi.cjs.map} +1 -1
  39. package/dist/{index-8QVWHQzC.d.cts → index-DLqTtod5.d.cts} +2 -2
  40. package/dist/{index-8QVWHQzC.d.ts → index-DLqTtod5.d.ts} +2 -2
  41. package/dist/{index-CyGIoXau.d.ts → index-isU4mh4U.d.cts} +3 -3
  42. package/dist/{index-CyGIoXau.d.cts → index-isU4mh4U.d.ts} +3 -3
  43. package/dist/index.cjs +7 -7
  44. package/dist/index.cjs.map +1 -1
  45. package/dist/index.d.cts +13 -37
  46. package/dist/index.d.ts +13 -37
  47. package/dist/index.js +7 -7
  48. package/dist/index.js.map +1 -1
  49. package/dist/{package-banner-BjakxfTu.js → package-banner-DMt2fZXQ.js} +4 -4
  50. package/dist/{package-banner-BjakxfTu.js.map → package-banner-DMt2fZXQ.js.map} +1 -1
  51. package/dist/{package-banner-Cf5uu-7p.cjs → package-banner-DyZ9SDgK.cjs} +4 -4
  52. package/dist/{package-banner-Cf5uu-7p.cjs.map → package-banner-DyZ9SDgK.cjs.map} +1 -1
  53. package/dist/{server-B1jiYLZq.js → server-CDjzX9MQ.js} +3 -3
  54. package/dist/{server-B1jiYLZq.js.map → server-CDjzX9MQ.js.map} +1 -1
  55. package/dist/{server-BRuKWcjy.cjs → server-DXTo5kvY.cjs} +3 -3
  56. package/dist/{server-BRuKWcjy.cjs.map → server-DXTo5kvY.cjs.map} +1 -1
  57. package/dist/utils/client.cjs +3 -3
  58. package/dist/utils/client.d.cts +1 -1
  59. package/dist/utils/client.d.ts +1 -1
  60. package/dist/utils/client.js +3 -3
  61. package/dist/utils/server.cjs +2 -2
  62. package/dist/utils/server.d.cts +3 -3
  63. package/dist/utils/server.d.ts +3 -3
  64. package/dist/utils/server.js +2 -2
  65. package/package.json +15 -15
@@ -2,14 +2,14 @@
2
2
  * ========================================================================
3
3
  * @rzl-zone/build-tools
4
4
  * ------------------------------------------------------------------------
5
- * Version: `0.0.13`
5
+ * Version: `0.0.14`
6
6
  * Author: `Rizalvin Dwiky <rizalvindwiky1998@gmail.com>`
7
7
  * Repository: `https://github.com/rzl-zone/rzl-zone/tree/main/packages/build-tools`
8
8
  * ========================================================================
9
9
  */
10
10
 
11
- import { _ as isNonEmptyString, b as isPlainObject, o as joinLinesLoose, t as EOL } from "./formatter-BFgV1HhV.js";
12
- import { n as fsExtra } from "./server-B1jiYLZq.js";
11
+ import { _ as isNonEmptyString, b as isPlainObject, o as joinLinesLoose, t as EOL } from "./formatter-CIMnJqKX.js";
12
+ import { n as fsExtra } from "./server-CDjzX9MQ.js";
13
13
  import "@rzl-zone/node-only";
14
14
  import path from "node:path";
15
15
  const getPackageJson = async (options = {}) => {
@@ -43,4 +43,4 @@ const generatePackageBanner = async (options = {}) => {
43
43
  return joinLinesLoose("/*!", "* ========================================================================", `* ${title}`, "* ------------------------------------------------------------------------", `* Version: \`${version}\``, `* Author: \`${author}\``, `* Repository: \`${repository}\``, "* ========================================================================", "*/", withEof ? "" : false);
44
44
  };
45
45
  export { getPackageJson as n, generatePackageBanner as t };
46
- //# sourceMappingURL=package-banner-BjakxfTu.js.map
46
+ //# sourceMappingURL=package-banner-DMt2fZXQ.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"package-banner-BjakxfTu.js","names":[],"sources":["../src/core/get/package-json/index.ts","../src/core/generate/package-banner/index.ts"],"sourcesContent":["import \"@rzl-zone/node-only\";\n\nimport type { PackageJson } from \"type-fest\";\n\nimport path from \"node:path\";\n\nimport { isNonEmptyString } from \"@/_internal/utils/helper\";\n\nimport { fsExtra } from \"@/utils/server\";\nimport { EOL } from \"@/utils/client\";\n\n//? Types ----------------------------------------------------------------\n/** ----------------------------------------------------------------\n * * ***Configuration options for {@link getPackageJson | **`get-package-json`**}.***\n * ----------------------------------------------------------------\n */\nexport type GetPackageJsonOptions = {\n /** ----------------------------------------------------------------\n * * ***Working directory of the target project.***\n * ----------------------------------------------------------------\n *\n * This determines where the lookup for `package.json`\n * will start.\n *\n * - If provided, resolution begins from this directory.\n * - If omitted, defaults to `process.cwd()`.\n *\n * - ***Typical use cases:***\n * - CLI tools executed in a project directory.\n * - Monorepo root resolution.\n * - Custom build pipelines.\n *\n * @default process.cwd()\n *\n * @remarks\n * This should be the directory containing your project's\n * `package.json`, not the directory of this package.\n */\n cwd?: string;\n};\n\n//? Main -----------------------------------------------------------------\n/** ----------------------------------------------------------------\n * * ***Resolve and read the nearest `package.json`.***\n * ----------------------------------------------------------------\n *\n * This utility locates and loads the closest `package.json`\n * by walking up the directory tree starting from a given\n * working directory.\n *\n * - *Key characteristics:*\n * - Works in **Node ESM and CJS**.\n * - Compatible with **tsdown, rolldown, tsup, esbuild, vite, tsx, ts-node, and others**.\n * - Does **not** rely on JSON module imports.\n * - Fully typed via {@link PackageJson | **PackageJson**}.\n *\n * - *This function is intended for:*\n * - Build tools.\n * - Bundler configuration.\n * - CLI utilities.\n * - Monorepo-aware infrastructure code.\n *\n * @param options Optional resolution configuration.\n *\n * @returns The parsed contents of the resolved `package.json`.\n *\n * @example\n * ```ts\n * const pkg = await getPackageJson();\n * console.log(pkg.name, pkg.version);\n * ```\n *\n * @example\n * ```ts\n * const pkg = await getPackageJson({\n * cwd: process.cwd()\n * });\n * ```\n *\n * @throws If no `package.json` can be found.\n * @throws If the located `package.json` is invalid JSON.\n *\n * @remarks\n * - Resolution always starts from `cwd` or `process.cwd()`.\n * - Results are not cached by default.\n * - Designed for infrastructure-level usage, not hot paths.\n */\nexport const getPackageJson = async (\n options: GetPackageJsonOptions = {}\n): Promise<PackageJson> => {\n const startDir = isNonEmptyString(options.cwd)\n ? path.resolve(options.cwd)\n : process.cwd();\n\n let current = startDir;\n\n while (true) {\n const pkgPath = path.join(current, \"package.json\");\n\n if (fsExtra.existsSync(pkgPath)) {\n try {\n return JSON.parse(fsExtra.readFileSync(pkgPath, \"utf-8\"));\n } catch (err) {\n throw new Error(\n `[@rzl-zone/build-tools] - (get-package-json): Invalid package.json at '${pkgPath}'` +\n EOL +\n `Reason: ${(err as Error)?.message || \"unknown\"}`,\n { cause: err }\n );\n }\n }\n\n const parent = path.dirname(current);\n if (parent === current) break;\n\n current = parent;\n }\n\n throw new Error(\n \"[@rzl-zone/build-tools] - (get-package-json): Unable to locate package.json\"\n );\n};\n\n/** @deprecated Use {@link getPackageJson | `getPackageJson`} instead. */\nconst _getPackageJson = async (\n options: GetPackageJsonOptions = {}\n): Promise<PackageJson> => {\n return await getPackageJson(options);\n // if (options.cwd && options.from) {\n // throw new Error(\"Provide either `cwd` or `from`, not both.\");\n // }\n\n // const cwd = isNonEmptyString(options.cwd) ? options.cwd : process.cwd();\n\n // const baseUrl =\n // options.from && isNil(options.cwd)\n // ? options.from\n // : pathToFileURL(path.resolve(cwd, \"__entry__.js\"));\n\n // const createRequire = await getCreateRequire();\n // const reqPkg = createRequire(baseUrl);\n\n // let current = cwd;\n\n // while (true) {\n // const pkgPath = path.join(current, \"package.json\");\n\n // if (fsExtra.existsSync(pkgPath)) return reqPkg(pkgPath);\n\n // const parent = path.dirname(current);\n // if (parent === current) break;\n // current = parent;\n // }\n\n // throw new Error(\n // \"[@rzl-zone/build-tools] - (get-package-json): Unable to locate package.json !!!\"\n // );\n};\n","import \"@rzl-zone/node-only\";\n\nimport type { PackageJson } from \"type-fest\";\n\nimport { isNonEmptyString, isPlainObject } from \"@/_internal/utils/helper\";\n\nimport { EOL, joinLinesLoose } from \"@/utils/helper/formatter\";\nimport { getPackageJson } from \"../../get/package-json\";\n\n//? Types ----------------------------------------------------------------\n/** ----------------------------------------------------------------\n * * ***Configuration options for {@link generatePackageBanner | **`generate-package-banner`**}.***\n * ----------------------------------------------------------------\n */\nexport type GeneratePackageBannerOptions = {\n /** ----------------------------------------------------------------\n * * ***Display title shown in the banner.***\n * ----------------------------------------------------------------\n *\n * Defaults to the `name` field from `package.json`\n * when available.\n */\n title?: string;\n\n /** ----------------------------------------------------------------\n * * ***Author name displayed in the banner.***\n * ----------------------------------------------------------------\n *\n * When omitted, attempts to resolve from:\n * - `author.name`.\n * - `author` (*string*).\n */\n author?: string;\n\n /** ----------------------------------------------------------------\n * * ***Custom package metadata override.***\n * ----------------------------------------------------------------\n *\n * When provided, this object will be used instead of\n * reading from the filesystem.\n *\n * - Useful for testing or advanced build pipelines.\n */\n packageJson?: PackageJson;\n\n /** ----------------------------------------------------------------\n * * ***Append an end-of-file newline to the banner output.***\n * ----------------------------------------------------------------\n *\n * Controls whether the generated banner is terminated with\n * an end-of-file (EOF) newline character.\n *\n * When enabled, a trailing newline is appended to ensure:\n * - POSIX-compliant text files.\n * - Clean concatenation with subsequent source content.\n * - Consistent formatting during code injection.\n *\n * @default true\n */\n withEof?: boolean;\n};\n\n//? Main -----------------------------------------------------------------\n/** ----------------------------------------------------------------\n * * ***Generate a standardized top banner from `package.json`.***\n * ----------------------------------------------------------------\n *\n * This utility generates a formatted banner comment suitable\n * for insertion at the top of bundled output files.\n *\n * By default, it automatically locates and reads the nearest\n * `package.json` file, you may also provide a custom package object\n * through the options parameter.\n *\n * - *Banner features:*\n * - Reads metadata from the nearest `package.json`.\n * - Supports custom package metadata via options.\n * - Provides safe fallbacks for missing fields.\n * - Produces a consistent, readable comment block.\n * - Normalizes repository URLs when possible.\n *\n * - *This function is intended for:*\n * - Bundler banners (tsdown, tsup, rollup, esbuild, etc).\n * - Generated build artifacts.\n * - Distributed library outputs.\n *\n * @param {GeneratePackageBannerOptions} [options]\n * Optional banner configuration.\n *\n * @returns {Promise<string>}\n * A formatted banner comment string.\n *\n * @throws {Error}\n * If no `package.json` can be found.\n *\n * @throws {Error}\n * If the resolved `package.json` contains invalid JSON.\n *\n * @example\n * ```ts\n * const banner = await generatePackageBanner({\n * title: \"Rzl Build Tools\",\n * author: \"Rzl\"\n * });\n * ```\n *\n * @example\n * ```ts\n * const banner = await generatePackageBanner();\n * ```\n */\nexport const generatePackageBanner = async (\n options: GeneratePackageBannerOptions = {}\n): Promise<string> => {\n let pkgJson: PackageJson | undefined;\n\n if (isPlainObject(options.packageJson)) {\n pkgJson = options.packageJson;\n } else {\n try {\n pkgJson = await getPackageJson();\n } catch (error) {\n throw new Error(\n \"[@rzl-zone/build-tools] - (generate-package-banner): Failed to resolve package.json\" +\n EOL +\n `Reason: ${(error as Error)?.message || \"unknown\"}`,\n { cause: error }\n );\n }\n }\n\n const withEof = options.withEof ?? true;\n\n const title =\n options.title ??\n (isNonEmptyString(pkgJson.name) ? pkgJson.name : \"Unknown Package\");\n\n const version = isNonEmptyString(pkgJson.version)\n ? pkgJson.version\n : \"Unknown\";\n\n const author =\n options.author ??\n (isNonEmptyString(pkgJson.author)\n ? pkgJson.author\n : isPlainObject(pkgJson.author) && isNonEmptyString(pkgJson.author.name)\n ? pkgJson.author.name\n : \"Unknown\");\n\n const repository = isNonEmptyString(pkgJson.homepage)\n ? pkgJson.homepage.split(\"#\")[0]\n : isNonEmptyString(pkgJson.repository)\n ? pkgJson.repository.replace(/^git\\+/, \"\").replace(/\\.git$/, \"\")\n : isPlainObject(pkgJson.repository) &&\n isNonEmptyString(pkgJson.repository.url)\n ? pkgJson.repository.url.replace(/^git\\+/, \"\").replace(/\\.git$/, \"\")\n : \"Unknown\";\n\n return joinLinesLoose(\n \"/*!\",\n \"* ========================================================================\",\n `* ${title}`,\n \"* ------------------------------------------------------------------------\",\n `* Version: \\`${version}\\``,\n `* Author: \\`${author}\\``,\n `* Repository: \\`${repository}\\``,\n \"* ========================================================================\",\n \"*/\",\n withEof ? \"\" : false\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuFA,MAAa,iBAAiB,OAC5B,UAAiC,CAAC,MACT;CAKzB,IAAI,UAJa,iBAAiB,QAAQ,GAAG,IACzC,KAAK,QAAQ,QAAQ,GAAG,IACxB,QAAQ,IAAI;CAIhB,OAAO,MAAM;EACX,MAAM,UAAU,KAAK,KAAK,SAAS,cAAc;EAEjD,IAAI,QAAQ,WAAW,OAAO,GAC5B,IAAI;GACF,OAAO,KAAK,MAAM,QAAQ,aAAa,SAAS,OAAO,CAAC;EAC1D,SAAS,KAAK;GACZ,MAAM,IAAI,MACR,0EAA0E,QAAQ,KAChF,MACA,WAAY,KAAe,WAAW,aACxC,EAAE,OAAO,IAAI,CACf;EACF;EAGF,MAAM,SAAS,KAAK,QAAQ,OAAO;EACnC,IAAI,WAAW,SAAS;EAExB,UAAU;CACZ;CAEA,MAAM,IAAI,MACR,6EACF;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACVA,MAAa,wBAAwB,OACnC,UAAwC,CAAC,MACrB;CACpB,IAAI;CAEJ,IAAI,cAAc,QAAQ,WAAW,GACnC,UAAU,QAAQ;MAElB,IAAI;EACF,UAAU,MAAM,eAAe;CACjC,SAAS,OAAO;EACd,MAAM,IAAI,MACR,wFACE,MACA,WAAY,OAAiB,WAAW,aAC1C,EAAE,OAAO,MAAM,CACjB;CACF;CAGF,MAAM,UAAU,QAAQ,WAAW;CAEnC,MAAM,QACJ,QAAQ,UACP,iBAAiB,QAAQ,IAAI,IAAI,QAAQ,OAAO;CAEnD,MAAM,UAAU,iBAAiB,QAAQ,OAAO,IAC5C,QAAQ,UACR;CAEJ,MAAM,SACJ,QAAQ,WACP,iBAAiB,QAAQ,MAAM,IAC5B,QAAQ,SACR,cAAc,QAAQ,MAAM,KAAK,iBAAiB,QAAQ,OAAO,IAAI,IACnE,QAAQ,OAAO,OACf;CAER,MAAM,aAAa,iBAAiB,QAAQ,QAAQ,IAChD,QAAQ,SAAS,MAAM,GAAG,EAAE,KAC5B,iBAAiB,QAAQ,UAAU,IACjC,QAAQ,WAAW,QAAQ,UAAU,EAAE,EAAE,QAAQ,UAAU,EAAE,IAC7D,cAAc,QAAQ,UAAU,KAC9B,iBAAiB,QAAQ,WAAW,GAAG,IACvC,QAAQ,WAAW,IAAI,QAAQ,UAAU,EAAE,EAAE,QAAQ,UAAU,EAAE,IACjE;CAER,OAAO,eACL,OACA,8EACA,MAAM,SACN,8EACA,iBAAiB,QAAQ,KACzB,gBAAgB,OAAO,KACvB,oBAAoB,WAAW,KAC/B,8EACA,MACA,UAAU,KAAK,KACjB;AACF"}
1
+ {"version":3,"file":"package-banner-DMt2fZXQ.js","names":[],"sources":["../src/core/get/package-json/index.ts","../src/core/generate/package-banner/index.ts"],"sourcesContent":["import \"@rzl-zone/node-only\";\n\nimport type { PackageJson } from \"type-fest\";\n\nimport path from \"node:path\";\n\nimport { isNonEmptyString } from \"@/_internal/utils/helper\";\n\nimport { fsExtra } from \"@/utils/server\";\nimport { EOL } from \"@/utils/client\";\n\n//? Types ----------------------------------------------------------------\n/** ----------------------------------------------------------------\n * * ***Configuration options for {@link getPackageJson | **`get-package-json`**}.***\n * ----------------------------------------------------------------\n */\nexport type GetPackageJsonOptions = {\n /** ----------------------------------------------------------------\n * * ***Working directory of the target project.***\n * ----------------------------------------------------------------\n *\n * This determines where the lookup for `package.json`\n * will start.\n *\n * - If provided, resolution begins from this directory.\n * - If omitted, defaults to `process.cwd()`.\n *\n * - ***Typical use cases:***\n * - CLI tools executed in a project directory.\n * - Monorepo root resolution.\n * - Custom build pipelines.\n *\n * @default process.cwd()\n *\n * @remarks\n * This should be the directory containing your project's\n * `package.json`, not the directory of this package.\n */\n cwd?: string;\n};\n\n//? Main -----------------------------------------------------------------\n/** ----------------------------------------------------------------\n * * ***Resolve and read the nearest `package.json`.***\n * ----------------------------------------------------------------\n *\n * This utility locates and loads the closest `package.json`\n * by walking up the directory tree starting from a given\n * working directory.\n *\n * - *Key characteristics:*\n * - Works in **Node ESM and CJS**.\n * - Compatible with **tsdown, rolldown, tsup, esbuild, vite, tsx, ts-node, and others**.\n * - Does **not** rely on JSON module imports.\n * - Fully typed via {@link PackageJson | **PackageJson**}.\n *\n * - *This function is intended for:*\n * - Build tools.\n * - Bundler configuration.\n * - CLI utilities.\n * - Monorepo-aware infrastructure code.\n *\n * @param options Optional resolution configuration.\n *\n * @returns The parsed contents of the resolved `package.json`.\n *\n * @example\n * ```ts\n * const pkg = await getPackageJson();\n * console.log(pkg.name, pkg.version);\n * ```\n *\n * @example\n * ```ts\n * const pkg = await getPackageJson({\n * cwd: process.cwd()\n * });\n * ```\n *\n * @throws If no `package.json` can be found.\n * @throws If the located `package.json` is invalid JSON.\n *\n * @remarks\n * - Resolution always starts from `cwd` or `process.cwd()`.\n * - Results are not cached by default.\n * - Designed for infrastructure-level usage, not hot paths.\n */\nexport const getPackageJson = async (\n options: GetPackageJsonOptions = {}\n): Promise<PackageJson> => {\n const startDir = isNonEmptyString(options.cwd)\n ? path.resolve(options.cwd)\n : process.cwd();\n\n let current = startDir;\n\n while (true) {\n const pkgPath = path.join(current, \"package.json\");\n\n if (fsExtra.existsSync(pkgPath)) {\n try {\n return JSON.parse(fsExtra.readFileSync(pkgPath, \"utf-8\"));\n } catch (err) {\n throw new Error(\n `[@rzl-zone/build-tools] - (get-package-json): Invalid package.json at '${pkgPath}'` +\n EOL +\n `Reason: ${(err as Error)?.message || \"unknown\"}`,\n { cause: err }\n );\n }\n }\n\n const parent = path.dirname(current);\n if (parent === current) break;\n\n current = parent;\n }\n\n throw new Error(\n \"[@rzl-zone/build-tools] - (get-package-json): Unable to locate package.json\"\n );\n};\n\n/** @deprecated Use {@link getPackageJson | `getPackageJson`} instead. */\nconst _getPackageJson = async (\n options: GetPackageJsonOptions = {}\n): Promise<PackageJson> => {\n return await getPackageJson(options);\n // if (options.cwd && options.from) {\n // throw new Error(\"Provide either `cwd` or `from`, not both.\");\n // }\n\n // const cwd = isNonEmptyString(options.cwd) ? options.cwd : process.cwd();\n\n // const baseUrl =\n // options.from && isNil(options.cwd)\n // ? options.from\n // : pathToFileURL(path.resolve(cwd, \"__entry__.js\"));\n\n // const createRequire = await getCreateRequire();\n // const reqPkg = createRequire(baseUrl);\n\n // let current = cwd;\n\n // while (true) {\n // const pkgPath = path.join(current, \"package.json\");\n\n // if (fsExtra.existsSync(pkgPath)) return reqPkg(pkgPath);\n\n // const parent = path.dirname(current);\n // if (parent === current) break;\n // current = parent;\n // }\n\n // throw new Error(\n // \"[@rzl-zone/build-tools] - (get-package-json): Unable to locate package.json !!!\"\n // );\n};\n","import \"@rzl-zone/node-only\";\n\nimport type { PackageJson } from \"type-fest\";\n\nimport { isNonEmptyString, isPlainObject } from \"@/_internal/utils/helper\";\n\nimport { EOL, joinLinesLoose } from \"@/utils/helper/formatter\";\nimport { getPackageJson } from \"../../get/package-json\";\n\n//? Types ----------------------------------------------------------------\n/** ----------------------------------------------------------------\n * * ***Configuration options for {@link generatePackageBanner | **`generate-package-banner`**}.***\n * ----------------------------------------------------------------\n */\nexport type GeneratePackageBannerOptions = {\n /** ----------------------------------------------------------------\n * * ***Display title shown in the banner.***\n * ----------------------------------------------------------------\n *\n * Defaults to the `name` field from `package.json`\n * when available.\n */\n title?: string;\n\n /** ----------------------------------------------------------------\n * * ***Author name displayed in the banner.***\n * ----------------------------------------------------------------\n *\n * When omitted, attempts to resolve from:\n * - `author.name`.\n * - `author` (*string*).\n */\n author?: string;\n\n /** ----------------------------------------------------------------\n * * ***Custom package metadata override.***\n * ----------------------------------------------------------------\n *\n * When provided, this object will be used instead of\n * reading from the filesystem.\n *\n * - Useful for testing or advanced build pipelines.\n */\n packageJson?: PackageJson;\n\n /** ----------------------------------------------------------------\n * * ***Append an end-of-file newline to the banner output.***\n * ----------------------------------------------------------------\n *\n * Controls whether the generated banner is terminated with\n * an end-of-file (EOF) newline character.\n *\n * When enabled, a trailing newline is appended to ensure:\n * - POSIX-compliant text files.\n * - Clean concatenation with subsequent source content.\n * - Consistent formatting during code injection.\n *\n * @default true\n */\n withEof?: boolean;\n};\n\n//? Main -----------------------------------------------------------------\n/** ----------------------------------------------------------------\n * * ***Generate a standardized top banner from `package.json`.***\n * ----------------------------------------------------------------\n *\n * This utility generates a formatted banner comment suitable\n * for insertion at the top of bundled output files.\n *\n * By default, it automatically locates and reads the nearest\n * `package.json` file, you may also provide a custom package object\n * through the options parameter.\n *\n * - *Banner features:*\n * - Reads metadata from the nearest `package.json`.\n * - Supports custom package metadata via options.\n * - Provides safe fallbacks for missing fields.\n * - Produces a consistent, readable comment block.\n * - Normalizes repository URLs when possible.\n *\n * - *This function is intended for:*\n * - Bundler banners (tsdown, tsup, rollup, esbuild, etc).\n * - Generated build artifacts.\n * - Distributed library outputs.\n *\n * @param {GeneratePackageBannerOptions} [options]\n * Optional banner configuration.\n *\n * @returns {Promise<string>}\n * A formatted banner comment string.\n *\n * @throws {Error}\n * If no `package.json` can be found.\n *\n * @throws {Error}\n * If the resolved `package.json` contains invalid JSON.\n *\n * @example\n * ```ts\n * const banner = await generatePackageBanner({\n * title: \"Rzl Build Tools\",\n * author: \"Rzl\"\n * });\n * ```\n *\n * @example\n * ```ts\n * const banner = await generatePackageBanner();\n * ```\n */\nexport const generatePackageBanner = async (\n options: GeneratePackageBannerOptions = {}\n): Promise<string> => {\n let pkgJson: PackageJson | undefined;\n\n if (isPlainObject(options.packageJson)) {\n pkgJson = options.packageJson;\n } else {\n try {\n pkgJson = await getPackageJson();\n } catch (error) {\n throw new Error(\n \"[@rzl-zone/build-tools] - (generate-package-banner): Failed to resolve package.json\" +\n EOL +\n `Reason: ${(error as Error)?.message || \"unknown\"}`,\n { cause: error }\n );\n }\n }\n\n const withEof = options.withEof ?? true;\n\n const title =\n options.title ??\n (isNonEmptyString(pkgJson.name) ? pkgJson.name : \"Unknown Package\");\n\n const version = isNonEmptyString(pkgJson.version)\n ? pkgJson.version\n : \"Unknown\";\n\n const author =\n options.author ??\n (isNonEmptyString(pkgJson.author)\n ? pkgJson.author\n : isPlainObject(pkgJson.author) && isNonEmptyString(pkgJson.author.name)\n ? pkgJson.author.name\n : \"Unknown\");\n\n const repository = isNonEmptyString(pkgJson.homepage)\n ? pkgJson.homepage.split(\"#\")[0]\n : isNonEmptyString(pkgJson.repository)\n ? pkgJson.repository.replace(/^git\\+/, \"\").replace(/\\.git$/, \"\")\n : isPlainObject(pkgJson.repository) &&\n isNonEmptyString(pkgJson.repository.url)\n ? pkgJson.repository.url.replace(/^git\\+/, \"\").replace(/\\.git$/, \"\")\n : \"Unknown\";\n\n return joinLinesLoose(\n \"/*!\",\n \"* ========================================================================\",\n `* ${title}`,\n \"* ------------------------------------------------------------------------\",\n `* Version: \\`${version}\\``,\n `* Author: \\`${author}\\``,\n `* Repository: \\`${repository}\\``,\n \"* ========================================================================\",\n \"*/\",\n withEof ? \"\" : false\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuFA,MAAa,iBAAiB,OAC5B,UAAiC,CAAC,MACT;CAKzB,IAAI,UAJa,iBAAiB,QAAQ,GAAG,IACzC,KAAK,QAAQ,QAAQ,GAAG,IACxB,QAAQ,IAAI;CAIhB,OAAO,MAAM;EACX,MAAM,UAAU,KAAK,KAAK,SAAS,cAAc;EAEjD,IAAI,QAAQ,WAAW,OAAO,GAC5B,IAAI;GACF,OAAO,KAAK,MAAM,QAAQ,aAAa,SAAS,OAAO,CAAC;EAC1D,SAAS,KAAK;GACZ,MAAM,IAAI,MACR,0EAA0E,QAAQ,KAChF,MACA,WAAY,KAAe,WAAW,aACxC,EAAE,OAAO,IAAI,CACf;EACF;EAGF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================================
3
3
  * @rzl-zone/build-tools
4
4
  * ------------------------------------------------------------------------
5
- * Version: `0.0.13`
5
+ * Version: `0.0.14`
6
6
  * Author: `Rizalvin Dwiky <rizalvindwiky1998@gmail.com>`
7
7
  * Repository: `https://github.com/rzl-zone/rzl-zone/tree/main/packages/build-tools`
8
8
  * ========================================================================
9
9
  */
10
10
 
11
11
  "use strict";
12
- const require_formatter = require('./formatter-C-Yt_Gvf.cjs');
13
- const require_server = require('./server-BRuKWcjy.cjs');
12
+ const require_formatter = require('./formatter-BAkIXFPg.cjs');
13
+ const require_server = require('./server-DXTo5kvY.cjs');
14
14
  require("@rzl-zone/node-only");
15
15
  let node_path = require("node:path");
16
16
  node_path = require_formatter.__toESM(node_path, 1);
@@ -56,4 +56,4 @@ Object.defineProperty(exports, 'getPackageJson', {
56
56
  return getPackageJson;
57
57
  }
58
58
  });
59
- //# sourceMappingURL=package-banner-Cf5uu-7p.cjs.map
59
+ //# sourceMappingURL=package-banner-DyZ9SDgK.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"package-banner-Cf5uu-7p.cjs","names":["isNonEmptyString","path","fsExtra","EOL","isPlainObject","EOL","isNonEmptyString","joinLinesLoose"],"sources":["../src/core/get/package-json/index.ts","../src/core/generate/package-banner/index.ts"],"sourcesContent":["import \"@rzl-zone/node-only\";\n\nimport type { PackageJson } from \"type-fest\";\n\nimport path from \"node:path\";\n\nimport { isNonEmptyString } from \"@/_internal/utils/helper\";\n\nimport { fsExtra } from \"@/utils/server\";\nimport { EOL } from \"@/utils/client\";\n\n//? Types ----------------------------------------------------------------\n/** ----------------------------------------------------------------\n * * ***Configuration options for {@link getPackageJson | **`get-package-json`**}.***\n * ----------------------------------------------------------------\n */\nexport type GetPackageJsonOptions = {\n /** ----------------------------------------------------------------\n * * ***Working directory of the target project.***\n * ----------------------------------------------------------------\n *\n * This determines where the lookup for `package.json`\n * will start.\n *\n * - If provided, resolution begins from this directory.\n * - If omitted, defaults to `process.cwd()`.\n *\n * - ***Typical use cases:***\n * - CLI tools executed in a project directory.\n * - Monorepo root resolution.\n * - Custom build pipelines.\n *\n * @default process.cwd()\n *\n * @remarks\n * This should be the directory containing your project's\n * `package.json`, not the directory of this package.\n */\n cwd?: string;\n};\n\n//? Main -----------------------------------------------------------------\n/** ----------------------------------------------------------------\n * * ***Resolve and read the nearest `package.json`.***\n * ----------------------------------------------------------------\n *\n * This utility locates and loads the closest `package.json`\n * by walking up the directory tree starting from a given\n * working directory.\n *\n * - *Key characteristics:*\n * - Works in **Node ESM and CJS**.\n * - Compatible with **tsdown, rolldown, tsup, esbuild, vite, tsx, ts-node, and others**.\n * - Does **not** rely on JSON module imports.\n * - Fully typed via {@link PackageJson | **PackageJson**}.\n *\n * - *This function is intended for:*\n * - Build tools.\n * - Bundler configuration.\n * - CLI utilities.\n * - Monorepo-aware infrastructure code.\n *\n * @param options Optional resolution configuration.\n *\n * @returns The parsed contents of the resolved `package.json`.\n *\n * @example\n * ```ts\n * const pkg = await getPackageJson();\n * console.log(pkg.name, pkg.version);\n * ```\n *\n * @example\n * ```ts\n * const pkg = await getPackageJson({\n * cwd: process.cwd()\n * });\n * ```\n *\n * @throws If no `package.json` can be found.\n * @throws If the located `package.json` is invalid JSON.\n *\n * @remarks\n * - Resolution always starts from `cwd` or `process.cwd()`.\n * - Results are not cached by default.\n * - Designed for infrastructure-level usage, not hot paths.\n */\nexport const getPackageJson = async (\n options: GetPackageJsonOptions = {}\n): Promise<PackageJson> => {\n const startDir = isNonEmptyString(options.cwd)\n ? path.resolve(options.cwd)\n : process.cwd();\n\n let current = startDir;\n\n while (true) {\n const pkgPath = path.join(current, \"package.json\");\n\n if (fsExtra.existsSync(pkgPath)) {\n try {\n return JSON.parse(fsExtra.readFileSync(pkgPath, \"utf-8\"));\n } catch (err) {\n throw new Error(\n `[@rzl-zone/build-tools] - (get-package-json): Invalid package.json at '${pkgPath}'` +\n EOL +\n `Reason: ${(err as Error)?.message || \"unknown\"}`,\n { cause: err }\n );\n }\n }\n\n const parent = path.dirname(current);\n if (parent === current) break;\n\n current = parent;\n }\n\n throw new Error(\n \"[@rzl-zone/build-tools] - (get-package-json): Unable to locate package.json\"\n );\n};\n\n/** @deprecated Use {@link getPackageJson | `getPackageJson`} instead. */\nconst _getPackageJson = async (\n options: GetPackageJsonOptions = {}\n): Promise<PackageJson> => {\n return await getPackageJson(options);\n // if (options.cwd && options.from) {\n // throw new Error(\"Provide either `cwd` or `from`, not both.\");\n // }\n\n // const cwd = isNonEmptyString(options.cwd) ? options.cwd : process.cwd();\n\n // const baseUrl =\n // options.from && isNil(options.cwd)\n // ? options.from\n // : pathToFileURL(path.resolve(cwd, \"__entry__.js\"));\n\n // const createRequire = await getCreateRequire();\n // const reqPkg = createRequire(baseUrl);\n\n // let current = cwd;\n\n // while (true) {\n // const pkgPath = path.join(current, \"package.json\");\n\n // if (fsExtra.existsSync(pkgPath)) return reqPkg(pkgPath);\n\n // const parent = path.dirname(current);\n // if (parent === current) break;\n // current = parent;\n // }\n\n // throw new Error(\n // \"[@rzl-zone/build-tools] - (get-package-json): Unable to locate package.json !!!\"\n // );\n};\n","import \"@rzl-zone/node-only\";\n\nimport type { PackageJson } from \"type-fest\";\n\nimport { isNonEmptyString, isPlainObject } from \"@/_internal/utils/helper\";\n\nimport { EOL, joinLinesLoose } from \"@/utils/helper/formatter\";\nimport { getPackageJson } from \"../../get/package-json\";\n\n//? Types ----------------------------------------------------------------\n/** ----------------------------------------------------------------\n * * ***Configuration options for {@link generatePackageBanner | **`generate-package-banner`**}.***\n * ----------------------------------------------------------------\n */\nexport type GeneratePackageBannerOptions = {\n /** ----------------------------------------------------------------\n * * ***Display title shown in the banner.***\n * ----------------------------------------------------------------\n *\n * Defaults to the `name` field from `package.json`\n * when available.\n */\n title?: string;\n\n /** ----------------------------------------------------------------\n * * ***Author name displayed in the banner.***\n * ----------------------------------------------------------------\n *\n * When omitted, attempts to resolve from:\n * - `author.name`.\n * - `author` (*string*).\n */\n author?: string;\n\n /** ----------------------------------------------------------------\n * * ***Custom package metadata override.***\n * ----------------------------------------------------------------\n *\n * When provided, this object will be used instead of\n * reading from the filesystem.\n *\n * - Useful for testing or advanced build pipelines.\n */\n packageJson?: PackageJson;\n\n /** ----------------------------------------------------------------\n * * ***Append an end-of-file newline to the banner output.***\n * ----------------------------------------------------------------\n *\n * Controls whether the generated banner is terminated with\n * an end-of-file (EOF) newline character.\n *\n * When enabled, a trailing newline is appended to ensure:\n * - POSIX-compliant text files.\n * - Clean concatenation with subsequent source content.\n * - Consistent formatting during code injection.\n *\n * @default true\n */\n withEof?: boolean;\n};\n\n//? Main -----------------------------------------------------------------\n/** ----------------------------------------------------------------\n * * ***Generate a standardized top banner from `package.json`.***\n * ----------------------------------------------------------------\n *\n * This utility generates a formatted banner comment suitable\n * for insertion at the top of bundled output files.\n *\n * By default, it automatically locates and reads the nearest\n * `package.json` file, you may also provide a custom package object\n * through the options parameter.\n *\n * - *Banner features:*\n * - Reads metadata from the nearest `package.json`.\n * - Supports custom package metadata via options.\n * - Provides safe fallbacks for missing fields.\n * - Produces a consistent, readable comment block.\n * - Normalizes repository URLs when possible.\n *\n * - *This function is intended for:*\n * - Bundler banners (tsdown, tsup, rollup, esbuild, etc).\n * - Generated build artifacts.\n * - Distributed library outputs.\n *\n * @param {GeneratePackageBannerOptions} [options]\n * Optional banner configuration.\n *\n * @returns {Promise<string>}\n * A formatted banner comment string.\n *\n * @throws {Error}\n * If no `package.json` can be found.\n *\n * @throws {Error}\n * If the resolved `package.json` contains invalid JSON.\n *\n * @example\n * ```ts\n * const banner = await generatePackageBanner({\n * title: \"Rzl Build Tools\",\n * author: \"Rzl\"\n * });\n * ```\n *\n * @example\n * ```ts\n * const banner = await generatePackageBanner();\n * ```\n */\nexport const generatePackageBanner = async (\n options: GeneratePackageBannerOptions = {}\n): Promise<string> => {\n let pkgJson: PackageJson | undefined;\n\n if (isPlainObject(options.packageJson)) {\n pkgJson = options.packageJson;\n } else {\n try {\n pkgJson = await getPackageJson();\n } catch (error) {\n throw new Error(\n \"[@rzl-zone/build-tools] - (generate-package-banner): Failed to resolve package.json\" +\n EOL +\n `Reason: ${(error as Error)?.message || \"unknown\"}`,\n { cause: error }\n );\n }\n }\n\n const withEof = options.withEof ?? true;\n\n const title =\n options.title ??\n (isNonEmptyString(pkgJson.name) ? pkgJson.name : \"Unknown Package\");\n\n const version = isNonEmptyString(pkgJson.version)\n ? pkgJson.version\n : \"Unknown\";\n\n const author =\n options.author ??\n (isNonEmptyString(pkgJson.author)\n ? pkgJson.author\n : isPlainObject(pkgJson.author) && isNonEmptyString(pkgJson.author.name)\n ? pkgJson.author.name\n : \"Unknown\");\n\n const repository = isNonEmptyString(pkgJson.homepage)\n ? pkgJson.homepage.split(\"#\")[0]\n : isNonEmptyString(pkgJson.repository)\n ? pkgJson.repository.replace(/^git\\+/, \"\").replace(/\\.git$/, \"\")\n : isPlainObject(pkgJson.repository) &&\n isNonEmptyString(pkgJson.repository.url)\n ? pkgJson.repository.url.replace(/^git\\+/, \"\").replace(/\\.git$/, \"\")\n : \"Unknown\";\n\n return joinLinesLoose(\n \"/*!\",\n \"* ========================================================================\",\n `* ${title}`,\n \"* ------------------------------------------------------------------------\",\n `* Version: \\`${version}\\``,\n `* Author: \\`${author}\\``,\n `* Repository: \\`${repository}\\``,\n \"* ========================================================================\",\n \"*/\",\n withEof ? \"\" : false\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuFA,MAAa,iBAAiB,OAC5B,UAAiC,CAAC,MACT;CAKzB,IAAI,UAJaA,mCAAiB,QAAQ,GAAG,IACzCC,kBAAK,QAAQ,QAAQ,GAAG,IACxB,QAAQ,IAAI;CAIhB,OAAO,MAAM;EACX,MAAM,UAAUA,kBAAK,KAAK,SAAS,cAAc;EAEjD,IAAIC,uBAAQ,WAAW,OAAO,GAC5B,IAAI;GACF,OAAO,KAAK,MAAMA,uBAAQ,aAAa,SA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AAM,SACN,8EACA,iBAAiB,QAAQ,KACzB,gBAAgB,OAAO,KACvB,oBAAoB,WAAW,KAC/B,8EACA,MACA,UAAU,KAAK,KACjB;AACF"}
1
+ {"version":3,"file":"package-banner-DyZ9SDgK.cjs","names":["isNonEmptyString","path","fsExtra","EOL","isPlainObject","EOL","isNonEmptyString","joinLinesLoose"],"sources":["../src/core/get/package-json/index.ts","../src/core/generate/package-banner/index.ts"],"sourcesContent":["import \"@rzl-zone/node-only\";\n\nimport type { PackageJson } from \"type-fest\";\n\nimport path from \"node:path\";\n\nimport { isNonEmptyString } from \"@/_internal/utils/helper\";\n\nimport { fsExtra } from \"@/utils/server\";\nimport { EOL } from \"@/utils/client\";\n\n//? Types ----------------------------------------------------------------\n/** ----------------------------------------------------------------\n * * ***Configuration options for {@link getPackageJson | **`get-package-json`**}.***\n * ----------------------------------------------------------------\n */\nexport type GetPackageJsonOptions = {\n /** ----------------------------------------------------------------\n * * ***Working directory of the target project.***\n * ----------------------------------------------------------------\n *\n * This determines where the lookup for `package.json`\n * will start.\n *\n * - If provided, resolution begins from this directory.\n * - If omitted, defaults to `process.cwd()`.\n *\n * - ***Typical use cases:***\n * - CLI tools executed in a project directory.\n * - Monorepo root resolution.\n * - Custom build pipelines.\n *\n * @default process.cwd()\n *\n * @remarks\n * This should be the directory containing your project's\n * `package.json`, not the directory of this package.\n */\n cwd?: string;\n};\n\n//? Main -----------------------------------------------------------------\n/** ----------------------------------------------------------------\n * * ***Resolve and read the nearest `package.json`.***\n * ----------------------------------------------------------------\n *\n * This utility locates and loads the closest `package.json`\n * by walking up the directory tree starting from a given\n * working directory.\n *\n * - *Key characteristics:*\n * - Works in **Node ESM and CJS**.\n * - Compatible with **tsdown, rolldown, tsup, esbuild, vite, tsx, ts-node, and others**.\n * - Does **not** rely on JSON module imports.\n * - Fully typed via {@link PackageJson | **PackageJson**}.\n *\n * - *This function is intended for:*\n * - Build tools.\n * - Bundler configuration.\n * - CLI utilities.\n * - Monorepo-aware infrastructure code.\n *\n * @param options Optional resolution configuration.\n *\n * @returns The parsed contents of the resolved `package.json`.\n *\n * @example\n * ```ts\n * const pkg = await getPackageJson();\n * console.log(pkg.name, pkg.version);\n * ```\n *\n * @example\n * ```ts\n * const pkg = await getPackageJson({\n * cwd: process.cwd()\n * });\n * ```\n *\n * @throws If no `package.json` can be found.\n * @throws If the located `package.json` is invalid JSON.\n *\n * @remarks\n * - Resolution always starts from `cwd` or `process.cwd()`.\n * - Results are not cached by default.\n * - Designed for infrastructure-level usage, not hot paths.\n */\nexport const getPackageJson = async (\n options: GetPackageJsonOptions = {}\n): Promise<PackageJson> => {\n const startDir = isNonEmptyString(options.cwd)\n ? path.resolve(options.cwd)\n : process.cwd();\n\n let current = startDir;\n\n while (true) {\n const pkgPath = path.join(current, \"package.json\");\n\n if (fsExtra.existsSync(pkgPath)) {\n try {\n return JSON.parse(fsExtra.readFileSync(pkgPath, \"utf-8\"));\n } catch (err) {\n throw new Error(\n `[@rzl-zone/build-tools] - (get-package-json): Invalid package.json at '${pkgPath}'` +\n EOL +\n `Reason: ${(err as Error)?.message || \"unknown\"}`,\n { cause: err }\n );\n }\n }\n\n const parent = path.dirname(current);\n if (parent === current) break;\n\n current = parent;\n }\n\n throw new Error(\n \"[@rzl-zone/build-tools] - (get-package-json): Unable to locate package.json\"\n );\n};\n\n/** @deprecated Use {@link getPackageJson | `getPackageJson`} instead. */\nconst _getPackageJson = async (\n options: GetPackageJsonOptions = {}\n): Promise<PackageJson> => {\n return await getPackageJson(options);\n // if (options.cwd && options.from) {\n // throw new Error(\"Provide either `cwd` or `from`, not both.\");\n // }\n\n // const cwd = isNonEmptyString(options.cwd) ? options.cwd : process.cwd();\n\n // const baseUrl =\n // options.from && isNil(options.cwd)\n // ? options.from\n // : pathToFileURL(path.resolve(cwd, \"__entry__.js\"));\n\n // const createRequire = await getCreateRequire();\n // const reqPkg = createRequire(baseUrl);\n\n // let current = cwd;\n\n // while (true) {\n // const pkgPath = path.join(current, \"package.json\");\n\n // if (fsExtra.existsSync(pkgPath)) return reqPkg(pkgPath);\n\n // const parent = path.dirname(current);\n // if (parent === current) break;\n // current = parent;\n // }\n\n // throw new Error(\n // \"[@rzl-zone/build-tools] - (get-package-json): Unable to locate package.json !!!\"\n // );\n};\n","import \"@rzl-zone/node-only\";\n\nimport type { PackageJson } from \"type-fest\";\n\nimport { isNonEmptyString, isPlainObject } from \"@/_internal/utils/helper\";\n\nimport { EOL, joinLinesLoose } from \"@/utils/helper/formatter\";\nimport { getPackageJson } from \"../../get/package-json\";\n\n//? Types ----------------------------------------------------------------\n/** ----------------------------------------------------------------\n * * ***Configuration options for {@link generatePackageBanner | **`generate-package-banner`**}.***\n * ----------------------------------------------------------------\n */\nexport type GeneratePackageBannerOptions = {\n /** ----------------------------------------------------------------\n * * ***Display title shown in the banner.***\n * ----------------------------------------------------------------\n *\n * Defaults to the `name` field from `package.json`\n * when available.\n */\n title?: string;\n\n /** ----------------------------------------------------------------\n * * ***Author name displayed in the banner.***\n * ----------------------------------------------------------------\n *\n * When omitted, attempts to resolve from:\n * - `author.name`.\n * - `author` (*string*).\n */\n author?: string;\n\n /** ----------------------------------------------------------------\n * * ***Custom package metadata override.***\n * ----------------------------------------------------------------\n *\n * When provided, this object will be used instead of\n * reading from the filesystem.\n *\n * - Useful for testing or advanced build pipelines.\n */\n packageJson?: PackageJson;\n\n /** ----------------------------------------------------------------\n * * ***Append an end-of-file newline to the banner output.***\n * ----------------------------------------------------------------\n *\n * Controls whether the generated banner is terminated with\n * an end-of-file (EOF) newline character.\n *\n * When enabled, a trailing newline is appended to ensure:\n * - POSIX-compliant text files.\n * - Clean concatenation with subsequent source content.\n * - Consistent formatting during code injection.\n *\n * @default true\n */\n withEof?: boolean;\n};\n\n//? Main -----------------------------------------------------------------\n/** ----------------------------------------------------------------\n * * ***Generate a standardized top banner from `package.json`.***\n * ----------------------------------------------------------------\n *\n * This utility generates a formatted banner comment suitable\n * for insertion at the top of bundled output files.\n *\n * By default, it automatically locates and reads the nearest\n * `package.json` file, you may also provide a custom package object\n * through the options parameter.\n *\n * - *Banner features:*\n * - Reads metadata from the nearest `package.json`.\n * - Supports custom package metadata via options.\n * - Provides safe fallbacks for missing fields.\n * - Produces a consistent, readable comment block.\n * - Normalizes repository URLs when possible.\n *\n * - *This function is intended for:*\n * - Bundler banners (tsdown, tsup, rollup, esbuild, etc).\n * - Generated build artifacts.\n * - Distributed library outputs.\n *\n * @param {GeneratePackageBannerOptions} [options]\n * Optional banner configuration.\n *\n * @returns {Promise<string>}\n * A formatted banner comment string.\n *\n * @throws {Error}\n * If no `package.json` can be found.\n *\n * @throws {Error}\n * If the resolved `package.json` contains invalid JSON.\n *\n * @example\n * ```ts\n * const banner = await generatePackageBanner({\n * title: \"Rzl Build Tools\",\n * author: \"Rzl\"\n * });\n * ```\n *\n * @example\n * ```ts\n * const banner = await generatePackageBanner();\n * ```\n */\nexport const generatePackageBanner = async (\n options: GeneratePackageBannerOptions = {}\n): Promise<string> => {\n let pkgJson: PackageJson | undefined;\n\n if (isPlainObject(options.packageJson)) {\n pkgJson = options.packageJson;\n } else {\n try {\n pkgJson = await getPackageJson();\n } catch (error) {\n throw new Error(\n \"[@rzl-zone/build-tools] - (generate-package-banner): Failed to resolve package.json\" +\n EOL +\n `Reason: ${(error as Error)?.message || \"unknown\"}`,\n { cause: error }\n );\n }\n }\n\n const withEof = options.withEof ?? true;\n\n const title =\n options.title ??\n (isNonEmptyString(pkgJson.name) ? pkgJson.name : \"Unknown Package\");\n\n const version = isNonEmptyString(pkgJson.version)\n ? pkgJson.version\n : \"Unknown\";\n\n const author =\n options.author ??\n (isNonEmptyString(pkgJson.author)\n ? pkgJson.author\n : isPlainObject(pkgJson.author) && isNonEmptyString(pkgJson.author.name)\n ? pkgJson.author.name\n : \"Unknown\");\n\n const repository = isNonEmptyString(pkgJson.homepage)\n ? pkgJson.homepage.split(\"#\")[0]\n : isNonEmptyString(pkgJson.repository)\n ? pkgJson.repository.replace(/^git\\+/, \"\").replace(/\\.git$/, \"\")\n : isPlainObject(pkgJson.repository) &&\n isNonEmptyString(pkgJson.repository.url)\n ? pkgJson.repository.url.replace(/^git\\+/, \"\").replace(/\\.git$/, \"\")\n : \"Unknown\";\n\n return joinLinesLoose(\n \"/*!\",\n \"* ========================================================================\",\n `* ${title}`,\n \"* ------------------------------------------------------------------------\",\n `* Version: \\`${version}\\``,\n `* Author: \\`${author}\\``,\n `* Repository: \\`${repository}\\``,\n \"* ========================================================================\",\n \"*/\",\n withEof ? \"\" : false\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuFA,MAAa,iBAAiB,OAC5B,UAAiC,CAAC,MACT;CAKzB,IAAI,UAJaA,mCAAiB,QAAQ,GAAG,IACzCC,kBAAK,QAAQ,QAAQ,GAAG,IACxB,QAAQ,IAAI;CAIhB,OAAO,MAAM;EACX,MAAM,UAAUA,kBAAK,KAAK,SAAS,cAAc;EAEjD,IAAIC,uBAAQ,WAAW,OAAO,GAC5B,IAAI;GACF,OAAO,KAAK,MAAMA,uBAAQ,aAAa,SAAS,OAAO,CAAC;EAC1D,SAAS,KAAK;GACZ,MAAM,IAAI,MACR,0EAA0E,QAAQ,KAChFC,wBACA,WAAY,KAAe,WAAW,aACxC,EAAE,OAAO,IAAI,CACf;EACF;EAGF,MAAM,SAASF,kBAAK,QAAQ,OAAO;EACnC,IAAI,WAAW,SAAS;EAExB,UAAU;CACZ;CAEA,MAAM,IAAI,MACR,6EACF;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACVA,MAAa,wBAAwB,OACnC,UAAwC,CAAC,MACrB;CACpB,IAAI;CAEJ,IAAIG,gCAAc,QAAQ,WAAW,GACnC,UAAU,QAAQ;MAElB,IAAI;EACF,UAAU,MAAM,eAAe;CACjC,SAAS,OAAO;EACd,MAAM,IAAI,MACR,wFACEC,wBACA,WAAY,OAAiB,WAAW,aAC1C,EAAE,OAAO,MAAM,CACjB;CACF;CAGF,MAAM,UAAU,QAAQ,WAAW;CAEnC,MAAM,QACJ,QAAQ,UACPC,mCAAiB,QAAQ,IAAI,IAAI,QAAQ,OAAO;CAEnD,MAAM,UAAUA,mCAAiB,QAAQ,OAAO,IAC5C,QAAQ,UACR;CAEJ,MAAM,SACJ,QAAQ,WACPA,mCAAiB,QAAQ,MAAM,IAC5B,QAAQ,SACRF,gCAAc,QAAQ,MAAM,KAAKE,mCAAiB,QAAQ,OAAO,IAAI,IACnE,QAAQ,OAAO,OACf;CAER,MAAM,aAAaA,mCAAiB,QAAQ,QAAQ,IAChD,QAAQ,SAAS,MAAM,GAAG,CAAC,CAAC,KAC5BA,mCAAiB,QAAQ,UAAU,IACjC,QAAQ,WAAW,QAAQ,UAAU,EAAE,CAAC,CAAC,QAAQ,UAAU,EAAE,IAC7DF,gCAAc,QAAQ,UAAU,KAC9BE,mCAAiB,QAAQ,WAAW,GAAG,IACvC,QAAQ,WAAW,IAAI,QAAQ,UAAU,EAAE,CAAC,CAAC,QAAQ,UAAU,EAAE,IACjE;CAER,OAAOC,iCACL,OACA,8EACA,MAAM,SACN,8EACA,iBAAiB,QAAQ,KACzB,gBAAgB,OAAO,KACvB,oBAAoB,WAAW,KAC/B,8EACA,MACA,UAAU,KAAK,KACjB;AACF"}
@@ -2,13 +2,13 @@
2
2
  * ========================================================================
3
3
  * @rzl-zone/build-tools
4
4
  * ------------------------------------------------------------------------
5
- * Version: `0.0.13`
5
+ * Version: `0.0.14`
6
6
  * Author: `Rizalvin Dwiky <rizalvindwiky1998@gmail.com>`
7
7
  * Repository: `https://github.com/rzl-zone/rzl-zone/tree/main/packages/build-tools`
8
8
  * ========================================================================
9
9
  */
10
10
 
11
- import { E as safeStableStringify, T as normalizeSpaces, _ as isNonEmptyString, a as joinLines, b as isPlainObject, c as picocolors, m as isError, r as formatOptionValue, y as isNumber } from "./formatter-BFgV1HhV.js";
11
+ import { E as safeStableStringify, T as normalizeSpaces, _ as isNonEmptyString, a as joinLines, b as isPlainObject, c as picocolors, m as isError, r as formatOptionValue, y as isNumber } from "./formatter-CIMnJqKX.js";
12
12
  import "@rzl-zone/node-only";
13
13
  import os from "node:os";
14
14
  import _fastGlob from "fast-glob";
@@ -195,4 +195,4 @@ const BUILD_LOGGER = {
195
195
  const fsExtra = _fsExtra;
196
196
  const fastGlob = _fastGlob;
197
197
  export { sourceOfIsDeepStrictEqual as a, resolvePatternOptions as c, sourceOf as i, sourceOfPatternOptions as l, fsExtra as n, ICONS as o, BUILD_LOGGER as r, defaultPatternOptions as s, fastGlob as t };
198
- //# sourceMappingURL=server-B1jiYLZq.js.map
198
+ //# sourceMappingURL=server-CDjzX9MQ.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"server-B1jiYLZq.js","names":[],"sources":["../src/_internal/libs/fast-globe-options.ts","../src/utils/helper/icons.ts","../src/_internal/utils/logger-builder.ts","../src/utils/server.ts"],"sourcesContent":["import \"@rzl-zone/node-only\";\n\nimport type { OmitStrict, Prettify } from \"../types/extra\";\n\nimport os from \"node:os\";\nimport * as fg from \"fast-glob\";\n\nimport {\n isPlainObject,\n safeStableStringify,\n type SafeStableStringifyOptions\n} from \"@/_internal/utils/helper\";\n\ntype IfTrueGeneric<T extends boolean, K> = T extends true ? K : never;\n\n/** ----------------------------------------------------------------\n * * ***Supported pattern matching options.***\n * ----------------------------------------------------------------\n * Defines the subset of {@link fg | `fast-glob`} options exposed by\n * this module for pattern-based file resolution.\n *\n * This type intentionally omits several low-level or environment-\n * controlled fields to ensure predictable and safe behavior.\n *\n * ----------------------------------------------------------------\n *\n * *Excluded options (managed internally):*\n *\n * - `fs`\n * - `cwd`\n * - `stats`\n * - `deep`\n * - `extglob`\n * - `suppressErrors`\n * - `braceExpansion`\n *\n * These fields are controlled by the runtime environment and should\n * not be overridden by consumers.\n *\n * ----------------------------------------------------------------\n * @template FilesOnly\n * When `true`, directory filtering options (`onlyFiles`, `onlyDirectories`)\n * are removed from the public API surface, preventing consumers from\n * modifying directory matching behavior.\n *\n * @template ForceUnique\n * When `true`, the `unique` option is removed from the public API to enforce internal uniqueness handling.\n *\n * This allows higher-level utilities to guarantee that matched results\n * are always deduplicated.\n *\n * ----------------------------------------------------------------\n *\n * This type serves as the public configuration contract used when\n * resolving glob patterns.\n */\nexport type PatternOptions<\n FilesOnly extends boolean = false,\n ForceUnique extends boolean = false\n> = OmitStrict<\n fg.Options,\n | \"fs\"\n | \"cwd\"\n | \"stats\"\n | \"deep\"\n | \"extglob\"\n | \"suppressErrors\"\n | \"braceExpansion\"\n | \"dot\"\n | IfTrueGeneric<FilesOnly, \"onlyFiles\" | \"onlyDirectories\">\n | IfTrueGeneric<ForceUnique, \"unique\">,\n { skipPrettify: true }\n> & {\n /** Allow patterns to match entries that begin with a period (`.`).\n *\n * @default true\n */\n dot?: boolean;\n};\n\n/** ----------------------------------------------------------------\n * * ***Pattern configuration wrapper.***\n * ----------------------------------------------------------------\n *\n * Provides an optional container for {@link PatternOptions | `PatternOptions`}.\n *\n * This wrapper allows pattern matching configuration to be composed\n * within higher-level configuration objects without flattening\n * the option namespace.\n *\n * ----------------------------------------------------------------\n *\n * @template FilesOnly\n * When `true`, directory-related options (`onlyFiles`, `onlyDirectories`)\n * are removed from the public configuration to enforce file-only matching.\n *\n * @template ForceUnique\n * When `true`, the `unique` option is removed from the underlying\n * {@link PatternOptions | `PatternOptions`} to guarantee deduplicated results.\n *\n * ----------------------------------------------------------------\n *\n * @example\n * ```ts\n * const config: PatternConfig = {\n * patternOptions: {\n * dot: true\n * }\n * };\n * ```\n */\nexport type PatternConfig<\n FilesOnly extends boolean = false,\n ForceUnique extends boolean = false\n> = Prettify<{\n /** ----------------------------------------------------------------\n * * ***Pattern matching options.***\n * ----------------------------------------------------------------\n *\n * Optional configuration for controlling file pattern resolution.\n *\n * When provided, these options are sanitized and merged with\n * the internal default configuration before being passed to\n * {@link fg | `fast-glob`}.\n *\n * @see {@link PatternOptions | `PatternOptions`} for supported fields.\n */\n patternOptions?: PatternOptions<FilesOnly, ForceUnique>;\n}>;\n\n/** ----------------------------------------------------------------\n * * ***Default pattern matching configuration.***\n * ----------------------------------------------------------------\n *\n * Represents the canonical baseline configuration used when\n * resolving pattern options.\n *\n * These values are applied whenever a user does not explicitly\n * provide overrides.\n *\n * This object also acts as the runtime source of truth for\n * allowed pattern option keys.\n */\nexport const defaultPatternOptions: PatternOptions = {\n absolute: false,\n baseNameMatch: false,\n caseSensitiveMatch: true,\n concurrency: os.cpus().length,\n dot: true,\n followSymbolicLinks: true,\n globstar: true,\n ignore: [],\n markDirectories: false,\n objectMode: false,\n onlyDirectories: false,\n onlyFiles: true,\n unique: true,\n throwErrorOnBrokenSymbolicLink: false\n};\n\n/** ----------------------------------------------------------------\n * * ***Determines whether a pattern option key is allowed.***\n * ----------------------------------------------------------------\n *\n * Evaluates whether a given {@link PatternOptions | `PatternOptions`}\n * key is permitted under the provided runtime policy.\n *\n * This function enforces restrictions such as:\n *\n * - Disallowing directory-related options when `filesOnly` is enabled.\n * - Preventing external control over the `unique` option when\n * `forceUnique` is enabled.\n *\n * ----------------------------------------------------------------\n *\n * @param key\n * A candidate {@link PatternOptions | `PatternOptions`} property key.\n *\n * @param policy\n * Optional runtime policy controlling which keys are allowed.\n *\n * @returns\n * `true` if the key is permitted under the current policy,\n * otherwise `false`.\n *\n * @internal\n */\nfunction isKeyAllowed(\n key: keyof PatternOptions,\n policy?: PatternRuntimePolicy<boolean, boolean>\n): boolean {\n if (!policy) return true;\n\n if (policy.filesOnly && (key === \"onlyFiles\" || key === \"onlyDirectories\"))\n return false;\n\n if (policy.forceUnique && key === \"unique\") return false;\n\n return true;\n}\n\n/** ----------------------------------------------------------------\n * * ***Runtime whitelist of allowed pattern option keys.***\n * ----------------------------------------------------------------\n *\n * Derived directly from {@link defaultPatternOptions | `defaultPatternOptions`}.\n *\n * This ensures strict synchronization between:\n *\n * - The static {@link PatternOptions | `PatternOptions`} type.\n * - Runtime validation logic used during option sanitization.\n *\n * By deriving the key list from the default configuration,\n * this module avoids manual duplication of allowed option names.\n *\n * ----------------------------------------------------------------\n *\n * This whitelist is used internally to:\n *\n * - Remove unknown properties from user-provided configuration.\n * - Guarantee that only supported options are passed to\n * {@link fg | `fast-glob`}.\n *\n * ----------------------------------------------------------------\n *\n * @internal\n */\nconst PATTERN_OPTION_KEYS = new Set<keyof PatternOptions>(\n Object.keys(defaultPatternOptions) as (keyof PatternOptions)[]\n);\n\n/** ----------------------------------------------------------------\n * * ***Assigns a validated pattern option property.***\n * ----------------------------------------------------------------\n *\n * Performs a type-safe assignment from a source object into a\n * partial {@link PatternOptions | `PatternOptions`} result object.\n *\n * A generic constraint is used to preserve proper indexed access\n * typing and avoid union assignment limitations in TypeScript.\n *\n * This helper assumes that:\n *\n * - The provided `key` has already been validated against\n * {@link PATTERN_OPTION_KEYS | `PATTERN_OPTION_KEYS`}.\n * - The property exists on the `source` object.\n *\n * ----------------------------------------------------------------\n *\n * @template K\n * A valid key of {@link PatternOptions | `PatternOptions`}.\n *\n * @param key\n * The validated pattern option key to assign.\n *\n * @param source\n * The original input object containing the property value.\n *\n * @param target\n * The partial result object receiving the assigned value.\n *\n * @internal\n */\nfunction assignIfAllowed<K extends keyof PatternOptions>(\n key: K,\n source: Record<string, unknown>,\n target: Partial<PatternOptions>\n) {\n target[key] = source[key] as PatternOptions[K];\n}\n\n/** ----------------------------------------------------------------\n * * ***Runtime policy controlling pattern option exposure.***\n * ----------------------------------------------------------------\n *\n * Defines runtime constraints that restrict which fields from\n * {@link PatternOptions | `PatternOptions`} are allowed to appear\n * in the final resolved configuration.\n *\n * This policy is primarily used by higher-level utilities that\n * enforce stricter behavior than the raw {@link fg | `fast-glob`} API.\n *\n * ----------------------------------------------------------------\n *\n * *Supported policies:*\n *\n * - `filesOnly`\n * Prevents directory-related configuration from being externally\n * controlled.\n *\n * - `forceUnique`\n * Ensures that uniqueness behavior is handled internally and\n * cannot be overridden by user configuration.\n *\n * ----------------------------------------------------------------\n *\n * These policies influence both:\n *\n * - Runtime sanitization of user-provided pattern options.\n * - Final resolution of merged configuration values.\n *\n * ----------------------------------------------------------------\n *\n * @template FilesOnly\n * Indicates whether directory-related options should be excluded.\n *\n * @template ForceUnique\n * Indicates whether the `unique` option should be excluded.\n */\nexport type PatternRuntimePolicy<\n FilesOnly extends boolean = boolean,\n ForceUnique extends boolean = boolean\n> = {\n /** ----------------------------------------------------------------\n * * ***Restricts directory-related pattern options.***\n * ----------------------------------------------------------------\n *\n * When enabled, directory filtering options are excluded from the\n * final configuration produced by the pattern resolution process.\n *\n * This prevents external configuration from modifying whether\n * directories or files are matched by the underlying\n * {@link fg | `fast-glob`} operation.\n *\n * ----------------------------------------------------------------\n *\n * *Affected options:*\n *\n * - `onlyFiles`\n * - `onlyDirectories`\n *\n * ----------------------------------------------------------------\n *\n * When `true`, these options are ignored during sanitization and\n * removed from the final resolved configuration.\n *\n * ----------------------------------------------------------------\n * @default false\n */\n filesOnly?: FilesOnly;\n\n /** ----------------------------------------------------------------\n * * ***Enforces internal uniqueness behavior.***\n * ----------------------------------------------------------------\n *\n * When enabled, the `unique` option is excluded from user-provided\n * configuration and controlled internally by the runtime.\n *\n * This ensures that result deduplication behavior cannot be\n * overridden by external configuration.\n *\n * ----------------------------------------------------------------\n *\n * *Affected option:*\n *\n * - `unique`\n *\n * ----------------------------------------------------------------\n *\n * When `true`, this option is ignored during sanitization and\n * removed from the final resolved configuration.\n *\n * ----------------------------------------------------------------\n * @default false\n */\n forceUnique?: ForceUnique;\n};\n\n/** ----------------------------------------------------------------\n * * ***Sanitizes pattern options by removing unknown keys.***\n * ----------------------------------------------------------------\n *\n * Ensures that the provided object only contains keys that exist in\n * {@link defaultPatternOptions | `defaultPatternOptions`}, any unknown keys will be removed.\n *\n * This function is intended for API boundary validation to prevent\n * unsafe or unexpected configuration injection.\n *\n * - *Behavior:*\n * - Ignores non-object values (returns empty object).\n * - Removes keys not present in {@link defaultPatternOptions | `defaultPatternOptions`}.\n * - Does NOT mutate the original object.\n *\n * ----------------------------------------------------------------\n *\n * @param input\n * The value to sanitize.\n *\n * @param policy\n * Optional runtime policy restricting which pattern options\n * are allowed during sanitization.\n *\n * @returns\n * A new object containing only allowed pattern option keys.\n *\n * @example\n * ```ts\n * const userOptions = {\n * absolute: true,\n * dot: true,\n * fakeKey: 123\n * };\n *\n * const clean = sanitizePatternOptions(userOptions);\n *\n * // Result:\n * // {\n * // absolute: true,\n * // dot: true\n * // }\n * ```\n */\nexport function sanitizePatternOptions(\n input: unknown,\n policy?: PatternRuntimePolicy<false, false>\n): Partial<PatternOptions<false, false>>;\nexport function sanitizePatternOptions(\n input: unknown,\n policy?: PatternRuntimePolicy<true, false>\n): Partial<PatternOptions<true, false>>;\nexport function sanitizePatternOptions(\n input: unknown,\n policy?: PatternRuntimePolicy<false, true>\n): Partial<PatternOptions<false, true>>;\nexport function sanitizePatternOptions(\n input: unknown,\n policy?: PatternRuntimePolicy<true, true>\n): Partial<PatternOptions<true, true>>;\nexport function sanitizePatternOptions(\n input: unknown,\n policy?: PatternRuntimePolicy<false, false>\n): Partial<PatternOptions<false, false>>;\nexport function sanitizePatternOptions(\n input: unknown,\n policy?: PatternRuntimePolicy<boolean, boolean>\n): Partial<PatternOptions>;\nexport function sanitizePatternOptions(\n input: unknown,\n policy?: PatternRuntimePolicy<boolean, boolean>\n): Partial<PatternOptions> {\n if (!isPlainObject(input)) return {};\n\n const source = input as Record<string, unknown>;\n const result: Partial<PatternOptions> = {};\n\n for (const key of Object.keys(source) as (keyof PatternOptions)[]) {\n if (PATTERN_OPTION_KEYS.has(key) && isKeyAllowed(key, policy)) {\n assignIfAllowed(key, source, result);\n }\n }\n\n return result;\n}\n\n/** ----------------------------------------------------------------\n * * ***Resolves pattern options with default values.***\n * ----------------------------------------------------------------\n *\n * Applies {@link sanitizePatternOptions | `sanitizePatternOptions`} to the provided input and merges\n * the result with `defaultPatternOptions`.\n *\n * - Unknown keys are removed.\n * - Missing keys fall back to defaults.\n *\n * Guarantees a fully-formed {@link PatternOptions | `PatternOptions`} object safe for direct\n * usage with `fast-glob`.\n *\n * ----------------------------------------------------------------\n *\n * @param input\n * Optional user-provided pattern options.\n *\n * @param policy\n * Optional runtime policy restricting which configuration\n * fields are allowed in the final resolved options.\n *\n * @returns\n * A complete and validated\n * {@link PatternOptions | `PatternOptions`} object ready for\n * direct usage with {@link fg | `fast-glob`}.\n *\n * @example\n * ```ts\n * const options = resolvePatternOptions({\n * dot: true,\n * fakeKey: 123\n * });\n *\n * // Result:\n * // {\n * // absolute: false,\n * // baseNameMatch: false,\n * // ...\n * // dot: true,\n * // ...\n * // }\n *\n * const matched = await fastGlobe(patterns, options);\n * ```\n */\nexport function resolvePatternOptions(\n input: unknown,\n policy?: PatternRuntimePolicy<false, false>\n): PatternOptions<false, false>;\nexport function resolvePatternOptions(\n input: unknown,\n policy?: PatternRuntimePolicy<true, false>\n): PatternOptions<true, false>;\nexport function resolvePatternOptions(\n input: unknown,\n policy?: PatternRuntimePolicy<false, true>\n): PatternOptions<false, true>;\nexport function resolvePatternOptions(\n input: unknown,\n policy?: PatternRuntimePolicy<true, true>\n): PatternOptions<true, true>;\nexport function resolvePatternOptions(\n input: unknown,\n policy?: PatternRuntimePolicy<false, false>\n): PatternOptions<false, false>;\nexport function resolvePatternOptions(\n input: unknown,\n policy?: PatternRuntimePolicy<boolean, boolean>\n): PatternOptions {\n const clean = sanitizePatternOptions(input, policy);\n\n const options: PatternOptions = {\n ...defaultPatternOptions,\n ...clean\n };\n\n if (policy?.filesOnly) {\n delete options.onlyFiles;\n delete options.onlyDirectories;\n }\n\n if (policy?.forceUnique) {\n delete options.unique;\n }\n\n return options;\n}\n\n/** ----------------------------------------------------------------\n * * ***Stable structural equality detector.***\n * ----------------------------------------------------------------\n *\n * Determines whether two values are structurally identical using\n * deterministic serialization via `safeStableStringify`.\n *\n * - *This comparison:*\n * - Preserves `undefined` values.\n * - Sorts object keys.\n * - Sorts arrays (optional structural normalization).\n *\n * - *Ensures stable equality checks for configuration objects where:*\n * - Property order may differ.\n * - Object references are not identical.\n * - Deep comparison is required.\n *\n * ----------------------------------------------------------------\n *\n * @template T - Value type being compared.\n *\n * @param value - The current runtime value.\n * @param defaultValue - The default reference value.\n *\n * @returns\n * - `\"default\"` ➔ If values are structurally identical.\n * - `\"overridden\"` ➔ If values differ.\n *\n * @example\n * ```ts\n * const source = sourceOfPatternOptions(\n * cleanPatternOptions,\n * defaultPatternOptions\n * );\n *\n * // ➔ \"default\" | \"overridden\"\n * ```\n *\n * @internal\n */\nexport function sourceOfPatternOptions<T>(\n value: T,\n defaultValue: T\n): \"default\" | \"overridden\" {\n const stableStringifyOptions = {\n keepUndefined: true,\n sortArray: true,\n sortKeys: true\n } satisfies SafeStableStringifyOptions;\n\n const a = safeStableStringify(value, stableStringifyOptions);\n\n const b = safeStableStringify(defaultValue, stableStringifyOptions);\n\n return a === b ? \"default\" : \"overridden\";\n}\n","import \"@rzl-zone/node-only\";\n\nimport \"dotenv/config\";\n\n// eslint-disable-next-line turbo/no-undeclared-env-vars\nconst USE_EMOJI = process.env.FORCE_EMOJI === \"1\";\n\ntype Icons = {\n readonly [K in keyof typeof emojiIcons]: string;\n};\n\nconst emojiIcons = {\n /* flow */\n start: \"🕐\",\n arrowRight: \"▶️\",\n arrowRightMini: \"›\",\n\n /* list */\n bulletBold: \"●\",\n bullet: \"•\",\n whiteCircle: \"○\",\n whiteBullet: \"◦\",\n smallSquare: \"▪\",\n\n /* status */\n success: \"✅\",\n warn: \"⚠️\",\n error: \"❌\",\n\n /* config */\n config: \"⚙️\",\n settings: \"🛠️\",\n\n /* files & fs */\n file: \"📄\",\n files: \"📁\",\n folder: \"📂\",\n path: \"🧭\",\n\n /* actions */\n add: \"➕\",\n remove: \"➖\",\n update: \"♻️\",\n copy: \"📋\",\n move: \"📦\",\n clean: \"🧹\",\n\n /* build / process */\n build: \"🏗️\",\n generate: \"🧩\",\n compile: \"⚡\",\n watch: \"👀\",\n\n /* info / misc */\n info: \"ℹ️\",\n debug: \"🐛\",\n question: \"❓\",\n separator: \"━\"\n} as const;\n\nconst asciiIcons = {\n /* flow */\n start: \"▶\",\n arrowRight: \"▶\",\n arrowRightMini: \"›\",\n\n /* list */\n bulletBold: \"●\",\n bullet: \"•\",\n whiteCircle: \"○\",\n whiteBullet: \"◦\",\n smallSquare: \"▪\",\n\n /* status */\n success: \"✅\",\n warn: \"⚠️ \",\n error: \"❌\",\n\n /* config */\n config: \"#\",\n settings: \"@\",\n\n /* files & fs */\n file: \"F\",\n files: \"DIR\",\n folder: \"DIR\",\n path: \"~\",\n\n /* actions */\n add: \"+\",\n remove: \"-\",\n update: \"~\",\n copy: \"=\",\n move: \">\",\n clean: \"x\",\n\n /* build / process */\n build: \"#\",\n generate: \"*\",\n compile: \">\",\n watch: \"o\",\n\n /* info / misc */\n info: \"i\",\n debug: \"d\",\n question: \"?\",\n separator: \"-\"\n} as const satisfies Icons;\n\n/** ----------------------------------------------------------------\n * * ***CLI icon mapping (emoji or ASCII fallback).***\n * ----------------------------------------------------------------\n *\n * Provides a centralized set of visual symbols used across the CLI\n * for rendering flow indicators, status messages, filesystem labels,\n * and action markers.\n *\n * - *The icon set is determined at runtime via the environment variable:*\n * - `FORCE_EMOJI=1` ➜ Emoji icons are enabled.\n * - Otherwise ➜ ASCII-safe fallback icons are used.\n *\n * - *This ensures compatibility with:*\n * - Terminals that do not support emoji rendering.\n * - CI environments.\n * - Minimal shells or log files.\n * - *Behavior:*\n * - The object shape is identical in both modes.\n * - Only the visual representation changes.\n * - The value is resolved once at module evaluation time.\n * ----------------------------------------------------------------\n * #### Environment Control\n * ```bash\n * FORCE_EMOJI=1\n * ```\n * ----------------------------------------------------------------\n * @remarks\n * This constant is intended for internal CLI rendering only, do not mutate the returned object.\n *\n * @example\n * ```ts\n * console.log(`${ICONS.success} Build completed`);\n * ```\n *\n */\nexport const ICONS: Readonly<Icons> = Object.freeze(\n USE_EMOJI ? emojiIcons : asciiIcons\n);\n","import \"@rzl-zone/node-only\";\n\nimport type { AnyString } from \"@/_internal/types/extra\";\n\nimport { isDeepStrictEqual } from \"node:util\";\n\nimport {\n isError,\n isNonEmptyString,\n isNumber,\n normalizeSpaces\n} from \"@/_internal/utils/helper\";\n\nimport {\n formatOptionValue,\n joinLines,\n picocolors\n} from \"@/utils/helper/formatter\";\nimport { ICONS } from \"@/utils/helper/icons\";\n\n/** -------------------------------------------------------------------\n * * ***Determines whether an option value comes from the default configuration\n * or has been explicitly overridden by the user.***\n * -------------------------------------------------------------------\n *\n * This utility is primarily intended for logging and debugging purposes,\n * especially in CLI tools or build pipelines where distinguishing between\n * default and user-provided values is important.\n *\n * The comparison is performed using `Object.is` to ensure accurate detection,\n * including edge cases such as:\n * - `NaN` vs `NaN`.\n * - `-0` vs `+0`.\n *\n * @template T - The type of the option value being compared.\n *\n * @param {unknown} value - The actual value used at runtime.\n * @param {unknown} defaultValue - The default value defined by the tool.\n *\n * @returns\n * A string indicating the source of the value:\n *\n * - `\"default\"` when `value` is strictly equal to `defaultValue`.\n * - `\"overridden\"` when the value differs from the default.\n *\n * @example\n * ```ts\n * sourceOf(\"dist\", \"dist\"); // ➔ \"default\"\n * sourceOf(\"dist/types\", \"dist\"); // ➔ \"overridden\"\n * ```\n *\n * @example\n * ***CLI-style option logging:***\n * ```ts\n * BUILD_LOGGER.OPTIONS(\n * \"outDir\",\n * outDir,\n * sourceOf(outDir, DEFAULTS.outDir)\n * );\n * ```\n */\nexport const sourceOf = <T>(\n value: T,\n defaultValue: T\n): \"default\" | \"overridden\" => {\n return Object.is(value, defaultValue) ? \"default\" : \"overridden\";\n};\n\n/** ----------------------------------------------------------------\n * * ***Deep default source detector.***\n * ----------------------------------------------------------------\n *\n * Determines whether a given value is structurally identical\n * to its default value using deep comparison.\n *\n * Unlike `Object.is`, this utility compares object contents\n * recursively rather than checking reference identity.\n *\n * Intended for configuration systems where option objects\n * may be cloned or reconstructed but still represent the\n * default state.\n *\n * @template T - Value type being compared.\n *\n * @param value - Current runtime value.\n * @param defaultValue - Default reference value.\n *\n * @returns\n * - `\"default\"` ➔ If values are deeply equal.\n * - `\"overridden\"` ➔ If values differ.\n *\n * @example\n * ```ts\n * sourceOfIsDeepStrictEqual(\n * { onlyFiles: true },\n * { onlyFiles: true }\n * );\n * // \"default\"\n * ```\n */\nexport const sourceOfIsDeepStrictEqual = <T>(\n value: T,\n defaultValue: T\n): \"default\" | \"overridden\" => {\n return isDeepStrictEqual(value, defaultValue) ? \"default\" : \"overridden\";\n};\n\n/** -------------------------------------------------------------------\n * * ***Structured build-time console logger with consistent formatting,\n * icons, and colorized output.***\n * --------------------------------------------------------------------\n *\n * `BUILD_LOGGER` provides a collection of standardized logging helpers\n * intended for **CLI tools, build scripts, and Node.js-based workflows**.\n *\n * - **It ensures:**\n * - Consistent log structure across different build phases.\n * - Clear visual distinction between states (start, success, skip, error).\n * - Emoji or ASCII icon support depending on environment configuration.\n * - Readable, colorized output via `picocolors`.\n *\n * Emoji usage is controlled via the environment variable:\n *\n * ```\n * FORCE_EMOJI=1\n * ```\n *\n * When disabled, all icons gracefully fall back to ASCII-safe symbols.\n *\n * ---\n *\n * - **Behavior:**\n * - Uses emoji icons when `FORCE_EMOJI === \"1\"`.\n * - Falls back to ASCII symbols otherwise.\n * - Applies consistent spacing, bulleting, and indentation.\n * - Formats messages using `picocolors` for visibility.\n * - Safely extracts error messages from unknown error values.\n *\n * ---\n *\n * - **Available log actions:**\n * - `SOURCE_OF`:\n * - See {@link sourceOf | **`sourceOf`**} helpers.\n *\n * - `OPTIONS({ label, value, source, isRequired })`:\n * - Logs the options argument function using\n * {@link sourceOf | **`sourceOf`**} helper.\n *\n * - `NEW_LINE()`:\n * - *Inserts an empty line in the console output.*\n *\n * - `ON_STARTING({ actionName })`:\n * - *Logs the start of a build or processing action.*\n *\n * - `ON_FINISH({ actionName, count })`:\n * - *Logs successful completion with item count.*\n *\n * - `ON_SKIPPING({ actionName, reasonEndText })`:\n * - *Logs skipped actions with human-readable reasons.*\n *\n * - `ON_ERROR({ actionName, error })`:\n * - *Logs formatted error output with extracted message.*\n *\n * - `ON_PROCESS_COPY({ actionName, copyFrom, copyTo })`:\n * - *Logs file copy operations.*\n *\n * - `ON_PROCESS({ actionName, nameDirect })`:\n * - *Logs generic processing steps.*\n *\n * - `ON_PROCESS_REFERENCING({ actionName, referenceFrom, referenceTo })`:\n * - *Logs reference or linking operations.*\n *\n * ---\n *\n * This logger is intentionally **side-effectful** and writes directly\n * to `console.log` / `console.error`.\n *\n * It is designed for **human-readable output**, not structured logging\n * or machine parsing.\n */\nexport const BUILD_LOGGER: LoggerBuilder = {\n /** -------------------------------------------------------------------\n * * ***Determines whether an option value comes from the default configuration\n * or has been explicitly overridden by the user.***\n * -------------------------------------------------------------------\n *\n * This utility is primarily intended for logging and debugging purposes,\n * especially in CLI tools or build pipelines where distinguishing between\n * default and user-provided values is important.\n *\n * The comparison is performed using `Object.is` to ensure accurate detection,\n * including edge cases such as:\n * - `NaN` vs `NaN`.\n * - `-0` vs `+0`.\n *\n * @template T - The type of the option value being compared.\n *\n * @param value - The actual value used at runtime.\n * @param defaultValue - The default value defined by the tool.\n *\n * @returns\n * A colorized string indicating the source of the value:\n *\n * - `\"default\"` when `value` is strictly equal to `defaultValue`.\n * - `\"overridden\"` when the value differs from the default.\n *\n * @example\n * ```ts\n * BUILD_LOGGER.SOURCE_OF(\"dist\", \"dist\"); // ➔ \"default\"\n * BUILD_LOGGER.SOURCE_OF(\"dist/types\", \"dist\"); // ➔ \"overridden\"\n * ```\n *\n * @example\n * ***CLI-style option logging:***\n * ```ts\n * BUILD_LOGGER.OPTIONS(\n * \"outDir\",\n * outDir,\n * BUILD_LOGGER.SOURCE_OF(outDir, DEFAULTS.outDir)\n * );\n * ```\n */\n SOURCE_OF: sourceOf,\n /** -------------------------------------------------------------------\n * * ***Logs a single option entry in a formatted, human-readable CLI style.***\n * -------------------------------------------------------------------\n *\n * This helper is used to display resolved configuration values along with\n * their origin (default or overridden), making it easier to debug and\n * understand how final options are derived.\n *\n * - **Output format example:**\n * ```bash\n * - outDir: dist/types (overridden)\n * - withExportTypes: false (default)\n * - inputDirReference: dist\n * ```\n *\n * - **Formatting rules:**\n * - Indented with a leading dash (`-`).\n * - Label is rendered in **bold**.\n * - Value is rendered in **cyan**.\n * - Source indicator (`default` / `overridden`) is **dimmed**.\n * - Arrays are stringified using a stable JSON formatter.\n * - When an option is marked as required, the source indicator is omitted.\n *\n * This function performs **no mutation** and has **no side effects**\n * other than writing to `stdout`.\n *\n * @param {string} label - Human-readable option name\n * (e.g. `\"outDir\"`, `\"withExportTypes\"`, `\"inputDirReference\"`).\n *\n * @param {unknown} value - The resolved option value to display.\n * Can be of any type; arrays are stringified automatically.\n *\n * @param {\"default\" | \"overridden\" | ({} & string)} source - A value indicating whether the option comes from\n * the default configuration or was overridden by user input, typically\n * produced by {@link sourceOf | **`sourceOf`**}.\n *\n * @param {boolean | undefined} isRequired - When set to `true`, marks\n * the option as required and suppresses the source indicator in the output,\n * defaults to `false`.\n *\n * @example\n * ```ts\n * OPTIONS(\n * \"outDir\",\n * outDir,\n * sourceOf(outDir, DEFAULTS.outDir)\n * );\n * ```\n *\n * @example\n * Logging multiple options.\n * ```ts\n * OPTIONS(\n * \"outFileName\",\n * outFileName,\n * sourceOf(outFileName, DEFAULTS.outFileName)\n * );\n * OPTIONS(\n * \"inputDirReference\",\n * inputDirReference,\n * sourceOf(inputDirReference, DEFAULTS.inputDirReference)\n * );\n * OPTIONS(\n * \"withExportTypes\",\n * withExportTypes,\n * sourceOf(withExportTypes, DEFAULTS.withExportTypes)\n * );\n * ```\n *\n * @example\n * Logging a required option.\n * ```ts\n * OPTIONS(\n * \"input\",\n * inputPath,\n * sourceOf(inputPath, undefined),\n * true\n * );\n * ```\n */\n OPTIONS(\n label: string,\n value: unknown,\n source: ReturnType<typeof sourceOf> | AnyString,\n isRequired?: boolean\n ) {\n const sourceLabel =\n !isRequired && source\n ? source === \"default\"\n ? picocolors.blueBright(` (${source})`)\n : picocolors.yellowBright(` (${source})`)\n : \"\";\n\n console.log(\n picocolors.dim(\" - \") +\n normalizeSpaces(\n picocolors.bold(label || \"`⚠️ Label Unset!!!`\") +\n picocolors.dim(\": \") +\n formatOptionValue(value) +\n picocolors.italic(sourceLabel)\n )\n );\n },\n /** -------------------------------------------------------------------\n * * ***Logs a subsection title for grouped log output.***\n * -------------------------------------------------------------------\n *\n * Used to visually separate logical blocks such as:\n * - Arguments.\n * - Options.\n * - Configuration.\n * - Resolved Values.\n *\n * This improves readability when logging many related entries.\n *\n * @param {string} title - Section title text (e.g. \"Options\", \"Arguments\").\n * @param {{ icon?: string; indent?: string; }} options - Optional icon override.\n *\n * @example\n * ```ts\n * BUILD_LOGGER.SECTION(\"Options\");\n * BUILD_LOGGER.SECTION(\"Arguments\", { icon: ICONS.folder });\n * ```\n */\n SECTION(title: string, options: LoggerBuilderSection = {}) {\n const { icon = ICONS.config, indent = \"\" } = options;\n\n console.log(\n picocolors.bold(\n `${indent}${picocolors.whiteBright(icon)} ${picocolors.underline(picocolors.cyanBright(title || \"`⚠️ Unset Title!!!`\"))}:`\n )\n );\n },\n /** -------------------------------------------------------------------\n * * ***Prints a single empty line to the console.***\n * -------------------------------------------------------------------\n *\n * Writes a newline to standard output, typically used as a visual\n * separator between log sections to improve CLI readability.\n *\n * If a string value is provided, it will be printed instead of an\n * empty line.\n *\n * @param {string} [value=\"\"] - Optional text to print. Defaults to an\n * empty string, resulting in a blank line.\n *\n * @example\n * ```ts\n * BUILD_LOGGER.NEW_LINE();\n * ```\n *\n * @example\n * ```ts\n * BUILD_LOGGER.NEW_LINE(\" \");\n * ```\n */\n NEW_LINE(value: string = \"\") {\n return console.log(value);\n },\n /** -------------------------------------------------------------------\n * * ***Logs a starting action message.***\n * -------------------------------------------------------------------\n *\n * Used to indicate that a process or action has just started.\n * Typically printed once before any processing begins.\n *\n * - **Output format example:**\n * ```bash\n * ▶ Starting to generate-types.\n * ```\n *\n * - **Formatting rules:**\n * - Start icon is displayed.\n * - \"Starting\" keyword is highlighted.\n * - Action name is underlined and colored.\n *\n * This function performs **no mutation** and has **no side effects**\n * other than writing to `stdout`.\n *\n * @example\n * ```ts\n * BUILD_LOGGER.ON_STARTING({ actionName: \"build references\" });\n * ```\n */\n ON_STARTING: (options: LoggerBuilderOnStarting) => {\n const { actionName, textDirectAction = \"to\" } = options;\n\n console.log(\n picocolors.bold(\n `${picocolors.whiteBright(ICONS.start)} ${picocolors.cyanBright(\n \"Starting\"\n )} ${normalizeSpaces(`${textDirectAction} ${picocolors.underline(picocolors.blueBright(actionName))}`)}.`\n )\n );\n },\n /** -------------------------------------------------------------------\n * * ***Logs a successful completion message.***\n * -------------------------------------------------------------------\n *\n * Used to indicate that an action has finished successfully,\n * including a summary count of processed items.\n *\n * - **Output format example:**\n * ```bash\n * ✔ Success generate-types (12 files).\n * ```\n *\n * - **Formatting rules:**\n * - Success icon and green highlight.\n * - Action name is underlined.\n * - Count is highlighted in yellow.\n *\n * This function performs **no mutation** and has **no side effects**\n * other than writing to `stdout`.\n *\n * @example\n * ```ts\n * BUILD_LOGGER.ON_FINISH({\n * actionName: \"generate references\",\n * count: 5\n * });\n * ```\n */\n ON_FINISH: (options: LoggerBuilderOnFinish) => {\n const {\n actionName,\n count,\n typeCount = \"file\",\n progress,\n textSuccess = \"Success\"\n } = options;\n\n console.log(\n picocolors.bold(\n `${picocolors.greenBright(ICONS.success)} ${picocolors.greenBright(textSuccess)} ${normalizeSpaces(\n `${picocolors.underline(\n picocolors.blueBright(actionName)\n )} (${picocolors.yellowBright(`${isNonEmptyString(progress) ? progress : count} ${typeCount}${count > 1 ? \"(s)\" : \"\"}`)}`\n )}).`\n )\n );\n },\n /** -------------------------------------------------------------------\n * * ***Logs a skipped action with a detailed reason.***\n * -------------------------------------------------------------------\n *\n * Used when an action is intentionally skipped due to\n * unmet conditions or no remaining work.\n *\n * - **Output format example:**\n * ```bash\n * ⚠ Skipping generate-types because nothing left files to process.\n * ```\n *\n * - **Formatting rules:**\n * - Warning icon with yellow highlight.\n * - Action name is underlined.\n * - Skip reason is emphasized in red.\n *\n * This function performs **no mutation** and has **no side effects**\n * other than writing to `stdout`.\n *\n * @example\n * ```ts\n * BUILD_LOGGER.ON_SKIPPING({\n * actionName: \"generate references\",\n * reasonEndText: \"process\"\n * });\n * ```\n */\n ON_SKIPPING: (options: LoggerBuilderOnSkipping) => {\n const {\n actionName,\n reasonEndText,\n reasonSkipAction = \"nothing left\",\n reasonTitle = \"because\",\n reasonType = \"files\",\n textDirectAction = \"to\"\n } = options;\n\n console.log(\n picocolors.bold(\n `${picocolors.yellowBright(ICONS.warn)} ${picocolors.yellowBright(\"Skipping\")} ${normalizeSpaces(\n `${picocolors.underline(\n picocolors.blueBright(actionName)\n )} ${picocolors.white(reasonTitle)} ${picocolors.redBright(\n reasonSkipAction\n )} ${reasonType} ${textDirectAction} ${picocolors.redBright(reasonEndText)}`\n )}.`\n )\n );\n },\n /** -------------------------------------------------------------------\n * * ***Logs an error occurring during an action.***\n * -------------------------------------------------------------------\n *\n * Used to report fatal or recoverable errors during execution.\n * Automatically extracts the message from an `Error` instance.\n *\n * - **Output format example:**\n * ```bash\n * ✖ Error to generate-types,\n * ➜ Something went wrong\n * ```\n *\n * - **Formatting rules:**\n * - Error icon and red highlight.\n * - Action name is underlined.\n * - Error message is inverted for emphasis.\n *\n * This function performs **no mutation** and has **no side effects**\n * other than writing to `stderr`.\n *\n * @example\n * ```ts\n * BUILD_LOGGER.ON_ERROR({\n * actionName: \"copy files\",\n * error: err\n * });\n * ```\n */\n ON_ERROR: (options: LoggerBuilderOnError) => {\n const { actionName, textDirectAction = \"to\", error } = options;\n\n const errorMsg = isError(error) ? error.message : \"Something went wrong\";\n\n console.error(\n picocolors.bold(\n `${picocolors.redBright(ICONS.error)} ${picocolors.redBright(\"Error\")} ${normalizeSpaces(\n `${textDirectAction} ${picocolors.underline(picocolors.blueBright(actionName))},`\n )} ${joinLines(\"because: \", \"\", ` ${picocolors.bold(picocolors.red(ICONS.arrowRight))} ${picocolors.inverse(picocolors.red(normalizeSpaces(errorMsg)))}`)}`\n )\n );\n },\n /** -------------------------------------------------------------------\n * * ***Logs a generic processing step.***\n * -------------------------------------------------------------------\n *\n * Used for logging step-by-step progress inside a process,\n * typically for folders or grouped actions.\n *\n * - **Output format example:**\n * ```bash\n * • 2. Generating in dist/types.\n * ```\n *\n * This function performs **no mutation** and has **no side effects**\n * other than writing to `stdout`.\n */\n ON_PROCESS: (options: LoggerBuilderOnProcess) => {\n const { actionName, count, nameDirect, textDirectFolder = \"in\" } = options;\n\n console.log(\n `${picocolors.bold(\" \" + picocolors.whiteBright(ICONS.bullet))} ${picocolors.italic(\n `${picocolors.white(count + \".\")} ${normalizeSpaces(\n `${picocolors.white(actionName)} ${picocolors.magentaBright(\n textDirectFolder\n )} ${picocolors.bold(picocolors.underline(picocolors.blue(nameDirect)))}.`\n )}`\n )}`\n );\n },\n /** -------------------------------------------------------------------\n * * ***Logs a copy process entry.***\n * -------------------------------------------------------------------\n *\n * Used to log a file or directory copy operation as part\n * of a larger process.\n *\n * - **Output format example:**\n * ```bash\n * • 1. Copy from 'src/types' ➔ 'dist/types'.\n * ```\n *\n * This function performs **no mutation** and has **no side effects**\n * other than writing to `stdout`.\n */\n ON_PROCESS_COPY: (options: LoggerBuilderOnProcessCopy) => {\n const {\n actionName,\n count,\n copyTo,\n copyFrom,\n textFrom = \"from\",\n textArrow = \"➔\"\n } = options;\n\n console.log(\n `${picocolors.bold(\" \" + picocolors.whiteBright(ICONS.bullet))} ${picocolors.italic(\n `${picocolors.white(count + \".\")} ${normalizeSpaces(\n `${picocolors.white(actionName)} ${picocolors.yellow(\n textFrom\n )} '${picocolors.bold(picocolors.underline(picocolors.cyanBright(copyFrom)))}' ${picocolors.bold(\n picocolors.gray(textArrow)\n )} '${picocolors.bold(picocolors.underline(picocolors.cyanBright(copyTo)))}'.`\n )}`\n )}`\n );\n },\n /** -------------------------------------------------------------------\n * * ***Logs a copy process entry.***\n * -------------------------------------------------------------------\n *\n * Used to log a file or directory copy operation as part\n * of a larger process.\n *\n * - **Output format example:**\n * ```bash\n * • 1. Failed Copying from 'src/types' because source file not found.\n * ```\n *\n * This function performs **no mutation** and has **no side effects**\n * other than writing to `stdout`.\n */\n ON_PROCESS_COPY_ERROR: (options: LoggerBuilderOnProcessCopyError) => {\n const {\n actionName,\n count,\n errorReason,\n copyFrom,\n index,\n indexKey,\n textFrom = \"from\",\n textReason = \"because\"\n } = options;\n\n const errorReasonText = isError(errorReason)\n ? errorReason.message\n : String(errorReason);\n\n const atIndexText = isNumber(index)\n ? picocolors.blueBright(\n ` (at${isNonEmptyString(indexKey) ? ` '${indexKey}' ` : \" \"}index: ${picocolors.magentaBright(index)}) `\n )\n : \" \";\n\n console.log(\n `${picocolors.bold(\" \" + picocolors.whiteBright(ICONS.bullet))} ${picocolors.italic(\n `${picocolors.white(count + \".\")} ${normalizeSpaces(\n `${picocolors.redBright(actionName)} ${picocolors.yellow(\n textFrom\n )} '${picocolors.bold(picocolors.underline(picocolors.cyanBright(copyFrom)))}'${atIndexText}${picocolors.bold(\n picocolors.gray(textReason)\n )} ${picocolors.redBright(errorReasonText)}.`\n )}`\n )}`\n );\n },\n /** -------------------------------------------------------------------\n * * ***Logs a reference linking process.***\n * -------------------------------------------------------------------\n *\n * Used to indicate that a reference is being created\n * from one location to another.\n *\n * - **Output format example:**\n * ```bash\n * • 3. Referencing from src/index.ts ➔ dist/index.d.ts.\n * ```\n *\n * This function performs **no mutation** and has **no side effects**\n * other than writing to `stdout`.\n */\n ON_PROCESS_REFERENCING: (options: LoggerBuilderOnProcessReferencing) => {\n const {\n actionName,\n count,\n referenceTo,\n referenceFrom,\n textFrom = \"from\",\n textArrow = \"➔\"\n } = options;\n\n console.log(\n `${picocolors.bold(\" \" + picocolors.whiteBright(ICONS.bullet))} ${picocolors.italic(\n `${picocolors.white(count + \".\")} ${normalizeSpaces(\n `${picocolors.white(actionName)} ${picocolors.magentaBright(\n textFrom\n )} ${picocolors.bold(picocolors.underline(picocolors.cyanBright(referenceFrom)))} ${picocolors.bold(\n picocolors.gray(textArrow)\n )} ${picocolors.bold(picocolors.underline(picocolors.blueBright(referenceTo)))}.`\n )}`\n )}`\n );\n }\n};\n\ntype LoggerBuilder = {\n SOURCE_OF: typeof sourceOf;\n OPTIONS(\n label: string,\n value: unknown,\n source: ReturnType<typeof sourceOf> | AnyString,\n isRequired?: boolean\n ): void;\n SECTION(title: string, options?: LoggerBuilderSection): void;\n NEW_LINE(value?: string): void;\n ON_STARTING: (options: LoggerBuilderOnStarting) => void;\n ON_FINISH: (options: LoggerBuilderOnFinish) => void;\n ON_SKIPPING: (options: LoggerBuilderOnSkipping) => void;\n ON_ERROR: (options: LoggerBuilderOnError) => void;\n ON_PROCESS: (options: LoggerBuilderOnProcess) => void;\n ON_PROCESS_COPY: (options: LoggerBuilderOnProcessCopy) => void;\n ON_PROCESS_COPY_ERROR: (options: LoggerBuilderOnProcessCopyError) => void;\n ON_PROCESS_REFERENCING: (options: LoggerBuilderOnProcessReferencing) => void;\n};\n\ntype LoggerBuilderSection = {\n /**\n * @default ICON.config\n */\n icon?: string;\n /**\n * @default \"\"\n */\n indent?: string;\n};\ntype LoggerBuilderOnStarting = {\n /** The name of the action being started.\n *\n * @default\n * undefined\n */\n actionName: string;\n /** Connector word used before the action name.\n *\n * @default\n * \"to\"\n */\n textDirectAction?: string;\n};\ntype LoggerBuilderOnFinish = {\n /** The name of the completed action.\n *\n * @default\n * undefined\n */\n actionName: string;\n /** The success text.\n *\n * @default\n * @default \"Success\"\n */\n textSuccess?: string;\n /** Label for the count unit.\n *\n * @default\n * \"file\"\n */\n typeCount?: string;\n /** Number of processed items.\n *\n * @default\n * undefined\n */\n count: number;\n /** Progress of processed items (e.g. `2/7`).\n *\n * Represents how many items have been processed relative to the total.\n *\n * @example\n * \"2/7\"\n */\n progress?: string;\n};\ntype LoggerBuilderOnSkipping = {\n /** The name of the skipped action.\n *\n * @default\n * undefined\n */\n actionName: string;\n /** Connector word explaining the reason.\n *\n * @default\n * \"because\"\n */\n reasonTitle?: string;\n /** Short reason phrase.\n *\n * @default\n * \"nothing left\"\n */\n reasonSkipAction?: string;\n /** Contextual explanation for the skip.\n *\n * @default\n * undefined\n */\n reasonEndText: string;\n /** Type of resource involved.\n *\n * @default\n * \"files\"\n */\n reasonType?: string;\n /** Connector word before the target.\n *\n * @default\n * \"to\"\n */\n textDirectAction?: string;\n};\ntype LoggerBuilderOnError = {\n /** The name of the action that failed.\n *\n * @default\n * undefined\n */\n actionName: string;\n /** Connector word before the action name.\n *\n * @default\n * \"to\"\n */\n textDirectAction?: string;\n /** Unknown error object or `Error` instance.\n *\n */\n error: unknown;\n};\ntype LoggerBuilderOnProcess = {\n /** Description of the process.\n *\n * @default\n * undefined\n */\n actionName: string;\n /** Sequence number.\n *\n * @default\n * undefined\n */\n count: number;\n /** Connector word before the target.\n *\n * @default\n * \"in\"\n */\n textDirectFolder?: string;\n /** Target name or location.\n *\n * @default\n * undefined\n */\n nameDirect: string;\n};\ntype LoggerBuilderOnProcessCopy = {\n /** The name of the action being the copy action.\n *\n * @default\n * undefined\n */\n actionName: string;\n /** Sequence number of the process.\n *\n * @default\n * undefined\n */\n count: number;\n /** Connector text before source path.\n *\n * @default\n * \"from\"\n */\n textFrom?: string;\n /** Source path.\n *\n * @default\n * undefined\n */\n copyFrom: string;\n /** Destination path.\n *\n * @default\n * undefined\n */\n copyTo: string;\n /** Arrow symbol between paths.\n *\n * @default\n * \"➔\"\n */\n textArrow?: string;\n};\ntype LoggerBuilderOnProcessCopyError = {\n /** The name of the action being the error copy action.\n *\n * @default\n * undefined\n */\n actionName: string;\n /** Sequence number of the process.\n *\n * @default\n * undefined\n */\n count: number;\n /** Index number parameter.\n *\n * @default\n * undefined\n */\n index?: number;\n /** Index key name for parameter.\n *\n * @default\n * undefined\n */\n indexKey?: string;\n /** Connector text before source path.\n *\n * @default\n * \"from\"\n */\n textFrom?: string;\n /** Source path.\n *\n * @default\n * undefined\n */\n copyFrom: string;\n /** The reason error on copying.\n *\n * @default\n * undefined\n */\n errorReason: string | Error;\n /** Connector word explaining the reason.\n *\n * @default\n * \"because\"\n */\n textReason?: string;\n};\ntype LoggerBuilderOnProcessReferencing = {\n /** The name of the action being the referencing action.\n *\n * @default\n * undefined\n */\n actionName: string;\n /** Sequence number.\n *\n * @default\n * undefined\n */\n count: number;\n /** Connector text before source.\n *\n * @default\n * \"from\"\n */\n textFrom?: string;\n /** Source reference path.\n *\n * @default\n * undefined\n */\n referenceFrom: string;\n /** Target reference path.\n *\n * @default\n * undefined\n */\n referenceTo: string;\n /** Arrow symbol between references.\n *\n * @default\n * \"➔\"\n */\n textArrow?: string;\n};\n","import \"@rzl-zone/node-only\";\n\nimport _fsExtra from \"fs-extra\";\nimport _fastGlob from \"fast-glob\";\n\nexport { ICONS } from \"@/utils/helper/icons\";\n\n/** ----------------------------------------------------------------\n * * ***Node.js–only filesystem utilities (fs-extra).***\n * ----------------------------------------------------------------\n *\n * This export is a **thin re-export** of the `fs-extra` package,\n * intended for **server-side / Node.js environments only**.\n *\n * ⚠️ **DO NOT import this in browser or client-side code.**\n * The underlying implementation depends on Node.js built-in\n * modules such as `fs`, `path`, and `process`.\n *\n * - *Typical use cases:*\n * - CLI tools.\n * - Build scripts.\n * - File system manipulation on the server.\n *\n * @see {@link https://github.com/jprichardson/node-fs-extra | **`https://github.com/jprichardson/node-fs-extra`**}.\n * @environment node\n */\nexport const fsExtra: typeof _fsExtra = _fsExtra;\n\n/** ----------------------------------------------------------------\n * * ***High-performance file system globbing utility (fast-glob).***\n * ----------------------------------------------------------------\n *\n * This export re-exports the default export of `fast-glob`,\n * which is implemented using **CommonJS `export =` semantics**.\n *\n * Due to its reliance on Node.js APIs, this module is\n * **server-side only** and must not be bundled for the browser.\n *\n * - *Typical use cases:*\n * - Resolving file patterns in build tools.\n * - Scanning project directories.\n * - CLI and automation scripts.\n *\n * @see {@link https://github.com/mrmlnc/fast-glob | **`https://github.com/mrmlnc/fast-glob`**}.\n * @environment node\n */\nexport const fastGlob: typeof _fastGlob = _fastGlob;\n\nexport {\n BUILD_LOGGER,\n sourceOf,\n sourceOfIsDeepStrictEqual\n} from \"@/_internal/utils/logger-builder\";\n\nexport {\n defaultPatternOptions,\n type PatternConfig,\n type PatternOptions\n} from \"@/_internal/libs/fast-globe-options\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+IA,MAAa,wBAAwC;CACnD,UAAU;CACV,eAAe;CACf,oBAAoB;CACpB,aAAa,GAAG,KAAK,EAAE;CACvB,KAAK;CACL,qBAAqB;CACrB,UAAU;CACV,QAAQ,CAAC;CACT,iBAAiB;CACjB,YAAY;CACZ,iBAAiB;CACjB,WAAW;CACX,QAAQ;CACR,gCAAgC;AAClC;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,SAAS,aACP,KACA,QACS;CACT,IAAI,CAAC,QAAQ,OAAO;CAEpB,IAAI,OAAO,cAAc,QAAQ,eAAe,QAAQ,oBACtD,OAAO;CAET,IAAI,OAAO,eAAe,QAAQ,UAAU,OAAO;CAEnD,OAAO;AACT;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,MAAM,sBAAsB,IAAI,IAC9B,OAAO,KAAK,qBAAqB,CACnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,SAAS,gBACP,KACA,QACA,QACA;CACA,OAAO,OAAO,OAAO;AACvB;AAuKA,SAAgB,uBACd,OACA,QACyB;CACzB,IAAI,CAAC,cAAc,KAAK,GAAG,OAAO,CAAC;CAEnC,MAAM,SAAS;CACf,MAAM,SAAkC,CAAC;CAEzC,KAAK,MAAM,OAAO,OAAO,KAAK,MAAM,GAClC,IAAI,oBAAoB,IAAI,GAAG,KAAK,aAAa,KAAK,MAAM,GAC1D,gBAAgB,KAAK,QAAQ,MAAM;CAIvC,OAAO;AACT;AAoEA,SAAgB,sBACd,OACA,QACgB;CAChB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AAG,WAAW,KAAK,WAAW,UAAU,WAAW,WAAW,WAAW,CAAC,CAAC,EAAE,EACjF,GACF,GACF;CACF;AACF;;;;;;;;;;;;;;;;;;;;;;;AC1qBA,MAAa,UAA2B;;;;;;;;;;;;;;;;;;;AAoBxC,MAAa,WAA6B"}
1
+ {"version":3,"file":"server-CDjzX9MQ.js","names":[],"sources":["../src/_internal/libs/fast-globe-options.ts","../src/utils/helper/icons.ts","../src/_internal/utils/logger-builder.ts","../src/utils/server.ts"],"sourcesContent":["import \"@rzl-zone/node-only\";\n\nimport type { OmitStrict, Prettify } from \"../types/extra\";\n\nimport os from \"node:os\";\nimport * as fg from \"fast-glob\";\n\nimport {\n isPlainObject,\n safeStableStringify,\n type SafeStableStringifyOptions\n} from \"@/_internal/utils/helper\";\n\ntype IfTrueGeneric<T extends boolean, K> = T extends true ? K : never;\n\n/** ----------------------------------------------------------------\n * * ***Supported pattern matching options.***\n * ----------------------------------------------------------------\n * Defines the subset of {@link fg | `fast-glob`} options exposed by\n * this module for pattern-based file resolution.\n *\n * This type intentionally omits several low-level or environment-\n * controlled fields to ensure predictable and safe behavior.\n *\n * ----------------------------------------------------------------\n *\n * *Excluded options (managed internally):*\n *\n * - `fs`\n * - `cwd`\n * - `stats`\n * - `deep`\n * - `extglob`\n * - `suppressErrors`\n * - `braceExpansion`\n *\n * These fields are controlled by the runtime environment and should\n * not be overridden by consumers.\n *\n * ----------------------------------------------------------------\n * @template FilesOnly\n * When `true`, directory filtering options (`onlyFiles`, `onlyDirectories`)\n * are removed from the public API surface, preventing consumers from\n * modifying directory matching behavior.\n *\n * @template ForceUnique\n * When `true`, the `unique` option is removed from the public API to enforce internal uniqueness handling.\n *\n * This allows higher-level utilities to guarantee that matched results\n * are always deduplicated.\n *\n * ----------------------------------------------------------------\n *\n * This type serves as the public configuration contract used when\n * resolving glob patterns.\n */\nexport type PatternOptions<\n FilesOnly extends boolean = false,\n ForceUnique extends boolean = false\n> = OmitStrict<\n fg.Options,\n | \"fs\"\n | \"cwd\"\n | \"stats\"\n | \"deep\"\n | \"extglob\"\n | \"suppressErrors\"\n | \"braceExpansion\"\n | \"dot\"\n | IfTrueGeneric<FilesOnly, \"onlyFiles\" | \"onlyDirectories\">\n | IfTrueGeneric<ForceUnique, \"unique\">,\n { skipPrettify: true }\n> & {\n /** Allow patterns to match entries that begin with a period (`.`).\n *\n * @default true\n */\n dot?: boolean;\n};\n\n/** ----------------------------------------------------------------\n * * ***Pattern configuration wrapper.***\n * ----------------------------------------------------------------\n *\n * Provides an optional container for {@link PatternOptions | `PatternOptions`}.\n *\n * This wrapper allows pattern matching configuration to be composed\n * within higher-level configuration objects without flattening\n * the option namespace.\n *\n * ----------------------------------------------------------------\n *\n * @template FilesOnly\n * When `true`, directory-related options (`onlyFiles`, `onlyDirectories`)\n * are removed from the public configuration to enforce file-only matching.\n *\n * @template ForceUnique\n * When `true`, the `unique` option is removed from the underlying\n * {@link PatternOptions | `PatternOptions`} to guarantee deduplicated results.\n *\n * ----------------------------------------------------------------\n *\n * @example\n * ```ts\n * const config: PatternConfig = {\n * patternOptions: {\n * dot: true\n * }\n * };\n * ```\n */\nexport type PatternConfig<\n FilesOnly extends boolean = false,\n ForceUnique extends boolean = false\n> = Prettify<{\n /** ----------------------------------------------------------------\n * * ***Pattern matching options.***\n * ----------------------------------------------------------------\n *\n * Optional configuration for controlling file pattern resolution.\n *\n * When provided, these options are sanitized and merged with\n * the internal default configuration before being passed to\n * {@link fg | `fast-glob`}.\n *\n * @see {@link PatternOptions | `PatternOptions`} for supported fields.\n */\n patternOptions?: PatternOptions<FilesOnly, ForceUnique>;\n}>;\n\n/** ----------------------------------------------------------------\n * * ***Default pattern matching configuration.***\n * ----------------------------------------------------------------\n *\n * Represents the canonical baseline configuration used when\n * resolving pattern options.\n *\n * These values are applied whenever a user does not explicitly\n * provide overrides.\n *\n * This object also acts as the runtime source of truth for\n * allowed pattern option keys.\n */\nexport const defaultPatternOptions: PatternOptions = {\n absolute: false,\n baseNameMatch: false,\n caseSensitiveMatch: true,\n concurrency: os.cpus().length,\n dot: true,\n followSymbolicLinks: true,\n globstar: true,\n ignore: [],\n markDirectories: false,\n objectMode: false,\n onlyDirectories: false,\n onlyFiles: true,\n unique: true,\n throwErrorOnBrokenSymbolicLink: false\n};\n\n/** ----------------------------------------------------------------\n * * ***Determines whether a pattern option key is allowed.***\n * ----------------------------------------------------------------\n *\n * Evaluates whether a given {@link PatternOptions | `PatternOptions`}\n * key is permitted under the provided runtime policy.\n *\n * This function enforces restrictions such as:\n *\n * - Disallowing directory-related options when `filesOnly` is enabled.\n * - Preventing external control over the `unique` option when\n * `forceUnique` is enabled.\n *\n * ----------------------------------------------------------------\n *\n * @param key\n * A candidate {@link PatternOptions | `PatternOptions`} property key.\n *\n * @param policy\n * Optional runtime policy controlling which keys are allowed.\n *\n * @returns\n * `true` if the key is permitted under the current policy,\n * otherwise `false`.\n *\n * @internal\n */\nfunction isKeyAllowed(\n key: keyof PatternOptions,\n policy?: PatternRuntimePolicy<boolean, boolean>\n): boolean {\n if (!policy) return true;\n\n if (policy.filesOnly && (key === \"onlyFiles\" || key === \"onlyDirectories\"))\n return false;\n\n if (policy.forceUnique && key === \"unique\") return false;\n\n return true;\n}\n\n/** ----------------------------------------------------------------\n * * ***Runtime whitelist of allowed pattern option keys.***\n * ----------------------------------------------------------------\n *\n * Derived directly from {@link defaultPatternOptions | `defaultPatternOptions`}.\n *\n * This ensures strict synchronization between:\n *\n * - The static {@link PatternOptions | `PatternOptions`} type.\n * - Runtime validation logic used during option sanitization.\n *\n * By deriving the key list from the default configuration,\n * this module avoids manual duplication of allowed option names.\n *\n * ----------------------------------------------------------------\n *\n * This whitelist is used internally to:\n *\n * - Remove unknown properties from user-provided configuration.\n * - Guarantee that only supported options are passed to\n * {@link fg | `fast-glob`}.\n *\n * ----------------------------------------------------------------\n *\n * @internal\n */\nconst PATTERN_OPTION_KEYS = new Set<keyof PatternOptions>(\n Object.keys(defaultPatternOptions) as (keyof PatternOptions)[]\n);\n\n/** ----------------------------------------------------------------\n * * ***Assigns a validated pattern option property.***\n * ----------------------------------------------------------------\n *\n * Performs a type-safe assignment from a source object into a\n * partial {@link PatternOptions | `PatternOptions`} result object.\n *\n * A generic constraint is used to preserve proper indexed access\n * typing and avoid union assignment limitations in TypeScript.\n *\n * This helper assumes that:\n *\n * - The provided `key` has already been validated against\n * {@link PATTERN_OPTION_KEYS | `PATTERN_OPTION_KEYS`}.\n * - The property exists on the `source` object.\n *\n * ----------------------------------------------------------------\n *\n * @template K\n * A valid key of {@link PatternOptions | `PatternOptions`}.\n *\n * @param key\n * The validated pattern option key to assign.\n *\n * @param source\n * The original input object containing the property value.\n *\n * @param target\n * The partial result object receiving the assigned value.\n *\n * @internal\n */\nfunction assignIfAllowed<K extends keyof PatternOptions>(\n key: K,\n source: Record<string, unknown>,\n target: Partial<PatternOptions>\n) {\n target[key] = source[key] as PatternOptions[K];\n}\n\n/** ----------------------------------------------------------------\n * * ***Runtime policy controlling pattern option exposure.***\n * ----------------------------------------------------------------\n *\n * Defines runtime constraints that restrict which fields from\n * {@link PatternOptions | `PatternOptions`} are allowed to appear\n * in the final resolved configuration.\n *\n * This policy is primarily used by higher-level utilities that\n * enforce stricter behavior than the raw {@link fg | `fast-glob`} API.\n *\n * ----------------------------------------------------------------\n *\n * *Supported policies:*\n *\n * - `filesOnly`\n * Prevents directory-related configuration from being externally\n * controlled.\n *\n * - `forceUnique`\n * Ensures that uniqueness behavior is handled internally and\n * cannot be overridden by user configuration.\n *\n * ----------------------------------------------------------------\n *\n * These policies influence both:\n *\n * - Runtime sanitization of user-provided pattern options.\n * - Final resolution of merged configuration values.\n *\n * ----------------------------------------------------------------\n *\n * @template FilesOnly\n * Indicates whether directory-related options should be excluded.\n *\n * @template ForceUnique\n * Indicates whether the `unique` option should be excluded.\n */\nexport type PatternRuntimePolicy<\n FilesOnly extends boolean = boolean,\n ForceUnique extends boolean = boolean\n> = {\n /** ----------------------------------------------------------------\n * * ***Restricts directory-related pattern options.***\n * ----------------------------------------------------------------\n *\n * When enabled, directory filtering options are excluded from the\n * final configuration produced by the pattern resolution process.\n *\n * This prevents external configuration from modifying whether\n * directories or files are matched by the underlying\n * {@link fg | `fast-glob`} operation.\n *\n * ----------------------------------------------------------------\n *\n * *Affected options:*\n *\n * - `onlyFiles`\n * - `onlyDirectories`\n *\n * ----------------------------------------------------------------\n *\n * When `true`, these options are ignored during sanitization and\n * removed from the final resolved configuration.\n *\n * ----------------------------------------------------------------\n * @default false\n */\n filesOnly?: FilesOnly;\n\n /** ----------------------------------------------------------------\n * * ***Enforces internal uniqueness behavior.***\n * ----------------------------------------------------------------\n *\n * When enabled, the `unique` option is excluded from user-provided\n * configuration and controlled internally by the runtime.\n *\n * This ensures that result deduplication behavior cannot be\n * overridden by external configuration.\n *\n * ----------------------------------------------------------------\n *\n * *Affected option:*\n *\n * - `unique`\n *\n * ----------------------------------------------------------------\n *\n * When `true`, this option is ignored during sanitization and\n * removed from the final resolved configuration.\n *\n * ----------------------------------------------------------------\n * @default false\n */\n forceUnique?: ForceUnique;\n};\n\n/** ----------------------------------------------------------------\n * * ***Sanitizes pattern options by removing unknown keys.***\n * ----------------------------------------------------------------\n *\n * Ensures that the provided object only contains keys that exist in\n * {@link defaultPatternOptions | `defaultPatternOptions`}, any unknown keys will be removed.\n *\n * This function is intended for API boundary validation to prevent\n * unsafe or unexpected configuration injection.\n *\n * - *Behavior:*\n * - Ignores non-object values (returns empty object).\n * - Removes keys not present in {@link defaultPatternOptions | `defaultPatternOptions`}.\n * - Does NOT mutate the original object.\n *\n * ----------------------------------------------------------------\n *\n * @param input\n * The value to sanitize.\n *\n * @param policy\n * Optional runtime policy restricting which pattern options\n * are allowed during sanitization.\n *\n * @returns\n * A new object containing only allowed pattern option keys.\n *\n * @example\n * ```ts\n * const userOptions = {\n * absolute: true,\n * dot: true,\n * fakeKey: 123\n * };\n *\n * const clean = sanitizePatternOptions(userOptions);\n *\n * // Result:\n * // {\n * // absolute: true,\n * // dot: true\n * // }\n * ```\n */\nexport function sanitizePatternOptions(\n input: unknown,\n policy?: PatternRuntimePolicy<false, false>\n): Partial<PatternOptions<false, false>>;\nexport function sanitizePatternOptions(\n input: unknown,\n policy?: PatternRuntimePolicy<true, false>\n): Partial<PatternOptions<true, false>>;\nexport function sanitizePatternOptions(\n input: unknown,\n policy?: PatternRuntimePolicy<false, true>\n): Partial<PatternOptions<false, true>>;\nexport function sanitizePatternOptions(\n input: unknown,\n policy?: PatternRuntimePolicy<true, true>\n): Partial<PatternOptions<true, true>>;\nexport function sanitizePatternOptions(\n input: unknown,\n policy?: PatternRuntimePolicy<false, false>\n): Partial<PatternOptions<false, false>>;\nexport function sanitizePatternOptions(\n input: unknown,\n policy?: PatternRuntimePolicy<boolean, boolean>\n): Partial<PatternOptions>;\nexport function sanitizePatternOptions(\n input: unknown,\n policy?: PatternRuntimePolicy<boolean, boolean>\n): Partial<PatternOptions> {\n if (!isPlainObject(input)) return {};\n\n const source = input as Record<string, unknown>;\n const result: Partial<PatternOptions> = {};\n\n for (const key of Object.keys(source) as (keyof PatternOptions)[]) {\n if (PATTERN_OPTION_KEYS.has(key) && isKeyAllowed(key, policy)) {\n assignIfAllowed(key, source, result);\n }\n }\n\n return result;\n}\n\n/** ----------------------------------------------------------------\n * * ***Resolves pattern options with default values.***\n * ----------------------------------------------------------------\n *\n * Applies {@link sanitizePatternOptions | `sanitizePatternOptions`} to the provided input and merges\n * the result with `defaultPatternOptions`.\n *\n * - Unknown keys are removed.\n * - Missing keys fall back to defaults.\n *\n * Guarantees a fully-formed {@link PatternOptions | `PatternOptions`} object safe for direct\n * usage with `fast-glob`.\n *\n * ----------------------------------------------------------------\n *\n * @param input\n * Optional user-provided pattern options.\n *\n * @param policy\n * Optional runtime policy restricting which configuration\n * fields are allowed in the final resolved options.\n *\n * @returns\n * A complete and validated\n * {@link PatternOptions | `PatternOptions`} object ready for\n * direct usage with {@link fg | `fast-glob`}.\n *\n * @example\n * ```ts\n * const options = resolvePatternOptions({\n * dot: true,\n * fakeKey: 123\n * });\n *\n * // Result:\n * // {\n * // absolute: false,\n * // baseNameMatch: false,\n * // ...\n * // dot: true,\n * // ...\n * // }\n *\n * const matched = await fastGlobe(patterns, options);\n * ```\n */\nexport function resolvePatternOptions(\n input: unknown,\n policy?: PatternRuntimePolicy<false, false>\n): PatternOptions<false, false>;\nexport function resolvePatternOptions(\n input: unknown,\n policy?: PatternRuntimePolicy<true, false>\n): PatternOptions<true, false>;\nexport function resolvePatternOptions(\n input: unknown,\n policy?: PatternRuntimePolicy<false, true>\n): PatternOptions<false, true>;\nexport function resolvePatternOptions(\n input: unknown,\n policy?: PatternRuntimePolicy<true, true>\n): PatternOptions<true, true>;\nexport function resolvePatternOptions(\n input: unknown,\n policy?: PatternRuntimePolicy<false, false>\n): PatternOptions<false, false>;\nexport function resolvePatternOptions(\n input: unknown,\n policy?: PatternRuntimePolicy<boolean, boolean>\n): PatternOptions {\n const clean = sanitizePatternOptions(input, policy);\n\n const options: PatternOptions = {\n ...defaultPatternOptions,\n ...clean\n };\n\n if (policy?.filesOnly) {\n delete options.onlyFiles;\n delete options.onlyDirectories;\n }\n\n if (policy?.forceUnique) {\n delete options.unique;\n }\n\n return options;\n}\n\n/** ----------------------------------------------------------------\n * * ***Stable structural equality detector.***\n * ----------------------------------------------------------------\n *\n * Determines whether two values are structurally identical using\n * deterministic serialization via `safeStableStringify`.\n *\n * - *This comparison:*\n * - Preserves `undefined` values.\n * - Sorts object keys.\n * - Sorts arrays (optional structural normalization).\n *\n * - *Ensures stable equality checks for configuration objects where:*\n * - Property order may differ.\n * - Object references are not identical.\n * - Deep comparison is required.\n *\n * ----------------------------------------------------------------\n *\n * @template T - Value type being compared.\n *\n * @param value - The current runtime value.\n * @param defaultValue - The default reference value.\n *\n * @returns\n * - `\"default\"` ➔ If values are structurally identical.\n * - `\"overridden\"` ➔ If values differ.\n *\n * @example\n * ```ts\n * const source = sourceOfPatternOptions(\n * cleanPatternOptions,\n * defaultPatternOptions\n * );\n *\n * // ➔ \"default\" | \"overridden\"\n * ```\n *\n * @internal\n */\nexport function sourceOfPatternOptions<T>(\n value: T,\n defaultValue: T\n): \"default\" | \"overridden\" {\n const stableStringifyOptions = {\n keepUndefined: true,\n sortArray: true,\n sortKeys: true\n } satisfies SafeStableStringifyOptions;\n\n const a = safeStableStringify(value, stableStringifyOptions);\n\n const b = safeStableStringify(defaultValue, stableStringifyOptions);\n\n return a === b ? \"default\" : \"overridden\";\n}\n","import \"@rzl-zone/node-only\";\n\nimport \"dotenv/config\";\n\n// eslint-disable-next-line turbo/no-undeclared-env-vars\nconst USE_EMOJI = process.env.FORCE_EMOJI === \"1\";\n\ntype Icons = {\n readonly [K in keyof typeof emojiIcons]: string;\n};\n\nconst emojiIcons = {\n /* flow */\n start: \"🕐\",\n arrowRight: \"▶️\",\n arrowRightMini: \"›\",\n\n /* list */\n bulletBold: \"●\",\n bullet: \"•\",\n whiteCircle: \"○\",\n whiteBullet: \"◦\",\n smallSquare: \"▪\",\n\n /* status */\n success: \"✅\",\n warn: \"⚠️\",\n error: \"❌\",\n\n /* config */\n config: \"⚙️\",\n settings: \"🛠️\",\n\n /* files & fs */\n file: \"📄\",\n files: \"📁\",\n folder: \"📂\",\n path: \"🧭\",\n\n /* actions */\n add: \"➕\",\n remove: \"➖\",\n update: \"♻️\",\n copy: \"📋\",\n move: \"📦\",\n clean: \"🧹\",\n\n /* build / process */\n build: \"🏗️\",\n generate: \"🧩\",\n compile: \"⚡\",\n watch: \"👀\",\n\n /* info / misc */\n info: \"ℹ️\",\n debug: \"🐛\",\n question: \"❓\",\n separator: \"━\"\n} as const;\n\nconst asciiIcons = {\n /* flow */\n start: \"▶\",\n arrowRight: \"▶\",\n arrowRightMini: \"›\",\n\n /* list */\n bulletBold: \"●\",\n bullet: \"•\",\n whiteCircle: \"○\",\n whiteBullet: \"◦\",\n smallSquare: \"▪\",\n\n /* status */\n success: \"✅\",\n warn: \"⚠️ \",\n error: \"❌\",\n\n /* config */\n config: \"#\",\n settings: \"@\",\n\n /* files & fs */\n file: \"F\",\n files: \"DIR\",\n folder: \"DIR\",\n path: \"~\",\n\n /* actions */\n add: \"+\",\n remove: \"-\",\n update: \"~\",\n copy: \"=\",\n move: \">\",\n clean: \"x\",\n\n /* build / process */\n build: \"#\",\n generate: \"*\",\n compile: \">\",\n watch: \"o\",\n\n /* info / misc */\n info: \"i\",\n debug: \"d\",\n question: \"?\",\n separator: \"-\"\n} as const satisfies Icons;\n\n/** ----------------------------------------------------------------\n * * ***CLI icon mapping (emoji or ASCII fallback).***\n * ----------------------------------------------------------------\n *\n * Provides a centralized set of visual symbols used across the CLI\n * for rendering flow indicators, status messages, filesystem labels,\n * and action markers.\n *\n * - *The icon set is determined at runtime via the environment variable:*\n * - `FORCE_EMOJI=1` ➜ Emoji icons are enabled.\n * - Otherwise ➜ ASCII-safe fallback icons are used.\n *\n * - *This ensures compatibility with:*\n * - Terminals that do not support emoji rendering.\n * - CI environments.\n * - Minimal shells or log files.\n * - *Behavior:*\n * - The object shape is identical in both modes.\n * - Only the visual representation changes.\n * - The value is resolved once at module evaluation time.\n * ----------------------------------------------------------------\n * #### Environment Control\n * ```bash\n * FORCE_EMOJI=1\n * ```\n * ----------------------------------------------------------------\n * @remarks\n * This constant is intended for internal CLI rendering only, do not mutate the returned object.\n *\n * @example\n * ```ts\n * console.log(`${ICONS.success} Build completed`);\n * ```\n *\n */\nexport const ICONS: Readonly<Icons> = Object.freeze(\n USE_EMOJI ? emojiIcons : asciiIcons\n);\n","import \"@rzl-zone/node-only\";\n\nimport type { AnyString } from \"@/_internal/types/extra\";\n\nimport { isDeepStrictEqual } from \"node:util\";\n\nimport {\n isError,\n isNonEmptyString,\n isNumber,\n normalizeSpaces\n} from \"@/_internal/utils/helper\";\n\nimport {\n formatOptionValue,\n joinLines,\n picocolors\n} from \"@/utils/helper/formatter\";\nimport { ICONS } from \"@/utils/helper/icons\";\n\n/** -------------------------------------------------------------------\n * * ***Determines whether an option value comes from the default configuration\n * or has been explicitly overridden by the user.***\n * -------------------------------------------------------------------\n *\n * This utility is primarily intended for logging and debugging purposes,\n * especially in CLI tools or build pipelines where distinguishing between\n * default and user-provided values is important.\n *\n * The comparison is performed using `Object.is` to ensure accurate detection,\n * including edge cases such as:\n * - `NaN` vs `NaN`.\n * - `-0` vs `+0`.\n *\n * @template T - The type of the option value being compared.\n *\n * @param {unknown} value - The actual value used at runtime.\n * @param {unknown} defaultValue - The default value defined by the tool.\n *\n * @returns\n * A string indicating the source of the value:\n *\n * - `\"default\"` when `value` is strictly equal to `defaultValue`.\n * - `\"overridden\"` when the value differs from the default.\n *\n * @example\n * ```ts\n * sourceOf(\"dist\", \"dist\"); // ➔ \"default\"\n * sourceOf(\"dist/types\", \"dist\"); // ➔ \"overridden\"\n * ```\n *\n * @example\n * ***CLI-style option logging:***\n * ```ts\n * BUILD_LOGGER.OPTIONS(\n * \"outDir\",\n * outDir,\n * sourceOf(outDir, DEFAULTS.outDir)\n * );\n * ```\n */\nexport const sourceOf = <T>(\n value: T,\n defaultValue: T\n): \"default\" | \"overridden\" => {\n return Object.is(value, defaultValue) ? \"default\" : \"overridden\";\n};\n\n/** ----------------------------------------------------------------\n * * ***Deep default source detector.***\n * ----------------------------------------------------------------\n *\n * Determines whether a given value is structurally identical\n * to its default value using deep comparison.\n *\n * Unlike `Object.is`, this utility compares object contents\n * recursively rather than checking reference identity.\n *\n * Intended for configuration systems where option objects\n * may be cloned or reconstructed but still represent the\n * default state.\n *\n * @template T - Value type being compared.\n *\n * @param value - Current runtime value.\n * @param defaultValue - Default reference value.\n *\n * @returns\n * - `\"default\"` ➔ If values are deeply equal.\n * - `\"overridden\"` ➔ If values differ.\n *\n * @example\n * ```ts\n * sourceOfIsDeepStrictEqual(\n * { onlyFiles: true },\n * { onlyFiles: true }\n * );\n * // \"default\"\n * ```\n */\nexport const sourceOfIsDeepStrictEqual = <T>(\n value: T,\n defaultValue: T\n): \"default\" | \"overridden\" => {\n return isDeepStrictEqual(value, defaultValue) ? \"default\" : \"overridden\";\n};\n\n/** -------------------------------------------------------------------\n * * ***Structured build-time console logger with consistent formatting,\n * icons, and colorized output.***\n * --------------------------------------------------------------------\n *\n * `BUILD_LOGGER` provides a collection of standardized logging helpers\n * intended for **CLI tools, build scripts, and Node.js-based workflows**.\n *\n * - **It ensures:**\n * - Consistent log structure across different build phases.\n * - Clear visual distinction between states (start, success, skip, error).\n * - Emoji or ASCII icon support depending on environment configuration.\n * - Readable, colorized output via `picocolors`.\n *\n * Emoji usage is controlled via the environment variable:\n *\n * ```\n * FORCE_EMOJI=1\n * ```\n *\n * When disabled, all icons gracefully fall back to ASCII-safe symbols.\n *\n * ---\n *\n * - **Behavior:**\n * - Uses emoji icons when `FORCE_EMOJI === \"1\"`.\n * - Falls back to ASCII symbols otherwise.\n * - Applies consistent spacing, bulleting, and indentation.\n * - Formats messages using `picocolors` for visibility.\n * - Safely extracts error messages from unknown error values.\n *\n * ---\n *\n * - **Available log actions:**\n * - `SOURCE_OF`:\n * - See {@link sourceOf | **`sourceOf`**} helpers.\n *\n * - `OPTIONS({ label, value, source, isRequired })`:\n * - Logs the options argument function using\n * {@link sourceOf | **`sourceOf`**} helper.\n *\n * - `NEW_LINE()`:\n * - *Inserts an empty line in the console output.*\n *\n * - `ON_STARTING({ actionName })`:\n * - *Logs the start of a build or processing action.*\n *\n * - `ON_FINISH({ actionName, count })`:\n * - *Logs successful completion with item count.*\n *\n * - `ON_SKIPPING({ actionName, reasonEndText })`:\n * - *Logs skipped actions with human-readable reasons.*\n *\n * - `ON_ERROR({ actionName, error })`:\n * - *Logs formatted error output with extracted message.*\n *\n * - `ON_PROCESS_COPY({ actionName, copyFrom, copyTo })`:\n * - *Logs file copy operations.*\n *\n * - `ON_PROCESS({ actionName, nameDirect })`:\n * - *Logs generic processing steps.*\n *\n * - `ON_PROCESS_REFERENCING({ actionName, referenceFrom, referenceTo })`:\n * - *Logs reference or linking operations.*\n *\n * ---\n *\n * This logger is intentionally **side-effectful** and writes directly\n * to `console.log` / `console.error`.\n *\n * It is designed for **human-readable output**, not structured logging\n * or machine parsing.\n */\nexport const BUILD_LOGGER: LoggerBuilder = {\n /** -------------------------------------------------------------------\n * * ***Determines whether an option value comes from the default configuration\n * or has been explicitly overridden by the user.***\n * -------------------------------------------------------------------\n *\n * This utility is primarily intended for logging and debugging purposes,\n * especially in CLI tools or build pipelines where distinguishing between\n * default and user-provided values is important.\n *\n * The comparison is performed using `Object.is` to ensure accurate detection,\n * including edge cases such as:\n * - `NaN` vs `NaN`.\n * - `-0` vs `+0`.\n *\n * @template T - The type of the option value being compared.\n *\n * @param value - The actual value used at runtime.\n * @param defaultValue - The default value defined by the tool.\n *\n * @returns\n * A colorized string indicating the source of the value:\n *\n * - `\"default\"` when `value` is strictly equal to `defaultValue`.\n * - `\"overridden\"` when the value differs from the default.\n *\n * @example\n * ```ts\n * BUILD_LOGGER.SOURCE_OF(\"dist\", \"dist\"); // ➔ \"default\"\n * BUILD_LOGGER.SOURCE_OF(\"dist/types\", \"dist\"); // ➔ \"overridden\"\n * ```\n *\n * @example\n * ***CLI-style option logging:***\n * ```ts\n * BUILD_LOGGER.OPTIONS(\n * \"outDir\",\n * outDir,\n * BUILD_LOGGER.SOURCE_OF(outDir, DEFAULTS.outDir)\n * );\n * ```\n */\n SOURCE_OF: sourceOf,\n /** -------------------------------------------------------------------\n * * ***Logs a single option entry in a formatted, human-readable CLI style.***\n * -------------------------------------------------------------------\n *\n * This helper is used to display resolved configuration values along with\n * their origin (default or overridden), making it easier to debug and\n * understand how final options are derived.\n *\n * - **Output format example:**\n * ```bash\n * - outDir: dist/types (overridden)\n * - withExportTypes: false (default)\n * - inputDirReference: dist\n * ```\n *\n * - **Formatting rules:**\n * - Indented with a leading dash (`-`).\n * - Label is rendered in **bold**.\n * - Value is rendered in **cyan**.\n * - Source indicator (`default` / `overridden`) is **dimmed**.\n * - Arrays are stringified using a stable JSON formatter.\n * - When an option is marked as required, the source indicator is omitted.\n *\n * This function performs **no mutation** and has **no side effects**\n * other than writing to `stdout`.\n *\n * @param {string} label - Human-readable option name\n * (e.g. `\"outDir\"`, `\"withExportTypes\"`, `\"inputDirReference\"`).\n *\n * @param {unknown} value - The resolved option value to display.\n * Can be of any type; arrays are stringified automatically.\n *\n * @param {\"default\" | \"overridden\" | ({} & string)} source - A value indicating whether the option comes from\n * the default configuration or was overridden by user input, typically\n * produced by {@link sourceOf | **`sourceOf`**}.\n *\n * @param {boolean | undefined} isRequired - When set to `true`, marks\n * the option as required and suppresses the source indicator in the output,\n * defaults to `false`.\n *\n * @example\n * ```ts\n * OPTIONS(\n * \"outDir\",\n * outDir,\n * sourceOf(outDir, DEFAULTS.outDir)\n * );\n * ```\n *\n * @example\n * Logging multiple options.\n * ```ts\n * OPTIONS(\n * \"outFileName\",\n * outFileName,\n * sourceOf(outFileName, DEFAULTS.outFileName)\n * );\n * OPTIONS(\n * \"inputDirReference\",\n * inputDirReference,\n * sourceOf(inputDirReference, DEFAULTS.inputDirReference)\n * );\n * OPTIONS(\n * \"withExportTypes\",\n * withExportTypes,\n * sourceOf(withExportTypes, DEFAULTS.withExportTypes)\n * );\n * ```\n *\n * @example\n * Logging a required option.\n * ```ts\n * OPTIONS(\n * \"input\",\n * inputPath,\n * sourceOf(inputPath, undefined),\n * true\n * );\n * ```\n */\n OPTIONS(\n label: string,\n value: unknown,\n source: ReturnType<typeof sourceOf> | AnyString,\n isRequired?: boolean\n ) {\n const sourceLabel =\n !isRequired && source\n ? source === \"default\"\n ? picocolors.blueBright(` (${source})`)\n : picocolors.yellowBright(` (${source})`)\n : \"\";\n\n console.log(\n picocolors.dim(\" - \") +\n normalizeSpaces(\n picocolors.bold(label || \"`⚠️ Label Unset!!!`\") +\n picocolors.dim(\": \") +\n formatOptionValue(value) +\n picocolors.italic(sourceLabel)\n )\n );\n },\n /** -------------------------------------------------------------------\n * * ***Logs a subsection title for grouped log output.***\n * -------------------------------------------------------------------\n *\n * Used to visually separate logical blocks such as:\n * - Arguments.\n * - Options.\n * - Configuration.\n * - Resolved Values.\n *\n * This improves readability when logging many related entries.\n *\n * @param {string} title - Section title text (e.g. \"Options\", \"Arguments\").\n * @param {{ icon?: string; indent?: string; }} options - Optional icon override.\n *\n * @example\n * ```ts\n * BUILD_LOGGER.SECTION(\"Options\");\n * BUILD_LOGGER.SECTION(\"Arguments\", { icon: ICONS.folder });\n * ```\n */\n SECTION(title: string, options: LoggerBuilderSection = {}) {\n const { icon = ICONS.config, indent = \"\" } = options;\n\n console.log(\n picocolors.bold(\n `${indent}${picocolors.whiteBright(icon)} ${picocolors.underline(picocolors.cyanBright(title || \"`⚠️ Unset Title!!!`\"))}:`\n )\n );\n },\n /** -------------------------------------------------------------------\n * * ***Prints a single empty line to the console.***\n * -------------------------------------------------------------------\n *\n * Writes a newline to standard output, typically used as a visual\n * separator between log sections to improve CLI readability.\n *\n * If a string value is provided, it will be printed instead of an\n * empty line.\n *\n * @param {string} [value=\"\"] - Optional text to print. Defaults to an\n * empty string, resulting in a blank line.\n *\n * @example\n * ```ts\n * BUILD_LOGGER.NEW_LINE();\n * ```\n *\n * @example\n * ```ts\n * BUILD_LOGGER.NEW_LINE(\" \");\n * ```\n */\n NEW_LINE(value: string = \"\") {\n return console.log(value);\n },\n /** -------------------------------------------------------------------\n * * ***Logs a starting action message.***\n * -------------------------------------------------------------------\n *\n * Used to indicate that a process or action has just started.\n * Typically printed once before any processing begins.\n *\n * - **Output format example:**\n * ```bash\n * ▶ Starting to generate-types.\n * ```\n *\n * - **Formatting rules:**\n * - Start icon is displayed.\n * - \"Starting\" keyword is highlighted.\n * - Action name is underlined and colored.\n *\n * This function performs **no mutation** and has **no side effects**\n * other than writing to `stdout`.\n *\n * @example\n * ```ts\n * BUILD_LOGGER.ON_STARTING({ actionName: \"build references\" });\n * ```\n */\n ON_STARTING: (options: LoggerBuilderOnStarting) => {\n const { actionName, textDirectAction = \"to\" } = options;\n\n console.log(\n picocolors.bold(\n `${picocolors.whiteBright(ICONS.start)} ${picocolors.cyanBright(\n \"Starting\"\n )} ${normalizeSpaces(`${textDirectAction} ${picocolors.underline(picocolors.blueBright(actionName))}`)}.`\n )\n );\n },\n /** -------------------------------------------------------------------\n * * ***Logs a successful completion message.***\n * -------------------------------------------------------------------\n *\n * Used to indicate that an action has finished successfully,\n * including a summary count of processed items.\n *\n * - **Output format example:**\n * ```bash\n * ✔ Success generate-types (12 files).\n * ```\n *\n * - **Formatting rules:**\n * - Success icon and green highlight.\n * - Action name is underlined.\n * - Count is highlighted in yellow.\n *\n * This function performs **no mutation** and has **no side effects**\n * other than writing to `stdout`.\n *\n * @example\n * ```ts\n * BUILD_LOGGER.ON_FINISH({\n * actionName: \"generate references\",\n * count: 5\n * });\n * ```\n */\n ON_FINISH: (options: LoggerBuilderOnFinish) => {\n const {\n actionName,\n count,\n typeCount = \"file\",\n progress,\n textSuccess = \"Success\"\n } = options;\n\n console.log(\n picocolors.bold(\n `${picocolors.greenBright(ICONS.success)} ${picocolors.greenBright(textSuccess)} ${normalizeSpaces(\n `${picocolors.underline(\n picocolors.blueBright(actionName)\n )} (${picocolors.yellowBright(`${isNonEmptyString(progress) ? progress : count} ${typeCount}${count > 1 ? \"(s)\" : \"\"}`)}`\n )}).`\n )\n );\n },\n /** -------------------------------------------------------------------\n * * ***Logs a skipped action with a detailed reason.***\n * -------------------------------------------------------------------\n *\n * Used when an action is intentionally skipped due to\n * unmet conditions or no remaining work.\n *\n * - **Output format example:**\n * ```bash\n * ⚠ Skipping generate-types because nothing left files to process.\n * ```\n *\n * - **Formatting rules:**\n * - Warning icon with yellow highlight.\n * - Action name is underlined.\n * - Skip reason is emphasized in red.\n *\n * This function performs **no mutation** and has **no side effects**\n * other than writing to `stdout`.\n *\n * @example\n * ```ts\n * BUILD_LOGGER.ON_SKIPPING({\n * actionName: \"generate references\",\n * reasonEndText: \"process\"\n * });\n * ```\n */\n ON_SKIPPING: (options: LoggerBuilderOnSkipping) => {\n const {\n actionName,\n reasonEndText,\n reasonSkipAction = \"nothing left\",\n reasonTitle = \"because\",\n reasonType = \"files\",\n textDirectAction = \"to\"\n } = options;\n\n console.log(\n picocolors.bold(\n `${picocolors.yellowBright(ICONS.warn)} ${picocolors.yellowBright(\"Skipping\")} ${normalizeSpaces(\n `${picocolors.underline(\n picocolors.blueBright(actionName)\n )} ${picocolors.white(reasonTitle)} ${picocolors.redBright(\n reasonSkipAction\n )} ${reasonType} ${textDirectAction} ${picocolors.redBright(reasonEndText)}`\n )}.`\n )\n );\n },\n /** -------------------------------------------------------------------\n * * ***Logs an error occurring during an action.***\n * -------------------------------------------------------------------\n *\n * Used to report fatal or recoverable errors during execution.\n * Automatically extracts the message from an `Error` instance.\n *\n * - **Output format example:**\n * ```bash\n * ✖ Error to generate-types,\n * ➜ Something went wrong\n * ```\n *\n * - **Formatting rules:**\n * - Error icon and red highlight.\n * - Action name is underlined.\n * - Error message is inverted for emphasis.\n *\n * This function performs **no mutation** and has **no side effects**\n * other than writing to `stderr`.\n *\n * @example\n * ```ts\n * BUILD_LOGGER.ON_ERROR({\n * actionName: \"copy files\",\n * error: err\n * });\n * ```\n */\n ON_ERROR: (options: LoggerBuilderOnError) => {\n const { actionName, textDirectAction = \"to\", error } = options;\n\n const errorMsg = isError(error) ? error.message : \"Something went wrong\";\n\n console.error(\n picocolors.bold(\n `${picocolors.redBright(ICONS.error)} ${picocolors.redBright(\"Error\")} ${normalizeSpaces(\n `${textDirectAction} ${picocolors.underline(picocolors.blueBright(actionName))},`\n )} ${joinLines(\"because: \", \"\", ` ${picocolors.bold(picocolors.red(ICONS.arrowRight))} ${picocolors.inverse(picocolors.red(normalizeSpaces(errorMsg)))}`)}`\n )\n );\n },\n /** -------------------------------------------------------------------\n * * ***Logs a generic processing step.***\n * -------------------------------------------------------------------\n *\n * Used for logging step-by-step progress inside a process,\n * typically for folders or grouped actions.\n *\n * - **Output format example:**\n * ```bash\n * • 2. Generating in dist/types.\n * ```\n *\n * This function performs **no mutation** and has **no side effects**\n * other than writing to `stdout`.\n */\n ON_PROCESS: (options: LoggerBuilderOnProcess) => {\n const { actionName, count, nameDirect, textDirectFolder = \"in\" } = options;\n\n console.log(\n `${picocolors.bold(\" \" + picocolors.whiteBright(ICONS.bullet))} ${picocolors.italic(\n `${picocolors.white(count + \".\")} ${normalizeSpaces(\n `${picocolors.white(actionName)} ${picocolors.magentaBright(\n textDirectFolder\n )} ${picocolors.bold(picocolors.underline(picocolors.blue(nameDirect)))}.`\n )}`\n )}`\n );\n },\n /** -------------------------------------------------------------------\n * * ***Logs a copy process entry.***\n * -------------------------------------------------------------------\n *\n * Used to log a file or directory copy operation as part\n * of a larger process.\n *\n * - **Output format example:**\n * ```bash\n * • 1. Copy from 'src/types' ➔ 'dist/types'.\n * ```\n *\n * This function performs **no mutation** and has **no side effects**\n * other than writing to `stdout`.\n */\n ON_PROCESS_COPY: (options: LoggerBuilderOnProcessCopy) => {\n const {\n actionName,\n count,\n copyTo,\n copyFrom,\n textFrom = \"from\",\n textArrow = \"➔\"\n } = options;\n\n console.log(\n `${picocolors.bold(\" \" + picocolors.whiteBright(ICONS.bullet))} ${picocolors.italic(\n `${picocolors.white(count + \".\")} ${normalizeSpaces(\n `${picocolors.white(actionName)} ${picocolors.yellow(\n textFrom\n )} '${picocolors.bold(picocolors.underline(picocolors.cyanBright(copyFrom)))}' ${picocolors.bold(\n picocolors.gray(textArrow)\n )} '${picocolors.bold(picocolors.underline(picocolors.cyanBright(copyTo)))}'.`\n )}`\n )}`\n );\n },\n /** -------------------------------------------------------------------\n * * ***Logs a copy process entry.***\n * -------------------------------------------------------------------\n *\n * Used to log a file or directory copy operation as part\n * of a larger process.\n *\n * - **Output format example:**\n * ```bash\n * • 1. Failed Copying from 'src/types' because source file not found.\n * ```\n *\n * This function performs **no mutation** and has **no side effects**\n * other than writing to `stdout`.\n */\n ON_PROCESS_COPY_ERROR: (options: LoggerBuilderOnProcessCopyError) => {\n const {\n actionName,\n count,\n errorReason,\n copyFrom,\n index,\n indexKey,\n textFrom = \"from\",\n textReason = \"because\"\n } = options;\n\n const errorReasonText = isError(errorReason)\n ? errorReason.message\n : String(errorReason);\n\n const atIndexText = isNumber(index)\n ? picocolors.blueBright(\n ` (at${isNonEmptyString(indexKey) ? ` '${indexKey}' ` : \" \"}index: ${picocolors.magentaBright(index)}) `\n )\n : \" \";\n\n console.log(\n `${picocolors.bold(\" \" + picocolors.whiteBright(ICONS.bullet))} ${picocolors.italic(\n `${picocolors.white(count + \".\")} ${normalizeSpaces(\n `${picocolors.redBright(actionName)} ${picocolors.yellow(\n textFrom\n )} '${picocolors.bold(picocolors.underline(picocolors.cyanBright(copyFrom)))}'${atIndexText}${picocolors.bold(\n picocolors.gray(textReason)\n )} ${picocolors.redBright(errorReasonText)}.`\n )}`\n )}`\n );\n },\n /** -------------------------------------------------------------------\n * * ***Logs a reference linking process.***\n * -------------------------------------------------------------------\n *\n * Used to indicate that a reference is being created\n * from one location to another.\n *\n * - **Output format example:**\n * ```bash\n * • 3. Referencing from src/index.ts ➔ dist/index.d.ts.\n * ```\n *\n * This function performs **no mutation** and has **no side effects**\n * other than writing to `stdout`.\n */\n ON_PROCESS_REFERENCING: (options: LoggerBuilderOnProcessReferencing) => {\n const {\n actionName,\n count,\n referenceTo,\n referenceFrom,\n textFrom = \"from\",\n textArrow = \"➔\"\n } = options;\n\n console.log(\n `${picocolors.bold(\" \" + picocolors.whiteBright(ICONS.bullet))} ${picocolors.italic(\n `${picocolors.white(count + \".\")} ${normalizeSpaces(\n `${picocolors.white(actionName)} ${picocolors.magentaBright(\n textFrom\n )} ${picocolors.bold(picocolors.underline(picocolors.cyanBright(referenceFrom)))} ${picocolors.bold(\n picocolors.gray(textArrow)\n )} ${picocolors.bold(picocolors.underline(picocolors.blueBright(referenceTo)))}.`\n )}`\n )}`\n );\n }\n};\n\ntype LoggerBuilder = {\n SOURCE_OF: typeof sourceOf;\n OPTIONS(\n label: string,\n value: unknown,\n source: ReturnType<typeof sourceOf> | AnyString,\n isRequired?: boolean\n ): void;\n SECTION(title: string, options?: LoggerBuilderSection): void;\n NEW_LINE(value?: string): void;\n ON_STARTING: (options: LoggerBuilderOnStarting) => void;\n ON_FINISH: (options: LoggerBuilderOnFinish) => void;\n ON_SKIPPING: (options: LoggerBuilderOnSkipping) => void;\n ON_ERROR: (options: LoggerBuilderOnError) => void;\n ON_PROCESS: (options: LoggerBuilderOnProcess) => void;\n ON_PROCESS_COPY: (options: LoggerBuilderOnProcessCopy) => void;\n ON_PROCESS_COPY_ERROR: (options: LoggerBuilderOnProcessCopyError) => void;\n ON_PROCESS_REFERENCING: (options: LoggerBuilderOnProcessReferencing) => void;\n};\n\ntype LoggerBuilderSection = {\n /**\n * @default ICON.config\n */\n icon?: string;\n /**\n * @default \"\"\n */\n indent?: string;\n};\ntype LoggerBuilderOnStarting = {\n /** The name of the action being started.\n *\n * @default\n * undefined\n */\n actionName: string;\n /** Connector word used before the action name.\n *\n * @default\n * \"to\"\n */\n textDirectAction?: string;\n};\ntype LoggerBuilderOnFinish = {\n /** The name of the completed action.\n *\n * @default\n * undefined\n */\n actionName: string;\n /** The success text.\n *\n * @default\n * @default \"Success\"\n */\n textSuccess?: string;\n /** Label for the count unit.\n *\n * @default\n * \"file\"\n */\n typeCount?: string;\n /** Number of processed items.\n *\n * @default\n * undefined\n */\n count: number;\n /** Progress of processed items (e.g. `2/7`).\n *\n * Represents how many items have been processed relative to the total.\n *\n * @example\n * \"2/7\"\n */\n progress?: string;\n};\ntype LoggerBuilderOnSkipping = {\n /** The name of the skipped action.\n *\n * @default\n * undefined\n */\n actionName: string;\n /** Connector word explaining the reason.\n *\n * @default\n * \"because\"\n */\n reasonTitle?: string;\n /** Short reason phrase.\n *\n * @default\n * \"nothing left\"\n */\n reasonSkipAction?: string;\n /** Contextual explanation for the skip.\n *\n * @default\n * undefined\n */\n reasonEndText: string;\n /** Type of resource involved.\n *\n * @default\n * \"files\"\n */\n reasonType?: string;\n /** Connector word before the target.\n *\n * @default\n * \"to\"\n */\n textDirectAction?: string;\n};\ntype LoggerBuilderOnError = {\n /** The name of the action that failed.\n *\n * @default\n * undefined\n */\n actionName: string;\n /** Connector word before the action name.\n *\n * @default\n * \"to\"\n */\n textDirectAction?: string;\n /** Unknown error object or `Error` instance.\n *\n */\n error: unknown;\n};\ntype LoggerBuilderOnProcess = {\n /** Description of the process.\n *\n * @default\n * undefined\n */\n actionName: string;\n /** Sequence number.\n *\n * @default\n * undefined\n */\n count: number;\n /** Connector word before the target.\n *\n * @default\n * \"in\"\n */\n textDirectFolder?: string;\n /** Target name or location.\n *\n * @default\n * undefined\n */\n nameDirect: string;\n};\ntype LoggerBuilderOnProcessCopy = {\n /** The name of the action being the copy action.\n *\n * @default\n * undefined\n */\n actionName: string;\n /** Sequence number of the process.\n *\n * @default\n * undefined\n */\n count: number;\n /** Connector text before source path.\n *\n * @default\n * \"from\"\n */\n textFrom?: string;\n /** Source path.\n *\n * @default\n * undefined\n */\n copyFrom: string;\n /** Destination path.\n *\n * @default\n * undefined\n */\n copyTo: string;\n /** Arrow symbol between paths.\n *\n * @default\n * \"➔\"\n */\n textArrow?: string;\n};\ntype LoggerBuilderOnProcessCopyError = {\n /** The name of the action being the error copy action.\n *\n * @default\n * undefined\n */\n actionName: string;\n /** Sequence number of the process.\n *\n * @default\n * undefined\n */\n count: number;\n /** Index number parameter.\n *\n * @default\n * undefined\n */\n index?: number;\n /** Index key name for parameter.\n *\n * @default\n * undefined\n */\n indexKey?: string;\n /** Connector text before source path.\n *\n * @default\n * \"from\"\n */\n textFrom?: string;\n /** Source path.\n *\n * @default\n * undefined\n */\n copyFrom: string;\n /** The reason error on copying.\n *\n * @default\n * undefined\n */\n errorReason: string | Error;\n /** Connector word explaining the reason.\n *\n * @default\n * \"because\"\n */\n textReason?: string;\n};\ntype LoggerBuilderOnProcessReferencing = {\n /** The name of the action being the referencing action.\n *\n * @default\n * undefined\n */\n actionName: string;\n /** Sequence number.\n *\n * @default\n * undefined\n */\n count: number;\n /** Connector text before source.\n *\n * @default\n * \"from\"\n */\n textFrom?: string;\n /** Source reference path.\n *\n * @default\n * undefined\n */\n referenceFrom: string;\n /** Target reference path.\n *\n * @default\n * undefined\n */\n referenceTo: string;\n /** Arrow symbol between references.\n *\n * @default\n * \"➔\"\n */\n textArrow?: string;\n};\n","import \"@rzl-zone/node-only\";\n\nimport _fsExtra from \"fs-extra\";\nimport _fastGlob from \"fast-glob\";\n\nexport { ICONS } from \"@/utils/helper/icons\";\n\n/** ----------------------------------------------------------------\n * * ***Node.js–only filesystem utilities (fs-extra).***\n * ----------------------------------------------------------------\n *\n * This export is a **thin re-export** of the `fs-extra` package,\n * intended for **server-side / Node.js environments only**.\n *\n * ⚠️ **DO NOT import this in browser or client-side code.**\n * The underlying implementation depends on Node.js built-in\n * modules such as `fs`, `path`, and `process`.\n *\n * - *Typical use cases:*\n * - CLI tools.\n * - Build scripts.\n * - File system manipulation on the server.\n *\n * @see {@link https://github.com/jprichardson/node-fs-extra | **`https://github.com/jprichardson/node-fs-extra`**}.\n * @environment node\n */\nexport const fsExtra: typeof _fsExtra = _fsExtra;\n\n/** ----------------------------------------------------------------\n * * ***High-performance file system globbing utility (fast-glob).***\n * ----------------------------------------------------------------\n *\n * This export re-exports the default export of `fast-glob`,\n * which is implemented using **CommonJS `export =` semantics**.\n *\n * Due to its reliance on Node.js APIs, this module is\n * **server-side only** and must not be bundled for the browser.\n *\n * - *Typical use cases:*\n * - Resolving file patterns in build tools.\n * - Scanning project directories.\n * - CLI and automation scripts.\n *\n * @see {@link https://github.com/mrmlnc/fast-glob | **`https://github.com/mrmlnc/fast-glob`**}.\n * @environment node\n */\nexport const fastGlob: typeof _fastGlob = _fastGlob;\n\nexport {\n BUILD_LOGGER,\n sourceOf,\n sourceOfIsDeepStrictEqual\n} from \"@/_internal/utils/logger-builder\";\n\nexport {\n defaultPatternOptions,\n type PatternConfig,\n type PatternOptions\n} from \"@/_internal/libs/fast-globe-options\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA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MAAM,cAAc,SAAS,KAAK,IAC9B,WAAW,WACT,OAAO,iBAAiB,QAAQ,IAAI,KAAK,SAAS,MAAM,IAAI,SAAS,WAAW,cAAc,KAAK,EAAE,GACvG,IACA;EAEJ,QAAQ,IACN,GAAG,WAAW,KAAK,OAAO,WAAW,YAAY,MAAM,MAAM,CAAC,EAAE,GAAG,WAAW,OAC5E,GAAG,WAAW,MAAM,QAAQ,GAAG,EAAE,GAAG,gBAClC,GAAG,WAAW,UAAU,UAAU,EAAE,GAAG,WAAW,OAChD,QACF,EAAE,IAAI,WAAW,KAAK,WAAW,UAAU,WAAW,WAAW,QAAQ,CAAC,CAAC,EAAE,GAAG,cAAc,WAAW,KACvG,WAAW,KAAK,UAAU,CAC5B,EAAE,GAAG,WAAW,UAAU,eAAe,EAAE,EAC7C,GACF,GACF;CACF;;;;;;;;;;;;;;;;CAgBA,yBAAyB,YAA+C;EACtE,MAAM,EACJ,YACA,OACA,aACA,eACA,WAAW,QACX,YAAY,QACV;EAEJ,QAAQ,IACN,GAAG,WAAW,KAAK,OAAO,WAAW,YAAY,MAAM,MAAM,CAAC,EAAE,GAAG,WAAW,OAC5E,GAAG,WAAW,MAAM,QAAQ,GAAG,EAAE,GAAG,gBAClC,GAAG,WAAW,MAAM,UAAU,EAAE,GAAG,WAAW,cAC5C,QACF,EAAE,GAAG,WAAW,KAAK,WAAW,UAAU,WAAW,WAAW,aAAa,CAAC,CAAC,EAAE,GAAG,WAAW,KAC7F,WAAW,KAAK,SAAS,CAC3B,EAAE,GAAG,WAAW,KAAK,WAAW,UAAU,WAAW,WAAW,WAAW,CAAC,CAAC,EAAE,EACjF,GACF,GACF;CACF;AACF;;;;;;;;;;;;;;;;;;;;;;;AC1qBA,MAAa,UAA2B;;;;;;;;;;;;;;;;;;;AAoBxC,MAAa,WAA6B"}
@@ -2,14 +2,14 @@
2
2
  * ========================================================================
3
3
  * @rzl-zone/build-tools
4
4
  * ------------------------------------------------------------------------
5
- * Version: `0.0.13`
5
+ * Version: `0.0.14`
6
6
  * Author: `Rizalvin Dwiky <rizalvindwiky1998@gmail.com>`
7
7
  * Repository: `https://github.com/rzl-zone/rzl-zone/tree/main/packages/build-tools`
8
8
  * ========================================================================
9
9
  */
10
10
 
11
11
  "use strict";
12
- const require_formatter = require('./formatter-C-Yt_Gvf.cjs');
12
+ const require_formatter = require('./formatter-BAkIXFPg.cjs');
13
13
  require("@rzl-zone/node-only");
14
14
  let node_os = require("node:os");
15
15
  node_os = require_formatter.__toESM(node_os, 1);
@@ -252,4 +252,4 @@ Object.defineProperty(exports, 'sourceOfPatternOptions', {
252
252
  return sourceOfPatternOptions;
253
253
  }
254
254
  });
255
- //# sourceMappingURL=server-BRuKWcjy.cjs.map
255
+ //# sourceMappingURL=server-DXTo5kvY.cjs.map