@mmmbuto/qwen-code-termux 0.16.1-termux → 0.18.0-termux
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/README.md +79 -109
- package/bundled/new-app/SKILL.md +22 -0
- package/bundled/qc-helper/SKILL.md +29 -24
- package/bundled/qc-helper/docs/_meta.ts +1 -0
- package/bundled/qc-helper/docs/configuration/_meta.ts +0 -3
- package/bundled/qc-helper/docs/configuration/settings.md +37 -31
- package/bundled/qc-helper/docs/configuration/themes.md +39 -0
- package/bundled/qc-helper/docs/features/_meta.ts +1 -3
- package/bundled/qc-helper/docs/features/approval-mode.md +35 -35
- package/bundled/qc-helper/docs/features/auto-mode.md +54 -9
- package/bundled/qc-helper/docs/features/channels/_meta.ts +1 -0
- package/bundled/qc-helper/docs/features/channels/feishu.md +170 -0
- package/bundled/qc-helper/docs/features/commands.md +115 -35
- package/bundled/qc-helper/docs/features/followup-suggestions.md +2 -2
- package/bundled/qc-helper/docs/features/headless.md +32 -0
- package/bundled/qc-helper/docs/features/markdown-rendering.md +21 -1
- package/bundled/qc-helper/docs/features/memory.md +22 -5
- package/bundled/qc-helper/docs/features/scheduled-tasks.md +1 -1
- package/bundled/qc-helper/docs/features/status-line.md +168 -32
- package/bundled/qc-helper/docs/features/sub-agents.md +60 -0
- package/bundled/qc-helper/docs/features/worktree.md +345 -0
- package/bundled/qc-helper/docs/overview.md +4 -4
- package/bundled/qc-helper/docs/quickstart.md +4 -4
- package/bundled/qc-helper/docs/qwen-serve-deploy-local.md +221 -0
- package/bundled/qc-helper/docs/qwen-serve.md +234 -24
- package/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +16 -0
- package/bundled/qc-helper/docs/support/Uninstall.md +19 -1
- package/bundled/qc-helper/docs/support/troubleshooting.md +2 -1
- package/bundled/simplify/SKILL.md +123 -0
- package/chunks/agent-IDS4HMOX.js +56 -0
- package/chunks/agent-headless-5Q2EUSPS.js +50 -0
- package/chunks/{anthropicContentGenerator-SSGKR6DO.js → anthropicContentGenerator-2HBRNQ3B.js} +52 -9
- package/chunks/{askUserQuestion-PJWUUXKN.js → askUserQuestion-75TDJVK2.js} +45 -3
- package/chunks/{ca-UZ7BANMN.js → ca-BARBRL6N.js} +89 -5
- package/chunks/{chunk-GGNTZ2NH.js → chunk-2Y5SYSD3.js} +368 -597
- package/chunks/{chunk-2LA2TREA.js → chunk-3AA2DK35.js} +1448 -207
- package/chunks/{chunk-I2V5WXHJ.js → chunk-3AUHFMSK.js} +80 -38
- package/chunks/chunk-3DHXZ6EV.js +241 -0
- package/chunks/{chunk-PR4T27R7.js → chunk-3HTIVKZE.js} +42 -8
- package/chunks/chunk-3HX5LZ6R.js +1798 -0
- package/chunks/chunk-3PJXIDKI.js +2517 -0
- package/chunks/{chunk-MYAKAFEC.js → chunk-55ZMG67I.js} +7451 -3517
- package/chunks/{chunk-66CXYE4B.js → chunk-5IFG2VC4.js} +293 -242
- package/chunks/chunk-64WXLC72.js +98 -0
- package/chunks/{chunk-C6WMLUNB.js → chunk-72LDN5PP.js} +1 -1
- package/chunks/{chunk-F23NCRJ2.js → chunk-A7B4ISQP.js} +1 -1
- package/chunks/chunk-B7HXHOHU.js +393 -0
- package/chunks/{chunk-XEGHDASV.js → chunk-D3RHSPAS.js} +435 -540
- package/chunks/{chunk-XKS5KBFJ.js → chunk-EYENRK4D.js} +694 -384
- package/chunks/chunk-H6BD2ELD.js +36 -0
- package/chunks/{chunk-XP27SJMH.js → chunk-HR7SV7AY.js} +79 -48
- package/chunks/{chunk-D5NTAHYL.js → chunk-IDX6COTE.js} +7 -2
- package/chunks/{chunk-SHT4VJWU.js → chunk-IWKSG2AR.js} +2 -2
- package/chunks/chunk-J37FGIOA.js +1623 -0
- package/chunks/chunk-J5MDQKJL.js +2230 -0
- package/chunks/{chunk-USE2VQ5P.js → chunk-JTQAQBTV.js} +21 -0
- package/chunks/{chunk-NCTLV2NB.js → chunk-KQJMQJPI.js} +1 -1
- package/chunks/{chunk-5FBA5XC2.js → chunk-KRIHGKNA.js} +1 -1
- package/chunks/chunk-LD2XBG6Z.js +102 -0
- package/chunks/{chunk-MAY32HXD.js → chunk-M6VTDSVR.js} +3 -1
- package/chunks/chunk-MRO43B25.js +30 -0
- package/chunks/{chunk-N4WOREMD.js → chunk-NVFMZBX2.js} +43 -3
- package/chunks/chunk-OHEGWO4L.js +264 -0
- package/chunks/{chunk-K6O2NBMF.js → chunk-OQ7NJIY7.js} +4604 -6397
- package/chunks/chunk-QQDPRDVW.js +25 -0
- package/chunks/{chunk-KXZ4TJB4.js → chunk-SEGYWKIH.js} +1 -1
- package/chunks/chunk-SKBPNJEW.js +45 -0
- package/chunks/{chunk-4AOCVI6J.js → chunk-SNGELLWX.js} +52 -6
- package/chunks/{chunk-3OCRHZA3.js → chunk-TD4OPI4T.js} +56742 -44104
- package/chunks/{chunk-DQ4QTG7E.js → chunk-VV4F63BD.js} +11 -11
- package/chunks/chunk-XBY7E2FX.js +605 -0
- package/chunks/{chunk-JKMBWLFB.js → chunk-YILFYI5W.js} +48 -26
- package/chunks/chunk-YOGAOMYB.js +159 -0
- package/chunks/{chunk-QWSRH265.js → chunk-Z2Z3GUXZ.js} +777 -776
- package/chunks/{chunk-SDHRQFOS.js → chunk-ZTZ4DDQE.js} +2 -2
- package/chunks/computer-use-W2TYQNEE.js +825 -0
- package/chunks/contextCommand-6FGX3A7J.js +52 -0
- package/chunks/{cron-create-3ZBBN7WB.js → cron-create-APL5LU6I.js} +3 -3
- package/chunks/{cron-delete-NAGKKIIG.js → cron-delete-4SBJSCN4.js} +3 -3
- package/chunks/{cron-list-PAGRXNAI.js → cron-list-2AMGOMVO.js} +3 -3
- package/chunks/{de-V4IE2OOZ.js → de-YGKK2BC4.js} +89 -5
- package/chunks/{devtools-TWVXEJQB.js → devtools-FM6GJPYG.js} +2 -1
- package/chunks/{dist-4L54HRX2.js → dist-4LXD6L6X.js} +24 -5
- package/chunks/dist-H6ONXVLG.js +94146 -0
- package/chunks/{dist-XKWIWPWQ.js → dist-KAZ3SEBX.js} +1083 -3856
- package/chunks/{dist-BXDUQ2QY.js → dist-PK7DFCAW.js} +1 -1
- package/chunks/{edit-NVO3FOAK.js → edit-ZCEZC264.js} +30 -22
- package/chunks/{en-HGJ2SPLM.js → en-DHGYHIHX.js} +127 -6
- package/chunks/{enter-worktree-UEBG4WFC.js → enter-worktree-BBHCFCHG.js} +30 -20
- package/chunks/enterPlanMode-3M6KTD3B.js +158 -0
- package/chunks/{exit-worktree-UZ3MAQZN.js → exit-worktree-73YPIEQO.js} +27 -19
- package/chunks/exitPlanMode-TYZM6BAE.js +703 -0
- package/chunks/{fr-CJULI7ZX.js → fr-JXBKPJKQ.js} +89 -5
- package/chunks/{geminiContentGenerator-3UZFXGNT.js → geminiContentGenerator-7N2V3VW2.js} +8 -6
- package/chunks/{getMachineId-bsd-JXOSIJV2.js → getMachineId-bsd-4CASPIU4.js} +4 -4
- package/chunks/{getMachineId-darwin-TE4QRR42.js → getMachineId-darwin-HPQPEMZR.js} +4 -4
- package/chunks/{getMachineId-linux-S3OL52XK.js → getMachineId-linux-AUARKYHL.js} +3 -3
- package/chunks/{getMachineId-unsupported-DWUSBAPX.js → getMachineId-unsupported-S32ZDA2T.js} +3 -3
- package/chunks/{getMachineId-win-AAC5P3AP.js → getMachineId-win-4EFLHYIJ.js} +4 -4
- package/chunks/{glob-KNHSFFFG.js → glob-5XBCPQ2A.js} +27 -19
- package/chunks/{grep-LACWDZW4.js → grep-VIUU3A7X.js} +30 -19
- package/chunks/{ja-L7CHRQEW.js → ja-TGPZSP2B.js} +89 -5
- package/chunks/{keychain-token-storage-335UOLJ6.js → keychain-token-storage-6IU6ORQN.js} +3 -3
- package/chunks/{ls-AGXQOKSG.js → ls-JRGYIGLY.js} +4 -4
- package/chunks/{lsp-UDMUHNPA.js → lsp-SHMKFOAC.js} +3 -3
- package/chunks/{monitor-ETKWPJEH.js → monitor-6R4LIJL5.js} +40 -25
- package/chunks/{multipart-parser-3QWGTLK3.js → multipart-parser-AJ4WASWR.js} +2 -2
- package/chunks/{notebook-edit-QJJLPNYT.js → notebook-edit-5E7ULDVQ.js} +28 -20
- package/chunks/{openaiContentGenerator-CNNN424U.js → openaiContentGenerator-ZVHFKM3O.js} +17 -14
- package/chunks/{pt-M6JULLEQ.js → pt-TIBG6BIO.js} +89 -5
- package/chunks/{qwenContentGenerator-BOLCGK3R.js → qwenContentGenerator-B2VTVSPJ.js} +31 -23
- package/chunks/{qwenOAuth2-EEJGROP7.js → qwenOAuth2-2KCKWDCF.js} +6 -4
- package/chunks/read-file-GIT7BCDR.js +27 -0
- package/chunks/ripGrep-MWKFVYMS.js +48 -0
- package/chunks/{ru-QILM4HBC.js → ru-JBCHCK4L.js} +89 -5
- package/chunks/scheduler-5VOOYGBH.js +308 -0
- package/chunks/send-message-4QNWQJF4.js +244 -0
- package/chunks/{serve-OLSI7WSR.js → serve-MN6HZBWN.js} +14262 -7414
- package/chunks/shell-NQZQGFM2.js +56 -0
- package/chunks/{skill-D6YRHTTI.js → skill-WCFW4644.js} +145 -119
- package/chunks/{src-TMOD5X6F.js → src-7XL4G4DC.js} +88 -46
- package/chunks/{src-4QH4FZ6I.js → src-IHA6DTUV.js} +452 -62
- package/chunks/{syntheticOutput-5PVFDDJ4.js → syntheticOutput-YTYS2ZMQ.js} +4 -4
- package/chunks/task-create-MPORPYN6.js +19 -0
- package/chunks/task-list-R2YDYPZT.js +151 -0
- package/chunks/{task-stop-AJKPSR6R.js → task-stop-SYWJYBCM.js} +3 -3
- package/chunks/task-update-E4NSLKMQ.js +408 -0
- package/chunks/team-create-7R7KA5IP.js +314 -0
- package/chunks/team-delete-25OIWUPN.js +116 -0
- package/chunks/{todoWrite-VLAUG4CA.js → todoWrite-4YHMIF4X.js} +16 -5
- package/chunks/{tool-search-MZGHUUKD.js → tool-search-YBRVZCLI.js} +29 -11
- package/chunks/{tts-notification-K3X7X7MN.js → tts-notification-7SOEMQK4.js} +5 -4
- package/chunks/{web-fetch-OILB464A.js → web-fetch-MFIRHIHI.js} +5 -5
- package/chunks/workflow-5RIKVCIE.js +960 -0
- package/chunks/{write-file-BIQAA57V.js → write-file-DMQTJZOM.js} +32 -24
- package/chunks/{zh-PWL2NKY3.js → zh-7H5OQC4I.js} +135 -11
- package/chunks/{zh-TW-S3YGWICZ.js → zh-TW-P4IDHD3M.js} +128 -11
- package/cli.js +45402 -20570
- package/examples/agent/agents/diary.md +86 -0
- package/examples/agent/qwen-extension.json +5 -0
- package/examples/commands/commands/fs/grep-code.md +3 -0
- package/examples/commands/qwen-extension.json +5 -0
- package/examples/context/QWEN.md +8 -0
- package/examples/context/qwen-extension.json +5 -0
- package/examples/mcp-server/example.ts +60 -0
- package/examples/mcp-server/package.json +18 -0
- package/examples/mcp-server/qwen-extension.json +12 -0
- package/examples/mcp-server/tsconfig.json +13 -0
- package/examples/skills/qwen-extension.json +5 -0
- package/examples/skills/skills/synonyms/SKILL.md +48 -0
- package/examples/starter/QWEN.md +30 -0
- package/examples/starter/README.md +59 -0
- package/examples/starter/agents/diary.md +86 -0
- package/examples/starter/commands/writing/polish.md +13 -0
- package/examples/starter/example.ts +64 -0
- package/examples/starter/package.json +18 -0
- package/examples/starter/qwen-extension.json +12 -0
- package/examples/starter/skills/synonyms/SKILL.md +48 -0
- package/examples/starter/tsconfig.json +13 -0
- package/fzfWorker.js +1083 -0
- package/locales/ca.js +118 -5
- package/locales/de.js +117 -5
- package/locales/en.js +169 -7
- package/locales/fr.js +119 -5
- package/locales/ja.js +114 -5
- package/locales/pt.js +117 -5
- package/locales/ru.js +116 -5
- package/locales/zh-TW.js +161 -12
- package/locales/zh.js +169 -12
- package/package.json +4 -2
- package/scripts/postinstall.cjs +2 -1
- package/bundled/qc-helper/docs/features/checkpointing.md +0 -77
- package/chunks/agent-7ZN3CRHR.js +0 -48
- package/chunks/chunk-6PCB2DEF.js +0 -434
- package/chunks/chunk-EM6ETG2K.js +0 -60
- package/chunks/chunk-G7YTSRES.js +0 -150
- package/chunks/contextCommand-7IBASARL.js +0 -44
- package/chunks/exitPlanMode-PZAMWIRW.js +0 -227
- package/chunks/multipart-parser-IXGBIOIN.js +0 -384
- package/chunks/read-file-CCUEUFG2.js +0 -24
- package/chunks/ripGrep-TADOH2HK.js +0 -40
- package/chunks/send-message-YL44UZFC.js +0 -151
- package/chunks/shell-7KKKC5G7.js +0 -48
- package/chunks/src-IPWIHNMI.js +0 -1406
- package/chunks/undici-F6ZOXSS5.js +0 -8
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
+
import {
|
|
4
|
+
createDebugLogger
|
|
5
|
+
} from "./chunk-HR7SV7AY.js";
|
|
3
6
|
import {
|
|
4
7
|
init_esbuild_shims
|
|
5
8
|
} from "./chunk-A4BMJM77.js";
|
|
6
9
|
import {
|
|
7
10
|
__commonJS,
|
|
8
11
|
__name,
|
|
9
|
-
__require
|
|
12
|
+
__require,
|
|
13
|
+
__toESM
|
|
10
14
|
} from "./chunk-J2S4EL5Y.js";
|
|
11
15
|
|
|
12
|
-
// node_modules/undici/lib/core/symbols.js
|
|
16
|
+
// packages/core/node_modules/undici/lib/core/symbols.js
|
|
13
17
|
var require_symbols = __commonJS({
|
|
14
|
-
"node_modules/undici/lib/core/symbols.js"(exports, module) {
|
|
18
|
+
"packages/core/node_modules/undici/lib/core/symbols.js"(exports, module) {
|
|
15
19
|
init_esbuild_shims();
|
|
16
20
|
module.exports = {
|
|
17
21
|
kClose: Symbol("close"),
|
|
@@ -83,9 +87,9 @@ var require_symbols = __commonJS({
|
|
|
83
87
|
}
|
|
84
88
|
});
|
|
85
89
|
|
|
86
|
-
// node_modules/undici/lib/core/errors.js
|
|
90
|
+
// packages/core/node_modules/undici/lib/core/errors.js
|
|
87
91
|
var require_errors = __commonJS({
|
|
88
|
-
"node_modules/undici/lib/core/errors.js"(exports, module) {
|
|
92
|
+
"packages/core/node_modules/undici/lib/core/errors.js"(exports, module) {
|
|
89
93
|
"use strict";
|
|
90
94
|
init_esbuild_shims();
|
|
91
95
|
var kUndiciError = Symbol.for("undici.error.UND_ERR");
|
|
@@ -467,24 +471,6 @@ var require_errors = __commonJS({
|
|
|
467
471
|
}
|
|
468
472
|
[kSecureProxyConnectionError] = true;
|
|
469
473
|
};
|
|
470
|
-
var kMessageSizeExceededError = Symbol.for("undici.error.UND_ERR_WS_MESSAGE_SIZE_EXCEEDED");
|
|
471
|
-
var MessageSizeExceededError = class extends UndiciError {
|
|
472
|
-
static {
|
|
473
|
-
__name(this, "MessageSizeExceededError");
|
|
474
|
-
}
|
|
475
|
-
constructor(message) {
|
|
476
|
-
super(message);
|
|
477
|
-
this.name = "MessageSizeExceededError";
|
|
478
|
-
this.message = message || "Max decompressed message size exceeded";
|
|
479
|
-
this.code = "UND_ERR_WS_MESSAGE_SIZE_EXCEEDED";
|
|
480
|
-
}
|
|
481
|
-
static [Symbol.hasInstance](instance) {
|
|
482
|
-
return instance && instance[kMessageSizeExceededError] === true;
|
|
483
|
-
}
|
|
484
|
-
get [kMessageSizeExceededError]() {
|
|
485
|
-
return true;
|
|
486
|
-
}
|
|
487
|
-
};
|
|
488
474
|
module.exports = {
|
|
489
475
|
AbortError,
|
|
490
476
|
HTTPParserError,
|
|
@@ -508,15 +494,14 @@ var require_errors = __commonJS({
|
|
|
508
494
|
ResponseExceededMaxSizeError,
|
|
509
495
|
RequestRetryError,
|
|
510
496
|
ResponseError,
|
|
511
|
-
SecureProxyConnectionError
|
|
512
|
-
MessageSizeExceededError
|
|
497
|
+
SecureProxyConnectionError
|
|
513
498
|
};
|
|
514
499
|
}
|
|
515
500
|
});
|
|
516
501
|
|
|
517
|
-
// node_modules/undici/lib/core/constants.js
|
|
502
|
+
// packages/core/node_modules/undici/lib/core/constants.js
|
|
518
503
|
var require_constants = __commonJS({
|
|
519
|
-
"node_modules/undici/lib/core/constants.js"(exports, module) {
|
|
504
|
+
"packages/core/node_modules/undici/lib/core/constants.js"(exports, module) {
|
|
520
505
|
"use strict";
|
|
521
506
|
init_esbuild_shims();
|
|
522
507
|
var headerNameLowerCasedRecord = {};
|
|
@@ -630,9 +615,9 @@ var require_constants = __commonJS({
|
|
|
630
615
|
}
|
|
631
616
|
});
|
|
632
617
|
|
|
633
|
-
// node_modules/undici/lib/core/tree.js
|
|
618
|
+
// packages/core/node_modules/undici/lib/core/tree.js
|
|
634
619
|
var require_tree = __commonJS({
|
|
635
|
-
"node_modules/undici/lib/core/tree.js"(exports, module) {
|
|
620
|
+
"packages/core/node_modules/undici/lib/core/tree.js"(exports, module) {
|
|
636
621
|
"use strict";
|
|
637
622
|
init_esbuild_shims();
|
|
638
623
|
var {
|
|
@@ -777,9 +762,9 @@ var require_tree = __commonJS({
|
|
|
777
762
|
}
|
|
778
763
|
});
|
|
779
764
|
|
|
780
|
-
// node_modules/undici/lib/core/util.js
|
|
765
|
+
// packages/core/node_modules/undici/lib/core/util.js
|
|
781
766
|
var require_util = __commonJS({
|
|
782
|
-
"node_modules/undici/lib/core/util.js"(exports, module) {
|
|
767
|
+
"packages/core/node_modules/undici/lib/core/util.js"(exports, module) {
|
|
783
768
|
"use strict";
|
|
784
769
|
init_esbuild_shims();
|
|
785
770
|
var assert = __require("node:assert");
|
|
@@ -1327,9 +1312,9 @@ var require_util = __commonJS({
|
|
|
1327
1312
|
}
|
|
1328
1313
|
});
|
|
1329
1314
|
|
|
1330
|
-
// node_modules/undici/lib/core/diagnostics.js
|
|
1315
|
+
// packages/core/node_modules/undici/lib/core/diagnostics.js
|
|
1331
1316
|
var require_diagnostics = __commonJS({
|
|
1332
|
-
"node_modules/undici/lib/core/diagnostics.js"(exports, module) {
|
|
1317
|
+
"packages/core/node_modules/undici/lib/core/diagnostics.js"(exports, module) {
|
|
1333
1318
|
"use strict";
|
|
1334
1319
|
init_esbuild_shims();
|
|
1335
1320
|
var diagnosticsChannel = __require("node:diagnostics_channel");
|
|
@@ -1513,9 +1498,9 @@ var require_diagnostics = __commonJS({
|
|
|
1513
1498
|
}
|
|
1514
1499
|
});
|
|
1515
1500
|
|
|
1516
|
-
// node_modules/undici/lib/core/request.js
|
|
1501
|
+
// packages/core/node_modules/undici/lib/core/request.js
|
|
1517
1502
|
var require_request = __commonJS({
|
|
1518
|
-
"node_modules/undici/lib/core/request.js"(exports, module) {
|
|
1503
|
+
"packages/core/node_modules/undici/lib/core/request.js"(exports, module) {
|
|
1519
1504
|
"use strict";
|
|
1520
1505
|
init_esbuild_shims();
|
|
1521
1506
|
var {
|
|
@@ -1576,9 +1561,6 @@ var require_request = __commonJS({
|
|
|
1576
1561
|
if (upgrade && typeof upgrade !== "string") {
|
|
1577
1562
|
throw new InvalidArgumentError("upgrade must be a string");
|
|
1578
1563
|
}
|
|
1579
|
-
if (upgrade && !isValidHeaderValue(upgrade)) {
|
|
1580
|
-
throw new InvalidArgumentError("invalid upgrade header");
|
|
1581
|
-
}
|
|
1582
1564
|
if (headersTimeout != null && (!Number.isFinite(headersTimeout) || headersTimeout < 0)) {
|
|
1583
1565
|
throw new InvalidArgumentError("invalid headersTimeout");
|
|
1584
1566
|
}
|
|
@@ -1811,18 +1793,12 @@ var require_request = __commonJS({
|
|
|
1811
1793
|
} else {
|
|
1812
1794
|
val = `${val}`;
|
|
1813
1795
|
}
|
|
1814
|
-
if (headerName === "host") {
|
|
1815
|
-
if (request.host !== null) {
|
|
1816
|
-
throw new InvalidArgumentError("duplicate host header");
|
|
1817
|
-
}
|
|
1796
|
+
if (request.host === null && headerName === "host") {
|
|
1818
1797
|
if (typeof val !== "string") {
|
|
1819
1798
|
throw new InvalidArgumentError("invalid host header");
|
|
1820
1799
|
}
|
|
1821
1800
|
request.host = val;
|
|
1822
|
-
} else if (headerName === "content-length") {
|
|
1823
|
-
if (request.contentLength !== null) {
|
|
1824
|
-
throw new InvalidArgumentError("duplicate content-length header");
|
|
1825
|
-
}
|
|
1801
|
+
} else if (request.contentLength === null && headerName === "content-length") {
|
|
1826
1802
|
request.contentLength = parseInt(val, 10);
|
|
1827
1803
|
if (!Number.isFinite(request.contentLength)) {
|
|
1828
1804
|
throw new InvalidArgumentError("invalid content-length header");
|
|
@@ -1851,9 +1827,9 @@ var require_request = __commonJS({
|
|
|
1851
1827
|
}
|
|
1852
1828
|
});
|
|
1853
1829
|
|
|
1854
|
-
// node_modules/undici/lib/dispatcher/dispatcher.js
|
|
1830
|
+
// packages/core/node_modules/undici/lib/dispatcher/dispatcher.js
|
|
1855
1831
|
var require_dispatcher = __commonJS({
|
|
1856
|
-
"node_modules/undici/lib/dispatcher/dispatcher.js"(exports, module) {
|
|
1832
|
+
"packages/core/node_modules/undici/lib/dispatcher/dispatcher.js"(exports, module) {
|
|
1857
1833
|
"use strict";
|
|
1858
1834
|
init_esbuild_shims();
|
|
1859
1835
|
var EventEmitter = __require("node:events");
|
|
@@ -1913,9 +1889,9 @@ var require_dispatcher = __commonJS({
|
|
|
1913
1889
|
}
|
|
1914
1890
|
});
|
|
1915
1891
|
|
|
1916
|
-
// node_modules/undici/lib/dispatcher/dispatcher-base.js
|
|
1892
|
+
// packages/core/node_modules/undici/lib/dispatcher/dispatcher-base.js
|
|
1917
1893
|
var require_dispatcher_base = __commonJS({
|
|
1918
|
-
"node_modules/undici/lib/dispatcher/dispatcher-base.js"(exports, module) {
|
|
1894
|
+
"packages/core/node_modules/undici/lib/dispatcher/dispatcher-base.js"(exports, module) {
|
|
1919
1895
|
"use strict";
|
|
1920
1896
|
init_esbuild_shims();
|
|
1921
1897
|
var Dispatcher = require_dispatcher();
|
|
@@ -1928,23 +1904,16 @@ var require_dispatcher_base = __commonJS({
|
|
|
1928
1904
|
var kOnDestroyed = Symbol("onDestroyed");
|
|
1929
1905
|
var kOnClosed = Symbol("onClosed");
|
|
1930
1906
|
var kInterceptedDispatch = Symbol("Intercepted Dispatch");
|
|
1931
|
-
var kWebSocketOptions = Symbol("webSocketOptions");
|
|
1932
1907
|
var DispatcherBase = class extends Dispatcher {
|
|
1933
1908
|
static {
|
|
1934
1909
|
__name(this, "DispatcherBase");
|
|
1935
1910
|
}
|
|
1936
|
-
constructor(
|
|
1911
|
+
constructor() {
|
|
1937
1912
|
super();
|
|
1938
1913
|
this[kDestroyed] = false;
|
|
1939
1914
|
this[kOnDestroyed] = null;
|
|
1940
1915
|
this[kClosed] = false;
|
|
1941
1916
|
this[kOnClosed] = [];
|
|
1942
|
-
this[kWebSocketOptions] = opts?.webSocket ?? {};
|
|
1943
|
-
}
|
|
1944
|
-
get webSocketOptions() {
|
|
1945
|
-
return {
|
|
1946
|
-
maxPayloadSize: this[kWebSocketOptions].maxPayloadSize ?? 128 * 1024 * 1024
|
|
1947
|
-
};
|
|
1948
1917
|
}
|
|
1949
1918
|
get destroyed() {
|
|
1950
1919
|
return this[kDestroyed];
|
|
@@ -2085,9 +2054,9 @@ var require_dispatcher_base = __commonJS({
|
|
|
2085
2054
|
}
|
|
2086
2055
|
});
|
|
2087
2056
|
|
|
2088
|
-
// node_modules/undici/lib/util/timers.js
|
|
2057
|
+
// packages/core/node_modules/undici/lib/util/timers.js
|
|
2089
2058
|
var require_timers = __commonJS({
|
|
2090
|
-
"node_modules/undici/lib/util/timers.js"(exports, module) {
|
|
2059
|
+
"packages/core/node_modules/undici/lib/util/timers.js"(exports, module) {
|
|
2091
2060
|
"use strict";
|
|
2092
2061
|
init_esbuild_shims();
|
|
2093
2062
|
var fastNow = 0;
|
|
@@ -2322,9 +2291,9 @@ var require_timers = __commonJS({
|
|
|
2322
2291
|
}
|
|
2323
2292
|
});
|
|
2324
2293
|
|
|
2325
|
-
// node_modules/undici/lib/core/connect.js
|
|
2294
|
+
// packages/core/node_modules/undici/lib/core/connect.js
|
|
2326
2295
|
var require_connect = __commonJS({
|
|
2327
|
-
"node_modules/undici/lib/core/connect.js"(exports, module) {
|
|
2296
|
+
"packages/core/node_modules/undici/lib/core/connect.js"(exports, module) {
|
|
2328
2297
|
"use strict";
|
|
2329
2298
|
init_esbuild_shims();
|
|
2330
2299
|
var net = __require("node:net");
|
|
@@ -2512,9 +2481,9 @@ var require_connect = __commonJS({
|
|
|
2512
2481
|
}
|
|
2513
2482
|
});
|
|
2514
2483
|
|
|
2515
|
-
// node_modules/undici/lib/llhttp/utils.js
|
|
2484
|
+
// packages/core/node_modules/undici/lib/llhttp/utils.js
|
|
2516
2485
|
var require_utils = __commonJS({
|
|
2517
|
-
"node_modules/undici/lib/llhttp/utils.js"(exports) {
|
|
2486
|
+
"packages/core/node_modules/undici/lib/llhttp/utils.js"(exports) {
|
|
2518
2487
|
"use strict";
|
|
2519
2488
|
init_esbuild_shims();
|
|
2520
2489
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -2534,9 +2503,9 @@ var require_utils = __commonJS({
|
|
|
2534
2503
|
}
|
|
2535
2504
|
});
|
|
2536
2505
|
|
|
2537
|
-
// node_modules/undici/lib/llhttp/constants.js
|
|
2506
|
+
// packages/core/node_modules/undici/lib/llhttp/constants.js
|
|
2538
2507
|
var require_constants2 = __commonJS({
|
|
2539
|
-
"node_modules/undici/lib/llhttp/constants.js"(exports) {
|
|
2508
|
+
"packages/core/node_modules/undici/lib/llhttp/constants.js"(exports) {
|
|
2540
2509
|
"use strict";
|
|
2541
2510
|
init_esbuild_shims();
|
|
2542
2511
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -2856,9 +2825,9 @@ var require_constants2 = __commonJS({
|
|
|
2856
2825
|
}
|
|
2857
2826
|
});
|
|
2858
2827
|
|
|
2859
|
-
// node_modules/undici/lib/llhttp/llhttp-wasm.js
|
|
2828
|
+
// packages/core/node_modules/undici/lib/llhttp/llhttp-wasm.js
|
|
2860
2829
|
var require_llhttp_wasm = __commonJS({
|
|
2861
|
-
"node_modules/undici/lib/llhttp/llhttp-wasm.js"(exports, module) {
|
|
2830
|
+
"packages/core/node_modules/undici/lib/llhttp/llhttp-wasm.js"(exports, module) {
|
|
2862
2831
|
"use strict";
|
|
2863
2832
|
init_esbuild_shims();
|
|
2864
2833
|
var { Buffer: Buffer2 } = __require("node:buffer");
|
|
@@ -2866,9 +2835,9 @@ var require_llhttp_wasm = __commonJS({
|
|
|
2866
2835
|
}
|
|
2867
2836
|
});
|
|
2868
2837
|
|
|
2869
|
-
// node_modules/undici/lib/llhttp/llhttp_simd-wasm.js
|
|
2838
|
+
// packages/core/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js
|
|
2870
2839
|
var require_llhttp_simd_wasm = __commonJS({
|
|
2871
|
-
"node_modules/undici/lib/llhttp/llhttp_simd-wasm.js"(exports, module) {
|
|
2840
|
+
"packages/core/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js"(exports, module) {
|
|
2872
2841
|
"use strict";
|
|
2873
2842
|
init_esbuild_shims();
|
|
2874
2843
|
var { Buffer: Buffer2 } = __require("node:buffer");
|
|
@@ -2876,9 +2845,9 @@ var require_llhttp_simd_wasm = __commonJS({
|
|
|
2876
2845
|
}
|
|
2877
2846
|
});
|
|
2878
2847
|
|
|
2879
|
-
// node_modules/undici/lib/web/fetch/constants.js
|
|
2848
|
+
// packages/core/node_modules/undici/lib/web/fetch/constants.js
|
|
2880
2849
|
var require_constants3 = __commonJS({
|
|
2881
|
-
"node_modules/undici/lib/web/fetch/constants.js"(exports, module) {
|
|
2850
|
+
"packages/core/node_modules/undici/lib/web/fetch/constants.js"(exports, module) {
|
|
2882
2851
|
"use strict";
|
|
2883
2852
|
init_esbuild_shims();
|
|
2884
2853
|
var corsSafeListedMethods = (
|
|
@@ -3095,9 +3064,9 @@ var require_constants3 = __commonJS({
|
|
|
3095
3064
|
}
|
|
3096
3065
|
});
|
|
3097
3066
|
|
|
3098
|
-
// node_modules/undici/lib/web/fetch/global.js
|
|
3067
|
+
// packages/core/node_modules/undici/lib/web/fetch/global.js
|
|
3099
3068
|
var require_global = __commonJS({
|
|
3100
|
-
"node_modules/undici/lib/web/fetch/global.js"(exports, module) {
|
|
3069
|
+
"packages/core/node_modules/undici/lib/web/fetch/global.js"(exports, module) {
|
|
3101
3070
|
"use strict";
|
|
3102
3071
|
init_esbuild_shims();
|
|
3103
3072
|
var globalOrigin = Symbol.for("undici.globalOrigin.1");
|
|
@@ -3134,9 +3103,9 @@ var require_global = __commonJS({
|
|
|
3134
3103
|
}
|
|
3135
3104
|
});
|
|
3136
3105
|
|
|
3137
|
-
// node_modules/undici/lib/web/fetch/data-url.js
|
|
3106
|
+
// packages/core/node_modules/undici/lib/web/fetch/data-url.js
|
|
3138
3107
|
var require_data_url = __commonJS({
|
|
3139
|
-
"node_modules/undici/lib/web/fetch/data-url.js"(exports, module) {
|
|
3108
|
+
"packages/core/node_modules/undici/lib/web/fetch/data-url.js"(exports, module) {
|
|
3140
3109
|
"use strict";
|
|
3141
3110
|
init_esbuild_shims();
|
|
3142
3111
|
var assert = __require("node:assert");
|
|
@@ -3506,9 +3475,9 @@ var require_data_url = __commonJS({
|
|
|
3506
3475
|
}
|
|
3507
3476
|
});
|
|
3508
3477
|
|
|
3509
|
-
// node_modules/undici/lib/web/fetch/webidl.js
|
|
3478
|
+
// packages/core/node_modules/undici/lib/web/fetch/webidl.js
|
|
3510
3479
|
var require_webidl = __commonJS({
|
|
3511
|
-
"node_modules/undici/lib/web/fetch/webidl.js"(exports, module) {
|
|
3480
|
+
"packages/core/node_modules/undici/lib/web/fetch/webidl.js"(exports, module) {
|
|
3512
3481
|
"use strict";
|
|
3513
3482
|
init_esbuild_shims();
|
|
3514
3483
|
var { types, inspect } = __require("node:util");
|
|
@@ -3926,9 +3895,9 @@ var require_webidl = __commonJS({
|
|
|
3926
3895
|
}
|
|
3927
3896
|
});
|
|
3928
3897
|
|
|
3929
|
-
// node_modules/undici/lib/web/fetch/util.js
|
|
3898
|
+
// packages/core/node_modules/undici/lib/web/fetch/util.js
|
|
3930
3899
|
var require_util2 = __commonJS({
|
|
3931
|
-
"node_modules/undici/lib/web/fetch/util.js"(exports, module) {
|
|
3900
|
+
"packages/core/node_modules/undici/lib/web/fetch/util.js"(exports, module) {
|
|
3932
3901
|
"use strict";
|
|
3933
3902
|
init_esbuild_shims();
|
|
3934
3903
|
var { Transform } = __require("node:stream");
|
|
@@ -4863,9 +4832,9 @@ var require_util2 = __commonJS({
|
|
|
4863
4832
|
}
|
|
4864
4833
|
});
|
|
4865
4834
|
|
|
4866
|
-
// node_modules/undici/lib/web/fetch/symbols.js
|
|
4835
|
+
// packages/core/node_modules/undici/lib/web/fetch/symbols.js
|
|
4867
4836
|
var require_symbols2 = __commonJS({
|
|
4868
|
-
"node_modules/undici/lib/web/fetch/symbols.js"(exports, module) {
|
|
4837
|
+
"packages/core/node_modules/undici/lib/web/fetch/symbols.js"(exports, module) {
|
|
4869
4838
|
"use strict";
|
|
4870
4839
|
init_esbuild_shims();
|
|
4871
4840
|
module.exports = {
|
|
@@ -4878,9 +4847,9 @@ var require_symbols2 = __commonJS({
|
|
|
4878
4847
|
}
|
|
4879
4848
|
});
|
|
4880
4849
|
|
|
4881
|
-
// node_modules/undici/lib/web/fetch/file.js
|
|
4850
|
+
// packages/core/node_modules/undici/lib/web/fetch/file.js
|
|
4882
4851
|
var require_file = __commonJS({
|
|
4883
|
-
"node_modules/undici/lib/web/fetch/file.js"(exports, module) {
|
|
4852
|
+
"packages/core/node_modules/undici/lib/web/fetch/file.js"(exports, module) {
|
|
4884
4853
|
"use strict";
|
|
4885
4854
|
init_esbuild_shims();
|
|
4886
4855
|
var { Blob: Blob2, File } = __require("node:buffer");
|
|
@@ -4946,9 +4915,9 @@ var require_file = __commonJS({
|
|
|
4946
4915
|
}
|
|
4947
4916
|
});
|
|
4948
4917
|
|
|
4949
|
-
// node_modules/undici/lib/web/fetch/formdata.js
|
|
4918
|
+
// packages/core/node_modules/undici/lib/web/fetch/formdata.js
|
|
4950
4919
|
var require_formdata = __commonJS({
|
|
4951
|
-
"node_modules/undici/lib/web/fetch/formdata.js"(exports, module) {
|
|
4920
|
+
"packages/core/node_modules/undici/lib/web/fetch/formdata.js"(exports, module) {
|
|
4952
4921
|
"use strict";
|
|
4953
4922
|
init_esbuild_shims();
|
|
4954
4923
|
var { isBlobLike, iteratorMixin } = require_util2();
|
|
@@ -5098,9 +5067,9 @@ var require_formdata = __commonJS({
|
|
|
5098
5067
|
}
|
|
5099
5068
|
});
|
|
5100
5069
|
|
|
5101
|
-
// node_modules/undici/lib/web/fetch/formdata-parser.js
|
|
5070
|
+
// packages/core/node_modules/undici/lib/web/fetch/formdata-parser.js
|
|
5102
5071
|
var require_formdata_parser = __commonJS({
|
|
5103
|
-
"node_modules/undici/lib/web/fetch/formdata-parser.js"(exports, module) {
|
|
5072
|
+
"packages/core/node_modules/undici/lib/web/fetch/formdata-parser.js"(exports, module) {
|
|
5104
5073
|
"use strict";
|
|
5105
5074
|
init_esbuild_shims();
|
|
5106
5075
|
var { isUSVString, bufferToLowerCasedHeaderName } = require_util();
|
|
@@ -5358,9 +5327,9 @@ var require_formdata_parser = __commonJS({
|
|
|
5358
5327
|
}
|
|
5359
5328
|
});
|
|
5360
5329
|
|
|
5361
|
-
// node_modules/undici/lib/web/fetch/body.js
|
|
5330
|
+
// packages/core/node_modules/undici/lib/web/fetch/body.js
|
|
5362
5331
|
var require_body = __commonJS({
|
|
5363
|
-
"node_modules/undici/lib/web/fetch/body.js"(exports, module) {
|
|
5332
|
+
"packages/core/node_modules/undici/lib/web/fetch/body.js"(exports, module) {
|
|
5364
5333
|
"use strict";
|
|
5365
5334
|
init_esbuild_shims();
|
|
5366
5335
|
var util = require_util();
|
|
@@ -5684,9 +5653,9 @@ Content-Type: ${value.type || "application/octet-stream"}\r
|
|
|
5684
5653
|
}
|
|
5685
5654
|
});
|
|
5686
5655
|
|
|
5687
|
-
// node_modules/undici/lib/dispatcher/client-h1.js
|
|
5656
|
+
// packages/core/node_modules/undici/lib/dispatcher/client-h1.js
|
|
5688
5657
|
var require_client_h1 = __commonJS({
|
|
5689
|
-
"node_modules/undici/lib/dispatcher/client-h1.js"(exports, module) {
|
|
5658
|
+
"packages/core/node_modules/undici/lib/dispatcher/client-h1.js"(exports, module) {
|
|
5690
5659
|
"use strict";
|
|
5691
5660
|
init_esbuild_shims();
|
|
5692
5661
|
var assert = __require("node:assert");
|
|
@@ -6722,9 +6691,9 @@ ${len.toString(16)}\r
|
|
|
6722
6691
|
}
|
|
6723
6692
|
});
|
|
6724
6693
|
|
|
6725
|
-
// node_modules/undici/lib/dispatcher/client-h2.js
|
|
6694
|
+
// packages/core/node_modules/undici/lib/dispatcher/client-h2.js
|
|
6726
6695
|
var require_client_h2 = __commonJS({
|
|
6727
|
-
"node_modules/undici/lib/dispatcher/client-h2.js"(exports, module) {
|
|
6696
|
+
"packages/core/node_modules/undici/lib/dispatcher/client-h2.js"(exports, module) {
|
|
6728
6697
|
"use strict";
|
|
6729
6698
|
init_esbuild_shims();
|
|
6730
6699
|
var assert = __require("node:assert");
|
|
@@ -7280,9 +7249,9 @@ var require_client_h2 = __commonJS({
|
|
|
7280
7249
|
}
|
|
7281
7250
|
});
|
|
7282
7251
|
|
|
7283
|
-
// node_modules/undici/lib/handler/redirect-handler.js
|
|
7252
|
+
// packages/core/node_modules/undici/lib/handler/redirect-handler.js
|
|
7284
7253
|
var require_redirect_handler = __commonJS({
|
|
7285
|
-
"node_modules/undici/lib/handler/redirect-handler.js"(exports, module) {
|
|
7254
|
+
"packages/core/node_modules/undici/lib/handler/redirect-handler.js"(exports, module) {
|
|
7286
7255
|
"use strict";
|
|
7287
7256
|
init_esbuild_shims();
|
|
7288
7257
|
var util = require_util();
|
|
@@ -7449,9 +7418,9 @@ var require_redirect_handler = __commonJS({
|
|
|
7449
7418
|
}
|
|
7450
7419
|
});
|
|
7451
7420
|
|
|
7452
|
-
// node_modules/undici/lib/interceptor/redirect-interceptor.js
|
|
7421
|
+
// packages/core/node_modules/undici/lib/interceptor/redirect-interceptor.js
|
|
7453
7422
|
var require_redirect_interceptor = __commonJS({
|
|
7454
|
-
"node_modules/undici/lib/interceptor/redirect-interceptor.js"(exports, module) {
|
|
7423
|
+
"packages/core/node_modules/undici/lib/interceptor/redirect-interceptor.js"(exports, module) {
|
|
7455
7424
|
"use strict";
|
|
7456
7425
|
init_esbuild_shims();
|
|
7457
7426
|
var RedirectHandler = require_redirect_handler();
|
|
@@ -7473,9 +7442,9 @@ var require_redirect_interceptor = __commonJS({
|
|
|
7473
7442
|
}
|
|
7474
7443
|
});
|
|
7475
7444
|
|
|
7476
|
-
// node_modules/undici/lib/dispatcher/client.js
|
|
7445
|
+
// packages/core/node_modules/undici/lib/dispatcher/client.js
|
|
7477
7446
|
var require_client = __commonJS({
|
|
7478
|
-
"node_modules/undici/lib/dispatcher/client.js"(exports, module) {
|
|
7447
|
+
"packages/core/node_modules/undici/lib/dispatcher/client.js"(exports, module) {
|
|
7479
7448
|
"use strict";
|
|
7480
7449
|
init_esbuild_shims();
|
|
7481
7450
|
var assert = __require("node:assert");
|
|
@@ -7580,10 +7549,9 @@ var require_client = __commonJS({
|
|
|
7580
7549
|
autoSelectFamilyAttemptTimeout,
|
|
7581
7550
|
// h2
|
|
7582
7551
|
maxConcurrentStreams,
|
|
7583
|
-
allowH2
|
|
7584
|
-
webSocket
|
|
7552
|
+
allowH2
|
|
7585
7553
|
} = {}) {
|
|
7586
|
-
super(
|
|
7554
|
+
super();
|
|
7587
7555
|
if (keepAlive !== void 0) {
|
|
7588
7556
|
throw new InvalidArgumentError("unsupported keepAlive, use pipelining=0 instead");
|
|
7589
7557
|
}
|
|
@@ -7984,9 +7952,9 @@ var require_client = __commonJS({
|
|
|
7984
7952
|
}
|
|
7985
7953
|
});
|
|
7986
7954
|
|
|
7987
|
-
// node_modules/undici/lib/dispatcher/fixed-queue.js
|
|
7955
|
+
// packages/core/node_modules/undici/lib/dispatcher/fixed-queue.js
|
|
7988
7956
|
var require_fixed_queue = __commonJS({
|
|
7989
|
-
"node_modules/undici/lib/dispatcher/fixed-queue.js"(exports, module) {
|
|
7957
|
+
"packages/core/node_modules/undici/lib/dispatcher/fixed-queue.js"(exports, module) {
|
|
7990
7958
|
"use strict";
|
|
7991
7959
|
init_esbuild_shims();
|
|
7992
7960
|
var kSize = 2048;
|
|
@@ -8048,9 +8016,9 @@ var require_fixed_queue = __commonJS({
|
|
|
8048
8016
|
}
|
|
8049
8017
|
});
|
|
8050
8018
|
|
|
8051
|
-
// node_modules/undici/lib/dispatcher/pool-stats.js
|
|
8019
|
+
// packages/core/node_modules/undici/lib/dispatcher/pool-stats.js
|
|
8052
8020
|
var require_pool_stats = __commonJS({
|
|
8053
|
-
"node_modules/undici/lib/dispatcher/pool-stats.js"(exports, module) {
|
|
8021
|
+
"packages/core/node_modules/undici/lib/dispatcher/pool-stats.js"(exports, module) {
|
|
8054
8022
|
init_esbuild_shims();
|
|
8055
8023
|
var { kFree, kConnected, kPending, kQueued, kRunning, kSize } = require_symbols();
|
|
8056
8024
|
var kPool = Symbol("pool");
|
|
@@ -8084,9 +8052,9 @@ var require_pool_stats = __commonJS({
|
|
|
8084
8052
|
}
|
|
8085
8053
|
});
|
|
8086
8054
|
|
|
8087
|
-
// node_modules/undici/lib/dispatcher/pool-base.js
|
|
8055
|
+
// packages/core/node_modules/undici/lib/dispatcher/pool-base.js
|
|
8088
8056
|
var require_pool_base = __commonJS({
|
|
8089
|
-
"node_modules/undici/lib/dispatcher/pool-base.js"(exports, module) {
|
|
8057
|
+
"packages/core/node_modules/undici/lib/dispatcher/pool-base.js"(exports, module) {
|
|
8090
8058
|
"use strict";
|
|
8091
8059
|
init_esbuild_shims();
|
|
8092
8060
|
var DispatcherBase = require_dispatcher_base();
|
|
@@ -8109,8 +8077,8 @@ var require_pool_base = __commonJS({
|
|
|
8109
8077
|
static {
|
|
8110
8078
|
__name(this, "PoolBase");
|
|
8111
8079
|
}
|
|
8112
|
-
constructor(
|
|
8113
|
-
super(
|
|
8080
|
+
constructor() {
|
|
8081
|
+
super();
|
|
8114
8082
|
this[kQueue] = new FixedQueue();
|
|
8115
8083
|
this[kClients] = [];
|
|
8116
8084
|
this[kQueued] = 0;
|
|
@@ -8243,9 +8211,9 @@ var require_pool_base = __commonJS({
|
|
|
8243
8211
|
}
|
|
8244
8212
|
});
|
|
8245
8213
|
|
|
8246
|
-
// node_modules/undici/lib/dispatcher/pool.js
|
|
8214
|
+
// packages/core/node_modules/undici/lib/dispatcher/pool.js
|
|
8247
8215
|
var require_pool = __commonJS({
|
|
8248
|
-
"node_modules/undici/lib/dispatcher/pool.js"(exports, module) {
|
|
8216
|
+
"packages/core/node_modules/undici/lib/dispatcher/pool.js"(exports, module) {
|
|
8249
8217
|
"use strict";
|
|
8250
8218
|
init_esbuild_shims();
|
|
8251
8219
|
var {
|
|
@@ -8286,6 +8254,7 @@ var require_pool = __commonJS({
|
|
|
8286
8254
|
allowH2,
|
|
8287
8255
|
...options
|
|
8288
8256
|
} = {}) {
|
|
8257
|
+
super();
|
|
8289
8258
|
if (connections != null && (!Number.isFinite(connections) || connections < 0)) {
|
|
8290
8259
|
throw new InvalidArgumentError("invalid connections");
|
|
8291
8260
|
}
|
|
@@ -8306,7 +8275,6 @@ var require_pool = __commonJS({
|
|
|
8306
8275
|
...connect
|
|
8307
8276
|
});
|
|
8308
8277
|
}
|
|
8309
|
-
super(options);
|
|
8310
8278
|
this[kInterceptors] = options.interceptors?.Pool && Array.isArray(options.interceptors.Pool) ? options.interceptors.Pool : [];
|
|
8311
8279
|
this[kConnections] = connections || null;
|
|
8312
8280
|
this[kUrl] = util.parseOrigin(origin);
|
|
@@ -8339,9 +8307,9 @@ var require_pool = __commonJS({
|
|
|
8339
8307
|
}
|
|
8340
8308
|
});
|
|
8341
8309
|
|
|
8342
|
-
// node_modules/undici/lib/dispatcher/balanced-pool.js
|
|
8310
|
+
// packages/core/node_modules/undici/lib/dispatcher/balanced-pool.js
|
|
8343
8311
|
var require_balanced_pool = __commonJS({
|
|
8344
|
-
"node_modules/undici/lib/dispatcher/balanced-pool.js"(exports, module) {
|
|
8312
|
+
"packages/core/node_modules/undici/lib/dispatcher/balanced-pool.js"(exports, module) {
|
|
8345
8313
|
"use strict";
|
|
8346
8314
|
init_esbuild_shims();
|
|
8347
8315
|
var {
|
|
@@ -8489,9 +8457,9 @@ var require_balanced_pool = __commonJS({
|
|
|
8489
8457
|
}
|
|
8490
8458
|
});
|
|
8491
8459
|
|
|
8492
|
-
// node_modules/undici/lib/dispatcher/agent.js
|
|
8460
|
+
// packages/core/node_modules/undici/lib/dispatcher/agent.js
|
|
8493
8461
|
var require_agent = __commonJS({
|
|
8494
|
-
"node_modules/undici/lib/dispatcher/agent.js"(exports, module) {
|
|
8462
|
+
"packages/core/node_modules/undici/lib/dispatcher/agent.js"(exports, module) {
|
|
8495
8463
|
"use strict";
|
|
8496
8464
|
init_esbuild_shims();
|
|
8497
8465
|
var { InvalidArgumentError } = require_errors();
|
|
@@ -8512,11 +8480,12 @@ var require_agent = __commonJS({
|
|
|
8512
8480
|
return opts && opts.connections === 1 ? new Client(origin, opts) : new Pool(origin, opts);
|
|
8513
8481
|
}
|
|
8514
8482
|
__name(defaultFactory, "defaultFactory");
|
|
8515
|
-
var
|
|
8483
|
+
var Agent2 = class extends DispatcherBase {
|
|
8516
8484
|
static {
|
|
8517
8485
|
__name(this, "Agent");
|
|
8518
8486
|
}
|
|
8519
8487
|
constructor({ factory = defaultFactory, maxRedirections = 0, connect, ...options } = {}) {
|
|
8488
|
+
super();
|
|
8520
8489
|
if (typeof factory !== "function") {
|
|
8521
8490
|
throw new InvalidArgumentError("factory must be a function.");
|
|
8522
8491
|
}
|
|
@@ -8526,7 +8495,6 @@ var require_agent = __commonJS({
|
|
|
8526
8495
|
if (!Number.isInteger(maxRedirections) || maxRedirections < 0) {
|
|
8527
8496
|
throw new InvalidArgumentError("maxRedirections must be a positive number");
|
|
8528
8497
|
}
|
|
8529
|
-
super(options);
|
|
8530
8498
|
if (connect && typeof connect !== "function") {
|
|
8531
8499
|
connect = { ...connect };
|
|
8532
8500
|
}
|
|
@@ -8587,18 +8555,18 @@ var require_agent = __commonJS({
|
|
|
8587
8555
|
await Promise.all(destroyPromises);
|
|
8588
8556
|
}
|
|
8589
8557
|
};
|
|
8590
|
-
module.exports =
|
|
8558
|
+
module.exports = Agent2;
|
|
8591
8559
|
}
|
|
8592
8560
|
});
|
|
8593
8561
|
|
|
8594
|
-
// node_modules/undici/lib/dispatcher/proxy-agent.js
|
|
8562
|
+
// packages/core/node_modules/undici/lib/dispatcher/proxy-agent.js
|
|
8595
8563
|
var require_proxy_agent = __commonJS({
|
|
8596
|
-
"node_modules/undici/lib/dispatcher/proxy-agent.js"(exports, module) {
|
|
8564
|
+
"packages/core/node_modules/undici/lib/dispatcher/proxy-agent.js"(exports, module) {
|
|
8597
8565
|
"use strict";
|
|
8598
8566
|
init_esbuild_shims();
|
|
8599
8567
|
var { kProxy, kClose, kDestroy, kDispatch, kInterceptors } = require_symbols();
|
|
8600
8568
|
var { URL: URL2 } = __require("node:url");
|
|
8601
|
-
var
|
|
8569
|
+
var Agent2 = require_agent();
|
|
8602
8570
|
var Pool = require_pool();
|
|
8603
8571
|
var DispatcherBase = require_dispatcher_base();
|
|
8604
8572
|
var { InvalidArgumentError, RequestAbortedError, SecureProxyConnectionError } = require_errors();
|
|
@@ -8676,7 +8644,7 @@ var require_proxy_agent = __commonJS({
|
|
|
8676
8644
|
return this.#client.destroy(err);
|
|
8677
8645
|
}
|
|
8678
8646
|
};
|
|
8679
|
-
var
|
|
8647
|
+
var ProxyAgent2 = class extends DispatcherBase {
|
|
8680
8648
|
static {
|
|
8681
8649
|
__name(this, "ProxyAgent");
|
|
8682
8650
|
}
|
|
@@ -8722,7 +8690,7 @@ var require_proxy_agent = __commonJS({
|
|
|
8722
8690
|
return agentFactory(origin2, options);
|
|
8723
8691
|
}, "factory");
|
|
8724
8692
|
this[kClient] = clientFactory(url, { connect });
|
|
8725
|
-
this[kAgent] = new
|
|
8693
|
+
this[kAgent] = new Agent2({
|
|
8726
8694
|
...opts,
|
|
8727
8695
|
factory,
|
|
8728
8696
|
connect: /* @__PURE__ */ __name(async (opts2, callback) => {
|
|
@@ -8822,19 +8790,19 @@ var require_proxy_agent = __commonJS({
|
|
|
8822
8790
|
}
|
|
8823
8791
|
}
|
|
8824
8792
|
__name(throwIfProxyAuthIsSent, "throwIfProxyAuthIsSent");
|
|
8825
|
-
module.exports =
|
|
8793
|
+
module.exports = ProxyAgent2;
|
|
8826
8794
|
}
|
|
8827
8795
|
});
|
|
8828
8796
|
|
|
8829
|
-
// node_modules/undici/lib/dispatcher/env-http-proxy-agent.js
|
|
8797
|
+
// packages/core/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js
|
|
8830
8798
|
var require_env_http_proxy_agent = __commonJS({
|
|
8831
|
-
"node_modules/undici/lib/dispatcher/env-http-proxy-agent.js"(exports, module) {
|
|
8799
|
+
"packages/core/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js"(exports, module) {
|
|
8832
8800
|
"use strict";
|
|
8833
8801
|
init_esbuild_shims();
|
|
8834
8802
|
var DispatcherBase = require_dispatcher_base();
|
|
8835
8803
|
var { kClose, kDestroy, kClosed, kDestroyed, kDispatch, kNoProxyAgent, kHttpProxyAgent, kHttpsProxyAgent } = require_symbols();
|
|
8836
|
-
var
|
|
8837
|
-
var
|
|
8804
|
+
var ProxyAgent2 = require_proxy_agent();
|
|
8805
|
+
var Agent2 = require_agent();
|
|
8838
8806
|
var DEFAULT_PORTS = {
|
|
8839
8807
|
"http:": 80,
|
|
8840
8808
|
"https:": 443
|
|
@@ -8857,16 +8825,16 @@ var require_env_http_proxy_agent = __commonJS({
|
|
|
8857
8825
|
});
|
|
8858
8826
|
}
|
|
8859
8827
|
const { httpProxy, httpsProxy, noProxy, ...agentOpts } = opts;
|
|
8860
|
-
this[kNoProxyAgent] = new
|
|
8828
|
+
this[kNoProxyAgent] = new Agent2(agentOpts);
|
|
8861
8829
|
const HTTP_PROXY = httpProxy ?? process.env.http_proxy ?? process.env.HTTP_PROXY;
|
|
8862
8830
|
if (HTTP_PROXY) {
|
|
8863
|
-
this[kHttpProxyAgent] = new
|
|
8831
|
+
this[kHttpProxyAgent] = new ProxyAgent2({ ...agentOpts, uri: HTTP_PROXY });
|
|
8864
8832
|
} else {
|
|
8865
8833
|
this[kHttpProxyAgent] = this[kNoProxyAgent];
|
|
8866
8834
|
}
|
|
8867
8835
|
const HTTPS_PROXY = httpsProxy ?? process.env.https_proxy ?? process.env.HTTPS_PROXY;
|
|
8868
8836
|
if (HTTPS_PROXY) {
|
|
8869
|
-
this[kHttpsProxyAgent] = new
|
|
8837
|
+
this[kHttpsProxyAgent] = new ProxyAgent2({ ...agentOpts, uri: HTTPS_PROXY });
|
|
8870
8838
|
} else {
|
|
8871
8839
|
this[kHttpsProxyAgent] = this[kHttpProxyAgent];
|
|
8872
8840
|
}
|
|
@@ -8966,9 +8934,9 @@ var require_env_http_proxy_agent = __commonJS({
|
|
|
8966
8934
|
}
|
|
8967
8935
|
});
|
|
8968
8936
|
|
|
8969
|
-
// node_modules/undici/lib/handler/retry-handler.js
|
|
8937
|
+
// packages/core/node_modules/undici/lib/handler/retry-handler.js
|
|
8970
8938
|
var require_retry_handler = __commonJS({
|
|
8971
|
-
"node_modules/undici/lib/handler/retry-handler.js"(exports, module) {
|
|
8939
|
+
"packages/core/node_modules/undici/lib/handler/retry-handler.js"(exports, module) {
|
|
8972
8940
|
"use strict";
|
|
8973
8941
|
init_esbuild_shims();
|
|
8974
8942
|
var assert = __require("node:assert");
|
|
@@ -9270,9 +9238,9 @@ var require_retry_handler = __commonJS({
|
|
|
9270
9238
|
}
|
|
9271
9239
|
});
|
|
9272
9240
|
|
|
9273
|
-
// node_modules/undici/lib/dispatcher/retry-agent.js
|
|
9241
|
+
// packages/core/node_modules/undici/lib/dispatcher/retry-agent.js
|
|
9274
9242
|
var require_retry_agent = __commonJS({
|
|
9275
|
-
"node_modules/undici/lib/dispatcher/retry-agent.js"(exports, module) {
|
|
9243
|
+
"packages/core/node_modules/undici/lib/dispatcher/retry-agent.js"(exports, module) {
|
|
9276
9244
|
"use strict";
|
|
9277
9245
|
init_esbuild_shims();
|
|
9278
9246
|
var Dispatcher = require_dispatcher();
|
|
@@ -9309,9 +9277,9 @@ var require_retry_agent = __commonJS({
|
|
|
9309
9277
|
}
|
|
9310
9278
|
});
|
|
9311
9279
|
|
|
9312
|
-
// node_modules/undici/lib/api/readable.js
|
|
9280
|
+
// packages/core/node_modules/undici/lib/api/readable.js
|
|
9313
9281
|
var require_readable = __commonJS({
|
|
9314
|
-
"node_modules/undici/lib/api/readable.js"(exports, module) {
|
|
9282
|
+
"packages/core/node_modules/undici/lib/api/readable.js"(exports, module) {
|
|
9315
9283
|
"use strict";
|
|
9316
9284
|
init_esbuild_shims();
|
|
9317
9285
|
var assert = __require("node:assert");
|
|
@@ -9615,9 +9583,9 @@ var require_readable = __commonJS({
|
|
|
9615
9583
|
}
|
|
9616
9584
|
});
|
|
9617
9585
|
|
|
9618
|
-
// node_modules/undici/lib/api/util.js
|
|
9586
|
+
// packages/core/node_modules/undici/lib/api/util.js
|
|
9619
9587
|
var require_util3 = __commonJS({
|
|
9620
|
-
"node_modules/undici/lib/api/util.js"(exports, module) {
|
|
9588
|
+
"packages/core/node_modules/undici/lib/api/util.js"(exports, module) {
|
|
9621
9589
|
init_esbuild_shims();
|
|
9622
9590
|
var assert = __require("node:assert");
|
|
9623
9591
|
var {
|
|
@@ -9678,9 +9646,9 @@ var require_util3 = __commonJS({
|
|
|
9678
9646
|
}
|
|
9679
9647
|
});
|
|
9680
9648
|
|
|
9681
|
-
// node_modules/undici/lib/api/api-request.js
|
|
9649
|
+
// packages/core/node_modules/undici/lib/api/api-request.js
|
|
9682
9650
|
var require_api_request = __commonJS({
|
|
9683
|
-
"node_modules/undici/lib/api/api-request.js"(exports, module) {
|
|
9651
|
+
"packages/core/node_modules/undici/lib/api/api-request.js"(exports, module) {
|
|
9684
9652
|
"use strict";
|
|
9685
9653
|
init_esbuild_shims();
|
|
9686
9654
|
var assert = __require("node:assert");
|
|
@@ -9869,9 +9837,9 @@ var require_api_request = __commonJS({
|
|
|
9869
9837
|
}
|
|
9870
9838
|
});
|
|
9871
9839
|
|
|
9872
|
-
// node_modules/undici/lib/api/abort-signal.js
|
|
9840
|
+
// packages/core/node_modules/undici/lib/api/abort-signal.js
|
|
9873
9841
|
var require_abort_signal = __commonJS({
|
|
9874
|
-
"node_modules/undici/lib/api/abort-signal.js"(exports, module) {
|
|
9842
|
+
"packages/core/node_modules/undici/lib/api/abort-signal.js"(exports, module) {
|
|
9875
9843
|
init_esbuild_shims();
|
|
9876
9844
|
var { addAbortListener } = require_util();
|
|
9877
9845
|
var { RequestAbortedError } = require_errors();
|
|
@@ -9924,9 +9892,9 @@ var require_abort_signal = __commonJS({
|
|
|
9924
9892
|
}
|
|
9925
9893
|
});
|
|
9926
9894
|
|
|
9927
|
-
// node_modules/undici/lib/api/api-stream.js
|
|
9895
|
+
// packages/core/node_modules/undici/lib/api/api-stream.js
|
|
9928
9896
|
var require_api_stream = __commonJS({
|
|
9929
|
-
"node_modules/undici/lib/api/api-stream.js"(exports, module) {
|
|
9897
|
+
"packages/core/node_modules/undici/lib/api/api-stream.js"(exports, module) {
|
|
9930
9898
|
"use strict";
|
|
9931
9899
|
init_esbuild_shims();
|
|
9932
9900
|
var assert = __require("node:assert");
|
|
@@ -10102,9 +10070,9 @@ var require_api_stream = __commonJS({
|
|
|
10102
10070
|
}
|
|
10103
10071
|
});
|
|
10104
10072
|
|
|
10105
|
-
// node_modules/undici/lib/api/api-pipeline.js
|
|
10073
|
+
// packages/core/node_modules/undici/lib/api/api-pipeline.js
|
|
10106
10074
|
var require_api_pipeline = __commonJS({
|
|
10107
|
-
"node_modules/undici/lib/api/api-pipeline.js"(exports, module) {
|
|
10075
|
+
"packages/core/node_modules/undici/lib/api/api-pipeline.js"(exports, module) {
|
|
10108
10076
|
"use strict";
|
|
10109
10077
|
init_esbuild_shims();
|
|
10110
10078
|
var {
|
|
@@ -10313,9 +10281,9 @@ var require_api_pipeline = __commonJS({
|
|
|
10313
10281
|
}
|
|
10314
10282
|
});
|
|
10315
10283
|
|
|
10316
|
-
// node_modules/undici/lib/api/api-upgrade.js
|
|
10284
|
+
// packages/core/node_modules/undici/lib/api/api-upgrade.js
|
|
10317
10285
|
var require_api_upgrade = __commonJS({
|
|
10318
|
-
"node_modules/undici/lib/api/api-upgrade.js"(exports, module) {
|
|
10286
|
+
"packages/core/node_modules/undici/lib/api/api-upgrade.js"(exports, module) {
|
|
10319
10287
|
"use strict";
|
|
10320
10288
|
init_esbuild_shims();
|
|
10321
10289
|
var { InvalidArgumentError, SocketError } = require_errors();
|
|
@@ -10410,9 +10378,9 @@ var require_api_upgrade = __commonJS({
|
|
|
10410
10378
|
}
|
|
10411
10379
|
});
|
|
10412
10380
|
|
|
10413
|
-
// node_modules/undici/lib/api/api-connect.js
|
|
10381
|
+
// packages/core/node_modules/undici/lib/api/api-connect.js
|
|
10414
10382
|
var require_api_connect = __commonJS({
|
|
10415
|
-
"node_modules/undici/lib/api/api-connect.js"(exports, module) {
|
|
10383
|
+
"packages/core/node_modules/undici/lib/api/api-connect.js"(exports, module) {
|
|
10416
10384
|
"use strict";
|
|
10417
10385
|
init_esbuild_shims();
|
|
10418
10386
|
var assert = __require("node:assert");
|
|
@@ -10505,9 +10473,9 @@ var require_api_connect = __commonJS({
|
|
|
10505
10473
|
}
|
|
10506
10474
|
});
|
|
10507
10475
|
|
|
10508
|
-
// node_modules/undici/lib/api/index.js
|
|
10476
|
+
// packages/core/node_modules/undici/lib/api/index.js
|
|
10509
10477
|
var require_api = __commonJS({
|
|
10510
|
-
"node_modules/undici/lib/api/index.js"(exports, module) {
|
|
10478
|
+
"packages/core/node_modules/undici/lib/api/index.js"(exports, module) {
|
|
10511
10479
|
"use strict";
|
|
10512
10480
|
init_esbuild_shims();
|
|
10513
10481
|
module.exports.request = require_api_request();
|
|
@@ -10518,9 +10486,9 @@ var require_api = __commonJS({
|
|
|
10518
10486
|
}
|
|
10519
10487
|
});
|
|
10520
10488
|
|
|
10521
|
-
// node_modules/undici/lib/mock/mock-errors.js
|
|
10489
|
+
// packages/core/node_modules/undici/lib/mock/mock-errors.js
|
|
10522
10490
|
var require_mock_errors = __commonJS({
|
|
10523
|
-
"node_modules/undici/lib/mock/mock-errors.js"(exports, module) {
|
|
10491
|
+
"packages/core/node_modules/undici/lib/mock/mock-errors.js"(exports, module) {
|
|
10524
10492
|
"use strict";
|
|
10525
10493
|
init_esbuild_shims();
|
|
10526
10494
|
var { UndiciError } = require_errors();
|
|
@@ -10547,9 +10515,9 @@ var require_mock_errors = __commonJS({
|
|
|
10547
10515
|
}
|
|
10548
10516
|
});
|
|
10549
10517
|
|
|
10550
|
-
// node_modules/undici/lib/mock/mock-symbols.js
|
|
10518
|
+
// packages/core/node_modules/undici/lib/mock/mock-symbols.js
|
|
10551
10519
|
var require_mock_symbols = __commonJS({
|
|
10552
|
-
"node_modules/undici/lib/mock/mock-symbols.js"(exports, module) {
|
|
10520
|
+
"packages/core/node_modules/undici/lib/mock/mock-symbols.js"(exports, module) {
|
|
10553
10521
|
"use strict";
|
|
10554
10522
|
init_esbuild_shims();
|
|
10555
10523
|
module.exports = {
|
|
@@ -10576,9 +10544,9 @@ var require_mock_symbols = __commonJS({
|
|
|
10576
10544
|
}
|
|
10577
10545
|
});
|
|
10578
10546
|
|
|
10579
|
-
// node_modules/undici/lib/mock/mock-utils.js
|
|
10547
|
+
// packages/core/node_modules/undici/lib/mock/mock-utils.js
|
|
10580
10548
|
var require_mock_utils = __commonJS({
|
|
10581
|
-
"node_modules/undici/lib/mock/mock-utils.js"(exports, module) {
|
|
10549
|
+
"packages/core/node_modules/undici/lib/mock/mock-utils.js"(exports, module) {
|
|
10582
10550
|
"use strict";
|
|
10583
10551
|
init_esbuild_shims();
|
|
10584
10552
|
var { MockNotMatchedError } = require_mock_errors();
|
|
@@ -10894,9 +10862,9 @@ var require_mock_utils = __commonJS({
|
|
|
10894
10862
|
}
|
|
10895
10863
|
});
|
|
10896
10864
|
|
|
10897
|
-
// node_modules/undici/lib/mock/mock-interceptor.js
|
|
10865
|
+
// packages/core/node_modules/undici/lib/mock/mock-interceptor.js
|
|
10898
10866
|
var require_mock_interceptor = __commonJS({
|
|
10899
|
-
"node_modules/undici/lib/mock/mock-interceptor.js"(exports, module) {
|
|
10867
|
+
"packages/core/node_modules/undici/lib/mock/mock-interceptor.js"(exports, module) {
|
|
10900
10868
|
"use strict";
|
|
10901
10869
|
init_esbuild_shims();
|
|
10902
10870
|
var { getResponseData, buildKey, addMockDispatch } = require_mock_utils();
|
|
@@ -11063,9 +11031,9 @@ var require_mock_interceptor = __commonJS({
|
|
|
11063
11031
|
}
|
|
11064
11032
|
});
|
|
11065
11033
|
|
|
11066
|
-
// node_modules/undici/lib/mock/mock-client.js
|
|
11034
|
+
// packages/core/node_modules/undici/lib/mock/mock-client.js
|
|
11067
11035
|
var require_mock_client = __commonJS({
|
|
11068
|
-
"node_modules/undici/lib/mock/mock-client.js"(exports, module) {
|
|
11036
|
+
"packages/core/node_modules/undici/lib/mock/mock-client.js"(exports, module) {
|
|
11069
11037
|
"use strict";
|
|
11070
11038
|
init_esbuild_shims();
|
|
11071
11039
|
var { promisify } = __require("node:util");
|
|
@@ -11120,9 +11088,9 @@ var require_mock_client = __commonJS({
|
|
|
11120
11088
|
}
|
|
11121
11089
|
});
|
|
11122
11090
|
|
|
11123
|
-
// node_modules/undici/lib/mock/mock-pool.js
|
|
11091
|
+
// packages/core/node_modules/undici/lib/mock/mock-pool.js
|
|
11124
11092
|
var require_mock_pool = __commonJS({
|
|
11125
|
-
"node_modules/undici/lib/mock/mock-pool.js"(exports, module) {
|
|
11093
|
+
"packages/core/node_modules/undici/lib/mock/mock-pool.js"(exports, module) {
|
|
11126
11094
|
"use strict";
|
|
11127
11095
|
init_esbuild_shims();
|
|
11128
11096
|
var { promisify } = __require("node:util");
|
|
@@ -11177,9 +11145,9 @@ var require_mock_pool = __commonJS({
|
|
|
11177
11145
|
}
|
|
11178
11146
|
});
|
|
11179
11147
|
|
|
11180
|
-
// node_modules/undici/lib/mock/pluralizer.js
|
|
11148
|
+
// packages/core/node_modules/undici/lib/mock/pluralizer.js
|
|
11181
11149
|
var require_pluralizer = __commonJS({
|
|
11182
|
-
"node_modules/undici/lib/mock/pluralizer.js"(exports, module) {
|
|
11150
|
+
"packages/core/node_modules/undici/lib/mock/pluralizer.js"(exports, module) {
|
|
11183
11151
|
"use strict";
|
|
11184
11152
|
init_esbuild_shims();
|
|
11185
11153
|
var singulars = {
|
|
@@ -11212,9 +11180,9 @@ var require_pluralizer = __commonJS({
|
|
|
11212
11180
|
}
|
|
11213
11181
|
});
|
|
11214
11182
|
|
|
11215
|
-
// node_modules/undici/lib/mock/pending-interceptors-formatter.js
|
|
11183
|
+
// packages/core/node_modules/undici/lib/mock/pending-interceptors-formatter.js
|
|
11216
11184
|
var require_pending_interceptors_formatter = __commonJS({
|
|
11217
|
-
"node_modules/undici/lib/mock/pending-interceptors-formatter.js"(exports, module) {
|
|
11185
|
+
"packages/core/node_modules/undici/lib/mock/pending-interceptors-formatter.js"(exports, module) {
|
|
11218
11186
|
"use strict";
|
|
11219
11187
|
init_esbuild_shims();
|
|
11220
11188
|
var { Transform } = __require("node:stream");
|
|
@@ -11257,13 +11225,13 @@ var require_pending_interceptors_formatter = __commonJS({
|
|
|
11257
11225
|
}
|
|
11258
11226
|
});
|
|
11259
11227
|
|
|
11260
|
-
// node_modules/undici/lib/mock/mock-agent.js
|
|
11228
|
+
// packages/core/node_modules/undici/lib/mock/mock-agent.js
|
|
11261
11229
|
var require_mock_agent = __commonJS({
|
|
11262
|
-
"node_modules/undici/lib/mock/mock-agent.js"(exports, module) {
|
|
11230
|
+
"packages/core/node_modules/undici/lib/mock/mock-agent.js"(exports, module) {
|
|
11263
11231
|
"use strict";
|
|
11264
11232
|
init_esbuild_shims();
|
|
11265
11233
|
var { kClients } = require_symbols();
|
|
11266
|
-
var
|
|
11234
|
+
var Agent2 = require_agent();
|
|
11267
11235
|
var {
|
|
11268
11236
|
kAgent,
|
|
11269
11237
|
kMockAgentSet,
|
|
@@ -11293,7 +11261,7 @@ var require_mock_agent = __commonJS({
|
|
|
11293
11261
|
if (opts?.agent && typeof opts.agent.dispatch !== "function") {
|
|
11294
11262
|
throw new InvalidArgumentError("Argument opts.agent must implement Agent");
|
|
11295
11263
|
}
|
|
11296
|
-
const agent = opts?.agent ? opts.agent : new
|
|
11264
|
+
const agent = opts?.agent ? opts.agent : new Agent2(opts);
|
|
11297
11265
|
this[kAgent] = agent;
|
|
11298
11266
|
this[kClients] = agent[kClients];
|
|
11299
11267
|
this[kOptions] = buildMockOptions(opts);
|
|
@@ -11391,16 +11359,16 @@ ${pendingInterceptorsFormatter.format(pending)}
|
|
|
11391
11359
|
}
|
|
11392
11360
|
});
|
|
11393
11361
|
|
|
11394
|
-
// node_modules/undici/lib/global.js
|
|
11362
|
+
// packages/core/node_modules/undici/lib/global.js
|
|
11395
11363
|
var require_global2 = __commonJS({
|
|
11396
|
-
"node_modules/undici/lib/global.js"(exports, module) {
|
|
11364
|
+
"packages/core/node_modules/undici/lib/global.js"(exports, module) {
|
|
11397
11365
|
"use strict";
|
|
11398
11366
|
init_esbuild_shims();
|
|
11399
11367
|
var globalDispatcher = Symbol.for("undici.globalDispatcher.1");
|
|
11400
11368
|
var { InvalidArgumentError } = require_errors();
|
|
11401
|
-
var
|
|
11369
|
+
var Agent2 = require_agent();
|
|
11402
11370
|
if (getGlobalDispatcher() === void 0) {
|
|
11403
|
-
setGlobalDispatcher(new
|
|
11371
|
+
setGlobalDispatcher(new Agent2());
|
|
11404
11372
|
}
|
|
11405
11373
|
function setGlobalDispatcher(agent) {
|
|
11406
11374
|
if (!agent || typeof agent.dispatch !== "function") {
|
|
@@ -11425,9 +11393,9 @@ var require_global2 = __commonJS({
|
|
|
11425
11393
|
}
|
|
11426
11394
|
});
|
|
11427
11395
|
|
|
11428
|
-
// node_modules/undici/lib/handler/decorator-handler.js
|
|
11396
|
+
// packages/core/node_modules/undici/lib/handler/decorator-handler.js
|
|
11429
11397
|
var require_decorator_handler = __commonJS({
|
|
11430
|
-
"node_modules/undici/lib/handler/decorator-handler.js"(exports, module) {
|
|
11398
|
+
"packages/core/node_modules/undici/lib/handler/decorator-handler.js"(exports, module) {
|
|
11431
11399
|
"use strict";
|
|
11432
11400
|
init_esbuild_shims();
|
|
11433
11401
|
module.exports = class DecoratorHandler {
|
|
@@ -11469,9 +11437,9 @@ var require_decorator_handler = __commonJS({
|
|
|
11469
11437
|
}
|
|
11470
11438
|
});
|
|
11471
11439
|
|
|
11472
|
-
// node_modules/undici/lib/interceptor/redirect.js
|
|
11440
|
+
// packages/core/node_modules/undici/lib/interceptor/redirect.js
|
|
11473
11441
|
var require_redirect = __commonJS({
|
|
11474
|
-
"node_modules/undici/lib/interceptor/redirect.js"(exports, module) {
|
|
11442
|
+
"packages/core/node_modules/undici/lib/interceptor/redirect.js"(exports, module) {
|
|
11475
11443
|
"use strict";
|
|
11476
11444
|
init_esbuild_shims();
|
|
11477
11445
|
var RedirectHandler = require_redirect_handler();
|
|
@@ -11496,9 +11464,9 @@ var require_redirect = __commonJS({
|
|
|
11496
11464
|
}
|
|
11497
11465
|
});
|
|
11498
11466
|
|
|
11499
|
-
// node_modules/undici/lib/interceptor/retry.js
|
|
11467
|
+
// packages/core/node_modules/undici/lib/interceptor/retry.js
|
|
11500
11468
|
var require_retry = __commonJS({
|
|
11501
|
-
"node_modules/undici/lib/interceptor/retry.js"(exports, module) {
|
|
11469
|
+
"packages/core/node_modules/undici/lib/interceptor/retry.js"(exports, module) {
|
|
11502
11470
|
"use strict";
|
|
11503
11471
|
init_esbuild_shims();
|
|
11504
11472
|
var RetryHandler = require_retry_handler();
|
|
@@ -11521,9 +11489,9 @@ var require_retry = __commonJS({
|
|
|
11521
11489
|
}
|
|
11522
11490
|
});
|
|
11523
11491
|
|
|
11524
|
-
// node_modules/undici/lib/interceptor/dump.js
|
|
11492
|
+
// packages/core/node_modules/undici/lib/interceptor/dump.js
|
|
11525
11493
|
var require_dump = __commonJS({
|
|
11526
|
-
"node_modules/undici/lib/interceptor/dump.js"(exports, module) {
|
|
11494
|
+
"packages/core/node_modules/undici/lib/interceptor/dump.js"(exports, module) {
|
|
11527
11495
|
"use strict";
|
|
11528
11496
|
init_esbuild_shims();
|
|
11529
11497
|
var util = require_util();
|
|
@@ -11624,9 +11592,9 @@ var require_dump = __commonJS({
|
|
|
11624
11592
|
}
|
|
11625
11593
|
});
|
|
11626
11594
|
|
|
11627
|
-
// node_modules/undici/lib/interceptor/dns.js
|
|
11595
|
+
// packages/core/node_modules/undici/lib/interceptor/dns.js
|
|
11628
11596
|
var require_dns = __commonJS({
|
|
11629
|
-
"node_modules/undici/lib/interceptor/dns.js"(exports, module) {
|
|
11597
|
+
"packages/core/node_modules/undici/lib/interceptor/dns.js"(exports, module) {
|
|
11630
11598
|
"use strict";
|
|
11631
11599
|
init_esbuild_shims();
|
|
11632
11600
|
var { isIP } = __require("node:net");
|
|
@@ -11920,9 +11888,9 @@ var require_dns = __commonJS({
|
|
|
11920
11888
|
}
|
|
11921
11889
|
});
|
|
11922
11890
|
|
|
11923
|
-
// node_modules/undici/lib/web/fetch/headers.js
|
|
11891
|
+
// packages/core/node_modules/undici/lib/web/fetch/headers.js
|
|
11924
11892
|
var require_headers = __commonJS({
|
|
11925
|
-
"node_modules/undici/lib/web/fetch/headers.js"(exports, module) {
|
|
11893
|
+
"packages/core/node_modules/undici/lib/web/fetch/headers.js"(exports, module) {
|
|
11926
11894
|
"use strict";
|
|
11927
11895
|
init_esbuild_shims();
|
|
11928
11896
|
var { kConstruct } = require_symbols();
|
|
@@ -12376,9 +12344,9 @@ var require_headers = __commonJS({
|
|
|
12376
12344
|
}
|
|
12377
12345
|
});
|
|
12378
12346
|
|
|
12379
|
-
// node_modules/undici/lib/web/fetch/response.js
|
|
12347
|
+
// packages/core/node_modules/undici/lib/web/fetch/response.js
|
|
12380
12348
|
var require_response = __commonJS({
|
|
12381
|
-
"node_modules/undici/lib/web/fetch/response.js"(exports, module) {
|
|
12349
|
+
"packages/core/node_modules/undici/lib/web/fetch/response.js"(exports, module) {
|
|
12382
12350
|
"use strict";
|
|
12383
12351
|
init_esbuild_shims();
|
|
12384
12352
|
var { Headers, HeadersList, fill, getHeadersGuard, setHeadersGuard, setHeadersList } = require_headers();
|
|
@@ -12788,9 +12756,9 @@ var require_response = __commonJS({
|
|
|
12788
12756
|
}
|
|
12789
12757
|
});
|
|
12790
12758
|
|
|
12791
|
-
// node_modules/undici/lib/web/fetch/dispatcher-weakref.js
|
|
12759
|
+
// packages/core/node_modules/undici/lib/web/fetch/dispatcher-weakref.js
|
|
12792
12760
|
var require_dispatcher_weakref = __commonJS({
|
|
12793
|
-
"node_modules/undici/lib/web/fetch/dispatcher-weakref.js"(exports, module) {
|
|
12761
|
+
"packages/core/node_modules/undici/lib/web/fetch/dispatcher-weakref.js"(exports, module) {
|
|
12794
12762
|
"use strict";
|
|
12795
12763
|
init_esbuild_shims();
|
|
12796
12764
|
var { kConnected, kSize } = require_symbols();
|
|
@@ -12837,9 +12805,9 @@ var require_dispatcher_weakref = __commonJS({
|
|
|
12837
12805
|
}
|
|
12838
12806
|
});
|
|
12839
12807
|
|
|
12840
|
-
// node_modules/undici/lib/web/fetch/request.js
|
|
12808
|
+
// packages/core/node_modules/undici/lib/web/fetch/request.js
|
|
12841
12809
|
var require_request2 = __commonJS({
|
|
12842
|
-
"node_modules/undici/lib/web/fetch/request.js"(exports, module) {
|
|
12810
|
+
"packages/core/node_modules/undici/lib/web/fetch/request.js"(exports, module) {
|
|
12843
12811
|
"use strict";
|
|
12844
12812
|
init_esbuild_shims();
|
|
12845
12813
|
var { extractBody, mixinBody, cloneBody, bodyUnusable } = require_body();
|
|
@@ -13541,9 +13509,9 @@ var require_request2 = __commonJS({
|
|
|
13541
13509
|
}
|
|
13542
13510
|
});
|
|
13543
13511
|
|
|
13544
|
-
// node_modules/undici/lib/web/fetch/index.js
|
|
13512
|
+
// packages/core/node_modules/undici/lib/web/fetch/index.js
|
|
13545
13513
|
var require_fetch = __commonJS({
|
|
13546
|
-
"node_modules/undici/lib/web/fetch/index.js"(exports, module) {
|
|
13514
|
+
"packages/core/node_modules/undici/lib/web/fetch/index.js"(exports, module) {
|
|
13547
13515
|
"use strict";
|
|
13548
13516
|
init_esbuild_shims();
|
|
13549
13517
|
var {
|
|
@@ -13648,7 +13616,7 @@ var require_fetch = __commonJS({
|
|
|
13648
13616
|
finalizeAndReportTiming(response, "fetch");
|
|
13649
13617
|
}
|
|
13650
13618
|
__name(handleFetchDone, "handleFetchDone");
|
|
13651
|
-
function
|
|
13619
|
+
function fetch2(input, init = void 0) {
|
|
13652
13620
|
webidl.argumentLengthCheck(arguments, 1, "globalThis.fetch");
|
|
13653
13621
|
let p = createDeferredPromise();
|
|
13654
13622
|
let requestObject;
|
|
@@ -13705,7 +13673,7 @@ var require_fetch = __commonJS({
|
|
|
13705
13673
|
});
|
|
13706
13674
|
return p.promise;
|
|
13707
13675
|
}
|
|
13708
|
-
__name(
|
|
13676
|
+
__name(fetch2, "fetch");
|
|
13709
13677
|
function finalizeAndReportTiming(response, initiatorType = "other") {
|
|
13710
13678
|
if (response.type === "error" && response.aborted) {
|
|
13711
13679
|
return;
|
|
@@ -14513,25 +14481,23 @@ var require_fetch = __commonJS({
|
|
|
14513
14481
|
if (status < 200) {
|
|
14514
14482
|
return;
|
|
14515
14483
|
}
|
|
14484
|
+
let codings = [];
|
|
14516
14485
|
let location = "";
|
|
14517
14486
|
const headersList = new HeadersList();
|
|
14518
14487
|
for (let i = 0; i < rawHeaders.length; i += 2) {
|
|
14519
14488
|
headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i]), rawHeaders[i + 1].toString("latin1"), true);
|
|
14520
14489
|
}
|
|
14490
|
+
const contentEncoding = headersList.get("content-encoding", true);
|
|
14491
|
+
if (contentEncoding) {
|
|
14492
|
+
codings = contentEncoding.toLowerCase().split(",").map((x) => x.trim());
|
|
14493
|
+
}
|
|
14521
14494
|
location = headersList.get("location", true);
|
|
14522
14495
|
this.body = new Readable({ read: resume });
|
|
14523
14496
|
const decoders = [];
|
|
14524
14497
|
const willFollow = location && request.redirect === "follow" && redirectStatusSet.has(status);
|
|
14525
|
-
if (request.method !== "HEAD" && request.method !== "CONNECT" && !nullBodyStatus.includes(status) && !willFollow) {
|
|
14526
|
-
const contentEncoding = headersList.get("content-encoding", true);
|
|
14527
|
-
const codings = contentEncoding ? contentEncoding.toLowerCase().split(",") : [];
|
|
14528
|
-
const maxContentEncodings = 5;
|
|
14529
|
-
if (codings.length > maxContentEncodings) {
|
|
14530
|
-
reject(new Error(`too many content-encodings in response: ${codings.length}, maximum allowed is ${maxContentEncodings}`));
|
|
14531
|
-
return true;
|
|
14532
|
-
}
|
|
14498
|
+
if (codings.length !== 0 && request.method !== "HEAD" && request.method !== "CONNECT" && !nullBodyStatus.includes(status) && !willFollow) {
|
|
14533
14499
|
for (let i = codings.length - 1; i >= 0; --i) {
|
|
14534
|
-
const coding = codings[i]
|
|
14500
|
+
const coding = codings[i];
|
|
14535
14501
|
if (coding === "x-gzip" || coding === "gzip") {
|
|
14536
14502
|
decoders.push(zlib.createGunzip({
|
|
14537
14503
|
// Be less strict when decoding compressed responses, since sometimes
|
|
@@ -14619,7 +14585,7 @@ var require_fetch = __commonJS({
|
|
|
14619
14585
|
}
|
|
14620
14586
|
__name(httpNetworkFetch, "httpNetworkFetch");
|
|
14621
14587
|
module.exports = {
|
|
14622
|
-
fetch,
|
|
14588
|
+
fetch: fetch2,
|
|
14623
14589
|
Fetch,
|
|
14624
14590
|
fetching,
|
|
14625
14591
|
finalizeAndReportTiming
|
|
@@ -14627,9 +14593,9 @@ var require_fetch = __commonJS({
|
|
|
14627
14593
|
}
|
|
14628
14594
|
});
|
|
14629
14595
|
|
|
14630
|
-
// node_modules/undici/lib/web/fileapi/symbols.js
|
|
14596
|
+
// packages/core/node_modules/undici/lib/web/fileapi/symbols.js
|
|
14631
14597
|
var require_symbols3 = __commonJS({
|
|
14632
|
-
"node_modules/undici/lib/web/fileapi/symbols.js"(exports, module) {
|
|
14598
|
+
"packages/core/node_modules/undici/lib/web/fileapi/symbols.js"(exports, module) {
|
|
14633
14599
|
"use strict";
|
|
14634
14600
|
init_esbuild_shims();
|
|
14635
14601
|
module.exports = {
|
|
@@ -14643,9 +14609,9 @@ var require_symbols3 = __commonJS({
|
|
|
14643
14609
|
}
|
|
14644
14610
|
});
|
|
14645
14611
|
|
|
14646
|
-
// node_modules/undici/lib/web/fileapi/progressevent.js
|
|
14612
|
+
// packages/core/node_modules/undici/lib/web/fileapi/progressevent.js
|
|
14647
14613
|
var require_progressevent = __commonJS({
|
|
14648
|
-
"node_modules/undici/lib/web/fileapi/progressevent.js"(exports, module) {
|
|
14614
|
+
"packages/core/node_modules/undici/lib/web/fileapi/progressevent.js"(exports, module) {
|
|
14649
14615
|
"use strict";
|
|
14650
14616
|
init_esbuild_shims();
|
|
14651
14617
|
var { webidl } = require_webidl();
|
|
@@ -14715,9 +14681,9 @@ var require_progressevent = __commonJS({
|
|
|
14715
14681
|
}
|
|
14716
14682
|
});
|
|
14717
14683
|
|
|
14718
|
-
// node_modules/undici/lib/web/fileapi/encoding.js
|
|
14684
|
+
// packages/core/node_modules/undici/lib/web/fileapi/encoding.js
|
|
14719
14685
|
var require_encoding = __commonJS({
|
|
14720
|
-
"node_modules/undici/lib/web/fileapi/encoding.js"(exports, module) {
|
|
14686
|
+
"packages/core/node_modules/undici/lib/web/fileapi/encoding.js"(exports, module) {
|
|
14721
14687
|
"use strict";
|
|
14722
14688
|
init_esbuild_shims();
|
|
14723
14689
|
function getEncoding(label) {
|
|
@@ -15003,9 +14969,9 @@ var require_encoding = __commonJS({
|
|
|
15003
14969
|
}
|
|
15004
14970
|
});
|
|
15005
14971
|
|
|
15006
|
-
// node_modules/undici/lib/web/fileapi/util.js
|
|
14972
|
+
// packages/core/node_modules/undici/lib/web/fileapi/util.js
|
|
15007
14973
|
var require_util4 = __commonJS({
|
|
15008
|
-
"node_modules/undici/lib/web/fileapi/util.js"(exports, module) {
|
|
14974
|
+
"packages/core/node_modules/undici/lib/web/fileapi/util.js"(exports, module) {
|
|
15009
14975
|
"use strict";
|
|
15010
14976
|
init_esbuild_shims();
|
|
15011
14977
|
var {
|
|
@@ -15195,9 +15161,9 @@ var require_util4 = __commonJS({
|
|
|
15195
15161
|
}
|
|
15196
15162
|
});
|
|
15197
15163
|
|
|
15198
|
-
// node_modules/undici/lib/web/fileapi/filereader.js
|
|
15164
|
+
// packages/core/node_modules/undici/lib/web/fileapi/filereader.js
|
|
15199
15165
|
var require_filereader = __commonJS({
|
|
15200
|
-
"node_modules/undici/lib/web/fileapi/filereader.js"(exports, module) {
|
|
15166
|
+
"packages/core/node_modules/undici/lib/web/fileapi/filereader.js"(exports, module) {
|
|
15201
15167
|
"use strict";
|
|
15202
15168
|
init_esbuild_shims();
|
|
15203
15169
|
var {
|
|
@@ -15458,9 +15424,9 @@ var require_filereader = __commonJS({
|
|
|
15458
15424
|
}
|
|
15459
15425
|
});
|
|
15460
15426
|
|
|
15461
|
-
// node_modules/undici/lib/web/cache/symbols.js
|
|
15427
|
+
// packages/core/node_modules/undici/lib/web/cache/symbols.js
|
|
15462
15428
|
var require_symbols4 = __commonJS({
|
|
15463
|
-
"node_modules/undici/lib/web/cache/symbols.js"(exports, module) {
|
|
15429
|
+
"packages/core/node_modules/undici/lib/web/cache/symbols.js"(exports, module) {
|
|
15464
15430
|
"use strict";
|
|
15465
15431
|
init_esbuild_shims();
|
|
15466
15432
|
module.exports = {
|
|
@@ -15469,9 +15435,9 @@ var require_symbols4 = __commonJS({
|
|
|
15469
15435
|
}
|
|
15470
15436
|
});
|
|
15471
15437
|
|
|
15472
|
-
// node_modules/undici/lib/web/cache/util.js
|
|
15438
|
+
// packages/core/node_modules/undici/lib/web/cache/util.js
|
|
15473
15439
|
var require_util5 = __commonJS({
|
|
15474
|
-
"node_modules/undici/lib/web/cache/util.js"(exports, module) {
|
|
15440
|
+
"packages/core/node_modules/undici/lib/web/cache/util.js"(exports, module) {
|
|
15475
15441
|
"use strict";
|
|
15476
15442
|
init_esbuild_shims();
|
|
15477
15443
|
var assert = __require("node:assert");
|
|
@@ -15502,9 +15468,9 @@ var require_util5 = __commonJS({
|
|
|
15502
15468
|
}
|
|
15503
15469
|
});
|
|
15504
15470
|
|
|
15505
|
-
// node_modules/undici/lib/web/cache/cache.js
|
|
15471
|
+
// packages/core/node_modules/undici/lib/web/cache/cache.js
|
|
15506
15472
|
var require_cache = __commonJS({
|
|
15507
|
-
"node_modules/undici/lib/web/cache/cache.js"(exports, module) {
|
|
15473
|
+
"packages/core/node_modules/undici/lib/web/cache/cache.js"(exports, module) {
|
|
15508
15474
|
"use strict";
|
|
15509
15475
|
init_esbuild_shims();
|
|
15510
15476
|
var { kConstruct } = require_symbols4();
|
|
@@ -16051,9 +16017,9 @@ var require_cache = __commonJS({
|
|
|
16051
16017
|
}
|
|
16052
16018
|
});
|
|
16053
16019
|
|
|
16054
|
-
// node_modules/undici/lib/web/cache/cachestorage.js
|
|
16020
|
+
// packages/core/node_modules/undici/lib/web/cache/cachestorage.js
|
|
16055
16021
|
var require_cachestorage = __commonJS({
|
|
16056
|
-
"node_modules/undici/lib/web/cache/cachestorage.js"(exports, module) {
|
|
16022
|
+
"packages/core/node_modules/undici/lib/web/cache/cachestorage.js"(exports, module) {
|
|
16057
16023
|
"use strict";
|
|
16058
16024
|
init_esbuild_shims();
|
|
16059
16025
|
var { kConstruct } = require_symbols4();
|
|
@@ -16165,9 +16131,9 @@ var require_cachestorage = __commonJS({
|
|
|
16165
16131
|
}
|
|
16166
16132
|
});
|
|
16167
16133
|
|
|
16168
|
-
// node_modules/undici/lib/web/cookies/constants.js
|
|
16134
|
+
// packages/core/node_modules/undici/lib/web/cookies/constants.js
|
|
16169
16135
|
var require_constants4 = __commonJS({
|
|
16170
|
-
"node_modules/undici/lib/web/cookies/constants.js"(exports, module) {
|
|
16136
|
+
"packages/core/node_modules/undici/lib/web/cookies/constants.js"(exports, module) {
|
|
16171
16137
|
"use strict";
|
|
16172
16138
|
init_esbuild_shims();
|
|
16173
16139
|
var maxAttributeValueSize = 1024;
|
|
@@ -16179,9 +16145,9 @@ var require_constants4 = __commonJS({
|
|
|
16179
16145
|
}
|
|
16180
16146
|
});
|
|
16181
16147
|
|
|
16182
|
-
// node_modules/undici/lib/web/cookies/util.js
|
|
16148
|
+
// packages/core/node_modules/undici/lib/web/cookies/util.js
|
|
16183
16149
|
var require_util6 = __commonJS({
|
|
16184
|
-
"node_modules/undici/lib/web/cookies/util.js"(exports, module) {
|
|
16150
|
+
"packages/core/node_modules/undici/lib/web/cookies/util.js"(exports, module) {
|
|
16185
16151
|
"use strict";
|
|
16186
16152
|
init_esbuild_shims();
|
|
16187
16153
|
function isCTLExcludingHtab(value) {
|
|
@@ -16358,9 +16324,9 @@ var require_util6 = __commonJS({
|
|
|
16358
16324
|
}
|
|
16359
16325
|
});
|
|
16360
16326
|
|
|
16361
|
-
// node_modules/undici/lib/web/cookies/parse.js
|
|
16327
|
+
// packages/core/node_modules/undici/lib/web/cookies/parse.js
|
|
16362
16328
|
var require_parse = __commonJS({
|
|
16363
|
-
"node_modules/undici/lib/web/cookies/parse.js"(exports, module) {
|
|
16329
|
+
"packages/core/node_modules/undici/lib/web/cookies/parse.js"(exports, module) {
|
|
16364
16330
|
"use strict";
|
|
16365
16331
|
init_esbuild_shims();
|
|
16366
16332
|
var { maxNameValuePairSize, maxAttributeValueSize } = require_constants4();
|
|
@@ -16501,9 +16467,9 @@ var require_parse = __commonJS({
|
|
|
16501
16467
|
}
|
|
16502
16468
|
});
|
|
16503
16469
|
|
|
16504
|
-
// node_modules/undici/lib/web/cookies/index.js
|
|
16470
|
+
// packages/core/node_modules/undici/lib/web/cookies/index.js
|
|
16505
16471
|
var require_cookies = __commonJS({
|
|
16506
|
-
"node_modules/undici/lib/web/cookies/index.js"(exports, module) {
|
|
16472
|
+
"packages/core/node_modules/undici/lib/web/cookies/index.js"(exports, module) {
|
|
16507
16473
|
"use strict";
|
|
16508
16474
|
init_esbuild_shims();
|
|
16509
16475
|
var { parseSetCookie } = require_parse();
|
|
@@ -16635,9 +16601,9 @@ var require_cookies = __commonJS({
|
|
|
16635
16601
|
}
|
|
16636
16602
|
});
|
|
16637
16603
|
|
|
16638
|
-
// node_modules/undici/lib/web/websocket/events.js
|
|
16604
|
+
// packages/core/node_modules/undici/lib/web/websocket/events.js
|
|
16639
16605
|
var require_events = __commonJS({
|
|
16640
|
-
"node_modules/undici/lib/web/websocket/events.js"(exports, module) {
|
|
16606
|
+
"packages/core/node_modules/undici/lib/web/websocket/events.js"(exports, module) {
|
|
16641
16607
|
"use strict";
|
|
16642
16608
|
init_esbuild_shims();
|
|
16643
16609
|
var { webidl } = require_webidl();
|
|
@@ -16911,9 +16877,9 @@ var require_events = __commonJS({
|
|
|
16911
16877
|
}
|
|
16912
16878
|
});
|
|
16913
16879
|
|
|
16914
|
-
// node_modules/undici/lib/web/websocket/constants.js
|
|
16880
|
+
// packages/core/node_modules/undici/lib/web/websocket/constants.js
|
|
16915
16881
|
var require_constants5 = __commonJS({
|
|
16916
|
-
"node_modules/undici/lib/web/websocket/constants.js"(exports, module) {
|
|
16882
|
+
"packages/core/node_modules/undici/lib/web/websocket/constants.js"(exports, module) {
|
|
16917
16883
|
"use strict";
|
|
16918
16884
|
init_esbuild_shims();
|
|
16919
16885
|
var uid = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11";
|
|
@@ -16969,9 +16935,9 @@ var require_constants5 = __commonJS({
|
|
|
16969
16935
|
}
|
|
16970
16936
|
});
|
|
16971
16937
|
|
|
16972
|
-
// node_modules/undici/lib/web/websocket/symbols.js
|
|
16938
|
+
// packages/core/node_modules/undici/lib/web/websocket/symbols.js
|
|
16973
16939
|
var require_symbols5 = __commonJS({
|
|
16974
|
-
"node_modules/undici/lib/web/websocket/symbols.js"(exports, module) {
|
|
16940
|
+
"packages/core/node_modules/undici/lib/web/websocket/symbols.js"(exports, module) {
|
|
16975
16941
|
"use strict";
|
|
16976
16942
|
init_esbuild_shims();
|
|
16977
16943
|
module.exports = {
|
|
@@ -16987,9 +16953,9 @@ var require_symbols5 = __commonJS({
|
|
|
16987
16953
|
}
|
|
16988
16954
|
});
|
|
16989
16955
|
|
|
16990
|
-
// node_modules/undici/lib/web/websocket/util.js
|
|
16956
|
+
// packages/core/node_modules/undici/lib/web/websocket/util.js
|
|
16991
16957
|
var require_util7 = __commonJS({
|
|
16992
|
-
"node_modules/undici/lib/web/websocket/util.js"(exports, module) {
|
|
16958
|
+
"packages/core/node_modules/undici/lib/web/websocket/util.js"(exports, module) {
|
|
16993
16959
|
"use strict";
|
|
16994
16960
|
init_esbuild_shims();
|
|
16995
16961
|
var { kReadyState, kController, kResponse, kBinaryType, kWebSocketURL } = require_symbols5();
|
|
@@ -17135,17 +17101,13 @@ var require_util7 = __commonJS({
|
|
|
17135
17101
|
}
|
|
17136
17102
|
__name(parseExtensions, "parseExtensions");
|
|
17137
17103
|
function isValidClientWindowBits(value) {
|
|
17138
|
-
if (value.length === 0) {
|
|
17139
|
-
return false;
|
|
17140
|
-
}
|
|
17141
17104
|
for (let i = 0; i < value.length; i++) {
|
|
17142
17105
|
const byte = value.charCodeAt(i);
|
|
17143
17106
|
if (byte < 48 || byte > 57) {
|
|
17144
17107
|
return false;
|
|
17145
17108
|
}
|
|
17146
17109
|
}
|
|
17147
|
-
|
|
17148
|
-
return num >= 8 && num <= 15;
|
|
17110
|
+
return true;
|
|
17149
17111
|
}
|
|
17150
17112
|
__name(isValidClientWindowBits, "isValidClientWindowBits");
|
|
17151
17113
|
var hasIntl = typeof process.versions.icu === "string";
|
|
@@ -17177,9 +17139,9 @@ var require_util7 = __commonJS({
|
|
|
17177
17139
|
}
|
|
17178
17140
|
});
|
|
17179
17141
|
|
|
17180
|
-
// node_modules/undici/lib/web/websocket/frame.js
|
|
17142
|
+
// packages/core/node_modules/undici/lib/web/websocket/frame.js
|
|
17181
17143
|
var require_frame = __commonJS({
|
|
17182
|
-
"node_modules/undici/lib/web/websocket/frame.js"(exports, module) {
|
|
17144
|
+
"packages/core/node_modules/undici/lib/web/websocket/frame.js"(exports, module) {
|
|
17183
17145
|
"use strict";
|
|
17184
17146
|
init_esbuild_shims();
|
|
17185
17147
|
var { maxUnsigned16Bit } = require_constants5();
|
|
@@ -17259,9 +17221,9 @@ var require_frame = __commonJS({
|
|
|
17259
17221
|
}
|
|
17260
17222
|
});
|
|
17261
17223
|
|
|
17262
|
-
// node_modules/undici/lib/web/websocket/connection.js
|
|
17224
|
+
// packages/core/node_modules/undici/lib/web/websocket/connection.js
|
|
17263
17225
|
var require_connection = __commonJS({
|
|
17264
|
-
"node_modules/undici/lib/web/websocket/connection.js"(exports, module) {
|
|
17226
|
+
"packages/core/node_modules/undici/lib/web/websocket/connection.js"(exports, module) {
|
|
17265
17227
|
"use strict";
|
|
17266
17228
|
init_esbuild_shims();
|
|
17267
17229
|
var { uid, states, sentCloseFrameState, emptyBuffer, opcodes } = require_constants5();
|
|
@@ -17450,14 +17412,13 @@ var require_connection = __commonJS({
|
|
|
17450
17412
|
}
|
|
17451
17413
|
});
|
|
17452
17414
|
|
|
17453
|
-
// node_modules/undici/lib/web/websocket/permessage-deflate.js
|
|
17415
|
+
// packages/core/node_modules/undici/lib/web/websocket/permessage-deflate.js
|
|
17454
17416
|
var require_permessage_deflate = __commonJS({
|
|
17455
|
-
"node_modules/undici/lib/web/websocket/permessage-deflate.js"(exports, module) {
|
|
17417
|
+
"packages/core/node_modules/undici/lib/web/websocket/permessage-deflate.js"(exports, module) {
|
|
17456
17418
|
"use strict";
|
|
17457
17419
|
init_esbuild_shims();
|
|
17458
17420
|
var { createInflateRaw, Z_DEFAULT_WINDOWBITS } = __require("node:zlib");
|
|
17459
17421
|
var { isValidClientWindowBits } = require_util7();
|
|
17460
|
-
var { MessageSizeExceededError } = require_errors();
|
|
17461
17422
|
var tail = Buffer.from([0, 0, 255, 255]);
|
|
17462
17423
|
var kBuffer = Symbol("kBuffer");
|
|
17463
17424
|
var kLength = Symbol("kLength");
|
|
@@ -17468,21 +17429,10 @@ var require_permessage_deflate = __commonJS({
|
|
|
17468
17429
|
/** @type {import('node:zlib').InflateRaw} */
|
|
17469
17430
|
#inflate;
|
|
17470
17431
|
#options = {};
|
|
17471
|
-
|
|
17472
|
-
/**
|
|
17473
|
-
* @param {Map<string, string>} extensions
|
|
17474
|
-
*/
|
|
17475
|
-
constructor(extensions, options) {
|
|
17432
|
+
constructor(extensions) {
|
|
17476
17433
|
this.#options.serverNoContextTakeover = extensions.has("server_no_context_takeover");
|
|
17477
17434
|
this.#options.serverMaxWindowBits = extensions.get("server_max_window_bits");
|
|
17478
|
-
this.#maxPayloadSize = options.maxPayloadSize;
|
|
17479
17435
|
}
|
|
17480
|
-
/**
|
|
17481
|
-
* Decompress a compressed payload.
|
|
17482
|
-
* @param {Buffer} chunk Compressed data
|
|
17483
|
-
* @param {boolean} fin Final fragment flag
|
|
17484
|
-
* @param {Function} callback Callback function
|
|
17485
|
-
*/
|
|
17486
17436
|
decompress(chunk, fin, callback) {
|
|
17487
17437
|
if (!this.#inflate) {
|
|
17488
17438
|
let windowBits = Z_DEFAULT_WINDOWBITS;
|
|
@@ -17493,23 +17443,12 @@ var require_permessage_deflate = __commonJS({
|
|
|
17493
17443
|
}
|
|
17494
17444
|
windowBits = Number.parseInt(this.#options.serverMaxWindowBits);
|
|
17495
17445
|
}
|
|
17496
|
-
|
|
17497
|
-
this.#inflate = createInflateRaw({ windowBits });
|
|
17498
|
-
} catch (err) {
|
|
17499
|
-
callback(err);
|
|
17500
|
-
return;
|
|
17501
|
-
}
|
|
17446
|
+
this.#inflate = createInflateRaw({ windowBits });
|
|
17502
17447
|
this.#inflate[kBuffer] = [];
|
|
17503
17448
|
this.#inflate[kLength] = 0;
|
|
17504
17449
|
this.#inflate.on("data", (data) => {
|
|
17505
|
-
this.#inflate[kLength] += data.length;
|
|
17506
|
-
if (this.#maxPayloadSize > 0 && this.#inflate[kLength] > this.#maxPayloadSize) {
|
|
17507
|
-
callback(new MessageSizeExceededError());
|
|
17508
|
-
this.#inflate.removeAllListeners();
|
|
17509
|
-
this.#inflate = null;
|
|
17510
|
-
return;
|
|
17511
|
-
}
|
|
17512
17450
|
this.#inflate[kBuffer].push(data);
|
|
17451
|
+
this.#inflate[kLength] += data.length;
|
|
17513
17452
|
});
|
|
17514
17453
|
this.#inflate.on("error", (err) => {
|
|
17515
17454
|
this.#inflate = null;
|
|
@@ -17521,9 +17460,6 @@ var require_permessage_deflate = __commonJS({
|
|
|
17521
17460
|
this.#inflate.write(tail);
|
|
17522
17461
|
}
|
|
17523
17462
|
this.#inflate.flush(() => {
|
|
17524
|
-
if (!this.#inflate) {
|
|
17525
|
-
return;
|
|
17526
|
-
}
|
|
17527
17463
|
const full = Buffer.concat(this.#inflate[kBuffer], this.#inflate[kLength]);
|
|
17528
17464
|
this.#inflate[kBuffer].length = 0;
|
|
17529
17465
|
this.#inflate[kLength] = 0;
|
|
@@ -17535,9 +17471,9 @@ var require_permessage_deflate = __commonJS({
|
|
|
17535
17471
|
}
|
|
17536
17472
|
});
|
|
17537
17473
|
|
|
17538
|
-
// node_modules/undici/lib/web/websocket/receiver.js
|
|
17474
|
+
// packages/core/node_modules/undici/lib/web/websocket/receiver.js
|
|
17539
17475
|
var require_receiver = __commonJS({
|
|
17540
|
-
"node_modules/undici/lib/web/websocket/receiver.js"(exports, module) {
|
|
17476
|
+
"packages/core/node_modules/undici/lib/web/websocket/receiver.js"(exports, module) {
|
|
17541
17477
|
"use strict";
|
|
17542
17478
|
init_esbuild_shims();
|
|
17543
17479
|
var { Writable } = __require("node:stream");
|
|
@@ -17558,13 +17494,11 @@ var require_receiver = __commonJS({
|
|
|
17558
17494
|
var { WebsocketFrameSend } = require_frame();
|
|
17559
17495
|
var { closeWebSocketConnection } = require_connection();
|
|
17560
17496
|
var { PerMessageDeflate } = require_permessage_deflate();
|
|
17561
|
-
var { MessageSizeExceededError } = require_errors();
|
|
17562
17497
|
var ByteParser = class extends Writable {
|
|
17563
17498
|
static {
|
|
17564
17499
|
__name(this, "ByteParser");
|
|
17565
17500
|
}
|
|
17566
17501
|
#buffers = [];
|
|
17567
|
-
#fragmentsBytes = 0;
|
|
17568
17502
|
#byteOffset = 0;
|
|
17569
17503
|
#loop = false;
|
|
17570
17504
|
#state = parserStates.INFO;
|
|
@@ -17572,20 +17506,12 @@ var require_receiver = __commonJS({
|
|
|
17572
17506
|
#fragments = [];
|
|
17573
17507
|
/** @type {Map<string, PerMessageDeflate>} */
|
|
17574
17508
|
#extensions;
|
|
17575
|
-
|
|
17576
|
-
#maxPayloadSize;
|
|
17577
|
-
/**
|
|
17578
|
-
* @param {import('./websocket').WebSocket} ws
|
|
17579
|
-
* @param {Map<string, string>|null} extensions
|
|
17580
|
-
* @param {{ maxPayloadSize?: number }} [options]
|
|
17581
|
-
*/
|
|
17582
|
-
constructor(ws, extensions, options = {}) {
|
|
17509
|
+
constructor(ws, extensions) {
|
|
17583
17510
|
super();
|
|
17584
17511
|
this.ws = ws;
|
|
17585
17512
|
this.#extensions = extensions == null ? /* @__PURE__ */ new Map() : extensions;
|
|
17586
|
-
this.#maxPayloadSize = options.maxPayloadSize ?? 0;
|
|
17587
17513
|
if (this.#extensions.has("permessage-deflate")) {
|
|
17588
|
-
this.#extensions.set("permessage-deflate", new PerMessageDeflate(extensions
|
|
17514
|
+
this.#extensions.set("permessage-deflate", new PerMessageDeflate(extensions));
|
|
17589
17515
|
}
|
|
17590
17516
|
}
|
|
17591
17517
|
/**
|
|
@@ -17598,13 +17524,6 @@ var require_receiver = __commonJS({
|
|
|
17598
17524
|
this.#loop = true;
|
|
17599
17525
|
this.run(callback);
|
|
17600
17526
|
}
|
|
17601
|
-
#validatePayloadLength() {
|
|
17602
|
-
if (this.#maxPayloadSize > 0 && !isControlFrame(this.#info.opcode) && this.#info.payloadLength > this.#maxPayloadSize) {
|
|
17603
|
-
failWebsocketConnection(this.ws, "Payload size exceeds maximum allowed size");
|
|
17604
|
-
return false;
|
|
17605
|
-
}
|
|
17606
|
-
return true;
|
|
17607
|
-
}
|
|
17608
17527
|
/**
|
|
17609
17528
|
* Runs whenever a new chunk is received.
|
|
17610
17529
|
* Callback is called whenever there are no more chunks buffering,
|
|
@@ -17664,9 +17583,6 @@ var require_receiver = __commonJS({
|
|
|
17664
17583
|
if (payloadLength <= 125) {
|
|
17665
17584
|
this.#info.payloadLength = payloadLength;
|
|
17666
17585
|
this.#state = parserStates.READ_DATA;
|
|
17667
|
-
if (!this.#validatePayloadLength()) {
|
|
17668
|
-
return;
|
|
17669
|
-
}
|
|
17670
17586
|
} else if (payloadLength === 126) {
|
|
17671
17587
|
this.#state = parserStates.PAYLOADLENGTH_16;
|
|
17672
17588
|
} else if (payloadLength === 127) {
|
|
@@ -17687,25 +17603,19 @@ var require_receiver = __commonJS({
|
|
|
17687
17603
|
const buffer = this.consume(2);
|
|
17688
17604
|
this.#info.payloadLength = buffer.readUInt16BE(0);
|
|
17689
17605
|
this.#state = parserStates.READ_DATA;
|
|
17690
|
-
if (!this.#validatePayloadLength()) {
|
|
17691
|
-
return;
|
|
17692
|
-
}
|
|
17693
17606
|
} else if (this.#state === parserStates.PAYLOADLENGTH_64) {
|
|
17694
17607
|
if (this.#byteOffset < 8) {
|
|
17695
17608
|
return callback();
|
|
17696
17609
|
}
|
|
17697
17610
|
const buffer = this.consume(8);
|
|
17698
17611
|
const upper = buffer.readUInt32BE(0);
|
|
17699
|
-
|
|
17700
|
-
if (upper !== 0 || lower > 2 ** 31 - 1) {
|
|
17612
|
+
if (upper > 2 ** 31 - 1) {
|
|
17701
17613
|
failWebsocketConnection(this.ws, "Received payload length > 2^31 bytes.");
|
|
17702
17614
|
return;
|
|
17703
17615
|
}
|
|
17704
|
-
|
|
17616
|
+
const lower = buffer.readUInt32BE(4);
|
|
17617
|
+
this.#info.payloadLength = (upper << 8) + lower;
|
|
17705
17618
|
this.#state = parserStates.READ_DATA;
|
|
17706
|
-
if (!this.#validatePayloadLength()) {
|
|
17707
|
-
return;
|
|
17708
|
-
}
|
|
17709
17619
|
} else if (this.#state === parserStates.READ_DATA) {
|
|
17710
17620
|
if (this.#byteOffset < this.#info.payloadLength) {
|
|
17711
17621
|
return callback();
|
|
@@ -17716,41 +17626,32 @@ var require_receiver = __commonJS({
|
|
|
17716
17626
|
this.#state = parserStates.INFO;
|
|
17717
17627
|
} else {
|
|
17718
17628
|
if (!this.#info.compressed) {
|
|
17719
|
-
this.
|
|
17720
|
-
if (this.#maxPayloadSize > 0 && this.#fragmentsBytes > this.#maxPayloadSize) {
|
|
17721
|
-
failWebsocketConnection(this.ws, new MessageSizeExceededError().message);
|
|
17722
|
-
return;
|
|
17723
|
-
}
|
|
17629
|
+
this.#fragments.push(body);
|
|
17724
17630
|
if (!this.#info.fragmented && this.#info.fin) {
|
|
17725
|
-
|
|
17631
|
+
const fullMessage = Buffer.concat(this.#fragments);
|
|
17632
|
+
websocketMessageReceived(this.ws, this.#info.binaryType, fullMessage);
|
|
17633
|
+
this.#fragments.length = 0;
|
|
17726
17634
|
}
|
|
17727
17635
|
this.#state = parserStates.INFO;
|
|
17728
17636
|
} else {
|
|
17729
|
-
this.#extensions.get("permessage-deflate").decompress(
|
|
17730
|
-
|
|
17731
|
-
|
|
17732
|
-
|
|
17733
|
-
|
|
17734
|
-
|
|
17735
|
-
|
|
17736
|
-
}
|
|
17737
|
-
this.writeFragments(data);
|
|
17738
|
-
if (this.#maxPayloadSize > 0 && this.#fragmentsBytes > this.#maxPayloadSize) {
|
|
17739
|
-
failWebsocketConnection(this.ws, new MessageSizeExceededError().message);
|
|
17740
|
-
return;
|
|
17741
|
-
}
|
|
17742
|
-
if (!this.#info.fin) {
|
|
17743
|
-
this.#state = parserStates.INFO;
|
|
17744
|
-
this.#loop = true;
|
|
17745
|
-
this.run(callback);
|
|
17746
|
-
return;
|
|
17747
|
-
}
|
|
17748
|
-
websocketMessageReceived(this.ws, this.#info.binaryType, this.consumeFragments());
|
|
17749
|
-
this.#loop = true;
|
|
17637
|
+
this.#extensions.get("permessage-deflate").decompress(body, this.#info.fin, (error, data) => {
|
|
17638
|
+
if (error) {
|
|
17639
|
+
closeWebSocketConnection(this.ws, 1007, error.message, error.message.length);
|
|
17640
|
+
return;
|
|
17641
|
+
}
|
|
17642
|
+
this.#fragments.push(data);
|
|
17643
|
+
if (!this.#info.fin) {
|
|
17750
17644
|
this.#state = parserStates.INFO;
|
|
17645
|
+
this.#loop = true;
|
|
17751
17646
|
this.run(callback);
|
|
17647
|
+
return;
|
|
17752
17648
|
}
|
|
17753
|
-
|
|
17649
|
+
websocketMessageReceived(this.ws, this.#info.binaryType, Buffer.concat(this.#fragments));
|
|
17650
|
+
this.#loop = true;
|
|
17651
|
+
this.#state = parserStates.INFO;
|
|
17652
|
+
this.#fragments.length = 0;
|
|
17653
|
+
this.run(callback);
|
|
17654
|
+
});
|
|
17754
17655
|
this.#loop = false;
|
|
17755
17656
|
break;
|
|
17756
17657
|
}
|
|
@@ -17793,21 +17694,6 @@ var require_receiver = __commonJS({
|
|
|
17793
17694
|
this.#byteOffset -= n;
|
|
17794
17695
|
return buffer;
|
|
17795
17696
|
}
|
|
17796
|
-
writeFragments(fragment) {
|
|
17797
|
-
this.#fragmentsBytes += fragment.length;
|
|
17798
|
-
this.#fragments.push(fragment);
|
|
17799
|
-
}
|
|
17800
|
-
consumeFragments() {
|
|
17801
|
-
const fragments = this.#fragments;
|
|
17802
|
-
if (fragments.length === 1) {
|
|
17803
|
-
this.#fragmentsBytes = 0;
|
|
17804
|
-
return fragments.shift();
|
|
17805
|
-
}
|
|
17806
|
-
const output = Buffer.concat(fragments, this.#fragmentsBytes);
|
|
17807
|
-
this.#fragments = [];
|
|
17808
|
-
this.#fragmentsBytes = 0;
|
|
17809
|
-
return output;
|
|
17810
|
-
}
|
|
17811
17697
|
parseCloseBody(data) {
|
|
17812
17698
|
assert(data.length !== 1);
|
|
17813
17699
|
let code;
|
|
@@ -17894,9 +17780,9 @@ var require_receiver = __commonJS({
|
|
|
17894
17780
|
}
|
|
17895
17781
|
});
|
|
17896
17782
|
|
|
17897
|
-
// node_modules/undici/lib/web/websocket/sender.js
|
|
17783
|
+
// packages/core/node_modules/undici/lib/web/websocket/sender.js
|
|
17898
17784
|
var require_sender = __commonJS({
|
|
17899
|
-
"node_modules/undici/lib/web/websocket/sender.js"(exports, module) {
|
|
17785
|
+
"packages/core/node_modules/undici/lib/web/websocket/sender.js"(exports, module) {
|
|
17900
17786
|
"use strict";
|
|
17901
17787
|
init_esbuild_shims();
|
|
17902
17788
|
var { WebsocketFrameSend } = require_frame();
|
|
@@ -17982,9 +17868,9 @@ var require_sender = __commonJS({
|
|
|
17982
17868
|
}
|
|
17983
17869
|
});
|
|
17984
17870
|
|
|
17985
|
-
// node_modules/undici/lib/web/websocket/websocket.js
|
|
17871
|
+
// packages/core/node_modules/undici/lib/web/websocket/websocket.js
|
|
17986
17872
|
var require_websocket = __commonJS({
|
|
17987
|
-
"node_modules/undici/lib/web/websocket/websocket.js"(exports, module) {
|
|
17873
|
+
"packages/core/node_modules/undici/lib/web/websocket/websocket.js"(exports, module) {
|
|
17988
17874
|
"use strict";
|
|
17989
17875
|
init_esbuild_shims();
|
|
17990
17876
|
var { webidl } = require_webidl();
|
|
@@ -18255,10 +18141,7 @@ var require_websocket = __commonJS({
|
|
|
18255
18141
|
*/
|
|
18256
18142
|
#onConnectionEstablished(response, parsedExtensions) {
|
|
18257
18143
|
this[kResponse] = response;
|
|
18258
|
-
const
|
|
18259
|
-
const parser = new ByteParser(this, parsedExtensions, {
|
|
18260
|
-
maxPayloadSize
|
|
18261
|
-
});
|
|
18144
|
+
const parser = new ByteParser(this, parsedExtensions);
|
|
18262
18145
|
parser.on("drain", onParserDrain);
|
|
18263
18146
|
parser.on("error", onParserError.bind(this));
|
|
18264
18147
|
response.socket.ws = this;
|
|
@@ -18375,9 +18258,9 @@ var require_websocket = __commonJS({
|
|
|
18375
18258
|
}
|
|
18376
18259
|
});
|
|
18377
18260
|
|
|
18378
|
-
// node_modules/undici/lib/web/eventsource/util.js
|
|
18261
|
+
// packages/core/node_modules/undici/lib/web/eventsource/util.js
|
|
18379
18262
|
var require_util8 = __commonJS({
|
|
18380
|
-
"node_modules/undici/lib/web/eventsource/util.js"(exports, module) {
|
|
18263
|
+
"packages/core/node_modules/undici/lib/web/eventsource/util.js"(exports, module) {
|
|
18381
18264
|
"use strict";
|
|
18382
18265
|
init_esbuild_shims();
|
|
18383
18266
|
function isValidLastEventId(value) {
|
|
@@ -18406,9 +18289,9 @@ var require_util8 = __commonJS({
|
|
|
18406
18289
|
}
|
|
18407
18290
|
});
|
|
18408
18291
|
|
|
18409
|
-
// node_modules/undici/lib/web/eventsource/eventsource-stream.js
|
|
18292
|
+
// packages/core/node_modules/undici/lib/web/eventsource/eventsource-stream.js
|
|
18410
18293
|
var require_eventsource_stream = __commonJS({
|
|
18411
|
-
"node_modules/undici/lib/web/eventsource/eventsource-stream.js"(exports, module) {
|
|
18294
|
+
"packages/core/node_modules/undici/lib/web/eventsource/eventsource-stream.js"(exports, module) {
|
|
18412
18295
|
"use strict";
|
|
18413
18296
|
init_esbuild_shims();
|
|
18414
18297
|
var { Transform } = __require("node:stream");
|
|
@@ -18640,9 +18523,9 @@ ${value}`;
|
|
|
18640
18523
|
}
|
|
18641
18524
|
});
|
|
18642
18525
|
|
|
18643
|
-
// node_modules/undici/lib/web/eventsource/eventsource.js
|
|
18526
|
+
// packages/core/node_modules/undici/lib/web/eventsource/eventsource.js
|
|
18644
18527
|
var require_eventsource = __commonJS({
|
|
18645
|
-
"node_modules/undici/lib/web/eventsource/eventsource.js"(exports, module) {
|
|
18528
|
+
"packages/core/node_modules/undici/lib/web/eventsource/eventsource.js"(exports, module) {
|
|
18646
18529
|
"use strict";
|
|
18647
18530
|
init_esbuild_shims();
|
|
18648
18531
|
var { pipeline } = __require("node:stream");
|
|
@@ -18941,16 +18824,17 @@ var require_eventsource = __commonJS({
|
|
|
18941
18824
|
}
|
|
18942
18825
|
});
|
|
18943
18826
|
|
|
18944
|
-
// node_modules/undici/index.js
|
|
18827
|
+
// packages/core/node_modules/undici/index.js
|
|
18945
18828
|
var require_undici = __commonJS({
|
|
18946
|
-
"node_modules/undici/index.js"(exports, module) {
|
|
18829
|
+
"packages/core/node_modules/undici/index.js"(exports, module) {
|
|
18830
|
+
"use strict";
|
|
18947
18831
|
init_esbuild_shims();
|
|
18948
18832
|
var Client = require_client();
|
|
18949
18833
|
var Dispatcher = require_dispatcher();
|
|
18950
18834
|
var Pool = require_pool();
|
|
18951
18835
|
var BalancedPool = require_balanced_pool();
|
|
18952
|
-
var
|
|
18953
|
-
var
|
|
18836
|
+
var Agent2 = require_agent();
|
|
18837
|
+
var ProxyAgent2 = require_proxy_agent();
|
|
18954
18838
|
var EnvHttpProxyAgent = require_env_http_proxy_agent();
|
|
18955
18839
|
var RetryAgent = require_retry_agent();
|
|
18956
18840
|
var errors = require_errors();
|
|
@@ -18972,8 +18856,8 @@ var require_undici = __commonJS({
|
|
|
18972
18856
|
module.exports.Client = Client;
|
|
18973
18857
|
module.exports.Pool = Pool;
|
|
18974
18858
|
module.exports.BalancedPool = BalancedPool;
|
|
18975
|
-
module.exports.Agent =
|
|
18976
|
-
module.exports.ProxyAgent =
|
|
18859
|
+
module.exports.Agent = Agent2;
|
|
18860
|
+
module.exports.ProxyAgent = ProxyAgent2;
|
|
18977
18861
|
module.exports.EnvHttpProxyAgent = EnvHttpProxyAgent;
|
|
18978
18862
|
module.exports.RetryAgent = RetryAgent;
|
|
18979
18863
|
module.exports.RetryHandler = RetryHandler;
|
|
@@ -19035,7 +18919,7 @@ var require_undici = __commonJS({
|
|
|
19035
18919
|
module.exports.setGlobalDispatcher = setGlobalDispatcher;
|
|
19036
18920
|
module.exports.getGlobalDispatcher = getGlobalDispatcher;
|
|
19037
18921
|
var fetchImpl = require_fetch().fetch;
|
|
19038
|
-
module.exports.fetch = /* @__PURE__ */ __name(async function
|
|
18922
|
+
module.exports.fetch = /* @__PURE__ */ __name(async function fetch2(init, options = void 0) {
|
|
19039
18923
|
try {
|
|
19040
18924
|
return await fetchImpl(init, options);
|
|
19041
18925
|
} catch (err) {
|
|
@@ -19084,9 +18968,435 @@ var require_undici = __commonJS({
|
|
|
19084
18968
|
}
|
|
19085
18969
|
});
|
|
19086
18970
|
|
|
18971
|
+
// packages/core/src/utils/runtimeFetchOptions.ts
|
|
18972
|
+
init_esbuild_shims();
|
|
18973
|
+
var import_undici = __toESM(require_undici(), 1);
|
|
18974
|
+
var debugLogger = createDebugLogger("RUNTIME_FETCH");
|
|
18975
|
+
function detectRuntime() {
|
|
18976
|
+
if (typeof process !== "undefined" && process.versions?.["bun"]) {
|
|
18977
|
+
return "bun";
|
|
18978
|
+
}
|
|
18979
|
+
if (typeof process !== "undefined" && process.versions?.node) {
|
|
18980
|
+
return "node";
|
|
18981
|
+
}
|
|
18982
|
+
return "unknown";
|
|
18983
|
+
}
|
|
18984
|
+
__name(detectRuntime, "detectRuntime");
|
|
18985
|
+
function buildRuntimeFetchOptions(sdkType, proxyUrl) {
|
|
18986
|
+
const runtime = detectRuntime();
|
|
18987
|
+
switch (runtime) {
|
|
18988
|
+
case "bun": {
|
|
18989
|
+
if (sdkType === "openai") {
|
|
18990
|
+
return {
|
|
18991
|
+
fetchOptions: {
|
|
18992
|
+
timeout: false
|
|
18993
|
+
}
|
|
18994
|
+
};
|
|
18995
|
+
} else {
|
|
18996
|
+
const bunFetch = /* @__PURE__ */ __name(async (input, init) => {
|
|
18997
|
+
const bunFetchOptions = {
|
|
18998
|
+
...init,
|
|
18999
|
+
// @ts-expect-error - Bun-specific timeout option
|
|
19000
|
+
timeout: false
|
|
19001
|
+
};
|
|
19002
|
+
return fetch(input, bunFetchOptions);
|
|
19003
|
+
}, "bunFetch");
|
|
19004
|
+
return {
|
|
19005
|
+
fetch: bunFetch
|
|
19006
|
+
};
|
|
19007
|
+
}
|
|
19008
|
+
}
|
|
19009
|
+
case "node": {
|
|
19010
|
+
return buildFetchOptionsWithDispatcher(sdkType, proxyUrl);
|
|
19011
|
+
}
|
|
19012
|
+
default: {
|
|
19013
|
+
return buildFetchOptionsWithDispatcher(sdkType, proxyUrl);
|
|
19014
|
+
}
|
|
19015
|
+
}
|
|
19016
|
+
}
|
|
19017
|
+
__name(buildRuntimeFetchOptions, "buildRuntimeFetchOptions");
|
|
19018
|
+
var dispatcherCache = /* @__PURE__ */ new Map();
|
|
19019
|
+
var proxyFailureCounts = /* @__PURE__ */ new Map();
|
|
19020
|
+
var NO_DISPATCHER_FALLBACK = {
|
|
19021
|
+
openai: void 0,
|
|
19022
|
+
anthropic: {}
|
|
19023
|
+
};
|
|
19024
|
+
function getOrCreateSharedDispatcher(proxyUrl) {
|
|
19025
|
+
const cached = dispatcherCache.get(proxyUrl);
|
|
19026
|
+
if (cached) {
|
|
19027
|
+
return cached;
|
|
19028
|
+
}
|
|
19029
|
+
const dispatcher = new import_undici.ProxyAgent({
|
|
19030
|
+
uri: proxyUrl,
|
|
19031
|
+
headersTimeout: 0,
|
|
19032
|
+
bodyTimeout: 0,
|
|
19033
|
+
keepAliveTimeout: 6e4
|
|
19034
|
+
});
|
|
19035
|
+
dispatcherCache.set(proxyUrl, dispatcher);
|
|
19036
|
+
return dispatcher;
|
|
19037
|
+
}
|
|
19038
|
+
__name(getOrCreateSharedDispatcher, "getOrCreateSharedDispatcher");
|
|
19039
|
+
function extractHostnameFromProxyUrl(proxyUrl) {
|
|
19040
|
+
try {
|
|
19041
|
+
const url = new URL(proxyUrl);
|
|
19042
|
+
if (url.hostname) {
|
|
19043
|
+
return url.port ? `${url.hostname}:${url.port}` : url.hostname;
|
|
19044
|
+
}
|
|
19045
|
+
} catch {
|
|
19046
|
+
}
|
|
19047
|
+
const match = proxyUrl.match(/@([^:/\s]+)(:\d+)?/);
|
|
19048
|
+
return match ? match[1] + (match[2] ?? "") : redactProxyCredentials(proxyUrl);
|
|
19049
|
+
}
|
|
19050
|
+
__name(extractHostnameFromProxyUrl, "extractHostnameFromProxyUrl");
|
|
19051
|
+
function hasPlausibleProxyPort(host) {
|
|
19052
|
+
const portMatch = host.match(/:(\d{1,5})$/);
|
|
19053
|
+
if (!portMatch) {
|
|
19054
|
+
return false;
|
|
19055
|
+
}
|
|
19056
|
+
const port = Number(portMatch[1]);
|
|
19057
|
+
return port >= 80 && port <= 65535;
|
|
19058
|
+
}
|
|
19059
|
+
__name(hasPlausibleProxyPort, "hasPlausibleProxyPort");
|
|
19060
|
+
function hasLocalOrProxyLikeHost(host) {
|
|
19061
|
+
const hostWithoutPort = host.replace(/:\d{1,5}$/, "").toLowerCase();
|
|
19062
|
+
if (hostWithoutPort === "localhost") {
|
|
19063
|
+
return true;
|
|
19064
|
+
}
|
|
19065
|
+
if (/^\d{1,3}(\.\d{1,3}){3}$/.test(hostWithoutPort)) {
|
|
19066
|
+
return true;
|
|
19067
|
+
}
|
|
19068
|
+
return hostWithoutPort.split(/[.-]/).some((label) => /^(proxy|gateway|gw|squid)\d*$/.test(label));
|
|
19069
|
+
}
|
|
19070
|
+
__name(hasLocalOrProxyLikeHost, "hasLocalOrProxyLikeHost");
|
|
19071
|
+
function hasNetworkErrorContext(message, offset) {
|
|
19072
|
+
const context = message.slice(Math.max(0, offset - 80), offset).toLowerCase();
|
|
19073
|
+
return /\b(connect|dispatcher|econnrefused|econnreset|enotfound|etimedout|proxy|tunnel)\b/.test(
|
|
19074
|
+
context
|
|
19075
|
+
);
|
|
19076
|
+
}
|
|
19077
|
+
__name(hasNetworkErrorContext, "hasNetworkErrorContext");
|
|
19078
|
+
function shouldRedactTokenOnlyCredential(host, message, offset) {
|
|
19079
|
+
return hasPlausibleProxyPort(host) && (hasLocalOrProxyLikeHost(host) || hasNetworkErrorContext(message, offset));
|
|
19080
|
+
}
|
|
19081
|
+
__name(shouldRedactTokenOnlyCredential, "shouldRedactTokenOnlyCredential");
|
|
19082
|
+
function redactProxyCredentials(message) {
|
|
19083
|
+
let result = message.replace(/\/\/[^/\s]*@/g, "//<redacted>@");
|
|
19084
|
+
result = result.replace(
|
|
19085
|
+
/(^|[\s([=:])([^\s/@()[\]=]+@[^@\s/()[\]=]+)/g,
|
|
19086
|
+
(match, prefix, candidate, offset, message2) => {
|
|
19087
|
+
const atIndex = candidate.indexOf("@");
|
|
19088
|
+
const userInfo = candidate.slice(0, atIndex);
|
|
19089
|
+
const host = candidate.slice(atIndex + 1);
|
|
19090
|
+
if (!userInfo.includes(":") && !shouldRedactTokenOnlyCredential(host, message2, offset)) {
|
|
19091
|
+
return match;
|
|
19092
|
+
}
|
|
19093
|
+
return `${prefix}<redacted>@${host}`;
|
|
19094
|
+
}
|
|
19095
|
+
);
|
|
19096
|
+
return result;
|
|
19097
|
+
}
|
|
19098
|
+
__name(redactProxyCredentials, "redactProxyCredentials");
|
|
19099
|
+
function redactProxyError(error) {
|
|
19100
|
+
return redactProxyErrorValue(error, /* @__PURE__ */ new WeakMap());
|
|
19101
|
+
}
|
|
19102
|
+
__name(redactProxyError, "redactProxyError");
|
|
19103
|
+
function redactProxyErrorValue(error, seen) {
|
|
19104
|
+
if (typeof error === "string") {
|
|
19105
|
+
return redactProxyCredentials(error);
|
|
19106
|
+
}
|
|
19107
|
+
if (!error || typeof error !== "object") {
|
|
19108
|
+
return error;
|
|
19109
|
+
}
|
|
19110
|
+
if (seen.has(error)) {
|
|
19111
|
+
return seen.get(error);
|
|
19112
|
+
}
|
|
19113
|
+
const errorRecord = error;
|
|
19114
|
+
const needsClone = shouldCloneForRedaction(error, errorRecord);
|
|
19115
|
+
const redactedMessage = typeof errorRecord.message === "string" ? redactProxyCredentials(errorRecord.message) : void 0;
|
|
19116
|
+
const redactedStack = typeof errorRecord.stack === "string" ? redactProxyCredentials(errorRecord.stack) : void 0;
|
|
19117
|
+
let redactedCause = errorRecord.cause;
|
|
19118
|
+
let redactedErrors = errorRecord.errors;
|
|
19119
|
+
if (needsClone) {
|
|
19120
|
+
const clone = Object.create(Object.getPrototypeOf(error));
|
|
19121
|
+
seen.set(error, clone);
|
|
19122
|
+
if (errorRecord.cause !== void 0) {
|
|
19123
|
+
redactedCause = redactProxyErrorValue(errorRecord.cause, seen);
|
|
19124
|
+
}
|
|
19125
|
+
if (errorRecord.errors !== void 0) {
|
|
19126
|
+
redactedErrors = redactProxyErrorCollection(errorRecord.errors, seen);
|
|
19127
|
+
}
|
|
19128
|
+
cloneErrorWithRedactedFields(
|
|
19129
|
+
error,
|
|
19130
|
+
clone,
|
|
19131
|
+
redactedMessage,
|
|
19132
|
+
redactedStack,
|
|
19133
|
+
redactedCause,
|
|
19134
|
+
redactedErrors
|
|
19135
|
+
);
|
|
19136
|
+
return clone;
|
|
19137
|
+
}
|
|
19138
|
+
seen.set(error, error);
|
|
19139
|
+
try {
|
|
19140
|
+
if (redactedMessage !== void 0) {
|
|
19141
|
+
errorRecord.message = redactedMessage;
|
|
19142
|
+
}
|
|
19143
|
+
if (redactedStack !== void 0) {
|
|
19144
|
+
errorRecord.stack = redactedStack;
|
|
19145
|
+
}
|
|
19146
|
+
if (errorRecord.cause !== void 0) {
|
|
19147
|
+
redactedCause = redactProxyErrorValue(errorRecord.cause, seen);
|
|
19148
|
+
errorRecord.cause = redactedCause;
|
|
19149
|
+
}
|
|
19150
|
+
if (errorRecord.errors !== void 0) {
|
|
19151
|
+
redactedErrors = redactProxyErrorCollection(errorRecord.errors, seen);
|
|
19152
|
+
errorRecord.errors = redactedErrors;
|
|
19153
|
+
}
|
|
19154
|
+
return error;
|
|
19155
|
+
} catch {
|
|
19156
|
+
const clone = Object.create(Object.getPrototypeOf(error));
|
|
19157
|
+
seen.set(error, clone);
|
|
19158
|
+
if (errorRecord.cause !== void 0) {
|
|
19159
|
+
redactedCause = redactProxyErrorValue(errorRecord.cause, seen);
|
|
19160
|
+
}
|
|
19161
|
+
if (errorRecord.errors !== void 0) {
|
|
19162
|
+
redactedErrors = redactProxyErrorCollection(errorRecord.errors, seen);
|
|
19163
|
+
}
|
|
19164
|
+
cloneErrorWithRedactedFields(
|
|
19165
|
+
error,
|
|
19166
|
+
clone,
|
|
19167
|
+
redactedMessage,
|
|
19168
|
+
redactedStack,
|
|
19169
|
+
redactedCause,
|
|
19170
|
+
redactedErrors
|
|
19171
|
+
);
|
|
19172
|
+
return clone;
|
|
19173
|
+
}
|
|
19174
|
+
}
|
|
19175
|
+
__name(redactProxyErrorValue, "redactProxyErrorValue");
|
|
19176
|
+
function redactProxyErrorCollection(errors, seen) {
|
|
19177
|
+
if (!Array.isArray(errors)) {
|
|
19178
|
+
return redactProxyErrorValue(errors, seen);
|
|
19179
|
+
}
|
|
19180
|
+
if (seen.has(errors)) {
|
|
19181
|
+
return seen.get(errors);
|
|
19182
|
+
}
|
|
19183
|
+
const redactedErrors = [];
|
|
19184
|
+
seen.set(errors, redactedErrors);
|
|
19185
|
+
for (const error of errors) {
|
|
19186
|
+
redactedErrors.push(redactProxyErrorValue(error, seen));
|
|
19187
|
+
}
|
|
19188
|
+
return redactedErrors;
|
|
19189
|
+
}
|
|
19190
|
+
__name(redactProxyErrorCollection, "redactProxyErrorCollection");
|
|
19191
|
+
function shouldCloneForRedaction(error, errorRecord) {
|
|
19192
|
+
return typeof errorRecord.message === "string" && !canAssignProperty(error, "message") || typeof errorRecord.stack === "string" && !canAssignProperty(error, "stack") || errorRecord.cause !== void 0 && !canAssignProperty(error, "cause") || errorRecord.errors !== void 0 && !canAssignProperty(error, "errors");
|
|
19193
|
+
}
|
|
19194
|
+
__name(shouldCloneForRedaction, "shouldCloneForRedaction");
|
|
19195
|
+
function canAssignProperty(target, key) {
|
|
19196
|
+
let current = target;
|
|
19197
|
+
while (current) {
|
|
19198
|
+
const descriptor = Object.getOwnPropertyDescriptor(current, key);
|
|
19199
|
+
if (descriptor) {
|
|
19200
|
+
if ("writable" in descriptor) {
|
|
19201
|
+
return descriptor.writable === true;
|
|
19202
|
+
}
|
|
19203
|
+
return typeof descriptor.set === "function";
|
|
19204
|
+
}
|
|
19205
|
+
current = Object.getPrototypeOf(current);
|
|
19206
|
+
}
|
|
19207
|
+
return Object.isExtensible(target);
|
|
19208
|
+
}
|
|
19209
|
+
__name(canAssignProperty, "canAssignProperty");
|
|
19210
|
+
function cloneErrorWithRedactedFields(error, clone, redactedMessage, redactedStack, redactedCause, redactedErrors) {
|
|
19211
|
+
const copiedKeys = /* @__PURE__ */ new Set();
|
|
19212
|
+
for (const key of Reflect.ownKeys(error)) {
|
|
19213
|
+
const descriptor = Object.getOwnPropertyDescriptor(error, key);
|
|
19214
|
+
if (!descriptor) {
|
|
19215
|
+
continue;
|
|
19216
|
+
}
|
|
19217
|
+
copiedKeys.add(key);
|
|
19218
|
+
const updatedDescriptor = getRedactedPropertyDescriptor(
|
|
19219
|
+
key,
|
|
19220
|
+
descriptor,
|
|
19221
|
+
redactedMessage,
|
|
19222
|
+
redactedStack,
|
|
19223
|
+
redactedCause,
|
|
19224
|
+
redactedErrors
|
|
19225
|
+
);
|
|
19226
|
+
try {
|
|
19227
|
+
Object.defineProperty(clone, key, updatedDescriptor);
|
|
19228
|
+
} catch {
|
|
19229
|
+
}
|
|
19230
|
+
}
|
|
19231
|
+
defineMissingRedactedValue(clone, copiedKeys, "message", redactedMessage);
|
|
19232
|
+
defineMissingRedactedValue(clone, copiedKeys, "stack", redactedStack);
|
|
19233
|
+
defineMissingRedactedValue(clone, copiedKeys, "cause", redactedCause);
|
|
19234
|
+
defineMissingRedactedValue(clone, copiedKeys, "errors", redactedErrors);
|
|
19235
|
+
}
|
|
19236
|
+
__name(cloneErrorWithRedactedFields, "cloneErrorWithRedactedFields");
|
|
19237
|
+
function getRedactedPropertyDescriptor(key, descriptor, redactedMessage, redactedStack, redactedCause, redactedErrors) {
|
|
19238
|
+
const redactedValue = key === "message" ? redactedMessage : key === "stack" ? redactedStack : key === "cause" ? redactedCause : key === "errors" ? redactedErrors : void 0;
|
|
19239
|
+
if (redactedValue === void 0) {
|
|
19240
|
+
return { ...descriptor };
|
|
19241
|
+
}
|
|
19242
|
+
if ("value" in descriptor) {
|
|
19243
|
+
return { ...descriptor, value: redactedValue };
|
|
19244
|
+
}
|
|
19245
|
+
return {
|
|
19246
|
+
configurable: descriptor.configurable,
|
|
19247
|
+
enumerable: descriptor.enumerable,
|
|
19248
|
+
value: redactedValue,
|
|
19249
|
+
writable: true
|
|
19250
|
+
};
|
|
19251
|
+
}
|
|
19252
|
+
__name(getRedactedPropertyDescriptor, "getRedactedPropertyDescriptor");
|
|
19253
|
+
function defineMissingRedactedValue(target, copiedKeys, key, value) {
|
|
19254
|
+
if (value === void 0 || copiedKeys.has(key)) {
|
|
19255
|
+
return;
|
|
19256
|
+
}
|
|
19257
|
+
try {
|
|
19258
|
+
Object.defineProperty(target, key, {
|
|
19259
|
+
configurable: true,
|
|
19260
|
+
enumerable: false,
|
|
19261
|
+
value,
|
|
19262
|
+
writable: true
|
|
19263
|
+
});
|
|
19264
|
+
} catch {
|
|
19265
|
+
}
|
|
19266
|
+
}
|
|
19267
|
+
__name(defineMissingRedactedValue, "defineMissingRedactedValue");
|
|
19268
|
+
function recordProxyFailure(hostname) {
|
|
19269
|
+
const failureCount = (proxyFailureCounts.get(hostname) ?? 0) + 1;
|
|
19270
|
+
proxyFailureCounts.set(hostname, failureCount);
|
|
19271
|
+
return failureCount;
|
|
19272
|
+
}
|
|
19273
|
+
__name(recordProxyFailure, "recordProxyFailure");
|
|
19274
|
+
function buildFetchOptionsWithDispatcher(sdkType, proxyUrl) {
|
|
19275
|
+
if (!proxyUrl) {
|
|
19276
|
+
const NO_PROXY_KEY = "__no_proxy__";
|
|
19277
|
+
let dispatcher = dispatcherCache.get(NO_PROXY_KEY);
|
|
19278
|
+
if (!dispatcher) {
|
|
19279
|
+
dispatcher = new import_undici.Agent({
|
|
19280
|
+
headersTimeout: 0,
|
|
19281
|
+
bodyTimeout: 0,
|
|
19282
|
+
keepAliveTimeout: 6e4
|
|
19283
|
+
});
|
|
19284
|
+
dispatcherCache.set(NO_PROXY_KEY, dispatcher);
|
|
19285
|
+
}
|
|
19286
|
+
return { fetchOptions: { dispatcher }, fetch: import_undici.fetch };
|
|
19287
|
+
}
|
|
19288
|
+
try {
|
|
19289
|
+
const dispatcher = getOrCreateSharedDispatcher(proxyUrl);
|
|
19290
|
+
return { fetchOptions: { dispatcher }, fetch: import_undici.fetch };
|
|
19291
|
+
} catch (error) {
|
|
19292
|
+
const hostname = extractHostnameFromProxyUrl(proxyUrl);
|
|
19293
|
+
const failureCount = recordProxyFailure(hostname);
|
|
19294
|
+
const failureLabel = failureCount === 1 ? "first failure" : `failure #${failureCount}`;
|
|
19295
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
19296
|
+
const redactedMessage = redactProxyCredentials(errorMessage);
|
|
19297
|
+
const logMessage = `Failed to create proxy dispatcher for ${hostname} (${failureLabel}), falling back to direct connection: ${redactedMessage}`;
|
|
19298
|
+
debugLogger.warn(logMessage);
|
|
19299
|
+
console.error(`[RUNTIME_FETCH] ${logMessage}`);
|
|
19300
|
+
return NO_DISPATCHER_FALLBACK[sdkType];
|
|
19301
|
+
}
|
|
19302
|
+
}
|
|
19303
|
+
__name(buildFetchOptionsWithDispatcher, "buildFetchOptionsWithDispatcher");
|
|
19304
|
+
|
|
19305
|
+
// packages/core/src/utils/request-tokenizer/textTokenizer.ts
|
|
19306
|
+
init_esbuild_shims();
|
|
19307
|
+
var TextTokenizer = class {
|
|
19308
|
+
static {
|
|
19309
|
+
__name(this, "TextTokenizer");
|
|
19310
|
+
}
|
|
19311
|
+
/**
|
|
19312
|
+
* Calculate tokens for text content
|
|
19313
|
+
*
|
|
19314
|
+
* @param text - The text to estimate tokens for
|
|
19315
|
+
* @returns The estimated token count
|
|
19316
|
+
*/
|
|
19317
|
+
async calculateTokens(text) {
|
|
19318
|
+
return this.calculateTokensSync(text);
|
|
19319
|
+
}
|
|
19320
|
+
/**
|
|
19321
|
+
* Calculate tokens for multiple text strings
|
|
19322
|
+
*
|
|
19323
|
+
* @param texts - Array of text strings to estimate tokens for
|
|
19324
|
+
* @returns Array of token counts corresponding to each input text
|
|
19325
|
+
*/
|
|
19326
|
+
async calculateTokensBatch(texts) {
|
|
19327
|
+
return texts.map((text) => this.calculateTokensSync(text));
|
|
19328
|
+
}
|
|
19329
|
+
calculateTokensSync(text) {
|
|
19330
|
+
if (!text || text.length === 0) {
|
|
19331
|
+
return 0;
|
|
19332
|
+
}
|
|
19333
|
+
let asciiChars = 0;
|
|
19334
|
+
let nonAsciiChars = 0;
|
|
19335
|
+
for (let i = 0; i < text.length; i++) {
|
|
19336
|
+
const charCode = text.charCodeAt(i);
|
|
19337
|
+
if (charCode < 128) {
|
|
19338
|
+
asciiChars++;
|
|
19339
|
+
} else {
|
|
19340
|
+
nonAsciiChars++;
|
|
19341
|
+
}
|
|
19342
|
+
}
|
|
19343
|
+
const tokens = asciiChars / 4 + nonAsciiChars * 1.1;
|
|
19344
|
+
return Math.ceil(tokens);
|
|
19345
|
+
}
|
|
19346
|
+
};
|
|
19347
|
+
|
|
19348
|
+
// packages/core/src/utils/request-tokenizer/supportedImageFormats.ts
|
|
19349
|
+
init_esbuild_shims();
|
|
19350
|
+
var SUPPORTED_IMAGE_MIME_TYPES = [
|
|
19351
|
+
"image/bmp",
|
|
19352
|
+
"image/jpeg",
|
|
19353
|
+
"image/jpg",
|
|
19354
|
+
// Alternative MIME type for JPEG
|
|
19355
|
+
"image/png",
|
|
19356
|
+
"image/tiff",
|
|
19357
|
+
"image/webp",
|
|
19358
|
+
"image/heic"
|
|
19359
|
+
];
|
|
19360
|
+
function isSupportedImageMimeType(mimeType) {
|
|
19361
|
+
return SUPPORTED_IMAGE_MIME_TYPES.includes(
|
|
19362
|
+
mimeType
|
|
19363
|
+
);
|
|
19364
|
+
}
|
|
19365
|
+
__name(isSupportedImageMimeType, "isSupportedImageMimeType");
|
|
19366
|
+
function getSupportedImageFormatsString() {
|
|
19367
|
+
return SUPPORTED_IMAGE_MIME_TYPES.map(
|
|
19368
|
+
(type) => type.replace("image/", "").toUpperCase()
|
|
19369
|
+
).join(", ");
|
|
19370
|
+
}
|
|
19371
|
+
__name(getSupportedImageFormatsString, "getSupportedImageFormatsString");
|
|
19372
|
+
function getUnsupportedImageFormatWarning() {
|
|
19373
|
+
return `Only the following image formats are supported: ${getSupportedImageFormatsString()}. Other formats may not work as expected.`;
|
|
19374
|
+
}
|
|
19375
|
+
__name(getUnsupportedImageFormatWarning, "getUnsupportedImageFormatWarning");
|
|
19376
|
+
|
|
19087
19377
|
export {
|
|
19088
|
-
require_undici
|
|
19378
|
+
require_undici,
|
|
19379
|
+
detectRuntime,
|
|
19380
|
+
buildRuntimeFetchOptions,
|
|
19381
|
+
getOrCreateSharedDispatcher,
|
|
19382
|
+
redactProxyCredentials,
|
|
19383
|
+
redactProxyError,
|
|
19384
|
+
TextTokenizer,
|
|
19385
|
+
SUPPORTED_IMAGE_MIME_TYPES,
|
|
19386
|
+
isSupportedImageMimeType,
|
|
19387
|
+
getSupportedImageFormatsString,
|
|
19388
|
+
getUnsupportedImageFormatWarning
|
|
19089
19389
|
};
|
|
19390
|
+
/**
|
|
19391
|
+
* @license
|
|
19392
|
+
* Copyright 2025 Qwen Team
|
|
19393
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
19394
|
+
*/
|
|
19395
|
+
/**
|
|
19396
|
+
* @license
|
|
19397
|
+
* Copyright 2025 Qwen
|
|
19398
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
19399
|
+
*/
|
|
19090
19400
|
/*! Bundled license information:
|
|
19091
19401
|
|
|
19092
19402
|
undici/lib/web/fetch/body.js:
|