@rzl-zone/build-tools 0.0.12 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.references/index.d.cts +1 -1
- package/dist/.references/index.d.ts +1 -1
- package/dist/bundler/rolldown.cjs +2 -2
- package/dist/bundler/rolldown.cjs.map +1 -1
- package/dist/bundler/rolldown.d.cts +2 -2
- package/dist/bundler/rolldown.d.ts +2 -2
- package/dist/bundler/rolldown.js +1 -1
- package/dist/bundler/rolldown.js.map +1 -1
- package/dist/bundler/tsdown.cjs +11 -5
- package/dist/bundler/tsdown.cjs.map +1 -1
- package/dist/bundler/tsdown.d.cts +2 -2
- package/dist/bundler/tsdown.d.ts +2 -2
- package/dist/bundler/tsdown.js +11 -5
- package/dist/bundler/tsdown.js.map +1 -1
- package/dist/bundler/utils.cjs +2 -2
- package/dist/bundler/utils.cjs.map +1 -1
- package/dist/bundler/utils.d.cts +2 -2
- package/dist/bundler/utils.d.ts +2 -2
- package/dist/bundler/utils.js +2 -2
- package/dist/bundler/utils.js.map +1 -1
- package/dist/{client-B-L0njjX.js → client-DgQRjdo8.js} +3 -3
- package/dist/{client-B-L0njjX.js.map → client-DgQRjdo8.js.map} +1 -1
- package/dist/{client-BxJj_VrQ.cjs → client-DowGlRm4.cjs} +3 -3
- package/dist/{client-BxJj_VrQ.cjs.map → client-DowGlRm4.cjs.map} +1 -1
- package/dist/commander-kit/index.cjs +5 -5
- package/dist/commander-kit/index.cjs.map +1 -1
- package/dist/commander-kit/index.d.cts +3 -3
- package/dist/commander-kit/index.d.ts +3 -3
- package/dist/commander-kit/index.js +5 -5
- package/dist/commander-kit/index.js.map +1 -1
- package/dist/{extra-CtuOwfZ4.d.cts → extra-B0cm-axJ.d.cts} +2 -2
- package/dist/{extra-CNDyFVA8.d.ts → extra-B0cm-axJ.d.ts} +2 -2
- package/dist/{fast-globe-options-Dj630IVV.d.ts → fast-globe-options-CUaH5spu.d.ts} +3 -3
- package/dist/{fast-globe-options-NcQT6Fg5.d.cts → fast-globe-options-DXVzXC8B.d.cts} +3 -3
- package/dist/{formatter-Bd8fVs2h.js → formatter-BFgV1HhV.js} +2 -2
- package/dist/{formatter-Bd8fVs2h.js.map → formatter-BFgV1HhV.js.map} +1 -1
- package/dist/{formatter-DEp7VUev.cjs → formatter-C-Yt_Gvf.cjs} +2 -2
- package/dist/{formatter-DEp7VUev.cjs.map → formatter-C-Yt_Gvf.cjs.map} +1 -1
- package/dist/{identity-C9ff_g77.cjs → identity-8Wy_JtzU.cjs} +5 -5
- package/dist/{identity-C9ff_g77.cjs.map → identity-8Wy_JtzU.cjs.map} +1 -1
- package/dist/{identity-BaFHc-2R.js → identity-DPB1Qgy4.js} +5 -5
- package/dist/{identity-BaFHc-2R.js.map → identity-DPB1Qgy4.js.map} +1 -1
- package/dist/{index-DgaO182z.d.cts → index-8QVWHQzC.d.cts} +2 -2
- package/dist/{index-uMbOxPvL.d.ts → index-8QVWHQzC.d.ts} +2 -2
- package/dist/{index-BXqEWtZV.d.cts → index-CyGIoXau.d.cts} +2 -2
- package/dist/{index-qpwsLgqK.d.ts → index-CyGIoXau.d.ts} +2 -2
- package/dist/index.cjs +5 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/{package-banner-Bk5L__8h.js → package-banner-BjakxfTu.js} +4 -4
- package/dist/{package-banner-Bk5L__8h.js.map → package-banner-BjakxfTu.js.map} +1 -1
- package/dist/{package-banner-Pjznq5SP.cjs → package-banner-Cf5uu-7p.cjs} +4 -4
- package/dist/{package-banner-Pjznq5SP.cjs.map → package-banner-Cf5uu-7p.cjs.map} +1 -1
- package/dist/{server-BsqxhpCl.js → server-B1jiYLZq.js} +3 -3
- package/dist/{server-BsqxhpCl.js.map → server-B1jiYLZq.js.map} +1 -1
- package/dist/{server-CyO1Pxp8.cjs → server-BRuKWcjy.cjs} +3 -3
- package/dist/{server-CyO1Pxp8.cjs.map → server-BRuKWcjy.cjs.map} +1 -1
- package/dist/utils/client.cjs +3 -3
- package/dist/utils/client.d.cts +1 -1
- package/dist/utils/client.d.ts +1 -1
- package/dist/utils/client.js +3 -3
- package/dist/utils/server.cjs +2 -2
- package/dist/utils/server.d.cts +3 -3
- package/dist/utils/server.d.ts +3 -3
- package/dist/utils/server.js +2 -2
- package/package.json +2 -2
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* ========================================================================
|
|
3
3
|
* @rzl-zone/build-tools
|
|
4
4
|
* ------------------------------------------------------------------------
|
|
5
|
-
* Version: `0.0.
|
|
5
|
+
* Version: `0.0.13`
|
|
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
|
* ========================================================================
|
|
@@ -991,4 +991,4 @@ type OverrideTypes<T, U extends StrictOverrideConstraint<T, U, Options["strictKe
|
|
|
991
991
|
*/
|
|
992
992
|
type StrictAwaitable<T> = T | Promise<T>;
|
|
993
993
|
export { OmitStrict as a, PrettifyOptions as c, NonUndefined as i, StrictAwaitable as l, Arrayable as n, OverrideTypes as o, DefaultPrettifyOptions as r, Prettify as s, AnyString as t };
|
|
994
|
-
//# sourceMappingURL=extra-
|
|
994
|
+
//# sourceMappingURL=extra-B0cm-axJ.d.cts.map
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* ========================================================================
|
|
3
3
|
* @rzl-zone/build-tools
|
|
4
4
|
* ------------------------------------------------------------------------
|
|
5
|
-
* Version: `0.0.
|
|
5
|
+
* Version: `0.0.13`
|
|
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
|
* ========================================================================
|
|
@@ -991,4 +991,4 @@ type OverrideTypes<T, U extends StrictOverrideConstraint<T, U, Options["strictKe
|
|
|
991
991
|
*/
|
|
992
992
|
type StrictAwaitable<T> = T | Promise<T>;
|
|
993
993
|
export { OmitStrict as a, PrettifyOptions as c, NonUndefined as i, StrictAwaitable as l, Arrayable as n, OverrideTypes as o, DefaultPrettifyOptions as r, Prettify as s, AnyString as t };
|
|
994
|
-
//# sourceMappingURL=extra-
|
|
994
|
+
//# sourceMappingURL=extra-B0cm-axJ.d.ts.map
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
* ========================================================================
|
|
3
3
|
* @rzl-zone/build-tools
|
|
4
4
|
* ------------------------------------------------------------------------
|
|
5
|
-
* Version: `0.0.
|
|
5
|
+
* Version: `0.0.13`
|
|
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 OmitStrict, s as Prettify } from "./extra-
|
|
11
|
+
import { a as OmitStrict, s as Prettify } from "./extra-B0cm-axJ.js";
|
|
12
12
|
import * as fg from "fast-glob";
|
|
13
13
|
|
|
14
14
|
type IfTrueGeneric<T extends boolean, K> = T extends true ? K : never;
|
|
@@ -123,4 +123,4 @@ type PatternConfig<FilesOnly extends boolean = false, ForceUnique extends boolea
|
|
|
123
123
|
*/
|
|
124
124
|
declare const defaultPatternOptions: PatternOptions;
|
|
125
125
|
export { PatternOptions as n, defaultPatternOptions as r, PatternConfig as t };
|
|
126
|
-
//# sourceMappingURL=fast-globe-options-
|
|
126
|
+
//# sourceMappingURL=fast-globe-options-CUaH5spu.d.ts.map
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
* ========================================================================
|
|
3
3
|
* @rzl-zone/build-tools
|
|
4
4
|
* ------------------------------------------------------------------------
|
|
5
|
-
* Version: `0.0.
|
|
5
|
+
* Version: `0.0.13`
|
|
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 OmitStrict, s as Prettify } from "./extra-
|
|
11
|
+
import { a as OmitStrict, s as Prettify } from "./extra-B0cm-axJ.cjs";
|
|
12
12
|
import * as fg from "fast-glob";
|
|
13
13
|
|
|
14
14
|
type IfTrueGeneric<T extends boolean, K> = T extends true ? K : never;
|
|
@@ -123,4 +123,4 @@ type PatternConfig<FilesOnly extends boolean = false, ForceUnique extends boolea
|
|
|
123
123
|
*/
|
|
124
124
|
declare const defaultPatternOptions: PatternOptions;
|
|
125
125
|
export { PatternOptions as n, defaultPatternOptions as r, PatternConfig as t };
|
|
126
|
-
//# sourceMappingURL=fast-globe-options-
|
|
126
|
+
//# sourceMappingURL=fast-globe-options-DXVzXC8B.d.cts.map
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* ========================================================================
|
|
3
3
|
* @rzl-zone/build-tools
|
|
4
4
|
* ------------------------------------------------------------------------
|
|
5
|
-
* Version: `0.0.
|
|
5
|
+
* Version: `0.0.13`
|
|
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
|
* ========================================================================
|
|
@@ -297,4 +297,4 @@ function formatOptionValue(value, options) {
|
|
|
297
297
|
return formatRecursive(value);
|
|
298
298
|
}
|
|
299
299
|
export { isString as C, toArray as D, safeStableStringify as E, toObjectSet as O, isSet as S, normalizeSpaces as T, isNonEmptyString as _, joinLines as a, isPlainObject as b, picocolors as c, flattenStrings as d, isArray as f, isNil as g, isFunction as h, joinInline as i, toStringSet as k, plural as l, isError as m, NEWLINE as n, joinLinesLoose as o, isBoolean as p, formatOptionValue as r, padText as s, EOL as t, deepFreeze as u, isNull as v, isUndefined as w, isRegExp as x, isNumber as y };
|
|
300
|
-
//# sourceMappingURL=formatter-
|
|
300
|
+
//# sourceMappingURL=formatter-BFgV1HhV.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatter-Bd8fVs2h.js","names":[],"sources":["../src/_internal/utils/helper.ts","../src/utils/helper/node-require.ts","../src/utils/helper/formatter.ts"],"sourcesContent":["import type {\n AnObjectNonArray,\n AnyFunction,\n Arrayable,\n Extends,\n IsArray,\n IsNever,\n NonPlainObject,\n OrArr,\n ReadonlyDeep\n} from \"@/_internal/types/extra\";\n\n// ----------------------------------------------------------------\n\n/** @internal */\nexport function deepFreeze<T>(value: T): ReadonlyDeep<T> {\n if (typeof value !== \"object\" || value === null) {\n return value as ReadonlyDeep<T>;\n }\n\n const seen = new WeakSet<object>();\n const stack: object[] = [value as object];\n\n while (stack.length) {\n const obj = stack.pop()!;\n\n if (seen.has(obj) || Object.isFrozen(obj)) continue;\n\n seen.add(obj);\n\n // Map\n if (isMap(obj)) {\n for (const [k, v] of obj) {\n if (typeof k === \"object\" && k !== null) stack.push(k);\n if (typeof v === \"object\" && v !== null) stack.push(v);\n }\n }\n\n // Set\n else if (isSet(obj)) {\n for (const v of obj) {\n if (typeof v === \"object\" && v !== null) stack.push(v);\n }\n }\n\n // Fast path Array\n else if (isArray(obj)) {\n for (const v of obj) {\n if (typeof v === \"object\" && v !== null) stack.push(v);\n }\n } else {\n const record = obj as Record<PropertyKey, unknown>;\n\n for (const key of Reflect.ownKeys(record)) {\n const v = record[key];\n if (typeof v === \"object\" && v !== null) stack.push(v);\n }\n\n // const descriptors = Object.getOwnPropertyDescriptors(obj);\n\n // for (const key of Reflect.ownKeys(descriptors)) {\n // const desc = descriptors[key as keyof typeof descriptors];\n // if (!desc) continue;\n\n // if (\"value\" in desc) {\n // const v = desc.value;\n // if (typeof v === \"object\" && v !== null) stack.push(v);\n // }\n // }\n }\n\n Object.freeze(obj);\n }\n\n return value as ReadonlyDeep<T>;\n}\n// ----------------------------------------------------------------\n\n/** @internal */\nexport function isObjectLoose<T>(\n value: T\n): value is Extract<T, object | AnyFunction> {\n return !isNil(value) && (isObjectOrArray(value) || isFunction(value));\n}\n\nexport function isObjectLike<T>(value: T): value is Extract<T, object> {\n return !isFunction(value) && isObjectLoose(value);\n}\n// ----------------------------------------------------------------\n\n/** ----------------------------------------------------------------\n * * ***Check whether a value is thenable (Promise-like).***\n * ----------------------------------------------------------------\n *\n * Determines whether a value implements a `.then()` method and can be\n * treated as a **thenable** object.\n *\n * This includes:\n * - Native `Promise`.\n * - Promise-like objects returned by libraries.\n * - Custom objects implementing `.then()`.\n *\n * ----------------------------------------------------------------\n *\n * @typeParam T\n * The resolved value type of the thenable.\n *\n * @param v\n * The value to check.\n *\n * @returns\n * `true` if the value is thenable, otherwise `false`.\n *\n * When `true`, the value is narrowed to `PromiseLike<T>`.\n *\n * ----------------------------------------------------------------\n *\n * @example\n * ```ts\n * isThenable(Promise.resolve(1));\n * // ➔ true\n *\n * isThenable({ then: () => {} });\n * // ➔ true\n *\n * isThenable(123);\n * // ➔ false\n * ```\n *\n * @example\n * ```ts\n * async function unwrap<T>(value: T | Promise<T>) {\n * if (isThenable<T>(value)) {\n * return await value;\n * }\n *\n * return value;\n * }\n * ```\n *\n * @remarks\n * Thenables are typically resolved before function execution to support async config factories without enforcing `Promise` instances.\n * - This function checks **behavior**, not identity.\n * - The value does **not** have to be an instance of `Promise`.\n * - Useful for async utilities, lazy evaluation, and hybrid sync/async APIs.\n *\n * @internal\n */\nexport const isThenable = <T = unknown>(v: unknown): v is PromiseLike<T> =>\n v != null &&\n (typeof v === \"object\" || typeof v === \"function\") &&\n typeof (v as PromiseLike<T>).then === \"function\";\n\n// ----------------------------------------------------------------\n\n/** @internal */\nexport const isRegExp = (value: unknown): value is RegExp => {\n return value instanceof RegExp;\n};\n\n// ----------------------------------------------------------------\n\n/** @internal */\nexport const isString = (value: unknown): value is string => {\n return typeof value === \"string\";\n};\n\n// ----------------------------------------------------------------\n\n/** @internal */\nexport function isSet<T = unknown>(value: Set<T>): value is Set<T>;\nexport function isSet(value: unknown): value is Set<unknown>;\nexport function isSet(value: unknown): boolean {\n return (\n Object.prototype.toString.call(value) === \"[object Set]\" ||\n value instanceof Set\n );\n}\n\n// ----------------------------------------------------------------\n\n/** @internal */\nexport function isMap<K = unknown, V = unknown>(\n value: Map<K, V>\n): value is Map<K, V>;\nexport function isMap(value: unknown): value is Map<unknown, unknown>;\nexport function isMap(value: unknown): boolean {\n return (\n Object.prototype.toString.call(value) === \"[object Map]\" ||\n value instanceof Map\n );\n}\n\n// ----------------------------------------------------------------\n\n/** @internal */\ntype ArrayFallback<T> =\n IsNever<Extract<T, unknown[] | readonly unknown[]>> extends true\n ? unknown[] & T\n : Extract<T, unknown[] | readonly unknown[]>;\n\n/** @internal */\nexport function isArray<T>(value: T): value is ArrayFallback<T>;\n// export function isArray<T>(value: T): value is IsNever<Extract<T, unknown[]>> extends true ? unknown[]: Extract<T, unknown[]>;\nexport function isArray(value: unknown): value is unknown[];\nexport function isArray(value: unknown): boolean {\n return Array.isArray(value);\n}\n\n// ----------------------------------------------------------------\n\n/** @internal */\nexport const isNull = (val: unknown): val is null => val === null;\n\n// ----------------------------------------------------------------\n\n/** @internal */\ntype IsPlainObjectResult<T> = unknown extends T\n ? Record<PropertyKey, unknown> & T\n : T extends object\n ? T extends NonPlainObject\n ? never\n : IsHasKeysObject<T> extends false\n ? Record<PropertyKey, unknown> & T\n : T\n : Extract<T, Record<PropertyKey, unknown>>;\n\n/** @internal */\nexport function isPlainObject<T>(value: T): value is IsPlainObjectResult<T>;\nexport function isPlainObject<T>(\n value: T\n): value is NonNullable<Extract<T, Record<PropertyKey, unknown>>>;\nexport function isPlainObject(value: unknown) {\n if (!isObject(value)) return false;\n\n const proto = Object.getPrototypeOf(value);\n return proto === Object.prototype || proto === null;\n}\n\n// ----------------------------------------------------------------\n\n/** @internal */\ntype IsObject<T> = unknown extends T\n ? T & Record<PropertyKey, unknown>\n : T extends object\n ? T extends AnObjectNonArray\n ? T\n : IsHasKeysObject<T> extends false\n ? T & Record<PropertyKey, unknown>\n : IsArray<T> extends true\n ? Exclude<T, unknown[]>\n : T\n : never;\n\n/** @internal */\nexport function isObject<T extends object>(value: T): value is IsObject<T>;\nexport function isObject(value: unknown): value is Record<PropertyKey, unknown>;\nexport function isObject(value: unknown): boolean {\n return typeof value === \"object\" && !isNil(value) && !isArray(value);\n}\n\n// ----------------------------------------------------------------\n\n/** @internal */\ntype IsHasKeysObject<T> = keyof T extends never ? false : true;\n\n// ----------------------------------------------------------------\n\n/** @internal */\ntype IsObjectOrArray<T> =\n OrArr<\n [IsNever<T>, Extends<T, Record<PropertyKey, unknown>>, Extends<unknown, T>]\n > extends true\n ? T & Record<PropertyKey, unknown> & unknown[]\n : T extends object\n ? T extends unknown[]\n ? T\n : T extends AnObjectNonArray\n ? T\n : IsHasKeysObject<T> extends false\n ? T & Record<PropertyKey, unknown>\n : T\n : Extract<T, Record<PropertyKey, unknown> & unknown[]>;\n\n/** @internal */\nexport function isObjectOrArray(value: []): value is [];\nexport function isObjectOrArray<T>(value: T): value is IsObjectOrArray<T>;\nexport function isObjectOrArray<T>(value: T): boolean {\n return isArray(value) || isObject(value);\n}\n\n// ----------------------------------------------------------------\n\n/** @internal */\nexport const isNil = (value: unknown): value is null | undefined => {\n return value == null;\n};\n\n// ----------------------------------------------------------------\n\n/** @internal */\nexport const isBoolean = (value: unknown): value is boolean => {\n return typeof value === \"boolean\";\n};\n\n// ----------------------------------------------------------------\n\n/** @internal */\nexport const isUndefined = (value: unknown): value is undefined => {\n return typeof value === \"undefined\";\n};\n\n// ----------------------------------------------------------------\n\n/** @internal */\nexport const isFunction = (value: unknown): value is AnyFunction => {\n return typeof value === \"function\";\n};\n\n// ----------------------------------------------------------------\n\n/** @internal */\n// eslint-disable-next-line @typescript-eslint/no-wrapper-object-types\nexport const isNumberObject = (value: unknown): value is Number => {\n return (\n isObject(value) &&\n Object.prototype.toString.call(value) === \"[object Number]\"\n );\n};\n\n// ----------------------------------------------------------------\n\n/** @internal */\n// eslint-disable-next-line @typescript-eslint/no-wrapper-object-types\nexport const isStringObject = (value: unknown): value is String => {\n return (\n isObject(value) &&\n Object.prototype.toString.call(value) === \"[object String]\"\n );\n};\n\n// ----------------------------------------------------------------\n\n/** @internal */\n// eslint-disable-next-line @typescript-eslint/no-wrapper-object-types\nexport const isBooleanObject = (value: unknown): value is Boolean => {\n return (\n isObject(value) &&\n Object.prototype.toString.call(value) === \"[object Boolean]\"\n );\n};\n\n// ----------------------------------------------------------------\n\n/** @internal */\nexport const isInfinityNumber = (value: unknown): boolean => {\n if (typeof value === \"number\" || isNumberObject(value)) {\n const num = Number(value);\n return num === Infinity || num === -Infinity;\n }\n return false;\n};\n\n// ----------------------------------------------------------------\n\n/** @internal */\nexport const isSymbol = (value: unknown): value is symbol => {\n return typeof value === \"symbol\";\n};\n\n// ----------------------------------------------------------------\n\n/** @internal */\nexport const isBigInt = (value: unknown): value is bigint => {\n return typeof value === \"bigint\";\n};\n\n// ----------------------------------------------------------------\n\n/** @internal */\nexport const isNaN = (value: unknown): boolean => {\n return typeof value === \"number\"\n ? Number.isNaN(value)\n : isNumberObject(value) && Number.isNaN(value.valueOf());\n};\n\n// ----------------------------------------------------------------\n\n/** @internal */\ntype IsNonEmptyStringOptions = {\n /** Whether to trim the string before checking, defaultValue: `true`.\n *\n * @default true */\n trim?: boolean;\n};\n\n/** @internal */\nexport const isNonEmptyString = (\n value: unknown,\n options: IsNonEmptyStringOptions = {}\n): value is string => {\n if (!isString(value)) return false;\n\n const trim = options.trim ?? true;\n\n const str = trim ? value.trim() : value;\n\n return str.length > 0;\n};\n\n// ----------------------------------------------------------------\n\n/** @internal */\ntype IsNumberOptions = {\n /** If set to `true`, `NaN` will be considered a valid number, defaultValue: `false`.\n *\n * @default false\n */\n includeNaN?: boolean;\n};\n\n/** @internal */\nexport const isNumber = (\n value: unknown,\n options: IsNumberOptions = {}\n): value is number => {\n const includeNaN =\n isPlainObject(options) && isBoolean(options.includeNaN)\n ? options.includeNaN\n : false;\n\n const aNumber = typeof value === \"number\";\n return includeNaN ? aNumber : aNumber && !Number.isNaN(value);\n};\n\n// ----------------------------------------------------------------\n\n/** @internal */\nexport const isError = (error: unknown): error is Error => {\n return (\n Object.prototype.toString.call(error) === \"[object Error]\" ||\n error instanceof Error\n );\n};\n// ----------------------------------------------------------------\n\n/** @internal */\ntype isDateOptions = {\n /** * ***Skip the validity check (`!isNaN(date.getTime())`).***\n *\n * When `true`, the function only checks that the value is an\n * instance of `Date` without verifying that it represents a valid\n * date value, default: `false`.\n *\n * @default false\n */\n skipInvalidDate?: boolean;\n};\n\n/** @internal */\nexport const isDate = (\n value: unknown,\n options: isDateOptions = {}\n): value is Date => {\n const skipInvalidDate =\n isPlainObject(options) && isBoolean(options.skipInvalidDate)\n ? options.skipInvalidDate\n : false;\n\n const instanceDate = value instanceof Date;\n\n if (skipInvalidDate) return instanceDate;\n return instanceDate && !isNaN(value.getTime());\n};\n\n// ----------------------------------------------------------------\n\n/** @internal */\nexport type SafeStableStringifyOptions = {\n /** -------------------------------------------------\n * * ***Whether to sort **object keys** alphabetically (recursively).***\n * -------------------------------------------------\n *\n * - `true` (default): object keys are sorted to ensure stable output.\n * - `false`: preserves original insertion order of keys.\n *\n * @default true\n */\n sortKeys?: boolean;\n /** -------------------------------------------------\n * * ***Whether to sort **primitive values inside arrays**.***\n * -------------------------------------------------\n *\n * - `true`: primitive values in arrays are sorted to ensure stable output.\n * - `false` (default): arrays retain their original order; objects and nested arrays are not reordered.\n *\n * @default false\n */\n sortArray?: boolean;\n /** -------------------------------------------------\n * * ***Whether to pretty-print JSON output with 2-space indentation.***\n * -------------------------------------------------\n *\n * - `true`: output is formatted with indentation and newlines.\n * - `false` (default): produces compact single-line JSON.\n *\n * @default false\n */\n pretty?: boolean;\n /** -------------------------------------------------\n * * ***Preserve `undefined` values instead of converting them to `null`.***\n * -------------------------------------------------\n * **Controls how the internal `deepProcess` step rewrites values\n * **before** the final `JSON.stringify` call.**\n * - **Default (`false`):**\n * * Every `undefined` value (object properties **and** array elements)\n * is replaced with `null` **before** serialization, because this happens\n * first, the key is **not removed** by `JSON.stringify`.\n * - **`true`** – Leaves `undefined` untouched so the final\n * `JSON.stringify` call behaves natively:\n * * Object properties with `undefined` are **removed**.\n * * Array elements that are `undefined` become `null`.\n * @default false\n * @example\n * // ✅ keepUndefined = true: behaves like native JSON.stringify\n * safeStableStringify({ a: undefined }, { keepUndefined: true });\n * // ➔ '{}' // key removed\n *\n * // ✅ Default (false): convert undefined to null, key kept\n * safeStableStringify({ a: undefined });\n * // ➔ '{\"a\":null}' // key present, value null\n *\n * // Arrays\n * safeStableStringify([undefined]);\n * // ➔ '[null]' // same, but via pre-replacement\n * safeStableStringify([undefined], { keepUndefined: true });\n * // ➔ '[null]' // element becomes null\n */\n keepUndefined?: boolean;\n};\n\n/** @internal */\nexport const safeStableStringify = (\n value: unknown,\n options: SafeStableStringifyOptions = {}\n): string => {\n const pretty = options.pretty ?? false;\n const sortKeys = options.sortKeys ?? true;\n const sortArray = options.sortArray ?? false;\n const keepUndefined = options.keepUndefined ?? false;\n\n if (isUndefined(value)) {\n return keepUndefined ? \"undefined\" : \"null\";\n }\n\n const seen = new WeakSet();\n\n const isPrimitive = (val: unknown): boolean =>\n isNull(val) || (!isObjectOrArray(val) && !isFunction(val));\n\n const deepProcess = (val: unknown): unknown => {\n if (isNumberObject(val)) {\n const valOf = val.valueOf();\n return isNaN(valOf) || isInfinityNumber(valOf) ? null : valOf;\n }\n if (isStringObject(val)) return val.valueOf();\n if (isBooleanObject(val)) return val.valueOf();\n if (isFunction(val) || isSymbol(val)) return undefined;\n if (isBigInt(val)) return val.toString();\n if (isNaN(val) || isInfinityNumber(val)) return null;\n if (isUndefined(val)) {\n return keepUndefined ? undefined : null;\n }\n\n if (isObjectOrArray(val)) {\n if (seen.has(val)) return \"[Circular]\";\n seen.add(val);\n\n if (isDate(val)) return val.toISOString();\n if (isMap(val)) {\n return {\n map: Array.from(val.entries()).map(([k, v]) => [k, deepProcess(v)])\n };\n }\n if (isSet(val)) return { set: Array.from(val.values()).map(deepProcess) };\n\n if (isArray(val)) {\n const processedArr = val.map(deepProcess);\n if (sortArray) {\n const primitives: unknown[] = [];\n const nonPrimitives: unknown[] = [];\n\n for (const item of processedArr) {\n if (isPrimitive(item)) primitives.push(item);\n else nonPrimitives.push(item);\n }\n primitives.sort((a, b) => {\n if (isNumber(a) && isNumber(b)) return a - b;\n return String(a).localeCompare(String(b));\n });\n return [...primitives, ...nonPrimitives];\n }\n return processedArr;\n }\n\n const keys = Object.keys(val);\n if (sortKeys) {\n keys.sort((a, b) => {\n const na = Number(a);\n const nb = Number(b);\n if (!isNaN(na) && !isNaN(nb)) return na - nb;\n return a.localeCompare(b);\n });\n }\n\n const result: Record<string, unknown> = {};\n\n if (isObject(val)) {\n for (const k of keys) {\n const v = deepProcess(val[k]);\n if (!isUndefined(v)) result[k] = v;\n }\n }\n\n return result;\n }\n\n return val;\n };\n\n try {\n return JSON.stringify(deepProcess(value), null, pretty ? 2 : 0);\n } catch (err) {\n console.warn(\"Error in safeStableStringify:\", err);\n return \"{}\";\n }\n};\n\n// ----------------------------------------------------------------\n\n/** @internal */\ntype NormalizeSpacesOptions = {\n /** If `true`, skips normalization and only trims whitespace from start & end, defaultValue: `false`.\n *\n * @default false\n */\n trimOnly?: boolean;\n /** If `false`, skips trimming value, defaultValue: `true`.\n *\n * @default true\n */\n withTrim?: boolean;\n};\n\n/** @internal */\nexport const normalizeSpaces = (\n value: string | null | undefined,\n options: NormalizeSpacesOptions = {\n withTrim: true,\n trimOnly: false\n }\n): string => {\n if (!isNonEmptyString(value)) return \"\";\n\n if (!isPlainObject(options)) {\n options = {};\n }\n\n const { trimOnly = false, withTrim = true } = options;\n\n if (trimOnly) return value.trim();\n\n if (withTrim) {\n value = value.trim();\n }\n\n // Remove all duplicate spaces (including tabs, newlines, etc.)\n return value.replace(/\\s+/g, \" \");\n};\n\n// ----------------------------------------------------------------\n\n/** ----------------------------------------------------------------\n * * ***Checks whether a value is an array of strings.***\n * ----------------------------------------------------------------\n *\n * Type guard that validates the input is an `Array` where **all**\n * elements are strings.\n *\n * @param {unknown} v - The value to test.\n *\n * @returns {boolean} `true` if the value is a `string[]`.\n *\n * @internal\n */\nexport const isStringArray = (v: unknown): v is string[] =>\n isArray(v) && v.every((i) => isString(i));\n\n/** ----------------------------------------------------------------\n * * ***Checks whether a value is a Set of strings.***\n * ----------------------------------------------------------------\n *\n * Type guard that validates the input is a `Set` where **all**\n * entries are strings.\n *\n * @param {unknown} v - The value to test.\n *\n * @returns {boolean} `true` if the value is a `Set<string>`.\n *\n * @internal\n */\nexport const isStringSet = (v: unknown): v is Set<string> =>\n isSet(v) && [...v].every((i) => isString(i));\n\n/** ----------------------------------------------------------------\n * * ***Asserts that a value is a valid pattern input.***\n * ----------------------------------------------------------------\n *\n * Runtime assertion that validates the provided value is one of the\n * supported pattern types:\n * - `string`.\n * - `string[]`.\n * - `Set<string>`.\n *\n * This function is intended to be used at API boundaries to ensure\n * type safety before further processing.\n *\n * @param {unknown} v - The value to validate.\n * @param {string|undefined} parameterKey - The key parameter to identity which is invalid, default `\"pattern\"`.\n *\n * @throws {TypeError} If the value is not a valid pattern input.\n *\n * @example\n * ```ts\n * assertValidatePatternArgs(pattern);\n * // pattern is now typed as:\n * // string | string[] | Set<string>\n * ```\n *\n * @internal\n */\nexport const assertValidatePatternArgs: (\n v: unknown,\n parameterKey?: string\n) => asserts v is string | string[] | Set<string> = (\n v: unknown,\n parameterKey: string = \"pattern\"\n) => {\n if (!isString(v) && !isStringArray(v) && !isStringSet(v)) {\n throw new TypeError(\n `The \\`${parameterKey}\\` argument must be a string, string[] or Set<string>.`\n );\n }\n};\n\n/** ----------------------------------------------------------------\n * * ***Flattens nested arrays and extracts string values only.***\n * ----------------------------------------------------------------\n *\n * Recursively flattens an input array to **infinite depth** and\n * filters out all non-string values.\n *\n * - *Normalization rules:*\n * - Nested arrays are flattened using `Array.prototype.flat(Infinity)`.\n * - Only values with `typeof === \"string\"` are kept.\n * - Non-string values are discarded.\n *\n * The returned array is always a **new instance** and does not mutate\n * the original input.\n *\n * @param {readonly unknown[]} input - Arbitrary nested array input.\n *\n * @returns {string[]} A flat array containing only string values.\n *\n * @example\n * ```ts\n * flattenStrings([\"a\", [\"b\", [\"c\"]], 1, null]);\n * // ➔ [\"a\", \"b\", \"c\"]\n * ```\n *\n * @internal\n */\nexport const flattenStrings = (input: readonly unknown[]): string[] => {\n return input.flat(Infinity).filter((v): v is string => typeof v === \"string\");\n};\n\n/** ----------------------------------------------------------------\n * * ***Normalizes pattern input into a new `Set<string>` instance.***\n * ----------------------------------------------------------------\n *\n * Converts a pattern value into a deduplicated `Set<string>` for\n * consistent internal handling.\n *\n * #### Normalization behavior\n * - `string` ➔ wrapped into a `Set`.\n * - `string[]` ➔ converted into a `Set` (duplicates removed).\n * - `Set<string>` ➔ cloned into a new `Set`.\n *\n * The returned set is **always a new instance** and the original\n * input is never mutated.\n *\n * #### Validation\n * When `withValidationType` is `true` (default), the input will be\n * validated before normalization.\n *\n * If the provided `pattern` is not one of the supported types,\n * a `TypeError` will be thrown.\n *\n * @param pattern - Pattern value to normalize.\n * @param options - Optional configuration object.\n * @param options.withValidationType - Whether to validate the input\n * before normalization. Defaults to `true`.\n * @param options.parameterKey - The key parameter to identity which is invalid, default `\"pattern\"`.\n *\n * @returns A new deduplicated `Set<string>` instance.\n *\n * @throws {TypeError}\n * Thrown when `pattern` is not a `string`, `string[]`, or `Set<string>`\n * and validation is enabled.\n *\n * @example\n * ```ts\n * toStringSet(\"a\");\n * // ➔ Set { \"a\" }\n * ```\n *\n * @example\n * ```ts\n * toStringSet([\"a\", \"b\", \"a\"]);\n * // ➔ Set { \"a\", \"b\" }\n * ```\n *\n * @example\n * ```ts\n * toStringSet(new Set([\"x\", \"y\"]));\n * // ➔ Set { \"x\", \"y\" }\n * ```\n *\n * @example\n * ```ts\n * toStringSet(123 as any);\n * // ❌ Throws TypeError\n * ```\n *\n * @example\n * ```ts\n * // Disable validation (use cautiously)\n * toStringSet(\"a\", { withValidationType: false });\n * toStringSet(123 as any, { withValidationType: false });\n * ```\n *\n * @internal\n */\nexport const toStringSet = (\n pattern: string | string[] | Set<string>,\n options: {\n withValidationType?: boolean;\n /**\n * The key parameter to identity which is invalid.\n *\n * @default \"pattern\"\n */\n parameterKey?: string;\n } = {}\n): Set<string> => {\n const { withValidationType = true, parameterKey = \"pattern\" } = options;\n if (withValidationType) assertValidatePatternArgs(pattern, parameterKey);\n\n return toObjectSet(pattern);\n};\n\n/** ----------------------------------------------------------------\n * * ***Normalizes a value into a deduplicated `Set`.***\n * ----------------------------------------------------------------\n *\n * Converts a single value, array, or existing `Set` into a `Set<T>`\n * for consistent internal handling.\n *\n * - *Normalization rules:*\n * - `T` ➔ wrapped in a `Set`.\n * - `T[]` ➔ converted to a `Set` (duplicates removed).\n * - `Set<T>` ➔ returned as-is.\n *\n * The returned `Set` is **not mutated** internally by this function.\n * If an existing `Set` is provided, it will be reused.\n *\n * @typeParam T - Value type stored in the set.\n *\n * @param {T | T[] | Set<T>} value - Value to normalize.\n *\n * @returns {Set<T>} A deduplicated set of values.\n *\n * @example\n * ```ts\n * toObjectSet(1);\n * // ➔ Set { 1 }\n * ```\n *\n * @example\n * ```ts\n * toObjectSet([1, 2, 1]);\n * // ➔ Set { 1, 2 }\n * ```\n *\n * @example\n * ```ts\n * toObjectSet(new Set([1, 2]));\n * // ➔ Set { 1, 2 }\n * ```\n *\n * @internal\n */\nexport const toObjectSet = <T>(value: T | T[] | Set<T>): Set<T> => {\n if (isSet(value)) return value;\n\n return new Set(isArray(value) ? value : [value]);\n};\n\n/** ----------------------------------------------------------------\n * * ***Normalize a value into an array.***\n * ----------------------------------------------------------------\n *\n * Converts a single value or an array-like value into a **new array**\n * with consistent typing.\n *\n * - If `value` is already an array ➔ returned as-is.\n * - If `value` is a single item ➔ wrapped in an array.\n *\n * This utility is useful for APIs or configs that accept\n * either a single value or multiple values.\n *\n * ----------------------------------------------------------------\n *\n * @typeParam T\n * The element type of the resulting array.\n *\n * @param value\n * A value or array of values.\n *\n * @returns\n * A normalized array of type `T[]`.\n *\n * ----------------------------------------------------------------\n *\n * @example\n * ```ts\n * toArray(1);\n * // ➔ [1]\n *\n * toArray(\"hello\");\n * // ➔ [\"hello\"]\n *\n * toArray([1, 2, 3]);\n * // ➔ [1, 2, 3]\n * ```\n *\n * @example\n * ```ts\n * type User = { id: number };\n *\n * toArray<User>({ id: 1 });\n * // ➔ [{ id: 1 }]\n *\n * toArray<User>([{ id: 1 }, { id: 2 }]);\n * // ➔ [{ id: 1 }, { id: 2 }]\n * ```\n *\n * @remarks\n * This function does **not** flatten nested arrays.\n * If `value` is already an array, the original reference is preserved.\n *\n * @internal\n */\nexport const toArray = <T>(value: Arrayable<T>): T[] => {\n return isArray(value) ? value : [value];\n};\n","// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { Module } from \"node:module\";\nimport { isFunction, isObject } from \"@/_internal/utils/helper\";\n\n/** ----------------------------------------------------------------\n * * ***Typed mapping of commonly-used Node.js builtin module identifiers\n * (including `node:`-prefixed and legacy aliases).***\n * ----------------------------------------------------------------\n *\n * This is a **best-effort typing helper**, not a canonical or version-\n * exhaustive list of all Node.js builtins.\n *\n * - ***⚠️ Note:***\n * - This map provides **type-level hints only**.\n * - Presence in this map does **not guarantee runtime availability**.\n * - Availability of entries depends on the installed TypeScript version and `@types/node`.\n *\n * Consumers must ensure a Node.js runtime before calling `require`\n * with these identifiers.\n */\nexport type NodeBuiltinModuleMap = {\n // ======================\n // Filesystem\n // ======================\n \"node:fs\": typeof import(\"node:fs\");\n fs: typeof import(\"node:fs\");\n \"node:fs/promises\": typeof import(\"node:fs/promises\");\n \"fs/promises\": typeof import(\"node:fs/promises\");\n\n // ======================\n // Path / URL\n // ======================\n \"node:path\": typeof import(\"node:path\");\n path: typeof import(\"node:path\");\n \"node:url\": typeof import(\"node:url\");\n url: typeof import(\"node:url\");\n\n // ======================\n // OS / Process\n // ======================\n \"node:os\": typeof import(\"node:os\");\n os: typeof import(\"node:os\");\n \"node:process\": typeof import(\"node:process\");\n process: typeof import(\"node:process\");\n\n // ======================\n // Module system\n // ======================\n \"node:module\": typeof import(\"node:module\");\n module: typeof import(\"node:module\");\n\n // ======================\n // Buffer / Timers\n // ======================\n \"node:buffer\": typeof import(\"node:buffer\");\n buffer: typeof import(\"node:buffer\");\n \"node:timers\": typeof import(\"node:timers\");\n timers: typeof import(\"node:timers\");\n \"node:timers/promises\": typeof import(\"node:timers/promises\");\n \"timers/promises\": typeof import(\"node:timers/promises\");\n\n // ======================\n // Streams\n // ======================\n \"node:stream\": typeof import(\"node:stream\");\n stream: typeof import(\"node:stream\");\n \"node:stream/promises\": typeof import(\"node:stream/promises\");\n \"stream/promises\": typeof import(\"node:stream/promises\");\n \"node:stream/consumers\": typeof import(\"node:stream/consumers\");\n \"stream/consumers\": typeof import(\"node:stream/consumers\");\n \"node:stream/web\": typeof import(\"node:stream/web\");\n \"stream/web\": typeof import(\"node:stream/web\");\n\n // ======================\n // Crypto / Net / TLS\n // ======================\n \"node:crypto\": typeof import(\"node:crypto\");\n crypto: typeof import(\"node:crypto\");\n \"node:net\": typeof import(\"node:net\");\n net: typeof import(\"node:net\");\n \"node:tls\": typeof import(\"node:tls\");\n tls: typeof import(\"node:tls\");\n\n // ======================\n // HTTP\n // ======================\n \"node:http\": typeof import(\"node:http\");\n http: typeof import(\"node:http\");\n \"node:https\": typeof import(\"node:https\");\n https: typeof import(\"node:https\");\n \"node:http2\": typeof import(\"node:http2\");\n http2: typeof import(\"node:http2\");\n\n // ======================\n // Child / Worker\n // ======================\n \"node:child_process\": typeof import(\"node:child_process\");\n child_process: typeof import(\"node:child_process\");\n \"node:worker_threads\": typeof import(\"node:worker_threads\");\n worker_threads: typeof import(\"node:worker_threads\");\n\n // ======================\n // Events / Util / Assert\n // ======================\n \"node:events\": typeof import(\"node:events\");\n events: typeof import(\"node:events\");\n \"node:util\": typeof import(\"node:util\");\n util: typeof import(\"node:util\");\n \"node:assert\": typeof import(\"node:assert\");\n assert: typeof import(\"node:assert\");\n \"node:assert/strict\": typeof import(\"node:assert/strict\");\n \"assert/strict\": typeof import(\"node:assert/strict\");\n\n // ======================\n // Diagnostics / Debug\n // ======================\n \"node:diagnostics_channel\": typeof import(\"node:diagnostics_channel\");\n diagnostics_channel: typeof import(\"node:diagnostics_channel\");\n \"node:inspector\": typeof import(\"node:inspector\");\n inspector: typeof import(\"node:inspector\");\n\n // ======================\n // Encoding\n // ======================\n \"node:string_decoder\": typeof import(\"node:string_decoder\");\n string_decoder: typeof import(\"node:string_decoder\");\n\n // ======================\n // Readline / REPL\n // ======================\n \"node:readline\": typeof import(\"node:readline\");\n readline: typeof import(\"node:readline\");\n \"node:readline/promises\": typeof import(\"node:readline/promises\");\n \"readline/promises\": typeof import(\"node:readline/promises\");\n \"node:repl\": typeof import(\"node:repl\");\n repl: typeof import(\"node:repl\");\n\n // ======================\n // DNS\n // ======================\n \"node:dns\": typeof import(\"node:dns\");\n dns: typeof import(\"node:dns\");\n \"node:dns/promises\": typeof import(\"node:dns/promises\");\n \"dns/promises\": typeof import(\"node:dns/promises\");\n\n // ======================\n // Zlib\n // ======================\n \"node:zlib\": typeof import(\"node:zlib\");\n zlib: typeof import(\"node:zlib\");\n\n // ======================\n // VM / V8\n // ======================\n \"node:vm\": typeof import(\"node:vm\");\n vm: typeof import(\"node:vm\");\n \"node:v8\": typeof import(\"node:v8\");\n v8: typeof import(\"node:v8\");\n\n // ======================\n // Performance / Trace\n // ======================\n \"node:perf_hooks\": typeof import(\"node:perf_hooks\");\n perf_hooks: typeof import(\"node:perf_hooks\");\n \"node:trace_events\": typeof import(\"node:trace_events\");\n trace_events: typeof import(\"node:trace_events\");\n\n // ======================\n // Async / Legacy\n // ======================\n \"node:async_hooks\": typeof import(\"node:async_hooks\");\n async_hooks: typeof import(\"node:async_hooks\");\n \"node:domain\": typeof import(\"node:domain\");\n domain: typeof import(\"node:domain\");\n\n // ======================\n // Constants\n // ======================\n \"node:constants\": typeof import(\"node:constants\");\n constants: typeof import(\"node:constants\");\n};\n\n/** ----------------------------------------------------------------\n * * ***Callable `require`-like interface (runtime-safe).***\n * ----------------------------------------------------------------\n *\n * Represents a **minimal, honest abstraction** of Node.js `require`\n * that is safe to reference in mixed runtimes (CJS, ESM, bundlers,\n * and non-Node environments).\n *\n * - ***This type intentionally:***\n * - Requires only the callable signature `(id: string) => any`.\n * - Treats all standard `require` properties (`resolve`, `cache`,\n * `main`, etc.) as **optional**.\n *\n * This avoids lying to the type system while still allowing\n * property access when a real Node.js `require` is available.\n *\n */\ntype RequireCallable = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (id: string): any;\n} & Partial<NodeJS.Require>;\n\n/** ------------------------------------------------------------------------\n * * Global object shape exposing a `require` function.\n * -------------------------------------------------------------------------\n *\n * Describes environments where a global `require` function may exist.\n *\n * This is commonly used for **runtime detection**, such as checking\n * whether `require` is available before attempting to use it.\n *\n * @example\n * ```ts\n * const g = globalThis as typeof globalThis & GlobalWithRequire;\n *\n * if (typeof g.require === \"function\") {\n * const fs = g.require(\"fs\");\n * }\n * ```\n */\ntype GlobalWithRequire = { require: RequireCallable };\n\n/** ----------------------------------------------------------------\n * * ***Runtime type guard for a global `require` function.***\n * ----------------------------------------------------------------\n *\n * Determines whether a given value exposes a **callable `require`\n * property** at runtime.\n *\n * This guard does **not assume a Node.js environment** and does not\n * rely on environment heuristics such as `process`, `Node`, or\n * `process.versions.node`.\n *\n * - ***Instead, it performs a **pure runtime structural check**:***\n * - The value must be an object.\n * - It must expose a `require` property.\n * - That property must be callable.\n *\n * - ***This makes the guard safe to use in:***\n * - Node.js (CommonJS).\n * - Node.js (ESM / loader contexts).\n * - Bundler execution environments.\n * - Browsers (where it will correctly return `false`).\n *\n * Implemented as a **user-defined type guard** to enable proper\n * TypeScript narrowing, allowing safe access to `value.require`\n * without repeated casting.\n *\n * @param value - Any value to test for a global `require` function.\n * @returns `true` if the value exposes a callable `require` property.\n *\n */\nexport const hasGlobalRequire = (value: unknown): value is GlobalWithRequire =>\n isObject(value) && isFunction(value.require);\n\n/** ----------------------------------------------------------------\n * * ***Safely resolve the global `require` function.***\n * ----------------------------------------------------------------\n *\n * Attempts to retrieve the global CommonJS `require` function\n * if and only if it is **actually available at runtime**.\n *\n * Unlike naive Node checks (e.g. `process.versions.node`),\n * this function avoids false positives in environments such as:\n * - Node.js ESM loaders.\n * - Build-time execution environments.\n * - Bundler config evaluation.\n *\n * If `require` is not present, this function returns `undefined`\n * instead of throwing.\n *\n * ----------------------------------------------------------------\n * - ***⚠️ Note:***\n * - This helper intentionally does not attempt to detect\n * loader-injected or sandboxed `require` bindings.\n * ----------------------------------------------------------------\n *\n * @returns The global `require` function if available; otherwise `undefined`.\n */\nexport const getRuntimeRequire = (): RequireCallable | undefined => {\n if (!hasGlobalRequire(globalThis)) return undefined;\n return globalThis.require;\n};\n\n/** ----------------------------------------------------------------\n * * ***Deferred runtime `require` accessor.***\n * ----------------------------------------------------------------\n *\n * Provides a **lazy, runtime-resolved accessor** for a `require`\n * function without creating a static reference.\n *\n * - ***Intended for:***\n * - Runtime-agnostic tooling.\n * - Build / bundler utilities.\n * - CLI infrastructure.\n * - ***Behavior:***\n * - Delegates to a real `require` function *only if one exists at runtime*.\n * - Avoids top-level `require` references that bundlers may rewrite.\n * - Remains callable even when `require` is absent.\n *\n * When `Proxy` is available, property access (e.g. `require.resolve`)\n * is dynamically forwarded to the real `require` once it becomes\n * available.\n *\n * If invoked in an environment that does not expose `require`,\n * the call fails with a descriptive runtime error.\n *\n * ⚠️ Typed overloads do not guarantee that the requested module\n * exists or can be resolved at runtime.\n *\n * Runtime errors may still occur depending on the execution environment.\n *\n * ⚠️ This is **not** a polyfill and does **not** emulate Node.js\n * CommonJS resolution. It merely defers access to an existing\n * `require` function when present.\n *\n * ⚠️ When accessed before a real `require` is available,\n * properties such as `resolve`, `cache`, or `main`\n * may be `undefined`.\n */\nexport const __runtimeRequire: {\n <K extends keyof NodeBuiltinModuleMap>(id: K): NodeBuiltinModuleMap[K];\n (id: string): unknown;\n} = ((x: RequireCallable) => {\n const r = getRuntimeRequire();\n\n if (r) return r;\n\n if (typeof Proxy !== \"undefined\") {\n return new Proxy(x, {\n get(target, prop: keyof RequireCallable) {\n const r2 = getRuntimeRequire();\n return r2 ? r2[prop] : target[prop];\n }\n });\n }\n\n return x;\n})(function (this: unknown, id: string) {\n const r = getRuntimeRequire();\n if (r) return r.call(this, id);\n\n throw new Error(\n `Calling \\`require\\` for \"${id}\" in an environment that doesn't expose the \\`require\\` function.`\n );\n});\n\n/** ----------------------------------------------------------------\n * * ***Lazily resolves Node.js `createRequire`.***\n * ----------------------------------------------------------------\n *\n * Lazily resolves Node.js {@link Module.createRequire | **`createRequire`**}\n * **at runtime** using a strategy that is safe across mixed execution\n * environments (CJS, ESM, bundlers, and tooling contexts).\n *\n * - ***This helper intentionally avoids:***\n * - Static ESM imports that may execute during build time.\n * - Direct top-level `require` access that bundlers can rewrite or hoist.\n *\n * - ***Resolution strategy:***\n * - If a global CommonJS `require` is available at runtime, the\n * `node:module` builtin is loaded through the deferred.\n * {@link __runtimeRequire | **`__runtimeRequire`**} accessor.\n * - Otherwise, falls back to a dynamic `import(\"node:module\")`,\n * which is safe in ESM-only or bundled environments.\n *\n * This function does **not** assume a Node.js environment at evaluation\n * time, but **does require Node.js at runtime**. It will throw if the\n * `node:module` builtin cannot be resolved by either strategy.\n *\n * - ***Intended for:***\n * - Tooling that operates across mixed CJS / ESM runtimes.\n * - Bundler or compiler internals.\n * - CLI configuration and plugin loaders.\n *\n * @returns\n * A reference to Node.js {@link Module.createRequire | **`createRequire`**}.\n *\n * @throws\n * Throws if the `node:module` builtin cannot be resolved at runtime.\n *\n * @example\n * ***ESM / bundler-safe usage:***\n * ```ts\n * const createRequire = await getCreateRequire();\n *\n * const require = createRequire(import.meta.url);\n *\n * const fs = require(\"fs\");\n * const path = require(\"path\");\n *\n * console.log(fs.existsSync(path.resolve(\"package.json\")));\n * ```\n *\n * @example\n * ***Loading CommonJS or JSON config from ESM:***\n * ```ts\n * const createRequire = await getCreateRequire();\n *\n * const require = createRequire(process.cwd() + \"/\");\n *\n * const config = require(\"./my.config.cjs\");\n * const pkg = require(\"./package.json\");\n * ```\n *\n * @example\n * ***CommonJS (Node.js – compatibility usage):***\n *\n * In pure CommonJS environments this helper is usually unnecessary.\n * This example demonstrates interoperability with the same runtime-safe API.\n *\n * ```js\n * (async () => {\n * const { getCreateRequire } = await import(\"./getCreateRequire.js\");\n *\n * const createRequire = await getCreateRequire();\n * const requireFromHere = createRequire(__filename);\n *\n * const pkg = requireFromHere(\"some-cjs-only-package\");\n * console.log(pkg);\n * })();\n * ```\n *\n * @example\n * ***UMD / IIFE (Node execution):***\n * ```js\n * const createRequire = await getCreateRequire();\n *\n * const requireFromHere =\n * typeof __filename !== \"undefined\"\n * ? createRequire(__filename)\n * : createRequire(import.meta.url);\n *\n * const pkg = requireFromHere(\"some-cjs-only-package\");\n * ```\n */\nexport async function getCreateRequire(): Promise<\n typeof import(\"node:module\").createRequire\n> {\n const r = getRuntimeRequire();\n if (r) {\n return __runtimeRequire(\"node:module\").createRequire;\n }\n\n // ESM-safe fallback (unrun / tsdown / bundlers)\n const mod = await import(\"node:module\");\n return mod.createRequire;\n}\n","import type { Colors } from \"picocolors/types\";\nimport pcr from \"picocolors\";\n\nimport {\n isArray,\n isBoolean,\n isMap,\n isNil,\n isNonEmptyString,\n isNumber,\n isObject,\n isPlainObject,\n isRegExp,\n isSet,\n isString\n} from \"@/_internal/utils/helper\";\nimport { __runtimeRequire, hasGlobalRequire } from \"./node-require\";\n\ntype Picocolors = Colors & {\n createColors: (enabled?: boolean) => Colors;\n};\n\n/** ----------------------------------------------------------------\n * * ***Re-export of the `picocolors` default export.***\n * ----------------------------------------------------------------\n * This utility provides a lightweight and dependency-free\n * terminal color formatting helper, identical to the\n * original `picocolors` package export.\n *\n * - **It is re-exported to:**\n * - Provide a stable internal import path.\n * - Avoid direct dependency imports in consumers.\n * - Ensure consistent color handling across the codebase.\n *\n * @see {@link https://github.com/alexeyraspopov/picocolors | **`picocolors repository`**.}\n */\nexport const picocolors: Picocolors = pcr;\n\n/** ----------------------------------------------------------------\n * * ***Normalized newline character.***\n * ----------------------------------------------------------------\n *\n * Represents a single line feed character (`\\n`), used as a\n * **consistent newline** across all platforms.\n *\n * This value is intentionally **not platform-specific** and does\n * not vary between operating systems (e.g. Windows CRLF vs POSIX LF).\n * It is suitable for generated files, formatters, and build tools\n * where deterministic output is required.\n *\n * The value is base64-encoded to avoid embedding a literal newline\n * in the bundled output during minification.\n *\n * @type {string}\n */\nexport const NEWLINE: string = atob(\"Cg==\");\n\n/** ----------------------------------------------------------------\n * * ***Platform-specific end-of-line character.***\n * ----------------------------------------------------------------\n *\n * Resolves to the operating system's default end-of-line sequence:\n * - `\\n` on POSIX systems (Linux, macOS)\n * - `\\r\\n` on Windows\n *\n * Used to ensure generated multiline strings are compatible\n * with the host environment.\n *\n * In non-Node environments, this value falls back to `\\n`.\n * The fallback is encoded to avoid embedding a literal newline\n * in the bundled output during minification.\n *\n * @type {string}\n */\nexport const EOL: string = hasGlobalRequire(globalThis)\n ? __runtimeRequire(\"node:os\").EOL\n : NEWLINE;\n\n/** -------------------------------------------------------\n * * ***Utility Function: `plural`.***\n * -------------------------------------------------------\n * **Returns the correct singular or plural form of a word\n * based on a numeric count.**\n *\n * This helper is commonly used when generating human-readable\n * CLI messages where a word must change depending on quantity.\n *\n * By default, the function pluralizes a word by appending `\"s\"`\n * when the `count` is not equal to `1`.\n *\n * For irregular plural forms, a custom `pluralWord` may be\n * provided explicitly.\n *\n * ⚠️ This utility performs **simple English pluralization only**.\n * It does **not** automatically handle irregular plural forms\n * such as `person ➔ people` or `child ➔ children` unless the\n * plural form is provided manually.\n *\n * - **Behavior:**\n * - If `count === 1` ➔ returns the singular `word`.\n * - Otherwise ➔ returns `pluralWord` if provided,\n * or `${word}s` by default.\n *\n * @param count - The numeric count used to determine pluralization.\n * @param word - The singular form of the word.\n * @param pluralWord - Optional explicit plural form.\n *\n * @returns The appropriate singular or plural word form.\n *\n * @example\n * ```ts\n * plural(1, \"file\");\n * // ➔ \"file\"\n *\n * plural(3, \"file\");\n * // ➔ \"files\"\n * ```\n *\n * @example\n * ```ts\n * plural(1, \"person\", \"people\");\n * // ➔ \"person\"\n *\n * plural(5, \"person\", \"people\");\n * // ➔ \"people\"\n * ```\n *\n * @example\n * ```ts\n * const count = 2;\n * console.log(`${count} ${plural(count, \"file\")} copied`);\n * // ➔ \"2 files copied\"\n * ```\n */\nexport function plural(\n count: number,\n word: string,\n pluralWord?: string\n): string {\n if (count === 1) return word;\n return pluralWord ?? `${word}s`;\n}\n\n/** ----------------------------------------------------------------\n * * ***Conditionally pads a value with leading and/or trailing spaces.***\n * ----------------------------------------------------------------\n *\n * Formats a value by optionally prepending and/or appending a single\n * space character (`\" \"`), depending on the provided options.\n *\n * Only **valid non-empty strings** are padded.\n * A value is considered **invalid** when it is:\n * - not a string.\n * - an empty string (`\"\"`).\n * - a string containing only whitespace.\n *\n * When the value is invalid, this utility can optionally return\n * a single space instead of an empty string.\n *\n * @param {unknown} value - The value to be padded.\n * @param {{ start?: boolean; end?: boolean; padOnInvalid?: boolean; }} options - Padding behavior configuration.\n * @param options.start - Prepend a single space before the value.\n * @param options.end - Append a single space after the value.\n * @param options.padOnInvalid - Return a single space when the value\n * is not a valid non-empty string.\n *\n * @returns A formatted string with optional leading and/or trailing\n * spaces, or a single space / empty string when the input is invalid.\n *\n * @example\n * ```ts\n * padText(\"hello\");\n * // ➔ \" hello \"\n * ```\n *\n * @example\n * ```ts\n * padText(\"hello\", { start: true, end: false });\n * // ➔ \" hello\"\n * ```\n *\n * @example\n * ```ts\n * padText(\"\", { padOnInvalid: true });\n * // ➔ \" \"\n * ```\n *\n * @example\n * ```ts\n * padText(null, { padOnInvalid: false });\n * // ➔ \"\"\n * ```\n */\nexport function padText(\n value: unknown,\n options: {\n /**\n * Whether to prepend a single space to the output.\n *\n * @default true\n */\n start?: boolean;\n\n /**\n * Whether to append a single space to the output.\n *\n * @default true\n */\n end?: boolean;\n\n /**\n * Return a single space when the input is not a valid non-empty string.\n *\n * This applies to non-string values, empty strings,\n * or strings containing only whitespace.\n *\n * @default true\n */\n padOnInvalid?: boolean;\n } = {}\n): string {\n const { start = true, end = true, padOnInvalid = true } = options;\n if (!isNonEmptyString(value)) return padOnInvalid ? \" \" : \"\";\n return `${start ? \" \" : \"\"}${value}${end ? \" \" : \"\"}`;\n}\n\n/** ----------------------------------------------------------------\n * * ***Joins text segments into a compact space-separated string.***\n * ----------------------------------------------------------------\n *\n * Joins multiple values into a single string separated by a\n * **single space character** (`\" \"`).\n *\n * This utility removes all non-renderable values before joining,\n * producing a compact inline string without unintended spacing.\n *\n * - *Filtering behavior:*\n * - `false`, `null`, and `undefined` are removed.\n * - Empty strings (`\"\"`) are also removed.\n *\n * This makes the output suitable for inline text composition\n * where line breaks and extra spacing are not desired.\n *\n * - *Useful for:*\n * - Inline CLI messages.\n * - Error summaries.\n * - Concatenating optional labels or fragments.\n * - Single-line log output.\n *\n * @param {Array<string | false | null | undefined>} text - A list of\n * strings or falsy values to be joined. Empty strings are excluded\n * to prevent extra spaces in the output.\n *\n * @returns {string} A single string with values joined by a\n * single space character.\n *\n * @example\n * ```ts\n * joinInline(\"Hello\", false, \"\", \"world\");\n * // ➔ \"Hello world\"\n * ```\n *\n * @example\n * ```ts\n * joinInline(\n * \"Error:\",\n * undefined,\n * \"Invalid\",\n * null,\n * \"input\"\n * );\n * // ➔ \"Error: Invalid input\"\n * ```\n */\nexport function joinInline(\n ...text: Array<string | false | null | undefined>\n): string {\n return text.filter(Boolean).join(\" \");\n}\n\n/** ----------------------------------------------------------------\n * * ***Joins text lines into a compact newline-separated string.***\n * ----------------------------------------------------------------\n *\n * Joins multiple values into a single string separated by the\n * platform-specific end-of-line character ({@link EOL | **`EOL`**}).\n *\n * This utility removes all non-renderable values before joining,\n * ensuring a compact output with no unintended blank lines.\n *\n * - *Filtering behavior:*\n * - `false`, `null`, and `undefined` are removed.\n * - Empty strings (`\"\"`) are also removed.\n *\n * This makes the output dense and suitable for cases where\n * vertical spacing should not be preserved.\n *\n * - *Useful for:*\n * - CLI error messages.\n * - Compact help or status output.\n * - Multi-line logs without spacing gaps.\n *\n * @param {Array<string | false | null | undefined>} text - A list of\n * strings or falsy values to be joined. Empty strings are excluded\n * to prevent blank lines in the output.\n *\n * @returns {string} A single string joined using the OS-specific\n * end-of-line character.\n *\n * @example\n * ```ts\n * joinLines(\"Line 1\", false, \"\", \"Line 2\");\n * // ➔ \"Line 1\\nLine 2\"\n * ```\n *\n * @example\n * ```ts\n * joinLines(\n * \"Header\",\n * undefined,\n * \"\",\n * \"Body\",\n * null,\n * \"Footer\"\n * );\n * // ➔ \"Header\\nBody\\nFooter\"\n * ```\n */\nexport function joinLines(\n ...text: Array<string | false | null | undefined>\n): string {\n return text.filter(Boolean).join(EOL);\n}\n\n/** ----------------------------------------------------------------\n * * ***Joins text lines while preserving explicit empty lines.***\n * ----------------------------------------------------------------\n *\n * Joins multiple values into a single string separated by the\n * platform-specific end-of-line character ({@link EOL | **`EOL`**}).\n *\n * Unlike {@link joinLines | **`joinLines`**}, this variant **preserves empty strings**\n * (`\"\"`) to intentionally create blank lines in the output.\n *\n * - *Filtering behavior:*\n * - `false`, `null`, and `undefined` are removed.\n * - Empty strings (`\"\"`) are kept as-is.\n *\n * This allows precise control over vertical spacing when composing\n * formatted text.\n *\n * - *Useful for:*\n * - CLI help output with paragraph separation.\n * - Multi-section descriptions.\n * - Human-readable documentation formatting.\n *\n * @param {Array<string | false | null | undefined>} text - A list of\n * strings or falsy values to be joined. Empty strings are preserved\n * to produce blank lines in the output.\n *\n * @returns {string} A single string joined using the OS-specific\n * end-of-line character.\n *\n * @example\n * ```ts\n * joinLinesLoose(\n * \"Line one\",\n * \"Line two\",\n * \"\",\n * \"New paragraph\"\n * );\n * // ➔ \"Line one\\nLine two\\n\\nNew paragraph\"\n * ```\n *\n * @example\n * ```ts\n * joinLinesLoose(\n * \"Header\",\n * null,\n * \"\",\n * \"Body\",\n * false,\n * null,\n * undefined\n * );\n * // ➔ \"Header\\n\\nBody\"\n * ```\n */\nexport function joinLinesLoose(\n ...text: Array<string | false | null | undefined>\n): string {\n return text\n .filter((v): v is string => v !== false && v !== null && v !== undefined)\n .join(EOL);\n}\n\ntype FormatOptionValueOptions = {\n /**\n * @default false\n */\n pretty?: boolean;\n /**\n * @default 2\n */\n indent?: number;\n /**\n * @default false\n */\n sortKeys?: boolean;\n /**\n * @default false\n */\n sortArray?: boolean;\n};\n\n/** ----------------------------------------------------------------\n * * Formats a value into a compact, colorized CLI representation.\n * ----------------------------------------------------------------\n *\n * Recursively converts an arbitrary value into a human-readable,\n * ANSI-colored string intended strictly for terminal output.\n *\n * This formatter is designed for developer-facing CLI diagnostics\n * and must NOT be used for logging, serialization, persistence,\n * or programmatic comparison.\n *\n * - *Behavior:*\n * - Arrays are rendered inline: `[a, b, c]`.\n * - `Set` values are converted to arrays before rendering.\n * - `Map` values are converted to plain objects via `Object.fromEntries`.\n * - Plain objects are rendered inline: `{ key: value }`.\n * - `RegExp` values are colorized by delimiter, source, and flags.\n * - Strings are wrapped in double quotes.\n * - Numbers (including `NaN`) and booleans are highlighted.\n * - `null` and `undefined` are red-bright color.\n * - Other objects fall back to `Object.prototype.toString`.\n *\n * - *Characteristics:*\n * - Recursive.\n * - Compact (single-line).\n * - No pretty-print indentation.\n * - No key or array sorting.\n * - No JSON serialization.\n * - No circular reference handling.\n *\n * @param value - The value to format for CLI display.\n *\n * @returns A colorized string optimized for terminal readability.\n *\n * @example\n * formatOptionValue([\"a\", \"b\"]);\n * // ➔ [ \"a\", \"b\" ]\n *\n * @example\n * formatOptionValue({ foo: 1, bar: true });\n * // ➔ { foo: 1, bar: true }\n *\n * @example\n * formatOptionValue(new Set([\"dist/**\"]));\n * // ➔ [ \"dist/**\" ]\n *\n * @example\n * formatOptionValue(/abc/i);\n * // ➔ /abc/i (colorized segments)\n */\nexport function formatOptionValue(\n value: unknown,\n options?: FormatOptionValueOptions\n): string {\n const {\n pretty = false,\n indent = 2,\n sortKeys = false,\n sortArray = false\n } = options ?? {};\n\n const indentUnit = \" \".repeat(indent);\n\n function formatRecursive(input: unknown, depth = 0): string {\n const currentIndent = indentUnit.repeat(depth);\n const nextIndent = indentUnit.repeat(depth + 1);\n const joinInline = picocolors.dim(\", \");\n const joinPretty = `,${EOL}`;\n\n /* ------------------------------------------------------------ */\n /* Set ➔ Array */\n /* ------------------------------------------------------------ */\n if (isSet(input)) {\n return formatRecursive([...input], depth);\n }\n\n /* ------------------------------------------------------------ */\n /* Map ➔ Plain Object */\n /* ------------------------------------------------------------ */\n if (isMap(input)) {\n return formatRecursive(Object.fromEntries(input), depth);\n }\n\n /* ------------------------------------------------------------ */\n /* Array */\n /* ------------------------------------------------------------ */\n if (isArray(input)) {\n const arr = sortArray ? [...input].sort() : input;\n\n if (arr.length === 0) return picocolors.gray(\"[]\");\n\n if (!pretty) {\n const items = arr\n .map((v) => formatRecursive(v, depth))\n .join(joinInline);\n return picocolors.gray(\"[\") + items + picocolors.gray(\"]\");\n }\n\n const items = arr\n .map((v) => nextIndent + formatRecursive(v, depth + 1))\n .join(joinPretty);\n\n return (\n picocolors.gray(`[${EOL}`) +\n items +\n EOL +\n currentIndent +\n picocolors.gray(\"]\")\n );\n }\n\n /* ------------------------------------------------------------ */\n /* Plain Object */\n /* ------------------------------------------------------------ */\n if (isPlainObject(input)) {\n let entries = Object.entries(input);\n\n if (sortKeys) {\n entries = entries.sort(([a], [b]) => a.localeCompare(b));\n }\n\n if (entries.length === 0) return picocolors.gray(\"{}\");\n\n if (!pretty) {\n const props = entries\n .map(([key, val]) => {\n return (\n picocolors.dim(key) +\n picocolors.gray(\": \") +\n formatRecursive(val, depth)\n );\n })\n .join(joinInline);\n\n return picocolors.gray(\"{ \") + props + picocolors.gray(\" }\");\n }\n\n const props = entries\n .map(([key, val]) => {\n return (\n nextIndent +\n picocolors.dim(key) +\n picocolors.gray(\": \") +\n formatRecursive(val, depth + 1)\n );\n })\n .join(joinPretty);\n\n return (\n picocolors.gray(`{${EOL}`) +\n props +\n EOL +\n currentIndent +\n picocolors.gray(\"}\")\n );\n }\n\n /* ------------------------------------------------------------ */\n /* RegExp */\n /* ------------------------------------------------------------ */\n if (isRegExp(input)) {\n return (\n picocolors.greenBright(\"/\") +\n picocolors.redBright(input.source) +\n picocolors.greenBright(\"/\") +\n picocolors.magentaBright(input.flags)\n );\n }\n\n /* ------------------------------------------------------------ */\n /* Primitive */\n /* ------------------------------------------------------------ */\n if (isString(input)) {\n return picocolors.gray(`\"${input}\"`);\n }\n\n if (isNumber(input, { includeNaN: true })) {\n return picocolors.redBright(String(input));\n }\n\n if (isBoolean(input)) {\n return picocolors.redBright(String(input));\n }\n\n if (isNil(input)) {\n return picocolors.redBright(String(input));\n }\n\n if (isObject(input)) {\n return picocolors.cyanBright(Object.prototype.toString.call(input));\n }\n\n return picocolors.cyanBright(String(input));\n }\n\n return formatRecursive(value);\n}\n"],"mappings":";;;;;;;;;;;;;;AAeA,SAAgB,WAAc,OAA2B;CACvD,IAAI,OAAO,UAAU,YAAY,UAAU,MACzC,OAAO;CAGT,MAAM,uBAAO,IAAI,SAAiB;CAClC,MAAM,QAAkB,CAAC,MAAgB;CAEzC,OAAO,MAAM,QAAQ;EACnB,MAAM,MAAM,MAAM,KAAK;EAEvB,IAAI,KAAK,IAAI,IAAI,IAAI,OAAO,SAAS,IAAI,EAAE;EAE3C,KAAK,IAAI,IAAI;EAGb,IAAI,MAAM,IAAI,EACZ,KAAK,MAAM,CAAC,GAAG,MAAM,KAAK;GACxB,IAAI,OAAO,MAAM,YAAY,MAAM,MAAM,MAAM,KAAK,EAAE;GACtD,IAAI,OAAO,MAAM,YAAY,MAAM,M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B,IAAI,SAAS,MAAM,EACjB,OACE,WAAW,YAAY,IAAI,GAC3B,WAAW,UAAU,MAAM,OAAO,GAClC,WAAW,YAAY,IAAI,GAC3B,WAAW,cAAc,MAAM,MAAM;EAOzC,IAAI,SAAS,MAAM,EACjB,OAAO,WAAW,KAAK,IAAI,MAAM,GAAG;EAGtC,IAAI,SAAS,OAAO,EAAE,YAAY,MAAM,CAAC,EACvC,OAAO,WAAW,UAAU,OAAO,MAAM,CAAC;EAG5C,IAAI,UAAU,MAAM,EAClB,OAAO,WAAW,UAAU,OAAO,MAAM,CAAC;EAG5C,IAAI,MAAM,MAAM,EACd,OAAO,WAAW,UAAU,OAAO,MAAM,CAAC;EAG5C,IAAI,SAAS,MAAM,EACjB,OAAO,WAAW,WAAW,OAAO,UAAU,SAAS,KAAK,MAAM,CAAC;EAGrE,OAAO,WAAW,WAAW,OAAO,MAAM,CAAC;;CAG7C,OAAO,gBAAgB,MAAM"}
|
|
1
|
+
{"version":3,"file":"formatter-BFgV1HhV.js","names":[],"sources":["../src/_internal/utils/helper.ts","../src/utils/helper/node-require.ts","../src/utils/helper/formatter.ts"],"sourcesContent":["import type {\n AnObjectNonArray,\n AnyFunction,\n Arrayable,\n Extends,\n IsArray,\n IsNever,\n NonPlainObject,\n OrArr,\n ReadonlyDeep\n} from \"@/_internal/types/extra\";\n\n// ----------------------------------------------------------------\n\n/** @internal */\nexport function deepFreeze<T>(value: T): ReadonlyDeep<T> {\n if (typeof value !== \"object\" || value === null) {\n return value as ReadonlyDeep<T>;\n }\n\n const seen = new WeakSet<object>();\n const stack: object[] = [value as object];\n\n while (stack.length) {\n const obj = stack.pop()!;\n\n if (seen.has(obj) || Object.isFrozen(obj)) continue;\n\n seen.add(obj);\n\n // Map\n if (isMap(obj)) {\n for (const [k, v] of obj) {\n if (typeof k === \"object\" && k !== null) stack.push(k);\n if (typeof v === \"object\" && v !== null) stack.push(v);\n }\n }\n\n // Set\n else if (isSet(obj)) {\n for (const v of obj) {\n if (typeof v === \"object\" && v !== null) stack.push(v);\n }\n }\n\n // Fast path Array\n else if (isArray(obj)) {\n for (const v of obj) {\n if (typeof v === \"object\" && v !== null) stack.push(v);\n }\n } else {\n const record = obj as Record<PropertyKey, unknown>;\n\n for (const key of Reflect.ownKeys(record)) {\n const v = record[key];\n if (typeof v === \"object\" && v !== null) stack.push(v);\n }\n\n // const descriptors = Object.getOwnPropertyDescriptors(obj);\n\n // for (const key of Reflect.ownKeys(descriptors)) {\n // const desc = descriptors[key as keyof typeof descriptors];\n // if (!desc) continue;\n\n // if (\"value\" in desc) {\n // const v = desc.value;\n // if (typeof v === \"object\" && v !== null) stack.push(v);\n // }\n // }\n }\n\n Object.freeze(obj);\n }\n\n return value as ReadonlyDeep<T>;\n}\n// ----------------------------------------------------------------\n\n/** @internal */\nexport function isObjectLoose<T>(\n value: T\n): value is Extract<T, object | AnyFunction> {\n return !isNil(value) && (isObjectOrArray(value) || isFunction(value));\n}\n\nexport function isObjectLike<T>(value: T): value is Extract<T, object> {\n return !isFunction(value) && isObjectLoose(value);\n}\n// ----------------------------------------------------------------\n\n/** ----------------------------------------------------------------\n * * ***Check whether a value is thenable (Promise-like).***\n * ----------------------------------------------------------------\n *\n * Determines whether a value implements a `.then()` method and can be\n * treated as a **thenable** object.\n *\n * This includes:\n * - Native `Promise`.\n * - Promise-like objects returned by libraries.\n * - Custom objects implementing `.then()`.\n *\n * ----------------------------------------------------------------\n *\n * @typeParam T\n * The resolved value type of the thenable.\n *\n * @param v\n * The value to check.\n *\n * @returns\n * `true` if the value is thenable, otherwise `false`.\n *\n * When `true`, the value is narrowed to `PromiseLike<T>`.\n *\n * ----------------------------------------------------------------\n *\n * @example\n * ```ts\n * isThenable(Promise.resolve(1));\n * // ➔ true\n *\n * isThenable({ then: () => {} });\n * // ➔ true\n *\n * isThenable(123);\n * // ➔ false\n * ```\n *\n * @example\n * ```ts\n * async function unwrap<T>(value: T | Promise<T>) {\n * if (isThenable<T>(value)) {\n * return await value;\n * }\n *\n * return value;\n * }\n * ```\n *\n * @remarks\n * Thenables are typically resolved before function execution to support async config factories without enforcing `Promise` instances.\n * - This function checks **behavior**, not identity.\n * - The value does **not** have to be an instance of `Promise`.\n * - Useful for async utilities, lazy evaluation, and hybrid sync/async APIs.\n *\n * @internal\n */\nexport const isThenable = <T = unknown>(v: unknown): v is PromiseLike<T> =>\n v != null &&\n (typeof v === \"object\" || typeof v === \"function\") &&\n typeof (v as PromiseLike<T>).then === \"function\";\n\n// ----------------------------------------------------------------\n\n/** @internal */\nexport const isRegExp = (value: unknown): value is RegExp => {\n return value instanceof RegExp;\n};\n\n// ----------------------------------------------------------------\n\n/** @internal */\nexport const isString = (value: unknown): value is string => {\n return typeof value === \"string\";\n};\n\n// ----------------------------------------------------------------\n\n/** @internal */\nexport function isSet<T = unknown>(value: Set<T>): value is Set<T>;\nexport function isSet(value: unknown): value is Set<unknown>;\nexport function isSet(value: unknown): boolean {\n return (\n Object.prototype.toString.call(value) === \"[object Set]\" ||\n value instanceof Set\n );\n}\n\n// ----------------------------------------------------------------\n\n/** @internal */\nexport function isMap<K = unknown, V = unknown>(\n value: Map<K, V>\n): value is Map<K, V>;\nexport function isMap(value: unknown): value is Map<unknown, unknown>;\nexport function isMap(value: unknown): boolean {\n return (\n Object.prototype.toString.call(value) === \"[object Map]\" ||\n value instanceof Map\n );\n}\n\n// ----------------------------------------------------------------\n\n/** @internal */\ntype ArrayFallback<T> =\n IsNever<Extract<T, unknown[] | readonly unknown[]>> extends true\n ? unknown[] & T\n : Extract<T, unknown[] | readonly unknown[]>;\n\n/** @internal */\nexport function isArray<T>(value: T): value is ArrayFallback<T>;\n// export function isArray<T>(value: T): value is IsNever<Extract<T, unknown[]>> extends true ? unknown[]: Extract<T, unknown[]>;\nexport function isArray(value: unknown): value is unknown[];\nexport function isArray(value: unknown): boolean {\n return Array.isArray(value);\n}\n\n// ----------------------------------------------------------------\n\n/** @internal */\nexport const isNull = (val: unknown): val is null => val === null;\n\n// ----------------------------------------------------------------\n\n/** @internal */\ntype IsPlainObjectResult<T> = unknown extends T\n ? Record<PropertyKey, unknown> & T\n : T extends object\n ? T extends NonPlainObject\n ? never\n : IsHasKeysObject<T> extends false\n ? Record<PropertyKey, unknown> & T\n : T\n : Extract<T, Record<PropertyKey, unknown>>;\n\n/** @internal */\nexport function isPlainObject<T>(value: T): value is IsPlainObjectResult<T>;\nexport function isPlainObject<T>(\n value: T\n): value is NonNullable<Extract<T, Record<PropertyKey, unknown>>>;\nexport function isPlainObject(value: unknown) {\n if (!isObject(value)) return false;\n\n const proto = Object.getPrototypeOf(value);\n return proto === Object.prototype || proto === null;\n}\n\n// ----------------------------------------------------------------\n\n/** @internal */\ntype IsObject<T> = unknown extends T\n ? T & Record<PropertyKey, unknown>\n : T extends object\n ? T extends AnObjectNonArray\n ? T\n : IsHasKeysObject<T> extends false\n ? T & Record<PropertyKey, unknown>\n : IsArray<T> extends true\n ? Exclude<T, unknown[]>\n : T\n : never;\n\n/** @internal */\nexport function isObject<T extends object>(value: T): value is IsObject<T>;\nexport function isObject(value: unknown): value is Record<PropertyKey, unknown>;\nexport function isObject(value: unknown): boolean {\n return typeof value === \"object\" && !isNil(value) && !isArray(value);\n}\n\n// ----------------------------------------------------------------\n\n/** @internal */\ntype IsHasKeysObject<T> = keyof T extends never ? false : true;\n\n// ----------------------------------------------------------------\n\n/** @internal */\ntype IsObjectOrArray<T> =\n OrArr<\n [IsNever<T>, Extends<T, Record<PropertyKey, unknown>>, Extends<unknown, T>]\n > extends true\n ? T & Record<PropertyKey, unknown> & unknown[]\n : T extends object\n ? T extends unknown[]\n ? T\n : T extends AnObjectNonArray\n ? T\n : IsHasKeysObject<T> extends false\n ? T & Record<PropertyKey, unknown>\n : T\n : Extract<T, Record<PropertyKey, unknown> & unknown[]>;\n\n/** @internal */\nexport function isObjectOrArray(value: []): value is [];\nexport function isObjectOrArray<T>(value: T): value is IsObjectOrArray<T>;\nexport function isObjectOrArray<T>(value: T): boolean {\n return isArray(value) || isObject(value);\n}\n\n// ----------------------------------------------------------------\n\n/** @internal */\nexport const isNil = (value: unknown): value is null | undefined => {\n return value == null;\n};\n\n// ----------------------------------------------------------------\n\n/** @internal */\nexport const isBoolean = (value: unknown): value is boolean => {\n return typeof value === \"boolean\";\n};\n\n// ----------------------------------------------------------------\n\n/** @internal */\nexport const isUndefined = (value: unknown): value is undefined => {\n return typeof value === \"undefined\";\n};\n\n// ----------------------------------------------------------------\n\n/** @internal */\nexport const isFunction = (value: unknown): value is AnyFunction => {\n return typeof value === \"function\";\n};\n\n// ----------------------------------------------------------------\n\n/** @internal */\n// eslint-disable-next-line @typescript-eslint/no-wrapper-object-types\nexport const isNumberObject = (value: unknown): value is Number => {\n return (\n isObject(value) &&\n Object.prototype.toString.call(value) === \"[object Number]\"\n );\n};\n\n// ----------------------------------------------------------------\n\n/** @internal */\n// eslint-disable-next-line @typescript-eslint/no-wrapper-object-types\nexport const isStringObject = (value: unknown): value is String => {\n return (\n isObject(value) &&\n Object.prototype.toString.call(value) === \"[object String]\"\n );\n};\n\n// ----------------------------------------------------------------\n\n/** @internal */\n// eslint-disable-next-line @typescript-eslint/no-wrapper-object-types\nexport const isBooleanObject = (value: unknown): value is Boolean => {\n return (\n isObject(value) &&\n Object.prototype.toString.call(value) === \"[object Boolean]\"\n );\n};\n\n// ----------------------------------------------------------------\n\n/** @internal */\nexport const isInfinityNumber = (value: unknown): boolean => {\n if (typeof value === \"number\" || isNumberObject(value)) {\n const num = Number(value);\n return num === Infinity || num === -Infinity;\n }\n return false;\n};\n\n// ----------------------------------------------------------------\n\n/** @internal */\nexport const isSymbol = (value: unknown): value is symbol => {\n return typeof value === \"symbol\";\n};\n\n// ----------------------------------------------------------------\n\n/** @internal */\nexport const isBigInt = (value: unknown): value is bigint => {\n return typeof value === \"bigint\";\n};\n\n// ----------------------------------------------------------------\n\n/** @internal */\nexport const isNaN = (value: unknown): boolean => {\n return typeof value === \"number\"\n ? Number.isNaN(value)\n : isNumberObject(value) && Number.isNaN(value.valueOf());\n};\n\n// ----------------------------------------------------------------\n\n/** @internal */\ntype IsNonEmptyStringOptions = {\n /** Whether to trim the string before checking, defaultValue: `true`.\n *\n * @default true */\n trim?: boolean;\n};\n\n/** @internal */\nexport const isNonEmptyString = (\n value: unknown,\n options: IsNonEmptyStringOptions = {}\n): value is string => {\n if (!isString(value)) return false;\n\n const trim = options.trim ?? true;\n\n const str = trim ? value.trim() : value;\n\n return str.length > 0;\n};\n\n// ----------------------------------------------------------------\n\n/** @internal */\ntype IsNumberOptions = {\n /** If set to `true`, `NaN` will be considered a valid number, defaultValue: `false`.\n *\n * @default false\n */\n includeNaN?: boolean;\n};\n\n/** @internal */\nexport const isNumber = (\n value: unknown,\n options: IsNumberOptions = {}\n): value is number => {\n const includeNaN =\n isPlainObject(options) && isBoolean(options.includeNaN)\n ? options.includeNaN\n : false;\n\n const aNumber = typeof value === \"number\";\n return includeNaN ? aNumber : aNumber && !Number.isNaN(value);\n};\n\n// ----------------------------------------------------------------\n\n/** @internal */\nexport const isError = (error: unknown): error is Error => {\n return (\n Object.prototype.toString.call(error) === \"[object Error]\" ||\n error instanceof Error\n );\n};\n// ----------------------------------------------------------------\n\n/** @internal */\ntype isDateOptions = {\n /** * ***Skip the validity check (`!isNaN(date.getTime())`).***\n *\n * When `true`, the function only checks that the value is an\n * instance of `Date` without verifying that it represents a valid\n * date value, default: `false`.\n *\n * @default false\n */\n skipInvalidDate?: boolean;\n};\n\n/** @internal */\nexport const isDate = (\n value: unknown,\n options: isDateOptions = {}\n): value is Date => {\n const skipInvalidDate =\n isPlainObject(options) && isBoolean(options.skipInvalidDate)\n ? options.skipInvalidDate\n : false;\n\n const instanceDate = value instanceof Date;\n\n if (skipInvalidDate) return instanceDate;\n return instanceDate && !isNaN(value.getTime());\n};\n\n// ----------------------------------------------------------------\n\n/** @internal */\nexport type SafeStableStringifyOptions = {\n /** -------------------------------------------------\n * * ***Whether to sort **object keys** alphabetically (recursively).***\n * -------------------------------------------------\n *\n * - `true` (default): object keys are sorted to ensure stable output.\n * - `false`: preserves original insertion order of keys.\n *\n * @default true\n */\n sortKeys?: boolean;\n /** -------------------------------------------------\n * * ***Whether to sort **primitive values inside arrays**.***\n * -------------------------------------------------\n *\n * - `true`: primitive values in arrays are sorted to ensure stable output.\n * - `false` (default): arrays retain their original order; objects and nested arrays are not reordered.\n *\n * @default false\n */\n sortArray?: boolean;\n /** -------------------------------------------------\n * * ***Whether to pretty-print JSON output with 2-space indentation.***\n * -------------------------------------------------\n *\n * - `true`: output is formatted with indentation and newlines.\n * - `false` (default): produces compact single-line JSON.\n *\n * @default false\n */\n pretty?: boolean;\n /** -------------------------------------------------\n * * ***Preserve `undefined` values instead of converting them to `null`.***\n * -------------------------------------------------\n * **Controls how the internal `deepProcess` step rewrites values\n * **before** the final `JSON.stringify` call.**\n * - **Default (`false`):**\n * * Every `undefined` value (object properties **and** array elements)\n * is replaced with `null` **before** serialization, because this happens\n * first, the key is **not removed** by `JSON.stringify`.\n * - **`true`** – Leaves `undefined` untouched so the final\n * `JSON.stringify` call behaves natively:\n * * Object properties with `undefined` are **removed**.\n * * Array elements that are `undefined` become `null`.\n * @default false\n * @example\n * // ✅ keepUndefined = true: behaves like native JSON.stringify\n * safeStableStringify({ a: undefined }, { keepUndefined: true });\n * // ➔ '{}' // key removed\n *\n * // ✅ Default (false): convert undefined to null, key kept\n * safeStableStringify({ a: undefined });\n * // ➔ '{\"a\":null}' // key present, value null\n *\n * // Arrays\n * safeStableStringify([undefined]);\n * // ➔ '[null]' // same, but via pre-replacement\n * safeStableStringify([undefined], { keepUndefined: true });\n * // ➔ '[null]' // element becomes null\n */\n keepUndefined?: boolean;\n};\n\n/** @internal */\nexport const safeStableStringify = (\n value: unknown,\n options: SafeStableStringifyOptions = {}\n): string => {\n const pretty = options.pretty ?? false;\n const sortKeys = options.sortKeys ?? true;\n const sortArray = options.sortArray ?? false;\n const keepUndefined = options.keepUndefined ?? false;\n\n if (isUndefined(value)) {\n return keepUndefined ? \"undefined\" : \"null\";\n }\n\n const seen = new WeakSet();\n\n const isPrimitive = (val: unknown): boolean =>\n isNull(val) || (!isObjectOrArray(val) && !isFunction(val));\n\n const deepProcess = (val: unknown): unknown => {\n if (isNumberObject(val)) {\n const valOf = val.valueOf();\n return isNaN(valOf) || isInfinityNumber(valOf) ? null : valOf;\n }\n if (isStringObject(val)) return val.valueOf();\n if (isBooleanObject(val)) return val.valueOf();\n if (isFunction(val) || isSymbol(val)) return undefined;\n if (isBigInt(val)) return val.toString();\n if (isNaN(val) || isInfinityNumber(val)) return null;\n if (isUndefined(val)) {\n return keepUndefined ? undefined : null;\n }\n\n if (isObjectOrArray(val)) {\n if (seen.has(val)) return \"[Circular]\";\n seen.add(val);\n\n if (isDate(val)) return val.toISOString();\n if (isMap(val)) {\n return {\n map: Array.from(val.entries()).map(([k, v]) => [k, deepProcess(v)])\n };\n }\n if (isSet(val)) return { set: Array.from(val.values()).map(deepProcess) };\n\n if (isArray(val)) {\n const processedArr = val.map(deepProcess);\n if (sortArray) {\n const primitives: unknown[] = [];\n const nonPrimitives: unknown[] = [];\n\n for (const item of processedArr) {\n if (isPrimitive(item)) primitives.push(item);\n else nonPrimitives.push(item);\n }\n primitives.sort((a, b) => {\n if (isNumber(a) && isNumber(b)) return a - b;\n return String(a).localeCompare(String(b));\n });\n return [...primitives, ...nonPrimitives];\n }\n return processedArr;\n }\n\n const keys = Object.keys(val);\n if (sortKeys) {\n keys.sort((a, b) => {\n const na = Number(a);\n const nb = Number(b);\n if (!isNaN(na) && !isNaN(nb)) return na - nb;\n return a.localeCompare(b);\n });\n }\n\n const result: Record<string, unknown> = {};\n\n if (isObject(val)) {\n for (const k of keys) {\n const v = deepProcess(val[k]);\n if (!isUndefined(v)) result[k] = v;\n }\n }\n\n return result;\n }\n\n return val;\n };\n\n try {\n return JSON.stringify(deepProcess(value), null, pretty ? 2 : 0);\n } catch (err) {\n console.warn(\"Error in safeStableStringify:\", err);\n return \"{}\";\n }\n};\n\n// ----------------------------------------------------------------\n\n/** @internal */\ntype NormalizeSpacesOptions = {\n /** If `true`, skips normalization and only trims whitespace from start & end, defaultValue: `false`.\n *\n * @default false\n */\n trimOnly?: boolean;\n /** If `false`, skips trimming value, defaultValue: `true`.\n *\n * @default true\n */\n withTrim?: boolean;\n};\n\n/** @internal */\nexport const normalizeSpaces = (\n value: string | null | undefined,\n options: NormalizeSpacesOptions = {\n withTrim: true,\n trimOnly: false\n }\n): string => {\n if (!isNonEmptyString(value)) return \"\";\n\n if (!isPlainObject(options)) {\n options = {};\n }\n\n const { trimOnly = false, withTrim = true } = options;\n\n if (trimOnly) return value.trim();\n\n if (withTrim) {\n value = value.trim();\n }\n\n // Remove all duplicate spaces (including tabs, newlines, etc.)\n return value.replace(/\\s+/g, \" \");\n};\n\n// ----------------------------------------------------------------\n\n/** ----------------------------------------------------------------\n * * ***Checks whether a value is an array of strings.***\n * ----------------------------------------------------------------\n *\n * Type guard that validates the input is an `Array` where **all**\n * elements are strings.\n *\n * @param {unknown} v - The value to test.\n *\n * @returns {boolean} `true` if the value is a `string[]`.\n *\n * @internal\n */\nexport const isStringArray = (v: unknown): v is string[] =>\n isArray(v) && v.every((i) => isString(i));\n\n/** ----------------------------------------------------------------\n * * ***Checks whether a value is a Set of strings.***\n * ----------------------------------------------------------------\n *\n * Type guard that validates the input is a `Set` where **all**\n * entries are strings.\n *\n * @param {unknown} v - The value to test.\n *\n * @returns {boolean} `true` if the value is a `Set<string>`.\n *\n * @internal\n */\nexport const isStringSet = (v: unknown): v is Set<string> =>\n isSet(v) && [...v].every((i) => isString(i));\n\n/** ----------------------------------------------------------------\n * * ***Asserts that a value is a valid pattern input.***\n * ----------------------------------------------------------------\n *\n * Runtime assertion that validates the provided value is one of the\n * supported pattern types:\n * - `string`.\n * - `string[]`.\n * - `Set<string>`.\n *\n * This function is intended to be used at API boundaries to ensure\n * type safety before further processing.\n *\n * @param {unknown} v - The value to validate.\n * @param {string|undefined} parameterKey - The key parameter to identity which is invalid, default `\"pattern\"`.\n *\n * @throws {TypeError} If the value is not a valid pattern input.\n *\n * @example\n * ```ts\n * assertValidatePatternArgs(pattern);\n * // pattern is now typed as:\n * // string | string[] | Set<string>\n * ```\n *\n * @internal\n */\nexport const assertValidatePatternArgs: (\n v: unknown,\n parameterKey?: string\n) => asserts v is string | string[] | Set<string> = (\n v: unknown,\n parameterKey: string = \"pattern\"\n) => {\n if (!isString(v) && !isStringArray(v) && !isStringSet(v)) {\n throw new TypeError(\n `The \\`${parameterKey}\\` argument must be a string, string[] or Set<string>.`\n );\n }\n};\n\n/** ----------------------------------------------------------------\n * * ***Flattens nested arrays and extracts string values only.***\n * ----------------------------------------------------------------\n *\n * Recursively flattens an input array to **infinite depth** and\n * filters out all non-string values.\n *\n * - *Normalization rules:*\n * - Nested arrays are flattened using `Array.prototype.flat(Infinity)`.\n * - Only values with `typeof === \"string\"` are kept.\n * - Non-string values are discarded.\n *\n * The returned array is always a **new instance** and does not mutate\n * the original input.\n *\n * @param {readonly unknown[]} input - Arbitrary nested array input.\n *\n * @returns {string[]} A flat array containing only string values.\n *\n * @example\n * ```ts\n * flattenStrings([\"a\", [\"b\", [\"c\"]], 1, null]);\n * // ➔ [\"a\", \"b\", \"c\"]\n * ```\n *\n * @internal\n */\nexport const flattenStrings = (input: readonly unknown[]): string[] => {\n return input.flat(Infinity).filter((v): v is string => typeof v === \"string\");\n};\n\n/** ----------------------------------------------------------------\n * * ***Normalizes pattern input into a new `Set<string>` instance.***\n * ----------------------------------------------------------------\n *\n * Converts a pattern value into a deduplicated `Set<string>` for\n * consistent internal handling.\n *\n * #### Normalization behavior\n * - `string` ➔ wrapped into a `Set`.\n * - `string[]` ➔ converted into a `Set` (duplicates removed).\n * - `Set<string>` ➔ cloned into a new `Set`.\n *\n * The returned set is **always a new instance** and the original\n * input is never mutated.\n *\n * #### Validation\n * When `withValidationType` is `true` (default), the input will be\n * validated before normalization.\n *\n * If the provided `pattern` is not one of the supported types,\n * a `TypeError` will be thrown.\n *\n * @param pattern - Pattern value to normalize.\n * @param options - Optional configuration object.\n * @param options.withValidationType - Whether to validate the input\n * before normalization. Defaults to `true`.\n * @param options.parameterKey - The key parameter to identity which is invalid, default `\"pattern\"`.\n *\n * @returns A new deduplicated `Set<string>` instance.\n *\n * @throws {TypeError}\n * Thrown when `pattern` is not a `string`, `string[]`, or `Set<string>`\n * and validation is enabled.\n *\n * @example\n * ```ts\n * toStringSet(\"a\");\n * // ➔ Set { \"a\" }\n * ```\n *\n * @example\n * ```ts\n * toStringSet([\"a\", \"b\", \"a\"]);\n * // ➔ Set { \"a\", \"b\" }\n * ```\n *\n * @example\n * ```ts\n * toStringSet(new Set([\"x\", \"y\"]));\n * // ➔ Set { \"x\", \"y\" }\n * ```\n *\n * @example\n * ```ts\n * toStringSet(123 as any);\n * // ❌ Throws TypeError\n * ```\n *\n * @example\n * ```ts\n * // Disable validation (use cautiously)\n * toStringSet(\"a\", { withValidationType: false });\n * toStringSet(123 as any, { withValidationType: false });\n * ```\n *\n * @internal\n */\nexport const toStringSet = (\n pattern: string | string[] | Set<string>,\n options: {\n withValidationType?: boolean;\n /**\n * The key parameter to identity which is invalid.\n *\n * @default \"pattern\"\n */\n parameterKey?: string;\n } = {}\n): Set<string> => {\n const { withValidationType = true, parameterKey = \"pattern\" } = options;\n if (withValidationType) assertValidatePatternArgs(pattern, parameterKey);\n\n return toObjectSet(pattern);\n};\n\n/** ----------------------------------------------------------------\n * * ***Normalizes a value into a deduplicated `Set`.***\n * ----------------------------------------------------------------\n *\n * Converts a single value, array, or existing `Set` into a `Set<T>`\n * for consistent internal handling.\n *\n * - *Normalization rules:*\n * - `T` ➔ wrapped in a `Set`.\n * - `T[]` ➔ converted to a `Set` (duplicates removed).\n * - `Set<T>` ➔ returned as-is.\n *\n * The returned `Set` is **not mutated** internally by this function.\n * If an existing `Set` is provided, it will be reused.\n *\n * @typeParam T - Value type stored in the set.\n *\n * @param {T | T[] | Set<T>} value - Value to normalize.\n *\n * @returns {Set<T>} A deduplicated set of values.\n *\n * @example\n * ```ts\n * toObjectSet(1);\n * // ➔ Set { 1 }\n * ```\n *\n * @example\n * ```ts\n * toObjectSet([1, 2, 1]);\n * // ➔ Set { 1, 2 }\n * ```\n *\n * @example\n * ```ts\n * toObjectSet(new Set([1, 2]));\n * // ➔ Set { 1, 2 }\n * ```\n *\n * @internal\n */\nexport const toObjectSet = <T>(value: T | T[] | Set<T>): Set<T> => {\n if (isSet(value)) return value;\n\n return new Set(isArray(value) ? value : [value]);\n};\n\n/** ----------------------------------------------------------------\n * * ***Normalize a value into an array.***\n * ----------------------------------------------------------------\n *\n * Converts a single value or an array-like value into a **new array**\n * with consistent typing.\n *\n * - If `value` is already an array ➔ returned as-is.\n * - If `value` is a single item ➔ wrapped in an array.\n *\n * This utility is useful for APIs or configs that accept\n * either a single value or multiple values.\n *\n * ----------------------------------------------------------------\n *\n * @typeParam T\n * The element type of the resulting array.\n *\n * @param value\n * A value or array of values.\n *\n * @returns\n * A normalized array of type `T[]`.\n *\n * ----------------------------------------------------------------\n *\n * @example\n * ```ts\n * toArray(1);\n * // ➔ [1]\n *\n * toArray(\"hello\");\n * // ➔ [\"hello\"]\n *\n * toArray([1, 2, 3]);\n * // ➔ [1, 2, 3]\n * ```\n *\n * @example\n * ```ts\n * type User = { id: number };\n *\n * toArray<User>({ id: 1 });\n * // ➔ [{ id: 1 }]\n *\n * toArray<User>([{ id: 1 }, { id: 2 }]);\n * // ➔ [{ id: 1 }, { id: 2 }]\n * ```\n *\n * @remarks\n * This function does **not** flatten nested arrays.\n * If `value` is already an array, the original reference is preserved.\n *\n * @internal\n */\nexport const toArray = <T>(value: Arrayable<T>): T[] => {\n return isArray(value) ? value : [value];\n};\n","// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { Module } from \"node:module\";\nimport { isFunction, isObject } from \"@/_internal/utils/helper\";\n\n/** ----------------------------------------------------------------\n * * ***Typed mapping of commonly-used Node.js builtin module identifiers\n * (including `node:`-prefixed and legacy aliases).***\n * ----------------------------------------------------------------\n *\n * This is a **best-effort typing helper**, not a canonical or version-\n * exhaustive list of all Node.js builtins.\n *\n * - ***⚠️ Note:***\n * - This map provides **type-level hints only**.\n * - Presence in this map does **not guarantee runtime availability**.\n * - Availability of entries depends on the installed TypeScript version and `@types/node`.\n *\n * Consumers must ensure a Node.js runtime before calling `require`\n * with these identifiers.\n */\nexport type NodeBuiltinModuleMap = {\n // ======================\n // Filesystem\n // ======================\n \"node:fs\": typeof import(\"node:fs\");\n fs: typeof import(\"node:fs\");\n \"node:fs/promises\": typeof import(\"node:fs/promises\");\n \"fs/promises\": typeof import(\"node:fs/promises\");\n\n // ======================\n // Path / URL\n // ======================\n \"node:path\": typeof import(\"node:path\");\n path: typeof import(\"node:path\");\n \"node:url\": typeof import(\"node:url\");\n url: typeof import(\"node:url\");\n\n // ======================\n // OS / Process\n // ======================\n \"node:os\": typeof import(\"node:os\");\n os: typeof import(\"node:os\");\n \"node:process\": typeof import(\"node:process\");\n process: typeof import(\"node:process\");\n\n // ======================\n // Module system\n // ======================\n \"node:module\": typeof import(\"node:module\");\n module: typeof import(\"node:module\");\n\n // ======================\n // Buffer / Timers\n // ======================\n \"node:buffer\": typeof import(\"node:buffer\");\n buffer: typeof import(\"node:buffer\");\n \"node:timers\": typeof import(\"node:timers\");\n timers: typeof import(\"node:timers\");\n \"node:timers/promises\": typeof import(\"node:timers/promises\");\n \"timers/promises\": typeof import(\"node:timers/promises\");\n\n // ======================\n // Streams\n // ======================\n \"node:stream\": typeof import(\"node:stream\");\n stream: typeof import(\"node:stream\");\n \"node:stream/promises\": typeof import(\"node:stream/promises\");\n \"stream/promises\": typeof import(\"node:stream/promises\");\n \"node:stream/consumers\": typeof import(\"node:stream/consumers\");\n \"stream/consumers\": typeof import(\"node:stream/consumers\");\n \"node:stream/web\": typeof import(\"node:stream/web\");\n \"stream/web\": typeof import(\"node:stream/web\");\n\n // ======================\n // Crypto / Net / TLS\n // ======================\n \"node:crypto\": typeof import(\"node:crypto\");\n crypto: typeof import(\"node:crypto\");\n \"node:net\": typeof import(\"node:net\");\n net: typeof import(\"node:net\");\n \"node:tls\": typeof import(\"node:tls\");\n tls: typeof import(\"node:tls\");\n\n // ======================\n // HTTP\n // ======================\n \"node:http\": typeof import(\"node:http\");\n http: typeof import(\"node:http\");\n \"node:https\": typeof import(\"node:https\");\n https: typeof import(\"node:https\");\n \"node:http2\": typeof import(\"node:http2\");\n http2: typeof import(\"node:http2\");\n\n // ======================\n // Child / Worker\n // ======================\n \"node:child_process\": typeof import(\"node:child_process\");\n child_process: typeof import(\"node:child_process\");\n \"node:worker_threads\": typeof import(\"node:worker_threads\");\n worker_threads: typeof import(\"node:worker_threads\");\n\n // ======================\n // Events / Util / Assert\n // ======================\n \"node:events\": typeof import(\"node:events\");\n events: typeof import(\"node:events\");\n \"node:util\": typeof import(\"node:util\");\n util: typeof import(\"node:util\");\n \"node:assert\": typeof import(\"node:assert\");\n assert: typeof import(\"node:assert\");\n \"node:assert/strict\": typeof import(\"node:assert/strict\");\n \"assert/strict\": typeof import(\"node:assert/strict\");\n\n // ======================\n // Diagnostics / Debug\n // ======================\n \"node:diagnostics_channel\": typeof import(\"node:diagnostics_channel\");\n diagnostics_channel: typeof import(\"node:diagnostics_channel\");\n \"node:inspector\": typeof import(\"node:inspector\");\n inspector: typeof import(\"node:inspector\");\n\n // ======================\n // Encoding\n // ======================\n \"node:string_decoder\": typeof import(\"node:string_decoder\");\n string_decoder: typeof import(\"node:string_decoder\");\n\n // ======================\n // Readline / REPL\n // ======================\n \"node:readline\": typeof import(\"node:readline\");\n readline: typeof import(\"node:readline\");\n \"node:readline/promises\": typeof import(\"node:readline/promises\");\n \"readline/promises\": typeof import(\"node:readline/promises\");\n \"node:repl\": typeof import(\"node:repl\");\n repl: typeof import(\"node:repl\");\n\n // ======================\n // DNS\n // ======================\n \"node:dns\": typeof import(\"node:dns\");\n dns: typeof import(\"node:dns\");\n \"node:dns/promises\": typeof import(\"node:dns/promises\");\n \"dns/promises\": typeof import(\"node:dns/promises\");\n\n // ======================\n // Zlib\n // ======================\n \"node:zlib\": typeof import(\"node:zlib\");\n zlib: typeof import(\"node:zlib\");\n\n // ======================\n // VM / V8\n // ======================\n \"node:vm\": typeof import(\"node:vm\");\n vm: typeof import(\"node:vm\");\n \"node:v8\": typeof import(\"node:v8\");\n v8: typeof import(\"node:v8\");\n\n // ======================\n // Performance / Trace\n // ======================\n \"node:perf_hooks\": typeof import(\"node:perf_hooks\");\n perf_hooks: typeof import(\"node:perf_hooks\");\n \"node:trace_events\": typeof import(\"node:trace_events\");\n trace_events: typeof import(\"node:trace_events\");\n\n // ======================\n // Async / Legacy\n // ======================\n \"node:async_hooks\": typeof import(\"node:async_hooks\");\n async_hooks: typeof import(\"node:async_hooks\");\n \"node:domain\": typeof import(\"node:domain\");\n domain: typeof import(\"node:domain\");\n\n // ======================\n // Constants\n // ======================\n \"node:constants\": typeof import(\"node:constants\");\n constants: typeof import(\"node:constants\");\n};\n\n/** ----------------------------------------------------------------\n * * ***Callable `require`-like interface (runtime-safe).***\n * ----------------------------------------------------------------\n *\n * Represents a **minimal, honest abstraction** of Node.js `require`\n * that is safe to reference in mixed runtimes (CJS, ESM, bundlers,\n * and non-Node environments).\n *\n * - ***This type intentionally:***\n * - Requires only the callable signature `(id: string) => any`.\n * - Treats all standard `require` properties (`resolve`, `cache`,\n * `main`, etc.) as **optional**.\n *\n * This avoids lying to the type system while still allowing\n * property access when a real Node.js `require` is available.\n *\n */\ntype RequireCallable = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (id: string): any;\n} & Partial<NodeJS.Require>;\n\n/** ------------------------------------------------------------------------\n * * Global object shape exposing a `require` function.\n * -------------------------------------------------------------------------\n *\n * Describes environments where a global `require` function may exist.\n *\n * This is commonly used for **runtime detection**, such as checking\n * whether `require` is available before attempting to use it.\n *\n * @example\n * ```ts\n * const g = globalThis as typeof globalThis & GlobalWithRequire;\n *\n * if (typeof g.require === \"function\") {\n * const fs = g.require(\"fs\");\n * }\n * ```\n */\ntype GlobalWithRequire = { require: RequireCallable };\n\n/** ----------------------------------------------------------------\n * * ***Runtime type guard for a global `require` function.***\n * ----------------------------------------------------------------\n *\n * Determines whether a given value exposes a **callable `require`\n * property** at runtime.\n *\n * This guard does **not assume a Node.js environment** and does not\n * rely on environment heuristics such as `process`, `Node`, or\n * `process.versions.node`.\n *\n * - ***Instead, it performs a **pure runtime structural check**:***\n * - The value must be an object.\n * - It must expose a `require` property.\n * - That property must be callable.\n *\n * - ***This makes the guard safe to use in:***\n * - Node.js (CommonJS).\n * - Node.js (ESM / loader contexts).\n * - Bundler execution environments.\n * - Browsers (where it will correctly return `false`).\n *\n * Implemented as a **user-defined type guard** to enable proper\n * TypeScript narrowing, allowing safe access to `value.require`\n * without repeated casting.\n *\n * @param value - Any value to test for a global `require` function.\n * @returns `true` if the value exposes a callable `require` property.\n *\n */\nexport const hasGlobalRequire = (value: unknown): value is GlobalWithRequire =>\n isObject(value) && isFunction(value.require);\n\n/** ----------------------------------------------------------------\n * * ***Safely resolve the global `require` function.***\n * ----------------------------------------------------------------\n *\n * Attempts to retrieve the global CommonJS `require` function\n * if and only if it is **actually available at runtime**.\n *\n * Unlike naive Node checks (e.g. `process.versions.node`),\n * this function avoids false positives in environments such as:\n * - Node.js ESM loaders.\n * - Build-time execution environments.\n * - Bundler config evaluation.\n *\n * If `require` is not present, this function returns `undefined`\n * instead of throwing.\n *\n * ----------------------------------------------------------------\n * - ***⚠️ Note:***\n * - This helper intentionally does not attempt to detect\n * loader-injected or sandboxed `require` bindings.\n * ----------------------------------------------------------------\n *\n * @returns The global `require` function if available; otherwise `undefined`.\n */\nexport const getRuntimeRequire = (): RequireCallable | undefined => {\n if (!hasGlobalRequire(globalThis)) return undefined;\n return globalThis.require;\n};\n\n/** ----------------------------------------------------------------\n * * ***Deferred runtime `require` accessor.***\n * ----------------------------------------------------------------\n *\n * Provides a **lazy, runtime-resolved accessor** for a `require`\n * function without creating a static reference.\n *\n * - ***Intended for:***\n * - Runtime-agnostic tooling.\n * - Build / bundler utilities.\n * - CLI infrastructure.\n * - ***Behavior:***\n * - Delegates to a real `require` function *only if one exists at runtime*.\n * - Avoids top-level `require` references that bundlers may rewrite.\n * - Remains callable even when `require` is absent.\n *\n * When `Proxy` is available, property access (e.g. `require.resolve`)\n * is dynamically forwarded to the real `require` once it becomes\n * available.\n *\n * If invoked in an environment that does not expose `require`,\n * the call fails with a descriptive runtime error.\n *\n * ⚠️ Typed overloads do not guarantee that the requested module\n * exists or can be resolved at runtime.\n *\n * Runtime errors may still occur depending on the execution environment.\n *\n * ⚠️ This is **not** a polyfill and does **not** emulate Node.js\n * CommonJS resolution. It merely defers access to an existing\n * `require` function when present.\n *\n * ⚠️ When accessed before a real `require` is available,\n * properties such as `resolve`, `cache`, or `main`\n * may be `undefined`.\n */\nexport const __runtimeRequire: {\n <K extends keyof NodeBuiltinModuleMap>(id: K): NodeBuiltinModuleMap[K];\n (id: string): unknown;\n} = ((x: RequireCallable) => {\n const r = getRuntimeRequire();\n\n if (r) return r;\n\n if (typeof Proxy !== \"undefined\") {\n return new Proxy(x, {\n get(target, prop: keyof RequireCallable) {\n const r2 = getRuntimeRequire();\n return r2 ? r2[prop] : target[prop];\n }\n });\n }\n\n return x;\n})(function (this: unknown, id: string) {\n const r = getRuntimeRequire();\n if (r) return r.call(this, id);\n\n throw new Error(\n `Calling \\`require\\` for \"${id}\" in an environment that doesn't expose the \\`require\\` function.`\n );\n});\n\n/** ----------------------------------------------------------------\n * * ***Lazily resolves Node.js `createRequire`.***\n * ----------------------------------------------------------------\n *\n * Lazily resolves Node.js {@link Module.createRequire | **`createRequire`**}\n * **at runtime** using a strategy that is safe across mixed execution\n * environments (CJS, ESM, bundlers, and tooling contexts).\n *\n * - ***This helper intentionally avoids:***\n * - Static ESM imports that may execute during build time.\n * - Direct top-level `require` access that bundlers can rewrite or hoist.\n *\n * - ***Resolution strategy:***\n * - If a global CommonJS `require` is available at runtime, the\n * `node:module` builtin is loaded through the deferred.\n * {@link __runtimeRequire | **`__runtimeRequire`**} accessor.\n * - Otherwise, falls back to a dynamic `import(\"node:module\")`,\n * which is safe in ESM-only or bundled environments.\n *\n * This function does **not** assume a Node.js environment at evaluation\n * time, but **does require Node.js at runtime**. It will throw if the\n * `node:module` builtin cannot be resolved by either strategy.\n *\n * - ***Intended for:***\n * - Tooling that operates across mixed CJS / ESM runtimes.\n * - Bundler or compiler internals.\n * - CLI configuration and plugin loaders.\n *\n * @returns\n * A reference to Node.js {@link Module.createRequire | **`createRequire`**}.\n *\n * @throws\n * Throws if the `node:module` builtin cannot be resolved at runtime.\n *\n * @example\n * ***ESM / bundler-safe usage:***\n * ```ts\n * const createRequire = await getCreateRequire();\n *\n * const require = createRequire(import.meta.url);\n *\n * const fs = require(\"fs\");\n * const path = require(\"path\");\n *\n * console.log(fs.existsSync(path.resolve(\"package.json\")));\n * ```\n *\n * @example\n * ***Loading CommonJS or JSON config from ESM:***\n * ```ts\n * const createRequire = await getCreateRequire();\n *\n * const require = createRequire(process.cwd() + \"/\");\n *\n * const config = require(\"./my.config.cjs\");\n * const pkg = require(\"./package.json\");\n * ```\n *\n * @example\n * ***CommonJS (Node.js – compatibility usage):***\n *\n * In pure CommonJS environments this helper is usually unnecessary.\n * This example demonstrates interoperability with the same runtime-safe API.\n *\n * ```js\n * (async () => {\n * const { getCreateRequire } = await import(\"./getCreateRequire.js\");\n *\n * const createRequire = await getCreateRequire();\n * const requireFromHere = createRequire(__filename);\n *\n * const pkg = requireFromHere(\"some-cjs-only-package\");\n * console.log(pkg);\n * })();\n * ```\n *\n * @example\n * ***UMD / IIFE (Node execution):***\n * ```js\n * const createRequire = await getCreateRequire();\n *\n * const requireFromHere =\n * typeof __filename !== \"undefined\"\n * ? createRequire(__filename)\n * : createRequire(import.meta.url);\n *\n * const pkg = requireFromHere(\"some-cjs-only-package\");\n * ```\n */\nexport async function getCreateRequire(): Promise<\n typeof import(\"node:module\").createRequire\n> {\n const r = getRuntimeRequire();\n if (r) {\n return __runtimeRequire(\"node:module\").createRequire;\n }\n\n // ESM-safe fallback (unrun / tsdown / bundlers)\n const mod = await import(\"node:module\");\n return mod.createRequire;\n}\n","import type { Colors } from \"picocolors/types\";\nimport pcr from \"picocolors\";\n\nimport {\n isArray,\n isBoolean,\n isMap,\n isNil,\n isNonEmptyString,\n isNumber,\n isObject,\n isPlainObject,\n isRegExp,\n isSet,\n isString\n} from \"@/_internal/utils/helper\";\nimport { __runtimeRequire, hasGlobalRequire } from \"./node-require\";\n\ntype Picocolors = Colors & {\n createColors: (enabled?: boolean) => Colors;\n};\n\n/** ----------------------------------------------------------------\n * * ***Re-export of the `picocolors` default export.***\n * ----------------------------------------------------------------\n * This utility provides a lightweight and dependency-free\n * terminal color formatting helper, identical to the\n * original `picocolors` package export.\n *\n * - **It is re-exported to:**\n * - Provide a stable internal import path.\n * - Avoid direct dependency imports in consumers.\n * - Ensure consistent color handling across the codebase.\n *\n * @see {@link https://github.com/alexeyraspopov/picocolors | **`picocolors repository`**.}\n */\nexport const picocolors: Picocolors = pcr;\n\n/** ----------------------------------------------------------------\n * * ***Normalized newline character.***\n * ----------------------------------------------------------------\n *\n * Represents a single line feed character (`\\n`), used as a\n * **consistent newline** across all platforms.\n *\n * This value is intentionally **not platform-specific** and does\n * not vary between operating systems (e.g. Windows CRLF vs POSIX LF).\n * It is suitable for generated files, formatters, and build tools\n * where deterministic output is required.\n *\n * The value is base64-encoded to avoid embedding a literal newline\n * in the bundled output during minification.\n *\n * @type {string}\n */\nexport const NEWLINE: string = atob(\"Cg==\");\n\n/** ----------------------------------------------------------------\n * * ***Platform-specific end-of-line character.***\n * ----------------------------------------------------------------\n *\n * Resolves to the operating system's default end-of-line sequence:\n * - `\\n` on POSIX systems (Linux, macOS)\n * - `\\r\\n` on Windows\n *\n * Used to ensure generated multiline strings are compatible\n * with the host environment.\n *\n * In non-Node environments, this value falls back to `\\n`.\n * The fallback is encoded to avoid embedding a literal newline\n * in the bundled output during minification.\n *\n * @type {string}\n */\nexport const EOL: string = hasGlobalRequire(globalThis)\n ? __runtimeRequire(\"node:os\").EOL\n : NEWLINE;\n\n/** -------------------------------------------------------\n * * ***Utility Function: `plural`.***\n * -------------------------------------------------------\n * **Returns the correct singular or plural form of a word\n * based on a numeric count.**\n *\n * This helper is commonly used when generating human-readable\n * CLI messages where a word must change depending on quantity.\n *\n * By default, the function pluralizes a word by appending `\"s\"`\n * when the `count` is not equal to `1`.\n *\n * For irregular plural forms, a custom `pluralWord` may be\n * provided explicitly.\n *\n * ⚠️ This utility performs **simple English pluralization only**.\n * It does **not** automatically handle irregular plural forms\n * such as `person ➔ people` or `child ➔ children` unless the\n * plural form is provided manually.\n *\n * - **Behavior:**\n * - If `count === 1` ➔ returns the singular `word`.\n * - Otherwise ➔ returns `pluralWord` if provided,\n * or `${word}s` by default.\n *\n * @param count - The numeric count used to determine pluralization.\n * @param word - The singular form of the word.\n * @param pluralWord - Optional explicit plural form.\n *\n * @returns The appropriate singular or plural word form.\n *\n * @example\n * ```ts\n * plural(1, \"file\");\n * // ➔ \"file\"\n *\n * plural(3, \"file\");\n * // ➔ \"files\"\n * ```\n *\n * @example\n * ```ts\n * plural(1, \"person\", \"people\");\n * // ➔ \"person\"\n *\n * plural(5, \"person\", \"people\");\n * // ➔ \"people\"\n * ```\n *\n * @example\n * ```ts\n * const count = 2;\n * console.log(`${count} ${plural(count, \"file\")} copied`);\n * // ➔ \"2 files copied\"\n * ```\n */\nexport function plural(\n count: number,\n word: string,\n pluralWord?: string\n): string {\n if (count === 1) return word;\n return pluralWord ?? `${word}s`;\n}\n\n/** ----------------------------------------------------------------\n * * ***Conditionally pads a value with leading and/or trailing spaces.***\n * ----------------------------------------------------------------\n *\n * Formats a value by optionally prepending and/or appending a single\n * space character (`\" \"`), depending on the provided options.\n *\n * Only **valid non-empty strings** are padded.\n * A value is considered **invalid** when it is:\n * - not a string.\n * - an empty string (`\"\"`).\n * - a string containing only whitespace.\n *\n * When the value is invalid, this utility can optionally return\n * a single space instead of an empty string.\n *\n * @param {unknown} value - The value to be padded.\n * @param {{ start?: boolean; end?: boolean; padOnInvalid?: boolean; }} options - Padding behavior configuration.\n * @param options.start - Prepend a single space before the value.\n * @param options.end - Append a single space after the value.\n * @param options.padOnInvalid - Return a single space when the value\n * is not a valid non-empty string.\n *\n * @returns A formatted string with optional leading and/or trailing\n * spaces, or a single space / empty string when the input is invalid.\n *\n * @example\n * ```ts\n * padText(\"hello\");\n * // ➔ \" hello \"\n * ```\n *\n * @example\n * ```ts\n * padText(\"hello\", { start: true, end: false });\n * // ➔ \" hello\"\n * ```\n *\n * @example\n * ```ts\n * padText(\"\", { padOnInvalid: true });\n * // ➔ \" \"\n * ```\n *\n * @example\n * ```ts\n * padText(null, { padOnInvalid: false });\n * // ➔ \"\"\n * ```\n */\nexport function padText(\n value: unknown,\n options: {\n /**\n * Whether to prepend a single space to the output.\n *\n * @default true\n */\n start?: boolean;\n\n /**\n * Whether to append a single space to the output.\n *\n * @default true\n */\n end?: boolean;\n\n /**\n * Return a single space when the input is not a valid non-empty string.\n *\n * This applies to non-string values, empty strings,\n * or strings containing only whitespace.\n *\n * @default true\n */\n padOnInvalid?: boolean;\n } = {}\n): string {\n const { start = true, end = true, padOnInvalid = true } = options;\n if (!isNonEmptyString(value)) return padOnInvalid ? \" \" : \"\";\n return `${start ? \" \" : \"\"}${value}${end ? \" \" : \"\"}`;\n}\n\n/** ----------------------------------------------------------------\n * * ***Joins text segments into a compact space-separated string.***\n * ----------------------------------------------------------------\n *\n * Joins multiple values into a single string separated by a\n * **single space character** (`\" \"`).\n *\n * This utility removes all non-renderable values before joining,\n * producing a compact inline string without unintended spacing.\n *\n * - *Filtering behavior:*\n * - `false`, `null`, and `undefined` are removed.\n * - Empty strings (`\"\"`) are also removed.\n *\n * This makes the output suitable for inline text composition\n * where line breaks and extra spacing are not desired.\n *\n * - *Useful for:*\n * - Inline CLI messages.\n * - Error summaries.\n * - Concatenating optional labels or fragments.\n * - Single-line log output.\n *\n * @param {Array<string | false | null | undefined>} text - A list of\n * strings or falsy values to be joined. Empty strings are excluded\n * to prevent extra spaces in the output.\n *\n * @returns {string} A single string with values joined by a\n * single space character.\n *\n * @example\n * ```ts\n * joinInline(\"Hello\", false, \"\", \"world\");\n * // ➔ \"Hello world\"\n * ```\n *\n * @example\n * ```ts\n * joinInline(\n * \"Error:\",\n * undefined,\n * \"Invalid\",\n * null,\n * \"input\"\n * );\n * // ➔ \"Error: Invalid input\"\n * ```\n */\nexport function joinInline(\n ...text: Array<string | false | null | undefined>\n): string {\n return text.filter(Boolean).join(\" \");\n}\n\n/** ----------------------------------------------------------------\n * * ***Joins text lines into a compact newline-separated string.***\n * ----------------------------------------------------------------\n *\n * Joins multiple values into a single string separated by the\n * platform-specific end-of-line character ({@link EOL | **`EOL`**}).\n *\n * This utility removes all non-renderable values before joining,\n * ensuring a compact output with no unintended blank lines.\n *\n * - *Filtering behavior:*\n * - `false`, `null`, and `undefined` are removed.\n * - Empty strings (`\"\"`) are also removed.\n *\n * This makes the output dense and suitable for cases where\n * vertical spacing should not be preserved.\n *\n * - *Useful for:*\n * - CLI error messages.\n * - Compact help or status output.\n * - Multi-line logs without spacing gaps.\n *\n * @param {Array<string | false | null | undefined>} text - A list of\n * strings or falsy values to be joined. Empty strings are excluded\n * to prevent blank lines in the output.\n *\n * @returns {string} A single string joined using the OS-specific\n * end-of-line character.\n *\n * @example\n * ```ts\n * joinLines(\"Line 1\", false, \"\", \"Line 2\");\n * // ➔ \"Line 1\\nLine 2\"\n * ```\n *\n * @example\n * ```ts\n * joinLines(\n * \"Header\",\n * undefined,\n * \"\",\n * \"Body\",\n * null,\n * \"Footer\"\n * );\n * // ➔ \"Header\\nBody\\nFooter\"\n * ```\n */\nexport function joinLines(\n ...text: Array<string | false | null | undefined>\n): string {\n return text.filter(Boolean).join(EOL);\n}\n\n/** ----------------------------------------------------------------\n * * ***Joins text lines while preserving explicit empty lines.***\n * ----------------------------------------------------------------\n *\n * Joins multiple values into a single string separated by the\n * platform-specific end-of-line character ({@link EOL | **`EOL`**}).\n *\n * Unlike {@link joinLines | **`joinLines`**}, this variant **preserves empty strings**\n * (`\"\"`) to intentionally create blank lines in the output.\n *\n * - *Filtering behavior:*\n * - `false`, `null`, and `undefined` are removed.\n * - Empty strings (`\"\"`) are kept as-is.\n *\n * This allows precise control over vertical spacing when composing\n * formatted text.\n *\n * - *Useful for:*\n * - CLI help output with paragraph separation.\n * - Multi-section descriptions.\n * - Human-readable documentation formatting.\n *\n * @param {Array<string | false | null | undefined>} text - A list of\n * strings or falsy values to be joined. Empty strings are preserved\n * to produce blank lines in the output.\n *\n * @returns {string} A single string joined using the OS-specific\n * end-of-line character.\n *\n * @example\n * ```ts\n * joinLinesLoose(\n * \"Line one\",\n * \"Line two\",\n * \"\",\n * \"New paragraph\"\n * );\n * // ➔ \"Line one\\nLine two\\n\\nNew paragraph\"\n * ```\n *\n * @example\n * ```ts\n * joinLinesLoose(\n * \"Header\",\n * null,\n * \"\",\n * \"Body\",\n * false,\n * null,\n * undefined\n * );\n * // ➔ \"Header\\n\\nBody\"\n * ```\n */\nexport function joinLinesLoose(\n ...text: Array<string | false | null | undefined>\n): string {\n return text\n .filter((v): v is string => v !== false && v !== null && v !== undefined)\n .join(EOL);\n}\n\ntype FormatOptionValueOptions = {\n /**\n * @default false\n */\n pretty?: boolean;\n /**\n * @default 2\n */\n indent?: number;\n /**\n * @default false\n */\n sortKeys?: boolean;\n /**\n * @default false\n */\n sortArray?: boolean;\n};\n\n/** ----------------------------------------------------------------\n * * Formats a value into a compact, colorized CLI representation.\n * ----------------------------------------------------------------\n *\n * Recursively converts an arbitrary value into a human-readable,\n * ANSI-colored string intended strictly for terminal output.\n *\n * This formatter is designed for developer-facing CLI diagnostics\n * and must NOT be used for logging, serialization, persistence,\n * or programmatic comparison.\n *\n * - *Behavior:*\n * - Arrays are rendered inline: `[a, b, c]`.\n * - `Set` values are converted to arrays before rendering.\n * - `Map` values are converted to plain objects via `Object.fromEntries`.\n * - Plain objects are rendered inline: `{ key: value }`.\n * - `RegExp` values are colorized by delimiter, source, and flags.\n * - Strings are wrapped in double quotes.\n * - Numbers (including `NaN`) and booleans are highlighted.\n * - `null` and `undefined` are red-bright color.\n * - Other objects fall back to `Object.prototype.toString`.\n *\n * - *Characteristics:*\n * - Recursive.\n * - Compact (single-line).\n * - No pretty-print indentation.\n * - No key or array sorting.\n * - No JSON serialization.\n * - No circular reference handling.\n *\n * @param value - The value to format for CLI display.\n *\n * @returns A colorized string optimized for terminal readability.\n *\n * @example\n * formatOptionValue([\"a\", \"b\"]);\n * // ➔ [ \"a\", \"b\" ]\n *\n * @example\n * formatOptionValue({ foo: 1, bar: true });\n * // ➔ { foo: 1, bar: true }\n *\n * @example\n * formatOptionValue(new Set([\"dist/**\"]));\n * // ➔ [ \"dist/**\" ]\n *\n * @example\n * formatOptionValue(/abc/i);\n * // ➔ /abc/i (colorized segments)\n */\nexport function formatOptionValue(\n value: unknown,\n options?: FormatOptionValueOptions\n): string {\n const {\n pretty = false,\n indent = 2,\n sortKeys = false,\n sortArray = false\n } = options ?? {};\n\n const indentUnit = \" \".repeat(indent);\n\n function formatRecursive(input: unknown, depth = 0): string {\n const currentIndent = indentUnit.repeat(depth);\n const nextIndent = indentUnit.repeat(depth + 1);\n const joinInline = picocolors.dim(\", \");\n const joinPretty = `,${EOL}`;\n\n /* ------------------------------------------------------------ */\n /* Set ➔ Array */\n /* ------------------------------------------------------------ */\n if (isSet(input)) {\n return formatRecursive([...input], depth);\n }\n\n /* ------------------------------------------------------------ */\n /* Map ➔ Plain Object */\n /* ------------------------------------------------------------ */\n if (isMap(input)) {\n return formatRecursive(Object.fromEntries(input), depth);\n }\n\n /* ------------------------------------------------------------ */\n /* Array */\n /* ------------------------------------------------------------ */\n if (isArray(input)) {\n const arr = sortArray ? [...input].sort() : input;\n\n if (arr.length === 0) return picocolors.gray(\"[]\");\n\n if (!pretty) {\n const items = arr\n .map((v) => formatRecursive(v, depth))\n .join(joinInline);\n return picocolors.gray(\"[\") + items + picocolors.gray(\"]\");\n }\n\n const items = arr\n .map((v) => nextIndent + formatRecursive(v, depth + 1))\n .join(joinPretty);\n\n return (\n picocolors.gray(`[${EOL}`) +\n items +\n EOL +\n currentIndent +\n picocolors.gray(\"]\")\n );\n }\n\n /* ------------------------------------------------------------ */\n /* Plain Object */\n /* ------------------------------------------------------------ */\n if (isPlainObject(input)) {\n let entries = Object.entries(input);\n\n if (sortKeys) {\n entries = entries.sort(([a], [b]) => a.localeCompare(b));\n }\n\n if (entries.length === 0) return picocolors.gray(\"{}\");\n\n if (!pretty) {\n const props = entries\n .map(([key, val]) => {\n return (\n picocolors.dim(key) +\n picocolors.gray(\": \") +\n formatRecursive(val, depth)\n );\n })\n .join(joinInline);\n\n return picocolors.gray(\"{ \") + props + picocolors.gray(\" }\");\n }\n\n const props = entries\n .map(([key, val]) => {\n return (\n nextIndent +\n picocolors.dim(key) +\n picocolors.gray(\": \") +\n formatRecursive(val, depth + 1)\n );\n })\n .join(joinPretty);\n\n return (\n picocolors.gray(`{${EOL}`) +\n props +\n EOL +\n currentIndent +\n picocolors.gray(\"}\")\n );\n }\n\n /* ------------------------------------------------------------ */\n /* RegExp */\n /* ------------------------------------------------------------ */\n if (isRegExp(input)) {\n return (\n picocolors.greenBright(\"/\") +\n picocolors.redBright(input.source) +\n picocolors.greenBright(\"/\") +\n picocolors.magentaBright(input.flags)\n );\n }\n\n /* ------------------------------------------------------------ */\n /* Primitive */\n /* ------------------------------------------------------------ */\n if (isString(input)) {\n return picocolors.gray(`\"${input}\"`);\n }\n\n if (isNumber(input, { includeNaN: true })) {\n return picocolors.redBright(String(input));\n }\n\n if (isBoolean(input)) {\n return picocolors.redBright(String(input));\n }\n\n if (isNil(input)) {\n return picocolors.redBright(String(input));\n }\n\n if (isObject(input)) {\n return picocolors.cyanBright(Object.prototype.toString.call(input));\n }\n\n return picocolors.cyanBright(String(input));\n }\n\n return formatRecursive(value);\n}\n"],"mappings":";;;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EAGpE,OAAO,WAAW,WAAW,OAAO,KAAK,CAAC;CAC5C;CAEA,OAAO,gBAAgB,KAAK;AAC9B"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* ========================================================================
|
|
3
3
|
* @rzl-zone/build-tools
|
|
4
4
|
* ------------------------------------------------------------------------
|
|
5
|
-
* Version: `0.0.
|
|
5
|
+
* Version: `0.0.13`
|
|
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
|
* ========================================================================
|
|
@@ -502,4 +502,4 @@ Object.defineProperty(exports, 'toStringSet', {
|
|
|
502
502
|
return toStringSet;
|
|
503
503
|
}
|
|
504
504
|
});
|
|
505
|
-
//# sourceMappingURL=formatter-
|
|
505
|
+
//# sourceMappingURL=formatter-C-Yt_Gvf.cjs.map
|