@google/gemini-cli 0.50.0-preview.1 → 0.51.0-nightly.20260628.gae0a3aa7b
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/bundle/{chunk-EVS7V6SI.js → chunk-2P6JQF54.js} +2 -2
- package/bundle/{chunk-PMUN5IJZ.js → chunk-3C7SPXNN.js} +3 -3
- package/bundle/{chunk-HBYY54DT.js → chunk-3JDBA23N.js} +1 -1
- package/bundle/{chunk-MRTOORC2.js → chunk-5HUSHSAK.js} +1 -1
- package/bundle/{chunk-HIFDWUBC.js → chunk-5MPSRU5R.js} +3 -3
- package/bundle/{chunk-D6R3GDXI.js → chunk-5YYKEMGZ.js} +7 -7
- package/bundle/{chunk-ETXBN7LK.js → chunk-A2WOCUFL.js} +1 -1
- package/bundle/{chunk-URYDP2SH.js → chunk-ARRRIJYZ.js} +1 -1
- package/bundle/{chunk-GIFWBR5G.js → chunk-ASSSVZQX.js} +1 -1
- package/bundle/{chunk-CG7RLECB.js → chunk-B3BMYWMF.js} +8 -5
- package/bundle/{chunk-TTDJS74S.js → chunk-BJSHOQIW.js} +3 -3
- package/bundle/{chunk-OQSXQOXR.js → chunk-DFL7QOXV.js} +1 -1
- package/bundle/{chunk-VZLZACOY.js → chunk-FF7XQXIC.js} +67 -54
- package/bundle/{chunk-OAXFDG4J.js → chunk-IZK7CU3P.js} +2 -2
- package/bundle/chunk-JEDA7JM2.js +118 -0
- package/bundle/chunk-JSFRBE7W.js +102505 -0
- package/bundle/{chunk-IFRIQSIE.js → chunk-K7QIXKKL.js} +9 -8
- package/bundle/{chunk-QUO63CEE.js → chunk-KLSGC3PL.js} +7 -7
- package/bundle/{chunk-NQO7ZYF5.js → chunk-KXVFJCMI.js} +623 -559
- package/bundle/{chunk-NU74E5OB.js → chunk-LHGWOWJB.js} +1 -1
- package/bundle/{chunk-K6GQQZ35.js → chunk-MSUIB2RO.js} +1 -1
- package/bundle/{chunk-56TNC54N.js → chunk-NTLOZHBH.js} +620 -557
- package/bundle/{chunk-QZTUH5I6.js → chunk-NZC3UDWY.js} +1 -1
- package/bundle/{chunk-PX72MQPF.js → chunk-O4IFXUPT.js} +8164 -14643
- package/bundle/{chunk-K7JTCJL6.js → chunk-OFE5GAE5.js} +2 -2
- package/bundle/chunk-S33GESYV.js +154 -0
- package/bundle/chunk-UMMUBTO7.js +1571 -0
- package/bundle/chunk-V6LYQ327.js +512 -0
- package/bundle/chunk-VB6C5OUY.js +398 -0
- package/bundle/chunk-WIJSBWKE.js +387737 -0
- package/bundle/chunk-XA5XDLB5.js +17332 -0
- package/bundle/{chunk-BYMHHELT.js → chunk-Y7MSAM7B.js} +1 -1
- package/bundle/{cleanup-KHF3XAMM.js → cleanup-H3GCICMS.js} +2 -2
- package/bundle/{cleanup-LIJUVJND.js → cleanup-LHISXLQZ.js} +2 -2
- package/bundle/{cleanup-YXYCFALS.js → cleanup-NZVLXF7J.js} +2 -2
- package/bundle/cleanup-SXAGDP6J.js +32 -0
- package/bundle/{core-3SATNZBC.js → core-TDT225X5.js} +1 -1
- package/bundle/{devtoolsService-54ZAMF4J.js → devtoolsService-55RGDJ56.js} +2 -2
- package/bundle/{devtoolsService-YH6FAC3M.js → devtoolsService-6O44GIZ5.js} +4 -3
- package/bundle/devtoolsService-HQAB7K6O.js +4359 -0
- package/bundle/{devtoolsService-XKEKJNUM.js → devtoolsService-U5TSOUVA.js} +2 -2
- package/bundle/{dist-GWVUFSPN.js → dist-PPDCKQFF.js} +1 -1
- package/bundle/{core-2BGJNGF4.js → dist-TKQYICFX.js} +1 -1
- package/bundle/dist-ZGMSUIFB.js +2150 -0
- package/bundle/docs/changelogs/preview.md +11 -3
- package/bundle/{gemini-USF33FXJ.js → gemini-AWI7V2EO.js} +14 -14
- package/bundle/{gemini-JW3NMQQQ.js → gemini-LCQSXHZ3.js} +212 -196
- package/bundle/{gemini-KG2OGIZ7.js → gemini-LRPGYUOW.js} +14 -14
- package/bundle/gemini-UWV6HULZ.js +29270 -0
- package/bundle/gemini.js +7 -7
- package/bundle/{interactiveCli-G4FFZALT.js → interactiveCli-LXN56KV2.js} +18 -9
- package/bundle/{interactiveCli-T4PHRDUE.js → interactiveCli-QO4HL2QB.js} +324 -296
- package/bundle/{interactiveCli-2DCUI4IH.js → interactiveCli-SBI3DBXQ.js} +18 -9
- package/bundle/interactiveCli-VJG2R7CW.js +34776 -0
- package/bundle/{liteRtServerManager-MP7KT7HX.js → liteRtServerManager-2XPWPLDB.js} +4 -4
- package/bundle/{liteRtServerManager-OVLRSYIZ.js → liteRtServerManager-36RNJODR.js} +4 -4
- package/bundle/{liteRtServerManager-G2WOIQU7.js → liteRtServerManager-6HGTKPXP.js} +4 -4
- package/bundle/liteRtServerManager-WSXSF7NS.js +65 -0
- package/bundle/{oauth2-provider-CL3I6VGC.js → oauth2-provider-EHUF6TNF.js} +1 -1
- package/bundle/{oauth2-provider-5CHFLHC2.js → oauth2-provider-FRSZPLVJ.js} +1 -1
- package/bundle/{oauth2-provider-2Q3EF4MW.js → oauth2-provider-KEIUB36U.js} +38 -72
- package/bundle/oauth2-provider-STKNXXZP.js +235 -0
- package/bundle/{start-VAVVPVKH.js → start-5UIAK42X.js} +6 -6
- package/bundle/{start-XS2AMGH6.js → start-EAAHI7BF.js} +6 -6
- package/bundle/{start-JOOSVCLE.js → start-GWCQ4EPF.js} +6 -6
- package/bundle/start-ZLDXIAVO.js +18 -0
- package/package.json +1 -1
|
@@ -2262,11 +2262,11 @@ var require_lib = __commonJS({
|
|
|
2262
2262
|
"use strict";
|
|
2263
2263
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
2264
2264
|
exports2.isBinaryFileSync = exports2.isBinaryFile = void 0;
|
|
2265
|
-
var
|
|
2265
|
+
var fs93 = __require("fs");
|
|
2266
2266
|
var util_1 = __require("util");
|
|
2267
|
-
var statAsync = (0, util_1.promisify)(
|
|
2268
|
-
var openAsync = (0, util_1.promisify)(
|
|
2269
|
-
var closeAsync = (0, util_1.promisify)(
|
|
2267
|
+
var statAsync = (0, util_1.promisify)(fs93.stat);
|
|
2268
|
+
var openAsync = (0, util_1.promisify)(fs93.open);
|
|
2269
|
+
var closeAsync = (0, util_1.promisify)(fs93.close);
|
|
2270
2270
|
var MAX_BYTES = 512;
|
|
2271
2271
|
var UTF8_BOUNDARY_RESERVE = 3;
|
|
2272
2272
|
var Reader = class {
|
|
@@ -2359,7 +2359,7 @@ var require_lib = __commonJS({
|
|
|
2359
2359
|
const fileDescriptor = await openAsync(file2, "r");
|
|
2360
2360
|
const allocBuffer = Buffer.alloc(MAX_BYTES + UTF8_BOUNDARY_RESERVE);
|
|
2361
2361
|
return new Promise((fulfill, reject) => {
|
|
2362
|
-
|
|
2362
|
+
fs93.read(fileDescriptor, allocBuffer, 0, MAX_BYTES + UTF8_BOUNDARY_RESERVE, 0, (err2, bytesRead, _) => {
|
|
2363
2363
|
closeAsync(fileDescriptor);
|
|
2364
2364
|
if (err2) {
|
|
2365
2365
|
reject(err2);
|
|
@@ -2382,12 +2382,12 @@ var require_lib = __commonJS({
|
|
|
2382
2382
|
exports2.isBinaryFile = isBinaryFile2;
|
|
2383
2383
|
function isBinaryFileSync(file2, size) {
|
|
2384
2384
|
if (isString2(file2)) {
|
|
2385
|
-
const stat14 =
|
|
2385
|
+
const stat14 = fs93.statSync(file2);
|
|
2386
2386
|
isStatFile(stat14);
|
|
2387
|
-
const fileDescriptor =
|
|
2387
|
+
const fileDescriptor = fs93.openSync(file2, "r");
|
|
2388
2388
|
const allocBuffer = Buffer.alloc(MAX_BYTES + UTF8_BOUNDARY_RESERVE);
|
|
2389
|
-
const bytesRead =
|
|
2390
|
-
|
|
2389
|
+
const bytesRead = fs93.readSync(fileDescriptor, allocBuffer, 0, MAX_BYTES + UTF8_BOUNDARY_RESERVE, 0);
|
|
2390
|
+
fs93.closeSync(fileDescriptor);
|
|
2391
2391
|
return isBinaryCheck(allocBuffer, bytesRead);
|
|
2392
2392
|
} else {
|
|
2393
2393
|
if (size === void 0) {
|
|
@@ -2498,54 +2498,54 @@ var require_polyfills = __commonJS({
|
|
|
2498
2498
|
}
|
|
2499
2499
|
var chdir;
|
|
2500
2500
|
module2.exports = patch;
|
|
2501
|
-
function patch(
|
|
2501
|
+
function patch(fs93) {
|
|
2502
2502
|
if (constants6.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
|
|
2503
|
-
patchLchmod(
|
|
2504
|
-
}
|
|
2505
|
-
if (!
|
|
2506
|
-
patchLutimes(
|
|
2507
|
-
}
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
if (
|
|
2527
|
-
|
|
2503
|
+
patchLchmod(fs93);
|
|
2504
|
+
}
|
|
2505
|
+
if (!fs93.lutimes) {
|
|
2506
|
+
patchLutimes(fs93);
|
|
2507
|
+
}
|
|
2508
|
+
fs93.chown = chownFix(fs93.chown);
|
|
2509
|
+
fs93.fchown = chownFix(fs93.fchown);
|
|
2510
|
+
fs93.lchown = chownFix(fs93.lchown);
|
|
2511
|
+
fs93.chmod = chmodFix(fs93.chmod);
|
|
2512
|
+
fs93.fchmod = chmodFix(fs93.fchmod);
|
|
2513
|
+
fs93.lchmod = chmodFix(fs93.lchmod);
|
|
2514
|
+
fs93.chownSync = chownFixSync(fs93.chownSync);
|
|
2515
|
+
fs93.fchownSync = chownFixSync(fs93.fchownSync);
|
|
2516
|
+
fs93.lchownSync = chownFixSync(fs93.lchownSync);
|
|
2517
|
+
fs93.chmodSync = chmodFixSync(fs93.chmodSync);
|
|
2518
|
+
fs93.fchmodSync = chmodFixSync(fs93.fchmodSync);
|
|
2519
|
+
fs93.lchmodSync = chmodFixSync(fs93.lchmodSync);
|
|
2520
|
+
fs93.stat = statFix(fs93.stat);
|
|
2521
|
+
fs93.fstat = statFix(fs93.fstat);
|
|
2522
|
+
fs93.lstat = statFix(fs93.lstat);
|
|
2523
|
+
fs93.statSync = statFixSync(fs93.statSync);
|
|
2524
|
+
fs93.fstatSync = statFixSync(fs93.fstatSync);
|
|
2525
|
+
fs93.lstatSync = statFixSync(fs93.lstatSync);
|
|
2526
|
+
if (fs93.chmod && !fs93.lchmod) {
|
|
2527
|
+
fs93.lchmod = function(path113, mode, cb) {
|
|
2528
2528
|
if (cb) process.nextTick(cb);
|
|
2529
2529
|
};
|
|
2530
|
-
|
|
2530
|
+
fs93.lchmodSync = function() {
|
|
2531
2531
|
};
|
|
2532
2532
|
}
|
|
2533
|
-
if (
|
|
2534
|
-
|
|
2533
|
+
if (fs93.chown && !fs93.lchown) {
|
|
2534
|
+
fs93.lchown = function(path113, uid, gid, cb) {
|
|
2535
2535
|
if (cb) process.nextTick(cb);
|
|
2536
2536
|
};
|
|
2537
|
-
|
|
2537
|
+
fs93.lchownSync = function() {
|
|
2538
2538
|
};
|
|
2539
2539
|
}
|
|
2540
2540
|
if (platform12 === "win32") {
|
|
2541
|
-
|
|
2541
|
+
fs93.rename = typeof fs93.rename !== "function" ? fs93.rename : function(fs$rename) {
|
|
2542
2542
|
function rename4(from, to, cb) {
|
|
2543
2543
|
var start2 = Date.now();
|
|
2544
2544
|
var backoff = 0;
|
|
2545
2545
|
fs$rename(from, to, function CB(er) {
|
|
2546
2546
|
if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start2 < 6e4) {
|
|
2547
2547
|
setTimeout(function() {
|
|
2548
|
-
|
|
2548
|
+
fs93.stat(to, function(stater, st) {
|
|
2549
2549
|
if (stater && stater.code === "ENOENT")
|
|
2550
2550
|
fs$rename(from, to, CB);
|
|
2551
2551
|
else
|
|
@@ -2561,9 +2561,9 @@ var require_polyfills = __commonJS({
|
|
|
2561
2561
|
}
|
|
2562
2562
|
if (Object.setPrototypeOf) Object.setPrototypeOf(rename4, fs$rename);
|
|
2563
2563
|
return rename4;
|
|
2564
|
-
}(
|
|
2564
|
+
}(fs93.rename);
|
|
2565
2565
|
}
|
|
2566
|
-
|
|
2566
|
+
fs93.read = typeof fs93.read !== "function" ? fs93.read : function(fs$read) {
|
|
2567
2567
|
function read2(fd, buffer, offset, length, position, callback_) {
|
|
2568
2568
|
var callback;
|
|
2569
2569
|
if (callback_ && typeof callback_ === "function") {
|
|
@@ -2571,22 +2571,22 @@ var require_polyfills = __commonJS({
|
|
|
2571
2571
|
callback = function(er, _, __) {
|
|
2572
2572
|
if (er && er.code === "EAGAIN" && eagCounter < 10) {
|
|
2573
2573
|
eagCounter++;
|
|
2574
|
-
return fs$read.call(
|
|
2574
|
+
return fs$read.call(fs93, fd, buffer, offset, length, position, callback);
|
|
2575
2575
|
}
|
|
2576
2576
|
callback_.apply(this, arguments);
|
|
2577
2577
|
};
|
|
2578
2578
|
}
|
|
2579
|
-
return fs$read.call(
|
|
2579
|
+
return fs$read.call(fs93, fd, buffer, offset, length, position, callback);
|
|
2580
2580
|
}
|
|
2581
2581
|
if (Object.setPrototypeOf) Object.setPrototypeOf(read2, fs$read);
|
|
2582
2582
|
return read2;
|
|
2583
|
-
}(
|
|
2584
|
-
|
|
2583
|
+
}(fs93.read);
|
|
2584
|
+
fs93.readSync = typeof fs93.readSync !== "function" ? fs93.readSync : /* @__PURE__ */ function(fs$readSync) {
|
|
2585
2585
|
return function(fd, buffer, offset, length, position) {
|
|
2586
2586
|
var eagCounter = 0;
|
|
2587
2587
|
while (true) {
|
|
2588
2588
|
try {
|
|
2589
|
-
return fs$readSync.call(
|
|
2589
|
+
return fs$readSync.call(fs93, fd, buffer, offset, length, position);
|
|
2590
2590
|
} catch (er) {
|
|
2591
2591
|
if (er.code === "EAGAIN" && eagCounter < 10) {
|
|
2592
2592
|
eagCounter++;
|
|
@@ -2596,10 +2596,10 @@ var require_polyfills = __commonJS({
|
|
|
2596
2596
|
}
|
|
2597
2597
|
}
|
|
2598
2598
|
};
|
|
2599
|
-
}(
|
|
2600
|
-
function patchLchmod(
|
|
2601
|
-
|
|
2602
|
-
|
|
2599
|
+
}(fs93.readSync);
|
|
2600
|
+
function patchLchmod(fs94) {
|
|
2601
|
+
fs94.lchmod = function(path113, mode, callback) {
|
|
2602
|
+
fs94.open(
|
|
2603
2603
|
path113,
|
|
2604
2604
|
constants6.O_WRONLY | constants6.O_SYMLINK,
|
|
2605
2605
|
mode,
|
|
@@ -2608,80 +2608,80 @@ var require_polyfills = __commonJS({
|
|
|
2608
2608
|
if (callback) callback(err2);
|
|
2609
2609
|
return;
|
|
2610
2610
|
}
|
|
2611
|
-
|
|
2612
|
-
|
|
2611
|
+
fs94.fchmod(fd, mode, function(err3) {
|
|
2612
|
+
fs94.close(fd, function(err22) {
|
|
2613
2613
|
if (callback) callback(err3 || err22);
|
|
2614
2614
|
});
|
|
2615
2615
|
});
|
|
2616
2616
|
}
|
|
2617
2617
|
);
|
|
2618
2618
|
};
|
|
2619
|
-
|
|
2620
|
-
var fd =
|
|
2619
|
+
fs94.lchmodSync = function(path113, mode) {
|
|
2620
|
+
var fd = fs94.openSync(path113, constants6.O_WRONLY | constants6.O_SYMLINK, mode);
|
|
2621
2621
|
var threw = true;
|
|
2622
2622
|
var ret;
|
|
2623
2623
|
try {
|
|
2624
|
-
ret =
|
|
2624
|
+
ret = fs94.fchmodSync(fd, mode);
|
|
2625
2625
|
threw = false;
|
|
2626
2626
|
} finally {
|
|
2627
2627
|
if (threw) {
|
|
2628
2628
|
try {
|
|
2629
|
-
|
|
2629
|
+
fs94.closeSync(fd);
|
|
2630
2630
|
} catch (er) {
|
|
2631
2631
|
}
|
|
2632
2632
|
} else {
|
|
2633
|
-
|
|
2633
|
+
fs94.closeSync(fd);
|
|
2634
2634
|
}
|
|
2635
2635
|
}
|
|
2636
2636
|
return ret;
|
|
2637
2637
|
};
|
|
2638
2638
|
}
|
|
2639
|
-
function patchLutimes(
|
|
2640
|
-
if (constants6.hasOwnProperty("O_SYMLINK") &&
|
|
2641
|
-
|
|
2642
|
-
|
|
2639
|
+
function patchLutimes(fs94) {
|
|
2640
|
+
if (constants6.hasOwnProperty("O_SYMLINK") && fs94.futimes) {
|
|
2641
|
+
fs94.lutimes = function(path113, at, mt, cb) {
|
|
2642
|
+
fs94.open(path113, constants6.O_SYMLINK, function(er, fd) {
|
|
2643
2643
|
if (er) {
|
|
2644
2644
|
if (cb) cb(er);
|
|
2645
2645
|
return;
|
|
2646
2646
|
}
|
|
2647
|
-
|
|
2648
|
-
|
|
2647
|
+
fs94.futimes(fd, at, mt, function(er2) {
|
|
2648
|
+
fs94.close(fd, function(er22) {
|
|
2649
2649
|
if (cb) cb(er2 || er22);
|
|
2650
2650
|
});
|
|
2651
2651
|
});
|
|
2652
2652
|
});
|
|
2653
2653
|
};
|
|
2654
|
-
|
|
2655
|
-
var fd =
|
|
2654
|
+
fs94.lutimesSync = function(path113, at, mt) {
|
|
2655
|
+
var fd = fs94.openSync(path113, constants6.O_SYMLINK);
|
|
2656
2656
|
var ret;
|
|
2657
2657
|
var threw = true;
|
|
2658
2658
|
try {
|
|
2659
|
-
ret =
|
|
2659
|
+
ret = fs94.futimesSync(fd, at, mt);
|
|
2660
2660
|
threw = false;
|
|
2661
2661
|
} finally {
|
|
2662
2662
|
if (threw) {
|
|
2663
2663
|
try {
|
|
2664
|
-
|
|
2664
|
+
fs94.closeSync(fd);
|
|
2665
2665
|
} catch (er) {
|
|
2666
2666
|
}
|
|
2667
2667
|
} else {
|
|
2668
|
-
|
|
2668
|
+
fs94.closeSync(fd);
|
|
2669
2669
|
}
|
|
2670
2670
|
}
|
|
2671
2671
|
return ret;
|
|
2672
2672
|
};
|
|
2673
|
-
} else if (
|
|
2674
|
-
|
|
2673
|
+
} else if (fs94.futimes) {
|
|
2674
|
+
fs94.lutimes = function(_a4, _b, _c, cb) {
|
|
2675
2675
|
if (cb) process.nextTick(cb);
|
|
2676
2676
|
};
|
|
2677
|
-
|
|
2677
|
+
fs94.lutimesSync = function() {
|
|
2678
2678
|
};
|
|
2679
2679
|
}
|
|
2680
2680
|
}
|
|
2681
2681
|
function chmodFix(orig) {
|
|
2682
2682
|
if (!orig) return orig;
|
|
2683
2683
|
return function(target, mode, cb) {
|
|
2684
|
-
return orig.call(
|
|
2684
|
+
return orig.call(fs93, target, mode, function(er) {
|
|
2685
2685
|
if (chownErOk(er)) er = null;
|
|
2686
2686
|
if (cb) cb.apply(this, arguments);
|
|
2687
2687
|
});
|
|
@@ -2691,7 +2691,7 @@ var require_polyfills = __commonJS({
|
|
|
2691
2691
|
if (!orig) return orig;
|
|
2692
2692
|
return function(target, mode) {
|
|
2693
2693
|
try {
|
|
2694
|
-
return orig.call(
|
|
2694
|
+
return orig.call(fs93, target, mode);
|
|
2695
2695
|
} catch (er) {
|
|
2696
2696
|
if (!chownErOk(er)) throw er;
|
|
2697
2697
|
}
|
|
@@ -2700,7 +2700,7 @@ var require_polyfills = __commonJS({
|
|
|
2700
2700
|
function chownFix(orig) {
|
|
2701
2701
|
if (!orig) return orig;
|
|
2702
2702
|
return function(target, uid, gid, cb) {
|
|
2703
|
-
return orig.call(
|
|
2703
|
+
return orig.call(fs93, target, uid, gid, function(er) {
|
|
2704
2704
|
if (chownErOk(er)) er = null;
|
|
2705
2705
|
if (cb) cb.apply(this, arguments);
|
|
2706
2706
|
});
|
|
@@ -2710,7 +2710,7 @@ var require_polyfills = __commonJS({
|
|
|
2710
2710
|
if (!orig) return orig;
|
|
2711
2711
|
return function(target, uid, gid) {
|
|
2712
2712
|
try {
|
|
2713
|
-
return orig.call(
|
|
2713
|
+
return orig.call(fs93, target, uid, gid);
|
|
2714
2714
|
} catch (er) {
|
|
2715
2715
|
if (!chownErOk(er)) throw er;
|
|
2716
2716
|
}
|
|
@@ -2730,13 +2730,13 @@ var require_polyfills = __commonJS({
|
|
|
2730
2730
|
}
|
|
2731
2731
|
if (cb) cb.apply(this, arguments);
|
|
2732
2732
|
}
|
|
2733
|
-
return options ? orig.call(
|
|
2733
|
+
return options ? orig.call(fs93, target, options, callback) : orig.call(fs93, target, callback);
|
|
2734
2734
|
};
|
|
2735
2735
|
}
|
|
2736
2736
|
function statFixSync(orig) {
|
|
2737
2737
|
if (!orig) return orig;
|
|
2738
2738
|
return function(target, options) {
|
|
2739
|
-
var stats = options ? orig.call(
|
|
2739
|
+
var stats = options ? orig.call(fs93, target, options) : orig.call(fs93, target);
|
|
2740
2740
|
if (stats) {
|
|
2741
2741
|
if (stats.uid < 0) stats.uid += 4294967296;
|
|
2742
2742
|
if (stats.gid < 0) stats.gid += 4294967296;
|
|
@@ -2765,7 +2765,7 @@ var require_legacy_streams = __commonJS({
|
|
|
2765
2765
|
"node_modules/graceful-fs/legacy-streams.js"(exports2, module2) {
|
|
2766
2766
|
var Stream2 = __require("stream").Stream;
|
|
2767
2767
|
module2.exports = legacy;
|
|
2768
|
-
function legacy(
|
|
2768
|
+
function legacy(fs93) {
|
|
2769
2769
|
return {
|
|
2770
2770
|
ReadStream,
|
|
2771
2771
|
WriteStream
|
|
@@ -2808,7 +2808,7 @@ var require_legacy_streams = __commonJS({
|
|
|
2808
2808
|
});
|
|
2809
2809
|
return;
|
|
2810
2810
|
}
|
|
2811
|
-
|
|
2811
|
+
fs93.open(this.path, this.flags, this.mode, function(err2, fd) {
|
|
2812
2812
|
if (err2) {
|
|
2813
2813
|
self2.emit("error", err2);
|
|
2814
2814
|
self2.readable = false;
|
|
@@ -2847,7 +2847,7 @@ var require_legacy_streams = __commonJS({
|
|
|
2847
2847
|
this.busy = false;
|
|
2848
2848
|
this._queue = [];
|
|
2849
2849
|
if (this.fd === null) {
|
|
2850
|
-
this._open =
|
|
2850
|
+
this._open = fs93.open;
|
|
2851
2851
|
this._queue.push([this._open, this.path, this.flags, this.mode, void 0]);
|
|
2852
2852
|
this.flush();
|
|
2853
2853
|
}
|
|
@@ -2882,7 +2882,7 @@ var require_clone = __commonJS({
|
|
|
2882
2882
|
// node_modules/graceful-fs/graceful-fs.js
|
|
2883
2883
|
var require_graceful_fs = __commonJS({
|
|
2884
2884
|
"node_modules/graceful-fs/graceful-fs.js"(exports2, module2) {
|
|
2885
|
-
var
|
|
2885
|
+
var fs93 = __require("fs");
|
|
2886
2886
|
var polyfills = require_polyfills();
|
|
2887
2887
|
var legacy = require_legacy_streams();
|
|
2888
2888
|
var clone2 = require_clone();
|
|
@@ -2914,12 +2914,12 @@ var require_graceful_fs = __commonJS({
|
|
|
2914
2914
|
m = "GFS4: " + m.split(/\n/).join("\nGFS4: ");
|
|
2915
2915
|
console.error(m);
|
|
2916
2916
|
};
|
|
2917
|
-
if (!
|
|
2917
|
+
if (!fs93[gracefulQueue]) {
|
|
2918
2918
|
queue = global[gracefulQueue] || [];
|
|
2919
|
-
publishQueue(
|
|
2920
|
-
|
|
2919
|
+
publishQueue(fs93, queue);
|
|
2920
|
+
fs93.close = function(fs$close) {
|
|
2921
2921
|
function close(fd, cb) {
|
|
2922
|
-
return fs$close.call(
|
|
2922
|
+
return fs$close.call(fs93, fd, function(err2) {
|
|
2923
2923
|
if (!err2) {
|
|
2924
2924
|
resetQueue();
|
|
2925
2925
|
}
|
|
@@ -2931,40 +2931,40 @@ var require_graceful_fs = __commonJS({
|
|
|
2931
2931
|
value: fs$close
|
|
2932
2932
|
});
|
|
2933
2933
|
return close;
|
|
2934
|
-
}(
|
|
2935
|
-
|
|
2934
|
+
}(fs93.close);
|
|
2935
|
+
fs93.closeSync = function(fs$closeSync) {
|
|
2936
2936
|
function closeSync2(fd) {
|
|
2937
|
-
fs$closeSync.apply(
|
|
2937
|
+
fs$closeSync.apply(fs93, arguments);
|
|
2938
2938
|
resetQueue();
|
|
2939
2939
|
}
|
|
2940
2940
|
Object.defineProperty(closeSync2, previousSymbol, {
|
|
2941
2941
|
value: fs$closeSync
|
|
2942
2942
|
});
|
|
2943
2943
|
return closeSync2;
|
|
2944
|
-
}(
|
|
2944
|
+
}(fs93.closeSync);
|
|
2945
2945
|
if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
|
|
2946
2946
|
process.on("exit", function() {
|
|
2947
|
-
debug2(
|
|
2948
|
-
__require("assert").equal(
|
|
2947
|
+
debug2(fs93[gracefulQueue]);
|
|
2948
|
+
__require("assert").equal(fs93[gracefulQueue].length, 0);
|
|
2949
2949
|
});
|
|
2950
2950
|
}
|
|
2951
2951
|
}
|
|
2952
2952
|
var queue;
|
|
2953
2953
|
if (!global[gracefulQueue]) {
|
|
2954
|
-
publishQueue(global,
|
|
2955
|
-
}
|
|
2956
|
-
module2.exports = patch(clone2(
|
|
2957
|
-
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !
|
|
2958
|
-
module2.exports = patch(
|
|
2959
|
-
|
|
2960
|
-
}
|
|
2961
|
-
function patch(
|
|
2962
|
-
polyfills(
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
var fs$readFile =
|
|
2967
|
-
|
|
2954
|
+
publishQueue(global, fs93[gracefulQueue]);
|
|
2955
|
+
}
|
|
2956
|
+
module2.exports = patch(clone2(fs93));
|
|
2957
|
+
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs93.__patched) {
|
|
2958
|
+
module2.exports = patch(fs93);
|
|
2959
|
+
fs93.__patched = true;
|
|
2960
|
+
}
|
|
2961
|
+
function patch(fs94) {
|
|
2962
|
+
polyfills(fs94);
|
|
2963
|
+
fs94.gracefulify = patch;
|
|
2964
|
+
fs94.createReadStream = createReadStream3;
|
|
2965
|
+
fs94.createWriteStream = createWriteStream6;
|
|
2966
|
+
var fs$readFile = fs94.readFile;
|
|
2967
|
+
fs94.readFile = readFile15;
|
|
2968
2968
|
function readFile15(path113, options, cb) {
|
|
2969
2969
|
if (typeof options === "function")
|
|
2970
2970
|
cb = options, options = null;
|
|
@@ -2980,8 +2980,8 @@ var require_graceful_fs = __commonJS({
|
|
|
2980
2980
|
});
|
|
2981
2981
|
}
|
|
2982
2982
|
}
|
|
2983
|
-
var fs$writeFile =
|
|
2984
|
-
|
|
2983
|
+
var fs$writeFile = fs94.writeFile;
|
|
2984
|
+
fs94.writeFile = writeFile10;
|
|
2985
2985
|
function writeFile10(path113, data, options, cb) {
|
|
2986
2986
|
if (typeof options === "function")
|
|
2987
2987
|
cb = options, options = null;
|
|
@@ -2997,9 +2997,9 @@ var require_graceful_fs = __commonJS({
|
|
|
2997
2997
|
});
|
|
2998
2998
|
}
|
|
2999
2999
|
}
|
|
3000
|
-
var fs$appendFile =
|
|
3000
|
+
var fs$appendFile = fs94.appendFile;
|
|
3001
3001
|
if (fs$appendFile)
|
|
3002
|
-
|
|
3002
|
+
fs94.appendFile = appendFile;
|
|
3003
3003
|
function appendFile(path113, data, options, cb) {
|
|
3004
3004
|
if (typeof options === "function")
|
|
3005
3005
|
cb = options, options = null;
|
|
@@ -3015,9 +3015,9 @@ var require_graceful_fs = __commonJS({
|
|
|
3015
3015
|
});
|
|
3016
3016
|
}
|
|
3017
3017
|
}
|
|
3018
|
-
var fs$copyFile =
|
|
3018
|
+
var fs$copyFile = fs94.copyFile;
|
|
3019
3019
|
if (fs$copyFile)
|
|
3020
|
-
|
|
3020
|
+
fs94.copyFile = copyFile2;
|
|
3021
3021
|
function copyFile2(src, dest, flags2, cb) {
|
|
3022
3022
|
if (typeof flags2 === "function") {
|
|
3023
3023
|
cb = flags2;
|
|
@@ -3035,8 +3035,8 @@ var require_graceful_fs = __commonJS({
|
|
|
3035
3035
|
});
|
|
3036
3036
|
}
|
|
3037
3037
|
}
|
|
3038
|
-
var fs$readdir =
|
|
3039
|
-
|
|
3038
|
+
var fs$readdir = fs94.readdir;
|
|
3039
|
+
fs94.readdir = readdir13;
|
|
3040
3040
|
var noReaddirOptionVersions = /^v[0-5]\./;
|
|
3041
3041
|
function readdir13(path113, options, cb) {
|
|
3042
3042
|
if (typeof options === "function")
|
|
@@ -3077,21 +3077,21 @@ var require_graceful_fs = __commonJS({
|
|
|
3077
3077
|
}
|
|
3078
3078
|
}
|
|
3079
3079
|
if (process.version.substr(0, 4) === "v0.8") {
|
|
3080
|
-
var legStreams = legacy(
|
|
3080
|
+
var legStreams = legacy(fs94);
|
|
3081
3081
|
ReadStream = legStreams.ReadStream;
|
|
3082
3082
|
WriteStream = legStreams.WriteStream;
|
|
3083
3083
|
}
|
|
3084
|
-
var fs$ReadStream =
|
|
3084
|
+
var fs$ReadStream = fs94.ReadStream;
|
|
3085
3085
|
if (fs$ReadStream) {
|
|
3086
3086
|
ReadStream.prototype = Object.create(fs$ReadStream.prototype);
|
|
3087
3087
|
ReadStream.prototype.open = ReadStream$open;
|
|
3088
3088
|
}
|
|
3089
|
-
var fs$WriteStream =
|
|
3089
|
+
var fs$WriteStream = fs94.WriteStream;
|
|
3090
3090
|
if (fs$WriteStream) {
|
|
3091
3091
|
WriteStream.prototype = Object.create(fs$WriteStream.prototype);
|
|
3092
3092
|
WriteStream.prototype.open = WriteStream$open;
|
|
3093
3093
|
}
|
|
3094
|
-
Object.defineProperty(
|
|
3094
|
+
Object.defineProperty(fs94, "ReadStream", {
|
|
3095
3095
|
get: function() {
|
|
3096
3096
|
return ReadStream;
|
|
3097
3097
|
},
|
|
@@ -3101,7 +3101,7 @@ var require_graceful_fs = __commonJS({
|
|
|
3101
3101
|
enumerable: true,
|
|
3102
3102
|
configurable: true
|
|
3103
3103
|
});
|
|
3104
|
-
Object.defineProperty(
|
|
3104
|
+
Object.defineProperty(fs94, "WriteStream", {
|
|
3105
3105
|
get: function() {
|
|
3106
3106
|
return WriteStream;
|
|
3107
3107
|
},
|
|
@@ -3112,7 +3112,7 @@ var require_graceful_fs = __commonJS({
|
|
|
3112
3112
|
configurable: true
|
|
3113
3113
|
});
|
|
3114
3114
|
var FileReadStream = ReadStream;
|
|
3115
|
-
Object.defineProperty(
|
|
3115
|
+
Object.defineProperty(fs94, "FileReadStream", {
|
|
3116
3116
|
get: function() {
|
|
3117
3117
|
return FileReadStream;
|
|
3118
3118
|
},
|
|
@@ -3123,7 +3123,7 @@ var require_graceful_fs = __commonJS({
|
|
|
3123
3123
|
configurable: true
|
|
3124
3124
|
});
|
|
3125
3125
|
var FileWriteStream = WriteStream;
|
|
3126
|
-
Object.defineProperty(
|
|
3126
|
+
Object.defineProperty(fs94, "FileWriteStream", {
|
|
3127
3127
|
get: function() {
|
|
3128
3128
|
return FileWriteStream;
|
|
3129
3129
|
},
|
|
@@ -3172,13 +3172,13 @@ var require_graceful_fs = __commonJS({
|
|
|
3172
3172
|
});
|
|
3173
3173
|
}
|
|
3174
3174
|
function createReadStream3(path113, options) {
|
|
3175
|
-
return new
|
|
3175
|
+
return new fs94.ReadStream(path113, options);
|
|
3176
3176
|
}
|
|
3177
3177
|
function createWriteStream6(path113, options) {
|
|
3178
|
-
return new
|
|
3178
|
+
return new fs94.WriteStream(path113, options);
|
|
3179
3179
|
}
|
|
3180
|
-
var fs$open =
|
|
3181
|
-
|
|
3180
|
+
var fs$open = fs94.open;
|
|
3181
|
+
fs94.open = open8;
|
|
3182
3182
|
function open8(path113, flags2, mode, cb) {
|
|
3183
3183
|
if (typeof mode === "function")
|
|
3184
3184
|
cb = mode, mode = null;
|
|
@@ -3194,20 +3194,20 @@ var require_graceful_fs = __commonJS({
|
|
|
3194
3194
|
});
|
|
3195
3195
|
}
|
|
3196
3196
|
}
|
|
3197
|
-
return
|
|
3197
|
+
return fs94;
|
|
3198
3198
|
}
|
|
3199
3199
|
function enqueue(elem) {
|
|
3200
3200
|
debug2("ENQUEUE", elem[0].name, elem[1]);
|
|
3201
|
-
|
|
3201
|
+
fs93[gracefulQueue].push(elem);
|
|
3202
3202
|
retry();
|
|
3203
3203
|
}
|
|
3204
3204
|
var retryTimer;
|
|
3205
3205
|
function resetQueue() {
|
|
3206
3206
|
var now = Date.now();
|
|
3207
|
-
for (var i3 = 0; i3 <
|
|
3208
|
-
if (
|
|
3209
|
-
|
|
3210
|
-
|
|
3207
|
+
for (var i3 = 0; i3 < fs93[gracefulQueue].length; ++i3) {
|
|
3208
|
+
if (fs93[gracefulQueue][i3].length > 2) {
|
|
3209
|
+
fs93[gracefulQueue][i3][3] = now;
|
|
3210
|
+
fs93[gracefulQueue][i3][4] = now;
|
|
3211
3211
|
}
|
|
3212
3212
|
}
|
|
3213
3213
|
retry();
|
|
@@ -3215,9 +3215,9 @@ var require_graceful_fs = __commonJS({
|
|
|
3215
3215
|
function retry() {
|
|
3216
3216
|
clearTimeout(retryTimer);
|
|
3217
3217
|
retryTimer = void 0;
|
|
3218
|
-
if (
|
|
3218
|
+
if (fs93[gracefulQueue].length === 0)
|
|
3219
3219
|
return;
|
|
3220
|
-
var elem =
|
|
3220
|
+
var elem = fs93[gracefulQueue].shift();
|
|
3221
3221
|
var fn = elem[0];
|
|
3222
3222
|
var args2 = elem[1];
|
|
3223
3223
|
var err2 = elem[2];
|
|
@@ -3239,7 +3239,7 @@ var require_graceful_fs = __commonJS({
|
|
|
3239
3239
|
debug2("RETRY", fn.name, args2);
|
|
3240
3240
|
fn.apply(null, args2.concat([startTime]));
|
|
3241
3241
|
} else {
|
|
3242
|
-
|
|
3242
|
+
fs93[gracefulQueue].push(elem);
|
|
3243
3243
|
}
|
|
3244
3244
|
}
|
|
3245
3245
|
if (retryTimer === void 0) {
|
|
@@ -3674,10 +3674,10 @@ var require_mtime_precision = __commonJS({
|
|
|
3674
3674
|
"node_modules/proper-lockfile/lib/mtime-precision.js"(exports2, module2) {
|
|
3675
3675
|
"use strict";
|
|
3676
3676
|
var cacheSymbol = Symbol();
|
|
3677
|
-
function probe(file2,
|
|
3678
|
-
const cachedPrecision =
|
|
3677
|
+
function probe(file2, fs93, callback) {
|
|
3678
|
+
const cachedPrecision = fs93[cacheSymbol];
|
|
3679
3679
|
if (cachedPrecision) {
|
|
3680
|
-
return
|
|
3680
|
+
return fs93.stat(file2, (err2, stat14) => {
|
|
3681
3681
|
if (err2) {
|
|
3682
3682
|
return callback(err2);
|
|
3683
3683
|
}
|
|
@@ -3685,16 +3685,16 @@ var require_mtime_precision = __commonJS({
|
|
|
3685
3685
|
});
|
|
3686
3686
|
}
|
|
3687
3687
|
const mtime = new Date(Math.ceil(Date.now() / 1e3) * 1e3 + 5);
|
|
3688
|
-
|
|
3688
|
+
fs93.utimes(file2, mtime, mtime, (err2) => {
|
|
3689
3689
|
if (err2) {
|
|
3690
3690
|
return callback(err2);
|
|
3691
3691
|
}
|
|
3692
|
-
|
|
3692
|
+
fs93.stat(file2, (err3, stat14) => {
|
|
3693
3693
|
if (err3) {
|
|
3694
3694
|
return callback(err3);
|
|
3695
3695
|
}
|
|
3696
3696
|
const precision = stat14.mtime.getTime() % 1e3 === 0 ? "s" : "ms";
|
|
3697
|
-
Object.defineProperty(
|
|
3697
|
+
Object.defineProperty(fs93, cacheSymbol, { value: precision });
|
|
3698
3698
|
callback(null, stat14.mtime, precision);
|
|
3699
3699
|
});
|
|
3700
3700
|
});
|
|
@@ -3716,7 +3716,7 @@ var require_lockfile = __commonJS({
|
|
|
3716
3716
|
"node_modules/proper-lockfile/lib/lockfile.js"(exports2, module2) {
|
|
3717
3717
|
"use strict";
|
|
3718
3718
|
var path113 = __require("path");
|
|
3719
|
-
var
|
|
3719
|
+
var fs93 = require_graceful_fs();
|
|
3720
3720
|
var retry = require_retry2();
|
|
3721
3721
|
var onExit2 = require_signal_exit();
|
|
3722
3722
|
var mtimePrecision = require_mtime_precision();
|
|
@@ -3847,7 +3847,7 @@ var require_lockfile = __commonJS({
|
|
|
3847
3847
|
update: null,
|
|
3848
3848
|
realpath: true,
|
|
3849
3849
|
retries: 0,
|
|
3850
|
-
fs:
|
|
3850
|
+
fs: fs93,
|
|
3851
3851
|
onCompromised: (err2) => {
|
|
3852
3852
|
throw err2;
|
|
3853
3853
|
},
|
|
@@ -3891,7 +3891,7 @@ var require_lockfile = __commonJS({
|
|
|
3891
3891
|
}
|
|
3892
3892
|
function unlock(file2, options, callback) {
|
|
3893
3893
|
options = {
|
|
3894
|
-
fs:
|
|
3894
|
+
fs: fs93,
|
|
3895
3895
|
realpath: true,
|
|
3896
3896
|
...options
|
|
3897
3897
|
};
|
|
@@ -3913,7 +3913,7 @@ var require_lockfile = __commonJS({
|
|
|
3913
3913
|
options = {
|
|
3914
3914
|
stale: 1e4,
|
|
3915
3915
|
realpath: true,
|
|
3916
|
-
fs:
|
|
3916
|
+
fs: fs93,
|
|
3917
3917
|
...options
|
|
3918
3918
|
};
|
|
3919
3919
|
options.stale = Math.max(options.stale || 0, 2e3);
|
|
@@ -3952,16 +3952,16 @@ var require_lockfile = __commonJS({
|
|
|
3952
3952
|
var require_adapter = __commonJS({
|
|
3953
3953
|
"node_modules/proper-lockfile/lib/adapter.js"(exports2, module2) {
|
|
3954
3954
|
"use strict";
|
|
3955
|
-
var
|
|
3956
|
-
function createSyncFs(
|
|
3955
|
+
var fs93 = require_graceful_fs();
|
|
3956
|
+
function createSyncFs(fs94) {
|
|
3957
3957
|
const methods = ["mkdir", "realpath", "stat", "rmdir", "utimes"];
|
|
3958
|
-
const newFs = { ...
|
|
3958
|
+
const newFs = { ...fs94 };
|
|
3959
3959
|
methods.forEach((method) => {
|
|
3960
3960
|
newFs[method] = (...args2) => {
|
|
3961
3961
|
const callback = args2.pop();
|
|
3962
3962
|
let ret;
|
|
3963
3963
|
try {
|
|
3964
|
-
ret =
|
|
3964
|
+
ret = fs94[`${method}Sync`](...args2);
|
|
3965
3965
|
} catch (err2) {
|
|
3966
3966
|
return callback(err2);
|
|
3967
3967
|
}
|
|
@@ -3999,7 +3999,7 @@ var require_adapter = __commonJS({
|
|
|
3999
3999
|
}
|
|
4000
4000
|
function toSyncOptions(options) {
|
|
4001
4001
|
options = { ...options };
|
|
4002
|
-
options.fs = createSyncFs(options.fs ||
|
|
4002
|
+
options.fs = createSyncFs(options.fs || fs93);
|
|
4003
4003
|
if (typeof options.retries === "number" && options.retries > 0 || options.retries && typeof options.retries.retries === "number" && options.retries.retries > 0) {
|
|
4004
4004
|
throw Object.assign(new Error("Cannot use retries with the sync api"), { code: "ESYNC" });
|
|
4005
4005
|
}
|
|
@@ -10120,7 +10120,7 @@ var require_util2 = __commonJS({
|
|
|
10120
10120
|
exports2.removeUndefinedValuesInObject = removeUndefinedValuesInObject;
|
|
10121
10121
|
exports2.isValidFile = isValidFile;
|
|
10122
10122
|
exports2.getWellKnownCertificateConfigFileLocation = getWellKnownCertificateConfigFileLocation;
|
|
10123
|
-
var
|
|
10123
|
+
var fs93 = __require("fs");
|
|
10124
10124
|
var os33 = __require("os");
|
|
10125
10125
|
var path113 = __require("path");
|
|
10126
10126
|
var WELL_KNOWN_CERTIFICATE_CONFIG_FILE = "certificate_config.json";
|
|
@@ -10208,7 +10208,7 @@ var require_util2 = __commonJS({
|
|
|
10208
10208
|
}
|
|
10209
10209
|
async function isValidFile(filePath) {
|
|
10210
10210
|
try {
|
|
10211
|
-
const stats = await
|
|
10211
|
+
const stats = await fs93.promises.lstat(filePath);
|
|
10212
10212
|
return stats.isFile();
|
|
10213
10213
|
} catch (e2) {
|
|
10214
10214
|
return false;
|
|
@@ -12067,7 +12067,7 @@ var require_src5 = __commonJS({
|
|
|
12067
12067
|
value: true
|
|
12068
12068
|
});
|
|
12069
12069
|
exports2.GoogleToken = void 0;
|
|
12070
|
-
var
|
|
12070
|
+
var fs93 = _interopRequireWildcard(__require("fs"));
|
|
12071
12071
|
var _gaxios = require_src2();
|
|
12072
12072
|
var jws = _interopRequireWildcard(require_jws());
|
|
12073
12073
|
var path113 = _interopRequireWildcard(__require("path"));
|
|
@@ -12310,7 +12310,7 @@ var require_src5 = __commonJS({
|
|
|
12310
12310
|
});
|
|
12311
12311
|
};
|
|
12312
12312
|
}
|
|
12313
|
-
var readFile15 =
|
|
12313
|
+
var readFile15 = fs93.readFile ? (0, _util.promisify)(fs93.readFile) : /* @__PURE__ */ _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function _callee() {
|
|
12314
12314
|
return _regenerator().w(function(_context) {
|
|
12315
12315
|
while (1) switch (_context.n) {
|
|
12316
12316
|
case 0:
|
|
@@ -14064,12 +14064,12 @@ var require_filesubjecttokensupplier = __commonJS({
|
|
|
14064
14064
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
14065
14065
|
exports2.FileSubjectTokenSupplier = void 0;
|
|
14066
14066
|
var util_1 = __require("util");
|
|
14067
|
-
var
|
|
14068
|
-
var readFile15 = (0, util_1.promisify)(
|
|
14067
|
+
var fs93 = __require("fs");
|
|
14068
|
+
var readFile15 = (0, util_1.promisify)(fs93.readFile ?? (() => {
|
|
14069
14069
|
}));
|
|
14070
|
-
var realpath5 = (0, util_1.promisify)(
|
|
14070
|
+
var realpath5 = (0, util_1.promisify)(fs93.realpath ?? (() => {
|
|
14071
14071
|
}));
|
|
14072
|
-
var lstat6 = (0, util_1.promisify)(
|
|
14072
|
+
var lstat6 = (0, util_1.promisify)(fs93.lstat ?? (() => {
|
|
14073
14073
|
}));
|
|
14074
14074
|
var FileSubjectTokenSupplier = class {
|
|
14075
14075
|
filePath;
|
|
@@ -14186,7 +14186,7 @@ var require_certificatesubjecttokensupplier = __commonJS({
|
|
|
14186
14186
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
14187
14187
|
exports2.CertificateSubjectTokenSupplier = exports2.InvalidConfigurationError = exports2.CertificateSourceUnavailableError = exports2.CERTIFICATE_CONFIGURATION_ENV_VARIABLE = void 0;
|
|
14188
14188
|
var util_1 = require_util2();
|
|
14189
|
-
var
|
|
14189
|
+
var fs93 = __require("fs");
|
|
14190
14190
|
var crypto_1 = __require("crypto");
|
|
14191
14191
|
var https = __require("https");
|
|
14192
14192
|
exports2.CERTIFICATE_CONFIGURATION_ENV_VARIABLE = "GOOGLE_API_CERTIFICATE_CONFIG";
|
|
@@ -14280,7 +14280,7 @@ var require_certificatesubjecttokensupplier = __commonJS({
|
|
|
14280
14280
|
const configPath = this.certificateConfigPath;
|
|
14281
14281
|
let fileContents;
|
|
14282
14282
|
try {
|
|
14283
|
-
fileContents = await
|
|
14283
|
+
fileContents = await fs93.promises.readFile(configPath, "utf8");
|
|
14284
14284
|
} catch (err2) {
|
|
14285
14285
|
throw new CertificateSourceUnavailableError(`Failed to read certificate config file at: ${configPath}`);
|
|
14286
14286
|
}
|
|
@@ -14305,14 +14305,14 @@ var require_certificatesubjecttokensupplier = __commonJS({
|
|
|
14305
14305
|
async #getKeyAndCert(certPath, keyPath) {
|
|
14306
14306
|
let cert, key;
|
|
14307
14307
|
try {
|
|
14308
|
-
cert = await
|
|
14308
|
+
cert = await fs93.promises.readFile(certPath);
|
|
14309
14309
|
new crypto_1.X509Certificate(cert);
|
|
14310
14310
|
} catch (err2) {
|
|
14311
14311
|
const message = err2 instanceof Error ? err2.message : String(err2);
|
|
14312
14312
|
throw new CertificateSourceUnavailableError(`Failed to read certificate file at ${certPath}: ${message}`);
|
|
14313
14313
|
}
|
|
14314
14314
|
try {
|
|
14315
|
-
key = await
|
|
14315
|
+
key = await fs93.promises.readFile(keyPath);
|
|
14316
14316
|
(0, crypto_1.createPrivateKey)(key);
|
|
14317
14317
|
} catch (err2) {
|
|
14318
14318
|
const message = err2 instanceof Error ? err2.message : String(err2);
|
|
@@ -14331,7 +14331,7 @@ var require_certificatesubjecttokensupplier = __commonJS({
|
|
|
14331
14331
|
return JSON.stringify([leafCert.raw.toString("base64")]);
|
|
14332
14332
|
}
|
|
14333
14333
|
try {
|
|
14334
|
-
const chainPems = await
|
|
14334
|
+
const chainPems = await fs93.promises.readFile(this.trustChainPath, "utf8");
|
|
14335
14335
|
const pemBlocks = chainPems.match(/-----BEGIN CERTIFICATE-----[^-]+-----END CERTIFICATE-----/g) ?? [];
|
|
14336
14336
|
const chainCerts = pemBlocks.map((pem, index) => {
|
|
14337
14337
|
try {
|
|
@@ -15029,7 +15029,7 @@ var require_pluggable_auth_handler = __commonJS({
|
|
|
15029
15029
|
exports2.PluggableAuthHandler = exports2.ExecutableError = void 0;
|
|
15030
15030
|
var executable_response_1 = require_executable_response();
|
|
15031
15031
|
var childProcess2 = __require("child_process");
|
|
15032
|
-
var
|
|
15032
|
+
var fs93 = __require("fs");
|
|
15033
15033
|
var ExecutableError = class extends Error {
|
|
15034
15034
|
/**
|
|
15035
15035
|
* The exit code returned by the executable.
|
|
@@ -15114,14 +15114,14 @@ var require_pluggable_auth_handler = __commonJS({
|
|
|
15114
15114
|
}
|
|
15115
15115
|
let filePath;
|
|
15116
15116
|
try {
|
|
15117
|
-
filePath = await
|
|
15117
|
+
filePath = await fs93.promises.realpath(this.outputFile);
|
|
15118
15118
|
} catch {
|
|
15119
15119
|
return void 0;
|
|
15120
15120
|
}
|
|
15121
|
-
if (!(await
|
|
15121
|
+
if (!(await fs93.promises.lstat(filePath)).isFile()) {
|
|
15122
15122
|
return void 0;
|
|
15123
15123
|
}
|
|
15124
|
-
const responseString = await
|
|
15124
|
+
const responseString = await fs93.promises.readFile(filePath, {
|
|
15125
15125
|
encoding: "utf8"
|
|
15126
15126
|
});
|
|
15127
15127
|
if (responseString === "") {
|
|
@@ -15531,7 +15531,7 @@ var require_googleauth = __commonJS({
|
|
|
15531
15531
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
15532
15532
|
exports2.GoogleAuth = exports2.GoogleAuthExceptionMessages = void 0;
|
|
15533
15533
|
var child_process_1 = __require("child_process");
|
|
15534
|
-
var
|
|
15534
|
+
var fs93 = __require("fs");
|
|
15535
15535
|
var gaxios_1 = require_src2();
|
|
15536
15536
|
var gcpMetadata = require_src4();
|
|
15537
15537
|
var os33 = __require("os");
|
|
@@ -15826,7 +15826,7 @@ var require_googleauth = __commonJS({
|
|
|
15826
15826
|
}
|
|
15827
15827
|
if (location) {
|
|
15828
15828
|
location = path113.join(location, "gcloud", "application_default_credentials.json");
|
|
15829
|
-
if (!
|
|
15829
|
+
if (!fs93.existsSync(location)) {
|
|
15830
15830
|
location = null;
|
|
15831
15831
|
}
|
|
15832
15832
|
}
|
|
@@ -15847,8 +15847,8 @@ var require_googleauth = __commonJS({
|
|
|
15847
15847
|
throw new Error("The file path is invalid.");
|
|
15848
15848
|
}
|
|
15849
15849
|
try {
|
|
15850
|
-
filePath =
|
|
15851
|
-
if (!
|
|
15850
|
+
filePath = fs93.realpathSync(filePath);
|
|
15851
|
+
if (!fs93.lstatSync(filePath).isFile()) {
|
|
15852
15852
|
throw new Error();
|
|
15853
15853
|
}
|
|
15854
15854
|
} catch (err2) {
|
|
@@ -15857,7 +15857,7 @@ var require_googleauth = __commonJS({
|
|
|
15857
15857
|
}
|
|
15858
15858
|
throw err2;
|
|
15859
15859
|
}
|
|
15860
|
-
const readStream =
|
|
15860
|
+
const readStream = fs93.createReadStream(filePath);
|
|
15861
15861
|
return this.fromStream(readStream, options);
|
|
15862
15862
|
}
|
|
15863
15863
|
/**
|
|
@@ -16170,7 +16170,7 @@ var require_googleauth = __commonJS({
|
|
|
16170
16170
|
return this._cacheClientFromJSON(this.jsonContent, this.clientOptions);
|
|
16171
16171
|
} else if (this.keyFilename) {
|
|
16172
16172
|
const filePath = path113.resolve(this.keyFilename);
|
|
16173
|
-
const stream2 =
|
|
16173
|
+
const stream2 = fs93.createReadStream(filePath);
|
|
16174
16174
|
return await this.fromStreamAsync(stream2, this.clientOptions);
|
|
16175
16175
|
} else if (this.apiKey) {
|
|
16176
16176
|
const client = await this.fromAPIKey(this.apiKey, this.clientOptions);
|
|
@@ -23434,12 +23434,12 @@ var require_src10 = __commonJS({
|
|
|
23434
23434
|
var _GoogleToken_requestToken;
|
|
23435
23435
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
23436
23436
|
exports2.GoogleToken = void 0;
|
|
23437
|
-
var
|
|
23437
|
+
var fs93 = __require("fs");
|
|
23438
23438
|
var gaxios_1 = require_src7();
|
|
23439
23439
|
var jws = require_jws();
|
|
23440
23440
|
var path113 = __require("path");
|
|
23441
23441
|
var util_1 = __require("util");
|
|
23442
|
-
var readFile15 =
|
|
23442
|
+
var readFile15 = fs93.readFile ? (0, util_1.promisify)(fs93.readFile) : async () => {
|
|
23443
23443
|
throw new ErrorWithCode("use key rather than keyFile.", "MISSING_CREDENTIALS");
|
|
23444
23444
|
};
|
|
23445
23445
|
var GOOGLE_TOKEN_URL = "https://www.googleapis.com/oauth2/v4/token";
|
|
@@ -24949,12 +24949,12 @@ var require_filesubjecttokensupplier2 = __commonJS({
|
|
|
24949
24949
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
24950
24950
|
exports2.FileSubjectTokenSupplier = void 0;
|
|
24951
24951
|
var util_1 = __require("util");
|
|
24952
|
-
var
|
|
24953
|
-
var readFile15 = (0, util_1.promisify)((_a4 =
|
|
24952
|
+
var fs93 = __require("fs");
|
|
24953
|
+
var readFile15 = (0, util_1.promisify)((_a4 = fs93.readFile) !== null && _a4 !== void 0 ? _a4 : () => {
|
|
24954
24954
|
});
|
|
24955
|
-
var realpath5 = (0, util_1.promisify)((_b =
|
|
24955
|
+
var realpath5 = (0, util_1.promisify)((_b = fs93.realpath) !== null && _b !== void 0 ? _b : () => {
|
|
24956
24956
|
});
|
|
24957
|
-
var lstat6 = (0, util_1.promisify)((_c =
|
|
24957
|
+
var lstat6 = (0, util_1.promisify)((_c = fs93.lstat) !== null && _c !== void 0 ? _c : () => {
|
|
24958
24958
|
});
|
|
24959
24959
|
var FileSubjectTokenSupplier = class {
|
|
24960
24960
|
/**
|
|
@@ -25672,7 +25672,7 @@ var require_pluggable_auth_handler2 = __commonJS({
|
|
|
25672
25672
|
var pluggable_auth_client_1 = require_pluggable_auth_client2();
|
|
25673
25673
|
var executable_response_1 = require_executable_response2();
|
|
25674
25674
|
var childProcess2 = __require("child_process");
|
|
25675
|
-
var
|
|
25675
|
+
var fs93 = __require("fs");
|
|
25676
25676
|
var PluggableAuthHandler = class _PluggableAuthHandler {
|
|
25677
25677
|
/**
|
|
25678
25678
|
* Instantiates a PluggableAuthHandler instance using the provided
|
|
@@ -25742,14 +25742,14 @@ var require_pluggable_auth_handler2 = __commonJS({
|
|
|
25742
25742
|
}
|
|
25743
25743
|
let filePath;
|
|
25744
25744
|
try {
|
|
25745
|
-
filePath = await
|
|
25745
|
+
filePath = await fs93.promises.realpath(this.outputFile);
|
|
25746
25746
|
} catch (_a4) {
|
|
25747
25747
|
return void 0;
|
|
25748
25748
|
}
|
|
25749
|
-
if (!(await
|
|
25749
|
+
if (!(await fs93.promises.lstat(filePath)).isFile()) {
|
|
25750
25750
|
return void 0;
|
|
25751
25751
|
}
|
|
25752
|
-
const responseString = await
|
|
25752
|
+
const responseString = await fs93.promises.readFile(filePath, {
|
|
25753
25753
|
encoding: "utf8"
|
|
25754
25754
|
});
|
|
25755
25755
|
if (responseString === "") {
|
|
@@ -26155,7 +26155,7 @@ var require_googleauth2 = __commonJS({
|
|
|
26155
26155
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
26156
26156
|
exports2.GoogleAuth = exports2.CLOUD_SDK_CLIENT_ID = void 0;
|
|
26157
26157
|
var child_process_1 = __require("child_process");
|
|
26158
|
-
var
|
|
26158
|
+
var fs93 = __require("fs");
|
|
26159
26159
|
var gcpMetadata = require_src9();
|
|
26160
26160
|
var os33 = __require("os");
|
|
26161
26161
|
var path113 = __require("path");
|
|
@@ -26429,7 +26429,7 @@ var require_googleauth2 = __commonJS({
|
|
|
26429
26429
|
}
|
|
26430
26430
|
if (location) {
|
|
26431
26431
|
location = path113.join(location, "gcloud", "application_default_credentials.json");
|
|
26432
|
-
if (!
|
|
26432
|
+
if (!fs93.existsSync(location)) {
|
|
26433
26433
|
location = null;
|
|
26434
26434
|
}
|
|
26435
26435
|
}
|
|
@@ -26450,8 +26450,8 @@ var require_googleauth2 = __commonJS({
|
|
|
26450
26450
|
throw new Error("The file path is invalid.");
|
|
26451
26451
|
}
|
|
26452
26452
|
try {
|
|
26453
|
-
filePath =
|
|
26454
|
-
if (!
|
|
26453
|
+
filePath = fs93.realpathSync(filePath);
|
|
26454
|
+
if (!fs93.lstatSync(filePath).isFile()) {
|
|
26455
26455
|
throw new Error();
|
|
26456
26456
|
}
|
|
26457
26457
|
} catch (err2) {
|
|
@@ -26460,7 +26460,7 @@ var require_googleauth2 = __commonJS({
|
|
|
26460
26460
|
}
|
|
26461
26461
|
throw err2;
|
|
26462
26462
|
}
|
|
26463
|
-
const readStream =
|
|
26463
|
+
const readStream = fs93.createReadStream(filePath);
|
|
26464
26464
|
return this.fromStream(readStream, options);
|
|
26465
26465
|
}
|
|
26466
26466
|
/**
|
|
@@ -26726,7 +26726,7 @@ var require_googleauth2 = __commonJS({
|
|
|
26726
26726
|
this._cacheClientFromJSON(this.jsonContent, this.clientOptions);
|
|
26727
26727
|
} else if (this.keyFilename) {
|
|
26728
26728
|
const filePath = path113.resolve(this.keyFilename);
|
|
26729
|
-
const stream2 =
|
|
26729
|
+
const stream2 = fs93.createReadStream(filePath);
|
|
26730
26730
|
await this.fromStreamAsync(stream2, this.clientOptions);
|
|
26731
26731
|
} else {
|
|
26732
26732
|
await this.getApplicationDefaultAsync(this.clientOptions);
|
|
@@ -40562,12 +40562,12 @@ var require_dist3 = __commonJS({
|
|
|
40562
40562
|
throw new Error(`Unknown format "${name3}"`);
|
|
40563
40563
|
return f;
|
|
40564
40564
|
};
|
|
40565
|
-
function addFormats2(ajv, list,
|
|
40565
|
+
function addFormats2(ajv, list, fs93, exportName) {
|
|
40566
40566
|
var _a4;
|
|
40567
40567
|
var _b;
|
|
40568
40568
|
(_a4 = (_b = ajv.opts.code).formats) !== null && _a4 !== void 0 ? _a4 : _b.formats = (0, codegen_1._)`require("ajv-formats/dist/formats").${exportName}`;
|
|
40569
40569
|
for (const f of list)
|
|
40570
|
-
ajv.addFormat(f,
|
|
40570
|
+
ajv.addFormat(f, fs93[f]);
|
|
40571
40571
|
}
|
|
40572
40572
|
module2.exports = exports2 = formatsPlugin;
|
|
40573
40573
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -45305,14 +45305,14 @@ var require_tls_helpers = __commonJS({
|
|
|
45305
45305
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
45306
45306
|
exports2.CIPHER_SUITES = void 0;
|
|
45307
45307
|
exports2.getDefaultRootsData = getDefaultRootsData;
|
|
45308
|
-
var
|
|
45308
|
+
var fs93 = __require("fs");
|
|
45309
45309
|
exports2.CIPHER_SUITES = process.env.GRPC_SSL_CIPHER_SUITES;
|
|
45310
45310
|
var DEFAULT_ROOTS_FILE_PATH = process.env.GRPC_DEFAULT_SSL_ROOTS_FILE_PATH;
|
|
45311
45311
|
var defaultRootsData = null;
|
|
45312
45312
|
function getDefaultRootsData() {
|
|
45313
45313
|
if (DEFAULT_ROOTS_FILE_PATH) {
|
|
45314
45314
|
if (defaultRootsData === null) {
|
|
45315
|
-
defaultRootsData =
|
|
45315
|
+
defaultRootsData = fs93.readFileSync(DEFAULT_ROOTS_FILE_PATH);
|
|
45316
45316
|
}
|
|
45317
45317
|
return defaultRootsData;
|
|
45318
45318
|
}
|
|
@@ -50847,7 +50847,7 @@ var require_fetch = __commonJS({
|
|
|
50847
50847
|
module2.exports = fetch2;
|
|
50848
50848
|
var asPromise = require_aspromise();
|
|
50849
50849
|
var inquire = require_inquire();
|
|
50850
|
-
var
|
|
50850
|
+
var fs93 = inquire("fs");
|
|
50851
50851
|
function fetch2(filename, options, callback) {
|
|
50852
50852
|
if (typeof options === "function") {
|
|
50853
50853
|
callback = options;
|
|
@@ -50856,8 +50856,8 @@ var require_fetch = __commonJS({
|
|
|
50856
50856
|
options = {};
|
|
50857
50857
|
if (!callback)
|
|
50858
50858
|
return asPromise(fetch2, this, filename, options);
|
|
50859
|
-
if (!options.xhr &&
|
|
50860
|
-
return
|
|
50859
|
+
if (!options.xhr && fs93 && fs93.readFile)
|
|
50860
|
+
return fs93.readFile(filename, function fetchReadFileCallback(err2, contents) {
|
|
50861
50861
|
return err2 && typeof XMLHttpRequest !== "undefined" ? fetch2.xhr(filename, options, callback) : err2 ? callback(err2) : callback(null, options.binary ? contents : contents.toString("utf8"));
|
|
50862
50862
|
});
|
|
50863
50863
|
return fetch2.xhr(filename, options, callback);
|
|
@@ -57210,7 +57210,7 @@ var require_util8 = __commonJS({
|
|
|
57210
57210
|
"use strict";
|
|
57211
57211
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
57212
57212
|
exports2.addCommonProtos = exports2.loadProtosWithOptionsSync = exports2.loadProtosWithOptions = void 0;
|
|
57213
|
-
var
|
|
57213
|
+
var fs93 = __require("fs");
|
|
57214
57214
|
var path113 = __require("path");
|
|
57215
57215
|
var Protobuf = require_protobufjs();
|
|
57216
57216
|
function addIncludePathResolver(root, includePaths) {
|
|
@@ -57222,7 +57222,7 @@ var require_util8 = __commonJS({
|
|
|
57222
57222
|
for (const directory of includePaths) {
|
|
57223
57223
|
const fullPath = path113.join(directory, target);
|
|
57224
57224
|
try {
|
|
57225
|
-
|
|
57225
|
+
fs93.accessSync(fullPath, fs93.constants.R_OK);
|
|
57226
57226
|
return fullPath;
|
|
57227
57227
|
} catch (err2) {
|
|
57228
57228
|
continue;
|
|
@@ -67044,7 +67044,7 @@ var require_certificate_provider = __commonJS({
|
|
|
67044
67044
|
"use strict";
|
|
67045
67045
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
67046
67046
|
exports2.FileWatcherCertificateProvider = void 0;
|
|
67047
|
-
var
|
|
67047
|
+
var fs93 = __require("fs");
|
|
67048
67048
|
var logging = require_logging();
|
|
67049
67049
|
var constants_1 = require_constants2();
|
|
67050
67050
|
var util_1 = __require("util");
|
|
@@ -67052,7 +67052,7 @@ var require_certificate_provider = __commonJS({
|
|
|
67052
67052
|
function trace2(text) {
|
|
67053
67053
|
logging.trace(constants_1.LogVerbosity.DEBUG, TRACER_NAME2, text);
|
|
67054
67054
|
}
|
|
67055
|
-
var readFilePromise = (0, util_1.promisify)(
|
|
67055
|
+
var readFilePromise = (0, util_1.promisify)(fs93.readFile);
|
|
67056
67056
|
var FileWatcherCertificateProvider = class {
|
|
67057
67057
|
constructor(config2) {
|
|
67058
67058
|
this.config = config2;
|
|
@@ -69567,7 +69567,7 @@ var require_otlp_grpc_env_configuration = __commonJS({
|
|
|
69567
69567
|
var core_1 = require_src13();
|
|
69568
69568
|
var grpc_exporter_transport_1 = require_grpc_exporter_transport();
|
|
69569
69569
|
var node_http_1 = (init_index_node_http(), __toCommonJS(index_node_http_exports));
|
|
69570
|
-
var
|
|
69570
|
+
var fs93 = __require("fs");
|
|
69571
69571
|
var path113 = __require("path");
|
|
69572
69572
|
var api_1 = (init_esm(), __toCommonJS(esm_exports));
|
|
69573
69573
|
function fallbackIfNullishOrBlank(signalSpecific, nonSignalSpecific) {
|
|
@@ -69617,7 +69617,7 @@ var require_otlp_grpc_env_configuration = __commonJS({
|
|
|
69617
69617
|
const filePath = fallbackIfNullishOrBlank(signalSpecificPath, nonSignalSpecificPath);
|
|
69618
69618
|
if (filePath != null) {
|
|
69619
69619
|
try {
|
|
69620
|
-
return
|
|
69620
|
+
return fs93.readFileSync(path113.resolve(process.cwd(), filePath));
|
|
69621
69621
|
} catch {
|
|
69622
69622
|
api_1.diag.warn(warningMessage);
|
|
69623
69623
|
return void 0;
|
|
@@ -80262,9 +80262,9 @@ var require_instrumentation = __commonJS({
|
|
|
80262
80262
|
var require_module_details_from_path = __commonJS({
|
|
80263
80263
|
"node_modules/module-details-from-path/index.js"(exports2, module2) {
|
|
80264
80264
|
"use strict";
|
|
80265
|
-
var
|
|
80265
|
+
var sep9 = __require("path").sep;
|
|
80266
80266
|
module2.exports = function(file2) {
|
|
80267
|
-
var segments = file2.split(
|
|
80267
|
+
var segments = file2.split(sep9);
|
|
80268
80268
|
var index = segments.lastIndexOf("node_modules");
|
|
80269
80269
|
if (index === -1) return;
|
|
80270
80270
|
if (!segments[index + 1]) return;
|
|
@@ -80277,7 +80277,7 @@ var require_module_details_from_path = __commonJS({
|
|
|
80277
80277
|
if (i3 === lastBaseDirSegmentIndex) {
|
|
80278
80278
|
basedir += segments[i3];
|
|
80279
80279
|
} else {
|
|
80280
|
-
basedir += segments[i3] +
|
|
80280
|
+
basedir += segments[i3] + sep9;
|
|
80281
80281
|
}
|
|
80282
80282
|
}
|
|
80283
80283
|
var path113 = "";
|
|
@@ -80286,7 +80286,7 @@ var require_module_details_from_path = __commonJS({
|
|
|
80286
80286
|
if (i22 === lastSegmentIndex) {
|
|
80287
80287
|
path113 += segments[i22];
|
|
80288
80288
|
} else {
|
|
80289
|
-
path113 += segments[i22] +
|
|
80289
|
+
path113 += segments[i22] + sep9;
|
|
80290
80290
|
}
|
|
80291
80291
|
}
|
|
80292
80292
|
return {
|
|
@@ -82648,7 +82648,7 @@ var require_utils12 = __commonJS({
|
|
|
82648
82648
|
var exporter_metrics_otlp_http_1 = require_src23();
|
|
82649
82649
|
var exporter_metrics_otlp_proto_1 = require_src38();
|
|
82650
82650
|
var sdk_logs_1 = require_src27();
|
|
82651
|
-
var
|
|
82651
|
+
var fs93 = __require("fs");
|
|
82652
82652
|
var RESOURCE_DETECTOR_ENVIRONMENT = "env";
|
|
82653
82653
|
var RESOURCE_DETECTOR_HOST = "host";
|
|
82654
82654
|
var RESOURCE_DETECTOR_OS = "os";
|
|
@@ -83071,21 +83071,21 @@ var require_utils12 = __commonJS({
|
|
|
83071
83071
|
const httpsAgentOptions = {};
|
|
83072
83072
|
if (tls.ca_file) {
|
|
83073
83073
|
try {
|
|
83074
|
-
httpsAgentOptions.ca =
|
|
83074
|
+
httpsAgentOptions.ca = fs93.readFileSync(tls.ca_file);
|
|
83075
83075
|
} catch (e2) {
|
|
83076
83076
|
api_1.diag.warn(`Failed to read TLS CA file at ${tls.ca_file}: ${e2}`);
|
|
83077
83077
|
}
|
|
83078
83078
|
}
|
|
83079
83079
|
if (tls.cert_file) {
|
|
83080
83080
|
try {
|
|
83081
|
-
httpsAgentOptions.cert =
|
|
83081
|
+
httpsAgentOptions.cert = fs93.readFileSync(tls.cert_file);
|
|
83082
83082
|
} catch (e2) {
|
|
83083
83083
|
api_1.diag.warn(`Failed to read TLS cert file at ${tls.cert_file}: ${e2}`);
|
|
83084
83084
|
}
|
|
83085
83085
|
}
|
|
83086
83086
|
if (tls.key_file) {
|
|
83087
83087
|
try {
|
|
83088
|
-
httpsAgentOptions.key =
|
|
83088
|
+
httpsAgentOptions.key = fs93.readFileSync(tls.key_file);
|
|
83089
83089
|
} catch (e2) {
|
|
83090
83090
|
api_1.diag.warn(`Failed to read TLS key file at ${tls.key_file}: ${e2}`);
|
|
83091
83091
|
}
|
|
@@ -88250,10 +88250,10 @@ var require_resolve_block_map = __commonJS({
|
|
|
88250
88250
|
let offset = bm.offset;
|
|
88251
88251
|
let commentEnd = null;
|
|
88252
88252
|
for (const collItem of bm.items) {
|
|
88253
|
-
const { start: start2, key, sep:
|
|
88253
|
+
const { start: start2, key, sep: sep9, value } = collItem;
|
|
88254
88254
|
const keyProps = resolveProps.resolveProps(start2, {
|
|
88255
88255
|
indicator: "explicit-key-ind",
|
|
88256
|
-
next: key ??
|
|
88256
|
+
next: key ?? sep9?.[0],
|
|
88257
88257
|
offset,
|
|
88258
88258
|
onError: onError2,
|
|
88259
88259
|
parentIndent: bm.indent,
|
|
@@ -88267,7 +88267,7 @@ var require_resolve_block_map = __commonJS({
|
|
|
88267
88267
|
else if ("indent" in key && key.indent !== bm.indent)
|
|
88268
88268
|
onError2(offset, "BAD_INDENT", startColMsg);
|
|
88269
88269
|
}
|
|
88270
|
-
if (!keyProps.anchor && !keyProps.tag && !
|
|
88270
|
+
if (!keyProps.anchor && !keyProps.tag && !sep9) {
|
|
88271
88271
|
commentEnd = keyProps.end;
|
|
88272
88272
|
if (keyProps.comment) {
|
|
88273
88273
|
if (map4.comment)
|
|
@@ -88291,7 +88291,7 @@ var require_resolve_block_map = __commonJS({
|
|
|
88291
88291
|
ctx.atKey = false;
|
|
88292
88292
|
if (utilMapIncludes.mapIncludes(ctx, map4.items, keyNode))
|
|
88293
88293
|
onError2(keyStart, "DUPLICATE_KEY", "Map keys must be unique");
|
|
88294
|
-
const valueProps = resolveProps.resolveProps(
|
|
88294
|
+
const valueProps = resolveProps.resolveProps(sep9 ?? [], {
|
|
88295
88295
|
indicator: "map-value-ind",
|
|
88296
88296
|
next: value,
|
|
88297
88297
|
offset: keyNode.range[2],
|
|
@@ -88307,7 +88307,7 @@ var require_resolve_block_map = __commonJS({
|
|
|
88307
88307
|
if (ctx.options.strict && keyProps.start < valueProps.found.offset - 1024)
|
|
88308
88308
|
onError2(keyNode.range, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit block mapping key");
|
|
88309
88309
|
}
|
|
88310
|
-
const valueNode = value ? composeNode2(ctx, value, valueProps, onError2) : composeEmptyNode(ctx, offset,
|
|
88310
|
+
const valueNode = value ? composeNode2(ctx, value, valueProps, onError2) : composeEmptyNode(ctx, offset, sep9, null, valueProps, onError2);
|
|
88311
88311
|
if (ctx.schema.compat)
|
|
88312
88312
|
utilFlowIndentCheck.flowIndentCheck(bm.indent, value, onError2);
|
|
88313
88313
|
offset = valueNode.range[2];
|
|
@@ -88398,7 +88398,7 @@ var require_resolve_end = __commonJS({
|
|
|
88398
88398
|
let comment = "";
|
|
88399
88399
|
if (end) {
|
|
88400
88400
|
let hasSpace = false;
|
|
88401
|
-
let
|
|
88401
|
+
let sep9 = "";
|
|
88402
88402
|
for (const token2 of end) {
|
|
88403
88403
|
const { source, type: type2 } = token2;
|
|
88404
88404
|
switch (type2) {
|
|
@@ -88412,13 +88412,13 @@ var require_resolve_end = __commonJS({
|
|
|
88412
88412
|
if (!comment)
|
|
88413
88413
|
comment = cb;
|
|
88414
88414
|
else
|
|
88415
|
-
comment +=
|
|
88416
|
-
|
|
88415
|
+
comment += sep9 + cb;
|
|
88416
|
+
sep9 = "";
|
|
88417
88417
|
break;
|
|
88418
88418
|
}
|
|
88419
88419
|
case "newline":
|
|
88420
88420
|
if (comment)
|
|
88421
|
-
|
|
88421
|
+
sep9 += source;
|
|
88422
88422
|
hasSpace = true;
|
|
88423
88423
|
break;
|
|
88424
88424
|
default:
|
|
@@ -88461,18 +88461,18 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
88461
88461
|
let offset = fc.offset + fc.start.source.length;
|
|
88462
88462
|
for (let i3 = 0; i3 < fc.items.length; ++i3) {
|
|
88463
88463
|
const collItem = fc.items[i3];
|
|
88464
|
-
const { start: start2, key, sep:
|
|
88464
|
+
const { start: start2, key, sep: sep9, value } = collItem;
|
|
88465
88465
|
const props = resolveProps.resolveProps(start2, {
|
|
88466
88466
|
flow: fcName,
|
|
88467
88467
|
indicator: "explicit-key-ind",
|
|
88468
|
-
next: key ??
|
|
88468
|
+
next: key ?? sep9?.[0],
|
|
88469
88469
|
offset,
|
|
88470
88470
|
onError: onError2,
|
|
88471
88471
|
parentIndent: fc.indent,
|
|
88472
88472
|
startOnNewline: false
|
|
88473
88473
|
});
|
|
88474
88474
|
if (!props.found) {
|
|
88475
|
-
if (!props.anchor && !props.tag && !
|
|
88475
|
+
if (!props.anchor && !props.tag && !sep9 && !value) {
|
|
88476
88476
|
if (i3 === 0 && props.comma)
|
|
88477
88477
|
onError2(props.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${fcName}`);
|
|
88478
88478
|
else if (i3 < fc.items.length - 1)
|
|
@@ -88526,8 +88526,8 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
88526
88526
|
}
|
|
88527
88527
|
}
|
|
88528
88528
|
}
|
|
88529
|
-
if (!isMap && !
|
|
88530
|
-
const valueNode = value ? composeNode2(ctx, value, props, onError2) : composeEmptyNode(ctx, props.end,
|
|
88529
|
+
if (!isMap && !sep9 && !props.found) {
|
|
88530
|
+
const valueNode = value ? composeNode2(ctx, value, props, onError2) : composeEmptyNode(ctx, props.end, sep9, null, props, onError2);
|
|
88531
88531
|
coll.items.push(valueNode);
|
|
88532
88532
|
offset = valueNode.range[2];
|
|
88533
88533
|
if (isBlock(value))
|
|
@@ -88539,7 +88539,7 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
88539
88539
|
if (isBlock(key))
|
|
88540
88540
|
onError2(keyNode.range, "BLOCK_IN_FLOW", blockMsg);
|
|
88541
88541
|
ctx.atKey = false;
|
|
88542
|
-
const valueProps = resolveProps.resolveProps(
|
|
88542
|
+
const valueProps = resolveProps.resolveProps(sep9 ?? [], {
|
|
88543
88543
|
flow: fcName,
|
|
88544
88544
|
indicator: "map-value-ind",
|
|
88545
88545
|
next: value,
|
|
@@ -88550,8 +88550,8 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
88550
88550
|
});
|
|
88551
88551
|
if (valueProps.found) {
|
|
88552
88552
|
if (!isMap && !props.found && ctx.options.strict) {
|
|
88553
|
-
if (
|
|
88554
|
-
for (const st of
|
|
88553
|
+
if (sep9)
|
|
88554
|
+
for (const st of sep9) {
|
|
88555
88555
|
if (st === valueProps.found)
|
|
88556
88556
|
break;
|
|
88557
88557
|
if (st.type === "newline") {
|
|
@@ -88568,7 +88568,7 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
88568
88568
|
else
|
|
88569
88569
|
onError2(valueProps.start, "MISSING_CHAR", `Missing , or : between ${fcName} items`);
|
|
88570
88570
|
}
|
|
88571
|
-
const valueNode = value ? composeNode2(ctx, value, valueProps, onError2) : valueProps.found ? composeEmptyNode(ctx, valueProps.end,
|
|
88571
|
+
const valueNode = value ? composeNode2(ctx, value, valueProps, onError2) : valueProps.found ? composeEmptyNode(ctx, valueProps.end, sep9, null, valueProps, onError2) : null;
|
|
88572
88572
|
if (valueNode) {
|
|
88573
88573
|
if (isBlock(value))
|
|
88574
88574
|
onError2(valueNode.range, "BLOCK_IN_FLOW", blockMsg);
|
|
@@ -88748,7 +88748,7 @@ var require_resolve_block_scalar = __commonJS({
|
|
|
88748
88748
|
chompStart = i3 + 1;
|
|
88749
88749
|
}
|
|
88750
88750
|
let value = "";
|
|
88751
|
-
let
|
|
88751
|
+
let sep9 = "";
|
|
88752
88752
|
let prevMoreIndented = false;
|
|
88753
88753
|
for (let i3 = 0; i3 < contentStart; ++i3)
|
|
88754
88754
|
value += lines[i3][0].slice(trimIndent) + "\n";
|
|
@@ -88765,24 +88765,24 @@ var require_resolve_block_scalar = __commonJS({
|
|
|
88765
88765
|
indent = "";
|
|
88766
88766
|
}
|
|
88767
88767
|
if (type2 === Scalar.Scalar.BLOCK_LITERAL) {
|
|
88768
|
-
value +=
|
|
88769
|
-
|
|
88768
|
+
value += sep9 + indent.slice(trimIndent) + content;
|
|
88769
|
+
sep9 = "\n";
|
|
88770
88770
|
} else if (indent.length > trimIndent || content[0] === " ") {
|
|
88771
|
-
if (
|
|
88772
|
-
|
|
88773
|
-
else if (!prevMoreIndented &&
|
|
88774
|
-
|
|
88775
|
-
value +=
|
|
88776
|
-
|
|
88771
|
+
if (sep9 === " ")
|
|
88772
|
+
sep9 = "\n";
|
|
88773
|
+
else if (!prevMoreIndented && sep9 === "\n")
|
|
88774
|
+
sep9 = "\n\n";
|
|
88775
|
+
value += sep9 + indent.slice(trimIndent) + content;
|
|
88776
|
+
sep9 = "\n";
|
|
88777
88777
|
prevMoreIndented = true;
|
|
88778
88778
|
} else if (content === "") {
|
|
88779
|
-
if (
|
|
88779
|
+
if (sep9 === "\n")
|
|
88780
88780
|
value += "\n";
|
|
88781
88781
|
else
|
|
88782
|
-
|
|
88782
|
+
sep9 = "\n";
|
|
88783
88783
|
} else {
|
|
88784
|
-
value +=
|
|
88785
|
-
|
|
88784
|
+
value += sep9 + content;
|
|
88785
|
+
sep9 = " ";
|
|
88786
88786
|
prevMoreIndented = false;
|
|
88787
88787
|
}
|
|
88788
88788
|
}
|
|
@@ -88964,25 +88964,25 @@ var require_resolve_flow_scalar = __commonJS({
|
|
|
88964
88964
|
if (!match2)
|
|
88965
88965
|
return source;
|
|
88966
88966
|
let res = match2[1];
|
|
88967
|
-
let
|
|
88967
|
+
let sep9 = " ";
|
|
88968
88968
|
let pos = first2.lastIndex;
|
|
88969
88969
|
line.lastIndex = pos;
|
|
88970
88970
|
while (match2 = line.exec(source)) {
|
|
88971
88971
|
if (match2[1] === "") {
|
|
88972
|
-
if (
|
|
88973
|
-
res +=
|
|
88972
|
+
if (sep9 === "\n")
|
|
88973
|
+
res += sep9;
|
|
88974
88974
|
else
|
|
88975
|
-
|
|
88975
|
+
sep9 = "\n";
|
|
88976
88976
|
} else {
|
|
88977
|
-
res +=
|
|
88978
|
-
|
|
88977
|
+
res += sep9 + match2[1];
|
|
88978
|
+
sep9 = " ";
|
|
88979
88979
|
}
|
|
88980
88980
|
pos = line.lastIndex;
|
|
88981
88981
|
}
|
|
88982
88982
|
const last2 = /[ \t]*(.*)/sy;
|
|
88983
88983
|
last2.lastIndex = pos;
|
|
88984
88984
|
match2 = last2.exec(source);
|
|
88985
|
-
return res +
|
|
88985
|
+
return res + sep9 + (match2?.[1] ?? "");
|
|
88986
88986
|
}
|
|
88987
88987
|
function doubleQuotedValue(source, onError2) {
|
|
88988
88988
|
let res = "";
|
|
@@ -89789,14 +89789,14 @@ var require_cst_stringify = __commonJS({
|
|
|
89789
89789
|
}
|
|
89790
89790
|
}
|
|
89791
89791
|
}
|
|
89792
|
-
function stringifyItem({ start: start2, key, sep:
|
|
89792
|
+
function stringifyItem({ start: start2, key, sep: sep9, value }) {
|
|
89793
89793
|
let res = "";
|
|
89794
89794
|
for (const st of start2)
|
|
89795
89795
|
res += st.source;
|
|
89796
89796
|
if (key)
|
|
89797
89797
|
res += stringifyToken(key);
|
|
89798
|
-
if (
|
|
89799
|
-
for (const st of
|
|
89798
|
+
if (sep9)
|
|
89799
|
+
for (const st of sep9)
|
|
89800
89800
|
res += st.source;
|
|
89801
89801
|
if (value)
|
|
89802
89802
|
res += stringifyToken(value);
|
|
@@ -90946,18 +90946,18 @@ var require_parser2 = __commonJS({
|
|
|
90946
90946
|
if (this.type === "map-value-ind") {
|
|
90947
90947
|
const prev = getPrevProps(this.peek(2));
|
|
90948
90948
|
const start2 = getFirstKeyStartProps(prev);
|
|
90949
|
-
let
|
|
90949
|
+
let sep9;
|
|
90950
90950
|
if (scalar.end) {
|
|
90951
|
-
|
|
90952
|
-
|
|
90951
|
+
sep9 = scalar.end;
|
|
90952
|
+
sep9.push(this.sourceToken);
|
|
90953
90953
|
delete scalar.end;
|
|
90954
90954
|
} else
|
|
90955
|
-
|
|
90955
|
+
sep9 = [this.sourceToken];
|
|
90956
90956
|
const map4 = {
|
|
90957
90957
|
type: "block-map",
|
|
90958
90958
|
offset: scalar.offset,
|
|
90959
90959
|
indent: scalar.indent,
|
|
90960
|
-
items: [{ start: start2, key: scalar, sep:
|
|
90960
|
+
items: [{ start: start2, key: scalar, sep: sep9 }]
|
|
90961
90961
|
};
|
|
90962
90962
|
this.onKeyLine = true;
|
|
90963
90963
|
this.stack[this.stack.length - 1] = map4;
|
|
@@ -91110,15 +91110,15 @@ var require_parser2 = __commonJS({
|
|
|
91110
91110
|
} else if (isFlowToken(it.key) && !includesToken(it.sep, "newline")) {
|
|
91111
91111
|
const start3 = getFirstKeyStartProps(it.start);
|
|
91112
91112
|
const key = it.key;
|
|
91113
|
-
const
|
|
91114
|
-
|
|
91113
|
+
const sep9 = it.sep;
|
|
91114
|
+
sep9.push(this.sourceToken);
|
|
91115
91115
|
delete it.key;
|
|
91116
91116
|
delete it.sep;
|
|
91117
91117
|
this.stack.push({
|
|
91118
91118
|
type: "block-map",
|
|
91119
91119
|
offset: this.offset,
|
|
91120
91120
|
indent: this.indent,
|
|
91121
|
-
items: [{ start: start3, key, sep:
|
|
91121
|
+
items: [{ start: start3, key, sep: sep9 }]
|
|
91122
91122
|
});
|
|
91123
91123
|
} else if (start2.length > 0) {
|
|
91124
91124
|
it.sep = it.sep.concat(start2, this.sourceToken);
|
|
@@ -91147,14 +91147,14 @@ var require_parser2 = __commonJS({
|
|
|
91147
91147
|
case "scalar":
|
|
91148
91148
|
case "single-quoted-scalar":
|
|
91149
91149
|
case "double-quoted-scalar": {
|
|
91150
|
-
const
|
|
91150
|
+
const fs93 = this.flowScalar(this.type);
|
|
91151
91151
|
if (atNextItem || it.value) {
|
|
91152
|
-
map4.items.push({ start: start2, key:
|
|
91152
|
+
map4.items.push({ start: start2, key: fs93, sep: [] });
|
|
91153
91153
|
this.onKeyLine = true;
|
|
91154
91154
|
} else if (it.sep) {
|
|
91155
|
-
this.stack.push(
|
|
91155
|
+
this.stack.push(fs93);
|
|
91156
91156
|
} else {
|
|
91157
|
-
Object.assign(it, { key:
|
|
91157
|
+
Object.assign(it, { key: fs93, sep: [] });
|
|
91158
91158
|
this.onKeyLine = true;
|
|
91159
91159
|
}
|
|
91160
91160
|
return;
|
|
@@ -91282,13 +91282,13 @@ var require_parser2 = __commonJS({
|
|
|
91282
91282
|
case "scalar":
|
|
91283
91283
|
case "single-quoted-scalar":
|
|
91284
91284
|
case "double-quoted-scalar": {
|
|
91285
|
-
const
|
|
91285
|
+
const fs93 = this.flowScalar(this.type);
|
|
91286
91286
|
if (!it || it.value)
|
|
91287
|
-
fc.items.push({ start: [], key:
|
|
91287
|
+
fc.items.push({ start: [], key: fs93, sep: [] });
|
|
91288
91288
|
else if (it.sep)
|
|
91289
|
-
this.stack.push(
|
|
91289
|
+
this.stack.push(fs93);
|
|
91290
91290
|
else
|
|
91291
|
-
Object.assign(it, { key:
|
|
91291
|
+
Object.assign(it, { key: fs93, sep: [] });
|
|
91292
91292
|
return;
|
|
91293
91293
|
}
|
|
91294
91294
|
case "flow-map-end":
|
|
@@ -91312,13 +91312,13 @@ var require_parser2 = __commonJS({
|
|
|
91312
91312
|
const prev = getPrevProps(parent);
|
|
91313
91313
|
const start2 = getFirstKeyStartProps(prev);
|
|
91314
91314
|
fixFlowSeqItems(fc);
|
|
91315
|
-
const
|
|
91316
|
-
|
|
91315
|
+
const sep9 = fc.end.splice(1, fc.end.length);
|
|
91316
|
+
sep9.push(this.sourceToken);
|
|
91317
91317
|
const map4 = {
|
|
91318
91318
|
type: "block-map",
|
|
91319
91319
|
offset: fc.offset,
|
|
91320
91320
|
indent: fc.indent,
|
|
91321
|
-
items: [{ start: start2, key: fc, sep:
|
|
91321
|
+
items: [{ start: start2, key: fc, sep: sep9 }]
|
|
91322
91322
|
};
|
|
91323
91323
|
this.onKeyLine = true;
|
|
91324
91324
|
this.stack[this.stack.length - 1] = map4;
|
|
@@ -99991,7 +99991,7 @@ var require_FileConfigFactory = __commonJS({
|
|
|
99991
99991
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
99992
99992
|
exports2.parseConfigFile = exports2.FileConfigFactory = void 0;
|
|
99993
99993
|
var core_1 = require_src13();
|
|
99994
|
-
var
|
|
99994
|
+
var fs93 = __require("fs");
|
|
99995
99995
|
var yaml = require_dist4();
|
|
99996
99996
|
var utils_1 = require_utils13();
|
|
99997
99997
|
var validateConfig = require_validator();
|
|
@@ -100008,7 +100008,7 @@ var require_FileConfigFactory = __commonJS({
|
|
|
100008
100008
|
function parseConfigFile() {
|
|
100009
100009
|
const supportedFileVersionPattern = /^1\.0$/;
|
|
100010
100010
|
const configFile = (0, core_1.getStringFromEnv)("OTEL_CONFIG_FILE") || "";
|
|
100011
|
-
const file2 =
|
|
100011
|
+
const file2 = fs93.readFileSync(configFile, "utf8");
|
|
100012
100012
|
const rawParsed = yaml.parse(file2);
|
|
100013
100013
|
const processed = substituteEnvVars(rawParsed);
|
|
100014
100014
|
const fileFormat = processed?.file_format;
|
|
@@ -100025,8 +100025,8 @@ var require_FileConfigFactory = __commonJS({
|
|
|
100025
100025
|
const err2 = validateConfig.errors[0];
|
|
100026
100026
|
detail = `${err2.instancePath} ${err2.message}`;
|
|
100027
100027
|
} else {
|
|
100028
|
-
const
|
|
100029
|
-
detail =
|
|
100028
|
+
const sep9 = "\n ";
|
|
100029
|
+
detail = sep9 + validateConfig.errors.map((e2) => `${e2.instancePath} ${e2.message}`).join(sep9);
|
|
100030
100030
|
}
|
|
100031
100031
|
throw new Error(`Invalid OpenTelemetry config file: ${configFile}: ${detail}`);
|
|
100032
100032
|
}
|
|
@@ -102079,7 +102079,7 @@ var require_util11 = __commonJS({
|
|
|
102079
102079
|
"packages/core/node_modules/systeminformation/lib/util.js"(exports2) {
|
|
102080
102080
|
"use strict";
|
|
102081
102081
|
var os33 = __require("os");
|
|
102082
|
-
var
|
|
102082
|
+
var fs93 = __require("fs");
|
|
102083
102083
|
var path113 = __require("path");
|
|
102084
102084
|
var spawn13 = __require("child_process").spawn;
|
|
102085
102085
|
var exec3 = __require("child_process").exec;
|
|
@@ -102376,7 +102376,7 @@ var require_util11 = __commonJS({
|
|
|
102376
102376
|
_powerShell = "powershell.exe";
|
|
102377
102377
|
if (_windows) {
|
|
102378
102378
|
const defaultPath = `${WINDIR}\\system32\\WindowsPowerShell\\v1.0\\powershell.exe`;
|
|
102379
|
-
if (
|
|
102379
|
+
if (fs93.existsSync(defaultPath)) {
|
|
102380
102380
|
_powerShell = defaultPath;
|
|
102381
102381
|
}
|
|
102382
102382
|
}
|
|
@@ -102384,7 +102384,7 @@ var require_util11 = __commonJS({
|
|
|
102384
102384
|
function getWmic() {
|
|
102385
102385
|
if (os33.type() === "Windows_NT" && !wmicPath) {
|
|
102386
102386
|
wmicPath = WINDIR + "\\system32\\wbem\\wmic.exe";
|
|
102387
|
-
if (!
|
|
102387
|
+
if (!fs93.existsSync(wmicPath)) {
|
|
102388
102388
|
try {
|
|
102389
102389
|
const wmicPathArray = execSync4("WHERE WMIC", execOptsWin).toString().split("\r\n");
|
|
102390
102390
|
if (wmicPathArray && wmicPathArray.length) {
|
|
@@ -102669,7 +102669,7 @@ var require_util11 = __commonJS({
|
|
|
102669
102669
|
cpuinfo = _rpi_cpuinfo;
|
|
102670
102670
|
} else if (cpuinfo === void 0) {
|
|
102671
102671
|
try {
|
|
102672
|
-
cpuinfo =
|
|
102672
|
+
cpuinfo = fs93.readFileSync("/proc/cpuinfo", { encoding: "utf8" }).toString().split("\n");
|
|
102673
102673
|
_rpi_cpuinfo = cpuinfo;
|
|
102674
102674
|
} catch (e2) {
|
|
102675
102675
|
return false;
|
|
@@ -102682,7 +102682,7 @@ var require_util11 = __commonJS({
|
|
|
102682
102682
|
function isRaspbian() {
|
|
102683
102683
|
let osrelease = [];
|
|
102684
102684
|
try {
|
|
102685
|
-
osrelease =
|
|
102685
|
+
osrelease = fs93.readFileSync("/etc/os-release", { encoding: "utf8" }).toString().split("\n");
|
|
102686
102686
|
} catch (e2) {
|
|
102687
102687
|
return false;
|
|
102688
102688
|
}
|
|
@@ -102700,9 +102700,9 @@ var require_util11 = __commonJS({
|
|
|
102700
102700
|
});
|
|
102701
102701
|
}
|
|
102702
102702
|
function darwinXcodeExists() {
|
|
102703
|
-
const cmdLineToolsExists =
|
|
102704
|
-
const xcodeAppExists =
|
|
102705
|
-
const xcodeExists =
|
|
102703
|
+
const cmdLineToolsExists = fs93.existsSync("/Library/Developer/CommandLineTools/usr/bin/");
|
|
102704
|
+
const xcodeAppExists = fs93.existsSync("/Applications/Xcode.app/Contents/Developer/Tools");
|
|
102705
|
+
const xcodeExists = fs93.existsSync("/Library/Developer/Xcode/");
|
|
102706
102706
|
return cmdLineToolsExists || xcodeExists || xcodeAppExists;
|
|
102707
102707
|
}
|
|
102708
102708
|
function nanoSeconds() {
|
|
@@ -102820,8 +102820,8 @@ var require_util11 = __commonJS({
|
|
|
102820
102820
|
return ("00000000" + parseInt(hex, 16).toString(2)).substr(-8);
|
|
102821
102821
|
}
|
|
102822
102822
|
function getFilesInPath(source) {
|
|
102823
|
-
const lstatSync3 =
|
|
102824
|
-
const readdirSync3 =
|
|
102823
|
+
const lstatSync3 = fs93.lstatSync;
|
|
102824
|
+
const readdirSync3 = fs93.readdirSync;
|
|
102825
102825
|
const join45 = path113.join;
|
|
102826
102826
|
function isDirectory(source2) {
|
|
102827
102827
|
return lstatSync3(source2).isDirectory();
|
|
@@ -102852,7 +102852,7 @@ var require_util11 = __commonJS({
|
|
|
102852
102852
|
return [];
|
|
102853
102853
|
}
|
|
102854
102854
|
}
|
|
102855
|
-
if (
|
|
102855
|
+
if (fs93.existsSync(source)) {
|
|
102856
102856
|
return getFilesRecursively(source);
|
|
102857
102857
|
} else {
|
|
102858
102858
|
return [];
|
|
@@ -103068,7 +103068,7 @@ var require_util11 = __commonJS({
|
|
|
103068
103068
|
cpuinfo = _rpi_cpuinfo;
|
|
103069
103069
|
} else {
|
|
103070
103070
|
try {
|
|
103071
|
-
cpuinfo =
|
|
103071
|
+
cpuinfo = fs93.readFileSync("/proc/cpuinfo", { encoding: "utf8" }).toString().split("\n");
|
|
103072
103072
|
_rpi_cpuinfo = cpuinfo;
|
|
103073
103073
|
} catch (e2) {
|
|
103074
103074
|
return false;
|
|
@@ -104622,7 +104622,7 @@ var require_util11 = __commonJS({
|
|
|
104622
104622
|
var require_system = __commonJS({
|
|
104623
104623
|
"packages/core/node_modules/systeminformation/lib/system.js"(exports2) {
|
|
104624
104624
|
"use strict";
|
|
104625
|
-
var
|
|
104625
|
+
var fs93 = __require("fs");
|
|
104626
104626
|
var os33 = __require("os");
|
|
104627
104627
|
var util4 = require_util11();
|
|
104628
104628
|
var exec3 = __require("child_process").exec;
|
|
@@ -104760,7 +104760,7 @@ var require_system = __commonJS({
|
|
|
104760
104760
|
util4.noop();
|
|
104761
104761
|
}
|
|
104762
104762
|
}
|
|
104763
|
-
if (
|
|
104763
|
+
if (fs93.existsSync("/.dockerenv") || fs93.existsSync("/.dockerinit")) {
|
|
104764
104764
|
result2.model = "Docker Container";
|
|
104765
104765
|
}
|
|
104766
104766
|
try {
|
|
@@ -104788,7 +104788,7 @@ var require_system = __commonJS({
|
|
|
104788
104788
|
util4.noop();
|
|
104789
104789
|
}
|
|
104790
104790
|
if (result2.manufacturer === "" && result2.model === "Computer" && result2.version === "") {
|
|
104791
|
-
|
|
104791
|
+
fs93.readFile("/proc/cpuinfo", function(error41, stdout2) {
|
|
104792
104792
|
if (!error41) {
|
|
104793
104793
|
let lines2 = stdout2.toString().split("\n");
|
|
104794
104794
|
result2.model = util4.getValue(lines2, "hardware", ":", true).toUpperCase();
|
|
@@ -105390,7 +105390,7 @@ var require_osinfo = __commonJS({
|
|
|
105390
105390
|
"packages/core/node_modules/systeminformation/lib/osinfo.js"(exports2) {
|
|
105391
105391
|
"use strict";
|
|
105392
105392
|
var os33 = __require("os");
|
|
105393
|
-
var
|
|
105393
|
+
var fs93 = __require("fs");
|
|
105394
105394
|
var util4 = require_util11();
|
|
105395
105395
|
var exec3 = __require("child_process").exec;
|
|
105396
105396
|
var execSync4 = __require("child_process").execSync;
|
|
@@ -105715,7 +105715,7 @@ var require_osinfo = __commonJS({
|
|
|
105715
105715
|
function isUefiLinux() {
|
|
105716
105716
|
return new Promise((resolve29) => {
|
|
105717
105717
|
process.nextTick(() => {
|
|
105718
|
-
|
|
105718
|
+
fs93.stat("/sys/firmware/efi", function(err2) {
|
|
105719
105719
|
if (!err2) {
|
|
105720
105720
|
return resolve29(true);
|
|
105721
105721
|
} else {
|
|
@@ -105955,7 +105955,7 @@ var require_osinfo = __commonJS({
|
|
|
105955
105955
|
}
|
|
105956
105956
|
if ({}.hasOwnProperty.call(appsObj.versions, "git")) {
|
|
105957
105957
|
if (_darwin) {
|
|
105958
|
-
const gitHomebrewExists =
|
|
105958
|
+
const gitHomebrewExists = fs93.existsSync("/usr/local/Cellar/git") || fs93.existsSync("/opt/homebrew/bin/git");
|
|
105959
105959
|
if (util4.darwinXcodeExists() || gitHomebrewExists) {
|
|
105960
105960
|
exec3("git --version", function(error40, stdout) {
|
|
105961
105961
|
if (!error40) {
|
|
@@ -106150,8 +106150,8 @@ var require_osinfo = __commonJS({
|
|
|
106150
106150
|
const stdout = execSync4("sw_vers");
|
|
106151
106151
|
const lines = stdout.toString().split("\n");
|
|
106152
106152
|
const osVersion = util4.getValue(lines, "ProductVersion", ":");
|
|
106153
|
-
const gitHomebrewExists1 =
|
|
106154
|
-
const gitHomebrewExists2 =
|
|
106153
|
+
const gitHomebrewExists1 = fs93.existsSync("/usr/local/Cellar/python");
|
|
106154
|
+
const gitHomebrewExists2 = fs93.existsSync("/opt/homebrew/bin/python");
|
|
106155
106155
|
if (util4.darwinXcodeExists() && util4.semverCompare("12.0.1", osVersion) < 0 || gitHomebrewExists1 || gitHomebrewExists2) {
|
|
106156
106156
|
const cmd2 = gitHomebrewExists1 ? "/usr/local/Cellar/python -V 2>&1" : gitHomebrewExists2 ? "/opt/homebrew/bin/python -V 2>&1" : "python -V 2>&1";
|
|
106157
106157
|
exec3(cmd2, function(error40, stdout2) {
|
|
@@ -106179,7 +106179,7 @@ var require_osinfo = __commonJS({
|
|
|
106179
106179
|
}
|
|
106180
106180
|
if ({}.hasOwnProperty.call(appsObj.versions, "python3")) {
|
|
106181
106181
|
if (_darwin) {
|
|
106182
|
-
const gitHomebrewExists =
|
|
106182
|
+
const gitHomebrewExists = fs93.existsSync("/usr/local/Cellar/python3") || fs93.existsSync("/opt/homebrew/bin/python3");
|
|
106183
106183
|
if (util4.darwinXcodeExists() || gitHomebrewExists) {
|
|
106184
106184
|
exec3("python3 -V 2>&1", function(error40, stdout) {
|
|
106185
106185
|
if (!error40) {
|
|
@@ -106203,7 +106203,7 @@ var require_osinfo = __commonJS({
|
|
|
106203
106203
|
}
|
|
106204
106204
|
if ({}.hasOwnProperty.call(appsObj.versions, "pip")) {
|
|
106205
106205
|
if (_darwin) {
|
|
106206
|
-
const gitHomebrewExists =
|
|
106206
|
+
const gitHomebrewExists = fs93.existsSync("/usr/local/Cellar/pip") || fs93.existsSync("/opt/homebrew/bin/pip");
|
|
106207
106207
|
if (util4.darwinXcodeExists() || gitHomebrewExists) {
|
|
106208
106208
|
exec3("pip -V 2>&1", function(error40, stdout) {
|
|
106209
106209
|
if (!error40) {
|
|
@@ -106229,7 +106229,7 @@ var require_osinfo = __commonJS({
|
|
|
106229
106229
|
}
|
|
106230
106230
|
if ({}.hasOwnProperty.call(appsObj.versions, "pip3")) {
|
|
106231
106231
|
if (_darwin) {
|
|
106232
|
-
const gitHomebrewExists =
|
|
106232
|
+
const gitHomebrewExists = fs93.existsSync("/usr/local/Cellar/pip3") || fs93.existsSync("/opt/homebrew/bin/pip3");
|
|
106233
106233
|
if (util4.darwinXcodeExists() || gitHomebrewExists) {
|
|
106234
106234
|
exec3("pip3 -V 2>&1", function(error40, stdout) {
|
|
106235
106235
|
if (!error40) {
|
|
@@ -106530,7 +106530,7 @@ echo -n "hardware: "; cat /sys/class/dmi/id/product_uuid 2> /dev/null; echo;`;
|
|
|
106530
106530
|
result2.os = util4.getValue(lines, "os").toLowerCase();
|
|
106531
106531
|
result2.hardware = util4.getValue(lines, "hardware").toLowerCase();
|
|
106532
106532
|
if (!result2.hardware) {
|
|
106533
|
-
const lines2 =
|
|
106533
|
+
const lines2 = fs93.readFileSync("/proc/cpuinfo", { encoding: "utf8" }).toString().split("\n");
|
|
106534
106534
|
const serial = util4.getValue(lines2, "serial");
|
|
106535
106535
|
result2.hardware = serial || "";
|
|
106536
106536
|
}
|
|
@@ -106589,7 +106589,7 @@ var require_cpu = __commonJS({
|
|
|
106589
106589
|
var os33 = __require("os");
|
|
106590
106590
|
var exec3 = __require("child_process").exec;
|
|
106591
106591
|
var execSync4 = __require("child_process").execSync;
|
|
106592
|
-
var
|
|
106592
|
+
var fs93 = __require("fs");
|
|
106593
106593
|
var util4 = require_util11();
|
|
106594
106594
|
var _platform = process.platform;
|
|
106595
106595
|
var _linux = _platform === "linux" || _platform === "android";
|
|
@@ -107356,7 +107356,7 @@ var require_cpu = __commonJS({
|
|
|
107356
107356
|
result2.socket = "SOC";
|
|
107357
107357
|
}
|
|
107358
107358
|
if (util4.getValue(lines, "architecture") === "riscv64") {
|
|
107359
|
-
const linesRiscV =
|
|
107359
|
+
const linesRiscV = fs93.readFileSync("/proc/cpuinfo").toString().split("\n");
|
|
107360
107360
|
const uarch = util4.getValue(linesRiscV, "uarch") || "";
|
|
107361
107361
|
if (uarch.indexOf(",") > -1) {
|
|
107362
107362
|
const split = uarch.split(",");
|
|
@@ -107738,9 +107738,9 @@ var require_cpu = __commonJS({
|
|
|
107738
107738
|
return;
|
|
107739
107739
|
}
|
|
107740
107740
|
}
|
|
107741
|
-
|
|
107741
|
+
fs93.stat("/sys/class/thermal/thermal_zone0/temp", function(err2) {
|
|
107742
107742
|
if (err2 === null) {
|
|
107743
|
-
|
|
107743
|
+
fs93.readFile("/sys/class/thermal/thermal_zone0/temp", function(error42, stdout3) {
|
|
107744
107744
|
if (!error42) {
|
|
107745
107745
|
let lines2 = stdout3.toString().split("\n");
|
|
107746
107746
|
if (lines2.length > 0) {
|
|
@@ -107948,7 +107948,7 @@ var require_cpu = __commonJS({
|
|
|
107948
107948
|
});
|
|
107949
107949
|
}
|
|
107950
107950
|
if (!result2) {
|
|
107951
|
-
|
|
107951
|
+
fs93.readFile("/proc/cpuinfo", function(error41, stdout2) {
|
|
107952
107952
|
if (!error41) {
|
|
107953
107953
|
let lines = stdout2.toString().split("\n");
|
|
107954
107954
|
result2 = util4.getValue(lines, "features", ":", true).toLowerCase();
|
|
@@ -108452,7 +108452,7 @@ var require_memory = __commonJS({
|
|
|
108452
108452
|
var exec3 = __require("child_process").exec;
|
|
108453
108453
|
var execSync4 = __require("child_process").execSync;
|
|
108454
108454
|
var util4 = require_util11();
|
|
108455
|
-
var
|
|
108455
|
+
var fs93 = __require("fs");
|
|
108456
108456
|
var _platform = process.platform;
|
|
108457
108457
|
var _linux = _platform === "linux" || _platform === "android";
|
|
108458
108458
|
var _darwin = _platform === "darwin";
|
|
@@ -108519,7 +108519,7 @@ var require_memory = __commonJS({
|
|
|
108519
108519
|
};
|
|
108520
108520
|
if (_linux) {
|
|
108521
108521
|
try {
|
|
108522
|
-
|
|
108522
|
+
fs93.readFile("/proc/meminfo", function(error40, stdout) {
|
|
108523
108523
|
if (!error40) {
|
|
108524
108524
|
const lines = stdout.toString().split("\n");
|
|
108525
108525
|
result2.total = parseInt(util4.getValue(lines, "memtotal"), 10);
|
|
@@ -108942,7 +108942,7 @@ var require_battery = __commonJS({
|
|
|
108942
108942
|
"packages/core/node_modules/systeminformation/lib/battery.js"(exports2, module2) {
|
|
108943
108943
|
"use strict";
|
|
108944
108944
|
var exec3 = __require("child_process").exec;
|
|
108945
|
-
var
|
|
108945
|
+
var fs93 = __require("fs");
|
|
108946
108946
|
var util4 = require_util11();
|
|
108947
108947
|
var _platform = process.platform;
|
|
108948
108948
|
var _linux = _platform === "linux" || _platform === "android";
|
|
@@ -108995,24 +108995,24 @@ var require_battery = __commonJS({
|
|
|
108995
108995
|
};
|
|
108996
108996
|
if (_linux) {
|
|
108997
108997
|
let battery_path = "";
|
|
108998
|
-
if (
|
|
108998
|
+
if (fs93.existsSync("/sys/class/power_supply/BAT1/uevent")) {
|
|
108999
108999
|
battery_path = "/sys/class/power_supply/BAT1/";
|
|
109000
|
-
} else if (
|
|
109000
|
+
} else if (fs93.existsSync("/sys/class/power_supply/BAT0/uevent")) {
|
|
109001
109001
|
battery_path = "/sys/class/power_supply/BAT0/";
|
|
109002
109002
|
}
|
|
109003
109003
|
let acConnected = false;
|
|
109004
109004
|
let acPath = "";
|
|
109005
|
-
if (
|
|
109005
|
+
if (fs93.existsSync("/sys/class/power_supply/AC/online")) {
|
|
109006
109006
|
acPath = "/sys/class/power_supply/AC/online";
|
|
109007
|
-
} else if (
|
|
109007
|
+
} else if (fs93.existsSync("/sys/class/power_supply/AC0/online")) {
|
|
109008
109008
|
acPath = "/sys/class/power_supply/AC0/online";
|
|
109009
109009
|
}
|
|
109010
109010
|
if (acPath) {
|
|
109011
|
-
const file2 =
|
|
109011
|
+
const file2 = fs93.readFileSync(acPath);
|
|
109012
109012
|
acConnected = file2.toString().trim() === "1";
|
|
109013
109013
|
}
|
|
109014
109014
|
if (battery_path) {
|
|
109015
|
-
|
|
109015
|
+
fs93.readFile(battery_path + "uevent", function(error40, stdout) {
|
|
109016
109016
|
if (!error40) {
|
|
109017
109017
|
let lines = stdout.toString().split("\n");
|
|
109018
109018
|
result2.isCharging = util4.getValue(lines, "POWER_SUPPLY_STATUS", "=").toLowerCase() === "charging";
|
|
@@ -109237,7 +109237,7 @@ var require_battery = __commonJS({
|
|
|
109237
109237
|
var require_graphics = __commonJS({
|
|
109238
109238
|
"packages/core/node_modules/systeminformation/lib/graphics.js"(exports2) {
|
|
109239
109239
|
"use strict";
|
|
109240
|
-
var
|
|
109240
|
+
var fs93 = __require("fs");
|
|
109241
109241
|
var exec3 = __require("child_process").exec;
|
|
109242
109242
|
var execSync4 = __require("child_process").execSync;
|
|
109243
109243
|
var util4 = require_util11();
|
|
@@ -109601,12 +109601,12 @@ var require_graphics = __commonJS({
|
|
|
109601
109601
|
if (_windows) {
|
|
109602
109602
|
try {
|
|
109603
109603
|
const basePath = util4.WINDIR + "\\System32\\DriverStore\\FileRepository";
|
|
109604
|
-
const candidateDirs =
|
|
109605
|
-
return
|
|
109604
|
+
const candidateDirs = fs93.readdirSync(basePath).filter((dir) => {
|
|
109605
|
+
return fs93.readdirSync([basePath, dir].join("/")).includes("nvidia-smi.exe");
|
|
109606
109606
|
});
|
|
109607
109607
|
const targetDir = candidateDirs.reduce((prevDir, currentDir) => {
|
|
109608
|
-
const previousNvidiaSmi =
|
|
109609
|
-
const currentNvidiaSmi =
|
|
109608
|
+
const previousNvidiaSmi = fs93.statSync([basePath, prevDir, "nvidia-smi.exe"].join("/"));
|
|
109609
|
+
const currentNvidiaSmi = fs93.statSync([basePath, currentDir, "nvidia-smi.exe"].join("/"));
|
|
109610
109610
|
return previousNvidiaSmi.ctimeMs > currentNvidiaSmi.ctimeMs ? prevDir : currentDir;
|
|
109611
109611
|
});
|
|
109612
109612
|
if (targetDir) {
|
|
@@ -110307,7 +110307,7 @@ var require_filesystem = __commonJS({
|
|
|
110307
110307
|
"packages/core/node_modules/systeminformation/lib/filesystem.js"(exports2) {
|
|
110308
110308
|
"use strict";
|
|
110309
110309
|
var util4 = require_util11();
|
|
110310
|
-
var
|
|
110310
|
+
var fs93 = __require("fs");
|
|
110311
110311
|
var exec3 = __require("child_process").exec;
|
|
110312
110312
|
var execSync4 = __require("child_process").execSync;
|
|
110313
110313
|
var execPromiseSave = util4.promisifySave(__require("child_process").exec);
|
|
@@ -110328,11 +110328,11 @@ var require_filesystem = __commonJS({
|
|
|
110328
110328
|
}
|
|
110329
110329
|
let macOsDisks = [];
|
|
110330
110330
|
let osMounts = [];
|
|
110331
|
-
function getmacOsFsType(
|
|
110332
|
-
if (!
|
|
110331
|
+
function getmacOsFsType(fs94) {
|
|
110332
|
+
if (!fs94.startsWith("/")) {
|
|
110333
110333
|
return "NFS";
|
|
110334
110334
|
}
|
|
110335
|
-
const parts2 =
|
|
110335
|
+
const parts2 = fs94.split("/");
|
|
110336
110336
|
const fsShort = parts2[parts2.length - 1];
|
|
110337
110337
|
const macOsDisksSingle = macOsDisks.filter((item) => item.indexOf(fsShort) >= 0);
|
|
110338
110338
|
if (macOsDisksSingle.length === 1 && macOsDisksSingle[0].indexOf("APFS") >= 0) {
|
|
@@ -110340,11 +110340,11 @@ var require_filesystem = __commonJS({
|
|
|
110340
110340
|
}
|
|
110341
110341
|
return "HFS";
|
|
110342
110342
|
}
|
|
110343
|
-
function isLinuxTmpFs(
|
|
110343
|
+
function isLinuxTmpFs(fs94) {
|
|
110344
110344
|
const linuxTmpFileSystems = ["rootfs", "unionfs", "squashfs", "cramfs", "initrd", "initramfs", "devtmpfs", "tmpfs", "udev", "devfs", "specfs", "type", "appimaged"];
|
|
110345
110345
|
let result2 = false;
|
|
110346
110346
|
linuxTmpFileSystems.forEach((linuxFs) => {
|
|
110347
|
-
if (
|
|
110347
|
+
if (fs94.toLowerCase().indexOf(linuxFs) >= 0) {
|
|
110348
110348
|
result2 = true;
|
|
110349
110349
|
}
|
|
110350
110350
|
});
|
|
@@ -110372,18 +110372,18 @@ var require_filesystem = __commonJS({
|
|
|
110372
110372
|
if (line !== "") {
|
|
110373
110373
|
line = line.replace(/ +/g, " ").split(" ");
|
|
110374
110374
|
if (line && (line[0].startsWith("/") || line[6] && line[6] === "/" || line[0].indexOf("/") > 0 || line[0].indexOf(":") === 1 || !_darwin && !isLinuxTmpFs(line[1]))) {
|
|
110375
|
-
const
|
|
110375
|
+
const fs94 = line[0];
|
|
110376
110376
|
const fsType = _linux || _freebsd || _openbsd || _netbsd ? line[1] : getmacOsFsType(line[0]);
|
|
110377
110377
|
const size = parseInt(_linux || _freebsd || _openbsd || _netbsd ? line[2] : line[1]) * 1024;
|
|
110378
110378
|
const used = parseInt(_linux || _freebsd || _openbsd || _netbsd ? line[3] : line[2]) * 1024;
|
|
110379
110379
|
const available = parseInt(_linux || _freebsd || _openbsd || _netbsd ? line[4] : line[3]) * 1024;
|
|
110380
110380
|
const use = parseFloat((100 * (used / (used + available))).toFixed(2));
|
|
110381
|
-
let rw = osMounts && Object.keys(osMounts).length > 0 ? osMounts[
|
|
110381
|
+
let rw = osMounts && Object.keys(osMounts).length > 0 ? osMounts[fs94] || false : null;
|
|
110382
110382
|
line.splice(0, _linux || _freebsd || _openbsd || _netbsd ? 6 : 5);
|
|
110383
110383
|
const mount = line.join(" ");
|
|
110384
|
-
if (!data.find((el) => el.fs ===
|
|
110384
|
+
if (!data.find((el) => el.fs === fs94 && el.type === fsType)) {
|
|
110385
110385
|
data.push({
|
|
110386
|
-
fs:
|
|
110386
|
+
fs: fs94,
|
|
110387
110387
|
type: fsType,
|
|
110388
110388
|
size,
|
|
110389
110389
|
used,
|
|
@@ -110545,7 +110545,7 @@ var require_filesystem = __commonJS({
|
|
|
110545
110545
|
});
|
|
110546
110546
|
}
|
|
110547
110547
|
if (_linux) {
|
|
110548
|
-
|
|
110548
|
+
fs93.readFile("/proc/sys/fs/file-nr", function(error40, stdout) {
|
|
110549
110549
|
if (!error40) {
|
|
110550
110550
|
let lines = stdout.toString().split("\n");
|
|
110551
110551
|
if (lines[0]) {
|
|
@@ -110564,7 +110564,7 @@ var require_filesystem = __commonJS({
|
|
|
110564
110564
|
}
|
|
110565
110565
|
resolve29(result2);
|
|
110566
110566
|
} else {
|
|
110567
|
-
|
|
110567
|
+
fs93.readFile("/proc/sys/fs/file-max", function(error41, stdout2) {
|
|
110568
110568
|
if (!error41) {
|
|
110569
110569
|
let lines = stdout2.toString().split("\n");
|
|
110570
110570
|
if (lines[0]) {
|
|
@@ -111782,7 +111782,7 @@ var require_network = __commonJS({
|
|
|
111782
111782
|
var os33 = __require("os");
|
|
111783
111783
|
var exec3 = __require("child_process").exec;
|
|
111784
111784
|
var execSync4 = __require("child_process").execSync;
|
|
111785
|
-
var
|
|
111785
|
+
var fs93 = __require("fs");
|
|
111786
111786
|
var util4 = require_util11();
|
|
111787
111787
|
var _platform = process.platform;
|
|
111788
111788
|
var _linux = _platform === "linux" || _platform === "android";
|
|
@@ -112961,7 +112961,7 @@ var require_network = __commonJS({
|
|
|
112961
112961
|
let cmd, lines, stats;
|
|
112962
112962
|
if (!_network[ifaceSanitized] || _network[ifaceSanitized] && !_network[ifaceSanitized].ms || _network[ifaceSanitized] && _network[ifaceSanitized].ms && Date.now() - _network[ifaceSanitized].ms >= 500) {
|
|
112963
112963
|
if (_linux) {
|
|
112964
|
-
if (
|
|
112964
|
+
if (fs93.existsSync("/sys/class/net/" + ifaceSanitized)) {
|
|
112965
112965
|
cmd = "cat /sys/class/net/" + ifaceSanitized + "/operstate; cat /sys/class/net/" + ifaceSanitized + "/statistics/rx_bytes; cat /sys/class/net/" + ifaceSanitized + "/statistics/tx_bytes; cat /sys/class/net/" + ifaceSanitized + "/statistics/rx_dropped; cat /sys/class/net/" + ifaceSanitized + "/statistics/rx_errors; cat /sys/class/net/" + ifaceSanitized + "/statistics/tx_dropped; cat /sys/class/net/" + ifaceSanitized + "/statistics/tx_errors; ";
|
|
112966
112966
|
exec3(cmd, function(error40, stdout) {
|
|
112967
112967
|
if (!error40) {
|
|
@@ -114263,7 +114263,7 @@ var require_processes = __commonJS({
|
|
|
114263
114263
|
"packages/core/node_modules/systeminformation/lib/processes.js"(exports2) {
|
|
114264
114264
|
"use strict";
|
|
114265
114265
|
var os33 = __require("os");
|
|
114266
|
-
var
|
|
114266
|
+
var fs93 = __require("fs");
|
|
114267
114267
|
var path113 = __require("path");
|
|
114268
114268
|
var exec3 = __require("child_process").exec;
|
|
114269
114269
|
var execSync4 = __require("child_process").execSync;
|
|
@@ -114832,7 +114832,7 @@ var require_processes = __commonJS({
|
|
|
114832
114832
|
}
|
|
114833
114833
|
if (firstPos === 1e4 && tmpCommand.indexOf(" ") > -1) {
|
|
114834
114834
|
const parts2 = tmpCommand.split(" ");
|
|
114835
|
-
if (
|
|
114835
|
+
if (fs93.existsSync(path113.join(cmdPath, parts2[0]))) {
|
|
114836
114836
|
command = parts2.shift();
|
|
114837
114837
|
params = (parts2.join(" ") + " " + tmpParams).trim();
|
|
114838
114838
|
} else {
|
|
@@ -118951,7 +118951,7 @@ var require_bluetooth = __commonJS({
|
|
|
118951
118951
|
var path113 = __require("path");
|
|
118952
118952
|
var util4 = require_util11();
|
|
118953
118953
|
var bluetoothVendors = require_bluetoothVendors();
|
|
118954
|
-
var
|
|
118954
|
+
var fs93 = __require("fs");
|
|
118955
118955
|
var _platform = process.platform;
|
|
118956
118956
|
var _linux = _platform === "linux" || _platform === "android";
|
|
118957
118957
|
var _darwin = _platform === "darwin";
|
|
@@ -119076,7 +119076,7 @@ var require_bluetooth = __commonJS({
|
|
|
119076
119076
|
const macAddr1 = pathParts.length >= 6 ? pathParts[pathParts.length - 2] : null;
|
|
119077
119077
|
const macAddr2 = pathParts.length >= 7 ? pathParts[pathParts.length - 3] : null;
|
|
119078
119078
|
if (filename === "info") {
|
|
119079
|
-
const infoFile =
|
|
119079
|
+
const infoFile = fs93.readFileSync(element, { encoding: "utf8" }).split("\n");
|
|
119080
119080
|
result2.push(parseLinuxBluetoothInfo(infoFile, macAddr1, macAddr2));
|
|
119081
119081
|
}
|
|
119082
119082
|
});
|
|
@@ -119585,7 +119585,7 @@ var require_util12 = __commonJS({
|
|
|
119585
119585
|
"use strict";
|
|
119586
119586
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
119587
119587
|
exports2.addCommonProtos = exports2.loadProtosWithOptionsSync = exports2.loadProtosWithOptions = void 0;
|
|
119588
|
-
var
|
|
119588
|
+
var fs93 = __require("fs");
|
|
119589
119589
|
var path113 = __require("path");
|
|
119590
119590
|
var Protobuf = require_protobufjs();
|
|
119591
119591
|
function addIncludePathResolver(root, includePaths) {
|
|
@@ -119597,7 +119597,7 @@ var require_util12 = __commonJS({
|
|
|
119597
119597
|
for (const directory of includePaths) {
|
|
119598
119598
|
const fullPath = path113.join(directory, target);
|
|
119599
119599
|
try {
|
|
119600
|
-
|
|
119600
|
+
fs93.accessSync(fullPath, fs93.constants.R_OK);
|
|
119601
119601
|
return fullPath;
|
|
119602
119602
|
} catch (err2) {
|
|
119603
119603
|
continue;
|
|
@@ -122635,12 +122635,12 @@ var require_filesubjecttokensupplier3 = __commonJS({
|
|
|
122635
122635
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
122636
122636
|
exports2.FileSubjectTokenSupplier = void 0;
|
|
122637
122637
|
var util_1 = __require("util");
|
|
122638
|
-
var
|
|
122639
|
-
var readFile15 = (0, util_1.promisify)((_a4 =
|
|
122638
|
+
var fs93 = __require("fs");
|
|
122639
|
+
var readFile15 = (0, util_1.promisify)((_a4 = fs93.readFile) !== null && _a4 !== void 0 ? _a4 : () => {
|
|
122640
122640
|
});
|
|
122641
|
-
var realpath5 = (0, util_1.promisify)((_b =
|
|
122641
|
+
var realpath5 = (0, util_1.promisify)((_b = fs93.realpath) !== null && _b !== void 0 ? _b : () => {
|
|
122642
122642
|
});
|
|
122643
|
-
var lstat6 = (0, util_1.promisify)((_c =
|
|
122643
|
+
var lstat6 = (0, util_1.promisify)((_c = fs93.lstat) !== null && _c !== void 0 ? _c : () => {
|
|
122644
122644
|
});
|
|
122645
122645
|
var FileSubjectTokenSupplier = class {
|
|
122646
122646
|
/**
|
|
@@ -123358,7 +123358,7 @@ var require_pluggable_auth_handler3 = __commonJS({
|
|
|
123358
123358
|
var pluggable_auth_client_1 = require_pluggable_auth_client3();
|
|
123359
123359
|
var executable_response_1 = require_executable_response3();
|
|
123360
123360
|
var childProcess2 = __require("child_process");
|
|
123361
|
-
var
|
|
123361
|
+
var fs93 = __require("fs");
|
|
123362
123362
|
var PluggableAuthHandler = class _PluggableAuthHandler {
|
|
123363
123363
|
/**
|
|
123364
123364
|
* Instantiates a PluggableAuthHandler instance using the provided
|
|
@@ -123428,14 +123428,14 @@ var require_pluggable_auth_handler3 = __commonJS({
|
|
|
123428
123428
|
}
|
|
123429
123429
|
let filePath;
|
|
123430
123430
|
try {
|
|
123431
|
-
filePath = await
|
|
123431
|
+
filePath = await fs93.promises.realpath(this.outputFile);
|
|
123432
123432
|
} catch (_a4) {
|
|
123433
123433
|
return void 0;
|
|
123434
123434
|
}
|
|
123435
|
-
if (!(await
|
|
123435
|
+
if (!(await fs93.promises.lstat(filePath)).isFile()) {
|
|
123436
123436
|
return void 0;
|
|
123437
123437
|
}
|
|
123438
|
-
const responseString = await
|
|
123438
|
+
const responseString = await fs93.promises.readFile(filePath, {
|
|
123439
123439
|
encoding: "utf8"
|
|
123440
123440
|
});
|
|
123441
123441
|
if (responseString === "") {
|
|
@@ -123856,7 +123856,7 @@ var require_googleauth3 = __commonJS({
|
|
|
123856
123856
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
123857
123857
|
exports2.GoogleAuth = exports2.GoogleAuthExceptionMessages = exports2.CLOUD_SDK_CLIENT_ID = void 0;
|
|
123858
123858
|
var child_process_1 = __require("child_process");
|
|
123859
|
-
var
|
|
123859
|
+
var fs93 = __require("fs");
|
|
123860
123860
|
var gcpMetadata = require_src9();
|
|
123861
123861
|
var os33 = __require("os");
|
|
123862
123862
|
var path113 = __require("path");
|
|
@@ -124125,7 +124125,7 @@ var require_googleauth3 = __commonJS({
|
|
|
124125
124125
|
}
|
|
124126
124126
|
if (location) {
|
|
124127
124127
|
location = path113.join(location, "gcloud", "application_default_credentials.json");
|
|
124128
|
-
if (!
|
|
124128
|
+
if (!fs93.existsSync(location)) {
|
|
124129
124129
|
location = null;
|
|
124130
124130
|
}
|
|
124131
124131
|
}
|
|
@@ -124146,8 +124146,8 @@ var require_googleauth3 = __commonJS({
|
|
|
124146
124146
|
throw new Error("The file path is invalid.");
|
|
124147
124147
|
}
|
|
124148
124148
|
try {
|
|
124149
|
-
filePath =
|
|
124150
|
-
if (!
|
|
124149
|
+
filePath = fs93.realpathSync(filePath);
|
|
124150
|
+
if (!fs93.lstatSync(filePath).isFile()) {
|
|
124151
124151
|
throw new Error();
|
|
124152
124152
|
}
|
|
124153
124153
|
} catch (err2) {
|
|
@@ -124156,7 +124156,7 @@ var require_googleauth3 = __commonJS({
|
|
|
124156
124156
|
}
|
|
124157
124157
|
throw err2;
|
|
124158
124158
|
}
|
|
124159
|
-
const readStream =
|
|
124159
|
+
const readStream = fs93.createReadStream(filePath);
|
|
124160
124160
|
return this.fromStream(readStream, options);
|
|
124161
124161
|
}
|
|
124162
124162
|
/**
|
|
@@ -124543,7 +124543,7 @@ var require_googleauth3 = __commonJS({
|
|
|
124543
124543
|
return this._cacheClientFromJSON(this.jsonContent, this.clientOptions);
|
|
124544
124544
|
} else if (this.keyFilename) {
|
|
124545
124545
|
const filePath = path113.resolve(this.keyFilename);
|
|
124546
|
-
const stream2 =
|
|
124546
|
+
const stream2 = fs93.createReadStream(filePath);
|
|
124547
124547
|
return await this.fromStreamAsync(stream2, this.clientOptions);
|
|
124548
124548
|
} else if (this.apiKey) {
|
|
124549
124549
|
const client = await this.fromAPIKey(this.apiKey, this.clientOptions);
|
|
@@ -131989,13 +131989,13 @@ var require_discovery = __commonJS({
|
|
|
131989
131989
|
"use strict";
|
|
131990
131990
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
131991
131991
|
exports2.Discovery = void 0;
|
|
131992
|
-
var
|
|
131992
|
+
var fs93 = __require("fs");
|
|
131993
131993
|
var google_auth_library_1 = require_src43();
|
|
131994
131994
|
var resolve29 = __require("url");
|
|
131995
131995
|
var util4 = __require("util");
|
|
131996
131996
|
var apirequest_1 = require_apirequest();
|
|
131997
131997
|
var endpoint_1 = require_endpoint();
|
|
131998
|
-
var readFile15 = util4.promisify(
|
|
131998
|
+
var readFile15 = util4.promisify(fs93.readFile);
|
|
131999
131999
|
var Discovery = class {
|
|
132000
132000
|
/**
|
|
132001
132001
|
* Discovery for discovering API endpoints
|
|
@@ -140909,7 +140909,7 @@ var require_util15 = __commonJS({
|
|
|
140909
140909
|
"use strict";
|
|
140910
140910
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
140911
140911
|
exports2.addCommonProtos = exports2.loadProtosWithOptionsSync = exports2.loadProtosWithOptions = void 0;
|
|
140912
|
-
var
|
|
140912
|
+
var fs93 = __require("fs");
|
|
140913
140913
|
var path113 = __require("path");
|
|
140914
140914
|
var Protobuf = require_protobufjs();
|
|
140915
140915
|
function addIncludePathResolver(root, includePaths) {
|
|
@@ -140921,7 +140921,7 @@ var require_util15 = __commonJS({
|
|
|
140921
140921
|
for (const directory of includePaths) {
|
|
140922
140922
|
const fullPath = path113.join(directory, target);
|
|
140923
140923
|
try {
|
|
140924
|
-
|
|
140924
|
+
fs93.accessSync(fullPath, fs93.constants.R_OK);
|
|
140925
140925
|
return fullPath;
|
|
140926
140926
|
} catch (err2) {
|
|
140927
140927
|
continue;
|
|
@@ -142210,7 +142210,7 @@ var require_grpc = __commonJS({
|
|
|
142210
142210
|
exports2.GoogleProtoFilesRoot = exports2.GrpcClient = exports2.ClientStub = void 0;
|
|
142211
142211
|
var grpcProtoLoader = require_src54();
|
|
142212
142212
|
var child_process_1 = __require("child_process");
|
|
142213
|
-
var
|
|
142213
|
+
var fs93 = __require("fs");
|
|
142214
142214
|
var google_auth_library_1 = require_src43();
|
|
142215
142215
|
var grpc3 = require_src16();
|
|
142216
142216
|
var os33 = __require("os");
|
|
@@ -142226,7 +142226,7 @@ var require_grpc = __commonJS({
|
|
|
142226
142226
|
var COMMON_PROTO_FILES = commonProtoFiles.map((file2) => file2.replace(/[/\\]/g, path113.sep));
|
|
142227
142227
|
async function readFileAsync(path114) {
|
|
142228
142228
|
return new Promise((resolve29, reject) => {
|
|
142229
|
-
|
|
142229
|
+
fs93.readFile(path114, "utf8", (err2, content) => {
|
|
142230
142230
|
if (err2)
|
|
142231
142231
|
return reject(err2);
|
|
142232
142232
|
else
|
|
@@ -142379,7 +142379,7 @@ var require_grpc = __commonJS({
|
|
|
142379
142379
|
return this.loadFromProto(filename, options, ignoreCache);
|
|
142380
142380
|
}
|
|
142381
142381
|
static _resolveFile(protoPath, filename) {
|
|
142382
|
-
if (
|
|
142382
|
+
if (fs93.existsSync(path113.join(protoPath, filename))) {
|
|
142383
142383
|
return path113.join(protoPath, filename);
|
|
142384
142384
|
} else if (COMMON_PROTO_FILES.indexOf(filename) > -1) {
|
|
142385
142385
|
return path113.join(googleProtoFilesDir, filename);
|
|
@@ -142580,7 +142580,7 @@ var require_grpc = __commonJS({
|
|
|
142580
142580
|
originPath = path113.normalize(originPath);
|
|
142581
142581
|
includePath = path113.normalize(includePath);
|
|
142582
142582
|
if (path113.isAbsolute(includePath)) {
|
|
142583
|
-
if (!
|
|
142583
|
+
if (!fs93.existsSync(includePath)) {
|
|
142584
142584
|
throw new Error("The include `" + includePath + "` was not found.");
|
|
142585
142585
|
}
|
|
142586
142586
|
return includePath;
|
|
@@ -142594,10 +142594,10 @@ var require_grpc = __commonJS({
|
|
|
142594
142594
|
originPath = path113.normalize(originPath);
|
|
142595
142595
|
includePath = path113.normalize(includePath);
|
|
142596
142596
|
let current = originPath;
|
|
142597
|
-
let found =
|
|
142597
|
+
let found = fs93.existsSync(path113.join(current, includePath));
|
|
142598
142598
|
while (!found && current.length > 0) {
|
|
142599
142599
|
current = current.substring(0, current.lastIndexOf(path113.sep));
|
|
142600
|
-
found =
|
|
142600
|
+
found = fs93.existsSync(path113.join(current, includePath));
|
|
142601
142601
|
}
|
|
142602
142602
|
if (!found) {
|
|
142603
142603
|
throw new Error("The include `" + includePath + "` was not found.");
|
|
@@ -157420,9 +157420,9 @@ var require_pump = __commonJS({
|
|
|
157420
157420
|
"node_modules/pump/index.js"(exports2, module2) {
|
|
157421
157421
|
var once11 = require_once();
|
|
157422
157422
|
var eos = require_end_of_stream2();
|
|
157423
|
-
var
|
|
157423
|
+
var fs93;
|
|
157424
157424
|
try {
|
|
157425
|
-
|
|
157425
|
+
fs93 = __require("fs");
|
|
157426
157426
|
} catch (e2) {
|
|
157427
157427
|
}
|
|
157428
157428
|
var noop4 = function() {
|
|
@@ -157433,8 +157433,8 @@ var require_pump = __commonJS({
|
|
|
157433
157433
|
};
|
|
157434
157434
|
var isFS = function(stream2) {
|
|
157435
157435
|
if (!ancient) return false;
|
|
157436
|
-
if (!
|
|
157437
|
-
return (stream2 instanceof (
|
|
157436
|
+
if (!fs93) return false;
|
|
157437
|
+
return (stream2 instanceof (fs93.ReadStream || noop4) || stream2 instanceof (fs93.WriteStream || noop4)) && isFn(stream2.close);
|
|
157438
157438
|
};
|
|
157439
157439
|
var isRequest = function(stream2) {
|
|
157440
157440
|
return stream2.setHeader && isFn(stream2.abort);
|
|
@@ -157960,11 +157960,11 @@ var require_metadata4 = __commonJS({
|
|
|
157960
157960
|
exports2.getGlobalDescriptor = getGlobalDescriptor;
|
|
157961
157961
|
exports2.getDefaultResource = getDefaultResource;
|
|
157962
157962
|
exports2.detectServiceContext = detectServiceContext;
|
|
157963
|
-
var
|
|
157963
|
+
var fs93 = __require("fs");
|
|
157964
157964
|
var gcpMetadata = require_src9();
|
|
157965
157965
|
var google_auth_library_1 = require_src43();
|
|
157966
157966
|
var util_1 = __require("util");
|
|
157967
|
-
var readFile15 = (0, util_1.promisify)(
|
|
157967
|
+
var readFile15 = (0, util_1.promisify)(fs93.readFile);
|
|
157968
157968
|
function zoneFromQualifiedZone(qualified) {
|
|
157969
157969
|
return qualified.split("/").pop();
|
|
157970
157970
|
}
|
|
@@ -200547,7 +200547,7 @@ var require_windows = __commonJS({
|
|
|
200547
200547
|
"node_modules/isexe/windows.js"(exports2, module2) {
|
|
200548
200548
|
module2.exports = isexe;
|
|
200549
200549
|
isexe.sync = sync2;
|
|
200550
|
-
var
|
|
200550
|
+
var fs93 = __require("fs");
|
|
200551
200551
|
function checkPathExt(path113, options) {
|
|
200552
200552
|
var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
|
|
200553
200553
|
if (!pathext) {
|
|
@@ -200572,12 +200572,12 @@ var require_windows = __commonJS({
|
|
|
200572
200572
|
return checkPathExt(path113, options);
|
|
200573
200573
|
}
|
|
200574
200574
|
function isexe(path113, options, cb) {
|
|
200575
|
-
|
|
200575
|
+
fs93.stat(path113, function(er, stat14) {
|
|
200576
200576
|
cb(er, er ? false : checkStat(stat14, path113, options));
|
|
200577
200577
|
});
|
|
200578
200578
|
}
|
|
200579
200579
|
function sync2(path113, options) {
|
|
200580
|
-
return checkStat(
|
|
200580
|
+
return checkStat(fs93.statSync(path113), path113, options);
|
|
200581
200581
|
}
|
|
200582
200582
|
}
|
|
200583
200583
|
});
|
|
@@ -200587,14 +200587,14 @@ var require_mode = __commonJS({
|
|
|
200587
200587
|
"node_modules/isexe/mode.js"(exports2, module2) {
|
|
200588
200588
|
module2.exports = isexe;
|
|
200589
200589
|
isexe.sync = sync2;
|
|
200590
|
-
var
|
|
200590
|
+
var fs93 = __require("fs");
|
|
200591
200591
|
function isexe(path113, options, cb) {
|
|
200592
|
-
|
|
200592
|
+
fs93.stat(path113, function(er, stat14) {
|
|
200593
200593
|
cb(er, er ? false : checkStat(stat14, options));
|
|
200594
200594
|
});
|
|
200595
200595
|
}
|
|
200596
200596
|
function sync2(path113, options) {
|
|
200597
|
-
return checkStat(
|
|
200597
|
+
return checkStat(fs93.statSync(path113), options);
|
|
200598
200598
|
}
|
|
200599
200599
|
function checkStat(stat14, options) {
|
|
200600
200600
|
return stat14.isFile() && checkMode(stat14, options);
|
|
@@ -200618,7 +200618,7 @@ var require_mode = __commonJS({
|
|
|
200618
200618
|
// node_modules/isexe/index.js
|
|
200619
200619
|
var require_isexe = __commonJS({
|
|
200620
200620
|
"node_modules/isexe/index.js"(exports2, module2) {
|
|
200621
|
-
var
|
|
200621
|
+
var fs93 = __require("fs");
|
|
200622
200622
|
var core2;
|
|
200623
200623
|
if (process.platform === "win32" || global.TESTING_WINDOWS) {
|
|
200624
200624
|
core2 = require_windows();
|
|
@@ -200882,16 +200882,16 @@ var require_shebang_command = __commonJS({
|
|
|
200882
200882
|
var require_readShebang = __commonJS({
|
|
200883
200883
|
"node_modules/cross-spawn/lib/util/readShebang.js"(exports2, module2) {
|
|
200884
200884
|
"use strict";
|
|
200885
|
-
var
|
|
200885
|
+
var fs93 = __require("fs");
|
|
200886
200886
|
var shebangCommand = require_shebang_command();
|
|
200887
200887
|
function readShebang(command) {
|
|
200888
200888
|
const size = 150;
|
|
200889
200889
|
const buffer = Buffer.alloc(size);
|
|
200890
200890
|
let fd;
|
|
200891
200891
|
try {
|
|
200892
|
-
fd =
|
|
200893
|
-
|
|
200894
|
-
|
|
200892
|
+
fd = fs93.openSync(command, "r");
|
|
200893
|
+
fs93.readSync(fd, buffer, 0, size, 0);
|
|
200894
|
+
fs93.closeSync(fd);
|
|
200895
200895
|
} catch (e2) {
|
|
200896
200896
|
}
|
|
200897
200897
|
return shebangCommand(buffer.toString());
|
|
@@ -234499,11 +234499,11 @@ var require_command_exists = __commonJS({
|
|
|
234499
234499
|
"use strict";
|
|
234500
234500
|
var exec3 = __require("child_process").exec;
|
|
234501
234501
|
var execSync4 = __require("child_process").execSync;
|
|
234502
|
-
var
|
|
234502
|
+
var fs93 = __require("fs");
|
|
234503
234503
|
var path113 = __require("path");
|
|
234504
|
-
var access7 =
|
|
234505
|
-
var accessSync =
|
|
234506
|
-
var constants6 =
|
|
234504
|
+
var access7 = fs93.access;
|
|
234505
|
+
var accessSync = fs93.accessSync;
|
|
234506
|
+
var constants6 = fs93.constants || fs93;
|
|
234507
234507
|
var isUsingWindows = process.platform == "win32";
|
|
234508
234508
|
var fileNotExists = function(commandName, callback) {
|
|
234509
234509
|
access7(
|
|
@@ -234649,7 +234649,7 @@ var require_command_exists2 = __commonJS({
|
|
|
234649
234649
|
});
|
|
234650
234650
|
|
|
234651
234651
|
// packages/core/dist/src/config/config.js
|
|
234652
|
-
import * as
|
|
234652
|
+
import * as fs76 from "node:fs";
|
|
234653
234653
|
import * as path87 from "node:path";
|
|
234654
234654
|
|
|
234655
234655
|
// packages/core/dist/src/policy/sandboxPolicyManager.js
|
|
@@ -273705,8 +273705,8 @@ function isValidToolName(name3, options = {}) {
|
|
|
273705
273705
|
}
|
|
273706
273706
|
|
|
273707
273707
|
// packages/core/dist/src/generated/git-commit.js
|
|
273708
|
-
var GIT_COMMIT_INFO = "
|
|
273709
|
-
var CLI_VERSION = "0.
|
|
273708
|
+
var GIT_COMMIT_INFO = "ae0a3aa7b";
|
|
273709
|
+
var CLI_VERSION = "0.51.0-nightly.20260628.gae0a3aa7b";
|
|
273710
273710
|
|
|
273711
273711
|
// packages/core/dist/src/ide/detect-ide.js
|
|
273712
273712
|
var IDE_DEFINITIONS = {
|
|
@@ -296882,7 +296882,7 @@ function getVersion() {
|
|
|
296882
296882
|
}
|
|
296883
296883
|
versionPromise = (async () => {
|
|
296884
296884
|
const pkgJson = await getPackageJson(__dirname4);
|
|
296885
|
-
return "0.
|
|
296885
|
+
return "0.51.0-nightly.20260628.gae0a3aa7b";
|
|
296886
296886
|
})();
|
|
296887
296887
|
return versionPromise;
|
|
296888
296888
|
}
|
|
@@ -301687,6 +301687,8 @@ function getAuthTypeFromEnv() {
|
|
|
301687
301687
|
}
|
|
301688
301688
|
var VERTEX_AI_REQUEST_TYPE_HEADER = "X-Vertex-AI-LLM-Request-Type";
|
|
301689
301689
|
var VERTEX_AI_SHARED_REQUEST_TYPE_HEADER = "X-Vertex-AI-LLM-Shared-Request-Type";
|
|
301690
|
+
var VERTEX_AI_US_REP_ENDPOINT = "https://aiplatform.us.rep.googleapis.com";
|
|
301691
|
+
var VERTEX_AI_EU_REP_ENDPOINT = "https://aiplatform.eu.rep.googleapis.com";
|
|
301690
301692
|
function validateBaseUrl(baseUrl) {
|
|
301691
301693
|
try {
|
|
301692
301694
|
new URL(baseUrl);
|
|
@@ -301806,6 +301808,13 @@ async function createContentGenerator(config2, gcConfig, sessionId) {
|
|
|
301806
301808
|
if (envBaseUrl) {
|
|
301807
301809
|
validateBaseUrl(envBaseUrl);
|
|
301808
301810
|
baseUrl = envBaseUrl;
|
|
301811
|
+
} else if (config2.authType === AuthType2.USE_VERTEX_AI) {
|
|
301812
|
+
const location = process.env["GOOGLE_CLOUD_LOCATION"];
|
|
301813
|
+
if (location === "us") {
|
|
301814
|
+
baseUrl = VERTEX_AI_US_REP_ENDPOINT;
|
|
301815
|
+
} else if (location === "eu") {
|
|
301816
|
+
baseUrl = VERTEX_AI_EU_REP_ENDPOINT;
|
|
301817
|
+
}
|
|
301809
301818
|
}
|
|
301810
301819
|
} else {
|
|
301811
301820
|
validateBaseUrl(baseUrl);
|
|
@@ -308686,8 +308695,8 @@ var PathScurryBase = class {
|
|
|
308686
308695
|
*
|
|
308687
308696
|
* @internal
|
|
308688
308697
|
*/
|
|
308689
|
-
constructor(cwd = process.cwd(), pathImpl,
|
|
308690
|
-
this.#fs = fsFromOption(
|
|
308698
|
+
constructor(cwd = process.cwd(), pathImpl, sep9, { nocase, childrenCacheSize = 16 * 1024, fs: fs93 = defaultFS } = {}) {
|
|
308699
|
+
this.#fs = fsFromOption(fs93);
|
|
308691
308700
|
if (cwd instanceof URL || cwd.startsWith("file://")) {
|
|
308692
308701
|
cwd = fileURLToPath9(cwd);
|
|
308693
308702
|
}
|
|
@@ -308697,7 +308706,7 @@ var PathScurryBase = class {
|
|
|
308697
308706
|
this.#resolveCache = new ResolveCache();
|
|
308698
308707
|
this.#resolvePosixCache = new ResolveCache();
|
|
308699
308708
|
this.#children = new ChildrenCache(childrenCacheSize);
|
|
308700
|
-
const split = cwdPath.substring(this.rootPath.length).split(
|
|
308709
|
+
const split = cwdPath.substring(this.rootPath.length).split(sep9);
|
|
308701
308710
|
if (split.length === 1 && !split[0]) {
|
|
308702
308711
|
split.pop();
|
|
308703
308712
|
}
|
|
@@ -309245,8 +309254,8 @@ var PathScurryWin32 = class extends PathScurryBase {
|
|
|
309245
309254
|
/**
|
|
309246
309255
|
* @internal
|
|
309247
309256
|
*/
|
|
309248
|
-
newRoot(
|
|
309249
|
-
return new PathWin32(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs:
|
|
309257
|
+
newRoot(fs93) {
|
|
309258
|
+
return new PathWin32(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs93 });
|
|
309250
309259
|
}
|
|
309251
309260
|
/**
|
|
309252
309261
|
* Return true if the provided path string is an absolute path
|
|
@@ -309274,8 +309283,8 @@ var PathScurryPosix = class extends PathScurryBase {
|
|
|
309274
309283
|
/**
|
|
309275
309284
|
* @internal
|
|
309276
309285
|
*/
|
|
309277
|
-
newRoot(
|
|
309278
|
-
return new PathPosix(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs:
|
|
309286
|
+
newRoot(fs93) {
|
|
309287
|
+
return new PathPosix(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs93 });
|
|
309279
309288
|
}
|
|
309280
309289
|
/**
|
|
309281
309290
|
* Return true if the provided path string is an absolute path
|
|
@@ -329110,7 +329119,7 @@ var A2AAuthProviderFactory = class _A2AAuthProviderFactory {
|
|
|
329110
329119
|
return provider;
|
|
329111
329120
|
}
|
|
329112
329121
|
case "oauth2": {
|
|
329113
|
-
const { OAuth2AuthProvider } = await import("./oauth2-provider-
|
|
329122
|
+
const { OAuth2AuthProvider } = await import("./oauth2-provider-KEIUB36U.js");
|
|
329114
329123
|
const provider = new OAuth2AuthProvider(authConfig, options.agentName ?? "unknown", agentCard, options.agentCardUrl);
|
|
329115
329124
|
await provider.initialize();
|
|
329116
329125
|
return provider;
|
|
@@ -337267,6 +337276,15 @@ var WorkspaceContext = class {
|
|
|
337267
337276
|
const fullyResolvedPath = this.fullyResolvedPath(pathToCheck);
|
|
337268
337277
|
for (const dir of this.directories) {
|
|
337269
337278
|
if (this.isPathWithinRoot(fullyResolvedPath, dir)) {
|
|
337279
|
+
const relative12 = path70.relative(dir, fullyResolvedPath);
|
|
337280
|
+
const segments = relative12.split(path70.sep);
|
|
337281
|
+
const hasBlockedSegment = segments.some((segment) => {
|
|
337282
|
+
const clean = trimTrailingSpacesAndDots(segment.split(":")[0]).toLowerCase();
|
|
337283
|
+
return clean === ".git" || clean === ".env" || clean === "node_modules";
|
|
337284
|
+
});
|
|
337285
|
+
if (hasBlockedSegment) {
|
|
337286
|
+
return false;
|
|
337287
|
+
}
|
|
337270
337288
|
return true;
|
|
337271
337289
|
}
|
|
337272
337290
|
}
|
|
@@ -337316,6 +337334,13 @@ var WorkspaceContext = class {
|
|
|
337316
337334
|
return !relative12.startsWith(`..${path70.sep}`) && relative12 !== ".." && !path70.isAbsolute(relative12);
|
|
337317
337335
|
}
|
|
337318
337336
|
};
|
|
337337
|
+
function trimTrailingSpacesAndDots(str2) {
|
|
337338
|
+
let end = str2.length - 1;
|
|
337339
|
+
while (end >= 0 && (str2[end] === " " || str2[end] === ".")) {
|
|
337340
|
+
end--;
|
|
337341
|
+
}
|
|
337342
|
+
return str2.slice(0, end + 1);
|
|
337343
|
+
}
|
|
337319
337344
|
|
|
337320
337345
|
// packages/core/dist/src/config/scoped-config.js
|
|
337321
337346
|
var workspaceContextOverride = new AsyncLocalStorage3();
|
|
@@ -354697,11 +354722,10 @@ var ContextBuilder = class {
|
|
|
354697
354722
|
|
|
354698
354723
|
// packages/core/dist/src/safety/registry.js
|
|
354699
354724
|
import * as path85 from "node:path";
|
|
354700
|
-
import * as
|
|
354725
|
+
import * as fs74 from "node:fs";
|
|
354701
354726
|
|
|
354702
354727
|
// packages/core/dist/src/safety/built-in.js
|
|
354703
354728
|
import * as path84 from "node:path";
|
|
354704
|
-
import * as fs74 from "node:fs";
|
|
354705
354729
|
var AllowedPathChecker = class {
|
|
354706
354730
|
async check(input) {
|
|
354707
354731
|
const { toolCall, context: context2 } = input;
|
|
@@ -354713,6 +354737,7 @@ var AllowedPathChecker = class {
|
|
|
354713
354737
|
const includedArgs = config2?.included_args ?? [];
|
|
354714
354738
|
const excludedArgs = config2?.excluded_args ?? [];
|
|
354715
354739
|
const pathsToCheck = this.collectPathsToCheck(toolCall.args, includedArgs, excludedArgs);
|
|
354740
|
+
const resolvedAllowedDirs = allowedDirs.map((dir) => this.safelyResolvePath(dir, context2.environment.cwd)).filter((resolvedDir) => resolvedDir !== null);
|
|
354716
354741
|
for (const { path: p, argName } of pathsToCheck) {
|
|
354717
354742
|
const resolvedPath = this.safelyResolvePath(p, context2.environment.cwd);
|
|
354718
354743
|
if (!resolvedPath) {
|
|
@@ -354721,12 +354746,42 @@ var AllowedPathChecker = class {
|
|
|
354721
354746
|
reason: `Cannot resolve path "${p}" in argument "${argName}"`
|
|
354722
354747
|
};
|
|
354723
354748
|
}
|
|
354724
|
-
|
|
354725
|
-
|
|
354726
|
-
|
|
354727
|
-
|
|
354728
|
-
|
|
354729
|
-
|
|
354749
|
+
let hasBlockedSegment = false;
|
|
354750
|
+
let isVscodePath = false;
|
|
354751
|
+
for (const resolvedDir of resolvedAllowedDirs) {
|
|
354752
|
+
if (!this.isPathAllowed(resolvedPath, resolvedDir))
|
|
354753
|
+
continue;
|
|
354754
|
+
const relative12 = path84.relative(resolvedDir, resolvedPath);
|
|
354755
|
+
const segments = relative12.split(path84.sep);
|
|
354756
|
+
for (const segment of segments) {
|
|
354757
|
+
const clean = trimTrailingSpacesAndDots2(segment.split(":")[0]).toLowerCase();
|
|
354758
|
+
if (clean === ".git" || clean === ".env" || clean === "node_modules") {
|
|
354759
|
+
hasBlockedSegment = true;
|
|
354760
|
+
}
|
|
354761
|
+
if (clean === ".vscode") {
|
|
354762
|
+
isVscodePath = true;
|
|
354763
|
+
}
|
|
354764
|
+
}
|
|
354765
|
+
}
|
|
354766
|
+
if (hasBlockedSegment) {
|
|
354767
|
+
return {
|
|
354768
|
+
decision: SafetyCheckDecision.DENY,
|
|
354769
|
+
reason: `Access to sensitive path "${p}" in argument "${argName}" is blocked.`
|
|
354770
|
+
};
|
|
354771
|
+
}
|
|
354772
|
+
if (isVscodePath) {
|
|
354773
|
+
return {
|
|
354774
|
+
decision: SafetyCheckDecision.ASK_USER,
|
|
354775
|
+
reason: `Modifying .vscode configuration files requires explicit user confirmation.`
|
|
354776
|
+
};
|
|
354777
|
+
}
|
|
354778
|
+
let isAllowed = false;
|
|
354779
|
+
for (const resolvedDir of resolvedAllowedDirs) {
|
|
354780
|
+
if (this.isPathAllowed(resolvedPath, resolvedDir)) {
|
|
354781
|
+
isAllowed = true;
|
|
354782
|
+
break;
|
|
354783
|
+
}
|
|
354784
|
+
}
|
|
354730
354785
|
if (!isAllowed) {
|
|
354731
354786
|
return {
|
|
354732
354787
|
decision: SafetyCheckDecision.DENY,
|
|
@@ -354741,10 +354796,11 @@ var AllowedPathChecker = class {
|
|
|
354741
354796
|
const resolved = path84.resolve(cwd, inputPath);
|
|
354742
354797
|
let current = resolved;
|
|
354743
354798
|
while (current && current !== path84.dirname(current)) {
|
|
354744
|
-
|
|
354745
|
-
const canonical =
|
|
354799
|
+
try {
|
|
354800
|
+
const canonical = resolveToRealPath(current);
|
|
354746
354801
|
const relative12 = path84.relative(current, resolved);
|
|
354747
354802
|
return path84.join(canonical, relative12);
|
|
354803
|
+
} catch {
|
|
354748
354804
|
}
|
|
354749
354805
|
current = path84.dirname(current);
|
|
354750
354806
|
}
|
|
@@ -354778,6 +354834,13 @@ var AllowedPathChecker = class {
|
|
|
354778
354834
|
return paths;
|
|
354779
354835
|
}
|
|
354780
354836
|
};
|
|
354837
|
+
function trimTrailingSpacesAndDots2(str2) {
|
|
354838
|
+
let end = str2.length - 1;
|
|
354839
|
+
while (end >= 0 && (str2[end] === " " || str2[end] === ".")) {
|
|
354840
|
+
end--;
|
|
354841
|
+
}
|
|
354842
|
+
return str2.slice(0, end + 1);
|
|
354843
|
+
}
|
|
354781
354844
|
|
|
354782
354845
|
// packages/core/dist/src/safety/conseca/policy-generator.js
|
|
354783
354846
|
var CONSECA_POLICY_GENERATION_PROMPT = `
|
|
@@ -355150,7 +355213,7 @@ var CheckerRegistry = class _CheckerRegistry {
|
|
|
355150
355213
|
const builtInPath = _CheckerRegistry.BUILT_IN_EXTERNAL_CHECKERS.get(name3);
|
|
355151
355214
|
if (builtInPath) {
|
|
355152
355215
|
const fullPath = path85.join(this.checkersPath, builtInPath);
|
|
355153
|
-
if (!
|
|
355216
|
+
if (!fs74.existsSync(fullPath)) {
|
|
355154
355217
|
throw new Error(`Built-in checker "${name3}" not found at ${fullPath}`);
|
|
355155
355218
|
}
|
|
355156
355219
|
return fullPath;
|
|
@@ -356152,7 +356215,7 @@ import { pathToFileURL } from "node:url";
|
|
|
356152
356215
|
import { randomUUID as randomUUID18 } from "node:crypto";
|
|
356153
356216
|
|
|
356154
356217
|
// packages/core/dist/src/mcp/oauth-token-storage.js
|
|
356155
|
-
import { promises as
|
|
356218
|
+
import { promises as fs75 } from "node:fs";
|
|
356156
356219
|
import * as path86 from "node:path";
|
|
356157
356220
|
var MCPOAuthTokenStorage = class {
|
|
356158
356221
|
hybridTokenStorage;
|
|
@@ -356175,7 +356238,7 @@ var MCPOAuthTokenStorage = class {
|
|
|
356175
356238
|
*/
|
|
356176
356239
|
async ensureConfigDir() {
|
|
356177
356240
|
const configDir = path86.dirname(this.getTokenFilePath());
|
|
356178
|
-
await
|
|
356241
|
+
await fs75.mkdir(configDir, { recursive: true });
|
|
356179
356242
|
}
|
|
356180
356243
|
/**
|
|
356181
356244
|
* Load all stored MCP OAuth tokens.
|
|
@@ -356189,7 +356252,7 @@ var MCPOAuthTokenStorage = class {
|
|
|
356189
356252
|
const tokenMap = /* @__PURE__ */ new Map();
|
|
356190
356253
|
try {
|
|
356191
356254
|
const tokenFile = this.getTokenFilePath();
|
|
356192
|
-
const data = await
|
|
356255
|
+
const data = await fs75.readFile(tokenFile, "utf-8");
|
|
356193
356256
|
const tokens = JSON.parse(data);
|
|
356194
356257
|
for (const credential of tokens) {
|
|
356195
356258
|
tokenMap.set(credential.serverName, credential);
|
|
@@ -356217,7 +356280,7 @@ var MCPOAuthTokenStorage = class {
|
|
|
356217
356280
|
const tokenArray = Array.from(tokens.values());
|
|
356218
356281
|
const tokenFile = this.getTokenFilePath();
|
|
356219
356282
|
try {
|
|
356220
|
-
await
|
|
356283
|
+
await fs75.writeFile(tokenFile, JSON.stringify(tokenArray, null, 2), { mode: 384 });
|
|
356221
356284
|
} catch (error40) {
|
|
356222
356285
|
coreEvents.emitFeedback("error", `Failed to save MCP OAuth token: ${getErrorMessage(error40)}`, error40);
|
|
356223
356286
|
throw error40;
|
|
@@ -356281,9 +356344,9 @@ var MCPOAuthTokenStorage = class {
|
|
|
356281
356344
|
const tokenFile = this.getTokenFilePath();
|
|
356282
356345
|
try {
|
|
356283
356346
|
if (tokenArray.length === 0) {
|
|
356284
|
-
await
|
|
356347
|
+
await fs75.unlink(tokenFile);
|
|
356285
356348
|
} else {
|
|
356286
|
-
await
|
|
356349
|
+
await fs75.writeFile(tokenFile, JSON.stringify(tokenArray, null, 2), {
|
|
356287
356350
|
mode: 384
|
|
356288
356351
|
});
|
|
356289
356352
|
}
|
|
@@ -356314,7 +356377,7 @@ var MCPOAuthTokenStorage = class {
|
|
|
356314
356377
|
}
|
|
356315
356378
|
try {
|
|
356316
356379
|
const tokenFile = this.getTokenFilePath();
|
|
356317
|
-
await
|
|
356380
|
+
await fs75.unlink(tokenFile);
|
|
356318
356381
|
} catch (error40) {
|
|
356319
356382
|
if (error40.code !== "ENOENT") {
|
|
356320
356383
|
coreEvents.emitFeedback("error", `Failed to clear MCP OAuth tokens: ${getErrorMessage(error40)}`, error40);
|
|
@@ -367106,7 +367169,7 @@ var Config = class {
|
|
|
367106
367169
|
plansDir = this.storage.getPlansDir();
|
|
367107
367170
|
}
|
|
367108
367171
|
try {
|
|
367109
|
-
await
|
|
367172
|
+
await fs76.promises.access(plansDir);
|
|
367110
367173
|
this.workspaceContext.addDirectory(plansDir);
|
|
367111
367174
|
} catch {
|
|
367112
367175
|
}
|
|
@@ -367611,7 +367674,7 @@ var Config = class {
|
|
|
367611
367674
|
const currentDirectories = this.workspaceContext.getDirectories().filter((dir) => !pathsToRemove.has(dir));
|
|
367612
367675
|
this.workspaceContext.setDirectories(currentDirectories);
|
|
367613
367676
|
try {
|
|
367614
|
-
if (
|
|
367677
|
+
if (fs76.existsSync(nextPlansDir)) {
|
|
367615
367678
|
this.workspaceContext.addDirectory(nextPlansDir);
|
|
367616
367679
|
}
|
|
367617
367680
|
} catch {
|
|
@@ -369084,7 +369147,7 @@ var StreamJsonFormatter = class {
|
|
|
369084
369147
|
|
|
369085
369148
|
// packages/core/dist/src/policy/integrity.js
|
|
369086
369149
|
import * as crypto21 from "node:crypto";
|
|
369087
|
-
import * as
|
|
369150
|
+
import * as fs77 from "node:fs/promises";
|
|
369088
369151
|
import * as path88 from "node:path";
|
|
369089
369152
|
var IntegrityStatus;
|
|
369090
369153
|
(function(IntegrityStatus2) {
|
|
@@ -369158,7 +369221,7 @@ var PolicyIntegrityManager = class _PolicyIntegrityManager {
|
|
|
369158
369221
|
async loadIntegrityData() {
|
|
369159
369222
|
const storagePath = Storage.getPolicyIntegrityStoragePath();
|
|
369160
369223
|
try {
|
|
369161
|
-
const content = await
|
|
369224
|
+
const content = await fs77.readFile(storagePath, "utf-8");
|
|
369162
369225
|
const parsed = JSON.parse(content);
|
|
369163
369226
|
if (typeof parsed === "object" && parsed !== null && Object.values(parsed).every((v) => typeof v === "string")) {
|
|
369164
369227
|
return parsed;
|
|
@@ -369176,8 +369239,8 @@ var PolicyIntegrityManager = class _PolicyIntegrityManager {
|
|
|
369176
369239
|
async saveIntegrityData(data) {
|
|
369177
369240
|
const storagePath = Storage.getPolicyIntegrityStoragePath();
|
|
369178
369241
|
try {
|
|
369179
|
-
await
|
|
369180
|
-
await
|
|
369242
|
+
await fs77.mkdir(path88.dirname(storagePath), { recursive: true });
|
|
369243
|
+
await fs77.writeFile(storagePath, JSON.stringify(data, null, 2), "utf-8");
|
|
369181
369244
|
} catch (error40) {
|
|
369182
369245
|
debugLogger.error("Failed to save policy integrity data", error40);
|
|
369183
369246
|
throw error40;
|
|
@@ -369186,7 +369249,7 @@ var PolicyIntegrityManager = class _PolicyIntegrityManager {
|
|
|
369186
369249
|
};
|
|
369187
369250
|
|
|
369188
369251
|
// packages/core/dist/src/config/extensions/integrity.js
|
|
369189
|
-
import * as
|
|
369252
|
+
import * as fs78 from "node:fs";
|
|
369190
369253
|
import * as path89 from "node:path";
|
|
369191
369254
|
import { createHash as createHash15, createHmac, randomBytes as randomBytes6, timingSafeEqual } from "node:crypto";
|
|
369192
369255
|
var import_json_stable_stringify = __toESM(require_json_stable_stringify(), 1);
|
|
@@ -369246,14 +369309,14 @@ var IntegrityKeyManager = class {
|
|
|
369246
369309
|
}
|
|
369247
369310
|
async getSecretKeyFromFile() {
|
|
369248
369311
|
try {
|
|
369249
|
-
const key = await
|
|
369312
|
+
const key = await fs78.promises.readFile(this.fallbackKeyPath, "utf-8");
|
|
369250
369313
|
return key.trim();
|
|
369251
369314
|
} catch (e2) {
|
|
369252
369315
|
if (isNodeError(e2) && e2.code === "ENOENT") {
|
|
369253
369316
|
const configDir = path89.dirname(this.fallbackKeyPath);
|
|
369254
|
-
await
|
|
369317
|
+
await fs78.promises.mkdir(configDir, { recursive: true });
|
|
369255
369318
|
const key = randomBytes6(32).toString("hex");
|
|
369256
|
-
await
|
|
369319
|
+
await fs78.promises.writeFile(this.fallbackKeyPath, key, { mode: 384 });
|
|
369257
369320
|
return key;
|
|
369258
369321
|
}
|
|
369259
369322
|
throw e2;
|
|
@@ -369274,7 +369337,7 @@ var ExtensionIntegrityStore = class {
|
|
|
369274
369337
|
async load() {
|
|
369275
369338
|
let content;
|
|
369276
369339
|
try {
|
|
369277
|
-
content = await
|
|
369340
|
+
content = await fs78.promises.readFile(this.integrityStorePath, "utf-8");
|
|
369278
369341
|
} catch (e2) {
|
|
369279
369342
|
if (isNodeError(e2) && e2.code === "ENOENT") {
|
|
369280
369343
|
return {};
|
|
@@ -369307,12 +369370,12 @@ var ExtensionIntegrityStore = class {
|
|
|
369307
369370
|
signature: storeSignature
|
|
369308
369371
|
};
|
|
369309
369372
|
const configDir = path89.dirname(this.integrityStorePath);
|
|
369310
|
-
await
|
|
369373
|
+
await fs78.promises.mkdir(configDir, { recursive: true });
|
|
369311
369374
|
const tmpPath = `${this.integrityStorePath}.tmp`;
|
|
369312
|
-
await
|
|
369375
|
+
await fs78.promises.writeFile(tmpPath, JSON.stringify(finalData, null, 2), {
|
|
369313
369376
|
mode: 384
|
|
369314
369377
|
});
|
|
369315
|
-
await
|
|
369378
|
+
await fs78.promises.rename(tmpPath, this.integrityStorePath);
|
|
369316
369379
|
}
|
|
369317
369380
|
/**
|
|
369318
369381
|
* Generates a deterministic SHA-256 hash of the metadata.
|
|
@@ -369606,11 +369669,11 @@ Write the complete content to the \`GEMINI.md\` file. The output must be well-fo
|
|
|
369606
369669
|
// packages/core/dist/src/commands/memory.js
|
|
369607
369670
|
import { randomUUID as randomUUID21 } from "node:crypto";
|
|
369608
369671
|
import { constants as fsConstants3 } from "node:fs";
|
|
369609
|
-
import * as
|
|
369672
|
+
import * as fs81 from "node:fs/promises";
|
|
369610
369673
|
import * as path93 from "node:path";
|
|
369611
369674
|
|
|
369612
369675
|
// packages/core/dist/src/services/memoryPatchUtils.js
|
|
369613
|
-
import * as
|
|
369676
|
+
import * as fs79 from "node:fs/promises";
|
|
369614
369677
|
import * as path91 from "node:path";
|
|
369615
369678
|
function getAllowedSkillPatchRoots(config2) {
|
|
369616
369679
|
return Array.from(new Set([Storage.getUserSkillsDir(), config2.storage.getProjectSkillsDir()].map((root) => path91.resolve(root))));
|
|
@@ -369620,7 +369683,7 @@ async function resolvePathWithExistingAncestors(targetPath) {
|
|
|
369620
369683
|
let currentPath = path91.resolve(targetPath);
|
|
369621
369684
|
while (true) {
|
|
369622
369685
|
try {
|
|
369623
|
-
const realCurrentPath = await
|
|
369686
|
+
const realCurrentPath = await fs79.realpath(currentPath);
|
|
369624
369687
|
return path91.join(realCurrentPath, ...missingSegments.reverse());
|
|
369625
369688
|
} catch (error40) {
|
|
369626
369689
|
if (!isNodeError(error40) || error40.code !== "ENOENT" && error40.code !== "ENOTDIR") {
|
|
@@ -369842,7 +369905,7 @@ async function listInboxPatchFiles(config2, kind) {
|
|
|
369842
369905
|
async function walk(currentDir) {
|
|
369843
369906
|
let dirEntries;
|
|
369844
369907
|
try {
|
|
369845
|
-
dirEntries = await
|
|
369908
|
+
dirEntries = await fs79.readdir(currentDir, { withFileTypes: true });
|
|
369846
369909
|
} catch {
|
|
369847
369910
|
return;
|
|
369848
369911
|
}
|
|
@@ -369863,7 +369926,7 @@ async function listInboxPatchFiles(config2, kind) {
|
|
|
369863
369926
|
async function validateInboxMemoryPatchFile(config2, kind, sourcePath) {
|
|
369864
369927
|
let content;
|
|
369865
369928
|
try {
|
|
369866
|
-
content = await
|
|
369929
|
+
content = await fs79.readFile(sourcePath, "utf-8");
|
|
369867
369930
|
} catch (error40) {
|
|
369868
369931
|
return {
|
|
369869
369932
|
valid: false,
|
|
@@ -369951,7 +370014,7 @@ async function applyParsedPatchesWithAllowedRoots(parsedPatches, allowedRoots, o
|
|
|
369951
370014
|
source = patchedContentByTarget.get(resolvedTargetPath);
|
|
369952
370015
|
} else if (isNewFile) {
|
|
369953
370016
|
try {
|
|
369954
|
-
await
|
|
370017
|
+
await fs79.lstat(resolvedTargetPath);
|
|
369955
370018
|
return {
|
|
369956
370019
|
success: false,
|
|
369957
370020
|
reason: "newFileAlreadyExists",
|
|
@@ -369972,7 +370035,7 @@ async function applyParsedPatchesWithAllowedRoots(parsedPatches, allowedRoots, o
|
|
|
369972
370035
|
originalContentByTarget.set(resolvedTargetPath, source);
|
|
369973
370036
|
} else {
|
|
369974
370037
|
try {
|
|
369975
|
-
source = await
|
|
370038
|
+
source = await fs79.readFile(resolvedTargetPath, "utf-8");
|
|
369976
370039
|
originalContentByTarget.set(resolvedTargetPath, source);
|
|
369977
370040
|
} catch {
|
|
369978
370041
|
return {
|
|
@@ -370020,7 +370083,7 @@ async function resolveTargetWithinAllowedRoots(targetPath, allowedRoots) {
|
|
|
370020
370083
|
}
|
|
370021
370084
|
|
|
370022
370085
|
// packages/core/dist/src/services/memoryService.js
|
|
370023
|
-
import * as
|
|
370086
|
+
import * as fs80 from "node:fs/promises";
|
|
370024
370087
|
import * as path92 from "node:path";
|
|
370025
370088
|
import { constants as fsConstants2 } from "node:fs";
|
|
370026
370089
|
import { randomUUID as randomUUID20 } from "node:crypto";
|
|
@@ -370750,7 +370813,7 @@ async function tryAcquireLock(lockPath, retries = 1) {
|
|
|
370750
370813
|
startedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
370751
370814
|
};
|
|
370752
370815
|
try {
|
|
370753
|
-
const fd = await
|
|
370816
|
+
const fd = await fs80.open(lockPath, fsConstants2.O_CREAT | fsConstants2.O_EXCL | fsConstants2.O_WRONLY);
|
|
370754
370817
|
try {
|
|
370755
370818
|
await fd.writeFile(JSON.stringify(lockInfo));
|
|
370756
370819
|
} finally {
|
|
@@ -370772,7 +370835,7 @@ async function tryAcquireLock(lockPath, retries = 1) {
|
|
|
370772
370835
|
}
|
|
370773
370836
|
async function isLockStale(lockPath) {
|
|
370774
370837
|
try {
|
|
370775
|
-
const content = await
|
|
370838
|
+
const content = await fs80.readFile(lockPath, "utf-8");
|
|
370776
370839
|
const parsed = JSON.parse(content);
|
|
370777
370840
|
if (!isLockInfo(parsed)) {
|
|
370778
370841
|
return true;
|
|
@@ -370794,7 +370857,7 @@ async function isLockStale(lockPath) {
|
|
|
370794
370857
|
}
|
|
370795
370858
|
async function releaseLock(lockPath) {
|
|
370796
370859
|
try {
|
|
370797
|
-
await
|
|
370860
|
+
await fs80.unlink(lockPath);
|
|
370798
370861
|
} catch (error40) {
|
|
370799
370862
|
if (isNodeError(error40) && error40.code === "ENOENT") {
|
|
370800
370863
|
return;
|
|
@@ -370804,7 +370867,7 @@ async function releaseLock(lockPath) {
|
|
|
370804
370867
|
}
|
|
370805
370868
|
async function readExtractionState(statePath) {
|
|
370806
370869
|
try {
|
|
370807
|
-
const content = await
|
|
370870
|
+
const content = await fs80.readFile(statePath, "utf-8");
|
|
370808
370871
|
const parsed = JSON.parse(content);
|
|
370809
370872
|
if (!isExtractionState(parsed)) {
|
|
370810
370873
|
return { runs: [] };
|
|
@@ -370824,8 +370887,8 @@ async function readExtractionState(statePath) {
|
|
|
370824
370887
|
}
|
|
370825
370888
|
async function writeExtractionState(statePath, state) {
|
|
370826
370889
|
const tmpPath = `${statePath}.tmp`;
|
|
370827
|
-
await
|
|
370828
|
-
await
|
|
370890
|
+
await fs80.writeFile(tmpPath, JSON.stringify(state, null, 2));
|
|
370891
|
+
await fs80.rename(tmpPath, statePath);
|
|
370829
370892
|
}
|
|
370830
370893
|
function shouldProcessConversation(parsed) {
|
|
370831
370894
|
if (parsed.kind === "subagent")
|
|
@@ -370840,7 +370903,7 @@ function shouldProcessConversation(parsed) {
|
|
|
370840
370903
|
async function scanEligibleSessions(chatsDir) {
|
|
370841
370904
|
let allFiles;
|
|
370842
370905
|
try {
|
|
370843
|
-
allFiles = await
|
|
370906
|
+
allFiles = await fs80.readdir(chatsDir);
|
|
370844
370907
|
} catch {
|
|
370845
370908
|
return [];
|
|
370846
370909
|
}
|
|
@@ -370850,7 +370913,7 @@ async function scanEligibleSessions(chatsDir) {
|
|
|
370850
370913
|
continue;
|
|
370851
370914
|
const filePath = path92.join(chatsDir, file2);
|
|
370852
370915
|
try {
|
|
370853
|
-
const stat14 = await
|
|
370916
|
+
const stat14 = await fs80.stat(filePath);
|
|
370854
370917
|
if (!stat14.isFile())
|
|
370855
370918
|
continue;
|
|
370856
370919
|
candidates.push({ filePath, mtimeMs: stat14.mtimeMs });
|
|
@@ -370932,13 +370995,13 @@ async function buildExistingSkillsSummary(skillsDir, config2) {
|
|
|
370932
370995
|
const sections = [];
|
|
370933
370996
|
const memorySkills = [];
|
|
370934
370997
|
try {
|
|
370935
|
-
const entries = await
|
|
370998
|
+
const entries = await fs80.readdir(skillsDir, { withFileTypes: true });
|
|
370936
370999
|
for (const entry of entries) {
|
|
370937
371000
|
if (!entry.isDirectory())
|
|
370938
371001
|
continue;
|
|
370939
371002
|
const skillPath = path92.join(skillsDir, entry.name, "SKILL.md");
|
|
370940
371003
|
try {
|
|
370941
|
-
const content = await
|
|
371004
|
+
const content = await fs80.readFile(skillPath, "utf-8");
|
|
370942
371005
|
const match2 = content.match(FRONTMATTER_REGEX);
|
|
370943
371006
|
if (match2) {
|
|
370944
371007
|
const parsed = parseFrontmatter(match2[1]);
|
|
@@ -371023,7 +371086,7 @@ function buildAgentLoopContext(config2) {
|
|
|
371023
371086
|
async function validatePatches(skillsDir, config2) {
|
|
371024
371087
|
let entries;
|
|
371025
371088
|
try {
|
|
371026
|
-
entries = await
|
|
371089
|
+
entries = await fs80.readdir(skillsDir);
|
|
371027
371090
|
} catch {
|
|
371028
371091
|
return [];
|
|
371029
371092
|
}
|
|
@@ -371034,7 +371097,7 @@ async function validatePatches(skillsDir, config2) {
|
|
|
371034
371097
|
let valid = true;
|
|
371035
371098
|
let reason = "";
|
|
371036
371099
|
try {
|
|
371037
|
-
const patchContent = await
|
|
371100
|
+
const patchContent = await fs80.readFile(patchPath, "utf-8");
|
|
371038
371101
|
const parsedPatches = parsePatch(patchContent);
|
|
371039
371102
|
if (!hasParsedPatchHunks(parsedPatches)) {
|
|
371040
371103
|
valid = false;
|
|
@@ -371078,7 +371141,7 @@ async function validatePatches(skillsDir, config2) {
|
|
|
371078
371141
|
} else {
|
|
371079
371142
|
debugLogger.warn(`[MemoryService] Removing invalid patch ${patchFile}: ${reason}`);
|
|
371080
371143
|
try {
|
|
371081
|
-
await
|
|
371144
|
+
await fs80.unlink(patchPath);
|
|
371082
371145
|
} catch {
|
|
371083
371146
|
}
|
|
371084
371147
|
}
|
|
@@ -371090,7 +371153,7 @@ async function snapshotFiles(rootDir, shouldIncludeFile = () => true, shouldDesc
|
|
|
371090
371153
|
async function walk(currentDir) {
|
|
371091
371154
|
let entries;
|
|
371092
371155
|
try {
|
|
371093
|
-
entries = await
|
|
371156
|
+
entries = await fs80.readdir(currentDir, { withFileTypes: true });
|
|
371094
371157
|
} catch {
|
|
371095
371158
|
return;
|
|
371096
371159
|
}
|
|
@@ -371110,7 +371173,7 @@ async function snapshotFiles(rootDir, shouldIncludeFile = () => true, shouldDesc
|
|
|
371110
371173
|
continue;
|
|
371111
371174
|
}
|
|
371112
371175
|
try {
|
|
371113
|
-
snapshot.set(relativePath, await
|
|
371176
|
+
snapshot.set(relativePath, await fs80.readFile(absolutePath, "utf-8"));
|
|
371114
371177
|
} catch {
|
|
371115
371178
|
}
|
|
371116
371179
|
}
|
|
@@ -371134,7 +371197,7 @@ async function validateMemoryInboxPatches(config2) {
|
|
|
371134
371197
|
continue;
|
|
371135
371198
|
}
|
|
371136
371199
|
try {
|
|
371137
|
-
await
|
|
371200
|
+
await fs80.unlink(patchFile);
|
|
371138
371201
|
debugLogger.warn(`[MemoryService] Dropped invalid ${kind} memory inbox patch ${patchFile}: ${validation.reason}`);
|
|
371139
371202
|
} catch (error40) {
|
|
371140
371203
|
const message = error40 instanceof Error ? error40.message : String(error40);
|
|
@@ -371149,7 +371212,7 @@ async function buildPendingInboxSummary(memoryDir) {
|
|
|
371149
371212
|
const kindRoot = path92.join(memoryDir, ".inbox", kind);
|
|
371150
371213
|
let entries;
|
|
371151
371214
|
try {
|
|
371152
|
-
entries = await
|
|
371215
|
+
entries = await fs80.readdir(kindRoot, { withFileTypes: true });
|
|
371153
371216
|
} catch {
|
|
371154
371217
|
continue;
|
|
371155
371218
|
}
|
|
@@ -371162,7 +371225,7 @@ async function buildPendingInboxSummary(memoryDir) {
|
|
|
371162
371225
|
const fullPath = path92.join(kindRoot, fileName);
|
|
371163
371226
|
let content = "";
|
|
371164
371227
|
try {
|
|
371165
|
-
content = await
|
|
371228
|
+
content = await fs80.readFile(fullPath, "utf-8");
|
|
371166
371229
|
} catch {
|
|
371167
371230
|
continue;
|
|
371168
371231
|
}
|
|
@@ -371212,7 +371275,7 @@ async function startMemoryService(config2) {
|
|
|
371212
371275
|
const lockPath = path92.join(memoryDir, LOCK_FILENAME);
|
|
371213
371276
|
const statePath = path92.join(memoryDir, STATE_FILENAME);
|
|
371214
371277
|
const chatsDir = path92.join(config2.storage.getProjectTempDir(), "chats");
|
|
371215
|
-
await
|
|
371278
|
+
await fs80.mkdir(skillsDir, { recursive: true });
|
|
371216
371279
|
debugLogger.log(`[MemoryService] Starting. Skills dir: ${skillsDir}`);
|
|
371217
371280
|
if (!await tryAcquireLock(lockPath)) {
|
|
371218
371281
|
debugLogger.log("[MemoryService] Skipped: lock held by another instance");
|
|
@@ -371258,11 +371321,11 @@ async function startMemoryService(config2) {
|
|
|
371258
371321
|
const skillsBefore = /* @__PURE__ */ new Set();
|
|
371259
371322
|
const patchContentsBefore = /* @__PURE__ */ new Map();
|
|
371260
371323
|
try {
|
|
371261
|
-
const entries = await
|
|
371324
|
+
const entries = await fs80.readdir(skillsDir);
|
|
371262
371325
|
for (const e2 of entries) {
|
|
371263
371326
|
if (e2.endsWith(".patch")) {
|
|
371264
371327
|
try {
|
|
371265
|
-
patchContentsBefore.set(e2, await
|
|
371328
|
+
patchContentsBefore.set(e2, await fs80.readFile(path92.join(skillsDir, e2), "utf-8"));
|
|
371266
371329
|
} catch {
|
|
371267
371330
|
}
|
|
371268
371331
|
continue;
|
|
@@ -371326,7 +371389,7 @@ ${pendingInboxSummary}`);
|
|
|
371326
371389
|
const elapsed = ((Date.now() - startTime) / 1e3).toFixed(1);
|
|
371327
371390
|
const skillsCreated = [];
|
|
371328
371391
|
try {
|
|
371329
|
-
const entriesAfter = await
|
|
371392
|
+
const entriesAfter = await fs80.readdir(skillsDir);
|
|
371330
371393
|
for (const e2 of entriesAfter) {
|
|
371331
371394
|
if (!skillsBefore.has(e2) && !e2.endsWith(".patch")) {
|
|
371332
371395
|
skillsCreated.push(e2);
|
|
@@ -371340,7 +371403,7 @@ ${pendingInboxSummary}`);
|
|
|
371340
371403
|
const patchPath = path92.join(skillsDir, patchFile);
|
|
371341
371404
|
let currentContent;
|
|
371342
371405
|
try {
|
|
371343
|
-
currentContent = await
|
|
371406
|
+
currentContent = await fs80.readFile(patchPath, "utf-8");
|
|
371344
371407
|
} catch {
|
|
371345
371408
|
continue;
|
|
371346
371409
|
}
|
|
@@ -371481,7 +371544,7 @@ async function listInboxSkills(config2) {
|
|
|
371481
371544
|
const skillsDir = config2.storage.getProjectSkillsMemoryDir();
|
|
371482
371545
|
let entries;
|
|
371483
371546
|
try {
|
|
371484
|
-
entries = await
|
|
371547
|
+
entries = await fs81.readdir(skillsDir, { withFileTypes: true });
|
|
371485
371548
|
} catch {
|
|
371486
371549
|
return [];
|
|
371487
371550
|
}
|
|
@@ -371506,7 +371569,7 @@ async function listInboxSkills(config2) {
|
|
|
371506
371569
|
continue;
|
|
371507
371570
|
let content = "";
|
|
371508
371571
|
try {
|
|
371509
|
-
content = await
|
|
371572
|
+
content = await fs81.readFile(skillPath, "utf-8");
|
|
371510
371573
|
} catch {
|
|
371511
371574
|
}
|
|
371512
371575
|
skills.push({
|
|
@@ -371539,7 +371602,7 @@ async function moveInboxSkill(config2, dirName, destination) {
|
|
|
371539
371602
|
const skillsDir = config2.storage.getProjectSkillsMemoryDir();
|
|
371540
371603
|
const sourcePath = path93.join(skillsDir, dirName);
|
|
371541
371604
|
try {
|
|
371542
|
-
await
|
|
371605
|
+
await fs81.access(sourcePath);
|
|
371543
371606
|
} catch {
|
|
371544
371607
|
return {
|
|
371545
371608
|
success: false,
|
|
@@ -371550,7 +371613,7 @@ async function moveInboxSkill(config2, dirName, destination) {
|
|
|
371550
371613
|
const targetPath = path93.join(targetBase, dirName);
|
|
371551
371614
|
const skillName = await getSkillNameForConflictCheck(sourcePath, dirName);
|
|
371552
371615
|
try {
|
|
371553
|
-
await
|
|
371616
|
+
await fs81.access(targetPath);
|
|
371554
371617
|
return {
|
|
371555
371618
|
success: false,
|
|
371556
371619
|
message: `A skill named "${skillName}" already exists in ${destination} skills.`
|
|
@@ -371564,9 +371627,9 @@ async function moveInboxSkill(config2, dirName, destination) {
|
|
|
371564
371627
|
message: `A skill named "${skillName}" already exists in ${destination} skills.`
|
|
371565
371628
|
};
|
|
371566
371629
|
}
|
|
371567
|
-
await
|
|
371568
|
-
await
|
|
371569
|
-
await
|
|
371630
|
+
await fs81.mkdir(targetBase, { recursive: true });
|
|
371631
|
+
await fs81.cp(sourcePath, targetPath, { recursive: true });
|
|
371632
|
+
await fs81.rm(sourcePath, { recursive: true, force: true });
|
|
371570
371633
|
const label = destination === "global" ? "~/.gemini/skills" : ".gemini/skills";
|
|
371571
371634
|
return {
|
|
371572
371635
|
success: true,
|
|
@@ -371583,14 +371646,14 @@ async function dismissInboxSkill(config2, dirName) {
|
|
|
371583
371646
|
const skillsDir = config2.storage.getProjectSkillsMemoryDir();
|
|
371584
371647
|
const sourcePath = path93.join(skillsDir, dirName);
|
|
371585
371648
|
try {
|
|
371586
|
-
await
|
|
371649
|
+
await fs81.access(sourcePath);
|
|
371587
371650
|
} catch {
|
|
371588
371651
|
return {
|
|
371589
371652
|
success: false,
|
|
371590
371653
|
message: `Skill "${dirName}" not found in inbox.`
|
|
371591
371654
|
};
|
|
371592
371655
|
}
|
|
371593
|
-
await
|
|
371656
|
+
await fs81.rm(sourcePath, { recursive: true, force: true });
|
|
371594
371657
|
return {
|
|
371595
371658
|
success: true,
|
|
371596
371659
|
message: `Dismissed "${dirName}" from inbox.`
|
|
@@ -371617,7 +371680,7 @@ function getErrorMessage4(error40) {
|
|
|
371617
371680
|
}
|
|
371618
371681
|
async function getFileMtimeIso(filePath) {
|
|
371619
371682
|
try {
|
|
371620
|
-
const stats = await
|
|
371683
|
+
const stats = await fs81.stat(filePath);
|
|
371621
371684
|
return stats.mtime.toISOString();
|
|
371622
371685
|
} catch {
|
|
371623
371686
|
return void 0;
|
|
@@ -371633,7 +371696,7 @@ async function patchTargetsProjectSkills(targetPaths, config2) {
|
|
|
371633
371696
|
}
|
|
371634
371697
|
async function getPatchExtractedAt(patchPath) {
|
|
371635
371698
|
try {
|
|
371636
|
-
const stats = await
|
|
371699
|
+
const stats = await fs81.stat(patchPath);
|
|
371637
371700
|
return stats.mtime.toISOString();
|
|
371638
371701
|
} catch {
|
|
371639
371702
|
return void 0;
|
|
@@ -371661,7 +371724,7 @@ async function listInboxMemoryPatches(config2) {
|
|
|
371661
371724
|
for (const sourcePath of patchFiles) {
|
|
371662
371725
|
let content;
|
|
371663
371726
|
try {
|
|
371664
|
-
content = await
|
|
371727
|
+
content = await fs81.readFile(sourcePath, "utf-8");
|
|
371665
371728
|
} catch {
|
|
371666
371729
|
continue;
|
|
371667
371730
|
}
|
|
@@ -371764,7 +371827,7 @@ async function applyAllInboxPatchesForKind(config2, kind) {
|
|
|
371764
371827
|
}
|
|
371765
371828
|
async function canonicalizeDirIfPresent(dirPath) {
|
|
371766
371829
|
try {
|
|
371767
|
-
return await
|
|
371830
|
+
return await fs81.realpath(dirPath);
|
|
371768
371831
|
} catch {
|
|
371769
371832
|
return path93.resolve(dirPath);
|
|
371770
371833
|
}
|
|
@@ -371797,7 +371860,7 @@ async function augmentWithAutoPointers(config2, appliedResults) {
|
|
|
371797
371860
|
let originalContent = "";
|
|
371798
371861
|
let isNewFile = true;
|
|
371799
371862
|
try {
|
|
371800
|
-
originalContent = await
|
|
371863
|
+
originalContent = await fs81.readFile(memoryMdPath, "utf-8");
|
|
371801
371864
|
isNewFile = false;
|
|
371802
371865
|
} catch {
|
|
371803
371866
|
}
|
|
@@ -371837,7 +371900,7 @@ ${pointer}
|
|
|
371837
371900
|
async function applyMemoryPatchFile(config2, kind, patchPath, displayName) {
|
|
371838
371901
|
let content;
|
|
371839
371902
|
try {
|
|
371840
|
-
content = await
|
|
371903
|
+
content = await fs81.readFile(patchPath, "utf-8");
|
|
371841
371904
|
} catch {
|
|
371842
371905
|
return {
|
|
371843
371906
|
success: false,
|
|
@@ -371928,7 +371991,7 @@ async function applyMemoryPatchFile(config2, kind, patchPath, displayName) {
|
|
|
371928
371991
|
const committedTargets = [];
|
|
371929
371992
|
try {
|
|
371930
371993
|
for (const stagedTarget of stagedTargets) {
|
|
371931
|
-
await
|
|
371994
|
+
await fs81.rename(stagedTarget.tempPath, stagedTarget.targetPath);
|
|
371932
371995
|
committedTargets.push(stagedTarget);
|
|
371933
371996
|
}
|
|
371934
371997
|
} catch (error40) {
|
|
@@ -371944,7 +372007,7 @@ async function applyMemoryPatchFile(config2, kind, patchPath, displayName) {
|
|
|
371944
372007
|
message: `Memory patch "${displayName}" could not be applied atomically: ${getErrorMessage4(error40)}.`
|
|
371945
372008
|
};
|
|
371946
372009
|
}
|
|
371947
|
-
await
|
|
372010
|
+
await fs81.unlink(patchPath);
|
|
371948
372011
|
const fileCount = resultsToCommit.length;
|
|
371949
372012
|
const baseMessage = `Applied memory patch to ${fileCount} file${fileCount !== 1 ? "s" : ""}.`;
|
|
371950
372013
|
const pointerNote = pointersAdded.length > 0 ? ` Auto-added MEMORY.md pointer for ${pointersAdded.map((name3) => `"${name3}"`).join(", ")} so the new sibling file is discoverable.` : "";
|
|
@@ -371965,7 +372028,7 @@ async function dismissInboxMemoryPatch(config2, kind, relativePath) {
|
|
|
371965
372028
|
let removed = 0;
|
|
371966
372029
|
for (const sourcePath2 of patchFiles) {
|
|
371967
372030
|
try {
|
|
371968
|
-
await
|
|
372031
|
+
await fs81.unlink(sourcePath2);
|
|
371969
372032
|
removed += 1;
|
|
371970
372033
|
} catch {
|
|
371971
372034
|
}
|
|
@@ -371984,14 +372047,14 @@ async function dismissInboxMemoryPatch(config2, kind, relativePath) {
|
|
|
371984
372047
|
return { success: false, message: "Invalid memory patch path." };
|
|
371985
372048
|
}
|
|
371986
372049
|
try {
|
|
371987
|
-
await
|
|
372050
|
+
await fs81.access(sourcePath);
|
|
371988
372051
|
} catch {
|
|
371989
372052
|
return {
|
|
371990
372053
|
success: false,
|
|
371991
372054
|
message: `Memory patch "${normalizedPath}" not found in inbox.`
|
|
371992
372055
|
};
|
|
371993
372056
|
}
|
|
371994
|
-
await
|
|
372057
|
+
await fs81.unlink(sourcePath);
|
|
371995
372058
|
return {
|
|
371996
372059
|
success: true,
|
|
371997
372060
|
message: `Dismissed "${normalizedPath}" from inbox.`
|
|
@@ -372001,7 +372064,7 @@ async function findNearestExistingDirectory(startPath) {
|
|
|
372001
372064
|
let currentPath = path93.resolve(startPath);
|
|
372002
372065
|
while (true) {
|
|
372003
372066
|
try {
|
|
372004
|
-
const stats = await
|
|
372067
|
+
const stats = await fs81.stat(currentPath);
|
|
372005
372068
|
if (stats.isDirectory()) {
|
|
372006
372069
|
return currentPath;
|
|
372007
372070
|
}
|
|
@@ -372015,20 +372078,20 @@ async function findNearestExistingDirectory(startPath) {
|
|
|
372015
372078
|
}
|
|
372016
372079
|
}
|
|
372017
372080
|
async function writeExclusiveFile(filePath, content, mode) {
|
|
372018
|
-
const handle2 = await
|
|
372081
|
+
const handle2 = await fs81.open(filePath, "wx");
|
|
372019
372082
|
try {
|
|
372020
372083
|
await handle2.writeFile(content, "utf-8");
|
|
372021
372084
|
} finally {
|
|
372022
372085
|
await handle2.close();
|
|
372023
372086
|
}
|
|
372024
372087
|
if (mode !== void 0) {
|
|
372025
|
-
await
|
|
372088
|
+
await fs81.chmod(filePath, mode);
|
|
372026
372089
|
}
|
|
372027
372090
|
}
|
|
372028
372091
|
async function cleanupStagedInboxPatchTargets(stagedTargets) {
|
|
372029
372092
|
await Promise.allSettled(stagedTargets.map(async ({ tempPath }) => {
|
|
372030
372093
|
try {
|
|
372031
|
-
await
|
|
372094
|
+
await fs81.unlink(tempPath);
|
|
372032
372095
|
} catch {
|
|
372033
372096
|
}
|
|
372034
372097
|
}));
|
|
@@ -372036,7 +372099,7 @@ async function cleanupStagedInboxPatchTargets(stagedTargets) {
|
|
|
372036
372099
|
async function restoreCommittedInboxPatchTarget(stagedTarget) {
|
|
372037
372100
|
if (stagedTarget.isNewFile) {
|
|
372038
372101
|
try {
|
|
372039
|
-
await
|
|
372102
|
+
await fs81.unlink(stagedTarget.targetPath);
|
|
372040
372103
|
} catch {
|
|
372041
372104
|
}
|
|
372042
372105
|
return;
|
|
@@ -372044,7 +372107,7 @@ async function restoreCommittedInboxPatchTarget(stagedTarget) {
|
|
|
372044
372107
|
const restoreDir = await findNearestExistingDirectory(path93.dirname(stagedTarget.targetPath));
|
|
372045
372108
|
const restorePath = path93.join(restoreDir, `.${path93.basename(stagedTarget.targetPath)}.${randomUUID21()}.rollback`);
|
|
372046
372109
|
await writeExclusiveFile(restorePath, stagedTarget.original, stagedTarget.mode);
|
|
372047
|
-
await
|
|
372110
|
+
await fs81.rename(restorePath, stagedTarget.targetPath);
|
|
372048
372111
|
}
|
|
372049
372112
|
async function stageInboxPatchTargets(targets) {
|
|
372050
372113
|
const stagedTargets = [];
|
|
@@ -372052,8 +372115,8 @@ async function stageInboxPatchTargets(targets) {
|
|
|
372052
372115
|
for (const target of targets) {
|
|
372053
372116
|
let mode;
|
|
372054
372117
|
if (!target.isNewFile) {
|
|
372055
|
-
await
|
|
372056
|
-
mode = (await
|
|
372118
|
+
await fs81.access(target.targetPath, fsConstants3.W_OK);
|
|
372119
|
+
mode = (await fs81.stat(target.targetPath)).mode;
|
|
372057
372120
|
}
|
|
372058
372121
|
const tempDir = await findNearestExistingDirectory(path93.dirname(target.targetPath));
|
|
372059
372122
|
const tempPath = path93.join(tempDir, `.${path93.basename(target.targetPath)}.${randomUUID21()}.patch-tmp`);
|
|
@@ -372070,7 +372133,7 @@ async function stageInboxPatchTargets(targets) {
|
|
|
372070
372133
|
if (!target.isNewFile) {
|
|
372071
372134
|
continue;
|
|
372072
372135
|
}
|
|
372073
|
-
await
|
|
372136
|
+
await fs81.mkdir(path93.dirname(target.targetPath), { recursive: true });
|
|
372074
372137
|
}
|
|
372075
372138
|
return stagedTargets;
|
|
372076
372139
|
} catch (error40) {
|
|
@@ -372082,7 +372145,7 @@ async function listInboxPatches(config2) {
|
|
|
372082
372145
|
const skillsDir = config2.storage.getProjectSkillsMemoryDir();
|
|
372083
372146
|
let entries;
|
|
372084
372147
|
try {
|
|
372085
|
-
entries = await
|
|
372148
|
+
entries = await fs81.readdir(skillsDir);
|
|
372086
372149
|
} catch {
|
|
372087
372150
|
return [];
|
|
372088
372151
|
}
|
|
@@ -372094,7 +372157,7 @@ async function listInboxPatches(config2) {
|
|
|
372094
372157
|
for (const patchFile of patchFiles) {
|
|
372095
372158
|
const patchPath = path93.join(skillsDir, patchFile);
|
|
372096
372159
|
try {
|
|
372097
|
-
const content = await
|
|
372160
|
+
const content = await fs81.readFile(patchPath, "utf-8");
|
|
372098
372161
|
const parsed = parsePatch(content);
|
|
372099
372162
|
if (!hasParsedPatchHunks(parsed))
|
|
372100
372163
|
continue;
|
|
@@ -372124,7 +372187,7 @@ async function applyInboxPatch(config2, fileName) {
|
|
|
372124
372187
|
const patchPath = path93.join(skillsDir, fileName);
|
|
372125
372188
|
let content;
|
|
372126
372189
|
try {
|
|
372127
|
-
content = await
|
|
372190
|
+
content = await fs81.readFile(patchPath, "utf-8");
|
|
372128
372191
|
} catch {
|
|
372129
372192
|
return {
|
|
372130
372193
|
success: false,
|
|
@@ -372211,7 +372274,7 @@ async function applyInboxPatch(config2, fileName) {
|
|
|
372211
372274
|
const committedTargets = [];
|
|
372212
372275
|
try {
|
|
372213
372276
|
for (const stagedTarget of stagedTargets) {
|
|
372214
|
-
await
|
|
372277
|
+
await fs81.rename(stagedTarget.tempPath, stagedTarget.targetPath);
|
|
372215
372278
|
committedTargets.push(stagedTarget);
|
|
372216
372279
|
}
|
|
372217
372280
|
} catch (error40) {
|
|
@@ -372227,7 +372290,7 @@ async function applyInboxPatch(config2, fileName) {
|
|
|
372227
372290
|
message: `Patch "${fileName}" could not be applied atomically: ${getErrorMessage4(error40)}.`
|
|
372228
372291
|
};
|
|
372229
372292
|
}
|
|
372230
|
-
await
|
|
372293
|
+
await fs81.unlink(patchPath);
|
|
372231
372294
|
const fileCount = applied.results.length;
|
|
372232
372295
|
return {
|
|
372233
372296
|
success: true,
|
|
@@ -372244,14 +372307,14 @@ async function dismissInboxPatch(config2, fileName) {
|
|
|
372244
372307
|
const skillsDir = config2.storage.getProjectSkillsMemoryDir();
|
|
372245
372308
|
const patchPath = path93.join(skillsDir, fileName);
|
|
372246
372309
|
try {
|
|
372247
|
-
await
|
|
372310
|
+
await fs81.access(patchPath);
|
|
372248
372311
|
} catch {
|
|
372249
372312
|
return {
|
|
372250
372313
|
success: false,
|
|
372251
372314
|
message: `Patch "${fileName}" not found in inbox.`
|
|
372252
372315
|
};
|
|
372253
372316
|
}
|
|
372254
|
-
await
|
|
372317
|
+
await fs81.unlink(patchPath);
|
|
372255
372318
|
return {
|
|
372256
372319
|
success: true,
|
|
372257
372320
|
message: `Dismissed "${fileName}" from inbox.`
|
|
@@ -372260,7 +372323,7 @@ async function dismissInboxPatch(config2, fileName) {
|
|
|
372260
372323
|
|
|
372261
372324
|
// packages/core/dist/src/core/logger.js
|
|
372262
372325
|
import path94 from "node:path";
|
|
372263
|
-
import { promises as
|
|
372326
|
+
import { promises as fs82 } from "node:fs";
|
|
372264
372327
|
var LOG_FILE_NAME = "logs.json";
|
|
372265
372328
|
var MessageSenderType;
|
|
372266
372329
|
(function(MessageSenderType2) {
|
|
@@ -372295,7 +372358,7 @@ var Logger = class {
|
|
|
372295
372358
|
throw new Error("Log file path not set during read attempt.");
|
|
372296
372359
|
}
|
|
372297
372360
|
try {
|
|
372298
|
-
const fileContent = await
|
|
372361
|
+
const fileContent = await fs82.readFile(this.logFilePath, "utf-8");
|
|
372299
372362
|
const parsedLogs = JSON.parse(fileContent);
|
|
372300
372363
|
if (!Array.isArray(parsedLogs)) {
|
|
372301
372364
|
debugLogger.debug(`Log file at ${this.logFilePath} is not a valid JSON array. Starting with empty logs.`);
|
|
@@ -372322,7 +372385,7 @@ var Logger = class {
|
|
|
372322
372385
|
return;
|
|
372323
372386
|
const backupPath = `${this.logFilePath}.${reason}.${Date.now()}.bak`;
|
|
372324
372387
|
try {
|
|
372325
|
-
await
|
|
372388
|
+
await fs82.rename(this.logFilePath, backupPath);
|
|
372326
372389
|
debugLogger.debug(`Backed up corrupted log file to ${backupPath}`);
|
|
372327
372390
|
} catch {
|
|
372328
372391
|
}
|
|
@@ -372335,16 +372398,16 @@ var Logger = class {
|
|
|
372335
372398
|
this.geminiDir = this.storage.getProjectTempDir();
|
|
372336
372399
|
this.logFilePath = path94.join(this.geminiDir, LOG_FILE_NAME);
|
|
372337
372400
|
try {
|
|
372338
|
-
await
|
|
372401
|
+
await fs82.mkdir(this.geminiDir, { recursive: true });
|
|
372339
372402
|
let fileExisted = true;
|
|
372340
372403
|
try {
|
|
372341
|
-
await
|
|
372404
|
+
await fs82.access(this.logFilePath);
|
|
372342
372405
|
} catch {
|
|
372343
372406
|
fileExisted = false;
|
|
372344
372407
|
}
|
|
372345
372408
|
this.logs = await this._readLogFile();
|
|
372346
372409
|
if (!fileExisted && this.logs.length === 0) {
|
|
372347
|
-
await
|
|
372410
|
+
await fs82.writeFile(this.logFilePath, "[]", "utf-8");
|
|
372348
372411
|
}
|
|
372349
372412
|
const sessionLogs = this.logs.filter((entry) => entry.sessionId === this.sessionId);
|
|
372350
372413
|
this.messageId = sessionLogs.length > 0 ? Math.max(...sessionLogs.map((entry) => entry.messageId)) + 1 : 0;
|
|
@@ -372378,7 +372441,7 @@ var Logger = class {
|
|
|
372378
372441
|
}
|
|
372379
372442
|
currentLogsOnDisk.push(entryToAppend);
|
|
372380
372443
|
try {
|
|
372381
|
-
await
|
|
372444
|
+
await fs82.writeFile(this.logFilePath, JSON.stringify(currentLogsOnDisk, null, 2), "utf-8");
|
|
372382
372445
|
this.logs = currentLogsOnDisk;
|
|
372383
372446
|
return entryToAppend;
|
|
372384
372447
|
} catch (error40) {
|
|
@@ -372429,7 +372492,7 @@ var Logger = class {
|
|
|
372429
372492
|
async _getCheckpointPath(tag) {
|
|
372430
372493
|
const newPath = this._checkpointPath(tag);
|
|
372431
372494
|
try {
|
|
372432
|
-
await
|
|
372495
|
+
await fs82.access(newPath);
|
|
372433
372496
|
return newPath;
|
|
372434
372497
|
} catch (error40) {
|
|
372435
372498
|
const nodeError = error40;
|
|
@@ -372439,7 +372502,7 @@ var Logger = class {
|
|
|
372439
372502
|
}
|
|
372440
372503
|
const oldPath = path94.join(this.geminiDir, `checkpoint-${tag}.json`);
|
|
372441
372504
|
try {
|
|
372442
|
-
await
|
|
372505
|
+
await fs82.access(oldPath);
|
|
372443
372506
|
return oldPath;
|
|
372444
372507
|
} catch (error40) {
|
|
372445
372508
|
const nodeError = error40;
|
|
@@ -372456,7 +372519,7 @@ var Logger = class {
|
|
|
372456
372519
|
}
|
|
372457
372520
|
const path113 = this._checkpointPath(tag);
|
|
372458
372521
|
try {
|
|
372459
|
-
await
|
|
372522
|
+
await fs82.writeFile(path113, JSON.stringify(checkpoint, null, 2), "utf-8");
|
|
372460
372523
|
} catch (error40) {
|
|
372461
372524
|
debugLogger.error("Error writing to checkpoint file:", error40);
|
|
372462
372525
|
}
|
|
@@ -372468,7 +372531,7 @@ var Logger = class {
|
|
|
372468
372531
|
}
|
|
372469
372532
|
const path113 = await this._getCheckpointPath(tag);
|
|
372470
372533
|
try {
|
|
372471
|
-
const fileContent = await
|
|
372534
|
+
const fileContent = await fs82.readFile(path113, "utf-8");
|
|
372472
372535
|
const parsedContent = JSON.parse(fileContent);
|
|
372473
372536
|
if (Array.isArray(parsedContent)) {
|
|
372474
372537
|
return { history: parsedContent };
|
|
@@ -372495,7 +372558,7 @@ var Logger = class {
|
|
|
372495
372558
|
let deletedSomething = false;
|
|
372496
372559
|
const newPath = this._checkpointPath(tag);
|
|
372497
372560
|
try {
|
|
372498
|
-
await
|
|
372561
|
+
await fs82.unlink(newPath);
|
|
372499
372562
|
deletedSomething = true;
|
|
372500
372563
|
} catch (error40) {
|
|
372501
372564
|
const nodeError = error40;
|
|
@@ -372507,7 +372570,7 @@ var Logger = class {
|
|
|
372507
372570
|
const oldPath = path94.join(this.geminiDir, `checkpoint-${tag}.json`);
|
|
372508
372571
|
if (newPath !== oldPath) {
|
|
372509
372572
|
try {
|
|
372510
|
-
await
|
|
372573
|
+
await fs82.unlink(oldPath);
|
|
372511
372574
|
deletedSomething = true;
|
|
372512
372575
|
} catch (error40) {
|
|
372513
372576
|
const nodeError = error40;
|
|
@@ -372526,7 +372589,7 @@ var Logger = class {
|
|
|
372526
372589
|
let filePath;
|
|
372527
372590
|
try {
|
|
372528
372591
|
filePath = await this._getCheckpointPath(tag);
|
|
372529
|
-
await
|
|
372592
|
+
await fs82.access(filePath);
|
|
372530
372593
|
return true;
|
|
372531
372594
|
} catch (error40) {
|
|
372532
372595
|
const nodeError = error40;
|
|
@@ -372676,7 +372739,7 @@ var ExitCodes2 = {
|
|
|
372676
372739
|
|
|
372677
372740
|
// packages/core/dist/src/utils/atCommandUtils.js
|
|
372678
372741
|
import * as path95 from "node:path";
|
|
372679
|
-
import * as
|
|
372742
|
+
import * as fs83 from "node:fs/promises";
|
|
372680
372743
|
async function resolveAtCommandPath(pathName, config2, onDebugMessage = () => {
|
|
372681
372744
|
}) {
|
|
372682
372745
|
const pathValidation = validatePath(pathName);
|
|
@@ -372701,7 +372764,7 @@ async function resolveAtCommandPath(pathName, config2, onDebugMessage = () => {
|
|
|
372701
372764
|
};
|
|
372702
372765
|
}
|
|
372703
372766
|
try {
|
|
372704
|
-
const stats = await
|
|
372767
|
+
const stats = await fs83.stat(pathName);
|
|
372705
372768
|
let relativePath = pathName;
|
|
372706
372769
|
for (const dir of workspaceDirs) {
|
|
372707
372770
|
const rel = path95.relative(dir, pathName);
|
|
@@ -372736,7 +372799,7 @@ async function resolveAtCommandPath(pathName, config2, onDebugMessage = () => {
|
|
|
372736
372799
|
continue;
|
|
372737
372800
|
}
|
|
372738
372801
|
try {
|
|
372739
|
-
const stats = await
|
|
372802
|
+
const stats = await fs83.stat(absolutePath);
|
|
372740
372803
|
return {
|
|
372741
372804
|
status: "resolved",
|
|
372742
372805
|
resolved: {
|
|
@@ -372880,7 +372943,7 @@ import path98 from "node:path";
|
|
|
372880
372943
|
// packages/core/dist/src/utils/filesearch/ignore.js
|
|
372881
372944
|
var import_ignore5 = __toESM(require_ignore(), 1);
|
|
372882
372945
|
var import_picomatch = __toESM(require_picomatch2(), 1);
|
|
372883
|
-
import
|
|
372946
|
+
import fs84 from "node:fs";
|
|
372884
372947
|
var ignore3 = import_ignore5.default.default ?? import_ignore5.default;
|
|
372885
372948
|
var hasFileExtension = (0, import_picomatch.default)("**/*[*.]*");
|
|
372886
372949
|
function loadIgnoreRules(service, ignoreDirs = []) {
|
|
@@ -372888,7 +372951,7 @@ function loadIgnoreRules(service, ignoreDirs = []) {
|
|
|
372888
372951
|
const ignoreFiles = service.getAllIgnoreFilePaths();
|
|
372889
372952
|
for (const filePath of ignoreFiles) {
|
|
372890
372953
|
try {
|
|
372891
|
-
ignorer.add(
|
|
372954
|
+
ignorer.add(fs84.readFileSync(filePath, "utf8"));
|
|
372892
372955
|
} catch {
|
|
372893
372956
|
}
|
|
372894
372957
|
}
|
|
@@ -376226,7 +376289,7 @@ function convertToRestPayload(req) {
|
|
|
376226
376289
|
|
|
376227
376290
|
// packages/core/dist/src/services/FolderTrustDiscoveryService.js
|
|
376228
376291
|
var import_strip_json_comments = __toESM(require_strip_json_comments(), 1);
|
|
376229
|
-
import * as
|
|
376292
|
+
import * as fs85 from "node:fs/promises";
|
|
376230
376293
|
import * as path99 from "node:path";
|
|
376231
376294
|
var FolderTrustDiscoveryService = class {
|
|
376232
376295
|
/**
|
|
@@ -376261,7 +376324,7 @@ var FolderTrustDiscoveryService = class {
|
|
|
376261
376324
|
const commandsDir = path99.join(geminiDir, "commands");
|
|
376262
376325
|
if (await this.exists(commandsDir)) {
|
|
376263
376326
|
try {
|
|
376264
|
-
const files = await
|
|
376327
|
+
const files = await fs85.readdir(commandsDir, { recursive: true });
|
|
376265
376328
|
results.commands = files.filter((f) => f.endsWith(".toml")).map((f) => path99.basename(f, ".toml"));
|
|
376266
376329
|
} catch (e2) {
|
|
376267
376330
|
results.discoveryErrors.push(`Failed to discover commands: ${e2 instanceof Error ? e2.message : String(e2)}`);
|
|
@@ -376272,7 +376335,7 @@ var FolderTrustDiscoveryService = class {
|
|
|
376272
376335
|
const skillsDir = path99.join(geminiDir, "skills");
|
|
376273
376336
|
if (await this.exists(skillsDir)) {
|
|
376274
376337
|
try {
|
|
376275
|
-
const entries = await
|
|
376338
|
+
const entries = await fs85.readdir(skillsDir, { withFileTypes: true });
|
|
376276
376339
|
for (const entry of entries) {
|
|
376277
376340
|
if (entry.isDirectory()) {
|
|
376278
376341
|
const skillMdPath = path99.join(skillsDir, entry.name, "SKILL.md");
|
|
@@ -376290,7 +376353,7 @@ var FolderTrustDiscoveryService = class {
|
|
|
376290
376353
|
const agentsDir = path99.join(geminiDir, "agents");
|
|
376291
376354
|
if (await this.exists(agentsDir)) {
|
|
376292
376355
|
try {
|
|
376293
|
-
const entries = await
|
|
376356
|
+
const entries = await fs85.readdir(agentsDir, { withFileTypes: true });
|
|
376294
376357
|
for (const entry of entries) {
|
|
376295
376358
|
if (entry.isFile() && entry.name.endsWith(".md") && !entry.name.startsWith("_")) {
|
|
376296
376359
|
results.agents.push(path99.basename(entry.name, ".md"));
|
|
@@ -376309,7 +376372,7 @@ var FolderTrustDiscoveryService = class {
|
|
|
376309
376372
|
if (!await this.exists(settingsPath))
|
|
376310
376373
|
return;
|
|
376311
376374
|
try {
|
|
376312
|
-
const content = await
|
|
376375
|
+
const content = await fs85.readFile(settingsPath, "utf-8");
|
|
376313
376376
|
const settings = JSON.parse((0, import_strip_json_comments.default)(content));
|
|
376314
376377
|
if (!this.isRecord(settings)) {
|
|
376315
376378
|
debugLogger.debug("Settings must be a JSON object");
|
|
@@ -376370,7 +376433,7 @@ var FolderTrustDiscoveryService = class {
|
|
|
376370
376433
|
}
|
|
376371
376434
|
static async exists(filePath) {
|
|
376372
376435
|
try {
|
|
376373
|
-
await
|
|
376436
|
+
await fs85.stat(filePath);
|
|
376374
376437
|
return true;
|
|
376375
376438
|
} catch (e2) {
|
|
376376
376439
|
if (isNodeError(e2) && e2.code === "ENOENT") {
|
|
@@ -376481,7 +376544,7 @@ var SessionSummaryService = class {
|
|
|
376481
376544
|
};
|
|
376482
376545
|
|
|
376483
376546
|
// packages/core/dist/src/services/sessionSummaryUtils.js
|
|
376484
|
-
import
|
|
376547
|
+
import fs86 from "node:fs/promises";
|
|
376485
376548
|
import path100 from "node:path";
|
|
376486
376549
|
var MIN_MESSAGES_FOR_SUMMARY = 1;
|
|
376487
376550
|
var MAX_SCRATCHPAD_TOOLS = 6;
|
|
@@ -376495,14 +376558,14 @@ function isSupportedSessionFile2(fileName) {
|
|
|
376495
376558
|
return fileName.startsWith(SESSION_FILE_PREFIX) && (fileName.endsWith(".json") || fileName.endsWith(".jsonl"));
|
|
376496
376559
|
}
|
|
376497
376560
|
async function listSessionFileCandidates(chatsDir) {
|
|
376498
|
-
const allFiles = await
|
|
376561
|
+
const allFiles = await fs86.readdir(chatsDir);
|
|
376499
376562
|
const candidates = [];
|
|
376500
376563
|
for (const fileName of allFiles) {
|
|
376501
376564
|
if (!isSupportedSessionFile2(fileName))
|
|
376502
376565
|
continue;
|
|
376503
376566
|
const filePath = path100.join(chatsDir, fileName);
|
|
376504
376567
|
try {
|
|
376505
|
-
const stat14 = await
|
|
376568
|
+
const stat14 = await fs86.stat(filePath);
|
|
376506
376569
|
if (!stat14.isFile())
|
|
376507
376570
|
continue;
|
|
376508
376571
|
candidates.push({ filePath, mtimeMs: stat14.mtimeMs });
|
|
@@ -376737,11 +376800,11 @@ async function generateAndSaveSummary(config2, sessionPath) {
|
|
|
376737
376800
|
return;
|
|
376738
376801
|
}
|
|
376739
376802
|
if (isJsonl) {
|
|
376740
|
-
await
|
|
376803
|
+
await fs86.appendFile(sessionPath, `${JSON.stringify({ $set: metadataUpdate })}
|
|
376741
376804
|
`);
|
|
376742
376805
|
} else {
|
|
376743
376806
|
const lastUpdated = freshConversation.lastUpdated;
|
|
376744
|
-
await
|
|
376807
|
+
await fs86.writeFile(sessionPath, JSON.stringify({
|
|
376745
376808
|
...freshConversation,
|
|
376746
376809
|
...metadataUpdate,
|
|
376747
376810
|
lastUpdated
|
|
@@ -376753,7 +376816,7 @@ async function getPreviousSession(config2) {
|
|
|
376753
376816
|
try {
|
|
376754
376817
|
const chatsDir = path100.join(config2.storage.getProjectTempDir(), "chats");
|
|
376755
376818
|
try {
|
|
376756
|
-
await
|
|
376819
|
+
await fs86.access(chatsDir);
|
|
376757
376820
|
} catch {
|
|
376758
376821
|
debugLogger.debug("[SessionSummary] No chats directory found");
|
|
376759
376822
|
return null;
|
|
@@ -376816,7 +376879,7 @@ async function generateSummary(config2) {
|
|
|
376816
376879
|
import * as child_process from "node:child_process";
|
|
376817
376880
|
import * as process16 from "node:process";
|
|
376818
376881
|
import * as path101 from "node:path";
|
|
376819
|
-
import * as
|
|
376882
|
+
import * as fs87 from "node:fs";
|
|
376820
376883
|
async function findCommand(command, platform12 = process16.platform) {
|
|
376821
376884
|
try {
|
|
376822
376885
|
if (platform12 === "win32") {
|
|
@@ -376873,7 +376936,7 @@ async function findCommand(command, platform12 = process16.platform) {
|
|
|
376873
376936
|
}
|
|
376874
376937
|
}
|
|
376875
376938
|
for (const location of locations) {
|
|
376876
|
-
if (
|
|
376939
|
+
if (fs87.existsSync(location)) {
|
|
376877
376940
|
return location;
|
|
376878
376941
|
}
|
|
376879
376942
|
}
|
|
@@ -378150,8 +378213,8 @@ function getCompatibilityWarnings(options) {
|
|
|
378150
378213
|
|
|
378151
378214
|
// packages/core/dist/src/services/worktreeService.js
|
|
378152
378215
|
import * as path108 from "node:path";
|
|
378153
|
-
import * as
|
|
378154
|
-
import { realpathSync as
|
|
378216
|
+
import * as fs88 from "node:fs/promises";
|
|
378217
|
+
import { realpathSync as realpathSync5 } from "node:fs";
|
|
378155
378218
|
|
|
378156
378219
|
// node_modules/is-plain-obj/index.js
|
|
378157
378220
|
function isPlainObject3(value) {
|
|
@@ -385015,8 +385078,8 @@ async function createWorktree(projectRoot, name3) {
|
|
|
385015
385078
|
}
|
|
385016
385079
|
function isGeminiWorktree(dirPath, projectRoot) {
|
|
385017
385080
|
try {
|
|
385018
|
-
const realDirPath =
|
|
385019
|
-
const realProjectRoot =
|
|
385081
|
+
const realDirPath = realpathSync5(dirPath);
|
|
385082
|
+
const realProjectRoot = realpathSync5(projectRoot);
|
|
385020
385083
|
const worktreesBaseDir = path108.join(realProjectRoot, ".gemini", "worktrees");
|
|
385021
385084
|
const relative12 = path108.relative(worktreesBaseDir, realDirPath);
|
|
385022
385085
|
return !relative12.startsWith("..") && !path108.isAbsolute(relative12);
|
|
@@ -385048,7 +385111,7 @@ async function hasWorktreeChanges(dirPath, baseSha) {
|
|
|
385048
385111
|
}
|
|
385049
385112
|
async function cleanupWorktree(dirPath, projectRoot) {
|
|
385050
385113
|
try {
|
|
385051
|
-
await
|
|
385114
|
+
await fs88.access(dirPath);
|
|
385052
385115
|
} catch {
|
|
385053
385116
|
return;
|
|
385054
385117
|
}
|
|
@@ -385170,7 +385233,7 @@ var generalistProfile2 = {
|
|
|
385170
385233
|
// packages/core/dist/src/utils/trust.js
|
|
385171
385234
|
var import_proper_lockfile2 = __toESM(require_proper_lockfile(), 1);
|
|
385172
385235
|
var import_strip_json_comments2 = __toESM(require_strip_json_comments(), 1);
|
|
385173
|
-
import * as
|
|
385236
|
+
import * as fs89 from "node:fs";
|
|
385174
385237
|
import * as path109 from "node:path";
|
|
385175
385238
|
import * as crypto23 from "node:crypto";
|
|
385176
385239
|
var TrustLevel;
|
|
@@ -385221,7 +385284,7 @@ function getRealPath2(location) {
|
|
|
385221
385284
|
return realPath;
|
|
385222
385285
|
}
|
|
385223
385286
|
try {
|
|
385224
|
-
realPath =
|
|
385287
|
+
realPath = fs89.existsSync(location) ? fs89.realpathSync(location) : location;
|
|
385225
385288
|
} catch {
|
|
385226
385289
|
realPath = location;
|
|
385227
385290
|
}
|
|
@@ -385280,11 +385343,11 @@ ${errorMessages.join("\n")}
|
|
|
385280
385343
|
Please fix the file manually before trying to update it.`);
|
|
385281
385344
|
}
|
|
385282
385345
|
const dirPath = path109.dirname(this.user.path);
|
|
385283
|
-
if (!
|
|
385284
|
-
await
|
|
385346
|
+
if (!fs89.existsSync(dirPath)) {
|
|
385347
|
+
await fs89.promises.mkdir(dirPath, { recursive: true });
|
|
385285
385348
|
}
|
|
385286
|
-
if (!
|
|
385287
|
-
await
|
|
385349
|
+
if (!fs89.existsSync(this.user.path)) {
|
|
385350
|
+
await fs89.promises.writeFile(this.user.path, JSON.stringify({}, null, 2), {
|
|
385288
385351
|
// Restrict file access to read/write for the owner only
|
|
385289
385352
|
mode: 384
|
|
385290
385353
|
});
|
|
@@ -385298,7 +385361,7 @@ Please fix the file manually before trying to update it.`);
|
|
|
385298
385361
|
const normalizedPath = normalizePath(folderPath);
|
|
385299
385362
|
const originalTrustLevel = this.user.config[normalizedPath];
|
|
385300
385363
|
try {
|
|
385301
|
-
const content = await
|
|
385364
|
+
const content = await fs89.promises.readFile(this.user.path, "utf-8");
|
|
385302
385365
|
const config2 = {};
|
|
385303
385366
|
try {
|
|
385304
385367
|
const parsed = parseTrustedFoldersJson(content);
|
|
@@ -385342,8 +385405,8 @@ function loadTrustedFolders() {
|
|
|
385342
385405
|
const userConfig = {};
|
|
385343
385406
|
const userPath = Storage.getTrustedFoldersPath();
|
|
385344
385407
|
try {
|
|
385345
|
-
if (
|
|
385346
|
-
const content =
|
|
385408
|
+
if (fs89.existsSync(userPath)) {
|
|
385409
|
+
const content = fs89.readFileSync(userPath, "utf-8");
|
|
385347
385410
|
const parsed = parseTrustedFoldersJson(content);
|
|
385348
385411
|
if (!isRecord2(parsed)) {
|
|
385349
385412
|
errors.push({
|
|
@@ -385376,22 +385439,22 @@ function loadTrustedFolders() {
|
|
|
385376
385439
|
}
|
|
385377
385440
|
function saveTrustedFolders(trustedFoldersFile) {
|
|
385378
385441
|
const dirPath = path109.dirname(trustedFoldersFile.path);
|
|
385379
|
-
if (!
|
|
385380
|
-
|
|
385442
|
+
if (!fs89.existsSync(dirPath)) {
|
|
385443
|
+
fs89.mkdirSync(dirPath, { recursive: true });
|
|
385381
385444
|
}
|
|
385382
385445
|
const content = JSON.stringify(trustedFoldersFile.config, null, 2);
|
|
385383
385446
|
const tempPath = `${trustedFoldersFile.path}.tmp.${crypto23.randomUUID()}`;
|
|
385384
385447
|
try {
|
|
385385
|
-
|
|
385448
|
+
fs89.writeFileSync(tempPath, content, {
|
|
385386
385449
|
encoding: "utf-8",
|
|
385387
385450
|
// Restrict file access to read/write for the owner only
|
|
385388
385451
|
mode: 384
|
|
385389
385452
|
});
|
|
385390
|
-
|
|
385453
|
+
fs89.renameSync(tempPath, trustedFoldersFile.path);
|
|
385391
385454
|
} catch (error40) {
|
|
385392
|
-
if (
|
|
385455
|
+
if (fs89.existsSync(tempPath)) {
|
|
385393
385456
|
try {
|
|
385394
|
-
|
|
385457
|
+
fs89.unlinkSync(tempPath);
|
|
385395
385458
|
} catch {
|
|
385396
385459
|
}
|
|
385397
385460
|
}
|
|
@@ -385721,14 +385784,14 @@ var WhisperTranscriptionProvider = class _WhisperTranscriptionProvider extends E
|
|
|
385721
385784
|
|
|
385722
385785
|
// packages/core/dist/src/voice/transcriptionFactory.js
|
|
385723
385786
|
import * as path110 from "node:path";
|
|
385724
|
-
import * as
|
|
385787
|
+
import * as fs90 from "node:fs";
|
|
385725
385788
|
var TranscriptionFactory = class {
|
|
385726
385789
|
static createProvider(voiceConfig, apiKey) {
|
|
385727
385790
|
const backend = voiceConfig?.backend ?? "gemini-live";
|
|
385728
385791
|
if (backend === "whisper") {
|
|
385729
385792
|
const modelsDir = path110.join(homedir(), GEMINI_DIR, "whisper_models");
|
|
385730
|
-
if (!
|
|
385731
|
-
|
|
385793
|
+
if (!fs90.existsSync(modelsDir)) {
|
|
385794
|
+
fs90.mkdirSync(modelsDir, { recursive: true });
|
|
385732
385795
|
}
|
|
385733
385796
|
const modelName = voiceConfig?.whisperModel ?? "ggml-base.en.bin";
|
|
385734
385797
|
const modelPath = path110.join(modelsDir, modelName);
|
|
@@ -385745,7 +385808,7 @@ var TranscriptionFactory = class {
|
|
|
385745
385808
|
|
|
385746
385809
|
// packages/core/dist/src/voice/whisperModelManager.js
|
|
385747
385810
|
import * as path111 from "node:path";
|
|
385748
|
-
import * as
|
|
385811
|
+
import * as fs91 from "node:fs";
|
|
385749
385812
|
import { EventEmitter as EventEmitter14 } from "node:events";
|
|
385750
385813
|
var ALLOWED_MODELS = [
|
|
385751
385814
|
"ggml-tiny.en.bin",
|
|
@@ -385761,7 +385824,7 @@ var WhisperModelManager = class extends EventEmitter14 {
|
|
|
385761
385824
|
}
|
|
385762
385825
|
isModelInstalled(modelName) {
|
|
385763
385826
|
this.validateModelName(modelName);
|
|
385764
|
-
return
|
|
385827
|
+
return fs91.existsSync(path111.join(this.modelsDir, modelName));
|
|
385765
385828
|
}
|
|
385766
385829
|
getModelPath(modelName) {
|
|
385767
385830
|
this.validateModelName(modelName);
|
|
@@ -385769,8 +385832,8 @@ var WhisperModelManager = class extends EventEmitter14 {
|
|
|
385769
385832
|
}
|
|
385770
385833
|
async downloadModel(modelName) {
|
|
385771
385834
|
this.validateModelName(modelName);
|
|
385772
|
-
if (!
|
|
385773
|
-
|
|
385835
|
+
if (!fs91.existsSync(this.modelsDir)) {
|
|
385836
|
+
fs91.mkdirSync(this.modelsDir, { recursive: true });
|
|
385774
385837
|
}
|
|
385775
385838
|
const destination = path111.join(this.modelsDir, modelName);
|
|
385776
385839
|
const url3 = `https://huggingface.co/ggerganov/whisper.cpp/resolve/main/${modelName}`;
|
|
@@ -385785,7 +385848,7 @@ var WhisperModelManager = class extends EventEmitter14 {
|
|
|
385785
385848
|
if (!reader) {
|
|
385786
385849
|
throw new Error("Response body is not readable");
|
|
385787
385850
|
}
|
|
385788
|
-
const writer =
|
|
385851
|
+
const writer = fs91.createWriteStream(destination);
|
|
385789
385852
|
try {
|
|
385790
385853
|
while (true) {
|
|
385791
385854
|
const { done, value } = await reader.read();
|
|
@@ -385847,7 +385910,7 @@ function makeFakeConfig(config2 = {
|
|
|
385847
385910
|
}
|
|
385848
385911
|
|
|
385849
385912
|
// packages/core/dist/src/utils/pathReader.js
|
|
385850
|
-
import { promises as
|
|
385913
|
+
import { promises as fs92 } from "node:fs";
|
|
385851
385914
|
import path112 from "node:path";
|
|
385852
385915
|
async function readPathFromWorkspace(pathStr, config2) {
|
|
385853
385916
|
const workspace = config2.getWorkspaceContext();
|
|
@@ -385866,7 +385929,7 @@ async function readPathFromWorkspace(pathStr, config2) {
|
|
|
385866
385929
|
continue;
|
|
385867
385930
|
}
|
|
385868
385931
|
try {
|
|
385869
|
-
await
|
|
385932
|
+
await fs92.access(potentialPath);
|
|
385870
385933
|
absolutePath = potentialPath;
|
|
385871
385934
|
break;
|
|
385872
385935
|
} catch {
|
|
@@ -385876,7 +385939,7 @@ async function readPathFromWorkspace(pathStr, config2) {
|
|
|
385876
385939
|
if (!absolutePath) {
|
|
385877
385940
|
throw new Error(`Path not found in workspace: ${pathStr}`);
|
|
385878
385941
|
}
|
|
385879
|
-
const stats = await
|
|
385942
|
+
const stats = await fs92.stat(absolutePath);
|
|
385880
385943
|
if (stats.isDirectory()) {
|
|
385881
385944
|
const allParts = [];
|
|
385882
385945
|
allParts.push({
|