@gql.tada/cli-utils 1.7.4 → 1.8.1

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.
@@ -2,48 +2,48 @@ import * as t from "node:path";
2
2
 
3
3
  import r, { dirname as i } from "node:path";
4
4
 
5
- import { loadConfig as n, parseConfig as a, loadRef as o, outputIntrospectionFile as s, minifyIntrospection as l, load as c } from "@gql.tada/internal";
5
+ import { loadConfigs as n, parseConfig as a, validateUniqueOutputLocations as o, loadRef as s, outputIntrospectionFile as l, minifyIntrospection as c, load as u } from "@gql.tada/internal";
6
6
 
7
- import * as u from "node:fs/promises";
7
+ import * as d from "node:fs/promises";
8
8
 
9
- import d from "node:fs/promises";
9
+ import f from "node:fs/promises";
10
10
 
11
- import { emitKeypressEvents as f } from "node:readline";
11
+ import { emitKeypressEvents as p } from "node:readline";
12
12
 
13
13
  import { printSchema as g } from "graphql";
14
14
 
15
- import { createRequire as p } from "node:module";
15
+ import { createRequire as h } from "node:module";
16
16
 
17
- import h from "typescript";
17
+ import v from "typescript";
18
18
 
19
19
  import { init as m } from "@0no-co/graphqlsp/api";
20
20
 
21
- var v;
21
+ var y;
22
22
 
23
23
  !function(t) {
24
24
  t.StartOfInput = "\0";
25
25
  t.EndOfInput = "";
26
26
  t.EndOfPartialInput = "";
27
- }(v || (v = {}));
27
+ }(y || (y = {}));
28
28
 
29
- var y;
29
+ var w;
30
30
 
31
31
  !function(t) {
32
32
  t[t.InitialNode = 0] = "InitialNode";
33
33
  t[t.SuccessNode = 1] = "SuccessNode";
34
34
  t[t.ErrorNode = 2] = "ErrorNode";
35
35
  t[t.CustomNode = 3] = "CustomNode";
36
- }(y || (y = {}));
36
+ }(w || (w = {}));
37
37
 
38
38
  var S = -1;
39
39
 
40
- var w = /^(-h|--help)(?:=([0-9]+))?$/;
40
+ var b = /^(-h|--help)(?:=([0-9]+))?$/;
41
41
 
42
- var b = /^(--[a-z]+(?:-[a-z]+)*|-[a-zA-Z]+)$/;
42
+ var E = /^(--[a-z]+(?:-[a-z]+)*|-[a-zA-Z]+)$/;
43
43
 
44
- var E = /^-[a-zA-Z]{2,}$/;
44
+ var x = /^-[a-zA-Z]{2,}$/;
45
45
 
46
- var x = /^([^=]+)=([\s\S]*)$/;
46
+ var $ = /^([^=]+)=([\s\S]*)$/;
47
47
 
48
48
  var C = "1" === process.env.DEBUG_CLI;
49
49
 
@@ -93,7 +93,7 @@ class AmbiguousSyntaxError extends Error {
93
93
  }
94
94
  }
95
95
 
96
- var whileRunning = t => `While running ${t.filter((t => t !== v.EndOfInput && t !== v.EndOfPartialInput)).map((t => {
96
+ var whileRunning = t => `While running ${t.filter((t => t !== y.EndOfInput && t !== y.EndOfPartialInput)).map((t => {
97
97
  var r = JSON.stringify(t);
98
98
  if (t.match(/\s/) || 0 === t.length || r !== `"${t}"`) {
99
99
  return r;
@@ -104,18 +104,18 @@ var whileRunning = t => `While running ${t.filter((t => t !== v.EndOfInput && t
104
104
 
105
105
  var O = Array(80).fill("━");
106
106
 
107
- for (var $ = 0; $ <= 24; ++$) {
108
- O[O.length - $] = `[38;5;${232 + $}m━`;
107
+ for (var k = 0; k <= 24; ++k) {
108
+ O[O.length - k] = `[38;5;${232 + k}m━`;
109
109
  }
110
110
 
111
- var k = {
111
+ var N = {
112
112
  header: t => `━━━ ${t}${t.length < 75 ? ` ${O.slice(t.length + 5).join("")}` : ":"}`,
113
113
  bold: t => `${t}`,
114
114
  error: t => `${t}`,
115
115
  code: t => `${t}`
116
116
  };
117
117
 
118
- var N = {
118
+ var T = {
119
119
  header: t => t,
120
120
  bold: t => t,
121
121
  error: t => t,
@@ -223,7 +223,7 @@ class Command {
223
223
  var t = this.constructor.schema;
224
224
  if (Array.isArray(t)) {
225
225
  var {isDict: r, isUnknown: i, applyCascade: n} = await Promise.resolve().then((function() {
226
- return te;
226
+ return ie;
227
227
  }));
228
228
  var a = [];
229
229
  var o = [];
@@ -258,7 +258,7 @@ function debug(t) {
258
258
  }
259
259
  }
260
260
 
261
- var T = {
261
+ var P = {
262
262
  candidateUsage: null,
263
263
  requiredOptions: [],
264
264
  errorMessage: null,
@@ -275,7 +275,7 @@ function makeStateMachine() {
275
275
  var t = {
276
276
  nodes: []
277
277
  };
278
- for (var r = 0; r < y.CustomNode; ++r) {
278
+ for (var r = 0; r < w.CustomNode; ++r) {
279
279
  t.nodes.push({
280
280
  dynamics: [],
281
281
  shortcuts: [],
@@ -293,7 +293,7 @@ function injectNode(t, r) {
293
293
  function runMachineInternal(t, r, i = !1) {
294
294
  debug(`Running a vm on ${JSON.stringify(r)}`);
295
295
  var n = [ {
296
- node: y.InitialNode,
296
+ node: w.InitialNode,
297
297
  state: {
298
298
  candidateUsage: null,
299
299
  requiredOptions: [],
@@ -317,95 +317,95 @@ function runMachineInternal(t, r, i = !1) {
317
317
  }(t, {
318
318
  prefix: " "
319
319
  });
320
- var a = [ v.StartOfInput, ...r ];
320
+ var a = [ y.StartOfInput, ...r ];
321
321
  for (var o = 0; o < a.length; ++o) {
322
322
  var s = a[o];
323
- var l = s === v.EndOfInput || s === v.EndOfPartialInput;
323
+ var l = s === y.EndOfInput || s === y.EndOfPartialInput;
324
324
  var c = o - 1;
325
325
  debug(` Processing ${JSON.stringify(s)}`);
326
326
  var u = [];
327
327
  for (var {node: d, state: f} of n) {
328
328
  debug(` Current node is ${d}`);
329
- var g = t.nodes[d];
330
- if (d === y.ErrorNode) {
329
+ var p = t.nodes[d];
330
+ if (d === w.ErrorNode) {
331
331
  u.push({
332
332
  node: d,
333
333
  state: f
334
334
  });
335
335
  continue;
336
336
  }
337
- console.assert(0 === g.shortcuts.length, "Shortcuts should have been eliminated by now");
338
- var p = Object.prototype.hasOwnProperty.call(g.statics, s);
339
- if (!i || o < a.length - 1 || p) {
340
- if (p) {
341
- var h = g.statics[s];
342
- for (var {to: m, reducer: S} of h) {
337
+ console.assert(0 === p.shortcuts.length, "Shortcuts should have been eliminated by now");
338
+ var g = Object.prototype.hasOwnProperty.call(p.statics, s);
339
+ if (!i || o < a.length - 1 || g) {
340
+ if (g) {
341
+ var h = p.statics[s];
342
+ for (var {to: v, reducer: m} of h) {
343
343
  u.push({
344
- node: m,
345
- state: void 0 !== S ? execute(M, S, f, s, c) : f
344
+ node: v,
345
+ state: void 0 !== m ? execute(B, m, f, s, c) : f
346
346
  });
347
- debug(` Static transition to ${m} found`);
347
+ debug(` Static transition to ${v} found`);
348
348
  }
349
349
  } else {
350
350
  debug(" No static transition found");
351
351
  }
352
352
  } else {
353
- var w = !1;
354
- for (var b of Object.keys(g.statics)) {
353
+ var S = !1;
354
+ for (var b of Object.keys(p.statics)) {
355
355
  if (!b.startsWith(s)) {
356
356
  continue;
357
357
  }
358
358
  if (s === b) {
359
- for (var {to: E, reducer: x} of g.statics[b]) {
359
+ for (var {to: E, reducer: x} of p.statics[b]) {
360
360
  u.push({
361
361
  node: E,
362
- state: void 0 !== x ? execute(M, x, f, s, c) : f
362
+ state: void 0 !== x ? execute(B, x, f, s, c) : f
363
363
  });
364
364
  debug(` Static transition to ${E} found`);
365
365
  }
366
366
  } else {
367
- for (var {to: O} of g.statics[b]) {
367
+ for (var {to: $} of p.statics[b]) {
368
368
  u.push({
369
- node: O,
369
+ node: $,
370
370
  state: {
371
371
  ...f,
372
372
  remainder: b.slice(s.length)
373
373
  }
374
374
  });
375
- debug(` Static transition to ${O} found (partial match)`);
375
+ debug(` Static transition to ${$} found (partial match)`);
376
376
  }
377
377
  }
378
- w = !0;
378
+ S = !0;
379
379
  }
380
- if (!w) {
380
+ if (!S) {
381
381
  debug(" No partial static transition found");
382
382
  }
383
383
  }
384
384
  if (!l) {
385
- for (var [$, {to: k, reducer: N}] of g.dynamics) {
386
- if (execute(P, $, f, s, c)) {
385
+ for (var [O, {to: k, reducer: N}] of p.dynamics) {
386
+ if (execute(M, O, f, s, c)) {
387
387
  u.push({
388
388
  node: k,
389
- state: void 0 !== N ? execute(M, N, f, s, c) : f
389
+ state: void 0 !== N ? execute(B, N, f, s, c) : f
390
390
  });
391
- debug(` Dynamic transition to ${k} found (via ${$})`);
391
+ debug(` Dynamic transition to ${k} found (via ${O})`);
392
392
  }
393
393
  }
394
394
  }
395
395
  }
396
396
  if (0 === u.length && l && 1 === r.length) {
397
397
  return [ {
398
- node: y.InitialNode,
399
- state: T
398
+ node: w.InitialNode,
399
+ state: P
400
400
  } ];
401
401
  }
402
402
  if (0 === u.length) {
403
- throw new UnknownSyntaxError(r, n.filter((({node: t}) => t !== y.ErrorNode)).map((({state: t}) => ({
403
+ throw new UnknownSyntaxError(r, n.filter((({node: t}) => t !== w.ErrorNode)).map((({state: t}) => ({
404
404
  usage: t.candidateUsage,
405
405
  reason: null
406
406
  }))));
407
407
  }
408
- if (u.every((({node: t}) => t === y.ErrorNode))) {
408
+ if (u.every((({node: t}) => t === w.ErrorNode))) {
409
409
  throw new UnknownSyntaxError(r, u.map((({state: t}) => ({
410
410
  usage: t.candidateUsage,
411
411
  reason: t.errorMessage
@@ -415,8 +415,8 @@ function runMachineInternal(t, r, i = !1) {
415
415
  }
416
416
  if (n.length > 0) {
417
417
  debug(" Results:");
418
- for (var I of n) {
419
- debug(` - ${I.node} -> ${JSON.stringify(I.state)}`);
418
+ for (var T of n) {
419
+ debug(` - ${T.node} -> ${JSON.stringify(T.state)}`);
420
420
  }
421
421
  } else {
422
422
  debug(" No results");
@@ -424,7 +424,7 @@ function runMachineInternal(t, r, i = !1) {
424
424
  return n;
425
425
  }
426
426
 
427
- function runMachine(t, r, {endToken: i = v.EndOfInput} = {}) {
427
+ function runMachine(t, r, {endToken: i = y.EndOfInput} = {}) {
428
428
  return function selectBestState(t, r) {
429
429
  var i = r.filter((t => null !== t.selectedIndex));
430
430
  if (0 === i.length) {
@@ -467,7 +467,7 @@ function runMachine(t, r, {endToken: i = v.EndOfInput} = {}) {
467
467
  }
468
468
  if (i.length > 0) {
469
469
  r.push({
470
- ...T,
470
+ ...P,
471
471
  path: findCommonPrefix(...i.map((t => t.path))),
472
472
  options: i.reduce(((t, r) => t.concat(r.options)), [])
473
473
  });
@@ -499,12 +499,12 @@ function findCommonPrefix(t, r, ...i) {
499
499
  }
500
500
 
501
501
  function isTerminalNode(t) {
502
- return t === y.SuccessNode || t === y.ErrorNode;
502
+ return t === w.SuccessNode || t === w.ErrorNode;
503
503
  }
504
504
 
505
505
  function cloneTransition(t, r = 0) {
506
506
  return {
507
- to: !isTerminalNode(t.to) ? t.to >= y.CustomNode ? t.to + r - y.CustomNode + 1 : t.to + r : t.to,
507
+ to: !isTerminalNode(t.to) ? t.to >= w.CustomNode ? t.to + r - w.CustomNode + 1 : t.to + r : t.to,
508
508
  reducer: t.reducer
509
509
  };
510
510
  }
@@ -557,23 +557,23 @@ function execute(t, r, i, n, a) {
557
557
  }
558
558
  }
559
559
 
560
- var P = {
560
+ var M = {
561
561
  always: () => !0,
562
562
  isOptionLike: (t, r) => !t.ignoreOptions && "-" !== r && r.startsWith("-"),
563
563
  isNotOptionLike: (t, r) => t.ignoreOptions || "-" === r || !r.startsWith("-"),
564
564
  isOption: (t, r, i, n) => !t.ignoreOptions && r === n,
565
- isBatchOption: (t, r, i, n) => !t.ignoreOptions && E.test(r) && [ ...r.slice(1) ].every((t => n.has(`-${t}`))),
565
+ isBatchOption: (t, r, i, n) => !t.ignoreOptions && x.test(r) && [ ...r.slice(1) ].every((t => n.has(`-${t}`))),
566
566
  isBoundOption: (t, r, i, n, a) => {
567
- var o = r.match(x);
568
- return !t.ignoreOptions && !!o && b.test(o[1]) && n.has(o[1]) && a.filter((t => t.nameSet.includes(o[1]))).every((t => t.allowBinding));
567
+ var o = r.match($);
568
+ return !t.ignoreOptions && !!o && E.test(o[1]) && n.has(o[1]) && a.filter((t => t.nameSet.includes(o[1]))).every((t => t.allowBinding));
569
569
  },
570
570
  isNegatedOption: (t, r, i, n) => !t.ignoreOptions && r === `--no-${n.slice(2)}`,
571
- isHelp: (t, r) => !t.ignoreOptions && w.test(r),
572
- isUnsupportedOption: (t, r, i, n) => !t.ignoreOptions && r.startsWith("-") && b.test(r) && !n.has(r),
573
- isInvalidOption: (t, r) => !t.ignoreOptions && r.startsWith("-") && !b.test(r)
571
+ isHelp: (t, r) => !t.ignoreOptions && b.test(r),
572
+ isUnsupportedOption: (t, r, i, n) => !t.ignoreOptions && r.startsWith("-") && E.test(r) && !n.has(r),
573
+ isInvalidOption: (t, r) => !t.ignoreOptions && r.startsWith("-") && !E.test(r)
574
574
  };
575
575
 
576
- var M = {
576
+ var B = {
577
577
  setCandidateState: (t, r, i, n) => ({
578
578
  ...t,
579
579
  ...n
@@ -606,7 +606,7 @@ var M = {
606
606
  };
607
607
  },
608
608
  pushBound: (t, r, i) => {
609
- var [, n, a] = r.match(x);
609
+ var [, n, a] = r.match($);
610
610
  var o = t.options.concat({
611
611
  name: n,
612
612
  value: a
@@ -676,7 +676,7 @@ var M = {
676
676
  pushExtraNoLimits: (t, r, i) => {
677
677
  var n = t.positionals.concat({
678
678
  value: r,
679
- extra: B
679
+ extra: F
680
680
  });
681
681
  var a = t.tokens.concat({
682
682
  segmentIndex: i,
@@ -770,7 +770,7 @@ var M = {
770
770
  ignoreOptions: !0
771
771
  }),
772
772
  useHelp: (t, r, i, n) => {
773
- var [, , a] = r.match(w);
773
+ var [, , a] = r.match(b);
774
774
  if (void 0 !== a) {
775
775
  return {
776
776
  ...t,
@@ -793,7 +793,7 @@ var M = {
793
793
  }
794
794
  },
795
795
  setError: (t, r, i, n) => {
796
- if (r === v.EndOfInput || r === v.EndOfPartialInput) {
796
+ if (r === y.EndOfInput || r === y.EndOfPartialInput) {
797
797
  return {
798
798
  ...t,
799
799
  errorMessage: `${n}.`
@@ -814,7 +814,7 @@ var M = {
814
814
  }
815
815
  };
816
816
 
817
- var B = Symbol();
817
+ var F = Symbol();
818
818
 
819
819
  class CommandBuilder {
820
820
  constructor(t, r) {
@@ -842,22 +842,22 @@ class CommandBuilder {
842
842
  });
843
843
  }
844
844
  addPositional({name: t = "arg", required: r = !0} = {}) {
845
- if (!r && this.arity.extra === B) {
845
+ if (!r && this.arity.extra === F) {
846
846
  throw new Error("Optional parameters cannot be declared when using .rest() or .proxy()");
847
847
  }
848
848
  if (!r && this.arity.trailing.length > 0) {
849
849
  throw new Error("Optional parameters cannot be declared after the required trailing positional arguments");
850
850
  }
851
- if (!r && this.arity.extra !== B) {
851
+ if (!r && this.arity.extra !== F) {
852
852
  this.arity.extra.push(t);
853
- } else if (this.arity.extra !== B && 0 === this.arity.extra.length) {
853
+ } else if (this.arity.extra !== F && 0 === this.arity.extra.length) {
854
854
  this.arity.leading.push(t);
855
855
  } else {
856
856
  this.arity.trailing.push(t);
857
857
  }
858
858
  }
859
859
  addRest({name: t = "arg", required: r = 0} = {}) {
860
- if (this.arity.extra === B) {
860
+ if (this.arity.extra === F) {
861
861
  throw new Error("Infinite lists cannot be declared multiple times in the same command");
862
862
  }
863
863
  if (this.arity.trailing.length > 0) {
@@ -868,7 +868,7 @@ class CommandBuilder {
868
868
  name: t
869
869
  });
870
870
  }
871
- this.arity.extra = B;
871
+ this.arity.extra = F;
872
872
  }
873
873
  addProxy({required: t = 0} = {}) {
874
874
  this.addRest({
@@ -918,21 +918,21 @@ class CommandBuilder {
918
918
  for (var f = 0; f < s; ++f) {
919
919
  d.push(` #${f}`);
920
920
  }
921
- var g = `${o.join(",")}${d.join("")}`;
921
+ var p = `${o.join(",")}${d.join("")}`;
922
922
  if (!r && c) {
923
923
  n.push({
924
924
  preferredName: a,
925
925
  nameSet: o,
926
- definition: g,
926
+ definition: p,
927
927
  description: c,
928
928
  required: u
929
929
  });
930
930
  } else {
931
- i.push(u ? `<${g}>` : `[${g}]`);
931
+ i.push(u ? `<${p}>` : `[${p}]`);
932
932
  }
933
933
  }
934
934
  i.push(...this.arity.leading.map((t => `<${t}>`)));
935
- if (this.arity.extra === B) {
935
+ if (this.arity.extra === F) {
936
936
  i.push("...");
937
937
  } else {
938
938
  i.push(...this.arity.extra.map((t => `[${t}]`)));
@@ -957,7 +957,7 @@ class CommandBuilder {
957
957
  shortcuts: [],
958
958
  statics: {}
959
959
  });
960
- registerStatic(t, y.InitialNode, v.StartOfInput, r, [ "setCandidateState", {
960
+ registerStatic(t, w.InitialNode, y.StartOfInput, r, [ "setCandidateState", {
961
961
  candidateUsage: i,
962
962
  requiredOptions: n
963
963
  } ]);
@@ -990,50 +990,50 @@ class CommandBuilder {
990
990
  statics: {}
991
991
  });
992
992
  registerDynamic(t, l, "isHelp", f, [ "useHelp", this.cliIndex ]);
993
- registerStatic(t, f, v.EndOfInput, y.SuccessNode, [ "setSelectedIndex", S ]);
993
+ registerStatic(t, f, y.EndOfInput, w.SuccessNode, [ "setSelectedIndex", S ]);
994
994
  }
995
995
  }
996
996
  if (this.arity.leading.length > 0 || !this.arity.proxy) {
997
- var g = injectNode(t, {
997
+ var p = injectNode(t, {
998
998
  dynamics: [],
999
999
  shortcuts: [],
1000
1000
  statics: {}
1001
1001
  });
1002
- registerDynamic(t, l, "isHelp", g, [ "useHelp", this.cliIndex ]);
1003
- registerDynamic(t, g, "always", g, "pushExtra");
1004
- registerStatic(t, g, v.EndOfInput, y.SuccessNode, [ "setSelectedIndex", S ]);
1002
+ registerDynamic(t, l, "isHelp", p, [ "useHelp", this.cliIndex ]);
1003
+ registerDynamic(t, p, "always", p, "pushExtra");
1004
+ registerStatic(t, p, y.EndOfInput, w.SuccessNode, [ "setSelectedIndex", S ]);
1005
1005
  this.registerOptions(t, l);
1006
1006
  }
1007
1007
  if (this.arity.leading.length > 0) {
1008
- registerStatic(t, l, v.EndOfInput, y.ErrorNode, [ "setError", "Not enough positional arguments" ]);
1009
- registerStatic(t, l, v.EndOfPartialInput, y.SuccessNode, [ "setSelectedIndex", this.cliIndex ]);
1008
+ registerStatic(t, l, y.EndOfInput, w.ErrorNode, [ "setError", "Not enough positional arguments" ]);
1009
+ registerStatic(t, l, y.EndOfPartialInput, w.SuccessNode, [ "setSelectedIndex", this.cliIndex ]);
1010
1010
  }
1011
- var p = l;
1011
+ var g = l;
1012
1012
  for (var h = 0; h < this.arity.leading.length; ++h) {
1013
- var m = injectNode(t, {
1013
+ var v = injectNode(t, {
1014
1014
  dynamics: [],
1015
1015
  shortcuts: [],
1016
1016
  statics: {}
1017
1017
  });
1018
1018
  if (!this.arity.proxy || h + 1 !== this.arity.leading.length) {
1019
- this.registerOptions(t, m);
1019
+ this.registerOptions(t, v);
1020
1020
  }
1021
1021
  if (this.arity.trailing.length > 0 || h + 1 !== this.arity.leading.length) {
1022
- registerStatic(t, m, v.EndOfInput, y.ErrorNode, [ "setError", "Not enough positional arguments" ]);
1023
- registerStatic(t, m, v.EndOfPartialInput, y.SuccessNode, [ "setSelectedIndex", this.cliIndex ]);
1022
+ registerStatic(t, v, y.EndOfInput, w.ErrorNode, [ "setError", "Not enough positional arguments" ]);
1023
+ registerStatic(t, v, y.EndOfPartialInput, w.SuccessNode, [ "setSelectedIndex", this.cliIndex ]);
1024
1024
  }
1025
- registerDynamic(t, p, "isNotOptionLike", m, "pushPositional");
1026
- p = m;
1025
+ registerDynamic(t, g, "isNotOptionLike", v, "pushPositional");
1026
+ g = v;
1027
1027
  }
1028
- var w = p;
1029
- if (this.arity.extra === B || this.arity.extra.length > 0) {
1028
+ var m = g;
1029
+ if (this.arity.extra === F || this.arity.extra.length > 0) {
1030
1030
  var b = injectNode(t, {
1031
1031
  dynamics: [],
1032
1032
  shortcuts: [],
1033
1033
  statics: {}
1034
1034
  });
1035
- registerShortcut(t, p, b);
1036
- if (this.arity.extra === B) {
1035
+ registerShortcut(t, g, b);
1036
+ if (this.arity.extra === F) {
1037
1037
  var E = injectNode(t, {
1038
1038
  dynamics: [],
1039
1039
  shortcuts: [],
@@ -1042,32 +1042,32 @@ class CommandBuilder {
1042
1042
  if (!this.arity.proxy) {
1043
1043
  this.registerOptions(t, E);
1044
1044
  }
1045
- registerDynamic(t, p, a, E, "pushExtraNoLimits");
1045
+ registerDynamic(t, g, a, E, "pushExtraNoLimits");
1046
1046
  registerDynamic(t, E, a, E, "pushExtraNoLimits");
1047
1047
  registerShortcut(t, E, b);
1048
1048
  } else {
1049
1049
  for (var x = 0; x < this.arity.extra.length; ++x) {
1050
- var C = injectNode(t, {
1050
+ var $ = injectNode(t, {
1051
1051
  dynamics: [],
1052
1052
  shortcuts: [],
1053
1053
  statics: {}
1054
1054
  });
1055
1055
  if (!this.arity.proxy || x > 0) {
1056
- this.registerOptions(t, C);
1056
+ this.registerOptions(t, $);
1057
1057
  }
1058
- registerDynamic(t, w, a, C, "pushExtra");
1059
- registerShortcut(t, C, b);
1060
- w = C;
1058
+ registerDynamic(t, m, a, $, "pushExtra");
1059
+ registerShortcut(t, $, b);
1060
+ m = $;
1061
1061
  }
1062
1062
  }
1063
- w = b;
1063
+ m = b;
1064
1064
  }
1065
1065
  if (this.arity.trailing.length > 0) {
1066
- registerStatic(t, w, v.EndOfInput, y.ErrorNode, [ "setError", "Not enough positional arguments" ]);
1067
- registerStatic(t, w, v.EndOfPartialInput, y.SuccessNode, [ "setSelectedIndex", this.cliIndex ]);
1066
+ registerStatic(t, m, y.EndOfInput, w.ErrorNode, [ "setError", "Not enough positional arguments" ]);
1067
+ registerStatic(t, m, y.EndOfPartialInput, w.SuccessNode, [ "setSelectedIndex", this.cliIndex ]);
1068
1068
  }
1069
- var O = w;
1070
- for (var $ = 0; $ < this.arity.trailing.length; ++$) {
1069
+ var C = m;
1070
+ for (var O = 0; O < this.arity.trailing.length; ++O) {
1071
1071
  var k = injectNode(t, {
1072
1072
  dynamics: [],
1073
1073
  shortcuts: [],
@@ -1076,16 +1076,16 @@ class CommandBuilder {
1076
1076
  if (!this.arity.proxy) {
1077
1077
  this.registerOptions(t, k);
1078
1078
  }
1079
- if ($ + 1 < this.arity.trailing.length) {
1080
- registerStatic(t, k, v.EndOfInput, y.ErrorNode, [ "setError", "Not enough positional arguments" ]);
1081
- registerStatic(t, k, v.EndOfPartialInput, y.SuccessNode, [ "setSelectedIndex", this.cliIndex ]);
1079
+ if (O + 1 < this.arity.trailing.length) {
1080
+ registerStatic(t, k, y.EndOfInput, w.ErrorNode, [ "setError", "Not enough positional arguments" ]);
1081
+ registerStatic(t, k, y.EndOfPartialInput, w.SuccessNode, [ "setSelectedIndex", this.cliIndex ]);
1082
1082
  }
1083
- registerDynamic(t, O, "isNotOptionLike", k, "pushPositional");
1084
- O = k;
1083
+ registerDynamic(t, C, "isNotOptionLike", k, "pushPositional");
1084
+ C = k;
1085
1085
  }
1086
- registerDynamic(t, O, a, y.ErrorNode, [ "setError", "Extraneous positional argument" ]);
1087
- registerStatic(t, O, v.EndOfInput, y.SuccessNode, [ "setSelectedIndex", this.cliIndex ]);
1088
- registerStatic(t, O, v.EndOfPartialInput, y.SuccessNode, [ "setSelectedIndex", this.cliIndex ]);
1086
+ registerDynamic(t, C, a, w.ErrorNode, [ "setError", "Extraneous positional argument" ]);
1087
+ registerStatic(t, C, y.EndOfInput, w.SuccessNode, [ "setSelectedIndex", this.cliIndex ]);
1088
+ registerStatic(t, C, y.EndOfPartialInput, w.SuccessNode, [ "setSelectedIndex", this.cliIndex ]);
1089
1089
  }
1090
1090
  return {
1091
1091
  machine: t,
@@ -1096,8 +1096,8 @@ class CommandBuilder {
1096
1096
  registerDynamic(t, r, [ "isOption", "--" ], r, "inhibateOptions");
1097
1097
  registerDynamic(t, r, [ "isBatchOption", this.allOptionNames ], r, [ "pushBatch", this.allOptionNames ]);
1098
1098
  registerDynamic(t, r, [ "isBoundOption", this.allOptionNames, this.options ], r, "pushBound");
1099
- registerDynamic(t, r, [ "isUnsupportedOption", this.allOptionNames ], y.ErrorNode, [ "setError", "Unsupported option name" ]);
1100
- registerDynamic(t, r, [ "isInvalidOption" ], y.ErrorNode, [ "setError", "Invalid option name" ]);
1099
+ registerDynamic(t, r, [ "isUnsupportedOption", this.allOptionNames ], w.ErrorNode, [ "setError", "Unsupported option name" ]);
1100
+ registerDynamic(t, r, [ "isInvalidOption" ], w.ErrorNode, [ "setError", "Invalid option name" ]);
1101
1101
  for (var i of this.options) {
1102
1102
  if (0 === i.arity) {
1103
1103
  for (var n of i.nameSet) {
@@ -1121,9 +1121,9 @@ class CommandBuilder {
1121
1121
  shortcuts: [],
1122
1122
  statics: {}
1123
1123
  });
1124
- registerStatic(t, a, v.EndOfInput, y.ErrorNode, "setOptionArityError");
1125
- registerStatic(t, a, v.EndOfPartialInput, y.ErrorNode, "setOptionArityError");
1126
- registerDynamic(t, a, "isOptionLike", y.ErrorNode, "setOptionArityError");
1124
+ registerStatic(t, a, y.EndOfInput, w.ErrorNode, "setOptionArityError");
1125
+ registerStatic(t, a, y.EndOfPartialInput, w.ErrorNode, "setOptionArityError");
1126
+ registerDynamic(t, a, "isOptionLike", w.ErrorNode, "setOptionArityError");
1127
1127
  registerDynamic(t, a, "isNotOptionLike", l, 1 === i.arity ? "setStringValue" : "pushStringValue");
1128
1128
  a = l;
1129
1129
  }
@@ -1179,10 +1179,10 @@ class CliBuilder {
1179
1179
  r.nodes.push(cloneNode(a.nodes[o], n));
1180
1180
  }
1181
1181
  }
1182
- n += a.nodes.length - y.CustomNode + 1;
1182
+ n += a.nodes.length - w.CustomNode + 1;
1183
1183
  }
1184
1184
  for (var s of i) {
1185
- registerShortcut(r, y.InitialNode, s);
1185
+ registerShortcut(r, w.InitialNode, s);
1186
1186
  }
1187
1187
  return r;
1188
1188
  }(t);
@@ -1209,14 +1209,14 @@ class CliBuilder {
1209
1209
  while (n.shortcuts.length > 0) {
1210
1210
  var {to: u} = n.shortcuts.shift();
1211
1211
  var d = t.nodes[u];
1212
- for (var [f, g] of Object.entries(d.statics)) {
1213
- var p = !Object.prototype.hasOwnProperty.call(n.statics, f) ? n.statics[f] = [] : n.statics[f];
1212
+ for (var [f, p] of Object.entries(d.statics)) {
1213
+ var g = !Object.prototype.hasOwnProperty.call(n.statics, f) ? n.statics[f] = [] : n.statics[f];
1214
1214
  var _loop = function(t) {
1215
- if (!p.some((({to: r}) => t.to === r))) {
1216
- p.push(t);
1215
+ if (!g.some((({to: r}) => t.to === r))) {
1216
+ g.push(t);
1217
1217
  }
1218
1218
  };
1219
- for (var h of g) {
1219
+ for (var h of p) {
1220
1220
  _loop(h);
1221
1221
  }
1222
1222
  }
@@ -1225,8 +1225,8 @@ class CliBuilder {
1225
1225
  n.dynamics.push([ t, r ]);
1226
1226
  }
1227
1227
  };
1228
- for (var [m, v] of d.dynamics) {
1229
- _loop2(m, v);
1228
+ for (var [v, m] of d.dynamics) {
1229
+ _loop2(v, m);
1230
1230
  }
1231
1231
  for (var y of d.shortcuts) {
1232
1232
  if (!c.has(y.to)) {
@@ -1236,13 +1236,13 @@ class CliBuilder {
1236
1236
  }
1237
1237
  }
1238
1238
  };
1239
- process(y.InitialNode);
1239
+ process(w.InitialNode);
1240
1240
  }(o);
1241
1241
  return {
1242
1242
  machine: o,
1243
1243
  contexts: r,
1244
1244
  process: (t, {partial: r} = {}) => runMachine(o, t, {
1245
- endToken: r ? v.EndOfPartialInput : v.EndOfInput
1245
+ endToken: r ? y.EndOfPartialInput : y.EndOfInput
1246
1246
  })
1247
1247
  };
1248
1248
  }
@@ -1295,7 +1295,7 @@ class HelpCommand extends Command {
1295
1295
  }
1296
1296
  }
1297
1297
 
1298
- var F = Symbol("clipanion/errorCommand");
1298
+ var j = Symbol("clipanion/errorCommand");
1299
1299
 
1300
1300
  class Cli {
1301
1301
  constructor({binaryLabel: t, binaryName: r = "...", binaryVersion: i, enableCapture: n = !1, enableColors: a} = {}) {
@@ -1371,17 +1371,17 @@ class Cli {
1371
1371
  if (void 0 === f) {
1372
1372
  throw new Error("Assertion failed: Expected the command class to have been registered.");
1373
1373
  }
1374
- var g = new d;
1375
- g.context = c;
1376
- g.tokens = l.tokens;
1377
- g.path = l.path;
1374
+ var p = new d;
1375
+ p.context = c;
1376
+ p.tokens = l.tokens;
1377
+ p.path = l.path;
1378
1378
  try {
1379
- for (var [p, {transformer: h}] of f.specs.entries()) {
1380
- g[p] = h(f.builder, p, l, c);
1379
+ for (var [g, {transformer: h}] of f.specs.entries()) {
1380
+ p[g] = h(f.builder, g, l, c);
1381
1381
  }
1382
- return g;
1382
+ return p;
1383
1383
  } catch (t) {
1384
- t[F] = g;
1384
+ t[j] = p;
1385
1385
  throw t;
1386
1386
  }
1387
1387
  }
@@ -1525,22 +1525,22 @@ class Cli {
1525
1525
  var d = "";
1526
1526
  if (!u) {
1527
1527
  var f = new Map;
1528
- for (var [g, {index: p}] of this.registrations.entries()) {
1529
- if (void 0 === g.usage) {
1528
+ for (var [p, {index: g}] of this.registrations.entries()) {
1529
+ if (void 0 === p.usage) {
1530
1530
  continue;
1531
1531
  }
1532
- var h = void 0 !== g.usage.category ? formatMarkdownish(g.usage.category, {
1532
+ var h = void 0 !== p.usage.category ? formatMarkdownish(p.usage.category, {
1533
1533
  format: this.format(r),
1534
1534
  paragraphs: !1
1535
1535
  }) : null;
1536
- var m = f.get(h);
1537
- if (void 0 === m) {
1538
- f.set(h, m = []);
1539
- }
1540
- var {usage: v} = this.getUsageByIndex(p);
1541
- m.push({
1542
- commandClass: g,
1543
- usage: v
1536
+ var v = f.get(h);
1537
+ if (void 0 === v) {
1538
+ f.set(h, v = []);
1539
+ }
1540
+ var {usage: m} = this.getUsageByIndex(g);
1541
+ v.push({
1542
+ commandClass: p,
1543
+ usage: m
1544
1544
  });
1545
1545
  }
1546
1546
  var y = Array.from(f.keys()).sort(((t, r) => {
@@ -1555,12 +1555,12 @@ class Cli {
1555
1555
  caseFirst: "upper"
1556
1556
  });
1557
1557
  }));
1558
- var S = void 0 !== this.binaryLabel;
1559
- var w = void 0 !== this.binaryVersion;
1560
- if (S || w) {
1561
- if (S && w) {
1558
+ var w = void 0 !== this.binaryLabel;
1559
+ var S = void 0 !== this.binaryVersion;
1560
+ if (w || S) {
1561
+ if (w && S) {
1562
1562
  d += `${this.format(r).header(`${this.binaryLabel} - ${this.binaryVersion}`)}\n\n`;
1563
- } else if (S) {
1563
+ } else if (w) {
1564
1564
  d += `${this.format(r).header(`${this.binaryLabel}`)}\n`;
1565
1565
  } else {
1566
1566
  d += `${this.format(r).header(`${this.binaryVersion}`)}\n`;
@@ -1577,11 +1577,11 @@ class Cli {
1577
1577
  var x = null !== b ? b.trim() : "General commands";
1578
1578
  d += "\n";
1579
1579
  d += `${this.format(r).header(`${x}`)}\n`;
1580
- for (var {commandClass: C, usage: O} of E) {
1581
- var $ = C.usage.description || "undocumented";
1580
+ for (var {commandClass: $, usage: C} of E) {
1581
+ var O = $.usage.description || "undocumented";
1582
1582
  d += "\n";
1583
- d += ` ${this.format(r).bold(O)}\n`;
1584
- d += ` ${formatMarkdownish($, {
1583
+ d += ` ${this.format(r).bold(C)}\n`;
1584
+ d += ` ${formatMarkdownish(O, {
1585
1585
  format: this.format(r),
1586
1586
  paragraphs: !1
1587
1587
  })}`;
@@ -1596,7 +1596,7 @@ class Cli {
1596
1596
  var {usage: k} = this.getUsageByRegistration(u);
1597
1597
  d += `${this.format(r).bold(n)}${k}\n`;
1598
1598
  } else {
1599
- var {description: N = "", details: I = "", examples: T = []} = u.usage || {};
1599
+ var {description: N = "", details: T = "", examples: I = []} = u.usage || {};
1600
1600
  if ("" !== N) {
1601
1601
  d += formatMarkdownish(N, {
1602
1602
  format: this.format(r),
@@ -1604,7 +1604,7 @@ class Cli {
1604
1604
  }).replace(/^./, (t => t.toUpperCase()));
1605
1605
  d += "\n";
1606
1606
  }
1607
- if ("" !== I || T.length > 0) {
1607
+ if ("" !== T || I.length > 0) {
1608
1608
  d += `${this.format(r).header("Usage")}\n`;
1609
1609
  d += "\n";
1610
1610
  }
@@ -1617,26 +1617,26 @@ class Cli {
1617
1617
  d += `${this.format(r).header("Options")}\n`;
1618
1618
  var B = M.reduce(((t, r) => Math.max(t, r.definition.length)), 0);
1619
1619
  d += "\n";
1620
- for (var {definition: F, description: A} of M) {
1621
- d += ` ${this.format(r).bold(F.padEnd(B))} ${formatMarkdownish(A, {
1620
+ for (var {definition: F, description: j} of M) {
1621
+ d += ` ${this.format(r).bold(F.padEnd(B))} ${formatMarkdownish(j, {
1622
1622
  format: this.format(r),
1623
1623
  paragraphs: !1
1624
1624
  })}`;
1625
1625
  }
1626
1626
  }
1627
- if ("" !== I) {
1627
+ if ("" !== T) {
1628
1628
  d += "\n";
1629
1629
  d += `${this.format(r).header("Details")}\n`;
1630
1630
  d += "\n";
1631
- d += formatMarkdownish(I, {
1631
+ d += formatMarkdownish(T, {
1632
1632
  format: this.format(r),
1633
1633
  paragraphs: !0
1634
1634
  });
1635
1635
  }
1636
- if (T.length > 0) {
1636
+ if (I.length > 0) {
1637
1637
  d += "\n";
1638
1638
  d += `${this.format(r).header("Examples")}\n`;
1639
- for (var [L, R] of T) {
1639
+ for (var [L, R] of I) {
1640
1640
  d += "\n";
1641
1641
  d += formatMarkdownish(L, {
1642
1642
  format: this.format(r),
@@ -1650,7 +1650,7 @@ class Cli {
1650
1650
  }
1651
1651
  error(t, r) {
1652
1652
  var i;
1653
- var {colored: n, command: a = (null !== (i = t[F]) && void 0 !== i ? i : null)} = void 0 === r ? {} : r;
1653
+ var {colored: n, command: a = (null !== (i = t[j]) && void 0 !== i ? i : null)} = void 0 === r ? {} : r;
1654
1654
  if (!t || "object" != typeof t || !("stack" in t)) {
1655
1655
  t = new Error(`Execution failed with a non-error rejection (rejected value: ${JSON.stringify(t)})`);
1656
1656
  }
@@ -1673,7 +1673,7 @@ class Cli {
1673
1673
  }
1674
1674
  format(t) {
1675
1675
  var r;
1676
- return (null !== (r = null != t ? t : this.enableColors) && void 0 !== r ? r : Cli.defaultContext.colorDepth > 1) ? k : N;
1676
+ return (null !== (r = null != t ? t : this.enableColors) && void 0 !== r ? r : Cli.defaultContext.colorDepth > 1) ? N : T;
1677
1677
  }
1678
1678
  getUsageByRegistration(t, r) {
1679
1679
  var i = this.registrations.get(t);
@@ -1780,7 +1780,7 @@ function String$1(t, ...r) {
1780
1780
  transformer(i, n, a) {
1781
1781
  var o;
1782
1782
  for (var s = 0; s < a.positionals.length; ++s) {
1783
- if (a.positionals[s].extra === B) {
1783
+ if (a.positionals[s].extra === F) {
1784
1784
  continue;
1785
1785
  }
1786
1786
  if (r && !0 === a.positionals[s].extra) {
@@ -1799,7 +1799,7 @@ function String$1(t, ...r) {
1799
1799
  }
1800
1800
  }
1801
1801
 
1802
- var A = function(t) {
1802
+ var L = function(t) {
1803
1803
  t[t.VUE_SUPPORT = 0] = "VUE_SUPPORT";
1804
1804
  t[t.SVELTE_SUPPORT = 1] = "SVELTE_SUPPORT";
1805
1805
  t[t.UNKNOWN_EXTERNAL_FILE = 2] = "UNKNOWN_EXTERNAL_FILE";
@@ -1923,7 +1923,7 @@ function concatMap(t) {
1923
1923
  function concat(t) {
1924
1924
  return function concatAll(t) {
1925
1925
  return concatMap(identity)(t);
1926
- }(L(t));
1926
+ }(R(t));
1927
1927
  }
1928
1928
 
1929
1929
  function filter(t) {
@@ -2031,7 +2031,7 @@ function mergeMap(t) {
2031
2031
  function merge(t) {
2032
2032
  return function mergeAll(t) {
2033
2033
  return mergeMap(identity)(t);
2034
- }(L(t));
2034
+ }(R(t));
2035
2035
  }
2036
2036
 
2037
2037
  function onEnd(t) {
@@ -2205,7 +2205,7 @@ function fromAsyncIterable(t) {
2205
2205
  };
2206
2206
  }
2207
2207
 
2208
- var L = function fromIterable(t) {
2208
+ var R = function fromIterable(t) {
2209
2209
  if (t[Symbol.asyncIterator]) {
2210
2210
  return fromAsyncIterable(t);
2211
2211
  }
@@ -2329,13 +2329,13 @@ var pipe = (...t) => {
2329
2329
  return r;
2330
2330
  };
2331
2331
 
2332
- var R = !1;
2332
+ var A = !1;
2333
2333
 
2334
2334
  function _setColor(t) {
2335
- R = t;
2335
+ A = t;
2336
2336
  }
2337
2337
 
2338
- var j = function(t) {
2338
+ var D = function(t) {
2339
2339
  t.InsertChars = "@";
2340
2340
  t.ScrollLeft = "SP@";
2341
2341
  t.Up = "A";
@@ -2376,22 +2376,22 @@ var j = function(t) {
2376
2376
  t.InsertColumns = "'}";
2377
2377
  t.DeleteColumns = "'~";
2378
2378
  return t;
2379
- }(j || {});
2379
+ }(D || {});
2380
2380
 
2381
- var D = function(t) {
2381
+ var _ = function(t) {
2382
2382
  t[t.Forward = 0] = "Forward";
2383
2383
  t[t.Backward = 1] = "Backward";
2384
2384
  t[t.All = 2] = "All";
2385
2385
  return t;
2386
- }(D || {});
2386
+ }(_ || {});
2387
2387
 
2388
- var _ = function(t) {
2388
+ var U = function(t) {
2389
2389
  t[t.Insert = 4] = "Insert";
2390
2390
  t[t.AutomaticNewline = 20] = "AutomaticNewline";
2391
2391
  return t;
2392
- }(_ || {});
2392
+ }(U || {});
2393
2393
 
2394
- var U = function(t) {
2394
+ var H = function(t) {
2395
2395
  t[t.AppCursorKeys = 1] = "AppCursorKeys";
2396
2396
  t[t.USASCII = 2] = "USASCII";
2397
2397
  t[t.Column132 = 3] = "Column132";
@@ -2415,9 +2415,9 @@ var U = function(t) {
2415
2415
  t[t.SaveCursor = 1048] = "SaveCursor";
2416
2416
  t[t.BracketedPaste = 2004] = "BracketedPaste";
2417
2417
  return t;
2418
- }(U || {});
2418
+ }(H || {});
2419
2419
 
2420
- var H = function(t) {
2420
+ var V = function(t) {
2421
2421
  t[t.Reset = 0] = "Reset";
2422
2422
  t[t.Bold = 1] = "Bold";
2423
2423
  t[t.Faint = 2] = "Faint";
@@ -2475,21 +2475,21 @@ var H = function(t) {
2475
2475
  t.DottedUnderline = "4:4";
2476
2476
  t.DashedUnderline = "4:5";
2477
2477
  return t;
2478
- }(H || {});
2478
+ }(V || {});
2479
2479
 
2480
- var V = "[";
2480
+ var q = "[";
2481
2481
 
2482
2482
  function cmd(t, r, i) {
2483
- if (!R && t === j.Style) {
2483
+ if (!A && t === D.Style) {
2484
2484
  return "";
2485
2485
  }
2486
- var n = V;
2487
- if (t === j.SetPrivateMode) {
2486
+ var n = q;
2487
+ if (t === D.SetPrivateMode) {
2488
2488
  n += "?";
2489
- t = j.SetMode;
2490
- } else if (t === j.UnsetPrivateMode) {
2489
+ t = D.SetMode;
2490
+ } else if (t === D.UnsetPrivateMode) {
2491
2491
  n += "?";
2492
- t = j.UnsetMode;
2492
+ t = D.UnsetMode;
2493
2493
  }
2494
2494
  if (Array.isArray(r)) {
2495
2495
  n += r.join(";");
@@ -2499,9 +2499,9 @@ function cmd(t, r, i) {
2499
2499
  return n += t;
2500
2500
  }
2501
2501
 
2502
- var q = /([\x1B\x9B][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><])/g;
2502
+ var W = /([\x1B\x9B][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><])/g;
2503
2503
 
2504
- var stripAnsi = t => t.replace(q, "");
2504
+ var stripAnsi = t => t.replace(W, "");
2505
2505
 
2506
2506
  class CLIError extends Error {
2507
2507
  constructor(t, r) {
@@ -2577,7 +2577,7 @@ function commit(t) {
2577
2577
  }
2578
2578
 
2579
2579
  function compose(t) {
2580
- var r = cmd(j.Style, [ H.Reset, H.NoInvert ]);
2580
+ var r = cmd(D.Style, [ V.Reset, V.NoInvert ]);
2581
2581
  var i = pipe(fromAsyncIterable(async function* convertError(t) {
2582
2582
  try {
2583
2583
  yield* t;
@@ -2614,9 +2614,9 @@ function compose(t) {
2614
2614
  }
2615
2615
  }
2616
2616
  if (r) {
2617
- return cmd(j.PrevLine, r) + cmd(j.DeleteLines, r + 1);
2617
+ return cmd(D.PrevLine, r) + cmd(D.DeleteLines, r + 1);
2618
2618
  } else if (stripAnsi(t)) {
2619
- return cmd(j.EraseLine, D.Backward) + cmd(j.ToColumn, 1);
2619
+ return cmd(D.EraseLine, _.Backward) + cmd(D.ToColumn, 1);
2620
2620
  } else {
2621
2621
  return "";
2622
2622
  }
@@ -2627,7 +2627,7 @@ function compose(t) {
2627
2627
  var a = e;
2628
2628
  r((r => {
2629
2629
  if (0 === r) {
2630
- L(n)(i);
2630
+ R(n)(i);
2631
2631
  } else if (0 === r.tag) {
2632
2632
  (a = r[0])(0);
2633
2633
  } else {
@@ -2642,7 +2642,7 @@ function compose(t) {
2642
2642
  }(1))));
2643
2643
  }
2644
2644
 
2645
- var W = function(t) {
2645
+ var K = function(t) {
2646
2646
  t.Bell = "";
2647
2647
  t.Newline = "\n";
2648
2648
  t.Tab = "\t";
@@ -2651,7 +2651,7 @@ var W = function(t) {
2651
2651
  return t;
2652
2652
  }({});
2653
2653
 
2654
- var K = function(t) {
2654
+ var G = function(t) {
2655
2655
  t.TopLeft = "┏";
2656
2656
  t.TopRight = "┓";
2657
2657
  t.BottomLeft = "┗";
@@ -2666,7 +2666,15 @@ var K = function(t) {
2666
2666
  return t;
2667
2667
  }({});
2668
2668
 
2669
- var G = function(t) {
2669
+ var Y = function(t) {
2670
+ t.Right = "▸";
2671
+ t.Left = "◂";
2672
+ t.Up = "▴";
2673
+ t.Down = "▾";
2674
+ return t;
2675
+ }({});
2676
+
2677
+ var J = function(t) {
2670
2678
  t.Tick = "✓";
2671
2679
  t.TickSwoosh = "✔";
2672
2680
  t.Cross = "✖";
@@ -2679,11 +2687,11 @@ var G = function(t) {
2679
2687
  return t;
2680
2688
  }({});
2681
2689
 
2682
- var Y = [ "⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏" ];
2690
+ var z = [ "⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏" ];
2683
2691
 
2684
- var J = [ "◐", "◓", "◑", "◒" ];
2692
+ var X = [ "◐", "◓", "◑", "◒" ];
2685
2693
 
2686
- var z = !!process.env.GITHUB_ACTIONS;
2694
+ var Q = !!process.env.GITHUB_ACTIONS;
2687
2695
 
2688
2696
  var toCommandValue = t => "string" == typeof t || null == t ? t ? "" + t : "" : JSON.stringify(t);
2689
2697
 
@@ -2692,7 +2700,7 @@ var escapeData = t => toCommandValue(t).replace(/%/g, "%25").replace(/\r/g, "%0D
2692
2700
  var escapeProperty = t => toCommandValue(t).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C");
2693
2701
 
2694
2702
  function githubAnnotation(t, r, i) {
2695
- if (z) {
2703
+ if (Q) {
2696
2704
  var n = `::${t}`;
2697
2705
  var a = "";
2698
2706
  if (i) {
@@ -2717,7 +2725,7 @@ function initTTY(t = {}) {
2717
2725
  var r = "dumb" !== process.env.TERM && !process.env.CI && !t.disableTTY;
2718
2726
  var i = null;
2719
2727
  var n = process.stdout;
2720
- if (z) {
2728
+ if (Q) {
2721
2729
  n = process.stderr;
2722
2730
  } else if (!n.isTTY && process.stderr.isTTY) {
2723
2731
  n = process.stderr;
@@ -2727,13 +2735,13 @@ function initTTY(t = {}) {
2727
2735
  }
2728
2736
  var a = process.argv.includes("--color");
2729
2737
  var o = "FORCE_COLOR" in process.env || !process.env.NO_COLOR && !process.env.CI;
2730
- _setColor(r && o || a || z);
2738
+ _setColor(r && o || a || Q);
2731
2739
  function _terminate(t) {
2732
2740
  !function _restore() {
2733
2741
  if (process.stdin.isTTY) {
2734
2742
  process.stdin.setRawMode(!1);
2735
2743
  }
2736
- n.write(cmd(j.Reset) + cmd(j.ResetPrivateMode) + cmd(j.SetPrivateMode, U.ShowCursor));
2744
+ n.write(cmd(D.Reset) + cmd(D.ResetPrivateMode) + cmd(D.SetPrivateMode, H.ShowCursor));
2737
2745
  }();
2738
2746
  process.exit(t);
2739
2747
  }
@@ -2771,7 +2779,7 @@ function initTTY(t = {}) {
2771
2779
  if (t.isTTY) {
2772
2780
  t.setRawMode(!0);
2773
2781
  }
2774
- f(t);
2782
+ p(t);
2775
2783
  t.setEncoding("utf8");
2776
2784
  t.resume();
2777
2785
  t.addListener("keypress", onKeypress);
@@ -2791,7 +2799,7 @@ function initTTY(t = {}) {
2791
2799
  }((function _start() {
2792
2800
  _setColor(r && o || a);
2793
2801
  if (r) {
2794
- n.write(cmd(j.UnsetPrivateMode, U.ShowCursor));
2802
+ n.write(cmd(D.UnsetPrivateMode, H.ShowCursor));
2795
2803
  process.on("SIGINT", _signal);
2796
2804
  process.on("SIGTERM", _signal);
2797
2805
  }
@@ -2799,7 +2807,7 @@ function initTTY(t = {}) {
2799
2807
  if (r) {
2800
2808
  process.removeListener("SIGINT", _signal);
2801
2809
  process.removeListener("SIGTERM", _signal);
2802
- n.write(cmd(j.Reset) + cmd(j.ResetPrivateMode) + cmd(j.SetPrivateMode, U.ShowCursor));
2810
+ n.write(cmd(D.Reset) + cmd(D.ResetPrivateMode) + cmd(D.SetPrivateMode, H.ShowCursor));
2803
2811
  }
2804
2812
  })), share);
2805
2813
  var l = pipe(concat([ pipe(s, filter((() => !1))), fromValue(null) ]), share);
@@ -2809,11 +2817,17 @@ function initTTY(t = {}) {
2809
2817
  pipeTo: i,
2810
2818
  inputSource: s,
2811
2819
  cancelSource: l,
2812
- write: function write(...t) {
2813
- n.write(text(...t));
2820
+ write: function write(...r) {
2821
+ if (!t.silent) {
2822
+ n.write(text(...r));
2823
+ }
2814
2824
  },
2815
2825
  start: function start(r) {
2816
- var write = t => n.write("" + t);
2826
+ var write = r => {
2827
+ if (!t.silent) {
2828
+ n.write("" + r);
2829
+ }
2830
+ };
2817
2831
  if (t.disableTTY) {
2818
2832
  return pipe(compose(r), onPush(write), toPromise);
2819
2833
  } else {
@@ -2825,17 +2839,17 @@ function initTTY(t = {}) {
2825
2839
  var i = [];
2826
2840
  var a = [];
2827
2841
  for (var o of t) {
2828
- if (o === _.Insert || o === _.AutomaticNewline) {
2842
+ if (o === U.Insert || o === U.AutomaticNewline) {
2829
2843
  i.push(o);
2830
2844
  } else {
2831
2845
  a.push(o);
2832
2846
  }
2833
2847
  }
2834
2848
  if (i.length) {
2835
- n.write(cmd(j.SetMode, i));
2849
+ n.write(cmd(D.SetMode, i));
2836
2850
  }
2837
2851
  if (a.length) {
2838
- n.write(cmd(j.SetPrivateMode, a));
2852
+ n.write(cmd(D.SetPrivateMode, a));
2839
2853
  }
2840
2854
  }
2841
2855
  },
@@ -2844,17 +2858,17 @@ function initTTY(t = {}) {
2844
2858
  var i = [];
2845
2859
  var a = [];
2846
2860
  for (var o of t) {
2847
- if (o === _.Insert || o === _.AutomaticNewline) {
2861
+ if (o === U.Insert || o === U.AutomaticNewline) {
2848
2862
  i.push(o);
2849
2863
  } else {
2850
2864
  a.push(o);
2851
2865
  }
2852
2866
  }
2853
2867
  if (i.length) {
2854
- n.write(cmd(j.UnsetMode, i));
2868
+ n.write(cmd(D.UnsetMode, i));
2855
2869
  }
2856
2870
  if (a.length) {
2857
- n.write(cmd(j.UnsetPrivateMode, a));
2871
+ n.write(cmd(D.UnsetPrivateMode, a));
2858
2872
  }
2859
2873
  }
2860
2874
  }
@@ -2863,7 +2877,7 @@ function initTTY(t = {}) {
2863
2877
 
2864
2878
  function indent(t, r) {
2865
2879
  if (t.includes("\n")) {
2866
- var i = t.trim().split("\n").join(text([ W.Newline, r ]));
2880
+ var i = t.trim().split("\n").join(text([ K.Newline, r ]));
2867
2881
  return t.endsWith("\n") ? i + "\n" : i;
2868
2882
  } else {
2869
2883
  return t;
@@ -2871,19 +2885,23 @@ function indent(t, r) {
2871
2885
  }
2872
2886
 
2873
2887
  function code(t) {
2874
- return text`${cmd(j.Style, H.Underline)}${t}${cmd(j.Style, H.NoUnderline)}`;
2888
+ return text`${cmd(D.Style, V.Underline)}${t}${cmd(D.Style, V.NoUnderline)}`;
2875
2889
  }
2876
2890
 
2877
2891
  function bold(t) {
2878
- return text`${cmd(j.Style, H.Bold)}${t}${cmd(j.Style, H.Normal)}`;
2892
+ return text`${cmd(D.Style, V.Bold)}${t}${cmd(D.Style, V.Normal)}`;
2879
2893
  }
2880
2894
 
2881
2895
  function hint(t) {
2882
- return text([ cmd(j.Style, H.BrightBlack), `${K.BottomLeft} `, cmd(j.Style, H.BrightBlue), `${G.Info} `, cmd(j.Style, H.Blue), indent(t, " ") ]);
2896
+ return text([ cmd(D.Style, V.BrightBlack), `${G.BottomLeft} `, cmd(D.Style, V.BrightBlue), `${J.Info} `, cmd(D.Style, V.Blue), indent(t, " ") ]);
2897
+ }
2898
+
2899
+ function projectHeader(t) {
2900
+ return text([ "\n", cmd(D.Style, V.Magenta), `${Y.Right} `, cmd(D.Style, V.Foreground), bold(t), "\n" ]);
2883
2901
  }
2884
2902
 
2885
2903
  function errorMessage$1(t) {
2886
- return error([ "\n", cmd(j.Style, [ H.Red, H.Invert ]), ` ${G.Warning} Error `, cmd(j.Style, H.NoInvert), `\n${t.trim()}\n` ]);
2904
+ return error([ "\n", cmd(D.Style, [ V.Red, V.Invert ]), ` ${J.Warning} Error `, cmd(D.Style, V.NoInvert), `\n${t.trim()}\n` ]);
2887
2905
  }
2888
2906
 
2889
2907
  function externalError(t, r) {
@@ -2892,7 +2910,7 @@ function externalError(t, r) {
2892
2910
  if (r && "object" == typeof r) {
2893
2911
  if ("name" in r && ("TSError" === r.name || "TadaError" === r.name || "code" in r)) {
2894
2912
  i = "code" in r ? "System Error" : "Error";
2895
- n = "TadaError" === r.name ? text([ cmd(j.Style, H.Blue), r.message ]) : r.message.trim();
2913
+ n = "TadaError" === r.name ? text([ cmd(D.Style, V.Blue), r.message ]) : r.message.trim();
2896
2914
  } else if ("stack" in r && "string" == typeof r.stack) {
2897
2915
  i = "Unexpected Error";
2898
2916
  n = `${r.stack}`;
@@ -2907,20 +2925,38 @@ function externalError(t, r) {
2907
2925
  i = "Unexpected Error";
2908
2926
  n = `${r}`;
2909
2927
  }
2910
- return error([ "\n", cmd(j.Style, [ H.Red, H.Invert ]), ` ${G.Warning} ${i} `, cmd(j.Style, H.NoInvert), `\n${t.trim()}\n`, cmd(j.Style, H.BrightBlack), `${K.BottomLeft} `, indent(!n.endsWith("\n") ? n + "\n" : n, " ") ]);
2928
+ return error([ "\n", cmd(D.Style, [ V.Red, V.Invert ]), ` ${J.Warning} ${i} `, cmd(D.Style, V.NoInvert), `\n${t.trim()}\n`, cmd(D.Style, V.BrightBlack), `${G.BottomLeft} `, indent(!n.endsWith("\n") ? n + "\n" : n, " ") ]);
2911
2929
  }
2912
2930
 
2913
2931
  function experimentMessage(t) {
2914
- return error([ cmd(j.Style, [ H.Yellow, H.Bold ]), `${G.Warning} Note: `, cmd(j.Style, H.Reset), `${t.trim()}\n\n` ]);
2932
+ return error([ cmd(D.Style, [ V.Yellow, V.Bold ]), `${J.Warning} Note: `, cmd(D.Style, V.Reset), `${t.trim()}\n\n` ]);
2915
2933
  }
2916
2934
 
2935
+ var loadProjects = async r => {
2936
+ var i = (await n(r)).map((r => {
2937
+ var i = t.dirname(r.tsconfigPath);
2938
+ return {
2939
+ configResult: r,
2940
+ pluginConfig: a(r.pluginConfig, r.rootPath),
2941
+ projectPath: i,
2942
+ label: t.relative(process.cwd(), r.tsconfigPath) || r.tsconfigPath
2943
+ };
2944
+ }));
2945
+ o(i.map((t => ({
2946
+ projectPath: t.projectPath,
2947
+ config: t.pluginConfig,
2948
+ label: t.label
2949
+ }))));
2950
+ return i;
2951
+ };
2952
+
2917
2953
  var directoryExists = async t => {
2918
2954
  try {
2919
- var r = await u.stat(t);
2955
+ var r = await d.stat(t);
2920
2956
  if (r.isDirectory()) {
2921
2957
  return !0;
2922
2958
  } else if (r.isSymbolicLink()) {
2923
- return directoryExists(await u.realpath(t));
2959
+ return directoryExists(await d.realpath(t));
2924
2960
  } else {
2925
2961
  return !1;
2926
2962
  }
@@ -2941,27 +2977,27 @@ var writeOutput = async (t, r) => {
2941
2977
  }));
2942
2978
  }));
2943
2979
  }
2944
- var n = i("string" != typeof t ? await u.realpath(t) : t);
2980
+ var n = i("string" != typeof t ? await d.realpath(t) : t);
2945
2981
  if (!await directoryExists(n)) {
2946
- await u.mkdir(n, {
2982
+ await d.mkdir(n, {
2947
2983
  recursive: !0
2948
2984
  });
2949
2985
  }
2950
- if (!await (o = t, u.stat(o).then((t => t.isFile())).catch((() => !1)))) {
2951
- await u.writeFile(t, r);
2986
+ if (!await (o = t, d.stat(o).then((t => t.isFile())).catch((() => !1)))) {
2987
+ await d.writeFile(t, r);
2952
2988
  } else {
2953
2989
  var a = t + ".tmp";
2954
- await u.writeFile(a, r);
2990
+ await d.writeFile(a, r);
2955
2991
  try {
2956
- await u.rename(a, t);
2992
+ await d.rename(a, t);
2957
2993
  } catch (t) {
2958
- await u.unlink(a);
2994
+ await d.unlink(a);
2959
2995
  throw t;
2960
2996
  } finally {
2961
2997
  await (async t => {
2962
2998
  try {
2963
2999
  var r = new Date;
2964
- await u.utimes(t, r, r);
3000
+ await d.utimes(t, r, r);
2965
3001
  } catch (t) {}
2966
3002
  })(t);
2967
3003
  }
@@ -2970,82 +3006,92 @@ var writeOutput = async (t, r) => {
2970
3006
  };
2971
3007
 
2972
3008
  function summary$1(t) {
2973
- var r = text([ cmd(j.Style, H.BrightGreen), `${G.Tick} Introspection output was generated successfully\n` ]);
3009
+ var r = text([ cmd(D.Style, V.BrightGreen), `${J.Tick} Introspection output was generated successfully\n` ]);
2974
3010
  if (t) {
2975
3011
  r += hint(`The pipe output was generated in the ${code(".d.ts")} format.\nFor the ${code(".ts")} format, pass the ${code("--force-ts-format")} argument.\n`);
2976
3012
  }
2977
3013
  return r;
2978
3014
  }
2979
3015
 
2980
- async function* run$5(r, i) {
2981
- var c;
2982
- var u;
3016
+ async function* run$5(t, r) {
3017
+ var i;
2983
3018
  try {
2984
- c = await n(i.tsconfig);
2985
- u = a(c.pluginConfig, c.rootPath);
3019
+ i = await loadProjects(r.tsconfig);
2986
3020
  } catch (t) {
2987
3021
  throw externalError("Failed to load configuration.", t);
2988
3022
  }
2989
- var d = o(u);
3023
+ if (i.length > 1 && (r.output || t.pipeTo)) {
3024
+ throw errorMessage$1("Output path was specified, while multiple projects are configured.\n" + hint(`You can only output all projects to their ${code('"tadaOutputLocation"')} options\nwhen multiple projects are set up through ${code('"references"')}.`));
3025
+ }
3026
+ for (var n of i) {
3027
+ if (i.length > 1) {
3028
+ yield projectHeader(n.label);
3029
+ }
3030
+ yield* runProject$2(t, r, n);
3031
+ }
3032
+ }
3033
+
3034
+ async function* runProject$2(r, i, n) {
3035
+ var {pluginConfig: a, projectPath: o} = n;
3036
+ var u = s(a);
2990
3037
  try {
2991
- d = await d.load({
2992
- rootPath: t.dirname(c.configPath)
3038
+ u = await u.load({
3039
+ rootPath: o
2993
3040
  });
2994
3041
  } catch (t) {
2995
3042
  throw externalError("Failed to load schema(s).", t);
2996
3043
  }
2997
- var f = t.dirname(c.configPath);
2998
- if ("schema" in u) {
2999
- var g = d.current;
3000
- var p;
3044
+ if ("schema" in a) {
3045
+ var d = u.current;
3046
+ var f;
3001
3047
  if (!i.output && r.pipeTo) {
3002
- p = r.pipeTo;
3048
+ f = r.pipeTo;
3003
3049
  } else if (i.output) {
3004
- p = t.resolve(process.cwd(), i.output);
3005
- } else if (u.tadaOutputLocation) {
3006
- p = u.tadaOutputLocation;
3050
+ f = t.resolve(process.cwd(), i.output);
3051
+ } else if (a.tadaOutputLocation) {
3052
+ f = t.resolve(o, a.tadaOutputLocation);
3007
3053
  } else {
3008
3054
  throw errorMessage$1("No output path was specified to write the output file to.\n" + hint(`You have to either set ${code('"tadaOutputLocation"')} in your configuration,\npass an ${code("--output")} argument to this command,\nor pipe this command to an output file.`));
3009
3055
  }
3010
- var h;
3056
+ var p;
3011
3057
  try {
3012
- h = s(l(g.introspection), {
3013
- fileType: p && "string" == typeof p ? p : i.forceTSFormat ? ".ts" : ".d.ts",
3058
+ p = l(c(d.introspection), {
3059
+ fileType: f && "string" == typeof f ? f : i.forceTSFormat ? ".ts" : ".d.ts",
3014
3060
  shouldPreprocess: !i.disablePreprocessing
3015
3061
  });
3016
3062
  } catch (t) {
3017
3063
  throw externalError("Could not generate introspection output", t);
3018
3064
  }
3019
3065
  try {
3020
- await writeOutput(p, h);
3066
+ await writeOutput(f, p);
3021
3067
  } catch (t) {
3022
3068
  throw externalError("Something went wrong while writing the introspection file", t);
3023
3069
  }
3024
- yield summary$1(!i.forceTSFormat && "string" != typeof p);
3070
+ yield summary$1(!i.forceTSFormat && "string" != typeof f);
3025
3071
  } else {
3026
3072
  if (i.output) {
3027
3073
  throw errorMessage$1("Output path was specified, while multiple schemas are configured.\n" + hint(`You can only output all schemas to their ${code('"tadaOutputLocation"')} options\nwhen multiple ${code("schemas")} are set up.`));
3028
3074
  }
3029
- for (var m in d.multi) {
3030
- var v = d.multi[m];
3031
- if (!v) {
3075
+ for (var g in u.multi) {
3076
+ var h = u.multi[g];
3077
+ if (!h) {
3032
3078
  continue;
3033
- } else if (!v.tadaOutputLocation) {
3034
- throw errorMessage$1(`No output path was specified to write the '${m}' schema to.\n` + hint(`You have to set ${code('"tadaOutputLocation"')} in each schema configuration.`));
3079
+ } else if (!h.tadaOutputLocation) {
3080
+ throw errorMessage$1(`No output path was specified to write the '${g}' schema to.\n` + hint(`You have to set ${code('"tadaOutputLocation"')} in each schema configuration.`));
3035
3081
  }
3036
- var y = void 0;
3082
+ var v = void 0;
3037
3083
  try {
3038
- y = s(l(v.introspection), {
3039
- fileType: v.tadaOutputLocation,
3084
+ v = l(c(h.introspection), {
3085
+ fileType: h.tadaOutputLocation,
3040
3086
  shouldPreprocess: !i.disablePreprocessing
3041
3087
  });
3042
3088
  } catch (t) {
3043
- throw externalError(`Could not generate any output for the '${m}' schema`, t);
3089
+ throw externalError(`Could not generate any output for the '${g}' schema`, t);
3044
3090
  }
3045
3091
  try {
3046
- await writeOutput(t.resolve(f, v.tadaOutputLocation), y);
3092
+ await writeOutput(t.resolve(o, h.tadaOutputLocation), v);
3047
3093
  } catch (t) {
3048
- throw externalError(`Something went wrong while writing the '${m}' schema's output`, t);
3094
+ throw externalError(`Something went wrong while writing the '${g}' schema's output`, t);
3049
3095
  }
3050
3096
  }
3051
3097
  yield summary$1();
@@ -3081,7 +3127,8 @@ class GenerateOutputCommand extends Command {
3081
3127
 
3082
3128
  async function generateOutput(t) {
3083
3129
  var r = initTTY({
3084
- disableTTY: !0
3130
+ disableTTY: !0,
3131
+ silent: t.silent
3085
3132
  });
3086
3133
  var i = await r.start(run$5(r, t));
3087
3134
  if (i instanceof Error) {
@@ -3089,41 +3136,41 @@ async function generateOutput(t) {
3089
3136
  }
3090
3137
  }
3091
3138
 
3092
- var X = process.cwd();
3139
+ var Z = process.cwd();
3093
3140
 
3094
- var Q = " ";
3141
+ var ee = " ";
3095
3142
 
3096
3143
  function warningFile$1(r) {
3097
- var i = t.relative(X, r);
3144
+ var i = t.relative(Z, r);
3098
3145
  if (!i.startsWith("..")) {
3099
3146
  r = i;
3100
3147
  }
3101
- return text([ cmd(j.Style, H.Underline), r, cmd(j.Style, H.NoUnderline), "\n" ]);
3148
+ return text([ cmd(D.Style, V.Underline), r, cmd(D.Style, V.NoUnderline), "\n" ]);
3102
3149
  }
3103
3150
 
3104
3151
  var documentSummary$1 = t => {
3105
3152
  var r = "";
3106
3153
  if ("number" != typeof t ? Object.values(t).every((t => !t)) : !t) {
3107
- r += text([ cmd(j.Style, H.Blue), `${G.Info} No persisted documents were found `, cmd(j.Style, H.BrightBlack), "(Persisted manifests were not generated)\n" ]);
3154
+ r += text([ cmd(D.Style, V.Blue), `${J.Info} No persisted documents were found `, cmd(D.Style, V.BrightBlack), "(Persisted manifests were not generated)\n" ]);
3108
3155
  } else if ("number" == typeof t) {
3109
- r += text([ cmd(j.Style, H.BrightGreen), `${G.Tick} Persisted manifest was generated successfully `, cmd(j.Style, H.BrightBlack), `(${t} documents extracted)\n` ]);
3156
+ r += text([ cmd(D.Style, V.BrightGreen), `${J.Tick} Persisted manifest was generated successfully `, cmd(D.Style, V.BrightBlack), `(${t} documents extracted)\n` ]);
3110
3157
  } else {
3111
- r += text([ cmd(j.Style, H.BrightGreen), `${G.Tick} Persisted manifests were generated successfully.\n` ]);
3158
+ r += text([ cmd(D.Style, V.BrightGreen), `${J.Tick} Persisted manifests were generated successfully.\n` ]);
3112
3159
  for (var i in t) {
3113
- r += text([ cmd(j.Style, H.BrightBlack), `${K.BottomLeft} `, cmd(j.Style, H.BrightBlue), `${t[i]} documents extracted for the '${i}' schema\n` ]);
3160
+ r += text([ cmd(D.Style, V.BrightBlack), `${G.BottomLeft} `, cmd(D.Style, V.BrightBlue), `${t[i]} documents extracted for the '${i}' schema\n` ]);
3114
3161
  }
3115
3162
  }
3116
3163
  return r;
3117
3164
  };
3118
3165
 
3119
3166
  function warningSummary$1(t) {
3120
- return error([ cmd(j.Style, H.Red), `${G.Cross} ${t} warnings\n` ]);
3167
+ return error([ cmd(D.Style, V.Red), `${J.Cross} ${t} warnings\n` ]);
3121
3168
  }
3122
3169
 
3123
3170
  function infoSummary$2(t, r) {
3124
3171
  var i = "";
3125
3172
  if (t) {
3126
- i += text([ cmd(j.Style, H.BrightYellow), G.Warning, ` ${t} warnings\n` ]);
3173
+ i += text([ cmd(D.Style, V.BrightYellow), J.Warning, ` ${t} warnings\n` ]);
3127
3174
  }
3128
3175
  return i += documentSummary$1(r);
3129
3176
  }
@@ -3138,85 +3185,109 @@ function warningGithub$1(t) {
3138
3185
 
3139
3186
  function runningPersisted(t, r) {
3140
3187
  var i = t ? r ? `(${t}/${r})` : `(${t})` : "";
3141
- var frame = t => text([ cmd(j.Style, H.Magenta), Y[t % Y.length], " ", cmd(j.Style, H.Foreground), `Scanning files${W.Ellipsis} `, cmd(j.Style, H.BrightBlack), i ]);
3188
+ var frame = t => text([ cmd(D.Style, V.Magenta), z[t % z.length], " ", cmd(D.Style, V.Foreground), `Scanning files${K.Ellipsis} `, cmd(D.Style, V.BrightBlack), i ]);
3142
3189
  return concat([ fromValue(frame(0)), pipe(interval(150), map((t => frame(t + 1)))) ]);
3143
3190
  }
3144
3191
 
3145
- async function* run$4(r, i) {
3146
- var {runPersisted: o} = await import("./thread-chunk.mjs");
3147
- var s;
3148
- var l;
3192
+ async function* run$4(t, r) {
3193
+ var i;
3149
3194
  try {
3150
- s = await n(i.tsconfig);
3151
- l = a(s.pluginConfig, s.rootPath);
3195
+ i = await loadProjects(r.tsconfig);
3152
3196
  } catch (t) {
3153
3197
  throw externalError("Failed to load configuration.", t);
3154
3198
  }
3199
+ if (i.length > 1 && (r.output || t.pipeTo)) {
3200
+ throw errorMessage$1("Output path was specified, while multiple projects are configured.\n" + hint(`You can only output all projects to their ${code('"tadaPersistedLocation"')} options\nwhen multiple projects are set up through ${code('"references"')}.`));
3201
+ }
3202
+ var n = 0;
3203
+ var a = !1;
3204
+ for (var o of i) {
3205
+ if (i.length > 1) {
3206
+ yield projectHeader(o.label);
3207
+ }
3208
+ var s = yield* runProject$1(t, r, o, i.length > 1);
3209
+ n += s.warnings;
3210
+ a = a || s.failed;
3211
+ }
3212
+ if (a) {
3213
+ throw warningSummary$1(n);
3214
+ }
3215
+ }
3216
+
3217
+ async function* runProject$1(r, i, n, a) {
3218
+ var {runPersisted: o} = await import("./thread-chunk.mjs");
3219
+ var {pluginConfig: s, projectPath: l} = n;
3155
3220
  if (r.isInteractive) {
3156
3221
  yield runningPersisted();
3157
3222
  }
3158
3223
  var c = o({
3159
3224
  disableNormalization: !!i.disableNormalization,
3160
- rootPath: s.rootPath,
3161
- configPath: s.configPath,
3162
- pluginConfig: l
3225
+ rootPath: n.configResult.rootPath,
3226
+ tsconfigPath: n.configResult.tsconfigPath,
3227
+ configPath: n.configResult.configPath,
3228
+ pluginConfig: s
3163
3229
  });
3164
3230
  var u = [];
3165
3231
  var d = 0;
3166
3232
  var f = 0;
3167
- var g = 0;
3233
+ var p = 0;
3168
3234
  try {
3169
3235
  if (r.isInteractive) {
3170
3236
  yield runningPersisted();
3171
3237
  }
3172
- for await (var p of c) {
3173
- if ("EXTERNAL_WARNING" === p.kind) {
3238
+ for await (var g of c) {
3239
+ if ("EXTERNAL_WARNING" === g.kind) {
3174
3240
  yield experimentMessage(`${code(".vue")} and ${code(".svelte")} file support is experimental.`);
3175
- } else if ("FILE_COUNT" === p.kind) {
3176
- f = p.fileCount;
3241
+ } else if ("FILE_COUNT" === g.kind) {
3242
+ f = g.fileCount;
3177
3243
  } else {
3178
- g++;
3179
- u.push(...p.documents);
3180
- d += p.warnings.length;
3181
- if (p.warnings.length) {
3182
- var h = warningFile$1(p.filePath);
3183
- for (var m of p.warnings) {
3184
- h += (v = m, text([ Q, cmd(j.Style, H.BrightBlack), `${v.line}:${v.col}`, W.Tab, cmd(j.Style, H.Foreground), indent(v.message.trim(), text([ Q, W.Tab ])), W.Newline ]));
3185
- warningGithub$1(m);
3244
+ p++;
3245
+ u.push(...g.documents);
3246
+ d += g.warnings.length;
3247
+ if (g.warnings.length) {
3248
+ var h = warningFile$1(g.filePath);
3249
+ for (var v of g.warnings) {
3250
+ h += (m = v, text([ ee, cmd(D.Style, V.BrightBlack), `${m.line}:${m.col}`, K.Tab, cmd(D.Style, V.Foreground), indent(m.message.trim(), text([ ee, K.Tab ])), K.Newline ]));
3251
+ warningGithub$1(v);
3186
3252
  }
3187
3253
  yield h + "\n";
3188
3254
  }
3189
3255
  }
3190
3256
  if (r.isInteractive) {
3191
- yield runningPersisted(g, f);
3257
+ yield runningPersisted(p, f);
3192
3258
  }
3193
3259
  }
3194
3260
  } catch (t) {
3195
3261
  throw externalError("Could not generate persisted manifest file", t);
3196
3262
  }
3197
- var v;
3198
- var y = t.dirname(s.configPath);
3199
- if ("schema" in l) {
3200
- var S;
3263
+ var m;
3264
+ if ("schema" in s) {
3265
+ var y;
3201
3266
  if (!i.output && r.pipeTo) {
3202
- S = r.pipeTo;
3267
+ y = r.pipeTo;
3203
3268
  } else if (i.output) {
3204
- S = t.resolve(process.cwd(), i.output);
3205
- } else if (l.tadaPersistedLocation) {
3206
- S = t.resolve(t.dirname(s.configPath), l.tadaPersistedLocation);
3269
+ y = t.resolve(process.cwd(), i.output);
3270
+ } else if (s.tadaPersistedLocation) {
3271
+ y = t.resolve(l, s.tadaPersistedLocation);
3207
3272
  } else {
3208
3273
  throw errorMessage$1("No output path was specified to write the persisted manifest file to.\n" + hint(`You have to either set ${code('"tadaPersistedLocation"')} in your configuration,\npass an ${code("--output")} argument to this command,\nor pipe this command to an output file.`));
3209
3274
  }
3210
3275
  if (d && i.failOnWarn) {
3211
- throw warningSummary$1(d);
3276
+ if (!a) {
3277
+ throw warningSummary$1(d);
3278
+ }
3279
+ return {
3280
+ warnings: d,
3281
+ failed: !0
3282
+ };
3212
3283
  } else if (u.length) {
3213
3284
  try {
3214
3285
  var w = {};
3215
- for (var b of u) {
3216
- w[b.hashKey] = b.document;
3286
+ for (var S of u) {
3287
+ w[S.hashKey] = S.document;
3217
3288
  }
3218
- var E = JSON.stringify(w, null, 2);
3219
- await writeOutput(S, E);
3289
+ var b = JSON.stringify(w, null, 2);
3290
+ await writeOutput(y, b);
3220
3291
  } catch (t) {
3221
3292
  throw externalError("Something went wrong while writing the persisted manifest file.", t);
3222
3293
  }
@@ -3226,35 +3297,45 @@ async function* run$4(r, i) {
3226
3297
  if (i.output) {
3227
3298
  throw errorMessage$1("Output path was specified, while multiple schemas are configured.\n" + hint(`You can only output all schemas to their ${code('"tadaPersistedLocation"')} options\nwhen multiple ${code("schemas")} are set up.`));
3228
3299
  }
3229
- var x = {};
3230
- for (var C of l.schemas) {
3231
- var {name: O, tadaPersistedLocation: $} = C;
3232
- if (!$) {
3233
- throw errorMessage$1(`No output path was specified to write the '${O}' schema to.\n` + hint(`You have to set ${code('"tadaPersistedLocation"')} in each schema configuration.`));
3300
+ var E = {};
3301
+ for (var x of s.schemas) {
3302
+ var {name: $, tadaPersistedLocation: C} = x;
3303
+ if (!C) {
3304
+ throw errorMessage$1(`No output path was specified to write the '${$}' schema to.\n` + hint(`You have to set ${code('"tadaPersistedLocation"')} in each schema configuration.`));
3234
3305
  }
3235
3306
  try {
3236
- x[O] = 0;
3237
- var k = {};
3238
- for (var N of u) {
3239
- if (N.schemaName === O) {
3240
- k[N.hashKey] = N.document;
3241
- x[O]++;
3307
+ E[$] = 0;
3308
+ var O = {};
3309
+ for (var k of u) {
3310
+ if (k.schemaName === $) {
3311
+ O[k.hashKey] = k.document;
3312
+ E[$]++;
3242
3313
  }
3243
3314
  }
3244
- if (x[O]) {
3245
- var I = JSON.stringify(k, null, 2);
3246
- await writeOutput(t.resolve(y, $), I);
3315
+ if (E[$]) {
3316
+ var N = JSON.stringify(O, null, 2);
3317
+ await writeOutput(t.resolve(l, C), N);
3247
3318
  }
3248
3319
  } catch (t) {
3249
- throw externalError(`Something went wrong while writing the '${O}' schema's persisted manifest file.`, t);
3320
+ throw externalError(`Something went wrong while writing the '${$}' schema's persisted manifest file.`, t);
3250
3321
  }
3251
3322
  }
3252
3323
  if (d && i.failOnWarn) {
3253
- throw warningSummary$1(d);
3324
+ if (!a) {
3325
+ throw warningSummary$1(d);
3326
+ }
3327
+ return {
3328
+ warnings: d,
3329
+ failed: !0
3330
+ };
3254
3331
  } else {
3255
- yield infoSummary$2(d, x);
3332
+ yield infoSummary$2(d, E);
3256
3333
  }
3257
3334
  }
3335
+ return {
3336
+ warnings: d,
3337
+ failed: !1
3338
+ };
3258
3339
  }
3259
3340
 
3260
3341
  class GeneratePersisted extends Command {
@@ -3293,7 +3374,7 @@ async function generatePersisted(t) {
3293
3374
  }
3294
3375
  }
3295
3376
 
3296
- var Z = /^[a-zA-Z_][a-zA-Z0-9_]*$/;
3377
+ var te = /^[a-zA-Z_][a-zA-Z0-9_]*$/;
3297
3378
 
3298
3379
  function getPrintable(t) {
3299
3380
  if (null === t) {
@@ -3318,7 +3399,7 @@ function computeKey(t, r) {
3318
3399
  var i, n, a;
3319
3400
  if ("number" == typeof r) {
3320
3401
  return `${null !== (i = null == t ? void 0 : t.p) && void 0 !== i ? i : "."}[${r}]`;
3321
- } else if (Z.test(r)) {
3402
+ } else if (te.test(r)) {
3322
3403
  return `${null !== (n = null == t ? void 0 : t.p) && void 0 !== n ? n : ""}.${r}`;
3323
3404
  } else {
3324
3405
  return `${null !== (a = null == t ? void 0 : t.p) && void 0 !== a ? a : "."}[${JSON.stringify(r)}]`;
@@ -3482,13 +3563,13 @@ var isOneOf = (t, {exclusive: r = !1} = {}) => makeValidator({
3482
3563
  var c = void 0 !== (null == n ? void 0 : n.errors) ? [] : void 0;
3483
3564
  for (var u = 0, d = t.length; u < d; ++u) {
3484
3565
  var f = void 0 !== (null == n ? void 0 : n.errors) ? [] : void 0;
3485
- var g = void 0 !== (null == n ? void 0 : n.coercions) ? [] : void 0;
3566
+ var p = void 0 !== (null == n ? void 0 : n.coercions) ? [] : void 0;
3486
3567
  if (t[u](i, Object.assign(Object.assign({}, n), {
3487
3568
  errors: f,
3488
- coercions: g,
3569
+ coercions: p,
3489
3570
  p: `${null !== (a = null == n ? void 0 : n.p) && void 0 !== a ? a : "."}#${u + 1}`
3490
3571
  }))) {
3491
- l.push([ `#${u + 1}`, g ]);
3572
+ l.push([ `#${u + 1}`, p ]);
3492
3573
  if (!r) {
3493
3574
  break;
3494
3575
  }
@@ -3497,9 +3578,9 @@ var isOneOf = (t, {exclusive: r = !1} = {}) => makeValidator({
3497
3578
  }
3498
3579
  }
3499
3580
  if (1 === l.length) {
3500
- var [, p] = l[0];
3501
- if (void 0 !== p) {
3502
- null === (o = null == n ? void 0 : n.coercions) || void 0 === o || o.push(...p);
3581
+ var [, g] = l[0];
3582
+ if (void 0 !== g) {
3583
+ null === (o = null == n ? void 0 : n.coercions) || void 0 === o || o.push(...g);
3503
3584
  }
3504
3585
  return !0;
3505
3586
  }
@@ -3584,17 +3665,17 @@ function cascade(t, ...r) {
3584
3665
  });
3585
3666
  }
3586
3667
 
3587
- var ee;
3668
+ var re;
3588
3669
 
3589
3670
  !function(t) {
3590
3671
  t.Forbids = "Forbids";
3591
3672
  t.Requires = "Requires";
3592
- }(ee || (ee = {}));
3673
+ }(re || (re = {}));
3593
3674
 
3594
- var te = {
3675
+ var ie = {
3595
3676
  __proto__: null,
3596
3677
  get KeyRelationship() {
3597
- return ee;
3678
+ return re;
3598
3679
  },
3599
3680
  applyCascade: function applyCascade(t, ...r) {
3600
3681
  return cascade(t, Array.isArray(r[0]) ? r[0] : r);
@@ -3621,53 +3702,55 @@ var te = {
3621
3702
  };
3622
3703
 
3623
3704
  async function* run$3(t, i) {
3624
- var o = i.headers ? {
3705
+ var n = i.headers ? {
3625
3706
  url: i.input,
3626
3707
  headers: i.headers
3627
3708
  } : i.input;
3628
- var s = c({
3709
+ var a = u({
3629
3710
  rootPath: process.cwd(),
3630
- origin: o
3711
+ origin: n
3631
3712
  });
3632
- var l;
3713
+ var o;
3633
3714
  try {
3634
- l = (await s.load()).schema;
3715
+ o = (await a.load()).schema;
3635
3716
  } catch (t) {
3636
3717
  throw externalError("Failed to load schema.", t);
3637
3718
  }
3638
- var u;
3719
+ var s;
3639
3720
  if (!i.output && t.pipeTo) {
3640
- u = t.pipeTo;
3721
+ s = t.pipeTo;
3641
3722
  } else if (i.output) {
3642
- u = r.resolve(process.cwd(), i.output);
3723
+ s = r.resolve(process.cwd(), i.output);
3643
3724
  } else {
3644
- var d;
3645
- var f;
3725
+ var l;
3646
3726
  try {
3647
- d = await n(i.tsconfig);
3648
- f = a(d.pluginConfig, d.rootPath);
3727
+ l = await loadProjects(i.tsconfig);
3649
3728
  } catch (t) {
3650
3729
  throw externalError("Failed to load configuration.", t);
3651
3730
  }
3652
- if ("schema" in f && "string" == typeof f.schema && ".graphql" === r.extname(f.schema)) {
3653
- u = r.resolve(r.dirname(d.configPath), f.schema);
3654
- } else if (!("schema" in f)) {
3731
+ if (l.length > 1) {
3732
+ throw errorMessage$1(`Output path cannot be automatically determined when multiple projects are configured,\nbecause multiple projects are set up through ${code('"references"')}.` + hint(`You have to explicitly pass an ${code("--output")} argument to this command,\nor pipe this command to an output file.`));
3733
+ }
3734
+ var {pluginConfig: c, projectPath: d} = l[0];
3735
+ if ("schema" in c && "string" == typeof c.schema && ".graphql" === r.extname(c.schema)) {
3736
+ s = r.resolve(d, c.schema);
3737
+ } else if (!("schema" in c)) {
3655
3738
  throw errorMessage$1(`Output path cannot be automatically determined when multiple schemas are configured,\nbecause multiple ${code("schemas")} are set up.` + hint(`You have to explicitly pass an ${code("--output")} argument to this command,\nor pipe this command to an output file.`));
3656
3739
  } else {
3657
3740
  throw errorMessage$1(`Output path cannot be automatically determined,\nbecause ${code("schema")} is not a file path.\n` + hint(`You have to either set ${code('"schema"')} in your configuration to a ${code(".graphql")} file,\npass an ${code("--output")} argument to this command,\nor pipe this command to an output file.`));
3658
3741
  }
3659
3742
  }
3660
3743
  try {
3661
- await writeOutput(u, g(l));
3744
+ await writeOutput(s, g(o));
3662
3745
  } catch (t) {
3663
3746
  throw externalError("Something went wrong while writing the introspection file", t);
3664
3747
  }
3665
3748
  yield function summary() {
3666
- return text([ cmd(j.Style, H.BrightGreen), `${G.Tick} Schema was generated successfully\n` ]);
3749
+ return text([ cmd(D.Style, V.BrightGreen), `${J.Tick} Schema was generated successfully\n` ]);
3667
3750
  }();
3668
3751
  }
3669
3752
 
3670
- var re = isArray(cascade(isString(), matchesRegExp(/^[\w-]+[ ]*:[ ]*.+/i)));
3753
+ var ne = isArray(cascade(isString(), matchesRegExp(/^[\w-]+[ ]*:[ ]*.+/i)));
3671
3754
 
3672
3755
  var parseHeaders = t => {
3673
3756
  if (t && t.length) {
@@ -3727,7 +3810,7 @@ class GenerateSchema extends Command {
3727
3810
  });
3728
3811
  }("--header", {
3729
3812
  description: "Headers to be used when introspection a schema from a remote URL",
3730
- validator: re
3813
+ validator: ne
3731
3814
  });
3732
3815
  async execute() {
3733
3816
  var t = initTTY();
@@ -3743,7 +3826,8 @@ class GenerateSchema extends Command {
3743
3826
 
3744
3827
  async function generateSchema(t) {
3745
3828
  var r = initTTY({
3746
- disableTTY: !0
3829
+ disableTTY: !0,
3830
+ silent: t.silent
3747
3831
  });
3748
3832
  var i = await r.start(run$3(r, t));
3749
3833
  if (i instanceof Error) {
@@ -3751,41 +3835,45 @@ async function generateSchema(t) {
3751
3835
  }
3752
3836
  }
3753
3837
 
3754
- var ie = process.cwd();
3838
+ var ae = process.cwd();
3755
3839
 
3756
- var ne = " ";
3840
+ var oe = " ";
3757
3841
 
3758
3842
  function warningFile(r) {
3759
- var i = t.relative(ie, r);
3843
+ var i = t.relative(ae, r);
3760
3844
  if (!i.startsWith("..")) {
3761
3845
  r = i;
3762
3846
  }
3763
- return text([ cmd(j.Style, H.Underline), r, cmd(j.Style, H.NoUnderline), "\n" ]);
3847
+ return text([ cmd(D.Style, V.Underline), r, cmd(D.Style, V.NoUnderline), "\n" ]);
3764
3848
  }
3765
3849
 
3766
- var documentSummary = t => {
3767
- var r = "";
3850
+ var reusedLabel = t => t ? `, ${t} reused` : "";
3851
+
3852
+ var documentSummary = (t, r) => {
3853
+ var i = "";
3768
3854
  if ("number" == typeof t) {
3769
- r += text([ cmd(j.Style, H.BrightGreen), `${G.Tick} Type cache was generated successfully `, cmd(j.Style, H.BrightBlack), `(${t} document types cached)\n` ]);
3855
+ var n = reusedLabel("number" == typeof r ? r : void 0);
3856
+ i += text([ cmd(D.Style, V.BrightGreen), `${J.Tick} Type cache was generated successfully `, cmd(D.Style, V.BrightBlack), `(${t} document types cached${n})\n` ]);
3770
3857
  } else {
3771
- r += text([ cmd(j.Style, H.BrightGreen), `${G.Tick} Type caches were generated successfully.\n` ]);
3772
- for (var i in t) {
3773
- r += text([ cmd(j.Style, H.BrightBlack), `${K.BottomLeft} `, cmd(j.Style, H.BrightBlue), `${t[i]} document types cached for the '${i}' schema\n` ]);
3858
+ i += text([ cmd(D.Style, V.BrightGreen), `${J.Tick} Type caches were generated successfully.\n` ]);
3859
+ for (var a in t) {
3860
+ var o = reusedLabel(r && "number" != typeof r ? r[a] : void 0);
3861
+ i += text([ cmd(D.Style, V.BrightBlack), `${G.BottomLeft} `, cmd(D.Style, V.BrightBlue), `${t[a]} document types cached for the '${a}' schema${o}\n` ]);
3774
3862
  }
3775
3863
  }
3776
- return r;
3864
+ return i;
3777
3865
  };
3778
3866
 
3779
3867
  function warningSummary(t) {
3780
- return error([ cmd(j.Style, H.Red), `${G.Cross} ${t} warnings\n` ]);
3868
+ return error([ cmd(D.Style, V.Red), `${J.Cross} ${t} warnings\n` ]);
3781
3869
  }
3782
3870
 
3783
- function infoSummary$1(t, r) {
3784
- var i = "";
3871
+ function infoSummary$1(t, r, i) {
3872
+ var n = "";
3785
3873
  if (t) {
3786
- i += text([ cmd(j.Style, H.BrightYellow), G.Warning, ` ${t} warnings\n` ]);
3874
+ n += text([ cmd(D.Style, V.BrightYellow), J.Warning, ` ${t} warnings\n` ]);
3787
3875
  }
3788
- return i += documentSummary(r);
3876
+ return n += documentSummary(r, i);
3789
3877
  }
3790
3878
 
3791
3879
  function warningGithub(t) {
@@ -3798,167 +3886,211 @@ function warningGithub(t) {
3798
3886
 
3799
3887
  function runningTurbo(t, r) {
3800
3888
  var i = t ? r ? `(${t}/${r})` : `(${t})` : "";
3801
- var frame = t => text([ cmd(j.Style, H.Magenta), Y[t % Y.length], " ", cmd(j.Style, H.Foreground), `Scanning files${W.Ellipsis} `, cmd(j.Style, H.BrightBlack), i ]);
3889
+ var frame = t => text([ cmd(D.Style, V.Magenta), z[t % z.length], " ", cmd(D.Style, V.Foreground), `Scanning files${K.Ellipsis} `, cmd(D.Style, V.BrightBlack), i ]);
3802
3890
  return concat([ fromValue(frame(0)), pipe(interval(150), map((t => frame(t + 1)))) ]);
3803
3891
  }
3804
3892
 
3805
- var ae = [ "/* eslint-disable */", "/* prettier-ignore */" ].join("\n") + "\n";
3893
+ var se = [ "/* eslint-disable */", "/* prettier-ignore */" ].join("\n") + "\n";
3806
3894
 
3807
- async function* run$2(r, i) {
3808
- var {runTurbo: o} = await import("./thread-chunk2.mjs");
3809
- var s;
3810
- var l;
3895
+ async function* run$2(t, r) {
3896
+ var i;
3811
3897
  try {
3812
- s = await n(i.tsconfig);
3813
- l = a(s.pluginConfig, s.rootPath);
3898
+ i = await loadProjects(r.tsconfig);
3814
3899
  } catch (t) {
3815
3900
  throw externalError("Failed to load configuration.", t);
3816
3901
  }
3817
- var c = t.dirname(s.configPath);
3818
- var u;
3819
- var d = [];
3820
- if ("schema" in l) {
3902
+ if (i.length > 1 && (r.output || t.pipeTo)) {
3903
+ throw errorMessage$1("Output path was specified, while multiple projects are configured.\n" + hint(`You can only output all projects to their ${code('"tadaTurboLocation"')} options\nwhen multiple projects are set up through ${code('"references"')}.`));
3904
+ }
3905
+ var n = 0;
3906
+ var a = !1;
3907
+ for (var o of i) {
3908
+ if (i.length > 1) {
3909
+ yield projectHeader(o.label);
3910
+ }
3911
+ var s = yield* runProject(t, r, o, i.length > 1);
3912
+ n += s.warnings;
3913
+ a = a || s.failed;
3914
+ }
3915
+ if (a) {
3916
+ throw warningSummary(n);
3917
+ }
3918
+ }
3919
+
3920
+ async function* runProject(r, i, n, a) {
3921
+ var {runTurbo: o} = await import("./thread-chunk2.mjs");
3922
+ var {pluginConfig: s, projectPath: l} = n;
3923
+ var c;
3924
+ var u = [];
3925
+ if ("schema" in s) {
3821
3926
  if (!i.output && r.pipeTo) {
3822
- u = r.pipeTo;
3927
+ c = r.pipeTo;
3823
3928
  } else if (i.output) {
3824
- u = t.resolve(process.cwd(), i.output);
3825
- } else if (l.tadaTurboLocation) {
3826
- u = t.resolve(c, l.tadaTurboLocation);
3827
- } else if (l.tadaOutputLocation) {
3828
- u = t.resolve(c, l.tadaOutputLocation, "..", "graphql-cache.d.ts");
3929
+ c = t.resolve(process.cwd(), i.output);
3930
+ } else if (s.tadaTurboLocation) {
3931
+ c = t.resolve(l, s.tadaTurboLocation);
3932
+ } else if (s.tadaOutputLocation) {
3933
+ c = t.resolve(l, s.tadaOutputLocation, "..", "graphql-cache.d.ts");
3829
3934
  yield function hintMessage$1(t) {
3830
- return error([ cmd(j.Style, [ H.Yellow, H.Bold ]), `${G.Warning} Note: `, cmd(j.Style, H.Reset), `${t.trim()}\n\n` ]);
3935
+ return error([ cmd(D.Style, [ V.Yellow, V.Bold ]), `${J.Warning} Note: `, cmd(D.Style, V.Reset), `${t.trim()}\n\n` ]);
3831
3936
  }(`No output location was specified.\nThe turbo cache will by default be saved as ${code('"graphql-cache.d.ts"')}.\n` + hint(`To change this, add a ${code('"tadaTurboLocation"')} in your configuration,\npass an ${code("--output")} argument to this command,\nor pipe this command to an output file.`));
3832
3937
  } else {
3833
3938
  throw errorMessage$1("No output path was specified to write the output file to.\n" + hint(`You have to either set ${code('"tadaTurboLocation"')} in your configuration,\npass an ${code("--output")} argument to this command,\nor pipe this command to an output file.`));
3834
3939
  }
3835
- } else if ("schemas" in l) {
3836
- for (var f of l.schemas) {
3837
- if (f.tadaTurboLocation) {
3838
- d.push({
3839
- path: t.resolve(c, f.tadaTurboLocation),
3840
- schemaName: f.name
3940
+ } else if ("schemas" in s) {
3941
+ for (var d of s.schemas) {
3942
+ if (d.tadaTurboLocation) {
3943
+ u.push({
3944
+ path: t.resolve(l, d.tadaTurboLocation),
3945
+ schemaName: d.name
3841
3946
  });
3842
3947
  }
3843
3948
  }
3844
3949
  }
3845
- var g = o({
3846
- rootPath: s.rootPath,
3847
- configPath: s.configPath,
3848
- pluginConfig: l,
3849
- turboOutputPath: "string" == typeof u ? u : d
3950
+ var f = o({
3951
+ rootPath: n.configResult.rootPath,
3952
+ tsconfigPath: n.configResult.tsconfigPath,
3953
+ configPath: n.configResult.configPath,
3954
+ pluginConfig: s,
3955
+ turboOutputPath: "string" == typeof c ? c : u
3850
3956
  });
3851
3957
  var p = [];
3852
- var h = [];
3853
- var m = 0;
3958
+ var g = [];
3959
+ var h = 0;
3854
3960
  var v = 0;
3961
+ var m = 0;
3855
3962
  var y = 0;
3856
3963
  try {
3857
3964
  if (r.isInteractive) {
3858
3965
  yield runningTurbo();
3859
3966
  }
3860
- for await (var S of g) {
3861
- if ("EXTERNAL_WARNING" === S.kind) {
3967
+ for await (var w of f) {
3968
+ if ("EXTERNAL_WARNING" === w.kind) {
3862
3969
  yield experimentMessage(`${code(".vue")} and ${code(".svelte")} file support is experimental.`);
3863
- } else if ("FILE_COUNT" === S.kind) {
3864
- v = S.fileCount;
3865
- } else if ("GRAPHQL_SOURCES" === S.kind) {
3866
- h = S.sources;
3970
+ } else if ("FILE_COUNT" === w.kind) {
3971
+ v = w.fileCount;
3972
+ } else if ("GRAPHQL_SOURCES" === w.kind) {
3973
+ g = w.sources;
3867
3974
  } else {
3868
- y++;
3869
- p.push(...S.documents);
3870
- m += S.warnings.length;
3871
- if (S.warnings.length) {
3872
- var w = warningFile(S.filePath);
3873
- for (var b of S.warnings) {
3874
- w += (E = b, text([ ne, cmd(j.Style, H.BrightBlack), `${E.line}:${E.col}`, W.Tab, cmd(j.Style, H.Foreground), indent(E.message.trim(), text([ ne, W.Tab ])), W.Newline ]));
3975
+ m++;
3976
+ p.push(...w.documents);
3977
+ y += w.documents.filter((t => t.isCached)).length;
3978
+ h += w.warnings.length;
3979
+ if (w.warnings.length) {
3980
+ var S = warningFile(w.filePath);
3981
+ for (var b of w.warnings) {
3982
+ S += (E = b, text([ oe, cmd(D.Style, V.BrightBlack), `${E.line}:${E.col}`, K.Tab, cmd(D.Style, V.Foreground), indent(E.message.trim(), text([ oe, K.Tab ])), K.Newline ]));
3875
3983
  warningGithub(b);
3876
3984
  }
3877
- yield w + "\n";
3985
+ yield S + "\n";
3878
3986
  }
3879
3987
  }
3880
3988
  if (r.isInteractive) {
3881
- yield runningTurbo(y, v);
3989
+ yield runningTurbo(m, v);
3882
3990
  }
3883
3991
  }
3884
3992
  } catch (t) {
3885
3993
  throw externalError("Could not build cache", t);
3886
3994
  }
3887
3995
  var E;
3888
- if ("schema" in l) {
3889
- if (m && i.failOnWarn) {
3890
- throw warningSummary(m);
3996
+ if ("schema" in s) {
3997
+ if (h && i.failOnWarn) {
3998
+ if (!a) {
3999
+ throw warningSummary(h);
4000
+ }
4001
+ return {
4002
+ warnings: h,
4003
+ failed: !0
4004
+ };
3891
4005
  }
3892
4006
  try {
3893
- var x = {};
3894
- for (var C of p) {
3895
- x[C.argumentKey] = C.documentType;
3896
- }
3897
- var O = createCacheContents(x, h, u);
3898
- await writeOutput(u, O);
4007
+ var x = createCacheContents(p, g, c);
4008
+ await writeOutput(c, x);
3899
4009
  } catch (t) {
3900
4010
  throw externalError("Something went wrong while writing the type cache file", t);
3901
4011
  }
3902
- yield infoSummary$1(m, p.length);
4012
+ yield infoSummary$1(h, p.length, y);
3903
4013
  } else {
3904
4014
  if (i.output) {
3905
4015
  throw errorMessage$1("Output path was specified, while multiple schemas are configured.\n" + hint(`You can only output all schemas to their ${code('"tadaTurboLocation"')} options\nwhen multiple ${code("schemas")} are set up.`));
3906
4016
  }
3907
4017
  var $ = {};
3908
- for (var k of l.schemas) {
3909
- var {name: N, tadaTurboLocation: I} = k;
3910
- if (!I) {
3911
- throw errorMessage$1(`No output path was specified to write the '${N}' type cache to.\n` + hint(`You have to set ${code('"tadaTurboLocation"')} in each schema configuration.`));
4018
+ var C = {};
4019
+ for (var O of s.schemas) {
4020
+ var {name: k, tadaTurboLocation: N} = O;
4021
+ if (!N) {
4022
+ throw errorMessage$1(`No output path was specified to write the '${k}' type cache to.\n` + hint(`You have to set ${code('"tadaTurboLocation"')} in each schema configuration.`));
3912
4023
  }
3913
4024
  try {
3914
- $[N] = 0;
3915
- var T = {};
3916
- for (var P of p) {
3917
- if (P.schemaName === N) {
3918
- T[P.argumentKey] = P.documentType;
3919
- $[N]++;
4025
+ $[k] = 0;
4026
+ C[k] = 0;
4027
+ var T = [];
4028
+ for (var I of p) {
4029
+ if (I.schemaName === k) {
4030
+ T.push(I);
4031
+ $[k]++;
4032
+ if (I.isCached) {
4033
+ C[k]++;
4034
+ }
3920
4035
  }
3921
4036
  }
3922
- var M = t.resolve(c, I);
3923
- var B = createCacheContents(T, h, M);
3924
- await writeOutput(M, B);
4037
+ var P = t.resolve(l, N);
4038
+ var M = createCacheContents(T, g, P);
4039
+ await writeOutput(P, M);
3925
4040
  } catch (t) {
3926
- throw externalError(`Something went wrong while writing the '${N}' schema's type cache file.`, t);
4041
+ throw externalError(`Something went wrong while writing the '${k}' schema's type cache file.`, t);
3927
4042
  }
3928
4043
  }
3929
- if (m && i.failOnWarn) {
3930
- throw warningSummary(m);
4044
+ if (h && i.failOnWarn) {
4045
+ if (!a) {
4046
+ throw warningSummary(h);
4047
+ }
4048
+ return {
4049
+ warnings: h,
4050
+ failed: !0
4051
+ };
3931
4052
  } else {
3932
- yield infoSummary$1(m, $);
4053
+ yield infoSummary$1(h, $, C);
3933
4054
  }
3934
4055
  }
4056
+ return {
4057
+ warnings: h,
4058
+ failed: !1
4059
+ };
3935
4060
  }
3936
4061
 
3937
4062
  function createCacheContents(r, i, n) {
3938
- var a = "";
3939
- for (var o in r) {
3940
- if (a) {
3941
- a += "\n";
3942
- }
3943
- a += ` ${o}:\n ${r[o]};`;
3944
- }
3945
- var s = "import type { TadaDocumentNode, $tada } from 'gql.tada';\n";
3946
- var l = "string" == typeof n || n && "object" == typeof n && "toString" in n && !("writable" in n);
3947
- var c = new Set;
3948
- for (var u of i) {
3949
- for (var d of u.imports) {
3950
- if (l) {
3951
- var f = n.toString();
3952
- var g = t.dirname(u.absolutePath);
3953
- if (t.resolve(g, d.specifier) === t.resolve(f) || c.has(d.specifier)) {
4063
+ var a = new Map;
4064
+ for (var o of r) {
4065
+ a.set(o.argumentKey, o);
4066
+ }
4067
+ var s = "";
4068
+ for (var l of a.values()) {
4069
+ if (s) {
4070
+ s += "\n";
4071
+ }
4072
+ if (l.documentHash) {
4073
+ s += ` /** @gql.tada/hash ${l.documentHash} */\n`;
4074
+ }
4075
+ s += ` ${l.argumentKey}:\n ${l.documentType};`;
4076
+ }
4077
+ var c = "import type { TadaDocumentNode, $tada } from 'gql.tada';\n";
4078
+ var u = "string" == typeof n || n && "object" == typeof n && "toString" in n && !("writable" in n);
4079
+ var d = new Set;
4080
+ for (var f of i) {
4081
+ for (var p of f.imports) {
4082
+ if (u) {
4083
+ var g = n.toString();
4084
+ var h = t.dirname(f.absolutePath);
4085
+ if (t.resolve(h, p.specifier) === t.resolve(g) || d.has(p.specifier)) {
3954
4086
  continue;
3955
4087
  }
3956
- c.add(d.specifier);
4088
+ d.add(p.specifier);
3957
4089
  }
3958
- s += d.importClause + "\n";
4090
+ c += p.importClause + "\n";
3959
4091
  }
3960
4092
  }
3961
- return ae + s + "\ndeclare module 'gql.tada' {\n interface setupCache {\n" + a + "\n }\n}\n";
4093
+ return se + c + "\ndeclare module 'gql.tada' {\n interface setupCache {\n" + s + "\n }\n}\n";
3962
4094
  }
3963
4095
 
3964
4096
  class TurboCommand extends Command {
@@ -3993,7 +4125,7 @@ async function generateTurbo(t) {
3993
4125
  }
3994
4126
  }
3995
4127
 
3996
- var oe = {
4128
+ var le = {
3997
4129
  __proto__: null,
3998
4130
  generateOutput,
3999
4131
  generatePersisted,
@@ -4001,28 +4133,28 @@ var oe = {
4001
4133
  generateTurbo
4002
4134
  };
4003
4135
 
4004
- var se = process.cwd();
4136
+ var ce = process.cwd();
4005
4137
 
4006
- var le = " ";
4138
+ var ue = " ";
4007
4139
 
4008
4140
  function diagnosticFile(r) {
4009
- var i = t.relative(se, r);
4141
+ var i = t.relative(ce, r);
4010
4142
  if (!i.startsWith("..")) {
4011
4143
  r = i;
4012
4144
  }
4013
- return text([ cmd(j.Style, H.Underline), r, cmd(j.Style, H.NoUnderline), "\n" ]);
4145
+ return text([ cmd(D.Style, V.Underline), r, cmd(D.Style, V.NoUnderline), "\n" ]);
4014
4146
  }
4015
4147
 
4016
4148
  function diagnosticMessage(t) {
4017
- var r = H.Foreground;
4149
+ var r = V.Foreground;
4018
4150
  if ("info" === t.severity) {
4019
- r = H.BrightBlue;
4151
+ r = V.BrightBlue;
4020
4152
  } else if ("warn" === t.severity) {
4021
- r = H.BrightYellow;
4153
+ r = V.BrightYellow;
4022
4154
  } else if ("error" === t.severity) {
4023
- r = H.BrightRed;
4155
+ r = V.BrightRed;
4024
4156
  }
4025
- return text([ le, cmd(j.Style, H.BrightBlack), `${t.line}:${t.col}`, W.Tab, cmd(j.Style, r), t.severity, W.Tab, cmd(j.Style, H.Foreground), indent(t.message.trim(), text([ le, W.Tab, W.Tab ])), W.Newline ]);
4157
+ return text([ ue, cmd(D.Style, V.BrightBlack), `${t.line}:${t.col}`, K.Tab, cmd(D.Style, r), t.severity, K.Tab, cmd(D.Style, V.Foreground), indent(t.message.trim(), text([ ue, K.Tab, K.Tab ])), K.Newline ]);
4026
4158
  }
4027
4159
 
4028
4160
  function diagnosticMessageGithub(t) {
@@ -4037,7 +4169,7 @@ function diagnosticMessageGithub(t) {
4037
4169
 
4038
4170
  function runningDiagnostics(t, r) {
4039
4171
  var i = t ? r ? `(${t}/${r})` : `(${t})` : "";
4040
- var frame = t => text([ cmd(j.Style, H.Magenta), Y[t % Y.length], " ", cmd(j.Style, H.Foreground), `Checking files${W.Ellipsis} `, cmd(j.Style, H.BrightBlack), i ]);
4172
+ var frame = t => text([ cmd(D.Style, V.Magenta), z[t % z.length], " ", cmd(D.Style, V.Foreground), `Checking files${K.Ellipsis} `, cmd(D.Style, V.BrightBlack), i ]);
4041
4173
  return concat([ fromValue(frame(0)), pipe(interval(150), map((t => frame(t + 1)))) ]);
4042
4174
  }
4043
4175
 
@@ -4056,83 +4188,91 @@ var isMinSeverity = (t, r) => {
4056
4188
 
4057
4189
  async function* run$1(t, r) {
4058
4190
  var {runDiagnostics: i} = await import("./thread-chunk3.mjs");
4059
- var o;
4060
- var s;
4191
+ var n;
4061
4192
  try {
4062
- o = await n(r.tsconfig);
4063
- s = a(o.pluginConfig, o.rootPath);
4193
+ n = await loadProjects(r.tsconfig);
4064
4194
  } catch (t) {
4065
4195
  throw externalError("Failed to load configuration.", t);
4066
4196
  }
4067
- var l = {
4197
+ var a = {
4068
4198
  warn: 0,
4069
4199
  error: 0,
4070
4200
  info: 0
4071
4201
  };
4072
- var c = r.minSeverity;
4073
- var u = i({
4074
- rootPath: o.rootPath,
4075
- configPath: o.configPath,
4076
- pluginConfig: s
4077
- });
4078
- var d = 0;
4079
- var f = 0;
4080
- try {
4081
- if (t.isInteractive) {
4082
- yield runningDiagnostics();
4083
- }
4084
- for await (var g of u) {
4085
- if ("EXTERNAL_WARNING" === g.kind) {
4086
- yield experimentMessage(`${code(".vue")} and ${code(".svelte")} file support is experimental.`);
4087
- } else if ("FILE_COUNT" === g.kind) {
4088
- d = g.fileCount;
4089
- } else {
4090
- f++;
4091
- var p = "";
4092
- for (var h of g.messages) {
4093
- l[h.severity]++;
4094
- if (isMinSeverity(h.severity, c)) {
4095
- p += diagnosticMessage(h);
4096
- diagnosticMessageGithub(h);
4202
+ var o = r.minSeverity;
4203
+ var s = !1;
4204
+ for (var l of n) {
4205
+ if (n.length > 1) {
4206
+ yield projectHeader(l.label);
4207
+ }
4208
+ var c = i({
4209
+ rootPath: l.configResult.rootPath,
4210
+ tsconfigPath: l.configResult.tsconfigPath,
4211
+ configPath: l.configResult.configPath,
4212
+ pluginConfig: l.pluginConfig
4213
+ });
4214
+ var u = 0;
4215
+ var d = 0;
4216
+ try {
4217
+ if (t.isInteractive) {
4218
+ yield runningDiagnostics();
4219
+ }
4220
+ for await (var f of c) {
4221
+ if ("EXTERNAL_WARNING" === f.kind) {
4222
+ if (!s) {
4223
+ s = !0;
4224
+ yield experimentMessage(`${code(".vue")} and ${code(".svelte")} file support is experimental.`);
4225
+ }
4226
+ } else if ("FILE_COUNT" === f.kind) {
4227
+ u = f.fileCount;
4228
+ } else {
4229
+ d++;
4230
+ var p = "";
4231
+ for (var g of f.messages) {
4232
+ a[g.severity]++;
4233
+ if (isMinSeverity(g.severity, o)) {
4234
+ p += diagnosticMessage(g);
4235
+ diagnosticMessageGithub(g);
4236
+ }
4237
+ }
4238
+ if (p) {
4239
+ yield diagnosticFile(f.filePath) + p + "\n";
4097
4240
  }
4098
4241
  }
4099
- if (p) {
4100
- yield diagnosticFile(g.filePath) + p + "\n";
4242
+ if (t.isInteractive) {
4243
+ yield runningDiagnostics(d, u);
4101
4244
  }
4102
4245
  }
4103
- if (t.isInteractive) {
4104
- yield runningDiagnostics(f, d);
4105
- }
4246
+ } catch (t) {
4247
+ throw externalError("Could not check files", t);
4106
4248
  }
4107
- } catch (t) {
4108
- throw externalError("Could not check files", t);
4109
4249
  }
4110
- if ("info" !== c) {
4111
- l.info = 0;
4250
+ if ("info" !== o) {
4251
+ a.info = 0;
4112
4252
  }
4113
- if (r.failOnWarn && l.warn || l.error) {
4253
+ if (r.failOnWarn && a.warn || a.error) {
4114
4254
  throw function problemsSummary(t) {
4115
4255
  var {info: r, error: i, warn: n} = t;
4116
4256
  var a = "";
4117
4257
  if (r) {
4118
- a += text([ cmd(j.Style, H.Blue), G.Info, ` ${r} notices\n` ]);
4258
+ a += text([ cmd(D.Style, V.Blue), J.Info, ` ${r} notices\n` ]);
4119
4259
  }
4120
- return error(a += text([ cmd(j.Style, H.Red), G.Cross, ` ${i + n} problems (${i} errors, ${n} warnings)\n` ]));
4121
- }(l);
4260
+ return error(a += text([ cmd(D.Style, V.Red), J.Cross, ` ${i + n} problems (${i} errors, ${n} warnings)\n` ]));
4261
+ }(a);
4122
4262
  } else {
4123
4263
  yield function infoSummary(t) {
4124
4264
  var {info: r, error: i, warn: n} = t;
4125
4265
  var a = "";
4126
4266
  if (r) {
4127
- a += text([ cmd(j.Style, H.Blue), G.Info, ` ${r} notices\n` ]);
4267
+ a += text([ cmd(D.Style, V.Blue), J.Info, ` ${r} notices\n` ]);
4128
4268
  }
4129
4269
  if (i || n) {
4130
- a += text([ cmd(j.Style, H.BrightYellow), G.Warning, ` ${i + n} problems (${i} errors, ${n} warnings)\n` ]);
4270
+ a += text([ cmd(D.Style, V.BrightYellow), J.Warning, ` ${i + n} problems (${i} errors, ${n} warnings)\n` ]);
4131
4271
  } else {
4132
- a += text([ cmd(j.Style, H.BrightGreen), G.Tick, " No problems found\n" ]);
4272
+ a += text([ cmd(D.Style, V.BrightGreen), J.Tick, " No problems found\n" ]);
4133
4273
  }
4134
4274
  return a;
4135
- }(l);
4275
+ }(a);
4136
4276
  }
4137
4277
  }
4138
4278
 
@@ -4159,11 +4299,11 @@ class CheckCommand extends Command {
4159
4299
  }
4160
4300
  }
4161
4301
 
4162
- var ce = new Intl.Collator(0, {
4302
+ var de = new Intl.Collator(0, {
4163
4303
  numeric: 1
4164
4304
  }).compare;
4165
4305
 
4166
- var ue = {
4306
+ var fe = {
4167
4307
  typescript_embed_lsp: "5.5.0",
4168
4308
  typescript: "4.1.0",
4169
4309
  tada: "1.0.0",
@@ -4175,7 +4315,7 @@ var semverComply = (t, r) => {
4175
4315
  return i ? function semiver(t, r, i) {
4176
4316
  t = t.split(".");
4177
4317
  r = r.split(".");
4178
- return ce(t[0], r[0]) || ce(t[1], r[1]) || (r[2] = r.slice(2).join("."), (i = /[.-]/.test(t[2] = t.slice(2).join("."))) == /[.-]/.test(r[2]) ? ce(t[2], r[2]) : i ? -1 : 1);
4318
+ return de(t[0], r[0]) || de(t[1], r[1]) || (r[2] = r.slice(2).join("."), (i = /[.-]/.test(t[2] = t.slice(2).join("."))) == /[.-]/.test(r[2]) ? de(t[2], r[2]) : i ? -1 : 1);
4179
4319
  }(i[0], r) >= 0 : !1;
4180
4320
  };
4181
4321
 
@@ -4291,19 +4431,19 @@ function createVirtualLanguageServiceHost(t, r, i, n, a) {
4291
4431
  };
4292
4432
  }
4293
4433
 
4294
- var de = {};
4295
-
4296
- var fe = {};
4434
+ var pe = {};
4297
4435
 
4298
4436
  var ge = {};
4299
4437
 
4300
- Object.defineProperty(ge, "__esModule", {
4438
+ var he = {};
4439
+
4440
+ Object.defineProperty(he, "__esModule", {
4301
4441
  value: !0
4302
4442
  });
4303
4443
 
4304
- ge.binarySearch = void 0;
4444
+ he.binarySearch = void 0;
4305
4445
 
4306
- ge.binarySearch = function binarySearch$2(t, r) {
4446
+ he.binarySearch = function binarySearch$2(t, r) {
4307
4447
  var i = 0;
4308
4448
  var n = t.length - 1;
4309
4449
  while (i <= n) {
@@ -4322,34 +4462,34 @@ ge.binarySearch = function binarySearch$2(t, r) {
4322
4462
  return Math.max(Math.min(i, n, t.length - 1), 0);
4323
4463
  };
4324
4464
 
4325
- var pe = {};
4465
+ var ve = {};
4326
4466
 
4327
- Object.defineProperty(pe, "__esModule", {
4467
+ Object.defineProperty(ve, "__esModule", {
4328
4468
  value: !0
4329
4469
  });
4330
4470
 
4331
- pe.getStack = pe.track = pe.resetOffsetStack = pe.offsetStack = pe.setTracking = void 0;
4471
+ ve.getStack = ve.track = ve.resetOffsetStack = ve.offsetStack = ve.setTracking = void 0;
4332
4472
 
4333
- var he = !0;
4473
+ var me = !0;
4334
4474
 
4335
- var me = 0;
4475
+ var ye = 0;
4336
4476
 
4337
- pe.setTracking = function setTracking(t) {
4338
- he = t;
4477
+ ve.setTracking = function setTracking(t) {
4478
+ me = t;
4339
4479
  };
4340
4480
 
4341
- pe.offsetStack = function offsetStack() {
4342
- me++;
4481
+ ve.offsetStack = function offsetStack() {
4482
+ ye++;
4343
4483
  };
4344
4484
 
4345
- pe.resetOffsetStack = function resetOffsetStack() {
4346
- me--;
4485
+ ve.resetOffsetStack = function resetOffsetStack() {
4486
+ ye--;
4347
4487
  };
4348
4488
 
4349
- pe.track = function track(t, r = []) {
4489
+ ve.track = function track(t, r = []) {
4350
4490
  return [ new Proxy(t, {
4351
4491
  get(t, r, i) {
4352
- if (he) {
4492
+ if (me) {
4353
4493
  if ("push" === r) {
4354
4494
  return push;
4355
4495
  }
@@ -4436,10 +4576,10 @@ pe.track = function track(t, r = []) {
4436
4576
  throw new Error("Invalid splice operation");
4437
4577
  }
4438
4578
  var f = n;
4439
- for (var g = s; g < r.length; g++) {
4440
- var p = r[g];
4441
- while (f > 0 && p.length > 0) {
4442
- p.length--;
4579
+ for (var p = s; p < r.length; p++) {
4580
+ var g = r[p];
4581
+ while (f > 0 && g.length > 0) {
4582
+ g.length--;
4443
4583
  f--;
4444
4584
  }
4445
4585
  if (0 === f) {
@@ -4469,7 +4609,7 @@ pe.track = function track(t, r = []) {
4469
4609
  };
4470
4610
 
4471
4611
  function getStack() {
4472
- var t = (new Error).stack.split("\n")[3 + me].trim();
4612
+ var t = (new Error).stack.split("\n")[3 + ye].trim();
4473
4613
  if (t.endsWith(")")) {
4474
4614
  t = t.slice(t.lastIndexOf("(") + 1, -1);
4475
4615
  } else {
@@ -4478,11 +4618,11 @@ function getStack() {
4478
4618
  return t;
4479
4619
  }
4480
4620
 
4481
- pe.getStack = getStack;
4621
+ ve.getStack = getStack;
4482
4622
 
4483
- var ve = {};
4623
+ var we = {};
4484
4624
 
4485
- Object.defineProperty(ve, "__esModule", {
4625
+ Object.defineProperty(we, "__esModule", {
4486
4626
  value: !0
4487
4627
  });
4488
4628
 
@@ -4518,10 +4658,10 @@ Object.defineProperty(ve, "__esModule", {
4518
4658
  value: !0
4519
4659
  });
4520
4660
  t.replaceRange = t.replaceSourceRange = t.replaceAll = t.replace = t.create = t.toString = t.getLength = void 0;
4521
- var n = ge;
4522
- var a = pe;
4661
+ var n = he;
4662
+ var a = ve;
4663
+ i(we, t);
4523
4664
  i(ve, t);
4524
- i(pe, t);
4525
4665
  function getLength(t) {
4526
4666
  var r = 0;
4527
4667
  for (var i of t) {
@@ -4612,20 +4752,20 @@ Object.defineProperty(ve, "__esModule", {
4612
4752
  var u = t[c];
4613
4753
  var d = s[l];
4614
4754
  var f = s[c];
4615
- var g = s[c] + ("string" == typeof u ? u.length : u[0].length);
4616
- var p = [];
4755
+ var p = s[c] + ("string" == typeof u ? u.length : u[0].length);
4756
+ var g = [];
4617
4757
  if (r > d) {
4618
- p.push(trimSegmentEnd(t[l], r - d));
4758
+ g.push(trimSegmentEnd(t[l], r - d));
4619
4759
  }
4620
4760
  for (var h of o) {
4621
- p.push(h);
4761
+ g.push(h);
4622
4762
  }
4623
- if (i < g) {
4624
- p.push(trimSegmentStart(u, i - f));
4763
+ if (i < p) {
4764
+ g.push(trimSegmentStart(u, i - f));
4625
4765
  }
4626
- combineStrings(p);
4766
+ combineStrings(g);
4627
4767
  (0, a.offsetStack)();
4628
- t.splice(l, c - l + 1, ...p);
4768
+ t.splice(l, c - l + 1, ...g);
4629
4769
  (0, a.resetOffsetStack)();
4630
4770
  }
4631
4771
  t.replaceRange = replaceRange;
@@ -4654,19 +4794,19 @@ Object.defineProperty(ve, "__esModule", {
4654
4794
  }
4655
4795
  return [ t[0].slice(r), t[1], t[2] + r, ...t.slice(3) ];
4656
4796
  }
4657
- }(fe);
4658
-
4659
- var ye = {};
4797
+ }(ge);
4660
4798
 
4661
4799
  var Se = {};
4662
4800
 
4663
- Object.defineProperty(Se, "__esModule", {
4801
+ var be = {};
4802
+
4803
+ Object.defineProperty(be, "__esModule", {
4664
4804
  value: !0
4665
4805
  });
4666
4806
 
4667
- Se.binarySearch = void 0;
4807
+ be.binarySearch = void 0;
4668
4808
 
4669
- Se.binarySearch = function binarySearch(t, r) {
4809
+ be.binarySearch = function binarySearch(t, r) {
4670
4810
  var i = 0;
4671
4811
  var n = t.length - 1;
4672
4812
  var a;
@@ -4691,15 +4831,15 @@ Se.binarySearch = function binarySearch(t, r) {
4691
4831
  };
4692
4832
  };
4693
4833
 
4694
- var we = {};
4834
+ var Ee = {};
4695
4835
 
4696
- Object.defineProperty(we, "__esModule", {
4836
+ Object.defineProperty(Ee, "__esModule", {
4697
4837
  value: !0
4698
4838
  });
4699
4839
 
4700
- we.translateOffset = void 0;
4840
+ Ee.translateOffset = void 0;
4701
4841
 
4702
- we.translateOffset = function translateOffset(t, r, i, n) {
4842
+ Ee.translateOffset = function translateOffset(t, r, i, n) {
4703
4843
  for (var a = 0; a < r.length; a++) {
4704
4844
  var o = r[a];
4705
4845
  if (t >= o && t <= o + n[a]) {
@@ -4708,17 +4848,17 @@ we.translateOffset = function translateOffset(t, r, i, n) {
4708
4848
  }
4709
4849
  };
4710
4850
 
4711
- Object.defineProperty(ye, "__esModule", {
4851
+ Object.defineProperty(Se, "__esModule", {
4712
4852
  value: !0
4713
4853
  });
4714
4854
 
4715
- ye.SourceMap = void 0;
4855
+ Se.SourceMap = void 0;
4716
4856
 
4717
- var be = Se;
4857
+ var xe = be;
4718
4858
 
4719
- var Ee = we;
4859
+ var $e = Ee;
4720
4860
 
4721
- ye.SourceMap = class SourceMap {
4861
+ Se.SourceMap = class SourceMap {
4722
4862
  constructor(t) {
4723
4863
  this.mappings = t;
4724
4864
  }
@@ -4743,7 +4883,7 @@ ye.SourceMap = class SourceMap {
4743
4883
  if (0 === n.offsets.length) {
4744
4884
  return;
4745
4885
  }
4746
- var {low: a, high: o} = (0, be.binarySearch)(n.offsets, t);
4886
+ var {low: a, high: o} = (0, xe.binarySearch)(n.offsets, t);
4747
4887
  var s = new Set;
4748
4888
  for (var l = a; l <= o; l++) {
4749
4889
  for (var c of n.mappings[l]) {
@@ -4751,7 +4891,7 @@ ye.SourceMap = class SourceMap {
4751
4891
  continue;
4752
4892
  }
4753
4893
  s.add(c);
4754
- var u = (0, Ee.translateOffset)(t, c[r], c[i], c.lengths);
4894
+ var u = (0, $e.translateOffset)(t, c[r], c[i], c.lengths);
4755
4895
  if (void 0 !== u) {
4756
4896
  yield [ u, c ];
4757
4897
  }
@@ -4773,8 +4913,8 @@ ye.SourceMap = class SourceMap {
4773
4913
  var o = a.map((() => new Set));
4774
4914
  for (var s of this.mappings) {
4775
4915
  for (var l = 0; l < s[t].length; l++) {
4776
- var c = (0, be.binarySearch)(a, s[t][l]).match;
4777
- var u = (0, be.binarySearch)(a, s[t][l] + s.lengths[l]).match;
4916
+ var c = (0, xe.binarySearch)(a, s[t][l]).match;
4917
+ var u = (0, xe.binarySearch)(a, s[t][l] + s.lengths[l]).match;
4778
4918
  for (var d = c; d <= u; d++) {
4779
4919
  o[d].add(s);
4780
4920
  }
@@ -4787,15 +4927,15 @@ ye.SourceMap = class SourceMap {
4787
4927
  }
4788
4928
  };
4789
4929
 
4790
- var xe = {};
4930
+ var Ce = {};
4791
4931
 
4792
- Object.defineProperty(xe, "__esModule", {
4932
+ Object.defineProperty(Ce, "__esModule", {
4793
4933
  value: !0
4794
4934
  });
4795
4935
 
4796
- xe.buildMappings = void 0;
4936
+ Ce.buildMappings = void 0;
4797
4937
 
4798
- xe.buildMappings = function buildMappings(t) {
4938
+ Ce.buildMappings = function buildMappings(t) {
4799
4939
  var r = 0;
4800
4940
  var i = [];
4801
4941
  for (var n of t) {
@@ -4815,15 +4955,15 @@ xe.buildMappings = function buildMappings(t) {
4815
4955
  return i;
4816
4956
  };
4817
4957
 
4818
- var Ce = {};
4958
+ var Oe = {};
4819
4959
 
4820
- Object.defineProperty(Ce, "__esModule", {
4960
+ Object.defineProperty(Oe, "__esModule", {
4821
4961
  value: !0
4822
4962
  });
4823
4963
 
4824
- Ce.buildStacks = void 0;
4964
+ Oe.buildStacks = void 0;
4825
4965
 
4826
- Ce.buildStacks = function buildStacks(t, r) {
4966
+ Oe.buildStacks = function buildStacks(t, r) {
4827
4967
  var i = 0;
4828
4968
  var n = 0;
4829
4969
  var a = [];
@@ -4877,14 +5017,14 @@ Ce.buildStacks = function buildStacks(t, r) {
4877
5017
  Object.defineProperty(t, "__esModule", {
4878
5018
  value: !0
4879
5019
  });
4880
- i(fe, t);
4881
- i(ye, t);
4882
- i(we, t);
4883
- i(xe, t);
5020
+ i(ge, t);
5021
+ i(Se, t);
5022
+ i(Ee, t);
4884
5023
  i(Ce, t);
4885
- }(de);
5024
+ i(Oe, t);
5025
+ }(pe);
4886
5026
 
4887
- class SourceMappedFile extends de.SourceMap {
5027
+ class SourceMappedFile extends pe.SourceMap {
4888
5028
  constructor(t, r) {
4889
5029
  super(t);
4890
5030
  this.sourceFile = r.sourceFile;
@@ -4916,7 +5056,7 @@ function maybeBind(t, r) {
4916
5056
 
4917
5057
  var buildLanguageService = r => {
4918
5058
  var {virtualMap: i} = r;
4919
- var n = h.createLanguageService(r.languageServiceHost, r.documentRegistry);
5059
+ var n = v.createLanguageService(r.languageServiceHost, r.documentRegistry);
4920
5060
  var a = maybeBind(n, n.getProgram);
4921
5061
  var mapFileFn = t => (r, ...a) => {
4922
5062
  var o = i.get(r);
@@ -5101,7 +5241,7 @@ var buildPluginInfo = t => {
5101
5241
  return t.getLanguageService();
5102
5242
  },
5103
5243
  get languageServiceHost() {
5104
- return r || (r = createVirtualLanguageServiceHost(t.system, [ ...t.rootNames ], t.options, h).languageServiceHost);
5244
+ return r || (r = createVirtualLanguageServiceHost(t.system, [ ...t.rootNames ], t.options, v).languageServiceHost);
5105
5245
  },
5106
5246
  project: {
5107
5247
  getProjectName: () => t.projectRoot,
@@ -5117,48 +5257,48 @@ var buildPluginInfo = t => {
5117
5257
  };
5118
5258
  };
5119
5259
 
5120
- var Oe;
5260
+ var ke;
5121
5261
 
5122
- var $e;
5262
+ var Ne;
5123
5263
 
5124
- var ke = [ ".svelte", ".vue" ];
5264
+ var Te = [ ".svelte", ".vue" ];
5125
5265
 
5126
5266
  var transform = async r => {
5127
5267
  var i = t.extname(r.fileName);
5128
5268
  if (".svelte" === i) {
5129
5269
  return (async (...t) => {
5130
- if (!Oe) {
5270
+ if (!ke) {
5131
5271
  try {
5132
- Oe = await import("@gql.tada/svelte-support");
5272
+ ke = await import("@gql.tada/svelte-support");
5133
5273
  } catch (t) {
5134
- throw new TadaError(A.SVELTE_SUPPORT, "For Svelte support the `@gql.tada/svelte-support` package must be installed.\nInstall the package and try again.");
5274
+ throw new TadaError(L.SVELTE_SUPPORT, "For Svelte support the `@gql.tada/svelte-support` package must be installed.\nInstall the package and try again.");
5135
5275
  }
5136
5276
  }
5137
- return Oe.transform(...t);
5277
+ return ke.transform(...t);
5138
5278
  })(r);
5139
5279
  } else if (".vue" === i) {
5140
5280
  await (async () => {
5141
- if (!$e) {
5281
+ if (!Ne) {
5142
5282
  try {
5143
- $e = await import("@gql.tada/vue-support");
5283
+ Ne = await import("@gql.tada/vue-support");
5144
5284
  } catch (t) {
5145
- throw new TadaError(A.VUE_SUPPORT, "For Vue support the `@gql.tada/vue-support` package must be installed.\nInstall the package and try again.");
5285
+ throw new TadaError(L.VUE_SUPPORT, "For Vue support the `@gql.tada/vue-support` package must be installed.\nInstall the package and try again.");
5146
5286
  }
5147
5287
  }
5148
- return $e.check();
5288
+ return Ne.check();
5149
5289
  })();
5150
5290
  return (async (...t) => {
5151
- if (!$e) {
5291
+ if (!Ne) {
5152
5292
  try {
5153
- $e = await import("@gql.tada/vue-support");
5293
+ Ne = await import("@gql.tada/vue-support");
5154
5294
  } catch (t) {
5155
- throw new TadaError(A.VUE_SUPPORT, "For Vue support the `@gql.tada/vue-support` package must be installed.\nInstall the package and try again.");
5295
+ throw new TadaError(L.VUE_SUPPORT, "For Vue support the `@gql.tada/vue-support` package must be installed.\nInstall the package and try again.");
5156
5296
  }
5157
5297
  }
5158
- return $e.transform(...t);
5298
+ return Ne.transform(...t);
5159
5299
  })(r);
5160
5300
  } else {
5161
- throw new TadaError(A.UNKNOWN_EXTERNAL_FILE, `Tried transforming unknown file type "${i}". Supported: ${ke.join(", ")}`);
5301
+ throw new TadaError(L.UNKNOWN_EXTERNAL_FILE, `Tried transforming unknown file type "${i}". Supported: ${Te.join(", ")}`);
5162
5302
  }
5163
5303
  };
5164
5304
 
@@ -5233,22 +5373,22 @@ var programFactory = r => {
5233
5373
  r.set(t, i);
5234
5374
  }
5235
5375
  };
5236
- }(i, r.rootPath, h, resolveDefaultLibsPath(r));
5376
+ }(i, r.rootPath, v, resolveDefaultLibsPath(r));
5237
5377
  var o = resolveConfig(r);
5238
5378
  var s = new Set(o.fileNames);
5239
5379
  var l = {
5240
- ...h.getDefaultCompilerOptions(),
5241
- getDefaultLibFilePath: h.getDefaultLibFilePath(o.options),
5380
+ ...v.getDefaultCompilerOptions(),
5381
+ getDefaultLibFilePath: v.getDefaultLibFilePath(o.options),
5242
5382
  noCheck: !0,
5243
5383
  ...o.options
5244
5384
  };
5245
5385
  var c = !1;
5246
- if ("Bundler" in h.ModuleResolutionKind && (l.moduleResolution === h.ModuleResolutionKind.NodeNext || l.moduleResolution === h.ModuleResolutionKind.Node16)) {
5386
+ if ("Bundler" in v.ModuleResolutionKind && (l.moduleResolution === v.ModuleResolutionKind.NodeNext || l.moduleResolution === v.ModuleResolutionKind.Node16)) {
5247
5387
  c = !0;
5248
- l.moduleResolution = h.ModuleResolutionKind.Bundler;
5388
+ l.moduleResolution = v.ModuleResolutionKind.Bundler;
5249
5389
  }
5250
- var u = createVirtualCompilerHost(a, l, h);
5251
- var d = h.createDocumentRegistry();
5390
+ var u = createVirtualCompilerHost(a, l, v);
5391
+ var d = v.createDocumentRegistry();
5252
5392
  var f = {
5253
5393
  get projectPath() {
5254
5394
  return r.rootPath;
@@ -5263,8 +5403,11 @@ var programFactory = r => {
5263
5403
  }
5264
5404
  return [ ...i ];
5265
5405
  },
5266
- createSourceFile: (t, r) => h.createSourceFile(t.fileId, "object" == typeof t.sourceText ? t.sourceText.getText(0, t.sourceText.getLength()) : t.sourceText, l.target || h.ScriptTarget.ESNext, !0, r || (null != t.scriptKind ? t.scriptKind : h.ScriptKind.TSX)),
5267
- createExternalFiles(i = ke) {
5406
+ get rootFileNames() {
5407
+ return [ ...s ];
5408
+ },
5409
+ createSourceFile: (t, r) => v.createSourceFile(t.fileId, "object" == typeof t.sourceText ? t.sourceText.getText(0, t.sourceText.getLength()) : t.sourceText, l.target || v.ScriptTarget.ESNext, !0, r || (null != t.scriptKind ? t.scriptKind : v.ScriptKind.TSX)),
5410
+ createExternalFiles(i = Te) {
5268
5411
  var n = [];
5269
5412
  var o = new Set(s);
5270
5413
  var l = new Set([ r.rootPath ]);
@@ -5275,12 +5418,12 @@ var programFactory = r => {
5275
5418
  for (var d of a.readDirectory(u, i, [ "**/node_modules" ])) {
5276
5419
  if (!o.has(d)) {
5277
5420
  o.add(d);
5278
- var g = a.readFile(d, "utf8");
5279
- if (g) {
5421
+ var p = a.readFile(d, "utf8");
5422
+ if (p) {
5280
5423
  n.push(f.createSourceFile({
5281
5424
  fileId: d,
5282
- sourceText: g
5283
- }, h.ScriptKind.External));
5425
+ sourceText: p
5426
+ }, v.ScriptKind.External));
5284
5427
  }
5285
5428
  }
5286
5429
  }
@@ -5288,13 +5431,13 @@ var programFactory = r => {
5288
5431
  return n;
5289
5432
  },
5290
5433
  addSourceFile(t) {
5291
- var r = "fileName" in t ? t : f.createSourceFile(t, h.ScriptKind.TSX);
5434
+ var r = "fileName" in t ? t : f.createSourceFile(t, v.ScriptKind.TSX);
5292
5435
  u.updateFile(r);
5293
5436
  s.add(r.fileName);
5294
5437
  return f;
5295
5438
  },
5296
5439
  addMappedFile(t, r) {
5297
- var i = "fileName" in t ? t : f.createSourceFile(t, h.ScriptKind.External);
5440
+ var i = "fileName" in t ? t : f.createSourceFile(t, v.ScriptKind.External);
5298
5441
  if (r.mappings.length) {
5299
5442
  s.delete(i.fileName);
5300
5443
  }
@@ -5323,28 +5466,31 @@ var programFactory = r => {
5323
5466
  }
5324
5467
  return f;
5325
5468
  },
5469
+ resolveModulePath(t, r) {
5470
+ var i = v.resolveModuleName(t, r, l, u.compilerHost);
5471
+ return i.resolvedModule?.resolvedFileName;
5472
+ },
5326
5473
  resolveModuleName(r, i, n) {
5327
5474
  if (!r.startsWith(".")) {
5328
5475
  return r;
5329
5476
  }
5330
- var a = h.resolveModuleName(r, i, l, u.compilerHost);
5331
- if (a.resolvedModule) {
5332
- var o = a.resolvedModule.resolvedFileName;
5333
- var s = t.dirname(n);
5334
- var c = t.relative(s, o);
5335
- if (!c.startsWith(".")) {
5336
- c = "./" + c;
5477
+ var a = f.resolveModulePath(r, i);
5478
+ if (a) {
5479
+ var o = t.dirname(n);
5480
+ var s = t.relative(o, a);
5481
+ if (!s.startsWith(".")) {
5482
+ s = "./" + s;
5337
5483
  }
5338
- return c.replace(/\\/g, "/");
5484
+ return s.replace(/\\/g, "/");
5339
5485
  }
5340
- var d = t.dirname(i);
5341
- var f = t.dirname(n);
5342
- var g = t.resolve(d, r);
5343
- var p = t.relative(f, g);
5344
- if (!p.startsWith(".")) {
5345
- p = "./" + p;
5486
+ var l = t.dirname(i);
5487
+ var c = t.dirname(n);
5488
+ var u = t.resolve(l, r);
5489
+ var d = t.relative(c, u);
5490
+ if (!d.startsWith(".")) {
5491
+ d = "./" + d;
5346
5492
  }
5347
- return p.replace(/\\/g, "/");
5493
+ return d.replace(/\\/g, "/");
5348
5494
  },
5349
5495
  build() {
5350
5496
  (() => {
@@ -5353,14 +5499,14 @@ var programFactory = r => {
5353
5499
  }
5354
5500
  })();
5355
5501
  m({
5356
- typescript: h
5502
+ typescript: v
5357
5503
  });
5358
5504
  return (t => {
5359
5505
  var r;
5360
5506
  var i;
5361
5507
  var n;
5362
5508
  var a;
5363
- var getLanguageServiceHost = () => n || (n = createVirtualLanguageServiceHost(t.system, [ ...t.rootNames ], t.options, h).languageServiceHost);
5509
+ var getLanguageServiceHost = () => n || (n = createVirtualLanguageServiceHost(t.system, [ ...t.rootNames ], t.options, v).languageServiceHost);
5364
5510
  var getLanguageService = () => i || (i = buildLanguageService({
5365
5511
  system: t.system,
5366
5512
  rootNames: t.rootNames,
@@ -5372,7 +5518,7 @@ var programFactory = r => {
5372
5518
  }));
5373
5519
  var getProgram = () => {
5374
5520
  if (!r) {
5375
- r = getLanguageService().getProgram() || h.createProgram({
5521
+ r = getLanguageService().getProgram() || v.createProgram({
5376
5522
  rootNames: t.rootNames,
5377
5523
  options: t.options,
5378
5524
  host: t.compilerHost
@@ -5434,9 +5580,9 @@ var programFactory = r => {
5434
5580
  };
5435
5581
 
5436
5582
  var resolveDefaultLibsPath = r => {
5437
- var i = h.getDefaultLibFilePath({});
5438
- if (!h.sys.fileExists(i)) {
5439
- var n = p(r.configPath);
5583
+ var i = v.getDefaultLibFilePath({});
5584
+ if (!v.sys.fileExists(i)) {
5585
+ var n = h(r.configPath);
5440
5586
  var a = "typescript/package.json";
5441
5587
  try {
5442
5588
  return t.dirname(n.resolve(a, {
@@ -5451,32 +5597,33 @@ var resolveDefaultLibsPath = r => {
5451
5597
  };
5452
5598
 
5453
5599
  var resolveConfig = r => {
5454
- var i = h.sys.readFile(r.configPath, "utf8") || "{}";
5455
- var n = h.parseConfigFileTextToJson(r.configPath, i);
5456
- if (null != n.error) {
5457
- throw new Error(n.error.messageText.toString());
5458
- }
5459
- var a = t.dirname(r.configPath);
5460
- return h.parseJsonConfigFileContent(n.config, h.sys, a, h.getDefaultCompilerOptions(), r.configPath);
5600
+ var i = r.tsconfigPath || r.configPath;
5601
+ var n = v.sys.readFile(i, "utf8") || "{}";
5602
+ var a = v.parseConfigFileTextToJson(i, n);
5603
+ if (null != a.error) {
5604
+ throw new Error(a.error.messageText.toString());
5605
+ }
5606
+ var o = t.dirname(i);
5607
+ return v.parseJsonConfigFileContent(a.config, v.sys, o, v.getDefaultCompilerOptions(), i);
5461
5608
  };
5462
5609
 
5463
- var Ne = function(t) {
5610
+ var Ie = function(t) {
5464
5611
  t[t.File = 0] = "File";
5465
5612
  t[t.Directory = 1] = "Directory";
5466
5613
  return t;
5467
5614
  }({});
5468
5615
 
5469
- var stat = async (t, r = Ne.File) => await u.stat(t).then((t => {
5616
+ var stat = async (t, r = Ie.File) => await d.stat(t).then((t => {
5470
5617
  switch (r) {
5471
- case Ne.File:
5618
+ case Ie.File:
5472
5619
  return t.isFile();
5473
5620
 
5474
- case Ne.Directory:
5621
+ case Ie.Directory:
5475
5622
  return t.isDirectory();
5476
5623
  }
5477
5624
  })).catch((() => !1));
5478
5625
 
5479
- var Ie = /^(?:graphql\.config|\.graphqlrc)\.(?:cjs|[jt]s|json|toml|ya?ml)$/i;
5626
+ var Pe = /^(?:graphql\.config|\.graphqlrc)\.(?:cjs|[jt]s|json|toml|ya?ml)$/i;
5480
5627
 
5481
5628
  var findGraphQLConfig = async r => {
5482
5629
  var i = process.cwd();
@@ -5484,15 +5631,15 @@ var findGraphQLConfig = async r => {
5484
5631
  while (i !== n) {
5485
5632
  var a = [];
5486
5633
  try {
5487
- a = await u.readdir(i);
5634
+ a = await d.readdir(i);
5488
5635
  } catch (t) {}
5489
- var o = a.find((t => Ie.test(t)));
5636
+ var o = a.find((t => Pe.test(t)));
5490
5637
  if (o) {
5491
5638
  return o;
5492
5639
  }
5493
- if (await stat(t.resolve(i, ".git"), Ne.Directory)) {
5640
+ if (await stat(t.resolve(i, ".git"), Ie.Directory)) {
5494
5641
  break;
5495
- } else if (await stat(t.resolve(i, ".vscode"), Ne.Directory)) {
5642
+ } else if (await stat(t.resolve(i, ".vscode"), Ie.Directory)) {
5496
5643
  break;
5497
5644
  }
5498
5645
  i = t.resolve(i, "..");
@@ -5501,9 +5648,9 @@ var findGraphQLConfig = async r => {
5501
5648
  var i = r || process.cwd();
5502
5649
  var n = t.resolve(i, "/");
5503
5650
  while (i !== n) {
5504
- if (await stat(t.resolve(i, ".git"), Ne.Directory)) {
5651
+ if (await stat(t.resolve(i, ".git"), Ie.Directory)) {
5505
5652
  return i;
5506
- } else if (await stat(t.resolve(i, ".vscode"), Ne.Directory)) {
5653
+ } else if (await stat(t.resolve(i, ".vscode"), Ie.Directory)) {
5507
5654
  return i;
5508
5655
  } else if (await stat(t.resolve(i, "pnpm-workspace.yml"))) {
5509
5656
  return i;
@@ -5511,7 +5658,7 @@ var findGraphQLConfig = async r => {
5511
5658
  var a = t.resolve(i, "package.json");
5512
5659
  if (await stat(a)) {
5513
5660
  try {
5514
- var o = JSON.parse(await u.readFile(a, "utf8"));
5661
+ var o = JSON.parse(await d.readFile(a, "utf8"));
5515
5662
  if (o && "object" == typeof o && Array.isArray(o.workspaces)) {
5516
5663
  return i;
5517
5664
  }
@@ -5525,7 +5672,7 @@ var findGraphQLConfig = async r => {
5525
5672
  var l = t.resolve(s, "package.json");
5526
5673
  if (await stat(l)) {
5527
5674
  try {
5528
- var c = JSON.parse(await u.readFile(l, "utf8"));
5675
+ var c = JSON.parse(await d.readFile(l, "utf8"));
5529
5676
  if (c && "object" == typeof c && "graphql" in c && c.graphql && "object" == typeof c.graphql) {
5530
5677
  return l;
5531
5678
  }
@@ -5542,7 +5689,7 @@ var loadPnpmWorkspaceCatalogs = async () => {
5542
5689
  while (i !== n) {
5543
5690
  var a = r.join(i, "pnpm-workspace.yaml");
5544
5691
  try {
5545
- await d.access(a);
5692
+ await f.access(a);
5546
5693
  return i;
5547
5694
  } catch {}
5548
5695
  i = r.dirname(i);
@@ -5595,7 +5742,7 @@ var loadPnpmWorkspaceCatalogs = async () => {
5595
5742
  }
5596
5743
  }
5597
5744
  return i;
5598
- })(await d.readFile(i, "utf-8"));
5745
+ })(await f.readFile(i, "utf-8"));
5599
5746
  } catch {
5600
5747
  return null;
5601
5748
  }
@@ -5608,8 +5755,8 @@ var loadBunWorkspaceCatalogs = async () => {
5608
5755
  while (i !== n) {
5609
5756
  var a = r.join(i, "package.json");
5610
5757
  try {
5611
- await d.access(a);
5612
- var o = await d.readFile(a, "utf-8");
5758
+ await f.access(a);
5759
+ var o = await f.readFile(a, "utf-8");
5613
5760
  var s = JSON.parse(o);
5614
5761
  if (s.workspaces && (s.workspaces.catalog || s.workspaces.catalogs)) {
5615
5762
  return i;
@@ -5624,7 +5771,7 @@ var loadBunWorkspaceCatalogs = async () => {
5624
5771
  }
5625
5772
  try {
5626
5773
  var i = r.join(t, "package.json");
5627
- var n = await d.readFile(i, "utf-8");
5774
+ var n = await f.readFile(i, "utf-8");
5628
5775
  var a = JSON.parse(n);
5629
5776
  if (!a.workspaces) {
5630
5777
  return null;
@@ -5715,7 +5862,7 @@ var hasPackageSupport = async (t, r) => {
5715
5862
  return !0;
5716
5863
  }
5717
5864
  try {
5718
- return !!p(__dirname)(`${t}/package.json`)?.version;
5865
+ return !!h(__dirname)(`${t}/package.json`)?.version;
5719
5866
  } catch (t) {
5720
5867
  return !1;
5721
5868
  }
@@ -5726,9 +5873,9 @@ var hasSvelteSupport = async t => hasPackageSupport("@gql.tada/svelte-support",
5726
5873
  var hasVueSupport = async t => hasPackageSupport("@gql.tada/vue-support", t);
5727
5874
 
5728
5875
  var jsonParse = async t => {
5729
- var r = await u.readFile(t, "utf8");
5730
- var i = h.parseJsonText(t, r);
5731
- return h.convertToObject(i, []);
5876
+ var r = await d.readFile(t, "utf8");
5877
+ var i = v.parseJsonText(t, r);
5878
+ return v.convertToObject(i, []);
5732
5879
  };
5733
5880
 
5734
5881
  var isVSCodeInstalled = async () => {
@@ -5736,16 +5883,16 @@ var isVSCodeInstalled = async () => {
5736
5883
  return !1;
5737
5884
  }
5738
5885
  var r = t.resolve(process.env.HOME, ".vscode");
5739
- return !!await stat(r, Ne.Directory);
5886
+ return !!await stat(r, Ie.Directory);
5740
5887
  };
5741
5888
 
5742
5889
  var loadSuggestedExtensionsList = async r => {
5743
5890
  var i = process.cwd();
5744
5891
  var n = t.resolve(i, "/");
5745
5892
  while (i !== n) {
5746
- if (await stat(t.resolve(i, ".git"), Ne.Directory)) {
5893
+ if (await stat(t.resolve(i, ".git"), Ie.Directory)) {
5747
5894
  break;
5748
- } else if (await stat(t.resolve(i, ".vscode"), Ne.Directory)) {
5895
+ } else if (await stat(t.resolve(i, ".vscode"), Ie.Directory)) {
5749
5896
  break;
5750
5897
  }
5751
5898
  i = t.resolve(i, "..");
@@ -5794,32 +5941,32 @@ var loadExtensionsList = async () => {
5794
5941
  };
5795
5942
 
5796
5943
  function emptyLine() {
5797
- return text([ cmd(j.Style, H.BrightBlack), K.Vertical, "\n" ]);
5944
+ return text([ cmd(D.Style, V.BrightBlack), G.Vertical, "\n" ]);
5798
5945
  }
5799
5946
 
5800
5947
  function completedTask(t, r = !1) {
5801
- return text([ emptyLine(), cmd(j.Style, H.BrightBlack), r ? K.BottomLeft : K.VerticalRight, " ", cmd(j.Style, H.Green), G.TickSwoosh, " ", cmd(j.Style, H.Foreground), t, "\n" ]);
5948
+ return text([ emptyLine(), cmd(D.Style, V.BrightBlack), r ? G.BottomLeft : G.VerticalRight, " ", cmd(D.Style, V.Green), J.TickSwoosh, " ", cmd(D.Style, V.Foreground), t, "\n" ]);
5802
5949
  }
5803
5950
 
5804
5951
  function failedTask(t) {
5805
- return text([ emptyLine(), cmd(j.Style, H.BrightBlack), K.BottomLeft, " ", cmd(j.Style, H.BrightRed), G.CrossSwoosh, " ", cmd(j.Style, H.Foreground), t, "\n" ]);
5952
+ return text([ emptyLine(), cmd(D.Style, V.BrightBlack), G.BottomLeft, " ", cmd(D.Style, V.BrightRed), J.CrossSwoosh, " ", cmd(D.Style, V.Foreground), t, "\n" ]);
5806
5953
  }
5807
5954
 
5808
5955
  function warningTask(t) {
5809
- return text([ emptyLine(), cmd(j.Style, H.BrightBlack), K.VerticalRight, " ", cmd(j.Style, H.BrightYellow), G.Warning, " ", cmd(j.Style, H.Foreground), t, "\n" ]);
5956
+ return text([ emptyLine(), cmd(D.Style, V.BrightBlack), G.VerticalRight, " ", cmd(D.Style, V.BrightYellow), J.Warning, " ", cmd(D.Style, V.Foreground), t, "\n" ]);
5810
5957
  }
5811
5958
 
5812
5959
  function hintMessage(t) {
5813
- return text([ cmd(j.Style, H.BrightBlack), `${K.VerticalRight} `, cmd(j.Style, H.BrightBlue), `${G.Info} `, cmd(j.Style, H.Blue), indent(t, text([ cmd(j.Style, H.BrightBlack), `${K.Vertical} `, cmd(j.Style, H.Blue) ])) ]);
5960
+ return text([ cmd(D.Style, V.BrightBlack), `${G.VerticalRight} `, cmd(D.Style, V.BrightBlue), `${J.Info} `, cmd(D.Style, V.Blue), indent(t, text([ cmd(D.Style, V.BrightBlack), `${G.Vertical} `, cmd(D.Style, V.Blue) ])) ]);
5814
5961
  }
5815
5962
 
5816
5963
  function runningTask(t) {
5817
- var frame = r => text([ emptyLine(), cmd(j.Style, H.Magenta), J[r % J.length], " ", cmd(j.Style, H.Foreground), t.trim() ]);
5964
+ var frame = r => text([ emptyLine(), cmd(D.Style, V.Magenta), X[r % X.length], " ", cmd(D.Style, V.Foreground), t.trim() ]);
5818
5965
  return concat([ fromValue(frame(0)), pipe(interval(150), map((t => frame(t + 1)))) ]);
5819
5966
  }
5820
5967
 
5821
5968
  function errorMessage(t) {
5822
- return error([ "\n", cmd(j.Style, [ H.Red, H.Invert ]), ` ${G.Warning} Error `, cmd(j.Style, H.NoInvert), `\n${t.trim()}\n` ]);
5969
+ return error([ "\n", cmd(D.Style, [ V.Red, V.Invert ]), ` ${J.Warning} Error `, cmd(D.Style, V.NoInvert), `\n${t.trim()}\n` ]);
5823
5970
  }
5824
5971
 
5825
5972
  var delay = (t = 700) => {
@@ -5832,7 +5979,7 @@ var delay = (t = 700) => {
5832
5979
  }
5833
5980
  };
5834
5981
 
5835
- var Te = function(t) {
5982
+ var Me = function(t) {
5836
5983
  t.TITLE = "Doctor";
5837
5984
  t.DESCRIPTION = "Detects problems with your setup";
5838
5985
  t.CHECK_TS_VERSION = "Checking TypeScript version";
@@ -5842,27 +5989,27 @@ var Te = function(t) {
5842
5989
  t.CHECK_VSCODE = "Checking VSCode setup";
5843
5990
  t.CHECK_SCHEMA = "Checking schema";
5844
5991
  return t;
5845
- }(Te || {});
5992
+ }(Me || {});
5846
5993
 
5847
5994
  async function* run() {
5848
5995
  yield function title(t, r) {
5849
- var i = text([ cmd(j.Style, H.BrightBlack), K.TopLeft, " ", cmd(j.Style, [ H.Magenta, H.Invert ]), ` ${t.trim()} `, cmd(j.Style, [ H.NoInvert ]), "\n" ]);
5996
+ var i = text([ cmd(D.Style, V.BrightBlack), G.TopLeft, " ", cmd(D.Style, [ V.Magenta, V.Invert ]), ` ${t.trim()} `, cmd(D.Style, [ V.NoInvert ]), "\n" ]);
5850
5997
  if (r) {
5851
- i += text([ cmd(j.Style, H.BrightBlack), K.Vertical, ` ${r}\n` ]);
5998
+ i += text([ cmd(D.Style, V.BrightBlack), G.Vertical, ` ${r}\n` ]);
5852
5999
  }
5853
6000
  return i;
5854
- }(Te.TITLE, Te.DESCRIPTION);
5855
- yield runningTask(Te.CHECK_TS_VERSION);
6001
+ }(Me.TITLE, Me.DESCRIPTION);
6002
+ yield runningTask(Me.CHECK_TS_VERSION);
5856
6003
  await delay();
5857
6004
  var t;
5858
6005
  try {
5859
6006
  t = await (async () => {
5860
6007
  var t = r.resolve(process.cwd(), "package.json");
5861
6008
  var i = r.resolve(t);
5862
- return JSON.parse(await d.readFile(i, "utf-8"));
6009
+ return JSON.parse(await f.readFile(i, "utf-8"));
5863
6010
  })();
5864
6011
  } catch (t) {
5865
- yield failedTask(Te.CHECK_TS_VERSION);
6012
+ yield failedTask(Me.CHECK_TS_VERSION);
5866
6013
  throw errorMessage(`A ${code("package.json")} file was not found in the current working directory.\n` + hint("Try running the doctor command in your workspace folder."));
5867
6014
  }
5868
6015
  var i = await (async t => {
@@ -5878,101 +6025,126 @@ async function* run() {
5878
6025
  }
5879
6026
  })(t);
5880
6027
  if (!i) {
5881
- yield failedTask(Te.CHECK_TS_VERSION);
6028
+ yield failedTask(Me.CHECK_TS_VERSION);
5882
6029
  throw errorMessage(`A version of ${code("typescript")} was not found in your dependencies.\n` + hint(`Is ${code("typescript")} installed in this package?`));
5883
- } else if (!semverComply(i, ue.typescript)) {
5884
- yield failedTask(Te.CHECK_TS_VERSION);
5885
- throw errorMessage(`The version of ${code("typescript")} in your dependencies is out of date.\n` + hint(`${code("gql.tada")} requires at least ${bold(ue.typescript)}`));
6030
+ } else if (!semverComply(i, fe.typescript)) {
6031
+ yield failedTask(Me.CHECK_TS_VERSION);
6032
+ throw errorMessage(`The version of ${code("typescript")} in your dependencies is out of date.\n` + hint(`${code("gql.tada")} requires at least ${bold(fe.typescript)}`));
5886
6033
  }
5887
- yield completedTask(Te.CHECK_TS_VERSION);
5888
- yield runningTask(Te.CHECK_DEPENDENCIES);
6034
+ yield completedTask(Me.CHECK_TS_VERSION);
6035
+ yield runningTask(Me.CHECK_DEPENDENCIES);
5889
6036
  await delay();
5890
- var s = semverComply(i, ue.typescript_embed_lsp);
5891
- if (!s) {
5892
- var l = await (async t => {
6037
+ var l = semverComply(i, fe.typescript_embed_lsp);
6038
+ if (!l) {
6039
+ var c = await (async t => {
5893
6040
  var r = "@0no-co/graphqlsp";
5894
6041
  var i = await getPackageVersion(r, t);
5895
6042
  if (i) {
5896
6043
  return i;
5897
6044
  }
5898
6045
  try {
5899
- return p(__dirname)(`${r}/package.json`)?.version || null;
6046
+ return h(__dirname)(`${r}/package.json`)?.version || null;
5900
6047
  } catch (t) {
5901
6048
  return null;
5902
6049
  }
5903
6050
  })(t);
5904
- if (!l) {
5905
- yield failedTask(Te.CHECK_DEPENDENCIES);
6051
+ if (!c) {
6052
+ yield failedTask(Me.CHECK_DEPENDENCIES);
5906
6053
  throw errorMessage(`A version of ${code("@0no-co/graphqlsp")} was not found in your dependencies.\n` + hint(`Is ${code("@0no-co/graphqlsp")} installed?`));
5907
- } else if (!semverComply(l, ue.lsp)) {
5908
- yield failedTask(Te.CHECK_DEPENDENCIES);
5909
- throw errorMessage(`The version of ${code("@0no-co/graphqlsp")} in your dependencies is out of date.\n` + hint(`${code("gql.tada")} requires at least ${bold(ue.lsp)}`));
6054
+ } else if (!semverComply(c, fe.lsp)) {
6055
+ yield failedTask(Me.CHECK_DEPENDENCIES);
6056
+ throw errorMessage(`The version of ${code("@0no-co/graphqlsp")} in your dependencies is out of date.\n` + hint(`${code("gql.tada")} requires at least ${bold(fe.lsp)}`));
5910
6057
  }
5911
6058
  }
5912
- var c = await (async t => {
6059
+ var u = await (async t => {
5913
6060
  var r = "gql.tada";
5914
6061
  var i = await getPackageVersion(r, t);
5915
6062
  if (i) {
5916
6063
  return i;
5917
6064
  }
5918
6065
  try {
5919
- return p(process.cwd())(`${r}/package.json`)?.version || null;
6066
+ return h(process.cwd())(`${r}/package.json`)?.version || null;
5920
6067
  } catch (t) {
5921
6068
  return null;
5922
6069
  }
5923
6070
  })(t);
5924
- if (!c) {
5925
- yield failedTask(Te.CHECK_DEPENDENCIES);
6071
+ if (!u) {
6072
+ yield failedTask(Me.CHECK_DEPENDENCIES);
5926
6073
  throw errorMessage(`A version of ${code("gql.tada")} was not found in your dependencies.\n` + hint(`Is ${code("gql.tada")} installed?`));
5927
- } else if (!semverComply(c, "1.0.0")) {
5928
- yield failedTask(Te.CHECK_DEPENDENCIES);
5929
- throw errorMessage(`The version of ${code("gql.tada")} in your dependencies is out of date.\n` + hint(`It's recommended to upgrade ${code("gql.tada")} to at least ${bold(ue.lsp)}`));
6074
+ } else if (!semverComply(u, "1.0.0")) {
6075
+ yield failedTask(Me.CHECK_DEPENDENCIES);
6076
+ throw errorMessage(`The version of ${code("gql.tada")} in your dependencies is out of date.\n` + hint(`It's recommended to upgrade ${code("gql.tada")} to at least ${bold(fe.lsp)}`));
5930
6077
  }
5931
- yield completedTask(Te.CHECK_DEPENDENCIES);
5932
- yield runningTask(Te.CHECK_TSCONFIG);
6078
+ yield completedTask(Me.CHECK_DEPENDENCIES);
6079
+ yield runningTask(Me.CHECK_TSCONFIG);
5933
6080
  await delay();
5934
- var u;
6081
+ var d;
5935
6082
  try {
5936
- u = await n();
6083
+ d = await n();
5937
6084
  } catch (t) {
5938
- yield failedTask(Te.CHECK_TSCONFIG);
6085
+ yield failedTask(Me.CHECK_TSCONFIG);
5939
6086
  throw externalError(`A ${code("tsconfig.json")} file was not found in the current working directory.`, t);
5940
6087
  }
5941
- var f;
6088
+ var p = [];
6089
+ for (var g of d) {
6090
+ var v = r.relative(process.cwd(), g.tsconfigPath) || g.tsconfigPath;
6091
+ try {
6092
+ p.push({
6093
+ configResult: g,
6094
+ pluginConfig: a(g.pluginConfig, g.rootPath),
6095
+ projectPath: r.dirname(g.tsconfigPath),
6096
+ label: v
6097
+ });
6098
+ } catch (t) {
6099
+ yield failedTask(Me.CHECK_TSCONFIG);
6100
+ throw externalError(`The plugin configuration for ${code(l ? '"gql.tada/ts-plugin"' : '"@0no-co/graphqlsp"')} in ${code(v)} seems to be invalid.`, t);
6101
+ }
6102
+ }
5942
6103
  try {
5943
- f = a(u.pluginConfig, u.rootPath);
6104
+ o(p.map((t => ({
6105
+ projectPath: t.projectPath,
6106
+ config: t.pluginConfig,
6107
+ label: t.label
6108
+ }))));
5944
6109
  } catch (t) {
5945
- yield failedTask(Te.CHECK_TSCONFIG);
5946
- throw externalError(`The plugin configuration for ${code(s ? '"gql.tada/ts-plugin"' : '"@0no-co/graphqlsp"')} seems to be invalid.`, t);
6110
+ yield failedTask(Me.CHECK_TSCONFIG);
6111
+ throw externalError("The output locations of your configured projects overlap.", t);
6112
+ }
6113
+ yield completedTask(Me.CHECK_TSCONFIG);
6114
+ if (p.length > 1) {
6115
+ yield hintMessage(`Found ${p.length} ${code("gql.tada")} projects through ${code('"references"')} in your ${code("tsconfig.json")} files.\n`);
5947
6116
  }
5948
- yield completedTask(Te.CHECK_TSCONFIG);
5949
6117
  yield* async function* runExternalFilesChecks(t, i) {
5950
6118
  var n = [];
5951
- try {
5952
- n = programFactory(t).createExternalFiles();
5953
- } catch (t) {
5954
- return;
6119
+ for (var a of t) {
6120
+ try {
6121
+ var o = programFactory({
6122
+ rootPath: a.configResult.rootPath,
6123
+ configPath: a.configResult.tsconfigPath
6124
+ });
6125
+ n.push(...o.createExternalFiles());
6126
+ } catch (t) {}
5955
6127
  }
5956
6128
  if (n.length) {
5957
- yield runningTask(Te.CHECK_EXTERNAL_FILES);
6129
+ yield runningTask(Me.CHECK_EXTERNAL_FILES);
5958
6130
  await delay();
5959
- var a = new Set(n.map((t => r.extname(t.fileName))));
5960
- if (a.has(".svelte") && !await hasSvelteSupport(i)) {
5961
- yield failedTask(Te.CHECK_EXTERNAL_FILES);
6131
+ var s = new Set(n.map((t => r.extname(t.fileName))));
6132
+ if (s.has(".svelte") && !await hasSvelteSupport(i)) {
6133
+ yield failedTask(Me.CHECK_EXTERNAL_FILES);
5962
6134
  throw errorMessage(`A version of ${code("@gql.tada/svelte-support")} must be installed for Svelte file support.\n` + hint(`Have you installed ${code("@gql.tada/svelte-support")}?`));
5963
6135
  }
5964
- if (a.has(".vue") && !await hasVueSupport(i)) {
5965
- yield failedTask(Te.CHECK_EXTERNAL_FILES);
6136
+ if (s.has(".vue") && !await hasVueSupport(i)) {
6137
+ yield failedTask(Me.CHECK_EXTERNAL_FILES);
5966
6138
  throw errorMessage(`A version of ${code("@gql.tada/vue-support")} must be installed for Vue file support.\n` + hint(`Have you installed ${code("@gql.tada/vue-support")}?`));
5967
6139
  }
5968
- yield completedTask(Te.CHECK_EXTERNAL_FILES);
6140
+ yield completedTask(Me.CHECK_EXTERNAL_FILES);
5969
6141
  }
5970
- }(u, t);
6142
+ }(p, t);
5971
6143
  yield* async function* runVSCodeChecks() {
5972
6144
  var t = await loadSuggestedExtensionsList();
5973
6145
  var i = await isVSCodeInstalled();
5974
6146
  if (t.length || i) {
5975
- yield runningTask(Te.CHECK_VSCODE);
6147
+ yield runningTask(Me.CHECK_VSCODE);
5976
6148
  await delay();
5977
6149
  var n = !1;
5978
6150
  var a = [];
@@ -5980,7 +6152,7 @@ async function* run() {
5980
6152
  if (!(a = await loadExtensionsList()).includes("graphql.vscode-graphql-syntax")) {
5981
6153
  if (!n) {
5982
6154
  n = !0;
5983
- yield warningTask(Te.CHECK_VSCODE);
6155
+ yield warningTask(Me.CHECK_VSCODE);
5984
6156
  }
5985
6157
  yield hintMessage(`We recommend you to install the ${code('"GraphQL: Syntax Highlighting"')} extension for VSCode.\nSee: https://marketplace.visualstudio.com/items?itemName=GraphQL.vscode-graphql-syntax\n`);
5986
6158
  }
@@ -5990,30 +6162,32 @@ async function* run() {
5990
6162
  if (o && s) {
5991
6163
  if (!n) {
5992
6164
  n = !0;
5993
- yield warningTask(Te.CHECK_VSCODE);
6165
+ yield warningTask(Me.CHECK_VSCODE);
5994
6166
  }
5995
6167
  var l = r.basename(s);
5996
6168
  yield hintMessage(`The ${code('"GraphQL: Language Feature Support"')} VSCode extension can cause problems!\nWhen enabled it may display invalid diagnostic errors for ${code("gql.tada")} code.\nCheck whether your ${code(l)} config only targets ${code(".graphql")} documents.\n`);
5997
6169
  }
5998
6170
  if (!n) {
5999
- yield completedTask(Te.CHECK_VSCODE);
6171
+ yield completedTask(Me.CHECK_VSCODE);
6000
6172
  }
6001
6173
  }
6002
6174
  }();
6003
- yield runningTask(Te.CHECK_SCHEMA);
6175
+ yield runningTask(Me.CHECK_SCHEMA);
6004
6176
  await delay();
6005
- try {
6006
- await o(f).load({
6007
- rootPath: r.dirname(u.configPath)
6008
- });
6009
- } catch (t) {
6010
- yield failedTask(Te.CHECK_SCHEMA);
6011
- throw externalError("Failed to load schema.", t);
6177
+ for (var m of p) {
6178
+ try {
6179
+ await s(m.pluginConfig).load({
6180
+ rootPath: m.projectPath
6181
+ });
6182
+ } catch (t) {
6183
+ yield failedTask(Me.CHECK_SCHEMA);
6184
+ throw externalError(p.length > 1 ? `Failed to load schema for project ${code(m.label)}.` : "Failed to load schema.", t);
6185
+ }
6012
6186
  }
6013
- yield completedTask(Te.CHECK_SCHEMA, !0);
6187
+ yield completedTask(Me.CHECK_SCHEMA, !0);
6014
6188
  await delay();
6015
6189
  yield function success() {
6016
- return text([ "\n", cmd(j.Style, [ H.Green, H.Invert ]), " Done ", cmd(j.Style, H.NoInvert), W.Space, "You are all set and ready to go.\n" ]);
6190
+ return text([ "\n", cmd(D.Style, [ V.Green, V.Invert ]), " Done ", cmd(D.Style, V.NoInvert), K.Space, "You are all set and ready to go.\n" ]);
6017
6191
  }();
6018
6192
  }
6019
6193
 
@@ -6037,7 +6211,7 @@ class InitCommand extends Command {
6037
6211
  }
6038
6212
  }
6039
6213
 
6040
- var Pe = Object.assign((async function _main() {
6214
+ var Be = Object.assign((async function _main() {
6041
6215
  var t = new Cli({
6042
6216
  binaryVersion: process.env.npm_package_version || "0.0.0",
6043
6217
  binaryLabel: "gql.tada CLI",
@@ -6051,7 +6225,7 @@ var Pe = Object.assign((async function _main() {
6051
6225
  t.register(InitCommand);
6052
6226
  t.register(TurboCommand);
6053
6227
  await t.runExit(process.argv.slice(2));
6054
- }), oe);
6228
+ }), le);
6055
6229
 
6056
- export { ue as M, generatePersisted as a, generateSchema as b, generateTurbo as c, generateOutput as g, Pe as m, programFactory as p, semverComply as s };
6230
+ export { fe as M, generatePersisted as a, generateSchema as b, generateTurbo as c, generateOutput as g, Be as m, programFactory as p, semverComply as s };
6057
6231
  //# sourceMappingURL=index-chunk.mjs.map