@rzl-zone/build-tools 0.0.11 → 0.0.12
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 +4 -4
- 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 +9 -9
- 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 +3 -3
- 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 +75 -0
- package/dist/client-B-L0njjX.js.map +1 -0
- package/dist/client-BxJj_VrQ.cjs +81 -0
- package/dist/client-BxJj_VrQ.cjs.map +1 -0
- package/dist/commander-kit/index.cjs +84 -65
- 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 +24 -5
- package/dist/commander-kit/index.js.map +1 -1
- package/dist/{extra-BleSbKJp.d.ts → extra-CNDyFVA8.d.ts} +2 -2
- package/dist/{extra-C8r3KWjP.d.cts → extra-CtuOwfZ4.d.cts} +2 -2
- package/dist/{fast-globe-options-DnV58KJc.d.ts → fast-globe-options-Dj630IVV.d.ts} +3 -3
- package/dist/{fast-globe-options-D7S2fQZZ.d.cts → fast-globe-options-NcQT6Fg5.d.cts} +3 -3
- package/dist/{helper-C0AShk-j.js → formatter-Bd8fVs2h.js} +88 -3
- package/dist/formatter-Bd8fVs2h.js.map +1 -0
- package/dist/{helper-DNj9Sj4w.cjs → formatter-DEp7VUev.cjs} +142 -14
- package/dist/formatter-DEp7VUev.cjs.map +1 -0
- package/dist/{identity-CcYkvy9q.js → identity-BaFHc-2R.js} +5 -6
- package/dist/{identity-CcYkvy9q.js.map → identity-BaFHc-2R.js.map} +1 -1
- package/dist/{identity-Crq3bzhv.cjs → identity-C9ff_g77.cjs} +14 -15
- package/dist/{identity-Crq3bzhv.cjs.map → identity-C9ff_g77.cjs.map} +1 -1
- package/dist/{index-DlH2PDPD.d.cts → index-BXqEWtZV.d.cts} +2 -2
- package/dist/{index-BdtMQyzF.d.cts → index-DgaO182z.d.cts} +2 -2
- package/dist/{index-CwHGSras.d.ts → index-qpwsLgqK.d.ts} +2 -2
- package/dist/{index-NLQcJJFO.d.ts → index-uMbOxPvL.d.ts} +2 -2
- package/dist/index.cjs +221 -274
- 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 -58
- package/dist/index.js.map +1 -1
- package/dist/{package-banner-DkNDAjMK.js → package-banner-Bk5L__8h.js} +4 -5
- package/dist/{package-banner-DkNDAjMK.js.map → package-banner-Bk5L__8h.js.map} +1 -1
- package/dist/package-banner-Pjznq5SP.cjs +59 -0
- package/dist/{package-banner-BoS7Lbi9.cjs.map → package-banner-Pjznq5SP.cjs.map} +1 -1
- package/dist/server-BsqxhpCl.js +198 -0
- package/dist/server-BsqxhpCl.js.map +1 -0
- package/dist/server-CyO1Pxp8.cjs +255 -0
- package/dist/server-CyO1Pxp8.cjs.map +1 -0
- package/dist/utils/client.cjs +12 -11
- package/dist/utils/client.d.cts +1 -1
- package/dist/utils/client.d.ts +1 -1
- package/dist/utils/client.js +3 -2
- package/dist/utils/server.cjs +5 -2
- package/dist/utils/server.d.cts +433 -3
- package/dist/utils/server.d.ts +433 -3
- package/dist/utils/server.js +3 -3
- package/package.json +6 -4
- package/dist/client-CuivP4z0.cjs +0 -221
- package/dist/client-CuivP4z0.cjs.map +0 -1
- package/dist/client-DzeqTq6Y.js +0 -160
- package/dist/client-DzeqTq6Y.js.map +0 -1
- package/dist/helper-C0AShk-j.js.map +0 -1
- package/dist/helper-DNj9Sj4w.cjs.map +0 -1
- package/dist/package-banner-BoS7Lbi9.cjs +0 -60
- package/dist/server-CvLC0e2m.cjs +0 -181
- package/dist/server-CvLC0e2m.cjs.map +0 -1
- package/dist/server-Dc93jndm.js +0 -142
- package/dist/server-Dc93jndm.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
* ========================================================================
|
|
3
3
|
* @rzl-zone/build-tools
|
|
4
4
|
* ------------------------------------------------------------------------
|
|
5
|
-
* Version: `0.0.
|
|
5
|
+
* Version: `0.0.12`
|
|
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-
|
|
12
|
-
import { n as generatePackageBanner, r as PackageJson, t as GeneratePackageBannerOptions } from "./index-
|
|
13
|
-
import { t as CommandIdentity } from "./index-
|
|
14
|
-
import { n as PatternOptions, t as PatternConfig } from "./fast-globe-options-
|
|
11
|
+
import { a as OmitStrict, c as PrettifyOptions, r as DefaultPrettifyOptions, s as Prettify } from "./extra-CtuOwfZ4.cjs";
|
|
12
|
+
import { n as generatePackageBanner, r as PackageJson, t as GeneratePackageBannerOptions } from "./index-BXqEWtZV.cjs";
|
|
13
|
+
import { t as CommandIdentity } from "./index-DgaO182z.cjs";
|
|
14
|
+
import { n as PatternOptions, t as PatternConfig } from "./fast-globe-options-NcQT6Fg5.cjs";
|
|
15
15
|
import { ChildProcess, SpawnOptions, StdioOptions } from "node:child_process";
|
|
16
16
|
import * as acorn from "acorn";
|
|
17
17
|
|
package/dist/index.d.ts
CHANGED
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
* ========================================================================
|
|
3
3
|
* @rzl-zone/build-tools
|
|
4
4
|
* ------------------------------------------------------------------------
|
|
5
|
-
* Version: `0.0.
|
|
5
|
+
* Version: `0.0.12`
|
|
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-
|
|
12
|
-
import { n as generatePackageBanner, r as PackageJson, t as GeneratePackageBannerOptions } from "./index-
|
|
13
|
-
import { t as CommandIdentity } from "./index-
|
|
14
|
-
import { n as PatternOptions, t as PatternConfig } from "./fast-globe-options-
|
|
11
|
+
import { a as OmitStrict, c as PrettifyOptions, r as DefaultPrettifyOptions, s as Prettify } from "./extra-CNDyFVA8.js";
|
|
12
|
+
import { n as generatePackageBanner, r as PackageJson, t as GeneratePackageBannerOptions } from "./index-qpwsLgqK.js";
|
|
13
|
+
import { t as CommandIdentity } from "./index-uMbOxPvL.js";
|
|
14
|
+
import { n as PatternOptions, t as PatternConfig } from "./fast-globe-options-Dj630IVV.js";
|
|
15
15
|
import { ChildProcess, SpawnOptions, StdioOptions, spawn } from "node:child_process";
|
|
16
16
|
import * as acorn from "acorn";
|
|
17
17
|
|
package/dist/index.js
CHANGED
|
@@ -2,17 +2,16 @@
|
|
|
2
2
|
* ========================================================================
|
|
3
3
|
* @rzl-zone/build-tools
|
|
4
4
|
* ------------------------------------------------------------------------
|
|
5
|
-
* Version: `0.0.
|
|
5
|
+
* Version: `0.0.12`
|
|
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 { S as
|
|
12
|
-
import {
|
|
13
|
-
import { t as CommandIdentity } from "./identity-
|
|
14
|
-
import {
|
|
15
|
-
import { n as getPackageJson, t as generatePackageBanner } from "./package-banner-DkNDAjMK.js";
|
|
11
|
+
import { C as isString, E as safeStableStringify, O as toObjectSet, S as isSet, _ as isNonEmptyString, b as isPlainObject, c as picocolors, d as flattenStrings, f as isArray, i as joinInline, k as toStringSet, l as plural, o as joinLinesLoose, p as isBoolean, r as formatOptionValue, t as EOL, w as isUndefined, x as isRegExp, y as isNumber } from "./formatter-Bd8fVs2h.js";
|
|
12
|
+
import { c as resolvePatternOptions, i as sourceOf, l as sourceOfPatternOptions, n as fsExtra, r as BUILD_LOGGER, s as defaultPatternOptions, t as fastGlob } from "./server-BsqxhpCl.js";
|
|
13
|
+
import { t as CommandIdentity } from "./identity-BaFHc-2R.js";
|
|
14
|
+
import { n as getPackageJson, t as generatePackageBanner } from "./package-banner-Bk5L__8h.js";
|
|
16
15
|
import "@rzl-zone/node-only";
|
|
17
16
|
import * as t from "@babel/types";
|
|
18
17
|
import { parse } from "@babel/parser";
|
|
@@ -187,58 +186,6 @@ function stripUseStrict(content, { trimStart = true, trimEnd = false } = {}) {
|
|
|
187
186
|
if (trimEnd) result.trimEnd();
|
|
188
187
|
return result;
|
|
189
188
|
}
|
|
190
|
-
const sourceOf = (value, defaultValue) => {
|
|
191
|
-
return Object.is(value, defaultValue) ? "default" : "overridden";
|
|
192
|
-
};
|
|
193
|
-
const BUILD_LOGGER = {
|
|
194
|
-
SOURCE_OF: sourceOf,
|
|
195
|
-
OPTIONS(label, value, source, isRequired) {
|
|
196
|
-
const sourceLabel = !isRequired && source ? source === "default" ? picocolors.blueBright(` (${source})`) : picocolors.yellowBright(` (${source})`) : "";
|
|
197
|
-
console.log(picocolors.dim(" - ") + normalizeSpaces(picocolors.bold(label || "`⚠️ Label Unset!!!`") + picocolors.dim(": ") + formatOptionValue(value) + picocolors.italic(sourceLabel)));
|
|
198
|
-
},
|
|
199
|
-
SECTION(title, options = {}) {
|
|
200
|
-
const { icon = ICONS.config, indent = "" } = options;
|
|
201
|
-
console.log(picocolors.bold(`${indent}${picocolors.whiteBright(icon)} ${picocolors.underline(picocolors.cyanBright(title || "`⚠️ Unset Title!!!`"))}:`));
|
|
202
|
-
},
|
|
203
|
-
NEW_LINE(value = "") {
|
|
204
|
-
return console.log(value);
|
|
205
|
-
},
|
|
206
|
-
ON_STARTING: (options) => {
|
|
207
|
-
const { actionName, textDirectAction = "to" } = options;
|
|
208
|
-
console.log(picocolors.bold(`${picocolors.whiteBright(ICONS.start)} ${picocolors.cyanBright("Starting")} ${normalizeSpaces(`${textDirectAction} ${picocolors.underline(picocolors.blueBright(actionName))}`)}.`));
|
|
209
|
-
},
|
|
210
|
-
ON_FINISH: (options) => {
|
|
211
|
-
const { actionName, count, typeCount = "file", progress, textSuccess = "Success" } = options;
|
|
212
|
-
console.log(picocolors.bold(`${picocolors.greenBright(ICONS.success)} ${picocolors.greenBright(textSuccess)} ${normalizeSpaces(`${picocolors.underline(picocolors.blueBright(actionName))} (${picocolors.yellowBright(`${isNonEmptyString(progress) ? progress : count} ${typeCount}${count > 1 ? "(s)" : ""}`)}`)}).`));
|
|
213
|
-
},
|
|
214
|
-
ON_SKIPPING: (options) => {
|
|
215
|
-
const { actionName, reasonEndText, reasonSkipAction = "nothing left", reasonTitle = "because", reasonType = "files", textDirectAction = "to" } = options;
|
|
216
|
-
console.log(picocolors.bold(`${picocolors.yellowBright(ICONS.warn)} ${picocolors.yellowBright("Skipping")} ${normalizeSpaces(`${picocolors.underline(picocolors.blueBright(actionName))} ${picocolors.white(reasonTitle)} ${picocolors.redBright(reasonSkipAction)} ${reasonType} ${textDirectAction} ${picocolors.redBright(reasonEndText)}`)}.`));
|
|
217
|
-
},
|
|
218
|
-
ON_ERROR: (options) => {
|
|
219
|
-
const { actionName, textDirectAction = "to", error } = options;
|
|
220
|
-
const errorMsg = isError(error) ? error.message : "Something went wrong";
|
|
221
|
-
console.error(picocolors.bold(`${picocolors.redBright(ICONS.error)} ${picocolors.redBright("Error")} ${normalizeSpaces(`${textDirectAction} ${picocolors.underline(picocolors.blueBright(actionName))},`)} ${joinLines("because: ", "", ` ${picocolors.bold(picocolors.red(ICONS.arrowRight))} ${picocolors.inverse(picocolors.red(normalizeSpaces(errorMsg)))}`)}`));
|
|
222
|
-
},
|
|
223
|
-
ON_PROCESS: (options) => {
|
|
224
|
-
const { actionName, count, nameDirect, textDirectFolder = "in" } = options;
|
|
225
|
-
console.log(`${picocolors.bold(" " + picocolors.whiteBright(ICONS.bullet))} ${picocolors.italic(`${picocolors.white(count + ".")} ${normalizeSpaces(`${picocolors.white(actionName)} ${picocolors.magentaBright(textDirectFolder)} ${picocolors.bold(picocolors.underline(picocolors.blue(nameDirect)))}.`)}`)}`);
|
|
226
|
-
},
|
|
227
|
-
ON_PROCESS_COPY: (options) => {
|
|
228
|
-
const { actionName, count, copyTo, copyFrom, textFrom = "from", textArrow = "➔" } = options;
|
|
229
|
-
console.log(`${picocolors.bold(" " + picocolors.whiteBright(ICONS.bullet))} ${picocolors.italic(`${picocolors.white(count + ".")} ${normalizeSpaces(`${picocolors.white(actionName)} ${picocolors.yellow(textFrom)} '${picocolors.bold(picocolors.underline(picocolors.cyanBright(copyFrom)))}' ${picocolors.bold(picocolors.gray(textArrow))} '${picocolors.bold(picocolors.underline(picocolors.cyanBright(copyTo)))}'.`)}`)}`);
|
|
230
|
-
},
|
|
231
|
-
ON_PROCESS_COPY_ERROR: (options) => {
|
|
232
|
-
const { actionName, count, errorReason, copyFrom, index, indexKey, textFrom = "from", textReason = "because" } = options;
|
|
233
|
-
const errorReasonText = isError(errorReason) ? errorReason.message : String(errorReason);
|
|
234
|
-
const atIndexText = isNumber(index) ? picocolors.blueBright(` (at${isNonEmptyString(indexKey) ? ` '${indexKey}' ` : " "}index: ${picocolors.magentaBright(index)}) `) : " ";
|
|
235
|
-
console.log(`${picocolors.bold(" " + picocolors.whiteBright(ICONS.bullet))} ${picocolors.italic(`${picocolors.white(count + ".")} ${normalizeSpaces(`${picocolors.redBright(actionName)} ${picocolors.yellow(textFrom)} '${picocolors.bold(picocolors.underline(picocolors.cyanBright(copyFrom)))}'${atIndexText}${picocolors.bold(picocolors.gray(textReason))} ${picocolors.redBright(errorReasonText)}.`)}`)}`);
|
|
236
|
-
},
|
|
237
|
-
ON_PROCESS_REFERENCING: (options) => {
|
|
238
|
-
const { actionName, count, referenceTo, referenceFrom, textFrom = "from", textArrow = "➔" } = options;
|
|
239
|
-
console.log(`${picocolors.bold(" " + picocolors.whiteBright(ICONS.bullet))} ${picocolors.italic(`${picocolors.white(count + ".")} ${normalizeSpaces(`${picocolors.white(actionName)} ${picocolors.magentaBright(textFrom)} ${picocolors.bold(picocolors.underline(picocolors.cyanBright(referenceFrom)))} ${picocolors.bold(picocolors.gray(textArrow))} ${picocolors.bold(picocolors.underline(picocolors.blueBright(referenceTo)))}.`)}`)}`);
|
|
240
|
-
}
|
|
241
|
-
};
|
|
242
189
|
function stripLineArtifacts(line, options) {
|
|
243
190
|
let out = line.replace(/^[ \t]*\/\/\s*(?:\.\.\/|\.\/)*[^ \n]*?(?:src|node_modules)\/[^\n]*\n?/gm, "").replace(/\/\/\s*eslint[^\n]*/g, "");
|
|
244
191
|
if (options.removeSourceMap) out = out.replace(/^[ \t]*\/\/[#@]\s*sourceMappingURL\s*=\s*\S+/gm, "");
|