@voidzero-dev/vite-plus-core 0.1.23 → 0.2.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/LICENSE +2 -2
- package/dist/rolldown/cli.mjs +6 -6
- package/dist/rolldown/config.d.mts +1 -1
- package/dist/rolldown/config.mjs +2 -2
- package/dist/rolldown/experimental-index.d.mts +4 -4
- package/dist/rolldown/experimental-index.mjs +10 -10
- package/dist/rolldown/filter-index.d.mts +1 -1
- package/dist/rolldown/index.d.mts +2 -2
- package/dist/rolldown/index.mjs +4 -4
- package/dist/rolldown/parallel-plugin-worker.mjs +2 -2
- package/dist/rolldown/parallel-plugin.d.mts +1 -1
- package/dist/rolldown/parse-ast-index.d.mts +1 -1
- package/dist/rolldown/parse-ast-index.mjs +1 -1
- package/dist/rolldown/plugins-index.d.mts +3 -3
- package/dist/rolldown/plugins-index.mjs +2 -2
- package/dist/rolldown/shared/{binding-CXquf8ay.mjs → binding-CfwqjDbP.mjs} +31 -30
- package/dist/rolldown/shared/{binding-BaCZTfMx.d.mts → binding-DgGsNpT9.d.mts} +97 -1
- package/dist/rolldown/shared/{bindingify-input-options-D2ORek5s.mjs → bindingify-input-options--chmbDhw.mjs} +16 -8
- package/dist/rolldown/shared/{constructors-CbNaT434.d.mts → constructors-Bx1tSad6.d.mts} +2 -2
- package/dist/rolldown/shared/{constructors-BiPdtLBB.mjs → constructors-DnT9y_13.mjs} +1 -1
- package/dist/rolldown/shared/{define-config-3BX_X2Am.d.mts → define-config-ChOOV2QZ.d.mts} +29 -11
- package/dist/rolldown/shared/{error-BuvQYXuZ.mjs → error-C0TrL0_H.mjs} +1 -1
- package/dist/rolldown/shared/{load-config-uvbpmLwO.mjs → load-config-BXgGQtnA.mjs} +1 -1
- package/dist/rolldown/shared/{normalize-string-or-regex-CNPF6PU9.mjs → normalize-string-or-regex-DGbe3BlX.mjs} +1 -1
- package/dist/rolldown/shared/{parse-1VOPJ1Lj.mjs → parse-26ORR8fZ.mjs} +2 -2
- package/dist/rolldown/shared/{resolve-tsconfig-CcfxWrib.mjs → resolve-tsconfig-D3YLh9ff.mjs} +2 -2
- package/dist/rolldown/shared/{rolldown-BZYLlfsv.mjs → rolldown-DpXXI00f.mjs} +1 -1
- package/dist/rolldown/shared/{rolldown-build-CgMNHFY3.mjs → rolldown-build-D8R4Zzfy.mjs} +48 -6
- package/dist/rolldown/shared/{transform-7xCUVrpL.d.mts → transform-C-XSNVrd.d.mts} +1 -1
- package/dist/rolldown/shared/{watch-BX_aH1Oh.mjs → watch-D5Zm0Vsz.mjs} +4 -4
- package/dist/rolldown/utils-index.d.mts +3 -3
- package/dist/rolldown/utils-index.mjs +5 -5
- package/dist/tsdown/{build-5FURNVr0-CsM6vj3e.js → build-B_nvJe4A-hrVGPLD6.js} +150 -97
- package/dist/tsdown/{detect-DN3DXXYt-TsZBbdhI.js → detect-B97OSl92-B5bcx_Ya.js} +1 -1
- package/dist/tsdown/{dist-wWM45aJq.js → dist-Dvzn3mZN.js} +883 -1661
- package/dist/tsdown/index-types.d.ts +30 -14
- package/dist/tsdown/index.js +3 -3
- package/dist/tsdown/main-BMtwTklr.js +973 -0
- package/dist/tsdown/npm_cjs_chunk_range.cjs +30 -26
- package/dist/tsdown/npm_cjs_chunk_semver.cjs +22 -15
- package/dist/tsdown/npm_entry_picomatch.cjs +7 -7
- package/dist/tsdown/npm_entry_semver_functions_coerce.cjs +5 -5
- package/dist/tsdown/npm_entry_semver_functions_satisfies.cjs +3 -3
- package/dist/tsdown/npm_entry_semver_ranges_min-version.cjs +3 -3
- package/dist/tsdown/npm_entry_tree-kill.cjs +1 -1
- package/dist/tsdown/{resolver-DkvdaW3s-Dz1U-gxd.js → resolver-DtsKFXi2-DQOmVgSY.js} +1 -1
- package/dist/tsdown/run.js +6 -6
- package/dist/tsdown/{tsc-context-DXovbMXp.js → tsc-context-DfwSQt2q.js} +2 -2
- package/dist/tsdown/{tsc-Dp9emiKb.js → tsc-q0JAW6kD.js} +3 -3
- package/dist/vite/client/client.mjs +4 -4
- package/dist/vite/node/chunks/dist2.js +3 -3
- package/dist/vite/node/chunks/logger.js +1 -1
- package/dist/vite/node/chunks/node.js +220 -114
- package/dist/vite/node/index.d.ts +2 -2
- package/package.json +17 -17
- package/dist/tsdown/chunk-DJK8HYOj.js +0 -34
- package/dist/tsdown/main-Cq8Is40L.js +0 -1173
- /package/dist/tsdown/{npm_cjs_chunk_chunk.cjs → npm_cjs_chunk_rolldown-runtime.cjs} +0 -0
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { C as noop, D as resolveRegex, E as resolveComma, O as slash, S as matchPattern, T as promiseWithResolvers, _ as red, a as version, b as debounce, c as generateColor, d as prettyFormat, f as blue, h as green, i as createDebug, k as toArray, l as getNameLabel, m as dim, n as V, o as LogLevels, p as bold, s as createLogger, t as H, u as globalLogger, v as underline, w as pkgExists, x as importWithError, y as yellow } from "./main-Cq8Is40L.js";
|
|
1
|
+
import { A as __commonJSMin, C as noop, D as resolveRegex, E as resolveComma, M as __toESM, O as slash, S as matchPattern, T as promiseWithResolvers, _ as red, a as createDebug, b as debounce, c as generateColor, d as prettyFormat, f as blue, h as green, i as version, j as __exportAll$1, k as toArray, l as getNameLabel, m as dim, n as z$1, o as LogLevels, p as bold, s as createLogger, t as R$2, u as globalLogger, v as underline, w as pkgExists, x as importWithError, y as yellow } from "./main-BMtwTklr.js";
|
|
3
2
|
import module$1, { builtinModules, createRequire, isBuiltin } from "node:module";
|
|
4
|
-
import process$1
|
|
3
|
+
import process$1 from "node:process";
|
|
5
4
|
import readline from "node:readline";
|
|
6
5
|
import { formatWithOptions, inspect, isDeepStrictEqual, promisify } from "node:util";
|
|
7
6
|
import path, { dirname, isAbsolute, join, parse, resolve } from "node:path";
|
|
7
|
+
import fs, { existsSync, readFileSync, writeFileSync } from "node:fs";
|
|
8
8
|
import { RUNTIME_MODULE_ID, VERSION, build, watch } from "@voidzero-dev/vite-plus-core/rolldown";
|
|
9
9
|
import { access, chmod, cp, mkdir, mkdtemp, readFile, readdir, rm, stat, writeFile } from "node:fs/promises";
|
|
10
10
|
import { and, exactRegex, id, importerId, include } from "@voidzero-dev/vite-plus-core/rolldown/filter";
|
|
11
|
-
import re, { existsSync, readFileSync, writeFileSync } from "node:fs";
|
|
12
11
|
import * as nativeFs from "fs";
|
|
13
|
-
import Ue, { readdir as readdir$1, readdirSync, realpath, realpathSync, stat as stat$1, statSync } from "fs";
|
|
12
|
+
import Ue, { readdir as readdir$1, readdirSync, realpath, realpathSync, stat as stat$1, statSync as statSync$1 } from "fs";
|
|
14
13
|
import Ie from "os";
|
|
15
|
-
import Se, { basename, dirname as dirname$1, isAbsolute as isAbsolute$1, normalize, posix, relative, resolve as resolve$1, sep } from "path";
|
|
14
|
+
import Se, { basename as basename$1, dirname as dirname$1, isAbsolute as isAbsolute$1, normalize as normalize$1, posix, relative, resolve as resolve$1, sep } from "path";
|
|
16
15
|
import { fileURLToPath } from "url";
|
|
17
16
|
import { createRequire as createRequire$1 } from "module";
|
|
18
17
|
import { tmpdir } from "node:os";
|
|
@@ -21,7 +20,7 @@ import { AsyncLocalStorage } from "node:async_hooks";
|
|
|
21
20
|
import { Buffer } from "node:buffer";
|
|
22
21
|
import { brotliCompress, gzip } from "node:zlib";
|
|
23
22
|
import { importGlobPlugin } from "@voidzero-dev/vite-plus-core/rolldown/experimental";
|
|
24
|
-
//#region ../../node_modules/.pnpm/tsdown@0.22.
|
|
23
|
+
//#region ../../node_modules/.pnpm/tsdown@0.22.3_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.3_@tsdown+exe@0.22.3_@type_701dbb346589e2d965113664da5ac600/node_modules/tsdown/dist/fs-qxJxxoCE.mjs
|
|
25
24
|
function fsExists(path) {
|
|
26
25
|
return access(path).then(() => true, () => false);
|
|
27
26
|
}
|
|
@@ -64,7 +63,7 @@ function stripExtname(filePath) {
|
|
|
64
63
|
return filePath.slice(0, -ext.length);
|
|
65
64
|
}
|
|
66
65
|
//#endregion
|
|
67
|
-
//#region ../../node_modules/.pnpm/rolldown-plugin-dts@0.
|
|
66
|
+
//#region ../../node_modules/.pnpm/rolldown-plugin-dts@0.26.0_@typescript+native-preview@7.0.0-dev.20260605.1_oxc-resolver_6f03fea6114f4c67cf5f12416b2625b7/node_modules/rolldown-plugin-dts/dist/filename-BR9JpwkC.mjs
|
|
68
67
|
const RE_JS = /\.([cm]?)jsx?$/;
|
|
69
68
|
const RE_TS = /\.([cm]?)tsx?$/;
|
|
70
69
|
const RE_DTS = /\.d\.([cm]?)ts$/;
|
|
@@ -151,13 +150,13 @@ i(x, "slash");
|
|
|
151
150
|
const _e = i((e, n) => {
|
|
152
151
|
const s = `readFileSync:${n}`;
|
|
153
152
|
let t = e?.get(s);
|
|
154
|
-
return t === void 0 && (t =
|
|
153
|
+
return t === void 0 && (t = fs.readFileSync(n, "utf8"), e?.set(s, t)), t;
|
|
155
154
|
}, "readFile"), F = i((e, n) => {
|
|
156
155
|
const s = `tryStat:${n}`;
|
|
157
156
|
let t = e?.get(s);
|
|
158
157
|
if (t === void 0) {
|
|
159
158
|
try {
|
|
160
|
-
t =
|
|
159
|
+
t = fs.statSync(n);
|
|
161
160
|
} catch {
|
|
162
161
|
t = null;
|
|
163
162
|
}
|
|
@@ -1095,8 +1094,22 @@ i((e, n) => {
|
|
|
1095
1094
|
return m.substitutions.map((u) => x(u.replace("*", w)));
|
|
1096
1095
|
}, "resolvePathAlias");
|
|
1097
1096
|
//#endregion
|
|
1098
|
-
//#region ../../node_modules/.pnpm/tsdown@0.22.
|
|
1097
|
+
//#region ../../node_modules/.pnpm/tsdown@0.22.3_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.3_@tsdown+exe@0.22.3_@type_701dbb346589e2d965113664da5ac600/node_modules/tsdown/dist/format-DMceewlS.mjs
|
|
1099
1098
|
const shimFile = path.resolve(import.meta.dirname, "..", "esm-shims.js");
|
|
1099
|
+
const shimsDefine = {
|
|
1100
|
+
__dirname: "__TSDOWN_SHIM_DIRNAME__",
|
|
1101
|
+
__filename: "__TSDOWN_SHIM_FILENAME__"
|
|
1102
|
+
};
|
|
1103
|
+
const shimsPlugin = {
|
|
1104
|
+
name: "tsdown:shims-banner",
|
|
1105
|
+
banner: `
|
|
1106
|
+
import __tsdown_shims_path from 'node:path'
|
|
1107
|
+
import __tsdown_shims_url from 'node:url'
|
|
1108
|
+
|
|
1109
|
+
const __TSDOWN_SHIM_FILENAME__ = /* @__PURE__ */ __tsdown_shims_url.fileURLToPath(import.meta.url)
|
|
1110
|
+
const __TSDOWN_SHIM_DIRNAME__ = /* @__PURE__ */ __tsdown_shims_path.dirname(__TSDOWN_SHIM_FILENAME__)
|
|
1111
|
+
`
|
|
1112
|
+
};
|
|
1100
1113
|
function getShimsInject(format, platform) {
|
|
1101
1114
|
if (format === "es" && platform === "node") return {
|
|
1102
1115
|
__dirname: [shimFile, "__dirname"],
|
|
@@ -1131,22 +1144,26 @@ function resolveDepsConfig(config, logger) {
|
|
|
1131
1144
|
logger?.warn("`skipNodeModulesBundle` is deprecated. Use `deps.skipNodeModulesBundle` instead.");
|
|
1132
1145
|
skipNodeModulesBundle = config.skipNodeModulesBundle;
|
|
1133
1146
|
}
|
|
1134
|
-
if (
|
|
1135
|
-
if (
|
|
1147
|
+
if (skipNodeModulesBundle && alwaysBundle != null) throw new TypeError("`deps.skipNodeModulesBundle` and `deps.alwaysBundle` are mutually exclusive options and cannot be used together.");
|
|
1148
|
+
if (onlyBundle != null && onlyBundle !== false) onlyBundle = toArray(onlyBundle);
|
|
1149
|
+
return {
|
|
1150
|
+
...normalizeDepsOptions(alwaysBundle, neverBundle),
|
|
1151
|
+
onlyBundle,
|
|
1152
|
+
skipNodeModulesBundle,
|
|
1153
|
+
dts: normalizeDepsOptions(config.deps?.dts?.alwaysBundle, config.deps?.dts?.neverBundle)
|
|
1154
|
+
};
|
|
1155
|
+
}
|
|
1156
|
+
function normalizeDepsOptions(alwaysBundle, neverBundle) {
|
|
1136
1157
|
if (alwaysBundle != null && typeof alwaysBundle !== "function") {
|
|
1137
1158
|
const alwaysBundlePatterns = toArray(alwaysBundle);
|
|
1138
1159
|
alwaysBundle = (id) => matchPattern(id, alwaysBundlePatterns);
|
|
1139
1160
|
}
|
|
1140
|
-
if (skipNodeModulesBundle && alwaysBundle != null) throw new TypeError("`deps.skipNodeModulesBundle` and `deps.alwaysBundle` are mutually exclusive options and cannot be used together.");
|
|
1141
|
-
if (onlyBundle != null && onlyBundle !== false) onlyBundle = toArray(onlyBundle);
|
|
1142
1161
|
return {
|
|
1143
|
-
neverBundle,
|
|
1144
1162
|
alwaysBundle,
|
|
1145
|
-
|
|
1146
|
-
skipNodeModulesBundle
|
|
1163
|
+
neverBundle: resolveRegex(neverBundle)
|
|
1147
1164
|
};
|
|
1148
1165
|
}
|
|
1149
|
-
function DepsPlugin({ pkg, deps: { alwaysBundle, onlyBundle, skipNodeModulesBundle }, logger, nameLabel }, tsdownBundle) {
|
|
1166
|
+
function DepsPlugin({ pkg, deps: { alwaysBundle: jsAlwaysBundle, onlyBundle, skipNodeModulesBundle, dts }, logger, nameLabel }, tsdownBundle) {
|
|
1150
1167
|
const deps = pkg && Array.from(getProductionDeps(pkg));
|
|
1151
1168
|
return {
|
|
1152
1169
|
name: "tsdown:deps",
|
|
@@ -1214,7 +1231,7 @@ function DepsPlugin({ pkg, deps: { alwaysBundle, onlyBundle, skipNodeModulesBund
|
|
|
1214
1231
|
*/
|
|
1215
1232
|
async function externalStrategy(id, importer, resolved) {
|
|
1216
1233
|
if (id === shimFile) return false;
|
|
1217
|
-
if (alwaysBundle?.(id, importer)) return "no-external";
|
|
1234
|
+
if (((importer ? RE_DTS.test(importer) : false) && dts?.alwaysBundle || jsAlwaysBundle)?.(id, importer)) return "no-external";
|
|
1218
1235
|
if (skipNodeModulesBundle && resolved && (resolved.external || RE_NODE_MODULES$1.test(resolved.id))) {
|
|
1219
1236
|
const resolvedDep = await resolveDepSubpath(id, resolved);
|
|
1220
1237
|
return resolvedDep ? [true, resolvedDep] : true;
|
|
@@ -1359,7 +1376,7 @@ function createDefu(merger) {
|
|
|
1359
1376
|
//#region ../../node_modules/.pnpm/fdir@6.5.0_picomatch@4.0.4/node_modules/fdir/dist/index.mjs
|
|
1360
1377
|
var __require$1 = /* @__PURE__ */ createRequire$1(import.meta.url);
|
|
1361
1378
|
function cleanPath(path) {
|
|
1362
|
-
let normalized = normalize(path);
|
|
1379
|
+
let normalized = normalize$1(path);
|
|
1363
1380
|
if (normalized.length > 1 && normalized[normalized.length - 1] === sep) normalized = normalized.substring(0, normalized.length - 1);
|
|
1364
1381
|
return normalized;
|
|
1365
1382
|
}
|
|
@@ -1695,7 +1712,7 @@ var Walker = class {
|
|
|
1695
1712
|
this.walkDirectory(this.state, resolvedPath, useRealPaths ? resolvedPath : path + pathSeparator, depth - 1, this.walk);
|
|
1696
1713
|
} else {
|
|
1697
1714
|
resolvedPath = useRealPaths ? resolvedPath : path;
|
|
1698
|
-
const filename = basename(resolvedPath);
|
|
1715
|
+
const filename = basename$1(resolvedPath);
|
|
1699
1716
|
const directoryPath$1 = normalizePath(dirname$1(resolvedPath), this.state.options);
|
|
1700
1717
|
resolvedPath = this.joinPath(filename, directoryPath$1);
|
|
1701
1718
|
this.pushFile(resolvedPath, files, this.state.counts, filters);
|
|
@@ -3723,7 +3740,7 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3723
3740
|
module.exports = picomatch;
|
|
3724
3741
|
}));
|
|
3725
3742
|
//#endregion
|
|
3726
|
-
//#region ../../node_modules/.pnpm/tinyglobby@0.2.
|
|
3743
|
+
//#region ../../node_modules/.pnpm/tinyglobby@0.2.17/node_modules/tinyglobby/dist/index.mjs
|
|
3727
3744
|
var import_picomatch = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3728
3745
|
const pico = require_picomatch$1();
|
|
3729
3746
|
const utils = require_utils();
|
|
@@ -3739,6 +3756,7 @@ var import_picomatch = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((
|
|
|
3739
3756
|
})))(), 1);
|
|
3740
3757
|
const isReadonlyArray = Array.isArray;
|
|
3741
3758
|
const BACKSLASHES = /\\/g;
|
|
3759
|
+
const DRIVE_RELATIVE_PATH = /^[A-Za-z]:$/;
|
|
3742
3760
|
const isWin = process.platform === "win32";
|
|
3743
3761
|
const ONLY_PARENT_DIRECTORIES = /^(\/?\.\.)+$/;
|
|
3744
3762
|
function getPartialMatcher(patterns, options = {}) {
|
|
@@ -3805,6 +3823,9 @@ function buildRelative(cwd, root) {
|
|
|
3805
3823
|
return p[p.length - 1] === "/" && result !== "" ? `${result}/` : result || ".";
|
|
3806
3824
|
};
|
|
3807
3825
|
}
|
|
3826
|
+
function ensureNonDriveRelativePath(path) {
|
|
3827
|
+
return path.replace(DRIVE_RELATIVE_PATH, (match) => `${match}/`);
|
|
3828
|
+
}
|
|
3808
3829
|
const splitPatternOptions = { parts: true };
|
|
3809
3830
|
function splitPattern(path) {
|
|
3810
3831
|
var _result$parts;
|
|
@@ -3866,7 +3887,7 @@ function normalizePattern(pattern, opts, props, isIgnore) {
|
|
|
3866
3887
|
}
|
|
3867
3888
|
const potentialRoot = posix.join(cwd, parentDir.slice(i * 3));
|
|
3868
3889
|
if (potentialRoot[0] !== "." && props.root.length > potentialRoot.length) {
|
|
3869
|
-
props.root = potentialRoot;
|
|
3890
|
+
props.root = ensureNonDriveRelativePath(potentialRoot);
|
|
3870
3891
|
props.depthOffset = -n + i;
|
|
3871
3892
|
}
|
|
3872
3893
|
}
|
|
@@ -3886,7 +3907,7 @@ function normalizePattern(pattern, opts, props, isIgnore) {
|
|
|
3886
3907
|
}
|
|
3887
3908
|
props.depthOffset = newCommonPath.length;
|
|
3888
3909
|
props.commonPath = newCommonPath;
|
|
3889
|
-
props.root = newCommonPath.length > 0 ? posix.join(cwd, ...newCommonPath) : cwd;
|
|
3910
|
+
props.root = ensureNonDriveRelativePath(newCommonPath.length > 0 ? posix.join(cwd, ...newCommonPath) : cwd);
|
|
3890
3911
|
}
|
|
3891
3912
|
return result;
|
|
3892
3913
|
}
|
|
@@ -3975,18 +3996,15 @@ function formatPaths(paths, mapper) {
|
|
|
3975
3996
|
}
|
|
3976
3997
|
const defaultOptions$1 = {
|
|
3977
3998
|
caseSensitiveMatch: true,
|
|
3978
|
-
cwd: process.cwd(),
|
|
3979
3999
|
debug: !!process.env.TINYGLOBBY_DEBUG,
|
|
3980
4000
|
expandDirectories: true,
|
|
3981
4001
|
followSymbolicLinks: true,
|
|
3982
4002
|
onlyFiles: true
|
|
3983
4003
|
};
|
|
3984
4004
|
function getOptions(options) {
|
|
3985
|
-
const opts = {
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
};
|
|
3989
|
-
opts.cwd = (opts.cwd instanceof URL ? fileURLToPath(opts.cwd) : resolve$1(opts.cwd)).replace(BACKSLASHES, "/");
|
|
4005
|
+
const opts = Object.assign({}, options);
|
|
4006
|
+
for (const key in defaultOptions$1) if (opts[key] === void 0) Object.assign(opts, { [key]: defaultOptions$1[key] });
|
|
4007
|
+
opts.cwd = (opts.cwd instanceof URL ? fileURLToPath(opts.cwd) : resolve$1(opts.cwd || process.cwd())).replace(BACKSLASHES, "/");
|
|
3990
4008
|
opts.ignore = ensureStringArray(opts.ignore);
|
|
3991
4009
|
opts.fs && (opts.fs = {
|
|
3992
4010
|
readdir: opts.fs.readdir || readdir$1,
|
|
@@ -3994,7 +4012,7 @@ function getOptions(options) {
|
|
|
3994
4012
|
realpath: opts.fs.realpath || realpath,
|
|
3995
4013
|
realpathSync: opts.fs.realpathSync || realpathSync,
|
|
3996
4014
|
stat: opts.fs.stat || stat$1,
|
|
3997
|
-
statSync: opts.fs.statSync || statSync
|
|
4015
|
+
statSync: opts.fs.statSync || statSync$1
|
|
3998
4016
|
});
|
|
3999
4017
|
if (opts.debug) log("globbing with options:", opts);
|
|
4000
4018
|
return opts;
|
|
@@ -4012,7 +4030,7 @@ async function glob(globInput, options) {
|
|
|
4012
4030
|
return crawler ? formatPaths(await crawler.withPromise(), relative) : [];
|
|
4013
4031
|
}
|
|
4014
4032
|
//#endregion
|
|
4015
|
-
//#region ../../node_modules/.pnpm/empathic@2.0.
|
|
4033
|
+
//#region ../../node_modules/.pnpm/empathic@2.0.1/node_modules/empathic/resolve.mjs
|
|
4016
4034
|
/**
|
|
4017
4035
|
* Resolve an absolute path from {@link root}, but only
|
|
4018
4036
|
* if {@link input} isn't already absolute.
|
|
@@ -4025,7 +4043,7 @@ function absolute(input, root) {
|
|
|
4025
4043
|
return isAbsolute(input) ? input : resolve(root || ".", input);
|
|
4026
4044
|
}
|
|
4027
4045
|
//#endregion
|
|
4028
|
-
//#region ../../node_modules/.pnpm/empathic@2.0.
|
|
4046
|
+
//#region ../../node_modules/.pnpm/empathic@2.0.1/node_modules/empathic/walk.mjs
|
|
4029
4047
|
/**
|
|
4030
4048
|
* Get all parent directories of {@link base}.
|
|
4031
4049
|
* Stops after {@link Options['last']} is processed.
|
|
@@ -4045,7 +4063,7 @@ function up$2(base, options) {
|
|
|
4045
4063
|
return arr;
|
|
4046
4064
|
}
|
|
4047
4065
|
//#endregion
|
|
4048
|
-
//#region ../../node_modules/.pnpm/empathic@2.0.
|
|
4066
|
+
//#region ../../node_modules/.pnpm/empathic@2.0.1/node_modules/empathic/find.mjs
|
|
4049
4067
|
/**
|
|
4050
4068
|
* Find an item by name, walking parent directories until found.
|
|
4051
4069
|
*
|
|
@@ -4060,7 +4078,7 @@ function up$1(name, options) {
|
|
|
4060
4078
|
}
|
|
4061
4079
|
}
|
|
4062
4080
|
//#endregion
|
|
4063
|
-
//#region ../../node_modules/.pnpm/empathic@2.0.
|
|
4081
|
+
//#region ../../node_modules/.pnpm/empathic@2.0.1/node_modules/empathic/package.mjs
|
|
4064
4082
|
/**
|
|
4065
4083
|
* Find the closest "package.json" file while walking parent directories.
|
|
4066
4084
|
* @returns The absolute path to a "package.json", if found.
|
|
@@ -4224,87 +4242,87 @@ quansync$1({
|
|
|
4224
4242
|
*/
|
|
4225
4243
|
const quansync = quansync$1;
|
|
4226
4244
|
quansync$1({
|
|
4227
|
-
sync:
|
|
4228
|
-
async:
|
|
4245
|
+
sync: fs.readFileSync,
|
|
4246
|
+
async: fs.promises.readFile
|
|
4229
4247
|
});
|
|
4230
4248
|
quansync$1({
|
|
4231
|
-
sync:
|
|
4232
|
-
async:
|
|
4249
|
+
sync: fs.writeFileSync,
|
|
4250
|
+
async: fs.promises.writeFile
|
|
4233
4251
|
});
|
|
4234
4252
|
quansync$1({
|
|
4235
|
-
sync:
|
|
4236
|
-
async:
|
|
4253
|
+
sync: fs.unlinkSync,
|
|
4254
|
+
async: fs.promises.unlink
|
|
4237
4255
|
});
|
|
4238
4256
|
quansync$1({
|
|
4239
|
-
sync:
|
|
4240
|
-
async:
|
|
4257
|
+
sync: fs.accessSync,
|
|
4258
|
+
async: fs.promises.access
|
|
4241
4259
|
});
|
|
4242
4260
|
/**
|
|
4243
4261
|
* @link https://nodejs.org/api/fs.html#fspromisesstatpath-options
|
|
4244
4262
|
*/
|
|
4245
4263
|
const stat$2 = quansync$1({
|
|
4246
|
-
sync:
|
|
4247
|
-
async:
|
|
4264
|
+
sync: fs.statSync,
|
|
4265
|
+
async: fs.promises.stat
|
|
4248
4266
|
});
|
|
4249
4267
|
const lstat = quansync$1({
|
|
4250
|
-
sync:
|
|
4251
|
-
async:
|
|
4268
|
+
sync: fs.lstatSync,
|
|
4269
|
+
async: fs.promises.lstat
|
|
4252
4270
|
});
|
|
4253
4271
|
quansync$1({
|
|
4254
|
-
sync:
|
|
4255
|
-
async:
|
|
4272
|
+
sync: fs.copyFileSync,
|
|
4273
|
+
async: fs.promises.copyFile
|
|
4256
4274
|
});
|
|
4257
4275
|
quansync$1({
|
|
4258
|
-
sync:
|
|
4259
|
-
async:
|
|
4276
|
+
sync: fs.rmSync,
|
|
4277
|
+
async: fs.promises.rm
|
|
4260
4278
|
});
|
|
4261
4279
|
quansync$1({
|
|
4262
|
-
sync:
|
|
4263
|
-
async:
|
|
4280
|
+
sync: fs.mkdirSync,
|
|
4281
|
+
async: fs.promises.mkdir
|
|
4264
4282
|
});
|
|
4265
4283
|
quansync$1({
|
|
4266
|
-
sync:
|
|
4267
|
-
async:
|
|
4284
|
+
sync: fs.renameSync,
|
|
4285
|
+
async: fs.promises.rename
|
|
4268
4286
|
});
|
|
4269
4287
|
quansync$1({
|
|
4270
|
-
sync:
|
|
4271
|
-
async:
|
|
4288
|
+
sync: fs.readdirSync,
|
|
4289
|
+
async: fs.promises.readdir
|
|
4272
4290
|
});
|
|
4273
4291
|
quansync$1({
|
|
4274
|
-
sync:
|
|
4275
|
-
async:
|
|
4292
|
+
sync: fs.realpathSync,
|
|
4293
|
+
async: fs.promises.realpath
|
|
4276
4294
|
});
|
|
4277
4295
|
quansync$1({
|
|
4278
|
-
sync:
|
|
4279
|
-
async:
|
|
4296
|
+
sync: fs.readlinkSync,
|
|
4297
|
+
async: fs.promises.readlink
|
|
4280
4298
|
});
|
|
4281
4299
|
quansync$1({
|
|
4282
|
-
sync:
|
|
4283
|
-
async:
|
|
4300
|
+
sync: fs.symlinkSync,
|
|
4301
|
+
async: fs.promises.symlink
|
|
4284
4302
|
});
|
|
4285
4303
|
quansync$1({
|
|
4286
|
-
sync:
|
|
4287
|
-
async:
|
|
4304
|
+
sync: fs.chownSync,
|
|
4305
|
+
async: fs.promises.chown
|
|
4288
4306
|
});
|
|
4289
4307
|
quansync$1({
|
|
4290
|
-
sync:
|
|
4291
|
-
async:
|
|
4308
|
+
sync: fs.lchownSync,
|
|
4309
|
+
async: fs.promises.lchown
|
|
4292
4310
|
});
|
|
4293
4311
|
quansync$1({
|
|
4294
|
-
sync:
|
|
4295
|
-
async:
|
|
4312
|
+
sync: fs.chmodSync,
|
|
4313
|
+
async: fs.promises.chmod
|
|
4296
4314
|
});
|
|
4297
4315
|
quansync$1({
|
|
4298
|
-
sync:
|
|
4299
|
-
async:
|
|
4316
|
+
sync: fs.utimesSync,
|
|
4317
|
+
async: fs.promises.utimes
|
|
4300
4318
|
});
|
|
4301
4319
|
quansync$1({
|
|
4302
|
-
sync:
|
|
4303
|
-
async:
|
|
4320
|
+
sync: fs.lutimesSync,
|
|
4321
|
+
async: fs.promises.lutimes
|
|
4304
4322
|
});
|
|
4305
4323
|
quansync$1({
|
|
4306
|
-
sync:
|
|
4307
|
-
async:
|
|
4324
|
+
sync: fs.mkdtempSync,
|
|
4325
|
+
async: fs.promises.mkdtemp
|
|
4308
4326
|
});
|
|
4309
4327
|
//#endregion
|
|
4310
4328
|
//#region ../../node_modules/.pnpm/unconfig-core@7.5.0/node_modules/unconfig-core/dist/index.mjs
|
|
@@ -4383,12 +4401,10 @@ function createConfigCoreLoader(options) {
|
|
|
4383
4401
|
};
|
|
4384
4402
|
}
|
|
4385
4403
|
//#endregion
|
|
4386
|
-
//#region ../../node_modules/.pnpm/tsdown@0.22.
|
|
4404
|
+
//#region ../../node_modules/.pnpm/tsdown@0.22.3_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.3_@tsdown+exe@0.22.3_@type_701dbb346589e2d965113664da5ac600/node_modules/tsdown/dist/options-Ce3ueyZH.mjs
|
|
4387
4405
|
const __cjs_require$1 = createRequire(import.meta.url);
|
|
4388
4406
|
const picomatch = __cjs_require$1("./npm_entry_picomatch.cjs");
|
|
4389
4407
|
const satisfies$1 = __cjs_require$1("./npm_entry_semver_functions_satisfies.cjs");
|
|
4390
|
-
const check = (key) => key in env && env[key] !== "0" && env[key] !== "false";
|
|
4391
|
-
const isInCi = check("CI") || check("CONTINUOUS_INTEGRATION");
|
|
4392
4408
|
const debug$4$2 = createDebug("tsdown:clean");
|
|
4393
4409
|
const RE_LAST_SLASH = /[/\\]$/;
|
|
4394
4410
|
async function cleanOutDir(configs) {
|
|
@@ -4556,7 +4572,7 @@ async function buildSingleExe(config, bundledFile, outputFile, executable, targe
|
|
|
4556
4572
|
await writeFile(seaConfigPath, JSON.stringify(seaConfig));
|
|
4557
4573
|
debug$3$2("Wrote sea-config.json: %O -> %s", seaConfig, seaConfigPath);
|
|
4558
4574
|
debug$3$2("Running: %s --build-sea %s", process$1.execPath, seaConfigPath);
|
|
4559
|
-
await
|
|
4575
|
+
await R$2(process$1.execPath, ["--build-sea", seaConfigPath], {
|
|
4560
4576
|
nodeOptions: { stdio: [
|
|
4561
4577
|
"ignore",
|
|
4562
4578
|
"ignore",
|
|
@@ -4569,7 +4585,7 @@ async function buildSingleExe(config, bundledFile, outputFile, executable, targe
|
|
|
4569
4585
|
else await fsRemove(tempDir);
|
|
4570
4586
|
}
|
|
4571
4587
|
if ((target?.platform || process$1.platform) === "darwin") try {
|
|
4572
|
-
await
|
|
4588
|
+
await R$2("codesign", [
|
|
4573
4589
|
"--sign",
|
|
4574
4590
|
"-",
|
|
4575
4591
|
outputPath
|
|
@@ -4865,6 +4881,10 @@ async function resolveTsconfig(logger, tsconfig, cwd, color, nameLabel) {
|
|
|
4865
4881
|
}
|
|
4866
4882
|
return tsconfig;
|
|
4867
4883
|
}
|
|
4884
|
+
function isInCI() {
|
|
4885
|
+
const ci = process$1.env.CI;
|
|
4886
|
+
return ci != null && ci !== "0" && ci.toLowerCase() !== "false";
|
|
4887
|
+
}
|
|
4868
4888
|
const debug$2$2 = createDebug("tsdown:package");
|
|
4869
4889
|
async function readPackageJson(dir) {
|
|
4870
4890
|
const packageJsonPath = up({ cwd: dir });
|
|
@@ -4977,7 +4997,7 @@ async function loadConfigFile(inlineConfig, workspace, rootConfig) {
|
|
|
4977
4997
|
globalLogger.info(`config file: ${underline(file)}`, loader === "native" ? "" : `(${loader})`);
|
|
4978
4998
|
exported = await exported;
|
|
4979
4999
|
if (typeof exported === "function") exported = await exported(inlineConfig, {
|
|
4980
|
-
ci:
|
|
5000
|
+
ci: isInCI(),
|
|
4981
5001
|
rootConfig
|
|
4982
5002
|
});
|
|
4983
5003
|
}
|
|
@@ -5025,6 +5045,7 @@ async function nativeImport(id) {
|
|
|
5025
5045
|
} else if (!isBun) url.searchParams.set("no-cache", crypto.randomUUID());
|
|
5026
5046
|
const mod = await depsStore.run(deps, () => import(url.href, { with: importAttributes }).catch((error) => {
|
|
5027
5047
|
if (error?.message?.includes?.("Cannot find module")) throw new Error(`Failed to load the config file. Try setting the --config-loader CLI flag to \`tsx\` or \`unrun\`.\n\n${error.message}`, { cause: error });
|
|
5048
|
+
if (String(error).includes("not supported in strip-only mode")) throw new Error(`Failed to load the config file because it contains TypeScript-specific syntax that Node.js cannot execute directly. Please set the --config-loader CLI flag to \`tsx\` or \`unrun\`.\n\n${error.message}`, { cause: error });
|
|
5028
5049
|
if (typeof error?.stack === "string" && error.stack.includes("node:internal/modules/esm/translators")) throw new Error(`Failed to load the config file due to a known Node.js bug. Try setting the --config-loader CLI flag to \`tsx\` or \`unrun\`, or upgrading Node.js to v24.11.1 or later.\n\n${error.message}`, { cause: error });
|
|
5029
5050
|
throw error;
|
|
5030
5051
|
}));
|
|
@@ -5056,7 +5077,7 @@ async function resolveUserConfig(userConfig, inlineConfig, configDeps) {
|
|
|
5056
5077
|
if (result) userConfig = mergeConfig(userConfig, result);
|
|
5057
5078
|
}
|
|
5058
5079
|
}
|
|
5059
|
-
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, root, removeNodeProtocol, nodeProtocol, cjsDefault = true, globImport = true, css, injectStyle, fixedExtension = platform === "node", devtools = false, write = true, exe = false } = userConfig;
|
|
5080
|
+
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, root, removeNodeProtocol, nodeProtocol, cjsDefault = true, globImport = true, css, injectStyle, outExtension, outExtensions, fixedExtension = platform === "node", devtools = false, write = true, exe = false } = userConfig;
|
|
5060
5081
|
const pkg = await readPackageJson(cwd);
|
|
5061
5082
|
if (workspace) name ||= pkg?.name;
|
|
5062
5083
|
const color = generateColor(name);
|
|
@@ -5108,6 +5129,11 @@ async function resolveUserConfig(userConfig, inlineConfig, configDeps) {
|
|
|
5108
5129
|
} else throw new TypeError("`injectStyle` is deprecated. Cannot be used with `css.inject`");
|
|
5109
5130
|
if (publicDir) if (copy) throw new TypeError("`publicDir` is deprecated. Cannot be used with `copy`");
|
|
5110
5131
|
else logger.warn(`${blue`publicDir`} is deprecated. Use ${blue`copy`} instead.`);
|
|
5132
|
+
if (outExtension) {
|
|
5133
|
+
if (outExtensions) throw new TypeError("`outExtension` is deprecated. Cannot be used with `outExtensions`");
|
|
5134
|
+
logger.warn(`${blue`outExtension`} is deprecated. Use ${blue`outExtensions`} instead.`);
|
|
5135
|
+
outExtensions = outExtension;
|
|
5136
|
+
}
|
|
5111
5137
|
envPrefix = toArray(envPrefix);
|
|
5112
5138
|
if (envPrefix.includes("")) logger.warn("`envPrefix` includes an empty string; filtering is disabled. All environment variables from the env file and process.env will be injected into the build. Ensure this is intended to avoid accidental leakage of sensitive information.");
|
|
5113
5139
|
const envFromProcess = filterEnv(process$1.env, envPrefix);
|
|
@@ -5177,6 +5203,7 @@ async function resolveUserConfig(userConfig, inlineConfig, configDeps) {
|
|
|
5177
5203
|
nameLabel,
|
|
5178
5204
|
nodeProtocol,
|
|
5179
5205
|
outDir,
|
|
5206
|
+
outExtensions,
|
|
5180
5207
|
pkg,
|
|
5181
5208
|
platform,
|
|
5182
5209
|
plugins,
|
|
@@ -5238,8 +5265,8 @@ function resolveFeatureOption(value, defaults) {
|
|
|
5238
5265
|
return resolveCIOption(value) ? defaults : false;
|
|
5239
5266
|
}
|
|
5240
5267
|
function resolveCIOption(value) {
|
|
5241
|
-
if (value === "ci-only") return
|
|
5242
|
-
if (value === "local-only") return
|
|
5268
|
+
if (value === "ci-only") return isInCI();
|
|
5269
|
+
if (value === "local-only") return !isInCI();
|
|
5243
5270
|
return value;
|
|
5244
5271
|
}
|
|
5245
5272
|
function filterConfig(filter, configCwd, name) {
|
|
@@ -5250,7 +5277,7 @@ function filterConfig(filter, configCwd, name) {
|
|
|
5250
5277
|
return toArray(filter).some((value) => name && name === value || cwd === value);
|
|
5251
5278
|
}
|
|
5252
5279
|
//#endregion
|
|
5253
|
-
//#region ../../node_modules/.pnpm/tsdown@0.22.
|
|
5280
|
+
//#region ../../node_modules/.pnpm/tsdown@0.22.3_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.3_@tsdown+exe@0.22.3_@type_701dbb346589e2d965113664da5ac600/node_modules/tsdown/dist/watch-C3ocHLCt.mjs
|
|
5254
5281
|
async function copy(options) {
|
|
5255
5282
|
if (!options.copy) return;
|
|
5256
5283
|
const resolved = await resolveCopyEntries(options);
|
|
@@ -5630,8 +5657,8 @@ var Hookable = class {
|
|
|
5630
5657
|
}
|
|
5631
5658
|
};
|
|
5632
5659
|
//#endregion
|
|
5633
|
-
//#region ../../node_modules/.pnpm/tsdown@0.22.
|
|
5634
|
-
var
|
|
5660
|
+
//#region ../../node_modules/.pnpm/tsdown@0.22.3_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.3_@tsdown+exe@0.22.3_@type_701dbb346589e2d965113664da5ac600/node_modules/tsdown/dist/build-B_nvJe4A.mjs
|
|
5661
|
+
var build_B_nvJe4A_exports = /* @__PURE__ */ __exportAll$1({
|
|
5635
5662
|
n: () => buildWithConfigs,
|
|
5636
5663
|
r: () => build_exports,
|
|
5637
5664
|
t: () => build$1
|
|
@@ -5764,7 +5791,7 @@ function executeOnSuccess(config) {
|
|
|
5764
5791
|
if (!config.onSuccess) return;
|
|
5765
5792
|
const ab = new AbortController();
|
|
5766
5793
|
if (typeof config.onSuccess === "string") {
|
|
5767
|
-
const p =
|
|
5794
|
+
const p = z$1(config.onSuccess, [], { nodeOptions: {
|
|
5768
5795
|
shell: true,
|
|
5769
5796
|
stdio: "inherit",
|
|
5770
5797
|
cwd: config.cwd
|
|
@@ -5938,13 +5965,14 @@ async function bundleDone(bundleByPkg, bundle) {
|
|
|
5938
5965
|
}
|
|
5939
5966
|
} catch (error) {
|
|
5940
5967
|
configs[0].logger.error("Pack failed:", error);
|
|
5968
|
+
debug$1("Pack failed for %s: %O", pkg.packageJsonPath, error);
|
|
5941
5969
|
}
|
|
5942
5970
|
ctx.resolve();
|
|
5943
5971
|
}
|
|
5944
5972
|
async function packTarball(packageJsonPath) {
|
|
5945
5973
|
const pkgDir = path.dirname(packageJsonPath);
|
|
5946
5974
|
const destination = await mkdtemp(path.join(tmpdir(), "tsdown-pack-"));
|
|
5947
|
-
const { detect } = await import("./detect-
|
|
5975
|
+
const { detect } = await import("./detect-B97OSl92-B5bcx_Ya.js");
|
|
5948
5976
|
try {
|
|
5949
5977
|
const detected = await detect({ cwd: pkgDir });
|
|
5950
5978
|
debug$1("Detected package manager: %o", detected);
|
|
@@ -6015,7 +6043,7 @@ async function pack(dir, pm, destination, ignoreScripts) {
|
|
|
6015
6043
|
args.push("--ignore-scripts");
|
|
6016
6044
|
break;
|
|
6017
6045
|
}
|
|
6018
|
-
const output = await
|
|
6046
|
+
const output = await R$2(command, args, { nodeOptions: { cwd: dir } });
|
|
6019
6047
|
const tarballFile = await readdir(destination).then((files) => files.find((file) => file.endsWith(".tgz")));
|
|
6020
6048
|
if (!tarballFile) throw new Error(`Failed to find packed tarball file in ${destination}. Command output:\n${JSON.stringify(output, null, 2)}`);
|
|
6021
6049
|
return path.join(destination, tarballFile);
|
|
@@ -6079,12 +6107,12 @@ async function getBuildOptions(config, format, configDeps, bundle, cjsDts = fals
|
|
|
6079
6107
|
return rolldownConfig;
|
|
6080
6108
|
}
|
|
6081
6109
|
async function resolveInputOptions(config, format, configDeps, bundle, cjsDts, isDualFormat) {
|
|
6082
|
-
const { alias, checks: { legacyCjs, ...checks } = {}, cjsDefault, cwd, deps
|
|
6110
|
+
const { alias, checks: { legacyCjs, ...checks } = {}, cjsDefault, cwd, deps, devtools, dts, entry, env, globImport, loader, logger, nameLabel, nodeProtocol, platform, plugins: userPlugins, report, shims, target, treeshake, tsconfig, unbundle, unused, watch } = config;
|
|
6083
6111
|
const plugins = [];
|
|
6084
6112
|
if (nodeProtocol) plugins.push(NodeProtocolPlugin(nodeProtocol));
|
|
6085
6113
|
if (config.pkg || config.deps.skipNodeModulesBundle) plugins.push(DepsPlugin(config, bundle));
|
|
6086
6114
|
if (dts) {
|
|
6087
|
-
const { dts: dtsPlugin } = await import("./dist-
|
|
6115
|
+
const { dts: dtsPlugin } = await import("./dist-Dvzn3mZN.js");
|
|
6088
6116
|
const { cjsReexport: _, ...dtsPluginOptions } = dts;
|
|
6089
6117
|
const options = {
|
|
6090
6118
|
tsconfig,
|
|
@@ -6120,7 +6148,7 @@ async function resolveInputOptions(config, format, configDeps, bundle, cjsDts, i
|
|
|
6120
6148
|
if (watch) plugins.push(WatchPlugin(configDeps, bundle));
|
|
6121
6149
|
if (!cjsDts) plugins.push(userPlugins);
|
|
6122
6150
|
if (cssPostPlugins) plugins.push(...cssPostPlugins);
|
|
6123
|
-
|
|
6151
|
+
let define = {
|
|
6124
6152
|
...config.define,
|
|
6125
6153
|
...Object.keys(env).reduce((acc, key) => {
|
|
6126
6154
|
const value = JSON.stringify(env[key]);
|
|
@@ -6129,11 +6157,29 @@ async function resolveInputOptions(config, format, configDeps, bundle, cjsDts, i
|
|
|
6129
6157
|
return acc;
|
|
6130
6158
|
}, Object.create(null))
|
|
6131
6159
|
};
|
|
6132
|
-
|
|
6160
|
+
let inject;
|
|
6161
|
+
if (shims && !cjsDts) if (unbundle) {
|
|
6162
|
+
define = {
|
|
6163
|
+
...define,
|
|
6164
|
+
...shimsDefine
|
|
6165
|
+
};
|
|
6166
|
+
plugins.push(shimsPlugin);
|
|
6167
|
+
} else inject = getShimsInject(format, platform);
|
|
6168
|
+
const dtsExternal = deps.dts.neverBundle ? functionifyExternal(deps.dts.neverBundle) : void 0;
|
|
6169
|
+
let external;
|
|
6170
|
+
if (deps.neverBundle && dtsExternal) {
|
|
6171
|
+
const jsExternal = functionifyExternal(deps.neverBundle);
|
|
6172
|
+
external = (id, importer, ...args) => {
|
|
6173
|
+
return ((importer ? RE_DTS.test(importer) : false) ? dtsExternal : jsExternal)(id, importer, ...args);
|
|
6174
|
+
};
|
|
6175
|
+
} else if (dtsExternal) external = (id, importer, ...args) => {
|
|
6176
|
+
return (importer ? RE_DTS.test(importer) : false) ? dtsExternal(id, importer, ...args) : void 0;
|
|
6177
|
+
};
|
|
6178
|
+
else external = deps.neverBundle;
|
|
6133
6179
|
return await mergeUserOptions({
|
|
6134
6180
|
input: entry,
|
|
6135
6181
|
cwd,
|
|
6136
|
-
external
|
|
6182
|
+
external,
|
|
6137
6183
|
resolve: { alias },
|
|
6138
6184
|
tsconfig: tsconfig || void 0,
|
|
6139
6185
|
treeshake,
|
|
@@ -6220,6 +6266,13 @@ function CssGuardPlugin() {
|
|
|
6220
6266
|
}
|
|
6221
6267
|
};
|
|
6222
6268
|
}
|
|
6269
|
+
function functionifyExternal(external) {
|
|
6270
|
+
if (typeof external === "function") return external;
|
|
6271
|
+
external = toArray(external);
|
|
6272
|
+
return (id) => {
|
|
6273
|
+
return external.some((item) => item instanceof RegExp ? item.test(id) : item === id);
|
|
6274
|
+
};
|
|
6275
|
+
}
|
|
6223
6276
|
function shortcuts(restart) {
|
|
6224
6277
|
let actionRunning = false;
|
|
6225
6278
|
async function onInput(input) {
|
|
@@ -6436,4 +6489,4 @@ async function buildSingle(config, configDeps, isDualFormat, clean, restart, don
|
|
|
6436
6489
|
}
|
|
6437
6490
|
}
|
|
6438
6491
|
//#endregion
|
|
6439
|
-
export { filename_dts_to as _, resolveUserConfig as a, replaceTemplateName as b, RE_CSS as c, RE_JS as d, RE_JSON as f, RE_VUE as g, RE_TS as h, mergeConfig as i, RE_DTS as l, RE_ROLLDOWN_RUNTIME as m, buildWithConfigs as n, at as o, RE_NODE_MODULES$1 as p,
|
|
6492
|
+
export { filename_dts_to as _, resolveUserConfig as a, replaceTemplateName as b, RE_CSS as c, RE_JS as d, RE_JSON as f, RE_VUE as g, RE_TS as h, mergeConfig as i, RE_DTS as l, RE_ROLLDOWN_RUNTIME as m, buildWithConfigs as n, at as o, RE_NODE_MODULES$1 as p, build_B_nvJe4A_exports as r, ee as s, build$1 as t, RE_DTS_MAP as u, filename_js_to_dts as v, resolveTemplateFn as x, filename_to_dts as y };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import process from "node:process";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import fs from "node:fs/promises";
|
|
4
|
-
//#region ../../node_modules/.pnpm/tsdown@0.22.
|
|
4
|
+
//#region ../../node_modules/.pnpm/tsdown@0.22.3_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.3_@tsdown+exe@0.22.3_@type_701dbb346589e2d965113664da5ac600/node_modules/tsdown/dist/detect-B97OSl92.mjs
|
|
5
5
|
const AGENTS = [
|
|
6
6
|
"npm",
|
|
7
7
|
"yarn",
|