prettier-plugin-embed 0.4.10 → 0.4.12
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 +578 -89
- package/dist/embedded/css/options.d.ts +36 -11
- package/dist/embedded/es/options.d.ts +36 -11
- package/dist/embedded/glsl/options.d.ts +36 -11
- package/dist/embedded/graphql/options.d.ts +36 -10
- package/dist/embedded/html/options.d.ts +36 -11
- package/dist/embedded/index.d.ts +2 -2
- package/dist/embedded/ini/options.d.ts +36 -10
- package/dist/embedded/java/options.d.ts +36 -5
- package/dist/embedded/json/options.d.ts +37 -11
- package/dist/embedded/jsonata/options.d.ts +36 -5
- package/dist/embedded/latex/options.d.ts +36 -10
- package/dist/embedded/markdown/options.d.ts +36 -11
- package/dist/embedded/nginx/options.d.ts +36 -5
- package/dist/embedded/noop/options.d.ts +29 -3
- package/dist/embedded/pegjs/options.d.ts +36 -5
- package/dist/embedded/php/options.d.ts +36 -11
- package/dist/embedded/prisma/options.d.ts +36 -5
- package/dist/embedded/properties/options.d.ts +36 -10
- package/dist/embedded/pug/options.d.ts +36 -5
- package/dist/embedded/ruby/options.d.ts +36 -10
- package/dist/embedded/sh/options.d.ts +36 -10
- package/dist/embedded/sql/options.d.ts +36 -11
- package/dist/embedded/toml/options.d.ts +36 -10
- package/dist/embedded/ts/options.d.ts +37 -12
- package/dist/embedded/types.d.ts +8 -2
- package/dist/embedded/utils.d.ts +3 -1
- package/dist/embedded/xml/options.d.ts +36 -11
- package/dist/embedded/yaml/options.d.ts +36 -10
- package/dist/index.js +1570 -1087
- package/dist/options.d.ts +509 -11
- package/dist/types.d.ts +36 -6
- package/dist/utils.d.ts +136 -5
- package/package.json +14 -17
package/dist/index.js
CHANGED
|
@@ -1,74 +1,75 @@
|
|
|
1
|
-
import { builders as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { printers as
|
|
8
|
-
import { resolveConfigFile as
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { builders as T, utils as si } from "prettier/doc";
|
|
2
|
+
import Ei from "prettier/parser-babel";
|
|
3
|
+
import bi from "prettier/parser-espree";
|
|
4
|
+
import fi from "prettier/parser-flow";
|
|
5
|
+
import yi from "prettier/parser-meriyah";
|
|
6
|
+
import _i from "prettier/parser-typescript";
|
|
7
|
+
import { printers as $i } from "prettier/plugins/estree.mjs";
|
|
8
|
+
import { resolveConfigFile as vi } from "prettier";
|
|
9
|
+
import { builders as Di } from "prettier/doc.js";
|
|
10
|
+
const { group: Mi, indent: Ti, softline: qe, hardline: Ai, lineSuffixBoundary: Si } = T, { mapDoc: Li } = si;
|
|
11
|
+
function ki(e, t) {
|
|
11
12
|
const { node: n } = e;
|
|
12
13
|
let r = t();
|
|
13
|
-
return n?.comments?.length && (r =
|
|
14
|
+
return n?.comments?.length && (r = Mi([Ti([qe, r]), qe])), ["${", r, Si, "}"];
|
|
14
15
|
}
|
|
15
|
-
function
|
|
16
|
+
function S(e, t) {
|
|
16
17
|
return e.map(
|
|
17
|
-
(n) =>
|
|
18
|
+
(n) => ki(n, t),
|
|
18
19
|
"expressions"
|
|
19
20
|
);
|
|
20
21
|
}
|
|
21
|
-
function
|
|
22
|
-
return
|
|
23
|
-
if (typeof
|
|
24
|
-
return
|
|
25
|
-
const s = [],
|
|
26
|
-
for (let
|
|
27
|
-
let
|
|
28
|
-
if (
|
|
29
|
-
if (!
|
|
22
|
+
function A(e, t, n, r = !1) {
|
|
23
|
+
return Li(e, (a) => {
|
|
24
|
+
if (typeof a != "string")
|
|
25
|
+
return a;
|
|
26
|
+
const s = [], l = a.split(t);
|
|
27
|
+
for (let u = 0; u < l.length; u++) {
|
|
28
|
+
let E = l[u];
|
|
29
|
+
if (u % 2 === 0) {
|
|
30
|
+
if (!E)
|
|
30
31
|
continue;
|
|
31
|
-
if (
|
|
32
|
-
for (const
|
|
33
|
-
|
|
34
|
-
` ? s.push(
|
|
32
|
+
if (E = E.replaceAll(/([\\`]|\${)/g, "\\$1"), r)
|
|
33
|
+
for (const d of E.split(/(\n)/))
|
|
34
|
+
d === `
|
|
35
|
+
` ? s.push(Ai) : s.push(d);
|
|
35
36
|
else
|
|
36
|
-
s.push(
|
|
37
|
+
s.push(E);
|
|
37
38
|
} else {
|
|
38
|
-
const
|
|
39
|
-
s.push(n[
|
|
39
|
+
const d = Number(E);
|
|
40
|
+
s.push(n[d]);
|
|
40
41
|
}
|
|
41
42
|
}
|
|
42
43
|
return s;
|
|
43
44
|
});
|
|
44
45
|
}
|
|
45
|
-
function
|
|
46
|
+
function N(e, t, n) {
|
|
46
47
|
if (!(t.plugins?.some(
|
|
47
48
|
(r) => r.name?.match(
|
|
48
|
-
new RegExp(`(^|/)${
|
|
49
|
+
new RegExp(`(^|/)${Pe(e)}($|/)`)
|
|
49
50
|
) ?? !1
|
|
50
51
|
) ?? !1))
|
|
51
52
|
throw new Error(
|
|
52
53
|
`Cannot format embedded language identified by "${n}", because plugin "${e}" is not loaded.`
|
|
53
54
|
);
|
|
54
55
|
}
|
|
55
|
-
function
|
|
56
|
+
function Gi(e, t, n) {
|
|
56
57
|
if (t === n) {
|
|
57
58
|
e.unshift(t);
|
|
58
59
|
return;
|
|
59
60
|
}
|
|
60
|
-
let r = 0,
|
|
61
|
-
for (; r <
|
|
62
|
-
const
|
|
63
|
-
if (e[
|
|
61
|
+
let r = 0, i = e.length;
|
|
62
|
+
for (; r < i; ) {
|
|
63
|
+
const a = r + i >>> 1;
|
|
64
|
+
if (e[a] === n) {
|
|
64
65
|
e.push(t);
|
|
65
66
|
return;
|
|
66
67
|
}
|
|
67
|
-
e[
|
|
68
|
+
e[a] < t ? r = a + 1 : i = a;
|
|
68
69
|
}
|
|
69
70
|
e.splice(r, 0, t);
|
|
70
71
|
}
|
|
71
|
-
const
|
|
72
|
+
const he = (() => {
|
|
72
73
|
const e = [...Array(26).keys()].map((t) => String.fromCharCode(t + 97)).concat([...Array(10).keys()].map((t) => `${t}`));
|
|
73
74
|
return () => {
|
|
74
75
|
let n = "";
|
|
@@ -77,108 +78,129 @@ const ne = (() => {
|
|
|
77
78
|
return n;
|
|
78
79
|
};
|
|
79
80
|
})();
|
|
80
|
-
function
|
|
81
|
-
const n =
|
|
82
|
-
`${
|
|
81
|
+
function L(e = "p", t = "") {
|
|
82
|
+
const n = he(), r = he(), i = Pe(e), a = Pe(t), s = (u) => `${e}${n}${u}${r}${t}`, l = new RegExp(
|
|
83
|
+
`${i}${n}(\\d+)${r}${a}`,
|
|
83
84
|
"ig"
|
|
84
85
|
);
|
|
85
86
|
return {
|
|
86
87
|
createPlaceholder: s,
|
|
87
|
-
placeholderRegex:
|
|
88
|
+
placeholderRegex: l
|
|
88
89
|
};
|
|
89
90
|
}
|
|
90
|
-
function
|
|
91
|
+
function Pe(e) {
|
|
91
92
|
return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
92
93
|
}
|
|
93
|
-
function
|
|
94
|
+
function v(e) {
|
|
94
95
|
return `${e}Identifiers`;
|
|
95
96
|
}
|
|
96
|
-
function
|
|
97
|
+
function M(e) {
|
|
98
|
+
return `${e}Comments`;
|
|
99
|
+
}
|
|
100
|
+
function D(e) {
|
|
101
|
+
return `${e}Tags`;
|
|
102
|
+
}
|
|
103
|
+
function Ni(e) {
|
|
97
104
|
return `${e}Plugin`;
|
|
98
105
|
}
|
|
99
|
-
function
|
|
106
|
+
function x(e) {
|
|
100
107
|
return `${e}Parser`;
|
|
101
108
|
}
|
|
102
|
-
const { line:
|
|
109
|
+
const { line: je, group: O, indent: Ue, softline: Re } = T, xi = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
|
|
103
110
|
const s = {
|
|
104
111
|
...r,
|
|
105
|
-
...
|
|
106
|
-
}, { node:
|
|
107
|
-
(m, g, { length:
|
|
108
|
-
).join(""),
|
|
109
|
-
|
|
110
|
-
-
|
|
111
|
-
), b =
|
|
112
|
+
...a
|
|
113
|
+
}, { node: l } = n, { createPlaceholder: u, placeholderRegex: E } = L("@p"), d = l.quasis.map(
|
|
114
|
+
(m, g, { length: y }) => g === y - 1 ? m.value.cooked : m.value.cooked + u(g)
|
|
115
|
+
).join(""), c = d.match(/^\s+/)?.[0] ?? "", p = d.match(/\s+$/)?.[0] ?? "", f = d.slice(
|
|
116
|
+
c.length,
|
|
117
|
+
-p.length || void 0
|
|
118
|
+
), b = S(n, t), _ = await e(f, {
|
|
112
119
|
...s,
|
|
113
120
|
parser: s.embeddedCssParser ?? "scss"
|
|
114
|
-
}),
|
|
115
|
-
if (s.preserveEmbeddedExteriorWhitespaces?.includes(
|
|
116
|
-
return
|
|
121
|
+
}), o = A(_, E, b);
|
|
122
|
+
if (s.preserveEmbeddedExteriorWhitespaces?.includes(i))
|
|
123
|
+
return O([
|
|
117
124
|
"`",
|
|
118
|
-
|
|
119
|
-
s.noEmbeddedMultiLineIndentation?.includes(
|
|
120
|
-
|
|
125
|
+
c,
|
|
126
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [O(o)] : Ue([O(o)]),
|
|
127
|
+
p,
|
|
121
128
|
"`"
|
|
122
129
|
]);
|
|
123
|
-
const
|
|
124
|
-
return
|
|
130
|
+
const h = c.length ? je : Re, $ = p.length ? je : Re;
|
|
131
|
+
return O([
|
|
125
132
|
"`",
|
|
126
|
-
s.noEmbeddedMultiLineIndentation?.includes(
|
|
127
|
-
|
|
133
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h, O(o)] : Ue([h, O(o)]),
|
|
134
|
+
$,
|
|
128
135
|
"`"
|
|
129
136
|
]);
|
|
130
|
-
},
|
|
131
|
-
[
|
|
137
|
+
}, re = "embeddedCss", Ii = ["css"], Oi = ["css", "less", "scss"], Pi = v(re), Ce = M(re), we = D(re), Bi = x(re), qi = {
|
|
138
|
+
[Pi]: {
|
|
139
|
+
category: "Embed",
|
|
140
|
+
type: "string",
|
|
141
|
+
array: !0,
|
|
142
|
+
default: [{ value: [...Ii] }],
|
|
143
|
+
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded CSS language.",
|
|
144
|
+
deprecated: `Please use \`${Ce}\` or \`${we}\`.`
|
|
145
|
+
},
|
|
146
|
+
[Ce]: {
|
|
147
|
+
category: "Embed",
|
|
148
|
+
type: "string",
|
|
149
|
+
array: !0,
|
|
150
|
+
default: [{ value: [] }],
|
|
151
|
+
description: "Block comments that make their subsequent template literals be identified as embedded CSS language."
|
|
152
|
+
},
|
|
153
|
+
[we]: {
|
|
132
154
|
category: "Embed",
|
|
133
155
|
type: "string",
|
|
134
156
|
array: !0,
|
|
135
|
-
default: [{ value: [
|
|
136
|
-
description: "
|
|
157
|
+
default: [{ value: [] }],
|
|
158
|
+
description: "Tags that make their subsequent template literals be identified as embedded CSS language."
|
|
137
159
|
},
|
|
138
|
-
[
|
|
160
|
+
[Bi]: {
|
|
139
161
|
category: "Embed",
|
|
140
162
|
type: "choice",
|
|
141
163
|
default: "scss",
|
|
142
164
|
description: "The parser used to parse the embedded CSS language.",
|
|
143
|
-
choices:
|
|
165
|
+
choices: Oi.map((e) => ({
|
|
144
166
|
value: e,
|
|
145
167
|
description: `Use the "${e}" parser.`
|
|
146
168
|
}))
|
|
147
169
|
}
|
|
148
|
-
},
|
|
170
|
+
}, ji = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
149
171
|
__proto__: null,
|
|
150
|
-
embedder:
|
|
151
|
-
language:
|
|
152
|
-
options:
|
|
153
|
-
}, Symbol.toStringTag, { value: "Module" })), { line:
|
|
172
|
+
embedder: xi,
|
|
173
|
+
language: re,
|
|
174
|
+
options: qi
|
|
175
|
+
}, Symbol.toStringTag, { value: "Module" })), { line: Fe, group: P, indent: We, softline: ze } = T, Ui = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
|
|
154
176
|
const s = {
|
|
155
177
|
...r,
|
|
156
|
-
...
|
|
157
|
-
}, { node:
|
|
158
|
-
(m, g, { length:
|
|
159
|
-
).join(""),
|
|
160
|
-
|
|
161
|
-
-
|
|
162
|
-
), b =
|
|
178
|
+
...a
|
|
179
|
+
}, { node: l } = n, { createPlaceholder: u, placeholderRegex: E } = L(), d = l.quasis.map(
|
|
180
|
+
(m, g, { length: y }) => g === y - 1 ? m.value.cooked : m.value.cooked + u(g)
|
|
181
|
+
).join(""), c = d.match(/^\s+/)?.[0] ?? "", p = d.match(/\s+$/)?.[0] ?? "", f = d.slice(
|
|
182
|
+
c.length,
|
|
183
|
+
-p.length || void 0
|
|
184
|
+
), b = S(n, t), _ = await e(f, {
|
|
163
185
|
...s,
|
|
164
186
|
parser: s.embeddedEsParser ?? "babel"
|
|
165
|
-
}),
|
|
166
|
-
if (s.preserveEmbeddedExteriorWhitespaces?.includes(
|
|
167
|
-
return
|
|
187
|
+
}), o = A(_, E, b);
|
|
188
|
+
if (s.preserveEmbeddedExteriorWhitespaces?.includes(i))
|
|
189
|
+
return P([
|
|
168
190
|
"`",
|
|
169
|
-
|
|
170
|
-
s.noEmbeddedMultiLineIndentation?.includes(
|
|
171
|
-
|
|
191
|
+
c,
|
|
192
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [P(o)] : We([P(o)]),
|
|
193
|
+
p,
|
|
172
194
|
"`"
|
|
173
195
|
]);
|
|
174
|
-
const
|
|
175
|
-
return
|
|
196
|
+
const h = c.length ? Fe : ze, $ = p.length ? Fe : ze;
|
|
197
|
+
return P([
|
|
176
198
|
"`",
|
|
177
|
-
s.noEmbeddedMultiLineIndentation?.includes(
|
|
178
|
-
|
|
199
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h, P(o)] : We([h, P(o)]),
|
|
200
|
+
$,
|
|
179
201
|
"`"
|
|
180
202
|
]);
|
|
181
|
-
},
|
|
203
|
+
}, oe = "embeddedEs", Ri = [
|
|
182
204
|
"js",
|
|
183
205
|
"jsx",
|
|
184
206
|
"es",
|
|
@@ -187,307 +209,397 @@ const { line: Ee, group: A, indent: _e, softline: ye } = $, Mn = async (e, t, n,
|
|
|
187
209
|
"cjs",
|
|
188
210
|
"pac",
|
|
189
211
|
"javascript"
|
|
190
|
-
],
|
|
212
|
+
], Ci = [
|
|
191
213
|
"babel",
|
|
192
214
|
"babel-flow",
|
|
193
215
|
"acorn",
|
|
194
216
|
"espree",
|
|
195
217
|
"flow",
|
|
196
218
|
"meriyah"
|
|
197
|
-
],
|
|
198
|
-
[
|
|
219
|
+
], wi = v(oe), Ke = M(oe), Je = D(oe), Fi = x(oe), Wi = {
|
|
220
|
+
[wi]: {
|
|
199
221
|
category: "Embed",
|
|
200
222
|
type: "string",
|
|
201
223
|
array: !0,
|
|
202
|
-
default: [{ value: [...
|
|
203
|
-
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded ECMAScript/JavaScript language."
|
|
224
|
+
default: [{ value: [...Ri] }],
|
|
225
|
+
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded ECMAScript/JavaScript language.",
|
|
226
|
+
deprecated: `Please use \`${Ke}\` or \`${Je}\`.`
|
|
204
227
|
},
|
|
205
|
-
[
|
|
228
|
+
[Ke]: {
|
|
229
|
+
category: "Embed",
|
|
230
|
+
type: "string",
|
|
231
|
+
array: !0,
|
|
232
|
+
default: [{ value: [] }],
|
|
233
|
+
description: "Block comments that make their subsequent template literals be identified as embedded ECMAScript/JavaScript language."
|
|
234
|
+
},
|
|
235
|
+
[Je]: {
|
|
236
|
+
category: "Embed",
|
|
237
|
+
type: "string",
|
|
238
|
+
array: !0,
|
|
239
|
+
default: [{ value: [] }],
|
|
240
|
+
description: "Tags that make their subsequent template literals be identified as embedded ECMAScript/JavaScript language."
|
|
241
|
+
},
|
|
242
|
+
[Fi]: {
|
|
206
243
|
category: "Embed",
|
|
207
244
|
type: "choice",
|
|
208
245
|
default: "babel",
|
|
209
246
|
description: "The parser used to parse the embedded ECMASCript/JavaScript language.",
|
|
210
|
-
choices:
|
|
247
|
+
choices: Ci.map((e) => ({
|
|
211
248
|
value: e,
|
|
212
249
|
description: `Use the "${e}" parser.`
|
|
213
250
|
}))
|
|
214
251
|
}
|
|
215
|
-
},
|
|
252
|
+
}, zi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
216
253
|
__proto__: null,
|
|
217
|
-
embedder:
|
|
218
|
-
language:
|
|
219
|
-
options:
|
|
220
|
-
}, Symbol.toStringTag, { value: "Module" })), { line:
|
|
221
|
-
|
|
254
|
+
embedder: Ui,
|
|
255
|
+
language: oe,
|
|
256
|
+
options: Wi
|
|
257
|
+
}, Symbol.toStringTag, { value: "Module" })), { line: He, group: B, indent: Xe, softline: Qe } = T, Ki = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
|
|
258
|
+
N("prettier-plugin-glsl", r, i);
|
|
222
259
|
const s = {
|
|
223
260
|
...r,
|
|
224
|
-
...
|
|
225
|
-
}, { node:
|
|
226
|
-
(m, g, { length:
|
|
227
|
-
).join(""),
|
|
228
|
-
|
|
229
|
-
-
|
|
230
|
-
), b =
|
|
261
|
+
...a
|
|
262
|
+
}, { node: l } = n, { createPlaceholder: u, placeholderRegex: E } = L(), d = l.quasis.map(
|
|
263
|
+
(m, g, { length: y }) => g === y - 1 ? m.value.cooked : m.value.cooked + u(g)
|
|
264
|
+
).join(""), c = d.match(/^\s+/)?.[0] ?? "", p = d.match(/\s+$/)?.[0] ?? "", f = d.slice(
|
|
265
|
+
c.length,
|
|
266
|
+
-p.length || void 0
|
|
267
|
+
), b = S(n, t), _ = await e(f, {
|
|
231
268
|
...s,
|
|
232
269
|
parser: "glsl-parser"
|
|
233
|
-
}),
|
|
234
|
-
if (s.preserveEmbeddedExteriorWhitespaces?.includes(
|
|
235
|
-
return
|
|
270
|
+
}), o = A(_, E, b);
|
|
271
|
+
if (s.preserveEmbeddedExteriorWhitespaces?.includes(i))
|
|
272
|
+
return B([
|
|
236
273
|
"`",
|
|
237
|
-
|
|
238
|
-
s.noEmbeddedMultiLineIndentation?.includes(
|
|
239
|
-
|
|
274
|
+
c,
|
|
275
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [B(o)] : Xe([B(o)]),
|
|
276
|
+
p,
|
|
240
277
|
"`"
|
|
241
278
|
]);
|
|
242
|
-
const
|
|
243
|
-
return
|
|
279
|
+
const h = c.length ? He : Qe, $ = p.length ? He : Qe;
|
|
280
|
+
return B([
|
|
244
281
|
"`",
|
|
245
|
-
s.noEmbeddedMultiLineIndentation?.includes(
|
|
246
|
-
|
|
282
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h, B(o)] : Xe([h, B(o)]),
|
|
283
|
+
$,
|
|
247
284
|
"`"
|
|
248
285
|
]);
|
|
249
|
-
},
|
|
250
|
-
[
|
|
286
|
+
}, be = "embeddedGlsl", Ji = ["glsl", "shader"], Hi = v(be), Ye = M(be), Ve = D(be), Xi = {
|
|
287
|
+
[Hi]: {
|
|
288
|
+
category: "Embed",
|
|
289
|
+
type: "string",
|
|
290
|
+
array: !0,
|
|
291
|
+
default: [{ value: [...Ji] }],
|
|
292
|
+
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.",
|
|
293
|
+
deprecated: `Please use \`${Ye}\` or \`${Ve}\`.`
|
|
294
|
+
},
|
|
295
|
+
[Ye]: {
|
|
296
|
+
category: "Embed",
|
|
297
|
+
type: "string",
|
|
298
|
+
array: !0,
|
|
299
|
+
default: [{ value: [] }],
|
|
300
|
+
description: "Block comments that make their subsequent template literals be identified as embedded GLSL language. This option requires the `prettier-plugin-glsl` plugin."
|
|
301
|
+
},
|
|
302
|
+
[Ve]: {
|
|
251
303
|
category: "Embed",
|
|
252
304
|
type: "string",
|
|
253
305
|
array: !0,
|
|
254
|
-
default: [{ value: [
|
|
255
|
-
description: "
|
|
306
|
+
default: [{ value: [] }],
|
|
307
|
+
description: "Tags that make their subsequent template literals be identified as embedded GLSL language. This option requires the `prettier-plugin-glsl` plugin."
|
|
256
308
|
}
|
|
257
|
-
},
|
|
309
|
+
}, Qi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
258
310
|
__proto__: null,
|
|
259
|
-
embedder:
|
|
260
|
-
language:
|
|
261
|
-
options:
|
|
262
|
-
}, Symbol.toStringTag, { value: "Module" })), { line:
|
|
311
|
+
embedder: Ki,
|
|
312
|
+
language: be,
|
|
313
|
+
options: Xi
|
|
314
|
+
}, Symbol.toStringTag, { value: "Module" })), { line: Ze, group: q, indent: et, softline: tt } = T, Yi = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
|
|
263
315
|
const s = {
|
|
264
316
|
...r,
|
|
265
|
-
...
|
|
266
|
-
}, { node:
|
|
267
|
-
(m, g, { length:
|
|
268
|
-
).join(""),
|
|
269
|
-
|
|
270
|
-
-
|
|
271
|
-
), b =
|
|
317
|
+
...a
|
|
318
|
+
}, { node: l } = n, { createPlaceholder: u, placeholderRegex: E } = L(), d = l.quasis.map(
|
|
319
|
+
(m, g, { length: y }) => g === y - 1 ? m.value.cooked : m.value.cooked + u(g)
|
|
320
|
+
).join(""), c = d.match(/^\s+/)?.[0] ?? "", p = d.match(/\s+$/)?.[0] ?? "", f = d.slice(
|
|
321
|
+
c.length,
|
|
322
|
+
-p.length || void 0
|
|
323
|
+
), b = S(n, t), _ = await e(f, {
|
|
272
324
|
...s,
|
|
273
325
|
parser: "graphql"
|
|
274
|
-
}),
|
|
275
|
-
if (s.preserveEmbeddedExteriorWhitespaces?.includes(
|
|
276
|
-
return
|
|
326
|
+
}), o = A(_, E, b);
|
|
327
|
+
if (s.preserveEmbeddedExteriorWhitespaces?.includes(i))
|
|
328
|
+
return q([
|
|
277
329
|
"`",
|
|
278
|
-
|
|
279
|
-
s.noEmbeddedMultiLineIndentation?.includes(
|
|
280
|
-
|
|
330
|
+
c,
|
|
331
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [q(o)] : et([q(o)]),
|
|
332
|
+
p,
|
|
281
333
|
"`"
|
|
282
334
|
]);
|
|
283
|
-
const
|
|
284
|
-
return
|
|
335
|
+
const h = c.length ? Ze : tt, $ = p.length ? Ze : tt;
|
|
336
|
+
return q([
|
|
285
337
|
"`",
|
|
286
|
-
s.noEmbeddedMultiLineIndentation?.includes(
|
|
287
|
-
|
|
338
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h, q(o)] : et([h, q(o)]),
|
|
339
|
+
$,
|
|
288
340
|
"`"
|
|
289
341
|
]);
|
|
290
|
-
},
|
|
291
|
-
[
|
|
342
|
+
}, fe = "embeddedGraphql", Vi = ["graphql", "gql"], Zi = v(fe), nt = M(fe), it = D(fe), es = {
|
|
343
|
+
[Zi]: {
|
|
292
344
|
category: "Embed",
|
|
293
345
|
type: "string",
|
|
294
346
|
array: !0,
|
|
295
|
-
default: [{ value: [...
|
|
296
|
-
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded GraphQL language."
|
|
347
|
+
default: [{ value: [...Vi] }],
|
|
348
|
+
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded GraphQL language.",
|
|
349
|
+
deprecated: `Please use \`${nt}\` or \`${it}\`.`
|
|
350
|
+
},
|
|
351
|
+
[nt]: {
|
|
352
|
+
category: "Embed",
|
|
353
|
+
type: "string",
|
|
354
|
+
array: !0,
|
|
355
|
+
default: [{ value: [] }],
|
|
356
|
+
description: "Block comments that make their subsequent template literals be identified as embedded GraphQL language."
|
|
357
|
+
},
|
|
358
|
+
[it]: {
|
|
359
|
+
category: "Embed",
|
|
360
|
+
type: "string",
|
|
361
|
+
array: !0,
|
|
362
|
+
default: [{ value: [] }],
|
|
363
|
+
description: "Tags that make their subsequent template literals be identified as embedded GraphQL language."
|
|
297
364
|
}
|
|
298
|
-
},
|
|
365
|
+
}, ts = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
299
366
|
__proto__: null,
|
|
300
|
-
embedder:
|
|
301
|
-
language:
|
|
302
|
-
options:
|
|
303
|
-
}, Symbol.toStringTag, { value: "Module" })), { line:
|
|
367
|
+
embedder: Yi,
|
|
368
|
+
language: fe,
|
|
369
|
+
options: es
|
|
370
|
+
}, Symbol.toStringTag, { value: "Module" })), { line: st, group: j, indent: rt, softline: ot } = T, { mapDoc: ns } = si, is = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
|
|
304
371
|
const s = {
|
|
305
372
|
...r,
|
|
306
|
-
...
|
|
307
|
-
}, { node:
|
|
308
|
-
(m, g, { length:
|
|
309
|
-
).join(""),
|
|
310
|
-
|
|
311
|
-
-
|
|
312
|
-
), b =
|
|
373
|
+
...a
|
|
374
|
+
}, { node: l } = n, { createPlaceholder: u, placeholderRegex: E } = L(), d = l.quasis.map(
|
|
375
|
+
(m, g, { length: y }) => g === y - 1 ? m.value.cooked : m.value.cooked + u(g)
|
|
376
|
+
).join(""), c = d.match(/^\s+/)?.[0] ?? "", p = d.match(/\s+$/)?.[0] ?? "", f = d.slice(
|
|
377
|
+
c.length,
|
|
378
|
+
-p.length || void 0
|
|
379
|
+
), b = S(n, t), _ = await e(f, {
|
|
313
380
|
...s,
|
|
314
381
|
parser: s.embeddedHtmlParser ?? "html"
|
|
315
|
-
}),
|
|
382
|
+
}), o = ns(_, (m) => {
|
|
316
383
|
if (typeof m != "string")
|
|
317
384
|
return m;
|
|
318
|
-
const g = [],
|
|
319
|
-
for (let
|
|
320
|
-
let
|
|
321
|
-
if (
|
|
322
|
-
if (!
|
|
385
|
+
const g = [], y = m.split(E);
|
|
386
|
+
for (let k = 0; k < y.length; k++) {
|
|
387
|
+
let G = y[k];
|
|
388
|
+
if (k % 2 === 0) {
|
|
389
|
+
if (!G)
|
|
323
390
|
continue;
|
|
324
|
-
|
|
391
|
+
G = G.replaceAll(/([\\`]|\${)/g, "\\$1"), s.__embeddedInHtml && (G = G.replaceAll(/<\/(?=script\b)/gi, "<\\/")), g.push(G);
|
|
325
392
|
} else {
|
|
326
|
-
const
|
|
327
|
-
g.push(b[
|
|
393
|
+
const I = Number(G);
|
|
394
|
+
g.push(b[I]);
|
|
328
395
|
}
|
|
329
396
|
}
|
|
330
397
|
return g;
|
|
331
398
|
});
|
|
332
399
|
if (s.htmlWhitespaceSensitivity === "strict" || // TODO: is css mode should be included here?
|
|
333
|
-
s.htmlWhitespaceSensitivity === "css" || s.preserveEmbeddedExteriorWhitespaces?.includes(
|
|
334
|
-
return
|
|
400
|
+
s.htmlWhitespaceSensitivity === "css" || s.preserveEmbeddedExteriorWhitespaces?.includes(i))
|
|
401
|
+
return j([
|
|
335
402
|
"`",
|
|
336
|
-
|
|
337
|
-
s.noEmbeddedMultiLineIndentation?.includes(
|
|
338
|
-
|
|
403
|
+
c,
|
|
404
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [j(o)] : rt([j(o)]),
|
|
405
|
+
p,
|
|
339
406
|
"`"
|
|
340
407
|
]);
|
|
341
|
-
const
|
|
342
|
-
return
|
|
408
|
+
const h = c.length ? st : ot, $ = p.length ? st : ot;
|
|
409
|
+
return j([
|
|
343
410
|
"`",
|
|
344
|
-
s.noEmbeddedMultiLineIndentation?.includes(
|
|
345
|
-
|
|
411
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h, j(o)] : rt([h, j(o)]),
|
|
412
|
+
$,
|
|
346
413
|
"`"
|
|
347
414
|
]);
|
|
348
|
-
},
|
|
349
|
-
[
|
|
415
|
+
}, ae = "embeddedHtml", ss = ["html", "xhtml"], rs = ["html", "vue", "angular", "lwc"], os = v(ae), at = M(ae), dt = D(ae), as = x(ae), ds = {
|
|
416
|
+
[os]: {
|
|
350
417
|
category: "Embed",
|
|
351
418
|
type: "string",
|
|
352
419
|
array: !0,
|
|
353
|
-
default: [{ value: [...
|
|
354
|
-
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded HTML language."
|
|
420
|
+
default: [{ value: [...ss] }],
|
|
421
|
+
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded HTML language.",
|
|
422
|
+
deprecated: `Please use \`${at}\` or \`${dt}\`.`
|
|
355
423
|
},
|
|
356
|
-
[
|
|
424
|
+
[at]: {
|
|
425
|
+
category: "Embed",
|
|
426
|
+
type: "string",
|
|
427
|
+
array: !0,
|
|
428
|
+
default: [{ value: [] }],
|
|
429
|
+
description: "Block comments that make their subsequent template literals be identified as embedded HTML language."
|
|
430
|
+
},
|
|
431
|
+
[dt]: {
|
|
432
|
+
category: "Embed",
|
|
433
|
+
type: "string",
|
|
434
|
+
array: !0,
|
|
435
|
+
default: [{ value: [] }],
|
|
436
|
+
description: "Tags that make their subsequent template literals be identified as embedded HTML language."
|
|
437
|
+
},
|
|
438
|
+
[as]: {
|
|
357
439
|
category: "Embed",
|
|
358
440
|
type: "choice",
|
|
359
441
|
default: "html",
|
|
360
442
|
description: "The parser used to parse the embedded HTML language.",
|
|
361
|
-
choices:
|
|
443
|
+
choices: rs.map((e) => ({
|
|
362
444
|
value: e,
|
|
363
445
|
description: `Use the "${e}" parser.`
|
|
364
446
|
}))
|
|
365
447
|
}
|
|
366
|
-
},
|
|
448
|
+
}, ls = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
367
449
|
__proto__: null,
|
|
368
|
-
embedder:
|
|
369
|
-
language:
|
|
370
|
-
options:
|
|
371
|
-
}, Symbol.toStringTag, { value: "Module" })), { line:
|
|
372
|
-
|
|
450
|
+
embedder: is,
|
|
451
|
+
language: ae,
|
|
452
|
+
options: ds
|
|
453
|
+
}, Symbol.toStringTag, { value: "Module" })), { line: lt, group: U, indent: ct, softline: ut } = T, cs = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
|
|
454
|
+
N("prettier-plugin-ini", r, i);
|
|
373
455
|
const s = {
|
|
374
456
|
...r,
|
|
375
|
-
...
|
|
376
|
-
}, { node:
|
|
377
|
-
(m, g, { length:
|
|
378
|
-
).join(""),
|
|
379
|
-
|
|
380
|
-
-
|
|
381
|
-
), b =
|
|
457
|
+
...a
|
|
458
|
+
}, { node: l } = n, { createPlaceholder: u, placeholderRegex: E } = L(), d = l.quasis.map(
|
|
459
|
+
(m, g, { length: y }) => g === y - 1 ? m.value.cooked : m.value.cooked + u(g)
|
|
460
|
+
).join(""), c = d.match(/^\s+/)?.[0] ?? "", p = d.match(/\s+$/)?.[0] ?? "", f = d.slice(
|
|
461
|
+
c.length,
|
|
462
|
+
-p.length || void 0
|
|
463
|
+
), b = S(n, t), _ = await e(f, {
|
|
382
464
|
...s,
|
|
383
465
|
parser: "ini"
|
|
384
|
-
}),
|
|
385
|
-
if (s.preserveEmbeddedExteriorWhitespaces?.includes(
|
|
386
|
-
return
|
|
466
|
+
}), o = A(_, E, b);
|
|
467
|
+
if (s.preserveEmbeddedExteriorWhitespaces?.includes(i))
|
|
468
|
+
return U([
|
|
387
469
|
"`",
|
|
388
|
-
|
|
389
|
-
s.noEmbeddedMultiLineIndentation?.includes(
|
|
390
|
-
|
|
470
|
+
c,
|
|
471
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [U(o)] : ct([U(o)]),
|
|
472
|
+
p,
|
|
391
473
|
"`"
|
|
392
474
|
]);
|
|
393
|
-
const
|
|
394
|
-
return
|
|
475
|
+
const h = c.length ? lt : ut, $ = p.length ? lt : ut;
|
|
476
|
+
return U([
|
|
395
477
|
"`",
|
|
396
|
-
s.noEmbeddedMultiLineIndentation?.includes(
|
|
397
|
-
|
|
478
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h, U(o)] : ct([h, U(o)]),
|
|
479
|
+
$,
|
|
398
480
|
"`"
|
|
399
481
|
]);
|
|
400
|
-
},
|
|
401
|
-
[
|
|
482
|
+
}, ye = "embeddedIni", us = ["ini", "cfg", "pro"], ps = v(ye), pt = M(ye), gt = D(ye), gs = {
|
|
483
|
+
[ps]: {
|
|
484
|
+
category: "Embed",
|
|
485
|
+
type: "string",
|
|
486
|
+
array: !0,
|
|
487
|
+
default: [{ value: [...us] }],
|
|
488
|
+
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.",
|
|
489
|
+
deprecated: `Please use \`${pt}\` or \`${gt}\`.`
|
|
490
|
+
},
|
|
491
|
+
[pt]: {
|
|
492
|
+
category: "Embed",
|
|
493
|
+
type: "string",
|
|
494
|
+
array: !0,
|
|
495
|
+
default: [{ value: [] }],
|
|
496
|
+
description: "Block comments that make their subsequent template literals be identified as embedded INI language. This option requires the `prettier-plugin-ini` plugin."
|
|
497
|
+
},
|
|
498
|
+
[gt]: {
|
|
402
499
|
category: "Embed",
|
|
403
500
|
type: "string",
|
|
404
501
|
array: !0,
|
|
405
|
-
default: [{ value: [
|
|
406
|
-
description: "
|
|
502
|
+
default: [{ value: [] }],
|
|
503
|
+
description: "Tags that make their subsequent template literals be identified as embedded INI language. This option requires the `prettier-plugin-ini` plugin."
|
|
407
504
|
}
|
|
408
|
-
},
|
|
505
|
+
}, ms = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
409
506
|
__proto__: null,
|
|
410
|
-
embedder:
|
|
411
|
-
language:
|
|
412
|
-
options:
|
|
413
|
-
}, Symbol.toStringTag, { value: "Module" })), { group:
|
|
414
|
-
|
|
507
|
+
embedder: cs,
|
|
508
|
+
language: ye,
|
|
509
|
+
options: gs
|
|
510
|
+
}, Symbol.toStringTag, { value: "Module" })), { group: R, line: mt, softline: ht, indent: Et } = T, hs = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
|
|
511
|
+
N("prettier-plugin-java", r, i);
|
|
415
512
|
const s = {
|
|
416
513
|
...r,
|
|
417
|
-
...
|
|
418
|
-
}, { node:
|
|
419
|
-
(m, g, { length:
|
|
420
|
-
).join(""),
|
|
421
|
-
|
|
422
|
-
-
|
|
423
|
-
), b =
|
|
514
|
+
...a
|
|
515
|
+
}, { node: l } = n, { createPlaceholder: u, placeholderRegex: E } = L(), d = l.quasis.map(
|
|
516
|
+
(m, g, { length: y }) => g === y - 1 ? m.value.cooked : m.value.cooked + u(g)
|
|
517
|
+
).join(""), c = d.match(/^\s+/)?.[0] ?? "", p = d.match(/\s+$/)?.[0] ?? "", f = d.slice(
|
|
518
|
+
c.length,
|
|
519
|
+
-p.length || void 0
|
|
520
|
+
), b = S(n, t), _ = await e(f, {
|
|
424
521
|
...s,
|
|
425
522
|
parser: "java"
|
|
426
|
-
}),
|
|
427
|
-
|
|
428
|
-
|
|
523
|
+
}), o = A(
|
|
524
|
+
_,
|
|
525
|
+
E,
|
|
429
526
|
b,
|
|
430
527
|
!0
|
|
431
528
|
);
|
|
432
|
-
if (s.preserveEmbeddedExteriorWhitespaces?.includes(
|
|
433
|
-
return
|
|
529
|
+
if (s.preserveEmbeddedExteriorWhitespaces?.includes(i))
|
|
530
|
+
return R([
|
|
434
531
|
"`",
|
|
435
|
-
|
|
436
|
-
s.noEmbeddedMultiLineIndentation?.includes(
|
|
437
|
-
|
|
532
|
+
c,
|
|
533
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [R(o)] : Et([R(o)]),
|
|
534
|
+
p,
|
|
438
535
|
"`"
|
|
439
536
|
]);
|
|
440
|
-
const
|
|
441
|
-
return
|
|
537
|
+
const h = c.length ? mt : ht, $ = p.length ? mt : ht;
|
|
538
|
+
return R([
|
|
442
539
|
"`",
|
|
443
|
-
s.noEmbeddedMultiLineIndentation?.includes(
|
|
444
|
-
|
|
540
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h, R(o)] : Et([h, R(o)]),
|
|
541
|
+
$,
|
|
445
542
|
"`"
|
|
446
543
|
]);
|
|
447
|
-
},
|
|
448
|
-
[
|
|
544
|
+
}, _e = "embeddedJava", Es = ["java"], bs = v(_e), bt = M(_e), ft = D(_e), fs = {
|
|
545
|
+
[bs]: {
|
|
546
|
+
category: "Embed",
|
|
547
|
+
type: "string",
|
|
548
|
+
array: !0,
|
|
549
|
+
default: [{ value: [...Es] }],
|
|
550
|
+
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.",
|
|
551
|
+
deprecated: `Please use \`${bt}\` or \`${ft}\`.`
|
|
552
|
+
},
|
|
553
|
+
[bt]: {
|
|
554
|
+
category: "Embed",
|
|
555
|
+
type: "string",
|
|
556
|
+
array: !0,
|
|
557
|
+
default: [{ value: [] }],
|
|
558
|
+
description: "Block comments that make their subsequent template literals be identified as embedded Java language. This option requires the `prettier-plugin-java` plugin."
|
|
559
|
+
},
|
|
560
|
+
[ft]: {
|
|
449
561
|
category: "Embed",
|
|
450
562
|
type: "string",
|
|
451
563
|
array: !0,
|
|
452
|
-
default: [{ value: [
|
|
453
|
-
description: "
|
|
564
|
+
default: [{ value: [] }],
|
|
565
|
+
description: "Tags that make their subsequent template literals be identified as embedded Java language. This option requires the `prettier-plugin-java` plugin."
|
|
454
566
|
}
|
|
455
|
-
},
|
|
567
|
+
}, ys = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
456
568
|
__proto__: null,
|
|
457
|
-
embedder:
|
|
458
|
-
language:
|
|
459
|
-
options:
|
|
460
|
-
}, Symbol.toStringTag, { value: "Module" })), { line:
|
|
569
|
+
embedder: hs,
|
|
570
|
+
language: _e,
|
|
571
|
+
options: fs
|
|
572
|
+
}, Symbol.toStringTag, { value: "Module" })), { line: yt, group: C, indent: _t, softline: $t } = T, _s = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
|
|
461
573
|
const s = {
|
|
462
574
|
...r,
|
|
463
|
-
...
|
|
464
|
-
}, { node:
|
|
465
|
-
(m, g, { length:
|
|
466
|
-
).join(""),
|
|
467
|
-
|
|
468
|
-
-
|
|
469
|
-
), b =
|
|
575
|
+
...a
|
|
576
|
+
}, { node: l } = n, { createPlaceholder: u, placeholderRegex: E } = $s(), d = l.quasis.map(
|
|
577
|
+
(m, g, { length: y }) => g === y - 1 ? m.value.cooked : m.value.cooked + u(g)
|
|
578
|
+
).join(""), c = d.match(/^\s+/)?.[0] ?? "", p = d.match(/\s+$/)?.[0] ?? "", f = d.slice(
|
|
579
|
+
c.length,
|
|
580
|
+
-p.length || void 0
|
|
581
|
+
), b = S(n, t), _ = await e(f, {
|
|
470
582
|
...s,
|
|
471
583
|
parser: s.embeddedJsonParser ?? "json"
|
|
472
|
-
}),
|
|
473
|
-
if (s.preserveEmbeddedExteriorWhitespaces?.includes(
|
|
474
|
-
return
|
|
584
|
+
}), o = A(_, E, b);
|
|
585
|
+
if (s.preserveEmbeddedExteriorWhitespaces?.includes(i))
|
|
586
|
+
return C([
|
|
475
587
|
"`",
|
|
476
|
-
|
|
477
|
-
s.noEmbeddedMultiLineIndentation?.includes(
|
|
478
|
-
|
|
588
|
+
c,
|
|
589
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [C(o)] : _t([C(o)]),
|
|
590
|
+
p,
|
|
479
591
|
"`"
|
|
480
592
|
]);
|
|
481
|
-
const
|
|
482
|
-
return
|
|
593
|
+
const h = c.length ? yt : $t, $ = p.length ? yt : $t;
|
|
594
|
+
return C([
|
|
483
595
|
"`",
|
|
484
|
-
s.noEmbeddedMultiLineIndentation?.includes(
|
|
485
|
-
|
|
596
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h, C(o)] : _t([h, C(o)]),
|
|
597
|
+
$,
|
|
486
598
|
"`"
|
|
487
599
|
]);
|
|
488
600
|
};
|
|
489
|
-
function
|
|
490
|
-
const e =
|
|
601
|
+
function $s() {
|
|
602
|
+
const e = he(), t = he(), n = (i) => `'0${e}${i}${t}'`, r = new RegExp(
|
|
491
603
|
`["']?0${e}(\\d+)${t}['"]?`,
|
|
492
604
|
"ig"
|
|
493
605
|
);
|
|
@@ -496,105 +608,135 @@ function vo() {
|
|
|
496
608
|
placeholderRegex: r
|
|
497
609
|
};
|
|
498
610
|
}
|
|
499
|
-
const
|
|
500
|
-
[
|
|
611
|
+
const de = "embeddedJson", vs = ["json", "jsonl"], Ds = ["json", "json5", "jsonc", "json-stringify"], Ms = v(de), vt = M(de), Dt = D(de), Ts = x(de), As = {
|
|
612
|
+
[Ms]: {
|
|
613
|
+
category: "Embed",
|
|
614
|
+
type: "string",
|
|
615
|
+
array: !0,
|
|
616
|
+
default: [{ value: [...vs] }],
|
|
617
|
+
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded JSON language.",
|
|
618
|
+
deprecated: `Please use \`${vt}\` or \`${Dt}\`.`
|
|
619
|
+
},
|
|
620
|
+
[vt]: {
|
|
621
|
+
category: "Embed",
|
|
622
|
+
type: "string",
|
|
623
|
+
array: !0,
|
|
624
|
+
default: [{ value: [] }],
|
|
625
|
+
description: "Block comments that make their subsequent template literals be identified as embedded JSON language."
|
|
626
|
+
},
|
|
627
|
+
[Dt]: {
|
|
501
628
|
category: "Embed",
|
|
502
629
|
type: "string",
|
|
503
630
|
array: !0,
|
|
504
|
-
default: [{ value: [
|
|
505
|
-
description: "
|
|
631
|
+
default: [{ value: [] }],
|
|
632
|
+
description: "Tags that make their subsequent template literals be identified as embedded JSON language."
|
|
506
633
|
},
|
|
507
|
-
[
|
|
634
|
+
[Ts]: {
|
|
508
635
|
category: "Embed",
|
|
509
636
|
type: "choice",
|
|
510
637
|
default: "json",
|
|
511
638
|
description: "The parser used to parse the embedded JSON language.",
|
|
512
|
-
choices:
|
|
639
|
+
choices: Ds.map((e) => ({
|
|
513
640
|
value: e,
|
|
514
641
|
description: `Use the "${e}" parser.`
|
|
515
642
|
}))
|
|
516
643
|
}
|
|
517
|
-
},
|
|
644
|
+
}, Ss = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
518
645
|
__proto__: null,
|
|
519
|
-
embedder:
|
|
520
|
-
language:
|
|
521
|
-
options:
|
|
522
|
-
}, Symbol.toStringTag, { value: "Module" })), { line:
|
|
523
|
-
|
|
646
|
+
embedder: _s,
|
|
647
|
+
language: de,
|
|
648
|
+
options: As
|
|
649
|
+
}, Symbol.toStringTag, { value: "Module" })), { line: Mt, group: w, indent: Tt, softline: At } = T, Ls = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
|
|
650
|
+
N(
|
|
524
651
|
"@stedi/prettier-plugin-jsonata",
|
|
525
652
|
r,
|
|
526
|
-
|
|
653
|
+
i
|
|
527
654
|
);
|
|
528
655
|
const s = {
|
|
529
656
|
...r,
|
|
530
|
-
...
|
|
531
|
-
}, { node:
|
|
532
|
-
(m, g, { length:
|
|
533
|
-
).join(""),
|
|
534
|
-
|
|
535
|
-
-
|
|
536
|
-
), b =
|
|
657
|
+
...a
|
|
658
|
+
}, { node: l } = n, { createPlaceholder: u, placeholderRegex: E } = L("$p"), d = l.quasis.map(
|
|
659
|
+
(m, g, { length: y }) => g === y - 1 ? m.value.cooked : m.value.cooked + u(g)
|
|
660
|
+
).join(""), c = d.match(/^\s+/)?.[0] ?? "", p = d.match(/\s+$/)?.[0] ?? "", f = d.slice(
|
|
661
|
+
c.length,
|
|
662
|
+
-p.length || void 0
|
|
663
|
+
), b = S(n, t), _ = await e(f, {
|
|
537
664
|
...s,
|
|
538
665
|
parser: "JSONata"
|
|
539
|
-
}),
|
|
540
|
-
if (s.preserveEmbeddedExteriorWhitespaces?.includes(
|
|
541
|
-
return
|
|
666
|
+
}), o = A(_, E, b);
|
|
667
|
+
if (s.preserveEmbeddedExteriorWhitespaces?.includes(i))
|
|
668
|
+
return w([
|
|
542
669
|
"`",
|
|
543
|
-
|
|
544
|
-
s.noEmbeddedMultiLineIndentation?.includes(
|
|
545
|
-
|
|
670
|
+
c,
|
|
671
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [w(o)] : Tt([w(o)]),
|
|
672
|
+
p,
|
|
546
673
|
"`"
|
|
547
674
|
]);
|
|
548
|
-
const
|
|
549
|
-
return
|
|
675
|
+
const h = c.length ? Mt : At, $ = p.length ? Mt : At;
|
|
676
|
+
return w([
|
|
550
677
|
"`",
|
|
551
|
-
s.noEmbeddedMultiLineIndentation?.includes(
|
|
552
|
-
|
|
678
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h, w(o)] : Tt([h, w(o)]),
|
|
679
|
+
$,
|
|
553
680
|
"`"
|
|
554
681
|
]);
|
|
555
|
-
},
|
|
556
|
-
[
|
|
682
|
+
}, $e = "embeddedJsonata", ks = ["jsonata"], Gs = v($e), St = M($e), Lt = D($e), Ns = {
|
|
683
|
+
[Gs]: {
|
|
557
684
|
category: "Embed",
|
|
558
685
|
type: "string",
|
|
559
686
|
array: !0,
|
|
560
|
-
default: [{ value: [...
|
|
561
|
-
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."
|
|
687
|
+
default: [{ value: [...ks] }],
|
|
688
|
+
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.",
|
|
689
|
+
deprecated: `Please use \`${St}\` or \`${Lt}\`.`
|
|
690
|
+
},
|
|
691
|
+
[St]: {
|
|
692
|
+
category: "Embed",
|
|
693
|
+
type: "string",
|
|
694
|
+
array: !0,
|
|
695
|
+
default: [{ value: [] }],
|
|
696
|
+
description: "Block comments that make their subsequent template literals be identified as embedded JSONata language. This option requires the `@stedi/prettier-plugin-jsonata` plugin."
|
|
697
|
+
},
|
|
698
|
+
[Lt]: {
|
|
699
|
+
category: "Embed",
|
|
700
|
+
type: "string",
|
|
701
|
+
array: !0,
|
|
702
|
+
default: [{ value: [] }],
|
|
703
|
+
description: "Tags that make their subsequent template literals be identified as embedded JSONata language. This option requires the `@stedi/prettier-plugin-jsonata` plugin."
|
|
562
704
|
}
|
|
563
|
-
},
|
|
705
|
+
}, xs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
564
706
|
__proto__: null,
|
|
565
|
-
embedder:
|
|
566
|
-
language:
|
|
567
|
-
options:
|
|
568
|
-
}, Symbol.toStringTag, { value: "Module" })), { line:
|
|
569
|
-
|
|
707
|
+
embedder: Ls,
|
|
708
|
+
language: $e,
|
|
709
|
+
options: Ns
|
|
710
|
+
}, Symbol.toStringTag, { value: "Module" })), { line: kt, group: F, indent: Gt, softline: Nt } = T, Is = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
|
|
711
|
+
N("prettier-plugin-latex", r, i);
|
|
570
712
|
const s = {
|
|
571
713
|
...r,
|
|
572
|
-
...
|
|
573
|
-
}, { node:
|
|
574
|
-
(m, g, { length:
|
|
575
|
-
).join(""),
|
|
576
|
-
|
|
577
|
-
-
|
|
578
|
-
), b =
|
|
714
|
+
...a
|
|
715
|
+
}, { node: l } = n, { createPlaceholder: u, placeholderRegex: E } = L(), d = l.quasis.map(
|
|
716
|
+
(m, g, { length: y }) => g === y - 1 ? m.value.cooked : m.value.cooked + u(g)
|
|
717
|
+
).join(""), c = d.match(/^\s+/)?.[0] ?? "", p = d.match(/\s+$/)?.[0] ?? "", f = d.slice(
|
|
718
|
+
c.length,
|
|
719
|
+
-p.length || void 0
|
|
720
|
+
), b = S(n, t), _ = await e(f, {
|
|
579
721
|
...s,
|
|
580
722
|
parser: "latex-parser"
|
|
581
|
-
}),
|
|
582
|
-
if (s.preserveEmbeddedExteriorWhitespaces?.includes(
|
|
583
|
-
return
|
|
723
|
+
}), o = A(_, E, b);
|
|
724
|
+
if (s.preserveEmbeddedExteriorWhitespaces?.includes(i))
|
|
725
|
+
return F([
|
|
584
726
|
"`",
|
|
585
|
-
|
|
586
|
-
s.noEmbeddedMultiLineIndentation?.includes(
|
|
587
|
-
|
|
727
|
+
c,
|
|
728
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [F(o)] : Gt([F(o)]),
|
|
729
|
+
p,
|
|
588
730
|
"`"
|
|
589
731
|
]);
|
|
590
|
-
const
|
|
591
|
-
return
|
|
732
|
+
const h = c.length ? kt : Nt, $ = p.length ? kt : Nt;
|
|
733
|
+
return F([
|
|
592
734
|
"`",
|
|
593
|
-
s.noEmbeddedMultiLineIndentation?.includes(
|
|
594
|
-
|
|
735
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h, F(o)] : Gt([h, F(o)]),
|
|
736
|
+
$,
|
|
595
737
|
"`"
|
|
596
738
|
]);
|
|
597
|
-
},
|
|
739
|
+
}, ve = "embeddedLatex", Os = [
|
|
598
740
|
"latex",
|
|
599
741
|
"tex",
|
|
600
742
|
"aux",
|
|
@@ -603,469 +745,634 @@ const ue = "embeddedJson", $o = ["json", "jsonl"], Do = ["json", "json5", "jsonc
|
|
|
603
745
|
"bib",
|
|
604
746
|
"toc",
|
|
605
747
|
"sty"
|
|
606
|
-
],
|
|
607
|
-
[
|
|
748
|
+
], Ps = v(ve), xt = M(ve), It = D(ve), Bs = {
|
|
749
|
+
[Ps]: {
|
|
608
750
|
category: "Embed",
|
|
609
751
|
type: "string",
|
|
610
752
|
array: !0,
|
|
611
|
-
default: [{ value: [...
|
|
612
|
-
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."
|
|
753
|
+
default: [{ value: [...Os] }],
|
|
754
|
+
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.",
|
|
755
|
+
deprecated: `Please use \`${xt}\` or \`${It}\`.`
|
|
756
|
+
},
|
|
757
|
+
[xt]: {
|
|
758
|
+
category: "Embed",
|
|
759
|
+
type: "string",
|
|
760
|
+
array: !0,
|
|
761
|
+
default: [{ value: [] }],
|
|
762
|
+
description: "Block comments that make their subsequent template literals be identified as embedded LaTeX language. This option requires the `prettier-plugin-latex` plugin."
|
|
763
|
+
},
|
|
764
|
+
[It]: {
|
|
765
|
+
category: "Embed",
|
|
766
|
+
type: "string",
|
|
767
|
+
array: !0,
|
|
768
|
+
default: [{ value: [] }],
|
|
769
|
+
description: "Tags that make their subsequent template literals be identified as embedded LaTeX language. This option requires the `prettier-plugin-latex` plugin."
|
|
613
770
|
}
|
|
614
|
-
},
|
|
771
|
+
}, qs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
615
772
|
__proto__: null,
|
|
616
|
-
embedder:
|
|
617
|
-
language:
|
|
618
|
-
options:
|
|
619
|
-
}, Symbol.toStringTag, { value: "Module" })), { line:
|
|
773
|
+
embedder: Is,
|
|
774
|
+
language: ve,
|
|
775
|
+
options: Bs
|
|
776
|
+
}, Symbol.toStringTag, { value: "Module" })), { line: Ot, group: W, indent: Pt, softline: Bt } = T, js = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
|
|
620
777
|
const s = {
|
|
621
778
|
...r,
|
|
622
|
-
...
|
|
623
|
-
}, { node:
|
|
624
|
-
(m, g, { length:
|
|
625
|
-
).join(""),
|
|
626
|
-
|
|
627
|
-
-
|
|
628
|
-
), b =
|
|
779
|
+
...a
|
|
780
|
+
}, { node: l } = n, { createPlaceholder: u, placeholderRegex: E } = L(), d = l.quasis.map(
|
|
781
|
+
(m, g, { length: y }) => g === y - 1 ? m.value.cooked : m.value.cooked + u(g)
|
|
782
|
+
).join(""), c = d.match(/^\s+/)?.[0] ?? "", p = d.match(/\s+$/)?.[0] ?? "", f = d.slice(
|
|
783
|
+
c.length,
|
|
784
|
+
-p.length || void 0
|
|
785
|
+
), b = S(n, t), _ = await e(f, {
|
|
629
786
|
...s,
|
|
630
787
|
parser: s.embeddedMarkdownParser ?? "markdown",
|
|
631
788
|
__inJsTemplate: !0
|
|
632
|
-
}),
|
|
633
|
-
if (s.preserveEmbeddedExteriorWhitespaces?.includes(
|
|
634
|
-
return
|
|
789
|
+
}), o = A(_, E, b);
|
|
790
|
+
if (s.preserveEmbeddedExteriorWhitespaces?.includes(i))
|
|
791
|
+
return W([
|
|
635
792
|
"`",
|
|
636
|
-
|
|
637
|
-
s.noEmbeddedMultiLineIndentation?.includes(
|
|
638
|
-
|
|
793
|
+
c,
|
|
794
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [W(o)] : Pt([W(o)]),
|
|
795
|
+
p,
|
|
639
796
|
"`"
|
|
640
797
|
]);
|
|
641
|
-
const
|
|
642
|
-
return
|
|
798
|
+
const h = c.length ? Ot : Bt, $ = p.length ? Ot : Bt;
|
|
799
|
+
return W([
|
|
643
800
|
"`",
|
|
644
|
-
s.noEmbeddedMultiLineIndentation?.includes(
|
|
645
|
-
|
|
801
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h, W(o)] : Pt([h, W(o)]),
|
|
802
|
+
$,
|
|
646
803
|
"`"
|
|
647
804
|
]);
|
|
648
|
-
},
|
|
649
|
-
[
|
|
805
|
+
}, le = "embeddedMarkdown", Us = ["md", "markdown"], Rs = ["markdown", "mdx", "remark"], Cs = v(le), qt = M(le), jt = D(le), ws = x(le), Fs = {
|
|
806
|
+
[Cs]: {
|
|
807
|
+
category: "Embed",
|
|
808
|
+
type: "string",
|
|
809
|
+
array: !0,
|
|
810
|
+
default: [{ value: [...Us] }],
|
|
811
|
+
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded Markdown language.",
|
|
812
|
+
deprecated: `Please use \`${qt}\` or \`${jt}\`.`
|
|
813
|
+
},
|
|
814
|
+
[qt]: {
|
|
650
815
|
category: "Embed",
|
|
651
816
|
type: "string",
|
|
652
817
|
array: !0,
|
|
653
|
-
default: [{ value: [
|
|
654
|
-
description: "
|
|
818
|
+
default: [{ value: [] }],
|
|
819
|
+
description: "Block comments that make their subsequent template literals be identified as embedded Markdown language."
|
|
655
820
|
},
|
|
656
|
-
[
|
|
821
|
+
[jt]: {
|
|
822
|
+
category: "Embed",
|
|
823
|
+
type: "string",
|
|
824
|
+
array: !0,
|
|
825
|
+
default: [{ value: [] }],
|
|
826
|
+
description: "Tags that make their subsequent template literals be identified as embedded Markdown language."
|
|
827
|
+
},
|
|
828
|
+
[ws]: {
|
|
657
829
|
category: "Embed",
|
|
658
830
|
type: "choice",
|
|
659
831
|
default: "markdown",
|
|
660
832
|
description: "The parser used to parse the embedded Markdown language.",
|
|
661
|
-
choices:
|
|
833
|
+
choices: Rs.map((e) => ({
|
|
662
834
|
value: e,
|
|
663
835
|
description: `Use the "${e}" parser.`
|
|
664
836
|
}))
|
|
665
837
|
}
|
|
666
|
-
},
|
|
838
|
+
}, Ws = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
667
839
|
__proto__: null,
|
|
668
|
-
embedder:
|
|
669
|
-
language:
|
|
670
|
-
options:
|
|
671
|
-
}, Symbol.toStringTag, { value: "Module" })), { line:
|
|
672
|
-
|
|
840
|
+
embedder: js,
|
|
841
|
+
language: le,
|
|
842
|
+
options: Fs
|
|
843
|
+
}, Symbol.toStringTag, { value: "Module" })), { line: Ut, group: z, indent: Rt, softline: Ct } = T, zs = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
|
|
844
|
+
N("prettier-plugin-nginx", r, i);
|
|
673
845
|
const s = {
|
|
674
846
|
...r,
|
|
675
|
-
...
|
|
676
|
-
}, { node:
|
|
677
|
-
(m, g, { length:
|
|
678
|
-
).join(""),
|
|
679
|
-
|
|
680
|
-
-
|
|
681
|
-
), b =
|
|
847
|
+
...a
|
|
848
|
+
}, { node: l } = n, { createPlaceholder: u, placeholderRegex: E } = L(), d = l.quasis.map(
|
|
849
|
+
(m, g, { length: y }) => g === y - 1 ? m.value.cooked : m.value.cooked + u(g)
|
|
850
|
+
).join(""), c = d.match(/^\s+/)?.[0] ?? "", p = d.match(/\s+$/)?.[0] ?? "", f = d.slice(
|
|
851
|
+
c.length,
|
|
852
|
+
-p.length || void 0
|
|
853
|
+
), b = S(n, t), _ = await e(f, {
|
|
682
854
|
...s,
|
|
683
855
|
parser: "nginx"
|
|
684
|
-
}),
|
|
685
|
-
if (s.preserveEmbeddedExteriorWhitespaces?.includes(
|
|
686
|
-
return
|
|
856
|
+
}), o = A(_, E, b);
|
|
857
|
+
if (s.preserveEmbeddedExteriorWhitespaces?.includes(i))
|
|
858
|
+
return z([
|
|
687
859
|
"`",
|
|
688
|
-
|
|
689
|
-
s.noEmbeddedMultiLineIndentation?.includes(
|
|
690
|
-
|
|
860
|
+
c,
|
|
861
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [z(o)] : Rt([z(o)]),
|
|
862
|
+
p,
|
|
691
863
|
"`"
|
|
692
864
|
]);
|
|
693
|
-
const
|
|
694
|
-
return
|
|
865
|
+
const h = c.length ? Ut : Ct, $ = p.length ? Ut : Ct;
|
|
866
|
+
return z([
|
|
695
867
|
"`",
|
|
696
|
-
s.noEmbeddedMultiLineIndentation?.includes(
|
|
697
|
-
|
|
868
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h, z(o)] : Rt([h, z(o)]),
|
|
869
|
+
$,
|
|
698
870
|
"`"
|
|
699
871
|
]);
|
|
700
|
-
},
|
|
701
|
-
[
|
|
872
|
+
}, De = "embeddedNginx", Ks = ["nginx"], Js = v(De), wt = M(De), Ft = D(De), Hs = {
|
|
873
|
+
[Js]: {
|
|
874
|
+
category: "Embed",
|
|
875
|
+
type: "string",
|
|
876
|
+
array: !0,
|
|
877
|
+
default: [{ value: [...Ks] }],
|
|
878
|
+
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.",
|
|
879
|
+
deprecated: `Please use \`${wt}\` or \`${Ft}\`.`
|
|
880
|
+
},
|
|
881
|
+
[wt]: {
|
|
702
882
|
category: "Embed",
|
|
703
883
|
type: "string",
|
|
704
884
|
array: !0,
|
|
705
|
-
default: [{ value: [
|
|
706
|
-
description: "
|
|
885
|
+
default: [{ value: [] }],
|
|
886
|
+
description: "Block comments that make their subsequent template literals be identified as embedded NGINX language. This option requires the `prettier-plugin-nginx` plugin."
|
|
887
|
+
},
|
|
888
|
+
[Ft]: {
|
|
889
|
+
category: "Embed",
|
|
890
|
+
type: "string",
|
|
891
|
+
array: !0,
|
|
892
|
+
default: [{ value: [] }],
|
|
893
|
+
description: "Tags that make their subsequent template literals be identified as embedded NGINX language. This option requires the `prettier-plugin-nginx` plugin."
|
|
707
894
|
}
|
|
708
|
-
},
|
|
895
|
+
}, Xs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
709
896
|
__proto__: null,
|
|
710
|
-
embedder:
|
|
711
|
-
language:
|
|
712
|
-
options:
|
|
713
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
714
|
-
[
|
|
897
|
+
embedder: zs,
|
|
898
|
+
language: De,
|
|
899
|
+
options: Hs
|
|
900
|
+
}, Symbol.toStringTag, { value: "Module" })), ce = "embeddedNoop", Qs = v(ce), Wt = M(ce), zt = D(ce), Ys = {
|
|
901
|
+
[Qs]: {
|
|
902
|
+
category: "Embed",
|
|
903
|
+
type: "string",
|
|
904
|
+
array: !0,
|
|
905
|
+
default: [{ value: [] }],
|
|
906
|
+
description: "Tag or comment identifiers that prevent their subsequent template literals from being identified as embedded languages and thus from being formatted.",
|
|
907
|
+
deprecated: `Please use \`${Wt}\` or \`${zt}\`.`
|
|
908
|
+
},
|
|
909
|
+
[Wt]: {
|
|
910
|
+
category: "Embed",
|
|
911
|
+
type: "string",
|
|
912
|
+
array: !0,
|
|
913
|
+
default: [{ value: [] }],
|
|
914
|
+
description: "Block comments that prevent their subsequent template literals from being identified as embedded languages and thus from being formatted."
|
|
915
|
+
},
|
|
916
|
+
[zt]: {
|
|
715
917
|
category: "Embed",
|
|
716
918
|
type: "string",
|
|
717
919
|
array: !0,
|
|
718
920
|
default: [{ value: [] }],
|
|
719
|
-
description: "
|
|
921
|
+
description: "Tags that prevent their subsequent template literals from being identified as embedded languages and thus from being formatted."
|
|
720
922
|
}
|
|
721
|
-
},
|
|
923
|
+
}, Vs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
722
924
|
__proto__: null,
|
|
723
|
-
language:
|
|
724
|
-
options:
|
|
725
|
-
}, Symbol.toStringTag, { value: "Module" })), { line:
|
|
726
|
-
|
|
925
|
+
language: ce,
|
|
926
|
+
options: Ys
|
|
927
|
+
}, Symbol.toStringTag, { value: "Module" })), { line: Kt, group: K, indent: Jt, softline: Ht } = T, Zs = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
|
|
928
|
+
N("prettier-plugin-pegjs", r, i);
|
|
727
929
|
const s = {
|
|
728
930
|
...r,
|
|
729
|
-
...
|
|
730
|
-
}, { node:
|
|
731
|
-
(m, g, { length:
|
|
732
|
-
).join(""),
|
|
733
|
-
|
|
734
|
-
-
|
|
735
|
-
), b =
|
|
931
|
+
...a
|
|
932
|
+
}, { node: l } = n, { createPlaceholder: u, placeholderRegex: E } = L(), d = l.quasis.map(
|
|
933
|
+
(m, g, { length: y }) => g === y - 1 ? m.value.cooked : m.value.cooked + u(g)
|
|
934
|
+
).join(""), c = d.match(/^\s+/)?.[0] ?? "", p = d.match(/\s+$/)?.[0] ?? "", f = d.slice(
|
|
935
|
+
c.length,
|
|
936
|
+
-p.length || void 0
|
|
937
|
+
), b = S(n, t), _ = await e(f, {
|
|
736
938
|
...s,
|
|
737
939
|
parser: "pegjs-parser"
|
|
738
|
-
}),
|
|
739
|
-
if (s.preserveEmbeddedExteriorWhitespaces?.includes(
|
|
740
|
-
return
|
|
940
|
+
}), o = A(_, E, b);
|
|
941
|
+
if (s.preserveEmbeddedExteriorWhitespaces?.includes(i))
|
|
942
|
+
return K([
|
|
741
943
|
"`",
|
|
742
|
-
|
|
743
|
-
s.noEmbeddedMultiLineIndentation?.includes(
|
|
744
|
-
|
|
944
|
+
c,
|
|
945
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [K(o)] : Jt([K(o)]),
|
|
946
|
+
p,
|
|
745
947
|
"`"
|
|
746
948
|
]);
|
|
747
|
-
const
|
|
748
|
-
return
|
|
949
|
+
const h = c.length ? Kt : Ht, $ = p.length ? Kt : Ht;
|
|
950
|
+
return K([
|
|
749
951
|
"`",
|
|
750
|
-
s.noEmbeddedMultiLineIndentation?.includes(
|
|
751
|
-
|
|
952
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h, K(o)] : Jt([h, K(o)]),
|
|
953
|
+
$,
|
|
752
954
|
"`"
|
|
753
955
|
]);
|
|
754
|
-
},
|
|
755
|
-
[
|
|
956
|
+
}, Me = "embeddedPegjs", er = ["pegjs", "peggy", "peg"], tr = v(Me), Xt = M(Me), Qt = D(Me), nr = {
|
|
957
|
+
[tr]: {
|
|
958
|
+
category: "Embed",
|
|
959
|
+
type: "string",
|
|
960
|
+
array: !0,
|
|
961
|
+
default: [{ value: [...er] }],
|
|
962
|
+
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.",
|
|
963
|
+
deprecated: `Please use \`${Xt}\` or \`${Qt}\`.`
|
|
964
|
+
},
|
|
965
|
+
[Xt]: {
|
|
966
|
+
category: "Embed",
|
|
967
|
+
type: "string",
|
|
968
|
+
array: !0,
|
|
969
|
+
default: [{ value: [] }],
|
|
970
|
+
description: "Block comments that make their subsequent template literals be identified as embedded Pegjs language. This option requires the `prettier-plugin-pegjs` plugin."
|
|
971
|
+
},
|
|
972
|
+
[Qt]: {
|
|
756
973
|
category: "Embed",
|
|
757
974
|
type: "string",
|
|
758
975
|
array: !0,
|
|
759
|
-
default: [{ value: [
|
|
760
|
-
description: "
|
|
976
|
+
default: [{ value: [] }],
|
|
977
|
+
description: "Tags that make their subsequent template literals be identified as embedded Pegjs language. This option requires the `prettier-plugin-pegjs` plugin."
|
|
761
978
|
}
|
|
762
|
-
},
|
|
979
|
+
}, ir = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
763
980
|
__proto__: null,
|
|
764
|
-
embedder:
|
|
765
|
-
language:
|
|
766
|
-
options:
|
|
767
|
-
}, Symbol.toStringTag, { value: "Module" })), { line:
|
|
768
|
-
|
|
981
|
+
embedder: Zs,
|
|
982
|
+
language: Me,
|
|
983
|
+
options: nr
|
|
984
|
+
}, Symbol.toStringTag, { value: "Module" })), { line: Yt, group: J, indent: Vt, softline: Zt } = T, sr = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
|
|
985
|
+
N("@prettier/plugin-php", r, i);
|
|
769
986
|
const s = {
|
|
770
987
|
...r,
|
|
771
|
-
...
|
|
772
|
-
}, { node:
|
|
773
|
-
(m, g, { length:
|
|
774
|
-
).join(""),
|
|
775
|
-
|
|
776
|
-
-
|
|
777
|
-
), b =
|
|
988
|
+
...a
|
|
989
|
+
}, { node: l } = n, { createPlaceholder: u, placeholderRegex: E } = L("$p"), d = l.quasis.map(
|
|
990
|
+
(m, g, { length: y }) => g === y - 1 ? m.value.cooked : m.value.cooked + u(g)
|
|
991
|
+
).join(""), c = d.match(/^\s+/)?.[0] ?? "", p = d.match(/\s+$/)?.[0] ?? "", f = d.slice(
|
|
992
|
+
c.length,
|
|
993
|
+
-p.length || void 0
|
|
994
|
+
), b = S(n, t), _ = await e(f, {
|
|
778
995
|
...s,
|
|
779
996
|
parser: "php"
|
|
780
|
-
}),
|
|
781
|
-
if (s.preserveEmbeddedExteriorWhitespaces?.includes(
|
|
782
|
-
return
|
|
997
|
+
}), o = A(_, E, b);
|
|
998
|
+
if (s.preserveEmbeddedExteriorWhitespaces?.includes(i))
|
|
999
|
+
return J([
|
|
783
1000
|
"`",
|
|
784
|
-
|
|
785
|
-
s.noEmbeddedMultiLineIndentation?.includes(
|
|
786
|
-
|
|
1001
|
+
c,
|
|
1002
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [J(o)] : Vt([J(o)]),
|
|
1003
|
+
p,
|
|
787
1004
|
"`"
|
|
788
1005
|
]);
|
|
789
|
-
const
|
|
790
|
-
return
|
|
1006
|
+
const h = c.length ? Yt : Zt, $ = p.length ? Yt : Zt;
|
|
1007
|
+
return J([
|
|
791
1008
|
"`",
|
|
792
|
-
s.noEmbeddedMultiLineIndentation?.includes(
|
|
793
|
-
|
|
1009
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h, J(o)] : Vt([h, J(o)]),
|
|
1010
|
+
$,
|
|
794
1011
|
"`"
|
|
795
1012
|
]);
|
|
796
|
-
},
|
|
797
|
-
[
|
|
1013
|
+
}, Te = "embeddedPhp", rr = ["php", "php5"], or = v(Te), en = M(Te), tn = D(Te), ar = {
|
|
1014
|
+
[or]: {
|
|
1015
|
+
category: "Embed",
|
|
1016
|
+
type: "string",
|
|
1017
|
+
array: !0,
|
|
1018
|
+
default: [{ value: [...rr] }],
|
|
1019
|
+
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.",
|
|
1020
|
+
deprecated: `Please use \`${en}\` or \`${tn}\`.`
|
|
1021
|
+
},
|
|
1022
|
+
[en]: {
|
|
798
1023
|
category: "Embed",
|
|
799
1024
|
type: "string",
|
|
800
1025
|
array: !0,
|
|
801
|
-
default: [{ value: [
|
|
802
|
-
description: "
|
|
1026
|
+
default: [{ value: [] }],
|
|
1027
|
+
description: "Block comments that make their subsequent template literals be identified as embedded PHP language. This option requires the `@prettier/plugin-php` plugin."
|
|
1028
|
+
},
|
|
1029
|
+
[tn]: {
|
|
1030
|
+
category: "Embed",
|
|
1031
|
+
type: "string",
|
|
1032
|
+
array: !0,
|
|
1033
|
+
default: [{ value: [] }],
|
|
1034
|
+
description: "Tags that make their subsequent template literals be identified as embedded PHP language. This option requires the `@prettier/plugin-php` plugin."
|
|
803
1035
|
}
|
|
804
|
-
},
|
|
1036
|
+
}, dr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
805
1037
|
__proto__: null,
|
|
806
|
-
embedder:
|
|
807
|
-
language:
|
|
808
|
-
options:
|
|
809
|
-
}, Symbol.toStringTag, { value: "Module" })), { line:
|
|
810
|
-
|
|
1038
|
+
embedder: sr,
|
|
1039
|
+
language: Te,
|
|
1040
|
+
options: ar
|
|
1041
|
+
}, Symbol.toStringTag, { value: "Module" })), { line: nn, group: H, indent: sn, softline: rn } = T, lr = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
|
|
1042
|
+
N("prettier-plugin-prisma", r, i);
|
|
811
1043
|
const s = {
|
|
812
1044
|
...r,
|
|
813
|
-
...
|
|
814
|
-
}, { node:
|
|
815
|
-
(m, g, { length:
|
|
816
|
-
).join(""),
|
|
817
|
-
|
|
818
|
-
-
|
|
819
|
-
), b =
|
|
1045
|
+
...a
|
|
1046
|
+
}, { node: l } = n, { createPlaceholder: u, placeholderRegex: E } = L(), d = l.quasis.map(
|
|
1047
|
+
(m, g, { length: y }) => g === y - 1 ? m.value.cooked : m.value.cooked + u(g)
|
|
1048
|
+
).join(""), c = d.match(/^\s+/)?.[0] ?? "", p = d.match(/\s+$/)?.[0] ?? "", f = d.slice(
|
|
1049
|
+
c.length,
|
|
1050
|
+
-p.length || void 0
|
|
1051
|
+
), b = S(n, t), _ = await e(f, {
|
|
820
1052
|
...s,
|
|
821
1053
|
parser: "prisma-parse"
|
|
822
|
-
}),
|
|
823
|
-
if (s.preserveEmbeddedExteriorWhitespaces?.includes(
|
|
824
|
-
return
|
|
1054
|
+
}), o = A(_, E, b);
|
|
1055
|
+
if (s.preserveEmbeddedExteriorWhitespaces?.includes(i))
|
|
1056
|
+
return H([
|
|
825
1057
|
"`",
|
|
826
|
-
|
|
827
|
-
s.noEmbeddedMultiLineIndentation?.includes(
|
|
828
|
-
|
|
1058
|
+
c,
|
|
1059
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [H(o)] : sn([H(o)]),
|
|
1060
|
+
p,
|
|
829
1061
|
"`"
|
|
830
1062
|
]);
|
|
831
|
-
const
|
|
832
|
-
return
|
|
1063
|
+
const h = c.length ? nn : rn, $ = p.length ? nn : rn;
|
|
1064
|
+
return H([
|
|
833
1065
|
"`",
|
|
834
|
-
s.noEmbeddedMultiLineIndentation?.includes(
|
|
835
|
-
|
|
1066
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h, H(o)] : sn([h, H(o)]),
|
|
1067
|
+
$,
|
|
836
1068
|
"`"
|
|
837
1069
|
]);
|
|
838
|
-
},
|
|
839
|
-
[
|
|
1070
|
+
}, Ae = "embeddedPrisma", cr = ["prisma"], ur = v(Ae), on = M(Ae), an = D(Ae), pr = {
|
|
1071
|
+
[ur]: {
|
|
1072
|
+
category: "Embed",
|
|
1073
|
+
type: "string",
|
|
1074
|
+
array: !0,
|
|
1075
|
+
default: [{ value: [...cr] }],
|
|
1076
|
+
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.",
|
|
1077
|
+
deprecated: `Please use \`${on}\` or \`${an}\`.`
|
|
1078
|
+
},
|
|
1079
|
+
[on]: {
|
|
1080
|
+
category: "Embed",
|
|
1081
|
+
type: "string",
|
|
1082
|
+
array: !0,
|
|
1083
|
+
default: [{ value: [] }],
|
|
1084
|
+
description: "Block comments that make their subsequent template literals be identified as embedded Prisma language. This option requires the `prettier-plugin-prisma` plugin."
|
|
1085
|
+
},
|
|
1086
|
+
[an]: {
|
|
840
1087
|
category: "Embed",
|
|
841
1088
|
type: "string",
|
|
842
1089
|
array: !0,
|
|
843
|
-
default: [{ value: [
|
|
844
|
-
description: "
|
|
1090
|
+
default: [{ value: [] }],
|
|
1091
|
+
description: "Tags that make their subsequent template literals be identified as embedded Prisma language. This option requires the `prettier-plugin-prisma` plugin."
|
|
845
1092
|
}
|
|
846
|
-
},
|
|
1093
|
+
}, gr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
847
1094
|
__proto__: null,
|
|
848
|
-
embedder:
|
|
849
|
-
language:
|
|
850
|
-
options:
|
|
851
|
-
}, Symbol.toStringTag, { value: "Module" })), { line:
|
|
852
|
-
|
|
1095
|
+
embedder: lr,
|
|
1096
|
+
language: Ae,
|
|
1097
|
+
options: pr
|
|
1098
|
+
}, Symbol.toStringTag, { value: "Module" })), { line: dn, group: X, indent: ln, softline: cn } = T, mr = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
|
|
1099
|
+
N("prettier-plugin-properties", r, i);
|
|
853
1100
|
const s = {
|
|
854
1101
|
...r,
|
|
855
|
-
...
|
|
856
|
-
}, { node:
|
|
857
|
-
(m, g, { length:
|
|
858
|
-
).join(""),
|
|
859
|
-
|
|
860
|
-
-
|
|
861
|
-
), b =
|
|
1102
|
+
...a
|
|
1103
|
+
}, { node: l } = n, { createPlaceholder: u, placeholderRegex: E } = L(), d = l.quasis.map(
|
|
1104
|
+
(m, g, { length: y }) => g === y - 1 ? m.value.cooked : m.value.cooked + u(g)
|
|
1105
|
+
).join(""), c = d.match(/^\s+/)?.[0] ?? "", p = d.match(/\s+$/)?.[0] ?? "", f = d.slice(
|
|
1106
|
+
c.length,
|
|
1107
|
+
-p.length || void 0
|
|
1108
|
+
), b = S(n, t), _ = await e(f, {
|
|
862
1109
|
...s,
|
|
863
1110
|
parser: "dot-properties"
|
|
864
|
-
}),
|
|
865
|
-
if (s.preserveEmbeddedExteriorWhitespaces?.includes(
|
|
866
|
-
return
|
|
1111
|
+
}), o = A(_, E, b);
|
|
1112
|
+
if (s.preserveEmbeddedExteriorWhitespaces?.includes(i))
|
|
1113
|
+
return X([
|
|
867
1114
|
"`",
|
|
868
|
-
|
|
869
|
-
s.noEmbeddedMultiLineIndentation?.includes(
|
|
870
|
-
|
|
1115
|
+
c,
|
|
1116
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [X(o)] : ln([X(o)]),
|
|
1117
|
+
p,
|
|
871
1118
|
"`"
|
|
872
1119
|
]);
|
|
873
|
-
const
|
|
874
|
-
return
|
|
1120
|
+
const h = c.length ? dn : cn, $ = p.length ? dn : cn;
|
|
1121
|
+
return X([
|
|
875
1122
|
"`",
|
|
876
|
-
s.noEmbeddedMultiLineIndentation?.includes(
|
|
877
|
-
|
|
1123
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h, X(o)] : ln([h, X(o)]),
|
|
1124
|
+
$,
|
|
878
1125
|
"`"
|
|
879
1126
|
]);
|
|
880
|
-
},
|
|
881
|
-
[
|
|
1127
|
+
}, Se = "embeddedProperties", hr = ["properties"], Er = v(Se), un = M(Se), pn = D(Se), br = {
|
|
1128
|
+
[Er]: {
|
|
1129
|
+
category: "Embed",
|
|
1130
|
+
type: "string",
|
|
1131
|
+
array: !0,
|
|
1132
|
+
default: [{ value: [...hr] }],
|
|
1133
|
+
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.",
|
|
1134
|
+
deprecated: `Please use \`${un}\` or \`${pn}\`.`
|
|
1135
|
+
},
|
|
1136
|
+
[un]: {
|
|
882
1137
|
category: "Embed",
|
|
883
1138
|
type: "string",
|
|
884
1139
|
array: !0,
|
|
885
|
-
default: [{ value: [
|
|
886
|
-
description: "
|
|
1140
|
+
default: [{ value: [] }],
|
|
1141
|
+
description: "Block comments that make their subsequent template literals be identified as embedded Properties language. This option requires the `prettier-plugin-properties` plugin."
|
|
1142
|
+
},
|
|
1143
|
+
[pn]: {
|
|
1144
|
+
category: "Embed",
|
|
1145
|
+
type: "string",
|
|
1146
|
+
array: !0,
|
|
1147
|
+
default: [{ value: [] }],
|
|
1148
|
+
description: "Tags that make their subsequent template literals be identified as embedded Properties language. This option requires the `prettier-plugin-properties` plugin."
|
|
887
1149
|
}
|
|
888
|
-
},
|
|
1150
|
+
}, fr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
889
1151
|
__proto__: null,
|
|
890
|
-
embedder:
|
|
891
|
-
language:
|
|
892
|
-
options:
|
|
893
|
-
}, Symbol.toStringTag, { value: "Module" })), { group:
|
|
894
|
-
|
|
1152
|
+
embedder: mr,
|
|
1153
|
+
language: Se,
|
|
1154
|
+
options: br
|
|
1155
|
+
}, Symbol.toStringTag, { value: "Module" })), { group: Q, line: gn, softline: mn, indent: hn } = T, yr = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
|
|
1156
|
+
N("@prettier/plugin-pug", r, i);
|
|
895
1157
|
const s = {
|
|
896
1158
|
...r,
|
|
897
|
-
...
|
|
898
|
-
}, { node:
|
|
899
|
-
(m, g, { length:
|
|
900
|
-
).join(""),
|
|
901
|
-
|
|
902
|
-
-
|
|
903
|
-
), b =
|
|
1159
|
+
...a
|
|
1160
|
+
}, { node: l } = n, { createPlaceholder: u, placeholderRegex: E } = L(), d = l.quasis.map(
|
|
1161
|
+
(m, g, { length: y }) => g === y - 1 ? m.value.cooked : m.value.cooked + u(g)
|
|
1162
|
+
).join(""), c = d.match(/^\s+/)?.[0] ?? "", p = d.match(/\s+$/)?.[0] ?? "", f = d.slice(
|
|
1163
|
+
c.length,
|
|
1164
|
+
-p.length || void 0
|
|
1165
|
+
), b = S(n, t), _ = await e(f, {
|
|
904
1166
|
...s,
|
|
905
1167
|
parser: "pug"
|
|
906
|
-
}),
|
|
907
|
-
|
|
908
|
-
|
|
1168
|
+
}), o = A(
|
|
1169
|
+
_,
|
|
1170
|
+
E,
|
|
909
1171
|
b,
|
|
910
1172
|
!0
|
|
911
1173
|
);
|
|
912
|
-
if (s.preserveEmbeddedExteriorWhitespaces?.includes(
|
|
913
|
-
return
|
|
1174
|
+
if (s.preserveEmbeddedExteriorWhitespaces?.includes(i))
|
|
1175
|
+
return Q([
|
|
914
1176
|
"`",
|
|
915
|
-
|
|
916
|
-
s.noEmbeddedMultiLineIndentation?.includes(
|
|
917
|
-
|
|
1177
|
+
c,
|
|
1178
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [Q(o)] : hn([Q(o)]),
|
|
1179
|
+
p,
|
|
918
1180
|
"`"
|
|
919
1181
|
]);
|
|
920
|
-
const
|
|
921
|
-
return
|
|
1182
|
+
const h = c.length ? gn : mn, $ = p.length ? gn : mn;
|
|
1183
|
+
return Q([
|
|
922
1184
|
"`",
|
|
923
|
-
s.noEmbeddedMultiLineIndentation?.includes(
|
|
924
|
-
|
|
1185
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h, Q(o)] : hn([h, Q(o)]),
|
|
1186
|
+
$,
|
|
925
1187
|
"`"
|
|
926
1188
|
]);
|
|
927
|
-
},
|
|
928
|
-
[
|
|
1189
|
+
}, Le = "embeddedPug", _r = ["pug", "jade"], $r = v(Le), En = M(Le), bn = D(Le), vr = {
|
|
1190
|
+
[$r]: {
|
|
1191
|
+
category: "Embed",
|
|
1192
|
+
type: "string",
|
|
1193
|
+
array: !0,
|
|
1194
|
+
default: [{ value: [..._r] }],
|
|
1195
|
+
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.",
|
|
1196
|
+
deprecated: `Please use \`${En}\` or \`${bn}\`.`
|
|
1197
|
+
},
|
|
1198
|
+
[En]: {
|
|
929
1199
|
category: "Embed",
|
|
930
1200
|
type: "string",
|
|
931
1201
|
array: !0,
|
|
932
|
-
default: [{ value: [
|
|
933
|
-
description: "
|
|
1202
|
+
default: [{ value: [] }],
|
|
1203
|
+
description: "Block comments that make their subsequent template literals be identified as embedded Pug language. This option requires the `@prettier/plugin-pug` plugin."
|
|
1204
|
+
},
|
|
1205
|
+
[bn]: {
|
|
1206
|
+
category: "Embed",
|
|
1207
|
+
type: "string",
|
|
1208
|
+
array: !0,
|
|
1209
|
+
default: [{ value: [] }],
|
|
1210
|
+
description: "Tags that make their subsequent template literals be identified as embedded Pug language. This option requires the `@prettier/plugin-pug` plugin."
|
|
934
1211
|
}
|
|
935
|
-
},
|
|
1212
|
+
}, Dr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
936
1213
|
__proto__: null,
|
|
937
|
-
embedder:
|
|
938
|
-
language:
|
|
939
|
-
options:
|
|
940
|
-
}, Symbol.toStringTag, { value: "Module" })), { line:
|
|
941
|
-
|
|
1214
|
+
embedder: yr,
|
|
1215
|
+
language: Le,
|
|
1216
|
+
options: vr
|
|
1217
|
+
}, Symbol.toStringTag, { value: "Module" })), { line: fn, group: Y, indent: yn, softline: _n } = T, Mr = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
|
|
1218
|
+
N("@prettier/plugin-ruby", r, i);
|
|
942
1219
|
const s = {
|
|
943
1220
|
...r,
|
|
944
|
-
...
|
|
945
|
-
}, { node:
|
|
946
|
-
(m, g, { length:
|
|
947
|
-
).join(""),
|
|
948
|
-
|
|
949
|
-
-
|
|
950
|
-
), b =
|
|
1221
|
+
...a
|
|
1222
|
+
}, { node: l } = n, { createPlaceholder: u, placeholderRegex: E } = L(), d = l.quasis.map(
|
|
1223
|
+
(m, g, { length: y }) => g === y - 1 ? m.value.cooked : m.value.cooked + u(g)
|
|
1224
|
+
).join(""), c = d.match(/^\s+/)?.[0] ?? "", p = d.match(/\s+$/)?.[0] ?? "", f = d.slice(
|
|
1225
|
+
c.length,
|
|
1226
|
+
-p.length || void 0
|
|
1227
|
+
), b = S(n, t), _ = await e(f, {
|
|
951
1228
|
...s,
|
|
952
1229
|
parser: s.embeddedRubyParser ?? "ruby"
|
|
953
|
-
}),
|
|
954
|
-
if (s.preserveEmbeddedExteriorWhitespaces?.includes(
|
|
955
|
-
return
|
|
1230
|
+
}), o = A(_, E, b);
|
|
1231
|
+
if (s.preserveEmbeddedExteriorWhitespaces?.includes(i))
|
|
1232
|
+
return Y([
|
|
956
1233
|
"`",
|
|
957
|
-
|
|
958
|
-
s.noEmbeddedMultiLineIndentation?.includes(
|
|
959
|
-
|
|
1234
|
+
c,
|
|
1235
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [Y(o)] : yn([Y(o)]),
|
|
1236
|
+
p,
|
|
960
1237
|
"`"
|
|
961
1238
|
]);
|
|
962
|
-
const
|
|
963
|
-
return
|
|
1239
|
+
const h = c.length ? fn : _n, $ = p.length ? fn : _n;
|
|
1240
|
+
return Y([
|
|
964
1241
|
"`",
|
|
965
|
-
s.noEmbeddedMultiLineIndentation?.includes(
|
|
966
|
-
|
|
1242
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h, Y(o)] : yn([h, Y(o)]),
|
|
1243
|
+
$,
|
|
967
1244
|
"`"
|
|
968
1245
|
]);
|
|
969
|
-
},
|
|
970
|
-
[
|
|
1246
|
+
}, ue = "embeddedRuby", Tr = ["ruby"], Ar = ["ruby", "rbs", "haml"], Sr = v(ue), $n = M(ue), vn = D(ue), Lr = x(ue), kr = {
|
|
1247
|
+
[Sr]: {
|
|
1248
|
+
category: "Embed",
|
|
1249
|
+
type: "string",
|
|
1250
|
+
array: !0,
|
|
1251
|
+
default: [{ value: [...Tr] }],
|
|
1252
|
+
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.",
|
|
1253
|
+
deprecated: `Please use \`${$n}\` or \`${vn}\`.`
|
|
1254
|
+
},
|
|
1255
|
+
[$n]: {
|
|
971
1256
|
category: "Embed",
|
|
972
1257
|
type: "string",
|
|
973
1258
|
array: !0,
|
|
974
|
-
default: [{ value: [
|
|
975
|
-
description: "
|
|
1259
|
+
default: [{ value: [] }],
|
|
1260
|
+
description: "Block comments that make their subsequent template literals be identified as embedded Ruby language. This option requires the `@prettier/plugin-ruby` plugin."
|
|
976
1261
|
},
|
|
977
|
-
[
|
|
1262
|
+
[vn]: {
|
|
1263
|
+
category: "Embed",
|
|
1264
|
+
type: "string",
|
|
1265
|
+
array: !0,
|
|
1266
|
+
default: [{ value: [] }],
|
|
1267
|
+
description: "Tags that make their subsequent template literals be identified as embedded Ruby language. This option requires the `@prettier/plugin-ruby` plugin."
|
|
1268
|
+
},
|
|
1269
|
+
[Lr]: {
|
|
978
1270
|
category: "Embed",
|
|
979
1271
|
type: "choice",
|
|
980
1272
|
default: "ruby",
|
|
981
1273
|
description: "The parser used to parse the embedded Ruby language. This option requires the `@prettier/plugin-ruby` plugin.",
|
|
982
|
-
choices:
|
|
1274
|
+
choices: Ar.map((e) => ({
|
|
983
1275
|
value: e,
|
|
984
1276
|
description: `Use the "${e}" parser.`
|
|
985
1277
|
}))
|
|
986
1278
|
}
|
|
987
|
-
},
|
|
1279
|
+
}, Gr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
988
1280
|
__proto__: null,
|
|
989
|
-
embedder:
|
|
990
|
-
language:
|
|
991
|
-
options:
|
|
992
|
-
}, Symbol.toStringTag, { value: "Module" })), { group:
|
|
993
|
-
|
|
1281
|
+
embedder: Mr,
|
|
1282
|
+
language: ue,
|
|
1283
|
+
options: kr
|
|
1284
|
+
}, Symbol.toStringTag, { value: "Module" })), { group: V, line: Dn, softline: Mn, indent: Tn } = T, Nr = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
|
|
1285
|
+
N("prettier-plugin-sh", r, i);
|
|
994
1286
|
const s = {
|
|
995
1287
|
...r,
|
|
996
|
-
...
|
|
997
|
-
}, { node:
|
|
998
|
-
(m, g, { length:
|
|
999
|
-
).join(""),
|
|
1000
|
-
|
|
1001
|
-
-
|
|
1002
|
-
), b =
|
|
1288
|
+
...a
|
|
1289
|
+
}, { node: l } = n, { createPlaceholder: u, placeholderRegex: E } = L(), d = l.quasis.map(
|
|
1290
|
+
(m, g, { length: y }) => g === y - 1 ? m.value.cooked : m.value.cooked + u(g)
|
|
1291
|
+
).join(""), c = d.match(/^\s+/)?.[0] ?? "", p = d.match(/\s+$/)?.[0] ?? "", f = d.slice(
|
|
1292
|
+
c.length,
|
|
1293
|
+
-p.length || void 0
|
|
1294
|
+
), b = S(n, t), _ = await e(f, {
|
|
1003
1295
|
...s,
|
|
1004
1296
|
parser: "sh"
|
|
1005
|
-
}),
|
|
1006
|
-
|
|
1007
|
-
|
|
1297
|
+
}), o = A(
|
|
1298
|
+
_,
|
|
1299
|
+
E,
|
|
1008
1300
|
b,
|
|
1009
1301
|
!0
|
|
1010
1302
|
);
|
|
1011
|
-
if (s.preserveEmbeddedExteriorWhitespaces?.includes(
|
|
1012
|
-
return
|
|
1303
|
+
if (s.preserveEmbeddedExteriorWhitespaces?.includes(i))
|
|
1304
|
+
return V([
|
|
1013
1305
|
"`",
|
|
1014
|
-
|
|
1015
|
-
s.noEmbeddedMultiLineIndentation?.includes(
|
|
1016
|
-
|
|
1306
|
+
c,
|
|
1307
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [V(o)] : Tn([V(o)]),
|
|
1308
|
+
p,
|
|
1017
1309
|
"`"
|
|
1018
1310
|
]);
|
|
1019
|
-
const
|
|
1020
|
-
return
|
|
1311
|
+
const h = c.length ? Dn : Mn, $ = p.length ? Dn : Mn;
|
|
1312
|
+
return V([
|
|
1021
1313
|
"`",
|
|
1022
|
-
s.noEmbeddedMultiLineIndentation?.includes(
|
|
1023
|
-
|
|
1314
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h, V(o)] : Tn([h, V(o)]),
|
|
1315
|
+
$,
|
|
1024
1316
|
"`"
|
|
1025
1317
|
]);
|
|
1026
|
-
},
|
|
1027
|
-
[
|
|
1318
|
+
}, ke = "embeddedSh", xr = ["sh"], Ir = v(ke), An = M(ke), Sn = D(ke), Or = {
|
|
1319
|
+
[Ir]: {
|
|
1320
|
+
category: "Embed",
|
|
1321
|
+
type: "string",
|
|
1322
|
+
array: !0,
|
|
1323
|
+
default: [{ value: [...xr] }],
|
|
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.",
|
|
1325
|
+
deprecated: `Please use \`${An}\` or \`${Sn}\`.`
|
|
1326
|
+
},
|
|
1327
|
+
[An]: {
|
|
1328
|
+
category: "Embed",
|
|
1329
|
+
type: "string",
|
|
1330
|
+
array: !0,
|
|
1331
|
+
default: [{ value: [] }],
|
|
1332
|
+
description: "Block comments that make their subsequent template literals be identified as embedded Shell language. This option requires the `prettier-plugin-sh` plugin."
|
|
1333
|
+
},
|
|
1334
|
+
[Sn]: {
|
|
1028
1335
|
category: "Embed",
|
|
1029
1336
|
type: "string",
|
|
1030
1337
|
array: !0,
|
|
1031
|
-
default: [{ value: [
|
|
1032
|
-
description: "
|
|
1338
|
+
default: [{ value: [] }],
|
|
1339
|
+
description: "Tags that make their subsequent template literals be identified as embedded Shell language. This option requires the `prettier-plugin-sh` plugin."
|
|
1033
1340
|
}
|
|
1034
|
-
},
|
|
1341
|
+
}, Pr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1035
1342
|
__proto__: null,
|
|
1036
|
-
embedder:
|
|
1037
|
-
language:
|
|
1038
|
-
options:
|
|
1343
|
+
embedder: Nr,
|
|
1344
|
+
language: ke,
|
|
1345
|
+
options: Or
|
|
1039
1346
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1040
|
-
function
|
|
1347
|
+
function Ln(e, t) {
|
|
1041
1348
|
var n = Object.keys(e);
|
|
1042
1349
|
if (Object.getOwnPropertySymbols) {
|
|
1043
1350
|
var r = Object.getOwnPropertySymbols(e);
|
|
1044
|
-
t && (r = r.filter(function(
|
|
1045
|
-
return Object.getOwnPropertyDescriptor(e,
|
|
1351
|
+
t && (r = r.filter(function(i) {
|
|
1352
|
+
return Object.getOwnPropertyDescriptor(e, i).enumerable;
|
|
1046
1353
|
})), n.push.apply(n, r);
|
|
1047
1354
|
}
|
|
1048
1355
|
return n;
|
|
1049
1356
|
}
|
|
1050
|
-
function
|
|
1357
|
+
function kn(e) {
|
|
1051
1358
|
for (var t = 1; t < arguments.length; t++) {
|
|
1052
1359
|
var n = arguments[t] != null ? arguments[t] : {};
|
|
1053
|
-
t % 2 ?
|
|
1054
|
-
|
|
1055
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
1360
|
+
t % 2 ? Ln(Object(n), !0).forEach(function(r) {
|
|
1361
|
+
Br(e, r, n[r]);
|
|
1362
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Ln(Object(n)).forEach(function(r) {
|
|
1056
1363
|
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(n, r));
|
|
1057
1364
|
});
|
|
1058
1365
|
}
|
|
1059
1366
|
return e;
|
|
1060
1367
|
}
|
|
1061
|
-
function
|
|
1062
|
-
return t =
|
|
1368
|
+
function Br(e, t, n) {
|
|
1369
|
+
return t = qr(t), t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
|
|
1063
1370
|
}
|
|
1064
|
-
function
|
|
1065
|
-
var t =
|
|
1371
|
+
function qr(e) {
|
|
1372
|
+
var t = jr(e, "string");
|
|
1066
1373
|
return typeof t == "symbol" ? t : String(t);
|
|
1067
1374
|
}
|
|
1068
|
-
function
|
|
1375
|
+
function jr(e, t) {
|
|
1069
1376
|
if (typeof e != "object" || e === null)
|
|
1070
1377
|
return e;
|
|
1071
1378
|
var n = e[Symbol.toPrimitive];
|
|
@@ -1077,273 +1384,339 @@ function ws(e, t) {
|
|
|
1077
1384
|
}
|
|
1078
1385
|
return (t === "string" ? String : Number)(e);
|
|
1079
1386
|
}
|
|
1080
|
-
const
|
|
1081
|
-
function
|
|
1082
|
-
return t.withOptions = (n) =>
|
|
1387
|
+
const Ur = ri({});
|
|
1388
|
+
function ri(e) {
|
|
1389
|
+
return t.withOptions = (n) => ri(kn(kn({}, e), n)), t;
|
|
1083
1390
|
function t(n, ...r) {
|
|
1084
|
-
const
|
|
1085
|
-
escapeSpecialCharacters:
|
|
1391
|
+
const i = typeof n == "string" ? [n] : n.raw, {
|
|
1392
|
+
escapeSpecialCharacters: a = Array.isArray(n)
|
|
1086
1393
|
} = e;
|
|
1087
1394
|
let s = "";
|
|
1088
|
-
for (let
|
|
1089
|
-
let
|
|
1090
|
-
|
|
1395
|
+
for (let E = 0; E < i.length; E++) {
|
|
1396
|
+
let d = i[E];
|
|
1397
|
+
a && (d = d.replace(/\\\n[ \t]*/g, "").replace(/\\`/g, "`").replace(/\\\$/g, "$").replace(/\\{/g, "{")), s += d, E < r.length && (s += r[E]);
|
|
1091
1398
|
}
|
|
1092
|
-
const
|
|
1399
|
+
const l = s.split(`
|
|
1093
1400
|
`);
|
|
1094
|
-
let
|
|
1095
|
-
for (const
|
|
1096
|
-
const
|
|
1097
|
-
if (
|
|
1098
|
-
const
|
|
1099
|
-
|
|
1401
|
+
let u = null;
|
|
1402
|
+
for (const E of l) {
|
|
1403
|
+
const d = E.match(/^(\s+)\S+/);
|
|
1404
|
+
if (d) {
|
|
1405
|
+
const c = d[1].length;
|
|
1406
|
+
u ? u = Math.min(u, c) : u = c;
|
|
1100
1407
|
}
|
|
1101
1408
|
}
|
|
1102
|
-
if (
|
|
1103
|
-
const
|
|
1104
|
-
s =
|
|
1409
|
+
if (u !== null) {
|
|
1410
|
+
const E = u;
|
|
1411
|
+
s = l.map((d) => d[0] === " " || d[0] === " " ? d.slice(E) : d).join(`
|
|
1105
1412
|
`);
|
|
1106
1413
|
}
|
|
1107
1414
|
return s.trim().replace(/\\n/g, `
|
|
1108
1415
|
`);
|
|
1109
1416
|
}
|
|
1110
1417
|
}
|
|
1111
|
-
const { group:
|
|
1418
|
+
const { group: Z, line: Gn, softline: Nn, indent: xn } = T, Rr = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
|
|
1112
1419
|
const s = {
|
|
1113
1420
|
...r,
|
|
1114
|
-
...
|
|
1115
|
-
},
|
|
1116
|
-
|
|
1117
|
-
const { node:
|
|
1118
|
-
(m, g, { length:
|
|
1119
|
-
).join(""),
|
|
1120
|
-
|
|
1121
|
-
-
|
|
1122
|
-
),
|
|
1123
|
-
let
|
|
1124
|
-
if (
|
|
1421
|
+
...a
|
|
1422
|
+
}, l = s.embeddedSqlPlugin ?? "prettier-plugin-sql";
|
|
1423
|
+
N(l, s, i);
|
|
1424
|
+
const { node: u } = n, { createPlaceholder: E, placeholderRegex: d } = L(), c = u.quasis.map(
|
|
1425
|
+
(m, g, { length: y }) => g === y - 1 ? m.value.cooked : m.value.cooked + E(g)
|
|
1426
|
+
).join(""), p = c.match(/^\s+/)?.[0] ?? "", f = c.match(/\s+$/)?.[0] ?? "", b = c.slice(
|
|
1427
|
+
p.length,
|
|
1428
|
+
-f.length || void 0
|
|
1429
|
+
), _ = S(n, t);
|
|
1430
|
+
let o;
|
|
1431
|
+
if (l === "prettier-plugin-sql-cst") {
|
|
1125
1432
|
const m = await e(b, {
|
|
1126
1433
|
...s,
|
|
1127
1434
|
parser: s.embeddedSqlParser ?? "sqlite"
|
|
1128
1435
|
});
|
|
1129
|
-
|
|
1436
|
+
o = A(m, d, _);
|
|
1130
1437
|
} else {
|
|
1131
|
-
const m = await e(
|
|
1438
|
+
const m = await e(Ur(b), {
|
|
1132
1439
|
...s,
|
|
1133
1440
|
parser: "sql"
|
|
1134
1441
|
});
|
|
1135
|
-
|
|
1442
|
+
o = A(
|
|
1136
1443
|
m,
|
|
1137
|
-
|
|
1138
|
-
|
|
1444
|
+
d,
|
|
1445
|
+
_,
|
|
1139
1446
|
!0
|
|
1140
1447
|
);
|
|
1141
1448
|
}
|
|
1142
|
-
if (s.preserveEmbeddedExteriorWhitespaces?.includes(
|
|
1143
|
-
return
|
|
1449
|
+
if (s.preserveEmbeddedExteriorWhitespaces?.includes(i))
|
|
1450
|
+
return Z([
|
|
1144
1451
|
"`",
|
|
1145
|
-
|
|
1146
|
-
s.noEmbeddedMultiLineIndentation?.includes(
|
|
1147
|
-
|
|
1452
|
+
p,
|
|
1453
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [Z(o)] : xn([Z(o)]),
|
|
1454
|
+
f,
|
|
1148
1455
|
"`"
|
|
1149
1456
|
]);
|
|
1150
|
-
const
|
|
1151
|
-
return
|
|
1457
|
+
const h = p.length ? Gn : Nn, $ = f.length ? Gn : Nn;
|
|
1458
|
+
return Z([
|
|
1152
1459
|
"`",
|
|
1153
|
-
s.noEmbeddedMultiLineIndentation?.includes(
|
|
1154
|
-
|
|
1460
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h, Z(o)] : xn([h, Z(o)]),
|
|
1461
|
+
$,
|
|
1155
1462
|
"`"
|
|
1156
1463
|
]);
|
|
1157
|
-
}, se = "embeddedSql",
|
|
1464
|
+
}, se = "embeddedSql", Cr = ["sql"], wr = ["prettier-plugin-sql", "prettier-plugin-sql-cst"], Fr = [
|
|
1158
1465
|
"sqlite",
|
|
1159
1466
|
"bigquery",
|
|
1160
1467
|
"mysql",
|
|
1161
1468
|
"mariadb",
|
|
1162
1469
|
"postgresql"
|
|
1163
|
-
],
|
|
1164
|
-
[
|
|
1470
|
+
], Wr = v(se), In = M(se), On = D(se), zr = Ni(se), Kr = x(se), Jr = {
|
|
1471
|
+
[Wr]: {
|
|
1472
|
+
category: "Embed",
|
|
1473
|
+
type: "string",
|
|
1474
|
+
array: !0,
|
|
1475
|
+
default: [{ value: [...Cr] }],
|
|
1476
|
+
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.",
|
|
1477
|
+
deprecated: `Please use \`${In}\` or \`${On}\`.`
|
|
1478
|
+
},
|
|
1479
|
+
[In]: {
|
|
1480
|
+
category: "Embed",
|
|
1481
|
+
type: "string",
|
|
1482
|
+
array: !0,
|
|
1483
|
+
default: [{ value: [] }],
|
|
1484
|
+
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."
|
|
1485
|
+
},
|
|
1486
|
+
[On]: {
|
|
1165
1487
|
category: "Embed",
|
|
1166
1488
|
type: "string",
|
|
1167
1489
|
array: !0,
|
|
1168
|
-
default: [{ value: [
|
|
1169
|
-
description: "
|
|
1490
|
+
default: [{ value: [] }],
|
|
1491
|
+
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."
|
|
1170
1492
|
},
|
|
1171
|
-
[
|
|
1493
|
+
[zr]: {
|
|
1172
1494
|
category: "Embed",
|
|
1173
1495
|
type: "choice",
|
|
1174
1496
|
default: "prettier-plugin-sql",
|
|
1175
1497
|
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.",
|
|
1176
|
-
choices:
|
|
1498
|
+
choices: wr.map((e) => ({
|
|
1177
1499
|
value: e,
|
|
1178
1500
|
description: `Use the "${e}" plugin.`
|
|
1179
1501
|
}))
|
|
1180
1502
|
},
|
|
1181
|
-
[
|
|
1503
|
+
[Kr]: {
|
|
1182
1504
|
category: "Embed",
|
|
1183
1505
|
type: "choice",
|
|
1184
1506
|
default: "sqlite",
|
|
1185
1507
|
description: "Specify the embedded SQL language parser. This option is only needed with the `prettier-plugin-sql-cst` plugin.",
|
|
1186
|
-
choices:
|
|
1508
|
+
choices: Fr.map((e) => ({
|
|
1187
1509
|
value: e,
|
|
1188
1510
|
description: `Use the "${e}" parser.`
|
|
1189
1511
|
}))
|
|
1190
1512
|
}
|
|
1191
|
-
},
|
|
1513
|
+
}, Hr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1192
1514
|
__proto__: null,
|
|
1193
|
-
embedder:
|
|
1515
|
+
embedder: Rr,
|
|
1194
1516
|
language: se,
|
|
1195
|
-
options:
|
|
1196
|
-
}, Symbol.toStringTag, { value: "Module" })), { line:
|
|
1197
|
-
|
|
1517
|
+
options: Jr
|
|
1518
|
+
}, Symbol.toStringTag, { value: "Module" })), { line: Pn, group: ee, indent: Bn, softline: qn } = T, Xr = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
|
|
1519
|
+
N("prettier-plugin-toml", r, i);
|
|
1198
1520
|
const s = {
|
|
1199
1521
|
...r,
|
|
1200
|
-
...
|
|
1201
|
-
}, { node:
|
|
1202
|
-
(m, g, { length:
|
|
1203
|
-
).join(""),
|
|
1204
|
-
|
|
1205
|
-
-
|
|
1206
|
-
), b =
|
|
1522
|
+
...a
|
|
1523
|
+
}, { node: l } = n, { createPlaceholder: u, placeholderRegex: E } = L(), d = l.quasis.map(
|
|
1524
|
+
(m, g, { length: y }) => g === y - 1 ? m.value.cooked : m.value.cooked + u(g)
|
|
1525
|
+
).join(""), c = d.match(/^\s+/)?.[0] ?? "", p = d.match(/\s+$/)?.[0] ?? "", f = d.slice(
|
|
1526
|
+
c.length,
|
|
1527
|
+
-p.length || void 0
|
|
1528
|
+
), b = S(n, t), _ = await e(f, {
|
|
1207
1529
|
...s,
|
|
1208
1530
|
parser: "toml"
|
|
1209
|
-
}),
|
|
1210
|
-
|
|
1211
|
-
|
|
1531
|
+
}), o = A(
|
|
1532
|
+
_,
|
|
1533
|
+
E,
|
|
1212
1534
|
b,
|
|
1213
1535
|
!0
|
|
1214
1536
|
);
|
|
1215
|
-
if (s.preserveEmbeddedExteriorWhitespaces?.includes(
|
|
1216
|
-
return
|
|
1537
|
+
if (s.preserveEmbeddedExteriorWhitespaces?.includes(i))
|
|
1538
|
+
return ee([
|
|
1217
1539
|
"`",
|
|
1218
|
-
|
|
1219
|
-
s.noEmbeddedMultiLineIndentation?.includes(
|
|
1220
|
-
|
|
1540
|
+
c,
|
|
1541
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [ee(o)] : Bn([ee(o)]),
|
|
1542
|
+
p,
|
|
1221
1543
|
"`"
|
|
1222
1544
|
]);
|
|
1223
|
-
const
|
|
1224
|
-
return
|
|
1545
|
+
const h = c.length ? Pn : qn, $ = p.length ? Pn : qn;
|
|
1546
|
+
return ee([
|
|
1225
1547
|
"`",
|
|
1226
|
-
s.noEmbeddedMultiLineIndentation?.includes(
|
|
1227
|
-
|
|
1548
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h, ee(o)] : Bn([h, ee(o)]),
|
|
1549
|
+
$,
|
|
1228
1550
|
"`"
|
|
1229
1551
|
]);
|
|
1230
|
-
},
|
|
1231
|
-
[
|
|
1552
|
+
}, Ge = "embeddedToml", Qr = ["toml"], Yr = v(Ge), jn = M(Ge), Un = D(Ge), Vr = {
|
|
1553
|
+
[Yr]: {
|
|
1554
|
+
category: "Embed",
|
|
1555
|
+
type: "string",
|
|
1556
|
+
array: !0,
|
|
1557
|
+
default: [{ value: [...Qr] }],
|
|
1558
|
+
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.",
|
|
1559
|
+
deprecated: `Please use \`${jn}\` or \`${Un}\`.`
|
|
1560
|
+
},
|
|
1561
|
+
[jn]: {
|
|
1562
|
+
category: "Embed",
|
|
1563
|
+
type: "string",
|
|
1564
|
+
array: !0,
|
|
1565
|
+
default: [{ value: [] }],
|
|
1566
|
+
description: "Block comments that make their subsequent template literals be identified as embedded TOML language. This option requires the `prettier-plugin-toml` plugin."
|
|
1567
|
+
},
|
|
1568
|
+
[Un]: {
|
|
1232
1569
|
category: "Embed",
|
|
1233
1570
|
type: "string",
|
|
1234
1571
|
array: !0,
|
|
1235
|
-
default: [{ value: [
|
|
1236
|
-
description: "
|
|
1572
|
+
default: [{ value: [] }],
|
|
1573
|
+
description: "Tags that make their subsequent template literals be identified as embedded TOML language. This option requires the `prettier-plugin-toml` plugin."
|
|
1237
1574
|
}
|
|
1238
|
-
},
|
|
1575
|
+
}, Zr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1239
1576
|
__proto__: null,
|
|
1240
|
-
embedder:
|
|
1241
|
-
language:
|
|
1242
|
-
options:
|
|
1243
|
-
}, Symbol.toStringTag, { value: "Module" })), { line:
|
|
1577
|
+
embedder: Xr,
|
|
1578
|
+
language: Ge,
|
|
1579
|
+
options: Vr
|
|
1580
|
+
}, Symbol.toStringTag, { value: "Module" })), { line: Rn, group: te, indent: Cn, softline: wn } = T, eo = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
|
|
1244
1581
|
const s = {
|
|
1245
1582
|
...r,
|
|
1246
|
-
...
|
|
1247
|
-
}, { node:
|
|
1248
|
-
(m, g, { length:
|
|
1249
|
-
).join(""),
|
|
1250
|
-
|
|
1251
|
-
-
|
|
1252
|
-
), b =
|
|
1583
|
+
...a
|
|
1584
|
+
}, { node: l } = n, { createPlaceholder: u, placeholderRegex: E } = L(), d = l.quasis.map(
|
|
1585
|
+
(m, g, { length: y }) => g === y - 1 ? m.value.cooked : m.value.cooked + u(g)
|
|
1586
|
+
).join(""), c = d.match(/^\s+/)?.[0] ?? "", p = d.match(/\s+$/)?.[0] ?? "", f = d.slice(
|
|
1587
|
+
c.length,
|
|
1588
|
+
-p.length || void 0
|
|
1589
|
+
), b = S(n, t), _ = await e(f, {
|
|
1253
1590
|
...s,
|
|
1254
1591
|
parser: s.embeddedTsParser ?? "typescript",
|
|
1255
1592
|
// set filepath to undefined to enable jsx auto detection:
|
|
1256
1593
|
// https://github.com/prettier/prettier/blob/427a84d24203e2d54160cde153a1e6a6390fe65a/src/language-js/parse/typescript.js#L49-L53
|
|
1257
1594
|
filepath: void 0
|
|
1258
|
-
}),
|
|
1259
|
-
if (s.preserveEmbeddedExteriorWhitespaces?.includes(
|
|
1260
|
-
return
|
|
1595
|
+
}), o = A(_, E, b);
|
|
1596
|
+
if (s.preserveEmbeddedExteriorWhitespaces?.includes(i))
|
|
1597
|
+
return te([
|
|
1261
1598
|
"`",
|
|
1262
|
-
|
|
1263
|
-
s.noEmbeddedMultiLineIndentation?.includes(
|
|
1264
|
-
|
|
1599
|
+
c,
|
|
1600
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [te(o)] : Cn([te(o)]),
|
|
1601
|
+
p,
|
|
1265
1602
|
"`"
|
|
1266
1603
|
]);
|
|
1267
|
-
const
|
|
1268
|
-
return
|
|
1604
|
+
const h = c.length ? Rn : wn, $ = p.length ? Rn : wn;
|
|
1605
|
+
return te([
|
|
1269
1606
|
"`",
|
|
1270
|
-
s.noEmbeddedMultiLineIndentation?.includes(
|
|
1271
|
-
|
|
1607
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h, te(o)] : Cn([h, te(o)]),
|
|
1608
|
+
$,
|
|
1272
1609
|
"`"
|
|
1273
1610
|
]);
|
|
1274
|
-
},
|
|
1275
|
-
|
|
1611
|
+
}, pe = "embeddedTs", to = [
|
|
1612
|
+
"ts",
|
|
1613
|
+
"tsx",
|
|
1614
|
+
"cts",
|
|
1615
|
+
"mts",
|
|
1616
|
+
"typescript"
|
|
1617
|
+
], no = ["typescript", "babel-ts"], io = v(pe), Fn = M(pe), Wn = D(pe), so = x(pe), ro = {
|
|
1618
|
+
[io]: {
|
|
1276
1619
|
category: "Embed",
|
|
1277
1620
|
type: "string",
|
|
1278
1621
|
array: !0,
|
|
1279
|
-
default: [{ value: [...
|
|
1280
|
-
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded TypeScript language."
|
|
1622
|
+
default: [{ value: [...to] }],
|
|
1623
|
+
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded TypeScript language.",
|
|
1624
|
+
deprecated: `Please use \`${Fn}\` or \`${Wn}\`.`
|
|
1281
1625
|
},
|
|
1282
|
-
[
|
|
1626
|
+
[Fn]: {
|
|
1627
|
+
category: "Embed",
|
|
1628
|
+
type: "string",
|
|
1629
|
+
array: !0,
|
|
1630
|
+
default: [{ value: [] }],
|
|
1631
|
+
description: "Block comments that make their subsequent template literals be identified as embedded TypeScript language."
|
|
1632
|
+
},
|
|
1633
|
+
[Wn]: {
|
|
1634
|
+
category: "Embed",
|
|
1635
|
+
type: "string",
|
|
1636
|
+
array: !0,
|
|
1637
|
+
default: [{ value: [] }],
|
|
1638
|
+
description: "Tags that make their subsequent template literals be identified as embedded TypeScript language."
|
|
1639
|
+
},
|
|
1640
|
+
[so]: {
|
|
1283
1641
|
category: "Embed",
|
|
1284
1642
|
type: "choice",
|
|
1285
1643
|
default: "typescript",
|
|
1286
1644
|
description: "The parser used to parse the embedded TypeScript language.",
|
|
1287
|
-
choices:
|
|
1645
|
+
choices: no.map((e) => ({
|
|
1288
1646
|
value: e,
|
|
1289
1647
|
description: `Use the "${e}" parser.`
|
|
1290
1648
|
}))
|
|
1291
1649
|
}
|
|
1292
|
-
},
|
|
1650
|
+
}, oo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1293
1651
|
__proto__: null,
|
|
1294
|
-
embedder:
|
|
1295
|
-
language:
|
|
1296
|
-
options:
|
|
1297
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1298
|
-
|
|
1652
|
+
embedder: eo,
|
|
1653
|
+
language: pe,
|
|
1654
|
+
options: ro
|
|
1655
|
+
}, Symbol.toStringTag, { value: "Module" })), ge = "embeddedXml", { line: zn, group: ne, indent: Kn, softline: xe } = T, ao = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
|
|
1656
|
+
N("@prettier/plugin-xml", r, i);
|
|
1299
1657
|
const s = {
|
|
1300
1658
|
...r,
|
|
1301
|
-
...
|
|
1302
|
-
}, { node:
|
|
1303
|
-
(g,
|
|
1304
|
-
).join(""),
|
|
1305
|
-
|
|
1306
|
-
-
|
|
1307
|
-
), b =
|
|
1308
|
-
let
|
|
1309
|
-
for (;
|
|
1310
|
-
const g =
|
|
1659
|
+
...a
|
|
1660
|
+
}, { node: l } = n, { createPlaceholder: u, placeholderRegex: E } = L(), d = l.quasis.map(
|
|
1661
|
+
(g, y, { length: k }) => y === k - 1 ? g.value.cooked : g.value.cooked + u(y)
|
|
1662
|
+
).join(""), c = d.match(/^\s+/)?.[0] ?? "", p = d.match(/\s+$/)?.[0] ?? "", f = d.slice(
|
|
1663
|
+
c.length,
|
|
1664
|
+
-p.length || void 0
|
|
1665
|
+
), b = S(n, t), _ = [];
|
|
1666
|
+
let o = 0;
|
|
1667
|
+
for (; o !== void 0; ) {
|
|
1668
|
+
const g = f.slice(o);
|
|
1311
1669
|
if (g.length === 0)
|
|
1312
1670
|
break;
|
|
1313
|
-
|
|
1671
|
+
o > 0 && s.xmlWhitespaceSensitivity !== "strict" && _.push(xe), s.__embeddedXmlFragmentRecoverIndex?.splice(
|
|
1314
1672
|
0,
|
|
1315
1673
|
s.__embeddedXmlFragmentRecoverIndex.length
|
|
1316
1674
|
);
|
|
1317
|
-
let
|
|
1675
|
+
let y = await e(g, {
|
|
1318
1676
|
...s,
|
|
1319
|
-
parser:
|
|
1677
|
+
parser: ge
|
|
1320
1678
|
});
|
|
1321
|
-
const [
|
|
1322
|
-
|
|
1679
|
+
const [k, G] = s.__embeddedXmlFragmentRecoverIndex ?? [];
|
|
1680
|
+
k === void 0 ? o = void 0 : G === void 0 ? o += k : (y = g.slice(k, G + 1), o += G + 1), _.push(y);
|
|
1323
1681
|
}
|
|
1324
|
-
const
|
|
1325
|
-
if (s.xmlWhitespaceSensitivity === "strict" || s.preserveEmbeddedExteriorWhitespaces?.includes(
|
|
1326
|
-
return
|
|
1682
|
+
const h = A(_, E, b);
|
|
1683
|
+
if (s.xmlWhitespaceSensitivity === "strict" || s.preserveEmbeddedExteriorWhitespaces?.includes(i))
|
|
1684
|
+
return ne([
|
|
1327
1685
|
"`",
|
|
1328
|
-
|
|
1329
|
-
s.noEmbeddedMultiLineIndentation?.includes(
|
|
1330
|
-
|
|
1686
|
+
c,
|
|
1687
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [ne(h)] : Kn([ne(h)]),
|
|
1688
|
+
p,
|
|
1331
1689
|
"`"
|
|
1332
1690
|
]);
|
|
1333
|
-
const
|
|
1334
|
-
return
|
|
1691
|
+
const $ = c.length ? zn : xe, m = p.length ? zn : xe;
|
|
1692
|
+
return ne([
|
|
1335
1693
|
"`",
|
|
1336
|
-
s.noEmbeddedMultiLineIndentation?.includes(
|
|
1694
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [$, ne(h)] : Kn([$, ne(h)]),
|
|
1337
1695
|
m,
|
|
1338
1696
|
"`"
|
|
1339
1697
|
]);
|
|
1340
|
-
},
|
|
1341
|
-
[
|
|
1698
|
+
}, lo = ["xml", "opml", "rss", "svg"], co = v(ge), Jn = M(ge), Hn = D(ge), uo = {
|
|
1699
|
+
[co]: {
|
|
1342
1700
|
category: "Embed",
|
|
1343
1701
|
type: "string",
|
|
1344
1702
|
array: !0,
|
|
1345
|
-
default: [{ value: [...
|
|
1346
|
-
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."
|
|
1703
|
+
default: [{ value: [...lo] }],
|
|
1704
|
+
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.",
|
|
1705
|
+
deprecated: `Please use \`${Jn}\` or \`${Hn}\`.`
|
|
1706
|
+
},
|
|
1707
|
+
[Jn]: {
|
|
1708
|
+
category: "Embed",
|
|
1709
|
+
type: "string",
|
|
1710
|
+
array: !0,
|
|
1711
|
+
default: [{ value: [] }],
|
|
1712
|
+
description: "Block comments that make their subsequent template literals be identified as embedded XML language. This option requires the `@prettier/plugin-xml` plugin."
|
|
1713
|
+
},
|
|
1714
|
+
[Hn]: {
|
|
1715
|
+
category: "Embed",
|
|
1716
|
+
type: "string",
|
|
1717
|
+
array: !0,
|
|
1718
|
+
default: [{ value: [] }],
|
|
1719
|
+
description: "Tags that make their subsequent template literals be identified as embedded XML language. This option requires the `@prettier/plugin-xml` plugin."
|
|
1347
1720
|
},
|
|
1348
1721
|
/**
|
|
1349
1722
|
* @internal
|
|
@@ -1356,7 +1729,7 @@ const { group: Q, line: Dt, softline: It, indent: Tt } = $, Us = async (e, t, n,
|
|
|
1356
1729
|
description: "This option is read only and is used internally as a workaround to support xml fragments"
|
|
1357
1730
|
}
|
|
1358
1731
|
};
|
|
1359
|
-
function
|
|
1732
|
+
function po(e) {
|
|
1360
1733
|
const t = {
|
|
1361
1734
|
loc: {
|
|
1362
1735
|
start: {
|
|
@@ -1376,7 +1749,7 @@ function ur(e) {
|
|
|
1376
1749
|
);
|
|
1377
1750
|
return Object.assign(n, t), n;
|
|
1378
1751
|
}
|
|
1379
|
-
function
|
|
1752
|
+
function Xn(e) {
|
|
1380
1753
|
const t = {
|
|
1381
1754
|
loc: {
|
|
1382
1755
|
start: {
|
|
@@ -1396,52 +1769,52 @@ function Pt(e) {
|
|
|
1396
1769
|
);
|
|
1397
1770
|
return Object.assign(n, t), n;
|
|
1398
1771
|
}
|
|
1399
|
-
const
|
|
1772
|
+
const go = {
|
|
1400
1773
|
async parse(e, t) {
|
|
1401
|
-
const { parse: n } = await import("@xml-tools/parser"), { lexErrors: r, parseErrors:
|
|
1774
|
+
const { parse: n } = await import("@xml-tools/parser"), { lexErrors: r, parseErrors: i, cst: a } = n(e);
|
|
1402
1775
|
if (r.length > 0) {
|
|
1403
1776
|
const s = r[0];
|
|
1404
|
-
throw
|
|
1777
|
+
throw po(s);
|
|
1405
1778
|
}
|
|
1406
|
-
if (
|
|
1779
|
+
if (i.length > 0) {
|
|
1407
1780
|
let s = !1;
|
|
1408
|
-
for (const
|
|
1781
|
+
for (const l of i) {
|
|
1409
1782
|
if (!["MismatchedTokenException", "NotAllInputParsedException"].includes(
|
|
1410
|
-
|
|
1783
|
+
l.name
|
|
1411
1784
|
))
|
|
1412
|
-
throw
|
|
1413
|
-
if (
|
|
1785
|
+
throw Xn(l);
|
|
1786
|
+
if (l.message === "Expecting token of type --> OPEN <-- but found --> '' <--") {
|
|
1414
1787
|
s = !0;
|
|
1415
1788
|
continue;
|
|
1416
1789
|
}
|
|
1417
1790
|
if (/Expecting token of type --> EOF <-- but found --> '[\s\S]+' <--/.test(
|
|
1418
|
-
|
|
1419
|
-
) || /Redundant input, expecting EOF but found: /.test(
|
|
1791
|
+
l.message
|
|
1792
|
+
) || /Redundant input, expecting EOF but found: /.test(l.message)) {
|
|
1420
1793
|
t.__embeddedXmlFragmentRecoverIndex?.splice(
|
|
1421
1794
|
0,
|
|
1422
1795
|
t.__embeddedXmlFragmentRecoverIndex.length,
|
|
1423
|
-
|
|
1796
|
+
l.token.startOffset
|
|
1424
1797
|
);
|
|
1425
1798
|
break;
|
|
1426
1799
|
}
|
|
1427
1800
|
if (/Expecting token of type --> OPEN <-- but found --> '[\s\S]+' <--/.test(
|
|
1428
|
-
|
|
1801
|
+
l.message
|
|
1429
1802
|
)) {
|
|
1430
|
-
if (
|
|
1803
|
+
if (l.token.endOffset === void 0 || Number.isNaN(l.token.endOffset))
|
|
1431
1804
|
break;
|
|
1432
1805
|
t.__embeddedXmlFragmentRecoverIndex?.splice(
|
|
1433
1806
|
0,
|
|
1434
1807
|
t.__embeddedXmlFragmentRecoverIndex.length,
|
|
1435
|
-
|
|
1436
|
-
|
|
1808
|
+
l.token.startOffset,
|
|
1809
|
+
l.token.endOffset
|
|
1437
1810
|
), s = !0;
|
|
1438
1811
|
break;
|
|
1439
1812
|
}
|
|
1440
|
-
throw
|
|
1813
|
+
throw Xn(l);
|
|
1441
1814
|
}
|
|
1442
|
-
s &&
|
|
1815
|
+
s && oi(a);
|
|
1443
1816
|
}
|
|
1444
|
-
return
|
|
1817
|
+
return a;
|
|
1445
1818
|
},
|
|
1446
1819
|
astFormat: "xml",
|
|
1447
1820
|
locStart(e) {
|
|
@@ -1451,149 +1824,172 @@ const pr = {
|
|
|
1451
1824
|
return e.location.endOffset ?? NaN;
|
|
1452
1825
|
}
|
|
1453
1826
|
};
|
|
1454
|
-
function
|
|
1827
|
+
function oi(e) {
|
|
1455
1828
|
const t = e.children;
|
|
1456
1829
|
for (const n in t) {
|
|
1457
1830
|
const r = t[n] ?? [];
|
|
1458
|
-
for (let
|
|
1459
|
-
const
|
|
1460
|
-
if (
|
|
1461
|
-
if (Object.keys(
|
|
1462
|
-
r.splice(
|
|
1831
|
+
for (let i = r.length - 1; i >= 0; --i) {
|
|
1832
|
+
const a = r[i];
|
|
1833
|
+
if (mo(a)) {
|
|
1834
|
+
if (Object.keys(a.children).length === 0) {
|
|
1835
|
+
r.splice(i, 1), r.length === 0 && delete t[n];
|
|
1463
1836
|
continue;
|
|
1464
1837
|
}
|
|
1465
|
-
|
|
1838
|
+
oi(a);
|
|
1466
1839
|
}
|
|
1467
1840
|
}
|
|
1468
1841
|
}
|
|
1469
1842
|
}
|
|
1470
|
-
function
|
|
1843
|
+
function mo(e) {
|
|
1471
1844
|
return "name" in e && "children" in e && "location" in e;
|
|
1472
1845
|
}
|
|
1473
|
-
const
|
|
1846
|
+
const ho = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1474
1847
|
__proto__: null,
|
|
1475
|
-
embedder:
|
|
1476
|
-
language:
|
|
1477
|
-
options:
|
|
1478
|
-
parser:
|
|
1479
|
-
}, Symbol.toStringTag, { value: "Module" })), { line:
|
|
1848
|
+
embedder: ao,
|
|
1849
|
+
language: ge,
|
|
1850
|
+
options: uo,
|
|
1851
|
+
parser: go
|
|
1852
|
+
}, Symbol.toStringTag, { value: "Module" })), { line: Qn, group: ie, indent: Yn, softline: Vn } = T, Eo = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
|
|
1480
1853
|
const s = {
|
|
1481
1854
|
...r,
|
|
1482
|
-
...
|
|
1483
|
-
}, { node:
|
|
1484
|
-
(m, g, { length:
|
|
1485
|
-
).join(""),
|
|
1486
|
-
|
|
1487
|
-
-
|
|
1488
|
-
), b =
|
|
1855
|
+
...a
|
|
1856
|
+
}, { node: l } = n, { createPlaceholder: u, placeholderRegex: E } = L(), d = l.quasis.map(
|
|
1857
|
+
(m, g, { length: y }) => g === y - 1 ? m.value.cooked : m.value.cooked + u(g)
|
|
1858
|
+
).join(""), c = d.match(/^\s+/)?.[0] ?? "", p = d.match(/\s+$/)?.[0] ?? "", f = d.slice(
|
|
1859
|
+
c.length,
|
|
1860
|
+
-p.length || void 0
|
|
1861
|
+
), b = S(n, t), _ = await e(f, {
|
|
1489
1862
|
...s,
|
|
1490
1863
|
parser: "yaml"
|
|
1491
|
-
}),
|
|
1492
|
-
if (s.preserveEmbeddedExteriorWhitespaces?.includes(
|
|
1493
|
-
return
|
|
1864
|
+
}), o = A(_, E, b);
|
|
1865
|
+
if (s.preserveEmbeddedExteriorWhitespaces?.includes(i))
|
|
1866
|
+
return ie([
|
|
1494
1867
|
"`",
|
|
1495
|
-
|
|
1496
|
-
s.noEmbeddedMultiLineIndentation?.includes(
|
|
1497
|
-
|
|
1868
|
+
c,
|
|
1869
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [ie(o)] : Yn([ie(o)]),
|
|
1870
|
+
p,
|
|
1498
1871
|
"`"
|
|
1499
1872
|
]);
|
|
1500
|
-
const
|
|
1501
|
-
return
|
|
1873
|
+
const h = c.length ? Qn : Vn, $ = p.length ? Qn : Vn;
|
|
1874
|
+
return ie([
|
|
1502
1875
|
"`",
|
|
1503
|
-
s.noEmbeddedMultiLineIndentation?.includes(
|
|
1504
|
-
|
|
1876
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h, ie(o)] : Yn([h, ie(o)]),
|
|
1877
|
+
$,
|
|
1505
1878
|
"`"
|
|
1506
1879
|
]);
|
|
1507
|
-
},
|
|
1508
|
-
[
|
|
1880
|
+
}, Ne = "embeddedYaml", bo = ["yaml", "yml"], fo = v(Ne), Zn = M(Ne), ei = D(Ne), yo = {
|
|
1881
|
+
[fo]: {
|
|
1509
1882
|
category: "Embed",
|
|
1510
1883
|
type: "string",
|
|
1511
1884
|
array: !0,
|
|
1512
|
-
default: [{ value: [...
|
|
1513
|
-
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded YAML language."
|
|
1885
|
+
default: [{ value: [...bo] }],
|
|
1886
|
+
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded YAML language.",
|
|
1887
|
+
deprecated: `Please use \`${Zn}\` or \`${ei}\`.`
|
|
1888
|
+
},
|
|
1889
|
+
[Zn]: {
|
|
1890
|
+
category: "Embed",
|
|
1891
|
+
type: "string",
|
|
1892
|
+
array: !0,
|
|
1893
|
+
default: [{ value: [] }],
|
|
1894
|
+
description: "Block comments that make their subsequent template literals be identified as embedded YAML language."
|
|
1895
|
+
},
|
|
1896
|
+
[ei]: {
|
|
1897
|
+
category: "Embed",
|
|
1898
|
+
type: "string",
|
|
1899
|
+
array: !0,
|
|
1900
|
+
default: [{ value: [] }],
|
|
1901
|
+
description: "Tags that make their subsequent template literals be identified as embedded YAML language."
|
|
1514
1902
|
}
|
|
1515
|
-
},
|
|
1903
|
+
}, _o = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1516
1904
|
__proto__: null,
|
|
1517
|
-
embedder:
|
|
1518
|
-
language:
|
|
1519
|
-
options:
|
|
1520
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1521
|
-
"./css/index.ts":
|
|
1522
|
-
"./es/index.ts":
|
|
1523
|
-
"./glsl/index.ts":
|
|
1524
|
-
"./graphql/index.ts":
|
|
1525
|
-
"./html/index.ts":
|
|
1526
|
-
"./ini/index.ts":
|
|
1527
|
-
"./java/index.ts":
|
|
1528
|
-
"./json/index.ts":
|
|
1529
|
-
"./jsonata/index.ts":
|
|
1530
|
-
"./latex/index.ts":
|
|
1531
|
-
"./markdown/index.ts":
|
|
1532
|
-
"./nginx/index.ts":
|
|
1533
|
-
"./noop/index.ts":
|
|
1534
|
-
"./pegjs/index.ts":
|
|
1535
|
-
"./php/index.ts":
|
|
1536
|
-
"./prisma/index.ts":
|
|
1537
|
-
"./properties/index.ts":
|
|
1538
|
-
"./pug/index.ts":
|
|
1539
|
-
"./ruby/index.ts":
|
|
1540
|
-
"./sh/index.ts":
|
|
1541
|
-
"./sql/index.ts":
|
|
1542
|
-
"./toml/index.ts":
|
|
1543
|
-
"./ts/index.ts":
|
|
1544
|
-
"./xml/index.ts":
|
|
1545
|
-
"./yaml/index.ts":
|
|
1905
|
+
embedder: Eo,
|
|
1906
|
+
language: Ne,
|
|
1907
|
+
options: yo
|
|
1908
|
+
}, Symbol.toStringTag, { value: "Module" })), me = [], ai = {}, di = {}, li = {}, $o = /* @__PURE__ */ Object.assign({
|
|
1909
|
+
"./css/index.ts": ji,
|
|
1910
|
+
"./es/index.ts": zi,
|
|
1911
|
+
"./glsl/index.ts": Qi,
|
|
1912
|
+
"./graphql/index.ts": ts,
|
|
1913
|
+
"./html/index.ts": ls,
|
|
1914
|
+
"./ini/index.ts": ms,
|
|
1915
|
+
"./java/index.ts": ys,
|
|
1916
|
+
"./json/index.ts": Ss,
|
|
1917
|
+
"./jsonata/index.ts": xs,
|
|
1918
|
+
"./latex/index.ts": qs,
|
|
1919
|
+
"./markdown/index.ts": Ws,
|
|
1920
|
+
"./nginx/index.ts": Xs,
|
|
1921
|
+
"./noop/index.ts": Vs,
|
|
1922
|
+
"./pegjs/index.ts": ir,
|
|
1923
|
+
"./php/index.ts": dr,
|
|
1924
|
+
"./prisma/index.ts": gr,
|
|
1925
|
+
"./properties/index.ts": fr,
|
|
1926
|
+
"./pug/index.ts": Dr,
|
|
1927
|
+
"./ruby/index.ts": Gr,
|
|
1928
|
+
"./sh/index.ts": Pr,
|
|
1929
|
+
"./sql/index.ts": Hr,
|
|
1930
|
+
"./toml/index.ts": Zr,
|
|
1931
|
+
"./ts/index.ts": oo,
|
|
1932
|
+
"./xml/index.ts": ho,
|
|
1933
|
+
"./yaml/index.ts": _o
|
|
1546
1934
|
});
|
|
1547
|
-
for (const { language: e, parser: t, embedder: n, options: r } of Object.values(
|
|
1548
|
-
|
|
1549
|
-
const
|
|
1550
|
-
...
|
|
1551
|
-
|
|
1935
|
+
for (const { language: e, parser: t, embedder: n, options: r } of Object.values($o))
|
|
1936
|
+
Gi(me, e, ce), t && (ai[e] = t), n && (di[e] = n), Object.assign(li, r);
|
|
1937
|
+
const vo = "noEmbeddedIdentificationByComment", Do = "noEmbeddedIdentificationByTag", Mo = "preserveEmbeddedExteriorWhitespaces", To = "noEmbeddedMultiLineIndentation", Ao = "embeddedOverrides", ra = {
|
|
1938
|
+
...li,
|
|
1939
|
+
/**
|
|
1940
|
+
* @deprecated Please use `embedded<Language>Comments` or `embedded<Language>Tags` to configure each embedded language, and you won't need this option anymore.
|
|
1941
|
+
*/
|
|
1942
|
+
[vo]: {
|
|
1552
1943
|
category: "Embed",
|
|
1553
1944
|
type: "string",
|
|
1554
1945
|
array: !0,
|
|
1555
1946
|
default: [{ value: [] }],
|
|
1556
|
-
description: "Turns off `` /*
|
|
1947
|
+
description: "Turns off `` /* comment */ `...` `` comment-based embedded language identification for the specified identifiers.",
|
|
1948
|
+
deprecated: "Please use `embedded<Language>Comments` or `embedded<Language>Tags` to configure each embedded language, and you won't need this option anymore."
|
|
1557
1949
|
},
|
|
1558
|
-
|
|
1950
|
+
/**
|
|
1951
|
+
* @deprecated Please use `embedded<Language>Comments` or `embedded<Language>Tags` to configure each embedded language, and you won't need this option anymore.
|
|
1952
|
+
*/
|
|
1953
|
+
[Do]: {
|
|
1559
1954
|
category: "Embed",
|
|
1560
1955
|
type: "string",
|
|
1561
1956
|
array: !0,
|
|
1562
1957
|
default: [{ value: [] }],
|
|
1563
|
-
description: "Turns off ``
|
|
1958
|
+
description: "Turns off `` tag`...` `` tag-based embedded language identification for the specified identifiers.",
|
|
1959
|
+
deprecated: "Please use `embedded<Language>Comments` or `embedded<Language>Tags` to configure each embedded language, and you won't need this option anymore."
|
|
1564
1960
|
},
|
|
1565
|
-
[
|
|
1961
|
+
[Mo]: {
|
|
1566
1962
|
category: "Embed",
|
|
1567
1963
|
type: "string",
|
|
1568
1964
|
array: !0,
|
|
1569
1965
|
default: [{ value: [] }],
|
|
1570
|
-
description: "Preserves leading and trailing whitespaces in the formatting results for the specified
|
|
1966
|
+
description: "Preserves leading and trailing whitespaces in the formatting results for the specified comments or tags."
|
|
1571
1967
|
},
|
|
1572
|
-
[
|
|
1968
|
+
[To]: {
|
|
1573
1969
|
category: "Embed",
|
|
1574
1970
|
type: "string",
|
|
1575
1971
|
array: !0,
|
|
1576
1972
|
default: [{ value: [] }],
|
|
1577
|
-
description: "Turns off auto indentation in the formatting results for the specified
|
|
1973
|
+
description: "Turns off auto indentation in the formatting results for the specified comments or tags when they are formatted to span multi lines."
|
|
1578
1974
|
},
|
|
1579
|
-
[
|
|
1975
|
+
[Ao]: {
|
|
1580
1976
|
category: "Embed",
|
|
1581
1977
|
type: "string",
|
|
1582
1978
|
array: !1,
|
|
1583
1979
|
default: void 0,
|
|
1584
|
-
description: "Option overrides for the specified
|
|
1980
|
+
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."
|
|
1585
1981
|
}
|
|
1586
|
-
},
|
|
1982
|
+
}, So = {
|
|
1587
1983
|
// parsers from internal
|
|
1588
|
-
...
|
|
1589
|
-
...
|
|
1590
|
-
...
|
|
1591
|
-
...
|
|
1592
|
-
...
|
|
1984
|
+
...Ei.parsers,
|
|
1985
|
+
...bi.parsers,
|
|
1986
|
+
...fi.parsers,
|
|
1987
|
+
..._i.parsers,
|
|
1988
|
+
...yi.parsers,
|
|
1593
1989
|
// parsers from this plugin
|
|
1594
|
-
...
|
|
1990
|
+
...ai
|
|
1595
1991
|
};
|
|
1596
|
-
var
|
|
1992
|
+
var Lo = {
|
|
1597
1993
|
isEqual: !0,
|
|
1598
1994
|
isMatchingKey: !0,
|
|
1599
1995
|
isPromise: !0,
|
|
@@ -1602,24 +1998,24 @@ var xr = {
|
|
|
1602
1998
|
onCacheChange: !0,
|
|
1603
1999
|
onCacheHit: !0,
|
|
1604
2000
|
transformKey: !0
|
|
1605
|
-
},
|
|
1606
|
-
function
|
|
2001
|
+
}, ko = Array.prototype.slice;
|
|
2002
|
+
function Ee(e) {
|
|
1607
2003
|
var t = e.length;
|
|
1608
|
-
return t ? t === 1 ? [e[0]] : t === 2 ? [e[0], e[1]] : t === 3 ? [e[0], e[1], e[2]] :
|
|
2004
|
+
return t ? t === 1 ? [e[0]] : t === 2 ? [e[0], e[1]] : t === 3 ? [e[0], e[1], e[2]] : ko.call(e, 0) : [];
|
|
1609
2005
|
}
|
|
1610
|
-
function
|
|
2006
|
+
function Go(e) {
|
|
1611
2007
|
var t = {};
|
|
1612
2008
|
for (var n in e)
|
|
1613
|
-
|
|
2009
|
+
Lo[n] || (t[n] = e[n]);
|
|
1614
2010
|
return t;
|
|
1615
2011
|
}
|
|
1616
|
-
function
|
|
2012
|
+
function No(e) {
|
|
1617
2013
|
return typeof e == "function" && e.isMemoized;
|
|
1618
2014
|
}
|
|
1619
|
-
function
|
|
2015
|
+
function xo(e, t) {
|
|
1620
2016
|
return e === t || e !== e && t !== t;
|
|
1621
2017
|
}
|
|
1622
|
-
function
|
|
2018
|
+
function ti(e, t) {
|
|
1623
2019
|
var n = {};
|
|
1624
2020
|
for (var r in e)
|
|
1625
2021
|
n[r] = e[r];
|
|
@@ -1627,7 +2023,7 @@ function Bt(e, t) {
|
|
|
1627
2023
|
n[r] = t[r];
|
|
1628
2024
|
return n;
|
|
1629
2025
|
}
|
|
1630
|
-
var
|
|
2026
|
+
var Io = (
|
|
1631
2027
|
/** @class */
|
|
1632
2028
|
function() {
|
|
1633
2029
|
function e(t) {
|
|
@@ -1652,239 +2048,277 @@ var Mr = (
|
|
|
1652
2048
|
*/
|
|
1653
2049
|
get: function() {
|
|
1654
2050
|
return {
|
|
1655
|
-
keys:
|
|
2051
|
+
keys: Ee(this.keys),
|
|
1656
2052
|
size: this.size,
|
|
1657
|
-
values:
|
|
2053
|
+
values: Ee(this.values)
|
|
1658
2054
|
};
|
|
1659
2055
|
},
|
|
1660
2056
|
enumerable: !1,
|
|
1661
2057
|
configurable: !0
|
|
1662
2058
|
}), e.prototype._getKeyIndexFromMatchingKey = function(t) {
|
|
1663
|
-
var n = this.options, r = n.isMatchingKey,
|
|
2059
|
+
var n = this.options, r = n.isMatchingKey, i = n.maxSize, a = this.keys, s = a.length;
|
|
1664
2060
|
if (!s)
|
|
1665
2061
|
return -1;
|
|
1666
|
-
if (r(
|
|
2062
|
+
if (r(a[0], t))
|
|
1667
2063
|
return 0;
|
|
1668
|
-
if (
|
|
1669
|
-
for (var
|
|
1670
|
-
if (r(
|
|
1671
|
-
return
|
|
2064
|
+
if (i > 1) {
|
|
2065
|
+
for (var l = 1; l < s; l++)
|
|
2066
|
+
if (r(a[l], t))
|
|
2067
|
+
return l;
|
|
1672
2068
|
}
|
|
1673
2069
|
return -1;
|
|
1674
2070
|
}, e.prototype._getKeyIndexForMany = function(t) {
|
|
1675
|
-
var n = this.options.isEqual, r = this.keys,
|
|
1676
|
-
if (!
|
|
2071
|
+
var n = this.options.isEqual, r = this.keys, i = r.length;
|
|
2072
|
+
if (!i)
|
|
1677
2073
|
return -1;
|
|
1678
|
-
if (
|
|
2074
|
+
if (i === 1)
|
|
1679
2075
|
return this._getKeyIndexForSingle(t);
|
|
1680
|
-
var
|
|
1681
|
-
if (
|
|
1682
|
-
for (var
|
|
1683
|
-
if (s = r[
|
|
1684
|
-
for (
|
|
2076
|
+
var a = t.length, s, l;
|
|
2077
|
+
if (a > 1) {
|
|
2078
|
+
for (var u = 0; u < i; u++)
|
|
2079
|
+
if (s = r[u], s.length === a) {
|
|
2080
|
+
for (l = 0; l < a && n(s[l], t[l]); l++)
|
|
1685
2081
|
;
|
|
1686
|
-
if (
|
|
1687
|
-
return
|
|
2082
|
+
if (l === a)
|
|
2083
|
+
return u;
|
|
1688
2084
|
}
|
|
1689
2085
|
} else
|
|
1690
|
-
for (var
|
|
1691
|
-
if (s = r[
|
|
1692
|
-
return
|
|
2086
|
+
for (var u = 0; u < i; u++)
|
|
2087
|
+
if (s = r[u], s.length === a && n(s[0], t[0]))
|
|
2088
|
+
return u;
|
|
1693
2089
|
return -1;
|
|
1694
2090
|
}, e.prototype._getKeyIndexForSingle = function(t) {
|
|
1695
2091
|
var n = this.keys;
|
|
1696
2092
|
if (!n.length)
|
|
1697
2093
|
return -1;
|
|
1698
|
-
var r = n[0],
|
|
1699
|
-
if (t.length !==
|
|
2094
|
+
var r = n[0], i = r.length;
|
|
2095
|
+
if (t.length !== i)
|
|
1700
2096
|
return -1;
|
|
1701
|
-
var
|
|
1702
|
-
if (
|
|
1703
|
-
for (var s = 0; s <
|
|
1704
|
-
if (!
|
|
2097
|
+
var a = this.options.isEqual;
|
|
2098
|
+
if (i > 1) {
|
|
2099
|
+
for (var s = 0; s < i; s++)
|
|
2100
|
+
if (!a(r[s], t[s]))
|
|
1705
2101
|
return -1;
|
|
1706
2102
|
return 0;
|
|
1707
2103
|
}
|
|
1708
|
-
return
|
|
2104
|
+
return a(r[0], t[0]) ? 0 : -1;
|
|
1709
2105
|
}, e.prototype.orderByLru = function(t, n, r) {
|
|
1710
|
-
for (var
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
var
|
|
1714
|
-
s ===
|
|
2106
|
+
for (var i = this.keys, a = this.values, s = i.length, l = r; l--; )
|
|
2107
|
+
i[l + 1] = i[l], a[l + 1] = a[l];
|
|
2108
|
+
i[0] = t, a[0] = n;
|
|
2109
|
+
var u = this.options.maxSize;
|
|
2110
|
+
s === u && r === s ? (i.pop(), a.pop()) : r >= u && (i.length = a.length = u);
|
|
1715
2111
|
}, e.prototype.updateAsyncCache = function(t) {
|
|
1716
|
-
var n = this, r = this.options,
|
|
1717
|
-
this.values[0] =
|
|
1718
|
-
return n.shouldUpdateOnHit &&
|
|
1719
|
-
}, function(
|
|
1720
|
-
var
|
|
1721
|
-
throw
|
|
2112
|
+
var n = this, r = this.options, i = r.onCacheChange, a = r.onCacheHit, s = this.keys[0], l = this.values[0];
|
|
2113
|
+
this.values[0] = l.then(function(u) {
|
|
2114
|
+
return n.shouldUpdateOnHit && a(n, n.options, t), n.shouldUpdateOnChange && i(n, n.options, t), u;
|
|
2115
|
+
}, function(u) {
|
|
2116
|
+
var E = n.getKeyIndex(s);
|
|
2117
|
+
throw E !== -1 && (n.keys.splice(E, 1), n.values.splice(E, 1)), u;
|
|
1722
2118
|
});
|
|
1723
2119
|
}, e;
|
|
1724
2120
|
}()
|
|
1725
2121
|
);
|
|
1726
|
-
function
|
|
1727
|
-
if (t === void 0 && (t = {}),
|
|
1728
|
-
return
|
|
2122
|
+
function ci(e, t) {
|
|
2123
|
+
if (t === void 0 && (t = {}), No(e))
|
|
2124
|
+
return ci(e.fn, ti(e.options, t));
|
|
1729
2125
|
if (typeof e != "function")
|
|
1730
2126
|
throw new TypeError("You must pass a function to `memoize`.");
|
|
1731
|
-
var n = t.isEqual, r = n === void 0 ?
|
|
2127
|
+
var n = t.isEqual, r = n === void 0 ? xo : n, i = t.isMatchingKey, a = t.isPromise, s = a === void 0 ? !1 : a, l = t.maxSize, u = l === void 0 ? 1 : l, E = t.onCacheAdd, d = t.onCacheChange, c = t.onCacheHit, p = t.transformKey, f = ti({
|
|
1732
2128
|
isEqual: r,
|
|
1733
|
-
isMatchingKey:
|
|
2129
|
+
isMatchingKey: i,
|
|
1734
2130
|
isPromise: s,
|
|
1735
|
-
maxSize:
|
|
1736
|
-
onCacheAdd:
|
|
1737
|
-
onCacheChange:
|
|
1738
|
-
onCacheHit:
|
|
1739
|
-
transformKey:
|
|
1740
|
-
},
|
|
1741
|
-
var
|
|
1742
|
-
|
|
1743
|
-
var
|
|
1744
|
-
if (
|
|
1745
|
-
|
|
2131
|
+
maxSize: u,
|
|
2132
|
+
onCacheAdd: E,
|
|
2133
|
+
onCacheChange: d,
|
|
2134
|
+
onCacheHit: c,
|
|
2135
|
+
transformKey: p
|
|
2136
|
+
}, Go(t)), b = new Io(f), _ = b.keys, o = b.values, h = b.canTransformKey, $ = b.shouldCloneArguments, m = b.shouldUpdateOnAdd, g = b.shouldUpdateOnChange, y = b.shouldUpdateOnHit, k = function() {
|
|
2137
|
+
var G = $ ? Ee(arguments) : arguments;
|
|
2138
|
+
h && (G = p(G));
|
|
2139
|
+
var I = _.length ? b.getKeyIndex(G) : -1;
|
|
2140
|
+
if (I !== -1)
|
|
2141
|
+
y && c(b, f, k), I && (b.orderByLru(_[I], o[I], I), g && d(b, f, k));
|
|
1746
2142
|
else {
|
|
1747
|
-
var
|
|
1748
|
-
b.orderByLru(
|
|
2143
|
+
var mi = e.apply(this, arguments), hi = $ ? G : Ee(arguments);
|
|
2144
|
+
b.orderByLru(hi, mi, _.length), s && b.updateAsyncCache(k), m && E(b, f, k), g && d(b, f, k);
|
|
1749
2145
|
}
|
|
1750
|
-
return
|
|
2146
|
+
return o[0];
|
|
1751
2147
|
};
|
|
1752
|
-
return
|
|
2148
|
+
return k.cache = b, k.fn = e, k.isMemoized = !0, k.options = f, k;
|
|
1753
2149
|
}
|
|
1754
|
-
const
|
|
2150
|
+
const Oo = /("(?:\\?[^])*?")|(\/\/.*)|(\/\*[^]*?\*\/)/g, Po = /("(?:\\?[^])*?")|(,\s*)(?=]|})/g, Be = {
|
|
1755
2151
|
parse: (e) => {
|
|
1756
2152
|
e = String(e);
|
|
1757
2153
|
try {
|
|
1758
2154
|
return JSON.parse(e);
|
|
1759
2155
|
} catch {
|
|
1760
|
-
return JSON.parse(e.replace(
|
|
2156
|
+
return JSON.parse(e.replace(Oo, "$1").replace(Po, "$1"));
|
|
1761
2157
|
}
|
|
1762
2158
|
}
|
|
1763
|
-
};
|
|
1764
|
-
async function
|
|
2159
|
+
}, { label: Bo } = Di;
|
|
2160
|
+
async function ni(e) {
|
|
1765
2161
|
try {
|
|
1766
2162
|
const { readFile: t } = await import("node:fs/promises"), n = await t(e, { encoding: "utf-8" });
|
|
1767
|
-
return
|
|
2163
|
+
return Be.parse(n);
|
|
1768
2164
|
} catch {
|
|
1769
2165
|
}
|
|
1770
2166
|
}
|
|
1771
|
-
const
|
|
2167
|
+
const qo = /* @__PURE__ */ new URL(
|
|
1772
2168
|
`data:text/javascript,${encodeURIComponent('import{pathToFileURL as o}from"node:url";import{parentPort as t,workerData as a}from"node:worker_threads";const s=async({absolutePath:r})=>{try{const e=await import(o(r).href);t?.postMessage(e.embeddedOverrides??e.default??void 0)}catch{t?.postMessage(void 0)}};s(a);')}`
|
|
1773
|
-
),
|
|
2169
|
+
), jo = /* @__PURE__ */ new URL(
|
|
1774
2170
|
`data:text/javascript,${encodeURIComponent('import{register as a}from"node:module";import{pathToFileURL as s}from"node:url";import{parentPort as t,workerData as i}from"node:worker_threads";const d=async({absolutePath:r,importMetaUrl:o})=>{a("tsx/esm",{parentURL:o,data:!0});try{const e=await import(s(r).href);t?.postMessage(e.embeddedOverrides??e.default??void 0)}catch{t?.postMessage(void 0)}};d(i);')}`
|
|
1775
2171
|
);
|
|
1776
|
-
async function
|
|
2172
|
+
async function Uo(e) {
|
|
1777
2173
|
const { Worker: t } = await import("node:worker_threads");
|
|
1778
2174
|
return new Promise((n) => {
|
|
1779
|
-
const r = new t(
|
|
2175
|
+
const r = new t(qo, {
|
|
1780
2176
|
workerData: {
|
|
1781
2177
|
absolutePath: e
|
|
1782
2178
|
}
|
|
1783
2179
|
});
|
|
1784
|
-
r.once("message", (
|
|
1785
|
-
n(
|
|
1786
|
-
}), r.once("error", (
|
|
1787
|
-
console.error(
|
|
2180
|
+
r.once("message", (i) => {
|
|
2181
|
+
n(i);
|
|
2182
|
+
}), r.once("error", (i) => {
|
|
2183
|
+
console.error(i), n(void 0);
|
|
1788
2184
|
});
|
|
1789
2185
|
});
|
|
1790
2186
|
}
|
|
1791
|
-
async function
|
|
2187
|
+
async function Ro(e) {
|
|
1792
2188
|
const { Worker: t } = await import("node:worker_threads");
|
|
1793
2189
|
return new Promise((n) => {
|
|
1794
|
-
const r = new t(
|
|
2190
|
+
const r = new t(jo, {
|
|
1795
2191
|
workerData: {
|
|
1796
2192
|
absolutePath: e,
|
|
1797
2193
|
importMetaUrl: import.meta.url
|
|
1798
2194
|
}
|
|
1799
2195
|
});
|
|
1800
|
-
r.once("message", (
|
|
1801
|
-
n(
|
|
1802
|
-
}), r.once("error", (
|
|
1803
|
-
console.error(
|
|
2196
|
+
r.once("message", (i) => {
|
|
2197
|
+
n(i);
|
|
2198
|
+
}), r.once("error", (i) => {
|
|
2199
|
+
console.error(i), n(void 0);
|
|
1804
2200
|
});
|
|
1805
2201
|
});
|
|
1806
2202
|
}
|
|
1807
|
-
const
|
|
2203
|
+
const Co = ci(
|
|
1808
2204
|
async (e, t) => {
|
|
1809
|
-
const { isAbsolute: n, dirname: r, resolve:
|
|
2205
|
+
const { isAbsolute: n, dirname: r, resolve: i } = await import("node:path");
|
|
1810
2206
|
if (n(e))
|
|
1811
2207
|
return e;
|
|
1812
|
-
const
|
|
2208
|
+
const a = await vi(t);
|
|
1813
2209
|
let s;
|
|
1814
|
-
return typeof
|
|
2210
|
+
return typeof a != "string" ? s = process.env.PWD ?? process.cwd() : s = r(a), i(s, e);
|
|
1815
2211
|
}
|
|
1816
|
-
),
|
|
1817
|
-
|
|
1818
|
-
e,
|
|
1819
|
-
t
|
|
1820
|
-
);
|
|
1821
|
-
let r;
|
|
2212
|
+
), wo = async (e, t) => {
|
|
2213
|
+
let n;
|
|
1822
2214
|
try {
|
|
1823
|
-
|
|
2215
|
+
n = (await import("node:path")).extname(
|
|
1824
2216
|
e
|
|
1825
2217
|
);
|
|
1826
2218
|
} catch {
|
|
1827
2219
|
try {
|
|
1828
|
-
return
|
|
2220
|
+
return Be.parse(e);
|
|
1829
2221
|
} catch {
|
|
1830
2222
|
console.error("Failed to parse embeddedOverrides as a json object");
|
|
1831
2223
|
return;
|
|
1832
2224
|
}
|
|
1833
2225
|
}
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
2226
|
+
const r = Co(
|
|
2227
|
+
e,
|
|
2228
|
+
t
|
|
2229
|
+
);
|
|
2230
|
+
if (n === ".json" || n === ".jsonc") {
|
|
2231
|
+
const i = await r, a = await ni(i);
|
|
2232
|
+
if (a !== void 0)
|
|
2233
|
+
return a;
|
|
2234
|
+
console.error(`Failed to parse the json file: ${i}`);
|
|
1839
2235
|
return;
|
|
1840
2236
|
}
|
|
1841
|
-
if (
|
|
1842
|
-
const
|
|
1843
|
-
if (
|
|
1844
|
-
return
|
|
1845
|
-
console.error(`Failed to parse the js module file: ${
|
|
2237
|
+
if (n === ".mjs" || n === ".cjs" || n === ".js") {
|
|
2238
|
+
const i = await r, a = await Uo(i);
|
|
2239
|
+
if (a !== void 0)
|
|
2240
|
+
return a;
|
|
2241
|
+
console.error(`Failed to parse the js module file: ${i}`);
|
|
1846
2242
|
return;
|
|
1847
2243
|
}
|
|
1848
|
-
if (
|
|
1849
|
-
const
|
|
1850
|
-
if (
|
|
1851
|
-
return
|
|
1852
|
-
console.error(`Failed to parse the ts module file: ${
|
|
2244
|
+
if (n === ".mts" || n === ".cts" || n === ".ts") {
|
|
2245
|
+
const i = await r, a = await Ro(i);
|
|
2246
|
+
if (a !== void 0)
|
|
2247
|
+
return a;
|
|
2248
|
+
console.error(`Failed to parse the ts module file: ${i}`);
|
|
1853
2249
|
return;
|
|
1854
2250
|
}
|
|
1855
|
-
if (
|
|
1856
|
-
const
|
|
1857
|
-
if (
|
|
1858
|
-
return
|
|
2251
|
+
if (n === "") {
|
|
2252
|
+
const i = await r, a = await ni(i);
|
|
2253
|
+
if (a !== void 0)
|
|
2254
|
+
return a;
|
|
1859
2255
|
}
|
|
1860
2256
|
try {
|
|
1861
|
-
return
|
|
2257
|
+
return Be.parse(e);
|
|
1862
2258
|
} catch {
|
|
1863
2259
|
console.error("Failed to parse embeddedOverrides as a json object");
|
|
1864
2260
|
}
|
|
1865
|
-
}
|
|
2261
|
+
};
|
|
2262
|
+
async function Fo(e, {
|
|
2263
|
+
commentOrTag: t,
|
|
2264
|
+
kind: n,
|
|
2265
|
+
filepath: r
|
|
2266
|
+
}) {
|
|
1866
2267
|
if (e === void 0)
|
|
1867
2268
|
return;
|
|
1868
|
-
const
|
|
2269
|
+
const i = await wo(
|
|
1869
2270
|
e,
|
|
1870
|
-
|
|
2271
|
+
r
|
|
1871
2272
|
);
|
|
1872
|
-
if (
|
|
2273
|
+
if (i !== void 0)
|
|
2274
|
+
for (const {
|
|
2275
|
+
[`${n}s`]: a,
|
|
2276
|
+
identifiers: s,
|
|
2277
|
+
options: l
|
|
2278
|
+
} of i) {
|
|
2279
|
+
const u = a ?? [];
|
|
2280
|
+
if (u.length === 0 && s?.includes(t) || u.includes(t))
|
|
2281
|
+
return l;
|
|
2282
|
+
}
|
|
2283
|
+
}
|
|
2284
|
+
const Wo = /* @__PURE__ */ (() => {
|
|
2285
|
+
const e = /* @__PURE__ */ new Set([
|
|
2286
|
+
"start",
|
|
2287
|
+
"end",
|
|
2288
|
+
"loc",
|
|
2289
|
+
"range",
|
|
2290
|
+
"filename",
|
|
2291
|
+
"typeAnnotation",
|
|
2292
|
+
"decorators"
|
|
2293
|
+
]);
|
|
2294
|
+
return (t, n, r) => {
|
|
2295
|
+
let i;
|
|
1873
2296
|
try {
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
2297
|
+
const s = r(`${n}\`\``);
|
|
2298
|
+
if (s instanceof Promise)
|
|
2299
|
+
throw new TypeError("Async parse function hasn't been supported yet.");
|
|
2300
|
+
i = s;
|
|
1877
2301
|
} catch {
|
|
1878
|
-
|
|
2302
|
+
return !1;
|
|
1879
2303
|
}
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
return
|
|
1884
|
-
|
|
1885
|
-
|
|
2304
|
+
if (i.type === "File" && (i = i.program), !(i.type === "Program" && i.body[0]?.type === "ExpressionStatement"))
|
|
2305
|
+
return !1;
|
|
2306
|
+
const a = i.body[0]?.expression;
|
|
2307
|
+
return a?.type !== "TaggedTemplateExpression" ? !1 : !!pi(
|
|
2308
|
+
t,
|
|
2309
|
+
a.tag,
|
|
2310
|
+
e
|
|
2311
|
+
);
|
|
2312
|
+
};
|
|
2313
|
+
})();
|
|
2314
|
+
function zo({
|
|
2315
|
+
node: e,
|
|
2316
|
+
parent: t
|
|
2317
|
+
}) {
|
|
2318
|
+
const n = e.comments ?? t?.comments;
|
|
2319
|
+
if (!n)
|
|
1886
2320
|
return;
|
|
1887
|
-
const
|
|
2321
|
+
const r = n[n.length - 1];
|
|
1888
2322
|
if (![
|
|
1889
2323
|
"MultiLine",
|
|
1890
2324
|
// meriyah
|
|
@@ -1892,127 +2326,176 @@ function Wr({ node: e, parent: t }, n, r) {
|
|
|
1892
2326
|
// typescript, acorn, espree, flow
|
|
1893
2327
|
"CommentBlock"
|
|
1894
2328
|
// babel, babel-flow, babel-ts
|
|
1895
|
-
].includes(
|
|
2329
|
+
].includes(r.type) || !r.leading)
|
|
1896
2330
|
return;
|
|
1897
|
-
const
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
return d;
|
|
2331
|
+
const i = r.value;
|
|
2332
|
+
if (i.length > 1 && i.startsWith(" ") && i.endsWith(" "))
|
|
2333
|
+
return i.slice(1, -1);
|
|
1901
2334
|
}
|
|
1902
|
-
function
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
"start",
|
|
1908
|
-
"end",
|
|
1909
|
-
"loc",
|
|
1910
|
-
"range",
|
|
1911
|
-
"filename",
|
|
1912
|
-
"typeAnnotation",
|
|
1913
|
-
"decorators"
|
|
1914
|
-
]);
|
|
1915
|
-
for (const d of n)
|
|
1916
|
-
if (!c.includes(d))
|
|
1917
|
-
if (Gr(d)) {
|
|
1918
|
-
if (t.tag.type === "Identifier" && t.tag.name === d)
|
|
1919
|
-
return d;
|
|
1920
|
-
} else {
|
|
1921
|
-
if (!o)
|
|
1922
|
-
return;
|
|
1923
|
-
let p;
|
|
1924
|
-
try {
|
|
1925
|
-
const a = wt[r.parser].parse(
|
|
1926
|
-
`${d}\`\``,
|
|
1927
|
-
r
|
|
1928
|
-
);
|
|
1929
|
-
if (a instanceof Promise)
|
|
1930
|
-
throw new TypeError(
|
|
1931
|
-
"Async parse function hasn't been supported yet."
|
|
1932
|
-
);
|
|
1933
|
-
p = a;
|
|
1934
|
-
} catch {
|
|
1935
|
-
continue;
|
|
1936
|
-
}
|
|
1937
|
-
if (p.type === "File" && (p = p.program), !(p.type === "Program" && p.body[0]?.type === "ExpressionStatement"))
|
|
1938
|
-
continue;
|
|
1939
|
-
const h = p.body[0]?.expression;
|
|
1940
|
-
if (h?.type !== "TaggedTemplateExpression")
|
|
1941
|
-
continue;
|
|
1942
|
-
if (t.tag, h.tag, pn(t.tag, h.tag, s))
|
|
1943
|
-
return d;
|
|
1944
|
-
}
|
|
2335
|
+
function Ko({
|
|
2336
|
+
parent: e
|
|
2337
|
+
}) {
|
|
2338
|
+
if (e?.type === "TaggedTemplateExpression")
|
|
2339
|
+
return e.tag.type === "Identifier" ? e.tag.name : e.tag;
|
|
1945
2340
|
}
|
|
1946
|
-
function
|
|
1947
|
-
|
|
2341
|
+
function Jo(e, t) {
|
|
2342
|
+
const n = /* @__PURE__ */ (() => {
|
|
2343
|
+
let r;
|
|
2344
|
+
return () => (r === void 0 && (r = !(e.noEmbeddedIdentificationByComment?.includes(t) ?? !1)), r);
|
|
2345
|
+
})();
|
|
2346
|
+
return function* (r) {
|
|
2347
|
+
const i = e[M(r)] ?? [];
|
|
2348
|
+
i.length === 0 && n() ? yield* e[v(r)] ?? [] : yield* i;
|
|
2349
|
+
};
|
|
1948
2350
|
}
|
|
1949
|
-
function
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
2351
|
+
function ii(e, t) {
|
|
2352
|
+
if (typeof t == "string") {
|
|
2353
|
+
const n = /* @__PURE__ */ (() => {
|
|
2354
|
+
let r;
|
|
2355
|
+
return () => (r === void 0 && (r = !(e.noEmbeddedIdentificationByTag?.includes(t) ?? !1)), r);
|
|
2356
|
+
})();
|
|
2357
|
+
return function* (r) {
|
|
2358
|
+
const i = e[D(r)] ?? [];
|
|
2359
|
+
i.length === 0 && n() ? yield* e[v(r)] ?? [] : yield* i;
|
|
2360
|
+
};
|
|
2361
|
+
}
|
|
2362
|
+
return function* (n) {
|
|
2363
|
+
const r = e[D(n)] ?? [];
|
|
2364
|
+
if (r.length === 0) {
|
|
2365
|
+
const { noEmbeddedIdentificationByTag: i } = e;
|
|
2366
|
+
for (const a of e[v(n)] ?? [])
|
|
2367
|
+
i?.includes(a) || (yield a);
|
|
2368
|
+
} else
|
|
2369
|
+
yield* r;
|
|
2370
|
+
};
|
|
1955
2371
|
}
|
|
1956
|
-
function
|
|
2372
|
+
function Ie(e, t, n, r, i) {
|
|
2373
|
+
const a = di[t];
|
|
2374
|
+
if (!a)
|
|
2375
|
+
return null;
|
|
2376
|
+
if (e.quasis.length === 1 && e.quasis[0]?.value.raw.trim() === "")
|
|
2377
|
+
return "``";
|
|
2378
|
+
const s = Fo(
|
|
2379
|
+
i.embeddedOverrides,
|
|
2380
|
+
{
|
|
2381
|
+
commentOrTag: n,
|
|
2382
|
+
kind: r,
|
|
2383
|
+
filepath: i.filepath
|
|
2384
|
+
}
|
|
2385
|
+
);
|
|
2386
|
+
return async (...l) => {
|
|
2387
|
+
try {
|
|
2388
|
+
const u = await a(...l, {
|
|
2389
|
+
commentOrTag: n,
|
|
2390
|
+
kind: r,
|
|
2391
|
+
embeddedOverrideOptions: await s
|
|
2392
|
+
});
|
|
2393
|
+
return Bo(
|
|
2394
|
+
{
|
|
2395
|
+
embed: !0,
|
|
2396
|
+
...u.label
|
|
2397
|
+
},
|
|
2398
|
+
u
|
|
2399
|
+
);
|
|
2400
|
+
} catch (u) {
|
|
2401
|
+
throw console.error(u), u;
|
|
2402
|
+
}
|
|
2403
|
+
};
|
|
2404
|
+
}
|
|
2405
|
+
function ui(e, t, n) {
|
|
2406
|
+
return Object.is(e, t) ? !0 : e === null || t === null ? !1 : Array.isArray(e) ? Ho(e, t, n) : typeof e == "object" ? pi(e, t, n) : !1;
|
|
2407
|
+
}
|
|
2408
|
+
function Ho(e, t, n) {
|
|
1957
2409
|
const r = e.length;
|
|
1958
2410
|
if (r !== t.length)
|
|
1959
2411
|
return !1;
|
|
1960
|
-
for (let
|
|
1961
|
-
if (!
|
|
2412
|
+
for (let i = 0; i < r; i++)
|
|
2413
|
+
if (!ui(e[i], t[i], n))
|
|
1962
2414
|
return !1;
|
|
1963
2415
|
return !0;
|
|
1964
2416
|
}
|
|
1965
|
-
function
|
|
2417
|
+
function pi(e, t, n) {
|
|
1966
2418
|
for (const r of Object.keys(e))
|
|
1967
|
-
if (!n
|
|
2419
|
+
if (!n?.has(r) && !(Object.prototype.hasOwnProperty.call(t, r) && ui(e[r], t[r], n)))
|
|
1968
2420
|
return !1;
|
|
1969
2421
|
return !0;
|
|
1970
2422
|
}
|
|
1971
|
-
const { estree:
|
|
2423
|
+
const { estree: gi } = $i, { embed: Oe } = gi, Xo = (e, t) => {
|
|
1972
2424
|
const { node: n } = e;
|
|
1973
|
-
if (n.type !== "TemplateLiteral" || n.quasis.some(({ value: { cooked:
|
|
2425
|
+
if (n.type !== "TemplateLiteral" || n.quasis.some(({ value: { cooked: a } }) => a === null))
|
|
1974
2426
|
return null;
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
});
|
|
1998
|
-
return $.label(
|
|
1999
|
-
{ embed: !0, ...E.label },
|
|
2000
|
-
E
|
|
2427
|
+
const r = zo(e);
|
|
2428
|
+
if (typeof r == "string") {
|
|
2429
|
+
const a = Jo(
|
|
2430
|
+
t,
|
|
2431
|
+
r
|
|
2432
|
+
);
|
|
2433
|
+
for (const s of me) {
|
|
2434
|
+
let l = !1;
|
|
2435
|
+
for (const u of a(
|
|
2436
|
+
s
|
|
2437
|
+
))
|
|
2438
|
+
if (r === u) {
|
|
2439
|
+
l = !0;
|
|
2440
|
+
break;
|
|
2441
|
+
}
|
|
2442
|
+
if (l)
|
|
2443
|
+
return Ie(
|
|
2444
|
+
n,
|
|
2445
|
+
s,
|
|
2446
|
+
r,
|
|
2447
|
+
"comment",
|
|
2448
|
+
t
|
|
2001
2449
|
);
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2450
|
+
}
|
|
2451
|
+
return Oe?.(e, t) ?? null;
|
|
2452
|
+
}
|
|
2453
|
+
const i = Ko(e);
|
|
2454
|
+
if (typeof i == "string") {
|
|
2455
|
+
const a = ii(t, i);
|
|
2456
|
+
for (const s of me) {
|
|
2457
|
+
let l = !1;
|
|
2458
|
+
for (const u of a(s))
|
|
2459
|
+
if (i === u) {
|
|
2460
|
+
l = !0;
|
|
2461
|
+
break;
|
|
2462
|
+
}
|
|
2463
|
+
if (l)
|
|
2464
|
+
return Ie(n, s, i, "tag", t);
|
|
2465
|
+
}
|
|
2466
|
+
return Oe?.(e, t) ?? null;
|
|
2467
|
+
}
|
|
2468
|
+
if (i !== void 0) {
|
|
2469
|
+
const a = (l) => So[t.parser].parse(
|
|
2470
|
+
l,
|
|
2471
|
+
t
|
|
2472
|
+
), s = ii(t);
|
|
2473
|
+
for (const l of me) {
|
|
2474
|
+
let u;
|
|
2475
|
+
for (const E of s(l))
|
|
2476
|
+
if (Wo(i, E, a)) {
|
|
2477
|
+
u = E;
|
|
2478
|
+
break;
|
|
2479
|
+
}
|
|
2480
|
+
if (u !== void 0)
|
|
2481
|
+
return Ie(
|
|
2482
|
+
n,
|
|
2483
|
+
l,
|
|
2484
|
+
u,
|
|
2485
|
+
"tag",
|
|
2486
|
+
t
|
|
2487
|
+
);
|
|
2488
|
+
}
|
|
2006
2489
|
}
|
|
2007
|
-
return
|
|
2008
|
-
},
|
|
2490
|
+
return Oe?.(e, t) ?? null;
|
|
2491
|
+
}, oa = {
|
|
2009
2492
|
estree: {
|
|
2010
|
-
...
|
|
2011
|
-
embed:
|
|
2493
|
+
...gi,
|
|
2494
|
+
embed: Xo
|
|
2012
2495
|
}
|
|
2013
2496
|
};
|
|
2014
2497
|
export {
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2498
|
+
ra as options,
|
|
2499
|
+
So as parsers,
|
|
2500
|
+
oa as printers
|
|
2018
2501
|
};
|