@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.
Files changed (197) hide show
  1. package/dist/commands/author-loop.d.ts.map +1 -1
  2. package/dist/commands/author-loop.js +2 -2
  3. package/dist/commands/author-loop.js.map +1 -1
  4. package/dist/commands/catalog-dispatch.d.ts.map +1 -1
  5. package/dist/commands/catalog-dispatch.js +21 -2
  6. package/dist/commands/catalog-dispatch.js.map +1 -1
  7. package/dist/commands/deploy-ops.d.ts.map +1 -1
  8. package/dist/commands/deploy-ops.js +28 -11
  9. package/dist/commands/deploy-ops.js.map +1 -1
  10. package/dist/first-run.d.ts +11 -0
  11. package/dist/first-run.d.ts.map +1 -1
  12. package/dist/first-run.js +19 -4
  13. package/dist/first-run.js.map +1 -1
  14. package/dist/project-scaffold-templates.d.ts +11 -0
  15. package/dist/project-scaffold-templates.d.ts.map +1 -0
  16. package/dist/project-scaffold-templates.js +359 -0
  17. package/dist/project-scaffold-templates.js.map +1 -0
  18. package/dist/project.d.ts.map +1 -1
  19. package/dist/project.js +1 -323
  20. package/dist/project.js.map +1 -1
  21. package/dist/react.d.ts +2 -2
  22. package/dist/react.d.ts.map +1 -1
  23. package/dist/react.js +1 -1
  24. package/dist/react.js.map +1 -1
  25. package/dist/validate.d.ts +12 -0
  26. package/dist/validate.d.ts.map +1 -1
  27. package/dist/validate.js +11 -0
  28. package/dist/validate.js.map +1 -1
  29. package/node_modules/@noodle-borg/agent-kit/dist/skill-content.d.ts.map +1 -1
  30. package/node_modules/@noodle-borg/agent-kit/dist/skill-content.js +6 -9
  31. package/node_modules/@noodle-borg/agent-kit/dist/skill-content.js.map +1 -1
  32. package/node_modules/@noodle-borg/agent-kit/package.json +1 -1
  33. package/node_modules/@noodle-borg/authoring/dist/index.d.ts +3 -3
  34. package/node_modules/@noodle-borg/authoring/dist/index.d.ts.map +1 -1
  35. package/node_modules/@noodle-borg/authoring/dist/index.js +1 -1
  36. package/node_modules/@noodle-borg/authoring/dist/index.js.map +1 -1
  37. package/node_modules/@noodle-borg/authoring/dist/react/components.d.ts +302 -7
  38. package/node_modules/@noodle-borg/authoring/dist/react/components.d.ts.map +1 -1
  39. package/node_modules/@noodle-borg/authoring/dist/react/components.js +39 -7
  40. package/node_modules/@noodle-borg/authoring/dist/react/components.js.map +1 -1
  41. package/node_modules/@noodle-borg/authoring/dist/react/index.d.ts +4 -2
  42. package/node_modules/@noodle-borg/authoring/dist/react/index.d.ts.map +1 -1
  43. package/node_modules/@noodle-borg/authoring/dist/react/index.js +2 -1
  44. package/node_modules/@noodle-borg/authoring/dist/react/index.js.map +1 -1
  45. package/node_modules/@noodle-borg/authoring/dist/react/semantic-components.d.ts +2618 -0
  46. package/node_modules/@noodle-borg/authoring/dist/react/semantic-components.d.ts.map +1 -0
  47. package/node_modules/@noodle-borg/authoring/dist/react/semantic-components.js +110 -0
  48. package/node_modules/@noodle-borg/authoring/dist/react/semantic-components.js.map +1 -0
  49. package/node_modules/@noodle-borg/authoring/dist/react.d.ts +2 -2
  50. package/node_modules/@noodle-borg/authoring/dist/react.d.ts.map +1 -1
  51. package/node_modules/@noodle-borg/authoring/dist/react.js +1 -1
  52. package/node_modules/@noodle-borg/authoring/dist/react.js.map +1 -1
  53. package/node_modules/@noodle-borg/authoring/dist/recording.d.ts +1 -1
  54. package/node_modules/@noodle-borg/authoring/dist/recording.d.ts.map +1 -1
  55. package/node_modules/@noodle-borg/authoring/dist/recording.js +14 -1
  56. package/node_modules/@noodle-borg/authoring/dist/recording.js.map +1 -1
  57. package/node_modules/@noodle-borg/authoring/dist/server.d.ts +25 -2
  58. package/node_modules/@noodle-borg/authoring/dist/server.d.ts.map +1 -1
  59. package/node_modules/@noodle-borg/authoring/dist/server.js +7 -3
  60. package/node_modules/@noodle-borg/authoring/dist/server.js.map +1 -1
  61. package/node_modules/@noodle-borg/compiler/dist/compile.d.ts.map +1 -1
  62. package/node_modules/@noodle-borg/compiler/dist/compile.js +20 -8
  63. package/node_modules/@noodle-borg/compiler/dist/compile.js.map +1 -1
  64. package/node_modules/@noodle-borg/compiler/dist/manifest/schema.d.ts +2 -0
  65. package/node_modules/@noodle-borg/compiler/dist/manifest/schema.d.ts.map +1 -1
  66. package/node_modules/@noodle-borg/compiler/dist/manifest/schema.js +6 -0
  67. package/node_modules/@noodle-borg/compiler/dist/manifest/schema.js.map +1 -1
  68. package/node_modules/@noodle-borg/connector-http/package.json +1 -1
  69. package/node_modules/@noodle-borg/protocol/dist/mapping.d.ts.map +1 -1
  70. package/node_modules/@noodle-borg/protocol/dist/mapping.js +8 -0
  71. package/node_modules/@noodle-borg/protocol/dist/mapping.js.map +1 -1
  72. package/node_modules/hono/dist/adapter/aws-lambda/handler.js +15 -21
  73. package/node_modules/hono/dist/adapter/bun/websocket.js +3 -1
  74. package/node_modules/hono/dist/adapter/lambda-edge/handler.js +8 -2
  75. package/node_modules/hono/dist/cjs/adapter/aws-lambda/handler.js +15 -21
  76. package/node_modules/hono/dist/cjs/adapter/bun/websocket.js +3 -1
  77. package/node_modules/hono/dist/cjs/adapter/lambda-edge/handler.js +8 -2
  78. package/node_modules/hono/dist/cjs/helper/css/common.js +3 -1
  79. package/node_modules/hono/dist/cjs/helper/css/index.js +9 -1
  80. package/node_modules/hono/dist/cjs/jsx/base.js +8 -14
  81. package/node_modules/hono/dist/cjs/jsx/components.js +41 -21
  82. package/node_modules/hono/dist/cjs/jsx/context.js +131 -5
  83. package/node_modules/hono/dist/cjs/jsx/streaming.js +9 -7
  84. package/node_modules/hono/dist/cjs/middleware/cors/index.js +2 -5
  85. package/node_modules/hono/dist/cjs/middleware/serve-static/index.js +2 -2
  86. package/node_modules/hono/dist/cjs/utils/body.js +12 -4
  87. package/node_modules/hono/dist/cjs/utils/buffer.js +2 -1
  88. package/node_modules/hono/dist/cjs/validator/validator.js +3 -3
  89. package/node_modules/hono/dist/helper/css/common.js +3 -1
  90. package/node_modules/hono/dist/helper/css/index.js +9 -1
  91. package/node_modules/hono/dist/jsx/base.js +15 -15
  92. package/node_modules/hono/dist/jsx/components.js +42 -22
  93. package/node_modules/hono/dist/jsx/context.js +129 -5
  94. package/node_modules/hono/dist/jsx/streaming.js +10 -8
  95. package/node_modules/hono/dist/middleware/cors/index.js +2 -5
  96. package/node_modules/hono/dist/middleware/serve-static/index.js +2 -2
  97. package/node_modules/hono/dist/types/adapter/aws-lambda/handler.d.ts +1 -1
  98. package/node_modules/hono/dist/types/jsx/base.d.ts +1 -3
  99. package/node_modules/hono/dist/types/jsx/context.d.ts +39 -0
  100. package/node_modules/hono/dist/types/middleware/context-storage/index.d.ts +2 -2
  101. package/node_modules/hono/dist/types/utils/body.d.ts +1 -1
  102. package/node_modules/hono/dist/utils/body.js +12 -4
  103. package/node_modules/hono/dist/utils/buffer.js +2 -1
  104. package/node_modules/hono/dist/validator/validator.js +3 -3
  105. package/node_modules/hono/package.json +9 -10
  106. package/node_modules/tailwindcss/dist/chunk-HMCCH6MG.mjs +1 -0
  107. package/node_modules/tailwindcss/dist/default-theme.mjs +1 -1
  108. package/node_modules/tailwindcss/dist/lib.js +13 -13
  109. package/node_modules/tailwindcss/dist/lib.mjs +18 -18
  110. package/node_modules/tailwindcss/package.json +2 -2
  111. package/node_modules/undici/README.md +3 -2
  112. package/node_modules/undici/docs/docs/api/Agent.md +248 -44
  113. package/node_modules/undici/docs/docs/api/BalancedPool.md +246 -48
  114. package/node_modules/undici/docs/docs/api/CacheStorage.md +171 -13
  115. package/node_modules/undici/docs/docs/api/CacheStore.md +294 -98
  116. package/node_modules/undici/docs/docs/api/Client.md +365 -178
  117. package/node_modules/undici/docs/docs/api/ClientStats.md +80 -14
  118. package/node_modules/undici/docs/docs/api/Connector.md +118 -36
  119. package/node_modules/undici/docs/docs/api/ContentType.md +65 -25
  120. package/node_modules/undici/docs/docs/api/Cookies.md +125 -47
  121. package/node_modules/undici/docs/docs/api/Debug.md +34 -18
  122. package/node_modules/undici/docs/docs/api/DiagnosticsChannel.md +364 -164
  123. package/node_modules/undici/docs/docs/api/Dispatcher.md +479 -1093
  124. package/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +101 -87
  125. package/node_modules/undici/docs/docs/api/Errors.md +503 -40
  126. package/node_modules/undici/docs/docs/api/EventSource.md +294 -32
  127. package/node_modules/undici/docs/docs/api/Fetch.md +680 -31
  128. package/node_modules/undici/docs/docs/api/GlobalInstallation.md +78 -98
  129. package/node_modules/undici/docs/docs/api/H2CClient.md +298 -176
  130. package/node_modules/undici/docs/docs/api/Interceptors.md +355 -0
  131. package/node_modules/undici/docs/docs/api/MockAgent.md +314 -322
  132. package/node_modules/undici/docs/docs/api/MockCallHistory.md +272 -98
  133. package/node_modules/undici/docs/docs/api/MockCallHistoryLog.md +189 -26
  134. package/node_modules/undici/docs/docs/api/MockClient.md +151 -33
  135. package/node_modules/undici/docs/docs/api/MockErrors.md +56 -5
  136. package/node_modules/undici/docs/docs/api/MockPool.md +299 -263
  137. package/node_modules/undici/docs/docs/api/Pool.md +235 -43
  138. package/node_modules/undici/docs/docs/api/PoolStats.md +119 -13
  139. package/node_modules/undici/docs/docs/api/ProxyAgent.md +179 -160
  140. package/node_modules/undici/docs/docs/api/RedirectHandler.md +238 -63
  141. package/node_modules/undici/docs/docs/api/RetryAgent.md +113 -26
  142. package/node_modules/undici/docs/docs/api/RetryHandler.md +161 -77
  143. package/node_modules/undici/docs/docs/api/RoundRobinPool.md +166 -72
  144. package/node_modules/undici/docs/docs/api/SnapshotAgent.md +264 -542
  145. package/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md +162 -186
  146. package/node_modules/undici/docs/docs/api/Util.md +68 -11
  147. package/node_modules/undici/docs/docs/api/WebSocket.md +475 -80
  148. package/node_modules/undici/docs/docs/api/api-lifecycle.md +100 -32
  149. package/node_modules/undici/docs/docs/best-practices/client-certificate.md +2 -0
  150. package/node_modules/undici/docs/docs/best-practices/crawling.md +3 -1
  151. package/node_modules/undici/docs/docs/best-practices/migrating-from-v7-to-v8.md +6 -4
  152. package/node_modules/undici/docs/docs/best-practices/mocking-request.md +9 -7
  153. package/node_modules/undici/docs/docs/best-practices/proxy.md +3 -1
  154. package/node_modules/undici/docs/docs/best-practices/undici-vs-builtin-fetch.md +10 -8
  155. package/node_modules/undici/docs/docs/best-practices/writing-tests.md +2 -0
  156. package/node_modules/undici/docs/docs/{GettingStarted.md → getting-started.md} +22 -19
  157. package/node_modules/undici/docs/docs/index.md +779 -0
  158. package/node_modules/undici/docs/docs/site.json +125 -0
  159. package/node_modules/undici/docs/docs/type-map.json +79 -0
  160. package/node_modules/undici/lib/api/api-request.js +7 -1
  161. package/node_modules/undici/lib/api/readable.js +47 -2
  162. package/node_modules/undici/lib/core/errors.js +20 -0
  163. package/node_modules/undici/lib/core/request.js +1 -1
  164. package/node_modules/undici/lib/core/util.js +24 -1
  165. package/node_modules/undici/lib/dispatcher/client-h1.js +92 -1
  166. package/node_modules/undici/lib/dispatcher/client-h2.js +322 -118
  167. package/node_modules/undici/lib/dispatcher/client.js +6 -2
  168. package/node_modules/undici/lib/dispatcher/dispatcher-base.js +1 -0
  169. package/node_modules/undici/lib/dispatcher/proxy-agent.js +42 -7
  170. package/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +4 -2
  171. package/node_modules/undici/lib/handler/redirect-handler.js +1 -0
  172. package/node_modules/undici/lib/handler/retry-handler.js +57 -19
  173. package/node_modules/undici/lib/util/cache.js +8 -2
  174. package/node_modules/undici/lib/web/cookies/parse.js +20 -27
  175. package/node_modules/undici/lib/web/cookies/util.js +1 -1
  176. package/node_modules/undici/lib/web/eventsource/eventsource.js +7 -18
  177. package/node_modules/undici/lib/web/eventsource/util.js +32 -1
  178. package/node_modules/undici/lib/web/fetch/body.js +43 -0
  179. package/node_modules/undici/lib/web/fetch/constants.js +1 -1
  180. package/node_modules/undici/lib/web/fetch/index.js +11 -2
  181. package/node_modules/undici/lib/web/fetch/request.js +1 -0
  182. package/node_modules/undici/lib/web/fetch/util.js +4 -1
  183. package/node_modules/undici/lib/web/websocket/receiver.js +20 -3
  184. package/node_modules/undici/lib/web/websocket/stream/websocketstream.js +8 -1
  185. package/node_modules/undici/lib/web/websocket/websocket.js +3 -1
  186. package/node_modules/undici/package.json +1 -1
  187. package/node_modules/undici/types/client.d.ts +6 -1
  188. package/node_modules/undici/types/cookies.d.ts +1 -1
  189. package/node_modules/undici/types/errors.d.ts +10 -0
  190. package/node_modules/undici/types/fetch.d.ts +1 -0
  191. package/node_modules/undici/types/handlers.d.ts +2 -0
  192. package/node_modules/undici/types/proxy-agent.d.ts +7 -0
  193. package/package.json +4 -4
  194. package/react/styles.css +510 -5
  195. package/react/styles.source.css +850 -0
  196. package/node_modules/hono/dist/tsconfig.build.tsbuildinfo +0 -1
  197. package/node_modules/tailwindcss/dist/chunk-XVOTX5KS.mjs +0 -1
@@ -1,52 +1,85 @@
1
- # Class: EnvHttpProxyAgent
1
+ # EnvHttpProxyAgent
2
2
 
3
- Extends: `undici.Dispatcher`
3
+ <!--introduced_in=v6.14.0-->
4
4
 
5
- EnvHttpProxyAgent automatically reads the proxy configuration from the environment variables `http_proxy`, `https_proxy`, and `no_proxy` and sets up the proxy agents accordingly. When `http_proxy` and `https_proxy` are set, `http_proxy` is used for HTTP requests and `https_proxy` is used for HTTPS requests. If only `http_proxy` is set, `http_proxy` is used for both HTTP and HTTPS requests. If only `https_proxy` is set, it is only used for HTTPS requests.
5
+ <!--type=module-->
6
6
 
7
- `no_proxy` is a comma or space-separated list of hostnames that should not be proxied. The list may contain leading wildcard characters (`*`). If `no_proxy` is set, the EnvHttpProxyAgent will bypass the proxy for requests to hosts that match the list. If `no_proxy` is set to `"*"`, the EnvHttpProxyAgent will bypass the proxy for all requests.
7
+ <!-- source_link=lib/dispatcher/env-http-proxy-agent.js -->
8
8
 
9
- Uppercase environment variables are also supported: `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY`. However, if both the lowercase and uppercase environment variables are set, the uppercase environment variables will be ignored.
9
+ > Stability: 2 - Stable
10
10
 
11
- ## `new EnvHttpProxyAgent([options])`
11
+ `EnvHttpProxyAgent` is a [`Dispatcher`][] that reads its proxy configuration from
12
+ the `http_proxy`, `https_proxy`, and `no_proxy` environment variables and routes
13
+ requests through the appropriate proxy automatically. Import it from `undici`:
12
14
 
13
- Arguments:
14
-
15
- * **options** `EnvHttpProxyAgentOptions` (optional) - extends the `Agent` options.
16
-
17
- Returns: `EnvHttpProxyAgent`
18
-
19
- ### Parameter: `EnvHttpProxyAgentOptions`
20
-
21
- Extends: [`AgentOptions`](/docs/docs/api/Agent.md#parameter-agentoptions)
22
-
23
- * **httpProxy** `string` (optional) - When set, it will override the `HTTP_PROXY` environment variable.
24
- * **httpsProxy** `string` (optional) - When set, it will override the `HTTPS_PROXY` environment variable.
25
- * **noProxy** `string` (optional) - When set, it will override the `NO_PROXY` environment variable.
26
-
27
- Examples:
28
-
29
- ```js
15
+ ```mjs
30
16
  import { EnvHttpProxyAgent } from 'undici'
31
-
32
- const envHttpProxyAgent = new EnvHttpProxyAgent()
33
- // or
34
- const envHttpProxyAgent = new EnvHttpProxyAgent({ httpProxy: 'my.proxy.server:8080', httpsProxy: 'my.proxy.server:8443', noProxy: 'localhost' })
35
17
  ```
36
18
 
37
- #### Example - EnvHttpProxyAgent instantiation
38
-
39
- This will instantiate the EnvHttpProxyAgent. It will not do anything until registered as the agent to use with requests.
40
-
41
- ```js
19
+ When `http_proxy` and `https_proxy` are both set, `http_proxy` is used for HTTP
20
+ requests and `https_proxy` is used for HTTPS requests. If only `http_proxy` is
21
+ set, it is used for both HTTP and HTTPS requests. If only `https_proxy` is set,
22
+ it is used only for HTTPS requests.
23
+
24
+ `no_proxy` is a comma- or space-separated list of hosts that must not be
25
+ proxied. Each entry may include a leading dot or `*.` wildcard (for example
26
+ `.example.com`) to match subdomains, and an optional `:port` suffix to restrict
27
+ the match to a specific port. A request bypasses the proxy when its host equals
28
+ an entry or is a subdomain of one. Setting `no_proxy` to `*` bypasses the proxy
29
+ for every request.
30
+
31
+ The uppercase variants `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY` are also
32
+ honored. When both the lowercase and uppercase forms of a variable are set, the
33
+ lowercase form takes precedence and the uppercase form is ignored. The `no_proxy`
34
+ value is re-read from the environment on demand, so changes to it after the agent
35
+ is created take effect on subsequent requests; this does not apply when `noProxy`
36
+ is passed as an option.
37
+
38
+ ## Class: `EnvHttpProxyAgent`
39
+
40
+ <!-- YAML
41
+ added: v6.14.0
42
+ -->
43
+
44
+ * Extends: {Dispatcher}
45
+
46
+ ### `new EnvHttpProxyAgent([options])`
47
+
48
+ <!-- YAML
49
+ added: v6.14.0
50
+ -->
51
+
52
+ * `options` {EnvHttpProxyAgentOptions} Extends the [`ProxyAgent`][] options
53
+ (except `uri`). (optional)
54
+ * `httpProxy` {string} When set, overrides the `http_proxy` and `HTTP_PROXY`
55
+ environment variables. (optional)
56
+ * `httpsProxy` {string} When set, overrides the `https_proxy` and
57
+ `HTTPS_PROXY` environment variables. (optional)
58
+ * `noProxy` {string} When set, overrides the `no_proxy` and `NO_PROXY`
59
+ environment variables. (optional)
60
+ * Returns: {EnvHttpProxyAgent}
61
+
62
+ Creates a new `EnvHttpProxyAgent`. Any options other than `httpProxy`,
63
+ `httpsProxy`, and `noProxy` are forwarded to the underlying [`Agent`][] and
64
+ [`ProxyAgent`][] instances. Constructing the agent only configures it; it does
65
+ not affect any request until it is registered as a dispatcher, either globally
66
+ with `setGlobalDispatcher()` or per-request through the `dispatcher` option.
67
+
68
+ ```mjs
42
69
  import { EnvHttpProxyAgent } from 'undici'
43
70
 
44
71
  const envHttpProxyAgent = new EnvHttpProxyAgent()
72
+ // or, overriding the environment variables explicitly:
73
+ const envHttpProxyAgentWithOpts = new EnvHttpProxyAgent({
74
+ httpProxy: 'my.proxy.server:8080',
75
+ httpsProxy: 'my.proxy.server:8443',
76
+ noProxy: 'localhost'
77
+ })
45
78
  ```
46
79
 
47
- #### Example - Basic Proxy Fetch with global agent dispatcher
80
+ #### Example - Proxied `fetch()` with the global dispatcher
48
81
 
49
- ```js
82
+ ```mjs
50
83
  import { setGlobalDispatcher, fetch, EnvHttpProxyAgent } from 'undici'
51
84
 
52
85
  const envHttpProxyAgent = new EnvHttpProxyAgent()
@@ -56,12 +89,12 @@ const response = await fetch('http://localhost:3000/foo')
56
89
 
57
90
  console.log('response received', response.status) // response received 200
58
91
 
59
- const data = await response.json() // data { foo: "bar" }
92
+ const data = await response.json() // data { foo: 'bar' }
60
93
  ```
61
94
 
62
- #### Example - Basic Proxy Request with global agent dispatcher
95
+ #### Example - Proxied `request()` with the global dispatcher
63
96
 
64
- ```js
97
+ ```mjs
65
98
  import { setGlobalDispatcher, request, EnvHttpProxyAgent } from 'undici'
66
99
 
67
100
  const envHttpProxyAgent = new EnvHttpProxyAgent()
@@ -76,17 +109,16 @@ for await (const data of body) {
76
109
  }
77
110
  ```
78
111
 
79
- #### Example - Basic Proxy Request with local agent dispatcher
112
+ #### Example - Proxied `request()` with a local dispatcher
80
113
 
81
- ```js
114
+ ```mjs
82
115
  import { EnvHttpProxyAgent, request } from 'undici'
83
116
 
84
117
  const envHttpProxyAgent = new EnvHttpProxyAgent()
85
118
 
86
- const {
87
- statusCode,
88
- body
89
- } = await request('http://localhost:3000/foo', { dispatcher: envHttpProxyAgent })
119
+ const { statusCode, body } = await request('http://localhost:3000/foo', {
120
+ dispatcher: envHttpProxyAgent
121
+ })
90
122
 
91
123
  console.log('response received', statusCode) // response received 200
92
124
 
@@ -95,62 +127,44 @@ for await (const data of body) {
95
127
  }
96
128
  ```
97
129
 
98
- #### Example - Basic Proxy Fetch with local agent dispatcher
130
+ #### Example - Proxied `fetch()` with a local dispatcher
99
131
 
100
- ```js
132
+ ```mjs
101
133
  import { EnvHttpProxyAgent, fetch } from 'undici'
102
134
 
103
135
  const envHttpProxyAgent = new EnvHttpProxyAgent()
104
136
 
105
- const response = await fetch('http://localhost:3000/foo', { dispatcher: envHttpProxyAgent })
137
+ const response = await fetch('http://localhost:3000/foo', {
138
+ dispatcher: envHttpProxyAgent
139
+ })
106
140
 
107
141
  console.log('response received', response.status) // response received 200
108
142
 
109
- const data = await response.json() // data { foo: "bar" }
143
+ const data = await response.json() // data { foo: 'bar' }
110
144
  ```
111
145
 
112
- ## Instance Methods
113
-
114
- ### `EnvHttpProxyAgent.close([callback])`
115
-
116
- Implements [`Dispatcher.close([callback])`](/docs/docs/api/Dispatcher.md#dispatcherclosecallback-promise).
117
-
118
- ### `EnvHttpProxyAgent.destroy([error, callback])`
119
-
120
- Implements [`Dispatcher.destroy([error, callback])`](/docs/docs/api/Dispatcher.md#dispatcherdestroyerror-callback-promise).
121
-
122
- ### `EnvHttpProxyAgent.dispatch(options, handler: AgentDispatchOptions)`
123
-
124
- Implements [`Dispatcher.dispatch(options, handler)`](/docs/docs/api/Dispatcher.md#dispatcherdispatchoptions-handler).
125
-
126
- #### Parameter: `AgentDispatchOptions`
127
-
128
- Extends: [`DispatchOptions`](/docs/docs/api/Dispatcher.md#parameter-dispatchoptions)
129
-
130
- * **origin** `string | URL`
131
-
132
- Implements [`Dispatcher.destroy([error, callback])`](/docs/docs/api/Dispatcher.md#dispatcherdestroyerror-callback-promise).
133
-
134
- ### `EnvHttpProxyAgent.connect(options[, callback])`
135
-
136
- See [`Dispatcher.connect(options[, callback])`](/docs/docs/api/Dispatcher.md#dispatcherconnectoptions-callback).
137
-
138
- ### `EnvHttpProxyAgent.dispatch(options, handler)`
139
-
140
- Implements [`Dispatcher.dispatch(options, handler)`](/docs/docs/api/Dispatcher.md#dispatcherdispatchoptions-handler).
141
-
142
- ### `EnvHttpProxyAgent.pipeline(options, handler)`
143
-
144
- See [`Dispatcher.pipeline(options, handler)`](/docs/docs/api/Dispatcher.md#dispatcherpipelineoptions-handler).
145
-
146
- ### `EnvHttpProxyAgent.request(options[, callback])`
146
+ ### `envHttpProxyAgent.dispatch(options, handler)`
147
147
 
148
- See [`Dispatcher.request(options [, callback])`](/docs/docs/api/Dispatcher.md#dispatcherrequestoptions-callback).
148
+ <!-- YAML
149
+ added: v6.14.0
150
+ -->
149
151
 
150
- ### `EnvHttpProxyAgent.stream(options, factory[, callback])`
152
+ * `options` {AgentDispatchOptions}
153
+ * `origin` {string|URL}
154
+ * `handler` {DispatchHandler}
155
+ * Returns: {boolean}
151
156
 
152
- See [`Dispatcher.stream(options, factory[, callback])`](/docs/docs/api/Dispatcher.md#dispatcherstreamoptions-factory-callback).
157
+ Dispatches a request through the proxy selected for `options.origin`. The origin's
158
+ protocol, host, and port are compared against the `no_proxy` configuration: when
159
+ the host should be proxied, the request is routed to the HTTPS proxy agent for
160
+ `https:` origins or the HTTP proxy agent otherwise; when the host is excluded by
161
+ `no_proxy`, the request is sent directly through a non-proxying [`Agent`][].
153
162
 
154
- ### `EnvHttpProxyAgent.upgrade(options[, callback])`
163
+ This method is not normally called directly. Use the higher-level
164
+ [`Dispatcher`][] methods such as [`dispatcher.request()`][] or the top-level
165
+ `request()` and `fetch()` helpers instead.
155
166
 
156
- See [`Dispatcher.upgrade(options[, callback])`](/docs/docs/api/Dispatcher.md#dispatcherupgradeoptions-callback).
167
+ [`Agent`]: Agent.md#class-agent
168
+ [`Dispatcher`]: Dispatcher.md#class-dispatcher
169
+ [`ProxyAgent`]: ProxyAgent.md#class-proxyagent
170
+ [`dispatcher.request()`]: Dispatcher.md#dispatcherrequestoptions-callback