@gql.tada/cli-utils 1.9.1 → 1.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/dist/chunks/index-chunk.js +59 -36
- package/dist/chunks/index-chunk.js.map +1 -1
- package/dist/chunks/index-chunk.mjs +114 -91
- package/dist/chunks/index-chunk.mjs.map +1 -1
- package/dist/chunks/thread-chunk4.js +8 -6
- package/dist/chunks/thread-chunk4.js.map +1 -1
- package/dist/chunks/thread-chunk4.mjs +14 -12
- package/dist/chunks/thread-chunk4.mjs.map +1 -1
- package/package.json +3 -3
|
@@ -10,7 +10,7 @@ import p from "node:fs/promises";
|
|
|
10
10
|
|
|
11
11
|
import { emitKeypressEvents as h } from "node:readline";
|
|
12
12
|
|
|
13
|
-
import { printSchema as g, parse as m, Kind as v, print as y, visit as w, getNamedType as S, isListType as $, getNullableType as b, TypeInfo as x, visitInParallel as
|
|
13
|
+
import { printSchema as g, parse as m, Kind as v, print as y, visit as w, getNamedType as S, isListType as $, getNullableType as b, TypeInfo as x, visitInParallel as C, visitWithTypeInfo as E, isObjectType as k, isInterfaceType as O } from "graphql";
|
|
14
14
|
|
|
15
15
|
import * as N from "node:crypto";
|
|
16
16
|
|
|
@@ -41,9 +41,9 @@ var B = -1;
|
|
|
41
41
|
|
|
42
42
|
var _ = /^(-h|--help)(?:=([0-9]+))?$/;
|
|
43
43
|
|
|
44
|
-
var
|
|
44
|
+
var j = /^(--[a-z]+(?:-[a-z]+)*|-[a-zA-Z]+)$/;
|
|
45
45
|
|
|
46
|
-
var
|
|
46
|
+
var R = /^-[a-zA-Z]{2,}$/;
|
|
47
47
|
|
|
48
48
|
var L = /^([^=]+)=([\s\S]*)$/;
|
|
49
49
|
|
|
@@ -384,13 +384,13 @@ function runMachineInternal(t, r, a = !1) {
|
|
|
384
384
|
}
|
|
385
385
|
}
|
|
386
386
|
if (!l) {
|
|
387
|
-
for (var [x, {to:
|
|
387
|
+
for (var [x, {to: C, reducer: E}] of p.dynamics) {
|
|
388
388
|
if (execute(W, x, f, s, c)) {
|
|
389
389
|
u.push({
|
|
390
|
-
node:
|
|
391
|
-
state: void 0 !==
|
|
390
|
+
node: C,
|
|
391
|
+
state: void 0 !== E ? execute(K, E, f, s, c) : f
|
|
392
392
|
});
|
|
393
|
-
debug(` Dynamic transition to ${
|
|
393
|
+
debug(` Dynamic transition to ${C} found (via ${x})`);
|
|
394
394
|
}
|
|
395
395
|
}
|
|
396
396
|
}
|
|
@@ -564,15 +564,15 @@ var W = {
|
|
|
564
564
|
isOptionLike: (t, r) => !t.ignoreOptions && "-" !== r && r.startsWith("-"),
|
|
565
565
|
isNotOptionLike: (t, r) => t.ignoreOptions || "-" === r || !r.startsWith("-"),
|
|
566
566
|
isOption: (t, r, a, n) => !t.ignoreOptions && r === n,
|
|
567
|
-
isBatchOption: (t, r, a, n) => !t.ignoreOptions &&
|
|
567
|
+
isBatchOption: (t, r, a, n) => !t.ignoreOptions && R.test(r) && [ ...r.slice(1) ].every((t => n.has(`-${t}`))),
|
|
568
568
|
isBoundOption: (t, r, a, n, i) => {
|
|
569
569
|
var o = r.match(L);
|
|
570
|
-
return !t.ignoreOptions && !!o &&
|
|
570
|
+
return !t.ignoreOptions && !!o && j.test(o[1]) && n.has(o[1]) && i.filter((t => t.nameSet.includes(o[1]))).every((t => t.allowBinding));
|
|
571
571
|
},
|
|
572
572
|
isNegatedOption: (t, r, a, n) => !t.ignoreOptions && r === `--no-${n.slice(2)}`,
|
|
573
573
|
isHelp: (t, r) => !t.ignoreOptions && _.test(r),
|
|
574
|
-
isUnsupportedOption: (t, r, a, n) => !t.ignoreOptions && r.startsWith("-") &&
|
|
575
|
-
isInvalidOption: (t, r) => !t.ignoreOptions && r.startsWith("-") && !
|
|
574
|
+
isUnsupportedOption: (t, r, a, n) => !t.ignoreOptions && r.startsWith("-") && j.test(r) && !n.has(r),
|
|
575
|
+
isInvalidOption: (t, r) => !t.ignoreOptions && r.startsWith("-") && !j.test(r)
|
|
576
576
|
};
|
|
577
577
|
|
|
578
578
|
var K = {
|
|
@@ -1070,20 +1070,20 @@ class CommandBuilder {
|
|
|
1070
1070
|
}
|
|
1071
1071
|
var b = v;
|
|
1072
1072
|
for (var x = 0; x < this.arity.trailing.length; ++x) {
|
|
1073
|
-
var
|
|
1073
|
+
var C = injectNode(t, {
|
|
1074
1074
|
dynamics: [],
|
|
1075
1075
|
shortcuts: [],
|
|
1076
1076
|
statics: {}
|
|
1077
1077
|
});
|
|
1078
1078
|
if (!this.arity.proxy) {
|
|
1079
|
-
this.registerOptions(t,
|
|
1079
|
+
this.registerOptions(t, C);
|
|
1080
1080
|
}
|
|
1081
1081
|
if (x + 1 < this.arity.trailing.length) {
|
|
1082
|
-
registerStatic(t,
|
|
1083
|
-
registerStatic(t,
|
|
1082
|
+
registerStatic(t, C, M.EndOfInput, F.ErrorNode, [ "setError", "Not enough positional arguments" ]);
|
|
1083
|
+
registerStatic(t, C, M.EndOfPartialInput, F.SuccessNode, [ "setSelectedIndex", this.cliIndex ]);
|
|
1084
1084
|
}
|
|
1085
|
-
registerDynamic(t, b, "isNotOptionLike",
|
|
1086
|
-
b =
|
|
1085
|
+
registerDynamic(t, b, "isNotOptionLike", C, "pushPositional");
|
|
1086
|
+
b = C;
|
|
1087
1087
|
}
|
|
1088
1088
|
registerDynamic(t, b, i, F.ErrorNode, [ "setError", "Extraneous positional argument" ]);
|
|
1089
1089
|
registerStatic(t, b, M.EndOfInput, F.SuccessNode, [ "setSelectedIndex", this.cliIndex ]);
|
|
@@ -1579,10 +1579,10 @@ class Cli {
|
|
|
1579
1579
|
var x = null !== $ ? $.trim() : "General commands";
|
|
1580
1580
|
d += "\n";
|
|
1581
1581
|
d += `${this.format(r).header(`${x}`)}\n`;
|
|
1582
|
-
for (var {commandClass:
|
|
1583
|
-
var k =
|
|
1582
|
+
for (var {commandClass: C, usage: E} of b) {
|
|
1583
|
+
var k = C.usage.description || "undocumented";
|
|
1584
1584
|
d += "\n";
|
|
1585
|
-
d += ` ${this.format(r).bold(
|
|
1585
|
+
d += ` ${this.format(r).bold(E)}\n`;
|
|
1586
1586
|
d += ` ${formatMarkdownish(k, {
|
|
1587
1587
|
format: this.format(r),
|
|
1588
1588
|
paragraphs: !1
|
|
@@ -1638,13 +1638,13 @@ class Cli {
|
|
|
1638
1638
|
if (I.length > 0) {
|
|
1639
1639
|
d += "\n";
|
|
1640
1640
|
d += `${this.format(r).header("Examples")}\n`;
|
|
1641
|
-
for (var [
|
|
1641
|
+
for (var [j, R] of I) {
|
|
1642
1642
|
d += "\n";
|
|
1643
|
-
d += formatMarkdownish(
|
|
1643
|
+
d += formatMarkdownish(j, {
|
|
1644
1644
|
format: this.format(r),
|
|
1645
1645
|
paragraphs: !1
|
|
1646
1646
|
});
|
|
1647
|
-
d += `${
|
|
1647
|
+
d += `${R.replace(/^/m, ` ${this.format(r).bold(n)}`).replace(/\$0/g, this.binaryName)}\n`;
|
|
1648
1648
|
}
|
|
1649
1649
|
}
|
|
1650
1650
|
}
|
|
@@ -2748,7 +2748,7 @@ function initTTY(t = {}) {
|
|
|
2748
2748
|
n = process.stderr;
|
|
2749
2749
|
a = process.stdout;
|
|
2750
2750
|
} else {
|
|
2751
|
-
r = n.isTTY;
|
|
2751
|
+
r = r && !!n.isTTY;
|
|
2752
2752
|
}
|
|
2753
2753
|
var i = process.argv.includes("--color");
|
|
2754
2754
|
var o = "FORCE_COLOR" in process.env || !process.env.NO_COLOR && !process.env.CI;
|
|
@@ -2770,7 +2770,6 @@ function initTTY(t = {}) {
|
|
|
2770
2770
|
function onKeypress(t, n) {
|
|
2771
2771
|
switch (n.name) {
|
|
2772
2772
|
case "c":
|
|
2773
|
-
case "d":
|
|
2774
2773
|
case "x":
|
|
2775
2774
|
if (n.ctrl) {
|
|
2776
2775
|
return r();
|
|
@@ -2786,12 +2785,17 @@ function initTTY(t = {}) {
|
|
|
2786
2785
|
});
|
|
2787
2786
|
}
|
|
2788
2787
|
function cleanup() {
|
|
2789
|
-
|
|
2790
|
-
t.
|
|
2788
|
+
try {
|
|
2789
|
+
if (t.isTTY) {
|
|
2790
|
+
t.setRawMode(!1);
|
|
2791
|
+
}
|
|
2792
|
+
t.removeListener("keypress", onKeypress);
|
|
2793
|
+
if ("function" == typeof t.unref) {
|
|
2794
|
+
t.unref();
|
|
2795
|
+
}
|
|
2796
|
+
} catch {} finally {
|
|
2797
|
+
a.complete();
|
|
2791
2798
|
}
|
|
2792
|
-
a.complete();
|
|
2793
|
-
t.removeListener("keypress", onKeypress);
|
|
2794
|
-
t.unref();
|
|
2795
2799
|
}
|
|
2796
2800
|
if (t.isTTY) {
|
|
2797
2801
|
t.setRawMode(!0);
|
|
@@ -2839,16 +2843,16 @@ function initTTY(t = {}) {
|
|
|
2839
2843
|
n.write(text(...r));
|
|
2840
2844
|
}
|
|
2841
2845
|
},
|
|
2842
|
-
start: function start(
|
|
2846
|
+
start: function start(a) {
|
|
2843
2847
|
var write = r => {
|
|
2844
2848
|
if (!t.silent) {
|
|
2845
2849
|
n.write("" + r);
|
|
2846
2850
|
}
|
|
2847
2851
|
};
|
|
2848
|
-
if (t.disableTTY) {
|
|
2849
|
-
return pipe(compose(
|
|
2852
|
+
if (t.disableTTY || !r) {
|
|
2853
|
+
return pipe(compose(a), onPush(write), toPromise);
|
|
2850
2854
|
} else {
|
|
2851
|
-
return pipe(compose(
|
|
2855
|
+
return pipe(compose(a), onPush(write), takeUntil(l), toPromise);
|
|
2852
2856
|
}
|
|
2853
2857
|
},
|
|
2854
2858
|
mode: function mode(...t) {
|
|
@@ -3051,14 +3055,27 @@ async function* run$6(t, r) {
|
|
|
3051
3055
|
if (a.length > 1 && (r.output || t.pipeTo)) {
|
|
3052
3056
|
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"')}.`));
|
|
3053
3057
|
}
|
|
3054
|
-
|
|
3058
|
+
var n = new Set;
|
|
3059
|
+
for (var i of a) {
|
|
3060
|
+
var o = outputDestinations(i);
|
|
3061
|
+
if (o.length && o.every((t => n.has(t)))) {
|
|
3062
|
+
continue;
|
|
3063
|
+
}
|
|
3064
|
+
for (var s of o) {
|
|
3065
|
+
n.add(s);
|
|
3066
|
+
}
|
|
3055
3067
|
if (a.length > 1) {
|
|
3056
|
-
yield projectHeader(
|
|
3068
|
+
yield projectHeader(i.label);
|
|
3057
3069
|
}
|
|
3058
|
-
yield* runProject$3(t, r,
|
|
3070
|
+
yield* runProject$3(t, r, i);
|
|
3059
3071
|
}
|
|
3060
3072
|
}
|
|
3061
3073
|
|
|
3074
|
+
function outputDestinations(r) {
|
|
3075
|
+
var {pluginConfig: a, projectPath: n} = r;
|
|
3076
|
+
return ("schemas" in a ? a.schemas.map((t => t.tadaOutputLocation)) : [ a.tadaOutputLocation ]).filter((t => !!t)).map((r => t.resolve(n, r)));
|
|
3077
|
+
}
|
|
3078
|
+
|
|
3062
3079
|
async function* runProject$3(r, a, n) {
|
|
3063
3080
|
var {pluginConfig: i, projectPath: o} = n;
|
|
3064
3081
|
var d = s(i);
|
|
@@ -3332,25 +3349,25 @@ async function* runProject$2(r, a, n, i) {
|
|
|
3332
3349
|
}
|
|
3333
3350
|
var b = {};
|
|
3334
3351
|
for (var x of s.schemas) {
|
|
3335
|
-
var {name:
|
|
3336
|
-
if (!
|
|
3337
|
-
throw errorMessage$1(`No output path was specified to write the '${
|
|
3352
|
+
var {name: C, tadaPersistedLocation: E} = x;
|
|
3353
|
+
if (!E) {
|
|
3354
|
+
throw errorMessage$1(`No output path was specified to write the '${C}' schema to.\n` + hint(`You have to set ${code('"tadaPersistedLocation"')} in each schema configuration.`));
|
|
3338
3355
|
}
|
|
3339
3356
|
try {
|
|
3340
|
-
b[
|
|
3357
|
+
b[C] = 0;
|
|
3341
3358
|
var k = {};
|
|
3342
3359
|
for (var O of u) {
|
|
3343
|
-
if (O.schemaName ===
|
|
3360
|
+
if (O.schemaName === C) {
|
|
3344
3361
|
k[O.hashKey] = O.document;
|
|
3345
|
-
b[
|
|
3362
|
+
b[C]++;
|
|
3346
3363
|
}
|
|
3347
3364
|
}
|
|
3348
|
-
if (b[
|
|
3365
|
+
if (b[C]) {
|
|
3349
3366
|
var N = JSON.stringify(k, null, 2);
|
|
3350
|
-
await writeOutput(t.resolve(l,
|
|
3367
|
+
await writeOutput(t.resolve(l, E), N);
|
|
3351
3368
|
}
|
|
3352
3369
|
} catch (t) {
|
|
3353
|
-
throw externalError(`Something went wrong while writing the '${
|
|
3370
|
+
throw externalError(`Something went wrong while writing the '${C}' schema's persisted manifest file.`, t);
|
|
3354
3371
|
}
|
|
3355
3372
|
}
|
|
3356
3373
|
if (d && a.failOnWarn) {
|
|
@@ -4047,23 +4064,23 @@ async function* runProject$1(r, a, n, i) {
|
|
|
4047
4064
|
if (a.output) {
|
|
4048
4065
|
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.`));
|
|
4049
4066
|
}
|
|
4050
|
-
var E = {};
|
|
4051
4067
|
var C = {};
|
|
4068
|
+
var E = {};
|
|
4052
4069
|
for (var k of s.schemas) {
|
|
4053
4070
|
var {name: O, tadaTurboLocation: N} = k;
|
|
4054
4071
|
if (!N) {
|
|
4055
4072
|
throw errorMessage$1(`No output path was specified to write the '${O}' type cache to.\n` + hint(`You have to set ${code('"tadaTurboLocation"')} in each schema configuration.`));
|
|
4056
4073
|
}
|
|
4057
4074
|
try {
|
|
4058
|
-
E[O] = 0;
|
|
4059
4075
|
C[O] = 0;
|
|
4076
|
+
E[O] = 0;
|
|
4060
4077
|
var T = [];
|
|
4061
4078
|
for (var I of p) {
|
|
4062
4079
|
if (I.schemaName === O) {
|
|
4063
4080
|
T.push(I);
|
|
4064
|
-
|
|
4081
|
+
C[O]++;
|
|
4065
4082
|
if (I.isCached) {
|
|
4066
|
-
|
|
4083
|
+
E[O]++;
|
|
4067
4084
|
}
|
|
4068
4085
|
}
|
|
4069
4086
|
}
|
|
@@ -4083,7 +4100,7 @@ async function* runProject$1(r, a, n, i) {
|
|
|
4083
4100
|
failed: !0
|
|
4084
4101
|
};
|
|
4085
4102
|
} else {
|
|
4086
|
-
yield infoSummary$1(g,
|
|
4103
|
+
yield infoSummary$1(g, C, E);
|
|
4087
4104
|
}
|
|
4088
4105
|
}
|
|
4089
4106
|
return {
|
|
@@ -4098,33 +4115,39 @@ function createCacheContents(r, a, n, i) {
|
|
|
4098
4115
|
for (var l of r) {
|
|
4099
4116
|
s.set(l.argumentKey, l);
|
|
4100
4117
|
}
|
|
4101
|
-
var c =
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
}
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
var p = "
|
|
4113
|
-
var h =
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
|
|
4118
|
+
var c = [ ...s.values() ].sort(((t, r) => compareUtf16(t.argumentKey, r.argumentKey)));
|
|
4119
|
+
var d = "";
|
|
4120
|
+
for (var f of c) {
|
|
4121
|
+
if (d) {
|
|
4122
|
+
d += "\n";
|
|
4123
|
+
}
|
|
4124
|
+
if (f.documentHash) {
|
|
4125
|
+
d += ` /** @gql.tada/hash ${f.documentHash} */\n`;
|
|
4126
|
+
}
|
|
4127
|
+
d += ` ${f.argumentKey}:\n ${f.documentType};`;
|
|
4128
|
+
}
|
|
4129
|
+
var p = "import type { TadaDocumentNode, $tada } from 'gql.tada';\n";
|
|
4130
|
+
var h = "string" == typeof n || n && "object" == typeof n && "toString" in n && !("writable" in n);
|
|
4131
|
+
var g = [ ...a ].sort(((t, r) => compareUtf16(t.absolutePath, r.absolutePath)));
|
|
4132
|
+
var m = new Set;
|
|
4133
|
+
for (var v of g) {
|
|
4134
|
+
for (var y of v.imports) {
|
|
4135
|
+
if (h) {
|
|
4136
|
+
var w = n.toString();
|
|
4137
|
+
var S = t.dirname(v.absolutePath);
|
|
4138
|
+
if (t.resolve(S, y.specifier) === t.resolve(w) || m.has(y.specifier)) {
|
|
4120
4139
|
continue;
|
|
4121
4140
|
}
|
|
4122
|
-
|
|
4141
|
+
m.add(y.specifier);
|
|
4123
4142
|
}
|
|
4124
|
-
|
|
4143
|
+
p += y.importClause + "\n";
|
|
4125
4144
|
}
|
|
4126
4145
|
}
|
|
4127
|
-
return o +
|
|
4146
|
+
return o + p + "\ndeclare module 'gql.tada' {\n interface setupCache {\n" + d + "\n }\n}\n";
|
|
4147
|
+
}
|
|
4148
|
+
|
|
4149
|
+
function compareUtf16(t, r) {
|
|
4150
|
+
return t < r ? -1 : t > r ? 1 : 0;
|
|
4128
4151
|
}
|
|
4129
4152
|
|
|
4130
4153
|
class TurboCommand extends Command {
|
|
@@ -4574,7 +4597,7 @@ class ScanContext {
|
|
|
4574
4597
|
}
|
|
4575
4598
|
}
|
|
4576
4599
|
|
|
4577
|
-
var
|
|
4600
|
+
var Ce = {
|
|
4578
4601
|
name: "field-usage",
|
|
4579
4602
|
description: "Used fields, keyed by schema coordinate, with their reach.",
|
|
4580
4603
|
create(t) {
|
|
@@ -4659,8 +4682,8 @@ var Ee = {
|
|
|
4659
4682
|
for (var x of $.areas) {
|
|
4660
4683
|
y.add(x);
|
|
4661
4684
|
}
|
|
4662
|
-
for (var
|
|
4663
|
-
w.add(
|
|
4685
|
+
for (var C of $.entryPoints) {
|
|
4686
|
+
w.add(C);
|
|
4664
4687
|
}
|
|
4665
4688
|
}
|
|
4666
4689
|
l.push({
|
|
@@ -4694,7 +4717,7 @@ var Ee = {
|
|
|
4694
4717
|
}
|
|
4695
4718
|
};
|
|
4696
4719
|
|
|
4697
|
-
var
|
|
4720
|
+
var Ee = [ Ce, {
|
|
4698
4721
|
name: "input-usage",
|
|
4699
4722
|
description: "Usage counts for enum values and input-object fields.",
|
|
4700
4723
|
create(t) {
|
|
@@ -5266,7 +5289,7 @@ var Ne = 8;
|
|
|
5266
5289
|
|
|
5267
5290
|
var Te = 24;
|
|
5268
5291
|
|
|
5269
|
-
var Ie = new Map(
|
|
5292
|
+
var Ie = new Map(Ee.map((t => [ t.name, t.description ])));
|
|
5270
5293
|
|
|
5271
5294
|
var truncate = (t, r) => t.length <= r ? t : r > 1 ? t.slice(0, r - 1) + oe.Ellipsis : oe.Ellipsis;
|
|
5272
5295
|
|
|
@@ -5460,7 +5483,7 @@ async function* runProject(r, a, n) {
|
|
|
5460
5483
|
throw externalError("Could not scan files", t);
|
|
5461
5484
|
}
|
|
5462
5485
|
var $;
|
|
5463
|
-
var {context: b, rules: k} = function analyze(t, r =
|
|
5486
|
+
var {context: b, rules: k} = function analyze(t, r = Ee) {
|
|
5464
5487
|
var a = new ScanContext(t);
|
|
5465
5488
|
var n = r.map((t => ({
|
|
5466
5489
|
name: t.name,
|
|
@@ -5473,11 +5496,11 @@ async function* runProject(r, a, n) {
|
|
|
5473
5496
|
}
|
|
5474
5497
|
var l = new x(o);
|
|
5475
5498
|
a.setTypeInfo(l);
|
|
5476
|
-
var c =
|
|
5499
|
+
var c = C([ a.trackingVisitor(), ...n.map((({instance: t}) => t.visitor)) ]);
|
|
5477
5500
|
w({
|
|
5478
5501
|
kind: v.DOCUMENT,
|
|
5479
5502
|
definitions: s
|
|
5480
|
-
},
|
|
5503
|
+
}, E(l, c));
|
|
5481
5504
|
}
|
|
5482
5505
|
var u = {};
|
|
5483
5506
|
for (var {name: d, instance: f} of n) {
|
|
@@ -5744,11 +5767,11 @@ class CheckCommand extends Command {
|
|
|
5744
5767
|
}
|
|
5745
5768
|
}
|
|
5746
5769
|
|
|
5747
|
-
var
|
|
5770
|
+
var je = new Intl.Collator(0, {
|
|
5748
5771
|
numeric: 1
|
|
5749
5772
|
}).compare;
|
|
5750
5773
|
|
|
5751
|
-
var
|
|
5774
|
+
var Re = {
|
|
5752
5775
|
typescript_embed_lsp: "5.5.0",
|
|
5753
5776
|
typescript: "4.1.0",
|
|
5754
5777
|
tada: "1.0.0",
|
|
@@ -5760,7 +5783,7 @@ var semverComply = (t, r) => {
|
|
|
5760
5783
|
return a ? function semiver(t, r, a) {
|
|
5761
5784
|
t = t.split(".");
|
|
5762
5785
|
r = r.split(".");
|
|
5763
|
-
return
|
|
5786
|
+
return je(t[0], r[0]) || je(t[1], r[1]) || (r[2] = r.slice(2).join("."), (a = /[.-]/.test(t[2] = t.slice(2).join("."))) == /[.-]/.test(r[2]) ? je(t[2], r[2]) : a ? -1 : 1);
|
|
5764
5787
|
}(a[0], r) >= 0 : !1;
|
|
5765
5788
|
};
|
|
5766
5789
|
|
|
@@ -7472,14 +7495,14 @@ async function* run() {
|
|
|
7472
7495
|
if (!a) {
|
|
7473
7496
|
yield failedTask(at.CHECK_TS_VERSION);
|
|
7474
7497
|
throw errorMessage(`A version of ${code("typescript")} was not found in your dependencies.\n` + hint(`Is ${code("typescript")} installed in this package?`));
|
|
7475
|
-
} else if (!semverComply(a,
|
|
7498
|
+
} else if (!semverComply(a, Re.typescript)) {
|
|
7476
7499
|
yield failedTask(at.CHECK_TS_VERSION);
|
|
7477
|
-
throw errorMessage(`The version of ${code("typescript")} in your dependencies is out of date.\n` + hint(`${code("gql.tada")} requires at least ${bold(
|
|
7500
|
+
throw errorMessage(`The version of ${code("typescript")} in your dependencies is out of date.\n` + hint(`${code("gql.tada")} requires at least ${bold(Re.typescript)}`));
|
|
7478
7501
|
}
|
|
7479
7502
|
yield completedTask(at.CHECK_TS_VERSION);
|
|
7480
7503
|
yield runningTask(at.CHECK_DEPENDENCIES);
|
|
7481
7504
|
await delay();
|
|
7482
|
-
var l = semverComply(a,
|
|
7505
|
+
var l = semverComply(a, Re.typescript_embed_lsp);
|
|
7483
7506
|
if (!l) {
|
|
7484
7507
|
var c = await (async t => {
|
|
7485
7508
|
var r = "@0no-co/graphqlsp";
|
|
@@ -7496,9 +7519,9 @@ async function* run() {
|
|
|
7496
7519
|
if (!c) {
|
|
7497
7520
|
yield failedTask(at.CHECK_DEPENDENCIES);
|
|
7498
7521
|
throw errorMessage(`A version of ${code("@0no-co/graphqlsp")} was not found in your dependencies.\n` + hint(`Is ${code("@0no-co/graphqlsp")} installed?`));
|
|
7499
|
-
} else if (!semverComply(c,
|
|
7522
|
+
} else if (!semverComply(c, Re.lsp)) {
|
|
7500
7523
|
yield failedTask(at.CHECK_DEPENDENCIES);
|
|
7501
|
-
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(
|
|
7524
|
+
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(Re.lsp)}`));
|
|
7502
7525
|
}
|
|
7503
7526
|
}
|
|
7504
7527
|
var u = await (async t => {
|
|
@@ -7518,7 +7541,7 @@ async function* run() {
|
|
|
7518
7541
|
throw errorMessage(`A version of ${code("gql.tada")} was not found in your dependencies.\n` + hint(`Is ${code("gql.tada")} installed?`));
|
|
7519
7542
|
} else if (!semverComply(u, "1.0.0")) {
|
|
7520
7543
|
yield failedTask(at.CHECK_DEPENDENCIES);
|
|
7521
|
-
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(
|
|
7544
|
+
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(Re.lsp)}`));
|
|
7522
7545
|
}
|
|
7523
7546
|
yield completedTask(at.CHECK_DEPENDENCIES);
|
|
7524
7547
|
yield runningTask(at.CHECK_TSCONFIG);
|
|
@@ -7673,5 +7696,5 @@ var nt = Object.assign((async function _main() {
|
|
|
7673
7696
|
await t.runExit(process.argv.slice(2));
|
|
7674
7697
|
}), Fe);
|
|
7675
7698
|
|
|
7676
|
-
export {
|
|
7699
|
+
export { Re as M, generatePersisted as a, generateSchema as b, generateTurbo as c, scan as d, generateOutput as g, nt as m, programFactory as p, semverComply as s };
|
|
7677
7700
|
//# sourceMappingURL=index-chunk.mjs.map
|