@yamada-ui/cli 2.1.3-dev-20260330060256 → 2.1.4
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/dist/index.mjs +374 -379
- package/package.json +3 -5
package/dist/index.mjs
CHANGED
|
@@ -4,35 +4,32 @@ import checkNode from "cli-check-node";
|
|
|
4
4
|
import { Command } from "commander";
|
|
5
5
|
import c from "picocolors";
|
|
6
6
|
import process$1, { env } from "node:process";
|
|
7
|
-
import { spawn } from "node:child_process";
|
|
7
|
+
import { execFile, spawn } from "node:child_process";
|
|
8
8
|
import { fileURLToPath } from "node:url";
|
|
9
9
|
import path from "node:path";
|
|
10
10
|
import { format, promisify } from "node:util";
|
|
11
|
-
import os from "node:os";
|
|
12
|
-
import
|
|
13
|
-
import { promisify as promisify$1 } from "util";
|
|
14
|
-
import os$1, { tmpdir } from "os";
|
|
11
|
+
import os, { tmpdir } from "node:os";
|
|
12
|
+
import os$1 from "os";
|
|
15
13
|
import path$1 from "path";
|
|
16
|
-
import fs
|
|
14
|
+
import fs, { existsSync, realpathSync, statSync } from "node:fs";
|
|
17
15
|
import tty from "node:tty";
|
|
18
16
|
import semverDiff from "semver/functions/diff.js";
|
|
19
17
|
import semverGt from "semver/functions/gt.js";
|
|
20
18
|
import semver from "semver";
|
|
21
19
|
import boxen from "boxen";
|
|
22
20
|
import { getObject, isArray, isObject, isString, isUndefined, merge, omitObject, toArray } from "@yamada-ui/utils";
|
|
23
|
-
import { glob, mkdir, mkdtemp, readFile, readdir, writeFile } from "fs/promises";
|
|
24
21
|
import { Listr } from "listr2";
|
|
22
|
+
import { glob, mkdir, mkdtemp, readFile, readdir, writeFile } from "node:fs/promises";
|
|
25
23
|
import ora from "ora";
|
|
26
24
|
import prompts from "prompts";
|
|
27
25
|
import "validate-npm-package-name";
|
|
28
26
|
import YAML from "yamljs";
|
|
29
|
-
import { execFile } from "child_process";
|
|
30
27
|
import { ESLint } from "eslint";
|
|
31
28
|
import { format as format$1, resolveConfig, resolveConfigFile } from "prettier";
|
|
32
29
|
import { transform } from "sucrase";
|
|
33
30
|
import { build } from "esbuild";
|
|
34
31
|
import nodeEval from "node-eval";
|
|
35
|
-
import { Script } from "vm";
|
|
32
|
+
import { Script } from "node:vm";
|
|
36
33
|
import { HttpsProxyAgent } from "https-proxy-agent";
|
|
37
34
|
import fetch from "node-fetch";
|
|
38
35
|
import { rimraf } from "rimraf";
|
|
@@ -90,47 +87,47 @@ var require_polyfills$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
90
87
|
if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir);
|
|
91
88
|
}
|
|
92
89
|
module.exports = patch;
|
|
93
|
-
function patch(fs$
|
|
94
|
-
if (constants$1.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) patchLchmod(fs$
|
|
95
|
-
if (!fs$
|
|
96
|
-
fs$
|
|
97
|
-
fs$
|
|
98
|
-
fs$
|
|
99
|
-
fs$
|
|
100
|
-
fs$
|
|
101
|
-
fs$
|
|
102
|
-
fs$
|
|
103
|
-
fs$
|
|
104
|
-
fs$
|
|
105
|
-
fs$
|
|
106
|
-
fs$
|
|
107
|
-
fs$
|
|
108
|
-
fs$
|
|
109
|
-
fs$
|
|
110
|
-
fs$
|
|
111
|
-
fs$
|
|
112
|
-
fs$
|
|
113
|
-
fs$
|
|
114
|
-
if (fs$
|
|
115
|
-
fs$
|
|
90
|
+
function patch(fs$8) {
|
|
91
|
+
if (constants$1.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) patchLchmod(fs$8);
|
|
92
|
+
if (!fs$8.lutimes) patchLutimes(fs$8);
|
|
93
|
+
fs$8.chown = chownFix(fs$8.chown);
|
|
94
|
+
fs$8.fchown = chownFix(fs$8.fchown);
|
|
95
|
+
fs$8.lchown = chownFix(fs$8.lchown);
|
|
96
|
+
fs$8.chmod = chmodFix(fs$8.chmod);
|
|
97
|
+
fs$8.fchmod = chmodFix(fs$8.fchmod);
|
|
98
|
+
fs$8.lchmod = chmodFix(fs$8.lchmod);
|
|
99
|
+
fs$8.chownSync = chownFixSync(fs$8.chownSync);
|
|
100
|
+
fs$8.fchownSync = chownFixSync(fs$8.fchownSync);
|
|
101
|
+
fs$8.lchownSync = chownFixSync(fs$8.lchownSync);
|
|
102
|
+
fs$8.chmodSync = chmodFixSync(fs$8.chmodSync);
|
|
103
|
+
fs$8.fchmodSync = chmodFixSync(fs$8.fchmodSync);
|
|
104
|
+
fs$8.lchmodSync = chmodFixSync(fs$8.lchmodSync);
|
|
105
|
+
fs$8.stat = statFix(fs$8.stat);
|
|
106
|
+
fs$8.fstat = statFix(fs$8.fstat);
|
|
107
|
+
fs$8.lstat = statFix(fs$8.lstat);
|
|
108
|
+
fs$8.statSync = statFixSync(fs$8.statSync);
|
|
109
|
+
fs$8.fstatSync = statFixSync(fs$8.fstatSync);
|
|
110
|
+
fs$8.lstatSync = statFixSync(fs$8.lstatSync);
|
|
111
|
+
if (fs$8.chmod && !fs$8.lchmod) {
|
|
112
|
+
fs$8.lchmod = function(path$9, mode, cb) {
|
|
116
113
|
if (cb) process.nextTick(cb);
|
|
117
114
|
};
|
|
118
|
-
fs$
|
|
115
|
+
fs$8.lchmodSync = function() {};
|
|
119
116
|
}
|
|
120
|
-
if (fs$
|
|
121
|
-
fs$
|
|
117
|
+
if (fs$8.chown && !fs$8.lchown) {
|
|
118
|
+
fs$8.lchown = function(path$9, uid, gid, cb) {
|
|
122
119
|
if (cb) process.nextTick(cb);
|
|
123
120
|
};
|
|
124
|
-
fs$
|
|
121
|
+
fs$8.lchownSync = function() {};
|
|
125
122
|
}
|
|
126
|
-
if (platform === "win32") fs$
|
|
123
|
+
if (platform === "win32") fs$8.rename = typeof fs$8.rename !== "function" ? fs$8.rename : (function(fs$rename) {
|
|
127
124
|
function rename(from, to, cb) {
|
|
128
125
|
var start = Date.now();
|
|
129
126
|
var backoff = 0;
|
|
130
127
|
fs$rename(from, to, function CB(er) {
|
|
131
128
|
if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start < 6e4) {
|
|
132
129
|
setTimeout(function() {
|
|
133
|
-
fs$
|
|
130
|
+
fs$8.stat(to, function(stater, st) {
|
|
134
131
|
if (stater && stater.code === "ENOENT") fs$rename(from, to, CB);
|
|
135
132
|
else cb(er);
|
|
136
133
|
});
|
|
@@ -143,8 +140,8 @@ var require_polyfills$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
143
140
|
}
|
|
144
141
|
if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename);
|
|
145
142
|
return rename;
|
|
146
|
-
})(fs$
|
|
147
|
-
fs$
|
|
143
|
+
})(fs$8.rename);
|
|
144
|
+
fs$8.read = typeof fs$8.read !== "function" ? fs$8.read : (function(fs$read) {
|
|
148
145
|
function read(fd, buffer, offset, length, position, callback_) {
|
|
149
146
|
var callback;
|
|
150
147
|
if (callback_ && typeof callback_ === "function") {
|
|
@@ -152,21 +149,21 @@ var require_polyfills$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
152
149
|
callback = function(er, _, __) {
|
|
153
150
|
if (er && er.code === "EAGAIN" && eagCounter < 10) {
|
|
154
151
|
eagCounter++;
|
|
155
|
-
return fs$read.call(fs$
|
|
152
|
+
return fs$read.call(fs$8, fd, buffer, offset, length, position, callback);
|
|
156
153
|
}
|
|
157
154
|
callback_.apply(this, arguments);
|
|
158
155
|
};
|
|
159
156
|
}
|
|
160
|
-
return fs$read.call(fs$
|
|
157
|
+
return fs$read.call(fs$8, fd, buffer, offset, length, position, callback);
|
|
161
158
|
}
|
|
162
159
|
if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read);
|
|
163
160
|
return read;
|
|
164
|
-
})(fs$
|
|
165
|
-
fs$
|
|
161
|
+
})(fs$8.read);
|
|
162
|
+
fs$8.readSync = typeof fs$8.readSync !== "function" ? fs$8.readSync : (function(fs$readSync) {
|
|
166
163
|
return function(fd, buffer, offset, length, position) {
|
|
167
164
|
var eagCounter = 0;
|
|
168
165
|
while (true) try {
|
|
169
|
-
return fs$readSync.call(fs$
|
|
166
|
+
return fs$readSync.call(fs$8, fd, buffer, offset, length, position);
|
|
170
167
|
} catch (er) {
|
|
171
168
|
if (er.code === "EAGAIN" && eagCounter < 10) {
|
|
172
169
|
eagCounter++;
|
|
@@ -175,78 +172,78 @@ var require_polyfills$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
175
172
|
throw er;
|
|
176
173
|
}
|
|
177
174
|
};
|
|
178
|
-
})(fs$
|
|
179
|
-
function patchLchmod(fs$
|
|
180
|
-
fs$
|
|
181
|
-
fs$
|
|
175
|
+
})(fs$8.readSync);
|
|
176
|
+
function patchLchmod(fs$9) {
|
|
177
|
+
fs$9.lchmod = function(path$9, mode, callback) {
|
|
178
|
+
fs$9.open(path$9, constants$1.O_WRONLY | constants$1.O_SYMLINK, mode, function(err, fd) {
|
|
182
179
|
if (err) {
|
|
183
180
|
if (callback) callback(err);
|
|
184
181
|
return;
|
|
185
182
|
}
|
|
186
|
-
fs$
|
|
187
|
-
fs$
|
|
183
|
+
fs$9.fchmod(fd, mode, function(err$1) {
|
|
184
|
+
fs$9.close(fd, function(err2) {
|
|
188
185
|
if (callback) callback(err$1 || err2);
|
|
189
186
|
});
|
|
190
187
|
});
|
|
191
188
|
});
|
|
192
189
|
};
|
|
193
|
-
fs$
|
|
194
|
-
var fd = fs$
|
|
190
|
+
fs$9.lchmodSync = function(path$9, mode) {
|
|
191
|
+
var fd = fs$9.openSync(path$9, constants$1.O_WRONLY | constants$1.O_SYMLINK, mode);
|
|
195
192
|
var threw = true;
|
|
196
193
|
var ret;
|
|
197
194
|
try {
|
|
198
|
-
ret = fs$
|
|
195
|
+
ret = fs$9.fchmodSync(fd, mode);
|
|
199
196
|
threw = false;
|
|
200
197
|
} finally {
|
|
201
198
|
if (threw) try {
|
|
202
|
-
fs$
|
|
199
|
+
fs$9.closeSync(fd);
|
|
203
200
|
} catch (er) {}
|
|
204
|
-
else fs$
|
|
201
|
+
else fs$9.closeSync(fd);
|
|
205
202
|
}
|
|
206
203
|
return ret;
|
|
207
204
|
};
|
|
208
205
|
}
|
|
209
|
-
function patchLutimes(fs$
|
|
210
|
-
if (constants$1.hasOwnProperty("O_SYMLINK") && fs$
|
|
211
|
-
fs$
|
|
212
|
-
fs$
|
|
206
|
+
function patchLutimes(fs$9) {
|
|
207
|
+
if (constants$1.hasOwnProperty("O_SYMLINK") && fs$9.futimes) {
|
|
208
|
+
fs$9.lutimes = function(path$9, at, mt, cb) {
|
|
209
|
+
fs$9.open(path$9, constants$1.O_SYMLINK, function(er, fd) {
|
|
213
210
|
if (er) {
|
|
214
211
|
if (cb) cb(er);
|
|
215
212
|
return;
|
|
216
213
|
}
|
|
217
|
-
fs$
|
|
218
|
-
fs$
|
|
214
|
+
fs$9.futimes(fd, at, mt, function(er$1) {
|
|
215
|
+
fs$9.close(fd, function(er2) {
|
|
219
216
|
if (cb) cb(er$1 || er2);
|
|
220
217
|
});
|
|
221
218
|
});
|
|
222
219
|
});
|
|
223
220
|
};
|
|
224
|
-
fs$
|
|
225
|
-
var fd = fs$
|
|
221
|
+
fs$9.lutimesSync = function(path$9, at, mt) {
|
|
222
|
+
var fd = fs$9.openSync(path$9, constants$1.O_SYMLINK);
|
|
226
223
|
var ret;
|
|
227
224
|
var threw = true;
|
|
228
225
|
try {
|
|
229
|
-
ret = fs$
|
|
226
|
+
ret = fs$9.futimesSync(fd, at, mt);
|
|
230
227
|
threw = false;
|
|
231
228
|
} finally {
|
|
232
229
|
if (threw) try {
|
|
233
|
-
fs$
|
|
230
|
+
fs$9.closeSync(fd);
|
|
234
231
|
} catch (er) {}
|
|
235
|
-
else fs$
|
|
232
|
+
else fs$9.closeSync(fd);
|
|
236
233
|
}
|
|
237
234
|
return ret;
|
|
238
235
|
};
|
|
239
|
-
} else if (fs$
|
|
240
|
-
fs$
|
|
236
|
+
} else if (fs$9.futimes) {
|
|
237
|
+
fs$9.lutimes = function(_a, _b, _c, cb) {
|
|
241
238
|
if (cb) process.nextTick(cb);
|
|
242
239
|
};
|
|
243
|
-
fs$
|
|
240
|
+
fs$9.lutimesSync = function() {};
|
|
244
241
|
}
|
|
245
242
|
}
|
|
246
243
|
function chmodFix(orig) {
|
|
247
244
|
if (!orig) return orig;
|
|
248
245
|
return function(target, mode, cb) {
|
|
249
|
-
return orig.call(fs$
|
|
246
|
+
return orig.call(fs$8, target, mode, function(er) {
|
|
250
247
|
if (chownErOk(er)) er = null;
|
|
251
248
|
if (cb) cb.apply(this, arguments);
|
|
252
249
|
});
|
|
@@ -256,7 +253,7 @@ var require_polyfills$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
256
253
|
if (!orig) return orig;
|
|
257
254
|
return function(target, mode) {
|
|
258
255
|
try {
|
|
259
|
-
return orig.call(fs$
|
|
256
|
+
return orig.call(fs$8, target, mode);
|
|
260
257
|
} catch (er) {
|
|
261
258
|
if (!chownErOk(er)) throw er;
|
|
262
259
|
}
|
|
@@ -265,7 +262,7 @@ var require_polyfills$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
265
262
|
function chownFix(orig) {
|
|
266
263
|
if (!orig) return orig;
|
|
267
264
|
return function(target, uid, gid, cb) {
|
|
268
|
-
return orig.call(fs$
|
|
265
|
+
return orig.call(fs$8, target, uid, gid, function(er) {
|
|
269
266
|
if (chownErOk(er)) er = null;
|
|
270
267
|
if (cb) cb.apply(this, arguments);
|
|
271
268
|
});
|
|
@@ -275,7 +272,7 @@ var require_polyfills$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
275
272
|
if (!orig) return orig;
|
|
276
273
|
return function(target, uid, gid) {
|
|
277
274
|
try {
|
|
278
|
-
return orig.call(fs$
|
|
275
|
+
return orig.call(fs$8, target, uid, gid);
|
|
279
276
|
} catch (er) {
|
|
280
277
|
if (!chownErOk(er)) throw er;
|
|
281
278
|
}
|
|
@@ -295,13 +292,13 @@ var require_polyfills$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
295
292
|
}
|
|
296
293
|
if (cb) cb.apply(this, arguments);
|
|
297
294
|
}
|
|
298
|
-
return options ? orig.call(fs$
|
|
295
|
+
return options ? orig.call(fs$8, target, options, callback) : orig.call(fs$8, target, callback);
|
|
299
296
|
};
|
|
300
297
|
}
|
|
301
298
|
function statFixSync(orig) {
|
|
302
299
|
if (!orig) return orig;
|
|
303
300
|
return function(target, options) {
|
|
304
|
-
var stats = options ? orig.call(fs$
|
|
301
|
+
var stats = options ? orig.call(fs$8, target, options) : orig.call(fs$8, target);
|
|
305
302
|
if (stats) {
|
|
306
303
|
if (stats.uid < 0) stats.uid += 4294967296;
|
|
307
304
|
if (stats.gid < 0) stats.gid += 4294967296;
|
|
@@ -325,7 +322,7 @@ var require_polyfills$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
325
322
|
var require_legacy_streams$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
326
323
|
var Stream$2 = __require("stream").Stream;
|
|
327
324
|
module.exports = legacy;
|
|
328
|
-
function legacy(fs$
|
|
325
|
+
function legacy(fs$8) {
|
|
329
326
|
return {
|
|
330
327
|
ReadStream,
|
|
331
328
|
WriteStream
|
|
@@ -361,7 +358,7 @@ var require_legacy_streams$1 = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
361
358
|
});
|
|
362
359
|
return;
|
|
363
360
|
}
|
|
364
|
-
fs$
|
|
361
|
+
fs$8.open(this.path, this.flags, this.mode, function(err, fd) {
|
|
365
362
|
if (err) {
|
|
366
363
|
self.emit("error", err);
|
|
367
364
|
self.readable = false;
|
|
@@ -396,7 +393,7 @@ var require_legacy_streams$1 = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
396
393
|
this.busy = false;
|
|
397
394
|
this._queue = [];
|
|
398
395
|
if (this.fd === null) {
|
|
399
|
-
this._open = fs$
|
|
396
|
+
this._open = fs$8.open;
|
|
400
397
|
this._queue.push([
|
|
401
398
|
this._open,
|
|
402
399
|
this.path,
|
|
@@ -431,7 +428,7 @@ var require_clone$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
431
428
|
//#endregion
|
|
432
429
|
//#region ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js
|
|
433
430
|
var require_graceful_fs$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
434
|
-
var fs$
|
|
431
|
+
var fs$7 = __require("fs");
|
|
435
432
|
var polyfills = require_polyfills$1();
|
|
436
433
|
var legacy = require_legacy_streams$1();
|
|
437
434
|
var clone = require_clone$1();
|
|
@@ -460,44 +457,44 @@ var require_graceful_fs$1 = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
460
457
|
m = "GFS4: " + m.split(/\n/).join("\nGFS4: ");
|
|
461
458
|
console.error(m);
|
|
462
459
|
};
|
|
463
|
-
if (!fs$
|
|
464
|
-
publishQueue(fs$
|
|
465
|
-
fs$
|
|
460
|
+
if (!fs$7[gracefulQueue]) {
|
|
461
|
+
publishQueue(fs$7, global[gracefulQueue] || []);
|
|
462
|
+
fs$7.close = (function(fs$close) {
|
|
466
463
|
function close(fd, cb) {
|
|
467
|
-
return fs$close.call(fs$
|
|
464
|
+
return fs$close.call(fs$7, fd, function(err) {
|
|
468
465
|
if (!err) resetQueue();
|
|
469
466
|
if (typeof cb === "function") cb.apply(this, arguments);
|
|
470
467
|
});
|
|
471
468
|
}
|
|
472
469
|
Object.defineProperty(close, previousSymbol, { value: fs$close });
|
|
473
470
|
return close;
|
|
474
|
-
})(fs$
|
|
475
|
-
fs$
|
|
471
|
+
})(fs$7.close);
|
|
472
|
+
fs$7.closeSync = (function(fs$closeSync) {
|
|
476
473
|
function closeSync(fd) {
|
|
477
|
-
fs$closeSync.apply(fs$
|
|
474
|
+
fs$closeSync.apply(fs$7, arguments);
|
|
478
475
|
resetQueue();
|
|
479
476
|
}
|
|
480
477
|
Object.defineProperty(closeSync, previousSymbol, { value: fs$closeSync });
|
|
481
478
|
return closeSync;
|
|
482
|
-
})(fs$
|
|
479
|
+
})(fs$7.closeSync);
|
|
483
480
|
if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) process.on("exit", function() {
|
|
484
|
-
debug(fs$
|
|
485
|
-
__require("assert").equal(fs$
|
|
481
|
+
debug(fs$7[gracefulQueue]);
|
|
482
|
+
__require("assert").equal(fs$7[gracefulQueue].length, 0);
|
|
486
483
|
});
|
|
487
484
|
}
|
|
488
|
-
if (!global[gracefulQueue]) publishQueue(global, fs$
|
|
489
|
-
module.exports = patch(clone(fs$
|
|
490
|
-
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs$
|
|
491
|
-
module.exports = patch(fs$
|
|
492
|
-
fs$
|
|
493
|
-
}
|
|
494
|
-
function patch(fs$
|
|
495
|
-
polyfills(fs$
|
|
496
|
-
fs$
|
|
497
|
-
fs$
|
|
498
|
-
fs$
|
|
499
|
-
var fs$readFile = fs$
|
|
500
|
-
fs$
|
|
485
|
+
if (!global[gracefulQueue]) publishQueue(global, fs$7[gracefulQueue]);
|
|
486
|
+
module.exports = patch(clone(fs$7));
|
|
487
|
+
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs$7.__patched) {
|
|
488
|
+
module.exports = patch(fs$7);
|
|
489
|
+
fs$7.__patched = true;
|
|
490
|
+
}
|
|
491
|
+
function patch(fs$8) {
|
|
492
|
+
polyfills(fs$8);
|
|
493
|
+
fs$8.gracefulify = patch;
|
|
494
|
+
fs$8.createReadStream = createReadStream;
|
|
495
|
+
fs$8.createWriteStream = createWriteStream;
|
|
496
|
+
var fs$readFile = fs$8.readFile;
|
|
497
|
+
fs$8.readFile = readFile$1;
|
|
501
498
|
function readFile$1(path$9, options, cb) {
|
|
502
499
|
if (typeof options === "function") cb = options, options = null;
|
|
503
500
|
return go$readFile(path$9, options, cb);
|
|
@@ -518,8 +515,8 @@ var require_graceful_fs$1 = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
518
515
|
});
|
|
519
516
|
}
|
|
520
517
|
}
|
|
521
|
-
var fs$writeFile = fs$
|
|
522
|
-
fs$
|
|
518
|
+
var fs$writeFile = fs$8.writeFile;
|
|
519
|
+
fs$8.writeFile = writeFile$2;
|
|
523
520
|
function writeFile$2(path$9, data, options, cb) {
|
|
524
521
|
if (typeof options === "function") cb = options, options = null;
|
|
525
522
|
return go$writeFile(path$9, data, options, cb);
|
|
@@ -541,8 +538,8 @@ var require_graceful_fs$1 = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
541
538
|
});
|
|
542
539
|
}
|
|
543
540
|
}
|
|
544
|
-
var fs$appendFile = fs$
|
|
545
|
-
if (fs$appendFile) fs$
|
|
541
|
+
var fs$appendFile = fs$8.appendFile;
|
|
542
|
+
if (fs$appendFile) fs$8.appendFile = appendFile;
|
|
546
543
|
function appendFile(path$9, data, options, cb) {
|
|
547
544
|
if (typeof options === "function") cb = options, options = null;
|
|
548
545
|
return go$appendFile(path$9, data, options, cb);
|
|
@@ -564,8 +561,8 @@ var require_graceful_fs$1 = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
564
561
|
});
|
|
565
562
|
}
|
|
566
563
|
}
|
|
567
|
-
var fs$copyFile = fs$
|
|
568
|
-
if (fs$copyFile) fs$
|
|
564
|
+
var fs$copyFile = fs$8.copyFile;
|
|
565
|
+
if (fs$copyFile) fs$8.copyFile = copyFile;
|
|
569
566
|
function copyFile(src, dest, flags, cb) {
|
|
570
567
|
if (typeof flags === "function") {
|
|
571
568
|
cb = flags;
|
|
@@ -590,8 +587,8 @@ var require_graceful_fs$1 = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
590
587
|
});
|
|
591
588
|
}
|
|
592
589
|
}
|
|
593
|
-
var fs$readdir = fs$
|
|
594
|
-
fs$
|
|
590
|
+
var fs$readdir = fs$8.readdir;
|
|
591
|
+
fs$8.readdir = readdir$1;
|
|
595
592
|
var noReaddirOptionVersions = /^v[0-5]\./;
|
|
596
593
|
function readdir$1(path$9, options, cb) {
|
|
597
594
|
if (typeof options === "function") cb = options, options = null;
|
|
@@ -622,21 +619,21 @@ var require_graceful_fs$1 = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
622
619
|
}
|
|
623
620
|
}
|
|
624
621
|
if (process.version.substr(0, 4) === "v0.8") {
|
|
625
|
-
var legStreams = legacy(fs$
|
|
622
|
+
var legStreams = legacy(fs$8);
|
|
626
623
|
ReadStream = legStreams.ReadStream;
|
|
627
624
|
WriteStream = legStreams.WriteStream;
|
|
628
625
|
}
|
|
629
|
-
var fs$ReadStream = fs$
|
|
626
|
+
var fs$ReadStream = fs$8.ReadStream;
|
|
630
627
|
if (fs$ReadStream) {
|
|
631
628
|
ReadStream.prototype = Object.create(fs$ReadStream.prototype);
|
|
632
629
|
ReadStream.prototype.open = ReadStream$open;
|
|
633
630
|
}
|
|
634
|
-
var fs$WriteStream = fs$
|
|
631
|
+
var fs$WriteStream = fs$8.WriteStream;
|
|
635
632
|
if (fs$WriteStream) {
|
|
636
633
|
WriteStream.prototype = Object.create(fs$WriteStream.prototype);
|
|
637
634
|
WriteStream.prototype.open = WriteStream$open;
|
|
638
635
|
}
|
|
639
|
-
Object.defineProperty(fs$
|
|
636
|
+
Object.defineProperty(fs$8, "ReadStream", {
|
|
640
637
|
get: function() {
|
|
641
638
|
return ReadStream;
|
|
642
639
|
},
|
|
@@ -646,7 +643,7 @@ var require_graceful_fs$1 = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
646
643
|
enumerable: true,
|
|
647
644
|
configurable: true
|
|
648
645
|
});
|
|
649
|
-
Object.defineProperty(fs$
|
|
646
|
+
Object.defineProperty(fs$8, "WriteStream", {
|
|
650
647
|
get: function() {
|
|
651
648
|
return WriteStream;
|
|
652
649
|
},
|
|
@@ -657,7 +654,7 @@ var require_graceful_fs$1 = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
657
654
|
configurable: true
|
|
658
655
|
});
|
|
659
656
|
var FileReadStream = ReadStream;
|
|
660
|
-
Object.defineProperty(fs$
|
|
657
|
+
Object.defineProperty(fs$8, "FileReadStream", {
|
|
661
658
|
get: function() {
|
|
662
659
|
return FileReadStream;
|
|
663
660
|
},
|
|
@@ -668,7 +665,7 @@ var require_graceful_fs$1 = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
668
665
|
configurable: true
|
|
669
666
|
});
|
|
670
667
|
var FileWriteStream = WriteStream;
|
|
671
|
-
Object.defineProperty(fs$
|
|
668
|
+
Object.defineProperty(fs$8, "FileWriteStream", {
|
|
672
669
|
get: function() {
|
|
673
670
|
return FileWriteStream;
|
|
674
671
|
},
|
|
@@ -712,13 +709,13 @@ var require_graceful_fs$1 = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
712
709
|
});
|
|
713
710
|
}
|
|
714
711
|
function createReadStream(path$9, options) {
|
|
715
|
-
return new fs$
|
|
712
|
+
return new fs$8.ReadStream(path$9, options);
|
|
716
713
|
}
|
|
717
714
|
function createWriteStream(path$9, options) {
|
|
718
|
-
return new fs$
|
|
715
|
+
return new fs$8.WriteStream(path$9, options);
|
|
719
716
|
}
|
|
720
|
-
var fs$open = fs$
|
|
721
|
-
fs$
|
|
717
|
+
var fs$open = fs$8.open;
|
|
718
|
+
fs$8.open = open;
|
|
722
719
|
function open(path$9, flags, mode, cb) {
|
|
723
720
|
if (typeof mode === "function") cb = mode, mode = null;
|
|
724
721
|
return go$open(path$9, flags, mode, cb);
|
|
@@ -740,27 +737,27 @@ var require_graceful_fs$1 = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
740
737
|
});
|
|
741
738
|
}
|
|
742
739
|
}
|
|
743
|
-
return fs$
|
|
740
|
+
return fs$8;
|
|
744
741
|
}
|
|
745
742
|
function enqueue(elem) {
|
|
746
743
|
debug("ENQUEUE", elem[0].name, elem[1]);
|
|
747
|
-
fs$
|
|
744
|
+
fs$7[gracefulQueue].push(elem);
|
|
748
745
|
retry();
|
|
749
746
|
}
|
|
750
747
|
var retryTimer;
|
|
751
748
|
function resetQueue() {
|
|
752
749
|
var now = Date.now();
|
|
753
|
-
for (var i = 0; i < fs$
|
|
754
|
-
fs$
|
|
755
|
-
fs$
|
|
750
|
+
for (var i = 0; i < fs$7[gracefulQueue].length; ++i) if (fs$7[gracefulQueue][i].length > 2) {
|
|
751
|
+
fs$7[gracefulQueue][i][3] = now;
|
|
752
|
+
fs$7[gracefulQueue][i][4] = now;
|
|
756
753
|
}
|
|
757
754
|
retry();
|
|
758
755
|
}
|
|
759
756
|
function retry() {
|
|
760
757
|
clearTimeout(retryTimer);
|
|
761
758
|
retryTimer = void 0;
|
|
762
|
-
if (fs$
|
|
763
|
-
var elem = fs$
|
|
759
|
+
if (fs$7[gracefulQueue].length === 0) return;
|
|
760
|
+
var elem = fs$7[gracefulQueue].shift();
|
|
764
761
|
var fn = elem[0];
|
|
765
762
|
var args = elem[1];
|
|
766
763
|
var err = elem[2];
|
|
@@ -779,7 +776,7 @@ var require_graceful_fs$1 = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
779
776
|
if (sinceAttempt >= Math.min(sinceStart * 1.2, 100)) {
|
|
780
777
|
debug("RETRY", fn.name, args);
|
|
781
778
|
fn.apply(null, args.concat([startTime]));
|
|
782
|
-
} else fs$
|
|
779
|
+
} else fs$7[gracefulQueue].push(elem);
|
|
783
780
|
}
|
|
784
781
|
if (retryTimer === void 0) retryTimer = setTimeout(retry, 0);
|
|
785
782
|
}
|
|
@@ -907,41 +904,41 @@ const RETRYIFY_OPTIONS = { isRetriable: handlers_default.isRetriableError };
|
|
|
907
904
|
//#region ../../node_modules/.pnpm/stubborn-fs@2.0.0/node_modules/stubborn-fs/dist/index.js
|
|
908
905
|
const FS = {
|
|
909
906
|
attempt: {
|
|
910
|
-
chmod: attemptify_async_default(promisify(fs
|
|
911
|
-
chown: attemptify_async_default(promisify(fs
|
|
912
|
-
close: attemptify_async_default(promisify(fs
|
|
913
|
-
fsync: attemptify_async_default(promisify(fs
|
|
914
|
-
mkdir: attemptify_async_default(promisify(fs
|
|
915
|
-
realpath: attemptify_async_default(promisify(fs
|
|
916
|
-
stat: attemptify_async_default(promisify(fs
|
|
917
|
-
unlink: attemptify_async_default(promisify(fs
|
|
918
|
-
chmodSync: attemptify_sync_default(fs
|
|
919
|
-
chownSync: attemptify_sync_default(fs
|
|
920
|
-
closeSync: attemptify_sync_default(fs
|
|
921
|
-
existsSync: attemptify_sync_default(fs
|
|
922
|
-
fsyncSync: attemptify_sync_default(fs
|
|
923
|
-
mkdirSync: attemptify_sync_default(fs
|
|
924
|
-
realpathSync: attemptify_sync_default(fs
|
|
925
|
-
statSync: attemptify_sync_default(fs
|
|
926
|
-
unlinkSync: attemptify_sync_default(fs
|
|
907
|
+
chmod: attemptify_async_default(promisify(fs.chmod), ATTEMPTIFY_CHANGE_ERROR_OPTIONS),
|
|
908
|
+
chown: attemptify_async_default(promisify(fs.chown), ATTEMPTIFY_CHANGE_ERROR_OPTIONS),
|
|
909
|
+
close: attemptify_async_default(promisify(fs.close), ATTEMPTIFY_NOOP_OPTIONS),
|
|
910
|
+
fsync: attemptify_async_default(promisify(fs.fsync), ATTEMPTIFY_NOOP_OPTIONS),
|
|
911
|
+
mkdir: attemptify_async_default(promisify(fs.mkdir), ATTEMPTIFY_NOOP_OPTIONS),
|
|
912
|
+
realpath: attemptify_async_default(promisify(fs.realpath), ATTEMPTIFY_NOOP_OPTIONS),
|
|
913
|
+
stat: attemptify_async_default(promisify(fs.stat), ATTEMPTIFY_NOOP_OPTIONS),
|
|
914
|
+
unlink: attemptify_async_default(promisify(fs.unlink), ATTEMPTIFY_NOOP_OPTIONS),
|
|
915
|
+
chmodSync: attemptify_sync_default(fs.chmodSync, ATTEMPTIFY_CHANGE_ERROR_OPTIONS),
|
|
916
|
+
chownSync: attemptify_sync_default(fs.chownSync, ATTEMPTIFY_CHANGE_ERROR_OPTIONS),
|
|
917
|
+
closeSync: attemptify_sync_default(fs.closeSync, ATTEMPTIFY_NOOP_OPTIONS),
|
|
918
|
+
existsSync: attemptify_sync_default(fs.existsSync, ATTEMPTIFY_NOOP_OPTIONS),
|
|
919
|
+
fsyncSync: attemptify_sync_default(fs.fsync, ATTEMPTIFY_NOOP_OPTIONS),
|
|
920
|
+
mkdirSync: attemptify_sync_default(fs.mkdirSync, ATTEMPTIFY_NOOP_OPTIONS),
|
|
921
|
+
realpathSync: attemptify_sync_default(fs.realpathSync, ATTEMPTIFY_NOOP_OPTIONS),
|
|
922
|
+
statSync: attemptify_sync_default(fs.statSync, ATTEMPTIFY_NOOP_OPTIONS),
|
|
923
|
+
unlinkSync: attemptify_sync_default(fs.unlinkSync, ATTEMPTIFY_NOOP_OPTIONS)
|
|
927
924
|
},
|
|
928
925
|
retry: {
|
|
929
|
-
close: retryify_async_default(promisify(fs
|
|
930
|
-
fsync: retryify_async_default(promisify(fs
|
|
931
|
-
open: retryify_async_default(promisify(fs
|
|
932
|
-
readFile: retryify_async_default(promisify(fs
|
|
933
|
-
rename: retryify_async_default(promisify(fs
|
|
934
|
-
stat: retryify_async_default(promisify(fs
|
|
935
|
-
write: retryify_async_default(promisify(fs
|
|
936
|
-
writeFile: retryify_async_default(promisify(fs
|
|
937
|
-
closeSync: retryify_sync_default(fs
|
|
938
|
-
fsyncSync: retryify_sync_default(fs
|
|
939
|
-
openSync: retryify_sync_default(fs
|
|
940
|
-
readFileSync: retryify_sync_default(fs
|
|
941
|
-
renameSync: retryify_sync_default(fs
|
|
942
|
-
statSync: retryify_sync_default(fs
|
|
943
|
-
writeSync: retryify_sync_default(fs
|
|
944
|
-
writeFileSync: retryify_sync_default(fs
|
|
926
|
+
close: retryify_async_default(promisify(fs.close), RETRYIFY_OPTIONS),
|
|
927
|
+
fsync: retryify_async_default(promisify(fs.fsync), RETRYIFY_OPTIONS),
|
|
928
|
+
open: retryify_async_default(promisify(fs.open), RETRYIFY_OPTIONS),
|
|
929
|
+
readFile: retryify_async_default(promisify(fs.readFile), RETRYIFY_OPTIONS),
|
|
930
|
+
rename: retryify_async_default(promisify(fs.rename), RETRYIFY_OPTIONS),
|
|
931
|
+
stat: retryify_async_default(promisify(fs.stat), RETRYIFY_OPTIONS),
|
|
932
|
+
write: retryify_async_default(promisify(fs.write), RETRYIFY_OPTIONS),
|
|
933
|
+
writeFile: retryify_async_default(promisify(fs.writeFile), RETRYIFY_OPTIONS),
|
|
934
|
+
closeSync: retryify_sync_default(fs.closeSync, RETRYIFY_OPTIONS),
|
|
935
|
+
fsyncSync: retryify_sync_default(fs.fsyncSync, RETRYIFY_OPTIONS),
|
|
936
|
+
openSync: retryify_sync_default(fs.openSync, RETRYIFY_OPTIONS),
|
|
937
|
+
readFileSync: retryify_sync_default(fs.readFileSync, RETRYIFY_OPTIONS),
|
|
938
|
+
renameSync: retryify_sync_default(fs.renameSync, RETRYIFY_OPTIONS),
|
|
939
|
+
statSync: retryify_sync_default(fs.statSync, RETRYIFY_OPTIONS),
|
|
940
|
+
writeSync: retryify_sync_default(fs.writeSync, RETRYIFY_OPTIONS),
|
|
941
|
+
writeFileSync: retryify_sync_default(fs.writeFileSync, RETRYIFY_OPTIONS)
|
|
945
942
|
}
|
|
946
943
|
};
|
|
947
944
|
var dist_default = FS;
|
|
@@ -2782,7 +2779,7 @@ var require_strip_json_comments = /* @__PURE__ */ __commonJSMin(((exports, modul
|
|
|
2782
2779
|
//#endregion
|
|
2783
2780
|
//#region ../../node_modules/.pnpm/rc@1.2.8/node_modules/rc/lib/utils.js
|
|
2784
2781
|
var require_utils = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
2785
|
-
var fs$
|
|
2782
|
+
var fs$5 = __require("fs");
|
|
2786
2783
|
var ini = require_ini$1();
|
|
2787
2784
|
var path$8 = __require("path");
|
|
2788
2785
|
var stripJsonComments = require_strip_json_comments();
|
|
@@ -2797,7 +2794,7 @@ var require_utils = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
2797
2794
|
for (var i in args) if ("string" !== typeof args[i]) return;
|
|
2798
2795
|
var file = path$8.join.apply(null, args);
|
|
2799
2796
|
try {
|
|
2800
|
-
return fs$
|
|
2797
|
+
return fs$5.readFileSync(file, "utf-8");
|
|
2801
2798
|
} catch (err) {
|
|
2802
2799
|
return;
|
|
2803
2800
|
}
|
|
@@ -2829,7 +2826,7 @@ var require_utils = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
2829
2826
|
function find(start, rel$1) {
|
|
2830
2827
|
var file = path$8.join(start, rel$1);
|
|
2831
2828
|
try {
|
|
2832
|
-
fs$
|
|
2829
|
+
fs$5.statSync(file);
|
|
2833
2830
|
return file;
|
|
2834
2831
|
} catch (err) {
|
|
2835
2832
|
if (path$8.dirname(start) !== start) return find(path$8.dirname(start), rel$1);
|
|
@@ -3187,47 +3184,47 @@ var require_polyfills = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3187
3184
|
if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir);
|
|
3188
3185
|
}
|
|
3189
3186
|
module.exports = patch;
|
|
3190
|
-
function patch(fs$
|
|
3191
|
-
if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) patchLchmod(fs$
|
|
3192
|
-
if (!fs$
|
|
3193
|
-
fs$
|
|
3194
|
-
fs$
|
|
3195
|
-
fs$
|
|
3196
|
-
fs$
|
|
3197
|
-
fs$
|
|
3198
|
-
fs$
|
|
3199
|
-
fs$
|
|
3200
|
-
fs$
|
|
3201
|
-
fs$
|
|
3202
|
-
fs$
|
|
3203
|
-
fs$
|
|
3204
|
-
fs$
|
|
3205
|
-
fs$
|
|
3206
|
-
fs$
|
|
3207
|
-
fs$
|
|
3208
|
-
fs$
|
|
3209
|
-
fs$
|
|
3210
|
-
fs$
|
|
3211
|
-
if (fs$
|
|
3212
|
-
fs$
|
|
3187
|
+
function patch(fs$8) {
|
|
3188
|
+
if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) patchLchmod(fs$8);
|
|
3189
|
+
if (!fs$8.lutimes) patchLutimes(fs$8);
|
|
3190
|
+
fs$8.chown = chownFix(fs$8.chown);
|
|
3191
|
+
fs$8.fchown = chownFix(fs$8.fchown);
|
|
3192
|
+
fs$8.lchown = chownFix(fs$8.lchown);
|
|
3193
|
+
fs$8.chmod = chmodFix(fs$8.chmod);
|
|
3194
|
+
fs$8.fchmod = chmodFix(fs$8.fchmod);
|
|
3195
|
+
fs$8.lchmod = chmodFix(fs$8.lchmod);
|
|
3196
|
+
fs$8.chownSync = chownFixSync(fs$8.chownSync);
|
|
3197
|
+
fs$8.fchownSync = chownFixSync(fs$8.fchownSync);
|
|
3198
|
+
fs$8.lchownSync = chownFixSync(fs$8.lchownSync);
|
|
3199
|
+
fs$8.chmodSync = chmodFixSync(fs$8.chmodSync);
|
|
3200
|
+
fs$8.fchmodSync = chmodFixSync(fs$8.fchmodSync);
|
|
3201
|
+
fs$8.lchmodSync = chmodFixSync(fs$8.lchmodSync);
|
|
3202
|
+
fs$8.stat = statFix(fs$8.stat);
|
|
3203
|
+
fs$8.fstat = statFix(fs$8.fstat);
|
|
3204
|
+
fs$8.lstat = statFix(fs$8.lstat);
|
|
3205
|
+
fs$8.statSync = statFixSync(fs$8.statSync);
|
|
3206
|
+
fs$8.fstatSync = statFixSync(fs$8.fstatSync);
|
|
3207
|
+
fs$8.lstatSync = statFixSync(fs$8.lstatSync);
|
|
3208
|
+
if (fs$8.chmod && !fs$8.lchmod) {
|
|
3209
|
+
fs$8.lchmod = function(path$9, mode, cb) {
|
|
3213
3210
|
if (cb) process.nextTick(cb);
|
|
3214
3211
|
};
|
|
3215
|
-
fs$
|
|
3212
|
+
fs$8.lchmodSync = function() {};
|
|
3216
3213
|
}
|
|
3217
|
-
if (fs$
|
|
3218
|
-
fs$
|
|
3214
|
+
if (fs$8.chown && !fs$8.lchown) {
|
|
3215
|
+
fs$8.lchown = function(path$9, uid, gid, cb) {
|
|
3219
3216
|
if (cb) process.nextTick(cb);
|
|
3220
3217
|
};
|
|
3221
|
-
fs$
|
|
3218
|
+
fs$8.lchownSync = function() {};
|
|
3222
3219
|
}
|
|
3223
|
-
if (platform === "win32") fs$
|
|
3220
|
+
if (platform === "win32") fs$8.rename = typeof fs$8.rename !== "function" ? fs$8.rename : (function(fs$rename) {
|
|
3224
3221
|
function rename(from, to, cb) {
|
|
3225
3222
|
var start = Date.now();
|
|
3226
3223
|
var backoff = 0;
|
|
3227
3224
|
fs$rename(from, to, function CB(er) {
|
|
3228
3225
|
if (er && (er.code === "EACCES" || er.code === "EPERM") && Date.now() - start < 6e4) {
|
|
3229
3226
|
setTimeout(function() {
|
|
3230
|
-
fs$
|
|
3227
|
+
fs$8.stat(to, function(stater, st) {
|
|
3231
3228
|
if (stater && stater.code === "ENOENT") fs$rename(from, to, CB);
|
|
3232
3229
|
else cb(er);
|
|
3233
3230
|
});
|
|
@@ -3240,8 +3237,8 @@ var require_polyfills = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3240
3237
|
}
|
|
3241
3238
|
if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename);
|
|
3242
3239
|
return rename;
|
|
3243
|
-
})(fs$
|
|
3244
|
-
fs$
|
|
3240
|
+
})(fs$8.rename);
|
|
3241
|
+
fs$8.read = typeof fs$8.read !== "function" ? fs$8.read : (function(fs$read) {
|
|
3245
3242
|
function read(fd, buffer, offset, length, position, callback_) {
|
|
3246
3243
|
var callback;
|
|
3247
3244
|
if (callback_ && typeof callback_ === "function") {
|
|
@@ -3249,21 +3246,21 @@ var require_polyfills = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3249
3246
|
callback = function(er, _, __) {
|
|
3250
3247
|
if (er && er.code === "EAGAIN" && eagCounter < 10) {
|
|
3251
3248
|
eagCounter++;
|
|
3252
|
-
return fs$read.call(fs$
|
|
3249
|
+
return fs$read.call(fs$8, fd, buffer, offset, length, position, callback);
|
|
3253
3250
|
}
|
|
3254
3251
|
callback_.apply(this, arguments);
|
|
3255
3252
|
};
|
|
3256
3253
|
}
|
|
3257
|
-
return fs$read.call(fs$
|
|
3254
|
+
return fs$read.call(fs$8, fd, buffer, offset, length, position, callback);
|
|
3258
3255
|
}
|
|
3259
3256
|
if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read);
|
|
3260
3257
|
return read;
|
|
3261
|
-
})(fs$
|
|
3262
|
-
fs$
|
|
3258
|
+
})(fs$8.read);
|
|
3259
|
+
fs$8.readSync = typeof fs$8.readSync !== "function" ? fs$8.readSync : (function(fs$readSync) {
|
|
3263
3260
|
return function(fd, buffer, offset, length, position) {
|
|
3264
3261
|
var eagCounter = 0;
|
|
3265
3262
|
while (true) try {
|
|
3266
|
-
return fs$readSync.call(fs$
|
|
3263
|
+
return fs$readSync.call(fs$8, fd, buffer, offset, length, position);
|
|
3267
3264
|
} catch (er) {
|
|
3268
3265
|
if (er.code === "EAGAIN" && eagCounter < 10) {
|
|
3269
3266
|
eagCounter++;
|
|
@@ -3272,78 +3269,78 @@ var require_polyfills = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3272
3269
|
throw er;
|
|
3273
3270
|
}
|
|
3274
3271
|
};
|
|
3275
|
-
})(fs$
|
|
3276
|
-
function patchLchmod(fs$
|
|
3277
|
-
fs$
|
|
3278
|
-
fs$
|
|
3272
|
+
})(fs$8.readSync);
|
|
3273
|
+
function patchLchmod(fs$9) {
|
|
3274
|
+
fs$9.lchmod = function(path$9, mode, callback) {
|
|
3275
|
+
fs$9.open(path$9, constants.O_WRONLY | constants.O_SYMLINK, mode, function(err, fd) {
|
|
3279
3276
|
if (err) {
|
|
3280
3277
|
if (callback) callback(err);
|
|
3281
3278
|
return;
|
|
3282
3279
|
}
|
|
3283
|
-
fs$
|
|
3284
|
-
fs$
|
|
3280
|
+
fs$9.fchmod(fd, mode, function(err$1) {
|
|
3281
|
+
fs$9.close(fd, function(err2) {
|
|
3285
3282
|
if (callback) callback(err$1 || err2);
|
|
3286
3283
|
});
|
|
3287
3284
|
});
|
|
3288
3285
|
});
|
|
3289
3286
|
};
|
|
3290
|
-
fs$
|
|
3291
|
-
var fd = fs$
|
|
3287
|
+
fs$9.lchmodSync = function(path$9, mode) {
|
|
3288
|
+
var fd = fs$9.openSync(path$9, constants.O_WRONLY | constants.O_SYMLINK, mode);
|
|
3292
3289
|
var threw = true;
|
|
3293
3290
|
var ret;
|
|
3294
3291
|
try {
|
|
3295
|
-
ret = fs$
|
|
3292
|
+
ret = fs$9.fchmodSync(fd, mode);
|
|
3296
3293
|
threw = false;
|
|
3297
3294
|
} finally {
|
|
3298
3295
|
if (threw) try {
|
|
3299
|
-
fs$
|
|
3296
|
+
fs$9.closeSync(fd);
|
|
3300
3297
|
} catch (er) {}
|
|
3301
|
-
else fs$
|
|
3298
|
+
else fs$9.closeSync(fd);
|
|
3302
3299
|
}
|
|
3303
3300
|
return ret;
|
|
3304
3301
|
};
|
|
3305
3302
|
}
|
|
3306
|
-
function patchLutimes(fs$
|
|
3307
|
-
if (constants.hasOwnProperty("O_SYMLINK") && fs$
|
|
3308
|
-
fs$
|
|
3309
|
-
fs$
|
|
3303
|
+
function patchLutimes(fs$9) {
|
|
3304
|
+
if (constants.hasOwnProperty("O_SYMLINK") && fs$9.futimes) {
|
|
3305
|
+
fs$9.lutimes = function(path$9, at, mt, cb) {
|
|
3306
|
+
fs$9.open(path$9, constants.O_SYMLINK, function(er, fd) {
|
|
3310
3307
|
if (er) {
|
|
3311
3308
|
if (cb) cb(er);
|
|
3312
3309
|
return;
|
|
3313
3310
|
}
|
|
3314
|
-
fs$
|
|
3315
|
-
fs$
|
|
3311
|
+
fs$9.futimes(fd, at, mt, function(er$1) {
|
|
3312
|
+
fs$9.close(fd, function(er2) {
|
|
3316
3313
|
if (cb) cb(er$1 || er2);
|
|
3317
3314
|
});
|
|
3318
3315
|
});
|
|
3319
3316
|
});
|
|
3320
3317
|
};
|
|
3321
|
-
fs$
|
|
3322
|
-
var fd = fs$
|
|
3318
|
+
fs$9.lutimesSync = function(path$9, at, mt) {
|
|
3319
|
+
var fd = fs$9.openSync(path$9, constants.O_SYMLINK);
|
|
3323
3320
|
var ret;
|
|
3324
3321
|
var threw = true;
|
|
3325
3322
|
try {
|
|
3326
|
-
ret = fs$
|
|
3323
|
+
ret = fs$9.futimesSync(fd, at, mt);
|
|
3327
3324
|
threw = false;
|
|
3328
3325
|
} finally {
|
|
3329
3326
|
if (threw) try {
|
|
3330
|
-
fs$
|
|
3327
|
+
fs$9.closeSync(fd);
|
|
3331
3328
|
} catch (er) {}
|
|
3332
|
-
else fs$
|
|
3329
|
+
else fs$9.closeSync(fd);
|
|
3333
3330
|
}
|
|
3334
3331
|
return ret;
|
|
3335
3332
|
};
|
|
3336
|
-
} else if (fs$
|
|
3337
|
-
fs$
|
|
3333
|
+
} else if (fs$9.futimes) {
|
|
3334
|
+
fs$9.lutimes = function(_a, _b, _c, cb) {
|
|
3338
3335
|
if (cb) process.nextTick(cb);
|
|
3339
3336
|
};
|
|
3340
|
-
fs$
|
|
3337
|
+
fs$9.lutimesSync = function() {};
|
|
3341
3338
|
}
|
|
3342
3339
|
}
|
|
3343
3340
|
function chmodFix(orig) {
|
|
3344
3341
|
if (!orig) return orig;
|
|
3345
3342
|
return function(target, mode, cb) {
|
|
3346
|
-
return orig.call(fs$
|
|
3343
|
+
return orig.call(fs$8, target, mode, function(er) {
|
|
3347
3344
|
if (chownErOk(er)) er = null;
|
|
3348
3345
|
if (cb) cb.apply(this, arguments);
|
|
3349
3346
|
});
|
|
@@ -3353,7 +3350,7 @@ var require_polyfills = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3353
3350
|
if (!orig) return orig;
|
|
3354
3351
|
return function(target, mode) {
|
|
3355
3352
|
try {
|
|
3356
|
-
return orig.call(fs$
|
|
3353
|
+
return orig.call(fs$8, target, mode);
|
|
3357
3354
|
} catch (er) {
|
|
3358
3355
|
if (!chownErOk(er)) throw er;
|
|
3359
3356
|
}
|
|
@@ -3362,7 +3359,7 @@ var require_polyfills = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3362
3359
|
function chownFix(orig) {
|
|
3363
3360
|
if (!orig) return orig;
|
|
3364
3361
|
return function(target, uid, gid, cb) {
|
|
3365
|
-
return orig.call(fs$
|
|
3362
|
+
return orig.call(fs$8, target, uid, gid, function(er) {
|
|
3366
3363
|
if (chownErOk(er)) er = null;
|
|
3367
3364
|
if (cb) cb.apply(this, arguments);
|
|
3368
3365
|
});
|
|
@@ -3372,7 +3369,7 @@ var require_polyfills = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3372
3369
|
if (!orig) return orig;
|
|
3373
3370
|
return function(target, uid, gid) {
|
|
3374
3371
|
try {
|
|
3375
|
-
return orig.call(fs$
|
|
3372
|
+
return orig.call(fs$8, target, uid, gid);
|
|
3376
3373
|
} catch (er) {
|
|
3377
3374
|
if (!chownErOk(er)) throw er;
|
|
3378
3375
|
}
|
|
@@ -3392,13 +3389,13 @@ var require_polyfills = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3392
3389
|
}
|
|
3393
3390
|
if (cb) cb.apply(this, arguments);
|
|
3394
3391
|
}
|
|
3395
|
-
return options ? orig.call(fs$
|
|
3392
|
+
return options ? orig.call(fs$8, target, options, callback) : orig.call(fs$8, target, callback);
|
|
3396
3393
|
};
|
|
3397
3394
|
}
|
|
3398
3395
|
function statFixSync(orig) {
|
|
3399
3396
|
if (!orig) return orig;
|
|
3400
3397
|
return function(target, options) {
|
|
3401
|
-
var stats = options ? orig.call(fs$
|
|
3398
|
+
var stats = options ? orig.call(fs$8, target, options) : orig.call(fs$8, target);
|
|
3402
3399
|
if (stats) {
|
|
3403
3400
|
if (stats.uid < 0) stats.uid += 4294967296;
|
|
3404
3401
|
if (stats.gid < 0) stats.gid += 4294967296;
|
|
@@ -3422,7 +3419,7 @@ var require_polyfills = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3422
3419
|
var require_legacy_streams = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3423
3420
|
var Stream$1 = __require("stream").Stream;
|
|
3424
3421
|
module.exports = legacy;
|
|
3425
|
-
function legacy(fs$
|
|
3422
|
+
function legacy(fs$8) {
|
|
3426
3423
|
return {
|
|
3427
3424
|
ReadStream,
|
|
3428
3425
|
WriteStream
|
|
@@ -3458,7 +3455,7 @@ var require_legacy_streams = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
3458
3455
|
});
|
|
3459
3456
|
return;
|
|
3460
3457
|
}
|
|
3461
|
-
fs$
|
|
3458
|
+
fs$8.open(this.path, this.flags, this.mode, function(err, fd) {
|
|
3462
3459
|
if (err) {
|
|
3463
3460
|
self.emit("error", err);
|
|
3464
3461
|
self.readable = false;
|
|
@@ -3493,7 +3490,7 @@ var require_legacy_streams = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
3493
3490
|
this.busy = false;
|
|
3494
3491
|
this._queue = [];
|
|
3495
3492
|
if (this.fd === null) {
|
|
3496
|
-
this._open = fs$
|
|
3493
|
+
this._open = fs$8.open;
|
|
3497
3494
|
this._queue.push([
|
|
3498
3495
|
this._open,
|
|
3499
3496
|
this.path,
|
|
@@ -3528,7 +3525,7 @@ var require_clone = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3528
3525
|
//#endregion
|
|
3529
3526
|
//#region ../../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/graceful-fs.js
|
|
3530
3527
|
var require_graceful_fs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3531
|
-
var fs$
|
|
3528
|
+
var fs$4 = __require("fs");
|
|
3532
3529
|
var polyfills = require_polyfills();
|
|
3533
3530
|
var legacy = require_legacy_streams();
|
|
3534
3531
|
var clone = require_clone();
|
|
@@ -3557,44 +3554,44 @@ var require_graceful_fs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3557
3554
|
m = "GFS4: " + m.split(/\n/).join("\nGFS4: ");
|
|
3558
3555
|
console.error(m);
|
|
3559
3556
|
};
|
|
3560
|
-
if (!fs$
|
|
3561
|
-
publishQueue(fs$
|
|
3562
|
-
fs$
|
|
3557
|
+
if (!fs$4[gracefulQueue]) {
|
|
3558
|
+
publishQueue(fs$4, global[gracefulQueue] || []);
|
|
3559
|
+
fs$4.close = (function(fs$close) {
|
|
3563
3560
|
function close(fd, cb) {
|
|
3564
|
-
return fs$close.call(fs$
|
|
3561
|
+
return fs$close.call(fs$4, fd, function(err) {
|
|
3565
3562
|
if (!err) resetQueue();
|
|
3566
3563
|
if (typeof cb === "function") cb.apply(this, arguments);
|
|
3567
3564
|
});
|
|
3568
3565
|
}
|
|
3569
3566
|
Object.defineProperty(close, previousSymbol, { value: fs$close });
|
|
3570
3567
|
return close;
|
|
3571
|
-
})(fs$
|
|
3572
|
-
fs$
|
|
3568
|
+
})(fs$4.close);
|
|
3569
|
+
fs$4.closeSync = (function(fs$closeSync) {
|
|
3573
3570
|
function closeSync(fd) {
|
|
3574
|
-
fs$closeSync.apply(fs$
|
|
3571
|
+
fs$closeSync.apply(fs$4, arguments);
|
|
3575
3572
|
resetQueue();
|
|
3576
3573
|
}
|
|
3577
3574
|
Object.defineProperty(closeSync, previousSymbol, { value: fs$closeSync });
|
|
3578
3575
|
return closeSync;
|
|
3579
|
-
})(fs$
|
|
3576
|
+
})(fs$4.closeSync);
|
|
3580
3577
|
if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) process.on("exit", function() {
|
|
3581
|
-
debug(fs$
|
|
3582
|
-
__require("assert").equal(fs$
|
|
3578
|
+
debug(fs$4[gracefulQueue]);
|
|
3579
|
+
__require("assert").equal(fs$4[gracefulQueue].length, 0);
|
|
3583
3580
|
});
|
|
3584
3581
|
}
|
|
3585
|
-
if (!global[gracefulQueue]) publishQueue(global, fs$
|
|
3586
|
-
module.exports = patch(clone(fs$
|
|
3587
|
-
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs$
|
|
3588
|
-
module.exports = patch(fs$
|
|
3589
|
-
fs$
|
|
3590
|
-
}
|
|
3591
|
-
function patch(fs$
|
|
3592
|
-
polyfills(fs$
|
|
3593
|
-
fs$
|
|
3594
|
-
fs$
|
|
3595
|
-
fs$
|
|
3596
|
-
var fs$readFile = fs$
|
|
3597
|
-
fs$
|
|
3582
|
+
if (!global[gracefulQueue]) publishQueue(global, fs$4[gracefulQueue]);
|
|
3583
|
+
module.exports = patch(clone(fs$4));
|
|
3584
|
+
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs$4.__patched) {
|
|
3585
|
+
module.exports = patch(fs$4);
|
|
3586
|
+
fs$4.__patched = true;
|
|
3587
|
+
}
|
|
3588
|
+
function patch(fs$8) {
|
|
3589
|
+
polyfills(fs$8);
|
|
3590
|
+
fs$8.gracefulify = patch;
|
|
3591
|
+
fs$8.createReadStream = createReadStream;
|
|
3592
|
+
fs$8.createWriteStream = createWriteStream;
|
|
3593
|
+
var fs$readFile = fs$8.readFile;
|
|
3594
|
+
fs$8.readFile = readFile$1;
|
|
3598
3595
|
function readFile$1(path$9, options, cb) {
|
|
3599
3596
|
if (typeof options === "function") cb = options, options = null;
|
|
3600
3597
|
return go$readFile(path$9, options, cb);
|
|
@@ -3615,8 +3612,8 @@ var require_graceful_fs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3615
3612
|
});
|
|
3616
3613
|
}
|
|
3617
3614
|
}
|
|
3618
|
-
var fs$writeFile = fs$
|
|
3619
|
-
fs$
|
|
3615
|
+
var fs$writeFile = fs$8.writeFile;
|
|
3616
|
+
fs$8.writeFile = writeFile$2;
|
|
3620
3617
|
function writeFile$2(path$9, data, options, cb) {
|
|
3621
3618
|
if (typeof options === "function") cb = options, options = null;
|
|
3622
3619
|
return go$writeFile(path$9, data, options, cb);
|
|
@@ -3638,8 +3635,8 @@ var require_graceful_fs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3638
3635
|
});
|
|
3639
3636
|
}
|
|
3640
3637
|
}
|
|
3641
|
-
var fs$appendFile = fs$
|
|
3642
|
-
if (fs$appendFile) fs$
|
|
3638
|
+
var fs$appendFile = fs$8.appendFile;
|
|
3639
|
+
if (fs$appendFile) fs$8.appendFile = appendFile;
|
|
3643
3640
|
function appendFile(path$9, data, options, cb) {
|
|
3644
3641
|
if (typeof options === "function") cb = options, options = null;
|
|
3645
3642
|
return go$appendFile(path$9, data, options, cb);
|
|
@@ -3661,8 +3658,8 @@ var require_graceful_fs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3661
3658
|
});
|
|
3662
3659
|
}
|
|
3663
3660
|
}
|
|
3664
|
-
var fs$copyFile = fs$
|
|
3665
|
-
if (fs$copyFile) fs$
|
|
3661
|
+
var fs$copyFile = fs$8.copyFile;
|
|
3662
|
+
if (fs$copyFile) fs$8.copyFile = copyFile;
|
|
3666
3663
|
function copyFile(src, dest, flags, cb) {
|
|
3667
3664
|
if (typeof flags === "function") {
|
|
3668
3665
|
cb = flags;
|
|
@@ -3687,8 +3684,8 @@ var require_graceful_fs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3687
3684
|
});
|
|
3688
3685
|
}
|
|
3689
3686
|
}
|
|
3690
|
-
var fs$readdir = fs$
|
|
3691
|
-
fs$
|
|
3687
|
+
var fs$readdir = fs$8.readdir;
|
|
3688
|
+
fs$8.readdir = readdir$1;
|
|
3692
3689
|
var noReaddirOptionVersions = /^v[0-5]\./;
|
|
3693
3690
|
function readdir$1(path$9, options, cb) {
|
|
3694
3691
|
if (typeof options === "function") cb = options, options = null;
|
|
@@ -3719,21 +3716,21 @@ var require_graceful_fs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3719
3716
|
}
|
|
3720
3717
|
}
|
|
3721
3718
|
if (process.version.substr(0, 4) === "v0.8") {
|
|
3722
|
-
var legStreams = legacy(fs$
|
|
3719
|
+
var legStreams = legacy(fs$8);
|
|
3723
3720
|
ReadStream = legStreams.ReadStream;
|
|
3724
3721
|
WriteStream = legStreams.WriteStream;
|
|
3725
3722
|
}
|
|
3726
|
-
var fs$ReadStream = fs$
|
|
3723
|
+
var fs$ReadStream = fs$8.ReadStream;
|
|
3727
3724
|
if (fs$ReadStream) {
|
|
3728
3725
|
ReadStream.prototype = Object.create(fs$ReadStream.prototype);
|
|
3729
3726
|
ReadStream.prototype.open = ReadStream$open;
|
|
3730
3727
|
}
|
|
3731
|
-
var fs$WriteStream = fs$
|
|
3728
|
+
var fs$WriteStream = fs$8.WriteStream;
|
|
3732
3729
|
if (fs$WriteStream) {
|
|
3733
3730
|
WriteStream.prototype = Object.create(fs$WriteStream.prototype);
|
|
3734
3731
|
WriteStream.prototype.open = WriteStream$open;
|
|
3735
3732
|
}
|
|
3736
|
-
Object.defineProperty(fs$
|
|
3733
|
+
Object.defineProperty(fs$8, "ReadStream", {
|
|
3737
3734
|
get: function() {
|
|
3738
3735
|
return ReadStream;
|
|
3739
3736
|
},
|
|
@@ -3743,7 +3740,7 @@ var require_graceful_fs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3743
3740
|
enumerable: true,
|
|
3744
3741
|
configurable: true
|
|
3745
3742
|
});
|
|
3746
|
-
Object.defineProperty(fs$
|
|
3743
|
+
Object.defineProperty(fs$8, "WriteStream", {
|
|
3747
3744
|
get: function() {
|
|
3748
3745
|
return WriteStream;
|
|
3749
3746
|
},
|
|
@@ -3754,7 +3751,7 @@ var require_graceful_fs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3754
3751
|
configurable: true
|
|
3755
3752
|
});
|
|
3756
3753
|
var FileReadStream = ReadStream;
|
|
3757
|
-
Object.defineProperty(fs$
|
|
3754
|
+
Object.defineProperty(fs$8, "FileReadStream", {
|
|
3758
3755
|
get: function() {
|
|
3759
3756
|
return FileReadStream;
|
|
3760
3757
|
},
|
|
@@ -3765,7 +3762,7 @@ var require_graceful_fs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3765
3762
|
configurable: true
|
|
3766
3763
|
});
|
|
3767
3764
|
var FileWriteStream = WriteStream;
|
|
3768
|
-
Object.defineProperty(fs$
|
|
3765
|
+
Object.defineProperty(fs$8, "FileWriteStream", {
|
|
3769
3766
|
get: function() {
|
|
3770
3767
|
return FileWriteStream;
|
|
3771
3768
|
},
|
|
@@ -3809,13 +3806,13 @@ var require_graceful_fs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3809
3806
|
});
|
|
3810
3807
|
}
|
|
3811
3808
|
function createReadStream(path$9, options) {
|
|
3812
|
-
return new fs$
|
|
3809
|
+
return new fs$8.ReadStream(path$9, options);
|
|
3813
3810
|
}
|
|
3814
3811
|
function createWriteStream(path$9, options) {
|
|
3815
|
-
return new fs$
|
|
3812
|
+
return new fs$8.WriteStream(path$9, options);
|
|
3816
3813
|
}
|
|
3817
|
-
var fs$open = fs$
|
|
3818
|
-
fs$
|
|
3814
|
+
var fs$open = fs$8.open;
|
|
3815
|
+
fs$8.open = open;
|
|
3819
3816
|
function open(path$9, flags, mode, cb) {
|
|
3820
3817
|
if (typeof mode === "function") cb = mode, mode = null;
|
|
3821
3818
|
return go$open(path$9, flags, mode, cb);
|
|
@@ -3837,27 +3834,27 @@ var require_graceful_fs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3837
3834
|
});
|
|
3838
3835
|
}
|
|
3839
3836
|
}
|
|
3840
|
-
return fs$
|
|
3837
|
+
return fs$8;
|
|
3841
3838
|
}
|
|
3842
3839
|
function enqueue(elem) {
|
|
3843
3840
|
debug("ENQUEUE", elem[0].name, elem[1]);
|
|
3844
|
-
fs$
|
|
3841
|
+
fs$4[gracefulQueue].push(elem);
|
|
3845
3842
|
retry();
|
|
3846
3843
|
}
|
|
3847
3844
|
var retryTimer;
|
|
3848
3845
|
function resetQueue() {
|
|
3849
3846
|
var now = Date.now();
|
|
3850
|
-
for (var i = 0; i < fs$
|
|
3851
|
-
fs$
|
|
3852
|
-
fs$
|
|
3847
|
+
for (var i = 0; i < fs$4[gracefulQueue].length; ++i) if (fs$4[gracefulQueue][i].length > 2) {
|
|
3848
|
+
fs$4[gracefulQueue][i][3] = now;
|
|
3849
|
+
fs$4[gracefulQueue][i][4] = now;
|
|
3853
3850
|
}
|
|
3854
3851
|
retry();
|
|
3855
3852
|
}
|
|
3856
3853
|
function retry() {
|
|
3857
3854
|
clearTimeout(retryTimer);
|
|
3858
3855
|
retryTimer = void 0;
|
|
3859
|
-
if (fs$
|
|
3860
|
-
var elem = fs$
|
|
3856
|
+
if (fs$4[gracefulQueue].length === 0) return;
|
|
3857
|
+
var elem = fs$4[gracefulQueue].shift();
|
|
3861
3858
|
var fn = elem[0];
|
|
3862
3859
|
var args = elem[1];
|
|
3863
3860
|
var err = elem[2];
|
|
@@ -3876,7 +3873,7 @@ var require_graceful_fs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3876
3873
|
if (sinceAttempt >= Math.min(sinceStart * 1.2, 100)) {
|
|
3877
3874
|
debug("RETRY", fn.name, args);
|
|
3878
3875
|
fn.apply(null, args.concat([startTime]));
|
|
3879
|
-
} else fs$
|
|
3876
|
+
} else fs$4[gracefulQueue].push(elem);
|
|
3880
3877
|
}
|
|
3881
3878
|
if (retryTimer === void 0) retryTimer = setTimeout(retry, 0);
|
|
3882
3879
|
}
|
|
@@ -4023,7 +4020,7 @@ var require_proto_list = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4023
4020
|
//#region ../../node_modules/.pnpm/config-chain@1.1.13/node_modules/config-chain/index.js
|
|
4024
4021
|
var require_config_chain = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4025
4022
|
init_esm_shims();
|
|
4026
|
-
var ProtoList = require_proto_list(), path$7 = __require("path"), fs$
|
|
4023
|
+
var ProtoList = require_proto_list(), path$7 = __require("path"), fs$3 = __require("fs"), ini$1 = require_ini$1(), EE = __require("events").EventEmitter, url$1 = __require("url"), http = __require("http");
|
|
4027
4024
|
var exports = module.exports = function() {
|
|
4028
4025
|
var args = [].slice.call(arguments), conf = new ConfigChain();
|
|
4029
4026
|
while (args.length) {
|
|
@@ -4037,7 +4034,7 @@ var require_config_chain = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4037
4034
|
function find(start, rel$1) {
|
|
4038
4035
|
var file = path$7.join(start, rel$1);
|
|
4039
4036
|
try {
|
|
4040
|
-
fs$
|
|
4037
|
+
fs$3.statSync(file);
|
|
4041
4038
|
return file;
|
|
4042
4039
|
} catch (err) {
|
|
4043
4040
|
if (path$7.dirname(start) !== start) return find(path$7.dirname(start), rel$1);
|
|
@@ -4067,7 +4064,7 @@ var require_config_chain = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4067
4064
|
var file = path$7.join.apply(null, args);
|
|
4068
4065
|
var content;
|
|
4069
4066
|
try {
|
|
4070
|
-
content = fs$
|
|
4067
|
+
content = fs$3.readFileSync(file, "utf-8");
|
|
4071
4068
|
} catch (err) {
|
|
4072
4069
|
return;
|
|
4073
4070
|
}
|
|
@@ -4140,7 +4137,7 @@ var require_config_chain = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4140
4137
|
if (target.type === "json") data = JSON.stringify(data);
|
|
4141
4138
|
else data = ini$1.stringify(data);
|
|
4142
4139
|
this._saving++;
|
|
4143
|
-
fs$
|
|
4140
|
+
fs$3.writeFile(target.path, data, "utf8", function(er) {
|
|
4144
4141
|
this._saving--;
|
|
4145
4142
|
if (er) if (cb) return cb(er);
|
|
4146
4143
|
else return this.emit("error", er);
|
|
@@ -4160,7 +4157,7 @@ var require_config_chain = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4160
4157
|
};
|
|
4161
4158
|
this.push(marker);
|
|
4162
4159
|
this._await();
|
|
4163
|
-
fs$
|
|
4160
|
+
fs$3.readFile(file, "utf8", function(er, data) {
|
|
4164
4161
|
if (er) this.emit("error", er);
|
|
4165
4162
|
this.addString(data, file, type$1, marker);
|
|
4166
4163
|
}.bind(this));
|
|
@@ -4294,7 +4291,7 @@ var require_dist = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
4294
4291
|
//#endregion
|
|
4295
4292
|
//#region ../../node_modules/.pnpm/@pnpm+npm-conf@3.0.2/node_modules/@pnpm/npm-conf/lib/util.js
|
|
4296
4293
|
var require_util = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
4297
|
-
const fs$
|
|
4294
|
+
const fs$2 = __require("fs");
|
|
4298
4295
|
const path$6 = __require("path");
|
|
4299
4296
|
const { envReplace } = require_dist();
|
|
4300
4297
|
const parseKey = (key) => {
|
|
@@ -4342,7 +4339,7 @@ var require_util = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
4342
4339
|
const find = (name$2, original) => {
|
|
4343
4340
|
if (name$2 === "/" || process.platform === "win32" && /^[a-zA-Z]:(\\|\/)?$/.test(name$2)) return original;
|
|
4344
4341
|
try {
|
|
4345
|
-
const files$1 = fs$
|
|
4342
|
+
const files$1 = fs$2.readdirSync(name$2);
|
|
4346
4343
|
if (files$1.includes("node_modules") || files$1.includes("package.json") || files$1.includes("package.json5") || files$1.includes("package.yaml") || files$1.includes("pnpm-workspace.yaml")) return name$2;
|
|
4347
4344
|
const dirname = path$6.dirname(name$2);
|
|
4348
4345
|
if (dirname === name$2) return original;
|
|
@@ -4553,7 +4550,7 @@ var require_types = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
4553
4550
|
//#region ../../node_modules/.pnpm/@pnpm+npm-conf@3.0.2/node_modules/@pnpm/npm-conf/lib/conf.js
|
|
4554
4551
|
var require_conf = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4555
4552
|
const { readCAFileSync } = require_dist$1();
|
|
4556
|
-
const fs$
|
|
4553
|
+
const fs$1 = __require("fs");
|
|
4557
4554
|
const path$4 = __require("path");
|
|
4558
4555
|
const { ConfigChain } = require_config_chain();
|
|
4559
4556
|
const envKeyToSetting = require_envKeyToSetting();
|
|
@@ -4586,7 +4583,7 @@ var require_conf = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4586
4583
|
this.push(marker);
|
|
4587
4584
|
this._await();
|
|
4588
4585
|
try {
|
|
4589
|
-
const contents = fs$
|
|
4586
|
+
const contents = fs$1.readFileSync(file, "utf8");
|
|
4590
4587
|
this.addString(contents, file, "ini", marker);
|
|
4591
4588
|
} catch (error) {
|
|
4592
4589
|
if (error.code === "ENOENT") this.add({}, marker);
|
|
@@ -4657,7 +4654,7 @@ var require_conf = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4657
4654
|
}
|
|
4658
4655
|
const prefix = path$4.resolve(this.get("prefix"));
|
|
4659
4656
|
try {
|
|
4660
|
-
defConf.user = fs$
|
|
4657
|
+
defConf.user = fs$1.statSync(prefix).uid;
|
|
4661
4658
|
} catch (error) {
|
|
4662
4659
|
if (error.code === "ENOENT") return;
|
|
4663
4660
|
throw error;
|
|
@@ -5223,7 +5220,7 @@ var import_ini = /* @__PURE__ */ __toESM(require_ini(), 1);
|
|
|
5223
5220
|
const isWindows = process$1.platform === "win32";
|
|
5224
5221
|
const readRc = (filePath) => {
|
|
5225
5222
|
try {
|
|
5226
|
-
return import_ini.default.parse(fs
|
|
5223
|
+
return import_ini.default.parse(fs.readFileSync(filePath, "utf8")).prefix;
|
|
5227
5224
|
} catch {}
|
|
5228
5225
|
};
|
|
5229
5226
|
const getEnvNpmPrefix = () => Object.keys(process$1.env).reduce((prefix, name$1) => /^npm_config_prefix$/i.test(name$1) ? process$1.env[name$1] : prefix, void 0);
|
|
@@ -5259,7 +5256,7 @@ const npmPrefix = path.resolve(getNpmPrefix());
|
|
|
5259
5256
|
const getYarnWindowsDirectory = () => {
|
|
5260
5257
|
if (isWindows && process$1.env.LOCALAPPDATA) {
|
|
5261
5258
|
const dir = path.join(process$1.env.LOCALAPPDATA, "Yarn");
|
|
5262
|
-
if (fs
|
|
5259
|
+
if (fs.existsSync(dir)) return dir;
|
|
5263
5260
|
}
|
|
5264
5261
|
return false;
|
|
5265
5262
|
};
|
|
@@ -5268,9 +5265,9 @@ const getYarnPrefix = () => {
|
|
|
5268
5265
|
const windowsPrefix = getYarnWindowsDirectory();
|
|
5269
5266
|
if (windowsPrefix) return windowsPrefix;
|
|
5270
5267
|
const configPrefix = path.join(os.homedir(), ".config/yarn");
|
|
5271
|
-
if (fs
|
|
5268
|
+
if (fs.existsSync(configPrefix)) return configPrefix;
|
|
5272
5269
|
const homePrefix = path.join(os.homedir(), ".yarn-config");
|
|
5273
|
-
if (fs
|
|
5270
|
+
if (fs.existsSync(homePrefix)) return homePrefix;
|
|
5274
5271
|
return npmPrefix;
|
|
5275
5272
|
};
|
|
5276
5273
|
const globalDirectory = {};
|
|
@@ -5297,7 +5294,7 @@ function isPathInside(childPath, parentPath) {
|
|
|
5297
5294
|
const __dirname$1 = path.dirname(fileURLToPath(import.meta.url));
|
|
5298
5295
|
const isInstalledGlobally = (() => {
|
|
5299
5296
|
try {
|
|
5300
|
-
return isPathInside(__dirname$1, global_directory_default.yarn.packages) || isPathInside(__dirname$1, fs
|
|
5297
|
+
return isPathInside(__dirname$1, global_directory_default.yarn.packages) || isPathInside(__dirname$1, fs.realpathSync(global_directory_default.npm.packages));
|
|
5301
5298
|
} catch {
|
|
5302
5299
|
return false;
|
|
5303
5300
|
}
|
|
@@ -5494,7 +5491,7 @@ function updateNotifier(options) {
|
|
|
5494
5491
|
//#endregion
|
|
5495
5492
|
//#region package.json
|
|
5496
5493
|
var name = "@yamada-ui/cli";
|
|
5497
|
-
var version = "2.1.
|
|
5494
|
+
var version = "2.1.3";
|
|
5498
5495
|
var description = "The official CLI for Yamada UI projects";
|
|
5499
5496
|
var package_default = {
|
|
5500
5497
|
name,
|
|
@@ -5544,33 +5541,31 @@ var package_default = {
|
|
|
5544
5541
|
"@yamada-ui/utils": "workspace:*",
|
|
5545
5542
|
"boxen": "^8.0.1",
|
|
5546
5543
|
"cli-check-node": "^1.3.4",
|
|
5547
|
-
"commander": "
|
|
5544
|
+
"commander": "catalog:",
|
|
5548
5545
|
"diff": "^8.0.4",
|
|
5549
5546
|
"esbuild": "^0.27.4",
|
|
5550
|
-
"eslint": "
|
|
5547
|
+
"eslint": "catalog:",
|
|
5551
5548
|
"https-proxy-agent": "^8.0.0",
|
|
5552
5549
|
"listr2": "^10.2.1",
|
|
5553
5550
|
"node-eval": "^2.0.0",
|
|
5554
5551
|
"node-fetch": "^3.3.2",
|
|
5555
|
-
"ora": "
|
|
5556
|
-
"picocolors": "
|
|
5557
|
-
"prettier": "
|
|
5552
|
+
"ora": "catalog:",
|
|
5553
|
+
"picocolors": "catalog:",
|
|
5554
|
+
"prettier": "catalog:",
|
|
5558
5555
|
"prompts": "^2.4.2",
|
|
5559
|
-
"rimraf": "
|
|
5556
|
+
"rimraf": "catalog:",
|
|
5560
5557
|
"semver": "^7.7.4",
|
|
5561
5558
|
"sucrase": "^3.35.1",
|
|
5562
5559
|
"validate-npm-package-name": "^7.0.2",
|
|
5563
|
-
"yamljs": "
|
|
5560
|
+
"yamljs": "catalog:"
|
|
5564
5561
|
},
|
|
5565
5562
|
devDependencies: {
|
|
5566
5563
|
"@types/prompts": "^2.4.9",
|
|
5567
5564
|
"@types/semver": "^7.7.1",
|
|
5568
5565
|
"@types/update-notifier": "6.0.8",
|
|
5569
5566
|
"@types/validate-npm-package-name": "^4.0.2",
|
|
5570
|
-
"@types/yamljs": "
|
|
5571
|
-
"
|
|
5572
|
-
"tsx": "^4.21.0",
|
|
5573
|
-
"typescript": "catalog:",
|
|
5567
|
+
"@types/yamljs": "catalog:",
|
|
5568
|
+
"@yamada-ui/workspace": "workspace:*",
|
|
5574
5569
|
"update-notifier": "^7.3.1"
|
|
5575
5570
|
},
|
|
5576
5571
|
"clean-package": "./clean-package.config.json"
|
|
@@ -5734,7 +5729,7 @@ async function formatFiles(patterns, { enabled = true, ...options } = {}) {
|
|
|
5734
5729
|
//#endregion
|
|
5735
5730
|
//#region src/utils/fs.ts
|
|
5736
5731
|
const cwd = process.env.INIT_CWD ?? process.cwd();
|
|
5737
|
-
const execFileAsync$1 = promisify
|
|
5732
|
+
const execFileAsync$1 = promisify(execFile);
|
|
5738
5733
|
async function isWriteable(directory) {
|
|
5739
5734
|
try {
|
|
5740
5735
|
await fs.promises.access(directory, ("constants" in fs ? fs.constants : fs).W_OK);
|
|
@@ -5752,7 +5747,7 @@ async function writeFile$1(path$9, content, options = {}) {
|
|
|
5752
5747
|
await formatFiles(path$9, options.format);
|
|
5753
5748
|
}
|
|
5754
5749
|
async function writeFileSafe(targetPath, content, options) {
|
|
5755
|
-
const dirPath = path
|
|
5750
|
+
const dirPath = path.dirname(targetPath);
|
|
5756
5751
|
if (!existsSync(dirPath)) await mkdir(dirPath, { recursive: true });
|
|
5757
5752
|
await writeFile$1(targetPath, content, options);
|
|
5758
5753
|
}
|
|
@@ -5782,14 +5777,14 @@ async function getFiles(pattern) {
|
|
|
5782
5777
|
await Promise.all(dirents.map(async (dirent) => {
|
|
5783
5778
|
const name$1 = dirent.name;
|
|
5784
5779
|
if (dirent.isDirectory()) {
|
|
5785
|
-
const dirents$1 = await readdir(path
|
|
5780
|
+
const dirents$1 = await readdir(path.join(dirent.parentPath, name$1), { withFileTypes: true });
|
|
5786
5781
|
await Promise.all(dirents$1.map(async (dirent$1) => {
|
|
5787
5782
|
if (dirent$1.isDirectory()) return;
|
|
5788
5783
|
if (dirent$1.name === REGISTRY_FILE_NAME) return;
|
|
5789
|
-
const data = await readFile(path
|
|
5784
|
+
const data = await readFile(path.join(dirent$1.parentPath, dirent$1.name), "utf-8");
|
|
5790
5785
|
files$1[`${name$1}/${dirent$1.name}`] = data;
|
|
5791
5786
|
}));
|
|
5792
|
-
} else if (name$1 !== REGISTRY_FILE_NAME) files$1[name$1] = await readFile(path
|
|
5787
|
+
} else if (name$1 !== REGISTRY_FILE_NAME) files$1[name$1] = await readFile(path.join(dirent.parentPath, dirent.name), "utf-8");
|
|
5793
5788
|
}));
|
|
5794
5789
|
return {
|
|
5795
5790
|
dirPath,
|
|
@@ -5808,7 +5803,7 @@ function getPackageManager() {
|
|
|
5808
5803
|
}
|
|
5809
5804
|
async function getPackageJson(cwd$1) {
|
|
5810
5805
|
try {
|
|
5811
|
-
const packageJson$2 = await readFile(path
|
|
5806
|
+
const packageJson$2 = await readFile(path.resolve(cwd$1, "package.json"), "utf8");
|
|
5812
5807
|
return JSON.parse(packageJson$2);
|
|
5813
5808
|
} catch {
|
|
5814
5809
|
throw new Error(`No package.json found. Please run ${c.cyan(`${getPackageManager()} init`)}.`);
|
|
@@ -5900,7 +5895,7 @@ async function uninstallDependencies(dependencies$1, { cwd: cwd$1 } = {}) {
|
|
|
5900
5895
|
async function addWorkspace(cwd$1, workspacePath, config$1) {
|
|
5901
5896
|
switch (getPackageManager()) {
|
|
5902
5897
|
case "pnpm": {
|
|
5903
|
-
const targetPath = path
|
|
5898
|
+
const targetPath = path.resolve(cwd$1, "pnpm-workspace.yaml");
|
|
5904
5899
|
if (existsSync(targetPath)) {
|
|
5905
5900
|
const content = await readFile(targetPath, "utf8");
|
|
5906
5901
|
const json = YAML.parse(content);
|
|
@@ -5917,7 +5912,7 @@ async function addWorkspace(cwd$1, workspacePath, config$1) {
|
|
|
5917
5912
|
packageJson$2.workspaces ??= [];
|
|
5918
5913
|
if (!packageJson$2.workspaces.includes(workspacePath)) {
|
|
5919
5914
|
packageJson$2.workspaces.push(workspacePath);
|
|
5920
|
-
await writeFileSafe(path
|
|
5915
|
+
await writeFileSafe(path.resolve(cwd$1, "package.json"), JSON.stringify(packageJson$2), merge(config$1, { format: { parser: "json" } }));
|
|
5921
5916
|
}
|
|
5922
5917
|
break;
|
|
5923
5918
|
}
|
|
@@ -5952,34 +5947,34 @@ function transformTsToJs(content) {
|
|
|
5952
5947
|
//#endregion
|
|
5953
5948
|
//#region src/utils/config.ts
|
|
5954
5949
|
function getPaths(rootPath, jsx) {
|
|
5955
|
-
const srcPath = existsSync(path
|
|
5950
|
+
const srcPath = existsSync(path.resolve(rootPath, "src")) ? path.resolve(rootPath, "src") : rootPath;
|
|
5956
5951
|
return {
|
|
5957
5952
|
src: srcPath,
|
|
5958
|
-
index: path
|
|
5959
|
-
registry: path
|
|
5953
|
+
index: path.resolve(srcPath, transformExtension("index.ts", jsx)),
|
|
5954
|
+
registry: path.resolve(srcPath, REGISTRY_FILE_NAME),
|
|
5960
5955
|
root: rootPath
|
|
5961
5956
|
};
|
|
5962
5957
|
}
|
|
5963
5958
|
async function getConfig(cwd$1, configPath, { format: format$2, jsx, lint } = {}) {
|
|
5964
5959
|
try {
|
|
5965
|
-
const data = await readFile(path
|
|
5960
|
+
const data = await readFile(path.resolve(cwd$1, configPath), "utf-8");
|
|
5966
5961
|
const userConfig = JSON.parse(data);
|
|
5967
5962
|
if (!isUndefined(format$2)) userConfig.format = { enabled: format$2 };
|
|
5968
5963
|
if (!isUndefined(lint)) userConfig.lint = { enabled: lint };
|
|
5969
5964
|
if (!isUndefined(jsx)) userConfig.jsx = jsx;
|
|
5970
5965
|
const paths = {
|
|
5971
|
-
theme: getPaths(path
|
|
5972
|
-
ui: getPaths(path
|
|
5966
|
+
theme: getPaths(path.resolve(cwd$1, userConfig.theme?.path ?? (userConfig.monorepo ? DEFAULT_PATH.theme.monorepo : DEFAULT_PATH.theme.polyrepo)), userConfig.jsx),
|
|
5967
|
+
ui: getPaths(path.resolve(cwd$1, userConfig.path ?? (userConfig.monorepo ? DEFAULT_PATH.ui.monorepo : DEFAULT_PATH.ui.polyrepo)), userConfig.jsx)
|
|
5973
5968
|
};
|
|
5974
5969
|
const sectionMap = Object.fromEntries(SECTION_NAMES.map((section) => {
|
|
5975
5970
|
return [section, (userConfig[section]?.path ?? DEFAULT_PATH[section]).replace(/(\.\.\/|\.\/)/g, "").replace(/(^\/|\/$)/g, "")];
|
|
5976
5971
|
}));
|
|
5977
|
-
if (userConfig.theme?.path) userConfig.theme.path = path
|
|
5972
|
+
if (userConfig.theme?.path) userConfig.theme.path = path.resolve(cwd$1, userConfig.theme.path);
|
|
5978
5973
|
function isSection(section) {
|
|
5979
5974
|
return SECTION_NAMES.includes(section);
|
|
5980
5975
|
}
|
|
5981
5976
|
function getSectionResolvedPath(section) {
|
|
5982
|
-
return path
|
|
5977
|
+
return path.resolve(paths.ui.src, userConfig[section]?.path ?? DEFAULT_PATH[section]);
|
|
5983
5978
|
}
|
|
5984
5979
|
function getSectionPath(section) {
|
|
5985
5980
|
let path$9 = userConfig[section]?.path ?? DEFAULT_PATH[section];
|
|
@@ -6068,11 +6063,11 @@ async function getModule(file, cwd$1) {
|
|
|
6068
6063
|
const agent = process.env.https_proxy ? new HttpsProxyAgent(process.env.https_proxy) : void 0;
|
|
6069
6064
|
const registryStore = /* @__PURE__ */ new Map();
|
|
6070
6065
|
function getRegistryUrl(name$1, tag = "") {
|
|
6071
|
-
if (name$1 === "index") return path
|
|
6072
|
-
else if (name$1 === "theme") return path
|
|
6073
|
-
else if (name$1.startsWith("use-")) return path
|
|
6074
|
-
else if (name$1.endsWith("-provider")) return path
|
|
6075
|
-
else return path
|
|
6066
|
+
if (name$1 === "index") return path.posix.join(REGISTRY_URL, tag, REGISTRY_VERSION, "index.json");
|
|
6067
|
+
else if (name$1 === "theme") return path.posix.join(REGISTRY_URL, tag, REGISTRY_VERSION, "theme.json");
|
|
6068
|
+
else if (name$1.startsWith("use-")) return path.posix.join(REGISTRY_URL, tag, REGISTRY_VERSION, "hooks", `${name$1}.json`);
|
|
6069
|
+
else if (name$1.endsWith("-provider")) return path.posix.join(REGISTRY_URL, tag, REGISTRY_VERSION, "providers", `${name$1}.json`);
|
|
6070
|
+
else return path.posix.join(REGISTRY_URL, tag, REGISTRY_VERSION, "components", `${name$1}.json`);
|
|
6076
6071
|
}
|
|
6077
6072
|
async function fetchRegistryNames(tag) {
|
|
6078
6073
|
const { sources } = await fetchRegistry("index", { tag });
|
|
@@ -6164,16 +6159,16 @@ function transformContent(targetSection, content, { getSection }, generatedNames
|
|
|
6164
6159
|
if (module$1) {
|
|
6165
6160
|
const [section] = value.split("/").slice(-2);
|
|
6166
6161
|
if (!generated || !section) return;
|
|
6167
|
-
if (section === targetSection) replaceValue = `from "${path
|
|
6162
|
+
if (section === targetSection) replaceValue = `from "${path.join("..", name$1)}"`;
|
|
6168
6163
|
else {
|
|
6169
6164
|
const { path: relativePath } = getSection(section) ?? {};
|
|
6170
6165
|
if (!relativePath) return;
|
|
6171
|
-
replaceValue = `from "${path
|
|
6166
|
+
replaceValue = `from "${path.join("..", "..", relativePath, name$1)}"`;
|
|
6172
6167
|
}
|
|
6173
6168
|
} else {
|
|
6174
6169
|
const depth = (value.match(/\.\.\//g) || []).length;
|
|
6175
6170
|
if (!depth) return;
|
|
6176
|
-
if (depth === 1) if (generated) replaceValue = `from "${path
|
|
6171
|
+
if (depth === 1) if (generated) replaceValue = `from "${path.join("..", name$1)}"`;
|
|
6177
6172
|
else replaceValue = `from "${PACKAGE_NAME}/${targetSection}/${name$1}"`;
|
|
6178
6173
|
else {
|
|
6179
6174
|
const { path: sectionPath, section } = getSection(value.replace(/(\.\.\/|\.\/)/g, "").split("/").slice(0, -1).join("/")) ?? {};
|
|
@@ -6243,7 +6238,7 @@ async function transformIndexWithFormatAndLint(content, config$1, generatedNames
|
|
|
6243
6238
|
}
|
|
6244
6239
|
async function generateSource(dirPath, section, { name: fileName, content, data, template }, config$1, generatedNames = []) {
|
|
6245
6240
|
fileName = transformExtension(fileName, config$1.jsx);
|
|
6246
|
-
const targetPath = path
|
|
6241
|
+
const targetPath = path.resolve(dirPath, fileName);
|
|
6247
6242
|
if (content) {
|
|
6248
6243
|
content = transformContent(section, content, config$1, generatedNames);
|
|
6249
6244
|
if (config$1.jsx) content = isJsx(fileName) ? transformTsxToJsx(content) : transformTsToJs(content);
|
|
@@ -6253,11 +6248,11 @@ async function generateSource(dirPath, section, { name: fileName, content, data,
|
|
|
6253
6248
|
let content$1 = transformTemplateContent(template, rest);
|
|
6254
6249
|
content$1 = transformContent(section, content$1, config$1, generatedNames);
|
|
6255
6250
|
if (config$1.jsx) content$1 = isJsx(fileName$1) ? transformTsxToJsx(content$1) : transformTsToJs(content$1);
|
|
6256
|
-
await writeFileSafe(path
|
|
6251
|
+
await writeFileSafe(path.resolve(targetPath, fileName$1), content$1, config$1);
|
|
6257
6252
|
}));
|
|
6258
6253
|
}
|
|
6259
6254
|
async function generateSources(dirPath, registry, config$1, generatedNames = []) {
|
|
6260
|
-
await Promise.all([...registry.sources.map((source) => generateSource(dirPath, registry.section, source, config$1, generatedNames)), writeFileSafe(path
|
|
6255
|
+
await Promise.all([...registry.sources.map((source) => generateSource(dirPath, registry.section, source, config$1, generatedNames)), writeFileSafe(path.resolve(dirPath, REGISTRY_FILE_NAME), JSON.stringify(registry), merge(config$1, { format: { parser: "json" } }))]);
|
|
6261
6256
|
}
|
|
6262
6257
|
|
|
6263
6258
|
//#endregion
|
|
@@ -6350,7 +6345,7 @@ const add = new Command("add").description("add a component to your project.").a
|
|
|
6350
6345
|
const tasks = new Listr(Object.entries(registries).map(([name$1, registry]) => {
|
|
6351
6346
|
if (!config$1.isSection(registry.section)) return;
|
|
6352
6347
|
const sectionPath = config$1.getSectionResolvedPath(registry.section);
|
|
6353
|
-
const dirPath = path
|
|
6348
|
+
const dirPath = path.join(sectionPath, name$1);
|
|
6354
6349
|
return {
|
|
6355
6350
|
task: async (_, task) => {
|
|
6356
6351
|
await generateSources(dirPath, registry, config$1, targetNames);
|
|
@@ -6376,20 +6371,20 @@ const add = new Command("add").description("add a component to your project.").a
|
|
|
6376
6371
|
tasks.add({
|
|
6377
6372
|
task: async (_, task) => {
|
|
6378
6373
|
const sectionPath = config$1.getSectionResolvedPath(section);
|
|
6379
|
-
const dirents = await readdir(path
|
|
6374
|
+
const dirents = await readdir(path.join(sectionPath, name$1), { withFileTypes: true });
|
|
6380
6375
|
await Promise.all(dirents.map(async (dirent) => {
|
|
6381
6376
|
if (dirent.isDirectory()) {
|
|
6382
|
-
const dirents$1 = await readdir(path
|
|
6377
|
+
const dirents$1 = await readdir(path.join(dirent.parentPath, name$1), { withFileTypes: true });
|
|
6383
6378
|
await Promise.all(dirents$1.map(async (dirent$1) => {
|
|
6384
6379
|
if (dirent$1.isDirectory()) return;
|
|
6385
6380
|
if (dirent$1.name === REGISTRY_FILE_NAME) return;
|
|
6386
|
-
const targetPath = path
|
|
6381
|
+
const targetPath = path.join(dirent$1.parentPath, dirent$1.name);
|
|
6387
6382
|
let content = await readFile(targetPath, "utf-8");
|
|
6388
6383
|
content = transformContent(section, content, config$1, targetNames);
|
|
6389
6384
|
await writeFileSafe(targetPath, content, config$1);
|
|
6390
6385
|
}));
|
|
6391
6386
|
} else if (dirent.name !== REGISTRY_FILE_NAME) {
|
|
6392
|
-
const targetPath = path
|
|
6387
|
+
const targetPath = path.join(dirent.parentPath, dirent.name);
|
|
6393
6388
|
let content = await readFile(targetPath, "utf-8");
|
|
6394
6389
|
content = transformContent(section, content, config$1, targetNames);
|
|
6395
6390
|
await writeFileSafe(targetPath, content, config$1);
|
|
@@ -6470,7 +6465,7 @@ function printConflicts(conflictMap, config$1) {
|
|
|
6470
6465
|
//#endregion
|
|
6471
6466
|
//#region src/commands/diff/get-diff.ts
|
|
6472
6467
|
function getDirPath(section, name$1, config$1) {
|
|
6473
|
-
return config$1.isSection(section) ? path
|
|
6468
|
+
return config$1.isSection(section) ? path.join(config$1.getSectionResolvedPath(section), name$1) : config$1.paths[section === "theme" ? "theme" : "ui"].src;
|
|
6474
6469
|
}
|
|
6475
6470
|
async function getDiff(generatedNames, { local, remote }, config$1, concurrent = true) {
|
|
6476
6471
|
const changeMap = {};
|
|
@@ -6522,7 +6517,7 @@ async function getDiff(generatedNames, { local, remote }, config$1, concurrent =
|
|
|
6522
6517
|
await Promise.all(sources.map(async ({ name: name$1, content, data, template }) => {
|
|
6523
6518
|
const source = localRegistry.sources.find((source$1) => source$1.name === name$1);
|
|
6524
6519
|
name$1 = transformExtension(name$1, config$1.jsx);
|
|
6525
|
-
const targetPath = path
|
|
6520
|
+
const targetPath = path.join(dirPath, name$1);
|
|
6526
6521
|
if (content) if (source) {
|
|
6527
6522
|
const [remote$1, local$1] = await Promise.all([transformContentWithFormatAndLint(targetPath, section, content, config$1, generatedNames), transformContentWithFormatAndLint(targetPath, section, source.content, config$1, generatedNames)]);
|
|
6528
6523
|
const diff$1 = diffLines(local$1, remote$1);
|
|
@@ -6554,7 +6549,7 @@ async function getDiff(generatedNames, { local, remote }, config$1, concurrent =
|
|
|
6554
6549
|
if (localData) {
|
|
6555
6550
|
if (template === source?.template) return;
|
|
6556
6551
|
const { name: _name, ...localRest } = localData;
|
|
6557
|
-
const [remote$1, local$1] = await Promise.all([transformContentWithFormatAndLint(path
|
|
6552
|
+
const [remote$1, local$1] = await Promise.all([transformContentWithFormatAndLint(path.join(targetPath, fileName), section, transformTemplateContent(template, remoteRest), config$1, generatedNames), transformContentWithFormatAndLint(path.join(targetPath, fileName), section, transformTemplateContent(source.template, localRest), config$1, generatedNames)]);
|
|
6558
6553
|
const diff$1 = diffLines(local$1, remote$1);
|
|
6559
6554
|
if (diff$1.length < 2) return;
|
|
6560
6555
|
changeMap[componentName] ??= {};
|
|
@@ -6658,7 +6653,7 @@ async function updateFiles(changeMap, { add: add$1, remove, update: update$1 },
|
|
|
6658
6653
|
};
|
|
6659
6654
|
await new Listr(Object.entries(changeMap).map(([componentName, changes]) => ({
|
|
6660
6655
|
task: async (_, task) => {
|
|
6661
|
-
const tempDirPath = await mkdtemp(path
|
|
6656
|
+
const tempDirPath = await mkdtemp(path.join(tmpdir(), `yamada-ui-${componentName}-`));
|
|
6662
6657
|
const registry = remote[componentName];
|
|
6663
6658
|
const dirPath = getDirPath(registry.section, componentName, config$1);
|
|
6664
6659
|
try {
|
|
@@ -6668,8 +6663,8 @@ async function updateFiles(changeMap, { add: add$1, remove, update: update$1 },
|
|
|
6668
6663
|
if (!("local" in data && "remote" in data)) return;
|
|
6669
6664
|
if (force) await writeFileSafe(config$1.paths.ui.index, data.remote, config$1);
|
|
6670
6665
|
else {
|
|
6671
|
-
const remotePath = path
|
|
6672
|
-
const localPath = path
|
|
6666
|
+
const remotePath = path.join(tempDirPath, `remote-${name$1}`);
|
|
6667
|
+
const localPath = path.join(tempDirPath, `local-${name$1}`);
|
|
6673
6668
|
await Promise.all([writeFileSafe(remotePath, data.remote, disabledFormatAndLint), writeFileSafe(localPath, data.local, disabledFormatAndLint)]);
|
|
6674
6669
|
const { conflict, content: mergedContent } = await mergeContent(remotePath, localPath, config$1.paths.ui.index, data.remote);
|
|
6675
6670
|
await writeFileSafe(config$1.paths.ui.index, mergedContent, conflict ? merge(config$1, disabledFormatAndLint) : config$1);
|
|
@@ -6679,11 +6674,11 @@ async function updateFiles(changeMap, { add: add$1, remove, update: update$1 },
|
|
|
6679
6674
|
}
|
|
6680
6675
|
}
|
|
6681
6676
|
} else await Promise.all(Object.entries(changes).map(async ([name$1, { ...data }]) => {
|
|
6682
|
-
const currentPath = path
|
|
6677
|
+
const currentPath = path.join(dirPath, name$1);
|
|
6683
6678
|
if ("local" in data && "remote" in data) if (force) await writeFileSafe(currentPath, data.remote, config$1);
|
|
6684
6679
|
else {
|
|
6685
|
-
const remotePath = path
|
|
6686
|
-
const localPath = path
|
|
6680
|
+
const remotePath = path.join(tempDirPath, `remote-${name$1}`);
|
|
6681
|
+
const localPath = path.join(tempDirPath, `local-${name$1}`);
|
|
6687
6682
|
await Promise.all([writeFileSafe(remotePath, data.remote, disabledFormatAndLint), writeFileSafe(localPath, data.local, disabledFormatAndLint)]);
|
|
6688
6683
|
const { conflict, content: mergedContent } = await mergeContent(remotePath, localPath, currentPath, data.remote);
|
|
6689
6684
|
await writeFileSafe(currentPath, mergedContent, conflict ? merge(config$1, disabledFormatAndLint) : config$1);
|
|
@@ -6695,7 +6690,7 @@ async function updateFiles(changeMap, { add: add$1, remove, update: update$1 },
|
|
|
6695
6690
|
else if ("remote" in data) await writeFileSafe(currentPath, data.remote, config$1);
|
|
6696
6691
|
else await rimraf(currentPath);
|
|
6697
6692
|
}));
|
|
6698
|
-
await writeFileSafe(path
|
|
6693
|
+
await writeFileSafe(path.resolve(dirPath, REGISTRY_FILE_NAME), JSON.stringify(registry), merge(config$1, { format: { parser: "json" } }));
|
|
6699
6694
|
} catch {} finally {
|
|
6700
6695
|
await rimraf(tempDirPath);
|
|
6701
6696
|
}
|
|
@@ -6723,7 +6718,7 @@ async function updateFiles(changeMap, { add: add$1, remove, update: update$1 },
|
|
|
6723
6718
|
|
|
6724
6719
|
//#endregion
|
|
6725
6720
|
//#region src/commands/update/validate-diff-3.ts
|
|
6726
|
-
const execFileAsync = promisify
|
|
6721
|
+
const execFileAsync = promisify(execFile);
|
|
6727
6722
|
async function validateDiff3() {
|
|
6728
6723
|
try {
|
|
6729
6724
|
await execFileAsync("diff3", ["--version"]);
|
|
@@ -6761,7 +6756,7 @@ async function getRegistriesAndFiles(componentNames, config$1, { concurrent = tr
|
|
|
6761
6756
|
if (!config$1.theme?.path) return;
|
|
6762
6757
|
const { dirPath, files: files$1 } = await getFiles(config$1.paths.theme.src);
|
|
6763
6758
|
fileMap.theme = files$1;
|
|
6764
|
-
registryMap.local.theme = await fetchLocalRegistry(path
|
|
6759
|
+
registryMap.local.theme = await fetchLocalRegistry(path.posix.join(dirPath, REGISTRY_FILE_NAME));
|
|
6765
6760
|
task.title = `Got ${c.cyan("theme")} files`;
|
|
6766
6761
|
},
|
|
6767
6762
|
title: `Getting ${c.cyan("theme")} files`
|
|
@@ -6774,9 +6769,9 @@ async function getRegistriesAndFiles(componentNames, config$1, { concurrent = tr
|
|
|
6774
6769
|
}]);
|
|
6775
6770
|
tasks.add(componentNames.map((componentName) => [{
|
|
6776
6771
|
task: async (_, task) => {
|
|
6777
|
-
const { dirPath, files: files$1 } = await getFiles(path
|
|
6772
|
+
const { dirPath, files: files$1 } = await getFiles(path.posix.join(config$1.paths.ui.src, "**", componentName));
|
|
6778
6773
|
fileMap[componentName] = files$1;
|
|
6779
|
-
registryMap.local[componentName] = await fetchLocalRegistry(path
|
|
6774
|
+
registryMap.local[componentName] = await fetchLocalRegistry(path.posix.join(dirPath, REGISTRY_FILE_NAME));
|
|
6780
6775
|
task.title = `Got ${c.cyan(componentName)} files`;
|
|
6781
6776
|
},
|
|
6782
6777
|
title: `Getting ${c.cyan(componentName)} files`
|
|
@@ -6952,7 +6947,7 @@ const init = new Command("init").description("initialize your project and instal
|
|
|
6952
6947
|
const indexFileName = transformExtension("index.ts", jsx);
|
|
6953
6948
|
const configFileName = configPath.includes("/") ? configPath.split("/").at(-1) : configPath;
|
|
6954
6949
|
const config$1 = { ...DEFAULT_CONFIG };
|
|
6955
|
-
configPath = path
|
|
6950
|
+
configPath = path.resolve(cwd$1, configPath);
|
|
6956
6951
|
let dependencies$1;
|
|
6957
6952
|
let devDependencies$1;
|
|
6958
6953
|
const answer = await prompts([
|
|
@@ -7036,7 +7031,7 @@ const init = new Command("init").description("initialize your project and instal
|
|
|
7036
7031
|
spinner.start(`Generating ${c.cyan(configFileName)}`);
|
|
7037
7032
|
await writeFileSafe(configPath, JSON.stringify(config$1), merge(config$1, { format: { parser: "json" } }));
|
|
7038
7033
|
spinner.succeed(`Generated ${c.cyan(configFileName)}`);
|
|
7039
|
-
const outdirPath = path
|
|
7034
|
+
const outdirPath = path.resolve(cwd$1, outdir);
|
|
7040
7035
|
if (!overwrite && existsSync(outdirPath)) {
|
|
7041
7036
|
if (yes) throw new Error(`The ${c.yellow(outdir)} directory already exists. Use ${c.cyan("--overwrite")} to overwrite it.`);
|
|
7042
7037
|
const { overwrite: overwrite$1 } = await prompts({
|
|
@@ -7063,7 +7058,7 @@ const init = new Command("init").description("initialize your project and instal
|
|
|
7063
7058
|
const tasks = new Listr([
|
|
7064
7059
|
{
|
|
7065
7060
|
task: async (_, task) => {
|
|
7066
|
-
const targetPath = path
|
|
7061
|
+
const targetPath = path.resolve(outdirPath, "package.json");
|
|
7067
7062
|
const defaultExports = DEFAULT_PACKAGE_JSON_EXPORTS.ui[jsx ? "jsx" : "tsx"];
|
|
7068
7063
|
const exports$1 = src ? defaultExports : Object.fromEntries(Object.entries(defaultExports).map(([key, value]) => [key, value.replace(/src\//, "")]));
|
|
7069
7064
|
await writeFileSafe(targetPath, JSON.stringify({
|
|
@@ -7079,11 +7074,11 @@ const init = new Command("init").description("initialize your project and instal
|
|
|
7079
7074
|
},
|
|
7080
7075
|
{
|
|
7081
7076
|
task: async (_, task) => {
|
|
7082
|
-
const targetPath = path
|
|
7077
|
+
const targetPath = path.resolve(outdirPath, src ? "src" : "");
|
|
7083
7078
|
const registry = await fetchRegistry("index", { tag });
|
|
7084
7079
|
let content = registry.sources[0].content;
|
|
7085
7080
|
if (jsx) content = transformTsToJs(content);
|
|
7086
|
-
await Promise.all([writeFileSafe(path
|
|
7081
|
+
await Promise.all([writeFileSafe(path.join(targetPath, indexFileName), content, config$1), writeFileSafe(path.join(targetPath, REGISTRY_FILE_NAME), JSON.stringify(registry), merge(config$1, { format: { parser: "json" } }))]);
|
|
7087
7082
|
task.title = `Generated ${c.cyan(indexFileName)}`;
|
|
7088
7083
|
},
|
|
7089
7084
|
title: `Generating ${c.cyan(indexFileName)}`
|
|
@@ -7099,7 +7094,7 @@ const init = new Command("init").description("initialize your project and instal
|
|
|
7099
7094
|
], { concurrent: true });
|
|
7100
7095
|
if (!jsx) tasks.add({
|
|
7101
7096
|
task: async (_, task) => {
|
|
7102
|
-
const targetPath = path
|
|
7097
|
+
const targetPath = path.resolve(outdirPath, "tsconfig.json");
|
|
7103
7098
|
const tsconfig = { ...TSCONFIG_JSON };
|
|
7104
7099
|
if (!src) tsconfig.include = tsconfig.include.map((value) => value.replace(/src\//, ""));
|
|
7105
7100
|
await writeFileSafe(targetPath, JSON.stringify(tsconfig), merge(config$1, { format: { parser: "json" } }));
|
|
@@ -7133,7 +7128,7 @@ const init = new Command("init").description("initialize your project and instal
|
|
|
7133
7128
|
const registry = await fetchRegistry("index", { tag });
|
|
7134
7129
|
let content = registry.sources[0].content;
|
|
7135
7130
|
if (jsx) content = transformTsToJs(content);
|
|
7136
|
-
await Promise.all([writeFileSafe(path
|
|
7131
|
+
await Promise.all([writeFileSafe(path.resolve(outdirPath, indexFileName), content, config$1), writeFileSafe(path.resolve(outdirPath, REGISTRY_FILE_NAME), JSON.stringify(registry), merge(config$1, { format: { parser: "json" } }))]);
|
|
7137
7132
|
task.title = `Generated ${c.cyan(indexFileName)}`;
|
|
7138
7133
|
},
|
|
7139
7134
|
title: `Generating ${c.cyan(indexFileName)}`
|
|
@@ -7231,7 +7226,7 @@ const theme = new Command("theme").description("generate theme to your project."
|
|
|
7231
7226
|
monorepoConfig.src = answer$1.src ?? true;
|
|
7232
7227
|
monorepoConfig.packageName = packageName || DEFAULT_PACKAGE_NAME.theme;
|
|
7233
7228
|
}
|
|
7234
|
-
const outdirPath = path
|
|
7229
|
+
const outdirPath = path.resolve(cwd$1, themePath);
|
|
7235
7230
|
if (!overwrite && existsSync(outdirPath)) {
|
|
7236
7231
|
if (yes) throw new Error(`The directory already exists. Use ${c.cyan("--overwrite")} to overwrite it.`);
|
|
7237
7232
|
const { overwrite: overwrite$1 } = await prompts({
|
|
@@ -7250,19 +7245,19 @@ const theme = new Command("theme").description("generate theme to your project."
|
|
|
7250
7245
|
spinner.succeed("Fetched registry");
|
|
7251
7246
|
const tasks = new Listr([{
|
|
7252
7247
|
task: async (_, task) => {
|
|
7253
|
-
const targetPath = path
|
|
7248
|
+
const targetPath = path.resolve(outdirPath, monorepoConfig.src ? "src" : "");
|
|
7254
7249
|
await Promise.all([...registry.sources.map(async ({ name: name$1, content }) => {
|
|
7255
7250
|
if (!content) return;
|
|
7256
7251
|
name$1 = transformExtension(name$1, config$1.jsx);
|
|
7257
7252
|
if (config$1.jsx) content = isTsx(name$1) ? transformTsxToJsx(content) : transformTsToJs(content);
|
|
7258
|
-
await writeFileSafe(path
|
|
7259
|
-
}), writeFileSafe(path
|
|
7253
|
+
await writeFileSafe(path.resolve(targetPath, name$1), content, config$1);
|
|
7254
|
+
}), writeFileSafe(path.resolve(targetPath, REGISTRY_FILE_NAME), JSON.stringify(registry), merge(config$1, { format: { parser: "json" } }))]);
|
|
7260
7255
|
task.title = `Generated theme`;
|
|
7261
7256
|
},
|
|
7262
7257
|
title: `Generating theme`
|
|
7263
7258
|
}, {
|
|
7264
7259
|
task: async (_, task) => {
|
|
7265
|
-
const targetPath = path
|
|
7260
|
+
const targetPath = path.resolve(cwd$1, configPath);
|
|
7266
7261
|
const data = await readFile(targetPath, "utf-8");
|
|
7267
7262
|
const userConfig = JSON.parse(data);
|
|
7268
7263
|
userConfig.theme ??= {};
|
|
@@ -7274,7 +7269,7 @@ const theme = new Command("theme").description("generate theme to your project."
|
|
|
7274
7269
|
}], { concurrent: true });
|
|
7275
7270
|
if (config$1.monorepo) tasks.add({
|
|
7276
7271
|
task: async (_, task) => {
|
|
7277
|
-
const targetPath = path
|
|
7272
|
+
const targetPath = path.resolve(outdirPath, "package.json");
|
|
7278
7273
|
const defaultExports = DEFAULT_PACKAGE_JSON_EXPORTS.theme[config$1.jsx ? "jsx" : "tsx"];
|
|
7279
7274
|
const exports$1 = monorepoConfig.src ? defaultExports : Object.fromEntries(Object.entries(defaultExports).map(([key, value]) => [key, value.replace(/src\//, "")]));
|
|
7280
7275
|
await writeFileSafe(targetPath, JSON.stringify({
|
|
@@ -7290,7 +7285,7 @@ const theme = new Command("theme").description("generate theme to your project."
|
|
|
7290
7285
|
});
|
|
7291
7286
|
if (!config$1.jsx) tasks.add({
|
|
7292
7287
|
task: async (_, task) => {
|
|
7293
|
-
const targetPath = path
|
|
7288
|
+
const targetPath = path.resolve(outdirPath, "tsconfig.json");
|
|
7294
7289
|
const tsconfig = { ...TSCONFIG_JSON };
|
|
7295
7290
|
if (!monorepoConfig.src) tsconfig.include = tsconfig.include.map((value) => value.replace(/src\//, ""));
|
|
7296
7291
|
await writeFileSafe(targetPath, JSON.stringify(tsconfig), merge(config$1, { format: { parser: "json" } }));
|
|
@@ -7540,13 +7535,13 @@ const tokens = new Command("tokens").description("generate theme typings.").argu
|
|
|
7540
7535
|
}
|
|
7541
7536
|
if (!inputPath) throw new Error("No input path provided");
|
|
7542
7537
|
spinner.start(`Getting theme`);
|
|
7543
|
-
cwd$1 = path
|
|
7544
|
-
inputPath = path
|
|
7545
|
-
if (outPath) outPath = path
|
|
7538
|
+
cwd$1 = path.resolve(cwd$1);
|
|
7539
|
+
inputPath = path.resolve(cwd$1, inputPath);
|
|
7540
|
+
if (outPath) outPath = path.resolve(cwd$1, outPath);
|
|
7546
7541
|
else if (inputPath.includes("/")) {
|
|
7547
7542
|
const dirPath = inputPath.split("/").slice(0, -1).join("/");
|
|
7548
|
-
outPath = path
|
|
7549
|
-
} else outPath = path
|
|
7543
|
+
outPath = path.join(dirPath, "index.types.ts");
|
|
7544
|
+
} else outPath = path.join(cwd$1, "index.types.ts");
|
|
7550
7545
|
const { config: themeConfig, theme: theme$1 } = await getTheme(inputPath, cwd$1);
|
|
7551
7546
|
spinner.succeed(`Got theme`);
|
|
7552
7547
|
spinner.start(`Generating theme typings`);
|