create-vue 3.3.2 → 3.3.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 (32) hide show
  1. package/LICENSE +58 -0
  2. package/README.md +17 -1
  3. package/outfile.cjs +1067 -219
  4. package/package.json +3 -2
  5. package/template/base/node_modules/.bin/vite +2 -2
  6. package/template/base/package.json +3 -3
  7. package/template/code/default/src/components/HelloWorld.vue +2 -2
  8. package/template/code/default/src/components/TheWelcome.vue +23 -21
  9. package/template/code/router/src/components/HelloWorld.vue +2 -2
  10. package/template/code/router/src/components/TheWelcome.vue +23 -21
  11. package/template/code/router/src/views/HomeView.vue +1 -1
  12. package/template/code/typescript-default/src/components/HelloWorld.vue +2 -2
  13. package/template/code/typescript-default/src/components/TheWelcome.vue +23 -21
  14. package/template/code/typescript-router/src/components/HelloWorld.vue +2 -2
  15. package/template/code/typescript-router/src/components/TheWelcome.vue +23 -21
  16. package/template/code/typescript-router/src/views/HomeView.vue +1 -1
  17. package/template/config/cypress/cypress/support/commands.ts +2 -0
  18. package/template/config/cypress/node_modules/.bin/cypress +2 -2
  19. package/template/config/cypress/package.json +1 -1
  20. package/template/config/cypress-ct/node_modules/.bin/cypress +2 -2
  21. package/template/config/cypress-ct/package.json +2 -2
  22. package/template/config/jsx/node_modules/.bin/vite +2 -2
  23. package/template/config/jsx/package.json +3 -3
  24. package/template/config/pinia/package.json +2 -2
  25. package/template/config/pinia/src/stores/counter.js +8 -12
  26. package/template/config/router/package.json +2 -2
  27. package/template/config/typescript/node_modules/.bin/vue-tsc +2 -2
  28. package/template/config/typescript/package.json +2 -2
  29. package/template/config/vitest/node_modules/.bin/vitest +2 -2
  30. package/template/config/vitest/package.json +2 -2
  31. package/template/eslint/package.json +1 -7
  32. package/template/tsconfig/cypress-ct/package.json +5 -0
package/outfile.cjs CHANGED
@@ -1,14 +1,21 @@
1
1
  #!/usr/bin/env node
2
- /*! create-vue v3.3.2 | MIT */
2
+ /*! create-vue v3.3.3 | MIT */
3
3
  var __create = Object.create;
4
4
  var __defProp = Object.defineProperty;
5
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
7
  var __getProtoOf = Object.getPrototypeOf;
8
8
  var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __esm = (fn, res) => function __init() {
10
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
11
+ };
9
12
  var __commonJS = (cb, mod) => function __require() {
10
13
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
11
14
  };
15
+ var __export = (target, all) => {
16
+ for (var name2 in all)
17
+ __defProp(target, name2, { get: all[name2], enumerable: true });
18
+ };
12
19
  var __copyProps = (to, from, except, desc) => {
13
20
  if (from && typeof from === "object" || typeof from === "function") {
14
21
  for (let key of __getOwnPropNames(from))
@@ -17,7 +24,11 @@ var __copyProps = (to, from, except, desc) => {
17
24
  }
18
25
  return to;
19
26
  };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
27
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
28
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
29
+ mod
30
+ ));
31
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
32
 
22
33
  // node_modules/.pnpm/minimist@1.2.6/node_modules/minimist/index.js
23
34
  var require_minimist = __commonJS({
@@ -175,7 +186,9 @@ var require_minimist = __commonJS({
175
186
  }
176
187
  } else {
177
188
  if (!flags.unknownFn || flags.unknownFn(arg) !== false) {
178
- argv._.push(flags.strings["_"] || !isNumber(arg) ? arg : Number(arg));
189
+ argv._.push(
190
+ flags.strings["_"] || !isNumber(arg) ? arg : Number(arg)
191
+ );
179
192
  }
180
193
  if (opts.stopEarly) {
181
194
  argv._.push.apply(argv._, args.slice(i + 1));
@@ -478,7 +491,7 @@ var require_clear = __commonJS({
478
491
  var require_figures = __commonJS({
479
492
  "node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/figures.js"(exports, module2) {
480
493
  "use strict";
481
- var main = {
494
+ var main2 = {
482
495
  arrowUp: "\u2191",
483
496
  arrowDown: "\u2193",
484
497
  arrowLeft: "\u2190",
@@ -493,10 +506,10 @@ var require_figures = __commonJS({
493
506
  pointer: "\u276F"
494
507
  };
495
508
  var win = {
496
- arrowUp: main.arrowUp,
497
- arrowDown: main.arrowDown,
498
- arrowLeft: main.arrowLeft,
499
- arrowRight: main.arrowRight,
509
+ arrowUp: main2.arrowUp,
510
+ arrowDown: main2.arrowDown,
511
+ arrowLeft: main2.arrowLeft,
512
+ arrowRight: main2.arrowRight,
500
513
  radioOn: "(*)",
501
514
  radioOff: "( )",
502
515
  tick: "\u221A",
@@ -506,7 +519,7 @@ var require_figures = __commonJS({
506
519
  line: "\u2500",
507
520
  pointer: ">"
508
521
  };
509
- var figures = process.platform === "win32" ? win : main;
522
+ var figures = process.platform === "win32" ? win : main2;
510
523
  module2.exports = figures;
511
524
  }
512
525
  });
@@ -523,7 +536,7 @@ var require_style = __commonJS({
523
536
  invisible: { scale: 0, render: (input) => "" },
524
537
  default: { scale: 1, render: (input) => `${input}` }
525
538
  });
526
- var render = (type) => styles[type] || styles.default;
539
+ var render = (type2) => styles[type2] || styles.default;
527
540
  var symbols = Object.freeze({
528
541
  aborted: c.red(figures.cross),
529
542
  done: c.green(figures.tick),
@@ -1548,8 +1561,11 @@ var require_date = __commonJS({
1548
1561
  this.parts.reduce((arr, p, idx) => arr.concat(idx === this.cursor && !this.done ? color.cyan().underline(p.toString()) : p), []).join("")
1549
1562
  ].join(" ");
1550
1563
  if (this.error) {
1551
- this.outputText += this.errorMsg.split("\n").reduce((a, l, i) => a + `
1552
- ${i ? ` ` : figures.pointerSmall} ${color.red().italic(l)}`, ``);
1564
+ this.outputText += this.errorMsg.split("\n").reduce(
1565
+ (a, l, i) => a + `
1566
+ ${i ? ` ` : figures.pointerSmall} ${color.red().italic(l)}`,
1567
+ ``
1568
+ );
1553
1569
  }
1554
1570
  this.out.write(erase.line + cursor.to(0) + this.outputText);
1555
1571
  }
@@ -2182,7 +2198,12 @@ var require_autocomplete = __commonJS({
2182
2198
  this.done && this.suggestions[this.select] ? this.suggestions[this.select].title : this.rendered = this.transform.render(this.input)
2183
2199
  ].join(" ");
2184
2200
  if (!this.done) {
2185
- const suggestions = this.suggestions.slice(startIndex, endIndex).map((item, i) => this.renderOption(item, this.select === i + startIndex, i === 0 && startIndex > 0, i + startIndex === endIndex - 1 && endIndex < this.choices.length)).join("\n");
2201
+ const suggestions = this.suggestions.slice(startIndex, endIndex).map((item, i) => this.renderOption(
2202
+ item,
2203
+ this.select === i + startIndex,
2204
+ i === 0 && startIndex > 0,
2205
+ i + startIndex === endIndex - 1 && endIndex < this.choices.length
2206
+ )).join("\n");
2186
2207
  this.outputText += `
2187
2208
  ` + (suggestions || color.gray(this.fallback.title));
2188
2209
  }
@@ -2458,9 +2479,9 @@ var require_prompts = __commonJS({
2458
2479
  var $ = exports;
2459
2480
  var el = require_elements();
2460
2481
  var noop = (v) => v;
2461
- function toPrompt(type, args, opts = {}) {
2482
+ function toPrompt(type2, args, opts = {}) {
2462
2483
  return new Promise((res, rej) => {
2463
- const p = new el[type](args);
2484
+ const p = new el[type2](args);
2464
2485
  const onAbort = opts.onAbort || noop;
2465
2486
  const onSubmit = opts.onSubmit || noop;
2466
2487
  const onExit = opts.onExit || noop;
@@ -2506,7 +2527,9 @@ var require_prompts = __commonJS({
2506
2527
  onSubmit: toSelected
2507
2528
  });
2508
2529
  };
2509
- var byTitle = (input, choices) => Promise.resolve(choices.filter((item) => item.title.slice(0, input.length).toLowerCase() === input.toLowerCase()));
2530
+ var byTitle = (input, choices) => Promise.resolve(
2531
+ choices.filter((item) => item.title.slice(0, input.length).toLowerCase() === input.toLowerCase())
2532
+ );
2510
2533
  $.autocomplete = (args) => {
2511
2534
  args.suggest = args.suggest || byTitle;
2512
2535
  args.choices = [].concat(args.choices || []);
@@ -2527,7 +2550,7 @@ var require_lib = __commonJS({
2527
2550
  const answers = {};
2528
2551
  const override2 = prompt._override || {};
2529
2552
  questions = [].concat(questions);
2530
- let answer, question, quit, name, type, lastPrompt;
2553
+ let answer, question, quit, name2, type2, lastPrompt;
2531
2554
  const getFormattedAnswer = async (question2, answer2, skipValidation = false) => {
2532
2555
  if (!skipValidation && question2.validate && question2.validate(answer2) !== true) {
2533
2556
  return;
@@ -2535,12 +2558,12 @@ var require_lib = __commonJS({
2535
2558
  return question2.format ? await question2.format(answer2, answers) : answer2;
2536
2559
  };
2537
2560
  for (question of questions) {
2538
- ({ name, type } = question);
2539
- if (typeof type === "function") {
2540
- type = await type(answer, { ...answers }, question);
2541
- question["type"] = type;
2561
+ ({ name: name2, type: type2 } = question);
2562
+ if (typeof type2 === "function") {
2563
+ type2 = await type2(answer, { ...answers }, question);
2564
+ question["type"] = type2;
2542
2565
  }
2543
- if (!type)
2566
+ if (!type2)
2544
2567
  continue;
2545
2568
  for (let key in question) {
2546
2569
  if (passOn.includes(key))
@@ -2552,20 +2575,20 @@ var require_lib = __commonJS({
2552
2575
  if (typeof question.message !== "string") {
2553
2576
  throw new Error("prompt message is required");
2554
2577
  }
2555
- ({ name, type } = question);
2556
- if (prompts2[type] === void 0) {
2557
- throw new Error(`prompt type (${type}) is not defined`);
2578
+ ({ name: name2, type: type2 } = question);
2579
+ if (prompts2[type2] === void 0) {
2580
+ throw new Error(`prompt type (${type2}) is not defined`);
2558
2581
  }
2559
2582
  if (override2[question.name] !== void 0) {
2560
2583
  answer = await getFormattedAnswer(question, override2[question.name]);
2561
2584
  if (answer !== void 0) {
2562
- answers[name] = answer;
2585
+ answers[name2] = answer;
2563
2586
  continue;
2564
2587
  }
2565
2588
  }
2566
2589
  try {
2567
- answer = prompt._injected ? getInjectedAnswer(prompt._injected, question.initial) : await prompts2[type](question);
2568
- answers[name] = answer = await getFormattedAnswer(question, answer, true);
2590
+ answer = prompt._injected ? getInjectedAnswer(prompt._injected, question.initial) : await prompts2[type2](question);
2591
+ answers[name2] = answer = await getFormattedAnswer(question, answer, true);
2569
2592
  quit = await onSubmit(question, answer, answers);
2570
2593
  } catch (err) {
2571
2594
  quit = !await onCancel(question, answers);
@@ -2592,6 +2615,710 @@ var require_lib = __commonJS({
2592
2615
  }
2593
2616
  });
2594
2617
 
2618
+ // node_modules/.pnpm/javascript-stringify@2.1.0/node_modules/javascript-stringify/dist/quote.js
2619
+ var require_quote = __commonJS({
2620
+ "node_modules/.pnpm/javascript-stringify@2.1.0/node_modules/javascript-stringify/dist/quote.js"(exports) {
2621
+ "use strict";
2622
+ Object.defineProperty(exports, "__esModule", { value: true });
2623
+ exports.stringifyPath = exports.quoteKey = exports.isValidVariableName = exports.IS_VALID_IDENTIFIER = exports.quoteString = void 0;
2624
+ var ESCAPABLE = /[\\\'\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
2625
+ var META_CHARS = /* @__PURE__ */ new Map([
2626
+ ["\b", "\\b"],
2627
+ [" ", "\\t"],
2628
+ ["\n", "\\n"],
2629
+ ["\f", "\\f"],
2630
+ ["\r", "\\r"],
2631
+ ["'", "\\'"],
2632
+ ['"', '\\"'],
2633
+ ["\\", "\\\\"]
2634
+ ]);
2635
+ function escapeChar(char) {
2636
+ return META_CHARS.get(char) || `\\u${`0000${char.charCodeAt(0).toString(16)}`.slice(-4)}`;
2637
+ }
2638
+ function quoteString(str) {
2639
+ return `'${str.replace(ESCAPABLE, escapeChar)}'`;
2640
+ }
2641
+ exports.quoteString = quoteString;
2642
+ var RESERVED_WORDS = new Set("break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield".split(" "));
2643
+ exports.IS_VALID_IDENTIFIER = /^[A-Za-z_$][A-Za-z0-9_$]*$/;
2644
+ function isValidVariableName(name2) {
2645
+ return typeof name2 === "string" && !RESERVED_WORDS.has(name2) && exports.IS_VALID_IDENTIFIER.test(name2);
2646
+ }
2647
+ exports.isValidVariableName = isValidVariableName;
2648
+ function quoteKey(key, next) {
2649
+ return isValidVariableName(key) ? key : next(key);
2650
+ }
2651
+ exports.quoteKey = quoteKey;
2652
+ function stringifyPath(path5, next) {
2653
+ let result = "";
2654
+ for (const key of path5) {
2655
+ if (isValidVariableName(key)) {
2656
+ result += `.${key}`;
2657
+ } else {
2658
+ result += `[${next(key)}]`;
2659
+ }
2660
+ }
2661
+ return result;
2662
+ }
2663
+ exports.stringifyPath = stringifyPath;
2664
+ }
2665
+ });
2666
+
2667
+ // node_modules/.pnpm/javascript-stringify@2.1.0/node_modules/javascript-stringify/dist/function.js
2668
+ var require_function = __commonJS({
2669
+ "node_modules/.pnpm/javascript-stringify@2.1.0/node_modules/javascript-stringify/dist/function.js"(exports) {
2670
+ "use strict";
2671
+ Object.defineProperty(exports, "__esModule", { value: true });
2672
+ exports.FunctionParser = exports.dedentFunction = exports.functionToString = exports.USED_METHOD_KEY = void 0;
2673
+ var quote_1 = require_quote();
2674
+ var METHOD_NAMES_ARE_QUOTED = {
2675
+ " "() {
2676
+ }
2677
+ }[" "].toString().charAt(0) === '"';
2678
+ var FUNCTION_PREFIXES = {
2679
+ Function: "function ",
2680
+ GeneratorFunction: "function* ",
2681
+ AsyncFunction: "async function ",
2682
+ AsyncGeneratorFunction: "async function* "
2683
+ };
2684
+ var METHOD_PREFIXES = {
2685
+ Function: "",
2686
+ GeneratorFunction: "*",
2687
+ AsyncFunction: "async ",
2688
+ AsyncGeneratorFunction: "async *"
2689
+ };
2690
+ var TOKENS_PRECEDING_REGEXPS = new Set("case delete else in instanceof new return throw typeof void , ; : + - ! ~ & | ^ * / % < > ? =".split(" "));
2691
+ exports.USED_METHOD_KEY = /* @__PURE__ */ new WeakSet();
2692
+ var functionToString = (fn, space, next, key) => {
2693
+ const name2 = typeof key === "string" ? key : void 0;
2694
+ if (name2 !== void 0)
2695
+ exports.USED_METHOD_KEY.add(fn);
2696
+ return new FunctionParser(fn, space, next, name2).stringify();
2697
+ };
2698
+ exports.functionToString = functionToString;
2699
+ function dedentFunction(fnString) {
2700
+ let found;
2701
+ for (const line of fnString.split("\n").slice(1)) {
2702
+ const m = /^[\s\t]+/.exec(line);
2703
+ if (!m)
2704
+ return fnString;
2705
+ const [str] = m;
2706
+ if (found === void 0)
2707
+ found = str;
2708
+ else if (str.length < found.length)
2709
+ found = str;
2710
+ }
2711
+ return found ? fnString.split(`
2712
+ ${found}`).join("\n") : fnString;
2713
+ }
2714
+ exports.dedentFunction = dedentFunction;
2715
+ var FunctionParser = class {
2716
+ constructor(fn, indent, next, key) {
2717
+ this.fn = fn;
2718
+ this.indent = indent;
2719
+ this.next = next;
2720
+ this.key = key;
2721
+ this.pos = 0;
2722
+ this.hadKeyword = false;
2723
+ this.fnString = Function.prototype.toString.call(fn);
2724
+ this.fnType = fn.constructor.name;
2725
+ this.keyQuote = key === void 0 ? "" : quote_1.quoteKey(key, next);
2726
+ this.keyPrefix = key === void 0 ? "" : `${this.keyQuote}:${indent ? " " : ""}`;
2727
+ this.isMethodCandidate = key === void 0 ? false : this.fn.name === "" || this.fn.name === key;
2728
+ }
2729
+ stringify() {
2730
+ const value = this.tryParse();
2731
+ if (!value) {
2732
+ return `${this.keyPrefix}void ${this.next(this.fnString)}`;
2733
+ }
2734
+ return dedentFunction(value);
2735
+ }
2736
+ getPrefix() {
2737
+ if (this.isMethodCandidate && !this.hadKeyword) {
2738
+ return METHOD_PREFIXES[this.fnType] + this.keyQuote;
2739
+ }
2740
+ return this.keyPrefix + FUNCTION_PREFIXES[this.fnType];
2741
+ }
2742
+ tryParse() {
2743
+ if (this.fnString[this.fnString.length - 1] !== "}") {
2744
+ return this.keyPrefix + this.fnString;
2745
+ }
2746
+ if (this.fn.name) {
2747
+ const result = this.tryStrippingName();
2748
+ if (result)
2749
+ return result;
2750
+ }
2751
+ const prevPos = this.pos;
2752
+ if (this.consumeSyntax() === "class")
2753
+ return this.fnString;
2754
+ this.pos = prevPos;
2755
+ if (this.tryParsePrefixTokens()) {
2756
+ const result = this.tryStrippingName();
2757
+ if (result)
2758
+ return result;
2759
+ let offset = this.pos;
2760
+ switch (this.consumeSyntax("WORD_LIKE")) {
2761
+ case "WORD_LIKE":
2762
+ if (this.isMethodCandidate && !this.hadKeyword) {
2763
+ offset = this.pos;
2764
+ }
2765
+ case "()":
2766
+ if (this.fnString.substr(this.pos, 2) === "=>") {
2767
+ return this.keyPrefix + this.fnString;
2768
+ }
2769
+ this.pos = offset;
2770
+ case '"':
2771
+ case "'":
2772
+ case "[]":
2773
+ return this.getPrefix() + this.fnString.substr(this.pos);
2774
+ }
2775
+ }
2776
+ }
2777
+ tryStrippingName() {
2778
+ if (METHOD_NAMES_ARE_QUOTED) {
2779
+ return;
2780
+ }
2781
+ let start = this.pos;
2782
+ const prefix = this.fnString.substr(this.pos, this.fn.name.length);
2783
+ if (prefix === this.fn.name) {
2784
+ this.pos += prefix.length;
2785
+ if (this.consumeSyntax() === "()" && this.consumeSyntax() === "{}" && this.pos === this.fnString.length) {
2786
+ if (this.isMethodCandidate || !quote_1.isValidVariableName(prefix)) {
2787
+ start += prefix.length;
2788
+ }
2789
+ return this.getPrefix() + this.fnString.substr(start);
2790
+ }
2791
+ }
2792
+ this.pos = start;
2793
+ }
2794
+ tryParsePrefixTokens() {
2795
+ let posPrev = this.pos;
2796
+ this.hadKeyword = false;
2797
+ switch (this.fnType) {
2798
+ case "AsyncFunction":
2799
+ if (this.consumeSyntax() !== "async")
2800
+ return false;
2801
+ posPrev = this.pos;
2802
+ case "Function":
2803
+ if (this.consumeSyntax() === "function") {
2804
+ this.hadKeyword = true;
2805
+ } else {
2806
+ this.pos = posPrev;
2807
+ }
2808
+ return true;
2809
+ case "AsyncGeneratorFunction":
2810
+ if (this.consumeSyntax() !== "async")
2811
+ return false;
2812
+ case "GeneratorFunction":
2813
+ let token = this.consumeSyntax();
2814
+ if (token === "function") {
2815
+ token = this.consumeSyntax();
2816
+ this.hadKeyword = true;
2817
+ }
2818
+ return token === "*";
2819
+ }
2820
+ }
2821
+ consumeSyntax(wordLikeToken) {
2822
+ const m = this.consumeMatch(/^(?:([A-Za-z_0-9$\xA0-\uFFFF]+)|=>|\+\+|\-\-|.)/);
2823
+ if (!m)
2824
+ return;
2825
+ const [token, match] = m;
2826
+ this.consumeWhitespace();
2827
+ if (match)
2828
+ return wordLikeToken || match;
2829
+ switch (token) {
2830
+ case "(":
2831
+ return this.consumeSyntaxUntil("(", ")");
2832
+ case "[":
2833
+ return this.consumeSyntaxUntil("[", "]");
2834
+ case "{":
2835
+ return this.consumeSyntaxUntil("{", "}");
2836
+ case "`":
2837
+ return this.consumeTemplate();
2838
+ case '"':
2839
+ return this.consumeRegExp(/^(?:[^\\"]|\\.)*"/, '"');
2840
+ case "'":
2841
+ return this.consumeRegExp(/^(?:[^\\']|\\.)*'/, "'");
2842
+ }
2843
+ return token;
2844
+ }
2845
+ consumeSyntaxUntil(startToken, endToken) {
2846
+ let isRegExpAllowed = true;
2847
+ for (; ; ) {
2848
+ const token = this.consumeSyntax();
2849
+ if (token === endToken)
2850
+ return startToken + endToken;
2851
+ if (!token || token === ")" || token === "]" || token === "}")
2852
+ return;
2853
+ if (token === "/" && isRegExpAllowed && this.consumeMatch(/^(?:\\.|[^\\\/\n[]|\[(?:\\.|[^\]])*\])+\/[a-z]*/)) {
2854
+ isRegExpAllowed = false;
2855
+ this.consumeWhitespace();
2856
+ } else {
2857
+ isRegExpAllowed = TOKENS_PRECEDING_REGEXPS.has(token);
2858
+ }
2859
+ }
2860
+ }
2861
+ consumeMatch(re) {
2862
+ const m = re.exec(this.fnString.substr(this.pos));
2863
+ if (m)
2864
+ this.pos += m[0].length;
2865
+ return m;
2866
+ }
2867
+ consumeRegExp(re, token) {
2868
+ const m = re.exec(this.fnString.substr(this.pos));
2869
+ if (!m)
2870
+ return;
2871
+ this.pos += m[0].length;
2872
+ this.consumeWhitespace();
2873
+ return token;
2874
+ }
2875
+ consumeTemplate() {
2876
+ for (; ; ) {
2877
+ this.consumeMatch(/^(?:[^`$\\]|\\.|\$(?!{))*/);
2878
+ if (this.fnString[this.pos] === "`") {
2879
+ this.pos++;
2880
+ this.consumeWhitespace();
2881
+ return "`";
2882
+ }
2883
+ if (this.fnString.substr(this.pos, 2) === "${") {
2884
+ this.pos += 2;
2885
+ this.consumeWhitespace();
2886
+ if (this.consumeSyntaxUntil("{", "}"))
2887
+ continue;
2888
+ }
2889
+ return;
2890
+ }
2891
+ }
2892
+ consumeWhitespace() {
2893
+ this.consumeMatch(/^(?:\s|\/\/.*|\/\*[^]*?\*\/)*/);
2894
+ }
2895
+ };
2896
+ exports.FunctionParser = FunctionParser;
2897
+ }
2898
+ });
2899
+
2900
+ // node_modules/.pnpm/javascript-stringify@2.1.0/node_modules/javascript-stringify/dist/array.js
2901
+ var require_array = __commonJS({
2902
+ "node_modules/.pnpm/javascript-stringify@2.1.0/node_modules/javascript-stringify/dist/array.js"(exports) {
2903
+ "use strict";
2904
+ Object.defineProperty(exports, "__esModule", { value: true });
2905
+ exports.arrayToString = void 0;
2906
+ var arrayToString = (array, space, next) => {
2907
+ const values = array.map(function(value, index) {
2908
+ const result = next(value, index);
2909
+ if (result === void 0)
2910
+ return String(result);
2911
+ return space + result.split("\n").join(`
2912
+ ${space}`);
2913
+ }).join(space ? ",\n" : ",");
2914
+ const eol = space && values ? "\n" : "";
2915
+ return `[${eol}${values}${eol}]`;
2916
+ };
2917
+ exports.arrayToString = arrayToString;
2918
+ }
2919
+ });
2920
+
2921
+ // node_modules/.pnpm/javascript-stringify@2.1.0/node_modules/javascript-stringify/dist/object.js
2922
+ var require_object = __commonJS({
2923
+ "node_modules/.pnpm/javascript-stringify@2.1.0/node_modules/javascript-stringify/dist/object.js"(exports) {
2924
+ "use strict";
2925
+ Object.defineProperty(exports, "__esModule", { value: true });
2926
+ exports.objectToString = void 0;
2927
+ var quote_1 = require_quote();
2928
+ var function_1 = require_function();
2929
+ var array_1 = require_array();
2930
+ var objectToString = (value, space, next, key) => {
2931
+ if (typeof Buffer === "function" && Buffer.isBuffer(value)) {
2932
+ return `Buffer.from(${next(value.toString("base64"))}, 'base64')`;
2933
+ }
2934
+ if (typeof global === "object" && value === global) {
2935
+ return globalToString(value, space, next, key);
2936
+ }
2937
+ const toString = OBJECT_TYPES[Object.prototype.toString.call(value)];
2938
+ return toString ? toString(value, space, next, key) : void 0;
2939
+ };
2940
+ exports.objectToString = objectToString;
2941
+ var rawObjectToString = (obj, indent, next, key) => {
2942
+ const eol = indent ? "\n" : "";
2943
+ const space = indent ? " " : "";
2944
+ const values = Object.keys(obj).reduce(function(values2, key2) {
2945
+ const fn = obj[key2];
2946
+ const result = next(fn, key2);
2947
+ if (result === void 0)
2948
+ return values2;
2949
+ const value = result.split("\n").join(`
2950
+ ${indent}`);
2951
+ if (function_1.USED_METHOD_KEY.has(fn)) {
2952
+ values2.push(`${indent}${value}`);
2953
+ return values2;
2954
+ }
2955
+ values2.push(`${indent}${quote_1.quoteKey(key2, next)}:${space}${value}`);
2956
+ return values2;
2957
+ }, []).join(`,${eol}`);
2958
+ if (values === "")
2959
+ return "{}";
2960
+ return `{${eol}${values}${eol}}`;
2961
+ };
2962
+ var globalToString = (value, space, next) => {
2963
+ return `Function(${next("return this")})()`;
2964
+ };
2965
+ var OBJECT_TYPES = {
2966
+ "[object Array]": array_1.arrayToString,
2967
+ "[object Object]": rawObjectToString,
2968
+ "[object Error]": (error, space, next) => {
2969
+ return `new Error(${next(error.message)})`;
2970
+ },
2971
+ "[object Date]": (date) => {
2972
+ return `new Date(${date.getTime()})`;
2973
+ },
2974
+ "[object String]": (str, space, next) => {
2975
+ return `new String(${next(str.toString())})`;
2976
+ },
2977
+ "[object Number]": (num) => {
2978
+ return `new Number(${num})`;
2979
+ },
2980
+ "[object Boolean]": (bool) => {
2981
+ return `new Boolean(${bool})`;
2982
+ },
2983
+ "[object Set]": (set, space, next) => {
2984
+ return `new Set(${next(Array.from(set))})`;
2985
+ },
2986
+ "[object Map]": (map, space, next) => {
2987
+ return `new Map(${next(Array.from(map))})`;
2988
+ },
2989
+ "[object RegExp]": String,
2990
+ "[object global]": globalToString,
2991
+ "[object Window]": globalToString
2992
+ };
2993
+ }
2994
+ });
2995
+
2996
+ // node_modules/.pnpm/javascript-stringify@2.1.0/node_modules/javascript-stringify/dist/stringify.js
2997
+ var require_stringify = __commonJS({
2998
+ "node_modules/.pnpm/javascript-stringify@2.1.0/node_modules/javascript-stringify/dist/stringify.js"(exports) {
2999
+ "use strict";
3000
+ Object.defineProperty(exports, "__esModule", { value: true });
3001
+ exports.toString = void 0;
3002
+ var quote_1 = require_quote();
3003
+ var object_1 = require_object();
3004
+ var function_1 = require_function();
3005
+ var PRIMITIVE_TYPES = {
3006
+ string: quote_1.quoteString,
3007
+ number: (value) => Object.is(value, -0) ? "-0" : String(value),
3008
+ boolean: String,
3009
+ symbol: (value, space, next) => {
3010
+ const key = Symbol.keyFor(value);
3011
+ if (key !== void 0)
3012
+ return `Symbol.for(${next(key)})`;
3013
+ return `Symbol(${next(value.description)})`;
3014
+ },
3015
+ bigint: (value, space, next) => {
3016
+ return `BigInt(${next(String(value))})`;
3017
+ },
3018
+ undefined: String,
3019
+ object: object_1.objectToString,
3020
+ function: function_1.functionToString
3021
+ };
3022
+ var toString = (value, space, next, key) => {
3023
+ if (value === null)
3024
+ return "null";
3025
+ return PRIMITIVE_TYPES[typeof value](value, space, next, key);
3026
+ };
3027
+ exports.toString = toString;
3028
+ }
3029
+ });
3030
+
3031
+ // node_modules/.pnpm/javascript-stringify@2.1.0/node_modules/javascript-stringify/dist/index.js
3032
+ var require_dist = __commonJS({
3033
+ "node_modules/.pnpm/javascript-stringify@2.1.0/node_modules/javascript-stringify/dist/index.js"(exports) {
3034
+ "use strict";
3035
+ Object.defineProperty(exports, "__esModule", { value: true });
3036
+ exports.stringify = void 0;
3037
+ var stringify_1 = require_stringify();
3038
+ var quote_1 = require_quote();
3039
+ var ROOT_SENTINEL = Symbol("root");
3040
+ function stringify2(value, replacer, indent, options2 = {}) {
3041
+ const space = typeof indent === "string" ? indent : " ".repeat(indent || 0);
3042
+ const path5 = [];
3043
+ const stack = /* @__PURE__ */ new Set();
3044
+ const tracking = /* @__PURE__ */ new Map();
3045
+ const unpack = /* @__PURE__ */ new Map();
3046
+ let valueCount = 0;
3047
+ const { maxDepth = 100, references = false, skipUndefinedProperties = false, maxValues = 1e5 } = options2;
3048
+ const valueToString = replacerToString(replacer);
3049
+ const onNext = (value2, key) => {
3050
+ if (++valueCount > maxValues)
3051
+ return;
3052
+ if (skipUndefinedProperties && value2 === void 0)
3053
+ return;
3054
+ if (path5.length > maxDepth)
3055
+ return;
3056
+ if (key === void 0)
3057
+ return valueToString(value2, space, onNext, key);
3058
+ path5.push(key);
3059
+ const result2 = builder(value2, key === ROOT_SENTINEL ? void 0 : key);
3060
+ path5.pop();
3061
+ return result2;
3062
+ };
3063
+ const builder = references ? (value2, key) => {
3064
+ if (value2 !== null && (typeof value2 === "object" || typeof value2 === "function" || typeof value2 === "symbol")) {
3065
+ if (tracking.has(value2)) {
3066
+ unpack.set(path5.slice(1), tracking.get(value2));
3067
+ return valueToString(void 0, space, onNext, key);
3068
+ }
3069
+ tracking.set(value2, path5.slice(1));
3070
+ }
3071
+ return valueToString(value2, space, onNext, key);
3072
+ } : (value2, key) => {
3073
+ if (stack.has(value2))
3074
+ return;
3075
+ stack.add(value2);
3076
+ const result2 = valueToString(value2, space, onNext, key);
3077
+ stack.delete(value2);
3078
+ return result2;
3079
+ };
3080
+ const result = onNext(value, ROOT_SENTINEL);
3081
+ if (unpack.size) {
3082
+ const sp = space ? " " : "";
3083
+ const eol = space ? "\n" : "";
3084
+ let wrapper = `var x${sp}=${sp}${result};${eol}`;
3085
+ for (const [key, value2] of unpack.entries()) {
3086
+ const keyPath = quote_1.stringifyPath(key, onNext);
3087
+ const valuePath = quote_1.stringifyPath(value2, onNext);
3088
+ wrapper += `x${keyPath}${sp}=${sp}x${valuePath};${eol}`;
3089
+ }
3090
+ return `(function${sp}()${sp}{${eol}${wrapper}return x;${eol}}())`;
3091
+ }
3092
+ return result;
3093
+ }
3094
+ exports.stringify = stringify2;
3095
+ function replacerToString(replacer) {
3096
+ if (!replacer)
3097
+ return stringify_1.toString;
3098
+ return (value, space, next, key) => {
3099
+ return replacer(value, space, (value2) => stringify_1.toString(value2, space, next, key), key);
3100
+ };
3101
+ }
3102
+ }
3103
+ });
3104
+
3105
+ // node_modules/.pnpm/@vue+create-eslint-config@0.1.2/node_modules/@vue/create-eslint-config/templates/prettierrc-airbnb.json
3106
+ var prettierrc_airbnb_exports = {};
3107
+ __export(prettierrc_airbnb_exports, {
3108
+ $schema: () => $schema,
3109
+ arrowParens: () => arrowParens,
3110
+ bracketSameLine: () => bracketSameLine,
3111
+ bracketSpacing: () => bracketSpacing,
3112
+ default: () => prettierrc_airbnb_default,
3113
+ endOfLine: () => endOfLine,
3114
+ jsxSingleQuote: () => jsxSingleQuote,
3115
+ printWidth: () => printWidth,
3116
+ proseWrap: () => proseWrap,
3117
+ quoteProps: () => quoteProps,
3118
+ semi: () => semi,
3119
+ singleQuote: () => singleQuote,
3120
+ tabWidth: () => tabWidth,
3121
+ trailingComma: () => trailingComma,
3122
+ useTabs: () => useTabs
3123
+ });
3124
+ var $schema, arrowParens, bracketSameLine, bracketSpacing, endOfLine, jsxSingleQuote, printWidth, proseWrap, quoteProps, semi, singleQuote, tabWidth, trailingComma, useTabs, prettierrc_airbnb_default;
3125
+ var init_prettierrc_airbnb = __esm({
3126
+ "node_modules/.pnpm/@vue+create-eslint-config@0.1.2/node_modules/@vue/create-eslint-config/templates/prettierrc-airbnb.json"() {
3127
+ $schema = "https://json.schemastore.org/prettierrc";
3128
+ arrowParens = "always";
3129
+ bracketSameLine = false;
3130
+ bracketSpacing = true;
3131
+ endOfLine = "lf";
3132
+ jsxSingleQuote = false;
3133
+ printWidth = 100;
3134
+ proseWrap = "preserve";
3135
+ quoteProps = "as-needed";
3136
+ semi = true;
3137
+ singleQuote = true;
3138
+ tabWidth = 2;
3139
+ trailingComma = "all";
3140
+ useTabs = false;
3141
+ prettierrc_airbnb_default = {
3142
+ $schema,
3143
+ arrowParens,
3144
+ bracketSameLine,
3145
+ bracketSpacing,
3146
+ endOfLine,
3147
+ jsxSingleQuote,
3148
+ printWidth,
3149
+ proseWrap,
3150
+ quoteProps,
3151
+ semi,
3152
+ singleQuote,
3153
+ tabWidth,
3154
+ trailingComma,
3155
+ useTabs
3156
+ };
3157
+ }
3158
+ });
3159
+
3160
+ // node_modules/.pnpm/@vue+create-eslint-config@0.1.2/node_modules/@vue/create-eslint-config/templates/prettierrc-standard.json
3161
+ var prettierrc_standard_exports = {};
3162
+ __export(prettierrc_standard_exports, {
3163
+ $schema: () => $schema2,
3164
+ arrowParens: () => arrowParens2,
3165
+ bracketSameLine: () => bracketSameLine2,
3166
+ bracketSpacing: () => bracketSpacing2,
3167
+ default: () => prettierrc_standard_default,
3168
+ jsxSingleQuote: () => jsxSingleQuote2,
3169
+ proseWrap: () => proseWrap2,
3170
+ quoteProps: () => quoteProps2,
3171
+ semi: () => semi2,
3172
+ singleQuote: () => singleQuote2,
3173
+ tabWidth: () => tabWidth2,
3174
+ trailingComma: () => trailingComma2,
3175
+ useTabs: () => useTabs2
3176
+ });
3177
+ var $schema2, arrowParens2, bracketSameLine2, bracketSpacing2, jsxSingleQuote2, proseWrap2, quoteProps2, semi2, singleQuote2, tabWidth2, trailingComma2, useTabs2, prettierrc_standard_default;
3178
+ var init_prettierrc_standard = __esm({
3179
+ "node_modules/.pnpm/@vue+create-eslint-config@0.1.2/node_modules/@vue/create-eslint-config/templates/prettierrc-standard.json"() {
3180
+ $schema2 = "https://json.schemastore.org/prettierrc";
3181
+ arrowParens2 = "always";
3182
+ bracketSameLine2 = false;
3183
+ bracketSpacing2 = true;
3184
+ jsxSingleQuote2 = true;
3185
+ proseWrap2 = "preserve";
3186
+ quoteProps2 = "as-needed";
3187
+ semi2 = false;
3188
+ singleQuote2 = true;
3189
+ tabWidth2 = 2;
3190
+ trailingComma2 = "none";
3191
+ useTabs2 = false;
3192
+ prettierrc_standard_default = {
3193
+ $schema: $schema2,
3194
+ arrowParens: arrowParens2,
3195
+ bracketSameLine: bracketSameLine2,
3196
+ bracketSpacing: bracketSpacing2,
3197
+ jsxSingleQuote: jsxSingleQuote2,
3198
+ proseWrap: proseWrap2,
3199
+ quoteProps: quoteProps2,
3200
+ semi: semi2,
3201
+ singleQuote: singleQuote2,
3202
+ tabWidth: tabWidth2,
3203
+ trailingComma: trailingComma2,
3204
+ useTabs: useTabs2
3205
+ };
3206
+ }
3207
+ });
3208
+
3209
+ // node_modules/.pnpm/@vue+create-eslint-config@0.1.2/node_modules/@vue/create-eslint-config/templates/prettierrcs.cjs
3210
+ var require_prettierrcs = __commonJS({
3211
+ "node_modules/.pnpm/@vue+create-eslint-config@0.1.2/node_modules/@vue/create-eslint-config/templates/prettierrcs.cjs"(exports) {
3212
+ exports.airbnb = (init_prettierrc_airbnb(), __toCommonJS(prettierrc_airbnb_exports));
3213
+ exports.standard = (init_prettierrc_standard(), __toCommonJS(prettierrc_standard_exports));
3214
+ }
3215
+ });
3216
+
3217
+ // node_modules/.pnpm/@vue+create-eslint-config@0.1.2/node_modules/@vue/create-eslint-config/package.json
3218
+ var package_exports = {};
3219
+ __export(package_exports, {
3220
+ author: () => author,
3221
+ bin: () => bin,
3222
+ bugs: () => bugs,
3223
+ default: () => package_default,
3224
+ dependencies: () => dependencies,
3225
+ description: () => description,
3226
+ devDependencies: () => devDependencies,
3227
+ engines: () => engines,
3228
+ homepage: () => homepage,
3229
+ keywords: () => keywords,
3230
+ license: () => license,
3231
+ main: () => main,
3232
+ name: () => name,
3233
+ publishConfig: () => publishConfig,
3234
+ repository: () => repository,
3235
+ scripts: () => scripts,
3236
+ type: () => type,
3237
+ version: () => version
3238
+ });
3239
+ var name, version, description, type, main, bin, engines, repository, keywords, author, license, bugs, homepage, publishConfig, dependencies, devDependencies, scripts, package_default;
3240
+ var init_package = __esm({
3241
+ "node_modules/.pnpm/@vue+create-eslint-config@0.1.2/node_modules/@vue/create-eslint-config/package.json"() {
3242
+ name = "@vue/create-eslint-config";
3243
+ version = "0.1.2";
3244
+ description = "Utility to setup ESLint in Vue.js projects.";
3245
+ type = "module";
3246
+ main = "index.js";
3247
+ bin = {
3248
+ "create-eslint-config": "bin/create-eslint-config.js"
3249
+ };
3250
+ engines = {
3251
+ node: "^14.18.0 || >=16.0.0"
3252
+ };
3253
+ repository = {
3254
+ type: "git",
3255
+ url: "git+https://github.com/vuejs/create-eslint-config.git"
3256
+ };
3257
+ keywords = [
3258
+ "vue",
3259
+ "eslint",
3260
+ "config"
3261
+ ];
3262
+ author = "Haoqun Jiang <haoqunjiang+npm@gmail.com>";
3263
+ license = "MIT";
3264
+ bugs = {
3265
+ url: "https://github.com/vuejs/create-eslint-config/issues"
3266
+ };
3267
+ homepage = "https://github.com/vuejs/create-eslint-config#readme";
3268
+ publishConfig = {
3269
+ access: "public"
3270
+ };
3271
+ dependencies = {
3272
+ enquirer: "^2.3.6",
3273
+ "javascript-stringify": "^2.1.0",
3274
+ kolorist: "^1.5.1"
3275
+ };
3276
+ devDependencies = {
3277
+ "@rushstack/eslint-patch": "^1.1.4",
3278
+ "@vue/eslint-config-airbnb": "^7.0.0",
3279
+ "@vue/eslint-config-airbnb-with-typescript": "^7.0.0",
3280
+ "@vue/eslint-config-prettier": "^7.0.0",
3281
+ "@vue/eslint-config-standard": "^8.0.1",
3282
+ "@vue/eslint-config-standard-with-typescript": "^8.0.0",
3283
+ "@vue/eslint-config-typescript": "^11.0.0",
3284
+ eslint: "^8.22.0",
3285
+ "eslint-plugin-vue": "^9.3.0",
3286
+ prettier: "^2.7.1",
3287
+ standard: "^17.0.0",
3288
+ typescript: "~4.7.4"
3289
+ };
3290
+ scripts = {
3291
+ test: 'echo "Error: no test specified" && exit 1'
3292
+ };
3293
+ package_default = {
3294
+ name,
3295
+ version,
3296
+ description,
3297
+ type,
3298
+ main,
3299
+ bin,
3300
+ engines,
3301
+ repository,
3302
+ keywords,
3303
+ author,
3304
+ license,
3305
+ bugs,
3306
+ homepage,
3307
+ publishConfig,
3308
+ dependencies,
3309
+ devDependencies,
3310
+ scripts
3311
+ };
3312
+ }
3313
+ });
3314
+
3315
+ // node_modules/.pnpm/@vue+create-eslint-config@0.1.2/node_modules/@vue/create-eslint-config/versionMap.cjs
3316
+ var require_versionMap = __commonJS({
3317
+ "node_modules/.pnpm/@vue+create-eslint-config@0.1.2/node_modules/@vue/create-eslint-config/versionMap.cjs"(exports, module2) {
3318
+ module2.exports = (init_package(), __toCommonJS(package_exports)).devDependencies;
3319
+ }
3320
+ });
3321
+
2595
3322
  // index.ts
2596
3323
  var fs4 = __toESM(require("fs"), 1);
2597
3324
  var path4 = __toESM(require("path"), 1);
@@ -2710,8 +3437,8 @@ function sortDependencies(packageJson) {
2710
3437
  for (const depType of depTypes) {
2711
3438
  if (packageJson[depType]) {
2712
3439
  sorted[depType] = {};
2713
- Object.keys(packageJson[depType]).sort().forEach((name) => {
2714
- sorted[depType][name] = packageJson[depType][name];
3440
+ Object.keys(packageJson[depType]).sort().forEach((name2) => {
3441
+ sorted[depType][name2] = packageJson[depType][name2];
2715
3442
  });
2716
3443
  }
2717
3444
  }
@@ -2860,7 +3587,10 @@ ${getCommand(packageManager, "test:unit")}
2860
3587
  ### Run Headed Component Tests with [Cypress Component Testing](https://on.cypress.io/component)
2861
3588
 
2862
3589
  \`\`\`sh
2863
- ${getCommand(packageManager, "test:unit")} # or \`${getCommand(packageManager, "test:unit:ci")}\` for headless testing
3590
+ ${getCommand(packageManager, "test:unit")} # or \`${getCommand(
3591
+ packageManager,
3592
+ "test:unit:ci"
3593
+ )}\` for headless testing
2864
3594
  \`\`\`
2865
3595
  `;
2866
3596
  }
@@ -2870,7 +3600,10 @@ ${getCommand(packageManager, "test:unit")} # or \`${getCommand(packageManager, "
2870
3600
 
2871
3601
  \`\`\`sh
2872
3602
  ${getCommand(packageManager, "build")}
2873
- ${getCommand(packageManager, "test:e2e")} # or \`${getCommand(packageManager, "test:e2e:ci")}\` for headless testing
3603
+ ${getCommand(packageManager, "test:e2e")} # or \`${getCommand(
3604
+ packageManager,
3605
+ "test:e2e:ci"
3606
+ )}\` for headless testing
2874
3607
  \`\`\`
2875
3608
  `;
2876
3609
  }
@@ -2891,90 +3624,187 @@ ${getCommand(packageManager, "lint")}
2891
3624
  var fs3 = __toESM(require("fs"), 1);
2892
3625
  var path3 = __toESM(require("path"), 1);
2893
3626
 
2894
- // template/eslint/package.json
2895
- var devDependencies = {
2896
- "@rushstack/eslint-patch": "^1.1.4",
2897
- "@vue/eslint-config-prettier": "^7.0.0",
2898
- "@vue/eslint-config-typescript": "^11.0.0",
2899
- eslint: "^8.21.0",
2900
- "eslint-plugin-cypress": "^2.12.1",
2901
- "eslint-plugin-vue": "^9.3.0",
2902
- prettier: "^2.7.1"
2903
- };
3627
+ // node_modules/.pnpm/@vue+create-eslint-config@0.1.2/node_modules/@vue/create-eslint-config/index.js
3628
+ var import_javascript_stringify = __toESM(require_dist(), 1);
2904
3629
 
2905
- // utils/renderEslint.ts
2906
- var dependencies = {};
2907
- function addEslintDependency(name) {
2908
- dependencies[name] = devDependencies[name];
3630
+ // node_modules/.pnpm/@vue+create-eslint-config@0.1.2/node_modules/@vue/create-eslint-config/templates/editorconfigs.js
3631
+ var editorconfigs_exports = {};
3632
+ __export(editorconfigs_exports, {
3633
+ airbnb: () => airbnb,
3634
+ standard: () => standard
3635
+ });
3636
+ var airbnb = `root = true
3637
+
3638
+ [*.{js,jsx,mjs,cjs,ts,tsx,mts,cts,vue}]
3639
+ charset = utf-8
3640
+ end_of_line = lf
3641
+ indent_size = 2
3642
+ indent_style = space
3643
+ insert_final_newline = true
3644
+ max_line_length = 100
3645
+ trim_trailing_whitespace = true
3646
+ `;
3647
+ var standard = `root = true
3648
+
3649
+ [*.{js,jsx,mjs,cjs,ts,tsx,mts,cts,vue}]
3650
+ charset = utf-8
3651
+ indent_size = 2
3652
+ indent_style = space
3653
+ insert_final_newline = true
3654
+ trim_trailing_whitespace = true
3655
+ `;
3656
+
3657
+ // node_modules/.pnpm/@vue+create-eslint-config@0.1.2/node_modules/@vue/create-eslint-config/index.js
3658
+ var import_prettierrcs = __toESM(require_prettierrcs(), 1);
3659
+ var import_versionMap = __toESM(require_versionMap(), 1);
3660
+ function stringifyJS(value, styleGuide) {
3661
+ const result = (0, import_javascript_stringify.stringify)(value, (val, indent, stringify2, key) => {
3662
+ if (key === "CREATE_ALIAS_SETTING_PLACEHOLDER") {
3663
+ return `(${stringify2(val)})`;
3664
+ }
3665
+ return stringify2(val);
3666
+ }, 2);
3667
+ return result.replace(
3668
+ "CREATE_ALIAS_SETTING_PLACEHOLDER: ",
3669
+ `...require('@vue/eslint-config-${styleGuide}/createAliasSetting')`
3670
+ );
2909
3671
  }
2910
- addEslintDependency("eslint");
2911
- addEslintDependency("eslint-plugin-vue");
2912
- var config = {
2913
- root: true,
2914
- extends: ["plugin:vue/vue3-essential"],
2915
- parserOptions: {
2916
- ecmaVersion: "latest"
3672
+ var isObject2 = (val) => val && typeof val === "object";
3673
+ var mergeArrayWithDedupe2 = (a, b) => Array.from(/* @__PURE__ */ new Set([...a, ...b]));
3674
+ function deepMerge2(target, obj) {
3675
+ for (const key of Object.keys(obj)) {
3676
+ const oldVal = target[key];
3677
+ const newVal = obj[key];
3678
+ if (Array.isArray(oldVal) && Array.isArray(newVal)) {
3679
+ target[key] = mergeArrayWithDedupe2(oldVal, newVal);
3680
+ } else if (isObject2(oldVal) && isObject2(newVal)) {
3681
+ target[key] = deepMerge2(oldVal, newVal);
3682
+ } else {
3683
+ target[key] = newVal;
3684
+ }
2917
3685
  }
2918
- };
2919
- function configureEslint({ language, styleGuide, needsPrettier, needsCypress, needsCypressCT }) {
3686
+ return target;
3687
+ }
3688
+ function createConfig({
3689
+ vueVersion = "3.x",
3690
+ styleGuide = "default",
3691
+ hasTypeScript = false,
3692
+ needsPrettier = false,
3693
+ additionalConfig = {},
3694
+ additionalDependenices = {}
3695
+ }) {
3696
+ const pkg = { devDependencies: {} };
3697
+ const addDependency = (name2) => {
3698
+ pkg.devDependencies[name2] = import_versionMap.default[name2];
3699
+ };
3700
+ addDependency("eslint");
3701
+ addDependency("eslint-plugin-vue");
3702
+ if (styleGuide !== "default" || hasTypeScript || needsPrettier) {
3703
+ addDependency("@rushstack/eslint-patch");
3704
+ }
3705
+ const language = hasTypeScript ? "typescript" : "javascript";
3706
+ const eslintConfig = {
3707
+ root: true,
3708
+ extends: [
3709
+ vueVersion.startsWith("2") ? "plugin:vue/essential" : "plugin:vue/vue3-essential"
3710
+ ]
3711
+ };
3712
+ const addDependencyAndExtend = (name2) => {
3713
+ addDependency(name2);
3714
+ eslintConfig.extends.push(name2);
3715
+ };
2920
3716
  switch (`${styleGuide}-${language}`) {
2921
3717
  case "default-javascript":
2922
- config.extends.push("eslint:recommended");
3718
+ eslintConfig.extends.push("eslint:recommended");
2923
3719
  break;
2924
3720
  case "default-typescript":
2925
- addEslintDependency("@vue/eslint-config-typescript");
2926
- config.extends.push("eslint:recommended");
2927
- config.extends.push("@vue/eslint-config-typescript/recommended");
3721
+ eslintConfig.extends.push("eslint:recommended");
3722
+ addDependencyAndExtend("@vue/eslint-config-typescript");
3723
+ break;
3724
+ case "airbnb-javascript":
3725
+ case "standard-javascript":
3726
+ addDependencyAndExtend(`@vue/eslint-config-${styleGuide}`);
3727
+ break;
3728
+ case "airbnb-typescript":
3729
+ case "standard-typescript":
3730
+ addDependencyAndExtend(`@vue/eslint-config-${styleGuide}-with-typescript`);
2928
3731
  break;
3732
+ default:
3733
+ throw new Error(`unexpected combination of styleGuide and language: ${styleGuide}-${language}`);
2929
3734
  }
2930
3735
  if (needsPrettier) {
2931
- addEslintDependency("prettier");
2932
- addEslintDependency("@vue/eslint-config-prettier");
2933
- config.extends.push("@vue/eslint-config-prettier");
3736
+ addDependency("prettier");
3737
+ addDependencyAndExtend("@vue/eslint-config-prettier");
2934
3738
  }
2935
- if (needsCypress) {
2936
- const cypressOverrides = [
2937
- {
2938
- files: needsCypressCT ? ["**/__tests__/*.{cy,spec}.{js,ts,jsx,tsx}", "cypress/e2e/**.{cy,spec}.{js,ts,jsx,tsx}"] : ["cypress/e2e/**.{cy,spec}.{js,ts,jsx,tsx}"],
2939
- extends: ["plugin:cypress/recommended"]
2940
- }
2941
- ];
2942
- addEslintDependency("eslint-plugin-cypress");
2943
- config.overrides = cypressOverrides;
3739
+ deepMerge2(pkg.devDependencies, additionalDependenices);
3740
+ deepMerge2(eslintConfig, additionalConfig);
3741
+ const files = {
3742
+ ".eslintrc.cjs": ""
3743
+ };
3744
+ if (styleGuide === "default") {
3745
+ files[".eslintrc.cjs"] += "/* eslint-env node */\n";
3746
+ eslintConfig.parserOptions = {
3747
+ ecmaVersion: "latest"
3748
+ };
2944
3749
  }
2945
- let configuration = "/* eslint-env node */\n";
2946
- if (styleGuide !== "default" || language !== "javascript" || needsPrettier) {
2947
- addEslintDependency("@rushstack/eslint-patch");
2948
- configuration += `require("@rushstack/eslint-patch/modern-module-resolution");
2949
-
2950
- `;
3750
+ if (pkg.devDependencies["@rushstack/eslint-patch"]) {
3751
+ files[".eslintrc.cjs"] += "require('@rushstack/eslint-patch/modern-module-resolution')\n\n";
2951
3752
  }
2952
- configuration += `module.exports = ${JSON.stringify(config, void 0, 2)}
3753
+ files[".eslintrc.cjs"] += `module.exports = ${stringifyJS(eslintConfig, styleGuide)}
2953
3754
  `;
3755
+ if (editorconfigs_exports[styleGuide]) {
3756
+ files[".editorconfig"] = editorconfigs_exports[styleGuide];
3757
+ }
3758
+ if (needsPrettier) {
3759
+ files[".prettierrc.json"] = import_prettierrcs.default[styleGuide] || "{}";
3760
+ }
2954
3761
  return {
2955
- dependencies,
2956
- configuration
3762
+ pkg,
3763
+ files
2957
3764
  };
2958
3765
  }
3766
+
3767
+ // template/eslint/package.json
3768
+ var devDependencies2 = {
3769
+ "eslint-plugin-cypress": "^2.12.1"
3770
+ };
3771
+
3772
+ // utils/renderEslint.ts
2959
3773
  function renderEslint(rootDir, { needsTypeScript, needsCypress, needsCypressCT, needsPrettier }) {
2960
- const { dependencies: dependencies2, configuration } = configureEslint({
2961
- language: needsTypeScript ? "typescript" : "javascript",
3774
+ const additionalConfig = {};
3775
+ const additionalDependencies = {};
3776
+ if (needsCypress) {
3777
+ additionalConfig.overrides = [
3778
+ {
3779
+ files: needsCypressCT ? ["**/__tests__/*.{cy,spec}.{js,ts,jsx,tsx}", "cypress/e2e/**.{cy,spec}.{js,ts,jsx,tsx}"] : ["cypress/e2e/**.{cy,spec}.{js,ts,jsx,tsx}"],
3780
+ extends: ["plugin:cypress/recommended"]
3781
+ }
3782
+ ];
3783
+ additionalDependencies["eslint-plugin-cypress"] = devDependencies2["eslint-plugin-cypress"];
3784
+ }
3785
+ const { pkg, files } = createConfig({
3786
+ vueVersion: "3.x",
2962
3787
  styleGuide: "default",
3788
+ hasTypeScript: needsTypeScript,
2963
3789
  needsPrettier,
2964
- needsCypress,
2965
- needsCypressCT
3790
+ additionalConfig,
3791
+ additionalDependencies
2966
3792
  });
2967
3793
  const packageJsonPath = path3.resolve(rootDir, "package.json");
2968
3794
  const existingPkg = JSON.parse(fs3.readFileSync(packageJsonPath, "utf8"));
2969
- const pkg = sortDependencies(deepMerge_default(existingPkg, {
2970
- scripts: {
2971
- lint: needsTypeScript ? "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore" : "eslint . --ext .vue,.js,.jsx,.cjs,.mjs --fix --ignore-path .gitignore"
2972
- },
2973
- devDependencies: dependencies2
2974
- }));
2975
- fs3.writeFileSync(packageJsonPath, JSON.stringify(pkg, null, 2) + "\n");
2976
- const eslintrcPath = path3.resolve(rootDir, ".eslintrc.cjs");
2977
- fs3.writeFileSync(eslintrcPath, configuration);
3795
+ const updatedPkg = sortDependencies(
3796
+ deepMerge_default(deepMerge_default(existingPkg, pkg), {
3797
+ scripts: {
3798
+ lint: needsTypeScript ? "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore" : "eslint . --ext .vue,.js,.jsx,.cjs,.mjs --fix --ignore-path .gitignore"
3799
+ }
3800
+ })
3801
+ );
3802
+ fs3.writeFileSync(packageJsonPath, JSON.stringify(updatedPkg, null, 2) + "\n", "utf-8");
3803
+ for (const [fileName, content] of Object.entries(files)) {
3804
+ const fullPath = path3.resolve(rootDir, fileName);
3805
+ console.log(fullPath, content);
3806
+ fs3.writeFileSync(fullPath, content, "utf-8");
3807
+ }
2978
3808
  }
2979
3809
 
2980
3810
  // utils/banner.ts
@@ -3005,7 +3835,11 @@ function emptyDir(dir) {
3005
3835
  if (!fs4.existsSync(dir)) {
3006
3836
  return;
3007
3837
  }
3008
- postOrderDirectoryTraverse(dir, (dir2) => fs4.rmdirSync(dir2), (file) => fs4.unlinkSync(file));
3838
+ postOrderDirectoryTraverse(
3839
+ dir,
3840
+ (dir2) => fs4.rmdirSync(dir2),
3841
+ (file) => fs4.unlinkSync(file)
3842
+ );
3009
3843
  }
3010
3844
  async function init() {
3011
3845
  console.log(`
@@ -3026,112 +3860,115 @@ ${banner_default}
3026
3860
  const forceOverwrite = argv.force;
3027
3861
  let result = {};
3028
3862
  try {
3029
- result = await (0, import_prompts.default)([
3030
- {
3031
- name: "projectName",
3032
- type: targetDir ? null : "text",
3033
- message: "Project name:",
3034
- initial: defaultProjectName,
3035
- onState: (state) => targetDir = String(state.value).trim() || defaultProjectName
3036
- },
3037
- {
3038
- name: "shouldOverwrite",
3039
- type: () => canSkipEmptying(targetDir) || forceOverwrite ? null : "confirm",
3040
- message: () => {
3041
- const dirForPrompt = targetDir === "." ? "Current directory" : `Target directory "${targetDir}"`;
3042
- return `${dirForPrompt} is not empty. Remove existing files and continue?`;
3043
- }
3044
- },
3045
- {
3046
- name: "overwriteChecker",
3047
- type: (prev, values) => {
3048
- if (values.shouldOverwrite === false) {
3049
- throw new Error(red("\u2716") + " Operation cancelled");
3863
+ result = await (0, import_prompts.default)(
3864
+ [
3865
+ {
3866
+ name: "projectName",
3867
+ type: targetDir ? null : "text",
3868
+ message: "Project name:",
3869
+ initial: defaultProjectName,
3870
+ onState: (state) => targetDir = String(state.value).trim() || defaultProjectName
3871
+ },
3872
+ {
3873
+ name: "shouldOverwrite",
3874
+ type: () => canSkipEmptying(targetDir) || forceOverwrite ? null : "confirm",
3875
+ message: () => {
3876
+ const dirForPrompt = targetDir === "." ? "Current directory" : `Target directory "${targetDir}"`;
3877
+ return `${dirForPrompt} is not empty. Remove existing files and continue?`;
3050
3878
  }
3051
- return null;
3052
- }
3053
- },
3054
- {
3055
- name: "packageName",
3056
- type: () => isValidPackageName(targetDir) ? null : "text",
3057
- message: "Package name:",
3058
- initial: () => toValidPackageName(targetDir),
3059
- validate: (dir) => isValidPackageName(dir) || "Invalid package.json name"
3060
- },
3061
- {
3062
- name: "needsTypeScript",
3063
- type: () => isFeatureFlagsUsed ? null : "toggle",
3064
- message: "Add TypeScript?",
3065
- initial: false,
3066
- active: "Yes",
3067
- inactive: "No"
3068
- },
3069
- {
3070
- name: "needsJsx",
3071
- type: () => isFeatureFlagsUsed ? null : "toggle",
3072
- message: "Add JSX Support?",
3073
- initial: false,
3074
- active: "Yes",
3075
- inactive: "No"
3076
- },
3077
- {
3078
- name: "needsRouter",
3079
- type: () => isFeatureFlagsUsed ? null : "toggle",
3080
- message: "Add Vue Router for Single Page Application development?",
3081
- initial: false,
3082
- active: "Yes",
3083
- inactive: "No"
3084
- },
3085
- {
3086
- name: "needsPinia",
3087
- type: () => isFeatureFlagsUsed ? null : "toggle",
3088
- message: "Add Pinia for state management?",
3089
- initial: false,
3090
- active: "Yes",
3091
- inactive: "No"
3092
- },
3093
- {
3094
- name: "needsVitest",
3095
- type: () => isFeatureFlagsUsed ? null : "toggle",
3096
- message: "Add Vitest for Unit Testing?",
3097
- initial: false,
3098
- active: "Yes",
3099
- inactive: "No"
3100
- },
3101
- {
3102
- name: "needsCypress",
3103
- type: () => isFeatureFlagsUsed ? null : "toggle",
3104
- message: (prev, answers) => answers.needsVitest ? "Add Cypress for End-to-End testing?" : "Add Cypress for both Unit and End-to-End testing?",
3105
- initial: false,
3106
- active: "Yes",
3107
- inactive: "No"
3108
- },
3109
- {
3110
- name: "needsEslint",
3111
- type: () => isFeatureFlagsUsed ? null : "toggle",
3112
- message: "Add ESLint for code quality?",
3113
- initial: false,
3114
- active: "Yes",
3115
- inactive: "No"
3116
- },
3117
- {
3118
- name: "needsPrettier",
3119
- type: (prev, values) => {
3120
- if (isFeatureFlagsUsed || !values.needsEslint) {
3879
+ },
3880
+ {
3881
+ name: "overwriteChecker",
3882
+ type: (prev, values) => {
3883
+ if (values.shouldOverwrite === false) {
3884
+ throw new Error(red("\u2716") + " Operation cancelled");
3885
+ }
3121
3886
  return null;
3122
3887
  }
3123
- return "toggle";
3124
3888
  },
3125
- message: "Add Prettier for code formatting?",
3126
- initial: false,
3127
- active: "Yes",
3128
- inactive: "No"
3129
- }
3130
- ], {
3131
- onCancel: () => {
3132
- throw new Error(red("\u2716") + " Operation cancelled");
3889
+ {
3890
+ name: "packageName",
3891
+ type: () => isValidPackageName(targetDir) ? null : "text",
3892
+ message: "Package name:",
3893
+ initial: () => toValidPackageName(targetDir),
3894
+ validate: (dir) => isValidPackageName(dir) || "Invalid package.json name"
3895
+ },
3896
+ {
3897
+ name: "needsTypeScript",
3898
+ type: () => isFeatureFlagsUsed ? null : "toggle",
3899
+ message: "Add TypeScript?",
3900
+ initial: false,
3901
+ active: "Yes",
3902
+ inactive: "No"
3903
+ },
3904
+ {
3905
+ name: "needsJsx",
3906
+ type: () => isFeatureFlagsUsed ? null : "toggle",
3907
+ message: "Add JSX Support?",
3908
+ initial: false,
3909
+ active: "Yes",
3910
+ inactive: "No"
3911
+ },
3912
+ {
3913
+ name: "needsRouter",
3914
+ type: () => isFeatureFlagsUsed ? null : "toggle",
3915
+ message: "Add Vue Router for Single Page Application development?",
3916
+ initial: false,
3917
+ active: "Yes",
3918
+ inactive: "No"
3919
+ },
3920
+ {
3921
+ name: "needsPinia",
3922
+ type: () => isFeatureFlagsUsed ? null : "toggle",
3923
+ message: "Add Pinia for state management?",
3924
+ initial: false,
3925
+ active: "Yes",
3926
+ inactive: "No"
3927
+ },
3928
+ {
3929
+ name: "needsVitest",
3930
+ type: () => isFeatureFlagsUsed ? null : "toggle",
3931
+ message: "Add Vitest for Unit Testing?",
3932
+ initial: false,
3933
+ active: "Yes",
3934
+ inactive: "No"
3935
+ },
3936
+ {
3937
+ name: "needsCypress",
3938
+ type: () => isFeatureFlagsUsed ? null : "toggle",
3939
+ message: (prev, answers) => answers.needsVitest ? "Add Cypress for End-to-End testing?" : "Add Cypress for both Unit and End-to-End testing?",
3940
+ initial: false,
3941
+ active: "Yes",
3942
+ inactive: "No"
3943
+ },
3944
+ {
3945
+ name: "needsEslint",
3946
+ type: () => isFeatureFlagsUsed ? null : "toggle",
3947
+ message: "Add ESLint for code quality?",
3948
+ initial: false,
3949
+ active: "Yes",
3950
+ inactive: "No"
3951
+ },
3952
+ {
3953
+ name: "needsPrettier",
3954
+ type: (prev, values) => {
3955
+ if (isFeatureFlagsUsed || !values.needsEslint) {
3956
+ return null;
3957
+ }
3958
+ return "toggle";
3959
+ },
3960
+ message: "Add Prettier for code formatting?",
3961
+ initial: false,
3962
+ active: "Yes",
3963
+ inactive: "No"
3964
+ }
3965
+ ],
3966
+ {
3967
+ onCancel: () => {
3968
+ throw new Error(red("\u2716") + " Operation cancelled");
3969
+ }
3133
3970
  }
3134
- });
3971
+ );
3135
3972
  } catch (cancelled) {
3136
3973
  console.log(cancelled.message);
3137
3974
  process.exit(1);
@@ -3212,41 +4049,52 @@ Scaffolding project in ${root}...`);
3212
4049
  render("entry/default");
3213
4050
  }
3214
4051
  if (needsTypeScript) {
3215
- preOrderDirectoryTraverse(root, () => {
3216
- }, (filepath) => {
3217
- if (filepath.endsWith(".js")) {
3218
- const tsFilePath = filepath.replace(/\.js$/, ".ts");
3219
- if (fs4.existsSync(tsFilePath)) {
4052
+ preOrderDirectoryTraverse(
4053
+ root,
4054
+ () => {
4055
+ },
4056
+ (filepath) => {
4057
+ if (filepath.endsWith(".js")) {
4058
+ const tsFilePath = filepath.replace(/\.js$/, ".ts");
4059
+ if (fs4.existsSync(tsFilePath)) {
4060
+ fs4.unlinkSync(filepath);
4061
+ } else {
4062
+ fs4.renameSync(filepath, tsFilePath);
4063
+ }
4064
+ } else if (path4.basename(filepath) === "jsconfig.json") {
3220
4065
  fs4.unlinkSync(filepath);
3221
- } else {
3222
- fs4.renameSync(filepath, tsFilePath);
3223
4066
  }
3224
- } else if (path4.basename(filepath) === "jsconfig.json") {
3225
- fs4.unlinkSync(filepath);
3226
4067
  }
3227
- });
4068
+ );
3228
4069
  const indexHtmlPath = path4.resolve(root, "index.html");
3229
4070
  const indexHtmlContent = fs4.readFileSync(indexHtmlPath, "utf8");
3230
4071
  fs4.writeFileSync(indexHtmlPath, indexHtmlContent.replace("src/main.js", "src/main.ts"));
3231
4072
  } else {
3232
- preOrderDirectoryTraverse(root, () => {
3233
- }, (filepath) => {
3234
- if (filepath.endsWith(".ts")) {
3235
- fs4.unlinkSync(filepath);
4073
+ preOrderDirectoryTraverse(
4074
+ root,
4075
+ () => {
4076
+ },
4077
+ (filepath) => {
4078
+ if (filepath.endsWith(".ts")) {
4079
+ fs4.unlinkSync(filepath);
4080
+ }
3236
4081
  }
3237
- });
4082
+ );
3238
4083
  }
3239
4084
  const userAgent = process.env.npm_config_user_agent ?? "";
3240
4085
  const packageManager = /pnpm/.test(userAgent) ? "pnpm" : /yarn/.test(userAgent) ? "yarn" : "npm";
3241
- fs4.writeFileSync(path4.resolve(root, "README.md"), generateReadme({
3242
- projectName: result.projectName ?? result.packageName ?? defaultProjectName,
3243
- packageManager,
3244
- needsTypeScript,
3245
- needsVitest,
3246
- needsCypress,
3247
- needsCypressCT,
3248
- needsEslint
3249
- }));
4086
+ fs4.writeFileSync(
4087
+ path4.resolve(root, "README.md"),
4088
+ generateReadme({
4089
+ projectName: result.projectName ?? result.packageName ?? defaultProjectName,
4090
+ packageManager,
4091
+ needsTypeScript,
4092
+ needsVitest,
4093
+ needsCypress,
4094
+ needsCypressCT,
4095
+ needsEslint
4096
+ })
4097
+ );
3250
4098
  console.log(`
3251
4099
  Done. Now run:
3252
4100
  `);