vite-plus 0.2.0 → 0.2.2

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 (68) hide show
  1. package/bin/oxfmt +6 -3
  2. package/bin/oxlint +6 -3
  3. package/bin/vpr +9 -0
  4. package/binding/index.cjs +53 -53
  5. package/binding/index.d.cts +86 -144
  6. package/dist/agent-D7O7mSeO.js +9456 -0
  7. package/dist/bin.js +10 -7
  8. package/dist/{cli-truncate-CWsmbK3p.js → cli-truncate-BVOlIIPy.js} +1 -1
  9. package/dist/config/bin.js +2 -2
  10. package/dist/{constants-CrfJQIUX.js → constants-NeTOxrzV.js} +7 -3
  11. package/dist/create/bin.js +22 -60
  12. package/dist/{define-config-2tfJoXr1.d.ts → define-config-BuMs_LKa.d.ts} +64 -9
  13. package/dist/{define-config-DJUehepE.js → define-config-CSgy0zML.js} +43 -18
  14. package/dist/{define-config-BGSjF6Xp.cjs → define-config-CrA3lZhQ.cjs} +61 -22
  15. package/dist/define-config.cjs +2 -1
  16. package/dist/define-config.d.ts +2 -2
  17. package/dist/define-config.js +2 -2
  18. package/dist/{dist-Oxo16Y0q.js → dist-CKz3vcoG.js} +4 -4
  19. package/dist/dist-CtM2JRbM.js +3 -0
  20. package/dist/editor-CPzssglc.js +584 -0
  21. package/dist/index.cjs +1 -1
  22. package/dist/index.d.ts +1 -1
  23. package/dist/index.js +1 -1
  24. package/dist/{json-Dn87fvjk.js → json-DiRs8ceZ.js} +13 -1
  25. package/dist/{log-update-lyIiuflf.js → log-update-DHZRyJ2m.js} +2 -2
  26. package/dist/migration/bin.d.ts +1 -10
  27. package/dist/migration/bin.js +531 -170
  28. package/dist/migration/compat/worker.d.ts +1 -0
  29. package/dist/migration/compat/worker.js +35 -0
  30. package/dist/{oxlint-plugin-config-q8a5PFch.js → oxlint-plugin-config-C2Rqc_WQ.js} +1 -1
  31. package/dist/oxlint-plugin.js +78 -9
  32. package/dist/pack-bin.js +1 -1
  33. package/dist/{package-BHirM1_v.js → package-CU2g7URl.js} +52 -3
  34. package/dist/protocol-D99W10Qi.js +4 -0
  35. package/dist/{report-BHSkWqRR.js → report-BS7ULx7A.js} +2 -0
  36. package/dist/{resolve-vite-config-CmdsfQzS.js → resolve-vite-config-r91rIaPs.js} +14 -10
  37. package/dist/{rolldown-runtime-DnnnRqeS.js → rolldown-runtime-C7HZzL1F.js} +1 -1
  38. package/dist/staged/bin.js +23 -19
  39. package/dist/{tsconfig-CJ_StdFc.js → tsconfig-fvpxgUq2.js} +395 -200
  40. package/dist/version.js +2 -5
  41. package/dist/versions.js +5 -5
  42. package/dist/{wrap-ansi-k7Dn4VtV.js → wrap-ansi-DNjkuBEp.js} +1 -1
  43. package/dist/wrap-ansi-DUi52C6W.js +2 -0
  44. package/docs/_data/team.ts +9 -0
  45. package/docs/config/check.md +35 -0
  46. package/docs/config/index.md +2 -0
  47. package/docs/config/run.md +61 -12
  48. package/docs/guide/automatic-data-tracking.md +145 -0
  49. package/docs/guide/cache.md +14 -35
  50. package/docs/guide/check.md +16 -0
  51. package/docs/guide/ci.md +4 -0
  52. package/docs/guide/docker.md +175 -0
  53. package/docs/guide/env.md +12 -0
  54. package/docs/guide/github-actions-cache.md +165 -0
  55. package/docs/guide/install.md +12 -2
  56. package/docs/guide/migrate-rules.md +347 -0
  57. package/docs/guide/migrate.md +14 -0
  58. package/docs/guide/pack.md +8 -0
  59. package/docs/guide/run.md +33 -3
  60. package/docs/guide/troubleshooting.md +1 -1
  61. package/docs/guide/upgrade.md +43 -21
  62. package/docs/package.json +1 -1
  63. package/package.json +21 -20
  64. package/dist/agent-BD31CsvU.js +0 -3341
  65. package/dist/compat-Cql3K40m.js +0 -14
  66. package/dist/dist-DRJUd9bL.js +0 -3
  67. package/dist/workspace-Cjoc1c_A.js +0 -5830
  68. package/dist/wrap-ansi-CeQuiQ31.js +0 -2
@@ -1332,6 +1332,18 @@ function detectNewline(string) {
1332
1332
  }
1333
1333
  //#endregion
1334
1334
  //#region src/utils/json.ts
1335
+ /**
1336
+ * Derive `jsonc-parser` formatting options from existing file text so inserted
1337
+ * fragments match the file's indentation and newline style.
1338
+ */
1339
+ function detectFormattingOptions(text) {
1340
+ const detected = detectIndent(text);
1341
+ return {
1342
+ insertSpaces: detected.type !== "tab",
1343
+ tabSize: detected.amount || 2,
1344
+ eol: detectNewline(text) ?? "\n"
1345
+ };
1346
+ }
1335
1347
  function readJsonFile(file, allowComments) {
1336
1348
  const content = fs.readFileSync(file, "utf-8");
1337
1349
  return (allowComments ? parse : JSON.parse)(content);
@@ -1359,4 +1371,4 @@ function isJsonFile(file) {
1359
1371
  }
1360
1372
  }
1361
1373
  //#endregion
1362
- export { applyEdits as a, writeJsonFile as i, isJsonFile as n, modify as o, readJsonFile as r, parse as s, editJsonFile as t };
1374
+ export { writeJsonFile as a, parse as c, readJsonFile as i, editJsonFile as n, applyEdits as o, isJsonFile as r, modify as s, detectFormattingOptions as t };
@@ -1,6 +1,6 @@
1
1
  import { a as ansiStyles, t as stripAnsi } from "./strip-ansi-C3wrWz9t.js";
2
2
  import { t as isFullwidthCodePoint } from "./is-fullwidth-code-point-BUNlIICg.js";
3
- import { t as wrapAnsi } from "./wrap-ansi-k7Dn4VtV.js";
3
+ import { t as wrapAnsi } from "./wrap-ansi-DNjkuBEp.js";
4
4
  import process$1 from "node:process";
5
5
  import os from "node:os";
6
6
  //#region ../../node_modules/.pnpm/environment@1.1.0/node_modules/environment/index.js
@@ -338,7 +338,7 @@ cliCursor.toggle = (force, writableStream) => {
338
338
  };
339
339
  //#endregion
340
340
  //#region ../../node_modules/.pnpm/slice-ansi@7.1.2/node_modules/slice-ansi/index.js
341
- const ESCAPES = new Set([27, 155]);
341
+ const ESCAPES = /* @__PURE__ */ new Set([27, 155]);
342
342
  const CODE_POINT_0 = "0".codePointAt(0);
343
343
  const CODE_POINT_9 = "9".codePointAt(0);
344
344
  const MAX_ANSI_SEQUENCE_LENGTH = 19;
@@ -1,10 +1 @@
1
- //#region src/migration/bin.d.ts
2
- interface MigrationOptions {
3
- interactive: boolean;
4
- help?: boolean;
5
- agent?: string | string[] | false;
6
- editor?: string | false;
7
- hooks?: boolean;
8
- }
9
- //#endregion
10
- export { MigrationOptions };
1
+ export { };