prettier-plugin-embed 0.7.3 → 0.8.0
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/README.md +23 -1
- package/dist/embedded/create-embedder.d.ts +2 -3
- package/dist/embedded/markdown/embedder.d.ts +1 -6
- package/dist/embedded/register.d.ts +10 -10
- package/dist/embedded/utils.d.ts +8 -11
- package/dist/embedded/yaml/embedder.d.ts +1 -6
- package/dist/index.js +892 -911
- package/package.json +41 -8
package/dist/index.js
CHANGED
|
@@ -13,145 +13,163 @@ var c = Object.defineProperty, l = (e, t) => {
|
|
|
13
13
|
enumerable: !0
|
|
14
14
|
});
|
|
15
15
|
return t || c(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
return Object.getOwnPropertyDescriptor(e, t).enumerable;
|
|
25
|
-
})), n.push.apply(n, r);
|
|
26
|
-
}
|
|
27
|
-
return n;
|
|
28
|
-
}
|
|
29
|
-
function d(e) {
|
|
30
|
-
for (var t = 1; t < arguments.length; t++) {
|
|
31
|
-
var n = arguments[t] == null ? {} : arguments[t];
|
|
32
|
-
t % 2 ? u(Object(n), !0).forEach(function(t) {
|
|
33
|
-
f(e, t, n[t]);
|
|
34
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : u(Object(n)).forEach(function(t) {
|
|
35
|
-
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
return e;
|
|
39
|
-
}
|
|
40
|
-
function f(e, t, n) {
|
|
41
|
-
return t = p(t), t in e ? Object.defineProperty(e, t, {
|
|
42
|
-
value: n,
|
|
43
|
-
enumerable: !0,
|
|
44
|
-
configurable: !0,
|
|
45
|
-
writable: !0
|
|
46
|
-
}) : e[t] = n, e;
|
|
16
|
+
}, { group: u, indent: d, line: f, softline: p, lineSuffixBoundary: m, addAlignmentToDoc: h, align: g, hardline: _, dedentToRoot: v, markAsRoot: ee, literalline: te, trim: ne, label: re } = e, { mapDoc: ie, replaceEndOfLine: ae, traverseDoc: oe, willBreak: se } = t, ce = Symbol("embedded-expression"), le = Symbol("embedded-expressions"), ue = /^[\t ]*/, de = /^[\t ]*(?=\S)/gm, fe = /\r?\n[\t ]*$/, pe = /\n[\t ]*$/, me = /([\\`]|\${)/g, he = /<\/(?=script\b)/gi, ge = /[-[\]{}()*+?.,\\^$|#\s]/g;
|
|
17
|
+
function _e(e) {
|
|
18
|
+
if (typeof e == "string") return !1;
|
|
19
|
+
let t = !1;
|
|
20
|
+
return oe(e, (e) => {
|
|
21
|
+
if (t) return !1;
|
|
22
|
+
e && typeof e == "object" && !Array.isArray(e) && (t = !!(e.type === "line" && e.literal || e.type === "align" && e.n === -Infinity));
|
|
23
|
+
}, void 0, !0), t;
|
|
47
24
|
}
|
|
48
|
-
function
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}
|
|
25
|
+
function ve(e) {
|
|
26
|
+
if (!e || typeof e != "object" || Array.isArray(e) || e.type !== "label" || e.label !== le) return e;
|
|
27
|
+
let t = /* @__PURE__ */ new WeakMap();
|
|
28
|
+
function n(e, n) {
|
|
29
|
+
if (typeof e != "object" || !e) return e;
|
|
30
|
+
let i = t.get(n);
|
|
31
|
+
i || (i = /* @__PURE__ */ new Map(), t.set(n, i));
|
|
32
|
+
let a = i.get(e);
|
|
33
|
+
if (a !== void 0) return a;
|
|
34
|
+
let o = r(e, n);
|
|
35
|
+
return i.set(e, o), o;
|
|
36
|
+
}
|
|
37
|
+
function r(e, t) {
|
|
38
|
+
if (Array.isArray(e)) return e.map((e) => n(e, t));
|
|
39
|
+
if (e.type === "label" && e.label === ce) {
|
|
40
|
+
let n = e.contents, r = 0, i;
|
|
41
|
+
for (let e = t.root; e; e = e.parent) r++, i = e.indentation;
|
|
42
|
+
if (r === 0) return n;
|
|
43
|
+
for (let e = t.indentation; e && e !== i; e = e.parent) n = {
|
|
44
|
+
...e.doc,
|
|
45
|
+
contents: n
|
|
46
|
+
};
|
|
47
|
+
for (; r-- > 0;) n = v(n);
|
|
48
|
+
return n;
|
|
73
49
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
50
|
+
if (e.type === "fill") return {
|
|
51
|
+
...e,
|
|
52
|
+
parts: e.parts.map((e) => n(e, t))
|
|
53
|
+
};
|
|
54
|
+
if (e.type === "if-break") return {
|
|
55
|
+
...e,
|
|
56
|
+
breakContents: n(e.breakContents, t),
|
|
57
|
+
flatContents: n(e.flatContents, t)
|
|
58
|
+
};
|
|
59
|
+
if (e.type === "group" && e.expandedStates) {
|
|
60
|
+
let r = e.expandedStates.map((e) => n(e, t));
|
|
61
|
+
return {
|
|
62
|
+
...e,
|
|
63
|
+
contents: r[0],
|
|
64
|
+
expandedStates: r
|
|
65
|
+
};
|
|
81
66
|
}
|
|
82
|
-
if (
|
|
83
|
-
let
|
|
84
|
-
|
|
67
|
+
if (e.type === "indent-if-break") {
|
|
68
|
+
let r = e;
|
|
69
|
+
return {
|
|
70
|
+
...r,
|
|
71
|
+
contents: n(r.contents, {
|
|
72
|
+
...t,
|
|
73
|
+
indentation: {
|
|
74
|
+
doc: r,
|
|
75
|
+
parent: t.indentation
|
|
76
|
+
}
|
|
77
|
+
})
|
|
78
|
+
};
|
|
85
79
|
}
|
|
86
|
-
|
|
87
|
-
let r = t
|
|
88
|
-
return
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
80
|
+
if ("contents" in e) {
|
|
81
|
+
let r = t;
|
|
82
|
+
return e.type === "align" && typeof e.n == "object" ? r = {
|
|
83
|
+
...t,
|
|
84
|
+
root: {
|
|
85
|
+
indentation: t.indentation,
|
|
86
|
+
parent: t.root
|
|
87
|
+
}
|
|
88
|
+
} : e.type === "align" && e.n === -Infinity ? r = {
|
|
89
|
+
indentation: t.root?.indentation,
|
|
90
|
+
root: t.root?.parent
|
|
91
|
+
} : (e.type === "align" || e.type === "indent") && (r = {
|
|
92
|
+
...t,
|
|
93
|
+
indentation: {
|
|
94
|
+
doc: e,
|
|
95
|
+
parent: t.indentation
|
|
96
|
+
}
|
|
97
|
+
}), {
|
|
98
|
+
...e,
|
|
99
|
+
contents: n(e.contents, r)
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
return e;
|
|
98
103
|
}
|
|
99
|
-
return e;
|
|
104
|
+
return n(e.contents, { root: {} });
|
|
100
105
|
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
106
|
+
function y(e, t, n = !1) {
|
|
107
|
+
let r = e.quasis.map((e, n, { length: r }) => n === r - 1 ? e.value.cooked : e.value.cooked + t(n)).join(""), i = r.length - r.trimStart().length, a = Math.max(i, r.trimEnd().length), o = r.slice(0, i), s = r.slice(a), c = r.slice(i, a), l = r.matchAll(de), u = l.next().value?.[0] ?? "";
|
|
108
|
+
for (; u;) {
|
|
109
|
+
let e = l.next().value?.[0];
|
|
110
|
+
if (e === void 0) break;
|
|
111
|
+
let t = 0;
|
|
112
|
+
for (; t < u.length && u[t] === e[t];) t++;
|
|
113
|
+
u = u.slice(0, t);
|
|
114
|
+
}
|
|
115
|
+
let d = u ? RegExp(`(\\r?\\n)${u}`, "g") : void 0;
|
|
116
|
+
if (c) {
|
|
117
|
+
let e = (o.includes("\n") ? o.slice(o.lastIndexOf("\n") + 1) : "").slice(u.length);
|
|
118
|
+
o = o.slice(0, o.length - e.length), c = e + (d ? c.replace(d, "$1") : c);
|
|
119
|
+
}
|
|
120
|
+
return n && s.includes("\n") && (c += d ? s.replace(d, "$1") : s, s = fe.exec(s)?.[0] ?? ""), {
|
|
121
|
+
text: c,
|
|
122
|
+
leadingWhitespaces: o,
|
|
123
|
+
trailingWhitespaces: s
|
|
110
124
|
};
|
|
111
125
|
}
|
|
112
|
-
function
|
|
113
|
-
let o = t.preserveEmbeddedExteriorWhitespaces?.includes(n), s = t.noEmbeddedMultiLineIndentation?.includes(n)
|
|
114
|
-
if (o) return
|
|
115
|
-
"`",
|
|
116
|
-
r,
|
|
117
|
-
s ? c : v([c]),
|
|
118
|
-
i,
|
|
119
|
-
"`"
|
|
120
|
-
]);
|
|
121
|
-
if (a && (!r || !i)) return _([
|
|
126
|
+
function b(e, t, n, r, i, a = !1) {
|
|
127
|
+
let o = t.preserveEmbeddedExteriorWhitespaces?.includes(n), s = t.noEmbeddedMultiLineIndentation?.includes(n);
|
|
128
|
+
if (!o && a && (!r || !i)) return u([
|
|
122
129
|
"`",
|
|
123
130
|
r ? " " : "",
|
|
124
|
-
|
|
131
|
+
s ? v(u(e)) : u(e),
|
|
125
132
|
i ? " " : "",
|
|
126
133
|
"`"
|
|
127
134
|
]);
|
|
128
|
-
let
|
|
129
|
-
|
|
135
|
+
let c = ee(u(ve(e)));
|
|
136
|
+
if (o) {
|
|
137
|
+
let e = r.includes("\n"), t = r.slice(r.lastIndexOf("\n") + 1);
|
|
138
|
+
return u([
|
|
139
|
+
"`",
|
|
140
|
+
ae(r),
|
|
141
|
+
v(g(e ? t : "", c)),
|
|
142
|
+
ae(i),
|
|
143
|
+
"`"
|
|
144
|
+
]);
|
|
145
|
+
}
|
|
146
|
+
let l = r.length ? f : p, m = i.length ? f : p;
|
|
147
|
+
return u([
|
|
130
148
|
"`",
|
|
131
|
-
s ? [l, c] :
|
|
132
|
-
|
|
149
|
+
s ? v([l, c]) : d([l, c]),
|
|
150
|
+
m,
|
|
133
151
|
"`"
|
|
134
|
-
]);
|
|
152
|
+
], { shouldBreak: se(e) });
|
|
135
153
|
}
|
|
136
|
-
function
|
|
154
|
+
function ye(e, t) {
|
|
137
155
|
let n = 0;
|
|
138
156
|
for (let r of e) r === " " ? n = n + t - n % t : n++;
|
|
139
157
|
return n;
|
|
140
158
|
}
|
|
141
|
-
function
|
|
142
|
-
let n = e.lastIndexOf("\n"), r = e.slice(n + 1), i =
|
|
143
|
-
return
|
|
159
|
+
function be(e, t) {
|
|
160
|
+
let n = e.lastIndexOf("\n"), r = e.slice(n + 1), i = ue.exec(r)[0];
|
|
161
|
+
return ye(i, t);
|
|
144
162
|
}
|
|
145
|
-
function
|
|
163
|
+
function xe(e, t, n) {
|
|
146
164
|
let r = t, i = e.quasis[r].value.raw;
|
|
147
165
|
if (i.includes("\n")) return {
|
|
148
|
-
indentSize:
|
|
166
|
+
indentSize: be(i, n),
|
|
149
167
|
previousQuasiText: i
|
|
150
168
|
};
|
|
151
169
|
for (; r-- > 0;) {
|
|
152
170
|
let t = e.quasis[r].value.raw;
|
|
153
171
|
if (t.includes("\n")) return {
|
|
154
|
-
indentSize:
|
|
172
|
+
indentSize: be(t, n),
|
|
155
173
|
previousQuasiText: i
|
|
156
174
|
};
|
|
157
175
|
}
|
|
@@ -160,68 +178,82 @@ function ue(e, t, n) {
|
|
|
160
178
|
previousQuasiText: i
|
|
161
179
|
};
|
|
162
180
|
}
|
|
163
|
-
function
|
|
181
|
+
function Se(e, t, n, r, i, a = !0, o) {
|
|
164
182
|
let { node: s } = e, c = t();
|
|
165
|
-
if (s?.comments?.length && (c =
|
|
183
|
+
if (s?.comments?.length && (c = u([d([p, c]), p])), !a) return u([
|
|
166
184
|
"${",
|
|
167
185
|
c,
|
|
168
|
-
|
|
186
|
+
m,
|
|
169
187
|
"}"
|
|
170
188
|
]);
|
|
171
|
-
let { indentSize: l, previousQuasiText:
|
|
189
|
+
let { indentSize: l, previousQuasiText: f } = o === void 0 ? xe(n, r, i) : {
|
|
172
190
|
indentSize: o,
|
|
173
191
|
previousQuasiText: n.quasis[r].value.raw
|
|
174
|
-
},
|
|
175
|
-
return
|
|
192
|
+
}, _ = c;
|
|
193
|
+
return _ = l === 0 && f.endsWith("\n") ? g(-Infinity, _) : h(_, l, i), u([
|
|
176
194
|
"${",
|
|
177
|
-
|
|
178
|
-
|
|
195
|
+
_,
|
|
196
|
+
m,
|
|
179
197
|
"}"
|
|
180
198
|
]);
|
|
181
199
|
}
|
|
182
|
-
function
|
|
200
|
+
function Ce(e, t, n, r = !0) {
|
|
183
201
|
let i = n?.tabWidth ?? 2, a = e.node, o = 0;
|
|
184
202
|
return e.map((e, n) => {
|
|
185
203
|
if (r) {
|
|
186
204
|
let e = a.quasis[n].value.raw;
|
|
187
|
-
e.includes("\n") && (o =
|
|
205
|
+
e.includes("\n") && (o = be(e, i));
|
|
188
206
|
}
|
|
189
|
-
return
|
|
207
|
+
return Se(e, t, a, n, i, r, o);
|
|
190
208
|
}, "expressions");
|
|
191
209
|
}
|
|
192
|
-
function
|
|
193
|
-
let s = n.length ? /* @__PURE__ */ new Set() : void 0,
|
|
210
|
+
function x(e, t, n, { lineBreakBeforeExpressions: r, interpolationTabWidth: i, escapeClosingScript: a = !1 } = {}) {
|
|
211
|
+
let o = !1, s = n.map((e) => _e(e) ? (o = !0, re(ce, e)) : e), c = n.length ? /* @__PURE__ */ new Set() : void 0, l = ie(e, (e) => {
|
|
194
212
|
if (typeof e != "string") return e;
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
213
|
+
if (!n.length) return we(e, a);
|
|
214
|
+
let o = e.split(t);
|
|
215
|
+
if (o.length === 1) return we(e, a);
|
|
216
|
+
let l = [], u = "";
|
|
217
|
+
for (let e = 0; e < o.length; e++) {
|
|
218
|
+
let t = o[e];
|
|
198
219
|
if (e % 2 == 0) {
|
|
199
|
-
if (e === 0 || t.includes("\n")) {
|
|
220
|
+
if (i !== void 0 && (e === 0 || t.includes("\n"))) {
|
|
200
221
|
let e = t.slice(t.lastIndexOf("\n") + 1);
|
|
201
|
-
u =
|
|
222
|
+
u = ue.exec(e)[0];
|
|
202
223
|
}
|
|
203
224
|
if (!t) continue;
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
else
|
|
225
|
+
let n = we(t, a);
|
|
226
|
+
if (Array.isArray(n)) for (let e of n) l.push(e);
|
|
227
|
+
else l.push(n);
|
|
207
228
|
} else {
|
|
208
|
-
let
|
|
209
|
-
|
|
210
|
-
let
|
|
211
|
-
if (
|
|
212
|
-
let e =
|
|
213
|
-
typeof e == "string"
|
|
229
|
+
let n = Number(t);
|
|
230
|
+
c?.add(n);
|
|
231
|
+
let a = o[e - 1];
|
|
232
|
+
if (r?.has(n) && !pe.test(a)) {
|
|
233
|
+
let e = l.at(-1);
|
|
234
|
+
if (typeof e == "string") {
|
|
235
|
+
let t = e.length;
|
|
236
|
+
for (; e[t - 1] === " " || e[t - 1] === " ";) t--;
|
|
237
|
+
l[l.length - 1] = e.slice(0, t);
|
|
238
|
+
}
|
|
239
|
+
l.push(_), i !== void 0 && l.push(u);
|
|
214
240
|
}
|
|
215
|
-
let d = n
|
|
216
|
-
|
|
241
|
+
let d = s[n];
|
|
242
|
+
l.push(i === void 0 ? d : g(ye(u, i), d));
|
|
217
243
|
}
|
|
218
244
|
}
|
|
219
|
-
return
|
|
245
|
+
return l;
|
|
220
246
|
});
|
|
221
|
-
if (n.some((e, t) => !
|
|
222
|
-
return
|
|
247
|
+
if (n.some((e, t) => !c.has(t))) throw Error("The embedded formatter changed an expression placeholder.");
|
|
248
|
+
return o ? re(le, l) : l;
|
|
249
|
+
}
|
|
250
|
+
function we(e, t) {
|
|
251
|
+
if (e = e.replace(me, "\\$1"), t && (e = e.replace(he, "<\\/")), !e.includes("\n")) return e;
|
|
252
|
+
let n = e.split("\n"), r = [n[0]];
|
|
253
|
+
for (let e = 1; e < n.length; e++) e > 1 && n[e - 1] === "" && r.push(ne), r.push(te, n[e]);
|
|
254
|
+
return r;
|
|
223
255
|
}
|
|
224
|
-
function
|
|
256
|
+
function Te(e, t, n) {
|
|
225
257
|
if (t === n) {
|
|
226
258
|
e.unshift(t);
|
|
227
259
|
return;
|
|
@@ -237,151 +269,148 @@ function fe(e, t, n) {
|
|
|
237
269
|
}
|
|
238
270
|
e.splice(r, 0, t);
|
|
239
271
|
}
|
|
240
|
-
var
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
function w(e = "p", t = "") {
|
|
249
|
-
let n = pe(), r = pe(), i = me(e), a = me(t);
|
|
272
|
+
var Ee = "abcdefghijklmnopqrstuvwxyz0123456789";
|
|
273
|
+
function De() {
|
|
274
|
+
let e = "";
|
|
275
|
+
for (let t = 0; t < 16; t++) e += Ee[Math.floor(Math.random() * 36)];
|
|
276
|
+
return e;
|
|
277
|
+
}
|
|
278
|
+
function Oe(e = "p", t = "") {
|
|
279
|
+
let n = De(), r = De(), i = ke(e), a = ke(t);
|
|
250
280
|
return {
|
|
251
281
|
createPlaceholder: (i) => `${e}${n}${i}${r}${t}`,
|
|
252
282
|
placeholderRegex: RegExp(`${i}${n}(\\d+)${r}${a}`, "ig")
|
|
253
283
|
};
|
|
254
284
|
}
|
|
255
|
-
function
|
|
256
|
-
return e.replace(
|
|
285
|
+
function ke(e) {
|
|
286
|
+
return e.replace(ge, "\\$&");
|
|
257
287
|
}
|
|
258
|
-
function
|
|
288
|
+
function S(e) {
|
|
259
289
|
return `${e}Identifiers`;
|
|
260
290
|
}
|
|
261
|
-
function
|
|
291
|
+
function C(e) {
|
|
262
292
|
return `${e}Comments`;
|
|
263
293
|
}
|
|
264
|
-
function
|
|
294
|
+
function w(e) {
|
|
265
295
|
return `${e}Tags`;
|
|
266
296
|
}
|
|
267
|
-
function
|
|
297
|
+
function Ae(e) {
|
|
268
298
|
return `${e}Plugin`;
|
|
269
299
|
}
|
|
270
|
-
function
|
|
300
|
+
function T(e) {
|
|
271
301
|
return `${e}Parser`;
|
|
272
302
|
}
|
|
273
|
-
var
|
|
303
|
+
var E = "9ff2b366e8ca4c97b9aed1a29b5b94ed";
|
|
274
304
|
//#endregion
|
|
275
305
|
//#region src/embedded/create-embedder.ts
|
|
276
|
-
function
|
|
277
|
-
return async (c, l, u,
|
|
278
|
-
let
|
|
279
|
-
...
|
|
280
|
-
...
|
|
281
|
-
}, { createPlaceholder:
|
|
282
|
-
...
|
|
306
|
+
function D({ parser: e, parserOption: t, parserOptions: n, markup: r = !1, preserveTrailingWhitespace: i = !1, placeholderPrefix: a = "p", transformDoc: o }) {
|
|
307
|
+
return async (s, c, l, u, { commentOrTag: d, embeddedOverrideOptions: f }) => {
|
|
308
|
+
let p = {
|
|
309
|
+
...u,
|
|
310
|
+
...f
|
|
311
|
+
}, { createPlaceholder: m, placeholderRegex: h } = Oe(a), { text: g, leadingWhitespaces: _, trailingWhitespaces: v } = y(l.node, m, i), ee = Ce(l, c, p, !1), te = t ? p[t] : void 0, ne = await s(g, {
|
|
312
|
+
...p,
|
|
283
313
|
...n,
|
|
284
|
-
parser:
|
|
314
|
+
parser: te ?? e
|
|
285
315
|
});
|
|
286
|
-
return x(
|
|
316
|
+
return b(x(o ? o(ne) : ne, h, ee, {
|
|
317
|
+
interpolationTabWidth: p.tabWidth,
|
|
318
|
+
escapeClosingScript: !!p.__embeddedInHtml
|
|
319
|
+
}), p, d, _, v, r && (p.htmlWhitespaceSensitivity === "strict" || p.htmlWhitespaceSensitivity === "css"));
|
|
287
320
|
};
|
|
288
321
|
}
|
|
289
322
|
//#endregion
|
|
290
323
|
//#region src/embedded/astro/embedder.ts
|
|
291
|
-
var
|
|
324
|
+
var je = D({
|
|
292
325
|
parser: "astro",
|
|
293
326
|
markup: !0
|
|
294
|
-
}),
|
|
295
|
-
[
|
|
327
|
+
}), Me = "embeddedAstro", Ne = ["astro"], Pe = C(Me), Fe = w(Me), Ie = {
|
|
328
|
+
[Pe]: {
|
|
296
329
|
category: "Embed",
|
|
297
330
|
type: "string",
|
|
298
331
|
array: !0,
|
|
299
|
-
default: [{ value: [...
|
|
332
|
+
default: [{ value: [...Ne] }],
|
|
300
333
|
description: "Block comments that identify embedded Astro in template literals. Requires the `prettier-plugin-astro` plugin."
|
|
301
334
|
},
|
|
302
|
-
[
|
|
335
|
+
[Fe]: {
|
|
303
336
|
category: "Embed",
|
|
304
337
|
type: "string",
|
|
305
338
|
array: !0,
|
|
306
|
-
default: [{ value: [...
|
|
339
|
+
default: [{ value: [...Ne] }],
|
|
307
340
|
description: "Tags that identify embedded Astro in template literals. Requires the `prettier-plugin-astro` plugin."
|
|
308
341
|
}
|
|
309
|
-
},
|
|
310
|
-
embedder: () =>
|
|
311
|
-
language: () =>
|
|
312
|
-
options: () =>
|
|
313
|
-
}),
|
|
342
|
+
}, Le = /* @__PURE__ */ l({
|
|
343
|
+
embedder: () => je,
|
|
344
|
+
language: () => Me,
|
|
345
|
+
options: () => Ie
|
|
346
|
+
}), Re = D({
|
|
314
347
|
parser: "scss",
|
|
315
348
|
parserOption: "embeddedCssParser",
|
|
316
|
-
placeholderPrefix: "@prettier-placeholder"
|
|
317
|
-
|
|
318
|
-
}), j = "embeddedCss", we = ["css"], Te = [
|
|
349
|
+
placeholderPrefix: "@prettier-placeholder"
|
|
350
|
+
}), O = "embeddedCss", ze = ["css"], Be = [
|
|
319
351
|
"css",
|
|
320
352
|
"less",
|
|
321
353
|
"scss"
|
|
322
|
-
],
|
|
323
|
-
[
|
|
354
|
+
], Ve = S(O), He = C(O), Ue = w(O), We = T(O), Ge = {
|
|
355
|
+
[Ve]: {
|
|
324
356
|
category: "Embed",
|
|
325
357
|
type: "string",
|
|
326
358
|
array: !0,
|
|
327
|
-
default: [{ value: [...
|
|
359
|
+
default: [{ value: [...ze] }],
|
|
328
360
|
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded CSS language.",
|
|
329
|
-
deprecated: `Please use \`${
|
|
361
|
+
deprecated: `Please use \`${He}\` or \`${Ue}\`.`
|
|
330
362
|
},
|
|
331
|
-
[
|
|
363
|
+
[He]: {
|
|
332
364
|
category: "Embed",
|
|
333
365
|
type: "string",
|
|
334
366
|
array: !0,
|
|
335
|
-
default: [{ value: [
|
|
367
|
+
default: [{ value: [E] }],
|
|
336
368
|
description: "Block comments that make their subsequent template literals be identified as embedded CSS language."
|
|
337
369
|
},
|
|
338
|
-
[
|
|
370
|
+
[Ue]: {
|
|
339
371
|
category: "Embed",
|
|
340
372
|
type: "string",
|
|
341
373
|
array: !0,
|
|
342
|
-
default: [{ value: [
|
|
374
|
+
default: [{ value: [E] }],
|
|
343
375
|
description: "Tags that make their subsequent template literals be identified as embedded CSS language."
|
|
344
376
|
},
|
|
345
|
-
[
|
|
377
|
+
[We]: {
|
|
346
378
|
category: "Embed",
|
|
347
379
|
type: "choice",
|
|
348
380
|
default: "scss",
|
|
349
381
|
description: "The parser used to parse the embedded CSS language.",
|
|
350
|
-
choices:
|
|
382
|
+
choices: Be.map((e) => ({
|
|
351
383
|
value: e,
|
|
352
384
|
description: `Use the "${e}" parser.`
|
|
353
385
|
}))
|
|
354
386
|
}
|
|
355
|
-
},
|
|
356
|
-
embedder: () =>
|
|
357
|
-
language: () =>
|
|
358
|
-
options: () =>
|
|
359
|
-
}),
|
|
360
|
-
|
|
361
|
-
newlineHandling: "hardline"
|
|
362
|
-
}), Ne = "embeddedDockerfile", Pe = ["dockerfile", "containerfile"], Fe = E(Ne), Ie = D(Ne), Le = {
|
|
363
|
-
[Fe]: {
|
|
387
|
+
}, Ke = /* @__PURE__ */ l({
|
|
388
|
+
embedder: () => Re,
|
|
389
|
+
language: () => O,
|
|
390
|
+
options: () => Ge
|
|
391
|
+
}), qe = D({ parser: "dockerfile" }), Je = "embeddedDockerfile", Ye = ["dockerfile", "containerfile"], Xe = C(Je), Ze = w(Je), Qe = {
|
|
392
|
+
[Xe]: {
|
|
364
393
|
category: "Embed",
|
|
365
394
|
type: "string",
|
|
366
395
|
array: !0,
|
|
367
|
-
default: [{ value: [...
|
|
396
|
+
default: [{ value: [...Ye] }],
|
|
368
397
|
description: "Block comments that identify embedded Dockerfile in template literals. Requires the `prettier-plugin-sh` plugin."
|
|
369
398
|
},
|
|
370
|
-
[
|
|
399
|
+
[Ze]: {
|
|
371
400
|
category: "Embed",
|
|
372
401
|
type: "string",
|
|
373
402
|
array: !0,
|
|
374
|
-
default: [{ value: [...
|
|
403
|
+
default: [{ value: [...Ye] }],
|
|
375
404
|
description: "Tags that identify embedded Dockerfile in template literals. Requires the `prettier-plugin-sh` plugin."
|
|
376
405
|
}
|
|
377
|
-
},
|
|
378
|
-
embedder: () =>
|
|
379
|
-
language: () =>
|
|
380
|
-
options: () =>
|
|
381
|
-
}),
|
|
406
|
+
}, $e = /* @__PURE__ */ l({
|
|
407
|
+
embedder: () => qe,
|
|
408
|
+
language: () => Je,
|
|
409
|
+
options: () => Qe
|
|
410
|
+
}), et = D({
|
|
382
411
|
parser: "babel",
|
|
383
412
|
parserOption: "embeddedEsParser"
|
|
384
|
-
}),
|
|
413
|
+
}), k = "embeddedEs", tt = [
|
|
385
414
|
"js",
|
|
386
415
|
"jsx",
|
|
387
416
|
"es",
|
|
@@ -390,336 +419,328 @@ var ge = A({
|
|
|
390
419
|
"cjs",
|
|
391
420
|
"pac",
|
|
392
421
|
"javascript"
|
|
393
|
-
],
|
|
422
|
+
], nt = [
|
|
394
423
|
"babel",
|
|
395
424
|
"babel-flow",
|
|
396
425
|
"acorn",
|
|
397
426
|
"espree",
|
|
398
427
|
"flow",
|
|
399
428
|
"meriyah"
|
|
400
|
-
],
|
|
401
|
-
[
|
|
429
|
+
], rt = S(k), it = C(k), at = w(k), ot = T(k), st = {
|
|
430
|
+
[rt]: {
|
|
402
431
|
category: "Embed",
|
|
403
432
|
type: "string",
|
|
404
433
|
array: !0,
|
|
405
|
-
default: [{ value: [...
|
|
434
|
+
default: [{ value: [...tt] }],
|
|
406
435
|
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded ECMAScript/JavaScript language.",
|
|
407
|
-
deprecated: `Please use \`${
|
|
436
|
+
deprecated: `Please use \`${it}\` or \`${at}\`.`
|
|
408
437
|
},
|
|
409
|
-
[
|
|
438
|
+
[it]: {
|
|
410
439
|
category: "Embed",
|
|
411
440
|
type: "string",
|
|
412
441
|
array: !0,
|
|
413
|
-
default: [{ value: [
|
|
442
|
+
default: [{ value: [E] }],
|
|
414
443
|
description: "Block comments that make their subsequent template literals be identified as embedded ECMAScript/JavaScript language."
|
|
415
444
|
},
|
|
416
|
-
[
|
|
445
|
+
[at]: {
|
|
417
446
|
category: "Embed",
|
|
418
447
|
type: "string",
|
|
419
448
|
array: !0,
|
|
420
|
-
default: [{ value: [
|
|
449
|
+
default: [{ value: [E] }],
|
|
421
450
|
description: "Tags that make their subsequent template literals be identified as embedded ECMAScript/JavaScript language."
|
|
422
451
|
},
|
|
423
|
-
[
|
|
452
|
+
[ot]: {
|
|
424
453
|
category: "Embed",
|
|
425
454
|
type: "choice",
|
|
426
455
|
default: "babel",
|
|
427
456
|
description: "The parser used to parse the embedded ECMASCript/JavaScript language.",
|
|
428
|
-
choices:
|
|
457
|
+
choices: nt.map((e) => ({
|
|
429
458
|
value: e,
|
|
430
459
|
description: `Use the "${e}" parser.`
|
|
431
460
|
}))
|
|
432
461
|
}
|
|
433
|
-
},
|
|
434
|
-
embedder: () =>
|
|
435
|
-
language: () =>
|
|
436
|
-
options: () =>
|
|
437
|
-
}),
|
|
438
|
-
[
|
|
462
|
+
}, ct = /* @__PURE__ */ l({
|
|
463
|
+
embedder: () => et,
|
|
464
|
+
language: () => k,
|
|
465
|
+
options: () => st
|
|
466
|
+
}), lt = D({ parser: "gherkin" }), ut = "embeddedGherkin", dt = ["gherkin", "feature"], ft = C(ut), pt = w(ut), mt = {
|
|
467
|
+
[ft]: {
|
|
439
468
|
category: "Embed",
|
|
440
469
|
type: "string",
|
|
441
470
|
array: !0,
|
|
442
|
-
default: [{ value: [...
|
|
471
|
+
default: [{ value: [...dt] }],
|
|
443
472
|
description: "Block comments that identify embedded Gherkin in template literals. Requires the `prettier-plugin-gherkin` plugin."
|
|
444
473
|
},
|
|
445
|
-
[
|
|
474
|
+
[pt]: {
|
|
446
475
|
category: "Embed",
|
|
447
476
|
type: "string",
|
|
448
477
|
array: !0,
|
|
449
|
-
default: [{ value: [...
|
|
478
|
+
default: [{ value: [...dt] }],
|
|
450
479
|
description: "Tags that identify embedded Gherkin in template literals. Requires the `prettier-plugin-gherkin` plugin."
|
|
451
480
|
}
|
|
452
|
-
},
|
|
453
|
-
embedder: () =>
|
|
454
|
-
language: () =>
|
|
455
|
-
options: () =>
|
|
456
|
-
}),
|
|
457
|
-
[
|
|
481
|
+
}, ht = /* @__PURE__ */ l({
|
|
482
|
+
embedder: () => lt,
|
|
483
|
+
language: () => ut,
|
|
484
|
+
options: () => mt
|
|
485
|
+
}), gt = D({ parser: "glsl-parser" }), _t = "embeddedGlsl", vt = ["glsl", "shader"], yt = S(_t), bt = C(_t), xt = w(_t), St = {
|
|
486
|
+
[yt]: {
|
|
458
487
|
category: "Embed",
|
|
459
488
|
type: "string",
|
|
460
489
|
array: !0,
|
|
461
|
-
default: [{ value: [...
|
|
490
|
+
default: [{ value: [...vt] }],
|
|
462
491
|
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded GLSL language. This option requires the `prettier-plugin-glsl` plugin.",
|
|
463
|
-
deprecated: `Please use \`${
|
|
492
|
+
deprecated: `Please use \`${bt}\` or \`${xt}\`.`
|
|
464
493
|
},
|
|
465
|
-
[
|
|
494
|
+
[bt]: {
|
|
466
495
|
category: "Embed",
|
|
467
496
|
type: "string",
|
|
468
497
|
array: !0,
|
|
469
|
-
default: [{ value: [
|
|
498
|
+
default: [{ value: [E] }],
|
|
470
499
|
description: "Block comments that make their subsequent template literals be identified as embedded GLSL language. This option requires the `prettier-plugin-glsl` plugin."
|
|
471
500
|
},
|
|
472
|
-
[
|
|
501
|
+
[xt]: {
|
|
473
502
|
category: "Embed",
|
|
474
503
|
type: "string",
|
|
475
504
|
array: !0,
|
|
476
|
-
default: [{ value: [
|
|
505
|
+
default: [{ value: [E] }],
|
|
477
506
|
description: "Tags that make their subsequent template literals be identified as embedded GLSL language. This option requires the `prettier-plugin-glsl` plugin."
|
|
478
507
|
}
|
|
479
|
-
},
|
|
480
|
-
embedder: () =>
|
|
481
|
-
language: () =>
|
|
482
|
-
options: () =>
|
|
483
|
-
}),
|
|
508
|
+
}, Ct = /* @__PURE__ */ l({
|
|
509
|
+
embedder: () => gt,
|
|
510
|
+
language: () => _t,
|
|
511
|
+
options: () => St
|
|
512
|
+
}), wt = D({
|
|
484
513
|
parser: "go-template",
|
|
485
514
|
markup: !0
|
|
486
|
-
}),
|
|
487
|
-
[
|
|
515
|
+
}), Tt = "embeddedGoTemplate", Et = ["goTemplate", "gotmpl"], Dt = C(Tt), Ot = w(Tt), kt = {
|
|
516
|
+
[Dt]: {
|
|
488
517
|
category: "Embed",
|
|
489
518
|
type: "string",
|
|
490
519
|
array: !0,
|
|
491
|
-
default: [{ value: [...
|
|
520
|
+
default: [{ value: [...Et] }],
|
|
492
521
|
description: "Block comments that identify embedded Go Template in template literals. Requires the `@htnabe/prettier-plugin-go-template` plugin."
|
|
493
522
|
},
|
|
494
|
-
[
|
|
523
|
+
[Ot]: {
|
|
495
524
|
category: "Embed",
|
|
496
525
|
type: "string",
|
|
497
526
|
array: !0,
|
|
498
|
-
default: [{ value: [...
|
|
527
|
+
default: [{ value: [...Et] }],
|
|
499
528
|
description: "Tags that identify embedded Go Template in template literals. Requires the `@htnabe/prettier-plugin-go-template` plugin."
|
|
500
529
|
}
|
|
501
|
-
},
|
|
502
|
-
embedder: () =>
|
|
503
|
-
language: () =>
|
|
504
|
-
options: () =>
|
|
505
|
-
}),
|
|
506
|
-
[
|
|
530
|
+
}, At = /* @__PURE__ */ l({
|
|
531
|
+
embedder: () => wt,
|
|
532
|
+
language: () => Tt,
|
|
533
|
+
options: () => kt
|
|
534
|
+
}), jt = D({ parser: "graphql" }), A = "embeddedGraphql", Mt = ["graphql", "gql"], Nt = S(A), Pt = C(A), Ft = w(A), It = {
|
|
535
|
+
[Nt]: {
|
|
507
536
|
category: "Embed",
|
|
508
537
|
type: "string",
|
|
509
538
|
array: !0,
|
|
510
|
-
default: [{ value: [...
|
|
539
|
+
default: [{ value: [...Mt] }],
|
|
511
540
|
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded GraphQL language.",
|
|
512
|
-
deprecated: `Please use \`${
|
|
541
|
+
deprecated: `Please use \`${Pt}\` or \`${Ft}\`.`
|
|
513
542
|
},
|
|
514
|
-
[
|
|
543
|
+
[Pt]: {
|
|
515
544
|
category: "Embed",
|
|
516
545
|
type: "string",
|
|
517
546
|
array: !0,
|
|
518
|
-
default: [{ value: [
|
|
547
|
+
default: [{ value: [E] }],
|
|
519
548
|
description: "Block comments that make their subsequent template literals be identified as embedded GraphQL language."
|
|
520
549
|
},
|
|
521
|
-
[
|
|
550
|
+
[Ft]: {
|
|
522
551
|
category: "Embed",
|
|
523
552
|
type: "string",
|
|
524
553
|
array: !0,
|
|
525
|
-
default: [{ value: [
|
|
554
|
+
default: [{ value: [E] }],
|
|
526
555
|
description: "Tags that make their subsequent template literals be identified as embedded GraphQL language."
|
|
527
556
|
}
|
|
528
|
-
},
|
|
529
|
-
embedder: () =>
|
|
530
|
-
language: () =>
|
|
531
|
-
options: () =>
|
|
532
|
-
}),
|
|
557
|
+
}, Lt = /* @__PURE__ */ l({
|
|
558
|
+
embedder: () => jt,
|
|
559
|
+
language: () => A,
|
|
560
|
+
options: () => It
|
|
561
|
+
}), Rt = D({
|
|
533
562
|
parser: "handlebars",
|
|
534
563
|
markup: !0
|
|
535
|
-
}),
|
|
536
|
-
[
|
|
564
|
+
}), zt = "embeddedHandlebars", Bt = ["handlebars", "hbs"], Vt = C(zt), Ht = w(zt), Ut = {
|
|
565
|
+
[Vt]: {
|
|
537
566
|
category: "Embed",
|
|
538
567
|
type: "string",
|
|
539
568
|
array: !0,
|
|
540
|
-
default: [{ value: [...
|
|
569
|
+
default: [{ value: [...Bt] }],
|
|
541
570
|
description: "Block comments that identify embedded Handlebars in template literals. Requires the `@poliklot/prettier-plugin-handlebars` plugin."
|
|
542
571
|
},
|
|
543
|
-
[
|
|
572
|
+
[Ht]: {
|
|
544
573
|
category: "Embed",
|
|
545
574
|
type: "string",
|
|
546
575
|
array: !0,
|
|
547
|
-
default: [{ value: [...
|
|
576
|
+
default: [{ value: [...Bt] }],
|
|
548
577
|
description: "Tags that identify embedded Handlebars in template literals. Requires the `@poliklot/prettier-plugin-handlebars` plugin."
|
|
549
578
|
}
|
|
550
|
-
},
|
|
551
|
-
embedder: () =>
|
|
552
|
-
language: () =>
|
|
553
|
-
options: () =>
|
|
554
|
-
}),
|
|
579
|
+
}, Wt = /* @__PURE__ */ l({
|
|
580
|
+
embedder: () => Rt,
|
|
581
|
+
language: () => zt,
|
|
582
|
+
options: () => Ut
|
|
583
|
+
}), Gt = D({
|
|
555
584
|
parser: "html",
|
|
556
585
|
parserOption: "embeddedHtmlParser",
|
|
557
586
|
markup: !0
|
|
558
|
-
}),
|
|
587
|
+
}), j = "embeddedHtml", Kt = ["html", "xhtml"], qt = [
|
|
559
588
|
"html",
|
|
560
589
|
"vue",
|
|
561
590
|
"angular",
|
|
562
591
|
"lwc"
|
|
563
|
-
],
|
|
564
|
-
[
|
|
592
|
+
], Jt = S(j), Yt = C(j), Xt = w(j), Zt = T(j), Qt = {
|
|
593
|
+
[Jt]: {
|
|
565
594
|
category: "Embed",
|
|
566
595
|
type: "string",
|
|
567
596
|
array: !0,
|
|
568
|
-
default: [{ value: [...
|
|
597
|
+
default: [{ value: [...Kt] }],
|
|
569
598
|
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded HTML language.",
|
|
570
|
-
deprecated: `Please use \`${
|
|
599
|
+
deprecated: `Please use \`${Yt}\` or \`${Xt}\`.`
|
|
571
600
|
},
|
|
572
|
-
[
|
|
601
|
+
[Yt]: {
|
|
573
602
|
category: "Embed",
|
|
574
603
|
type: "string",
|
|
575
604
|
array: !0,
|
|
576
|
-
default: [{ value: [
|
|
605
|
+
default: [{ value: [E] }],
|
|
577
606
|
description: "Block comments that make their subsequent template literals be identified as embedded HTML language."
|
|
578
607
|
},
|
|
579
|
-
[
|
|
608
|
+
[Xt]: {
|
|
580
609
|
category: "Embed",
|
|
581
610
|
type: "string",
|
|
582
611
|
array: !0,
|
|
583
|
-
default: [{ value: [
|
|
612
|
+
default: [{ value: [E] }],
|
|
584
613
|
description: "Tags that make their subsequent template literals be identified as embedded HTML language."
|
|
585
614
|
},
|
|
586
|
-
[
|
|
615
|
+
[Zt]: {
|
|
587
616
|
category: "Embed",
|
|
588
617
|
type: "choice",
|
|
589
618
|
default: "html",
|
|
590
619
|
description: "The parser used to parse the embedded HTML language.",
|
|
591
|
-
choices:
|
|
620
|
+
choices: qt.map((e) => ({
|
|
592
621
|
value: e,
|
|
593
622
|
description: `Use the "${e}" parser.`
|
|
594
623
|
}))
|
|
595
624
|
}
|
|
596
|
-
},
|
|
597
|
-
embedder: () =>
|
|
598
|
-
language: () =>
|
|
599
|
-
options: () =>
|
|
600
|
-
}),
|
|
601
|
-
|
|
602
|
-
newlineHandling: "hardline",
|
|
603
|
-
dedentContent: !0
|
|
604
|
-
}), Bt = "embeddedHugo", Vt = ["hugo", "hugoPost"], Ht = E(Bt), Ut = D(Bt), Wt = {
|
|
605
|
-
[Ht]: {
|
|
625
|
+
}, $t = /* @__PURE__ */ l({
|
|
626
|
+
embedder: () => Gt,
|
|
627
|
+
language: () => j,
|
|
628
|
+
options: () => Qt
|
|
629
|
+
}), en = D({ parser: "hugo-post" }), tn = "embeddedHugo", nn = ["hugo", "hugoPost"], rn = C(tn), an = w(tn), on = {
|
|
630
|
+
[rn]: {
|
|
606
631
|
category: "Embed",
|
|
607
632
|
type: "string",
|
|
608
633
|
array: !0,
|
|
609
|
-
default: [{ value: [...
|
|
634
|
+
default: [{ value: [...nn] }],
|
|
610
635
|
description: "Block comments that identify embedded Hugo in template literals. Requires the `@htnabe/prettier-plugin-hugo-post` plugin."
|
|
611
636
|
},
|
|
612
|
-
[
|
|
637
|
+
[an]: {
|
|
613
638
|
category: "Embed",
|
|
614
639
|
type: "string",
|
|
615
640
|
array: !0,
|
|
616
|
-
default: [{ value: [...
|
|
641
|
+
default: [{ value: [...nn] }],
|
|
617
642
|
description: "Tags that identify embedded Hugo in template literals. Requires the `@htnabe/prettier-plugin-hugo-post` plugin."
|
|
618
643
|
}
|
|
619
|
-
},
|
|
620
|
-
embedder: () =>
|
|
621
|
-
language: () =>
|
|
622
|
-
options: () =>
|
|
623
|
-
}),
|
|
644
|
+
}, sn = /* @__PURE__ */ l({
|
|
645
|
+
embedder: () => en,
|
|
646
|
+
language: () => tn,
|
|
647
|
+
options: () => on
|
|
648
|
+
}), cn = D({ parser: "ini" }), M = "embeddedIni", ln = [
|
|
624
649
|
"ini",
|
|
625
650
|
"cfg",
|
|
626
651
|
"pro"
|
|
627
|
-
],
|
|
628
|
-
[
|
|
652
|
+
], un = S(M), dn = C(M), fn = w(M), pn = {
|
|
653
|
+
[un]: {
|
|
629
654
|
category: "Embed",
|
|
630
655
|
type: "string",
|
|
631
656
|
array: !0,
|
|
632
|
-
default: [{ value: [...
|
|
657
|
+
default: [{ value: [...ln] }],
|
|
633
658
|
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded INI language. This option requires the `prettier-plugin-ini` plugin.",
|
|
634
|
-
deprecated: `Please use \`${
|
|
659
|
+
deprecated: `Please use \`${dn}\` or \`${fn}\`.`
|
|
635
660
|
},
|
|
636
|
-
[
|
|
661
|
+
[dn]: {
|
|
637
662
|
category: "Embed",
|
|
638
663
|
type: "string",
|
|
639
664
|
array: !0,
|
|
640
|
-
default: [{ value: [
|
|
665
|
+
default: [{ value: [E] }],
|
|
641
666
|
description: "Block comments that make their subsequent template literals be identified as embedded INI language. This option requires the `prettier-plugin-ini` plugin."
|
|
642
667
|
},
|
|
643
|
-
[
|
|
668
|
+
[fn]: {
|
|
644
669
|
category: "Embed",
|
|
645
670
|
type: "string",
|
|
646
671
|
array: !0,
|
|
647
|
-
default: [{ value: [
|
|
672
|
+
default: [{ value: [E] }],
|
|
648
673
|
description: "Tags that make their subsequent template literals be identified as embedded INI language. This option requires the `prettier-plugin-ini` plugin."
|
|
649
674
|
}
|
|
650
|
-
},
|
|
651
|
-
embedder: () =>
|
|
652
|
-
language: () =>
|
|
653
|
-
options: () =>
|
|
654
|
-
}),
|
|
655
|
-
|
|
656
|
-
newlineHandling: "hardline"
|
|
657
|
-
}), tn = "embeddedJava", nn = ["java"], rn = T(tn), an = E(tn), on = D(tn), sn = {
|
|
658
|
-
[rn]: {
|
|
675
|
+
}, mn = /* @__PURE__ */ l({
|
|
676
|
+
embedder: () => cn,
|
|
677
|
+
language: () => M,
|
|
678
|
+
options: () => pn
|
|
679
|
+
}), hn = D({ parser: "java" }), N = "embeddedJava", gn = ["java"], _n = S(N), vn = C(N), yn = w(N), bn = {
|
|
680
|
+
[_n]: {
|
|
659
681
|
category: "Embed",
|
|
660
682
|
type: "string",
|
|
661
683
|
array: !0,
|
|
662
|
-
default: [{ value: [...
|
|
684
|
+
default: [{ value: [...gn] }],
|
|
663
685
|
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded Java language. This option requires the `prettier-plugin-java` plugin.",
|
|
664
|
-
deprecated: `Please use \`${
|
|
686
|
+
deprecated: `Please use \`${vn}\` or \`${yn}\`.`
|
|
665
687
|
},
|
|
666
|
-
[
|
|
688
|
+
[vn]: {
|
|
667
689
|
category: "Embed",
|
|
668
690
|
type: "string",
|
|
669
691
|
array: !0,
|
|
670
|
-
default: [{ value: [
|
|
692
|
+
default: [{ value: [E] }],
|
|
671
693
|
description: "Block comments that make their subsequent template literals be identified as embedded Java language. This option requires the `prettier-plugin-java` plugin."
|
|
672
694
|
},
|
|
673
|
-
[
|
|
695
|
+
[yn]: {
|
|
674
696
|
category: "Embed",
|
|
675
697
|
type: "string",
|
|
676
698
|
array: !0,
|
|
677
|
-
default: [{ value: [
|
|
699
|
+
default: [{ value: [E] }],
|
|
678
700
|
description: "Tags that make their subsequent template literals be identified as embedded Java language. This option requires the `prettier-plugin-java` plugin."
|
|
679
701
|
}
|
|
680
|
-
},
|
|
681
|
-
embedder: () =>
|
|
682
|
-
language: () =>
|
|
683
|
-
options: () =>
|
|
684
|
-
}),
|
|
702
|
+
}, xn = /* @__PURE__ */ l({
|
|
703
|
+
embedder: () => hn,
|
|
704
|
+
language: () => N,
|
|
705
|
+
options: () => bn
|
|
706
|
+
}), Sn = D({
|
|
685
707
|
parser: "jinja-template",
|
|
686
|
-
markup: !0
|
|
687
|
-
|
|
688
|
-
}), un = "embeddedJinja", dn = [
|
|
708
|
+
markup: !0
|
|
709
|
+
}), Cn = "embeddedJinja", wn = [
|
|
689
710
|
"jinja",
|
|
690
711
|
"jinja2",
|
|
691
712
|
"j2"
|
|
692
|
-
],
|
|
693
|
-
[
|
|
713
|
+
], Tn = C(Cn), En = w(Cn), Dn = {
|
|
714
|
+
[Tn]: {
|
|
694
715
|
category: "Embed",
|
|
695
716
|
type: "string",
|
|
696
717
|
array: !0,
|
|
697
|
-
default: [{ value: [...
|
|
718
|
+
default: [{ value: [...wn] }],
|
|
698
719
|
description: "Block comments that identify embedded Jinja in template literals. Requires the `prettier-plugin-jinja-template` plugin."
|
|
699
720
|
},
|
|
700
|
-
[
|
|
721
|
+
[En]: {
|
|
701
722
|
category: "Embed",
|
|
702
723
|
type: "string",
|
|
703
724
|
array: !0,
|
|
704
|
-
default: [{ value: [...
|
|
725
|
+
default: [{ value: [...wn] }],
|
|
705
726
|
description: "Tags that identify embedded Jinja in template literals. Requires the `prettier-plugin-jinja-template` plugin."
|
|
706
727
|
}
|
|
707
|
-
},
|
|
708
|
-
embedder: () =>
|
|
709
|
-
language: () =>
|
|
710
|
-
options: () =>
|
|
711
|
-
}),
|
|
728
|
+
}, On = /* @__PURE__ */ l({
|
|
729
|
+
embedder: () => Sn,
|
|
730
|
+
language: () => Cn,
|
|
731
|
+
options: () => Dn
|
|
732
|
+
}), kn = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
|
|
712
733
|
let o = {
|
|
713
734
|
...r,
|
|
714
735
|
...a
|
|
715
|
-
}, { node: s } = n, { createPlaceholder: c, placeholderRegex: l } =
|
|
716
|
-
return x(
|
|
736
|
+
}, { node: s } = n, { createPlaceholder: c, placeholderRegex: l } = An(), { text: u, leadingWhitespaces: d, trailingWhitespaces: f } = y(s, c), p = Ce(n, t);
|
|
737
|
+
return b(x(await e(u, {
|
|
717
738
|
...o,
|
|
718
739
|
parser: o.embeddedJsonParser ?? "json"
|
|
719
740
|
}), l, p), o, i, d, f);
|
|
720
741
|
};
|
|
721
|
-
function
|
|
722
|
-
let e =
|
|
742
|
+
function An() {
|
|
743
|
+
let e = De(), t = De();
|
|
723
744
|
return {
|
|
724
745
|
createPlaceholder: (n) => `'0${e}${n}${t}'`,
|
|
725
746
|
placeholderRegex: RegExp(`["']?0${e}(\\d+)${t}['"]?`, "ig")
|
|
@@ -727,101 +748,101 @@ function _n() {
|
|
|
727
748
|
}
|
|
728
749
|
//#endregion
|
|
729
750
|
//#region src/embedded/json/language.ts
|
|
730
|
-
var
|
|
751
|
+
var P = "embeddedJson", jn = ["json", "jsonl"], Mn = [
|
|
731
752
|
"json",
|
|
732
753
|
"json5",
|
|
733
754
|
"jsonc",
|
|
734
755
|
"json-stringify"
|
|
735
|
-
],
|
|
736
|
-
[
|
|
756
|
+
], Nn = S(P), Pn = C(P), Fn = w(P), In = T(P), Ln = {
|
|
757
|
+
[Nn]: {
|
|
737
758
|
category: "Embed",
|
|
738
759
|
type: "string",
|
|
739
760
|
array: !0,
|
|
740
|
-
default: [{ value: [...
|
|
761
|
+
default: [{ value: [...jn] }],
|
|
741
762
|
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded JSON language.",
|
|
742
|
-
deprecated: `Please use \`${
|
|
763
|
+
deprecated: `Please use \`${Pn}\` or \`${Fn}\`.`
|
|
743
764
|
},
|
|
744
|
-
[
|
|
765
|
+
[Pn]: {
|
|
745
766
|
category: "Embed",
|
|
746
767
|
type: "string",
|
|
747
768
|
array: !0,
|
|
748
|
-
default: [{ value: [
|
|
769
|
+
default: [{ value: [E] }],
|
|
749
770
|
description: "Block comments that make their subsequent template literals be identified as embedded JSON language."
|
|
750
771
|
},
|
|
751
|
-
[
|
|
772
|
+
[Fn]: {
|
|
752
773
|
category: "Embed",
|
|
753
774
|
type: "string",
|
|
754
775
|
array: !0,
|
|
755
|
-
default: [{ value: [
|
|
776
|
+
default: [{ value: [E] }],
|
|
756
777
|
description: "Tags that make their subsequent template literals be identified as embedded JSON language."
|
|
757
778
|
},
|
|
758
|
-
[
|
|
779
|
+
[In]: {
|
|
759
780
|
category: "Embed",
|
|
760
781
|
type: "choice",
|
|
761
782
|
default: "json",
|
|
762
783
|
description: "The parser used to parse the embedded JSON language.",
|
|
763
|
-
choices:
|
|
784
|
+
choices: Mn.map((e) => ({
|
|
764
785
|
value: e,
|
|
765
786
|
description: `Use the "${e}" parser.`
|
|
766
787
|
}))
|
|
767
788
|
}
|
|
768
|
-
},
|
|
769
|
-
embedder: () =>
|
|
770
|
-
language: () =>
|
|
771
|
-
options: () =>
|
|
772
|
-
}),
|
|
789
|
+
}, Rn = /* @__PURE__ */ l({
|
|
790
|
+
embedder: () => kn,
|
|
791
|
+
language: () => P,
|
|
792
|
+
options: () => Ln
|
|
793
|
+
}), zn = D({
|
|
773
794
|
parser: "JSONata",
|
|
774
795
|
placeholderPrefix: "$p"
|
|
775
|
-
}),
|
|
776
|
-
[
|
|
796
|
+
}), F = "embeddedJsonata", Bn = ["jsonata"], Vn = S(F), Hn = C(F), Un = w(F), Wn = {
|
|
797
|
+
[Vn]: {
|
|
777
798
|
category: "Embed",
|
|
778
799
|
type: "string",
|
|
779
800
|
array: !0,
|
|
780
|
-
default: [{ value: [...
|
|
801
|
+
default: [{ value: [...Bn] }],
|
|
781
802
|
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded JSONata language. This option requires the `@stedi/prettier-plugin-jsonata` plugin.",
|
|
782
|
-
deprecated: `Please use \`${
|
|
803
|
+
deprecated: `Please use \`${Hn}\` or \`${Un}\`.`
|
|
783
804
|
},
|
|
784
|
-
[
|
|
805
|
+
[Hn]: {
|
|
785
806
|
category: "Embed",
|
|
786
807
|
type: "string",
|
|
787
808
|
array: !0,
|
|
788
|
-
default: [{ value: [
|
|
809
|
+
default: [{ value: [E] }],
|
|
789
810
|
description: "Block comments that make their subsequent template literals be identified as embedded JSONata language. This option requires the `@stedi/prettier-plugin-jsonata` plugin."
|
|
790
811
|
},
|
|
791
|
-
[
|
|
812
|
+
[Un]: {
|
|
792
813
|
category: "Embed",
|
|
793
814
|
type: "string",
|
|
794
815
|
array: !0,
|
|
795
|
-
default: [{ value: [
|
|
816
|
+
default: [{ value: [E] }],
|
|
796
817
|
description: "Tags that make their subsequent template literals be identified as embedded JSONata language. This option requires the `@stedi/prettier-plugin-jsonata` plugin."
|
|
797
818
|
}
|
|
798
|
-
},
|
|
799
|
-
embedder: () =>
|
|
800
|
-
language: () =>
|
|
801
|
-
options: () =>
|
|
802
|
-
}),
|
|
819
|
+
}, Gn = /* @__PURE__ */ l({
|
|
820
|
+
embedder: () => zn,
|
|
821
|
+
language: () => F,
|
|
822
|
+
options: () => Wn
|
|
823
|
+
}), Kn = D({
|
|
803
824
|
parser: "jte",
|
|
804
825
|
markup: !0
|
|
805
|
-
}),
|
|
806
|
-
[
|
|
826
|
+
}), qn = "embeddedJte", Jn = ["jte"], Yn = C(qn), Xn = w(qn), Zn = {
|
|
827
|
+
[Yn]: {
|
|
807
828
|
category: "Embed",
|
|
808
829
|
type: "string",
|
|
809
830
|
array: !0,
|
|
810
|
-
default: [{ value: [...
|
|
831
|
+
default: [{ value: [...Jn] }],
|
|
811
832
|
description: "Block comments that identify embedded JTE in template literals. Requires the `prettier-plugin-jte` plugin."
|
|
812
833
|
},
|
|
813
|
-
[
|
|
834
|
+
[Xn]: {
|
|
814
835
|
category: "Embed",
|
|
815
836
|
type: "string",
|
|
816
837
|
array: !0,
|
|
817
|
-
default: [{ value: [...
|
|
838
|
+
default: [{ value: [...Jn] }],
|
|
818
839
|
description: "Tags that identify embedded JTE in template literals. Requires the `prettier-plugin-jte` plugin."
|
|
819
840
|
}
|
|
820
|
-
},
|
|
821
|
-
embedder: () =>
|
|
822
|
-
language: () =>
|
|
823
|
-
options: () =>
|
|
824
|
-
}),
|
|
841
|
+
}, Qn = /* @__PURE__ */ l({
|
|
842
|
+
embedder: () => Kn,
|
|
843
|
+
language: () => qn,
|
|
844
|
+
options: () => Zn
|
|
845
|
+
}), $n = D({ parser: "latex-parser" }), I = "embeddedLatex", er = [
|
|
825
846
|
"latex",
|
|
826
847
|
"tex",
|
|
827
848
|
"aux",
|
|
@@ -830,537 +851,500 @@ var F = "embeddedJson", vn = ["json", "jsonl"], yn = [
|
|
|
830
851
|
"bib",
|
|
831
852
|
"toc",
|
|
832
853
|
"sty"
|
|
833
|
-
],
|
|
834
|
-
[
|
|
854
|
+
], tr = S(I), nr = C(I), rr = w(I), ir = {
|
|
855
|
+
[tr]: {
|
|
835
856
|
category: "Embed",
|
|
836
857
|
type: "string",
|
|
837
858
|
array: !0,
|
|
838
|
-
default: [{ value: [...
|
|
859
|
+
default: [{ value: [...er] }],
|
|
839
860
|
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded LaTeX language. This option requires the `prettier-plugin-latex` plugin.",
|
|
840
|
-
deprecated: `Please use \`${
|
|
861
|
+
deprecated: `Please use \`${nr}\` or \`${rr}\`.`
|
|
841
862
|
},
|
|
842
|
-
[
|
|
863
|
+
[nr]: {
|
|
843
864
|
category: "Embed",
|
|
844
865
|
type: "string",
|
|
845
866
|
array: !0,
|
|
846
|
-
default: [{ value: [
|
|
867
|
+
default: [{ value: [E] }],
|
|
847
868
|
description: "Block comments that make their subsequent template literals be identified as embedded LaTeX language. This option requires the `prettier-plugin-latex` plugin."
|
|
848
869
|
},
|
|
849
|
-
[
|
|
870
|
+
[rr]: {
|
|
850
871
|
category: "Embed",
|
|
851
872
|
type: "string",
|
|
852
873
|
array: !0,
|
|
853
|
-
default: [{ value: [
|
|
874
|
+
default: [{ value: [E] }],
|
|
854
875
|
description: "Tags that make their subsequent template literals be identified as embedded LaTeX language. This option requires the `prettier-plugin-latex` plugin."
|
|
855
876
|
}
|
|
856
|
-
},
|
|
857
|
-
embedder: () =>
|
|
858
|
-
language: () =>
|
|
859
|
-
options: () =>
|
|
860
|
-
}),
|
|
877
|
+
}, ar = /* @__PURE__ */ l({
|
|
878
|
+
embedder: () => $n,
|
|
879
|
+
language: () => I,
|
|
880
|
+
options: () => ir
|
|
881
|
+
}), or = D({
|
|
861
882
|
parser: "liquid-html",
|
|
862
883
|
markup: !0
|
|
863
|
-
}),
|
|
864
|
-
[
|
|
884
|
+
}), sr = "embeddedLiquid", cr = ["liquid"], lr = C(sr), ur = w(sr), dr = {
|
|
885
|
+
[lr]: {
|
|
865
886
|
category: "Embed",
|
|
866
887
|
type: "string",
|
|
867
888
|
array: !0,
|
|
868
|
-
default: [{ value: [...
|
|
889
|
+
default: [{ value: [...cr] }],
|
|
869
890
|
description: "Block comments that identify embedded Liquid in template literals. Requires the `@shopify/prettier-plugin-liquid` plugin."
|
|
870
891
|
},
|
|
871
|
-
[
|
|
892
|
+
[ur]: {
|
|
872
893
|
category: "Embed",
|
|
873
894
|
type: "string",
|
|
874
895
|
array: !0,
|
|
875
|
-
default: [{ value: [...
|
|
896
|
+
default: [{ value: [...cr] }],
|
|
876
897
|
description: "Tags that identify embedded Liquid in template literals. Requires the `@shopify/prettier-plugin-liquid` plugin."
|
|
877
898
|
}
|
|
878
|
-
},
|
|
879
|
-
embedder: () =>
|
|
880
|
-
language: () =>
|
|
881
|
-
options: () =>
|
|
882
|
-
}),
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
...o,
|
|
888
|
-
parser: o.embeddedMarkdownParser ?? "markdown",
|
|
889
|
-
__inJsTemplate: !0
|
|
890
|
-
}), l, p, "hardline");
|
|
891
|
-
if (o.preserveEmbeddedExteriorWhitespaces?.includes(i)) return R([
|
|
892
|
-
"`",
|
|
893
|
-
d,
|
|
894
|
-
o.noEmbeddedMultiLineIndentation?.includes(i) ? rr(R(m)) : tr([R(m)]),
|
|
895
|
-
f,
|
|
896
|
-
"`"
|
|
897
|
-
]);
|
|
898
|
-
let g = d.length ? er : nr, ee = f.length ? er : nr;
|
|
899
|
-
return o.noEmbeddedMultiLineIndentation?.includes(i) ? [
|
|
900
|
-
"`",
|
|
901
|
-
ir,
|
|
902
|
-
rr(m),
|
|
903
|
-
nr,
|
|
904
|
-
"`"
|
|
905
|
-
] : R([
|
|
906
|
-
"`",
|
|
907
|
-
tr([g, R(m)]),
|
|
908
|
-
ee,
|
|
909
|
-
"`"
|
|
910
|
-
]);
|
|
911
|
-
}, z = "embeddedMarkdown", or = ["md", "markdown"], sr = [
|
|
899
|
+
}, fr = /* @__PURE__ */ l({
|
|
900
|
+
embedder: () => or,
|
|
901
|
+
language: () => sr,
|
|
902
|
+
options: () => dr
|
|
903
|
+
}), pr = D({
|
|
904
|
+
parser: "markdown",
|
|
905
|
+
parserOption: "embeddedMarkdownParser",
|
|
906
|
+
parserOptions: { __inJsTemplate: !0 }
|
|
907
|
+
}), L = "embeddedMarkdown", mr = ["md", "markdown"], hr = [
|
|
912
908
|
"markdown",
|
|
913
909
|
"mdx",
|
|
914
910
|
"remark"
|
|
915
|
-
],
|
|
916
|
-
[
|
|
911
|
+
], gr = S(L), _r = C(L), vr = w(L), yr = T(L), br = {
|
|
912
|
+
[gr]: {
|
|
917
913
|
category: "Embed",
|
|
918
914
|
type: "string",
|
|
919
915
|
array: !0,
|
|
920
|
-
default: [{ value: [...
|
|
916
|
+
default: [{ value: [...mr] }],
|
|
921
917
|
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded Markdown language.",
|
|
922
|
-
deprecated: `Please use \`${
|
|
918
|
+
deprecated: `Please use \`${_r}\` or \`${vr}\`.`
|
|
923
919
|
},
|
|
924
|
-
[
|
|
920
|
+
[_r]: {
|
|
925
921
|
category: "Embed",
|
|
926
922
|
type: "string",
|
|
927
923
|
array: !0,
|
|
928
|
-
default: [{ value: [
|
|
924
|
+
default: [{ value: [E] }],
|
|
929
925
|
description: "Block comments that make their subsequent template literals be identified as embedded Markdown language."
|
|
930
926
|
},
|
|
931
|
-
[
|
|
927
|
+
[vr]: {
|
|
932
928
|
category: "Embed",
|
|
933
929
|
type: "string",
|
|
934
930
|
array: !0,
|
|
935
|
-
default: [{ value: [
|
|
931
|
+
default: [{ value: [E] }],
|
|
936
932
|
description: "Tags that make their subsequent template literals be identified as embedded Markdown language."
|
|
937
933
|
},
|
|
938
|
-
[
|
|
934
|
+
[yr]: {
|
|
939
935
|
category: "Embed",
|
|
940
936
|
type: "choice",
|
|
941
937
|
default: "markdown",
|
|
942
938
|
description: "The parser used to parse the embedded Markdown language.",
|
|
943
|
-
choices:
|
|
939
|
+
choices: hr.map((e) => ({
|
|
944
940
|
value: e,
|
|
945
941
|
description: `Use the "${e}" parser.`
|
|
946
942
|
}))
|
|
947
943
|
}
|
|
948
|
-
},
|
|
949
|
-
embedder: () =>
|
|
950
|
-
language: () =>
|
|
951
|
-
options: () =>
|
|
952
|
-
}),
|
|
944
|
+
}, xr = /* @__PURE__ */ l({
|
|
945
|
+
embedder: () => pr,
|
|
946
|
+
language: () => L,
|
|
947
|
+
options: () => br
|
|
948
|
+
}), Sr = D({
|
|
953
949
|
parser: "marko",
|
|
954
950
|
markup: !0
|
|
955
|
-
}),
|
|
956
|
-
[
|
|
951
|
+
}), Cr = "embeddedMarko", wr = ["marko"], Tr = C(Cr), Er = w(Cr), Dr = {
|
|
952
|
+
[Tr]: {
|
|
957
953
|
category: "Embed",
|
|
958
954
|
type: "string",
|
|
959
955
|
array: !0,
|
|
960
|
-
default: [{ value: [...
|
|
956
|
+
default: [{ value: [...wr] }],
|
|
961
957
|
description: "Block comments that identify embedded Marko in template literals. Requires the `prettier-plugin-marko` plugin."
|
|
962
958
|
},
|
|
963
|
-
[
|
|
959
|
+
[Er]: {
|
|
964
960
|
category: "Embed",
|
|
965
961
|
type: "string",
|
|
966
962
|
array: !0,
|
|
967
|
-
default: [{ value: [...
|
|
963
|
+
default: [{ value: [...wr] }],
|
|
968
964
|
description: "Tags that identify embedded Marko in template literals. Requires the `prettier-plugin-marko` plugin."
|
|
969
965
|
}
|
|
970
|
-
},
|
|
971
|
-
embedder: () =>
|
|
972
|
-
language: () =>
|
|
973
|
-
options: () =>
|
|
974
|
-
}),
|
|
966
|
+
}, Or = /* @__PURE__ */ l({
|
|
967
|
+
embedder: () => Sr,
|
|
968
|
+
language: () => Cr,
|
|
969
|
+
options: () => Dr
|
|
970
|
+
}), kr = D({
|
|
975
971
|
parser: "motoko-tt-parse",
|
|
976
|
-
transformDoc:
|
|
972
|
+
transformDoc: Ar
|
|
977
973
|
});
|
|
978
|
-
function
|
|
974
|
+
function Ar(e) {
|
|
979
975
|
if (!Array.isArray(e)) return e;
|
|
980
976
|
let t = e.at(-1);
|
|
981
977
|
return t && !Array.isArray(t) && typeof t == "object" && t.type === "line" && t.hard && t.literal ? e.slice(0, -1) : e;
|
|
982
978
|
}
|
|
983
979
|
//#endregion
|
|
984
980
|
//#region src/embedded/motoko/language.ts
|
|
985
|
-
var
|
|
986
|
-
[
|
|
981
|
+
var jr = "embeddedMotoko", Mr = ["motoko", "mo"], Nr = C(jr), Pr = w(jr), Fr = {
|
|
982
|
+
[Nr]: {
|
|
987
983
|
category: "Embed",
|
|
988
984
|
type: "string",
|
|
989
985
|
array: !0,
|
|
990
|
-
default: [{ value: [...
|
|
986
|
+
default: [{ value: [...Mr] }],
|
|
991
987
|
description: "Block comments that identify embedded Motoko in template literals. Requires the `prettier-plugin-motoko` plugin."
|
|
992
988
|
},
|
|
993
|
-
[
|
|
989
|
+
[Pr]: {
|
|
994
990
|
category: "Embed",
|
|
995
991
|
type: "string",
|
|
996
992
|
array: !0,
|
|
997
|
-
default: [{ value: [...
|
|
993
|
+
default: [{ value: [...Mr] }],
|
|
998
994
|
description: "Tags that identify embedded Motoko in template literals. Requires the `prettier-plugin-motoko` plugin."
|
|
999
995
|
}
|
|
1000
|
-
},
|
|
1001
|
-
embedder: () =>
|
|
1002
|
-
language: () =>
|
|
1003
|
-
options: () =>
|
|
1004
|
-
}),
|
|
996
|
+
}, Ir = /* @__PURE__ */ l({
|
|
997
|
+
embedder: () => kr,
|
|
998
|
+
language: () => jr,
|
|
999
|
+
options: () => Fr
|
|
1000
|
+
}), Lr = D({
|
|
1005
1001
|
parser: "mustache",
|
|
1006
1002
|
markup: !0
|
|
1007
|
-
}),
|
|
1008
|
-
[
|
|
1003
|
+
}), Rr = "embeddedMustache", zr = ["mustache"], Br = C(Rr), Vr = w(Rr), Hr = {
|
|
1004
|
+
[Br]: {
|
|
1009
1005
|
category: "Embed",
|
|
1010
1006
|
type: "string",
|
|
1011
1007
|
array: !0,
|
|
1012
|
-
default: [{ value: [...
|
|
1008
|
+
default: [{ value: [...zr] }],
|
|
1013
1009
|
description: "Block comments that identify embedded Mustache in template literals. Requires the `prettier-plugin-mustache` plugin."
|
|
1014
1010
|
},
|
|
1015
|
-
[
|
|
1011
|
+
[Vr]: {
|
|
1016
1012
|
category: "Embed",
|
|
1017
1013
|
type: "string",
|
|
1018
1014
|
array: !0,
|
|
1019
|
-
default: [{ value: [...
|
|
1015
|
+
default: [{ value: [...zr] }],
|
|
1020
1016
|
description: "Tags that identify embedded Mustache in template literals. Requires the `prettier-plugin-mustache` plugin."
|
|
1021
1017
|
}
|
|
1022
|
-
},
|
|
1023
|
-
embedder: () =>
|
|
1024
|
-
language: () =>
|
|
1025
|
-
options: () =>
|
|
1026
|
-
}),
|
|
1027
|
-
[
|
|
1018
|
+
}, Ur = /* @__PURE__ */ l({
|
|
1019
|
+
embedder: () => Lr,
|
|
1020
|
+
language: () => Rr,
|
|
1021
|
+
options: () => Hr
|
|
1022
|
+
}), Wr = D({ parser: "nginx" }), R = "embeddedNginx", Gr = ["nginx"], Kr = S(R), qr = C(R), Jr = w(R), Yr = {
|
|
1023
|
+
[Kr]: {
|
|
1028
1024
|
category: "Embed",
|
|
1029
1025
|
type: "string",
|
|
1030
1026
|
array: !0,
|
|
1031
|
-
default: [{ value: [...
|
|
1027
|
+
default: [{ value: [...Gr] }],
|
|
1032
1028
|
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded NGINX language. This option requires the `prettier-plugin-nginx` plugin.",
|
|
1033
|
-
deprecated: `Please use \`${
|
|
1029
|
+
deprecated: `Please use \`${qr}\` or \`${Jr}\`.`
|
|
1034
1030
|
},
|
|
1035
|
-
[
|
|
1031
|
+
[qr]: {
|
|
1036
1032
|
category: "Embed",
|
|
1037
1033
|
type: "string",
|
|
1038
1034
|
array: !0,
|
|
1039
|
-
default: [{ value: [
|
|
1035
|
+
default: [{ value: [E] }],
|
|
1040
1036
|
description: "Block comments that make their subsequent template literals be identified as embedded NGINX language. This option requires the `prettier-plugin-nginx` plugin."
|
|
1041
1037
|
},
|
|
1042
|
-
[
|
|
1038
|
+
[Jr]: {
|
|
1043
1039
|
category: "Embed",
|
|
1044
1040
|
type: "string",
|
|
1045
1041
|
array: !0,
|
|
1046
|
-
default: [{ value: [
|
|
1042
|
+
default: [{ value: [E] }],
|
|
1047
1043
|
description: "Tags that make their subsequent template literals be identified as embedded NGINX language. This option requires the `prettier-plugin-nginx` plugin."
|
|
1048
1044
|
}
|
|
1049
|
-
},
|
|
1050
|
-
embedder: () =>
|
|
1051
|
-
language: () =>
|
|
1052
|
-
options: () =>
|
|
1053
|
-
}),
|
|
1054
|
-
[
|
|
1045
|
+
}, Xr = /* @__PURE__ */ l({
|
|
1046
|
+
embedder: () => Wr,
|
|
1047
|
+
language: () => R,
|
|
1048
|
+
options: () => Yr
|
|
1049
|
+
}), z = "embeddedNoop", Zr = S(z), Qr = C(z), $r = w(z), ei = {
|
|
1050
|
+
[Zr]: {
|
|
1055
1051
|
category: "Embed",
|
|
1056
1052
|
type: "string",
|
|
1057
1053
|
array: !0,
|
|
1058
1054
|
default: [{ value: [] }],
|
|
1059
1055
|
description: "Tag or comment identifiers that prevent their subsequent template literals from being identified as embedded languages and thus from being formatted.",
|
|
1060
|
-
deprecated: `Please use \`${
|
|
1056
|
+
deprecated: `Please use \`${Qr}\` or \`${$r}\`.`
|
|
1061
1057
|
},
|
|
1062
|
-
[
|
|
1058
|
+
[Qr]: {
|
|
1063
1059
|
category: "Embed",
|
|
1064
1060
|
type: "string",
|
|
1065
1061
|
array: !0,
|
|
1066
|
-
default: [{ value: [
|
|
1062
|
+
default: [{ value: [E] }],
|
|
1067
1063
|
description: "Block comments that prevent their subsequent template literals from being identified as embedded languages and thus from being formatted."
|
|
1068
1064
|
},
|
|
1069
|
-
[
|
|
1065
|
+
[$r]: {
|
|
1070
1066
|
category: "Embed",
|
|
1071
1067
|
type: "string",
|
|
1072
1068
|
array: !0,
|
|
1073
|
-
default: [{ value: [
|
|
1069
|
+
default: [{ value: [E] }],
|
|
1074
1070
|
description: "Tags that prevent their subsequent template literals from being identified as embedded languages and thus from being formatted."
|
|
1075
1071
|
}
|
|
1076
|
-
},
|
|
1077
|
-
language: () =>
|
|
1078
|
-
options: () =>
|
|
1079
|
-
}),
|
|
1072
|
+
}, ti = /* @__PURE__ */ l({
|
|
1073
|
+
language: () => z,
|
|
1074
|
+
options: () => ei
|
|
1075
|
+
}), ni = D({
|
|
1080
1076
|
parser: "nunjucks",
|
|
1081
1077
|
markup: !0
|
|
1082
|
-
}),
|
|
1083
|
-
[
|
|
1078
|
+
}), ri = "embeddedNunjucks", ii = ["nunjucks", "njk"], ai = C(ri), oi = w(ri), si = {
|
|
1079
|
+
[ai]: {
|
|
1084
1080
|
category: "Embed",
|
|
1085
1081
|
type: "string",
|
|
1086
1082
|
array: !0,
|
|
1087
|
-
default: [{ value: [...
|
|
1083
|
+
default: [{ value: [...ii] }],
|
|
1088
1084
|
description: "Block comments that identify embedded Nunjucks in template literals. Requires the `prettier-plugin-nunjucks` plugin."
|
|
1089
1085
|
},
|
|
1090
|
-
[
|
|
1086
|
+
[oi]: {
|
|
1091
1087
|
category: "Embed",
|
|
1092
1088
|
type: "string",
|
|
1093
1089
|
array: !0,
|
|
1094
|
-
default: [{ value: [...
|
|
1090
|
+
default: [{ value: [...ii] }],
|
|
1095
1091
|
description: "Tags that identify embedded Nunjucks in template literals. Requires the `prettier-plugin-nunjucks` plugin."
|
|
1096
1092
|
}
|
|
1097
|
-
},
|
|
1098
|
-
embedder: () =>
|
|
1099
|
-
language: () =>
|
|
1100
|
-
options: () =>
|
|
1101
|
-
}),
|
|
1093
|
+
}, ci = /* @__PURE__ */ l({
|
|
1094
|
+
embedder: () => ni,
|
|
1095
|
+
language: () => ri,
|
|
1096
|
+
options: () => si
|
|
1097
|
+
}), li = D({ parser: "pegjs-parser" }), B = "embeddedPegjs", ui = [
|
|
1102
1098
|
"pegjs",
|
|
1103
1099
|
"peggy",
|
|
1104
1100
|
"peg"
|
|
1105
|
-
],
|
|
1106
|
-
[
|
|
1101
|
+
], di = S(B), fi = C(B), pi = w(B), mi = {
|
|
1102
|
+
[di]: {
|
|
1107
1103
|
category: "Embed",
|
|
1108
1104
|
type: "string",
|
|
1109
1105
|
array: !0,
|
|
1110
|
-
default: [{ value: [...
|
|
1106
|
+
default: [{ value: [...ui] }],
|
|
1111
1107
|
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded Pegjs language. This option requires the `prettier-plugin-pegjs` plugin.",
|
|
1112
|
-
deprecated: `Please use \`${
|
|
1108
|
+
deprecated: `Please use \`${fi}\` or \`${pi}\`.`
|
|
1113
1109
|
},
|
|
1114
|
-
[
|
|
1110
|
+
[fi]: {
|
|
1115
1111
|
category: "Embed",
|
|
1116
1112
|
type: "string",
|
|
1117
1113
|
array: !0,
|
|
1118
|
-
default: [{ value: [
|
|
1114
|
+
default: [{ value: [E] }],
|
|
1119
1115
|
description: "Block comments that make their subsequent template literals be identified as embedded Pegjs language. This option requires the `prettier-plugin-pegjs` plugin."
|
|
1120
1116
|
},
|
|
1121
|
-
[
|
|
1117
|
+
[pi]: {
|
|
1122
1118
|
category: "Embed",
|
|
1123
1119
|
type: "string",
|
|
1124
1120
|
array: !0,
|
|
1125
|
-
default: [{ value: [
|
|
1121
|
+
default: [{ value: [E] }],
|
|
1126
1122
|
description: "Tags that make their subsequent template literals be identified as embedded Pegjs language. This option requires the `prettier-plugin-pegjs` plugin."
|
|
1127
1123
|
}
|
|
1128
|
-
},
|
|
1129
|
-
embedder: () =>
|
|
1130
|
-
language: () =>
|
|
1131
|
-
options: () =>
|
|
1132
|
-
}),
|
|
1124
|
+
}, hi = /* @__PURE__ */ l({
|
|
1125
|
+
embedder: () => li,
|
|
1126
|
+
language: () => B,
|
|
1127
|
+
options: () => mi
|
|
1128
|
+
}), gi = D({
|
|
1133
1129
|
parser: "php",
|
|
1134
1130
|
placeholderPrefix: "$p"
|
|
1135
|
-
}),
|
|
1136
|
-
[
|
|
1131
|
+
}), V = "embeddedPhp", _i = ["php", "php5"], vi = S(V), yi = C(V), bi = w(V), xi = {
|
|
1132
|
+
[vi]: {
|
|
1137
1133
|
category: "Embed",
|
|
1138
1134
|
type: "string",
|
|
1139
1135
|
array: !0,
|
|
1140
|
-
default: [{ value: [...
|
|
1136
|
+
default: [{ value: [..._i] }],
|
|
1141
1137
|
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded PHP language. This option requires the `@prettier/plugin-php` plugin.",
|
|
1142
|
-
deprecated: `Please use \`${
|
|
1143
|
-
},
|
|
1144
|
-
[fi]: {
|
|
1145
|
-
category: "Embed",
|
|
1146
|
-
type: "string",
|
|
1147
|
-
array: !0,
|
|
1148
|
-
default: [{ value: [k] }],
|
|
1149
|
-
description: "Block comments that make their subsequent template literals be identified as embedded PHP language. This option requires the `@prettier/plugin-php` plugin."
|
|
1138
|
+
deprecated: `Please use \`${yi}\` or \`${bi}\`.`
|
|
1150
1139
|
},
|
|
1151
|
-
[pi]: {
|
|
1152
|
-
category: "Embed",
|
|
1153
|
-
type: "string",
|
|
1154
|
-
array: !0,
|
|
1155
|
-
default: [{ value: [k] }],
|
|
1156
|
-
description: "Tags that make their subsequent template literals be identified as embedded PHP language. This option requires the `@prettier/plugin-php` plugin."
|
|
1157
|
-
}
|
|
1158
|
-
}, hi = /* @__PURE__ */ l({
|
|
1159
|
-
embedder: () => li,
|
|
1160
|
-
language: () => H,
|
|
1161
|
-
options: () => mi
|
|
1162
|
-
}), gi = A({
|
|
1163
|
-
parser: "powershell",
|
|
1164
|
-
newlineHandling: "hardline"
|
|
1165
|
-
}), _i = "embeddedPowerShell", vi = ["powershell", "ps1"], yi = E(_i), bi = D(_i), xi = {
|
|
1166
1140
|
[yi]: {
|
|
1167
1141
|
category: "Embed",
|
|
1168
1142
|
type: "string",
|
|
1169
1143
|
array: !0,
|
|
1170
|
-
default: [{ value: [
|
|
1171
|
-
description: "Block comments that
|
|
1144
|
+
default: [{ value: [E] }],
|
|
1145
|
+
description: "Block comments that make their subsequent template literals be identified as embedded PHP language. This option requires the `@prettier/plugin-php` plugin."
|
|
1172
1146
|
},
|
|
1173
1147
|
[bi]: {
|
|
1174
1148
|
category: "Embed",
|
|
1175
1149
|
type: "string",
|
|
1176
1150
|
array: !0,
|
|
1177
|
-
default: [{ value: [
|
|
1178
|
-
description: "Tags that
|
|
1151
|
+
default: [{ value: [E] }],
|
|
1152
|
+
description: "Tags that make their subsequent template literals be identified as embedded PHP language. This option requires the `@prettier/plugin-php` plugin."
|
|
1179
1153
|
}
|
|
1180
1154
|
}, Si = /* @__PURE__ */ l({
|
|
1181
1155
|
embedder: () => gi,
|
|
1182
|
-
language: () =>
|
|
1156
|
+
language: () => V,
|
|
1183
1157
|
options: () => xi
|
|
1184
|
-
}), Ci =
|
|
1185
|
-
parser: "prisma-parse",
|
|
1186
|
-
newlineHandling: "hardline"
|
|
1187
|
-
}), U = "embeddedPrisma", wi = ["prisma"], Ti = T(U), Ei = E(U), Di = D(U), Oi = {
|
|
1188
|
-
[Ti]: {
|
|
1189
|
-
category: "Embed",
|
|
1190
|
-
type: "string",
|
|
1191
|
-
array: !0,
|
|
1192
|
-
default: [{ value: [...wi] }],
|
|
1193
|
-
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded Prisma language. This option requires the `prettier-plugin-prisma` plugin.",
|
|
1194
|
-
deprecated: `Please use \`${Ei}\` or \`${Di}\`.`
|
|
1195
|
-
},
|
|
1158
|
+
}), Ci = D({ parser: "powershell" }), wi = "embeddedPowerShell", Ti = ["powershell", "ps1"], Ei = C(wi), Di = w(wi), Oi = {
|
|
1196
1159
|
[Ei]: {
|
|
1197
1160
|
category: "Embed",
|
|
1198
1161
|
type: "string",
|
|
1199
1162
|
array: !0,
|
|
1200
|
-
default: [{ value: [
|
|
1201
|
-
description: "Block comments that
|
|
1163
|
+
default: [{ value: [...Ti] }],
|
|
1164
|
+
description: "Block comments that identify embedded PowerShell in template literals. Requires the `prettier-plugin-powershell` plugin."
|
|
1202
1165
|
},
|
|
1203
1166
|
[Di]: {
|
|
1204
1167
|
category: "Embed",
|
|
1205
1168
|
type: "string",
|
|
1206
1169
|
array: !0,
|
|
1207
|
-
default: [{ value: [
|
|
1208
|
-
description: "Tags that
|
|
1170
|
+
default: [{ value: [...Ti] }],
|
|
1171
|
+
description: "Tags that identify embedded PowerShell in template literals. Requires the `prettier-plugin-powershell` plugin."
|
|
1209
1172
|
}
|
|
1210
1173
|
}, ki = /* @__PURE__ */ l({
|
|
1211
1174
|
embedder: () => Ci,
|
|
1212
|
-
language: () =>
|
|
1175
|
+
language: () => wi,
|
|
1213
1176
|
options: () => Oi
|
|
1214
|
-
}), Ai =
|
|
1177
|
+
}), Ai = D({ parser: "prisma-parse" }), H = "embeddedPrisma", ji = ["prisma"], Mi = S(H), Ni = C(H), Pi = w(H), Fi = {
|
|
1215
1178
|
[Mi]: {
|
|
1216
1179
|
category: "Embed",
|
|
1217
1180
|
type: "string",
|
|
1218
1181
|
array: !0,
|
|
1219
1182
|
default: [{ value: [...ji] }],
|
|
1220
|
-
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded
|
|
1183
|
+
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded Prisma language. This option requires the `prettier-plugin-prisma` plugin.",
|
|
1221
1184
|
deprecated: `Please use \`${Ni}\` or \`${Pi}\`.`
|
|
1222
1185
|
},
|
|
1223
1186
|
[Ni]: {
|
|
1224
1187
|
category: "Embed",
|
|
1225
1188
|
type: "string",
|
|
1226
1189
|
array: !0,
|
|
1227
|
-
default: [{ value: [
|
|
1228
|
-
description: "Block comments that make their subsequent template literals be identified as embedded
|
|
1190
|
+
default: [{ value: [E] }],
|
|
1191
|
+
description: "Block comments that make their subsequent template literals be identified as embedded Prisma language. This option requires the `prettier-plugin-prisma` plugin."
|
|
1229
1192
|
},
|
|
1230
1193
|
[Pi]: {
|
|
1231
1194
|
category: "Embed",
|
|
1232
1195
|
type: "string",
|
|
1233
1196
|
array: !0,
|
|
1234
|
-
default: [{ value: [
|
|
1235
|
-
description: "Tags that make their subsequent template literals be identified as embedded
|
|
1197
|
+
default: [{ value: [E] }],
|
|
1198
|
+
description: "Tags that make their subsequent template literals be identified as embedded Prisma language. This option requires the `prettier-plugin-prisma` plugin."
|
|
1236
1199
|
}
|
|
1237
1200
|
}, Ii = /* @__PURE__ */ l({
|
|
1238
1201
|
embedder: () => Ai,
|
|
1239
|
-
language: () =>
|
|
1202
|
+
language: () => H,
|
|
1240
1203
|
options: () => Fi
|
|
1241
|
-
}), Li =
|
|
1242
|
-
parser: "pug",
|
|
1243
|
-
newlineHandling: "hardline"
|
|
1244
|
-
}), G = "embeddedPug", Ri = ["pug", "jade"], zi = T(G), Bi = E(G), Vi = D(G), Hi = {
|
|
1204
|
+
}), Li = D({ parser: "dot-properties" }), U = "embeddedProperties", Ri = ["properties"], zi = S(U), Bi = C(U), Vi = w(U), Hi = {
|
|
1245
1205
|
[zi]: {
|
|
1246
1206
|
category: "Embed",
|
|
1247
1207
|
type: "string",
|
|
1248
1208
|
array: !0,
|
|
1249
1209
|
default: [{ value: [...Ri] }],
|
|
1250
|
-
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded
|
|
1210
|
+
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded Properties language. This option requires the `prettier-plugin-properties` plugin.",
|
|
1251
1211
|
deprecated: `Please use \`${Bi}\` or \`${Vi}\`.`
|
|
1252
1212
|
},
|
|
1253
1213
|
[Bi]: {
|
|
1254
1214
|
category: "Embed",
|
|
1255
1215
|
type: "string",
|
|
1256
1216
|
array: !0,
|
|
1257
|
-
default: [{ value: [
|
|
1258
|
-
description: "Block comments that make their subsequent template literals be identified as embedded
|
|
1217
|
+
default: [{ value: [E] }],
|
|
1218
|
+
description: "Block comments that make their subsequent template literals be identified as embedded Properties language. This option requires the `prettier-plugin-properties` plugin."
|
|
1259
1219
|
},
|
|
1260
1220
|
[Vi]: {
|
|
1261
1221
|
category: "Embed",
|
|
1262
1222
|
type: "string",
|
|
1263
1223
|
array: !0,
|
|
1264
|
-
default: [{ value: [
|
|
1265
|
-
description: "Tags that make their subsequent template literals be identified as embedded
|
|
1224
|
+
default: [{ value: [E] }],
|
|
1225
|
+
description: "Tags that make their subsequent template literals be identified as embedded Properties language. This option requires the `prettier-plugin-properties` plugin."
|
|
1266
1226
|
}
|
|
1267
1227
|
}, Ui = /* @__PURE__ */ l({
|
|
1268
1228
|
embedder: () => Li,
|
|
1269
|
-
language: () =>
|
|
1229
|
+
language: () => U,
|
|
1270
1230
|
options: () => Hi
|
|
1271
|
-
}), Wi =
|
|
1231
|
+
}), Wi = D({ parser: "pug" }), W = "embeddedPug", Gi = ["pug", "jade"], Ki = S(W), qi = C(W), Ji = w(W), Yi = {
|
|
1232
|
+
[Ki]: {
|
|
1233
|
+
category: "Embed",
|
|
1234
|
+
type: "string",
|
|
1235
|
+
array: !0,
|
|
1236
|
+
default: [{ value: [...Gi] }],
|
|
1237
|
+
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded Pug language. This option requires the `@prettier/plugin-pug` plugin.",
|
|
1238
|
+
deprecated: `Please use \`${qi}\` or \`${Ji}\`.`
|
|
1239
|
+
},
|
|
1240
|
+
[qi]: {
|
|
1241
|
+
category: "Embed",
|
|
1242
|
+
type: "string",
|
|
1243
|
+
array: !0,
|
|
1244
|
+
default: [{ value: [E] }],
|
|
1245
|
+
description: "Block comments that make their subsequent template literals be identified as embedded Pug language. This option requires the `@prettier/plugin-pug` plugin."
|
|
1246
|
+
},
|
|
1247
|
+
[Ji]: {
|
|
1248
|
+
category: "Embed",
|
|
1249
|
+
type: "string",
|
|
1250
|
+
array: !0,
|
|
1251
|
+
default: [{ value: [E] }],
|
|
1252
|
+
description: "Tags that make their subsequent template literals be identified as embedded Pug language. This option requires the `@prettier/plugin-pug` plugin."
|
|
1253
|
+
}
|
|
1254
|
+
}, Xi = /* @__PURE__ */ l({
|
|
1255
|
+
embedder: () => Wi,
|
|
1256
|
+
language: () => W,
|
|
1257
|
+
options: () => Yi
|
|
1258
|
+
}), Zi = D({
|
|
1272
1259
|
parser: "ruby",
|
|
1273
1260
|
parserOption: "embeddedRubyParser"
|
|
1274
|
-
}),
|
|
1261
|
+
}), G = "embeddedRuby", Qi = ["ruby"], $i = [
|
|
1275
1262
|
"ruby",
|
|
1276
1263
|
"rbs",
|
|
1277
1264
|
"haml"
|
|
1278
|
-
],
|
|
1279
|
-
[
|
|
1265
|
+
], ea = S(G), ta = C(G), na = w(G), ra = T(G), ia = {
|
|
1266
|
+
[ea]: {
|
|
1280
1267
|
category: "Embed",
|
|
1281
1268
|
type: "string",
|
|
1282
1269
|
array: !0,
|
|
1283
|
-
default: [{ value: [...
|
|
1270
|
+
default: [{ value: [...Qi] }],
|
|
1284
1271
|
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded Ruby language. This option requires the `@prettier/plugin-ruby` plugin.",
|
|
1285
|
-
deprecated: `Please use \`${
|
|
1272
|
+
deprecated: `Please use \`${ta}\` or \`${na}\`.`
|
|
1286
1273
|
},
|
|
1287
|
-
[
|
|
1274
|
+
[ta]: {
|
|
1288
1275
|
category: "Embed",
|
|
1289
1276
|
type: "string",
|
|
1290
1277
|
array: !0,
|
|
1291
|
-
default: [{ value: [
|
|
1278
|
+
default: [{ value: [E] }],
|
|
1292
1279
|
description: "Block comments that make their subsequent template literals be identified as embedded Ruby language. This option requires the `@prettier/plugin-ruby` plugin."
|
|
1293
1280
|
},
|
|
1294
|
-
[
|
|
1281
|
+
[na]: {
|
|
1295
1282
|
category: "Embed",
|
|
1296
1283
|
type: "string",
|
|
1297
1284
|
array: !0,
|
|
1298
|
-
default: [{ value: [
|
|
1285
|
+
default: [{ value: [E] }],
|
|
1299
1286
|
description: "Tags that make their subsequent template literals be identified as embedded Ruby language. This option requires the `@prettier/plugin-ruby` plugin."
|
|
1300
1287
|
},
|
|
1301
|
-
[
|
|
1288
|
+
[ra]: {
|
|
1302
1289
|
category: "Embed",
|
|
1303
1290
|
type: "choice",
|
|
1304
1291
|
default: "ruby",
|
|
1305
1292
|
description: "The parser used to parse the embedded Ruby language. This option requires the `@prettier/plugin-ruby` plugin.",
|
|
1306
|
-
choices:
|
|
1293
|
+
choices: $i.map((e) => ({
|
|
1307
1294
|
value: e,
|
|
1308
1295
|
description: `Use the "${e}" parser.`
|
|
1309
1296
|
}))
|
|
1310
1297
|
}
|
|
1311
|
-
},
|
|
1312
|
-
embedder: () =>
|
|
1313
|
-
language: () =>
|
|
1314
|
-
options: () =>
|
|
1315
|
-
}),
|
|
1316
|
-
|
|
1317
|
-
newlineHandling: "hardline"
|
|
1318
|
-
}), q = "embeddedSh", ea = ["sh"], ta = T(q), na = E(q), ra = D(q), ia = {
|
|
1319
|
-
[ta]: {
|
|
1298
|
+
}, aa = /* @__PURE__ */ l({
|
|
1299
|
+
embedder: () => Zi,
|
|
1300
|
+
language: () => G,
|
|
1301
|
+
options: () => ia
|
|
1302
|
+
}), oa = D({ parser: "sh" }), sa = "embeddedSh", ca = ["sh"], la = S(sa), ua = C(sa), da = w(sa), fa = {
|
|
1303
|
+
[la]: {
|
|
1320
1304
|
category: "Embed",
|
|
1321
1305
|
type: "string",
|
|
1322
1306
|
array: !0,
|
|
1323
|
-
default: [{ value: [...
|
|
1307
|
+
default: [{ value: [...ca] }],
|
|
1324
1308
|
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded Shell language. This option requires the `prettier-plugin-sh` plugin.",
|
|
1325
|
-
deprecated: `Please use \`${
|
|
1309
|
+
deprecated: `Please use \`${ua}\` or \`${da}\`.`
|
|
1326
1310
|
},
|
|
1327
|
-
[
|
|
1311
|
+
[ua]: {
|
|
1328
1312
|
category: "Embed",
|
|
1329
1313
|
type: "string",
|
|
1330
1314
|
array: !0,
|
|
1331
|
-
default: [{ value: [
|
|
1315
|
+
default: [{ value: [E] }],
|
|
1332
1316
|
description: "Block comments that make their subsequent template literals be identified as embedded Shell language. This option requires the `prettier-plugin-sh` plugin."
|
|
1333
1317
|
},
|
|
1334
|
-
[
|
|
1318
|
+
[da]: {
|
|
1335
1319
|
category: "Embed",
|
|
1336
1320
|
type: "string",
|
|
1337
1321
|
array: !0,
|
|
1338
|
-
default: [{ value: [
|
|
1322
|
+
default: [{ value: [E] }],
|
|
1339
1323
|
description: "Tags that make their subsequent template literals be identified as embedded Shell language. This option requires the `prettier-plugin-sh` plugin."
|
|
1340
1324
|
}
|
|
1341
|
-
},
|
|
1342
|
-
embedder: () =>
|
|
1343
|
-
language: () =>
|
|
1344
|
-
options: () =>
|
|
1345
|
-
}),
|
|
1325
|
+
}, pa = /* @__PURE__ */ l({
|
|
1326
|
+
embedder: () => oa,
|
|
1327
|
+
language: () => sa,
|
|
1328
|
+
options: () => fa
|
|
1329
|
+
}), K = "embeddedSolidity", ma = D({
|
|
1346
1330
|
parser: "slang",
|
|
1347
|
-
parserOption: `${
|
|
1348
|
-
}),
|
|
1349
|
-
[
|
|
1331
|
+
parserOption: `${K}Parser`
|
|
1332
|
+
}), ha = ["solidity", "sol"], ga = C(K), _a = w(K), va = `${K}Parser`, ya = {
|
|
1333
|
+
[ga]: {
|
|
1350
1334
|
category: "Embed",
|
|
1351
1335
|
type: "string",
|
|
1352
1336
|
array: !0,
|
|
1353
|
-
default: [{ value: [...
|
|
1337
|
+
default: [{ value: [...ha] }],
|
|
1354
1338
|
description: "Block comments that identify embedded Solidity in template literals. Requires the `prettier-plugin-solidity` plugin."
|
|
1355
1339
|
},
|
|
1356
|
-
[
|
|
1340
|
+
[_a]: {
|
|
1357
1341
|
category: "Embed",
|
|
1358
1342
|
type: "string",
|
|
1359
1343
|
array: !0,
|
|
1360
|
-
default: [{ value: [...
|
|
1344
|
+
default: [{ value: [...ha] }],
|
|
1361
1345
|
description: "Tags that identify embedded Solidity in template literals. Requires the `prettier-plugin-solidity` plugin."
|
|
1362
1346
|
},
|
|
1363
|
-
[
|
|
1347
|
+
[va]: {
|
|
1364
1348
|
category: "Embed",
|
|
1365
1349
|
type: "choice",
|
|
1366
1350
|
default: "slang",
|
|
@@ -1380,221 +1364,222 @@ var Cr = "embeddedMotoko", wr = ["motoko", "mo"], Tr = E(Cr), Er = D(Cr), Dr = {
|
|
|
1380
1364
|
}
|
|
1381
1365
|
]
|
|
1382
1366
|
}
|
|
1383
|
-
},
|
|
1384
|
-
embedder: () =>
|
|
1385
|
-
language: () =>
|
|
1386
|
-
options: () =>
|
|
1387
|
-
}),
|
|
1367
|
+
}, ba = /* @__PURE__ */ l({
|
|
1368
|
+
embedder: () => ma,
|
|
1369
|
+
language: () => K,
|
|
1370
|
+
options: () => ya
|
|
1371
|
+
}), xa = /\n[\t ]*$/, Sa = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
|
|
1388
1372
|
let o = {
|
|
1389
1373
|
...r,
|
|
1390
1374
|
...a
|
|
1391
|
-
}, s = o.embeddedSqlPlugin ?? "prettier-plugin-sql", { node: c } = n, { createPlaceholder: l, placeholderRegex: u } =
|
|
1392
|
-
if (s === "prettier-plugin-sql-cst")
|
|
1375
|
+
}, s = o.embeddedSqlPlugin ?? "prettier-plugin-sql", { node: c } = n, { createPlaceholder: l, placeholderRegex: u } = Oe(), { text: d, leadingWhitespaces: f, trailingWhitespaces: p } = y(c, l), m = Ce(n, t, o, !1), h;
|
|
1376
|
+
if (s === "prettier-plugin-sql-cst") h = x(await e(d, {
|
|
1393
1377
|
...o,
|
|
1394
1378
|
parser: o.embeddedSqlParser ?? "sqlite"
|
|
1395
1379
|
}), u, m);
|
|
1396
1380
|
else {
|
|
1397
|
-
let t =
|
|
1398
|
-
|
|
1381
|
+
let t = /* @__PURE__ */ new Set();
|
|
1382
|
+
for (let e = 0; e < c.expressions.length; e++) xa.test(c.quasis[e].value.raw) && t.add(e);
|
|
1383
|
+
h = x(await e(d, {
|
|
1399
1384
|
...o,
|
|
1400
1385
|
parser: "sql"
|
|
1401
|
-
}), u, m,
|
|
1386
|
+
}), u, m, {
|
|
1387
|
+
lineBreakBeforeExpressions: t,
|
|
1388
|
+
interpolationTabWidth: o.tabWidth ?? 2
|
|
1389
|
+
});
|
|
1402
1390
|
}
|
|
1403
|
-
return
|
|
1404
|
-
},
|
|
1391
|
+
return b(h, o, i, f, p);
|
|
1392
|
+
}, q = "embeddedSql", Ca = ["sql"], wa = ["prettier-plugin-sql", "prettier-plugin-sql-cst"], Ta = [
|
|
1405
1393
|
"sqlite",
|
|
1406
1394
|
"bigquery",
|
|
1407
1395
|
"mysql",
|
|
1408
1396
|
"mariadb",
|
|
1409
1397
|
"postgresql"
|
|
1410
|
-
],
|
|
1411
|
-
[
|
|
1398
|
+
], Ea = S(q), Da = C(q), Oa = w(q), ka = Ae(q), Aa = T(q), ja = {
|
|
1399
|
+
[Ea]: {
|
|
1412
1400
|
category: "Embed",
|
|
1413
1401
|
type: "string",
|
|
1414
1402
|
array: !0,
|
|
1415
|
-
default: [{ value: [...
|
|
1403
|
+
default: [{ value: [...Ca] }],
|
|
1416
1404
|
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded SQL language. This option requires the `prettier-plugin-sql` plugin or the `prettier-plugin-sql-cst` plugin.",
|
|
1417
|
-
deprecated: `Please use \`${
|
|
1405
|
+
deprecated: `Please use \`${Da}\` or \`${Oa}\`.`
|
|
1418
1406
|
},
|
|
1419
|
-
[
|
|
1407
|
+
[Da]: {
|
|
1420
1408
|
category: "Embed",
|
|
1421
1409
|
type: "string",
|
|
1422
1410
|
array: !0,
|
|
1423
|
-
default: [{ value: [
|
|
1411
|
+
default: [{ value: [E] }],
|
|
1424
1412
|
description: "Block comments that make their subsequent template literals be identified as embedded SQL language. This option requires the `prettier-plugin-sql` plugin or the `prettier-plugin-sql-cst` plugin."
|
|
1425
1413
|
},
|
|
1426
|
-
[
|
|
1414
|
+
[Oa]: {
|
|
1427
1415
|
category: "Embed",
|
|
1428
1416
|
type: "string",
|
|
1429
1417
|
array: !0,
|
|
1430
|
-
default: [{ value: [
|
|
1418
|
+
default: [{ value: [E] }],
|
|
1431
1419
|
description: "Tags that make their subsequent template literals be identified as embedded SQL language. This option requires the `prettier-plugin-sql` plugin or the `prettier-plugin-sql-cst` plugin."
|
|
1432
1420
|
},
|
|
1433
|
-
[
|
|
1421
|
+
[ka]: {
|
|
1434
1422
|
category: "Embed",
|
|
1435
1423
|
type: "choice",
|
|
1436
1424
|
default: "prettier-plugin-sql",
|
|
1437
1425
|
description: "The plugin used to format the embedded SQL language. This option requires the `prettier-plugin-sql` plugin or the `prettier-plugin-sql-cst` plugin.",
|
|
1438
|
-
choices:
|
|
1426
|
+
choices: wa.map((e) => ({
|
|
1439
1427
|
value: e,
|
|
1440
1428
|
description: `Use the "${e}" plugin.`
|
|
1441
1429
|
}))
|
|
1442
1430
|
},
|
|
1443
|
-
[
|
|
1431
|
+
[Aa]: {
|
|
1444
1432
|
category: "Embed",
|
|
1445
1433
|
type: "choice",
|
|
1446
1434
|
default: "sqlite",
|
|
1447
1435
|
description: "Specify the embedded SQL language parser. This option is only needed with the `prettier-plugin-sql-cst` plugin.",
|
|
1448
|
-
choices:
|
|
1436
|
+
choices: Ta.map((e) => ({
|
|
1449
1437
|
value: e,
|
|
1450
1438
|
description: `Use the "${e}" parser.`
|
|
1451
1439
|
}))
|
|
1452
1440
|
}
|
|
1453
|
-
},
|
|
1454
|
-
embedder: () =>
|
|
1455
|
-
language: () =>
|
|
1456
|
-
options: () =>
|
|
1457
|
-
}),
|
|
1441
|
+
}, Ma = /* @__PURE__ */ l({
|
|
1442
|
+
embedder: () => Sa,
|
|
1443
|
+
language: () => q,
|
|
1444
|
+
options: () => ja
|
|
1445
|
+
}), Na = D({
|
|
1458
1446
|
parser: "svelte",
|
|
1459
1447
|
markup: !0
|
|
1460
|
-
}),
|
|
1461
|
-
[
|
|
1448
|
+
}), Pa = "embeddedSvelte", Fa = ["svelte"], Ia = C(Pa), La = w(Pa), Ra = {
|
|
1449
|
+
[Ia]: {
|
|
1462
1450
|
category: "Embed",
|
|
1463
1451
|
type: "string",
|
|
1464
1452
|
array: !0,
|
|
1465
|
-
default: [{ value: [...
|
|
1453
|
+
default: [{ value: [...Fa] }],
|
|
1466
1454
|
description: "Block comments that identify embedded Svelte in template literals. Requires the `prettier-plugin-svelte` plugin."
|
|
1467
1455
|
},
|
|
1468
|
-
[
|
|
1456
|
+
[La]: {
|
|
1469
1457
|
category: "Embed",
|
|
1470
1458
|
type: "string",
|
|
1471
1459
|
array: !0,
|
|
1472
|
-
default: [{ value: [...
|
|
1460
|
+
default: [{ value: [...Fa] }],
|
|
1473
1461
|
description: "Tags that identify embedded Svelte in template literals. Requires the `prettier-plugin-svelte` plugin."
|
|
1474
1462
|
}
|
|
1475
|
-
},
|
|
1476
|
-
embedder: () =>
|
|
1477
|
-
language: () =>
|
|
1478
|
-
options: () =>
|
|
1479
|
-
}),
|
|
1480
|
-
|
|
1481
|
-
newlineHandling: "hardline"
|
|
1482
|
-
}), Ma = "embeddedToml", Na = ["toml"], Pa = T(Ma), Fa = E(Ma), Ia = D(Ma), La = {
|
|
1483
|
-
[Pa]: {
|
|
1463
|
+
}, za = /* @__PURE__ */ l({
|
|
1464
|
+
embedder: () => Na,
|
|
1465
|
+
language: () => Pa,
|
|
1466
|
+
options: () => Ra
|
|
1467
|
+
}), Ba = D({ parser: "toml" }), Va = "embeddedToml", Ha = ["toml"], Ua = S(Va), Wa = C(Va), Ga = w(Va), Ka = {
|
|
1468
|
+
[Ua]: {
|
|
1484
1469
|
category: "Embed",
|
|
1485
1470
|
type: "string",
|
|
1486
1471
|
array: !0,
|
|
1487
|
-
default: [{ value: [...
|
|
1472
|
+
default: [{ value: [...Ha] }],
|
|
1488
1473
|
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded TOML language. This option requires the `prettier-plugin-toml` plugin.",
|
|
1489
|
-
deprecated: `Please use \`${
|
|
1474
|
+
deprecated: `Please use \`${Wa}\` or \`${Ga}\`.`
|
|
1490
1475
|
},
|
|
1491
|
-
[
|
|
1476
|
+
[Wa]: {
|
|
1492
1477
|
category: "Embed",
|
|
1493
1478
|
type: "string",
|
|
1494
1479
|
array: !0,
|
|
1495
|
-
default: [{ value: [
|
|
1480
|
+
default: [{ value: [E] }],
|
|
1496
1481
|
description: "Block comments that make their subsequent template literals be identified as embedded TOML language. This option requires the `prettier-plugin-toml` plugin."
|
|
1497
1482
|
},
|
|
1498
|
-
[
|
|
1483
|
+
[Ga]: {
|
|
1499
1484
|
category: "Embed",
|
|
1500
1485
|
type: "string",
|
|
1501
1486
|
array: !0,
|
|
1502
|
-
default: [{ value: [
|
|
1487
|
+
default: [{ value: [E] }],
|
|
1503
1488
|
description: "Tags that make their subsequent template literals be identified as embedded TOML language. This option requires the `prettier-plugin-toml` plugin."
|
|
1504
1489
|
}
|
|
1505
|
-
},
|
|
1506
|
-
embedder: () =>
|
|
1507
|
-
language: () =>
|
|
1508
|
-
options: () =>
|
|
1509
|
-
}),
|
|
1490
|
+
}, qa = /* @__PURE__ */ l({
|
|
1491
|
+
embedder: () => Ba,
|
|
1492
|
+
language: () => Va,
|
|
1493
|
+
options: () => Ka
|
|
1494
|
+
}), Ja = D({
|
|
1510
1495
|
parser: "typescript",
|
|
1511
1496
|
parserOption: "embeddedTsParser",
|
|
1512
1497
|
parserOptions: { filepath: void 0 }
|
|
1513
|
-
}),
|
|
1498
|
+
}), J = "embeddedTs", Ya = [
|
|
1514
1499
|
"ts",
|
|
1515
1500
|
"tsx",
|
|
1516
1501
|
"cts",
|
|
1517
1502
|
"mts",
|
|
1518
1503
|
"typescript"
|
|
1519
|
-
],
|
|
1520
|
-
[
|
|
1504
|
+
], Xa = ["typescript", "babel-ts"], Za = S(J), Qa = C(J), $a = w(J), eo = T(J), to = {
|
|
1505
|
+
[Za]: {
|
|
1521
1506
|
category: "Embed",
|
|
1522
1507
|
type: "string",
|
|
1523
1508
|
array: !0,
|
|
1524
|
-
default: [{ value: [...
|
|
1509
|
+
default: [{ value: [...Ya] }],
|
|
1525
1510
|
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded TypeScript language.",
|
|
1526
|
-
deprecated: `Please use \`${
|
|
1511
|
+
deprecated: `Please use \`${Qa}\` or \`${$a}\`.`
|
|
1527
1512
|
},
|
|
1528
|
-
[
|
|
1513
|
+
[Qa]: {
|
|
1529
1514
|
category: "Embed",
|
|
1530
1515
|
type: "string",
|
|
1531
1516
|
array: !0,
|
|
1532
|
-
default: [{ value: [
|
|
1517
|
+
default: [{ value: [E] }],
|
|
1533
1518
|
description: "Block comments that make their subsequent template literals be identified as embedded TypeScript language."
|
|
1534
1519
|
},
|
|
1535
|
-
[
|
|
1520
|
+
[$a]: {
|
|
1536
1521
|
category: "Embed",
|
|
1537
1522
|
type: "string",
|
|
1538
1523
|
array: !0,
|
|
1539
|
-
default: [{ value: [
|
|
1524
|
+
default: [{ value: [E] }],
|
|
1540
1525
|
description: "Tags that make their subsequent template literals be identified as embedded TypeScript language."
|
|
1541
1526
|
},
|
|
1542
|
-
[
|
|
1527
|
+
[eo]: {
|
|
1543
1528
|
category: "Embed",
|
|
1544
1529
|
type: "choice",
|
|
1545
1530
|
default: "typescript",
|
|
1546
1531
|
description: "The parser used to parse the embedded TypeScript language.",
|
|
1547
|
-
choices:
|
|
1532
|
+
choices: Xa.map((e) => ({
|
|
1548
1533
|
value: e,
|
|
1549
1534
|
description: `Use the "${e}" parser.`
|
|
1550
1535
|
}))
|
|
1551
1536
|
}
|
|
1552
|
-
},
|
|
1553
|
-
embedder: () =>
|
|
1554
|
-
language: () =>
|
|
1555
|
-
options: () =>
|
|
1556
|
-
}),
|
|
1537
|
+
}, no = /* @__PURE__ */ l({
|
|
1538
|
+
embedder: () => Ja,
|
|
1539
|
+
language: () => J,
|
|
1540
|
+
options: () => to
|
|
1541
|
+
}), Y = "embeddedXml", { softline: ro } = e, io = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
|
|
1557
1542
|
let o = {
|
|
1558
1543
|
...r,
|
|
1559
1544
|
...a
|
|
1560
|
-
}, { node: s } = n, { createPlaceholder: c, placeholderRegex: l } =
|
|
1545
|
+
}, { node: s } = n, { createPlaceholder: c, placeholderRegex: l } = Oe(), { text: u, leadingWhitespaces: d, trailingWhitespaces: f } = y(s, c), p = Ce(n, t), m = [], h = 0;
|
|
1561
1546
|
for (; h !== void 0;) {
|
|
1562
1547
|
let t = u.slice(h);
|
|
1563
1548
|
if (t.length === 0) break;
|
|
1564
|
-
h > 0 && o.xmlWhitespaceSensitivity !== "strict" && m.push(
|
|
1549
|
+
h > 0 && o.xmlWhitespaceSensitivity !== "strict" && m.push(ro), o.__embeddedXmlFragmentRecoverIndex?.splice(0, o.__embeddedXmlFragmentRecoverIndex.length);
|
|
1565
1550
|
let n = await e(t, {
|
|
1566
1551
|
...o,
|
|
1567
|
-
parser:
|
|
1552
|
+
parser: Y
|
|
1568
1553
|
}), [r, i] = o.__embeddedXmlFragmentRecoverIndex ?? [];
|
|
1569
1554
|
r === void 0 ? h = void 0 : i === void 0 ? h += r : (n = t.slice(r, i + 1), h += i + 1), m.push(n);
|
|
1570
1555
|
}
|
|
1571
|
-
return x(
|
|
1572
|
-
},
|
|
1556
|
+
return b(x(m, l, p), o, i, d, f, o.xmlWhitespaceSensitivity === "strict");
|
|
1557
|
+
}, ao = [
|
|
1573
1558
|
"xml",
|
|
1574
1559
|
"opml",
|
|
1575
1560
|
"rss",
|
|
1576
1561
|
"svg"
|
|
1577
|
-
],
|
|
1578
|
-
[
|
|
1562
|
+
], oo = S(Y), so = C(Y), co = w(Y), lo = {
|
|
1563
|
+
[oo]: {
|
|
1579
1564
|
category: "Embed",
|
|
1580
1565
|
type: "string",
|
|
1581
1566
|
array: !0,
|
|
1582
|
-
default: [{ value: [...
|
|
1567
|
+
default: [{ value: [...ao] }],
|
|
1583
1568
|
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded XML language. This option requires the `@prettier/plugin-xml` plugin.",
|
|
1584
|
-
deprecated: `Please use \`${
|
|
1569
|
+
deprecated: `Please use \`${so}\` or \`${co}\`.`
|
|
1585
1570
|
},
|
|
1586
|
-
[
|
|
1571
|
+
[so]: {
|
|
1587
1572
|
category: "Embed",
|
|
1588
1573
|
type: "string",
|
|
1589
1574
|
array: !0,
|
|
1590
|
-
default: [{ value: [
|
|
1575
|
+
default: [{ value: [E] }],
|
|
1591
1576
|
description: "Block comments that make their subsequent template literals be identified as embedded XML language. This option requires the `@prettier/plugin-xml` plugin."
|
|
1592
1577
|
},
|
|
1593
|
-
[
|
|
1578
|
+
[co]: {
|
|
1594
1579
|
category: "Embed",
|
|
1595
1580
|
type: "string",
|
|
1596
1581
|
array: !0,
|
|
1597
|
-
default: [{ value: [
|
|
1582
|
+
default: [{ value: [E] }],
|
|
1598
1583
|
description: "Tags that make their subsequent template literals be identified as embedded XML language. This option requires the `@prettier/plugin-xml` plugin."
|
|
1599
1584
|
},
|
|
1600
1585
|
__embeddedXmlFragmentRecoverIndex: {
|
|
@@ -1607,15 +1592,15 @@ var Cr = "embeddedMotoko", wr = ["motoko", "mo"], Tr = E(Cr), Er = D(Cr), Dr = {
|
|
|
1607
1592
|
};
|
|
1608
1593
|
//#endregion
|
|
1609
1594
|
//#region src/embedded/xml/parser.ts
|
|
1610
|
-
function
|
|
1595
|
+
function uo(e, t) {
|
|
1611
1596
|
if (t && Number.isFinite(t.line) && Number.isFinite(t.column)) return e.split("\n").slice(0, t.line - 1).reduce((e, t) => e + t.length + 1, 0) + t.column - 1;
|
|
1612
1597
|
}
|
|
1613
|
-
async function
|
|
1598
|
+
async function X(e, t, n) {
|
|
1614
1599
|
try {
|
|
1615
1600
|
return await n.parse(e, t);
|
|
1616
1601
|
} catch (r) {
|
|
1617
1602
|
if (!(r instanceof Error)) throw r;
|
|
1618
|
-
let { loc: i } = r, a =
|
|
1603
|
+
let { loc: i } = r, a = uo(e, i?.start), o = uo(e, i?.end), s = t, c = (...e) => s.__embeddedXmlFragmentRecoverIndex?.splice(0, s.__embeddedXmlFragmentRecoverIndex.length, ...e), l = "Expecting token of type --> OPEN <-- but found --> ";
|
|
1619
1604
|
if (r.message.startsWith(`${l}'' <--`)) {
|
|
1620
1605
|
let r = await n.parse(`${e}<prettier-embed-fragment />`, t);
|
|
1621
1606
|
return r.children ? delete r.children.element : r.element = null, r.location = {
|
|
@@ -1623,22 +1608,22 @@ async function Q(e, t, n) {
|
|
|
1623
1608
|
endOffset: e.length - 1
|
|
1624
1609
|
}, r;
|
|
1625
1610
|
}
|
|
1626
|
-
if (a !== void 0 && a > 0 && (r.message.startsWith("Expecting token of type --> EOF <--") || r.message.startsWith("Redundant input, expecting EOF but found: "))) return c(a),
|
|
1627
|
-
if (a !== void 0 && o !== void 0 && r.message.startsWith(l)) return c(a, o),
|
|
1611
|
+
if (a !== void 0 && a > 0 && (r.message.startsWith("Expecting token of type --> EOF <--") || r.message.startsWith("Redundant input, expecting EOF but found: "))) return c(a), X(e.slice(0, a), t, n);
|
|
1612
|
+
if (a !== void 0 && o !== void 0 && r.message.startsWith(l)) return c(a, o), X("", t, n);
|
|
1628
1613
|
throw r;
|
|
1629
1614
|
}
|
|
1630
1615
|
}
|
|
1631
|
-
function
|
|
1616
|
+
function fo(e) {
|
|
1632
1617
|
if (typeof e == "object" && e && "parsers" in e) return e.parsers?.xml;
|
|
1633
1618
|
}
|
|
1634
|
-
function
|
|
1635
|
-
let t =
|
|
1619
|
+
function po(e) {
|
|
1620
|
+
let t = fo(typeof e == "object" && e && "default" in e ? e.default : e);
|
|
1636
1621
|
if (!t) throw Error("The XML plugin must provide the \"xml\" parser.");
|
|
1637
1622
|
return t;
|
|
1638
1623
|
}
|
|
1639
|
-
async function
|
|
1624
|
+
async function mo(e, t = () => import("@prettier/plugin-xml"), n = import.meta.url) {
|
|
1640
1625
|
try {
|
|
1641
|
-
return
|
|
1626
|
+
return po(await t());
|
|
1642
1627
|
} catch (t) {
|
|
1643
1628
|
if (typeof process < "u" && process.versions?.node) {
|
|
1644
1629
|
let [{ createRequire: t }, r, { pathToFileURL: i }] = await Promise.all([
|
|
@@ -1647,7 +1632,7 @@ async function io(e, t = () => import("@prettier/plugin-xml"), n = import.meta.u
|
|
|
1647
1632
|
import("node:url")
|
|
1648
1633
|
]);
|
|
1649
1634
|
for (let a of [n, e ? r.resolve(e) : `${process.cwd()}/package.json`]) try {
|
|
1650
|
-
return
|
|
1635
|
+
return po(await import(
|
|
1651
1636
|
/* @vite-ignore */
|
|
1652
1637
|
i(t(a).resolve("@prettier/plugin-xml")).href
|
|
1653
1638
|
));
|
|
@@ -1656,15 +1641,15 @@ async function io(e, t = () => import("@prettier/plugin-xml"), n = import.meta.u
|
|
|
1656
1641
|
throw Error("Formatting embedded XML requires the consumer to install and load \"@prettier/plugin-xml\".", { cause: t });
|
|
1657
1642
|
}
|
|
1658
1643
|
}
|
|
1659
|
-
async function
|
|
1644
|
+
async function ho(e, t, n = mo) {
|
|
1660
1645
|
for (let n = (t.plugins?.length ?? 0) - 1; n >= 0; n--) {
|
|
1661
|
-
let r =
|
|
1662
|
-
if (r) return
|
|
1646
|
+
let r = fo(t.plugins[n]);
|
|
1647
|
+
if (r) return X(e, t, r);
|
|
1663
1648
|
}
|
|
1664
|
-
return
|
|
1649
|
+
return X(e, t, await n(t.filepath));
|
|
1665
1650
|
}
|
|
1666
|
-
var
|
|
1667
|
-
parse:
|
|
1651
|
+
var go = {
|
|
1652
|
+
parse: ho,
|
|
1668
1653
|
astFormat: "xml",
|
|
1669
1654
|
locStart(e) {
|
|
1670
1655
|
return e.location?.startOffset ?? 0;
|
|
@@ -1672,33 +1657,33 @@ var oo = {
|
|
|
1672
1657
|
locEnd(e) {
|
|
1673
1658
|
return e.location?.endOffset ?? NaN;
|
|
1674
1659
|
}
|
|
1675
|
-
},
|
|
1676
|
-
embedder: () =>
|
|
1677
|
-
language: () =>
|
|
1678
|
-
loadXmlParser: () =>
|
|
1679
|
-
options: () =>
|
|
1680
|
-
parseWithXmlPlugin: () =>
|
|
1681
|
-
parseXml: () =>
|
|
1682
|
-
parser: () =>
|
|
1683
|
-
}),
|
|
1660
|
+
}, _o = /* @__PURE__ */ l({
|
|
1661
|
+
embedder: () => io,
|
|
1662
|
+
language: () => Y,
|
|
1663
|
+
loadXmlParser: () => mo,
|
|
1664
|
+
options: () => lo,
|
|
1665
|
+
parseWithXmlPlugin: () => X,
|
|
1666
|
+
parseXml: () => ho,
|
|
1667
|
+
parser: () => go
|
|
1668
|
+
}), Z = "embeddedXQuery", vo = D({
|
|
1684
1669
|
parser: "xquery",
|
|
1685
|
-
parserOption: `${
|
|
1686
|
-
}),
|
|
1687
|
-
[
|
|
1670
|
+
parserOption: `${Z}Parser`
|
|
1671
|
+
}), yo = ["xquery", "xq"], bo = C(Z), xo = w(Z), So = `${Z}Parser`, Co = {
|
|
1672
|
+
[bo]: {
|
|
1688
1673
|
category: "Embed",
|
|
1689
1674
|
type: "string",
|
|
1690
1675
|
array: !0,
|
|
1691
|
-
default: [{ value: [...
|
|
1676
|
+
default: [{ value: [...yo] }],
|
|
1692
1677
|
description: "Block comments that identify embedded XQuery in template literals. Requires the `prettier-plugin-xquery` plugin."
|
|
1693
1678
|
},
|
|
1694
|
-
[
|
|
1679
|
+
[xo]: {
|
|
1695
1680
|
category: "Embed",
|
|
1696
1681
|
type: "string",
|
|
1697
1682
|
array: !0,
|
|
1698
|
-
default: [{ value: [...
|
|
1683
|
+
default: [{ value: [...yo] }],
|
|
1699
1684
|
description: "Tags that identify embedded XQuery in template literals. Requires the `prettier-plugin-xquery` plugin."
|
|
1700
1685
|
},
|
|
1701
|
-
[
|
|
1686
|
+
[So]: {
|
|
1702
1687
|
category: "Embed",
|
|
1703
1688
|
type: "choice",
|
|
1704
1689
|
default: "xquery",
|
|
@@ -1711,96 +1696,92 @@ var oo = {
|
|
|
1711
1696
|
description: "Use the `xquery4` parser."
|
|
1712
1697
|
}]
|
|
1713
1698
|
}
|
|
1714
|
-
},
|
|
1715
|
-
embedder: () =>
|
|
1716
|
-
language: () =>
|
|
1717
|
-
options: () =>
|
|
1718
|
-
}),
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
parser: "yaml"
|
|
1726
|
-
}), l, m), o, i, d, f);
|
|
1727
|
-
}, _o = "embeddedYaml", vo = ["yaml", "yml"], yo = T(_o), bo = E(_o), xo = D(_o), So = {
|
|
1728
|
-
[yo]: {
|
|
1699
|
+
}, wo = /* @__PURE__ */ l({
|
|
1700
|
+
embedder: () => vo,
|
|
1701
|
+
language: () => Z,
|
|
1702
|
+
options: () => Co
|
|
1703
|
+
}), To = D({
|
|
1704
|
+
parser: "yaml",
|
|
1705
|
+
parserOptions: { useTabs: !1 },
|
|
1706
|
+
preserveTrailingWhitespace: !0,
|
|
1707
|
+
transformDoc: (e) => t.mapDoc(e, (e) => e && typeof e == "object" && !Array.isArray(e) && e.type === "align" && e.n === -Infinity && Array.isArray(e.contents) && e.contents.length === 2 && typeof e.contents[0] == "object" && !Array.isArray(e.contents[0]) && e.contents[0]?.type === "line" && e.contents[0].hard && typeof e.contents[1] == "object" && !Array.isArray(e.contents[1]) && e.contents[1]?.type === "break-parent" ? "" : e)
|
|
1708
|
+
}), Eo = "embeddedYaml", Do = ["yaml", "yml"], Oo = S(Eo), ko = C(Eo), Ao = w(Eo), jo = {
|
|
1709
|
+
[Oo]: {
|
|
1729
1710
|
category: "Embed",
|
|
1730
1711
|
type: "string",
|
|
1731
1712
|
array: !0,
|
|
1732
|
-
default: [{ value: [...
|
|
1713
|
+
default: [{ value: [...Do] }],
|
|
1733
1714
|
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded YAML language.",
|
|
1734
|
-
deprecated: `Please use \`${
|
|
1715
|
+
deprecated: `Please use \`${ko}\` or \`${Ao}\`.`
|
|
1735
1716
|
},
|
|
1736
|
-
[
|
|
1717
|
+
[ko]: {
|
|
1737
1718
|
category: "Embed",
|
|
1738
1719
|
type: "string",
|
|
1739
1720
|
array: !0,
|
|
1740
|
-
default: [{ value: [
|
|
1721
|
+
default: [{ value: [E] }],
|
|
1741
1722
|
description: "Block comments that make their subsequent template literals be identified as embedded YAML language."
|
|
1742
1723
|
},
|
|
1743
|
-
[
|
|
1724
|
+
[Ao]: {
|
|
1744
1725
|
category: "Embed",
|
|
1745
1726
|
type: "string",
|
|
1746
1727
|
array: !0,
|
|
1747
|
-
default: [{ value: [
|
|
1728
|
+
default: [{ value: [E] }],
|
|
1748
1729
|
description: "Tags that make their subsequent template literals be identified as embedded YAML language."
|
|
1749
1730
|
}
|
|
1750
|
-
},
|
|
1751
|
-
embedder: () =>
|
|
1752
|
-
language: () =>
|
|
1753
|
-
options: () =>
|
|
1754
|
-
}),
|
|
1755
|
-
"./astro/index.ts":
|
|
1756
|
-
"./css/index.ts":
|
|
1757
|
-
"./dockerfile/index.ts":
|
|
1758
|
-
"./es/index.ts":
|
|
1759
|
-
"./gherkin/index.ts":
|
|
1760
|
-
"./glsl/index.ts":
|
|
1761
|
-
"./go-template/index.ts":
|
|
1762
|
-
"./graphql/index.ts":
|
|
1763
|
-
"./handlebars/index.ts":
|
|
1764
|
-
"./html/index.ts":
|
|
1765
|
-
"./hugo/index.ts":
|
|
1766
|
-
"./ini/index.ts":
|
|
1767
|
-
"./java/index.ts":
|
|
1768
|
-
"./jinja/index.ts":
|
|
1769
|
-
"./json/index.ts":
|
|
1770
|
-
"./jsonata/index.ts":
|
|
1771
|
-
"./jte/index.ts":
|
|
1772
|
-
"./latex/index.ts":
|
|
1773
|
-
"./liquid/index.ts":
|
|
1774
|
-
"./markdown/index.ts":
|
|
1775
|
-
"./marko/index.ts":
|
|
1776
|
-
"./motoko/index.ts":
|
|
1777
|
-
"./mustache/index.ts":
|
|
1778
|
-
"./nginx/index.ts":
|
|
1779
|
-
"./noop/index.ts":
|
|
1780
|
-
"./nunjucks/index.ts":
|
|
1781
|
-
"./pegjs/index.ts":
|
|
1782
|
-
"./php/index.ts":
|
|
1783
|
-
"./powershell/index.ts":
|
|
1784
|
-
"./prisma/index.ts":
|
|
1785
|
-
"./properties/index.ts":
|
|
1786
|
-
"./pug/index.ts":
|
|
1787
|
-
"./ruby/index.ts":
|
|
1788
|
-
"./sh/index.ts":
|
|
1789
|
-
"./solidity/index.ts":
|
|
1790
|
-
"./sql/index.ts":
|
|
1791
|
-
"./svelte/index.ts":
|
|
1792
|
-
"./toml/index.ts":
|
|
1793
|
-
"./ts/index.ts":
|
|
1794
|
-
"./xml/index.ts":
|
|
1795
|
-
"./xquery/index.ts":
|
|
1796
|
-
"./yaml/index.ts":
|
|
1731
|
+
}, Mo = /* @__PURE__ */ l({
|
|
1732
|
+
embedder: () => To,
|
|
1733
|
+
language: () => Eo,
|
|
1734
|
+
options: () => jo
|
|
1735
|
+
}), Q = [], No = {}, Po = {}, Fo = {}, Io = /* #__PURE__ */ Object.assign({
|
|
1736
|
+
"./astro/index.ts": Le,
|
|
1737
|
+
"./css/index.ts": Ke,
|
|
1738
|
+
"./dockerfile/index.ts": $e,
|
|
1739
|
+
"./es/index.ts": ct,
|
|
1740
|
+
"./gherkin/index.ts": ht,
|
|
1741
|
+
"./glsl/index.ts": Ct,
|
|
1742
|
+
"./go-template/index.ts": At,
|
|
1743
|
+
"./graphql/index.ts": Lt,
|
|
1744
|
+
"./handlebars/index.ts": Wt,
|
|
1745
|
+
"./html/index.ts": $t,
|
|
1746
|
+
"./hugo/index.ts": sn,
|
|
1747
|
+
"./ini/index.ts": mn,
|
|
1748
|
+
"./java/index.ts": xn,
|
|
1749
|
+
"./jinja/index.ts": On,
|
|
1750
|
+
"./json/index.ts": Rn,
|
|
1751
|
+
"./jsonata/index.ts": Gn,
|
|
1752
|
+
"./jte/index.ts": Qn,
|
|
1753
|
+
"./latex/index.ts": ar,
|
|
1754
|
+
"./liquid/index.ts": fr,
|
|
1755
|
+
"./markdown/index.ts": xr,
|
|
1756
|
+
"./marko/index.ts": Or,
|
|
1757
|
+
"./motoko/index.ts": Ir,
|
|
1758
|
+
"./mustache/index.ts": Ur,
|
|
1759
|
+
"./nginx/index.ts": Xr,
|
|
1760
|
+
"./noop/index.ts": ti,
|
|
1761
|
+
"./nunjucks/index.ts": ci,
|
|
1762
|
+
"./pegjs/index.ts": hi,
|
|
1763
|
+
"./php/index.ts": Si,
|
|
1764
|
+
"./powershell/index.ts": ki,
|
|
1765
|
+
"./prisma/index.ts": Ii,
|
|
1766
|
+
"./properties/index.ts": Ui,
|
|
1767
|
+
"./pug/index.ts": Xi,
|
|
1768
|
+
"./ruby/index.ts": aa,
|
|
1769
|
+
"./sh/index.ts": pa,
|
|
1770
|
+
"./solidity/index.ts": ba,
|
|
1771
|
+
"./sql/index.ts": Ma,
|
|
1772
|
+
"./svelte/index.ts": za,
|
|
1773
|
+
"./toml/index.ts": qa,
|
|
1774
|
+
"./ts/index.ts": no,
|
|
1775
|
+
"./xml/index.ts": _o,
|
|
1776
|
+
"./xquery/index.ts": wo,
|
|
1777
|
+
"./yaml/index.ts": Mo
|
|
1797
1778
|
});
|
|
1798
|
-
for (let { language: e, parser: t, embedder: n, options: r } of Object.values(
|
|
1779
|
+
for (let { language: e, parser: t, embedder: n, options: r } of Object.values(Io)) Te(Q, e, z), t && (No[e] = t), n && (Po[e] = n), Object.assign(Fo, r);
|
|
1799
1780
|
//#endregion
|
|
1800
1781
|
//#region src/options.ts
|
|
1801
|
-
var
|
|
1802
|
-
...
|
|
1803
|
-
[
|
|
1782
|
+
var Lo = "noEmbeddedIdentificationByComment", Ro = "noEmbeddedIdentificationByTag", zo = "preserveEmbeddedExteriorWhitespaces", Bo = "noEmbeddedMultiLineIndentation", Vo = "embeddedOverrides", Ho = {
|
|
1783
|
+
...Fo,
|
|
1784
|
+
[Lo]: {
|
|
1804
1785
|
category: "Embed",
|
|
1805
1786
|
type: "string",
|
|
1806
1787
|
array: !0,
|
|
@@ -1808,7 +1789,7 @@ var ko = "noEmbeddedIdentificationByComment", Ao = "noEmbeddedIdentificationByTa
|
|
|
1808
1789
|
description: "Turns off `` /* comment */ `...` `` comment-based embedded language identification for the specified identifiers.",
|
|
1809
1790
|
deprecated: "Please use `embedded<Language>Comments` or `embedded<Language>Tags` to configure each embedded language, and you won't need this option anymore."
|
|
1810
1791
|
},
|
|
1811
|
-
[
|
|
1792
|
+
[Ro]: {
|
|
1812
1793
|
category: "Embed",
|
|
1813
1794
|
type: "string",
|
|
1814
1795
|
array: !0,
|
|
@@ -1816,53 +1797,53 @@ var ko = "noEmbeddedIdentificationByComment", Ao = "noEmbeddedIdentificationByTa
|
|
|
1816
1797
|
description: "Turns off `` tag`...` `` tag-based embedded language identification for the specified identifiers.",
|
|
1817
1798
|
deprecated: "Please use `embedded<Language>Comments` or `embedded<Language>Tags` to configure each embedded language, and you won't need this option anymore."
|
|
1818
1799
|
},
|
|
1819
|
-
[
|
|
1800
|
+
[zo]: {
|
|
1820
1801
|
category: "Embed",
|
|
1821
1802
|
type: "string",
|
|
1822
1803
|
array: !0,
|
|
1823
1804
|
default: [{ value: [] }],
|
|
1824
1805
|
description: "Preserves leading and trailing whitespaces in the formatting results for the specified comments or tags."
|
|
1825
1806
|
},
|
|
1826
|
-
[
|
|
1807
|
+
[Bo]: {
|
|
1827
1808
|
category: "Embed",
|
|
1828
1809
|
type: "string",
|
|
1829
1810
|
array: !0,
|
|
1830
1811
|
default: [{ value: [] }],
|
|
1831
1812
|
description: "Turns off auto indentation in the formatting results for the specified comments or tags when they are formatted to span multi lines."
|
|
1832
1813
|
},
|
|
1833
|
-
[
|
|
1814
|
+
[Vo]: {
|
|
1834
1815
|
category: "Embed",
|
|
1835
1816
|
type: "string",
|
|
1836
1817
|
array: !1,
|
|
1837
1818
|
default: void 0,
|
|
1838
1819
|
description: "Option overrides for the specified comments or tags. It should either be a stringified JSON or an absolute filepath to the option overrides file."
|
|
1839
1820
|
}
|
|
1840
|
-
},
|
|
1821
|
+
}, Uo = {
|
|
1841
1822
|
...n.parsers,
|
|
1842
1823
|
...r.parsers,
|
|
1843
1824
|
...i.parsers,
|
|
1844
1825
|
...o.parsers,
|
|
1845
1826
|
...a.parsers,
|
|
1846
|
-
...
|
|
1847
|
-
},
|
|
1827
|
+
...No
|
|
1828
|
+
}, Wo = /("(?:\\?[^])*?")|(\/\/.*)|(\/\*[^]*?\*\/)/g, Go = /("(?:\\?[^])*?")|(,\s*)(?=]|})/g, Ko = { parse: (e) => {
|
|
1848
1829
|
e = String(e);
|
|
1849
1830
|
try {
|
|
1850
1831
|
return JSON.parse(e);
|
|
1851
1832
|
} catch {
|
|
1852
|
-
return JSON.parse(e.replace(
|
|
1833
|
+
return JSON.parse(e.replace(Wo, "$1").replace(Go, "$1"));
|
|
1853
1834
|
}
|
|
1854
|
-
} }, { label:
|
|
1855
|
-
async function
|
|
1835
|
+
} }, { label: qo } = e;
|
|
1836
|
+
async function Jo(e) {
|
|
1856
1837
|
try {
|
|
1857
1838
|
let { readFile: t } = await import("node:fs/promises"), n = await t(e, { encoding: "utf-8" });
|
|
1858
|
-
return
|
|
1839
|
+
return Ko.parse(n);
|
|
1859
1840
|
} catch {}
|
|
1860
1841
|
}
|
|
1861
|
-
var
|
|
1862
|
-
async function
|
|
1842
|
+
var Yo = /* @__PURE__ */ new URL("./import-module-worker.js", import.meta.url);
|
|
1843
|
+
async function Xo(e) {
|
|
1863
1844
|
let { Worker: t } = await import("node:worker_threads");
|
|
1864
1845
|
return new Promise((n) => {
|
|
1865
|
-
let r = new t(
|
|
1846
|
+
let r = new t(Yo, { workerData: { absolutePath: e } });
|
|
1866
1847
|
r.once("message", (e) => {
|
|
1867
1848
|
r.terminate(), e.error && console.error(e.error), n(e.overrides);
|
|
1868
1849
|
}), r.once("error", (e) => {
|
|
@@ -1872,7 +1853,7 @@ async function Ho(e) {
|
|
|
1872
1853
|
});
|
|
1873
1854
|
});
|
|
1874
1855
|
}
|
|
1875
|
-
async function
|
|
1856
|
+
async function Zo(e, t) {
|
|
1876
1857
|
let { isAbsolute: n, dirname: r, resolve: i } = await import("node:path");
|
|
1877
1858
|
if (n(e)) return e;
|
|
1878
1859
|
let { resolveConfigFile: a } = await import(
|
|
@@ -1881,9 +1862,9 @@ async function Uo(e, t) {
|
|
|
1881
1862
|
), o = await a(t);
|
|
1882
1863
|
return i(typeof o == "string" ? r(o) : process.env.PWD ?? process.cwd(), e);
|
|
1883
1864
|
}
|
|
1884
|
-
var
|
|
1865
|
+
var Qo = async (e, t) => {
|
|
1885
1866
|
try {
|
|
1886
|
-
return
|
|
1867
|
+
return Ko.parse(e);
|
|
1887
1868
|
} catch {}
|
|
1888
1869
|
let n;
|
|
1889
1870
|
try {
|
|
@@ -1892,66 +1873,66 @@ var Wo = async (e, t) => {
|
|
|
1892
1873
|
console.error("Failed to parse embeddedOverrides as a json object");
|
|
1893
1874
|
return;
|
|
1894
1875
|
}
|
|
1895
|
-
let r = () =>
|
|
1876
|
+
let r = () => Zo(e, t);
|
|
1896
1877
|
if (n === ".json" || n === ".jsonc") {
|
|
1897
|
-
let e = await r(), t = await
|
|
1878
|
+
let e = await r(), t = await Jo(e);
|
|
1898
1879
|
if (t !== void 0) return t;
|
|
1899
1880
|
console.error(`Failed to parse the json file: ${e}`);
|
|
1900
1881
|
} else if (n === ".mjs" || n === ".cjs" || n === ".js") {
|
|
1901
|
-
let e = await r(), t = await
|
|
1882
|
+
let e = await r(), t = await Xo(e);
|
|
1902
1883
|
if (t !== void 0) return t;
|
|
1903
1884
|
console.error(`Failed to parse the js module file: ${e}`);
|
|
1904
1885
|
} else if (n === ".mts" || n === ".cts" || n === ".ts") {
|
|
1905
|
-
let e = await r(), t = await
|
|
1886
|
+
let e = await r(), t = await Xo(e);
|
|
1906
1887
|
if (t !== void 0) return t;
|
|
1907
1888
|
console.error(`Failed to parse the ts module file: ${e}`);
|
|
1908
1889
|
} else {
|
|
1909
1890
|
if (n === "") {
|
|
1910
|
-
let e = await
|
|
1891
|
+
let e = await Jo(await r());
|
|
1911
1892
|
if (e !== void 0) return e;
|
|
1912
1893
|
}
|
|
1913
1894
|
console.error("Failed to parse embeddedOverrides as a json object");
|
|
1914
1895
|
}
|
|
1915
|
-
},
|
|
1916
|
-
async function
|
|
1896
|
+
}, $o = /* @__PURE__ */ new WeakMap();
|
|
1897
|
+
async function es(e, { commentOrTag: t, kind: n }) {
|
|
1917
1898
|
if (e.embeddedOverrides === void 0) return;
|
|
1918
|
-
let r =
|
|
1919
|
-
r === void 0 && (r =
|
|
1899
|
+
let r = $o.get(e);
|
|
1900
|
+
r === void 0 && (r = Qo(e.embeddedOverrides, e.filepath), $o.set(e, r));
|
|
1920
1901
|
let i = await r;
|
|
1921
1902
|
if (i !== void 0) for (let { [`${n}s`]: e, identifiers: r, options: a } of i) {
|
|
1922
1903
|
let n = e ?? [];
|
|
1923
1904
|
if (n.length === 0 && r?.includes(t) || n.includes(t)) return a;
|
|
1924
1905
|
}
|
|
1925
1906
|
}
|
|
1926
|
-
function*
|
|
1927
|
-
yield e, e.type === "CallExpression" && (yield*
|
|
1907
|
+
function* ts(e) {
|
|
1908
|
+
yield e, e.type === "CallExpression" && (yield* ts(e.callee));
|
|
1928
1909
|
}
|
|
1929
|
-
function
|
|
1910
|
+
function $(e) {
|
|
1930
1911
|
if (e.type === "Identifier") return e.name;
|
|
1931
1912
|
if (e.type === "ThisExpression") return "this";
|
|
1932
1913
|
if (e.type === "MemberExpression") {
|
|
1933
|
-
let t =
|
|
1914
|
+
let t = $(e.object);
|
|
1934
1915
|
if (t === void 0) return;
|
|
1935
1916
|
let n = "optional" in e && e.optional;
|
|
1936
1917
|
return !e.computed && e.property.type === "Identifier" ? `${t}${n ? "?." : "."}${e.property.name}` : e.property.type === "Literal" ? `${t}${n ? "?." : ""}[${JSON.stringify(e.property.value)}]` : e.property.type === "Identifier" ? `${t}${n ? "?." : ""}[${e.property.name}]` : void 0;
|
|
1937
1918
|
}
|
|
1938
1919
|
if (e.type === "CallExpression") {
|
|
1939
|
-
let t =
|
|
1920
|
+
let t = $(e.callee);
|
|
1940
1921
|
return t === void 0 ? void 0 : `${t}()`;
|
|
1941
1922
|
}
|
|
1942
|
-
if (e.type === "ChainExpression") return
|
|
1923
|
+
if (e.type === "ChainExpression") return $(e.expression);
|
|
1943
1924
|
}
|
|
1944
|
-
function
|
|
1925
|
+
function ns(e, t) {
|
|
1945
1926
|
let n = /^\/(.*)\/([dgimsuvy]*)$/.exec(t);
|
|
1946
1927
|
if (!n) return !1;
|
|
1947
1928
|
try {
|
|
1948
|
-
let t =
|
|
1929
|
+
let t = $(e);
|
|
1949
1930
|
return t !== void 0 && new RegExp(n[1], n[2]).test(t);
|
|
1950
1931
|
} catch {
|
|
1951
1932
|
return !1;
|
|
1952
1933
|
}
|
|
1953
1934
|
}
|
|
1954
|
-
var
|
|
1935
|
+
var rs = (() => {
|
|
1955
1936
|
let e = /* @__PURE__ */ new Set([
|
|
1956
1937
|
"start",
|
|
1957
1938
|
"end",
|
|
@@ -1962,7 +1943,7 @@ var Xo = (() => {
|
|
|
1962
1943
|
"decorators"
|
|
1963
1944
|
]);
|
|
1964
1945
|
return (t, n, r, i) => {
|
|
1965
|
-
if (/^\/.*\/[dgimsuvy]*$/.test(n)) return
|
|
1946
|
+
if (/^\/.*\/[dgimsuvy]*$/.test(n)) return ns(t, n);
|
|
1966
1947
|
let a = i?.get(n);
|
|
1967
1948
|
try {
|
|
1968
1949
|
let e = i?.has(n) ? a : r(`${n}\`\``);
|
|
@@ -1974,11 +1955,11 @@ var Xo = (() => {
|
|
|
1974
1955
|
if (i?.set(n, a), !a || (a.type === "File" && (a = a.program), a.type !== "Program" || a.body[0]?.type !== "ExpressionStatement")) return !1;
|
|
1975
1956
|
let o = a.body[0]?.expression;
|
|
1976
1957
|
if (o?.type !== "TaggedTemplateExpression") return !1;
|
|
1977
|
-
for (let n of
|
|
1958
|
+
for (let n of ts(t)) if (ds(n, o.tag, e)) return !0;
|
|
1978
1959
|
return !1;
|
|
1979
1960
|
};
|
|
1980
1961
|
})();
|
|
1981
|
-
function
|
|
1962
|
+
function is({ node: e, parent: t }) {
|
|
1982
1963
|
let n = e.comments ?? t?.comments;
|
|
1983
1964
|
if (!n) return;
|
|
1984
1965
|
let r = n[n.length - 1];
|
|
@@ -1990,32 +1971,32 @@ function Zo({ node: e, parent: t }) {
|
|
|
1990
1971
|
let i = r.value;
|
|
1991
1972
|
if (i.length > 1 && i.startsWith(" ") && i.endsWith(" ")) return i.slice(1, -1);
|
|
1992
1973
|
}
|
|
1993
|
-
function
|
|
1974
|
+
function as({ parent: e }) {
|
|
1994
1975
|
if (e?.type === "TaggedTemplateExpression") return e.tag.type === "Identifier" ? e.tag.name : e.tag;
|
|
1995
1976
|
}
|
|
1996
|
-
function
|
|
1977
|
+
function os(e, t) {
|
|
1997
1978
|
return e.noEmbeddedIdentificationByComment?.includes(t) ?? !1 ? function* (e) {} : function* (t) {
|
|
1998
|
-
let n = e[
|
|
1999
|
-
n[0] === "9ff2b366e8ca4c97b9aed1a29b5b94ed" ? yield* e[
|
|
1979
|
+
let n = e[C(t)] ?? ["9ff2b366e8ca4c97b9aed1a29b5b94ed"];
|
|
1980
|
+
n[0] === "9ff2b366e8ca4c97b9aed1a29b5b94ed" ? yield* e[S(t)] ?? [] : yield* n;
|
|
2000
1981
|
};
|
|
2001
1982
|
}
|
|
2002
|
-
function
|
|
1983
|
+
function ss(e, t) {
|
|
2003
1984
|
return typeof t == "string" ? e.noEmbeddedIdentificationByTag?.includes(t) ?? !1 ? function* (e) {} : function* (t) {
|
|
2004
|
-
let n = e[
|
|
2005
|
-
n[0] === "9ff2b366e8ca4c97b9aed1a29b5b94ed" ? yield* e[
|
|
1985
|
+
let n = e[w(t)] ?? ["9ff2b366e8ca4c97b9aed1a29b5b94ed"];
|
|
1986
|
+
n[0] === "9ff2b366e8ca4c97b9aed1a29b5b94ed" ? yield* e[S(t)] ?? [] : yield* n;
|
|
2006
1987
|
} : function* (t) {
|
|
2007
|
-
let n = e[
|
|
1988
|
+
let n = e[w(t)] ?? ["9ff2b366e8ca4c97b9aed1a29b5b94ed"];
|
|
2008
1989
|
if (n[0] === "9ff2b366e8ca4c97b9aed1a29b5b94ed") {
|
|
2009
1990
|
let { noEmbeddedIdentificationByTag: n } = e;
|
|
2010
|
-
for (let r of e[
|
|
1991
|
+
for (let r of e[S(t)] ?? []) n?.includes(r) || (yield r);
|
|
2011
1992
|
} else yield* n;
|
|
2012
1993
|
};
|
|
2013
1994
|
}
|
|
2014
|
-
function
|
|
2015
|
-
let a =
|
|
1995
|
+
function cs(e, t, n, r, i) {
|
|
1996
|
+
let a = Po[t];
|
|
2016
1997
|
if (!a) return null;
|
|
2017
1998
|
if (e.quasis.length === 1 && e.quasis[0]?.value.raw.trim() === "") return "``";
|
|
2018
|
-
let o =
|
|
1999
|
+
let o = es(i, {
|
|
2019
2000
|
commentOrTag: n,
|
|
2020
2001
|
kind: r
|
|
2021
2002
|
});
|
|
@@ -2025,76 +2006,76 @@ function ts(e, t, n, r, i) {
|
|
|
2025
2006
|
kind: r,
|
|
2026
2007
|
embeddedOverrideOptions: await o
|
|
2027
2008
|
});
|
|
2028
|
-
return
|
|
2009
|
+
return qo({
|
|
2029
2010
|
embed: !0,
|
|
2030
2011
|
...t.label
|
|
2031
2012
|
}, t);
|
|
2032
2013
|
};
|
|
2033
2014
|
}
|
|
2034
|
-
function
|
|
2035
|
-
return Object.is(e, t) ? !0 : e === null || t === null ? !1 : Array.isArray(e) ?
|
|
2015
|
+
function ls(e, t, n) {
|
|
2016
|
+
return Object.is(e, t) ? !0 : e === null || t === null ? !1 : Array.isArray(e) ? us(e, t, n) : typeof e == "object" && ds(e, t, n);
|
|
2036
2017
|
}
|
|
2037
|
-
function
|
|
2018
|
+
function us(e, t, n) {
|
|
2038
2019
|
let r = e.length;
|
|
2039
2020
|
if (r !== t.length) return !1;
|
|
2040
|
-
for (let i = 0; i < r; i++) if (!
|
|
2021
|
+
for (let i = 0; i < r; i++) if (!ls(e[i], t[i], n)) return !1;
|
|
2041
2022
|
return !0;
|
|
2042
2023
|
}
|
|
2043
|
-
function
|
|
2044
|
-
for (let r of Object.keys(e)) if (!n?.has(r) && !(Object.hasOwn(t, r) &&
|
|
2024
|
+
function ds(e, t, n) {
|
|
2025
|
+
for (let r of Object.keys(e)) if (!n?.has(r) && !(Object.hasOwn(t, r) && ls(e[r], t[r], n))) return !1;
|
|
2045
2026
|
return !0;
|
|
2046
2027
|
}
|
|
2047
2028
|
//#endregion
|
|
2048
2029
|
//#region src/printers.ts
|
|
2049
|
-
var { estree:
|
|
2030
|
+
var { estree: fs } = s, { embed: ps } = fs, ms = /* @__PURE__ */ new WeakMap(), hs = (e, t) => {
|
|
2050
2031
|
let { node: n } = e;
|
|
2051
2032
|
if (n.type !== "TemplateLiteral" || n.quasis.some(({ value: { cooked: e } }) => e === null)) return null;
|
|
2052
|
-
let r =
|
|
2033
|
+
let r = is(e);
|
|
2053
2034
|
if (typeof r == "string") {
|
|
2054
|
-
let i =
|
|
2055
|
-
for (let e of
|
|
2035
|
+
let i = os(t, r);
|
|
2036
|
+
for (let e of Q) {
|
|
2056
2037
|
let a = !1;
|
|
2057
2038
|
for (let t of i(e)) if (r === t) {
|
|
2058
2039
|
a = !0;
|
|
2059
2040
|
break;
|
|
2060
2041
|
}
|
|
2061
|
-
if (a) return
|
|
2042
|
+
if (a) return cs(n, e, r, "comment", t);
|
|
2062
2043
|
}
|
|
2063
|
-
return
|
|
2044
|
+
return ps?.(e, t) ?? null;
|
|
2064
2045
|
}
|
|
2065
|
-
let i =
|
|
2046
|
+
let i = as(e);
|
|
2066
2047
|
if (typeof i == "string") {
|
|
2067
|
-
let r =
|
|
2068
|
-
for (let e of
|
|
2048
|
+
let r = ss(t, i);
|
|
2049
|
+
for (let e of Q) {
|
|
2069
2050
|
let a;
|
|
2070
|
-
for (let t of r(e)) if (i === t ||
|
|
2051
|
+
for (let t of r(e)) if (i === t || ns({
|
|
2071
2052
|
type: "Identifier",
|
|
2072
2053
|
name: i
|
|
2073
2054
|
}, t)) {
|
|
2074
2055
|
a = t;
|
|
2075
2056
|
break;
|
|
2076
2057
|
}
|
|
2077
|
-
if (a !== void 0) return
|
|
2058
|
+
if (a !== void 0) return cs(n, e, a, "tag", t);
|
|
2078
2059
|
}
|
|
2079
|
-
return
|
|
2060
|
+
return ps?.(e, t) ?? null;
|
|
2080
2061
|
}
|
|
2081
2062
|
if (i !== void 0) {
|
|
2082
|
-
let e =
|
|
2083
|
-
e || (e = /* @__PURE__ */ new Map(),
|
|
2084
|
-
let r = (e) =>
|
|
2085
|
-
for (let o of
|
|
2063
|
+
let e = ms.get(t);
|
|
2064
|
+
e || (e = /* @__PURE__ */ new Map(), ms.set(t, e));
|
|
2065
|
+
let r = (e) => Uo[t.parser].parse(e, t), a = ss(t);
|
|
2066
|
+
for (let o of Q) {
|
|
2086
2067
|
let s;
|
|
2087
|
-
for (let t of a(o)) if (
|
|
2068
|
+
for (let t of a(o)) if (rs(i, t, r, e)) {
|
|
2088
2069
|
s = t;
|
|
2089
2070
|
break;
|
|
2090
2071
|
}
|
|
2091
|
-
if (s !== void 0) return
|
|
2072
|
+
if (s !== void 0) return cs(n, o, s, "tag", t);
|
|
2092
2073
|
}
|
|
2093
2074
|
}
|
|
2094
|
-
return
|
|
2095
|
-
},
|
|
2096
|
-
...
|
|
2097
|
-
embed:
|
|
2075
|
+
return ps?.(e, t) ?? null;
|
|
2076
|
+
}, gs = { estree: {
|
|
2077
|
+
...fs,
|
|
2078
|
+
embed: hs
|
|
2098
2079
|
} };
|
|
2099
2080
|
//#endregion
|
|
2100
|
-
export {
|
|
2081
|
+
export { Ho as options, Uo as parsers, gs as printers };
|