vite-plus 0.1.2 → 0.1.4

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 (41) hide show
  1. package/binding/index.cjs +2 -0
  2. package/binding/index.d.cts +32 -0
  3. package/dist/global/{prompts-CAIahN1u.js → agent-CpNB3GIY.js} +475 -1350
  4. package/dist/global/{browser-CY4NBwxR.js → browser-CBapUTD0.js} +579 -1023
  5. package/dist/global/{browser-DFpJ6sKb.js → browser-EZnNDcaO.js} +2 -3
  6. package/dist/global/{chunk-CtfvYSle.js → chunk-CgnkrU7a.js} +13 -22
  7. package/dist/global/{cli-truncate-BxinOqz5.js → cli-truncate-Da6Y8aM8.js} +25 -74
  8. package/dist/global/config.js +86 -166
  9. package/dist/global/create.js +626 -615
  10. package/dist/global/{terminal-Cb-NuRkb.js → help-BAGHa8fD.js} +22 -54
  11. package/dist/global/{json-Bfvtp2rL.js → json-BRdVJ52a.js} +24 -58
  12. package/dist/global/{lib-CibYHP32.js → lib-DxappLRQ.js} +19 -43
  13. package/dist/global/{log-update-DdU6_LCN.js → log-update-C8WCYCbc.js} +102 -281
  14. package/dist/global/mcp.js +97 -169
  15. package/dist/global/migrate.js +330 -86
  16. package/dist/global/{package-Pq2biU7_.js → package-YAMvX5PJ.js} +6 -13
  17. package/dist/global/{slice-ansi-BhwAwMdF.js → slice-ansi-Fap0ehe9.js} +21 -52
  18. package/dist/global/{src-C6aLHRsS.js → src-DwSJ0s0I.js} +28 -110
  19. package/dist/global/staged.js +1353 -2112
  20. package/dist/global/{strip-ansi-BL-dgd7n.js → strip-ansi-CE-VDMdw.js} +20 -67
  21. package/dist/global/version.js +16 -37
  22. package/dist/global/{workspace-MTwAF3M9.js → workspace-CiqQdO1L.js} +1711 -2834
  23. package/dist/global/wrap-ansi-Ou9oAs-a.js +3 -0
  24. package/dist/global/{wrap-ansi-Iww6Ak1s.js → wrap-ansi-eywLlPVQ.js} +29 -80
  25. package/dist/index.d.ts +1 -1
  26. package/dist/init-config.js +10 -2
  27. package/dist/utils/agent.d.ts +15 -1
  28. package/dist/utils/agent.js +104 -20
  29. package/dist/utils/constants.d.ts +1 -0
  30. package/dist/utils/constants.js +2 -0
  31. package/dist/utils/editor.d.ts +16 -3
  32. package/dist/utils/editor.js +55 -17
  33. package/dist/utils/prompts.d.ts +33 -4
  34. package/dist/utils/prompts.js +34 -10
  35. package/dist/utils/tsconfig.d.ts +6 -0
  36. package/dist/utils/tsconfig.js +16 -0
  37. package/package.json +14 -14
  38. package/templates/monorepo/package.json +1 -1
  39. package/dist/global/wrap-ansi-BJxjUEQR.js +0 -4
  40. package/dist/oxlint-config.d.ts +0 -498
  41. package/dist/oxlint-config.js +0 -309
@@ -1,16 +1,13 @@
1
1
  import nodeos__default from "node:os";
2
2
  import "@voidzero-dev/vite-plus-core";
3
-
4
- export * from "@voidzero-dev/vite-plus-core"
5
-
3
+ export * from "@voidzero-dev/vite-plus-core";
6
4
  //#region ../test/dist/vendor/std-env.mjs
7
5
  const r = Object.create(null), i = (e) => globalThis.process?.env || import.meta.env || globalThis.Deno?.env.toObject() || globalThis.__env__ || (e ? r : globalThis), o = new Proxy(r, {
8
6
  get(e, s) {
9
7
  return i()[s] ?? r[s];
10
8
  },
11
9
  has(e, s) {
12
- const E = i();
13
- return s in E || s in r;
10
+ return s in i() || s in r;
14
11
  },
15
12
  set(e, s, E) {
16
13
  const B = i(!0);
@@ -25,7 +22,7 @@ const r = Object.create(null), i = (e) => globalThis.process?.env || import.meta
25
22
  const e = i(!0);
26
23
  return Object.keys(e);
27
24
  }
28
- }), t = typeof process < "u" && process.env && "development" || "", f = [
25
+ }), t = typeof process < "u" && process.env && "production" || "", f = [
29
26
  ["APPVEYOR"],
30
27
  [
31
28
  "AWS_AMPLIFY",
@@ -137,15 +134,28 @@ function b() {
137
134
  ci: !1
138
135
  };
139
136
  }
140
- const l = b(), p = l.name;
137
+ const l = b();
138
+ l.name;
141
139
  function n(e) {
142
140
  return e ? e !== "false" : !1;
143
141
  }
144
- const I = globalThis.process?.platform || "", T = n(o.CI) || l.ci !== !1, R = n(globalThis.process?.stdout && globalThis.process?.stdout.isTTY), U = typeof window < "u", d = n(o.DEBUG), a = t === "test" || n(o.TEST), g = t === "production", h = t === "dev" || t === "development", v = n(o.MINIMAL) || T || a || !R, A = /^win/i.test(I), M = /^linux/i.test(I), m = /^darwin/i.test(I), Y = !n(o.NO_COLOR) && (n(o.FORCE_COLOR) || (R || A) && o.TERM !== "dumb" || T), C = (globalThis.process?.versions?.node || "").replace(/^v/, "") || null, V = Number(C?.split(".")[0]) || null, W = globalThis.process || Object.create(null), _ = { versions: {} }, y = new Proxy(W, { get(e, s) {
142
+ const I = globalThis.process?.platform || "", T = n(o.CI) || l.ci !== !1, R = n(globalThis.process?.stdout && globalThis.process?.stdout.isTTY);
143
+ n(o.DEBUG);
144
+ t === "test" || n(o.TEST);
145
+ n(o.MINIMAL);
146
+ const A = /^win/i.test(I);
147
+ /^linux/i.test(I);
148
+ /^darwin/i.test(I);
149
+ !n(o.NO_COLOR) && (n(o.FORCE_COLOR) || (R || A) && o.TERM);
150
+ const C = (globalThis.process?.versions?.node || "").replace(/^v/, "") || null;
151
+ Number(C?.split(".")[0]);
152
+ const W = globalThis.process || Object.create(null), _ = { versions: {} };
153
+ new Proxy(W, { get(e, s) {
145
154
  if (s === "env") return o;
146
155
  if (s in e) return e[s];
147
156
  if (s in _) return _[s];
148
- } }), O = globalThis.process?.release?.name === "node", c = !!globalThis.Bun || !!globalThis.process?.versions?.bun, D = !!globalThis.Deno, L = !!globalThis.fastly, S = !!globalThis.Netlify, u = !!globalThis.EdgeRuntime, N = globalThis.navigator?.userAgent === "Cloudflare-Workers", F = [
157
+ } });
158
+ const O = globalThis.process?.release?.name === "node", c = !!globalThis.Bun || !!globalThis.process?.versions?.bun, D = !!globalThis.Deno, L = !!globalThis.fastly, S = !!globalThis.Netlify, u = !!globalThis.EdgeRuntime, N = globalThis.navigator?.userAgent === "Cloudflare-Workers", F = [
149
159
  [S, "netlify"],
150
160
  [u, "edge-light"],
151
161
  [N, "workerd"],
@@ -158,26 +168,17 @@ function G() {
158
168
  const e = F.find((s) => s[0]);
159
169
  if (e) return { name: e[1] };
160
170
  }
161
- const P = G(), K = P?.name || "";
162
-
171
+ G()?.name;
163
172
  //#endregion
164
173
  //#region ../test/dist/chunks/env.D4Lgay0q.js
165
174
  const isNode = typeof process < "u" && typeof process.stdout < "u" && !process.versions?.deno && !globalThis.window;
166
175
  const isDeno = typeof process < "u" && typeof process.stdout < "u" && process.versions?.deno !== void 0;
167
- const isWindows = (isNode || isDeno) && process.platform === "win32";
168
- const isTTY = (isNode || isDeno) && process.stdout?.isTTY && !T;
169
-
176
+ (isNode || isDeno) && process.platform;
177
+ (isNode || isDeno) && process.stdout?.isTTY;
170
178
  //#endregion
171
179
  //#region ../test/dist/chunks/defaults.BOqNVLsY.js
172
180
  const defaultInclude = ["**/*.{test,spec}.?(c|m)[jt]s?(x)"];
173
181
  const defaultExclude = ["**/node_modules/**", "**/.git/**"];
174
- const benchmarkConfigDefaults = {
175
- include: ["**/*.{bench,benchmark}.?(c|m)[jt]s?(x)"],
176
- exclude: defaultExclude,
177
- includeSource: [],
178
- reporters: ["default"],
179
- includeSamples: false
180
- };
181
182
  const coverageConfigDefaults = {
182
183
  provider: "v8",
183
184
  enabled: false,
@@ -196,11 +197,7 @@ const coverageConfigDefaults = {
196
197
  excludeAfterRemap: false,
197
198
  processingConcurrency: Math.min(20, nodeos__default.availableParallelism?.() ?? nodeos__default.cpus().length)
198
199
  };
199
- const fakeTimersDefaults = {
200
- loopLimit: 1e4,
201
- shouldClearNativeTimers: true
202
- };
203
- const configDefaults = Object.freeze({
200
+ Object.freeze({
204
201
  allowOnly: !T,
205
202
  isolate: true,
206
203
  watch: !T && process.stdin.isTTY,
@@ -225,7 +222,10 @@ const configDefaults = Object.freeze({
225
222
  open: !T,
226
223
  css: { include: [] },
227
224
  coverage: coverageConfigDefaults,
228
- fakeTimers: fakeTimersDefaults,
225
+ fakeTimers: {
226
+ loopLimit: 1e4,
227
+ shouldClearNativeTimers: true
228
+ },
229
229
  maxConcurrency: 5,
230
230
  dangerouslyIgnoreUnhandledErrors: false,
231
231
  typecheck: {
@@ -236,13 +236,6 @@ const configDefaults = Object.freeze({
236
236
  slowTestThreshold: 300,
237
237
  disableConsoleIntercept: false
238
238
  });
239
-
240
- //#endregion
241
- //#region ../test/dist/chunks/constants.D_Q9UYh-.js
242
- const defaultPort = 51204;
243
- const defaultBrowserPort = 63315;
244
- const defaultInspectPort = 9229;
245
- const API_PATH = "/__vitest_api__";
246
239
  const CONFIG_NAMES = ["vitest.config", "vite.config"];
247
240
  const CONFIG_EXTENSIONS = [
248
241
  ".ts",
@@ -252,80 +245,5 @@ const CONFIG_EXTENSIONS = [
252
245
  ".mjs",
253
246
  ".cjs"
254
247
  ];
255
- const configFiles = CONFIG_NAMES.flatMap((name) => CONFIG_EXTENSIONS.map((ext) => name + ext));
256
- const globalApis = [
257
- "suite",
258
- "test",
259
- "describe",
260
- "it",
261
- "chai",
262
- "expect",
263
- "assert",
264
- "expectTypeOf",
265
- "assertType",
266
- "vitest",
267
- "vi",
268
- "beforeAll",
269
- "afterAll",
270
- "beforeEach",
271
- "afterEach",
272
- "onTestFinished",
273
- "onTestFailed"
274
- ];
275
-
248
+ CONFIG_NAMES.flatMap((name) => CONFIG_EXTENSIONS.map((ext) => name + ext));
276
249
  //#endregion
277
- //#region ../test/dist/config.js
278
- function defineConfig$1(config) {
279
- return config;
280
- }
281
- function defineProject(config) {
282
- return config;
283
- }
284
-
285
- //#endregion
286
- //#region src/define-config.ts
287
- function defineConfig(config) {
288
- if (typeof config === "object") {
289
- if (config instanceof Promise) {
290
- return config.then((config) => {
291
- if (config.lazy) {
292
- return config.lazy().then(({ plugins }) => defineConfig$1({
293
- ...config,
294
- plugins: [...config.plugins || [], ...plugins || []]
295
- }));
296
- }
297
- return defineConfig$1(config);
298
- });
299
- } else if (config.lazy) {
300
- return config.lazy().then(({ plugins }) => defineConfig$1({
301
- ...config,
302
- plugins: [...config.plugins || [], ...plugins || []]
303
- }));
304
- }
305
- } else if (typeof config === "function") {
306
- return defineConfig$1((env) => {
307
- const c = config(env);
308
- if (c instanceof Promise) {
309
- return c.then((v) => {
310
- if (v.lazy) {
311
- return v.lazy().then(({ plugins }) => defineConfig$1({
312
- ...v,
313
- plugins: [...v.plugins || [], ...plugins || []]
314
- }));
315
- }
316
- return v;
317
- });
318
- }
319
- if (c.lazy) {
320
- return c.lazy().then(({ plugins }) => ({
321
- ...c,
322
- plugins: [...c.plugins || [], ...plugins || []]
323
- }));
324
- }
325
- return c;
326
- });
327
- }
328
- return defineConfig$1(config);
329
- }
330
-
331
- //#endregion