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