prettier-plugin-embed 0.2.4 → 0.3.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +47 -7
- package/dist/embedded/index.d.ts +1 -1
- package/dist/embedded/register.d.ts +2 -2
- package/dist/embedded/sql/options.d.ts +4 -4
- package/dist/embedded/types.d.ts +0 -4
- package/dist/embedded/utils.d.ts +2 -1
- package/dist/index.js +813 -836
- package/dist/options.d.ts +17 -6
- package/dist/types.d.ts +7 -0
- package/package.json +21 -21
package/dist/index.js
CHANGED
|
@@ -1,356 +1,342 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { utils as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import Qe from "prettier/parser-babel";
|
|
2
|
+
import Ze from "prettier/parser-espree";
|
|
3
|
+
import et from "prettier/parser-flow";
|
|
4
|
+
import tt from "prettier/parser-typescript";
|
|
5
|
+
import nt from "prettier/parser-meriyah";
|
|
6
|
+
import { utils as X, builders as $ } from "prettier/doc";
|
|
7
|
+
import { isAbsolute as rt } from "node:path";
|
|
8
|
+
import { readFileSync as st } from "node:fs";
|
|
9
|
+
import { printers as ot } from "prettier/plugins/estree.mjs";
|
|
10
|
+
const Ce = "embeddedCss";
|
|
11
|
+
var it = {
|
|
12
|
+
isEqual: !0,
|
|
13
|
+
isMatchingKey: !0,
|
|
14
|
+
isPromise: !0,
|
|
15
|
+
maxSize: !0,
|
|
16
|
+
onCacheAdd: !0,
|
|
17
|
+
onCacheChange: !0,
|
|
18
|
+
onCacheHit: !0,
|
|
19
|
+
transformKey: !0
|
|
20
|
+
}, at = Array.prototype.slice;
|
|
21
|
+
function W(t) {
|
|
22
|
+
var n = t.length;
|
|
23
|
+
return n ? n === 1 ? [t[0]] : n === 2 ? [t[0], t[1]] : n === 3 ? [t[0], t[1], t[2]] : at.call(t, 0) : [];
|
|
12
24
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
var
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
for (this.dictRange = U[te], this.lowerBound = this.dictRange[0], this.upperBound = this.dictRange[1], this.dictIndex = T = this.lowerBound; this.lowerBound <= this.upperBound ? T < this.upperBound : T > this.upperBound; this.dictIndex = this.lowerBound <= this.upperBound ? T += 1 : T -= 1)
|
|
92
|
-
w.push(String.fromCharCode(this.dictIndex));
|
|
93
|
-
});
|
|
25
|
+
function dt(t) {
|
|
26
|
+
var n = {};
|
|
27
|
+
for (var r in t)
|
|
28
|
+
it[r] || (n[r] = t[r]);
|
|
29
|
+
return n;
|
|
30
|
+
}
|
|
31
|
+
function ct(t) {
|
|
32
|
+
return typeof t == "function" && t.isMemoized;
|
|
33
|
+
}
|
|
34
|
+
function lt(t, n) {
|
|
35
|
+
return t === n || t !== t && n !== n;
|
|
36
|
+
}
|
|
37
|
+
function Z(t, n) {
|
|
38
|
+
var r = {};
|
|
39
|
+
for (var e in t)
|
|
40
|
+
r[e] = t[e];
|
|
41
|
+
for (var e in n)
|
|
42
|
+
r[e] = n[e];
|
|
43
|
+
return r;
|
|
44
|
+
}
|
|
45
|
+
var ut = (
|
|
46
|
+
/** @class */
|
|
47
|
+
function() {
|
|
48
|
+
function t(n) {
|
|
49
|
+
this.keys = [], this.values = [], this.options = n;
|
|
50
|
+
var r = typeof n.isMatchingKey == "function";
|
|
51
|
+
r ? this.getKeyIndex = this._getKeyIndexFromMatchingKey : n.maxSize > 1 ? this.getKeyIndex = this._getKeyIndexForMany : this.getKeyIndex = this._getKeyIndexForSingle, this.canTransformKey = typeof n.transformKey == "function", this.shouldCloneArguments = this.canTransformKey || r, this.shouldUpdateOnAdd = typeof n.onCacheAdd == "function", this.shouldUpdateOnChange = typeof n.onCacheChange == "function", this.shouldUpdateOnHit = typeof n.onCacheHit == "function";
|
|
52
|
+
}
|
|
53
|
+
return Object.defineProperty(t.prototype, "size", {
|
|
54
|
+
/**
|
|
55
|
+
* The number of cached [key,value] results.
|
|
56
|
+
*/
|
|
57
|
+
get: function() {
|
|
58
|
+
return this.keys.length;
|
|
59
|
+
},
|
|
60
|
+
enumerable: !1,
|
|
61
|
+
configurable: !0
|
|
62
|
+
}), Object.defineProperty(t.prototype, "snapshot", {
|
|
63
|
+
/**
|
|
64
|
+
* A copy of the cache at a moment in time. This is useful
|
|
65
|
+
* to compare changes over time, since the cache mutates
|
|
66
|
+
* internally for performance reasons.
|
|
67
|
+
*/
|
|
68
|
+
get: function() {
|
|
69
|
+
return {
|
|
70
|
+
keys: W(this.keys),
|
|
71
|
+
size: this.size,
|
|
72
|
+
values: W(this.values)
|
|
73
|
+
};
|
|
74
|
+
},
|
|
75
|
+
enumerable: !1,
|
|
76
|
+
configurable: !0
|
|
77
|
+
}), t.prototype._getKeyIndexFromMatchingKey = function(n) {
|
|
78
|
+
var r = this.options, e = r.isMatchingKey, s = r.maxSize, o = this.keys, d = o.length;
|
|
79
|
+
if (!d)
|
|
80
|
+
return -1;
|
|
81
|
+
if (e(o[0], n))
|
|
82
|
+
return 0;
|
|
83
|
+
if (s > 1) {
|
|
84
|
+
for (var i = 1; i < d; i++)
|
|
85
|
+
if (e(o[i], n))
|
|
86
|
+
return i;
|
|
87
|
+
}
|
|
88
|
+
return -1;
|
|
89
|
+
}, t.prototype._getKeyIndexForMany = function(n) {
|
|
90
|
+
var r = this.options.isEqual, e = this.keys, s = e.length;
|
|
91
|
+
if (!s)
|
|
92
|
+
return -1;
|
|
93
|
+
if (s === 1)
|
|
94
|
+
return this._getKeyIndexForSingle(n);
|
|
95
|
+
var o = n.length, d, i;
|
|
96
|
+
if (o > 1) {
|
|
97
|
+
for (var a = 0; a < s; a++)
|
|
98
|
+
if (d = e[a], d.length === o) {
|
|
99
|
+
for (i = 0; i < o && r(d[i], n[i]); i++)
|
|
100
|
+
;
|
|
101
|
+
if (i === o)
|
|
102
|
+
return a;
|
|
94
103
|
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
}), i(this, "fmt", (l, x) => this.formattedUUID(l, x)), i(this, "formattedUUID", (l, x) => {
|
|
114
|
-
const w = {
|
|
115
|
-
$r: this.randomUUID,
|
|
116
|
-
$s: this.sequentialUUID,
|
|
117
|
-
$t: this.stamp
|
|
118
|
-
};
|
|
119
|
-
return l.replace(
|
|
120
|
-
/\$[rs]\d{0,}|\$t0|\$t[1-9]\d{1,}/g,
|
|
121
|
-
(P) => {
|
|
122
|
-
const U = P.slice(0, 2), N = parseInt(P.slice(2), 10);
|
|
123
|
-
return U === "$s" ? w[U]().padStart(N, "0") : U === "$t" && x ? w[U](N, x) : w[U](N);
|
|
124
|
-
}
|
|
125
|
-
);
|
|
126
|
-
}), i(this, "availableUUIDs", (l = this.uuidLength) => parseFloat(
|
|
127
|
-
Math.pow([...new Set(this.dict)].length, l).toFixed(0)
|
|
128
|
-
)), i(this, "approxMaxBeforeCollision", (l = this.availableUUIDs(this.uuidLength)) => parseFloat(
|
|
129
|
-
Math.sqrt(Math.PI / 2 * l).toFixed(20)
|
|
130
|
-
)), i(this, "collisionProbability", (l = this.availableUUIDs(this.uuidLength), x = this.uuidLength) => parseFloat(
|
|
131
|
-
(this.approxMaxBeforeCollision(l) / this.availableUUIDs(x)).toFixed(20)
|
|
132
|
-
)), i(this, "uniqueness", (l = this.availableUUIDs(this.uuidLength)) => {
|
|
133
|
-
const x = parseFloat(
|
|
134
|
-
(1 - this.approxMaxBeforeCollision(l) / l).toFixed(20)
|
|
135
|
-
);
|
|
136
|
-
return x > 1 ? 1 : x < 0 ? 0 : x;
|
|
137
|
-
}), i(this, "getVersion", () => this.version), i(this, "stamp", (l, x) => {
|
|
138
|
-
const w = Math.floor(+(x || /* @__PURE__ */ new Date()) / 1e3).toString(16);
|
|
139
|
-
if (typeof l == "number" && l === 0)
|
|
140
|
-
return w;
|
|
141
|
-
if (typeof l != "number" || l < 10)
|
|
142
|
-
throw new Error(
|
|
143
|
-
[
|
|
144
|
-
"Param finalLength must be a number greater than or equal to 10,",
|
|
145
|
-
"or 0 if you want the raw hexadecimal timestamp"
|
|
146
|
-
].join(`
|
|
147
|
-
`)
|
|
148
|
-
);
|
|
149
|
-
const T = l - 9, P = Math.round(Math.random() * (T > 15 ? 15 : T)), U = this.randomUUID(T);
|
|
150
|
-
return `${U.substring(0, P)}${w}${U.substring(P)}${P.toString(16)}`;
|
|
151
|
-
}), i(this, "parseStamp", (l, x) => {
|
|
152
|
-
if (x && !/t0|t[1-9]\d{1,}/.test(x))
|
|
153
|
-
throw new Error("Cannot extract date from a formated UUID with no timestamp in the format");
|
|
154
|
-
const w = x ? x.replace(
|
|
155
|
-
/\$[rs]\d{0,}|\$t0|\$t[1-9]\d{1,}/g,
|
|
156
|
-
(P) => {
|
|
157
|
-
const U = {
|
|
158
|
-
$r: (Y) => [...Array(Y)].map(() => "r").join(""),
|
|
159
|
-
$s: (Y) => [...Array(Y)].map(() => "s").join(""),
|
|
160
|
-
$t: (Y) => [...Array(Y)].map(() => "t").join("")
|
|
161
|
-
}, N = P.slice(0, 2), te = parseInt(P.slice(2), 10);
|
|
162
|
-
return U[N](te);
|
|
163
|
-
}
|
|
164
|
-
).replace(
|
|
165
|
-
/^(.*?)(t{8,})(.*)$/g,
|
|
166
|
-
(P, U, N) => l.substring(U.length, U.length + N.length)
|
|
167
|
-
) : l;
|
|
168
|
-
if (w.length === 8)
|
|
169
|
-
return new Date(parseInt(w, 16) * 1e3);
|
|
170
|
-
if (w.length < 10)
|
|
171
|
-
throw new Error("Stamp length invalid");
|
|
172
|
-
const T = parseInt(w.substring(w.length - 1), 16);
|
|
173
|
-
return new Date(parseInt(w.substring(T, T + 8), 16) * 1e3);
|
|
174
|
-
}), i(this, "setCounter", (l) => {
|
|
175
|
-
this.counter = l;
|
|
176
|
-
});
|
|
177
|
-
const c = f(f({}, L), a);
|
|
178
|
-
this.counter = 0, this.debug = !1, this.dict = [], this.version = b;
|
|
179
|
-
const {
|
|
180
|
-
dictionary: I,
|
|
181
|
-
shuffle: E,
|
|
182
|
-
length: D,
|
|
183
|
-
counter: O
|
|
184
|
-
} = c;
|
|
185
|
-
return this.uuidLength = D, this.setDictionary(I, E), this.setCounter(O), this.debug = c.debug, this.log(this.dict), this.log(
|
|
186
|
-
`Generator instantiated with Dictionary Size ${this.dictLength} and counter set to ${this.counter}`
|
|
187
|
-
), this.log = this.log.bind(this), this.setDictionary = this.setDictionary.bind(this), this.setCounter = this.setCounter.bind(this), this.seq = this.seq.bind(this), this.sequentialUUID = this.sequentialUUID.bind(this), this.rnd = this.rnd.bind(this), this.randomUUID = this.randomUUID.bind(this), this.fmt = this.fmt.bind(this), this.formattedUUID = this.formattedUUID.bind(this), this.availableUUIDs = this.availableUUIDs.bind(this), this.approxMaxBeforeCollision = this.approxMaxBeforeCollision.bind(this), this.collisionProbability = this.collisionProbability.bind(this), this.uniqueness = this.uniqueness.bind(this), this.getVersion = this.getVersion.bind(this), this.stamp = this.stamp.bind(this), this.parseStamp = this.parseStamp.bind(this), this;
|
|
104
|
+
} else
|
|
105
|
+
for (var a = 0; a < s; a++)
|
|
106
|
+
if (d = e[a], d.length === o && r(d[0], n[0]))
|
|
107
|
+
return a;
|
|
108
|
+
return -1;
|
|
109
|
+
}, t.prototype._getKeyIndexForSingle = function(n) {
|
|
110
|
+
var r = this.keys;
|
|
111
|
+
if (!r.length)
|
|
112
|
+
return -1;
|
|
113
|
+
var e = r[0], s = e.length;
|
|
114
|
+
if (n.length !== s)
|
|
115
|
+
return -1;
|
|
116
|
+
var o = this.options.isEqual;
|
|
117
|
+
if (s > 1) {
|
|
118
|
+
for (var d = 0; d < s; d++)
|
|
119
|
+
if (!o(e[d], n[d]))
|
|
120
|
+
return -1;
|
|
121
|
+
return 0;
|
|
188
122
|
}
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
123
|
+
return o(e[0], n[0]) ? 0 : -1;
|
|
124
|
+
}, t.prototype.orderByLru = function(n, r, e) {
|
|
125
|
+
for (var s = this.keys, o = this.values, d = s.length, i = e; i--; )
|
|
126
|
+
s[i + 1] = s[i], o[i + 1] = o[i];
|
|
127
|
+
s[0] = n, o[0] = r;
|
|
128
|
+
var a = this.options.maxSize;
|
|
129
|
+
d === a && e === d ? (s.pop(), o.pop()) : e >= a && (s.length = o.length = a);
|
|
130
|
+
}, t.prototype.updateAsyncCache = function(n) {
|
|
131
|
+
var r = this, e = this.options, s = e.onCacheChange, o = e.onCacheHit, d = this.keys[0], i = this.values[0];
|
|
132
|
+
this.values[0] = i.then(function(a) {
|
|
133
|
+
return r.shouldUpdateOnHit && o(r, r.options, n), r.shouldUpdateOnChange && s(r, r.options, n), a;
|
|
134
|
+
}, function(a) {
|
|
135
|
+
var l = r.getKeyIndex(d);
|
|
136
|
+
throw l !== -1 && (r.keys.splice(l, 1), r.values.splice(l, 1)), a;
|
|
137
|
+
});
|
|
138
|
+
}, t;
|
|
139
|
+
}()
|
|
140
|
+
);
|
|
141
|
+
function Y(t, n) {
|
|
142
|
+
if (n === void 0 && (n = {}), ct(t))
|
|
143
|
+
return Y(t.fn, Z(t.options, n));
|
|
144
|
+
if (typeof t != "function")
|
|
145
|
+
throw new TypeError("You must pass a function to `memoize`.");
|
|
146
|
+
var r = n.isEqual, e = r === void 0 ? lt : r, s = n.isMatchingKey, o = n.isPromise, d = o === void 0 ? !1 : o, i = n.maxSize, a = i === void 0 ? 1 : i, l = n.onCacheAdd, g = n.onCacheChange, y = n.onCacheHit, h = n.transformKey, u = Z({
|
|
147
|
+
isEqual: e,
|
|
148
|
+
isMatchingKey: s,
|
|
149
|
+
isPromise: d,
|
|
150
|
+
maxSize: a,
|
|
151
|
+
onCacheAdd: l,
|
|
152
|
+
onCacheChange: g,
|
|
153
|
+
onCacheHit: y,
|
|
154
|
+
transformKey: h
|
|
155
|
+
}, dt(n)), c = new ut(u), b = c.keys, m = c.values, p = c.canTransformKey, f = c.shouldCloneArguments, _ = c.shouldUpdateOnAdd, v = c.shouldUpdateOnChange, x = c.shouldUpdateOnHit, E = function() {
|
|
156
|
+
var S = f ? W(arguments) : arguments;
|
|
157
|
+
p && (S = h(S));
|
|
158
|
+
var O = b.length ? c.getKeyIndex(S) : -1;
|
|
159
|
+
if (O !== -1)
|
|
160
|
+
x && y(c, u, E), O && (c.orderByLru(b[O], m[O], O), v && g(c, u, E));
|
|
161
|
+
else {
|
|
162
|
+
var Ve = t.apply(this, arguments), Je = f ? S : W(arguments);
|
|
163
|
+
c.orderByLru(Je, Ve, b.length), d && c.updateAsyncCache(E), _ && l(c, u, E), v && g(c, u, E);
|
|
164
|
+
}
|
|
165
|
+
return m[0];
|
|
166
|
+
};
|
|
167
|
+
return E.cache = c, E.fn = t, E.isMemoized = !0, E.options = u, E;
|
|
203
168
|
}
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
169
|
+
const { group: gt, indent: mt, softline: ee, lineSuffixBoundary: pt } = $, { mapDoc: ft } = X;
|
|
170
|
+
function ht(t, n) {
|
|
171
|
+
const { node: r } = t;
|
|
172
|
+
let e = n();
|
|
173
|
+
return r?.comments?.length && (e = gt([mt([ee, e]), ee])), ["${", e, pt, "}"];
|
|
174
|
+
}
|
|
175
|
+
function L(t, n) {
|
|
176
|
+
return t.map(
|
|
177
|
+
(r) => ht(r, n),
|
|
207
178
|
"expressions"
|
|
208
179
|
);
|
|
209
180
|
}
|
|
210
|
-
function
|
|
211
|
-
return ft(
|
|
181
|
+
function D(t, n, r) {
|
|
182
|
+
return ft(t, (s) => {
|
|
212
183
|
if (typeof s != "string")
|
|
213
184
|
return s;
|
|
214
|
-
const o = [],
|
|
215
|
-
for (let
|
|
216
|
-
let
|
|
217
|
-
if (
|
|
218
|
-
if (!
|
|
185
|
+
const o = [], d = s.split(n);
|
|
186
|
+
for (let i = 0; i < d.length; i++) {
|
|
187
|
+
let a = d[i];
|
|
188
|
+
if (i % 2 == 0) {
|
|
189
|
+
if (!a)
|
|
219
190
|
continue;
|
|
220
|
-
|
|
191
|
+
a = a.replaceAll(/([\\`]|\${)/g, "\\$1"), o.push(a);
|
|
221
192
|
} else {
|
|
222
|
-
const
|
|
223
|
-
o.push(r[
|
|
193
|
+
const l = Number(a);
|
|
194
|
+
o.push(r[l]);
|
|
224
195
|
}
|
|
225
196
|
}
|
|
226
197
|
return o;
|
|
227
198
|
});
|
|
228
199
|
}
|
|
229
|
-
function
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
var o;
|
|
234
|
-
return ((o = s.name) == null ? void 0 : o.includes(e)) ?? !1;
|
|
235
|
-
}
|
|
236
|
-
)) ?? !1))
|
|
200
|
+
function B(t, n, r) {
|
|
201
|
+
if (!(n.plugins?.some(
|
|
202
|
+
(e) => e.name?.includes(t) ?? !1
|
|
203
|
+
) ?? !1))
|
|
237
204
|
throw new Error(
|
|
238
|
-
`Cannot format embedded language identified by "${r}", because plugin "${
|
|
205
|
+
`Cannot format embedded language identified by "${r}", because plugin "${t}" is not loaded.`
|
|
239
206
|
);
|
|
240
207
|
}
|
|
241
|
-
function
|
|
208
|
+
function bt(t, n, r) {
|
|
242
209
|
if (n === r) {
|
|
243
|
-
|
|
210
|
+
t.unshift(n);
|
|
244
211
|
return;
|
|
245
212
|
}
|
|
246
|
-
let
|
|
247
|
-
for (;
|
|
248
|
-
const o =
|
|
249
|
-
if (
|
|
250
|
-
|
|
213
|
+
let e = 0, s = t.length;
|
|
214
|
+
for (; e < s; ) {
|
|
215
|
+
const o = e + s >>> 1;
|
|
216
|
+
if (t[o] === r) {
|
|
217
|
+
t.push(n);
|
|
251
218
|
return;
|
|
252
219
|
}
|
|
253
|
-
|
|
220
|
+
t[o] < n ? e = o + 1 : s = o;
|
|
254
221
|
}
|
|
255
|
-
|
|
222
|
+
t.splice(e, 0, n);
|
|
256
223
|
}
|
|
257
|
-
const
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
224
|
+
const te = (() => {
|
|
225
|
+
const t = [...Array(26).keys()].map((n) => String.fromCharCode(n + 97)).concat([...Array(10).keys()].map((n) => `${n}`));
|
|
226
|
+
return () => {
|
|
227
|
+
let r = "";
|
|
228
|
+
for (let e = 0; e < 16; ++e)
|
|
229
|
+
r += t[parseInt((Math.random() * t.length).toFixed(0), 10) % t.length];
|
|
230
|
+
return r;
|
|
231
|
+
};
|
|
232
|
+
})();
|
|
233
|
+
function k(t = "p", n = "") {
|
|
234
|
+
const r = te(), e = te(), s = ne(t), o = ne(n), d = (a) => `${t}${r}${a}${e}${n}`, i = new RegExp(
|
|
235
|
+
`${s}${r}(\\d+)${e}${o}`,
|
|
264
236
|
"g"
|
|
265
237
|
);
|
|
266
238
|
return {
|
|
267
|
-
createPlaceholder:
|
|
268
|
-
placeholderRegex:
|
|
239
|
+
createPlaceholder: d,
|
|
240
|
+
placeholderRegex: i
|
|
269
241
|
};
|
|
270
242
|
}
|
|
271
|
-
function
|
|
272
|
-
return
|
|
243
|
+
function ne(t) {
|
|
244
|
+
return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
273
245
|
}
|
|
274
|
-
function
|
|
275
|
-
return `${
|
|
246
|
+
function I(t) {
|
|
247
|
+
return `${t}Identifiers`;
|
|
276
248
|
}
|
|
277
|
-
function
|
|
278
|
-
return `${
|
|
249
|
+
function yt(t) {
|
|
250
|
+
return `${t}Parser`;
|
|
279
251
|
}
|
|
280
|
-
const
|
|
281
|
-
|
|
252
|
+
const vt = Y((t) => {
|
|
253
|
+
const n = rt(t) ? st(t, { encoding: "utf-8" }) : t;
|
|
282
254
|
try {
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
"
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
255
|
+
return JSON.parse(n);
|
|
256
|
+
} catch {
|
|
257
|
+
console.error("Error parsing embedded overrides.");
|
|
258
|
+
}
|
|
259
|
+
}), T = Y(
|
|
260
|
+
(t, n) => {
|
|
261
|
+
if (typeof t == "string") {
|
|
262
|
+
const r = vt(t);
|
|
263
|
+
if (typeof r > "u")
|
|
264
|
+
return;
|
|
265
|
+
try {
|
|
266
|
+
for (const { identifiers: e, options: s } of r)
|
|
267
|
+
if (e.includes(n))
|
|
268
|
+
return s;
|
|
269
|
+
} catch {
|
|
270
|
+
console.error("Error parsing embedded override options.");
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
), { line: re, group: R, indent: se, softline: oe } = $, _t = async (t, n, r, e, s) => {
|
|
275
|
+
e = {
|
|
276
|
+
...e,
|
|
277
|
+
...T(e.embeddedOverrides, s)
|
|
278
|
+
};
|
|
279
|
+
const { node: o } = r, { createPlaceholder: d, placeholderRegex: i } = k("@p"), a = o.quasis.map(
|
|
280
|
+
(m, p, { length: f }) => p === f - 1 ? m.value.cooked : m.value.cooked + d(p)
|
|
281
|
+
).join(""), l = a.match(/^\s+/)?.[0] ?? "", g = a.match(/\s+$/)?.[0] ?? "", y = L(r, n), h = await t(a, {
|
|
282
|
+
...e,
|
|
283
|
+
parser: "scss"
|
|
284
|
+
}), u = D(h, i, y);
|
|
285
|
+
if (e.preserveEmbeddedExteriorWhitespaces?.includes(s))
|
|
286
|
+
return R([
|
|
302
287
|
"`",
|
|
303
|
-
|
|
304
|
-
|
|
288
|
+
l,
|
|
289
|
+
e.noEmbeddedMultiLineIndentation?.includes(s) ? [R(u)] : se([R(u)]),
|
|
290
|
+
g,
|
|
305
291
|
"`"
|
|
306
292
|
]);
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
293
|
+
const c = l.length ? re : oe, b = g.length ? re : oe;
|
|
294
|
+
return R([
|
|
295
|
+
"`",
|
|
296
|
+
e.noEmbeddedMultiLineIndentation?.includes(s) ? [c, R(u)] : se([c, R(u)]),
|
|
297
|
+
b,
|
|
298
|
+
"`"
|
|
299
|
+
]);
|
|
300
|
+
}, Et = ["css"], xt = I(Ce), $t = {
|
|
301
|
+
[xt]: {
|
|
312
302
|
category: "Global",
|
|
313
303
|
type: "string",
|
|
314
304
|
array: !0,
|
|
315
|
-
default: [{ value: [...
|
|
305
|
+
default: [{ value: [...Et] }],
|
|
316
306
|
description: "Specify embedded CSS language identifiers."
|
|
317
307
|
}
|
|
318
|
-
},
|
|
308
|
+
}, It = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
319
309
|
__proto__: null,
|
|
320
|
-
embeddedLanguage:
|
|
321
|
-
embedder:
|
|
322
|
-
options:
|
|
323
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
return F([
|
|
337
|
-
"`",
|
|
338
|
-
_,
|
|
339
|
-
(d = t.noEmbeddedMultiLineIndentation) != null && d.includes(s) ? [F(m)] : _e([F(m)]),
|
|
340
|
-
b,
|
|
341
|
-
"`"
|
|
342
|
-
]);
|
|
343
|
-
const y = _.length ? me : fe, p = b.length ? me : fe;
|
|
344
|
-
return F([
|
|
310
|
+
embeddedLanguage: Ce,
|
|
311
|
+
embedder: _t,
|
|
312
|
+
options: $t
|
|
313
|
+
}, Symbol.toStringTag, { value: "Module" })), V = "embeddedEs", { line: ie, group: P, indent: ae, softline: de } = $, St = async (t, n, r, e, s) => {
|
|
314
|
+
e = {
|
|
315
|
+
...e,
|
|
316
|
+
...T(e.embeddedOverrides, s)
|
|
317
|
+
};
|
|
318
|
+
const { node: o } = r, { createPlaceholder: d, placeholderRegex: i } = k(), a = o.quasis.map(
|
|
319
|
+
(m, p, { length: f }) => p === f - 1 ? m.value.cooked : m.value.cooked + d(p)
|
|
320
|
+
).join(""), l = a.match(/^\s+/)?.[0] ?? "", g = a.match(/\s+$/)?.[0] ?? "", y = L(r, n), h = await t(a, {
|
|
321
|
+
...e,
|
|
322
|
+
parser: e.embeddedEsParser ?? "babel"
|
|
323
|
+
}), u = D(h, i, y);
|
|
324
|
+
if (e.preserveEmbeddedExteriorWhitespaces?.includes(s))
|
|
325
|
+
return P([
|
|
345
326
|
"`",
|
|
346
|
-
|
|
347
|
-
|
|
327
|
+
l,
|
|
328
|
+
e.noEmbeddedMultiLineIndentation?.includes(s) ? [P(u)] : ae([P(u)]),
|
|
329
|
+
g,
|
|
348
330
|
"`"
|
|
349
331
|
]);
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
332
|
+
const c = l.length ? ie : de, b = g.length ? ie : de;
|
|
333
|
+
return P([
|
|
334
|
+
"`",
|
|
335
|
+
e.noEmbeddedMultiLineIndentation?.includes(s) ? [c, P(u)] : ae([c, P(u)]),
|
|
336
|
+
b,
|
|
337
|
+
"`"
|
|
338
|
+
]);
|
|
339
|
+
}, Ot = [
|
|
354
340
|
"js",
|
|
355
341
|
"jsx",
|
|
356
342
|
"es",
|
|
@@ -359,61 +345,56 @@ const { line: pe, group: B, indent: he, softline: ge } = k, Et = async (e, n, r,
|
|
|
359
345
|
"cjs",
|
|
360
346
|
"pac",
|
|
361
347
|
"javascript"
|
|
362
|
-
],
|
|
363
|
-
[
|
|
348
|
+
], Lt = I(V), kt = yt(V), Tt = {
|
|
349
|
+
[Lt]: {
|
|
364
350
|
category: "Global",
|
|
365
351
|
type: "string",
|
|
366
352
|
array: !0,
|
|
367
|
-
default: [{ value: [...
|
|
353
|
+
default: [{ value: [...Ot] }],
|
|
368
354
|
description: "Specify embedded ES language identifiers."
|
|
369
355
|
},
|
|
370
|
-
[
|
|
356
|
+
[kt]: {
|
|
371
357
|
category: "Global",
|
|
372
358
|
type: "string",
|
|
373
359
|
array: !1,
|
|
374
360
|
default: "babel",
|
|
375
361
|
description: "Specify the embedded ES language parser."
|
|
376
362
|
}
|
|
377
|
-
},
|
|
363
|
+
}, Dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
378
364
|
__proto__: null,
|
|
379
|
-
embeddedLanguage:
|
|
380
|
-
embedder:
|
|
381
|
-
options:
|
|
382
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
if ((g = t.preserveEmbeddedExteriorWhitespaces) != null && g.includes(s))
|
|
399
|
-
return A([
|
|
400
|
-
"`",
|
|
401
|
-
_,
|
|
402
|
-
(d = t.noEmbeddedMultiLineIndentation) != null && d.includes(s) ? [A(y)] : ye([A(y)]),
|
|
403
|
-
b,
|
|
404
|
-
"`"
|
|
405
|
-
]);
|
|
406
|
-
const p = _.length ? be : Ie, a = b.length ? be : Ie;
|
|
407
|
-
return A([
|
|
365
|
+
embeddedLanguage: V,
|
|
366
|
+
embedder: St,
|
|
367
|
+
options: Tt
|
|
368
|
+
}, Symbol.toStringTag, { value: "Module" })), Ne = "embeddedGlsl", { line: ce, group: M, indent: le, softline: ue } = $, Rt = async (t, n, r, e, s) => {
|
|
369
|
+
B("prettier-plugin-glsl", e, s), e = {
|
|
370
|
+
...e,
|
|
371
|
+
...T(e.embeddedOverrides, s)
|
|
372
|
+
};
|
|
373
|
+
const { node: o } = r, { createPlaceholder: d, placeholderRegex: i } = k(), a = o.quasis.map(
|
|
374
|
+
(p, f, { length: _ }) => f === _ - 1 ? p.value.cooked : p.value.cooked + d(f)
|
|
375
|
+
).join(""), l = a.match(/^\s+/)?.[0] ?? "", g = a.match(/\s+$/)?.[0] ?? "", y = a.slice(
|
|
376
|
+
l.length,
|
|
377
|
+
-g.length || void 0
|
|
378
|
+
), h = L(r, n), u = await t(y, {
|
|
379
|
+
...e,
|
|
380
|
+
parser: "glsl-parser"
|
|
381
|
+
}), c = D(u, i, h);
|
|
382
|
+
if (e.preserveEmbeddedExteriorWhitespaces?.includes(s))
|
|
383
|
+
return M([
|
|
408
384
|
"`",
|
|
409
|
-
|
|
410
|
-
|
|
385
|
+
l,
|
|
386
|
+
e.noEmbeddedMultiLineIndentation?.includes(s) ? [M(c)] : le([M(c)]),
|
|
387
|
+
g,
|
|
411
388
|
"`"
|
|
412
389
|
]);
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
390
|
+
const b = l.length ? ce : ue, m = g.length ? ce : ue;
|
|
391
|
+
return M([
|
|
392
|
+
"`",
|
|
393
|
+
e.noEmbeddedMultiLineIndentation?.includes(s) ? [b, M(c)] : le([b, M(c)]),
|
|
394
|
+
m,
|
|
395
|
+
"`"
|
|
396
|
+
]);
|
|
397
|
+
}, Pt = [
|
|
417
398
|
"glsl",
|
|
418
399
|
"fp",
|
|
419
400
|
"frag",
|
|
@@ -436,63 +417,63 @@ const { line: pe, group: B, indent: he, softline: ge } = k, Et = async (e, n, r,
|
|
|
436
417
|
"vrx",
|
|
437
418
|
"vsh",
|
|
438
419
|
"vshader"
|
|
439
|
-
],
|
|
440
|
-
[
|
|
420
|
+
], Mt = I(Ne), Ct = {
|
|
421
|
+
[Mt]: {
|
|
441
422
|
category: "Global",
|
|
442
423
|
type: "string",
|
|
443
424
|
array: !0,
|
|
444
|
-
default: [{ value: [...
|
|
425
|
+
default: [{ value: [...Pt] }],
|
|
445
426
|
description: 'Specify embedded GLSL language identifiers. This requires "prettier-plugin-glsl".'
|
|
446
427
|
}
|
|
447
|
-
},
|
|
428
|
+
}, Nt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
448
429
|
__proto__: null,
|
|
449
|
-
embeddedLanguage:
|
|
450
|
-
embedder:
|
|
451
|
-
options:
|
|
452
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
430
|
+
embeddedLanguage: Ne,
|
|
431
|
+
embedder: Rt,
|
|
432
|
+
options: Ct
|
|
433
|
+
}, Symbol.toStringTag, { value: "Module" })), we = "embeddedHtml", { line: ge, group: C, indent: me, softline: pe } = $, { mapDoc: wt } = X, Ft = async (t, n, r, e, s) => {
|
|
434
|
+
e = {
|
|
435
|
+
...e,
|
|
436
|
+
...T(e.embeddedOverrides, s)
|
|
437
|
+
};
|
|
438
|
+
const { node: o } = r, { createPlaceholder: d, placeholderRegex: i } = k(), a = o.quasis.map(
|
|
439
|
+
(m, p, { length: f }) => p === f - 1 ? m.value.cooked : m.value.cooked + d(p)
|
|
440
|
+
).join(""), l = a.match(/^\s+/)?.[0] ?? "", g = a.match(/\s+$/)?.[0] ?? "", y = L(r, n), h = await t(a, {
|
|
441
|
+
...e,
|
|
442
|
+
parser: "html"
|
|
443
|
+
}), u = wt(h, (m) => {
|
|
444
|
+
if (typeof m != "string")
|
|
445
|
+
return m;
|
|
446
|
+
const p = [], f = m.split(i);
|
|
447
|
+
for (let _ = 0; _ < f.length; _++) {
|
|
448
|
+
let v = f[_];
|
|
449
|
+
if (_ % 2 == 0) {
|
|
450
|
+
if (!v)
|
|
451
|
+
continue;
|
|
452
|
+
v = v.replaceAll(/([\\`]|\${)/g, "\\$1"), e.__embeddedInHtml && (v = v.replaceAll(/<\/(?=script\b)/gi, "<\\/")), p.push(v);
|
|
453
|
+
} else {
|
|
454
|
+
const x = Number(v);
|
|
455
|
+
p.push(y[x]);
|
|
473
456
|
}
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
"`",
|
|
480
|
-
_,
|
|
481
|
-
(d = t.noEmbeddedMultiLineIndentation) != null && d.includes(s) ? [C(m)] : xe([C(m)]),
|
|
482
|
-
b,
|
|
483
|
-
"`"
|
|
484
|
-
]);
|
|
485
|
-
const y = _.length ? Ee : $e, p = b.length ? Ee : $e;
|
|
457
|
+
}
|
|
458
|
+
return p;
|
|
459
|
+
});
|
|
460
|
+
if (e.htmlWhitespaceSensitivity === "strict" || // TODO: is css mode should be included here?
|
|
461
|
+
e.htmlWhitespaceSensitivity === "css" || e.preserveEmbeddedExteriorWhitespaces?.includes(s))
|
|
486
462
|
return C([
|
|
487
463
|
"`",
|
|
488
|
-
|
|
489
|
-
|
|
464
|
+
l,
|
|
465
|
+
e.noEmbeddedMultiLineIndentation?.includes(s) ? [C(u)] : me([C(u)]),
|
|
466
|
+
g,
|
|
490
467
|
"`"
|
|
491
468
|
]);
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
469
|
+
const c = l.length ? ge : pe, b = g.length ? ge : pe;
|
|
470
|
+
return C([
|
|
471
|
+
"`",
|
|
472
|
+
e.noEmbeddedMultiLineIndentation?.includes(s) ? [c, C(u)] : me([c, C(u)]),
|
|
473
|
+
b,
|
|
474
|
+
"`"
|
|
475
|
+
]);
|
|
476
|
+
}, At = [
|
|
496
477
|
"html",
|
|
497
478
|
"htm",
|
|
498
479
|
"shtml",
|
|
@@ -505,51 +486,47 @@ const { line: pe, group: B, indent: he, softline: ge } = k, Et = async (e, n, r,
|
|
|
505
486
|
"jshtm",
|
|
506
487
|
"volt",
|
|
507
488
|
"rhtml"
|
|
508
|
-
],
|
|
509
|
-
[
|
|
489
|
+
], jt = I(we), qt = {
|
|
490
|
+
[jt]: {
|
|
510
491
|
category: "Global",
|
|
511
492
|
type: "string",
|
|
512
493
|
array: !0,
|
|
513
|
-
default: [{ value: [...
|
|
494
|
+
default: [{ value: [...At] }],
|
|
514
495
|
description: "Specify embedded HTML language identifiers."
|
|
515
496
|
}
|
|
516
|
-
},
|
|
497
|
+
}, Bt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
517
498
|
__proto__: null,
|
|
518
|
-
embeddedLanguage:
|
|
519
|
-
embedder:
|
|
520
|
-
options:
|
|
521
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
return W([
|
|
536
|
-
"`",
|
|
537
|
-
_,
|
|
538
|
-
(d = t.noEmbeddedMultiLineIndentation) != null && d.includes(s) ? [W(m)] : we([W(m)]),
|
|
539
|
-
b,
|
|
540
|
-
"`"
|
|
541
|
-
]);
|
|
542
|
-
const y = _.length ? ve : De, p = b.length ? ve : De;
|
|
543
|
-
return W([
|
|
499
|
+
embeddedLanguage: we,
|
|
500
|
+
embedder: Ft,
|
|
501
|
+
options: qt
|
|
502
|
+
}, Symbol.toStringTag, { value: "Module" })), Fe = "embeddedMarkdown", { line: fe, group: N, indent: he, softline: be } = $, Wt = async (t, n, r, e, s) => {
|
|
503
|
+
e = {
|
|
504
|
+
...e,
|
|
505
|
+
...T(e.embeddedOverrides, s)
|
|
506
|
+
};
|
|
507
|
+
const { node: o } = r, { createPlaceholder: d, placeholderRegex: i } = k(), a = o.quasis.map(
|
|
508
|
+
(m, p, { length: f }) => p === f - 1 ? m.value.cooked : m.value.cooked + d(p)
|
|
509
|
+
).join(""), l = a.match(/^\s+/)?.[0] ?? "", g = a.match(/\s+$/)?.[0] ?? "", y = L(r, n), h = await t(a, {
|
|
510
|
+
...e,
|
|
511
|
+
parser: "markdown",
|
|
512
|
+
__inJsTemplate: !0
|
|
513
|
+
}), u = D(h, i, y);
|
|
514
|
+
if (e.preserveEmbeddedExteriorWhitespaces?.includes(s))
|
|
515
|
+
return N([
|
|
544
516
|
"`",
|
|
545
|
-
|
|
546
|
-
|
|
517
|
+
l,
|
|
518
|
+
e.noEmbeddedMultiLineIndentation?.includes(s) ? [N(u)] : he([N(u)]),
|
|
519
|
+
g,
|
|
547
520
|
"`"
|
|
548
521
|
]);
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
522
|
+
const c = l.length ? fe : be, b = g.length ? fe : be;
|
|
523
|
+
return N([
|
|
524
|
+
"`",
|
|
525
|
+
e.noEmbeddedMultiLineIndentation?.includes(s) ? [c, N(u)] : he([c, N(u)]),
|
|
526
|
+
b,
|
|
527
|
+
"`"
|
|
528
|
+
]);
|
|
529
|
+
}, Kt = [
|
|
553
530
|
"md",
|
|
554
531
|
"livemd",
|
|
555
532
|
"markdown",
|
|
@@ -561,79 +538,74 @@ const { line: pe, group: B, indent: he, softline: ge } = k, Et = async (e, n, r,
|
|
|
561
538
|
"ronn",
|
|
562
539
|
"scd",
|
|
563
540
|
"workbook"
|
|
564
|
-
], zt =
|
|
541
|
+
], zt = I(Fe), Ut = {
|
|
565
542
|
[zt]: {
|
|
566
543
|
category: "Global",
|
|
567
544
|
type: "string",
|
|
568
545
|
array: !0,
|
|
569
|
-
default: [{ value: [...
|
|
546
|
+
default: [{ value: [...Kt] }],
|
|
570
547
|
description: "Specify embedded Markdown language identifiers."
|
|
571
548
|
}
|
|
572
|
-
},
|
|
549
|
+
}, Gt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
573
550
|
__proto__: null,
|
|
574
|
-
embeddedLanguage:
|
|
551
|
+
embeddedLanguage: Fe,
|
|
575
552
|
embedder: Wt,
|
|
576
|
-
options:
|
|
577
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
578
|
-
[
|
|
553
|
+
options: Ut
|
|
554
|
+
}, Symbol.toStringTag, { value: "Module" })), J = "embeddedNoop", Ht = I(J), Xt = {
|
|
555
|
+
[Ht]: {
|
|
579
556
|
category: "Global",
|
|
580
557
|
type: "string",
|
|
581
558
|
array: !0,
|
|
582
559
|
default: [{ value: [] }],
|
|
583
560
|
description: "Specify embedded language identifiers that will not be formatted."
|
|
584
561
|
}
|
|
585
|
-
},
|
|
562
|
+
}, Yt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
586
563
|
__proto__: null,
|
|
587
|
-
embeddedLanguage:
|
|
588
|
-
options:
|
|
589
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
if ((g = t.preserveEmbeddedExteriorWhitespaces) != null && g.includes(s))
|
|
606
|
-
return G([
|
|
607
|
-
"`",
|
|
608
|
-
_,
|
|
609
|
-
(d = t.noEmbeddedMultiLineIndentation) != null && d.includes(s) ? [G(y)] : Se([G(y)]),
|
|
610
|
-
b,
|
|
611
|
-
"`"
|
|
612
|
-
]);
|
|
613
|
-
const p = _.length ? Le : Te, a = b.length ? Le : Te;
|
|
614
|
-
return G([
|
|
564
|
+
embeddedLanguage: J,
|
|
565
|
+
options: Xt
|
|
566
|
+
}, Symbol.toStringTag, { value: "Module" })), Ae = "embeddedPhp", { line: ye, group: w, indent: ve, softline: _e } = $, Vt = async (t, n, r, e, s) => {
|
|
567
|
+
B("@prettier/plugin-php", e, s), e = {
|
|
568
|
+
...e,
|
|
569
|
+
...T(e.embeddedOverrides, s)
|
|
570
|
+
};
|
|
571
|
+
const { node: o } = r, { createPlaceholder: d, placeholderRegex: i } = k("$p"), a = o.quasis.map(
|
|
572
|
+
(p, f, { length: _ }) => f === _ - 1 ? p.value.cooked : p.value.cooked + d(f)
|
|
573
|
+
).join(""), l = a.match(/^\s+/)?.[0] ?? "", g = a.match(/\s+$/)?.[0] ?? "", y = a.slice(
|
|
574
|
+
l.length,
|
|
575
|
+
-g.length || void 0
|
|
576
|
+
), h = L(r, n), u = await t(y, {
|
|
577
|
+
...e,
|
|
578
|
+
parser: "php"
|
|
579
|
+
}), c = D(u, i, h);
|
|
580
|
+
if (e.preserveEmbeddedExteriorWhitespaces?.includes(s))
|
|
581
|
+
return w([
|
|
615
582
|
"`",
|
|
616
|
-
|
|
617
|
-
|
|
583
|
+
l,
|
|
584
|
+
e.noEmbeddedMultiLineIndentation?.includes(s) ? [w(c)] : ve([w(c)]),
|
|
585
|
+
g,
|
|
618
586
|
"`"
|
|
619
587
|
]);
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
588
|
+
const b = l.length ? ye : _e, m = g.length ? ye : _e;
|
|
589
|
+
return w([
|
|
590
|
+
"`",
|
|
591
|
+
e.noEmbeddedMultiLineIndentation?.includes(s) ? [b, w(c)] : ve([b, w(c)]),
|
|
592
|
+
m,
|
|
593
|
+
"`"
|
|
594
|
+
]);
|
|
595
|
+
}, Jt = ["php", "php5", "phtml", "ctp"], Qt = I(Ae), Zt = {
|
|
596
|
+
[Qt]: {
|
|
625
597
|
category: "Global",
|
|
626
598
|
type: "string",
|
|
627
599
|
array: !0,
|
|
628
|
-
default: [{ value: [...
|
|
600
|
+
default: [{ value: [...Jt] }],
|
|
629
601
|
description: 'Specify embedded PHP language identifiers. This requires "@prettier/plugin-php".'
|
|
630
602
|
}
|
|
631
|
-
},
|
|
603
|
+
}, en = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
632
604
|
__proto__: null,
|
|
633
|
-
embeddedLanguage:
|
|
634
|
-
embedder:
|
|
635
|
-
options:
|
|
636
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
605
|
+
embeddedLanguage: Ae,
|
|
606
|
+
embedder: Vt,
|
|
607
|
+
options: Zt
|
|
608
|
+
}, Symbol.toStringTag, { value: "Module" })), je = "embeddedRuby", K = [
|
|
637
609
|
"ruby",
|
|
638
610
|
"arb",
|
|
639
611
|
"axlsx",
|
|
@@ -659,109 +631,106 @@ const { line: pe, group: B, indent: he, softline: ge } = k, Et = async (e, n, r,
|
|
|
659
631
|
"ru",
|
|
660
632
|
"thor",
|
|
661
633
|
"watchr"
|
|
662
|
-
],
|
|
634
|
+
], z = ["rbs"], U = ["haml"], tn = [
|
|
663
635
|
...K,
|
|
664
|
-
...
|
|
665
|
-
...
|
|
666
|
-
],
|
|
636
|
+
...z,
|
|
637
|
+
...U
|
|
638
|
+
], nn = "embeddedRubyParser", rn = I(je), sn = {
|
|
667
639
|
[rn]: {
|
|
668
640
|
category: "Global",
|
|
669
641
|
type: "string",
|
|
670
642
|
array: !0,
|
|
671
|
-
default: [{ value: [...
|
|
643
|
+
default: [{ value: [...tn] }],
|
|
672
644
|
description: 'Specify embedded Ruby language identifiers. This requires "@prettier/plugin-ruby".'
|
|
673
645
|
},
|
|
674
|
-
[
|
|
646
|
+
[nn]: {
|
|
675
647
|
category: "Global",
|
|
676
648
|
type: "string",
|
|
677
649
|
array: !1,
|
|
678
650
|
default: void 0,
|
|
679
651
|
description: "Specify the embedded Ruby language parser."
|
|
680
652
|
}
|
|
681
|
-
}, { line:
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
if ((d = t.preserveEmbeddedExteriorWhitespaces) != null && d.includes(s))
|
|
698
|
-
return z([
|
|
699
|
-
"`",
|
|
700
|
-
b,
|
|
701
|
-
(f = t.noEmbeddedMultiLineIndentation) != null && f.includes(s) ? [z(a)] : Ue([z(a)]),
|
|
702
|
-
v,
|
|
703
|
-
"`"
|
|
704
|
-
]);
|
|
705
|
-
const c = b.length ? Oe : Pe, I = v.length ? Oe : Pe;
|
|
706
|
-
return z([
|
|
653
|
+
}, { line: Ee, group: F, indent: xe, softline: $e } = $, on = async (t, n, r, e, s, o) => {
|
|
654
|
+
B("@prettier/plugin-ruby", e, s), e = {
|
|
655
|
+
...e,
|
|
656
|
+
...T(e.embeddedOverrides, s)
|
|
657
|
+
};
|
|
658
|
+
const { node: d } = r, { createPlaceholder: i, placeholderRegex: a } = k(), l = d.quasis.map(
|
|
659
|
+
(_, v, { length: x }) => v === x - 1 ? _.value.cooked : _.value.cooked + i(v)
|
|
660
|
+
).join(""), g = l.match(/^\s+/)?.[0] ?? "", y = l.match(/\s+$/)?.[0] ?? "", h = l.slice(
|
|
661
|
+
g.length,
|
|
662
|
+
-y.length || void 0
|
|
663
|
+
), u = L(r, n), c = an(e, s, o), b = await t(h, {
|
|
664
|
+
...e,
|
|
665
|
+
parser: c
|
|
666
|
+
}), m = D(b, a, u);
|
|
667
|
+
if (e.preserveEmbeddedExteriorWhitespaces?.includes(s))
|
|
668
|
+
return F([
|
|
707
669
|
"`",
|
|
708
|
-
|
|
709
|
-
|
|
670
|
+
g,
|
|
671
|
+
e.noEmbeddedMultiLineIndentation?.includes(s) ? [F(m)] : xe([F(m)]),
|
|
672
|
+
y,
|
|
710
673
|
"`"
|
|
711
674
|
]);
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
675
|
+
const p = g.length ? Ee : $e, f = y.length ? Ee : $e;
|
|
676
|
+
return F([
|
|
677
|
+
"`",
|
|
678
|
+
e.noEmbeddedMultiLineIndentation?.includes(s) ? [p, F(m)] : xe([p, F(m)]),
|
|
679
|
+
f,
|
|
680
|
+
"`"
|
|
681
|
+
]);
|
|
715
682
|
};
|
|
716
|
-
function
|
|
717
|
-
if (typeof
|
|
718
|
-
return
|
|
719
|
-
const
|
|
720
|
-
for (let s =
|
|
721
|
-
if (
|
|
683
|
+
function an(t, n, r) {
|
|
684
|
+
if (typeof t.embeddedRubyParser == "string")
|
|
685
|
+
return t.embeddedRubyParser;
|
|
686
|
+
const e = r.indexOf(n);
|
|
687
|
+
for (let s = e; s >= 0; --s) {
|
|
688
|
+
if (dn(n))
|
|
722
689
|
return K[0];
|
|
723
690
|
if (cn(n))
|
|
724
|
-
return
|
|
725
|
-
if (
|
|
726
|
-
return
|
|
691
|
+
return z[0];
|
|
692
|
+
if (ln(n))
|
|
693
|
+
return U[0];
|
|
727
694
|
}
|
|
728
695
|
throw new SyntaxError(`Unrecognized ruby identifier: ${n}`);
|
|
729
696
|
}
|
|
730
|
-
function
|
|
731
|
-
return K.includes(
|
|
697
|
+
function dn(t) {
|
|
698
|
+
return K.includes(t);
|
|
732
699
|
}
|
|
733
|
-
function cn(
|
|
734
|
-
return
|
|
700
|
+
function cn(t) {
|
|
701
|
+
return z.includes(t);
|
|
735
702
|
}
|
|
736
|
-
function
|
|
737
|
-
return
|
|
703
|
+
function ln(t) {
|
|
704
|
+
return U.includes(t);
|
|
738
705
|
}
|
|
739
|
-
const
|
|
706
|
+
const un = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
740
707
|
__proto__: null,
|
|
741
|
-
HAML_PARSER_IDENTIFIERS:
|
|
742
|
-
RBS_PARSER_IDENTIFIERS:
|
|
708
|
+
HAML_PARSER_IDENTIFIERS: U,
|
|
709
|
+
RBS_PARSER_IDENTIFIERS: z,
|
|
743
710
|
RUBY_PARSER_IDENTIFIERS: K,
|
|
744
|
-
embeddedLanguage:
|
|
745
|
-
embedder:
|
|
746
|
-
options:
|
|
747
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
711
|
+
embeddedLanguage: je,
|
|
712
|
+
embedder: on,
|
|
713
|
+
options: sn
|
|
714
|
+
}, Symbol.toStringTag, { value: "Module" })), qe = "embeddedSql", Be = [
|
|
748
715
|
"sql",
|
|
749
716
|
"bigquery",
|
|
717
|
+
"db2",
|
|
718
|
+
"db2i",
|
|
750
719
|
"hive",
|
|
751
720
|
"mariadb",
|
|
752
721
|
"mysql",
|
|
722
|
+
"n1ql",
|
|
753
723
|
"postgresql",
|
|
754
|
-
"db2",
|
|
755
724
|
"plsql",
|
|
756
|
-
"n1ql",
|
|
757
725
|
"redshift",
|
|
758
726
|
"singlestoredb",
|
|
727
|
+
"snowflake",
|
|
759
728
|
"spark",
|
|
760
729
|
"sqlite",
|
|
761
730
|
"transactsql",
|
|
762
731
|
"tsql",
|
|
763
732
|
"trino"
|
|
764
|
-
],
|
|
733
|
+
], We = [
|
|
765
734
|
"bigquery",
|
|
766
735
|
"db2",
|
|
767
736
|
"hive",
|
|
@@ -769,348 +738,339 @@ const pn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
769
738
|
"mysql",
|
|
770
739
|
"postgresql",
|
|
771
740
|
"transactsql",
|
|
772
|
-
"flinksql"
|
|
773
|
-
|
|
774
|
-
|
|
741
|
+
"flinksql",
|
|
742
|
+
"snowflake"
|
|
743
|
+
], gn = I(qe), mn = {
|
|
744
|
+
[gn]: {
|
|
775
745
|
category: "Global",
|
|
776
746
|
type: "string",
|
|
777
747
|
array: !0,
|
|
778
|
-
|
|
748
|
+
// TODO: remove these hardcoded defaults once supported diacts are exported from prettier-plugin-sql
|
|
749
|
+
default: [{ value: ["sql", "mysql", "mariadb", "postgresql"] }],
|
|
779
750
|
description: 'Specify embedded SQL language identifiers. This requires "prettier-plugin-sql".'
|
|
780
751
|
}
|
|
781
|
-
}, { hardline:
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
752
|
+
}, { hardline: pn, group: A, line: Ie, softline: Se, indent: Oe } = $, { mapDoc: fn } = X, hn = async (t, n, r, e, s, o) => {
|
|
753
|
+
B("prettier-plugin-sql", e, s);
|
|
754
|
+
const d = T(
|
|
755
|
+
e.embeddedOverrides,
|
|
756
|
+
s
|
|
757
|
+
);
|
|
758
|
+
e = {
|
|
759
|
+
...e,
|
|
760
|
+
...d
|
|
761
|
+
};
|
|
762
|
+
const { node: i } = r, { createPlaceholder: a, placeholderRegex: l } = k(), g = i.quasis.map(
|
|
763
|
+
(_, v, { length: x }) => v === x - 1 ? _.value.cooked : _.value.cooked + a(v)
|
|
764
|
+
).join(""), y = g.match(/^\s+/)?.[0] ?? "", h = g.match(/\s+$/)?.[0] ?? "", u = L(r, n), c = yn(e, s, o);
|
|
765
|
+
if (typeof c > "u")
|
|
766
|
+
throw new SyntaxError(`Unrecognized identifier: ${s}`);
|
|
767
|
+
const b = await t(g, {
|
|
768
|
+
...e,
|
|
769
|
+
parser: "sql",
|
|
770
|
+
...c,
|
|
771
|
+
...d
|
|
772
|
+
}), m = fn(b, (_) => {
|
|
773
|
+
if (typeof _ != "string")
|
|
774
|
+
return _;
|
|
775
|
+
const v = [], x = _.split(l);
|
|
776
|
+
for (let E = 0; E < x.length; E++) {
|
|
777
|
+
let S = x[E];
|
|
778
|
+
if (E % 2 == 0) {
|
|
779
|
+
if (!S)
|
|
780
|
+
continue;
|
|
781
|
+
S = S.replaceAll(/([\\`]|\${)/g, "\\$1"), S.split(/(\n)/).forEach((O) => O === `
|
|
782
|
+
` ? v.push(pn) : v.push(O));
|
|
783
|
+
} else {
|
|
784
|
+
const O = Number(S);
|
|
785
|
+
v.push(u[O]);
|
|
814
786
|
}
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
b,
|
|
821
|
-
(f = t.noEmbeddedMultiLineIndentation) != null && f.includes(s) ? [X(p)] : Me([X(p)]),
|
|
822
|
-
v,
|
|
823
|
-
"`"
|
|
824
|
-
]);
|
|
825
|
-
const a = b.length ? ke : Re, c = v.length ? ke : Re;
|
|
826
|
-
return X([
|
|
787
|
+
}
|
|
788
|
+
return v;
|
|
789
|
+
});
|
|
790
|
+
if (e.preserveEmbeddedExteriorWhitespaces?.includes(s))
|
|
791
|
+
return A([
|
|
827
792
|
"`",
|
|
828
|
-
|
|
829
|
-
|
|
793
|
+
y,
|
|
794
|
+
e.noEmbeddedMultiLineIndentation?.includes(s) ? [A(m)] : Oe([A(m)]),
|
|
795
|
+
h,
|
|
830
796
|
"`"
|
|
831
797
|
]);
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
798
|
+
const p = y.length ? Ie : Se, f = h.length ? Ie : Se;
|
|
799
|
+
return A([
|
|
800
|
+
"`",
|
|
801
|
+
e.noEmbeddedMultiLineIndentation?.includes(s) ? [p, A(m)] : Oe([p, A(m)]),
|
|
802
|
+
f,
|
|
803
|
+
"`"
|
|
804
|
+
]);
|
|
835
805
|
}, bn = {
|
|
836
|
-
"sql-formatter": (
|
|
837
|
-
"node-sql-parser": (
|
|
806
|
+
"sql-formatter": (t) => Be.includes(t),
|
|
807
|
+
"node-sql-parser": (t) => We.includes(t)
|
|
838
808
|
};
|
|
839
|
-
function
|
|
809
|
+
function Le(t, n) {
|
|
840
810
|
for (const r of n)
|
|
841
|
-
if (bn[r](
|
|
811
|
+
if (bn[r](t))
|
|
842
812
|
switch (r) {
|
|
843
813
|
case "sql-formatter":
|
|
844
814
|
return {
|
|
845
815
|
formatter: r,
|
|
846
|
-
language:
|
|
816
|
+
language: t
|
|
847
817
|
};
|
|
848
818
|
case "node-sql-parser":
|
|
849
819
|
return {
|
|
850
820
|
formatter: r,
|
|
851
|
-
database:
|
|
821
|
+
database: t
|
|
852
822
|
};
|
|
853
823
|
}
|
|
854
824
|
}
|
|
855
|
-
function
|
|
856
|
-
let
|
|
857
|
-
if (
|
|
858
|
-
return
|
|
859
|
-
const s = n.indexOf(
|
|
825
|
+
function G(t, n, r) {
|
|
826
|
+
let e = Le(t, r);
|
|
827
|
+
if (e)
|
|
828
|
+
return e;
|
|
829
|
+
const s = n.indexOf(t);
|
|
860
830
|
for (let o = s - 1; o >= 0; --o)
|
|
861
|
-
if (
|
|
831
|
+
if (e = Le(
|
|
862
832
|
n[o],
|
|
863
833
|
r
|
|
864
|
-
),
|
|
865
|
-
return
|
|
834
|
+
), e)
|
|
835
|
+
return e;
|
|
866
836
|
}
|
|
867
|
-
function yn(
|
|
868
|
-
switch (
|
|
837
|
+
function yn(t, n, r) {
|
|
838
|
+
switch (t.formatter ?? "sql-formatter") {
|
|
869
839
|
case "sql-formatter":
|
|
870
|
-
return
|
|
840
|
+
return G(
|
|
871
841
|
n,
|
|
872
842
|
r,
|
|
873
843
|
["sql-formatter", "node-sql-parser"]
|
|
874
844
|
);
|
|
875
845
|
case "node-sql-parser":
|
|
876
|
-
return
|
|
846
|
+
return G(
|
|
877
847
|
n,
|
|
878
848
|
r,
|
|
879
849
|
["node-sql-parser", "sql-formatter"]
|
|
880
850
|
);
|
|
881
851
|
default:
|
|
882
|
-
return
|
|
852
|
+
return G(
|
|
883
853
|
n,
|
|
884
854
|
r,
|
|
885
855
|
["sql-formatter", "node-sql-parser"]
|
|
886
856
|
);
|
|
887
857
|
}
|
|
888
858
|
}
|
|
889
|
-
const
|
|
859
|
+
const vn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
890
860
|
__proto__: null,
|
|
891
|
-
NODE_SQL_PARSER_DATABASES:
|
|
892
|
-
SQL_FORMATTER_LANGUAGES:
|
|
893
|
-
embeddedLanguage:
|
|
894
|
-
embedder:
|
|
895
|
-
options:
|
|
896
|
-
}, Symbol.toStringTag, { value: "Module" })), Ke = "embeddedTs", { line:
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
return H([
|
|
913
|
-
"`",
|
|
914
|
-
_,
|
|
915
|
-
(d = t.noEmbeddedMultiLineIndentation) != null && d.includes(s) ? [H(m)] : qe([H(m)]),
|
|
916
|
-
b,
|
|
917
|
-
"`"
|
|
918
|
-
]);
|
|
919
|
-
const y = _.length ? Ne : Be, p = b.length ? Ne : Be;
|
|
920
|
-
return H([
|
|
861
|
+
NODE_SQL_PARSER_DATABASES: We,
|
|
862
|
+
SQL_FORMATTER_LANGUAGES: Be,
|
|
863
|
+
embeddedLanguage: qe,
|
|
864
|
+
embedder: hn,
|
|
865
|
+
options: mn
|
|
866
|
+
}, Symbol.toStringTag, { value: "Module" })), Ke = "embeddedTs", { line: ke, group: j, indent: Te, softline: De } = $, _n = async (t, n, r, e, s) => {
|
|
867
|
+
e = {
|
|
868
|
+
...e,
|
|
869
|
+
...T(e.embeddedOverrides, s)
|
|
870
|
+
};
|
|
871
|
+
const { node: o } = r, { createPlaceholder: d, placeholderRegex: i } = k(), a = o.quasis.map(
|
|
872
|
+
(m, p, { length: f }) => p === f - 1 ? m.value.cooked : m.value.cooked + d(p)
|
|
873
|
+
).join(""), l = a.match(/^\s+/)?.[0] ?? "", g = a.match(/\s+$/)?.[0] ?? "", y = L(r, n), h = await t(a, {
|
|
874
|
+
...e,
|
|
875
|
+
parser: e.embeddedTsParser ?? "typescript",
|
|
876
|
+
// set filepath to undefined to enable jsx auto detection:
|
|
877
|
+
// https://github.com/prettier/prettier/blob/427a84d24203e2d54160cde153a1e6a6390fe65a/src/language-js/parse/typescript.js#L49-L53
|
|
878
|
+
filepath: void 0
|
|
879
|
+
}), u = D(h, i, y);
|
|
880
|
+
if (e.preserveEmbeddedExteriorWhitespaces?.includes(s))
|
|
881
|
+
return j([
|
|
921
882
|
"`",
|
|
922
|
-
|
|
923
|
-
|
|
883
|
+
l,
|
|
884
|
+
e.noEmbeddedMultiLineIndentation?.includes(s) ? [j(u)] : Te([j(u)]),
|
|
885
|
+
g,
|
|
924
886
|
"`"
|
|
925
887
|
]);
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
888
|
+
const c = l.length ? ke : De, b = g.length ? ke : De;
|
|
889
|
+
return j([
|
|
890
|
+
"`",
|
|
891
|
+
e.noEmbeddedMultiLineIndentation?.includes(s) ? [c, j(u)] : Te([c, j(u)]),
|
|
892
|
+
b,
|
|
893
|
+
"`"
|
|
894
|
+
]);
|
|
895
|
+
}, En = ["ts", "tsx", "cts", "mts", "typescript"], xn = "embeddedTsParser", $n = I(Ke), In = {
|
|
896
|
+
[$n]: {
|
|
931
897
|
category: "Global",
|
|
932
898
|
type: "string",
|
|
933
899
|
array: !0,
|
|
934
|
-
default: [{ value: [...
|
|
900
|
+
default: [{ value: [...En] }],
|
|
935
901
|
description: "Specify embedded TS language parsers."
|
|
936
902
|
},
|
|
937
|
-
[
|
|
903
|
+
[xn]: {
|
|
938
904
|
category: "Global",
|
|
939
905
|
type: "string",
|
|
940
906
|
array: !1,
|
|
941
907
|
default: "typescript",
|
|
942
908
|
description: "Specify the embedded TS language parser."
|
|
943
909
|
}
|
|
944
|
-
},
|
|
910
|
+
}, Sn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
945
911
|
__proto__: null,
|
|
946
912
|
embeddedLanguage: Ke,
|
|
947
|
-
embedder:
|
|
948
|
-
options:
|
|
949
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
950
|
-
function
|
|
913
|
+
embedder: _n,
|
|
914
|
+
options: In
|
|
915
|
+
}, Symbol.toStringTag, { value: "Module" })), Q = "embeddedXml";
|
|
916
|
+
function On(t) {
|
|
951
917
|
const n = {
|
|
952
918
|
loc: {
|
|
953
919
|
start: {
|
|
954
|
-
line:
|
|
955
|
-
column:
|
|
920
|
+
line: t.line,
|
|
921
|
+
column: t.column
|
|
956
922
|
},
|
|
957
923
|
end: {
|
|
958
|
-
line:
|
|
959
|
-
column:
|
|
924
|
+
line: t.line,
|
|
925
|
+
column: t.column + t.length
|
|
960
926
|
}
|
|
961
927
|
}
|
|
962
928
|
}, r = new SyntaxError(
|
|
963
|
-
`${
|
|
929
|
+
`${t.message} (${n.loc.start.line}:${n.loc.start.column})`,
|
|
964
930
|
{
|
|
965
|
-
cause:
|
|
931
|
+
cause: t
|
|
966
932
|
}
|
|
967
933
|
);
|
|
968
934
|
return Object.assign(r, n), r;
|
|
969
935
|
}
|
|
970
|
-
function
|
|
936
|
+
function Re(t) {
|
|
971
937
|
const n = {
|
|
972
938
|
loc: {
|
|
973
939
|
start: {
|
|
974
|
-
line:
|
|
975
|
-
column:
|
|
940
|
+
line: t.token.startLine ?? NaN,
|
|
941
|
+
column: t.token.startColumn ?? NaN
|
|
976
942
|
},
|
|
977
943
|
end: {
|
|
978
|
-
line:
|
|
979
|
-
column:
|
|
944
|
+
line: t.token.endLine ?? NaN,
|
|
945
|
+
column: t.token.endColumn ?? NaN
|
|
980
946
|
}
|
|
981
947
|
}
|
|
982
948
|
}, r = new SyntaxError(
|
|
983
|
-
`${
|
|
949
|
+
`${t.message} (${n.loc.start.line}:${n.loc.start.column})`,
|
|
984
950
|
{
|
|
985
|
-
cause:
|
|
951
|
+
cause: t
|
|
986
952
|
}
|
|
987
953
|
);
|
|
988
954
|
return Object.assign(r, n), r;
|
|
989
955
|
}
|
|
990
|
-
const
|
|
991
|
-
parse(
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
throw Ln(g);
|
|
956
|
+
const Ln = {
|
|
957
|
+
async parse(t, n) {
|
|
958
|
+
const { parse: r } = await import("@xml-tools/parser"), { lexErrors: e, parseErrors: s, cst: o } = r(t);
|
|
959
|
+
if (e.length > 0) {
|
|
960
|
+
const d = e[0];
|
|
961
|
+
throw On(d);
|
|
997
962
|
}
|
|
998
|
-
if (
|
|
999
|
-
let
|
|
1000
|
-
for (const
|
|
963
|
+
if (s.length > 0) {
|
|
964
|
+
let d = !1;
|
|
965
|
+
for (const i of s) {
|
|
1001
966
|
if (!["MismatchedTokenException", "NotAllInputParsedException"].includes(
|
|
1002
|
-
|
|
967
|
+
i.name
|
|
1003
968
|
))
|
|
1004
|
-
throw
|
|
1005
|
-
if (
|
|
1006
|
-
|
|
969
|
+
throw Re(i);
|
|
970
|
+
if (i.message === "Expecting token of type --> OPEN <-- but found --> '' <--") {
|
|
971
|
+
d = !0;
|
|
1007
972
|
continue;
|
|
1008
973
|
}
|
|
1009
|
-
if (/Expecting token of type --> EOF <-- but found --> '
|
|
1010
|
-
|
|
1011
|
-
) || /Redundant input, expecting EOF but found: /.test(
|
|
1012
|
-
|
|
974
|
+
if (/Expecting token of type --> EOF <-- but found --> '[\s\S]+' <--/.test(
|
|
975
|
+
i.message
|
|
976
|
+
) || /Redundant input, expecting EOF but found: /.test(i.message)) {
|
|
977
|
+
n.__embeddedXmlFragmentRecoverIndex?.splice(
|
|
1013
978
|
0,
|
|
1014
979
|
n.__embeddedXmlFragmentRecoverIndex.length,
|
|
1015
|
-
|
|
980
|
+
i.token.startOffset
|
|
1016
981
|
);
|
|
1017
982
|
break;
|
|
1018
983
|
}
|
|
1019
|
-
if (/Expecting token of type --> OPEN <-- but found --> '
|
|
1020
|
-
|
|
984
|
+
if (/Expecting token of type --> OPEN <-- but found --> '[\s\S]+' <--/.test(
|
|
985
|
+
i.message
|
|
1021
986
|
)) {
|
|
1022
|
-
if (
|
|
987
|
+
if (i.token.endOffset === void 0 || Number.isNaN(i.token.endOffset))
|
|
1023
988
|
break;
|
|
1024
|
-
|
|
989
|
+
n.__embeddedXmlFragmentRecoverIndex?.splice(
|
|
1025
990
|
0,
|
|
1026
991
|
n.__embeddedXmlFragmentRecoverIndex.length,
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
),
|
|
992
|
+
i.token.startOffset,
|
|
993
|
+
i.token.endOffset
|
|
994
|
+
), d = !0;
|
|
1030
995
|
break;
|
|
1031
996
|
}
|
|
1032
|
-
throw
|
|
997
|
+
throw Re(i);
|
|
1033
998
|
}
|
|
1034
|
-
|
|
999
|
+
d && ze(o);
|
|
1035
1000
|
}
|
|
1036
|
-
return
|
|
1001
|
+
return o;
|
|
1037
1002
|
},
|
|
1038
1003
|
astFormat: "xml",
|
|
1039
|
-
locStart(
|
|
1040
|
-
return
|
|
1004
|
+
locStart(t) {
|
|
1005
|
+
return t.location.startOffset;
|
|
1041
1006
|
},
|
|
1042
|
-
locEnd(
|
|
1043
|
-
return
|
|
1007
|
+
locEnd(t) {
|
|
1008
|
+
return t.location.endOffset ?? NaN;
|
|
1044
1009
|
}
|
|
1045
1010
|
};
|
|
1046
|
-
function
|
|
1047
|
-
const n =
|
|
1011
|
+
function ze(t) {
|
|
1012
|
+
const n = t.children;
|
|
1048
1013
|
for (const r in n) {
|
|
1049
|
-
const
|
|
1050
|
-
for (let s =
|
|
1051
|
-
const o =
|
|
1052
|
-
if (
|
|
1014
|
+
const e = n[r] ?? [];
|
|
1015
|
+
for (let s = e.length - 1; s >= 0; --s) {
|
|
1016
|
+
const o = e[s];
|
|
1017
|
+
if (kn(o)) {
|
|
1053
1018
|
if (Object.keys(o.children).length === 0) {
|
|
1054
|
-
|
|
1019
|
+
e.splice(s, 1), e.length === 0 && delete n[r];
|
|
1055
1020
|
continue;
|
|
1056
1021
|
}
|
|
1057
|
-
|
|
1022
|
+
ze(o);
|
|
1058
1023
|
}
|
|
1059
1024
|
}
|
|
1060
1025
|
}
|
|
1061
1026
|
}
|
|
1062
|
-
function
|
|
1063
|
-
return "name" in
|
|
1027
|
+
function kn(t) {
|
|
1028
|
+
return "name" in t && "children" in t && "location" in t;
|
|
1064
1029
|
}
|
|
1065
|
-
const { line:
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
let D = await e(E, {
|
|
1085
|
-
parser: de
|
|
1086
|
-
});
|
|
1087
|
-
const [O, l] = t.__embeddedXmlFragmentRecoverIndex ?? [];
|
|
1088
|
-
O === void 0 ? p = void 0 : l === void 0 ? p += O : (D = E.slice(O, l + 1), p += l + 1), y.push(D);
|
|
1089
|
-
}
|
|
1090
|
-
const a = q(
|
|
1091
|
-
y,
|
|
1092
|
-
i,
|
|
1093
|
-
m
|
|
1030
|
+
const { line: Pe, group: q, indent: Me, softline: H } = $, Tn = async (t, n, r, e, s) => {
|
|
1031
|
+
B("@prettier/plugin-xml", e, s), e = {
|
|
1032
|
+
...e,
|
|
1033
|
+
...T(e.embeddedOverrides, s)
|
|
1034
|
+
};
|
|
1035
|
+
const { node: o } = r, { createPlaceholder: d, placeholderRegex: i } = k(), a = o.quasis.map(
|
|
1036
|
+
(f, _, { length: v }) => _ === v - 1 ? f.value.cooked : f.value.cooked + d(_)
|
|
1037
|
+
).join(""), l = a.match(/^\s+/)?.[0] ?? "", g = a.match(/\s+$/)?.[0] ?? "", y = a.slice(
|
|
1038
|
+
l.length,
|
|
1039
|
+
-g.length || void 0
|
|
1040
|
+
), h = L(r, n), u = [];
|
|
1041
|
+
let c = 0;
|
|
1042
|
+
for (; c !== void 0; ) {
|
|
1043
|
+
const f = y.slice(c);
|
|
1044
|
+
if (f.length === 0)
|
|
1045
|
+
break;
|
|
1046
|
+
c > 0 && e.xmlWhitespaceSensitivity !== "strict" && u.push(H), e.__embeddedXmlFragmentRecoverIndex?.splice(
|
|
1047
|
+
0,
|
|
1048
|
+
e.__embeddedXmlFragmentRecoverIndex.length
|
|
1094
1049
|
);
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
return
|
|
1050
|
+
let _ = await t(f, {
|
|
1051
|
+
...e,
|
|
1052
|
+
parser: Q
|
|
1053
|
+
});
|
|
1054
|
+
const [v, x] = e.__embeddedXmlFragmentRecoverIndex ?? [];
|
|
1055
|
+
v === void 0 ? c = void 0 : x === void 0 ? c += v : (_ = f.slice(v, x + 1), c += x + 1), u.push(_);
|
|
1056
|
+
}
|
|
1057
|
+
const b = D(u, i, h);
|
|
1058
|
+
if (e.xmlWhitespaceSensitivity === "strict" || e.preserveEmbeddedExteriorWhitespaces?.includes(s))
|
|
1059
|
+
return q([
|
|
1105
1060
|
"`",
|
|
1106
|
-
|
|
1107
|
-
|
|
1061
|
+
l,
|
|
1062
|
+
e.noEmbeddedMultiLineIndentation?.includes(s) ? [q(b)] : Me([q(b)]),
|
|
1063
|
+
g,
|
|
1108
1064
|
"`"
|
|
1109
1065
|
]);
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1066
|
+
const m = l.length ? Pe : H, p = g.length ? Pe : H;
|
|
1067
|
+
return q([
|
|
1068
|
+
"`",
|
|
1069
|
+
e.noEmbeddedMultiLineIndentation?.includes(s) ? [m, q(b)] : Me([m, q(b)]),
|
|
1070
|
+
p,
|
|
1071
|
+
"`"
|
|
1072
|
+
]);
|
|
1073
|
+
}, Dn = [
|
|
1114
1074
|
"xml",
|
|
1115
1075
|
"xsd",
|
|
1116
1076
|
"ascx",
|
|
@@ -1167,12 +1127,12 @@ const { line: Ae, group: V, indent: Ce, softline: se } = k, On = async (e, n, r,
|
|
|
1167
1127
|
"xpdl",
|
|
1168
1128
|
"xul",
|
|
1169
1129
|
"xoml"
|
|
1170
|
-
],
|
|
1171
|
-
[
|
|
1130
|
+
], Rn = I(Q), Pn = {
|
|
1131
|
+
[Rn]: {
|
|
1172
1132
|
category: "Global",
|
|
1173
1133
|
type: "string",
|
|
1174
1134
|
array: !0,
|
|
1175
|
-
default: [{ value: [...
|
|
1135
|
+
default: [{ value: [...Dn] }],
|
|
1176
1136
|
description: 'Specify embedded XML language identifiers. This requires "@prettier/plugin-xml".'
|
|
1177
1137
|
},
|
|
1178
1138
|
/** @internal */
|
|
@@ -1183,77 +1143,87 @@ const { line: Ae, group: V, indent: Ce, softline: se } = k, On = async (e, n, r,
|
|
|
1183
1143
|
default: [{ value: [] }],
|
|
1184
1144
|
description: "This option is read only and used as a workaround to support xml fragments"
|
|
1185
1145
|
}
|
|
1186
|
-
},
|
|
1146
|
+
}, Mn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1187
1147
|
__proto__: null,
|
|
1188
|
-
embeddedLanguage:
|
|
1189
|
-
embedder:
|
|
1190
|
-
options:
|
|
1191
|
-
parser:
|
|
1192
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1193
|
-
"./css/index.ts":
|
|
1194
|
-
"./es/index.ts":
|
|
1195
|
-
"./glsl/index.ts":
|
|
1196
|
-
"./html/index.ts":
|
|
1197
|
-
"./markdown/index.ts":
|
|
1198
|
-
"./noop/index.ts":
|
|
1199
|
-
"./php/index.ts":
|
|
1200
|
-
"./ruby/index.ts":
|
|
1201
|
-
"./sql/index.ts":
|
|
1202
|
-
"./ts/index.ts":
|
|
1203
|
-
"./xml/index.ts":
|
|
1148
|
+
embeddedLanguage: Q,
|
|
1149
|
+
embedder: Tn,
|
|
1150
|
+
options: Pn,
|
|
1151
|
+
parser: Ln
|
|
1152
|
+
}, Symbol.toStringTag, { value: "Module" })), Ue = [], Ge = {}, He = {}, Xe = {}, Cn = /* @__PURE__ */ Object.assign({
|
|
1153
|
+
"./css/index.ts": It,
|
|
1154
|
+
"./es/index.ts": Dt,
|
|
1155
|
+
"./glsl/index.ts": Nt,
|
|
1156
|
+
"./html/index.ts": Bt,
|
|
1157
|
+
"./markdown/index.ts": Gt,
|
|
1158
|
+
"./noop/index.ts": Yt,
|
|
1159
|
+
"./php/index.ts": en,
|
|
1160
|
+
"./ruby/index.ts": un,
|
|
1161
|
+
"./sql/index.ts": vn,
|
|
1162
|
+
"./ts/index.ts": Sn,
|
|
1163
|
+
"./xml/index.ts": Mn
|
|
1204
1164
|
});
|
|
1205
|
-
Object.values(
|
|
1206
|
-
({ embeddedLanguage:
|
|
1207
|
-
|
|
1165
|
+
Object.values(Cn).forEach(
|
|
1166
|
+
({ embeddedLanguage: t, parser: n, embedder: r, options: e }) => {
|
|
1167
|
+
bt(Ue, t, J), n && (Ge[t] = n), r && (He[t] = r), Object.assign(Xe, e);
|
|
1208
1168
|
}
|
|
1209
1169
|
);
|
|
1210
|
-
const
|
|
1170
|
+
const Qn = {
|
|
1211
1171
|
// parsers from internal
|
|
1212
|
-
...
|
|
1213
|
-
...
|
|
1214
|
-
...
|
|
1215
|
-
...
|
|
1216
|
-
...
|
|
1172
|
+
...Qe.parsers,
|
|
1173
|
+
...Ze.parsers,
|
|
1174
|
+
...et.parsers,
|
|
1175
|
+
...tt.parsers,
|
|
1176
|
+
...nt.parsers,
|
|
1217
1177
|
// parsers from this plugin
|
|
1218
|
-
...
|
|
1219
|
-
}, { estree:
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
if (r.type !== "TemplateLiteral" || r.quasis.some(({ value: { cooked: s } }) => s === null))
|
|
1178
|
+
...Ge
|
|
1179
|
+
}, { estree: Ye } = ot, Nn = function(t, n) {
|
|
1180
|
+
const { node: r } = t;
|
|
1181
|
+
if (r.type !== "TemplateLiteral" || r.quasis.some(({ value: { cooked: e } }) => e === null))
|
|
1223
1182
|
return null;
|
|
1224
|
-
for (const
|
|
1225
|
-
const
|
|
1226
|
-
if (!
|
|
1183
|
+
for (const e of Ue) {
|
|
1184
|
+
const s = n[I(e)];
|
|
1185
|
+
if (!s)
|
|
1227
1186
|
continue;
|
|
1228
|
-
const
|
|
1229
|
-
|
|
1230
|
-
|
|
1187
|
+
const o = wn(
|
|
1188
|
+
t,
|
|
1189
|
+
s,
|
|
1231
1190
|
n.noEmbeddedIdentificationByComment ?? []
|
|
1232
|
-
) ??
|
|
1233
|
-
|
|
1234
|
-
|
|
1191
|
+
) ?? Fn(
|
|
1192
|
+
t,
|
|
1193
|
+
s,
|
|
1235
1194
|
n.noEmbeddedIdentificationByTag ?? []
|
|
1236
1195
|
);
|
|
1237
|
-
if (
|
|
1196
|
+
if (o === void 0)
|
|
1238
1197
|
continue;
|
|
1239
|
-
const
|
|
1240
|
-
if (!
|
|
1198
|
+
const d = He[e];
|
|
1199
|
+
if (!d)
|
|
1241
1200
|
return null;
|
|
1242
|
-
const
|
|
1243
|
-
return
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1201
|
+
const i = t.node;
|
|
1202
|
+
return i.quasis.length === 1 && i.quasis[0].value.raw.trim() === "" ? "``" : async (a, l, g, y) => {
|
|
1203
|
+
try {
|
|
1204
|
+
const h = await d(
|
|
1205
|
+
a,
|
|
1206
|
+
l,
|
|
1207
|
+
g,
|
|
1208
|
+
y,
|
|
1209
|
+
o,
|
|
1210
|
+
s
|
|
1211
|
+
);
|
|
1212
|
+
return $.label(
|
|
1213
|
+
{ embed: !0, ...h.label },
|
|
1214
|
+
h
|
|
1215
|
+
);
|
|
1216
|
+
} catch (h) {
|
|
1217
|
+
throw console.error(h), h;
|
|
1218
|
+
}
|
|
1249
1219
|
};
|
|
1250
1220
|
}
|
|
1251
|
-
return
|
|
1221
|
+
return Ye.embed?.(t, n) ?? null;
|
|
1252
1222
|
};
|
|
1253
|
-
function
|
|
1254
|
-
if (r.length === 0 ||
|
|
1223
|
+
function wn({ node: t, parent: n }, r, e) {
|
|
1224
|
+
if (r.length === 0 || t.type !== "TemplateLiteral")
|
|
1255
1225
|
return;
|
|
1256
|
-
const s =
|
|
1226
|
+
const s = t.comments ?? n?.comments;
|
|
1257
1227
|
if (!s)
|
|
1258
1228
|
return;
|
|
1259
1229
|
const o = s[s.length - 1];
|
|
@@ -1265,61 +1235,68 @@ function Nn({ node: e, parent: n }, r, t) {
|
|
|
1265
1235
|
"CommentBlock"
|
|
1266
1236
|
// babel, babel-flow, babel-ts
|
|
1267
1237
|
].includes(o.type) || !o.leading)) {
|
|
1268
|
-
for (const
|
|
1269
|
-
if (` ${
|
|
1270
|
-
return
|
|
1238
|
+
for (const d of r)
|
|
1239
|
+
if (` ${d} ` === o.value && !e.includes(d))
|
|
1240
|
+
return d;
|
|
1271
1241
|
}
|
|
1272
1242
|
}
|
|
1273
|
-
function
|
|
1274
|
-
if (r.length !== 0 && !(
|
|
1243
|
+
function Fn({ node: t, parent: n }, r, e) {
|
|
1244
|
+
if (r.length !== 0 && !(t.type !== "TemplateLiteral" || n?.type !== "TaggedTemplateExpression" || n.tag.type !== "Identifier")) {
|
|
1275
1245
|
for (const s of r)
|
|
1276
|
-
if (n.tag.name === s && !
|
|
1246
|
+
if (n.tag.name === s && !e.includes(s))
|
|
1277
1247
|
return s;
|
|
1278
1248
|
}
|
|
1279
1249
|
}
|
|
1280
1250
|
const Zn = {
|
|
1281
1251
|
estree: {
|
|
1282
|
-
...
|
|
1283
|
-
embed:
|
|
1252
|
+
...Ye,
|
|
1253
|
+
embed: Nn
|
|
1284
1254
|
}
|
|
1285
|
-
},
|
|
1286
|
-
...
|
|
1287
|
-
[
|
|
1255
|
+
}, An = "noEmbeddedIdentificationByComment", jn = "noEmbeddedIdentificationByTag", qn = "preserveEmbeddedExteriorWhitespaces", Bn = "noEmbeddedMultiLineIndentation", Wn = "embeddedOverrides", er = {
|
|
1256
|
+
...Xe,
|
|
1257
|
+
[An]: {
|
|
1288
1258
|
category: "Global",
|
|
1289
1259
|
type: "string",
|
|
1290
1260
|
array: !0,
|
|
1291
1261
|
default: [{ value: [] }],
|
|
1292
1262
|
description: 'This option turns off "/* identifier */ `...`" comment-based language identification for the specified identifiers.'
|
|
1293
1263
|
},
|
|
1294
|
-
[
|
|
1264
|
+
[jn]: {
|
|
1295
1265
|
category: "Global",
|
|
1296
1266
|
type: "string",
|
|
1297
1267
|
array: !0,
|
|
1298
1268
|
default: [{ value: [] }],
|
|
1299
1269
|
description: 'This option turns off "identifier`...`" tag-based language identification for the specified identifiers.'
|
|
1300
1270
|
},
|
|
1301
|
-
[
|
|
1271
|
+
[qn]: {
|
|
1302
1272
|
category: "Config",
|
|
1303
1273
|
type: "string",
|
|
1304
1274
|
array: !0,
|
|
1305
1275
|
default: [{ value: [] }],
|
|
1306
1276
|
description: "This option preserves leading and trailing whitespaces in the formatting results for the specified identifiers."
|
|
1307
1277
|
},
|
|
1308
|
-
[
|
|
1278
|
+
[Bn]: {
|
|
1309
1279
|
category: "Global",
|
|
1310
1280
|
type: "string",
|
|
1311
1281
|
array: !0,
|
|
1312
1282
|
default: [{ value: [] }],
|
|
1313
1283
|
description: "This option turns off auto indentation in the formatting results for the specified identifiers when they are formatted to span multi lines."
|
|
1284
|
+
},
|
|
1285
|
+
[Wn]: {
|
|
1286
|
+
category: "Global",
|
|
1287
|
+
type: "string",
|
|
1288
|
+
array: !1,
|
|
1289
|
+
default: void 0,
|
|
1290
|
+
description: "This option accepts option overrides for the specified identifiers. It should either be a stringified JSON or an absolute filepath to the option overrides file."
|
|
1314
1291
|
}
|
|
1315
1292
|
};
|
|
1316
1293
|
export {
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1294
|
+
He as embeddedEmbedders,
|
|
1295
|
+
Ue as embeddedLanguages,
|
|
1296
|
+
Xe as embeddedOptions,
|
|
1297
|
+
Ge as embeddedParsers,
|
|
1298
|
+
I as makeIdentifiersOptionName,
|
|
1299
|
+
er as options,
|
|
1300
|
+
Qn as parsers,
|
|
1324
1301
|
Zn as printers
|
|
1325
1302
|
};
|