@noodleseed/one 0.22.0 → 0.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/author-loop.d.ts.map +1 -1
- package/dist/commands/author-loop.js +2 -2
- package/dist/commands/author-loop.js.map +1 -1
- package/dist/commands/catalog-dispatch.d.ts.map +1 -1
- package/dist/commands/catalog-dispatch.js +21 -2
- package/dist/commands/catalog-dispatch.js.map +1 -1
- package/dist/commands/deploy-ops.d.ts.map +1 -1
- package/dist/commands/deploy-ops.js +28 -11
- package/dist/commands/deploy-ops.js.map +1 -1
- package/dist/first-run.d.ts +11 -0
- package/dist/first-run.d.ts.map +1 -1
- package/dist/first-run.js +19 -4
- package/dist/first-run.js.map +1 -1
- package/dist/project-scaffold-templates.d.ts +11 -0
- package/dist/project-scaffold-templates.d.ts.map +1 -0
- package/dist/project-scaffold-templates.js +359 -0
- package/dist/project-scaffold-templates.js.map +1 -0
- package/dist/project.d.ts.map +1 -1
- package/dist/project.js +1 -323
- package/dist/project.js.map +1 -1
- package/dist/react.d.ts +2 -2
- package/dist/react.d.ts.map +1 -1
- package/dist/react.js +1 -1
- package/dist/react.js.map +1 -1
- package/dist/validate.d.ts +12 -0
- package/dist/validate.d.ts.map +1 -1
- package/dist/validate.js +11 -0
- package/dist/validate.js.map +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/skill-content.d.ts.map +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/skill-content.js +6 -9
- package/node_modules/@noodle-borg/agent-kit/dist/skill-content.js.map +1 -1
- package/node_modules/@noodle-borg/agent-kit/package.json +1 -1
- package/node_modules/@noodle-borg/authoring/dist/index.d.ts +3 -3
- package/node_modules/@noodle-borg/authoring/dist/index.d.ts.map +1 -1
- package/node_modules/@noodle-borg/authoring/dist/index.js +1 -1
- package/node_modules/@noodle-borg/authoring/dist/index.js.map +1 -1
- package/node_modules/@noodle-borg/authoring/dist/react/components.d.ts +302 -7
- package/node_modules/@noodle-borg/authoring/dist/react/components.d.ts.map +1 -1
- package/node_modules/@noodle-borg/authoring/dist/react/components.js +39 -7
- package/node_modules/@noodle-borg/authoring/dist/react/components.js.map +1 -1
- package/node_modules/@noodle-borg/authoring/dist/react/index.d.ts +4 -2
- package/node_modules/@noodle-borg/authoring/dist/react/index.d.ts.map +1 -1
- package/node_modules/@noodle-borg/authoring/dist/react/index.js +2 -1
- package/node_modules/@noodle-borg/authoring/dist/react/index.js.map +1 -1
- package/node_modules/@noodle-borg/authoring/dist/react/semantic-components.d.ts +2618 -0
- package/node_modules/@noodle-borg/authoring/dist/react/semantic-components.d.ts.map +1 -0
- package/node_modules/@noodle-borg/authoring/dist/react/semantic-components.js +110 -0
- package/node_modules/@noodle-borg/authoring/dist/react/semantic-components.js.map +1 -0
- package/node_modules/@noodle-borg/authoring/dist/react.d.ts +2 -2
- package/node_modules/@noodle-borg/authoring/dist/react.d.ts.map +1 -1
- package/node_modules/@noodle-borg/authoring/dist/react.js +1 -1
- package/node_modules/@noodle-borg/authoring/dist/react.js.map +1 -1
- package/node_modules/@noodle-borg/authoring/dist/recording.d.ts +1 -1
- package/node_modules/@noodle-borg/authoring/dist/recording.d.ts.map +1 -1
- package/node_modules/@noodle-borg/authoring/dist/recording.js +14 -1
- package/node_modules/@noodle-borg/authoring/dist/recording.js.map +1 -1
- package/node_modules/@noodle-borg/authoring/dist/server.d.ts +25 -2
- package/node_modules/@noodle-borg/authoring/dist/server.d.ts.map +1 -1
- package/node_modules/@noodle-borg/authoring/dist/server.js +7 -3
- package/node_modules/@noodle-borg/authoring/dist/server.js.map +1 -1
- package/node_modules/@noodle-borg/compiler/dist/compile.d.ts.map +1 -1
- package/node_modules/@noodle-borg/compiler/dist/compile.js +20 -8
- package/node_modules/@noodle-borg/compiler/dist/compile.js.map +1 -1
- package/node_modules/@noodle-borg/compiler/dist/manifest/schema.d.ts +2 -0
- package/node_modules/@noodle-borg/compiler/dist/manifest/schema.d.ts.map +1 -1
- package/node_modules/@noodle-borg/compiler/dist/manifest/schema.js +6 -0
- package/node_modules/@noodle-borg/compiler/dist/manifest/schema.js.map +1 -1
- package/node_modules/@noodle-borg/connector-http/package.json +1 -1
- package/node_modules/@noodle-borg/protocol/dist/mapping.d.ts.map +1 -1
- package/node_modules/@noodle-borg/protocol/dist/mapping.js +8 -0
- package/node_modules/@noodle-borg/protocol/dist/mapping.js.map +1 -1
- package/node_modules/hono/dist/adapter/aws-lambda/handler.js +15 -21
- package/node_modules/hono/dist/adapter/bun/websocket.js +3 -1
- package/node_modules/hono/dist/adapter/lambda-edge/handler.js +8 -2
- package/node_modules/hono/dist/cjs/adapter/aws-lambda/handler.js +15 -21
- package/node_modules/hono/dist/cjs/adapter/bun/websocket.js +3 -1
- package/node_modules/hono/dist/cjs/adapter/lambda-edge/handler.js +8 -2
- package/node_modules/hono/dist/cjs/helper/css/common.js +3 -1
- package/node_modules/hono/dist/cjs/helper/css/index.js +9 -1
- package/node_modules/hono/dist/cjs/jsx/base.js +8 -14
- package/node_modules/hono/dist/cjs/jsx/components.js +41 -21
- package/node_modules/hono/dist/cjs/jsx/context.js +131 -5
- package/node_modules/hono/dist/cjs/jsx/streaming.js +9 -7
- package/node_modules/hono/dist/cjs/middleware/cors/index.js +2 -5
- package/node_modules/hono/dist/cjs/middleware/serve-static/index.js +2 -2
- package/node_modules/hono/dist/cjs/utils/body.js +12 -4
- package/node_modules/hono/dist/cjs/utils/buffer.js +2 -1
- package/node_modules/hono/dist/cjs/validator/validator.js +3 -3
- package/node_modules/hono/dist/helper/css/common.js +3 -1
- package/node_modules/hono/dist/helper/css/index.js +9 -1
- package/node_modules/hono/dist/jsx/base.js +15 -15
- package/node_modules/hono/dist/jsx/components.js +42 -22
- package/node_modules/hono/dist/jsx/context.js +129 -5
- package/node_modules/hono/dist/jsx/streaming.js +10 -8
- package/node_modules/hono/dist/middleware/cors/index.js +2 -5
- package/node_modules/hono/dist/middleware/serve-static/index.js +2 -2
- package/node_modules/hono/dist/types/adapter/aws-lambda/handler.d.ts +1 -1
- package/node_modules/hono/dist/types/jsx/base.d.ts +1 -3
- package/node_modules/hono/dist/types/jsx/context.d.ts +39 -0
- package/node_modules/hono/dist/types/middleware/context-storage/index.d.ts +2 -2
- package/node_modules/hono/dist/types/utils/body.d.ts +1 -1
- package/node_modules/hono/dist/utils/body.js +12 -4
- package/node_modules/hono/dist/utils/buffer.js +2 -1
- package/node_modules/hono/dist/validator/validator.js +3 -3
- package/node_modules/hono/package.json +9 -10
- package/node_modules/tailwindcss/dist/chunk-HMCCH6MG.mjs +1 -0
- package/node_modules/tailwindcss/dist/default-theme.mjs +1 -1
- package/node_modules/tailwindcss/dist/lib.js +13 -13
- package/node_modules/tailwindcss/dist/lib.mjs +18 -18
- package/node_modules/tailwindcss/package.json +2 -2
- package/node_modules/undici/README.md +3 -2
- package/node_modules/undici/docs/docs/api/Agent.md +248 -44
- package/node_modules/undici/docs/docs/api/BalancedPool.md +246 -48
- package/node_modules/undici/docs/docs/api/CacheStorage.md +171 -13
- package/node_modules/undici/docs/docs/api/CacheStore.md +294 -98
- package/node_modules/undici/docs/docs/api/Client.md +365 -178
- package/node_modules/undici/docs/docs/api/ClientStats.md +80 -14
- package/node_modules/undici/docs/docs/api/Connector.md +118 -36
- package/node_modules/undici/docs/docs/api/ContentType.md +65 -25
- package/node_modules/undici/docs/docs/api/Cookies.md +125 -47
- package/node_modules/undici/docs/docs/api/Debug.md +34 -18
- package/node_modules/undici/docs/docs/api/DiagnosticsChannel.md +364 -164
- package/node_modules/undici/docs/docs/api/Dispatcher.md +479 -1093
- package/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +101 -87
- package/node_modules/undici/docs/docs/api/Errors.md +503 -40
- package/node_modules/undici/docs/docs/api/EventSource.md +294 -32
- package/node_modules/undici/docs/docs/api/Fetch.md +680 -31
- package/node_modules/undici/docs/docs/api/GlobalInstallation.md +78 -98
- package/node_modules/undici/docs/docs/api/H2CClient.md +298 -176
- package/node_modules/undici/docs/docs/api/Interceptors.md +355 -0
- package/node_modules/undici/docs/docs/api/MockAgent.md +314 -322
- package/node_modules/undici/docs/docs/api/MockCallHistory.md +272 -98
- package/node_modules/undici/docs/docs/api/MockCallHistoryLog.md +189 -26
- package/node_modules/undici/docs/docs/api/MockClient.md +151 -33
- package/node_modules/undici/docs/docs/api/MockErrors.md +56 -5
- package/node_modules/undici/docs/docs/api/MockPool.md +299 -263
- package/node_modules/undici/docs/docs/api/Pool.md +235 -43
- package/node_modules/undici/docs/docs/api/PoolStats.md +119 -13
- package/node_modules/undici/docs/docs/api/ProxyAgent.md +179 -160
- package/node_modules/undici/docs/docs/api/RedirectHandler.md +238 -63
- package/node_modules/undici/docs/docs/api/RetryAgent.md +113 -26
- package/node_modules/undici/docs/docs/api/RetryHandler.md +161 -77
- package/node_modules/undici/docs/docs/api/RoundRobinPool.md +166 -72
- package/node_modules/undici/docs/docs/api/SnapshotAgent.md +264 -542
- package/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md +162 -186
- package/node_modules/undici/docs/docs/api/Util.md +68 -11
- package/node_modules/undici/docs/docs/api/WebSocket.md +475 -80
- package/node_modules/undici/docs/docs/api/api-lifecycle.md +100 -32
- package/node_modules/undici/docs/docs/best-practices/client-certificate.md +2 -0
- package/node_modules/undici/docs/docs/best-practices/crawling.md +3 -1
- package/node_modules/undici/docs/docs/best-practices/migrating-from-v7-to-v8.md +6 -4
- package/node_modules/undici/docs/docs/best-practices/mocking-request.md +9 -7
- package/node_modules/undici/docs/docs/best-practices/proxy.md +3 -1
- package/node_modules/undici/docs/docs/best-practices/undici-vs-builtin-fetch.md +10 -8
- package/node_modules/undici/docs/docs/best-practices/writing-tests.md +2 -0
- package/node_modules/undici/docs/docs/{GettingStarted.md → getting-started.md} +22 -19
- package/node_modules/undici/docs/docs/index.md +779 -0
- package/node_modules/undici/docs/docs/site.json +125 -0
- package/node_modules/undici/docs/docs/type-map.json +79 -0
- package/node_modules/undici/lib/api/api-request.js +7 -1
- package/node_modules/undici/lib/api/readable.js +47 -2
- package/node_modules/undici/lib/core/errors.js +20 -0
- package/node_modules/undici/lib/core/request.js +1 -1
- package/node_modules/undici/lib/core/util.js +24 -1
- package/node_modules/undici/lib/dispatcher/client-h1.js +92 -1
- package/node_modules/undici/lib/dispatcher/client-h2.js +322 -118
- package/node_modules/undici/lib/dispatcher/client.js +6 -2
- package/node_modules/undici/lib/dispatcher/dispatcher-base.js +1 -0
- package/node_modules/undici/lib/dispatcher/proxy-agent.js +42 -7
- package/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +4 -2
- package/node_modules/undici/lib/handler/redirect-handler.js +1 -0
- package/node_modules/undici/lib/handler/retry-handler.js +57 -19
- package/node_modules/undici/lib/util/cache.js +8 -2
- package/node_modules/undici/lib/web/cookies/parse.js +20 -27
- package/node_modules/undici/lib/web/cookies/util.js +1 -1
- package/node_modules/undici/lib/web/eventsource/eventsource.js +7 -18
- package/node_modules/undici/lib/web/eventsource/util.js +32 -1
- package/node_modules/undici/lib/web/fetch/body.js +43 -0
- package/node_modules/undici/lib/web/fetch/constants.js +1 -1
- package/node_modules/undici/lib/web/fetch/index.js +11 -2
- package/node_modules/undici/lib/web/fetch/request.js +1 -0
- package/node_modules/undici/lib/web/fetch/util.js +4 -1
- package/node_modules/undici/lib/web/websocket/receiver.js +20 -3
- package/node_modules/undici/lib/web/websocket/stream/websocketstream.js +8 -1
- package/node_modules/undici/lib/web/websocket/websocket.js +3 -1
- package/node_modules/undici/package.json +1 -1
- package/node_modules/undici/types/client.d.ts +6 -1
- package/node_modules/undici/types/cookies.d.ts +1 -1
- package/node_modules/undici/types/errors.d.ts +10 -0
- package/node_modules/undici/types/fetch.d.ts +1 -0
- package/node_modules/undici/types/handlers.d.ts +2 -0
- package/node_modules/undici/types/proxy-agent.d.ts +7 -0
- package/package.json +4 -4
- package/react/styles.css +510 -5
- package/react/styles.source.css +850 -0
- package/node_modules/hono/dist/tsconfig.build.tsbuildinfo +0 -1
- package/node_modules/tailwindcss/dist/chunk-XVOTX5KS.mjs +0 -1
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
{
|
|
2
|
+
"sidebar": [
|
|
3
|
+
{
|
|
4
|
+
"groupName": "Documentation",
|
|
5
|
+
"items": [
|
|
6
|
+
{ "link": "/", "label": "Home" },
|
|
7
|
+
{ "link": "/getting-started", "label": "Getting Started" }
|
|
8
|
+
]
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"groupName": "API",
|
|
12
|
+
"items": [
|
|
13
|
+
{
|
|
14
|
+
"label": "Core",
|
|
15
|
+
"items": [
|
|
16
|
+
{ "link": "/api/Dispatcher", "label": "Dispatcher" },
|
|
17
|
+
{ "link": "/api/Client", "label": "Client" },
|
|
18
|
+
{ "link": "/api/H2CClient", "label": "H2CClient" },
|
|
19
|
+
{ "link": "/api/Pool", "label": "Pool" },
|
|
20
|
+
{ "link": "/api/BalancedPool", "label": "BalancedPool" },
|
|
21
|
+
{ "link": "/api/RoundRobinPool", "label": "RoundRobinPool" },
|
|
22
|
+
{ "link": "/api/Agent", "label": "Agent" },
|
|
23
|
+
{ "link": "/api/PoolStats", "label": "PoolStats" },
|
|
24
|
+
{ "link": "/api/Connector", "label": "Connector" }
|
|
25
|
+
]
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"label": "Proxy & Agents",
|
|
29
|
+
"items": [
|
|
30
|
+
{ "link": "/api/ProxyAgent", "label": "ProxyAgent" },
|
|
31
|
+
{
|
|
32
|
+
"link": "/api/EnvHttpProxyAgent",
|
|
33
|
+
"label": "EnvHttpProxyAgent"
|
|
34
|
+
},
|
|
35
|
+
{ "link": "/api/Socks5ProxyAgent", "label": "Socks5ProxyAgent" },
|
|
36
|
+
{ "link": "/api/RetryAgent", "label": "RetryAgent" }
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"label": "Web Standards",
|
|
41
|
+
"items": [
|
|
42
|
+
{ "link": "/api/Fetch", "label": "Fetch" },
|
|
43
|
+
{ "link": "/api/EventSource", "label": "EventSource" },
|
|
44
|
+
{ "link": "/api/WebSocket", "label": "WebSocket" },
|
|
45
|
+
{ "link": "/api/Cookies", "label": "Cookies" },
|
|
46
|
+
{ "link": "/api/CacheStorage", "label": "CacheStorage" },
|
|
47
|
+
{ "link": "/api/ContentType", "label": "MIME Type Parsing" }
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"label": "Mocking",
|
|
52
|
+
"items": [
|
|
53
|
+
{ "link": "/api/MockClient", "label": "MockClient" },
|
|
54
|
+
{ "link": "/api/MockPool", "label": "MockPool" },
|
|
55
|
+
{ "link": "/api/MockAgent", "label": "MockAgent" },
|
|
56
|
+
{ "link": "/api/SnapshotAgent", "label": "SnapshotAgent" },
|
|
57
|
+
{ "link": "/api/MockCallHistory", "label": "MockCallHistory" },
|
|
58
|
+
{
|
|
59
|
+
"link": "/api/MockCallHistoryLog",
|
|
60
|
+
"label": "MockCallHistoryLog"
|
|
61
|
+
},
|
|
62
|
+
{ "link": "/api/MockErrors", "label": "MockErrors" }
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"label": "Interceptors",
|
|
67
|
+
"items": [
|
|
68
|
+
{ "link": "/api/Interceptors", "label": "Interceptors" }
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"label": "Handlers",
|
|
73
|
+
"items": [
|
|
74
|
+
{ "link": "/api/RedirectHandler", "label": "RedirectHandler" },
|
|
75
|
+
{ "link": "/api/RetryHandler", "label": "RetryHandler" }
|
|
76
|
+
]
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"label": "Diagnostics & Utilities",
|
|
80
|
+
"items": [
|
|
81
|
+
{ "link": "/api/Errors", "label": "Errors" },
|
|
82
|
+
{
|
|
83
|
+
"link": "/api/DiagnosticsChannel",
|
|
84
|
+
"label": "Diagnostics Channel Support"
|
|
85
|
+
},
|
|
86
|
+
{ "link": "/api/Debug", "label": "Debug" },
|
|
87
|
+
{ "link": "/api/Util", "label": "Util" },
|
|
88
|
+
{
|
|
89
|
+
"link": "/api/GlobalInstallation",
|
|
90
|
+
"label": "Global Installation"
|
|
91
|
+
},
|
|
92
|
+
{ "link": "/api/api-lifecycle", "label": "API Lifecycle" }
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
]
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"groupName": "Best Practices",
|
|
99
|
+
"items": [
|
|
100
|
+
{
|
|
101
|
+
"link": "/best-practices/undici-vs-builtin-fetch",
|
|
102
|
+
"label": "Undici vs. Built-in Fetch"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"link": "/best-practices/migrating-from-v7-to-v8",
|
|
106
|
+
"label": "Migrating from Undici 7 to 8"
|
|
107
|
+
},
|
|
108
|
+
{ "link": "/best-practices/proxy", "label": "Proxy" },
|
|
109
|
+
{
|
|
110
|
+
"link": "/best-practices/client-certificate",
|
|
111
|
+
"label": "Client Certificate"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"link": "/best-practices/writing-tests",
|
|
115
|
+
"label": "Writing Tests"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"link": "/best-practices/mocking-request",
|
|
119
|
+
"label": "Mocking Request"
|
|
120
|
+
},
|
|
121
|
+
{ "link": "/best-practices/crawling", "label": "Crawling" }
|
|
122
|
+
]
|
|
123
|
+
}
|
|
124
|
+
]
|
|
125
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
{
|
|
2
|
+
"AbortError": "/api/Errors.md#class-aborterror",
|
|
3
|
+
"Agent": "/api/Agent.md#class-agent",
|
|
4
|
+
"AgentDispatchOptions": "/api/Agent.md#agentdispatchoptions-handler",
|
|
5
|
+
"AgentOptions": "/api/Agent.md#new-agentoptions",
|
|
6
|
+
"BalancedPool": "/api/BalancedPool.md#class-balancedpool",
|
|
7
|
+
"BalancedPoolOptions": "/api/BalancedPool.md#parameter-balancedpooloptions",
|
|
8
|
+
"BodyMixin": "/api/Fetch.md#new-formdata",
|
|
9
|
+
"Buffer": "https://nodejs.org/api/buffer.html#class-buffer",
|
|
10
|
+
"BuildOptions": "/api/Connector.md#buildconnectoroptions",
|
|
11
|
+
"CacheKey": "/api/CacheStore.md#cachekey",
|
|
12
|
+
"CacheStore": "/api/CacheStore.md#new-memorycachestoreoptions",
|
|
13
|
+
"CacheValue": "/api/CacheStore.md#cachevalue",
|
|
14
|
+
"ClientDestroyedError": "/api/Errors.md#class-clientdestroyederror",
|
|
15
|
+
"ClientOptions": "/api/Client.md#new-clienturl-options",
|
|
16
|
+
"ClientStats": "/api/ClientStats.md#class-clientstats",
|
|
17
|
+
"ConnectOptions": "/api/Dispatcher.md#class-dispatcher",
|
|
18
|
+
"Cookie": "/api/Cookies.md#cookie",
|
|
19
|
+
"DispatchController": "/api/Dispatcher.md#class-dispatcher",
|
|
20
|
+
"DispatchHandler": "/api/Dispatcher.md#class-dispatcher",
|
|
21
|
+
"DispatchOptions": "/api/Dispatcher.md#class-dispatcher",
|
|
22
|
+
"Dispatcher": "/api/Dispatcher.md#class-dispatcher",
|
|
23
|
+
"Duplex": "https://nodejs.org/api/stream.html#class-streamduplex",
|
|
24
|
+
"EnvHttpProxyAgent": "/api/EnvHttpProxyAgent.md#class-envhttpproxyagent",
|
|
25
|
+
"EnvHttpProxyAgentOptions": "/api/EnvHttpProxyAgent.md#new-envhttpproxyagentoptions",
|
|
26
|
+
"EventEmitter": "https://nodejs.org/api/events.html#class-eventemitter",
|
|
27
|
+
"GetResult": "/api/CacheStore.md#getresult",
|
|
28
|
+
"H2CClientOptions": "/api/H2CClient.md#new-h2cclienturl-options",
|
|
29
|
+
"HeadersInit": "https://developer.mozilla.org/docs/Web/API/Headers/Headers",
|
|
30
|
+
"InvalidArgumentError": "/api/Errors.md#class-invalidargumenterror",
|
|
31
|
+
"Iterable": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols",
|
|
32
|
+
"MaxOriginsReachedError": "/api/Errors.md#class-maxoriginsreachederror",
|
|
33
|
+
"MockAgent": "/api/MockAgent.md#class-mockagent",
|
|
34
|
+
"MockAgentOptions": "/api/MockAgent.md#parameter-mockagentoptions",
|
|
35
|
+
"MockCallHistory": "/api/MockCallHistory.md#class-mockcallhistory",
|
|
36
|
+
"MockCallHistoryLog": "/api/MockCallHistoryLog.md#class-mockcallhistorylog",
|
|
37
|
+
"MockClient": "/api/MockClient.md#class-mockclient",
|
|
38
|
+
"MockClientOptions": "/api/MockClient.md#parameter-mockclientoptions",
|
|
39
|
+
"MockInterceptor": "/api/MockPool.md#return-mockinterceptor",
|
|
40
|
+
"MockInterceptor.Options": "/api/MockPool.md#parameter-mockpoolinterceptoptions",
|
|
41
|
+
"MockPool": "/api/MockPool.md#class-mockpool",
|
|
42
|
+
"MockPoolInterceptOptions": "/api/MockPool.md#parameter-mockpoolinterceptoptions",
|
|
43
|
+
"MockPoolOptions": "/api/MockPool.md#parameter-mockpooloptions",
|
|
44
|
+
"MockResponseOptions": "/api/MockPool.md#parameter-mockresponseoptions",
|
|
45
|
+
"MockScope": "/api/MockPool.md#return-mockscope",
|
|
46
|
+
"PendingInterceptor": "/api/MockAgent.md#new-mockagentoptions",
|
|
47
|
+
"PipelineOptions": "/api/Dispatcher.md#class-dispatcher",
|
|
48
|
+
"Pool": "/api/Pool.md#class-pool",
|
|
49
|
+
"PoolOptions": "/api/Pool.md#new-poolurl-options",
|
|
50
|
+
"PoolStats": "/api/PoolStats.md#class-poolstats",
|
|
51
|
+
"ProxyAgent": "/api/ProxyAgent.md#class-proxyagent",
|
|
52
|
+
"ProxyAgentOptions": "/api/ProxyAgent.md#new-proxyagentoptions",
|
|
53
|
+
"Readable": "https://nodejs.org/api/stream.html#class-streamreadable",
|
|
54
|
+
"Record": "https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type",
|
|
55
|
+
"RequestInit": "/api/Fetch.md#new-formdata",
|
|
56
|
+
"RequestOptions": "/api/Dispatcher.md#class-dispatcher",
|
|
57
|
+
"ResponseInit": "/api/Fetch.md#new-formdata",
|
|
58
|
+
"RetryContext": "/api/RetryHandler.md#retrycontext",
|
|
59
|
+
"RetryHandler": "/api/RetryHandler.md#class-retryhandler",
|
|
60
|
+
"RetryHandlers": "/api/RetryHandler.md#parameter-retryhandlers",
|
|
61
|
+
"RetryOptions": "/api/RetryHandler.md#retryoptions",
|
|
62
|
+
"RetryState": "/api/RetryHandler.md#retrystate",
|
|
63
|
+
"RoundRobinPoolOptions": "/api/RoundRobinPool.md#parameter-roundrobinpooloptions",
|
|
64
|
+
"SnapshotRecorder": "/api/SnapshotAgent.md#new-snapshotagentoptions",
|
|
65
|
+
"Socket": "https://nodejs.org/api/net.html#class-netsocket",
|
|
66
|
+
"SocketInfo": "/api/Errors.md#new-requestretryerrormessage-code-options",
|
|
67
|
+
"StreamOptions": "/api/Dispatcher.md#class-dispatcher",
|
|
68
|
+
"TLSSocket": "https://nodejs.org/api/tls.html#class-tlstlssocket",
|
|
69
|
+
"UndiciError": "/api/Errors.md#class-undicierror",
|
|
70
|
+
"UndiciHeaders": "/api/Dispatcher.md#class-dispatcher",
|
|
71
|
+
"UpgradeOptions": "/api/Dispatcher.md#class-dispatcher",
|
|
72
|
+
"UrlObject": "/index.md#urlobject",
|
|
73
|
+
"WebSocketInit": "/api/WebSocket.md#new-websocketurl-protocols",
|
|
74
|
+
"WebSocketStreamOptions": "/api/WebSocket.md#new-websocketurl-protocols",
|
|
75
|
+
"Writable": "https://nodejs.org/api/stream.html#class-streamwritable",
|
|
76
|
+
"buildConnector.BuildOptions": "/api/Connector.md#buildconnectoroptions",
|
|
77
|
+
"net.Socket": "https://nodejs.org/api/net.html#class-netsocket",
|
|
78
|
+
"stream.Readable": "https://nodejs.org/api/stream.html#class-streamreadable"
|
|
79
|
+
}
|
|
@@ -66,7 +66,13 @@ class RequestHandler extends AsyncResource {
|
|
|
66
66
|
this.removeAbortListener = util.addAbortListener(signal, () => {
|
|
67
67
|
this.reason = signal.reason ?? new RequestAbortedError()
|
|
68
68
|
if (this.res) {
|
|
69
|
-
|
|
69
|
+
// Null the reference before destroying, mirroring onResponseError, so
|
|
70
|
+
// that chunks flushed after the abort (e.g. an async decompressor
|
|
71
|
+
// flush) are dropped by the `!this.res` guard in onResponseData
|
|
72
|
+
// instead of being pushed into the torn-down stream.
|
|
73
|
+
const res = this.res
|
|
74
|
+
this.res = null
|
|
75
|
+
util.destroy(res.on('error', noop), this.reason)
|
|
70
76
|
} else if (this.abort) {
|
|
71
77
|
this.abort(this.reason)
|
|
72
78
|
}
|
|
@@ -15,6 +15,7 @@ const kContentType = Symbol('kContentType')
|
|
|
15
15
|
const kContentLength = Symbol('kContentLength')
|
|
16
16
|
const kUsed = Symbol('kUsed')
|
|
17
17
|
const kBytesRead = Symbol('kBytesRead')
|
|
18
|
+
const kPreservedBuffer = Symbol('kPreservedBuffer')
|
|
18
19
|
|
|
19
20
|
const noop = () => {}
|
|
20
21
|
|
|
@@ -325,7 +326,37 @@ class BodyReadable extends Readable {
|
|
|
325
326
|
*/
|
|
326
327
|
setEncoding (encoding) {
|
|
327
328
|
if (Buffer.isEncoding(encoding)) {
|
|
328
|
-
|
|
329
|
+
// Preserve raw Buffer chunks for the consume path (body.text(),
|
|
330
|
+
// body.json(), etc.) before super.setEncoding() replaces them
|
|
331
|
+
// with decoded strings. Without this, the consume path would
|
|
332
|
+
// lose access to the original bytes — some of which may be held
|
|
333
|
+
// by the decoder for incomplete multi-byte sequences, and the
|
|
334
|
+
// rest converted to strings that can't be safely concatenated
|
|
335
|
+
// byte-wise.
|
|
336
|
+
const state = this._readableState
|
|
337
|
+
const buffer = state.buffer
|
|
338
|
+
if (buffer && state.length > 0) {
|
|
339
|
+
const bufferIndex = state.bufferIndex ?? 0
|
|
340
|
+
const preserved = []
|
|
341
|
+
const source = typeof buffer.slice === 'function'
|
|
342
|
+
? buffer.slice(bufferIndex)
|
|
343
|
+
: buffer
|
|
344
|
+
for (const data of source) {
|
|
345
|
+
if (Buffer.isBuffer(data)) {
|
|
346
|
+
preserved.push(data)
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
if (preserved.length > 0) {
|
|
350
|
+
this[kPreservedBuffer] = (this[kPreservedBuffer] || []).concat(preserved)
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
// Delegate to Node.js Readable.setEncoding() which initializes a
|
|
355
|
+
// StringDecoder and re-encodes already-buffered chunks. This properly
|
|
356
|
+
// handles multi-byte sequences split at chunk boundaries for the
|
|
357
|
+
// for-await / on('data') paths. Without this, Node.js uses
|
|
358
|
+
// buf.toString(encoding) on each chunk, producing U+FFFD for split chars.
|
|
359
|
+
super.setEncoding(encoding)
|
|
329
360
|
}
|
|
330
361
|
return this
|
|
331
362
|
}
|
|
@@ -433,7 +464,17 @@ function consumeStart (consume) {
|
|
|
433
464
|
|
|
434
465
|
const { _readableState: state } = consume.stream
|
|
435
466
|
|
|
436
|
-
|
|
467
|
+
// If setEncoding() was called, state.buffer may contain decoded strings
|
|
468
|
+
// (which would break Buffer.concat in chunksDecode). Use the preserved
|
|
469
|
+
// raw Buffers (saved before super.setEncoding() in setEncoding()) for
|
|
470
|
+
// byte-level accurate consumption. Otherwise read from state.buffer.
|
|
471
|
+
const preserved = consume.stream[kPreservedBuffer]
|
|
472
|
+
if (preserved && preserved.length > 0) {
|
|
473
|
+
for (const chunk of preserved) {
|
|
474
|
+
consumePush(consume, chunk)
|
|
475
|
+
}
|
|
476
|
+
consume.stream[kPreservedBuffer] = null
|
|
477
|
+
} else if (state.bufferIndex) {
|
|
437
478
|
const start = state.bufferIndex
|
|
438
479
|
const end = state.buffer.length
|
|
439
480
|
for (let n = start; n < end; n++) {
|
|
@@ -546,6 +587,10 @@ function consumeEnd (consume, encoding) {
|
|
|
546
587
|
* @returns {void}
|
|
547
588
|
*/
|
|
548
589
|
function consumePush (consume, chunk) {
|
|
590
|
+
if (consume.body === null) {
|
|
591
|
+
return
|
|
592
|
+
}
|
|
593
|
+
|
|
549
594
|
consume.length += chunk.length
|
|
550
595
|
consume.body.push(chunk)
|
|
551
596
|
}
|
|
@@ -403,6 +403,25 @@ class SecureProxyConnectionError extends UndiciError {
|
|
|
403
403
|
}
|
|
404
404
|
}
|
|
405
405
|
|
|
406
|
+
const kProxyConnectionError = Symbol.for('undici.error.UND_ERR_PRX_CONN')
|
|
407
|
+
class ProxyConnectionError extends UndiciError {
|
|
408
|
+
constructor (cause, message, options = {}) {
|
|
409
|
+
super(message, { cause, ...options })
|
|
410
|
+
this.name = 'ProxyConnectionError'
|
|
411
|
+
this.message = message || 'Proxy Connection failed'
|
|
412
|
+
this.code = 'UND_ERR_PRX_CONN'
|
|
413
|
+
this.cause = cause
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
static [Symbol.hasInstance] (instance) {
|
|
417
|
+
return instance && instance[kProxyConnectionError] === true
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
get [kProxyConnectionError] () {
|
|
421
|
+
return true
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
|
|
406
425
|
const kMaxOriginsReachedError = Symbol.for('undici.error.UND_ERR_MAX_ORIGINS_REACHED')
|
|
407
426
|
class MaxOriginsReachedError extends UndiciError {
|
|
408
427
|
constructor (message) {
|
|
@@ -471,6 +490,7 @@ module.exports = {
|
|
|
471
490
|
RequestRetryError,
|
|
472
491
|
ResponseError,
|
|
473
492
|
SecureProxyConnectionError,
|
|
493
|
+
ProxyConnectionError,
|
|
474
494
|
MaxOriginsReachedError,
|
|
475
495
|
Socks5ProxyError,
|
|
476
496
|
MessageSizeExceededError
|
|
@@ -225,7 +225,7 @@ class Request {
|
|
|
225
225
|
this.protocol = getProtocolFromUrlString(origin)
|
|
226
226
|
|
|
227
227
|
this.idempotent = idempotent == null
|
|
228
|
-
? method === 'HEAD' || method === 'GET'
|
|
228
|
+
? method === 'HEAD' || method === 'GET' || method === 'QUERY'
|
|
229
229
|
: idempotent
|
|
230
230
|
|
|
231
231
|
this.blocking = blocking ?? this.method !== 'HEAD'
|
|
@@ -919,11 +919,32 @@ function onConnectTimeout (socket, opts) {
|
|
|
919
919
|
destroy(socket, new ConnectTimeoutError(message))
|
|
920
920
|
}
|
|
921
921
|
|
|
922
|
+
let lastUrlString = null
|
|
923
|
+
let lastProtocol = null
|
|
924
|
+
|
|
922
925
|
/**
|
|
923
926
|
* @param {string} urlString
|
|
924
927
|
* @returns {string}
|
|
925
928
|
*/
|
|
926
929
|
function getProtocolFromUrlString (urlString) {
|
|
930
|
+
// Requests are typically dispatched against the same origin over and over,
|
|
931
|
+
// so cache the last (urlString, protocol) pair to skip re-parsing.
|
|
932
|
+
if (urlString === lastUrlString) {
|
|
933
|
+
return lastProtocol
|
|
934
|
+
}
|
|
935
|
+
|
|
936
|
+
const protocol = getProtocolFromUrlStringSlow(urlString)
|
|
937
|
+
lastUrlString = urlString
|
|
938
|
+
lastProtocol = protocol
|
|
939
|
+
|
|
940
|
+
return protocol
|
|
941
|
+
}
|
|
942
|
+
|
|
943
|
+
/**
|
|
944
|
+
* @param {string} urlString
|
|
945
|
+
* @returns {string}
|
|
946
|
+
*/
|
|
947
|
+
function getProtocolFromUrlStringSlow (urlString) {
|
|
927
948
|
if (
|
|
928
949
|
urlString[0] === 'h' &&
|
|
929
950
|
urlString[1] === 't' &&
|
|
@@ -960,7 +981,9 @@ const normalizedMethodRecordsBase = {
|
|
|
960
981
|
post: 'POST',
|
|
961
982
|
POST: 'POST',
|
|
962
983
|
put: 'PUT',
|
|
963
|
-
PUT: 'PUT'
|
|
984
|
+
PUT: 'PUT',
|
|
985
|
+
query: 'QUERY',
|
|
986
|
+
QUERY: 'QUERY'
|
|
964
987
|
}
|
|
965
988
|
|
|
966
989
|
const normalizedMethodRecords = {
|
|
@@ -57,6 +57,9 @@ const constants = require('../llhttp/constants.js')
|
|
|
57
57
|
const EMPTY_BUF = Buffer.alloc(0)
|
|
58
58
|
const FastBuffer = Buffer[Symbol.species]
|
|
59
59
|
const removeAllListeners = util.removeAllListeners
|
|
60
|
+
const kIdleSocketValidation = Symbol('kIdleSocketValidation')
|
|
61
|
+
const kIdleSocketValidationTimeout = Symbol('kIdleSocketValidationTimeout')
|
|
62
|
+
const kSocketUsed = Symbol('kSocketUsed')
|
|
60
63
|
|
|
61
64
|
let extractBody
|
|
62
65
|
|
|
@@ -374,6 +377,29 @@ class Parser {
|
|
|
374
377
|
|
|
375
378
|
const { llhttp } = this
|
|
376
379
|
|
|
380
|
+
// The peer closed the connection. If the body parser was paused by
|
|
381
|
+
// backpressure we must finish parsing before signalling EOF, otherwise
|
|
382
|
+
// llhttp_finish() would crash (it used to assert !paused) or report a
|
|
383
|
+
// half-parsed message. Backpressure is advisory here: onData keeps buffering
|
|
384
|
+
// delivered bytes into the response stream, so resume across pauses and
|
|
385
|
+
// drain whatever is still buffered on the socket. A Content-Length/chunked
|
|
386
|
+
// body reaches on_message_complete during execute(); an EOF-delimited body
|
|
387
|
+
// stays paused (its length is unknown) and is completed by llhttp_finish().
|
|
388
|
+
if (this.paused) {
|
|
389
|
+
let data
|
|
390
|
+
do {
|
|
391
|
+
llhttp.llhttp_resume(this.ptr)
|
|
392
|
+
this.paused = false
|
|
393
|
+
data = this.socket.read() || EMPTY_BUF
|
|
394
|
+
this.execute(data)
|
|
395
|
+
} while (this.paused && data.length > 0)
|
|
396
|
+
|
|
397
|
+
if (this.paused) {
|
|
398
|
+
llhttp.llhttp_resume(this.ptr)
|
|
399
|
+
this.paused = false
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
|
|
377
403
|
let ret
|
|
378
404
|
|
|
379
405
|
try {
|
|
@@ -449,6 +475,11 @@ class Parser {
|
|
|
449
475
|
return -1
|
|
450
476
|
}
|
|
451
477
|
|
|
478
|
+
if (client[kRunning] === 0) {
|
|
479
|
+
util.destroy(socket, new SocketError('bad response', util.getSocketInfo(socket)))
|
|
480
|
+
return -1
|
|
481
|
+
}
|
|
482
|
+
|
|
452
483
|
const request = client[kQueue][client[kRunningIdx]]
|
|
453
484
|
if (!request) {
|
|
454
485
|
return -1
|
|
@@ -584,6 +615,11 @@ class Parser {
|
|
|
584
615
|
return -1
|
|
585
616
|
}
|
|
586
617
|
|
|
618
|
+
if (client[kRunning] === 0) {
|
|
619
|
+
util.destroy(socket, new SocketError('bad response', util.getSocketInfo(socket)))
|
|
620
|
+
return -1
|
|
621
|
+
}
|
|
622
|
+
|
|
587
623
|
const request = client[kQueue][client[kRunningIdx]]
|
|
588
624
|
|
|
589
625
|
if (!request) {
|
|
@@ -762,6 +798,7 @@ class Parser {
|
|
|
762
798
|
request.onResponseEnd(headers)
|
|
763
799
|
|
|
764
800
|
client[kQueue][client[kRunningIdx]++] = null
|
|
801
|
+
socket[kSocketUsed] = client[kPending] === 0
|
|
765
802
|
|
|
766
803
|
if (socket[kWriting]) {
|
|
767
804
|
assert(client[kRunning] === 0)
|
|
@@ -838,6 +875,9 @@ function connectH1 (client, socket) {
|
|
|
838
875
|
socket[kWriting] = false
|
|
839
876
|
socket[kReset] = false
|
|
840
877
|
socket[kBlocking] = false
|
|
878
|
+
socket[kIdleSocketValidation] = 0
|
|
879
|
+
socket[kIdleSocketValidationTimeout] = null
|
|
880
|
+
socket[kSocketUsed] = false
|
|
841
881
|
socket[kParser] = new Parser(client, socket, llhttpInstance)
|
|
842
882
|
|
|
843
883
|
util.addListener(socket, 'error', onHttpSocketError)
|
|
@@ -880,7 +920,7 @@ function connectH1 (client, socket) {
|
|
|
880
920
|
* @returns {boolean}
|
|
881
921
|
*/
|
|
882
922
|
busy (request) {
|
|
883
|
-
if (socket[kWriting] || socket[kReset] || socket[kBlocking]) {
|
|
923
|
+
if (socket[kWriting] || socket[kReset] || socket[kBlocking] || socket[kIdleSocketValidation] === 1) {
|
|
884
924
|
return true
|
|
885
925
|
}
|
|
886
926
|
|
|
@@ -960,6 +1000,8 @@ function onHttpSocketEnd () {
|
|
|
960
1000
|
function onHttpSocketClose () {
|
|
961
1001
|
const parser = this[kParser]
|
|
962
1002
|
|
|
1003
|
+
clearIdleSocketValidation(this)
|
|
1004
|
+
|
|
963
1005
|
if (parser) {
|
|
964
1006
|
if (!this[kError] && parser.statusCode && !parser.shouldKeepAlive) {
|
|
965
1007
|
this[kError] = parser.finish() || this[kError]
|
|
@@ -1006,6 +1048,28 @@ function onSocketClose () {
|
|
|
1006
1048
|
this[kClosed] = true
|
|
1007
1049
|
}
|
|
1008
1050
|
|
|
1051
|
+
function clearIdleSocketValidation (socket) {
|
|
1052
|
+
if (socket[kIdleSocketValidationTimeout]) {
|
|
1053
|
+
clearTimeout(socket[kIdleSocketValidationTimeout])
|
|
1054
|
+
socket[kIdleSocketValidationTimeout] = null
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
socket[kIdleSocketValidation] = 0
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
function scheduleIdleSocketValidation (client, socket) {
|
|
1061
|
+
socket[kIdleSocketValidation] = 1
|
|
1062
|
+
socket[kIdleSocketValidationTimeout] = setTimeout(() => {
|
|
1063
|
+
socket[kIdleSocketValidationTimeout] = null
|
|
1064
|
+
socket[kIdleSocketValidation] = 2
|
|
1065
|
+
|
|
1066
|
+
if (client[kSocket] === socket && !socket.destroyed) {
|
|
1067
|
+
client[kResume]()
|
|
1068
|
+
}
|
|
1069
|
+
}, 0)
|
|
1070
|
+
socket[kIdleSocketValidationTimeout].unref?.()
|
|
1071
|
+
}
|
|
1072
|
+
|
|
1009
1073
|
/**
|
|
1010
1074
|
* @param {import('./client.js')} client
|
|
1011
1075
|
*/
|
|
@@ -1023,6 +1087,32 @@ function resumeH1 (client) {
|
|
|
1023
1087
|
socket[kNoRef] = false
|
|
1024
1088
|
}
|
|
1025
1089
|
|
|
1090
|
+
if (client[kRunning] === 0 && client[kPending] > 0 && socket[kSocketUsed]) {
|
|
1091
|
+
if (socket[kIdleSocketValidation] === 0) {
|
|
1092
|
+
scheduleIdleSocketValidation(client, socket)
|
|
1093
|
+
socket[kParser].readMore()
|
|
1094
|
+
if (socket.destroyed) {
|
|
1095
|
+
return
|
|
1096
|
+
}
|
|
1097
|
+
return
|
|
1098
|
+
}
|
|
1099
|
+
|
|
1100
|
+
if (socket[kIdleSocketValidation] === 1) {
|
|
1101
|
+
socket[kParser].readMore()
|
|
1102
|
+
if (socket.destroyed) {
|
|
1103
|
+
return
|
|
1104
|
+
}
|
|
1105
|
+
return
|
|
1106
|
+
}
|
|
1107
|
+
}
|
|
1108
|
+
|
|
1109
|
+
if (client[kRunning] === 0) {
|
|
1110
|
+
socket[kParser].readMore()
|
|
1111
|
+
if (socket.destroyed) {
|
|
1112
|
+
return
|
|
1113
|
+
}
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1026
1116
|
if (client[kSize] === 0) {
|
|
1027
1117
|
if (socket[kParser].timeoutType !== TIMEOUT_KEEP_ALIVE) {
|
|
1028
1118
|
socket[kParser].setTimeout(client[kKeepAliveTimeoutValue], TIMEOUT_KEEP_ALIVE)
|
|
@@ -1121,6 +1211,7 @@ function writeH1 (client, request) {
|
|
|
1121
1211
|
}
|
|
1122
1212
|
|
|
1123
1213
|
const socket = client[kSocket]
|
|
1214
|
+
clearIdleSocketValidation(socket)
|
|
1124
1215
|
|
|
1125
1216
|
/**
|
|
1126
1217
|
* @param {Error} [err]
|