@rzl-zone/build-tools 0.0.8 → 0.0.9

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 (59) 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 +3 -3
  8. package/dist/bundler/tsdown.d.cts +2 -2
  9. package/dist/bundler/tsdown.d.ts +2 -2
  10. package/dist/bundler/tsdown.js +3 -3
  11. package/dist/bundler/utils.cjs +2 -2
  12. package/dist/bundler/utils.d.cts +2 -2
  13. package/dist/bundler/utils.d.ts +2 -2
  14. package/dist/bundler/utils.js +2 -2
  15. package/dist/{client-BczBMDS6.cjs → client-C3jHSAqV.cjs} +3 -3
  16. package/dist/{client-BczBMDS6.cjs.map → client-C3jHSAqV.cjs.map} +1 -1
  17. package/dist/{client-C0ZDdv36.js → client-DUlrjus0.js} +3 -3
  18. package/dist/{client-C0ZDdv36.js.map → client-DUlrjus0.js.map} +1 -1
  19. package/dist/commander-kit/index.cjs +5 -5
  20. package/dist/commander-kit/index.d.cts +3 -3
  21. package/dist/commander-kit/index.d.ts +3 -3
  22. package/dist/commander-kit/index.js +5 -5
  23. package/dist/{extra-CnJhk-pp.d.cts → extra-CsRmdXC4.d.cts} +2 -2
  24. package/dist/{extra-CDUxrgcT.d.ts → extra-DxvrBev9.d.ts} +2 -2
  25. package/dist/{fast-globe-options-CMxk8gD9.d.ts → fast-globe-options-Cz8KJqKc.d.ts} +3 -3
  26. package/dist/{fast-globe-options-B4edSsWz.d.cts → fast-globe-options-PH-bHWVK.d.cts} +3 -3
  27. package/dist/{helper-2m5t07Qe.js → helper-D11A-ZKL.js} +2 -2
  28. package/dist/{helper-2m5t07Qe.js.map → helper-D11A-ZKL.js.map} +1 -1
  29. package/dist/{helper-BRO-s2fI.cjs → helper-DpeqwciR.cjs} +2 -2
  30. package/dist/{helper-BRO-s2fI.cjs.map → helper-DpeqwciR.cjs.map} +1 -1
  31. package/dist/{identity-1Zk_fLSI.cjs → identity-ByjqnR8L.cjs} +6 -6
  32. package/dist/{identity-1Zk_fLSI.cjs.map → identity-ByjqnR8L.cjs.map} +1 -1
  33. package/dist/{identity-CCGqrTRL.js → identity-C5MeSAA7.js} +6 -6
  34. package/dist/{identity-CCGqrTRL.js.map → identity-C5MeSAA7.js.map} +1 -1
  35. package/dist/{index-DPGJBhEK.d.ts → index-B1t7Xs3T.d.ts} +2 -2
  36. package/dist/{index-C-jXEIZS.d.ts → index-Dvmmz0f_.d.ts} +2 -2
  37. package/dist/{index-De-ymoL3.d.cts → index-TgjbNRWB.d.cts} +2 -2
  38. package/dist/{index-B3ChWfIR.d.cts → index-xAz8brx-.d.cts} +2 -2
  39. package/dist/index.cjs +6 -6
  40. package/dist/index.d.cts +5 -5
  41. package/dist/index.d.ts +5 -5
  42. package/dist/index.js +6 -6
  43. package/dist/{package-banner-BAbZghTB.cjs → package-banner-ByfR7yCv.cjs} +5 -5
  44. package/dist/{package-banner-BAbZghTB.cjs.map → package-banner-ByfR7yCv.cjs.map} +1 -1
  45. package/dist/{package-banner-BM84W-TO.js → package-banner-vwqcAX8E.js} +5 -5
  46. package/dist/{package-banner-BM84W-TO.js.map → package-banner-vwqcAX8E.js.map} +1 -1
  47. package/dist/{server-DH801yY1.js → server-1H2HFAbi.js} +3 -3
  48. package/dist/{server-DH801yY1.js.map → server-1H2HFAbi.js.map} +1 -1
  49. package/dist/{server-DL-uLx4N.cjs → server-BK6eykjo.cjs} +3 -3
  50. package/dist/{server-DL-uLx4N.cjs.map → server-BK6eykjo.cjs.map} +1 -1
  51. package/dist/utils/client.cjs +2 -2
  52. package/dist/utils/client.d.cts +1 -1
  53. package/dist/utils/client.d.ts +1 -1
  54. package/dist/utils/client.js +2 -2
  55. package/dist/utils/server.cjs +2 -2
  56. package/dist/utils/server.d.cts +2 -2
  57. package/dist/utils/server.d.ts +2 -2
  58. package/dist/utils/server.js +2 -2
  59. package/package.json +3 -3
@@ -2,14 +2,14 @@
2
2
  * ========================================================================
3
3
  * @rzl-zone/build-tools
4
4
  * ------------------------------------------------------------------------
5
- * Version: `0.0.8`
5
+ * Version: `0.0.9`
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_helper = require('./helper-BRO-s2fI.cjs');
12
+ const require_helper = require('./helper-DpeqwciR.cjs');
13
13
  require("@rzl-zone/node-only");
14
14
  let node_os = require("node:os");
15
15
  node_os = require_helper.__toESM(node_os, 1);
@@ -178,4 +178,4 @@ Object.defineProperty(exports, 'sourceOfPatternOptions', {
178
178
  return sourceOfPatternOptions;
179
179
  }
180
180
  });
181
- //# sourceMappingURL=server-DL-uLx4N.cjs.map
181
+ //# sourceMappingURL=server-BK6eykjo.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"server-DL-uLx4N.cjs","names":["os","isPlainObject","safeStableStringify","_fsExtra","_fastGlob"],"sources":["../src/_internal/libs/fast-globe-options.ts","../src/utils/helper/icons.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 _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 defaultPatternOptions,\n type PatternConfig,\n type PatternOptions\n} from \"@/_internal/libs/fast-globe-options\";\n"],"mappings":"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"}
1
+ {"version":3,"file":"server-BK6eykjo.cjs","names":["os","isPlainObject","safeStableStringify","_fsExtra","_fastGlob"],"sources":["../src/_internal/libs/fast-globe-options.ts","../src/utils/helper/icons.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 _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 defaultPatternOptions,\n type PatternConfig,\n type PatternOptions\n} from \"@/_internal/libs/fast-globe-options\";\n"],"mappings":"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"}
@@ -2,7 +2,7 @@
2
2
  * ========================================================================
3
3
  * @rzl-zone/build-tools
4
4
  * ------------------------------------------------------------------------
5
- * Version: `0.0.8`
5
+ * Version: `0.0.9`
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
  * ========================================================================
@@ -10,7 +10,7 @@
10
10
 
11
11
  "use strict";
12
12
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
13
- const require_client = require('../client-BczBMDS6.cjs');
13
+ const require_client = require('../client-C3jHSAqV.cjs');
14
14
  exports.ConfigurationError = require_client.ConfigurationError;
15
15
  exports.EOL = require_client.EOL;
16
16
  exports.NEWLINE = require_client.NEWLINE;
@@ -2,7 +2,7 @@
2
2
  * ========================================================================
3
3
  * @rzl-zone/build-tools
4
4
  * ------------------------------------------------------------------------
5
- * Version: `0.0.8`
5
+ * Version: `0.0.9`
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
  * ========================================================================
@@ -2,7 +2,7 @@
2
2
  * ========================================================================
3
3
  * @rzl-zone/build-tools
4
4
  * ------------------------------------------------------------------------
5
- * Version: `0.0.8`
5
+ * Version: `0.0.9`
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
  * ========================================================================
@@ -2,11 +2,11 @@
2
2
  * ========================================================================
3
3
  * @rzl-zone/build-tools
4
4
  * ------------------------------------------------------------------------
5
- * Version: `0.0.8`
5
+ * Version: `0.0.9`
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 { a as joinInline, c as padText, i as formatOptionValue, l as picocolors, n as EOL, o as joinLines, r as NEWLINE, s as joinLinesLoose, t as ConfigurationError, u as plural } from "../client-C0ZDdv36.js";
11
+ import { a as joinInline, c as padText, i as formatOptionValue, l as picocolors, n as EOL, o as joinLines, r as NEWLINE, s as joinLinesLoose, t as ConfigurationError, u as plural } from "../client-DUlrjus0.js";
12
12
  export { ConfigurationError, EOL, NEWLINE, formatOptionValue, joinInline, joinLines, joinLinesLoose, padText, picocolors, plural };
@@ -2,7 +2,7 @@
2
2
  * ========================================================================
3
3
  * @rzl-zone/build-tools
4
4
  * ------------------------------------------------------------------------
5
- * Version: `0.0.8`
5
+ * Version: `0.0.9`
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
  * ========================================================================
@@ -10,7 +10,7 @@
10
10
 
11
11
  "use strict";
12
12
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
13
- const require_server = require('../server-DL-uLx4N.cjs');
13
+ const require_server = require('../server-BK6eykjo.cjs');
14
14
  exports.ICONS = require_server.ICONS;
15
15
  exports.defaultPatternOptions = require_server.defaultPatternOptions;
16
16
  exports.fastGlob = require_server.fastGlob;
@@ -2,13 +2,13 @@
2
2
  * ========================================================================
3
3
  * @rzl-zone/build-tools
4
4
  * ------------------------------------------------------------------------
5
- * Version: `0.0.8`
5
+ * Version: `0.0.9`
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 { n as PatternOptions, r as defaultPatternOptions, t as PatternConfig } from "../fast-globe-options-B4edSsWz.cjs";
11
+ import { n as PatternOptions, r as defaultPatternOptions, t as PatternConfig } from "../fast-globe-options-PH-bHWVK.cjs";
12
12
  import _fastGlob from "fast-glob";
13
13
  import _fsExtra from "fs-extra";
14
14
  type Icons = { readonly [K in keyof typeof emojiIcons]: string };
@@ -2,13 +2,13 @@
2
2
  * ========================================================================
3
3
  * @rzl-zone/build-tools
4
4
  * ------------------------------------------------------------------------
5
- * Version: `0.0.8`
5
+ * Version: `0.0.9`
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 { n as PatternOptions, r as defaultPatternOptions, t as PatternConfig } from "../fast-globe-options-CMxk8gD9.js";
11
+ import { n as PatternOptions, r as defaultPatternOptions, t as PatternConfig } from "../fast-globe-options-Cz8KJqKc.js";
12
12
  import _fastGlob from "fast-glob";
13
13
  import _fsExtra from "fs-extra";
14
14
  type Icons = { readonly [K in keyof typeof emojiIcons]: string };
@@ -2,11 +2,11 @@
2
2
  * ========================================================================
3
3
  * @rzl-zone/build-tools
4
4
  * ------------------------------------------------------------------------
5
- * Version: `0.0.8`
5
+ * Version: `0.0.9`
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 { i as defaultPatternOptions, n as fsExtra, r as ICONS, t as fastGlob } from "../server-DH801yY1.js";
11
+ import { i as defaultPatternOptions, n as fsExtra, r as ICONS, t as fastGlob } from "../server-1H2HFAbi.js";
12
12
  export { ICONS, defaultPatternOptions, fastGlob, fsExtra };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rzl-zone/build-tools",
3
- "version": "0.0.8",
4
- "description": "Toolkit to standardize and improve build outputs for TypeScript and JavaScript packages.",
3
+ "version": "0.0.9",
4
+ "description": "Toolkit to standardize and improve TypeScript and JavaScript build outputs.",
5
5
  "license": "MIT",
6
6
  "author": "Rizalvin Dwiky <rizalvindwiky1998@gmail.com>",
7
7
  "contributors": [
@@ -117,7 +117,7 @@
117
117
  "fs-extra": "^11.3.4",
118
118
  "picocolors": "^1.1.1",
119
119
  "semver": "^7.7.4",
120
- "@rzl-zone/node-only": "0.0.7"
120
+ "@rzl-zone/node-only": "0.0.8"
121
121
  },
122
122
  "devDependencies": {
123
123
  "@types/babel__traverse": "^7.28.0",