@gql.tada/cli-utils
Advanced tools
Comparing version 1.5.3 to 1.5.4-canary-02aff4269f6f9ef17d6e56ef29c5a6a855d7297e
# @gql.tada/cli-utils | ||
## 1.5.4-canary-02aff4269f6f9ef17d6e56ef29c5a6a855d7297e | ||
### Patch Changes | ||
- Add fallback version checks to `doctor` command | ||
Submitted by [@kitten](https://github.com/kitten) (See [#358](https://github.com/0no-co/gql.tada/pull/358)) | ||
- When threading, transfer error properties to thread host | ||
Submitted by [@kitten](https://github.com/kitten) (See [#359](https://github.com/0no-co/gql.tada/pull/359)) | ||
## 1.5.3 | ||
@@ -4,0 +13,0 @@ |
@@ -9,3 +9,3 @@ var e = require("typescript"); | ||
var a = require("node:worker_threads"); | ||
var n = require("node:worker_threads"); | ||
@@ -31,3 +31,3 @@ function _interopNamespaceDefault(e) { | ||
var n = _interopNamespaceDefault(t); | ||
var a = _interopNamespaceDefault(t); | ||
@@ -98,6 +98,6 @@ var spanToFilePosition = (e, t) => { | ||
getNewLine: () => e.newLine, | ||
getSourceFile: a => i.get(a) || (e => { | ||
getSourceFile: n => i.get(n) || (e => { | ||
i.set(e.fileName, e); | ||
return e; | ||
})(r.createSourceFile(a, e.readFile(a), t.target || defaultCompilerOptions(r).target, !1)), | ||
})(r.createSourceFile(n, e.readFile(n), t.target || defaultCompilerOptions(r).target, !1)), | ||
useCaseSensitiveFileNames: () => e.useCaseSensitiveFileNames | ||
@@ -114,4 +114,4 @@ }, | ||
function createVirtualLanguageServiceHost(e, t, r, i, a) { | ||
var n = [ ...t ]; | ||
function createVirtualLanguageServiceHost(e, t, r, i, n) { | ||
var a = [ ...t ]; | ||
var {compilerHost: o, updateFile: s} = createVirtualCompilerHost(e, r, i); | ||
@@ -125,4 +125,4 @@ var l = new Map; | ||
getCompilationSettings: () => r, | ||
getCustomTransformers: () => a, | ||
getScriptFileNames: () => n.slice(), | ||
getCustomTransformers: () => n, | ||
getScriptFileNames: () => a.slice(), | ||
getScriptSnapshot: t => { | ||
@@ -141,4 +141,4 @@ var r = e.readFile(t); | ||
l.set(e.fileName, c.toString()); | ||
if (!n.includes(e.fileName)) { | ||
n.push(e.fileName); | ||
if (!a.includes(e.fileName)) { | ||
a.push(e.fileName); | ||
} | ||
@@ -166,11 +166,11 @@ s(e); | ||
while (r <= i) { | ||
var a = Math.floor((r + i) / 2); | ||
var n = e[a]; | ||
if (n < t) { | ||
r = a + 1; | ||
} else if (n > t) { | ||
i = a - 1; | ||
var n = Math.floor((r + i) / 2); | ||
var a = e[n]; | ||
if (a < t) { | ||
r = n + 1; | ||
} else if (a > t) { | ||
i = n - 1; | ||
} else { | ||
r = a; | ||
i = a; | ||
r = n; | ||
i = n; | ||
break; | ||
@@ -271,12 +271,12 @@ } | ||
} | ||
function splice(r, i, ...a) { | ||
function splice(r, i, ...n) { | ||
if (void 0 === i) { | ||
i = e.length - r; | ||
} | ||
var n = 0; | ||
var a = 0; | ||
var o; | ||
for (var s = 0; s < t.length; s++) { | ||
var l = t[s]; | ||
var c = n; | ||
n = c + l.length; | ||
var c = a; | ||
a = c + l.length; | ||
if (r >= c) { | ||
@@ -309,5 +309,5 @@ o = s + 1; | ||
stack: getStack(), | ||
length: a.length | ||
length: n.length | ||
}); | ||
return e.splice(r, i, ...a); | ||
return e.splice(r, i, ...n); | ||
} | ||
@@ -353,5 +353,5 @@ function sort(r) { | ||
} | ||
var a = Object.getOwnPropertyDescriptor(t, r); | ||
if (!a || ("get" in a ? !t.__esModule : a.writable || a.configurable)) { | ||
a = { | ||
var n = Object.getOwnPropertyDescriptor(t, r); | ||
if (!n || ("get" in n ? !t.__esModule : n.writable || n.configurable)) { | ||
n = { | ||
enumerable: !0, | ||
@@ -363,3 +363,3 @@ get: function() { | ||
} | ||
Object.defineProperty(e, i, a); | ||
Object.defineProperty(e, i, n); | ||
} : function(e, t, r, i) { | ||
@@ -383,3 +383,3 @@ if (void 0 === i) { | ||
var i = l; | ||
var a = c; | ||
var n = c; | ||
r(g, e); | ||
@@ -405,7 +405,7 @@ r(c, e); | ||
if (i && void 0 !== i.index) { | ||
var n = i.index; | ||
var o = n + i[0].length; | ||
(0, a.offsetStack)(); | ||
replaceRange(e, n, o, ...r.map((e => "function" == typeof e ? e(i[0]) : e))); | ||
(0, a.resetOffsetStack)(); | ||
var a = i.index; | ||
var o = a + i[0].length; | ||
(0, n.offsetStack)(); | ||
replaceRange(e, a, o, ...r.map((e => "function" == typeof e ? e(i[0]) : e))); | ||
(0, n.resetOffsetStack)(); | ||
} | ||
@@ -415,3 +415,3 @@ }; | ||
var i = toString(e); | ||
var n = i.matchAll(t); | ||
var a = i.matchAll(t); | ||
var o = i.length; | ||
@@ -422,6 +422,6 @@ var s = 0; | ||
var i = t.index + s; | ||
var n = i + t[0].length; | ||
(0, a.offsetStack)(); | ||
replaceRange(e, i, n, ...r.map((e => "function" == typeof e ? e(t[0]) : e))); | ||
(0, a.resetOffsetStack)(); | ||
var a = i + t[0].length; | ||
(0, n.offsetStack)(); | ||
replaceRange(e, i, a, ...r.map((e => "function" == typeof e ? e(t[0]) : e))); | ||
(0, n.resetOffsetStack)(); | ||
var l = getLength(e); | ||
@@ -432,7 +432,7 @@ s += l - o; | ||
}; | ||
for (var l of n) { | ||
for (var l of a) { | ||
_loop(l); | ||
} | ||
}; | ||
e.replaceSourceRange = function replaceSourceRange(e, t, r, i, ...n) { | ||
e.replaceSourceRange = function replaceSourceRange(e, t, r, i, ...a) { | ||
for (var o of e) { | ||
@@ -450,3 +450,3 @@ if ("string" == typeof o) { | ||
} | ||
for (var u of n) { | ||
for (var u of a) { | ||
c.push(u); | ||
@@ -458,5 +458,5 @@ } | ||
combineStrings(c); | ||
(0, a.offsetStack)(); | ||
(0, n.offsetStack)(); | ||
e.splice(e.indexOf(o), 1, ...c); | ||
(0, a.resetOffsetStack)(); | ||
(0, n.resetOffsetStack)(); | ||
return !0; | ||
@@ -468,3 +468,3 @@ } | ||
}; | ||
function replaceRange(e, t, r, ...n) { | ||
function replaceRange(e, t, r, ...a) { | ||
var o = function toOffsets(e) { | ||
@@ -489,3 +489,3 @@ var t = []; | ||
} | ||
for (var v of n) { | ||
for (var v of a) { | ||
d.push(v); | ||
@@ -497,5 +497,5 @@ } | ||
combineStrings(d); | ||
(0, a.offsetStack)(); | ||
(0, n.offsetStack)(); | ||
e.splice(s, l - s + 1, ...d); | ||
(0, a.resetOffsetStack)(); | ||
(0, n.resetOffsetStack)(); | ||
} | ||
@@ -507,5 +507,5 @@ e.replaceRange = replaceRange; | ||
e[t - 1] = e[t - 1] + e[t]; | ||
(0, a.offsetStack)(); | ||
(0, n.offsetStack)(); | ||
e.splice(t, 1); | ||
(0, a.resetOffsetStack)(); | ||
(0, n.resetOffsetStack)(); | ||
} | ||
@@ -544,14 +544,14 @@ } | ||
var i = e.length - 1; | ||
var a; | ||
var n; | ||
while (r <= i) { | ||
var n = Math.floor((r + i) / 2); | ||
var o = e[n]; | ||
var a = Math.floor((r + i) / 2); | ||
var o = e[a]; | ||
if (o < t) { | ||
r = n + 1; | ||
r = a + 1; | ||
} else if (o > t) { | ||
i = n - 1; | ||
i = a - 1; | ||
} else { | ||
r = n; | ||
i = n; | ||
a = n; | ||
r = a; | ||
i = a; | ||
n = a; | ||
break; | ||
@@ -563,3 +563,3 @@ } | ||
high: Math.min(Math.max(r, i, 0), e.length - 1), | ||
match: a | ||
match: n | ||
}; | ||
@@ -577,6 +577,6 @@ }; | ||
p.translateOffset = function translateOffset(e, t, r, i) { | ||
for (var a = 0; a < t.length; a++) { | ||
var n = t[a]; | ||
if (e >= n && e <= n + i[a]) { | ||
return r[a] + e - n; | ||
for (var n = 0; n < t.length; n++) { | ||
var a = t[n]; | ||
if (e >= a && e <= a + i[n]) { | ||
return r[n] + e - a; | ||
} | ||
@@ -621,5 +621,5 @@ } | ||
} | ||
var {low: a, high: n} = (0, m.binarySearch)(i.offsets, e); | ||
var {low: n, high: a} = (0, m.binarySearch)(i.offsets, e); | ||
var o = new Set; | ||
for (var s = a; s <= n; s++) { | ||
for (var s = n; s <= a; s++) { | ||
for (var l of i.mappings[s]) { | ||
@@ -648,10 +648,10 @@ if (o.has(l)) { | ||
} | ||
var a = [ ...t ].sort(((e, t) => e - t)); | ||
var n = a.map((() => new Set)); | ||
var n = [ ...t ].sort(((e, t) => e - t)); | ||
var a = n.map((() => new Set)); | ||
for (var o of this.mappings) { | ||
for (var s = 0; s < o[e].length; s++) { | ||
var l = (0, m.binarySearch)(a, o[e][s]).match; | ||
var c = (0, m.binarySearch)(a, o[e][s] + o.lengths[s]).match; | ||
var l = (0, m.binarySearch)(n, o[e][s]).match; | ||
var c = (0, m.binarySearch)(n, o[e][s] + o.lengths[s]).match; | ||
for (var u = l; u <= c; u++) { | ||
n[u].add(o); | ||
a[u].add(o); | ||
} | ||
@@ -661,4 +661,4 @@ } | ||
return { | ||
offsets: a, | ||
mappings: n | ||
offsets: n, | ||
mappings: a | ||
}; | ||
@@ -707,6 +707,6 @@ } | ||
var i = 0; | ||
var a = []; | ||
for (var n of t) { | ||
var n = []; | ||
for (var a of t) { | ||
var o = r; | ||
for (var s = 0; s < n.length; s++) { | ||
for (var s = 0; s < a.length; s++) { | ||
var l = e[i + s]; | ||
@@ -719,9 +719,9 @@ if ("string" == typeof l) { | ||
} | ||
i += n.length; | ||
a.push({ | ||
source: n.stack, | ||
i += a.length; | ||
n.push({ | ||
source: a.stack, | ||
range: [ o, r ] | ||
}); | ||
} | ||
return a; | ||
return n; | ||
}; | ||
@@ -734,5 +734,5 @@ | ||
} | ||
var a = Object.getOwnPropertyDescriptor(t, r); | ||
if (!a || ("get" in a ? !t.__esModule : a.writable || a.configurable)) { | ||
a = { | ||
var n = Object.getOwnPropertyDescriptor(t, r); | ||
if (!n || ("get" in n ? !t.__esModule : n.writable || n.configurable)) { | ||
n = { | ||
enumerable: !0, | ||
@@ -744,3 +744,3 @@ get: function() { | ||
} | ||
Object.defineProperty(e, i, a); | ||
Object.defineProperty(e, i, n); | ||
} : function(e, t, r, i) { | ||
@@ -802,62 +802,62 @@ if (void 0 === i) { | ||
var i = e.createLanguageService(t.languageServiceHost); | ||
var a = maybeBind(i, i.getProgram); | ||
var mapFileFn = e => (t, ...a) => { | ||
var n = r.get(t); | ||
if (n && n.sourceFileId === t) { | ||
t = n.generatedFileId; | ||
var n = maybeBind(i, i.getProgram); | ||
var mapFileFn = e => (t, ...n) => { | ||
var a = r.get(t); | ||
if (a && a.sourceFileId === t) { | ||
t = a.generatedFileId; | ||
} | ||
return e.call(i, t, ...a); | ||
return e.call(i, t, ...n); | ||
}; | ||
var mapFileTextSpanFn = e => (t, a, ...n) => { | ||
var mapFileTextSpanFn = e => (t, n, ...a) => { | ||
var o = r.get(t); | ||
if (o && o.sourceFileId === t) { | ||
t = o.generatedFileId; | ||
var s = o.getGeneratedOffset(a.start)?.[0]; | ||
var l = o.getGeneratedOffset(a.start + a.length - 1)?.[0]; | ||
var s = o.getGeneratedOffset(n.start)?.[0]; | ||
var l = o.getGeneratedOffset(n.start + n.length - 1)?.[0]; | ||
if (null != s) { | ||
a = { | ||
n = { | ||
start: s, | ||
length: a.length | ||
length: n.length | ||
}; | ||
if (null != l) { | ||
a.length = l - s + 1; | ||
n.length = l - s + 1; | ||
} | ||
} | ||
} | ||
return e.call(i, t, a, ...n); | ||
return e.call(i, t, n, ...a); | ||
}; | ||
var mapFileTextRangeFn = e => (t, a, ...n) => { | ||
var mapFileTextRangeFn = e => (t, n, ...a) => { | ||
var o = r.get(t); | ||
if (o && o.sourceFileId === t) { | ||
t = o.generatedFileId; | ||
var s = o.getGeneratedOffset(a.pos)?.[0]; | ||
var l = o.getGeneratedOffset(a.end)?.[0]; | ||
var s = o.getGeneratedOffset(n.pos)?.[0]; | ||
var l = o.getGeneratedOffset(n.end)?.[0]; | ||
if (null != s) { | ||
a = { | ||
n = { | ||
pos: s, | ||
end: s + (a.end - a.pos) | ||
end: s + (n.end - n.pos) | ||
}; | ||
if (null != l) { | ||
a.end = l; | ||
n.end = l; | ||
} | ||
} | ||
} | ||
return e.call(i, t, a, ...n); | ||
return e.call(i, t, n, ...a); | ||
}; | ||
var mapFilePositionFn = e => (t, a, ...n) => { | ||
var mapFilePositionFn = e => (t, n, ...a) => { | ||
var o = r.get(t); | ||
if (o && o.sourceFileId === t) { | ||
t = o.generatedFileId; | ||
a = o.getGeneratedOffset(a)?.[0] ?? a; | ||
n = o.getGeneratedOffset(n)?.[0] ?? n; | ||
} | ||
return e.call(i, t, a, ...n); | ||
return e.call(i, t, n, ...a); | ||
}; | ||
var mapFileStartEndFn = e => (t, a, n, ...o) => { | ||
var mapFileStartEndFn = e => (t, n, a, ...o) => { | ||
var s = r.get(t); | ||
if (s && s.sourceFileId === t) { | ||
t = s.generatedFileId; | ||
n = s.getGeneratedOffset(n)?.[0] ?? n; | ||
a = s.getGeneratedOffset(a)?.[0] ?? a; | ||
n = s.getGeneratedOffset(n)?.[0] ?? n; | ||
} | ||
return e.call(i, t, a, n, ...o); | ||
return e.call(i, t, n, a, ...o); | ||
}; | ||
@@ -870,15 +870,15 @@ var o; | ||
} else { | ||
var e = a(); | ||
var e = n(); | ||
return e ? o = (e => { | ||
var {program: t, virtualMap: r, projectRoot: i} = e; | ||
var a = maybeBind(t, t.isSourceFileFromExternalLibrary); | ||
var n = maybeBind(t, t.isSourceFileFromExternalLibrary); | ||
var o = maybeBind(t, t.getModeForResolutionAtIndex); | ||
var s = maybeBind(t, t.getSourceFile); | ||
var l = maybeBind(t, t.getSourceFiles); | ||
var mapSourceFileFn = e => (i, ...a) => { | ||
var n = i && r.get(i.fileName); | ||
if (n && n.sourceFileId === i?.fileName) { | ||
i = s(n.generatedFileId) || i; | ||
var mapSourceFileFn = e => (i, ...n) => { | ||
var a = i && r.get(i.fileName); | ||
if (a && a.sourceFileId === i?.fileName) { | ||
i = s(a.generatedFileId) || i; | ||
} | ||
return e.call(t, i, ...a); | ||
return e.call(t, i, ...n); | ||
}; | ||
@@ -893,3 +893,3 @@ return Object.assign(t, { | ||
var t = r.get(e.fileName); | ||
return !(!t || t.sourceFileId !== e.fileName) || a(e); | ||
return !(!t || t.sourceFileId !== e.fileName) || n(e); | ||
}, | ||
@@ -899,3 +899,3 @@ getSourceFiles() { | ||
for (var r of l()) { | ||
if (!n.relative(i, r.fileName).startsWith("..") && !t.isSourceFileFromExternalLibrary(r)) { | ||
if (!a.relative(i, r.fileName).startsWith("..") && !t.isSourceFileFromExternalLibrary(r)) { | ||
e.push(r); | ||
@@ -1013,3 +1013,3 @@ } | ||
var transform = async e => { | ||
var t = n.extname(e.fileName); | ||
var t = a.extname(e.fileName); | ||
if (".svelte" === t) { | ||
@@ -1034,13 +1034,13 @@ return (async (...e) => (F || (F = await Promise.resolve().then((function() { | ||
if (!e.sys.fileExists(i)) { | ||
var a = r.createRequire(t.configPath); | ||
var n = r.createRequire(t.configPath); | ||
var o = "typescript/package.json"; | ||
try { | ||
return n.dirname(a.resolve(o, { | ||
paths: [ n.join(n.dirname(t.configPath), "node_modules"), n.join(t.rootPath, "node_modules"), ...a.resolve.paths(o) || [] ] | ||
return a.dirname(n.resolve(o, { | ||
paths: [ a.join(a.dirname(t.configPath), "node_modules"), a.join(t.rootPath, "node_modules"), ...n.resolve.paths(o) || [] ] | ||
})); | ||
} catch (e) { | ||
return n.resolve(t.rootPath, "node_modules", "typescript", "lib"); | ||
return a.resolve(t.rootPath, "node_modules", "typescript", "lib"); | ||
} | ||
} else { | ||
return n.dirname(i); | ||
return a.dirname(i); | ||
} | ||
@@ -1051,13 +1051,13 @@ }; | ||
var i = r.readFile(t.configPath, "utf8") || "{}"; | ||
var a = e.parseConfigFileTextToJson(t.configPath, i); | ||
if (null != a.error) { | ||
throw new Error(a.error.messageText.toString()); | ||
var n = e.parseConfigFileTextToJson(t.configPath, i); | ||
if (null != n.error) { | ||
throw new Error(n.error.messageText.toString()); | ||
} | ||
var o = n.dirname(t.configPath); | ||
return e.parseJsonConfigFileContent(a.config, r, o, e.getDefaultCompilerOptions(), t.configPath); | ||
var o = a.dirname(t.configPath); | ||
return e.parseJsonConfigFileContent(n.config, r, o, e.getDefaultCompilerOptions(), t.configPath); | ||
}; | ||
var M = a.parentPort; | ||
var M = n.parentPort; | ||
if (!a.isMainThread && !M) { | ||
if (!n.isMainThread && !M) { | ||
throw new ReferenceError("Failed to receive parent message port"); | ||
@@ -1081,3 +1081,3 @@ } | ||
var w = { | ||
env: a.SHARE_ENV, | ||
env: n.SHARE_ENV, | ||
stderr: !1, | ||
@@ -1088,6 +1088,15 @@ stdout: !1, | ||
var getMessageData = e => { | ||
var t = e.data; | ||
if (e.kind === P.Throw) { | ||
return "object" == typeof t && t && null != e.extra ? Object.assign(t, e.extra) : t; | ||
} else { | ||
return t; | ||
} | ||
}; | ||
var asyncIteratorSymbol = () => "function" == typeof Symbol && Symbol.asyncIterator || "@@asyncIterator"; | ||
exports.expose = function expose(e) { | ||
if (a.isMainThread) { | ||
if (n.isMainThread) { | ||
var t = function captureStack() { | ||
@@ -1117,5 +1126,5 @@ var e = new Error; | ||
if (!t) { | ||
(t = new a.Worker(e, w)).unref(); | ||
(t = new n.Worker(e, w)).unref(); | ||
} | ||
var n = 0 | ++r; | ||
var a = 0 | ++r; | ||
var o = []; | ||
@@ -1136,3 +1145,3 @@ var s = !1; | ||
t.postMessage({ | ||
id: n, | ||
id: a, | ||
kind: e | ||
@@ -1145,3 +1154,3 @@ }); | ||
o[0] = { | ||
id: n, | ||
id: a, | ||
kind: P.Throw, | ||
@@ -1156,3 +1165,3 @@ data: e | ||
} else if (f && t.kind === P.Throw) { | ||
f(t.data); | ||
f(getMessageData(t)); | ||
cleanup(); | ||
@@ -1162,3 +1171,3 @@ } else if (u && t.kind === P.Return) { | ||
done: !0, | ||
value: t.data | ||
value: getMessageData(t) | ||
}); | ||
@@ -1170,3 +1179,3 @@ cleanup(); | ||
done: !1, | ||
value: t.data | ||
value: getMessageData(t) | ||
}); | ||
@@ -1188,3 +1197,3 @@ } else if (t.kind === P.Throw || t.kind === P.Return) { | ||
t.postMessage({ | ||
id: n, | ||
id: a, | ||
kind: O.Start, | ||
@@ -1205,7 +1214,7 @@ data: i | ||
cleanup(); | ||
throw e.data; | ||
throw getMessageData(e); | ||
} else if (e && e.kind === P.Return) { | ||
cleanup(); | ||
return { | ||
value: e.data, | ||
value: getMessageData(e), | ||
done: !0 | ||
@@ -1215,3 +1224,3 @@ }; | ||
return { | ||
value: e.data, | ||
value: getMessageData(e), | ||
done: !1 | ||
@@ -1259,7 +1268,7 @@ }; | ||
var i = t(...e.data); | ||
var n = !1; | ||
var a = !1; | ||
var n = !1; | ||
var o = !1; | ||
function cleanup() { | ||
a = !0; | ||
n = !0; | ||
M.removeListener("message", receiveMessage); | ||
@@ -1269,7 +1278,13 @@ } | ||
try { | ||
M.postMessage({ | ||
var n = { | ||
id: r, | ||
kind: e, | ||
data: t | ||
}); | ||
}; | ||
if (e === P.Throw && "object" == typeof t && null != t) { | ||
n.extra = { | ||
...t | ||
}; | ||
} | ||
M.postMessage(n); | ||
} catch (e) { | ||
@@ -1301,5 +1316,5 @@ cleanup(); | ||
} else if (t.kind === O.Pull && o) { | ||
n = !0; | ||
a = !0; | ||
} else if (t.kind === O.Pull) { | ||
for (n = o = !0; n && !a; ) { | ||
for (a = o = !0; a && !n; ) { | ||
try { | ||
@@ -1313,3 +1328,3 @@ if ((r = await i.next()).done) { | ||
} else { | ||
n = !1; | ||
a = !1; | ||
sendMessage(P.Next, r.value); | ||
@@ -1335,10 +1350,10 @@ } | ||
var r = new Map; | ||
var a = new Map; | ||
var n = new Map; | ||
var o = function createFSBackedSystem(e, t, r, i) { | ||
var a = t + "/vfs"; | ||
var n = t + "/vfs"; | ||
var o = r.sys; | ||
var s = i ?? n.dirname(require.resolve("typescript")); | ||
var s = i ?? a.dirname(require.resolve("typescript")); | ||
return { | ||
name: "fs-vfs", | ||
root: a, | ||
root: n, | ||
args: [], | ||
@@ -1367,3 +1382,3 @@ realpath: e => { | ||
}, | ||
getCurrentDirectory: () => a, | ||
getCurrentDirectory: () => n, | ||
getDirectories: o.getDirectories, | ||
@@ -1386,4 +1401,4 @@ getExecutingFilePath: () => notImplemented("getExecutingFilePath"), | ||
if (!i) { | ||
var a = o.readDirectory(s); | ||
throw new Error(`TSVFS: A request was made for ${r} but there wasn't a file found in the file map. You likely have a mismatch in the compiler options for the CDN download vs the compiler program. Existing Libs: ${a}.`); | ||
var n = o.readDirectory(s); | ||
throw new Error(`TSVFS: A request was made for ${r} but there wasn't a file found in the file map. You likely have a mismatch in the compiler options for the CDN download vs the compiler program. Existing Libs: ${n}.`); | ||
} | ||
@@ -1426,3 +1441,3 @@ return i; | ||
for (var r of l) { | ||
e.add(n.dirname(r)); | ||
e.add(a.dirname(r)); | ||
} | ||
@@ -1434,11 +1449,11 @@ return [ ...e ]; | ||
var i = []; | ||
var a = new Set(l); | ||
var n = new Set(l); | ||
var s = new Set([ t.rootPath ]); | ||
for (var c of l) { | ||
s.add(n.dirname(c)); | ||
s.add(a.dirname(c)); | ||
} | ||
for (var u of s) { | ||
for (var g of o.readDirectory(u, r, [ "**/node_modules" ])) { | ||
if (!a.has(g)) { | ||
a.add(g); | ||
if (!n.has(g)) { | ||
n.add(g); | ||
var d = o.readFile(g, "utf8"); | ||
@@ -1469,3 +1484,3 @@ if (d) { | ||
} | ||
var n = new SourceMappedFile(r.mappings, { | ||
var a = new SourceMappedFile(r.mappings, { | ||
sourceFile: i, | ||
@@ -1475,4 +1490,4 @@ sourceFileId: i.fileName, | ||
}); | ||
a.set(n.sourceFileId, n); | ||
a.set(n.generatedFileId, n); | ||
n.set(a.sourceFileId, a); | ||
n.set(a.generatedFileId, a); | ||
return f; | ||
@@ -1508,5 +1523,5 @@ }, | ||
var i; | ||
var n; | ||
var a; | ||
var n; | ||
var getLanguageServiceHost = () => a || (a = createVirtualLanguageServiceHost(t.system, [ ...t.rootNames ], t.options, e).languageServiceHost); | ||
var getLanguageServiceHost = () => n || (n = createVirtualLanguageServiceHost(t.system, [ ...t.rootNames ], t.options, e).languageServiceHost); | ||
var getLanguageService = () => i || (i = buildLanguageService({ | ||
@@ -1537,3 +1552,3 @@ system: t.system, | ||
}, | ||
buildPluginInfo: e => n || (n = buildPluginInfo({ | ||
buildPluginInfo: e => a || (a = buildPluginInfo({ | ||
getLanguageService, | ||
@@ -1552,4 +1567,4 @@ getLanguageServiceHost, | ||
var i = "string" != typeof e ? e.fileName : e; | ||
var a = t.virtualMap.get(i); | ||
return a ? a.getSourceSpan(r) : { | ||
var n = t.virtualMap.get(i); | ||
return n ? n.getSourceSpan(r) : { | ||
fileName: i, | ||
@@ -1563,5 +1578,5 @@ start: "number" != typeof r ? r.start : r, | ||
if (i) { | ||
var a = i.getSourceSpan(r); | ||
if (a.fileName === i.sourceFileId) { | ||
return spanToFilePosition(i.sourceFile, a); | ||
var n = i.getSourceSpan(r); | ||
if (n.fileName === i.sourceFileId) { | ||
return spanToFilePosition(i.sourceFile, n); | ||
} | ||
@@ -1573,3 +1588,3 @@ } | ||
})({ | ||
virtualMap: a, | ||
virtualMap: n, | ||
projectRoot: t.rootPath, | ||
@@ -1576,0 +1591,0 @@ compilerHost: u.compilerHost, |
{ | ||
"name": "@gql.tada/cli-utils", | ||
"version": "1.5.3", | ||
"version": "1.5.4-canary-02aff4269f6f9ef17d6e56ef29c5a6a855d7297e", | ||
"public": true, | ||
@@ -5,0 +5,0 @@ "description": "Main logic for gql.tada’s CLI tool.", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1996905
19694
1