@introspection-ai/recipes 0.56.0 → 0.57.0
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/batch/shards.d.ts +1 -1
- package/dist/batch/shards.d.ts.map +1 -1
- package/dist/batch/shards.js +3 -3
- package/dist/batch/shards.js.map +1 -1
- package/dist/child/agent.d.ts.map +1 -1
- package/dist/child/agent.js +6 -5
- package/dist/child/agent.js.map +1 -1
- package/dist/child/session.d.ts +1 -0
- package/dist/child/session.d.ts.map +1 -1
- package/dist/child/session.js +9 -6
- package/dist/child/session.js.map +1 -1
- package/dist/mcp/daemon/server.d.ts +0 -2
- package/dist/mcp/daemon/server.d.ts.map +1 -1
- package/dist/mcp/daemon/server.js +1 -1
- package/dist/mcp/daemon/server.js.map +1 -1
- package/dist/mcp-chunks/{auth-command-PZLSOYAT.js → auth-command-WE7QY6RH.js} +27 -27
- package/dist/mcp-chunks/call-arguments-2ABANGLE.js +16 -0
- package/dist/mcp-chunks/{call-command-VILJIFYG.js → call-command-OOBUGVTM.js} +56 -70
- package/dist/mcp-chunks/{chunk-N2U2FODH.js → chunk-2PTK6KBV.js} +4 -4
- package/dist/mcp-chunks/{chunk-F2X4Y2TQ.js → chunk-2R2HWX2E.js} +1 -1
- package/dist/mcp-chunks/{chunk-ORJND4AI.js → chunk-2R7UGABC.js} +70 -70
- package/dist/mcp-chunks/{chunk-US63Y6XE.js → chunk-32UZRZIL.js} +1 -1
- package/dist/mcp-chunks/{chunk-THRMUZZD.js → chunk-37VJZIFW.js} +8 -8
- package/dist/mcp-chunks/{chunk-5Z6WSV5D.js → chunk-3KSDZBUJ.js} +5 -5
- package/dist/mcp-chunks/{chunk-JTPTAO4M.js → chunk-44KI6DPL.js} +24 -15
- package/dist/mcp-chunks/{chunk-BHXCAVFP.js → chunk-4ACA5GWL.js} +1 -1
- package/dist/mcp-chunks/{chunk-E76ZUBOJ.js → chunk-4NABHXDS.js} +4 -4
- package/dist/mcp-chunks/{chunk-AJDK5Z7O.js → chunk-4SO2DY7F.js} +2 -3
- package/dist/mcp-chunks/{chunk-I6UFV7RW.js → chunk-5ZQKSEUN.js} +1 -1
- package/dist/mcp-chunks/{chunk-KZGUH7E2.js → chunk-73TMUGJL.js} +2039 -1148
- package/dist/mcp-chunks/{chunk-UVRJ3AAD.js → chunk-7KOGD2JK.js} +2 -2
- package/dist/mcp-chunks/{chunk-KJ5FPQF6.js → chunk-7SQZWTDU.js} +30 -26
- package/dist/mcp-chunks/{chunk-MYAMG6VL.js → chunk-ABPXAKP7.js} +89 -28
- package/dist/mcp-chunks/{chunk-2YV72LUA.js → chunk-AIUZOMBB.js} +12 -12
- package/dist/mcp-chunks/{chunk-V42T3QNK.js → chunk-BI6L3SYV.js} +9 -9
- package/dist/mcp-chunks/{chunk-757ZF552.js → chunk-CFRA424Y.js} +4 -4
- package/dist/mcp-chunks/{chunk-DU4SDPEV.js → chunk-CIQX62WO.js} +2 -2
- package/dist/mcp-chunks/{chunk-MHUMLEBO.js → chunk-CWM4RO33.js} +1 -1
- package/dist/mcp-chunks/{chunk-TUPFPO4L.js → chunk-DEYGZRBD.js} +5 -5
- package/dist/mcp-chunks/{chunk-3SXP4S2A.js → chunk-DL3GVI4M.js} +2 -2
- package/dist/mcp-chunks/{chunk-O7SIXJM6.js → chunk-EUHXZKP2.js} +108 -108
- package/dist/mcp-chunks/{chunk-H5PBSJP3.js → chunk-EV3SP7ME.js} +1 -1
- package/dist/mcp-chunks/chunk-EVEVCVYR.js +42 -0
- package/dist/mcp-chunks/{chunk-RUF27IUF.js → chunk-FDVES4CU.js} +2 -2
- package/dist/mcp-chunks/{chunk-L2MSWQDL.js → chunk-FJNWUAGR.js} +1 -1
- package/dist/mcp-chunks/{chunk-IWCVZ46B.js → chunk-G5DK4L6M.js} +2 -2
- package/dist/mcp-chunks/{chunk-3ETUDW7N.js → chunk-GQM53HF7.js} +1 -1
- package/dist/mcp-chunks/{chunk-2AKSS7WR.js → chunk-H44A4G2O.js} +2 -2
- package/dist/mcp-chunks/{chunk-WDWSA7RL.js → chunk-HGEKP2E5.js} +4 -4
- package/dist/mcp-chunks/{chunk-ELHS763C.js → chunk-HKMH4N3Z.js} +1 -1
- package/dist/mcp-chunks/{chunk-GZ53GNFP.js → chunk-HPFIAALB.js} +13 -10
- package/dist/mcp-chunks/chunk-KUJUYFDC.js +224 -0
- package/dist/mcp-chunks/{chunk-OIK5AH2S.js → chunk-MG6EVYIM.js} +41 -19
- package/dist/mcp-chunks/{chunk-QNXOIF5U.js → chunk-MSPGQEWX.js} +12 -12
- package/dist/mcp-chunks/{chunk-JEHI2YU4.js → chunk-MW3YO24Q.js} +3 -3
- package/dist/mcp-chunks/{chunk-WQL7FJQ3.js → chunk-NJR33E7V.js} +4 -4
- package/dist/mcp-chunks/{chunk-7U5NSQ5T.js → chunk-OSK2JGFH.js} +2 -2
- package/dist/mcp-chunks/{chunk-ZEA3Y5ZD.js → chunk-QHD5RXW4.js} +7 -7
- package/dist/mcp-chunks/{chunk-TC2JPBFB.js → chunk-QYR3UKJS.js} +7 -4
- package/dist/mcp-chunks/{chunk-3FRLDHVD.js → chunk-SYBDN4SV.js} +5 -5
- package/dist/mcp-chunks/{chunk-3P3KGT4H.js → chunk-TQ5T5VO7.js} +2 -2
- package/dist/mcp-chunks/{chunk-OWGTNJNR.js → chunk-TT3LOCMN.js} +2 -2
- package/dist/mcp-chunks/{chunk-3LENTPGE.js → chunk-TTVO6RCP.js} +2 -2
- package/dist/mcp-chunks/{chunk-IRSL7JRH.js → chunk-UY2QWZB3.js} +53 -49
- package/dist/mcp-chunks/{chunk-B6S43WID.js → chunk-VJ45Y5IO.js} +1 -1
- package/dist/mcp-chunks/{chunk-IRARVOUM.js → chunk-VJ5VDK6D.js} +1 -1
- package/dist/mcp-chunks/{chunk-6O42UGLI.js → chunk-VLJQSE6L.js} +9 -9
- package/dist/mcp-chunks/{chunk-HNQSUT44.js → chunk-W47YAN6W.js} +3 -3
- package/dist/mcp-chunks/{chunk-66VSGFXA.js → chunk-XU4D5QN2.js} +1 -1
- package/dist/mcp-chunks/{chunk-CXST5CVH.js → chunk-Y7JQJ352.js} +22 -18
- package/dist/mcp-chunks/{chunk-3HSC6NHZ.js → chunk-Y7UTXETL.js} +1 -1
- package/dist/mcp-chunks/{chunk-O3RTM5HD.js → chunk-YFPPHEDE.js} +1 -1
- package/dist/mcp-chunks/{chunk-N6YUOYDS.js → chunk-YGT57XUN.js} +2 -2
- package/dist/mcp-chunks/{chunk-BUOGKTKK.js → chunk-Z43KJRXY.js} +1 -1
- package/dist/mcp-chunks/{chunk-6P3KAQ5N.js → chunk-Z5XOB522.js} +1 -1
- package/dist/mcp-chunks/{chunk-63L6SHK3.js → chunk-ZEMVGFKG.js} +2 -2
- package/dist/mcp-chunks/{chunk-MEQXX43K.js → chunk-ZJZ53NIB.js} +1 -1
- package/dist/mcp-chunks/{cli-UQ5QXFXU.js → cli-TJFAYJO4.js} +81 -283
- package/dist/mcp-chunks/client-LDKUW5K5.js +32 -0
- package/dist/mcp-chunks/{config-command-ZSPJI34E.js → config-command-YGNK2VVL.js} +29 -29
- package/dist/mcp-chunks/daemon-command-UYAYRHVD.js +36 -0
- package/dist/mcp-chunks/dist-5JNZD3JV.js +69 -0
- package/dist/mcp-chunks/{dist-Q7WSCBBK.js → dist-IFOLXE2R.js} +351 -1305
- package/dist/mcp-chunks/{emit-ts-command-SY4LQE4S.js → emit-ts-command-4EVF6CIG.js} +28 -25
- package/dist/mcp-chunks/{generate-cli-runner-LQBBQ7F5.js → generate-cli-runner-UFVSXJVK.js} +58 -49
- package/dist/mcp-chunks/generated-daemon-runtime-LTH36X2R.js +32 -0
- package/dist/mcp-chunks/{inspect-cli-command-JPX4ON6N.js → inspect-cli-command-L3JGLLTG.js} +11 -11
- package/dist/mcp-chunks/{launch-UG7IH27P.js → launch-LUKDWKH4.js} +1 -1
- package/dist/mcp-chunks/{lifecycle-QBYGUHQ3.js → lifecycle-H57PYAZ5.js} +1 -1
- package/dist/mcp-chunks/{list-command-SDITI3ZM.js → list-command-QBO4LK5Q.js} +53 -42
- package/dist/mcp-chunks/logger-LvdykevT-BQ5B4N5O.js +995 -0
- package/dist/mcp-chunks/{output-utils-YTMZTA7J.js → output-utils-MB3PEV2M.js} +3 -3
- package/dist/mcp-chunks/{pi-mcp-runtime-OLO25D7A.js → pi-mcp-runtime-OIMIJV5A.js} +73 -17
- package/dist/mcp-chunks/{prompt-DkftHXS7-N7UENQ4C.js → prompt-DkftHXS7-TE2LNPAM.js} +1 -1
- package/dist/mcp-chunks/{record-command-JGTMATYI.js → record-command-RYDP3Y2A.js} +5 -5
- package/dist/mcp-chunks/{replay-command-S2VAC4RW.js → replay-command-QDJCQ5JU.js} +6 -6
- package/dist/mcp-chunks/{resource-command-SRFQQROJ.js → resource-command-RKHHQBFP.js} +9 -9
- package/dist/mcp-chunks/{result-utils-JASGNHXK.js → result-utils-ZD5GFX7P.js} +3 -3
- package/dist/mcp-chunks/runtime-F7PP4V25.js +39 -0
- package/dist/mcp-chunks/{runtime-wrapper-7HYO3NM5.js → runtime-wrapper-AV4JCNRF.js} +3 -3
- package/dist/mcp-chunks/{serve-command-YKSIXG7K.js → serve-command-MRPTK4XX.js} +26 -26
- package/dist/mcp-chunks/server-2WSYXDII.js +43 -0
- package/dist/mcp-chunks/{timeouts-BJWDJEMH.js → timeouts-2SQIDYBE.js} +4 -3
- package/dist/mcp-chunks/{vault-command-EYOIFWEY.js → vault-command-6JVDCFWU.js} +5 -5
- package/dist/mcp-chunks/{webapi-WMMA3OEC.js → webapi-CI4O7AUX.js} +1 -1
- package/dist/mcp-daemon.js +35 -31
- package/dist/mcp-run-worker.js +34 -30
- package/dist/model-binding.d.ts +34 -3
- package/dist/model-binding.d.ts.map +1 -1
- package/dist/model-binding.js +174 -4
- package/dist/model-binding.js.map +1 -1
- package/dist/recipe/manifest.generated.d.ts +2 -2
- package/dist/recipe/manifest.generated.d.ts.map +1 -1
- package/dist/recipe/manifest.generated.js +2 -2
- package/dist/recipe/manifest.generated.js.map +1 -1
- package/dist/recipe/model.d.ts +2 -0
- package/dist/recipe/model.d.ts.map +1 -1
- package/dist/recipe/model.js +15 -1
- package/dist/recipe/model.js.map +1 -1
- package/dist/session.d.ts +5 -0
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +57 -6
- package/dist/session.js.map +1 -1
- package/dist/suggestion-picker.d.ts +2 -2
- package/dist/suggestion-picker.d.ts.map +1 -1
- package/dist/suggestion-picker.js +5 -3
- package/dist/suggestion-picker.js.map +1 -1
- package/docs/batch.md +2 -2
- package/docs/recipe-format.md +14 -3
- package/package.json +15 -15
- package/skills/documents/SKILL.md +6 -2
- package/skills/issues/SKILL.md +2 -1
- package/skills/search/SKILL.md +3 -0
- package/skills/signature/SKILL.md +4 -4
- package/dist/mcp-chunks/call-arguments-GCXZA4HC.js +0 -16
- package/dist/mcp-chunks/client-SBELHRAE.js +0 -32
- package/dist/mcp-chunks/daemon-command-MQS6AP2W.js +0 -32
- package/dist/mcp-chunks/dist-SDPPH7XQ.js +0 -65
- package/dist/mcp-chunks/generated-daemon-runtime-TUCZ3JEP.js +0 -32
- package/dist/mcp-chunks/runtime-5SOGEUTQ.js +0 -39
- package/dist/mcp-chunks/server-HQBFWAJR.js +0 -41
|
@@ -1,30 +1,12 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
__commonJSMin,
|
|
4
|
+
__require,
|
|
5
|
+
__toESM
|
|
6
|
+
} from "./chunk-EVEVCVYR.js";
|
|
2
7
|
import "./chunk-LRKZP7DJ.js";
|
|
3
8
|
|
|
4
|
-
// node_modules/.pnpm/rolldown@1.2.
|
|
5
|
-
import { createRequire } from "node:module";
|
|
6
|
-
var __create = Object.create;
|
|
7
|
-
var __defProp = Object.defineProperty;
|
|
8
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
9
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
10
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
11
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
12
|
-
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod, mod.exports), cb = null), mod.exports);
|
|
13
|
-
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i2 = 0, n3 = keys.length, key; i2 < n3; i2++) {
|
|
15
|
-
key = keys[i2];
|
|
16
|
-
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
17
|
-
get: ((k) => from[k]).bind(null, key),
|
|
18
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
return to;
|
|
22
|
-
};
|
|
23
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
|
|
24
|
-
value: mod,
|
|
25
|
-
enumerable: true
|
|
26
|
-
}) : target, mod));
|
|
27
|
-
var __require = /* @__PURE__ */ (() => createRequire(import.meta.url))();
|
|
9
|
+
// node_modules/.pnpm/rolldown@1.2.16/node_modules/rolldown/dist/shared/binding-BXYS21Tf.mjs
|
|
28
10
|
var require_webcontainer_fallback = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
29
11
|
const fs = __require("node:fs");
|
|
30
12
|
const childProcess = __require("node:child_process");
|
|
@@ -50,6 +32,7 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
50
32
|
const { readFileSync } = __require("fs");
|
|
51
33
|
let nativeBinding = null;
|
|
52
34
|
let __napiLoadedBindingTarget = "native";
|
|
35
|
+
let __napiRequiredNativeBinding = null;
|
|
53
36
|
const loadErrors = [];
|
|
54
37
|
const isMusl = () => {
|
|
55
38
|
let musl = false;
|
|
@@ -60,7 +43,7 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
60
43
|
}
|
|
61
44
|
return musl;
|
|
62
45
|
};
|
|
63
|
-
const isFileMusl = (
|
|
46
|
+
const isFileMusl = (f) => f.includes("libc.musl-") || f.includes("ld-musl-");
|
|
64
47
|
const isMuslFromFilesystem = () => {
|
|
65
48
|
try {
|
|
66
49
|
return readFileSync("/usr/bin/ldd", "utf-8").includes("musl");
|
|
@@ -84,7 +67,7 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
84
67
|
const isMuslFromChildProcess = () => {
|
|
85
68
|
try {
|
|
86
69
|
return __require("child_process").execSync("ldd --version", { encoding: "utf8" }).includes("musl");
|
|
87
|
-
} catch (
|
|
70
|
+
} catch (e) {
|
|
88
71
|
return false;
|
|
89
72
|
}
|
|
90
73
|
};
|
|
@@ -100,30 +83,30 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
100
83
|
if (process.arch === "arm64") {
|
|
101
84
|
try {
|
|
102
85
|
return __require("./rolldown-binding.android-arm64.node");
|
|
103
|
-
} catch (
|
|
104
|
-
loadErrors.push(
|
|
86
|
+
} catch (e) {
|
|
87
|
+
loadErrors.push(e);
|
|
105
88
|
}
|
|
106
89
|
try {
|
|
107
90
|
const binding = __require("@rolldown/binding-android-arm64");
|
|
108
91
|
const bindingPackageVersion = __require("@rolldown/binding-android-arm64/package.json").version;
|
|
109
|
-
if (bindingPackageVersion !== "1.2.
|
|
92
|
+
if (bindingPackageVersion !== "1.2.16" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.2.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
110
93
|
return binding;
|
|
111
|
-
} catch (
|
|
112
|
-
loadErrors.push(
|
|
94
|
+
} catch (e) {
|
|
95
|
+
loadErrors.push(e);
|
|
113
96
|
}
|
|
114
97
|
} else if (process.arch === "arm") {
|
|
115
98
|
try {
|
|
116
99
|
return __require("./rolldown-binding.android-arm-eabi.node");
|
|
117
|
-
} catch (
|
|
118
|
-
loadErrors.push(
|
|
100
|
+
} catch (e) {
|
|
101
|
+
loadErrors.push(e);
|
|
119
102
|
}
|
|
120
103
|
try {
|
|
121
104
|
const binding = __require("@rolldown/binding-android-arm-eabi");
|
|
122
105
|
const bindingPackageVersion = __require("@rolldown/binding-android-arm-eabi/package.json").version;
|
|
123
|
-
if (bindingPackageVersion !== "1.2.
|
|
106
|
+
if (bindingPackageVersion !== "1.2.16" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.2.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
124
107
|
return binding;
|
|
125
|
-
} catch (
|
|
126
|
-
loadErrors.push(
|
|
108
|
+
} catch (e) {
|
|
109
|
+
loadErrors.push(e);
|
|
127
110
|
}
|
|
128
111
|
} else loadErrors.push(/* @__PURE__ */ new Error(`Unsupported architecture on Android ${process.arch}`));
|
|
129
112
|
} else if (process.platform === "win32") {
|
|
@@ -131,132 +114,146 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
131
114
|
if (process.config && process.config.variables && process.config.variables.shlib_suffix === "dll.a" || process.config && process.config.variables && process.config.variables.node_target_type === "shared_library") {
|
|
132
115
|
try {
|
|
133
116
|
return __require("./rolldown-binding.win32-x64-gnu.node");
|
|
134
|
-
} catch (
|
|
135
|
-
loadErrors.push(
|
|
117
|
+
} catch (e) {
|
|
118
|
+
loadErrors.push(e);
|
|
136
119
|
}
|
|
137
120
|
try {
|
|
138
121
|
const binding = __require("@rolldown/binding-win32-x64-gnu");
|
|
139
122
|
const bindingPackageVersion = __require("@rolldown/binding-win32-x64-gnu/package.json").version;
|
|
140
|
-
if (bindingPackageVersion !== "1.2.
|
|
123
|
+
if (bindingPackageVersion !== "1.2.16" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.2.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
141
124
|
return binding;
|
|
142
|
-
} catch (
|
|
143
|
-
loadErrors.push(
|
|
125
|
+
} catch (e) {
|
|
126
|
+
loadErrors.push(e);
|
|
144
127
|
}
|
|
145
128
|
} else {
|
|
146
129
|
try {
|
|
147
130
|
return __require("./rolldown-binding.win32-x64-msvc.node");
|
|
148
|
-
} catch (
|
|
149
|
-
loadErrors.push(
|
|
131
|
+
} catch (e) {
|
|
132
|
+
loadErrors.push(e);
|
|
150
133
|
}
|
|
151
134
|
try {
|
|
152
135
|
const binding = __require("@rolldown/binding-win32-x64-msvc");
|
|
153
136
|
const bindingPackageVersion = __require("@rolldown/binding-win32-x64-msvc/package.json").version;
|
|
154
|
-
if (bindingPackageVersion !== "1.2.
|
|
137
|
+
if (bindingPackageVersion !== "1.2.16" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.2.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
155
138
|
return binding;
|
|
156
|
-
} catch (
|
|
157
|
-
loadErrors.push(
|
|
139
|
+
} catch (e) {
|
|
140
|
+
loadErrors.push(e);
|
|
158
141
|
}
|
|
159
142
|
}
|
|
160
143
|
} else if (process.arch === "ia32") {
|
|
161
144
|
try {
|
|
162
145
|
return __require("./rolldown-binding.win32-ia32-msvc.node");
|
|
163
|
-
} catch (
|
|
164
|
-
loadErrors.push(
|
|
146
|
+
} catch (e) {
|
|
147
|
+
loadErrors.push(e);
|
|
165
148
|
}
|
|
166
149
|
try {
|
|
167
150
|
const binding = __require("@rolldown/binding-win32-ia32-msvc");
|
|
168
151
|
const bindingPackageVersion = __require("@rolldown/binding-win32-ia32-msvc/package.json").version;
|
|
169
|
-
if (bindingPackageVersion !== "1.2.
|
|
152
|
+
if (bindingPackageVersion !== "1.2.16" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.2.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
170
153
|
return binding;
|
|
171
|
-
} catch (
|
|
172
|
-
loadErrors.push(
|
|
154
|
+
} catch (e) {
|
|
155
|
+
loadErrors.push(e);
|
|
173
156
|
}
|
|
174
157
|
} else if (process.arch === "arm64") {
|
|
175
158
|
try {
|
|
176
159
|
return __require("./rolldown-binding.win32-arm64-msvc.node");
|
|
177
|
-
} catch (
|
|
178
|
-
loadErrors.push(
|
|
160
|
+
} catch (e) {
|
|
161
|
+
loadErrors.push(e);
|
|
179
162
|
}
|
|
180
163
|
try {
|
|
181
164
|
const binding = __require("@rolldown/binding-win32-arm64-msvc");
|
|
182
165
|
const bindingPackageVersion = __require("@rolldown/binding-win32-arm64-msvc/package.json").version;
|
|
183
|
-
if (bindingPackageVersion !== "1.2.
|
|
166
|
+
if (bindingPackageVersion !== "1.2.16" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.2.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
184
167
|
return binding;
|
|
185
|
-
} catch (
|
|
186
|
-
loadErrors.push(
|
|
168
|
+
} catch (e) {
|
|
169
|
+
loadErrors.push(e);
|
|
187
170
|
}
|
|
188
171
|
} else loadErrors.push(/* @__PURE__ */ new Error(`Unsupported architecture on Windows: ${process.arch}`));
|
|
189
172
|
} else if (process.platform === "darwin") {
|
|
190
173
|
try {
|
|
191
174
|
return __require("./rolldown-binding.darwin-universal.node");
|
|
192
|
-
} catch (
|
|
193
|
-
loadErrors.push(
|
|
175
|
+
} catch (e) {
|
|
176
|
+
loadErrors.push(e);
|
|
194
177
|
}
|
|
195
178
|
try {
|
|
196
179
|
const binding = __require("@rolldown/binding-darwin-universal");
|
|
197
180
|
const bindingPackageVersion = __require("@rolldown/binding-darwin-universal/package.json").version;
|
|
198
|
-
if (bindingPackageVersion !== "1.2.
|
|
181
|
+
if (bindingPackageVersion !== "1.2.16" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.2.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
199
182
|
return binding;
|
|
200
|
-
} catch (
|
|
201
|
-
loadErrors.push(
|
|
183
|
+
} catch (e) {
|
|
184
|
+
loadErrors.push(e);
|
|
202
185
|
}
|
|
203
186
|
if (process.arch === "x64") {
|
|
204
187
|
try {
|
|
205
188
|
return __require("./rolldown-binding.darwin-x64.node");
|
|
206
|
-
} catch (
|
|
207
|
-
loadErrors.push(
|
|
189
|
+
} catch (e) {
|
|
190
|
+
loadErrors.push(e);
|
|
208
191
|
}
|
|
209
192
|
try {
|
|
210
193
|
const binding = __require("@rolldown/binding-darwin-x64");
|
|
211
194
|
const bindingPackageVersion = __require("@rolldown/binding-darwin-x64/package.json").version;
|
|
212
|
-
if (bindingPackageVersion !== "1.2.
|
|
195
|
+
if (bindingPackageVersion !== "1.2.16" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.2.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
213
196
|
return binding;
|
|
214
|
-
} catch (
|
|
215
|
-
loadErrors.push(
|
|
197
|
+
} catch (e) {
|
|
198
|
+
loadErrors.push(e);
|
|
216
199
|
}
|
|
217
200
|
} else if (process.arch === "arm64") {
|
|
218
201
|
try {
|
|
219
202
|
return __require("./rolldown-binding.darwin-arm64.node");
|
|
220
|
-
} catch (
|
|
221
|
-
loadErrors.push(
|
|
203
|
+
} catch (e) {
|
|
204
|
+
loadErrors.push(e);
|
|
222
205
|
}
|
|
223
206
|
try {
|
|
224
207
|
const binding = __require("@rolldown/binding-darwin-arm64");
|
|
225
208
|
const bindingPackageVersion = __require("@rolldown/binding-darwin-arm64/package.json").version;
|
|
226
|
-
if (bindingPackageVersion !== "1.2.
|
|
209
|
+
if (bindingPackageVersion !== "1.2.16" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.2.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
227
210
|
return binding;
|
|
228
|
-
} catch (
|
|
229
|
-
loadErrors.push(
|
|
211
|
+
} catch (e) {
|
|
212
|
+
loadErrors.push(e);
|
|
230
213
|
}
|
|
231
214
|
} else loadErrors.push(/* @__PURE__ */ new Error(`Unsupported architecture on macOS: ${process.arch}`));
|
|
232
215
|
} else if (process.platform === "freebsd") {
|
|
233
216
|
if (process.arch === "x64") {
|
|
234
217
|
try {
|
|
235
218
|
return __require("./rolldown-binding.freebsd-x64.node");
|
|
236
|
-
} catch (
|
|
237
|
-
loadErrors.push(
|
|
219
|
+
} catch (e) {
|
|
220
|
+
loadErrors.push(e);
|
|
238
221
|
}
|
|
239
222
|
try {
|
|
240
223
|
const binding = __require("@rolldown/binding-freebsd-x64");
|
|
241
224
|
const bindingPackageVersion = __require("@rolldown/binding-freebsd-x64/package.json").version;
|
|
242
|
-
if (bindingPackageVersion !== "1.2.
|
|
225
|
+
if (bindingPackageVersion !== "1.2.16" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.2.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
243
226
|
return binding;
|
|
244
|
-
} catch (
|
|
245
|
-
loadErrors.push(
|
|
227
|
+
} catch (e) {
|
|
228
|
+
loadErrors.push(e);
|
|
246
229
|
}
|
|
247
230
|
} else if (process.arch === "arm64") {
|
|
248
231
|
try {
|
|
249
232
|
return __require("./rolldown-binding.freebsd-arm64.node");
|
|
250
|
-
} catch (
|
|
251
|
-
loadErrors.push(
|
|
233
|
+
} catch (e) {
|
|
234
|
+
loadErrors.push(e);
|
|
252
235
|
}
|
|
253
236
|
try {
|
|
254
237
|
const binding = __require("@rolldown/binding-freebsd-arm64");
|
|
255
238
|
const bindingPackageVersion = __require("@rolldown/binding-freebsd-arm64/package.json").version;
|
|
256
|
-
if (bindingPackageVersion !== "1.2.
|
|
239
|
+
if (bindingPackageVersion !== "1.2.16" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.2.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
257
240
|
return binding;
|
|
258
|
-
} catch (
|
|
259
|
-
loadErrors.push(
|
|
241
|
+
} catch (e) {
|
|
242
|
+
loadErrors.push(e);
|
|
243
|
+
}
|
|
244
|
+
} else if (process.arch === "ppc64") {
|
|
245
|
+
try {
|
|
246
|
+
return __require("./rolldown-binding.freebsd-ppc64.node");
|
|
247
|
+
} catch (e) {
|
|
248
|
+
loadErrors.push(e);
|
|
249
|
+
}
|
|
250
|
+
try {
|
|
251
|
+
const binding = __require("@rolldown/binding-freebsd-ppc64");
|
|
252
|
+
const bindingPackageVersion = __require("@rolldown/binding-freebsd-ppc64/package.json").version;
|
|
253
|
+
if (bindingPackageVersion !== "1.2.16" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.2.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
254
|
+
return binding;
|
|
255
|
+
} catch (e) {
|
|
256
|
+
loadErrors.push(e);
|
|
260
257
|
}
|
|
261
258
|
} else loadErrors.push(/* @__PURE__ */ new Error(`Unsupported architecture on FreeBSD: ${process.arch}`));
|
|
262
259
|
} else if (process.platform === "linux") {
|
|
@@ -264,223 +261,223 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
264
261
|
if (isMusl()) {
|
|
265
262
|
try {
|
|
266
263
|
return __require("./rolldown-binding.linux-x64-musl.node");
|
|
267
|
-
} catch (
|
|
268
|
-
loadErrors.push(
|
|
264
|
+
} catch (e) {
|
|
265
|
+
loadErrors.push(e);
|
|
269
266
|
}
|
|
270
267
|
try {
|
|
271
268
|
const binding = __require("@rolldown/binding-linux-x64-musl");
|
|
272
269
|
const bindingPackageVersion = __require("@rolldown/binding-linux-x64-musl/package.json").version;
|
|
273
|
-
if (bindingPackageVersion !== "1.2.
|
|
270
|
+
if (bindingPackageVersion !== "1.2.16" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.2.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
274
271
|
return binding;
|
|
275
|
-
} catch (
|
|
276
|
-
loadErrors.push(
|
|
272
|
+
} catch (e) {
|
|
273
|
+
loadErrors.push(e);
|
|
277
274
|
}
|
|
278
275
|
} else {
|
|
279
276
|
try {
|
|
280
277
|
return __require("../rolldown-binding.linux-x64-gnu.node");
|
|
281
|
-
} catch (
|
|
282
|
-
loadErrors.push(
|
|
278
|
+
} catch (e) {
|
|
279
|
+
loadErrors.push(e);
|
|
283
280
|
}
|
|
284
281
|
try {
|
|
285
282
|
const binding = __require("@rolldown/binding-linux-x64-gnu");
|
|
286
283
|
const bindingPackageVersion = __require("@rolldown/binding-linux-x64-gnu/package.json").version;
|
|
287
|
-
if (bindingPackageVersion !== "1.2.
|
|
284
|
+
if (bindingPackageVersion !== "1.2.16" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.2.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
288
285
|
return binding;
|
|
289
|
-
} catch (
|
|
290
|
-
loadErrors.push(
|
|
286
|
+
} catch (e) {
|
|
287
|
+
loadErrors.push(e);
|
|
291
288
|
}
|
|
292
289
|
}
|
|
293
290
|
} else if (process.arch === "arm64") {
|
|
294
291
|
if (isMusl()) {
|
|
295
292
|
try {
|
|
296
293
|
return __require("./rolldown-binding.linux-arm64-musl.node");
|
|
297
|
-
} catch (
|
|
298
|
-
loadErrors.push(
|
|
294
|
+
} catch (e) {
|
|
295
|
+
loadErrors.push(e);
|
|
299
296
|
}
|
|
300
297
|
try {
|
|
301
298
|
const binding = __require("@rolldown/binding-linux-arm64-musl");
|
|
302
299
|
const bindingPackageVersion = __require("@rolldown/binding-linux-arm64-musl/package.json").version;
|
|
303
|
-
if (bindingPackageVersion !== "1.2.
|
|
300
|
+
if (bindingPackageVersion !== "1.2.16" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.2.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
304
301
|
return binding;
|
|
305
|
-
} catch (
|
|
306
|
-
loadErrors.push(
|
|
302
|
+
} catch (e) {
|
|
303
|
+
loadErrors.push(e);
|
|
307
304
|
}
|
|
308
305
|
} else {
|
|
309
306
|
try {
|
|
310
307
|
return __require("./rolldown-binding.linux-arm64-gnu.node");
|
|
311
|
-
} catch (
|
|
312
|
-
loadErrors.push(
|
|
308
|
+
} catch (e) {
|
|
309
|
+
loadErrors.push(e);
|
|
313
310
|
}
|
|
314
311
|
try {
|
|
315
312
|
const binding = __require("@rolldown/binding-linux-arm64-gnu");
|
|
316
313
|
const bindingPackageVersion = __require("@rolldown/binding-linux-arm64-gnu/package.json").version;
|
|
317
|
-
if (bindingPackageVersion !== "1.2.
|
|
314
|
+
if (bindingPackageVersion !== "1.2.16" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.2.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
318
315
|
return binding;
|
|
319
|
-
} catch (
|
|
320
|
-
loadErrors.push(
|
|
316
|
+
} catch (e) {
|
|
317
|
+
loadErrors.push(e);
|
|
321
318
|
}
|
|
322
319
|
}
|
|
323
320
|
} else if (process.arch === "arm") {
|
|
324
321
|
if (isMusl()) {
|
|
325
322
|
try {
|
|
326
323
|
return __require("./rolldown-binding.linux-arm-musleabihf.node");
|
|
327
|
-
} catch (
|
|
328
|
-
loadErrors.push(
|
|
324
|
+
} catch (e) {
|
|
325
|
+
loadErrors.push(e);
|
|
329
326
|
}
|
|
330
327
|
try {
|
|
331
328
|
const binding = __require("@rolldown/binding-linux-arm-musleabihf");
|
|
332
329
|
const bindingPackageVersion = __require("@rolldown/binding-linux-arm-musleabihf/package.json").version;
|
|
333
|
-
if (bindingPackageVersion !== "1.2.
|
|
330
|
+
if (bindingPackageVersion !== "1.2.16" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.2.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
334
331
|
return binding;
|
|
335
|
-
} catch (
|
|
336
|
-
loadErrors.push(
|
|
332
|
+
} catch (e) {
|
|
333
|
+
loadErrors.push(e);
|
|
337
334
|
}
|
|
338
335
|
} else {
|
|
339
336
|
try {
|
|
340
337
|
return __require("./rolldown-binding.linux-arm-gnueabihf.node");
|
|
341
|
-
} catch (
|
|
342
|
-
loadErrors.push(
|
|
338
|
+
} catch (e) {
|
|
339
|
+
loadErrors.push(e);
|
|
343
340
|
}
|
|
344
341
|
try {
|
|
345
342
|
const binding = __require("@rolldown/binding-linux-arm-gnueabihf");
|
|
346
343
|
const bindingPackageVersion = __require("@rolldown/binding-linux-arm-gnueabihf/package.json").version;
|
|
347
|
-
if (bindingPackageVersion !== "1.2.
|
|
344
|
+
if (bindingPackageVersion !== "1.2.16" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.2.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
348
345
|
return binding;
|
|
349
|
-
} catch (
|
|
350
|
-
loadErrors.push(
|
|
346
|
+
} catch (e) {
|
|
347
|
+
loadErrors.push(e);
|
|
351
348
|
}
|
|
352
349
|
}
|
|
353
350
|
} else if (process.arch === "loong64") {
|
|
354
351
|
if (isMusl()) {
|
|
355
352
|
try {
|
|
356
353
|
return __require("./rolldown-binding.linux-loong64-musl.node");
|
|
357
|
-
} catch (
|
|
358
|
-
loadErrors.push(
|
|
354
|
+
} catch (e) {
|
|
355
|
+
loadErrors.push(e);
|
|
359
356
|
}
|
|
360
357
|
try {
|
|
361
358
|
const binding = __require("@rolldown/binding-linux-loong64-musl");
|
|
362
359
|
const bindingPackageVersion = __require("@rolldown/binding-linux-loong64-musl/package.json").version;
|
|
363
|
-
if (bindingPackageVersion !== "1.2.
|
|
360
|
+
if (bindingPackageVersion !== "1.2.16" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.2.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
364
361
|
return binding;
|
|
365
|
-
} catch (
|
|
366
|
-
loadErrors.push(
|
|
362
|
+
} catch (e) {
|
|
363
|
+
loadErrors.push(e);
|
|
367
364
|
}
|
|
368
365
|
} else {
|
|
369
366
|
try {
|
|
370
367
|
return __require("./rolldown-binding.linux-loong64-gnu.node");
|
|
371
|
-
} catch (
|
|
372
|
-
loadErrors.push(
|
|
368
|
+
} catch (e) {
|
|
369
|
+
loadErrors.push(e);
|
|
373
370
|
}
|
|
374
371
|
try {
|
|
375
372
|
const binding = __require("@rolldown/binding-linux-loong64-gnu");
|
|
376
373
|
const bindingPackageVersion = __require("@rolldown/binding-linux-loong64-gnu/package.json").version;
|
|
377
|
-
if (bindingPackageVersion !== "1.2.
|
|
374
|
+
if (bindingPackageVersion !== "1.2.16" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.2.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
378
375
|
return binding;
|
|
379
|
-
} catch (
|
|
380
|
-
loadErrors.push(
|
|
376
|
+
} catch (e) {
|
|
377
|
+
loadErrors.push(e);
|
|
381
378
|
}
|
|
382
379
|
}
|
|
383
380
|
} else if (process.arch === "riscv64") {
|
|
384
381
|
if (isMusl()) {
|
|
385
382
|
try {
|
|
386
383
|
return __require("./rolldown-binding.linux-riscv64-musl.node");
|
|
387
|
-
} catch (
|
|
388
|
-
loadErrors.push(
|
|
384
|
+
} catch (e) {
|
|
385
|
+
loadErrors.push(e);
|
|
389
386
|
}
|
|
390
387
|
try {
|
|
391
388
|
const binding = __require("@rolldown/binding-linux-riscv64-musl");
|
|
392
389
|
const bindingPackageVersion = __require("@rolldown/binding-linux-riscv64-musl/package.json").version;
|
|
393
|
-
if (bindingPackageVersion !== "1.2.
|
|
390
|
+
if (bindingPackageVersion !== "1.2.16" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.2.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
394
391
|
return binding;
|
|
395
|
-
} catch (
|
|
396
|
-
loadErrors.push(
|
|
392
|
+
} catch (e) {
|
|
393
|
+
loadErrors.push(e);
|
|
397
394
|
}
|
|
398
395
|
} else {
|
|
399
396
|
try {
|
|
400
397
|
return __require("./rolldown-binding.linux-riscv64-gnu.node");
|
|
401
|
-
} catch (
|
|
402
|
-
loadErrors.push(
|
|
398
|
+
} catch (e) {
|
|
399
|
+
loadErrors.push(e);
|
|
403
400
|
}
|
|
404
401
|
try {
|
|
405
402
|
const binding = __require("@rolldown/binding-linux-riscv64-gnu");
|
|
406
403
|
const bindingPackageVersion = __require("@rolldown/binding-linux-riscv64-gnu/package.json").version;
|
|
407
|
-
if (bindingPackageVersion !== "1.2.
|
|
404
|
+
if (bindingPackageVersion !== "1.2.16" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.2.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
408
405
|
return binding;
|
|
409
|
-
} catch (
|
|
410
|
-
loadErrors.push(
|
|
406
|
+
} catch (e) {
|
|
407
|
+
loadErrors.push(e);
|
|
411
408
|
}
|
|
412
409
|
}
|
|
413
410
|
} else if (process.arch === "ppc64") {
|
|
414
411
|
try {
|
|
415
412
|
return __require("./rolldown-binding.linux-ppc64-gnu.node");
|
|
416
|
-
} catch (
|
|
417
|
-
loadErrors.push(
|
|
413
|
+
} catch (e) {
|
|
414
|
+
loadErrors.push(e);
|
|
418
415
|
}
|
|
419
416
|
try {
|
|
420
417
|
const binding = __require("@rolldown/binding-linux-ppc64-gnu");
|
|
421
418
|
const bindingPackageVersion = __require("@rolldown/binding-linux-ppc64-gnu/package.json").version;
|
|
422
|
-
if (bindingPackageVersion !== "1.2.
|
|
419
|
+
if (bindingPackageVersion !== "1.2.16" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.2.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
423
420
|
return binding;
|
|
424
|
-
} catch (
|
|
425
|
-
loadErrors.push(
|
|
421
|
+
} catch (e) {
|
|
422
|
+
loadErrors.push(e);
|
|
426
423
|
}
|
|
427
424
|
} else if (process.arch === "s390x") {
|
|
428
425
|
try {
|
|
429
426
|
return __require("./rolldown-binding.linux-s390x-gnu.node");
|
|
430
|
-
} catch (
|
|
431
|
-
loadErrors.push(
|
|
427
|
+
} catch (e) {
|
|
428
|
+
loadErrors.push(e);
|
|
432
429
|
}
|
|
433
430
|
try {
|
|
434
431
|
const binding = __require("@rolldown/binding-linux-s390x-gnu");
|
|
435
432
|
const bindingPackageVersion = __require("@rolldown/binding-linux-s390x-gnu/package.json").version;
|
|
436
|
-
if (bindingPackageVersion !== "1.2.
|
|
433
|
+
if (bindingPackageVersion !== "1.2.16" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.2.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
437
434
|
return binding;
|
|
438
|
-
} catch (
|
|
439
|
-
loadErrors.push(
|
|
435
|
+
} catch (e) {
|
|
436
|
+
loadErrors.push(e);
|
|
440
437
|
}
|
|
441
438
|
} else loadErrors.push(/* @__PURE__ */ new Error(`Unsupported architecture on Linux: ${process.arch}`));
|
|
442
439
|
} else if (process.platform === "openharmony") {
|
|
443
440
|
if (process.arch === "arm64") {
|
|
444
441
|
try {
|
|
445
442
|
return __require("./rolldown-binding.openharmony-arm64.node");
|
|
446
|
-
} catch (
|
|
447
|
-
loadErrors.push(
|
|
443
|
+
} catch (e) {
|
|
444
|
+
loadErrors.push(e);
|
|
448
445
|
}
|
|
449
446
|
try {
|
|
450
447
|
const binding = __require("@rolldown/binding-openharmony-arm64");
|
|
451
448
|
const bindingPackageVersion = __require("@rolldown/binding-openharmony-arm64/package.json").version;
|
|
452
|
-
if (bindingPackageVersion !== "1.2.
|
|
449
|
+
if (bindingPackageVersion !== "1.2.16" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.2.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
453
450
|
return binding;
|
|
454
|
-
} catch (
|
|
455
|
-
loadErrors.push(
|
|
451
|
+
} catch (e) {
|
|
452
|
+
loadErrors.push(e);
|
|
456
453
|
}
|
|
457
454
|
} else if (process.arch === "x64") {
|
|
458
455
|
try {
|
|
459
456
|
return __require("./rolldown-binding.openharmony-x64.node");
|
|
460
|
-
} catch (
|
|
461
|
-
loadErrors.push(
|
|
457
|
+
} catch (e) {
|
|
458
|
+
loadErrors.push(e);
|
|
462
459
|
}
|
|
463
460
|
try {
|
|
464
461
|
const binding = __require("@rolldown/binding-openharmony-x64");
|
|
465
462
|
const bindingPackageVersion = __require("@rolldown/binding-openharmony-x64/package.json").version;
|
|
466
|
-
if (bindingPackageVersion !== "1.2.
|
|
463
|
+
if (bindingPackageVersion !== "1.2.16" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.2.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
467
464
|
return binding;
|
|
468
|
-
} catch (
|
|
469
|
-
loadErrors.push(
|
|
465
|
+
} catch (e) {
|
|
466
|
+
loadErrors.push(e);
|
|
470
467
|
}
|
|
471
468
|
} else if (process.arch === "arm") {
|
|
472
469
|
try {
|
|
473
470
|
return __require("./rolldown-binding.openharmony-arm.node");
|
|
474
|
-
} catch (
|
|
475
|
-
loadErrors.push(
|
|
471
|
+
} catch (e) {
|
|
472
|
+
loadErrors.push(e);
|
|
476
473
|
}
|
|
477
474
|
try {
|
|
478
475
|
const binding = __require("@rolldown/binding-openharmony-arm");
|
|
479
476
|
const bindingPackageVersion = __require("@rolldown/binding-openharmony-arm/package.json").version;
|
|
480
|
-
if (bindingPackageVersion !== "1.2.
|
|
477
|
+
if (bindingPackageVersion !== "1.2.16" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.2.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
481
478
|
return binding;
|
|
482
|
-
} catch (
|
|
483
|
-
loadErrors.push(
|
|
479
|
+
} catch (e) {
|
|
480
|
+
loadErrors.push(e);
|
|
484
481
|
}
|
|
485
482
|
} else loadErrors.push(/* @__PURE__ */ new Error(`Unsupported architecture on OpenHarmony: ${process.arch}`));
|
|
486
483
|
} else loadErrors.push(/* @__PURE__ */ new Error(`Unsupported OS: ${process.platform}, architecture: ${process.arch}`));
|
|
@@ -504,7 +501,10 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
504
501
|
if (__napiWasiFlavorRequested && __napiWasiFlavors.indexOf(__napiWasiFlavor) === -1) throw new Error('Unsupported WASI flavor "' + __napiWasiFlavor + '". Available flavors: ' + __napiWasiFlavors.join(", "));
|
|
505
502
|
const forceWasiError = process.env.NAPI_RS_FORCE_WASI === "error";
|
|
506
503
|
const forceWasi = process.env.NAPI_RS_FORCE_WASI === "true" || forceWasiError || __napiWasiFlavorRequested;
|
|
507
|
-
if (!forceWasi)
|
|
504
|
+
if (!forceWasi) {
|
|
505
|
+
nativeBinding = requireNative();
|
|
506
|
+
__napiRequiredNativeBinding = nativeBinding;
|
|
507
|
+
}
|
|
508
508
|
if (!nativeBinding || forceWasi) {
|
|
509
509
|
let wasiBinding = null;
|
|
510
510
|
let wasiBindingLoaded = false;
|
|
@@ -527,8 +527,8 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
527
527
|
}
|
|
528
528
|
if (localArtifacts) {
|
|
529
529
|
let artifactError = null;
|
|
530
|
-
for (let
|
|
531
|
-
__require.resolve(localArtifacts[
|
|
530
|
+
for (let i = 0; i < localArtifacts.length; i++) try {
|
|
531
|
+
__require.resolve(localArtifacts[i]);
|
|
532
532
|
return null;
|
|
533
533
|
} catch (resolveError) {
|
|
534
534
|
if (!resolveError || resolveError.code !== "MODULE_NOT_FOUND") throw resolveError;
|
|
@@ -568,7 +568,7 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
568
568
|
if (!candidateFailed) {
|
|
569
569
|
if (process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
|
|
570
570
|
const bindingPackageVersion = __require("@rolldown/binding-wasm32-wasi/package.json").version;
|
|
571
|
-
if (bindingPackageVersion !== "1.2.
|
|
571
|
+
if (bindingPackageVersion !== "1.2.16") throw new Error(`WASI binding package version mismatch, expected 1.2.16 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
572
572
|
}
|
|
573
573
|
wasiBinding = __require("@rolldown/binding-wasm32-wasi");
|
|
574
574
|
nativeBinding = wasiBinding;
|
|
@@ -584,7 +584,10 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
584
584
|
loadErrors.push(candidateError);
|
|
585
585
|
}
|
|
586
586
|
}
|
|
587
|
-
if (!wasiBindingLoaded && forceWasi && !forceWasiError && !__napiWasiFlavorRequested)
|
|
587
|
+
if (!wasiBindingLoaded && forceWasi && !forceWasiError && !__napiWasiFlavorRequested) {
|
|
588
|
+
nativeBinding = requireNative();
|
|
589
|
+
__napiRequiredNativeBinding = nativeBinding;
|
|
590
|
+
}
|
|
588
591
|
if ((forceWasiError || __napiWasiFlavorRequested) && !wasiBindingLoaded) {
|
|
589
592
|
const error2 = /* @__PURE__ */ new Error(__napiWasiFlavorRequested ? 'WASI binding for flavor "' + __napiWasiFlavor + '" not found' : "WASI binding not found and NAPI_RS_FORCE_WASI is set to error");
|
|
590
593
|
error2.cause = createLoadErrorChain(wasiBindingErrors);
|
|
@@ -605,6 +608,11 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
605
608
|
}
|
|
606
609
|
throw new Error(`Failed to load native binding`);
|
|
607
610
|
}
|
|
611
|
+
if (__napiLoadedBindingTarget === "native" && nativeBinding !== __napiRequiredNativeBinding) try {
|
|
612
|
+
const __napiBindingTargetDescriptor = Object.getOwnPropertyDescriptor(nativeBinding, "__napiBindingTarget");
|
|
613
|
+
if (__napiBindingTargetDescriptor && __napiWasiFlavors.indexOf(__napiBindingTargetDescriptor.value) !== -1 && nativeBinding.__napiBindingTarget === __napiBindingTargetDescriptor.value) __napiLoadedBindingTarget = __napiBindingTargetDescriptor.value;
|
|
614
|
+
} catch {
|
|
615
|
+
}
|
|
608
616
|
function __napiStampBindingTarget(exportsObject, target) {
|
|
609
617
|
if (Object.prototype.hasOwnProperty.call(exportsObject, "__napiBindingTarget")) {
|
|
610
618
|
if (exportsObject.__napiBindingTarget === target) return target;
|
|
@@ -697,7 +705,7 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
697
705
|
module.exports.startAsyncRuntime = nativeBinding.startAsyncRuntime;
|
|
698
706
|
}));
|
|
699
707
|
|
|
700
|
-
// node_modules/.pnpm/rolldown@1.2.
|
|
708
|
+
// node_modules/.pnpm/rolldown@1.2.16/node_modules/rolldown/dist/shared/logs-DyTyzzWG.mjs
|
|
701
709
|
function spaces(index) {
|
|
702
710
|
let result = "";
|
|
703
711
|
while (index--) result += " ";
|
|
@@ -741,21 +749,21 @@ function rangeContains(range, index) {
|
|
|
741
749
|
function getLocator(source, options = {}) {
|
|
742
750
|
const { offsetLine = 0, offsetColumn = 0 } = options;
|
|
743
751
|
let start = 0;
|
|
744
|
-
const ranges = source.split("\n").map((line,
|
|
752
|
+
const ranges = source.split("\n").map((line, i2) => {
|
|
745
753
|
const end = start + line.length + 1;
|
|
746
754
|
const range = {
|
|
747
755
|
start,
|
|
748
756
|
end,
|
|
749
|
-
line:
|
|
757
|
+
line: i2
|
|
750
758
|
};
|
|
751
759
|
start = end;
|
|
752
760
|
return range;
|
|
753
761
|
});
|
|
754
|
-
let
|
|
762
|
+
let i = 0;
|
|
755
763
|
function locator(search, index) {
|
|
756
764
|
if (typeof search === "string") search = source.indexOf(search, index ?? 0);
|
|
757
765
|
if (search === -1) return void 0;
|
|
758
|
-
let range = ranges[
|
|
766
|
+
let range = ranges[i];
|
|
759
767
|
const d = search >= range.end ? 1 : -1;
|
|
760
768
|
while (range) {
|
|
761
769
|
if (rangeContains(range, search)) return {
|
|
@@ -763,8 +771,8 @@ function getLocator(source, options = {}) {
|
|
|
763
771
|
column: offsetColumn + search - range.start,
|
|
764
772
|
character: search
|
|
765
773
|
};
|
|
766
|
-
|
|
767
|
-
range = ranges[
|
|
774
|
+
i += d;
|
|
775
|
+
range = ranges[i];
|
|
768
776
|
}
|
|
769
777
|
}
|
|
770
778
|
return locator;
|
|
@@ -832,7 +840,7 @@ function logPluginError(error2, plugin, { hook, id: id2 } = {}) {
|
|
|
832
840
|
error2.plugin = plugin;
|
|
833
841
|
if (hook) error2.hook = hook;
|
|
834
842
|
if (id2) error2.id = id2;
|
|
835
|
-
} catch (
|
|
843
|
+
} catch (_) {
|
|
836
844
|
} finally {
|
|
837
845
|
return error2;
|
|
838
846
|
}
|
|
@@ -872,7 +880,7 @@ function augmentCodeLocation(properties, pos, source, id2) {
|
|
|
872
880
|
}
|
|
873
881
|
}
|
|
874
882
|
|
|
875
|
-
// node_modules/.pnpm/rolldown@1.2.
|
|
883
|
+
// node_modules/.pnpm/rolldown@1.2.16/node_modules/rolldown/dist/shared/normalize-string-or-regex-B8U5_Ikr.mjs
|
|
876
884
|
var import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);
|
|
877
885
|
var BuiltinPlugin = class {
|
|
878
886
|
name;
|
|
@@ -911,7 +919,7 @@ function isReadonlyArray(input) {
|
|
|
911
919
|
return Array.isArray(input);
|
|
912
920
|
}
|
|
913
921
|
|
|
914
|
-
// node_modules/.pnpm/rolldown@1.2.
|
|
922
|
+
// node_modules/.pnpm/rolldown@1.2.16/node_modules/rolldown/dist/shared/misc-BaVlOYH0.mjs
|
|
915
923
|
function arraify(value) {
|
|
916
924
|
return Array.isArray(value) ? value : [value];
|
|
917
925
|
}
|
|
@@ -933,15 +941,15 @@ function isPathFragment(name) {
|
|
|
933
941
|
return name[0] === "/" || name[0] === "." && (name[1] === "/" || name[1] === ".") || ABSOLUTE_PATH_REGEX.test(name);
|
|
934
942
|
}
|
|
935
943
|
|
|
936
|
-
// node_modules/.pnpm/rolldown@1.2.
|
|
944
|
+
// node_modules/.pnpm/rolldown@1.2.16/node_modules/rolldown/dist/shared/error-BJ9uQLIS.mjs
|
|
937
945
|
function bindingifySourcemap(map) {
|
|
938
946
|
if (map == null) return;
|
|
939
947
|
return { inner: typeof map === "string" ? map : {
|
|
940
948
|
file: map.file ?? void 0,
|
|
941
949
|
mappings: map.mappings,
|
|
942
950
|
sourceRoot: "sourceRoot" in map ? map.sourceRoot ?? void 0 : void 0,
|
|
943
|
-
sources: map.sources?.map((
|
|
944
|
-
sourcesContent: map.sourcesContent?.map((
|
|
951
|
+
sources: map.sources?.map((s) => s ?? void 0),
|
|
952
|
+
sourcesContent: map.sourcesContent?.map((s) => s ?? void 0),
|
|
945
953
|
names: map.names,
|
|
946
954
|
ignoreList: map.ignoreList,
|
|
947
955
|
x_google_ignoreList: map.x_google_ignoreList,
|
|
@@ -953,15 +961,15 @@ function unwrapBindingResult(container) {
|
|
|
953
961
|
if (typeof container === "object" && container !== null && "isBindingErrors" in container && container.isBindingErrors) throw aggregateBindingErrorsIntoJsError(container.errors);
|
|
954
962
|
return container;
|
|
955
963
|
}
|
|
956
|
-
function normalizeBindingError(
|
|
957
|
-
return
|
|
958
|
-
code:
|
|
959
|
-
kind:
|
|
960
|
-
message:
|
|
961
|
-
id:
|
|
962
|
-
exporter:
|
|
963
|
-
loc:
|
|
964
|
-
pos:
|
|
964
|
+
function normalizeBindingError(e) {
|
|
965
|
+
return e.type === "JsError" ? e.field0 : Object.assign(/* @__PURE__ */ new Error(), {
|
|
966
|
+
code: e.field0.kind,
|
|
967
|
+
kind: e.field0.kind,
|
|
968
|
+
message: e.field0.message,
|
|
969
|
+
id: e.field0.id,
|
|
970
|
+
exporter: e.field0.exporter,
|
|
971
|
+
loc: e.field0.loc,
|
|
972
|
+
pos: e.field0.pos,
|
|
965
973
|
stack: void 0
|
|
966
974
|
});
|
|
967
975
|
}
|
|
@@ -969,52 +977,54 @@ function aggregateBindingErrorsIntoJsError(rawErrors) {
|
|
|
969
977
|
const errors = rawErrors.map(normalizeBindingError);
|
|
970
978
|
let summary = `Build failed with ${errors.length} error${errors.length < 2 ? "" : "s"}:
|
|
971
979
|
`;
|
|
972
|
-
for (let
|
|
980
|
+
for (let i = 0; i < errors.length; i++) {
|
|
973
981
|
summary += "\n";
|
|
974
|
-
if (
|
|
982
|
+
if (i >= 5) {
|
|
975
983
|
summary += "...";
|
|
976
984
|
break;
|
|
977
985
|
}
|
|
978
|
-
summary += getErrorMessage(errors[
|
|
986
|
+
summary += getErrorMessage(errors[i]);
|
|
979
987
|
}
|
|
980
988
|
const wrapper = new Error(summary);
|
|
981
989
|
Object.defineProperty(wrapper, "errors", {
|
|
982
990
|
configurable: true,
|
|
983
991
|
enumerable: true,
|
|
984
992
|
get: () => errors,
|
|
985
|
-
set: (value) =>
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
993
|
+
set: (value) => {
|
|
994
|
+
Object.defineProperty(wrapper, "errors", {
|
|
995
|
+
configurable: true,
|
|
996
|
+
enumerable: true,
|
|
997
|
+
value
|
|
998
|
+
});
|
|
999
|
+
}
|
|
990
1000
|
});
|
|
991
1001
|
return wrapper;
|
|
992
1002
|
}
|
|
993
|
-
function getErrorMessage(
|
|
994
|
-
if (Object.hasOwn(
|
|
995
|
-
let
|
|
996
|
-
if (
|
|
997
|
-
const id2 =
|
|
1003
|
+
function getErrorMessage(e) {
|
|
1004
|
+
if (Object.hasOwn(e, "kind")) return e.message;
|
|
1005
|
+
let s = "";
|
|
1006
|
+
if (e.plugin) s += `[plugin ${e.plugin}]`;
|
|
1007
|
+
const id2 = e.id ?? e.loc?.file;
|
|
998
1008
|
if (id2) {
|
|
999
|
-
|
|
1000
|
-
if (
|
|
1009
|
+
s += " " + id2;
|
|
1010
|
+
if (e.loc) s += `:${e.loc.line}:${e.loc.column}`;
|
|
1001
1011
|
}
|
|
1002
|
-
if (
|
|
1003
|
-
const message = `${
|
|
1004
|
-
|
|
1005
|
-
if (
|
|
1006
|
-
if (
|
|
1007
|
-
if (
|
|
1008
|
-
|
|
1009
|
-
|
|
1012
|
+
if (s) s += "\n";
|
|
1013
|
+
const message = `${e.name ?? "Error"}: ${e.message}`;
|
|
1014
|
+
s += message;
|
|
1015
|
+
if (e.frame) s = joinNewLine(s, e.frame);
|
|
1016
|
+
if (e.stack) s = joinNewLine(s, e.stack.replace(message, ""));
|
|
1017
|
+
if (e.cause) {
|
|
1018
|
+
s = joinNewLine(s, "Caused by:");
|
|
1019
|
+
s = joinNewLine(s, getErrorMessage(e.cause).split("\n").map((line) => " " + line).join("\n"));
|
|
1010
1020
|
}
|
|
1011
|
-
return
|
|
1021
|
+
return s;
|
|
1012
1022
|
}
|
|
1013
1023
|
function joinNewLine(s1, s2) {
|
|
1014
1024
|
return s1.replace(/\n+$/, "") + "\n" + s2.replace(/^\n+/, "");
|
|
1015
1025
|
}
|
|
1016
1026
|
|
|
1017
|
-
// node_modules/.pnpm/rolldown@1.2.
|
|
1027
|
+
// node_modules/.pnpm/rolldown@1.2.16/node_modules/rolldown/dist/shared/parse-Bgfg7ZwM.mjs
|
|
1018
1028
|
var import_binding2 = /* @__PURE__ */ __toESM(require_binding(), 1);
|
|
1019
1029
|
function wrap(result) {
|
|
1020
1030
|
let program, module, comments, errors;
|
|
@@ -1055,7 +1065,7 @@ function parseSync(filename, sourceText, options) {
|
|
|
1055
1065
|
return wrap((0, import_binding2.parseSync)(filename, sourceText, options));
|
|
1056
1066
|
}
|
|
1057
1067
|
|
|
1058
|
-
// node_modules/.pnpm/rolldown@1.2.
|
|
1068
|
+
// node_modules/.pnpm/rolldown@1.2.16/node_modules/rolldown/dist/parse-ast-index.mjs
|
|
1059
1069
|
function wrap2(result, filename, sourceText) {
|
|
1060
1070
|
if (result.errors.length > 0) return normalizeParseError(filename, sourceText, result.errors);
|
|
1061
1071
|
return result.program;
|
|
@@ -1064,13 +1074,13 @@ function normalizeParseError(filename, sourceText, errors) {
|
|
|
1064
1074
|
let message = `Parse failed with ${errors.length} error${errors.length < 2 ? "" : "s"}:
|
|
1065
1075
|
`;
|
|
1066
1076
|
const pos = errors[0]?.labels?.[0]?.start;
|
|
1067
|
-
for (let
|
|
1068
|
-
if (
|
|
1077
|
+
for (let i = 0; i < errors.length; i++) {
|
|
1078
|
+
if (i >= 5) {
|
|
1069
1079
|
message += "\n...";
|
|
1070
1080
|
break;
|
|
1071
1081
|
}
|
|
1072
|
-
const
|
|
1073
|
-
message +=
|
|
1082
|
+
const e = errors[i];
|
|
1083
|
+
message += e.message + "\n" + e.labels.map((label) => {
|
|
1074
1084
|
const location = locate(sourceText, label.start, { offsetLine: 1 });
|
|
1075
1085
|
if (!location) return;
|
|
1076
1086
|
return getCodeFrame(sourceText, location.line, location.column);
|
|
@@ -1091,10 +1101,10 @@ function parseAst(sourceText, options, filename) {
|
|
|
1091
1101
|
}), filename, sourceText);
|
|
1092
1102
|
}
|
|
1093
1103
|
|
|
1094
|
-
// node_modules/.pnpm/rolldown@1.2.
|
|
1104
|
+
// node_modules/.pnpm/rolldown@1.2.16/node_modules/rolldown/dist/shared/bindingify-input-options-CM8bmcLg.mjs
|
|
1095
1105
|
import path from "node:path";
|
|
1096
1106
|
|
|
1097
|
-
// node_modules/.pnpm/@rolldown+pluginutils@1.0
|
|
1107
|
+
// node_modules/.pnpm/@rolldown+pluginutils@1.1.0/node_modules/@rolldown/pluginutils/dist/filter-p20yeu4b.mjs
|
|
1098
1108
|
var And = class {
|
|
1099
1109
|
kind;
|
|
1100
1110
|
args;
|
|
@@ -1177,9 +1187,9 @@ function exclude(expr) {
|
|
|
1177
1187
|
return new Exclude(expr);
|
|
1178
1188
|
}
|
|
1179
1189
|
|
|
1180
|
-
// node_modules/.pnpm/rolldown@1.2.
|
|
1190
|
+
// node_modules/.pnpm/rolldown@1.2.16/node_modules/rolldown/dist/shared/bindingify-input-options-CM8bmcLg.mjs
|
|
1181
1191
|
import fsp from "node:fs/promises";
|
|
1182
|
-
var version = "1.2.
|
|
1192
|
+
var version = "1.2.16";
|
|
1183
1193
|
var VERSION = version;
|
|
1184
1194
|
var LOG_LEVEL_SILENT = "silent";
|
|
1185
1195
|
var LOG_LEVEL_WARN = "warn";
|
|
@@ -1192,15 +1202,15 @@ var logLevelPriority = {
|
|
|
1192
1202
|
[LOG_LEVEL_SILENT]: 3
|
|
1193
1203
|
};
|
|
1194
1204
|
var normalizeLog = (log) => typeof log === "string" ? { message: log } : typeof log === "function" ? normalizeLog(log()) : log;
|
|
1195
|
-
function getLogHandler(level, code2,
|
|
1205
|
+
function getLogHandler(level, code2, logger, pluginName, logLevel) {
|
|
1196
1206
|
if (logLevelPriority[level] < logLevelPriority[logLevel]) return noop;
|
|
1197
1207
|
return (log, pos) => {
|
|
1198
|
-
if (pos != null)
|
|
1208
|
+
if (pos != null) logger(LOG_LEVEL_WARN, logInvalidLogPosition(pluginName));
|
|
1199
1209
|
log = normalizeLog(log);
|
|
1200
1210
|
if (log.code && !log.pluginCode) log.pluginCode = log.code;
|
|
1201
1211
|
log.code = code2;
|
|
1202
1212
|
log.plugin = pluginName;
|
|
1203
|
-
|
|
1213
|
+
logger(level, log);
|
|
1204
1214
|
};
|
|
1205
1215
|
}
|
|
1206
1216
|
function normalizeHook(hook) {
|
|
@@ -1246,8 +1256,8 @@ var MinimalPluginContextImpl = class {
|
|
|
1246
1256
|
watchMode
|
|
1247
1257
|
};
|
|
1248
1258
|
}
|
|
1249
|
-
error(
|
|
1250
|
-
return error(logPluginError(normalizeLog(
|
|
1259
|
+
error(e) {
|
|
1260
|
+
return error(logPluginError(normalizeLog(e), this.pluginName, { hook: this.hookName }));
|
|
1251
1261
|
}
|
|
1252
1262
|
};
|
|
1253
1263
|
var import_binding3 = /* @__PURE__ */ __toESM(require_binding(), 1);
|
|
@@ -1296,10 +1306,10 @@ function bindingAssetSource(source) {
|
|
|
1296
1306
|
return { inner: source };
|
|
1297
1307
|
}
|
|
1298
1308
|
function __decorate(decorators, target, key, desc) {
|
|
1299
|
-
var
|
|
1300
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
1301
|
-
else for (var
|
|
1302
|
-
return
|
|
1309
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1310
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1311
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
1312
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1303
1313
|
}
|
|
1304
1314
|
var OutputAssetImpl = class extends PlainObjectLike {
|
|
1305
1315
|
bindingAsset;
|
|
@@ -1346,7 +1356,7 @@ function transformToRenderedModule(bindingRenderedModule) {
|
|
|
1346
1356
|
return bindingRenderedModule.code;
|
|
1347
1357
|
},
|
|
1348
1358
|
get renderedLength() {
|
|
1349
|
-
return bindingRenderedModule.
|
|
1359
|
+
return bindingRenderedModule.renderedLength;
|
|
1350
1360
|
},
|
|
1351
1361
|
get renderedExports() {
|
|
1352
1362
|
return bindingRenderedModule.renderedExports;
|
|
@@ -1392,9 +1402,9 @@ function transformRenderedChunk(chunk) {
|
|
|
1392
1402
|
}
|
|
1393
1403
|
function transformChunkModules(modules) {
|
|
1394
1404
|
const result = {};
|
|
1395
|
-
for (let
|
|
1396
|
-
let key = modules.keys[
|
|
1397
|
-
const mod = modules.values[
|
|
1405
|
+
for (let i = 0; i < modules.values.length; i++) {
|
|
1406
|
+
let key = modules.keys[i];
|
|
1407
|
+
const mod = modules.values[i];
|
|
1398
1408
|
result[key] = transformToRenderedModule(mod);
|
|
1399
1409
|
}
|
|
1400
1410
|
return result;
|
|
@@ -1492,13 +1502,24 @@ function transformToRollupSourceMap(map) {
|
|
|
1492
1502
|
function transformToRollupOutputChunk(bindingChunk) {
|
|
1493
1503
|
return new OutputChunkImpl(bindingChunk);
|
|
1494
1504
|
}
|
|
1495
|
-
function transformToMutableRollupOutputChunk(bindingChunk, changed) {
|
|
1505
|
+
function transformToMutableRollupOutputChunk(bindingChunk, changed, codeCache) {
|
|
1506
|
+
const fileName = bindingChunk.getFileName();
|
|
1496
1507
|
const chunk = {
|
|
1497
1508
|
type: "chunk",
|
|
1498
1509
|
get code() {
|
|
1499
|
-
return bindingChunk.getCode();
|
|
1510
|
+
if (!codeCache) return bindingChunk.getCode();
|
|
1511
|
+
const identity = bindingChunk.getCodeIdentity();
|
|
1512
|
+
const hit = codeCache.get(fileName);
|
|
1513
|
+
if (hit && hit.identity === identity) return hit.code;
|
|
1514
|
+
const code2 = bindingChunk.getCode();
|
|
1515
|
+
codeCache.set(fileName, {
|
|
1516
|
+
identity,
|
|
1517
|
+
holder: bindingChunk,
|
|
1518
|
+
code: code2
|
|
1519
|
+
});
|
|
1520
|
+
return code2;
|
|
1500
1521
|
},
|
|
1501
|
-
fileName
|
|
1522
|
+
fileName,
|
|
1502
1523
|
name: bindingChunk.getName(),
|
|
1503
1524
|
get modules() {
|
|
1504
1525
|
return transformChunkModules(bindingChunk.getModules());
|
|
@@ -1578,12 +1599,12 @@ function transformToRollupOutput(output) {
|
|
|
1578
1599
|
if (output.mangleCache !== void 0) transformed.mangleCache = output.mangleCache;
|
|
1579
1600
|
return transformed;
|
|
1580
1601
|
}
|
|
1581
|
-
function transformToMutableRollupOutput(output, changed) {
|
|
1602
|
+
function transformToMutableRollupOutput(output, changed, codeCache) {
|
|
1582
1603
|
const { chunks, assets } = output;
|
|
1583
|
-
return { output: [...chunks.map((chunk) => transformToMutableRollupOutputChunk(chunk, changed)), ...assets.map((asset) => transformToMutableRollupOutputAsset(asset, changed))] };
|
|
1604
|
+
return { output: [...chunks.map((chunk) => transformToMutableRollupOutputChunk(chunk, changed, codeCache)), ...assets.map((asset) => transformToMutableRollupOutputAsset(asset, changed))] };
|
|
1584
1605
|
}
|
|
1585
|
-
function transformToOutputBundle(context, output, changed) {
|
|
1586
|
-
const bundle = Object.fromEntries(transformToMutableRollupOutput(output, changed).output.map((item) => [item.fileName, item]));
|
|
1606
|
+
function transformToOutputBundle(context, output, changed, codeCache) {
|
|
1607
|
+
const bundle = Object.fromEntries(transformToMutableRollupOutput(output, changed, codeCache).output.map((item) => [item.fileName, item]));
|
|
1587
1608
|
return new Proxy(bundle, {
|
|
1588
1609
|
set(_target, _p, _newValue, _receiver) {
|
|
1589
1610
|
const originalStackTraceLimit = Error.stackTraceLimit;
|
|
@@ -1793,11 +1814,11 @@ var NormalizedOutputOptionsImpl = class extends PlainObjectLike {
|
|
|
1793
1814
|
return this.inner.legalComments;
|
|
1794
1815
|
}
|
|
1795
1816
|
get comments() {
|
|
1796
|
-
const
|
|
1817
|
+
const c = this.inner.comments;
|
|
1797
1818
|
return {
|
|
1798
|
-
legal:
|
|
1799
|
-
annotation:
|
|
1800
|
-
jsdoc:
|
|
1819
|
+
legal: c.legal ?? true,
|
|
1820
|
+
annotation: c.annotation ?? true,
|
|
1821
|
+
jsdoc: c.jsdoc ?? true
|
|
1801
1822
|
};
|
|
1802
1823
|
}
|
|
1803
1824
|
get polyfillRequire() {
|
|
@@ -1893,16 +1914,22 @@ var PluginContextData = class {
|
|
|
1893
1914
|
normalizedInputPlugins;
|
|
1894
1915
|
normalizedOutputPlugins;
|
|
1895
1916
|
moduleOptionMap = /* @__PURE__ */ new Map();
|
|
1917
|
+
/**
|
|
1918
|
+
* The cache is `null` in parallel plugin workers. In a worker, each plugin has its own
|
|
1919
|
+
* `PluginContextData`, so the cache never finds a match. See `parallel-plugin-worker.ts`.
|
|
1920
|
+
*/
|
|
1921
|
+
outputCodeCache;
|
|
1896
1922
|
resolveOptionsMap = /* @__PURE__ */ new Map();
|
|
1897
1923
|
loadModulePromiseMap = /* @__PURE__ */ new Map();
|
|
1898
1924
|
renderedChunkMeta = null;
|
|
1899
1925
|
normalizedInputOptions = null;
|
|
1900
1926
|
normalizedOutputOptions = null;
|
|
1901
|
-
constructor(onLog, outputOptions, normalizedInputPlugins, normalizedOutputPlugins) {
|
|
1927
|
+
constructor(onLog, outputOptions, normalizedInputPlugins, normalizedOutputPlugins, cacheOutputCode = true) {
|
|
1902
1928
|
this.onLog = onLog;
|
|
1903
1929
|
this.outputOptions = outputOptions;
|
|
1904
1930
|
this.normalizedInputPlugins = normalizedInputPlugins;
|
|
1905
1931
|
this.normalizedOutputPlugins = normalizedOutputPlugins;
|
|
1932
|
+
this.outputCodeCache = cacheOutputCode ? /* @__PURE__ */ new Map() : null;
|
|
1906
1933
|
}
|
|
1907
1934
|
updateModuleOption(id2, option) {
|
|
1908
1935
|
const existing = this.moduleOptionMap.get(id2);
|
|
@@ -1984,6 +2011,7 @@ var PluginContextData = class {
|
|
|
1984
2011
|
clear() {
|
|
1985
2012
|
this.renderedChunkMeta = null;
|
|
1986
2013
|
this.loadModulePromiseMap.clear();
|
|
2014
|
+
this.outputCodeCache?.clear();
|
|
1987
2015
|
}
|
|
1988
2016
|
};
|
|
1989
2017
|
Object.defineProperty(import_binding3.BindingMagicString.prototype, "isRolldownMagicString", {
|
|
@@ -2065,26 +2093,16 @@ function normalizeTransformHookSourcemap(id2, originalCode, rawMap) {
|
|
|
2065
2093
|
if (isEmptySourcemapFiled(map.sources) || map.sources && map.sources.length === 1 && map.sources[0] !== id2) map.sources = [id2];
|
|
2066
2094
|
return map;
|
|
2067
2095
|
}
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
lazyArgs: t3
|
|
2073
|
-
});
|
|
2074
|
-
}
|
|
2075
|
-
function t$1(t3, n3, r2) {
|
|
2076
|
-
let i2 = t3.length - n3.length;
|
|
2077
|
-
if (i2 === 0) return t3(...n3);
|
|
2078
|
-
if (i2 === 1) return e(t3, n3, r2);
|
|
2079
|
-
throw Error(`Wrong number of arguments`);
|
|
2080
|
-
}
|
|
2081
|
-
function t(...t3) {
|
|
2082
|
-
return t$1(n, t3);
|
|
2096
|
+
var dataLastImplementation = (dataFirst, args2) => args2.length === 1 ? (data) => dataFirst(data, args2[0]) : (data) => dataFirst(data, ...args2);
|
|
2097
|
+
var purry = (dataFirst, args2) => args2.length >= dataFirst.length ? dataFirst(...args2) : dataLastImplementation(dataFirst, args2);
|
|
2098
|
+
function partition(...args2) {
|
|
2099
|
+
return purry(partitionImplementation, args2);
|
|
2083
2100
|
}
|
|
2084
|
-
var
|
|
2085
|
-
|
|
2086
|
-
for (
|
|
2087
|
-
|
|
2101
|
+
var partitionImplementation = (data, predicate) => {
|
|
2102
|
+
const ret = [[], []];
|
|
2103
|
+
for (const [index, item] of data.entries()) if (predicate(item, index, data)) ret[0].push(item);
|
|
2104
|
+
else ret[1].push(item);
|
|
2105
|
+
return ret;
|
|
2088
2106
|
};
|
|
2089
2107
|
function generalHookFilterMatcherToFilterExprs(matcher, stringKind) {
|
|
2090
2108
|
if (typeof matcher === "string" || matcher instanceof RegExp) return [include(generateAtomMatcher(stringKind, matcher))];
|
|
@@ -2106,8 +2124,8 @@ function transformFilterMatcherToFilterExprs(filterOption) {
|
|
|
2106
2124
|
let idExcludes = [];
|
|
2107
2125
|
let codeIncludes = [];
|
|
2108
2126
|
let codeExcludes = [];
|
|
2109
|
-
if (id2) [idIncludes, idExcludes] =
|
|
2110
|
-
if (code2) [codeIncludes, codeExcludes] =
|
|
2127
|
+
if (id2) [idIncludes, idExcludes] = partition(generalHookFilterMatcherToFilterExprs(id2, "id") ?? [], (m) => m.kind === "include");
|
|
2128
|
+
if (code2) [codeIncludes, codeExcludes] = partition(generalHookFilterMatcherToFilterExprs(code2, "code") ?? [], (m) => m.kind === "include");
|
|
2111
2129
|
ret.push(...idExcludes);
|
|
2112
2130
|
ret.push(...codeExcludes);
|
|
2113
2131
|
let andExprList = [];
|
|
@@ -2171,7 +2189,7 @@ function bindingifyFilterExprImpl(expr, list) {
|
|
|
2171
2189
|
switch (expr.kind) {
|
|
2172
2190
|
case "and": {
|
|
2173
2191
|
let args2 = expr.args;
|
|
2174
|
-
for (let
|
|
2192
|
+
for (let i = args2.length - 1; i >= 0; i--) bindingifyFilterExprImpl(args2[i], list);
|
|
2175
2193
|
list.push({
|
|
2176
2194
|
kind: "And",
|
|
2177
2195
|
payload: args2.length
|
|
@@ -2180,7 +2198,7 @@ function bindingifyFilterExprImpl(expr, list) {
|
|
|
2180
2198
|
}
|
|
2181
2199
|
case "or": {
|
|
2182
2200
|
let args2 = expr.args;
|
|
2183
|
-
for (let
|
|
2201
|
+
for (let i = args2.length - 1; i >= 0; i--) bindingifyFilterExprImpl(args2[i], list);
|
|
2184
2202
|
list.push({
|
|
2185
2203
|
kind: "Or",
|
|
2186
2204
|
payload: args2.length
|
|
@@ -2459,12 +2477,12 @@ var TransformPluginContextImpl = class extends PluginContextImpl {
|
|
|
2459
2477
|
this.warn = getLogHandler2(this.warn);
|
|
2460
2478
|
this.info = getLogHandler2(this.info);
|
|
2461
2479
|
}
|
|
2462
|
-
error(
|
|
2463
|
-
if (typeof
|
|
2464
|
-
if (pos) augmentCodeLocation(
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
return error(logPluginError(normalizeLog(
|
|
2480
|
+
error(e, pos) {
|
|
2481
|
+
if (typeof e === "string") e = { message: e };
|
|
2482
|
+
if (pos) augmentCodeLocation(e, pos, this.moduleSource, this.moduleId);
|
|
2483
|
+
e.id = this.moduleId;
|
|
2484
|
+
e.hook = "transform";
|
|
2485
|
+
return error(logPluginError(normalizeLog(e), this.pluginName));
|
|
2468
2486
|
}
|
|
2469
2487
|
getCombinedSourcemap() {
|
|
2470
2488
|
return JSON.parse(this.inner.getCombinedSourcemap());
|
|
@@ -2472,8 +2490,8 @@ var TransformPluginContextImpl = class extends PluginContextImpl {
|
|
|
2472
2490
|
addWatchFile(id2) {
|
|
2473
2491
|
this.inner.addWatchFile(id2);
|
|
2474
2492
|
}
|
|
2475
|
-
sendMagicString(
|
|
2476
|
-
this.inner.sendMagicString(
|
|
2493
|
+
sendMagicString(s) {
|
|
2494
|
+
this.inner.sendMagicString(s);
|
|
2477
2495
|
}
|
|
2478
2496
|
};
|
|
2479
2497
|
function bindingifyBuildStart(args2) {
|
|
@@ -2669,7 +2687,7 @@ function bindingifyRenderChunk(args2) {
|
|
|
2669
2687
|
mappings: generatedMap.mappings,
|
|
2670
2688
|
names: generatedMap.names,
|
|
2671
2689
|
sources: generatedMap.sources,
|
|
2672
|
-
sourcesContent: generatedMap.sourcesContent.map((
|
|
2690
|
+
sourcesContent: generatedMap.sourcesContent.map((s) => s ?? null)
|
|
2673
2691
|
})
|
|
2674
2692
|
};
|
|
2675
2693
|
}
|
|
@@ -2690,7 +2708,7 @@ function bindingifyRenderChunk(args2) {
|
|
|
2690
2708
|
mappings: generatedMap.mappings,
|
|
2691
2709
|
names: generatedMap.names,
|
|
2692
2710
|
sources: generatedMap.sources,
|
|
2693
|
-
sourcesContent: generatedMap.sourcesContent.map((
|
|
2711
|
+
sourcesContent: generatedMap.sourcesContent.map((s) => s ?? null)
|
|
2694
2712
|
})
|
|
2695
2713
|
};
|
|
2696
2714
|
}
|
|
@@ -2735,7 +2753,7 @@ function createOutputBundle(args2, ctx, bundle) {
|
|
|
2735
2753
|
return {
|
|
2736
2754
|
changed,
|
|
2737
2755
|
context,
|
|
2738
|
-
output: transformToOutputBundle(context, unwrapBindingResult(bundle), changed)
|
|
2756
|
+
output: transformToOutputBundle(context, unwrapBindingResult(bundle), changed, args2.pluginContextData.outputCodeCache ?? void 0)
|
|
2739
2757
|
};
|
|
2740
2758
|
}
|
|
2741
2759
|
function bindingifyGenerateBundle(args2) {
|
|
@@ -3060,8 +3078,8 @@ function wrapHandlers(plugin, owner, timings) {
|
|
|
3060
3078
|
if (handler) plugin[hookName] = async (...args2) => {
|
|
3061
3079
|
try {
|
|
3062
3080
|
return await handler(...args2);
|
|
3063
|
-
} catch (
|
|
3064
|
-
return error(logPluginError(
|
|
3081
|
+
} catch (e) {
|
|
3082
|
+
return error(logPluginError(e, plugin.name, {
|
|
3065
3083
|
hook: hookName,
|
|
3066
3084
|
id: hookName === "transform" ? args2[2] : void 0
|
|
3067
3085
|
}));
|
|
@@ -3348,16 +3366,14 @@ function bindingifyPreserveEntrySignatures(preserveEntrySignatures) {
|
|
|
3348
3366
|
};
|
|
3349
3367
|
}
|
|
3350
3368
|
|
|
3351
|
-
// node_modules/.pnpm/rolldown@1.2.
|
|
3369
|
+
// node_modules/.pnpm/rolldown@1.2.16/node_modules/rolldown/dist/shared/create-bundler-option-BDjYxIaE.mjs
|
|
3352
3370
|
import { Worker } from "node:worker_threads";
|
|
3353
|
-
import path2
|
|
3354
|
-
import {
|
|
3355
|
-
import g$1 from "node:process";
|
|
3356
|
-
import * as tty from "node:tty";
|
|
3371
|
+
import path2 from "node:path";
|
|
3372
|
+
import { styleText } from "node:util";
|
|
3357
3373
|
import os from "node:os";
|
|
3358
3374
|
function getLogger(plugins, onLog, logLevel, watchMode) {
|
|
3359
3375
|
const minimalPriority = logLevelPriority[logLevel];
|
|
3360
|
-
const
|
|
3376
|
+
const logger = (level, log, skipped = /* @__PURE__ */ new Set()) => {
|
|
3361
3377
|
if (logLevelPriority[level] < minimalPriority) return;
|
|
3362
3378
|
for (const plugin of getSortedPlugins("onLog", plugins)) {
|
|
3363
3379
|
if (skipped.has(plugin)) continue;
|
|
@@ -3366,7 +3382,7 @@ function getLogger(plugins, onLog, logLevel, watchMode) {
|
|
|
3366
3382
|
const getLogHandler2 = (level2) => {
|
|
3367
3383
|
if (logLevelPriority[level2] < minimalPriority) return () => {
|
|
3368
3384
|
};
|
|
3369
|
-
return (log2) =>
|
|
3385
|
+
return (log2) => logger(level2, normalizeLog(log2), new Set(skipped).add(plugin));
|
|
3370
3386
|
};
|
|
3371
3387
|
if (("handler" in pluginOnLog ? pluginOnLog.handler : pluginOnLog).call({
|
|
3372
3388
|
debug: getLogHandler2("debug"),
|
|
@@ -3384,7 +3400,7 @@ function getLogger(plugins, onLog, logLevel, watchMode) {
|
|
|
3384
3400
|
}
|
|
3385
3401
|
onLog(level, log);
|
|
3386
3402
|
};
|
|
3387
|
-
return
|
|
3403
|
+
return logger;
|
|
3388
3404
|
}
|
|
3389
3405
|
var getOnLog = (config, logLevel, printLog = defaultPrintLog) => {
|
|
3390
3406
|
const { onwarn, onLog } = config;
|
|
@@ -3493,13 +3509,13 @@ var PluginDriver = class {
|
|
|
3493
3509
|
static async callOptionsHook(inputOptions, watchMode = false) {
|
|
3494
3510
|
const logLevel = inputOptions.logLevel || "info";
|
|
3495
3511
|
const plugins = getSortedPlugins("options", getObjectPlugins(await normalizePluginOption(inputOptions.plugins)));
|
|
3496
|
-
const
|
|
3512
|
+
const logger = getLogger(plugins, getOnLog(inputOptions, logLevel), logLevel, watchMode);
|
|
3497
3513
|
for (const plugin of plugins) {
|
|
3498
3514
|
const name = plugin.name || "unknown";
|
|
3499
3515
|
const options = plugin.options;
|
|
3500
3516
|
if (options) {
|
|
3501
3517
|
const { handler } = normalizeHook(options);
|
|
3502
|
-
const result = await handler.call(new MinimalPluginContextImpl(
|
|
3518
|
+
const result = await handler.call(new MinimalPluginContextImpl(logger, logLevel, name, watchMode, "onLog"), inputOptions);
|
|
3503
3519
|
if (result) inputOptions = result;
|
|
3504
3520
|
}
|
|
3505
3521
|
}
|
|
@@ -4715,7 +4731,10 @@ var InputOptionsSchema = /* @__PURE__ */ strictObject({
|
|
|
4715
4731
|
transform: /* @__PURE__ */ optional(TransformOptionsSchema),
|
|
4716
4732
|
watch: /* @__PURE__ */ optional(/* @__PURE__ */ union([WatcherOptionsSchema, /* @__PURE__ */ literal(false)])),
|
|
4717
4733
|
checks: /* @__PURE__ */ optional(ChecksOptionsSchema),
|
|
4718
|
-
devtools: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ object({
|
|
4734
|
+
devtools: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ object({
|
|
4735
|
+
sessionId: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ check((id2) => id2 !== "" && id2 !== "." && id2 !== ".." && !/[/\\\0]/.test(id2), 'Expected one path segment: not empty, not "." or "..", and without "/", "\\" or NUL'), /* @__PURE__ */ check((id2) => id2.toLowerCase().toUpperCase() !== "UNKNOWN-SESSION", '"unknown-session" is reserved for devtools events without a session context'))), /* @__PURE__ */ description("Used to name the build.")),
|
|
4736
|
+
mode: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ literal("full"), /* @__PURE__ */ literal("report")])), /* @__PURE__ */ description("'full' (default): write JSON-lines devtools logs. 'report': aggregate the same event stream in-memory and emit an agent-readable report (metrics.json + markdown views) instead."))
|
|
4737
|
+
})), /* @__PURE__ */ description("Enable debug mode. Emit debug information to disk. This might slow down the build process significantly.")),
|
|
4719
4738
|
preserveEntrySignatures: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([
|
|
4720
4739
|
/* @__PURE__ */ literal("strict"),
|
|
4721
4740
|
/* @__PURE__ */ literal("allow-extension"),
|
|
@@ -4938,7 +4957,7 @@ function validateOption(key, options) {
|
|
|
4938
4957
|
let issueMsg = issue.message;
|
|
4939
4958
|
const issuePaths = issue.path.map((path3) => path3.key);
|
|
4940
4959
|
if (issue.type === "union") {
|
|
4941
|
-
const subIssue = issue.issues?.find((
|
|
4960
|
+
const subIssue = issue.issues?.find((i) => !(i.type !== issue.received && i.input === issue.input));
|
|
4942
4961
|
if (subIssue) {
|
|
4943
4962
|
if (subIssue.path) issuePaths.push(subIssue.path.map((path3) => path3.key));
|
|
4944
4963
|
issueMsg = subIssue.message;
|
|
@@ -4985,989 +5004,16 @@ var ChunkingContextImpl = class {
|
|
|
4985
5004
|
return null;
|
|
4986
5005
|
}
|
|
4987
5006
|
};
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
warn: 1,
|
|
4993
|
-
log: 2,
|
|
4994
|
-
info: 3,
|
|
4995
|
-
success: 3,
|
|
4996
|
-
fail: 3,
|
|
4997
|
-
ready: 3,
|
|
4998
|
-
start: 3,
|
|
4999
|
-
box: 3,
|
|
5000
|
-
debug: 4,
|
|
5001
|
-
trace: 5,
|
|
5002
|
-
verbose: Number.POSITIVE_INFINITY
|
|
5003
|
-
};
|
|
5004
|
-
var LogTypes = {
|
|
5005
|
-
silent: { level: -1 },
|
|
5006
|
-
fatal: { level: LogLevels.fatal },
|
|
5007
|
-
error: { level: LogLevels.error },
|
|
5008
|
-
warn: { level: LogLevels.warn },
|
|
5009
|
-
log: { level: LogLevels.log },
|
|
5010
|
-
info: { level: LogLevels.info },
|
|
5011
|
-
success: { level: LogLevels.success },
|
|
5012
|
-
fail: { level: LogLevels.fail },
|
|
5013
|
-
ready: { level: LogLevels.info },
|
|
5014
|
-
start: { level: LogLevels.info },
|
|
5015
|
-
box: { level: LogLevels.info },
|
|
5016
|
-
debug: { level: LogLevels.debug },
|
|
5017
|
-
trace: { level: LogLevels.trace },
|
|
5018
|
-
verbose: { level: LogLevels.verbose }
|
|
5019
|
-
};
|
|
5020
|
-
function isPlainObject$1(value) {
|
|
5021
|
-
if (value === null || typeof value !== "object") return false;
|
|
5022
|
-
const prototype = Object.getPrototypeOf(value);
|
|
5023
|
-
if (prototype !== null && prototype !== Object.prototype && Object.getPrototypeOf(prototype) !== null) return false;
|
|
5024
|
-
if (Symbol.iterator in value) return false;
|
|
5025
|
-
if (Symbol.toStringTag in value) return Object.prototype.toString.call(value) === "[object Module]";
|
|
5026
|
-
return true;
|
|
5027
|
-
}
|
|
5028
|
-
function _defu(baseObject, defaults, namespace = ".", merger) {
|
|
5029
|
-
if (!isPlainObject$1(defaults)) return _defu(baseObject, {}, namespace, merger);
|
|
5030
|
-
const object2 = Object.assign({}, defaults);
|
|
5031
|
-
for (const key in baseObject) {
|
|
5032
|
-
if (key === "__proto__" || key === "constructor") continue;
|
|
5033
|
-
const value = baseObject[key];
|
|
5034
|
-
if (value === null || value === void 0) continue;
|
|
5035
|
-
if (merger && merger(object2, key, value, namespace)) continue;
|
|
5036
|
-
if (Array.isArray(value) && Array.isArray(object2[key])) object2[key] = [...value, ...object2[key]];
|
|
5037
|
-
else if (isPlainObject$1(value) && isPlainObject$1(object2[key])) object2[key] = _defu(value, object2[key], (namespace ? `${namespace}.` : "") + key.toString(), merger);
|
|
5038
|
-
else object2[key] = value;
|
|
5039
|
-
}
|
|
5040
|
-
return object2;
|
|
5041
|
-
}
|
|
5042
|
-
function createDefu(merger) {
|
|
5043
|
-
return (...arguments_) => arguments_.reduce((p, c2) => _defu(p, c2, "", merger), {});
|
|
5044
|
-
}
|
|
5045
|
-
var defu = createDefu();
|
|
5046
|
-
function isPlainObject(obj) {
|
|
5047
|
-
return Object.prototype.toString.call(obj) === "[object Object]";
|
|
5048
|
-
}
|
|
5049
|
-
function isLogObj(arg) {
|
|
5050
|
-
if (!isPlainObject(arg)) return false;
|
|
5051
|
-
if (!arg.message && !arg.args) return false;
|
|
5052
|
-
if (arg.stack) return false;
|
|
5053
|
-
return true;
|
|
5054
|
-
}
|
|
5055
|
-
var paused = false;
|
|
5056
|
-
var queue = [];
|
|
5057
|
-
var Consola = class Consola2 {
|
|
5058
|
-
options;
|
|
5059
|
-
_lastLog;
|
|
5060
|
-
_mockFn;
|
|
5061
|
-
/**
|
|
5062
|
-
* Creates an instance of Consola with specified options or defaults.
|
|
5063
|
-
*
|
|
5064
|
-
* @param {Partial<ConsolaOptions>} [options={}] - Configuration options for the Consola instance.
|
|
5065
|
-
*/
|
|
5066
|
-
constructor(options = {}) {
|
|
5067
|
-
const types = options.types || LogTypes;
|
|
5068
|
-
this.options = defu({
|
|
5069
|
-
...options,
|
|
5070
|
-
defaults: { ...options.defaults },
|
|
5071
|
-
level: _normalizeLogLevel(options.level, types),
|
|
5072
|
-
reporters: [...options.reporters || []]
|
|
5073
|
-
}, {
|
|
5074
|
-
types: LogTypes,
|
|
5075
|
-
throttle: 1e3,
|
|
5076
|
-
throttleMin: 5,
|
|
5077
|
-
formatOptions: {
|
|
5078
|
-
date: true,
|
|
5079
|
-
colors: false,
|
|
5080
|
-
compact: true
|
|
5081
|
-
}
|
|
5082
|
-
});
|
|
5083
|
-
for (const type in types) {
|
|
5084
|
-
const defaults = {
|
|
5085
|
-
type,
|
|
5086
|
-
...this.options.defaults,
|
|
5087
|
-
...types[type]
|
|
5088
|
-
};
|
|
5089
|
-
this[type] = this._wrapLogFn(defaults);
|
|
5090
|
-
this[type].raw = this._wrapLogFn(defaults, true);
|
|
5091
|
-
}
|
|
5092
|
-
if (this.options.mockFn) this.mockTypes();
|
|
5093
|
-
this._lastLog = {};
|
|
5094
|
-
}
|
|
5095
|
-
/**
|
|
5096
|
-
* Gets the current log level of the Consola instance.
|
|
5097
|
-
*
|
|
5098
|
-
* @returns {number} The current log level.
|
|
5099
|
-
*/
|
|
5100
|
-
get level() {
|
|
5101
|
-
return this.options.level;
|
|
5102
|
-
}
|
|
5103
|
-
/**
|
|
5104
|
-
* Sets the minimum log level that will be output by the instance.
|
|
5105
|
-
*
|
|
5106
|
-
* @param {number} level - The new log level to set.
|
|
5107
|
-
*/
|
|
5108
|
-
set level(level) {
|
|
5109
|
-
this.options.level = _normalizeLogLevel(level, this.options.types, this.options.level);
|
|
5110
|
-
}
|
|
5111
|
-
/**
|
|
5112
|
-
* Displays a prompt to the user and returns the response.
|
|
5113
|
-
* Throw an error if `prompt` is not supported by the current configuration.
|
|
5114
|
-
*
|
|
5115
|
-
* @template T
|
|
5116
|
-
* @param {string} message - The message to display in the prompt.
|
|
5117
|
-
* @param {T} [opts] - Optional options for the prompt. See {@link PromptOptions}.
|
|
5118
|
-
* @returns {promise<T>} A promise that infer with the prompt options. See {@link PromptOptions}.
|
|
5119
|
-
*/
|
|
5120
|
-
prompt(message, opts) {
|
|
5121
|
-
if (!this.options.prompt) throw new Error("prompt is not supported!");
|
|
5122
|
-
return this.options.prompt(message, opts);
|
|
5123
|
-
}
|
|
5124
|
-
/**
|
|
5125
|
-
* Creates a new instance of Consola, inheriting options from the current instance, with possible overrides.
|
|
5126
|
-
*
|
|
5127
|
-
* @param {Partial<ConsolaOptions>} options - Optional overrides for the new instance. See {@link ConsolaOptions}.
|
|
5128
|
-
* @returns {ConsolaInstance} A new Consola instance. See {@link ConsolaInstance}.
|
|
5129
|
-
*/
|
|
5130
|
-
create(options) {
|
|
5131
|
-
const instance2 = new Consola2({
|
|
5132
|
-
...this.options,
|
|
5133
|
-
...options
|
|
5134
|
-
});
|
|
5135
|
-
if (this._mockFn) instance2.mockTypes(this._mockFn);
|
|
5136
|
-
return instance2;
|
|
5137
|
-
}
|
|
5138
|
-
/**
|
|
5139
|
-
* Creates a new Consola instance with the specified default log object properties.
|
|
5140
|
-
*
|
|
5141
|
-
* @param {InputLogObject} defaults - Default properties to include in any log from the new instance. See {@link InputLogObject}.
|
|
5142
|
-
* @returns {ConsolaInstance} A new Consola instance. See {@link ConsolaInstance}.
|
|
5143
|
-
*/
|
|
5144
|
-
withDefaults(defaults) {
|
|
5145
|
-
return this.create({
|
|
5146
|
-
...this.options,
|
|
5147
|
-
defaults: {
|
|
5148
|
-
...this.options.defaults,
|
|
5149
|
-
...defaults
|
|
5150
|
-
}
|
|
5151
|
-
});
|
|
5152
|
-
}
|
|
5153
|
-
/**
|
|
5154
|
-
* Creates a new Consola instance with a specified tag, which will be included in every log.
|
|
5155
|
-
*
|
|
5156
|
-
* @param {string} tag - The tag to include in each log of the new instance.
|
|
5157
|
-
* @returns {ConsolaInstance} A new Consola instance. See {@link ConsolaInstance}.
|
|
5158
|
-
*/
|
|
5159
|
-
withTag(tag) {
|
|
5160
|
-
return this.withDefaults({ tag: this.options.defaults.tag ? this.options.defaults.tag + ":" + tag : tag });
|
|
5161
|
-
}
|
|
5162
|
-
/**
|
|
5163
|
-
* Adds a custom reporter to the Consola instance.
|
|
5164
|
-
* Reporters will be called for each log message, depending on their implementation and log level.
|
|
5165
|
-
*
|
|
5166
|
-
* @param {ConsolaReporter} reporter - The reporter to add. See {@link ConsolaReporter}.
|
|
5167
|
-
* @returns {Consola} The current Consola instance.
|
|
5168
|
-
*/
|
|
5169
|
-
addReporter(reporter) {
|
|
5170
|
-
this.options.reporters.push(reporter);
|
|
5171
|
-
return this;
|
|
5172
|
-
}
|
|
5173
|
-
/**
|
|
5174
|
-
* Removes a custom reporter from the Consola instance.
|
|
5175
|
-
* If no reporter is specified, all reporters will be removed.
|
|
5176
|
-
*
|
|
5177
|
-
* @param {ConsolaReporter} reporter - The reporter to remove. See {@link ConsolaReporter}.
|
|
5178
|
-
* @returns {Consola} The current Consola instance.
|
|
5179
|
-
*/
|
|
5180
|
-
removeReporter(reporter) {
|
|
5181
|
-
if (reporter) {
|
|
5182
|
-
const i2 = this.options.reporters.indexOf(reporter);
|
|
5183
|
-
if (i2 !== -1) return this.options.reporters.splice(i2, 1);
|
|
5184
|
-
} else this.options.reporters.splice(0);
|
|
5185
|
-
return this;
|
|
5186
|
-
}
|
|
5187
|
-
/**
|
|
5188
|
-
* Replaces all reporters of the Consola instance with the specified array of reporters.
|
|
5189
|
-
*
|
|
5190
|
-
* @param {ConsolaReporter[]} reporters - The new reporters to set. See {@link ConsolaReporter}.
|
|
5191
|
-
* @returns {Consola} The current Consola instance.
|
|
5192
|
-
*/
|
|
5193
|
-
setReporters(reporters) {
|
|
5194
|
-
this.options.reporters = Array.isArray(reporters) ? reporters : [reporters];
|
|
5195
|
-
return this;
|
|
5196
|
-
}
|
|
5197
|
-
wrapAll() {
|
|
5198
|
-
this.wrapConsole();
|
|
5199
|
-
this.wrapStd();
|
|
5200
|
-
}
|
|
5201
|
-
restoreAll() {
|
|
5202
|
-
this.restoreConsole();
|
|
5203
|
-
this.restoreStd();
|
|
5204
|
-
}
|
|
5205
|
-
/**
|
|
5206
|
-
* Overrides console methods with Consola logging methods for consistent logging.
|
|
5207
|
-
*/
|
|
5208
|
-
wrapConsole() {
|
|
5209
|
-
for (const type in this.options.types) {
|
|
5210
|
-
if (!console["__" + type]) console["__" + type] = console[type];
|
|
5211
|
-
console[type] = this[type].raw;
|
|
5212
|
-
}
|
|
5213
|
-
}
|
|
5214
|
-
/**
|
|
5215
|
-
* Restores the original console methods, removing Consola overrides.
|
|
5216
|
-
*/
|
|
5217
|
-
restoreConsole() {
|
|
5218
|
-
for (const type in this.options.types) if (console["__" + type]) {
|
|
5219
|
-
console[type] = console["__" + type];
|
|
5220
|
-
delete console["__" + type];
|
|
5221
|
-
}
|
|
5222
|
-
}
|
|
5223
|
-
/**
|
|
5224
|
-
* Overrides standard output and error streams to redirect them through Consola.
|
|
5225
|
-
*/
|
|
5226
|
-
wrapStd() {
|
|
5227
|
-
this._wrapStream(this.options.stdout, "log");
|
|
5228
|
-
this._wrapStream(this.options.stderr, "log");
|
|
5229
|
-
}
|
|
5230
|
-
_wrapStream(stream, type) {
|
|
5231
|
-
if (!stream) return;
|
|
5232
|
-
if (!stream.__write) stream.__write = stream.write;
|
|
5233
|
-
stream.write = (data) => {
|
|
5234
|
-
this[type].raw(String(data).trim());
|
|
5235
|
-
};
|
|
5236
|
-
}
|
|
5237
|
-
/**
|
|
5238
|
-
* Restores the original standard output and error streams, removing the Consola redirection.
|
|
5239
|
-
*/
|
|
5240
|
-
restoreStd() {
|
|
5241
|
-
this._restoreStream(this.options.stdout);
|
|
5242
|
-
this._restoreStream(this.options.stderr);
|
|
5243
|
-
}
|
|
5244
|
-
_restoreStream(stream) {
|
|
5245
|
-
if (!stream) return;
|
|
5246
|
-
if (stream.__write) {
|
|
5247
|
-
stream.write = stream.__write;
|
|
5248
|
-
delete stream.__write;
|
|
5249
|
-
}
|
|
5250
|
-
}
|
|
5251
|
-
/**
|
|
5252
|
-
* Pauses logging, queues incoming logs until resumed.
|
|
5253
|
-
*/
|
|
5254
|
-
pauseLogs() {
|
|
5255
|
-
paused = true;
|
|
5256
|
-
}
|
|
5257
|
-
/**
|
|
5258
|
-
* Resumes logging, processing any queued logs.
|
|
5259
|
-
*/
|
|
5260
|
-
resumeLogs() {
|
|
5261
|
-
paused = false;
|
|
5262
|
-
const _queue = queue.splice(0);
|
|
5263
|
-
for (const item of _queue) item[0]._logFn(item[1], item[2]);
|
|
5264
|
-
}
|
|
5265
|
-
/**
|
|
5266
|
-
* Replaces logging methods with mocks if a mock function is provided.
|
|
5267
|
-
*
|
|
5268
|
-
* @param {ConsolaOptions["mockFn"]} mockFn - The function to use for mocking logging methods. See {@link ConsolaOptions["mockFn"]}.
|
|
5269
|
-
*/
|
|
5270
|
-
mockTypes(mockFn) {
|
|
5271
|
-
const _mockFn = mockFn || this.options.mockFn;
|
|
5272
|
-
this._mockFn = _mockFn;
|
|
5273
|
-
if (typeof _mockFn !== "function") return;
|
|
5274
|
-
for (const type in this.options.types) {
|
|
5275
|
-
this[type] = _mockFn(type, this.options.types[type]) || this[type];
|
|
5276
|
-
this[type].raw = this[type];
|
|
5277
|
-
}
|
|
5278
|
-
}
|
|
5279
|
-
_wrapLogFn(defaults, isRaw) {
|
|
5280
|
-
return (...args2) => {
|
|
5281
|
-
if (paused) {
|
|
5282
|
-
queue.push([
|
|
5283
|
-
this,
|
|
5284
|
-
defaults,
|
|
5285
|
-
args2,
|
|
5286
|
-
isRaw
|
|
5287
|
-
]);
|
|
5288
|
-
return;
|
|
5289
|
-
}
|
|
5290
|
-
return this._logFn(defaults, args2, isRaw);
|
|
5291
|
-
};
|
|
5292
|
-
}
|
|
5293
|
-
_logFn(defaults, args2, isRaw) {
|
|
5294
|
-
if ((defaults.level || 0) > this.level) return false;
|
|
5295
|
-
const logObj = {
|
|
5296
|
-
date: /* @__PURE__ */ new Date(),
|
|
5297
|
-
args: [],
|
|
5298
|
-
...defaults,
|
|
5299
|
-
level: _normalizeLogLevel(defaults.level, this.options.types)
|
|
5300
|
-
};
|
|
5301
|
-
if (!isRaw && args2.length === 1 && isLogObj(args2[0])) Object.assign(logObj, args2[0]);
|
|
5302
|
-
else logObj.args = [...args2];
|
|
5303
|
-
if (logObj.message) {
|
|
5304
|
-
logObj.args.unshift(logObj.message);
|
|
5305
|
-
delete logObj.message;
|
|
5306
|
-
}
|
|
5307
|
-
if (logObj.additional) {
|
|
5308
|
-
if (!Array.isArray(logObj.additional)) logObj.additional = logObj.additional.split("\n");
|
|
5309
|
-
logObj.args.push("\n" + logObj.additional.join("\n"));
|
|
5310
|
-
delete logObj.additional;
|
|
5311
|
-
}
|
|
5312
|
-
logObj.type = typeof logObj.type === "string" ? logObj.type.toLowerCase() : "log";
|
|
5313
|
-
logObj.tag = typeof logObj.tag === "string" ? logObj.tag : "";
|
|
5314
|
-
const resolveLog = (newLog = false) => {
|
|
5315
|
-
const repeated = (this._lastLog.count || 0) - this.options.throttleMin;
|
|
5316
|
-
if (this._lastLog.object && repeated > 0) {
|
|
5317
|
-
const args22 = [...this._lastLog.object.args];
|
|
5318
|
-
if (repeated > 1) args22.push(`(repeated ${repeated} times)`);
|
|
5319
|
-
this._log({
|
|
5320
|
-
...this._lastLog.object,
|
|
5321
|
-
args: args22
|
|
5322
|
-
});
|
|
5323
|
-
this._lastLog.count = 1;
|
|
5324
|
-
}
|
|
5325
|
-
if (newLog) {
|
|
5326
|
-
this._lastLog.object = logObj;
|
|
5327
|
-
this._log(logObj);
|
|
5328
|
-
}
|
|
5329
|
-
};
|
|
5330
|
-
clearTimeout(this._lastLog.timeout);
|
|
5331
|
-
const diffTime = this._lastLog.time && logObj.date ? logObj.date.getTime() - this._lastLog.time.getTime() : 0;
|
|
5332
|
-
this._lastLog.time = logObj.date;
|
|
5333
|
-
if (diffTime < this.options.throttle) try {
|
|
5334
|
-
const serializedLog = JSON.stringify([
|
|
5335
|
-
logObj.type,
|
|
5336
|
-
logObj.tag,
|
|
5337
|
-
logObj.args
|
|
5338
|
-
]);
|
|
5339
|
-
const isSameLog = this._lastLog.serialized === serializedLog;
|
|
5340
|
-
this._lastLog.serialized = serializedLog;
|
|
5341
|
-
if (isSameLog) {
|
|
5342
|
-
this._lastLog.count = (this._lastLog.count || 0) + 1;
|
|
5343
|
-
if (this._lastLog.count > this.options.throttleMin) {
|
|
5344
|
-
this._lastLog.timeout = setTimeout(resolveLog, this.options.throttle);
|
|
5345
|
-
return;
|
|
5346
|
-
}
|
|
5347
|
-
}
|
|
5348
|
-
} catch {
|
|
5349
|
-
}
|
|
5350
|
-
resolveLog(true);
|
|
5351
|
-
}
|
|
5352
|
-
_log(logObj) {
|
|
5353
|
-
for (const reporter of this.options.reporters) reporter.log(logObj, { options: this.options });
|
|
5354
|
-
}
|
|
5355
|
-
};
|
|
5356
|
-
function _normalizeLogLevel(input, types = {}, defaultLevel = 3) {
|
|
5357
|
-
if (input === void 0) return defaultLevel;
|
|
5358
|
-
if (typeof input === "number") return input;
|
|
5359
|
-
if (types[input] && types[input].level !== void 0) return types[input].level;
|
|
5360
|
-
return defaultLevel;
|
|
5361
|
-
}
|
|
5362
|
-
Consola.prototype.add = Consola.prototype.addReporter;
|
|
5363
|
-
Consola.prototype.remove = Consola.prototype.removeReporter;
|
|
5364
|
-
Consola.prototype.clear = Consola.prototype.removeReporter;
|
|
5365
|
-
Consola.prototype.withScope = Consola.prototype.withTag;
|
|
5366
|
-
Consola.prototype.mock = Consola.prototype.mockTypes;
|
|
5367
|
-
Consola.prototype.pause = Consola.prototype.pauseLogs;
|
|
5368
|
-
Consola.prototype.resume = Consola.prototype.resumeLogs;
|
|
5369
|
-
function createConsola$1(options = {}) {
|
|
5370
|
-
return new Consola(options);
|
|
5371
|
-
}
|
|
5372
|
-
function parseStack(stack, message) {
|
|
5373
|
-
const cwd = process.cwd() + sep;
|
|
5374
|
-
return stack.split("\n").splice(message.split("\n").length).map((l2) => l2.trim().replace("file://", "").replace(cwd, ""));
|
|
5375
|
-
}
|
|
5376
|
-
function writeStream(data, stream) {
|
|
5377
|
-
return (stream.__write || stream.write).call(stream, data);
|
|
5378
|
-
}
|
|
5379
|
-
var bracket = (x) => x ? `[${x}]` : "";
|
|
5380
|
-
var BasicReporter = class {
|
|
5381
|
-
formatStack(stack, message, opts) {
|
|
5382
|
-
const indent = " ".repeat((opts?.errorLevel || 0) + 1);
|
|
5383
|
-
return indent + parseStack(stack, message).join(`
|
|
5384
|
-
${indent}`);
|
|
5385
|
-
}
|
|
5386
|
-
formatError(err, opts) {
|
|
5387
|
-
const message = err.message ?? formatWithOptions(opts, err);
|
|
5388
|
-
const stack = err.stack ? this.formatStack(err.stack, message, opts) : "";
|
|
5389
|
-
const level = opts?.errorLevel || 0;
|
|
5390
|
-
const causedPrefix = level > 0 ? `${" ".repeat(level)}[cause]: ` : "";
|
|
5391
|
-
const causedError = err.cause ? "\n\n" + this.formatError(err.cause, {
|
|
5392
|
-
...opts,
|
|
5393
|
-
errorLevel: level + 1
|
|
5394
|
-
}) : "";
|
|
5395
|
-
return causedPrefix + message + "\n" + stack + causedError;
|
|
5396
|
-
}
|
|
5397
|
-
formatArgs(args2, opts) {
|
|
5398
|
-
const _args = args2.map((arg) => {
|
|
5399
|
-
if (arg && typeof arg.stack === "string") return this.formatError(arg, opts);
|
|
5400
|
-
return arg;
|
|
5401
|
-
});
|
|
5402
|
-
return formatWithOptions(opts, ..._args);
|
|
5403
|
-
}
|
|
5404
|
-
formatDate(date, opts) {
|
|
5405
|
-
return opts.date ? date.toLocaleTimeString() : "";
|
|
5406
|
-
}
|
|
5407
|
-
filterAndJoin(arr) {
|
|
5408
|
-
return arr.filter(Boolean).join(" ");
|
|
5409
|
-
}
|
|
5410
|
-
formatLogObj(logObj, opts) {
|
|
5411
|
-
const message = this.formatArgs(logObj.args, opts);
|
|
5412
|
-
if (logObj.type === "box") return "\n" + [
|
|
5413
|
-
bracket(logObj.tag),
|
|
5414
|
-
logObj.title && logObj.title,
|
|
5415
|
-
...message.split("\n")
|
|
5416
|
-
].filter(Boolean).map((l2) => " > " + l2).join("\n") + "\n";
|
|
5417
|
-
return this.filterAndJoin([
|
|
5418
|
-
bracket(logObj.type),
|
|
5419
|
-
bracket(logObj.tag),
|
|
5420
|
-
message
|
|
5421
|
-
]);
|
|
5422
|
-
}
|
|
5423
|
-
log(logObj, ctx) {
|
|
5424
|
-
return writeStream(this.formatLogObj(logObj, {
|
|
5425
|
-
columns: ctx.options.stdout.columns || 0,
|
|
5426
|
-
...ctx.options.formatOptions
|
|
5427
|
-
}) + "\n", logObj.level < 2 ? ctx.options.stderr || process.stderr : ctx.options.stdout || process.stdout);
|
|
5428
|
-
}
|
|
5429
|
-
};
|
|
5430
|
-
var { env = {}, argv = [], platform = "" } = typeof process === "undefined" ? {} : process;
|
|
5431
|
-
var isDisabled = "NO_COLOR" in env || argv.includes("--no-color");
|
|
5432
|
-
var isForced = "FORCE_COLOR" in env || argv.includes("--color");
|
|
5433
|
-
var isWindows = platform === "win32";
|
|
5434
|
-
var isDumbTerminal = env.TERM === "dumb";
|
|
5435
|
-
var isCompatibleTerminal = tty && tty.isatty && tty.isatty(1) && env.TERM && !isDumbTerminal;
|
|
5436
|
-
var isCI = "CI" in env && ("GITHUB_ACTIONS" in env || "GITLAB_CI" in env || "CIRCLECI" in env);
|
|
5437
|
-
var isColorSupported = !isDisabled && (isForced || isWindows && !isDumbTerminal || isCompatibleTerminal || isCI);
|
|
5438
|
-
function replaceClose(index, string2, close, replace, head = string2.slice(0, Math.max(0, index)) + replace, tail = string2.slice(Math.max(0, index + close.length)), next = tail.indexOf(close)) {
|
|
5439
|
-
return head + (next < 0 ? tail : replaceClose(next, tail, close, replace));
|
|
5440
|
-
}
|
|
5441
|
-
function clearBleed(index, string2, open, close, replace) {
|
|
5442
|
-
return index < 0 ? open + string2 + close : open + replaceClose(index, string2, close, replace) + close;
|
|
5443
|
-
}
|
|
5444
|
-
function filterEmpty(open, close, replace = open, at = open.length + 1) {
|
|
5445
|
-
return (string2) => string2 || !(string2 === "" || string2 === void 0) ? clearBleed(("" + string2).indexOf(close, at), string2, open, close, replace) : "";
|
|
5446
|
-
}
|
|
5447
|
-
function init(open, close, replace) {
|
|
5448
|
-
return filterEmpty(`\x1B[${open}m`, `\x1B[${close}m`, replace);
|
|
5449
|
-
}
|
|
5450
|
-
var colorDefs = {
|
|
5451
|
-
reset: init(0, 0),
|
|
5452
|
-
bold: init(1, 22, "\x1B[22m\x1B[1m"),
|
|
5453
|
-
dim: init(2, 22, "\x1B[22m\x1B[2m"),
|
|
5454
|
-
italic: init(3, 23),
|
|
5455
|
-
underline: init(4, 24),
|
|
5456
|
-
inverse: init(7, 27),
|
|
5457
|
-
hidden: init(8, 28),
|
|
5458
|
-
strikethrough: init(9, 29),
|
|
5459
|
-
black: init(30, 39),
|
|
5460
|
-
red: init(31, 39),
|
|
5461
|
-
green: init(32, 39),
|
|
5462
|
-
yellow: init(33, 39),
|
|
5463
|
-
blue: init(34, 39),
|
|
5464
|
-
magenta: init(35, 39),
|
|
5465
|
-
cyan: init(36, 39),
|
|
5466
|
-
white: init(37, 39),
|
|
5467
|
-
gray: init(90, 39),
|
|
5468
|
-
bgBlack: init(40, 49),
|
|
5469
|
-
bgRed: init(41, 49),
|
|
5470
|
-
bgGreen: init(42, 49),
|
|
5471
|
-
bgYellow: init(43, 49),
|
|
5472
|
-
bgBlue: init(44, 49),
|
|
5473
|
-
bgMagenta: init(45, 49),
|
|
5474
|
-
bgCyan: init(46, 49),
|
|
5475
|
-
bgWhite: init(47, 49),
|
|
5476
|
-
blackBright: init(90, 39),
|
|
5477
|
-
redBright: init(91, 39),
|
|
5478
|
-
greenBright: init(92, 39),
|
|
5479
|
-
yellowBright: init(93, 39),
|
|
5480
|
-
blueBright: init(94, 39),
|
|
5481
|
-
magentaBright: init(95, 39),
|
|
5482
|
-
cyanBright: init(96, 39),
|
|
5483
|
-
whiteBright: init(97, 39),
|
|
5484
|
-
bgBlackBright: init(100, 49),
|
|
5485
|
-
bgRedBright: init(101, 49),
|
|
5486
|
-
bgGreenBright: init(102, 49),
|
|
5487
|
-
bgYellowBright: init(103, 49),
|
|
5488
|
-
bgBlueBright: init(104, 49),
|
|
5489
|
-
bgMagentaBright: init(105, 49),
|
|
5490
|
-
bgCyanBright: init(106, 49),
|
|
5491
|
-
bgWhiteBright: init(107, 49)
|
|
5492
|
-
};
|
|
5493
|
-
function createColors(useColor = isColorSupported) {
|
|
5494
|
-
return useColor ? colorDefs : Object.fromEntries(Object.keys(colorDefs).map((key) => [key, String]));
|
|
5495
|
-
}
|
|
5496
|
-
var colors = createColors();
|
|
5497
|
-
function getColor$1(color, fallback = "reset") {
|
|
5498
|
-
return colors[color] || colors[fallback];
|
|
5499
|
-
}
|
|
5500
|
-
var ansiRegex$1 = [String.raw`[\u001B\u009B][[\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\d\/#&.:=?%@~_]+)*|[a-zA-Z\d]+(?:;[-a-zA-Z\d\/#&.:=?%@~_]*)*)?\u0007)`, String.raw`(?:(?:\d{1,4}(?:;\d{0,4})*)?[\dA-PR-TZcf-nq-uy=><~]))`].join("|");
|
|
5501
|
-
function stripAnsi$1(text) {
|
|
5502
|
-
return text.replace(new RegExp(ansiRegex$1, "g"), "");
|
|
5503
|
-
}
|
|
5504
|
-
var boxStylePresets = {
|
|
5505
|
-
solid: {
|
|
5506
|
-
tl: "\u250C",
|
|
5507
|
-
tr: "\u2510",
|
|
5508
|
-
bl: "\u2514",
|
|
5509
|
-
br: "\u2518",
|
|
5510
|
-
h: "\u2500",
|
|
5511
|
-
v: "\u2502"
|
|
5512
|
-
},
|
|
5513
|
-
double: {
|
|
5514
|
-
tl: "\u2554",
|
|
5515
|
-
tr: "\u2557",
|
|
5516
|
-
bl: "\u255A",
|
|
5517
|
-
br: "\u255D",
|
|
5518
|
-
h: "\u2550",
|
|
5519
|
-
v: "\u2551"
|
|
5520
|
-
},
|
|
5521
|
-
doubleSingle: {
|
|
5522
|
-
tl: "\u2553",
|
|
5523
|
-
tr: "\u2556",
|
|
5524
|
-
bl: "\u2559",
|
|
5525
|
-
br: "\u255C",
|
|
5526
|
-
h: "\u2500",
|
|
5527
|
-
v: "\u2551"
|
|
5528
|
-
},
|
|
5529
|
-
doubleSingleRounded: {
|
|
5530
|
-
tl: "\u256D",
|
|
5531
|
-
tr: "\u256E",
|
|
5532
|
-
bl: "\u2570",
|
|
5533
|
-
br: "\u256F",
|
|
5534
|
-
h: "\u2500",
|
|
5535
|
-
v: "\u2551"
|
|
5536
|
-
},
|
|
5537
|
-
singleThick: {
|
|
5538
|
-
tl: "\u250F",
|
|
5539
|
-
tr: "\u2513",
|
|
5540
|
-
bl: "\u2517",
|
|
5541
|
-
br: "\u251B",
|
|
5542
|
-
h: "\u2501",
|
|
5543
|
-
v: "\u2503"
|
|
5544
|
-
},
|
|
5545
|
-
singleDouble: {
|
|
5546
|
-
tl: "\u2552",
|
|
5547
|
-
tr: "\u2555",
|
|
5548
|
-
bl: "\u2558",
|
|
5549
|
-
br: "\u255B",
|
|
5550
|
-
h: "\u2550",
|
|
5551
|
-
v: "\u2502"
|
|
5552
|
-
},
|
|
5553
|
-
singleDoubleRounded: {
|
|
5554
|
-
tl: "\u256D",
|
|
5555
|
-
tr: "\u256E",
|
|
5556
|
-
bl: "\u2570",
|
|
5557
|
-
br: "\u256F",
|
|
5558
|
-
h: "\u2550",
|
|
5559
|
-
v: "\u2502"
|
|
5560
|
-
},
|
|
5561
|
-
rounded: {
|
|
5562
|
-
tl: "\u256D",
|
|
5563
|
-
tr: "\u256E",
|
|
5564
|
-
bl: "\u2570",
|
|
5565
|
-
br: "\u256F",
|
|
5566
|
-
h: "\u2500",
|
|
5567
|
-
v: "\u2502"
|
|
5568
|
-
}
|
|
5569
|
-
};
|
|
5570
|
-
var defaultStyle = {
|
|
5571
|
-
borderColor: "white",
|
|
5572
|
-
borderStyle: "rounded",
|
|
5573
|
-
valign: "center",
|
|
5574
|
-
padding: 2,
|
|
5575
|
-
marginLeft: 1,
|
|
5576
|
-
marginTop: 1,
|
|
5577
|
-
marginBottom: 1
|
|
5578
|
-
};
|
|
5579
|
-
function box(text, _opts = {}) {
|
|
5580
|
-
const opts = {
|
|
5581
|
-
..._opts,
|
|
5582
|
-
style: {
|
|
5583
|
-
...defaultStyle,
|
|
5584
|
-
..._opts.style
|
|
5585
|
-
}
|
|
5586
|
-
};
|
|
5587
|
-
const textLines = text.split("\n");
|
|
5588
|
-
const boxLines = [];
|
|
5589
|
-
const _color = getColor$1(opts.style.borderColor);
|
|
5590
|
-
const borderStyle = { ...typeof opts.style.borderStyle === "string" ? boxStylePresets[opts.style.borderStyle] || boxStylePresets.solid : opts.style.borderStyle };
|
|
5591
|
-
if (_color) for (const key in borderStyle) borderStyle[key] = _color(borderStyle[key]);
|
|
5592
|
-
const paddingOffset = opts.style.padding % 2 === 0 ? opts.style.padding : opts.style.padding + 1;
|
|
5593
|
-
const height = textLines.length + paddingOffset;
|
|
5594
|
-
const width = Math.max(...textLines.map((line) => stripAnsi$1(line).length), opts.title ? stripAnsi$1(opts.title).length : 0) + paddingOffset;
|
|
5595
|
-
const widthOffset = width + paddingOffset;
|
|
5596
|
-
const leftSpace = opts.style.marginLeft > 0 ? " ".repeat(opts.style.marginLeft) : "";
|
|
5597
|
-
if (opts.style.marginTop > 0) boxLines.push("".repeat(opts.style.marginTop));
|
|
5598
|
-
if (opts.title) {
|
|
5599
|
-
const title = _color ? _color(opts.title) : opts.title;
|
|
5600
|
-
const left = borderStyle.h.repeat(Math.floor((width - stripAnsi$1(opts.title).length) / 2));
|
|
5601
|
-
const right = borderStyle.h.repeat(width - stripAnsi$1(opts.title).length - stripAnsi$1(left).length + paddingOffset);
|
|
5602
|
-
boxLines.push(`${leftSpace}${borderStyle.tl}${left}${title}${right}${borderStyle.tr}`);
|
|
5603
|
-
} else boxLines.push(`${leftSpace}${borderStyle.tl}${borderStyle.h.repeat(widthOffset)}${borderStyle.tr}`);
|
|
5604
|
-
const valignOffset = opts.style.valign === "center" ? Math.floor((height - textLines.length) / 2) : opts.style.valign === "top" ? height - textLines.length - paddingOffset : height - textLines.length;
|
|
5605
|
-
for (let i2 = 0; i2 < height; i2++) if (i2 < valignOffset || i2 >= valignOffset + textLines.length) boxLines.push(`${leftSpace}${borderStyle.v}${" ".repeat(widthOffset)}${borderStyle.v}`);
|
|
5606
|
-
else {
|
|
5607
|
-
const line = textLines[i2 - valignOffset];
|
|
5608
|
-
const left = " ".repeat(paddingOffset);
|
|
5609
|
-
const right = " ".repeat(width - stripAnsi$1(line).length);
|
|
5610
|
-
boxLines.push(`${leftSpace}${borderStyle.v}${left}${line}${right}${borderStyle.v}`);
|
|
5611
|
-
}
|
|
5612
|
-
boxLines.push(`${leftSpace}${borderStyle.bl}${borderStyle.h.repeat(widthOffset)}${borderStyle.br}`);
|
|
5613
|
-
if (opts.style.marginBottom > 0) boxLines.push("".repeat(opts.style.marginBottom));
|
|
5614
|
-
return boxLines.join("\n");
|
|
5615
|
-
}
|
|
5616
|
-
var r = /* @__PURE__ */ Object.create(null);
|
|
5617
|
-
var i = (e2) => globalThis.process?.env || import.meta.env || globalThis.Deno?.env.toObject() || globalThis.__env__ || (e2 ? r : globalThis);
|
|
5618
|
-
var o = new Proxy(r, {
|
|
5619
|
-
get(e2, s2) {
|
|
5620
|
-
return i()[s2] ?? r[s2];
|
|
5621
|
-
},
|
|
5622
|
-
has(e2, s2) {
|
|
5623
|
-
return s2 in i() || s2 in r;
|
|
5624
|
-
},
|
|
5625
|
-
set(e2, s2, E) {
|
|
5626
|
-
const B = i(true);
|
|
5627
|
-
return B[s2] = E, true;
|
|
5628
|
-
},
|
|
5629
|
-
deleteProperty(e2, s2) {
|
|
5630
|
-
if (!s2) return false;
|
|
5631
|
-
const E = i(true);
|
|
5632
|
-
return delete E[s2], true;
|
|
5633
|
-
},
|
|
5634
|
-
ownKeys() {
|
|
5635
|
-
const e2 = i(true);
|
|
5636
|
-
return Object.keys(e2);
|
|
5637
|
-
}
|
|
5638
|
-
});
|
|
5639
|
-
var t2 = typeof process < "u" && process.env && process.env.NODE_ENV || "";
|
|
5640
|
-
var f = [
|
|
5641
|
-
["APPVEYOR"],
|
|
5642
|
-
[
|
|
5643
|
-
"AWS_AMPLIFY",
|
|
5644
|
-
"AWS_APP_ID",
|
|
5645
|
-
{ ci: true }
|
|
5646
|
-
],
|
|
5647
|
-
["AZURE_PIPELINES", "SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],
|
|
5648
|
-
["AZURE_STATIC", "INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],
|
|
5649
|
-
["APPCIRCLE", "AC_APPCIRCLE"],
|
|
5650
|
-
["BAMBOO", "bamboo_planKey"],
|
|
5651
|
-
["BITBUCKET", "BITBUCKET_COMMIT"],
|
|
5652
|
-
["BITRISE", "BITRISE_IO"],
|
|
5653
|
-
["BUDDY", "BUDDY_WORKSPACE_ID"],
|
|
5654
|
-
["BUILDKITE"],
|
|
5655
|
-
["CIRCLE", "CIRCLECI"],
|
|
5656
|
-
["CIRRUS", "CIRRUS_CI"],
|
|
5657
|
-
[
|
|
5658
|
-
"CLOUDFLARE_PAGES",
|
|
5659
|
-
"CF_PAGES",
|
|
5660
|
-
{ ci: true }
|
|
5661
|
-
],
|
|
5662
|
-
["CODEBUILD", "CODEBUILD_BUILD_ARN"],
|
|
5663
|
-
["CODEFRESH", "CF_BUILD_ID"],
|
|
5664
|
-
["DRONE"],
|
|
5665
|
-
["DRONE", "DRONE_BUILD_EVENT"],
|
|
5666
|
-
["DSARI"],
|
|
5667
|
-
["GITHUB_ACTIONS"],
|
|
5668
|
-
["GITLAB", "GITLAB_CI"],
|
|
5669
|
-
["GITLAB", "CI_MERGE_REQUEST_ID"],
|
|
5670
|
-
["GOCD", "GO_PIPELINE_LABEL"],
|
|
5671
|
-
["LAYERCI"],
|
|
5672
|
-
["HUDSON", "HUDSON_URL"],
|
|
5673
|
-
["JENKINS", "JENKINS_URL"],
|
|
5674
|
-
["MAGNUM"],
|
|
5675
|
-
["NETLIFY"],
|
|
5676
|
-
[
|
|
5677
|
-
"NETLIFY",
|
|
5678
|
-
"NETLIFY_LOCAL",
|
|
5679
|
-
{ ci: false }
|
|
5680
|
-
],
|
|
5681
|
-
["NEVERCODE"],
|
|
5682
|
-
["RENDER"],
|
|
5683
|
-
["SAIL", "SAILCI"],
|
|
5684
|
-
["SEMAPHORE"],
|
|
5685
|
-
["SCREWDRIVER"],
|
|
5686
|
-
["SHIPPABLE"],
|
|
5687
|
-
["SOLANO", "TDDIUM"],
|
|
5688
|
-
["STRIDER"],
|
|
5689
|
-
["TEAMCITY", "TEAMCITY_VERSION"],
|
|
5690
|
-
["TRAVIS"],
|
|
5691
|
-
["VERCEL", "NOW_BUILDER"],
|
|
5692
|
-
[
|
|
5693
|
-
"VERCEL",
|
|
5694
|
-
"VERCEL",
|
|
5695
|
-
{ ci: false }
|
|
5696
|
-
],
|
|
5697
|
-
[
|
|
5698
|
-
"VERCEL",
|
|
5699
|
-
"VERCEL_ENV",
|
|
5700
|
-
{ ci: false }
|
|
5701
|
-
],
|
|
5702
|
-
["APPCENTER", "APPCENTER_BUILD_ID"],
|
|
5703
|
-
[
|
|
5704
|
-
"CODESANDBOX",
|
|
5705
|
-
"CODESANDBOX_SSE",
|
|
5706
|
-
{ ci: false }
|
|
5707
|
-
],
|
|
5708
|
-
[
|
|
5709
|
-
"CODESANDBOX",
|
|
5710
|
-
"CODESANDBOX_HOST",
|
|
5711
|
-
{ ci: false }
|
|
5712
|
-
],
|
|
5713
|
-
["STACKBLITZ"],
|
|
5714
|
-
["STORMKIT"],
|
|
5715
|
-
["CLEAVR"],
|
|
5716
|
-
["ZEABUR"],
|
|
5717
|
-
[
|
|
5718
|
-
"CODESPHERE",
|
|
5719
|
-
"CODESPHERE_APP_ID",
|
|
5720
|
-
{ ci: true }
|
|
5721
|
-
],
|
|
5722
|
-
["RAILWAY", "RAILWAY_PROJECT_ID"],
|
|
5723
|
-
["RAILWAY", "RAILWAY_SERVICE_ID"],
|
|
5724
|
-
["DENO-DEPLOY", "DENO_DEPLOYMENT_ID"],
|
|
5725
|
-
[
|
|
5726
|
-
"FIREBASE_APP_HOSTING",
|
|
5727
|
-
"FIREBASE_APP_HOSTING",
|
|
5728
|
-
{ ci: true }
|
|
5729
|
-
]
|
|
5730
|
-
];
|
|
5731
|
-
function b() {
|
|
5732
|
-
if (globalThis.process?.env) for (const e2 of f) {
|
|
5733
|
-
const s2 = e2[1] || e2[0];
|
|
5734
|
-
if (globalThis.process?.env[s2]) return {
|
|
5735
|
-
name: e2[0].toLowerCase(),
|
|
5736
|
-
...e2[2]
|
|
5737
|
-
};
|
|
5738
|
-
}
|
|
5739
|
-
return globalThis.process?.env?.SHELL === "/bin/jsh" && globalThis.process?.versions?.webcontainer ? {
|
|
5740
|
-
name: "stackblitz",
|
|
5741
|
-
ci: false
|
|
5742
|
-
} : {
|
|
5743
|
-
name: "",
|
|
5744
|
-
ci: false
|
|
5745
|
-
};
|
|
5746
|
-
}
|
|
5747
|
-
var l = b();
|
|
5748
|
-
l.name;
|
|
5749
|
-
function n2(e2) {
|
|
5750
|
-
return e2 ? e2 !== "false" : false;
|
|
5751
|
-
}
|
|
5752
|
-
var I = globalThis.process?.platform || "";
|
|
5753
|
-
var T = n2(o.CI) || l.ci !== false;
|
|
5754
|
-
var a = n2(globalThis.process?.stdout && globalThis.process?.stdout.isTTY);
|
|
5755
|
-
var g = n2(o.DEBUG);
|
|
5756
|
-
var R = t2 === "test" || n2(o.TEST);
|
|
5757
|
-
o.MINIMAL;
|
|
5758
|
-
var A = /^win/i.test(I);
|
|
5759
|
-
!n2(o.NO_COLOR) && (n2(o.FORCE_COLOR) || (a || A) && o.TERM);
|
|
5760
|
-
var C = (globalThis.process?.versions?.node || "").replace(/^v/, "") || null;
|
|
5761
|
-
Number(C?.split(".")[0]);
|
|
5762
|
-
var y = globalThis.process || /* @__PURE__ */ Object.create(null);
|
|
5763
|
-
var _ = { versions: {} };
|
|
5764
|
-
new Proxy(y, { get(e2, s2) {
|
|
5765
|
-
if (s2 === "env") return o;
|
|
5766
|
-
if (s2 in e2) return e2[s2];
|
|
5767
|
-
if (s2 in _) return _[s2];
|
|
5768
|
-
} });
|
|
5769
|
-
var c = globalThis.process?.release?.name === "node";
|
|
5770
|
-
var O = !!globalThis.Bun || !!globalThis.process?.versions?.bun;
|
|
5771
|
-
var D = !!globalThis.Deno;
|
|
5772
|
-
var L = !!globalThis.fastly;
|
|
5773
|
-
var S = !!globalThis.Netlify;
|
|
5774
|
-
var u = !!globalThis.EdgeRuntime;
|
|
5775
|
-
var N = globalThis.navigator?.userAgent === "Cloudflare-Workers";
|
|
5776
|
-
var F = [
|
|
5777
|
-
[S, "netlify"],
|
|
5778
|
-
[u, "edge-light"],
|
|
5779
|
-
[N, "workerd"],
|
|
5780
|
-
[L, "fastly"],
|
|
5781
|
-
[D, "deno"],
|
|
5782
|
-
[O, "bun"],
|
|
5783
|
-
[c, "node"]
|
|
5784
|
-
];
|
|
5785
|
-
function G() {
|
|
5786
|
-
const e2 = F.find((s2) => s2[0]);
|
|
5787
|
-
if (e2) return { name: e2[1] };
|
|
5788
|
-
}
|
|
5789
|
-
G()?.name;
|
|
5790
|
-
function ansiRegex({ onlyFirst = false } = {}) {
|
|
5791
|
-
const pattern = [`[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))`, "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");
|
|
5792
|
-
return new RegExp(pattern, onlyFirst ? void 0 : "g");
|
|
5793
|
-
}
|
|
5794
|
-
var regex = ansiRegex();
|
|
5795
|
-
function stripAnsi(string2) {
|
|
5796
|
-
if (typeof string2 !== "string") throw new TypeError(`Expected a \`string\`, got \`${typeof string2}\``);
|
|
5797
|
-
return string2.replace(regex, "");
|
|
5798
|
-
}
|
|
5799
|
-
function isAmbiguous(x) {
|
|
5800
|
-
return x === 161 || x === 164 || x === 167 || x === 168 || x === 170 || x === 173 || x === 174 || x >= 176 && x <= 180 || x >= 182 && x <= 186 || x >= 188 && x <= 191 || x === 198 || x === 208 || x === 215 || x === 216 || x >= 222 && x <= 225 || x === 230 || x >= 232 && x <= 234 || x === 236 || x === 237 || x === 240 || x === 242 || x === 243 || x >= 247 && x <= 250 || x === 252 || x === 254 || x === 257 || x === 273 || x === 275 || x === 283 || x === 294 || x === 295 || x === 299 || x >= 305 && x <= 307 || x === 312 || x >= 319 && x <= 322 || x === 324 || x >= 328 && x <= 331 || x === 333 || x === 338 || x === 339 || x === 358 || x === 359 || x === 363 || x === 462 || x === 464 || x === 466 || x === 468 || x === 470 || x === 472 || x === 474 || x === 476 || x === 593 || x === 609 || x === 708 || x === 711 || x >= 713 && x <= 715 || x === 717 || x === 720 || x >= 728 && x <= 731 || x === 733 || x === 735 || x >= 768 && x <= 879 || x >= 913 && x <= 929 || x >= 931 && x <= 937 || x >= 945 && x <= 961 || x >= 963 && x <= 969 || x === 1025 || x >= 1040 && x <= 1103 || x === 1105 || x === 8208 || x >= 8211 && x <= 8214 || x === 8216 || x === 8217 || x === 8220 || x === 8221 || x >= 8224 && x <= 8226 || x >= 8228 && x <= 8231 || x === 8240 || x === 8242 || x === 8243 || x === 8245 || x === 8251 || x === 8254 || x === 8308 || x === 8319 || x >= 8321 && x <= 8324 || x === 8364 || x === 8451 || x === 8453 || x === 8457 || x === 8467 || x === 8470 || x === 8481 || x === 8482 || x === 8486 || x === 8491 || x === 8531 || x === 8532 || x >= 8539 && x <= 8542 || x >= 8544 && x <= 8555 || x >= 8560 && x <= 8569 || x === 8585 || x >= 8592 && x <= 8601 || x === 8632 || x === 8633 || x === 8658 || x === 8660 || x === 8679 || x === 8704 || x === 8706 || x === 8707 || x === 8711 || x === 8712 || x === 8715 || x === 8719 || x === 8721 || x === 8725 || x === 8730 || x >= 8733 && x <= 8736 || x === 8739 || x === 8741 || x >= 8743 && x <= 8748 || x === 8750 || x >= 8756 && x <= 8759 || x === 8764 || x === 8765 || x === 8776 || x === 8780 || x === 8786 || x === 8800 || x === 8801 || x >= 8804 && x <= 8807 || x === 8810 || x === 8811 || x === 8814 || x === 8815 || x === 8834 || x === 8835 || x === 8838 || x === 8839 || x === 8853 || x === 8857 || x === 8869 || x === 8895 || x === 8978 || x >= 9312 && x <= 9449 || x >= 9451 && x <= 9547 || x >= 9552 && x <= 9587 || x >= 9600 && x <= 9615 || x >= 9618 && x <= 9621 || x === 9632 || x === 9633 || x >= 9635 && x <= 9641 || x === 9650 || x === 9651 || x === 9654 || x === 9655 || x === 9660 || x === 9661 || x === 9664 || x === 9665 || x >= 9670 && x <= 9672 || x === 9675 || x >= 9678 && x <= 9681 || x >= 9698 && x <= 9701 || x === 9711 || x === 9733 || x === 9734 || x === 9737 || x === 9742 || x === 9743 || x === 9756 || x === 9758 || x === 9792 || x === 9794 || x === 9824 || x === 9825 || x >= 9827 && x <= 9829 || x >= 9831 && x <= 9834 || x === 9836 || x === 9837 || x === 9839 || x === 9886 || x === 9887 || x === 9919 || x >= 9926 && x <= 9933 || x >= 9935 && x <= 9939 || x >= 9941 && x <= 9953 || x === 9955 || x === 9960 || x === 9961 || x >= 9963 && x <= 9969 || x === 9972 || x >= 9974 && x <= 9977 || x === 9979 || x === 9980 || x === 9982 || x === 9983 || x === 10045 || x >= 10102 && x <= 10111 || x >= 11094 && x <= 11097 || x >= 12872 && x <= 12879 || x >= 57344 && x <= 63743 || x >= 65024 && x <= 65039 || x === 65533 || x >= 127232 && x <= 127242 || x >= 127248 && x <= 127277 || x >= 127280 && x <= 127337 || x >= 127344 && x <= 127373 || x === 127375 || x === 127376 || x >= 127387 && x <= 127404 || x >= 917760 && x <= 917999 || x >= 983040 && x <= 1048573 || x >= 1048576 && x <= 1114109;
|
|
5801
|
-
}
|
|
5802
|
-
function isFullWidth(x) {
|
|
5803
|
-
return x === 12288 || x >= 65281 && x <= 65376 || x >= 65504 && x <= 65510;
|
|
5804
|
-
}
|
|
5805
|
-
function isWide(x) {
|
|
5806
|
-
return x >= 4352 && x <= 4447 || x === 8986 || x === 8987 || x === 9001 || x === 9002 || x >= 9193 && x <= 9196 || x === 9200 || x === 9203 || x === 9725 || x === 9726 || x === 9748 || x === 9749 || x >= 9776 && x <= 9783 || x >= 9800 && x <= 9811 || x === 9855 || x >= 9866 && x <= 9871 || x === 9875 || x === 9889 || x === 9898 || x === 9899 || x === 9917 || x === 9918 || x === 9924 || x === 9925 || x === 9934 || x === 9940 || x === 9962 || x === 9970 || x === 9971 || x === 9973 || x === 9978 || x === 9981 || x === 9989 || x === 9994 || x === 9995 || x === 10024 || x === 10060 || x === 10062 || x >= 10067 && x <= 10069 || x === 10071 || x >= 10133 && x <= 10135 || x === 10160 || x === 10175 || x === 11035 || x === 11036 || x === 11088 || x === 11093 || x >= 11904 && x <= 11929 || x >= 11931 && x <= 12019 || x >= 12032 && x <= 12245 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || x >= 12353 && x <= 12438 || x >= 12441 && x <= 12543 || x >= 12549 && x <= 12591 || x >= 12593 && x <= 12686 || x >= 12688 && x <= 12773 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 42124 || x >= 42128 && x <= 42182 || x >= 43360 && x <= 43388 || x >= 44032 && x <= 55203 || x >= 63744 && x <= 64255 || x >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 94176 && x <= 94180 || x === 94192 || x === 94193 || x >= 94208 && x <= 100343 || x >= 100352 && x <= 101589 || x >= 101631 && x <= 101640 || x >= 110576 && x <= 110579 || x >= 110581 && x <= 110587 || x === 110589 || x === 110590 || x >= 110592 && x <= 110882 || x === 110898 || x >= 110928 && x <= 110930 || x === 110933 || x >= 110948 && x <= 110951 || x >= 110960 && x <= 111355 || x >= 119552 && x <= 119638 || x >= 119648 && x <= 119670 || x === 126980 || x === 127183 || x === 127374 || x >= 127377 && x <= 127386 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x === 127568 || x === 127569 || x >= 127584 && x <= 127589 || x >= 127744 && x <= 127776 || x >= 127789 && x <= 127797 || x >= 127799 && x <= 127868 || x >= 127870 && x <= 127891 || x >= 127904 && x <= 127946 || x >= 127951 && x <= 127955 || x >= 127968 && x <= 127984 || x === 127988 || x >= 127992 && x <= 128062 || x === 128064 || x >= 128066 && x <= 128252 || x >= 128255 && x <= 128317 || x >= 128331 && x <= 128334 || x >= 128336 && x <= 128359 || x === 128378 || x === 128405 || x === 128406 || x === 128420 || x >= 128507 && x <= 128591 || x >= 128640 && x <= 128709 || x === 128716 || x >= 128720 && x <= 128722 || x >= 128725 && x <= 128727 || x >= 128732 && x <= 128735 || x === 128747 || x === 128748 || x >= 128756 && x <= 128764 || x >= 128992 && x <= 129003 || x === 129008 || x >= 129292 && x <= 129338 || x >= 129340 && x <= 129349 || x >= 129351 && x <= 129535 || x >= 129648 && x <= 129660 || x >= 129664 && x <= 129673 || x >= 129679 && x <= 129734 || x >= 129742 && x <= 129756 || x >= 129759 && x <= 129769 || x >= 129776 && x <= 129784 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;
|
|
5807
|
-
}
|
|
5808
|
-
function validate(codePoint) {
|
|
5809
|
-
if (!Number.isSafeInteger(codePoint)) throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
|
|
5810
|
-
}
|
|
5811
|
-
function eastAsianWidth(codePoint, { ambiguousAsWide = false } = {}) {
|
|
5812
|
-
validate(codePoint);
|
|
5813
|
-
if (isFullWidth(codePoint) || isWide(codePoint) || ambiguousAsWide && isAmbiguous(codePoint)) return 2;
|
|
5814
|
-
return 1;
|
|
5815
|
-
}
|
|
5816
|
-
var emojiRegex = () => {
|
|
5817
|
-
return /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;
|
|
5818
|
-
};
|
|
5819
|
-
var segmenter = globalThis.Intl?.Segmenter ? new Intl.Segmenter() : { segment: (str) => str.split("") };
|
|
5820
|
-
var defaultIgnorableCodePointRegex = new RegExp("^\\p{Default_Ignorable_Code_Point}$", "u");
|
|
5821
|
-
function stringWidth$1(string2, options = {}) {
|
|
5822
|
-
if (typeof string2 !== "string" || string2.length === 0) return 0;
|
|
5823
|
-
const { ambiguousIsNarrow = true, countAnsiEscapeCodes = false } = options;
|
|
5824
|
-
if (!countAnsiEscapeCodes) string2 = stripAnsi(string2);
|
|
5825
|
-
if (string2.length === 0) return 0;
|
|
5826
|
-
let width = 0;
|
|
5827
|
-
const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
|
|
5828
|
-
for (const { segment: character } of segmenter.segment(string2)) {
|
|
5829
|
-
const codePoint = character.codePointAt(0);
|
|
5830
|
-
if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) continue;
|
|
5831
|
-
if (codePoint >= 8203 && codePoint <= 8207 || codePoint === 65279) continue;
|
|
5832
|
-
if (codePoint >= 768 && codePoint <= 879 || codePoint >= 6832 && codePoint <= 6911 || codePoint >= 7616 && codePoint <= 7679 || codePoint >= 8400 && codePoint <= 8447 || codePoint >= 65056 && codePoint <= 65071) continue;
|
|
5833
|
-
if (codePoint >= 55296 && codePoint <= 57343) continue;
|
|
5834
|
-
if (codePoint >= 65024 && codePoint <= 65039) continue;
|
|
5835
|
-
if (defaultIgnorableCodePointRegex.test(character)) continue;
|
|
5836
|
-
if (emojiRegex().test(character)) {
|
|
5837
|
-
width += 2;
|
|
5838
|
-
continue;
|
|
5839
|
-
}
|
|
5840
|
-
width += eastAsianWidth(codePoint, eastAsianWidthOptions);
|
|
5841
|
-
}
|
|
5842
|
-
return width;
|
|
5843
|
-
}
|
|
5844
|
-
function isUnicodeSupported() {
|
|
5845
|
-
const { env: env2 } = g$1;
|
|
5846
|
-
const { TERM, TERM_PROGRAM } = env2;
|
|
5847
|
-
if (g$1.platform !== "win32") return TERM !== "linux";
|
|
5848
|
-
return Boolean(env2.WT_SESSION) || Boolean(env2.TERMINUS_SUBLIME) || env2.ConEmuTask === "{cmd::Cmder}" || TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env2.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
5849
|
-
}
|
|
5850
|
-
var TYPE_COLOR_MAP = {
|
|
5851
|
-
info: "cyan",
|
|
5852
|
-
fail: "red",
|
|
5853
|
-
success: "green",
|
|
5854
|
-
ready: "green",
|
|
5855
|
-
start: "magenta"
|
|
5856
|
-
};
|
|
5857
|
-
var LEVEL_COLOR_MAP = {
|
|
5858
|
-
0: "red",
|
|
5859
|
-
1: "yellow"
|
|
5860
|
-
};
|
|
5861
|
-
var unicode = isUnicodeSupported();
|
|
5862
|
-
var s = (c2, fallback) => unicode ? c2 : fallback;
|
|
5863
|
-
var TYPE_ICONS = {
|
|
5864
|
-
error: s("\u2716", "\xD7"),
|
|
5865
|
-
fatal: s("\u2716", "\xD7"),
|
|
5866
|
-
ready: s("\u2714", "\u221A"),
|
|
5867
|
-
warn: s("\u26A0", "\u203C"),
|
|
5868
|
-
info: s("\u2139", "i"),
|
|
5869
|
-
success: s("\u2714", "\u221A"),
|
|
5870
|
-
debug: s("\u2699", "D"),
|
|
5871
|
-
trace: s("\u2192", "\u2192"),
|
|
5872
|
-
fail: s("\u2716", "\xD7"),
|
|
5873
|
-
start: s("\u25D0", "o"),
|
|
5874
|
-
log: ""
|
|
5875
|
-
};
|
|
5876
|
-
function stringWidth(str) {
|
|
5877
|
-
if (!(typeof Intl === "object") || !Intl.Segmenter) return stripAnsi$1(str).length;
|
|
5878
|
-
return stringWidth$1(str);
|
|
5879
|
-
}
|
|
5880
|
-
var FancyReporter = class extends BasicReporter {
|
|
5881
|
-
formatStack(stack, message, opts) {
|
|
5882
|
-
const indent = " ".repeat((opts?.errorLevel || 0) + 1);
|
|
5883
|
-
return `
|
|
5884
|
-
${indent}` + parseStack(stack, message).map((line) => " " + line.replace(/^at +/, (m) => colors.gray(m)).replace(/\((.+)\)/, (_2, m) => `(${colors.cyan(m)})`)).join(`
|
|
5885
|
-
${indent}`);
|
|
5886
|
-
}
|
|
5887
|
-
formatType(logObj, isBadge, opts) {
|
|
5888
|
-
const typeColor = TYPE_COLOR_MAP[logObj.type] || LEVEL_COLOR_MAP[logObj.level] || "gray";
|
|
5889
|
-
if (isBadge) return getBgColor(typeColor)(colors.black(` ${logObj.type.toUpperCase()} `));
|
|
5890
|
-
const _type = typeof TYPE_ICONS[logObj.type] === "string" ? TYPE_ICONS[logObj.type] : logObj.icon || logObj.type;
|
|
5891
|
-
return _type ? getColor(typeColor)(_type) : "";
|
|
5892
|
-
}
|
|
5893
|
-
formatLogObj(logObj, opts) {
|
|
5894
|
-
const [message, ...additional] = this.formatArgs(logObj.args, opts).split("\n");
|
|
5895
|
-
if (logObj.type === "box") return box(characterFormat(message + (additional.length > 0 ? "\n" + additional.join("\n") : "")), {
|
|
5896
|
-
title: logObj.title ? characterFormat(logObj.title) : void 0,
|
|
5897
|
-
style: logObj.style
|
|
5898
|
-
});
|
|
5899
|
-
const date = this.formatDate(logObj.date, opts);
|
|
5900
|
-
const coloredDate = date && colors.gray(date);
|
|
5901
|
-
const isBadge = logObj.badge ?? logObj.level < 2;
|
|
5902
|
-
const type = this.formatType(logObj, isBadge, opts);
|
|
5903
|
-
const tag = logObj.tag ? colors.gray(logObj.tag) : "";
|
|
5904
|
-
let line;
|
|
5905
|
-
const left = this.filterAndJoin([type, characterFormat(message)]);
|
|
5906
|
-
const right = this.filterAndJoin(opts.columns ? [tag, coloredDate] : [tag]);
|
|
5907
|
-
const space = (opts.columns || 0) - stringWidth(left) - stringWidth(right) - 2;
|
|
5908
|
-
line = space > 0 && (opts.columns || 0) >= 80 ? left + " ".repeat(space) + right : (right ? `${colors.gray(`[${right}]`)} ` : "") + left;
|
|
5909
|
-
line += characterFormat(additional.length > 0 ? "\n" + additional.join("\n") : "");
|
|
5910
|
-
if (logObj.type === "trace") {
|
|
5911
|
-
const _err = /* @__PURE__ */ new Error("Trace: " + logObj.message);
|
|
5912
|
-
line += this.formatStack(_err.stack || "", _err.message);
|
|
5913
|
-
}
|
|
5914
|
-
return isBadge ? "\n" + line + "\n" : line;
|
|
5915
|
-
}
|
|
5916
|
-
};
|
|
5917
|
-
function characterFormat(str) {
|
|
5918
|
-
return str.replace(/`([^`]+)`/gm, (_2, m) => colors.cyan(m)).replace(/\s+_([^_]+)_\s+/gm, (_2, m) => ` ${colors.underline(m)} `);
|
|
5919
|
-
}
|
|
5920
|
-
function getColor(color = "white") {
|
|
5921
|
-
return colors[color] || colors.white;
|
|
5922
|
-
}
|
|
5923
|
-
function getBgColor(color = "bgWhite") {
|
|
5924
|
-
return colors[`bg${color[0].toUpperCase()}${color.slice(1)}`] || colors.bgWhite;
|
|
5925
|
-
}
|
|
5926
|
-
function createConsola(options = {}) {
|
|
5927
|
-
let level = _getDefaultLogLevel();
|
|
5928
|
-
if (process.env.CONSOLA_LEVEL) level = Number.parseInt(process.env.CONSOLA_LEVEL) ?? level;
|
|
5929
|
-
return createConsola$1({
|
|
5930
|
-
level,
|
|
5931
|
-
defaults: { level },
|
|
5932
|
-
stdout: process.stdout,
|
|
5933
|
-
stderr: process.stderr,
|
|
5934
|
-
prompt: (...args2) => import("./prompt-DkftHXS7-N7UENQ4C.js").then((m) => m.prompt(...args2)),
|
|
5935
|
-
reporters: options.reporters || [options.fancy ?? !(T || R) ? new FancyReporter() : new BasicReporter()],
|
|
5936
|
-
...options
|
|
5937
|
-
});
|
|
5938
|
-
}
|
|
5939
|
-
function _getDefaultLogLevel() {
|
|
5940
|
-
if (g) return LogLevels.debug;
|
|
5941
|
-
if (R) return LogLevels.warn;
|
|
5942
|
-
return LogLevels.info;
|
|
5943
|
-
}
|
|
5944
|
-
createConsola();
|
|
5945
|
-
var logger = process.env.ROLLDOWN_TEST ? createTestingLogger() : createConsola({ formatOptions: { date: false } });
|
|
5946
|
-
function createTestingLogger() {
|
|
5947
|
-
const types = [
|
|
5948
|
-
"silent",
|
|
5949
|
-
"fatal",
|
|
5950
|
-
"error",
|
|
5951
|
-
"warn",
|
|
5952
|
-
"log",
|
|
5953
|
-
"info",
|
|
5954
|
-
"success",
|
|
5955
|
-
"fail",
|
|
5956
|
-
"ready",
|
|
5957
|
-
"start",
|
|
5958
|
-
"box",
|
|
5959
|
-
"debug",
|
|
5960
|
-
"trace",
|
|
5961
|
-
"verbose"
|
|
5962
|
-
];
|
|
5963
|
-
const ret = /* @__PURE__ */ Object.create(null);
|
|
5964
|
-
for (const type of types) ret[type] = (...args2) => console.log(...args2);
|
|
5965
|
-
return ret;
|
|
5007
|
+
async function getWarn(outputOptions) {
|
|
5008
|
+
if (outputOptions.legalComments == null && outputOptions.inlineDynamicImports == null && outputOptions.advancedChunks == null && outputOptions.manualChunks == null) return (message) => console.warn(message);
|
|
5009
|
+
const { logger } = await import("./logger-LvdykevT-BQ5B4N5O.js").then((n) => n.n);
|
|
5010
|
+
return (message) => logger.warn(message);
|
|
5966
5011
|
}
|
|
5967
|
-
function bindingifyOutputOptions(outputOptions, pluginContextData, onLog, timings) {
|
|
5012
|
+
async function bindingifyOutputOptions(outputOptions, pluginContextData, onLog, timings) {
|
|
5968
5013
|
const { dir, charset, format, exports, hashCharacters, sourcemap, sourcemapBaseUrl, sourcemapDebugIds, sourcemapFileNames, sourcemapExcludeSources, sourcemapIgnoreList, sourcemapPathTransform, name, assetFileNames, entryFileNames, chunkFileNames, banner, footer, postBanner, postFooter, intro, outro, esModule, globals, paths, generatedCode, file, sanitizeFileName, preserveModules, virtualDirname, legalComments, comments, preserveModulesRoot, manualChunks, topLevelVar, cleanDir, strictExecutionOrder } = outputOptions;
|
|
5969
|
-
|
|
5970
|
-
|
|
5014
|
+
const warn = await getWarn(outputOptions);
|
|
5015
|
+
if (legalComments != null) warn("`legalComments` option is deprecated, please use `comments.legal` instead.");
|
|
5016
|
+
const { inlineDynamicImports, advancedChunks } = bindingifyCodeSplitting(outputOptions.codeSplitting, outputOptions.inlineDynamicImports, outputOptions.advancedChunks, manualChunks, pluginContextData, onLog, timings, warn);
|
|
5971
5017
|
return {
|
|
5972
5018
|
dir,
|
|
5973
5019
|
charset,
|
|
@@ -6076,40 +5122,40 @@ function bindingifyComments(comments) {
|
|
|
6076
5122
|
if (typeof comments === "boolean") return comments;
|
|
6077
5123
|
return comments;
|
|
6078
5124
|
}
|
|
6079
|
-
function bindingifyCodeSplitting(codeSplitting, inlineDynamicImportsOption, advancedChunks, manualChunks, pluginContextData, onLog, timings) {
|
|
5125
|
+
function bindingifyCodeSplitting(codeSplitting, inlineDynamicImportsOption, advancedChunks, manualChunks, pluginContextData, onLog, timings, warn) {
|
|
6080
5126
|
let inlineDynamicImports;
|
|
6081
5127
|
let effectiveChunksOption;
|
|
6082
5128
|
let migratedManualChunksGroup;
|
|
6083
5129
|
let chunksOptionName = "codeSplitting";
|
|
6084
5130
|
if (codeSplitting === false) {
|
|
6085
|
-
if (inlineDynamicImportsOption != null)
|
|
5131
|
+
if (inlineDynamicImportsOption != null) warn("`inlineDynamicImports` option is ignored because `codeSplitting: false` is set.");
|
|
6086
5132
|
if (manualChunks != null) throw new Error('Invalid configuration: "output.manualChunks" cannot be used when "output.codeSplitting" is set to false.');
|
|
6087
|
-
if (advancedChunks != null)
|
|
5133
|
+
if (advancedChunks != null) warn("`advancedChunks` option is ignored because `codeSplitting` is set to `false`.");
|
|
6088
5134
|
return {
|
|
6089
5135
|
inlineDynamicImports: true,
|
|
6090
5136
|
advancedChunks: void 0
|
|
6091
5137
|
};
|
|
6092
5138
|
} else if (codeSplitting === true) {
|
|
6093
|
-
if (inlineDynamicImportsOption != null)
|
|
5139
|
+
if (inlineDynamicImportsOption != null) warn("`inlineDynamicImports` option is ignored because `codeSplitting: true` is set.");
|
|
6094
5140
|
} else if (codeSplitting == null) {
|
|
6095
5141
|
if (inlineDynamicImportsOption != null) {
|
|
6096
|
-
|
|
5142
|
+
warn("`inlineDynamicImports` option is deprecated, please use `codeSplitting: false` instead.");
|
|
6097
5143
|
inlineDynamicImports = inlineDynamicImportsOption;
|
|
6098
5144
|
}
|
|
6099
5145
|
} else {
|
|
6100
5146
|
effectiveChunksOption = codeSplitting;
|
|
6101
5147
|
chunksOptionName = "codeSplitting";
|
|
6102
|
-
if (inlineDynamicImportsOption != null)
|
|
5148
|
+
if (inlineDynamicImportsOption != null) warn("`inlineDynamicImports` option is ignored because the `codeSplitting` option is specified.");
|
|
6103
5149
|
}
|
|
6104
5150
|
if (inlineDynamicImports === true && manualChunks != null) throw new Error('Invalid value "true" for option "output.inlineDynamicImports" - this option is not supported for "output.manualChunks".');
|
|
6105
5151
|
if (effectiveChunksOption == null) {
|
|
6106
5152
|
if (advancedChunks != null) {
|
|
6107
|
-
|
|
5153
|
+
warn("`advancedChunks` option is deprecated, please use `codeSplitting` instead.");
|
|
6108
5154
|
effectiveChunksOption = advancedChunks;
|
|
6109
5155
|
chunksOptionName = "advancedChunks";
|
|
6110
5156
|
}
|
|
6111
|
-
} else if (advancedChunks != null)
|
|
6112
|
-
if (manualChunks != null && effectiveChunksOption != null)
|
|
5157
|
+
} else if (advancedChunks != null) warn("`advancedChunks` option is ignored because the `codeSplitting` option is specified.");
|
|
5158
|
+
if (manualChunks != null && effectiveChunksOption != null) warn("`manualChunks` option is ignored because the `codeSplitting` option is specified.");
|
|
6113
5159
|
else if (manualChunks != null) {
|
|
6114
5160
|
chunksOptionName = "manualChunks";
|
|
6115
5161
|
migratedManualChunksGroup = { name(moduleId, ctx) {
|
|
@@ -6118,7 +5164,7 @@ function bindingifyCodeSplitting(codeSplitting, inlineDynamicImportsOption, adva
|
|
|
6118
5164
|
effectiveChunksOption = { groups: [migratedManualChunksGroup] };
|
|
6119
5165
|
}
|
|
6120
5166
|
if (inlineDynamicImports === true && effectiveChunksOption != null) {
|
|
6121
|
-
|
|
5167
|
+
warn("`advancedChunks` option is ignored because `inlineDynamicImports: true` disables code splitting.");
|
|
6122
5168
|
effectiveChunksOption = void 0;
|
|
6123
5169
|
}
|
|
6124
5170
|
let advancedChunksResult;
|
|
@@ -6250,7 +5296,7 @@ async function initializeParallelPlugins(plugins) {
|
|
|
6250
5296
|
};
|
|
6251
5297
|
}
|
|
6252
5298
|
function initializeWorkers(registryId, count, pluginInfos) {
|
|
6253
|
-
return Promise.all(Array.from({ length: count }, (
|
|
5299
|
+
return Promise.all(Array.from({ length: count }, (_, i) => initializeWorker(registryId, pluginInfos, i)));
|
|
6254
5300
|
}
|
|
6255
5301
|
async function initializeWorker(registryId, pluginInfos, threadNumber) {
|
|
6256
5302
|
const urlString = import.meta.resolve("#parallel-plugin-worker");
|
|
@@ -6270,9 +5316,9 @@ async function initializeWorker(registryId, pluginInfos, threadNumber) {
|
|
|
6270
5316
|
});
|
|
6271
5317
|
});
|
|
6272
5318
|
return worker;
|
|
6273
|
-
} catch (
|
|
5319
|
+
} catch (e) {
|
|
6274
5320
|
worker?.terminate();
|
|
6275
|
-
throw
|
|
5321
|
+
throw e;
|
|
6276
5322
|
}
|
|
6277
5323
|
}
|
|
6278
5324
|
var availableParallelism = () => {
|
|
@@ -6308,20 +5354,20 @@ async function createBundlerOptions(inputOptions, outputOptions, watchMode, meas
|
|
|
6308
5354
|
return {
|
|
6309
5355
|
bundlerOptions: {
|
|
6310
5356
|
inputOptions: bindingifyInputOptions(plugins, inputOptions, outputOptions, pluginContextData, normalizedOutputPlugins, onLog, logLevel, watchMode, timings),
|
|
6311
|
-
outputOptions: bindingifyOutputOptions(outputOptions, pluginContextData, onLog, timings),
|
|
5357
|
+
outputOptions: await bindingifyOutputOptions(outputOptions, pluginContextData, onLog, timings),
|
|
6312
5358
|
parallelPluginsRegistry: parallelPluginInitResult?.registry
|
|
6313
5359
|
},
|
|
6314
5360
|
inputOptions,
|
|
6315
5361
|
onLog,
|
|
6316
5362
|
stopWorkers: parallelPluginInitResult?.stopWorkers
|
|
6317
5363
|
};
|
|
6318
|
-
} catch (
|
|
5364
|
+
} catch (e) {
|
|
6319
5365
|
await parallelPluginInitResult?.stopWorkers();
|
|
6320
|
-
throw
|
|
5366
|
+
throw e;
|
|
6321
5367
|
}
|
|
6322
5368
|
}
|
|
6323
5369
|
|
|
6324
|
-
// node_modules/.pnpm/rolldown@1.2.
|
|
5370
|
+
// node_modules/.pnpm/rolldown@1.2.16/node_modules/rolldown/dist/shared/watch-DVnOWncA.mjs
|
|
6325
5371
|
var signals = [];
|
|
6326
5372
|
signals.push("SIGHUP", "SIGINT", "SIGTERM");
|
|
6327
5373
|
if (process.platform !== "win32") signals.push("SIGALRM", "SIGABRT", "SIGVTALRM", "SIGXCPU", "SIGXFSZ", "SIGUSR2", "SIGTRAP", "SIGSYS", "SIGQUIT", "SIGIOT");
|
|
@@ -6355,10 +5401,10 @@ var Emitter = class {
|
|
|
6355
5401
|
}
|
|
6356
5402
|
removeListener(ev, fn) {
|
|
6357
5403
|
const list = this.listeners[ev];
|
|
6358
|
-
const
|
|
6359
|
-
if (
|
|
6360
|
-
if (
|
|
6361
|
-
else list.splice(
|
|
5404
|
+
const i = list.indexOf(fn);
|
|
5405
|
+
if (i === -1) return;
|
|
5406
|
+
if (i === 0 && list.length === 1) list.length = 0;
|
|
5407
|
+
else list.splice(i, 1);
|
|
6362
5408
|
}
|
|
6363
5409
|
emit(ev, code2, signal) {
|
|
6364
5410
|
if (this.emitted[ev]) return false;
|
|
@@ -6416,8 +5462,8 @@ var SignalExit = class extends SignalExitBase {
|
|
|
6416
5462
|
if (listeners.length === count) {
|
|
6417
5463
|
this.unload();
|
|
6418
5464
|
const ret = this.#emitter.emit("exit", null, sig);
|
|
6419
|
-
const
|
|
6420
|
-
if (!ret) process2.kill(process2.pid,
|
|
5465
|
+
const s = sig === "SIGHUP" ? this.#hupSig : sig;
|
|
5466
|
+
if (!ret) process2.kill(process2.pid, s);
|
|
6421
5467
|
}
|
|
6422
5468
|
};
|
|
6423
5469
|
this.#originalProcessReallyExit = process2.reallyExit;
|
|
@@ -6441,10 +5487,10 @@ var SignalExit = class extends SignalExitBase {
|
|
|
6441
5487
|
for (const sig of signals) try {
|
|
6442
5488
|
const fn = this.#sigListeners[sig];
|
|
6443
5489
|
if (fn) this.#process.on(sig, fn);
|
|
6444
|
-
} catch (
|
|
5490
|
+
} catch (_) {
|
|
6445
5491
|
}
|
|
6446
|
-
this.#process.emit = (ev, ...
|
|
6447
|
-
return this.#processEmit(ev, ...
|
|
5492
|
+
this.#process.emit = (ev, ...a) => {
|
|
5493
|
+
return this.#processEmit(ev, ...a);
|
|
6448
5494
|
};
|
|
6449
5495
|
this.#process.reallyExit = (code2) => {
|
|
6450
5496
|
return this.#processReallyExit(code2);
|
|
@@ -6458,7 +5504,7 @@ var SignalExit = class extends SignalExitBase {
|
|
|
6458
5504
|
if (!listener) throw new Error("Listener not defined for signal: " + sig);
|
|
6459
5505
|
try {
|
|
6460
5506
|
this.#process.removeListener(sig, listener);
|
|
6461
|
-
} catch (
|
|
5507
|
+
} catch (_) {
|
|
6462
5508
|
}
|
|
6463
5509
|
});
|
|
6464
5510
|
this.#process.emit = this.#originalProcessEmit;
|
|
@@ -6620,7 +5666,7 @@ function watch(input) {
|
|
|
6620
5666
|
return emitter;
|
|
6621
5667
|
}
|
|
6622
5668
|
|
|
6623
|
-
// node_modules/.pnpm/rolldown@1.2.
|
|
5669
|
+
// node_modules/.pnpm/rolldown@1.2.16/node_modules/rolldown/dist/shared/rolldown-DWd2aEL4.mjs
|
|
6624
5670
|
var import_binding6 = /* @__PURE__ */ __toESM(require_binding(), 1);
|
|
6625
5671
|
var RolldownOutputImpl = class extends PlainObjectLike {
|
|
6626
5672
|
bindingOutputs;
|
|
@@ -6634,8 +5680,8 @@ var RolldownOutputImpl = class extends PlainObjectLike {
|
|
|
6634
5680
|
}
|
|
6635
5681
|
__rolldown_external_memory_handle__(keepDataAlive) {
|
|
6636
5682
|
const results = this.output.map((item) => item.__rolldown_external_memory_handle__(keepDataAlive));
|
|
6637
|
-
if (!results.every((
|
|
6638
|
-
const reasons = results.filter((
|
|
5683
|
+
if (!results.every((r) => r.freed)) {
|
|
5684
|
+
const reasons = results.filter((r) => !r.freed).map((r) => r.reason).filter(Boolean);
|
|
6639
5685
|
return {
|
|
6640
5686
|
freed: false,
|
|
6641
5687
|
reason: `Failed to free ${reasons.length} item(s): ${reasons.join("; ")}`
|
|
@@ -6754,9 +5800,9 @@ var RolldownBuild = class {
|
|
|
6754
5800
|
if (isWrite) output = await this.#bundler.write(option.bundlerOptions);
|
|
6755
5801
|
else output = await this.#bundler.generate(option.bundlerOptions);
|
|
6756
5802
|
return new RolldownOutputImpl(unwrapBindingResult(output));
|
|
6757
|
-
} catch (
|
|
5803
|
+
} catch (e) {
|
|
6758
5804
|
await option.stopWorkers?.();
|
|
6759
|
-
throw
|
|
5805
|
+
throw e;
|
|
6760
5806
|
}
|
|
6761
5807
|
}
|
|
6762
5808
|
};
|
|
@@ -6765,12 +5811,12 @@ var rolldown = async (input) => {
|
|
|
6765
5811
|
return new RolldownBuild(await PluginDriver.callOptionsHook(input));
|
|
6766
5812
|
};
|
|
6767
5813
|
|
|
6768
|
-
// node_modules/.pnpm/rolldown@1.2.
|
|
5814
|
+
// node_modules/.pnpm/rolldown@1.2.16/node_modules/rolldown/dist/shared/define-config-BQBrxnNZ.mjs
|
|
6769
5815
|
function defineConfig(config) {
|
|
6770
5816
|
return config;
|
|
6771
5817
|
}
|
|
6772
5818
|
|
|
6773
|
-
// node_modules/.pnpm/rolldown@1.2.
|
|
5819
|
+
// node_modules/.pnpm/rolldown@1.2.16/node_modules/rolldown/dist/index.mjs
|
|
6774
5820
|
import { isMainThread } from "node:worker_threads";
|
|
6775
5821
|
var import_binding7 = /* @__PURE__ */ __toESM(require_binding(), 1);
|
|
6776
5822
|
if (isMainThread) {
|