@psnext/slingcli 2.4.20260507-3 → 2.4.20260509-1
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/LICENSE +1 -1
- package/README.md +1 -1
- package/bin/sling.js +12 -12
- package/node_modules/@aws-sdk/client-bedrock-runtime/package.json +2 -2
- package/node_modules/@aws-sdk/token-providers/package.json +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-agent-core/dist/agent-loop.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-agent-core/dist/agent.js +4 -3
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.js +526 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.js +243 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js +616 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.js +348 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution-env.js +3 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/factory.js +9 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/messages.js +102 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/prompt-templates.js +194 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/jsonl.js +92 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/memory.js +42 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/shared.js +31 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.js +196 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/jsonl.js +170 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/memory.js +90 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.js +258 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/system-prompt.js +30 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.js +16 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/shell-output.js +97 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/index.js +26 -0
- package/node_modules/{@mariozechner → @earendil-works}/pi-agent-core/dist/proxy.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-agent-core/package.json +7 -5
- package/node_modules/{@mariozechner → @earendil-works}/pi-ai/dist/cli.js +6 -6
- package/node_modules/{@mariozechner → @earendil-works}/pi-ai/dist/env-api-keys.js +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js +307 -0
- package/node_modules/@earendil-works/pi-ai/dist/image-models.js +23 -0
- package/node_modules/@earendil-works/pi-ai/dist/images-api-registry.js +22 -0
- package/node_modules/@earendil-works/pi-ai/dist/images.js +14 -0
- package/node_modules/{@mariozechner → @earendil-works}/pi-ai/dist/index.js +4 -0
- package/node_modules/{@mariozechner → @earendil-works}/pi-ai/dist/models.generated.js +427 -122
- package/node_modules/@earendil-works/pi-ai/dist/providers/images/openrouter.js +129 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/images/register-builtins.js +34 -0
- package/node_modules/{@mariozechner → @earendil-works}/pi-ai/dist/providers/openai-codex-responses.js +1 -1
- package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/providers/openai-completions.js +150 -122
- package/node_modules/{@mariozechner → @earendil-works}/pi-ai/dist/providers/openai-responses-shared.js +14 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-ai/dist/utils/oauth/openai-codex.js +25 -14
- package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/utils/overflow.js +3 -0
- package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/package.json +5 -4
- package/node_modules/@earendil-works/pi-coding-agent/dist/bun/register-bedrock.js +4 -0
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/cli/args.js +1 -0
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/cli/config-selector.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/cli/list-models.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/cli/session-picker.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/config.js +52 -30
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/agent-session.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/auth-storage.js +2 -2
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/compaction/branch-summarization.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/compaction/compaction.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/utils.js +153 -0
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/export-html/template.css +45 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/export-html/template.js +68 -4
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/extensions/loader.js +26 -12
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/keybindings.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/model-registry.js +3 -2
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/model-resolver.js +2 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/package-manager.js +22 -5
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/provider-display-names.js +1 -0
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/sdk.js +3 -3
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/tools/bash.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/tools/edit.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/tools/find.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/tools/grep.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/tools/ls.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/tools/read.js +3 -2
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/tools/render-utils.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/truncate.js +205 -0
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/tools/write.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/main.js +2 -2
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/migrations.js +3 -3
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/assistant-message.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/bash-execution.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/bordered-loader.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/branch-summary-message.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/compaction-summary-message.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/config-selector.js +25 -3
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/custom-editor.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/custom-message.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/earendil-announcement.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/extension-editor.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/extension-input.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/extension-selector.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/footer.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/keybinding-hints.js +36 -0
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/login-dialog.js +4 -3
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/model-selector.js +2 -2
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/oauth-selector.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/scoped-models-selector.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/session-selector-search.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/session-selector.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/settings-selector.js +4 -2
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/show-images-selector.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/skill-invocation-message.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/theme-selector.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/thinking-selector.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/tool-execution.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/tree-selector.js +3 -2
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/user-message-selector.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/user-message.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/visual-truncate.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/interactive-mode.js +47 -32
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/theme/dark.json +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/theme/light.json +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/theme/theme.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/package-manager-cli.js +42 -39
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/clipboard.js +9 -2
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/paths.js +16 -0
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/version-check.js +9 -2
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/package.json +9 -8
- package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/components/image.js +14 -7
- package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/components/markdown.js +24 -84
- package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/terminal-image.js +10 -4
- package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/tui.js +73 -4
- package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/utils.js +33 -7
- package/node_modules/{@mariozechner → @earendil-works}/pi-tui/package.json +3 -3
- package/node_modules/@mariozechner/clipboard/README.md +58 -0
- package/node_modules/@mariozechner/clipboard/index.d.ts +23 -0
- package/node_modules/@mariozechner/clipboard-linux-x64-gnu/README.md +3 -0
- package/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/node/http2.d.ts +4 -1
- package/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/node/stream/web.d.ts +4 -0
- package/node_modules/brace-expansion/dist/commonjs/index.js +1 -1
- package/node_modules/brace-expansion/dist/commonjs/index.js.map +1 -1
- package/node_modules/brace-expansion/dist/esm/index.js +1 -1
- package/node_modules/brace-expansion/dist/esm/index.js.map +1 -1
- package/node_modules/brace-expansion/package.json +1 -1
- package/node_modules/fast-xml-builder/CHANGELOG.md +4 -0
- package/node_modules/fast-xml-builder/lib/fxb.cjs +1 -1
- package/node_modules/fast-xml-builder/lib/fxb.d.cts +91 -1
- package/node_modules/fast-xml-builder/lib/fxb.min.js +1 -1
- package/node_modules/fast-xml-builder/lib/fxb.min.js.map +1 -1
- package/node_modules/fast-xml-builder/package.json +3 -2
- package/node_modules/fast-xml-builder/src/fxb.d.ts +92 -3
- package/node_modules/fast-xml-builder/src/fxb.js +92 -31
- package/node_modules/fast-xml-builder/src/orderedJs2Xml.js +87 -33
- package/node_modules/get-east-asian-width/lookup-data.js +15 -12
- package/node_modules/get-east-asian-width/lookup.js +25 -22
- package/node_modules/get-east-asian-width/package.json +1 -1
- package/node_modules/jiti/README.md +258 -0
- package/node_modules/jiti/dist/babel.cjs +257 -0
- package/node_modules/jiti/dist/jiti.cjs +1 -0
- package/node_modules/jiti/lib/jiti.mjs +29 -0
- package/node_modules/jiti/lib/types.d.ts +420 -0
- package/node_modules/jiti/package.json +146 -0
- package/node_modules/protobufjs/dist/light/protobuf.js +5 -3
- package/node_modules/protobufjs/dist/light/protobuf.js.map +1 -1
- package/node_modules/protobufjs/dist/light/protobuf.min.js +3 -3
- package/node_modules/protobufjs/dist/light/protobuf.min.js.map +1 -1
- package/node_modules/protobufjs/dist/minimal/protobuf.js +2 -2
- package/node_modules/protobufjs/dist/minimal/protobuf.min.js +2 -2
- package/node_modules/protobufjs/dist/protobuf.js +5 -3
- package/node_modules/protobufjs/dist/protobuf.js.map +1 -1
- package/node_modules/protobufjs/dist/protobuf.min.js +3 -3
- package/node_modules/protobufjs/dist/protobuf.min.js.map +1 -1
- package/node_modules/protobufjs/package.json +1 -1
- package/node_modules/protobufjs/src/namespace.js +3 -1
- package/node_modules/semver/README.md +19 -4
- package/node_modules/semver/bin/semver.js +14 -10
- package/node_modules/semver/functions/truncate.js +48 -0
- package/node_modules/semver/index.js +2 -0
- package/node_modules/semver/internal/re.js +1 -1
- package/node_modules/semver/package.json +3 -3
- package/node_modules/semver/range.bnf +5 -4
- package/node_modules/socks/package.json +2 -2
- package/node_modules/xml-naming/README.md +189 -0
- package/node_modules/xml-naming/package.json +54 -0
- package/node_modules/xml-naming/src/index.d.ts +74 -0
- package/node_modules/xml-naming/src/index.js +270 -0
- package/package.json +6 -6
- package/sling-default-packages.json +2 -1
- package/slingshot/index.js +442 -23
- package/node_modules/@mariozechner/jiti/dist/babel.cjs +0 -246
- package/node_modules/@mariozechner/jiti/dist/jiti.cjs +0 -1
- package/node_modules/@mariozechner/jiti/package.json +0 -96
- package/node_modules/@mariozechner/pi-agent-core/dist/index.js +0 -9
- package/node_modules/@mariozechner/pi-agent-core/node_modules/@mariozechner/pi-ai/dist/cli.js +0 -116
- package/node_modules/@mariozechner/pi-agent-core/node_modules/@mariozechner/pi-ai/dist/env-api-keys.js +0 -166
- package/node_modules/@mariozechner/pi-agent-core/node_modules/@mariozechner/pi-ai/dist/index.js +0 -15
- package/node_modules/@mariozechner/pi-agent-core/node_modules/@mariozechner/pi-ai/dist/models.generated.js +0 -16568
- package/node_modules/@mariozechner/pi-agent-core/node_modules/@mariozechner/pi-ai/dist/providers/amazon-bedrock.js +0 -753
- package/node_modules/@mariozechner/pi-agent-core/node_modules/@mariozechner/pi-ai/dist/providers/openai-codex-responses.js +0 -909
- package/node_modules/@mariozechner/pi-agent-core/node_modules/@mariozechner/pi-ai/dist/providers/openai-responses-shared.js +0 -479
- package/node_modules/@mariozechner/pi-agent-core/node_modules/@mariozechner/pi-ai/dist/utils/oauth/openai-codex.js +0 -374
- package/node_modules/@mariozechner/pi-ai/dist/api-registry.js +0 -44
- package/node_modules/@mariozechner/pi-ai/dist/bedrock-provider.js +0 -6
- package/node_modules/@mariozechner/pi-ai/dist/models.js +0 -71
- package/node_modules/@mariozechner/pi-ai/dist/oauth.js +0 -2
- package/node_modules/@mariozechner/pi-ai/dist/providers/anthropic.js +0 -951
- package/node_modules/@mariozechner/pi-ai/dist/providers/azure-openai-responses.js +0 -208
- package/node_modules/@mariozechner/pi-ai/dist/providers/cloudflare.js +0 -26
- package/node_modules/@mariozechner/pi-ai/dist/providers/faux.js +0 -368
- package/node_modules/@mariozechner/pi-ai/dist/providers/github-copilot-headers.js +0 -29
- package/node_modules/@mariozechner/pi-ai/dist/providers/google-shared.js +0 -329
- package/node_modules/@mariozechner/pi-ai/dist/providers/google-vertex.js +0 -442
- package/node_modules/@mariozechner/pi-ai/dist/providers/google.js +0 -400
- package/node_modules/@mariozechner/pi-ai/dist/providers/mistral.js +0 -535
- package/node_modules/@mariozechner/pi-ai/dist/providers/openai-completions.js +0 -908
- package/node_modules/@mariozechner/pi-ai/dist/providers/openai-responses.js +0 -220
- package/node_modules/@mariozechner/pi-ai/dist/providers/register-builtins.js +0 -243
- package/node_modules/@mariozechner/pi-ai/dist/providers/simple-options.js +0 -39
- package/node_modules/@mariozechner/pi-ai/dist/providers/transform-messages.js +0 -184
- package/node_modules/@mariozechner/pi-ai/dist/stream.js +0 -27
- package/node_modules/@mariozechner/pi-ai/dist/types.js +0 -2
- package/node_modules/@mariozechner/pi-ai/dist/utils/event-stream.js +0 -81
- package/node_modules/@mariozechner/pi-ai/dist/utils/hash.js +0 -14
- package/node_modules/@mariozechner/pi-ai/dist/utils/headers.js +0 -8
- package/node_modules/@mariozechner/pi-ai/dist/utils/json-parse.js +0 -113
- package/node_modules/@mariozechner/pi-ai/dist/utils/oauth/anthropic.js +0 -335
- package/node_modules/@mariozechner/pi-ai/dist/utils/oauth/github-copilot.js +0 -292
- package/node_modules/@mariozechner/pi-ai/dist/utils/oauth/index.js +0 -121
- package/node_modules/@mariozechner/pi-ai/dist/utils/oauth/oauth-page.js +0 -105
- package/node_modules/@mariozechner/pi-ai/dist/utils/oauth/pkce.js +0 -31
- package/node_modules/@mariozechner/pi-ai/dist/utils/oauth/types.js +0 -2
- package/node_modules/@mariozechner/pi-ai/dist/utils/overflow.js +0 -146
- package/node_modules/@mariozechner/pi-ai/dist/utils/sanitize-unicode.js +0 -26
- package/node_modules/@mariozechner/pi-ai/dist/utils/typebox-helpers.js +0 -21
- package/node_modules/@mariozechner/pi-ai/dist/utils/validation.js +0 -281
- package/node_modules/@mariozechner/pi-ai/package.json +0 -108
- package/node_modules/@mariozechner/pi-coding-agent/dist/bun/register-bedrock.js +0 -4
- package/node_modules/@mariozechner/pi-coding-agent/dist/modes/interactive/components/keybinding-hints.js +0 -22
- package/node_modules/@mariozechner/pi-coding-agent/node_modules/@mariozechner/pi-agent-core/dist/agent-loop.js +0 -458
- package/node_modules/@mariozechner/pi-coding-agent/node_modules/@mariozechner/pi-agent-core/dist/agent.js +0 -398
- package/node_modules/@mariozechner/pi-coding-agent/node_modules/@mariozechner/pi-agent-core/dist/index.js +0 -9
- package/node_modules/@mariozechner/pi-coding-agent/node_modules/@mariozechner/pi-agent-core/dist/proxy.js +0 -278
- package/node_modules/@mariozechner/pi-coding-agent/node_modules/@mariozechner/pi-agent-core/dist/types.js +0 -2
- package/node_modules/@mariozechner/pi-coding-agent/node_modules/@mariozechner/pi-agent-core/package.json +0 -45
- package/node_modules/socks/.claude/settings.local.json +0 -26
- package/node_modules/std-env/LICENCE +0 -22
- package/node_modules/std-env/README.md +0 -118
- package/node_modules/std-env/dist/index.cjs +0 -1
- package/node_modules/std-env/dist/index.d.cts +0 -92
- package/node_modules/std-env/dist/index.d.mts +0 -92
- package/node_modules/std-env/dist/index.d.ts +0 -92
- package/node_modules/std-env/dist/index.mjs +0 -1
- package/node_modules/std-env/package.json +0 -46
- package/node_modules/yoctocolors/base.d.ts +0 -47
- package/node_modules/yoctocolors/base.js +0 -94
- package/node_modules/yoctocolors/index.d.ts +0 -2
- package/node_modules/yoctocolors/index.js +0 -2
- package/node_modules/yoctocolors/license +0 -9
- package/node_modules/yoctocolors/package.json +0 -69
- package/node_modules/yoctocolors/readme.md +0 -138
- /package/node_modules/{@mariozechner/pi-coding-agent/dist/core → @earendil-works/pi-agent-core/dist/harness}/compaction/utils.js +0 -0
- /package/node_modules/{@mariozechner/pi-coding-agent/dist/core/tools → @earendil-works/pi-agent-core/dist/harness/utils}/truncate.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-agent-core/dist/types.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/api-registry.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/bedrock-provider.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/models.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/oauth.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-ai/dist/providers/amazon-bedrock.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/providers/anthropic.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/providers/azure-openai-responses.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/providers/cloudflare.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/providers/faux.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/providers/github-copilot-headers.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/providers/google-shared.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/providers/google-vertex.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/providers/google.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/providers/mistral.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/providers/openai-responses.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/providers/register-builtins.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/providers/simple-options.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/providers/transform-messages.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-ai/dist/session-resources.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/stream.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/types.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-ai/dist/utils/diagnostics.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/utils/event-stream.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/utils/hash.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/utils/headers.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/utils/json-parse.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/utils/oauth/anthropic.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/utils/oauth/github-copilot.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/utils/oauth/index.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/utils/oauth/oauth-page.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/utils/oauth/pkce.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/utils/oauth/types.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/utils/sanitize-unicode.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/utils/typebox-helpers.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/utils/validation.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/bun/cli.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/bun/restore-sandbox-env.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/cli/file-processor.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/cli/initial-message.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/cli.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/agent-session-runtime.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/agent-session-services.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/auth-guidance.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/bash-executor.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/compaction/index.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/defaults.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/diagnostics.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/event-bus.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/exec.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/export-html/ansi-to-html.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/export-html/index.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/export-html/template.html +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/export-html/tool-renderer.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/export-html/vendor/highlight.min.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/export-html/vendor/marked.min.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/extensions/index.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/extensions/runner.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/extensions/types.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/extensions/wrapper.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/footer-data-provider.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/index.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/messages.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/output-guard.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/prompt-templates.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/resolve-config-value.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/resource-loader.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/session-cwd.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/session-manager.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/settings-manager.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/skills.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/slash-commands.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/source-info.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/system-prompt.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/telemetry.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/timings.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/tools/edit-diff.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/tools/file-mutation-queue.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/tools/index.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/tools/output-accumulator.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/tools/path-utils.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/tools/tool-definition-wrapper.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/index.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/index.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/assets/clankolas.png +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/armin.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/countdown-timer.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/daxnuts.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/diff.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/dynamic-border.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/index.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/theme/theme-schema.json +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/print-mode.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/rpc/jsonl.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/rpc/rpc-client.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/rpc/rpc-mode.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/rpc/rpc-types.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/changelog.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/child-process.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/clipboard-image.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/clipboard-native.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/exif-orientation.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/frontmatter.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/fs-watch.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/git.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/image-convert.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/image-resize.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/mime.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/photon.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/pi-user-agent.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/shell.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/sleep.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/tools-manager.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/autocomplete.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/components/box.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/components/cancellable-loader.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/components/editor.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/components/input.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/components/loader.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/components/select-list.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/components/settings-list.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/components/spacer.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/components/text.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/components/truncated-text.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/editor-component.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/fuzzy.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/index.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/keybindings.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/keys.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/kill-ring.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/stdin-buffer.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/terminal.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/undo-stack.js +0 -0
- /package/node_modules/{@mariozechner/jiti → jiti}/LICENSE +0 -0
- /package/node_modules/{@mariozechner/jiti → jiti}/lib/jiti-cli.mjs +0 -0
- /package/node_modules/{@mariozechner/jiti → jiti}/lib/jiti-hooks.mjs +0 -0
- /package/node_modules/{@mariozechner/jiti → jiti}/lib/jiti-native.mjs +0 -0
- /package/node_modules/{@mariozechner/jiti → jiti}/lib/jiti-register.d.mts +0 -0
- /package/node_modules/{@mariozechner/jiti → jiti}/lib/jiti-register.mjs +0 -0
- /package/node_modules/{@mariozechner/jiti/lib/jiti.mjs → jiti/lib/jiti-static.mjs} +0 -0
- /package/node_modules/{@mariozechner/jiti → jiti}/lib/jiti.cjs +0 -0
- /package/node_modules/{@mariozechner/jiti → jiti}/lib/jiti.d.cts +0 -0
- /package/node_modules/{@mariozechner/jiti → jiti}/lib/jiti.d.mts +0 -0
|
@@ -466,8 +466,10 @@ Namespace.prototype._lookupImpl = function lookup(path, flatPath) {
|
|
|
466
466
|
// Otherwise try each nested namespace
|
|
467
467
|
} else {
|
|
468
468
|
for (var i = 0; i < this.nestedArray.length; ++i)
|
|
469
|
-
if (this._nestedArray[i] instanceof Namespace && (found = this._nestedArray[i]._lookupImpl(path, flatPath)))
|
|
469
|
+
if (this._nestedArray[i] instanceof Namespace && (found = this._nestedArray[i]._lookupImpl(path, flatPath))) {
|
|
470
470
|
exact = found;
|
|
471
|
+
break;
|
|
472
|
+
}
|
|
471
473
|
}
|
|
472
474
|
|
|
473
475
|
// Set this even when null, so that when we walk up the tree we can quickly bail on repeated checks back down.
|
|
@@ -56,6 +56,7 @@ const semverCompareLoose = require('semver/functions/compare-loose')
|
|
|
56
56
|
const semverCompareBuild = require('semver/functions/compare-build')
|
|
57
57
|
const semverSort = require('semver/functions/sort')
|
|
58
58
|
const semverRsort = require('semver/functions/rsort')
|
|
59
|
+
const semverTruncate = require('semver/functions/truncate')
|
|
59
60
|
|
|
60
61
|
// low-level comparators between versions
|
|
61
62
|
const semverGt = require('semver/functions/gt')
|
|
@@ -399,12 +400,19 @@ nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) *
|
|
|
399
400
|
tilde ::= '~' partial
|
|
400
401
|
caret ::= '^' partial
|
|
401
402
|
qualifier ::= ( '-' pre )? ( '+' build )?
|
|
402
|
-
pre ::=
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
403
|
+
pre ::= prepart ( '.' prepart ) *
|
|
404
|
+
prepart ::= nr | alphanumid
|
|
405
|
+
build ::= buildid ( '.' buildid ) *
|
|
406
|
+
alphanumid ::= ( ['0'-'9'] ) * [-A-Za-z] [-0-9A-Za-z] *
|
|
407
|
+
buildid ::= [-0-9A-Za-z]+
|
|
406
408
|
```
|
|
407
409
|
|
|
410
|
+
Note: Prerelease identifiers (`pre`) use `nr` for numeric parts, which
|
|
411
|
+
disallows leading zeros (e.g., `1.2.3-00` is invalid). Build metadata
|
|
412
|
+
identifiers (`build`) allow any alphanumeric string including leading
|
|
413
|
+
zeros (e.g., `1.2.3+00` is valid). This matches the
|
|
414
|
+
[SemVer 2.0.0 specification](https://semver.org/#spec-item-9).
|
|
415
|
+
|
|
408
416
|
## Functions
|
|
409
417
|
|
|
410
418
|
All methods and classes take a final `options` object argument. All
|
|
@@ -449,6 +457,12 @@ strings that they parse.
|
|
|
449
457
|
or comparators intersect.
|
|
450
458
|
* `parse(v)`: Attempt to parse a string as a semantic version, returning either
|
|
451
459
|
a `SemVer` object or `null`.
|
|
460
|
+
* `truncate(v, releaseType)`: Return the version with components _lower_
|
|
461
|
+
than `releaseType` dropped off, e.g.:
|
|
462
|
+
* `major` removes build & prerelease info and sets minor & patch to 0.
|
|
463
|
+
* `minor` removes build & prerelease info, and sets patch to 0
|
|
464
|
+
* `patch` removes build & prerelease info
|
|
465
|
+
* All prerelease types remove build info only
|
|
452
466
|
|
|
453
467
|
### Comparison
|
|
454
468
|
|
|
@@ -650,6 +664,7 @@ The following modules are available:
|
|
|
650
664
|
* `require('semver/functions/rsort')`
|
|
651
665
|
* `require('semver/functions/satisfies')`
|
|
652
666
|
* `require('semver/functions/sort')`
|
|
667
|
+
* `require('semver/functions/truncate')`
|
|
653
668
|
* `require('semver/functions/valid')`
|
|
654
669
|
* `require('semver/ranges/gtr')`
|
|
655
670
|
* `require('semver/ranges/intersects')`
|
|
@@ -46,6 +46,7 @@ const main = () => {
|
|
|
46
46
|
a = a.slice(0, indexOfEqualSign)
|
|
47
47
|
argv.unshift(value)
|
|
48
48
|
}
|
|
49
|
+
|
|
49
50
|
switch (a) {
|
|
50
51
|
case '-rv': case '-rev': case '--rev': case '--reverse':
|
|
51
52
|
reverse = true
|
|
@@ -60,15 +61,10 @@ const main = () => {
|
|
|
60
61
|
versions.push(argv.shift())
|
|
61
62
|
break
|
|
62
63
|
case '-i': case '--inc': case '--increment':
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
inc = argv.shift()
|
|
68
|
-
break
|
|
69
|
-
default:
|
|
70
|
-
inc = 'patch'
|
|
71
|
-
break
|
|
64
|
+
if (semver.RELEASE_TYPES.includes(argv[0]) || (argv[0] === 'release')) {
|
|
65
|
+
inc = { value: argv.shift(), maybeErrantValue: null, option: a }
|
|
66
|
+
} else {
|
|
67
|
+
inc = { value: 'patch', maybeErrantValue: argv[0], option: a }
|
|
72
68
|
}
|
|
73
69
|
break
|
|
74
70
|
case '--preid':
|
|
@@ -102,6 +98,14 @@ const main = () => {
|
|
|
102
98
|
|
|
103
99
|
options = parseOptions({ loose, includePrerelease, rtl })
|
|
104
100
|
|
|
101
|
+
if (
|
|
102
|
+
inc &&
|
|
103
|
+
versions.includes(inc.maybeErrantValue) &&
|
|
104
|
+
!semver.valid(inc.maybeErrantValue, options)
|
|
105
|
+
) {
|
|
106
|
+
console.warn(`Invalid value for ${inc.option}; defaulting to 'patch'. This may become a failure in future major versions.`)
|
|
107
|
+
}
|
|
108
|
+
|
|
105
109
|
versions = versions.map((v) => {
|
|
106
110
|
return coerce ? (semver.coerce(v, options) || { version: v }).version : v
|
|
107
111
|
}).filter((v) => {
|
|
@@ -125,7 +129,7 @@ const main = () => {
|
|
|
125
129
|
versions
|
|
126
130
|
.sort((a, b) => semver[reverse ? 'rcompare' : 'compare'](a, b, options))
|
|
127
131
|
.map(v => semver.clean(v, options))
|
|
128
|
-
.map(v => inc ? semver.inc(v, inc, options, identifier, identifierBase) : v)
|
|
132
|
+
.map(v => inc ? semver.inc(v, inc.value, options, identifier, identifierBase) : v)
|
|
129
133
|
.forEach(v => console.log(v))
|
|
130
134
|
}
|
|
131
135
|
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
const parse = require('./parse')
|
|
4
|
+
const constants = require('../internal/constants')
|
|
5
|
+
const SemVer = require('../classes/semver')
|
|
6
|
+
|
|
7
|
+
const truncate = (version, truncation, options) => {
|
|
8
|
+
if (!constants.RELEASE_TYPES.includes(truncation)) {
|
|
9
|
+
return null
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const clonedVersion = cloneInputVersion(version, options)
|
|
13
|
+
return clonedVersion && doTruncation(clonedVersion, truncation)
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const cloneInputVersion = (version, options) => {
|
|
17
|
+
const versionStringToParse = (
|
|
18
|
+
version instanceof SemVer ? version.version : version
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
return parse(versionStringToParse, options)
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const doTruncation = (version, truncation) => {
|
|
25
|
+
if (isPrerelease(truncation)) {
|
|
26
|
+
return version.version
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
version.prerelease = []
|
|
30
|
+
|
|
31
|
+
switch (truncation) {
|
|
32
|
+
case 'major':
|
|
33
|
+
version.minor = 0
|
|
34
|
+
version.patch = 0
|
|
35
|
+
break
|
|
36
|
+
case 'minor':
|
|
37
|
+
version.patch = 0
|
|
38
|
+
break
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return version.format()
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const isPrerelease = (type) => {
|
|
45
|
+
return type.startsWith('pre')
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
module.exports = truncate
|
|
@@ -28,6 +28,7 @@ const gte = require('./functions/gte')
|
|
|
28
28
|
const lte = require('./functions/lte')
|
|
29
29
|
const cmp = require('./functions/cmp')
|
|
30
30
|
const coerce = require('./functions/coerce')
|
|
31
|
+
const truncate = require('./functions/truncate')
|
|
31
32
|
const Comparator = require('./classes/comparator')
|
|
32
33
|
const Range = require('./classes/range')
|
|
33
34
|
const satisfies = require('./functions/satisfies')
|
|
@@ -66,6 +67,7 @@ module.exports = {
|
|
|
66
67
|
lte,
|
|
67
68
|
cmp,
|
|
68
69
|
coerce,
|
|
70
|
+
truncate,
|
|
69
71
|
Comparator,
|
|
70
72
|
Range,
|
|
71
73
|
satisfies,
|
|
@@ -136,7 +136,7 @@ createToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`)
|
|
|
136
136
|
createToken('GTLT', '((?:<|>)?=?)')
|
|
137
137
|
|
|
138
138
|
// Something like "2.*" or "1.2.x".
|
|
139
|
-
// Note that "x.x" is a valid xRange
|
|
139
|
+
// Note that "x.x" is a valid xRange identifier, meaning "any version"
|
|
140
140
|
// Only the first item is strictly required.
|
|
141
141
|
createToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`)
|
|
142
142
|
createToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "semver",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.8.0",
|
|
4
4
|
"description": "The semantic version parser used by npm.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"@npmcli/eslint-config": "^6.0.0",
|
|
18
|
-
"@npmcli/template-oss": "
|
|
18
|
+
"@npmcli/template-oss": "5.0.0",
|
|
19
19
|
"benchmark": "^2.1.4",
|
|
20
20
|
"tap": "^16.0.0"
|
|
21
21
|
},
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"author": "GitHub Inc.",
|
|
53
53
|
"templateOSS": {
|
|
54
54
|
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
|
|
55
|
-
"version": "
|
|
55
|
+
"version": "5.0.0",
|
|
56
56
|
"engines": ">=10",
|
|
57
57
|
"distPaths": [
|
|
58
58
|
"classes/",
|
|
@@ -10,7 +10,8 @@ nr ::= '0' | [1-9] ( [0-9] ) *
|
|
|
10
10
|
tilde ::= '~' partial
|
|
11
11
|
caret ::= '^' partial
|
|
12
12
|
qualifier ::= ( '-' pre )? ( '+' build )?
|
|
13
|
-
pre ::=
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
pre ::= prepart ( '.' prepart ) *
|
|
14
|
+
prepart ::= nr | alphanumid
|
|
15
|
+
build ::= buildid ( '.' buildid ) *
|
|
16
|
+
alphanumid ::= ( [0-9] ) * [A-Za-z-] [-0-9A-Za-z] *
|
|
17
|
+
buildid ::= [-0-9A-Za-z]+
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "socks",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "2.8.
|
|
4
|
+
"version": "2.8.9",
|
|
5
5
|
"description": "Fully featured SOCKS proxy client supporting SOCKSv4, SOCKSv4a, and SOCKSv5. Includes Bind and Associate functionality.",
|
|
6
6
|
"main": "build/index.js",
|
|
7
7
|
"typings": "typings/index.d.ts",
|
|
8
8
|
"homepage": "https://github.com/JoshGlazebrook/socks/",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
|
-
"url": "https://github.com/JoshGlazebrook/socks.git"
|
|
11
|
+
"url": "git+https://github.com/JoshGlazebrook/socks.git"
|
|
12
12
|
},
|
|
13
13
|
"bugs": {
|
|
14
14
|
"url": "https://github.com/JoshGlazebrook/socks/issues"
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
# xml-naming
|
|
2
|
+
|
|
3
|
+
Validates XML name productions as defined in the [XML 1.0](https://www.w3.org/TR/xml/) and [XML 1.1](https://www.w3.org/TR/xml11/) specifications.
|
|
4
|
+
|
|
5
|
+
Covers all five productions:
|
|
6
|
+
|
|
7
|
+
| Production | Description | Colon | Digit/hyphen start |
|
|
8
|
+
|---|---|---|---|
|
|
9
|
+
| `Name` | General XML name | ✅ | ❌ |
|
|
10
|
+
| `NCName` | Non-Colonized name | ❌ | ❌ |
|
|
11
|
+
| `QName` | Namespace-qualified name (`prefix:local`) | ✅ (one only) | ❌ |
|
|
12
|
+
| `NMToken` | Name token (relaxed start) | ✅ | ✅ |
|
|
13
|
+
| `NMTokens` | Whitespace-separated NMToken list | ✅ | ✅ |
|
|
14
|
+
|
|
15
|
+
Used internally by [fast-xml-parser](https://github.com/NaturalIntelligence/fast-xml-parser), [fast-xml-validator](https://github.com/NaturalIntelligence/fast-xml-validator), [@nodable\flexible-xml-parser](https://github.com/nodable/flexible-xml-parser) and [fast-svg-parser](https://github.com/amitguptagwl/fast-svg-parser).
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Install
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npm install xml-naming
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Usage
|
|
28
|
+
|
|
29
|
+
### Boolean validators
|
|
30
|
+
|
|
31
|
+
```js
|
|
32
|
+
import { name, ncName, qName, nmToken, nmTokens } from 'xml-naming';
|
|
33
|
+
|
|
34
|
+
// Name — colon allowed anywhere, used for DOCTYPE entity names
|
|
35
|
+
name('foo') // true
|
|
36
|
+
name('a:b:c') // true ← multiple colons fine for Name
|
|
37
|
+
name('1foo') // false ← digit start invalid
|
|
38
|
+
|
|
39
|
+
// NCName — no colon, used for SVG id attributes, namespace prefixes
|
|
40
|
+
ncName('my-id') // true
|
|
41
|
+
ncName('xlink:href') // false ← colon not allowed
|
|
42
|
+
|
|
43
|
+
// QName — exactly one colon as prefix separator, used for element/attribute names
|
|
44
|
+
qName('svg:circle') // true
|
|
45
|
+
qName('foo') // true ← unprefixed QName is valid
|
|
46
|
+
qName('a:b:c') // false ← only one colon allowed
|
|
47
|
+
qName(':foo') // false ← cannot start with colon
|
|
48
|
+
|
|
49
|
+
// NMToken — any NameChar at start, used for DTD NMTOKEN attributes
|
|
50
|
+
nmToken('123') // true ← digit start is fine
|
|
51
|
+
nmToken('-bar') // true
|
|
52
|
+
nmToken('foo bar') // false ← space not allowed
|
|
53
|
+
|
|
54
|
+
// NMTokens — whitespace-separated NMToken list
|
|
55
|
+
nmTokens('tok1 tok2 -foo 123') // true
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### XML version option
|
|
59
|
+
|
|
60
|
+
All validators accept an optional `{ xmlVersion }` option:
|
|
61
|
+
|
|
62
|
+
```js
|
|
63
|
+
import { name } from 'xml-naming';
|
|
64
|
+
|
|
65
|
+
name('\u0085', { xmlVersion: '1.0' }) // false — NEL (Next Line), not in 1.0 ranges
|
|
66
|
+
name('\u0085', { xmlVersion: '1.1' }) // true — explicitly allowed in 1.1
|
|
67
|
+
|
|
68
|
+
name('\uD800\uDC00', { xmlVersion: '1.0' }) // false
|
|
69
|
+
name('\uD800\uDC00', { xmlVersion: '1.1' }) // true
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
### Diagnostic validation
|
|
75
|
+
|
|
76
|
+
```js
|
|
77
|
+
import { validate } from 'xml-naming';
|
|
78
|
+
|
|
79
|
+
validate('svg:circle', 'qName')
|
|
80
|
+
// { valid: true, production: 'qName', input: 'svg:circle' }
|
|
81
|
+
|
|
82
|
+
validate('1foo', 'ncName')
|
|
83
|
+
// {
|
|
84
|
+
// valid: false,
|
|
85
|
+
// production: 'ncName',
|
|
86
|
+
// input: '1foo',
|
|
87
|
+
// reason: 'First character "1" is not a valid NameStartChar',
|
|
88
|
+
// position: 0
|
|
89
|
+
// }
|
|
90
|
+
|
|
91
|
+
validate('foo:bar', 'ncName')
|
|
92
|
+
// {
|
|
93
|
+
// valid: false,
|
|
94
|
+
// production: 'ncName',
|
|
95
|
+
// input: 'foo:bar',
|
|
96
|
+
// reason: 'Colon is not allowed in NCName',
|
|
97
|
+
// position: 3
|
|
98
|
+
// }
|
|
99
|
+
|
|
100
|
+
validate('a:b:c', 'qName')
|
|
101
|
+
// {
|
|
102
|
+
// valid: false,
|
|
103
|
+
// production: 'qName',
|
|
104
|
+
// input: 'a:b:c',
|
|
105
|
+
// reason: 'QName can have at most one colon',
|
|
106
|
+
// position: 3
|
|
107
|
+
// }
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
### Batch validation
|
|
113
|
+
|
|
114
|
+
```js
|
|
115
|
+
import { validateAll } from 'xml-naming';
|
|
116
|
+
|
|
117
|
+
validateAll(['svg', 'circle', '123bad', 'xlink:href'], 'ncName')
|
|
118
|
+
// [
|
|
119
|
+
// { valid: true, production: 'ncName', input: 'svg' },
|
|
120
|
+
// { valid: true, production: 'ncName', input: 'circle' },
|
|
121
|
+
// { valid: false, production: 'ncName', input: '123bad', reason: '...', position: 0 },
|
|
122
|
+
// { valid: false, production: 'ncName', input: 'xlink:href',reason: '...', position: 5 }
|
|
123
|
+
// ]
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
### Sanitize / auto-fix
|
|
129
|
+
|
|
130
|
+
Useful when generating XML/SVG programmatically from user-supplied strings:
|
|
131
|
+
|
|
132
|
+
```js
|
|
133
|
+
import { sanitize } from 'xml-naming';
|
|
134
|
+
|
|
135
|
+
sanitize('123abc', 'ncName') // '_123abc' ← digit start fixed
|
|
136
|
+
sanitize('my element','name') // 'my_element' ← space replaced
|
|
137
|
+
sanitize('foo:bar', 'ncName') // 'foobar' ← colon stripped
|
|
138
|
+
sanitize('hello!', 'name') // 'hello_' ← illegal char replaced
|
|
139
|
+
|
|
140
|
+
// Custom replacement character
|
|
141
|
+
sanitize('my element', 'name', { replacement: '-' }) // 'my-element'
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## Which production should I use?
|
|
147
|
+
|
|
148
|
+
| Context | Production |
|
|
149
|
+
|---|---|
|
|
150
|
+
| XML element/attribute names (namespace-aware) | `qName` |
|
|
151
|
+
| SVG `id` attribute values | `ncName` |
|
|
152
|
+
| Namespace prefix alone | `ncName` |
|
|
153
|
+
| DOCTYPE `<!ENTITY name ...>` | `name` |
|
|
154
|
+
| DOCTYPE `<!NOTATION name ...>` | `name` |
|
|
155
|
+
| DTD `NMTOKEN` attribute values | `nmToken` |
|
|
156
|
+
| DTD `NMTOKENS` attribute values | `nmTokens` |
|
|
157
|
+
|
|
158
|
+
> **Note:** DOCTYPE entity and notation names must use `Name`, not `QName`. Colons carry no namespace meaning in the DTD subset.
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## API
|
|
163
|
+
|
|
164
|
+
### `name(str, opts?)` → `boolean`
|
|
165
|
+
### `ncName(str, opts?)` → `boolean`
|
|
166
|
+
### `qName(str, opts?)` → `boolean`
|
|
167
|
+
### `nmToken(str, opts?)` → `boolean`
|
|
168
|
+
### `nmTokens(str, opts?)` → `boolean`
|
|
169
|
+
|
|
170
|
+
`opts`:
|
|
171
|
+
- `xmlVersion`: `'1.0'` (default) | `'1.1'`
|
|
172
|
+
|
|
173
|
+
### `validate(str, production, opts?)` → `ValidationResult`
|
|
174
|
+
|
|
175
|
+
`production`: `'name'` | `'ncName'` | `'qName'` | `'nmToken'` | `'nmTokens'`
|
|
176
|
+
|
|
177
|
+
### `validateAll(strings[], production, opts?)` → `ValidationResult[]`
|
|
178
|
+
|
|
179
|
+
### `sanitize(str, production?, opts?)` → `string`
|
|
180
|
+
|
|
181
|
+
`opts`:
|
|
182
|
+
- `xmlVersion`: `'1.0'` | `'1.1'`
|
|
183
|
+
- `replacement`: string (default `'_'`)
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
## License
|
|
188
|
+
|
|
189
|
+
MIT
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "xml-naming",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Validates XML name productions — Name, NCName, QName, NMToken, NMTokens — for XML 1.0 and 1.1",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./src/index.js",
|
|
7
|
+
"types": "./src/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./src/index.js",
|
|
11
|
+
"types": "./src/index.d.ts"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"src",
|
|
16
|
+
"README.md"
|
|
17
|
+
],
|
|
18
|
+
"scripts": {
|
|
19
|
+
"test": "jasmine specs/*spec.js"
|
|
20
|
+
},
|
|
21
|
+
"keywords": [
|
|
22
|
+
"xml",
|
|
23
|
+
"xml-name",
|
|
24
|
+
"ncname",
|
|
25
|
+
"qname",
|
|
26
|
+
"nmtoken",
|
|
27
|
+
"xml-validation",
|
|
28
|
+
"xml-namespace",
|
|
29
|
+
"name-validator",
|
|
30
|
+
"xml-1.0",
|
|
31
|
+
"xml-1.1"
|
|
32
|
+
],
|
|
33
|
+
"author": "Amit Gupta (https://solothought.com)",
|
|
34
|
+
"license": "MIT",
|
|
35
|
+
"funding": [
|
|
36
|
+
{
|
|
37
|
+
"type": "github",
|
|
38
|
+
"url": "https://github.com/sponsors/NaturalIntelligence"
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"jasmine": "^5.0.0"
|
|
43
|
+
},
|
|
44
|
+
"engines": {
|
|
45
|
+
"node": ">=16.0.0"
|
|
46
|
+
},
|
|
47
|
+
"repository": {
|
|
48
|
+
"type": "git",
|
|
49
|
+
"url": "https://github.com/NaturalIntelligence/xml-naming"
|
|
50
|
+
},
|
|
51
|
+
"bugs": {
|
|
52
|
+
"url": "https://github.com/NaturalIntelligence/xml-naming/issues"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
export interface ValidationOptions {
|
|
2
|
+
/** XML specification version to validate against. Defaults to '1.0'. */
|
|
3
|
+
xmlVersion?: '1.0' | '1.1';
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export interface SanitizeOptions extends ValidationOptions {
|
|
7
|
+
/** Character used to replace invalid characters. Defaults to '_'. */
|
|
8
|
+
replacement?: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export type Production = 'name' | 'ncName' | 'qName' | 'nmToken' | 'nmTokens';
|
|
12
|
+
|
|
13
|
+
export interface ValidationResult {
|
|
14
|
+
valid: boolean;
|
|
15
|
+
production: Production;
|
|
16
|
+
input: string;
|
|
17
|
+
/** Present only when valid is false. */
|
|
18
|
+
reason?: string;
|
|
19
|
+
/** Index of the first offending character. Present only when valid is false. */
|
|
20
|
+
position?: number;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Returns true if the string is a valid XML Name.
|
|
25
|
+
* Colons are permitted anywhere (Name production).
|
|
26
|
+
* Used for: DOCTYPE entity names, notation names, DTD element declarations.
|
|
27
|
+
*/
|
|
28
|
+
export function name(str: string, opts?: ValidationOptions): boolean;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Returns true if the string is a valid NCName (Non-Colonized Name).
|
|
32
|
+
* Colons are not permitted.
|
|
33
|
+
* Used for: namespace prefixes, local names, SVG id attributes.
|
|
34
|
+
*/
|
|
35
|
+
export function ncName(str: string, opts?: ValidationOptions): boolean;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Returns true if the string is a valid QName (Qualified Name).
|
|
39
|
+
* Allows exactly one colon as a prefix separator: prefix:localName.
|
|
40
|
+
* Used for: element and attribute names in namespace-aware XML/SVG.
|
|
41
|
+
*/
|
|
42
|
+
export function qName(str: string, opts?: ValidationOptions): boolean;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Returns true if the string is a valid NMToken.
|
|
46
|
+
* Same character set as Name but no restriction on the first character.
|
|
47
|
+
* Used for: DTD NMTOKEN attribute values.
|
|
48
|
+
*/
|
|
49
|
+
export function nmToken(str: string, opts?: ValidationOptions): boolean;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Returns true if the string is a valid NMTokens value.
|
|
53
|
+
* A whitespace-separated list of NMToken values.
|
|
54
|
+
* Used for: DTD NMTOKENS attribute values.
|
|
55
|
+
*/
|
|
56
|
+
export function nmTokens(str: string, opts?: ValidationOptions): boolean;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Validates a string against a named XML production and returns a detailed result.
|
|
60
|
+
*/
|
|
61
|
+
export function validate(str: string, production: Production, opts?: ValidationOptions): ValidationResult;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Validates an array of strings against a named XML production.
|
|
65
|
+
*/
|
|
66
|
+
export function validateAll(strings: string[], production: Production, opts?: ValidationOptions): ValidationResult[];
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Transforms an invalid string into the nearest valid XML name for the given production.
|
|
70
|
+
* - Strips or replaces illegal characters
|
|
71
|
+
* - Fixes invalid start characters by prepending the replacement character
|
|
72
|
+
* - Removes colons for NCName production
|
|
73
|
+
*/
|
|
74
|
+
export function sanitize(str: string, production?: Production, opts?: SanitizeOptions): string;
|