@rzl-zone/build-tools 0.0.7 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/dist/.references/index.d.cts +1 -1
  2. package/dist/.references/index.d.ts +1 -1
  3. package/dist/bundler/rolldown.cjs +2 -2
  4. package/dist/bundler/rolldown.d.cts +2 -2
  5. package/dist/bundler/rolldown.d.ts +2 -2
  6. package/dist/bundler/rolldown.js +1 -1
  7. package/dist/bundler/tsdown.cjs +3 -3
  8. package/dist/bundler/tsdown.d.cts +2 -2
  9. package/dist/bundler/tsdown.d.ts +2 -2
  10. package/dist/bundler/tsdown.js +3 -3
  11. package/dist/bundler/utils.cjs +2 -2
  12. package/dist/bundler/utils.d.cts +2 -2
  13. package/dist/bundler/utils.d.ts +2 -2
  14. package/dist/bundler/utils.js +2 -2
  15. package/dist/{client-VbpeaXsy.cjs → client-C3jHSAqV.cjs} +3 -3
  16. package/dist/{client-VbpeaXsy.cjs.map → client-C3jHSAqV.cjs.map} +1 -1
  17. package/dist/{client-CuldIPPY.js → client-DUlrjus0.js} +3 -3
  18. package/dist/{client-CuldIPPY.js.map → client-DUlrjus0.js.map} +1 -1
  19. package/dist/commander-kit/index.cjs +5 -5
  20. package/dist/commander-kit/index.d.cts +3 -3
  21. package/dist/commander-kit/index.d.ts +3 -3
  22. package/dist/commander-kit/index.js +5 -5
  23. package/dist/{extra-2iX9E4Hj.d.cts → extra-CsRmdXC4.d.cts} +2 -2
  24. package/dist/{extra-DY59MRMZ.d.ts → extra-DxvrBev9.d.ts} +2 -2
  25. package/dist/{fast-globe-options-ClsKhWod.d.ts → fast-globe-options-Cz8KJqKc.d.ts} +3 -3
  26. package/dist/{fast-globe-options-BLHLcUA_.d.cts → fast-globe-options-PH-bHWVK.d.cts} +3 -3
  27. package/dist/{helper-BlSd9P9f.js → helper-D11A-ZKL.js} +2 -2
  28. package/dist/{helper-BlSd9P9f.js.map → helper-D11A-ZKL.js.map} +1 -1
  29. package/dist/{helper-PkWCboHw.cjs → helper-DpeqwciR.cjs} +2 -2
  30. package/dist/{helper-PkWCboHw.cjs.map → helper-DpeqwciR.cjs.map} +1 -1
  31. package/dist/{identity-NSVVUm0l.cjs → identity-ByjqnR8L.cjs} +6 -6
  32. package/dist/{identity-NSVVUm0l.cjs.map → identity-ByjqnR8L.cjs.map} +1 -1
  33. package/dist/{identity-BFjidy_R.js → identity-C5MeSAA7.js} +6 -6
  34. package/dist/{identity-BFjidy_R.js.map → identity-C5MeSAA7.js.map} +1 -1
  35. package/dist/{index-CQatHoCR.d.ts → index-B1t7Xs3T.d.ts} +2 -2
  36. package/dist/{index-CNjsgh1e.d.ts → index-Dvmmz0f_.d.ts} +15 -3
  37. package/dist/{index-B3VpO-fM.d.cts → index-TgjbNRWB.d.cts} +15 -3
  38. package/dist/{index-BNJNsFwK.d.cts → index-xAz8brx-.d.cts} +2 -2
  39. package/dist/index.cjs +196 -196
  40. package/dist/index.cjs.map +1 -1
  41. package/dist/index.d.cts +157 -157
  42. package/dist/index.d.ts +157 -157
  43. package/dist/index.js +196 -196
  44. package/dist/index.js.map +1 -1
  45. package/dist/{package-banner-yTTlKTH6.cjs → package-banner-ByfR7yCv.cjs} +17 -11
  46. package/dist/package-banner-ByfR7yCv.cjs.map +1 -0
  47. package/dist/{package-banner-Cgukf7xE.js → package-banner-vwqcAX8E.js} +17 -11
  48. package/dist/package-banner-vwqcAX8E.js.map +1 -0
  49. package/dist/{server-niOC1_n4.js → server-1H2HFAbi.js} +3 -3
  50. package/dist/{server-niOC1_n4.js.map → server-1H2HFAbi.js.map} +1 -1
  51. package/dist/{server-Ct02ysTN.cjs → server-BK6eykjo.cjs} +3 -3
  52. package/dist/{server-Ct02ysTN.cjs.map → server-BK6eykjo.cjs.map} +1 -1
  53. package/dist/utils/client.cjs +2 -2
  54. package/dist/utils/client.d.cts +1 -1
  55. package/dist/utils/client.d.ts +1 -1
  56. package/dist/utils/client.js +2 -2
  57. package/dist/utils/server.cjs +2 -2
  58. package/dist/utils/server.d.cts +2 -2
  59. package/dist/utils/server.d.ts +2 -2
  60. package/dist/utils/server.js +2 -2
  61. package/package.json +3 -3
  62. package/dist/package-banner-Cgukf7xE.js.map +0 -1
  63. package/dist/package-banner-yTTlKTH6.cjs.map +0 -1
package/dist/index.d.cts CHANGED
@@ -2,18 +2,18 @@
2
2
  * ========================================================================
3
3
  * @rzl-zone/build-tools
4
4
  * ------------------------------------------------------------------------
5
- * Version: `0.0.7`
5
+ * Version: `0.0.9`
6
6
  * Author: `Rizalvin Dwiky <rizalvindwiky1998@gmail.com>`
7
7
  * Repository: `https://github.com/rzl-zone/rzl-zone/tree/main/packages/build-tools`
8
8
  * ========================================================================
9
9
  */
10
10
 
11
- import { a as OmitStrict, c as PrettifyOptions, r as DefaultPrettifyOptions, s as Prettify } from "./extra-2iX9E4Hj.cjs";
12
- import { n as generatePackageBanner, r as PackageJson, t as GeneratePackageBannerOptions } from "./index-B3VpO-fM.cjs";
13
- import { t as CommandIdentity } from "./index-BNJNsFwK.cjs";
14
- import { n as PatternOptions, t as PatternConfig } from "./fast-globe-options-BLHLcUA_.cjs";
15
- import * as acorn from "acorn";
11
+ import { a as OmitStrict, c as PrettifyOptions, r as DefaultPrettifyOptions, s as Prettify } from "./extra-CsRmdXC4.cjs";
12
+ import { n as generatePackageBanner, r as PackageJson, t as GeneratePackageBannerOptions } from "./index-TgjbNRWB.cjs";
13
+ import { t as CommandIdentity } from "./index-xAz8brx-.cjs";
14
+ import { n as PatternOptions, t as PatternConfig } from "./fast-globe-options-PH-bHWVK.cjs";
16
15
  import { ChildProcess, SpawnOptions, StdioOptions } from "node:child_process";
16
+ import * as acorn from "acorn";
17
17
 
18
18
  /** ----------------------------------------------------------------
19
19
  * * ***Flexible input type for value collections.***
@@ -1417,157 +1417,6 @@ type NormalizeJsBuildNewlinesOptions = BaseOptions<typeof DEFAULT_NJBN_PATTERN_P
1417
1417
  */
1418
1418
  declare const normalizeJsBuildNewlines: (pattern: StringCollection, options?: NormalizeJsBuildNewlinesOptions) => Promise<void>;
1419
1419
  /** ----------------------------------------------------------------
1420
- * * ***Default Pattern Policy for **strip js comments** operations.***
1421
- * ----------------------------------------------------------------
1422
- *
1423
- * Defines the runtime behavior for pattern resolution used by:
1424
- * - {@link stripJsComments | **`strip-js-comments`**}.
1425
- *
1426
- * @remarks
1427
- * - `filesOnly`: Ensures only files are matched.
1428
- * - `forceUnique`: Deduplicates matched results.
1429
- */
1430
- declare const DEFAULT_SJC_PATTERN_POLICY: {
1431
- readonly filesOnly: true;
1432
- readonly forceUnique: true;
1433
- };
1434
- /** ----------------------------------------------------------------
1435
- * * ***Resolved Pattern Options for **strip js comments** operations.***
1436
- * ----------------------------------------------------------------
1437
- *
1438
- * Pattern options used by:
1439
- * - {@link stripJsComments | **`strip-js-comments`**}.
1440
- */
1441
- declare const resolvedSjcPatternOption: PatternOptions<true, true>;
1442
- /** Command identity associated with {@link stripJsComments | **`strip-js-comments`**}. */
1443
- declare const commandSjcIdentity: CommandIdentity;
1444
- /** ----------------------------------------------------------------
1445
- * * ***Configuration options for {@link stripJsComments | `strip-js-comment`}.***
1446
- * ----------------------------------------------------------------
1447
- */
1448
- type StripJsCommentsOptions = {
1449
- /** ----------------------------------------------------------------
1450
- * * ***Whether to remove `sourceMappingURL` comments.***
1451
- * ----------------------------------------------------------------
1452
- *
1453
- * @default false
1454
- */
1455
- removeSourceMap?: boolean;
1456
- /** ----------------------------------------------------------------
1457
- * * ***Whether to remove `region` comments.***
1458
- * ----------------------------------------------------------------
1459
- *
1460
- * @default true
1461
- */
1462
- removeRegion?: boolean;
1463
- /** ----------------------------------------------------------------
1464
- * * ***Parsing mode used when analyzing JavaScript code.***
1465
- * ----------------------------------------------------------------
1466
- *
1467
- * Determines how the source file should be interpreted by the parser.
1468
- * This affects strict mode behavior and how `import` / `export`
1469
- * statements are handled.
1470
- *
1471
- *
1472
- * Possible values:
1473
- *
1474
- * - `"module"` **(default)** ➔ Parse as an ES module.
1475
- * - `"script"` ➔ Parse as a classic script.
1476
- * - `"commonjs"` ➔ Parse using CommonJS semantics.
1477
- *
1478
- * ----------------------------------------------------------------
1479
- *
1480
- * ⚠️ Fallback to default, is invalid input.
1481
- *
1482
- *
1483
- * @default "module"
1484
- *
1485
- */
1486
- sourceType?: acorn.Options["sourceType"];
1487
- /** ----------------------------------------------------------------
1488
- * * ***ECMAScript version used for parsing.***
1489
- * ----------------------------------------------------------------
1490
- *
1491
- * Specifies the ECMAScript syntax version supported by the parser.
1492
- * This determines which language features are recognized during parsing.
1493
- *
1494
- * Examples:
1495
- *
1496
- * - `5` ➔ ES5
1497
- * - `2020` ➔ ES2020
1498
- * - `"latest"` ➔ Latest supported version
1499
- *
1500
- * ----------------------------------------------------------------
1501
- *
1502
- * ⚠️ Invalid values will fallback to the default behavior.
1503
- *
1504
- * @default "latest"
1505
- */
1506
- ecmaVersion?: acorn.ecmaVersion;
1507
- } & BaseOptions<typeof DEFAULT_SJC_PATTERN_POLICY.filesOnly, typeof DEFAULT_SJC_PATTERN_POLICY.forceUnique>;
1508
- /** ----------------------------------------------------------------
1509
- * * ***Strip comments from JavaScript output files.***
1510
- * ----------------------------------------------------------------
1511
- *
1512
- * Scans files matching the provided glob pattern(s) and removes
1513
- * non-essential comments from JavaScript output.
1514
- *
1515
- * The process preserves important comments such as:
1516
- *
1517
- * - `/*! ... *\/` (bang / license comments)
1518
- * - `@license`
1519
- * - `@preserve`
1520
- * - `@copyright`
1521
- * - `@cc_on`
1522
- * - `@__PURE__`
1523
- * - `@__INLINE__`
1524
- * - `@__NOINLINE__`
1525
- * - `@__NO_SIDE_EFFECTS__`
1526
- *
1527
- * unless explicitly overridden by the `@removeDocRuntime` directive.
1528
- *
1529
- * ----------------------------------------------------------------
1530
- *
1531
- * **Supported Features**
1532
- *
1533
- * - Removes regular block comments from compiled JS files.
1534
- * - Optionally removes `sourceMappingURL` comments.
1535
- * - Optionally removes `region` comments such as:
1536
- * - `// #region`
1537
- * - `// #endregion`
1538
- * - Supports runtime directives inside comments:
1539
- * - `@keepDocRuntime`
1540
- * - `@removeDocRuntime`
1541
- *
1542
- * ----------------------------------------------------------------
1543
- *
1544
- * @param pattern - Glob pattern(s) or a set of patterns pointing to
1545
- * files whose comments should be stripped.
1546
- *
1547
- * @param options - Optional configuration controlling how comments
1548
- * are removed.
1549
- *
1550
- * ----------------------------------------------------------------
1551
- *
1552
- * @example
1553
- * ```ts
1554
- * await stripJsComments("dist/**\/*.js");
1555
- * ```
1556
- *
1557
- * @example
1558
- * ```ts
1559
- * await stripJsComments(["dist/**\/*.js", "build/**\/*.mjs"], {
1560
- * removeSourceMap: true,
1561
- * removeRegion: true
1562
- * });
1563
- * ```
1564
- *
1565
- * ----------------------------------------------------------------
1566
- *
1567
- * @removeDocRuntime
1568
- */
1569
- declare const stripJsComments: (pattern: StringCollection, options?: StripJsCommentsOptions) => Promise<void>;
1570
- /** ----------------------------------------------------------------
1571
1420
  * * ***Base Options for `runCommand` or `runCommandCapture`.***
1572
1421
  * ----------------------------------------------------------------
1573
1422
  */
@@ -2189,5 +2038,156 @@ type RunCommandOptions = BaseRunCommandOptions;
2189
2038
  declare function runCommand(command: string, args: readonly string[]): Promise<ChildProcess>;
2190
2039
  declare function runCommand(command: string, options: RunCommandOptions): Promise<ChildProcess>;
2191
2040
  declare function runCommand(command: string, args: readonly string[], options: RunCommandOptions): Promise<ChildProcess>;
2041
+ /** ----------------------------------------------------------------
2042
+ * * ***Default Pattern Policy for **strip js comments** operations.***
2043
+ * ----------------------------------------------------------------
2044
+ *
2045
+ * Defines the runtime behavior for pattern resolution used by:
2046
+ * - {@link stripJsComments | **`strip-js-comments`**}.
2047
+ *
2048
+ * @remarks
2049
+ * - `filesOnly`: Ensures only files are matched.
2050
+ * - `forceUnique`: Deduplicates matched results.
2051
+ */
2052
+ declare const DEFAULT_SJC_PATTERN_POLICY: {
2053
+ readonly filesOnly: true;
2054
+ readonly forceUnique: true;
2055
+ };
2056
+ /** ----------------------------------------------------------------
2057
+ * * ***Resolved Pattern Options for **strip js comments** operations.***
2058
+ * ----------------------------------------------------------------
2059
+ *
2060
+ * Pattern options used by:
2061
+ * - {@link stripJsComments | **`strip-js-comments`**}.
2062
+ */
2063
+ declare const resolvedSjcPatternOption: PatternOptions<true, true>;
2064
+ /** Command identity associated with {@link stripJsComments | **`strip-js-comments`**}. */
2065
+ declare const commandSjcIdentity: CommandIdentity;
2066
+ /** ----------------------------------------------------------------
2067
+ * * ***Configuration options for {@link stripJsComments | `strip-js-comment`}.***
2068
+ * ----------------------------------------------------------------
2069
+ */
2070
+ type StripJsCommentsOptions = {
2071
+ /** ----------------------------------------------------------------
2072
+ * * ***Whether to remove `sourceMappingURL` comments.***
2073
+ * ----------------------------------------------------------------
2074
+ *
2075
+ * @default false
2076
+ */
2077
+ removeSourceMap?: boolean;
2078
+ /** ----------------------------------------------------------------
2079
+ * * ***Whether to remove `region` comments.***
2080
+ * ----------------------------------------------------------------
2081
+ *
2082
+ * @default true
2083
+ */
2084
+ removeRegion?: boolean;
2085
+ /** ----------------------------------------------------------------
2086
+ * * ***Parsing mode used when analyzing JavaScript code.***
2087
+ * ----------------------------------------------------------------
2088
+ *
2089
+ * Determines how the source file should be interpreted by the parser.
2090
+ * This affects strict mode behavior and how `import` / `export`
2091
+ * statements are handled.
2092
+ *
2093
+ *
2094
+ * Possible values:
2095
+ *
2096
+ * - `"module"` **(default)** ➔ Parse as an ES module.
2097
+ * - `"script"` ➔ Parse as a classic script.
2098
+ * - `"commonjs"` ➔ Parse using CommonJS semantics.
2099
+ *
2100
+ * ----------------------------------------------------------------
2101
+ *
2102
+ * ⚠️ Fallback to default, is invalid input.
2103
+ *
2104
+ *
2105
+ * @default "module"
2106
+ *
2107
+ */
2108
+ sourceType?: acorn.Options["sourceType"];
2109
+ /** ----------------------------------------------------------------
2110
+ * * ***ECMAScript version used for parsing.***
2111
+ * ----------------------------------------------------------------
2112
+ *
2113
+ * Specifies the ECMAScript syntax version supported by the parser.
2114
+ * This determines which language features are recognized during parsing.
2115
+ *
2116
+ * Examples:
2117
+ *
2118
+ * - `5` ➔ ES5
2119
+ * - `2020` ➔ ES2020
2120
+ * - `"latest"` ➔ Latest supported version
2121
+ *
2122
+ * ----------------------------------------------------------------
2123
+ *
2124
+ * ⚠️ Invalid values will fallback to the default behavior.
2125
+ *
2126
+ * @default "latest"
2127
+ */
2128
+ ecmaVersion?: acorn.ecmaVersion;
2129
+ } & BaseOptions<typeof DEFAULT_SJC_PATTERN_POLICY.filesOnly, typeof DEFAULT_SJC_PATTERN_POLICY.forceUnique>;
2130
+ /** ----------------------------------------------------------------
2131
+ * * ***Strip comments from JavaScript output files.***
2132
+ * ----------------------------------------------------------------
2133
+ *
2134
+ * Scans files matching the provided glob pattern(s) and removes
2135
+ * non-essential comments from JavaScript output.
2136
+ *
2137
+ * The process preserves important comments such as:
2138
+ *
2139
+ * - `/*! ... *\/` (bang / license comments)
2140
+ * - `@license`
2141
+ * - `@preserve`
2142
+ * - `@copyright`
2143
+ * - `@cc_on`
2144
+ * - `@__PURE__`
2145
+ * - `@__INLINE__`
2146
+ * - `@__NOINLINE__`
2147
+ * - `@__NO_SIDE_EFFECTS__`
2148
+ *
2149
+ * unless explicitly overridden by the `@removeDocRuntime` directive.
2150
+ *
2151
+ * ----------------------------------------------------------------
2152
+ *
2153
+ * **Supported Features**
2154
+ *
2155
+ * - Removes regular block comments from compiled JS files.
2156
+ * - Optionally removes `sourceMappingURL` comments.
2157
+ * - Optionally removes `region` comments such as:
2158
+ * - `// #region`
2159
+ * - `// #endregion`
2160
+ * - Supports runtime directives inside comments:
2161
+ * - `@keepDocRuntime`
2162
+ * - `@removeDocRuntime`
2163
+ *
2164
+ * ----------------------------------------------------------------
2165
+ *
2166
+ * @param pattern - Glob pattern(s) or a set of patterns pointing to
2167
+ * files whose comments should be stripped.
2168
+ *
2169
+ * @param options - Optional configuration controlling how comments
2170
+ * are removed.
2171
+ *
2172
+ * ----------------------------------------------------------------
2173
+ *
2174
+ * @example
2175
+ * ```ts
2176
+ * await stripJsComments("dist/**\/*.js");
2177
+ * ```
2178
+ *
2179
+ * @example
2180
+ * ```ts
2181
+ * await stripJsComments(["dist/**\/*.js", "build/**\/*.mjs"], {
2182
+ * removeSourceMap: true,
2183
+ * removeRegion: true
2184
+ * });
2185
+ * ```
2186
+ *
2187
+ * ----------------------------------------------------------------
2188
+ *
2189
+ * @removeDocRuntime
2190
+ */
2191
+ declare const stripJsComments: (pattern: StringCollection, options?: StripJsCommentsOptions) => Promise<void>;
2192
2192
  export { type BaseOptions, type CleanJsArtifactsOptions, type CleanTypesArtifactsOptions, type Collection, CommandProcessError, type CopyFileToDestOptions, type CopyFileToDestParam, DEFAULT_CLEAN_PATTERN_POLICY, DEFAULT_ECI_PATTERN_POLICY, DEFAULT_EFN_PATTERN_POLICY, DEFAULT_GRI_PATTERN_POLICY, DEFAULT_IB_PATTERN_POLICY, DEFAULT_ID_PATTERN_POLICY, DEFAULT_NJBN_PATTERN_POLICY, DEFAULT_SJC_PATTERN_POLICY, type EnsureCssImportOptions, type EnsureFinalNewlineOptions, type GeneratePackageBannerOptions, type GenerateReferenceOptions, type GetPackageJsonOptions, type InjectBannerOptions, type InjectDirectiveOptions, type InternalOptions, type LogLevel, type LoggingOptions, type NormalizeJsBuildNewlinesOptions, type PatternConfig, type PatternOptions, type RunCommandCaptureOptions, type RunCommandCaptureResult, type RunCommandOptions, type StringCollection, type StripJsCommentsOptions, cleanJsBuildArtifacts, cleanTypesBuildArtifacts, commandCftdIdentity, commandCjbaIdentity, commandCtbaIdentity, commandEciIdentity, commandEfnIdentity, commandGriIdentity, commandIbIdentity, commandIdIdentity, commandNjbnIdentity, commandSjcIdentity, copyFileToDest, createCopyFileToDestParameterSet, ensureCssImport, ensureFinalNewline, generatePackageBanner, generateReferenceIndex, getPackageJson, injectBanner, injectDirective, isCommandProcessError, normalizeJsBuildNewlines, resolvedCleanPatternOption, resolvedEciPatternOption, resolvedEfnPatternOption, resolvedGriPatternOption, resolvedIbPatternOption, resolvedIdPatternOption, resolvedNjbnPatternOption, resolvedSjcPatternOption, runCommand, runCommandCapture, stripJsComments };
2193
2193
  //# sourceMappingURL=index.d.cts.map
package/dist/index.d.ts CHANGED
@@ -2,18 +2,18 @@
2
2
  * ========================================================================
3
3
  * @rzl-zone/build-tools
4
4
  * ------------------------------------------------------------------------
5
- * Version: `0.0.7`
5
+ * Version: `0.0.9`
6
6
  * Author: `Rizalvin Dwiky <rizalvindwiky1998@gmail.com>`
7
7
  * Repository: `https://github.com/rzl-zone/rzl-zone/tree/main/packages/build-tools`
8
8
  * ========================================================================
9
9
  */
10
10
 
11
- import { a as OmitStrict, c as PrettifyOptions, r as DefaultPrettifyOptions, s as Prettify } from "./extra-DY59MRMZ.js";
12
- import { n as generatePackageBanner, r as PackageJson, t as GeneratePackageBannerOptions } from "./index-CNjsgh1e.js";
13
- import { t as CommandIdentity } from "./index-CQatHoCR.js";
14
- import { n as PatternOptions, t as PatternConfig } from "./fast-globe-options-ClsKhWod.js";
15
- import * as acorn from "acorn";
11
+ import { a as OmitStrict, c as PrettifyOptions, r as DefaultPrettifyOptions, s as Prettify } from "./extra-DxvrBev9.js";
12
+ import { n as generatePackageBanner, r as PackageJson, t as GeneratePackageBannerOptions } from "./index-Dvmmz0f_.js";
13
+ import { t as CommandIdentity } from "./index-B1t7Xs3T.js";
14
+ import { n as PatternOptions, t as PatternConfig } from "./fast-globe-options-Cz8KJqKc.js";
16
15
  import { ChildProcess, SpawnOptions, StdioOptions, spawn } from "node:child_process";
16
+ import * as acorn from "acorn";
17
17
 
18
18
  /** ----------------------------------------------------------------
19
19
  * * ***Flexible input type for value collections.***
@@ -1417,157 +1417,6 @@ type NormalizeJsBuildNewlinesOptions = BaseOptions<typeof DEFAULT_NJBN_PATTERN_P
1417
1417
  */
1418
1418
  declare const normalizeJsBuildNewlines: (pattern: StringCollection, options?: NormalizeJsBuildNewlinesOptions) => Promise<void>;
1419
1419
  /** ----------------------------------------------------------------
1420
- * * ***Default Pattern Policy for **strip js comments** operations.***
1421
- * ----------------------------------------------------------------
1422
- *
1423
- * Defines the runtime behavior for pattern resolution used by:
1424
- * - {@link stripJsComments | **`strip-js-comments`**}.
1425
- *
1426
- * @remarks
1427
- * - `filesOnly`: Ensures only files are matched.
1428
- * - `forceUnique`: Deduplicates matched results.
1429
- */
1430
- declare const DEFAULT_SJC_PATTERN_POLICY: {
1431
- readonly filesOnly: true;
1432
- readonly forceUnique: true;
1433
- };
1434
- /** ----------------------------------------------------------------
1435
- * * ***Resolved Pattern Options for **strip js comments** operations.***
1436
- * ----------------------------------------------------------------
1437
- *
1438
- * Pattern options used by:
1439
- * - {@link stripJsComments | **`strip-js-comments`**}.
1440
- */
1441
- declare const resolvedSjcPatternOption: PatternOptions<true, true>;
1442
- /** Command identity associated with {@link stripJsComments | **`strip-js-comments`**}. */
1443
- declare const commandSjcIdentity: CommandIdentity;
1444
- /** ----------------------------------------------------------------
1445
- * * ***Configuration options for {@link stripJsComments | `strip-js-comment`}.***
1446
- * ----------------------------------------------------------------
1447
- */
1448
- type StripJsCommentsOptions = {
1449
- /** ----------------------------------------------------------------
1450
- * * ***Whether to remove `sourceMappingURL` comments.***
1451
- * ----------------------------------------------------------------
1452
- *
1453
- * @default false
1454
- */
1455
- removeSourceMap?: boolean;
1456
- /** ----------------------------------------------------------------
1457
- * * ***Whether to remove `region` comments.***
1458
- * ----------------------------------------------------------------
1459
- *
1460
- * @default true
1461
- */
1462
- removeRegion?: boolean;
1463
- /** ----------------------------------------------------------------
1464
- * * ***Parsing mode used when analyzing JavaScript code.***
1465
- * ----------------------------------------------------------------
1466
- *
1467
- * Determines how the source file should be interpreted by the parser.
1468
- * This affects strict mode behavior and how `import` / `export`
1469
- * statements are handled.
1470
- *
1471
- *
1472
- * Possible values:
1473
- *
1474
- * - `"module"` **(default)** ➔ Parse as an ES module.
1475
- * - `"script"` ➔ Parse as a classic script.
1476
- * - `"commonjs"` ➔ Parse using CommonJS semantics.
1477
- *
1478
- * ----------------------------------------------------------------
1479
- *
1480
- * ⚠️ Fallback to default, is invalid input.
1481
- *
1482
- *
1483
- * @default "module"
1484
- *
1485
- */
1486
- sourceType?: acorn.Options["sourceType"];
1487
- /** ----------------------------------------------------------------
1488
- * * ***ECMAScript version used for parsing.***
1489
- * ----------------------------------------------------------------
1490
- *
1491
- * Specifies the ECMAScript syntax version supported by the parser.
1492
- * This determines which language features are recognized during parsing.
1493
- *
1494
- * Examples:
1495
- *
1496
- * - `5` ➔ ES5
1497
- * - `2020` ➔ ES2020
1498
- * - `"latest"` ➔ Latest supported version
1499
- *
1500
- * ----------------------------------------------------------------
1501
- *
1502
- * ⚠️ Invalid values will fallback to the default behavior.
1503
- *
1504
- * @default "latest"
1505
- */
1506
- ecmaVersion?: acorn.ecmaVersion;
1507
- } & BaseOptions<typeof DEFAULT_SJC_PATTERN_POLICY.filesOnly, typeof DEFAULT_SJC_PATTERN_POLICY.forceUnique>;
1508
- /** ----------------------------------------------------------------
1509
- * * ***Strip comments from JavaScript output files.***
1510
- * ----------------------------------------------------------------
1511
- *
1512
- * Scans files matching the provided glob pattern(s) and removes
1513
- * non-essential comments from JavaScript output.
1514
- *
1515
- * The process preserves important comments such as:
1516
- *
1517
- * - `/*! ... *\/` (bang / license comments)
1518
- * - `@license`
1519
- * - `@preserve`
1520
- * - `@copyright`
1521
- * - `@cc_on`
1522
- * - `@__PURE__`
1523
- * - `@__INLINE__`
1524
- * - `@__NOINLINE__`
1525
- * - `@__NO_SIDE_EFFECTS__`
1526
- *
1527
- * unless explicitly overridden by the `@removeDocRuntime` directive.
1528
- *
1529
- * ----------------------------------------------------------------
1530
- *
1531
- * **Supported Features**
1532
- *
1533
- * - Removes regular block comments from compiled JS files.
1534
- * - Optionally removes `sourceMappingURL` comments.
1535
- * - Optionally removes `region` comments such as:
1536
- * - `// #region`
1537
- * - `// #endregion`
1538
- * - Supports runtime directives inside comments:
1539
- * - `@keepDocRuntime`
1540
- * - `@removeDocRuntime`
1541
- *
1542
- * ----------------------------------------------------------------
1543
- *
1544
- * @param pattern - Glob pattern(s) or a set of patterns pointing to
1545
- * files whose comments should be stripped.
1546
- *
1547
- * @param options - Optional configuration controlling how comments
1548
- * are removed.
1549
- *
1550
- * ----------------------------------------------------------------
1551
- *
1552
- * @example
1553
- * ```ts
1554
- * await stripJsComments("dist/**\/*.js");
1555
- * ```
1556
- *
1557
- * @example
1558
- * ```ts
1559
- * await stripJsComments(["dist/**\/*.js", "build/**\/*.mjs"], {
1560
- * removeSourceMap: true,
1561
- * removeRegion: true
1562
- * });
1563
- * ```
1564
- *
1565
- * ----------------------------------------------------------------
1566
- *
1567
- * @removeDocRuntime
1568
- */
1569
- declare const stripJsComments: (pattern: StringCollection, options?: StripJsCommentsOptions) => Promise<void>;
1570
- /** ----------------------------------------------------------------
1571
1420
  * * ***Base Options for `runCommand` or `runCommandCapture`.***
1572
1421
  * ----------------------------------------------------------------
1573
1422
  */
@@ -2189,5 +2038,156 @@ type RunCommandOptions = BaseRunCommandOptions;
2189
2038
  declare function runCommand(command: string, args: readonly string[]): Promise<ChildProcess>;
2190
2039
  declare function runCommand(command: string, options: RunCommandOptions): Promise<ChildProcess>;
2191
2040
  declare function runCommand(command: string, args: readonly string[], options: RunCommandOptions): Promise<ChildProcess>;
2041
+ /** ----------------------------------------------------------------
2042
+ * * ***Default Pattern Policy for **strip js comments** operations.***
2043
+ * ----------------------------------------------------------------
2044
+ *
2045
+ * Defines the runtime behavior for pattern resolution used by:
2046
+ * - {@link stripJsComments | **`strip-js-comments`**}.
2047
+ *
2048
+ * @remarks
2049
+ * - `filesOnly`: Ensures only files are matched.
2050
+ * - `forceUnique`: Deduplicates matched results.
2051
+ */
2052
+ declare const DEFAULT_SJC_PATTERN_POLICY: {
2053
+ readonly filesOnly: true;
2054
+ readonly forceUnique: true;
2055
+ };
2056
+ /** ----------------------------------------------------------------
2057
+ * * ***Resolved Pattern Options for **strip js comments** operations.***
2058
+ * ----------------------------------------------------------------
2059
+ *
2060
+ * Pattern options used by:
2061
+ * - {@link stripJsComments | **`strip-js-comments`**}.
2062
+ */
2063
+ declare const resolvedSjcPatternOption: PatternOptions<true, true>;
2064
+ /** Command identity associated with {@link stripJsComments | **`strip-js-comments`**}. */
2065
+ declare const commandSjcIdentity: CommandIdentity;
2066
+ /** ----------------------------------------------------------------
2067
+ * * ***Configuration options for {@link stripJsComments | `strip-js-comment`}.***
2068
+ * ----------------------------------------------------------------
2069
+ */
2070
+ type StripJsCommentsOptions = {
2071
+ /** ----------------------------------------------------------------
2072
+ * * ***Whether to remove `sourceMappingURL` comments.***
2073
+ * ----------------------------------------------------------------
2074
+ *
2075
+ * @default false
2076
+ */
2077
+ removeSourceMap?: boolean;
2078
+ /** ----------------------------------------------------------------
2079
+ * * ***Whether to remove `region` comments.***
2080
+ * ----------------------------------------------------------------
2081
+ *
2082
+ * @default true
2083
+ */
2084
+ removeRegion?: boolean;
2085
+ /** ----------------------------------------------------------------
2086
+ * * ***Parsing mode used when analyzing JavaScript code.***
2087
+ * ----------------------------------------------------------------
2088
+ *
2089
+ * Determines how the source file should be interpreted by the parser.
2090
+ * This affects strict mode behavior and how `import` / `export`
2091
+ * statements are handled.
2092
+ *
2093
+ *
2094
+ * Possible values:
2095
+ *
2096
+ * - `"module"` **(default)** ➔ Parse as an ES module.
2097
+ * - `"script"` ➔ Parse as a classic script.
2098
+ * - `"commonjs"` ➔ Parse using CommonJS semantics.
2099
+ *
2100
+ * ----------------------------------------------------------------
2101
+ *
2102
+ * ⚠️ Fallback to default, is invalid input.
2103
+ *
2104
+ *
2105
+ * @default "module"
2106
+ *
2107
+ */
2108
+ sourceType?: acorn.Options["sourceType"];
2109
+ /** ----------------------------------------------------------------
2110
+ * * ***ECMAScript version used for parsing.***
2111
+ * ----------------------------------------------------------------
2112
+ *
2113
+ * Specifies the ECMAScript syntax version supported by the parser.
2114
+ * This determines which language features are recognized during parsing.
2115
+ *
2116
+ * Examples:
2117
+ *
2118
+ * - `5` ➔ ES5
2119
+ * - `2020` ➔ ES2020
2120
+ * - `"latest"` ➔ Latest supported version
2121
+ *
2122
+ * ----------------------------------------------------------------
2123
+ *
2124
+ * ⚠️ Invalid values will fallback to the default behavior.
2125
+ *
2126
+ * @default "latest"
2127
+ */
2128
+ ecmaVersion?: acorn.ecmaVersion;
2129
+ } & BaseOptions<typeof DEFAULT_SJC_PATTERN_POLICY.filesOnly, typeof DEFAULT_SJC_PATTERN_POLICY.forceUnique>;
2130
+ /** ----------------------------------------------------------------
2131
+ * * ***Strip comments from JavaScript output files.***
2132
+ * ----------------------------------------------------------------
2133
+ *
2134
+ * Scans files matching the provided glob pattern(s) and removes
2135
+ * non-essential comments from JavaScript output.
2136
+ *
2137
+ * The process preserves important comments such as:
2138
+ *
2139
+ * - `/*! ... *\/` (bang / license comments)
2140
+ * - `@license`
2141
+ * - `@preserve`
2142
+ * - `@copyright`
2143
+ * - `@cc_on`
2144
+ * - `@__PURE__`
2145
+ * - `@__INLINE__`
2146
+ * - `@__NOINLINE__`
2147
+ * - `@__NO_SIDE_EFFECTS__`
2148
+ *
2149
+ * unless explicitly overridden by the `@removeDocRuntime` directive.
2150
+ *
2151
+ * ----------------------------------------------------------------
2152
+ *
2153
+ * **Supported Features**
2154
+ *
2155
+ * - Removes regular block comments from compiled JS files.
2156
+ * - Optionally removes `sourceMappingURL` comments.
2157
+ * - Optionally removes `region` comments such as:
2158
+ * - `// #region`
2159
+ * - `// #endregion`
2160
+ * - Supports runtime directives inside comments:
2161
+ * - `@keepDocRuntime`
2162
+ * - `@removeDocRuntime`
2163
+ *
2164
+ * ----------------------------------------------------------------
2165
+ *
2166
+ * @param pattern - Glob pattern(s) or a set of patterns pointing to
2167
+ * files whose comments should be stripped.
2168
+ *
2169
+ * @param options - Optional configuration controlling how comments
2170
+ * are removed.
2171
+ *
2172
+ * ----------------------------------------------------------------
2173
+ *
2174
+ * @example
2175
+ * ```ts
2176
+ * await stripJsComments("dist/**\/*.js");
2177
+ * ```
2178
+ *
2179
+ * @example
2180
+ * ```ts
2181
+ * await stripJsComments(["dist/**\/*.js", "build/**\/*.mjs"], {
2182
+ * removeSourceMap: true,
2183
+ * removeRegion: true
2184
+ * });
2185
+ * ```
2186
+ *
2187
+ * ----------------------------------------------------------------
2188
+ *
2189
+ * @removeDocRuntime
2190
+ */
2191
+ declare const stripJsComments: (pattern: StringCollection, options?: StripJsCommentsOptions) => Promise<void>;
2192
2192
  export { type BaseOptions, type CleanJsArtifactsOptions, type CleanTypesArtifactsOptions, type Collection, CommandProcessError, type CopyFileToDestOptions, type CopyFileToDestParam, DEFAULT_CLEAN_PATTERN_POLICY, DEFAULT_ECI_PATTERN_POLICY, DEFAULT_EFN_PATTERN_POLICY, DEFAULT_GRI_PATTERN_POLICY, DEFAULT_IB_PATTERN_POLICY, DEFAULT_ID_PATTERN_POLICY, DEFAULT_NJBN_PATTERN_POLICY, DEFAULT_SJC_PATTERN_POLICY, type EnsureCssImportOptions, type EnsureFinalNewlineOptions, type GeneratePackageBannerOptions, type GenerateReferenceOptions, type GetPackageJsonOptions, type InjectBannerOptions, type InjectDirectiveOptions, type InternalOptions, type LogLevel, type LoggingOptions, type NormalizeJsBuildNewlinesOptions, type PatternConfig, type PatternOptions, type RunCommandCaptureOptions, type RunCommandCaptureResult, type RunCommandOptions, type StringCollection, type StripJsCommentsOptions, cleanJsBuildArtifacts, cleanTypesBuildArtifacts, commandCftdIdentity, commandCjbaIdentity, commandCtbaIdentity, commandEciIdentity, commandEfnIdentity, commandGriIdentity, commandIbIdentity, commandIdIdentity, commandNjbnIdentity, commandSjcIdentity, copyFileToDest, createCopyFileToDestParameterSet, ensureCssImport, ensureFinalNewline, generatePackageBanner, generateReferenceIndex, getPackageJson, injectBanner, injectDirective, isCommandProcessError, normalizeJsBuildNewlines, resolvedCleanPatternOption, resolvedEciPatternOption, resolvedEfnPatternOption, resolvedGriPatternOption, resolvedIbPatternOption, resolvedIdPatternOption, resolvedNjbnPatternOption, resolvedSjcPatternOption, runCommand, runCommandCapture, stripJsComments };
2193
2193
  //# sourceMappingURL=index.d.ts.map