bunkit-cli 0.1.2 → 0.2.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/dist/index.js +262 -248
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -2256,8 +2256,8 @@ var require_universalify = __commonJS((exports) => {
|
|
|
2256
2256
|
if (typeof args[args.length - 1] === "function")
|
|
2257
2257
|
fn.apply(this, args);
|
|
2258
2258
|
else {
|
|
2259
|
-
return new Promise((
|
|
2260
|
-
args.push((err, res) => err != null ? reject(err) :
|
|
2259
|
+
return new Promise((resolve, reject) => {
|
|
2260
|
+
args.push((err, res) => err != null ? reject(err) : resolve(res));
|
|
2261
2261
|
fn.apply(this, args);
|
|
2262
2262
|
});
|
|
2263
2263
|
}
|
|
@@ -2327,14 +2327,14 @@ var require_polyfills = __commonJS((exports, module) => {
|
|
|
2327
2327
|
fs.fstatSync = statFixSync(fs.fstatSync);
|
|
2328
2328
|
fs.lstatSync = statFixSync(fs.lstatSync);
|
|
2329
2329
|
if (fs.chmod && !fs.lchmod) {
|
|
2330
|
-
fs.lchmod = function(
|
|
2330
|
+
fs.lchmod = function(path, mode, cb) {
|
|
2331
2331
|
if (cb)
|
|
2332
2332
|
process.nextTick(cb);
|
|
2333
2333
|
};
|
|
2334
2334
|
fs.lchmodSync = function() {};
|
|
2335
2335
|
}
|
|
2336
2336
|
if (fs.chown && !fs.lchown) {
|
|
2337
|
-
fs.lchown = function(
|
|
2337
|
+
fs.lchown = function(path, uid, gid, cb) {
|
|
2338
2338
|
if (cb)
|
|
2339
2339
|
process.nextTick(cb);
|
|
2340
2340
|
};
|
|
@@ -2404,8 +2404,8 @@ var require_polyfills = __commonJS((exports, module) => {
|
|
|
2404
2404
|
};
|
|
2405
2405
|
}(fs.readSync);
|
|
2406
2406
|
function patchLchmod(fs2) {
|
|
2407
|
-
fs2.lchmod = function(
|
|
2408
|
-
fs2.open(
|
|
2407
|
+
fs2.lchmod = function(path, mode, callback) {
|
|
2408
|
+
fs2.open(path, constants.O_WRONLY | constants.O_SYMLINK, mode, function(err, fd) {
|
|
2409
2409
|
if (err) {
|
|
2410
2410
|
if (callback)
|
|
2411
2411
|
callback(err);
|
|
@@ -2419,8 +2419,8 @@ var require_polyfills = __commonJS((exports, module) => {
|
|
|
2419
2419
|
});
|
|
2420
2420
|
});
|
|
2421
2421
|
};
|
|
2422
|
-
fs2.lchmodSync = function(
|
|
2423
|
-
var fd = fs2.openSync(
|
|
2422
|
+
fs2.lchmodSync = function(path, mode) {
|
|
2423
|
+
var fd = fs2.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode);
|
|
2424
2424
|
var threw = true;
|
|
2425
2425
|
var ret;
|
|
2426
2426
|
try {
|
|
@@ -2440,8 +2440,8 @@ var require_polyfills = __commonJS((exports, module) => {
|
|
|
2440
2440
|
}
|
|
2441
2441
|
function patchLutimes(fs2) {
|
|
2442
2442
|
if (constants.hasOwnProperty("O_SYMLINK") && fs2.futimes) {
|
|
2443
|
-
fs2.lutimes = function(
|
|
2444
|
-
fs2.open(
|
|
2443
|
+
fs2.lutimes = function(path, at, mt, cb) {
|
|
2444
|
+
fs2.open(path, constants.O_SYMLINK, function(er, fd) {
|
|
2445
2445
|
if (er) {
|
|
2446
2446
|
if (cb)
|
|
2447
2447
|
cb(er);
|
|
@@ -2455,8 +2455,8 @@ var require_polyfills = __commonJS((exports, module) => {
|
|
|
2455
2455
|
});
|
|
2456
2456
|
});
|
|
2457
2457
|
};
|
|
2458
|
-
fs2.lutimesSync = function(
|
|
2459
|
-
var fd = fs2.openSync(
|
|
2458
|
+
fs2.lutimesSync = function(path, at, mt) {
|
|
2459
|
+
var fd = fs2.openSync(path, constants.O_SYMLINK);
|
|
2460
2460
|
var ret;
|
|
2461
2461
|
var threw = true;
|
|
2462
2462
|
try {
|
|
@@ -2588,12 +2588,12 @@ var require_legacy_streams = __commonJS((exports, module) => {
|
|
|
2588
2588
|
ReadStream,
|
|
2589
2589
|
WriteStream
|
|
2590
2590
|
};
|
|
2591
|
-
function ReadStream(
|
|
2591
|
+
function ReadStream(path, options) {
|
|
2592
2592
|
if (!(this instanceof ReadStream))
|
|
2593
|
-
return new ReadStream(
|
|
2593
|
+
return new ReadStream(path, options);
|
|
2594
2594
|
Stream.call(this);
|
|
2595
2595
|
var self = this;
|
|
2596
|
-
this.path =
|
|
2596
|
+
this.path = path;
|
|
2597
2597
|
this.fd = null;
|
|
2598
2598
|
this.readable = true;
|
|
2599
2599
|
this.paused = false;
|
|
@@ -2639,11 +2639,11 @@ var require_legacy_streams = __commonJS((exports, module) => {
|
|
|
2639
2639
|
self._read();
|
|
2640
2640
|
});
|
|
2641
2641
|
}
|
|
2642
|
-
function WriteStream(
|
|
2642
|
+
function WriteStream(path, options) {
|
|
2643
2643
|
if (!(this instanceof WriteStream))
|
|
2644
|
-
return new WriteStream(
|
|
2644
|
+
return new WriteStream(path, options);
|
|
2645
2645
|
Stream.call(this);
|
|
2646
|
-
this.path =
|
|
2646
|
+
this.path = path;
|
|
2647
2647
|
this.fd = null;
|
|
2648
2648
|
this.writable = true;
|
|
2649
2649
|
this.flags = "w";
|
|
@@ -2781,14 +2781,14 @@ GFS4: `);
|
|
|
2781
2781
|
fs2.createWriteStream = createWriteStream;
|
|
2782
2782
|
var fs$readFile = fs2.readFile;
|
|
2783
2783
|
fs2.readFile = readFile;
|
|
2784
|
-
function readFile(
|
|
2784
|
+
function readFile(path, options, cb) {
|
|
2785
2785
|
if (typeof options === "function")
|
|
2786
2786
|
cb = options, options = null;
|
|
2787
|
-
return go$readFile(
|
|
2788
|
-
function go$readFile(
|
|
2789
|
-
return fs$readFile(
|
|
2787
|
+
return go$readFile(path, options, cb);
|
|
2788
|
+
function go$readFile(path2, options2, cb2, startTime) {
|
|
2789
|
+
return fs$readFile(path2, options2, function(err) {
|
|
2790
2790
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
2791
|
-
enqueue([go$readFile, [
|
|
2791
|
+
enqueue([go$readFile, [path2, options2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
2792
2792
|
else {
|
|
2793
2793
|
if (typeof cb2 === "function")
|
|
2794
2794
|
cb2.apply(this, arguments);
|
|
@@ -2798,14 +2798,14 @@ GFS4: `);
|
|
|
2798
2798
|
}
|
|
2799
2799
|
var fs$writeFile = fs2.writeFile;
|
|
2800
2800
|
fs2.writeFile = writeFile;
|
|
2801
|
-
function writeFile(
|
|
2801
|
+
function writeFile(path, data, options, cb) {
|
|
2802
2802
|
if (typeof options === "function")
|
|
2803
2803
|
cb = options, options = null;
|
|
2804
|
-
return go$writeFile(
|
|
2805
|
-
function go$writeFile(
|
|
2806
|
-
return fs$writeFile(
|
|
2804
|
+
return go$writeFile(path, data, options, cb);
|
|
2805
|
+
function go$writeFile(path2, data2, options2, cb2, startTime) {
|
|
2806
|
+
return fs$writeFile(path2, data2, options2, function(err) {
|
|
2807
2807
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
2808
|
-
enqueue([go$writeFile, [
|
|
2808
|
+
enqueue([go$writeFile, [path2, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
2809
2809
|
else {
|
|
2810
2810
|
if (typeof cb2 === "function")
|
|
2811
2811
|
cb2.apply(this, arguments);
|
|
@@ -2816,14 +2816,14 @@ GFS4: `);
|
|
|
2816
2816
|
var fs$appendFile = fs2.appendFile;
|
|
2817
2817
|
if (fs$appendFile)
|
|
2818
2818
|
fs2.appendFile = appendFile;
|
|
2819
|
-
function appendFile(
|
|
2819
|
+
function appendFile(path, data, options, cb) {
|
|
2820
2820
|
if (typeof options === "function")
|
|
2821
2821
|
cb = options, options = null;
|
|
2822
|
-
return go$appendFile(
|
|
2823
|
-
function go$appendFile(
|
|
2824
|
-
return fs$appendFile(
|
|
2822
|
+
return go$appendFile(path, data, options, cb);
|
|
2823
|
+
function go$appendFile(path2, data2, options2, cb2, startTime) {
|
|
2824
|
+
return fs$appendFile(path2, data2, options2, function(err) {
|
|
2825
2825
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
2826
|
-
enqueue([go$appendFile, [
|
|
2826
|
+
enqueue([go$appendFile, [path2, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
2827
2827
|
else {
|
|
2828
2828
|
if (typeof cb2 === "function")
|
|
2829
2829
|
cb2.apply(this, arguments);
|
|
@@ -2854,21 +2854,21 @@ GFS4: `);
|
|
|
2854
2854
|
var fs$readdir = fs2.readdir;
|
|
2855
2855
|
fs2.readdir = readdir;
|
|
2856
2856
|
var noReaddirOptionVersions = /^v[0-5]\./;
|
|
2857
|
-
function readdir(
|
|
2857
|
+
function readdir(path, options, cb) {
|
|
2858
2858
|
if (typeof options === "function")
|
|
2859
2859
|
cb = options, options = null;
|
|
2860
|
-
var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir(
|
|
2861
|
-
return fs$readdir(
|
|
2862
|
-
} : function go$readdir(
|
|
2863
|
-
return fs$readdir(
|
|
2860
|
+
var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir(path2, options2, cb2, startTime) {
|
|
2861
|
+
return fs$readdir(path2, fs$readdirCallback(path2, options2, cb2, startTime));
|
|
2862
|
+
} : function go$readdir(path2, options2, cb2, startTime) {
|
|
2863
|
+
return fs$readdir(path2, options2, fs$readdirCallback(path2, options2, cb2, startTime));
|
|
2864
2864
|
};
|
|
2865
|
-
return go$readdir(
|
|
2866
|
-
function fs$readdirCallback(
|
|
2865
|
+
return go$readdir(path, options, cb);
|
|
2866
|
+
function fs$readdirCallback(path2, options2, cb2, startTime) {
|
|
2867
2867
|
return function(err, files) {
|
|
2868
2868
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
2869
2869
|
enqueue([
|
|
2870
2870
|
go$readdir,
|
|
2871
|
-
[
|
|
2871
|
+
[path2, options2, cb2],
|
|
2872
2872
|
err,
|
|
2873
2873
|
startTime || Date.now(),
|
|
2874
2874
|
Date.now()
|
|
@@ -2939,7 +2939,7 @@ GFS4: `);
|
|
|
2939
2939
|
enumerable: true,
|
|
2940
2940
|
configurable: true
|
|
2941
2941
|
});
|
|
2942
|
-
function ReadStream(
|
|
2942
|
+
function ReadStream(path, options) {
|
|
2943
2943
|
if (this instanceof ReadStream)
|
|
2944
2944
|
return fs$ReadStream.apply(this, arguments), this;
|
|
2945
2945
|
else
|
|
@@ -2959,7 +2959,7 @@ GFS4: `);
|
|
|
2959
2959
|
}
|
|
2960
2960
|
});
|
|
2961
2961
|
}
|
|
2962
|
-
function WriteStream(
|
|
2962
|
+
function WriteStream(path, options) {
|
|
2963
2963
|
if (this instanceof WriteStream)
|
|
2964
2964
|
return fs$WriteStream.apply(this, arguments), this;
|
|
2965
2965
|
else
|
|
@@ -2977,22 +2977,22 @@ GFS4: `);
|
|
|
2977
2977
|
}
|
|
2978
2978
|
});
|
|
2979
2979
|
}
|
|
2980
|
-
function createReadStream(
|
|
2981
|
-
return new fs2.ReadStream(
|
|
2980
|
+
function createReadStream(path, options) {
|
|
2981
|
+
return new fs2.ReadStream(path, options);
|
|
2982
2982
|
}
|
|
2983
|
-
function createWriteStream(
|
|
2984
|
-
return new fs2.WriteStream(
|
|
2983
|
+
function createWriteStream(path, options) {
|
|
2984
|
+
return new fs2.WriteStream(path, options);
|
|
2985
2985
|
}
|
|
2986
2986
|
var fs$open = fs2.open;
|
|
2987
2987
|
fs2.open = open;
|
|
2988
|
-
function open(
|
|
2988
|
+
function open(path, flags, mode, cb) {
|
|
2989
2989
|
if (typeof mode === "function")
|
|
2990
2990
|
cb = mode, mode = null;
|
|
2991
|
-
return go$open(
|
|
2992
|
-
function go$open(
|
|
2993
|
-
return fs$open(
|
|
2991
|
+
return go$open(path, flags, mode, cb);
|
|
2992
|
+
function go$open(path2, flags2, mode2, cb2, startTime) {
|
|
2993
|
+
return fs$open(path2, flags2, mode2, function(err, fd) {
|
|
2994
2994
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
2995
|
-
enqueue([go$open, [
|
|
2995
|
+
enqueue([go$open, [path2, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
2996
2996
|
else {
|
|
2997
2997
|
if (typeof cb2 === "function")
|
|
2998
2998
|
cb2.apply(this, arguments);
|
|
@@ -3108,19 +3108,19 @@ var require_fs = __commonJS((exports) => {
|
|
|
3108
3108
|
if (typeof callback === "function") {
|
|
3109
3109
|
return fs.exists(filename, callback);
|
|
3110
3110
|
}
|
|
3111
|
-
return new Promise((
|
|
3112
|
-
return fs.exists(filename,
|
|
3111
|
+
return new Promise((resolve) => {
|
|
3112
|
+
return fs.exists(filename, resolve);
|
|
3113
3113
|
});
|
|
3114
3114
|
};
|
|
3115
3115
|
exports.read = function(fd, buffer, offset, length, position, callback) {
|
|
3116
3116
|
if (typeof callback === "function") {
|
|
3117
3117
|
return fs.read(fd, buffer, offset, length, position, callback);
|
|
3118
3118
|
}
|
|
3119
|
-
return new Promise((
|
|
3119
|
+
return new Promise((resolve, reject) => {
|
|
3120
3120
|
fs.read(fd, buffer, offset, length, position, (err, bytesRead, buffer2) => {
|
|
3121
3121
|
if (err)
|
|
3122
3122
|
return reject(err);
|
|
3123
|
-
|
|
3123
|
+
resolve({ bytesRead, buffer: buffer2 });
|
|
3124
3124
|
});
|
|
3125
3125
|
});
|
|
3126
3126
|
};
|
|
@@ -3128,11 +3128,11 @@ var require_fs = __commonJS((exports) => {
|
|
|
3128
3128
|
if (typeof args[args.length - 1] === "function") {
|
|
3129
3129
|
return fs.write(fd, buffer, ...args);
|
|
3130
3130
|
}
|
|
3131
|
-
return new Promise((
|
|
3131
|
+
return new Promise((resolve, reject) => {
|
|
3132
3132
|
fs.write(fd, buffer, ...args, (err, bytesWritten, buffer2) => {
|
|
3133
3133
|
if (err)
|
|
3134
3134
|
return reject(err);
|
|
3135
|
-
|
|
3135
|
+
resolve({ bytesWritten, buffer: buffer2 });
|
|
3136
3136
|
});
|
|
3137
3137
|
});
|
|
3138
3138
|
};
|
|
@@ -3140,11 +3140,11 @@ var require_fs = __commonJS((exports) => {
|
|
|
3140
3140
|
if (typeof args[args.length - 1] === "function") {
|
|
3141
3141
|
return fs.readv(fd, buffers, ...args);
|
|
3142
3142
|
}
|
|
3143
|
-
return new Promise((
|
|
3143
|
+
return new Promise((resolve, reject) => {
|
|
3144
3144
|
fs.readv(fd, buffers, ...args, (err, bytesRead, buffers2) => {
|
|
3145
3145
|
if (err)
|
|
3146
3146
|
return reject(err);
|
|
3147
|
-
|
|
3147
|
+
resolve({ bytesRead, buffers: buffers2 });
|
|
3148
3148
|
});
|
|
3149
3149
|
});
|
|
3150
3150
|
};
|
|
@@ -3152,11 +3152,11 @@ var require_fs = __commonJS((exports) => {
|
|
|
3152
3152
|
if (typeof args[args.length - 1] === "function") {
|
|
3153
3153
|
return fs.writev(fd, buffers, ...args);
|
|
3154
3154
|
}
|
|
3155
|
-
return new Promise((
|
|
3155
|
+
return new Promise((resolve, reject) => {
|
|
3156
3156
|
fs.writev(fd, buffers, ...args, (err, bytesWritten, buffers2) => {
|
|
3157
3157
|
if (err)
|
|
3158
3158
|
return reject(err);
|
|
3159
|
-
|
|
3159
|
+
resolve({ bytesWritten, buffers: buffers2 });
|
|
3160
3160
|
});
|
|
3161
3161
|
});
|
|
3162
3162
|
};
|
|
@@ -3169,10 +3169,10 @@ var require_fs = __commonJS((exports) => {
|
|
|
3169
3169
|
|
|
3170
3170
|
// ../../node_modules/.bun/fs-extra@11.3.2/node_modules/fs-extra/lib/mkdirs/utils.js
|
|
3171
3171
|
var require_utils = __commonJS((exports, module) => {
|
|
3172
|
-
var
|
|
3172
|
+
var path = __require("path");
|
|
3173
3173
|
exports.checkPath = function checkPath(pth) {
|
|
3174
3174
|
if (process.platform === "win32") {
|
|
3175
|
-
const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(
|
|
3175
|
+
const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path.parse(pth).root, ""));
|
|
3176
3176
|
if (pathHasInvalidWinCharacters) {
|
|
3177
3177
|
const error = new Error(`Path contains invalid characters: ${pth}`);
|
|
3178
3178
|
error.code = "EINVAL";
|
|
@@ -3227,8 +3227,8 @@ var require_mkdirs = __commonJS((exports, module) => {
|
|
|
3227
3227
|
var require_path_exists = __commonJS((exports, module) => {
|
|
3228
3228
|
var u2 = require_universalify().fromPromise;
|
|
3229
3229
|
var fs = require_fs();
|
|
3230
|
-
function pathExists(
|
|
3231
|
-
return fs.access(
|
|
3230
|
+
function pathExists(path) {
|
|
3231
|
+
return fs.access(path).then(() => true).catch(() => false);
|
|
3232
3232
|
}
|
|
3233
3233
|
module.exports = {
|
|
3234
3234
|
pathExists: u2(pathExists),
|
|
@@ -3240,8 +3240,8 @@ var require_path_exists = __commonJS((exports, module) => {
|
|
|
3240
3240
|
var require_utimes = __commonJS((exports, module) => {
|
|
3241
3241
|
var fs = require_fs();
|
|
3242
3242
|
var u2 = require_universalify().fromPromise;
|
|
3243
|
-
async function utimesMillis(
|
|
3244
|
-
const fd = await fs.open(
|
|
3243
|
+
async function utimesMillis(path, atime, mtime) {
|
|
3244
|
+
const fd = await fs.open(path, "r+");
|
|
3245
3245
|
let closeErr = null;
|
|
3246
3246
|
try {
|
|
3247
3247
|
await fs.futimes(fd, atime, mtime);
|
|
@@ -3256,8 +3256,8 @@ var require_utimes = __commonJS((exports, module) => {
|
|
|
3256
3256
|
throw closeErr;
|
|
3257
3257
|
}
|
|
3258
3258
|
}
|
|
3259
|
-
function utimesMillisSync(
|
|
3260
|
-
const fd = fs.openSync(
|
|
3259
|
+
function utimesMillisSync(path, atime, mtime) {
|
|
3260
|
+
const fd = fs.openSync(path, "r+");
|
|
3261
3261
|
fs.futimesSync(fd, atime, mtime);
|
|
3262
3262
|
return fs.closeSync(fd);
|
|
3263
3263
|
}
|
|
@@ -3270,7 +3270,7 @@ var require_utimes = __commonJS((exports, module) => {
|
|
|
3270
3270
|
// ../../node_modules/.bun/fs-extra@11.3.2/node_modules/fs-extra/lib/util/stat.js
|
|
3271
3271
|
var require_stat = __commonJS((exports, module) => {
|
|
3272
3272
|
var fs = require_fs();
|
|
3273
|
-
var
|
|
3273
|
+
var path = __require("path");
|
|
3274
3274
|
var u2 = require_universalify().fromPromise;
|
|
3275
3275
|
function getStats(src, dest, opts) {
|
|
3276
3276
|
const statFunc = opts.dereference ? (file) => fs.stat(file, { bigint: true }) : (file) => fs.lstat(file, { bigint: true });
|
|
@@ -3300,8 +3300,8 @@ var require_stat = __commonJS((exports, module) => {
|
|
|
3300
3300
|
const { srcStat, destStat } = await getStats(src, dest, opts);
|
|
3301
3301
|
if (destStat) {
|
|
3302
3302
|
if (areIdentical(srcStat, destStat)) {
|
|
3303
|
-
const srcBaseName =
|
|
3304
|
-
const destBaseName =
|
|
3303
|
+
const srcBaseName = path.basename(src);
|
|
3304
|
+
const destBaseName = path.basename(dest);
|
|
3305
3305
|
if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
|
|
3306
3306
|
return { srcStat, destStat, isChangingCase: true };
|
|
3307
3307
|
}
|
|
@@ -3323,8 +3323,8 @@ var require_stat = __commonJS((exports, module) => {
|
|
|
3323
3323
|
const { srcStat, destStat } = getStatsSync(src, dest, opts);
|
|
3324
3324
|
if (destStat) {
|
|
3325
3325
|
if (areIdentical(srcStat, destStat)) {
|
|
3326
|
-
const srcBaseName =
|
|
3327
|
-
const destBaseName =
|
|
3326
|
+
const srcBaseName = path.basename(src);
|
|
3327
|
+
const destBaseName = path.basename(dest);
|
|
3328
3328
|
if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
|
|
3329
3329
|
return { srcStat, destStat, isChangingCase: true };
|
|
3330
3330
|
}
|
|
@@ -3343,9 +3343,9 @@ var require_stat = __commonJS((exports, module) => {
|
|
|
3343
3343
|
return { srcStat, destStat };
|
|
3344
3344
|
}
|
|
3345
3345
|
async function checkParentPaths(src, srcStat, dest, funcName) {
|
|
3346
|
-
const srcParent =
|
|
3347
|
-
const destParent =
|
|
3348
|
-
if (destParent === srcParent || destParent ===
|
|
3346
|
+
const srcParent = path.resolve(path.dirname(src));
|
|
3347
|
+
const destParent = path.resolve(path.dirname(dest));
|
|
3348
|
+
if (destParent === srcParent || destParent === path.parse(destParent).root)
|
|
3349
3349
|
return;
|
|
3350
3350
|
let destStat;
|
|
3351
3351
|
try {
|
|
@@ -3361,9 +3361,9 @@ var require_stat = __commonJS((exports, module) => {
|
|
|
3361
3361
|
return checkParentPaths(src, srcStat, destParent, funcName);
|
|
3362
3362
|
}
|
|
3363
3363
|
function checkParentPathsSync(src, srcStat, dest, funcName) {
|
|
3364
|
-
const srcParent =
|
|
3365
|
-
const destParent =
|
|
3366
|
-
if (destParent === srcParent || destParent ===
|
|
3364
|
+
const srcParent = path.resolve(path.dirname(src));
|
|
3365
|
+
const destParent = path.resolve(path.dirname(dest));
|
|
3366
|
+
if (destParent === srcParent || destParent === path.parse(destParent).root)
|
|
3367
3367
|
return;
|
|
3368
3368
|
let destStat;
|
|
3369
3369
|
try {
|
|
@@ -3382,8 +3382,8 @@ var require_stat = __commonJS((exports, module) => {
|
|
|
3382
3382
|
return destStat.ino !== undefined && destStat.dev !== undefined && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev;
|
|
3383
3383
|
}
|
|
3384
3384
|
function isSrcSubdir(src, dest) {
|
|
3385
|
-
const srcArr =
|
|
3386
|
-
const destArr =
|
|
3385
|
+
const srcArr = path.resolve(src).split(path.sep).filter((i) => i);
|
|
3386
|
+
const destArr = path.resolve(dest).split(path.sep).filter((i) => i);
|
|
3387
3387
|
return srcArr.every((cur, i) => destArr[i] === cur);
|
|
3388
3388
|
}
|
|
3389
3389
|
function errMsg(src, dest, funcName) {
|
|
@@ -3419,7 +3419,7 @@ var require_async = __commonJS((exports, module) => {
|
|
|
3419
3419
|
// ../../node_modules/.bun/fs-extra@11.3.2/node_modules/fs-extra/lib/copy/copy.js
|
|
3420
3420
|
var require_copy = __commonJS((exports, module) => {
|
|
3421
3421
|
var fs = require_fs();
|
|
3422
|
-
var
|
|
3422
|
+
var path = __require("path");
|
|
3423
3423
|
var { mkdirs } = require_mkdirs();
|
|
3424
3424
|
var { pathExists } = require_path_exists();
|
|
3425
3425
|
var { utimesMillis } = require_utimes();
|
|
@@ -3441,7 +3441,7 @@ var require_copy = __commonJS((exports, module) => {
|
|
|
3441
3441
|
const include = await runFilter(src, dest, opts);
|
|
3442
3442
|
if (!include)
|
|
3443
3443
|
return;
|
|
3444
|
-
const destParent =
|
|
3444
|
+
const destParent = path.dirname(dest);
|
|
3445
3445
|
const dirExists = await pathExists(destParent);
|
|
3446
3446
|
if (!dirExists) {
|
|
3447
3447
|
await mkdirs(destParent);
|
|
@@ -3501,8 +3501,8 @@ var require_copy = __commonJS((exports, module) => {
|
|
|
3501
3501
|
await fs.mkdir(dest);
|
|
3502
3502
|
}
|
|
3503
3503
|
await asyncIteratorConcurrentProcess(await fs.opendir(src), async (item) => {
|
|
3504
|
-
const srcItem =
|
|
3505
|
-
const destItem =
|
|
3504
|
+
const srcItem = path.join(src, item.name);
|
|
3505
|
+
const destItem = path.join(dest, item.name);
|
|
3506
3506
|
const include = await runFilter(srcItem, destItem, opts);
|
|
3507
3507
|
if (include) {
|
|
3508
3508
|
const { destStat: destStat2 } = await stat.checkPaths(srcItem, destItem, "copy", opts);
|
|
@@ -3516,7 +3516,7 @@ var require_copy = __commonJS((exports, module) => {
|
|
|
3516
3516
|
async function onLink(destStat, src, dest, opts) {
|
|
3517
3517
|
let resolvedSrc = await fs.readlink(src);
|
|
3518
3518
|
if (opts.dereference) {
|
|
3519
|
-
resolvedSrc =
|
|
3519
|
+
resolvedSrc = path.resolve(process.cwd(), resolvedSrc);
|
|
3520
3520
|
}
|
|
3521
3521
|
if (!destStat) {
|
|
3522
3522
|
return fs.symlink(resolvedSrc, dest);
|
|
@@ -3530,7 +3530,7 @@ var require_copy = __commonJS((exports, module) => {
|
|
|
3530
3530
|
throw e2;
|
|
3531
3531
|
}
|
|
3532
3532
|
if (opts.dereference) {
|
|
3533
|
-
resolvedDest =
|
|
3533
|
+
resolvedDest = path.resolve(process.cwd(), resolvedDest);
|
|
3534
3534
|
}
|
|
3535
3535
|
if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
|
|
3536
3536
|
throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`);
|
|
@@ -3547,7 +3547,7 @@ var require_copy = __commonJS((exports, module) => {
|
|
|
3547
3547
|
// ../../node_modules/.bun/fs-extra@11.3.2/node_modules/fs-extra/lib/copy/copy-sync.js
|
|
3548
3548
|
var require_copy_sync = __commonJS((exports, module) => {
|
|
3549
3549
|
var fs = require_graceful_fs();
|
|
3550
|
-
var
|
|
3550
|
+
var path = __require("path");
|
|
3551
3551
|
var mkdirsSync = require_mkdirs().mkdirsSync;
|
|
3552
3552
|
var utimesMillisSync = require_utimes().utimesMillisSync;
|
|
3553
3553
|
var stat = require_stat();
|
|
@@ -3567,7 +3567,7 @@ var require_copy_sync = __commonJS((exports, module) => {
|
|
|
3567
3567
|
stat.checkParentPathsSync(src, srcStat, dest, "copy");
|
|
3568
3568
|
if (opts.filter && !opts.filter(src, dest))
|
|
3569
3569
|
return;
|
|
3570
|
-
const destParent =
|
|
3570
|
+
const destParent = path.dirname(dest);
|
|
3571
3571
|
if (!fs.existsSync(destParent))
|
|
3572
3572
|
mkdirsSync(destParent);
|
|
3573
3573
|
return getStats(destStat, src, dest, opts);
|
|
@@ -3646,8 +3646,8 @@ var require_copy_sync = __commonJS((exports, module) => {
|
|
|
3646
3646
|
}
|
|
3647
3647
|
}
|
|
3648
3648
|
function copyDirItem(item, src, dest, opts) {
|
|
3649
|
-
const srcItem =
|
|
3650
|
-
const destItem =
|
|
3649
|
+
const srcItem = path.join(src, item);
|
|
3650
|
+
const destItem = path.join(dest, item);
|
|
3651
3651
|
if (opts.filter && !opts.filter(srcItem, destItem))
|
|
3652
3652
|
return;
|
|
3653
3653
|
const { destStat } = stat.checkPathsSync(srcItem, destItem, "copy", opts);
|
|
@@ -3656,7 +3656,7 @@ var require_copy_sync = __commonJS((exports, module) => {
|
|
|
3656
3656
|
function onLink(destStat, src, dest, opts) {
|
|
3657
3657
|
let resolvedSrc = fs.readlinkSync(src);
|
|
3658
3658
|
if (opts.dereference) {
|
|
3659
|
-
resolvedSrc =
|
|
3659
|
+
resolvedSrc = path.resolve(process.cwd(), resolvedSrc);
|
|
3660
3660
|
}
|
|
3661
3661
|
if (!destStat) {
|
|
3662
3662
|
return fs.symlinkSync(resolvedSrc, dest);
|
|
@@ -3670,7 +3670,7 @@ var require_copy_sync = __commonJS((exports, module) => {
|
|
|
3670
3670
|
throw err;
|
|
3671
3671
|
}
|
|
3672
3672
|
if (opts.dereference) {
|
|
3673
|
-
resolvedDest =
|
|
3673
|
+
resolvedDest = path.resolve(process.cwd(), resolvedDest);
|
|
3674
3674
|
}
|
|
3675
3675
|
if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
|
|
3676
3676
|
throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`);
|
|
@@ -3701,11 +3701,11 @@ var require_copy2 = __commonJS((exports, module) => {
|
|
|
3701
3701
|
var require_remove = __commonJS((exports, module) => {
|
|
3702
3702
|
var fs = require_graceful_fs();
|
|
3703
3703
|
var u2 = require_universalify().fromCallback;
|
|
3704
|
-
function remove(
|
|
3705
|
-
fs.rm(
|
|
3704
|
+
function remove(path, callback) {
|
|
3705
|
+
fs.rm(path, { recursive: true, force: true }, callback);
|
|
3706
3706
|
}
|
|
3707
|
-
function removeSync(
|
|
3708
|
-
fs.rmSync(
|
|
3707
|
+
function removeSync(path) {
|
|
3708
|
+
fs.rmSync(path, { recursive: true, force: true });
|
|
3709
3709
|
}
|
|
3710
3710
|
module.exports = {
|
|
3711
3711
|
remove: u2(remove),
|
|
@@ -3717,7 +3717,7 @@ var require_remove = __commonJS((exports, module) => {
|
|
|
3717
3717
|
var require_empty = __commonJS((exports, module) => {
|
|
3718
3718
|
var u2 = require_universalify().fromPromise;
|
|
3719
3719
|
var fs = require_fs();
|
|
3720
|
-
var
|
|
3720
|
+
var path = __require("path");
|
|
3721
3721
|
var mkdir = require_mkdirs();
|
|
3722
3722
|
var remove = require_remove();
|
|
3723
3723
|
var emptyDir = u2(async function emptyDir(dir) {
|
|
@@ -3727,7 +3727,7 @@ var require_empty = __commonJS((exports, module) => {
|
|
|
3727
3727
|
} catch {
|
|
3728
3728
|
return mkdir.mkdirs(dir);
|
|
3729
3729
|
}
|
|
3730
|
-
return Promise.all(items.map((item) => remove.remove(
|
|
3730
|
+
return Promise.all(items.map((item) => remove.remove(path.join(dir, item))));
|
|
3731
3731
|
});
|
|
3732
3732
|
function emptyDirSync(dir) {
|
|
3733
3733
|
let items;
|
|
@@ -3737,7 +3737,7 @@ var require_empty = __commonJS((exports, module) => {
|
|
|
3737
3737
|
return mkdir.mkdirsSync(dir);
|
|
3738
3738
|
}
|
|
3739
3739
|
items.forEach((item) => {
|
|
3740
|
-
item =
|
|
3740
|
+
item = path.join(dir, item);
|
|
3741
3741
|
remove.removeSync(item);
|
|
3742
3742
|
});
|
|
3743
3743
|
}
|
|
@@ -3752,7 +3752,7 @@ var require_empty = __commonJS((exports, module) => {
|
|
|
3752
3752
|
// ../../node_modules/.bun/fs-extra@11.3.2/node_modules/fs-extra/lib/ensure/file.js
|
|
3753
3753
|
var require_file = __commonJS((exports, module) => {
|
|
3754
3754
|
var u2 = require_universalify().fromPromise;
|
|
3755
|
-
var
|
|
3755
|
+
var path = __require("path");
|
|
3756
3756
|
var fs = require_fs();
|
|
3757
3757
|
var mkdir = require_mkdirs();
|
|
3758
3758
|
async function createFile(file) {
|
|
@@ -3762,7 +3762,7 @@ var require_file = __commonJS((exports, module) => {
|
|
|
3762
3762
|
} catch {}
|
|
3763
3763
|
if (stats && stats.isFile())
|
|
3764
3764
|
return;
|
|
3765
|
-
const dir =
|
|
3765
|
+
const dir = path.dirname(file);
|
|
3766
3766
|
let dirStats = null;
|
|
3767
3767
|
try {
|
|
3768
3768
|
dirStats = await fs.stat(dir);
|
|
@@ -3788,7 +3788,7 @@ var require_file = __commonJS((exports, module) => {
|
|
|
3788
3788
|
} catch {}
|
|
3789
3789
|
if (stats && stats.isFile())
|
|
3790
3790
|
return;
|
|
3791
|
-
const dir =
|
|
3791
|
+
const dir = path.dirname(file);
|
|
3792
3792
|
try {
|
|
3793
3793
|
if (!fs.statSync(dir).isDirectory()) {
|
|
3794
3794
|
fs.readdirSync(dir);
|
|
@@ -3810,7 +3810,7 @@ var require_file = __commonJS((exports, module) => {
|
|
|
3810
3810
|
// ../../node_modules/.bun/fs-extra@11.3.2/node_modules/fs-extra/lib/ensure/link.js
|
|
3811
3811
|
var require_link = __commonJS((exports, module) => {
|
|
3812
3812
|
var u2 = require_universalify().fromPromise;
|
|
3813
|
-
var
|
|
3813
|
+
var path = __require("path");
|
|
3814
3814
|
var fs = require_fs();
|
|
3815
3815
|
var mkdir = require_mkdirs();
|
|
3816
3816
|
var { pathExists } = require_path_exists();
|
|
@@ -3829,7 +3829,7 @@ var require_link = __commonJS((exports, module) => {
|
|
|
3829
3829
|
}
|
|
3830
3830
|
if (dstStat && areIdentical(srcStat, dstStat))
|
|
3831
3831
|
return;
|
|
3832
|
-
const dir =
|
|
3832
|
+
const dir = path.dirname(dstpath);
|
|
3833
3833
|
const dirExists = await pathExists(dir);
|
|
3834
3834
|
if (!dirExists) {
|
|
3835
3835
|
await mkdir.mkdirs(dir);
|
|
@@ -3849,7 +3849,7 @@ var require_link = __commonJS((exports, module) => {
|
|
|
3849
3849
|
err.message = err.message.replace("lstat", "ensureLink");
|
|
3850
3850
|
throw err;
|
|
3851
3851
|
}
|
|
3852
|
-
const dir =
|
|
3852
|
+
const dir = path.dirname(dstpath);
|
|
3853
3853
|
const dirExists = fs.existsSync(dir);
|
|
3854
3854
|
if (dirExists)
|
|
3855
3855
|
return fs.linkSync(srcpath, dstpath);
|
|
@@ -3864,12 +3864,12 @@ var require_link = __commonJS((exports, module) => {
|
|
|
3864
3864
|
|
|
3865
3865
|
// ../../node_modules/.bun/fs-extra@11.3.2/node_modules/fs-extra/lib/ensure/symlink-paths.js
|
|
3866
3866
|
var require_symlink_paths = __commonJS((exports, module) => {
|
|
3867
|
-
var
|
|
3867
|
+
var path = __require("path");
|
|
3868
3868
|
var fs = require_fs();
|
|
3869
3869
|
var { pathExists } = require_path_exists();
|
|
3870
3870
|
var u2 = require_universalify().fromPromise;
|
|
3871
3871
|
async function symlinkPaths(srcpath, dstpath) {
|
|
3872
|
-
if (
|
|
3872
|
+
if (path.isAbsolute(srcpath)) {
|
|
3873
3873
|
try {
|
|
3874
3874
|
await fs.lstat(srcpath);
|
|
3875
3875
|
} catch (err) {
|
|
@@ -3881,8 +3881,8 @@ var require_symlink_paths = __commonJS((exports, module) => {
|
|
|
3881
3881
|
toDst: srcpath
|
|
3882
3882
|
};
|
|
3883
3883
|
}
|
|
3884
|
-
const dstdir =
|
|
3885
|
-
const relativeToDst =
|
|
3884
|
+
const dstdir = path.dirname(dstpath);
|
|
3885
|
+
const relativeToDst = path.join(dstdir, srcpath);
|
|
3886
3886
|
const exists = await pathExists(relativeToDst);
|
|
3887
3887
|
if (exists) {
|
|
3888
3888
|
return {
|
|
@@ -3898,11 +3898,11 @@ var require_symlink_paths = __commonJS((exports, module) => {
|
|
|
3898
3898
|
}
|
|
3899
3899
|
return {
|
|
3900
3900
|
toCwd: srcpath,
|
|
3901
|
-
toDst:
|
|
3901
|
+
toDst: path.relative(dstdir, srcpath)
|
|
3902
3902
|
};
|
|
3903
3903
|
}
|
|
3904
3904
|
function symlinkPathsSync(srcpath, dstpath) {
|
|
3905
|
-
if (
|
|
3905
|
+
if (path.isAbsolute(srcpath)) {
|
|
3906
3906
|
const exists2 = fs.existsSync(srcpath);
|
|
3907
3907
|
if (!exists2)
|
|
3908
3908
|
throw new Error("absolute srcpath does not exist");
|
|
@@ -3911,8 +3911,8 @@ var require_symlink_paths = __commonJS((exports, module) => {
|
|
|
3911
3911
|
toDst: srcpath
|
|
3912
3912
|
};
|
|
3913
3913
|
}
|
|
3914
|
-
const dstdir =
|
|
3915
|
-
const relativeToDst =
|
|
3914
|
+
const dstdir = path.dirname(dstpath);
|
|
3915
|
+
const relativeToDst = path.join(dstdir, srcpath);
|
|
3916
3916
|
const exists = fs.existsSync(relativeToDst);
|
|
3917
3917
|
if (exists) {
|
|
3918
3918
|
return {
|
|
@@ -3925,7 +3925,7 @@ var require_symlink_paths = __commonJS((exports, module) => {
|
|
|
3925
3925
|
throw new Error("relative srcpath does not exist");
|
|
3926
3926
|
return {
|
|
3927
3927
|
toCwd: srcpath,
|
|
3928
|
-
toDst:
|
|
3928
|
+
toDst: path.relative(dstdir, srcpath)
|
|
3929
3929
|
};
|
|
3930
3930
|
}
|
|
3931
3931
|
module.exports = {
|
|
@@ -3969,7 +3969,7 @@ var require_symlink_type = __commonJS((exports, module) => {
|
|
|
3969
3969
|
// ../../node_modules/.bun/fs-extra@11.3.2/node_modules/fs-extra/lib/ensure/symlink.js
|
|
3970
3970
|
var require_symlink = __commonJS((exports, module) => {
|
|
3971
3971
|
var u2 = require_universalify().fromPromise;
|
|
3972
|
-
var
|
|
3972
|
+
var path = __require("path");
|
|
3973
3973
|
var fs = require_fs();
|
|
3974
3974
|
var { mkdirs, mkdirsSync } = require_mkdirs();
|
|
3975
3975
|
var { symlinkPaths, symlinkPathsSync } = require_symlink_paths();
|
|
@@ -3989,10 +3989,10 @@ var require_symlink = __commonJS((exports, module) => {
|
|
|
3989
3989
|
if (areIdentical(srcStat, dstStat))
|
|
3990
3990
|
return;
|
|
3991
3991
|
}
|
|
3992
|
-
const
|
|
3993
|
-
srcpath =
|
|
3994
|
-
const toType = await symlinkType(
|
|
3995
|
-
const dir =
|
|
3992
|
+
const relative = await symlinkPaths(srcpath, dstpath);
|
|
3993
|
+
srcpath = relative.toDst;
|
|
3994
|
+
const toType = await symlinkType(relative.toCwd, type);
|
|
3995
|
+
const dir = path.dirname(dstpath);
|
|
3996
3996
|
if (!await pathExists(dir)) {
|
|
3997
3997
|
await mkdirs(dir);
|
|
3998
3998
|
}
|
|
@@ -4009,10 +4009,10 @@ var require_symlink = __commonJS((exports, module) => {
|
|
|
4009
4009
|
if (areIdentical(srcStat, dstStat))
|
|
4010
4010
|
return;
|
|
4011
4011
|
}
|
|
4012
|
-
const
|
|
4013
|
-
srcpath =
|
|
4014
|
-
type = symlinkTypeSync(
|
|
4015
|
-
const dir =
|
|
4012
|
+
const relative = symlinkPathsSync(srcpath, dstpath);
|
|
4013
|
+
srcpath = relative.toDst;
|
|
4014
|
+
type = symlinkTypeSync(relative.toCwd, type);
|
|
4015
|
+
const dir = path.dirname(dstpath);
|
|
4016
4016
|
const exists = fs.existsSync(dir);
|
|
4017
4017
|
if (exists)
|
|
4018
4018
|
return fs.symlinkSync(srcpath, dstpath, type);
|
|
@@ -4147,18 +4147,18 @@ var require_jsonfile2 = __commonJS((exports, module) => {
|
|
|
4147
4147
|
var require_output_file = __commonJS((exports, module) => {
|
|
4148
4148
|
var u2 = require_universalify().fromPromise;
|
|
4149
4149
|
var fs = require_fs();
|
|
4150
|
-
var
|
|
4150
|
+
var path = __require("path");
|
|
4151
4151
|
var mkdir = require_mkdirs();
|
|
4152
4152
|
var pathExists = require_path_exists().pathExists;
|
|
4153
4153
|
async function outputFile(file, data, encoding = "utf-8") {
|
|
4154
|
-
const dir =
|
|
4154
|
+
const dir = path.dirname(file);
|
|
4155
4155
|
if (!await pathExists(dir)) {
|
|
4156
4156
|
await mkdir.mkdirs(dir);
|
|
4157
4157
|
}
|
|
4158
4158
|
return fs.writeFile(file, data, encoding);
|
|
4159
4159
|
}
|
|
4160
4160
|
function outputFileSync(file, ...args) {
|
|
4161
|
-
const dir =
|
|
4161
|
+
const dir = path.dirname(file);
|
|
4162
4162
|
if (!fs.existsSync(dir)) {
|
|
4163
4163
|
mkdir.mkdirsSync(dir);
|
|
4164
4164
|
}
|
|
@@ -4210,7 +4210,7 @@ var require_json = __commonJS((exports, module) => {
|
|
|
4210
4210
|
// ../../node_modules/.bun/fs-extra@11.3.2/node_modules/fs-extra/lib/move/move.js
|
|
4211
4211
|
var require_move = __commonJS((exports, module) => {
|
|
4212
4212
|
var fs = require_fs();
|
|
4213
|
-
var
|
|
4213
|
+
var path = __require("path");
|
|
4214
4214
|
var { copy } = require_copy2();
|
|
4215
4215
|
var { remove } = require_remove();
|
|
4216
4216
|
var { mkdirp } = require_mkdirs();
|
|
@@ -4220,8 +4220,8 @@ var require_move = __commonJS((exports, module) => {
|
|
|
4220
4220
|
const overwrite = opts.overwrite || opts.clobber || false;
|
|
4221
4221
|
const { srcStat, isChangingCase = false } = await stat.checkPaths(src, dest, "move", opts);
|
|
4222
4222
|
await stat.checkParentPaths(src, srcStat, dest, "move");
|
|
4223
|
-
const destParent =
|
|
4224
|
-
const parsedParentPath =
|
|
4223
|
+
const destParent = path.dirname(dest);
|
|
4224
|
+
const parsedParentPath = path.parse(destParent);
|
|
4225
4225
|
if (parsedParentPath.root !== destParent) {
|
|
4226
4226
|
await mkdirp(destParent);
|
|
4227
4227
|
}
|
|
@@ -4259,7 +4259,7 @@ var require_move = __commonJS((exports, module) => {
|
|
|
4259
4259
|
// ../../node_modules/.bun/fs-extra@11.3.2/node_modules/fs-extra/lib/move/move-sync.js
|
|
4260
4260
|
var require_move_sync = __commonJS((exports, module) => {
|
|
4261
4261
|
var fs = require_graceful_fs();
|
|
4262
|
-
var
|
|
4262
|
+
var path = __require("path");
|
|
4263
4263
|
var copySync = require_copy2().copySync;
|
|
4264
4264
|
var removeSync = require_remove().removeSync;
|
|
4265
4265
|
var mkdirpSync = require_mkdirs().mkdirpSync;
|
|
@@ -4270,12 +4270,12 @@ var require_move_sync = __commonJS((exports, module) => {
|
|
|
4270
4270
|
const { srcStat, isChangingCase = false } = stat.checkPathsSync(src, dest, "move", opts);
|
|
4271
4271
|
stat.checkParentPathsSync(src, srcStat, dest, "move");
|
|
4272
4272
|
if (!isParentRoot(dest))
|
|
4273
|
-
mkdirpSync(
|
|
4273
|
+
mkdirpSync(path.dirname(dest));
|
|
4274
4274
|
return doRename(src, dest, overwrite, isChangingCase);
|
|
4275
4275
|
}
|
|
4276
4276
|
function isParentRoot(dest) {
|
|
4277
|
-
const parent =
|
|
4278
|
-
const parsedPath =
|
|
4277
|
+
const parent = path.dirname(dest);
|
|
4278
|
+
const parsedPath = path.parse(parent);
|
|
4279
4279
|
return parsedPath.root === parent;
|
|
4280
4280
|
}
|
|
4281
4281
|
function doRename(src, dest, overwrite, isChangingCase) {
|
|
@@ -4397,7 +4397,7 @@ var require_path = __commonJS((exports) => {
|
|
|
4397
4397
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4398
4398
|
exports.convertPosixPathToPattern = exports.convertWindowsPathToPattern = exports.convertPathToPattern = exports.escapePosixPath = exports.escapeWindowsPath = exports.escape = exports.removeLeadingDotSegment = exports.makeAbsolute = exports.unixify = undefined;
|
|
4399
4399
|
var os = __require("os");
|
|
4400
|
-
var
|
|
4400
|
+
var path = __require("path");
|
|
4401
4401
|
var IS_WINDOWS_PLATFORM = os.platform() === "win32";
|
|
4402
4402
|
var LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2;
|
|
4403
4403
|
var POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g;
|
|
@@ -4409,7 +4409,7 @@ var require_path = __commonJS((exports) => {
|
|
|
4409
4409
|
}
|
|
4410
4410
|
exports.unixify = unixify;
|
|
4411
4411
|
function makeAbsolute(cwd, filepath) {
|
|
4412
|
-
return
|
|
4412
|
+
return path.resolve(cwd, filepath);
|
|
4413
4413
|
}
|
|
4414
4414
|
exports.makeAbsolute = makeAbsolute;
|
|
4415
4415
|
function removeLeadingDotSegment(entry) {
|
|
@@ -5106,7 +5106,7 @@ var require_fill_range = __commonJS((exports, module) => {
|
|
|
5106
5106
|
let padded = zeros(startString) || zeros(endString) || zeros(stepString);
|
|
5107
5107
|
let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0;
|
|
5108
5108
|
let toNumber = padded === false && stringify(start, end, options) === false;
|
|
5109
|
-
let
|
|
5109
|
+
let format = options.transform || transform(toNumber);
|
|
5110
5110
|
if (options.toRegex && step === 1) {
|
|
5111
5111
|
return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options);
|
|
5112
5112
|
}
|
|
@@ -5118,7 +5118,7 @@ var require_fill_range = __commonJS((exports, module) => {
|
|
|
5118
5118
|
if (options.toRegex === true && step > 1) {
|
|
5119
5119
|
push(a);
|
|
5120
5120
|
} else {
|
|
5121
|
-
range.push(pad(
|
|
5121
|
+
range.push(pad(format(a, index), maxLen, toNumber));
|
|
5122
5122
|
}
|
|
5123
5123
|
a = descending ? a - step : a + step;
|
|
5124
5124
|
index++;
|
|
@@ -5132,7 +5132,7 @@ var require_fill_range = __commonJS((exports, module) => {
|
|
|
5132
5132
|
if (!isNumber(start) && start.length > 1 || !isNumber(end) && end.length > 1) {
|
|
5133
5133
|
return invalidRange(start, end, options);
|
|
5134
5134
|
}
|
|
5135
|
-
let
|
|
5135
|
+
let format = options.transform || ((val) => String.fromCharCode(val));
|
|
5136
5136
|
let a = `${start}`.charCodeAt(0);
|
|
5137
5137
|
let b3 = `${end}`.charCodeAt(0);
|
|
5138
5138
|
let descending = a > b3;
|
|
@@ -5144,7 +5144,7 @@ var require_fill_range = __commonJS((exports, module) => {
|
|
|
5144
5144
|
let range = [];
|
|
5145
5145
|
let index = 0;
|
|
5146
5146
|
while (descending ? a >= b3 : a <= b3) {
|
|
5147
|
-
range.push(
|
|
5147
|
+
range.push(format(a, index));
|
|
5148
5148
|
a = descending ? a - step : a + step;
|
|
5149
5149
|
index++;
|
|
5150
5150
|
}
|
|
@@ -5398,7 +5398,7 @@ var require_parse = __commonJS((exports, module) => {
|
|
|
5398
5398
|
CHAR_NO_BREAK_SPACE,
|
|
5399
5399
|
CHAR_ZERO_WIDTH_NOBREAK_SPACE
|
|
5400
5400
|
} = require_constants();
|
|
5401
|
-
var
|
|
5401
|
+
var parse = (input, options = {}) => {
|
|
5402
5402
|
if (typeof input !== "string") {
|
|
5403
5403
|
throw new TypeError("Expected a string");
|
|
5404
5404
|
}
|
|
@@ -5602,7 +5602,7 @@ var require_parse = __commonJS((exports, module) => {
|
|
|
5602
5602
|
push({ type: "eos" });
|
|
5603
5603
|
return ast;
|
|
5604
5604
|
};
|
|
5605
|
-
module.exports =
|
|
5605
|
+
module.exports = parse;
|
|
5606
5606
|
});
|
|
5607
5607
|
|
|
5608
5608
|
// ../../node_modules/.bun/braces@3.0.3/node_modules/braces/index.js
|
|
@@ -5610,7 +5610,7 @@ var require_braces = __commonJS((exports, module) => {
|
|
|
5610
5610
|
var stringify = require_stringify();
|
|
5611
5611
|
var compile = require_compile();
|
|
5612
5612
|
var expand = require_expand();
|
|
5613
|
-
var
|
|
5613
|
+
var parse = require_parse();
|
|
5614
5614
|
var braces = (input, options = {}) => {
|
|
5615
5615
|
let output = [];
|
|
5616
5616
|
if (Array.isArray(input)) {
|
|
@@ -5630,7 +5630,7 @@ var require_braces = __commonJS((exports, module) => {
|
|
|
5630
5630
|
}
|
|
5631
5631
|
return output;
|
|
5632
5632
|
};
|
|
5633
|
-
braces.parse = (input, options = {}) =>
|
|
5633
|
+
braces.parse = (input, options = {}) => parse(input, options);
|
|
5634
5634
|
braces.stringify = (input, options = {}) => {
|
|
5635
5635
|
if (typeof input === "string") {
|
|
5636
5636
|
return stringify(braces.parse(input, options), options);
|
|
@@ -5667,7 +5667,7 @@ var require_braces = __commonJS((exports, module) => {
|
|
|
5667
5667
|
|
|
5668
5668
|
// ../../node_modules/.bun/picomatch@2.3.1/node_modules/picomatch/lib/constants.js
|
|
5669
5669
|
var require_constants2 = __commonJS((exports, module) => {
|
|
5670
|
-
var
|
|
5670
|
+
var path = __require("path");
|
|
5671
5671
|
var WIN_SLASH = "\\\\/";
|
|
5672
5672
|
var WIN_NO_SLASH = `[^${WIN_SLASH}]`;
|
|
5673
5673
|
var DOT_LITERAL = "\\.";
|
|
@@ -5789,7 +5789,7 @@ var require_constants2 = __commonJS((exports, module) => {
|
|
|
5789
5789
|
CHAR_UNDERSCORE: 95,
|
|
5790
5790
|
CHAR_VERTICAL_LINE: 124,
|
|
5791
5791
|
CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
|
|
5792
|
-
SEP:
|
|
5792
|
+
SEP: path.sep,
|
|
5793
5793
|
extglobChars(chars) {
|
|
5794
5794
|
return {
|
|
5795
5795
|
"!": { type: "negate", open: "(?:(?!(?:", close: `))${chars.STAR})` },
|
|
@@ -5807,7 +5807,7 @@ var require_constants2 = __commonJS((exports, module) => {
|
|
|
5807
5807
|
|
|
5808
5808
|
// ../../node_modules/.bun/picomatch@2.3.1/node_modules/picomatch/lib/utils.js
|
|
5809
5809
|
var require_utils4 = __commonJS((exports) => {
|
|
5810
|
-
var
|
|
5810
|
+
var path = __require("path");
|
|
5811
5811
|
var win32 = process.platform === "win32";
|
|
5812
5812
|
var {
|
|
5813
5813
|
REGEX_BACKSLASH,
|
|
@@ -5836,7 +5836,7 @@ var require_utils4 = __commonJS((exports) => {
|
|
|
5836
5836
|
if (options && typeof options.windows === "boolean") {
|
|
5837
5837
|
return options.windows;
|
|
5838
5838
|
}
|
|
5839
|
-
return win32 === true ||
|
|
5839
|
+
return win32 === true || path.sep === "\\";
|
|
5840
5840
|
};
|
|
5841
5841
|
exports.escapeLast = (input, char, lastIdx) => {
|
|
5842
5842
|
const idx = input.lastIndexOf(char, lastIdx);
|
|
@@ -6207,7 +6207,7 @@ var require_parse2 = __commonJS((exports, module) => {
|
|
|
6207
6207
|
var syntaxError = (type, char) => {
|
|
6208
6208
|
return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
|
|
6209
6209
|
};
|
|
6210
|
-
var
|
|
6210
|
+
var parse = (input, options) => {
|
|
6211
6211
|
if (typeof input !== "string") {
|
|
6212
6212
|
throw new TypeError("Expected a string");
|
|
6213
6213
|
}
|
|
@@ -6357,7 +6357,7 @@ var require_parse2 = __commonJS((exports, module) => {
|
|
|
6357
6357
|
output = token.close = `)$))${extglobStar}`;
|
|
6358
6358
|
}
|
|
6359
6359
|
if (token.inner.includes("*") && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) {
|
|
6360
|
-
const expression =
|
|
6360
|
+
const expression = parse(rest, { ...options, fastpaths: false }).output;
|
|
6361
6361
|
output = token.close = `)${expression})${extglobStar})`;
|
|
6362
6362
|
}
|
|
6363
6363
|
if (token.prev.type === "bos") {
|
|
@@ -6886,7 +6886,7 @@ var require_parse2 = __commonJS((exports, module) => {
|
|
|
6886
6886
|
}
|
|
6887
6887
|
return state;
|
|
6888
6888
|
};
|
|
6889
|
-
|
|
6889
|
+
parse.fastpaths = (input, options) => {
|
|
6890
6890
|
const opts = { ...options };
|
|
6891
6891
|
const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
|
|
6892
6892
|
const len = input.length;
|
|
@@ -6955,14 +6955,14 @@ var require_parse2 = __commonJS((exports, module) => {
|
|
|
6955
6955
|
}
|
|
6956
6956
|
return source;
|
|
6957
6957
|
};
|
|
6958
|
-
module.exports =
|
|
6958
|
+
module.exports = parse;
|
|
6959
6959
|
});
|
|
6960
6960
|
|
|
6961
6961
|
// ../../node_modules/.bun/picomatch@2.3.1/node_modules/picomatch/lib/picomatch.js
|
|
6962
6962
|
var require_picomatch = __commonJS((exports, module) => {
|
|
6963
|
-
var
|
|
6963
|
+
var path = __require("path");
|
|
6964
6964
|
var scan = require_scan();
|
|
6965
|
-
var
|
|
6965
|
+
var parse = require_parse2();
|
|
6966
6966
|
var utils = require_utils4();
|
|
6967
6967
|
var constants = require_constants2();
|
|
6968
6968
|
var isObject = (val) => val && typeof val === "object" && !Array.isArray(val);
|
|
@@ -7028,11 +7028,11 @@ var require_picomatch = __commonJS((exports, module) => {
|
|
|
7028
7028
|
return { isMatch: false, output: "" };
|
|
7029
7029
|
}
|
|
7030
7030
|
const opts = options || {};
|
|
7031
|
-
const
|
|
7031
|
+
const format = opts.format || (posix ? utils.toPosixSlashes : null);
|
|
7032
7032
|
let match = input === glob;
|
|
7033
|
-
let output = match &&
|
|
7033
|
+
let output = match && format ? format(input) : input;
|
|
7034
7034
|
if (match === false) {
|
|
7035
|
-
output =
|
|
7035
|
+
output = format ? format(input) : input;
|
|
7036
7036
|
match = output === glob;
|
|
7037
7037
|
}
|
|
7038
7038
|
if (match === false || opts.capture === true) {
|
|
@@ -7046,13 +7046,13 @@ var require_picomatch = __commonJS((exports, module) => {
|
|
|
7046
7046
|
};
|
|
7047
7047
|
picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
|
|
7048
7048
|
const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
|
|
7049
|
-
return regex.test(
|
|
7049
|
+
return regex.test(path.basename(input));
|
|
7050
7050
|
};
|
|
7051
7051
|
picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
|
|
7052
7052
|
picomatch.parse = (pattern, options) => {
|
|
7053
7053
|
if (Array.isArray(pattern))
|
|
7054
7054
|
return pattern.map((p2) => picomatch.parse(p2, options));
|
|
7055
|
-
return
|
|
7055
|
+
return parse(pattern, { ...options, fastpaths: false });
|
|
7056
7056
|
};
|
|
7057
7057
|
picomatch.scan = (input, options) => scan(input, options);
|
|
7058
7058
|
picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => {
|
|
@@ -7078,10 +7078,10 @@ var require_picomatch = __commonJS((exports, module) => {
|
|
|
7078
7078
|
}
|
|
7079
7079
|
let parsed = { negated: false, fastpaths: true };
|
|
7080
7080
|
if (options.fastpaths !== false && (input[0] === "." || input[0] === "*")) {
|
|
7081
|
-
parsed.output =
|
|
7081
|
+
parsed.output = parse.fastpaths(input, options);
|
|
7082
7082
|
}
|
|
7083
7083
|
if (!parsed.output) {
|
|
7084
|
-
parsed =
|
|
7084
|
+
parsed = parse(input, options);
|
|
7085
7085
|
}
|
|
7086
7086
|
return picomatch.compileRe(parsed, options, returnOutput, returnState);
|
|
7087
7087
|
};
|
|
@@ -7267,7 +7267,7 @@ var require_micromatch = __commonJS((exports, module) => {
|
|
|
7267
7267
|
var require_pattern = __commonJS((exports) => {
|
|
7268
7268
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7269
7269
|
exports.isAbsolute = exports.partitionAbsoluteAndRelative = exports.removeDuplicateSlashes = exports.matchAny = exports.convertPatternsToRe = exports.makeRe = exports.getPatternParts = exports.expandBraceExpansion = exports.expandPatternsWithBraceExpansion = exports.isAffectDepthOfReadingPattern = exports.endsWithSlashGlobStar = exports.hasGlobStar = exports.getBaseDirectory = exports.isPatternRelatedToParentDirectory = exports.getPatternsOutsideCurrentDirectory = exports.getPatternsInsideCurrentDirectory = exports.getPositivePatterns = exports.getNegativePatterns = exports.isPositivePattern = exports.isNegativePattern = exports.convertToNegativePattern = exports.convertToPositivePattern = exports.isDynamicPattern = exports.isStaticPattern = undefined;
|
|
7270
|
-
var
|
|
7270
|
+
var path = __require("path");
|
|
7271
7271
|
var globParent = require_glob_parent();
|
|
7272
7272
|
var micromatch = require_micromatch();
|
|
7273
7273
|
var GLOBSTAR = "**";
|
|
@@ -7362,8 +7362,8 @@ var require_pattern = __commonJS((exports) => {
|
|
|
7362
7362
|
}
|
|
7363
7363
|
exports.endsWithSlashGlobStar = endsWithSlashGlobStar;
|
|
7364
7364
|
function isAffectDepthOfReadingPattern(pattern) {
|
|
7365
|
-
const
|
|
7366
|
-
return endsWithSlashGlobStar(pattern) || isStaticPattern(
|
|
7365
|
+
const basename = path.basename(pattern);
|
|
7366
|
+
return endsWithSlashGlobStar(pattern) || isStaticPattern(basename);
|
|
7367
7367
|
}
|
|
7368
7368
|
exports.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern;
|
|
7369
7369
|
function expandPatternsWithBraceExpansion(patterns) {
|
|
@@ -7408,21 +7408,21 @@ var require_pattern = __commonJS((exports) => {
|
|
|
7408
7408
|
exports.removeDuplicateSlashes = removeDuplicateSlashes;
|
|
7409
7409
|
function partitionAbsoluteAndRelative(patterns) {
|
|
7410
7410
|
const absolute = [];
|
|
7411
|
-
const
|
|
7411
|
+
const relative = [];
|
|
7412
7412
|
for (const pattern of patterns) {
|
|
7413
|
-
if (
|
|
7413
|
+
if (isAbsolute(pattern)) {
|
|
7414
7414
|
absolute.push(pattern);
|
|
7415
7415
|
} else {
|
|
7416
|
-
|
|
7416
|
+
relative.push(pattern);
|
|
7417
7417
|
}
|
|
7418
7418
|
}
|
|
7419
|
-
return [absolute,
|
|
7419
|
+
return [absolute, relative];
|
|
7420
7420
|
}
|
|
7421
7421
|
exports.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative;
|
|
7422
|
-
function
|
|
7423
|
-
return
|
|
7422
|
+
function isAbsolute(pattern) {
|
|
7423
|
+
return path.isAbsolute(pattern);
|
|
7424
7424
|
}
|
|
7425
|
-
exports.isAbsolute =
|
|
7425
|
+
exports.isAbsolute = isAbsolute;
|
|
7426
7426
|
});
|
|
7427
7427
|
|
|
7428
7428
|
// ../../node_modules/.bun/merge2@1.4.1/node_modules/merge2/index.js
|
|
@@ -7585,8 +7585,8 @@ var require_utils5 = __commonJS((exports) => {
|
|
|
7585
7585
|
exports.errno = errno;
|
|
7586
7586
|
var fs = require_fs2();
|
|
7587
7587
|
exports.fs = fs;
|
|
7588
|
-
var
|
|
7589
|
-
exports.path =
|
|
7588
|
+
var path = require_path();
|
|
7589
|
+
exports.path = path;
|
|
7590
7590
|
var pattern = require_pattern();
|
|
7591
7591
|
exports.pattern = pattern;
|
|
7592
7592
|
var stream = require_stream();
|
|
@@ -7682,8 +7682,8 @@ var require_tasks = __commonJS((exports) => {
|
|
|
7682
7682
|
var require_async2 = __commonJS((exports) => {
|
|
7683
7683
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7684
7684
|
exports.read = undefined;
|
|
7685
|
-
function read(
|
|
7686
|
-
settings.fs.lstat(
|
|
7685
|
+
function read(path, settings, callback) {
|
|
7686
|
+
settings.fs.lstat(path, (lstatError, lstat) => {
|
|
7687
7687
|
if (lstatError !== null) {
|
|
7688
7688
|
callFailureCallback(callback, lstatError);
|
|
7689
7689
|
return;
|
|
@@ -7692,7 +7692,7 @@ var require_async2 = __commonJS((exports) => {
|
|
|
7692
7692
|
callSuccessCallback(callback, lstat);
|
|
7693
7693
|
return;
|
|
7694
7694
|
}
|
|
7695
|
-
settings.fs.stat(
|
|
7695
|
+
settings.fs.stat(path, (statError, stat) => {
|
|
7696
7696
|
if (statError !== null) {
|
|
7697
7697
|
if (settings.throwErrorOnBrokenSymbolicLink) {
|
|
7698
7698
|
callFailureCallback(callback, statError);
|
|
@@ -7721,13 +7721,13 @@ var require_async2 = __commonJS((exports) => {
|
|
|
7721
7721
|
var require_sync = __commonJS((exports) => {
|
|
7722
7722
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7723
7723
|
exports.read = undefined;
|
|
7724
|
-
function read(
|
|
7725
|
-
const lstat = settings.fs.lstatSync(
|
|
7724
|
+
function read(path, settings) {
|
|
7725
|
+
const lstat = settings.fs.lstatSync(path);
|
|
7726
7726
|
if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
|
|
7727
7727
|
return lstat;
|
|
7728
7728
|
}
|
|
7729
7729
|
try {
|
|
7730
|
-
const stat = settings.fs.statSync(
|
|
7730
|
+
const stat = settings.fs.statSync(path);
|
|
7731
7731
|
if (settings.markSymbolicLink) {
|
|
7732
7732
|
stat.isSymbolicLink = () => true;
|
|
7733
7733
|
}
|
|
@@ -7790,17 +7790,17 @@ var require_out = __commonJS((exports) => {
|
|
|
7790
7790
|
var sync = require_sync();
|
|
7791
7791
|
var settings_1 = require_settings();
|
|
7792
7792
|
exports.Settings = settings_1.default;
|
|
7793
|
-
function stat(
|
|
7793
|
+
function stat(path, optionsOrSettingsOrCallback, callback) {
|
|
7794
7794
|
if (typeof optionsOrSettingsOrCallback === "function") {
|
|
7795
|
-
async.read(
|
|
7795
|
+
async.read(path, getSettings(), optionsOrSettingsOrCallback);
|
|
7796
7796
|
return;
|
|
7797
7797
|
}
|
|
7798
|
-
async.read(
|
|
7798
|
+
async.read(path, getSettings(optionsOrSettingsOrCallback), callback);
|
|
7799
7799
|
}
|
|
7800
7800
|
exports.stat = stat;
|
|
7801
|
-
function statSync(
|
|
7801
|
+
function statSync(path, optionsOrSettings) {
|
|
7802
7802
|
const settings = getSettings(optionsOrSettings);
|
|
7803
|
-
return sync.read(
|
|
7803
|
+
return sync.read(path, settings);
|
|
7804
7804
|
}
|
|
7805
7805
|
exports.statSync = statSync;
|
|
7806
7806
|
function getSettings(settingsOrOptions = {}) {
|
|
@@ -8003,16 +8003,16 @@ var require_async3 = __commonJS((exports) => {
|
|
|
8003
8003
|
return;
|
|
8004
8004
|
}
|
|
8005
8005
|
const tasks = names.map((name) => {
|
|
8006
|
-
const
|
|
8006
|
+
const path = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
|
|
8007
8007
|
return (done) => {
|
|
8008
|
-
fsStat.stat(
|
|
8008
|
+
fsStat.stat(path, settings.fsStatSettings, (error, stats) => {
|
|
8009
8009
|
if (error !== null) {
|
|
8010
8010
|
done(error);
|
|
8011
8011
|
return;
|
|
8012
8012
|
}
|
|
8013
8013
|
const entry = {
|
|
8014
8014
|
name,
|
|
8015
|
-
path
|
|
8015
|
+
path,
|
|
8016
8016
|
dirent: utils.fs.createDirentFromStats(name, stats)
|
|
8017
8017
|
};
|
|
8018
8018
|
if (settings.stats) {
|
|
@@ -8121,7 +8121,7 @@ var require_fs5 = __commonJS((exports) => {
|
|
|
8121
8121
|
// ../../node_modules/.bun/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/settings.js
|
|
8122
8122
|
var require_settings2 = __commonJS((exports) => {
|
|
8123
8123
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8124
|
-
var
|
|
8124
|
+
var path = __require("path");
|
|
8125
8125
|
var fsStat = require_out();
|
|
8126
8126
|
var fs = require_fs5();
|
|
8127
8127
|
|
|
@@ -8130,7 +8130,7 @@ var require_settings2 = __commonJS((exports) => {
|
|
|
8130
8130
|
this._options = _options;
|
|
8131
8131
|
this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false);
|
|
8132
8132
|
this.fs = fs.createFileSystemAdapter(this._options.fs);
|
|
8133
|
-
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator,
|
|
8133
|
+
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path.sep);
|
|
8134
8134
|
this.stats = this._getValue(this._options.stats, false);
|
|
8135
8135
|
this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
|
|
8136
8136
|
this.fsStatSettings = new fsStat.Settings({
|
|
@@ -8154,17 +8154,17 @@ var require_out2 = __commonJS((exports) => {
|
|
|
8154
8154
|
var sync = require_sync2();
|
|
8155
8155
|
var settings_1 = require_settings2();
|
|
8156
8156
|
exports.Settings = settings_1.default;
|
|
8157
|
-
function scandir(
|
|
8157
|
+
function scandir(path, optionsOrSettingsOrCallback, callback) {
|
|
8158
8158
|
if (typeof optionsOrSettingsOrCallback === "function") {
|
|
8159
|
-
async.read(
|
|
8159
|
+
async.read(path, getSettings(), optionsOrSettingsOrCallback);
|
|
8160
8160
|
return;
|
|
8161
8161
|
}
|
|
8162
|
-
async.read(
|
|
8162
|
+
async.read(path, getSettings(optionsOrSettingsOrCallback), callback);
|
|
8163
8163
|
}
|
|
8164
8164
|
exports.scandir = scandir;
|
|
8165
|
-
function scandirSync(
|
|
8165
|
+
function scandirSync(path, optionsOrSettings) {
|
|
8166
8166
|
const settings = getSettings(optionsOrSettings);
|
|
8167
|
-
return sync.read(
|
|
8167
|
+
return sync.read(path, settings);
|
|
8168
8168
|
}
|
|
8169
8169
|
exports.scandirSync = scandirSync;
|
|
8170
8170
|
function getSettings(settingsOrOptions = {}) {
|
|
@@ -8415,42 +8415,42 @@ var require_queue = __commonJS((exports, module) => {
|
|
|
8415
8415
|
queue.drained = drained;
|
|
8416
8416
|
return queue;
|
|
8417
8417
|
function push(value) {
|
|
8418
|
-
var p2 = new Promise(function(
|
|
8418
|
+
var p2 = new Promise(function(resolve, reject) {
|
|
8419
8419
|
pushCb(value, function(err, result) {
|
|
8420
8420
|
if (err) {
|
|
8421
8421
|
reject(err);
|
|
8422
8422
|
return;
|
|
8423
8423
|
}
|
|
8424
|
-
|
|
8424
|
+
resolve(result);
|
|
8425
8425
|
});
|
|
8426
8426
|
});
|
|
8427
8427
|
p2.catch(noop);
|
|
8428
8428
|
return p2;
|
|
8429
8429
|
}
|
|
8430
8430
|
function unshift(value) {
|
|
8431
|
-
var p2 = new Promise(function(
|
|
8431
|
+
var p2 = new Promise(function(resolve, reject) {
|
|
8432
8432
|
unshiftCb(value, function(err, result) {
|
|
8433
8433
|
if (err) {
|
|
8434
8434
|
reject(err);
|
|
8435
8435
|
return;
|
|
8436
8436
|
}
|
|
8437
|
-
|
|
8437
|
+
resolve(result);
|
|
8438
8438
|
});
|
|
8439
8439
|
});
|
|
8440
8440
|
p2.catch(noop);
|
|
8441
8441
|
return p2;
|
|
8442
8442
|
}
|
|
8443
8443
|
function drained() {
|
|
8444
|
-
var p2 = new Promise(function(
|
|
8444
|
+
var p2 = new Promise(function(resolve) {
|
|
8445
8445
|
process.nextTick(function() {
|
|
8446
8446
|
if (queue.idle()) {
|
|
8447
|
-
|
|
8447
|
+
resolve();
|
|
8448
8448
|
} else {
|
|
8449
8449
|
var previousDrain = queue.drain;
|
|
8450
8450
|
queue.drain = function() {
|
|
8451
8451
|
if (typeof previousDrain === "function")
|
|
8452
8452
|
previousDrain();
|
|
8453
|
-
|
|
8453
|
+
resolve();
|
|
8454
8454
|
queue.drain = previousDrain;
|
|
8455
8455
|
};
|
|
8456
8456
|
}
|
|
@@ -8765,7 +8765,7 @@ var require_sync4 = __commonJS((exports) => {
|
|
|
8765
8765
|
// ../../node_modules/.bun/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/settings.js
|
|
8766
8766
|
var require_settings3 = __commonJS((exports) => {
|
|
8767
8767
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8768
|
-
var
|
|
8768
|
+
var path = __require("path");
|
|
8769
8769
|
var fsScandir = require_out2();
|
|
8770
8770
|
|
|
8771
8771
|
class Settings {
|
|
@@ -8776,7 +8776,7 @@ var require_settings3 = __commonJS((exports) => {
|
|
|
8776
8776
|
this.deepFilter = this._getValue(this._options.deepFilter, null);
|
|
8777
8777
|
this.entryFilter = this._getValue(this._options.entryFilter, null);
|
|
8778
8778
|
this.errorFilter = this._getValue(this._options.errorFilter, null);
|
|
8779
|
-
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator,
|
|
8779
|
+
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path.sep);
|
|
8780
8780
|
this.fsScandirSettings = new fsScandir.Settings({
|
|
8781
8781
|
followSymbolicLinks: this._options.followSymbolicLinks,
|
|
8782
8782
|
fs: this._options.fs,
|
|
@@ -8832,7 +8832,7 @@ var require_out3 = __commonJS((exports) => {
|
|
|
8832
8832
|
// ../../node_modules/.bun/fast-glob@3.3.3/node_modules/fast-glob/out/readers/reader.js
|
|
8833
8833
|
var require_reader2 = __commonJS((exports) => {
|
|
8834
8834
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8835
|
-
var
|
|
8835
|
+
var path = __require("path");
|
|
8836
8836
|
var fsStat = require_out();
|
|
8837
8837
|
var utils = require_utils5();
|
|
8838
8838
|
|
|
@@ -8846,7 +8846,7 @@ var require_reader2 = __commonJS((exports) => {
|
|
|
8846
8846
|
});
|
|
8847
8847
|
}
|
|
8848
8848
|
_getFullEntryPath(filepath) {
|
|
8849
|
-
return
|
|
8849
|
+
return path.resolve(this._settings.cwd, filepath);
|
|
8850
8850
|
}
|
|
8851
8851
|
_makeEntry(stats, pattern) {
|
|
8852
8852
|
const entry = {
|
|
@@ -8911,9 +8911,9 @@ var require_stream3 = __commonJS((exports) => {
|
|
|
8911
8911
|
});
|
|
8912
8912
|
}
|
|
8913
8913
|
_getStat(filepath) {
|
|
8914
|
-
return new Promise((
|
|
8914
|
+
return new Promise((resolve, reject) => {
|
|
8915
8915
|
this._stat(filepath, this._fsStatSettings, (error, stats) => {
|
|
8916
|
-
return error === null ?
|
|
8916
|
+
return error === null ? resolve(stats) : reject(error);
|
|
8917
8917
|
});
|
|
8918
8918
|
});
|
|
8919
8919
|
}
|
|
@@ -8935,10 +8935,10 @@ var require_async6 = __commonJS((exports) => {
|
|
|
8935
8935
|
this._readerStream = new stream_1.default(this._settings);
|
|
8936
8936
|
}
|
|
8937
8937
|
dynamic(root, options) {
|
|
8938
|
-
return new Promise((
|
|
8938
|
+
return new Promise((resolve, reject) => {
|
|
8939
8939
|
this._walkAsync(root, options, (error, entries) => {
|
|
8940
8940
|
if (error === null) {
|
|
8941
|
-
|
|
8941
|
+
resolve(entries);
|
|
8942
8942
|
} else {
|
|
8943
8943
|
reject(error);
|
|
8944
8944
|
}
|
|
@@ -8948,10 +8948,10 @@ var require_async6 = __commonJS((exports) => {
|
|
|
8948
8948
|
async static(patterns, options) {
|
|
8949
8949
|
const entries = [];
|
|
8950
8950
|
const stream = this._readerStream.static(patterns, options);
|
|
8951
|
-
return new Promise((
|
|
8951
|
+
return new Promise((resolve, reject) => {
|
|
8952
8952
|
stream.once("error", reject);
|
|
8953
8953
|
stream.on("data", (entry) => entries.push(entry));
|
|
8954
|
-
stream.once("end", () =>
|
|
8954
|
+
stream.once("end", () => resolve(entries));
|
|
8955
8955
|
});
|
|
8956
8956
|
}
|
|
8957
8957
|
}
|
|
@@ -9243,7 +9243,7 @@ var require_entry2 = __commonJS((exports) => {
|
|
|
9243
9243
|
// ../../node_modules/.bun/fast-glob@3.3.3/node_modules/fast-glob/out/providers/provider.js
|
|
9244
9244
|
var require_provider = __commonJS((exports) => {
|
|
9245
9245
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9246
|
-
var
|
|
9246
|
+
var path = __require("path");
|
|
9247
9247
|
var deep_1 = require_deep();
|
|
9248
9248
|
var entry_1 = require_entry();
|
|
9249
9249
|
var error_1 = require_error2();
|
|
@@ -9258,7 +9258,7 @@ var require_provider = __commonJS((exports) => {
|
|
|
9258
9258
|
this.entryTransformer = new entry_2.default(this._settings);
|
|
9259
9259
|
}
|
|
9260
9260
|
_getRootDirectory(task) {
|
|
9261
|
-
return
|
|
9261
|
+
return path.resolve(this._settings.cwd, task.base);
|
|
9262
9262
|
}
|
|
9263
9263
|
_getReaderOptions(task) {
|
|
9264
9264
|
const basePath = task.base === "." ? "" : task.base;
|
|
@@ -11380,10 +11380,6 @@ var xe = (t = "") => {
|
|
|
11380
11380
|
|
|
11381
11381
|
`);
|
|
11382
11382
|
};
|
|
11383
|
-
var Ie = (t = "") => {
|
|
11384
|
-
process.stdout.write(`${import_picocolors2.default.gray(ue)} ${t}
|
|
11385
|
-
`);
|
|
11386
|
-
};
|
|
11387
11383
|
var Se = (t = "") => {
|
|
11388
11384
|
process.stdout.write(`${import_picocolors2.default.gray(o)}
|
|
11389
11385
|
${import_picocolors2.default.gray(d2)} ${t}
|
|
@@ -11467,10 +11463,27 @@ var Y2 = ({ indicator: t = "dots" } = {}) => {
|
|
|
11467
11463
|
};
|
|
11468
11464
|
|
|
11469
11465
|
// src/index.ts
|
|
11470
|
-
var
|
|
11466
|
+
var import_picocolors6 = __toESM(require_picocolors(), 1);
|
|
11471
11467
|
|
|
11472
|
-
// src/
|
|
11473
|
-
var
|
|
11468
|
+
// ../core/src/banner.ts
|
|
11469
|
+
var import_picocolors3 = __toESM(require_picocolors(), 1);
|
|
11470
|
+
var banner = `
|
|
11471
|
+
${import_picocolors3.default.yellow(" ____ __ _ __ \uD83C\uDF5E")}
|
|
11472
|
+
${import_picocolors3.default.yellow(" / __ )__ ______ / /__(_) /_")}
|
|
11473
|
+
${import_picocolors3.default.yellow(" / __ / / / / __ \\/ //_/ / __/")}
|
|
11474
|
+
${import_picocolors3.default.yellow(" / /_/ / /_/ / / / / ,< / / /_")}
|
|
11475
|
+
${import_picocolors3.default.yellow("/_____/\\__,_/_/ /_/_/|_/_/\\__/")}
|
|
11476
|
+
|
|
11477
|
+
${import_picocolors3.default.dim("\u2501".repeat(40))}
|
|
11478
|
+
${import_picocolors3.default.cyan(" Bake production-ready apps in seconds")}
|
|
11479
|
+
${import_picocolors3.default.dim("\u2501".repeat(40))}
|
|
11480
|
+
`;
|
|
11481
|
+
var showBanner = () => {
|
|
11482
|
+
console.log(banner);
|
|
11483
|
+
};
|
|
11484
|
+
// ../core/src/fs.ts
|
|
11485
|
+
var import_fs_extra = __toESM(require_lib(), 1);
|
|
11486
|
+
var import_fast_glob = __toESM(require_out4(), 1);
|
|
11474
11487
|
|
|
11475
11488
|
// ../../node_modules/.bun/pathe@1.1.2/node_modules/pathe/dist/shared/pathe.ff20891b.mjs
|
|
11476
11489
|
var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
@@ -11603,8 +11616,6 @@ var dirname = function(p2) {
|
|
|
11603
11616
|
return segments.join("/") || (isAbsolute(p2) ? "/" : ".");
|
|
11604
11617
|
};
|
|
11605
11618
|
// ../core/src/fs.ts
|
|
11606
|
-
var import_fs_extra = __toESM(require_lib(), 1);
|
|
11607
|
-
var import_fast_glob = __toESM(require_out4(), 1);
|
|
11608
11619
|
async function directoryExists(path2) {
|
|
11609
11620
|
try {
|
|
11610
11621
|
const stats = await import_fs_extra.default.stat(path2);
|
|
@@ -18408,30 +18419,30 @@ function validateProjectName(name) {
|
|
|
18408
18419
|
return { valid: true };
|
|
18409
18420
|
}
|
|
18410
18421
|
// ../core/src/logger.ts
|
|
18411
|
-
var
|
|
18422
|
+
var import_picocolors4 = __toESM(require_picocolors(), 1);
|
|
18412
18423
|
var logger = {
|
|
18413
18424
|
info(message) {
|
|
18414
|
-
console.log(
|
|
18425
|
+
console.log(import_picocolors4.default.blue("\u2139"), message);
|
|
18415
18426
|
},
|
|
18416
18427
|
success(message) {
|
|
18417
|
-
console.log(
|
|
18428
|
+
console.log(import_picocolors4.default.green("\u2714"), message);
|
|
18418
18429
|
},
|
|
18419
18430
|
warn(message) {
|
|
18420
|
-
console.log(
|
|
18431
|
+
console.log(import_picocolors4.default.yellow("\u26A0"), message);
|
|
18421
18432
|
},
|
|
18422
18433
|
error(message) {
|
|
18423
|
-
console.error(
|
|
18434
|
+
console.error(import_picocolors4.default.red("\u2716"), message);
|
|
18424
18435
|
},
|
|
18425
18436
|
step(message) {
|
|
18426
|
-
console.log(
|
|
18437
|
+
console.log(import_picocolors4.default.cyan("\u2192"), message);
|
|
18427
18438
|
},
|
|
18428
18439
|
debug(message) {
|
|
18429
18440
|
if (process.env.DEBUG) {
|
|
18430
|
-
console.log(
|
|
18441
|
+
console.log(import_picocolors4.default.gray("[DEBUG]"), message);
|
|
18431
18442
|
}
|
|
18432
18443
|
},
|
|
18433
18444
|
dim(message) {
|
|
18434
|
-
console.log(
|
|
18445
|
+
console.log(import_picocolors4.default.dim(message));
|
|
18435
18446
|
},
|
|
18436
18447
|
br() {
|
|
18437
18448
|
console.log();
|
|
@@ -22571,6 +22582,9 @@ async function installDependencies(cwd, packages) {
|
|
|
22571
22582
|
throw error;
|
|
22572
22583
|
}
|
|
22573
22584
|
}
|
|
22585
|
+
// src/commands/init.real.ts
|
|
22586
|
+
var import_picocolors5 = __toESM(require_picocolors(), 1);
|
|
22587
|
+
|
|
22574
22588
|
// ../templates/src/render.ts
|
|
22575
22589
|
var import_ejs = __toESM(require_ejs(), 1);
|
|
22576
22590
|
// ../templates/src/builders/minimal.ts
|
|
@@ -23098,14 +23112,14 @@ async function initCommand() {
|
|
|
23098
23112
|
}
|
|
23099
23113
|
};
|
|
23100
23114
|
Me([
|
|
23101
|
-
`${
|
|
23102
|
-
shouldInstall ? "" : `${
|
|
23103
|
-
`${
|
|
23115
|
+
`${import_picocolors5.default.cyan("cd")} ${projectName}`,
|
|
23116
|
+
shouldInstall ? "" : `${import_picocolors5.default.cyan("bun install")}`,
|
|
23117
|
+
`${import_picocolors5.default.cyan(getDevCommand())} ${import_picocolors5.default.dim("# Start development")}`
|
|
23104
23118
|
].filter(Boolean).join(`
|
|
23105
23119
|
`), `${getPresetEmoji()} Next steps`);
|
|
23106
23120
|
} catch (error) {
|
|
23107
23121
|
s.stop("\u274C Failed to create project");
|
|
23108
|
-
xe(`${
|
|
23122
|
+
xe(`${import_picocolors5.default.red("Error:")} ${error.message}`);
|
|
23109
23123
|
process.exit(1);
|
|
23110
23124
|
}
|
|
23111
23125
|
}
|
|
@@ -23145,39 +23159,39 @@ async function addCommand(feature, options) {
|
|
|
23145
23159
|
var program2 = new Command;
|
|
23146
23160
|
program2.name("bunkit").description("Bake production-ready apps in seconds").version("0.1.0-alpha.1");
|
|
23147
23161
|
program2.command("init").description("Create a new project interactively").action(async () => {
|
|
23148
|
-
|
|
23149
|
-
Ie(import_picocolors5.default.bgCyan(import_picocolors5.default.black(" \uD83C\uDF5E bunkit ")));
|
|
23162
|
+
showBanner();
|
|
23150
23163
|
try {
|
|
23151
23164
|
await initCommand();
|
|
23152
|
-
Se(
|
|
23165
|
+
Se(import_picocolors6.default.green("\u2728 Done! Your project is ready to bake! \uD83C\uDF5E"));
|
|
23153
23166
|
} catch (error) {
|
|
23154
23167
|
M2.error(error.message);
|
|
23155
|
-
Se(
|
|
23168
|
+
Se(import_picocolors6.default.red("\u274C Project creation failed"));
|
|
23156
23169
|
process.exit(1);
|
|
23157
23170
|
}
|
|
23158
23171
|
});
|
|
23159
23172
|
program2.command("create").argument("<preset>", "Preset type (minimal, web, api, full)").argument("<name>", "Project name").option("--no-git", "Skip git initialization").option("--no-install", "Skip dependency installation").description("Create a new project quickly").action(async (preset, name, options) => {
|
|
23160
|
-
|
|
23161
|
-
Ie(import_picocolors5.default.bgCyan(import_picocolors5.default.black(" \uD83C\uDF5E bunkit ")));
|
|
23173
|
+
showBanner();
|
|
23162
23174
|
try {
|
|
23163
23175
|
await createCommand2(preset, name, options);
|
|
23164
|
-
Se(
|
|
23176
|
+
Se(import_picocolors6.default.green("\u2728 Done! Your project is ready to bake! \uD83C\uDF5E"));
|
|
23165
23177
|
} catch (error) {
|
|
23166
23178
|
M2.error(error.message);
|
|
23167
|
-
Se(
|
|
23179
|
+
Se(import_picocolors6.default.red("\u274C Project creation failed"));
|
|
23168
23180
|
process.exit(1);
|
|
23169
23181
|
}
|
|
23170
23182
|
});
|
|
23171
23183
|
program2.command("add").argument("<feature>", "Feature to add (auth, database, ui, payments, email, storage)").option("--provider <provider>", "Provider to use").description("Add a feature to existing project").action(async (feature, options) => {
|
|
23172
|
-
|
|
23173
|
-
Ie(import_picocolors5.default.bgCyan(import_picocolors5.default.black(" \uD83C\uDF5E bunkit ")));
|
|
23184
|
+
showBanner();
|
|
23174
23185
|
try {
|
|
23175
23186
|
await addCommand(feature, options);
|
|
23176
|
-
Se(
|
|
23187
|
+
Se(import_picocolors6.default.green("\u2728 Feature added successfully! \uD83C\uDF5E"));
|
|
23177
23188
|
} catch (error) {
|
|
23178
23189
|
M2.error(error.message);
|
|
23179
|
-
Se(
|
|
23190
|
+
Se(import_picocolors6.default.red("\u274C Feature installation failed"));
|
|
23180
23191
|
process.exit(1);
|
|
23181
23192
|
}
|
|
23182
23193
|
});
|
|
23194
|
+
if (process.argv.length === 2 || process.argv.length === 3 && (process.argv[2] === "--help" || process.argv[2] === "-h")) {
|
|
23195
|
+
showBanner();
|
|
23196
|
+
}
|
|
23183
23197
|
program2.parse();
|