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