@qqbrowser/qbot-dsh 0.0.15 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config/agent-presets/code/agent.cordis.yml +2 -2
- package/config/agent-presets/standard/agent.cordis.yml +2 -2
- package/node_modules/@deepseek-ai/cordis-plugin-hmr/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-agent/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-agent-default-model/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-agent-instructions/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-agent-loop/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-agent-presets/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-agent-tool-presentation/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-anonymous-user-id/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-api-gateway/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-api-remotes/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-app-boot/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-atomic-write/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-attachment/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-attachment/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-attachment-local/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-base/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-bash-local/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-bash-sandbox/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-brand/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-connection/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-connection/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-hmr/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-locale/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-locale/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-modules/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-runtime/lib/client.js +4 -4
- package/node_modules/@deepseek-ai/dsh-client-runtime/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-schema-form/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-attachment/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-commands/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-commands/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/client.js +8 -8
- package/node_modules/@deepseek-ai/dsh-client-ui-conversation/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-cordis/lib/client.js +3 -3
- package/node_modules/@deepseek-ai/dsh-client-ui-cordis/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-browse/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-browse/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-native/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-goal/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-goal/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-input-trigger/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-input-trigger/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-jobs/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-jobs/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-layout/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-layout/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-message-feedback/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-message-feedback/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-permission-presets/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-permission-presets/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-plan/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-plan/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/index.js +22 -22
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/lib/client.js +3 -3
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-skill/lib/client.js +3 -3
- package/node_modules/@deepseek-ai/dsh-client-ui-skill/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-slots/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-subagent/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-subagent/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-theme/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-theme/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-tool/lib/client.js +4 -4
- package/node_modules/@deepseek-ai/dsh-client-ui-tool/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/lib/client.js +14 -14
- package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-workspace/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-web/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-web-react/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-cmdline/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-code-runtime/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-code-runtime-worker-thread/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-command-compact/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-command-feedback/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-command-goal/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-commands/lib/typert.host.js +5 -2
- package/node_modules/@deepseek-ai/dsh-commands/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-compaction/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-compaction-basic/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-compaction-tool-result-pruner/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-content-review/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-cordis-client-runner/lib/client.js +4 -4
- package/node_modules/@deepseek-ai/dsh-cordis-client-runner/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-cordis-host-runner/lib/typert.host.js +10 -4
- package/node_modules/@deepseek-ai/dsh-cordis-host-runner/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-credentials/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-credentials-local/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-fs/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-fs-local/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-fs-observation-policy/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-fs-sandbox/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-goal/lib/typert.host.js +5 -2
- package/node_modules/@deepseek-ai/dsh-goal/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-goal-round-driver/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-headless/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-home-paths/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-home-quarantine-macos/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-host-apiproxy/lib/index.js +7 -7
- package/node_modules/@deepseek-ai/dsh-host-apiproxy/lib/types/api/rpc.schema.js +1 -1
- package/node_modules/@deepseek-ai/dsh-host-apiproxy/lib/types/api-proxy.js +1 -1
- package/node_modules/@deepseek-ai/dsh-host-apiproxy/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-host-directory-picker/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-host-directory-picker-auto/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-host-directory-picker-browse/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-host-directory-picker-native/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-host-frontend-static/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-host-plugin-inventory/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-host-webserver/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-invariants/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-jobs/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-jobs-local/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-launch-environment/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-llm/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-llm/lib/types/assembler.js +1 -1
- package/node_modules/@deepseek-ai/dsh-llm/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-llm-deepseek/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-llm-gateway-openai/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-llm-pi-ai/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-llm-pi-ai/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-llm-retry/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-mcp-client/lib/index.js +3 -2
- package/node_modules/@deepseek-ai/dsh-mcp-client/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-message-feedback/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-native-command/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-output-retention/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-permission-presets/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-persona/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-plan-mode/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-pwsh-local/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-pwsh-sandbox/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-qb-auth/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-repeat-tool-reminder/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-sandbox/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-sandbox-local/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-sandbox-policy/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-schedule/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-scope/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session-checkpoint-policy/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session-log-export/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-session-log-export/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session-persistence/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session-projection/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session-projection-cache/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session-query/lib/index.js +2 -2
- package/node_modules/@deepseek-ai/dsh-session-query/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session-query-sqlite/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session-reference/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session-stats/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session-telemetry/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session-telemetry-otel/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session-title/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session-title-first-prompt-llm/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session-title-llm/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-settings/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-settings-file/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-shell/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-shell-env/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-skill/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-skill-badge/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-skill-filesystem/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-spill/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-spill-local/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-spill-policy/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-storage/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-storage-domain/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-storage-json/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-subagent/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-subagent-fork-in-process/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-subagent-in-process-driver/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-subagent-spawn-in-process/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-subprocess/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-subprocess-local/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-system-prompt/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-terminal/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-terminal-bash/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-terminal-bash/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-time-context/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-timeout/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tmux-context/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-token-meter/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-ask-user/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-bash/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-bash-persistent/lib/index.js +7 -10
- package/node_modules/@deepseek-ai/dsh-tool-bash-persistent/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-call-timeout-policy/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-cordis/lib/index.js +5 -2
- package/node_modules/@deepseek-ai/dsh-tool-cordis/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-fs/lib/index.js +8 -8
- package/node_modules/@deepseek-ai/dsh-tool-fs/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-fs-search/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-goal/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-jobs/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-pwsh/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-ralph/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-skill/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-str-replace-editor/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-subagent/lib/index.js +2 -2
- package/node_modules/@deepseek-ai/dsh-tool-subagent/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-subagent-control/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-subagent-report/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-todo/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-web/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-workflow/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tools/lib/index.js +15 -15
- package/node_modules/@deepseek-ai/dsh-tools/lib/types/code-mode.js +8 -8
- package/node_modules/@deepseek-ai/dsh-tools/lib/types/py-types.js +3 -3
- package/node_modules/@deepseek-ai/dsh-tools/lib/types/ts-types.js +4 -4
- package/node_modules/@deepseek-ai/dsh-tools/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-typert-loader/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-typert-protocol/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-typert-registry/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-user-approval/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-user-questions/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-web/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-web-app/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/{index-BQQQ5Qt-.js → index-fPGOmJjK.js} +25 -25
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/index.html +1 -1
- package/node_modules/@deepseek-ai/dsh-web-frontend/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-web-search-deepseek/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-web-search-dsh/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-workflow/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-workflow-worker-thread/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-workspace/package.json +1 -1
- package/node_modules/@tanstack/react-virtual/package.json +1 -1
- package/node_modules/@tanstack/virtual-core/dist/cjs/index.cjs +7 -1
- package/node_modules/@tanstack/virtual-core/dist/cjs/utils.cjs +14 -4
- package/node_modules/@tanstack/virtual-core/dist/esm/index.js +1 -1
- package/node_modules/@tanstack/virtual-core/dist/esm/utils.js +2 -2
- package/node_modules/@tanstack/virtual-core/package.json +1 -1
- package/node_modules/hono/dist/cjs/client/utils.js +1 -1
- package/node_modules/hono/dist/cjs/context.js +4 -0
- package/node_modules/hono/dist/cjs/middleware/cors/index.js +1 -1
- package/node_modules/hono/dist/cjs/middleware/csrf/index.js +1 -1
- package/node_modules/hono/dist/cjs/middleware/etag/digest.js +1 -1
- package/node_modules/hono/dist/cjs/middleware/etag/index.js +2 -2
- package/node_modules/hono/dist/cjs/middleware/pretty-json/index.js +3 -1
- package/node_modules/hono/dist/cjs/router/linear-router/router.js +7 -2
- package/node_modules/hono/dist/cjs/router/pattern-router/router.js +3 -9
- package/node_modules/hono/dist/cjs/router/trie-router/node.js +43 -67
- package/node_modules/hono/dist/cjs/router/trie-router/router.js +3 -11
- package/node_modules/hono/dist/cjs/utils/ipaddr.js +5 -3
- package/node_modules/hono/dist/client/utils.js +1 -1
- package/node_modules/hono/dist/middleware/cors/index.js +1 -1
- package/node_modules/hono/dist/middleware/csrf/index.js +1 -1
- package/node_modules/hono/dist/middleware/etag/digest.js +1 -1
- package/node_modules/hono/dist/middleware/etag/index.js +1 -1
- package/node_modules/hono/dist/middleware/pretty-json/index.js +1 -1
- package/node_modules/hono/dist/router/linear-router/router.js +1 -1
- package/node_modules/hono/dist/router/pattern-router/router.js +1 -1
- package/node_modules/hono/dist/router/trie-router/node.js +1 -1
- package/node_modules/hono/dist/router/trie-router/router.js +1 -1
- package/node_modules/hono/dist/utils/ipaddr.js +1 -1
- package/node_modules/hono/package.json +1 -1
- package/node_modules/node-pty/lib/conpty_console_list_agent.js +11 -2
- package/node_modules/node-pty/lib/index.js +6 -6
- package/node_modules/node-pty/lib/shared/conout.js +2 -3
- package/node_modules/node-pty/lib/terminal.js +2 -2
- package/node_modules/node-pty/lib/unixTerminal.js +11 -6
- package/node_modules/node-pty/lib/utils.js +6 -7
- package/node_modules/node-pty/lib/windowsConoutConnection.js +24 -18
- package/node_modules/node-pty/lib/windowsPtyAgent.js +125 -101
- package/node_modules/node-pty/lib/windowsTerminal.js +14 -4
- package/node_modules/node-pty/lib/worker/conoutSocketWorker.js +3 -3
- package/node_modules/node-pty/package.json +1 -1
- package/node_modules/node-pty/prebuilds/darwin-arm64/pty.node +0 -0
- package/node_modules/node-pty/prebuilds/darwin-arm64/spawn-helper +0 -0
- package/node_modules/node-pty/prebuilds/darwin-x64/pty.node +0 -0
- package/node_modules/node-pty/prebuilds/darwin-x64/spawn-helper +0 -0
- package/node_modules/node-pty/prebuilds/win32-x64/conpty/OpenConsole.exe +0 -0
- package/node_modules/node-pty/prebuilds/win32-x64/conpty/conpty.dll +0 -0
- package/node_modules/node-pty/prebuilds/win32-x64/conpty.node +0 -0
- package/node_modules/node-pty/prebuilds/win32-x64/conpty_console_list.node +0 -0
- package/node_modules/node-pty/scripts/post-install.js +1 -5
- package/node_modules/node-pty/third_party/conpty/1.25.260303002/win10-arm64/OpenConsole.exe +0 -0
- package/node_modules/node-pty/third_party/conpty/{1.23.251008001 → 1.25.260303002}/win10-arm64/conpty.dll +0 -0
- package/node_modules/node-pty/third_party/conpty/1.25.260303002/win10-x64/OpenConsole.exe +0 -0
- package/node_modules/node-pty/third_party/conpty/1.25.260303002/win10-x64/conpty.dll +0 -0
- package/package.json +1 -1
- package/node_modules/node-pty/deps/winpty/.drone.yml +0 -15
- package/node_modules/node-pty/deps/winpty/LICENSE +0 -21
- package/node_modules/node-pty/deps/winpty/configure +0 -167
- package/node_modules/node-pty/deps/winpty/misc/ConinMode.ps1 +0 -116
- package/node_modules/node-pty/deps/winpty/misc/IdentifyConsoleWindow.ps1 +0 -51
- package/node_modules/node-pty/deps/winpty/misc/build32.sh +0 -9
- package/node_modules/node-pty/deps/winpty/misc/build64.sh +0 -9
- package/node_modules/node-pty/deps/winpty/misc/color-test.sh +0 -212
- package/node_modules/node-pty/deps/winpty/ship/build-pty4j-libpty.bat +0 -36
- package/node_modules/node-pty/deps/winpty/src/shared/GetCommitHash.bat +0 -13
- package/node_modules/node-pty/deps/winpty/src/shared/UpdateGenVersion.bat +0 -20
- package/node_modules/node-pty/deps/winpty/vcbuild.bat +0 -83
- package/node_modules/node-pty/lib/eventEmitter2.test.js +0 -30
- package/node_modules/node-pty/lib/terminal.test.js +0 -139
- package/node_modules/node-pty/lib/testUtils.test.js +0 -28
- package/node_modules/node-pty/lib/unixTerminal.test.js +0 -351
- package/node_modules/node-pty/lib/windowsPtyAgent.test.js +0 -90
- package/node_modules/node-pty/lib/windowsTerminal.test.js +0 -219
- package/node_modules/node-pty/prebuilds/win32-x64/pty.node +0 -0
- package/node_modules/node-pty/prebuilds/win32-x64/winpty-agent.exe +0 -0
- package/node_modules/node-pty/prebuilds/win32-x64/winpty.dll +0 -0
- package/node_modules/node-pty/scripts/gen-compile-commands.js +0 -8
- package/node_modules/node-pty/scripts/increment-version.js +0 -54
- package/node_modules/node-pty/third_party/conpty/1.23.251008001/win10-arm64/OpenConsole.exe +0 -0
- package/node_modules/node-pty/third_party/conpty/1.23.251008001/win10-x64/OpenConsole.exe +0 -0
- package/node_modules/node-pty/third_party/conpty/1.23.251008001/win10-x64/conpty.dll +0 -0
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Copyright (c) 2017, Daniel Imms (MIT License).
|
|
4
|
-
* Copyright (c) 2018, Microsoft Corporation (MIT License).
|
|
5
|
-
*/
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
var assert = require("assert");
|
|
8
|
-
var windowsPtyAgent_1 = require("./windowsPtyAgent");
|
|
9
|
-
function check(file, args, expected) {
|
|
10
|
-
assert.equal(windowsPtyAgent_1.argsToCommandLine(file, args), expected);
|
|
11
|
-
}
|
|
12
|
-
if (process.platform === 'win32') {
|
|
13
|
-
describe('argsToCommandLine', function () {
|
|
14
|
-
describe('Plain strings', function () {
|
|
15
|
-
it('doesn\'t quote plain string', function () {
|
|
16
|
-
check('asdf', [], 'asdf');
|
|
17
|
-
});
|
|
18
|
-
it('doesn\'t escape backslashes', function () {
|
|
19
|
-
check('\\asdf\\qwer\\', [], '\\asdf\\qwer\\');
|
|
20
|
-
});
|
|
21
|
-
it('doesn\'t escape multiple backslashes', function () {
|
|
22
|
-
check('asdf\\\\qwer', [], 'asdf\\\\qwer');
|
|
23
|
-
});
|
|
24
|
-
it('adds backslashes before quotes', function () {
|
|
25
|
-
check('"asdf"qwer"', [], '\\"asdf\\"qwer\\"');
|
|
26
|
-
});
|
|
27
|
-
it('escapes backslashes before quotes', function () {
|
|
28
|
-
check('asdf\\"qwer', [], 'asdf\\\\\\"qwer');
|
|
29
|
-
});
|
|
30
|
-
});
|
|
31
|
-
describe('Quoted strings', function () {
|
|
32
|
-
it('quotes string with spaces', function () {
|
|
33
|
-
check('asdf qwer', [], '"asdf qwer"');
|
|
34
|
-
});
|
|
35
|
-
it('quotes empty string', function () {
|
|
36
|
-
check('', [], '""');
|
|
37
|
-
});
|
|
38
|
-
it('quotes string with tabs', function () {
|
|
39
|
-
check('asdf\tqwer', [], '"asdf\tqwer"');
|
|
40
|
-
});
|
|
41
|
-
it('escapes only the last backslash', function () {
|
|
42
|
-
check('\\asdf \\qwer\\', [], '"\\asdf \\qwer\\\\"');
|
|
43
|
-
});
|
|
44
|
-
it('doesn\'t escape multiple backslashes', function () {
|
|
45
|
-
check('asdf \\\\qwer', [], '"asdf \\\\qwer"');
|
|
46
|
-
});
|
|
47
|
-
it('escapes backslashes before quotes', function () {
|
|
48
|
-
check('asdf \\"qwer', [], '"asdf \\\\\\"qwer"');
|
|
49
|
-
});
|
|
50
|
-
it('escapes multiple backslashes at the end', function () {
|
|
51
|
-
check('asdf qwer\\\\', [], '"asdf qwer\\\\\\\\"');
|
|
52
|
-
});
|
|
53
|
-
});
|
|
54
|
-
describe('Multiple arguments', function () {
|
|
55
|
-
it('joins arguments with spaces', function () {
|
|
56
|
-
check('asdf', ['qwer zxcv', '', '"'], 'asdf "qwer zxcv" "" \\"');
|
|
57
|
-
});
|
|
58
|
-
it('array argument all in quotes', function () {
|
|
59
|
-
check('asdf', ['"surounded by quotes"'], 'asdf \\"surounded by quotes\\"');
|
|
60
|
-
});
|
|
61
|
-
it('array argument quotes in the middle', function () {
|
|
62
|
-
check('asdf', ['quotes "in the" middle'], 'asdf "quotes \\"in the\\" middle"');
|
|
63
|
-
});
|
|
64
|
-
it('array argument quotes near start', function () {
|
|
65
|
-
check('asdf', ['"quotes" near start'], 'asdf "\\"quotes\\" near start"');
|
|
66
|
-
});
|
|
67
|
-
it('array argument quotes near end', function () {
|
|
68
|
-
check('asdf', ['quotes "near end"'], 'asdf "quotes \\"near end\\""');
|
|
69
|
-
});
|
|
70
|
-
});
|
|
71
|
-
describe('Args as CommandLine', function () {
|
|
72
|
-
it('should handle empty string', function () {
|
|
73
|
-
check('file', '', 'file');
|
|
74
|
-
});
|
|
75
|
-
it('should not change args', function () {
|
|
76
|
-
check('file', 'foo bar baz', 'file foo bar baz');
|
|
77
|
-
check('file', 'foo \\ba"r \baz', 'file foo \\ba"r \baz');
|
|
78
|
-
});
|
|
79
|
-
});
|
|
80
|
-
describe('Real-world cases', function () {
|
|
81
|
-
it('quotes within quotes', function () {
|
|
82
|
-
check('cmd.exe', ['/c', 'powershell -noexit -command \'Set-location \"C:\\user\"\''], 'cmd.exe /c "powershell -noexit -command \'Set-location \\\"C:\\user\\"\'"');
|
|
83
|
-
});
|
|
84
|
-
it('space within quotes', function () {
|
|
85
|
-
check('cmd.exe', ['/k', '"C:\\Users\\alros\\Desktop\\test script.bat"'], 'cmd.exe /k \\"C:\\Users\\alros\\Desktop\\test script.bat\\"');
|
|
86
|
-
});
|
|
87
|
-
});
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
//# sourceMappingURL=windowsPtyAgent.test.js.map
|
|
@@ -1,219 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Copyright (c) 2017, Daniel Imms (MIT License).
|
|
4
|
-
* Copyright (c) 2018, Microsoft Corporation (MIT License).
|
|
5
|
-
*/
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
var fs = require("fs");
|
|
8
|
-
var assert = require("assert");
|
|
9
|
-
var windowsTerminal_1 = require("./windowsTerminal");
|
|
10
|
-
var path = require("path");
|
|
11
|
-
var psList = require("ps-list");
|
|
12
|
-
function pollForProcessState(desiredState, intervalMs, timeoutMs) {
|
|
13
|
-
if (intervalMs === void 0) { intervalMs = 100; }
|
|
14
|
-
if (timeoutMs === void 0) { timeoutMs = 2000; }
|
|
15
|
-
return new Promise(function (resolve) {
|
|
16
|
-
var tries = 0;
|
|
17
|
-
var interval = setInterval(function () {
|
|
18
|
-
psList({ all: true }).then(function (ps) {
|
|
19
|
-
var success = true;
|
|
20
|
-
var pids = Object.keys(desiredState).map(function (k) { return parseInt(k, 10); });
|
|
21
|
-
console.log('expected pids', JSON.stringify(pids));
|
|
22
|
-
pids.forEach(function (pid) {
|
|
23
|
-
if (desiredState[pid]) {
|
|
24
|
-
if (!ps.some(function (p) { return p.pid === pid; })) {
|
|
25
|
-
console.log("pid " + pid + " does not exist");
|
|
26
|
-
success = false;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
else {
|
|
30
|
-
if (ps.some(function (p) { return p.pid === pid; })) {
|
|
31
|
-
console.log("pid " + pid + " still exists");
|
|
32
|
-
success = false;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
if (success) {
|
|
37
|
-
clearInterval(interval);
|
|
38
|
-
resolve();
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
tries++;
|
|
42
|
-
if (tries * intervalMs >= timeoutMs) {
|
|
43
|
-
clearInterval(interval);
|
|
44
|
-
var processListing = pids.map(function (k) { return k + ": " + desiredState[k]; }).join('\n');
|
|
45
|
-
assert.fail("Bad process state, expected:\n" + processListing);
|
|
46
|
-
resolve();
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
}, intervalMs);
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
function pollForProcessTreeSize(pid, size, intervalMs, timeoutMs) {
|
|
53
|
-
if (intervalMs === void 0) { intervalMs = 100; }
|
|
54
|
-
if (timeoutMs === void 0) { timeoutMs = 2000; }
|
|
55
|
-
return new Promise(function (resolve) {
|
|
56
|
-
var tries = 0;
|
|
57
|
-
var interval = setInterval(function () {
|
|
58
|
-
psList({ all: true }).then(function (ps) {
|
|
59
|
-
var openList = [];
|
|
60
|
-
openList.push(ps.filter(function (p) { return p.pid === pid; }).map(function (p) {
|
|
61
|
-
return { name: p.name, pid: p.pid };
|
|
62
|
-
})[0]);
|
|
63
|
-
var list = [];
|
|
64
|
-
var _loop_1 = function () {
|
|
65
|
-
var current = openList.shift();
|
|
66
|
-
ps.filter(function (p) { return p.ppid === current.pid; }).map(function (p) {
|
|
67
|
-
return { name: p.name, pid: p.pid };
|
|
68
|
-
}).forEach(function (p) { return openList.push(p); });
|
|
69
|
-
list.push(current);
|
|
70
|
-
};
|
|
71
|
-
while (openList.length) {
|
|
72
|
-
_loop_1();
|
|
73
|
-
}
|
|
74
|
-
console.log('list', JSON.stringify(list));
|
|
75
|
-
var success = list.length === size;
|
|
76
|
-
if (success) {
|
|
77
|
-
clearInterval(interval);
|
|
78
|
-
resolve(list);
|
|
79
|
-
return;
|
|
80
|
-
}
|
|
81
|
-
tries++;
|
|
82
|
-
if (tries * intervalMs >= timeoutMs) {
|
|
83
|
-
clearInterval(interval);
|
|
84
|
-
assert.fail("Bad process state, expected: " + size + ", actual: " + list.length);
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
}, intervalMs);
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
if (process.platform === 'win32') {
|
|
91
|
-
[[false, false], [true, false], [true, true]].forEach(function (_a) {
|
|
92
|
-
var useConpty = _a[0], useConptyDll = _a[1];
|
|
93
|
-
describe("WindowsTerminal (useConpty = " + useConpty + ", useConptyDll = " + useConptyDll + ")", function () {
|
|
94
|
-
describe('kill', function () {
|
|
95
|
-
it('should not crash parent process', function (done) {
|
|
96
|
-
this.timeout(20000);
|
|
97
|
-
var term = new windowsTerminal_1.WindowsTerminal('cmd.exe', [], { useConpty: useConpty, useConptyDll: useConptyDll });
|
|
98
|
-
term.on('exit', function () { return done(); });
|
|
99
|
-
term.kill();
|
|
100
|
-
});
|
|
101
|
-
it('should kill the process tree', function (done) {
|
|
102
|
-
this.timeout(20000);
|
|
103
|
-
var term = new windowsTerminal_1.WindowsTerminal('cmd.exe', [], { useConpty: useConpty, useConptyDll: useConptyDll });
|
|
104
|
-
// Start sub-processes
|
|
105
|
-
term.write('powershell.exe\r');
|
|
106
|
-
term.write('node.exe\r');
|
|
107
|
-
console.log('start poll for tree size');
|
|
108
|
-
pollForProcessTreeSize(term.pid, 3, 500, 5000).then(function (list) {
|
|
109
|
-
assert.strictEqual(list[0].name.toLowerCase(), 'cmd.exe');
|
|
110
|
-
assert.strictEqual(list[1].name.toLowerCase(), 'powershell.exe');
|
|
111
|
-
assert.strictEqual(list[2].name.toLowerCase(), 'node.exe');
|
|
112
|
-
term.kill();
|
|
113
|
-
var desiredState = {};
|
|
114
|
-
desiredState[list[0].pid] = false;
|
|
115
|
-
desiredState[list[1].pid] = false;
|
|
116
|
-
desiredState[list[2].pid] = false;
|
|
117
|
-
term.on('exit', function () {
|
|
118
|
-
pollForProcessState(desiredState, 1000, 5000).then(function () {
|
|
119
|
-
done();
|
|
120
|
-
});
|
|
121
|
-
});
|
|
122
|
-
});
|
|
123
|
-
});
|
|
124
|
-
});
|
|
125
|
-
describe('resize', function () {
|
|
126
|
-
it('should throw a non-native exception when resizing an invalid value', function (done) {
|
|
127
|
-
this.timeout(20000);
|
|
128
|
-
var term = new windowsTerminal_1.WindowsTerminal('cmd.exe', [], { useConpty: useConpty, useConptyDll: useConptyDll });
|
|
129
|
-
assert.throws(function () { return term.resize(-1, -1); });
|
|
130
|
-
assert.throws(function () { return term.resize(0, 0); });
|
|
131
|
-
assert.doesNotThrow(function () { return term.resize(1, 1); });
|
|
132
|
-
term.on('exit', function () {
|
|
133
|
-
done();
|
|
134
|
-
});
|
|
135
|
-
term.kill();
|
|
136
|
-
});
|
|
137
|
-
it('should throw a non-native exception when resizing a killed terminal', function (done) {
|
|
138
|
-
this.timeout(20000);
|
|
139
|
-
var term = new windowsTerminal_1.WindowsTerminal('cmd.exe', [], { useConpty: useConpty, useConptyDll: useConptyDll });
|
|
140
|
-
term._defer(function () {
|
|
141
|
-
term.once('exit', function () {
|
|
142
|
-
assert.throws(function () { return term.resize(1, 1); });
|
|
143
|
-
done();
|
|
144
|
-
});
|
|
145
|
-
term.destroy();
|
|
146
|
-
});
|
|
147
|
-
});
|
|
148
|
-
});
|
|
149
|
-
describe('Args as CommandLine', function () {
|
|
150
|
-
it('should not fail running a file containing a space in the path', function (done) {
|
|
151
|
-
this.timeout(10000);
|
|
152
|
-
var spaceFolder = path.resolve(__dirname, '..', 'fixtures', 'space folder');
|
|
153
|
-
if (!fs.existsSync(spaceFolder)) {
|
|
154
|
-
fs.mkdirSync(spaceFolder);
|
|
155
|
-
}
|
|
156
|
-
var cmdCopiedPath = path.resolve(spaceFolder, 'cmd.exe');
|
|
157
|
-
var data = fs.readFileSync(process.env.windir + "\\System32\\cmd.exe");
|
|
158
|
-
fs.writeFileSync(cmdCopiedPath, data);
|
|
159
|
-
if (!fs.existsSync(cmdCopiedPath)) {
|
|
160
|
-
// Skip test if git bash isn't installed
|
|
161
|
-
return;
|
|
162
|
-
}
|
|
163
|
-
var term = new windowsTerminal_1.WindowsTerminal(cmdCopiedPath, '/c echo "hello world"', { useConpty: useConpty, useConptyDll: useConptyDll });
|
|
164
|
-
var result = '';
|
|
165
|
-
term.on('data', function (data) {
|
|
166
|
-
result += data;
|
|
167
|
-
});
|
|
168
|
-
term.on('exit', function () {
|
|
169
|
-
assert.ok(result.indexOf('hello world') >= 1);
|
|
170
|
-
done();
|
|
171
|
-
});
|
|
172
|
-
});
|
|
173
|
-
});
|
|
174
|
-
describe('env', function () {
|
|
175
|
-
it('should set environment variables of the shell', function (done) {
|
|
176
|
-
this.timeout(10000);
|
|
177
|
-
var term = new windowsTerminal_1.WindowsTerminal('cmd.exe', '/C echo %FOO%', { useConpty: useConpty, useConptyDll: useConptyDll, env: { FOO: 'BAR' } });
|
|
178
|
-
var result = '';
|
|
179
|
-
term.on('data', function (data) {
|
|
180
|
-
result += data;
|
|
181
|
-
});
|
|
182
|
-
term.on('exit', function () {
|
|
183
|
-
assert.ok(result.indexOf('BAR') >= 0);
|
|
184
|
-
done();
|
|
185
|
-
});
|
|
186
|
-
});
|
|
187
|
-
});
|
|
188
|
-
describe('On close', function () {
|
|
189
|
-
it('should return process zero exit codes', function (done) {
|
|
190
|
-
this.timeout(10000);
|
|
191
|
-
var term = new windowsTerminal_1.WindowsTerminal('cmd.exe', '/C exit', { useConpty: useConpty, useConptyDll: useConptyDll });
|
|
192
|
-
term.on('exit', function (code) {
|
|
193
|
-
assert.strictEqual(code, 0);
|
|
194
|
-
done();
|
|
195
|
-
});
|
|
196
|
-
});
|
|
197
|
-
it('should return process non-zero exit codes', function (done) {
|
|
198
|
-
this.timeout(10000);
|
|
199
|
-
var term = new windowsTerminal_1.WindowsTerminal('cmd.exe', '/C exit 2', { useConpty: useConpty, useConptyDll: useConptyDll });
|
|
200
|
-
term.on('exit', function (code) {
|
|
201
|
-
assert.strictEqual(code, 2);
|
|
202
|
-
done();
|
|
203
|
-
});
|
|
204
|
-
});
|
|
205
|
-
});
|
|
206
|
-
describe('Write', function () {
|
|
207
|
-
it('should accept input', function (done) {
|
|
208
|
-
this.timeout(10000);
|
|
209
|
-
var term = new windowsTerminal_1.WindowsTerminal('cmd.exe', '', { useConpty: useConpty, useConptyDll: useConptyDll });
|
|
210
|
-
term.write('exit\r');
|
|
211
|
-
term.on('exit', function () {
|
|
212
|
-
done();
|
|
213
|
-
});
|
|
214
|
-
});
|
|
215
|
-
});
|
|
216
|
-
});
|
|
217
|
-
});
|
|
218
|
-
}
|
|
219
|
-
//# sourceMappingURL=windowsTerminal.test.js.map
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2025, Microsoft Corporation (MIT License).
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
const { execSync } = require('child_process');
|
|
6
|
-
|
|
7
|
-
console.log(`\x1b[32m> Generating compile_commands.json...\x1b[0m`);
|
|
8
|
-
execSync('npx --offline node-gyp configure -- -f compile_commands_json');
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2019, Microsoft Corporation (MIT License).
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
const cp = require('child_process');
|
|
6
|
-
const fs = require('fs');
|
|
7
|
-
const path = require('path');
|
|
8
|
-
const packageJson = require('../package.json');
|
|
9
|
-
|
|
10
|
-
// Determine if this is a stable or beta release
|
|
11
|
-
const publishedVersions = getPublishedVersions();
|
|
12
|
-
const isStableRelease = !publishedVersions.includes(packageJson.version);
|
|
13
|
-
|
|
14
|
-
// Get the next version
|
|
15
|
-
const nextVersion = isStableRelease ? packageJson.version : getNextBetaVersion();
|
|
16
|
-
console.log(`Setting version to ${nextVersion}`);
|
|
17
|
-
|
|
18
|
-
// Set the version in package.json
|
|
19
|
-
const packageJsonFile = path.resolve(__dirname, '..', 'package.json');
|
|
20
|
-
packageJson.version = nextVersion;
|
|
21
|
-
fs.writeFileSync(packageJsonFile, JSON.stringify(packageJson, null, 2));
|
|
22
|
-
|
|
23
|
-
function getNextBetaVersion() {
|
|
24
|
-
if (!/^[0-9]+\.[0-9]+\.[0-9]+$/.exec(packageJson.version)) {
|
|
25
|
-
console.error('The package.json version must be of the form x.y.z');
|
|
26
|
-
process.exit(1);
|
|
27
|
-
}
|
|
28
|
-
const tag = 'beta';
|
|
29
|
-
const stableVersion = packageJson.version.split('.');
|
|
30
|
-
const nextStableVersion = `${stableVersion[0]}.${parseInt(stableVersion[1]) + 1}.0`;
|
|
31
|
-
const publishedVersions = getPublishedVersions(nextStableVersion, tag);
|
|
32
|
-
if (publishedVersions.length === 0) {
|
|
33
|
-
return `${nextStableVersion}-${tag}1`;
|
|
34
|
-
}
|
|
35
|
-
const latestPublishedVersion = publishedVersions.sort((a, b) => {
|
|
36
|
-
const aVersion = parseInt(a.substr(a.search(/[0-9]+$/)));
|
|
37
|
-
const bVersion = parseInt(b.substr(b.search(/[0-9]+$/)));
|
|
38
|
-
return aVersion > bVersion ? -1 : 1;
|
|
39
|
-
})[0];
|
|
40
|
-
const latestTagVersion = parseInt(latestPublishedVersion.substr(latestPublishedVersion.search(/[0-9]+$/)), 10);
|
|
41
|
-
return `${nextStableVersion}-${tag}${latestTagVersion + 1}`;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
function getPublishedVersions(version, tag) {
|
|
45
|
-
const isWin32 = process.platform === 'win32';
|
|
46
|
-
const versionsProcess = isWin32 ?
|
|
47
|
-
cp.spawnSync('npm.cmd', ['view', packageJson.name, 'versions', '--json'], { shell: true }) :
|
|
48
|
-
cp.spawnSync('npm', ['view', packageJson.name, 'versions', '--json']);
|
|
49
|
-
const versionsJson = JSON.parse(versionsProcess.stdout);
|
|
50
|
-
if (tag) {
|
|
51
|
-
return versionsJson.filter(v => !v.search(new RegExp(`${version}-${tag}[0-9]+`)));
|
|
52
|
-
}
|
|
53
|
-
return versionsJson;
|
|
54
|
-
}
|
|
Binary file
|
|
Binary file
|