@lingo.dev/_compiler 0.8.7 → 0.8.9
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/build/{acorn-QFXI4BEA.cjs → acorn-H37LPRUJ.cjs} +5 -5
- package/build/{acorn-GCP5ZV2A.mjs → acorn-TSED2ZW2.mjs} +4 -4
- package/build/{angular-OXTGJOFJ.cjs → angular-DBMVLDKI.cjs} +5 -6
- package/build/{angular-JQSQXFBY.mjs → angular-OBBMKZBS.mjs} +4 -5
- package/build/{babel-EJ7OIZP4.cjs → babel-76IVLWL7.cjs} +3 -3
- package/build/{babel-R5G642DR.mjs → babel-LRHLMQHJ.mjs} +2 -2
- package/build/{chunk-AKV7BRP5.cjs → chunk-NKMWW3RS.cjs} +39 -39
- package/build/{chunk-AKFJBAG4.cjs → chunk-O75UYLMX.cjs} +1 -1
- package/build/{chunk-VG5I5JDL.mjs → chunk-OAQHCRD4.mjs} +33 -33
- package/build/{estree-XLH46TSP.mjs → estree-LU4FIQBG.mjs} +13 -13
- package/build/{estree-NGS2AYBH.cjs → estree-X6XJ6F3E.cjs} +14 -14
- package/build/{flow-DHPXOK5S.mjs → flow-2AIHOIVA.mjs} +3 -3
- package/build/{flow-RDDDCZAV.cjs → flow-6TJTSSIZ.cjs} +4 -4
- package/build/{glimmer-CAMUE4OK.cjs → glimmer-QMODKDQ6.cjs} +1 -1
- package/build/{graphql-YJNPH5D2.cjs → graphql-SQICRJKN.cjs} +1 -1
- package/build/{html-ZAWF5C3B.mjs → html-6E5RYVQV.mjs} +2 -2
- package/build/{html-TYMOOA3H.cjs → html-VZRXWOHI.cjs} +3 -3
- package/build/index.cjs +25 -25
- package/build/index.mjs +3 -3
- package/build/lingo-turbopack-loader.cjs +4 -4
- package/build/lingo-turbopack-loader.mjs +1 -1
- package/build/{markdown-EW4GGIPV.cjs → markdown-GKZ3QYSF.cjs} +5 -5
- package/build/{markdown-WJTZKU3V.mjs → markdown-WSFBOJYK.mjs} +4 -4
- package/build/{meriyah-OWUHWYCU.cjs → meriyah-JTLZ4L4D.cjs} +3 -3
- package/build/{meriyah-FBYDJ6EA.mjs → meriyah-W5CXPHUI.mjs} +2 -2
- package/build/{postcss-3TJJTQXP.mjs → postcss-UJ655DUW.mjs} +3 -3
- package/build/{postcss-MQS25GNZ.cjs → postcss-YO2YIECD.cjs} +4 -4
- package/build/{typescript-FJLY3MEC.mjs → typescript-FXTHOZH7.mjs} +2 -2
- package/build/{typescript-Z5DYTVQY.cjs → typescript-L4COLYNU.cjs} +3 -3
- package/build/{yaml-MMD4LQP5.mjs → yaml-3XEDC4EB.mjs} +1 -1
- package/build/{yaml-FHNA2CVI.cjs → yaml-QEWKPLU4.cjs} +2 -2
- package/package.json +4 -4
|
@@ -1075,10 +1075,10 @@ function $u(e) {
|
|
|
1075
1075
|
`;
|
|
1076
1076
|
}
|
|
1077
1077
|
}
|
|
1078
|
-
var Ie = Symbol("MODE_BREAK");
|
|
1079
|
-
var pt = Symbol("MODE_FLAT");
|
|
1080
|
-
var Xt = Symbol("cursor");
|
|
1081
|
-
var ns = Symbol("DOC_FILL_PRINTED_LENGTH");
|
|
1078
|
+
var Ie = /* @__PURE__ */ Symbol("MODE_BREAK");
|
|
1079
|
+
var pt = /* @__PURE__ */ Symbol("MODE_FLAT");
|
|
1080
|
+
var Xt = /* @__PURE__ */ Symbol("cursor");
|
|
1081
|
+
var ns = /* @__PURE__ */ Symbol("DOC_FILL_PRINTED_LENGTH");
|
|
1082
1082
|
function Ku() {
|
|
1083
1083
|
return { value: "", length: 0, queue: [] };
|
|
1084
1084
|
}
|
|
@@ -1624,7 +1624,7 @@ function di(e) {
|
|
|
1624
1624
|
`) + u;
|
|
1625
1625
|
}
|
|
1626
1626
|
function yc(e, t) {
|
|
1627
|
-
let { originalText: r, [Symbol.for("comments")]: n, locStart: s, locEnd: u, [Symbol.for("printedComments")]: i } = t, { node: a } = e, o = s(a), p = u(a);
|
|
1627
|
+
let { originalText: r, [/* @__PURE__ */ Symbol.for("comments")]: n, locStart: s, locEnd: u, [/* @__PURE__ */ Symbol.for("printedComments")]: i } = t, { node: a } = e, o = s(a), p = u(a);
|
|
1628
1628
|
for (let m of n) s(m) >= o && u(m) <= p && i.add(m);
|
|
1629
1629
|
return r.slice(o, p);
|
|
1630
1630
|
}
|
|
@@ -2076,7 +2076,7 @@ function N(e, t, r = {}) {
|
|
|
2076
2076
|
function fs(e, t) {
|
|
2077
2077
|
let r = e.node;
|
|
2078
2078
|
if (!r) return {};
|
|
2079
|
-
let n = t[Symbol.for("printedComments")];
|
|
2079
|
+
let n = t[/* @__PURE__ */ Symbol.for("printedComments")];
|
|
2080
2080
|
if ((r.comments || []).filter((o) => !n.has(o)).length === 0) return { leading: "", trailing: "" };
|
|
2081
2081
|
let u = [], i = [], a;
|
|
2082
2082
|
return e.each(() => {
|
|
@@ -2378,7 +2378,7 @@ function $r(e, t, r) {
|
|
|
2378
2378
|
let m = s.type === "ReturnStatement" || s.type === "ThrowStatement" || s.type === "JSXExpressionContainer" && u.type === "JSXAttribute" || n.operator !== "|" && s.type === "JsExpressionRoot" || n.type !== "NGPipeExpression" && (s.type === "NGRoot" && t.parser === "__ng_binding" || s.type === "NGMicrosyntaxExpression" && u.type === "NGMicrosyntax" && u.body.length === 1) || n === s.body && s.type === "ArrowFunctionExpression" || n !== s.body && s.type === "ForStatement" || s.type === "ConditionalExpression" && u.type !== "ReturnStatement" && u.type !== "ThrowStatement" && !w(u) || s.type === "TemplateLiteral", f = s.type === "AssignmentExpression" || s.type === "VariableDeclarator" || s.type === "ClassProperty" || s.type === "PropertyDefinition" || s.type === "TSAbstractPropertyDefinition" || s.type === "ClassPrivateProperty" || Te(s), y = Fe(n.left) && ar(n.operator, n.left.operator);
|
|
2379
2379
|
if (m || Ht(n) && !y || !Ht(n) && f) return l(p);
|
|
2380
2380
|
if (p.length === 0) return "";
|
|
2381
|
-
let C = Y(n.right), c = p.findIndex((J) => typeof J != "string" && !Array.isArray(J) && J.type === fe), A = p.slice(0, c === -1 ? 1 : c + 1), T = p.slice(A.length, C ? -1 : void 0), B = Symbol("logicalChain-" + ++qc), g = l([...A, D(T)], { id: B });
|
|
2381
|
+
let C = Y(n.right), c = p.findIndex((J) => typeof J != "string" && !Array.isArray(J) && J.type === fe), A = p.slice(0, c === -1 ? 1 : c + 1), T = p.slice(A.length, C ? -1 : void 0), B = /* @__PURE__ */ Symbol("logicalChain-" + ++qc), g = l([...A, D(T)], { id: B });
|
|
2382
2382
|
if (!C) return g;
|
|
2383
2383
|
let _ = v(false, p, -1);
|
|
2384
2384
|
return l([g, xt(_, { groupId: B })]);
|
|
@@ -2688,7 +2688,7 @@ function ht(e, t, r, n, s, u) {
|
|
|
2688
2688
|
case "never-break-after-operator":
|
|
2689
2689
|
return l([l(n), s, " ", a]);
|
|
2690
2690
|
case "fluid": {
|
|
2691
|
-
let o = Symbol("assignment");
|
|
2691
|
+
let o = /* @__PURE__ */ Symbol("assignment");
|
|
2692
2692
|
return l([l(n), s, l(D(x), { id: o }), je, xt(a, { groupId: o })]);
|
|
2693
2693
|
}
|
|
2694
2694
|
case "break-lhs":
|
|
@@ -3029,7 +3029,7 @@ function Kt(e, t, r) {
|
|
|
3029
3029
|
let { node: n } = e, s = [], u = "[", i = "]", a = n.type === "TupleTypeAnnotation" && n.types ? "types" : n.type === "TSTupleType" || n.type === "TupleTypeAnnotation" ? "elementTypes" : "elements", o = n[a];
|
|
3030
3030
|
if (o.length === 0) s.push(xl(e, t, u, i));
|
|
3031
3031
|
else {
|
|
3032
|
-
let p = v(false, o, -1), m = (p == null ? void 0 : p.type) !== "RestElement" && !n.inexact, f = p === null, y = Symbol("array"), C = !t.__inJestEach && o.length > 1 && o.every((T, B, g) => {
|
|
3032
|
+
let p = v(false, o, -1), m = (p == null ? void 0 : p.type) !== "RestElement" && !n.inexact, f = p === null, y = /* @__PURE__ */ Symbol("array"), C = !t.__inJestEach && o.length > 1 && o.every((T, B, g) => {
|
|
3033
3033
|
let _ = T == null ? void 0 : T.type;
|
|
3034
3034
|
if (!U(T) && !ue(T)) return false;
|
|
3035
3035
|
let M = g[B + 1];
|
|
@@ -3170,7 +3170,7 @@ function sa(e, t, r, n = {}) {
|
|
|
3170
3170
|
}
|
|
3171
3171
|
o && (a || (a = g.returnType && Q(g).length > 0 || g.typeParameters || Q(g).some((M) => M.type !== "Identifier"))), !o || g.body.type !== "ArrowFunctionExpression" ? (u = r("body", n), p = g.body) : e.call(B, "body");
|
|
3172
3172
|
})();
|
|
3173
|
-
let m = !de(t.originalText, p) && (wl(p) || _l(p, u, t) || !a && na(p)), f = e.key === "callee" && yt(e.parent), y = Symbol("arrow-chain"), C = Ml(e, n, { signatureDocs: s, shouldBreak: a }), c = false, A = false, T = false;
|
|
3173
|
+
let m = !de(t.originalText, p) && (wl(p) || _l(p, u, t) || !a && na(p)), f = e.key === "callee" && yt(e.parent), y = /* @__PURE__ */ Symbol("arrow-chain"), C = Ml(e, n, { signatureDocs: s, shouldBreak: a }), c = false, A = false, T = false;
|
|
3174
3174
|
return o && (f || n.assignmentLayout) && (A = true, T = !d(e.node, h.Leading & h.Line), c = n.assignmentLayout === "chain-tail-arrow-chain" || f && !m), u = vl(e, t, n, { bodyDoc: u, bodyComments: i, functionBody: p, shouldPutBodyOnSameLine: m }), l([l(A ? D([T ? E : "", C]) : C, { shouldBreak: c, id: y }), " =>", o ? xt(u, { groupId: y }) : l(u), o && f ? S(E, "", { groupId: y }) : ""]);
|
|
3175
3175
|
}
|
|
3176
3176
|
function Ol(e, t, r, n) {
|
|
@@ -3266,7 +3266,7 @@ function Gl(e, t) {
|
|
|
3266
3266
|
function Tn(e, t, r) {
|
|
3267
3267
|
let { node: n } = e, s = [n.const ? "const " : ""], u = n.type === "TSTypeParameter" ? r("name") : n.name;
|
|
3268
3268
|
if (n.variance && s.push(r("variance")), n.in && s.push("in "), n.out && s.push("out "), s.push(u), n.bound && (n.usesExtendsBound && s.push(" extends "), s.push(H(e, r, "bound"))), n.constraint) {
|
|
3269
|
-
let i = Symbol("constraint");
|
|
3269
|
+
let i = /* @__PURE__ */ Symbol("constraint");
|
|
3270
3270
|
s.push(" extends", l(D(x), { id: i }), je, xt(r("constraint"), { groupId: i }));
|
|
3271
3271
|
}
|
|
3272
3272
|
return n.default && s.push(" = ", r("default")), l(s);
|
|
@@ -3464,7 +3464,7 @@ function Ca(e, t) {
|
|
|
3464
3464
|
}
|
|
3465
3465
|
function Hl(e, t, r) {
|
|
3466
3466
|
let n = e.originalText.slice(t, r);
|
|
3467
|
-
for (let s of e[Symbol.for("comments")]) {
|
|
3467
|
+
for (let s of e[/* @__PURE__ */ Symbol.for("comments")]) {
|
|
3468
3468
|
let u = j(s);
|
|
3469
3469
|
if (u > r) break;
|
|
3470
3470
|
let i = P(s);
|
|
@@ -3665,7 +3665,7 @@ function zt(e, t, r, n) {
|
|
|
3665
3665
|
}, "test"), !g && d(f, h.Dangling) && e.call((Xe) => {
|
|
3666
3666
|
er.push(N(Xe, t));
|
|
3667
3667
|
}, "alternate"), d(s, h.Dangling) && er.push(N(e, t));
|
|
3668
|
-
let Gs = Symbol("test"), Va = Symbol("consequent"), dr = Symbol("test-and-consequent"), $a = u ? [Ms(r("test")), s.test.type === "ConditionalExpression" ? Ce : ""] : [r("checkType"), " ", "extends", " ", Je(s.extendsType) || s.extendsType.type === "TSMappedType" ? r("extendsType") : l(Ms(r("extendsType")))], qs = l([$a, " ?"], { id: Gs }), Ka = r(a), Tr = D([B || Z && (Y(m) || c || _) ? F : x, Ns, Ka]), Qa = Js ? l([qs, _ ? Tr : S(Tr, l(Tr, { id: Va }), { groupId: Gs })], { id: dr }) : [qs, Tr], wn = r(o), Ws = nt ? S(wn, Jr(Ms(wn)), { groupId: dr }) : wn, tr = [Qa, er.length > 0 ? [D([F, er]), F] : g ? F : nt ? S(x, " ", { groupId: dr }) : x, ":", g ? " " : M ? Js ? S(Ae, S(_ || nt ? " " : Ae, " "), { groupId: dr }) : S(Ae, " ") : " ", g ? Ws : l([D(Ws), Z && !nt ? E : ""]), L && !lt ? E : "", Ot ? Ce : ""];
|
|
3668
|
+
let Gs = /* @__PURE__ */ Symbol("test"), Va = /* @__PURE__ */ Symbol("consequent"), dr = /* @__PURE__ */ Symbol("test-and-consequent"), $a = u ? [Ms(r("test")), s.test.type === "ConditionalExpression" ? Ce : ""] : [r("checkType"), " ", "extends", " ", Je(s.extendsType) || s.extendsType.type === "TSMappedType" ? r("extendsType") : l(Ms(r("extendsType")))], qs = l([$a, " ?"], { id: Gs }), Ka = r(a), Tr = D([B || Z && (Y(m) || c || _) ? F : x, Ns, Ka]), Qa = Js ? l([qs, _ ? Tr : S(Tr, l(Tr, { id: Va }), { groupId: Gs })], { id: dr }) : [qs, Tr], wn = r(o), Ws = nt ? S(wn, Jr(Ms(wn)), { groupId: dr }) : wn, tr = [Qa, er.length > 0 ? [D([F, er]), F] : g ? F : nt ? S(x, " ", { groupId: dr }) : x, ":", g ? " " : M ? Js ? S(Ae, S(_ || nt ? " " : Ae, " "), { groupId: dr }) : S(Ae, " ") : " ", g ? Ws : l([D(Ws), Z && !nt ? E : ""]), L && !lt ? E : "", Ot ? Ce : ""];
|
|
3669
3669
|
return W && !Ot ? l(D([E, l(tr)])) : W || ne ? l(D(tr)) : lt || i && A ? l([D([E, tr]), se ? E : ""]) : C === k ? l(tr) : tr;
|
|
3670
3670
|
}
|
|
3671
3671
|
function Pa(e, t, r, n) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } var _class; var _class2; var _class3;require('./chunk-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } var _class; var _class2; var _class3;require('./chunk-O75UYLMX.cjs');
|
|
2
2
|
|
|
3
3
|
// ../../node_modules/.pnpm/prettier@3.6.2/node_modules/prettier/plugins/estree.mjs
|
|
4
4
|
var za = Object.defineProperty;
|
|
@@ -1075,10 +1075,10 @@ function $u(e) {
|
|
|
1075
1075
|
`;
|
|
1076
1076
|
}
|
|
1077
1077
|
}
|
|
1078
|
-
var Ie = Symbol("MODE_BREAK");
|
|
1079
|
-
var pt = Symbol("MODE_FLAT");
|
|
1080
|
-
var Xt = Symbol("cursor");
|
|
1081
|
-
var ns = Symbol("DOC_FILL_PRINTED_LENGTH");
|
|
1078
|
+
var Ie = /* @__PURE__ */ Symbol("MODE_BREAK");
|
|
1079
|
+
var pt = /* @__PURE__ */ Symbol("MODE_FLAT");
|
|
1080
|
+
var Xt = /* @__PURE__ */ Symbol("cursor");
|
|
1081
|
+
var ns = /* @__PURE__ */ Symbol("DOC_FILL_PRINTED_LENGTH");
|
|
1082
1082
|
function Ku() {
|
|
1083
1083
|
return { value: "", length: 0, queue: [] };
|
|
1084
1084
|
}
|
|
@@ -1624,7 +1624,7 @@ function di(e) {
|
|
|
1624
1624
|
`) + u;
|
|
1625
1625
|
}
|
|
1626
1626
|
function yc(e, t) {
|
|
1627
|
-
let { originalText: r, [Symbol.for("comments")]: n, locStart: s, locEnd: u, [Symbol.for("printedComments")]: i } = t, { node: a } = e, o = s(a), p = u(a);
|
|
1627
|
+
let { originalText: r, [/* @__PURE__ */ Symbol.for("comments")]: n, locStart: s, locEnd: u, [/* @__PURE__ */ Symbol.for("printedComments")]: i } = t, { node: a } = e, o = s(a), p = u(a);
|
|
1628
1628
|
for (let m of n) s(m) >= o && u(m) <= p && i.add(m);
|
|
1629
1629
|
return r.slice(o, p);
|
|
1630
1630
|
}
|
|
@@ -2076,7 +2076,7 @@ function N(e, t, r = {}) {
|
|
|
2076
2076
|
function fs(e, t) {
|
|
2077
2077
|
let r = e.node;
|
|
2078
2078
|
if (!r) return {};
|
|
2079
|
-
let n = t[Symbol.for("printedComments")];
|
|
2079
|
+
let n = t[/* @__PURE__ */ Symbol.for("printedComments")];
|
|
2080
2080
|
if ((r.comments || []).filter((o) => !n.has(o)).length === 0) return { leading: "", trailing: "" };
|
|
2081
2081
|
let u = [], i = [], a;
|
|
2082
2082
|
return e.each(() => {
|
|
@@ -2378,7 +2378,7 @@ function $r(e, t, r) {
|
|
|
2378
2378
|
let m = s.type === "ReturnStatement" || s.type === "ThrowStatement" || s.type === "JSXExpressionContainer" && u.type === "JSXAttribute" || n.operator !== "|" && s.type === "JsExpressionRoot" || n.type !== "NGPipeExpression" && (s.type === "NGRoot" && t.parser === "__ng_binding" || s.type === "NGMicrosyntaxExpression" && u.type === "NGMicrosyntax" && u.body.length === 1) || n === s.body && s.type === "ArrowFunctionExpression" || n !== s.body && s.type === "ForStatement" || s.type === "ConditionalExpression" && u.type !== "ReturnStatement" && u.type !== "ThrowStatement" && !w(u) || s.type === "TemplateLiteral", f = s.type === "AssignmentExpression" || s.type === "VariableDeclarator" || s.type === "ClassProperty" || s.type === "PropertyDefinition" || s.type === "TSAbstractPropertyDefinition" || s.type === "ClassPrivateProperty" || Te(s), y = Fe(n.left) && ar(n.operator, n.left.operator);
|
|
2379
2379
|
if (m || Ht(n) && !y || !Ht(n) && f) return l(p);
|
|
2380
2380
|
if (p.length === 0) return "";
|
|
2381
|
-
let C = Y(n.right), c = p.findIndex((J) => typeof J != "string" && !Array.isArray(J) && J.type === fe), A = p.slice(0, c === -1 ? 1 : c + 1), T = p.slice(A.length, C ? -1 : void 0), B = Symbol("logicalChain-" + ++qc), g = l([...A, D(T)], { id: B });
|
|
2381
|
+
let C = Y(n.right), c = p.findIndex((J) => typeof J != "string" && !Array.isArray(J) && J.type === fe), A = p.slice(0, c === -1 ? 1 : c + 1), T = p.slice(A.length, C ? -1 : void 0), B = /* @__PURE__ */ Symbol("logicalChain-" + ++qc), g = l([...A, D(T)], { id: B });
|
|
2382
2382
|
if (!C) return g;
|
|
2383
2383
|
let _ = v(false, p, -1);
|
|
2384
2384
|
return l([g, xt(_, { groupId: B })]);
|
|
@@ -2688,7 +2688,7 @@ function ht(e, t, r, n, s, u) {
|
|
|
2688
2688
|
case "never-break-after-operator":
|
|
2689
2689
|
return l([l(n), s, " ", a]);
|
|
2690
2690
|
case "fluid": {
|
|
2691
|
-
let o = Symbol("assignment");
|
|
2691
|
+
let o = /* @__PURE__ */ Symbol("assignment");
|
|
2692
2692
|
return l([l(n), s, l(D(x), { id: o }), je, xt(a, { groupId: o })]);
|
|
2693
2693
|
}
|
|
2694
2694
|
case "break-lhs":
|
|
@@ -3029,7 +3029,7 @@ function Kt(e, t, r) {
|
|
|
3029
3029
|
let { node: n } = e, s = [], u = "[", i = "]", a = n.type === "TupleTypeAnnotation" && n.types ? "types" : n.type === "TSTupleType" || n.type === "TupleTypeAnnotation" ? "elementTypes" : "elements", o = n[a];
|
|
3030
3030
|
if (o.length === 0) s.push(xl(e, t, u, i));
|
|
3031
3031
|
else {
|
|
3032
|
-
let p = v(false, o, -1), m = (p == null ? void 0 : p.type) !== "RestElement" && !n.inexact, f = p === null, y = Symbol("array"), C = !t.__inJestEach && o.length > 1 && o.every((T, B, g) => {
|
|
3032
|
+
let p = v(false, o, -1), m = (p == null ? void 0 : p.type) !== "RestElement" && !n.inexact, f = p === null, y = /* @__PURE__ */ Symbol("array"), C = !t.__inJestEach && o.length > 1 && o.every((T, B, g) => {
|
|
3033
3033
|
let _ = T == null ? void 0 : T.type;
|
|
3034
3034
|
if (!U(T) && !ue(T)) return false;
|
|
3035
3035
|
let M = g[B + 1];
|
|
@@ -3170,7 +3170,7 @@ function sa(e, t, r, n = {}) {
|
|
|
3170
3170
|
}
|
|
3171
3171
|
o && (a || (a = g.returnType && Q(g).length > 0 || g.typeParameters || Q(g).some((M) => M.type !== "Identifier"))), !o || g.body.type !== "ArrowFunctionExpression" ? (u = r("body", n), p = g.body) : e.call(B, "body");
|
|
3172
3172
|
})();
|
|
3173
|
-
let m = !de(t.originalText, p) && (wl(p) || _l(p, u, t) || !a && na(p)), f = e.key === "callee" && yt(e.parent), y = Symbol("arrow-chain"), C = Ml(e, n, { signatureDocs: s, shouldBreak: a }), c = false, A = false, T = false;
|
|
3173
|
+
let m = !de(t.originalText, p) && (wl(p) || _l(p, u, t) || !a && na(p)), f = e.key === "callee" && yt(e.parent), y = /* @__PURE__ */ Symbol("arrow-chain"), C = Ml(e, n, { signatureDocs: s, shouldBreak: a }), c = false, A = false, T = false;
|
|
3174
3174
|
return o && (f || n.assignmentLayout) && (A = true, T = !d(e.node, h.Leading & h.Line), c = n.assignmentLayout === "chain-tail-arrow-chain" || f && !m), u = vl(e, t, n, { bodyDoc: u, bodyComments: i, functionBody: p, shouldPutBodyOnSameLine: m }), l([l(A ? D([T ? E : "", C]) : C, { shouldBreak: c, id: y }), " =>", o ? xt(u, { groupId: y }) : l(u), o && f ? S(E, "", { groupId: y }) : ""]);
|
|
3175
3175
|
}
|
|
3176
3176
|
function Ol(e, t, r, n) {
|
|
@@ -3266,7 +3266,7 @@ function Gl(e, t) {
|
|
|
3266
3266
|
function Tn(e, t, r) {
|
|
3267
3267
|
let { node: n } = e, s = [n.const ? "const " : ""], u = n.type === "TSTypeParameter" ? r("name") : n.name;
|
|
3268
3268
|
if (n.variance && s.push(r("variance")), n.in && s.push("in "), n.out && s.push("out "), s.push(u), n.bound && (n.usesExtendsBound && s.push(" extends "), s.push(H(e, r, "bound"))), n.constraint) {
|
|
3269
|
-
let i = Symbol("constraint");
|
|
3269
|
+
let i = /* @__PURE__ */ Symbol("constraint");
|
|
3270
3270
|
s.push(" extends", l(D(x), { id: i }), je, xt(r("constraint"), { groupId: i }));
|
|
3271
3271
|
}
|
|
3272
3272
|
return n.default && s.push(" = ", r("default")), l(s);
|
|
@@ -3464,7 +3464,7 @@ function Ca(e, t) {
|
|
|
3464
3464
|
}
|
|
3465
3465
|
function Hl(e, t, r) {
|
|
3466
3466
|
let n = e.originalText.slice(t, r);
|
|
3467
|
-
for (let s of e[Symbol.for("comments")]) {
|
|
3467
|
+
for (let s of e[/* @__PURE__ */ Symbol.for("comments")]) {
|
|
3468
3468
|
let u = j(s);
|
|
3469
3469
|
if (u > r) break;
|
|
3470
3470
|
let i = P(s);
|
|
@@ -3665,7 +3665,7 @@ function zt(e, t, r, n) {
|
|
|
3665
3665
|
}, "test"), !g && d(f, h.Dangling) && e.call((Xe) => {
|
|
3666
3666
|
er.push(N(Xe, t));
|
|
3667
3667
|
}, "alternate"), d(s, h.Dangling) && er.push(N(e, t));
|
|
3668
|
-
let Gs = Symbol("test"), Va = Symbol("consequent"), dr = Symbol("test-and-consequent"), $a = u ? [Ms(r("test")), s.test.type === "ConditionalExpression" ? Ce : ""] : [r("checkType"), " ", "extends", " ", Je(s.extendsType) || s.extendsType.type === "TSMappedType" ? r("extendsType") : l(Ms(r("extendsType")))], qs = l([$a, " ?"], { id: Gs }), Ka = r(a), Tr = D([B || Z && (Y(m) || c || _) ? F : x, Ns, Ka]), Qa = Js ? l([qs, _ ? Tr : S(Tr, l(Tr, { id: Va }), { groupId: Gs })], { id: dr }) : [qs, Tr], wn = r(o), Ws = nt ? S(wn, Jr(Ms(wn)), { groupId: dr }) : wn, tr = [Qa, er.length > 0 ? [D([F, er]), F] : g ? F : nt ? S(x, " ", { groupId: dr }) : x, ":", g ? " " : M ? Js ? S(Ae, S(_ || nt ? " " : Ae, " "), { groupId: dr }) : S(Ae, " ") : " ", g ? Ws : l([D(Ws), Z && !nt ? E : ""]), L && !lt ? E : "", Ot ? Ce : ""];
|
|
3668
|
+
let Gs = /* @__PURE__ */ Symbol("test"), Va = /* @__PURE__ */ Symbol("consequent"), dr = /* @__PURE__ */ Symbol("test-and-consequent"), $a = u ? [Ms(r("test")), s.test.type === "ConditionalExpression" ? Ce : ""] : [r("checkType"), " ", "extends", " ", Je(s.extendsType) || s.extendsType.type === "TSMappedType" ? r("extendsType") : l(Ms(r("extendsType")))], qs = l([$a, " ?"], { id: Gs }), Ka = r(a), Tr = D([B || Z && (Y(m) || c || _) ? F : x, Ns, Ka]), Qa = Js ? l([qs, _ ? Tr : S(Tr, l(Tr, { id: Va }), { groupId: Gs })], { id: dr }) : [qs, Tr], wn = r(o), Ws = nt ? S(wn, Jr(Ms(wn)), { groupId: dr }) : wn, tr = [Qa, er.length > 0 ? [D([F, er]), F] : g ? F : nt ? S(x, " ", { groupId: dr }) : x, ":", g ? " " : M ? Js ? S(Ae, S(_ || nt ? " " : Ae, " "), { groupId: dr }) : S(Ae, " ") : " ", g ? Ws : l([D(Ws), Z && !nt ? E : ""]), L && !lt ? E : "", Ot ? Ce : ""];
|
|
3669
3669
|
return W && !Ot ? l(D([E, l(tr)])) : W || ne ? l(D(tr)) : lt || i && A ? l([D([E, tr]), se ? E : ""]) : C === k ? l(tr) : tr;
|
|
3670
3670
|
}
|
|
3671
3671
|
function Pa(e, t, r, n) {
|
|
@@ -1622,7 +1622,7 @@ var kY = bA0((mj) => {
|
|
|
1622
1622
|
A2.prototype.nm = function(x) {
|
|
1623
1623
|
return this.root + x;
|
|
1624
1624
|
}, A2.prototype.create_dir_if_needed = function(x) {
|
|
1625
|
-
for (var r = x.split(ve), e = tx, t = 0; t < r.length - 1; t++) e += r[t] + ve, !this.content[e] && (this.content[e] = Symbol("directory"));
|
|
1625
|
+
for (var r = x.split(ve), e = tx, t = 0; t < r.length - 1; t++) e += r[t] + ve, !this.content[e] && (this.content[e] = /* @__PURE__ */ Symbol("directory"));
|
|
1626
1626
|
}, A2.prototype.slash = function(x) {
|
|
1627
1627
|
return /\/$/.test(x) ? x : x + ve;
|
|
1628
1628
|
}, A2.prototype.lookup = function(x) {
|
|
@@ -27007,7 +27007,7 @@ function CA0(a0) {
|
|
|
27007
27007
|
var $l = CA0;
|
|
27008
27008
|
function NA0(a0, W0, bx) {
|
|
27009
27009
|
let Yx = a0.originalText.slice(W0, bx);
|
|
27010
|
-
for (let x1 of a0[Symbol.for("comments")]) {
|
|
27010
|
+
for (let x1 of a0[/* @__PURE__ */ Symbol.for("comments")]) {
|
|
27011
27011
|
let D1 = Pe(x1);
|
|
27012
27012
|
if (D1 > bx) break;
|
|
27013
27013
|
let Ie = V2(x1);
|
|
@@ -27144,7 +27144,7 @@ function BA0(a0, W0) {
|
|
|
27144
27144
|
break;
|
|
27145
27145
|
case "TSEnumDeclaration":
|
|
27146
27146
|
if (!Rr.body) {
|
|
27147
|
-
let _1 = V2(Rr.id), { members: Ce } = Rr, Qs = yY({ originalText: Yx, [Symbol.for("comments")]: x1 }, _1, Ce[0] ? Pe(Ce[0]) : V2(Rr)), Qa = _1 + Qs.indexOf("{");
|
|
27147
|
+
let _1 = V2(Rr.id), { members: Ce } = Rr, Qs = yY({ originalText: Yx, [/* @__PURE__ */ Symbol.for("comments")]: x1 }, _1, Ce[0] ? Pe(Ce[0]) : V2(Rr)), Qa = _1 + Qs.indexOf("{");
|
|
27148
27148
|
Rr.body = { type: "TSEnumBody", members: Ce, range: [Qa, V2(Rr)] }, delete Rr.members;
|
|
27149
27149
|
}
|
|
27150
27150
|
break;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }require('./chunk-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }require('./chunk-O75UYLMX.cjs');
|
|
2
2
|
|
|
3
3
|
// ../../node_modules/.pnpm/prettier@3.6.2/node_modules/prettier/plugins/flow.mjs
|
|
4
4
|
var hA0 = Object.create;
|
|
@@ -1622,7 +1622,7 @@ var kY = bA0((mj) => {
|
|
|
1622
1622
|
A2.prototype.nm = function(x) {
|
|
1623
1623
|
return this.root + x;
|
|
1624
1624
|
}, A2.prototype.create_dir_if_needed = function(x) {
|
|
1625
|
-
for (var r = x.split(ve), e = tx, t = 0; t < r.length - 1; t++) e += r[t] + ve, !this.content[e] && (this.content[e] = Symbol("directory"));
|
|
1625
|
+
for (var r = x.split(ve), e = tx, t = 0; t < r.length - 1; t++) e += r[t] + ve, !this.content[e] && (this.content[e] = /* @__PURE__ */ Symbol("directory"));
|
|
1626
1626
|
}, A2.prototype.slash = function(x) {
|
|
1627
1627
|
return /\/$/.test(x) ? x : x + ve;
|
|
1628
1628
|
}, A2.prototype.lookup = function(x) {
|
|
@@ -27007,7 +27007,7 @@ function CA0(a0) {
|
|
|
27007
27007
|
var $l = CA0;
|
|
27008
27008
|
function NA0(a0, W0, bx) {
|
|
27009
27009
|
let Yx = a0.originalText.slice(W0, bx);
|
|
27010
|
-
for (let x1 of a0[Symbol.for("comments")]) {
|
|
27010
|
+
for (let x1 of a0[/* @__PURE__ */ Symbol.for("comments")]) {
|
|
27011
27011
|
let D1 = Pe(x1);
|
|
27012
27012
|
if (D1 > bx) break;
|
|
27013
27013
|
let Ie = V2(x1);
|
|
@@ -27144,7 +27144,7 @@ function BA0(a0, W0) {
|
|
|
27144
27144
|
break;
|
|
27145
27145
|
case "TSEnumDeclaration":
|
|
27146
27146
|
if (!Rr.body) {
|
|
27147
|
-
let _1 = V2(Rr.id), { members: Ce } = Rr, Qs = yY({ originalText: Yx, [Symbol.for("comments")]: x1 }, _1, Ce[0] ? Pe(Ce[0]) : V2(Rr)), Qa = _1 + Qs.indexOf("{");
|
|
27147
|
+
let _1 = V2(Rr.id), { members: Ce } = Rr, Qs = yY({ originalText: Yx, [/* @__PURE__ */ Symbol.for("comments")]: x1 }, _1, Ce[0] ? Pe(Ce[0]) : V2(Rr)), Qa = _1 + Qs.indexOf("{");
|
|
27148
27148
|
Rr.body = { type: "TSEnumBody", members: Ce, range: [Qa, V2(Rr)] }, delete Rr.members;
|
|
27149
27149
|
}
|
|
27150
27150
|
break;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } var _class; var _class2;require('./chunk-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } var _class; var _class2;require('./chunk-O75UYLMX.cjs');
|
|
2
2
|
|
|
3
3
|
// ../../node_modules/.pnpm/prettier@3.6.2/node_modules/prettier/plugins/glimmer.mjs
|
|
4
4
|
var zs = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } var _class;require('./chunk-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } var _class;require('./chunk-O75UYLMX.cjs');
|
|
2
2
|
|
|
3
3
|
// ../../node_modules/.pnpm/prettier@3.6.2/node_modules/prettier/plugins/graphql.mjs
|
|
4
4
|
var Et = Object.defineProperty;
|
|
@@ -999,7 +999,7 @@ function Re(t7, e, r) {
|
|
|
999
999
|
let a = i.node, o = a.prev ? It(a.prev, a) : "";
|
|
1000
1000
|
return [o ? [o, Je(a.prev) ? S : ""] : "", ot(i, e, r)];
|
|
1001
1001
|
}, "children")];
|
|
1002
|
-
let s = n.children.map(() => Symbol(""));
|
|
1002
|
+
let s = n.children.map(() => /* @__PURE__ */ Symbol(""));
|
|
1003
1003
|
return t7.map((i, a) => {
|
|
1004
1004
|
let o = i.node;
|
|
1005
1005
|
if ($(o)) {
|
|
@@ -1044,7 +1044,7 @@ function Ns(t7, e, r) {
|
|
|
1044
1044
|
function Is(t7, e, r) {
|
|
1045
1045
|
let { node: n } = t7;
|
|
1046
1046
|
if (wt(n, e)) return [z(n, e), E(st(t7, e, r)), B(Nt(n, e)), ...tt(n, e), G(n, e)];
|
|
1047
|
-
let s = n.children.length === 1 && (n.firstChild.type === "interpolation" || n.firstChild.type === "angularIcuExpression") && n.firstChild.isLeadingSpaceSensitive && !n.firstChild.hasLeadingSpaces && n.lastChild.isTrailingSpaceSensitive && !n.lastChild.hasTrailingSpaces, i = Symbol("element-attr-group-id"), a = (l) => E([E(st(t7, e, r), { id: i }), l, tt(n, e)]), o = (l) => s ? Cn(l, { groupId: i }) : (W(n, e) || et(n, e)) && n.parent.type === "root" && e.parser === "vue" && !e.vueIndentScriptAndStyle ? l : k(l), u = () => s ? pe(v, "", { groupId: i }) : n.firstChild.hasLeadingSpaces && n.firstChild.isLeadingSpaceSensitive ? _ : n.firstChild.type === "text" && n.isWhitespaceSensitive && n.isIndentationSensitive ? dn(v) : v, p = () => (n.next ? Q(n.next) : Ee(n.parent)) ? n.lastChild.hasTrailingSpaces && n.lastChild.isTrailingSpaceSensitive ? " " : "" : s ? pe(v, "", { groupId: i }) : n.lastChild.hasTrailingSpaces && n.lastChild.isTrailingSpaceSensitive ? _ : (n.lastChild.type === "comment" || n.lastChild.type === "text" && n.isWhitespaceSensitive && n.isIndentationSensitive) && new RegExp(`\\n[\\t ]{${e.tabWidth * (t7.ancestors.length - 1)}}$`, "u").test(n.lastChild.value) ? "" : v;
|
|
1047
|
+
let s = n.children.length === 1 && (n.firstChild.type === "interpolation" || n.firstChild.type === "angularIcuExpression") && n.firstChild.isLeadingSpaceSensitive && !n.firstChild.hasLeadingSpaces && n.lastChild.isTrailingSpaceSensitive && !n.lastChild.hasTrailingSpaces, i = /* @__PURE__ */ Symbol("element-attr-group-id"), a = (l) => E([E(st(t7, e, r), { id: i }), l, tt(n, e)]), o = (l) => s ? Cn(l, { groupId: i }) : (W(n, e) || et(n, e)) && n.parent.type === "root" && e.parser === "vue" && !e.vueIndentScriptAndStyle ? l : k(l), u = () => s ? pe(v, "", { groupId: i }) : n.firstChild.hasLeadingSpaces && n.firstChild.isLeadingSpaceSensitive ? _ : n.firstChild.type === "text" && n.isWhitespaceSensitive && n.isIndentationSensitive ? dn(v) : v, p = () => (n.next ? Q(n.next) : Ee(n.parent)) ? n.lastChild.hasTrailingSpaces && n.lastChild.isTrailingSpaceSensitive ? " " : "" : s ? pe(v, "", { groupId: i }) : n.lastChild.hasTrailingSpaces && n.lastChild.isTrailingSpaceSensitive ? _ : (n.lastChild.type === "comment" || n.lastChild.type === "text" && n.isWhitespaceSensitive && n.isIndentationSensitive) && new RegExp(`\\n[\\t ]{${e.tabWidth * (t7.ancestors.length - 1)}}$`, "u").test(n.lastChild.value) ? "" : v;
|
|
1048
1048
|
return n.children.length === 0 ? a(n.hasDanglingSpaces && n.isDanglingSpaceSensitive ? _ : "") : a([Gn(n) ? ne : "", o([u(), Re(t7, e, r)]), p()]);
|
|
1049
1049
|
}
|
|
1050
1050
|
function ut(t7) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } var _class; var _class2;require('./chunk-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } var _class; var _class2;require('./chunk-O75UYLMX.cjs');
|
|
2
2
|
|
|
3
3
|
// ../../node_modules/.pnpm/prettier@3.6.2/node_modules/prettier/plugins/html.mjs
|
|
4
4
|
var on = Object.defineProperty;
|
|
@@ -999,7 +999,7 @@ function Re(t7, e, r) {
|
|
|
999
999
|
let a = i.node, o = a.prev ? It(a.prev, a) : "";
|
|
1000
1000
|
return [o ? [o, Je(a.prev) ? S : ""] : "", ot(i, e, r)];
|
|
1001
1001
|
}, "children")];
|
|
1002
|
-
let s = n.children.map(() => Symbol(""));
|
|
1002
|
+
let s = n.children.map(() => /* @__PURE__ */ Symbol(""));
|
|
1003
1003
|
return t7.map((i, a) => {
|
|
1004
1004
|
let o = i.node;
|
|
1005
1005
|
if ($(o)) {
|
|
@@ -1044,7 +1044,7 @@ function Ns(t7, e, r) {
|
|
|
1044
1044
|
function Is(t7, e, r) {
|
|
1045
1045
|
let { node: n } = t7;
|
|
1046
1046
|
if (wt(n, e)) return [z(n, e), E(st(t7, e, r)), B(Nt(n, e)), ...tt(n, e), G(n, e)];
|
|
1047
|
-
let s = n.children.length === 1 && (n.firstChild.type === "interpolation" || n.firstChild.type === "angularIcuExpression") && n.firstChild.isLeadingSpaceSensitive && !n.firstChild.hasLeadingSpaces && n.lastChild.isTrailingSpaceSensitive && !n.lastChild.hasTrailingSpaces, i = Symbol("element-attr-group-id"), a = (l) => E([E(st(t7, e, r), { id: i }), l, tt(n, e)]), o = (l) => s ? Cn(l, { groupId: i }) : (W(n, e) || et(n, e)) && n.parent.type === "root" && e.parser === "vue" && !e.vueIndentScriptAndStyle ? l : k(l), u = () => s ? pe(v, "", { groupId: i }) : n.firstChild.hasLeadingSpaces && n.firstChild.isLeadingSpaceSensitive ? _ : n.firstChild.type === "text" && n.isWhitespaceSensitive && n.isIndentationSensitive ? dn(v) : v, p = () => (n.next ? Q(n.next) : Ee(n.parent)) ? n.lastChild.hasTrailingSpaces && n.lastChild.isTrailingSpaceSensitive ? " " : "" : s ? pe(v, "", { groupId: i }) : n.lastChild.hasTrailingSpaces && n.lastChild.isTrailingSpaceSensitive ? _ : (n.lastChild.type === "comment" || n.lastChild.type === "text" && n.isWhitespaceSensitive && n.isIndentationSensitive) && new RegExp(`\\n[\\t ]{${e.tabWidth * (t7.ancestors.length - 1)}}$`, "u").test(n.lastChild.value) ? "" : v;
|
|
1047
|
+
let s = n.children.length === 1 && (n.firstChild.type === "interpolation" || n.firstChild.type === "angularIcuExpression") && n.firstChild.isLeadingSpaceSensitive && !n.firstChild.hasLeadingSpaces && n.lastChild.isTrailingSpaceSensitive && !n.lastChild.hasTrailingSpaces, i = /* @__PURE__ */ Symbol("element-attr-group-id"), a = (l) => E([E(st(t7, e, r), { id: i }), l, tt(n, e)]), o = (l) => s ? Cn(l, { groupId: i }) : (W(n, e) || et(n, e)) && n.parent.type === "root" && e.parser === "vue" && !e.vueIndentScriptAndStyle ? l : k(l), u = () => s ? pe(v, "", { groupId: i }) : n.firstChild.hasLeadingSpaces && n.firstChild.isLeadingSpaceSensitive ? _ : n.firstChild.type === "text" && n.isWhitespaceSensitive && n.isIndentationSensitive ? dn(v) : v, p = () => (n.next ? Q(n.next) : Ee(n.parent)) ? n.lastChild.hasTrailingSpaces && n.lastChild.isTrailingSpaceSensitive ? " " : "" : s ? pe(v, "", { groupId: i }) : n.lastChild.hasTrailingSpaces && n.lastChild.isTrailingSpaceSensitive ? _ : (n.lastChild.type === "comment" || n.lastChild.type === "text" && n.isWhitespaceSensitive && n.isIndentationSensitive) && new RegExp(`\\n[\\t ]{${e.tabWidth * (t7.ancestors.length - 1)}}$`, "u").test(n.lastChild.value) ? "" : v;
|
|
1048
1048
|
return n.children.length === 0 ? a(n.hasDanglingSpaces && n.isDanglingSpaceSensitive ? _ : "") : a([Gn(n) ? ne : "", o([u(), Re(t7, e, r)]), p()]);
|
|
1049
1049
|
}
|
|
1050
1050
|
function ut(t7) {
|
package/build/index.cjs
CHANGED
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
var
|
|
19
|
+
var _chunkNKMWW3RScjs = require('./chunk-NKMWW3RS.cjs');
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _chunkO75UYLMXcjs = require('./chunk-O75UYLMX.cjs');
|
|
23
23
|
|
|
24
24
|
// src/index.ts
|
|
25
25
|
var _unplugin = require('unplugin');
|
|
@@ -27,7 +27,7 @@ var _unplugin = require('unplugin');
|
|
|
27
27
|
// package.json
|
|
28
28
|
var package_default = {
|
|
29
29
|
name: "@lingo.dev/_compiler",
|
|
30
|
-
version: "0.8.
|
|
30
|
+
version: "0.8.9",
|
|
31
31
|
description: "Lingo.dev Compiler",
|
|
32
32
|
private: false,
|
|
33
33
|
repository: {
|
|
@@ -72,7 +72,7 @@ var package_default = {
|
|
|
72
72
|
"@types/lodash": "4.17.21",
|
|
73
73
|
"@types/object-hash": "3.0.6",
|
|
74
74
|
"@types/react": "19.2.7",
|
|
75
|
-
next: "15.
|
|
75
|
+
next: "15.3.8",
|
|
76
76
|
tsup: "8.5.1",
|
|
77
77
|
typescript: "5.9.3",
|
|
78
78
|
vitest: "4.0.13"
|
|
@@ -250,7 +250,7 @@ async function getDistinctId() {
|
|
|
250
250
|
};
|
|
251
251
|
}
|
|
252
252
|
async function tryGetEmail() {
|
|
253
|
-
const rc =
|
|
253
|
+
const rc = _chunkNKMWW3RScjs.getRc.call(void 0, );
|
|
254
254
|
const apiKey = process.env.LINGODOTDEV_API_KEY || _optionalChain([rc, 'optionalAccess', _5 => _5.auth, 'optionalAccess', _6 => _6.apiKey]);
|
|
255
255
|
const apiUrl = process.env.LINGODOTDEV_API_URL || _optionalChain([rc, 'optionalAccess', _7 => _7.auth, 'optionalAccess', _8 => _8.apiUrl]) || "https://engine.lingo.dev";
|
|
256
256
|
if (!apiKey) {
|
|
@@ -278,20 +278,20 @@ async function tryGetEmail() {
|
|
|
278
278
|
// src/index.ts
|
|
279
279
|
var keyCheckers = {
|
|
280
280
|
groq: {
|
|
281
|
-
checkEnv:
|
|
282
|
-
checkRc:
|
|
281
|
+
checkEnv: _chunkNKMWW3RScjs.getGroqKeyFromEnv,
|
|
282
|
+
checkRc: _chunkNKMWW3RScjs.getGroqKeyFromRc
|
|
283
283
|
},
|
|
284
284
|
google: {
|
|
285
|
-
checkEnv:
|
|
286
|
-
checkRc:
|
|
285
|
+
checkEnv: _chunkNKMWW3RScjs.getGoogleKeyFromEnv,
|
|
286
|
+
checkRc: _chunkNKMWW3RScjs.getGoogleKeyFromRc
|
|
287
287
|
},
|
|
288
288
|
mistral: {
|
|
289
|
-
checkEnv:
|
|
290
|
-
checkRc:
|
|
289
|
+
checkEnv: _chunkNKMWW3RScjs.getMistralKeyFromEnv,
|
|
290
|
+
checkRc: _chunkNKMWW3RScjs.getMistralKeyFromRc
|
|
291
291
|
},
|
|
292
292
|
"lingo.dev": {
|
|
293
|
-
checkEnv:
|
|
294
|
-
checkRc:
|
|
293
|
+
checkEnv: _chunkNKMWW3RScjs.getLingoDotDevKeyFromEnv,
|
|
294
|
+
checkRc: _chunkNKMWW3RScjs.getLingoDotDevKeyFromRc
|
|
295
295
|
}
|
|
296
296
|
};
|
|
297
297
|
var alreadySentBuildEvent = { value: false };
|
|
@@ -307,14 +307,14 @@ function sendBuildEvent(framework, config, isDev) {
|
|
|
307
307
|
var unplugin = _unplugin.createUnplugin.call(void 0,
|
|
308
308
|
(_params, _meta) => {
|
|
309
309
|
console.log("\u2139\uFE0F Starting Lingo.dev compiler...");
|
|
310
|
-
const params = _lodash2.default.defaults(_params,
|
|
311
|
-
if (!
|
|
310
|
+
const params = _lodash2.default.defaults(_params, _chunkNKMWW3RScjs.defaultParams);
|
|
311
|
+
if (!_chunkNKMWW3RScjs.isRunningInCIOrDocker.call(void 0, )) {
|
|
312
312
|
if (params.models === "lingo.dev") {
|
|
313
313
|
validateLLMKeyDetails(["lingo.dev"]);
|
|
314
314
|
} else {
|
|
315
315
|
const configuredProviders = getConfiguredProviders(params.models);
|
|
316
316
|
validateLLMKeyDetails(configuredProviders);
|
|
317
|
-
const invalidLocales =
|
|
317
|
+
const invalidLocales = _chunkNKMWW3RScjs.getInvalidLocales.call(void 0,
|
|
318
318
|
params.models,
|
|
319
319
|
params.sourceLocale,
|
|
320
320
|
params.targetLocales
|
|
@@ -333,7 +333,7 @@ var unplugin = _unplugin.createUnplugin.call(void 0,
|
|
|
333
333
|
}
|
|
334
334
|
}
|
|
335
335
|
}
|
|
336
|
-
|
|
336
|
+
_chunkNKMWW3RScjs.LCPCache.ensureDictionaryFile({
|
|
337
337
|
sourceRoot: params.sourceRoot,
|
|
338
338
|
lingoDir: params.lingoDir
|
|
339
339
|
});
|
|
@@ -341,9 +341,9 @@ var unplugin = _unplugin.createUnplugin.call(void 0,
|
|
|
341
341
|
sendBuildEvent("unplugin", params, isDev);
|
|
342
342
|
return {
|
|
343
343
|
name: package_default.name,
|
|
344
|
-
loadInclude: (id) => !!id.match(
|
|
344
|
+
loadInclude: (id) => !!id.match(_chunkNKMWW3RScjs.LCP_DICTIONARY_FILE_NAME),
|
|
345
345
|
async load(id) {
|
|
346
|
-
const dictionary = await
|
|
346
|
+
const dictionary = await _chunkNKMWW3RScjs.loadDictionary.call(void 0, {
|
|
347
347
|
resourcePath: id,
|
|
348
348
|
resourceQuery: "",
|
|
349
349
|
params: {
|
|
@@ -367,7 +367,7 @@ var unplugin = _unplugin.createUnplugin.call(void 0,
|
|
|
367
367
|
enforce: "pre",
|
|
368
368
|
transform(code, id) {
|
|
369
369
|
try {
|
|
370
|
-
const result =
|
|
370
|
+
const result = _chunkNKMWW3RScjs.transformComponent.call(void 0, {
|
|
371
371
|
code,
|
|
372
372
|
params,
|
|
373
373
|
resourcePath: id,
|
|
@@ -409,7 +409,7 @@ var index_default = {
|
|
|
409
409
|
next: (compilerParams) => (nextConfig = {}) => {
|
|
410
410
|
const mergedParams = _lodash2.default.merge(
|
|
411
411
|
{},
|
|
412
|
-
|
|
412
|
+
_chunkNKMWW3RScjs.defaultParams,
|
|
413
413
|
{
|
|
414
414
|
rsc: true,
|
|
415
415
|
turbopack: {
|
|
@@ -460,7 +460,7 @@ var index_default = {
|
|
|
460
460
|
turbopackConfigPath.rules ??= {};
|
|
461
461
|
const rules = turbopackConfigPath.rules;
|
|
462
462
|
const lingoGlob = `**/*.{ts,tsx,js,jsx}`;
|
|
463
|
-
const lingoLoaderPath =
|
|
463
|
+
const lingoLoaderPath = _chunkO75UYLMXcjs.__require.resolve("./lingo-turbopack-loader.cjs");
|
|
464
464
|
rules[lingoGlob] = {
|
|
465
465
|
loaders: [
|
|
466
466
|
{
|
|
@@ -520,7 +520,7 @@ var index_default = {
|
|
|
520
520
|
vite: (compilerParams) => (config) => {
|
|
521
521
|
const mergedParams = _lodash2.default.merge(
|
|
522
522
|
{},
|
|
523
|
-
|
|
523
|
+
_chunkNKMWW3RScjs.defaultParams,
|
|
524
524
|
{ rsc: false },
|
|
525
525
|
compilerParams
|
|
526
526
|
);
|
|
@@ -534,7 +534,7 @@ var index_default = {
|
|
|
534
534
|
};
|
|
535
535
|
function getConfiguredProviders(models) {
|
|
536
536
|
return _lodash2.default.chain(Object.values(models)).map((modelString) => modelString.split(":")[0]).filter(Boolean).uniq().filter(
|
|
537
|
-
(providerId) =>
|
|
537
|
+
(providerId) => _chunkNKMWW3RScjs.providerDetails.hasOwnProperty(providerId) && keyCheckers.hasOwnProperty(providerId)
|
|
538
538
|
).value();
|
|
539
539
|
}
|
|
540
540
|
function validateLLMKeyDetails(configuredProviders) {
|
|
@@ -545,7 +545,7 @@ function validateLLMKeyDetails(configuredProviders) {
|
|
|
545
545
|
const missingProviders = [];
|
|
546
546
|
const foundProviders = [];
|
|
547
547
|
for (const providerId of configuredProviders) {
|
|
548
|
-
const details =
|
|
548
|
+
const details = _chunkNKMWW3RScjs.providerDetails[providerId];
|
|
549
549
|
const checkers = keyCheckers[providerId];
|
|
550
550
|
if (!details || !checkers) continue;
|
|
551
551
|
const foundInEnv = !!checkers.checkEnv();
|
package/build/index.mjs
CHANGED
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
loadDictionary,
|
|
17
17
|
providerDetails,
|
|
18
18
|
transformComponent
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-OAQHCRD4.mjs";
|
|
20
20
|
import {
|
|
21
21
|
__require
|
|
22
22
|
} from "./chunk-6BWS3CLP.mjs";
|
|
@@ -27,7 +27,7 @@ import { createUnplugin } from "unplugin";
|
|
|
27
27
|
// package.json
|
|
28
28
|
var package_default = {
|
|
29
29
|
name: "@lingo.dev/_compiler",
|
|
30
|
-
version: "0.8.
|
|
30
|
+
version: "0.8.9",
|
|
31
31
|
description: "Lingo.dev Compiler",
|
|
32
32
|
private: false,
|
|
33
33
|
repository: {
|
|
@@ -72,7 +72,7 @@ var package_default = {
|
|
|
72
72
|
"@types/lodash": "4.17.21",
|
|
73
73
|
"@types/object-hash": "3.0.6",
|
|
74
74
|
"@types/react": "19.2.7",
|
|
75
|
-
next: "15.
|
|
75
|
+
next: "15.3.8",
|
|
76
76
|
tsup: "8.5.1",
|
|
77
77
|
typescript: "5.9.3",
|
|
78
78
|
vitest: "4.0.13"
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('./chunk-
|
|
4
|
+
var _chunkNKMWW3RScjs = require('./chunk-NKMWW3RS.cjs');
|
|
5
|
+
require('./chunk-O75UYLMX.cjs');
|
|
6
6
|
|
|
7
7
|
// src/lingo-turbopack-loader.ts
|
|
8
8
|
async function lingo_turbopack_loader_default(source) {
|
|
@@ -10,7 +10,7 @@ async function lingo_turbopack_loader_default(source) {
|
|
|
10
10
|
const params = this.getOptions();
|
|
11
11
|
const isDev = process.env.NODE_ENV !== "production";
|
|
12
12
|
try {
|
|
13
|
-
const dictionary = await
|
|
13
|
+
const dictionary = await _chunkNKMWW3RScjs.loadDictionary.call(void 0, {
|
|
14
14
|
resourcePath: this.resourcePath,
|
|
15
15
|
resourceQuery: this.resourceQuery,
|
|
16
16
|
params,
|
|
@@ -22,7 +22,7 @@ async function lingo_turbopack_loader_default(source) {
|
|
|
22
22
|
const code = `export default ${JSON.stringify(dictionary, null, 2)};`;
|
|
23
23
|
return callback(null, code);
|
|
24
24
|
}
|
|
25
|
-
const result =
|
|
25
|
+
const result = _chunkNKMWW3RScjs.transformComponent.call(void 0, {
|
|
26
26
|
code: source,
|
|
27
27
|
params,
|
|
28
28
|
resourcePath: this.resourcePath,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } var _class; var _class2;require('./chunk-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } var _class; var _class2;require('./chunk-O75UYLMX.cjs');
|
|
2
2
|
|
|
3
3
|
// ../../node_modules/.pnpm/prettier@3.6.2/node_modules/prettier/plugins/markdown.mjs
|
|
4
4
|
var yl = Object.create;
|
|
@@ -2679,10 +2679,10 @@ function cf(e) {
|
|
|
2679
2679
|
return r;
|
|
2680
2680
|
}
|
|
2681
2681
|
var fr = cf;
|
|
2682
|
-
var V = Symbol("MODE_BREAK");
|
|
2683
|
-
var ue = Symbol("MODE_FLAT");
|
|
2684
|
-
var Ve = Symbol("cursor");
|
|
2685
|
-
var At = Symbol("DOC_FILL_PRINTED_LENGTH");
|
|
2682
|
+
var V = /* @__PURE__ */ Symbol("MODE_BREAK");
|
|
2683
|
+
var ue = /* @__PURE__ */ Symbol("MODE_FLAT");
|
|
2684
|
+
var Ve = /* @__PURE__ */ Symbol("cursor");
|
|
2685
|
+
var At = /* @__PURE__ */ Symbol("DOC_FILL_PRINTED_LENGTH");
|
|
2686
2686
|
function Ri() {
|
|
2687
2687
|
return { value: "", length: 0, queue: [] };
|
|
2688
2688
|
}
|
|
@@ -2679,10 +2679,10 @@ function cf(e) {
|
|
|
2679
2679
|
return r;
|
|
2680
2680
|
}
|
|
2681
2681
|
var fr = cf;
|
|
2682
|
-
var V = Symbol("MODE_BREAK");
|
|
2683
|
-
var ue = Symbol("MODE_FLAT");
|
|
2684
|
-
var Ve = Symbol("cursor");
|
|
2685
|
-
var At = Symbol("DOC_FILL_PRINTED_LENGTH");
|
|
2682
|
+
var V = /* @__PURE__ */ Symbol("MODE_BREAK");
|
|
2683
|
+
var ue = /* @__PURE__ */ Symbol("MODE_FLAT");
|
|
2684
|
+
var Ve = /* @__PURE__ */ Symbol("cursor");
|
|
2685
|
+
var At = /* @__PURE__ */ Symbol("DOC_FILL_PRINTED_LENGTH");
|
|
2686
2686
|
function Ri() {
|
|
2687
2687
|
return { value: "", length: 0, queue: [] };
|
|
2688
2688
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } var _class;require('./chunk-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } var _class;require('./chunk-O75UYLMX.cjs');
|
|
2
2
|
|
|
3
3
|
// ../../node_modules/.pnpm/prettier@3.6.2/node_modules/prettier/plugins/meriyah.mjs
|
|
4
4
|
var Jn = Object.defineProperty;
|
|
@@ -2376,7 +2376,7 @@ function Fu(e) {
|
|
|
2376
2376
|
var m2 = Fu;
|
|
2377
2377
|
function Nu(e, n, t) {
|
|
2378
2378
|
let u = e.originalText.slice(n, t);
|
|
2379
|
-
for (let o of e[Symbol.for("comments")]) {
|
|
2379
|
+
for (let o of e[/* @__PURE__ */ Symbol.for("comments")]) {
|
|
2380
2380
|
let i = M(o);
|
|
2381
2381
|
if (i > t) break;
|
|
2382
2382
|
let l = O(o);
|
|
@@ -2513,7 +2513,7 @@ function Uu(e, n) {
|
|
|
2513
2513
|
break;
|
|
2514
2514
|
case "TSEnumDeclaration":
|
|
2515
2515
|
if (!d.body) {
|
|
2516
|
-
let g = O(d.id), { members: a } = d, s = hn({ originalText: u, [Symbol.for("comments")]: o }, g, a[0] ? M(a[0]) : O(d)), h = g + s.indexOf("{");
|
|
2516
|
+
let g = O(d.id), { members: a } = d, s = hn({ originalText: u, [/* @__PURE__ */ Symbol.for("comments")]: o }, g, a[0] ? M(a[0]) : O(d)), h = g + s.indexOf("{");
|
|
2517
2517
|
d.body = { type: "TSEnumBody", members: a, range: [h, O(d)] }, delete d.members;
|
|
2518
2518
|
}
|
|
2519
2519
|
break;
|