@google/gemini-cli 0.33.0-preview.5 → 0.33.0-preview.6
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/gemini.js
CHANGED
|
@@ -43923,7 +43923,7 @@ var require_has_flag = __commonJS({
|
|
|
43923
43923
|
var require_supports_color = __commonJS({
|
|
43924
43924
|
"node_modules/supports-color/index.js"(exports2, module2) {
|
|
43925
43925
|
"use strict";
|
|
43926
|
-
var
|
|
43926
|
+
var os39 = __require("os");
|
|
43927
43927
|
var hasFlag2 = require_has_flag();
|
|
43928
43928
|
var env6 = process.env;
|
|
43929
43929
|
var forceColor;
|
|
@@ -43961,7 +43961,7 @@ var require_supports_color = __commonJS({
|
|
|
43961
43961
|
}
|
|
43962
43962
|
const min = forceColor ? 1 : 0;
|
|
43963
43963
|
if (process.platform === "win32") {
|
|
43964
|
-
const osRelease =
|
|
43964
|
+
const osRelease = os39.release().split(".");
|
|
43965
43965
|
if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
43966
43966
|
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
43967
43967
|
}
|
|
@@ -54665,7 +54665,7 @@ var require_util2 = __commonJS({
|
|
|
54665
54665
|
exports2.isValidFile = isValidFile;
|
|
54666
54666
|
exports2.getWellKnownCertificateConfigFileLocation = getWellKnownCertificateConfigFileLocation;
|
|
54667
54667
|
var fs131 = __require("fs");
|
|
54668
|
-
var
|
|
54668
|
+
var os39 = __require("os");
|
|
54669
54669
|
var path152 = __require("path");
|
|
54670
54670
|
var WELL_KNOWN_CERTIFICATE_CONFIG_FILE = "certificate_config.json";
|
|
54671
54671
|
var CLOUDSDK_CONFIG_DIRECTORY = "gcloud";
|
|
@@ -54763,7 +54763,7 @@ var require_util2 = __commonJS({
|
|
|
54763
54763
|
return path152.join(configDir, WELL_KNOWN_CERTIFICATE_CONFIG_FILE);
|
|
54764
54764
|
}
|
|
54765
54765
|
function _isWindows() {
|
|
54766
|
-
return
|
|
54766
|
+
return os39.platform().startsWith("win");
|
|
54767
54767
|
}
|
|
54768
54768
|
}
|
|
54769
54769
|
});
|
|
@@ -60078,7 +60078,7 @@ var require_googleauth = __commonJS({
|
|
|
60078
60078
|
var fs131 = __require("fs");
|
|
60079
60079
|
var gaxios_1 = require_src2();
|
|
60080
60080
|
var gcpMetadata = require_src4();
|
|
60081
|
-
var
|
|
60081
|
+
var os39 = __require("os");
|
|
60082
60082
|
var path152 = __require("path");
|
|
60083
60083
|
var crypto_1 = require_crypto3();
|
|
60084
60084
|
var computeclient_1 = require_computeclient();
|
|
@@ -60581,7 +60581,7 @@ var require_googleauth = __commonJS({
|
|
|
60581
60581
|
* @api private
|
|
60582
60582
|
*/
|
|
60583
60583
|
_isWindows() {
|
|
60584
|
-
const sys =
|
|
60584
|
+
const sys = os39.platform();
|
|
60585
60585
|
if (sys && sys.length >= 3) {
|
|
60586
60586
|
if (sys.substring(0, 3).toLowerCase() === "win") {
|
|
60587
60587
|
return true;
|
|
@@ -76458,24 +76458,24 @@ var init_node = __esm({
|
|
|
76458
76458
|
return `other:${arch5}`;
|
|
76459
76459
|
return "unknown";
|
|
76460
76460
|
};
|
|
76461
|
-
normalizePlatform = (
|
|
76462
|
-
|
|
76463
|
-
if (
|
|
76461
|
+
normalizePlatform = (platform21) => {
|
|
76462
|
+
platform21 = platform21.toLowerCase();
|
|
76463
|
+
if (platform21.includes("ios"))
|
|
76464
76464
|
return "iOS";
|
|
76465
|
-
if (
|
|
76465
|
+
if (platform21 === "android")
|
|
76466
76466
|
return "Android";
|
|
76467
|
-
if (
|
|
76467
|
+
if (platform21 === "darwin")
|
|
76468
76468
|
return "MacOS";
|
|
76469
|
-
if (
|
|
76469
|
+
if (platform21 === "win32")
|
|
76470
76470
|
return "Windows";
|
|
76471
|
-
if (
|
|
76471
|
+
if (platform21 === "freebsd")
|
|
76472
76472
|
return "FreeBSD";
|
|
76473
|
-
if (
|
|
76473
|
+
if (platform21 === "openbsd")
|
|
76474
76474
|
return "OpenBSD";
|
|
76475
|
-
if (
|
|
76475
|
+
if (platform21 === "linux")
|
|
76476
76476
|
return "Linux";
|
|
76477
|
-
if (
|
|
76478
|
-
return `Other:${
|
|
76477
|
+
if (platform21)
|
|
76478
|
+
return `Other:${platform21}`;
|
|
76479
76479
|
return "Unknown";
|
|
76480
76480
|
};
|
|
76481
76481
|
getPlatformHeaders = () => {
|
|
@@ -81756,7 +81756,7 @@ var require_util4 = __commonJS({
|
|
|
81756
81756
|
exports2.isValidFile = isValidFile;
|
|
81757
81757
|
exports2.getWellKnownCertificateConfigFileLocation = getWellKnownCertificateConfigFileLocation;
|
|
81758
81758
|
var fs131 = __require("fs");
|
|
81759
|
-
var
|
|
81759
|
+
var os39 = __require("os");
|
|
81760
81760
|
var path152 = __require("path");
|
|
81761
81761
|
var WELL_KNOWN_CERTIFICATE_CONFIG_FILE = "certificate_config.json";
|
|
81762
81762
|
var CLOUDSDK_CONFIG_DIRECTORY = "gcloud";
|
|
@@ -81854,7 +81854,7 @@ var require_util4 = __commonJS({
|
|
|
81854
81854
|
return path152.join(configDir, WELL_KNOWN_CERTIFICATE_CONFIG_FILE);
|
|
81855
81855
|
}
|
|
81856
81856
|
function _isWindows() {
|
|
81857
|
-
return
|
|
81857
|
+
return os39.platform().startsWith("win");
|
|
81858
81858
|
}
|
|
81859
81859
|
}
|
|
81860
81860
|
});
|
|
@@ -86626,7 +86626,7 @@ var require_googleauth2 = __commonJS({
|
|
|
86626
86626
|
var fs131 = __require("fs");
|
|
86627
86627
|
var gaxios_1 = require_src7();
|
|
86628
86628
|
var gcpMetadata = require_src9();
|
|
86629
|
-
var
|
|
86629
|
+
var os39 = __require("os");
|
|
86630
86630
|
var path152 = __require("path");
|
|
86631
86631
|
var crypto_1 = require_crypto6();
|
|
86632
86632
|
var computeclient_1 = require_computeclient2();
|
|
@@ -87129,7 +87129,7 @@ var require_googleauth2 = __commonJS({
|
|
|
87129
87129
|
* @api private
|
|
87130
87130
|
*/
|
|
87131
87131
|
_isWindows() {
|
|
87132
|
-
const sys =
|
|
87132
|
+
const sys = os39.platform();
|
|
87133
87133
|
if (sys && sys.length >= 3) {
|
|
87134
87134
|
if (sys.substring(0, 3).toLowerCase() === "win") {
|
|
87135
87135
|
return true;
|
|
@@ -88841,8 +88841,8 @@ function isSubpath(parentPath, childPath) {
|
|
|
88841
88841
|
const relative13 = pathModule2.relative(parentPath, childPath);
|
|
88842
88842
|
return !relative13.startsWith(`..${pathModule2.sep}`) && relative13 !== ".." && !pathModule2.isAbsolute(relative13);
|
|
88843
88843
|
}
|
|
88844
|
-
function resolveToRealPath(
|
|
88845
|
-
let resolvedPath =
|
|
88844
|
+
function resolveToRealPath(pathStr) {
|
|
88845
|
+
let resolvedPath = pathStr;
|
|
88846
88846
|
try {
|
|
88847
88847
|
if (resolvedPath.startsWith("file://")) {
|
|
88848
88848
|
resolvedPath = fileURLToPath2(resolvedPath);
|
|
@@ -88850,10 +88850,28 @@ function resolveToRealPath(path152) {
|
|
|
88850
88850
|
resolvedPath = decodeURIComponent(resolvedPath);
|
|
88851
88851
|
} catch (_e) {
|
|
88852
88852
|
}
|
|
88853
|
+
return robustRealpath(path3.resolve(resolvedPath));
|
|
88854
|
+
}
|
|
88855
|
+
function robustRealpath(p) {
|
|
88853
88856
|
try {
|
|
88854
|
-
return fs9.realpathSync(
|
|
88855
|
-
} catch (
|
|
88856
|
-
|
|
88857
|
+
return fs9.realpathSync(p);
|
|
88858
|
+
} catch (e3) {
|
|
88859
|
+
if (e3 && typeof e3 === "object" && "code" in e3 && e3.code === "ENOENT") {
|
|
88860
|
+
try {
|
|
88861
|
+
const stat15 = fs9.lstatSync(p);
|
|
88862
|
+
if (stat15.isSymbolicLink()) {
|
|
88863
|
+
const target = fs9.readlinkSync(p);
|
|
88864
|
+
const resolvedTarget = path3.resolve(path3.dirname(p), target);
|
|
88865
|
+
return robustRealpath(resolvedTarget);
|
|
88866
|
+
}
|
|
88867
|
+
} catch {
|
|
88868
|
+
}
|
|
88869
|
+
const parent = path3.dirname(p);
|
|
88870
|
+
if (parent === p)
|
|
88871
|
+
return p;
|
|
88872
|
+
return path3.join(robustRealpath(parent), path3.basename(p));
|
|
88873
|
+
}
|
|
88874
|
+
throw e3;
|
|
88857
88875
|
}
|
|
88858
88876
|
}
|
|
88859
88877
|
var GEMINI_DIR, GOOGLE_ACCOUNTS_FILENAME;
|
|
@@ -88871,7 +88889,7 @@ var require_polyfills = __commonJS({
|
|
|
88871
88889
|
var constants9 = __require("constants");
|
|
88872
88890
|
var origCwd = process.cwd;
|
|
88873
88891
|
var cwd7 = null;
|
|
88874
|
-
var
|
|
88892
|
+
var platform21 = process.env.GRACEFUL_FS_PLATFORM || process.platform;
|
|
88875
88893
|
process.cwd = function() {
|
|
88876
88894
|
if (!cwd7)
|
|
88877
88895
|
cwd7 = origCwd.call(process);
|
|
@@ -88930,7 +88948,7 @@ var require_polyfills = __commonJS({
|
|
|
88930
88948
|
fs131.lchownSync = function() {
|
|
88931
88949
|
};
|
|
88932
88950
|
}
|
|
88933
|
-
if (
|
|
88951
|
+
if (platform21 === "win32") {
|
|
88934
88952
|
fs131.rename = typeof fs131.rename !== "function" ? fs131.rename : function(fs$rename) {
|
|
88935
88953
|
function rename2(from, to, cb) {
|
|
88936
88954
|
var start2 = Date.now();
|
|
@@ -121273,7 +121291,7 @@ var require_service_config = __commonJS({
|
|
|
121273
121291
|
exports2.validateRetryThrottling = validateRetryThrottling;
|
|
121274
121292
|
exports2.validateServiceConfig = validateServiceConfig;
|
|
121275
121293
|
exports2.extractAndSelectServiceConfig = extractAndSelectServiceConfig;
|
|
121276
|
-
var
|
|
121294
|
+
var os39 = __require("os");
|
|
121277
121295
|
var constants_1 = require_constants4();
|
|
121278
121296
|
var DURATION_REGEX = /^\d+(\.\d{1,9})?s$/;
|
|
121279
121297
|
var CLIENT_LANGUAGE_STRING = "node";
|
|
@@ -121572,7 +121590,7 @@ var require_service_config = __commonJS({
|
|
|
121572
121590
|
if (Array.isArray(validatedConfig.clientHostname)) {
|
|
121573
121591
|
let hostnameMatched = false;
|
|
121574
121592
|
for (const hostname3 of validatedConfig.clientHostname) {
|
|
121575
|
-
if (hostname3 ===
|
|
121593
|
+
if (hostname3 === os39.hostname()) {
|
|
121576
121594
|
hostnameMatched = true;
|
|
121577
121595
|
}
|
|
121578
121596
|
}
|
|
@@ -135093,7 +135111,7 @@ var require_subchannel_call = __commonJS({
|
|
|
135093
135111
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
135094
135112
|
exports2.Http2SubchannelCall = void 0;
|
|
135095
135113
|
var http22 = __require("http2");
|
|
135096
|
-
var
|
|
135114
|
+
var os39 = __require("os");
|
|
135097
135115
|
var constants_1 = require_constants4();
|
|
135098
135116
|
var metadata_1 = require_metadata3();
|
|
135099
135117
|
var stream_decoder_1 = require_stream_decoder();
|
|
@@ -135101,7 +135119,7 @@ var require_subchannel_call = __commonJS({
|
|
|
135101
135119
|
var constants_2 = require_constants4();
|
|
135102
135120
|
var TRACER_NAME2 = "subchannel_call";
|
|
135103
135121
|
function getSystemErrorName(errno) {
|
|
135104
|
-
for (const [name4, num] of Object.entries(
|
|
135122
|
+
for (const [name4, num] of Object.entries(os39.constants.errno)) {
|
|
135105
135123
|
if (num === errno) {
|
|
135106
135124
|
return name4;
|
|
135107
135125
|
}
|
|
@@ -155485,7 +155503,7 @@ var require_ProcessDetector = __commonJS({
|
|
|
155485
155503
|
exports2.processDetector = void 0;
|
|
155486
155504
|
var api_1 = (init_esm(), __toCommonJS(esm_exports));
|
|
155487
155505
|
var semconv_1 = require_semconv2();
|
|
155488
|
-
var
|
|
155506
|
+
var os39 = __require("os");
|
|
155489
155507
|
var ProcessDetector = class {
|
|
155490
155508
|
detect(_config) {
|
|
155491
155509
|
const attributes = {
|
|
@@ -155505,7 +155523,7 @@ var require_ProcessDetector = __commonJS({
|
|
|
155505
155523
|
attributes[semconv_1.ATTR_PROCESS_COMMAND] = process.argv[1];
|
|
155506
155524
|
}
|
|
155507
155525
|
try {
|
|
155508
|
-
const userInfo2 =
|
|
155526
|
+
const userInfo2 = os39.userInfo();
|
|
155509
155527
|
attributes[semconv_1.ATTR_PROCESS_OWNER] = userInfo2.username;
|
|
155510
155528
|
} catch (e3) {
|
|
155511
155529
|
api_1.diag.debug(`error obtaining process owner: ${e3}`);
|
|
@@ -175015,7 +175033,7 @@ var require_package6 = __commonJS({
|
|
|
175015
175033
|
var require_util11 = __commonJS({
|
|
175016
175034
|
"node_modules/systeminformation/lib/util.js"(exports2) {
|
|
175017
175035
|
"use strict";
|
|
175018
|
-
var
|
|
175036
|
+
var os39 = __require("os");
|
|
175019
175037
|
var fs131 = __require("fs");
|
|
175020
175038
|
var path152 = __require("path");
|
|
175021
175039
|
var spawn15 = __require("child_process").spawn;
|
|
@@ -175122,7 +175140,7 @@ var require_util11 = __commonJS({
|
|
|
175122
175140
|
}
|
|
175123
175141
|
function cores() {
|
|
175124
175142
|
if (_cores === 0) {
|
|
175125
|
-
_cores =
|
|
175143
|
+
_cores = os39.cpus().length;
|
|
175126
175144
|
}
|
|
175127
175145
|
return _cores;
|
|
175128
175146
|
}
|
|
@@ -175383,7 +175401,7 @@ var require_util11 = __commonJS({
|
|
|
175383
175401
|
function powerShellRelease() {
|
|
175384
175402
|
try {
|
|
175385
175403
|
if (_psChild) {
|
|
175386
|
-
_psChild.stdin.write("exit" +
|
|
175404
|
+
_psChild.stdin.write("exit" + os39.EOL);
|
|
175387
175405
|
_psChild.stdin.end();
|
|
175388
175406
|
}
|
|
175389
175407
|
} catch {
|
|
@@ -175410,7 +175428,7 @@ var require_util11 = __commonJS({
|
|
|
175410
175428
|
});
|
|
175411
175429
|
try {
|
|
175412
175430
|
if (_psChild && _psChild.pid) {
|
|
175413
|
-
_psChild.stdin.write(_psToUTF8 + "echo " + _psCmdStart + id + _psIdSeperator + "; " +
|
|
175431
|
+
_psChild.stdin.write(_psToUTF8 + "echo " + _psCmdStart + id + _psIdSeperator + "; " + os39.EOL + cmd + os39.EOL + "echo " + _psCmdSeperator + os39.EOL);
|
|
175414
175432
|
}
|
|
175415
175433
|
} catch {
|
|
175416
175434
|
resolve36("");
|
|
@@ -175422,7 +175440,7 @@ var require_util11 = __commonJS({
|
|
|
175422
175440
|
return new Promise((resolve36) => {
|
|
175423
175441
|
process.nextTick(() => {
|
|
175424
175442
|
try {
|
|
175425
|
-
const osVersion =
|
|
175443
|
+
const osVersion = os39.release().split(".").map(Number);
|
|
175426
175444
|
const spanOptions = osVersion[0] < 10 ? ["-NoProfile", "-NoLogo", "-InputFormat", "Text", "-NoExit", "-ExecutionPolicy", "Unrestricted", "-Command", "-"] : ["-NoProfile", "-NoLogo", "-InputFormat", "Text", "-ExecutionPolicy", "Unrestricted", "-Command", _psToUTF8 + cmd];
|
|
175427
175445
|
const child = spawn15(_powerShell, spanOptions, {
|
|
175428
175446
|
stdio: "pipe",
|
|
@@ -175454,8 +175472,8 @@ var require_util11 = __commonJS({
|
|
|
175454
175472
|
});
|
|
175455
175473
|
if (osVersion[0] < 10) {
|
|
175456
175474
|
try {
|
|
175457
|
-
child.stdin.write(_psToUTF8 + cmd +
|
|
175458
|
-
child.stdin.write("exit" +
|
|
175475
|
+
child.stdin.write(_psToUTF8 + cmd + os39.EOL);
|
|
175476
|
+
child.stdin.write("exit" + os39.EOL);
|
|
175459
175477
|
child.stdin.end();
|
|
175460
175478
|
} catch {
|
|
175461
175479
|
child.kill();
|
|
@@ -175720,14 +175738,14 @@ var require_util11 = __commonJS({
|
|
|
175720
175738
|
return ("00000000" + parseInt(hex, 16).toString(2)).substr(-8);
|
|
175721
175739
|
}
|
|
175722
175740
|
function getFilesInPath(source2) {
|
|
175723
|
-
const
|
|
175741
|
+
const lstatSync3 = fs131.lstatSync;
|
|
175724
175742
|
const readdirSync4 = fs131.readdirSync;
|
|
175725
175743
|
const join54 = path152.join;
|
|
175726
175744
|
function isDirectory(source3) {
|
|
175727
|
-
return
|
|
175745
|
+
return lstatSync3(source3).isDirectory();
|
|
175728
175746
|
}
|
|
175729
175747
|
function isFile3(source3) {
|
|
175730
|
-
return
|
|
175748
|
+
return lstatSync3(source3).isFile();
|
|
175731
175749
|
}
|
|
175732
175750
|
function getDirectories(source3) {
|
|
175733
175751
|
return readdirSync4(source3).map((name4) => {
|
|
@@ -177523,7 +177541,7 @@ var require_util11 = __commonJS({
|
|
|
177523
177541
|
var require_osinfo = __commonJS({
|
|
177524
177542
|
"node_modules/systeminformation/lib/osinfo.js"(exports2) {
|
|
177525
177543
|
"use strict";
|
|
177526
|
-
var
|
|
177544
|
+
var os39 = __require("os");
|
|
177527
177545
|
var fs131 = __require("fs");
|
|
177528
177546
|
var util5 = require_util11();
|
|
177529
177547
|
var exec6 = __require("child_process").exec;
|
|
@@ -177546,14 +177564,14 @@ var require_osinfo = __commonJS({
|
|
|
177546
177564
|
}
|
|
177547
177565
|
const result2 = {
|
|
177548
177566
|
current: Date.now(),
|
|
177549
|
-
uptime:
|
|
177567
|
+
uptime: os39.uptime(),
|
|
177550
177568
|
timezone: t3.length >= 7 ? t3[5] : "",
|
|
177551
177569
|
timezoneName
|
|
177552
177570
|
};
|
|
177553
177571
|
if (_darwin || _linux) {
|
|
177554
177572
|
try {
|
|
177555
177573
|
const stdout = execSync9("date +%Z && date +%z && ls -l /etc/localtime 2>/dev/null", util5.execOptsLinux);
|
|
177556
|
-
const lines = stdout.toString().split(
|
|
177574
|
+
const lines = stdout.toString().split(os39.EOL);
|
|
177557
177575
|
if (lines.length > 3 && !lines[0]) {
|
|
177558
177576
|
lines.shift();
|
|
177559
177577
|
}
|
|
@@ -177563,7 +177581,7 @@ var require_osinfo = __commonJS({
|
|
|
177563
177581
|
}
|
|
177564
177582
|
return {
|
|
177565
177583
|
current: Date.now(),
|
|
177566
|
-
uptime:
|
|
177584
|
+
uptime: os39.uptime(),
|
|
177567
177585
|
timezone: lines[1] ? timezone + lines[1] : timezone,
|
|
177568
177586
|
timezoneName: lines[2] && lines[2].indexOf("/zoneinfo/") > 0 ? lines[2].split("/zoneinfo/")[1] || "" : ""
|
|
177569
177587
|
};
|
|
@@ -177682,11 +177700,11 @@ var require_osinfo = __commonJS({
|
|
|
177682
177700
|
return "";
|
|
177683
177701
|
}
|
|
177684
177702
|
function getFQDN() {
|
|
177685
|
-
let fqdn =
|
|
177703
|
+
let fqdn = os39.hostname;
|
|
177686
177704
|
if (_linux || _darwin) {
|
|
177687
177705
|
try {
|
|
177688
177706
|
const stdout = execSync9("hostname -f 2>/dev/null", util5.execOptsLinux);
|
|
177689
|
-
fqdn = stdout.toString().split(
|
|
177707
|
+
fqdn = stdout.toString().split(os39.EOL)[0];
|
|
177690
177708
|
} catch {
|
|
177691
177709
|
util5.noop();
|
|
177692
177710
|
}
|
|
@@ -177694,7 +177712,7 @@ var require_osinfo = __commonJS({
|
|
|
177694
177712
|
if (_freebsd || _openbsd || _netbsd) {
|
|
177695
177713
|
try {
|
|
177696
177714
|
const stdout = execSync9("hostname 2>/dev/null");
|
|
177697
|
-
fqdn = stdout.toString().split(
|
|
177715
|
+
fqdn = stdout.toString().split(os39.EOL)[0];
|
|
177698
177716
|
} catch {
|
|
177699
177717
|
util5.noop();
|
|
177700
177718
|
}
|
|
@@ -177702,7 +177720,7 @@ var require_osinfo = __commonJS({
|
|
|
177702
177720
|
if (_windows) {
|
|
177703
177721
|
try {
|
|
177704
177722
|
const stdout = execSync9("echo %COMPUTERNAME%.%USERDNSDOMAIN%", util5.execOptsWin);
|
|
177705
|
-
fqdn = stdout.toString().replace(".%USERDNSDOMAIN%", "").split(
|
|
177723
|
+
fqdn = stdout.toString().replace(".%USERDNSDOMAIN%", "").split(os39.EOL)[0];
|
|
177706
177724
|
} catch {
|
|
177707
177725
|
util5.noop();
|
|
177708
177726
|
}
|
|
@@ -177717,9 +177735,9 @@ var require_osinfo = __commonJS({
|
|
|
177717
177735
|
distro: "unknown",
|
|
177718
177736
|
release: "unknown",
|
|
177719
177737
|
codename: "",
|
|
177720
|
-
kernel:
|
|
177721
|
-
arch:
|
|
177722
|
-
hostname:
|
|
177738
|
+
kernel: os39.release(),
|
|
177739
|
+
arch: os39.arch(),
|
|
177740
|
+
hostname: os39.hostname(),
|
|
177723
177741
|
fqdn: getFQDN(),
|
|
177724
177742
|
codepage: "",
|
|
177725
177743
|
logofile: "",
|
|
@@ -177928,7 +177946,7 @@ var require_osinfo = __commonJS({
|
|
|
177928
177946
|
}
|
|
177929
177947
|
function versions(apps2, callback2) {
|
|
177930
177948
|
let versionObject = {
|
|
177931
|
-
kernel:
|
|
177949
|
+
kernel: os39.release(),
|
|
177932
177950
|
apache: "",
|
|
177933
177951
|
bash: "",
|
|
177934
177952
|
bun: "",
|
|
@@ -178638,7 +178656,7 @@ var require_osinfo = __commonJS({
|
|
|
178638
178656
|
function getUniqueMacAdresses() {
|
|
178639
178657
|
let macs = [];
|
|
178640
178658
|
try {
|
|
178641
|
-
const ifaces =
|
|
178659
|
+
const ifaces = os39.networkInterfaces();
|
|
178642
178660
|
for (let dev in ifaces) {
|
|
178643
178661
|
if ({}.hasOwnProperty.call(ifaces, dev)) {
|
|
178644
178662
|
ifaces[dev].forEach((details) => {
|
|
@@ -178760,7 +178778,7 @@ var require_system = __commonJS({
|
|
|
178760
178778
|
"node_modules/systeminformation/lib/system.js"(exports2) {
|
|
178761
178779
|
"use strict";
|
|
178762
178780
|
var fs131 = __require("fs");
|
|
178763
|
-
var
|
|
178781
|
+
var os39 = __require("os");
|
|
178764
178782
|
var util5 = require_util11();
|
|
178765
178783
|
var { uuid: uuid3 } = require_osinfo();
|
|
178766
178784
|
var exec6 = __require("child_process").exec;
|
|
@@ -178884,8 +178902,8 @@ var require_system = __commonJS({
|
|
|
178884
178902
|
util5.noop();
|
|
178885
178903
|
}
|
|
178886
178904
|
}
|
|
178887
|
-
if (!result2.virtual && (
|
|
178888
|
-
const kernelVersion = parseFloat(
|
|
178905
|
+
if (!result2.virtual && (os39.release().toLowerCase().indexOf("microsoft") >= 0 || os39.release().toLowerCase().endsWith("wsl2"))) {
|
|
178906
|
+
const kernelVersion = parseFloat(os39.release().toLowerCase());
|
|
178889
178907
|
result2.virtual = true;
|
|
178890
178908
|
result2.manufacturer = "Microsoft";
|
|
178891
178909
|
result2.model = "WSL";
|
|
@@ -179295,7 +179313,7 @@ var require_system = __commonJS({
|
|
|
179295
179313
|
result2.model = "Raspberry Pi";
|
|
179296
179314
|
result2.serial = rpi.serial;
|
|
179297
179315
|
result2.version = rpi.type + " - " + rpi.revision;
|
|
179298
|
-
result2.memMax =
|
|
179316
|
+
result2.memMax = os39.totalmem();
|
|
179299
179317
|
result2.memSlots = 0;
|
|
179300
179318
|
}
|
|
179301
179319
|
if (callback2) {
|
|
@@ -179321,9 +179339,9 @@ var require_system = __commonJS({
|
|
|
179321
179339
|
}
|
|
179322
179340
|
devices.shift();
|
|
179323
179341
|
result2.memSlots = devices.length;
|
|
179324
|
-
if (
|
|
179342
|
+
if (os39.arch() === "arm64") {
|
|
179325
179343
|
result2.memSlots = 0;
|
|
179326
|
-
result2.memMax =
|
|
179344
|
+
result2.memMax = os39.totalmem();
|
|
179327
179345
|
}
|
|
179328
179346
|
if (callback2) {
|
|
179329
179347
|
callback2(result2);
|
|
@@ -179340,7 +179358,7 @@ var require_system = __commonJS({
|
|
|
179340
179358
|
if (_windows) {
|
|
179341
179359
|
try {
|
|
179342
179360
|
const workload = [];
|
|
179343
|
-
const win10plus = parseInt(
|
|
179361
|
+
const win10plus = parseInt(os39.release()) >= 10;
|
|
179344
179362
|
const maxCapacityAttribute = win10plus ? "MaxCapacityEx" : "MaxCapacity";
|
|
179345
179363
|
workload.push(util5.powerShell("Get-CimInstance Win32_baseboard | select Model,Manufacturer,Product,Version,SerialNumber,PartNumber,SKU | fl"));
|
|
179346
179364
|
workload.push(util5.powerShell(`Get-CimInstance Win32_physicalmemoryarray | select ${maxCapacityAttribute}, MemoryDevices | fl`));
|
|
@@ -179536,7 +179554,7 @@ var require_system = __commonJS({
|
|
|
179536
179554
|
var require_cpu = __commonJS({
|
|
179537
179555
|
"node_modules/systeminformation/lib/cpu.js"(exports2) {
|
|
179538
179556
|
"use strict";
|
|
179539
|
-
var
|
|
179557
|
+
var os39 = __require("os");
|
|
179540
179558
|
var exec6 = __require("child_process").exec;
|
|
179541
179559
|
var execSync9 = __require("child_process").execSync;
|
|
179542
179560
|
var fs131 = __require("fs");
|
|
@@ -180399,7 +180417,7 @@ var require_cpu = __commonJS({
|
|
|
180399
180417
|
const countProcessors = util5.getValue(lines, "hw.packages");
|
|
180400
180418
|
const countCores = util5.getValue(lines, "hw.physicalcpu_max");
|
|
180401
180419
|
const countThreads = util5.getValue(lines, "hw.ncpu");
|
|
180402
|
-
if (
|
|
180420
|
+
if (os39.arch() === "arm64") {
|
|
180403
180421
|
result2.socket = "SOC";
|
|
180404
180422
|
try {
|
|
180405
180423
|
const clusters = execSync9("ioreg -c IOPlatformDevice -d 3 -r | grep cluster-type").toString().split("\n");
|
|
@@ -180427,8 +180445,8 @@ var require_cpu = __commonJS({
|
|
|
180427
180445
|
if (_linux) {
|
|
180428
180446
|
let modelline = "";
|
|
180429
180447
|
let lines = [];
|
|
180430
|
-
if (
|
|
180431
|
-
modelline =
|
|
180448
|
+
if (os39.cpus()[0] && os39.cpus()[0].model) {
|
|
180449
|
+
modelline = os39.cpus()[0].model;
|
|
180432
180450
|
}
|
|
180433
180451
|
exec6('export LC_ALL=C; lscpu; echo -n "Governor: "; cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor 2>/dev/null; echo; unset LC_ALL', (error40, stdout) => {
|
|
180434
180452
|
if (!error40) {
|
|
@@ -180517,8 +180535,8 @@ var require_cpu = __commonJS({
|
|
|
180517
180535
|
if (_freebsd || _openbsd || _netbsd) {
|
|
180518
180536
|
let modelline = "";
|
|
180519
180537
|
let lines = [];
|
|
180520
|
-
if (
|
|
180521
|
-
modelline =
|
|
180538
|
+
if (os39.cpus()[0] && os39.cpus()[0].model) {
|
|
180539
|
+
modelline = os39.cpus()[0].model;
|
|
180522
180540
|
}
|
|
180523
180541
|
exec6("export LC_ALL=C; dmidecode -t 4; dmidecode -t 7 unset LC_ALL", (error40, stdout) => {
|
|
180524
180542
|
let cache4 = [];
|
|
@@ -180678,7 +180696,7 @@ var require_cpu = __commonJS({
|
|
|
180678
180696
|
}
|
|
180679
180697
|
exports2.cpu = cpu;
|
|
180680
180698
|
function getCpuCurrentSpeedSync() {
|
|
180681
|
-
const cpus2 =
|
|
180699
|
+
const cpus2 = os39.cpus();
|
|
180682
180700
|
let minFreq = 999999999;
|
|
180683
180701
|
let maxFreq = 0;
|
|
180684
180702
|
let avgFreq = 0;
|
|
@@ -181373,7 +181391,7 @@ var require_cpu = __commonJS({
|
|
|
181373
181391
|
function getLoad() {
|
|
181374
181392
|
return new Promise((resolve36) => {
|
|
181375
181393
|
process.nextTick(() => {
|
|
181376
|
-
const loads =
|
|
181394
|
+
const loads = os39.loadavg().map((x3) => {
|
|
181377
181395
|
return x3 / util5.cores();
|
|
181378
181396
|
});
|
|
181379
181397
|
const avgLoad = parseFloat(Math.max.apply(Math, loads).toFixed(2));
|
|
@@ -181381,7 +181399,7 @@ var require_cpu = __commonJS({
|
|
|
181381
181399
|
const now = Date.now() - _current_cpu.ms;
|
|
181382
181400
|
if (now >= 200) {
|
|
181383
181401
|
_current_cpu.ms = Date.now();
|
|
181384
|
-
const cpus2 =
|
|
181402
|
+
const cpus2 = os39.cpus().map((cpu2) => {
|
|
181385
181403
|
cpu2.times.steal = 0;
|
|
181386
181404
|
cpu2.times.guest = 0;
|
|
181387
181405
|
return cpu2;
|
|
@@ -181575,7 +181593,7 @@ var require_cpu = __commonJS({
|
|
|
181575
181593
|
function getFullLoad() {
|
|
181576
181594
|
return new Promise((resolve36) => {
|
|
181577
181595
|
process.nextTick(() => {
|
|
181578
|
-
const cpus2 =
|
|
181596
|
+
const cpus2 = os39.cpus();
|
|
181579
181597
|
let totalUser = 0;
|
|
181580
181598
|
let totalSystem = 0;
|
|
181581
181599
|
let totalNice = 0;
|
|
@@ -181618,7 +181636,7 @@ var require_cpu = __commonJS({
|
|
|
181618
181636
|
var require_memory = __commonJS({
|
|
181619
181637
|
"node_modules/systeminformation/lib/memory.js"(exports2) {
|
|
181620
181638
|
"use strict";
|
|
181621
|
-
var
|
|
181639
|
+
var os39 = __require("os");
|
|
181622
181640
|
var exec6 = __require("child_process").exec;
|
|
181623
181641
|
var execSync9 = __require("child_process").execSync;
|
|
181624
181642
|
var util5 = require_util11();
|
|
@@ -181664,12 +181682,12 @@ var require_memory = __commonJS({
|
|
|
181664
181682
|
return new Promise((resolve36) => {
|
|
181665
181683
|
process.nextTick(() => {
|
|
181666
181684
|
let result2 = {
|
|
181667
|
-
total:
|
|
181668
|
-
free:
|
|
181669
|
-
used:
|
|
181670
|
-
active:
|
|
181685
|
+
total: os39.totalmem(),
|
|
181686
|
+
free: os39.freemem(),
|
|
181687
|
+
used: os39.totalmem() - os39.freemem(),
|
|
181688
|
+
active: os39.totalmem() - os39.freemem(),
|
|
181671
181689
|
// temporarily (fallback)
|
|
181672
|
-
available:
|
|
181690
|
+
available: os39.freemem(),
|
|
181673
181691
|
// temporarily (fallback)
|
|
181674
181692
|
buffers: 0,
|
|
181675
181693
|
cached: 0,
|
|
@@ -181688,9 +181706,9 @@ var require_memory = __commonJS({
|
|
|
181688
181706
|
if (!error40) {
|
|
181689
181707
|
const lines = stdout.toString().split("\n");
|
|
181690
181708
|
result2.total = parseInt(util5.getValue(lines, "memtotal"), 10);
|
|
181691
|
-
result2.total = result2.total ? result2.total * 1024 :
|
|
181709
|
+
result2.total = result2.total ? result2.total * 1024 : os39.totalmem();
|
|
181692
181710
|
result2.free = parseInt(util5.getValue(lines, "memfree"), 10);
|
|
181693
|
-
result2.free = result2.free ? result2.free * 1024 :
|
|
181711
|
+
result2.free = result2.free ? result2.free * 1024 : os39.freemem();
|
|
181694
181712
|
result2.used = result2.total - result2.free;
|
|
181695
181713
|
result2.buffers = parseInt(util5.getValue(lines, "buffers"), 10);
|
|
181696
181714
|
result2.buffers = result2.buffers ? result2.buffers * 1024 : 0;
|
|
@@ -181912,7 +181930,7 @@ var require_memory = __commonJS({
|
|
|
181912
181930
|
}
|
|
181913
181931
|
if (!result2.length) {
|
|
181914
181932
|
result2.push({
|
|
181915
|
-
size:
|
|
181933
|
+
size: os39.totalmem(),
|
|
181916
181934
|
bank: "",
|
|
181917
181935
|
type: "",
|
|
181918
181936
|
ecc: null,
|
|
@@ -185060,7 +185078,7 @@ ${BSDName}|"; diskutil info /dev/${BSDName} | grep SMART;`;
|
|
|
185060
185078
|
var require_network = __commonJS({
|
|
185061
185079
|
"node_modules/systeminformation/lib/network.js"(exports2) {
|
|
185062
185080
|
"use strict";
|
|
185063
|
-
var
|
|
185081
|
+
var os39 = __require("os");
|
|
185064
185082
|
var exec6 = __require("child_process").exec;
|
|
185065
185083
|
var execSync9 = __require("child_process").execSync;
|
|
185066
185084
|
var fs131 = __require("fs");
|
|
@@ -185084,7 +185102,7 @@ var require_network = __commonJS({
|
|
|
185084
185102
|
let ifacename = "";
|
|
185085
185103
|
let ifacenameFirst = "";
|
|
185086
185104
|
try {
|
|
185087
|
-
const ifaces =
|
|
185105
|
+
const ifaces = os39.networkInterfaces();
|
|
185088
185106
|
let scopeid = 9999;
|
|
185089
185107
|
for (let dev in ifaces) {
|
|
185090
185108
|
if ({}.hasOwnProperty.call(ifaces, dev)) {
|
|
@@ -185104,7 +185122,7 @@ var require_network = __commonJS({
|
|
|
185104
185122
|
let defaultIp = "";
|
|
185105
185123
|
const cmd = "netstat -r";
|
|
185106
185124
|
const result2 = execSync9(cmd, util5.execOptsWin);
|
|
185107
|
-
const lines = result2.toString().split(
|
|
185125
|
+
const lines = result2.toString().split(os39.EOL);
|
|
185108
185126
|
lines.forEach((line) => {
|
|
185109
185127
|
line = line.replace(/\s+/g, " ").trim();
|
|
185110
185128
|
if (line.indexOf("0.0.0.0 0.0.0.0") > -1 && !/[a-zA-Z]/.test(line)) {
|
|
@@ -185737,7 +185755,7 @@ var require_network = __commonJS({
|
|
|
185737
185755
|
defaultString = "" + defaultString;
|
|
185738
185756
|
return new Promise((resolve36) => {
|
|
185739
185757
|
process.nextTick(() => {
|
|
185740
|
-
const ifaces =
|
|
185758
|
+
const ifaces = os39.networkInterfaces();
|
|
185741
185759
|
let result2 = [];
|
|
185742
185760
|
let nics = [];
|
|
185743
185761
|
let dnsSuffixes = [];
|
|
@@ -186807,7 +186825,7 @@ var require_network = __commonJS({
|
|
|
186807
186825
|
if (_windows) {
|
|
186808
186826
|
try {
|
|
186809
186827
|
exec6("netstat -r", util5.execOptsWin, (error40, stdout) => {
|
|
186810
|
-
const lines = stdout.toString().split(
|
|
186828
|
+
const lines = stdout.toString().split(os39.EOL);
|
|
186811
186829
|
lines.forEach((line) => {
|
|
186812
186830
|
line = line.replace(/\s+/g, " ").trim();
|
|
186813
186831
|
if (line.indexOf("0.0.0.0 0.0.0.0") > -1 && !/[a-zA-Z]/.test(line)) {
|
|
@@ -186853,7 +186871,7 @@ var require_network = __commonJS({
|
|
|
186853
186871
|
var require_wifi = __commonJS({
|
|
186854
186872
|
"node_modules/systeminformation/lib/wifi.js"(exports2) {
|
|
186855
186873
|
"use strict";
|
|
186856
|
-
var
|
|
186874
|
+
var os39 = __require("os");
|
|
186857
186875
|
var exec6 = __require("child_process").exec;
|
|
186858
186876
|
var execSync9 = __require("child_process").execSync;
|
|
186859
186877
|
var util5 = require_util11();
|
|
@@ -187075,7 +187093,7 @@ var require_wifi = __commonJS({
|
|
|
187075
187093
|
parts2.shift();
|
|
187076
187094
|
parts2.forEach((part) => {
|
|
187077
187095
|
part = "ACTIVE:" + part;
|
|
187078
|
-
const lines = part.split(
|
|
187096
|
+
const lines = part.split(os39.EOL);
|
|
187079
187097
|
const channel = util5.getValue(lines, "CHAN");
|
|
187080
187098
|
const frequency = util5.getValue(lines, "FREQ").toLowerCase().replace("mhz", "").trim();
|
|
187081
187099
|
const security = util5.getValue(lines, "SECURITY").replace("(", "").replace(")", "");
|
|
@@ -187299,15 +187317,15 @@ var require_wifi = __commonJS({
|
|
|
187299
187317
|
} else if (_windows) {
|
|
187300
187318
|
const cmd = "netsh wlan show networks mode=Bssid";
|
|
187301
187319
|
util5.powerShell(cmd).then((stdout) => {
|
|
187302
|
-
const ssidParts = stdout.toString("utf8").split(
|
|
187320
|
+
const ssidParts = stdout.toString("utf8").split(os39.EOL + os39.EOL + "SSID ");
|
|
187303
187321
|
ssidParts.shift();
|
|
187304
187322
|
ssidParts.forEach((ssidPart) => {
|
|
187305
|
-
const ssidLines = ssidPart.split(
|
|
187323
|
+
const ssidLines = ssidPart.split(os39.EOL);
|
|
187306
187324
|
if (ssidLines && ssidLines.length >= 8 && ssidLines[0].indexOf(":") >= 0) {
|
|
187307
187325
|
const bssidsParts = ssidPart.split(" BSSID");
|
|
187308
187326
|
bssidsParts.shift();
|
|
187309
187327
|
bssidsParts.forEach((bssidPart) => {
|
|
187310
|
-
const bssidLines = bssidPart.split(
|
|
187328
|
+
const bssidLines = bssidPart.split(os39.EOL);
|
|
187311
187329
|
const bssidLine = bssidLines[0].split(":");
|
|
187312
187330
|
bssidLine.shift();
|
|
187313
187331
|
const bssid = bssidLine.join(":").trim().toLowerCase();
|
|
@@ -187631,7 +187649,7 @@ var require_wifi = __commonJS({
|
|
|
187631
187649
|
var require_processes = __commonJS({
|
|
187632
187650
|
"node_modules/systeminformation/lib/processes.js"(exports2) {
|
|
187633
187651
|
"use strict";
|
|
187634
|
-
var
|
|
187652
|
+
var os39 = __require("os");
|
|
187635
187653
|
var fs131 = __require("fs");
|
|
187636
187654
|
var path152 = __require("path");
|
|
187637
187655
|
var exec6 = __require("child_process").exec;
|
|
@@ -188282,7 +188300,7 @@ var require_processes = __commonJS({
|
|
|
188282
188300
|
line = line.trim().replace(/ +/g, " ").replace(/,+/g, ".");
|
|
188283
188301
|
const parts2 = line.split(" ");
|
|
188284
188302
|
const command2 = parts2.slice(9).join(" ");
|
|
188285
|
-
const pmem = parseFloat((1 * parseInt(parts2[3]) * 1024 /
|
|
188303
|
+
const pmem = parseFloat((1 * parseInt(parts2[3]) * 1024 / os39.totalmem()).toFixed(1));
|
|
188286
188304
|
const started = parseElapsed(parts2[5]);
|
|
188287
188305
|
result2.push({
|
|
188288
188306
|
pid: parseInt(parts2[0]),
|
|
@@ -188485,7 +188503,7 @@ var require_processes = __commonJS({
|
|
|
188485
188503
|
cpu: 0,
|
|
188486
188504
|
cpuu: 0,
|
|
188487
188505
|
cpus: 0,
|
|
188488
|
-
mem: memw /
|
|
188506
|
+
mem: memw / os39.totalmem() * 100,
|
|
188489
188507
|
priority: element.Priority | null,
|
|
188490
188508
|
memVsz: element.PageFileUsage || null,
|
|
188491
188509
|
memRss: Math.floor((element.WorkingSetSize || 0) / 1024),
|
|
@@ -188639,7 +188657,7 @@ var require_processes = __commonJS({
|
|
|
188639
188657
|
result2.forEach((item) => {
|
|
188640
188658
|
if (item.proc.toLowerCase() === pname.toLowerCase()) {
|
|
188641
188659
|
item.pids.push(pid);
|
|
188642
|
-
item.mem += mem /
|
|
188660
|
+
item.mem += mem / os39.totalmem() * 100;
|
|
188643
188661
|
processFound = true;
|
|
188644
188662
|
}
|
|
188645
188663
|
});
|
|
@@ -188649,7 +188667,7 @@ var require_processes = __commonJS({
|
|
|
188649
188667
|
pid,
|
|
188650
188668
|
pids: [pid],
|
|
188651
188669
|
cpu: 0,
|
|
188652
|
-
mem: mem /
|
|
188670
|
+
mem: mem / os39.totalmem() * 100
|
|
188653
188671
|
});
|
|
188654
188672
|
}
|
|
188655
188673
|
}
|
|
@@ -190390,7 +190408,7 @@ var require_docker = __commonJS({
|
|
|
190390
190408
|
var require_virtualbox = __commonJS({
|
|
190391
190409
|
"node_modules/systeminformation/lib/virtualbox.js"(exports2) {
|
|
190392
190410
|
"use strict";
|
|
190393
|
-
var
|
|
190411
|
+
var os39 = __require("os");
|
|
190394
190412
|
var exec6 = __require("child_process").exec;
|
|
190395
190413
|
var util5 = require_util11();
|
|
190396
190414
|
function vboxInfo(callback2) {
|
|
@@ -190399,10 +190417,10 @@ var require_virtualbox = __commonJS({
|
|
|
190399
190417
|
process.nextTick(() => {
|
|
190400
190418
|
try {
|
|
190401
190419
|
exec6(util5.getVboxmanage() + " list vms --long", (error40, stdout) => {
|
|
190402
|
-
let parts2 = (
|
|
190420
|
+
let parts2 = (os39.EOL + stdout.toString()).split(os39.EOL + "Name:");
|
|
190403
190421
|
parts2.shift();
|
|
190404
190422
|
parts2.forEach((part) => {
|
|
190405
|
-
const lines = ("Name:" + part).split(
|
|
190423
|
+
const lines = ("Name:" + part).split(os39.EOL);
|
|
190406
190424
|
const state = util5.getValue(lines, "State");
|
|
190407
190425
|
const running = state.startsWith("running");
|
|
190408
190426
|
const runningSinceString = running ? state.replace("running (since ", "").replace(")", "").trim() : "";
|
|
@@ -196323,8 +196341,8 @@ var GIT_COMMIT_INFO, CLI_VERSION;
|
|
|
196323
196341
|
var init_git_commit = __esm({
|
|
196324
196342
|
"packages/core/dist/src/generated/git-commit.js"() {
|
|
196325
196343
|
"use strict";
|
|
196326
|
-
GIT_COMMIT_INFO = "
|
|
196327
|
-
CLI_VERSION = "0.33.0-preview.
|
|
196344
|
+
GIT_COMMIT_INFO = "9912ea868";
|
|
196345
|
+
CLI_VERSION = "0.33.0-preview.6";
|
|
196328
196346
|
}
|
|
196329
196347
|
});
|
|
196330
196348
|
|
|
@@ -207544,7 +207562,7 @@ var require_googleauth3 = __commonJS({
|
|
|
207544
207562
|
var child_process_1 = __require("child_process");
|
|
207545
207563
|
var fs131 = __require("fs");
|
|
207546
207564
|
var gcpMetadata = require_src45();
|
|
207547
|
-
var
|
|
207565
|
+
var os39 = __require("os");
|
|
207548
207566
|
var path152 = __require("path");
|
|
207549
207567
|
var crypto_1 = require_crypto9();
|
|
207550
207568
|
var transporters_1 = require_transporters();
|
|
@@ -207985,7 +208003,7 @@ var require_googleauth3 = __commonJS({
|
|
|
207985
208003
|
* @api private
|
|
207986
208004
|
*/
|
|
207987
208005
|
_isWindows() {
|
|
207988
|
-
const sys =
|
|
208006
|
+
const sys = os39.platform();
|
|
207989
208007
|
if (sys && sys.length >= 3) {
|
|
207990
208008
|
if (sys.substring(0, 3).toLowerCase() === "win") {
|
|
207991
208009
|
return true;
|
|
@@ -209177,13 +209195,13 @@ var require_src48 = __commonJS({
|
|
|
209177
209195
|
};
|
|
209178
209196
|
function mapOtelResourceToMonitoredResource(resource) {
|
|
209179
209197
|
const attrs = resource.attributes;
|
|
209180
|
-
const
|
|
209198
|
+
const platform21 = attrs[semantic_conventions_1.SEMRESATTRS_CLOUD_PLATFORM];
|
|
209181
209199
|
let mr;
|
|
209182
|
-
if (
|
|
209200
|
+
if (platform21 === semantic_conventions_1.CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE) {
|
|
209183
209201
|
mr = createMonitoredResource(GCE_INSTANCE, attrs);
|
|
209184
|
-
} else if (
|
|
209202
|
+
} else if (platform21 === semantic_conventions_1.CLOUDPLATFORMVALUES_GCP_APP_ENGINE) {
|
|
209185
209203
|
mr = createMonitoredResource(GAE_INSTANCE, attrs);
|
|
209186
|
-
} else if (
|
|
209204
|
+
} else if (platform21 === semantic_conventions_1.CLOUDPLATFORMVALUES_AWS_EC2) {
|
|
209187
209205
|
mr = createMonitoredResource(AWS_EC2_INSTANCE, attrs);
|
|
209188
209206
|
} else if (semantic_conventions_1.SEMRESATTRS_K8S_CLUSTER_NAME in attrs) {
|
|
209189
209207
|
if (semantic_conventions_1.SEMRESATTRS_K8S_CONTAINER_NAME in attrs) {
|
|
@@ -226275,7 +226293,7 @@ var require_grpc = __commonJS({
|
|
|
226275
226293
|
var fs131 = __require("fs");
|
|
226276
226294
|
var google_auth_library_1 = require_src47();
|
|
226277
226295
|
var grpc = require_src16();
|
|
226278
|
-
var
|
|
226296
|
+
var os39 = __require("os");
|
|
226279
226297
|
var path_1 = __require("path");
|
|
226280
226298
|
var path152 = __require("path");
|
|
226281
226299
|
var protobuf = require_protobufjs();
|
|
@@ -226580,7 +226598,7 @@ var require_grpc = __commonJS({
|
|
|
226580
226598
|
if ((opts === null || opts === void 0 ? void 0 : opts.cert) && (opts === null || opts === void 0 ? void 0 : opts.key)) {
|
|
226581
226599
|
return [opts.cert, opts.key];
|
|
226582
226600
|
}
|
|
226583
|
-
const metadataPath = (0, path_1.join)(
|
|
226601
|
+
const metadataPath = (0, path_1.join)(os39.homedir(), ".secureConnect", "context_aware_metadata.json");
|
|
226584
226602
|
const metadata2 = JSON.parse(await readFileAsync(metadataPath));
|
|
226585
226603
|
if (!metadata2.cert_provider_command) {
|
|
226586
226604
|
throw Error("no cert_provider_command found");
|
|
@@ -292792,7 +292810,7 @@ function getVersion() {
|
|
|
292792
292810
|
}
|
|
292793
292811
|
versionPromise = (async () => {
|
|
292794
292812
|
const pkgJson = await getPackageJson(__dirname3);
|
|
292795
|
-
return "0.33.0-preview.
|
|
292813
|
+
return "0.33.0-preview.6";
|
|
292796
292814
|
})();
|
|
292797
292815
|
return versionPromise;
|
|
292798
292816
|
}
|
|
@@ -292813,21 +292831,21 @@ var init_version5 = __esm({
|
|
|
292813
292831
|
import { fileURLToPath as fileURLToPath6 } from "node:url";
|
|
292814
292832
|
import path17 from "node:path";
|
|
292815
292833
|
function getPlatform() {
|
|
292816
|
-
const
|
|
292834
|
+
const platform21 = process.platform;
|
|
292817
292835
|
const arch5 = process.arch;
|
|
292818
|
-
if (
|
|
292836
|
+
if (platform21 === "darwin" && arch5 === "x64") {
|
|
292819
292837
|
return "DARWIN_AMD64";
|
|
292820
292838
|
}
|
|
292821
|
-
if (
|
|
292839
|
+
if (platform21 === "darwin" && arch5 === "arm64") {
|
|
292822
292840
|
return "DARWIN_ARM64";
|
|
292823
292841
|
}
|
|
292824
|
-
if (
|
|
292842
|
+
if (platform21 === "linux" && arch5 === "x64") {
|
|
292825
292843
|
return "LINUX_AMD64";
|
|
292826
292844
|
}
|
|
292827
|
-
if (
|
|
292845
|
+
if (platform21 === "linux" && arch5 === "arm64") {
|
|
292828
292846
|
return "LINUX_ARM64";
|
|
292829
292847
|
}
|
|
292830
|
-
if (
|
|
292848
|
+
if (platform21 === "win32" && arch5 === "x64") {
|
|
292831
292849
|
return "WINDOWS_AMD64";
|
|
292832
292850
|
}
|
|
292833
292851
|
return "PLATFORM_UNSPECIFIED";
|
|
@@ -301668,7 +301686,7 @@ var init_esm8 = __esm({
|
|
|
301668
301686
|
// node_modules/path-scurry/dist/esm/index.js
|
|
301669
301687
|
import { posix as posix2, win32 } from "node:path";
|
|
301670
301688
|
import { fileURLToPath as fileURLToPath7 } from "node:url";
|
|
301671
|
-
import { lstatSync, readdir as readdirCB, readdirSync, readlinkSync, realpathSync as rps } from "fs";
|
|
301689
|
+
import { lstatSync as lstatSync2, readdir as readdirCB, readdirSync, readlinkSync as readlinkSync2, realpathSync as rps } from "fs";
|
|
301672
301690
|
import * as actualFS from "node:fs";
|
|
301673
301691
|
import { lstat, readdir, readlink, realpath } from "node:fs/promises";
|
|
301674
301692
|
var realpathSync2, defaultFS, fsFromOption, uncDriveRegexp, uncToDrive, eitherSep, UNKNOWN, IFIFO, IFCHR, IFDIR, IFBLK, IFREG, IFLNK, IFSOCK, IFMT, IFMT_UNKNOWN, READDIR_CALLED, LSTAT_CALLED, ENOTDIR, ENOENT, ENOREADLINK, ENOREALPATH, ENOCHILD, TYPEMASK, entToType, normalizeCache, normalize, normalizeNocaseCache, normalizeNocase, ResolveCache, ChildrenCache, setAsCwd, PathBase, PathWin32, PathPosix, PathScurryBase, PathScurryWin32, PathScurryPosix, PathScurryDarwin, Path, PathScurry;
|
|
@@ -301678,10 +301696,10 @@ var init_esm9 = __esm({
|
|
|
301678
301696
|
init_esm8();
|
|
301679
301697
|
realpathSync2 = rps.native;
|
|
301680
301698
|
defaultFS = {
|
|
301681
|
-
lstatSync,
|
|
301699
|
+
lstatSync: lstatSync2,
|
|
301682
301700
|
readdir: readdirCB,
|
|
301683
301701
|
readdirSync,
|
|
301684
|
-
readlinkSync,
|
|
301702
|
+
readlinkSync: readlinkSync2,
|
|
301685
301703
|
realpathSync: realpathSync2,
|
|
301686
301704
|
promises: {
|
|
301687
301705
|
lstat,
|
|
@@ -303424,7 +303442,7 @@ var init_pattern = __esm({
|
|
|
303424
303442
|
#isUNC;
|
|
303425
303443
|
#isAbsolute;
|
|
303426
303444
|
#followGlobstar = true;
|
|
303427
|
-
constructor(patternList, globList, index,
|
|
303445
|
+
constructor(patternList, globList, index, platform21) {
|
|
303428
303446
|
if (!isPatternList(patternList)) {
|
|
303429
303447
|
throw new TypeError("empty pattern list");
|
|
303430
303448
|
}
|
|
@@ -303441,7 +303459,7 @@ var init_pattern = __esm({
|
|
|
303441
303459
|
this.#patternList = patternList;
|
|
303442
303460
|
this.#globList = globList;
|
|
303443
303461
|
this.#index = index;
|
|
303444
|
-
this.#platform =
|
|
303462
|
+
this.#platform = platform21;
|
|
303445
303463
|
if (this.#index === 0) {
|
|
303446
303464
|
if (this.isUNC()) {
|
|
303447
303465
|
const [p0, p1, p2, p3, ...prest] = this.#patternList;
|
|
@@ -303590,12 +303608,12 @@ var init_ignore = __esm({
|
|
|
303590
303608
|
absoluteChildren;
|
|
303591
303609
|
platform;
|
|
303592
303610
|
mmopts;
|
|
303593
|
-
constructor(ignored, { nobrace, nocase, noext, noglobstar, platform:
|
|
303611
|
+
constructor(ignored, { nobrace, nocase, noext, noglobstar, platform: platform21 = defaultPlatform2 }) {
|
|
303594
303612
|
this.relative = [];
|
|
303595
303613
|
this.absolute = [];
|
|
303596
303614
|
this.relativeChildren = [];
|
|
303597
303615
|
this.absoluteChildren = [];
|
|
303598
|
-
this.platform =
|
|
303616
|
+
this.platform = platform21;
|
|
303599
303617
|
this.mmopts = {
|
|
303600
303618
|
dot: true,
|
|
303601
303619
|
nobrace,
|
|
@@ -303603,7 +303621,7 @@ var init_ignore = __esm({
|
|
|
303603
303621
|
noext,
|
|
303604
303622
|
noglobstar,
|
|
303605
303623
|
optimizationLevel: 2,
|
|
303606
|
-
platform:
|
|
303624
|
+
platform: platform21,
|
|
303607
303625
|
nocomment: true,
|
|
303608
303626
|
nonegate: true
|
|
303609
303627
|
};
|
|
@@ -310900,8 +310918,8 @@ var require_path_key = __commonJS({
|
|
|
310900
310918
|
"use strict";
|
|
310901
310919
|
var pathKey2 = (options = {}) => {
|
|
310902
310920
|
const environment = options.env || process.env;
|
|
310903
|
-
const
|
|
310904
|
-
if (
|
|
310921
|
+
const platform21 = options.platform || process.platform;
|
|
310922
|
+
if (platform21 !== "win32") {
|
|
310905
310923
|
return "PATH";
|
|
310906
310924
|
}
|
|
310907
310925
|
return Object.keys(environment).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
|
|
@@ -311171,9 +311189,9 @@ var require_cross_spawn = __commonJS({
|
|
|
311171
311189
|
function pathKey(options = {}) {
|
|
311172
311190
|
const {
|
|
311173
311191
|
env: env6 = process.env,
|
|
311174
|
-
platform:
|
|
311192
|
+
platform: platform21 = process.platform
|
|
311175
311193
|
} = options;
|
|
311176
|
-
if (
|
|
311194
|
+
if (platform21 !== "win32") {
|
|
311177
311195
|
return "PATH";
|
|
311178
311196
|
}
|
|
311179
311197
|
return Object.keys(env6).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
|
|
@@ -330018,8 +330036,8 @@ var init_downloadRipGrep = __esm({
|
|
|
330018
330036
|
BIN_PATH = join10(__dirname5, "../bin");
|
|
330019
330037
|
getTarget = () => {
|
|
330020
330038
|
const arch5 = process.env.npm_config_arch || os14.arch();
|
|
330021
|
-
const
|
|
330022
|
-
switch (
|
|
330039
|
+
const platform21 = process.env.platform || os14.platform();
|
|
330040
|
+
switch (platform21) {
|
|
330023
330041
|
case "darwin":
|
|
330024
330042
|
switch (arch5) {
|
|
330025
330043
|
case "arm64":
|
|
@@ -330053,7 +330071,7 @@ var init_downloadRipGrep = __esm({
|
|
|
330053
330071
|
return "i686-unknown-linux-musl.tar.gz";
|
|
330054
330072
|
}
|
|
330055
330073
|
default:
|
|
330056
|
-
throw new VError("Unknown platform: " +
|
|
330074
|
+
throw new VError("Unknown platform: " + platform21);
|
|
330057
330075
|
}
|
|
330058
330076
|
};
|
|
330059
330077
|
downloadFile2 = async (url4, outFile) => {
|
|
@@ -331743,11 +331761,11 @@ async function getIdeProcessInfoForWindows() {
|
|
|
331743
331761
|
return { pid: myPid, command: myProc.command };
|
|
331744
331762
|
}
|
|
331745
331763
|
async function getIdeProcessInfo() {
|
|
331746
|
-
const
|
|
331764
|
+
const platform21 = os16.platform();
|
|
331747
331765
|
if (process.env["GEMINI_CLI_IDE_PID"]) {
|
|
331748
331766
|
const idePid = parseInt(process.env["GEMINI_CLI_IDE_PID"], 10);
|
|
331749
331767
|
if (!isNaN(idePid) && idePid > 0) {
|
|
331750
|
-
if (
|
|
331768
|
+
if (platform21 === "win32") {
|
|
331751
331769
|
const processMap = await getProcessTableWindows();
|
|
331752
331770
|
const proc2 = processMap.get(idePid);
|
|
331753
331771
|
return { pid: idePid, command: proc2?.command || "" };
|
|
@@ -331756,7 +331774,7 @@ async function getIdeProcessInfo() {
|
|
|
331756
331774
|
return { pid: idePid, command: command2 };
|
|
331757
331775
|
}
|
|
331758
331776
|
}
|
|
331759
|
-
if (
|
|
331777
|
+
if (platform21 === "win32") {
|
|
331760
331778
|
return getIdeProcessInfoForWindows();
|
|
331761
331779
|
}
|
|
331762
331780
|
return getIdeProcessInfoForUnix();
|
|
@@ -398351,7 +398369,7 @@ async function getEnvironmentContext(config2) {
|
|
|
398351
398369
|
month: "long",
|
|
398352
398370
|
day: "numeric"
|
|
398353
398371
|
});
|
|
398354
|
-
const
|
|
398372
|
+
const platform21 = process.platform;
|
|
398355
398373
|
const directoryContext = config2.getIncludeDirectoryTree() ? await getDirectoryContextString(config2) : "";
|
|
398356
398374
|
const tempDir = config2.storage.getProjectTempDir();
|
|
398357
398375
|
const environmentMemory = config2.getEnvironmentMemory();
|
|
@@ -398359,7 +398377,7 @@ async function getEnvironmentContext(config2) {
|
|
|
398359
398377
|
<session_context>
|
|
398360
398378
|
This is the Gemini CLI. We are setting up the context for our chat.
|
|
398361
398379
|
Today's date is ${today} (formatted according to the user's locale).
|
|
398362
|
-
My operating system is: ${
|
|
398380
|
+
My operating system is: ${platform21}
|
|
398363
398381
|
The project's temporary directory is: ${tempDir}
|
|
398364
398382
|
${directoryContext}
|
|
398365
398383
|
|
|
@@ -411575,8 +411593,8 @@ var WorkspaceContext;
|
|
|
411575
411593
|
var init_workspaceContext = __esm({
|
|
411576
411594
|
"packages/core/dist/src/utils/workspaceContext.js"() {
|
|
411577
411595
|
"use strict";
|
|
411578
|
-
init_errors();
|
|
411579
411596
|
init_debugLogger();
|
|
411597
|
+
init_paths();
|
|
411580
411598
|
WorkspaceContext = class {
|
|
411581
411599
|
targetDir;
|
|
411582
411600
|
directories = /* @__PURE__ */ new Set();
|
|
@@ -411746,16 +411764,7 @@ var init_workspaceContext = __esm({
|
|
|
411746
411764
|
* if it did exist.
|
|
411747
411765
|
*/
|
|
411748
411766
|
fullyResolvedPath(pathToCheck) {
|
|
411749
|
-
|
|
411750
|
-
return fs46.realpathSync(path60.resolve(this.targetDir, pathToCheck));
|
|
411751
|
-
} catch (e3) {
|
|
411752
|
-
if (isNodeError(e3) && e3.code === "ENOENT" && e3.path && // realpathSync does not set e.path correctly for symlinks to
|
|
411753
|
-
// non-existent files.
|
|
411754
|
-
!this.isFileSymlink(e3.path)) {
|
|
411755
|
-
return e3.path;
|
|
411756
|
-
}
|
|
411757
|
-
throw e3;
|
|
411758
|
-
}
|
|
411767
|
+
return resolveToRealPath(path60.resolve(this.targetDir, pathToCheck));
|
|
411759
411768
|
}
|
|
411760
411769
|
/**
|
|
411761
411770
|
* Checks if a path is within a given root directory.
|
|
@@ -411767,16 +411776,6 @@ var init_workspaceContext = __esm({
|
|
|
411767
411776
|
const relative13 = path60.relative(rootDirectory, pathToCheck);
|
|
411768
411777
|
return !relative13.startsWith(`..${path60.sep}`) && relative13 !== ".." && !path60.isAbsolute(relative13);
|
|
411769
411778
|
}
|
|
411770
|
-
/**
|
|
411771
|
-
* Checks if a file path is a symbolic link that points to a file.
|
|
411772
|
-
*/
|
|
411773
|
-
isFileSymlink(filePath) {
|
|
411774
|
-
try {
|
|
411775
|
-
return !fs46.readlinkSync(filePath).endsWith("/");
|
|
411776
|
-
} catch (_error) {
|
|
411777
|
-
return false;
|
|
411778
|
-
}
|
|
411779
|
-
}
|
|
411780
411779
|
};
|
|
411781
411780
|
}
|
|
411782
411781
|
});
|
|
@@ -433177,7 +433176,6 @@ ${clientInstructions}
|
|
|
433177
433176
|
// packages/core/dist/src/config/config.js
|
|
433178
433177
|
import * as fs59 from "node:fs";
|
|
433179
433178
|
import * as path73 from "node:path";
|
|
433180
|
-
import * as os26 from "node:os";
|
|
433181
433179
|
import { inspect as inspect4 } from "node:util";
|
|
433182
433180
|
import process36 from "node:process";
|
|
433183
433181
|
var DEFAULT_TRUNCATE_TOOL_OUTPUT_THRESHOLD, MCPServerConfig, AuthProviderType, Config;
|
|
@@ -434548,22 +434546,13 @@ var init_config4 = __esm({
|
|
|
434548
434546
|
* @returns true if the path is allowed, false otherwise.
|
|
434549
434547
|
*/
|
|
434550
434548
|
isPathAllowed(absolutePath) {
|
|
434551
|
-
const
|
|
434552
|
-
let resolved;
|
|
434553
|
-
try {
|
|
434554
|
-
resolved = fs59.realpathSync(p);
|
|
434555
|
-
} catch {
|
|
434556
|
-
resolved = path73.resolve(p);
|
|
434557
|
-
}
|
|
434558
|
-
return os26.platform() === "win32" ? resolved.toLowerCase() : resolved;
|
|
434559
|
-
};
|
|
434560
|
-
const resolvedPath = realpath3(absolutePath);
|
|
434549
|
+
const resolvedPath = resolveToRealPath(absolutePath);
|
|
434561
434550
|
const workspaceContext = this.getWorkspaceContext();
|
|
434562
434551
|
if (workspaceContext.isPathWithinWorkspace(resolvedPath)) {
|
|
434563
434552
|
return true;
|
|
434564
434553
|
}
|
|
434565
434554
|
const projectTempDir = this.storage.getProjectTempDir();
|
|
434566
|
-
const resolvedTempDir =
|
|
434555
|
+
const resolvedTempDir = resolveToRealPath(projectTempDir);
|
|
434567
434556
|
return isSubpath(resolvedTempDir, resolvedPath);
|
|
434568
434557
|
}
|
|
434569
434558
|
/**
|
|
@@ -436124,8 +436113,8 @@ var require_utils20 = __commonJS({
|
|
|
436124
436113
|
exports2.toPosixSlashes = (str2) => str2.replace(REGEX_BACKSLASH, "/");
|
|
436125
436114
|
exports2.isWindows = () => {
|
|
436126
436115
|
if (typeof navigator !== "undefined" && navigator.platform) {
|
|
436127
|
-
const
|
|
436128
|
-
return
|
|
436116
|
+
const platform21 = navigator.platform.toLowerCase();
|
|
436117
|
+
return platform21 === "win32" || platform21 === "windows";
|
|
436129
436118
|
}
|
|
436130
436119
|
if (typeof process !== "undefined" && process.platform) {
|
|
436131
436120
|
return process.platform === "win32";
|
|
@@ -439950,9 +439939,9 @@ import * as child_process from "node:child_process";
|
|
|
439950
439939
|
import * as process37 from "node:process";
|
|
439951
439940
|
import * as path81 from "node:path";
|
|
439952
439941
|
import * as fs65 from "node:fs";
|
|
439953
|
-
async function findCommand(command2,
|
|
439942
|
+
async function findCommand(command2, platform21 = process37.platform) {
|
|
439954
439943
|
try {
|
|
439955
|
-
if (
|
|
439944
|
+
if (platform21 === "win32") {
|
|
439956
439945
|
const result2 = child_process.execSync(`where.exe ${command2}`).toString().trim();
|
|
439957
439946
|
const firstPath = result2.split(/\r?\n/)[0];
|
|
439958
439947
|
if (firstPath) {
|
|
@@ -439987,17 +439976,17 @@ async function findCommand(command2, platform22 = process37.platform) {
|
|
|
439987
439976
|
appname = "positron";
|
|
439988
439977
|
}
|
|
439989
439978
|
if (appname) {
|
|
439990
|
-
if (
|
|
439979
|
+
if (platform21 === "darwin") {
|
|
439991
439980
|
const macConfig = appConfigs[appname].mac;
|
|
439992
439981
|
if (macConfig) {
|
|
439993
439982
|
locations.push(`/Applications/${macConfig.appName}.app/Contents/Resources/app/bin/${appname}`, path81.join(homeDir, `Library/Application Support/${macConfig.supportDirName}/bin/${appname}`));
|
|
439994
439983
|
}
|
|
439995
|
-
} else if (
|
|
439984
|
+
} else if (platform21 === "linux") {
|
|
439996
439985
|
const linuxConfig = appConfigs[appname]?.linux;
|
|
439997
439986
|
if (linuxConfig) {
|
|
439998
439987
|
locations.push(`/usr/share/${linuxConfig.appBinary}/bin/${linuxConfig.appBinary}`, `/snap/bin/${linuxConfig.appBinary}`, path81.join(homeDir, `.local/share/${linuxConfig.appBinary}/bin/${linuxConfig.appBinary}`));
|
|
439999
439988
|
}
|
|
440000
|
-
} else if (
|
|
439989
|
+
} else if (platform21 === "win32") {
|
|
440001
439990
|
const winConfig = appConfigs[appname].win;
|
|
440002
439991
|
if (winConfig) {
|
|
440003
439992
|
const winAppName = winConfig.appName;
|
|
@@ -440012,15 +440001,15 @@ async function findCommand(command2, platform22 = process37.platform) {
|
|
|
440012
440001
|
}
|
|
440013
440002
|
return null;
|
|
440014
440003
|
}
|
|
440015
|
-
function getIdeInstaller(ide,
|
|
440004
|
+
function getIdeInstaller(ide, platform21 = process37.platform) {
|
|
440016
440005
|
switch (ide.name) {
|
|
440017
440006
|
case IDE_DEFINITIONS.vscode.name:
|
|
440018
440007
|
case IDE_DEFINITIONS.firebasestudio.name:
|
|
440019
|
-
return new VsCodeInstaller(ide,
|
|
440008
|
+
return new VsCodeInstaller(ide, platform21);
|
|
440020
440009
|
case IDE_DEFINITIONS.positron.name:
|
|
440021
|
-
return new PositronInstaller(ide,
|
|
440010
|
+
return new PositronInstaller(ide, platform21);
|
|
440022
440011
|
case IDE_DEFINITIONS.antigravity.name:
|
|
440023
|
-
return new AntigravityInstaller(ide,
|
|
440012
|
+
return new AntigravityInstaller(ide, platform21);
|
|
440024
440013
|
default:
|
|
440025
440014
|
return null;
|
|
440026
440015
|
}
|
|
@@ -440036,11 +440025,11 @@ var init_ide_installer = __esm({
|
|
|
440036
440025
|
ideInfo;
|
|
440037
440026
|
platform;
|
|
440038
440027
|
vsCodeCommand;
|
|
440039
|
-
constructor(ideInfo,
|
|
440028
|
+
constructor(ideInfo, platform21 = process37.platform) {
|
|
440040
440029
|
this.ideInfo = ideInfo;
|
|
440041
|
-
this.platform =
|
|
440042
|
-
const command2 =
|
|
440043
|
-
this.vsCodeCommand = findCommand(command2,
|
|
440030
|
+
this.platform = platform21;
|
|
440031
|
+
const command2 = platform21 === "win32" ? "code.cmd" : "code";
|
|
440032
|
+
this.vsCodeCommand = findCommand(command2, platform21);
|
|
440044
440033
|
}
|
|
440045
440034
|
async install() {
|
|
440046
440035
|
const commandPath = await this.vsCodeCommand;
|
|
@@ -440075,11 +440064,11 @@ var init_ide_installer = __esm({
|
|
|
440075
440064
|
ideInfo;
|
|
440076
440065
|
platform;
|
|
440077
440066
|
vsCodeCommand;
|
|
440078
|
-
constructor(ideInfo,
|
|
440067
|
+
constructor(ideInfo, platform21 = process37.platform) {
|
|
440079
440068
|
this.ideInfo = ideInfo;
|
|
440080
|
-
this.platform =
|
|
440081
|
-
const command2 =
|
|
440082
|
-
this.vsCodeCommand = findCommand(command2,
|
|
440069
|
+
this.platform = platform21;
|
|
440070
|
+
const command2 = platform21 === "win32" ? "positron.cmd" : "positron";
|
|
440071
|
+
this.vsCodeCommand = findCommand(command2, platform21);
|
|
440083
440072
|
}
|
|
440084
440073
|
async install() {
|
|
440085
440074
|
const commandPath = await this.vsCodeCommand;
|
|
@@ -440113,9 +440102,9 @@ var init_ide_installer = __esm({
|
|
|
440113
440102
|
AntigravityInstaller = class {
|
|
440114
440103
|
ideInfo;
|
|
440115
440104
|
platform;
|
|
440116
|
-
constructor(ideInfo,
|
|
440105
|
+
constructor(ideInfo, platform21 = process37.platform) {
|
|
440117
440106
|
this.ideInfo = ideInfo;
|
|
440118
|
-
this.platform =
|
|
440107
|
+
this.platform = platform21;
|
|
440119
440108
|
}
|
|
440120
440109
|
async install() {
|
|
440121
440110
|
const command2 = process37.env["ANTIGRAVITY_CLI_ALIAS"];
|
|
@@ -440468,12 +440457,12 @@ ${fileContentForLlm}
|
|
|
440468
440457
|
});
|
|
440469
440458
|
|
|
440470
440459
|
// packages/core/dist/src/utils/compatibility.js
|
|
440471
|
-
import
|
|
440460
|
+
import os26 from "node:os";
|
|
440472
440461
|
function isWindows10() {
|
|
440473
|
-
if (
|
|
440462
|
+
if (os26.platform() !== "win32") {
|
|
440474
440463
|
return false;
|
|
440475
440464
|
}
|
|
440476
|
-
const release2 =
|
|
440465
|
+
const release2 = os26.release();
|
|
440477
440466
|
const parts2 = release2.split(".");
|
|
440478
440467
|
if (parts2.length >= 3 && parts2[0] === "10" && parts2[1] === "0") {
|
|
440479
440468
|
const build2 = parseInt(parts2[2], 10);
|
|
@@ -440521,7 +440510,7 @@ function getCompatibilityWarnings(options) {
|
|
|
440521
440510
|
darwin: "iTerm2 or Ghostty",
|
|
440522
440511
|
linux: "Ghostty"
|
|
440523
440512
|
};
|
|
440524
|
-
const suggestion = platformTerminals[
|
|
440513
|
+
const suggestion = platformTerminals[os26.platform()];
|
|
440525
440514
|
const suggestedTerminals = suggestion ? ` (e.g., ${suggestion})` : "";
|
|
440526
440515
|
warnings.push({
|
|
440527
440516
|
id: "jetbrains-terminal",
|
|
@@ -441735,7 +441724,7 @@ var require_main2 = __commonJS({
|
|
|
441735
441724
|
"node_modules/dotenv/lib/main.js"(exports2, module2) {
|
|
441736
441725
|
var fs131 = __require("fs");
|
|
441737
441726
|
var path152 = __require("path");
|
|
441738
|
-
var
|
|
441727
|
+
var os39 = __require("os");
|
|
441739
441728
|
var crypto28 = __require("crypto");
|
|
441740
441729
|
var packageJson2 = require_package13();
|
|
441741
441730
|
var version5 = packageJson2.version;
|
|
@@ -441888,7 +441877,7 @@ var require_main2 = __commonJS({
|
|
|
441888
441877
|
return null;
|
|
441889
441878
|
}
|
|
441890
441879
|
function _resolveHome(envPath) {
|
|
441891
|
-
return envPath[0] === "~" ? path152.join(
|
|
441880
|
+
return envPath[0] === "~" ? path152.join(os39.homedir(), envPath.slice(1)) : envPath;
|
|
441892
441881
|
}
|
|
441893
441882
|
function _configVault(options) {
|
|
441894
441883
|
const debug2 = parseBoolean(process.env.DOTENV_CONFIG_DEBUG || options && options.debug);
|
|
@@ -452003,7 +451992,7 @@ var require_signal_exit4 = __commonJS({
|
|
|
452003
451992
|
var require_kill = __commonJS({
|
|
452004
451993
|
"node_modules/run-jxa/node_modules/execa/lib/kill.js"(exports2, module2) {
|
|
452005
451994
|
"use strict";
|
|
452006
|
-
var
|
|
451995
|
+
var os39 = __require("os");
|
|
452007
451996
|
var onExit2 = require_signal_exit4();
|
|
452008
451997
|
var DEFAULT_FORCE_KILL_TIMEOUT2 = 1e3 * 5;
|
|
452009
451998
|
var spawnedKill = (kill, signal = "SIGTERM", options = {}) => {
|
|
@@ -452027,7 +452016,7 @@ var require_kill = __commonJS({
|
|
|
452027
452016
|
return isSigterm(signal) && forceKillAfterTimeout !== false && killResult;
|
|
452028
452017
|
};
|
|
452029
452018
|
var isSigterm = (signal) => {
|
|
452030
|
-
return signal ===
|
|
452019
|
+
return signal === os39.constants.signals.SIGTERM || typeof signal === "string" && signal.toUpperCase() === "SIGTERM";
|
|
452031
452020
|
};
|
|
452032
452021
|
var getForceKillAfterTimeout = ({ forceKillAfterTimeout = true }) => {
|
|
452033
452022
|
if (forceKillAfterTimeout === true) {
|
|
@@ -457004,7 +456993,7 @@ var require_has_flag2 = __commonJS({
|
|
|
457004
456993
|
var require_supports_color2 = __commonJS({
|
|
457005
456994
|
"node_modules/chalk/node_modules/supports-color/index.js"(exports2, module2) {
|
|
457006
456995
|
"use strict";
|
|
457007
|
-
var
|
|
456996
|
+
var os39 = __require("os");
|
|
457008
456997
|
var tty4 = __require("tty");
|
|
457009
456998
|
var hasFlag2 = require_has_flag2();
|
|
457010
456999
|
var { env: env6 } = process;
|
|
@@ -457052,7 +457041,7 @@ var require_supports_color2 = __commonJS({
|
|
|
457052
457041
|
return min;
|
|
457053
457042
|
}
|
|
457054
457043
|
if (process.platform === "win32") {
|
|
457055
|
-
const osRelease =
|
|
457044
|
+
const osRelease = os39.release().split(".");
|
|
457056
457045
|
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
457057
457046
|
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
457058
457047
|
}
|
|
@@ -466477,9 +466466,9 @@ var require_conf = __commonJS({
|
|
|
466477
466466
|
var require_defaults4 = __commonJS({
|
|
466478
466467
|
"node_modules/@pnpm/npm-conf/lib/defaults.js"(exports2) {
|
|
466479
466468
|
"use strict";
|
|
466480
|
-
var
|
|
466469
|
+
var os39 = __require("os");
|
|
466481
466470
|
var path152 = __require("path");
|
|
466482
|
-
var temp =
|
|
466471
|
+
var temp = os39.tmpdir();
|
|
466483
466472
|
var uidOrPid = process.getuid ? process.getuid() : process.pid;
|
|
466484
466473
|
var hasUnicode = () => true;
|
|
466485
466474
|
var isWindows7 = process.platform === "win32";
|
|
@@ -466490,7 +466479,7 @@ var require_defaults4 = __commonJS({
|
|
|
466490
466479
|
var umask2 = {
|
|
466491
466480
|
fromString: () => process.umask()
|
|
466492
466481
|
};
|
|
466493
|
-
var home =
|
|
466482
|
+
var home = os39.homedir();
|
|
466494
466483
|
if (home) {
|
|
466495
466484
|
process.env.HOME = home;
|
|
466496
466485
|
} else {
|
|
@@ -479427,7 +479416,7 @@ init_dist8();
|
|
|
479427
479416
|
var import_strip_json_comments3 = __toESM(require_strip_json_comments(), 1);
|
|
479428
479417
|
import * as fs71 from "node:fs";
|
|
479429
479418
|
import * as path87 from "node:path";
|
|
479430
|
-
import { platform as
|
|
479419
|
+
import { platform as platform13 } from "node:os";
|
|
479431
479420
|
import process38 from "node:process";
|
|
479432
479421
|
|
|
479433
479422
|
// packages/cli/src/ui/themes/color-utils.ts
|
|
@@ -485186,9 +485175,9 @@ function getSystemSettingsPath() {
|
|
|
485186
485175
|
if (process38.env["GEMINI_CLI_SYSTEM_SETTINGS_PATH"]) {
|
|
485187
485176
|
return process38.env["GEMINI_CLI_SYSTEM_SETTINGS_PATH"];
|
|
485188
485177
|
}
|
|
485189
|
-
if (
|
|
485178
|
+
if (platform13() === "darwin") {
|
|
485190
485179
|
return "/Library/Application Support/GeminiCli/settings.json";
|
|
485191
|
-
} else if (
|
|
485180
|
+
} else if (platform13() === "win32") {
|
|
485192
485181
|
return "C:\\ProgramData\\gemini-cli\\settings.json";
|
|
485193
485182
|
} else {
|
|
485194
485183
|
return "/etc/gemini-cli/settings.json";
|
|
@@ -489672,18 +489661,18 @@ import process43 from "node:process";
|
|
|
489672
489661
|
import childProcess2 from "node:child_process";
|
|
489673
489662
|
var execFilePromises = promisify16(childProcess2.execFile);
|
|
489674
489663
|
function systemArchitectureSync() {
|
|
489675
|
-
const { arch: arch5, platform:
|
|
489676
|
-
if (
|
|
489664
|
+
const { arch: arch5, platform: platform21, env: env6 } = process43;
|
|
489665
|
+
if (platform21 === "darwin" && arch5 === "x64") {
|
|
489677
489666
|
const stdout = childProcess2.execFileSync("sysctl", ["-inq", "sysctl.proc_translated"], { encoding: "utf8" });
|
|
489678
489667
|
return stdout.trim() === "1" ? "arm64" : "x64";
|
|
489679
489668
|
}
|
|
489680
489669
|
if (arch5 === "arm64" || arch5 === "x64") {
|
|
489681
489670
|
return arch5;
|
|
489682
489671
|
}
|
|
489683
|
-
if (
|
|
489672
|
+
if (platform21 === "win32" && Object.hasOwn(env6, "PROCESSOR_ARCHITEW6432")) {
|
|
489684
489673
|
return "x64";
|
|
489685
489674
|
}
|
|
489686
|
-
if (
|
|
489675
|
+
if (platform21 === "linux") {
|
|
489687
489676
|
const stdout = childProcess2.execFileSync("getconf", ["LONG_BIT"], { encoding: "utf8" });
|
|
489688
489677
|
if (stdout.trim() === "64") {
|
|
489689
489678
|
return "x64";
|
|
@@ -490610,7 +490599,7 @@ var import_react32 = __toESM(require_react(), 1);
|
|
|
490610
490599
|
init_mnemonist();
|
|
490611
490600
|
init_dist8();
|
|
490612
490601
|
import fs79 from "node:fs";
|
|
490613
|
-
import
|
|
490602
|
+
import os27 from "node:os";
|
|
490614
490603
|
import pathMod from "node:path";
|
|
490615
490604
|
import * as path93 from "node:path";
|
|
490616
490605
|
|
|
@@ -494215,7 +494204,7 @@ function useTextBuffer({
|
|
|
494215
494204
|
dispatch({ type: "vim_escape_insert_mode" });
|
|
494216
494205
|
}, []);
|
|
494217
494206
|
const openInExternalEditor = (0, import_react32.useCallback)(async () => {
|
|
494218
|
-
const tmpDir = fs79.mkdtempSync(pathMod.join(
|
|
494207
|
+
const tmpDir = fs79.mkdtempSync(pathMod.join(os27.tmpdir(), "gemini-edit-"));
|
|
494219
494208
|
const filePath = pathMod.join(tmpDir, "buffer.txt");
|
|
494220
494209
|
const expandedText = text.replace(
|
|
494221
494210
|
PASTED_TEXT_PLACEHOLDER_REGEX,
|
|
@@ -515077,7 +515066,7 @@ var WarningMessage = ({ text }) => {
|
|
|
515077
515066
|
};
|
|
515078
515067
|
|
|
515079
515068
|
// packages/cli/src/generated/git-commit.ts
|
|
515080
|
-
var GIT_COMMIT_INFO2 = "
|
|
515069
|
+
var GIT_COMMIT_INFO2 = "5d2983f12";
|
|
515081
515070
|
|
|
515082
515071
|
// packages/cli/src/ui/components/AboutBox.tsx
|
|
515083
515072
|
init_dist8();
|
|
@@ -516633,7 +516622,7 @@ import path100 from "node:path";
|
|
|
516633
516622
|
// packages/cli/src/config/extensions/storage.ts
|
|
516634
516623
|
import * as path99 from "node:path";
|
|
516635
516624
|
import * as fs83 from "node:fs";
|
|
516636
|
-
import * as
|
|
516625
|
+
import * as os28 from "node:os";
|
|
516637
516626
|
|
|
516638
516627
|
// packages/cli/src/config/extensions/variables.ts
|
|
516639
516628
|
import * as path98 from "node:path";
|
|
@@ -516729,7 +516718,7 @@ var ExtensionStorage = class _ExtensionStorage {
|
|
|
516729
516718
|
return new Storage(homedir()).getExtensionsDir();
|
|
516730
516719
|
}
|
|
516731
516720
|
static async createTmpDir() {
|
|
516732
|
-
return fs83.promises.mkdtemp(path99.join(
|
|
516721
|
+
return fs83.promises.mkdtemp(path99.join(os28.tmpdir(), "gemini-extension"));
|
|
516733
516722
|
}
|
|
516734
516723
|
};
|
|
516735
516724
|
|
|
@@ -517077,7 +517066,7 @@ function handleMaxTurnsExceededError(config2) {
|
|
|
517077
517066
|
|
|
517078
517067
|
// packages/cli/src/config/extensions/github.ts
|
|
517079
517068
|
init_dist8();
|
|
517080
|
-
import * as
|
|
517069
|
+
import * as os29 from "node:os";
|
|
517081
517070
|
import * as https5 from "node:https";
|
|
517082
517071
|
import * as fs96 from "node:fs";
|
|
517083
517072
|
import * as path109 from "node:path";
|
|
@@ -518413,8 +518402,8 @@ var parseKVLine = (set3, line) => {
|
|
|
518413
518402
|
init_esm8();
|
|
518414
518403
|
|
|
518415
518404
|
// node_modules/tar/dist/esm/normalize-windows-path.js
|
|
518416
|
-
var
|
|
518417
|
-
var normalizeWindowsPath =
|
|
518405
|
+
var platform14 = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
|
|
518406
|
+
var normalizeWindowsPath = platform14 !== "win32" ? (p) => p : (p) => p && p.replace(/\\/g, "/");
|
|
518418
518407
|
|
|
518419
518408
|
// node_modules/tar/dist/esm/read-entry.js
|
|
518420
518409
|
var ReadEntry = class extends Minipass {
|
|
@@ -520650,8 +520639,8 @@ import path107 from "node:path";
|
|
|
520650
520639
|
|
|
520651
520640
|
// node_modules/tar/dist/esm/get-write-flag.js
|
|
520652
520641
|
import fs90 from "fs";
|
|
520653
|
-
var
|
|
520654
|
-
var isWindows4 =
|
|
520642
|
+
var platform15 = process.env.__FAKE_PLATFORM__ || process.platform;
|
|
520643
|
+
var isWindows4 = platform15 === "win32";
|
|
520655
520644
|
var { O_CREAT, O_TRUNC, O_WRONLY } = fs90.constants;
|
|
520656
520645
|
var UV_FS_O_FILEMAP = Number(process.env.__FAKE_FS_O_FILENAME__) || fs90.constants.UV_FS_O_FILEMAP || 0;
|
|
520657
520646
|
var fMapEnabled = isWindows4 && !!UV_FS_O_FILEMAP;
|
|
@@ -520946,8 +520935,8 @@ var normalizeUnicode = (s4) => {
|
|
|
520946
520935
|
};
|
|
520947
520936
|
|
|
520948
520937
|
// node_modules/tar/dist/esm/path-reservations.js
|
|
520949
|
-
var
|
|
520950
|
-
var isWindows5 =
|
|
520938
|
+
var platform16 = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
|
|
520939
|
+
var isWindows5 = platform16 === "win32";
|
|
520951
520940
|
var getDirs = (path152) => {
|
|
520952
520941
|
const dirs = path152.split("/").slice(0, -1).reduce((set3, path153) => {
|
|
520953
520942
|
const s4 = set3[set3.length - 1];
|
|
@@ -521107,8 +521096,8 @@ var DOCHOWN = Symbol("doChown");
|
|
|
521107
521096
|
var UID = Symbol("uid");
|
|
521108
521097
|
var GID = Symbol("gid");
|
|
521109
521098
|
var CHECKED_CWD = Symbol("checkedCwd");
|
|
521110
|
-
var
|
|
521111
|
-
var isWindows6 =
|
|
521099
|
+
var platform17 = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
|
|
521100
|
+
var isWindows6 = platform17 === "win32";
|
|
521112
521101
|
var DEFAULT_MAX_DEPTH = 1024;
|
|
521113
521102
|
var unlinkFile = (path152, cb) => {
|
|
521114
521103
|
if (!isWindows6) {
|
|
@@ -522415,10 +522404,10 @@ async function downloadFromGitHubRelease(installMetadata, destination, githubRep
|
|
|
522415
522404
|
}
|
|
522416
522405
|
}
|
|
522417
522406
|
function findReleaseAsset(assets) {
|
|
522418
|
-
const
|
|
522419
|
-
const arch5 =
|
|
522420
|
-
const platformArchPrefix = `${
|
|
522421
|
-
const platformPrefix = `${
|
|
522407
|
+
const platform21 = os29.platform();
|
|
522408
|
+
const arch5 = os29.arch();
|
|
522409
|
+
const platformArchPrefix = `${platform21}.${arch5}.`;
|
|
522410
|
+
const platformPrefix = `${platform21}.`;
|
|
522422
522411
|
const platformArchAsset = assets.find(
|
|
522423
522412
|
(asset) => asset.name.toLowerCase().startsWith(platformArchPrefix)
|
|
522424
522413
|
);
|
|
@@ -533763,7 +533752,7 @@ var import_react114 = __toESM(require_react(), 1);
|
|
|
533763
533752
|
init_dist8();
|
|
533764
533753
|
import * as fs104 from "node:fs/promises";
|
|
533765
533754
|
import * as path119 from "node:path";
|
|
533766
|
-
import * as
|
|
533755
|
+
import * as os30 from "node:os";
|
|
533767
533756
|
|
|
533768
533757
|
// packages/cli/src/ui/hooks/shell-completions/gitProvider.ts
|
|
533769
533758
|
import { execFile as execFile9 } from "node:child_process";
|
|
@@ -534099,7 +534088,7 @@ async function scanPathExecutables(signal) {
|
|
|
534099
534088
|
}
|
|
534100
534089
|
function expandTilde(inputPath) {
|
|
534101
534090
|
if (inputPath === "~" || inputPath.startsWith("~/") || inputPath.startsWith("~" + path119.sep)) {
|
|
534102
|
-
return [path119.join(
|
|
534091
|
+
return [path119.join(os30.homedir(), inputPath.slice(1)), true];
|
|
534103
534092
|
}
|
|
534104
534093
|
return [inputPath, false];
|
|
534105
534094
|
}
|
|
@@ -534146,7 +534135,7 @@ async function resolvePathCompletions(partial2, cwd7, signal) {
|
|
|
534146
534135
|
completionValue = parentPart + displayName;
|
|
534147
534136
|
}
|
|
534148
534137
|
if (didExpandTilde) {
|
|
534149
|
-
const homeDir =
|
|
534138
|
+
const homeDir = os30.homedir().replace(/\\/g, "/");
|
|
534150
534139
|
if (completionValue.startsWith(homeDir)) {
|
|
534151
534140
|
completionValue = "~" + completionValue.slice(homeDir.length);
|
|
534152
534141
|
}
|
|
@@ -537214,7 +537203,7 @@ init_dist8();
|
|
|
537214
537203
|
init_node();
|
|
537215
537204
|
import crypto27 from "node:crypto";
|
|
537216
537205
|
import path121 from "node:path";
|
|
537217
|
-
import
|
|
537206
|
+
import os31 from "node:os";
|
|
537218
537207
|
import fs105 from "node:fs";
|
|
537219
537208
|
|
|
537220
537209
|
// packages/cli/src/ui/hooks/shellReducer.ts
|
|
@@ -537478,14 +537467,14 @@ var useShellCommandProcessor = (addItemToHistory, setPendingHistoryItem, onExec,
|
|
|
537478
537467
|
{ type: "user_shell", text: rawQuery },
|
|
537479
537468
|
userMessageTimestamp
|
|
537480
537469
|
);
|
|
537481
|
-
const isWindows7 =
|
|
537470
|
+
const isWindows7 = os31.platform() === "win32";
|
|
537482
537471
|
const targetDir = config2.getTargetDir();
|
|
537483
537472
|
let commandToExecute = rawQuery;
|
|
537484
537473
|
let pwdFilePath;
|
|
537485
537474
|
if (!isWindows7) {
|
|
537486
537475
|
let command2 = rawQuery.trim();
|
|
537487
537476
|
const pwdFileName = `shell_pwd_${crypto27.randomBytes(6).toString("hex")}.tmp`;
|
|
537488
|
-
pwdFilePath = path121.join(
|
|
537477
|
+
pwdFilePath = path121.join(os31.tmpdir(), pwdFileName);
|
|
537489
537478
|
if (!command2.endsWith(";") && !command2.endsWith("&")) {
|
|
537490
537479
|
command2 += ";";
|
|
537491
537480
|
}
|
|
@@ -546906,7 +546895,7 @@ init_dist8();
|
|
|
546906
546895
|
var import_extract_zip3 = __toESM(require_extract_zip(), 1);
|
|
546907
546896
|
import * as fs115 from "node:fs/promises";
|
|
546908
546897
|
import * as path135 from "node:path";
|
|
546909
|
-
import * as
|
|
546898
|
+
import * as os32 from "node:os";
|
|
546910
546899
|
function renderSkillActionFeedback(result2, formatScope) {
|
|
546911
546900
|
const { skillName, action, status, error: error40 } = result2;
|
|
546912
546901
|
if (status === "error") {
|
|
@@ -546946,7 +546935,7 @@ async function installSkill(source2, scope, subpath, onLog, requestConsent = ()
|
|
|
546946
546935
|
try {
|
|
546947
546936
|
if (isGitUrl) {
|
|
546948
546937
|
tempDirToClean = await fs115.mkdtemp(
|
|
546949
|
-
path135.join(
|
|
546938
|
+
path135.join(os32.tmpdir(), "gemini-skill-")
|
|
546950
546939
|
);
|
|
546951
546940
|
sourcePath = tempDirToClean;
|
|
546952
546941
|
onLog(`Cloning skill from ${source2}...`);
|
|
@@ -546959,7 +546948,7 @@ async function installSkill(source2, scope, subpath, onLog, requestConsent = ()
|
|
|
546959
546948
|
);
|
|
546960
546949
|
} else if (isSkillFile) {
|
|
546961
546950
|
tempDirToClean = await fs115.mkdtemp(
|
|
546962
|
-
path135.join(
|
|
546951
|
+
path135.join(os32.tmpdir(), "gemini-skill-")
|
|
546963
546952
|
);
|
|
546964
546953
|
sourcePath = tempDirToClean;
|
|
546965
546954
|
onLog(`Extracting skill from ${source2}...`);
|
|
@@ -547701,7 +547690,7 @@ var setupGithubCommand = {
|
|
|
547701
547690
|
|
|
547702
547691
|
// packages/cli/src/ui/utils/terminalSetup.ts
|
|
547703
547692
|
import { promises as fs117 } from "node:fs";
|
|
547704
|
-
import * as
|
|
547693
|
+
import * as os33 from "node:os";
|
|
547705
547694
|
import * as path137 from "node:path";
|
|
547706
547695
|
import { exec as exec4 } from "node:child_process";
|
|
547707
547696
|
import { promisify as promisify19 } from "node:util";
|
|
@@ -547751,7 +547740,7 @@ async function detectTerminal() {
|
|
|
547751
547740
|
if (envTerminal) {
|
|
547752
547741
|
return envTerminal;
|
|
547753
547742
|
}
|
|
547754
|
-
if (
|
|
547743
|
+
if (os33.platform() !== "win32") {
|
|
547755
547744
|
try {
|
|
547756
547745
|
const { stdout } = await execAsync3("ps -o comm= -p $PPID");
|
|
547757
547746
|
const parentName = stdout.trim();
|
|
@@ -547779,8 +547768,8 @@ async function backupFile(filePath) {
|
|
|
547779
547768
|
}
|
|
547780
547769
|
}
|
|
547781
547770
|
function getVSCodeStyleConfigDir(appName) {
|
|
547782
|
-
const
|
|
547783
|
-
if (
|
|
547771
|
+
const platform21 = os33.platform();
|
|
547772
|
+
if (platform21 === "darwin") {
|
|
547784
547773
|
return path137.join(
|
|
547785
547774
|
homedir(),
|
|
547786
547775
|
"Library",
|
|
@@ -547788,7 +547777,7 @@ function getVSCodeStyleConfigDir(appName) {
|
|
|
547788
547777
|
appName,
|
|
547789
547778
|
"User"
|
|
547790
547779
|
);
|
|
547791
|
-
} else if (
|
|
547780
|
+
} else if (platform21 === "win32") {
|
|
547792
547781
|
if (!process.env["APPDATA"]) {
|
|
547793
547782
|
return null;
|
|
547794
547783
|
}
|
|
@@ -563437,7 +563426,7 @@ init_dist8();
|
|
|
563437
563426
|
// packages/cli/src/config/sandboxConfig.ts
|
|
563438
563427
|
init_dist8();
|
|
563439
563428
|
var import_command_exists = __toESM(require_command_exists2(), 1);
|
|
563440
|
-
import * as
|
|
563429
|
+
import * as os34 from "node:os";
|
|
563441
563430
|
import { fileURLToPath as fileURLToPath22 } from "node:url";
|
|
563442
563431
|
import path145 from "node:path";
|
|
563443
563432
|
var __filename6 = fileURLToPath22(import.meta.url);
|
|
@@ -563476,7 +563465,7 @@ function getSandboxCommand(sandbox) {
|
|
|
563476
563465
|
`Missing sandbox command '${sandbox}' (from GEMINI_SANDBOX)`
|
|
563477
563466
|
);
|
|
563478
563467
|
}
|
|
563479
|
-
if (
|
|
563468
|
+
if (os34.platform() === "darwin" && import_command_exists.default.sync("sandbox-exec")) {
|
|
563480
563469
|
return "sandbox-exec";
|
|
563481
563470
|
} else if (import_command_exists.default.sync("docker") && sandbox === true) {
|
|
563482
563471
|
return "docker";
|
|
@@ -563494,7 +563483,7 @@ async function loadSandboxConfig(settings, argv) {
|
|
|
563494
563483
|
const sandboxOption = argv.sandbox ?? settings.tools?.sandbox;
|
|
563495
563484
|
const command2 = getSandboxCommand(sandboxOption);
|
|
563496
563485
|
const packageJson2 = await getPackageJson(__dirname13);
|
|
563497
|
-
const image2 = process.env["GEMINI_SANDBOX_IMAGE"] ?? "us-docker.pkg.dev/gemini-code-dev/gemini-cli/sandbox:0.33.0-preview.
|
|
563486
|
+
const image2 = process.env["GEMINI_SANDBOX_IMAGE"] ?? "us-docker.pkg.dev/gemini-code-dev/gemini-cli/sandbox:0.33.0-preview.6" ?? packageJson2?.config?.sandboxImageUri;
|
|
563498
563487
|
return command2 && image2 ? { command: command2, image: image2 } : void 0;
|
|
563499
563488
|
}
|
|
563500
563489
|
|
|
@@ -564220,7 +564209,7 @@ function noopErrorHandler() {
|
|
|
564220
564209
|
import { basename as basename26 } from "node:path";
|
|
564221
564210
|
import { createHash as createHash11 } from "node:crypto";
|
|
564222
564211
|
import v82 from "node:v8";
|
|
564223
|
-
import
|
|
564212
|
+
import os38 from "node:os";
|
|
564224
564213
|
import dns from "node:dns";
|
|
564225
564214
|
|
|
564226
564215
|
// packages/cli/src/utils/sandbox.ts
|
|
@@ -564229,7 +564218,7 @@ init_dist8();
|
|
|
564229
564218
|
import { exec as exec5, execSync as execSync8, spawn as spawn13 } from "node:child_process";
|
|
564230
564219
|
import path147 from "node:path";
|
|
564231
564220
|
import fs125 from "node:fs";
|
|
564232
|
-
import
|
|
564221
|
+
import os36 from "node:os";
|
|
564233
564222
|
import { fileURLToPath as fileURLToPath23 } from "node:url";
|
|
564234
564223
|
import { promisify as promisify20 } from "node:util";
|
|
564235
564224
|
|
|
@@ -564283,7 +564272,7 @@ import { randomBytes as randomBytes6 } from "node:crypto";
|
|
|
564283
564272
|
// packages/cli/src/utils/sandboxUtils.ts
|
|
564284
564273
|
var import_shell_quote4 = __toESM(require_shell_quote(), 1);
|
|
564285
564274
|
init_dist8();
|
|
564286
|
-
import
|
|
564275
|
+
import os35 from "node:os";
|
|
564287
564276
|
import fs124 from "node:fs";
|
|
564288
564277
|
import { readFile as readFile17 } from "node:fs/promises";
|
|
564289
564278
|
var LOCAL_DEV_SANDBOX_IMAGE_NAME = "gemini-cli-sandbox";
|
|
@@ -564298,7 +564287,7 @@ var BUILTIN_SEATBELT_PROFILES = [
|
|
|
564298
564287
|
"strict-proxied"
|
|
564299
564288
|
];
|
|
564300
564289
|
function getContainerPath(hostPath) {
|
|
564301
|
-
if (
|
|
564290
|
+
if (os35.platform() !== "win32") {
|
|
564302
564291
|
return hostPath;
|
|
564303
564292
|
}
|
|
564304
564293
|
const withForwardSlashes = hostPath.replace(/\\/g, "/");
|
|
@@ -564316,7 +564305,7 @@ async function shouldUseCurrentUserInSandbox() {
|
|
|
564316
564305
|
if (envVar === "0" || envVar === "false") {
|
|
564317
564306
|
return false;
|
|
564318
564307
|
}
|
|
564319
|
-
if (
|
|
564308
|
+
if (os35.platform() === "linux") {
|
|
564320
564309
|
try {
|
|
564321
564310
|
const osReleaseContent = await readFile17("/etc/os-release", "utf8");
|
|
564322
564311
|
if (osReleaseContent.includes("ID=debian") || osReleaseContent.includes("ID=ubuntu") || osReleaseContent.match(/^ID_LIKE=.*debian.*/m) || // Covers derivatives
|
|
@@ -564343,7 +564332,7 @@ function ports() {
|
|
|
564343
564332
|
return (process.env["SANDBOX_PORTS"] ?? "").split(",").filter((p) => p.trim()).map((p) => p.trim());
|
|
564344
564333
|
}
|
|
564345
564334
|
function entrypoint(workdir, cliArgs) {
|
|
564346
|
-
const isWindows7 =
|
|
564335
|
+
const isWindows7 = os35.platform() === "win32";
|
|
564347
564336
|
const containerWorkdir = getContainerPath(workdir);
|
|
564348
564337
|
const shellCmds = [];
|
|
564349
564338
|
const pathSeparator = isWindows7 ? ";" : ":";
|
|
@@ -564425,7 +564414,7 @@ async function start_sandbox(config2, nodeArgs = [], cliConfig, cliArgs = []) {
|
|
|
564425
564414
|
"-D",
|
|
564426
564415
|
`TARGET_DIR=${fs125.realpathSync(process.cwd())}`,
|
|
564427
564416
|
"-D",
|
|
564428
|
-
`TMP_DIR=${fs125.realpathSync(
|
|
564417
|
+
`TMP_DIR=${fs125.realpathSync(os36.tmpdir())}`,
|
|
564429
564418
|
"-D",
|
|
564430
564419
|
`HOME_DIR=${fs125.realpathSync(homedir())}`,
|
|
564431
564420
|
"-D",
|
|
@@ -564602,8 +564591,8 @@ async function start_sandbox(config2, nodeArgs = [], cliConfig, cliArgs = []) {
|
|
|
564602
564591
|
`${userSettingsDirOnHost}:${getContainerPath(userSettingsDirOnHost)}`
|
|
564603
564592
|
);
|
|
564604
564593
|
}
|
|
564605
|
-
args2.push("--volume", `${
|
|
564606
|
-
if (userHomeDirOnHost !==
|
|
564594
|
+
args2.push("--volume", `${os36.tmpdir()}:${getContainerPath(os36.tmpdir())}`);
|
|
564595
|
+
if (userHomeDirOnHost !== os36.homedir()) {
|
|
564607
564596
|
args2.push(
|
|
564608
564597
|
"--volume",
|
|
564609
564598
|
`${userHomeDirOnHost}:${getContainerPath(userHomeDirOnHost)}`
|
|
@@ -564802,7 +564791,7 @@ async function start_sandbox(config2, nodeArgs = [], cliConfig, cliArgs = []) {
|
|
|
564802
564791
|
}
|
|
564803
564792
|
args2.push("--env", `SANDBOX=${containerName}`);
|
|
564804
564793
|
if (config2.command === "podman") {
|
|
564805
|
-
const emptyAuthFilePath = path147.join(
|
|
564794
|
+
const emptyAuthFilePath = path147.join(os36.tmpdir(), "empty_auth.json");
|
|
564806
564795
|
fs125.writeFileSync(emptyAuthFilePath, "{}", "utf-8");
|
|
564807
564796
|
args2.push("--authfile", emptyAuthFilePath);
|
|
564808
564797
|
}
|
|
@@ -565007,9 +564996,9 @@ async function ensureSandboxImageIsPresent(sandbox, image2, cliConfig) {
|
|
|
565007
564996
|
// packages/cli/src/utils/startupWarnings.ts
|
|
565008
564997
|
init_dist8();
|
|
565009
564998
|
import fs126 from "node:fs/promises";
|
|
565010
|
-
import
|
|
564999
|
+
import os37 from "node:os";
|
|
565011
565000
|
import { join as pathJoin } from "node:path";
|
|
565012
|
-
var warningsFilePath = pathJoin(
|
|
565001
|
+
var warningsFilePath = pathJoin(os37.tmpdir(), "gemini-cli-warnings.txt");
|
|
565013
565002
|
async function getStartupWarnings() {
|
|
565014
565003
|
try {
|
|
565015
565004
|
await fs126.access(warningsFilePath);
|
|
@@ -569318,7 +569307,7 @@ function validateDnsResolutionOrder(order) {
|
|
|
569318
569307
|
return defaultValue;
|
|
569319
569308
|
}
|
|
569320
569309
|
function getNodeMemoryArgs(isDebugMode2) {
|
|
569321
|
-
const totalMemoryMB =
|
|
569310
|
+
const totalMemoryMB = os38.totalmem() / (1024 * 1024);
|
|
569322
569311
|
const heapStats = v82.getHeapStatistics();
|
|
569323
569312
|
const currentMaxOldSpaceSizeMb = Math.floor(
|
|
569324
569313
|
heapStats.heap_size_limit / 1024 / 1024
|