@voidzero-dev/vite-plus-core 0.1.19-alpha.3 → 0.1.20-alpha.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 +1 -1
- package/dist/rolldown/experimental-index.mjs +1 -1
- package/dist/rolldown/parse-ast-index.mjs +1 -1
- package/dist/rolldown/shared/{parse-BC6EwEdS.mjs → parse-C4SGmMNT.mjs} +1 -1
- package/dist/rolldown/utils-index.d.mts +1 -1
- package/dist/rolldown/utils-index.mjs +4 -4
- package/dist/tsdown/{build-OX8uszs6-CTnPrKHF.js → build-OX8uszs6-4hNTeOrB.js} +44 -44
- package/dist/tsdown/{dist-Z3YjneEr.js → dist-CrrE8ZBn.js} +12 -12
- package/dist/tsdown/{dist-DL4hnQY2.js → dist-DSi2MWPQ.js} +1 -1
- package/dist/tsdown/{dist-CbhZqEsp.js → dist-D_AJtdxQ.js} +3 -3
- package/dist/tsdown/index-types.d.ts +1 -1
- package/dist/tsdown/index.js +1 -1
- package/dist/tsdown/run.js +1 -1
- package/dist/vite/client/client.mjs +1 -1
- package/dist/vite/node/chunks/build.js +19 -19
- package/dist/vite/node/chunks/dist.js +146 -91
- package/dist/vite/node/chunks/logger.js +1 -1
- package/dist/vite/node/chunks/node.js +58 -53
- package/dist/vite/node/chunks/postcss-import.js +10 -10
- package/dist/vite/node/cli.js +1 -1
- package/dist/vite/node/module-runner.js +1 -1
- package/package.json +9 -9
package/LICENSE
CHANGED
|
@@ -5017,7 +5017,7 @@ Repository: https://github.com/vitejs/vite
|
|
|
5017
5017
|
>
|
|
5018
5018
|
> ## parse5
|
|
5019
5019
|
> License: MIT
|
|
5020
|
-
> By: Ivan Nikulin,
|
|
5020
|
+
> By: Ivan Nikulin, James Garbutt, Felix Boehm, Titus
|
|
5021
5021
|
> Repository: https://github.com/inikulin/parse5
|
|
5022
5022
|
>
|
|
5023
5023
|
> > Copyright (c) 2013-2019 Ivan Nikulin (ifaaan@gmail.com, https://github.com/inikulin)
|
|
@@ -3,7 +3,7 @@ import { n as BuiltinPlugin, t as normalizedStringOrRegex } from "./shared/norma
|
|
|
3
3
|
import { o as transformToRollupOutput } from "./shared/bindingify-input-options-CQLSwbb0.mjs";
|
|
4
4
|
import { c as validateOption, n as createBundlerOptions, t as RolldownBuild, u as PluginDriver } from "./shared/rolldown-build-B-H35squ.mjs";
|
|
5
5
|
import { i as unwrapBindingResult, r as normalizeBindingResult } from "./shared/error-DAA7ncC5.mjs";
|
|
6
|
-
import { n as parseSync$1, t as parse$1 } from "./shared/parse-
|
|
6
|
+
import { n as parseSync$1, t as parse$1 } from "./shared/parse-C4SGmMNT.mjs";
|
|
7
7
|
import { a as viteDynamicImportVarsPlugin, c as viteLoadFallbackPlugin, d as viteReporterPlugin, f as viteResolvePlugin, i as viteBuildImportAnalysisPlugin, l as viteModulePreloadPolyfillPlugin, m as viteWebWorkerPostPlugin, n as isolatedDeclarationPlugin, o as viteImportGlobPlugin, p as viteWasmFallbackPlugin, r as oxcRuntimePlugin, s as viteJsonPlugin, u as viteReactRefreshWrapperPlugin } from "./shared/constructors-Dzji6NUq.mjs";
|
|
8
8
|
import { a as minify$1, i as transformSync$1, n as resolveTsconfig, o as minifySync$1, r as transform$1, t as TsconfigCache$1 } from "./shared/resolve-tsconfig-BVTabsge.mjs";
|
|
9
9
|
import { pathToFileURL } from "node:url";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { l as locate, n as error, s as logParseError, t as augmentCodeLocation, u as getCodeFrame } from "./shared/logs-D80CXhvg.mjs";
|
|
2
|
-
import { n as parseSync, t as parse } from "./shared/parse-
|
|
2
|
+
import { n as parseSync, t as parse } from "./shared/parse-C4SGmMNT.mjs";
|
|
3
3
|
//#region src/parse-ast-index.ts
|
|
4
4
|
function wrap(result, filename, sourceText) {
|
|
5
5
|
if (result.errors.length > 0) return normalizeParseError(filename, sourceText, result.errors);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as __toESM, t as require_binding } from "./binding-DI_PGVIh.mjs";
|
|
2
|
-
//#region ../../../node_modules/.pnpm/oxc-parser@0.
|
|
2
|
+
//#region ../../../node_modules/.pnpm/oxc-parser@0.127.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;
|
|
@@ -3,7 +3,7 @@ import { a as MinifyOptions, c as minifySync, d as parse, f as parseSync, i as t
|
|
|
3
3
|
import * as ESTree from "@oxc-project/types";
|
|
4
4
|
import { Program } from "@oxc-project/types";
|
|
5
5
|
|
|
6
|
-
//#region ../../../node_modules/.pnpm/oxc-parser@0.
|
|
6
|
+
//#region ../../../node_modules/.pnpm/oxc-parser@0.127.0/node_modules/oxc-parser/src-js/generated/visit/visitor.d.ts
|
|
7
7
|
interface VisitorObject$1 {
|
|
8
8
|
DebuggerStatement?: (node: ESTree.DebuggerStatement) => void;
|
|
9
9
|
"DebuggerStatement:exit"?: (node: ESTree.DebuggerStatement) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as parseSync, t as parse } from "./shared/parse-
|
|
1
|
+
import { n as parseSync, t as parse } from "./shared/parse-C4SGmMNT.mjs";
|
|
2
2
|
import { a as minify, i as transformSync, o as minifySync, r as transform, t as TsconfigCache } from "./shared/resolve-tsconfig-BVTabsge.mjs";
|
|
3
|
-
//#region ../../../node_modules/.pnpm/oxc-parser@0.
|
|
3
|
+
//#region ../../../node_modules/.pnpm/oxc-parser@0.127.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)) {
|
|
@@ -2010,7 +2010,7 @@ function walkTSUnionType(node, visitors) {
|
|
|
2010
2010
|
exit !== null && exit(node);
|
|
2011
2011
|
}
|
|
2012
2012
|
//#endregion
|
|
2013
|
-
//#region ../../../node_modules/.pnpm/oxc-parser@0.
|
|
2013
|
+
//#region ../../../node_modules/.pnpm/oxc-parser@0.127.0/node_modules/oxc-parser/src-js/generated/visit/type_ids.js
|
|
2014
2014
|
/** Mapping from node type name to node type ID */
|
|
2015
2015
|
const NODE_TYPE_IDS_MAP = new Map([
|
|
2016
2016
|
["DebuggerStatement", 0],
|
|
@@ -2180,7 +2180,7 @@ const NODE_TYPE_IDS_MAP = new Map([
|
|
|
2180
2180
|
["TSUnionType", 164]
|
|
2181
2181
|
]);
|
|
2182
2182
|
//#endregion
|
|
2183
|
-
//#region ../../../node_modules/.pnpm/oxc-parser@0.
|
|
2183
|
+
//#region ../../../node_modules/.pnpm/oxc-parser@0.127.0/node_modules/oxc-parser/src-js/visit/visitor.js
|
|
2184
2184
|
let compiledVisitor;
|
|
2185
2185
|
function createCompiledVisitor() {
|
|
2186
2186
|
compiledVisitor = [];
|
|
@@ -2,7 +2,7 @@ import { n as __exportAll$1, r as __toESM, t as __commonJSMin } from "./chunk-N9
|
|
|
2
2
|
import { C as promiseWithResolvers, D as toArray, E as slash, S as pkgExists, T as resolveRegex, _ as yellow, a as createLogger, b as matchPattern, c as globalLogger, d as bold, f as dim, g as underline, h as red, i as LogLevels, l as prettyFormat, n as W, o as generateColor, p as green, r as version, s as getNameLabel, t as U, u as blue, v as debounce, w as resolveComma, x as noop, y as importWithError } from "./main-BsfiKQP8.js";
|
|
3
3
|
import { t as createDebug } from "./node-B3Gdtau1.js";
|
|
4
4
|
import { d as filename_js_to_dts, i as RE_JS, n as RE_DTS, o as RE_NODE_MODULES$1, t as RE_CSS } from "./filename-DQnUJlio-DHPB7cQg.js";
|
|
5
|
-
import "./dist-
|
|
5
|
+
import "./dist-D_AJtdxQ.js";
|
|
6
6
|
import module$1, { builtinModules, createRequire, isBuiltin } from "node:module";
|
|
7
7
|
import process$1, { env } from "node:process";
|
|
8
8
|
import readline from "node:readline";
|
|
@@ -11,7 +11,7 @@ import path, { dirname, isAbsolute, join, parse, resolve } from "node:path";
|
|
|
11
11
|
import { VERSION, build, watch } from "@voidzero-dev/vite-plus-core/rolldown";
|
|
12
12
|
import { access, chmod, cp, mkdir, mkdtemp, readFile, readdir, rm, stat, writeFile } from "node:fs/promises";
|
|
13
13
|
import { and, id, importerId, include } from "@voidzero-dev/vite-plus-core/rolldown/filter";
|
|
14
|
-
import
|
|
14
|
+
import re, { existsSync, readFileSync, writeFileSync } from "node:fs";
|
|
15
15
|
import * as nativeFs from "fs";
|
|
16
16
|
import { readdir as readdir$1, readdirSync, realpath, realpathSync, stat as stat$1, statSync } from "fs";
|
|
17
17
|
import { basename, dirname as dirname$1, isAbsolute as isAbsolute$1, normalize as normalize$1, posix, relative, resolve as resolve$1, sep } from "path";
|
|
@@ -3202,87 +3202,87 @@ quansync$1({
|
|
|
3202
3202
|
*/
|
|
3203
3203
|
const quansync = quansync$1;
|
|
3204
3204
|
quansync$1({
|
|
3205
|
-
sync:
|
|
3206
|
-
async:
|
|
3205
|
+
sync: re.readFileSync,
|
|
3206
|
+
async: re.promises.readFile
|
|
3207
3207
|
});
|
|
3208
3208
|
quansync$1({
|
|
3209
|
-
sync:
|
|
3210
|
-
async:
|
|
3209
|
+
sync: re.writeFileSync,
|
|
3210
|
+
async: re.promises.writeFile
|
|
3211
3211
|
});
|
|
3212
3212
|
quansync$1({
|
|
3213
|
-
sync:
|
|
3214
|
-
async:
|
|
3213
|
+
sync: re.unlinkSync,
|
|
3214
|
+
async: re.promises.unlink
|
|
3215
3215
|
});
|
|
3216
3216
|
quansync$1({
|
|
3217
|
-
sync:
|
|
3218
|
-
async:
|
|
3217
|
+
sync: re.accessSync,
|
|
3218
|
+
async: re.promises.access
|
|
3219
3219
|
});
|
|
3220
3220
|
/**
|
|
3221
3221
|
* @link https://nodejs.org/api/fs.html#fspromisesstatpath-options
|
|
3222
3222
|
*/
|
|
3223
3223
|
const stat$2 = quansync$1({
|
|
3224
|
-
sync:
|
|
3225
|
-
async:
|
|
3224
|
+
sync: re.statSync,
|
|
3225
|
+
async: re.promises.stat
|
|
3226
3226
|
});
|
|
3227
3227
|
const lstat = quansync$1({
|
|
3228
|
-
sync:
|
|
3229
|
-
async:
|
|
3228
|
+
sync: re.lstatSync,
|
|
3229
|
+
async: re.promises.lstat
|
|
3230
3230
|
});
|
|
3231
3231
|
quansync$1({
|
|
3232
|
-
sync:
|
|
3233
|
-
async:
|
|
3232
|
+
sync: re.copyFileSync,
|
|
3233
|
+
async: re.promises.copyFile
|
|
3234
3234
|
});
|
|
3235
3235
|
quansync$1({
|
|
3236
|
-
sync:
|
|
3237
|
-
async:
|
|
3236
|
+
sync: re.rmSync,
|
|
3237
|
+
async: re.promises.rm
|
|
3238
3238
|
});
|
|
3239
3239
|
quansync$1({
|
|
3240
|
-
sync:
|
|
3241
|
-
async:
|
|
3240
|
+
sync: re.mkdirSync,
|
|
3241
|
+
async: re.promises.mkdir
|
|
3242
3242
|
});
|
|
3243
3243
|
quansync$1({
|
|
3244
|
-
sync:
|
|
3245
|
-
async:
|
|
3244
|
+
sync: re.renameSync,
|
|
3245
|
+
async: re.promises.rename
|
|
3246
3246
|
});
|
|
3247
3247
|
quansync$1({
|
|
3248
|
-
sync:
|
|
3249
|
-
async:
|
|
3248
|
+
sync: re.readdirSync,
|
|
3249
|
+
async: re.promises.readdir
|
|
3250
3250
|
});
|
|
3251
3251
|
quansync$1({
|
|
3252
|
-
sync:
|
|
3253
|
-
async:
|
|
3252
|
+
sync: re.realpathSync,
|
|
3253
|
+
async: re.promises.realpath
|
|
3254
3254
|
});
|
|
3255
3255
|
quansync$1({
|
|
3256
|
-
sync:
|
|
3257
|
-
async:
|
|
3256
|
+
sync: re.readlinkSync,
|
|
3257
|
+
async: re.promises.readlink
|
|
3258
3258
|
});
|
|
3259
3259
|
quansync$1({
|
|
3260
|
-
sync:
|
|
3261
|
-
async:
|
|
3260
|
+
sync: re.symlinkSync,
|
|
3261
|
+
async: re.promises.symlink
|
|
3262
3262
|
});
|
|
3263
3263
|
quansync$1({
|
|
3264
|
-
sync:
|
|
3265
|
-
async:
|
|
3264
|
+
sync: re.chownSync,
|
|
3265
|
+
async: re.promises.chown
|
|
3266
3266
|
});
|
|
3267
3267
|
quansync$1({
|
|
3268
|
-
sync:
|
|
3269
|
-
async:
|
|
3268
|
+
sync: re.lchownSync,
|
|
3269
|
+
async: re.promises.lchown
|
|
3270
3270
|
});
|
|
3271
3271
|
quansync$1({
|
|
3272
|
-
sync:
|
|
3273
|
-
async:
|
|
3272
|
+
sync: re.chmodSync,
|
|
3273
|
+
async: re.promises.chmod
|
|
3274
3274
|
});
|
|
3275
3275
|
quansync$1({
|
|
3276
|
-
sync:
|
|
3277
|
-
async:
|
|
3276
|
+
sync: re.utimesSync,
|
|
3277
|
+
async: re.promises.utimes
|
|
3278
3278
|
});
|
|
3279
3279
|
quansync$1({
|
|
3280
|
-
sync:
|
|
3281
|
-
async:
|
|
3280
|
+
sync: re.lutimesSync,
|
|
3281
|
+
async: re.promises.lutimes
|
|
3282
3282
|
});
|
|
3283
3283
|
quansync$1({
|
|
3284
|
-
sync:
|
|
3285
|
-
async:
|
|
3284
|
+
sync: re.mkdtempSync,
|
|
3285
|
+
async: re.promises.mkdtemp
|
|
3286
3286
|
});
|
|
3287
3287
|
//#endregion
|
|
3288
3288
|
//#region ../../node_modules/.pnpm/unconfig-core@7.5.0/node_modules/unconfig-core/dist/index.mjs
|
|
@@ -4007,7 +4007,7 @@ async function nativeImport(id) {
|
|
|
4007
4007
|
return [mod.default || mod, deps];
|
|
4008
4008
|
}
|
|
4009
4009
|
async function unrunImport(id) {
|
|
4010
|
-
const { unrun } = await import("./dist-
|
|
4010
|
+
const { unrun } = await import("./dist-CrrE8ZBn.js");
|
|
4011
4011
|
const { module, dependencies } = await unrun({ path: pathToFileURL(id).href });
|
|
4012
4012
|
return [module, new Set(dependencies)];
|
|
4013
4013
|
}
|
|
@@ -5044,7 +5044,7 @@ async function resolveInputOptions(config, format, configDeps, bundle, cjsDts, i
|
|
|
5044
5044
|
if (nodeProtocol) plugins.push(NodeProtocolPlugin(nodeProtocol));
|
|
5045
5045
|
if (config.pkg || config.deps.skipNodeModulesBundle) plugins.push(DepsPlugin(config, bundle));
|
|
5046
5046
|
if (dts) {
|
|
5047
|
-
const { dts: dtsPlugin } = await import("./dist-
|
|
5047
|
+
const { dts: dtsPlugin } = await import("./dist-DSi2MWPQ.js");
|
|
5048
5048
|
const { cjsReexport: _, ...dtsPluginOptions } = dts;
|
|
5049
5049
|
const options = {
|
|
5050
5050
|
tsconfig,
|
|
@@ -3,7 +3,7 @@ import process from "node:process";
|
|
|
3
3
|
import "node:child_process";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { rolldown } from "@voidzero-dev/vite-plus-core/rolldown";
|
|
6
|
-
import
|
|
6
|
+
import re, { existsSync } from "node:fs";
|
|
7
7
|
import { tmpdir } from "node:os";
|
|
8
8
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
9
9
|
import { Buffer } from "node:buffer";
|
|
@@ -54,7 +54,7 @@ function resolveOptions(options = {}) {
|
|
|
54
54
|
inputOptions: options.inputOptions,
|
|
55
55
|
outputOptions: options.outputOptions
|
|
56
56
|
};
|
|
57
|
-
if (!
|
|
57
|
+
if (!re.existsSync(resolvedOptions.path)) throw new Error(`[unrun] File not found: ${resolvedOptions.path}`);
|
|
58
58
|
if (!new Set([
|
|
59
59
|
"none",
|
|
60
60
|
"jiti",
|
|
@@ -268,7 +268,7 @@ function createJsonLoader() {
|
|
|
268
268
|
let isRequire = false;
|
|
269
269
|
try {
|
|
270
270
|
if (importer) {
|
|
271
|
-
const src =
|
|
271
|
+
const src = re.readFileSync(importer, "utf8");
|
|
272
272
|
const escaped = source.replaceAll(/[.*+?^${}()|[\]\\]/g, (m) => `\\${m}`);
|
|
273
273
|
const pattern = String.raw`\brequire\s*\(\s*['"]${escaped}['"]\s*\)`;
|
|
274
274
|
isRequire = new RegExp(pattern).test(src);
|
|
@@ -281,7 +281,7 @@ function createJsonLoader() {
|
|
|
281
281
|
handler(id) {
|
|
282
282
|
try {
|
|
283
283
|
const realId = id.replace(/\?unrun-json\.(?:mjs|cjs)$/, "");
|
|
284
|
-
const src =
|
|
284
|
+
const src = re.readFileSync(realId, "utf8");
|
|
285
285
|
const data = JSON.parse(src);
|
|
286
286
|
const jsonLiteral = JSON.stringify(data);
|
|
287
287
|
if (id.endsWith("?unrun-json.cjs")) return { code: `const __data = ${jsonLiteral}\ntry { Object.defineProperty(__data, 'default', { value: __data, enumerable: false, configurable: true }) } catch {}\nmodule.exports = __data\n` };
|
|
@@ -375,7 +375,7 @@ function createRequireResolveFix(options) {
|
|
|
375
375
|
".cjs"
|
|
376
376
|
]) {
|
|
377
377
|
const testPath = path.resolve(baseDir, id + ext);
|
|
378
|
-
if (
|
|
378
|
+
if (re.existsSync(testPath)) return JSON.stringify(testPath);
|
|
379
379
|
}
|
|
380
380
|
const resolvedPath = path.resolve(baseDir, id);
|
|
381
381
|
return JSON.stringify(resolvedPath);
|
|
@@ -416,7 +416,7 @@ function createSourceContextShimsPlugin() {
|
|
|
416
416
|
const normalizedPhysicalId = path.normalize(physicalId);
|
|
417
417
|
let code;
|
|
418
418
|
try {
|
|
419
|
-
code =
|
|
419
|
+
code = re.readFileSync(normalizedPhysicalId, "utf8");
|
|
420
420
|
} catch {
|
|
421
421
|
return null;
|
|
422
422
|
}
|
|
@@ -658,7 +658,7 @@ function cleanModule(moduleUrl, options) {
|
|
|
658
658
|
try {
|
|
659
659
|
if (moduleUrl.startsWith("file://")) {
|
|
660
660
|
const filePath = new URL(moduleUrl);
|
|
661
|
-
|
|
661
|
+
re.unlinkSync(filePath);
|
|
662
662
|
}
|
|
663
663
|
} catch (error) {
|
|
664
664
|
if (error.code !== "ENOENT") throw error;
|
|
@@ -682,14 +682,14 @@ function writeModule(code, options) {
|
|
|
682
682
|
const projectNodeModules = path.join(process.cwd(), "node_modules");
|
|
683
683
|
const outDir = path.join(projectNodeModules, ".unrun");
|
|
684
684
|
const outFile = path.join(outDir, fname);
|
|
685
|
-
if (!
|
|
686
|
-
|
|
687
|
-
|
|
685
|
+
if (!re.existsSync(outFile)) try {
|
|
686
|
+
re.mkdirSync(outDir, { recursive: true });
|
|
687
|
+
re.writeFileSync(outFile, code, "utf8");
|
|
688
688
|
} catch {
|
|
689
689
|
const fallbackDir = path.join(tmpdir(), "unrun-cache");
|
|
690
690
|
const fallbackFile = path.join(fallbackDir, fname);
|
|
691
|
-
|
|
692
|
-
|
|
691
|
+
re.mkdirSync(fallbackDir, { recursive: true });
|
|
692
|
+
re.writeFileSync(fallbackFile, code, "utf8");
|
|
693
693
|
moduleUrl = pathToFileURL(fallbackFile).href;
|
|
694
694
|
}
|
|
695
695
|
moduleUrl = moduleUrl || pathToFileURL(outFile).href;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as __exportAll, r as __toESM, t as __commonJSMin } from "./chunk-N93fKeF6.js";
|
|
2
2
|
import { t as createDebug } from "./node-B3Gdtau1.js";
|
|
3
3
|
import { a as RE_JSON, c as RE_TS, d as filename_js_to_dts, f as filename_to_dts, i as RE_JS, l as RE_VUE, m as resolveTemplateFn, n as RE_DTS, o as RE_NODE_MODULES, p as replaceTemplateName, r as RE_DTS_MAP, s as RE_ROLLDOWN_RUNTIME, t as RE_CSS, u as filename_dts_to } from "./filename-DQnUJlio-DHPB7cQg.js";
|
|
4
|
-
import { n as pe, t as Ge } from "./dist-
|
|
4
|
+
import { n as pe, t as Ge } from "./dist-D_AJtdxQ.js";
|
|
5
5
|
import { n as globalContext, r as invalidateContextFile, t as createContext } from "./tsc-context-B1O6kHlu.js";
|
|
6
6
|
import { createRequire } from "node:module";
|
|
7
7
|
import process from "node:process";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import module from "node:module";
|
|
2
2
|
import path from "node:path";
|
|
3
|
-
import
|
|
3
|
+
import re from "node:fs";
|
|
4
4
|
import xe from "fs";
|
|
5
5
|
import Be from "os";
|
|
6
6
|
import Ie from "path";
|
|
@@ -63,11 +63,11 @@ function h(e) {
|
|
|
63
63
|
}
|
|
64
64
|
i(h, "slash");
|
|
65
65
|
const Z = i((e) => {
|
|
66
|
-
const t =
|
|
66
|
+
const t = re[e];
|
|
67
67
|
return (s, ...n) => {
|
|
68
68
|
const o = `${e}:${n.join(":")}`;
|
|
69
69
|
let l = s == null ? void 0 : s.get(o);
|
|
70
|
-
return l === void 0 && (l = Reflect.apply(t,
|
|
70
|
+
return l === void 0 && (l = Reflect.apply(t, re, n), s?.set(o, l)), l;
|
|
71
71
|
};
|
|
72
72
|
}, "cacheFs"), E = Z("existsSync"), $e = Z("readFileSync"), G = Z("statSync"), fe = i((e, t, s) => {
|
|
73
73
|
for (;;) {
|
|
@@ -8775,7 +8775,7 @@ interface GlobDependency {
|
|
|
8775
8775
|
glob: string;
|
|
8776
8776
|
}
|
|
8777
8777
|
//#endregion
|
|
8778
|
-
//#region ../../node_modules/.pnpm/@tsdown+css@0.21.9_jiti@2.6.1_postcss-import@16.1.1_postcss@8.5.
|
|
8778
|
+
//#region ../../node_modules/.pnpm/@tsdown+css@0.21.9_jiti@2.6.1_postcss-import@16.1.1_postcss@8.5.10__postcss-modules@6.0_24fd9fbeaefe9b06d2220a48a0bebddb/node_modules/@tsdown/css/dist/index.d.mts
|
|
8779
8779
|
//#region src/options.d.ts
|
|
8780
8780
|
type LightningCSSOptions = Omit<TransformOptions<any>, "filename" | "code">;
|
|
8781
8781
|
interface CSSModulesOptions {
|
package/dist/tsdown/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as globalLogger } from "./main-BsfiKQP8.js";
|
|
2
2
|
import { t as enableDebug } from "./debug-CLlnG64L-CuCVzZmG.js";
|
|
3
|
-
import { a as resolveUserConfig, i as mergeConfig, n as buildWithConfigs, t as build$1 } from "./build-OX8uszs6-
|
|
3
|
+
import { a as resolveUserConfig, i as mergeConfig, n as buildWithConfigs, t as build$1 } from "./build-OX8uszs6-4hNTeOrB.js";
|
|
4
4
|
import * as Rolldown from "@voidzero-dev/vite-plus-core/rolldown";
|
|
5
5
|
//#region ../../node_modules/.pnpm/tsdown@0.21.9_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.9_@tsdown+exe@0.21.9_@type_52058320c0a42ed3e52f8161aa9d656f/node_modules/tsdown/dist/config.mjs
|
|
6
6
|
function defineConfig(options) {
|
package/dist/tsdown/run.js
CHANGED
|
@@ -630,7 +630,7 @@ cli.command("[...files]", "Bundle files", {
|
|
|
630
630
|
}).option("-c, --config <filename>", "Use a custom config file").option("--config-loader <loader>", "Config loader to use: auto, native, 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("--public-dir <dir>", "Alias for --copy, deprecated").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("-F, --filter <pattern>", "Filter configs (cwd or name), e.g. /pkg-name$/ or pkg-name").option("--exports", "Generate export-related metadata for package.json (experimental)").action(async (input, flags) => {
|
|
631
631
|
globalLogger.level = flags.logLevel || "info";
|
|
632
632
|
globalLogger.info(`${blue`tsdown v${version}`} powered by ${hex("#ff7e17")`rolldown v${VERSION}`}`);
|
|
633
|
-
const { build } = await import("./build-OX8uszs6-
|
|
633
|
+
const { build } = await import("./build-OX8uszs6-4hNTeOrB.js").then((n) => n.r).then((n) => n.r);
|
|
634
634
|
if (input.length > 0) flags.entry = input;
|
|
635
635
|
await build(flags);
|
|
636
636
|
});
|
|
@@ -220,7 +220,7 @@ var HMRClient = class {
|
|
|
220
220
|
}
|
|
221
221
|
};
|
|
222
222
|
//#endregion
|
|
223
|
-
//#region ../../node_modules/.pnpm/nanoid@5.1.
|
|
223
|
+
//#region ../../node_modules/.pnpm/nanoid@5.1.9/node_modules/nanoid/non-secure/index.js
|
|
224
224
|
let urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
225
225
|
let nanoid = (size = 21) => {
|
|
226
226
|
let id = "";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as __require, t as __commonJSMin } from "./chunk.js";
|
|
2
2
|
import { t as require_lib } from "./lib.js";
|
|
3
|
-
//#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.
|
|
3
|
+
//#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.10/node_modules/postcss-modules/build/fs.js
|
|
4
4
|
var require_fs = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.getFileSystem = getFileSystem;
|
|
@@ -22,7 +22,7 @@ var require_fs = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
22
22
|
}
|
|
23
23
|
}));
|
|
24
24
|
//#endregion
|
|
25
|
-
//#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.
|
|
25
|
+
//#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.10/node_modules/postcss-modules/build/unquote.js
|
|
26
26
|
var require_unquote = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
27
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
28
|
exports.default = unquote;
|
|
@@ -35,7 +35,7 @@ var require_unquote = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
35
35
|
}
|
|
36
36
|
}));
|
|
37
37
|
//#endregion
|
|
38
|
-
//#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.
|
|
38
|
+
//#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.10/node_modules/icss-utils/src/replaceValueSymbols.js
|
|
39
39
|
var require_replaceValueSymbols = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
40
40
|
const matchValueName = /[$]?[\w-]+/g;
|
|
41
41
|
const replaceValueSymbols = (value, replacements) => {
|
|
@@ -52,7 +52,7 @@ var require_replaceValueSymbols = /* @__PURE__ */ __commonJSMin(((exports, modul
|
|
|
52
52
|
module.exports = replaceValueSymbols;
|
|
53
53
|
}));
|
|
54
54
|
//#endregion
|
|
55
|
-
//#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.
|
|
55
|
+
//#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.10/node_modules/icss-utils/src/replaceSymbols.js
|
|
56
56
|
var require_replaceSymbols = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
57
57
|
const replaceValueSymbols = require_replaceValueSymbols();
|
|
58
58
|
const replaceSymbols = (css, replacements) => {
|
|
@@ -65,7 +65,7 @@ var require_replaceSymbols = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
65
65
|
module.exports = replaceSymbols;
|
|
66
66
|
}));
|
|
67
67
|
//#endregion
|
|
68
|
-
//#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.
|
|
68
|
+
//#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.10/node_modules/icss-utils/src/extractICSS.js
|
|
69
69
|
var require_extractICSS = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
70
70
|
const importPattern = /^:import\(("[^"]*"|'[^']*'|[^"']+)\)$/;
|
|
71
71
|
const balancedQuotes = /^("[^"]*"|'[^']*'|[^"']+)$/;
|
|
@@ -119,7 +119,7 @@ var require_extractICSS = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
119
119
|
module.exports = extractICSS;
|
|
120
120
|
}));
|
|
121
121
|
//#endregion
|
|
122
|
-
//#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.
|
|
122
|
+
//#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.10/node_modules/icss-utils/src/createICSSRules.js
|
|
123
123
|
var require_createICSSRules = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
124
124
|
const createImports = (imports, postcss, mode = "rule") => {
|
|
125
125
|
return Object.keys(imports).map((path) => {
|
|
@@ -163,7 +163,7 @@ var require_createICSSRules = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
163
163
|
module.exports = createICSSRules;
|
|
164
164
|
}));
|
|
165
165
|
//#endregion
|
|
166
|
-
//#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.
|
|
166
|
+
//#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.10/node_modules/icss-utils/src/index.js
|
|
167
167
|
var require_src$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
168
168
|
module.exports = {
|
|
169
169
|
replaceValueSymbols: require_replaceValueSymbols(),
|
|
@@ -173,7 +173,7 @@ var require_src$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
173
173
|
};
|
|
174
174
|
}));
|
|
175
175
|
//#endregion
|
|
176
|
-
//#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.
|
|
176
|
+
//#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.10/node_modules/postcss-modules/build/Parser.js
|
|
177
177
|
var require_Parser = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
178
178
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
179
179
|
exports.default = void 0;
|
|
@@ -241,7 +241,7 @@ var require_Parser = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
241
241
|
exports.default = Parser;
|
|
242
242
|
}));
|
|
243
243
|
//#endregion
|
|
244
|
-
//#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.
|
|
244
|
+
//#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.10/node_modules/postcss-modules/build/saveJSON.js
|
|
245
245
|
var require_saveJSON = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
246
246
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
247
247
|
exports.default = saveJSON;
|
|
@@ -893,7 +893,7 @@ var require_lodash_camelcase = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
893
893
|
module.exports = camelCase;
|
|
894
894
|
}));
|
|
895
895
|
//#endregion
|
|
896
|
-
//#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.
|
|
896
|
+
//#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.10/node_modules/postcss-modules/build/localsConvention.js
|
|
897
897
|
var require_localsConvention = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
898
898
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
899
899
|
exports.makeLocalsConventionReducer = makeLocalsConventionReducer;
|
|
@@ -933,7 +933,7 @@ var require_localsConvention = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
933
933
|
}
|
|
934
934
|
}));
|
|
935
935
|
//#endregion
|
|
936
|
-
//#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.
|
|
936
|
+
//#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.10/node_modules/postcss-modules/build/FileSystemLoader.js
|
|
937
937
|
var require_FileSystemLoader = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
938
938
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
939
939
|
exports.default = void 0;
|
|
@@ -1018,7 +1018,7 @@ var require_FileSystemLoader = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
1018
1018
|
exports.default = FileSystemLoader;
|
|
1019
1019
|
}));
|
|
1020
1020
|
//#endregion
|
|
1021
|
-
//#region ../../node_modules/.pnpm/postcss-modules-extract-imports@3.1.0_postcss@8.5.
|
|
1021
|
+
//#region ../../node_modules/.pnpm/postcss-modules-extract-imports@3.1.0_postcss@8.5.10/node_modules/postcss-modules-extract-imports/src/topologicalSort.js
|
|
1022
1022
|
var require_topologicalSort = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1023
1023
|
const PERMANENT_MARKER = 2;
|
|
1024
1024
|
const TEMPORARY_MARKER = 1;
|
|
@@ -1057,7 +1057,7 @@ var require_topologicalSort = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
1057
1057
|
module.exports = topologicalSort;
|
|
1058
1058
|
}));
|
|
1059
1059
|
//#endregion
|
|
1060
|
-
//#region ../../node_modules/.pnpm/postcss-modules-extract-imports@3.1.0_postcss@8.5.
|
|
1060
|
+
//#region ../../node_modules/.pnpm/postcss-modules-extract-imports@3.1.0_postcss@8.5.10/node_modules/postcss-modules-extract-imports/src/index.js
|
|
1061
1061
|
var require_src$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1062
1062
|
const topologicalSort = require_topologicalSort();
|
|
1063
1063
|
const matchImports = /^(.+?)\s+from\s+(?:"([^"]+)"|'([^']+)'|(global))$/;
|
|
@@ -4563,7 +4563,7 @@ var require_dist = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4563
4563
|
module.exports = exports.default;
|
|
4564
4564
|
}));
|
|
4565
4565
|
//#endregion
|
|
4566
|
-
//#region ../../node_modules/.pnpm/postcss-modules-local-by-default@4.2.0_postcss@8.5.
|
|
4566
|
+
//#region ../../node_modules/.pnpm/postcss-modules-local-by-default@4.2.0_postcss@8.5.10/node_modules/postcss-modules-local-by-default/src/index.js
|
|
4567
4567
|
var require_src$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4568
4568
|
const selectorParser = require_dist();
|
|
4569
4569
|
const valueParser = require_lib();
|
|
@@ -4961,7 +4961,7 @@ var require_src$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4961
4961
|
module.exports.postcss = true;
|
|
4962
4962
|
}));
|
|
4963
4963
|
//#endregion
|
|
4964
|
-
//#region ../../node_modules/.pnpm/postcss-modules-scope@3.2.1_postcss@8.5.
|
|
4964
|
+
//#region ../../node_modules/.pnpm/postcss-modules-scope@3.2.1_postcss@8.5.10/node_modules/postcss-modules-scope/src/index.js
|
|
4965
4965
|
var require_src$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4966
4966
|
const selectorParser = require_dist();
|
|
4967
4967
|
const hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
@@ -5141,7 +5141,7 @@ var require_string_hash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5141
5141
|
module.exports = hash;
|
|
5142
5142
|
}));
|
|
5143
5143
|
//#endregion
|
|
5144
|
-
//#region ../../node_modules/.pnpm/postcss-modules-values@4.0.0_postcss@8.5.
|
|
5144
|
+
//#region ../../node_modules/.pnpm/postcss-modules-values@4.0.0_postcss@8.5.10/node_modules/postcss-modules-values/src/index.js
|
|
5145
5145
|
var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5146
5146
|
const ICSSUtils = require_src$4();
|
|
5147
5147
|
const matchImports = /^(.+?|\([\s\S]+?\))\s+from\s+("[^"]*"|'[^']*'|[\w-]+)$/;
|
|
@@ -5228,7 +5228,7 @@ var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5228
5228
|
module.exports.postcss = true;
|
|
5229
5229
|
}));
|
|
5230
5230
|
//#endregion
|
|
5231
|
-
//#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.
|
|
5231
|
+
//#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.10/node_modules/postcss-modules/build/scoping.js
|
|
5232
5232
|
var require_scoping = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5233
5233
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5234
5234
|
exports.behaviours = void 0;
|
|
@@ -5290,7 +5290,7 @@ var require_scoping = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
5290
5290
|
}
|
|
5291
5291
|
}));
|
|
5292
5292
|
//#endregion
|
|
5293
|
-
//#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.
|
|
5293
|
+
//#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.10/node_modules/postcss-modules/build/pluginFactory.js
|
|
5294
5294
|
var require_pluginFactory = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5295
5295
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5296
5296
|
exports.makePlugin = makePlugin;
|
|
@@ -5364,7 +5364,7 @@ var require_pluginFactory = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
5364
5364
|
}
|
|
5365
5365
|
}));
|
|
5366
5366
|
//#endregion
|
|
5367
|
-
//#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.
|
|
5367
|
+
//#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.10/node_modules/postcss-modules/build/index.js
|
|
5368
5368
|
var require_build = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5369
5369
|
var _fs = __require("fs");
|
|
5370
5370
|
var _fs2 = require_fs();
|