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