vite-plus 0.1.2 → 0.1.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 (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-BE4Xze8Q.js} +380 -1280
  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 +353 -496
  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 +223 -83
  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 +654 -1521
  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-lRm8huz4.js} +1625 -2816
  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 +32 -3
  34. package/dist/utils/prompts.js +32 -8
  35. package/dist/utils/tsconfig.d.ts +6 -0
  36. package/dist/utils/tsconfig.js +16 -0
  37. package/package.json +13 -13
  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,3 +1,2 @@
1
- import { A as isSeq, C as isAlias, D as isNode, E as isMap, O as isPair, S as visitAsync, T as isDocument, _ as YAMLMap, a as stringify, b as Alias, c as Lexer, d as YAMLError, f as YAMLParseError, g as YAMLSeq, h as Schema, i as parseDocument, k as isScalar, l as cst_exports, m as Document, n as parse, o as Parser, p as YAMLWarning, r as parseAllDocuments, s as LineCounter, t as browser_default, u as Composer, v as Pair, w as isCollection, x as visit, y as Scalar } from "./browser-CY4NBwxR.js";
2
-
3
- export { Alias, cst_exports as CST, Composer, Document, Lexer, LineCounter, Pair, Parser, Scalar, Schema, YAMLError, YAMLMap, YAMLParseError, YAMLSeq, YAMLWarning, browser_default as default, isAlias, isCollection, isDocument, isMap, isNode, isPair, isScalar, isSeq, parse, parseAllDocuments, parseDocument, stringify, visit, visitAsync };
1
+ import { A as isSeq, C as isAlias, D as isNode, E as isMap, O as isPair, S as visitAsync, T as isDocument, _ as YAMLMap, a as stringify, b as Alias, c as Lexer, d as YAMLError, f as YAMLParseError, g as YAMLSeq, h as Schema, i as parseDocument, k as isScalar, l as cst_exports, m as Document, n as parse, o as Parser, p as YAMLWarning, r as parseAllDocuments, s as LineCounter, t as browser_default, u as Composer, v as Pair, w as isCollection, x as visit, y as Scalar } from "./browser-CBapUTD0.js";
2
+ export { Alias, cst_exports as CST, Composer, Document, Lexer, LineCounter, Pair, Parser, Scalar, Schema, YAMLError, YAMLMap, YAMLParseError, YAMLSeq, YAMLWarning, browser_default as default, isAlias, isCollection, isDocument, isMap, isNode, isPair, isScalar, isSeq, parse, parseAllDocuments, parseDocument, stringify, visit, visitAsync };
@@ -1,4 +1,4 @@
1
- import { createRequire as __createRequire } from 'node:module';
1
+ import { createRequire as __createRequire } from "node:module";
2
2
  const require = __createRequire(import.meta.url);
3
3
  //#region \0rolldown/runtime.js
4
4
  var __create = Object.create;
@@ -10,28 +10,20 @@ var __hasOwnProp = Object.prototype.hasOwnProperty;
10
10
  var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
11
11
  var __exportAll = (all, no_symbols) => {
12
12
  let target = {};
13
- for (var name in all) {
14
- __defProp(target, name, {
15
- get: all[name],
16
- enumerable: true
17
- });
18
- }
19
- if (!no_symbols) {
20
- __defProp(target, Symbol.toStringTag, { value: "Module" });
21
- }
13
+ for (var name in all) __defProp(target, name, {
14
+ get: all[name],
15
+ enumerable: true
16
+ });
17
+ if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
22
18
  return target;
23
19
  };
24
20
  var __copyProps = (to, from, except, desc) => {
25
- if (from && typeof from === "object" || typeof from === "function") {
26
- for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
27
- key = keys[i];
28
- if (!__hasOwnProp.call(to, key) && key !== except) {
29
- __defProp(to, key, {
30
- get: ((k) => from[k]).bind(null, key),
31
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
32
- });
33
- }
34
- }
21
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
22
+ key = keys[i];
23
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
24
+ get: ((k) => from[k]).bind(null, key),
25
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
26
+ });
35
27
  }
36
28
  return to;
37
29
  };
@@ -43,6 +35,5 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
43
35
  if (typeof require !== "undefined") return require.apply(this, arguments);
44
36
  throw Error("Calling `require` for \"" + x + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
45
37
  });
46
-
47
38
  //#endregion
48
- export { __toESM as i, __exportAll as n, __require as r, __commonJSMin as t };
39
+ export { __toESM as i, __exportAll as n, __require as r, __commonJSMin as t };
@@ -1,6 +1,5 @@
1
- import { n as eastAsianWidth, t as stripAnsi } from "./strip-ansi-BL-dgd7n.js";
2
- import { t as sliceAnsi } from "./slice-ansi-BhwAwMdF.js";
3
-
1
+ import { n as eastAsianWidth, t as stripAnsi } from "./strip-ansi-CE-VDMdw.js";
2
+ import { t as sliceAnsi } from "./slice-ansi-Fap0ehe9.js";
4
3
  //#region ../../node_modules/.pnpm/string-width@8.1.0/node_modules/string-width/index.js
5
4
  /**
6
5
  Logic:
@@ -23,32 +22,20 @@ function isZeroWidthCluster(segment) {
23
22
  function trailingHalfwidthWidth(segment, eastAsianWidthOptions) {
24
23
  let extra = 0;
25
24
  if (segment.length > 1) {
26
- for (const char of segment.slice(1)) {
27
- if (char >= "＀" && char <= "￯") {
28
- extra += eastAsianWidth(char.codePointAt(0), eastAsianWidthOptions);
29
- }
30
- }
25
+ for (const char of segment.slice(1)) if (char >= "＀" && char <= "￯") extra += eastAsianWidth(char.codePointAt(0), eastAsianWidthOptions);
31
26
  }
32
27
  return extra;
33
28
  }
34
29
  function stringWidth(input, options = {}) {
35
- if (typeof input !== "string" || input.length === 0) {
36
- return 0;
37
- }
30
+ if (typeof input !== "string" || input.length === 0) return 0;
38
31
  const { ambiguousIsNarrow = true, countAnsiEscapeCodes = false } = options;
39
32
  let string = input;
40
- if (!countAnsiEscapeCodes) {
41
- string = stripAnsi(string);
42
- }
43
- if (string.length === 0) {
44
- return 0;
45
- }
33
+ if (!countAnsiEscapeCodes) string = stripAnsi(string);
34
+ if (string.length === 0) return 0;
46
35
  let width = 0;
47
36
  const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
48
37
  for (const { segment } of segmenter.segment(string)) {
49
- if (isZeroWidthCluster(segment)) {
50
- continue;
51
- }
38
+ if (isZeroWidthCluster(segment)) continue;
52
39
  if (rgiEmojiRegex.test(segment)) {
53
40
  width += 2;
54
41
  continue;
@@ -59,41 +46,26 @@ function stringWidth(input, options = {}) {
59
46
  }
60
47
  return width;
61
48
  }
62
-
63
49
  //#endregion
64
50
  //#region ../../node_modules/.pnpm/cli-truncate@5.1.1/node_modules/cli-truncate/index.js
65
51
  function getIndexOfNearestSpace(string, wantedIndex, shouldSearchRight) {
66
- if (string.charAt(wantedIndex) === " ") {
67
- return wantedIndex;
68
- }
52
+ if (string.charAt(wantedIndex) === " ") return wantedIndex;
69
53
  const direction = shouldSearchRight ? 1 : -1;
70
54
  for (let index = 0; index <= 3; index++) {
71
55
  const finalIndex = wantedIndex + index * direction;
72
- if (string.charAt(finalIndex) === " ") {
73
- return finalIndex;
74
- }
56
+ if (string.charAt(finalIndex) === " ") return finalIndex;
75
57
  }
76
58
  return wantedIndex;
77
59
  }
78
60
  function cliTruncate(text, columns, options = {}) {
79
61
  const { position = "end", space = false, preferTruncationOnSpace = false } = options;
80
62
  let { truncationCharacter = "…" } = options;
81
- if (typeof text !== "string") {
82
- throw new TypeError(`Expected \`input\` to be a string, got ${typeof text}`);
83
- }
84
- if (typeof columns !== "number") {
85
- throw new TypeError(`Expected \`columns\` to be a number, got ${typeof columns}`);
86
- }
87
- if (columns < 1) {
88
- return "";
89
- }
63
+ if (typeof text !== "string") throw new TypeError(`Expected \`input\` to be a string, got ${typeof text}`);
64
+ if (typeof columns !== "number") throw new TypeError(`Expected \`columns\` to be a number, got ${typeof columns}`);
65
+ if (columns < 1) return "";
90
66
  const length = stringWidth(text);
91
- if (length <= columns) {
92
- return text;
93
- }
94
- if (columns === 1) {
95
- return truncationCharacter;
96
- }
67
+ if (length <= columns) return text;
68
+ if (columns === 1) return truncationCharacter;
97
69
  const ANSI = {
98
70
  ESC: 27,
99
71
  LEFT_BRACKET: 91,
@@ -104,9 +76,7 @@ function cliTruncate(text, columns, options = {}) {
104
76
  let index = 0;
105
77
  while (index + 2 < string.length && string.codePointAt(index) === ANSI.ESC && string.codePointAt(index + 1) === ANSI.LEFT_BRACKET) {
106
78
  let j = index + 2;
107
- while (j < string.length && isSgrParameter(string.codePointAt(j))) {
108
- j++;
109
- }
79
+ while (j < string.length && isSgrParameter(string.codePointAt(j))) j++;
110
80
  if (j < string.length && string.codePointAt(j) === ANSI.LETTER_M) {
111
81
  index = j + 1;
112
82
  continue;
@@ -119,9 +89,7 @@ function cliTruncate(text, columns, options = {}) {
119
89
  let start = string.length;
120
90
  while (start > 1 && string.codePointAt(start - 1) === ANSI.LETTER_M) {
121
91
  let j = start - 2;
122
- while (j >= 0 && isSgrParameter(string.codePointAt(j))) {
123
- j--;
124
- }
92
+ while (j >= 0 && isSgrParameter(string.codePointAt(j))) j--;
125
93
  if (j >= 1 && string.codePointAt(j - 1) === ANSI.ESC && string.codePointAt(j) === ANSI.LEFT_BRACKET) {
126
94
  start = j - 1;
127
95
  continue;
@@ -132,34 +100,25 @@ function cliTruncate(text, columns, options = {}) {
132
100
  }
133
101
  function appendWithInheritedStyleFromEnd(visible, suffix) {
134
102
  const start = trailingSgrSpanStartIndex(visible);
135
- if (start === visible.length) {
136
- return visible + suffix;
137
- }
103
+ if (start === visible.length) return visible + suffix;
138
104
  return visible.slice(0, start) + suffix + visible.slice(start);
139
105
  }
140
106
  function prependWithInheritedStyleFromStart(prefix, visible) {
141
107
  const end = leadingSgrSpanEndIndex(visible);
142
- if (end === 0) {
143
- return prefix + visible;
144
- }
108
+ if (end === 0) return prefix + visible;
145
109
  return visible.slice(0, end) + prefix + visible.slice(end);
146
110
  }
147
111
  if (position === "start") {
148
112
  if (preferTruncationOnSpace) {
149
- const nearestSpace = getIndexOfNearestSpace(text, length - columns + 1, true);
150
- const right = sliceAnsi(text, nearestSpace, length).trim();
113
+ const right = sliceAnsi(text, getIndexOfNearestSpace(text, length - columns + 1, true), length).trim();
151
114
  return prependWithInheritedStyleFromStart(truncationCharacter, right);
152
115
  }
153
- if (space) {
154
- truncationCharacter += " ";
155
- }
116
+ if (space) truncationCharacter += " ";
156
117
  const right = sliceAnsi(text, length - columns + stringWidth(truncationCharacter), length);
157
118
  return prependWithInheritedStyleFromStart(truncationCharacter, right);
158
119
  }
159
120
  if (position === "middle") {
160
- if (space) {
161
- truncationCharacter = ` ${truncationCharacter} `;
162
- }
121
+ if (space) truncationCharacter = ` ${truncationCharacter} `;
163
122
  const half = Math.floor(columns / 2);
164
123
  if (preferTruncationOnSpace) {
165
124
  const spaceNearFirstBreakPoint = getIndexOfNearestSpace(text, half);
@@ -169,19 +128,11 @@ function cliTruncate(text, columns, options = {}) {
169
128
  return sliceAnsi(text, 0, half) + truncationCharacter + sliceAnsi(text, length - (columns - half) + stringWidth(truncationCharacter), length);
170
129
  }
171
130
  if (position === "end") {
172
- if (preferTruncationOnSpace) {
173
- const nearestSpace = getIndexOfNearestSpace(text, columns - 1);
174
- const left = sliceAnsi(text, 0, nearestSpace);
175
- return appendWithInheritedStyleFromEnd(left, truncationCharacter);
176
- }
177
- if (space) {
178
- truncationCharacter = ` ${truncationCharacter}`;
179
- }
180
- const left = sliceAnsi(text, 0, columns - stringWidth(truncationCharacter));
181
- return appendWithInheritedStyleFromEnd(left, truncationCharacter);
131
+ if (preferTruncationOnSpace) return appendWithInheritedStyleFromEnd(sliceAnsi(text, 0, getIndexOfNearestSpace(text, columns - 1)), truncationCharacter);
132
+ if (space) truncationCharacter = ` ${truncationCharacter}`;
133
+ return appendWithInheritedStyleFromEnd(sliceAnsi(text, 0, columns - stringWidth(truncationCharacter)), truncationCharacter);
182
134
  }
183
135
  throw new Error(`Expected \`options.position\` to be either \`start\`, \`middle\` or \`end\`, got ${position}`);
184
136
  }
185
-
186
137
  //#endregion
187
- export { cliTruncate as default };
138
+ export { cliTruncate as default };