@bastani/atomic 0.9.18-alpha.4 → 0.9.18-alpha.6
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/CHANGELOG.md +115 -0
- package/README.md +3 -3
- package/dist/builtin/intercom/CHANGELOG.md +41 -0
- package/dist/builtin/intercom/README.md +18 -3
- package/dist/builtin/intercom/broker/broker.ts +670 -127
- package/dist/builtin/intercom/broker/client.ts +149 -35
- package/dist/builtin/intercom/broker/delivered-message-cache.ts +497 -37
- package/dist/builtin/intercom/broker/framing.ts +4 -2
- package/dist/builtin/intercom/broker/paths.ts +10 -0
- package/dist/builtin/intercom/broker/pending-send-registry.ts +1 -2
- package/dist/builtin/intercom/broker/send-handler.ts +311 -52
- package/dist/builtin/intercom/broker/send-signature.ts +4 -2
- package/dist/builtin/intercom/broker/socket-writes.ts +103 -0
- package/dist/builtin/intercom/broker/spawn.ts +9 -4
- package/dist/builtin/intercom/index.bundle.mjs +1419 -213
- package/dist/builtin/intercom/package.json +2 -2
- package/dist/builtin/intercom/recoverable-disconnect.ts +52 -0
- package/dist/builtin/intercom/retry-policy.ts +8 -0
- package/dist/builtin/intercom/skills/intercom/SKILL.md +17 -9
- package/dist/builtin/intercom/types.ts +25 -8
- package/dist/builtin/intercom/workflow-stage-path-matching.ts +90 -0
- package/dist/builtin/intercom/workflow-stage-target.ts +57 -0
- package/dist/builtin/mcp/index.bundle.mjs +427 -126
- package/dist/builtin/mcp/package.json +2 -2
- package/dist/builtin/subagents/CHANGELOG.md +19 -0
- package/dist/builtin/subagents/README.md +3 -3
- package/dist/builtin/subagents/agents/code-simplifier.md +2 -2
- package/dist/builtin/subagents/agents/codebase-analyzer.md +2 -2
- package/dist/builtin/subagents/agents/codebase-locator.md +2 -2
- package/dist/builtin/subagents/agents/codebase-online-researcher.md +11 -11
- package/dist/builtin/subagents/agents/codebase-pattern-finder.md +2 -2
- package/dist/builtin/subagents/agents/codebase-research-analyzer.md +2 -2
- package/dist/builtin/subagents/agents/codebase-research-locator.md +2 -2
- package/dist/builtin/subagents/agents/debugger.md +3 -3
- package/dist/builtin/subagents/agents/worker.md +2 -2
- package/dist/builtin/subagents/package.json +3 -3
- package/dist/builtin/subagents/skills/qlty/SKILL.md +29 -101
- package/dist/builtin/subagents/skills/qlty/references/manual-configuration.md +52 -0
- package/dist/builtin/subagents/skills/subagent/SKILL.md +11 -11
- package/dist/builtin/subagents/src/extension/index.bundle.mjs +49 -132
- package/dist/builtin/web-access/package.json +2 -2
- package/dist/builtin/workflows/CHANGELOG.md +44 -0
- package/dist/builtin/workflows/README.md +7 -7
- package/dist/builtin/workflows/builtin/adversarial-verification.js +2 -2
- package/dist/builtin/workflows/builtin/{chunk-szz1ajz9.js → chunk-42s7sw0b.js} +9 -2
- package/dist/builtin/workflows/builtin/{chunk-2dqb5s2q.js → chunk-79fjkcvh.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-n58a7v26.js → chunk-b0v2xab1.js} +181 -10
- package/dist/builtin/workflows/builtin/{chunk-fghhy2a5.js → chunk-ed4jfn5t.js} +23 -5
- package/dist/builtin/workflows/builtin/{chunk-h3r2vkzc.js → chunk-hqpe2cyx.js} +60 -21
- package/dist/builtin/workflows/builtin/{chunk-hzzn6adg.js → chunk-k3w87x8y.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-82ha8p41.js → chunk-n8h4yyew.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-qwzvgxnq.js → chunk-reqr3sr3.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-c53y8bdh.js → chunk-wgccch41.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-0x6e303p.js → chunk-zbekjqew.js} +20 -7
- package/dist/builtin/workflows/builtin/{chunk-29wrp38a.js → chunk-ze5x3d1r.js} +1 -1
- package/dist/builtin/workflows/builtin/classify-and-act.js +2 -2
- package/dist/builtin/workflows/builtin/fan-out-and-synthesize.js +2 -2
- package/dist/builtin/workflows/builtin/generate-and-filter.js +2 -2
- package/dist/builtin/workflows/builtin/goal.js +3 -3
- package/dist/builtin/workflows/builtin/index.js +11 -11
- package/dist/builtin/workflows/builtin/loop-until-done.js +2 -2
- package/dist/builtin/workflows/builtin/open-claude-design.js +2 -2
- package/dist/builtin/workflows/builtin/ralph.js +3 -3
- package/dist/builtin/workflows/builtin/steering-context.js +1 -1
- package/dist/builtin/workflows/builtin/tournament.js +2 -2
- package/dist/builtin/workflows/package.json +2 -2
- package/dist/builtin/workflows/skills/prompt-engineer/SKILL.md +39 -52
- package/dist/builtin/workflows/skills/prompt-engineer/references/advanced_patterns.md +9 -37
- package/dist/builtin/workflows/skills/prompt-engineer/references/claude_fable_5.md +49 -0
- package/dist/builtin/workflows/skills/prompt-engineer/references/claude_fable_5_1.md +57 -0
- package/dist/builtin/workflows/skills/prompt-engineer/references/claude_opus_4_8.md +57 -0
- package/dist/builtin/workflows/skills/prompt-engineer/references/claude_opus_5.md +47 -0
- package/dist/builtin/workflows/skills/prompt-engineer/references/claude_sonnet_5.md +57 -0
- package/dist/builtin/workflows/skills/prompt-engineer/references/gpt_5_5.md +60 -0
- package/dist/builtin/workflows/skills/prompt-engineer/references/gpt_5_6.md +58 -0
- package/dist/builtin/workflows/skills/prompt-engineer/references/gpt_6_astra.md +58 -0
- package/dist/builtin/workflows/skills/prompt-engineer/references/quality_improvement.md +18 -4
- package/dist/builtin/workflows/src/extension/index.bundle.mjs +3194 -737
- package/dist/builtin/workflows/src/index.js +899 -436
- package/dist/builtin/workflows/src/shared/authoring-contract-stage.d.ts +0 -10
- package/dist/cli/list-models.d.ts.map +1 -1
- package/dist/cli/list-models.js +4 -0
- package/dist/cli/list-models.js.map +1 -1
- package/dist/client/index.d.ts +1 -2
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +1 -2
- package/dist/client/index.js.map +1 -1
- package/dist/config.d.ts +0 -9
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +0 -45
- package/dist/config.js.map +1 -1
- package/dist/core/agent-session-compaction.d.ts.map +1 -1
- package/dist/core/agent-session-compaction.js +8 -6
- package/dist/core/agent-session-compaction.js.map +1 -1
- package/dist/core/agent-session-methods.d.ts +1 -0
- package/dist/core/agent-session-methods.d.ts.map +1 -1
- package/dist/core/agent-session-methods.js.map +1 -1
- package/dist/core/agent-session-models.d.ts.map +1 -1
- package/dist/core/agent-session-models.js +3 -4
- package/dist/core/agent-session-models.js.map +1 -1
- package/dist/core/agent-session-queue-pause.d.ts.map +1 -1
- package/dist/core/agent-session-queue-pause.js +6 -0
- package/dist/core/agent-session-queue-pause.js.map +1 -1
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js +15 -7
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session-tool-hooks.js +1 -1
- package/dist/core/agent-session-tool-hooks.js.map +1 -1
- package/dist/core/agent-session-tree.d.ts.map +1 -1
- package/dist/core/agent-session-tree.js +8 -0
- package/dist/core/agent-session-tree.js.map +1 -1
- package/dist/core/agent-session.d.ts +2 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +2 -0
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/anthropic-thinking-guard.d.ts.map +1 -1
- package/dist/core/anthropic-thinking-guard.js +71 -5
- package/dist/core/anthropic-thinking-guard.js.map +1 -1
- package/dist/core/compaction/branch-summarization.d.ts +2 -2
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/dist/core/compaction/branch-summarization.js +4 -4
- package/dist/core/compaction/branch-summarization.js.map +1 -1
- package/dist/core/extensions/api-types.d.ts +8 -2
- package/dist/core/extensions/api-types.d.ts.map +1 -1
- package/dist/core/extensions/api-types.js.map +1 -1
- package/dist/core/extensions/context-types.d.ts +12 -0
- package/dist/core/extensions/context-types.d.ts.map +1 -1
- package/dist/core/extensions/context-types.js.map +1 -1
- package/dist/core/extensions/provider-types.d.ts +2 -2
- package/dist/core/extensions/provider-types.d.ts.map +1 -1
- package/dist/core/extensions/provider-types.js.map +1 -1
- package/dist/core/extensions/runner-shortcuts.d.ts.map +1 -1
- package/dist/core/extensions/runner-shortcuts.js +0 -1
- package/dist/core/extensions/runner-shortcuts.js.map +1 -1
- package/dist/core/fast-model-routing-transport.d.ts +12 -0
- package/dist/core/fast-model-routing-transport.d.ts.map +1 -0
- package/dist/core/{codex-fast-mode-transport.js → fast-model-routing-transport.js} +29 -29
- package/dist/core/fast-model-routing-transport.js.map +1 -0
- package/dist/core/fast-model-routing.d.ts +57 -0
- package/dist/core/fast-model-routing.d.ts.map +1 -0
- package/dist/core/fast-model-routing.js +201 -0
- package/dist/core/fast-model-routing.js.map +1 -0
- package/dist/core/fast-model-variants.d.ts +98 -0
- package/dist/core/fast-model-variants.d.ts.map +1 -0
- package/dist/core/fast-model-variants.js +148 -0
- package/dist/core/fast-model-variants.js.map +1 -0
- package/dist/core/http-dispatcher.d.ts.map +1 -1
- package/dist/core/http-dispatcher.js +4 -2
- package/dist/core/http-dispatcher.js.map +1 -1
- package/dist/core/keybindings.d.ts +0 -10
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/keybindings.js +0 -8
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/messages.d.ts +1 -1
- package/dist/core/messages.d.ts.map +1 -1
- package/dist/core/messages.js.map +1 -1
- package/dist/core/model-config.d.ts +24 -4
- package/dist/core/model-config.d.ts.map +1 -1
- package/dist/core/model-config.js +6 -2
- package/dist/core/model-config.js.map +1 -1
- package/dist/core/model-resolver-initial.js +1 -1
- package/dist/core/model-resolver-initial.js.map +1 -1
- package/dist/core/model-runtime-streaming.d.ts +14 -1
- package/dist/core/model-runtime-streaming.d.ts.map +1 -1
- package/dist/core/model-runtime-streaming.js +25 -3
- package/dist/core/model-runtime-streaming.js.map +1 -1
- package/dist/core/model-runtime.d.ts +39 -2
- package/dist/core/model-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js +91 -7
- package/dist/core/model-runtime.js.map +1 -1
- package/dist/core/provider-composer-internal.d.ts +1 -1
- package/dist/core/provider-composer-internal.d.ts.map +1 -1
- package/dist/core/provider-composer-internal.js +8 -2
- package/dist/core/provider-composer-internal.js.map +1 -1
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +21 -18
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-manager-archive.d.ts.map +1 -1
- package/dist/core/session-manager-archive.js +25 -2
- package/dist/core/session-manager-archive.js.map +1 -1
- package/dist/core/settings-manager-core.d.ts +0 -2
- package/dist/core/settings-manager-core.d.ts.map +1 -1
- package/dist/core/settings-manager-core.js +2 -9
- package/dist/core/settings-manager-core.js.map +1 -1
- package/dist/core/settings-manager-internals.d.ts +0 -1
- package/dist/core/settings-manager-internals.d.ts.map +1 -1
- package/dist/core/settings-manager-internals.js.map +1 -1
- package/dist/core/settings-manager-ui-accessors.d.ts +0 -8
- package/dist/core/settings-manager-ui-accessors.d.ts.map +1 -1
- package/dist/core/settings-manager-ui-accessors.js +0 -53
- package/dist/core/settings-manager-ui-accessors.js.map +1 -1
- package/dist/core/settings-manager.d.ts +1 -1
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/settings-types.d.ts +0 -5
- package/dist/core/settings-types.d.ts.map +1 -1
- package/dist/core/settings-types.js.map +1 -1
- package/dist/core/skills.d.ts +1 -1
- package/dist/core/skills.d.ts.map +1 -1
- package/dist/core/skills.js +4 -2
- package/dist/core/skills.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +0 -1
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/system-prompt.js +7 -7
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +10 -7
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/edit.d.ts +1 -1
- package/dist/core/tools/edit.d.ts.map +1 -1
- package/dist/core/tools/edit.js +153 -8
- package/dist/core/tools/edit.js.map +1 -1
- package/dist/core/tools/find.d.ts.map +1 -1
- package/dist/core/tools/find.js +9 -8
- package/dist/core/tools/find.js.map +1 -1
- package/dist/core/tools/grep.d.ts.map +1 -1
- package/dist/core/tools/grep.js +4 -3
- package/dist/core/tools/grep.js.map +1 -1
- package/dist/core/tools/hashline.d.ts +2 -2
- package/dist/core/tools/hashline.d.ts.map +1 -1
- package/dist/core/tools/hashline.js +40 -10
- package/dist/core/tools/hashline.js.map +1 -1
- package/dist/core/tools/ls.d.ts.map +1 -1
- package/dist/core/tools/ls.js +2 -2
- package/dist/core/tools/ls.js.map +1 -1
- package/dist/core/tools/read.d.ts.map +1 -1
- package/dist/core/tools/read.js +12 -11
- package/dist/core/tools/read.js.map +1 -1
- package/dist/core/tools/search.d.ts.map +1 -1
- package/dist/core/tools/search.js +20 -19
- package/dist/core/tools/search.js.map +1 -1
- package/dist/core/tools/write.d.ts.map +1 -1
- package/dist/core/tools/write.js +22 -21
- package/dist/core/tools/write.js.map +1 -1
- package/dist/core/workflow-stage-admission.d.ts +6 -0
- package/dist/core/workflow-stage-admission.d.ts.map +1 -1
- package/dist/core/workflow-stage-admission.js +14 -0
- package/dist/core/workflow-stage-admission.js.map +1 -1
- package/dist/index-extensions.d.ts +1 -1
- package/dist/index-extensions.d.ts.map +1 -1
- package/dist/index-extensions.js.map +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -5
- package/dist/index.js.map +1 -1
- package/dist/modes/interactive/components/atomic-working-status.d.ts +4 -0
- package/dist/modes/interactive/components/atomic-working-status.d.ts.map +1 -1
- package/dist/modes/interactive/components/atomic-working-status.js +26 -1
- package/dist/modes/interactive/components/atomic-working-status.js.map +1 -1
- package/dist/modes/interactive/components/custom-editor.d.ts +7 -0
- package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-editor.js +43 -0
- package/dist/modes/interactive/components/custom-editor.js.map +1 -1
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +0 -6
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/components/index.d.ts +1 -2
- package/dist/modes/interactive/components/index.d.ts.map +1 -1
- package/dist/modes/interactive/components/index.js +0 -1
- package/dist/modes/interactive/components/index.js.map +1 -1
- package/dist/modes/interactive/components/model-selector.d.ts +1 -1
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-selector.js +12 -25
- package/dist/modes/interactive/components/model-selector.js.map +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.d.ts +2 -5
- package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.js +16 -34
- package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector-items.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector-items.js +10 -5
- package/dist/modes/interactive/components/settings-selector-items.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector-submenus.d.ts +1 -1
- package/dist/modes/interactive/components/settings-selector-submenus.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector-submenus.js +10 -7
- package/dist/modes/interactive/components/settings-selector-submenus.js.map +1 -1
- package/dist/modes/interactive/components/thinking-selector.d.ts +1 -2
- package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/thinking-selector.js +6 -13
- package/dist/modes/interactive/components/thinking-selector.js.map +1 -1
- package/dist/modes/interactive/components/transcript-follow-indicator.js +3 -3
- package/dist/modes/interactive/components/transcript-follow-indicator.js.map +1 -1
- package/dist/modes/interactive/components/trust-selector.js +2 -2
- package/dist/modes/interactive/components/trust-selector.js.map +1 -1
- package/dist/modes/interactive/interactive-agent-events.js +8 -8
- package/dist/modes/interactive/interactive-agent-events.js.map +1 -1
- package/dist/modes/interactive/interactive-autocomplete.js +5 -16
- package/dist/modes/interactive/interactive-autocomplete.js.map +1 -1
- package/dist/modes/interactive/interactive-bash-compact.js +2 -9
- package/dist/modes/interactive/interactive-bash-compact.js.map +1 -1
- package/dist/modes/interactive/interactive-deferred-startup.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-deferred-startup.js +3 -0
- package/dist/modes/interactive/interactive-deferred-startup.js.map +1 -1
- package/dist/modes/interactive/interactive-editor-actions.js +2 -2
- package/dist/modes/interactive/interactive-editor-actions.js.map +1 -1
- package/dist/modes/interactive/interactive-extension-custom-ui.js +1 -0
- package/dist/modes/interactive/interactive-extension-custom-ui.js.map +1 -1
- package/dist/modes/interactive/interactive-extension-dialogs.js +7 -0
- package/dist/modes/interactive/interactive-extension-dialogs.js.map +1 -1
- package/dist/modes/interactive/interactive-extension-runtime.js +20 -10
- package/dist/modes/interactive/interactive-extension-runtime.js.map +1 -1
- package/dist/modes/interactive/interactive-hotkeys-debug.js +1 -5
- package/dist/modes/interactive/interactive-hotkeys-debug.js.map +1 -1
- package/dist/modes/interactive/interactive-initial-session-binding.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-initial-session-binding.js +3 -0
- package/dist/modes/interactive/interactive-initial-session-binding.js.map +1 -1
- package/dist/modes/interactive/interactive-input-handling.js +0 -8
- package/dist/modes/interactive/interactive-input-handling.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-base.d.ts +5 -1
- package/dist/modes/interactive/interactive-mode-base.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode-base.js +15 -9
- package/dist/modes/interactive/interactive-mode-base.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-deps.d.ts +1 -3
- package/dist/modes/interactive/interactive-mode-deps.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode-deps.js +1 -3
- package/dist/modes/interactive/interactive-mode-deps.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-surface.d.ts +9 -12
- package/dist/modes/interactive/interactive-mode-surface.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode-surface.js.map +1 -1
- package/dist/modes/interactive/interactive-model-routing.js +10 -13
- package/dist/modes/interactive/interactive-model-routing.js.map +1 -1
- package/dist/modes/interactive/interactive-render-chat.js +29 -0
- package/dist/modes/interactive/interactive-render-chat.js.map +1 -1
- package/dist/modes/interactive/interactive-selectors.js +2 -32
- package/dist/modes/interactive/interactive-selectors.js.map +1 -1
- package/dist/modes/interactive/interactive-session-routing.js +1 -5
- package/dist/modes/interactive/interactive-session-routing.js.map +1 -1
- package/dist/modes/interactive/interactive-session-runtime.js +1 -5
- package/dist/modes/interactive/interactive-session-runtime.js.map +1 -1
- package/dist/modes/interactive/interactive-slash-commands.js +6 -13
- package/dist/modes/interactive/interactive-slash-commands.js.map +1 -1
- package/dist/modes/interactive/interactive-startup.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-startup.js +19 -13
- package/dist/modes/interactive/interactive-startup.js.map +1 -1
- package/dist/modes/interactive/interactive-tui.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-tui.js +27 -3
- package/dist/modes/interactive/interactive-tui.js.map +1 -1
- package/dist/modes/interactive-engine/engine-custom-ui.d.ts.map +1 -1
- package/dist/modes/interactive-engine/engine-custom-ui.js +1 -0
- package/dist/modes/interactive-engine/engine-custom-ui.js.map +1 -1
- package/dist/modes/interactive-engine/isolated-runtime.d.ts.map +1 -1
- package/dist/modes/interactive-engine/isolated-runtime.js +4 -1
- package/dist/modes/interactive-engine/isolated-runtime.js.map +1 -1
- package/dist/utils/child-process.d.ts.map +1 -1
- package/dist/utils/child-process.js +13 -6
- package/dist/utils/child-process.js.map +1 -1
- package/dist/utils/exif-orientation.d.ts.map +1 -1
- package/dist/utils/exif-orientation.js +2 -3
- package/dist/utils/exif-orientation.js.map +1 -1
- package/dist/utils/tools-manager.d.ts +1 -0
- package/dist/utils/tools-manager.d.ts.map +1 -1
- package/dist/utils/tools-manager.js +33 -18
- package/dist/utils/tools-manager.js.map +1 -1
- package/docs/compaction.md +2 -0
- package/docs/custom-provider.md +4 -1
- package/docs/docs.json +14 -2
- package/docs/extensions.md +11 -4
- package/docs/intercom.md +33 -8
- package/docs/keybindings.md +8 -6
- package/docs/models/evals.md +394 -0
- package/docs/models/model-selection.md +60 -25
- package/docs/models/pareto-efficiency.md +33 -15
- package/docs/models.md +80 -1
- package/docs/packages.md +2 -2
- package/docs/providers.md +44 -20
- package/docs/quickstart.md +8 -6
- package/docs/rpc.md +3 -3
- package/docs/sdk.md +2 -16
- package/docs/settings.md +19 -22
- package/docs/skills.md +4 -2
- package/docs/subagents.md +9 -3
- package/docs/terminal-setup.md +15 -0
- package/docs/tools/edit.md +373 -0
- package/docs/tools.md +3 -7
- package/docs/tui.md +2 -1
- package/docs/usage.md +3 -5
- package/docs/workflows/api-reference.md +1395 -0
- package/docs/workflows/authoring.md +678 -0
- package/docs/workflows/builtins.md +245 -0
- package/docs/workflows/operations.md +811 -0
- package/docs/workflows/reliable-design.md +2099 -0
- package/docs/workflows/verification.md +62 -0
- package/docs/workflows.md +15 -5183
- package/npm-shrinkwrap.json +584 -69
- package/package.json +7 -7
- package/dist/client/remote-session.d.ts +0 -64
- package/dist/client/remote-session.d.ts.map +0 -1
- package/dist/client/remote-session.js +0 -351
- package/dist/client/remote-session.js.map +0 -1
- package/dist/client/transcript.d.ts +0 -12
- package/dist/client/transcript.d.ts.map +0 -1
- package/dist/client/transcript.js +0 -98
- package/dist/client/transcript.js.map +0 -1
- package/dist/core/codex-fast-mode-transport.d.ts +0 -12
- package/dist/core/codex-fast-mode-transport.d.ts.map +0 -1
- package/dist/core/codex-fast-mode-transport.js.map +0 -1
- package/dist/core/codex-fast-mode.d.ts +0 -53
- package/dist/core/codex-fast-mode.d.ts.map +0 -1
- package/dist/core/codex-fast-mode.js +0 -249
- package/dist/core/codex-fast-mode.js.map +0 -1
- package/dist/modes/interactive/components/fast-mode-selector.d.ts +0 -27
- package/dist/modes/interactive/components/fast-mode-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/fast-mode-selector.js +0 -107
- package/dist/modes/interactive/components/fast-mode-selector.js.map +0 -1
- package/dist/server/create-harness.d.ts +0 -53
- package/dist/server/create-harness.d.ts.map +0 -1
- package/dist/server/create-harness.js +0 -360
- package/dist/server/create-harness.js.map +0 -1
- package/docs/models/artificial-analysis-index.md +0 -83
|
@@ -21978,9 +21978,28 @@ var require_data = __commonJS(function(exports, module) {
|
|
|
21978
21978
|
var require_utils = __commonJS(function(exports, module) {
|
|
21979
21979
|
var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
|
|
21980
21980
|
var isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);
|
|
21981
|
+
var isPort = RegExp.prototype.test.bind(/^\d*$/u);
|
|
21981
21982
|
var isHexPair = RegExp.prototype.test.bind(/^[\da-f]{2}$/iu);
|
|
21982
21983
|
var isUnreserved = RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu);
|
|
21983
|
-
var isPathCharacter = RegExp.prototype.test.bind(/^[
|
|
21984
|
+
var isPathCharacter = RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/]$/u);
|
|
21985
|
+
var isQueryFragmentCharacter = RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/?]$/u);
|
|
21986
|
+
var isUserinfoCharacter = RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:]$/u);
|
|
21987
|
+
var BYTE_HEX = new Array(256);
|
|
21988
|
+
{
|
|
21989
|
+
const HEX_DIGITS = "0123456789ABCDEF";
|
|
21990
|
+
for (let i2 = 0;i2 < 256; i2++) {
|
|
21991
|
+
BYTE_HEX[i2] = "%" + HEX_DIGITS[i2 >> 4] + HEX_DIGITS[i2 & 15];
|
|
21992
|
+
}
|
|
21993
|
+
}
|
|
21994
|
+
function percentEncodeNonAscii(cp) {
|
|
21995
|
+
if (cp < 2048) {
|
|
21996
|
+
return BYTE_HEX[192 | cp >> 6] + BYTE_HEX[128 | cp & 63];
|
|
21997
|
+
}
|
|
21998
|
+
if (cp < 65536) {
|
|
21999
|
+
return BYTE_HEX[224 | cp >> 12] + BYTE_HEX[128 | cp >> 6 & 63] + BYTE_HEX[128 | cp & 63];
|
|
22000
|
+
}
|
|
22001
|
+
return BYTE_HEX[240 | cp >> 18] + BYTE_HEX[128 | cp >> 12 & 63] + BYTE_HEX[128 | cp >> 6 & 63] + BYTE_HEX[128 | cp & 63];
|
|
22002
|
+
}
|
|
21984
22003
|
function stringArrayToHexStripped(input) {
|
|
21985
22004
|
let acc = "";
|
|
21986
22005
|
let code = 0;
|
|
@@ -22005,91 +22024,122 @@ var require_utils = __commonJS(function(exports, module) {
|
|
|
22005
22024
|
}
|
|
22006
22025
|
return acc;
|
|
22007
22026
|
}
|
|
22027
|
+
var isHextet = RegExp.prototype.test.bind(/^[\dA-Fa-f]{1,4}$/);
|
|
22028
|
+
var isIPvFuture = RegExp.prototype.test.bind(/^[vV][\dA-Fa-f]+\.[A-Za-z\d\-._~!$&'()*+,;=:]+$/);
|
|
22029
|
+
var isZoneCharacter = RegExp.prototype.test.bind(/^[A-Za-z\d\-._~]$/);
|
|
22008
22030
|
var nonSimpleDomain = RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);
|
|
22009
|
-
function
|
|
22010
|
-
|
|
22011
|
-
|
|
22012
|
-
|
|
22013
|
-
|
|
22014
|
-
|
|
22015
|
-
|
|
22016
|
-
|
|
22017
|
-
|
|
22018
|
-
} else {
|
|
22019
|
-
output.error = true;
|
|
22020
|
-
return false;
|
|
22031
|
+
function isZoneIdentifier(zone) {
|
|
22032
|
+
if (zone.length === 0)
|
|
22033
|
+
return false;
|
|
22034
|
+
for (let i2 = 0;i2 < zone.length; i2++) {
|
|
22035
|
+
if (isZoneCharacter(zone[i2]))
|
|
22036
|
+
continue;
|
|
22037
|
+
if (zone[i2] === "%" && i2 + 2 < zone.length && isHexPair(zone.slice(i2 + 1, i2 + 3))) {
|
|
22038
|
+
i2 += 2;
|
|
22039
|
+
continue;
|
|
22021
22040
|
}
|
|
22022
|
-
|
|
22041
|
+
return false;
|
|
22023
22042
|
}
|
|
22024
22043
|
return true;
|
|
22025
22044
|
}
|
|
22026
|
-
function
|
|
22027
|
-
let
|
|
22028
|
-
|
|
22029
|
-
|
|
22030
|
-
|
|
22031
|
-
let
|
|
22032
|
-
|
|
22033
|
-
|
|
22034
|
-
|
|
22035
|
-
|
|
22036
|
-
|
|
22037
|
-
|
|
22038
|
-
|
|
22039
|
-
if (cursor === ":") {
|
|
22040
|
-
if (endipv6Encountered === true) {
|
|
22041
|
-
endIpv6 = true;
|
|
22042
|
-
}
|
|
22043
|
-
if (!consume(buffer, address, output)) {
|
|
22044
|
-
break;
|
|
22045
|
-
}
|
|
22046
|
-
if (++tokenCount > 7) {
|
|
22047
|
-
output.error = true;
|
|
22048
|
-
break;
|
|
22049
|
-
}
|
|
22050
|
-
if (i2 > 0 && input[i2 - 1] === ":") {
|
|
22051
|
-
endipv6Encountered = true;
|
|
22052
|
-
}
|
|
22053
|
-
address.push(":");
|
|
22054
|
-
continue;
|
|
22055
|
-
} else if (cursor === "%") {
|
|
22056
|
-
if (!consume(buffer, address, output)) {
|
|
22057
|
-
break;
|
|
22045
|
+
function compressIPv6ZeroRun(hextets) {
|
|
22046
|
+
let bestStart = -1;
|
|
22047
|
+
let bestLength = 0;
|
|
22048
|
+
let runStart = -1;
|
|
22049
|
+
let runLength = 0;
|
|
22050
|
+
for (let i2 = 0;i2 < hextets.length; i2++) {
|
|
22051
|
+
if (hextets[i2] === "0") {
|
|
22052
|
+
if (runStart === -1)
|
|
22053
|
+
runStart = i2;
|
|
22054
|
+
runLength++;
|
|
22055
|
+
if (runLength > bestLength) {
|
|
22056
|
+
bestLength = runLength;
|
|
22057
|
+
bestStart = runStart;
|
|
22058
22058
|
}
|
|
22059
|
-
consume = consumeIsZone;
|
|
22060
22059
|
} else {
|
|
22061
|
-
|
|
22062
|
-
|
|
22060
|
+
runStart = -1;
|
|
22061
|
+
runLength = 0;
|
|
22063
22062
|
}
|
|
22064
22063
|
}
|
|
22065
|
-
if (
|
|
22066
|
-
|
|
22067
|
-
|
|
22068
|
-
|
|
22069
|
-
|
|
22070
|
-
|
|
22071
|
-
|
|
22064
|
+
if (bestLength < 2)
|
|
22065
|
+
return hextets.join(":");
|
|
22066
|
+
const head = hextets.slice(0, bestStart).join(":");
|
|
22067
|
+
const tail = hextets.slice(bestStart + bestLength).join(":");
|
|
22068
|
+
return head + "::" + tail;
|
|
22069
|
+
}
|
|
22070
|
+
function normalizeIPv6Address(input) {
|
|
22071
|
+
const compression = input.indexOf("::");
|
|
22072
|
+
if (compression !== -1 && input.indexOf("::", compression + 1) !== -1)
|
|
22073
|
+
return;
|
|
22074
|
+
const left = compression === -1 ? input.split(":") : input.slice(0, compression).split(":");
|
|
22075
|
+
const right = compression === -1 ? [] : input.slice(compression + 2).split(":");
|
|
22076
|
+
if (compression !== -1) {
|
|
22077
|
+
if (left.length === 1 && left[0] === "")
|
|
22078
|
+
left.length = 0;
|
|
22079
|
+
if (right.length === 1 && right[0] === "")
|
|
22080
|
+
right.length = 0;
|
|
22081
|
+
}
|
|
22082
|
+
const parts = left.concat(right);
|
|
22083
|
+
let hextetCount = 0;
|
|
22084
|
+
for (let i2 = 0;i2 < parts.length; i2++) {
|
|
22085
|
+
const part = parts[i2];
|
|
22086
|
+
if (part === "")
|
|
22087
|
+
return;
|
|
22088
|
+
if (part.indexOf(".") !== -1) {
|
|
22089
|
+
if (i2 !== parts.length - 1 || compression !== -1 && right.length === 0 || !isIPv4(part))
|
|
22090
|
+
return;
|
|
22091
|
+
hextetCount += 2;
|
|
22092
|
+
continue;
|
|
22072
22093
|
}
|
|
22094
|
+
if (!isHextet(part))
|
|
22095
|
+
return;
|
|
22096
|
+
parts[i2] = parseInt(part, 16).toString(16);
|
|
22097
|
+
hextetCount++;
|
|
22073
22098
|
}
|
|
22074
|
-
|
|
22075
|
-
|
|
22099
|
+
if (compression === -1) {
|
|
22100
|
+
if (hextetCount !== 8)
|
|
22101
|
+
return;
|
|
22102
|
+
return compressIPv6ZeroRun(parts);
|
|
22103
|
+
}
|
|
22104
|
+
if (hextetCount >= 8)
|
|
22105
|
+
return;
|
|
22106
|
+
const expanded = parts.slice(0, left.length);
|
|
22107
|
+
for (let i2 = hextetCount;i2 < 8; i2++)
|
|
22108
|
+
expanded.push("0");
|
|
22109
|
+
for (let i2 = left.length;i2 < parts.length; i2++)
|
|
22110
|
+
expanded.push(parts[i2]);
|
|
22111
|
+
return compressIPv6ZeroRun(expanded);
|
|
22076
22112
|
}
|
|
22077
22113
|
function normalizeIPv6(host) {
|
|
22078
|
-
|
|
22079
|
-
|
|
22080
|
-
|
|
22081
|
-
|
|
22082
|
-
|
|
22083
|
-
|
|
22084
|
-
|
|
22085
|
-
|
|
22086
|
-
|
|
22087
|
-
|
|
22088
|
-
}
|
|
22089
|
-
|
|
22090
|
-
|
|
22091
|
-
|
|
22092
|
-
|
|
22114
|
+
const bracketed = host[0] === "[" && host[host.length - 1] === "]";
|
|
22115
|
+
const hasBracket = host[0] === "[" || host[host.length - 1] === "]";
|
|
22116
|
+
if (hasBracket && !bracketed)
|
|
22117
|
+
return { host, isIPV6: false, error: true };
|
|
22118
|
+
let input = bracketed ? host.slice(1, -1) : host;
|
|
22119
|
+
if (bracketed && isIPvFuture(input)) {
|
|
22120
|
+
input = input.toLowerCase();
|
|
22121
|
+
return { host: `[${input}]`, escapedHost: input, isIPV6: false, isIPVFuture: true };
|
|
22122
|
+
}
|
|
22123
|
+
if (findToken(input, ":") < 2) {
|
|
22124
|
+
return { host, isIPV6: false, error: bracketed };
|
|
22125
|
+
}
|
|
22126
|
+
let zoneIdentifier = "";
|
|
22127
|
+
const zoneSeparator = input.indexOf("%");
|
|
22128
|
+
if (zoneSeparator !== -1) {
|
|
22129
|
+
const separatorLength = input.slice(zoneSeparator, zoneSeparator + 3).toLowerCase() === "%25" ? 3 : 1;
|
|
22130
|
+
zoneIdentifier = input.slice(zoneSeparator + separatorLength);
|
|
22131
|
+
if (!isZoneIdentifier(zoneIdentifier))
|
|
22132
|
+
return { host, isIPV6: false, error: true };
|
|
22133
|
+
input = input.slice(0, zoneSeparator);
|
|
22134
|
+
}
|
|
22135
|
+
const address = normalizeIPv6Address(input);
|
|
22136
|
+
if (address === undefined)
|
|
22137
|
+
return { host, isIPV6: false, error: true };
|
|
22138
|
+
return {
|
|
22139
|
+
host: address + (zoneIdentifier ? "%" + zoneIdentifier : ""),
|
|
22140
|
+
escapedHost: address + (zoneIdentifier ? "%25" + zoneIdentifier : ""),
|
|
22141
|
+
isIPV6: true
|
|
22142
|
+
};
|
|
22093
22143
|
}
|
|
22094
22144
|
function findToken(str, token) {
|
|
22095
22145
|
let ind = 0;
|
|
@@ -22209,7 +22259,8 @@ var require_utils = __commonJS(function(exports, module) {
|
|
|
22209
22259
|
function normalizePathEncoding(input) {
|
|
22210
22260
|
let output = "";
|
|
22211
22261
|
for (let i2 = 0;i2 < input.length; i2++) {
|
|
22212
|
-
|
|
22262
|
+
const ch = input[i2];
|
|
22263
|
+
if (ch === "%" && i2 + 2 < input.length) {
|
|
22213
22264
|
const hex3 = input.slice(i2 + 1, i2 + 3);
|
|
22214
22265
|
if (isHexPair(hex3)) {
|
|
22215
22266
|
const normalizedHex = hex3.toUpperCase();
|
|
@@ -22223,10 +22274,152 @@ var require_utils = __commonJS(function(exports, module) {
|
|
|
22223
22274
|
continue;
|
|
22224
22275
|
}
|
|
22225
22276
|
}
|
|
22226
|
-
if (isPathCharacter(
|
|
22227
|
-
output +=
|
|
22277
|
+
if (isPathCharacter(ch)) {
|
|
22278
|
+
output += ch;
|
|
22279
|
+
} else {
|
|
22280
|
+
const code = input.charCodeAt(i2);
|
|
22281
|
+
if (code < 128) {
|
|
22282
|
+
output += isEscapeSafe(code) ? ch : BYTE_HEX[code];
|
|
22283
|
+
} else if (code < 55296 || code > 57343) {
|
|
22284
|
+
output += percentEncodeNonAscii(code);
|
|
22285
|
+
} else if (code <= 56319 && i2 + 1 < input.length) {
|
|
22286
|
+
const low = input.charCodeAt(i2 + 1);
|
|
22287
|
+
if (low >= 56320 && low <= 57343) {
|
|
22288
|
+
output += percentEncodeNonAscii(65536 + (code - 55296 << 10) + (low - 56320));
|
|
22289
|
+
i2++;
|
|
22290
|
+
} else {
|
|
22291
|
+
output += percentEncodeNonAscii(65533);
|
|
22292
|
+
}
|
|
22293
|
+
} else {
|
|
22294
|
+
output += percentEncodeNonAscii(65533);
|
|
22295
|
+
}
|
|
22296
|
+
}
|
|
22297
|
+
}
|
|
22298
|
+
return output;
|
|
22299
|
+
}
|
|
22300
|
+
function serializePathEncoding(input, pathNoScheme = false) {
|
|
22301
|
+
let output = "";
|
|
22302
|
+
let firstSegment = pathNoScheme && input[0] !== "/";
|
|
22303
|
+
for (let i2 = 0;i2 < input.length; i2++) {
|
|
22304
|
+
const ch = input[i2];
|
|
22305
|
+
if (ch === "%" && i2 + 2 < input.length) {
|
|
22306
|
+
const hex3 = input.slice(i2 + 1, i2 + 3);
|
|
22307
|
+
if (isHexPair(hex3)) {
|
|
22308
|
+
output += "%" + hex3.toUpperCase();
|
|
22309
|
+
i2 += 2;
|
|
22310
|
+
continue;
|
|
22311
|
+
}
|
|
22312
|
+
}
|
|
22313
|
+
if (ch === "/") {
|
|
22314
|
+
firstSegment = false;
|
|
22315
|
+
}
|
|
22316
|
+
if (isPathCharacter(ch) && (ch !== ":" || !firstSegment)) {
|
|
22317
|
+
output += ch;
|
|
22228
22318
|
} else {
|
|
22229
|
-
|
|
22319
|
+
const code = input.charCodeAt(i2);
|
|
22320
|
+
if (code < 128) {
|
|
22321
|
+
output += BYTE_HEX[code];
|
|
22322
|
+
} else if (code < 55296 || code > 57343) {
|
|
22323
|
+
output += percentEncodeNonAscii(code);
|
|
22324
|
+
} else if (code <= 56319 && i2 + 1 < input.length) {
|
|
22325
|
+
const low = input.charCodeAt(i2 + 1);
|
|
22326
|
+
if (low >= 56320 && low <= 57343) {
|
|
22327
|
+
output += percentEncodeNonAscii(65536 + (code - 55296 << 10) + (low - 56320));
|
|
22328
|
+
i2++;
|
|
22329
|
+
} else {
|
|
22330
|
+
output += percentEncodeNonAscii(65533);
|
|
22331
|
+
}
|
|
22332
|
+
} else {
|
|
22333
|
+
output += percentEncodeNonAscii(65533);
|
|
22334
|
+
}
|
|
22335
|
+
}
|
|
22336
|
+
}
|
|
22337
|
+
return output;
|
|
22338
|
+
}
|
|
22339
|
+
function encodeComponent(input, isAllowed) {
|
|
22340
|
+
let output = "";
|
|
22341
|
+
for (let i2 = 0;i2 < input.length; i2++) {
|
|
22342
|
+
const ch = input[i2];
|
|
22343
|
+
if (ch === "%" && i2 + 2 < input.length) {
|
|
22344
|
+
const hex3 = input.slice(i2 + 1, i2 + 3);
|
|
22345
|
+
if (isHexPair(hex3)) {
|
|
22346
|
+
output += "%" + hex3.toUpperCase();
|
|
22347
|
+
i2 += 2;
|
|
22348
|
+
continue;
|
|
22349
|
+
}
|
|
22350
|
+
}
|
|
22351
|
+
if (isAllowed(ch)) {
|
|
22352
|
+
output += ch;
|
|
22353
|
+
} else {
|
|
22354
|
+
const code = input.charCodeAt(i2);
|
|
22355
|
+
if (code < 128) {
|
|
22356
|
+
output += BYTE_HEX[code];
|
|
22357
|
+
} else if (code < 55296 || code > 57343) {
|
|
22358
|
+
output += percentEncodeNonAscii(code);
|
|
22359
|
+
} else if (code <= 56319 && i2 + 1 < input.length) {
|
|
22360
|
+
const low = input.charCodeAt(i2 + 1);
|
|
22361
|
+
if (low >= 56320 && low <= 57343) {
|
|
22362
|
+
output += percentEncodeNonAscii(65536 + (code - 55296 << 10) + (low - 56320));
|
|
22363
|
+
i2++;
|
|
22364
|
+
} else {
|
|
22365
|
+
output += percentEncodeNonAscii(65533);
|
|
22366
|
+
}
|
|
22367
|
+
} else {
|
|
22368
|
+
output += percentEncodeNonAscii(65533);
|
|
22369
|
+
}
|
|
22370
|
+
}
|
|
22371
|
+
}
|
|
22372
|
+
return output;
|
|
22373
|
+
}
|
|
22374
|
+
function encodeUserinfo(input) {
|
|
22375
|
+
return encodeComponent(input, isUserinfoCharacter);
|
|
22376
|
+
}
|
|
22377
|
+
function encodeQuery(input) {
|
|
22378
|
+
return encodeComponent(input, isQueryFragmentCharacter);
|
|
22379
|
+
}
|
|
22380
|
+
function encodeFragment(input) {
|
|
22381
|
+
return encodeComponent(input, isQueryFragmentCharacter);
|
|
22382
|
+
}
|
|
22383
|
+
function isEscapeSafe(cp) {
|
|
22384
|
+
return cp >= 48 && cp <= 57 || cp >= 65 && cp <= 90 || cp >= 97 && cp <= 122 || cp === 42 || cp === 43 || cp === 45 || cp === 46 || cp === 47 || cp === 64 || cp === 95;
|
|
22385
|
+
}
|
|
22386
|
+
function normalizeQueryFragmentEncoding(input) {
|
|
22387
|
+
let output = "";
|
|
22388
|
+
for (let i2 = 0;i2 < input.length; i2++) {
|
|
22389
|
+
const ch = input[i2];
|
|
22390
|
+
if (ch === "%" && i2 + 2 < input.length) {
|
|
22391
|
+
const hex3 = input.slice(i2 + 1, i2 + 3);
|
|
22392
|
+
if (isHexPair(hex3)) {
|
|
22393
|
+
const normalizedHex = hex3.toUpperCase();
|
|
22394
|
+
const decoded = String.fromCharCode(parseInt(normalizedHex, 16));
|
|
22395
|
+
if (isUnreserved(decoded)) {
|
|
22396
|
+
output += decoded;
|
|
22397
|
+
} else {
|
|
22398
|
+
output += "%" + normalizedHex;
|
|
22399
|
+
}
|
|
22400
|
+
i2 += 2;
|
|
22401
|
+
continue;
|
|
22402
|
+
}
|
|
22403
|
+
}
|
|
22404
|
+
if (isQueryFragmentCharacter(ch)) {
|
|
22405
|
+
output += ch;
|
|
22406
|
+
} else {
|
|
22407
|
+
const code = input.charCodeAt(i2);
|
|
22408
|
+
if (code < 128) {
|
|
22409
|
+
output += isEscapeSafe(code) ? ch : BYTE_HEX[code];
|
|
22410
|
+
} else if (code < 55296 || code > 57343) {
|
|
22411
|
+
output += percentEncodeNonAscii(code);
|
|
22412
|
+
} else if (code <= 56319 && i2 + 1 < input.length) {
|
|
22413
|
+
const low = input.charCodeAt(i2 + 1);
|
|
22414
|
+
if (low >= 56320 && low <= 57343) {
|
|
22415
|
+
output += percentEncodeNonAscii(65536 + (code - 55296 << 10) + (low - 56320));
|
|
22416
|
+
i2++;
|
|
22417
|
+
} else {
|
|
22418
|
+
output += percentEncodeNonAscii(65533);
|
|
22419
|
+
}
|
|
22420
|
+
} else {
|
|
22421
|
+
output += percentEncodeNonAscii(65533);
|
|
22422
|
+
}
|
|
22230
22423
|
}
|
|
22231
22424
|
}
|
|
22232
22425
|
return output;
|
|
@@ -22249,14 +22442,18 @@ var require_utils = __commonJS(function(exports, module) {
|
|
|
22249
22442
|
function recomposeAuthority(component) {
|
|
22250
22443
|
const uriTokens = [];
|
|
22251
22444
|
if (component.userinfo !== undefined) {
|
|
22252
|
-
uriTokens.push(component.userinfo);
|
|
22445
|
+
uriTokens.push(encodeUserinfo(component.userinfo));
|
|
22253
22446
|
uriTokens.push("@");
|
|
22254
22447
|
}
|
|
22255
22448
|
if (component.host !== undefined) {
|
|
22256
|
-
let host =
|
|
22449
|
+
let host = component.host;
|
|
22257
22450
|
if (!isIPv4(host)) {
|
|
22258
|
-
|
|
22259
|
-
if (ipV6res.isIPV6
|
|
22451
|
+
let ipV6res = normalizeIPv6(host);
|
|
22452
|
+
if (ipV6res.isIPV6 !== true && ipV6res.isIPVFuture !== true) {
|
|
22453
|
+
host = normalizePercentEncoding(host, true);
|
|
22454
|
+
ipV6res = normalizeIPv6(host);
|
|
22455
|
+
}
|
|
22456
|
+
if (ipV6res.isIPV6 === true || ipV6res.isIPVFuture === true) {
|
|
22260
22457
|
host = `[${ipV6res.escapedHost}]`;
|
|
22261
22458
|
} else {
|
|
22262
22459
|
host = reescapeHostDelimiters(host, false);
|
|
@@ -22265,8 +22462,12 @@ var require_utils = __commonJS(function(exports, module) {
|
|
|
22265
22462
|
uriTokens.push(host);
|
|
22266
22463
|
}
|
|
22267
22464
|
if (typeof component.port === "number" || typeof component.port === "string") {
|
|
22465
|
+
const port = String(component.port);
|
|
22466
|
+
if (!isPort(port)) {
|
|
22467
|
+
throw new TypeError("URI port is malformed.");
|
|
22468
|
+
}
|
|
22268
22469
|
uriTokens.push(":");
|
|
22269
|
-
uriTokens.push(
|
|
22470
|
+
uriTokens.push(port);
|
|
22270
22471
|
}
|
|
22271
22472
|
return uriTokens.length ? uriTokens.join("") : undefined;
|
|
22272
22473
|
}
|
|
@@ -22276,6 +22477,11 @@ var require_utils = __commonJS(function(exports, module) {
|
|
|
22276
22477
|
reescapeHostDelimiters,
|
|
22277
22478
|
normalizePercentEncoding,
|
|
22278
22479
|
normalizePathEncoding,
|
|
22480
|
+
serializePathEncoding,
|
|
22481
|
+
normalizeQueryFragmentEncoding,
|
|
22482
|
+
encodeUserinfo,
|
|
22483
|
+
encodeQuery,
|
|
22484
|
+
encodeFragment,
|
|
22279
22485
|
escapePreservingEscapes,
|
|
22280
22486
|
removeDotSegments,
|
|
22281
22487
|
isIPv4,
|
|
@@ -22288,7 +22494,7 @@ var require_utils = __commonJS(function(exports, module) {
|
|
|
22288
22494
|
// ../../node_modules/fast-uri/lib/schemes.js
|
|
22289
22495
|
var require_schemes = __commonJS(function(exports, module) {
|
|
22290
22496
|
var { isUUID } = require_utils();
|
|
22291
|
-
var URN_REG =
|
|
22497
|
+
var URN_REG = /^([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-./:;=@]|%[\da-f]{2})+)$/iu;
|
|
22292
22498
|
var supportedSchemeNames = [
|
|
22293
22499
|
"http",
|
|
22294
22500
|
"https",
|
|
@@ -22343,9 +22549,10 @@ var require_schemes = __commonJS(function(exports, module) {
|
|
|
22343
22549
|
wsComponent.secure = undefined;
|
|
22344
22550
|
}
|
|
22345
22551
|
if (wsComponent.resourceName) {
|
|
22346
|
-
const
|
|
22552
|
+
const queryIndex = wsComponent.resourceName.indexOf("?");
|
|
22553
|
+
const path = queryIndex === -1 ? wsComponent.resourceName : wsComponent.resourceName.slice(0, queryIndex);
|
|
22347
22554
|
wsComponent.path = path && path !== "/" ? path : undefined;
|
|
22348
|
-
wsComponent.query =
|
|
22555
|
+
wsComponent.query = queryIndex === -1 ? undefined : wsComponent.resourceName.slice(queryIndex + 1);
|
|
22349
22556
|
wsComponent.resourceName = undefined;
|
|
22350
22557
|
}
|
|
22351
22558
|
wsComponent.fragment = undefined;
|
|
@@ -22357,7 +22564,7 @@ var require_schemes = __commonJS(function(exports, module) {
|
|
|
22357
22564
|
return urnComponent;
|
|
22358
22565
|
}
|
|
22359
22566
|
const matches = urnComponent.path.match(URN_REG);
|
|
22360
|
-
if (matches) {
|
|
22567
|
+
if (matches && matches[0] === urnComponent.path) {
|
|
22361
22568
|
const scheme = options.scheme || urnComponent.scheme || "urn";
|
|
22362
22569
|
urnComponent.nid = matches[1].toLowerCase();
|
|
22363
22570
|
urnComponent.nss = matches[2];
|
|
@@ -22461,8 +22668,17 @@ var require_schemes = __commonJS(function(exports, module) {
|
|
|
22461
22668
|
|
|
22462
22669
|
// ../../node_modules/fast-uri/index.js
|
|
22463
22670
|
var require_fast_uri = __commonJS(function(exports, module) {
|
|
22464
|
-
var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding,
|
|
22671
|
+
var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, serializePathEncoding, normalizeQueryFragmentEncoding, encodeQuery, encodeFragment, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
|
|
22465
22672
|
var { SCHEMES, getSchemeHandler } = require_schemes();
|
|
22673
|
+
var VALID_SCHEME = /^[A-Za-z][A-Za-z0-9+.-]*$/u;
|
|
22674
|
+
var MALFORMED_SCHEME_ERROR = "URI scheme is malformed.";
|
|
22675
|
+
function decodeValidScheme(scheme) {
|
|
22676
|
+
const decodedScheme = unescape(String(scheme));
|
|
22677
|
+
if (!VALID_SCHEME.test(decodedScheme)) {
|
|
22678
|
+
throw new TypeError(MALFORMED_SCHEME_ERROR);
|
|
22679
|
+
}
|
|
22680
|
+
return decodedScheme;
|
|
22681
|
+
}
|
|
22466
22682
|
function normalize(uri, options) {
|
|
22467
22683
|
if (typeof uri === "string") {
|
|
22468
22684
|
uri = normalizeString(uri, options);
|
|
@@ -22473,12 +22689,34 @@ var require_fast_uri = __commonJS(function(exports, module) {
|
|
|
22473
22689
|
}
|
|
22474
22690
|
function resolve3(baseURI, relativeURI, options) {
|
|
22475
22691
|
const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" };
|
|
22476
|
-
const {
|
|
22477
|
-
|
|
22478
|
-
|
|
22692
|
+
const {
|
|
22693
|
+
parsed: baseParsed,
|
|
22694
|
+
malformedAuthorityOrPort: baseMalformed,
|
|
22695
|
+
malformedPercentEncoding: baseMalformedPercentEncoding,
|
|
22696
|
+
malformedSchemeSpecific: baseMalformedSchemeSpecific,
|
|
22697
|
+
malformedHost: baseMalformedHost,
|
|
22698
|
+
malformedScheme: baseMalformedScheme
|
|
22699
|
+
} = parseWithStatus(baseURI, schemelessOptions);
|
|
22700
|
+
const {
|
|
22701
|
+
parsed: relativeParsed,
|
|
22702
|
+
malformedAuthorityOrPort: relativeMalformed,
|
|
22703
|
+
malformedPercentEncoding: relativeMalformedPercentEncoding,
|
|
22704
|
+
malformedSchemeSpecific: relativeMalformedSchemeSpecific,
|
|
22705
|
+
malformedHost: relativeMalformedHost,
|
|
22706
|
+
malformedScheme: relativeMalformedScheme
|
|
22707
|
+
} = parseWithStatus(relativeURI, schemelessOptions);
|
|
22708
|
+
if (baseMalformed || relativeMalformed || baseMalformedPercentEncoding || relativeMalformedPercentEncoding || baseMalformedSchemeSpecific || relativeMalformedSchemeSpecific || baseMalformedHost || relativeMalformedHost || baseMalformedScheme || relativeMalformedScheme) {
|
|
22479
22709
|
throw new Error(baseParsed.error || relativeParsed.error || "URI is malformed.");
|
|
22480
22710
|
}
|
|
22481
22711
|
const resolved = resolveComponent(baseParsed, relativeParsed, schemelessOptions, true);
|
|
22712
|
+
const resolvedSchemeHandler = getSchemeHandler(options && options.scheme || resolved.scheme);
|
|
22713
|
+
const resolvedHost = resolved.host;
|
|
22714
|
+
const resolvedHostIsIP = resolvedHost !== undefined && resolvedHost !== "" && (isIPv4(resolvedHost) || normalizeIPv6(resolvedHost).isIPV6);
|
|
22715
|
+
canonicalizeHost(resolved, options || {}, resolvedSchemeHandler, resolvedHostIsIP);
|
|
22716
|
+
const encodedASCIIHost = resolvedHost && resolvedHost.indexOf("%") !== -1 && !/\P{ASCII}/u.test(resolvedHost);
|
|
22717
|
+
if (resolved.error && !encodedASCIIHost) {
|
|
22718
|
+
throw new Error(resolved.error);
|
|
22719
|
+
}
|
|
22482
22720
|
schemelessOptions.skipEscape = true;
|
|
22483
22721
|
return serialize(resolved, schemelessOptions);
|
|
22484
22722
|
}
|
|
@@ -22538,7 +22776,7 @@ var require_fast_uri = __commonJS(function(exports, module) {
|
|
|
22538
22776
|
function equal(uriA, uriB, options) {
|
|
22539
22777
|
const normalizedA = normalizeComparableURI(uriA, options);
|
|
22540
22778
|
const normalizedB = normalizeComparableURI(uriB, options);
|
|
22541
|
-
return normalizedA !== undefined && normalizedB !== undefined && normalizedA
|
|
22779
|
+
return normalizedA !== undefined && normalizedB !== undefined && normalizedA === normalizedB;
|
|
22542
22780
|
}
|
|
22543
22781
|
function serialize(cmpts, opts) {
|
|
22544
22782
|
const component = {
|
|
@@ -22559,20 +22797,23 @@ var require_fast_uri = __commonJS(function(exports, module) {
|
|
|
22559
22797
|
};
|
|
22560
22798
|
const options = Object.assign({}, opts);
|
|
22561
22799
|
const uriTokens = [];
|
|
22800
|
+
if (component.scheme) {
|
|
22801
|
+
component.scheme = decodeValidScheme(component.scheme);
|
|
22802
|
+
}
|
|
22562
22803
|
const schemeHandler = getSchemeHandler(options.scheme || component.scheme);
|
|
22563
22804
|
if (schemeHandler && schemeHandler.serialize)
|
|
22564
22805
|
schemeHandler.serialize(component, options);
|
|
22806
|
+
const hasAuthority = component.userinfo !== undefined || component.host !== undefined || component.port !== undefined;
|
|
22807
|
+
const pathNoScheme = !options.skipEscape && component.scheme === undefined && !hasAuthority;
|
|
22565
22808
|
if (component.path !== undefined) {
|
|
22566
22809
|
if (!options.skipEscape) {
|
|
22567
|
-
component.path =
|
|
22568
|
-
if (component.scheme !== undefined) {
|
|
22569
|
-
component.path = component.path.split("%3A").join(":");
|
|
22570
|
-
}
|
|
22810
|
+
component.path = serializePathEncoding(component.path, pathNoScheme);
|
|
22571
22811
|
} else {
|
|
22572
22812
|
component.path = normalizePercentEncoding(component.path);
|
|
22573
22813
|
}
|
|
22574
22814
|
}
|
|
22575
22815
|
if (options.reference !== "suffix" && component.scheme) {
|
|
22816
|
+
component.scheme = decodeValidScheme(component.scheme);
|
|
22576
22817
|
uriTokens.push(component.scheme, ":");
|
|
22577
22818
|
}
|
|
22578
22819
|
const authority = recomposeAuthority(component);
|
|
@@ -22590,16 +22831,19 @@ var require_fast_uri = __commonJS(function(exports, module) {
|
|
|
22590
22831
|
if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {
|
|
22591
22832
|
s2 = removeDotSegments(s2);
|
|
22592
22833
|
}
|
|
22834
|
+
if (pathNoScheme) {
|
|
22835
|
+
s2 = serializePathEncoding(s2, true);
|
|
22836
|
+
}
|
|
22593
22837
|
if (authority === undefined && s2[0] === "/" && s2[1] === "/") {
|
|
22594
22838
|
s2 = "/%2F" + s2.slice(2);
|
|
22595
22839
|
}
|
|
22596
22840
|
uriTokens.push(s2);
|
|
22597
22841
|
}
|
|
22598
22842
|
if (component.query !== undefined) {
|
|
22599
|
-
uriTokens.push("?", component.query);
|
|
22843
|
+
uriTokens.push("?", encodeQuery(component.query));
|
|
22600
22844
|
}
|
|
22601
22845
|
if (component.fragment !== undefined) {
|
|
22602
|
-
uriTokens.push("#", component.fragment);
|
|
22846
|
+
uriTokens.push("#", encodeFragment(component.fragment));
|
|
22603
22847
|
}
|
|
22604
22848
|
return uriTokens.join("");
|
|
22605
22849
|
}
|
|
@@ -22615,6 +22859,36 @@ var require_fast_uri = __commonJS(function(exports, module) {
|
|
|
22615
22859
|
}
|
|
22616
22860
|
return;
|
|
22617
22861
|
}
|
|
22862
|
+
function hasMalformedPercentEncoding(component) {
|
|
22863
|
+
if (component === undefined)
|
|
22864
|
+
return false;
|
|
22865
|
+
let percent = component.indexOf("%");
|
|
22866
|
+
while (percent !== -1) {
|
|
22867
|
+
if (percent + 2 >= component.length || !/^[\da-f]{2}$/iu.test(component.slice(percent + 1, percent + 3))) {
|
|
22868
|
+
return true;
|
|
22869
|
+
}
|
|
22870
|
+
percent = component.indexOf("%", percent + 3);
|
|
22871
|
+
}
|
|
22872
|
+
return false;
|
|
22873
|
+
}
|
|
22874
|
+
function isIPLiteral(host) {
|
|
22875
|
+
return host[0] === "[" && host[host.length - 1] === "]";
|
|
22876
|
+
}
|
|
22877
|
+
function hasMalformedComponentPercentEncoding(matches) {
|
|
22878
|
+
const host = matches[4];
|
|
22879
|
+
return hasMalformedPercentEncoding(matches[3]) || host !== undefined && !isIPLiteral(host) && hasMalformedPercentEncoding(host) || hasMalformedPercentEncoding(matches[6]) || hasMalformedPercentEncoding(matches[7]) || hasMalformedPercentEncoding(matches[8]);
|
|
22880
|
+
}
|
|
22881
|
+
function canonicalizeHost(parsed, options, schemeHandler, isIP) {
|
|
22882
|
+
if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport) && parsed.host && !isIPLiteral(parsed.host) && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) {
|
|
22883
|
+
try {
|
|
22884
|
+
parsed.host = new URL("http://" + parsed.host).hostname;
|
|
22885
|
+
} catch (e2) {
|
|
22886
|
+
parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e2;
|
|
22887
|
+
return true;
|
|
22888
|
+
}
|
|
22889
|
+
}
|
|
22890
|
+
return false;
|
|
22891
|
+
}
|
|
22618
22892
|
function parseWithStatus(uri, opts) {
|
|
22619
22893
|
const options = Object.assign({}, opts);
|
|
22620
22894
|
const parsed = {
|
|
@@ -22627,6 +22901,11 @@ var require_fast_uri = __commonJS(function(exports, module) {
|
|
|
22627
22901
|
fragment: undefined
|
|
22628
22902
|
};
|
|
22629
22903
|
let malformedAuthorityOrPort = false;
|
|
22904
|
+
let malformedPercentEncoding = false;
|
|
22905
|
+
let malformedSchemeSpecific = false;
|
|
22906
|
+
let malformedHost = false;
|
|
22907
|
+
let malformedIPLiteral = false;
|
|
22908
|
+
let malformedScheme = false;
|
|
22630
22909
|
let isIP = false;
|
|
22631
22910
|
if (options.reference === "suffix") {
|
|
22632
22911
|
if (options.scheme) {
|
|
@@ -22663,6 +22942,19 @@ var require_fast_uri = __commonJS(function(exports, module) {
|
|
|
22663
22942
|
parsed.path = matches[6] || "";
|
|
22664
22943
|
parsed.query = matches[7];
|
|
22665
22944
|
parsed.fragment = matches[8];
|
|
22945
|
+
if (parsed.scheme !== undefined) {
|
|
22946
|
+
const decodedScheme = unescape(parsed.scheme);
|
|
22947
|
+
if (VALID_SCHEME.test(decodedScheme)) {
|
|
22948
|
+
parsed.scheme = decodedScheme.toLowerCase();
|
|
22949
|
+
} else {
|
|
22950
|
+
parsed.error = parsed.error || MALFORMED_SCHEME_ERROR;
|
|
22951
|
+
malformedScheme = true;
|
|
22952
|
+
}
|
|
22953
|
+
}
|
|
22954
|
+
malformedPercentEncoding = hasMalformedComponentPercentEncoding(matches);
|
|
22955
|
+
if (malformedPercentEncoding) {
|
|
22956
|
+
parsed.error = parsed.error || "URI contains malformed percent-encoding.";
|
|
22957
|
+
}
|
|
22666
22958
|
if (isNaN(parsed.port)) {
|
|
22667
22959
|
parsed.port = matches[5];
|
|
22668
22960
|
}
|
|
@@ -22674,9 +22966,16 @@ var require_fast_uri = __commonJS(function(exports, module) {
|
|
|
22674
22966
|
if (parsed.host) {
|
|
22675
22967
|
const ipv4result = isIPv4(parsed.host);
|
|
22676
22968
|
if (ipv4result === false) {
|
|
22969
|
+
const bracketedIPLiteral = isIPLiteral(parsed.host);
|
|
22970
|
+
const hasIPLiteralBracket = parsed.host.indexOf("[") !== -1 || parsed.host.indexOf("]") !== -1;
|
|
22677
22971
|
const ipv6result = normalizeIPv6(parsed.host);
|
|
22678
|
-
|
|
22679
|
-
|
|
22972
|
+
isIP = ipv6result.isIPV6 || ipv6result.isIPVFuture === true;
|
|
22973
|
+
malformedIPLiteral = hasIPLiteralBracket && (!bracketedIPLiteral || ipv6result.error === true);
|
|
22974
|
+
parsed.host = isIP ? ipv6result.host : ipv6result.host.toLowerCase();
|
|
22975
|
+
if (malformedIPLiteral) {
|
|
22976
|
+
parsed.error = parsed.error || "URI host is malformed.";
|
|
22977
|
+
malformedAuthorityOrPort = true;
|
|
22978
|
+
}
|
|
22680
22979
|
} else {
|
|
22681
22980
|
isIP = true;
|
|
22682
22981
|
}
|
|
@@ -22694,42 +22993,36 @@ var require_fast_uri = __commonJS(function(exports, module) {
|
|
|
22694
22993
|
parsed.error = parsed.error || "URI is not a " + options.reference + " reference.";
|
|
22695
22994
|
}
|
|
22696
22995
|
const schemeHandler = getSchemeHandler(options.scheme || parsed.scheme);
|
|
22697
|
-
if (!
|
|
22698
|
-
|
|
22699
|
-
try {
|
|
22700
|
-
parsed.host = new URL("http://" + parsed.host).hostname;
|
|
22701
|
-
} catch (e2) {
|
|
22702
|
-
parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e2;
|
|
22703
|
-
}
|
|
22704
|
-
}
|
|
22996
|
+
if (!malformedIPLiteral) {
|
|
22997
|
+
malformedHost = canonicalizeHost(parsed, options, schemeHandler, isIP);
|
|
22705
22998
|
}
|
|
22706
22999
|
if (!schemeHandler || schemeHandler && !schemeHandler.skipNormalize) {
|
|
22707
23000
|
if (uri.indexOf("%") !== -1) {
|
|
22708
|
-
if (parsed.
|
|
22709
|
-
parsed.
|
|
22710
|
-
|
|
22711
|
-
if (parsed.host !== undefined) {
|
|
22712
|
-
parsed.host = reescapeHostDelimiters(unescape(parsed.host), isIP);
|
|
23001
|
+
if (parsed.host !== undefined && !malformedIPLiteral) {
|
|
23002
|
+
const host = isIP ? parsed.host : normalizePercentEncoding(parsed.host, true);
|
|
23003
|
+
parsed.host = reescapeHostDelimiters(host, isIP);
|
|
22713
23004
|
}
|
|
22714
23005
|
}
|
|
22715
23006
|
if (parsed.path) {
|
|
22716
23007
|
parsed.path = normalizePathEncoding(parsed.path);
|
|
22717
23008
|
}
|
|
23009
|
+
if (parsed.query) {
|
|
23010
|
+
parsed.query = normalizeQueryFragmentEncoding(parsed.query);
|
|
23011
|
+
}
|
|
22718
23012
|
if (parsed.fragment) {
|
|
22719
|
-
|
|
22720
|
-
parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment));
|
|
22721
|
-
} catch {
|
|
22722
|
-
parsed.error = parsed.error || "URI malformed";
|
|
22723
|
-
}
|
|
23013
|
+
parsed.fragment = normalizeQueryFragmentEncoding(parsed.fragment);
|
|
22724
23014
|
}
|
|
22725
23015
|
}
|
|
22726
23016
|
if (schemeHandler && schemeHandler.parse) {
|
|
22727
23017
|
schemeHandler.parse(parsed, options);
|
|
23018
|
+
if (schemeHandler === SCHEMES.urn && parsed.nid === undefined) {
|
|
23019
|
+
malformedSchemeSpecific = true;
|
|
23020
|
+
}
|
|
22728
23021
|
}
|
|
22729
23022
|
} else {
|
|
22730
23023
|
parsed.error = parsed.error || "URI can not be parsed.";
|
|
22731
23024
|
}
|
|
22732
|
-
return { parsed, malformedAuthorityOrPort };
|
|
23025
|
+
return { parsed, malformedAuthorityOrPort, malformedPercentEncoding, malformedSchemeSpecific, malformedHost, malformedScheme };
|
|
22733
23026
|
}
|
|
22734
23027
|
function parse6(uri, opts) {
|
|
22735
23028
|
return parseWithStatus(uri, opts).parsed;
|
|
@@ -22738,20 +23031,28 @@ var require_fast_uri = __commonJS(function(exports, module) {
|
|
|
22738
23031
|
return normalizeStringWithStatus(uri, opts).normalized;
|
|
22739
23032
|
}
|
|
22740
23033
|
function normalizeStringWithStatus(uri, opts) {
|
|
22741
|
-
const { parsed, malformedAuthorityOrPort } = parseWithStatus(uri, opts);
|
|
23034
|
+
const { parsed, malformedAuthorityOrPort, malformedPercentEncoding, malformedSchemeSpecific, malformedHost, malformedScheme } = parseWithStatus(uri, opts);
|
|
22742
23035
|
return {
|
|
22743
|
-
normalized: malformedAuthorityOrPort ? uri : serialize(parsed, opts),
|
|
22744
|
-
malformedAuthorityOrPort
|
|
23036
|
+
normalized: malformedAuthorityOrPort || malformedPercentEncoding || malformedSchemeSpecific || malformedHost || malformedScheme ? uri : serialize(parsed, opts),
|
|
23037
|
+
malformedAuthorityOrPort,
|
|
23038
|
+
malformedPercentEncoding,
|
|
23039
|
+
malformedSchemeSpecific,
|
|
23040
|
+
malformedHost,
|
|
23041
|
+
malformedScheme
|
|
22745
23042
|
};
|
|
22746
23043
|
}
|
|
22747
23044
|
function normalizeComparableURI(uri, opts) {
|
|
22748
|
-
if (typeof uri
|
|
22749
|
-
|
|
22750
|
-
return malformedAuthorityOrPort ? undefined : normalized;
|
|
23045
|
+
if (typeof uri !== "string" && typeof uri !== "object") {
|
|
23046
|
+
return;
|
|
22751
23047
|
}
|
|
22752
|
-
|
|
22753
|
-
|
|
23048
|
+
let value;
|
|
23049
|
+
try {
|
|
23050
|
+
value = typeof uri === "string" ? uri : serialize(uri, opts);
|
|
23051
|
+
} catch {
|
|
23052
|
+
return;
|
|
22754
23053
|
}
|
|
23054
|
+
const { normalized, malformedAuthorityOrPort, malformedPercentEncoding, malformedSchemeSpecific, malformedHost, malformedScheme } = normalizeStringWithStatus(value, opts);
|
|
23055
|
+
return malformedAuthorityOrPort || malformedPercentEncoding || malformedSchemeSpecific || malformedHost || malformedScheme ? undefined : normalized;
|
|
22755
23056
|
}
|
|
22756
23057
|
var fastUri = {
|
|
22757
23058
|
SCHEMES,
|