@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.
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +2 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands/author-loop.d.ts +1 -0
- package/dist/commands/author-loop.d.ts.map +1 -1
- package/dist/commands/author-loop.js +6 -2
- package/dist/commands/author-loop.js.map +1 -1
- package/dist/commands/catalog-data-core.d.ts.map +1 -1
- package/dist/commands/catalog-data-core.js +17 -3
- package/dist/commands/catalog-data-core.js.map +1 -1
- package/dist/commands/catalog-data-resources.js +2 -2
- package/dist/commands/catalog-data-resources.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/catalog-render.d.ts.map +1 -1
- package/dist/commands/catalog-render.js +6 -0
- package/dist/commands/catalog-render.js.map +1 -1
- package/dist/commands/deploy-ops.d.ts.map +1 -1
- package/dist/commands/deploy-ops.js +30 -13
- package/dist/commands/deploy-ops.js.map +1 -1
- package/dist/commands/deploy-status-ops.d.ts +1 -1
- package/dist/commands/deploy-status-ops.d.ts.map +1 -1
- package/dist/commands/deploy-status-ops.js +8 -4
- package/dist/commands/deploy-status-ops.js.map +1 -1
- package/dist/commands/devtools.d.ts +11 -0
- package/dist/commands/devtools.d.ts.map +1 -0
- package/dist/commands/devtools.js +123 -0
- package/dist/commands/devtools.js.map +1 -0
- package/dist/commands/mcp-apps.d.ts +0 -1
- package/dist/commands/mcp-apps.d.ts.map +1 -1
- package/dist/commands/mcp-apps.js +71 -122
- package/dist/commands/mcp-apps.js.map +1 -1
- package/dist/commands/shared.d.ts +6 -0
- package/dist/commands/shared.d.ts.map +1 -1
- package/dist/commands/shared.js +19 -0
- package/dist/commands/shared.js.map +1 -1
- package/dist/deploy.d.ts +1 -1
- package/dist/deploy.d.ts.map +1 -1
- package/dist/deploy.js +5 -1
- package/dist/deploy.js.map +1 -1
- package/dist/dev.d.ts.map +1 -1
- package/dist/dev.js +13 -1
- package/dist/dev.js.map +1 -1
- package/dist/fire.js +1 -1
- package/dist/fire.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/flavor.d.ts +1 -1
- package/dist/flavor.d.ts.map +1 -1
- package/dist/flavor.js +12 -2
- package/dist/flavor.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-authoring-refs.js +4 -4
- package/node_modules/@noodle-borg/agent-kit/dist/skill-authoring-refs.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 +72 -13
- package/node_modules/@noodle-borg/agent-kit/dist/skill-content.js.map +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/skill-operations-refs.d.ts.map +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/skill-operations-refs.js +8 -3
- package/node_modules/@noodle-borg/agent-kit/dist/skill-operations-refs.js.map +1 -1
- package/node_modules/@noodle-borg/agent-kit/package.json +1 -1
- package/node_modules/@noodle-borg/authoring/dist/connectors.d.ts +18 -1
- package/node_modules/@noodle-borg/authoring/dist/connectors.d.ts.map +1 -1
- package/node_modules/@noodle-borg/authoring/dist/connectors.js +17 -4
- package/node_modules/@noodle-borg/authoring/dist/connectors.js.map +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 +38 -6
- 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 +64 -6
- 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-defs/dist/auth-variables.js +1 -1
- package/node_modules/@noodle-borg/connector-defs/dist/auth-variables.js.map +1 -1
- package/node_modules/@noodle-borg/connector-defs/dist/call-graph.d.ts +14 -0
- package/node_modules/@noodle-borg/connector-defs/dist/call-graph.d.ts.map +1 -0
- package/node_modules/@noodle-borg/connector-defs/dist/call-graph.js +66 -0
- package/node_modules/@noodle-borg/connector-defs/dist/call-graph.js.map +1 -0
- package/node_modules/@noodle-borg/connector-defs/dist/compile-auth.d.ts +21 -0
- package/node_modules/@noodle-borg/connector-defs/dist/compile-auth.d.ts.map +1 -0
- package/node_modules/@noodle-borg/connector-defs/dist/compile-auth.js +102 -0
- package/node_modules/@noodle-borg/connector-defs/dist/compile-auth.js.map +1 -0
- package/node_modules/@noodle-borg/connector-defs/dist/compile.d.ts +19 -4
- package/node_modules/@noodle-borg/connector-defs/dist/compile.d.ts.map +1 -1
- package/node_modules/@noodle-borg/connector-defs/dist/compile.js +67 -99
- package/node_modules/@noodle-borg/connector-defs/dist/compile.js.map +1 -1
- package/node_modules/@noodle-borg/connector-defs/dist/index.d.ts +1 -1
- package/node_modules/@noodle-borg/connector-defs/dist/index.d.ts.map +1 -1
- package/node_modules/@noodle-borg/connector-defs/dist/index.js.map +1 -1
- package/node_modules/@noodle-borg/connector-defs/dist/schema.d.ts +168 -10
- package/node_modules/@noodle-borg/connector-defs/dist/schema.d.ts.map +1 -1
- package/node_modules/@noodle-borg/connector-defs/dist/schema.js +72 -5
- package/node_modules/@noodle-borg/connector-defs/dist/schema.js.map +1 -1
- package/node_modules/@noodle-borg/connector-http/dist/http-connector.d.ts +6 -0
- package/node_modules/@noodle-borg/connector-http/dist/http-connector.d.ts.map +1 -1
- package/node_modules/@noodle-borg/connector-http/dist/http-connector.js +2 -0
- package/node_modules/@noodle-borg/connector-http/dist/http-connector.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/@noodle-borg/runtime/dist/execute.d.ts.map +1 -1
- package/node_modules/@noodle-borg/runtime/dist/execute.js +87 -62
- package/node_modules/@noodle-borg/runtime/dist/execute.js.map +1 -1
- package/node_modules/@noodle-borg/runtime/dist/result.d.ts +1 -1
- package/node_modules/@noodle-borg/runtime/dist/result.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/credential-broker.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/credential-broker.js +113 -11
- package/node_modules/@noodle-borg/service/dist/credential-broker.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/github/app-client.d.ts +28 -5
- package/node_modules/@noodle-borg/service/dist/github/app-client.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/github/app-client.js +116 -7
- package/node_modules/@noodle-borg/service/dist/github/app-client.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/github/builder-auth.d.ts +12 -0
- package/node_modules/@noodle-borg/service/dist/github/builder-auth.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/github/builder-auth.js +15 -0
- package/node_modules/@noodle-borg/service/dist/github/builder-auth.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/github/builder-main.d.ts +3 -0
- package/node_modules/@noodle-borg/service/dist/github/builder-main.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/github/builder-main.js +9 -0
- package/node_modules/@noodle-borg/service/dist/github/builder-main.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/github/builder-runner.d.ts +21 -0
- package/node_modules/@noodle-borg/service/dist/github/builder-runner.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/github/builder-runner.js +192 -0
- package/node_modules/@noodle-borg/service/dist/github/builder-runner.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/github/cloud-run-job-executor.d.ts +45 -0
- package/node_modules/@noodle-borg/service/dist/github/cloud-run-job-executor.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/github/cloud-run-job-executor.js +60 -0
- package/node_modules/@noodle-borg/service/dist/github/cloud-run-job-executor.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/github/deploy-pipeline.d.ts +64 -0
- package/node_modules/@noodle-borg/service/dist/github/deploy-pipeline.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/github/deploy-pipeline.js +121 -0
- package/node_modules/@noodle-borg/service/dist/github/deploy-pipeline.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/github/deploy-run-executor.d.ts +33 -0
- package/node_modules/@noodle-borg/service/dist/github/deploy-run-executor.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/github/deploy-run-executor.js +14 -0
- package/node_modules/@noodle-borg/service/dist/github/deploy-run-executor.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/github/deploy-run-reconciler.d.ts +36 -0
- package/node_modules/@noodle-borg/service/dist/github/deploy-run-reconciler.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/github/deploy-run-reconciler.js +107 -0
- package/node_modules/@noodle-borg/service/dist/github/deploy-run-reconciler.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/github/fast-lane-classifier.d.ts +38 -0
- package/node_modules/@noodle-borg/service/dist/github/fast-lane-classifier.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/github/fast-lane-classifier.js +60 -0
- package/node_modules/@noodle-borg/service/dist/github/fast-lane-classifier.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/github/local-compile.d.ts +24 -0
- package/node_modules/@noodle-borg/service/dist/github/local-compile.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/github/local-compile.js +98 -0
- package/node_modules/@noodle-borg/service/dist/github/local-compile.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/github/local-process-executor.d.ts +39 -0
- package/node_modules/@noodle-borg/service/dist/github/local-process-executor.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/github/local-process-executor.js +67 -0
- package/node_modules/@noodle-borg/service/dist/github/local-process-executor.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/github/run-access-mode.d.ts +18 -0
- package/node_modules/@noodle-borg/service/dist/github/run-access-mode.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/github/run-access-mode.js +32 -0
- package/node_modules/@noodle-borg/service/dist/github/run-access-mode.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/github/run-token.d.ts +41 -0
- package/node_modules/@noodle-borg/service/dist/github/run-token.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/github/run-token.js +59 -0
- package/node_modules/@noodle-borg/service/dist/github/run-token.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/http-util.d.ts +7 -1
- package/node_modules/@noodle-borg/service/dist/http-util.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/http-util.js +14 -0
- package/node_modules/@noodle-borg/service/dist/http-util.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/index.d.ts +13 -2
- package/node_modules/@noodle-borg/service/dist/index.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/index.js +12 -1
- package/node_modules/@noodle-borg/service/dist/index.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/main.js +72 -0
- package/node_modules/@noodle-borg/service/dist/main.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/options.d.ts +26 -3
- package/node_modules/@noodle-borg/service/dist/options.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/registry-helpers.d.ts +12 -0
- package/node_modules/@noodle-borg/service/dist/registry-helpers.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/registry-helpers.js +3 -0
- package/node_modules/@noodle-borg/service/dist/registry-helpers.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/registry-types.d.ts +7 -0
- package/node_modules/@noodle-borg/service/dist/registry-types.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/registry.d.ts +7 -29
- package/node_modules/@noodle-borg/service/dist/registry.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/registry.js +62 -57
- package/node_modules/@noodle-borg/service/dist/registry.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/asset-control-plane.d.ts +3 -2
- package/node_modules/@noodle-borg/service/dist/routes/asset-control-plane.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/asset-control-plane.js +36 -8
- package/node_modules/@noodle-borg/service/dist/routes/asset-control-plane.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/control-plane.d.ts +3 -2
- package/node_modules/@noodle-borg/service/dist/routes/control-plane.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/control-plane.js +100 -12
- package/node_modules/@noodle-borg/service/dist/routes/control-plane.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/github-dispatch.d.ts +7 -0
- package/node_modules/@noodle-borg/service/dist/routes/github-dispatch.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/github-dispatch.js +36 -1
- package/node_modules/@noodle-borg/service/dist/routes/github-dispatch.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/github-run-claim.d.ts +13 -0
- package/node_modules/@noodle-borg/service/dist/routes/github-run-claim.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/github-run-claim.js +84 -0
- package/node_modules/@noodle-borg/service/dist/routes/github-run-claim.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/github-run-status.d.ts +5 -0
- package/node_modules/@noodle-borg/service/dist/routes/github-run-status.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/github-run-status.js +73 -0
- package/node_modules/@noodle-borg/service/dist/routes/github-run-status.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/github-webhook.d.ts +23 -1
- package/node_modules/@noodle-borg/service/dist/routes/github-webhook.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/github-webhook.js +41 -0
- package/node_modules/@noodle-borg/service/dist/routes/github-webhook.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/paths.d.ts +4 -0
- package/node_modules/@noodle-borg/service/dist/routes/paths.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/paths.js +10 -0
- package/node_modules/@noodle-borg/service/dist/routes/paths.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/run-deploy-auth.d.ts +85 -0
- package/node_modules/@noodle-borg/service/dist/routes/run-deploy-auth.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/run-deploy-auth.js +90 -0
- package/node_modules/@noodle-borg/service/dist/routes/run-deploy-auth.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/serve.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/serve.js +31 -0
- package/node_modules/@noodle-borg/service/dist/serve.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/service.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/service.js +8 -13
- package/node_modules/@noodle-borg/service/dist/service.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/github-connections-json-file.d.ts +1 -0
- package/node_modules/@noodle-borg/service/dist/store/github-connections-json-file.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/github-connections-json-file.js +5 -0
- package/node_modules/@noodle-borg/service/dist/store/github-connections-json-file.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/github-connections.d.ts +1 -0
- package/node_modules/@noodle-borg/service/dist/store/github-connections.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/github-connections.js +5 -0
- package/node_modules/@noodle-borg/service/dist/store/github-connections.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/github-deploy-run-contract.d.ts +120 -0
- package/node_modules/@noodle-borg/service/dist/store/github-deploy-run-contract.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/store/github-deploy-run-contract.js +6 -0
- package/node_modules/@noodle-borg/service/dist/store/github-deploy-run-contract.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/store/github-runs-json-file.d.ts +6 -1
- package/node_modules/@noodle-borg/service/dist/store/github-runs-json-file.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/github-runs-json-file.js +18 -1
- package/node_modules/@noodle-borg/service/dist/store/github-runs-json-file.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/github-runs.d.ts +22 -1
- package/node_modules/@noodle-borg/service/dist/store/github-runs.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/github-runs.js +39 -2
- package/node_modules/@noodle-borg/service/dist/store/github-runs.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-github-runs.d.ts +13 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-github-runs.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-github-runs.js +115 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-github-runs.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-github.d.ts +1 -0
- package/node_modules/@noodle-borg/service/dist/store/postgres-github.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-github.js +6 -0
- package/node_modules/@noodle-borg/service/dist/store/postgres-github.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres.d.ts +15 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres.js +22 -2
- package/node_modules/@noodle-borg/service/dist/store/postgres.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store.d.ts +22 -99
- package/node_modules/@noodle-borg/service/dist/store.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store.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
|
@@ -1,263 +1,385 @@
|
|
|
1
|
-
#
|
|
1
|
+
# H2CClient
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<!--introduced_in=v7.7.0-->
|
|
4
|
+
<!--type=module-->
|
|
5
|
+
<!-- source_link=lib/dispatcher/h2c-client.js -->
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
> Stability: 2 - Stable
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
An `H2CClient` is a [`Dispatcher`][] that speaks HTTP/2 in cleartext (h2c) over a
|
|
10
|
+
single TCP connection to an `http:` origin, without the protocol upgrade or prior
|
|
11
|
+
knowledge negotiation that a regular [`Client`][] performs. It is a thin
|
|
12
|
+
specialization of [`Client`][] that forces `allowH2` and `useH2c` on and aliases
|
|
13
|
+
`pipelining` to `maxConcurrentStreams`, so multiple requests are multiplexed as
|
|
14
|
+
HTTP/2 streams rather than pipelined HTTP/1.x requests.
|
|
8
15
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
16
|
+
Use an `H2CClient` when the server is known to accept cleartext HTTP/2 directly,
|
|
17
|
+
for example a service behind a trusted proxy or in a test environment. Only the
|
|
18
|
+
`http:` protocol is supported; passing any other protocol throws
|
|
19
|
+
`InvalidArgumentError`.
|
|
13
20
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
res.end('Hello, world!')
|
|
17
|
-
})
|
|
21
|
+
```mjs
|
|
22
|
+
import { H2CClient } from 'undici'
|
|
18
23
|
|
|
19
|
-
|
|
20
|
-
once(server, 'listening').then(async () => {
|
|
21
|
-
const client = new H2CClient(`http://localhost:${server.address().port}/`)
|
|
24
|
+
const client = new H2CClient('http://localhost:3000')
|
|
22
25
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
console.log(text) // Hello, world!
|
|
27
|
-
})
|
|
28
|
-
})
|
|
26
|
+
const { statusCode, body } = await client.request({ path: '/', method: 'GET' })
|
|
27
|
+
console.log(statusCode)
|
|
28
|
+
console.log(await body.text())
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
-
## `
|
|
31
|
+
## Class: `H2CClient`
|
|
32
|
+
|
|
33
|
+
<!-- YAML
|
|
34
|
+
added: v7.7.0
|
|
35
|
+
changes:
|
|
36
|
+
- version: v7.17.0
|
|
37
|
+
pr-url: https://github.com/nodejs/undici/pull/4690
|
|
38
|
+
description: Added support for h2c over Unix domain sockets.
|
|
39
|
+
-->
|
|
40
|
+
|
|
41
|
+
* Extends: {Client}
|
|
42
|
+
|
|
43
|
+
`H2CClient` inherits the full instance API of [`Client`][] (and therefore of
|
|
44
|
+
[`Dispatcher`][]). The sections below cover the surface that is meaningful for an
|
|
45
|
+
h2c client; refer to [`Dispatcher`][] for the complete semantics of each method
|
|
46
|
+
and event.
|
|
47
|
+
|
|
48
|
+
### `new H2CClient(url[, options])`
|
|
49
|
+
|
|
50
|
+
<!-- YAML
|
|
51
|
+
added: v7.7.0
|
|
52
|
+
-->
|
|
53
|
+
|
|
54
|
+
* `url` {URL|string} The origin to connect to. Should include only the protocol,
|
|
55
|
+
hostname, and port. Only the `http:` protocol is supported.
|
|
56
|
+
* `options` {H2CClientOptions} (optional)
|
|
57
|
+
* `maxConcurrentStreams` {number} The maximum number of concurrent HTTP/2
|
|
58
|
+
streams for the session. It is advertised to the server and may be overridden
|
|
59
|
+
by a remote `SETTINGS` frame. Must be a positive integer. **Default:** `100`.
|
|
60
|
+
* `pipelining` {number} The number of concurrent requests multiplexed over the
|
|
61
|
+
single connection. For an `H2CClient` this is aliased to
|
|
62
|
+
`maxConcurrentStreams` and may not exceed it. Must be a positive integer.
|
|
63
|
+
**Default:** `100`.
|
|
64
|
+
* `maxHeaderSize` {number} The maximum length of request headers in bytes.
|
|
65
|
+
**Default:** Node.js' `--max-http-header-size` or `16384` (16 KiB).
|
|
66
|
+
* `headersTimeout` {number} The amount of time, in milliseconds, the parser
|
|
67
|
+
waits to receive the complete HTTP headers. **Default:** `300e3`.
|
|
68
|
+
* `connectTimeout` {number} The timeout for establishing a socket connection,
|
|
69
|
+
in milliseconds. Use `0` to disable it entirely. **Default:** `10e3`.
|
|
70
|
+
* `bodyTimeout` {number} The timeout, in milliseconds, after which a request
|
|
71
|
+
times out. Monitors the time between received body data. Use `0` to disable
|
|
72
|
+
it entirely. **Default:** `300e3`.
|
|
73
|
+
* `keepAliveTimeout` {number} The timeout, in milliseconds, after which a
|
|
74
|
+
socket without active requests times out. May be overridden by _keep-alive_
|
|
75
|
+
hints from the server. **Default:** `4e3`.
|
|
76
|
+
* `keepAliveMaxTimeout` {number} The maximum allowed `keepAliveTimeout`, in
|
|
77
|
+
milliseconds, when overridden by _keep-alive_ hints from the server.
|
|
78
|
+
**Default:** `600e3`.
|
|
79
|
+
* `keepAliveTimeoutThreshold` {number} A number of milliseconds subtracted from
|
|
80
|
+
server _keep-alive_ hints when overriding `keepAliveTimeout`, to account for
|
|
81
|
+
timing inaccuracies such as transport latency. **Default:** `1e3`.
|
|
82
|
+
* `socketPath` {string} An IPC endpoint, either a Unix domain socket or a
|
|
83
|
+
Windows named pipe. **Default:** `null`.
|
|
84
|
+
* `strictContentLength` {boolean} If `true`, an error is thrown when the
|
|
85
|
+
request `content-length` header does not match the length of the request
|
|
86
|
+
body. **Default:** `true`.
|
|
87
|
+
* `maxCachedSessions` {number} The maximum number of TLS sessions cached by the
|
|
88
|
+
built-in connector. Use `0` to disable TLS session caching. **Default:** `100`.
|
|
89
|
+
* `connect` {Object|Function} Connector options passed to `buildConnector`, or
|
|
90
|
+
a custom connector function. The `allowH2` option may not be set here.
|
|
91
|
+
**Default:** `null`.
|
|
92
|
+
* `maxRequestsPerClient` {number} The maximum number of requests to send over
|
|
93
|
+
a single connection before it is reset. Use `0` to disable this limit.
|
|
94
|
+
**Default:** `null`.
|
|
95
|
+
* `localAddress` {string} The local IP address the socket should connect from.
|
|
96
|
+
* `maxResponseSize` {number} The maximum allowed response body size in bytes.
|
|
97
|
+
Use `-1` to disable. **Default:** `-1`.
|
|
98
|
+
* `autoSelectFamily` {boolean} Enables a family autodetection algorithm that
|
|
99
|
+
loosely implements section 5 of [RFC 8305][]. Ignored if not supported by the
|
|
100
|
+
current Node.js version.
|
|
101
|
+
* `autoSelectFamilyAttemptTimeout` {number} The amount of time, in
|
|
102
|
+
milliseconds, to wait for a connection attempt to finish before trying the
|
|
103
|
+
next address when `autoSelectFamily` is enabled.
|
|
104
|
+
|
|
105
|
+
Creates a new `H2CClient` for the given origin. The client does not connect until
|
|
106
|
+
a request is queued; call [`h2cClient.connect()`](#h2cclientconnectoptions-callback)
|
|
107
|
+
to connect eagerly.
|
|
108
|
+
|
|
109
|
+
```mjs
|
|
110
|
+
import { H2CClient } from 'undici'
|
|
111
|
+
|
|
112
|
+
const client = new H2CClient('http://localhost:3000')
|
|
113
|
+
```
|
|
32
114
|
|
|
33
|
-
|
|
115
|
+
### `h2cClient.close([callback])`
|
|
34
116
|
|
|
35
|
-
|
|
36
|
-
|
|
117
|
+
<!-- YAML
|
|
118
|
+
added: v7.7.0
|
|
119
|
+
-->
|
|
37
120
|
|
|
38
|
-
|
|
121
|
+
* `callback` {Function} (optional) Invoked once all queued requests have settled
|
|
122
|
+
and the client is closed.
|
|
123
|
+
* Returns: {Promise|undefined} A `Promise` that resolves once the client is
|
|
124
|
+
closed, when `callback` is not provided.
|
|
39
125
|
|
|
40
|
-
|
|
126
|
+
Closes the client and gracefully waits for enqueued requests to complete before
|
|
127
|
+
resolving. See [`dispatcher.close([callback])`][].
|
|
41
128
|
|
|
42
|
-
|
|
43
|
-
- **headersTimeout** `number | null` (optional) - Default: `300e3` - The amount of time, in milliseconds, the parser will wait to receive the complete HTTP headers while not sending the request. Defaults to 300 seconds.
|
|
44
|
-
- **keepAliveMaxTimeout** `number | null` (optional) - Default: `600e3` - The maximum allowed `keepAliveTimeout`, in milliseconds, when overridden by _keep-alive_ hints from the server. Defaults to 10 minutes.
|
|
45
|
-
- **keepAliveTimeout** `number | null` (optional) - Default: `4e3` - The timeout, in milliseconds, after which a socket without active requests will time out. Monitors time between activity on a connected socket. This value may be overridden by _keep-alive_ hints from the server. See [MDN: HTTP - Headers - Keep-Alive directives](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Keep-Alive#directives) for more details. Defaults to 4 seconds.
|
|
46
|
-
- **keepAliveTimeoutThreshold** `number | null` (optional) - Default: `2e3` - A number of milliseconds subtracted from server _keep-alive_ hints when overriding `keepAliveTimeout` to account for timing inaccuracies caused by e.g. transport latency. Defaults to 2 seconds.
|
|
47
|
-
- **maxHeaderSize** `number | null` (optional) - Default: `--max-http-header-size` or `16384` - The maximum length of request headers in bytes. Defaults to Node.js' --max-http-header-size or 16KiB.
|
|
48
|
-
- **maxResponseSize** `number | null` (optional) - Default: `-1` - The maximum length of response body in bytes. Set to `-1` to disable.
|
|
49
|
-
- **maxConcurrentStreams**: `number` - Default: `100`. The maximum number of concurrent HTTP/2 streams per session — also advertised to the server as `peerMaxConcurrentStreams` (the cap on streams the server may push back). The initial value is replaced by the server's `SETTINGS_MAX_CONCURRENT_STREAMS` whenever the server sends one, so a user-supplied value acts as a pre-`SETTINGS` default rather than a hard cap.
|
|
50
|
-
- **pipelining** `number | null` (optional) - Default to `maxConcurrentStreams` - The amount of concurrent requests sent over a single HTTP/2 session in accordance with [RFC-7540](https://httpwg.org/specs/rfc7540.html#StreamsLayer) Stream specification. Streams can be closed up by remote server at any time. Unlike on a regular [`Client`](/docs/docs/api/Client.md), `H2CClient` aliases `pipelining` to `maxConcurrentStreams` at construction time, so the two move together.
|
|
51
|
-
- **pingInterval**: `number` - Default: `60e3`. The time interval in milliseconds between PING frames sent to the server. Set to `0` to disable PING frames. This is only applicable for HTTP/2 connections.
|
|
52
|
-
- **connect** `ConnectOptions | null` (optional) - Default: `null`.
|
|
53
|
-
- **strictContentLength** `Boolean` (optional) - Default: `true` - Whether to treat request content length mismatches as errors. If true, an error is thrown when the request content-length header doesn't match the length of the request body. **Security Warning:** Disabling this option can expose your application to HTTP Request Smuggling attacks, where mismatched content-length headers cause servers and proxies to interpret request boundaries differently. This can lead to cache poisoning, credential hijacking, and bypassing security controls. Only disable this in controlled environments where you fully trust the request source.
|
|
54
|
-
- **autoSelectFamily**: `boolean` (optional) - Default: depends on local Node version, on Node 18.13.0 and above is `false`. Enables a family autodetection algorithm that loosely implements section 5 of [RFC 8305](https://tools.ietf.org/html/rfc8305#section-5). See [here](https://nodejs.org/api/net.html#socketconnectoptions-connectlistener) for more details. This option is ignored if not supported by the current Node version.
|
|
55
|
-
- **autoSelectFamilyAttemptTimeout**: `number` - Default: depends on local Node version, on Node 18.13.0 and above is `250`. The amount of time in milliseconds to wait for a connection attempt to finish before trying the next address when using the `autoSelectFamily` option. See [here](https://nodejs.org/api/net.html#socketconnectoptions-connectlistener) for more details.
|
|
129
|
+
### `h2cClient.destroy([error[, callback]])`
|
|
56
130
|
|
|
57
|
-
|
|
131
|
+
<!-- YAML
|
|
132
|
+
added: v7.7.0
|
|
133
|
+
-->
|
|
58
134
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
135
|
+
* `error` {Error} (optional) The error with which to reject pending requests.
|
|
136
|
+
**Default:** `null`.
|
|
137
|
+
* `callback` {Function} (optional) Invoked once the client is destroyed.
|
|
138
|
+
* Returns: {Promise|undefined} A `Promise` that resolves once the client is
|
|
139
|
+
destroyed, when `callback` is not provided.
|
|
64
140
|
|
|
65
|
-
|
|
141
|
+
Destroys the client abruptly, aborting any pending requests. Waits until the
|
|
142
|
+
socket is closed before invoking `callback` (or resolving the returned `Promise`).
|
|
143
|
+
See [`dispatcher.destroy([error[, callback]])`][].
|
|
66
144
|
|
|
67
|
-
|
|
145
|
+
### `h2cClient.connect(options[, callback])`
|
|
68
146
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
147
|
+
<!-- YAML
|
|
148
|
+
added: v7.7.0
|
|
149
|
+
-->
|
|
72
150
|
|
|
73
|
-
|
|
74
|
-
|
|
151
|
+
* `options` {Object}
|
|
152
|
+
* `path` {string}
|
|
153
|
+
* `headers` {Object} (optional) **Default:** `null`.
|
|
154
|
+
* `signal` {AbortSignal|EventEmitter|null} (optional) **Default:** `null`.
|
|
155
|
+
* `opaque` {any} (optional) An opaque value passed through to the returned
|
|
156
|
+
connect data.
|
|
157
|
+
* `responseHeaders` {string|null} (optional) Set to `'raw'` to return the
|
|
158
|
+
response headers as a raw array instead of an object. **Default:** `null`.
|
|
159
|
+
* `callback` {Function} (optional) Invoked with `(err, data)` once the connection
|
|
160
|
+
is established. If omitted, a `Promise` is returned instead.
|
|
161
|
+
* Returns: {Promise|undefined} A `Promise` resolving to the connect data, when
|
|
162
|
+
`callback` is not provided.
|
|
75
163
|
|
|
76
|
-
|
|
164
|
+
Starts an HTTP `CONNECT` request. See [`dispatcher.connect(options[, callback])`][].
|
|
77
165
|
|
|
78
|
-
### `
|
|
166
|
+
### `h2cClient.dispatch(options, handlers)`
|
|
79
167
|
|
|
80
|
-
|
|
168
|
+
<!-- YAML
|
|
169
|
+
added: v7.7.0
|
|
170
|
+
-->
|
|
81
171
|
|
|
82
|
-
|
|
172
|
+
* `options` {Object} The request options.
|
|
173
|
+
* `handlers` {Object} The dispatch handler callbacks.
|
|
174
|
+
* Returns: {boolean} `false` if the dispatcher is busy and the caller should wait
|
|
175
|
+
for the [`'drain'`](#event-drain) event before dispatching again.
|
|
83
176
|
|
|
84
|
-
|
|
177
|
+
The lowest-level request API. All other request methods are implemented on top of
|
|
178
|
+
it. See [`dispatcher.dispatch(options, handler)`][].
|
|
85
179
|
|
|
86
|
-
|
|
180
|
+
### `h2cClient.pipeline(options, handler)`
|
|
87
181
|
|
|
88
|
-
|
|
182
|
+
<!-- YAML
|
|
183
|
+
added: v7.7.0
|
|
184
|
+
-->
|
|
89
185
|
|
|
90
|
-
|
|
186
|
+
* `options` {Object} The request options.
|
|
187
|
+
* `handler` {Function} A handler that receives the response data and returns a
|
|
188
|
+
{Readable} body.
|
|
189
|
+
* Returns: {Duplex} A duplex stream for the request body and response body.
|
|
91
190
|
|
|
92
|
-
|
|
191
|
+
Sends a request and returns a duplex stream, suitable for piping. See
|
|
192
|
+
[`dispatcher.pipeline(options, handler)`][].
|
|
93
193
|
|
|
94
|
-
|
|
194
|
+
### `h2cClient.request(options[, callback])`
|
|
95
195
|
|
|
96
|
-
|
|
196
|
+
<!-- YAML
|
|
197
|
+
added: v7.7.0
|
|
198
|
+
-->
|
|
97
199
|
|
|
98
|
-
|
|
200
|
+
* `options` {Object} The request options.
|
|
201
|
+
* `callback` {Function} (optional) Invoked with `(err, data)` once the response
|
|
202
|
+
is received. If omitted, a `Promise` is returned instead.
|
|
203
|
+
* Returns: {Promise|undefined} A `Promise` resolving to the response data, when
|
|
204
|
+
`callback` is not provided.
|
|
99
205
|
|
|
100
|
-
|
|
206
|
+
Performs an HTTP request. See [`dispatcher.request(options[, callback])`][].
|
|
101
207
|
|
|
102
|
-
|
|
208
|
+
### `h2cClient.stream(options, factory[, callback])`
|
|
103
209
|
|
|
104
|
-
|
|
210
|
+
<!-- YAML
|
|
211
|
+
added: v7.7.0
|
|
212
|
+
-->
|
|
105
213
|
|
|
106
|
-
|
|
214
|
+
* `options` {Object} The request options.
|
|
215
|
+
* `factory` {Function} A factory that returns a {Writable} to which the response
|
|
216
|
+
body is written.
|
|
217
|
+
* `callback` {Function} (optional) Invoked once the request completes. If
|
|
218
|
+
omitted, a `Promise` is returned instead.
|
|
219
|
+
* Returns: {Promise|undefined} A `Promise` that resolves once the request
|
|
220
|
+
completes, when `callback` is not provided.
|
|
107
221
|
|
|
108
|
-
|
|
222
|
+
Sends a request and writes the response body to the stream returned by `factory`.
|
|
223
|
+
See [`dispatcher.stream(options, factory[, callback])`][].
|
|
109
224
|
|
|
110
|
-
|
|
225
|
+
### `h2cClient.upgrade(options[, callback])`
|
|
111
226
|
|
|
112
|
-
|
|
227
|
+
<!-- YAML
|
|
228
|
+
added: v7.7.0
|
|
229
|
+
-->
|
|
113
230
|
|
|
114
|
-
|
|
231
|
+
* `options` {Object} The request options.
|
|
232
|
+
* `callback` {Function} (optional) Invoked with `(err, data)` once the upgrade
|
|
233
|
+
completes. If omitted, a `Promise` is returned instead.
|
|
234
|
+
* Returns: {Promise|undefined} A `Promise` resolving to the upgrade data, when
|
|
235
|
+
`callback` is not provided.
|
|
115
236
|
|
|
116
|
-
|
|
237
|
+
Upgrades a connection to a different protocol. See
|
|
238
|
+
[`dispatcher.upgrade(options[, callback])`][].
|
|
117
239
|
|
|
118
|
-
|
|
240
|
+
### `h2cClient.closed`
|
|
119
241
|
|
|
120
|
-
|
|
242
|
+
<!-- YAML
|
|
243
|
+
added: v7.7.0
|
|
244
|
+
-->
|
|
121
245
|
|
|
122
|
-
|
|
246
|
+
* Type: {boolean}
|
|
123
247
|
|
|
124
|
-
`true` after `
|
|
248
|
+
`true` after [`h2cClient.close()`](#h2cclientclosecallback) has been called.
|
|
125
249
|
|
|
126
|
-
### `
|
|
250
|
+
### `h2cClient.destroyed`
|
|
127
251
|
|
|
128
|
-
|
|
252
|
+
<!-- YAML
|
|
253
|
+
added: v7.7.0
|
|
254
|
+
-->
|
|
129
255
|
|
|
130
|
-
|
|
256
|
+
* Type: {boolean}
|
|
131
257
|
|
|
132
|
-
|
|
258
|
+
`true` after [`h2cClient.destroy()`](#h2cclientdestroyerror-callback) has been
|
|
259
|
+
called, or after [`h2cClient.close()`](#h2cclientclosecallback) has been called
|
|
260
|
+
and the client shutdown has completed.
|
|
133
261
|
|
|
134
|
-
###
|
|
262
|
+
### `h2cClient.pipelining`
|
|
263
|
+
|
|
264
|
+
<!-- YAML
|
|
265
|
+
added: v7.7.0
|
|
266
|
+
-->
|
|
135
267
|
|
|
136
|
-
|
|
268
|
+
* Type: {number}
|
|
137
269
|
|
|
138
|
-
|
|
270
|
+
Gets and sets the pipelining factor, i.e. the number of requests multiplexed over
|
|
271
|
+
the connection.
|
|
139
272
|
|
|
140
|
-
|
|
141
|
-
- **targets** `Array<Dispatcher>`
|
|
273
|
+
### Event: `'connect'`
|
|
142
274
|
|
|
143
|
-
|
|
275
|
+
<!-- YAML
|
|
276
|
+
added: v7.7.0
|
|
277
|
+
-->
|
|
144
278
|
|
|
145
|
-
|
|
279
|
+
* `origin` {URL}
|
|
280
|
+
* `targets` {Array<Dispatcher>}
|
|
146
281
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
282
|
+
Emitted when the socket has been created and connected. The client connects once
|
|
283
|
+
`client.size > 0`. See [Dispatcher Event: `'connect'`][].
|
|
284
|
+
|
|
285
|
+
```mjs
|
|
286
|
+
import { createServer } from 'node:http2'
|
|
287
|
+
import { once } from 'node:events'
|
|
288
|
+
import { H2CClient } from 'undici'
|
|
151
289
|
|
|
152
290
|
const server = createServer((request, response) => {
|
|
153
|
-
response.end(
|
|
154
|
-
}).listen()
|
|
291
|
+
response.end('Hello, World!')
|
|
292
|
+
}).listen()
|
|
155
293
|
|
|
156
|
-
await once(server,
|
|
294
|
+
await once(server, 'listening')
|
|
157
295
|
|
|
158
|
-
const client = new H2CClient(`http://localhost:${server.address().port}`)
|
|
296
|
+
const client = new H2CClient(`http://localhost:${server.address().port}`)
|
|
159
297
|
|
|
160
|
-
client.on(
|
|
161
|
-
console.log(`Connected to ${origin}`)
|
|
162
|
-
})
|
|
298
|
+
client.on('connect', (origin) => {
|
|
299
|
+
console.log(`Connected to ${origin}`)
|
|
300
|
+
})
|
|
163
301
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
body.setEncoding("utf-8");
|
|
170
|
-
body.on("data", console.log);
|
|
171
|
-
client.close();
|
|
172
|
-
server.close();
|
|
173
|
-
} catch (error) {
|
|
174
|
-
console.error(error);
|
|
175
|
-
client.close();
|
|
176
|
-
server.close();
|
|
177
|
-
}
|
|
302
|
+
const { body } = await client.request({ path: '/', method: 'GET' })
|
|
303
|
+
console.log(await body.text())
|
|
304
|
+
|
|
305
|
+
client.close()
|
|
306
|
+
server.close()
|
|
178
307
|
```
|
|
179
308
|
|
|
180
309
|
### Event: `'disconnect'`
|
|
181
310
|
|
|
182
|
-
|
|
311
|
+
<!-- YAML
|
|
312
|
+
added: v7.7.0
|
|
313
|
+
-->
|
|
183
314
|
|
|
184
|
-
|
|
315
|
+
* `origin` {URL}
|
|
316
|
+
* `targets` {Array<Dispatcher>}
|
|
317
|
+
* `error` {Error}
|
|
185
318
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
319
|
+
Emitted when the socket has disconnected. The `error` argument is the error that
|
|
320
|
+
caused the socket to disconnect. The client reconnects if (or once)
|
|
321
|
+
`client.size > 0`. See [Dispatcher Event: `'disconnect'`][].
|
|
189
322
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
```js
|
|
195
|
-
import { createServer } from "node:http2";
|
|
196
|
-
import { H2CClient } from "undici";
|
|
197
|
-
import { once } from "events";
|
|
323
|
+
```mjs
|
|
324
|
+
import { createServer } from 'node:http2'
|
|
325
|
+
import { once } from 'node:events'
|
|
326
|
+
import { H2CClient } from 'undici'
|
|
198
327
|
|
|
199
328
|
const server = createServer((request, response) => {
|
|
200
|
-
response.destroy()
|
|
201
|
-
}).listen()
|
|
329
|
+
response.destroy()
|
|
330
|
+
}).listen()
|
|
202
331
|
|
|
203
|
-
await once(server,
|
|
332
|
+
await once(server, 'listening')
|
|
204
333
|
|
|
205
|
-
const client = new H2CClient(`http://localhost:${server.address().port}`)
|
|
334
|
+
const client = new H2CClient(`http://localhost:${server.address().port}`)
|
|
206
335
|
|
|
207
|
-
client.on(
|
|
208
|
-
console.log(`Disconnected from ${origin}`)
|
|
209
|
-
})
|
|
336
|
+
client.on('disconnect', (origin) => {
|
|
337
|
+
console.log(`Disconnected from ${origin}`)
|
|
338
|
+
})
|
|
210
339
|
|
|
211
340
|
try {
|
|
212
|
-
await client.request({
|
|
213
|
-
path: "/",
|
|
214
|
-
method: "GET",
|
|
215
|
-
});
|
|
341
|
+
await client.request({ path: '/', method: 'GET' })
|
|
216
342
|
} catch (error) {
|
|
217
|
-
console.error(error.message)
|
|
218
|
-
|
|
219
|
-
|
|
343
|
+
console.error(error.message)
|
|
344
|
+
} finally {
|
|
345
|
+
client.close()
|
|
346
|
+
server.close()
|
|
220
347
|
}
|
|
221
348
|
```
|
|
222
349
|
|
|
223
350
|
### Event: `'drain'`
|
|
224
351
|
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
352
|
+
<!-- YAML
|
|
353
|
+
added: v7.7.0
|
|
354
|
+
-->
|
|
228
355
|
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
```js
|
|
232
|
-
import { createServer } from "node:http2";
|
|
233
|
-
import { H2CClient } from "undici";
|
|
234
|
-
import { once } from "events";
|
|
235
|
-
|
|
236
|
-
const server = createServer((request, response) => {
|
|
237
|
-
response.end("Hello, World!");
|
|
238
|
-
}).listen();
|
|
356
|
+
* `origin` {URL}
|
|
239
357
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
const client = new H2CClient(`http://localhost:${server.address().port}`);
|
|
243
|
-
|
|
244
|
-
client.on("drain", () => {
|
|
245
|
-
console.log("drain event");
|
|
246
|
-
client.close();
|
|
247
|
-
server.close();
|
|
248
|
-
});
|
|
249
|
-
|
|
250
|
-
const requests = [
|
|
251
|
-
client.request({ path: "/", method: "GET" }),
|
|
252
|
-
client.request({ path: "/", method: "GET" }),
|
|
253
|
-
client.request({ path: "/", method: "GET" }),
|
|
254
|
-
];
|
|
255
|
-
|
|
256
|
-
await Promise.all(requests);
|
|
257
|
-
|
|
258
|
-
console.log("requests completed");
|
|
259
|
-
```
|
|
358
|
+
Emitted when the client is no longer busy and can accept more requests. See
|
|
359
|
+
[Dispatcher Event: `'drain'`][].
|
|
260
360
|
|
|
261
361
|
### Event: `'error'`
|
|
262
362
|
|
|
263
|
-
|
|
363
|
+
<!-- YAML
|
|
364
|
+
added: v7.7.0
|
|
365
|
+
-->
|
|
366
|
+
|
|
367
|
+
* `error` {Error}
|
|
368
|
+
|
|
369
|
+
Emitted for user errors, such as an error thrown from an `onResponseError`
|
|
370
|
+
handler.
|
|
371
|
+
|
|
372
|
+
[RFC 8305]: https://tools.ietf.org/html/rfc8305#section-5
|
|
373
|
+
[Dispatcher Event: `'connect'`]: Dispatcher.md#event-connect
|
|
374
|
+
[Dispatcher Event: `'disconnect'`]: Dispatcher.md#event-disconnect
|
|
375
|
+
[Dispatcher Event: `'drain'`]: Dispatcher.md#event-drain
|
|
376
|
+
[`Client`]: Client.md#class-client
|
|
377
|
+
[`Dispatcher`]: Dispatcher.md#class-dispatcher
|
|
378
|
+
[`dispatcher.close([callback])`]: Dispatcher.md#dispatcherclosecallback
|
|
379
|
+
[`dispatcher.connect(options[, callback])`]: Dispatcher.md#dispatcherconnectoptions-callback
|
|
380
|
+
[`dispatcher.destroy([error[, callback]])`]: Dispatcher.md#dispatcherdestroyerror-callback
|
|
381
|
+
[`dispatcher.dispatch(options, handler)`]: Dispatcher.md#dispatcherdispatchoptions-handler
|
|
382
|
+
[`dispatcher.pipeline(options, handler)`]: Dispatcher.md#dispatcherpipelineoptions-handler
|
|
383
|
+
[`dispatcher.request(options[, callback])`]: Dispatcher.md#dispatcherrequestoptions-callback
|
|
384
|
+
[`dispatcher.stream(options, factory[, callback])`]: Dispatcher.md#dispatcherstreamoptions-factory-callback
|
|
385
|
+
[`dispatcher.upgrade(options[, callback])`]: Dispatcher.md#dispatcherupgradeoptions-callback
|