@voidzero-dev/vite-plus-core 1.0.0 → 1.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 +36 -177
- package/dist/rolldown/cli.mjs +33 -29
- package/dist/rolldown/config.d.mts +3 -3
- package/dist/rolldown/config.mjs +2 -2
- package/dist/rolldown/experimental-index.d.mts +29 -29
- package/dist/rolldown/experimental-index.mjs +8 -8
- package/dist/rolldown/experimental-runtime-types.d.ts +39 -7
- package/dist/rolldown/experimental-runtime.d.ts +39 -7
- package/dist/rolldown/experimental-runtime.mjs +284 -255
- package/dist/rolldown/filter-index.d.mts +1 -1
- package/dist/rolldown/index.d.mts +3 -3
- package/dist/rolldown/index.mjs +4 -4
- package/dist/rolldown/parallel-plugin-worker.mjs +2 -2
- package/dist/rolldown/parallel-plugin.d.mts +3 -3
- package/dist/rolldown/parse-ast-index.d.mts +6 -7
- package/dist/rolldown/parse-ast-index.mjs +1 -1
- package/dist/rolldown/plugins-index.d.mts +5 -5
- package/dist/rolldown/plugins-index.mjs +2 -2
- package/dist/rolldown/shared/{binding-BY0qR5iS.mjs → binding-DlR5d34p.mjs} +27 -28
- package/dist/rolldown/shared/{binding-BTa6BPQe.d.mts → binding-tzp6Hc_3.d.mts} +1 -1
- package/dist/rolldown/shared/{bindingify-input-options-B8JHmN6_.mjs → bindingify-input-options-DhjlrWZE.mjs} +203 -20
- package/dist/rolldown/shared/{constructors-xEvVj3lN.mjs → constructors-B2hkJoIA.mjs} +1 -1
- package/dist/rolldown/shared/{constructors-DuOq7MqW.d.mts → constructors-Dw9H1IvX.d.mts} +2 -2
- package/dist/rolldown/shared/{create-bundler-option-COco-7P6.mjs → create-bundler-option-1AEe_J0o.mjs} +36 -10
- package/dist/rolldown/shared/{define-config-C7HCoqY8.d.mts → define-config-CGhm2DU-.d.mts} +94 -5
- package/dist/rolldown/shared/{error-C7pxws0W.mjs → error-Dsqzw0Oa.mjs} +2 -1
- package/dist/rolldown/shared/{load-config-DkUBnDsI.mjs → load-config-bvw8z7Ft.mjs} +2 -2
- package/dist/rolldown/shared/{normalize-string-or-regex-F14uvr6D.mjs → normalize-string-or-regex-B7Gsiuz7.mjs} +1 -1
- package/dist/rolldown/shared/{parse-BWeE7Vr9.mjs → parse-BCSSrLHf.mjs} +2 -2
- package/dist/rolldown/shared/{resolve-tsconfig-DHwpIs5e.mjs → resolve-tsconfig-DyR2RUTm.mjs} +2 -2
- package/dist/rolldown/shared/{rolldown-Bue0gNT5.mjs → rolldown-C8QomUuX.mjs} +4 -4
- package/dist/rolldown/shared/{transform-DK_nCt9j.d.mts → transform-D4RDjIPI.d.mts} +1 -1
- package/dist/rolldown/shared/{watch-RXhXN1aG.mjs → watch-CPI70Lkn.mjs} +4 -4
- package/dist/rolldown/utils-index.d.mts +5 -5
- package/dist/rolldown/utils-index.mjs +5 -5
- package/dist/tsdown/{build-JVmLFaZt-DRlLhpV3.js → build-KEepWO_k-BOsPZ2cH.js} +26 -25
- package/dist/tsdown/{debug-CpC4hV25-C-OYr2iI.js → debug-DKTolR2K-BMJOFfj2.js} +4 -5
- package/dist/tsdown/{detect-Bg-d8iUV-Du8LljhG.js → detect-DHDepxVX-CpWW52Jd.js} +38 -34
- package/dist/tsdown/dist-BebyOHRu.js +6224 -0
- package/dist/tsdown/index-types.d.ts +216 -216
- package/dist/tsdown/index.js +4 -4
- package/dist/tsdown/{main-CyNcZUzu.js → main-Du9xCnhX.js} +105 -19
- package/dist/tsdown/npm_entry_picomatch.cjs +36 -25
- package/dist/tsdown/{resolver-DE0_sy8o-Bi3xbRxi.js → resolver-DE0_sy8o-DNoi-dFQ.js} +3 -2
- package/dist/tsdown/run.js +28 -26
- package/dist/tsdown/{src-pN7Bl6zo.js → src-CBWRkeF5.js} +4 -4
- package/dist/tsdown/{target-DgdLrXba-DpO9JXxB.js → target-HZbF5Cux-Cmv1LI5D.js} +175 -9
- package/dist/tsdown/{tsc-BLb4pSBY.js → tsc-YwU2b8yT.js} +4 -4
- package/dist/tsdown/tsdown-css.js +4 -4
- package/dist/tsdown/tsdown-exe.js +5 -43
- package/dist/vite/client/bundledDevClient.mjs +109 -345
- package/dist/vite/client/client.mjs +80 -28
- package/dist/vite/node/chunks/build.js +19 -19
- package/dist/vite/node/chunks/node.js +5210 -4942
- package/dist/vite/node/chunks/postcss-import.js +10 -10
- package/dist/vite/node/cli.js +24 -21
- package/dist/vite/node/index.d.ts +5 -2
- package/dist/vite/node/index.js +1 -2
- package/dist/vite/node/internal.js +1 -2
- package/dist/vite/node/module-runner.d.ts +1 -0
- package/dist/vite/node/module-runner.js +32 -27
- package/package.json +46 -30
- package/dist/rolldown/experimental-default-runtime.mjs +0 -116
- package/dist/rolldown/experimental-runtime-base.mjs +0 -95
- package/dist/tsdown/dist-VDcV1Qyy.js +0 -2952
- package/dist/tsdown/require-BbBF8Ii0-BDaWJgzA.js +0 -320
- package/dist/tsdown/style-DiMP8pYv-DIC5PXeH.js +0 -88
- package/dist/tsdown/version-CQ98ZBpL-D6GAHapk.js +0 -169
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as __toESM, t as require_binding } from "./binding-
|
|
2
|
-
//#region ../../../node_modules/.pnpm/oxc-parser@0.
|
|
1
|
+
import { n as __toESM, t as require_binding } from "./binding-DlR5d34p.mjs";
|
|
2
|
+
//#region ../../../node_modules/.pnpm/oxc-parser@0.154.0/node_modules/oxc-parser/src-js/wrap.js
|
|
3
3
|
var import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);
|
|
4
4
|
function wrap(result) {
|
|
5
5
|
let program, module, comments, errors;
|
package/dist/rolldown/shared/{resolve-tsconfig-DHwpIs5e.mjs → resolve-tsconfig-DyR2RUTm.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as __toESM, t as require_binding } from "./binding-
|
|
2
|
-
import { a as bindingifySourcemap, n as normalizeBindingError } from "./error-
|
|
1
|
+
import { n as __toESM, t as require_binding } from "./binding-DlR5d34p.mjs";
|
|
2
|
+
import { a as bindingifySourcemap, n as normalizeBindingError } from "./error-Dsqzw0Oa.mjs";
|
|
3
3
|
//#region src/utils/minify.ts
|
|
4
4
|
var import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);
|
|
5
5
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { n as __toESM, t as require_binding } from "./binding-
|
|
2
|
-
import { f as __decorate, h as PlainObjectLike, m as lazyProp, u as transformToRollupOutput } from "./bindingify-input-options-
|
|
3
|
-
import { l as PluginDriver, s as validateOption, t as createBundlerOptions } from "./create-bundler-option-
|
|
4
|
-
import { i as unwrapBindingResult } from "./error-
|
|
1
|
+
import { n as __toESM, t as require_binding } from "./binding-DlR5d34p.mjs";
|
|
2
|
+
import { f as __decorate, h as PlainObjectLike, m as lazyProp, u as transformToRollupOutput } from "./bindingify-input-options-DhjlrWZE.mjs";
|
|
3
|
+
import { l as PluginDriver, s as validateOption, t as createBundlerOptions } from "./create-bundler-option-1AEe_J0o.mjs";
|
|
4
|
+
import { i as unwrapBindingResult } from "./error-Dsqzw0Oa.mjs";
|
|
5
5
|
//#region src/types/rolldown-output-impl.ts
|
|
6
6
|
var import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);
|
|
7
7
|
var RolldownOutputImpl = class extends PlainObjectLike {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as RolldownLog } from "./logging-xuHO4mAy.mjs";
|
|
2
|
-
import { H as ParserOptions$1, J as TsconfigCache$1, K as SourceMap, R as MinifyOptions$1, V as ParseResult$1, a as BindingEnhancedTransformOptions, o as BindingEnhancedTransformResult, x as BindingTsconfigResult, z as MinifyResult$1 } from "./binding-
|
|
2
|
+
import { H as ParserOptions$1, J as TsconfigCache$1, K as SourceMap, R as MinifyOptions$1, V as ParseResult$1, a as BindingEnhancedTransformOptions, o as BindingEnhancedTransformResult, x as BindingTsconfigResult, z as MinifyResult$1 } from "./binding-tzp6Hc_3.mjs";
|
|
3
3
|
//#region src/utils/resolve-tsconfig.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Cache for tsconfig resolution to avoid redundant file system operations.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { n as __toESM, t as require_binding } from "./binding-
|
|
1
|
+
import { n as __toESM, t as require_binding } from "./binding-DlR5d34p.mjs";
|
|
2
2
|
import { c as logMultipleWatcherOption } from "./logs-D6uA606S.mjs";
|
|
3
|
-
import { C as LOG_LEVEL_WARN } from "./bindingify-input-options-
|
|
3
|
+
import { C as LOG_LEVEL_WARN } from "./bindingify-input-options-DhjlrWZE.mjs";
|
|
4
4
|
import { t as arraify } from "./misc-DOSKtd97.mjs";
|
|
5
|
-
import { l as PluginDriver, t as createBundlerOptions } from "./create-bundler-option-
|
|
6
|
-
import { t as aggregateBindingErrorsIntoJsError } from "./error-
|
|
5
|
+
import { l as PluginDriver, t as createBundlerOptions } from "./create-bundler-option-1AEe_J0o.mjs";
|
|
6
|
+
import { t as aggregateBindingErrorsIntoJsError } from "./error-Dsqzw0Oa.mjs";
|
|
7
7
|
//#region ../../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/signals.js
|
|
8
8
|
/**
|
|
9
9
|
* This is not the set of all possible signals.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { b as BindingTsconfigRawOptions, y as BindingTsconfigCompilerOptions } from "./shared/binding-
|
|
2
|
-
import { a as MinifyOptions, c as minifySync, d as parse, f as parseSync, i as transformSync, l as ParseResult, n as TransformResult, o as MinifyResult, p as TsconfigCache, r as transform, s as minify, t as TransformOptions, u as ParserOptions } from "./shared/transform-
|
|
1
|
+
import { b as BindingTsconfigRawOptions, y as BindingTsconfigCompilerOptions } from "./shared/binding-tzp6Hc_3.mjs";
|
|
2
|
+
import { a as MinifyOptions, c as minifySync, d as parse, f as parseSync, i as transformSync, l as ParseResult, n as TransformResult, o as MinifyResult, p as TsconfigCache, r as transform, s as minify, t as TransformOptions, u as ParserOptions } from "./shared/transform-D4RDjIPI.mjs";
|
|
3
3
|
import * as ESTree from "@oxc-project/types";
|
|
4
4
|
import { Program } from "@oxc-project/types";
|
|
5
|
-
//#region ../../../node_modules/.pnpm/oxc-parser@0.
|
|
5
|
+
//#region ../../../node_modules/.pnpm/oxc-parser@0.154.0/node_modules/oxc-parser/src-js/generated/visit/visitor.d.ts
|
|
6
6
|
interface VisitorObject$1 {
|
|
7
7
|
DebuggerStatement?: (node: ESTree.DebuggerStatement) => void;
|
|
8
8
|
"DebuggerStatement:exit"?: (node: ESTree.DebuggerStatement) => void;
|
|
@@ -366,10 +366,10 @@ type VisitorObject = VisitorObject$1;
|
|
|
366
366
|
* @category Utilities
|
|
367
367
|
* @experimental
|
|
368
368
|
*/
|
|
369
|
-
declare class Visitor {
|
|
369
|
+
export declare class Visitor {
|
|
370
370
|
#private;
|
|
371
371
|
constructor(visitor: VisitorObject);
|
|
372
372
|
visit(program: Program): void;
|
|
373
373
|
}
|
|
374
374
|
//#endregion
|
|
375
|
-
export { type ESTree, type MinifyOptions, type MinifyResult, type ParseResult, type ParserOptions, type TransformOptions, type TransformResult, TsconfigCache, type BindingTsconfigCompilerOptions as TsconfigCompilerOptions, type BindingTsconfigRawOptions as TsconfigRawOptions,
|
|
375
|
+
export { type ESTree, type MinifyOptions, type MinifyResult, type ParseResult, type ParserOptions, type TransformOptions, type TransformResult, TsconfigCache, type BindingTsconfigCompilerOptions as TsconfigCompilerOptions, type BindingTsconfigRawOptions as TsconfigRawOptions, type VisitorObject, minify, minifySync, parse, parseSync, transform, transformSync };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as parseSync, t as parse } from "./shared/parse-
|
|
2
|
-
import { a as minify, i as transformSync, o as minifySync, r as transform, t as TsconfigCache } from "./shared/resolve-tsconfig-
|
|
3
|
-
//#region ../../../node_modules/.pnpm/oxc-parser@0.
|
|
1
|
+
import { n as parseSync, t as parse } from "./shared/parse-BCSSrLHf.mjs";
|
|
2
|
+
import { a as minify, i as transformSync, o as minifySync, r as transform, t as TsconfigCache } from "./shared/resolve-tsconfig-DyR2RUTm.mjs";
|
|
3
|
+
//#region ../../../node_modules/.pnpm/oxc-parser@0.154.0/node_modules/oxc-parser/src-js/generated/visit/walk.js
|
|
4
4
|
function walkNode(node, visitors) {
|
|
5
5
|
if (node == null) return;
|
|
6
6
|
if (Array.isArray(node)) {
|
|
@@ -2008,7 +2008,7 @@ function walkTSUnionType(node, visitors) {
|
|
|
2008
2008
|
exit !== null && exit(node);
|
|
2009
2009
|
}
|
|
2010
2010
|
//#endregion
|
|
2011
|
-
//#region ../../../node_modules/.pnpm/oxc-parser@0.
|
|
2011
|
+
//#region ../../../node_modules/.pnpm/oxc-parser@0.154.0/node_modules/oxc-parser/src-js/generated/visit/type_ids.js
|
|
2012
2012
|
/** Mapping from node type name to node type ID */
|
|
2013
2013
|
const NODE_TYPE_IDS_MAP = /* @__PURE__ */ new Map([
|
|
2014
2014
|
["DebuggerStatement", 0],
|
|
@@ -2178,7 +2178,7 @@ const NODE_TYPE_IDS_MAP = /* @__PURE__ */ new Map([
|
|
|
2178
2178
|
["TSUnionType", 164]
|
|
2179
2179
|
]);
|
|
2180
2180
|
//#endregion
|
|
2181
|
-
//#region ../../../node_modules/.pnpm/oxc-parser@0.
|
|
2181
|
+
//#region ../../../node_modules/.pnpm/oxc-parser@0.154.0/node_modules/oxc-parser/src-js/visit/visitor.js
|
|
2182
2182
|
let compiledVisitor;
|
|
2183
2183
|
function createCompiledVisitor() {
|
|
2184
2184
|
compiledVisitor = [];
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { i as __toESM, n as __exportAll$1, t as __commonJSMin } from "./rolldown-runtime-B4iAMlE-.js";
|
|
2
|
-
import {
|
|
3
|
-
import { a as createSuppressWarnings, c as globalLogger, i as createLogger, l as prettyFormat, n as version, o as generateColor, r as LogLevels, s as getNameLabel } from "./debug-
|
|
4
|
-
import {
|
|
5
|
-
import { a as parseRange, c as fsCopy, d as fsStat, f as lowestCommonAncestor, i as validateSea, l as fsExists, o as satisfies, p as stripExtname, r as resolveTarget, s as formatBytes, t as buildExe, u as fsRemove } from "./target-DgdLrXba-DpO9JXxB.js";
|
|
6
|
-
import { S as RE_NODE_MODULES$1, _ as RE_CSS, b as RE_JS, t as coerce, v as RE_DTS } from "./version-CQ98ZBpL-D6GAHapk.js";
|
|
2
|
+
import { c as importWithError, d as pkgExists, f as resolveComma, g as toArray, h as styleText$1, l as matchPattern, m as slash, n as x, o as createConcurrencyExecutor, p as resolveRegex, r as createDebug, s as debounce, t as exec, u as noop } from "./main-Du9xCnhX.js";
|
|
3
|
+
import { a as createSuppressWarnings, c as globalLogger, i as createLogger, l as prettyFormat, n as version, o as generateColor, r as LogLevels, s as getNameLabel } from "./debug-DKTolR2K-BMJOFfj2.js";
|
|
4
|
+
import { A as fsStat, D as fsCopy, E as formatBytes, M as stripExtname, O as fsExists, a as resolveTarget, g as RE_JS, j as lowestCommonAncestor, k as fsRemove, l as parseRange, m as RE_DTS, o as validateSea, p as RE_CSS, r as buildExe, s as coerce, u as satisfies, v as RE_NODE_MODULES$1 } from "./target-HZbF5Cux-Cmv1LI5D.js";
|
|
7
5
|
import module$1, { builtinModules, createRequire, isBuiltin } from "node:module";
|
|
8
6
|
import process$1 from "node:process";
|
|
9
7
|
import { formatWithOptions, inspect, isDeepStrictEqual, parseEnv, promisify } from "node:util";
|
|
@@ -1086,7 +1084,7 @@ i((e, n) => {
|
|
|
1086
1084
|
return m.substitutions.map((f) => E(f.replace("*", v)));
|
|
1087
1085
|
}, "resolvePathAlias");
|
|
1088
1086
|
//#endregion
|
|
1089
|
-
//#region ../../node_modules/.pnpm/tsdown@0.23.
|
|
1087
|
+
//#region ../../node_modules/.pnpm/tsdown@0.23.1_@arethetypeswrong+core@0.18.2_@tsdown+css@0.23.1_@tsdown+exe@0.23.1_@type_1c5668b23b89ab367f1fd43e24d0d72d/node_modules/tsdown/dist/deps-DCK8g4G9.mjs
|
|
1090
1088
|
const shimFile = path.resolve(import.meta.dirname, "..", "esm-shims.js");
|
|
1091
1089
|
const shimsInject = {
|
|
1092
1090
|
__dirname: [shimFile, "__dirname"],
|
|
@@ -4077,7 +4075,7 @@ async function glob(globInput, options) {
|
|
|
4077
4075
|
return crawler ? formatPaths(await crawler.withPromise(), relative) : [];
|
|
4078
4076
|
}
|
|
4079
4077
|
//#endregion
|
|
4080
|
-
//#region ../../node_modules/.pnpm/empathic@2.0
|
|
4078
|
+
//#region ../../node_modules/.pnpm/empathic@2.1.0/node_modules/empathic/resolve.mjs
|
|
4081
4079
|
/**
|
|
4082
4080
|
* Resolve an absolute path from {@link root}, but only
|
|
4083
4081
|
* if {@link input} isn't already absolute.
|
|
@@ -4090,7 +4088,7 @@ function absolute(input, root) {
|
|
|
4090
4088
|
return isAbsolute(input) ? input : resolve(root || ".", input);
|
|
4091
4089
|
}
|
|
4092
4090
|
//#endregion
|
|
4093
|
-
//#region ../../node_modules/.pnpm/empathic@2.0
|
|
4091
|
+
//#region ../../node_modules/.pnpm/empathic@2.1.0/node_modules/empathic/walk.mjs
|
|
4094
4092
|
/**
|
|
4095
4093
|
* Get all parent directories of {@link base}.
|
|
4096
4094
|
* Stops after {@link Options['last']} is processed.
|
|
@@ -4110,7 +4108,7 @@ function up$2(base, options) {
|
|
|
4110
4108
|
return arr;
|
|
4111
4109
|
}
|
|
4112
4110
|
//#endregion
|
|
4113
|
-
//#region ../../node_modules/.pnpm/empathic@2.0
|
|
4111
|
+
//#region ../../node_modules/.pnpm/empathic@2.1.0/node_modules/empathic/find.mjs
|
|
4114
4112
|
/**
|
|
4115
4113
|
* Find an item by name, walking parent directories until found.
|
|
4116
4114
|
*
|
|
@@ -4125,7 +4123,7 @@ function up$1(name, options) {
|
|
|
4125
4123
|
}
|
|
4126
4124
|
}
|
|
4127
4125
|
//#endregion
|
|
4128
|
-
//#region ../../node_modules/.pnpm/empathic@2.0
|
|
4126
|
+
//#region ../../node_modules/.pnpm/empathic@2.1.0/node_modules/empathic/package.mjs
|
|
4129
4127
|
/**
|
|
4130
4128
|
* Find the closest "package.json" file while walking parent directories.
|
|
4131
4129
|
* @returns The absolute path to a "package.json", if found.
|
|
@@ -4134,8 +4132,8 @@ function up(options) {
|
|
|
4134
4132
|
return up$1("package.json", options);
|
|
4135
4133
|
}
|
|
4136
4134
|
//#endregion
|
|
4137
|
-
//#region ../../node_modules/.pnpm/import-without-cache@0.4.
|
|
4138
|
-
var __require = /*
|
|
4135
|
+
//#region ../../node_modules/.pnpm/import-without-cache@0.4.1/node_modules/import-without-cache/dist/index.mjs
|
|
4136
|
+
var __require = /* #__PURE__ */ (() => createRequire(import.meta.url))();
|
|
4139
4137
|
const namespace = "no-cache://";
|
|
4140
4138
|
const namespaceLength = 11;
|
|
4141
4139
|
const isSupported = !!module$1.registerHooks;
|
|
@@ -4183,7 +4181,7 @@ function getParentUUID(parentURL) {
|
|
|
4183
4181
|
function appendUUID(url, uuid) {
|
|
4184
4182
|
const parsed = new URL(url);
|
|
4185
4183
|
parsed.searchParams.set("no-cache", uuid);
|
|
4186
|
-
return parsed.
|
|
4184
|
+
return parsed.href;
|
|
4187
4185
|
}
|
|
4188
4186
|
function cleanupImportAttributes(context) {
|
|
4189
4187
|
if (!context.importAttributes?.cache) return;
|
|
@@ -4503,7 +4501,7 @@ async function resolveEntry(logger, entry, cwd, color, nameLabel, root) {
|
|
|
4503
4501
|
}
|
|
4504
4502
|
function toObjectEntry(entry, cwd, root) {
|
|
4505
4503
|
if (typeof entry === "string") entry = [entry];
|
|
4506
|
-
if (!Array.isArray(entry)) return resolveObjectEntry(entry, cwd);
|
|
4504
|
+
if (!Array.isArray(entry)) return resolveObjectEntry(entry, cwd, root);
|
|
4507
4505
|
return resolveArrayEntry(entry, cwd, root);
|
|
4508
4506
|
}
|
|
4509
4507
|
function isGlobEntry(entry) {
|
|
@@ -4512,7 +4510,7 @@ function isGlobEntry(entry) {
|
|
|
4512
4510
|
if (Array.isArray(entry)) return entry.some((e) => typeof e === "string" ? isDynamicPattern(e) : isGlobEntry(e));
|
|
4513
4511
|
return Object.keys(entry).some((key) => key.includes("*"));
|
|
4514
4512
|
}
|
|
4515
|
-
async function resolveObjectEntry(entries, cwd) {
|
|
4513
|
+
async function resolveObjectEntry(entries, cwd, root) {
|
|
4516
4514
|
const entry = Object.fromEntries((await Promise.all(Object.entries(entries).map(async ([key, value]) => {
|
|
4517
4515
|
if (!key.includes("*")) {
|
|
4518
4516
|
if (Array.isArray(value)) throw new TypeError(`Object entry "${key}" cannot have an array value when the key is not a glob pattern.`);
|
|
@@ -4534,7 +4532,7 @@ async function resolveObjectEntry(entries, cwd) {
|
|
|
4534
4532
|
if (valueGlobBase === void 0) throw new Error(`Cannot determine base directory for value glob patterns of key "${key}".`);
|
|
4535
4533
|
return files.map((file) => [slash(key.replaceAll("*", stripExtname(path.relative(valueGlobBase, file)))), path.resolve(cwd, file)]);
|
|
4536
4534
|
}))).flat());
|
|
4537
|
-
return [entry, lowestCommonAncestor(...Object.values(entry))];
|
|
4535
|
+
return [entry, root || lowestCommonAncestor(...Object.values(entry))];
|
|
4538
4536
|
}
|
|
4539
4537
|
async function resolveArrayEntry(entries, cwd, root) {
|
|
4540
4538
|
const stringEntries = [];
|
|
@@ -5223,7 +5221,7 @@ function filterConfig(filter, configCwd, name) {
|
|
|
5223
5221
|
return toArray(filter).some((value) => name && name === value || cwd === value);
|
|
5224
5222
|
}
|
|
5225
5223
|
//#endregion
|
|
5226
|
-
//#region ../../node_modules/.pnpm/tsdown@0.23.
|
|
5224
|
+
//#region ../../node_modules/.pnpm/tsdown@0.23.1_@arethetypeswrong+core@0.18.2_@tsdown+css@0.23.1_@tsdown+exe@0.23.1_@type_1c5668b23b89ab367f1fd43e24d0d72d/node_modules/tsdown/dist/watch-UrMX4y5g.mjs
|
|
5227
5225
|
async function copy(options) {
|
|
5228
5226
|
if (!options.copy) return;
|
|
5229
5227
|
const resolved = await resolveCopyEntries(options);
|
|
@@ -5433,7 +5431,7 @@ function WatchPlugin(configDeps, { config, chunks }) {
|
|
|
5433
5431
|
};
|
|
5434
5432
|
}
|
|
5435
5433
|
//#endregion
|
|
5436
|
-
//#region ../../node_modules/.pnpm/hookable@6.1.
|
|
5434
|
+
//#region ../../node_modules/.pnpm/hookable@6.1.2/node_modules/hookable/dist/index.mjs
|
|
5437
5435
|
function flatHooks(configHooks, hooks = {}, parentName) {
|
|
5438
5436
|
for (const key in configHooks) {
|
|
5439
5437
|
const subHook = configHooks[key];
|
|
@@ -5604,8 +5602,8 @@ var Hookable = class {
|
|
|
5604
5602
|
}
|
|
5605
5603
|
};
|
|
5606
5604
|
//#endregion
|
|
5607
|
-
//#region ../../node_modules/.pnpm/tsdown@0.23.
|
|
5608
|
-
var
|
|
5605
|
+
//#region ../../node_modules/.pnpm/tsdown@0.23.1_@arethetypeswrong+core@0.18.2_@tsdown+css@0.23.1_@tsdown+exe@0.23.1_@type_1c5668b23b89ab367f1fd43e24d0d72d/node_modules/tsdown/dist/build-KEepWO_k.mjs
|
|
5606
|
+
var build_KEepWO_k_exports = /* @__PURE__ */ __exportAll$1({
|
|
5609
5607
|
n: () => buildWithConfigs,
|
|
5610
5608
|
r: () => build_exports,
|
|
5611
5609
|
t: () => build$1
|
|
@@ -5910,7 +5908,7 @@ async function bundleDone(bundleByPkg, bundle) {
|
|
|
5910
5908
|
async function packTarball(packageJsonPath) {
|
|
5911
5909
|
const pkgDir = path.dirname(packageJsonPath);
|
|
5912
5910
|
const destination = await mkdtemp(path.join(tmpdir(), "tsdown-pack-"));
|
|
5913
|
-
const { detect } = await import("./detect-
|
|
5911
|
+
const { detect } = await import("./detect-DHDepxVX-CpWW52Jd.js");
|
|
5914
5912
|
try {
|
|
5915
5913
|
const detected = await detect({ cwd: pkgDir });
|
|
5916
5914
|
debug$1("Detected package manager: %o", detected);
|
|
@@ -5979,7 +5977,10 @@ async function pack(dir, pm, destination, ignoreScripts) {
|
|
|
5979
5977
|
}
|
|
5980
5978
|
const output = await x(command, args, {
|
|
5981
5979
|
nodePath: false,
|
|
5982
|
-
nodeOptions: {
|
|
5980
|
+
nodeOptions: {
|
|
5981
|
+
cwd: dir,
|
|
5982
|
+
env: { npm_config_dry_run: void 0 }
|
|
5983
|
+
}
|
|
5983
5984
|
});
|
|
5984
5985
|
const tarballFile = await readdir(destination).then((files) => files.find((file) => file.endsWith(".tgz")));
|
|
5985
5986
|
if (!tarballFile) throw new Error(`Failed to find packed tarball file in ${destination}. Command output:\n${JSON.stringify(output, null, 2)}`);
|
|
@@ -6051,7 +6052,7 @@ async function resolveInputOptions(config, format, configDeps, bundle, cjsDts, i
|
|
|
6051
6052
|
if (nodeProtocol) plugins.push(NodeProtocolPlugin(nodeProtocol));
|
|
6052
6053
|
if (config.pkg || config.deps.neverBundle === true || config.deps.dts.neverBundle === true) plugins.push(DepsPlugin(config, bundle));
|
|
6053
6054
|
if (dts) {
|
|
6054
|
-
const { dts: dtsPlugin } = await import("./dist-
|
|
6055
|
+
const { dts: dtsPlugin } = await import("./dist-BebyOHRu.js");
|
|
6055
6056
|
const options = {
|
|
6056
6057
|
tsconfig,
|
|
6057
6058
|
logger,
|
|
@@ -6124,7 +6125,7 @@ async function resolveInputOptions(config, format, configDeps, bundle, cjsDts, i
|
|
|
6124
6125
|
cwd,
|
|
6125
6126
|
external,
|
|
6126
6127
|
resolve: { alias },
|
|
6127
|
-
tsconfig: tsconfig
|
|
6128
|
+
tsconfig: tsconfig ?? void 0,
|
|
6128
6129
|
treeshake,
|
|
6129
6130
|
platform: cjsDts || format === "cjs" ? "node" : platform,
|
|
6130
6131
|
transform: {
|
|
@@ -6465,4 +6466,4 @@ async function buildSingle(config, configDeps, isDualFormat, clean, restart, don
|
|
|
6465
6466
|
}
|
|
6466
6467
|
}
|
|
6467
6468
|
//#endregion
|
|
6468
|
-
export { resolveUserConfig as a, mergeConfig as i, buildWithConfigs as n, mt as o,
|
|
6469
|
+
export { resolveUserConfig as a, mergeConfig as i, buildWithConfigs as n, mt as o, build_KEepWO_k_exports as r, te as s, build$1 as t };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import { a as namespaces, i as enable, r as createDebug } from "./main-CyNcZUzu.js";
|
|
1
|
+
import { a as namespaces, f as resolveComma, g as toArray, h as styleText$1, i as enable, r as createDebug, u as noop } from "./main-Du9xCnhX.js";
|
|
3
2
|
import process from "node:process";
|
|
4
3
|
import readline from "node:readline";
|
|
5
|
-
//#region ../../node_modules/.pnpm/tsdown@0.23.
|
|
4
|
+
//#region ../../node_modules/.pnpm/tsdown@0.23.1_@arethetypeswrong+core@0.18.2_@tsdown+css@0.23.1_@tsdown+exe@0.23.1_@type_1c5668b23b89ab367f1fd43e24d0d72d/node_modules/tsdown/dist/logger-D9XFzQl9.mjs
|
|
6
5
|
const LogLevels = {
|
|
7
6
|
silent: 0,
|
|
8
7
|
error: 1,
|
|
@@ -145,8 +144,8 @@ function hue2rgb(p, q, t) {
|
|
|
145
144
|
return p;
|
|
146
145
|
}
|
|
147
146
|
//#endregion
|
|
148
|
-
//#region ../../node_modules/.pnpm/tsdown@0.23.
|
|
149
|
-
var version = "0.23.
|
|
147
|
+
//#region ../../node_modules/.pnpm/tsdown@0.23.1_@arethetypeswrong+core@0.18.2_@tsdown+css@0.23.1_@tsdown+exe@0.23.1_@type_1c5668b23b89ab367f1fd43e24d0d72d/node_modules/tsdown/dist/debug-DKTolR2K.mjs
|
|
148
|
+
var version = "0.23.1";
|
|
150
149
|
const debugLog = createDebug("tsdown:debug");
|
|
151
150
|
function enableDebug(debug) {
|
|
152
151
|
if (!debug) return;
|
|
@@ -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.23.
|
|
4
|
+
//#region ../../node_modules/.pnpm/tsdown@0.23.1_@arethetypeswrong+core@0.18.2_@tsdown+css@0.23.1_@tsdown+exe@0.23.1_@type_1c5668b23b89ab367f1fd43e24d0d72d/node_modules/tsdown/dist/detect-DHDepxVX.mjs
|
|
5
5
|
const AGENTS = [
|
|
6
6
|
"npm",
|
|
7
7
|
"yarn",
|
|
@@ -12,7 +12,8 @@ const AGENTS = [
|
|
|
12
12
|
"bun",
|
|
13
13
|
"deno",
|
|
14
14
|
"nub",
|
|
15
|
-
"aube"
|
|
15
|
+
"aube",
|
|
16
|
+
"upm"
|
|
16
17
|
];
|
|
17
18
|
const LOCKS = {
|
|
18
19
|
"aube-lock.yaml": "aube",
|
|
@@ -21,6 +22,7 @@ const LOCKS = {
|
|
|
21
22
|
"bun.lockb": "bun",
|
|
22
23
|
"deno.lock": "deno",
|
|
23
24
|
"nub.lock": "nub",
|
|
25
|
+
"upm.lock": "upm",
|
|
24
26
|
"pnpm-lock.yaml": "pnpm",
|
|
25
27
|
"pnpm-workspace.yaml": "pnpm",
|
|
26
28
|
"yarn.lock": "yarn",
|
|
@@ -31,6 +33,7 @@ const INSTALL_METADATA = {
|
|
|
31
33
|
"node_modules/.aube/": "aube",
|
|
32
34
|
"node_modules/.deno/": "deno",
|
|
33
35
|
"node_modules/.pnpm/": "pnpm",
|
|
36
|
+
"node_modules/.upm/": "upm",
|
|
34
37
|
"node_modules/.yarn-state.yml": "yarn",
|
|
35
38
|
"node_modules/.yarn_integrity": "yarn",
|
|
36
39
|
"node_modules/.package-lock.json": "npm",
|
|
@@ -108,57 +111,58 @@ async function detect(options = {}) {
|
|
|
108
111
|
}
|
|
109
112
|
return null;
|
|
110
113
|
}
|
|
114
|
+
function normalizeAgentVersion(version) {
|
|
115
|
+
return version?.match(/\d+(\.\d+){0,2}/)?.[0] ?? version;
|
|
116
|
+
}
|
|
111
117
|
function getNameAndVer(pkg) {
|
|
112
|
-
const handelVer = (version) => version?.match(/\d+(\.\d+){0,2}/)?.[0] ?? version;
|
|
113
118
|
if (typeof pkg.packageManager === "string") {
|
|
114
119
|
const [name, ver] = pkg.packageManager.replace(/^\^/, "").split("@");
|
|
115
120
|
return {
|
|
116
121
|
name,
|
|
117
|
-
ver:
|
|
122
|
+
ver: normalizeAgentVersion(ver)
|
|
118
123
|
};
|
|
119
124
|
}
|
|
120
125
|
if (typeof pkg.devEngines?.packageManager?.name === "string") return {
|
|
121
126
|
name: pkg.devEngines.packageManager.name,
|
|
122
|
-
ver:
|
|
127
|
+
ver: normalizeAgentVersion(pkg.devEngines.packageManager.version)
|
|
123
128
|
};
|
|
124
129
|
}
|
|
125
130
|
async function handlePackageManager(filepath, options) {
|
|
126
131
|
try {
|
|
127
132
|
const content = await fs.readFile(filepath, "utf8");
|
|
128
133
|
const pkg = options.packageJsonParser ? await options.packageJsonParser(content, filepath) : JSON.parse(content);
|
|
129
|
-
let agent;
|
|
130
134
|
const nameAndVer = getNameAndVer(pkg);
|
|
131
|
-
if (nameAndVer)
|
|
132
|
-
const name = nameAndVer.name;
|
|
133
|
-
const ver = nameAndVer.ver;
|
|
134
|
-
let version = ver;
|
|
135
|
-
if (name === "yarn" && ver && Number.parseInt(ver) > 1) {
|
|
136
|
-
agent = "yarn@berry";
|
|
137
|
-
version = "berry";
|
|
138
|
-
return {
|
|
139
|
-
name,
|
|
140
|
-
agent,
|
|
141
|
-
version
|
|
142
|
-
};
|
|
143
|
-
} else if (name === "pnpm" && ver && Number.parseInt(ver) < 7) {
|
|
144
|
-
agent = "pnpm@6";
|
|
145
|
-
return {
|
|
146
|
-
name,
|
|
147
|
-
agent,
|
|
148
|
-
version
|
|
149
|
-
};
|
|
150
|
-
} else if (AGENTS.includes(name)) {
|
|
151
|
-
agent = name;
|
|
152
|
-
return {
|
|
153
|
-
name,
|
|
154
|
-
agent,
|
|
155
|
-
version
|
|
156
|
-
};
|
|
157
|
-
} else return options.onUnknown?.(pkg.packageManager) ?? null;
|
|
158
|
-
}
|
|
135
|
+
if (nameAndVer) return resolveAgent(nameAndVer.name, nameAndVer.ver) ?? options.onUnknown?.(pkg.packageManager) ?? null;
|
|
159
136
|
} catch {}
|
|
160
137
|
return null;
|
|
161
138
|
}
|
|
139
|
+
function resolveAgent(name, ver) {
|
|
140
|
+
let agent;
|
|
141
|
+
let version = ver;
|
|
142
|
+
if (name === "yarn" && ver && Number.parseInt(ver) > 1) {
|
|
143
|
+
agent = "yarn@berry";
|
|
144
|
+
version = "berry";
|
|
145
|
+
return {
|
|
146
|
+
name,
|
|
147
|
+
agent,
|
|
148
|
+
version
|
|
149
|
+
};
|
|
150
|
+
} else if (name === "pnpm" && ver && Number.parseInt(ver) < 7) {
|
|
151
|
+
agent = "pnpm@6";
|
|
152
|
+
return {
|
|
153
|
+
name,
|
|
154
|
+
agent,
|
|
155
|
+
version
|
|
156
|
+
};
|
|
157
|
+
} else if (AGENTS.includes(name)) {
|
|
158
|
+
agent = name;
|
|
159
|
+
return {
|
|
160
|
+
name,
|
|
161
|
+
agent,
|
|
162
|
+
version
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
}
|
|
162
166
|
function isMetadataYarnClassic(metadataPath) {
|
|
163
167
|
return metadataPath.endsWith(".yarn_integrity");
|
|
164
168
|
}
|