@psnext/slingcli 3.3.20260911-1 → 3.3.20260915-1
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 +17 -0
- package/bin/sling.js +117 -43
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{chunk-VDBOM5UG.js → chunk-VY7PRZDT.js} +2 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/cli.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/index.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/rpc-entry.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/model-selector.js +79 -32
- package/node_modules/@earendil-works/pi-coding-agent/npm-shrinkwrap.json +2149 -248
- package/node_modules/@earendil-works/pi-coding-agent/package.json +1 -0
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.browser.js +2 -0
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +25 -8
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.native.js +2 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/getAwsChunkedEncodingStream.browser.js +2 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/getAwsChunkedEncodingStream.js +23 -8
- package/node_modules/@smithy/core/package.json +1 -1
- package/node_modules/@types/node/README.md +2 -2
- package/node_modules/@types/node/assert/strict.d.ts +13 -56
- package/node_modules/@types/node/assert.d.ts +189 -190
- package/node_modules/@types/node/async_hooks.d.ts +151 -43
- package/node_modules/@types/node/buffer.buffer.d.ts +12 -13
- package/node_modules/@types/node/buffer.d.ts +103 -237
- package/node_modules/@types/node/child_process.d.ts +39 -154
- package/node_modules/@types/node/cluster.d.ts +238 -384
- package/node_modules/@types/node/console.d.ts +45 -404
- package/node_modules/@types/node/constants.d.ts +3 -10
- package/node_modules/@types/node/crypto.d.ts +1000 -1593
- package/node_modules/@types/node/dgram.d.ts +133 -81
- package/node_modules/@types/node/diagnostics_channel.d.ts +277 -59
- package/node_modules/@types/node/dns/promises.d.ts +9 -15
- package/node_modules/@types/node/dns.d.ts +136 -183
- package/node_modules/@types/node/domain.d.ts +12 -32
- package/node_modules/@types/node/events.d.ts +872 -840
- package/node_modules/@types/node/ffi.d.ts +486 -0
- package/node_modules/@types/node/fs/promises.d.ts +256 -85
- package/node_modules/@types/node/fs.d.ts +865 -525
- package/node_modules/@types/node/globals.d.ts +12 -34
- package/node_modules/@types/node/globals.typedarray.d.ts +63 -0
- package/node_modules/@types/node/http.d.ts +433 -312
- package/node_modules/@types/node/http2.d.ts +545 -891
- package/node_modules/@types/node/https.d.ts +64 -243
- package/node_modules/@types/node/index.d.ts +25 -7
- package/node_modules/@types/node/inspector/promises.d.ts +35 -0
- package/node_modules/@types/node/inspector.d.ts +70 -58
- package/node_modules/@types/node/inspector.generated.d.ts +764 -410
- package/node_modules/@types/node/module.d.ts +54 -219
- package/node_modules/@types/node/net.d.ts +208 -222
- package/node_modules/@types/node/os.d.ts +41 -49
- package/node_modules/@types/node/package.json +13 -3
- package/node_modules/@types/node/path/posix.d.ts +8 -0
- package/node_modules/@types/node/path/win32.d.ts +8 -0
- package/node_modules/@types/node/path.d.ts +119 -141
- package/node_modules/@types/node/perf_hooks.d.ts +339 -690
- package/node_modules/@types/node/process.d.ts +389 -205
- package/node_modules/@types/node/punycode.d.ts +3 -31
- package/node_modules/@types/node/querystring.d.ts +3 -16
- package/node_modules/@types/node/quic.d.ts +2153 -0
- package/node_modules/@types/node/readline/promises.d.ts +3 -6
- package/node_modules/@types/node/readline.d.ts +66 -152
- package/node_modules/@types/node/repl.d.ts +101 -109
- package/node_modules/@types/node/sea.d.ts +1 -116
- package/node_modules/@types/node/sqlite.d.ts +486 -68
- package/node_modules/@types/node/stream/consumers.d.ts +91 -15
- package/node_modules/@types/node/stream/iter.d.ts +452 -0
- package/node_modules/@types/node/stream/promises.d.ts +136 -15
- package/node_modules/@types/node/stream/web.d.ts +197 -454
- package/node_modules/@types/node/stream.d.ts +603 -491
- package/node_modules/@types/node/string_decoder.d.ts +3 -43
- package/node_modules/@types/node/test/reporters.d.ts +59 -0
- package/node_modules/@types/node/test.d.ts +513 -292
- package/node_modules/@types/node/timers/promises.d.ts +3 -18
- package/node_modules/@types/node/timers.d.ts +3 -141
- package/node_modules/@types/node/tls.d.ts +166 -257
- package/node_modules/@types/node/trace_events.d.ts +3 -97
- package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +7 -8
- package/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +71 -0
- package/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +2 -0
- package/node_modules/@types/node/ts5.6/index.d.ts +26 -6
- package/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +72 -0
- package/node_modules/@types/node/ts5.7/index.d.ts +118 -0
- package/node_modules/@types/node/tty.d.ts +61 -43
- package/node_modules/@types/node/url.d.ts +156 -584
- package/node_modules/@types/node/util/types.d.ts +558 -0
- package/node_modules/@types/node/util.d.ts +170 -1099
- package/node_modules/@types/node/v8.d.ts +175 -36
- package/node_modules/@types/node/vfs.d.ts +211 -0
- package/node_modules/@types/node/vm.d.ts +292 -209
- package/node_modules/@types/node/wasi.d.ts +24 -74
- package/node_modules/@types/node/web-globals/abortcontroller.d.ts +27 -2
- package/node_modules/@types/node/web-globals/blob.d.ts +23 -0
- package/node_modules/@types/node/web-globals/console.d.ts +9 -0
- package/node_modules/@types/node/web-globals/crypto.d.ts +39 -0
- package/node_modules/@types/node/web-globals/domexception.d.ts +15 -0
- package/node_modules/@types/node/web-globals/encoding.d.ts +11 -0
- package/node_modules/@types/node/web-globals/events.d.ts +9 -0
- package/node_modules/@types/node/web-globals/fetch.d.ts +14 -0
- package/node_modules/@types/node/web-globals/importmeta.d.ts +13 -0
- package/node_modules/@types/node/web-globals/messaging.d.ts +23 -0
- package/node_modules/@types/node/web-globals/navigator.d.ts +3 -0
- package/node_modules/@types/node/web-globals/performance.d.ts +45 -0
- package/node_modules/@types/node/web-globals/streams.d.ts +97 -0
- package/node_modules/@types/node/web-globals/timers.d.ts +44 -0
- package/node_modules/@types/node/web-globals/url.d.ts +24 -0
- package/node_modules/@types/node/worker_threads.d.ts +257 -407
- package/node_modules/@types/node/zlib/iter.d.ts +131 -0
- package/node_modules/@types/node/zlib.d.ts +24 -165
- package/node_modules/brace-expansion/dist/commonjs/index.d.ts +4 -0
- package/node_modules/brace-expansion/dist/commonjs/index.d.ts.map +1 -1
- package/node_modules/brace-expansion/dist/commonjs/index.js +69 -25
- package/node_modules/brace-expansion/dist/commonjs/index.js.map +1 -1
- package/node_modules/brace-expansion/dist/esm/index.d.ts +4 -0
- package/node_modules/brace-expansion/dist/esm/index.d.ts.map +1 -1
- package/node_modules/brace-expansion/dist/esm/index.js +68 -24
- package/node_modules/brace-expansion/dist/esm/index.js.map +1 -1
- package/node_modules/brace-expansion/package.json +2 -1
- package/node_modules/fast-uri/index.js +10 -6
- package/node_modules/fast-uri/package.json +1 -1
- package/node_modules/fast-uri/test/security-normalization.test.js +38 -0
- package/node_modules/hono/README.md +1 -1
- package/node_modules/hono/dist/adapter/aws-lambda/handler.js +5 -4
- package/node_modules/hono/dist/cjs/adapter/aws-lambda/handler.js +5 -4
- package/node_modules/hono/dist/cjs/context.js +1 -1
- package/node_modules/hono/dist/cjs/helper/accepts/accepts.js +1 -1
- package/node_modules/hono/dist/cjs/jsx/dom/render.js +44 -8
- package/node_modules/hono/dist/cjs/middleware/language/language.js +4 -1
- package/node_modules/hono/dist/cjs/request.js +4 -1
- package/node_modules/hono/dist/cjs/utils/accept.js +4 -7
- package/node_modules/hono/dist/context.js +1 -1
- package/node_modules/hono/dist/helper/accepts/accepts.js +1 -1
- package/node_modules/hono/dist/jsx/dom/render.js +44 -8
- package/node_modules/hono/dist/middleware/language/language.js +4 -1
- package/node_modules/hono/dist/request.js +4 -1
- package/node_modules/hono/dist/types/helper/proxy/index.d.ts +1 -1
- package/node_modules/hono/dist/types/helper/route/index.d.ts +2 -2
- package/node_modules/hono/dist/types/middleware/combine/index.d.ts +3 -1
- package/node_modules/hono/dist/types/utils/types.d.ts +1 -1
- package/node_modules/hono/dist/utils/accept.js +4 -7
- package/node_modules/hono/package.json +1 -1
- package/node_modules/ip-address/README.md +114 -114
- package/node_modules/ip-address/dist/common.d.ts +5 -0
- package/node_modules/ip-address/dist/common.js +12 -0
- package/node_modules/ip-address/dist/common.js.map +1 -1
- package/node_modules/ip-address/dist/ipv4.d.ts +5 -1
- package/node_modules/ip-address/dist/ipv4.js +12 -1
- package/node_modules/ip-address/dist/ipv4.js.map +1 -1
- package/node_modules/ip-address/dist/ipv6.d.ts +5 -1
- package/node_modules/ip-address/dist/ipv6.js +15 -1
- package/node_modules/ip-address/dist/ipv6.js.map +1 -1
- package/node_modules/ip-address/package.json +1 -1
- package/node_modules/proxy-addr/HISTORY.md +60 -54
- package/node_modules/proxy-addr/README.md +1 -1
- package/node_modules/proxy-addr/index.js +32 -0
- package/node_modules/proxy-addr/package.json +8 -4
- package/node_modules/undici-types/agent.d.ts +12 -13
- package/node_modules/undici-types/api.d.ts +26 -26
- package/node_modules/undici-types/balanced-pool.d.ts +13 -12
- package/node_modules/undici-types/cache-interceptor.d.ts +179 -0
- package/node_modules/undici-types/client-stats.d.ts +15 -0
- package/node_modules/undici-types/client.d.ts +63 -37
- package/node_modules/undici-types/connector.d.ts +5 -2
- package/node_modules/undici-types/cookies.d.ts +3 -1
- package/node_modules/undici-types/diagnostics-channel.d.ts +18 -10
- package/node_modules/undici-types/dispatcher.d.ts +136 -139
- package/node_modules/undici-types/dispatcher1-wrapper.d.ts +7 -0
- package/node_modules/undici-types/env-http-proxy-agent.d.ts +4 -3
- package/node_modules/undici-types/errors.d.ts +92 -54
- package/node_modules/undici-types/eventsource.d.ts +9 -4
- package/node_modules/undici-types/fetch.d.ts +51 -25
- package/node_modules/undici-types/formdata.d.ts +7 -7
- package/node_modules/undici-types/global-dispatcher.d.ts +4 -4
- package/node_modules/undici-types/global-origin.d.ts +5 -5
- package/node_modules/undici-types/h2c-client.d.ts +73 -0
- package/node_modules/undici-types/handlers.d.ts +10 -9
- package/node_modules/undici-types/header.d.ts +162 -1
- package/node_modules/undici-types/index.d.ts +69 -47
- package/node_modules/undici-types/interceptors.d.ts +72 -9
- package/node_modules/undici-types/mock-agent.d.ts +36 -18
- package/node_modules/undici-types/mock-call-history.d.ts +111 -0
- package/node_modules/undici-types/mock-client.d.ts +6 -4
- package/node_modules/undici-types/mock-errors.d.ts +3 -3
- package/node_modules/undici-types/mock-interceptor.d.ts +26 -21
- package/node_modules/undici-types/mock-pool.d.ts +6 -4
- package/node_modules/undici-types/package.json +1 -1
- package/node_modules/undici-types/patch.d.ts +0 -4
- package/node_modules/undici-types/pool-stats.d.ts +8 -8
- package/node_modules/undici-types/pool.d.ts +14 -14
- package/node_modules/undici-types/proxy-agent.d.ts +14 -6
- package/node_modules/undici-types/readable.d.ts +19 -16
- package/node_modules/undici-types/retry-agent.d.ts +1 -1
- package/node_modules/undici-types/retry-handler.d.ts +19 -10
- package/node_modules/undici-types/round-robin-pool.d.ts +39 -0
- package/node_modules/undici-types/snapshot-agent.d.ts +113 -0
- package/node_modules/undici-types/socks5-proxy-agent.d.ts +25 -0
- package/node_modules/undici-types/util.d.ts +3 -3
- package/node_modules/undici-types/utility.d.ts +7 -0
- package/node_modules/undici-types/webidl.d.ts +148 -30
- package/node_modules/undici-types/websocket.d.ts +48 -10
- package/node_modules/zod/README.md +2 -2
- package/node_modules/zod/package.json +1 -1
- package/node_modules/zod/src/v4/classic/checks.ts +1 -0
- package/node_modules/zod/src/v4/classic/schemas.ts +14 -30
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +1 -0
- package/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +2 -11
- package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +0 -4
- package/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +22 -0
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +1 -1
- package/node_modules/zod/src/v4/classic/tests/number.test.ts +39 -0
- package/node_modules/zod/src/v4/classic/tests/properties.test.ts +53 -137
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +70 -1
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +87 -35
- package/node_modules/zod/src/v4/core/api.ts +21 -29
- package/node_modules/zod/src/v4/core/checks.ts +61 -1
- package/node_modules/zod/src/v4/core/compile.ts +35 -24
- package/node_modules/zod/src/v4/core/core.ts +1 -3
- package/node_modules/zod/src/v4/core/json-schema-processors.ts +9 -63
- package/node_modules/zod/src/v4/core/memoizer.ts +2 -5
- package/node_modules/zod/src/v4/core/regexes.ts +4 -0
- package/node_modules/zod/src/v4/core/schemas.ts +36 -109
- package/node_modules/zod/src/v4/core/tests/compile-differential.test.ts +35 -0
- package/node_modules/zod/src/v4/core/tests/compile.test.ts +177 -0
- package/node_modules/zod/src/v4/core/tests/url-no-canparse.test.ts +118 -16
- package/node_modules/zod/src/v4/core/to-json-schema.ts +1 -1
- package/node_modules/zod/src/v4/core/util.ts +0 -4
- package/node_modules/zod/src/v4/core/versions.ts +1 -1
- package/node_modules/zod/src/v4/core/visit.ts +0 -11
- package/node_modules/zod/src/v4/locales/ar.ts +1 -0
- package/node_modules/zod/src/v4/locales/az.ts +1 -0
- package/node_modules/zod/src/v4/locales/be.ts +1 -0
- package/node_modules/zod/src/v4/locales/bg.ts +1 -0
- package/node_modules/zod/src/v4/locales/bn.ts +1 -0
- package/node_modules/zod/src/v4/locales/ca.ts +1 -0
- package/node_modules/zod/src/v4/locales/ckb.ts +1 -0
- package/node_modules/zod/src/v4/locales/cs.ts +1 -0
- package/node_modules/zod/src/v4/locales/da.ts +1 -0
- package/node_modules/zod/src/v4/locales/de.ts +1 -0
- package/node_modules/zod/src/v4/locales/el.ts +1 -0
- package/node_modules/zod/src/v4/locales/en.ts +1 -0
- package/node_modules/zod/src/v4/locales/eo.ts +1 -0
- package/node_modules/zod/src/v4/locales/es.ts +1 -0
- package/node_modules/zod/src/v4/locales/fa.ts +1 -0
- package/node_modules/zod/src/v4/locales/fi.ts +1 -0
- package/node_modules/zod/src/v4/locales/fr-CA.ts +1 -0
- package/node_modules/zod/src/v4/locales/fr.ts +1 -0
- package/node_modules/zod/src/v4/locales/gu.ts +1 -0
- package/node_modules/zod/src/v4/locales/he.ts +1 -0
- package/node_modules/zod/src/v4/locales/hi.ts +1 -0
- package/node_modules/zod/src/v4/locales/hr.ts +1 -0
- package/node_modules/zod/src/v4/locales/hu.ts +1 -0
- package/node_modules/zod/src/v4/locales/hy.ts +1 -0
- package/node_modules/zod/src/v4/locales/id.ts +1 -0
- package/node_modules/zod/src/v4/locales/is.ts +1 -0
- package/node_modules/zod/src/v4/locales/it.ts +1 -0
- package/node_modules/zod/src/v4/locales/ja.ts +1 -0
- package/node_modules/zod/src/v4/locales/ka.ts +1 -0
- package/node_modules/zod/src/v4/locales/km.ts +1 -0
- package/node_modules/zod/src/v4/locales/kn.ts +1 -0
- package/node_modules/zod/src/v4/locales/ko.ts +1 -0
- package/node_modules/zod/src/v4/locales/lt.ts +1 -0
- package/node_modules/zod/src/v4/locales/mk.ts +1 -0
- package/node_modules/zod/src/v4/locales/ms.ts +1 -0
- package/node_modules/zod/src/v4/locales/ne.ts +1 -0
- package/node_modules/zod/src/v4/locales/nl.ts +1 -0
- package/node_modules/zod/src/v4/locales/nn.ts +1 -0
- package/node_modules/zod/src/v4/locales/no.ts +1 -0
- package/node_modules/zod/src/v4/locales/ota.ts +1 -0
- package/node_modules/zod/src/v4/locales/pl.ts +1 -0
- package/node_modules/zod/src/v4/locales/ps.ts +1 -0
- package/node_modules/zod/src/v4/locales/pt-BR.ts +1 -0
- package/node_modules/zod/src/v4/locales/pt.ts +1 -0
- package/node_modules/zod/src/v4/locales/ro.ts +1 -0
- package/node_modules/zod/src/v4/locales/ru.ts +1 -0
- package/node_modules/zod/src/v4/locales/sk.ts +1 -0
- package/node_modules/zod/src/v4/locales/sl.ts +1 -0
- package/node_modules/zod/src/v4/locales/sv.ts +1 -0
- package/node_modules/zod/src/v4/locales/ta.ts +1 -0
- package/node_modules/zod/src/v4/locales/tg.ts +1 -0
- package/node_modules/zod/src/v4/locales/th.ts +1 -0
- package/node_modules/zod/src/v4/locales/tk.ts +1 -0
- package/node_modules/zod/src/v4/locales/tr.ts +1 -0
- package/node_modules/zod/src/v4/locales/uk.ts +1 -0
- package/node_modules/zod/src/v4/locales/ur.ts +1 -0
- package/node_modules/zod/src/v4/locales/uz.ts +1 -0
- package/node_modules/zod/src/v4/locales/vi.ts +1 -0
- package/node_modules/zod/src/v4/locales/yo.ts +1 -0
- package/node_modules/zod/src/v4/locales/zh-CN.ts +1 -0
- package/node_modules/zod/src/v4/locales/zh-TW.ts +1 -0
- package/node_modules/zod/src/v4/mini/checks.ts +1 -0
- package/node_modules/zod/src/v4/mini/schemas.ts +12 -23
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +56 -0
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +7 -0
- package/node_modules/zod/v4/classic/checks.cjs +2 -1
- package/node_modules/zod/v4/classic/checks.d.cts +1 -1
- package/node_modules/zod/v4/classic/checks.d.ts +1 -1
- package/node_modules/zod/v4/classic/checks.js +1 -1
- package/node_modules/zod/v4/classic/schemas.cjs +11 -15
- package/node_modules/zod/v4/classic/schemas.d.cts +4 -6
- package/node_modules/zod/v4/classic/schemas.d.ts +4 -6
- package/node_modules/zod/v4/classic/schemas.js +9 -13
- package/node_modules/zod/v4/core/api.cjs +11 -23
- package/node_modules/zod/v4/core/api.d.cts +8 -4
- package/node_modules/zod/v4/core/api.d.ts +8 -4
- package/node_modules/zod/v4/core/api.js +11 -23
- package/node_modules/zod/v4/core/checks.cjs +32 -1
- package/node_modules/zod/v4/core/checks.d.cts +16 -0
- package/node_modules/zod/v4/core/checks.d.ts +16 -0
- package/node_modules/zod/v4/core/checks.js +31 -0
- package/node_modules/zod/v4/core/compile.cjs +12 -17
- package/node_modules/zod/v4/core/compile.js +13 -18
- package/node_modules/zod/v4/core/core.cjs +1 -1
- package/node_modules/zod/v4/core/core.js +1 -1
- package/node_modules/zod/v4/core/json-schema-processors.cjs +8 -44
- package/node_modules/zod/v4/core/json-schema-processors.d.cts +0 -1
- package/node_modules/zod/v4/core/json-schema-processors.d.ts +0 -1
- package/node_modules/zod/v4/core/json-schema-processors.js +8 -43
- package/node_modules/zod/v4/core/memoizer.cjs +2 -5
- package/node_modules/zod/v4/core/memoizer.js +2 -5
- package/node_modules/zod/v4/core/regexes.cjs +4 -2
- package/node_modules/zod/v4/core/regexes.d.cts +1 -0
- package/node_modules/zod/v4/core/regexes.d.ts +1 -0
- package/node_modules/zod/v4/core/regexes.js +2 -0
- package/node_modules/zod/v4/core/schemas.cjs +33 -73
- package/node_modules/zod/v4/core/schemas.d.cts +7 -22
- package/node_modules/zod/v4/core/schemas.d.ts +7 -22
- package/node_modules/zod/v4/core/schemas.js +30 -72
- package/node_modules/zod/v4/core/to-json-schema.cjs +0 -1
- package/node_modules/zod/v4/core/to-json-schema.d.cts +0 -3
- package/node_modules/zod/v4/core/to-json-schema.d.ts +0 -3
- package/node_modules/zod/v4/core/to-json-schema.js +1 -1
- package/node_modules/zod/v4/core/util.cjs +0 -4
- package/node_modules/zod/v4/core/util.js +0 -4
- package/node_modules/zod/v4/core/versions.cjs +1 -1
- package/node_modules/zod/v4/core/versions.js +1 -1
- package/node_modules/zod/v4/core/visit.cjs +0 -12
- package/node_modules/zod/v4/core/visit.js +0 -12
- package/node_modules/zod/v4/locales/ar.cjs +1 -0
- package/node_modules/zod/v4/locales/ar.js +1 -0
- package/node_modules/zod/v4/locales/az.cjs +1 -0
- package/node_modules/zod/v4/locales/az.js +1 -0
- package/node_modules/zod/v4/locales/be.cjs +1 -0
- package/node_modules/zod/v4/locales/be.js +1 -0
- package/node_modules/zod/v4/locales/bg.cjs +1 -0
- package/node_modules/zod/v4/locales/bg.js +1 -0
- package/node_modules/zod/v4/locales/bn.cjs +1 -0
- package/node_modules/zod/v4/locales/bn.js +1 -0
- package/node_modules/zod/v4/locales/ca.cjs +1 -0
- package/node_modules/zod/v4/locales/ca.js +1 -0
- package/node_modules/zod/v4/locales/ckb.cjs +1 -0
- package/node_modules/zod/v4/locales/ckb.js +1 -0
- package/node_modules/zod/v4/locales/cs.cjs +1 -0
- package/node_modules/zod/v4/locales/cs.js +1 -0
- package/node_modules/zod/v4/locales/da.cjs +1 -0
- package/node_modules/zod/v4/locales/da.js +1 -0
- package/node_modules/zod/v4/locales/de.cjs +1 -0
- package/node_modules/zod/v4/locales/de.js +1 -0
- package/node_modules/zod/v4/locales/el.cjs +1 -0
- package/node_modules/zod/v4/locales/el.js +1 -0
- package/node_modules/zod/v4/locales/en.cjs +1 -0
- package/node_modules/zod/v4/locales/en.js +1 -0
- package/node_modules/zod/v4/locales/eo.cjs +1 -0
- package/node_modules/zod/v4/locales/eo.js +1 -0
- package/node_modules/zod/v4/locales/es.cjs +1 -0
- package/node_modules/zod/v4/locales/es.js +1 -0
- package/node_modules/zod/v4/locales/fa.cjs +1 -0
- package/node_modules/zod/v4/locales/fa.js +1 -0
- package/node_modules/zod/v4/locales/fi.cjs +1 -0
- package/node_modules/zod/v4/locales/fi.js +1 -0
- package/node_modules/zod/v4/locales/fr-CA.cjs +1 -0
- package/node_modules/zod/v4/locales/fr-CA.js +1 -0
- package/node_modules/zod/v4/locales/fr.cjs +1 -0
- package/node_modules/zod/v4/locales/fr.js +1 -0
- package/node_modules/zod/v4/locales/gu.cjs +1 -0
- package/node_modules/zod/v4/locales/gu.js +1 -0
- package/node_modules/zod/v4/locales/he.cjs +1 -0
- package/node_modules/zod/v4/locales/he.js +1 -0
- package/node_modules/zod/v4/locales/hi.cjs +1 -0
- package/node_modules/zod/v4/locales/hi.js +1 -0
- package/node_modules/zod/v4/locales/hr.cjs +1 -0
- package/node_modules/zod/v4/locales/hr.js +1 -0
- package/node_modules/zod/v4/locales/hu.cjs +1 -0
- package/node_modules/zod/v4/locales/hu.js +1 -0
- package/node_modules/zod/v4/locales/hy.cjs +1 -0
- package/node_modules/zod/v4/locales/hy.js +1 -0
- package/node_modules/zod/v4/locales/id.cjs +1 -0
- package/node_modules/zod/v4/locales/id.js +1 -0
- package/node_modules/zod/v4/locales/is.cjs +1 -0
- package/node_modules/zod/v4/locales/is.js +1 -0
- package/node_modules/zod/v4/locales/it.cjs +1 -0
- package/node_modules/zod/v4/locales/it.js +1 -0
- package/node_modules/zod/v4/locales/ja.cjs +1 -0
- package/node_modules/zod/v4/locales/ja.js +1 -0
- package/node_modules/zod/v4/locales/ka.cjs +1 -0
- package/node_modules/zod/v4/locales/ka.js +1 -0
- package/node_modules/zod/v4/locales/km.cjs +1 -0
- package/node_modules/zod/v4/locales/km.js +1 -0
- package/node_modules/zod/v4/locales/kn.cjs +1 -0
- package/node_modules/zod/v4/locales/kn.js +1 -0
- package/node_modules/zod/v4/locales/ko.cjs +1 -0
- package/node_modules/zod/v4/locales/ko.js +1 -0
- package/node_modules/zod/v4/locales/lt.cjs +1 -0
- package/node_modules/zod/v4/locales/lt.js +1 -0
- package/node_modules/zod/v4/locales/mk.cjs +1 -0
- package/node_modules/zod/v4/locales/mk.js +1 -0
- package/node_modules/zod/v4/locales/ms.cjs +1 -0
- package/node_modules/zod/v4/locales/ms.js +1 -0
- package/node_modules/zod/v4/locales/ne.cjs +1 -0
- package/node_modules/zod/v4/locales/ne.js +1 -0
- package/node_modules/zod/v4/locales/nl.cjs +1 -0
- package/node_modules/zod/v4/locales/nl.js +1 -0
- package/node_modules/zod/v4/locales/nn.cjs +1 -0
- package/node_modules/zod/v4/locales/nn.js +1 -0
- package/node_modules/zod/v4/locales/no.cjs +1 -0
- package/node_modules/zod/v4/locales/no.js +1 -0
- package/node_modules/zod/v4/locales/ota.cjs +1 -0
- package/node_modules/zod/v4/locales/ota.js +1 -0
- package/node_modules/zod/v4/locales/pl.cjs +1 -0
- package/node_modules/zod/v4/locales/pl.js +1 -0
- package/node_modules/zod/v4/locales/ps.cjs +1 -0
- package/node_modules/zod/v4/locales/ps.js +1 -0
- package/node_modules/zod/v4/locales/pt-BR.cjs +1 -0
- package/node_modules/zod/v4/locales/pt-BR.js +1 -0
- package/node_modules/zod/v4/locales/pt.cjs +1 -0
- package/node_modules/zod/v4/locales/pt.js +1 -0
- package/node_modules/zod/v4/locales/ro.cjs +1 -0
- package/node_modules/zod/v4/locales/ro.js +1 -0
- package/node_modules/zod/v4/locales/ru.cjs +1 -0
- package/node_modules/zod/v4/locales/ru.js +1 -0
- package/node_modules/zod/v4/locales/sk.cjs +1 -0
- package/node_modules/zod/v4/locales/sk.js +1 -0
- package/node_modules/zod/v4/locales/sl.cjs +1 -0
- package/node_modules/zod/v4/locales/sl.js +1 -0
- package/node_modules/zod/v4/locales/sv.cjs +1 -0
- package/node_modules/zod/v4/locales/sv.js +1 -0
- package/node_modules/zod/v4/locales/ta.cjs +1 -0
- package/node_modules/zod/v4/locales/ta.js +1 -0
- package/node_modules/zod/v4/locales/tg.cjs +1 -0
- package/node_modules/zod/v4/locales/tg.js +1 -0
- package/node_modules/zod/v4/locales/th.cjs +1 -0
- package/node_modules/zod/v4/locales/th.js +1 -0
- package/node_modules/zod/v4/locales/tk.cjs +1 -0
- package/node_modules/zod/v4/locales/tk.js +1 -0
- package/node_modules/zod/v4/locales/tr.cjs +1 -0
- package/node_modules/zod/v4/locales/tr.js +1 -0
- package/node_modules/zod/v4/locales/uk.cjs +1 -0
- package/node_modules/zod/v4/locales/uk.js +1 -0
- package/node_modules/zod/v4/locales/ur.cjs +1 -0
- package/node_modules/zod/v4/locales/ur.js +1 -0
- package/node_modules/zod/v4/locales/uz.cjs +1 -0
- package/node_modules/zod/v4/locales/uz.js +1 -0
- package/node_modules/zod/v4/locales/vi.cjs +1 -0
- package/node_modules/zod/v4/locales/vi.js +1 -0
- package/node_modules/zod/v4/locales/yo.cjs +1 -0
- package/node_modules/zod/v4/locales/yo.js +1 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +1 -0
- package/node_modules/zod/v4/locales/zh-CN.js +1 -0
- package/node_modules/zod/v4/locales/zh-TW.cjs +1 -0
- package/node_modules/zod/v4/locales/zh-TW.js +1 -0
- package/node_modules/zod/v4/mini/checks.cjs +2 -1
- package/node_modules/zod/v4/mini/checks.d.cts +1 -1
- package/node_modules/zod/v4/mini/checks.d.ts +1 -1
- package/node_modules/zod/v4/mini/checks.js +1 -1
- package/node_modules/zod/v4/mini/schemas.cjs +11 -13
- package/node_modules/zod/v4/mini/schemas.d.cts +1 -4
- package/node_modules/zod/v4/mini/schemas.d.ts +1 -4
- package/node_modules/zod/v4/mini/schemas.js +9 -11
- package/package.json +2 -2
- package/slingshot/index.js +268 -264
- package/node_modules/@types/node/compatibility/disposable.d.ts +0 -14
- package/node_modules/@types/node/compatibility/index.d.ts +0 -9
- package/node_modules/@types/node/compatibility/indexable.d.ts +0 -20
- package/node_modules/@types/node/compatibility/iterators.d.ts +0 -20
- package/node_modules/undici-types/file.d.ts +0 -39
- package/node_modules/undici-types/filereader.d.ts +0 -54
|
@@ -1,144 +1,150 @@
|
|
|
1
|
-
2.0.
|
|
2
|
-
|
|
1
|
+
2.0.8
|
|
2
|
+
=====
|
|
3
|
+
|
|
4
|
+
* Fix [CVE-2026-90711](https://www.cve.org/CVERecord?id=CVE-2026-90711) ([GHSA-jqcg-44mw-7w3h](https://github.com/jshttp/proxy-addr/security/advisories/GHSA-jqcg-44mw-7w3h))
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
2.0.7
|
|
8
|
+
=====
|
|
3
9
|
|
|
4
10
|
* deps: forwarded@0.2.0
|
|
5
11
|
- Use `req.socket` over deprecated `req.connection`
|
|
6
12
|
|
|
7
|
-
2.0.6
|
|
8
|
-
|
|
13
|
+
2.0.6
|
|
14
|
+
=====
|
|
9
15
|
|
|
10
16
|
* deps: ipaddr.js@1.9.1
|
|
11
17
|
|
|
12
|
-
2.0.5
|
|
13
|
-
|
|
18
|
+
2.0.5
|
|
19
|
+
=====
|
|
14
20
|
|
|
15
21
|
* deps: ipaddr.js@1.9.0
|
|
16
22
|
|
|
17
|
-
2.0.4
|
|
18
|
-
|
|
23
|
+
2.0.4
|
|
24
|
+
=====
|
|
19
25
|
|
|
20
26
|
* deps: ipaddr.js@1.8.0
|
|
21
27
|
|
|
22
|
-
2.0.3
|
|
23
|
-
|
|
28
|
+
2.0.3
|
|
29
|
+
=====
|
|
24
30
|
|
|
25
31
|
* deps: ipaddr.js@1.6.0
|
|
26
32
|
|
|
27
|
-
2.0.2
|
|
28
|
-
|
|
33
|
+
2.0.2
|
|
34
|
+
=====
|
|
29
35
|
|
|
30
36
|
* deps: forwarded@~0.1.2
|
|
31
37
|
- perf: improve header parsing
|
|
32
38
|
- perf: reduce overhead when no `X-Forwarded-For` header
|
|
33
39
|
|
|
34
|
-
2.0.1
|
|
35
|
-
|
|
40
|
+
2.0.1
|
|
41
|
+
=====
|
|
36
42
|
|
|
37
43
|
* deps: forwarded@~0.1.1
|
|
38
44
|
- Fix trimming leading / trailing OWS
|
|
39
45
|
- perf: hoist regular expression
|
|
40
46
|
* deps: ipaddr.js@1.5.2
|
|
41
47
|
|
|
42
|
-
2.0.0
|
|
43
|
-
|
|
48
|
+
2.0.0
|
|
49
|
+
=====
|
|
44
50
|
|
|
45
51
|
* Drop support for Node.js below 0.10
|
|
46
52
|
|
|
47
|
-
1.1.5
|
|
48
|
-
|
|
53
|
+
1.1.5
|
|
54
|
+
=====
|
|
49
55
|
|
|
50
56
|
* Fix array argument being altered
|
|
51
57
|
* deps: ipaddr.js@1.4.0
|
|
52
58
|
|
|
53
|
-
1.1.4
|
|
54
|
-
|
|
59
|
+
1.1.4
|
|
60
|
+
=====
|
|
55
61
|
|
|
56
62
|
* deps: ipaddr.js@1.3.0
|
|
57
63
|
|
|
58
|
-
1.1.3
|
|
59
|
-
|
|
64
|
+
1.1.3
|
|
65
|
+
=====
|
|
60
66
|
|
|
61
67
|
* deps: ipaddr.js@1.2.0
|
|
62
68
|
|
|
63
|
-
1.1.2
|
|
64
|
-
|
|
69
|
+
1.1.2
|
|
70
|
+
=====
|
|
65
71
|
|
|
66
72
|
* deps: ipaddr.js@1.1.1
|
|
67
73
|
- Fix IPv6-mapped IPv4 validation edge cases
|
|
68
74
|
|
|
69
|
-
1.1.1
|
|
70
|
-
|
|
75
|
+
1.1.1
|
|
76
|
+
=====
|
|
71
77
|
|
|
72
78
|
* Fix regression matching mixed versions against multiple subnets
|
|
73
79
|
|
|
74
|
-
1.1.0
|
|
75
|
-
|
|
80
|
+
1.1.0
|
|
81
|
+
=====
|
|
76
82
|
|
|
77
83
|
* Fix accepting various invalid netmasks
|
|
78
84
|
- IPv4 netmasks must be contingous
|
|
79
85
|
- IPv6 addresses cannot be used as a netmask
|
|
80
86
|
* deps: ipaddr.js@1.1.0
|
|
81
87
|
|
|
82
|
-
1.0.10
|
|
83
|
-
|
|
88
|
+
1.0.10
|
|
89
|
+
======
|
|
84
90
|
|
|
85
91
|
* deps: ipaddr.js@1.0.5
|
|
86
92
|
- Fix regression in `isValid` with non-string arguments
|
|
87
93
|
|
|
88
|
-
1.0.9
|
|
89
|
-
|
|
94
|
+
1.0.9
|
|
95
|
+
=====
|
|
90
96
|
|
|
91
97
|
* deps: ipaddr.js@1.0.4
|
|
92
98
|
- Fix accepting some invalid IPv6 addresses
|
|
93
99
|
- Reject CIDRs with negative or overlong masks
|
|
94
100
|
* perf: enable strict mode
|
|
95
101
|
|
|
96
|
-
1.0.8
|
|
97
|
-
|
|
102
|
+
1.0.8
|
|
103
|
+
=====
|
|
98
104
|
|
|
99
105
|
* deps: ipaddr.js@1.0.1
|
|
100
106
|
|
|
101
|
-
1.0.7
|
|
102
|
-
|
|
107
|
+
1.0.7
|
|
108
|
+
=====
|
|
103
109
|
|
|
104
110
|
* deps: ipaddr.js@0.1.9
|
|
105
111
|
- Fix OOM on certain inputs to `isValid`
|
|
106
112
|
|
|
107
|
-
1.0.6
|
|
108
|
-
|
|
113
|
+
1.0.6
|
|
114
|
+
=====
|
|
109
115
|
|
|
110
116
|
* deps: ipaddr.js@0.1.8
|
|
111
117
|
|
|
112
|
-
1.0.5
|
|
113
|
-
|
|
118
|
+
1.0.5
|
|
119
|
+
=====
|
|
114
120
|
|
|
115
121
|
* deps: ipaddr.js@0.1.6
|
|
116
122
|
|
|
117
|
-
1.0.4
|
|
118
|
-
|
|
123
|
+
1.0.4
|
|
124
|
+
=====
|
|
119
125
|
|
|
120
126
|
* deps: ipaddr.js@0.1.5
|
|
121
127
|
- Fix edge cases with `isValid`
|
|
122
128
|
|
|
123
|
-
1.0.3
|
|
124
|
-
|
|
129
|
+
1.0.3
|
|
130
|
+
=====
|
|
125
131
|
|
|
126
132
|
* Use `forwarded` npm module
|
|
127
133
|
|
|
128
|
-
1.0.2
|
|
129
|
-
|
|
134
|
+
1.0.2
|
|
135
|
+
=====
|
|
130
136
|
|
|
131
137
|
* Fix a global leak when multiple subnets are trusted
|
|
132
138
|
* Support Node.js 0.6
|
|
133
139
|
* deps: ipaddr.js@0.1.3
|
|
134
140
|
|
|
135
|
-
1.0.1
|
|
136
|
-
|
|
141
|
+
1.0.1
|
|
142
|
+
=====
|
|
137
143
|
|
|
138
144
|
* Fix links in npm package
|
|
139
145
|
|
|
140
|
-
1.0.0
|
|
141
|
-
|
|
146
|
+
1.0.0
|
|
147
|
+
=====
|
|
142
148
|
|
|
143
149
|
* Add `trust` argument to determine proxy trust on
|
|
144
150
|
* Accepts custom function
|
|
@@ -150,12 +156,12 @@
|
|
|
150
156
|
* Add `proxyaddr.compile` to pre-compile `trust` function
|
|
151
157
|
to make subsequent calls faster
|
|
152
158
|
|
|
153
|
-
0.0.1
|
|
154
|
-
|
|
159
|
+
0.0.1
|
|
160
|
+
=====
|
|
155
161
|
|
|
156
162
|
* Fix bad npm publish
|
|
157
163
|
|
|
158
|
-
0.0.0
|
|
159
|
-
|
|
164
|
+
0.0.0
|
|
165
|
+
=====
|
|
160
166
|
|
|
161
167
|
* Initial release
|
|
@@ -37,7 +37,7 @@ proxyaddr(req, function (addr) { return addr === '127.0.0.1' })
|
|
|
37
37
|
proxyaddr(req, function (addr, i) { return i < 1 })
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
-
The `trust`
|
|
40
|
+
The `trust` argument may also be a single IP address string or an
|
|
41
41
|
array of trusted addresses, as plain IP addresses, CIDR-formatted
|
|
42
42
|
strings, or IP/netmask strings.
|
|
43
43
|
|
|
@@ -256,6 +256,13 @@ function trustMulti (subnets) {
|
|
|
256
256
|
if (!isip(addr)) return false
|
|
257
257
|
|
|
258
258
|
var ip = parseip(addr)
|
|
259
|
+
|
|
260
|
+
if (ip.kind() === 'ipv6' && ip.isIPv4MappedAddress()) {
|
|
261
|
+
// Canonicalize IPv4-mapped candidates to IPv4 so a mapped address
|
|
262
|
+
// cannot bypass the cross-family guard via the same-family path
|
|
263
|
+
ip = ip.toIPv4Address()
|
|
264
|
+
}
|
|
265
|
+
|
|
259
266
|
var ipconv
|
|
260
267
|
var kind = ip.kind()
|
|
261
268
|
|
|
@@ -272,6 +279,12 @@ function trustMulti (subnets) {
|
|
|
272
279
|
continue
|
|
273
280
|
}
|
|
274
281
|
|
|
282
|
+
if (subnetkind !== 'ipv4' && !(subnetrange >= 96 && subnetip.isIPv4MappedAddress())) {
|
|
283
|
+
// IPv6 subnet only spans IPv4 when it is a mapped subnet whose
|
|
284
|
+
// prefix covers the ::ffff: marker; otherwise it must not match IPv4
|
|
285
|
+
continue
|
|
286
|
+
}
|
|
287
|
+
|
|
275
288
|
if (!ipconv) {
|
|
276
289
|
// Convert IP to match subnet IP kind
|
|
277
290
|
ipconv = subnetkind === 'ipv4'
|
|
@@ -280,6 +293,9 @@ function trustMulti (subnets) {
|
|
|
280
293
|
}
|
|
281
294
|
|
|
282
295
|
trusted = ipconv
|
|
296
|
+
} else if (kind === 'ipv6' && subnetip.isIPv4MappedAddress()) {
|
|
297
|
+
// A native IPv6 candidate cannot match an IPv4-mapped subnet
|
|
298
|
+
continue
|
|
283
299
|
}
|
|
284
300
|
|
|
285
301
|
if (trusted.match(subnetip, subnetrange)) {
|
|
@@ -308,6 +324,13 @@ function trustSingle (subnet) {
|
|
|
308
324
|
if (!isip(addr)) return false
|
|
309
325
|
|
|
310
326
|
var ip = parseip(addr)
|
|
327
|
+
|
|
328
|
+
if (ip.kind() === 'ipv6' && ip.isIPv4MappedAddress()) {
|
|
329
|
+
// Canonicalize IPv4-mapped candidates to IPv4 so a mapped address
|
|
330
|
+
// cannot bypass the cross-family guard via the same-family path
|
|
331
|
+
ip = ip.toIPv4Address()
|
|
332
|
+
}
|
|
333
|
+
|
|
311
334
|
var kind = ip.kind()
|
|
312
335
|
|
|
313
336
|
if (kind !== subnetkind) {
|
|
@@ -316,10 +339,19 @@ function trustSingle (subnet) {
|
|
|
316
339
|
return false
|
|
317
340
|
}
|
|
318
341
|
|
|
342
|
+
if (!subnetisipv4 && !(subnetrange >= 96 && subnetip.isIPv4MappedAddress())) {
|
|
343
|
+
// IPv6 subnet only spans IPv4 when it is a mapped subnet whose
|
|
344
|
+
// prefix covers the ::ffff: marker; otherwise it must not match IPv4
|
|
345
|
+
return false
|
|
346
|
+
}
|
|
347
|
+
|
|
319
348
|
// Convert IP to match subnet IP kind
|
|
320
349
|
ip = subnetisipv4
|
|
321
350
|
? ip.toIPv4Address()
|
|
322
351
|
: ip.toIPv4MappedAddress()
|
|
352
|
+
} else if (kind === 'ipv6' && subnetip.isIPv4MappedAddress()) {
|
|
353
|
+
// A native IPv6 candidate cannot match an IPv4-mapped subnet
|
|
354
|
+
return false
|
|
323
355
|
}
|
|
324
356
|
|
|
325
357
|
return ip.match(subnetip, subnetrange)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "proxy-addr",
|
|
3
3
|
"description": "Determine address of proxied request",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.8",
|
|
5
5
|
"author": "Douglas Christopher Wilson <doug@somethingdoug.com>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"keywords": [
|
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
"x-forwarded-for"
|
|
11
11
|
],
|
|
12
12
|
"repository": "jshttp/proxy-addr",
|
|
13
|
+
"funding": {
|
|
14
|
+
"type": "opencollective",
|
|
15
|
+
"url": "https://opencollective.com/express"
|
|
16
|
+
},
|
|
13
17
|
"dependencies": {
|
|
14
18
|
"forwarded": "0.2.0",
|
|
15
19
|
"ipaddr.js": "1.9.1"
|
|
@@ -17,11 +21,11 @@
|
|
|
17
21
|
"devDependencies": {
|
|
18
22
|
"benchmark": "2.1.4",
|
|
19
23
|
"beautify-benchmark": "0.2.4",
|
|
20
|
-
"deep-equal": "1.
|
|
24
|
+
"deep-equal": "1.1.2",
|
|
21
25
|
"eslint": "7.26.0",
|
|
22
26
|
"eslint-config-standard": "14.1.1",
|
|
23
|
-
"eslint-plugin-import": "2.
|
|
24
|
-
"eslint-plugin-markdown": "2.2.
|
|
27
|
+
"eslint-plugin-import": "2.32.0",
|
|
28
|
+
"eslint-plugin-markdown": "2.2.1",
|
|
25
29
|
"eslint-plugin-node": "11.1.0",
|
|
26
30
|
"eslint-plugin-promise": "4.3.1",
|
|
27
31
|
"eslint-plugin-standard": "4.1.0",
|
|
@@ -1,31 +1,30 @@
|
|
|
1
|
-
import { URL } from 'url'
|
|
1
|
+
import { URL } from 'node:url'
|
|
2
2
|
import Pool from './pool'
|
|
3
|
-
import Dispatcher from
|
|
3
|
+
import Dispatcher from './dispatcher'
|
|
4
|
+
import TClientStats from './client-stats'
|
|
5
|
+
import TPoolStats from './pool-stats'
|
|
4
6
|
|
|
5
7
|
export default Agent
|
|
6
8
|
|
|
7
|
-
declare class Agent extends Dispatcher{
|
|
8
|
-
constructor(opts?: Agent.Options)
|
|
9
|
+
declare class Agent extends Dispatcher {
|
|
10
|
+
constructor (opts?: Agent.Options)
|
|
9
11
|
/** `true` after `dispatcher.close()` has been called. */
|
|
10
|
-
closed: boolean
|
|
12
|
+
closed: boolean
|
|
11
13
|
/** `true` after `dispatcher.destroyed()` has been called or `dispatcher.close()` has been called and the dispatcher shutdown has completed. */
|
|
12
|
-
destroyed: boolean
|
|
14
|
+
destroyed: boolean
|
|
13
15
|
/** Dispatches a request. */
|
|
14
|
-
dispatch(options: Agent.DispatchOptions, handler: Dispatcher.
|
|
16
|
+
dispatch (options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandler): boolean
|
|
17
|
+
/** Aggregate stats for a Agent by origin. */
|
|
18
|
+
readonly stats: Record<string, TClientStats | TPoolStats>
|
|
15
19
|
}
|
|
16
20
|
|
|
17
21
|
declare namespace Agent {
|
|
18
22
|
export interface Options extends Pool.Options {
|
|
19
23
|
/** Default: `(origin, opts) => new Pool(origin, opts)`. */
|
|
20
24
|
factory?(origin: string | URL, opts: Object): Dispatcher;
|
|
21
|
-
|
|
22
|
-
maxRedirections?: number;
|
|
23
|
-
|
|
24
|
-
interceptors?: { Agent?: readonly Dispatcher.DispatchInterceptor[] } & Pool.Options["interceptors"]
|
|
25
|
+
maxOrigins?: number
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
export interface DispatchOptions extends Dispatcher.DispatchOptions {
|
|
28
|
-
/** Integer. */
|
|
29
|
-
maxRedirections?: number;
|
|
30
29
|
}
|
|
31
30
|
}
|
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
import { URL, UrlObject } from 'url'
|
|
2
|
-
import { Duplex } from 'stream'
|
|
1
|
+
import { URL, UrlObject } from 'node:url'
|
|
2
|
+
import { Duplex } from 'node:stream'
|
|
3
3
|
import Dispatcher from './dispatcher'
|
|
4
4
|
|
|
5
|
-
export {
|
|
6
|
-
request,
|
|
7
|
-
stream,
|
|
8
|
-
pipeline,
|
|
9
|
-
connect,
|
|
10
|
-
upgrade,
|
|
11
|
-
}
|
|
12
|
-
|
|
13
5
|
/** Performs an HTTP request. */
|
|
14
|
-
declare function request(
|
|
6
|
+
declare function request<TOpaque = null> (
|
|
15
7
|
url: string | URL | UrlObject,
|
|
16
|
-
options?: { dispatcher?: Dispatcher } & Omit<Dispatcher.RequestOptions
|
|
17
|
-
): Promise<Dispatcher.ResponseData
|
|
8
|
+
options?: { dispatcher?: Dispatcher } & Omit<Dispatcher.RequestOptions<TOpaque>, 'origin' | 'path' | 'method'> & Partial<Pick<Dispatcher.RequestOptions, 'method'>>,
|
|
9
|
+
): Promise<Dispatcher.ResponseData<TOpaque>>
|
|
18
10
|
|
|
19
11
|
/** A faster version of `request`. */
|
|
20
|
-
declare function stream(
|
|
12
|
+
declare function stream<TOpaque = null> (
|
|
21
13
|
url: string | URL | UrlObject,
|
|
22
|
-
options: { dispatcher?: Dispatcher } & Omit<Dispatcher.RequestOptions
|
|
23
|
-
factory: Dispatcher.StreamFactory
|
|
24
|
-
): Promise<Dispatcher.StreamData
|
|
14
|
+
options: { dispatcher?: Dispatcher } & Omit<Dispatcher.RequestOptions<TOpaque>, 'origin' | 'path'>,
|
|
15
|
+
factory: Dispatcher.StreamFactory<TOpaque>
|
|
16
|
+
): Promise<Dispatcher.StreamData<TOpaque>>
|
|
25
17
|
|
|
26
18
|
/** For easy use with `stream.pipeline`. */
|
|
27
|
-
declare function pipeline(
|
|
19
|
+
declare function pipeline<TOpaque = null> (
|
|
28
20
|
url: string | URL | UrlObject,
|
|
29
|
-
options: { dispatcher?: Dispatcher } & Omit<Dispatcher.PipelineOptions
|
|
30
|
-
handler: Dispatcher.PipelineHandler
|
|
31
|
-
): Duplex
|
|
21
|
+
options: { dispatcher?: Dispatcher } & Omit<Dispatcher.PipelineOptions<TOpaque>, 'origin' | 'path'>,
|
|
22
|
+
handler: Dispatcher.PipelineHandler<TOpaque>
|
|
23
|
+
): Duplex
|
|
32
24
|
|
|
33
25
|
/** Starts two-way communications with the requested resource. */
|
|
34
|
-
declare function connect(
|
|
26
|
+
declare function connect<TOpaque = null> (
|
|
35
27
|
url: string | URL | UrlObject,
|
|
36
|
-
options?: { dispatcher?: Dispatcher } & Omit<Dispatcher.ConnectOptions
|
|
37
|
-
): Promise<Dispatcher.ConnectData
|
|
28
|
+
options?: { dispatcher?: Dispatcher } & Omit<Dispatcher.ConnectOptions<TOpaque>, 'origin' | 'path'>
|
|
29
|
+
): Promise<Dispatcher.ConnectData<TOpaque>>
|
|
38
30
|
|
|
39
31
|
/** Upgrade to a different protocol. */
|
|
40
|
-
declare function upgrade(
|
|
32
|
+
declare function upgrade (
|
|
41
33
|
url: string | URL | UrlObject,
|
|
42
34
|
options?: { dispatcher?: Dispatcher } & Omit<Dispatcher.UpgradeOptions, 'origin' | 'path'>
|
|
43
|
-
): Promise<Dispatcher.UpgradeData
|
|
35
|
+
): Promise<Dispatcher.UpgradeData>
|
|
36
|
+
|
|
37
|
+
export {
|
|
38
|
+
request,
|
|
39
|
+
stream,
|
|
40
|
+
pipeline,
|
|
41
|
+
connect,
|
|
42
|
+
upgrade
|
|
43
|
+
}
|
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
import Pool from './pool'
|
|
2
2
|
import Dispatcher from './dispatcher'
|
|
3
|
-
import { URL } from 'url'
|
|
3
|
+
import { URL } from 'node:url'
|
|
4
4
|
|
|
5
5
|
export default BalancedPool
|
|
6
6
|
|
|
7
|
-
type BalancedPoolConnectOptions = Omit<Dispatcher.ConnectOptions,
|
|
7
|
+
type BalancedPoolConnectOptions = Omit<Dispatcher.ConnectOptions, 'origin'>
|
|
8
8
|
|
|
9
9
|
declare class BalancedPool extends Dispatcher {
|
|
10
|
-
constructor(url: string | string[] | URL | URL[], options?: Pool.Options)
|
|
10
|
+
constructor (url: string | string[] | URL | URL[], options?: Pool.Options)
|
|
11
11
|
|
|
12
|
-
addUpstream(upstream: string | URL): BalancedPool
|
|
13
|
-
removeUpstream(upstream: string | URL): BalancedPool
|
|
14
|
-
|
|
12
|
+
addUpstream (upstream: string | URL): BalancedPool
|
|
13
|
+
removeUpstream (upstream: string | URL): BalancedPool
|
|
14
|
+
getUpstream (upstream: string | URL): Pool | undefined
|
|
15
|
+
upstreams: Array<string>
|
|
15
16
|
|
|
16
17
|
/** `true` after `pool.close()` has been called. */
|
|
17
|
-
closed: boolean
|
|
18
|
+
closed: boolean
|
|
18
19
|
/** `true` after `pool.destroyed()` has been called or `pool.close()` has been called and the pool shutdown has completed. */
|
|
19
|
-
destroyed: boolean
|
|
20
|
+
destroyed: boolean
|
|
20
21
|
|
|
21
22
|
// Override dispatcher APIs.
|
|
22
|
-
override connect(
|
|
23
|
+
override connect (
|
|
23
24
|
options: BalancedPoolConnectOptions
|
|
24
|
-
): Promise<Dispatcher.ConnectData
|
|
25
|
-
override connect(
|
|
25
|
+
): Promise<Dispatcher.ConnectData>
|
|
26
|
+
override connect (
|
|
26
27
|
options: BalancedPoolConnectOptions,
|
|
27
28
|
callback: (err: Error | null, data: Dispatcher.ConnectData) => void
|
|
28
|
-
): void
|
|
29
|
+
): void
|
|
29
30
|
}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { Readable, Writable } from 'node:stream'
|
|
2
|
+
|
|
3
|
+
export default CacheHandler
|
|
4
|
+
|
|
5
|
+
declare namespace CacheHandler {
|
|
6
|
+
export type CacheMethods = 'GET' | 'HEAD' | 'OPTIONS' | 'TRACE'
|
|
7
|
+
|
|
8
|
+
export interface CacheHandlerOptions {
|
|
9
|
+
store: CacheStore
|
|
10
|
+
|
|
11
|
+
cacheByDefault?: number
|
|
12
|
+
|
|
13
|
+
type?: CacheOptions['type']
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface CacheOptions {
|
|
17
|
+
store?: CacheStore
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The methods to cache
|
|
21
|
+
* Note we can only cache safe methods. Unsafe methods (i.e. PUT, POST)
|
|
22
|
+
* invalidate the cache for a origin.
|
|
23
|
+
* @see https://www.rfc-editor.org/rfc/rfc9111.html#name-invalidating-stored-respons
|
|
24
|
+
* @see https://www.rfc-editor.org/rfc/rfc9110#section-9.2.1
|
|
25
|
+
*/
|
|
26
|
+
methods?: CacheMethods[]
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* RFC9111 allows for caching responses that we aren't explicitly told to
|
|
30
|
+
* cache or to not cache.
|
|
31
|
+
* @see https://www.rfc-editor.org/rfc/rfc9111.html#section-3-5
|
|
32
|
+
* @default undefined
|
|
33
|
+
*/
|
|
34
|
+
cacheByDefault?: number
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* TODO docs
|
|
38
|
+
* @default 'shared'
|
|
39
|
+
*/
|
|
40
|
+
type?: 'shared' | 'private'
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Array of origins to cache. Only requests to these origins will be cached.
|
|
44
|
+
* Supports strings (case insensitive) and RegExp patterns.
|
|
45
|
+
* @default undefined (cache all origins)
|
|
46
|
+
*/
|
|
47
|
+
origins?: (string | RegExp)[]
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface CacheControlDirectives {
|
|
51
|
+
'max-stale'?: number;
|
|
52
|
+
'min-fresh'?: number;
|
|
53
|
+
'max-age'?: number;
|
|
54
|
+
's-maxage'?: number;
|
|
55
|
+
'stale-while-revalidate'?: number;
|
|
56
|
+
'stale-if-error'?: number;
|
|
57
|
+
public?: true;
|
|
58
|
+
private?: true | string[];
|
|
59
|
+
'no-store'?: true;
|
|
60
|
+
'no-cache'?: true | string[];
|
|
61
|
+
'must-revalidate'?: true;
|
|
62
|
+
'proxy-revalidate'?: true;
|
|
63
|
+
immutable?: true;
|
|
64
|
+
'no-transform'?: true;
|
|
65
|
+
'must-understand'?: true;
|
|
66
|
+
'only-if-cached'?: true;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export interface CacheKey {
|
|
70
|
+
origin: string
|
|
71
|
+
method: string
|
|
72
|
+
path: string
|
|
73
|
+
headers?: Record<string, string | string[]>
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export interface CacheValue {
|
|
77
|
+
statusCode: number
|
|
78
|
+
statusMessage: string
|
|
79
|
+
headers: Record<string, string | string[]>
|
|
80
|
+
vary?: Record<string, string | string[] | null>
|
|
81
|
+
etag?: string
|
|
82
|
+
cacheControlDirectives?: CacheControlDirectives
|
|
83
|
+
cachedAt: number
|
|
84
|
+
staleAt: number
|
|
85
|
+
deleteAt: number
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export interface DeleteByUri {
|
|
89
|
+
origin: string
|
|
90
|
+
method: string
|
|
91
|
+
path: string
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
type GetResult = {
|
|
95
|
+
statusCode: number
|
|
96
|
+
statusMessage: string
|
|
97
|
+
headers: Record<string, string | string[]>
|
|
98
|
+
vary?: Record<string, string | string[] | null>
|
|
99
|
+
etag?: string
|
|
100
|
+
body?: Readable | Iterable<Buffer> | AsyncIterable<Buffer> | Buffer | Iterable<string> | AsyncIterable<string> | string
|
|
101
|
+
cacheControlDirectives: CacheControlDirectives,
|
|
102
|
+
cachedAt: number
|
|
103
|
+
staleAt: number
|
|
104
|
+
deleteAt: number
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Underlying storage provider for cached responses
|
|
109
|
+
*/
|
|
110
|
+
export interface CacheStore {
|
|
111
|
+
get(key: CacheKey): GetResult | Promise<GetResult | undefined> | undefined
|
|
112
|
+
|
|
113
|
+
createWriteStream(key: CacheKey, val: CacheValue): Writable | undefined
|
|
114
|
+
|
|
115
|
+
delete(key: CacheKey): void | Promise<void>
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export interface MemoryCacheStoreOpts {
|
|
119
|
+
/**
|
|
120
|
+
* @default Infinity
|
|
121
|
+
*/
|
|
122
|
+
maxCount?: number
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* @default Infinity
|
|
126
|
+
*/
|
|
127
|
+
maxSize?: number
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* @default Infinity
|
|
131
|
+
*/
|
|
132
|
+
maxEntrySize?: number
|
|
133
|
+
|
|
134
|
+
errorCallback?: (err: Error) => void
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export class MemoryCacheStore implements CacheStore {
|
|
138
|
+
constructor (opts?: MemoryCacheStoreOpts)
|
|
139
|
+
|
|
140
|
+
get (key: CacheKey): GetResult | Promise<GetResult | undefined> | undefined
|
|
141
|
+
|
|
142
|
+
createWriteStream (key: CacheKey, value: CacheValue): Writable | undefined
|
|
143
|
+
|
|
144
|
+
delete (key: CacheKey): void | Promise<void>
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export interface SqliteCacheStoreOpts {
|
|
148
|
+
/**
|
|
149
|
+
* Location of the database
|
|
150
|
+
* @default ':memory:'
|
|
151
|
+
*/
|
|
152
|
+
location?: string
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* @default Infinity
|
|
156
|
+
*/
|
|
157
|
+
maxCount?: number
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* @default Infinity
|
|
161
|
+
*/
|
|
162
|
+
maxEntrySize?: number
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export class SqliteCacheStore implements CacheStore {
|
|
166
|
+
constructor (opts?: SqliteCacheStoreOpts)
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Closes the connection to the database
|
|
170
|
+
*/
|
|
171
|
+
close (): void
|
|
172
|
+
|
|
173
|
+
get (key: CacheKey): GetResult | Promise<GetResult | undefined> | undefined
|
|
174
|
+
|
|
175
|
+
createWriteStream (key: CacheKey, value: CacheValue): Writable | undefined
|
|
176
|
+
|
|
177
|
+
delete (key: CacheKey): void | Promise<void>
|
|
178
|
+
}
|
|
179
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import Client from './client'
|
|
2
|
+
|
|
3
|
+
export default ClientStats
|
|
4
|
+
|
|
5
|
+
declare class ClientStats {
|
|
6
|
+
constructor (pool: Client)
|
|
7
|
+
/** If socket has open connection. */
|
|
8
|
+
connected: boolean
|
|
9
|
+
/** Number of open socket connections in this client that do not have an active request. */
|
|
10
|
+
pending: number
|
|
11
|
+
/** Number of currently active requests of this client. */
|
|
12
|
+
running: number
|
|
13
|
+
/** Number of active, pending, or queued requests of this client. */
|
|
14
|
+
size: number
|
|
15
|
+
}
|