@google/gemini-cli 0.66.0-nightly.20261019.ged96faedf → 0.66.0-preview.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/{chunk-NU74STQ5.js → chunk-3IDBGHHH.js} +9 -1
- package/bundle/{chunk-6P5R6RYB.js → chunk-3RUC6ZA6.js} +1 -1
- package/bundle/{chunk-R7UPATQC.js → chunk-5ILL3HFF.js} +2 -2
- package/bundle/{chunk-L5EUR3NN.js → chunk-7KFTNUNE.js} +9 -1
- package/bundle/{chunk-G3S7WMRG.js → chunk-BAGLLEOA.js} +237 -141
- package/bundle/{chunk-J5QPCO3J.js → chunk-D4FKL6WQ.js} +7 -7
- package/bundle/{chunk-QCWGLPCO.js → chunk-D6WVFS5S.js} +292 -161
- package/bundle/{chunk-NAPT3FAL.js → chunk-EONTJM32.js} +7 -7
- package/bundle/{chunk-LPQB7ZQE.js → chunk-EZIYD2G6.js} +58 -71
- package/bundle/{chunk-ERBSM2HU.js → chunk-GA6BNFA6.js} +3 -3
- package/bundle/{chunk-AWUJQFYP.js → chunk-HH6UGBJR.js} +1 -1
- package/bundle/{chunk-ZFQ347ZN.js → chunk-I6Q2CIAC.js} +15211 -8012
- package/bundle/{chunk-IDCWFZU3.js → chunk-ITTQBJIT.js} +1 -1
- package/bundle/{chunk-464WBVYM.js → chunk-LC5SKSCL.js} +1 -1
- package/bundle/{chunk-CTWJ3T77.js → chunk-OCM26AU2.js} +2 -2
- package/bundle/{chunk-5P6HIACT.js → chunk-OGLIOKXL.js} +3 -3
- package/bundle/{chunk-5VQUE3OF.js → chunk-PWTTZOSA.js} +1 -1
- package/bundle/{chunk-V5XDOSXJ.js → chunk-RJ3GGOMU.js} +13 -7
- package/bundle/{chunk-O5W3WYI5.js → chunk-SZE3LGYD.js} +1 -1
- package/bundle/{chunk-RE4V6I3G.js → chunk-TZZ34RGM.js} +1 -1
- package/bundle/{chunk-7UDRNCIH.js → chunk-VDKR3AIQ.js} +3 -3
- package/bundle/{chunk-YP27UYI4.js → chunk-VN6QPF5Z.js} +1 -1
- package/bundle/{chunk-GCW52DLB.js → chunk-XH7KGX2J.js} +2 -2
- package/bundle/{chunk-7K5J3ME2.js → chunk-Z3NAT6YU.js} +8 -9
- package/bundle/{cleanup-5DK3CVRM.js → cleanup-5UHD34BY.js} +2 -2
- package/bundle/{cleanup-6FAZDCL3.js → cleanup-D3DWTLIR.js} +2 -2
- package/bundle/{cleanup-WAU2KYGS.js → cleanup-GF4YFJWT.js} +2 -2
- package/bundle/{core-AGGXDQOT.js → core-CEUTCQ3Z.js} +3 -1
- package/bundle/{dist-2ELAEESC.js → core-GH3VFZSV.js} +3 -1
- package/bundle/{devtoolsService-UO6ZB72B.js → devtoolsService-3EKYJHGL.js} +95 -32
- package/bundle/{devtoolsService-FBTSVQ57.js → devtoolsService-KQTX22AU.js} +96 -34
- package/bundle/{devtoolsService-AWYBM7VP.js → devtoolsService-YPLYVNTF.js} +95 -32
- package/bundle/{dist-4PMK5N6W.js → dist-Q63VF7PG.js} +3 -1
- package/bundle/docs/cli/plan-mode.md +1 -1
- package/bundle/docs/tools/mcp-server.md +6 -0
- package/bundle/{gemini-GK2XZNXB.js → gemini-LRDBGCHF.js} +14 -14
- package/bundle/{gemini-OUEDCH4P.js → gemini-VE6EAOCY.js} +198 -214
- package/bundle/{gemini-DOXUDJDY.js → gemini-WV55NKMQ.js} +13 -13
- package/bundle/gemini.js +7 -7
- package/bundle/{interactiveCli-7LIKGDTJ.js → interactiveCli-3XUYDTSL.js} +10 -9
- package/bundle/{interactiveCli-TG7PGV4V.js → interactiveCli-S5K6P65K.js} +10 -9
- package/bundle/{interactiveCli-GZ4N4JS2.js → interactiveCli-U2CP5B64.js} +301 -319
- package/bundle/{liteRtServerManager-KAPXZ3EU.js → liteRtServerManager-HYOFIRWR.js} +4 -4
- package/bundle/{liteRtServerManager-KJI7ARTA.js → liteRtServerManager-KF2BIFPA.js} +4 -4
- package/bundle/{liteRtServerManager-MSJIWMWP.js → liteRtServerManager-RYZUX64K.js} +4 -4
- package/bundle/{oauth2-provider-RMF7U2UN.js → oauth2-provider-LVJMV7QY.js} +1 -1
- package/bundle/{oauth2-provider-OISPWSWH.js → oauth2-provider-O2MBVTUX.js} +1 -1
- package/bundle/{oauth2-provider-ZM5GWCNX.js → oauth2-provider-XAA7HRXL.js} +79 -41
- package/bundle/{start-5GIUIER3.js → start-234HHUMV.js} +6 -6
- package/bundle/{start-APIVGXZ3.js → start-JWGPML6R.js} +6 -6
- package/bundle/{start-GRIS2RDP.js → start-TRMMLCHR.js} +6 -6
- package/package.json +1 -1
- package/bundle/chunk-5YXWOKC2.js +0 -402181
- package/bundle/chunk-CYBHTFCS.js +0 -154
- package/bundle/chunk-HDP6V6JI.js +0 -1956
- package/bundle/chunk-RACMC24X.js +0 -118
- package/bundle/chunk-VGPHCSAB.js +0 -101859
- package/bundle/chunk-VXYA6LA4.js +0 -1571
- package/bundle/chunk-W6ALEP4H.js +0 -512
- package/bundle/chunk-XY2QSBID.js +0 -17603
- package/bundle/cleanup-WTTU6IKS.js +0 -32
- package/bundle/devtoolsService-TFBVUD5K.js +0 -4359
- package/bundle/dist-F22VU44K.js +0 -2280
- package/bundle/gemini-XDNOFFX7.js +0 -17970
- package/bundle/interactiveCli-MGIJ7GNE.js +0 -35601
- package/bundle/liteRtServerManager-OY2ULYPZ.js +0 -65
- package/bundle/oauth2-provider-VT6UHLKR.js +0 -273
- package/bundle/start-XQGNK32L.js +0 -18
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require = (await import('node:module')).createRequire(import.meta.url); const __chunk_filename = (await import('node:url')).fileURLToPath(import.meta.url); const __chunk_dirname = (await import('node:path')).dirname(__chunk_filename);
|
|
2
2
|
import {
|
|
3
3
|
runExitCleanup
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-3RUC6ZA6.js";
|
|
5
5
|
import {
|
|
6
6
|
RELEASE_CHANNEL_STABILITY,
|
|
7
7
|
debugLogger,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
require_re,
|
|
18
18
|
require_semver,
|
|
19
19
|
require_valid
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-BAGLLEOA.js";
|
|
21
21
|
import {
|
|
22
22
|
__commonJS,
|
|
23
23
|
__toESM
|
|
@@ -2,7 +2,7 @@ const require = (await import('node:module')).createRequire(import.meta.url); co
|
|
|
2
2
|
import {
|
|
3
3
|
exitCli,
|
|
4
4
|
require_source
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-SZE3LGYD.js";
|
|
6
6
|
import {
|
|
7
7
|
DEFAULT_PORT,
|
|
8
8
|
SERVER_START_WAIT_MS,
|
|
@@ -14,10 +14,10 @@ import {
|
|
|
14
14
|
isServerRunning,
|
|
15
15
|
resolveGemmaConfig,
|
|
16
16
|
writeServerProcessInfo
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-3IDBGHHH.js";
|
|
18
18
|
import {
|
|
19
19
|
debugLogger
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-D6WVFS5S.js";
|
|
21
21
|
import {
|
|
22
22
|
__toESM
|
|
23
23
|
} from "./chunk-34MYV7JD.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require = (await import('node:module')).createRequire(import.meta.url); const __chunk_filename = (await import('node:url')).fileURLToPath(import.meta.url); const __chunk_dirname = (await import('node:path')).dirname(__chunk_filename);
|
|
2
2
|
import {
|
|
3
3
|
checkExhaustive
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-I6Q2CIAC.js";
|
|
5
5
|
import {
|
|
6
6
|
__commonJS,
|
|
7
7
|
__toESM
|
|
@@ -2,8 +2,6 @@ const require = (await import('node:module')).createRequire(import.meta.url); co
|
|
|
2
2
|
import {
|
|
3
3
|
AuthProviderType,
|
|
4
4
|
AuthType,
|
|
5
|
-
CoreEvent,
|
|
6
|
-
CoreToolCallStatus,
|
|
7
5
|
DEFAULT_MODEL_CONFIGS,
|
|
8
6
|
DEFAULT_TRUNCATE_TOOL_OUTPUT_THRESHOLD,
|
|
9
7
|
EDITOR_OPTIONS,
|
|
@@ -33,7 +31,7 @@ import {
|
|
|
33
31
|
partListUnionToString,
|
|
34
32
|
require_strip_json_comments,
|
|
35
33
|
sanitizeFilenamePart
|
|
36
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-I6Q2CIAC.js";
|
|
37
35
|
import {
|
|
38
36
|
__commonJS,
|
|
39
37
|
__require,
|
|
@@ -10291,7 +10289,7 @@ function convertSessionToHistoryFormats(messages) {
|
|
|
10291
10289
|
args: tool.args,
|
|
10292
10290
|
description: tool.description || "",
|
|
10293
10291
|
renderOutputAsMarkdown: tool.renderOutputAsMarkdown ?? true,
|
|
10294
|
-
status: tool.status === "success" ?
|
|
10292
|
+
status: tool.status === "success" ? "success" /* Success */ : "error" /* Error */,
|
|
10295
10293
|
resultDisplay: tool.resultDisplay,
|
|
10296
10294
|
confirmationDetails: void 0
|
|
10297
10295
|
}))
|
|
@@ -15253,6 +15251,10 @@ var SETTINGS_SCHEMA_DEFINITIONS = {
|
|
|
15253
15251
|
authorizationResponseIssParameterSupported: {
|
|
15254
15252
|
type: "boolean",
|
|
15255
15253
|
description: 'Whether the authorization server returns the "iss" parameter in the authorization response (RFC 9207). When true, callbacks without "iss" are rejected; when false, they are accepted. A provided "iss" is always validated. Overrides the "authorization_response_iss_parameter_supported" value discovered from server metadata.'
|
|
15254
|
+
},
|
|
15255
|
+
allowPrivateNetwork: {
|
|
15256
|
+
type: "boolean",
|
|
15257
|
+
description: "Allow OAuth endpoints on private enterprise networks (RFC 1918, RFC 6598, RFC 4193, .internal, .local)."
|
|
15256
15258
|
}
|
|
15257
15259
|
}
|
|
15258
15260
|
},
|
|
@@ -15320,6 +15322,10 @@ var SETTINGS_SCHEMA_DEFINITIONS = {
|
|
|
15320
15322
|
authorizationResponseIssParameterSupported: {
|
|
15321
15323
|
type: "boolean",
|
|
15322
15324
|
description: 'Whether the authorization server returns the "iss" parameter in the authorization response (RFC 9207). When true, callbacks without "iss" are rejected; when false, they are accepted. A provided "iss" is always validated. Overrides the "authorization_response_iss_parameter_supported" value discovered from server metadata.'
|
|
15325
|
+
},
|
|
15326
|
+
allowPrivateNetwork: {
|
|
15327
|
+
type: "boolean",
|
|
15328
|
+
description: "Allow OAuth endpoints on private enterprise networks (RFC 1918, RFC 6598, RFC 4193, .internal, .local)."
|
|
15323
15329
|
}
|
|
15324
15330
|
}
|
|
15325
15331
|
},
|
|
@@ -16454,8 +16460,8 @@ var LoadedSettings = class {
|
|
|
16454
16460
|
// React will pass a listener fn into this subscribe fn
|
|
16455
16461
|
// that listener fn will perform an object identity check on the snapshot and trigger a React re render if the snapshot has changed
|
|
16456
16462
|
subscribe(listener) {
|
|
16457
|
-
coreEvents.on(
|
|
16458
|
-
return () => coreEvents.off(
|
|
16463
|
+
coreEvents.on("settings-changed" /* SettingsChanged */, listener);
|
|
16464
|
+
return () => coreEvents.off("settings-changed" /* SettingsChanged */, listener);
|
|
16459
16465
|
}
|
|
16460
16466
|
getSnapshot() {
|
|
16461
16467
|
return this._snapshot;
|
|
@@ -16607,7 +16613,7 @@ function setUpCloudShellEnvironment(envFilePath, isTrusted, isSandboxed, selecte
|
|
|
16607
16613
|
}
|
|
16608
16614
|
}
|
|
16609
16615
|
let value = "cloudshell-gca";
|
|
16610
|
-
if (selectedAuthType ===
|
|
16616
|
+
if (selectedAuthType === "vertex-ai" /* USE_VERTEX_AI */) {
|
|
16611
16617
|
value = process2.env[USER_GCP_PROJECT];
|
|
16612
16618
|
}
|
|
16613
16619
|
if (envFilePath && fs4.existsSync(envFilePath)) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require = (await import('node:module')).createRequire(import.meta.url); const __chunk_filename = (await import('node:url')).fileURLToPath(import.meta.url); const __chunk_dirname = (await import('node:path')).dirname(__chunk_filename);
|
|
2
2
|
import {
|
|
3
3
|
runExitCleanup
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ITTQBJIT.js";
|
|
5
5
|
import {
|
|
6
6
|
__commonJS,
|
|
7
7
|
__require
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require = (await import('node:module')).createRequire(import.meta.url); const __chunk_filename = (await import('node:url')).fileURLToPath(import.meta.url); const __chunk_dirname = (await import('node:path')).dirname(__chunk_filename);
|
|
2
2
|
import {
|
|
3
3
|
runExitCleanup
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-VN6QPF5Z.js";
|
|
5
5
|
import {
|
|
6
6
|
__commonJS,
|
|
7
7
|
__require
|
|
@@ -2,7 +2,7 @@ const require = (await import('node:module')).createRequire(import.meta.url); co
|
|
|
2
2
|
import {
|
|
3
3
|
exitCli,
|
|
4
4
|
require_source
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-HH6UGBJR.js";
|
|
6
6
|
import {
|
|
7
7
|
DEFAULT_PORT,
|
|
8
8
|
SERVER_START_WAIT_MS,
|
|
@@ -14,10 +14,10 @@ import {
|
|
|
14
14
|
isServerRunning,
|
|
15
15
|
resolveGemmaConfig,
|
|
16
16
|
writeServerProcessInfo
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-7KFTNUNE.js";
|
|
18
18
|
import {
|
|
19
19
|
debugLogger
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-BAGLLEOA.js";
|
|
21
21
|
import {
|
|
22
22
|
__toESM
|
|
23
23
|
} from "./chunk-34MYV7JD.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require = (await import('node:module')).createRequire(import.meta.url); const __chunk_filename = (await import('node:url')).fileURLToPath(import.meta.url); const __chunk_dirname = (await import('node:path')).dirname(__chunk_filename);
|
|
2
2
|
import {
|
|
3
3
|
runExitCleanup
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-VN6QPF5Z.js";
|
|
5
5
|
import {
|
|
6
6
|
RELEASE_CHANNEL_STABILITY,
|
|
7
7
|
debugLogger,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
require_re,
|
|
18
18
|
require_semver,
|
|
19
19
|
require_valid
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-I6Q2CIAC.js";
|
|
21
21
|
import {
|
|
22
22
|
__commonJS,
|
|
23
23
|
__toESM
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
const require = (await import('node:module')).createRequire(import.meta.url); const __chunk_filename = (await import('node:url')).fileURLToPath(import.meta.url); const __chunk_dirname = (await import('node:path')).dirname(__chunk_filename);
|
|
2
2
|
import {
|
|
3
|
-
CoreToolCallStatus,
|
|
4
3
|
checkExhaustive
|
|
5
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-D6WVFS5S.js";
|
|
6
5
|
import {
|
|
7
6
|
__commonJS,
|
|
8
7
|
__toESM
|
|
@@ -465,19 +464,19 @@ var require_react = __commonJS({
|
|
|
465
464
|
var import_react = __toESM(require_react(), 1);
|
|
466
465
|
function mapCoreStatusToDisplayStatus(coreStatus) {
|
|
467
466
|
switch (coreStatus) {
|
|
468
|
-
case
|
|
467
|
+
case "validating" /* Validating */:
|
|
469
468
|
return "Pending" /* Pending */;
|
|
470
|
-
case
|
|
469
|
+
case "awaiting_approval" /* AwaitingApproval */:
|
|
471
470
|
return "Confirming" /* Confirming */;
|
|
472
|
-
case
|
|
471
|
+
case "executing" /* Executing */:
|
|
473
472
|
return "Executing" /* Executing */;
|
|
474
|
-
case
|
|
473
|
+
case "success" /* Success */:
|
|
475
474
|
return "Success" /* Success */;
|
|
476
|
-
case
|
|
475
|
+
case "cancelled" /* Cancelled */:
|
|
477
476
|
return "Canceled" /* Canceled */;
|
|
478
|
-
case
|
|
477
|
+
case "error" /* Error */:
|
|
479
478
|
return "Error" /* Error */;
|
|
480
|
-
case
|
|
479
|
+
case "scheduled" /* Scheduled */:
|
|
481
480
|
return "Pending" /* Pending */;
|
|
482
481
|
default:
|
|
483
482
|
return checkExhaustive(coreStatus);
|
|
@@ -11,8 +11,8 @@ import {
|
|
|
11
11
|
runSyncCleanup,
|
|
12
12
|
setupSignalHandlers,
|
|
13
13
|
setupTtyCheck
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-ITTQBJIT.js";
|
|
15
|
+
import "./chunk-D6WVFS5S.js";
|
|
16
16
|
import "./chunk-664ZODQF.js";
|
|
17
17
|
import "./chunk-IUUIT4SU.js";
|
|
18
18
|
import "./chunk-L6PII3GR.js";
|
|
@@ -11,8 +11,8 @@ import {
|
|
|
11
11
|
runSyncCleanup,
|
|
12
12
|
setupSignalHandlers,
|
|
13
13
|
setupTtyCheck
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-3RUC6ZA6.js";
|
|
15
|
+
import "./chunk-BAGLLEOA.js";
|
|
16
16
|
import "./chunk-664ZODQF.js";
|
|
17
17
|
import "./chunk-IUUIT4SU.js";
|
|
18
18
|
import "./chunk-L6PII3GR.js";
|
|
@@ -11,8 +11,8 @@ import {
|
|
|
11
11
|
runSyncCleanup,
|
|
12
12
|
setupSignalHandlers,
|
|
13
13
|
setupTtyCheck
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-VN6QPF5Z.js";
|
|
15
|
+
import "./chunk-I6Q2CIAC.js";
|
|
16
16
|
import "./chunk-664ZODQF.js";
|
|
17
17
|
import "./chunk-IUUIT4SU.js";
|
|
18
18
|
import "./chunk-L6PII3GR.js";
|
|
@@ -831,6 +831,7 @@ import {
|
|
|
831
831
|
isEditorAvailableAsync,
|
|
832
832
|
isEmpty,
|
|
833
833
|
isEnabled,
|
|
834
|
+
isEnterprisePrivateAddress,
|
|
834
835
|
isFatalToolError,
|
|
835
836
|
isFileAndDirectorySecureSync,
|
|
836
837
|
isFileDiff,
|
|
@@ -1133,7 +1134,7 @@ import {
|
|
|
1133
1134
|
wrapWithSynchronizedOutput,
|
|
1134
1135
|
writeToStderr,
|
|
1135
1136
|
writeToStdout
|
|
1136
|
-
} from "./chunk-
|
|
1137
|
+
} from "./chunk-D6WVFS5S.js";
|
|
1137
1138
|
import "./chunk-664ZODQF.js";
|
|
1138
1139
|
import {
|
|
1139
1140
|
SpanStatusCode,
|
|
@@ -1974,6 +1975,7 @@ export {
|
|
|
1974
1975
|
isEditorAvailableAsync,
|
|
1975
1976
|
isEmpty,
|
|
1976
1977
|
isEnabled,
|
|
1978
|
+
isEnterprisePrivateAddress,
|
|
1977
1979
|
isFatalToolError,
|
|
1978
1980
|
isFileAndDirectorySecureSync,
|
|
1979
1981
|
isFileDiff,
|
|
@@ -831,6 +831,7 @@ import {
|
|
|
831
831
|
isEditorAvailableAsync,
|
|
832
832
|
isEmpty,
|
|
833
833
|
isEnabled,
|
|
834
|
+
isEnterprisePrivateAddress,
|
|
834
835
|
isFatalToolError,
|
|
835
836
|
isFileAndDirectorySecureSync,
|
|
836
837
|
isFileDiff,
|
|
@@ -1133,7 +1134,7 @@ import {
|
|
|
1133
1134
|
wrapWithSynchronizedOutput,
|
|
1134
1135
|
writeToStderr,
|
|
1135
1136
|
writeToStdout
|
|
1136
|
-
} from "./chunk-
|
|
1137
|
+
} from "./chunk-I6Q2CIAC.js";
|
|
1137
1138
|
import "./chunk-664ZODQF.js";
|
|
1138
1139
|
import {
|
|
1139
1140
|
SpanStatusCode,
|
|
@@ -1974,6 +1975,7 @@ export {
|
|
|
1974
1975
|
isEditorAvailableAsync,
|
|
1975
1976
|
isEmpty,
|
|
1976
1977
|
isEnabled,
|
|
1978
|
+
isEnterprisePrivateAddress,
|
|
1977
1979
|
isFatalToolError,
|
|
1978
1980
|
isFileAndDirectorySecureSync,
|
|
1979
1981
|
isFileDiff,
|
|
@@ -2,7 +2,7 @@ const require = (await import('node:module')).createRequire(import.meta.url); co
|
|
|
2
2
|
import {
|
|
3
3
|
coreEvents,
|
|
4
4
|
debugLogger
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-I6Q2CIAC.js";
|
|
6
6
|
import "./chunk-664ZODQF.js";
|
|
7
7
|
import "./chunk-IUUIT4SU.js";
|
|
8
8
|
import "./chunk-L6PII3GR.js";
|
|
@@ -3520,6 +3520,7 @@ import zlib from "node:zlib";
|
|
|
3520
3520
|
import fs from "node:fs";
|
|
3521
3521
|
import path from "node:path";
|
|
3522
3522
|
import { EventEmitter } from "node:events";
|
|
3523
|
+
import { StringDecoder } from "node:string_decoder";
|
|
3523
3524
|
var ACTIVITY_ID_HEADER = "x-activity-request-id";
|
|
3524
3525
|
var MAX_BUFFER_SIZE = 100;
|
|
3525
3526
|
function isHeaderRecord(h) {
|
|
@@ -3885,49 +3886,111 @@ var ActivityLogger = class _ActivityLogger extends EventEmitter {
|
|
|
3885
3886
|
};
|
|
3886
3887
|
req.on("response", (res) => {
|
|
3887
3888
|
const responseChunks = [];
|
|
3889
|
+
const decompressedChunks = [];
|
|
3890
|
+
const decoder = new StringDecoder("utf8");
|
|
3888
3891
|
let chunkIndex = 0;
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
responseChunks.push(chunkBuffer);
|
|
3892
|
+
const emitChunk = (chunkData) => {
|
|
3893
|
+
if (!chunkData) return;
|
|
3892
3894
|
self.safeEmitNetwork({
|
|
3893
3895
|
id,
|
|
3894
3896
|
pending: true,
|
|
3895
3897
|
chunk: {
|
|
3896
3898
|
index: chunkIndex++,
|
|
3897
|
-
data:
|
|
3899
|
+
data: chunkData,
|
|
3898
3900
|
timestamp: Date.now()
|
|
3899
3901
|
}
|
|
3900
3902
|
});
|
|
3903
|
+
};
|
|
3904
|
+
let responseEmitted = false;
|
|
3905
|
+
const processBuffer = (finalBuffer) => {
|
|
3906
|
+
if (responseEmitted) return;
|
|
3907
|
+
responseEmitted = true;
|
|
3908
|
+
const resBody = finalBuffer.toString("utf8");
|
|
3909
|
+
const startTime = self.requestStartTimes.get(id);
|
|
3910
|
+
const durationMs = startTime ? Date.now() - startTime : 0;
|
|
3911
|
+
self.requestStartTimes.delete(id);
|
|
3912
|
+
self.safeEmitNetwork({
|
|
3913
|
+
id,
|
|
3914
|
+
pending: false,
|
|
3915
|
+
response: {
|
|
3916
|
+
status: res.statusCode || 0,
|
|
3917
|
+
headers: self.stringifyHeaders(res.headers),
|
|
3918
|
+
body: resBody,
|
|
3919
|
+
durationMs
|
|
3920
|
+
}
|
|
3921
|
+
});
|
|
3922
|
+
};
|
|
3923
|
+
const rawEncoding = res.headers["content-encoding"];
|
|
3924
|
+
const encoding = typeof rawEncoding === "string" ? rawEncoding.toLowerCase().trim() : "";
|
|
3925
|
+
let decompressor = null;
|
|
3926
|
+
if (encoding === "gzip" || encoding === "x-gzip") {
|
|
3927
|
+
decompressor = zlib.createGunzip({
|
|
3928
|
+
flush: zlib.constants.Z_SYNC_FLUSH
|
|
3929
|
+
});
|
|
3930
|
+
} else if (encoding === "deflate") {
|
|
3931
|
+
decompressor = zlib.createInflate({
|
|
3932
|
+
flush: zlib.constants.Z_SYNC_FLUSH
|
|
3933
|
+
});
|
|
3934
|
+
}
|
|
3935
|
+
let decompressionFailed = false;
|
|
3936
|
+
let responseEnded = false;
|
|
3937
|
+
if (decompressor) {
|
|
3938
|
+
decompressor.on("data", (decompressedChunk) => {
|
|
3939
|
+
if (decompressionFailed || responseEmitted) return;
|
|
3940
|
+
decompressedChunks.push(decompressedChunk);
|
|
3941
|
+
emitChunk(decoder.write(decompressedChunk));
|
|
3942
|
+
});
|
|
3943
|
+
decompressor.on("end", () => {
|
|
3944
|
+
if (decompressionFailed || responseEmitted) return;
|
|
3945
|
+
emitChunk(decoder.end());
|
|
3946
|
+
processBuffer(Buffer.concat(decompressedChunks));
|
|
3947
|
+
});
|
|
3948
|
+
decompressor.on("error", () => {
|
|
3949
|
+
decompressionFailed = true;
|
|
3950
|
+
if (responseEnded) {
|
|
3951
|
+
processBuffer(Buffer.concat(responseChunks));
|
|
3952
|
+
}
|
|
3953
|
+
});
|
|
3954
|
+
decompressor.on("close", () => {
|
|
3955
|
+
if (responseEnded && !responseEmitted) {
|
|
3956
|
+
processBuffer(Buffer.concat(responseChunks));
|
|
3957
|
+
}
|
|
3958
|
+
});
|
|
3959
|
+
}
|
|
3960
|
+
res.on("data", (chunk) => {
|
|
3961
|
+
const chunkBuffer = Buffer.from(chunk);
|
|
3962
|
+
responseChunks.push(chunkBuffer);
|
|
3963
|
+
if (decompressor) {
|
|
3964
|
+
if (!decompressionFailed && !decompressor.destroyed && !decompressor.writableEnded) {
|
|
3965
|
+
try {
|
|
3966
|
+
decompressor.write(chunkBuffer);
|
|
3967
|
+
} catch {
|
|
3968
|
+
decompressionFailed = true;
|
|
3969
|
+
if (responseEnded) {
|
|
3970
|
+
processBuffer(Buffer.concat(responseChunks));
|
|
3971
|
+
}
|
|
3972
|
+
}
|
|
3973
|
+
}
|
|
3974
|
+
} else {
|
|
3975
|
+
emitChunk(decoder.write(chunkBuffer));
|
|
3976
|
+
}
|
|
3901
3977
|
});
|
|
3902
3978
|
res.on("end", () => {
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
response: {
|
|
3914
|
-
status: res.statusCode || 0,
|
|
3915
|
-
headers: self.stringifyHeaders(res.headers),
|
|
3916
|
-
body: resBody,
|
|
3917
|
-
durationMs
|
|
3979
|
+
responseEnded = true;
|
|
3980
|
+
if (decompressor) {
|
|
3981
|
+
if (decompressionFailed || decompressor.destroyed || decompressor.writableEnded) {
|
|
3982
|
+
processBuffer(Buffer.concat(responseChunks));
|
|
3983
|
+
} else {
|
|
3984
|
+
try {
|
|
3985
|
+
decompressor.end();
|
|
3986
|
+
} catch {
|
|
3987
|
+
decompressionFailed = true;
|
|
3988
|
+
processBuffer(Buffer.concat(responseChunks));
|
|
3918
3989
|
}
|
|
3919
|
-
}
|
|
3920
|
-
};
|
|
3921
|
-
if (encoding === "gzip") {
|
|
3922
|
-
zlib.gunzip(buffer, (err, decompressed) => {
|
|
3923
|
-
processBuffer(err ? buffer : decompressed);
|
|
3924
|
-
});
|
|
3925
|
-
} else if (encoding === "deflate") {
|
|
3926
|
-
zlib.inflate(buffer, (err, decompressed) => {
|
|
3927
|
-
processBuffer(err ? buffer : decompressed);
|
|
3928
|
-
});
|
|
3990
|
+
}
|
|
3929
3991
|
} else {
|
|
3930
|
-
|
|
3992
|
+
emitChunk(decoder.end());
|
|
3993
|
+
processBuffer(Buffer.concat(responseChunks));
|
|
3931
3994
|
}
|
|
3932
3995
|
});
|
|
3933
3996
|
});
|
|
@@ -4324,7 +4387,7 @@ async function toggleDevToolsPanel(config, isOpen, toggle, setOpen) {
|
|
|
4324
4387
|
return;
|
|
4325
4388
|
}
|
|
4326
4389
|
try {
|
|
4327
|
-
const { openBrowserSecurely, shouldLaunchBrowser } = await import("./core-
|
|
4390
|
+
const { openBrowserSecurely, shouldLaunchBrowser } = await import("./core-GH3VFZSV.js");
|
|
4328
4391
|
const url = await startDevToolsServer(config);
|
|
4329
4392
|
if (shouldLaunchBrowser()) {
|
|
4330
4393
|
try {
|