@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
|
@@ -201,6 +201,16 @@ var MemoryStore = class {
|
|
|
201
201
|
// source/rate-limit.ts
|
|
202
202
|
var import_node_net3 = require("node:net");
|
|
203
203
|
|
|
204
|
+
// source/console-logger.ts
|
|
205
|
+
var ConsoleLogger = {
|
|
206
|
+
warn(...args) {
|
|
207
|
+
console.warn(...args.reverse());
|
|
208
|
+
},
|
|
209
|
+
error(...args) {
|
|
210
|
+
console.error(...args.reverse());
|
|
211
|
+
}
|
|
212
|
+
};
|
|
213
|
+
|
|
204
214
|
// source/headers.ts
|
|
205
215
|
var import_node_buffer = require("node:buffer");
|
|
206
216
|
var import_node_crypto = require("node:crypto");
|
|
@@ -548,7 +558,8 @@ var validations = {
|
|
|
548
558
|
validate: true,
|
|
549
559
|
headers: true,
|
|
550
560
|
max: true,
|
|
551
|
-
passOnStoreError: true
|
|
561
|
+
passOnStoreError: true,
|
|
562
|
+
logger: true
|
|
552
563
|
};
|
|
553
564
|
const validOptions = Object.keys(optionsMap).concat(
|
|
554
565
|
"draft_polli_ratelimit_headers",
|
|
@@ -661,7 +672,15 @@ var validations = {
|
|
|
661
672
|
}
|
|
662
673
|
}
|
|
663
674
|
};
|
|
664
|
-
|
|
675
|
+
function validateLogger(logger) {
|
|
676
|
+
if (typeof logger !== "object" || typeof logger.error !== "function" || typeof logger.warn !== "function") {
|
|
677
|
+
throw new TypeError(
|
|
678
|
+
"Provided logger does not implement the Logger interface"
|
|
679
|
+
);
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
var getValidations = (_enabled, logger) => {
|
|
683
|
+
validateLogger(logger);
|
|
665
684
|
let enabled;
|
|
666
685
|
if (typeof _enabled === "boolean") {
|
|
667
686
|
enabled = {
|
|
@@ -687,8 +706,8 @@ var getValidations = (_enabled) => {
|
|
|
687
706
|
args
|
|
688
707
|
);
|
|
689
708
|
} catch (error) {
|
|
690
|
-
if (error instanceof ChangeWarning)
|
|
691
|
-
else
|
|
709
|
+
if (error instanceof ChangeWarning) logger.warn(error);
|
|
710
|
+
else logger.error(error);
|
|
692
711
|
}
|
|
693
712
|
};
|
|
694
713
|
}
|
|
@@ -741,7 +760,11 @@ var getOptionsFromConfig = (config) => {
|
|
|
741
760
|
};
|
|
742
761
|
var parseOptions = (passedOptions) => {
|
|
743
762
|
const notUndefinedOptions = omitUndefinedProperties(passedOptions);
|
|
744
|
-
const
|
|
763
|
+
const logger = passedOptions.logger ?? ConsoleLogger;
|
|
764
|
+
const validations2 = getValidations(
|
|
765
|
+
notUndefinedOptions?.validate ?? true,
|
|
766
|
+
logger
|
|
767
|
+
);
|
|
745
768
|
validations2.validationsConfig();
|
|
746
769
|
validations2.knownOptions(passedOptions);
|
|
747
770
|
validations2.draftPolliHeaders(
|
|
@@ -816,7 +839,8 @@ var parseOptions = (passedOptions) => {
|
|
|
816
839
|
notUndefinedOptions.store ?? new MemoryStore(validations2)
|
|
817
840
|
),
|
|
818
841
|
// Print an error to the console if a few known misconfigurations are detected.
|
|
819
|
-
validations: validations2
|
|
842
|
+
validations: validations2,
|
|
843
|
+
logger
|
|
820
844
|
};
|
|
821
845
|
if (typeof config.store.increment !== "function" || typeof config.store.decrement !== "function" || typeof config.store.resetKey !== "function" || config.store.resetAll !== void 0 && typeof config.store.resetAll !== "function" || config.store.init !== void 0 && typeof config.store.init !== "function") {
|
|
822
846
|
throw new TypeError(
|
|
@@ -837,7 +861,24 @@ var rateLimit = (passedOptions) => {
|
|
|
837
861
|
const options = getOptionsFromConfig(config);
|
|
838
862
|
config.validations.creationStack(config.store);
|
|
839
863
|
config.validations.unsharedStore(config.store);
|
|
840
|
-
if (typeof config.store.init === "function")
|
|
864
|
+
if (typeof config.store.init === "function") {
|
|
865
|
+
try {
|
|
866
|
+
const storeInit = config.store.init(options);
|
|
867
|
+
if (storeInit instanceof Promise) {
|
|
868
|
+
storeInit.catch(
|
|
869
|
+
(error) => config.logger.error(
|
|
870
|
+
error,
|
|
871
|
+
"express-rate-limit: async error during store initialization."
|
|
872
|
+
)
|
|
873
|
+
);
|
|
874
|
+
}
|
|
875
|
+
} catch (error) {
|
|
876
|
+
config.logger.error(
|
|
877
|
+
error,
|
|
878
|
+
"express-rate-limit: error during store initialization."
|
|
879
|
+
);
|
|
880
|
+
}
|
|
881
|
+
}
|
|
841
882
|
const middleware = handleAsyncErrors(
|
|
842
883
|
async (request, response, next) => {
|
|
843
884
|
const closePromise = config.skipFailedRequests && new Promise((resolve) => response.once("close", resolve));
|
|
@@ -858,9 +899,9 @@ var rateLimit = (passedOptions) => {
|
|
|
858
899
|
resetTime = incrementResult.resetTime;
|
|
859
900
|
} catch (error) {
|
|
860
901
|
if (config.passOnStoreError) {
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
error
|
|
902
|
+
config.logger.error(
|
|
903
|
+
error,
|
|
904
|
+
"express-rate-limit: error from store, allowing request without rate-limiting."
|
|
864
905
|
);
|
|
865
906
|
next();
|
|
866
907
|
return;
|
|
@@ -159,6 +159,26 @@ declare const validations: {
|
|
|
159
159
|
windowMs(windowMs: number): void;
|
|
160
160
|
};
|
|
161
161
|
export type Validations = typeof validations;
|
|
162
|
+
/**
|
|
163
|
+
* Basic logging function
|
|
164
|
+
*
|
|
165
|
+
* @param error {unknown} - The error to log
|
|
166
|
+
* @param message {string | undefined} - Additional details about the error
|
|
167
|
+
*/
|
|
168
|
+
export type LoggerFn = (error: unknown, message?: string) => void;
|
|
169
|
+
/**
|
|
170
|
+
* Minimal interface for logging warnings and errors
|
|
171
|
+
*/
|
|
172
|
+
export type Logger = {
|
|
173
|
+
/**
|
|
174
|
+
* Function to log an error
|
|
175
|
+
*/
|
|
176
|
+
error: LoggerFn;
|
|
177
|
+
/**
|
|
178
|
+
* Function to log a warning
|
|
179
|
+
*/
|
|
180
|
+
warn: LoggerFn;
|
|
181
|
+
};
|
|
162
182
|
/**
|
|
163
183
|
* Callback that fires when a client's hit counter is incremented.
|
|
164
184
|
*
|
|
@@ -265,9 +285,15 @@ export type Store = {
|
|
|
265
285
|
* Method that initializes the store, and has access to the options passed to
|
|
266
286
|
* the middleware too.
|
|
267
287
|
*
|
|
288
|
+
* Called once during initialization.
|
|
289
|
+
*
|
|
290
|
+
* Errors / promise rejections will be caught and logged.
|
|
291
|
+
*
|
|
292
|
+
* Note that the result is not awaited - other store methods (such as increment) may be called before init returns and/or after it throws/rejects.
|
|
293
|
+
*
|
|
268
294
|
* @param options {Options} - The options used to setup the middleware.
|
|
269
295
|
*/
|
|
270
|
-
init?: (options: Options) => void
|
|
296
|
+
init?: (options: Options) => void | Promise<void>;
|
|
271
297
|
/**
|
|
272
298
|
* Method to fetch a client's hit count and reset time.
|
|
273
299
|
*
|
|
@@ -477,6 +503,10 @@ export type Options = {
|
|
|
477
503
|
* If the Store generates an error, allow the request to pass.
|
|
478
504
|
*/
|
|
479
505
|
passOnStoreError: boolean;
|
|
506
|
+
/**
|
|
507
|
+
* The logger to use to log errors. If absent, logs to the console.
|
|
508
|
+
*/
|
|
509
|
+
logger: Logger;
|
|
480
510
|
};
|
|
481
511
|
/**
|
|
482
512
|
* The extended request object that includes information about the client's
|
|
@@ -159,6 +159,26 @@ declare const validations: {
|
|
|
159
159
|
windowMs(windowMs: number): void;
|
|
160
160
|
};
|
|
161
161
|
export type Validations = typeof validations;
|
|
162
|
+
/**
|
|
163
|
+
* Basic logging function
|
|
164
|
+
*
|
|
165
|
+
* @param error {unknown} - The error to log
|
|
166
|
+
* @param message {string | undefined} - Additional details about the error
|
|
167
|
+
*/
|
|
168
|
+
export type LoggerFn = (error: unknown, message?: string) => void;
|
|
169
|
+
/**
|
|
170
|
+
* Minimal interface for logging warnings and errors
|
|
171
|
+
*/
|
|
172
|
+
export type Logger = {
|
|
173
|
+
/**
|
|
174
|
+
* Function to log an error
|
|
175
|
+
*/
|
|
176
|
+
error: LoggerFn;
|
|
177
|
+
/**
|
|
178
|
+
* Function to log a warning
|
|
179
|
+
*/
|
|
180
|
+
warn: LoggerFn;
|
|
181
|
+
};
|
|
162
182
|
/**
|
|
163
183
|
* Callback that fires when a client's hit counter is incremented.
|
|
164
184
|
*
|
|
@@ -265,9 +285,15 @@ export type Store = {
|
|
|
265
285
|
* Method that initializes the store, and has access to the options passed to
|
|
266
286
|
* the middleware too.
|
|
267
287
|
*
|
|
288
|
+
* Called once during initialization.
|
|
289
|
+
*
|
|
290
|
+
* Errors / promise rejections will be caught and logged.
|
|
291
|
+
*
|
|
292
|
+
* Note that the result is not awaited - other store methods (such as increment) may be called before init returns and/or after it throws/rejects.
|
|
293
|
+
*
|
|
268
294
|
* @param options {Options} - The options used to setup the middleware.
|
|
269
295
|
*/
|
|
270
|
-
init?: (options: Options) => void
|
|
296
|
+
init?: (options: Options) => void | Promise<void>;
|
|
271
297
|
/**
|
|
272
298
|
* Method to fetch a client's hit count and reset time.
|
|
273
299
|
*
|
|
@@ -477,6 +503,10 @@ export type Options = {
|
|
|
477
503
|
* If the Store generates an error, allow the request to pass.
|
|
478
504
|
*/
|
|
479
505
|
passOnStoreError: boolean;
|
|
506
|
+
/**
|
|
507
|
+
* The logger to use to log errors. If absent, logs to the console.
|
|
508
|
+
*/
|
|
509
|
+
logger: Logger;
|
|
480
510
|
};
|
|
481
511
|
/**
|
|
482
512
|
* The extended request object that includes information about the client's
|
|
@@ -159,6 +159,26 @@ declare const validations: {
|
|
|
159
159
|
windowMs(windowMs: number): void;
|
|
160
160
|
};
|
|
161
161
|
export type Validations = typeof validations;
|
|
162
|
+
/**
|
|
163
|
+
* Basic logging function
|
|
164
|
+
*
|
|
165
|
+
* @param error {unknown} - The error to log
|
|
166
|
+
* @param message {string | undefined} - Additional details about the error
|
|
167
|
+
*/
|
|
168
|
+
export type LoggerFn = (error: unknown, message?: string) => void;
|
|
169
|
+
/**
|
|
170
|
+
* Minimal interface for logging warnings and errors
|
|
171
|
+
*/
|
|
172
|
+
export type Logger = {
|
|
173
|
+
/**
|
|
174
|
+
* Function to log an error
|
|
175
|
+
*/
|
|
176
|
+
error: LoggerFn;
|
|
177
|
+
/**
|
|
178
|
+
* Function to log a warning
|
|
179
|
+
*/
|
|
180
|
+
warn: LoggerFn;
|
|
181
|
+
};
|
|
162
182
|
/**
|
|
163
183
|
* Callback that fires when a client's hit counter is incremented.
|
|
164
184
|
*
|
|
@@ -265,9 +285,15 @@ export type Store = {
|
|
|
265
285
|
* Method that initializes the store, and has access to the options passed to
|
|
266
286
|
* the middleware too.
|
|
267
287
|
*
|
|
288
|
+
* Called once during initialization.
|
|
289
|
+
*
|
|
290
|
+
* Errors / promise rejections will be caught and logged.
|
|
291
|
+
*
|
|
292
|
+
* Note that the result is not awaited - other store methods (such as increment) may be called before init returns and/or after it throws/rejects.
|
|
293
|
+
*
|
|
268
294
|
* @param options {Options} - The options used to setup the middleware.
|
|
269
295
|
*/
|
|
270
|
-
init?: (options: Options) => void
|
|
296
|
+
init?: (options: Options) => void | Promise<void>;
|
|
271
297
|
/**
|
|
272
298
|
* Method to fetch a client's hit count and reset time.
|
|
273
299
|
*
|
|
@@ -477,6 +503,10 @@ export type Options = {
|
|
|
477
503
|
* If the Store generates an error, allow the request to pass.
|
|
478
504
|
*/
|
|
479
505
|
passOnStoreError: boolean;
|
|
506
|
+
/**
|
|
507
|
+
* The logger to use to log errors. If absent, logs to the console.
|
|
508
|
+
*/
|
|
509
|
+
logger: Logger;
|
|
480
510
|
};
|
|
481
511
|
/**
|
|
482
512
|
* The extended request object that includes information about the client's
|
|
@@ -172,6 +172,16 @@ var MemoryStore = class {
|
|
|
172
172
|
// source/rate-limit.ts
|
|
173
173
|
import { isIPv6 as isIPv62 } from "node:net";
|
|
174
174
|
|
|
175
|
+
// source/console-logger.ts
|
|
176
|
+
var ConsoleLogger = {
|
|
177
|
+
warn(...args) {
|
|
178
|
+
console.warn(...args.reverse());
|
|
179
|
+
},
|
|
180
|
+
error(...args) {
|
|
181
|
+
console.error(...args.reverse());
|
|
182
|
+
}
|
|
183
|
+
};
|
|
184
|
+
|
|
175
185
|
// source/headers.ts
|
|
176
186
|
import { Buffer } from "node:buffer";
|
|
177
187
|
import { createHash } from "node:crypto";
|
|
@@ -519,7 +529,8 @@ var validations = {
|
|
|
519
529
|
validate: true,
|
|
520
530
|
headers: true,
|
|
521
531
|
max: true,
|
|
522
|
-
passOnStoreError: true
|
|
532
|
+
passOnStoreError: true,
|
|
533
|
+
logger: true
|
|
523
534
|
};
|
|
524
535
|
const validOptions = Object.keys(optionsMap).concat(
|
|
525
536
|
"draft_polli_ratelimit_headers",
|
|
@@ -632,7 +643,15 @@ var validations = {
|
|
|
632
643
|
}
|
|
633
644
|
}
|
|
634
645
|
};
|
|
635
|
-
|
|
646
|
+
function validateLogger(logger) {
|
|
647
|
+
if (typeof logger !== "object" || typeof logger.error !== "function" || typeof logger.warn !== "function") {
|
|
648
|
+
throw new TypeError(
|
|
649
|
+
"Provided logger does not implement the Logger interface"
|
|
650
|
+
);
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
var getValidations = (_enabled, logger) => {
|
|
654
|
+
validateLogger(logger);
|
|
636
655
|
let enabled;
|
|
637
656
|
if (typeof _enabled === "boolean") {
|
|
638
657
|
enabled = {
|
|
@@ -658,8 +677,8 @@ var getValidations = (_enabled) => {
|
|
|
658
677
|
args
|
|
659
678
|
);
|
|
660
679
|
} catch (error) {
|
|
661
|
-
if (error instanceof ChangeWarning)
|
|
662
|
-
else
|
|
680
|
+
if (error instanceof ChangeWarning) logger.warn(error);
|
|
681
|
+
else logger.error(error);
|
|
663
682
|
}
|
|
664
683
|
};
|
|
665
684
|
}
|
|
@@ -712,7 +731,11 @@ var getOptionsFromConfig = (config) => {
|
|
|
712
731
|
};
|
|
713
732
|
var parseOptions = (passedOptions) => {
|
|
714
733
|
const notUndefinedOptions = omitUndefinedProperties(passedOptions);
|
|
715
|
-
const
|
|
734
|
+
const logger = passedOptions.logger ?? ConsoleLogger;
|
|
735
|
+
const validations2 = getValidations(
|
|
736
|
+
notUndefinedOptions?.validate ?? true,
|
|
737
|
+
logger
|
|
738
|
+
);
|
|
716
739
|
validations2.validationsConfig();
|
|
717
740
|
validations2.knownOptions(passedOptions);
|
|
718
741
|
validations2.draftPolliHeaders(
|
|
@@ -787,7 +810,8 @@ var parseOptions = (passedOptions) => {
|
|
|
787
810
|
notUndefinedOptions.store ?? new MemoryStore(validations2)
|
|
788
811
|
),
|
|
789
812
|
// Print an error to the console if a few known misconfigurations are detected.
|
|
790
|
-
validations: validations2
|
|
813
|
+
validations: validations2,
|
|
814
|
+
logger
|
|
791
815
|
};
|
|
792
816
|
if (typeof config.store.increment !== "function" || typeof config.store.decrement !== "function" || typeof config.store.resetKey !== "function" || config.store.resetAll !== void 0 && typeof config.store.resetAll !== "function" || config.store.init !== void 0 && typeof config.store.init !== "function") {
|
|
793
817
|
throw new TypeError(
|
|
@@ -808,7 +832,24 @@ var rateLimit = (passedOptions) => {
|
|
|
808
832
|
const options = getOptionsFromConfig(config);
|
|
809
833
|
config.validations.creationStack(config.store);
|
|
810
834
|
config.validations.unsharedStore(config.store);
|
|
811
|
-
if (typeof config.store.init === "function")
|
|
835
|
+
if (typeof config.store.init === "function") {
|
|
836
|
+
try {
|
|
837
|
+
const storeInit = config.store.init(options);
|
|
838
|
+
if (storeInit instanceof Promise) {
|
|
839
|
+
storeInit.catch(
|
|
840
|
+
(error) => config.logger.error(
|
|
841
|
+
error,
|
|
842
|
+
"express-rate-limit: async error during store initialization."
|
|
843
|
+
)
|
|
844
|
+
);
|
|
845
|
+
}
|
|
846
|
+
} catch (error) {
|
|
847
|
+
config.logger.error(
|
|
848
|
+
error,
|
|
849
|
+
"express-rate-limit: error during store initialization."
|
|
850
|
+
);
|
|
851
|
+
}
|
|
852
|
+
}
|
|
812
853
|
const middleware = handleAsyncErrors(
|
|
813
854
|
async (request, response, next) => {
|
|
814
855
|
const closePromise = config.skipFailedRequests && new Promise((resolve) => response.once("close", resolve));
|
|
@@ -829,9 +870,9 @@ var rateLimit = (passedOptions) => {
|
|
|
829
870
|
resetTime = incrementResult.resetTime;
|
|
830
871
|
} catch (error) {
|
|
831
872
|
if (config.passOnStoreError) {
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
error
|
|
873
|
+
config.logger.error(
|
|
874
|
+
error,
|
|
875
|
+
"express-rate-limit: error from store, allowing request without rate-limiting."
|
|
835
876
|
);
|
|
836
877
|
next();
|
|
837
878
|
return;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "express-rate-limit",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.5.1",
|
|
4
4
|
"description": "Basic IP rate-limiting middleware for Express. Use to limit repeated requests to public APIs and/or endpoints such as password reset.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Nathan Friedly",
|
|
@@ -70,11 +70,12 @@
|
|
|
70
70
|
"test:lib": "jest",
|
|
71
71
|
"test:ext": "cd test/external/ && bash run-all-tests",
|
|
72
72
|
"test": "run-s lint test:lib",
|
|
73
|
+
"format-test": "run-s format test:lib",
|
|
73
74
|
"pre-commit": "lint-staged",
|
|
74
75
|
"prepare": "run-s compile && husky"
|
|
75
76
|
},
|
|
76
77
|
"dependencies": {
|
|
77
|
-
"ip-address": "10.
|
|
78
|
+
"ip-address": "^10.2.0"
|
|
78
79
|
},
|
|
79
80
|
"peerDependencies": {
|
|
80
81
|
"express": ">= 4.11"
|
|
@@ -66,6 +66,7 @@ default values.
|
|
|
66
66
|
| [`skipFailedRequests`] | `boolean` | Uncount 4xx/5xx responses. |
|
|
67
67
|
| [`requestWasSuccessful`] | `function` | Used by `skipSuccessfulRequests` and `skipFailedRequests`. |
|
|
68
68
|
| [`validate`] | `boolean` \| `object` | Enable or disable built-in validation checks. |
|
|
69
|
+
| [`logger`] | `Logger` | Custom logger |
|
|
69
70
|
|
|
70
71
|
## Thank You
|
|
71
72
|
|
|
@@ -134,3 +135,5 @@ MIT © [Nathan Friedly](http://nfriedly.com/),
|
|
|
134
135
|
https://express-rate-limit.mintlify.app/reference/configuration#requestwassuccessful
|
|
135
136
|
[`validate`]:
|
|
136
137
|
https://express-rate-limit.mintlify.app/reference/configuration#validate
|
|
138
|
+
[`logger`]:
|
|
139
|
+
https://express-rate-limit.mintlify.app/reference/configuration#logger
|
|
@@ -1,28 +1,35 @@
|
|
|
1
1
|
/* IMPORT */
|
|
2
|
-
import {
|
|
2
|
+
import { getCodePointsLength, isFullWidth, isWideNotCJKTNotEmoji } from './utils.js';
|
|
3
3
|
/* HELPERS */
|
|
4
|
-
const ANSI_RE = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y;
|
|
4
|
+
const ANSI_RE = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y;
|
|
5
5
|
const CONTROL_RE = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y;
|
|
6
|
+
const CJKT_WIDE_RE = /(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/yu;
|
|
6
7
|
const TAB_RE = /\t{1,1000}/y;
|
|
7
8
|
const EMOJI_RE = /[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/yu;
|
|
8
9
|
const LATIN_RE = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y;
|
|
9
10
|
const MODIFIER_RE = /\p{M}+/gu;
|
|
10
11
|
const NO_TRUNCATION = { limit: Infinity, ellipsis: '' };
|
|
11
12
|
/* MAIN */
|
|
12
|
-
//TODO: Optimize matching non-latin letters
|
|
13
13
|
const getStringTruncatedWidth = (input, truncationOptions = {}, widthOptions = {}) => {
|
|
14
14
|
/* CONSTANTS */
|
|
15
15
|
const LIMIT = truncationOptions.limit ?? Infinity;
|
|
16
16
|
const ELLIPSIS = truncationOptions.ellipsis ?? '';
|
|
17
17
|
const ELLIPSIS_WIDTH = truncationOptions?.ellipsisWidth ?? (ELLIPSIS ? getStringTruncatedWidth(ELLIPSIS, NO_TRUNCATION, widthOptions).width : 0);
|
|
18
|
-
const ANSI_WIDTH =
|
|
18
|
+
const ANSI_WIDTH = 0;
|
|
19
19
|
const CONTROL_WIDTH = widthOptions.controlWidth ?? 0;
|
|
20
20
|
const TAB_WIDTH = widthOptions.tabWidth ?? 8;
|
|
21
|
-
const AMBIGUOUS_WIDTH = widthOptions.ambiguousWidth ?? 1;
|
|
22
21
|
const EMOJI_WIDTH = widthOptions.emojiWidth ?? 2;
|
|
23
|
-
const FULL_WIDTH_WIDTH =
|
|
22
|
+
const FULL_WIDTH_WIDTH = 2;
|
|
24
23
|
const REGULAR_WIDTH = widthOptions.regularWidth ?? 1;
|
|
25
|
-
const WIDE_WIDTH = widthOptions.wideWidth ??
|
|
24
|
+
const WIDE_WIDTH = widthOptions.wideWidth ?? FULL_WIDTH_WIDTH;
|
|
25
|
+
const PARSE_BLOCKS = [
|
|
26
|
+
[LATIN_RE, REGULAR_WIDTH],
|
|
27
|
+
[ANSI_RE, ANSI_WIDTH],
|
|
28
|
+
[CONTROL_RE, CONTROL_WIDTH],
|
|
29
|
+
[TAB_RE, TAB_WIDTH],
|
|
30
|
+
[EMOJI_RE, EMOJI_WIDTH],
|
|
31
|
+
[CJKT_WIDE_RE, WIDE_WIDTH],
|
|
32
|
+
];
|
|
26
33
|
/* STATE */
|
|
27
34
|
let indexPrev = 0;
|
|
28
35
|
let index = 0;
|
|
@@ -46,12 +53,9 @@ const getStringTruncatedWidth = (input, truncationOptions = {}, widthOptions = {
|
|
|
46
53
|
if (isFullWidth(codePoint)) {
|
|
47
54
|
widthExtra = FULL_WIDTH_WIDTH;
|
|
48
55
|
}
|
|
49
|
-
else if (
|
|
56
|
+
else if (isWideNotCJKTNotEmoji(codePoint)) {
|
|
50
57
|
widthExtra = WIDE_WIDTH;
|
|
51
58
|
}
|
|
52
|
-
else if (AMBIGUOUS_WIDTH !== REGULAR_WIDTH && isAmbiguous(codePoint)) {
|
|
53
|
-
widthExtra = AMBIGUOUS_WIDTH;
|
|
54
|
-
}
|
|
55
59
|
else {
|
|
56
60
|
widthExtra = REGULAR_WIDTH;
|
|
57
61
|
}
|
|
@@ -68,93 +72,29 @@ const getStringTruncatedWidth = (input, truncationOptions = {}, widthOptions = {
|
|
|
68
72
|
unmatchedStart = unmatchedEnd = 0;
|
|
69
73
|
}
|
|
70
74
|
/* EXITING */
|
|
71
|
-
if (index >= length)
|
|
72
|
-
break;
|
|
73
|
-
/* LATIN */
|
|
74
|
-
LATIN_RE.lastIndex = index;
|
|
75
|
-
if (LATIN_RE.test(input)) {
|
|
76
|
-
lengthExtra = LATIN_RE.lastIndex - index;
|
|
77
|
-
widthExtra = lengthExtra * REGULAR_WIDTH;
|
|
78
|
-
if ((width + widthExtra) > truncationLimit) {
|
|
79
|
-
truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / REGULAR_WIDTH));
|
|
80
|
-
}
|
|
81
|
-
if ((width + widthExtra) > LIMIT) {
|
|
82
|
-
truncationEnabled = true;
|
|
83
|
-
break;
|
|
84
|
-
}
|
|
85
|
-
width += widthExtra;
|
|
86
|
-
unmatchedStart = indexPrev;
|
|
87
|
-
unmatchedEnd = index;
|
|
88
|
-
index = indexPrev = LATIN_RE.lastIndex;
|
|
89
|
-
continue;
|
|
90
|
-
}
|
|
91
|
-
/* ANSI */
|
|
92
|
-
ANSI_RE.lastIndex = index;
|
|
93
|
-
if (ANSI_RE.test(input)) {
|
|
94
|
-
if ((width + ANSI_WIDTH) > truncationLimit) {
|
|
95
|
-
truncationIndex = Math.min(truncationIndex, index);
|
|
96
|
-
}
|
|
97
|
-
if ((width + ANSI_WIDTH) > LIMIT) {
|
|
98
|
-
truncationEnabled = true;
|
|
99
|
-
break;
|
|
100
|
-
}
|
|
101
|
-
width += ANSI_WIDTH;
|
|
102
|
-
unmatchedStart = indexPrev;
|
|
103
|
-
unmatchedEnd = index;
|
|
104
|
-
index = indexPrev = ANSI_RE.lastIndex;
|
|
105
|
-
continue;
|
|
106
|
-
}
|
|
107
|
-
/* CONTROL */
|
|
108
|
-
CONTROL_RE.lastIndex = index;
|
|
109
|
-
if (CONTROL_RE.test(input)) {
|
|
110
|
-
lengthExtra = CONTROL_RE.lastIndex - index;
|
|
111
|
-
widthExtra = lengthExtra * CONTROL_WIDTH;
|
|
112
|
-
if ((width + widthExtra) > truncationLimit) {
|
|
113
|
-
truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / CONTROL_WIDTH));
|
|
114
|
-
}
|
|
115
|
-
if ((width + widthExtra) > LIMIT) {
|
|
116
|
-
truncationEnabled = true;
|
|
117
|
-
break;
|
|
118
|
-
}
|
|
119
|
-
width += widthExtra;
|
|
120
|
-
unmatchedStart = indexPrev;
|
|
121
|
-
unmatchedEnd = index;
|
|
122
|
-
index = indexPrev = CONTROL_RE.lastIndex;
|
|
123
|
-
continue;
|
|
124
|
-
}
|
|
125
|
-
/* TAB */
|
|
126
|
-
TAB_RE.lastIndex = index;
|
|
127
|
-
if (TAB_RE.test(input)) {
|
|
128
|
-
lengthExtra = TAB_RE.lastIndex - index;
|
|
129
|
-
widthExtra = lengthExtra * TAB_WIDTH;
|
|
130
|
-
if ((width + widthExtra) > truncationLimit) {
|
|
131
|
-
truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / TAB_WIDTH));
|
|
132
|
-
}
|
|
133
|
-
if ((width + widthExtra) > LIMIT) {
|
|
134
|
-
truncationEnabled = true;
|
|
135
|
-
break;
|
|
136
|
-
}
|
|
137
|
-
width += widthExtra;
|
|
138
|
-
unmatchedStart = indexPrev;
|
|
139
|
-
unmatchedEnd = index;
|
|
140
|
-
index = indexPrev = TAB_RE.lastIndex;
|
|
141
|
-
continue;
|
|
75
|
+
if (index >= length) {
|
|
76
|
+
break outer;
|
|
142
77
|
}
|
|
143
|
-
/*
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
78
|
+
/* PARSE BLOCKS */
|
|
79
|
+
for (let i = 0, l = PARSE_BLOCKS.length; i < l; i++) {
|
|
80
|
+
const [BLOCK_RE, BLOCK_WIDTH] = PARSE_BLOCKS[i];
|
|
81
|
+
BLOCK_RE.lastIndex = index;
|
|
82
|
+
if (BLOCK_RE.test(input)) {
|
|
83
|
+
lengthExtra = BLOCK_RE === CJKT_WIDE_RE ? getCodePointsLength(input.slice(index, BLOCK_RE.lastIndex)) : BLOCK_RE === EMOJI_RE ? 1 : BLOCK_RE.lastIndex - index;
|
|
84
|
+
widthExtra = lengthExtra * BLOCK_WIDTH;
|
|
85
|
+
if ((width + widthExtra) > truncationLimit) {
|
|
86
|
+
truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / BLOCK_WIDTH));
|
|
87
|
+
}
|
|
88
|
+
if ((width + widthExtra) > LIMIT) {
|
|
89
|
+
truncationEnabled = true;
|
|
90
|
+
break outer;
|
|
91
|
+
}
|
|
92
|
+
width += widthExtra;
|
|
93
|
+
unmatchedStart = indexPrev;
|
|
94
|
+
unmatchedEnd = index;
|
|
95
|
+
index = indexPrev = BLOCK_RE.lastIndex;
|
|
96
|
+
continue outer;
|
|
152
97
|
}
|
|
153
|
-
width += EMOJI_WIDTH;
|
|
154
|
-
unmatchedStart = indexPrev;
|
|
155
|
-
unmatchedEnd = index;
|
|
156
|
-
index = indexPrev = EMOJI_RE.lastIndex;
|
|
157
|
-
continue;
|
|
158
98
|
}
|
|
159
99
|
/* UNMATCHED INDEX */
|
|
160
100
|
index += 1;
|
|
@@ -4,12 +4,9 @@ type TruncationOptions = {
|
|
|
4
4
|
ellipsisWidth?: number;
|
|
5
5
|
};
|
|
6
6
|
type WidthOptions = {
|
|
7
|
-
ansiWidth?: number;
|
|
8
7
|
controlWidth?: number;
|
|
9
8
|
tabWidth?: number;
|
|
10
|
-
ambiguousWidth?: number;
|
|
11
9
|
emojiWidth?: number;
|
|
12
|
-
fullWidthWidth?: number;
|
|
13
10
|
regularWidth?: number;
|
|
14
11
|
wideWidth?: number;
|
|
15
12
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
declare const getCodePointsLength: (input: string) => number;
|
|
2
2
|
declare const isFullWidth: (x: number) => boolean;
|
|
3
|
-
declare const
|
|
4
|
-
export {
|
|
3
|
+
declare const isWideNotCJKTNotEmoji: (x: number) => boolean;
|
|
4
|
+
export { getCodePointsLength, isFullWidth, isWideNotCJKTNotEmoji };
|