@voidzero-dev/vite-plus-core 0.1.2 → 0.1.4
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/rolldown/cli.mjs +619 -197
- package/dist/rolldown/config.d.mts +1 -1
- package/dist/rolldown/config.mjs +10 -11
- package/dist/rolldown/experimental-index.d.mts +20 -6
- package/dist/rolldown/experimental-index.mjs +24 -22
- package/dist/rolldown/filter-index.d.mts +1 -1
- package/dist/rolldown/filter-index.mjs +2 -8
- package/dist/rolldown/get-log-filter.mjs +1 -2
- package/dist/rolldown/index.d.mts +3 -3
- package/dist/rolldown/index.mjs +10 -13
- package/dist/rolldown/parallel-plugin-worker.mjs +7 -9
- package/dist/rolldown/parallel-plugin.d.mts +1 -1
- package/dist/rolldown/parallel-plugin.mjs +1 -2
- package/dist/rolldown/parse-ast-index.d.mts +1 -1
- package/dist/rolldown/parse-ast-index.mjs +4 -6
- package/dist/rolldown/plugins-index.d.mts +3 -3
- package/dist/rolldown/plugins-index.mjs +4 -6
- package/dist/rolldown/shared/{binding-Bd04_f8P.mjs → binding-BSVL02lq.mjs} +7 -16
- package/dist/rolldown/shared/{binding-C4ZlFAt6.d.mts → binding-BohGL_65.d.mts} +10 -5
- package/dist/rolldown/shared/{bindingify-input-options-ffqkmT9z.mjs → bindingify-input-options-DkwIzK4F.mjs} +36 -56
- package/dist/rolldown/shared/{constructors-cPsD1J5w.d.mts → constructors-Bnr_ApVf.d.mts} +2 -2
- package/dist/rolldown/shared/{constructors-C5a55nbY.mjs → constructors-D91FHkmz.mjs} +2 -4
- package/dist/rolldown/shared/{define-config-DX_4SBzo.d.mts → define-config-B1jccsL9.d.mts} +84 -30
- package/dist/rolldown/shared/{define-config-BMj_QknW.mjs → define-config-DJOr6Iwt.mjs} +1 -2
- package/dist/rolldown/shared/{error-BYPsvVEN.mjs → error-tpgdcGrK.mjs} +3 -8
- package/dist/rolldown/shared/{load-config-Oj1-3DPg.mjs → load-config-Dapgaecf.mjs} +2 -4
- package/dist/rolldown/shared/{logs-CCc_0vhs.mjs → logs-D80CXhvg.mjs} +5 -8
- package/dist/rolldown/shared/{misc-Xty885dB.mjs → misc-DJYbNKZX.mjs} +1 -2
- package/dist/rolldown/shared/{normalize-string-or-regex-DoNa0azR.mjs → normalize-string-or-regex-BCllTl21.mjs} +3 -6
- package/dist/rolldown/shared/{parse-Wj8OTS4w.mjs → parse-DFYpKkKl.mjs} +2 -5
- package/dist/rolldown/shared/{prompt-CmNr0AI-.mjs → prompt-DZIXsnf9.mjs} +1 -3
- package/dist/rolldown/shared/{rolldown-y9H0nYAD.mjs → rolldown-DK6iIJl8.mjs} +2 -4
- package/dist/rolldown/shared/{rolldown-build-DkOWV5Vu.mjs → rolldown-build-rw0HCMhn.mjs} +427 -473
- package/dist/rolldown/shared/{transform-D55YcCvB.mjs → transform-BSCulZAO.mjs} +3 -6
- package/dist/rolldown/shared/{transform-DoG7c5_r.d.mts → transform-BoJxrM-e.d.mts} +1 -1
- package/dist/rolldown/shared/{watch-CVufTfok.mjs → watch-D8uEZyLj.mjs} +71 -77
- package/dist/rolldown/utils-index.d.mts +2 -2
- package/dist/rolldown/utils-index.mjs +9 -18
- package/dist/tsdown/{build-TmLngPCw-I7MHSf0I.js → build-BG-XbM6V-hoyhQqI3.js} +87 -292
- package/dist/tsdown/build-DHPfiKA--CvTonTfC.js +5 -0
- package/dist/tsdown/{chunk-CdeBBKNj.js → chunk-CSNpwdVU.js} +13 -23
- package/dist/tsdown/{debug-tOJ_PtrM-DITcI9An.js → debug-C4FmgzkJ-B6m_gRpz.js} +4 -6
- package/dist/tsdown/{detect-DK-FDZQ9-CALXiuJa.js → detect-J1_Vd1yf-BWDiPZkP.js} +2 -4
- package/dist/tsdown/{dist-uzMTIu3J.js → dist-C9Oecl0H.js} +24 -56
- package/dist/tsdown/{dist-DVPyDO-_.js → dist-Dx-jtFHM.js} +5 -10
- package/dist/tsdown/{dist-kuoe97DJ.js → dist-_l70jCqI.js} +1 -2
- package/dist/tsdown/{filename-C2azOotK.js → filename-tIvGuRvQ.js} +1 -3
- package/dist/tsdown/{index-node-Djp92Gzb-fgHTblzo.js → index-node-Bpsmc0eX-jMz9gD3P.js} +2 -4
- package/dist/tsdown/index-types.d.ts +8561 -180
- package/dist/tsdown/index.js +7 -9
- package/dist/tsdown/{main-BWoReXjl.js → main-DN-_H9u2.js} +8 -23
- package/dist/tsdown/{node-Ba_UB_xO.js → node-B3Gdtau1.js} +1 -4
- package/dist/tsdown/npm_cjs_chunk_chunk.cjs +6 -8
- package/dist/tsdown/npm_cjs_chunk_lt.cjs +13 -16
- package/dist/tsdown/npm_cjs_chunk_range.cjs +16 -28
- package/dist/tsdown/npm_cjs_chunk_semver.cjs +40 -52
- package/dist/tsdown/npm_entry_picomatch.cjs +18 -30
- package/dist/tsdown/npm_entry_semver_functions_coerce.cjs +3 -7
- package/dist/tsdown/npm_entry_semver_functions_lt.cjs +3 -5
- package/dist/tsdown/npm_entry_semver_functions_satisfies.cjs +5 -8
- package/dist/tsdown/npm_entry_semver_ranges_min-version.cjs +5 -8
- package/dist/tsdown/npm_entry_tree-kill.cjs +2 -6
- package/dist/tsdown/{resolver-CdD-yT15-OWjlgV0D.js → resolver-CdD-yT15-3eaymYLw.js} +2 -4
- package/dist/tsdown/run.js +6 -12
- package/dist/tsdown/{tsc-D6YfZJBZ.js → tsc-OwK9UHsV.js} +4 -6
- package/dist/tsdown/{tsc-context-CGmk4Cps.js → tsc-context-DiIjfXAG.js} +2 -4
- package/dist/vite/client/client.mjs +116 -19
- package/dist/vite/client/env.mjs +1 -2
- package/dist/vite/node/chunks/build.js +2 -3
- package/dist/vite/node/chunks/build2.js +91 -243
- package/dist/vite/node/chunks/chunk.js +7 -13
- package/dist/vite/node/chunks/config.js +2 -3
- package/dist/vite/node/chunks/dist.js +27 -61
- package/dist/vite/node/chunks/dist2.js +11 -95
- package/dist/vite/node/chunks/lib.js +1 -7
- package/dist/vite/node/chunks/logger.js +4 -9
- package/dist/vite/node/chunks/node.js +956 -918
- package/dist/vite/node/chunks/optimizer.js +2 -3
- package/dist/vite/node/chunks/postcss-import.js +1 -13
- package/dist/vite/node/chunks/preview.js +2 -3
- package/dist/vite/node/chunks/server.js +2 -3
- package/dist/vite/node/cli.js +202 -67
- package/dist/vite/node/index.d.ts +17 -14
- package/dist/vite/node/index.js +2 -3
- package/dist/vite/node/internal.js +1 -2
- package/dist/vite/node/module-runner.d.ts +5 -1
- package/dist/vite/node/module-runner.js +44 -3
- package/dist/vite/types/customEvent.d.ts +27 -0
- package/package.json +10 -10
- package/dist/rolldown/cli-setup.d.mts +0 -1
- package/dist/rolldown/cli-setup.mjs +0 -17
- package/dist/tsdown/build-gOkJM1H9-BRI3DQle.js +0 -6
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { r as __toESM, t as __commonJSMin } from "./chunk-
|
|
2
|
-
import { C as resolveComma, E as toArray, S as promiseWithResolvers, T as slash, _ as debounce, a as createLogger, b as noop, c as globalLogger, d as bold, f as dim, g as yellow, h as underline, i as LogLevels, l as prettyFormat, m as red, n as q, o as generateColor, p as green, r as version, s as getNameLabel, t as K, u as blue, v as importWithError, w as resolveRegex, x as pkgExists, y as matchPattern } from "./main-
|
|
3
|
-
import { t as createDebug } from "./node-
|
|
4
|
-
import { i as RE_JS, n as RE_DTS, o as RE_NODE_MODULES$1, t as RE_CSS
|
|
1
|
+
import { r as __toESM, t as __commonJSMin } from "./chunk-CSNpwdVU.js";
|
|
2
|
+
import { C as resolveComma, E as toArray, S as promiseWithResolvers, T as slash, _ as debounce, a as createLogger, b as noop, c as globalLogger, d as bold, f as dim, g as yellow, h as underline, i as LogLevels, l as prettyFormat, m as red, n as q, o as generateColor, p as green, r as version, s as getNameLabel, t as K, u as blue, v as importWithError, w as resolveRegex, x as pkgExists, y as matchPattern } from "./main-DN-_H9u2.js";
|
|
3
|
+
import { t as createDebug } from "./node-B3Gdtau1.js";
|
|
4
|
+
import { i as RE_JS, n as RE_DTS, o as RE_NODE_MODULES$1, t as RE_CSS } from "./filename-tIvGuRvQ.js";
|
|
5
5
|
import module$1, { builtinModules, createRequire, isBuiltin } from "node:module";
|
|
6
|
-
import {
|
|
6
|
+
import { pathToFileURL } from "node:url";
|
|
7
7
|
import process$1, { env } from "node:process";
|
|
8
8
|
import readline from "node:readline";
|
|
9
9
|
import { formatWithOptions, inspect, promisify } from "node:util";
|
|
@@ -21,8 +21,7 @@ import fs$1, { existsSync, readFileSync, writeFileSync } from "node:fs";
|
|
|
21
21
|
import { Buffer } from "node:buffer";
|
|
22
22
|
import { brotliCompress, gzip } from "node:zlib";
|
|
23
23
|
import { importGlobPlugin } from "@voidzero-dev/vite-plus-core/rolldown/experimental";
|
|
24
|
-
|
|
25
|
-
//#region ../../node_modules/.pnpm/tsdown@0.21.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.0_@tsdown+exe@0.21.0_@type_743816f26d68021f6369d2afb428dae9/node_modules/tsdown/dist/format-CM79ZE77.mjs
|
|
24
|
+
//#region ../../node_modules/.pnpm/tsdown@0.21.1_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.1_@tsdown+exe@0.21.1_@type_441010dc1e356451b27baacd78ca9eda/node_modules/tsdown/dist/fs-Dd6Htx2P.mjs
|
|
26
25
|
function fsExists(path) {
|
|
27
26
|
return access(path).then(() => true, () => false);
|
|
28
27
|
}
|
|
@@ -64,6 +63,8 @@ function stripExtname(filePath) {
|
|
|
64
63
|
if (!ext.length) return filePath;
|
|
65
64
|
return filePath.slice(0, -ext.length);
|
|
66
65
|
}
|
|
66
|
+
//#endregion
|
|
67
|
+
//#region ../../node_modules/.pnpm/tsdown@0.21.1_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.1_@tsdown+exe@0.21.1_@type_441010dc1e356451b27baacd78ca9eda/node_modules/tsdown/dist/format-CEIo9KZy.mjs
|
|
67
68
|
const shimFile = path.resolve(import.meta.dirname, "..", "esm-shims.js");
|
|
68
69
|
function getShimsInject(format, platform) {
|
|
69
70
|
if (format === "es" && platform === "node") return {
|
|
@@ -213,27 +214,6 @@ function detectIndentation(jsonText) {
|
|
|
213
214
|
}
|
|
214
215
|
return 2;
|
|
215
216
|
}
|
|
216
|
-
|
|
217
|
-
//#endregion
|
|
218
|
-
//#region ../../node_modules/.pnpm/tsdown@0.21.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.0_@tsdown+exe@0.21.0_@type_743816f26d68021f6369d2afb428dae9/node_modules/tsdown/dist/css-CzF_A79W.mjs
|
|
219
|
-
const defaultCssBundleName = "style.css";
|
|
220
|
-
function resolveCssOptions(options = {}, topLevelTarget) {
|
|
221
|
-
let cssTarget;
|
|
222
|
-
if (options.target === false) cssTarget = void 0;
|
|
223
|
-
else if (options.target == null) cssTarget = topLevelTarget;
|
|
224
|
-
else cssTarget = resolveComma(toArray(options.target));
|
|
225
|
-
return {
|
|
226
|
-
transformer: options.transformer ?? "lightningcss",
|
|
227
|
-
splitting: options.splitting ?? false,
|
|
228
|
-
fileName: options.fileName ?? "style.css",
|
|
229
|
-
minify: options.minify ?? false,
|
|
230
|
-
target: cssTarget,
|
|
231
|
-
preprocessorOptions: options.preprocessorOptions,
|
|
232
|
-
lightningcss: options.lightningcss,
|
|
233
|
-
postcss: options.postcss
|
|
234
|
-
};
|
|
235
|
-
}
|
|
236
|
-
|
|
237
217
|
//#endregion
|
|
238
218
|
//#region ../../node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs
|
|
239
219
|
function isPlainObject(value) {
|
|
@@ -261,20 +241,19 @@ function _defu(baseObject, defaults, namespace = ".", merger) {
|
|
|
261
241
|
function createDefu(merger) {
|
|
262
242
|
return (...arguments_) => arguments_.reduce((p, c) => _defu(p, c, "", merger), {});
|
|
263
243
|
}
|
|
264
|
-
|
|
265
|
-
|
|
244
|
+
createDefu();
|
|
245
|
+
createDefu((object, key, currentValue) => {
|
|
266
246
|
if (object[key] !== void 0 && typeof currentValue === "function") {
|
|
267
247
|
object[key] = currentValue(object[key]);
|
|
268
248
|
return true;
|
|
269
249
|
}
|
|
270
250
|
});
|
|
271
|
-
|
|
251
|
+
createDefu((object, key, currentValue) => {
|
|
272
252
|
if (Array.isArray(object[key]) && typeof currentValue === "function") {
|
|
273
253
|
object[key] = currentValue(object[key]);
|
|
274
254
|
return true;
|
|
275
255
|
}
|
|
276
256
|
});
|
|
277
|
-
|
|
278
257
|
//#endregion
|
|
279
258
|
//#region ../../node_modules/.pnpm/fdir@6.5.0_picomatch@4.0.3/node_modules/fdir/dist/index.mjs
|
|
280
259
|
var __require$1 = /* @__PURE__ */ createRequire$1(import.meta.url);
|
|
@@ -783,7 +762,6 @@ var Builder = class {
|
|
|
783
762
|
return this;
|
|
784
763
|
}
|
|
785
764
|
};
|
|
786
|
-
|
|
787
765
|
//#endregion
|
|
788
766
|
//#region ../../node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/constants.js
|
|
789
767
|
var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
@@ -837,28 +815,24 @@ var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
837
815
|
END_ANCHOR: `(?:[${WIN_SLASH}]|$)`,
|
|
838
816
|
SEP: "\\"
|
|
839
817
|
};
|
|
840
|
-
/**
|
|
841
|
-
* POSIX Bracket Regex
|
|
842
|
-
*/
|
|
843
|
-
const POSIX_REGEX_SOURCE = {
|
|
844
|
-
alnum: "a-zA-Z0-9",
|
|
845
|
-
alpha: "a-zA-Z",
|
|
846
|
-
ascii: "\\x00-\\x7F",
|
|
847
|
-
blank: " \\t",
|
|
848
|
-
cntrl: "\\x00-\\x1F\\x7F",
|
|
849
|
-
digit: "0-9",
|
|
850
|
-
graph: "\\x21-\\x7E",
|
|
851
|
-
lower: "a-z",
|
|
852
|
-
print: "\\x20-\\x7E ",
|
|
853
|
-
punct: "\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",
|
|
854
|
-
space: " \\t\\r\\n\\v\\f",
|
|
855
|
-
upper: "A-Z",
|
|
856
|
-
word: "A-Za-z0-9_",
|
|
857
|
-
xdigit: "A-Fa-f0-9"
|
|
858
|
-
};
|
|
859
818
|
module.exports = {
|
|
860
819
|
MAX_LENGTH: 1024 * 64,
|
|
861
|
-
POSIX_REGEX_SOURCE
|
|
820
|
+
POSIX_REGEX_SOURCE: {
|
|
821
|
+
alnum: "a-zA-Z0-9",
|
|
822
|
+
alpha: "a-zA-Z",
|
|
823
|
+
ascii: "\\x00-\\x7F",
|
|
824
|
+
blank: " \\t",
|
|
825
|
+
cntrl: "\\x00-\\x1F\\x7F",
|
|
826
|
+
digit: "0-9",
|
|
827
|
+
graph: "\\x21-\\x7E",
|
|
828
|
+
lower: "a-z",
|
|
829
|
+
print: "\\x20-\\x7E ",
|
|
830
|
+
punct: "\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",
|
|
831
|
+
space: " \\t\\r\\n\\v\\f",
|
|
832
|
+
upper: "A-Z",
|
|
833
|
+
word: "A-Za-z0-9_",
|
|
834
|
+
xdigit: "A-Fa-f0-9"
|
|
835
|
+
},
|
|
862
836
|
REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
|
|
863
837
|
REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/,
|
|
864
838
|
REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/,
|
|
@@ -948,7 +922,6 @@ var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
948
922
|
}
|
|
949
923
|
};
|
|
950
924
|
}));
|
|
951
|
-
|
|
952
925
|
//#endregion
|
|
953
926
|
//#region ../../node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/utils.js
|
|
954
927
|
var require_utils = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
@@ -997,7 +970,6 @@ var require_utils = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
997
970
|
return last;
|
|
998
971
|
};
|
|
999
972
|
}));
|
|
1000
|
-
|
|
1001
973
|
//#endregion
|
|
1002
974
|
//#region ../../node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/scan.js
|
|
1003
975
|
var require_scan = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
@@ -1285,7 +1257,6 @@ var require_scan = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1285
1257
|
};
|
|
1286
1258
|
module.exports = scan;
|
|
1287
1259
|
}));
|
|
1288
|
-
|
|
1289
1260
|
//#endregion
|
|
1290
1261
|
//#region ../../node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/parse.js
|
|
1291
1262
|
var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
@@ -2144,7 +2115,6 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2144
2115
|
};
|
|
2145
2116
|
module.exports = parse;
|
|
2146
2117
|
}));
|
|
2147
|
-
|
|
2148
2118
|
//#endregion
|
|
2149
2119
|
//#region ../../node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/picomatch.js
|
|
2150
2120
|
var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
@@ -2437,10 +2407,9 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2437
2407
|
*/
|
|
2438
2408
|
module.exports = picomatch;
|
|
2439
2409
|
}));
|
|
2440
|
-
|
|
2441
2410
|
//#endregion
|
|
2442
|
-
//#region ../../node_modules/.pnpm/
|
|
2443
|
-
var
|
|
2411
|
+
//#region ../../node_modules/.pnpm/tinyglobby@0.2.15/node_modules/tinyglobby/dist/index.mjs
|
|
2412
|
+
var import_picomatch = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2444
2413
|
const pico = require_picomatch$1();
|
|
2445
2414
|
const utils = require_utils();
|
|
2446
2415
|
function picomatch(glob, options, returnState = false) {
|
|
@@ -2452,11 +2421,7 @@ var require_picomatch = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2452
2421
|
}
|
|
2453
2422
|
Object.assign(picomatch, pico);
|
|
2454
2423
|
module.exports = picomatch;
|
|
2455
|
-
}));
|
|
2456
|
-
|
|
2457
|
-
//#endregion
|
|
2458
|
-
//#region ../../node_modules/.pnpm/tinyglobby@0.2.15/node_modules/tinyglobby/dist/index.mjs
|
|
2459
|
-
var import_picomatch = /* @__PURE__ */ __toESM(require_picomatch(), 1);
|
|
2424
|
+
})))(), 1);
|
|
2460
2425
|
const isReadonlyArray = Array.isArray;
|
|
2461
2426
|
const isWin = process.platform === "win32";
|
|
2462
2427
|
const ONLY_PARENT_DIRECTORIES = /^(\/?\.\.)+$/;
|
|
@@ -2737,7 +2702,6 @@ async function glob(patternsOrOptions, options) {
|
|
|
2737
2702
|
if (!relative) return crawler.withPromise();
|
|
2738
2703
|
return formatPaths(await crawler.withPromise(), relative);
|
|
2739
2704
|
}
|
|
2740
|
-
|
|
2741
2705
|
//#endregion
|
|
2742
2706
|
//#region ../../node_modules/.pnpm/empathic@2.0.0/node_modules/empathic/resolve.mjs
|
|
2743
2707
|
/**
|
|
@@ -2751,7 +2715,6 @@ async function glob(patternsOrOptions, options) {
|
|
|
2751
2715
|
function absolute(input, root) {
|
|
2752
2716
|
return isAbsolute(input) ? input : resolve(root || ".", input);
|
|
2753
2717
|
}
|
|
2754
|
-
|
|
2755
2718
|
//#endregion
|
|
2756
2719
|
//#region ../../node_modules/.pnpm/empathic@2.0.0/node_modules/empathic/walk.mjs
|
|
2757
2720
|
/**
|
|
@@ -2772,7 +2735,6 @@ function up$2(base, options) {
|
|
|
2772
2735
|
}
|
|
2773
2736
|
return arr;
|
|
2774
2737
|
}
|
|
2775
|
-
|
|
2776
2738
|
//#endregion
|
|
2777
2739
|
//#region ../../node_modules/.pnpm/empathic@2.0.0/node_modules/empathic/find.mjs
|
|
2778
2740
|
/**
|
|
@@ -2783,13 +2745,11 @@ function up$2(base, options) {
|
|
|
2783
2745
|
*/
|
|
2784
2746
|
function up$1(name, options) {
|
|
2785
2747
|
let dir, tmp;
|
|
2786
|
-
|
|
2787
|
-
for (dir of up$2(start, options)) {
|
|
2748
|
+
for (dir of up$2(options && options.cwd || "", options)) {
|
|
2788
2749
|
tmp = join(dir, name);
|
|
2789
2750
|
if (existsSync(tmp)) return tmp;
|
|
2790
2751
|
}
|
|
2791
2752
|
}
|
|
2792
|
-
|
|
2793
2753
|
//#endregion
|
|
2794
2754
|
//#region ../../node_modules/.pnpm/empathic@2.0.0/node_modules/empathic/package.mjs
|
|
2795
2755
|
/**
|
|
@@ -2799,7 +2759,6 @@ function up$1(name, options) {
|
|
|
2799
2759
|
function up(options) {
|
|
2800
2760
|
return up$1("package.json", options);
|
|
2801
2761
|
}
|
|
2802
|
-
|
|
2803
2762
|
//#endregion
|
|
2804
2763
|
//#region ../../node_modules/.pnpm/import-without-cache@0.2.5/node_modules/import-without-cache/dist/index.mjs
|
|
2805
2764
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
@@ -2856,7 +2815,6 @@ function cleanupImportAttributes(context) {
|
|
|
2856
2815
|
context.importAttributes = attrs;
|
|
2857
2816
|
Object.freeze(context.importAttributes);
|
|
2858
2817
|
}
|
|
2859
|
-
|
|
2860
2818
|
//#endregion
|
|
2861
2819
|
//#region ../../node_modules/.pnpm/quansync@1.0.0/node_modules/quansync/dist/src-C2Pm6gXo.js
|
|
2862
2820
|
const GET_IS_ASYNC = Symbol.for("quansync.getIsAsync");
|
|
@@ -2937,14 +2895,10 @@ function quansync$1(input, options) {
|
|
|
2937
2895
|
if (typeof input === "function") return fromGeneratorFn(input, options);
|
|
2938
2896
|
else return fromObject(input);
|
|
2939
2897
|
}
|
|
2940
|
-
|
|
2941
|
-
* @returns `true` if the current context is async, `false` otherwise.
|
|
2942
|
-
*/
|
|
2943
|
-
const getIsAsync = quansync$1({
|
|
2898
|
+
quansync$1({
|
|
2944
2899
|
async: () => Promise.resolve(true),
|
|
2945
2900
|
sync: () => false
|
|
2946
2901
|
});
|
|
2947
|
-
|
|
2948
2902
|
//#endregion
|
|
2949
2903
|
//#region ../../node_modules/.pnpm/quansync@1.0.0/node_modules/quansync/dist/macro.js
|
|
2950
2904
|
/**
|
|
@@ -2957,34 +2911,19 @@ const getIsAsync = quansync$1({
|
|
|
2957
2911
|
* @internal
|
|
2958
2912
|
*/
|
|
2959
2913
|
const quansync = quansync$1;
|
|
2960
|
-
|
|
2961
|
-
//#endregion
|
|
2962
|
-
//#region ../../node_modules/.pnpm/@quansync+fs@1.0.0/node_modules/@quansync/fs/dist/index.mjs
|
|
2963
|
-
/**
|
|
2964
|
-
* @link https://nodejs.org/api/fs.html#fspromisesreadfilepath-options
|
|
2965
|
-
*/
|
|
2966
|
-
const readFile$1 = quansync$1({
|
|
2914
|
+
quansync$1({
|
|
2967
2915
|
sync: fs$1.readFileSync,
|
|
2968
2916
|
async: fs$1.promises.readFile
|
|
2969
2917
|
});
|
|
2970
|
-
|
|
2971
|
-
* @link https://nodejs.org/api/fs.html#fspromiseswritefilefile-data-options
|
|
2972
|
-
*/
|
|
2973
|
-
const writeFile$1 = quansync$1({
|
|
2918
|
+
quansync$1({
|
|
2974
2919
|
sync: fs$1.writeFileSync,
|
|
2975
2920
|
async: fs$1.promises.writeFile
|
|
2976
2921
|
});
|
|
2977
|
-
|
|
2978
|
-
* @link https://nodejs.org/api/fs.html#fspromisesunlinkpath
|
|
2979
|
-
*/
|
|
2980
|
-
const unlink = quansync$1({
|
|
2922
|
+
quansync$1({
|
|
2981
2923
|
sync: fs$1.unlinkSync,
|
|
2982
2924
|
async: fs$1.promises.unlink
|
|
2983
2925
|
});
|
|
2984
|
-
|
|
2985
|
-
* @link https://nodejs.org/api/fs.html#fspromisesaccesspath-mode
|
|
2986
|
-
*/
|
|
2987
|
-
const access$1 = quansync$1({
|
|
2926
|
+
quansync$1({
|
|
2988
2927
|
sync: fs$1.accessSync,
|
|
2989
2928
|
async: fs$1.promises.access
|
|
2990
2929
|
});
|
|
@@ -2999,105 +2938,62 @@ const lstat = quansync$1({
|
|
|
2999
2938
|
sync: fs$1.lstatSync,
|
|
3000
2939
|
async: fs$1.promises.lstat
|
|
3001
2940
|
});
|
|
3002
|
-
|
|
3003
|
-
* @link https://nodejs.org/api/fs.html#fspromisescpsrc-dest-options
|
|
3004
|
-
*/
|
|
3005
|
-
const cp$1 = quansync$1({
|
|
2941
|
+
quansync$1({
|
|
3006
2942
|
sync: fs$1.copyFileSync,
|
|
3007
2943
|
async: fs$1.promises.copyFile
|
|
3008
2944
|
});
|
|
3009
|
-
|
|
3010
|
-
* @link https://nodejs.org/api/fs.html#fspromisesrmpath-options
|
|
3011
|
-
*/
|
|
3012
|
-
const rm$1 = quansync$1({
|
|
2945
|
+
quansync$1({
|
|
3013
2946
|
sync: fs$1.rmSync,
|
|
3014
2947
|
async: fs$1.promises.rm
|
|
3015
2948
|
});
|
|
3016
|
-
|
|
3017
|
-
* @link https://nodejs.org/api/fs.html#fspromisesmkdirpath-options
|
|
3018
|
-
*/
|
|
3019
|
-
const mkdir = quansync$1({
|
|
2949
|
+
quansync$1({
|
|
3020
2950
|
sync: fs$1.mkdirSync,
|
|
3021
2951
|
async: fs$1.promises.mkdir
|
|
3022
2952
|
});
|
|
3023
|
-
|
|
3024
|
-
* @link https://nodejs.org/api/fs.html#fspromisesrenameoldpath-newpath
|
|
3025
|
-
*/
|
|
3026
|
-
const rename = quansync$1({
|
|
2953
|
+
quansync$1({
|
|
3027
2954
|
sync: fs$1.renameSync,
|
|
3028
2955
|
async: fs$1.promises.rename
|
|
3029
2956
|
});
|
|
3030
|
-
|
|
3031
|
-
* @link https://nodejs.org/api/fs.html#fspromisesreaddirpath-options
|
|
3032
|
-
*/
|
|
3033
|
-
const readdir = quansync$1({
|
|
2957
|
+
quansync$1({
|
|
3034
2958
|
sync: fs$1.readdirSync,
|
|
3035
2959
|
async: fs$1.promises.readdir
|
|
3036
2960
|
});
|
|
3037
|
-
|
|
3038
|
-
* @link https://nodejs.org/api/fs.html#fspromisesrealpathpath-options
|
|
3039
|
-
*/
|
|
3040
|
-
const realpath = quansync$1({
|
|
2961
|
+
quansync$1({
|
|
3041
2962
|
sync: fs$1.realpathSync,
|
|
3042
2963
|
async: fs$1.promises.realpath
|
|
3043
2964
|
});
|
|
3044
|
-
|
|
3045
|
-
* @link https://nodejs.org/api/fs.html#fspromisesreadlinkpath-options
|
|
3046
|
-
*/
|
|
3047
|
-
const readlink = quansync$1({
|
|
2965
|
+
quansync$1({
|
|
3048
2966
|
sync: fs$1.readlinkSync,
|
|
3049
2967
|
async: fs$1.promises.readlink
|
|
3050
2968
|
});
|
|
3051
|
-
|
|
3052
|
-
* @link https://nodejs.org/api/fs.html#fspromisessymlinktarget-path-type
|
|
3053
|
-
*/
|
|
3054
|
-
const symlink = quansync$1({
|
|
2969
|
+
quansync$1({
|
|
3055
2970
|
sync: fs$1.symlinkSync,
|
|
3056
2971
|
async: fs$1.promises.symlink
|
|
3057
2972
|
});
|
|
3058
|
-
|
|
3059
|
-
* @link https://nodejs.org/api/fs.html#fspromiseschownpath-uid-gid
|
|
3060
|
-
*/
|
|
3061
|
-
const chown = quansync$1({
|
|
2973
|
+
quansync$1({
|
|
3062
2974
|
sync: fs$1.chownSync,
|
|
3063
2975
|
async: fs$1.promises.chown
|
|
3064
2976
|
});
|
|
3065
|
-
|
|
3066
|
-
* @link https://nodejs.org/api/fs.html#fspromiseslchownpath-uid-gid
|
|
3067
|
-
*/
|
|
3068
|
-
const lchown = quansync$1({
|
|
2977
|
+
quansync$1({
|
|
3069
2978
|
sync: fs$1.lchownSync,
|
|
3070
2979
|
async: fs$1.promises.lchown
|
|
3071
2980
|
});
|
|
3072
|
-
|
|
3073
|
-
* @link https://nodejs.org/api/fs.html#fspromiseschmodpath-mode
|
|
3074
|
-
*/
|
|
3075
|
-
const chmod$1 = quansync$1({
|
|
2981
|
+
quansync$1({
|
|
3076
2982
|
sync: fs$1.chmodSync,
|
|
3077
2983
|
async: fs$1.promises.chmod
|
|
3078
2984
|
});
|
|
3079
|
-
|
|
3080
|
-
* @link https://nodejs.org/api/fs.html#fspromisesutimespath-atime-mtime
|
|
3081
|
-
*/
|
|
3082
|
-
const utimes = quansync$1({
|
|
2985
|
+
quansync$1({
|
|
3083
2986
|
sync: fs$1.utimesSync,
|
|
3084
2987
|
async: fs$1.promises.utimes
|
|
3085
2988
|
});
|
|
3086
|
-
|
|
3087
|
-
* @link https://nodejs.org/api/fs.html#fspromiseslutimespath-atime-mtime
|
|
3088
|
-
*/
|
|
3089
|
-
const lutimes = quansync$1({
|
|
2989
|
+
quansync$1({
|
|
3090
2990
|
sync: fs$1.lutimesSync,
|
|
3091
2991
|
async: fs$1.promises.lutimes
|
|
3092
2992
|
});
|
|
3093
|
-
|
|
3094
|
-
* @link https://nodejs.org/api/fs.html#fspromisesmkdtempprefix-options
|
|
3095
|
-
*/
|
|
3096
|
-
const mkdtemp$1 = quansync$1({
|
|
2993
|
+
quansync$1({
|
|
3097
2994
|
sync: fs$1.mkdtempSync,
|
|
3098
2995
|
async: fs$1.promises.mkdtemp
|
|
3099
2996
|
});
|
|
3100
|
-
|
|
3101
2997
|
//#endregion
|
|
3102
2998
|
//#region ../../node_modules/.pnpm/unconfig-core@7.5.0/node_modules/unconfig-core/dist/index.mjs
|
|
3103
2999
|
const isFile = quansync(function* (path, allowSymlinks) {
|
|
@@ -3174,9 +3070,8 @@ function createConfigCoreLoader(options) {
|
|
|
3174
3070
|
findConfigs
|
|
3175
3071
|
};
|
|
3176
3072
|
}
|
|
3177
|
-
|
|
3178
3073
|
//#endregion
|
|
3179
|
-
//#region ../../node_modules/.pnpm/tsdown@0.21.
|
|
3074
|
+
//#region ../../node_modules/.pnpm/tsdown@0.21.1_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.1_@tsdown+exe@0.21.1_@type_441010dc1e356451b27baacd78ca9eda/node_modules/tsdown/dist/options-CQzuh3xe.mjs
|
|
3180
3075
|
const __cjs_require$1 = createRequire(import.meta.url);
|
|
3181
3076
|
const picomatch = __cjs_require$1("./npm_entry_picomatch.cjs");
|
|
3182
3077
|
const satisfies$1 = __cjs_require$1("./npm_entry_semver_functions_satisfies.cjs");
|
|
@@ -3491,9 +3386,9 @@ function exportMeta(exports, all, packageJson) {
|
|
|
3491
3386
|
if (all) exports["./*"] = "./*";
|
|
3492
3387
|
else if (packageJson) exports["./package.json"] = "./package.json";
|
|
3493
3388
|
}
|
|
3494
|
-
function exportCss(exports, chunks,
|
|
3495
|
-
if (splitting) return;
|
|
3496
|
-
for (const chunksByFormat of Object.values(chunks)) for (const chunk of chunksByFormat) if (chunk.type === "asset" && RE_CSS
|
|
3389
|
+
function exportCss(exports, chunks, css, pkgRoot) {
|
|
3390
|
+
if (css?.splitting) return;
|
|
3391
|
+
for (const chunksByFormat of Object.values(chunks)) for (const chunk of chunksByFormat) if (chunk.type === "asset" && RE_CSS.test(chunk.fileName)) {
|
|
3497
3392
|
const filename = slash(chunk.fileName);
|
|
3498
3393
|
exports[`./${filename}`] = join$1(pkgRoot, chunk.outDir, filename);
|
|
3499
3394
|
return;
|
|
@@ -3727,7 +3622,7 @@ async function nativeImport(id) {
|
|
|
3727
3622
|
return mod.default || mod;
|
|
3728
3623
|
}
|
|
3729
3624
|
async function unrunImport(id) {
|
|
3730
|
-
const { unrun } = await import("./dist-
|
|
3625
|
+
const { unrun } = await import("./dist-Dx-jtFHM.js");
|
|
3731
3626
|
const { module } = await unrun({ path: pathToFileURL(id).href });
|
|
3732
3627
|
return module;
|
|
3733
3628
|
}
|
|
@@ -3740,7 +3635,7 @@ const parseEnv = process$1.getBuiltinModule("node:util").parseEnv;
|
|
|
3740
3635
|
* @private
|
|
3741
3636
|
*/
|
|
3742
3637
|
async function resolveUserConfig(userConfig, inlineConfig) {
|
|
3743
|
-
let { entry, format, plugins = [], clean = true, logLevel = "info", failOnWarn = false, customLogger, treeshake = true, platform = "node", outDir = "dist", sourcemap = false, dts, unused = false, watch = false, ignoreWatch, shims = false, publint = false, attw = false, fromVite, alias, tsconfig, report = true, target, env = {}, envFile, envPrefix = "TSDOWN_", copy, publicDir, hash = true, cwd = process$1.cwd(), name, workspace, exports = false, bundle, unbundle = typeof bundle === "boolean" ? !bundle : false, removeNodeProtocol, nodeProtocol, cjsDefault = true, globImport = true, css, fixedExtension = platform === "node", devtools = false, write = true, exe = false } = userConfig;
|
|
3638
|
+
let { entry, format, plugins = [], clean = true, logLevel = "info", failOnWarn = false, customLogger, treeshake = true, platform = "node", outDir = "dist", sourcemap = false, dts, unused = false, watch = false, ignoreWatch, shims = false, publint = false, attw = false, fromVite, alias, tsconfig, report = true, target, env = {}, envFile, envPrefix = "TSDOWN_", copy, publicDir, hash = true, cwd = process$1.cwd(), name, workspace, exports = false, bundle, unbundle = typeof bundle === "boolean" ? !bundle : false, removeNodeProtocol, nodeProtocol, cjsDefault = true, globImport = true, css, injectStyle, fixedExtension = platform === "node", devtools = false, write = true, exe = false } = userConfig;
|
|
3744
3639
|
const pkg = await readPackageJson(cwd);
|
|
3745
3640
|
if (workspace) name ||= pkg?.name;
|
|
3746
3641
|
const color = generateColor(name);
|
|
@@ -3778,6 +3673,13 @@ async function resolveUserConfig(userConfig, inlineConfig) {
|
|
|
3778
3673
|
if (publint) logger.warn(nameLabel, "publint is enabled but package.json is not found");
|
|
3779
3674
|
if (attw) logger.warn(nameLabel, "attw is enabled but package.json is not found");
|
|
3780
3675
|
}
|
|
3676
|
+
if (injectStyle != null) if (css?.inject == null) {
|
|
3677
|
+
logger.warn(`${blue`injectStyle`} is deprecated. Use ${blue`css.inject`} instead.`);
|
|
3678
|
+
css = {
|
|
3679
|
+
...css,
|
|
3680
|
+
inject: injectStyle
|
|
3681
|
+
};
|
|
3682
|
+
} else throw new TypeError("`injectStyle` is deprecated. Cannot be used with `css.inject`");
|
|
3781
3683
|
if (publicDir) if (copy) throw new TypeError("`publicDir` is deprecated. Cannot be used with `copy`");
|
|
3782
3684
|
else logger.warn(`${blue`publicDir`} is deprecated. Use ${blue`copy`} instead.`);
|
|
3783
3685
|
envPrefix = toArray(envPrefix);
|
|
@@ -3827,7 +3729,7 @@ async function resolveUserConfig(userConfig, inlineConfig) {
|
|
|
3827
3729
|
cjsDefault,
|
|
3828
3730
|
clean,
|
|
3829
3731
|
copy: publicDir || copy,
|
|
3830
|
-
css
|
|
3732
|
+
css,
|
|
3831
3733
|
cwd,
|
|
3832
3734
|
deps: depsConfig,
|
|
3833
3735
|
devtools,
|
|
@@ -3911,121 +3813,8 @@ function filterConfig(filter, configCwd, name) {
|
|
|
3911
3813
|
if (filter instanceof RegExp) return name && filter.test(name) || filter.test(cwd);
|
|
3912
3814
|
return toArray(filter).some((value) => name && name === value || cwd === value);
|
|
3913
3815
|
}
|
|
3914
|
-
|
|
3915
|
-
//#endregion
|
|
3916
|
-
//#region ../../node_modules/.pnpm/tsdown@0.21.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.0_@tsdown+exe@0.21.0_@type_743816f26d68021f6369d2afb428dae9/node_modules/tsdown/dist/plugin-BQv869Ce.mjs
|
|
3917
|
-
/**
|
|
3918
|
-
* Detect and remove "pure CSS chunks" — JS chunks that exist only because
|
|
3919
|
-
* they imported CSS files. These chunks have no JS exports and all their
|
|
3920
|
-
* modules are CSS. Following Vite's implementation.
|
|
3921
|
-
*/
|
|
3922
|
-
function removePureCssChunks(bundle, styles) {
|
|
3923
|
-
const pureCssChunkNames = [];
|
|
3924
|
-
for (const [fileName, chunk] of Object.entries(bundle)) {
|
|
3925
|
-
if (chunk.type !== "chunk") continue;
|
|
3926
|
-
if (chunk.exports.length > 0) continue;
|
|
3927
|
-
const moduleIds = Object.keys(chunk.modules);
|
|
3928
|
-
if (moduleIds.length === 0) continue;
|
|
3929
|
-
if (!moduleIds.every((id) => styles.has(id))) continue;
|
|
3930
|
-
pureCssChunkNames.push(fileName);
|
|
3931
|
-
}
|
|
3932
|
-
if (!pureCssChunkNames.length) return;
|
|
3933
|
-
const replaceEmptyChunk = getEmptyChunkReplacer(pureCssChunkNames);
|
|
3934
|
-
for (const file of Object.keys(bundle)) {
|
|
3935
|
-
const chunk = bundle[file];
|
|
3936
|
-
if (chunk.type !== "chunk") continue;
|
|
3937
|
-
let chunkImportsPureCssChunk = false;
|
|
3938
|
-
chunk.imports = chunk.imports.filter((importFile) => {
|
|
3939
|
-
if (pureCssChunkNames.includes(importFile)) {
|
|
3940
|
-
chunkImportsPureCssChunk = true;
|
|
3941
|
-
return false;
|
|
3942
|
-
}
|
|
3943
|
-
return true;
|
|
3944
|
-
});
|
|
3945
|
-
if (chunkImportsPureCssChunk) chunk.code = replaceEmptyChunk(chunk.code);
|
|
3946
|
-
}
|
|
3947
|
-
for (const fileName of pureCssChunkNames) {
|
|
3948
|
-
delete bundle[fileName];
|
|
3949
|
-
delete bundle[`${fileName}.map`];
|
|
3950
|
-
}
|
|
3951
|
-
}
|
|
3952
|
-
/**
|
|
3953
|
-
* Create a replacer function that replaces import statements for pure CSS
|
|
3954
|
-
* chunks with block comments of the same length, preserving source map offsets.
|
|
3955
|
-
*/
|
|
3956
|
-
function getEmptyChunkReplacer(pureCssChunkNames) {
|
|
3957
|
-
const emptyChunkFiles = pureCssChunkNames.map((file) => escapeRegex(path.basename(file))).join("|");
|
|
3958
|
-
const emptyChunkRE = new RegExp(String.raw`\bimport\s*["'][^"']*(?:${emptyChunkFiles})["'];`, "g");
|
|
3959
|
-
return (code) => code.replace(emptyChunkRE, (m) => {
|
|
3960
|
-
return `/* empty css ${"".padEnd(m.length - 15)}*/`;
|
|
3961
|
-
});
|
|
3962
|
-
}
|
|
3963
|
-
function escapeRegex(str) {
|
|
3964
|
-
return str.replaceAll(/[.*+?^${}()|[\]\\]/g, String.raw`\$&`);
|
|
3965
|
-
}
|
|
3966
|
-
function createCssPostHooks(config, styles) {
|
|
3967
|
-
const collectedCSS = [];
|
|
3968
|
-
return {
|
|
3969
|
-
renderChunk(_code, chunk) {
|
|
3970
|
-
let chunkCSS = "";
|
|
3971
|
-
for (const id of Object.keys(chunk.modules)) {
|
|
3972
|
-
const code = styles.get(id);
|
|
3973
|
-
if (code) chunkCSS += code;
|
|
3974
|
-
}
|
|
3975
|
-
if (!chunkCSS) return;
|
|
3976
|
-
if (chunkCSS.length > 0 && !chunkCSS.endsWith("\n")) chunkCSS += "\n";
|
|
3977
|
-
if (config.css.splitting) {
|
|
3978
|
-
const cssAssetFileName = chunk.fileName.replace(/\.(m?js|cjs)$/, ".css");
|
|
3979
|
-
this.emitFile({
|
|
3980
|
-
type: "asset",
|
|
3981
|
-
fileName: cssAssetFileName,
|
|
3982
|
-
source: chunkCSS
|
|
3983
|
-
});
|
|
3984
|
-
} else collectedCSS.push(chunkCSS);
|
|
3985
|
-
},
|
|
3986
|
-
generateBundle(_outputOptions, bundle) {
|
|
3987
|
-
if (!config.css.splitting && collectedCSS.length > 0) {
|
|
3988
|
-
const allCSS = collectedCSS.join("");
|
|
3989
|
-
if (allCSS) this.emitFile({
|
|
3990
|
-
type: "asset",
|
|
3991
|
-
fileName: config.css.fileName,
|
|
3992
|
-
source: allCSS,
|
|
3993
|
-
originalFileName: defaultCssBundleName
|
|
3994
|
-
});
|
|
3995
|
-
collectedCSS.length = 0;
|
|
3996
|
-
}
|
|
3997
|
-
removePureCssChunks(bundle, styles);
|
|
3998
|
-
}
|
|
3999
|
-
};
|
|
4000
|
-
}
|
|
4001
|
-
const RE_CSS = /\.css(?:$|\?)/;
|
|
4002
|
-
function CssPlugin(config) {
|
|
4003
|
-
const styles = /* @__PURE__ */ new Map();
|
|
4004
|
-
const postHooks = createCssPostHooks(config, styles);
|
|
4005
|
-
return {
|
|
4006
|
-
name: "tsdown:builtin-css",
|
|
4007
|
-
buildStart() {
|
|
4008
|
-
styles.clear();
|
|
4009
|
-
},
|
|
4010
|
-
load: {
|
|
4011
|
-
filter: { id: RE_CSS },
|
|
4012
|
-
async handler(id) {
|
|
4013
|
-
let code = await readFile(id, "utf8");
|
|
4014
|
-
if (code.length > 0 && !code.endsWith("\n")) code += "\n";
|
|
4015
|
-
styles.set(id, code);
|
|
4016
|
-
return {
|
|
4017
|
-
code: "",
|
|
4018
|
-
moduleSideEffects: "no-treeshake",
|
|
4019
|
-
moduleType: "js"
|
|
4020
|
-
};
|
|
4021
|
-
}
|
|
4022
|
-
},
|
|
4023
|
-
...postHooks
|
|
4024
|
-
};
|
|
4025
|
-
}
|
|
4026
|
-
|
|
4027
3816
|
//#endregion
|
|
4028
|
-
//#region ../../node_modules/.pnpm/tsdown@0.21.
|
|
3817
|
+
//#region ../../node_modules/.pnpm/tsdown@0.21.1_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.1_@tsdown+exe@0.21.1_@type_441010dc1e356451b27baacd78ca9eda/node_modules/tsdown/dist/watch-yZCV-ZeB.mjs
|
|
4029
3818
|
/**
|
|
4030
3819
|
* The `node:` protocol was added in Node.js v14.18.0.
|
|
4031
3820
|
* @see https://nodejs.org/api/esm.html#node-imports
|
|
@@ -4185,7 +3974,6 @@ function WatchPlugin(configFiles, { config, chunks }) {
|
|
|
4185
3974
|
}
|
|
4186
3975
|
};
|
|
4187
3976
|
}
|
|
4188
|
-
|
|
4189
3977
|
//#endregion
|
|
4190
3978
|
//#region ../../node_modules/.pnpm/hookable@6.0.1/node_modules/hookable/dist/index.mjs
|
|
4191
3979
|
function flatHooks(configHooks, hooks = {}, parentName) {
|
|
@@ -4354,9 +4142,8 @@ var Hookable = class {
|
|
|
4354
4142
|
};
|
|
4355
4143
|
}
|
|
4356
4144
|
};
|
|
4357
|
-
|
|
4358
4145
|
//#endregion
|
|
4359
|
-
//#region ../../node_modules/.pnpm/tsdown@0.21.
|
|
4146
|
+
//#region ../../node_modules/.pnpm/tsdown@0.21.1_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.1_@tsdown+exe@0.21.1_@type_441010dc1e356451b27baacd78ca9eda/node_modules/tsdown/dist/build-BG-XbM6V.mjs
|
|
4360
4147
|
const __cjs_require = createRequire(import.meta.url);
|
|
4361
4148
|
const satisfies = __cjs_require("./npm_entry_semver_functions_satisfies.cjs");
|
|
4362
4149
|
const coerce = __cjs_require("./npm_entry_semver_functions_coerce.cjs");
|
|
@@ -4692,7 +4479,7 @@ async function bundleDone(bundleByPkg, bundle) {
|
|
|
4692
4479
|
async function packTarball(packageJsonPath) {
|
|
4693
4480
|
const pkgDir = path.dirname(packageJsonPath);
|
|
4694
4481
|
const destination = await mkdtemp(path.join(tmpdir(), "tsdown-pack-"));
|
|
4695
|
-
const [{ detect }, { pack }] = await Promise.all([import("./detect-
|
|
4482
|
+
const [{ detect }, { pack }] = await Promise.all([import("./detect-J1_Vd1yf-BWDiPZkP.js"), import("./index-node-Bpsmc0eX-jMz9gD3P.js")]);
|
|
4696
4483
|
try {
|
|
4697
4484
|
const detected = await detect({ cwd: pkgDir });
|
|
4698
4485
|
if (detected?.name === "deno") throw new Error(`Cannot pack tarball for Deno projects at ${pkgDir}`);
|
|
@@ -4769,7 +4556,7 @@ function resolveChunkAddon(chunkAddon, format) {
|
|
|
4769
4556
|
if (typeof chunkAddon === "string") return chunkAddon;
|
|
4770
4557
|
switch (true) {
|
|
4771
4558
|
case RE_JS.test(chunk.fileName): return chunkAddon?.js || "";
|
|
4772
|
-
case RE_CSS
|
|
4559
|
+
case RE_CSS.test(chunk.fileName): return chunkAddon?.css || "";
|
|
4773
4560
|
case RE_DTS.test(chunk.fileName): return chunkAddon?.dts || "";
|
|
4774
4561
|
default: return "";
|
|
4775
4562
|
}
|
|
@@ -4793,7 +4580,7 @@ async function resolveInputOptions(config, format, configFiles, bundle, cjsDts,
|
|
|
4793
4580
|
if (nodeProtocol) plugins.push(NodeProtocolPlugin(nodeProtocol));
|
|
4794
4581
|
if (config.pkg || config.deps.skipNodeModulesBundle) plugins.push(DepPlugin(config, bundle));
|
|
4795
4582
|
if (dts) {
|
|
4796
|
-
const { dts: dtsPlugin } = await import("./dist-
|
|
4583
|
+
const { dts: dtsPlugin } = await import("./dist-C9Oecl0H.js");
|
|
4797
4584
|
const options = {
|
|
4798
4585
|
tsconfig,
|
|
4799
4586
|
...dts
|
|
@@ -4813,14 +4600,11 @@ async function resolveInputOptions(config, format, configFiles, bundle, cjsDts,
|
|
|
4813
4600
|
...unused
|
|
4814
4601
|
}));
|
|
4815
4602
|
}
|
|
4816
|
-
|
|
4817
|
-
|
|
4818
|
-
|
|
4819
|
-
|
|
4820
|
-
|
|
4821
|
-
cssPlugin = CssPlugin(config);
|
|
4822
|
-
}
|
|
4823
|
-
plugins.push(cssPlugin, ShebangPlugin(logger, cwd, nameLabel, isDualFormat));
|
|
4603
|
+
if (pkgExists("@tsdown/css")) {
|
|
4604
|
+
const { CssPlugin } = await import("@tsdown/css");
|
|
4605
|
+
plugins.push(CssPlugin(config, { logger }));
|
|
4606
|
+
} else plugins.push(CssGuardPlugin());
|
|
4607
|
+
plugins.push(ShebangPlugin(logger, cwd, nameLabel, isDualFormat));
|
|
4824
4608
|
if (globImport) plugins.push(importGlobPlugin({ root: cwd }));
|
|
4825
4609
|
}
|
|
4826
4610
|
if (report && LogLevels[logger.level] >= 3) plugins.push(ReportPlugin(config, cjsDts, isDualFormat));
|
|
@@ -4915,6 +4699,18 @@ function handlePluginInspect(plugins) {
|
|
|
4915
4699
|
else return `"rolldown plugin: ${plugins.name}"`;
|
|
4916
4700
|
};
|
|
4917
4701
|
}
|
|
4702
|
+
function CssGuardPlugin() {
|
|
4703
|
+
return {
|
|
4704
|
+
name: "tsdown:css-guard",
|
|
4705
|
+
transform: {
|
|
4706
|
+
order: "post",
|
|
4707
|
+
filter: { id: /\.(?:css|less|sass|scss|styl|stylus)$/ },
|
|
4708
|
+
handler(_code, id) {
|
|
4709
|
+
throw new Error(`CSS file "${id}" was encountered but \`@tsdown/css\` is not installed. Please install it: \`npm install @tsdown/css\``);
|
|
4710
|
+
}
|
|
4711
|
+
}
|
|
4712
|
+
};
|
|
4713
|
+
}
|
|
4918
4714
|
function shortcuts(restart) {
|
|
4919
4715
|
let actionRunning = false;
|
|
4920
4716
|
async function onInput(input) {
|
|
@@ -5126,6 +4922,5 @@ async function buildSingle(config, configFiles, isDualFormat, clean, restart, do
|
|
|
5126
4922
|
ab = executeOnSuccess(config);
|
|
5127
4923
|
}
|
|
5128
4924
|
}
|
|
5129
|
-
|
|
5130
4925
|
//#endregion
|
|
5131
|
-
export { resolveUserConfig as i, buildWithConfigs as n, mergeConfig as r, build$1 as t };
|
|
4926
|
+
export { resolveUserConfig as i, buildWithConfigs as n, mergeConfig as r, build$1 as t };
|