@runlith/tagma 0.0.0-stage → 0.2.3
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/adapter/claudeHooks.d.ts +10 -0
- package/adapter/claudeHooks.js +4 -0
- package/adapter/declaration.d.ts +14 -0
- package/adapter/declaration.js +2 -0
- package/adapter/harness.d.ts +454 -0
- package/adapter/harness.js +2 -0
- package/adapter/hook.d.ts +43 -0
- package/adapter/hook.js +2 -0
- package/adapter/hostModules.d.ts +19 -0
- package/adapter/hostModules.js +2 -0
- package/adapter/loader.d.ts +10 -0
- package/adapter/loader.js +2 -0
- package/adapter/metadata.d.ts +179 -0
- package/adapter/metadata.js +4 -0
- package/adapter/payload.d.ts +19 -0
- package/adapter/payload.js +3 -0
- package/adapter/provider.d.ts +209 -0
- package/adapter/provider.js +2 -0
- package/adapter/settings.d.ts +182 -0
- package/adapter/settings.js +2 -0
- package/adapter/speech.d.ts +4 -0
- package/adapter/speech.js +2 -0
- package/host.d.ts +61223 -0
- package/package.json +134 -3
- package/plugin/Held-cvetk2wg.js +6 -0
- package/plugin/accountKey-t44g9avw.js +2 -0
- package/plugin/adapter-qdnpxs6n.js +1 -0
- package/plugin/anthropic-a4pdzrv2.js +2 -0
- package/plugin/anthropic-messages-svq0svwe.js +2 -0
- package/plugin/anthropic-q1xa9n0j.js +2 -0
- package/plugin/auth-cp8wnd0z.js +2 -0
- package/plugin/authStatus-d6scztz5.js +2 -0
- package/plugin/bundling.d.ts +30 -0
- package/plugin/bundling.js +2 -0
- package/plugin/cacheLifetime-c5mpw676.js +2 -0
- package/plugin/callback-server-q2asby82.js +16 -0
- package/plugin/capabilities-jfhf61dt.js +2 -0
- package/plugin/claudeHooks-edpg1e46.js +3 -0
- package/plugin/cli.js +21 -0
- package/plugin/cliStore-5s0qerr7.js +2 -0
- package/plugin/clientSession-tmmxm39z.js +2 -0
- package/plugin/codec-aa8mxqyr.js +1 -0
- package/plugin/connect-d7ec6kfh.js +2 -0
- package/plugin/contract-qn0z7r9c.js +1 -0
- package/plugin/credential-garn07qc.js +2 -0
- package/plugin/deepseek-fvdrmjr9.js +2 -0
- package/plugin/deepseek-sp4vxjqy.js +2 -0
- package/plugin/definition-0h3gqd2z.js +2 -0
- package/plugin/description-8xhxryaq.js +2 -0
- package/plugin/deviceGrant-axpyc7xr.js +2 -0
- package/plugin/devin-hy98d305.js +2 -0
- package/plugin/duplex-yexjcpv2.js +2 -0
- package/plugin/endpoint-0b9bsb4q.js +2 -0
- package/plugin/errors-kck87dpv.js +2 -0
- package/plugin/events-81m69vqz.js +2 -0
- package/plugin/events-s95ybm4g.js +2 -0
- package/plugin/executor-avear8af.js +2 -0
- package/plugin/failure-ddv4456n.js +2 -0
- package/plugin/framing-jnd2zm0h.js +2 -0
- package/plugin/grant-85r3bbqn.js +2 -0
- package/plugin/harness-jm3fhnwg.js +2 -0
- package/plugin/headers-w6p5sp18.js +2 -0
- package/plugin/hook-hjrk83m8.js +2 -0
- package/plugin/icon-044pa3y8.js +6 -0
- package/plugin/icon-j22svmgp.js +4 -0
- package/plugin/icon-ny6qbjvc.js +4 -0
- package/plugin/icon-pz54e8n3.js +4 -0
- package/plugin/icon-qy92jx2b.js +4 -0
- package/plugin/ids-2dndaq8y.js +2 -0
- package/plugin/images-s2kqebfv.js +2 -0
- package/plugin/index-b3yp4szm.js +2 -0
- package/plugin/index-xs7nfsck.js +2 -0
- package/plugin/lifecycle-er51apxp.js +2 -0
- package/plugin/manual-2mdscj84.js +2 -0
- package/plugin/messages-gmwcg1pq.js +2 -0
- package/plugin/metadata-gpazs3f5.js +4 -0
- package/plugin/muse-g8bc58v8.js +2 -0
- package/plugin/muse-tfe6sph7.js +2 -0
- package/plugin/museToolSchema-tbe0f3wa.js +2 -0
- package/plugin/notes-5m0m3pdr.js +2 -0
- package/plugin/object-9pjtdam7.js +2 -0
- package/plugin/open-browser-vqb7ckt1.js +2 -0
- package/plugin/openai-6f50tf64.js +2 -0
- package/plugin/openai-compatible-chat-eez8hkge.js +2 -0
- package/plugin/openai-images-haszbnft.js +2 -0
- package/plugin/openai-mfqwg6pa.js +2 -0
- package/plugin/openai-responses-1gpyp640.js +2 -0
- package/plugin/opencodeGo-1wgdjtjz.js +3 -0
- package/plugin/opencodeGo-qgw3pfg6.js +2 -0
- package/plugin/options-476akxaj.js +2 -0
- package/plugin/payload-2gr4q9g8.js +2 -0
- package/plugin/pkce-y3sh5pk8.js +2 -0
- package/plugin/plugin-0e34qaar.js +3 -0
- package/plugin/plugin-1vpp5mqk.js +4 -0
- package/plugin/plugin-1zkx860n.js +3 -0
- package/plugin/plugin-217mw9ck.js +3 -0
- package/plugin/plugin-24j9hnc7.js +3 -0
- package/plugin/plugin-2s6bq45c.js +3 -0
- package/plugin/plugin-3969dy0b.js +3 -0
- package/plugin/plugin-3b8x73y6.js +3 -0
- package/plugin/plugin-3t0qp574.js +3 -0
- package/plugin/plugin-55fbx586.js +3 -0
- package/plugin/plugin-5zq084fb.js +3 -0
- package/plugin/plugin-6a56xsx3.js +3 -0
- package/plugin/plugin-6vzw5yyr.js +3 -0
- package/plugin/plugin-72xxqm1t.js +3 -0
- package/plugin/plugin-7swap1ad.js +3 -0
- package/plugin/plugin-7te9b50h.js +3 -0
- package/plugin/plugin-7xmwhj5h.js +3 -0
- package/plugin/plugin-80gqwmjy.js +3 -0
- package/plugin/plugin-8g8myq9g.js +3 -0
- package/plugin/plugin-8q44b578.js +3 -0
- package/plugin/plugin-8v4g0q0b.js +3 -0
- package/plugin/plugin-8x3c401q.js +9 -0
- package/plugin/plugin-92sxs4r1.js +3 -0
- package/plugin/plugin-9gha9fx3.js +3 -0
- package/plugin/plugin-9zbh7788.js +3 -0
- package/plugin/plugin-a3vzpk4e.js +3 -0
- package/plugin/plugin-ak62rhwz.js +3 -0
- package/plugin/plugin-azkzdkpk.js +3 -0
- package/plugin/plugin-cydz2zhy.js +3 -0
- package/plugin/plugin-d28d8jar.js +4 -0
- package/plugin/plugin-dd951075.js +3 -0
- package/plugin/plugin-dqxdznvd.js +3 -0
- package/plugin/plugin-dsjq4tye.js +3 -0
- package/plugin/plugin-e5ybk2a2.js +3 -0
- package/plugin/plugin-eksq91yp.js +5 -0
- package/plugin/plugin-er1kc6f6.js +5 -0
- package/plugin/plugin-fjsmz1vy.js +4 -0
- package/plugin/plugin-fre9hdcg.js +3 -0
- package/plugin/plugin-g0zv4vrz.js +3 -0
- package/plugin/plugin-g4hst0jz.js +3 -0
- package/plugin/plugin-g7hrtg2p.js +3 -0
- package/plugin/plugin-gh857xdd.js +3 -0
- package/plugin/plugin-hkjxkgty.js +3 -0
- package/plugin/plugin-jxvmq18y.js +3 -0
- package/plugin/plugin-kc4z9msd.js +3 -0
- package/plugin/plugin-krbbb4ts.js +3 -0
- package/plugin/plugin-me00x60n.js +3 -0
- package/plugin/plugin-mqr325kz.js +3 -0
- package/plugin/plugin-nzacjxf9.js +3 -0
- package/plugin/plugin-p59gy5xd.js +3 -0
- package/plugin/plugin-p6x7emar.js +3 -0
- package/plugin/plugin-pdww1ma8.js +3 -0
- package/plugin/plugin-psj9935q.js +3 -0
- package/plugin/plugin-q6pvb1xf.js +3 -0
- package/plugin/plugin-r342d8zf.js +3 -0
- package/plugin/plugin-r7g3vqrm.js +3 -0
- package/plugin/plugin-rrgyjesv.js +3 -0
- package/plugin/plugin-t4xrq5q2.js +3 -0
- package/plugin/plugin-tetj2cr3.js +3 -0
- package/plugin/plugin-v80m00bq.js +14 -0
- package/plugin/plugin-vfjhxng8.js +3 -0
- package/plugin/plugin-vqrd05eg.js +3 -0
- package/plugin/plugin-w3zbkmy6.js +3 -0
- package/plugin/plugin-w8f977my.js +3 -0
- package/plugin/plugin-xbnw80pk.js +3 -0
- package/plugin/plugin-xfcgt5ba.js +36 -0
- package/plugin/plugin-y9cdpmbv.js +6 -0
- package/plugin/plugin-yg0h5k5d.js +3 -0
- package/plugin/plugin-yp736z4n.js +3 -0
- package/plugin/plugin-zrb8bbr4.js +3 -0
- package/plugin/plugin-zsv7wawc.js +3 -0
- package/plugin/plugin.d.ts +175 -0
- package/plugin/plugin.js +2 -0
- package/plugin/points.generated.d.ts +341 -0
- package/plugin/points.generated.js +2 -0
- package/plugin/process.d.ts +4 -0
- package/plugin/process.js +85 -0
- package/plugin/protocol-8c26dk6v.js +2 -0
- package/plugin/protocol.d.ts +115 -0
- package/plugin/protocol.js +2 -0
- package/plugin/provider-0b7xxyhn.js +2 -0
- package/plugin/quota-v63yvp13.js +2 -0
- package/plugin/quotaRead-esmjycnd.js +2 -0
- package/plugin/reasoning-1saw6tds.js +2 -0
- package/plugin/record-1m3vvy60.js +2 -0
- package/plugin/requests-2zyr1g8e.js +1 -0
- package/plugin/responseFold-xxhqx4sa.js +2 -0
- package/plugin/settings-8xq8dvhp.js +2 -0
- package/plugin/shared-4jndfh28.js +2 -0
- package/plugin/speech-067caz1a.js +2 -0
- package/plugin/stepfun-3en5g41d.js +2 -0
- package/plugin/stepfun-xp1c5wpk.js +2 -0
- package/plugin/stream-8yrr289z.js +2 -0
- package/plugin/svelteProgram-73v9yajk.js +2 -0
- package/plugin/synthesisDuplex-ch9jhqzt.js +2 -0
- package/plugin/template.d.ts +14 -0
- package/plugin/template.js +2 -0
- package/plugin/testing.d.ts +85 -0
- package/plugin/testing.js +4 -0
- package/plugin/tool-content-vean6rqa.js +2 -0
- package/plugin/tool-stream-fb180jmt.js +2 -0
- package/plugin/transport-j784dsdr.js +2 -0
- package/plugin/ui.generated.d.ts +1041 -0
- package/plugin/value.d.ts +8 -0
- package/plugin/value.js +2 -0
- package/plugin/vendor-pn6b5a8f.js +2 -0
- package/plugin/vendorCall-6n5chrn0.js +2 -0
- package/plugin/vendorCall-82evk8b3.js +2 -0
- package/plugin/vendorPayload-458354fv.js +2 -0
- package/plugin/vendorWeb-cz5t01m7.js +2 -0
- package/plugin/verbatim-2f2d9n02.js +2 -0
- package/plugin/xai-2cqraa99.js +2 -0
- package/plugin/xai-e8sbtk6a.js +2 -0
- package/rules/effect.d.ts +55 -0
- package/rules/effect.js +11 -0
- package/rules/rules.d.ts +342 -0
- package/rules/rules.js +50 -0
- package/types/node/assert/strict.d.ts +12 -0
- package/types/node/assert.d.ts +76 -0
- package/types/node/async_hooks.d.ts +113 -0
- package/types/node/buffer.buffer.d.ts +29 -0
- package/types/node/buffer.d.ts +162 -0
- package/types/node/child_process.d.ts +337 -0
- package/types/node/cluster.d.ts +118 -0
- package/types/node/compatibility/iterators.d.ts +11 -0
- package/types/node/console.d.ts +48 -0
- package/types/node/constants.d.ts +8 -0
- package/types/node/crypto.d.ts +847 -0
- package/types/node/dgram.d.ts +88 -0
- package/types/node/diagnostics_channel.d.ts +61 -0
- package/types/node/dns/promises.d.ts +94 -0
- package/types/node/dns.d.ts +276 -0
- package/types/node/domain.d.ts +17 -0
- package/types/node/events.d.ts +138 -0
- package/types/node/fs/promises.d.ts +253 -0
- package/types/node/fs.d.ts +1038 -0
- package/types/node/globals.d.ts +73 -0
- package/types/node/globals.typedarray.d.ts +22 -0
- package/types/node/http.d.ts +530 -0
- package/types/node/http2.d.ts +794 -0
- package/types/node/https.d.ts +66 -0
- package/types/node/index.d.ts +84 -0
- package/types/node/inspector/promises.d.ts +13 -0
- package/types/node/inspector.d.ts +61 -0
- package/types/node/inspector.generated.d.ts +1624 -0
- package/types/node/module.d.ts +187 -0
- package/types/node/net.d.ts +266 -0
- package/types/node/os.d.ts +236 -0
- package/types/node/path/posix.d.ts +8 -0
- package/types/node/path/win32.d.ts +8 -0
- package/types/node/path.d.ts +40 -0
- package/types/node/perf_hooks.d.ts +236 -0
- package/types/node/process.d.ts +436 -0
- package/types/node/punycode.d.ts +15 -0
- package/types/node/querystring.d.ts +22 -0
- package/types/node/quic.d.ts +203 -0
- package/types/node/readline/promises.d.ts +28 -0
- package/types/node/readline.d.ts +94 -0
- package/types/node/repl.d.ts +104 -0
- package/types/node/sea.d.ts +11 -0
- package/types/node/sqlite.d.ts +183 -0
- package/types/node/stream/consumers.d.ts +13 -0
- package/types/node/stream/iter.d.ts +240 -0
- package/types/node/stream/promises.d.ts +37 -0
- package/types/node/stream/web.d.ts +297 -0
- package/types/node/stream.d.ts +378 -0
- package/types/node/string_decoder.d.ts +10 -0
- package/types/node/test/reporters.d.ts +66 -0
- package/types/node/test.d.ts +462 -0
- package/types/node/timers/promises.d.ts +16 -0
- package/types/node/timers.d.ts +43 -0
- package/types/node/tls.d.ts +279 -0
- package/types/node/trace_events.d.ts +16 -0
- package/types/node/ts5.6/buffer.buffer.d.ts +26 -0
- package/types/node/ts5.6/compatibility/float16array.d.ts +43 -0
- package/types/node/ts5.6/globals.typedarray.d.ts +22 -0
- package/types/node/ts5.6/index.d.ts +84 -0
- package/types/node/ts5.7/compatibility/float16array.d.ts +50 -0
- package/types/node/ts5.7/index.d.ts +84 -0
- package/types/node/tty.d.ts +61 -0
- package/types/node/url.d.ts +165 -0
- package/types/node/util/types.d.ts +49 -0
- package/types/node/util.d.ts +320 -0
- package/types/node/v8.d.ts +178 -0
- package/types/node/vm.d.ts +130 -0
- package/types/node/wasi.d.ts +26 -0
- package/types/node/web-globals/abortcontroller.d.ts +47 -0
- package/types/node/web-globals/blob.d.ts +34 -0
- package/types/node/web-globals/console.d.ts +7 -0
- package/types/node/web-globals/crypto.d.ts +46 -0
- package/types/node/web-globals/domexception.d.ts +74 -0
- package/types/node/web-globals/encoding.d.ts +16 -0
- package/types/node/web-globals/events.d.ts +111 -0
- package/types/node/web-globals/fetch.d.ts +121 -0
- package/types/node/web-globals/importmeta.d.ts +11 -0
- package/types/node/web-globals/messaging.d.ts +32 -0
- package/types/node/web-globals/navigator.d.ts +28 -0
- package/types/node/web-globals/performance.d.ts +71 -0
- package/types/node/web-globals/storage.d.ts +26 -0
- package/types/node/web-globals/streams.d.ts +162 -0
- package/types/node/web-globals/timers.d.ts +22 -0
- package/types/node/web-globals/url.d.ts +27 -0
- package/types/node/worker_threads.d.ts +199 -0
- package/types/node/zlib/iter.d.ts +49 -0
- package/types/node/zlib.d.ts +360 -0
- package/types/undici/agent.d.ts +24 -0
- package/types/undici/api.d.ts +19 -0
- package/types/undici/balanced-pool.d.ts +16 -0
- package/types/undici/cache-interceptor.d.ts +98 -0
- package/types/undici/cache.d.ts +30 -0
- package/types/undici/client-stats.d.ts +9 -0
- package/types/undici/client.d.ts +61 -0
- package/types/undici/connector.d.ts +37 -0
- package/types/undici/content-type.d.ts +9 -0
- package/types/undici/cookies.d.ts +22 -0
- package/types/undici/diagnostics-channel.d.ts +72 -0
- package/types/undici/dispatcher.d.ts +207 -0
- package/types/undici/env-http-proxy-agent.d.ts +15 -0
- package/types/undici/errors.d.ts +117 -0
- package/types/undici/eventsource.d.ts +39 -0
- package/types/undici/fetch.d.ts +122 -0
- package/types/undici/formdata.d.ts +24 -0
- package/types/undici/global-dispatcher.d.ts +4 -0
- package/types/undici/global-origin.d.ts +3 -0
- package/types/undici/h2c-client.d.ts +35 -0
- package/types/undici/handlers.d.ts +7 -0
- package/types/undici/header.d.ts +10 -0
- package/types/undici/index.d.ts +85 -0
- package/types/undici/interceptors.d.ts +70 -0
- package/types/undici/mock-agent.d.ts +43 -0
- package/types/undici/mock-call-history.d.ts +57 -0
- package/types/undici/mock-client.d.ts +17 -0
- package/types/undici/mock-errors.d.ts +9 -0
- package/types/undici/mock-interceptor.d.ts +60 -0
- package/types/undici/mock-pool.d.ts +17 -0
- package/types/undici/patch.d.ts +21 -0
- package/types/undici/pool-stats.d.ts +11 -0
- package/types/undici/pool.d.ts +25 -0
- package/types/undici/proxy-agent.d.ts +22 -0
- package/types/undici/readable.d.ts +24 -0
- package/types/undici/retry-agent.d.ts +6 -0
- package/types/undici/retry-handler.d.ts +41 -0
- package/types/undici/round-robin-pool.d.ts +25 -0
- package/types/undici/snapshot-agent.d.ts +98 -0
- package/types/undici/socks5-proxy-agent.d.ts +17 -0
- package/types/undici/util.d.ts +4 -0
- package/types/undici/utility.d.ts +2 -0
- package/types/undici/webidl.d.ts +121 -0
- package/types/undici/websocket.d.ts +130 -0
- package/README.md +0 -3
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
declare var global: typeof globalThis;
|
|
2
|
+
declare var process: NodeJS.Process;
|
|
3
|
+
interface ErrorConstructor {
|
|
4
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
5
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
6
|
+
stackTraceLimit: number;
|
|
7
|
+
}
|
|
8
|
+
declare var gc: NodeJS.GCFunction | undefined;
|
|
9
|
+
declare namespace NodeJS {
|
|
10
|
+
interface CallSite {
|
|
11
|
+
getColumnNumber(): number | null;
|
|
12
|
+
getEnclosingColumnNumber(): number | null;
|
|
13
|
+
getEnclosingLineNumber(): number | null;
|
|
14
|
+
getEvalOrigin(): string | undefined;
|
|
15
|
+
getFileName(): string | null;
|
|
16
|
+
getFunction(): Function | undefined;
|
|
17
|
+
getFunctionName(): string | null;
|
|
18
|
+
getLineNumber(): number | null;
|
|
19
|
+
getMethodName(): string | null;
|
|
20
|
+
getPosition(): number;
|
|
21
|
+
getPromiseIndex(): number | null;
|
|
22
|
+
getScriptHash(): string;
|
|
23
|
+
getScriptNameOrSourceURL(): string | null;
|
|
24
|
+
getThis(): unknown;
|
|
25
|
+
getTypeName(): string | null;
|
|
26
|
+
isAsync(): boolean;
|
|
27
|
+
isConstructor(): boolean;
|
|
28
|
+
isEval(): boolean;
|
|
29
|
+
isNative(): boolean;
|
|
30
|
+
isPromiseAll(): boolean;
|
|
31
|
+
isToplevel(): boolean;
|
|
32
|
+
}
|
|
33
|
+
interface ErrnoException extends Error {
|
|
34
|
+
errno?: number | undefined;
|
|
35
|
+
code?: string | undefined;
|
|
36
|
+
path?: string | undefined;
|
|
37
|
+
syscall?: string | undefined;
|
|
38
|
+
}
|
|
39
|
+
interface RefCounted {
|
|
40
|
+
ref(): this;
|
|
41
|
+
unref(): this;
|
|
42
|
+
}
|
|
43
|
+
interface Dict<T> {
|
|
44
|
+
[key: string]: T | undefined;
|
|
45
|
+
}
|
|
46
|
+
interface ReadOnlyDict<T> {
|
|
47
|
+
readonly [key: string]: T | undefined;
|
|
48
|
+
}
|
|
49
|
+
type PartialOptions<T> = {
|
|
50
|
+
[K in keyof T]?: T[K] | undefined;
|
|
51
|
+
};
|
|
52
|
+
interface GCFunction {
|
|
53
|
+
(minor?: boolean): void;
|
|
54
|
+
(options: NodeJS.GCOptions & {
|
|
55
|
+
execution: "async";
|
|
56
|
+
}): Promise<void>;
|
|
57
|
+
(options: NodeJS.GCOptions): void;
|
|
58
|
+
}
|
|
59
|
+
interface GCOptions {
|
|
60
|
+
execution?: "sync" | "async" | undefined;
|
|
61
|
+
flavor?: "regular" | "last-resort" | undefined;
|
|
62
|
+
type?: "major-snapshot" | "major" | "minor" | undefined;
|
|
63
|
+
filename?: string | undefined;
|
|
64
|
+
}
|
|
65
|
+
interface Iterator<T, TReturn = undefined, TNext = any> extends IteratorObject<T, TReturn, TNext> {
|
|
66
|
+
[Symbol.iterator](): NodeJS.Iterator<T, TReturn, TNext>;
|
|
67
|
+
}
|
|
68
|
+
interface AsyncIterator<T, TReturn = undefined, TNext = any> extends AsyncIteratorObject<T, TReturn, TNext> {
|
|
69
|
+
[Symbol.asyncIterator](): NodeJS.AsyncIterator<T, TReturn, TNext>;
|
|
70
|
+
}
|
|
71
|
+
type BufferSource = NonSharedArrayBufferView | ArrayBuffer;
|
|
72
|
+
type AllowSharedBufferSource = ArrayBufferView | ArrayBufferLike;
|
|
73
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export {};
|
|
2
|
+
declare global {
|
|
3
|
+
namespace NodeJS {
|
|
4
|
+
type TypedArray<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> = Uint8Array<TArrayBuffer> | Uint8ClampedArray<TArrayBuffer> | Uint16Array<TArrayBuffer> | Uint32Array<TArrayBuffer> | Int8Array<TArrayBuffer> | Int16Array<TArrayBuffer> | Int32Array<TArrayBuffer> | BigUint64Array<TArrayBuffer> | BigInt64Array<TArrayBuffer> | Float16Array<TArrayBuffer> | Float32Array<TArrayBuffer> | Float64Array<TArrayBuffer>;
|
|
5
|
+
type ArrayBufferView<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> = TypedArray<TArrayBuffer> | DataView<TArrayBuffer>;
|
|
6
|
+
type NonSharedUint8Array = Uint8Array<ArrayBuffer>;
|
|
7
|
+
type NonSharedUint8ClampedArray = Uint8ClampedArray<ArrayBuffer>;
|
|
8
|
+
type NonSharedUint16Array = Uint16Array<ArrayBuffer>;
|
|
9
|
+
type NonSharedUint32Array = Uint32Array<ArrayBuffer>;
|
|
10
|
+
type NonSharedInt8Array = Int8Array<ArrayBuffer>;
|
|
11
|
+
type NonSharedInt16Array = Int16Array<ArrayBuffer>;
|
|
12
|
+
type NonSharedInt32Array = Int32Array<ArrayBuffer>;
|
|
13
|
+
type NonSharedBigUint64Array = BigUint64Array<ArrayBuffer>;
|
|
14
|
+
type NonSharedBigInt64Array = BigInt64Array<ArrayBuffer>;
|
|
15
|
+
type NonSharedFloat16Array = Float16Array<ArrayBuffer>;
|
|
16
|
+
type NonSharedFloat32Array = Float32Array<ArrayBuffer>;
|
|
17
|
+
type NonSharedFloat64Array = Float64Array<ArrayBuffer>;
|
|
18
|
+
type NonSharedDataView = DataView<ArrayBuffer>;
|
|
19
|
+
type NonSharedTypedArray = TypedArray<ArrayBuffer>;
|
|
20
|
+
type NonSharedArrayBufferView = ArrayBufferView<ArrayBuffer>;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,530 @@
|
|
|
1
|
+
declare module "node:http" {
|
|
2
|
+
import { NonSharedBuffer } from "node:buffer";
|
|
3
|
+
import { LookupOptions } from "node:dns";
|
|
4
|
+
import { EventEmitter } from "node:events";
|
|
5
|
+
import * as net from "node:net";
|
|
6
|
+
import * as stream from "node:stream";
|
|
7
|
+
import { URL } from "node:url";
|
|
8
|
+
interface IncomingHttpHeaders extends NodeJS.Dict<string | string[]> {
|
|
9
|
+
accept?: string | undefined;
|
|
10
|
+
"accept-encoding"?: string | undefined;
|
|
11
|
+
"accept-language"?: string | undefined;
|
|
12
|
+
"accept-patch"?: string | undefined;
|
|
13
|
+
"accept-ranges"?: string | undefined;
|
|
14
|
+
"access-control-allow-credentials"?: string | undefined;
|
|
15
|
+
"access-control-allow-headers"?: string | undefined;
|
|
16
|
+
"access-control-allow-methods"?: string | undefined;
|
|
17
|
+
"access-control-allow-origin"?: string | undefined;
|
|
18
|
+
"access-control-expose-headers"?: string | undefined;
|
|
19
|
+
"access-control-max-age"?: string | undefined;
|
|
20
|
+
"access-control-request-headers"?: string | undefined;
|
|
21
|
+
"access-control-request-method"?: string | undefined;
|
|
22
|
+
age?: string | undefined;
|
|
23
|
+
allow?: string | undefined;
|
|
24
|
+
"alt-svc"?: string | undefined;
|
|
25
|
+
authorization?: string | undefined;
|
|
26
|
+
"cache-control"?: string | undefined;
|
|
27
|
+
connection?: string | undefined;
|
|
28
|
+
"content-disposition"?: string | undefined;
|
|
29
|
+
"content-encoding"?: string | undefined;
|
|
30
|
+
"content-language"?: string | undefined;
|
|
31
|
+
"content-length"?: string | undefined;
|
|
32
|
+
"content-location"?: string | undefined;
|
|
33
|
+
"content-range"?: string | undefined;
|
|
34
|
+
"content-type"?: string | undefined;
|
|
35
|
+
cookie?: string | undefined;
|
|
36
|
+
date?: string | undefined;
|
|
37
|
+
etag?: string | undefined;
|
|
38
|
+
expect?: string | undefined;
|
|
39
|
+
expires?: string | undefined;
|
|
40
|
+
forwarded?: string | undefined;
|
|
41
|
+
from?: string | undefined;
|
|
42
|
+
host?: string | undefined;
|
|
43
|
+
"if-match"?: string | undefined;
|
|
44
|
+
"if-modified-since"?: string | undefined;
|
|
45
|
+
"if-none-match"?: string | undefined;
|
|
46
|
+
"if-unmodified-since"?: string | undefined;
|
|
47
|
+
"last-modified"?: string | undefined;
|
|
48
|
+
location?: string | undefined;
|
|
49
|
+
origin?: string | undefined;
|
|
50
|
+
pragma?: string | undefined;
|
|
51
|
+
"proxy-authenticate"?: string | undefined;
|
|
52
|
+
"proxy-authorization"?: string | undefined;
|
|
53
|
+
"public-key-pins"?: string | undefined;
|
|
54
|
+
range?: string | undefined;
|
|
55
|
+
referer?: string | undefined;
|
|
56
|
+
"retry-after"?: string | undefined;
|
|
57
|
+
"sec-fetch-site"?: string | undefined;
|
|
58
|
+
"sec-fetch-mode"?: string | undefined;
|
|
59
|
+
"sec-fetch-user"?: string | undefined;
|
|
60
|
+
"sec-fetch-dest"?: string | undefined;
|
|
61
|
+
"sec-websocket-accept"?: string | undefined;
|
|
62
|
+
"sec-websocket-extensions"?: string | undefined;
|
|
63
|
+
"sec-websocket-key"?: string | undefined;
|
|
64
|
+
"sec-websocket-protocol"?: string | undefined;
|
|
65
|
+
"sec-websocket-version"?: string | undefined;
|
|
66
|
+
"set-cookie"?: string[] | undefined;
|
|
67
|
+
"strict-transport-security"?: string | undefined;
|
|
68
|
+
tk?: string | undefined;
|
|
69
|
+
trailer?: string | undefined;
|
|
70
|
+
"transfer-encoding"?: string | undefined;
|
|
71
|
+
upgrade?: string | undefined;
|
|
72
|
+
"user-agent"?: string | undefined;
|
|
73
|
+
vary?: string | undefined;
|
|
74
|
+
via?: string | undefined;
|
|
75
|
+
warning?: string | undefined;
|
|
76
|
+
"www-authenticate"?: string | undefined;
|
|
77
|
+
}
|
|
78
|
+
type OutgoingHttpHeader = number | string | string[];
|
|
79
|
+
interface OutgoingHttpHeaders extends NodeJS.Dict<OutgoingHttpHeader> {
|
|
80
|
+
accept?: string | string[] | undefined;
|
|
81
|
+
"accept-charset"?: string | string[] | undefined;
|
|
82
|
+
"accept-encoding"?: string | string[] | undefined;
|
|
83
|
+
"accept-language"?: string | string[] | undefined;
|
|
84
|
+
"accept-ranges"?: string | undefined;
|
|
85
|
+
"access-control-allow-credentials"?: string | undefined;
|
|
86
|
+
"access-control-allow-headers"?: string | undefined;
|
|
87
|
+
"access-control-allow-methods"?: string | undefined;
|
|
88
|
+
"access-control-allow-origin"?: string | undefined;
|
|
89
|
+
"access-control-expose-headers"?: string | undefined;
|
|
90
|
+
"access-control-max-age"?: string | undefined;
|
|
91
|
+
"access-control-request-headers"?: string | undefined;
|
|
92
|
+
"access-control-request-method"?: string | undefined;
|
|
93
|
+
age?: string | undefined;
|
|
94
|
+
allow?: string | undefined;
|
|
95
|
+
authorization?: string | undefined;
|
|
96
|
+
"cache-control"?: string | undefined;
|
|
97
|
+
"cdn-cache-control"?: string | undefined;
|
|
98
|
+
connection?: string | string[] | undefined;
|
|
99
|
+
"content-disposition"?: string | undefined;
|
|
100
|
+
"content-encoding"?: string | undefined;
|
|
101
|
+
"content-language"?: string | undefined;
|
|
102
|
+
"content-length"?: string | number | undefined;
|
|
103
|
+
"content-location"?: string | undefined;
|
|
104
|
+
"content-range"?: string | undefined;
|
|
105
|
+
"content-security-policy"?: string | undefined;
|
|
106
|
+
"content-security-policy-report-only"?: string | undefined;
|
|
107
|
+
"content-type"?: string | undefined;
|
|
108
|
+
cookie?: string | string[] | undefined;
|
|
109
|
+
dav?: string | string[] | undefined;
|
|
110
|
+
dnt?: string | undefined;
|
|
111
|
+
date?: string | undefined;
|
|
112
|
+
etag?: string | undefined;
|
|
113
|
+
expect?: string | undefined;
|
|
114
|
+
expires?: string | undefined;
|
|
115
|
+
forwarded?: string | undefined;
|
|
116
|
+
from?: string | undefined;
|
|
117
|
+
host?: string | undefined;
|
|
118
|
+
"if-match"?: string | undefined;
|
|
119
|
+
"if-modified-since"?: string | undefined;
|
|
120
|
+
"if-none-match"?: string | undefined;
|
|
121
|
+
"if-range"?: string | undefined;
|
|
122
|
+
"if-unmodified-since"?: string | undefined;
|
|
123
|
+
"last-modified"?: string | undefined;
|
|
124
|
+
link?: string | string[] | undefined;
|
|
125
|
+
location?: string | undefined;
|
|
126
|
+
"max-forwards"?: string | undefined;
|
|
127
|
+
origin?: string | undefined;
|
|
128
|
+
pragma?: string | string[] | undefined;
|
|
129
|
+
"proxy-authenticate"?: string | string[] | undefined;
|
|
130
|
+
"proxy-authorization"?: string | undefined;
|
|
131
|
+
"public-key-pins"?: string | undefined;
|
|
132
|
+
"public-key-pins-report-only"?: string | undefined;
|
|
133
|
+
range?: string | undefined;
|
|
134
|
+
referer?: string | undefined;
|
|
135
|
+
"referrer-policy"?: string | undefined;
|
|
136
|
+
refresh?: string | undefined;
|
|
137
|
+
"retry-after"?: string | undefined;
|
|
138
|
+
"sec-websocket-accept"?: string | undefined;
|
|
139
|
+
"sec-websocket-extensions"?: string | string[] | undefined;
|
|
140
|
+
"sec-websocket-key"?: string | undefined;
|
|
141
|
+
"sec-websocket-protocol"?: string | string[] | undefined;
|
|
142
|
+
"sec-websocket-version"?: string | undefined;
|
|
143
|
+
server?: string | undefined;
|
|
144
|
+
"set-cookie"?: string | string[] | undefined;
|
|
145
|
+
"strict-transport-security"?: string | undefined;
|
|
146
|
+
te?: string | undefined;
|
|
147
|
+
trailer?: string | undefined;
|
|
148
|
+
"transfer-encoding"?: string | undefined;
|
|
149
|
+
"user-agent"?: string | undefined;
|
|
150
|
+
upgrade?: string | undefined;
|
|
151
|
+
"upgrade-insecure-requests"?: string | undefined;
|
|
152
|
+
vary?: string | undefined;
|
|
153
|
+
via?: string | string[] | undefined;
|
|
154
|
+
warning?: string | undefined;
|
|
155
|
+
"www-authenticate"?: string | string[] | undefined;
|
|
156
|
+
"x-content-type-options"?: string | undefined;
|
|
157
|
+
"x-dns-prefetch-control"?: string | undefined;
|
|
158
|
+
"x-frame-options"?: string | undefined;
|
|
159
|
+
"x-xss-protection"?: string | undefined;
|
|
160
|
+
}
|
|
161
|
+
interface ClientRequestArgs extends Pick<LookupOptions, "hints"> {
|
|
162
|
+
_defaultAgent?: Agent | undefined;
|
|
163
|
+
agent?: Agent | boolean | undefined;
|
|
164
|
+
auth?: string | null | undefined;
|
|
165
|
+
createConnection?: ((options: ClientRequestArgs, oncreate: (err: Error | null, socket: stream.Duplex) => void) => stream.Duplex | null | undefined) | undefined;
|
|
166
|
+
defaultPort?: number | string | undefined;
|
|
167
|
+
family?: number | undefined;
|
|
168
|
+
headers?: OutgoingHttpHeaders | readonly string[] | undefined;
|
|
169
|
+
host?: string | null | undefined;
|
|
170
|
+
hostname?: string | null | undefined;
|
|
171
|
+
insecureHTTPParser?: boolean | undefined;
|
|
172
|
+
localAddress?: string | undefined;
|
|
173
|
+
localPort?: number | undefined;
|
|
174
|
+
lookup?: net.LookupFunction | undefined;
|
|
175
|
+
maxHeaderSize?: number | undefined;
|
|
176
|
+
method?: string | undefined;
|
|
177
|
+
path?: string | null | undefined;
|
|
178
|
+
port?: number | string | null | undefined;
|
|
179
|
+
protocol?: string | null | undefined;
|
|
180
|
+
setDefaultHeaders?: boolean | undefined;
|
|
181
|
+
setHost?: boolean | undefined;
|
|
182
|
+
signal?: AbortSignal | undefined;
|
|
183
|
+
socketPath?: string | undefined;
|
|
184
|
+
timeout?: number | undefined;
|
|
185
|
+
uniqueHeaders?: Array<string | string[]> | undefined;
|
|
186
|
+
joinDuplicateHeaders?: boolean | undefined;
|
|
187
|
+
}
|
|
188
|
+
interface ServerOptions<Request extends typeof IncomingMessage = typeof IncomingMessage, Response extends typeof ServerResponse<InstanceType<Request>> = typeof ServerResponse> {
|
|
189
|
+
IncomingMessage?: Request | undefined;
|
|
190
|
+
ServerResponse?: Response | undefined;
|
|
191
|
+
requestTimeout?: number | undefined;
|
|
192
|
+
joinDuplicateHeaders?: boolean | undefined;
|
|
193
|
+
keepAliveTimeout?: number | undefined;
|
|
194
|
+
keepAliveTimeoutBuffer?: number | undefined;
|
|
195
|
+
connectionsCheckingInterval?: number | undefined;
|
|
196
|
+
headersTimeout?: number | undefined;
|
|
197
|
+
highWaterMark?: number | undefined;
|
|
198
|
+
insecureHTTPParser?: boolean | undefined;
|
|
199
|
+
maxHeaderSize?: number | undefined;
|
|
200
|
+
noDelay?: boolean | undefined;
|
|
201
|
+
requireHostHeader?: boolean | undefined;
|
|
202
|
+
keepAlive?: boolean | undefined;
|
|
203
|
+
keepAliveInitialDelay?: number | undefined;
|
|
204
|
+
uniqueHeaders?: Array<string | string[]> | undefined;
|
|
205
|
+
shouldUpgradeCallback?: ((request: InstanceType<Request>) => boolean) | undefined;
|
|
206
|
+
rejectNonStandardBodyWrites?: boolean | undefined;
|
|
207
|
+
optimizeEmptyRequests?: boolean | undefined;
|
|
208
|
+
}
|
|
209
|
+
type RequestListener<Request extends typeof IncomingMessage = typeof IncomingMessage, Response extends typeof ServerResponse<InstanceType<Request>> = typeof ServerResponse> = (request: InstanceType<Request>, response: InstanceType<Response> & {
|
|
210
|
+
req: InstanceType<Request>;
|
|
211
|
+
}) => void;
|
|
212
|
+
interface ServerEventMap<Request extends typeof IncomingMessage = typeof IncomingMessage, Response extends typeof ServerResponse<InstanceType<Request>> = typeof ServerResponse> extends net.ServerEventMap {
|
|
213
|
+
"checkContinue": Parameters<RequestListener<Request, Response>>;
|
|
214
|
+
"checkExpectation": Parameters<RequestListener<Request, Response>>;
|
|
215
|
+
"clientError": [
|
|
216
|
+
exception: Error,
|
|
217
|
+
socket: stream.Duplex
|
|
218
|
+
];
|
|
219
|
+
"connect": [
|
|
220
|
+
request: InstanceType<Request>,
|
|
221
|
+
socket: stream.Duplex,
|
|
222
|
+
head: NonSharedBuffer
|
|
223
|
+
];
|
|
224
|
+
"connection": [
|
|
225
|
+
socket: net.Socket
|
|
226
|
+
];
|
|
227
|
+
"dropRequest": [
|
|
228
|
+
request: InstanceType<Request>,
|
|
229
|
+
socket: stream.Duplex
|
|
230
|
+
];
|
|
231
|
+
"request": Parameters<RequestListener<Request, Response>>;
|
|
232
|
+
"upgrade": [
|
|
233
|
+
req: InstanceType<Request>,
|
|
234
|
+
socket: stream.Duplex,
|
|
235
|
+
head: NonSharedBuffer
|
|
236
|
+
];
|
|
237
|
+
}
|
|
238
|
+
class Server<Request extends typeof IncomingMessage = typeof IncomingMessage, Response extends typeof ServerResponse<InstanceType<Request>> = typeof ServerResponse> extends net.Server {
|
|
239
|
+
constructor(requestListener?: RequestListener<Request, Response>);
|
|
240
|
+
constructor(options: ServerOptions<Request, Response>, requestListener?: RequestListener<Request, Response>);
|
|
241
|
+
setTimeout(msecs?: number, callback?: (socket: net.Socket) => void): this;
|
|
242
|
+
setTimeout(callback: (socket: net.Socket) => void): this;
|
|
243
|
+
maxHeadersCount: number | null;
|
|
244
|
+
maxRequestsPerSocket: number | null;
|
|
245
|
+
timeout: number;
|
|
246
|
+
headersTimeout: number;
|
|
247
|
+
keepAliveTimeout: number;
|
|
248
|
+
keepAliveTimeoutBuffer: number;
|
|
249
|
+
requestTimeout: number;
|
|
250
|
+
closeAllConnections(): void;
|
|
251
|
+
closeIdleConnections(): void;
|
|
252
|
+
addListener<E extends keyof ServerEventMap>(eventName: E, listener: (...args: ServerEventMap<Request, Response>[E]) => void): this;
|
|
253
|
+
addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
254
|
+
emit<E extends keyof ServerEventMap>(eventName: E, ...args: ServerEventMap<Request, Response>[E]): boolean;
|
|
255
|
+
emit(eventName: string | symbol, ...args: any[]): boolean;
|
|
256
|
+
listenerCount<E extends keyof ServerEventMap>(eventName: E, listener?: (...args: ServerEventMap<Request, Response>[E]) => void): number;
|
|
257
|
+
listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
|
|
258
|
+
listeners<E extends keyof ServerEventMap>(eventName: E): ((...args: ServerEventMap<Request, Response>[E]) => void)[];
|
|
259
|
+
listeners(eventName: string | symbol): ((...args: any[]) => void)[];
|
|
260
|
+
off<E extends keyof ServerEventMap>(eventName: E, listener: (...args: ServerEventMap<Request, Response>[E]) => void): this;
|
|
261
|
+
off(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
262
|
+
on<E extends keyof ServerEventMap>(eventName: E, listener: (...args: ServerEventMap<Request, Response>[E]) => void): this;
|
|
263
|
+
on(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
264
|
+
once<E extends keyof ServerEventMap>(eventName: E, listener: (...args: ServerEventMap<Request, Response>[E]) => void): this;
|
|
265
|
+
once(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
266
|
+
prependListener<E extends keyof ServerEventMap>(eventName: E, listener: (...args: ServerEventMap<Request, Response>[E]) => void): this;
|
|
267
|
+
prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
268
|
+
prependOnceListener<E extends keyof ServerEventMap>(eventName: E, listener: (...args: ServerEventMap<Request, Response>[E]) => void): this;
|
|
269
|
+
prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
270
|
+
rawListeners<E extends keyof ServerEventMap>(eventName: E): ((...args: ServerEventMap<Request, Response>[E]) => void)[];
|
|
271
|
+
rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
|
|
272
|
+
removeAllListeners<E extends keyof ServerEventMap>(eventName?: E): this;
|
|
273
|
+
removeAllListeners(eventName?: string | symbol): this;
|
|
274
|
+
removeListener<E extends keyof ServerEventMap>(eventName: E, listener: (...args: ServerEventMap<Request, Response>[E]) => void): this;
|
|
275
|
+
removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
276
|
+
}
|
|
277
|
+
interface OutgoingMessageEventMap extends stream.WritableEventMap {
|
|
278
|
+
"prefinish": [
|
|
279
|
+
];
|
|
280
|
+
}
|
|
281
|
+
class OutgoingMessage<Request extends IncomingMessage = IncomingMessage> extends stream.Writable {
|
|
282
|
+
constructor();
|
|
283
|
+
readonly req: Request;
|
|
284
|
+
chunkedEncoding: boolean;
|
|
285
|
+
shouldKeepAlive: boolean;
|
|
286
|
+
useChunkedEncodingByDefault: boolean;
|
|
287
|
+
sendDate: boolean;
|
|
288
|
+
finished: boolean;
|
|
289
|
+
readonly headersSent: boolean;
|
|
290
|
+
readonly connection: net.Socket | null;
|
|
291
|
+
readonly socket: net.Socket | null;
|
|
292
|
+
setTimeout(msecs: number, callback?: () => void): this;
|
|
293
|
+
setHeader(name: string, value: number | string | readonly string[]): this;
|
|
294
|
+
setHeaders(headers: Headers | Map<string, number | string | readonly string[]>): this;
|
|
295
|
+
appendHeader(name: string, value: string | readonly string[]): this;
|
|
296
|
+
getHeader(name: string): number | string | string[] | undefined;
|
|
297
|
+
getHeaders(): OutgoingHttpHeaders;
|
|
298
|
+
getHeaderNames(): string[];
|
|
299
|
+
hasHeader(name: string): boolean;
|
|
300
|
+
removeHeader(name: string): void;
|
|
301
|
+
addTrailers(headers: OutgoingHttpHeaders | ReadonlyArray<[
|
|
302
|
+
string,
|
|
303
|
+
string
|
|
304
|
+
]>): void;
|
|
305
|
+
flushHeaders(): void;
|
|
306
|
+
addListener<E extends keyof OutgoingMessageEventMap>(eventName: E, listener: (...args: OutgoingMessageEventMap[E]) => void): this;
|
|
307
|
+
addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
308
|
+
emit<E extends keyof OutgoingMessageEventMap>(eventName: E, ...args: OutgoingMessageEventMap[E]): boolean;
|
|
309
|
+
emit(eventName: string | symbol, ...args: any[]): boolean;
|
|
310
|
+
listenerCount<E extends keyof OutgoingMessageEventMap>(eventName: E, listener?: (...args: OutgoingMessageEventMap[E]) => void): number;
|
|
311
|
+
listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
|
|
312
|
+
listeners<E extends keyof OutgoingMessageEventMap>(eventName: E): ((...args: OutgoingMessageEventMap[E]) => void)[];
|
|
313
|
+
listeners(eventName: string | symbol): ((...args: any[]) => void)[];
|
|
314
|
+
off<E extends keyof OutgoingMessageEventMap>(eventName: E, listener: (...args: OutgoingMessageEventMap[E]) => void): this;
|
|
315
|
+
off(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
316
|
+
on<E extends keyof OutgoingMessageEventMap>(eventName: E, listener: (...args: OutgoingMessageEventMap[E]) => void): this;
|
|
317
|
+
on(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
318
|
+
once<E extends keyof OutgoingMessageEventMap>(eventName: E, listener: (...args: OutgoingMessageEventMap[E]) => void): this;
|
|
319
|
+
once(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
320
|
+
prependListener<E extends keyof OutgoingMessageEventMap>(eventName: E, listener: (...args: OutgoingMessageEventMap[E]) => void): this;
|
|
321
|
+
prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
322
|
+
prependOnceListener<E extends keyof OutgoingMessageEventMap>(eventName: E, listener: (...args: OutgoingMessageEventMap[E]) => void): this;
|
|
323
|
+
prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
324
|
+
rawListeners<E extends keyof OutgoingMessageEventMap>(eventName: E): ((...args: OutgoingMessageEventMap[E]) => void)[];
|
|
325
|
+
rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
|
|
326
|
+
removeAllListeners<E extends keyof OutgoingMessageEventMap>(eventName?: E): this;
|
|
327
|
+
removeAllListeners(eventName?: string | symbol): this;
|
|
328
|
+
removeListener<E extends keyof OutgoingMessageEventMap>(eventName: E, listener: (...args: OutgoingMessageEventMap[E]) => void): this;
|
|
329
|
+
removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
330
|
+
}
|
|
331
|
+
class ServerResponse<Request extends IncomingMessage = IncomingMessage> extends OutgoingMessage<Request> {
|
|
332
|
+
statusCode: number;
|
|
333
|
+
statusMessage: string;
|
|
334
|
+
strictContentLength: boolean;
|
|
335
|
+
constructor(req: Request);
|
|
336
|
+
assignSocket(socket: net.Socket): void;
|
|
337
|
+
detachSocket(socket: net.Socket): void;
|
|
338
|
+
writeContinue(callback?: () => void): void;
|
|
339
|
+
writeEarlyHints(hints: Record<string, string | string[]>, callback?: () => void): void;
|
|
340
|
+
writeHead(statusCode: number, statusMessage?: string, headers?: OutgoingHttpHeaders | OutgoingHttpHeader[]): this;
|
|
341
|
+
writeHead(statusCode: number, headers?: OutgoingHttpHeaders | OutgoingHttpHeader[]): this;
|
|
342
|
+
writeProcessing(callback?: () => void): void;
|
|
343
|
+
}
|
|
344
|
+
interface InformationEvent {
|
|
345
|
+
httpVersion: string;
|
|
346
|
+
httpVersionMajor: number;
|
|
347
|
+
httpVersionMinor: number;
|
|
348
|
+
statusCode: number;
|
|
349
|
+
statusMessage: string;
|
|
350
|
+
headers: IncomingHttpHeaders;
|
|
351
|
+
rawHeaders: string[];
|
|
352
|
+
}
|
|
353
|
+
interface ClientRequestEventMap extends stream.WritableEventMap {
|
|
354
|
+
"abort": [
|
|
355
|
+
];
|
|
356
|
+
"connect": [
|
|
357
|
+
response: IncomingMessage,
|
|
358
|
+
socket: net.Socket,
|
|
359
|
+
head: NonSharedBuffer
|
|
360
|
+
];
|
|
361
|
+
"continue": [
|
|
362
|
+
];
|
|
363
|
+
"information": [
|
|
364
|
+
info: InformationEvent
|
|
365
|
+
];
|
|
366
|
+
"response": [
|
|
367
|
+
response: IncomingMessage
|
|
368
|
+
];
|
|
369
|
+
"socket": [
|
|
370
|
+
socket: net.Socket
|
|
371
|
+
];
|
|
372
|
+
"timeout": [
|
|
373
|
+
];
|
|
374
|
+
"upgrade": [
|
|
375
|
+
response: IncomingMessage,
|
|
376
|
+
socket: net.Socket,
|
|
377
|
+
head: NonSharedBuffer
|
|
378
|
+
];
|
|
379
|
+
}
|
|
380
|
+
class ClientRequest extends OutgoingMessage {
|
|
381
|
+
aborted: boolean;
|
|
382
|
+
host: string;
|
|
383
|
+
protocol: string;
|
|
384
|
+
reusedSocket: boolean;
|
|
385
|
+
maxHeadersCount: number;
|
|
386
|
+
constructor(url: string | URL | ClientRequestArgs, cb?: (res: IncomingMessage) => void);
|
|
387
|
+
method: string;
|
|
388
|
+
path: string;
|
|
389
|
+
abort(): void;
|
|
390
|
+
onSocket(socket: net.Socket): void;
|
|
391
|
+
setTimeout(timeout: number, callback?: () => void): this;
|
|
392
|
+
setNoDelay(noDelay?: boolean): void;
|
|
393
|
+
setSocketKeepAlive(enable?: boolean, initialDelay?: number): void;
|
|
394
|
+
getRawHeaderNames(): string[];
|
|
395
|
+
addListener<E extends keyof ClientRequestEventMap>(eventName: E, listener: (...args: ClientRequestEventMap[E]) => void): this;
|
|
396
|
+
addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
397
|
+
emit<E extends keyof ClientRequestEventMap>(eventName: E, ...args: ClientRequestEventMap[E]): boolean;
|
|
398
|
+
emit(eventName: string | symbol, ...args: any[]): boolean;
|
|
399
|
+
listenerCount<E extends keyof ClientRequestEventMap>(eventName: E, listener?: (...args: ClientRequestEventMap[E]) => void): number;
|
|
400
|
+
listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
|
|
401
|
+
listeners<E extends keyof ClientRequestEventMap>(eventName: E): ((...args: ClientRequestEventMap[E]) => void)[];
|
|
402
|
+
listeners(eventName: string | symbol): ((...args: any[]) => void)[];
|
|
403
|
+
off<E extends keyof ClientRequestEventMap>(eventName: E, listener: (...args: ClientRequestEventMap[E]) => void): this;
|
|
404
|
+
off(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
405
|
+
on<E extends keyof ClientRequestEventMap>(eventName: E, listener: (...args: ClientRequestEventMap[E]) => void): this;
|
|
406
|
+
on(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
407
|
+
once<E extends keyof ClientRequestEventMap>(eventName: E, listener: (...args: ClientRequestEventMap[E]) => void): this;
|
|
408
|
+
once(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
409
|
+
prependListener<E extends keyof ClientRequestEventMap>(eventName: E, listener: (...args: ClientRequestEventMap[E]) => void): this;
|
|
410
|
+
prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
411
|
+
prependOnceListener<E extends keyof ClientRequestEventMap>(eventName: E, listener: (...args: ClientRequestEventMap[E]) => void): this;
|
|
412
|
+
prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
413
|
+
rawListeners<E extends keyof ClientRequestEventMap>(eventName: E): ((...args: ClientRequestEventMap[E]) => void)[];
|
|
414
|
+
rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
|
|
415
|
+
removeAllListeners<E extends keyof ClientRequestEventMap>(eventName?: E): this;
|
|
416
|
+
removeAllListeners(eventName?: string | symbol): this;
|
|
417
|
+
removeListener<E extends keyof ClientRequestEventMap>(eventName: E, listener: (...args: ClientRequestEventMap[E]) => void): this;
|
|
418
|
+
removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
419
|
+
}
|
|
420
|
+
interface IncomingMessageEventMap extends stream.ReadableEventMap {
|
|
421
|
+
"aborted": [
|
|
422
|
+
];
|
|
423
|
+
}
|
|
424
|
+
class IncomingMessage extends stream.Readable {
|
|
425
|
+
constructor(socket: net.Socket);
|
|
426
|
+
aborted: boolean;
|
|
427
|
+
httpVersion: string;
|
|
428
|
+
httpVersionMajor: number;
|
|
429
|
+
httpVersionMinor: number;
|
|
430
|
+
complete: boolean;
|
|
431
|
+
connection: net.Socket;
|
|
432
|
+
socket: net.Socket;
|
|
433
|
+
headers: IncomingHttpHeaders;
|
|
434
|
+
headersDistinct: NodeJS.Dict<string[]>;
|
|
435
|
+
rawHeaders: string[];
|
|
436
|
+
trailers: NodeJS.Dict<string>;
|
|
437
|
+
trailersDistinct: NodeJS.Dict<string[]>;
|
|
438
|
+
rawTrailers: string[];
|
|
439
|
+
setTimeout(msecs: number, callback?: () => void): this;
|
|
440
|
+
method?: string | undefined;
|
|
441
|
+
url?: string | undefined;
|
|
442
|
+
statusCode?: number | undefined;
|
|
443
|
+
statusMessage?: string | undefined;
|
|
444
|
+
destroy(error?: Error): this;
|
|
445
|
+
addListener<E extends keyof IncomingMessageEventMap>(eventName: E, listener: (...args: IncomingMessageEventMap[E]) => void): this;
|
|
446
|
+
addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
447
|
+
emit<E extends keyof IncomingMessageEventMap>(eventName: E, ...args: IncomingMessageEventMap[E]): boolean;
|
|
448
|
+
emit(eventName: string | symbol, ...args: any[]): boolean;
|
|
449
|
+
listenerCount<E extends keyof IncomingMessageEventMap>(eventName: E, listener?: (...args: IncomingMessageEventMap[E]) => void): number;
|
|
450
|
+
listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
|
|
451
|
+
listeners<E extends keyof IncomingMessageEventMap>(eventName: E): ((...args: IncomingMessageEventMap[E]) => void)[];
|
|
452
|
+
listeners(eventName: string | symbol): ((...args: any[]) => void)[];
|
|
453
|
+
off<E extends keyof IncomingMessageEventMap>(eventName: E, listener: (...args: IncomingMessageEventMap[E]) => void): this;
|
|
454
|
+
off(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
455
|
+
on<E extends keyof IncomingMessageEventMap>(eventName: E, listener: (...args: IncomingMessageEventMap[E]) => void): this;
|
|
456
|
+
on(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
457
|
+
once<E extends keyof IncomingMessageEventMap>(eventName: E, listener: (...args: IncomingMessageEventMap[E]) => void): this;
|
|
458
|
+
once(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
459
|
+
prependListener<E extends keyof IncomingMessageEventMap>(eventName: E, listener: (...args: IncomingMessageEventMap[E]) => void): this;
|
|
460
|
+
prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
461
|
+
prependOnceListener<E extends keyof IncomingMessageEventMap>(eventName: E, listener: (...args: IncomingMessageEventMap[E]) => void): this;
|
|
462
|
+
prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
463
|
+
rawListeners<E extends keyof IncomingMessageEventMap>(eventName: E): ((...args: IncomingMessageEventMap[E]) => void)[];
|
|
464
|
+
rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
|
|
465
|
+
removeAllListeners<E extends keyof IncomingMessageEventMap>(eventName?: E): this;
|
|
466
|
+
removeAllListeners(eventName?: string | symbol): this;
|
|
467
|
+
removeListener<E extends keyof IncomingMessageEventMap>(eventName: E, listener: (...args: IncomingMessageEventMap[E]) => void): this;
|
|
468
|
+
removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
469
|
+
}
|
|
470
|
+
interface ProxyEnv extends NodeJS.ProcessEnv {
|
|
471
|
+
HTTP_PROXY?: string | undefined;
|
|
472
|
+
HTTPS_PROXY?: string | undefined;
|
|
473
|
+
NO_PROXY?: string | undefined;
|
|
474
|
+
http_proxy?: string | undefined;
|
|
475
|
+
https_proxy?: string | undefined;
|
|
476
|
+
no_proxy?: string | undefined;
|
|
477
|
+
}
|
|
478
|
+
interface AgentOptions extends NodeJS.PartialOptions<net.TcpSocketConnectOpts> {
|
|
479
|
+
keepAlive?: boolean | undefined;
|
|
480
|
+
keepAliveMsecs?: number | undefined;
|
|
481
|
+
agentKeepAliveTimeoutBuffer?: number | undefined;
|
|
482
|
+
maxSockets?: number | undefined;
|
|
483
|
+
maxTotalSockets?: number | undefined;
|
|
484
|
+
maxFreeSockets?: number | undefined;
|
|
485
|
+
timeout?: number | undefined;
|
|
486
|
+
scheduling?: "fifo" | "lifo" | undefined;
|
|
487
|
+
proxyEnv?: ProxyEnv | undefined;
|
|
488
|
+
defaultPort?: number | undefined;
|
|
489
|
+
protocol?: string | undefined;
|
|
490
|
+
}
|
|
491
|
+
class Agent extends EventEmitter {
|
|
492
|
+
maxFreeSockets: number;
|
|
493
|
+
maxSockets: number;
|
|
494
|
+
maxTotalSockets: number;
|
|
495
|
+
readonly freeSockets: NodeJS.ReadOnlyDict<net.Socket[]>;
|
|
496
|
+
readonly sockets: NodeJS.ReadOnlyDict<net.Socket[]>;
|
|
497
|
+
readonly requests: NodeJS.ReadOnlyDict<ClientRequest[]>;
|
|
498
|
+
constructor(opts?: AgentOptions);
|
|
499
|
+
destroy(): void;
|
|
500
|
+
createConnection(options: ClientRequestArgs, callback?: (err: Error | null, stream: stream.Duplex) => void): stream.Duplex | null | undefined;
|
|
501
|
+
keepSocketAlive(socket: stream.Duplex): void;
|
|
502
|
+
reuseSocket(socket: stream.Duplex, request: ClientRequest): void;
|
|
503
|
+
getName(options?: ClientRequestArgs): string;
|
|
504
|
+
}
|
|
505
|
+
const METHODS: string[];
|
|
506
|
+
const STATUS_CODES: {
|
|
507
|
+
[errorCode: number]: string | undefined;
|
|
508
|
+
[errorCode: string]: string | undefined;
|
|
509
|
+
};
|
|
510
|
+
function createServer<Request extends typeof IncomingMessage = typeof IncomingMessage, Response extends typeof ServerResponse<InstanceType<Request>> = typeof ServerResponse>(requestListener?: RequestListener<Request, Response>): Server<Request, Response>;
|
|
511
|
+
function createServer<Request extends typeof IncomingMessage = typeof IncomingMessage, Response extends typeof ServerResponse<InstanceType<Request>> = typeof ServerResponse>(options: ServerOptions<Request, Response>, requestListener?: RequestListener<Request, Response>): Server<Request, Response>;
|
|
512
|
+
interface RequestOptions extends ClientRequestArgs {
|
|
513
|
+
}
|
|
514
|
+
function request(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest;
|
|
515
|
+
function request(url: string | URL, options: RequestOptions, callback?: (res: IncomingMessage) => void): ClientRequest;
|
|
516
|
+
function get(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest;
|
|
517
|
+
function get(url: string | URL, options: RequestOptions, callback?: (res: IncomingMessage) => void): ClientRequest;
|
|
518
|
+
function validateHeaderName(name: string): void;
|
|
519
|
+
function validateHeaderValue(name: string, value: string): void;
|
|
520
|
+
function setMaxIdleHTTPParsers(max: number): void;
|
|
521
|
+
function setGlobalProxyFromEnv(proxyEnv?: ProxyEnv): () => void;
|
|
522
|
+
let globalAgent: Agent;
|
|
523
|
+
const maxHeaderSize: number;
|
|
524
|
+
const WebSocket: typeof import("../undici/index").WebSocket;
|
|
525
|
+
const CloseEvent: typeof import("../undici/index").CloseEvent;
|
|
526
|
+
const MessageEvent: typeof import("../undici/index").MessageEvent;
|
|
527
|
+
}
|
|
528
|
+
declare module "http" {
|
|
529
|
+
export * from "node:http";
|
|
530
|
+
}
|