@voidzero-dev/vite-plus-core 0.2.1 → 0.2.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.
Files changed (66) hide show
  1. package/LICENSE +175 -48
  2. package/dist/rolldown/cli.mjs +25 -14
  3. package/dist/rolldown/config.d.mts +1 -1
  4. package/dist/rolldown/config.mjs +2 -2
  5. package/dist/rolldown/experimental-index.d.mts +15 -5
  6. package/dist/rolldown/experimental-index.mjs +23 -17
  7. package/dist/rolldown/filter-index.d.mts +1 -1
  8. package/dist/rolldown/index.d.mts +2 -2
  9. package/dist/rolldown/index.mjs +4 -4
  10. package/dist/rolldown/parallel-plugin-worker.mjs +5 -4
  11. package/dist/rolldown/parallel-plugin.d.mts +1 -1
  12. package/dist/rolldown/parse-ast-index.d.mts +1 -1
  13. package/dist/rolldown/parse-ast-index.mjs +1 -1
  14. package/dist/rolldown/plugins-index.d.mts +3 -3
  15. package/dist/rolldown/plugins-index.mjs +2 -2
  16. package/dist/rolldown/shared/{binding-DgGsNpT9.d.mts → binding-B1q9aYT-.d.mts} +65 -142
  17. package/dist/rolldown/shared/{binding-CfwqjDbP.mjs → binding-BmkJW3Wy.mjs} +39 -35
  18. package/dist/rolldown/shared/{bindingify-input-options--chmbDhw.mjs → bindingify-input-options-Cmm60vfj.mjs} +1330 -1331
  19. package/dist/rolldown/shared/{constructors-Bx1tSad6.d.mts → constructors-2i1T9YcF.d.mts} +3 -4
  20. package/dist/rolldown/shared/{constructors-DnT9y_13.mjs → constructors-CE6zZSUt.mjs} +2 -5
  21. package/dist/rolldown/shared/{define-config-ChOOV2QZ.d.mts → define-config-BBz954-q.d.mts} +2 -2
  22. package/dist/rolldown/shared/{error-C0TrL0_H.mjs → error-BlQ0-ek7.mjs} +1 -1
  23. package/dist/rolldown/shared/{load-config-BXgGQtnA.mjs → load-config-CVVMWSlg.mjs} +1 -1
  24. package/dist/rolldown/shared/{normalize-string-or-regex-DGbe3BlX.mjs → normalize-string-or-regex-BYkbbGqQ.mjs} +1 -1
  25. package/dist/rolldown/shared/{parse-26ORR8fZ.mjs → parse-Dphnedsw.mjs} +2 -2
  26. package/dist/rolldown/shared/{prompt-DV1XbtjC.mjs → prompt-Bgj-uEyc.mjs} +5 -5
  27. package/dist/rolldown/shared/{resolve-tsconfig-D3YLh9ff.mjs → resolve-tsconfig-CdIAR1Eb.mjs} +2 -2
  28. package/dist/rolldown/shared/{rolldown-DpXXI00f.mjs → rolldown-Bnp916iM.mjs} +1 -1
  29. package/dist/rolldown/shared/{rolldown-build-D8R4Zzfy.mjs → rolldown-build-Cs2iVJuw.mjs} +24 -56
  30. package/dist/rolldown/shared/{transform-C-XSNVrd.d.mts → transform-CEmFsvJW.d.mts} +1 -1
  31. package/dist/rolldown/shared/{watch-D5Zm0Vsz.mjs → watch-ECGr-_QS.mjs} +4 -4
  32. package/dist/rolldown/utils-index.d.mts +3 -3
  33. package/dist/rolldown/utils-index.mjs +6 -6
  34. package/dist/tsdown/{build-B_nvJe4A-BkmlHYK-.js → build-B_nvJe4A-CvbtVBxy.js} +30 -96
  35. package/dist/tsdown/debug-DLdR-9XB-DQZ6QLC0.js +250 -0
  36. package/dist/tsdown/{detect-B97OSl92-B5bcx_Ya.js → detect-B97OSl92-BJPZyIKJ.js} +1 -1
  37. package/dist/tsdown/{dist-4h5bgYzo.js → dist-CqbVlnVq.js} +30 -25
  38. package/dist/tsdown/general-Cp4NiJNK-CbyrS9q1.js +97 -0
  39. package/dist/tsdown/index-types.d.ts +197 -7
  40. package/dist/tsdown/index.js +3 -3
  41. package/dist/tsdown/internal-bfoxcI4F.js +3 -0
  42. package/dist/tsdown/{main-BMtwTklr.js → main-BlTcyuFi.js} +2 -341
  43. package/dist/tsdown/npm_entry_picomatch.cjs +4 -2
  44. package/dist/tsdown/npm_entry_semver_functions_coerce.cjs +5 -1
  45. package/dist/tsdown/{resolver-DtsKFXi2-DQOmVgSY.js → resolver-DtsKFXi2-B8Z3WwZh.js} +1 -1
  46. package/dist/tsdown/run.js +4 -3
  47. package/dist/tsdown/src-CISfE_A0.js +622 -0
  48. package/dist/tsdown/target-CqeSqtms-FAqYuGyB.js +79 -0
  49. package/dist/tsdown/{tsc-15OYetCl.js → tsc-CdZE7QwS.js} +3 -3
  50. package/dist/tsdown/{tsc-context-DfwSQt2q.js → tsc-context-CX_GXdyS.js} +2 -2
  51. package/dist/tsdown/tsdown-css.js +874 -0
  52. package/dist/tsdown/tsdown-exe.js +949 -0
  53. package/dist/vite/client/client.mjs +7 -9
  54. package/dist/vite/client.d.ts +3 -0
  55. package/dist/vite/node/chunks/build.js +27 -34
  56. package/dist/vite/node/chunks/dist.js +23 -23
  57. package/dist/vite/node/chunks/dist2.js +3 -3
  58. package/dist/vite/node/chunks/logger.js +4 -4
  59. package/dist/vite/node/chunks/node.js +12486 -11732
  60. package/dist/vite/node/chunks/postcss-import.js +10 -10
  61. package/dist/vite/node/cli.js +3 -3
  62. package/dist/vite/node/index.d.ts +141 -16
  63. package/dist/vite/node/index.js +1 -1
  64. package/dist/vite/node/module-runner.js +6 -6
  65. package/dist/vite/types/importGlob.d.ts +48 -6
  66. package/package.json +15 -21
@@ -1,4 +1,7 @@
1
- import { A as __commonJSMin, C as noop, D as resolveRegex, E as resolveComma, M as __toESM, O as slash, S as matchPattern, T as promiseWithResolvers, _ as red, a as createDebug, b as debounce, c as generateColor, d as prettyFormat, f as blue, h as green, i as version, j as __exportAll$1, k as toArray, l as getNameLabel, m as dim, n as z$1, o as LogLevels, p as bold, s as createLogger, t as R$2, u as globalLogger, v as underline, w as pkgExists, x as importWithError, y as yellow } from "./main-BMtwTklr.js";
1
+ import { a as pkgExists, c as resolveRegex, d as __commonJSMin, f as __exportAll$1, i as noop, l as slash, m as __toESM, n as importWithError, o as promiseWithResolvers, r as matchPattern, s as resolveComma, t as debounce, u as toArray } from "./general-Cp4NiJNK-CbyrS9q1.js";
2
+ import { a as generateColor, c as prettyFormat, d as dim, f as green, g as yellow, h as underline, i as createLogger, l as blue, m as red, n as version, o as getNameLabel, r as LogLevels, s as globalLogger, u as bold } from "./debug-DLdR-9XB-DQZ6QLC0.js";
3
+ import { n as z$1, r as createDebug, t as R$2 } from "./main-BlTcyuFi.js";
4
+ import { a as fsRemove, c as stripExtname, i as fsExists, n as resolveTarget, o as fsStat, r as fsCopy, s as lowestCommonAncestor } from "./target-CqeSqtms-FAqYuGyB.js";
2
5
  import module$1, { builtinModules, createRequire, isBuiltin } from "node:module";
3
6
  import process$1 from "node:process";
4
7
  import readline from "node:readline";
@@ -6,7 +9,7 @@ import { formatWithOptions, inspect, isDeepStrictEqual, promisify } from "node:u
6
9
  import path, { dirname, isAbsolute, join, parse, resolve } from "node:path";
7
10
  import re, { existsSync, readFileSync, writeFileSync } from "node:fs";
8
11
  import { RUNTIME_MODULE_ID, VERSION, build, watch } from "@voidzero-dev/vite-plus-core/rolldown";
9
- import { access, chmod, cp, mkdir, mkdtemp, readFile, readdir, rm, stat, writeFile } from "node:fs/promises";
12
+ import { chmod, mkdir, mkdtemp, readFile, readdir, writeFile } from "node:fs/promises";
10
13
  import { and, exactRegex, id, importerId, include } from "@voidzero-dev/vite-plus-core/rolldown/filter";
11
14
  import * as nativeFs from "fs";
12
15
  import Ue, { readdir as readdir$1, readdirSync, realpath, realpathSync, stat as stat$1, statSync as statSync$1 } from "fs";
@@ -20,50 +23,7 @@ import { AsyncLocalStorage } from "node:async_hooks";
20
23
  import { Buffer } from "node:buffer";
21
24
  import { brotliCompress, gzip } from "node:zlib";
22
25
  import { importGlobPlugin } from "@voidzero-dev/vite-plus-core/rolldown/experimental";
23
- //#region ../../node_modules/.pnpm/tsdown@0.22.3_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.3_@tsdown+exe@0.22.3_@type_701dbb346589e2d965113664da5ac600/node_modules/tsdown/dist/fs-qxJxxoCE.mjs
24
- function fsExists(path) {
25
- return access(path).then(() => true, () => false);
26
- }
27
- function fsStat(path) {
28
- return stat(path).catch(() => null);
29
- }
30
- function fsRemove(path) {
31
- return rm(path, {
32
- force: true,
33
- recursive: true
34
- }).catch(() => {});
35
- }
36
- function fsCopy(from, to) {
37
- return cp(from, to, {
38
- recursive: true,
39
- force: true
40
- });
41
- }
42
- function lowestCommonAncestor(...filepaths) {
43
- if (filepaths.length === 0) return "";
44
- if (filepaths.length === 1) return path.dirname(filepaths[0]);
45
- filepaths = filepaths.map(path.normalize);
46
- const [first, ...rest] = filepaths;
47
- let ancestor = first.split(path.sep);
48
- for (const filepath of rest) {
49
- const directories = filepath.split(path.sep, ancestor.length);
50
- let index = 0;
51
- for (const directory of directories) if (directory === ancestor[index]) index += 1;
52
- else {
53
- ancestor = ancestor.slice(0, index);
54
- break;
55
- }
56
- ancestor = ancestor.slice(0, index);
57
- }
58
- return ancestor.length <= 1 && ancestor[0] === "" ? path.sep + ancestor[0] : ancestor.join(path.sep);
59
- }
60
- function stripExtname(filePath) {
61
- const ext = path.extname(filePath);
62
- if (!ext.length) return filePath;
63
- return filePath.slice(0, -ext.length);
64
- }
65
- //#endregion
66
- //#region ../../node_modules/.pnpm/rolldown-plugin-dts@0.26.0_@typescript+native-preview@7.0.0-dev.20260605.1_oxc-resolver_6f03fea6114f4c67cf5f12416b2625b7/node_modules/rolldown-plugin-dts/dist/filename-BR9JpwkC.mjs
26
+ //#region ../../node_modules/.pnpm/rolldown-plugin-dts@0.26.0_@typescript+native-preview@7.0.0-dev.20260605.1_oxc-resolver_4fe2e1acd1a0882df7c50b3958bba707/node_modules/rolldown-plugin-dts/dist/filename-BR9JpwkC.mjs
67
27
  const RE_JS = /\.([cm]?)jsx?$/;
68
28
  const RE_TS = /\.([cm]?)tsx?$/;
69
29
  const RE_DTS = /\.d\.([cm]?)ts$/;
@@ -831,7 +791,10 @@ const Y = i((e, n) => Ve(_e(n, e)), "readJsonc"), pe = i(() => {
831
791
  const { compilerOptions: p } = c;
832
792
  for (const f of ["baseUrl", "rootDir"]) {
833
793
  const y = p[f];
834
- if (y && !y.startsWith(U)) p[f] = C(D, path.resolve(D, y));
794
+ if (y && !y.startsWith(U)) {
795
+ const j = path.resolve(D, y);
796
+ p[f] = C(D, j);
797
+ }
835
798
  }
836
799
  for (const f of de) {
837
800
  let y = p[f];
@@ -987,7 +950,7 @@ const ve = G((e) => {
987
950
  if (!path.isAbsolute(n)) throw new Error("The tsconfig path must be absolute");
988
951
  Oe && (n = x(n));
989
952
  const t = path.dirname(n), { files: o, include: r, exclude: l, compilerOptions: g } = e, m = i((c) => path.isAbsolute(c) ? c : ye(t, c), "resolvePattern"), k = o ? new Set(o.map(m)) : void 0, w = rt(g), u = s ? "" : "i", O = (l || lt(g)).map((c) => {
990
- const b = Te(m(c)).replaceAll(String.raw`\*\*/`, "(.+/)?").replaceAll(String.raw`\*`, `${Q}*`).replaceAll(String.raw`\?`, Q);
953
+ const p = m(c), b = Te(p).replaceAll(String.raw`\*\*/`, "(.+/)?").replaceAll(String.raw`\*`, `${Q}*`).replaceAll(String.raw`\?`, Q);
991
954
  return new RegExp(`^${b}($|/)`, u);
992
955
  }), h = o || r ? r : [he];
993
956
  return {
@@ -1020,7 +983,7 @@ const ve = G((e) => {
1020
983
  for (;;) {
1021
984
  const l = R(r, n, s);
1022
985
  if (!l) return;
1023
- const m = ee(path.resolve(l), {
986
+ const g = path.resolve(l), m = ee(g, {
1024
987
  cache: s,
1025
988
  typescriptVersion: t
1026
989
  });
@@ -1094,7 +1057,7 @@ i((e, n) => {
1094
1057
  return m.substitutions.map((u) => x(u.replace("*", w)));
1095
1058
  }, "resolvePathAlias");
1096
1059
  //#endregion
1097
- //#region ../../node_modules/.pnpm/tsdown@0.22.3_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.3_@tsdown+exe@0.22.3_@type_701dbb346589e2d965113664da5ac600/node_modules/tsdown/dist/format-DMceewlS.mjs
1060
+ //#region ../../node_modules/.pnpm/tsdown@0.22.3_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.3_@tsdown+exe@0.22.3_@type_b3805a6765df28d505319221a7193e18/node_modules/tsdown/dist/format-DMceewlS.mjs
1098
1061
  const shimFile = path.resolve(import.meta.dirname, "..", "esm-shims.js");
1099
1062
  const shimsDefine = {
1100
1063
  __dirname: "__TSDOWN_SHIM_DIRNAME__",
@@ -1209,7 +1172,7 @@ function DepsPlugin({ pkg, deps: { alwaysBundle: jsAlwaysBundle, onlyBundle, ski
1209
1172
  if (!tsdownBundle.inlinedDeps.has(parsed.pkgName)) tsdownBundle.inlinedDeps.set(parsed.pkgName, /* @__PURE__ */ new Set());
1210
1173
  tsdownBundle.inlinedDeps.get(parsed.pkgName).add(parsed.version);
1211
1174
  const module = this.getModuleInfo(id);
1212
- if (module) importers.set(parsed.name, new Set([...module.importers, ...importers.get(parsed.name) || []]));
1175
+ if (module) importers.set(parsed.name, /* @__PURE__ */ new Set([...module.importers, ...importers.get(parsed.name) || []]));
1213
1176
  }
1214
1177
  }
1215
1178
  debug$7("found deps in bundle: %o", deps);
@@ -1303,7 +1266,7 @@ async function resolveDepSubpath(id, resolved) {
1303
1266
  return result;
1304
1267
  }
1305
1268
  function getProductionDeps(pkg) {
1306
- return new Set([
1269
+ return /* @__PURE__ */ new Set([
1307
1270
  ...Object.keys(pkg.dependencies || {}),
1308
1271
  ...Object.keys(pkg.peerDependencies || {}),
1309
1272
  ...Object.keys(pkg.optionalDependencies || {})
@@ -1314,37 +1277,6 @@ function formatBytes(bytes) {
1314
1277
  if (bytes > 1e6) return `${(bytes / 1e6).toFixed(2)} MB`;
1315
1278
  return `${(bytes / 1e3).toFixed(2)} kB`;
1316
1279
  }
1317
- const minVersion = createRequire(import.meta.url)("./npm_entry_semver_ranges_min-version.cjs");
1318
- const BASELINE_WIDELY_AVAILABLE_TARGET = [
1319
- "chrome111",
1320
- "edge111",
1321
- "firefox114",
1322
- "safari16.4",
1323
- "ios16.4"
1324
- ];
1325
- function expandBaselineTarget(targets) {
1326
- return targets.flatMap((t) => t === "baseline-widely-available" ? BASELINE_WIDELY_AVAILABLE_TARGET : t);
1327
- }
1328
- function resolveTarget(logger, target, color, pkg, nameLabel) {
1329
- if (target === false) return;
1330
- if (target == null) {
1331
- const pkgTarget = resolvePackageTarget(pkg);
1332
- if (pkgTarget) target = pkgTarget;
1333
- else return;
1334
- }
1335
- if (typeof target === "number") throw new TypeError(`Invalid target: ${target}`);
1336
- const targets = expandBaselineTarget(resolveComma(toArray(target)));
1337
- if (targets.length) logger.info(nameLabel, `target${targets.length > 1 ? "s" : ""}: ${color(targets.join(", "))}`);
1338
- return targets;
1339
- }
1340
- function resolvePackageTarget(pkg) {
1341
- const nodeVersion = pkg?.engines?.node;
1342
- if (!nodeVersion) return;
1343
- const nodeMinVersion = minVersion(nodeVersion);
1344
- if (!nodeMinVersion) return;
1345
- if (nodeMinVersion.version === "0.0.0") return;
1346
- return `node${nodeMinVersion.version}`;
1347
- }
1348
1280
  //#endregion
1349
1281
  //#region ../../node_modules/.pnpm/defu@6.1.7/node_modules/defu/dist/defu.mjs
1350
1282
  function isPlainObject(value) {
@@ -2732,7 +2664,8 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2732
2664
  };
2733
2665
  const extglobClose = (token) => {
2734
2666
  const literal = input.slice(token.startIndex, state.index + 1);
2735
- const analysis = analyzeRepeatedExtglob(input.slice(token.startIndex + 2, state.index), opts);
2667
+ const body = input.slice(token.startIndex + 2, state.index);
2668
+ const analysis = analyzeRepeatedExtglob(body, opts);
2736
2669
  if ((token.type === "plus" || token.type === "star") && analysis.risky) {
2737
2670
  const safeOutput = analysis.safeOutput ? (token.output ? "" : ONE_CHAR) + (opts.capture ? `(${analysis.safeOutput})` : analysis.safeOutput) : void 0;
2738
2671
  const open = tokens[token.tokensIndex];
@@ -2858,7 +2791,8 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2858
2791
  if (inner.includes(":")) {
2859
2792
  const idx = prev.value.lastIndexOf("[");
2860
2793
  const pre = prev.value.slice(0, idx);
2861
- const posix = POSIX_REGEX_SOURCE[prev.value.slice(idx + 2)];
2794
+ const rest = prev.value.slice(idx + 2);
2795
+ const posix = POSIX_REGEX_SOURCE[rest];
2862
2796
  if (posix) {
2863
2797
  prev.value = pre + posix;
2864
2798
  state.backtrack = true;
@@ -4401,7 +4335,7 @@ function createConfigCoreLoader(options) {
4401
4335
  };
4402
4336
  }
4403
4337
  //#endregion
4404
- //#region ../../node_modules/.pnpm/tsdown@0.22.3_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.3_@tsdown+exe@0.22.3_@type_701dbb346589e2d965113664da5ac600/node_modules/tsdown/dist/options-Ce3ueyZH.mjs
4338
+ //#region ../../node_modules/.pnpm/tsdown@0.22.3_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.3_@tsdown+exe@0.22.3_@type_b3805a6765df28d505319221a7193e18/node_modules/tsdown/dist/options-Ce3ueyZH.mjs
4405
4339
  const __cjs_require$1 = createRequire(import.meta.url);
4406
4340
  const picomatch = __cjs_require$1("./npm_entry_picomatch.cjs");
4407
4341
  const satisfies$1 = __cjs_require$1("./npm_entry_semver_functions_satisfies.cjs");
@@ -4535,7 +4469,7 @@ async function buildExe(config, chunks) {
4535
4469
  const { targets } = config.exe;
4536
4470
  if (targets?.length) {
4537
4471
  if (config.exe.seaConfig?.executable) config.logger.warn(config.nameLabel, "`seaConfig.executable` is ignored when `targets` is specified.");
4538
- const { resolveNodeBinary, getTargetSuffix } = await importWithError("@tsdown/exe");
4472
+ const { resolveNodeBinary, getTargetSuffix } = await import("./tsdown-exe.js");
4539
4473
  for (const target of targets) {
4540
4474
  const nodeBinaryPath = await resolveNodeBinary(target, config.logger);
4541
4475
  const suffix = getTargetSuffix(target);
@@ -5025,7 +4959,7 @@ function createParser(loader) {
5025
4959
  if (basename === configPrefix || isPkgJson || basename.endsWith(".json")) {
5026
4960
  const contents = await readFile(filepath, "utf8");
5027
4961
  const parsed = JSON.parse(contents);
5028
- return [isPkgJson ? parsed?.tsdown : parsed, new Set([filepath])];
4962
+ return [isPkgJson ? parsed?.tsdown : parsed, /* @__PURE__ */ new Set([filepath])];
5029
4963
  }
5030
4964
  switch (loader) {
5031
4965
  case "native": return nativeImport(filepath);
@@ -5036,7 +4970,7 @@ function createParser(loader) {
5036
4970
  };
5037
4971
  }
5038
4972
  async function nativeImport(id) {
5039
- const deps = new Set([id]);
4973
+ const deps = /* @__PURE__ */ new Set([id]);
5040
4974
  const url = pathToFileURL(id);
5041
4975
  const importAttributes = Object.create(null);
5042
4976
  if (isSupported) {
@@ -5054,7 +4988,7 @@ async function nativeImport(id) {
5054
4988
  async function tsxImport(id) {
5055
4989
  const { tsImport } = await importWithError("tsx/esm/api");
5056
4990
  const module = await tsImport(pathToFileURL(id).href, import.meta.url);
5057
- return [module?.default || module, new Set([id])];
4991
+ return [module?.default || module, /* @__PURE__ */ new Set([id])];
5058
4992
  }
5059
4993
  async function unrunImport(id) {
5060
4994
  const { unrun } = await importWithError("unrun");
@@ -5277,7 +5211,7 @@ function filterConfig(filter, configCwd, name) {
5277
5211
  return toArray(filter).some((value) => name && name === value || cwd === value);
5278
5212
  }
5279
5213
  //#endregion
5280
- //#region ../../node_modules/.pnpm/tsdown@0.22.3_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.3_@tsdown+exe@0.22.3_@type_701dbb346589e2d965113664da5ac600/node_modules/tsdown/dist/watch-C3ocHLCt.mjs
5214
+ //#region ../../node_modules/.pnpm/tsdown@0.22.3_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.3_@tsdown+exe@0.22.3_@type_b3805a6765df28d505319221a7193e18/node_modules/tsdown/dist/watch-C3ocHLCt.mjs
5281
5215
  async function copy(options) {
5282
5216
  if (!options.copy) return;
5283
5217
  const resolved = await resolveCopyEntries(options);
@@ -5657,7 +5591,7 @@ var Hookable = class {
5657
5591
  }
5658
5592
  };
5659
5593
  //#endregion
5660
- //#region ../../node_modules/.pnpm/tsdown@0.22.3_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.3_@tsdown+exe@0.22.3_@type_701dbb346589e2d965113664da5ac600/node_modules/tsdown/dist/build-B_nvJe4A.mjs
5594
+ //#region ../../node_modules/.pnpm/tsdown@0.22.3_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.3_@tsdown+exe@0.22.3_@type_b3805a6765df28d505319221a7193e18/node_modules/tsdown/dist/build-B_nvJe4A.mjs
5661
5595
  var build_B_nvJe4A_exports = /* @__PURE__ */ __exportAll$1({
5662
5596
  n: () => buildWithConfigs,
5663
5597
  r: () => build_exports,
@@ -5972,7 +5906,7 @@ async function bundleDone(bundleByPkg, bundle) {
5972
5906
  async function packTarball(packageJsonPath) {
5973
5907
  const pkgDir = path.dirname(packageJsonPath);
5974
5908
  const destination = await mkdtemp(path.join(tmpdir(), "tsdown-pack-"));
5975
- const { detect } = await import("./detect-B97OSl92-B5bcx_Ya.js");
5909
+ const { detect } = await import("./detect-B97OSl92-BJPZyIKJ.js");
5976
5910
  try {
5977
5911
  const detected = await detect({ cwd: pkgDir });
5978
5912
  debug$1("Detected package manager: %o", detected);
@@ -6112,7 +6046,7 @@ async function resolveInputOptions(config, format, configDeps, bundle, cjsDts, i
6112
6046
  if (nodeProtocol) plugins.push(NodeProtocolPlugin(nodeProtocol));
6113
6047
  if (config.pkg || config.deps.skipNodeModulesBundle) plugins.push(DepsPlugin(config, bundle));
6114
6048
  if (dts) {
6115
- const { dts: dtsPlugin } = await import("./dist-4h5bgYzo.js");
6049
+ const { dts: dtsPlugin } = await import("./dist-CqbVlnVq.js");
6116
6050
  const { cjsReexport: _, ...dtsPluginOptions } = dts;
6117
6051
  const options = {
6118
6052
  tsconfig,
@@ -6135,8 +6069,8 @@ async function resolveInputOptions(config, format, configDeps, bundle, cjsDts, i
6135
6069
  ...unused
6136
6070
  }));
6137
6071
  }
6138
- if (pkgExists("@tsdown/css")) {
6139
- const { CssPlugin } = await import("@tsdown/css");
6072
+ if (true) {
6073
+ const { CssPlugin } = await import("./tsdown-css.js");
6140
6074
  const cssPlugins = CssPlugin(config, { logger });
6141
6075
  plugins.push(...cssPlugins.pre);
6142
6076
  cssPostPlugins = cssPlugins.post;
@@ -0,0 +1,250 @@
1
+ import { d as __commonJSMin, i as noop, m as __toESM, s as resolveComma, u as toArray } from "./general-Cp4NiJNK-CbyrS9q1.js";
2
+ import { a as namespaces, i as enable, r as createDebug } from "./main-BlTcyuFi.js";
3
+ import process from "node:process";
4
+ import readline from "node:readline";
5
+ const { Ansis, fg, bg, rgb, bgRgb, hex, bgHex, reset, inverse, hidden, visible, link, bold, dim, italic, underline, strikethrough, black, red, green, yellow, blue, magenta, cyan, white, gray, redBright, greenBright, yellowBright, blueBright, magentaBright, cyanBright, whiteBright, bgBlack, bgRed, bgGreen, bgYellow, bgBlue, bgMagenta, bgCyan, bgWhite, bgGray, bgRedBright, bgGreenBright, bgYellowBright, bgBlueBright, bgMagentaBright, bgCyanBright, bgWhiteBright } = (/* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
6
+ let e, { defineProperty: r, getPrototypeOf: t, setPrototypeOf: n, create: o, keys: l } = Object, i = "", { round: f, max: s } = Math, u = (e) => {
7
+ let r = /([a-f\d]{3,6})/i.exec(e)?.[0], t = r?.length, n = "0x" + (6 ^ t ? 3 ^ t ? "0" : r[0] + r[0] + r[1] + r[1] + r[2] + r[2] : r) | 0;
8
+ return [
9
+ n >> 16,
10
+ n >> 8 & 255,
11
+ 255 & n
12
+ ];
13
+ }, a = (e) => {
14
+ if (8 > e) return 30 + e;
15
+ if (16 > e) return 82 + e;
16
+ if (e > 231) return e > 243 ? 37 : 30;
17
+ let r = (e -= 16) % 36, t = e / 36 | 0, n = r / 6 | 0, o = r % 6;
18
+ return 30 + (t > 2 | (n > 2) << 1 | (o > 2) << 2) + (s(t, n, o) > 4 ? 60 : 0);
19
+ }, c = {
20
+ open: i,
21
+ close: i
22
+ }, g = (e, { open: r = "", close: o = "", f: l }) => {
23
+ let f = (e.open || i) + r, s = o + (e.close || i), u = (e, ...t) => {
24
+ if (!e) {
25
+ if (!o) return r;
26
+ if ((e ?? i) === i) return i;
27
+ }
28
+ let n, a = l ? l(e, ...t) : e.raw ? String.raw({ raw: e }, ...t) : i + e, c = u;
29
+ if (a.includes("\x1B")) for (; c = c.p;) {
30
+ let { t: e, o: r } = c, t = r.length, o = i, l = 0;
31
+ if (t) for (; ~(n = a.indexOf(r, l)); l = n + t) o += a.slice(l, n) + e;
32
+ a = o + a.slice(l);
33
+ }
34
+ return f + (a.includes("\n") ? a.replace(/(\r?\n)/g, s + "$1" + f) : a) + s;
35
+ };
36
+ return n(u, t(e)).p = {
37
+ t: r,
38
+ o,
39
+ p: e.p
40
+ }, u.open = f, u.close = s, u;
41
+ };
42
+ const d = new function t(s = globalThis) {
43
+ let d = "number" == typeof s ? s : ((r) => {
44
+ let t = r.process ?? {}, n = t.argv ?? [], o = t.env ?? {}, i = 0;
45
+ try {
46
+ i = ((r, t, n) => (e = t.TERM, {
47
+ "24bit": 3,
48
+ truecolor: 3,
49
+ ansi256: 2,
50
+ ansi: 1
51
+ }[t.COLORTERM] || (t.CI ? /,GITHUB/.test(n) ? 3 : 1 : (t.PM2_HOME || /edge/.test(t.NEXT_RUNTIME) || r.stdout?.isTTY) && "dumb" !== e ? "win32" === r.platform ? 3 : /-256/.test(e) ? 2 : 1 : 0)))(t, o, "," + l(o).join(","));
52
+ } catch (e) {
53
+ o = {};
54
+ }
55
+ let f, s = i || 1, u = "FORCE_COLOR", a = {
56
+ false: 0,
57
+ 0: 0,
58
+ 1: 1,
59
+ 2: 2,
60
+ 3: 3
61
+ }[o[u]] ?? s, c = -1;
62
+ for (f of n) /^--color=?(true|always)?$/.test(f) && (c = s), /^--(no-color|color=(false|never))$/.test(f) && (c = 0);
63
+ return r.window?.chrome ? 3 : u in o ? a : ~c ? c : o.NO_COLOR ? 0 : i;
64
+ })(s), b = {}, p = {
65
+ Ansis: t,
66
+ level: d,
67
+ isSupported: () => m,
68
+ strip: (e) => e.replace(/][^]*|[›][[()#;?]*(?:\d+(?:;\d*)*)?[\dA-ORZcf-nqry=><]/g, i),
69
+ extend(e) {
70
+ for (let r in e) {
71
+ let t = e[r];
72
+ "s" === (typeof t)[0] && (h(w(r), A(...u(t))), t = P(...u(t))), h(r, t);
73
+ }
74
+ return n(p, o({}, b));
75
+ }
76
+ }, h = (e, t) => {
77
+ b[e] = { get() {
78
+ return r(this, e, { value: t.call ? (...e) => g(this, t(...e)) : g(this, t) })[e];
79
+ } };
80
+ }, y = 1 ^ d, $ = d > 2, m = d > 0, O = (e, r) => m ? {
81
+ open: `[${e}m`,
82
+ close: r ? `[${r}m` : i
83
+ } : c, w = (e) => "bg" + e[0].toUpperCase() + e.slice(1), v = (e) => (r) => e(...u(r)), x = (e, r) => (t, n, o) => O(`${e}8;2;${t};${n};${o}`, r), _ = (e) => (r, t, n) => e(((e, r, t) => e ^ r | r ^ t ? 16 + 36 * f(e / 51) + 6 * f(r / 51) + f(t / 51) : 8 > e ? 16 : e > 248 ? 231 : f(24 * (e - 8) / 247) + 232)(r, t, n)), k = (e) => O(y ? "38;5;" + e : a(e), 39), R = (e) => O(y ? "48;5;" + e : a(e) + 10, 49), P = $ ? x(3, 39) : _(k), A = $ ? x(4, 49) : _(R), B = {
84
+ fg: k,
85
+ bg: R,
86
+ rgb: P,
87
+ bgRgb: A,
88
+ hex: v(P),
89
+ bgHex: v(A),
90
+ visible: c,
91
+ reset: O(0, i),
92
+ bold: O(1, 22),
93
+ dim: O(2, 22),
94
+ italic: O(3, 23),
95
+ underline: O(4, 24),
96
+ inverse: O(7, 27),
97
+ hidden: O(8, 28),
98
+ strikethrough: O(9, 29),
99
+ link: { f: (e, r = e) => m ? `]8;;${e}${r}]8;;` : r != e ? r + ` (​${e}​)` : e }
100
+ }, C = (e, r) => {
101
+ B[e] = O(r, 39), B[w(e)] = O(r + 10, 49);
102
+ };
103
+ return "gray,black,red,green,yellow,blue,magenta,cyan,white".split(",").map(((e, r) => {
104
+ r ? C(e + "Bright", 89 + r) : r = 61, C(e, 29 + r);
105
+ })), p.extend(B);
106
+ }();
107
+ module.exports = d.default = d;
108
+ })))(), 1)).default;
109
+ //#endregion
110
+ //#region ../../node_modules/.pnpm/tsdown@0.22.3_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.3_@tsdown+exe@0.22.3_@type_b3805a6765df28d505319221a7193e18/node_modules/tsdown/dist/logger-BxuhTmAE.mjs
111
+ const LogLevels = {
112
+ silent: 0,
113
+ error: 1,
114
+ warn: 2,
115
+ info: 3
116
+ };
117
+ function format(msgs) {
118
+ return msgs.filter((arg) => arg !== void 0 && arg !== false).join(" ");
119
+ }
120
+ function clearScreen() {
121
+ const repeatCount = process.stdout.rows - 2;
122
+ const blank = repeatCount > 0 ? "\n".repeat(repeatCount) : "";
123
+ console.info(blank);
124
+ readline.cursorTo(process.stdout, 0, 0);
125
+ readline.clearScreenDown(process.stdout);
126
+ }
127
+ const warnedMessages = /* @__PURE__ */ new Set();
128
+ function createLogger(level = "info", options = {}) {
129
+ const resolvedOptions = {
130
+ allowClearScreen: true,
131
+ failOnWarn: false,
132
+ console: globalThis.console,
133
+ ...options
134
+ };
135
+ const { allowClearScreen, console, customLogger, failOnWarn } = resolvedOptions;
136
+ if (customLogger) return customLogger;
137
+ function output(type, msg) {
138
+ if (LogLevels[logger.level] < LogLevels[type]) return;
139
+ console[type === "info" ? "log" : type](msg);
140
+ }
141
+ const clear = allowClearScreen && process.stdout.isTTY && !process.env.CI ? clearScreen : () => {};
142
+ const isWindowsTerminal = !!process.env.WT_SESSION;
143
+ const emojiDivier = " ".repeat(isWindowsTerminal ? 2 : 1);
144
+ const logger = {
145
+ level,
146
+ options: resolvedOptions,
147
+ info(...msgs) {
148
+ output("info", `${blue`ℹ`}${emojiDivier}${format(msgs)}`);
149
+ },
150
+ warn(...msgs) {
151
+ if (failOnWarn) return this.error(...msgs);
152
+ const message = format(msgs);
153
+ warnedMessages.add(message);
154
+ output("warn", `${bold(yellow`warn:`)} ${message}`);
155
+ },
156
+ warnOnce(...msgs) {
157
+ const message = format(msgs);
158
+ if (failOnWarn) return this.error(...msgs);
159
+ if (warnedMessages.has(message)) return;
160
+ warnedMessages.add(message);
161
+ output("warn", `${bold(yellow`warn:`)} ${message}`);
162
+ },
163
+ error(...msgs) {
164
+ output("error", `${bold(red`error:`)} ${format(msgs).replace(/^([A-Za-z]*Error):\s*/, "")}`);
165
+ process.exitCode = 1;
166
+ },
167
+ success(...msgs) {
168
+ output("info", `${green`✔`}${emojiDivier}${format(msgs)}`);
169
+ },
170
+ clearScreen(type) {
171
+ if (LogLevels[logger.level] >= LogLevels[type]) clear();
172
+ }
173
+ };
174
+ return logger;
175
+ }
176
+ const globalLogger = createLogger();
177
+ function getNameLabel(ansis, name) {
178
+ if (!name) return void 0;
179
+ return ansis(`[${name}]`);
180
+ }
181
+ function prettyFormat(format) {
182
+ const formatColor = format === "es" ? blue : format === "cjs" ? yellow : noop;
183
+ let formatText;
184
+ switch (format) {
185
+ case "es":
186
+ formatText = "ESM";
187
+ break;
188
+ default:
189
+ formatText = format.toUpperCase();
190
+ break;
191
+ }
192
+ return formatColor(`[${formatText}]`);
193
+ }
194
+ const colors = /* @__PURE__ */ new Map();
195
+ function generateColor(name = "default") {
196
+ if (colors.has(name)) return colors.get(name);
197
+ let color;
198
+ if (name === "default") color = blue;
199
+ else {
200
+ let hash = 0;
201
+ for (let i = 0; i < name.length; i++) hash = name.charCodeAt(i) + ((hash << 5) - hash);
202
+ color = rgb(...hslToRgb(hash % 360, 35, 55));
203
+ }
204
+ colors.set(name, color);
205
+ return color;
206
+ }
207
+ function hslToRgb(h, s, l) {
208
+ h = h % 360;
209
+ h /= 360;
210
+ s /= 100;
211
+ l /= 100;
212
+ let r, g, b;
213
+ if (s === 0) r = g = b = l;
214
+ else {
215
+ const q = l < .5 ? l * (1 + s) : l + s - l * s;
216
+ const p = 2 * l - q;
217
+ r = hue2rgb(p, q, h + 1 / 3);
218
+ g = hue2rgb(p, q, h);
219
+ b = hue2rgb(p, q, h - 1 / 3);
220
+ }
221
+ return [
222
+ Math.max(0, Math.round(r * 255)),
223
+ Math.max(0, Math.round(g * 255)),
224
+ Math.max(0, Math.round(b * 255))
225
+ ];
226
+ }
227
+ function hue2rgb(p, q, t) {
228
+ if (t < 0) t += 1;
229
+ if (t > 1) t -= 1;
230
+ if (t < 1 / 6) return p + (q - p) * 6 * t;
231
+ if (t < 1 / 2) return q;
232
+ if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
233
+ return p;
234
+ }
235
+ //#endregion
236
+ //#region ../../node_modules/.pnpm/tsdown@0.22.3_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.3_@tsdown+exe@0.22.3_@type_b3805a6765df28d505319221a7193e18/node_modules/tsdown/dist/debug-DLdR-9XB.mjs
237
+ var version = "0.22.3";
238
+ const debugLog = createDebug("tsdown:debug");
239
+ function enableDebug(debug) {
240
+ if (!debug) return;
241
+ let namespace;
242
+ if (debug === true) namespace = "tsdown:*";
243
+ else namespace = resolveComma(toArray(debug)).map((v) => `tsdown:${v}`).join(",");
244
+ const ns = namespaces();
245
+ if (ns) namespace += `,${ns}`;
246
+ enable(namespace);
247
+ debugLog("Debugging enabled", namespace);
248
+ }
249
+ //#endregion
250
+ export { generateColor as a, prettyFormat as c, dim as d, green as f, yellow as g, underline as h, createLogger as i, blue as l, red as m, version as n, getNameLabel as o, hex as p, LogLevels as r, globalLogger as s, enableDebug as t, bold as u };
@@ -1,7 +1,7 @@
1
1
  import process from "node:process";
2
2
  import path from "node:path";
3
3
  import fs from "node:fs/promises";
4
- //#region ../../node_modules/.pnpm/tsdown@0.22.3_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.3_@tsdown+exe@0.22.3_@type_701dbb346589e2d965113664da5ac600/node_modules/tsdown/dist/detect-B97OSl92.mjs
4
+ //#region ../../node_modules/.pnpm/tsdown@0.22.3_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.3_@tsdown+exe@0.22.3_@type_b3805a6765df28d505319221a7193e18/node_modules/tsdown/dist/detect-B97OSl92.mjs
5
5
  const AGENTS = [
6
6
  "npm",
7
7
  "yarn",