@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,27 +1,93 @@
|
|
|
1
|
-
#
|
|
1
|
+
# ClientStats
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<!--introduced_in=v7.9.0-->
|
|
4
|
+
<!--type=module-->
|
|
5
|
+
<!-- source_link=lib/util/stats.js -->
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
> Stability: 2 - Stable
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
A `ClientStats` is a point-in-time snapshot of the connection and request
|
|
10
|
+
state of a single [`Client`][]. Instances are not created directly; a fresh
|
|
11
|
+
snapshot is produced each time the [`client.stats`][] getter is read.
|
|
8
12
|
|
|
9
|
-
|
|
13
|
+
```mjs
|
|
14
|
+
import { Client } from 'undici'
|
|
10
15
|
|
|
11
|
-
|
|
16
|
+
const client = new Client('http://localhost:3000')
|
|
17
|
+
const stats = client.stats
|
|
18
|
+
console.log(stats.connected, stats.running)
|
|
19
|
+
```
|
|
12
20
|
|
|
13
|
-
|
|
21
|
+
```cjs
|
|
22
|
+
const { Client } = require('undici')
|
|
14
23
|
|
|
15
|
-
|
|
24
|
+
const client = new Client('http://localhost:3000')
|
|
25
|
+
const stats = client.stats
|
|
26
|
+
console.log(stats.connected, stats.running)
|
|
27
|
+
```
|
|
16
28
|
|
|
17
|
-
|
|
29
|
+
## Class: `ClientStats`
|
|
18
30
|
|
|
19
|
-
|
|
31
|
+
<!-- YAML
|
|
32
|
+
added: v7.9.0
|
|
33
|
+
-->
|
|
20
34
|
|
|
21
|
-
|
|
35
|
+
Captures the connection and request counters of a [`Client`][] at the moment
|
|
36
|
+
the snapshot is taken. The values are read from the client at construction time
|
|
37
|
+
and do not update afterwards; read [`client.stats`][] again for current values.
|
|
22
38
|
|
|
23
|
-
|
|
39
|
+
### `new ClientStats(client)`
|
|
24
40
|
|
|
25
|
-
|
|
41
|
+
<!-- YAML
|
|
42
|
+
added: v7.9.0
|
|
43
|
+
-->
|
|
26
44
|
|
|
27
|
-
|
|
45
|
+
* `client` {Client} The client to read the statistics from.
|
|
46
|
+
|
|
47
|
+
Creates a snapshot from the supplied `client`. This constructor is used
|
|
48
|
+
internally by the [`client.stats`][] getter and is not normally invoked by
|
|
49
|
+
application code.
|
|
50
|
+
|
|
51
|
+
### `clientStats.connected`
|
|
52
|
+
|
|
53
|
+
<!-- YAML
|
|
54
|
+
added: v7.9.0
|
|
55
|
+
-->
|
|
56
|
+
|
|
57
|
+
* Type: {boolean}
|
|
58
|
+
|
|
59
|
+
`true` when the client currently has an open socket connection.
|
|
60
|
+
|
|
61
|
+
### `clientStats.pending`
|
|
62
|
+
|
|
63
|
+
<!-- YAML
|
|
64
|
+
added: v7.9.0
|
|
65
|
+
-->
|
|
66
|
+
|
|
67
|
+
* Type: {number}
|
|
68
|
+
|
|
69
|
+
Number of open socket connections of this client that do not have an active
|
|
70
|
+
request.
|
|
71
|
+
|
|
72
|
+
### `clientStats.running`
|
|
73
|
+
|
|
74
|
+
<!-- YAML
|
|
75
|
+
added: v7.9.0
|
|
76
|
+
-->
|
|
77
|
+
|
|
78
|
+
* Type: {number}
|
|
79
|
+
|
|
80
|
+
Number of currently active requests of this client.
|
|
81
|
+
|
|
82
|
+
### `clientStats.size`
|
|
83
|
+
|
|
84
|
+
<!-- YAML
|
|
85
|
+
added: v7.9.0
|
|
86
|
+
-->
|
|
87
|
+
|
|
88
|
+
* Type: {number}
|
|
89
|
+
|
|
90
|
+
Number of active, pending, or queued requests of this client.
|
|
91
|
+
|
|
92
|
+
[`Client`]: Client.md#class-client
|
|
93
|
+
[`client.stats`]: Client.md#clientstats
|
|
@@ -1,49 +1,87 @@
|
|
|
1
1
|
# Connector
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
this is the right place.
|
|
3
|
+
<!--introduced_in=v4.3.0-->
|
|
4
|
+
<!--type=module-->
|
|
5
|
+
<!-- source_link=lib/core/connect.js -->
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
> Stability: 2 - Stable
|
|
9
8
|
|
|
10
|
-
|
|
9
|
+
undici opens the underlying socket for every request through a *connector*. By
|
|
10
|
+
default this is handled internally, so most applications never interact with the
|
|
11
|
+
connector directly. When a request needs additional control over the socket —
|
|
12
|
+
for example to inspect a TLS certificate, pin a CA fingerprint, or tunnel the
|
|
13
|
+
connection — a custom connector can be supplied through the `connect` option of
|
|
14
|
+
a [`Dispatcher`][].
|
|
11
15
|
|
|
12
|
-
|
|
13
|
-
|
|
16
|
+
Use the `buildConnector` helper to construct a connector with sensible defaults
|
|
17
|
+
and then wrap it:
|
|
14
18
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
* **maxCachedSessions** `number | null` (optional) - Default: `100` - Maximum number of TLS cached sessions. Use 0 to disable TLS session caching. Default: `100`.
|
|
18
|
-
* **timeout** `number | null` (optional) - In milliseconds. Default `10e3`.
|
|
19
|
-
* **servername** `string | null` (optional)
|
|
19
|
+
```mjs
|
|
20
|
+
import { buildConnector } from 'undici'
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
#### Parameter: `connector.Options`
|
|
24
|
-
|
|
25
|
-
* **hostname** `string` (required)
|
|
26
|
-
* **host** `string` (optional)
|
|
27
|
-
* **protocol** `string` (required)
|
|
28
|
-
* **port** `string` (required)
|
|
29
|
-
* **servername** `string` (optional)
|
|
30
|
-
* **localAddress** `string | null` (optional) Local address the socket should connect from.
|
|
31
|
-
* **httpSocket** `Socket` (optional) Establish secure connection on a given socket rather than creating a new socket. It can only be sent on TLS update.
|
|
32
|
-
|
|
33
|
-
### Basic example
|
|
34
|
-
|
|
35
|
-
```js
|
|
36
|
-
'use strict'
|
|
22
|
+
const connector = buildConnector({ rejectUnauthorized: false })
|
|
23
|
+
```
|
|
37
24
|
|
|
25
|
+
`buildConnector` accepts the same TLS options as
|
|
26
|
+
[`tls.connect()`][tls.connect] in addition to the undici-specific options listed
|
|
27
|
+
below, and returns a [`connector`](#connectoroptions-callback) function that
|
|
28
|
+
undici invokes for each new connection.
|
|
29
|
+
|
|
30
|
+
## `buildConnector([options])`
|
|
31
|
+
|
|
32
|
+
<!-- YAML
|
|
33
|
+
added: v5.23.4
|
|
34
|
+
-->
|
|
35
|
+
|
|
36
|
+
* `options` {buildConnector.BuildOptions} (optional) Connection options. In
|
|
37
|
+
addition to every [`tls.connect()`][tls.connect] option, the following fields
|
|
38
|
+
are supported:
|
|
39
|
+
* `allowH2` {boolean} Whether to offer HTTP/2 (`h2`) during TLS ALPN
|
|
40
|
+
negotiation. **Default:** `true`.
|
|
41
|
+
* `preferH2` {boolean} Only effective together with `allowH2`. When `true`,
|
|
42
|
+
ALPN is offered as `['h2', 'http/1.1']` (HTTP/2 first) instead of the default
|
|
43
|
+
`['http/1.1', 'h2']`. Use this when the server selects the ALPN protocol by
|
|
44
|
+
*client* preference (for example, some load balancers) so that HTTP/2 is
|
|
45
|
+
negotiated whenever the server supports it. If the server does not support
|
|
46
|
+
HTTP/2, ALPN transparently falls back to `http/1.1`. **Default:** `false`.
|
|
47
|
+
* `maxCachedSessions` {number|null} Maximum number of TLS sessions to cache for
|
|
48
|
+
reuse. Use `0` to disable TLS session caching. Must be a non-negative
|
|
49
|
+
integer. **Default:** `100`.
|
|
50
|
+
* `socketPath` {string|null} An IPC endpoint, either a Unix domain socket or a
|
|
51
|
+
Windows named pipe. **Default:** `null`.
|
|
52
|
+
* `timeout` {number|null} The connection timeout in milliseconds. A
|
|
53
|
+
[`ConnectTimeoutError`][] is raised when the socket fails to connect within
|
|
54
|
+
this period. **Default:** `10e3`.
|
|
55
|
+
* `port` {number} The port to connect to when one is not provided to the
|
|
56
|
+
connector. Defaults to `443` for `https:` and `80` otherwise.
|
|
57
|
+
* `keepAlive` {boolean|null} Whether to enable TCP keep-alive on the socket.
|
|
58
|
+
**Default:** `true`.
|
|
59
|
+
* `keepAliveInitialDelay` {number|null} The delay in milliseconds before the
|
|
60
|
+
first TCP keep-alive probe is sent on an idle socket. **Default:** `60e3`.
|
|
61
|
+
* `typeOfService` {number|null} The IP Type of Service (ToS) value to set on
|
|
62
|
+
the socket. **Default:** `null`.
|
|
63
|
+
* Returns: {buildConnector.connector} A
|
|
64
|
+
[`connector`](#connectoroptions-callback) function bound to the supplied
|
|
65
|
+
options.
|
|
66
|
+
|
|
67
|
+
Builds a connector function. `maxCachedSessions` must be a non-negative integer
|
|
68
|
+
or an [`InvalidArgumentError`][] is thrown.
|
|
69
|
+
|
|
70
|
+
The returned function may be passed directly as the `connect` option of a
|
|
71
|
+
[`Dispatcher`][], or wrapped to perform extra validation on each socket before it
|
|
72
|
+
is handed back to undici.
|
|
73
|
+
|
|
74
|
+
```mjs
|
|
38
75
|
import { Client, buildConnector } from 'undici'
|
|
39
76
|
|
|
40
77
|
const connector = buildConnector({ rejectUnauthorized: false })
|
|
78
|
+
|
|
41
79
|
const client = new Client('https://localhost:3000', {
|
|
42
80
|
connect (opts, cb) {
|
|
43
81
|
connector(opts, (err, socket) => {
|
|
44
82
|
if (err) {
|
|
45
83
|
cb(err)
|
|
46
|
-
} else if (/* assertion */) {
|
|
84
|
+
} else if (/* assertion */ false) {
|
|
47
85
|
socket.destroy()
|
|
48
86
|
cb(new Error('kaboom'))
|
|
49
87
|
} else {
|
|
@@ -54,15 +92,53 @@ const client = new Client('https://localhost:3000', {
|
|
|
54
92
|
})
|
|
55
93
|
```
|
|
56
94
|
|
|
95
|
+
## `connector(options, callback)`
|
|
96
|
+
|
|
97
|
+
<!-- YAML
|
|
98
|
+
added: v4.3.0
|
|
99
|
+
-->
|
|
100
|
+
|
|
101
|
+
* `options` {Object} Per-connection options provided by undici.
|
|
102
|
+
* `hostname` {string} The host to connect to.
|
|
103
|
+
* `host` {string} (optional) The value of the request `Host` header, used to
|
|
104
|
+
derive the TLS `servername` when one is not supplied.
|
|
105
|
+
* `protocol` {string} The request protocol, for example `'https:'` or
|
|
106
|
+
`'http:'`. A value of `'https:'` establishes a TLS connection.
|
|
107
|
+
* `port` {string} The port to connect to. Defaults to `443` for `https:` and
|
|
108
|
+
`80` otherwise.
|
|
109
|
+
* `servername` {string} (optional) The TLS Server Name Indication (SNI) value.
|
|
110
|
+
Derived from `host` when omitted.
|
|
111
|
+
* `localAddress` {string|null} (optional) The local address the socket should
|
|
112
|
+
connect from.
|
|
113
|
+
* `httpSocket` {Socket} (optional) An existing socket on which to establish the
|
|
114
|
+
secure connection rather than creating a new one. May only be supplied for a
|
|
115
|
+
TLS upgrade (`protocol` of `'https:'`).
|
|
116
|
+
* `callback` {Function} Called once the socket has connected or failed.
|
|
117
|
+
* `err` {Error|null} The connection error, or `null` on success.
|
|
118
|
+
* `socket` {Socket|TLSSocket|null} The connected socket, or `null` on failure.
|
|
119
|
+
* Returns: {Socket|TLSSocket} The socket being established.
|
|
120
|
+
|
|
121
|
+
The function returned by [`buildConnector()`](#buildconnectoroptions). undici
|
|
122
|
+
calls it for every new connection. It opens a [`net.Socket`][] for `http:`
|
|
123
|
+
targets or a [`tls.TLSSocket`][] for `https:` targets, applies TCP keep-alive and
|
|
124
|
+
the connect timeout, and invokes `callback` once the socket connects or errors.
|
|
125
|
+
The socket is also returned synchronously.
|
|
126
|
+
|
|
127
|
+
When connecting over TLS, established sessions are cached (subject to
|
|
128
|
+
`maxCachedSessions`) and reused for subsequent connections to the same
|
|
129
|
+
`servername` or `hostname`.
|
|
130
|
+
|
|
57
131
|
### Example: validate the CA fingerprint
|
|
58
132
|
|
|
59
|
-
|
|
60
|
-
|
|
133
|
+
A custom connector is a convenient place to verify the server certificate before
|
|
134
|
+
any request is sent over the socket.
|
|
61
135
|
|
|
136
|
+
```mjs
|
|
62
137
|
import { Client, buildConnector } from 'undici'
|
|
63
138
|
|
|
64
139
|
const caFingerprint = 'FO:OB:AR'
|
|
65
140
|
const connector = buildConnector({ rejectUnauthorized: false })
|
|
141
|
+
|
|
66
142
|
const client = new Client('https://localhost:3000', {
|
|
67
143
|
connect (opts, cb) {
|
|
68
144
|
connector(opts, (err, socket) => {
|
|
@@ -97,20 +173,26 @@ client.request({
|
|
|
97
173
|
function getIssuerCertificate (socket) {
|
|
98
174
|
let certificate = socket.getPeerCertificate(true)
|
|
99
175
|
while (certificate && Object.keys(certificate).length > 0) {
|
|
100
|
-
//
|
|
176
|
+
// Invalid certificate.
|
|
101
177
|
if (certificate.issuerCertificate == null) {
|
|
102
178
|
return null
|
|
103
179
|
}
|
|
104
180
|
|
|
105
|
-
// We have reached the root certificate.
|
|
106
|
-
//
|
|
181
|
+
// We have reached the root certificate. In case of self-signed
|
|
182
|
+
// certificates, `issuerCertificate` may be a circular reference.
|
|
107
183
|
if (certificate.fingerprint256 === certificate.issuerCertificate.fingerprint256) {
|
|
108
184
|
break
|
|
109
185
|
}
|
|
110
186
|
|
|
111
|
-
// continue the loop
|
|
112
187
|
certificate = certificate.issuerCertificate
|
|
113
188
|
}
|
|
114
189
|
return certificate
|
|
115
190
|
}
|
|
116
191
|
```
|
|
192
|
+
|
|
193
|
+
[`ConnectTimeoutError`]: Errors.md#class-connecttimeouterror
|
|
194
|
+
[`Dispatcher`]: Dispatcher.md#class-dispatcher
|
|
195
|
+
[`InvalidArgumentError`]: Errors.md#class-invalidargumenterror
|
|
196
|
+
[`net.Socket`]: https://nodejs.org/api/net.html#class-netsocket
|
|
197
|
+
[`tls.TLSSocket`]: https://nodejs.org/api/tls.html#class-tlstlssocket
|
|
198
|
+
[tls.connect]: https://nodejs.org/api/tls.html#tlsconnectoptions-callback
|
|
@@ -1,19 +1,51 @@
|
|
|
1
1
|
# MIME Type Parsing
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<!--introduced_in=v4.13.0-->
|
|
4
|
+
<!--type=module-->
|
|
5
|
+
<!-- source_link=lib/web/fetch/data-url.js -->
|
|
4
6
|
|
|
5
|
-
|
|
6
|
-
* **subtype** `string`
|
|
7
|
-
* **parameters** `Map<string, string>`
|
|
8
|
-
* **essence** `string`
|
|
7
|
+
> Stability: 2 - Stable
|
|
9
8
|
|
|
10
|
-
|
|
9
|
+
undici exposes helpers for parsing and serializing MIME types according to the
|
|
10
|
+
WHATWG [MIME Sniffing Standard][]. These are the same primitives undici uses
|
|
11
|
+
internally to interpret `Content-Type` headers and `data:` URLs.
|
|
12
|
+
|
|
13
|
+
Import the functions from `'undici'`:
|
|
14
|
+
|
|
15
|
+
```mjs
|
|
16
|
+
import { parseMIMEType, serializeAMimeType } from 'undici'
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
A parsed MIME type is represented as a plain object with the following shape:
|
|
11
20
|
|
|
12
|
-
|
|
21
|
+
* `type` {string} The lowercased type, for example `'text'`.
|
|
22
|
+
* `subtype` {string} The lowercased subtype, for example `'html'`.
|
|
23
|
+
* `parameters` {Map<string, string>} The parameters, keyed by lowercased
|
|
24
|
+
parameter name.
|
|
25
|
+
* `essence` {string} The concatenation of `type`, `'/'`, and `subtype`, for
|
|
26
|
+
example `'text/html'`.
|
|
13
27
|
|
|
14
|
-
|
|
28
|
+
## `parseMIMEType(input)`
|
|
15
29
|
|
|
16
|
-
|
|
30
|
+
<!-- YAML
|
|
31
|
+
added: v4.13.0
|
|
32
|
+
-->
|
|
33
|
+
|
|
34
|
+
* `input` {string} The MIME type string to parse.
|
|
35
|
+
* Returns: {Object|string} A parsed MIME type record, or the string literal
|
|
36
|
+
`'failure'` when `input` cannot be parsed.
|
|
37
|
+
* `type` {string} The lowercased type.
|
|
38
|
+
* `subtype` {string} The lowercased subtype.
|
|
39
|
+
* `parameters` {Map<string, string>} The parsed parameters, keyed by
|
|
40
|
+
lowercased parameter name.
|
|
41
|
+
* `essence` {string} The MIME type essence, `` `${type}/${subtype}` ``.
|
|
42
|
+
|
|
43
|
+
Implements the WHATWG [parse a MIME type][] algorithm. The `type` and `subtype`
|
|
44
|
+
are lowercased, and only the first occurrence of a duplicate parameter name is
|
|
45
|
+
retained. When `input` is empty, lacks a `/`, or otherwise violates the grammar,
|
|
46
|
+
the string literal `'failure'` is returned instead of a record.
|
|
47
|
+
|
|
48
|
+
```mjs
|
|
17
49
|
import { parseMIMEType } from 'undici'
|
|
18
50
|
|
|
19
51
|
parseMIMEType('text/html; charset=gbk')
|
|
@@ -23,21 +55,31 @@ parseMIMEType('text/html; charset=gbk')
|
|
|
23
55
|
// parameters: Map(1) { 'charset' => 'gbk' },
|
|
24
56
|
// essence: 'text/html'
|
|
25
57
|
// }
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
Arguments:
|
|
29
58
|
|
|
30
|
-
|
|
59
|
+
parseMIMEType('not a mime type')
|
|
60
|
+
// 'failure'
|
|
61
|
+
```
|
|
31
62
|
|
|
32
|
-
|
|
63
|
+
## `serializeAMimeType(mimeType)`
|
|
33
64
|
|
|
34
|
-
|
|
65
|
+
<!-- YAML
|
|
66
|
+
added: v5.11.0
|
|
67
|
+
-->
|
|
35
68
|
|
|
36
|
-
|
|
69
|
+
* `mimeType` {Object} A MIME type record, as returned by [`parseMIMEType()`][].
|
|
70
|
+
* `type` {string} The type.
|
|
71
|
+
* `subtype` {string} The subtype.
|
|
72
|
+
* `parameters` {Map<string, string>} The parameters to serialize, in
|
|
73
|
+
insertion order.
|
|
74
|
+
* `essence` {string} The MIME type essence, `` `${type}/${subtype}` ``.
|
|
75
|
+
* Returns: {string} The serialized MIME type.
|
|
37
76
|
|
|
38
|
-
|
|
77
|
+
Implements the WHATWG [serialize a MIME type][] algorithm. The essence is
|
|
78
|
+
emitted followed by each parameter as `;name=value`. A parameter value that
|
|
79
|
+
contains characters outside the HTTP token set is quoted, and any `"` or `\`
|
|
80
|
+
characters within it are escaped.
|
|
39
81
|
|
|
40
|
-
```
|
|
82
|
+
```mjs
|
|
41
83
|
import { serializeAMimeType } from 'undici'
|
|
42
84
|
|
|
43
85
|
serializeAMimeType({
|
|
@@ -46,12 +88,10 @@ serializeAMimeType({
|
|
|
46
88
|
parameters: new Map([['charset', 'gbk']]),
|
|
47
89
|
essence: 'text/html'
|
|
48
90
|
})
|
|
49
|
-
// text/html;charset=gbk
|
|
50
|
-
|
|
91
|
+
// 'text/html;charset=gbk'
|
|
51
92
|
```
|
|
52
93
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
Returns: `string`
|
|
94
|
+
[MIME Sniffing Standard]: https://mimesniff.spec.whatwg.org/
|
|
95
|
+
[`parseMIMEType()`]: #parsemimetypeinput
|
|
96
|
+
[parse a MIME type]: https://mimesniff.spec.whatwg.org/#parse-a-mime-type
|
|
97
|
+
[serialize a MIME type]: https://mimesniff.spec.whatwg.org/#serialize-a-mime-type
|
|
@@ -1,44 +1,58 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Cookies
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<!--introduced_in=v5.15.0-->
|
|
4
|
+
<!--type=module-->
|
|
5
|
+
<!-- source_link=lib/web/cookies/index.js -->
|
|
4
6
|
|
|
5
|
-
|
|
6
|
-
* **value** `string`
|
|
7
|
-
* **expires** `Date|number` (optional)
|
|
8
|
-
* **maxAge** `number` (optional)
|
|
9
|
-
* **domain** `string` (optional)
|
|
10
|
-
* **path** `string` (optional)
|
|
11
|
-
* **secure** `boolean` (optional)
|
|
12
|
-
* **httpOnly** `boolean` (optional)
|
|
13
|
-
* **sameSite** `'Strict'|'Lax'|'None'` (optional)
|
|
14
|
-
* **unparsed** `string[]` (optional) Left over attributes that weren't parsed.
|
|
7
|
+
> Stability: 2 - Stable
|
|
15
8
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
```js
|
|
21
|
-
import { deleteCookie, Headers } from 'undici'
|
|
9
|
+
A set of helpers for reading and writing HTTP cookies on a [`Headers`][]
|
|
10
|
+
instance, following the [RFC 6265bis][] cookie parsing and serialization
|
|
11
|
+
algorithm. They operate on the `Cookie` request header and the `Set-Cookie`
|
|
12
|
+
response header.
|
|
22
13
|
|
|
23
|
-
|
|
24
|
-
deleteCookie
|
|
25
|
-
|
|
26
|
-
console.log(headers.get('set-cookie')) // name=; Expires=Thu, 01 Jan 1970 00:00:00 GMT
|
|
14
|
+
```mjs
|
|
15
|
+
import { getCookies, setCookie, deleteCookie, getSetCookies, parseCookie } from 'undici'
|
|
27
16
|
```
|
|
28
17
|
|
|
29
|
-
|
|
18
|
+
These functions do not manage a cookie jar or perform any network activity; they
|
|
19
|
+
only read from and mutate the supplied `Headers` object.
|
|
20
|
+
|
|
21
|
+
## `Cookie`
|
|
22
|
+
|
|
23
|
+
The `Cookie` object describes a single cookie and its attributes. It is the
|
|
24
|
+
return shape of [`parseCookie()`][] and [`getSetCookies()`][], and the input
|
|
25
|
+
shape accepted by [`setCookie()`][].
|
|
26
|
+
|
|
27
|
+
* `name` {string} The cookie name.
|
|
28
|
+
* `value` {string} The cookie value.
|
|
29
|
+
* `expires` {Date|number} The cookie expiry time, as a `Date` or a Unix
|
|
30
|
+
timestamp in seconds. (optional)
|
|
31
|
+
* `maxAge` {number} The number of seconds until the cookie expires. (optional)
|
|
32
|
+
* `domain` {string} The hosts the cookie is sent to. (optional)
|
|
33
|
+
* `path` {string} The URL path that must exist for the cookie to be sent.
|
|
34
|
+
(optional)
|
|
35
|
+
* `secure` {boolean} Whether the cookie is only sent over HTTPS. (optional)
|
|
36
|
+
* `httpOnly` {boolean} Whether the cookie is inaccessible to client-side
|
|
37
|
+
JavaScript. (optional)
|
|
38
|
+
* `sameSite` {string} Controls whether the cookie is sent with cross-site
|
|
39
|
+
requests. One of `'Strict'`, `'Lax'`, or `'None'`. (optional)
|
|
40
|
+
* `unparsed` {string[]} Any attributes that were present in the `Set-Cookie`
|
|
41
|
+
header but not recognized, each formatted as `` `name=value` ``. (optional)
|
|
30
42
|
|
|
31
|
-
|
|
32
|
-
* **name** `string`
|
|
33
|
-
* **attributes** `{ path?: string, domain?: string }` (optional)
|
|
43
|
+
## `getCookies(headers)`
|
|
34
44
|
|
|
35
|
-
|
|
45
|
+
<!-- YAML
|
|
46
|
+
added: v5.15.0
|
|
47
|
+
-->
|
|
36
48
|
|
|
37
|
-
|
|
49
|
+
* `headers` {Headers} The `Headers` to read the `Cookie` header from.
|
|
50
|
+
* Returns: {Record<string, string>} A map of cookie names to values.
|
|
38
51
|
|
|
39
|
-
Parses the `Cookie` header and returns
|
|
52
|
+
Parses the `Cookie` header of `headers` and returns its name/value pairs as a
|
|
53
|
+
plain object. An empty object is returned when no `Cookie` header is present.
|
|
40
54
|
|
|
41
|
-
```
|
|
55
|
+
```mjs
|
|
42
56
|
import { getCookies, Headers } from 'undici'
|
|
43
57
|
|
|
44
58
|
const headers = new Headers({
|
|
@@ -48,17 +62,48 @@ const headers = new Headers({
|
|
|
48
62
|
console.log(getCookies(headers)) // { get: 'cookies', and: 'attributes' }
|
|
49
63
|
```
|
|
50
64
|
|
|
51
|
-
|
|
65
|
+
## `deleteCookie(headers, name[, attributes])`
|
|
66
|
+
|
|
67
|
+
<!-- YAML
|
|
68
|
+
added: v5.15.0
|
|
69
|
+
-->
|
|
52
70
|
|
|
53
|
-
*
|
|
71
|
+
* `headers` {Headers} The `Headers` to append the expiring cookie to.
|
|
72
|
+
* `name` {string} The name of the cookie to delete.
|
|
73
|
+
* `attributes` {Object} (optional)
|
|
74
|
+
* `path` {string} The path the cookie was scoped to. **Default:** `null`.
|
|
75
|
+
* `domain` {string} The domain the cookie was scoped to. **Default:** `null`.
|
|
76
|
+
* Returns: {undefined}
|
|
54
77
|
|
|
55
|
-
|
|
78
|
+
Appends a `Set-Cookie` header to `headers` that expires the named cookie by
|
|
79
|
+
setting its expiry time to the Unix epoch, causing a client to delete it on
|
|
80
|
+
receipt. The optional `path` and `domain` must match those of the cookie being
|
|
81
|
+
removed.
|
|
82
|
+
|
|
83
|
+
```mjs
|
|
84
|
+
import { deleteCookie, Headers } from 'undici'
|
|
85
|
+
|
|
86
|
+
const headers = new Headers()
|
|
87
|
+
deleteCookie(headers, 'name')
|
|
88
|
+
|
|
89
|
+
console.log(headers.get('set-cookie')) // name=; Expires=Thu, 01 Jan 1970 00:00:00 GMT
|
|
90
|
+
```
|
|
56
91
|
|
|
57
92
|
## `getSetCookies(headers)`
|
|
58
93
|
|
|
59
|
-
|
|
94
|
+
<!-- YAML
|
|
95
|
+
added: v5.15.0
|
|
96
|
+
-->
|
|
60
97
|
|
|
61
|
-
|
|
98
|
+
* `headers` {Headers} The `Headers` to read the `Set-Cookie` headers from.
|
|
99
|
+
* Returns: {Cookie[]} The parsed cookies, or an empty array when none are
|
|
100
|
+
present.
|
|
101
|
+
|
|
102
|
+
Parses every `Set-Cookie` header of `headers` and returns the resulting
|
|
103
|
+
[`Cookie`][] objects. A header that fails to parse yields a `null` entry at its
|
|
104
|
+
position in the returned array.
|
|
105
|
+
|
|
106
|
+
```mjs
|
|
62
107
|
import { getSetCookies, Headers } from 'undici'
|
|
63
108
|
|
|
64
109
|
const headers = new Headers({ 'set-cookie': 'undici=getSetCookies; Secure' })
|
|
@@ -71,20 +116,23 @@ console.log(getSetCookies(headers))
|
|
|
71
116
|
// secure: true
|
|
72
117
|
// }
|
|
73
118
|
// ]
|
|
74
|
-
|
|
75
119
|
```
|
|
76
120
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
* **headers** `Headers`
|
|
121
|
+
## `setCookie(headers, cookie)`
|
|
80
122
|
|
|
81
|
-
|
|
123
|
+
<!-- YAML
|
|
124
|
+
added: v5.15.0
|
|
125
|
+
-->
|
|
82
126
|
|
|
83
|
-
|
|
127
|
+
* `headers` {Headers} The `Headers` to append the `Set-Cookie` header to.
|
|
128
|
+
* `cookie` {Cookie} The cookie to serialize. See [`Cookie`][].
|
|
129
|
+
* Returns: {undefined}
|
|
84
130
|
|
|
85
|
-
|
|
131
|
+
Serializes `cookie` and appends it to the `Set-Cookie` header of `headers`. When
|
|
132
|
+
the cookie name is empty, serialization yields no value and no header is
|
|
133
|
+
appended.
|
|
86
134
|
|
|
87
|
-
```
|
|
135
|
+
```mjs
|
|
88
136
|
import { setCookie, Headers } from 'undici'
|
|
89
137
|
|
|
90
138
|
const headers = new Headers()
|
|
@@ -93,9 +141,39 @@ setCookie(headers, { name: 'undici', value: 'setCookie' })
|
|
|
93
141
|
console.log(headers.get('Set-Cookie')) // undici=setCookie
|
|
94
142
|
```
|
|
95
143
|
|
|
96
|
-
|
|
144
|
+
## `parseCookie(cookie)`
|
|
145
|
+
|
|
146
|
+
<!-- YAML
|
|
147
|
+
added: v7.0.0
|
|
148
|
+
-->
|
|
149
|
+
|
|
150
|
+
* `cookie` {string} A `Set-Cookie` header value.
|
|
151
|
+
* Returns: {Cookie|null} The parsed cookie, or `null` if `cookie` is invalid.
|
|
97
152
|
|
|
98
|
-
|
|
99
|
-
|
|
153
|
+
Parses a single `Set-Cookie` header value into a [`Cookie`][] object. `null` is
|
|
154
|
+
returned when the value contains control characters or otherwise cannot be
|
|
155
|
+
parsed.
|
|
156
|
+
|
|
157
|
+
```mjs
|
|
158
|
+
import { parseCookie } from 'undici'
|
|
159
|
+
|
|
160
|
+
console.log(parseCookie('undici=getSetCookies; Secure; SameSite=Lax'))
|
|
161
|
+
// {
|
|
162
|
+
// name: 'undici',
|
|
163
|
+
// value: 'getSetCookies',
|
|
164
|
+
// secure: true,
|
|
165
|
+
// sameSite: 'Lax'
|
|
166
|
+
// }
|
|
167
|
+
```
|
|
100
168
|
|
|
101
|
-
|
|
169
|
+
The cookie value is returned exactly as it appears in the header; percent-encoded
|
|
170
|
+
sequences such as `%20` or `%0D%0A` are not decoded. The `sameSite` attribute is
|
|
171
|
+
only set when the value is a case-insensitive match for `Strict`, `Lax`, or
|
|
172
|
+
`None`.
|
|
173
|
+
|
|
174
|
+
[RFC 6265bis]: https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis
|
|
175
|
+
[`Cookie`]: #cookie
|
|
176
|
+
[`Headers`]: https://developer.mozilla.org/en-US/docs/Web/API/Headers
|
|
177
|
+
[`getSetCookies()`]: #getsetcookiesheaders
|
|
178
|
+
[`parseCookie()`]: #parsecookiecookie
|
|
179
|
+
[`setCookie()`]: #setcookieheaders-cookie
|