@voidzero-dev/vite-plus-core 0.3.1 → 0.3.3
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 +0 -29
- 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 +9 -4
- package/dist/rolldown/experimental-index.mjs +10 -9
- package/dist/rolldown/experimental-runtime-types.d.ts +19 -0
- package/dist/rolldown/experimental-runtime.d.ts +19 -0
- package/dist/rolldown/experimental-runtime.mjs +42 -0
- 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-DZuNHVw4.d.mts → binding-BTa6BPQe.d.mts} +23 -36
- package/dist/rolldown/shared/{binding-DmImI4pj.mjs → binding-BbrDfv1x.mjs} +53 -28
- package/dist/rolldown/shared/{bindingify-input-options-BYClWKnj.mjs → bindingify-input-options-CbBAjvu6.mjs} +9 -8
- package/dist/rolldown/shared/{constructors-BM20b11r.d.mts → constructors-CmDKpWIU.d.mts} +2 -2
- package/dist/rolldown/shared/{constructors-mRbcbLyX.mjs → constructors-D9jwEbE4.mjs} +1 -1
- package/dist/rolldown/shared/{create-bundler-option-CHTBktos.mjs → create-bundler-option-wxuQPB7F.mjs} +120 -160
- package/dist/rolldown/shared/{define-config-DNX0WekP.d.mts → define-config-BFdLpVut.d.mts} +10 -1
- package/dist/rolldown/shared/{error-BP8lJHle.mjs → error-CGhV1ebk.mjs} +1 -1
- package/dist/rolldown/shared/{load-config-Cx5fx_8Q.mjs → load-config-DOMKIWz0.mjs} +1 -1
- package/dist/rolldown/shared/{normalize-string-or-regex-Dm69lpQ-.mjs → normalize-string-or-regex-zc1bUto6.mjs} +1 -1
- package/dist/rolldown/shared/{parse-8sr82jSR.mjs → parse-B-7jgDap.mjs} +2 -2
- package/dist/rolldown/shared/{resolve-tsconfig-BlNGaH3Y.mjs → resolve-tsconfig-Bf6oL9fm.mjs} +2 -2
- package/dist/rolldown/shared/{rolldown-CaX_Wmqc.mjs → rolldown-DZGaRc5R.mjs} +4 -4
- package/dist/rolldown/shared/{transform-CVse9_mH.d.mts → transform-DK_nCt9j.d.mts} +1 -1
- package/dist/rolldown/shared/{watch-YKfJgIxz.mjs → watch-CUKYWzxY.mjs} +4 -4
- package/dist/rolldown/utils-index.d.mts +3 -3
- package/dist/rolldown/utils-index.mjs +5 -5
- package/dist/tsdown/{build-JVmLFaZt-kqQJ2U7s.js → build-JVmLFaZt-BN9yuB6k.js} +13 -426
- package/dist/tsdown/{debug-CpC4hV25-tvH_Dsg5.js → debug-CpC4hV25-BeCITV83.js} +4 -90
- package/dist/tsdown/{detect-Bg-d8iUV-KfbO7neP.js → detect-Bg-d8iUV-Cr_BRLVW.js} +1 -1
- package/dist/tsdown/{dist-Cuw3Ngo4.js → dist-ByW_jJfv.js} +5 -5
- package/dist/tsdown/index-types.d.ts +52 -52
- package/dist/tsdown/index.js +4 -4
- package/dist/tsdown/internal-DTYQdXId.js +3 -0
- package/dist/tsdown/{main-CyNcZUzu.js → main-bgV9NlwM.js} +88 -3
- package/dist/tsdown/{resolver-DE0_sy8o-ZQqHQjRu.js → resolver-DE0_sy8o-UMsN-SXx.js} +2 -2
- package/dist/tsdown/run.js +4 -4
- package/dist/tsdown/{src-BWidcM5N.js → src-D5xv98Iu.js} +4 -4
- package/dist/tsdown/target-DgdLrXba-DaJJ11xX.js +586 -0
- package/dist/tsdown/{tsc-ChjRhsoQ.js → tsc-BFDF_Im9.js} +3 -3
- package/dist/tsdown/tsdown-css.js +5 -3
- package/dist/tsdown/tsdown-exe.js +4 -15
- package/dist/vite/client/bundledDevClient.mjs +105 -40
- package/dist/vite/client/client.mjs +288 -260
- package/dist/vite/node/chunks/build.js +19 -19
- package/dist/vite/node/chunks/node.js +32770 -32305
- package/dist/vite/node/chunks/postcss-import.js +10 -10
- package/dist/vite/node/cli.js +12 -8
- package/dist/vite/node/index.d.ts +1568 -1577
- package/dist/vite/node/index.js +1 -1
- package/dist/vite/node/module-runner.d.ts +1 -1
- package/dist/vite/node/module-runner.js +199 -200
- package/dist/vite/types/customEvent.d.ts +2 -0
- package/dist/vite/types/hmrPayload.d.ts +2 -0
- package/dist/vite/types/internal/cssPreprocessorOptions.d.ts +2 -2
- package/dist/vite/types/internal/devtoolsOptions.d.ts +9 -0
- package/package.json +23 -26
- package/dist/tsdown/internal-D-JfB5uT.js +0 -29
- package/dist/tsdown/internal-lhH-5yya.js +0 -62
- package/dist/tsdown/version-CQ98ZBpL-Obdnv4J7.js +0 -141
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as createDebug } from "./main-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { r as createDebug } from "./main-bgV9NlwM.js";
|
|
2
|
+
import { C as filename_to_dts, S as filename_js_to_dts, T as resolveTemplateFn, _ as RE_JSON, b as RE_TS, g as RE_JS, h as RE_DTS_MAP, m as RE_DTS, p as RE_CSS, v as RE_NODE_MODULES, w as replaceTemplateName, x as filename_dts_to, y as RE_ROLLDOWN_RUNTIME } from "./target-DgdLrXba-DaJJ11xX.js";
|
|
3
|
+
import { o as mt, s as te } from "./build-JVmLFaZt-BN9yuB6k.js";
|
|
4
4
|
import { createRequire } from "node:module";
|
|
5
5
|
import process from "node:process";
|
|
6
6
|
import { styleText } from "node:util";
|
|
@@ -1408,7 +1408,7 @@ var TscGenerator = class {
|
|
|
1408
1408
|
this.worker = createTscWorker();
|
|
1409
1409
|
return;
|
|
1410
1410
|
}
|
|
1411
|
-
this.tscModule = await import("./tsc-
|
|
1411
|
+
this.tscModule = await import("./tsc-BFDF_Im9.js");
|
|
1412
1412
|
if (this.newContext) this.context = createContext();
|
|
1413
1413
|
}
|
|
1414
1414
|
async emit(_code, fileName) {
|
|
@@ -2952,7 +2952,7 @@ function createDtsResolvePlugin({ cwd, tsconfig, tsconfigRaw, resolver, sideEffe
|
|
|
2952
2952
|
async function resolveDtsPath(id, importer, rolldownResolution) {
|
|
2953
2953
|
let dtsPath;
|
|
2954
2954
|
if (resolver === "tsc") {
|
|
2955
|
-
const { tscResolve } = await import("./resolver-DE0_sy8o-
|
|
2955
|
+
const { tscResolve } = await import("./resolver-DE0_sy8o-UMsN-SXx.js");
|
|
2956
2956
|
dtsPath = tscResolve(id, importer, cwd, tsconfig, tsconfigRaw);
|
|
2957
2957
|
} else dtsPath = baseDtsResolver(id, importer);
|
|
2958
2958
|
debug$1("Using %s for dts import: %O -> %O", resolver, id, dtsPath);
|
|
@@ -2,7 +2,55 @@ import { TransformOptions } from "lightningcss";
|
|
|
2
2
|
import * as Rolldown from "@voidzero-dev/vite-plus-core/rolldown";
|
|
3
3
|
import { BuildOptions, ChecksOptions, ExternalOption, InputOptions, InternalModuleFormat, MinifyOptions, ModuleFormat, ModuleTypes, OutputAsset, OutputChunk, OutputOptions, Plugin, RolldownPlugin, TreeshakingOptions } from "@voidzero-dev/vite-plus-core/rolldown";
|
|
4
4
|
import { IsolatedDeclarationsOptions } from "@voidzero-dev/vite-plus-core/rolldown/experimental";
|
|
5
|
-
//#region ../../node_modules/.pnpm/@tsdown+
|
|
5
|
+
//#region ../../node_modules/.pnpm/@tsdown+exe@0.23.0_tsdown@0.23.0/node_modules/@tsdown/exe/dist/index.d.mts
|
|
6
|
+
//#region src/platform.d.ts
|
|
7
|
+
type ExePlatform = "win" | "darwin" | "linux";
|
|
8
|
+
type ExeArch = "x64" | "arm64";
|
|
9
|
+
interface ExeTarget {
|
|
10
|
+
platform: ExePlatform;
|
|
11
|
+
arch: ExeArch;
|
|
12
|
+
/**
|
|
13
|
+
* Node.js version to use for the executable.
|
|
14
|
+
*
|
|
15
|
+
* Accepts a valid semver string (e.g., `"25.7.0"`), or the special values
|
|
16
|
+
* `"latest"` / `"latest-lts"` which resolve the version automatically from
|
|
17
|
+
* {@link https://nodejs.org/dist/index.json}.
|
|
18
|
+
*
|
|
19
|
+
* The minimum required version is 25.7.0, which is when ESM entry point
|
|
20
|
+
* support was added to Node.js SEA.
|
|
21
|
+
*/
|
|
22
|
+
nodeVersion: (string & {}) | "latest" | "latest-lts" | `${string}.${string}.${string}`;
|
|
23
|
+
}
|
|
24
|
+
interface ExeExtensionOptions$1 {
|
|
25
|
+
/**
|
|
26
|
+
* Cross-platform targets for building executables.
|
|
27
|
+
* Requires `@tsdown/exe` to be installed.
|
|
28
|
+
* When specified, builds an executable for each target platform/arch combination.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```ts
|
|
32
|
+
* targets: [
|
|
33
|
+
* { platform: 'linux', arch: 'x64', nodeVersion: '25.7.0' },
|
|
34
|
+
* { platform: 'darwin', arch: 'arm64', nodeVersion: '25.7.0' },
|
|
35
|
+
* { platform: 'win', arch: 'x64', nodeVersion: '25.7.0' },
|
|
36
|
+
* ]
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
targets?: ExeTarget[];
|
|
40
|
+
/**
|
|
41
|
+
* Customize the download URL for Node.js binaries, e.g. to use a mirror.
|
|
42
|
+
* Defaults to downloading from {@link https://nodejs.org/dist/}.
|
|
43
|
+
*/
|
|
44
|
+
getDownloadUrl?: (target: ExeTarget) => string | Promise<string>;
|
|
45
|
+
/**
|
|
46
|
+
* URL of the Node.js release index used to resolve the `latest` and
|
|
47
|
+
* `latest-lts` versions.
|
|
48
|
+
* @default 'https://nodejs.org/dist/index.json'
|
|
49
|
+
*/
|
|
50
|
+
nodeDistIndexUrl?: string;
|
|
51
|
+
}
|
|
52
|
+
//#endregion
|
|
53
|
+
//#region ../../node_modules/.pnpm/@tsdown+css@0.23.0_jiti@2.7.0_postcss-import@16.2.0_postcss@8.5.28__postcss-modules@9.0_e1d5b637aa455af0c2e0c072fcd26c64/node_modules/@tsdown/css/dist/index.d.mts
|
|
6
54
|
//#region src/options.d.ts
|
|
7
55
|
type LightningCSSOptions = Omit<TransformOptions<any>, "filename" | "code">;
|
|
8
56
|
type CSSModulesLocalsConvention = "camelCase" | "camelCaseOnly" | "dashes" | "dashesOnly" | ((originalClassName: string, generatedClassName: string, inputFile: string) => string);
|
|
@@ -1290,55 +1338,7 @@ interface TsgoOptions {
|
|
|
1290
1338
|
path?: string;
|
|
1291
1339
|
}
|
|
1292
1340
|
//#endregion
|
|
1293
|
-
//#region ../../node_modules/.pnpm
|
|
1294
|
-
//#region src/platform.d.ts
|
|
1295
|
-
type ExePlatform = "win" | "darwin" | "linux";
|
|
1296
|
-
type ExeArch = "x64" | "arm64";
|
|
1297
|
-
interface ExeTarget {
|
|
1298
|
-
platform: ExePlatform;
|
|
1299
|
-
arch: ExeArch;
|
|
1300
|
-
/**
|
|
1301
|
-
* Node.js version to use for the executable.
|
|
1302
|
-
*
|
|
1303
|
-
* Accepts a valid semver string (e.g., `"25.7.0"`), or the special values
|
|
1304
|
-
* `"latest"` / `"latest-lts"` which resolve the version automatically from
|
|
1305
|
-
* {@link https://nodejs.org/dist/index.json}.
|
|
1306
|
-
*
|
|
1307
|
-
* The minimum required version is 25.7.0, which is when ESM entry point
|
|
1308
|
-
* support was added to Node.js SEA.
|
|
1309
|
-
*/
|
|
1310
|
-
nodeVersion: (string & {}) | "latest" | "latest-lts" | `${string}.${string}.${string}`;
|
|
1311
|
-
}
|
|
1312
|
-
interface ExeExtensionOptions$1 {
|
|
1313
|
-
/**
|
|
1314
|
-
* Cross-platform targets for building executables.
|
|
1315
|
-
* Requires `@tsdown/exe` to be installed.
|
|
1316
|
-
* When specified, builds an executable for each target platform/arch combination.
|
|
1317
|
-
*
|
|
1318
|
-
* @example
|
|
1319
|
-
* ```ts
|
|
1320
|
-
* targets: [
|
|
1321
|
-
* { platform: 'linux', arch: 'x64', nodeVersion: '25.7.0' },
|
|
1322
|
-
* { platform: 'darwin', arch: 'arm64', nodeVersion: '25.7.0' },
|
|
1323
|
-
* { platform: 'win', arch: 'x64', nodeVersion: '25.7.0' },
|
|
1324
|
-
* ]
|
|
1325
|
-
* ```
|
|
1326
|
-
*/
|
|
1327
|
-
targets?: ExeTarget[];
|
|
1328
|
-
/**
|
|
1329
|
-
* Customize the download URL for Node.js binaries, e.g. to use a mirror.
|
|
1330
|
-
* Defaults to downloading from {@link https://nodejs.org/dist/}.
|
|
1331
|
-
*/
|
|
1332
|
-
getDownloadUrl?: (target: ExeTarget) => string | Promise<string>;
|
|
1333
|
-
/**
|
|
1334
|
-
* URL of the Node.js release index used to resolve the `latest` and
|
|
1335
|
-
* `latest-lts` versions.
|
|
1336
|
-
* @default 'https://nodejs.org/dist/index.json'
|
|
1337
|
-
*/
|
|
1338
|
-
nodeDistIndexUrl?: string;
|
|
1339
|
-
}
|
|
1340
|
-
//#endregion
|
|
1341
|
-
//#region ../../node_modules/.pnpm/tsdown@0.23.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.23.0_@tsdown+exe@0.23.0_@type_b65333c86244131b40077d6429604210/node_modules/tsdown/dist/types-CYHmmaKd.d.mts
|
|
1341
|
+
//#region ../../node_modules/.pnpm/tsdown@0.23.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.23.0_@tsdown+exe@0.23.0_@type_298964156353ef75a02894ab80b3a2e6/node_modules/tsdown/dist/types-CYHmmaKd.d.mts
|
|
1342
1342
|
//#region src/utils/types.d.ts
|
|
1343
1343
|
type Overwrite<T, U> = Omit<T, keyof U> & U;
|
|
1344
1344
|
type Awaitable<T> = T | Promise<T>;
|
|
@@ -2780,7 +2780,7 @@ type ResolvedConfig = Overwrite<MarkPartial<Omit<UserConfig, "workspace" | "from
|
|
|
2780
2780
|
exe: false | ExeOptions;
|
|
2781
2781
|
}>;
|
|
2782
2782
|
//#endregion
|
|
2783
|
-
//#region ../../node_modules/.pnpm/tsdown@0.23.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.23.0_@tsdown+exe@0.23.0_@
|
|
2783
|
+
//#region ../../node_modules/.pnpm/tsdown@0.23.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.23.0_@tsdown+exe@0.23.0_@type_298964156353ef75a02894ab80b3a2e6/node_modules/tsdown/dist/config-DR1wR8P-.d.mts
|
|
2784
2784
|
//#region src/config/options.d.ts
|
|
2785
2785
|
/**
|
|
2786
2786
|
* Resolve user config into resolved configs
|
|
@@ -2801,7 +2801,7 @@ declare function defineConfig(options: UserConfig[]): UserConfig[];
|
|
|
2801
2801
|
declare function defineConfig(options: UserConfigFn): UserConfigFn;
|
|
2802
2802
|
declare function defineConfig(options: UserConfigExport): UserConfigExport;
|
|
2803
2803
|
//#endregion
|
|
2804
|
-
//#region ../../node_modules/.pnpm/tsdown@0.23.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.23.0_@tsdown+exe@0.23.0_@
|
|
2804
|
+
//#region ../../node_modules/.pnpm/tsdown@0.23.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.23.0_@tsdown+exe@0.23.0_@type_298964156353ef75a02894ab80b3a2e6/node_modules/tsdown/dist/index.d.mts
|
|
2805
2805
|
//#region src/build.d.ts
|
|
2806
2806
|
/**
|
|
2807
2807
|
* Build with tsdown.
|
package/dist/tsdown/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { c as globalLogger, n as version$1, t as enableDebug } from "./debug-CpC4hV25-
|
|
2
|
-
import { a as resolveUserConfig, i as mergeConfig, n as buildWithConfigs, t as build$1 } from "./build-JVmLFaZt-
|
|
1
|
+
import { c as globalLogger, n as version$1, t as enableDebug } from "./debug-CpC4hV25-BeCITV83.js";
|
|
2
|
+
import { a as resolveUserConfig, i as mergeConfig, n as buildWithConfigs, t as build$1 } from "./build-JVmLFaZt-BN9yuB6k.js";
|
|
3
3
|
import * as Rolldown from "@voidzero-dev/vite-plus-core/rolldown";
|
|
4
|
-
//#region ../../node_modules/.pnpm/tsdown@0.23.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.23.0_@tsdown+exe@0.23.0_@
|
|
4
|
+
//#region ../../node_modules/.pnpm/tsdown@0.23.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.23.0_@tsdown+exe@0.23.0_@type_298964156353ef75a02894ab80b3a2e6/node_modules/tsdown/dist/config.mjs
|
|
5
5
|
function defineConfig(options) {
|
|
6
6
|
return options;
|
|
7
7
|
}
|
|
8
8
|
//#endregion
|
|
9
|
-
//#region ../../node_modules/.pnpm/tsdown@0.23.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.23.0_@tsdown+exe@0.23.0_@
|
|
9
|
+
//#region ../../node_modules/.pnpm/tsdown@0.23.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.23.0_@tsdown+exe@0.23.0_@type_298964156353ef75a02894ab80b3a2e6/node_modules/tsdown/dist/index.mjs
|
|
10
10
|
const version = version$1;
|
|
11
11
|
//#endregion
|
|
12
12
|
export { Rolldown, build$1 as build, buildWithConfigs, defineConfig, enableDebug, globalLogger, mergeConfig, resolveUserConfig, version };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
import process$1, { cwd } from "node:process";
|
|
3
|
+
import { formatWithOptions, inspect, styleText } from "node:util";
|
|
3
4
|
import readline from "node:readline";
|
|
4
5
|
import { isatty } from "node:tty";
|
|
5
6
|
import { spawn } from "node:child_process";
|
|
@@ -8,6 +9,90 @@ import { fileURLToPath } from "node:url";
|
|
|
8
9
|
import { pipeline } from "node:stream/promises";
|
|
9
10
|
import { PassThrough } from "node:stream";
|
|
10
11
|
import { closeSync, openSync, readSync, statSync } from "node:fs";
|
|
12
|
+
const picomatch = createRequire(import.meta.url)("./npm_entry_picomatch.cjs");
|
|
13
|
+
function toArray(val, defaultValue) {
|
|
14
|
+
if (Array.isArray(val)) return val;
|
|
15
|
+
else if (val == null) {
|
|
16
|
+
if (defaultValue) return [defaultValue];
|
|
17
|
+
return [];
|
|
18
|
+
} else return [val];
|
|
19
|
+
}
|
|
20
|
+
function resolveComma(arr) {
|
|
21
|
+
return arr.flatMap((format) => format.split(","));
|
|
22
|
+
}
|
|
23
|
+
function resolveRegex(str) {
|
|
24
|
+
if (typeof str === "string" && str.length > 2 && str[0] === "/" && str.at(-1) === "/") return new RegExp(str.slice(1, -1));
|
|
25
|
+
return str;
|
|
26
|
+
}
|
|
27
|
+
function slash(string) {
|
|
28
|
+
return string.replaceAll("\\", "/");
|
|
29
|
+
}
|
|
30
|
+
const noop = (v) => v;
|
|
31
|
+
function matchPattern(id, patterns) {
|
|
32
|
+
return patterns.some((pattern) => {
|
|
33
|
+
if (pattern instanceof RegExp) {
|
|
34
|
+
pattern.lastIndex = 0;
|
|
35
|
+
return pattern.test(id);
|
|
36
|
+
}
|
|
37
|
+
return id === pattern || picomatch(pattern)(id);
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
function pkgExists(moduleName) {
|
|
41
|
+
try {
|
|
42
|
+
import.meta.resolve(moduleName);
|
|
43
|
+
return true;
|
|
44
|
+
} catch {}
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
async function importWithError(moduleName) {
|
|
48
|
+
try {
|
|
49
|
+
return await import(moduleName);
|
|
50
|
+
} catch (error) {
|
|
51
|
+
throw new Error(`Failed to import module "${moduleName}". Please ensure it is installed.`, { cause: error });
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
function createConcurrencyExecutor(concurrency) {
|
|
55
|
+
if (concurrency == null) return (task) => task();
|
|
56
|
+
if (!Number.isInteger(concurrency) || concurrency < 1) throw new TypeError("`--concurrency` must be a positive integer");
|
|
57
|
+
const queue = [];
|
|
58
|
+
let active = 0;
|
|
59
|
+
return async (task) => {
|
|
60
|
+
if (active >= concurrency) await new Promise((resolve) => queue.push(resolve));
|
|
61
|
+
else active++;
|
|
62
|
+
try {
|
|
63
|
+
return await task();
|
|
64
|
+
} finally {
|
|
65
|
+
const next = queue.shift();
|
|
66
|
+
if (next) next();
|
|
67
|
+
else active--;
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
function debounce(fn, delay) {
|
|
72
|
+
let timer;
|
|
73
|
+
const debounced = (...args) => {
|
|
74
|
+
clearTimeout(timer);
|
|
75
|
+
timer = setTimeout(() => fn(...args), delay);
|
|
76
|
+
};
|
|
77
|
+
debounced.cancel = () => clearTimeout(timer);
|
|
78
|
+
return debounced;
|
|
79
|
+
}
|
|
80
|
+
let supportRGB = !!process$1.stdout.hasColors?.(2 ** 24);
|
|
81
|
+
if (supportRGB) try {
|
|
82
|
+
styleText("#000", "");
|
|
83
|
+
} catch {
|
|
84
|
+
supportRGB = false;
|
|
85
|
+
}
|
|
86
|
+
const factory = (...formats) => new Proxy(styleText.bind(void 0, formats), { get: (_, format) => {
|
|
87
|
+
if (format[0] === "#") {
|
|
88
|
+
const [color, fallback] = format.split(",", 2);
|
|
89
|
+
if (!supportRGB) return fallback ? factory(...formats, fallback) : factory(...formats);
|
|
90
|
+
return factory(...formats, color);
|
|
91
|
+
}
|
|
92
|
+
return factory(...formats, format);
|
|
93
|
+
} });
|
|
94
|
+
const styleText$1 = factory();
|
|
95
|
+
//#endregion
|
|
11
96
|
//#region ../../node_modules/.pnpm/obug@2.1.4/node_modules/obug/dist/core.js
|
|
12
97
|
/**
|
|
13
98
|
* Coerce `value`.
|
|
@@ -652,4 +737,4 @@ const x = (command, args, userOptions) => {
|
|
|
652
737
|
};
|
|
653
738
|
const exec = x;
|
|
654
739
|
//#endregion
|
|
655
|
-
export { namespaces as a, enable as i, x as n, createDebug as r, exec as t };
|
|
740
|
+
export { namespaces as a, importWithError as c, pkgExists as d, resolveComma as f, toArray as g, styleText$1 as h, enable as i, matchPattern as l, slash as m, x as n, createConcurrencyExecutor as o, resolveRegex as p, createDebug as r, debounce as s, exec as t, noop as u };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as createDebug } from "./main-
|
|
2
|
-
import { t as requireTSApi } from "./dist-
|
|
1
|
+
import { r as createDebug } from "./main-bgV9NlwM.js";
|
|
2
|
+
import { t as requireTSApi } from "./dist-ByW_jJfv.js";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
//#region ../../node_modules/.pnpm/rolldown-plugin-dts@0.28.5_@typescript+native-preview@7.0.0-dev.20260605.1_oxc-resolver_395c84c3f0e463da1bb9023138bdcb2e/node_modules/rolldown-plugin-dts/dist/resolver-DE0_sy8o.mjs
|
|
5
5
|
const debug = createDebug("rolldown-plugin-dts:tsc-resolver");
|
package/dist/tsdown/run.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
import { n as
|
|
2
|
+
import { h as styleText$1, n as x } from "./main-bgV9NlwM.js";
|
|
3
|
+
import { c as globalLogger, n as version, t as enableDebug } from "./debug-CpC4hV25-BeCITV83.js";
|
|
4
4
|
import module from "node:module";
|
|
5
5
|
import process$1 from "node:process";
|
|
6
6
|
import { VERSION } from "@voidzero-dev/vite-plus-core/rolldown";
|
|
@@ -622,7 +622,7 @@ var CAC = class extends EventTarget {
|
|
|
622
622
|
*/
|
|
623
623
|
const cac = (name = "") => new CAC(name);
|
|
624
624
|
//#endregion
|
|
625
|
-
//#region ../../node_modules/.pnpm/tsdown@0.23.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.23.0_@tsdown+exe@0.23.0_@
|
|
625
|
+
//#region ../../node_modules/.pnpm/tsdown@0.23.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.23.0_@tsdown+exe@0.23.0_@type_298964156353ef75a02894ab80b3a2e6/node_modules/tsdown/dist/run.mjs
|
|
626
626
|
const cli = cac("tsdown");
|
|
627
627
|
cli.help().version(version);
|
|
628
628
|
cli.command("[...files]", "Bundle files", {
|
|
@@ -631,7 +631,7 @@ cli.command("[...files]", "Bundle files", {
|
|
|
631
631
|
}).option("-c, --config <filename>", "Use a custom config file").option("--config-loader <loader>", "Config loader to use: auto, native, tsx, unrun", { default: "auto" }).option("--no-config", "Disable config file").option("-f, --format <format>", "Bundle format: esm, cjs, iife, umd", { default: "esm" }).option("--clean", "Clean output directory, --no-clean to disable").option("--deps.never-bundle <module>", "Mark dependencies as external").option("--minify", "Minify output").option("--devtools", "Enable devtools integration").option("--debug [feat]", "Show debug logs").option("--target <target>", "Bundle target, e.g \"es2015\", \"esnext\"").option("-l, --logLevel <level>", "Set log level: info, warn, error, silent").option("--fail-on-warn", "Fail on warnings", { default: true }).option("--no-write", "Disable writing files to disk, incompatible with watch mode").option("-d, --out-dir <dir>", "Output directory", { default: "dist" }).option("--treeshake", "Tree-shake bundle", { default: true }).option("--sourcemap", "Generate source map", { default: false }).option("--shims", "Enable cjs and esm shims ", { default: false }).option("--platform <platform>", "Target platform", { default: "node" }).option("--dts", "Generate dts files").option("--publint", "Enable publint", { default: false }).option("--attw", "Enable Are the types wrong integration", { default: false }).option("--unused", "Enable unused dependencies check", { default: false }).option("-w, --watch [path]", "Watch mode").option("--ignore-watch <path>", "Ignore custom paths in watch mode").option("--from-vite [vitest]", "Reuse config from Vite or Vitest").option("--report", "Size report", { default: true }).option("--env.* <value>", "Define compile-time env variables").option("--env-file <file>", "Load environment variables from a file, when used together with --env, variables in --env take precedence").option("--env-prefix <prefix>", "Prefix for env variables to inject into the bundle", { default: "TSDOWN_" }).option("--on-success <command>", "Command to run on success").option("--copy <dir>", "Copy files to output dir").option("--tsconfig <tsconfig>", "Set tsconfig path").option("--unbundle", "Unbundle mode").option("--root <dir>", "Root directory of input files").option("--exe", "Bundle as executable").option("-W, --workspace [dir]", "Enable workspace mode").option("--concurrency <count>", "Maximum number of Rolldown builds to run in parallel").option("-F, --filter <pattern>", "Filter configs (cwd or name), e.g. /pkg-name$/ or pkg-name").option("--exports", "Generate package exports for package.json").action(async (input, flags) => {
|
|
632
632
|
globalLogger.level = flags.logLevel || "info";
|
|
633
633
|
globalLogger.info(`${styleText$1.blue(`tsdown v${version}`)} powered by ${styleText$1["#ff7e17,yellow"](`rolldown v${VERSION}`)}`);
|
|
634
|
-
const { build } = await import("./build-JVmLFaZt-
|
|
634
|
+
const { build } = await import("./build-JVmLFaZt-BN9yuB6k.js").then((n) => n.r).then((n) => n.r);
|
|
635
635
|
if (input.length > 0) flags.entry = input;
|
|
636
636
|
await build(flags);
|
|
637
637
|
});
|
|
@@ -345,7 +345,7 @@ var require_src$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
345
345
|
};
|
|
346
346
|
}));
|
|
347
347
|
//#endregion
|
|
348
|
-
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.
|
|
348
|
+
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.28_tsx@4.23.13_yaml@2.9.0/node_modules/postcss-load-config/src/req.js
|
|
349
349
|
var require_req = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
350
350
|
const { createRequire } = __require("node:module");
|
|
351
351
|
const { pathToFileURL } = __require("node:url");
|
|
@@ -387,7 +387,7 @@ var require_req = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
387
387
|
module.exports = req;
|
|
388
388
|
}));
|
|
389
389
|
//#endregion
|
|
390
|
-
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.
|
|
390
|
+
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.28_tsx@4.23.13_yaml@2.9.0/node_modules/postcss-load-config/src/options.js
|
|
391
391
|
var require_options = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
392
392
|
const req = require_req();
|
|
393
393
|
/**
|
|
@@ -421,7 +421,7 @@ var require_options = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
421
421
|
module.exports = options;
|
|
422
422
|
}));
|
|
423
423
|
//#endregion
|
|
424
|
-
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.
|
|
424
|
+
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.28_tsx@4.23.13_yaml@2.9.0/node_modules/postcss-load-config/src/plugins.js
|
|
425
425
|
var require_plugins = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
426
426
|
const req = require_req();
|
|
427
427
|
/**
|
|
@@ -475,7 +475,7 @@ var require_plugins = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
475
475
|
module.exports = plugins;
|
|
476
476
|
}));
|
|
477
477
|
//#endregion
|
|
478
|
-
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.
|
|
478
|
+
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.28_tsx@4.23.13_yaml@2.9.0/node_modules/postcss-load-config/src/index.js
|
|
479
479
|
var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
480
480
|
const { resolve } = __require("node:path");
|
|
481
481
|
const config = require_src$1();
|