@noodleseed/one 0.22.0 → 0.24.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 (427) hide show
  1. package/dist/cli.d.ts.map +1 -1
  2. package/dist/cli.js +2 -1
  3. package/dist/cli.js.map +1 -1
  4. package/dist/commands/author-loop.d.ts +1 -0
  5. package/dist/commands/author-loop.d.ts.map +1 -1
  6. package/dist/commands/author-loop.js +6 -2
  7. package/dist/commands/author-loop.js.map +1 -1
  8. package/dist/commands/catalog-data-core.d.ts.map +1 -1
  9. package/dist/commands/catalog-data-core.js +17 -3
  10. package/dist/commands/catalog-data-core.js.map +1 -1
  11. package/dist/commands/catalog-data-resources.js +2 -2
  12. package/dist/commands/catalog-data-resources.js.map +1 -1
  13. package/dist/commands/catalog-dispatch.d.ts.map +1 -1
  14. package/dist/commands/catalog-dispatch.js +21 -2
  15. package/dist/commands/catalog-dispatch.js.map +1 -1
  16. package/dist/commands/catalog-render.d.ts.map +1 -1
  17. package/dist/commands/catalog-render.js +6 -0
  18. package/dist/commands/catalog-render.js.map +1 -1
  19. package/dist/commands/deploy-ops.d.ts.map +1 -1
  20. package/dist/commands/deploy-ops.js +30 -13
  21. package/dist/commands/deploy-ops.js.map +1 -1
  22. package/dist/commands/deploy-status-ops.d.ts +1 -1
  23. package/dist/commands/deploy-status-ops.d.ts.map +1 -1
  24. package/dist/commands/deploy-status-ops.js +8 -4
  25. package/dist/commands/deploy-status-ops.js.map +1 -1
  26. package/dist/commands/devtools.d.ts +11 -0
  27. package/dist/commands/devtools.d.ts.map +1 -0
  28. package/dist/commands/devtools.js +123 -0
  29. package/dist/commands/devtools.js.map +1 -0
  30. package/dist/commands/mcp-apps.d.ts +0 -1
  31. package/dist/commands/mcp-apps.d.ts.map +1 -1
  32. package/dist/commands/mcp-apps.js +71 -122
  33. package/dist/commands/mcp-apps.js.map +1 -1
  34. package/dist/commands/shared.d.ts +6 -0
  35. package/dist/commands/shared.d.ts.map +1 -1
  36. package/dist/commands/shared.js +19 -0
  37. package/dist/commands/shared.js.map +1 -1
  38. package/dist/deploy.d.ts +1 -1
  39. package/dist/deploy.d.ts.map +1 -1
  40. package/dist/deploy.js +5 -1
  41. package/dist/deploy.js.map +1 -1
  42. package/dist/dev.d.ts.map +1 -1
  43. package/dist/dev.js +13 -1
  44. package/dist/dev.js.map +1 -1
  45. package/dist/fire.js +1 -1
  46. package/dist/fire.js.map +1 -1
  47. package/dist/first-run.d.ts +11 -0
  48. package/dist/first-run.d.ts.map +1 -1
  49. package/dist/first-run.js +19 -4
  50. package/dist/first-run.js.map +1 -1
  51. package/dist/flavor.d.ts +1 -1
  52. package/dist/flavor.d.ts.map +1 -1
  53. package/dist/flavor.js +12 -2
  54. package/dist/flavor.js.map +1 -1
  55. package/dist/project-scaffold-templates.d.ts +11 -0
  56. package/dist/project-scaffold-templates.d.ts.map +1 -0
  57. package/dist/project-scaffold-templates.js +359 -0
  58. package/dist/project-scaffold-templates.js.map +1 -0
  59. package/dist/project.d.ts.map +1 -1
  60. package/dist/project.js +1 -323
  61. package/dist/project.js.map +1 -1
  62. package/dist/react.d.ts +2 -2
  63. package/dist/react.d.ts.map +1 -1
  64. package/dist/react.js +1 -1
  65. package/dist/react.js.map +1 -1
  66. package/dist/validate.d.ts +12 -0
  67. package/dist/validate.d.ts.map +1 -1
  68. package/dist/validate.js +11 -0
  69. package/dist/validate.js.map +1 -1
  70. package/node_modules/@noodle-borg/agent-kit/dist/skill-authoring-refs.js +4 -4
  71. package/node_modules/@noodle-borg/agent-kit/dist/skill-authoring-refs.js.map +1 -1
  72. package/node_modules/@noodle-borg/agent-kit/dist/skill-content.d.ts.map +1 -1
  73. package/node_modules/@noodle-borg/agent-kit/dist/skill-content.js +72 -13
  74. package/node_modules/@noodle-borg/agent-kit/dist/skill-content.js.map +1 -1
  75. package/node_modules/@noodle-borg/agent-kit/dist/skill-operations-refs.d.ts.map +1 -1
  76. package/node_modules/@noodle-borg/agent-kit/dist/skill-operations-refs.js +8 -3
  77. package/node_modules/@noodle-borg/agent-kit/dist/skill-operations-refs.js.map +1 -1
  78. package/node_modules/@noodle-borg/agent-kit/package.json +1 -1
  79. package/node_modules/@noodle-borg/authoring/dist/connectors.d.ts +18 -1
  80. package/node_modules/@noodle-borg/authoring/dist/connectors.d.ts.map +1 -1
  81. package/node_modules/@noodle-borg/authoring/dist/connectors.js +17 -4
  82. package/node_modules/@noodle-borg/authoring/dist/connectors.js.map +1 -1
  83. package/node_modules/@noodle-borg/authoring/dist/index.d.ts +3 -3
  84. package/node_modules/@noodle-borg/authoring/dist/index.d.ts.map +1 -1
  85. package/node_modules/@noodle-borg/authoring/dist/index.js +1 -1
  86. package/node_modules/@noodle-borg/authoring/dist/index.js.map +1 -1
  87. package/node_modules/@noodle-borg/authoring/dist/react/components.d.ts +302 -7
  88. package/node_modules/@noodle-borg/authoring/dist/react/components.d.ts.map +1 -1
  89. package/node_modules/@noodle-borg/authoring/dist/react/components.js +39 -7
  90. package/node_modules/@noodle-borg/authoring/dist/react/components.js.map +1 -1
  91. package/node_modules/@noodle-borg/authoring/dist/react/index.d.ts +4 -2
  92. package/node_modules/@noodle-borg/authoring/dist/react/index.d.ts.map +1 -1
  93. package/node_modules/@noodle-borg/authoring/dist/react/index.js +2 -1
  94. package/node_modules/@noodle-borg/authoring/dist/react/index.js.map +1 -1
  95. package/node_modules/@noodle-borg/authoring/dist/react/semantic-components.d.ts +2618 -0
  96. package/node_modules/@noodle-borg/authoring/dist/react/semantic-components.d.ts.map +1 -0
  97. package/node_modules/@noodle-borg/authoring/dist/react/semantic-components.js +110 -0
  98. package/node_modules/@noodle-borg/authoring/dist/react/semantic-components.js.map +1 -0
  99. package/node_modules/@noodle-borg/authoring/dist/react.d.ts +2 -2
  100. package/node_modules/@noodle-borg/authoring/dist/react.d.ts.map +1 -1
  101. package/node_modules/@noodle-borg/authoring/dist/react.js +1 -1
  102. package/node_modules/@noodle-borg/authoring/dist/react.js.map +1 -1
  103. package/node_modules/@noodle-borg/authoring/dist/recording.d.ts +1 -1
  104. package/node_modules/@noodle-borg/authoring/dist/recording.d.ts.map +1 -1
  105. package/node_modules/@noodle-borg/authoring/dist/recording.js +38 -6
  106. package/node_modules/@noodle-borg/authoring/dist/recording.js.map +1 -1
  107. package/node_modules/@noodle-borg/authoring/dist/server.d.ts +25 -2
  108. package/node_modules/@noodle-borg/authoring/dist/server.d.ts.map +1 -1
  109. package/node_modules/@noodle-borg/authoring/dist/server.js +64 -6
  110. package/node_modules/@noodle-borg/authoring/dist/server.js.map +1 -1
  111. package/node_modules/@noodle-borg/compiler/dist/compile.d.ts.map +1 -1
  112. package/node_modules/@noodle-borg/compiler/dist/compile.js +20 -8
  113. package/node_modules/@noodle-borg/compiler/dist/compile.js.map +1 -1
  114. package/node_modules/@noodle-borg/compiler/dist/manifest/schema.d.ts +2 -0
  115. package/node_modules/@noodle-borg/compiler/dist/manifest/schema.d.ts.map +1 -1
  116. package/node_modules/@noodle-borg/compiler/dist/manifest/schema.js +6 -0
  117. package/node_modules/@noodle-borg/compiler/dist/manifest/schema.js.map +1 -1
  118. package/node_modules/@noodle-borg/connector-defs/dist/auth-variables.js +1 -1
  119. package/node_modules/@noodle-borg/connector-defs/dist/auth-variables.js.map +1 -1
  120. package/node_modules/@noodle-borg/connector-defs/dist/call-graph.d.ts +14 -0
  121. package/node_modules/@noodle-borg/connector-defs/dist/call-graph.d.ts.map +1 -0
  122. package/node_modules/@noodle-borg/connector-defs/dist/call-graph.js +66 -0
  123. package/node_modules/@noodle-borg/connector-defs/dist/call-graph.js.map +1 -0
  124. package/node_modules/@noodle-borg/connector-defs/dist/compile-auth.d.ts +21 -0
  125. package/node_modules/@noodle-borg/connector-defs/dist/compile-auth.d.ts.map +1 -0
  126. package/node_modules/@noodle-borg/connector-defs/dist/compile-auth.js +102 -0
  127. package/node_modules/@noodle-borg/connector-defs/dist/compile-auth.js.map +1 -0
  128. package/node_modules/@noodle-borg/connector-defs/dist/compile.d.ts +19 -4
  129. package/node_modules/@noodle-borg/connector-defs/dist/compile.d.ts.map +1 -1
  130. package/node_modules/@noodle-borg/connector-defs/dist/compile.js +67 -99
  131. package/node_modules/@noodle-borg/connector-defs/dist/compile.js.map +1 -1
  132. package/node_modules/@noodle-borg/connector-defs/dist/index.d.ts +1 -1
  133. package/node_modules/@noodle-borg/connector-defs/dist/index.d.ts.map +1 -1
  134. package/node_modules/@noodle-borg/connector-defs/dist/index.js.map +1 -1
  135. package/node_modules/@noodle-borg/connector-defs/dist/schema.d.ts +168 -10
  136. package/node_modules/@noodle-borg/connector-defs/dist/schema.d.ts.map +1 -1
  137. package/node_modules/@noodle-borg/connector-defs/dist/schema.js +72 -5
  138. package/node_modules/@noodle-borg/connector-defs/dist/schema.js.map +1 -1
  139. package/node_modules/@noodle-borg/connector-http/dist/http-connector.d.ts +6 -0
  140. package/node_modules/@noodle-borg/connector-http/dist/http-connector.d.ts.map +1 -1
  141. package/node_modules/@noodle-borg/connector-http/dist/http-connector.js +2 -0
  142. package/node_modules/@noodle-borg/connector-http/dist/http-connector.js.map +1 -1
  143. package/node_modules/@noodle-borg/connector-http/package.json +1 -1
  144. package/node_modules/@noodle-borg/protocol/dist/mapping.d.ts.map +1 -1
  145. package/node_modules/@noodle-borg/protocol/dist/mapping.js +8 -0
  146. package/node_modules/@noodle-borg/protocol/dist/mapping.js.map +1 -1
  147. package/node_modules/@noodle-borg/runtime/dist/execute.d.ts.map +1 -1
  148. package/node_modules/@noodle-borg/runtime/dist/execute.js +87 -62
  149. package/node_modules/@noodle-borg/runtime/dist/execute.js.map +1 -1
  150. package/node_modules/@noodle-borg/runtime/dist/result.d.ts +1 -1
  151. package/node_modules/@noodle-borg/runtime/dist/result.d.ts.map +1 -1
  152. package/node_modules/@noodle-borg/service/dist/credential-broker.d.ts.map +1 -1
  153. package/node_modules/@noodle-borg/service/dist/credential-broker.js +113 -11
  154. package/node_modules/@noodle-borg/service/dist/credential-broker.js.map +1 -1
  155. package/node_modules/@noodle-borg/service/dist/github/app-client.d.ts +28 -5
  156. package/node_modules/@noodle-borg/service/dist/github/app-client.d.ts.map +1 -1
  157. package/node_modules/@noodle-borg/service/dist/github/app-client.js +116 -7
  158. package/node_modules/@noodle-borg/service/dist/github/app-client.js.map +1 -1
  159. package/node_modules/@noodle-borg/service/dist/github/builder-auth.d.ts +12 -0
  160. package/node_modules/@noodle-borg/service/dist/github/builder-auth.d.ts.map +1 -0
  161. package/node_modules/@noodle-borg/service/dist/github/builder-auth.js +15 -0
  162. package/node_modules/@noodle-borg/service/dist/github/builder-auth.js.map +1 -0
  163. package/node_modules/@noodle-borg/service/dist/github/builder-main.d.ts +3 -0
  164. package/node_modules/@noodle-borg/service/dist/github/builder-main.d.ts.map +1 -0
  165. package/node_modules/@noodle-borg/service/dist/github/builder-main.js +9 -0
  166. package/node_modules/@noodle-borg/service/dist/github/builder-main.js.map +1 -0
  167. package/node_modules/@noodle-borg/service/dist/github/builder-runner.d.ts +21 -0
  168. package/node_modules/@noodle-borg/service/dist/github/builder-runner.d.ts.map +1 -0
  169. package/node_modules/@noodle-borg/service/dist/github/builder-runner.js +192 -0
  170. package/node_modules/@noodle-borg/service/dist/github/builder-runner.js.map +1 -0
  171. package/node_modules/@noodle-borg/service/dist/github/cloud-run-job-executor.d.ts +45 -0
  172. package/node_modules/@noodle-borg/service/dist/github/cloud-run-job-executor.d.ts.map +1 -0
  173. package/node_modules/@noodle-borg/service/dist/github/cloud-run-job-executor.js +60 -0
  174. package/node_modules/@noodle-borg/service/dist/github/cloud-run-job-executor.js.map +1 -0
  175. package/node_modules/@noodle-borg/service/dist/github/deploy-pipeline.d.ts +64 -0
  176. package/node_modules/@noodle-borg/service/dist/github/deploy-pipeline.d.ts.map +1 -0
  177. package/node_modules/@noodle-borg/service/dist/github/deploy-pipeline.js +121 -0
  178. package/node_modules/@noodle-borg/service/dist/github/deploy-pipeline.js.map +1 -0
  179. package/node_modules/@noodle-borg/service/dist/github/deploy-run-executor.d.ts +33 -0
  180. package/node_modules/@noodle-borg/service/dist/github/deploy-run-executor.d.ts.map +1 -0
  181. package/node_modules/@noodle-borg/service/dist/github/deploy-run-executor.js +14 -0
  182. package/node_modules/@noodle-borg/service/dist/github/deploy-run-executor.js.map +1 -0
  183. package/node_modules/@noodle-borg/service/dist/github/deploy-run-reconciler.d.ts +36 -0
  184. package/node_modules/@noodle-borg/service/dist/github/deploy-run-reconciler.d.ts.map +1 -0
  185. package/node_modules/@noodle-borg/service/dist/github/deploy-run-reconciler.js +107 -0
  186. package/node_modules/@noodle-borg/service/dist/github/deploy-run-reconciler.js.map +1 -0
  187. package/node_modules/@noodle-borg/service/dist/github/fast-lane-classifier.d.ts +38 -0
  188. package/node_modules/@noodle-borg/service/dist/github/fast-lane-classifier.d.ts.map +1 -0
  189. package/node_modules/@noodle-borg/service/dist/github/fast-lane-classifier.js +60 -0
  190. package/node_modules/@noodle-borg/service/dist/github/fast-lane-classifier.js.map +1 -0
  191. package/node_modules/@noodle-borg/service/dist/github/local-compile.d.ts +24 -0
  192. package/node_modules/@noodle-borg/service/dist/github/local-compile.d.ts.map +1 -0
  193. package/node_modules/@noodle-borg/service/dist/github/local-compile.js +98 -0
  194. package/node_modules/@noodle-borg/service/dist/github/local-compile.js.map +1 -0
  195. package/node_modules/@noodle-borg/service/dist/github/local-process-executor.d.ts +39 -0
  196. package/node_modules/@noodle-borg/service/dist/github/local-process-executor.d.ts.map +1 -0
  197. package/node_modules/@noodle-borg/service/dist/github/local-process-executor.js +67 -0
  198. package/node_modules/@noodle-borg/service/dist/github/local-process-executor.js.map +1 -0
  199. package/node_modules/@noodle-borg/service/dist/github/run-access-mode.d.ts +18 -0
  200. package/node_modules/@noodle-borg/service/dist/github/run-access-mode.d.ts.map +1 -0
  201. package/node_modules/@noodle-borg/service/dist/github/run-access-mode.js +32 -0
  202. package/node_modules/@noodle-borg/service/dist/github/run-access-mode.js.map +1 -0
  203. package/node_modules/@noodle-borg/service/dist/github/run-token.d.ts +41 -0
  204. package/node_modules/@noodle-borg/service/dist/github/run-token.d.ts.map +1 -0
  205. package/node_modules/@noodle-borg/service/dist/github/run-token.js +59 -0
  206. package/node_modules/@noodle-borg/service/dist/github/run-token.js.map +1 -0
  207. package/node_modules/@noodle-borg/service/dist/http-util.d.ts +7 -1
  208. package/node_modules/@noodle-borg/service/dist/http-util.d.ts.map +1 -1
  209. package/node_modules/@noodle-borg/service/dist/http-util.js +14 -0
  210. package/node_modules/@noodle-borg/service/dist/http-util.js.map +1 -1
  211. package/node_modules/@noodle-borg/service/dist/index.d.ts +13 -2
  212. package/node_modules/@noodle-borg/service/dist/index.d.ts.map +1 -1
  213. package/node_modules/@noodle-borg/service/dist/index.js +12 -1
  214. package/node_modules/@noodle-borg/service/dist/index.js.map +1 -1
  215. package/node_modules/@noodle-borg/service/dist/main.js +72 -0
  216. package/node_modules/@noodle-borg/service/dist/main.js.map +1 -1
  217. package/node_modules/@noodle-borg/service/dist/options.d.ts +26 -3
  218. package/node_modules/@noodle-borg/service/dist/options.d.ts.map +1 -1
  219. package/node_modules/@noodle-borg/service/dist/registry-helpers.d.ts +12 -0
  220. package/node_modules/@noodle-borg/service/dist/registry-helpers.d.ts.map +1 -1
  221. package/node_modules/@noodle-borg/service/dist/registry-helpers.js +3 -0
  222. package/node_modules/@noodle-borg/service/dist/registry-helpers.js.map +1 -1
  223. package/node_modules/@noodle-borg/service/dist/registry-types.d.ts +7 -0
  224. package/node_modules/@noodle-borg/service/dist/registry-types.d.ts.map +1 -1
  225. package/node_modules/@noodle-borg/service/dist/registry.d.ts +7 -29
  226. package/node_modules/@noodle-borg/service/dist/registry.d.ts.map +1 -1
  227. package/node_modules/@noodle-borg/service/dist/registry.js +62 -57
  228. package/node_modules/@noodle-borg/service/dist/registry.js.map +1 -1
  229. package/node_modules/@noodle-borg/service/dist/routes/asset-control-plane.d.ts +3 -2
  230. package/node_modules/@noodle-borg/service/dist/routes/asset-control-plane.d.ts.map +1 -1
  231. package/node_modules/@noodle-borg/service/dist/routes/asset-control-plane.js +36 -8
  232. package/node_modules/@noodle-borg/service/dist/routes/asset-control-plane.js.map +1 -1
  233. package/node_modules/@noodle-borg/service/dist/routes/control-plane.d.ts +3 -2
  234. package/node_modules/@noodle-borg/service/dist/routes/control-plane.d.ts.map +1 -1
  235. package/node_modules/@noodle-borg/service/dist/routes/control-plane.js +100 -12
  236. package/node_modules/@noodle-borg/service/dist/routes/control-plane.js.map +1 -1
  237. package/node_modules/@noodle-borg/service/dist/routes/github-dispatch.d.ts +7 -0
  238. package/node_modules/@noodle-borg/service/dist/routes/github-dispatch.d.ts.map +1 -1
  239. package/node_modules/@noodle-borg/service/dist/routes/github-dispatch.js +36 -1
  240. package/node_modules/@noodle-borg/service/dist/routes/github-dispatch.js.map +1 -1
  241. package/node_modules/@noodle-borg/service/dist/routes/github-run-claim.d.ts +13 -0
  242. package/node_modules/@noodle-borg/service/dist/routes/github-run-claim.d.ts.map +1 -0
  243. package/node_modules/@noodle-borg/service/dist/routes/github-run-claim.js +84 -0
  244. package/node_modules/@noodle-borg/service/dist/routes/github-run-claim.js.map +1 -0
  245. package/node_modules/@noodle-borg/service/dist/routes/github-run-status.d.ts +5 -0
  246. package/node_modules/@noodle-borg/service/dist/routes/github-run-status.d.ts.map +1 -0
  247. package/node_modules/@noodle-borg/service/dist/routes/github-run-status.js +73 -0
  248. package/node_modules/@noodle-borg/service/dist/routes/github-run-status.js.map +1 -0
  249. package/node_modules/@noodle-borg/service/dist/routes/github-webhook.d.ts +23 -1
  250. package/node_modules/@noodle-borg/service/dist/routes/github-webhook.d.ts.map +1 -1
  251. package/node_modules/@noodle-borg/service/dist/routes/github-webhook.js +41 -0
  252. package/node_modules/@noodle-borg/service/dist/routes/github-webhook.js.map +1 -1
  253. package/node_modules/@noodle-borg/service/dist/routes/paths.d.ts +4 -0
  254. package/node_modules/@noodle-borg/service/dist/routes/paths.d.ts.map +1 -1
  255. package/node_modules/@noodle-borg/service/dist/routes/paths.js +10 -0
  256. package/node_modules/@noodle-borg/service/dist/routes/paths.js.map +1 -1
  257. package/node_modules/@noodle-borg/service/dist/routes/run-deploy-auth.d.ts +85 -0
  258. package/node_modules/@noodle-borg/service/dist/routes/run-deploy-auth.d.ts.map +1 -0
  259. package/node_modules/@noodle-borg/service/dist/routes/run-deploy-auth.js +90 -0
  260. package/node_modules/@noodle-borg/service/dist/routes/run-deploy-auth.js.map +1 -0
  261. package/node_modules/@noodle-borg/service/dist/serve.d.ts.map +1 -1
  262. package/node_modules/@noodle-borg/service/dist/serve.js +31 -0
  263. package/node_modules/@noodle-borg/service/dist/serve.js.map +1 -1
  264. package/node_modules/@noodle-borg/service/dist/service.d.ts.map +1 -1
  265. package/node_modules/@noodle-borg/service/dist/service.js +8 -13
  266. package/node_modules/@noodle-borg/service/dist/service.js.map +1 -1
  267. package/node_modules/@noodle-borg/service/dist/store/github-connections-json-file.d.ts +1 -0
  268. package/node_modules/@noodle-borg/service/dist/store/github-connections-json-file.d.ts.map +1 -1
  269. package/node_modules/@noodle-borg/service/dist/store/github-connections-json-file.js +5 -0
  270. package/node_modules/@noodle-borg/service/dist/store/github-connections-json-file.js.map +1 -1
  271. package/node_modules/@noodle-borg/service/dist/store/github-connections.d.ts +1 -0
  272. package/node_modules/@noodle-borg/service/dist/store/github-connections.d.ts.map +1 -1
  273. package/node_modules/@noodle-borg/service/dist/store/github-connections.js +5 -0
  274. package/node_modules/@noodle-borg/service/dist/store/github-connections.js.map +1 -1
  275. package/node_modules/@noodle-borg/service/dist/store/github-deploy-run-contract.d.ts +120 -0
  276. package/node_modules/@noodle-borg/service/dist/store/github-deploy-run-contract.d.ts.map +1 -0
  277. package/node_modules/@noodle-borg/service/dist/store/github-deploy-run-contract.js +6 -0
  278. package/node_modules/@noodle-borg/service/dist/store/github-deploy-run-contract.js.map +1 -0
  279. package/node_modules/@noodle-borg/service/dist/store/github-runs-json-file.d.ts +6 -1
  280. package/node_modules/@noodle-borg/service/dist/store/github-runs-json-file.d.ts.map +1 -1
  281. package/node_modules/@noodle-borg/service/dist/store/github-runs-json-file.js +18 -1
  282. package/node_modules/@noodle-borg/service/dist/store/github-runs-json-file.js.map +1 -1
  283. package/node_modules/@noodle-borg/service/dist/store/github-runs.d.ts +22 -1
  284. package/node_modules/@noodle-borg/service/dist/store/github-runs.d.ts.map +1 -1
  285. package/node_modules/@noodle-borg/service/dist/store/github-runs.js +39 -2
  286. package/node_modules/@noodle-borg/service/dist/store/github-runs.js.map +1 -1
  287. package/node_modules/@noodle-borg/service/dist/store/postgres-github-runs.d.ts +13 -1
  288. package/node_modules/@noodle-borg/service/dist/store/postgres-github-runs.d.ts.map +1 -1
  289. package/node_modules/@noodle-borg/service/dist/store/postgres-github-runs.js +115 -1
  290. package/node_modules/@noodle-borg/service/dist/store/postgres-github-runs.js.map +1 -1
  291. package/node_modules/@noodle-borg/service/dist/store/postgres-github.d.ts +1 -0
  292. package/node_modules/@noodle-borg/service/dist/store/postgres-github.d.ts.map +1 -1
  293. package/node_modules/@noodle-borg/service/dist/store/postgres-github.js +6 -0
  294. package/node_modules/@noodle-borg/service/dist/store/postgres-github.js.map +1 -1
  295. package/node_modules/@noodle-borg/service/dist/store/postgres.d.ts +15 -1
  296. package/node_modules/@noodle-borg/service/dist/store/postgres.d.ts.map +1 -1
  297. package/node_modules/@noodle-borg/service/dist/store/postgres.js +22 -2
  298. package/node_modules/@noodle-borg/service/dist/store/postgres.js.map +1 -1
  299. package/node_modules/@noodle-borg/service/dist/store.d.ts +22 -99
  300. package/node_modules/@noodle-borg/service/dist/store.d.ts.map +1 -1
  301. package/node_modules/@noodle-borg/service/dist/store.js.map +1 -1
  302. package/node_modules/hono/dist/adapter/aws-lambda/handler.js +15 -21
  303. package/node_modules/hono/dist/adapter/bun/websocket.js +3 -1
  304. package/node_modules/hono/dist/adapter/lambda-edge/handler.js +8 -2
  305. package/node_modules/hono/dist/cjs/adapter/aws-lambda/handler.js +15 -21
  306. package/node_modules/hono/dist/cjs/adapter/bun/websocket.js +3 -1
  307. package/node_modules/hono/dist/cjs/adapter/lambda-edge/handler.js +8 -2
  308. package/node_modules/hono/dist/cjs/helper/css/common.js +3 -1
  309. package/node_modules/hono/dist/cjs/helper/css/index.js +9 -1
  310. package/node_modules/hono/dist/cjs/jsx/base.js +8 -14
  311. package/node_modules/hono/dist/cjs/jsx/components.js +41 -21
  312. package/node_modules/hono/dist/cjs/jsx/context.js +131 -5
  313. package/node_modules/hono/dist/cjs/jsx/streaming.js +9 -7
  314. package/node_modules/hono/dist/cjs/middleware/cors/index.js +2 -5
  315. package/node_modules/hono/dist/cjs/middleware/serve-static/index.js +2 -2
  316. package/node_modules/hono/dist/cjs/utils/body.js +12 -4
  317. package/node_modules/hono/dist/cjs/utils/buffer.js +2 -1
  318. package/node_modules/hono/dist/cjs/validator/validator.js +3 -3
  319. package/node_modules/hono/dist/helper/css/common.js +3 -1
  320. package/node_modules/hono/dist/helper/css/index.js +9 -1
  321. package/node_modules/hono/dist/jsx/base.js +15 -15
  322. package/node_modules/hono/dist/jsx/components.js +42 -22
  323. package/node_modules/hono/dist/jsx/context.js +129 -5
  324. package/node_modules/hono/dist/jsx/streaming.js +10 -8
  325. package/node_modules/hono/dist/middleware/cors/index.js +2 -5
  326. package/node_modules/hono/dist/middleware/serve-static/index.js +2 -2
  327. package/node_modules/hono/dist/types/adapter/aws-lambda/handler.d.ts +1 -1
  328. package/node_modules/hono/dist/types/jsx/base.d.ts +1 -3
  329. package/node_modules/hono/dist/types/jsx/context.d.ts +39 -0
  330. package/node_modules/hono/dist/types/middleware/context-storage/index.d.ts +2 -2
  331. package/node_modules/hono/dist/types/utils/body.d.ts +1 -1
  332. package/node_modules/hono/dist/utils/body.js +12 -4
  333. package/node_modules/hono/dist/utils/buffer.js +2 -1
  334. package/node_modules/hono/dist/validator/validator.js +3 -3
  335. package/node_modules/hono/package.json +9 -10
  336. package/node_modules/tailwindcss/dist/chunk-HMCCH6MG.mjs +1 -0
  337. package/node_modules/tailwindcss/dist/default-theme.mjs +1 -1
  338. package/node_modules/tailwindcss/dist/lib.js +13 -13
  339. package/node_modules/tailwindcss/dist/lib.mjs +18 -18
  340. package/node_modules/tailwindcss/package.json +2 -2
  341. package/node_modules/undici/README.md +3 -2
  342. package/node_modules/undici/docs/docs/api/Agent.md +248 -44
  343. package/node_modules/undici/docs/docs/api/BalancedPool.md +246 -48
  344. package/node_modules/undici/docs/docs/api/CacheStorage.md +171 -13
  345. package/node_modules/undici/docs/docs/api/CacheStore.md +294 -98
  346. package/node_modules/undici/docs/docs/api/Client.md +365 -178
  347. package/node_modules/undici/docs/docs/api/ClientStats.md +80 -14
  348. package/node_modules/undici/docs/docs/api/Connector.md +118 -36
  349. package/node_modules/undici/docs/docs/api/ContentType.md +65 -25
  350. package/node_modules/undici/docs/docs/api/Cookies.md +125 -47
  351. package/node_modules/undici/docs/docs/api/Debug.md +34 -18
  352. package/node_modules/undici/docs/docs/api/DiagnosticsChannel.md +364 -164
  353. package/node_modules/undici/docs/docs/api/Dispatcher.md +479 -1093
  354. package/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +101 -87
  355. package/node_modules/undici/docs/docs/api/Errors.md +503 -40
  356. package/node_modules/undici/docs/docs/api/EventSource.md +294 -32
  357. package/node_modules/undici/docs/docs/api/Fetch.md +680 -31
  358. package/node_modules/undici/docs/docs/api/GlobalInstallation.md +78 -98
  359. package/node_modules/undici/docs/docs/api/H2CClient.md +298 -176
  360. package/node_modules/undici/docs/docs/api/Interceptors.md +355 -0
  361. package/node_modules/undici/docs/docs/api/MockAgent.md +314 -322
  362. package/node_modules/undici/docs/docs/api/MockCallHistory.md +272 -98
  363. package/node_modules/undici/docs/docs/api/MockCallHistoryLog.md +189 -26
  364. package/node_modules/undici/docs/docs/api/MockClient.md +151 -33
  365. package/node_modules/undici/docs/docs/api/MockErrors.md +56 -5
  366. package/node_modules/undici/docs/docs/api/MockPool.md +299 -263
  367. package/node_modules/undici/docs/docs/api/Pool.md +235 -43
  368. package/node_modules/undici/docs/docs/api/PoolStats.md +119 -13
  369. package/node_modules/undici/docs/docs/api/ProxyAgent.md +179 -160
  370. package/node_modules/undici/docs/docs/api/RedirectHandler.md +238 -63
  371. package/node_modules/undici/docs/docs/api/RetryAgent.md +113 -26
  372. package/node_modules/undici/docs/docs/api/RetryHandler.md +161 -77
  373. package/node_modules/undici/docs/docs/api/RoundRobinPool.md +166 -72
  374. package/node_modules/undici/docs/docs/api/SnapshotAgent.md +264 -542
  375. package/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md +162 -186
  376. package/node_modules/undici/docs/docs/api/Util.md +68 -11
  377. package/node_modules/undici/docs/docs/api/WebSocket.md +475 -80
  378. package/node_modules/undici/docs/docs/api/api-lifecycle.md +100 -32
  379. package/node_modules/undici/docs/docs/best-practices/client-certificate.md +2 -0
  380. package/node_modules/undici/docs/docs/best-practices/crawling.md +3 -1
  381. package/node_modules/undici/docs/docs/best-practices/migrating-from-v7-to-v8.md +6 -4
  382. package/node_modules/undici/docs/docs/best-practices/mocking-request.md +9 -7
  383. package/node_modules/undici/docs/docs/best-practices/proxy.md +3 -1
  384. package/node_modules/undici/docs/docs/best-practices/undici-vs-builtin-fetch.md +10 -8
  385. package/node_modules/undici/docs/docs/best-practices/writing-tests.md +2 -0
  386. package/node_modules/undici/docs/docs/{GettingStarted.md → getting-started.md} +22 -19
  387. package/node_modules/undici/docs/docs/index.md +779 -0
  388. package/node_modules/undici/docs/docs/site.json +125 -0
  389. package/node_modules/undici/docs/docs/type-map.json +79 -0
  390. package/node_modules/undici/lib/api/api-request.js +7 -1
  391. package/node_modules/undici/lib/api/readable.js +47 -2
  392. package/node_modules/undici/lib/core/errors.js +20 -0
  393. package/node_modules/undici/lib/core/request.js +1 -1
  394. package/node_modules/undici/lib/core/util.js +24 -1
  395. package/node_modules/undici/lib/dispatcher/client-h1.js +92 -1
  396. package/node_modules/undici/lib/dispatcher/client-h2.js +322 -118
  397. package/node_modules/undici/lib/dispatcher/client.js +6 -2
  398. package/node_modules/undici/lib/dispatcher/dispatcher-base.js +1 -0
  399. package/node_modules/undici/lib/dispatcher/proxy-agent.js +42 -7
  400. package/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +4 -2
  401. package/node_modules/undici/lib/handler/redirect-handler.js +1 -0
  402. package/node_modules/undici/lib/handler/retry-handler.js +57 -19
  403. package/node_modules/undici/lib/util/cache.js +8 -2
  404. package/node_modules/undici/lib/web/cookies/parse.js +20 -27
  405. package/node_modules/undici/lib/web/cookies/util.js +1 -1
  406. package/node_modules/undici/lib/web/eventsource/eventsource.js +7 -18
  407. package/node_modules/undici/lib/web/eventsource/util.js +32 -1
  408. package/node_modules/undici/lib/web/fetch/body.js +43 -0
  409. package/node_modules/undici/lib/web/fetch/constants.js +1 -1
  410. package/node_modules/undici/lib/web/fetch/index.js +11 -2
  411. package/node_modules/undici/lib/web/fetch/request.js +1 -0
  412. package/node_modules/undici/lib/web/fetch/util.js +4 -1
  413. package/node_modules/undici/lib/web/websocket/receiver.js +20 -3
  414. package/node_modules/undici/lib/web/websocket/stream/websocketstream.js +8 -1
  415. package/node_modules/undici/lib/web/websocket/websocket.js +3 -1
  416. package/node_modules/undici/package.json +1 -1
  417. package/node_modules/undici/types/client.d.ts +6 -1
  418. package/node_modules/undici/types/cookies.d.ts +1 -1
  419. package/node_modules/undici/types/errors.d.ts +10 -0
  420. package/node_modules/undici/types/fetch.d.ts +1 -0
  421. package/node_modules/undici/types/handlers.d.ts +2 -0
  422. package/node_modules/undici/types/proxy-agent.d.ts +7 -0
  423. package/package.json +4 -4
  424. package/react/styles.css +510 -5
  425. package/react/styles.source.css +850 -0
  426. package/node_modules/hono/dist/tsconfig.build.tsbuildinfo +0 -1
  427. package/node_modules/tailwindcss/dist/chunk-XVOTX5KS.mjs +0 -1
@@ -1,306 +1,497 @@
1
1
  # Diagnostics Channel Support
2
2
 
3
- Stability: Experimental.
3
+ <!--introduced_in=v6.3.0-->
4
+ <!--type=misc-->
4
5
 
5
- Undici supports the [`diagnostics_channel`](https://nodejs.org/api/diagnostics_channel.html) (currently available only on Node.js v16+).
6
- It is the preferred way to instrument Undici and retrieve internal information.
6
+ > Stability: 1 - Experimental
7
7
 
8
- The channels available are the following.
8
+ Undici is instrumented with Node.js' built-in [`diagnostics_channel`][] module.
9
+ It is the preferred way to observe undici's internal behaviour without patching
10
+ the library, and it backs the human-readable [debug logs][Debug].
9
11
 
10
- ## `undici:request:create`
12
+ Each integration point is exposed as a named channel. To observe an event,
13
+ obtain the channel by name and subscribe to it:
11
14
 
12
- This message is published when a new outgoing request is created.
15
+ ```mjs
16
+ import diagnosticsChannel from 'node:diagnostics_channel'
13
17
 
14
- ```js
15
- import diagnosticsChannel from 'diagnostics_channel'
18
+ diagnosticsChannel.channel('undici:request:create').subscribe(({ request }) => {
19
+ console.log(request.method, request.origin, request.path)
20
+ })
21
+ ```
22
+
23
+ ```cjs
24
+ const diagnosticsChannel = require('node:diagnostics_channel')
25
+
26
+ diagnosticsChannel.channel('undici:request:create').subscribe(({ request }) => {
27
+ console.log(request.method, request.origin, request.path)
28
+ })
29
+ ```
30
+
31
+ The message published to a channel is always a single object whose shape depends
32
+ on the channel. The sections below describe every channel and the object it
33
+ publishes. Subscriber callbacks run synchronously inside undici, so they should
34
+ be fast and must not throw.
35
+
36
+ The same `request` object is shared across all `undici:request:*` channels for a
37
+ given request, so a subscriber may correlate the lifecycle of one request by
38
+ identity.
39
+
40
+ ## Event: `'undici:request:create'`
41
+
42
+ <!-- YAML
43
+ added: v6.3.0
44
+ -->
45
+
46
+ Published when a new outgoing request is created, before it is dispatched.
47
+
48
+ * `message` {Object}
49
+ * `request` {Object} The request being created.
50
+ * `origin` {string|URL} The origin the request is sent to.
51
+ * `completed` {boolean} Whether the request has completed. `false` at this
52
+ point.
53
+ * `method` {string} The HTTP method, e.g. `'GET'`.
54
+ * `path` {string} The request path, including any query string.
55
+ * `headers` {string[]} The request headers as a flat array of strings,
56
+ alternating between header name and value.
57
+
58
+ The `request` object also exposes an `addHeader(name, value)` method that
59
+ appends a header before the request is sent.
60
+
61
+ ```mjs
62
+ import diagnosticsChannel from 'node:diagnostics_channel'
16
63
 
17
64
  diagnosticsChannel.channel('undici:request:create').subscribe(({ request }) => {
18
65
  console.log('origin', request.origin)
19
66
  console.log('completed', request.completed)
20
67
  console.log('method', request.method)
21
68
  console.log('path', request.path)
22
- console.log('headers', request.headers) // array of strings, e.g: ['foo', 'bar']
69
+ console.log('headers', request.headers)
23
70
  request.addHeader('hello', 'world')
24
- console.log('headers', request.headers) // e.g. ['foo', 'bar', 'hello', 'world']
25
71
  })
26
72
  ```
27
73
 
28
- Note: a request is only loosely completed to a given socket.
74
+ A request is only loosely bound to a given socket at this stage.
75
+
76
+ ## Event: `'undici:request:bodyChunkSent'`
77
+
78
+ <!-- YAML
79
+ added: v7.11.0
80
+ -->
29
81
 
30
- ## `undici:request:bodyChunkSent`
82
+ Published each time a chunk of the request body is written to the socket.
31
83
 
32
- This message is published when a chunk of the request body is being sent.
84
+ * `message` {Object}
85
+ * `request` {Object} The same object published by
86
+ [`'undici:request:create'`][].
87
+ * `chunk` {Uint8Array|string} The body chunk being sent.
33
88
 
34
- ```js
35
- import diagnosticsChannel from 'diagnostics_channel'
89
+ ```mjs
90
+ import diagnosticsChannel from 'node:diagnostics_channel'
36
91
 
37
92
  diagnosticsChannel.channel('undici:request:bodyChunkSent').subscribe(({ request, chunk }) => {
38
- // request is the same object undici:request:create
93
+ console.log('sent', chunk.length, 'bytes')
39
94
  })
40
95
  ```
41
96
 
42
- ## `undici:request:bodySent`
97
+ ## Event: `'undici:request:bodySent'`
43
98
 
44
- This message is published after the request body has been fully sent.
99
+ <!-- YAML
100
+ added: v6.3.0
101
+ -->
45
102
 
46
- ```js
47
- import diagnosticsChannel from 'diagnostics_channel'
103
+ Published after the request body has been fully sent.
104
+
105
+ * `message` {Object}
106
+ * `request` {Object} The same object published by
107
+ [`'undici:request:create'`][].
108
+
109
+ ```mjs
110
+ import diagnosticsChannel from 'node:diagnostics_channel'
48
111
 
49
112
  diagnosticsChannel.channel('undici:request:bodySent').subscribe(({ request }) => {
50
- // request is the same object undici:request:create
113
+ // request is the same object as in 'undici:request:create'
51
114
  })
52
115
  ```
53
116
 
54
- ## `undici:request:headers`
117
+ ## Event: `'undici:request:headers'`
118
+
119
+ <!-- YAML
120
+ added: v6.3.0
121
+ -->
55
122
 
56
- This message is published after the response headers have been received.
123
+ Published after the response headers have been received.
57
124
 
58
- ```js
59
- import diagnosticsChannel from 'diagnostics_channel'
125
+ * `message` {Object}
126
+ * `request` {Object} The same object published by
127
+ [`'undici:request:create'`][].
128
+ * `response` {Object} The response being received.
129
+ * `statusCode` {number} The HTTP status code.
130
+ * `statusText` {string} The HTTP status message.
131
+ * `headers` {Buffer[]} The raw response headers as an array of buffers,
132
+ alternating between header name and value.
133
+
134
+ ```mjs
135
+ import diagnosticsChannel from 'node:diagnostics_channel'
60
136
 
61
137
  diagnosticsChannel.channel('undici:request:headers').subscribe(({ request, response }) => {
62
- // request is the same object undici:request:create
63
138
  console.log('statusCode', response.statusCode)
64
139
  console.log(response.statusText)
65
- // response.headers are buffers.
66
140
  console.log(response.headers.map((x) => x.toString()))
67
141
  })
68
142
  ```
69
143
 
70
- ## `undici:request:bodyChunkReceived`
144
+ ## Event: `'undici:request:bodyChunkReceived'`
145
+
146
+ <!-- YAML
147
+ added: v7.11.0
148
+ -->
71
149
 
72
- This message is published after a chunk of the response body has been received.
150
+ Published each time a chunk of the response body is received.
73
151
 
74
- ```js
75
- import diagnosticsChannel from 'diagnostics_channel'
152
+ * `message` {Object}
153
+ * `request` {Object} The same object published by
154
+ [`'undici:request:create'`][].
155
+ * `chunk` {Buffer} The body chunk that was received.
156
+
157
+ ```mjs
158
+ import diagnosticsChannel from 'node:diagnostics_channel'
76
159
 
77
160
  diagnosticsChannel.channel('undici:request:bodyChunkReceived').subscribe(({ request, chunk }) => {
78
- // request is the same object undici:request:create
161
+ console.log('received', chunk.length, 'bytes')
79
162
  })
80
163
  ```
81
164
 
82
- ## `undici:request:trailers`
165
+ ## Event: `'undici:request:trailers'`
166
+
167
+ <!-- YAML
168
+ added: v6.3.0
169
+ -->
83
170
 
84
- This message is published after the response body and trailers have been received, i.e. the response has been completed.
171
+ Published after the response body and trailers have been received, that is, once
172
+ the response has fully completed.
85
173
 
86
- ```js
87
- import diagnosticsChannel from 'diagnostics_channel'
174
+ * `message` {Object}
175
+ * `request` {Object} The same object published by
176
+ [`'undici:request:create'`][]. `request.completed` is now `true`.
177
+ * `trailers` {Buffer[]} The raw response trailers as an array of buffers,
178
+ alternating between header name and value.
179
+
180
+ ```mjs
181
+ import diagnosticsChannel from 'node:diagnostics_channel'
88
182
 
89
183
  diagnosticsChannel.channel('undici:request:trailers').subscribe(({ request, trailers }) => {
90
- // request is the same object undici:request:create
91
184
  console.log('completed', request.completed)
92
- // trailers are buffers.
93
185
  console.log(trailers.map((x) => x.toString()))
94
186
  })
95
187
  ```
96
188
 
97
- ## `undici:request:error`
189
+ ## Event: `'undici:request:error'`
190
+
191
+ <!-- YAML
192
+ added: v6.3.0
193
+ -->
194
+
195
+ Published when the request is about to error, before the error is surfaced to
196
+ the caller.
98
197
 
99
- This message is published if the request is going to error, but it has not errored yet.
198
+ * `message` {Object}
199
+ * `request` {Object} The same object published by
200
+ [`'undici:request:create'`][].
201
+ * `error` {Error} The error the request is about to fail with.
100
202
 
101
- ```js
102
- import diagnosticsChannel from 'diagnostics_channel'
203
+ ```mjs
204
+ import diagnosticsChannel from 'node:diagnostics_channel'
103
205
 
104
206
  diagnosticsChannel.channel('undici:request:error').subscribe(({ request, error }) => {
105
- // request is the same object undici:request:create
207
+ console.error(error)
106
208
  })
107
209
  ```
108
210
 
109
- ## `undici:client:sendHeaders`
211
+ ## Event: `'undici:client:sendHeaders'`
110
212
 
111
- This message is published right before the first byte of the request is written to the socket.
213
+ <!-- YAML
214
+ added: v6.3.0
215
+ changes:
216
+ - version: v7.0.0
217
+ pr-url: https://github.com/nodejs/undici/pull/3585
218
+ description: Refactor the diagnostics channel internals.
219
+ -->
112
220
 
113
- *Note*: It will publish the exact headers that will be sent to the server in raw format.
221
+ Published immediately before the first byte of the request is written to the
222
+ socket. The headers are published exactly as they will be sent to the server, in
223
+ raw form.
114
224
 
115
- ```js
116
- import diagnosticsChannel from 'diagnostics_channel'
225
+ * `message` {Object}
226
+ * `request` {Object} The same object published by
227
+ [`'undici:request:create'`][].
228
+ * `headers` {string} The request headers as a single raw string, with lines
229
+ separated by `\r\n`.
230
+ * `socket` {net.Socket} The socket the request is written to.
231
+
232
+ ```mjs
233
+ import diagnosticsChannel from 'node:diagnostics_channel'
117
234
 
118
235
  diagnosticsChannel.channel('undici:client:sendHeaders').subscribe(({ request, headers, socket }) => {
119
- // request is the same object undici:request:create
120
- console.log(`Full headers list ${headers.split('\r\n')}`);
236
+ console.log(`Full headers list: ${headers.split('\r\n')}`)
121
237
  })
122
238
  ```
123
239
 
124
- ## `undici:client:beforeConnect`
240
+ ## Event: `'undici:client:beforeConnect'`
241
+
242
+ <!-- YAML
243
+ added: v6.3.0
244
+ changes:
245
+ - version: v7.0.0
246
+ pr-url: https://github.com/nodejs/undici/pull/3585
247
+ description: Refactor the diagnostics channel internals.
248
+ -->
125
249
 
126
- This message is published before creating a new connection for **any** request.
127
- You can not assume that this event is related to any specific request.
250
+ Published before a new connection is opened for any request. This event cannot be
251
+ attributed to a specific request, because connections are pooled and shared.
128
252
 
129
- ```js
130
- import diagnosticsChannel from 'diagnostics_channel'
253
+ * `message` {Object}
254
+ * `connectParams` {Object} The parameters used to open the connection.
255
+ * `host` {string} The connection host, including the port if present.
256
+ * `hostname` {string} The connection hostname.
257
+ * `protocol` {string} The protocol, e.g. `'https:'`.
258
+ * `port` {string} The connection port.
259
+ * `servername` {string|null} The TLS server name, or `null`.
260
+ * `connector` {Function} The function that creates the socket.
261
+
262
+ ```mjs
263
+ import diagnosticsChannel from 'node:diagnostics_channel'
131
264
 
132
265
  diagnosticsChannel.channel('undici:client:beforeConnect').subscribe(({ connectParams, connector }) => {
133
- // const { host, hostname, protocol, port, servername, version } = connectParams
134
- // connector is a function that creates the socket
266
+ const { host, hostname, protocol, port, servername } = connectParams
267
+ // connector is the function that creates the socket
135
268
  })
136
269
  ```
137
270
 
138
- ## `undici:client:connected`
271
+ ## Event: `'undici:client:connected'`
272
+
273
+ <!-- YAML
274
+ added: v6.3.0
275
+ changes:
276
+ - version: v7.0.0
277
+ pr-url: https://github.com/nodejs/undici/pull/3585
278
+ description: Refactor the diagnostics channel internals.
279
+ -->
139
280
 
140
- This message is published after a connection is established.
281
+ Published after a connection has been successfully established.
141
282
 
142
- ```js
143
- import diagnosticsChannel from 'diagnostics_channel'
283
+ * `message` {Object}
284
+ * `socket` {net.Socket} The newly connected socket.
285
+ * `connectParams` {Object} The parameters used to open the connection. See
286
+ [`'undici:client:beforeConnect'`][] for the field descriptions.
287
+ * `connector` {Function} The function that created the socket.
288
+
289
+ ```mjs
290
+ import diagnosticsChannel from 'node:diagnostics_channel'
144
291
 
145
292
  diagnosticsChannel.channel('undici:client:connected').subscribe(({ socket, connectParams, connector }) => {
146
- // const { host, hostname, protocol, port, servername, version } = connectParams
147
- // connector is a function that creates the socket
293
+ const { host, hostname, protocol, port, servername } = connectParams
148
294
  })
149
295
  ```
150
296
 
151
- ## `undici:client:connectError`
297
+ ## Event: `'undici:client:connectError'`
298
+
299
+ <!-- YAML
300
+ added: v6.3.0
301
+ changes:
302
+ - version: v7.0.0
303
+ pr-url: https://github.com/nodejs/undici/pull/3585
304
+ description: Refactor the diagnostics channel internals.
305
+ -->
306
+
307
+ Published when a connection could not be established.
152
308
 
153
- This message is published if it did not succeed to create new connection
309
+ * `message` {Object}
310
+ * `error` {Error} The error that prevented the connection.
311
+ * `socket` {net.Socket} The socket associated with the failed attempt.
312
+ * `connectParams` {Object} The parameters used to open the connection. See
313
+ [`'undici:client:beforeConnect'`][] for the field descriptions.
314
+ * `connector` {Function} The function that created the socket.
154
315
 
155
- ```js
156
- import diagnosticsChannel from 'diagnostics_channel'
316
+ ```mjs
317
+ import diagnosticsChannel from 'node:diagnostics_channel'
157
318
 
158
319
  diagnosticsChannel.channel('undici:client:connectError').subscribe(({ error, socket, connectParams, connector }) => {
159
- // const { host, hostname, protocol, port, servername, version } = connectParams
160
- // connector is a function that creates the socket
161
- console.log(`Connect failed with ${error.message}`)
320
+ console.error(`Connect failed with ${error.message}`)
162
321
  })
163
322
  ```
164
323
 
165
- ## `undici:websocket:open`
166
-
167
- This message is published after the client has successfully connected to a server.
168
-
169
- ```js
170
- import diagnosticsChannel from 'diagnostics_channel'
171
-
172
- diagnosticsChannel.channel('undici:websocket:open').subscribe(({
173
- address, // { address: string, family: string, port: number }
174
- protocol, // string - negotiated subprotocol
175
- extensions, // string - negotiated extensions
176
- websocket, // WebSocket - the WebSocket instance
177
- handshakeResponse // object - HTTP response that upgraded the connection
324
+ ## Event: `'undici:websocket:open'`
325
+
326
+ <!-- YAML
327
+ added: v6.3.0
328
+ -->
329
+
330
+ Published after a [`WebSocket`][] has successfully connected to a server.
331
+
332
+ * `message` {Object}
333
+ * `address` {Object|null} The remote socket address, as returned by
334
+ [`socket.address()`][], or `null` if it cannot be determined. When present,
335
+ it contains `address`, `family`, and `port`.
336
+ * `protocol` {string} The negotiated subprotocol.
337
+ * `extensions` {string} The negotiated extensions.
338
+ * `websocket` {WebSocket} The `WebSocket` instance.
339
+ * `handshakeResponse` {Object} The HTTP response that upgraded the connection.
340
+ * `status` {number} The HTTP status code: `101` for an HTTP/1.1 upgrade, or
341
+ `200` for an HTTP/2 extended `CONNECT`.
342
+ * `statusText` {string} The HTTP status message: `'Switching Protocols'` for
343
+ HTTP/1.1, and commonly `'OK'` for HTTP/2.
344
+ * `headers` {Object} The response headers from the server. The `upgrade` and
345
+ `connection` headers are only present for HTTP/1.1 handshakes.
346
+
347
+ ```mjs
348
+ import diagnosticsChannel from 'node:diagnostics_channel'
349
+
350
+ diagnosticsChannel.channel('undici:websocket:open').subscribe(({
351
+ address,
352
+ protocol,
353
+ extensions,
354
+ websocket,
355
+ handshakeResponse
178
356
  }) => {
179
- console.log(address) // address, family, and port
180
- console.log(protocol) // negotiated subprotocols
181
- console.log(extensions) // negotiated extensions
182
- console.log(websocket) // the WebSocket instance
183
-
184
- // Handshake response details
185
- console.log(handshakeResponse.status) // 101 for HTTP/1.1, 200 for HTTP/2 extended CONNECT
186
- console.log(handshakeResponse.statusText) // 'Switching Protocols' for HTTP/1.1, commonly 'OK' for HTTP/2 in Node.js
187
- console.log(handshakeResponse.headers) // Object containing response headers
357
+ console.log(address)
358
+ console.log(protocol)
359
+ console.log(extensions)
360
+ console.log(handshakeResponse.status)
361
+ console.log(handshakeResponse.headers)
188
362
  })
189
363
  ```
190
364
 
191
- ### Handshake Response Object
192
-
193
- The `handshakeResponse` object contains the HTTP response that established the WebSocket connection:
365
+ ## Event: `'undici:websocket:close'`
194
366
 
195
- - `status` (number): The HTTP status code (`101` for HTTP/1.1 upgrade, `200` for HTTP/2 extended CONNECT)
196
- - `statusText` (string): The HTTP status message (`'Switching Protocols'` for HTTP/1.1, commonly `'OK'` for HTTP/2 in Node.js)
197
- - `headers` (object): The HTTP response headers from the server, including:
198
- - `sec-websocket-accept` and other WebSocket-related headers
199
- - `upgrade: 'websocket'`
200
- - `connection: 'upgrade'`
367
+ <!-- YAML
368
+ added: v6.3.0
369
+ -->
201
370
 
202
- The `upgrade` and `connection` headers are only present for HTTP/1.1 handshakes.
371
+ Published after the [`WebSocket`][] connection has closed.
203
372
 
204
- This information is particularly useful for debugging and monitoring WebSocket connections, as it provides access to the initial HTTP handshake response that established the WebSocket connection.
373
+ * `message` {Object}
374
+ * `websocket` {WebSocket} The `WebSocket` instance.
375
+ * `code` {number} The closing status code.
376
+ * `reason` {string} The closing reason.
205
377
 
206
- ## `undici:websocket:close`
207
-
208
- This message is published after the connection has closed.
209
-
210
- ```js
211
- import diagnosticsChannel from 'diagnostics_channel'
378
+ ```mjs
379
+ import diagnosticsChannel from 'node:diagnostics_channel'
212
380
 
213
381
  diagnosticsChannel.channel('undici:websocket:close').subscribe(({ websocket, code, reason }) => {
214
- console.log(websocket) // the WebSocket instance
215
- console.log(code) // the closing status code
216
- console.log(reason) // the closing reason
382
+ console.log(code, reason)
217
383
  })
218
384
  ```
219
385
 
220
- ## `undici:websocket:socket_error`
386
+ ## Event: `'undici:websocket:socket_error'`
387
+
388
+ <!-- YAML
389
+ added: v6.3.0
390
+ -->
221
391
 
222
- This message is published if the socket experiences an error.
392
+ Published when the underlying WebSocket socket experiences an error. Unlike the
393
+ other WebSocket channels, the published message is the error itself.
223
394
 
224
- ```js
225
- import diagnosticsChannel from 'diagnostics_channel'
395
+ * `error` {Error} The socket error.
396
+
397
+ ```mjs
398
+ import diagnosticsChannel from 'node:diagnostics_channel'
226
399
 
227
400
  diagnosticsChannel.channel('undici:websocket:socket_error').subscribe((error) => {
228
- console.log(error)
401
+ console.error(error)
229
402
  })
230
403
  ```
231
404
 
232
- ## `undici:websocket:ping`
405
+ ## Event: `'undici:websocket:ping'`
406
+
407
+ <!-- YAML
408
+ added: v6.3.0
409
+ -->
233
410
 
234
- This message is published after the client receives a ping frame, if the connection is not closing.
411
+ Published after the client receives a ping frame.
235
412
 
236
- ```js
237
- import diagnosticsChannel from 'diagnostics_channel'
413
+ * `message` {Object}
414
+ * `payload` {Buffer|undefined} The optional application data carried by the
415
+ frame.
416
+ * `websocket` {WebSocket} The `WebSocket` instance.
417
+
418
+ ```mjs
419
+ import diagnosticsChannel from 'node:diagnostics_channel'
238
420
 
239
421
  diagnosticsChannel.channel('undici:websocket:ping').subscribe(({ payload, websocket }) => {
240
- // a Buffer or undefined, containing the optional application data of the frame
241
422
  console.log(payload)
242
- console.log(websocket) // the WebSocket instance
243
423
  })
244
424
  ```
245
425
 
246
- ## `undici:websocket:pong`
426
+ ## Event: `'undici:websocket:pong'`
427
+
428
+ <!-- YAML
429
+ added: v6.3.0
430
+ -->
247
431
 
248
- This message is published after the client receives a pong frame.
432
+ Published after the client receives a pong frame.
249
433
 
250
- ```js
251
- import diagnosticsChannel from 'diagnostics_channel'
434
+ * `message` {Object}
435
+ * `payload` {Buffer|undefined} The optional application data carried by the
436
+ frame.
437
+ * `websocket` {WebSocket} The `WebSocket` instance.
438
+
439
+ ```mjs
440
+ import diagnosticsChannel from 'node:diagnostics_channel'
252
441
 
253
442
  diagnosticsChannel.channel('undici:websocket:pong').subscribe(({ payload, websocket }) => {
254
- // a Buffer or undefined, containing the optional application data of the frame
255
443
  console.log(payload)
256
- console.log(websocket) // the WebSocket instance
257
444
  })
258
445
  ```
259
446
 
260
- ## `undici:proxy:connected`
261
-
262
- This message is published after the `ProxyAgent` establishes a connection to the proxy server.
263
-
264
- ```js
265
- import diagnosticsChannel from 'diagnostics_channel'
447
+ ## Event: `'undici:proxy:connected'`
266
448
 
267
- diagnosticsChannel.channel('undici:proxy:connected').subscribe(({ socket, connectParams }) => {
268
- console.log(socket)
269
- console.log(connectParams)
270
- // const { origin, port, path, signal, headers, servername } = connectParams
271
- })
272
- ```
273
-
274
- ## `undici:request:pending-requests`
449
+ <!-- YAML
450
+ added: v7.17.0
451
+ -->
275
452
 
276
- This message is published when the deduplicate interceptor's pending request map changes. This is useful for monitoring and debugging request deduplication behavior.
453
+ Published after a [`ProxyAgent`][] has established a tunnel to the proxy server.
277
454
 
278
- The deduplicate interceptor automatically deduplicates concurrent requests for the same resource. When multiple identical requests are made while one is already in-flight, only one request is sent to the origin server, and all waiting handlers receive the same response.
455
+ * `message` {Object}
456
+ * `socket` {net.Socket} The socket connected to the proxy.
457
+ * `connectParams` {Object} The parameters used to establish the tunnel.
458
+ * `origin` {string|URL} The proxy origin.
459
+ * `port` {string} The proxy port.
460
+ * `path` {string} The requested tunnel target, e.g. `'example.com:443'`.
461
+ * `signal` {AbortSignal|undefined} The signal associated with the request.
462
+ * `headers` {Object} The headers sent in the `CONNECT` request.
463
+ * `servername` {string|undefined} The TLS server name used for the proxy.
279
464
 
280
- ```js
281
- import diagnosticsChannel from 'diagnostics_channel'
465
+ ```mjs
466
+ import diagnosticsChannel from 'node:diagnostics_channel'
282
467
 
283
- diagnosticsChannel.channel('undici:request:pending-requests').subscribe(({ type, size, key }) => {
284
- console.log(type) // 'added' or 'removed'
285
- console.log(size) // current number of pending requests
286
- console.log(key) // the deduplication key for this request
468
+ diagnosticsChannel.channel('undici:proxy:connected').subscribe(({ socket, connectParams }) => {
469
+ const { origin, port, path, signal, headers, servername } = connectParams
287
470
  })
288
471
  ```
289
472
 
290
- ### Event Properties
473
+ ## Event: `'undici:request:pending-requests'`
291
474
 
292
- - `type` (`string`): Either `'added'` when a new pending request is registered, or `'removed'` when a pending request completes (successfully or with an error).
293
- - `size` (`number`): The current number of pending requests after the change.
294
- - `key` (`string`): The deduplication key for the request, composed of the origin, method, path, and request headers.
475
+ <!-- YAML
476
+ added: v6.3.0
477
+ -->
295
478
 
296
- ### Example: Monitoring Request Deduplication
479
+ Published when the [`dedupe`][] interceptor's set of pending requests changes.
480
+ The interceptor coalesces concurrent identical requests so that only one reaches
481
+ the origin; this channel exposes that bookkeeping for monitoring and debugging.
297
482
 
298
- ```js
299
- import diagnosticsChannel from 'diagnostics_channel'
483
+ * `message` {Object}
484
+ * `type` {string} Either `'added'` when a new pending request is registered, or
485
+ `'removed'` when a pending request completes, whether successfully or with an
486
+ error.
487
+ * `size` {number} The number of pending requests after the change.
488
+ * `key` {string} The deduplication key for the request, composed of the origin,
489
+ method, path, and request headers.
300
490
 
301
- const channel = diagnosticsChannel.channel('undici:request:pending-requests')
491
+ ```mjs
492
+ import diagnosticsChannel from 'node:diagnostics_channel'
302
493
 
303
- channel.subscribe(({ type, size, key }) => {
494
+ diagnosticsChannel.channel('undici:request:pending-requests').subscribe(({ type, size, key }) => {
304
495
  if (type === 'added') {
305
496
  console.log(`New pending request: ${key} (${size} total pending)`)
306
497
  } else {
@@ -309,7 +500,16 @@ channel.subscribe(({ type, size, key }) => {
309
500
  })
310
501
  ```
311
502
 
312
- This can be useful for:
313
- - Verifying that request deduplication is working as expected
314
- - Monitoring the number of concurrent in-flight requests
315
- - Debugging deduplication behavior in production environments
503
+ This is useful for verifying that deduplication is working, monitoring the number
504
+ of concurrent in-flight requests, and debugging deduplication behaviour in
505
+ production.
506
+
507
+ [`'undici:client:beforeConnect'`]: #event-undiciclientbeforeconnect
508
+ [`'undici:request:create'`]: #event-undicirequestcreate
509
+ [`'undici:request:headers'`]: #event-undicirequestheaders
510
+ [`ProxyAgent`]: ProxyAgent.md#class-proxyagent
511
+ [`WebSocket`]: WebSocket.md#class-websocket
512
+ [`dedupe`]: Dispatcher.md#dedupe
513
+ [`diagnostics_channel`]: https://nodejs.org/api/diagnostics_channel.html
514
+ [`socket.address()`]: https://nodejs.org/api/net.html#socketaddress
515
+ [Debug]: Debug.md