prettier 3.6.2 → 3.7.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/THIRD-PARTY-NOTICES.md +297 -82
- package/doc.js +599 -363
- package/doc.mjs +600 -367
- package/index.cjs +95 -77
- package/index.d.ts +8 -2
- package/index.mjs +5172 -5502
- package/internal/experimental-cli-worker.mjs +466 -259
- package/internal/experimental-cli.mjs +1148 -1967
- package/internal/legacy-cli.mjs +2063 -541
- package/package.json +2 -1
- package/plugins/acorn.js +13 -12
- package/plugins/acorn.mjs +13 -12
- package/plugins/angular.js +4 -2
- package/plugins/angular.mjs +4 -2
- package/plugins/babel.js +13 -13
- package/plugins/babel.mjs +13 -13
- package/plugins/estree.js +40 -32
- package/plugins/estree.mjs +40 -32
- package/plugins/flow.js +16 -15
- package/plugins/flow.mjs +16 -15
- package/plugins/glimmer.js +28 -20
- package/plugins/glimmer.mjs +30 -22
- package/plugins/graphql.js +15 -16
- package/plugins/graphql.mjs +15 -16
- package/plugins/html.js +23 -21
- package/plugins/html.mjs +23 -21
- package/plugins/markdown.js +53 -54
- package/plugins/markdown.mjs +52 -53
- package/plugins/meriyah.js +5 -4
- package/plugins/meriyah.mjs +5 -4
- package/plugins/postcss.js +41 -34
- package/plugins/postcss.mjs +41 -34
- package/plugins/typescript.js +16 -15
- package/plugins/typescript.mjs +16 -15
- package/plugins/yaml.js +90 -91
- package/plugins/yaml.mjs +90 -91
- package/standalone.js +29 -30
- package/standalone.mjs +29 -30
|
@@ -6,19 +6,27 @@ const __filename = __prettierFileUrlToPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __prettierDirname(__filename);
|
|
7
7
|
|
|
8
8
|
// node_modules/atomically/dist/index.js
|
|
9
|
+
import { once } from "events";
|
|
10
|
+
import { createWriteStream } from "fs";
|
|
9
11
|
import path2 from "path";
|
|
12
|
+
import { Readable } from "stream";
|
|
10
13
|
|
|
11
14
|
// node_modules/stubborn-fs/dist/index.js
|
|
12
15
|
import fs from "fs";
|
|
13
16
|
import { promisify } from "util";
|
|
14
17
|
|
|
15
|
-
// node_modules/stubborn-
|
|
16
|
-
var attemptifyAsync = (fn,
|
|
18
|
+
// node_modules/stubborn-utils/dist/attemptify_async.js
|
|
19
|
+
var attemptifyAsync = (fn, options) => {
|
|
20
|
+
const { onError } = options;
|
|
17
21
|
return function attemptified(...args) {
|
|
18
22
|
return fn.apply(void 0, args).catch(onError);
|
|
19
23
|
};
|
|
20
24
|
};
|
|
21
|
-
var
|
|
25
|
+
var attemptify_async_default = attemptifyAsync;
|
|
26
|
+
|
|
27
|
+
// node_modules/stubborn-utils/dist/attemptify_sync.js
|
|
28
|
+
var attemptifySync = (fn, options) => {
|
|
29
|
+
const { onError } = options;
|
|
22
30
|
return function attemptified(...args) {
|
|
23
31
|
try {
|
|
24
32
|
return fn.apply(void 0, args);
|
|
@@ -27,12 +35,62 @@ var attemptifySync = (fn, onError) => {
|
|
|
27
35
|
}
|
|
28
36
|
};
|
|
29
37
|
};
|
|
38
|
+
var attemptify_sync_default = attemptifySync;
|
|
39
|
+
|
|
40
|
+
// node_modules/stubborn-utils/dist/constants.js
|
|
41
|
+
var RETRY_INTERVAL = 250;
|
|
42
|
+
|
|
43
|
+
// node_modules/stubborn-utils/dist/retryify_async.js
|
|
44
|
+
var retryifyAsync = (fn, options) => {
|
|
45
|
+
const { isRetriable } = options;
|
|
46
|
+
return function retryified(options2) {
|
|
47
|
+
const { timeout } = options2;
|
|
48
|
+
const interval = options2.interval ?? RETRY_INTERVAL;
|
|
49
|
+
const timestamp = Date.now() + timeout;
|
|
50
|
+
return function attempt3(...args) {
|
|
51
|
+
return fn.apply(void 0, args).catch((error) => {
|
|
52
|
+
if (!isRetriable(error))
|
|
53
|
+
throw error;
|
|
54
|
+
if (Date.now() >= timestamp)
|
|
55
|
+
throw error;
|
|
56
|
+
const delay = Math.round(interval * Math.random());
|
|
57
|
+
if (delay > 0) {
|
|
58
|
+
const delayPromise = new Promise((resolve3) => setTimeout(resolve3, delay));
|
|
59
|
+
return delayPromise.then(() => attempt3.apply(void 0, args));
|
|
60
|
+
} else {
|
|
61
|
+
return attempt3.apply(void 0, args);
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
var retryify_async_default = retryifyAsync;
|
|
68
|
+
|
|
69
|
+
// node_modules/stubborn-utils/dist/retryify_sync.js
|
|
70
|
+
var retryifySync = (fn, options) => {
|
|
71
|
+
const { isRetriable } = options;
|
|
72
|
+
return function retryified(options2) {
|
|
73
|
+
const { timeout } = options2;
|
|
74
|
+
const timestamp = Date.now() + timeout;
|
|
75
|
+
return function attempt3(...args) {
|
|
76
|
+
while (true) {
|
|
77
|
+
try {
|
|
78
|
+
return fn.apply(void 0, args);
|
|
79
|
+
} catch (error) {
|
|
80
|
+
if (!isRetriable(error))
|
|
81
|
+
throw error;
|
|
82
|
+
if (Date.now() >= timestamp)
|
|
83
|
+
throw error;
|
|
84
|
+
continue;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
var retryify_sync_default = retryifySync;
|
|
30
91
|
|
|
31
92
|
// node_modules/stubborn-fs/dist/constants.js
|
|
32
93
|
import process from "process";
|
|
33
|
-
var IS_USER_ROOT = process.getuid ? !process.getuid() : false;
|
|
34
|
-
var LIMIT_FILES_DESCRIPTORS = 1e4;
|
|
35
|
-
var NOOP = () => void 0;
|
|
36
94
|
|
|
37
95
|
// node_modules/stubborn-fs/dist/handlers.js
|
|
38
96
|
var Handlers = {
|
|
@@ -68,158 +126,74 @@ var Handlers = {
|
|
|
68
126
|
};
|
|
69
127
|
var handlers_default = Handlers;
|
|
70
128
|
|
|
71
|
-
// node_modules/stubborn-fs/dist/
|
|
72
|
-
var
|
|
73
|
-
|
|
74
|
-
this.interval = 25;
|
|
75
|
-
this.intervalId = void 0;
|
|
76
|
-
this.limit = LIMIT_FILES_DESCRIPTORS;
|
|
77
|
-
this.queueActive = /* @__PURE__ */ new Set();
|
|
78
|
-
this.queueWaiting = /* @__PURE__ */ new Set();
|
|
79
|
-
this.init = () => {
|
|
80
|
-
if (this.intervalId)
|
|
81
|
-
return;
|
|
82
|
-
this.intervalId = setInterval(this.tick, this.interval);
|
|
83
|
-
};
|
|
84
|
-
this.reset = () => {
|
|
85
|
-
if (!this.intervalId)
|
|
86
|
-
return;
|
|
87
|
-
clearInterval(this.intervalId);
|
|
88
|
-
delete this.intervalId;
|
|
89
|
-
};
|
|
90
|
-
this.add = (fn) => {
|
|
91
|
-
this.queueWaiting.add(fn);
|
|
92
|
-
if (this.queueActive.size < this.limit / 2) {
|
|
93
|
-
this.tick();
|
|
94
|
-
} else {
|
|
95
|
-
this.init();
|
|
96
|
-
}
|
|
97
|
-
};
|
|
98
|
-
this.remove = (fn) => {
|
|
99
|
-
this.queueWaiting.delete(fn);
|
|
100
|
-
this.queueActive.delete(fn);
|
|
101
|
-
};
|
|
102
|
-
this.schedule = () => {
|
|
103
|
-
return new Promise((resolve3) => {
|
|
104
|
-
const cleanup = () => this.remove(resolver);
|
|
105
|
-
const resolver = () => resolve3(cleanup);
|
|
106
|
-
this.add(resolver);
|
|
107
|
-
});
|
|
108
|
-
};
|
|
109
|
-
this.tick = () => {
|
|
110
|
-
if (this.queueActive.size >= this.limit)
|
|
111
|
-
return;
|
|
112
|
-
if (!this.queueWaiting.size)
|
|
113
|
-
return this.reset();
|
|
114
|
-
for (const fn of this.queueWaiting) {
|
|
115
|
-
if (this.queueActive.size >= this.limit)
|
|
116
|
-
break;
|
|
117
|
-
this.queueWaiting.delete(fn);
|
|
118
|
-
this.queueActive.add(fn);
|
|
119
|
-
fn();
|
|
120
|
-
}
|
|
121
|
-
};
|
|
122
|
-
}
|
|
129
|
+
// node_modules/stubborn-fs/dist/constants.js
|
|
130
|
+
var ATTEMPTIFY_CHANGE_ERROR_OPTIONS = {
|
|
131
|
+
onError: handlers_default.onChangeError
|
|
123
132
|
};
|
|
124
|
-
var
|
|
125
|
-
|
|
126
|
-
// node_modules/stubborn-fs/dist/retryify.js
|
|
127
|
-
var retryifyAsync = (fn, isRetriableError) => {
|
|
128
|
-
return function retrified(timestamp) {
|
|
129
|
-
return function attempt3(...args) {
|
|
130
|
-
return retryify_queue_default.schedule().then((cleanup) => {
|
|
131
|
-
const onResolve = (result) => {
|
|
132
|
-
cleanup();
|
|
133
|
-
return result;
|
|
134
|
-
};
|
|
135
|
-
const onReject = (error) => {
|
|
136
|
-
cleanup();
|
|
137
|
-
if (Date.now() >= timestamp)
|
|
138
|
-
throw error;
|
|
139
|
-
if (isRetriableError(error)) {
|
|
140
|
-
const delay = Math.round(100 * Math.random());
|
|
141
|
-
const delayPromise = new Promise((resolve3) => setTimeout(resolve3, delay));
|
|
142
|
-
return delayPromise.then(() => attempt3.apply(void 0, args));
|
|
143
|
-
}
|
|
144
|
-
throw error;
|
|
145
|
-
};
|
|
146
|
-
return fn.apply(void 0, args).then(onResolve, onReject);
|
|
147
|
-
});
|
|
148
|
-
};
|
|
149
|
-
};
|
|
133
|
+
var ATTEMPTIFY_NOOP_OPTIONS = {
|
|
134
|
+
onError: () => void 0
|
|
150
135
|
};
|
|
151
|
-
var
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
try {
|
|
155
|
-
return fn.apply(void 0, args);
|
|
156
|
-
} catch (error) {
|
|
157
|
-
if (Date.now() > timestamp)
|
|
158
|
-
throw error;
|
|
159
|
-
if (isRetriableError(error))
|
|
160
|
-
return attempt3.apply(void 0, args);
|
|
161
|
-
throw error;
|
|
162
|
-
}
|
|
163
|
-
};
|
|
164
|
-
};
|
|
136
|
+
var IS_USER_ROOT = process.getuid ? !process.getuid() : false;
|
|
137
|
+
var RETRYIFY_OPTIONS = {
|
|
138
|
+
isRetriable: handlers_default.isRetriableError
|
|
165
139
|
};
|
|
166
140
|
|
|
167
141
|
// node_modules/stubborn-fs/dist/index.js
|
|
168
142
|
var FS = {
|
|
169
143
|
attempt: {
|
|
170
144
|
/* ASYNC */
|
|
171
|
-
chmod:
|
|
172
|
-
chown:
|
|
173
|
-
close:
|
|
174
|
-
fsync:
|
|
175
|
-
mkdir:
|
|
176
|
-
realpath:
|
|
177
|
-
stat:
|
|
178
|
-
unlink:
|
|
145
|
+
chmod: attemptify_async_default(promisify(fs.chmod), ATTEMPTIFY_CHANGE_ERROR_OPTIONS),
|
|
146
|
+
chown: attemptify_async_default(promisify(fs.chown), ATTEMPTIFY_CHANGE_ERROR_OPTIONS),
|
|
147
|
+
close: attemptify_async_default(promisify(fs.close), ATTEMPTIFY_NOOP_OPTIONS),
|
|
148
|
+
fsync: attemptify_async_default(promisify(fs.fsync), ATTEMPTIFY_NOOP_OPTIONS),
|
|
149
|
+
mkdir: attemptify_async_default(promisify(fs.mkdir), ATTEMPTIFY_NOOP_OPTIONS),
|
|
150
|
+
realpath: attemptify_async_default(promisify(fs.realpath), ATTEMPTIFY_NOOP_OPTIONS),
|
|
151
|
+
stat: attemptify_async_default(promisify(fs.stat), ATTEMPTIFY_NOOP_OPTIONS),
|
|
152
|
+
unlink: attemptify_async_default(promisify(fs.unlink), ATTEMPTIFY_NOOP_OPTIONS),
|
|
179
153
|
/* SYNC */
|
|
180
|
-
chmodSync:
|
|
181
|
-
chownSync:
|
|
182
|
-
closeSync:
|
|
183
|
-
existsSync:
|
|
184
|
-
fsyncSync:
|
|
185
|
-
mkdirSync:
|
|
186
|
-
realpathSync:
|
|
187
|
-
statSync:
|
|
188
|
-
unlinkSync:
|
|
154
|
+
chmodSync: attemptify_sync_default(fs.chmodSync, ATTEMPTIFY_CHANGE_ERROR_OPTIONS),
|
|
155
|
+
chownSync: attemptify_sync_default(fs.chownSync, ATTEMPTIFY_CHANGE_ERROR_OPTIONS),
|
|
156
|
+
closeSync: attemptify_sync_default(fs.closeSync, ATTEMPTIFY_NOOP_OPTIONS),
|
|
157
|
+
existsSync: attemptify_sync_default(fs.existsSync, ATTEMPTIFY_NOOP_OPTIONS),
|
|
158
|
+
fsyncSync: attemptify_sync_default(fs.fsync, ATTEMPTIFY_NOOP_OPTIONS),
|
|
159
|
+
mkdirSync: attemptify_sync_default(fs.mkdirSync, ATTEMPTIFY_NOOP_OPTIONS),
|
|
160
|
+
realpathSync: attemptify_sync_default(fs.realpathSync, ATTEMPTIFY_NOOP_OPTIONS),
|
|
161
|
+
statSync: attemptify_sync_default(fs.statSync, ATTEMPTIFY_NOOP_OPTIONS),
|
|
162
|
+
unlinkSync: attemptify_sync_default(fs.unlinkSync, ATTEMPTIFY_NOOP_OPTIONS)
|
|
189
163
|
},
|
|
190
164
|
retry: {
|
|
191
165
|
/* ASYNC */
|
|
192
|
-
close:
|
|
193
|
-
fsync:
|
|
194
|
-
open:
|
|
195
|
-
readFile:
|
|
196
|
-
rename:
|
|
197
|
-
stat:
|
|
198
|
-
write:
|
|
199
|
-
writeFile:
|
|
166
|
+
close: retryify_async_default(promisify(fs.close), RETRYIFY_OPTIONS),
|
|
167
|
+
fsync: retryify_async_default(promisify(fs.fsync), RETRYIFY_OPTIONS),
|
|
168
|
+
open: retryify_async_default(promisify(fs.open), RETRYIFY_OPTIONS),
|
|
169
|
+
readFile: retryify_async_default(promisify(fs.readFile), RETRYIFY_OPTIONS),
|
|
170
|
+
rename: retryify_async_default(promisify(fs.rename), RETRYIFY_OPTIONS),
|
|
171
|
+
stat: retryify_async_default(promisify(fs.stat), RETRYIFY_OPTIONS),
|
|
172
|
+
write: retryify_async_default(promisify(fs.write), RETRYIFY_OPTIONS),
|
|
173
|
+
writeFile: retryify_async_default(promisify(fs.writeFile), RETRYIFY_OPTIONS),
|
|
200
174
|
/* SYNC */
|
|
201
|
-
closeSync:
|
|
202
|
-
fsyncSync:
|
|
203
|
-
openSync:
|
|
204
|
-
readFileSync:
|
|
205
|
-
renameSync:
|
|
206
|
-
statSync:
|
|
207
|
-
writeSync:
|
|
208
|
-
writeFileSync:
|
|
175
|
+
closeSync: retryify_sync_default(fs.closeSync, RETRYIFY_OPTIONS),
|
|
176
|
+
fsyncSync: retryify_sync_default(fs.fsyncSync, RETRYIFY_OPTIONS),
|
|
177
|
+
openSync: retryify_sync_default(fs.openSync, RETRYIFY_OPTIONS),
|
|
178
|
+
readFileSync: retryify_sync_default(fs.readFileSync, RETRYIFY_OPTIONS),
|
|
179
|
+
renameSync: retryify_sync_default(fs.renameSync, RETRYIFY_OPTIONS),
|
|
180
|
+
statSync: retryify_sync_default(fs.statSync, RETRYIFY_OPTIONS),
|
|
181
|
+
writeSync: retryify_sync_default(fs.writeSync, RETRYIFY_OPTIONS),
|
|
182
|
+
writeFileSync: retryify_sync_default(fs.writeFileSync, RETRYIFY_OPTIONS)
|
|
209
183
|
}
|
|
210
184
|
};
|
|
211
185
|
var dist_default = FS;
|
|
212
186
|
|
|
213
187
|
// node_modules/atomically/dist/constants.js
|
|
214
|
-
import os from "os";
|
|
215
188
|
import process2 from "process";
|
|
216
189
|
var DEFAULT_ENCODING = "utf8";
|
|
217
190
|
var DEFAULT_FILE_MODE = 438;
|
|
218
191
|
var DEFAULT_FOLDER_MODE = 511;
|
|
219
192
|
var DEFAULT_READ_OPTIONS = {};
|
|
220
193
|
var DEFAULT_WRITE_OPTIONS = {};
|
|
221
|
-
var DEFAULT_USER_UID =
|
|
222
|
-
var DEFAULT_USER_GID =
|
|
194
|
+
var DEFAULT_USER_UID = process2.geteuid ? process2.geteuid() : -1;
|
|
195
|
+
var DEFAULT_USER_GID = process2.getegid ? process2.getegid() : -1;
|
|
196
|
+
var DEFAULT_INTERVAL_ASYNC = 200;
|
|
223
197
|
var DEFAULT_TIMEOUT_ASYNC = 7500;
|
|
224
198
|
var IS_POSIX = !!process2.getuid;
|
|
225
199
|
var IS_USER_ROOT2 = process2.getuid ? !process2.getuid() : false;
|
|
@@ -281,12 +255,12 @@ var IS_LINUX = process3.platform === "linux";
|
|
|
281
255
|
var IS_WINDOWS = process3.platform === "win32";
|
|
282
256
|
|
|
283
257
|
// node_modules/when-exit/dist/node/signals.js
|
|
284
|
-
var Signals = ["
|
|
258
|
+
var Signals = ["SIGHUP", "SIGINT", "SIGTERM"];
|
|
285
259
|
if (!IS_WINDOWS) {
|
|
286
|
-
Signals.push("SIGVTALRM", "SIGXCPU", "SIGXFSZ", "SIGUSR2", "SIGTRAP", "SIGSYS", "SIGQUIT", "SIGIOT");
|
|
260
|
+
Signals.push("SIGALRM", "SIGABRT", "SIGVTALRM", "SIGXCPU", "SIGXFSZ", "SIGUSR2", "SIGTRAP", "SIGSYS", "SIGQUIT", "SIGIOT");
|
|
287
261
|
}
|
|
288
262
|
if (IS_LINUX) {
|
|
289
|
-
Signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT"
|
|
263
|
+
Signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT");
|
|
290
264
|
}
|
|
291
265
|
var signals_default = Signals;
|
|
292
266
|
|
|
@@ -339,6 +313,7 @@ var node_default = whenExit;
|
|
|
339
313
|
var Temp = {
|
|
340
314
|
/* VARIABLES */
|
|
341
315
|
store: {},
|
|
316
|
+
// filePath => purge
|
|
342
317
|
/* API */
|
|
343
318
|
create: (filePath) => {
|
|
344
319
|
const randomness = `000000${Math.floor(Math.random() * 16777215).toString(16)}`.slice(-6);
|
|
@@ -391,8 +366,9 @@ var temp_default = Temp;
|
|
|
391
366
|
function readFile(filePath, options = DEFAULT_READ_OPTIONS) {
|
|
392
367
|
if (isString(options))
|
|
393
368
|
return readFile(filePath, { encoding: options });
|
|
394
|
-
const timeout =
|
|
395
|
-
|
|
369
|
+
const timeout = options.timeout ?? DEFAULT_TIMEOUT_ASYNC;
|
|
370
|
+
const retryOptions = { timeout, interval: DEFAULT_INTERVAL_ASYNC };
|
|
371
|
+
return dist_default.retry.readFile(retryOptions)(filePath, options);
|
|
396
372
|
}
|
|
397
373
|
function writeFile(filePath, data, options, callback) {
|
|
398
374
|
if (isFunction(options))
|
|
@@ -405,7 +381,8 @@ function writeFile(filePath, data, options, callback) {
|
|
|
405
381
|
async function writeFileAsync(filePath, data, options = DEFAULT_WRITE_OPTIONS) {
|
|
406
382
|
if (isString(options))
|
|
407
383
|
return writeFileAsync(filePath, data, { encoding: options });
|
|
408
|
-
const timeout =
|
|
384
|
+
const timeout = options.timeout ?? DEFAULT_TIMEOUT_ASYNC;
|
|
385
|
+
const retryOptions = { timeout, interval: DEFAULT_INTERVAL_ASYNC };
|
|
409
386
|
let schedulerCustomDisposer = null;
|
|
410
387
|
let schedulerDisposer = null;
|
|
411
388
|
let tempDisposer = null;
|
|
@@ -440,23 +417,28 @@ async function writeFileAsync(filePath, data, options = DEFAULT_WRITE_OPTIONS) {
|
|
|
440
417
|
recursive: true
|
|
441
418
|
});
|
|
442
419
|
}
|
|
443
|
-
fd = await dist_default.retry.open(
|
|
420
|
+
fd = await dist_default.retry.open(retryOptions)(tempPath, "w", options.mode || DEFAULT_FILE_MODE);
|
|
444
421
|
if (options.tmpCreated) {
|
|
445
422
|
options.tmpCreated(tempPath);
|
|
446
423
|
}
|
|
447
424
|
if (isString(data)) {
|
|
448
|
-
await dist_default.retry.write(
|
|
425
|
+
await dist_default.retry.write(retryOptions)(fd, data, 0, options.encoding || DEFAULT_ENCODING);
|
|
426
|
+
} else if (data instanceof Readable) {
|
|
427
|
+
const writeStream = createWriteStream(tempPath, { fd, autoClose: false });
|
|
428
|
+
const finishPromise = once(writeStream, "finish");
|
|
429
|
+
data.pipe(writeStream);
|
|
430
|
+
await finishPromise;
|
|
449
431
|
} else if (!isUndefined(data)) {
|
|
450
|
-
await dist_default.retry.write(
|
|
432
|
+
await dist_default.retry.write(retryOptions)(fd, data, 0, data.length, 0);
|
|
451
433
|
}
|
|
452
434
|
if (options.fsync !== false) {
|
|
453
435
|
if (options.fsyncWait !== false) {
|
|
454
|
-
await dist_default.retry.fsync(
|
|
436
|
+
await dist_default.retry.fsync(retryOptions)(fd);
|
|
455
437
|
} else {
|
|
456
438
|
dist_default.attempt.fsync(fd);
|
|
457
439
|
}
|
|
458
440
|
}
|
|
459
|
-
await dist_default.retry.close(
|
|
441
|
+
await dist_default.retry.close(retryOptions)(fd);
|
|
460
442
|
fd = null;
|
|
461
443
|
if (options.chown && (options.chown.uid !== DEFAULT_USER_UID || options.chown.gid !== DEFAULT_USER_GID)) {
|
|
462
444
|
await dist_default.attempt.chown(tempPath, options.chown.uid, options.chown.gid);
|
|
@@ -465,13 +447,13 @@ async function writeFileAsync(filePath, data, options = DEFAULT_WRITE_OPTIONS) {
|
|
|
465
447
|
await dist_default.attempt.chmod(tempPath, options.mode);
|
|
466
448
|
}
|
|
467
449
|
try {
|
|
468
|
-
await dist_default.retry.rename(
|
|
450
|
+
await dist_default.retry.rename(retryOptions)(tempPath, filePath);
|
|
469
451
|
} catch (error) {
|
|
470
452
|
if (!isException(error))
|
|
471
453
|
throw error;
|
|
472
454
|
if (error.code !== "ENAMETOOLONG")
|
|
473
455
|
throw error;
|
|
474
|
-
await dist_default.retry.rename(
|
|
456
|
+
await dist_default.retry.rename(retryOptions)(tempPath, temp_default.truncate(filePath));
|
|
475
457
|
}
|
|
476
458
|
tempDisposer();
|
|
477
459
|
tempPath = null;
|
|
@@ -491,8 +473,32 @@ async function writeFileAsync(filePath, data, options = DEFAULT_WRITE_OPTIONS) {
|
|
|
491
473
|
import process8 from "process";
|
|
492
474
|
import * as prettier from "../index.mjs";
|
|
493
475
|
|
|
476
|
+
// scripts/build/shims/shared.js
|
|
477
|
+
var OPTIONAL_OBJECT = 1;
|
|
478
|
+
var createMethodShim = (methodName, getImplementation) => (flags, object, ...arguments_) => {
|
|
479
|
+
if (flags | OPTIONAL_OBJECT && (object === void 0 || object === null)) {
|
|
480
|
+
return;
|
|
481
|
+
}
|
|
482
|
+
const implementation = getImplementation.call(object) ?? object[methodName];
|
|
483
|
+
return implementation.apply(object, arguments_);
|
|
484
|
+
};
|
|
485
|
+
|
|
486
|
+
// scripts/build/shims/method-replace-all.js
|
|
487
|
+
var stringReplaceAll = String.prototype.replaceAll ?? function(pattern, replacement) {
|
|
488
|
+
if (pattern.global) {
|
|
489
|
+
return this.replace(pattern, replacement);
|
|
490
|
+
}
|
|
491
|
+
return this.split(pattern).join(replacement);
|
|
492
|
+
};
|
|
493
|
+
var replaceAll = createMethodShim("replaceAll", function() {
|
|
494
|
+
if (typeof this === "string") {
|
|
495
|
+
return stringReplaceAll;
|
|
496
|
+
}
|
|
497
|
+
});
|
|
498
|
+
var method_replace_all_default = replaceAll;
|
|
499
|
+
|
|
494
500
|
// node_modules/function-once/dist/index.js
|
|
495
|
-
var
|
|
501
|
+
var once2 = (fn) => {
|
|
496
502
|
let called = false;
|
|
497
503
|
let result;
|
|
498
504
|
return () => {
|
|
@@ -503,13 +509,13 @@ var once = (fn) => {
|
|
|
503
509
|
return result;
|
|
504
510
|
};
|
|
505
511
|
};
|
|
506
|
-
var dist_default3 =
|
|
512
|
+
var dist_default3 = once2;
|
|
507
513
|
|
|
508
514
|
// node_modules/import-meta-resolve/lib/resolve.js
|
|
509
515
|
import assert2 from "assert";
|
|
510
516
|
import { statSync, realpathSync } from "fs";
|
|
511
517
|
import process5 from "process";
|
|
512
|
-
import {
|
|
518
|
+
import { fileURLToPath as fileURLToPath3, pathToFileURL } from "url";
|
|
513
519
|
import path4 from "path";
|
|
514
520
|
import { builtinModules } from "module";
|
|
515
521
|
|
|
@@ -554,7 +560,7 @@ codes.ERR_INVALID_ARG_TYPE = createError(
|
|
|
554
560
|
* @param {unknown} actual
|
|
555
561
|
*/
|
|
556
562
|
(name, expected, actual) => {
|
|
557
|
-
assert(typeof name === "string", "'name' must be a string");
|
|
563
|
+
assert.ok(typeof name === "string", "'name' must be a string");
|
|
558
564
|
if (!Array.isArray(expected)) {
|
|
559
565
|
expected = [expected];
|
|
560
566
|
}
|
|
@@ -570,14 +576,14 @@ codes.ERR_INVALID_ARG_TYPE = createError(
|
|
|
570
576
|
const instances = [];
|
|
571
577
|
const other = [];
|
|
572
578
|
for (const value of expected) {
|
|
573
|
-
assert(
|
|
579
|
+
assert.ok(
|
|
574
580
|
typeof value === "string",
|
|
575
581
|
"All expected entries have to be of type string"
|
|
576
582
|
);
|
|
577
583
|
if (kTypes.has(value)) {
|
|
578
584
|
types.push(value.toLowerCase());
|
|
579
585
|
} else if (classRegExp.exec(value) === null) {
|
|
580
|
-
assert(
|
|
586
|
+
assert.ok(
|
|
581
587
|
value !== "object",
|
|
582
588
|
'The value "object" should be written as "Object"'
|
|
583
589
|
);
|
|
@@ -653,7 +659,7 @@ codes.ERR_INVALID_PACKAGE_TARGET = createError(
|
|
|
653
659
|
(packagePath, key, target, isImport = false, base = void 0) => {
|
|
654
660
|
const relatedError = typeof target === "string" && !isImport && target.length > 0 && !target.startsWith("./");
|
|
655
661
|
if (key === ".") {
|
|
656
|
-
assert(isImport === false);
|
|
662
|
+
assert.ok(isImport === false);
|
|
657
663
|
return `Invalid "exports" main target ${JSON.stringify(target)} defined in the package config ${packagePath}package.json${base ? ` imported from ${base}` : ""}${relatedError ? '; targets must start with "./"' : ""}`;
|
|
658
664
|
}
|
|
659
665
|
return `Invalid "${isImport ? "imports" : "exports"}" target ${JSON.stringify(
|
|
@@ -818,19 +824,19 @@ var captureLargerStackTrace = hideStackFrames(
|
|
|
818
824
|
);
|
|
819
825
|
function getMessage(key, parameters, self) {
|
|
820
826
|
const message = messages.get(key);
|
|
821
|
-
assert(message !== void 0, "expected `message` to be found");
|
|
827
|
+
assert.ok(message !== void 0, "expected `message` to be found");
|
|
822
828
|
if (typeof message === "function") {
|
|
823
|
-
assert(
|
|
829
|
+
assert.ok(
|
|
824
830
|
message.length <= parameters.length,
|
|
825
831
|
// Default options do not count.
|
|
826
832
|
`Code: ${key}; The provided arguments length (${parameters.length}) does not match the required ones (${message.length}).`
|
|
827
833
|
);
|
|
828
834
|
return Reflect.apply(message, self, parameters);
|
|
829
835
|
}
|
|
830
|
-
const
|
|
836
|
+
const regex3 = /%[dfijoOs]/g;
|
|
831
837
|
let expectedLength = 0;
|
|
832
|
-
while (
|
|
833
|
-
assert(
|
|
838
|
+
while (regex3.exec(message) !== null) expectedLength++;
|
|
839
|
+
assert.ok(
|
|
834
840
|
expectedLength === parameters.length,
|
|
835
841
|
`Code: ${key}; The provided arguments length (${parameters.length}) does not match the required ones (${expectedLength}).`
|
|
836
842
|
);
|
|
@@ -1038,6 +1044,30 @@ function defaultGetFormatWithoutErrors(url2, context) {
|
|
|
1038
1044
|
return protocolHandlers[protocol](url2, context, true) || null;
|
|
1039
1045
|
}
|
|
1040
1046
|
|
|
1047
|
+
// node_modules/import-meta-resolve/lib/utils.js
|
|
1048
|
+
var { ERR_INVALID_ARG_VALUE } = codes;
|
|
1049
|
+
var DEFAULT_CONDITIONS = Object.freeze(["node", "import"]);
|
|
1050
|
+
var DEFAULT_CONDITIONS_SET = new Set(DEFAULT_CONDITIONS);
|
|
1051
|
+
function getDefaultConditions() {
|
|
1052
|
+
return DEFAULT_CONDITIONS;
|
|
1053
|
+
}
|
|
1054
|
+
function getDefaultConditionsSet() {
|
|
1055
|
+
return DEFAULT_CONDITIONS_SET;
|
|
1056
|
+
}
|
|
1057
|
+
function getConditionsSet(conditions) {
|
|
1058
|
+
if (conditions !== void 0 && conditions !== getDefaultConditions()) {
|
|
1059
|
+
if (!Array.isArray(conditions)) {
|
|
1060
|
+
throw new ERR_INVALID_ARG_VALUE(
|
|
1061
|
+
"conditions",
|
|
1062
|
+
conditions,
|
|
1063
|
+
"expected an array"
|
|
1064
|
+
);
|
|
1065
|
+
}
|
|
1066
|
+
return new Set(conditions);
|
|
1067
|
+
}
|
|
1068
|
+
return getDefaultConditionsSet();
|
|
1069
|
+
}
|
|
1070
|
+
|
|
1041
1071
|
// node_modules/import-meta-resolve/lib/resolve.js
|
|
1042
1072
|
var RegExpPrototypeSymbolReplace = RegExp.prototype[Symbol.replace];
|
|
1043
1073
|
var {
|
|
@@ -1078,7 +1108,7 @@ function emitLegacyIndexDeprecation(url2, packageJsonUrl, base, main) {
|
|
|
1078
1108
|
const format3 = defaultGetFormatWithoutErrors(url2, { parentURL: base.href });
|
|
1079
1109
|
if (format3 !== "module") return;
|
|
1080
1110
|
const urlPath = fileURLToPath3(url2.href);
|
|
1081
|
-
const packagePath = fileURLToPath3(new
|
|
1111
|
+
const packagePath = fileURLToPath3(new URL(".", packageJsonUrl));
|
|
1082
1112
|
const basePath = fileURLToPath3(base);
|
|
1083
1113
|
if (!main) {
|
|
1084
1114
|
process5.emitWarning(
|
|
@@ -1114,7 +1144,7 @@ function fileExists(url2) {
|
|
|
1114
1144
|
function legacyMainResolve(packageJsonUrl, packageConfig, base) {
|
|
1115
1145
|
let guess;
|
|
1116
1146
|
if (packageConfig.main !== void 0) {
|
|
1117
|
-
guess = new
|
|
1147
|
+
guess = new URL(packageConfig.main, packageJsonUrl);
|
|
1118
1148
|
if (fileExists(guess)) return guess;
|
|
1119
1149
|
const tries2 = [
|
|
1120
1150
|
`./${packageConfig.main}.js`,
|
|
@@ -1126,7 +1156,7 @@ function legacyMainResolve(packageJsonUrl, packageConfig, base) {
|
|
|
1126
1156
|
];
|
|
1127
1157
|
let i2 = -1;
|
|
1128
1158
|
while (++i2 < tries2.length) {
|
|
1129
|
-
guess = new
|
|
1159
|
+
guess = new URL(tries2[i2], packageJsonUrl);
|
|
1130
1160
|
if (fileExists(guess)) break;
|
|
1131
1161
|
guess = void 0;
|
|
1132
1162
|
}
|
|
@@ -1143,7 +1173,7 @@ function legacyMainResolve(packageJsonUrl, packageConfig, base) {
|
|
|
1143
1173
|
const tries = ["./index.js", "./index.json", "./index.node"];
|
|
1144
1174
|
let i = -1;
|
|
1145
1175
|
while (++i < tries.length) {
|
|
1146
|
-
guess = new
|
|
1176
|
+
guess = new URL(tries[i], packageJsonUrl);
|
|
1147
1177
|
if (fileExists(guess)) break;
|
|
1148
1178
|
guess = void 0;
|
|
1149
1179
|
}
|
|
@@ -1152,7 +1182,7 @@ function legacyMainResolve(packageJsonUrl, packageConfig, base) {
|
|
|
1152
1182
|
return guess;
|
|
1153
1183
|
}
|
|
1154
1184
|
throw new ERR_MODULE_NOT_FOUND(
|
|
1155
|
-
fileURLToPath3(new
|
|
1185
|
+
fileURLToPath3(new URL(".", packageJsonUrl)),
|
|
1156
1186
|
fileURLToPath3(base)
|
|
1157
1187
|
);
|
|
1158
1188
|
}
|
|
@@ -1205,13 +1235,13 @@ function finalizeResolution(resolved, base, preserveSymlinks) {
|
|
|
1205
1235
|
function importNotDefined(specifier, packageJsonUrl, base) {
|
|
1206
1236
|
return new ERR_PACKAGE_IMPORT_NOT_DEFINED(
|
|
1207
1237
|
specifier,
|
|
1208
|
-
packageJsonUrl && fileURLToPath3(new
|
|
1238
|
+
packageJsonUrl && fileURLToPath3(new URL(".", packageJsonUrl)),
|
|
1209
1239
|
fileURLToPath3(base)
|
|
1210
1240
|
);
|
|
1211
1241
|
}
|
|
1212
1242
|
function exportsNotFound(subpath, packageJsonUrl, base) {
|
|
1213
1243
|
return new ERR_PACKAGE_PATH_NOT_EXPORTED(
|
|
1214
|
-
fileURLToPath3(new
|
|
1244
|
+
fileURLToPath3(new URL(".", packageJsonUrl)),
|
|
1215
1245
|
subpath,
|
|
1216
1246
|
base && fileURLToPath3(base)
|
|
1217
1247
|
);
|
|
@@ -1227,7 +1257,7 @@ function throwInvalidSubpath(request, match2, packageJsonUrl, internal, base) {
|
|
|
1227
1257
|
function invalidPackageTarget(subpath, target, packageJsonUrl, internal, base) {
|
|
1228
1258
|
target = typeof target === "object" && target !== null ? JSON.stringify(target, null, "") : `${target}`;
|
|
1229
1259
|
return new ERR_INVALID_PACKAGE_TARGET(
|
|
1230
|
-
fileURLToPath3(new
|
|
1260
|
+
fileURLToPath3(new URL(".", packageJsonUrl)),
|
|
1231
1261
|
subpath,
|
|
1232
1262
|
target,
|
|
1233
1263
|
internal,
|
|
@@ -1241,7 +1271,7 @@ function resolvePackageTargetString(target, subpath, match2, packageJsonUrl, bas
|
|
|
1241
1271
|
if (internal && !target.startsWith("../") && !target.startsWith("/")) {
|
|
1242
1272
|
let isURL = false;
|
|
1243
1273
|
try {
|
|
1244
|
-
new
|
|
1274
|
+
new URL(target);
|
|
1245
1275
|
isURL = true;
|
|
1246
1276
|
} catch {
|
|
1247
1277
|
}
|
|
@@ -1279,9 +1309,9 @@ function resolvePackageTargetString(target, subpath, match2, packageJsonUrl, bas
|
|
|
1279
1309
|
throw invalidPackageTarget(match2, target, packageJsonUrl, internal, base);
|
|
1280
1310
|
}
|
|
1281
1311
|
}
|
|
1282
|
-
const resolved = new
|
|
1312
|
+
const resolved = new URL(target, packageJsonUrl);
|
|
1283
1313
|
const resolvedPath = resolved.pathname;
|
|
1284
|
-
const packagePath = new
|
|
1314
|
+
const packagePath = new URL(".", packageJsonUrl).pathname;
|
|
1285
1315
|
if (!resolvedPath.startsWith(packagePath))
|
|
1286
1316
|
throw invalidPackageTarget(match2, target, packageJsonUrl, internal, base);
|
|
1287
1317
|
if (subpath === "") return resolved;
|
|
@@ -1309,7 +1339,7 @@ function resolvePackageTargetString(target, subpath, match2, packageJsonUrl, bas
|
|
|
1309
1339
|
}
|
|
1310
1340
|
}
|
|
1311
1341
|
if (pattern) {
|
|
1312
|
-
return new
|
|
1342
|
+
return new URL(
|
|
1313
1343
|
RegExpPrototypeSymbolReplace.call(
|
|
1314
1344
|
patternRegEx,
|
|
1315
1345
|
resolved.href,
|
|
@@ -1317,7 +1347,7 @@ function resolvePackageTargetString(target, subpath, match2, packageJsonUrl, bas
|
|
|
1317
1347
|
)
|
|
1318
1348
|
);
|
|
1319
1349
|
}
|
|
1320
|
-
return new
|
|
1350
|
+
return new URL(subpath, resolved);
|
|
1321
1351
|
}
|
|
1322
1352
|
function isArrayIndex(key) {
|
|
1323
1353
|
const keyNumber = Number(key);
|
|
@@ -1642,7 +1672,7 @@ function parsePackageName(specifier, base) {
|
|
|
1642
1672
|
}
|
|
1643
1673
|
function packageResolve(specifier, base, conditions) {
|
|
1644
1674
|
if (builtinModules.includes(specifier)) {
|
|
1645
|
-
return new
|
|
1675
|
+
return new URL("node:" + specifier);
|
|
1646
1676
|
}
|
|
1647
1677
|
const { packageName, packageSubpath, isScoped } = parsePackageName(
|
|
1648
1678
|
specifier,
|
|
@@ -1661,7 +1691,7 @@ function packageResolve(specifier, base, conditions) {
|
|
|
1661
1691
|
);
|
|
1662
1692
|
}
|
|
1663
1693
|
}
|
|
1664
|
-
let packageJsonUrl = new
|
|
1694
|
+
let packageJsonUrl = new URL(
|
|
1665
1695
|
"./node_modules/" + packageName + "/package.json",
|
|
1666
1696
|
base
|
|
1667
1697
|
);
|
|
@@ -1671,7 +1701,7 @@ function packageResolve(specifier, base, conditions) {
|
|
|
1671
1701
|
const stat = tryStatSync(packageJsonPath.slice(0, -13));
|
|
1672
1702
|
if (!stat || !stat.isDirectory()) {
|
|
1673
1703
|
lastPath = packageJsonPath;
|
|
1674
|
-
packageJsonUrl = new
|
|
1704
|
+
packageJsonUrl = new URL(
|
|
1675
1705
|
(isScoped ? "../../../../node_modules/" : "../../../node_modules/") + packageName + "/package.json",
|
|
1676
1706
|
packageJsonUrl
|
|
1677
1707
|
);
|
|
@@ -1691,7 +1721,7 @@ function packageResolve(specifier, base, conditions) {
|
|
|
1691
1721
|
if (packageSubpath === ".") {
|
|
1692
1722
|
return legacyMainResolve(packageJsonUrl, packageConfig2, base);
|
|
1693
1723
|
}
|
|
1694
|
-
return new
|
|
1724
|
+
return new URL(packageSubpath, packageJsonUrl);
|
|
1695
1725
|
} while (packageJsonPath.length !== lastPath.length);
|
|
1696
1726
|
throw new ERR_MODULE_NOT_FOUND(packageName, fileURLToPath3(base), false);
|
|
1697
1727
|
}
|
|
@@ -1710,13 +1740,16 @@ function shouldBeTreatedAsRelativeOrAbsolutePath(specifier) {
|
|
|
1710
1740
|
return isRelativeSpecifier(specifier);
|
|
1711
1741
|
}
|
|
1712
1742
|
function moduleResolve(specifier, base, conditions, preserveSymlinks) {
|
|
1743
|
+
if (conditions === void 0) {
|
|
1744
|
+
conditions = getConditionsSet();
|
|
1745
|
+
}
|
|
1713
1746
|
const protocol = base.protocol;
|
|
1714
1747
|
const isData = protocol === "data:";
|
|
1715
1748
|
const isRemote = isData || protocol === "http:" || protocol === "https:";
|
|
1716
1749
|
let resolved;
|
|
1717
1750
|
if (shouldBeTreatedAsRelativeOrAbsolutePath(specifier)) {
|
|
1718
1751
|
try {
|
|
1719
|
-
resolved = new
|
|
1752
|
+
resolved = new URL(specifier, base);
|
|
1720
1753
|
} catch (error_) {
|
|
1721
1754
|
const error = new ERR_UNSUPPORTED_RESOLVE_REQUEST(specifier, base);
|
|
1722
1755
|
error.cause = error_;
|
|
@@ -1726,7 +1759,7 @@ function moduleResolve(specifier, base, conditions, preserveSymlinks) {
|
|
|
1726
1759
|
resolved = packageImportsResolve(specifier, base, conditions);
|
|
1727
1760
|
} else {
|
|
1728
1761
|
try {
|
|
1729
|
-
resolved = new
|
|
1762
|
+
resolved = new URL(specifier);
|
|
1730
1763
|
} catch (error_) {
|
|
1731
1764
|
if (isRemote && !builtinModules.includes(specifier)) {
|
|
1732
1765
|
const error = new ERR_UNSUPPORTED_RESOLVE_REQUEST(specifier, base);
|
|
@@ -1736,7 +1769,7 @@ function moduleResolve(specifier, base, conditions, preserveSymlinks) {
|
|
|
1736
1769
|
resolved = packageResolve(specifier, base, conditions);
|
|
1737
1770
|
}
|
|
1738
1771
|
}
|
|
1739
|
-
assert2(resolved !== void 0, "expected to be defined");
|
|
1772
|
+
assert2.ok(resolved !== void 0, "expected to be defined");
|
|
1740
1773
|
if (resolved.protocol !== "file:") {
|
|
1741
1774
|
return resolved;
|
|
1742
1775
|
}
|
|
@@ -1784,12 +1817,9 @@ function resolveTimeout(timeout, value) {
|
|
|
1784
1817
|
var dist_default5 = resolveTimeout;
|
|
1785
1818
|
|
|
1786
1819
|
// node_modules/tiny-colors/dist/constants.js
|
|
1787
|
-
var
|
|
1788
|
-
var
|
|
1789
|
-
var
|
|
1790
|
-
var ARGV = ((_a2 = globalThis.process) == null ? void 0 : _a2.argv) || [];
|
|
1791
|
-
var _a3, _b, _c;
|
|
1792
|
-
var ENABLED = !("NO_COLOR" in ENV) && ENV.COLOR !== "0" && ENV.TERM !== "dumb" && !ARGV.includes("--no-color") && !ARGV.includes("--no-colors") && (ENV.COLOR === "1" || !((_a3 = globalThis.process) == null ? void 0 : _a3.stdout) || ((_c = (_b = globalThis.process) == null ? void 0 : _b.stdout) == null ? void 0 : _c.isTTY) === true);
|
|
1820
|
+
var ENV = globalThis.process?.env || {};
|
|
1821
|
+
var ARGV = globalThis.process?.argv || [];
|
|
1822
|
+
var ENABLED = !("NO_COLOR" in ENV) && ENV.COLOR !== "0" && ENV.TERM !== "dumb" && !ARGV.includes("--no-color") && !ARGV.includes("--no-colors") && (ENV.COLOR === "1" || !globalThis.process?.stdout || globalThis.process?.stdout?.isTTY === true);
|
|
1793
1823
|
|
|
1794
1824
|
// node_modules/tiny-colors/dist/index.js
|
|
1795
1825
|
var chain = (modifier) => {
|
|
@@ -1846,7 +1876,7 @@ var dist_default7 = colors;
|
|
|
1846
1876
|
|
|
1847
1877
|
// node_modules/ionstore/dist/node.js
|
|
1848
1878
|
import fs3 from "fs";
|
|
1849
|
-
import
|
|
1879
|
+
import os from "os";
|
|
1850
1880
|
import path5 from "path";
|
|
1851
1881
|
|
|
1852
1882
|
// node_modules/ionstore/dist/utils.js
|
|
@@ -1921,12 +1951,12 @@ var NodeStore = class extends abstract_default {
|
|
|
1921
1951
|
id,
|
|
1922
1952
|
backend: {
|
|
1923
1953
|
read: (id2) => {
|
|
1924
|
-
const filePath = path5.join(
|
|
1954
|
+
const filePath = path5.join(os.tmpdir(), `ionstore_${id2}.json`);
|
|
1925
1955
|
const content = fs3.readFileSync(filePath, "utf8");
|
|
1926
1956
|
return JSON.parse(content);
|
|
1927
1957
|
},
|
|
1928
1958
|
write: (id2, data) => {
|
|
1929
|
-
const filePath = path5.join(
|
|
1959
|
+
const filePath = path5.join(os.tmpdir(), `ionstore_${id2}.json`);
|
|
1930
1960
|
const content = JSON.stringify(Array.from(data));
|
|
1931
1961
|
return fs3.writeFileSync(filePath, content);
|
|
1932
1962
|
}
|
|
@@ -1988,8 +2018,7 @@ var Utils = {
|
|
|
1988
2018
|
return;
|
|
1989
2019
|
},
|
|
1990
2020
|
notify: (name, version, latest) => {
|
|
1991
|
-
|
|
1992
|
-
if (!((_b2 = (_a4 = globalThis.process) == null ? void 0 : _a4.stdout) == null ? void 0 : _b2.isTTY))
|
|
2021
|
+
if (!globalThis.process?.stdout?.isTTY)
|
|
1993
2022
|
return;
|
|
1994
2023
|
const log = () => console.log(`
|
|
1995
2024
|
|
|
@@ -2042,6 +2071,109 @@ var exit = (message, code = 1) => {
|
|
|
2042
2071
|
};
|
|
2043
2072
|
var exit_default = exit;
|
|
2044
2073
|
|
|
2074
|
+
// node_modules/graphmatch/dist/utils.js
|
|
2075
|
+
var getNodes = (node) => {
|
|
2076
|
+
const nodes = /* @__PURE__ */ new Set();
|
|
2077
|
+
const queue = [node];
|
|
2078
|
+
for (let i = 0; i < queue.length; i++) {
|
|
2079
|
+
const node2 = queue[i];
|
|
2080
|
+
if (nodes.has(node2))
|
|
2081
|
+
continue;
|
|
2082
|
+
nodes.add(node2);
|
|
2083
|
+
const { children } = node2;
|
|
2084
|
+
if (!children?.length)
|
|
2085
|
+
continue;
|
|
2086
|
+
for (let ci = 0, cl = children.length; ci < cl; ci++) {
|
|
2087
|
+
queue.push(children[ci]);
|
|
2088
|
+
}
|
|
2089
|
+
}
|
|
2090
|
+
return Array.from(nodes);
|
|
2091
|
+
};
|
|
2092
|
+
var getNodeFlags = (node) => {
|
|
2093
|
+
let flags = "";
|
|
2094
|
+
const nodes = getNodes(node);
|
|
2095
|
+
for (let i = 0, l = nodes.length; i < l; i++) {
|
|
2096
|
+
const node2 = nodes[i];
|
|
2097
|
+
if (!node2.regex)
|
|
2098
|
+
continue;
|
|
2099
|
+
const nodeFlags = node2.regex.flags;
|
|
2100
|
+
flags || (flags = nodeFlags);
|
|
2101
|
+
if (flags === nodeFlags)
|
|
2102
|
+
continue;
|
|
2103
|
+
throw new Error(`Inconsistent RegExp flags used: "${flags}" and "${nodeFlags}"`);
|
|
2104
|
+
}
|
|
2105
|
+
return flags;
|
|
2106
|
+
};
|
|
2107
|
+
var getNodeSourceWithCache = (node, partial, cache2) => {
|
|
2108
|
+
const cached = cache2.get(node);
|
|
2109
|
+
if (cached !== void 0)
|
|
2110
|
+
return cached;
|
|
2111
|
+
const isNodePartial = node.partial ?? partial;
|
|
2112
|
+
let source = "";
|
|
2113
|
+
if (node.regex) {
|
|
2114
|
+
source += isNodePartial ? "(?:$|" : "";
|
|
2115
|
+
source += node.regex.source;
|
|
2116
|
+
}
|
|
2117
|
+
if (node.children?.length) {
|
|
2118
|
+
const children = uniq2(node.children.map((node2) => getNodeSourceWithCache(node2, partial, cache2)).filter(Boolean));
|
|
2119
|
+
if (children?.length) {
|
|
2120
|
+
const isSomeChildNonPartial = node.children.some((child) => !child.regex || !(child.partial ?? partial));
|
|
2121
|
+
const needsWrapperGroup = children.length > 1 || isNodePartial && (!source.length || isSomeChildNonPartial);
|
|
2122
|
+
source += needsWrapperGroup ? isNodePartial ? "(?:$|" : "(?:" : "";
|
|
2123
|
+
source += children.join("|");
|
|
2124
|
+
source += needsWrapperGroup ? ")" : "";
|
|
2125
|
+
}
|
|
2126
|
+
}
|
|
2127
|
+
if (node.regex) {
|
|
2128
|
+
source += isNodePartial ? ")" : "";
|
|
2129
|
+
}
|
|
2130
|
+
cache2.set(node, source);
|
|
2131
|
+
return source;
|
|
2132
|
+
};
|
|
2133
|
+
var getNodeSource = (node, partial) => {
|
|
2134
|
+
const cache2 = /* @__PURE__ */ new Map();
|
|
2135
|
+
const nodes = getNodes(node);
|
|
2136
|
+
for (let i = nodes.length - 1; i >= 0; i--) {
|
|
2137
|
+
const source = getNodeSourceWithCache(nodes[i], partial, cache2);
|
|
2138
|
+
if (i > 0)
|
|
2139
|
+
continue;
|
|
2140
|
+
return source;
|
|
2141
|
+
}
|
|
2142
|
+
return "";
|
|
2143
|
+
};
|
|
2144
|
+
var uniq2 = (values) => {
|
|
2145
|
+
return Array.from(new Set(values));
|
|
2146
|
+
};
|
|
2147
|
+
|
|
2148
|
+
// node_modules/graphmatch/dist/index.js
|
|
2149
|
+
var graphmatch = (node, input, options) => {
|
|
2150
|
+
return graphmatch.compile(node, options).test(input);
|
|
2151
|
+
};
|
|
2152
|
+
graphmatch.compile = (node, options) => {
|
|
2153
|
+
const partial = options?.partial ?? false;
|
|
2154
|
+
const source = getNodeSource(node, partial);
|
|
2155
|
+
const flags = getNodeFlags(node);
|
|
2156
|
+
return new RegExp(`^(?:${source})$`, flags);
|
|
2157
|
+
};
|
|
2158
|
+
var dist_default18 = graphmatch;
|
|
2159
|
+
|
|
2160
|
+
// node_modules/zeptomatch/dist/compile/index.js
|
|
2161
|
+
var compile = (node, options) => {
|
|
2162
|
+
const re = dist_default18.compile(node, options);
|
|
2163
|
+
const source = `${re.source.slice(0, -1)}[\\\\/]?$`;
|
|
2164
|
+
const flags = re.flags;
|
|
2165
|
+
return new RegExp(source, flags);
|
|
2166
|
+
};
|
|
2167
|
+
var compile_default = compile;
|
|
2168
|
+
|
|
2169
|
+
// node_modules/zeptomatch/dist/merge/index.js
|
|
2170
|
+
var merge = (res) => {
|
|
2171
|
+
const source = res.map((re) => re.source).join("|") || "$^";
|
|
2172
|
+
const flags = res[0]?.flags;
|
|
2173
|
+
return new RegExp(source, flags);
|
|
2174
|
+
};
|
|
2175
|
+
var merge_default = merge;
|
|
2176
|
+
|
|
2045
2177
|
// node_modules/grammex/dist/utils.js
|
|
2046
2178
|
var isArray2 = (value) => {
|
|
2047
2179
|
return Array.isArray(value);
|
|
@@ -2247,6 +2379,9 @@ var optional = (rule, handler) => {
|
|
|
2247
2379
|
var star = (rule, handler) => {
|
|
2248
2380
|
return repeat(rule, 0, Infinity, handler);
|
|
2249
2381
|
};
|
|
2382
|
+
var plus = (rule, handler) => {
|
|
2383
|
+
return repeat(rule, 1, Infinity, handler);
|
|
2384
|
+
};
|
|
2250
2385
|
var and = (rules, handler) => {
|
|
2251
2386
|
const erules = rules.map(resolve);
|
|
2252
2387
|
return memoizable(handleable(backtrackable((state) => {
|
|
@@ -2314,12 +2449,11 @@ var memoizable = /* @__PURE__ */ (() => {
|
|
|
2314
2449
|
const erule = resolve(rule);
|
|
2315
2450
|
const ruleId = RULE_ID += 1;
|
|
2316
2451
|
return (state) => {
|
|
2317
|
-
var
|
|
2318
|
-
var _a4;
|
|
2452
|
+
var _a;
|
|
2319
2453
|
if (state.options.memoization === false)
|
|
2320
2454
|
return erule(state);
|
|
2321
2455
|
const indexStart = state.index;
|
|
2322
|
-
const cache2 = (
|
|
2456
|
+
const cache2 = (_a = state.cache)[ruleId] || (_a[ruleId] = { indexMax: -1, queue: [] });
|
|
2323
2457
|
const cacheQueue = cache2.queue;
|
|
2324
2458
|
const isPotentiallyCached = indexStart <= cache2.indexMax;
|
|
2325
2459
|
if (isPotentiallyCached) {
|
|
@@ -2340,7 +2474,7 @@ var memoizable = /* @__PURE__ */ (() => {
|
|
|
2340
2474
|
return true;
|
|
2341
2475
|
} else if (cached) {
|
|
2342
2476
|
state.index = cached.index;
|
|
2343
|
-
if (
|
|
2477
|
+
if (cached.output?.length) {
|
|
2344
2478
|
state.output.push(...cached.output);
|
|
2345
2479
|
}
|
|
2346
2480
|
return true;
|
|
@@ -2397,18 +2531,46 @@ var resolve = memoize2((rule) => {
|
|
|
2397
2531
|
var identity2 = (value) => {
|
|
2398
2532
|
return value;
|
|
2399
2533
|
};
|
|
2400
|
-
var
|
|
2401
|
-
return
|
|
2402
|
-
|
|
2534
|
+
var isString3 = (value) => {
|
|
2535
|
+
return typeof value === "string";
|
|
2536
|
+
};
|
|
2537
|
+
var memoizeByObject = (fn) => {
|
|
2538
|
+
const cacheFull = /* @__PURE__ */ new WeakMap();
|
|
2539
|
+
const cachePartial = /* @__PURE__ */ new WeakMap();
|
|
2540
|
+
return (globs, options) => {
|
|
2541
|
+
const cache2 = options?.partial ? cachePartial : cacheFull;
|
|
2542
|
+
const cached = cache2.get(globs);
|
|
2543
|
+
if (cached !== void 0)
|
|
2544
|
+
return cached;
|
|
2545
|
+
const result = fn(globs, options);
|
|
2546
|
+
cache2.set(globs, result);
|
|
2547
|
+
return result;
|
|
2403
2548
|
};
|
|
2404
2549
|
};
|
|
2405
|
-
var
|
|
2406
|
-
const
|
|
2407
|
-
|
|
2408
|
-
|
|
2550
|
+
var memoizeByPrimitive = (fn) => {
|
|
2551
|
+
const cacheFull = {};
|
|
2552
|
+
const cachePartial = {};
|
|
2553
|
+
return (glob, options) => {
|
|
2554
|
+
const cache2 = options?.partial ? cachePartial : cacheFull;
|
|
2555
|
+
return cache2[glob] ?? (cache2[glob] = fn(glob, options));
|
|
2409
2556
|
};
|
|
2410
2557
|
};
|
|
2411
2558
|
|
|
2559
|
+
// node_modules/zeptomatch/dist/normalize/grammar.js
|
|
2560
|
+
var Escaped = match(/\\./, identity2);
|
|
2561
|
+
var Passthrough = match(/./, identity2);
|
|
2562
|
+
var StarStarStar = match(/\*\*\*+/, "*");
|
|
2563
|
+
var StarStarNoLeft = match(/([^/{[(!])\*\*/, (_, $1) => `${$1}*`);
|
|
2564
|
+
var StarStarNoRight = match(/(^|.)\*\*(?=[^*/)\]}])/, (_, $1) => `${$1}*`);
|
|
2565
|
+
var Grammar = star(or([Escaped, StarStarStar, StarStarNoLeft, StarStarNoRight, Passthrough]));
|
|
2566
|
+
var grammar_default = Grammar;
|
|
2567
|
+
|
|
2568
|
+
// node_modules/zeptomatch/dist/normalize/index.js
|
|
2569
|
+
var normalize = (glob) => {
|
|
2570
|
+
return parse(glob, grammar_default, { memoization: false }).join("");
|
|
2571
|
+
};
|
|
2572
|
+
var normalize_default = normalize;
|
|
2573
|
+
|
|
2412
2574
|
// node_modules/zeptomatch/dist/range.js
|
|
2413
2575
|
var ALPHABET = "abcdefghijklmnopqrstuvwxyz";
|
|
2414
2576
|
var int2alpha = (int) => {
|
|
@@ -2443,81 +2605,121 @@ var makeRangeAlpha = (start, end) => {
|
|
|
2443
2605
|
return makeRangeInt(alpha2int(start), alpha2int(end)).map(int2alpha);
|
|
2444
2606
|
};
|
|
2445
2607
|
|
|
2446
|
-
// node_modules/zeptomatch/dist/
|
|
2447
|
-
var
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
var
|
|
2452
|
-
|
|
2608
|
+
// node_modules/zeptomatch/dist/parse/utils.js
|
|
2609
|
+
var regex2 = (source) => {
|
|
2610
|
+
const regex3 = new RegExp(source, "s");
|
|
2611
|
+
return { partial: false, regex: regex3, children: [] };
|
|
2612
|
+
};
|
|
2613
|
+
var alternation = (children) => {
|
|
2614
|
+
return { children };
|
|
2615
|
+
};
|
|
2616
|
+
var sequence = /* @__PURE__ */ (() => {
|
|
2617
|
+
const pushToLeaves = (parent, child, handled) => {
|
|
2618
|
+
if (handled.has(parent))
|
|
2619
|
+
return;
|
|
2620
|
+
handled.add(parent);
|
|
2621
|
+
const { children } = parent;
|
|
2622
|
+
if (!children.length) {
|
|
2623
|
+
children.push(child);
|
|
2624
|
+
} else {
|
|
2625
|
+
for (let i = 0, l = children.length; i < l; i++) {
|
|
2626
|
+
pushToLeaves(children[i], child, handled);
|
|
2627
|
+
}
|
|
2628
|
+
}
|
|
2629
|
+
};
|
|
2630
|
+
return (nodes) => {
|
|
2631
|
+
if (!nodes.length) {
|
|
2632
|
+
return alternation([]);
|
|
2633
|
+
}
|
|
2634
|
+
for (let i = nodes.length - 1; i >= 1; i--) {
|
|
2635
|
+
const handled = /* @__PURE__ */ new Set();
|
|
2636
|
+
const parent = nodes[i - 1];
|
|
2637
|
+
const child = nodes[i];
|
|
2638
|
+
pushToLeaves(parent, child, handled);
|
|
2639
|
+
}
|
|
2640
|
+
return nodes[0];
|
|
2641
|
+
};
|
|
2642
|
+
})();
|
|
2643
|
+
var slash = () => {
|
|
2644
|
+
const regex3 = new RegExp("[\\\\/]", "s");
|
|
2645
|
+
return { regex: regex3, children: [] };
|
|
2646
|
+
};
|
|
2647
|
+
|
|
2648
|
+
// node_modules/zeptomatch/dist/parse/grammar.js
|
|
2649
|
+
var Escaped2 = match(/\\./, regex2);
|
|
2650
|
+
var Escape = match(/[$.*+?^(){}[\]\|]/, (char) => regex2(`\\${char}`));
|
|
2651
|
+
var Slash = match(/[\\\/]/, slash);
|
|
2652
|
+
var Passthrough2 = match(/[^$.*+?^(){}[\]\|\\\/]+/, regex2);
|
|
2653
|
+
var NegationOdd = match(/^(?:!!)*!(.*)$/, (_, glob) => regex2(`(?!^${dist_default19.compile(glob).source}$).*?`));
|
|
2654
|
+
var NegationEven = match(/^(!!)+/);
|
|
2453
2655
|
var Negation = or([NegationOdd, NegationEven]);
|
|
2454
|
-
var StarStarBetween = match(/\/(\*\*\/)+/,
|
|
2455
|
-
var StarStarStart = match(/^(\*\*\/)+/, "(
|
|
2456
|
-
var StarStarEnd = match(/\/(\*\*)$/,
|
|
2457
|
-
var StarStarNone = match(/\*\*/, "
|
|
2656
|
+
var StarStarBetween = match(/\/(\*\*\/)+/, () => alternation([sequence([slash(), regex2(".+?"), slash()]), slash()]));
|
|
2657
|
+
var StarStarStart = match(/^(\*\*\/)+/, () => alternation([regex2("^"), sequence([regex2(".*?"), slash()])]));
|
|
2658
|
+
var StarStarEnd = match(/\/(\*\*)$/, () => alternation([sequence([slash(), regex2(".*?")]), regex2("$")]));
|
|
2659
|
+
var StarStarNone = match(/\*\*/, () => regex2(".*?"));
|
|
2458
2660
|
var StarStar = or([StarStarBetween, StarStarStart, StarStarEnd, StarStarNone]);
|
|
2459
|
-
var StarDouble = match(/\*\/(?!\*\*\/|\*$)/, "[^\\\\/]
|
|
2460
|
-
var StarSingle = match(/\*/, "[^\\\\/]*");
|
|
2661
|
+
var StarDouble = match(/\*\/(?!\*\*\/|\*$)/, () => sequence([regex2("[^\\\\/]*?"), slash()]));
|
|
2662
|
+
var StarSingle = match(/\*/, () => regex2("[^\\\\/]*"));
|
|
2461
2663
|
var Star = or([StarDouble, StarSingle]);
|
|
2462
|
-
var Question = match("?", "[^\\\\/]");
|
|
2664
|
+
var Question = match("?", () => regex2("[^\\\\/]"));
|
|
2463
2665
|
var ClassOpen = match("[", identity2);
|
|
2464
2666
|
var ClassClose = match("]", identity2);
|
|
2465
2667
|
var ClassNegation = match(/[!^]/, "^\\\\/");
|
|
2466
2668
|
var ClassRange = match(/[a-z]-[a-z]|[0-9]-[0-9]/i, identity2);
|
|
2669
|
+
var ClassEscaped = match(/\\./, identity2);
|
|
2467
2670
|
var ClassEscape = match(/[$.*+?^(){}[\|]/, (char) => `\\${char}`);
|
|
2468
|
-
var
|
|
2469
|
-
var
|
|
2470
|
-
var
|
|
2671
|
+
var ClassSlash = match(/[\\\/]/, "\\\\/");
|
|
2672
|
+
var ClassPassthrough = match(/[^$.*+?^(){}[\]\|\\\/]+/, identity2);
|
|
2673
|
+
var ClassValue = or([ClassEscaped, ClassEscape, ClassSlash, ClassRange, ClassPassthrough]);
|
|
2674
|
+
var Class = and([ClassOpen, optional(ClassNegation), star(ClassValue), ClassClose], (_) => regex2(_.join("")));
|
|
2471
2675
|
var RangeOpen = match("{", "(?:");
|
|
2472
2676
|
var RangeClose = match("}", ")");
|
|
2473
2677
|
var RangeNumeric = match(/(\d+)\.\.(\d+)/, (_, $1, $2) => makeRangePaddedInt(+$1, +$2, Math.min($1.length, $2.length)).join("|"));
|
|
2474
2678
|
var RangeAlphaLower = match(/([a-z]+)\.\.([a-z]+)/, (_, $1, $2) => makeRangeAlpha($1, $2).join("|"));
|
|
2475
2679
|
var RangeAlphaUpper = match(/([A-Z]+)\.\.([A-Z]+)/, (_, $1, $2) => makeRangeAlpha($1.toLowerCase(), $2.toLowerCase()).join("|").toUpperCase());
|
|
2476
2680
|
var RangeValue = or([RangeNumeric, RangeAlphaLower, RangeAlphaUpper]);
|
|
2477
|
-
var Range = and([RangeOpen, RangeValue, RangeClose]);
|
|
2478
|
-
var BracesOpen = match("{"
|
|
2479
|
-
var BracesClose = match("}"
|
|
2480
|
-
var BracesComma = match(","
|
|
2481
|
-
var
|
|
2482
|
-
var
|
|
2681
|
+
var Range = and([RangeOpen, RangeValue, RangeClose], (_) => regex2(_.join("")));
|
|
2682
|
+
var BracesOpen = match("{");
|
|
2683
|
+
var BracesClose = match("}");
|
|
2684
|
+
var BracesComma = match(",");
|
|
2685
|
+
var BracesEscaped = match(/\\./, regex2);
|
|
2686
|
+
var BracesEscape = match(/[$.*+?^(){[\]\|]/, (char) => regex2(`\\${char}`));
|
|
2687
|
+
var BracesSlash = match(/[\\\/]/, slash);
|
|
2688
|
+
var BracesPassthrough = match(/[^$.*+?^(){}[\]\|\\\/,]+/, regex2);
|
|
2483
2689
|
var BracesNested = lazy(() => Braces);
|
|
2484
|
-
var
|
|
2485
|
-
var
|
|
2486
|
-
var
|
|
2487
|
-
var
|
|
2488
|
-
|
|
2489
|
-
// node_modules/zeptomatch/dist/convert/parser.js
|
|
2490
|
-
var parser = makeParser(grammar_default);
|
|
2491
|
-
var parser_default = parser;
|
|
2492
|
-
|
|
2493
|
-
// node_modules/zeptomatch/dist/normalize/grammar.js
|
|
2494
|
-
var Escaped2 = match(/\\./, identity2);
|
|
2495
|
-
var Passthrough2 = match(/./, identity2);
|
|
2496
|
-
var StarStarStar = match(/\*\*\*+/, "*");
|
|
2497
|
-
var StarStarNoLeft = match(/([^/{[(!])\*\*/, (_, $1) => `${$1}*`);
|
|
2498
|
-
var StarStarNoRight = match(/(^|.)\*\*(?=[^*/)\]}])/, (_, $1) => `${$1}*`);
|
|
2499
|
-
var Grammar2 = star(or([Escaped2, StarStarStar, StarStarNoLeft, StarStarNoRight, Passthrough2]));
|
|
2690
|
+
var BracesEmptyValue = match("", () => regex2("(?:)"));
|
|
2691
|
+
var BracesFullValue = plus(or([StarStar, Star, Question, Class, Range, BracesNested, BracesEscaped, BracesEscape, BracesSlash, BracesPassthrough]), sequence);
|
|
2692
|
+
var BracesValue = or([BracesFullValue, BracesEmptyValue]);
|
|
2693
|
+
var Braces = and([BracesOpen, optional(and([BracesValue, star(and([BracesComma, BracesValue]))])), BracesClose], alternation);
|
|
2694
|
+
var Grammar2 = star(or([Negation, StarStar, Star, Question, Class, Range, Braces, Escaped2, Escape, Slash, Passthrough2]), sequence);
|
|
2500
2695
|
var grammar_default2 = Grammar2;
|
|
2501
2696
|
|
|
2502
|
-
// node_modules/zeptomatch/dist/
|
|
2503
|
-
var
|
|
2504
|
-
|
|
2697
|
+
// node_modules/zeptomatch/dist/parse/index.js
|
|
2698
|
+
var _parse = (glob) => {
|
|
2699
|
+
return parse(glob, grammar_default2, { memoization: false })[0];
|
|
2700
|
+
};
|
|
2701
|
+
var parse_default = _parse;
|
|
2505
2702
|
|
|
2506
2703
|
// node_modules/zeptomatch/dist/index.js
|
|
2507
|
-
var zeptomatch = (glob, path7) => {
|
|
2508
|
-
|
|
2509
|
-
const res = glob.map(zeptomatch.compile);
|
|
2510
|
-
const isMatch = res.some((re) => re.test(path7));
|
|
2511
|
-
return isMatch;
|
|
2512
|
-
} else {
|
|
2513
|
-
const re = zeptomatch.compile(glob);
|
|
2514
|
-
const isMatch = re.test(path7);
|
|
2515
|
-
return isMatch;
|
|
2516
|
-
}
|
|
2704
|
+
var zeptomatch = (glob, path7, options) => {
|
|
2705
|
+
return zeptomatch.compile(glob, options).test(path7);
|
|
2517
2706
|
};
|
|
2518
|
-
zeptomatch.compile =
|
|
2519
|
-
|
|
2520
|
-
|
|
2707
|
+
zeptomatch.compile = (() => {
|
|
2708
|
+
const compileGlob = memoizeByPrimitive((glob, options) => {
|
|
2709
|
+
return compile_default(parse_default(normalize_default(glob)), options);
|
|
2710
|
+
});
|
|
2711
|
+
const compileGlobs = memoizeByObject((globs, options) => {
|
|
2712
|
+
return merge_default(globs.map((glob) => compileGlob(glob, options)));
|
|
2713
|
+
});
|
|
2714
|
+
return (glob, options) => {
|
|
2715
|
+
if (isString3(glob)) {
|
|
2716
|
+
return compileGlob(glob, options);
|
|
2717
|
+
} else {
|
|
2718
|
+
return compileGlobs(glob, options);
|
|
2719
|
+
}
|
|
2720
|
+
};
|
|
2721
|
+
})();
|
|
2722
|
+
var dist_default19 = zeptomatch;
|
|
2521
2723
|
|
|
2522
2724
|
// node_modules/@prettier/cli/dist/utils.js
|
|
2523
2725
|
async function getModule(modulePath) {
|
|
@@ -2555,8 +2757,7 @@ function getPluginPath(name) {
|
|
|
2555
2757
|
}
|
|
2556
2758
|
}
|
|
2557
2759
|
async function getPluginsOrExit(names) {
|
|
2558
|
-
if (!names.length)
|
|
2559
|
-
return [];
|
|
2760
|
+
if (!names.length) return [];
|
|
2560
2761
|
return await Promise.all(names.map((name) => getPluginOrExit(name)));
|
|
2561
2762
|
}
|
|
2562
2763
|
var getStdin = dist_default3(async () => {
|
|
@@ -2572,7 +2773,13 @@ function isFunction4(value) {
|
|
|
2572
2773
|
var normalizePathSeparatorsToPosix = (() => {
|
|
2573
2774
|
if (path6.sep === "\\") {
|
|
2574
2775
|
return (filePath) => {
|
|
2575
|
-
return
|
|
2776
|
+
return method_replace_all_default(
|
|
2777
|
+
/* OPTIONAL_OBJECT: false */
|
|
2778
|
+
0,
|
|
2779
|
+
filePath,
|
|
2780
|
+
"\\",
|
|
2781
|
+
"/"
|
|
2782
|
+
);
|
|
2576
2783
|
};
|
|
2577
2784
|
} else {
|
|
2578
2785
|
return identity3;
|