@apps-in-toss/plugins 0.0.0-dev.1747216176095 → 0.0.0-dev.1752114017143
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.cjs +655 -359
- package/dist/index.d.cts +20 -2
- package/dist/index.d.ts +20 -2
- package/dist/index.js +670 -377
- package/package.json +8 -5
package/dist/index.cjs
CHANGED
|
@@ -102,7 +102,7 @@ var require_fd_slicer = __commonJS({
|
|
|
102
102
|
"../../.yarn/cache/yauzl-npm-3.2.0-b1af038bc6-7b40b3dc46.zip/node_modules/yauzl/fd-slicer.js"(exports2) {
|
|
103
103
|
"use strict";
|
|
104
104
|
init_cjs_shims();
|
|
105
|
-
var
|
|
105
|
+
var fs7 = require("fs");
|
|
106
106
|
var util = require("util");
|
|
107
107
|
var stream = require("stream");
|
|
108
108
|
var Readable = stream.Readable;
|
|
@@ -127,7 +127,7 @@ var require_fd_slicer = __commonJS({
|
|
|
127
127
|
FdSlicer.prototype.read = function(buffer, offset, length, position, callback) {
|
|
128
128
|
var self2 = this;
|
|
129
129
|
self2.pend.go(function(cb) {
|
|
130
|
-
|
|
130
|
+
fs7.read(self2.fd, buffer, offset, length, position, function(err, bytesRead, buffer2) {
|
|
131
131
|
cb();
|
|
132
132
|
callback(err, bytesRead, buffer2);
|
|
133
133
|
});
|
|
@@ -136,7 +136,7 @@ var require_fd_slicer = __commonJS({
|
|
|
136
136
|
FdSlicer.prototype.write = function(buffer, offset, length, position, callback) {
|
|
137
137
|
var self2 = this;
|
|
138
138
|
self2.pend.go(function(cb) {
|
|
139
|
-
|
|
139
|
+
fs7.write(self2.fd, buffer, offset, length, position, function(err, written, buffer2) {
|
|
140
140
|
cb();
|
|
141
141
|
callback(err, written, buffer2);
|
|
142
142
|
});
|
|
@@ -157,7 +157,7 @@ var require_fd_slicer = __commonJS({
|
|
|
157
157
|
if (self2.refCount > 0) return;
|
|
158
158
|
if (self2.refCount < 0) throw new Error("invalid unref");
|
|
159
159
|
if (self2.autoClose) {
|
|
160
|
-
|
|
160
|
+
fs7.close(self2.fd, onCloseDone);
|
|
161
161
|
}
|
|
162
162
|
function onCloseDone(err) {
|
|
163
163
|
if (err) {
|
|
@@ -194,7 +194,7 @@ var require_fd_slicer = __commonJS({
|
|
|
194
194
|
self2.context.pend.go(function(cb) {
|
|
195
195
|
if (self2.destroyed) return cb();
|
|
196
196
|
var buffer = Buffer.allocUnsafe(toRead);
|
|
197
|
-
|
|
197
|
+
fs7.read(self2.context.fd, buffer, 0, toRead, self2.pos, function(err, bytesRead) {
|
|
198
198
|
if (err) {
|
|
199
199
|
self2.destroy(err);
|
|
200
200
|
} else if (bytesRead === 0) {
|
|
@@ -241,7 +241,7 @@ var require_fd_slicer = __commonJS({
|
|
|
241
241
|
}
|
|
242
242
|
self2.context.pend.go(function(cb) {
|
|
243
243
|
if (self2.destroyed) return cb();
|
|
244
|
-
|
|
244
|
+
fs7.write(self2.context.fd, buffer, 0, buffer.length, self2.pos, function(err2, bytes) {
|
|
245
245
|
if (err2) {
|
|
246
246
|
self2.destroy();
|
|
247
247
|
cb();
|
|
@@ -683,7 +683,7 @@ var require_yauzl = __commonJS({
|
|
|
683
683
|
"../../.yarn/cache/yauzl-npm-3.2.0-b1af038bc6-7b40b3dc46.zip/node_modules/yauzl/index.js"(exports2) {
|
|
684
684
|
"use strict";
|
|
685
685
|
init_cjs_shims();
|
|
686
|
-
var
|
|
686
|
+
var fs7 = require("fs");
|
|
687
687
|
var zlib = require("zlib");
|
|
688
688
|
var fd_slicer = require_fd_slicer();
|
|
689
689
|
var crc32 = require_buffer_crc32();
|
|
@@ -704,7 +704,7 @@ var require_yauzl = __commonJS({
|
|
|
704
704
|
exports2.Entry = Entry;
|
|
705
705
|
exports2.LocalFileHeader = LocalFileHeader;
|
|
706
706
|
exports2.RandomAccessReader = RandomAccessReader;
|
|
707
|
-
function open(
|
|
707
|
+
function open(path8, options2, callback) {
|
|
708
708
|
if (typeof options2 === "function") {
|
|
709
709
|
callback = options2;
|
|
710
710
|
options2 = null;
|
|
@@ -716,10 +716,10 @@ var require_yauzl = __commonJS({
|
|
|
716
716
|
if (options2.validateEntrySizes == null) options2.validateEntrySizes = true;
|
|
717
717
|
if (options2.strictFileNames == null) options2.strictFileNames = false;
|
|
718
718
|
if (callback == null) callback = defaultCallback;
|
|
719
|
-
|
|
719
|
+
fs7.open(path8, "r", function(err, fd) {
|
|
720
720
|
if (err) return callback(err);
|
|
721
721
|
fromFd(fd, options2, function(err2, zipfile) {
|
|
722
|
-
if (err2)
|
|
722
|
+
if (err2) fs7.close(fd, defaultCallback);
|
|
723
723
|
callback(err2, zipfile);
|
|
724
724
|
});
|
|
725
725
|
});
|
|
@@ -736,7 +736,7 @@ var require_yauzl = __commonJS({
|
|
|
736
736
|
if (options2.validateEntrySizes == null) options2.validateEntrySizes = true;
|
|
737
737
|
if (options2.strictFileNames == null) options2.strictFileNames = false;
|
|
738
738
|
if (callback == null) callback = defaultCallback;
|
|
739
|
-
|
|
739
|
+
fs7.fstat(fd, function(err, stats) {
|
|
740
740
|
if (err) return callback(err);
|
|
741
741
|
var reader = fd_slicer.createFromFd(fd, { autoClose: true });
|
|
742
742
|
fromRandomAccessReader(reader, stats.size, options2, callback);
|
|
@@ -1495,6 +1495,43 @@ var require_picocolors = __commonJS({
|
|
|
1495
1495
|
}
|
|
1496
1496
|
});
|
|
1497
1497
|
|
|
1498
|
+
// ../../.yarn/__virtual__/typia-virtual-93fdc6e779/0/cache/typia-npm-8.0.4-b2444b63f3-1028a8a121.zip/node_modules/typia/lib/internal/_isFormatUuid.js
|
|
1499
|
+
var require_isFormatUuid = __commonJS({
|
|
1500
|
+
"../../.yarn/__virtual__/typia-virtual-93fdc6e779/0/cache/typia-npm-8.0.4-b2444b63f3-1028a8a121.zip/node_modules/typia/lib/internal/_isFormatUuid.js"(exports2) {
|
|
1501
|
+
"use strict";
|
|
1502
|
+
init_cjs_shims();
|
|
1503
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
1504
|
+
exports2._isFormatUuid = void 0;
|
|
1505
|
+
var _isFormatUuid2 = (str) => PATTERN.test(str);
|
|
1506
|
+
exports2._isFormatUuid = _isFormatUuid2;
|
|
1507
|
+
var PATTERN = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;
|
|
1508
|
+
}
|
|
1509
|
+
});
|
|
1510
|
+
|
|
1511
|
+
// ../../.yarn/__virtual__/typia-virtual-93fdc6e779/0/cache/typia-npm-8.0.4-b2444b63f3-1028a8a121.zip/node_modules/typia/lib/internal/_validateReport.js
|
|
1512
|
+
var require_validateReport = __commonJS({
|
|
1513
|
+
"../../.yarn/__virtual__/typia-virtual-93fdc6e779/0/cache/typia-npm-8.0.4-b2444b63f3-1028a8a121.zip/node_modules/typia/lib/internal/_validateReport.js"(exports2) {
|
|
1514
|
+
"use strict";
|
|
1515
|
+
init_cjs_shims();
|
|
1516
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
1517
|
+
exports2._validateReport = void 0;
|
|
1518
|
+
var _validateReport2 = (array) => {
|
|
1519
|
+
const reportable = (path8) => {
|
|
1520
|
+
if (array.length === 0)
|
|
1521
|
+
return true;
|
|
1522
|
+
const last = array[array.length - 1].path;
|
|
1523
|
+
return path8.length > last.length || last.substring(0, path8.length) !== path8;
|
|
1524
|
+
};
|
|
1525
|
+
return (exceptable, error) => {
|
|
1526
|
+
if (exceptable && reportable(error.path))
|
|
1527
|
+
array.push(error);
|
|
1528
|
+
return false;
|
|
1529
|
+
};
|
|
1530
|
+
};
|
|
1531
|
+
exports2._validateReport = _validateReport2;
|
|
1532
|
+
}
|
|
1533
|
+
});
|
|
1534
|
+
|
|
1498
1535
|
// ../../.yarn/cache/minimatch-npm-5.1.6-33ea6af31a-3defdfd230.zip/node_modules/minimatch/lib/path.js
|
|
1499
1536
|
var require_path = __commonJS({
|
|
1500
1537
|
"../../.yarn/cache/minimatch-npm-5.1.6-33ea6af31a-3defdfd230.zip/node_modules/minimatch/lib/path.js"(exports2, module2) {
|
|
@@ -1729,8 +1766,8 @@ var require_minimatch = __commonJS({
|
|
|
1729
1766
|
return new Minimatch(pattern, options2).match(p);
|
|
1730
1767
|
};
|
|
1731
1768
|
module2.exports = minimatch;
|
|
1732
|
-
var
|
|
1733
|
-
minimatch.sep =
|
|
1769
|
+
var path8 = require_path();
|
|
1770
|
+
minimatch.sep = path8.sep;
|
|
1734
1771
|
var GLOBSTAR = Symbol("globstar **");
|
|
1735
1772
|
minimatch.GLOBSTAR = GLOBSTAR;
|
|
1736
1773
|
var expand = require_brace_expansion();
|
|
@@ -2239,8 +2276,8 @@ var require_minimatch = __commonJS({
|
|
|
2239
2276
|
if (this.empty) return f === "";
|
|
2240
2277
|
if (f === "/" && partial) return true;
|
|
2241
2278
|
const options2 = this.options;
|
|
2242
|
-
if (
|
|
2243
|
-
f = f.split(
|
|
2279
|
+
if (path8.sep !== "/") {
|
|
2280
|
+
f = f.split(path8.sep).join("/");
|
|
2244
2281
|
}
|
|
2245
2282
|
f = f.split(slashSplit);
|
|
2246
2283
|
this.debug(this.pattern, "split", f);
|
|
@@ -2280,13 +2317,13 @@ var require_readdir_glob = __commonJS({
|
|
|
2280
2317
|
"use strict";
|
|
2281
2318
|
init_cjs_shims();
|
|
2282
2319
|
module2.exports = readdirGlob;
|
|
2283
|
-
var
|
|
2320
|
+
var fs7 = require("fs");
|
|
2284
2321
|
var { EventEmitter } = require("events");
|
|
2285
2322
|
var { Minimatch } = require_minimatch();
|
|
2286
2323
|
var { resolve } = require("path");
|
|
2287
2324
|
function readdir(dir2, strict) {
|
|
2288
2325
|
return new Promise((resolve2, reject2) => {
|
|
2289
|
-
|
|
2326
|
+
fs7.readdir(dir2, { withFileTypes: true }, (err, files) => {
|
|
2290
2327
|
if (err) {
|
|
2291
2328
|
switch (err.code) {
|
|
2292
2329
|
case "ENOTDIR":
|
|
@@ -2319,7 +2356,7 @@ var require_readdir_glob = __commonJS({
|
|
|
2319
2356
|
}
|
|
2320
2357
|
function stat(file, followSymlinks) {
|
|
2321
2358
|
return new Promise((resolve2, reject2) => {
|
|
2322
|
-
const statFunc = followSymlinks ?
|
|
2359
|
+
const statFunc = followSymlinks ? fs7.stat : fs7.lstat;
|
|
2323
2360
|
statFunc(file, (err, stats) => {
|
|
2324
2361
|
if (err) {
|
|
2325
2362
|
switch (err.code) {
|
|
@@ -2340,8 +2377,8 @@ var require_readdir_glob = __commonJS({
|
|
|
2340
2377
|
});
|
|
2341
2378
|
});
|
|
2342
2379
|
}
|
|
2343
|
-
async function* exploreWalkAsync(dir2,
|
|
2344
|
-
let files = await readdir(
|
|
2380
|
+
async function* exploreWalkAsync(dir2, path8, followSymlinks, useStat, shouldSkip, strict) {
|
|
2381
|
+
let files = await readdir(path8 + dir2, strict);
|
|
2345
2382
|
for (const file of files) {
|
|
2346
2383
|
let name = file.name;
|
|
2347
2384
|
if (name === void 0) {
|
|
@@ -2350,7 +2387,7 @@ var require_readdir_glob = __commonJS({
|
|
|
2350
2387
|
}
|
|
2351
2388
|
const filename = dir2 + "/" + name;
|
|
2352
2389
|
const relative = filename.slice(1);
|
|
2353
|
-
const absolute =
|
|
2390
|
+
const absolute = path8 + "/" + relative;
|
|
2354
2391
|
let stats = null;
|
|
2355
2392
|
if (useStat || followSymlinks) {
|
|
2356
2393
|
stats = await stat(absolute, followSymlinks);
|
|
@@ -2364,15 +2401,15 @@ var require_readdir_glob = __commonJS({
|
|
|
2364
2401
|
if (stats.isDirectory()) {
|
|
2365
2402
|
if (!shouldSkip(relative)) {
|
|
2366
2403
|
yield { relative, absolute, stats };
|
|
2367
|
-
yield* exploreWalkAsync(filename,
|
|
2404
|
+
yield* exploreWalkAsync(filename, path8, followSymlinks, useStat, shouldSkip, false);
|
|
2368
2405
|
}
|
|
2369
2406
|
} else {
|
|
2370
2407
|
yield { relative, absolute, stats };
|
|
2371
2408
|
}
|
|
2372
2409
|
}
|
|
2373
2410
|
}
|
|
2374
|
-
async function* explore(
|
|
2375
|
-
yield* exploreWalkAsync("",
|
|
2411
|
+
async function* explore(path8, followSymlinks, useStat, shouldSkip) {
|
|
2412
|
+
yield* exploreWalkAsync("", path8, followSymlinks, useStat, shouldSkip, true);
|
|
2376
2413
|
}
|
|
2377
2414
|
function readOptions(options2) {
|
|
2378
2415
|
return {
|
|
@@ -4385,54 +4422,54 @@ var require_polyfills = __commonJS({
|
|
|
4385
4422
|
}
|
|
4386
4423
|
var chdir;
|
|
4387
4424
|
module2.exports = patch;
|
|
4388
|
-
function patch(
|
|
4425
|
+
function patch(fs7) {
|
|
4389
4426
|
if (constants2.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
|
|
4390
|
-
patchLchmod(
|
|
4391
|
-
}
|
|
4392
|
-
if (!
|
|
4393
|
-
patchLutimes(
|
|
4394
|
-
}
|
|
4395
|
-
|
|
4396
|
-
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
|
|
4400
|
-
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
|
|
4404
|
-
|
|
4405
|
-
|
|
4406
|
-
|
|
4407
|
-
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
-
|
|
4411
|
-
|
|
4412
|
-
|
|
4413
|
-
if (
|
|
4414
|
-
|
|
4427
|
+
patchLchmod(fs7);
|
|
4428
|
+
}
|
|
4429
|
+
if (!fs7.lutimes) {
|
|
4430
|
+
patchLutimes(fs7);
|
|
4431
|
+
}
|
|
4432
|
+
fs7.chown = chownFix(fs7.chown);
|
|
4433
|
+
fs7.fchown = chownFix(fs7.fchown);
|
|
4434
|
+
fs7.lchown = chownFix(fs7.lchown);
|
|
4435
|
+
fs7.chmod = chmodFix(fs7.chmod);
|
|
4436
|
+
fs7.fchmod = chmodFix(fs7.fchmod);
|
|
4437
|
+
fs7.lchmod = chmodFix(fs7.lchmod);
|
|
4438
|
+
fs7.chownSync = chownFixSync(fs7.chownSync);
|
|
4439
|
+
fs7.fchownSync = chownFixSync(fs7.fchownSync);
|
|
4440
|
+
fs7.lchownSync = chownFixSync(fs7.lchownSync);
|
|
4441
|
+
fs7.chmodSync = chmodFixSync(fs7.chmodSync);
|
|
4442
|
+
fs7.fchmodSync = chmodFixSync(fs7.fchmodSync);
|
|
4443
|
+
fs7.lchmodSync = chmodFixSync(fs7.lchmodSync);
|
|
4444
|
+
fs7.stat = statFix(fs7.stat);
|
|
4445
|
+
fs7.fstat = statFix(fs7.fstat);
|
|
4446
|
+
fs7.lstat = statFix(fs7.lstat);
|
|
4447
|
+
fs7.statSync = statFixSync(fs7.statSync);
|
|
4448
|
+
fs7.fstatSync = statFixSync(fs7.fstatSync);
|
|
4449
|
+
fs7.lstatSync = statFixSync(fs7.lstatSync);
|
|
4450
|
+
if (fs7.chmod && !fs7.lchmod) {
|
|
4451
|
+
fs7.lchmod = function(path8, mode, cb) {
|
|
4415
4452
|
if (cb) process.nextTick(cb);
|
|
4416
4453
|
};
|
|
4417
|
-
|
|
4454
|
+
fs7.lchmodSync = function() {
|
|
4418
4455
|
};
|
|
4419
4456
|
}
|
|
4420
|
-
if (
|
|
4421
|
-
|
|
4457
|
+
if (fs7.chown && !fs7.lchown) {
|
|
4458
|
+
fs7.lchown = function(path8, uid, gid, cb) {
|
|
4422
4459
|
if (cb) process.nextTick(cb);
|
|
4423
4460
|
};
|
|
4424
|
-
|
|
4461
|
+
fs7.lchownSync = function() {
|
|
4425
4462
|
};
|
|
4426
4463
|
}
|
|
4427
4464
|
if (platform === "win32") {
|
|
4428
|
-
|
|
4465
|
+
fs7.rename = typeof fs7.rename !== "function" ? fs7.rename : function(fs$rename) {
|
|
4429
4466
|
function rename(from, to, cb) {
|
|
4430
4467
|
var start = Date.now();
|
|
4431
4468
|
var backoff = 0;
|
|
4432
4469
|
fs$rename(from, to, function CB(er) {
|
|
4433
4470
|
if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start < 6e4) {
|
|
4434
4471
|
setTimeout(function() {
|
|
4435
|
-
|
|
4472
|
+
fs7.stat(to, function(stater, st) {
|
|
4436
4473
|
if (stater && stater.code === "ENOENT")
|
|
4437
4474
|
fs$rename(from, to, CB);
|
|
4438
4475
|
else
|
|
@@ -4448,9 +4485,9 @@ var require_polyfills = __commonJS({
|
|
|
4448
4485
|
}
|
|
4449
4486
|
if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename);
|
|
4450
4487
|
return rename;
|
|
4451
|
-
}(
|
|
4488
|
+
}(fs7.rename);
|
|
4452
4489
|
}
|
|
4453
|
-
|
|
4490
|
+
fs7.read = typeof fs7.read !== "function" ? fs7.read : function(fs$read) {
|
|
4454
4491
|
function read(fd, buffer, offset, length, position, callback_) {
|
|
4455
4492
|
var callback;
|
|
4456
4493
|
if (callback_ && typeof callback_ === "function") {
|
|
@@ -4458,22 +4495,22 @@ var require_polyfills = __commonJS({
|
|
|
4458
4495
|
callback = function(er, _2, __) {
|
|
4459
4496
|
if (er && er.code === "EAGAIN" && eagCounter < 10) {
|
|
4460
4497
|
eagCounter++;
|
|
4461
|
-
return fs$read.call(
|
|
4498
|
+
return fs$read.call(fs7, fd, buffer, offset, length, position, callback);
|
|
4462
4499
|
}
|
|
4463
4500
|
callback_.apply(this, arguments);
|
|
4464
4501
|
};
|
|
4465
4502
|
}
|
|
4466
|
-
return fs$read.call(
|
|
4503
|
+
return fs$read.call(fs7, fd, buffer, offset, length, position, callback);
|
|
4467
4504
|
}
|
|
4468
4505
|
if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read);
|
|
4469
4506
|
return read;
|
|
4470
|
-
}(
|
|
4471
|
-
|
|
4507
|
+
}(fs7.read);
|
|
4508
|
+
fs7.readSync = typeof fs7.readSync !== "function" ? fs7.readSync : /* @__PURE__ */ function(fs$readSync) {
|
|
4472
4509
|
return function(fd, buffer, offset, length, position) {
|
|
4473
4510
|
var eagCounter = 0;
|
|
4474
4511
|
while (true) {
|
|
4475
4512
|
try {
|
|
4476
|
-
return fs$readSync.call(
|
|
4513
|
+
return fs$readSync.call(fs7, fd, buffer, offset, length, position);
|
|
4477
4514
|
} catch (er) {
|
|
4478
4515
|
if (er.code === "EAGAIN" && eagCounter < 10) {
|
|
4479
4516
|
eagCounter++;
|
|
@@ -4483,11 +4520,11 @@ var require_polyfills = __commonJS({
|
|
|
4483
4520
|
}
|
|
4484
4521
|
}
|
|
4485
4522
|
};
|
|
4486
|
-
}(
|
|
4487
|
-
function patchLchmod(
|
|
4488
|
-
|
|
4489
|
-
|
|
4490
|
-
|
|
4523
|
+
}(fs7.readSync);
|
|
4524
|
+
function patchLchmod(fs8) {
|
|
4525
|
+
fs8.lchmod = function(path8, mode, callback) {
|
|
4526
|
+
fs8.open(
|
|
4527
|
+
path8,
|
|
4491
4528
|
constants2.O_WRONLY | constants2.O_SYMLINK,
|
|
4492
4529
|
mode,
|
|
4493
4530
|
function(err, fd) {
|
|
@@ -4495,80 +4532,80 @@ var require_polyfills = __commonJS({
|
|
|
4495
4532
|
if (callback) callback(err);
|
|
4496
4533
|
return;
|
|
4497
4534
|
}
|
|
4498
|
-
|
|
4499
|
-
|
|
4535
|
+
fs8.fchmod(fd, mode, function(err2) {
|
|
4536
|
+
fs8.close(fd, function(err22) {
|
|
4500
4537
|
if (callback) callback(err2 || err22);
|
|
4501
4538
|
});
|
|
4502
4539
|
});
|
|
4503
4540
|
}
|
|
4504
4541
|
);
|
|
4505
4542
|
};
|
|
4506
|
-
|
|
4507
|
-
var fd =
|
|
4543
|
+
fs8.lchmodSync = function(path8, mode) {
|
|
4544
|
+
var fd = fs8.openSync(path8, constants2.O_WRONLY | constants2.O_SYMLINK, mode);
|
|
4508
4545
|
var threw = true;
|
|
4509
4546
|
var ret;
|
|
4510
4547
|
try {
|
|
4511
|
-
ret =
|
|
4548
|
+
ret = fs8.fchmodSync(fd, mode);
|
|
4512
4549
|
threw = false;
|
|
4513
4550
|
} finally {
|
|
4514
4551
|
if (threw) {
|
|
4515
4552
|
try {
|
|
4516
|
-
|
|
4553
|
+
fs8.closeSync(fd);
|
|
4517
4554
|
} catch (er) {
|
|
4518
4555
|
}
|
|
4519
4556
|
} else {
|
|
4520
|
-
|
|
4557
|
+
fs8.closeSync(fd);
|
|
4521
4558
|
}
|
|
4522
4559
|
}
|
|
4523
4560
|
return ret;
|
|
4524
4561
|
};
|
|
4525
4562
|
}
|
|
4526
|
-
function patchLutimes(
|
|
4527
|
-
if (constants2.hasOwnProperty("O_SYMLINK") &&
|
|
4528
|
-
|
|
4529
|
-
|
|
4563
|
+
function patchLutimes(fs8) {
|
|
4564
|
+
if (constants2.hasOwnProperty("O_SYMLINK") && fs8.futimes) {
|
|
4565
|
+
fs8.lutimes = function(path8, at, mt, cb) {
|
|
4566
|
+
fs8.open(path8, constants2.O_SYMLINK, function(er, fd) {
|
|
4530
4567
|
if (er) {
|
|
4531
4568
|
if (cb) cb(er);
|
|
4532
4569
|
return;
|
|
4533
4570
|
}
|
|
4534
|
-
|
|
4535
|
-
|
|
4571
|
+
fs8.futimes(fd, at, mt, function(er2) {
|
|
4572
|
+
fs8.close(fd, function(er22) {
|
|
4536
4573
|
if (cb) cb(er2 || er22);
|
|
4537
4574
|
});
|
|
4538
4575
|
});
|
|
4539
4576
|
});
|
|
4540
4577
|
};
|
|
4541
|
-
|
|
4542
|
-
var fd =
|
|
4578
|
+
fs8.lutimesSync = function(path8, at, mt) {
|
|
4579
|
+
var fd = fs8.openSync(path8, constants2.O_SYMLINK);
|
|
4543
4580
|
var ret;
|
|
4544
4581
|
var threw = true;
|
|
4545
4582
|
try {
|
|
4546
|
-
ret =
|
|
4583
|
+
ret = fs8.futimesSync(fd, at, mt);
|
|
4547
4584
|
threw = false;
|
|
4548
4585
|
} finally {
|
|
4549
4586
|
if (threw) {
|
|
4550
4587
|
try {
|
|
4551
|
-
|
|
4588
|
+
fs8.closeSync(fd);
|
|
4552
4589
|
} catch (er) {
|
|
4553
4590
|
}
|
|
4554
4591
|
} else {
|
|
4555
|
-
|
|
4592
|
+
fs8.closeSync(fd);
|
|
4556
4593
|
}
|
|
4557
4594
|
}
|
|
4558
4595
|
return ret;
|
|
4559
4596
|
};
|
|
4560
|
-
} else if (
|
|
4561
|
-
|
|
4597
|
+
} else if (fs8.futimes) {
|
|
4598
|
+
fs8.lutimes = function(_a, _b, _c, cb) {
|
|
4562
4599
|
if (cb) process.nextTick(cb);
|
|
4563
4600
|
};
|
|
4564
|
-
|
|
4601
|
+
fs8.lutimesSync = function() {
|
|
4565
4602
|
};
|
|
4566
4603
|
}
|
|
4567
4604
|
}
|
|
4568
4605
|
function chmodFix(orig) {
|
|
4569
4606
|
if (!orig) return orig;
|
|
4570
4607
|
return function(target, mode, cb) {
|
|
4571
|
-
return orig.call(
|
|
4608
|
+
return orig.call(fs7, target, mode, function(er) {
|
|
4572
4609
|
if (chownErOk(er)) er = null;
|
|
4573
4610
|
if (cb) cb.apply(this, arguments);
|
|
4574
4611
|
});
|
|
@@ -4578,7 +4615,7 @@ var require_polyfills = __commonJS({
|
|
|
4578
4615
|
if (!orig) return orig;
|
|
4579
4616
|
return function(target, mode) {
|
|
4580
4617
|
try {
|
|
4581
|
-
return orig.call(
|
|
4618
|
+
return orig.call(fs7, target, mode);
|
|
4582
4619
|
} catch (er) {
|
|
4583
4620
|
if (!chownErOk(er)) throw er;
|
|
4584
4621
|
}
|
|
@@ -4587,7 +4624,7 @@ var require_polyfills = __commonJS({
|
|
|
4587
4624
|
function chownFix(orig) {
|
|
4588
4625
|
if (!orig) return orig;
|
|
4589
4626
|
return function(target, uid, gid, cb) {
|
|
4590
|
-
return orig.call(
|
|
4627
|
+
return orig.call(fs7, target, uid, gid, function(er) {
|
|
4591
4628
|
if (chownErOk(er)) er = null;
|
|
4592
4629
|
if (cb) cb.apply(this, arguments);
|
|
4593
4630
|
});
|
|
@@ -4597,7 +4634,7 @@ var require_polyfills = __commonJS({
|
|
|
4597
4634
|
if (!orig) return orig;
|
|
4598
4635
|
return function(target, uid, gid) {
|
|
4599
4636
|
try {
|
|
4600
|
-
return orig.call(
|
|
4637
|
+
return orig.call(fs7, target, uid, gid);
|
|
4601
4638
|
} catch (er) {
|
|
4602
4639
|
if (!chownErOk(er)) throw er;
|
|
4603
4640
|
}
|
|
@@ -4617,13 +4654,13 @@ var require_polyfills = __commonJS({
|
|
|
4617
4654
|
}
|
|
4618
4655
|
if (cb) cb.apply(this, arguments);
|
|
4619
4656
|
}
|
|
4620
|
-
return options2 ? orig.call(
|
|
4657
|
+
return options2 ? orig.call(fs7, target, options2, callback) : orig.call(fs7, target, callback);
|
|
4621
4658
|
};
|
|
4622
4659
|
}
|
|
4623
4660
|
function statFixSync(orig) {
|
|
4624
4661
|
if (!orig) return orig;
|
|
4625
4662
|
return function(target, options2) {
|
|
4626
|
-
var stats = options2 ? orig.call(
|
|
4663
|
+
var stats = options2 ? orig.call(fs7, target, options2) : orig.call(fs7, target);
|
|
4627
4664
|
if (stats) {
|
|
4628
4665
|
if (stats.uid < 0) stats.uid += 4294967296;
|
|
4629
4666
|
if (stats.gid < 0) stats.gid += 4294967296;
|
|
@@ -4654,16 +4691,16 @@ var require_legacy_streams = __commonJS({
|
|
|
4654
4691
|
init_cjs_shims();
|
|
4655
4692
|
var Stream = require("stream").Stream;
|
|
4656
4693
|
module2.exports = legacy;
|
|
4657
|
-
function legacy(
|
|
4694
|
+
function legacy(fs7) {
|
|
4658
4695
|
return {
|
|
4659
4696
|
ReadStream,
|
|
4660
4697
|
WriteStream
|
|
4661
4698
|
};
|
|
4662
|
-
function ReadStream(
|
|
4663
|
-
if (!(this instanceof ReadStream)) return new ReadStream(
|
|
4699
|
+
function ReadStream(path8, options2) {
|
|
4700
|
+
if (!(this instanceof ReadStream)) return new ReadStream(path8, options2);
|
|
4664
4701
|
Stream.call(this);
|
|
4665
4702
|
var self2 = this;
|
|
4666
|
-
this.path =
|
|
4703
|
+
this.path = path8;
|
|
4667
4704
|
this.fd = null;
|
|
4668
4705
|
this.readable = true;
|
|
4669
4706
|
this.paused = false;
|
|
@@ -4697,7 +4734,7 @@ var require_legacy_streams = __commonJS({
|
|
|
4697
4734
|
});
|
|
4698
4735
|
return;
|
|
4699
4736
|
}
|
|
4700
|
-
|
|
4737
|
+
fs7.open(this.path, this.flags, this.mode, function(err, fd) {
|
|
4701
4738
|
if (err) {
|
|
4702
4739
|
self2.emit("error", err);
|
|
4703
4740
|
self2.readable = false;
|
|
@@ -4708,10 +4745,10 @@ var require_legacy_streams = __commonJS({
|
|
|
4708
4745
|
self2._read();
|
|
4709
4746
|
});
|
|
4710
4747
|
}
|
|
4711
|
-
function WriteStream(
|
|
4712
|
-
if (!(this instanceof WriteStream)) return new WriteStream(
|
|
4748
|
+
function WriteStream(path8, options2) {
|
|
4749
|
+
if (!(this instanceof WriteStream)) return new WriteStream(path8, options2);
|
|
4713
4750
|
Stream.call(this);
|
|
4714
|
-
this.path =
|
|
4751
|
+
this.path = path8;
|
|
4715
4752
|
this.fd = null;
|
|
4716
4753
|
this.writable = true;
|
|
4717
4754
|
this.flags = "w";
|
|
@@ -4736,7 +4773,7 @@ var require_legacy_streams = __commonJS({
|
|
|
4736
4773
|
this.busy = false;
|
|
4737
4774
|
this._queue = [];
|
|
4738
4775
|
if (this.fd === null) {
|
|
4739
|
-
this._open =
|
|
4776
|
+
this._open = fs7.open;
|
|
4740
4777
|
this._queue.push([this._open, this.path, this.flags, this.mode, void 0]);
|
|
4741
4778
|
this.flush();
|
|
4742
4779
|
}
|
|
@@ -4774,7 +4811,7 @@ var require_graceful_fs = __commonJS({
|
|
|
4774
4811
|
"../../.yarn/cache/graceful-fs-npm-4.2.11-b94d8104d4-386d011a55.zip/node_modules/graceful-fs/graceful-fs.js"(exports2, module2) {
|
|
4775
4812
|
"use strict";
|
|
4776
4813
|
init_cjs_shims();
|
|
4777
|
-
var
|
|
4814
|
+
var fs7 = require("fs");
|
|
4778
4815
|
var polyfills = require_polyfills();
|
|
4779
4816
|
var legacy = require_legacy_streams();
|
|
4780
4817
|
var clone = require_clone();
|
|
@@ -4806,12 +4843,12 @@ var require_graceful_fs = __commonJS({
|
|
|
4806
4843
|
m = "GFS4: " + m.split(/\n/).join("\nGFS4: ");
|
|
4807
4844
|
console.error(m);
|
|
4808
4845
|
};
|
|
4809
|
-
if (!
|
|
4846
|
+
if (!fs7[gracefulQueue]) {
|
|
4810
4847
|
queue2 = global[gracefulQueue] || [];
|
|
4811
|
-
publishQueue(
|
|
4812
|
-
|
|
4848
|
+
publishQueue(fs7, queue2);
|
|
4849
|
+
fs7.close = function(fs$close) {
|
|
4813
4850
|
function close(fd, cb) {
|
|
4814
|
-
return fs$close.call(
|
|
4851
|
+
return fs$close.call(fs7, fd, function(err) {
|
|
4815
4852
|
if (!err) {
|
|
4816
4853
|
resetQueue();
|
|
4817
4854
|
}
|
|
@@ -4823,48 +4860,48 @@ var require_graceful_fs = __commonJS({
|
|
|
4823
4860
|
value: fs$close
|
|
4824
4861
|
});
|
|
4825
4862
|
return close;
|
|
4826
|
-
}(
|
|
4827
|
-
|
|
4863
|
+
}(fs7.close);
|
|
4864
|
+
fs7.closeSync = function(fs$closeSync) {
|
|
4828
4865
|
function closeSync(fd) {
|
|
4829
|
-
fs$closeSync.apply(
|
|
4866
|
+
fs$closeSync.apply(fs7, arguments);
|
|
4830
4867
|
resetQueue();
|
|
4831
4868
|
}
|
|
4832
4869
|
Object.defineProperty(closeSync, previousSymbol, {
|
|
4833
4870
|
value: fs$closeSync
|
|
4834
4871
|
});
|
|
4835
4872
|
return closeSync;
|
|
4836
|
-
}(
|
|
4873
|
+
}(fs7.closeSync);
|
|
4837
4874
|
if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
|
|
4838
4875
|
process.on("exit", function() {
|
|
4839
|
-
debug(
|
|
4840
|
-
require("assert").equal(
|
|
4876
|
+
debug(fs7[gracefulQueue]);
|
|
4877
|
+
require("assert").equal(fs7[gracefulQueue].length, 0);
|
|
4841
4878
|
});
|
|
4842
4879
|
}
|
|
4843
4880
|
}
|
|
4844
4881
|
var queue2;
|
|
4845
4882
|
if (!global[gracefulQueue]) {
|
|
4846
|
-
publishQueue(global,
|
|
4847
|
-
}
|
|
4848
|
-
module2.exports = patch(clone(
|
|
4849
|
-
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !
|
|
4850
|
-
module2.exports = patch(
|
|
4851
|
-
|
|
4852
|
-
}
|
|
4853
|
-
function patch(
|
|
4854
|
-
polyfills(
|
|
4855
|
-
|
|
4856
|
-
|
|
4857
|
-
|
|
4858
|
-
var fs$readFile =
|
|
4859
|
-
|
|
4860
|
-
function
|
|
4883
|
+
publishQueue(global, fs7[gracefulQueue]);
|
|
4884
|
+
}
|
|
4885
|
+
module2.exports = patch(clone(fs7));
|
|
4886
|
+
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs7.__patched) {
|
|
4887
|
+
module2.exports = patch(fs7);
|
|
4888
|
+
fs7.__patched = true;
|
|
4889
|
+
}
|
|
4890
|
+
function patch(fs8) {
|
|
4891
|
+
polyfills(fs8);
|
|
4892
|
+
fs8.gracefulify = patch;
|
|
4893
|
+
fs8.createReadStream = createReadStream2;
|
|
4894
|
+
fs8.createWriteStream = createWriteStream2;
|
|
4895
|
+
var fs$readFile = fs8.readFile;
|
|
4896
|
+
fs8.readFile = readFile3;
|
|
4897
|
+
function readFile3(path8, options2, cb) {
|
|
4861
4898
|
if (typeof options2 === "function")
|
|
4862
4899
|
cb = options2, options2 = null;
|
|
4863
|
-
return go$readFile(
|
|
4864
|
-
function go$readFile(
|
|
4865
|
-
return fs$readFile(
|
|
4900
|
+
return go$readFile(path8, options2, cb);
|
|
4901
|
+
function go$readFile(path9, options3, cb2, startTime) {
|
|
4902
|
+
return fs$readFile(path9, options3, function(err) {
|
|
4866
4903
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
4867
|
-
enqueue([go$readFile, [
|
|
4904
|
+
enqueue([go$readFile, [path9, options3, cb2], err, startTime || Date.now(), Date.now()]);
|
|
4868
4905
|
else {
|
|
4869
4906
|
if (typeof cb2 === "function")
|
|
4870
4907
|
cb2.apply(this, arguments);
|
|
@@ -4872,16 +4909,16 @@ var require_graceful_fs = __commonJS({
|
|
|
4872
4909
|
});
|
|
4873
4910
|
}
|
|
4874
4911
|
}
|
|
4875
|
-
var fs$writeFile =
|
|
4876
|
-
|
|
4877
|
-
function writeFile2(
|
|
4912
|
+
var fs$writeFile = fs8.writeFile;
|
|
4913
|
+
fs8.writeFile = writeFile2;
|
|
4914
|
+
function writeFile2(path8, data, options2, cb) {
|
|
4878
4915
|
if (typeof options2 === "function")
|
|
4879
4916
|
cb = options2, options2 = null;
|
|
4880
|
-
return go$writeFile(
|
|
4881
|
-
function go$writeFile(
|
|
4882
|
-
return fs$writeFile(
|
|
4917
|
+
return go$writeFile(path8, data, options2, cb);
|
|
4918
|
+
function go$writeFile(path9, data2, options3, cb2, startTime) {
|
|
4919
|
+
return fs$writeFile(path9, data2, options3, function(err) {
|
|
4883
4920
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
4884
|
-
enqueue([go$writeFile, [
|
|
4921
|
+
enqueue([go$writeFile, [path9, data2, options3, cb2], err, startTime || Date.now(), Date.now()]);
|
|
4885
4922
|
else {
|
|
4886
4923
|
if (typeof cb2 === "function")
|
|
4887
4924
|
cb2.apply(this, arguments);
|
|
@@ -4889,17 +4926,17 @@ var require_graceful_fs = __commonJS({
|
|
|
4889
4926
|
});
|
|
4890
4927
|
}
|
|
4891
4928
|
}
|
|
4892
|
-
var fs$appendFile =
|
|
4929
|
+
var fs$appendFile = fs8.appendFile;
|
|
4893
4930
|
if (fs$appendFile)
|
|
4894
|
-
|
|
4895
|
-
function appendFile(
|
|
4931
|
+
fs8.appendFile = appendFile;
|
|
4932
|
+
function appendFile(path8, data, options2, cb) {
|
|
4896
4933
|
if (typeof options2 === "function")
|
|
4897
4934
|
cb = options2, options2 = null;
|
|
4898
|
-
return go$appendFile(
|
|
4899
|
-
function go$appendFile(
|
|
4900
|
-
return fs$appendFile(
|
|
4935
|
+
return go$appendFile(path8, data, options2, cb);
|
|
4936
|
+
function go$appendFile(path9, data2, options3, cb2, startTime) {
|
|
4937
|
+
return fs$appendFile(path9, data2, options3, function(err) {
|
|
4901
4938
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
4902
|
-
enqueue([go$appendFile, [
|
|
4939
|
+
enqueue([go$appendFile, [path9, data2, options3, cb2], err, startTime || Date.now(), Date.now()]);
|
|
4903
4940
|
else {
|
|
4904
4941
|
if (typeof cb2 === "function")
|
|
4905
4942
|
cb2.apply(this, arguments);
|
|
@@ -4907,9 +4944,9 @@ var require_graceful_fs = __commonJS({
|
|
|
4907
4944
|
});
|
|
4908
4945
|
}
|
|
4909
4946
|
}
|
|
4910
|
-
var fs$copyFile =
|
|
4947
|
+
var fs$copyFile = fs8.copyFile;
|
|
4911
4948
|
if (fs$copyFile)
|
|
4912
|
-
|
|
4949
|
+
fs8.copyFile = copyFile;
|
|
4913
4950
|
function copyFile(src, dest, flags, cb) {
|
|
4914
4951
|
if (typeof flags === "function") {
|
|
4915
4952
|
cb = flags;
|
|
@@ -4927,34 +4964,34 @@ var require_graceful_fs = __commonJS({
|
|
|
4927
4964
|
});
|
|
4928
4965
|
}
|
|
4929
4966
|
}
|
|
4930
|
-
var fs$readdir =
|
|
4931
|
-
|
|
4967
|
+
var fs$readdir = fs8.readdir;
|
|
4968
|
+
fs8.readdir = readdir;
|
|
4932
4969
|
var noReaddirOptionVersions = /^v[0-5]\./;
|
|
4933
|
-
function readdir(
|
|
4970
|
+
function readdir(path8, options2, cb) {
|
|
4934
4971
|
if (typeof options2 === "function")
|
|
4935
4972
|
cb = options2, options2 = null;
|
|
4936
|
-
var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(
|
|
4937
|
-
return fs$readdir(
|
|
4938
|
-
|
|
4973
|
+
var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path9, options3, cb2, startTime) {
|
|
4974
|
+
return fs$readdir(path9, fs$readdirCallback(
|
|
4975
|
+
path9,
|
|
4939
4976
|
options3,
|
|
4940
4977
|
cb2,
|
|
4941
4978
|
startTime
|
|
4942
4979
|
));
|
|
4943
|
-
} : function go$readdir2(
|
|
4944
|
-
return fs$readdir(
|
|
4945
|
-
|
|
4980
|
+
} : function go$readdir2(path9, options3, cb2, startTime) {
|
|
4981
|
+
return fs$readdir(path9, options3, fs$readdirCallback(
|
|
4982
|
+
path9,
|
|
4946
4983
|
options3,
|
|
4947
4984
|
cb2,
|
|
4948
4985
|
startTime
|
|
4949
4986
|
));
|
|
4950
4987
|
};
|
|
4951
|
-
return go$readdir(
|
|
4952
|
-
function fs$readdirCallback(
|
|
4988
|
+
return go$readdir(path8, options2, cb);
|
|
4989
|
+
function fs$readdirCallback(path9, options3, cb2, startTime) {
|
|
4953
4990
|
return function(err, files) {
|
|
4954
4991
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
4955
4992
|
enqueue([
|
|
4956
4993
|
go$readdir,
|
|
4957
|
-
[
|
|
4994
|
+
[path9, options3, cb2],
|
|
4958
4995
|
err,
|
|
4959
4996
|
startTime || Date.now(),
|
|
4960
4997
|
Date.now()
|
|
@@ -4969,21 +5006,21 @@ var require_graceful_fs = __commonJS({
|
|
|
4969
5006
|
}
|
|
4970
5007
|
}
|
|
4971
5008
|
if (process.version.substr(0, 4) === "v0.8") {
|
|
4972
|
-
var legStreams = legacy(
|
|
5009
|
+
var legStreams = legacy(fs8);
|
|
4973
5010
|
ReadStream = legStreams.ReadStream;
|
|
4974
5011
|
WriteStream = legStreams.WriteStream;
|
|
4975
5012
|
}
|
|
4976
|
-
var fs$ReadStream =
|
|
5013
|
+
var fs$ReadStream = fs8.ReadStream;
|
|
4977
5014
|
if (fs$ReadStream) {
|
|
4978
5015
|
ReadStream.prototype = Object.create(fs$ReadStream.prototype);
|
|
4979
5016
|
ReadStream.prototype.open = ReadStream$open;
|
|
4980
5017
|
}
|
|
4981
|
-
var fs$WriteStream =
|
|
5018
|
+
var fs$WriteStream = fs8.WriteStream;
|
|
4982
5019
|
if (fs$WriteStream) {
|
|
4983
5020
|
WriteStream.prototype = Object.create(fs$WriteStream.prototype);
|
|
4984
5021
|
WriteStream.prototype.open = WriteStream$open;
|
|
4985
5022
|
}
|
|
4986
|
-
Object.defineProperty(
|
|
5023
|
+
Object.defineProperty(fs8, "ReadStream", {
|
|
4987
5024
|
get: function() {
|
|
4988
5025
|
return ReadStream;
|
|
4989
5026
|
},
|
|
@@ -4993,7 +5030,7 @@ var require_graceful_fs = __commonJS({
|
|
|
4993
5030
|
enumerable: true,
|
|
4994
5031
|
configurable: true
|
|
4995
5032
|
});
|
|
4996
|
-
Object.defineProperty(
|
|
5033
|
+
Object.defineProperty(fs8, "WriteStream", {
|
|
4997
5034
|
get: function() {
|
|
4998
5035
|
return WriteStream;
|
|
4999
5036
|
},
|
|
@@ -5004,7 +5041,7 @@ var require_graceful_fs = __commonJS({
|
|
|
5004
5041
|
configurable: true
|
|
5005
5042
|
});
|
|
5006
5043
|
var FileReadStream = ReadStream;
|
|
5007
|
-
Object.defineProperty(
|
|
5044
|
+
Object.defineProperty(fs8, "FileReadStream", {
|
|
5008
5045
|
get: function() {
|
|
5009
5046
|
return FileReadStream;
|
|
5010
5047
|
},
|
|
@@ -5015,7 +5052,7 @@ var require_graceful_fs = __commonJS({
|
|
|
5015
5052
|
configurable: true
|
|
5016
5053
|
});
|
|
5017
5054
|
var FileWriteStream = WriteStream;
|
|
5018
|
-
Object.defineProperty(
|
|
5055
|
+
Object.defineProperty(fs8, "FileWriteStream", {
|
|
5019
5056
|
get: function() {
|
|
5020
5057
|
return FileWriteStream;
|
|
5021
5058
|
},
|
|
@@ -5025,7 +5062,7 @@ var require_graceful_fs = __commonJS({
|
|
|
5025
5062
|
enumerable: true,
|
|
5026
5063
|
configurable: true
|
|
5027
5064
|
});
|
|
5028
|
-
function ReadStream(
|
|
5065
|
+
function ReadStream(path8, options2) {
|
|
5029
5066
|
if (this instanceof ReadStream)
|
|
5030
5067
|
return fs$ReadStream.apply(this, arguments), this;
|
|
5031
5068
|
else
|
|
@@ -5045,7 +5082,7 @@ var require_graceful_fs = __commonJS({
|
|
|
5045
5082
|
}
|
|
5046
5083
|
});
|
|
5047
5084
|
}
|
|
5048
|
-
function WriteStream(
|
|
5085
|
+
function WriteStream(path8, options2) {
|
|
5049
5086
|
if (this instanceof WriteStream)
|
|
5050
5087
|
return fs$WriteStream.apply(this, arguments), this;
|
|
5051
5088
|
else
|
|
@@ -5063,22 +5100,22 @@ var require_graceful_fs = __commonJS({
|
|
|
5063
5100
|
}
|
|
5064
5101
|
});
|
|
5065
5102
|
}
|
|
5066
|
-
function createReadStream2(
|
|
5067
|
-
return new
|
|
5103
|
+
function createReadStream2(path8, options2) {
|
|
5104
|
+
return new fs8.ReadStream(path8, options2);
|
|
5068
5105
|
}
|
|
5069
|
-
function createWriteStream2(
|
|
5070
|
-
return new
|
|
5106
|
+
function createWriteStream2(path8, options2) {
|
|
5107
|
+
return new fs8.WriteStream(path8, options2);
|
|
5071
5108
|
}
|
|
5072
|
-
var fs$open =
|
|
5073
|
-
|
|
5074
|
-
function open(
|
|
5109
|
+
var fs$open = fs8.open;
|
|
5110
|
+
fs8.open = open;
|
|
5111
|
+
function open(path8, flags, mode, cb) {
|
|
5075
5112
|
if (typeof mode === "function")
|
|
5076
5113
|
cb = mode, mode = null;
|
|
5077
|
-
return go$open(
|
|
5078
|
-
function go$open(
|
|
5079
|
-
return fs$open(
|
|
5114
|
+
return go$open(path8, flags, mode, cb);
|
|
5115
|
+
function go$open(path9, flags2, mode2, cb2, startTime) {
|
|
5116
|
+
return fs$open(path9, flags2, mode2, function(err, fd) {
|
|
5080
5117
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
5081
|
-
enqueue([go$open, [
|
|
5118
|
+
enqueue([go$open, [path9, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
5082
5119
|
else {
|
|
5083
5120
|
if (typeof cb2 === "function")
|
|
5084
5121
|
cb2.apply(this, arguments);
|
|
@@ -5086,20 +5123,20 @@ var require_graceful_fs = __commonJS({
|
|
|
5086
5123
|
});
|
|
5087
5124
|
}
|
|
5088
5125
|
}
|
|
5089
|
-
return
|
|
5126
|
+
return fs8;
|
|
5090
5127
|
}
|
|
5091
5128
|
function enqueue(elem) {
|
|
5092
5129
|
debug("ENQUEUE", elem[0].name, elem[1]);
|
|
5093
|
-
|
|
5130
|
+
fs7[gracefulQueue].push(elem);
|
|
5094
5131
|
retry2();
|
|
5095
5132
|
}
|
|
5096
5133
|
var retryTimer;
|
|
5097
5134
|
function resetQueue() {
|
|
5098
5135
|
var now = Date.now();
|
|
5099
|
-
for (var i = 0; i <
|
|
5100
|
-
if (
|
|
5101
|
-
|
|
5102
|
-
|
|
5136
|
+
for (var i = 0; i < fs7[gracefulQueue].length; ++i) {
|
|
5137
|
+
if (fs7[gracefulQueue][i].length > 2) {
|
|
5138
|
+
fs7[gracefulQueue][i][3] = now;
|
|
5139
|
+
fs7[gracefulQueue][i][4] = now;
|
|
5103
5140
|
}
|
|
5104
5141
|
}
|
|
5105
5142
|
retry2();
|
|
@@ -5107,9 +5144,9 @@ var require_graceful_fs = __commonJS({
|
|
|
5107
5144
|
function retry2() {
|
|
5108
5145
|
clearTimeout(retryTimer);
|
|
5109
5146
|
retryTimer = void 0;
|
|
5110
|
-
if (
|
|
5147
|
+
if (fs7[gracefulQueue].length === 0)
|
|
5111
5148
|
return;
|
|
5112
|
-
var elem =
|
|
5149
|
+
var elem = fs7[gracefulQueue].shift();
|
|
5113
5150
|
var fn = elem[0];
|
|
5114
5151
|
var args = elem[1];
|
|
5115
5152
|
var err = elem[2];
|
|
@@ -5131,7 +5168,7 @@ var require_graceful_fs = __commonJS({
|
|
|
5131
5168
|
debug("RETRY", fn.name, args);
|
|
5132
5169
|
fn.apply(null, args.concat([startTime]));
|
|
5133
5170
|
} else {
|
|
5134
|
-
|
|
5171
|
+
fs7[gracefulQueue].push(elem);
|
|
5135
5172
|
}
|
|
5136
5173
|
}
|
|
5137
5174
|
if (retryTimer === void 0) {
|
|
@@ -5450,7 +5487,7 @@ var require_BufferList = __commonJS({
|
|
|
5450
5487
|
this.head = this.tail = null;
|
|
5451
5488
|
this.length = 0;
|
|
5452
5489
|
};
|
|
5453
|
-
BufferList.prototype.join = function
|
|
5490
|
+
BufferList.prototype.join = function join3(s) {
|
|
5454
5491
|
if (this.length === 0) return "";
|
|
5455
5492
|
var p = this.head;
|
|
5456
5493
|
var ret = "" + p.data;
|
|
@@ -7215,22 +7252,22 @@ var require_normalize_path = __commonJS({
|
|
|
7215
7252
|
"../../.yarn/cache/normalize-path-npm-3.0.0-a747cc5237-e008c8142b.zip/node_modules/normalize-path/index.js"(exports2, module2) {
|
|
7216
7253
|
"use strict";
|
|
7217
7254
|
init_cjs_shims();
|
|
7218
|
-
module2.exports = function(
|
|
7219
|
-
if (typeof
|
|
7255
|
+
module2.exports = function(path8, stripTrailing) {
|
|
7256
|
+
if (typeof path8 !== "string") {
|
|
7220
7257
|
throw new TypeError("expected path to be a string");
|
|
7221
7258
|
}
|
|
7222
|
-
if (
|
|
7223
|
-
var len =
|
|
7224
|
-
if (len <= 1) return
|
|
7259
|
+
if (path8 === "\\" || path8 === "/") return "/";
|
|
7260
|
+
var len = path8.length;
|
|
7261
|
+
if (len <= 1) return path8;
|
|
7225
7262
|
var prefix = "";
|
|
7226
|
-
if (len > 4 &&
|
|
7227
|
-
var ch =
|
|
7228
|
-
if ((ch === "?" || ch === ".") &&
|
|
7229
|
-
|
|
7263
|
+
if (len > 4 && path8[3] === "\\") {
|
|
7264
|
+
var ch = path8[2];
|
|
7265
|
+
if ((ch === "?" || ch === ".") && path8.slice(0, 2) === "\\\\") {
|
|
7266
|
+
path8 = path8.slice(2);
|
|
7230
7267
|
prefix = "//";
|
|
7231
7268
|
}
|
|
7232
7269
|
}
|
|
7233
|
-
var segs =
|
|
7270
|
+
var segs = path8.split(/[/\\]+/);
|
|
7234
7271
|
if (stripTrailing !== false && segs[segs.length - 1] === "") {
|
|
7235
7272
|
segs.pop();
|
|
7236
7273
|
}
|
|
@@ -15845,11 +15882,11 @@ var require_commonjs = __commonJS({
|
|
|
15845
15882
|
return (f) => f.length === len && f !== "." && f !== "..";
|
|
15846
15883
|
};
|
|
15847
15884
|
var defaultPlatform = typeof process === "object" && process ? typeof process.env === "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix";
|
|
15848
|
-
var
|
|
15885
|
+
var path8 = {
|
|
15849
15886
|
win32: { sep: "\\" },
|
|
15850
15887
|
posix: { sep: "/" }
|
|
15851
15888
|
};
|
|
15852
|
-
exports2.sep = defaultPlatform === "win32" ?
|
|
15889
|
+
exports2.sep = defaultPlatform === "win32" ? path8.win32.sep : path8.posix.sep;
|
|
15853
15890
|
exports2.minimatch.sep = exports2.sep;
|
|
15854
15891
|
exports2.GLOBSTAR = Symbol("globstar **");
|
|
15855
15892
|
exports2.minimatch.GLOBSTAR = exports2.GLOBSTAR;
|
|
@@ -19100,12 +19137,12 @@ var require_commonjs4 = __commonJS({
|
|
|
19100
19137
|
/**
|
|
19101
19138
|
* Get the Path object referenced by the string path, resolved from this Path
|
|
19102
19139
|
*/
|
|
19103
|
-
resolve(
|
|
19104
|
-
if (!
|
|
19140
|
+
resolve(path8) {
|
|
19141
|
+
if (!path8) {
|
|
19105
19142
|
return this;
|
|
19106
19143
|
}
|
|
19107
|
-
const rootPath = this.getRootString(
|
|
19108
|
-
const dir2 =
|
|
19144
|
+
const rootPath = this.getRootString(path8);
|
|
19145
|
+
const dir2 = path8.substring(rootPath.length);
|
|
19109
19146
|
const dirParts = dir2.split(this.splitSep);
|
|
19110
19147
|
const result = rootPath ? this.getRoot(rootPath).#resolveParts(dirParts) : this.#resolveParts(dirParts);
|
|
19111
19148
|
return result;
|
|
@@ -19858,8 +19895,8 @@ var require_commonjs4 = __commonJS({
|
|
|
19858
19895
|
/**
|
|
19859
19896
|
* @internal
|
|
19860
19897
|
*/
|
|
19861
|
-
getRootString(
|
|
19862
|
-
return node_path_1.win32.parse(
|
|
19898
|
+
getRootString(path8) {
|
|
19899
|
+
return node_path_1.win32.parse(path8).root;
|
|
19863
19900
|
}
|
|
19864
19901
|
/**
|
|
19865
19902
|
* @internal
|
|
@@ -19906,8 +19943,8 @@ var require_commonjs4 = __commonJS({
|
|
|
19906
19943
|
/**
|
|
19907
19944
|
* @internal
|
|
19908
19945
|
*/
|
|
19909
|
-
getRootString(
|
|
19910
|
-
return
|
|
19946
|
+
getRootString(path8) {
|
|
19947
|
+
return path8.startsWith("/") ? "/" : "";
|
|
19911
19948
|
}
|
|
19912
19949
|
/**
|
|
19913
19950
|
* @internal
|
|
@@ -19957,8 +19994,8 @@ var require_commonjs4 = __commonJS({
|
|
|
19957
19994
|
*
|
|
19958
19995
|
* @internal
|
|
19959
19996
|
*/
|
|
19960
|
-
constructor(cwd = process.cwd(), pathImpl, sep, { nocase, childrenCacheSize = 16 * 1024, fs:
|
|
19961
|
-
this.#fs = fsFromOption(
|
|
19997
|
+
constructor(cwd = process.cwd(), pathImpl, sep, { nocase, childrenCacheSize = 16 * 1024, fs: fs7 = defaultFS } = {}) {
|
|
19998
|
+
this.#fs = fsFromOption(fs7);
|
|
19962
19999
|
if (cwd instanceof URL || cwd.startsWith("file://")) {
|
|
19963
20000
|
cwd = (0, node_url_1.fileURLToPath)(cwd);
|
|
19964
20001
|
}
|
|
@@ -19997,11 +20034,11 @@ var require_commonjs4 = __commonJS({
|
|
|
19997
20034
|
/**
|
|
19998
20035
|
* Get the depth of a provided path, string, or the cwd
|
|
19999
20036
|
*/
|
|
20000
|
-
depth(
|
|
20001
|
-
if (typeof
|
|
20002
|
-
|
|
20037
|
+
depth(path8 = this.cwd) {
|
|
20038
|
+
if (typeof path8 === "string") {
|
|
20039
|
+
path8 = this.cwd.resolve(path8);
|
|
20003
20040
|
}
|
|
20004
|
-
return
|
|
20041
|
+
return path8.depth();
|
|
20005
20042
|
}
|
|
20006
20043
|
/**
|
|
20007
20044
|
* Return the cache of child entries. Exposed so subclasses can create
|
|
@@ -20488,9 +20525,9 @@ var require_commonjs4 = __commonJS({
|
|
|
20488
20525
|
process2();
|
|
20489
20526
|
return results;
|
|
20490
20527
|
}
|
|
20491
|
-
chdir(
|
|
20528
|
+
chdir(path8 = this.cwd) {
|
|
20492
20529
|
const oldCwd = this.cwd;
|
|
20493
|
-
this.cwd = typeof
|
|
20530
|
+
this.cwd = typeof path8 === "string" ? this.cwd.resolve(path8) : path8;
|
|
20494
20531
|
this.cwd[setAsCwd](oldCwd);
|
|
20495
20532
|
}
|
|
20496
20533
|
};
|
|
@@ -20517,8 +20554,8 @@ var require_commonjs4 = __commonJS({
|
|
|
20517
20554
|
/**
|
|
20518
20555
|
* @internal
|
|
20519
20556
|
*/
|
|
20520
|
-
newRoot(
|
|
20521
|
-
return new PathWin32(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs:
|
|
20557
|
+
newRoot(fs7) {
|
|
20558
|
+
return new PathWin32(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs7 });
|
|
20522
20559
|
}
|
|
20523
20560
|
/**
|
|
20524
20561
|
* Return true if the provided path string is an absolute path
|
|
@@ -20547,8 +20584,8 @@ var require_commonjs4 = __commonJS({
|
|
|
20547
20584
|
/**
|
|
20548
20585
|
* @internal
|
|
20549
20586
|
*/
|
|
20550
|
-
newRoot(
|
|
20551
|
-
return new PathPosix(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs:
|
|
20587
|
+
newRoot(fs7) {
|
|
20588
|
+
return new PathPosix(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs7 });
|
|
20552
20589
|
}
|
|
20553
20590
|
/**
|
|
20554
20591
|
* Return true if the provided path string is an absolute path
|
|
@@ -20881,8 +20918,8 @@ var require_processor = __commonJS({
|
|
|
20881
20918
|
}
|
|
20882
20919
|
// match, absolute, ifdir
|
|
20883
20920
|
entries() {
|
|
20884
|
-
return [...this.store.entries()].map(([
|
|
20885
|
-
|
|
20921
|
+
return [...this.store.entries()].map(([path8, n]) => [
|
|
20922
|
+
path8,
|
|
20886
20923
|
!!(n & 2),
|
|
20887
20924
|
!!(n & 1)
|
|
20888
20925
|
]);
|
|
@@ -21101,9 +21138,9 @@ var require_walker = __commonJS({
|
|
|
21101
21138
|
signal;
|
|
21102
21139
|
maxDepth;
|
|
21103
21140
|
includeChildMatches;
|
|
21104
|
-
constructor(patterns,
|
|
21141
|
+
constructor(patterns, path8, opts) {
|
|
21105
21142
|
this.patterns = patterns;
|
|
21106
|
-
this.path =
|
|
21143
|
+
this.path = path8;
|
|
21107
21144
|
this.opts = opts;
|
|
21108
21145
|
this.#sep = !opts.posix && opts.platform === "win32" ? "\\" : "/";
|
|
21109
21146
|
this.includeChildMatches = opts.includeChildMatches !== false;
|
|
@@ -21122,11 +21159,11 @@ var require_walker = __commonJS({
|
|
|
21122
21159
|
});
|
|
21123
21160
|
}
|
|
21124
21161
|
}
|
|
21125
|
-
#ignored(
|
|
21126
|
-
return this.seen.has(
|
|
21162
|
+
#ignored(path8) {
|
|
21163
|
+
return this.seen.has(path8) || !!this.#ignore?.ignored?.(path8);
|
|
21127
21164
|
}
|
|
21128
|
-
#childrenIgnored(
|
|
21129
|
-
return !!this.#ignore?.childrenIgnored?.(
|
|
21165
|
+
#childrenIgnored(path8) {
|
|
21166
|
+
return !!this.#ignore?.childrenIgnored?.(path8);
|
|
21130
21167
|
}
|
|
21131
21168
|
// backpressure mechanism
|
|
21132
21169
|
pause() {
|
|
@@ -21342,8 +21379,8 @@ var require_walker = __commonJS({
|
|
|
21342
21379
|
exports2.GlobUtil = GlobUtil;
|
|
21343
21380
|
var GlobWalker = class extends GlobUtil {
|
|
21344
21381
|
matches = /* @__PURE__ */ new Set();
|
|
21345
|
-
constructor(patterns,
|
|
21346
|
-
super(patterns,
|
|
21382
|
+
constructor(patterns, path8, opts) {
|
|
21383
|
+
super(patterns, path8, opts);
|
|
21347
21384
|
}
|
|
21348
21385
|
matchEmit(e) {
|
|
21349
21386
|
this.matches.add(e);
|
|
@@ -21381,8 +21418,8 @@ var require_walker = __commonJS({
|
|
|
21381
21418
|
exports2.GlobWalker = GlobWalker;
|
|
21382
21419
|
var GlobStream = class extends GlobUtil {
|
|
21383
21420
|
results;
|
|
21384
|
-
constructor(patterns,
|
|
21385
|
-
super(patterns,
|
|
21421
|
+
constructor(patterns, path8, opts) {
|
|
21422
|
+
super(patterns, path8, opts);
|
|
21386
21423
|
this.results = new minipass_1.Minipass({
|
|
21387
21424
|
signal: this.signal,
|
|
21388
21425
|
objectMode: true
|
|
@@ -21742,8 +21779,8 @@ var require_file = __commonJS({
|
|
|
21742
21779
|
"../../.yarn/cache/archiver-utils-npm-5.0.2-c2e6f595a7-3782c5fa99.zip/node_modules/archiver-utils/file.js"(exports2, module2) {
|
|
21743
21780
|
"use strict";
|
|
21744
21781
|
init_cjs_shims();
|
|
21745
|
-
var
|
|
21746
|
-
var
|
|
21782
|
+
var fs7 = require_graceful_fs();
|
|
21783
|
+
var path8 = require("path");
|
|
21747
21784
|
var flatten = require_flatten();
|
|
21748
21785
|
var difference = require_difference();
|
|
21749
21786
|
var union = require_union();
|
|
@@ -21768,8 +21805,8 @@ var require_file = __commonJS({
|
|
|
21768
21805
|
return result;
|
|
21769
21806
|
};
|
|
21770
21807
|
file.exists = function() {
|
|
21771
|
-
var filepath =
|
|
21772
|
-
return
|
|
21808
|
+
var filepath = path8.join.apply(path8, arguments);
|
|
21809
|
+
return fs7.existsSync(filepath);
|
|
21773
21810
|
};
|
|
21774
21811
|
file.expand = function(...args) {
|
|
21775
21812
|
var options2 = isPlainObject(args[0]) ? args.shift() : {};
|
|
@@ -21782,12 +21819,12 @@ var require_file = __commonJS({
|
|
|
21782
21819
|
});
|
|
21783
21820
|
if (options2.filter) {
|
|
21784
21821
|
matches = matches.filter(function(filepath) {
|
|
21785
|
-
filepath =
|
|
21822
|
+
filepath = path8.join(options2.cwd || "", filepath);
|
|
21786
21823
|
try {
|
|
21787
21824
|
if (typeof options2.filter === "function") {
|
|
21788
21825
|
return options2.filter(filepath);
|
|
21789
21826
|
} else {
|
|
21790
|
-
return
|
|
21827
|
+
return fs7.statSync(filepath)[options2.filter]();
|
|
21791
21828
|
}
|
|
21792
21829
|
} catch (e) {
|
|
21793
21830
|
return false;
|
|
@@ -21799,7 +21836,7 @@ var require_file = __commonJS({
|
|
|
21799
21836
|
file.expandMapping = function(patterns, destBase, options2) {
|
|
21800
21837
|
options2 = Object.assign({
|
|
21801
21838
|
rename: function(destBase2, destPath) {
|
|
21802
|
-
return
|
|
21839
|
+
return path8.join(destBase2 || "", destPath);
|
|
21803
21840
|
}
|
|
21804
21841
|
}, options2);
|
|
21805
21842
|
var files = [];
|
|
@@ -21807,14 +21844,14 @@ var require_file = __commonJS({
|
|
|
21807
21844
|
file.expand(options2, patterns).forEach(function(src) {
|
|
21808
21845
|
var destPath = src;
|
|
21809
21846
|
if (options2.flatten) {
|
|
21810
|
-
destPath =
|
|
21847
|
+
destPath = path8.basename(destPath);
|
|
21811
21848
|
}
|
|
21812
21849
|
if (options2.ext) {
|
|
21813
21850
|
destPath = destPath.replace(/(\.[^\/]*)?$/, options2.ext);
|
|
21814
21851
|
}
|
|
21815
21852
|
var dest = options2.rename(destBase, destPath, options2);
|
|
21816
21853
|
if (options2.cwd) {
|
|
21817
|
-
src =
|
|
21854
|
+
src = path8.join(options2.cwd, src);
|
|
21818
21855
|
}
|
|
21819
21856
|
dest = dest.replace(pathSeparatorRe, "/");
|
|
21820
21857
|
src = src.replace(pathSeparatorRe, "/");
|
|
@@ -21897,11 +21934,11 @@ var require_archiver_utils = __commonJS({
|
|
|
21897
21934
|
"../../.yarn/cache/archiver-utils-npm-5.0.2-c2e6f595a7-3782c5fa99.zip/node_modules/archiver-utils/index.js"(exports2, module2) {
|
|
21898
21935
|
"use strict";
|
|
21899
21936
|
init_cjs_shims();
|
|
21900
|
-
var
|
|
21901
|
-
var
|
|
21937
|
+
var fs7 = require_graceful_fs();
|
|
21938
|
+
var path8 = require("path");
|
|
21902
21939
|
var isStream = require_is_stream();
|
|
21903
21940
|
var lazystream = require_lazystream();
|
|
21904
|
-
var
|
|
21941
|
+
var normalizePath2 = require_normalize_path();
|
|
21905
21942
|
var defaults = require_defaults();
|
|
21906
21943
|
var Stream = require("stream").Stream;
|
|
21907
21944
|
var PassThrough = require_ours().PassThrough;
|
|
@@ -21946,7 +21983,7 @@ var require_archiver_utils = __commonJS({
|
|
|
21946
21983
|
};
|
|
21947
21984
|
utils.lazyReadStream = function(filepath) {
|
|
21948
21985
|
return new lazystream.Readable(function() {
|
|
21949
|
-
return
|
|
21986
|
+
return fs7.createReadStream(filepath);
|
|
21950
21987
|
});
|
|
21951
21988
|
};
|
|
21952
21989
|
utils.normalizeInputSource = function(source) {
|
|
@@ -21960,13 +21997,13 @@ var require_archiver_utils = __commonJS({
|
|
|
21960
21997
|
return source;
|
|
21961
21998
|
};
|
|
21962
21999
|
utils.sanitizePath = function(filepath) {
|
|
21963
|
-
return
|
|
22000
|
+
return normalizePath2(filepath, false).replace(/^\w+:/, "").replace(/^(\.\.\/|\/)+/, "");
|
|
21964
22001
|
};
|
|
21965
22002
|
utils.trailingSlashIt = function(str) {
|
|
21966
22003
|
return str.slice(-1) !== "/" ? str + "/" : str;
|
|
21967
22004
|
};
|
|
21968
22005
|
utils.unixifyPath = function(filepath) {
|
|
21969
|
-
return
|
|
22006
|
+
return normalizePath2(filepath, false).replace(/^\w+:/, "");
|
|
21970
22007
|
};
|
|
21971
22008
|
utils.walkdir = function(dirpath, base, callback) {
|
|
21972
22009
|
var results = [];
|
|
@@ -21974,7 +22011,7 @@ var require_archiver_utils = __commonJS({
|
|
|
21974
22011
|
callback = base;
|
|
21975
22012
|
base = dirpath;
|
|
21976
22013
|
}
|
|
21977
|
-
|
|
22014
|
+
fs7.readdir(dirpath, function(err, list) {
|
|
21978
22015
|
var i = 0;
|
|
21979
22016
|
var file;
|
|
21980
22017
|
var filepath;
|
|
@@ -21986,11 +22023,11 @@ var require_archiver_utils = __commonJS({
|
|
|
21986
22023
|
if (!file) {
|
|
21987
22024
|
return callback(null, results);
|
|
21988
22025
|
}
|
|
21989
|
-
filepath =
|
|
21990
|
-
|
|
22026
|
+
filepath = path8.join(dirpath, file);
|
|
22027
|
+
fs7.stat(filepath, function(err2, stats) {
|
|
21991
22028
|
results.push({
|
|
21992
22029
|
path: filepath,
|
|
21993
|
-
relative:
|
|
22030
|
+
relative: path8.relative(base, filepath).replace(/\\/g, "/"),
|
|
21994
22031
|
stats
|
|
21995
22032
|
});
|
|
21996
22033
|
if (stats && stats.isDirectory()) {
|
|
@@ -22053,10 +22090,10 @@ var require_core = __commonJS({
|
|
|
22053
22090
|
"../../.yarn/cache/archiver-npm-7.0.1-dc24339f78-02afd87ca1.zip/node_modules/archiver/lib/core.js"(exports2, module2) {
|
|
22054
22091
|
"use strict";
|
|
22055
22092
|
init_cjs_shims();
|
|
22056
|
-
var
|
|
22093
|
+
var fs7 = require("fs");
|
|
22057
22094
|
var glob = require_readdir_glob();
|
|
22058
22095
|
var async = (init_async(), __toCommonJS(async_exports));
|
|
22059
|
-
var
|
|
22096
|
+
var path8 = require("path");
|
|
22060
22097
|
var util = require_archiver_utils();
|
|
22061
22098
|
var inherits = require("util").inherits;
|
|
22062
22099
|
var ArchiverError = require_error();
|
|
@@ -22117,7 +22154,7 @@ var require_core = __commonJS({
|
|
|
22117
22154
|
data.sourcePath = filepath;
|
|
22118
22155
|
task.data = data;
|
|
22119
22156
|
this._entriesCount++;
|
|
22120
|
-
if (data.stats && data.stats instanceof
|
|
22157
|
+
if (data.stats && data.stats instanceof fs7.Stats) {
|
|
22121
22158
|
task = this._updateQueueTaskWithStats(task, data.stats);
|
|
22122
22159
|
if (task) {
|
|
22123
22160
|
if (data.stats.size) {
|
|
@@ -22288,7 +22325,7 @@ var require_core = __commonJS({
|
|
|
22288
22325
|
callback();
|
|
22289
22326
|
return;
|
|
22290
22327
|
}
|
|
22291
|
-
|
|
22328
|
+
fs7.lstat(task.filepath, function(err, stats) {
|
|
22292
22329
|
if (this._state.aborted) {
|
|
22293
22330
|
setImmediate(callback);
|
|
22294
22331
|
return;
|
|
@@ -22331,10 +22368,10 @@ var require_core = __commonJS({
|
|
|
22331
22368
|
task.data.sourceType = "buffer";
|
|
22332
22369
|
task.source = Buffer.concat([]);
|
|
22333
22370
|
} else if (stats.isSymbolicLink() && this._moduleSupports("symlink")) {
|
|
22334
|
-
var linkPath =
|
|
22335
|
-
var dirName =
|
|
22371
|
+
var linkPath = fs7.readlinkSync(task.filepath);
|
|
22372
|
+
var dirName = path8.dirname(task.filepath);
|
|
22336
22373
|
task.data.type = "symlink";
|
|
22337
|
-
task.data.linkname =
|
|
22374
|
+
task.data.linkname = path8.relative(dirName, path8.resolve(dirName, linkPath));
|
|
22338
22375
|
task.data.sourceType = "buffer";
|
|
22339
22376
|
task.source = Buffer.concat([]);
|
|
22340
22377
|
} else {
|
|
@@ -22879,7 +22916,7 @@ var require_zip_archive_entry = __commonJS({
|
|
|
22879
22916
|
"use strict";
|
|
22880
22917
|
init_cjs_shims();
|
|
22881
22918
|
var inherits = require("util").inherits;
|
|
22882
|
-
var
|
|
22919
|
+
var normalizePath2 = require_normalize_path();
|
|
22883
22920
|
var ArchiveEntry = require_archive_entry();
|
|
22884
22921
|
var GeneralPurposeBit = require_general_purpose_bit();
|
|
22885
22922
|
var UnixStat = require_unix_stat();
|
|
@@ -23003,7 +23040,7 @@ var require_zip_archive_entry = __commonJS({
|
|
|
23003
23040
|
this.method = method;
|
|
23004
23041
|
};
|
|
23005
23042
|
ZipArchiveEntry.prototype.setName = function(name, prependSlash = false) {
|
|
23006
|
-
name =
|
|
23043
|
+
name = normalizePath2(name, false).replace(/^\w+:/, "").replace(/^(\.\.\/|\/)+/, "");
|
|
23007
23044
|
if (prependSlash) {
|
|
23008
23045
|
name = `/${name}`;
|
|
23009
23046
|
}
|
|
@@ -26501,43 +26538,6 @@ var require_archiver = __commonJS({
|
|
|
26501
26538
|
}
|
|
26502
26539
|
});
|
|
26503
26540
|
|
|
26504
|
-
// ../../.yarn/__virtual__/typia-virtual-93fdc6e779/0/cache/typia-npm-8.0.4-b2444b63f3-1028a8a121.zip/node_modules/typia/lib/internal/_isFormatUuid.js
|
|
26505
|
-
var require_isFormatUuid = __commonJS({
|
|
26506
|
-
"../../.yarn/__virtual__/typia-virtual-93fdc6e779/0/cache/typia-npm-8.0.4-b2444b63f3-1028a8a121.zip/node_modules/typia/lib/internal/_isFormatUuid.js"(exports2) {
|
|
26507
|
-
"use strict";
|
|
26508
|
-
init_cjs_shims();
|
|
26509
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
26510
|
-
exports2._isFormatUuid = void 0;
|
|
26511
|
-
var _isFormatUuid2 = (str) => PATTERN.test(str);
|
|
26512
|
-
exports2._isFormatUuid = _isFormatUuid2;
|
|
26513
|
-
var PATTERN = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;
|
|
26514
|
-
}
|
|
26515
|
-
});
|
|
26516
|
-
|
|
26517
|
-
// ../../.yarn/__virtual__/typia-virtual-93fdc6e779/0/cache/typia-npm-8.0.4-b2444b63f3-1028a8a121.zip/node_modules/typia/lib/internal/_validateReport.js
|
|
26518
|
-
var require_validateReport = __commonJS({
|
|
26519
|
-
"../../.yarn/__virtual__/typia-virtual-93fdc6e779/0/cache/typia-npm-8.0.4-b2444b63f3-1028a8a121.zip/node_modules/typia/lib/internal/_validateReport.js"(exports2) {
|
|
26520
|
-
"use strict";
|
|
26521
|
-
init_cjs_shims();
|
|
26522
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
26523
|
-
exports2._validateReport = void 0;
|
|
26524
|
-
var _validateReport2 = (array) => {
|
|
26525
|
-
const reportable = (path7) => {
|
|
26526
|
-
if (array.length === 0)
|
|
26527
|
-
return true;
|
|
26528
|
-
const last = array[array.length - 1].path;
|
|
26529
|
-
return path7.length > last.length || last.substring(0, path7.length) !== path7;
|
|
26530
|
-
};
|
|
26531
|
-
return (exceptable, error) => {
|
|
26532
|
-
if (exceptable && reportable(error.path))
|
|
26533
|
-
array.push(error);
|
|
26534
|
-
return false;
|
|
26535
|
-
};
|
|
26536
|
-
};
|
|
26537
|
-
exports2._validateReport = _validateReport2;
|
|
26538
|
-
}
|
|
26539
|
-
});
|
|
26540
|
-
|
|
26541
26541
|
// src/index.ts
|
|
26542
26542
|
var index_exports = {};
|
|
26543
26543
|
__export(index_exports, {
|
|
@@ -26546,8 +26546,11 @@ __export(index_exports, {
|
|
|
26546
26546
|
appsInTossAppJson: () => appsInTossAppJson,
|
|
26547
26547
|
appsInTossEsbuildConfig: () => appsInTossEsbuildConfig,
|
|
26548
26548
|
appsInTossMetroConfig: () => appsInTossMetroConfig,
|
|
26549
|
+
appsInTossPostNotice: () => appsInTossPostNotice,
|
|
26550
|
+
collectDependencyVersions: () => collectDependencyVersions,
|
|
26549
26551
|
createArtifact: () => createArtifact,
|
|
26550
26552
|
setupRuntimeSetupScript: () => setupRuntimeSetupScript,
|
|
26553
|
+
validateAppInTossPluginOptions: () => validateAppInTossPluginOptions,
|
|
26551
26554
|
validateAppManifest: () => validateAppManifest,
|
|
26552
26555
|
validateZip: () => validateZip
|
|
26553
26556
|
});
|
|
@@ -26559,11 +26562,12 @@ init_cjs_shims();
|
|
|
26559
26562
|
var import_fs2 = __toESM(require("fs"), 1);
|
|
26560
26563
|
var import_path3 = __toESM(require("path"), 1);
|
|
26561
26564
|
|
|
26562
|
-
// ../../.yarn/cache/@react-native-bedrock-utils-npm-0.0.
|
|
26565
|
+
// ../../.yarn/cache/@react-native-bedrock-utils-npm-0.0.25-695b359c64-87cc7b90a3.zip/node_modules/@react-native-bedrock/utils/dist/index.js
|
|
26563
26566
|
init_cjs_shims();
|
|
26564
26567
|
var import_fs = __toESM(require("fs"), 1);
|
|
26565
26568
|
var import_path = __toESM(require("path"), 1);
|
|
26566
26569
|
var import_yauzl = __toESM(require_yauzl(), 1);
|
|
26570
|
+
var import_os = __toESM(require("os"), 1);
|
|
26567
26571
|
function getPackageRoot() {
|
|
26568
26572
|
let cwd = process.cwd();
|
|
26569
26573
|
const root = import_path.default.parse(cwd).root;
|
|
@@ -26608,6 +26612,13 @@ function readZipContent(zipPath, fileName) {
|
|
|
26608
26612
|
});
|
|
26609
26613
|
});
|
|
26610
26614
|
}
|
|
26615
|
+
var win32Impl = {
|
|
26616
|
+
normalizePath: (path22) => path22.replace(/\\/g, "/")
|
|
26617
|
+
};
|
|
26618
|
+
var posixImpl = {
|
|
26619
|
+
normalizePath: (path22) => path22
|
|
26620
|
+
};
|
|
26621
|
+
var { normalizePath } = import_os.default.type() === "Windows_NT" ? win32Impl : posixImpl;
|
|
26611
26622
|
|
|
26612
26623
|
// src/appsInToss.ts
|
|
26613
26624
|
var import_picocolors = __toESM(require_picocolors(), 1);
|
|
@@ -26617,57 +26628,6 @@ init_cjs_shims();
|
|
|
26617
26628
|
var REACT_NATIVE_VERSION = "0.72.6";
|
|
26618
26629
|
var APP_MANIFEST_NAME = "app.json";
|
|
26619
26630
|
|
|
26620
|
-
// src/utils/createArtifact.ts
|
|
26621
|
-
init_cjs_shims();
|
|
26622
|
-
var import_path2 = __toESM(require("path"), 1);
|
|
26623
|
-
|
|
26624
|
-
// src/utils/compressToZip.ts
|
|
26625
|
-
init_cjs_shims();
|
|
26626
|
-
var fs2 = __toESM(require("fs"), 1);
|
|
26627
|
-
var path2 = __toESM(require("path"), 1);
|
|
26628
|
-
var import_archiver = __toESM(require_archiver(), 1);
|
|
26629
|
-
async function compressToZip(config) {
|
|
26630
|
-
const { files, outfile } = config;
|
|
26631
|
-
return new Promise((resolve, reject2) => {
|
|
26632
|
-
const outputStream = fs2.createWriteStream(outfile);
|
|
26633
|
-
const archive = (0, import_archiver.default)("zip", { zlib: { level: 9 } });
|
|
26634
|
-
outputStream.on("close", () => resolve(outfile));
|
|
26635
|
-
outputStream.on("error", (error) => reject2(error));
|
|
26636
|
-
archive.on("error", (error) => reject2(error)).pipe(outputStream);
|
|
26637
|
-
files.forEach(({ path: filePath, name }) => {
|
|
26638
|
-
const fileName = name ?? path2.basename(filePath);
|
|
26639
|
-
archive.append(fs2.createReadStream(filePath), { name: fileName });
|
|
26640
|
-
});
|
|
26641
|
-
archive.finalize();
|
|
26642
|
-
});
|
|
26643
|
-
}
|
|
26644
|
-
|
|
26645
|
-
// src/utils/updateAppJsonMetadata.ts
|
|
26646
|
-
init_cjs_shims();
|
|
26647
|
-
var fs3 = __toESM(require("fs/promises"), 1);
|
|
26648
|
-
var path3 = __toESM(require("path"), 1);
|
|
26649
|
-
async function resolveAppManifestPath() {
|
|
26650
|
-
const cwd = getPackageRoot();
|
|
26651
|
-
const appManifestPath = path3.join(cwd, ".bedrock", APP_MANIFEST_NAME);
|
|
26652
|
-
await fs3.access(appManifestPath, fs3.constants.F_OK);
|
|
26653
|
-
return appManifestPath;
|
|
26654
|
-
}
|
|
26655
|
-
async function readAppJson(appJsonPath) {
|
|
26656
|
-
const appJson = await fs3.readFile(appJsonPath, "utf8");
|
|
26657
|
-
return JSON.parse(appJson);
|
|
26658
|
-
}
|
|
26659
|
-
async function writeAppJson(appJsonPath, content) {
|
|
26660
|
-
await fs3.writeFile(appJsonPath, JSON.stringify(content));
|
|
26661
|
-
}
|
|
26662
|
-
async function updateAppJsonMetadata(metadata) {
|
|
26663
|
-
const appJsonPath = await resolveAppManifestPath();
|
|
26664
|
-
const appJson = await readAppJson(appJsonPath);
|
|
26665
|
-
await writeAppJson(appJsonPath, {
|
|
26666
|
-
...appJson,
|
|
26667
|
-
_metadata: metadata
|
|
26668
|
-
});
|
|
26669
|
-
}
|
|
26670
|
-
|
|
26671
26631
|
// src/types.ts
|
|
26672
26632
|
init_cjs_shims();
|
|
26673
26633
|
var __typia_transform__isFormatUuid = __toESM(require_isFormatUuid(), 1);
|
|
@@ -26839,6 +26799,292 @@ var validateAppManifest = /* @__PURE__ */ (() => {
|
|
|
26839
26799
|
};
|
|
26840
26800
|
};
|
|
26841
26801
|
})();
|
|
26802
|
+
var validateAppInTossPluginOptions = /* @__PURE__ */ (() => {
|
|
26803
|
+
const _io0 = (input) => "object" === typeof input.brand && null !== input.brand && _io1(input.brand) && (Array.isArray(input.permissions) && input.permissions.every((elem) => "object" === typeof elem && null !== elem && _iu0(elem)));
|
|
26804
|
+
const _io1 = (input) => "string" === typeof input.displayName && "string" === typeof input.primaryColor && "string" === typeof input.icon && ("basic" === input.bridgeColorMode || "inverted" === input.bridgeColorMode);
|
|
26805
|
+
const _io2 = (input) => "clipboard" === input.name && ("read" === input.access || "write" === input.access);
|
|
26806
|
+
const _io3 = (input) => "geolocation" === input.name && "access" === input.access;
|
|
26807
|
+
const _io4 = (input) => "contacts" === input.name && ("read" === input.access || "write" === input.access);
|
|
26808
|
+
const _io5 = (input) => "photos" === input.name && ("read" === input.access || "write" === input.access);
|
|
26809
|
+
const _io6 = (input) => "camera" === input.name && "access" === input.access;
|
|
26810
|
+
const _iu0 = (input) => (() => {
|
|
26811
|
+
if ("camera" === input.name)
|
|
26812
|
+
return _io6(input);
|
|
26813
|
+
else if ("photos" === input.name)
|
|
26814
|
+
return _io5(input);
|
|
26815
|
+
else if ("contacts" === input.name)
|
|
26816
|
+
return _io4(input);
|
|
26817
|
+
else if ("geolocation" === input.name)
|
|
26818
|
+
return _io3(input);
|
|
26819
|
+
else if ("clipboard" === input.name)
|
|
26820
|
+
return _io2(input);
|
|
26821
|
+
else
|
|
26822
|
+
return false;
|
|
26823
|
+
})();
|
|
26824
|
+
const _vo0 = (input, _path, _exceptionable = true) => [("object" === typeof input.brand && null !== input.brand || _report(_exceptionable, {
|
|
26825
|
+
path: _path + ".brand",
|
|
26826
|
+
expected: "__type",
|
|
26827
|
+
value: input.brand
|
|
26828
|
+
})) && _vo1(input.brand, _path + ".brand", _exceptionable) || _report(_exceptionable, {
|
|
26829
|
+
path: _path + ".brand",
|
|
26830
|
+
expected: "__type",
|
|
26831
|
+
value: input.brand
|
|
26832
|
+
}), (Array.isArray(input.permissions) || _report(_exceptionable, {
|
|
26833
|
+
path: _path + ".permissions",
|
|
26834
|
+
expected: "Array<Permission>",
|
|
26835
|
+
value: input.permissions
|
|
26836
|
+
})) && input.permissions.map((elem, _index2) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
26837
|
+
path: _path + ".permissions[" + _index2 + "]",
|
|
26838
|
+
expected: "(CameraPermission | ClipboardPermission | ContactsPermission | GeolocationPermission | PhotosPermission)",
|
|
26839
|
+
value: elem
|
|
26840
|
+
})) && _vu0(elem, _path + ".permissions[" + _index2 + "]", _exceptionable) || _report(_exceptionable, {
|
|
26841
|
+
path: _path + ".permissions[" + _index2 + "]",
|
|
26842
|
+
expected: "(CameraPermission | ClipboardPermission | ContactsPermission | GeolocationPermission | PhotosPermission)",
|
|
26843
|
+
value: elem
|
|
26844
|
+
})).every((flag) => flag) || _report(_exceptionable, {
|
|
26845
|
+
path: _path + ".permissions",
|
|
26846
|
+
expected: "Array<Permission>",
|
|
26847
|
+
value: input.permissions
|
|
26848
|
+
})].every((flag) => flag);
|
|
26849
|
+
const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.displayName || _report(_exceptionable, {
|
|
26850
|
+
path: _path + ".displayName",
|
|
26851
|
+
expected: "string",
|
|
26852
|
+
value: input.displayName
|
|
26853
|
+
}), "string" === typeof input.primaryColor || _report(_exceptionable, {
|
|
26854
|
+
path: _path + ".primaryColor",
|
|
26855
|
+
expected: "string",
|
|
26856
|
+
value: input.primaryColor
|
|
26857
|
+
}), "string" === typeof input.icon || _report(_exceptionable, {
|
|
26858
|
+
path: _path + ".icon",
|
|
26859
|
+
expected: "string",
|
|
26860
|
+
value: input.icon
|
|
26861
|
+
}), "basic" === input.bridgeColorMode || "inverted" === input.bridgeColorMode || _report(_exceptionable, {
|
|
26862
|
+
path: _path + ".bridgeColorMode",
|
|
26863
|
+
expected: '("basic" | "inverted")',
|
|
26864
|
+
value: input.bridgeColorMode
|
|
26865
|
+
})].every((flag) => flag);
|
|
26866
|
+
const _vo2 = (input, _path, _exceptionable = true) => ["clipboard" === input.name || _report(_exceptionable, {
|
|
26867
|
+
path: _path + ".name",
|
|
26868
|
+
expected: '"clipboard"',
|
|
26869
|
+
value: input.name
|
|
26870
|
+
}), "read" === input.access || "write" === input.access || _report(_exceptionable, {
|
|
26871
|
+
path: _path + ".access",
|
|
26872
|
+
expected: '("read" | "write")',
|
|
26873
|
+
value: input.access
|
|
26874
|
+
})].every((flag) => flag);
|
|
26875
|
+
const _vo3 = (input, _path, _exceptionable = true) => ["geolocation" === input.name || _report(_exceptionable, {
|
|
26876
|
+
path: _path + ".name",
|
|
26877
|
+
expected: '"geolocation"',
|
|
26878
|
+
value: input.name
|
|
26879
|
+
}), "access" === input.access || _report(_exceptionable, {
|
|
26880
|
+
path: _path + ".access",
|
|
26881
|
+
expected: '"access"',
|
|
26882
|
+
value: input.access
|
|
26883
|
+
})].every((flag) => flag);
|
|
26884
|
+
const _vo4 = (input, _path, _exceptionable = true) => ["contacts" === input.name || _report(_exceptionable, {
|
|
26885
|
+
path: _path + ".name",
|
|
26886
|
+
expected: '"contacts"',
|
|
26887
|
+
value: input.name
|
|
26888
|
+
}), "read" === input.access || "write" === input.access || _report(_exceptionable, {
|
|
26889
|
+
path: _path + ".access",
|
|
26890
|
+
expected: '("read" | "write")',
|
|
26891
|
+
value: input.access
|
|
26892
|
+
})].every((flag) => flag);
|
|
26893
|
+
const _vo5 = (input, _path, _exceptionable = true) => ["photos" === input.name || _report(_exceptionable, {
|
|
26894
|
+
path: _path + ".name",
|
|
26895
|
+
expected: '"photos"',
|
|
26896
|
+
value: input.name
|
|
26897
|
+
}), "read" === input.access || "write" === input.access || _report(_exceptionable, {
|
|
26898
|
+
path: _path + ".access",
|
|
26899
|
+
expected: '("read" | "write")',
|
|
26900
|
+
value: input.access
|
|
26901
|
+
})].every((flag) => flag);
|
|
26902
|
+
const _vo6 = (input, _path, _exceptionable = true) => ["camera" === input.name || _report(_exceptionable, {
|
|
26903
|
+
path: _path + ".name",
|
|
26904
|
+
expected: '"camera"',
|
|
26905
|
+
value: input.name
|
|
26906
|
+
}), "access" === input.access || _report(_exceptionable, {
|
|
26907
|
+
path: _path + ".access",
|
|
26908
|
+
expected: '"access"',
|
|
26909
|
+
value: input.access
|
|
26910
|
+
})].every((flag) => flag);
|
|
26911
|
+
const _vu0 = (input, _path, _exceptionable = true) => (() => {
|
|
26912
|
+
if ("camera" === input.name)
|
|
26913
|
+
return _vo6(input, _path, _exceptionable);
|
|
26914
|
+
else if ("photos" === input.name)
|
|
26915
|
+
return _vo5(input, _path, _exceptionable);
|
|
26916
|
+
else if ("contacts" === input.name)
|
|
26917
|
+
return _vo4(input, _path, _exceptionable);
|
|
26918
|
+
else if ("geolocation" === input.name)
|
|
26919
|
+
return _vo3(input, _path, _exceptionable);
|
|
26920
|
+
else if ("clipboard" === input.name)
|
|
26921
|
+
return _vo2(input, _path, _exceptionable);
|
|
26922
|
+
else
|
|
26923
|
+
return _report(_exceptionable, {
|
|
26924
|
+
path: _path,
|
|
26925
|
+
expected: "(CameraPermission | PhotosPermission | ContactsPermission | GeolocationPermission | ClipboardPermission)",
|
|
26926
|
+
value: input
|
|
26927
|
+
});
|
|
26928
|
+
})();
|
|
26929
|
+
const __is = (input) => "object" === typeof input && null !== input && _io0(input);
|
|
26930
|
+
let errors;
|
|
26931
|
+
let _report;
|
|
26932
|
+
return (input) => {
|
|
26933
|
+
if (false === __is(input)) {
|
|
26934
|
+
errors = [];
|
|
26935
|
+
_report = __typia_transform__validateReport._validateReport(errors);
|
|
26936
|
+
((input2, _path, _exceptionable = true) => ("object" === typeof input2 && null !== input2 || _report(true, {
|
|
26937
|
+
path: _path + "",
|
|
26938
|
+
expected: "AppsInTossPluginOptions",
|
|
26939
|
+
value: input2
|
|
26940
|
+
})) && _vo0(input2, _path + "", true) || _report(true, {
|
|
26941
|
+
path: _path + "",
|
|
26942
|
+
expected: "AppsInTossPluginOptions",
|
|
26943
|
+
value: input2
|
|
26944
|
+
}))(input, "$input", true);
|
|
26945
|
+
const success = 0 === errors.length;
|
|
26946
|
+
return success ? {
|
|
26947
|
+
success,
|
|
26948
|
+
data: input
|
|
26949
|
+
} : {
|
|
26950
|
+
success,
|
|
26951
|
+
errors,
|
|
26952
|
+
data: input
|
|
26953
|
+
};
|
|
26954
|
+
}
|
|
26955
|
+
return {
|
|
26956
|
+
success: true,
|
|
26957
|
+
data: input
|
|
26958
|
+
};
|
|
26959
|
+
};
|
|
26960
|
+
})();
|
|
26961
|
+
|
|
26962
|
+
// src/utils/collectDependencyVersions.ts
|
|
26963
|
+
init_cjs_shims();
|
|
26964
|
+
var fs2 = __toESM(require("fs/promises"), 1);
|
|
26965
|
+
var path2 = __toESM(require("path"), 1);
|
|
26966
|
+
var esbuild = __toESM(require("esbuild"), 1);
|
|
26967
|
+
async function collectDependencyVersions(rootDir) {
|
|
26968
|
+
const packageJsonPath = path2.join(rootDir, "package.json");
|
|
26969
|
+
const packageJson = JSON.parse(await fs2.readFile(packageJsonPath, "utf8"));
|
|
26970
|
+
const [dependencies, devDependencies] = await Promise.all([
|
|
26971
|
+
resolvePackageVersions(rootDir, Object.keys(packageJson.dependencies)),
|
|
26972
|
+
resolvePackageVersions(rootDir, Object.keys(packageJson.devDependencies))
|
|
26973
|
+
]);
|
|
26974
|
+
return { dependencies, devDependencies };
|
|
26975
|
+
}
|
|
26976
|
+
async function resolvePackageVersions(rootDir, packageNames) {
|
|
26977
|
+
const results = {};
|
|
26978
|
+
await esbuild.build({
|
|
26979
|
+
stdin: { contents: createVirtualEntry(packageNames) },
|
|
26980
|
+
bundle: true,
|
|
26981
|
+
write: false,
|
|
26982
|
+
logLevel: "silent",
|
|
26983
|
+
plugins: [
|
|
26984
|
+
{
|
|
26985
|
+
name: "collect-package-version",
|
|
26986
|
+
setup(build2) {
|
|
26987
|
+
const RESOLVING = Symbol();
|
|
26988
|
+
build2.onResolve({ filter: /.*/ }, async (args) => {
|
|
26989
|
+
if (args.pluginData === RESOLVING) {
|
|
26990
|
+
return null;
|
|
26991
|
+
}
|
|
26992
|
+
const resolveOptions = {
|
|
26993
|
+
importer: args.importer,
|
|
26994
|
+
kind: args.kind,
|
|
26995
|
+
resolveDir: rootDir,
|
|
26996
|
+
pluginData: RESOLVING
|
|
26997
|
+
};
|
|
26998
|
+
let result = await build2.resolve(path2.join(args.path, "package.json"), resolveOptions);
|
|
26999
|
+
if (result.errors.length) {
|
|
27000
|
+
result = await build2.resolve(args.path, resolveOptions);
|
|
27001
|
+
}
|
|
27002
|
+
if (result.errors.length) {
|
|
27003
|
+
return result;
|
|
27004
|
+
}
|
|
27005
|
+
const packageName = args.path;
|
|
27006
|
+
const packagePath = extractPackagePath(result.path, packageName);
|
|
27007
|
+
if (packagePath) {
|
|
27008
|
+
results[packageName] = await getPackageVersion(packagePath);
|
|
27009
|
+
}
|
|
27010
|
+
return result;
|
|
27011
|
+
});
|
|
27012
|
+
build2.onLoad({ filter: /.*/ }, () => ({ contents: "// empty source" }));
|
|
27013
|
+
}
|
|
27014
|
+
}
|
|
27015
|
+
]
|
|
27016
|
+
});
|
|
27017
|
+
return results;
|
|
27018
|
+
}
|
|
27019
|
+
function createVirtualEntry(packageNames) {
|
|
27020
|
+
return packageNames.map((packageName) => `import '${packageName}';`).join("\n");
|
|
27021
|
+
}
|
|
27022
|
+
function extractPackagePath(path8, packageName) {
|
|
27023
|
+
const normalizedPath = normalizePath(path8);
|
|
27024
|
+
if (normalizedPath.endsWith("/package.json")) {
|
|
27025
|
+
return normalizedPath.replace(/\/package\.json$/, "");
|
|
27026
|
+
}
|
|
27027
|
+
const match = normalizedPath.match(new RegExp(`(.*?node_modules/${packageName})/.*$`));
|
|
27028
|
+
if (match) {
|
|
27029
|
+
return match[1];
|
|
27030
|
+
}
|
|
27031
|
+
throw new Error(`Failed to extract path: ${packageName}`);
|
|
27032
|
+
}
|
|
27033
|
+
async function getPackageVersion(packagePath) {
|
|
27034
|
+
const packageJson = JSON.parse(await fs2.readFile(path2.join(packagePath, "package.json"), "utf-8"));
|
|
27035
|
+
return packageJson.version;
|
|
27036
|
+
}
|
|
27037
|
+
|
|
27038
|
+
// src/utils/createArtifact.ts
|
|
27039
|
+
init_cjs_shims();
|
|
27040
|
+
var import_path2 = __toESM(require("path"), 1);
|
|
27041
|
+
|
|
27042
|
+
// src/utils/compressToZip.ts
|
|
27043
|
+
init_cjs_shims();
|
|
27044
|
+
var fs3 = __toESM(require("fs"), 1);
|
|
27045
|
+
var path3 = __toESM(require("path"), 1);
|
|
27046
|
+
var import_archiver = __toESM(require_archiver(), 1);
|
|
27047
|
+
async function compressToZip(config) {
|
|
27048
|
+
const { files, outfile } = config;
|
|
27049
|
+
return new Promise((resolve, reject2) => {
|
|
27050
|
+
const outputStream = fs3.createWriteStream(outfile);
|
|
27051
|
+
const archive = (0, import_archiver.default)("zip", { zlib: { level: 9 } });
|
|
27052
|
+
outputStream.on("close", () => resolve(outfile));
|
|
27053
|
+
outputStream.on("error", (error) => reject2(error));
|
|
27054
|
+
archive.on("error", (error) => reject2(error)).pipe(outputStream);
|
|
27055
|
+
files.forEach(({ path: filePath, name }) => {
|
|
27056
|
+
const fileName = name ?? path3.basename(filePath);
|
|
27057
|
+
archive.append(fs3.createReadStream(filePath), { name: fileName });
|
|
27058
|
+
});
|
|
27059
|
+
archive.finalize();
|
|
27060
|
+
});
|
|
27061
|
+
}
|
|
27062
|
+
|
|
27063
|
+
// src/utils/updateAppJsonMetadata.ts
|
|
27064
|
+
init_cjs_shims();
|
|
27065
|
+
var fs4 = __toESM(require("fs/promises"), 1);
|
|
27066
|
+
var path4 = __toESM(require("path"), 1);
|
|
27067
|
+
async function resolveAppManifestPath() {
|
|
27068
|
+
const cwd = getPackageRoot();
|
|
27069
|
+
const appManifestPath = path4.join(cwd, ".bedrock", APP_MANIFEST_NAME);
|
|
27070
|
+
await fs4.access(appManifestPath, fs4.constants.F_OK);
|
|
27071
|
+
return appManifestPath;
|
|
27072
|
+
}
|
|
27073
|
+
async function readAppJson(appJsonPath) {
|
|
27074
|
+
const appJson = await fs4.readFile(appJsonPath, "utf8");
|
|
27075
|
+
return JSON.parse(appJson);
|
|
27076
|
+
}
|
|
27077
|
+
async function writeAppJson(appJsonPath, content) {
|
|
27078
|
+
await fs4.writeFile(appJsonPath, JSON.stringify(content));
|
|
27079
|
+
}
|
|
27080
|
+
async function updateAppJsonMetadata(metadata) {
|
|
27081
|
+
const appJsonPath = await resolveAppManifestPath();
|
|
27082
|
+
const appJson = await readAppJson(appJsonPath);
|
|
27083
|
+
await writeAppJson(appJsonPath, {
|
|
27084
|
+
...appJson,
|
|
27085
|
+
_metadata: metadata
|
|
27086
|
+
});
|
|
27087
|
+
}
|
|
26842
27088
|
|
|
26843
27089
|
// src/utils/createArtifact.ts
|
|
26844
27090
|
async function validateZip(zipPath) {
|
|
@@ -26864,7 +27110,8 @@ async function createArtifact(options2) {
|
|
|
26864
27110
|
await updateAppJsonMetadata({
|
|
26865
27111
|
runtimeVersion: reactNativeVersion,
|
|
26866
27112
|
bundleFiles: namedBundleFiles.map(({ name }) => name),
|
|
26867
|
-
deploymentId: options2.deploymentId
|
|
27113
|
+
deploymentId: options2.deploymentId,
|
|
27114
|
+
packageJson: options2.packageJson
|
|
26868
27115
|
});
|
|
26869
27116
|
await compressToZip({
|
|
26870
27117
|
files: [{ path: appJsonPath, name: "app.json" }, ...namedBundleFiles, ...options2.additionalFilesToZip ?? []],
|
|
@@ -27290,6 +27537,9 @@ function setupRuntimeSetupScript(config) {
|
|
|
27290
27537
|
}
|
|
27291
27538
|
|
|
27292
27539
|
// src/appsInToss.ts
|
|
27540
|
+
function log2(...args) {
|
|
27541
|
+
console.log(import_picocolors.default.bold(import_picocolors.default.cyan("[AppsInToss]")), ...args);
|
|
27542
|
+
}
|
|
27293
27543
|
function appsInTossCreateArtifact(deploymentId) {
|
|
27294
27544
|
const packageRoot = getPackageRoot();
|
|
27295
27545
|
return {
|
|
@@ -27297,9 +27547,12 @@ function appsInTossCreateArtifact(deploymentId) {
|
|
|
27297
27547
|
build: {
|
|
27298
27548
|
order: "post",
|
|
27299
27549
|
handler: async ({ buildResults, appName, cwd }) => {
|
|
27550
|
+
log2("\uC571 \uBE4C\uB4DC \uC911...");
|
|
27551
|
+
const { dependencies, devDependencies } = await collectDependencyVersions(cwd);
|
|
27300
27552
|
const artifactOutfile = await createArtifact({
|
|
27301
27553
|
reactNativeVersion: REACT_NATIVE_VERSION,
|
|
27302
27554
|
deploymentId,
|
|
27555
|
+
packageJson: { dependencies, devDependencies },
|
|
27303
27556
|
bundleFiles: buildResults.map(({ outfile, sourcemapOutfile, platform }) => [
|
|
27304
27557
|
{
|
|
27305
27558
|
path: outfile,
|
|
@@ -27317,7 +27570,7 @@ function appsInTossCreateArtifact(deploymentId) {
|
|
|
27317
27570
|
throw new Error("\uC544\uD2F0\uD329\uD2B8 \uC0DD\uC131\uC5D0 \uC2E4\uD328\uD588\uC5B4\uC694.");
|
|
27318
27571
|
}
|
|
27319
27572
|
const filename = import_path3.default.basename(artifactOutfile);
|
|
27320
|
-
|
|
27573
|
+
log2(`\u2705 ${import_picocolors.default.green(`${filename}`)} \uBE4C\uB4DC \uC644\uB8CC`);
|
|
27321
27574
|
}
|
|
27322
27575
|
}
|
|
27323
27576
|
};
|
|
@@ -27394,18 +27647,58 @@ async function appsInTossAppJson(options2) {
|
|
|
27394
27647
|
}
|
|
27395
27648
|
};
|
|
27396
27649
|
}
|
|
27650
|
+
function appsInTossPostNotice() {
|
|
27651
|
+
const phase = "post";
|
|
27652
|
+
return {
|
|
27653
|
+
name: "apps-in-toss:post-notice",
|
|
27654
|
+
dev: {
|
|
27655
|
+
order: phase,
|
|
27656
|
+
handler() {
|
|
27657
|
+
}
|
|
27658
|
+
},
|
|
27659
|
+
build: {
|
|
27660
|
+
order: phase,
|
|
27661
|
+
async handler({ appName }) {
|
|
27662
|
+
if (this.meta.hermes == null) {
|
|
27663
|
+
log2(`Hermes \uD50C\uB7EC\uADF8\uC778 \uAD6C\uC131\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC5B4\uC694. \uAC00\uC774\uB4DC\uB97C \uCC38\uACE0\uD558\uC5EC Hermes \uD50C\uB7EC\uADF8\uC778\uC744 \uAD6C\uC131\uD574\uC8FC\uC138\uC694.`);
|
|
27664
|
+
return;
|
|
27665
|
+
}
|
|
27666
|
+
if (this.meta.sentry) {
|
|
27667
|
+
const command = [
|
|
27668
|
+
"ait sentry upload-sourcemap",
|
|
27669
|
+
`--app-name ${appName}`,
|
|
27670
|
+
"--api-key <API_KEY>",
|
|
27671
|
+
"--deployment-id <DEPLOYMENT_ID>"
|
|
27672
|
+
].join(" \\\n");
|
|
27673
|
+
log2(
|
|
27674
|
+
`Sentry \uAD6C\uC131\uC774 \uAC10\uC9C0\uB410\uC5B4\uC694. \uC815\uD655\uD55C \uC624\uB958 \uCD94\uC801\uC744 \uC704\uD574\uC11C\uB294 \uBC30\uD3EC\uAC00 \uB05D\uB09C \uB4A4 \uB2E4\uC74C \uBA85\uB839\uC5B4\uB85C \uC18C\uC2A4\uB9F5\uC744 \uC5C5\uB85C\uB4DC\uD574 \uC8FC\uC138\uC694.
|
|
27675
|
+
|
|
27676
|
+
${command}
|
|
27677
|
+
`
|
|
27678
|
+
);
|
|
27679
|
+
}
|
|
27680
|
+
}
|
|
27681
|
+
}
|
|
27682
|
+
};
|
|
27683
|
+
}
|
|
27397
27684
|
function appsInToss(options2) {
|
|
27685
|
+
const result = validateAppInTossPluginOptions(options2);
|
|
27686
|
+
if (!result.success) {
|
|
27687
|
+
console.error("[Apps In Toss Plugin] \uD50C\uB7EC\uADF8\uC778 \uC635\uC158\uC774 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. bedrock.config.ts \uAD6C\uC131\uC744 \uD655\uC778\uD574\uC8FC\uC138\uC694.");
|
|
27688
|
+
process.exit(1);
|
|
27689
|
+
}
|
|
27398
27690
|
const deploymentId = generateDeploymentId();
|
|
27399
27691
|
const { contents, path: envFilePath } = setupRuntimeSetupScript({
|
|
27400
|
-
brand:
|
|
27692
|
+
brand: result.data.brand,
|
|
27401
27693
|
deploymentId
|
|
27402
27694
|
});
|
|
27403
27695
|
return [
|
|
27404
|
-
appsInTossAppJson(
|
|
27405
|
-
appsInTossDevServer(
|
|
27696
|
+
appsInTossAppJson(result.data),
|
|
27697
|
+
appsInTossDevServer(result.data),
|
|
27406
27698
|
appsInTossCreateArtifact(deploymentId),
|
|
27407
27699
|
appsInTossEsbuildConfig(contents),
|
|
27408
|
-
appsInTossMetroConfig(envFilePath)
|
|
27700
|
+
appsInTossMetroConfig(envFilePath),
|
|
27701
|
+
appsInTossPostNotice()
|
|
27409
27702
|
];
|
|
27410
27703
|
}
|
|
27411
27704
|
|
|
@@ -27472,8 +27765,11 @@ function analytics() {
|
|
|
27472
27765
|
appsInTossAppJson,
|
|
27473
27766
|
appsInTossEsbuildConfig,
|
|
27474
27767
|
appsInTossMetroConfig,
|
|
27768
|
+
appsInTossPostNotice,
|
|
27769
|
+
collectDependencyVersions,
|
|
27475
27770
|
createArtifact,
|
|
27476
27771
|
setupRuntimeSetupScript,
|
|
27772
|
+
validateAppInTossPluginOptions,
|
|
27477
27773
|
validateAppManifest,
|
|
27478
27774
|
validateZip
|
|
27479
27775
|
});
|