@skillcap/gdh 3.2.1 → 3.2.3
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/INSTALL-BUNDLE.json +1 -1
- package/RELEASE-SPAN-UPDATE-CONTRACTS.json +134 -0
- package/node_modules/@clack/core/CHANGELOG.md +8 -0
- package/node_modules/@clack/core/dist/index.d.mts +18 -4
- package/node_modules/@clack/core/dist/index.mjs +16 -10
- package/node_modules/@clack/core/dist/index.mjs.map +1 -1
- package/node_modules/@clack/core/package.json +5 -2
- package/node_modules/@clack/prompts/CHANGELOG.md +15 -0
- package/node_modules/@clack/prompts/README.md +107 -2
- package/node_modules/@clack/prompts/dist/index.d.mts +16 -11
- package/node_modules/@clack/prompts/dist/index.mjs +114 -107
- package/node_modules/@clack/prompts/dist/index.mjs.map +1 -1
- package/node_modules/@clack/prompts/package.json +7 -4
- package/node_modules/@gdh/adapters/dist/authoring-hook-render.d.ts.map +1 -1
- package/node_modules/@gdh/adapters/dist/authoring-hook-render.js +1 -1
- package/node_modules/@gdh/adapters/dist/authoring-hook-render.js.map +1 -1
- package/node_modules/@gdh/adapters/dist/claude-settings-patch.d.ts.map +1 -1
- package/node_modules/@gdh/adapters/dist/claude-settings-patch.js +4 -2
- package/node_modules/@gdh/adapters/dist/claude-settings-patch.js.map +1 -1
- package/node_modules/@gdh/adapters/dist/claude-statusline-render.d.ts.map +1 -1
- package/node_modules/@gdh/adapters/dist/claude-statusline-render.js +1 -1
- package/node_modules/@gdh/adapters/dist/claude-statusline-render.js.map +1 -1
- package/node_modules/@gdh/adapters/dist/claude-update-hook-render.d.ts.map +1 -1
- package/node_modules/@gdh/adapters/dist/claude-update-hook-render.js +1 -1
- package/node_modules/@gdh/adapters/dist/claude-update-hook-render.js.map +1 -1
- package/node_modules/@gdh/adapters/dist/claude-update-worker-render.d.ts.map +1 -1
- package/node_modules/@gdh/adapters/dist/claude-update-worker-render.js +1 -1
- package/node_modules/@gdh/adapters/dist/claude-update-worker-render.js.map +1 -1
- package/node_modules/@gdh/adapters/dist/deferred-actions-advisory.d.ts.map +1 -1
- package/node_modules/@gdh/adapters/dist/deferred-actions-advisory.js +1 -1
- package/node_modules/@gdh/adapters/dist/deferred-actions-advisory.js.map +1 -1
- package/node_modules/@gdh/adapters/dist/durable-backup.d.ts.map +1 -1
- package/node_modules/@gdh/adapters/dist/durable-backup.js +3 -5
- package/node_modules/@gdh/adapters/dist/durable-backup.js.map +1 -1
- package/node_modules/@gdh/adapters/dist/index.d.ts +11 -37
- package/node_modules/@gdh/adapters/dist/index.d.ts.map +1 -1
- package/node_modules/@gdh/adapters/dist/index.js +18 -90
- package/node_modules/@gdh/adapters/dist/index.js.map +1 -1
- package/node_modules/@gdh/adapters/dist/inventory-sweep.d.ts.map +1 -1
- package/node_modules/@gdh/adapters/dist/inventory-sweep.js +1 -3
- package/node_modules/@gdh/adapters/dist/inventory-sweep.js.map +1 -1
- package/node_modules/@gdh/adapters/dist/managed-surfaces.d.ts +32 -0
- package/node_modules/@gdh/adapters/dist/managed-surfaces.d.ts.map +1 -0
- package/node_modules/@gdh/adapters/dist/managed-surfaces.js +66 -0
- package/node_modules/@gdh/adapters/dist/managed-surfaces.js.map +1 -0
- package/node_modules/@gdh/adapters/dist/process-orchestration.d.ts +1 -1
- package/node_modules/@gdh/adapters/dist/process-orchestration.d.ts.map +1 -1
- package/node_modules/@gdh/adapters/dist/process-orchestration.js +3 -2
- package/node_modules/@gdh/adapters/dist/process-orchestration.js.map +1 -1
- package/node_modules/@gdh/adapters/dist/self-update-mechanics.d.ts.map +1 -1
- package/node_modules/@gdh/adapters/dist/self-update-mechanics.js +11 -23
- package/node_modules/@gdh/adapters/dist/self-update-mechanics.js.map +1 -1
- package/node_modules/@gdh/adapters/dist/skill-rendering.d.ts.map +1 -1
- package/node_modules/@gdh/adapters/dist/skill-rendering.js +2 -8
- package/node_modules/@gdh/adapters/dist/skill-rendering.js.map +1 -1
- package/node_modules/@gdh/adapters/dist/template-assets.js.map +1 -1
- package/node_modules/@gdh/adapters/package.json +7 -8
- package/node_modules/@gdh/authoring/dist/authoring-state-store.d.ts.map +1 -1
- package/node_modules/@gdh/authoring/dist/authoring-state-store.js.map +1 -1
- package/node_modules/@gdh/authoring/dist/cache.d.ts.map +1 -1
- package/node_modules/@gdh/authoring/dist/cache.js.map +1 -1
- package/node_modules/@gdh/authoring/dist/diagnostics-broker-contract.d.ts +2 -2
- package/node_modules/@gdh/authoring/dist/diagnostics-broker-contract.d.ts.map +1 -1
- package/node_modules/@gdh/authoring/dist/diagnostics-broker-contract.js +2 -2
- package/node_modules/@gdh/authoring/dist/diagnostics-broker-contract.js.map +1 -1
- package/node_modules/@gdh/authoring/dist/diagnostics-broker.d.ts.map +1 -1
- package/node_modules/@gdh/authoring/dist/diagnostics-broker.js +15 -12
- package/node_modules/@gdh/authoring/dist/diagnostics-broker.js.map +1 -1
- package/node_modules/@gdh/authoring/dist/lsp-broker-snapshot.d.ts.map +1 -1
- package/node_modules/@gdh/authoring/dist/lsp-broker-snapshot.js.map +1 -1
- package/node_modules/@gdh/authoring/dist/lsp-client.d.ts.map +1 -1
- package/node_modules/@gdh/authoring/dist/lsp-client.js.map +1 -1
- package/node_modules/@gdh/authoring/dist/lsp-constants.d.ts +17 -0
- package/node_modules/@gdh/authoring/dist/lsp-constants.d.ts.map +1 -0
- package/node_modules/@gdh/authoring/dist/lsp-constants.js +17 -0
- package/node_modules/@gdh/authoring/dist/lsp-constants.js.map +1 -0
- package/node_modules/@gdh/authoring/dist/lsp-warmup.d.ts.map +1 -1
- package/node_modules/@gdh/authoring/dist/lsp-warmup.js +2 -4
- package/node_modules/@gdh/authoring/dist/lsp-warmup.js.map +1 -1
- package/node_modules/@gdh/authoring/dist/lsp.d.ts.map +1 -1
- package/node_modules/@gdh/authoring/dist/lsp.js +30 -64
- package/node_modules/@gdh/authoring/dist/lsp.js.map +1 -1
- package/node_modules/@gdh/authoring/dist/prepare.d.ts.map +1 -1
- package/node_modules/@gdh/authoring/dist/prepare.js +1 -3
- package/node_modules/@gdh/authoring/dist/prepare.js.map +1 -1
- package/node_modules/@gdh/authoring/dist/project.d.ts.map +1 -1
- package/node_modules/@gdh/authoring/dist/project.js +4 -13
- package/node_modules/@gdh/authoring/dist/project.js.map +1 -1
- package/node_modules/@gdh/authoring/dist/report.d.ts.map +1 -1
- package/node_modules/@gdh/authoring/dist/report.js +2 -11
- package/node_modules/@gdh/authoring/dist/report.js.map +1 -1
- package/node_modules/@gdh/authoring/dist/scene-resource.d.ts.map +1 -1
- package/node_modules/@gdh/authoring/dist/scene-resource.js.map +1 -1
- package/node_modules/@gdh/authoring/dist/tcp-port.d.ts +2 -0
- package/node_modules/@gdh/authoring/dist/tcp-port.d.ts.map +1 -0
- package/node_modules/@gdh/authoring/dist/tcp-port.js +23 -0
- package/node_modules/@gdh/authoring/dist/tcp-port.js.map +1 -0
- package/node_modules/@gdh/authoring/dist/warmup.d.ts.map +1 -1
- package/node_modules/@gdh/authoring/dist/warmup.js.map +1 -1
- package/node_modules/@gdh/authoring/package.json +2 -2
- package/node_modules/@gdh/cli/dist/args.d.ts +44 -0
- package/node_modules/@gdh/cli/dist/args.d.ts.map +1 -0
- package/node_modules/@gdh/cli/dist/args.js +124 -0
- package/node_modules/@gdh/cli/dist/args.js.map +1 -0
- package/node_modules/@gdh/cli/dist/bridge-session.d.ts +1 -1
- package/node_modules/@gdh/cli/dist/bridge-session.d.ts.map +1 -1
- package/node_modules/@gdh/cli/dist/bridge-session.js +9 -8
- package/node_modules/@gdh/cli/dist/bridge-session.js.map +1 -1
- package/node_modules/@gdh/cli/dist/index.d.ts +4 -52
- package/node_modules/@gdh/cli/dist/index.d.ts.map +1 -1
- package/node_modules/@gdh/cli/dist/index.js +8 -197
- package/node_modules/@gdh/cli/dist/index.js.map +1 -1
- package/node_modules/@gdh/cli/dist/io.d.ts +10 -0
- package/node_modules/@gdh/cli/dist/io.d.ts.map +1 -0
- package/node_modules/@gdh/cli/dist/io.js +26 -0
- package/node_modules/@gdh/cli/dist/io.js.map +1 -0
- package/node_modules/@gdh/cli/dist/mcp-cleanup.d.ts +3 -0
- package/node_modules/@gdh/cli/dist/mcp-cleanup.d.ts.map +1 -1
- package/node_modules/@gdh/cli/dist/mcp-cleanup.js +47 -0
- package/node_modules/@gdh/cli/dist/mcp-cleanup.js.map +1 -1
- package/node_modules/@gdh/cli/dist/migrate.d.ts +1 -1
- package/node_modules/@gdh/cli/dist/migrate.d.ts.map +1 -1
- package/node_modules/@gdh/cli/dist/migrate.js +23 -30
- package/node_modules/@gdh/cli/dist/migrate.js.map +1 -1
- package/node_modules/@gdh/cli/dist/self-update.d.ts.map +1 -1
- package/node_modules/@gdh/cli/dist/self-update.js +13 -20
- package/node_modules/@gdh/cli/dist/self-update.js.map +1 -1
- package/node_modules/@gdh/cli/dist/setup.d.ts.map +1 -1
- package/node_modules/@gdh/cli/dist/setup.js.map +1 -1
- package/node_modules/@gdh/cli/dist/status-command.d.ts +3 -0
- package/node_modules/@gdh/cli/dist/status-command.d.ts.map +1 -0
- package/node_modules/@gdh/cli/dist/status-command.js +44 -0
- package/node_modules/@gdh/cli/dist/status-command.js.map +1 -0
- package/node_modules/@gdh/cli/dist/update-banner.d.ts.map +1 -1
- package/node_modules/@gdh/cli/dist/update-banner.js +1 -1
- package/node_modules/@gdh/cli/dist/update-banner.js.map +1 -1
- package/node_modules/@gdh/cli/package.json +11 -11
- package/node_modules/@gdh/core/dist/dev-mode.d.ts.map +1 -1
- package/node_modules/@gdh/core/dist/dev-mode.js.map +1 -1
- package/node_modules/@gdh/core/dist/editor-operation-runner.d.ts +3 -0
- package/node_modules/@gdh/core/dist/editor-operation-runner.d.ts.map +1 -0
- package/node_modules/@gdh/core/dist/editor-operation-runner.js +682 -0
- package/node_modules/@gdh/core/dist/editor-operation-runner.js.map +1 -0
- package/node_modules/@gdh/core/dist/git-root.d.ts.map +1 -1
- package/node_modules/@gdh/core/dist/git-root.js +4 -1
- package/node_modules/@gdh/core/dist/git-root.js.map +1 -1
- package/node_modules/@gdh/core/dist/godot-docs-version.d.ts.map +1 -1
- package/node_modules/@gdh/core/dist/godot-docs-version.js.map +1 -1
- package/node_modules/@gdh/core/dist/godot-stderr-fatality.d.ts.map +1 -1
- package/node_modules/@gdh/core/dist/godot-stderr-fatality.js +1 -2
- package/node_modules/@gdh/core/dist/godot-stderr-fatality.js.map +1 -1
- package/node_modules/@gdh/core/dist/index.d.ts +10 -5
- package/node_modules/@gdh/core/dist/index.d.ts.map +1 -1
- package/node_modules/@gdh/core/dist/index.js +15 -5
- package/node_modules/@gdh/core/dist/index.js.map +1 -1
- package/node_modules/@gdh/core/dist/managed-gitignore.d.ts.map +1 -1
- package/node_modules/@gdh/core/dist/managed-gitignore.js +4 -14
- package/node_modules/@gdh/core/dist/managed-gitignore.js.map +1 -1
- package/node_modules/@gdh/core/dist/migrations/entries/s2c2_to_s2c3_rules_schema_v2_to_v3.d.ts.map +1 -1
- package/node_modules/@gdh/core/dist/migrations/entries/s2c2_to_s2c3_rules_schema_v2_to_v3.js +2 -2
- package/node_modules/@gdh/core/dist/migrations/entries/s2c2_to_s2c3_rules_schema_v2_to_v3.js.map +1 -1
- package/node_modules/@gdh/core/dist/migrations/entries/s3c21_to_s3c22_canonical_hook_paths.d.ts.map +1 -1
- package/node_modules/@gdh/core/dist/migrations/entries/s3c21_to_s3c22_canonical_hook_paths.js +6 -14
- package/node_modules/@gdh/core/dist/migrations/entries/s3c21_to_s3c22_canonical_hook_paths.js.map +1 -1
- package/node_modules/@gdh/core/dist/migrations/entries/s3c8_to_s3c9_register_runtime_bridge_autoload.d.ts.map +1 -1
- package/node_modules/@gdh/core/dist/migrations/entries/s3c8_to_s3c9_register_runtime_bridge_autoload.js +7 -23
- package/node_modules/@gdh/core/dist/migrations/entries/s3c8_to_s3c9_register_runtime_bridge_autoload.js.map +1 -1
- package/node_modules/@gdh/core/dist/migrations/envelopes/envelope-output-validator.d.ts.map +1 -1
- package/node_modules/@gdh/core/dist/migrations/envelopes/envelope-output-validator.js.map +1 -1
- package/node_modules/@gdh/core/dist/migrations/envelopes/index.d.ts.map +1 -1
- package/node_modules/@gdh/core/dist/migrations/envelopes/index.js +1 -2
- package/node_modules/@gdh/core/dist/migrations/envelopes/index.js.map +1 -1
- package/node_modules/@gdh/core/dist/migrations/envelopes/types.d.ts.map +1 -1
- package/node_modules/@gdh/core/dist/migrations/golden-harness.d.ts.map +1 -1
- package/node_modules/@gdh/core/dist/migrations/golden-harness.js.map +1 -1
- package/node_modules/@gdh/core/dist/migrations/managed-surface-classes.d.ts.map +1 -1
- package/node_modules/@gdh/core/dist/migrations/managed-surface-classes.js.map +1 -1
- package/node_modules/@gdh/core/dist/migrations/managed-target-surface-inventory.d.ts.map +1 -1
- package/node_modules/@gdh/core/dist/migrations/managed-target-surface-inventory.js.map +1 -1
- package/node_modules/@gdh/core/dist/migrations/probes.d.ts.map +1 -1
- package/node_modules/@gdh/core/dist/migrations/probes.js.map +1 -1
- package/node_modules/@gdh/core/dist/migrations/registry.d.ts +1 -1
- package/node_modules/@gdh/core/dist/migrations/registry.d.ts.map +1 -1
- package/node_modules/@gdh/core/dist/migrations/registry.js +3 -6
- package/node_modules/@gdh/core/dist/migrations/registry.js.map +1 -1
- package/node_modules/@gdh/core/dist/official-docs.d.ts.map +1 -1
- package/node_modules/@gdh/core/dist/process-termination.d.ts +29 -0
- package/node_modules/@gdh/core/dist/process-termination.d.ts.map +1 -0
- package/node_modules/@gdh/core/dist/process-termination.js +125 -0
- package/node_modules/@gdh/core/dist/process-termination.js.map +1 -0
- package/node_modules/@gdh/core/dist/release-span-preview.d.ts.map +1 -1
- package/node_modules/@gdh/core/dist/release-span-preview.js +1 -1
- package/node_modules/@gdh/core/dist/release-span-preview.js.map +1 -1
- package/node_modules/@gdh/core/dist/release-span-update-contract.d.ts.map +1 -1
- package/node_modules/@gdh/core/dist/release-span-update-contract.js +5 -10
- package/node_modules/@gdh/core/dist/release-span-update-contract.js.map +1 -1
- package/node_modules/@gdh/core/dist/state/codex-retrust-reminder.d.ts.map +1 -1
- package/node_modules/@gdh/core/dist/state/codex-retrust-reminder.js.map +1 -1
- package/node_modules/@gdh/core/dist/state/migration-state.d.ts.map +1 -1
- package/node_modules/@gdh/core/dist/state/migration-state.js +3 -8
- package/node_modules/@gdh/core/dist/state/migration-state.js.map +1 -1
- package/node_modules/@gdh/core/dist/state/migration-trace.d.ts.map +1 -1
- package/node_modules/@gdh/core/dist/state/migration-trace.js +3 -8
- package/node_modules/@gdh/core/dist/state/migration-trace.js.map +1 -1
- package/node_modules/@gdh/core/dist/state/render-inventory.d.ts.map +1 -1
- package/node_modules/@gdh/core/dist/state/render-inventory.js.map +1 -1
- package/node_modules/@gdh/core/dist/update-cache.d.ts.map +1 -1
- package/node_modules/@gdh/core/dist/update-cache.js.map +1 -1
- package/node_modules/@gdh/core/dist/update-probe.d.ts.map +1 -1
- package/node_modules/@gdh/core/dist/update-probe.js +1 -3
- package/node_modules/@gdh/core/dist/update-probe.js.map +1 -1
- package/node_modules/@gdh/core/package.json +1 -1
- package/node_modules/@gdh/docs/dist/agent-contract.d.ts.map +1 -1
- package/node_modules/@gdh/docs/dist/agent-contract.js +2 -4
- package/node_modules/@gdh/docs/dist/agent-contract.js.map +1 -1
- package/node_modules/@gdh/docs/dist/files.d.ts +1 -1
- package/node_modules/@gdh/docs/dist/files.d.ts.map +1 -1
- package/node_modules/@gdh/docs/dist/guidance.js +1 -1
- package/node_modules/@gdh/docs/dist/guidance.js.map +1 -1
- package/node_modules/@gdh/docs/dist/index.d.ts +4 -4
- package/node_modules/@gdh/docs/dist/index.d.ts.map +1 -1
- package/node_modules/@gdh/docs/dist/index.js +3 -3
- package/node_modules/@gdh/docs/dist/index.js.map +1 -1
- package/node_modules/@gdh/docs/dist/official-docs.d.ts.map +1 -1
- package/node_modules/@gdh/docs/dist/official-docs.js +16 -5
- package/node_modules/@gdh/docs/dist/official-docs.js.map +1 -1
- package/node_modules/@gdh/docs/dist/query.d.ts.map +1 -1
- package/node_modules/@gdh/docs/dist/query.js +8 -3
- package/node_modules/@gdh/docs/dist/query.js.map +1 -1
- package/node_modules/@gdh/docs/dist/recovery-hints.d.ts.map +1 -1
- package/node_modules/@gdh/docs/dist/recovery-hints.js +0 -1
- package/node_modules/@gdh/docs/dist/recovery-hints.js.map +1 -1
- package/node_modules/@gdh/docs/dist/template-assets.js.map +1 -1
- package/node_modules/@gdh/docs/package.json +2 -2
- package/node_modules/@gdh/editor/dist/index.d.ts +1 -3
- package/node_modules/@gdh/editor/dist/index.d.ts.map +1 -1
- package/node_modules/@gdh/editor/dist/index.js +46 -683
- package/node_modules/@gdh/editor/dist/index.js.map +1 -1
- package/node_modules/@gdh/editor/package.json +2 -2
- package/node_modules/@gdh/mcp/dist/bridge-tools.d.ts +8 -1
- package/node_modules/@gdh/mcp/dist/bridge-tools.d.ts.map +1 -1
- package/node_modules/@gdh/mcp/dist/bridge-tools.js +81 -2
- package/node_modules/@gdh/mcp/dist/bridge-tools.js.map +1 -1
- package/node_modules/@gdh/mcp/dist/index.d.ts.map +1 -1
- package/node_modules/@gdh/mcp/dist/index.js +10 -77
- package/node_modules/@gdh/mcp/dist/index.js.map +1 -1
- package/node_modules/@gdh/mcp/package.json +8 -10
- package/node_modules/@gdh/observability/dist/guidance-audit.d.ts.map +1 -1
- package/node_modules/@gdh/observability/dist/guidance-audit.js +11 -21
- package/node_modules/@gdh/observability/dist/guidance-audit.js.map +1 -1
- package/node_modules/@gdh/observability/dist/index.d.ts +2 -2
- package/node_modules/@gdh/observability/dist/index.d.ts.map +1 -1
- package/node_modules/@gdh/observability/dist/index.js +1 -1
- package/node_modules/@gdh/observability/dist/index.js.map +1 -1
- package/node_modules/@gdh/observability/dist/runtime-bundles.d.ts.map +1 -1
- package/node_modules/@gdh/observability/dist/runtime-bundles.js +3 -10
- package/node_modules/@gdh/observability/dist/runtime-bundles.js.map +1 -1
- package/node_modules/@gdh/observability/dist/runtime-corpus.d.ts.map +1 -1
- package/node_modules/@gdh/observability/dist/runtime-corpus.js +1 -1
- package/node_modules/@gdh/observability/dist/runtime-corpus.js.map +1 -1
- package/node_modules/@gdh/observability/package.json +3 -2
- package/node_modules/@gdh/runtime/dist/bridge-broker-client.d.ts +2 -1
- package/node_modules/@gdh/runtime/dist/bridge-broker-client.d.ts.map +1 -1
- package/node_modules/@gdh/runtime/dist/bridge-broker-client.js +8 -1
- package/node_modules/@gdh/runtime/dist/bridge-broker-client.js.map +1 -1
- package/node_modules/@gdh/runtime/dist/bridge-broker.d.ts +2 -1
- package/node_modules/@gdh/runtime/dist/bridge-broker.d.ts.map +1 -1
- package/node_modules/@gdh/runtime/dist/bridge-broker.js +71 -21
- package/node_modules/@gdh/runtime/dist/bridge-broker.js.map +1 -1
- package/node_modules/@gdh/runtime/dist/bridge-surface.d.ts +1 -1
- package/node_modules/@gdh/runtime/dist/bridge-surface.d.ts.map +1 -1
- package/node_modules/@gdh/runtime/dist/bridge-surface.js +2 -2
- package/node_modules/@gdh/runtime/dist/bridge-surface.js.map +1 -1
- package/node_modules/@gdh/runtime/dist/docker-provider.d.ts +1 -1
- package/node_modules/@gdh/runtime/dist/docker-provider.d.ts.map +1 -1
- package/node_modules/@gdh/runtime/dist/docker-provider.js +5 -16
- package/node_modules/@gdh/runtime/dist/docker-provider.js.map +1 -1
- package/node_modules/@gdh/runtime/dist/index.d.ts +1 -1
- package/node_modules/@gdh/runtime/dist/index.d.ts.map +1 -1
- package/node_modules/@gdh/runtime/dist/index.js +65 -18
- package/node_modules/@gdh/runtime/dist/index.js.map +1 -1
- package/node_modules/@gdh/runtime/dist/knowledge-surface.d.ts.map +1 -1
- package/node_modules/@gdh/runtime/dist/knowledge-surface.js +21 -10
- package/node_modules/@gdh/runtime/dist/knowledge-surface.js.map +1 -1
- package/node_modules/@gdh/runtime/package.json +2 -3
- package/node_modules/@gdh/scan/dist/detect-existing-onboarding.d.ts.map +1 -1
- package/node_modules/@gdh/scan/dist/detect-existing-onboarding.js +1 -5
- package/node_modules/@gdh/scan/dist/detect-existing-onboarding.js.map +1 -1
- package/node_modules/@gdh/scan/dist/index.d.ts +3 -3
- package/node_modules/@gdh/scan/dist/index.d.ts.map +1 -1
- package/node_modules/@gdh/scan/dist/index.js +3 -3
- package/node_modules/@gdh/scan/dist/index.js.map +1 -1
- package/node_modules/@gdh/scan/dist/inventory-cache.js +1 -1
- package/node_modules/@gdh/scan/dist/inventory-cache.js.map +1 -1
- package/node_modules/@gdh/scan/dist/onboard.d.ts +1 -2
- package/node_modules/@gdh/scan/dist/onboard.d.ts.map +1 -1
- package/node_modules/@gdh/scan/dist/onboard.js +4 -5
- package/node_modules/@gdh/scan/dist/onboard.js.map +1 -1
- package/node_modules/@gdh/scan/dist/scan.d.ts.map +1 -1
- package/node_modules/@gdh/scan/dist/scan.js +4 -2
- package/node_modules/@gdh/scan/dist/scan.js.map +1 -1
- package/node_modules/@gdh/scan/package.json +3 -3
- package/node_modules/@gdh/verify/dist/corpus.d.ts.map +1 -1
- package/node_modules/@gdh/verify/dist/corpus.js +7 -6
- package/node_modules/@gdh/verify/dist/corpus.js.map +1 -1
- package/node_modules/@gdh/verify/dist/index.d.ts.map +1 -1
- package/node_modules/@gdh/verify/dist/index.js +0 -1
- package/node_modules/@gdh/verify/dist/index.js.map +1 -1
- package/node_modules/@gdh/verify/dist/readiness.d.ts.map +1 -1
- package/node_modules/@gdh/verify/dist/readiness.js.map +1 -1
- package/node_modules/@gdh/verify/dist/scenarios.d.ts +1 -1
- package/node_modules/@gdh/verify/dist/scenarios.d.ts.map +1 -1
- package/node_modules/@gdh/verify/dist/scenarios.js +14 -11
- package/node_modules/@gdh/verify/dist/scenarios.js.map +1 -1
- package/node_modules/@gdh/verify/package.json +6 -7
- package/node_modules/@hono/node-server/dist/index.js +22 -0
- package/node_modules/@hono/node-server/dist/index.mjs +22 -0
- package/node_modules/@hono/node-server/dist/listener.js +22 -0
- package/node_modules/@hono/node-server/dist/listener.mjs +22 -0
- package/node_modules/@hono/node-server/dist/request.js +11 -0
- package/node_modules/@hono/node-server/dist/request.mjs +11 -0
- package/node_modules/@hono/node-server/dist/response.js +11 -0
- package/node_modules/@hono/node-server/dist/response.mjs +11 -0
- package/node_modules/@hono/node-server/dist/server.js +22 -0
- package/node_modules/@hono/node-server/dist/server.mjs +22 -0
- package/node_modules/@hono/node-server/dist/utils.d.mts +2 -2
- package/node_modules/@hono/node-server/dist/utils.d.ts +2 -2
- package/node_modules/@hono/node-server/dist/vercel.js +22 -0
- package/node_modules/@hono/node-server/dist/vercel.mjs +22 -0
- package/node_modules/@hono/node-server/package.json +1 -1
- package/node_modules/ajv/README.md +1 -1
- package/node_modules/ajv/dist/core.js +1 -1
- package/node_modules/ajv/dist/core.js.map +1 -1
- package/node_modules/ajv/lib/core.ts +1 -1
- package/node_modules/ajv/package.json +2 -3
- package/node_modules/eventsource-parser/LICENSE +1 -1
- package/node_modules/eventsource-parser/dist/index.cjs +104 -44
- package/node_modules/eventsource-parser/dist/index.cjs.map +1 -1
- package/node_modules/eventsource-parser/dist/index.d.cts +23 -21
- package/node_modules/eventsource-parser/dist/index.d.ts +23 -21
- package/node_modules/eventsource-parser/dist/index.js +104 -44
- package/node_modules/eventsource-parser/dist/index.js.map +1 -1
- package/node_modules/eventsource-parser/dist/stream.d.cts +22 -19
- package/node_modules/eventsource-parser/dist/stream.d.ts +22 -19
- package/node_modules/eventsource-parser/package.json +54 -77
- package/node_modules/eventsource-parser/src/parse.ts +270 -107
- package/node_modules/express-rate-limit/dist/index.cjs +51 -10
- package/node_modules/express-rate-limit/dist/index.d.cts +31 -1
- package/node_modules/express-rate-limit/dist/index.d.mts +31 -1
- package/node_modules/express-rate-limit/dist/index.d.ts +31 -1
- package/node_modules/express-rate-limit/dist/index.mjs +51 -10
- package/node_modules/express-rate-limit/package.json +3 -2
- package/node_modules/express-rate-limit/readme.md +3 -0
- package/node_modules/fast-string-truncated-width/dist/index.js +36 -96
- package/node_modules/fast-string-truncated-width/dist/types.d.ts +0 -3
- package/node_modules/fast-string-truncated-width/dist/utils.d.ts +3 -3
- package/node_modules/fast-string-truncated-width/dist/utils.js +14 -9
- package/node_modules/fast-string-truncated-width/package.json +1 -1
- package/node_modules/fast-string-truncated-width/readme.md +2 -3
- package/node_modules/fast-string-width/package.json +2 -2
- package/node_modules/fast-string-width/readme.md +0 -3
- package/node_modules/fast-uri/.github/workflows/ci.yml +12 -7
- package/node_modules/fast-uri/.github/workflows/lock-threads.yml +19 -0
- package/node_modules/fast-uri/.github/workflows/package-manager-ci.yml +1 -1
- package/node_modules/fast-uri/LICENSE +1 -3
- package/node_modules/fast-uri/README.md +13 -4
- package/node_modules/fast-uri/index.js +90 -24
- package/node_modules/fast-uri/lib/utils.js +129 -22
- package/node_modules/fast-uri/package.json +3 -4
- package/node_modules/fast-wrap-ansi/lib/main.js +4 -1
- package/node_modules/fast-wrap-ansi/lib/main.js.map +1 -1
- package/node_modules/fast-wrap-ansi/package.json +2 -2
- package/node_modules/get-intrinsic/CHANGELOG.md +0 -7
- package/node_modules/get-intrinsic/index.js +13 -8
- package/node_modules/get-intrinsic/package.json +4 -7
- package/node_modules/hasown/CHANGELOG.md +11 -0
- package/node_modules/hasown/eslint.config.mjs +6 -0
- package/node_modules/hasown/index.d.ts +1 -0
- package/node_modules/hasown/package.json +14 -14
- package/node_modules/hono/dist/adapter/aws-lambda/handler.js +9 -2
- package/node_modules/hono/dist/cjs/adapter/aws-lambda/handler.js +9 -2
- package/node_modules/hono/dist/cjs/helper/ssg/ssg.js +2 -0
- package/node_modules/hono/dist/cjs/jsx/base.js +7 -1
- package/node_modules/hono/dist/cjs/jsx/dom/render.js +22 -9
- package/node_modules/hono/dist/cjs/jsx/jsx-runtime.js +3 -0
- package/node_modules/hono/dist/cjs/jsx/utils.js +155 -5
- package/node_modules/hono/dist/cjs/middleware/body-limit/index.js +21 -30
- package/node_modules/hono/dist/cjs/middleware/cache/index.js +11 -3
- package/node_modules/hono/dist/cjs/middleware/cors/index.js +2 -5
- package/node_modules/hono/dist/cjs/middleware/method-override/index.js +1 -1
- package/node_modules/hono/dist/cjs/middleware/trailing-slash/index.js +2 -2
- package/node_modules/hono/dist/cjs/utils/jwt/jws.js +1 -1
- package/node_modules/hono/dist/cjs/utils/jwt/jwt.js +12 -6
- package/node_modules/hono/dist/helper/ssg/ssg.js +2 -0
- package/node_modules/hono/dist/jsx/base.js +13 -2
- package/node_modules/hono/dist/jsx/dom/render.js +22 -9
- package/node_modules/hono/dist/jsx/jsx-runtime.js +4 -1
- package/node_modules/hono/dist/jsx/utils.js +153 -5
- package/node_modules/hono/dist/middleware/body-limit/index.js +21 -30
- package/node_modules/hono/dist/middleware/cache/index.js +11 -3
- package/node_modules/hono/dist/middleware/cors/index.js +2 -5
- package/node_modules/hono/dist/middleware/method-override/index.js +1 -1
- package/node_modules/hono/dist/middleware/trailing-slash/index.js +2 -2
- package/node_modules/hono/dist/tsconfig.build.tsbuildinfo +1 -1
- package/node_modules/hono/dist/types/jsx/utils.d.ts +3 -1
- package/node_modules/hono/dist/types/middleware/cache/index.d.ts +2 -0
- package/node_modules/hono/dist/types/middleware/cors/index.d.ts +1 -1
- package/node_modules/hono/dist/types/middleware/trailing-slash/index.d.ts +16 -0
- package/node_modules/hono/dist/types/types.d.ts +116 -116
- package/node_modules/hono/dist/utils/jwt/jws.js +1 -1
- package/node_modules/hono/dist/utils/jwt/jwt.js +12 -6
- package/node_modules/hono/package.json +1 -1
- package/node_modules/ip-address/README.md +249 -76
- package/node_modules/ip-address/dist/address-error.d.ts +0 -1
- package/node_modules/ip-address/dist/address-error.js.map +1 -1
- package/node_modules/ip-address/dist/common.d.ts +6 -1
- package/node_modules/ip-address/dist/common.js +21 -0
- package/node_modules/ip-address/dist/common.js.map +1 -1
- package/node_modules/ip-address/dist/ip-address.d.ts +0 -1
- package/node_modules/ip-address/dist/ip-address.js.map +1 -1
- package/node_modules/ip-address/dist/ipv4.d.ts +115 -57
- package/node_modules/ip-address/dist/ipv4.js +193 -68
- package/node_modules/ip-address/dist/ipv4.js.map +1 -1
- package/node_modules/ip-address/dist/ipv6.d.ts +172 -111
- package/node_modules/ip-address/dist/ipv6.js +345 -131
- package/node_modules/ip-address/dist/ipv6.js.map +1 -1
- package/node_modules/ip-address/dist/v4/constants.d.ts +0 -1
- package/node_modules/ip-address/dist/v4/constants.js.map +1 -1
- package/node_modules/ip-address/dist/v6/constants.d.ts +0 -1
- package/node_modules/ip-address/dist/v6/constants.js +5 -0
- package/node_modules/ip-address/dist/v6/constants.js.map +1 -1
- package/node_modules/ip-address/dist/v6/helpers.d.ts +1 -1
- package/node_modules/ip-address/dist/v6/helpers.js +12 -3
- package/node_modules/ip-address/dist/v6/helpers.js.map +1 -1
- package/node_modules/ip-address/dist/v6/regular-expressions.d.ts +0 -1
- package/node_modules/ip-address/dist/v6/regular-expressions.js.map +1 -1
- package/node_modules/ip-address/package.json +45 -35
- package/node_modules/jose/dist/webapi/jwks/remote.js +1 -1
- package/node_modules/jose/dist/webapi/lib/pbes2kw.js +3 -0
- package/node_modules/jose/package.json +1 -1
- package/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js +5 -3
- package/node_modules/yaml/browser/dist/nodes/Alias.js +2 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js +11 -8
- package/node_modules/yaml/browser/dist/stringify/stringifyNumber.js +2 -1
- package/node_modules/yaml/dist/compose/resolve-flow-scalar.js +5 -3
- package/node_modules/yaml/dist/nodes/Alias.js +2 -0
- package/node_modules/yaml/dist/nodes/Scalar.d.ts +5 -1
- package/node_modules/yaml/dist/schema/yaml-1.1/merge.js +10 -7
- package/node_modules/yaml/dist/stringify/stringifyNumber.js +2 -1
- package/node_modules/yaml/package.json +1 -1
- package/node_modules/zod/README.md +1 -18
- package/node_modules/zod/locales/package.json +2 -1
- package/node_modules/zod/mini/package.json +2 -1
- package/node_modules/zod/package.json +1 -1
- package/node_modules/zod/src/v4/classic/errors.ts +2 -2
- package/node_modules/zod/src/v4/classic/external.ts +1 -0
- package/node_modules/zod/src/v4/classic/from-json-schema.ts +39 -23
- package/node_modules/zod/src/v4/classic/parse.ts +6 -6
- package/node_modules/zod/src/v4/classic/schemas.ts +414 -151
- package/node_modules/zod/src/v4/core/api.ts +31 -6
- package/node_modules/zod/src/v4/core/checks.ts +1 -1
- package/node_modules/zod/src/v4/core/core.ts +17 -2
- package/node_modules/zod/src/v4/core/errors.ts +31 -24
- package/node_modules/zod/src/v4/core/json-schema-processors.ts +17 -18
- package/node_modules/zod/src/v4/core/parse.ts +7 -7
- package/node_modules/zod/src/v4/core/regexes.ts +8 -1
- package/node_modules/zod/src/v4/core/schemas.ts +263 -71
- package/node_modules/zod/src/v4/core/to-json-schema.ts +10 -1
- package/node_modules/zod/src/v4/core/util.ts +52 -35
- package/node_modules/zod/src/v4/core/versions.ts +2 -2
- package/node_modules/zod/src/v4/locales/el.ts +121 -0
- package/node_modules/zod/src/v4/locales/en.ts +4 -0
- package/node_modules/zod/src/v4/locales/fr.ts +24 -8
- package/node_modules/zod/src/v4/locales/hr.ts +131 -0
- package/node_modules/zod/src/v4/locales/index.ts +3 -0
- package/node_modules/zod/src/v4/locales/it.ts +1 -1
- package/node_modules/zod/src/v4/locales/ka.ts +8 -8
- package/node_modules/zod/src/v4/locales/ro.ts +129 -0
- package/node_modules/zod/src/v4/locales/uz.ts +1 -0
- package/node_modules/zod/src/v4/mini/external.ts +1 -0
- package/node_modules/zod/src/v4/mini/schemas.ts +56 -25
- package/node_modules/zod/v3/package.json +2 -1
- package/node_modules/zod/v4/classic/errors.js +2 -2
- package/node_modules/zod/v4/classic/external.d.cts +1 -0
- package/node_modules/zod/v4/classic/external.d.ts +1 -0
- package/node_modules/zod/v4/classic/from-json-schema.cjs +31 -16
- package/node_modules/zod/v4/classic/from-json-schema.js +31 -16
- package/node_modules/zod/v4/classic/package.json +2 -1
- package/node_modules/zod/v4/classic/schemas.cjs +358 -119
- package/node_modules/zod/v4/classic/schemas.d.cts +42 -14
- package/node_modules/zod/v4/classic/schemas.d.ts +42 -14
- package/node_modules/zod/v4/classic/schemas.js +356 -118
- package/node_modules/zod/v4/core/api.cjs +7 -2
- package/node_modules/zod/v4/core/api.d.cts +26 -5
- package/node_modules/zod/v4/core/api.d.ts +26 -5
- package/node_modules/zod/v4/core/api.js +7 -2
- package/node_modules/zod/v4/core/checks.d.cts +1 -1
- package/node_modules/zod/v4/core/checks.d.ts +1 -1
- package/node_modules/zod/v4/core/core.cjs +3 -1
- package/node_modules/zod/v4/core/core.js +4 -2
- package/node_modules/zod/v4/core/errors.cjs +26 -23
- package/node_modules/zod/v4/core/errors.d.cts +1 -0
- package/node_modules/zod/v4/core/errors.d.ts +1 -0
- package/node_modules/zod/v4/core/errors.js +26 -23
- package/node_modules/zod/v4/core/json-schema-processors.cjs +16 -20
- package/node_modules/zod/v4/core/json-schema-processors.js +16 -20
- package/node_modules/zod/v4/core/package.json +2 -1
- package/node_modules/zod/v4/core/parse.cjs +7 -7
- package/node_modules/zod/v4/core/parse.js +7 -7
- package/node_modules/zod/v4/core/regexes.cjs +9 -3
- package/node_modules/zod/v4/core/regexes.d.cts +6 -0
- package/node_modules/zod/v4/core/regexes.d.ts +6 -0
- package/node_modules/zod/v4/core/regexes.js +7 -1
- package/node_modules/zod/v4/core/schemas.cjs +211 -65
- package/node_modules/zod/v4/core/schemas.d.cts +39 -1
- package/node_modules/zod/v4/core/schemas.d.ts +39 -1
- package/node_modules/zod/v4/core/schemas.js +210 -64
- package/node_modules/zod/v4/core/to-json-schema.cjs +12 -1
- package/node_modules/zod/v4/core/to-json-schema.js +12 -1
- package/node_modules/zod/v4/core/util.cjs +54 -30
- package/node_modules/zod/v4/core/util.d.cts +1 -0
- package/node_modules/zod/v4/core/util.d.ts +1 -0
- package/node_modules/zod/v4/core/util.js +55 -32
- package/node_modules/zod/v4/core/versions.cjs +2 -2
- package/node_modules/zod/v4/core/versions.d.cts +1 -1
- package/node_modules/zod/v4/core/versions.d.ts +1 -1
- package/node_modules/zod/v4/core/versions.js +2 -2
- package/node_modules/zod/v4/locales/el.cjs +136 -0
- package/node_modules/zod/v4/locales/el.d.cts +5 -0
- package/node_modules/zod/v4/locales/el.d.ts +4 -0
- package/node_modules/zod/v4/locales/el.js +109 -0
- package/node_modules/zod/v4/locales/en.cjs +4 -0
- package/node_modules/zod/v4/locales/en.js +4 -0
- package/node_modules/zod/v4/locales/fr.cjs +24 -7
- package/node_modules/zod/v4/locales/fr.js +24 -7
- package/node_modules/zod/v4/locales/hr.cjs +149 -0
- package/node_modules/zod/v4/locales/hr.d.cts +5 -0
- package/node_modules/zod/v4/locales/hr.d.ts +4 -0
- package/node_modules/zod/v4/locales/hr.js +122 -0
- package/node_modules/zod/v4/locales/index.cjs +8 -1
- package/node_modules/zod/v4/locales/index.d.cts +3 -0
- package/node_modules/zod/v4/locales/index.d.ts +3 -0
- package/node_modules/zod/v4/locales/index.js +3 -0
- package/node_modules/zod/v4/locales/it.cjs +1 -1
- package/node_modules/zod/v4/locales/it.js +1 -1
- package/node_modules/zod/v4/locales/ka.cjs +8 -8
- package/node_modules/zod/v4/locales/ka.js +8 -8
- package/node_modules/zod/v4/locales/package.json +2 -1
- package/node_modules/zod/v4/locales/ro.cjs +146 -0
- package/node_modules/zod/v4/locales/ro.d.cts +5 -0
- package/node_modules/zod/v4/locales/ro.d.ts +4 -0
- package/node_modules/zod/v4/locales/ro.js +119 -0
- package/node_modules/zod/v4/locales/uz.cjs +1 -0
- package/node_modules/zod/v4/locales/uz.js +1 -0
- package/node_modules/zod/v4/mini/external.d.cts +1 -0
- package/node_modules/zod/v4/mini/external.d.ts +1 -0
- package/node_modules/zod/v4/mini/package.json +2 -1
- package/node_modules/zod/v4/mini/schemas.cjs +41 -4
- package/node_modules/zod/v4/mini/schemas.d.cts +28 -10
- package/node_modules/zod/v4/mini/schemas.d.ts +28 -10
- package/node_modules/zod/v4/mini/schemas.js +40 -4
- package/node_modules/zod/v4/package.json +2 -1
- package/node_modules/zod/v4-mini/package.json +2 -1
- package/package.json +12 -12
- package/node_modules/async-function/.eslintrc +0 -16
- package/node_modules/async-function/.github/FUNDING.yml +0 -12
- package/node_modules/async-function/.nycrc +0 -9
- package/node_modules/async-function/CHANGELOG.md +0 -16
- package/node_modules/async-function/LICENSE +0 -21
- package/node_modules/async-function/README.md +0 -51
- package/node_modules/async-function/index.d.mts +0 -3
- package/node_modules/async-function/index.d.ts +0 -13
- package/node_modules/async-function/index.js +0 -8
- package/node_modules/async-function/index.mjs +0 -4
- package/node_modules/async-function/legacy.js +0 -18
- package/node_modules/async-function/package.json +0 -86
- package/node_modules/async-function/require.mjs +0 -5
- package/node_modules/async-function/tsconfig.json +0 -9
- package/node_modules/async-generator-function/.eslintrc +0 -26
- package/node_modules/async-generator-function/.github/FUNDING.yml +0 -12
- package/node_modules/async-generator-function/.nycrc +0 -9
- package/node_modules/async-generator-function/CHANGELOG.md +0 -15
- package/node_modules/async-generator-function/LICENSE +0 -21
- package/node_modules/async-generator-function/README.md +0 -52
- package/node_modules/async-generator-function/index.d.mts +0 -3
- package/node_modules/async-generator-function/index.d.ts +0 -22
- package/node_modules/async-generator-function/index.js +0 -8
- package/node_modules/async-generator-function/index.mjs +0 -4
- package/node_modules/async-generator-function/legacy.js +0 -18
- package/node_modules/async-generator-function/package.json +0 -87
- package/node_modules/async-generator-function/require.mjs +0 -5
- package/node_modules/async-generator-function/tsconfig.json +0 -9
- package/node_modules/fast-uri/.github/.stale.yml +0 -21
- package/node_modules/fast-uri/.github/tests_checker.yml +0 -8
- package/node_modules/generator-function/.eslintrc +0 -16
- package/node_modules/generator-function/.github/FUNDING.yml +0 -12
- package/node_modules/generator-function/.nycrc +0 -9
- package/node_modules/generator-function/CHANGELOG.md +0 -27
- package/node_modules/generator-function/LICENSE.md +0 -7
- package/node_modules/generator-function/README.md +0 -51
- package/node_modules/generator-function/index.d.mts +0 -3
- package/node_modules/generator-function/index.d.ts +0 -3
- package/node_modules/generator-function/index.js +0 -8
- package/node_modules/generator-function/index.mjs +0 -4
- package/node_modules/generator-function/legacy.js +0 -18
- package/node_modules/generator-function/package.json +0 -88
- package/node_modules/generator-function/require.mjs +0 -5
- package/node_modules/generator-function/tsconfig.json +0 -9
- package/node_modules/hasown/.eslintrc +0 -5
- package/node_modules/ip-address/dist/address-error.d.ts.map +0 -1
- package/node_modules/ip-address/dist/common.d.ts.map +0 -1
- package/node_modules/ip-address/dist/ip-address.d.ts.map +0 -1
- package/node_modules/ip-address/dist/ipv4.d.ts.map +0 -1
- package/node_modules/ip-address/dist/ipv6.d.ts.map +0 -1
- package/node_modules/ip-address/dist/v4/constants.d.ts.map +0 -1
- package/node_modules/ip-address/dist/v6/constants.d.ts.map +0 -1
- package/node_modules/ip-address/dist/v6/helpers.d.ts.map +0 -1
- package/node_modules/ip-address/dist/v6/regular-expressions.d.ts.map +0 -1
- package/node_modules/ip-address/src/address-error.ts +0 -11
- package/node_modules/ip-address/src/common.ts +0 -55
- package/node_modules/ip-address/src/ip-address.ts +0 -7
- package/node_modules/ip-address/src/ipv4.ts +0 -394
- package/node_modules/ip-address/src/ipv6.ts +0 -1212
- package/node_modules/ip-address/src/v4/constants.ts +0 -7
- package/node_modules/ip-address/src/v6/constants.ts +0 -79
- package/node_modules/ip-address/src/v6/helpers.ts +0 -48
- package/node_modules/ip-address/src/v6/regular-expressions.ts +0 -94
- /package/node_modules/{cross-spawn/node_modules/isexe → isexe}/.npmignore +0 -0
- /package/node_modules/{cross-spawn/node_modules/isexe → isexe}/LICENSE +0 -0
- /package/node_modules/{cross-spawn/node_modules/isexe → isexe}/README.md +0 -0
- /package/node_modules/{cross-spawn/node_modules/isexe → isexe}/index.js +0 -0
- /package/node_modules/{cross-spawn/node_modules/isexe → isexe}/mode.js +0 -0
- /package/node_modules/{cross-spawn/node_modules/isexe → isexe}/package.json +0 -0
- /package/node_modules/{cross-spawn/node_modules/isexe → isexe}/windows.js +0 -0
- /package/node_modules/{cross-spawn/node_modules/which → which}/LICENSE +0 -0
- /package/node_modules/{cross-spawn/node_modules/which → which}/README.md +0 -0
- /package/node_modules/{cross-spawn/node_modules/which → which}/bin/node-which +0 -0
- /package/node_modules/{cross-spawn/node_modules/which → which}/package.json +0 -0
- /package/node_modules/{cross-spawn/node_modules/which → which}/which.js +0 -0
|
@@ -10,13 +10,15 @@
|
|
|
10
10
|
* @returns A new EventSource parser, with `parse` and `reset` methods.
|
|
11
11
|
* @public
|
|
12
12
|
*/
|
|
13
|
-
export declare function createParser(
|
|
13
|
+
export declare function createParser(
|
|
14
|
+
callbacks: ParserCallbacks,
|
|
15
|
+
): EventSourceParser;
|
|
14
16
|
|
|
15
17
|
/**
|
|
16
18
|
* The type of error that occurred.
|
|
17
19
|
* @public
|
|
18
20
|
*/
|
|
19
|
-
export declare type ErrorType =
|
|
21
|
+
export declare type ErrorType = "invalid-retry" | "unknown-field";
|
|
20
22
|
|
|
21
23
|
/**
|
|
22
24
|
* A parsed EventSource message event
|
|
@@ -29,16 +31,16 @@ export declare interface EventSourceMessage {
|
|
|
29
31
|
* implementation in that browsers will default this to `message`, whereas this parser will
|
|
30
32
|
* leave this as `undefined` if not explicitly declared.
|
|
31
33
|
*/
|
|
32
|
-
event?: string | undefined
|
|
34
|
+
event?: string | undefined;
|
|
33
35
|
/**
|
|
34
36
|
* ID of the message, if any was provided by the server. Can be used by clients to keep the
|
|
35
37
|
* last received message ID in sync when reconnecting.
|
|
36
38
|
*/
|
|
37
|
-
id?: string | undefined
|
|
39
|
+
id?: string | undefined;
|
|
38
40
|
/**
|
|
39
41
|
* The data received for this message
|
|
40
42
|
*/
|
|
41
|
-
data: string
|
|
43
|
+
data: string;
|
|
42
44
|
}
|
|
43
45
|
|
|
44
46
|
/**
|
|
@@ -57,7 +59,7 @@ export declare interface EventSourceParser {
|
|
|
57
59
|
* @param chunk - The chunk to parse. Can be a partial, eg in the case of streaming messages.
|
|
58
60
|
* @public
|
|
59
61
|
*/
|
|
60
|
-
feed(chunk: string): void
|
|
62
|
+
feed(chunk: string): void;
|
|
61
63
|
/**
|
|
62
64
|
* Resets the parser state. This is required when you have a new stream of messages -
|
|
63
65
|
* for instance in the case of a client being disconnected and reconnecting.
|
|
@@ -69,7 +71,7 @@ export declare interface EventSourceParser {
|
|
|
69
71
|
*
|
|
70
72
|
* @public
|
|
71
73
|
*/
|
|
72
|
-
reset(options?: {consume?: boolean}): void
|
|
74
|
+
reset(options?: { consume?: boolean }): void;
|
|
73
75
|
}
|
|
74
76
|
|
|
75
77
|
/**
|
|
@@ -81,28 +83,28 @@ export declare class ParseError extends Error {
|
|
|
81
83
|
/**
|
|
82
84
|
* The type of error that occurred.
|
|
83
85
|
*/
|
|
84
|
-
type: ErrorType
|
|
86
|
+
type: ErrorType;
|
|
85
87
|
/**
|
|
86
88
|
* In the case of an unknown field encountered in the stream, this will be the field name.
|
|
87
89
|
*/
|
|
88
|
-
field?: string | undefined
|
|
90
|
+
field?: string | undefined;
|
|
89
91
|
/**
|
|
90
92
|
* In the case of an unknown field encountered in the stream, this will be the value of the field.
|
|
91
93
|
*/
|
|
92
|
-
value?: string | undefined
|
|
94
|
+
value?: string | undefined;
|
|
93
95
|
/**
|
|
94
96
|
* The line that caused the error, if available.
|
|
95
97
|
*/
|
|
96
|
-
line?: string | undefined
|
|
98
|
+
line?: string | undefined;
|
|
97
99
|
constructor(
|
|
98
100
|
message: string,
|
|
99
101
|
options: {
|
|
100
|
-
type: ErrorType
|
|
101
|
-
field?: string
|
|
102
|
-
value?: string
|
|
103
|
-
line?: string
|
|
102
|
+
type: ErrorType;
|
|
103
|
+
field?: string;
|
|
104
|
+
value?: string;
|
|
105
|
+
line?: string;
|
|
104
106
|
},
|
|
105
|
-
)
|
|
107
|
+
);
|
|
106
108
|
}
|
|
107
109
|
|
|
108
110
|
/**
|
|
@@ -118,19 +120,19 @@ export declare interface ParserCallbacks {
|
|
|
118
120
|
*
|
|
119
121
|
* @param event - The parsed event/message
|
|
120
122
|
*/
|
|
121
|
-
onEvent?: ((event: EventSourceMessage) => void) | undefined
|
|
123
|
+
onEvent?: ((event: EventSourceMessage) => void) | undefined;
|
|
122
124
|
/**
|
|
123
125
|
* Callback for when the server sends a new reconnection interval through the `retry` field.
|
|
124
126
|
*
|
|
125
127
|
* @param retry - The number of milliseconds to wait before reconnecting.
|
|
126
128
|
*/
|
|
127
|
-
onRetry?: ((retry: number) => void) | undefined
|
|
129
|
+
onRetry?: ((retry: number) => void) | undefined;
|
|
128
130
|
/**
|
|
129
131
|
* Callback for when a comment is encountered in the stream.
|
|
130
132
|
*
|
|
131
133
|
* @param comment - The comment encountered in the stream.
|
|
132
134
|
*/
|
|
133
|
-
onComment?: ((comment: string) => void) | undefined
|
|
135
|
+
onComment?: ((comment: string) => void) | undefined;
|
|
134
136
|
/**
|
|
135
137
|
* Callback for when an error occurs during parsing. This is a catch-all for any errors
|
|
136
138
|
* that occur during parsing, and can be used to handle them in a custom way. Most clients
|
|
@@ -138,7 +140,7 @@ export declare interface ParserCallbacks {
|
|
|
138
140
|
*
|
|
139
141
|
* @param error - The error that occurred during parsing
|
|
140
142
|
*/
|
|
141
|
-
onError?: ((error: ParseError) => void) | undefined
|
|
143
|
+
onError?: ((error: ParseError) => void) | undefined;
|
|
142
144
|
}
|
|
143
145
|
|
|
144
|
-
export {}
|
|
146
|
+
export {};
|
|
@@ -3,6 +3,7 @@ class ParseError extends Error {
|
|
|
3
3
|
super(message), this.name = "ParseError", this.type = options.type, this.field = options.field, this.value = options.value, this.line = options.line;
|
|
4
4
|
}
|
|
5
5
|
}
|
|
6
|
+
const LF = 10, CR = 13, SPACE = 32;
|
|
6
7
|
function noop(_arg) {
|
|
7
8
|
}
|
|
8
9
|
function createParser(callbacks) {
|
|
@@ -10,39 +11,109 @@ function createParser(callbacks) {
|
|
|
10
11
|
throw new TypeError(
|
|
11
12
|
"`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?"
|
|
12
13
|
);
|
|
13
|
-
const { onEvent = noop, onError = noop, onRetry = noop, onComment } = callbacks;
|
|
14
|
-
let
|
|
15
|
-
function feed(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
const { onEvent = noop, onError = noop, onRetry = noop, onComment } = callbacks, pendingFragments = [];
|
|
15
|
+
let isFirstChunk = !0, id, data = "", dataLines = 0, eventType;
|
|
16
|
+
function feed(chunk) {
|
|
17
|
+
if (isFirstChunk && (isFirstChunk = !1, chunk.charCodeAt(0) === 239 && chunk.charCodeAt(1) === 187 && chunk.charCodeAt(2) === 191 && (chunk = chunk.slice(3))), pendingFragments.length === 0) {
|
|
18
|
+
const trailing2 = processLines(chunk);
|
|
19
|
+
trailing2 !== "" && pendingFragments.push(trailing2);
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
if (chunk.indexOf(`
|
|
23
|
+
`) === -1 && chunk.indexOf("\r") === -1) {
|
|
24
|
+
pendingFragments.push(chunk);
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
pendingFragments.push(chunk);
|
|
28
|
+
const input = pendingFragments.join("");
|
|
29
|
+
pendingFragments.length = 0;
|
|
30
|
+
const trailing = processLines(input);
|
|
31
|
+
trailing !== "" && pendingFragments.push(trailing);
|
|
32
|
+
}
|
|
33
|
+
function processLines(chunk) {
|
|
34
|
+
let searchIndex = 0;
|
|
35
|
+
if (chunk.indexOf("\r") === -1) {
|
|
36
|
+
let lfIndex = chunk.indexOf(`
|
|
37
|
+
`, searchIndex);
|
|
38
|
+
for (; lfIndex !== -1; ) {
|
|
39
|
+
if (searchIndex === lfIndex) {
|
|
40
|
+
dataLines > 0 && onEvent({ id, event: eventType, data }), id = void 0, data = "", dataLines = 0, eventType = void 0, searchIndex = lfIndex + 1, lfIndex = chunk.indexOf(`
|
|
41
|
+
`, searchIndex);
|
|
42
|
+
continue;
|
|
43
|
+
}
|
|
44
|
+
const firstCharCode = chunk.charCodeAt(searchIndex);
|
|
45
|
+
if (isDataPrefix(chunk, searchIndex, firstCharCode)) {
|
|
46
|
+
const valueStart = chunk.charCodeAt(searchIndex + 5) === SPACE ? searchIndex + 6 : searchIndex + 5, value = chunk.slice(valueStart, lfIndex);
|
|
47
|
+
if (dataLines === 0 && chunk.charCodeAt(lfIndex + 1) === LF) {
|
|
48
|
+
onEvent({ id, event: eventType, data: value }), id = void 0, data = "", eventType = void 0, searchIndex = lfIndex + 2, lfIndex = chunk.indexOf(`
|
|
49
|
+
`, searchIndex);
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
data = dataLines === 0 ? value : `${data}
|
|
53
|
+
${value}`, dataLines++;
|
|
54
|
+
} else isEventPrefix(chunk, searchIndex, firstCharCode) ? eventType = chunk.slice(
|
|
55
|
+
chunk.charCodeAt(searchIndex + 6) === SPACE ? searchIndex + 7 : searchIndex + 6,
|
|
56
|
+
lfIndex
|
|
57
|
+
) || void 0 : parseLine(chunk, searchIndex, lfIndex);
|
|
58
|
+
searchIndex = lfIndex + 1, lfIndex = chunk.indexOf(`
|
|
59
|
+
`, searchIndex);
|
|
60
|
+
}
|
|
61
|
+
return chunk.slice(searchIndex);
|
|
62
|
+
}
|
|
63
|
+
for (; searchIndex < chunk.length; ) {
|
|
64
|
+
const crIndex = chunk.indexOf("\r", searchIndex), lfIndex = chunk.indexOf(`
|
|
65
|
+
`, searchIndex);
|
|
66
|
+
let lineEnd = -1;
|
|
67
|
+
if (crIndex !== -1 && lfIndex !== -1 ? lineEnd = crIndex < lfIndex ? crIndex : lfIndex : crIndex !== -1 ? crIndex === chunk.length - 1 ? lineEnd = -1 : lineEnd = crIndex : lfIndex !== -1 && (lineEnd = lfIndex), lineEnd === -1)
|
|
68
|
+
break;
|
|
69
|
+
parseLine(chunk, searchIndex, lineEnd), searchIndex = lineEnd + 1, chunk.charCodeAt(searchIndex - 1) === CR && chunk.charCodeAt(searchIndex) === LF && searchIndex++;
|
|
70
|
+
}
|
|
71
|
+
return chunk.slice(searchIndex);
|
|
20
72
|
}
|
|
21
|
-
function parseLine(
|
|
22
|
-
if (
|
|
73
|
+
function parseLine(chunk, start, end) {
|
|
74
|
+
if (start === end) {
|
|
23
75
|
dispatchEvent();
|
|
24
76
|
return;
|
|
25
77
|
}
|
|
26
|
-
|
|
27
|
-
|
|
78
|
+
const firstCharCode = chunk.charCodeAt(start);
|
|
79
|
+
if (isDataPrefix(chunk, start, firstCharCode)) {
|
|
80
|
+
const valueStart = chunk.charCodeAt(start + 5) === SPACE ? start + 6 : start + 5, value2 = chunk.slice(valueStart, end);
|
|
81
|
+
data = dataLines === 0 ? value2 : `${data}
|
|
82
|
+
${value2}`, dataLines++;
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
if (isEventPrefix(chunk, start, firstCharCode)) {
|
|
86
|
+
eventType = chunk.slice(chunk.charCodeAt(start + 6) === SPACE ? start + 7 : start + 6, end) || void 0;
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
if (firstCharCode === 105 && chunk.charCodeAt(start + 1) === 100 && chunk.charCodeAt(start + 2) === 58) {
|
|
90
|
+
const value2 = chunk.slice(chunk.charCodeAt(start + 3) === SPACE ? start + 4 : start + 3, end);
|
|
91
|
+
id = value2.includes("\0") ? void 0 : value2;
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
if (firstCharCode === 58) {
|
|
95
|
+
if (onComment) {
|
|
96
|
+
const line2 = chunk.slice(start, end);
|
|
97
|
+
onComment(line2.slice(chunk.charCodeAt(start + 1) === SPACE ? 2 : 1));
|
|
98
|
+
}
|
|
28
99
|
return;
|
|
29
100
|
}
|
|
30
|
-
const fieldSeparatorIndex = line.indexOf(":");
|
|
31
|
-
if (fieldSeparatorIndex
|
|
32
|
-
|
|
33
|
-
processField(field, value, line);
|
|
101
|
+
const line = chunk.slice(start, end), fieldSeparatorIndex = line.indexOf(":");
|
|
102
|
+
if (fieldSeparatorIndex === -1) {
|
|
103
|
+
processField(line, "", line);
|
|
34
104
|
return;
|
|
35
105
|
}
|
|
36
|
-
|
|
106
|
+
const field = line.slice(0, fieldSeparatorIndex), offset = line.charCodeAt(fieldSeparatorIndex + 1) === SPACE ? 2 : 1, value = line.slice(fieldSeparatorIndex + offset);
|
|
107
|
+
processField(field, value, line);
|
|
37
108
|
}
|
|
38
109
|
function processField(field, value, line) {
|
|
39
110
|
switch (field) {
|
|
40
111
|
case "event":
|
|
41
|
-
eventType = value;
|
|
112
|
+
eventType = value || void 0;
|
|
42
113
|
break;
|
|
43
114
|
case "data":
|
|
44
|
-
data = `${data}
|
|
45
|
-
|
|
115
|
+
data = dataLines === 0 ? value : `${data}
|
|
116
|
+
${value}`, dataLines++;
|
|
46
117
|
break;
|
|
47
118
|
case "id":
|
|
48
119
|
id = value.includes("\0") ? void 0 : value;
|
|
@@ -67,37 +138,26 @@ function createParser(callbacks) {
|
|
|
67
138
|
}
|
|
68
139
|
}
|
|
69
140
|
function dispatchEvent() {
|
|
70
|
-
|
|
141
|
+
dataLines > 0 && onEvent({
|
|
71
142
|
id,
|
|
72
|
-
event: eventType
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
data: data.endsWith(`
|
|
76
|
-
`) ? data.slice(0, -1) : data
|
|
77
|
-
}), id = void 0, data = "", eventType = "";
|
|
143
|
+
event: eventType,
|
|
144
|
+
data
|
|
145
|
+
}), id = void 0, data = "", dataLines = 0, eventType = void 0;
|
|
78
146
|
}
|
|
79
147
|
function reset(options = {}) {
|
|
80
|
-
|
|
148
|
+
if (options.consume && pendingFragments.length > 0) {
|
|
149
|
+
const incompleteLine = pendingFragments.join("");
|
|
150
|
+
parseLine(incompleteLine, 0, incompleteLine.length);
|
|
151
|
+
}
|
|
152
|
+
isFirstChunk = !0, id = void 0, data = "", dataLines = 0, eventType = void 0, pendingFragments.length = 0;
|
|
81
153
|
}
|
|
82
154
|
return { feed, reset };
|
|
83
155
|
}
|
|
84
|
-
function
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
`, searchIndex);
|
|
90
|
-
let lineEnd = -1;
|
|
91
|
-
if (crIndex !== -1 && lfIndex !== -1 ? lineEnd = Math.min(crIndex, lfIndex) : crIndex !== -1 ? crIndex === chunk.length - 1 ? lineEnd = -1 : lineEnd = crIndex : lfIndex !== -1 && (lineEnd = lfIndex), lineEnd === -1) {
|
|
92
|
-
incompleteLine = chunk.slice(searchIndex);
|
|
93
|
-
break;
|
|
94
|
-
} else {
|
|
95
|
-
const line = chunk.slice(searchIndex, lineEnd);
|
|
96
|
-
lines.push(line), searchIndex = lineEnd + 1, chunk[searchIndex - 1] === "\r" && chunk[searchIndex] === `
|
|
97
|
-
` && searchIndex++;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
return [lines, incompleteLine];
|
|
156
|
+
function isDataPrefix(chunk, i, firstCharCode) {
|
|
157
|
+
return firstCharCode === 100 && chunk.charCodeAt(i + 1) === 97 && chunk.charCodeAt(i + 2) === 116 && chunk.charCodeAt(i + 3) === 97 && chunk.charCodeAt(i + 4) === 58;
|
|
158
|
+
}
|
|
159
|
+
function isEventPrefix(chunk, i, firstCharCode) {
|
|
160
|
+
return firstCharCode === 101 && chunk.charCodeAt(i + 1) === 118 && chunk.charCodeAt(i + 2) === 101 && chunk.charCodeAt(i + 3) === 110 && chunk.charCodeAt(i + 4) === 116 && chunk.charCodeAt(i + 5) === 58;
|
|
101
161
|
}
|
|
102
162
|
export {
|
|
103
163
|
ParseError,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/errors.ts","../src/parse.ts"],"sourcesContent":["/**\n * The type of error that occurred.\n * @public\n */\nexport type ErrorType = 'invalid-retry' | 'unknown-field'\n\n/**\n * Error thrown when encountering an issue during parsing.\n *\n * @public\n */\nexport class ParseError extends Error {\n /**\n * The type of error that occurred.\n */\n type: ErrorType\n\n /**\n * In the case of an unknown field encountered in the stream, this will be the field name.\n */\n field?: string | undefined\n\n /**\n * In the case of an unknown field encountered in the stream, this will be the value of the field.\n */\n value?: string | undefined\n\n /**\n * The line that caused the error, if available.\n */\n line?: string | undefined\n\n constructor(\n message: string,\n options: {type: ErrorType; field?: string; value?: string; line?: string},\n ) {\n super(message)\n this.name = 'ParseError'\n this.type = options.type\n this.field = options.field\n this.value = options.value\n this.line = options.line\n }\n}\n","/**\n * EventSource/Server-Sent Events parser\n * @see https://html.spec.whatwg.org/multipage/server-sent-events.html\n */\nimport {ParseError} from './errors.ts'\nimport type {EventSourceParser, ParserCallbacks} from './types.ts'\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction noop(_arg: unknown) {\n // intentional noop\n}\n\n/**\n * Creates a new EventSource parser.\n *\n * @param callbacks - Callbacks to invoke on different parsing events:\n * - `onEvent` when a new event is parsed\n * - `onError` when an error occurs\n * - `onRetry` when a new reconnection interval has been sent from the server\n * - `onComment` when a comment is encountered in the stream\n *\n * @returns A new EventSource parser, with `parse` and `reset` methods.\n * @public\n */\nexport function createParser(callbacks: ParserCallbacks): EventSourceParser {\n if (typeof callbacks === 'function') {\n throw new TypeError(\n '`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?',\n )\n }\n\n const {onEvent = noop, onError = noop, onRetry = noop, onComment} = callbacks\n\n let incompleteLine = ''\n\n let isFirstChunk = true\n let id: string | undefined\n let data = ''\n let eventType = ''\n\n function feed(newChunk: string) {\n // Strip any UTF8 byte order mark (BOM) at the start of the stream\n const chunk = isFirstChunk ? newChunk.replace(/^\\xEF\\xBB\\xBF/, '') : newChunk\n\n // If there was a previous incomplete line, append it to the new chunk,\n // so we may process it together as a new (hopefully complete) chunk.\n const [complete, incomplete] = splitLines(`${incompleteLine}${chunk}`)\n\n for (const line of complete) {\n parseLine(line)\n }\n\n incompleteLine = incomplete\n isFirstChunk = false\n }\n\n function parseLine(line: string) {\n // If the line is empty (a blank line), dispatch the event\n if (line === '') {\n dispatchEvent()\n return\n }\n\n // If the line starts with a U+003A COLON character (:), ignore the line.\n if (line.startsWith(':')) {\n if (onComment) {\n onComment(line.slice(line.startsWith(': ') ? 2 : 1))\n }\n return\n }\n\n // If the line contains a U+003A COLON character (:)\n const fieldSeparatorIndex = line.indexOf(':')\n if (fieldSeparatorIndex !== -1) {\n // Collect the characters on the line before the first U+003A COLON character (:),\n // and let `field` be that string.\n const field = line.slice(0, fieldSeparatorIndex)\n\n // Collect the characters on the line after the first U+003A COLON character (:),\n // and let `value` be that string. If value starts with a U+0020 SPACE character,\n // remove it from value.\n const offset = line[fieldSeparatorIndex + 1] === ' ' ? 2 : 1\n const value = line.slice(fieldSeparatorIndex + offset)\n\n processField(field, value, line)\n return\n }\n\n // Otherwise, the string is not empty but does not contain a U+003A COLON character (:)\n // Process the field using the whole line as the field name, and an empty string as the field value.\n // 👆 This is according to spec. That means that a line that has the value `data` will result in\n // a newline being added to the current `data` buffer, for instance.\n processField(line, '', line)\n }\n\n function processField(field: string, value: string, line: string) {\n // Field names must be compared literally, with no case folding performed.\n switch (field) {\n case 'event':\n // Set the `event type` buffer to field value\n eventType = value\n break\n case 'data':\n // Append the field value to the `data` buffer, then append a single U+000A LINE FEED(LF)\n // character to the `data` buffer.\n data = `${data}${value}\\n`\n break\n case 'id':\n // If the field value does not contain U+0000 NULL, then set the `ID` buffer to\n // the field value. Otherwise, ignore the field.\n id = value.includes('\\0') ? undefined : value\n break\n case 'retry':\n // If the field value consists of only ASCII digits, then interpret the field value as an\n // integer in base ten, and set the event stream's reconnection time to that integer.\n // Otherwise, ignore the field.\n if (/^\\d+$/.test(value)) {\n onRetry(parseInt(value, 10))\n } else {\n onError(\n new ParseError(`Invalid \\`retry\\` value: \"${value}\"`, {\n type: 'invalid-retry',\n value,\n line,\n }),\n )\n }\n break\n default:\n // Otherwise, the field is ignored.\n onError(\n new ParseError(\n `Unknown field \"${field.length > 20 ? `${field.slice(0, 20)}…` : field}\"`,\n {type: 'unknown-field', field, value, line},\n ),\n )\n break\n }\n }\n\n function dispatchEvent() {\n const shouldDispatch = data.length > 0\n if (shouldDispatch) {\n onEvent({\n id,\n event: eventType || undefined,\n // If the data buffer's last character is a U+000A LINE FEED (LF) character,\n // then remove the last character from the data buffer.\n data: data.endsWith('\\n') ? data.slice(0, -1) : data,\n })\n }\n\n // Reset for the next event\n id = undefined\n data = ''\n eventType = ''\n }\n\n function reset(options: {consume?: boolean} = {}) {\n if (incompleteLine && options.consume) {\n parseLine(incompleteLine)\n }\n\n isFirstChunk = true\n id = undefined\n data = ''\n eventType = ''\n incompleteLine = ''\n }\n\n return {feed, reset}\n}\n\n/**\n * For the given `chunk`, split it into lines according to spec, and return any remaining incomplete line.\n *\n * @param chunk - The chunk to split into lines\n * @returns A tuple containing an array of complete lines, and any remaining incomplete line\n * @internal\n */\nfunction splitLines(chunk: string): [complete: Array<string>, incomplete: string] {\n /**\n * According to the spec, a line is terminated by either:\n * - U+000D CARRIAGE RETURN U+000A LINE FEED (CRLF) character pair\n * - a single U+000A LINE FEED(LF) character not preceded by a U+000D CARRIAGE RETURN(CR) character\n * - a single U+000D CARRIAGE RETURN(CR) character not followed by a U+000A LINE FEED(LF) character\n */\n const lines: Array<string> = []\n let incompleteLine = ''\n let searchIndex = 0\n\n while (searchIndex < chunk.length) {\n // Find next line terminator\n const crIndex = chunk.indexOf('\\r', searchIndex)\n const lfIndex = chunk.indexOf('\\n', searchIndex)\n\n // Determine line end\n let lineEnd = -1\n if (crIndex !== -1 && lfIndex !== -1) {\n // CRLF case\n lineEnd = Math.min(crIndex, lfIndex)\n } else if (crIndex !== -1) {\n // CR at the end of a chunk might be part of a CRLF sequence that spans chunks,\n // so we shouldn't treat it as a line terminator (yet)\n if (crIndex === chunk.length - 1) {\n lineEnd = -1\n } else {\n lineEnd = crIndex\n }\n } else if (lfIndex !== -1) {\n lineEnd = lfIndex\n }\n\n // Extract line if terminator found\n if (lineEnd === -1) {\n // No terminator found, rest is incomplete\n incompleteLine = chunk.slice(searchIndex)\n break\n } else {\n const line = chunk.slice(searchIndex, lineEnd)\n lines.push(line)\n\n // Move past line terminator\n searchIndex = lineEnd + 1\n if (chunk[searchIndex - 1] === '\\r' && chunk[searchIndex] === '\\n') {\n sear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AAQ,MAAM,WAAW,GACzC,UAAU,MAAM,QAAQ;AAAA,GAAM,WAAW;AAG/C,QAAI,UAAU;AAiBd,QAhBI,YAAY,MAAM,YAAY,KAEhC,UAAU,KAAK,IAAI,SAAS,OAAO,IAC1B,YAAY,KAGjB,YAAY,MAAM,SAAS,IAC7B,UAAU,KAEV,UAAU,UAEH,YAAY,OACrB,UAAU,UAIR,YAAY,IAAI;AAElB,uBAAiB,MAAM,MAAM,WAAW;AACxC;AAAA,IACF,OAAO;AACL,YAAM,OAAO,MAAM,MAAM,aAAa,OAAO;AAC7C,YAAM,KAAK,IAAI,GAGf,cAAc,UAAU,GACpB,MAAM,cAAc,CAAC,MAAM,QAAQ,MAAM,WAAW,MAAM;AAAA,KAC5D;AAAA,IAEJ;AAAA,EACF;AAEA,SAAO,CAAC,OAAO,cAAc;AAC/B;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/errors.ts","../src/parse.ts"],"sourcesContent":["/**\n * The type of error that occurred.\n * @public\n */\nexport type ErrorType = 'invalid-retry' | 'unknown-field'\n\n/**\n * Error thrown when encountering an issue during parsing.\n *\n * @public\n */\nexport class ParseError extends Error {\n /**\n * The type of error that occurred.\n */\n type: ErrorType\n\n /**\n * In the case of an unknown field encountered in the stream, this will be the field name.\n */\n field?: string | undefined\n\n /**\n * In the case of an unknown field encountered in the stream, this will be the value of the field.\n */\n value?: string | undefined\n\n /**\n * The line that caused the error, if available.\n */\n line?: string | undefined\n\n constructor(\n message: string,\n options: {type: ErrorType; field?: string; value?: string; line?: string},\n ) {\n super(message)\n this.name = 'ParseError'\n this.type = options.type\n this.field = options.field\n this.value = options.value\n this.line = options.line\n }\n}\n","/**\n * EventSource/Server-Sent Events parser\n * @see https://html.spec.whatwg.org/multipage/server-sent-events.html\n */\nimport {ParseError} from './errors.ts'\nimport type {EventSourceParser, ParserCallbacks} from './types.ts'\n\n// ASCII codes used in the hot parsing paths.\nconst LF = 10\nconst CR = 13\nconst SPACE = 32\n\n// oxlint-disable-next-line no-unused-vars\nfunction noop(_arg: unknown) {\n // intentional noop\n}\n\n/**\n * Creates a new EventSource parser.\n *\n * @param callbacks - Callbacks to invoke on different parsing events:\n * - `onEvent` when a new event is parsed\n * - `onError` when an error occurs\n * - `onRetry` when a new reconnection interval has been sent from the server\n * - `onComment` when a comment is encountered in the stream\n *\n * @returns A new EventSource parser, with `parse` and `reset` methods.\n * @public\n */\nexport function createParser(callbacks: ParserCallbacks): EventSourceParser {\n if (typeof callbacks === 'function') {\n throw new TypeError(\n '`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?',\n )\n }\n\n const {onEvent = noop, onError = noop, onRetry = noop, onComment} = callbacks\n\n // Trailing bytes from prior `feed()` calls that did not yet form a complete line.\n // Stored as an array of fragments and only joined when a line terminator arrives.\n // Concatenating per-feed (`prefix + chunk`) is O(N²) when a single SSE line spans\n // many chunks (e.g. a large `data:` payload streamed in tiny slices, or an MCP-style\n // server that emits one giant content block). Buffering as fragments + joining once\n // makes the same workload linear.\n const pendingFragments: string[] = []\n\n let isFirstChunk = true\n let id: string | undefined\n let data = ''\n let dataLines = 0\n let eventType: string | undefined\n\n /**\n * Feeds a chunk of the SSE stream to the parser. Any trailing bytes that do\n * not yet form a complete line are held back and prepended to the next chunk,\n * so callers can pass arbitrary slices of the stream without worrying about\n * line boundaries.\n *\n * Per the SSE spec, a UTF-8 BOM (0xEF 0xBB 0xBF) at the start of the very\n * first chunk is stripped before parsing.\n *\n * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#parsing-an-event-stream\n */\n function feed(chunk: string) {\n if (isFirstChunk) {\n isFirstChunk = false\n // Match and strip UTF-8 BOM from the start of the stream, if present.\n // (Per the spec, this is only valid at the very start of the stream)\n if (\n chunk.charCodeAt(0) === 0xef &&\n chunk.charCodeAt(1) === 0xbb &&\n chunk.charCodeAt(2) === 0xbf\n ) {\n chunk = chunk.slice(3)\n }\n }\n\n // Hot path: no buffered prefix from a prior partial line. Hand the chunk\n // straight to `processLines`, exactly like the original implementation.\n // Zero new work in the common case (every chunk ends with `\\n\\n`).\n if (pendingFragments.length === 0) {\n const trailing = processLines(chunk)\n if (trailing !== '') pendingFragments.push(trailing)\n return\n }\n\n // We have a buffered prefix. If this chunk also has no terminator, append\n // to the buffer without concatenating — that's the O(N²) trap we're\n // avoiding (large single `data:` payload split across many tiny chunks).\n if (chunk.indexOf('\\n') === -1 && chunk.indexOf('\\r') === -1) {\n pendingFragments.push(chunk)\n return\n }\n\n // Terminator arrived. Join the accumulated fragments + this chunk once,\n // process, and buffer any new trailing partial line.\n pendingFragments.push(chunk)\n const input = pendingFragments.join('')\n pendingFragments.length = 0\n const trailing = processLines(input)\n if (trailing !== '') pendingFragments.push(trailing)\n }\n\n /**\n * Splits `chunk` into SSE lines and dispatches each to the appropriate handler.\n * Returns any trailing bytes that did not terminate with a line break, so the\n * caller can prepend them to the next chunk.\n *\n * The SSE spec permits three line terminators: `\\n`, `\\r`, and `\\r\\n`. Real-world\n * streams almost always use plain `\\n`, so we take a fast path when no `\\r` is\n * present in the chunk. The slow path is spec-correct but does more work per line.\n */\n function processLines(chunk: string): string {\n let searchIndex = 0\n\n // Fast path: LF-only chunk (the common case for typical SSE servers).\n // We can scan forward with a single `indexOf('\\n')` per line and inline\n // the hot-path branches for `data:` and `event:` without the CR bookkeeping\n // the slow path needs.\n if (chunk.indexOf('\\r') === -1) {\n let lfIndex = chunk.indexOf('\\n', searchIndex)\n while (lfIndex !== -1) {\n // Blank line: end-of-event marker. Dispatch the accumulated event (if any)\n // and reset the buffered fields. This is hoisted out of `parseLine` because\n // it's the single most common line shape after `data:` lines.\n if (searchIndex === lfIndex) {\n if (dataLines > 0) {\n onEvent({id, event: eventType, data})\n }\n id = undefined\n data = ''\n dataLines = 0\n eventType = undefined\n searchIndex = lfIndex + 1\n lfIndex = chunk.indexOf('\\n', searchIndex)\n continue\n }\n const firstCharCode = chunk.charCodeAt(searchIndex)\n if (isDataPrefix(chunk, searchIndex, firstCharCode)) {\n // `data:` line — append the value to the event's data buffer.\n // 'data:'.length === 5, 'data: '.length === 6\n const valueStart =\n chunk.charCodeAt(searchIndex + 5) === SPACE ? searchIndex + 6 : searchIndex + 5\n const value = chunk.slice(valueStart, lfIndex)\n // Fast path within a fast path: if this is the first data line AND the\n // next char is another LF (i.e. `data:foo\\n\\n`), dispatch immediately\n // without ever writing to the `data` buffer. This is the shape of a\n // typical single-line SSE event (ChatGPT-style streams, etc.) and is\n // hot enough to be worth the duplication.\n if (dataLines === 0 && chunk.charCodeAt(lfIndex + 1) === LF) {\n onEvent({id, event: eventType, data: value})\n id = undefined\n data = ''\n eventType = undefined\n searchIndex = lfIndex + 2\n lfIndex = chunk.indexOf('\\n', searchIndex)\n continue\n }\n // Multi-line data: concatenate with newline separator per spec.\n data = dataLines === 0 ? value : `${data}\\n${value}`\n dataLines++\n } else if (isEventPrefix(chunk, searchIndex, firstCharCode)) {\n // `event:` line — set the event type for the next dispatch. Per spec,\n // an empty value resets `event type` to its default (undefined here).\n // 'event:'.length === 6, 'event: '.length === 7\n eventType =\n chunk.slice(\n chunk.charCodeAt(searchIndex + 6) === SPACE ? searchIndex + 7 : searchIndex + 6,\n lfIndex,\n ) || undefined\n } else {\n // Everything else: `id:`, `retry:`, comment lines (`:` prefix), unknown\n // fields, or malformed lines. These are rarer and go through the full\n // per-line parser, which handles the SSE field grammar in detail.\n parseLine(chunk, searchIndex, lfIndex)\n }\n searchIndex = lfIndex + 1\n lfIndex = chunk.indexOf('\\n', searchIndex)\n }\n return chunk.slice(searchIndex)\n }\n\n // Slow path: the chunk contains at least one `\\r`, so lines may be terminated\n // by `\\r`, `\\n`, or `\\r\\n`. We locate the next terminator by looking at both\n // the nearest `\\r` and `\\n` and picking whichever comes first.\n while (searchIndex < chunk.length) {\n const crIndex = chunk.indexOf('\\r', searchIndex)\n const lfIndex = chunk.indexOf('\\n', searchIndex)\n\n let lineEnd = -1\n if (crIndex !== -1 && lfIndex !== -1) {\n lineEnd = crIndex < lfIndex ? crIndex : lfIndex\n } else if (crIndex !== -1) {\n // A trailing `\\r` at the very end of the chunk is ambiguous: it could be\n // a bare-CR terminator, or the first half of a `\\r\\n` whose `\\n` arrives\n // in the next chunk. Defer until we see more input.\n if (crIndex === chunk.length - 1) {\n lineEnd = -1\n } else {\n lineEnd = crIndex\n }\n } else if (lfIndex !== -1) {\n lineEnd = lfIndex\n }\n\n if (lineEnd === -1) {\n break\n }\n\n parseLine(chunk, searchIndex, lineEnd)\n searchIndex = lineEnd + 1\n // If we just consumed a `\\r` and the next char is `\\n`, skip it so the\n // pair is treated as a single terminator rather than an empty line.\n if (chunk.charCodeAt(searchIndex - 1) === CR && chunk.charCodeAt(searchIndex) === LF) {\n searchIndex++\n }\n }\n\n return chunk.slice(searchIndex)\n }\n\n function parseLine(chunk: string, start: number, end: number) {\n if (start === end) {\n dispatchEvent()\n return\n }\n\n const firstCharCode = chunk.charCodeAt(start)\n\n if (isDataPrefix(chunk, start, firstCharCode)) {\n // 'data:'.length === 5, 'data: '.length === 6\n const valueStart = chunk.charCodeAt(start + 5) === SPACE ? start + 6 : start + 5\n const value = chunk.slice(valueStart, end)\n data = dataLines === 0 ? value : `${data}\\n${value}`\n dataLines++\n return\n }\n\n if (isEventPrefix(chunk, start, firstCharCode)) {\n // 'event:'.length === 6, 'event: '.length === 7\n eventType =\n chunk.slice(chunk.charCodeAt(start + 6) === SPACE ? start + 7 : start + 6, end) || undefined\n return\n }\n\n // Fast path for \"id:\" — 'i' = 105, 'd' = 100, ':' = 58\n if (\n firstCharCode === 105 &&\n chunk.charCodeAt(start + 1) === 100 &&\n chunk.charCodeAt(start + 2) === 58\n ) {\n // 'id:'.length === 3, 'id: '.length === 4\n const value = chunk.slice(chunk.charCodeAt(start + 3) === SPACE ? start + 4 : start + 3, end)\n id = value.includes('\\0') ? undefined : value\n return\n }\n\n // Comment line — ':' = 58\n if (firstCharCode === 58) {\n if (onComment) {\n const line = chunk.slice(start, end)\n // skip ':' (+1), or ': ' (+2) when a space follows\n onComment(line.slice(chunk.charCodeAt(start + 1) === SPACE ? 2 : 1))\n }\n return\n }\n\n const line = chunk.slice(start, end)\n const fieldSeparatorIndex = line.indexOf(':')\n if (fieldSeparatorIndex === -1) {\n processField(line, '', line)\n return\n }\n\n const field = line.slice(0, fieldSeparatorIndex)\n // skip ':' (+1), or ': ' (+2) when a space follows\n const offset = line.charCodeAt(fieldSeparatorIndex + 1) === SPACE ? 2 : 1\n const value = line.slice(fieldSeparatorIndex + offset)\n processField(field, value, line)\n }\n\n function processField(field: string, value: string, line: string) {\n // Field names must be compared literally, with no case folding performed.\n switch (field) {\n case 'event':\n // Set the `event type` buffer to field value\n eventType = value || undefined\n break\n case 'data':\n data = dataLines === 0 ? value : `${data}\\n${value}`\n dataLines++\n break\n case 'id':\n // If the field value does not contain U+0000 NULL, then set the `ID` buffer to\n // the field value. Otherwise, ignore the field.\n id = value.includes('\\0') ? undefined : value\n break\n case 'retry':\n // If the field value consists of only ASCII digits, then interpret the field value as an\n // integer in base ten, and set the event stream's reconnection time to that integer.\n // Otherwise, ignore the field.\n if (/^\\d+$/.test(value)) {\n onRetry(parseInt(value, 10))\n } else {\n onError(\n new ParseError(`Invalid \\`retry\\` value: \"${value}\"`, {\n type: 'invalid-retry',\n value,\n line,\n }),\n )\n }\n break\n default:\n // Otherwise, the field is ignored.\n onError(\n new ParseError(\n `Unknown field \"${field.length > 20 ? `${field.slice(0, 20)}…` : field}\"`,\n {type: 'unknown-field', field, value, line},\n ),\n )\n break\n }\n }\n\n function dispatchEvent() {\n if (dataLines > 0) {\n onEvent({\n id,\n event: eventType,\n data,\n })\n }\n\n id = undefined\n data = ''\n dataLines = 0\n eventType = undefined\n }\n\n function reset(options: {consume?: boolean} = {}) {\n if (options.consume && pendingFragments.length > 0) {\n const incompleteLine = pendingFragments.join('')\n parseLine(incompleteLine, 0, incompleteLine.length)\n }\n\n isFirstChunk = true\n id = undefined\n data = ''\n dataLines = 0\n eventType = undefined\n pendingFragments.length = 0\n }\n\n return {feed, reset}\n}\n\n/**\n * Checks if `chunk` starts with the literal `data:` at index `i`.\n *\n * Equivalent to `chunk.startsWith('data:', i)`, but benchmarks show this\n * hand-unrolled char-code comparison is ~20% faster on common event types.\n * The caller passes `firstCharCode` (the code at `i`) so it can be reused\n * across prefix checks.\n *\n * ASCII: 'd' = 100, 'a' = 97, 't' = 116, 'a' = 97, ':' = 58\n */\nfunction isDataPrefix(chunk: string, i: number, firstCharCode: number): boolean {\n return (\n firstCharCode === 100 &&\n chunk.charCodeAt(i + 1) === 97 &&\n chunk.charCodeAt(i + 2) === 116 &&\n chunk.charCodeAt(i + 3) === 97 &&\n chunk.charCodeAt(i + 4) === 58\n )\n}\n\n/**\n * Checks if `chunk` starts with the literal `event:` at index `i`.\n *\n * See {@link isDataPrefix} for why this is hand-unrolled rather than using\n * `String.prototype.startsWith`.\n *\n * ASCII: 'e' = 101, 'v' = 118, 'e' = 101, 'n' = 110, 't' = 116, ':' = 58\n */\nfunction isEventPrefix(chunk: string, i: number, firstCharCode: number): boolean {\n return (\n firstCharCode === 101 &&\n chunk.charCodeAt(i + 1) === 118 &&\n chunk.charCodeAt(i + 2) === 101 &&\n chunk.charCodeAt(i + 3) === 110 &&\n chunk.charCodeAt(i + 4) === 116 &&\n chunk.charCodeAt(i + 5) === 58\n )\n}\n"],"names":["trailing","value","line"],"mappings":"AAWO,MAAM,mBAAmB,MAAM;AAAA,EAqBpC,YACE,SACA,SACA;AACA,UAAM,OAAO,GACb,KAAK,OAAO,cACZ,KAAK,OAAO,QAAQ,MACpB,KAAK,QAAQ,QAAQ,OACrB,KAAK,QAAQ,QAAQ,OACrB,KAAK,OAAO,QAAQ;AAAA,EACtB;AACF;ACnCA,MAAM,KAAK,IACL,KAAK,IACL,QAAQ;AAGd,SAAS,KAAK,MAAe;AAE7B;AAcO,SAAS,aAAa,WAA+C;AAC1E,MAAI,OAAO,aAAc;AACvB,UAAM,IAAI;AAAA,MACR;AAAA,IAAA;AAIJ,QAAM,E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AM,WAAW,IAAI,CAAC,MAAM,MAC5B,MAAM,WAAW,IAAI,CAAC,MAAM,OAC5B,MAAM,WAAW,IAAI,CAAC,MAAM,MAC5B,MAAM,WAAW,IAAI,CAAC,MAAM;AAEhC;AAUA,SAAS,cAAc,OAAe,GAAW,eAAgC;AAC/E,SACE,kBAAkB,OAClB,MAAM,WAAW,IAAI,CAAC,MAAM,OAC5B,MAAM,WAAW,IAAI,CAAC,MAAM,OAC5B,MAAM,WAAW,IAAI,CAAC,MAAM,OAC5B,MAAM,WAAW,IAAI,CAAC,MAAM,OAC5B,MAAM,WAAW,IAAI,CAAC,MAAM;AAEhC;"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* The type of error that occurred.
|
|
3
3
|
* @public
|
|
4
4
|
*/
|
|
5
|
-
export declare type ErrorType =
|
|
5
|
+
export declare type ErrorType = "invalid-retry" | "unknown-field";
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* A parsed EventSource message event
|
|
@@ -15,16 +15,16 @@ export declare interface EventSourceMessage {
|
|
|
15
15
|
* implementation in that browsers will default this to `message`, whereas this parser will
|
|
16
16
|
* leave this as `undefined` if not explicitly declared.
|
|
17
17
|
*/
|
|
18
|
-
event?: string | undefined
|
|
18
|
+
event?: string | undefined;
|
|
19
19
|
/**
|
|
20
20
|
* ID of the message, if any was provided by the server. Can be used by clients to keep the
|
|
21
21
|
* last received message ID in sync when reconnecting.
|
|
22
22
|
*/
|
|
23
|
-
id?: string | undefined
|
|
23
|
+
id?: string | undefined;
|
|
24
24
|
/**
|
|
25
25
|
* The data received for this message
|
|
26
26
|
*/
|
|
27
|
-
data: string
|
|
27
|
+
data: string;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
/**
|
|
@@ -48,8 +48,11 @@ export declare interface EventSourceMessage {
|
|
|
48
48
|
*
|
|
49
49
|
* @public
|
|
50
50
|
*/
|
|
51
|
-
export declare class EventSourceParserStream extends TransformStream<
|
|
52
|
-
|
|
51
|
+
export declare class EventSourceParserStream extends TransformStream<
|
|
52
|
+
string,
|
|
53
|
+
EventSourceMessage
|
|
54
|
+
> {
|
|
55
|
+
constructor({ onError, onRetry, onComment }?: StreamOptions);
|
|
53
56
|
}
|
|
54
57
|
|
|
55
58
|
/**
|
|
@@ -61,28 +64,28 @@ export declare class ParseError extends Error {
|
|
|
61
64
|
/**
|
|
62
65
|
* The type of error that occurred.
|
|
63
66
|
*/
|
|
64
|
-
type: ErrorType
|
|
67
|
+
type: ErrorType;
|
|
65
68
|
/**
|
|
66
69
|
* In the case of an unknown field encountered in the stream, this will be the field name.
|
|
67
70
|
*/
|
|
68
|
-
field?: string | undefined
|
|
71
|
+
field?: string | undefined;
|
|
69
72
|
/**
|
|
70
73
|
* In the case of an unknown field encountered in the stream, this will be the value of the field.
|
|
71
74
|
*/
|
|
72
|
-
value?: string | undefined
|
|
75
|
+
value?: string | undefined;
|
|
73
76
|
/**
|
|
74
77
|
* The line that caused the error, if available.
|
|
75
78
|
*/
|
|
76
|
-
line?: string | undefined
|
|
79
|
+
line?: string | undefined;
|
|
77
80
|
constructor(
|
|
78
81
|
message: string,
|
|
79
82
|
options: {
|
|
80
|
-
type: ErrorType
|
|
81
|
-
field?: string
|
|
82
|
-
value?: string
|
|
83
|
-
line?: string
|
|
83
|
+
type: ErrorType;
|
|
84
|
+
field?: string;
|
|
85
|
+
value?: string;
|
|
86
|
+
line?: string;
|
|
84
87
|
},
|
|
85
|
-
)
|
|
88
|
+
);
|
|
86
89
|
}
|
|
87
90
|
|
|
88
91
|
/**
|
|
@@ -100,19 +103,19 @@ export declare interface StreamOptions {
|
|
|
100
103
|
*
|
|
101
104
|
* @defaultValue `undefined`
|
|
102
105
|
*/
|
|
103
|
-
onError?: (
|
|
106
|
+
onError?: ("terminate" | ((error: Error) => void)) | undefined;
|
|
104
107
|
/**
|
|
105
108
|
* Callback for when a reconnection interval is sent from the server.
|
|
106
109
|
*
|
|
107
110
|
* @param retry - The number of milliseconds to wait before reconnecting.
|
|
108
111
|
*/
|
|
109
|
-
onRetry?: ((retry: number) => void) | undefined
|
|
112
|
+
onRetry?: ((retry: number) => void) | undefined;
|
|
110
113
|
/**
|
|
111
114
|
* Callback for when a comment is encountered in the stream.
|
|
112
115
|
*
|
|
113
116
|
* @param comment - The comment encountered in the stream.
|
|
114
117
|
*/
|
|
115
|
-
onComment?: ((comment: string) => void) | undefined
|
|
118
|
+
onComment?: ((comment: string) => void) | undefined;
|
|
116
119
|
}
|
|
117
120
|
|
|
118
|
-
export {}
|
|
121
|
+
export {};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* The type of error that occurred.
|
|
3
3
|
* @public
|
|
4
4
|
*/
|
|
5
|
-
export declare type ErrorType =
|
|
5
|
+
export declare type ErrorType = "invalid-retry" | "unknown-field";
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* A parsed EventSource message event
|
|
@@ -15,16 +15,16 @@ export declare interface EventSourceMessage {
|
|
|
15
15
|
* implementation in that browsers will default this to `message`, whereas this parser will
|
|
16
16
|
* leave this as `undefined` if not explicitly declared.
|
|
17
17
|
*/
|
|
18
|
-
event?: string | undefined
|
|
18
|
+
event?: string | undefined;
|
|
19
19
|
/**
|
|
20
20
|
* ID of the message, if any was provided by the server. Can be used by clients to keep the
|
|
21
21
|
* last received message ID in sync when reconnecting.
|
|
22
22
|
*/
|
|
23
|
-
id?: string | undefined
|
|
23
|
+
id?: string | undefined;
|
|
24
24
|
/**
|
|
25
25
|
* The data received for this message
|
|
26
26
|
*/
|
|
27
|
-
data: string
|
|
27
|
+
data: string;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
/**
|
|
@@ -48,8 +48,11 @@ export declare interface EventSourceMessage {
|
|
|
48
48
|
*
|
|
49
49
|
* @public
|
|
50
50
|
*/
|
|
51
|
-
export declare class EventSourceParserStream extends TransformStream<
|
|
52
|
-
|
|
51
|
+
export declare class EventSourceParserStream extends TransformStream<
|
|
52
|
+
string,
|
|
53
|
+
EventSourceMessage
|
|
54
|
+
> {
|
|
55
|
+
constructor({ onError, onRetry, onComment }?: StreamOptions);
|
|
53
56
|
}
|
|
54
57
|
|
|
55
58
|
/**
|
|
@@ -61,28 +64,28 @@ export declare class ParseError extends Error {
|
|
|
61
64
|
/**
|
|
62
65
|
* The type of error that occurred.
|
|
63
66
|
*/
|
|
64
|
-
type: ErrorType
|
|
67
|
+
type: ErrorType;
|
|
65
68
|
/**
|
|
66
69
|
* In the case of an unknown field encountered in the stream, this will be the field name.
|
|
67
70
|
*/
|
|
68
|
-
field?: string | undefined
|
|
71
|
+
field?: string | undefined;
|
|
69
72
|
/**
|
|
70
73
|
* In the case of an unknown field encountered in the stream, this will be the value of the field.
|
|
71
74
|
*/
|
|
72
|
-
value?: string | undefined
|
|
75
|
+
value?: string | undefined;
|
|
73
76
|
/**
|
|
74
77
|
* The line that caused the error, if available.
|
|
75
78
|
*/
|
|
76
|
-
line?: string | undefined
|
|
79
|
+
line?: string | undefined;
|
|
77
80
|
constructor(
|
|
78
81
|
message: string,
|
|
79
82
|
options: {
|
|
80
|
-
type: ErrorType
|
|
81
|
-
field?: string
|
|
82
|
-
value?: string
|
|
83
|
-
line?: string
|
|
83
|
+
type: ErrorType;
|
|
84
|
+
field?: string;
|
|
85
|
+
value?: string;
|
|
86
|
+
line?: string;
|
|
84
87
|
},
|
|
85
|
-
)
|
|
88
|
+
);
|
|
86
89
|
}
|
|
87
90
|
|
|
88
91
|
/**
|
|
@@ -100,19 +103,19 @@ export declare interface StreamOptions {
|
|
|
100
103
|
*
|
|
101
104
|
* @defaultValue `undefined`
|
|
102
105
|
*/
|
|
103
|
-
onError?: (
|
|
106
|
+
onError?: ("terminate" | ((error: Error) => void)) | undefined;
|
|
104
107
|
/**
|
|
105
108
|
* Callback for when a reconnection interval is sent from the server.
|
|
106
109
|
*
|
|
107
110
|
* @param retry - The number of milliseconds to wait before reconnecting.
|
|
108
111
|
*/
|
|
109
|
-
onRetry?: ((retry: number) => void) | undefined
|
|
112
|
+
onRetry?: ((retry: number) => void) | undefined;
|
|
110
113
|
/**
|
|
111
114
|
* Callback for when a comment is encountered in the stream.
|
|
112
115
|
*
|
|
113
116
|
* @param comment - The comment encountered in the stream.
|
|
114
117
|
*/
|
|
115
|
-
onComment?: ((comment: string) => void) | undefined
|
|
118
|
+
onComment?: ((comment: string) => void) | undefined;
|
|
116
119
|
}
|
|
117
120
|
|
|
118
|
-
export {}
|
|
121
|
+
export {};
|