@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.
Files changed (331) hide show
  1. package/config/agent-presets/code/agent.cordis.yml +2 -2
  2. package/config/agent-presets/standard/agent.cordis.yml +2 -2
  3. package/node_modules/@deepseek-ai/cordis-plugin-hmr/package.json +1 -1
  4. package/node_modules/@deepseek-ai/dsh-agent/package.json +1 -1
  5. package/node_modules/@deepseek-ai/dsh-agent-default-model/package.json +1 -1
  6. package/node_modules/@deepseek-ai/dsh-agent-instructions/package.json +1 -1
  7. package/node_modules/@deepseek-ai/dsh-agent-loop/package.json +1 -1
  8. package/node_modules/@deepseek-ai/dsh-agent-presets/package.json +1 -1
  9. package/node_modules/@deepseek-ai/dsh-agent-tool-presentation/package.json +1 -1
  10. package/node_modules/@deepseek-ai/dsh-anonymous-user-id/package.json +1 -1
  11. package/node_modules/@deepseek-ai/dsh-api-gateway/package.json +1 -1
  12. package/node_modules/@deepseek-ai/dsh-api-remotes/package.json +1 -1
  13. package/node_modules/@deepseek-ai/dsh-app-boot/package.json +1 -1
  14. package/node_modules/@deepseek-ai/dsh-atomic-write/package.json +1 -1
  15. package/node_modules/@deepseek-ai/dsh-attachment/lib/index.js +1 -1
  16. package/node_modules/@deepseek-ai/dsh-attachment/package.json +1 -1
  17. package/node_modules/@deepseek-ai/dsh-attachment-local/package.json +1 -1
  18. package/node_modules/@deepseek-ai/dsh-base/package.json +1 -1
  19. package/node_modules/@deepseek-ai/dsh-bash-local/package.json +1 -1
  20. package/node_modules/@deepseek-ai/dsh-bash-sandbox/package.json +1 -1
  21. package/node_modules/@deepseek-ai/dsh-brand/package.json +1 -1
  22. package/node_modules/@deepseek-ai/dsh-client-connection/lib/client.js +1 -1
  23. package/node_modules/@deepseek-ai/dsh-client-connection/package.json +1 -1
  24. package/node_modules/@deepseek-ai/dsh-client-hmr/package.json +1 -1
  25. package/node_modules/@deepseek-ai/dsh-client-locale/lib/client.js +1 -1
  26. package/node_modules/@deepseek-ai/dsh-client-locale/package.json +1 -1
  27. package/node_modules/@deepseek-ai/dsh-client-modules/package.json +1 -1
  28. package/node_modules/@deepseek-ai/dsh-client-runtime/lib/client.js +4 -4
  29. package/node_modules/@deepseek-ai/dsh-client-runtime/package.json +1 -1
  30. package/node_modules/@deepseek-ai/dsh-client-schema-form/package.json +1 -1
  31. package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/lib/client.js +1 -1
  32. package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/package.json +1 -1
  33. package/node_modules/@deepseek-ai/dsh-client-ui-attachment/package.json +1 -1
  34. package/node_modules/@deepseek-ai/dsh-client-ui-commands/lib/client.js +1 -1
  35. package/node_modules/@deepseek-ai/dsh-client-ui-commands/package.json +1 -1
  36. package/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/client.js +8 -8
  37. package/node_modules/@deepseek-ai/dsh-client-ui-conversation/package.json +1 -1
  38. package/node_modules/@deepseek-ai/dsh-client-ui-cordis/lib/client.js +3 -3
  39. package/node_modules/@deepseek-ai/dsh-client-ui-cordis/package.json +1 -1
  40. package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/lib/client.js +1 -1
  41. package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/package.json +1 -1
  42. package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-browse/lib/client.js +1 -1
  43. package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-browse/package.json +1 -1
  44. package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-native/package.json +1 -1
  45. package/node_modules/@deepseek-ai/dsh-client-ui-goal/lib/client.js +1 -1
  46. package/node_modules/@deepseek-ai/dsh-client-ui-goal/package.json +1 -1
  47. package/node_modules/@deepseek-ai/dsh-client-ui-input-trigger/lib/client.js +1 -1
  48. package/node_modules/@deepseek-ai/dsh-client-ui-input-trigger/package.json +1 -1
  49. package/node_modules/@deepseek-ai/dsh-client-ui-jobs/lib/client.js +1 -1
  50. package/node_modules/@deepseek-ai/dsh-client-ui-jobs/package.json +1 -1
  51. package/node_modules/@deepseek-ai/dsh-client-ui-layout/lib/client.js +1 -1
  52. package/node_modules/@deepseek-ai/dsh-client-ui-layout/package.json +1 -1
  53. package/node_modules/@deepseek-ai/dsh-client-ui-message-feedback/lib/client.js +1 -1
  54. package/node_modules/@deepseek-ai/dsh-client-ui-message-feedback/package.json +1 -1
  55. package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/client.js +1 -1
  56. package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/package.json +1 -1
  57. package/node_modules/@deepseek-ai/dsh-client-ui-permission-presets/lib/client.js +1 -1
  58. package/node_modules/@deepseek-ai/dsh-client-ui-permission-presets/package.json +1 -1
  59. package/node_modules/@deepseek-ai/dsh-client-ui-plan/lib/client.js +1 -1
  60. package/node_modules/@deepseek-ai/dsh-client-ui-plan/package.json +1 -1
  61. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/index.js +22 -22
  62. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/package.json +1 -1
  63. package/node_modules/@deepseek-ai/dsh-client-ui-settings/package.json +1 -1
  64. package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/client.js +1 -1
  65. package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/package.json +1 -1
  66. package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/lib/client.js +3 -3
  67. package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/package.json +1 -1
  68. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/lib/client.js +1 -1
  69. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/package.json +1 -1
  70. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/lib/client.js +1 -1
  71. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/package.json +1 -1
  72. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +1 -1
  73. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/package.json +1 -1
  74. package/node_modules/@deepseek-ai/dsh-client-ui-skill/lib/client.js +3 -3
  75. package/node_modules/@deepseek-ai/dsh-client-ui-skill/package.json +1 -1
  76. package/node_modules/@deepseek-ai/dsh-client-ui-slots/package.json +1 -1
  77. package/node_modules/@deepseek-ai/dsh-client-ui-subagent/lib/client.js +1 -1
  78. package/node_modules/@deepseek-ai/dsh-client-ui-subagent/package.json +1 -1
  79. package/node_modules/@deepseek-ai/dsh-client-ui-theme/lib/client.js +1 -1
  80. package/node_modules/@deepseek-ai/dsh-client-ui-theme/package.json +1 -1
  81. package/node_modules/@deepseek-ai/dsh-client-ui-tool/lib/client.js +4 -4
  82. package/node_modules/@deepseek-ai/dsh-client-ui-tool/package.json +1 -1
  83. package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/lib/client.js +14 -14
  84. package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/package.json +1 -1
  85. package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/lib/client.js +1 -1
  86. package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/package.json +1 -1
  87. package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/lib/client.js +1 -1
  88. package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/package.json +1 -1
  89. package/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/client.js +1 -1
  90. package/node_modules/@deepseek-ai/dsh-client-ui-workspace/package.json +1 -1
  91. package/node_modules/@deepseek-ai/dsh-client-web/package.json +1 -1
  92. package/node_modules/@deepseek-ai/dsh-client-web-react/package.json +1 -1
  93. package/node_modules/@deepseek-ai/dsh-cmdline/package.json +1 -1
  94. package/node_modules/@deepseek-ai/dsh-code-runtime/package.json +1 -1
  95. package/node_modules/@deepseek-ai/dsh-code-runtime-worker-thread/package.json +1 -1
  96. package/node_modules/@deepseek-ai/dsh-command-compact/package.json +1 -1
  97. package/node_modules/@deepseek-ai/dsh-command-feedback/package.json +1 -1
  98. package/node_modules/@deepseek-ai/dsh-command-goal/package.json +1 -1
  99. package/node_modules/@deepseek-ai/dsh-commands/lib/typert.host.js +5 -2
  100. package/node_modules/@deepseek-ai/dsh-commands/package.json +1 -1
  101. package/node_modules/@deepseek-ai/dsh-compaction/package.json +1 -1
  102. package/node_modules/@deepseek-ai/dsh-compaction-basic/package.json +1 -1
  103. package/node_modules/@deepseek-ai/dsh-compaction-tool-result-pruner/package.json +1 -1
  104. package/node_modules/@deepseek-ai/dsh-content-review/package.json +1 -1
  105. package/node_modules/@deepseek-ai/dsh-cordis-client-runner/lib/client.js +4 -4
  106. package/node_modules/@deepseek-ai/dsh-cordis-client-runner/package.json +1 -1
  107. package/node_modules/@deepseek-ai/dsh-cordis-host-runner/lib/typert.host.js +10 -4
  108. package/node_modules/@deepseek-ai/dsh-cordis-host-runner/package.json +1 -1
  109. package/node_modules/@deepseek-ai/dsh-credentials/package.json +1 -1
  110. package/node_modules/@deepseek-ai/dsh-credentials-local/package.json +1 -1
  111. package/node_modules/@deepseek-ai/dsh-fs/package.json +1 -1
  112. package/node_modules/@deepseek-ai/dsh-fs-local/package.json +1 -1
  113. package/node_modules/@deepseek-ai/dsh-fs-observation-policy/package.json +1 -1
  114. package/node_modules/@deepseek-ai/dsh-fs-sandbox/package.json +1 -1
  115. package/node_modules/@deepseek-ai/dsh-goal/lib/typert.host.js +5 -2
  116. package/node_modules/@deepseek-ai/dsh-goal/package.json +1 -1
  117. package/node_modules/@deepseek-ai/dsh-goal-round-driver/package.json +1 -1
  118. package/node_modules/@deepseek-ai/dsh-headless/package.json +1 -1
  119. package/node_modules/@deepseek-ai/dsh-home-paths/package.json +1 -1
  120. package/node_modules/@deepseek-ai/dsh-home-quarantine-macos/package.json +1 -1
  121. package/node_modules/@deepseek-ai/dsh-host-apiproxy/lib/index.js +7 -7
  122. package/node_modules/@deepseek-ai/dsh-host-apiproxy/lib/types/api/rpc.schema.js +1 -1
  123. package/node_modules/@deepseek-ai/dsh-host-apiproxy/lib/types/api-proxy.js +1 -1
  124. package/node_modules/@deepseek-ai/dsh-host-apiproxy/package.json +1 -1
  125. package/node_modules/@deepseek-ai/dsh-host-directory-picker/package.json +1 -1
  126. package/node_modules/@deepseek-ai/dsh-host-directory-picker-auto/package.json +1 -1
  127. package/node_modules/@deepseek-ai/dsh-host-directory-picker-browse/package.json +1 -1
  128. package/node_modules/@deepseek-ai/dsh-host-directory-picker-native/package.json +1 -1
  129. package/node_modules/@deepseek-ai/dsh-host-frontend-static/package.json +1 -1
  130. package/node_modules/@deepseek-ai/dsh-host-plugin-inventory/package.json +1 -1
  131. package/node_modules/@deepseek-ai/dsh-host-webserver/package.json +1 -1
  132. package/node_modules/@deepseek-ai/dsh-invariants/package.json +1 -1
  133. package/node_modules/@deepseek-ai/dsh-jobs/package.json +1 -1
  134. package/node_modules/@deepseek-ai/dsh-jobs-local/package.json +1 -1
  135. package/node_modules/@deepseek-ai/dsh-launch-environment/package.json +1 -1
  136. package/node_modules/@deepseek-ai/dsh-llm/lib/index.js +1 -1
  137. package/node_modules/@deepseek-ai/dsh-llm/lib/types/assembler.js +1 -1
  138. package/node_modules/@deepseek-ai/dsh-llm/package.json +1 -1
  139. package/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/index.js +1 -1
  140. package/node_modules/@deepseek-ai/dsh-llm-deepseek/package.json +1 -1
  141. package/node_modules/@deepseek-ai/dsh-llm-gateway-openai/package.json +1 -1
  142. package/node_modules/@deepseek-ai/dsh-llm-pi-ai/lib/index.js +1 -1
  143. package/node_modules/@deepseek-ai/dsh-llm-pi-ai/package.json +1 -1
  144. package/node_modules/@deepseek-ai/dsh-llm-retry/package.json +1 -1
  145. package/node_modules/@deepseek-ai/dsh-mcp-client/lib/index.js +3 -2
  146. package/node_modules/@deepseek-ai/dsh-mcp-client/package.json +1 -1
  147. package/node_modules/@deepseek-ai/dsh-message-feedback/package.json +1 -1
  148. package/node_modules/@deepseek-ai/dsh-native-command/package.json +1 -1
  149. package/node_modules/@deepseek-ai/dsh-output-retention/package.json +1 -1
  150. package/node_modules/@deepseek-ai/dsh-permission-presets/package.json +1 -1
  151. package/node_modules/@deepseek-ai/dsh-persona/package.json +1 -1
  152. package/node_modules/@deepseek-ai/dsh-plan-mode/package.json +1 -1
  153. package/node_modules/@deepseek-ai/dsh-pwsh-local/package.json +1 -1
  154. package/node_modules/@deepseek-ai/dsh-pwsh-sandbox/package.json +1 -1
  155. package/node_modules/@deepseek-ai/dsh-qb-auth/package.json +1 -1
  156. package/node_modules/@deepseek-ai/dsh-repeat-tool-reminder/package.json +1 -1
  157. package/node_modules/@deepseek-ai/dsh-sandbox/package.json +1 -1
  158. package/node_modules/@deepseek-ai/dsh-sandbox-local/package.json +1 -1
  159. package/node_modules/@deepseek-ai/dsh-sandbox-policy/package.json +1 -1
  160. package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/package.json +1 -1
  161. package/node_modules/@deepseek-ai/dsh-schedule/package.json +1 -1
  162. package/node_modules/@deepseek-ai/dsh-scope/package.json +1 -1
  163. package/node_modules/@deepseek-ai/dsh-session/package.json +1 -1
  164. package/node_modules/@deepseek-ai/dsh-session-checkpoint-policy/package.json +1 -1
  165. package/node_modules/@deepseek-ai/dsh-session-log-export/lib/client.js +1 -1
  166. package/node_modules/@deepseek-ai/dsh-session-log-export/package.json +1 -1
  167. package/node_modules/@deepseek-ai/dsh-session-persistence/package.json +1 -1
  168. package/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/package.json +1 -1
  169. package/node_modules/@deepseek-ai/dsh-session-projection/package.json +1 -1
  170. package/node_modules/@deepseek-ai/dsh-session-projection-cache/package.json +1 -1
  171. package/node_modules/@deepseek-ai/dsh-session-query/lib/index.js +2 -2
  172. package/node_modules/@deepseek-ai/dsh-session-query/package.json +1 -1
  173. package/node_modules/@deepseek-ai/dsh-session-query-sqlite/package.json +1 -1
  174. package/node_modules/@deepseek-ai/dsh-session-reference/package.json +1 -1
  175. package/node_modules/@deepseek-ai/dsh-session-stats/package.json +1 -1
  176. package/node_modules/@deepseek-ai/dsh-session-telemetry/package.json +1 -1
  177. package/node_modules/@deepseek-ai/dsh-session-telemetry-otel/package.json +1 -1
  178. package/node_modules/@deepseek-ai/dsh-session-title/package.json +1 -1
  179. package/node_modules/@deepseek-ai/dsh-session-title-first-prompt-llm/package.json +1 -1
  180. package/node_modules/@deepseek-ai/dsh-session-title-llm/package.json +1 -1
  181. package/node_modules/@deepseek-ai/dsh-settings/package.json +1 -1
  182. package/node_modules/@deepseek-ai/dsh-settings-file/package.json +1 -1
  183. package/node_modules/@deepseek-ai/dsh-shell/package.json +1 -1
  184. package/node_modules/@deepseek-ai/dsh-shell-env/package.json +1 -1
  185. package/node_modules/@deepseek-ai/dsh-skill/package.json +1 -1
  186. package/node_modules/@deepseek-ai/dsh-skill-badge/package.json +1 -1
  187. package/node_modules/@deepseek-ai/dsh-skill-filesystem/package.json +1 -1
  188. package/node_modules/@deepseek-ai/dsh-spill/package.json +1 -1
  189. package/node_modules/@deepseek-ai/dsh-spill-local/package.json +1 -1
  190. package/node_modules/@deepseek-ai/dsh-spill-policy/package.json +1 -1
  191. package/node_modules/@deepseek-ai/dsh-storage/package.json +1 -1
  192. package/node_modules/@deepseek-ai/dsh-storage-domain/package.json +1 -1
  193. package/node_modules/@deepseek-ai/dsh-storage-json/package.json +1 -1
  194. package/node_modules/@deepseek-ai/dsh-subagent/package.json +1 -1
  195. package/node_modules/@deepseek-ai/dsh-subagent-fork-in-process/package.json +1 -1
  196. package/node_modules/@deepseek-ai/dsh-subagent-in-process-driver/package.json +1 -1
  197. package/node_modules/@deepseek-ai/dsh-subagent-spawn-in-process/package.json +1 -1
  198. package/node_modules/@deepseek-ai/dsh-subprocess/package.json +1 -1
  199. package/node_modules/@deepseek-ai/dsh-subprocess-local/package.json +1 -1
  200. package/node_modules/@deepseek-ai/dsh-system-prompt/package.json +1 -1
  201. package/node_modules/@deepseek-ai/dsh-terminal/package.json +1 -1
  202. package/node_modules/@deepseek-ai/dsh-terminal-bash/lib/index.js +1 -1
  203. package/node_modules/@deepseek-ai/dsh-terminal-bash/package.json +1 -1
  204. package/node_modules/@deepseek-ai/dsh-time-context/package.json +1 -1
  205. package/node_modules/@deepseek-ai/dsh-timeout/package.json +1 -1
  206. package/node_modules/@deepseek-ai/dsh-tmux-context/package.json +1 -1
  207. package/node_modules/@deepseek-ai/dsh-token-meter/package.json +1 -1
  208. package/node_modules/@deepseek-ai/dsh-tool-ask-user/package.json +1 -1
  209. package/node_modules/@deepseek-ai/dsh-tool-bash/package.json +1 -1
  210. package/node_modules/@deepseek-ai/dsh-tool-bash-persistent/lib/index.js +7 -10
  211. package/node_modules/@deepseek-ai/dsh-tool-bash-persistent/package.json +1 -1
  212. package/node_modules/@deepseek-ai/dsh-tool-call-timeout-policy/package.json +1 -1
  213. package/node_modules/@deepseek-ai/dsh-tool-cordis/lib/index.js +5 -2
  214. package/node_modules/@deepseek-ai/dsh-tool-cordis/package.json +1 -1
  215. package/node_modules/@deepseek-ai/dsh-tool-fs/lib/index.js +8 -8
  216. package/node_modules/@deepseek-ai/dsh-tool-fs/package.json +1 -1
  217. package/node_modules/@deepseek-ai/dsh-tool-fs-search/package.json +1 -1
  218. package/node_modules/@deepseek-ai/dsh-tool-goal/package.json +1 -1
  219. package/node_modules/@deepseek-ai/dsh-tool-jobs/package.json +1 -1
  220. package/node_modules/@deepseek-ai/dsh-tool-pwsh/package.json +1 -1
  221. package/node_modules/@deepseek-ai/dsh-tool-ralph/package.json +1 -1
  222. package/node_modules/@deepseek-ai/dsh-tool-skill/package.json +1 -1
  223. package/node_modules/@deepseek-ai/dsh-tool-str-replace-editor/package.json +1 -1
  224. package/node_modules/@deepseek-ai/dsh-tool-subagent/lib/index.js +2 -2
  225. package/node_modules/@deepseek-ai/dsh-tool-subagent/package.json +1 -1
  226. package/node_modules/@deepseek-ai/dsh-tool-subagent-control/package.json +1 -1
  227. package/node_modules/@deepseek-ai/dsh-tool-subagent-report/package.json +1 -1
  228. package/node_modules/@deepseek-ai/dsh-tool-todo/package.json +1 -1
  229. package/node_modules/@deepseek-ai/dsh-tool-web/package.json +1 -1
  230. package/node_modules/@deepseek-ai/dsh-tool-workflow/package.json +1 -1
  231. package/node_modules/@deepseek-ai/dsh-tools/lib/index.js +15 -15
  232. package/node_modules/@deepseek-ai/dsh-tools/lib/types/code-mode.js +8 -8
  233. package/node_modules/@deepseek-ai/dsh-tools/lib/types/py-types.js +3 -3
  234. package/node_modules/@deepseek-ai/dsh-tools/lib/types/ts-types.js +4 -4
  235. package/node_modules/@deepseek-ai/dsh-tools/package.json +1 -1
  236. package/node_modules/@deepseek-ai/dsh-typert-loader/package.json +1 -1
  237. package/node_modules/@deepseek-ai/dsh-typert-protocol/package.json +1 -1
  238. package/node_modules/@deepseek-ai/dsh-typert-registry/package.json +1 -1
  239. package/node_modules/@deepseek-ai/dsh-user-approval/package.json +1 -1
  240. package/node_modules/@deepseek-ai/dsh-user-questions/package.json +1 -1
  241. package/node_modules/@deepseek-ai/dsh-web/package.json +1 -1
  242. package/node_modules/@deepseek-ai/dsh-web-app/package.json +1 -1
  243. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/{index-BQQQ5Qt-.js → index-fPGOmJjK.js} +25 -25
  244. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/index.html +1 -1
  245. package/node_modules/@deepseek-ai/dsh-web-frontend/package.json +1 -1
  246. package/node_modules/@deepseek-ai/dsh-web-search-deepseek/package.json +1 -1
  247. package/node_modules/@deepseek-ai/dsh-web-search-dsh/package.json +1 -1
  248. package/node_modules/@deepseek-ai/dsh-workflow/package.json +1 -1
  249. package/node_modules/@deepseek-ai/dsh-workflow-worker-thread/package.json +1 -1
  250. package/node_modules/@deepseek-ai/dsh-workspace/package.json +1 -1
  251. package/node_modules/@tanstack/react-virtual/package.json +1 -1
  252. package/node_modules/@tanstack/virtual-core/dist/cjs/index.cjs +7 -1
  253. package/node_modules/@tanstack/virtual-core/dist/cjs/utils.cjs +14 -4
  254. package/node_modules/@tanstack/virtual-core/dist/esm/index.js +1 -1
  255. package/node_modules/@tanstack/virtual-core/dist/esm/utils.js +2 -2
  256. package/node_modules/@tanstack/virtual-core/package.json +1 -1
  257. package/node_modules/hono/dist/cjs/client/utils.js +1 -1
  258. package/node_modules/hono/dist/cjs/context.js +4 -0
  259. package/node_modules/hono/dist/cjs/middleware/cors/index.js +1 -1
  260. package/node_modules/hono/dist/cjs/middleware/csrf/index.js +1 -1
  261. package/node_modules/hono/dist/cjs/middleware/etag/digest.js +1 -1
  262. package/node_modules/hono/dist/cjs/middleware/etag/index.js +2 -2
  263. package/node_modules/hono/dist/cjs/middleware/pretty-json/index.js +3 -1
  264. package/node_modules/hono/dist/cjs/router/linear-router/router.js +7 -2
  265. package/node_modules/hono/dist/cjs/router/pattern-router/router.js +3 -9
  266. package/node_modules/hono/dist/cjs/router/trie-router/node.js +43 -67
  267. package/node_modules/hono/dist/cjs/router/trie-router/router.js +3 -11
  268. package/node_modules/hono/dist/cjs/utils/ipaddr.js +5 -3
  269. package/node_modules/hono/dist/client/utils.js +1 -1
  270. package/node_modules/hono/dist/middleware/cors/index.js +1 -1
  271. package/node_modules/hono/dist/middleware/csrf/index.js +1 -1
  272. package/node_modules/hono/dist/middleware/etag/digest.js +1 -1
  273. package/node_modules/hono/dist/middleware/etag/index.js +1 -1
  274. package/node_modules/hono/dist/middleware/pretty-json/index.js +1 -1
  275. package/node_modules/hono/dist/router/linear-router/router.js +1 -1
  276. package/node_modules/hono/dist/router/pattern-router/router.js +1 -1
  277. package/node_modules/hono/dist/router/trie-router/node.js +1 -1
  278. package/node_modules/hono/dist/router/trie-router/router.js +1 -1
  279. package/node_modules/hono/dist/utils/ipaddr.js +1 -1
  280. package/node_modules/hono/package.json +1 -1
  281. package/node_modules/node-pty/lib/conpty_console_list_agent.js +11 -2
  282. package/node_modules/node-pty/lib/index.js +6 -6
  283. package/node_modules/node-pty/lib/shared/conout.js +2 -3
  284. package/node_modules/node-pty/lib/terminal.js +2 -2
  285. package/node_modules/node-pty/lib/unixTerminal.js +11 -6
  286. package/node_modules/node-pty/lib/utils.js +6 -7
  287. package/node_modules/node-pty/lib/windowsConoutConnection.js +24 -18
  288. package/node_modules/node-pty/lib/windowsPtyAgent.js +125 -101
  289. package/node_modules/node-pty/lib/windowsTerminal.js +14 -4
  290. package/node_modules/node-pty/lib/worker/conoutSocketWorker.js +3 -3
  291. package/node_modules/node-pty/package.json +1 -1
  292. package/node_modules/node-pty/prebuilds/darwin-arm64/pty.node +0 -0
  293. package/node_modules/node-pty/prebuilds/darwin-arm64/spawn-helper +0 -0
  294. package/node_modules/node-pty/prebuilds/darwin-x64/pty.node +0 -0
  295. package/node_modules/node-pty/prebuilds/darwin-x64/spawn-helper +0 -0
  296. package/node_modules/node-pty/prebuilds/win32-x64/conpty/OpenConsole.exe +0 -0
  297. package/node_modules/node-pty/prebuilds/win32-x64/conpty/conpty.dll +0 -0
  298. package/node_modules/node-pty/prebuilds/win32-x64/conpty.node +0 -0
  299. package/node_modules/node-pty/prebuilds/win32-x64/conpty_console_list.node +0 -0
  300. package/node_modules/node-pty/scripts/post-install.js +1 -5
  301. package/node_modules/node-pty/third_party/conpty/1.25.260303002/win10-arm64/OpenConsole.exe +0 -0
  302. package/node_modules/node-pty/third_party/conpty/{1.23.251008001 → 1.25.260303002}/win10-arm64/conpty.dll +0 -0
  303. package/node_modules/node-pty/third_party/conpty/1.25.260303002/win10-x64/OpenConsole.exe +0 -0
  304. package/node_modules/node-pty/third_party/conpty/1.25.260303002/win10-x64/conpty.dll +0 -0
  305. package/package.json +1 -1
  306. package/node_modules/node-pty/deps/winpty/.drone.yml +0 -15
  307. package/node_modules/node-pty/deps/winpty/LICENSE +0 -21
  308. package/node_modules/node-pty/deps/winpty/configure +0 -167
  309. package/node_modules/node-pty/deps/winpty/misc/ConinMode.ps1 +0 -116
  310. package/node_modules/node-pty/deps/winpty/misc/IdentifyConsoleWindow.ps1 +0 -51
  311. package/node_modules/node-pty/deps/winpty/misc/build32.sh +0 -9
  312. package/node_modules/node-pty/deps/winpty/misc/build64.sh +0 -9
  313. package/node_modules/node-pty/deps/winpty/misc/color-test.sh +0 -212
  314. package/node_modules/node-pty/deps/winpty/ship/build-pty4j-libpty.bat +0 -36
  315. package/node_modules/node-pty/deps/winpty/src/shared/GetCommitHash.bat +0 -13
  316. package/node_modules/node-pty/deps/winpty/src/shared/UpdateGenVersion.bat +0 -20
  317. package/node_modules/node-pty/deps/winpty/vcbuild.bat +0 -83
  318. package/node_modules/node-pty/lib/eventEmitter2.test.js +0 -30
  319. package/node_modules/node-pty/lib/terminal.test.js +0 -139
  320. package/node_modules/node-pty/lib/testUtils.test.js +0 -28
  321. package/node_modules/node-pty/lib/unixTerminal.test.js +0 -351
  322. package/node_modules/node-pty/lib/windowsPtyAgent.test.js +0 -90
  323. package/node_modules/node-pty/lib/windowsTerminal.test.js +0 -219
  324. package/node_modules/node-pty/prebuilds/win32-x64/pty.node +0 -0
  325. package/node_modules/node-pty/prebuilds/win32-x64/winpty-agent.exe +0 -0
  326. package/node_modules/node-pty/prebuilds/win32-x64/winpty.dll +0 -0
  327. package/node_modules/node-pty/scripts/gen-compile-commands.js +0 -8
  328. package/node_modules/node-pty/scripts/increment-version.js +0 -54
  329. package/node_modules/node-pty/third_party/conpty/1.23.251008001/win10-arm64/OpenConsole.exe +0 -0
  330. package/node_modules/node-pty/third_party/conpty/1.23.251008001/win10-x64/OpenConsole.exe +0 -0
  331. package/node_modules/node-pty/third_party/conpty/1.23.251008001/win10-x64/conpty.dll +0 -0
@@ -1,83 +0,0 @@
1
- @echo off
2
-
3
- REM -- Script requirements:
4
- REM --
5
- REM -- * git This program must be in the Path to check out
6
- REM -- build-gyp. If that directory already exists, then
7
- REM -- git isn't necessary, but if it is missing, no
8
- REM -- commit hash will be embedded into binaries.
9
- REM --
10
- REM -- * python A non-Cygwin Python 2 python.exe must be in the
11
- REM -- Path to run gyp.
12
- REM --
13
- REM -- * msbuild msbuild must be in the Path. It is probably
14
- REM -- important to have msbuild from the correct MSVC
15
- REM -- release.
16
- REM --
17
- REM -- The script's output binaries are in the src/Release/{Win32,x64}
18
- REM -- directory.
19
-
20
- REM -------------------------------------------------------------------------
21
- REM -- Parse arguments
22
-
23
- setlocal
24
- cd %~dp0
25
- set GYP_ARGS=
26
- set MSVC_PLATFORM=x64
27
-
28
- :ParamLoop
29
- if "%1" == "" goto :ParamDone
30
- if "%1" == "--msvc-platform" (
31
- REM -- One of Win32 or x64.
32
- set MSVC_PLATFORM=%2
33
- shift && shift
34
- goto :ParamLoop
35
- )
36
- if "%1" == "--gyp-msvs-version" (
37
- set GYP_ARGS=%GYP_ARGS% -G msvs_version=%2
38
- shift && shift
39
- goto :ParamLoop
40
- )
41
- if "%1" == "--toolset" (
42
- set GYP_ARGS=%GYP_ARGS% -D WINPTY_MSBUILD_TOOLSET=%2
43
- shift && shift
44
- goto :ParamLoop
45
- )
46
- if "%1" == "--commit-hash" (
47
- set GYP_ARGS=%GYP_ARGS% -D WINPTY_COMMIT_HASH=%2
48
- shift && shift
49
- goto :ParamLoop
50
- )
51
- echo error: Unrecognized argument: %1
52
- exit /b 1
53
- :ParamDone
54
-
55
- REM -------------------------------------------------------------------------
56
- REM -- Check out GYP. GYP doesn't seem to have releases, so just use the
57
- REM -- current master commit.
58
-
59
- if not exist build-gyp (
60
- git clone https://chromium.googlesource.com/external/gyp build-gyp || (
61
- echo error: GYP clone failed
62
- exit /b 1
63
- )
64
- )
65
-
66
- REM -------------------------------------------------------------------------
67
- REM -- Run gyp to generate MSVC project files.
68
-
69
- cd src
70
-
71
- call ..\build-gyp\gyp.bat winpty.gyp -I configurations.gypi %GYP_ARGS%
72
- if errorlevel 1 (
73
- echo error: GYP failed
74
- exit /b 1
75
- )
76
-
77
- REM -------------------------------------------------------------------------
78
- REM -- Compile the project.
79
-
80
- msbuild winpty.sln /m /p:Platform=%MSVC_PLATFORM% || (
81
- echo error: msbuild failed
82
- exit /b 1
83
- )
@@ -1,30 +0,0 @@
1
- "use strict";
2
- /**
3
- * Copyright (c) 2019, Microsoft Corporation (MIT License).
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- var assert = require("assert");
7
- var eventEmitter2_1 = require("./eventEmitter2");
8
- describe('EventEmitter2', function () {
9
- it('should fire listeners multiple times', function () {
10
- var order = [];
11
- var emitter = new eventEmitter2_1.EventEmitter2();
12
- emitter.event(function (data) { return order.push(data + 'a'); });
13
- emitter.event(function (data) { return order.push(data + 'b'); });
14
- emitter.fire(1);
15
- emitter.fire(2);
16
- assert.deepEqual(order, ['1a', '1b', '2a', '2b']);
17
- });
18
- it('should not fire listeners once disposed', function () {
19
- var order = [];
20
- var emitter = new eventEmitter2_1.EventEmitter2();
21
- emitter.event(function (data) { return order.push(data + 'a'); });
22
- var disposeB = emitter.event(function (data) { return order.push(data + 'b'); });
23
- emitter.event(function (data) { return order.push(data + 'c'); });
24
- emitter.fire(1);
25
- disposeB.dispose();
26
- emitter.fire(2);
27
- assert.deepEqual(order, ['1a', '1b', '1c', '2a', '2c']);
28
- });
29
- });
30
- //# sourceMappingURL=eventEmitter2.test.js.map
@@ -1,139 +0,0 @@
1
- "use strict";
2
- /**
3
- * Copyright (c) 2017, Daniel Imms (MIT License).
4
- * Copyright (c) 2018, Microsoft Corporation (MIT License).
5
- */
6
- var __extends = (this && this.__extends) || (function () {
7
- var extendStatics = function (d, b) {
8
- extendStatics = Object.setPrototypeOf ||
9
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
10
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
11
- return extendStatics(d, b);
12
- };
13
- return function (d, b) {
14
- extendStatics(d, b);
15
- function __() { this.constructor = d; }
16
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
17
- };
18
- })();
19
- Object.defineProperty(exports, "__esModule", { value: true });
20
- var assert = require("assert");
21
- var windowsTerminal_1 = require("./windowsTerminal");
22
- var unixTerminal_1 = require("./unixTerminal");
23
- var terminal_1 = require("./terminal");
24
- var terminalConstructor = (process.platform === 'win32') ? windowsTerminal_1.WindowsTerminal : unixTerminal_1.UnixTerminal;
25
- var SHELL = (process.platform === 'win32') ? 'cmd.exe' : '/bin/bash';
26
- var terminalCtor;
27
- if (process.platform === 'win32') {
28
- terminalCtor = require('./windowsTerminal');
29
- }
30
- else {
31
- terminalCtor = require('./unixTerminal');
32
- }
33
- var TestTerminal = /** @class */ (function (_super) {
34
- __extends(TestTerminal, _super);
35
- function TestTerminal() {
36
- return _super !== null && _super.apply(this, arguments) || this;
37
- }
38
- TestTerminal.prototype.checkType = function (name, value, type, allowArray) {
39
- if (allowArray === void 0) { allowArray = false; }
40
- this._checkType(name, value, type, allowArray);
41
- };
42
- TestTerminal.prototype._write = function (data) {
43
- throw new Error('Method not implemented.');
44
- };
45
- TestTerminal.prototype.resize = function (cols, rows) {
46
- throw new Error('Method not implemented.');
47
- };
48
- TestTerminal.prototype.clear = function () {
49
- throw new Error('Method not implemented.');
50
- };
51
- TestTerminal.prototype.destroy = function () {
52
- throw new Error('Method not implemented.');
53
- };
54
- TestTerminal.prototype.kill = function (signal) {
55
- throw new Error('Method not implemented.');
56
- };
57
- Object.defineProperty(TestTerminal.prototype, "process", {
58
- get: function () {
59
- throw new Error('Method not implemented.');
60
- },
61
- enumerable: false,
62
- configurable: true
63
- });
64
- Object.defineProperty(TestTerminal.prototype, "master", {
65
- get: function () {
66
- throw new Error('Method not implemented.');
67
- },
68
- enumerable: false,
69
- configurable: true
70
- });
71
- Object.defineProperty(TestTerminal.prototype, "slave", {
72
- get: function () {
73
- throw new Error('Method not implemented.');
74
- },
75
- enumerable: false,
76
- configurable: true
77
- });
78
- return TestTerminal;
79
- }(terminal_1.Terminal));
80
- describe('Terminal', function () {
81
- describe('constructor', function () {
82
- it('should do basic type checks', function () {
83
- assert.throws(function () { return new terminalCtor('a', 'b', { 'name': {} }); }, 'name must be a string (not a object)');
84
- });
85
- });
86
- describe('checkType', function () {
87
- it('should throw for the wrong type', function () {
88
- var t = new TestTerminal();
89
- assert.doesNotThrow(function () { return t.checkType('foo', 'test', 'string'); });
90
- assert.doesNotThrow(function () { return t.checkType('foo', 1, 'number'); });
91
- assert.doesNotThrow(function () { return t.checkType('foo', {}, 'object'); });
92
- assert.throws(function () { return t.checkType('foo', 'test', 'number'); });
93
- assert.throws(function () { return t.checkType('foo', 1, 'object'); });
94
- assert.throws(function () { return t.checkType('foo', {}, 'string'); });
95
- });
96
- it('should throw for wrong types within arrays', function () {
97
- var t = new TestTerminal();
98
- assert.doesNotThrow(function () { return t.checkType('foo', ['test'], 'string', true); });
99
- assert.doesNotThrow(function () { return t.checkType('foo', [1], 'number', true); });
100
- assert.doesNotThrow(function () { return t.checkType('foo', [{}], 'object', true); });
101
- assert.throws(function () { return t.checkType('foo', ['test'], 'number', true); });
102
- assert.throws(function () { return t.checkType('foo', [1], 'object', true); });
103
- assert.throws(function () { return t.checkType('foo', [{}], 'string', true); });
104
- });
105
- });
106
- describe('automatic flow control', function () {
107
- it('should respect ctor flow control options', function () {
108
- var pty = new terminalConstructor(SHELL, [], { handleFlowControl: true, flowControlPause: 'abc', flowControlResume: '123' });
109
- assert.equal(pty.handleFlowControl, true);
110
- assert.equal(pty._flowControlPause, 'abc');
111
- assert.equal(pty._flowControlResume, '123');
112
- });
113
- // TODO: I don't think this test ever worked due to pollUntil being used incorrectly
114
- // it('should do flow control automatically', async function(): Promise<void> {
115
- // // Flow control doesn't work on Windows
116
- // if (process.platform === 'win32') {
117
- // return;
118
- // }
119
- // this.timeout(10000);
120
- // const pty = new terminalConstructor(SHELL, [], {handleFlowControl: true, flowControlPause: 'PAUSE', flowControlResume: 'RESUME'});
121
- // let read: string = '';
122
- // pty.on('data', data => read += data);
123
- // pty.on('pause', () => read += 'paused');
124
- // pty.on('resume', () => read += 'resumed');
125
- // pty.write('1');
126
- // pty.write('PAUSE');
127
- // pty.write('2');
128
- // pty.write('RESUME');
129
- // pty.write('3');
130
- // await pollUntil(() => {
131
- // return stripEscapeSequences(read).endsWith('1pausedresumed23');
132
- // }, 100, 10);
133
- // });
134
- });
135
- });
136
- function stripEscapeSequences(data) {
137
- return data.replace(/\u001b\[0K/, '');
138
- }
139
- //# sourceMappingURL=terminal.test.js.map
@@ -1,28 +0,0 @@
1
- "use strict";
2
- /**
3
- * Copyright (c) 2019, Microsoft Corporation (MIT License).
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.pollUntil = void 0;
7
- function pollUntil(cb, timeout, interval) {
8
- return new Promise(function (resolve, reject) {
9
- var intervalId = setInterval(function () {
10
- if (cb()) {
11
- clearInterval(intervalId);
12
- clearTimeout(timeoutId);
13
- resolve();
14
- }
15
- }, interval);
16
- var timeoutId = setTimeout(function () {
17
- clearInterval(intervalId);
18
- if (cb()) {
19
- resolve();
20
- }
21
- else {
22
- reject();
23
- }
24
- }, timeout);
25
- });
26
- }
27
- exports.pollUntil = pollUntil;
28
- //# sourceMappingURL=testUtils.test.js.map
@@ -1,351 +0,0 @@
1
- "use strict";
2
- /**
3
- * Copyright (c) 2017, Daniel Imms (MIT License).
4
- * Copyright (c) 2018, Microsoft Corporation (MIT License).
5
- */
6
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
7
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
8
- return new (P || (P = Promise))(function (resolve, reject) {
9
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
10
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
11
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
12
- step((generator = generator.apply(thisArg, _arguments || [])).next());
13
- });
14
- };
15
- var __generator = (this && this.__generator) || function (thisArg, body) {
16
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
17
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
18
- function verb(n) { return function (v) { return step([n, v]); }; }
19
- function step(op) {
20
- if (f) throw new TypeError("Generator is already executing.");
21
- while (_) try {
22
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
23
- if (y = 0, t) op = [op[0] & 2, t.value];
24
- switch (op[0]) {
25
- case 0: case 1: t = op; break;
26
- case 4: _.label++; return { value: op[1], done: false };
27
- case 5: _.label++; y = op[1]; op = [0]; continue;
28
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
29
- default:
30
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
31
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
32
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
33
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
34
- if (t[2]) _.ops.pop();
35
- _.trys.pop(); continue;
36
- }
37
- op = body.call(thisArg, _);
38
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
39
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
40
- }
41
- };
42
- Object.defineProperty(exports, "__esModule", { value: true });
43
- var unixTerminal_1 = require("./unixTerminal");
44
- var assert = require("assert");
45
- var cp = require("child_process");
46
- var path = require("path");
47
- var tty = require("tty");
48
- var fs = require("fs");
49
- var os_1 = require("os");
50
- var testUtils_test_1 = require("./testUtils.test");
51
- var FIXTURES_PATH = path.normalize(path.join(__dirname, '..', 'fixtures', 'utf8-character.txt'));
52
- if (process.platform !== 'win32') {
53
- describe('UnixTerminal', function () {
54
- describe('Constructor', function () {
55
- it('should set a valid pts name', function () {
56
- var term = new unixTerminal_1.UnixTerminal('/bin/bash', [], {});
57
- var regExp;
58
- if (process.platform === 'linux') {
59
- // https://linux.die.net/man/4/pts
60
- regExp = /^\/dev\/pts\/\d+$/;
61
- }
62
- if (process.platform === 'darwin') {
63
- // https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man4/pty.4.html
64
- regExp = /^\/dev\/tty[p-sP-S][a-z0-9]+$/;
65
- }
66
- if (regExp) {
67
- assert.ok(regExp.test(term.ptsName), '"' + term.ptsName + '" should match ' + regExp.toString());
68
- }
69
- assert.ok(tty.isatty(term.fd));
70
- });
71
- });
72
- describe('PtyForkEncodingOption', function () {
73
- it('should default to utf8', function (done) {
74
- var term = new unixTerminal_1.UnixTerminal('/bin/bash', ['-c', "cat \"" + FIXTURES_PATH + "\""]);
75
- term.on('data', function (data) {
76
- assert.strictEqual(typeof data, 'string');
77
- assert.strictEqual(data, '\u00E6');
78
- done();
79
- });
80
- });
81
- it('should return a Buffer when encoding is null', function (done) {
82
- var term = new unixTerminal_1.UnixTerminal('/bin/bash', ['-c', "cat \"" + FIXTURES_PATH + "\""], {
83
- encoding: null
84
- });
85
- term.on('data', function (data) {
86
- assert.strictEqual(typeof data, 'object');
87
- assert.ok(data instanceof Buffer);
88
- assert.strictEqual(0xC3, data[0]);
89
- assert.strictEqual(0xA6, data[1]);
90
- done();
91
- });
92
- });
93
- it('should support other encodings', function (done) {
94
- var text = 'test æ!';
95
- var term = new unixTerminal_1.UnixTerminal(undefined, ['-c', 'echo "' + text + '"'], {
96
- encoding: 'base64'
97
- });
98
- var buffer = '';
99
- term.onData(function (data) {
100
- assert.strictEqual(typeof data, 'string');
101
- buffer += data;
102
- });
103
- term.onExit(function () {
104
- assert.strictEqual(Buffer.alloc(8, buffer, 'base64').toString().replace('\r', '').replace('\n', ''), text);
105
- done();
106
- });
107
- });
108
- });
109
- describe('open', function () {
110
- var term;
111
- afterEach(function () {
112
- if (term) {
113
- term.slave.destroy();
114
- term.master.destroy();
115
- }
116
- });
117
- it('should open a pty with access to a master and slave socket', function (done) {
118
- term = unixTerminal_1.UnixTerminal.open({});
119
- var slavebuf = '';
120
- term.slave.on('data', function (data) {
121
- slavebuf += data;
122
- });
123
- var masterbuf = '';
124
- term.master.on('data', function (data) {
125
- masterbuf += data;
126
- });
127
- testUtils_test_1.pollUntil(function () {
128
- if (masterbuf === 'slave\r\nmaster\r\n' && slavebuf === 'master\n') {
129
- done();
130
- return true;
131
- }
132
- return false;
133
- }, 200, 10);
134
- term.slave.write('slave\n');
135
- term.master.write('master\n');
136
- });
137
- });
138
- describe('close', function () {
139
- var term = new unixTerminal_1.UnixTerminal('node');
140
- it('should exit when terminal is destroyed programmatically', function (done) {
141
- term.on('exit', function (code, signal) {
142
- assert.strictEqual(code, 0);
143
- assert.strictEqual(signal, os_1.constants.signals.SIGHUP);
144
- done();
145
- });
146
- term.destroy();
147
- });
148
- });
149
- describe('signals in parent and child', function () {
150
- it('SIGINT - custom in parent and child', function (done) {
151
- // this test is cumbersome - we have to run it in a sub process to
152
- // see behavior of SIGINT handlers
153
- var data = "\n var pty = require('./lib/index');\n process.on('SIGINT', () => console.log('SIGINT in parent'));\n var ptyProcess = pty.spawn('node', ['-e', 'process.on(\"SIGINT\", ()=>console.log(\"SIGINT in child\"));setTimeout(() => null, 300);'], {\n name: 'xterm-color',\n cols: 80,\n rows: 30,\n cwd: process.env.HOME,\n env: process.env\n });\n ptyProcess.on('data', function (data) {\n console.log(data);\n });\n setTimeout(() => null, 500);\n console.log('ready', ptyProcess.pid);\n ";
154
- var buffer = [];
155
- var p = cp.spawn('node', ['-e', data]);
156
- var sub = '';
157
- p.stdout.on('data', function (data) {
158
- if (!data.toString().indexOf('ready')) {
159
- sub = data.toString().split(' ')[1].slice(0, -1);
160
- setTimeout(function () {
161
- process.kill(parseInt(sub), 'SIGINT'); // SIGINT to child
162
- p.kill('SIGINT'); // SIGINT to parent
163
- }, 200);
164
- }
165
- else {
166
- buffer.push(data.toString().replace(/^\s+|\s+$/g, ''));
167
- }
168
- });
169
- p.on('close', function () {
170
- // handlers in parent and child should have been triggered
171
- assert.strictEqual(buffer.indexOf('SIGINT in child') !== -1, true);
172
- assert.strictEqual(buffer.indexOf('SIGINT in parent') !== -1, true);
173
- done();
174
- });
175
- });
176
- it('SIGINT - custom in parent, default in child', function (done) {
177
- // this tests the original idea of the signal(...) change in pty.cc:
178
- // to make sure the SIGINT handler of a pty child is reset to default
179
- // and does not interfere with the handler in the parent
180
- var data = "\n var pty = require('./lib/index');\n process.on('SIGINT', () => console.log('SIGINT in parent'));\n var ptyProcess = pty.spawn('node', ['-e', 'setTimeout(() => console.log(\"should not be printed\"), 300);'], {\n name: 'xterm-color',\n cols: 80,\n rows: 30,\n cwd: process.env.HOME,\n env: process.env\n });\n ptyProcess.on('data', function (data) {\n console.log(data);\n });\n setTimeout(() => null, 500);\n console.log('ready', ptyProcess.pid);\n ";
181
- var buffer = [];
182
- var p = cp.spawn('node', ['-e', data]);
183
- var sub = '';
184
- p.stdout.on('data', function (data) {
185
- if (!data.toString().indexOf('ready')) {
186
- sub = data.toString().split(' ')[1].slice(0, -1);
187
- setTimeout(function () {
188
- process.kill(parseInt(sub), 'SIGINT'); // SIGINT to child
189
- p.kill('SIGINT'); // SIGINT to parent
190
- }, 200);
191
- }
192
- else {
193
- buffer.push(data.toString().replace(/^\s+|\s+$/g, ''));
194
- }
195
- });
196
- p.on('close', function () {
197
- // handlers in parent and child should have been triggered
198
- assert.strictEqual(buffer.indexOf('should not be printed') !== -1, false);
199
- assert.strictEqual(buffer.indexOf('SIGINT in parent') !== -1, true);
200
- done();
201
- });
202
- });
203
- it('SIGHUP default (child only)', function (done) {
204
- var term = new unixTerminal_1.UnixTerminal('node', ['-e', "\n console.log('ready');\n setTimeout(()=>console.log('timeout'), 200);"
205
- ]);
206
- var buffer = '';
207
- term.on('data', function (data) {
208
- if (data === 'ready\r\n') {
209
- term.kill();
210
- }
211
- else {
212
- buffer += data;
213
- }
214
- });
215
- term.on('exit', function () {
216
- // no timeout in buffer
217
- assert.strictEqual(buffer, '');
218
- done();
219
- });
220
- });
221
- it('SIGUSR1 - custom in parent and child', function (done) {
222
- var pHandlerCalled = 0;
223
- var handleSigUsr = function (h) {
224
- return function () {
225
- pHandlerCalled += 1;
226
- process.removeListener('SIGUSR1', h);
227
- };
228
- };
229
- process.on('SIGUSR1', handleSigUsr(handleSigUsr));
230
- var term = new unixTerminal_1.UnixTerminal('node', ['-e', "\n process.on('SIGUSR1', () => {\n console.log('SIGUSR1 in child');\n });\n console.log('ready');\n setTimeout(()=>null, 200);"
231
- ]);
232
- var buffer = '';
233
- term.on('data', function (data) {
234
- if (data === 'ready\r\n') {
235
- process.kill(process.pid, 'SIGUSR1');
236
- term.kill('SIGUSR1');
237
- }
238
- else {
239
- buffer += data;
240
- }
241
- });
242
- term.on('exit', function () {
243
- // should have called both handlers and only once
244
- assert.strictEqual(pHandlerCalled, 1);
245
- assert.strictEqual(buffer, 'SIGUSR1 in child\r\n');
246
- done();
247
- });
248
- });
249
- });
250
- describe('spawn', function () {
251
- if (process.platform === 'darwin') {
252
- it('should return the name of the process', function (done) {
253
- var term = new unixTerminal_1.UnixTerminal('/bin/echo');
254
- assert.strictEqual(term.process, '/bin/echo');
255
- term.on('exit', function () { return done(); });
256
- term.destroy();
257
- });
258
- it('should return the name of the sub process', function (done) {
259
- var data = "\n var pty = require('./lib/index');\n var ptyProcess = pty.spawn('zsh', ['-c', 'python3'], {\n env: process.env\n });\n ptyProcess.on('data', function (data) {\n if (ptyProcess.process === 'Python') {\n console.log('title', ptyProcess.process);\n console.log('ready', ptyProcess.pid);\n }\n });\n ";
260
- var p = cp.spawn('node', ['-e', data]);
261
- var sub = '';
262
- var pid = '';
263
- p.stdout.on('data', function (data) {
264
- if (!data.toString().indexOf('title')) {
265
- sub = data.toString().split(' ')[1].slice(0, -1);
266
- }
267
- else if (!data.toString().indexOf('ready')) {
268
- pid = data.toString().split(' ')[1].slice(0, -1);
269
- process.kill(parseInt(pid), 'SIGINT');
270
- p.kill('SIGINT');
271
- }
272
- });
273
- p.on('exit', function () {
274
- assert.notStrictEqual(pid, '');
275
- assert.strictEqual(sub, 'Python');
276
- done();
277
- });
278
- });
279
- it('should close on exec', function (done) {
280
- var data = "\n var pty = require('./lib/index');\n var ptyProcess = pty.spawn('node', ['-e', 'setTimeout(() => console.log(\"hello from terminal\"), 300);']);\n ptyProcess.on('data', function (data) {\n console.log(data);\n });\n setTimeout(() => null, 500);\n console.log('ready', ptyProcess.pid);\n ";
281
- var buffer = [];
282
- var readFd = fs.openSync(FIXTURES_PATH, 'r');
283
- var p = cp.spawn('node', ['-e', data], {
284
- stdio: ['ignore', 'pipe', 'pipe', readFd]
285
- });
286
- var sub = '';
287
- p.stdout.on('data', function (data) {
288
- if (!data.toString().indexOf('ready')) {
289
- sub = data.toString().split(' ')[1].slice(0, -1);
290
- try {
291
- fs.statSync("/proc/" + sub + "/fd/" + readFd);
292
- done('not reachable');
293
- }
294
- catch (error) {
295
- assert.notStrictEqual(error.message.indexOf('ENOENT'), -1);
296
- }
297
- setTimeout(function () {
298
- process.kill(parseInt(sub), 'SIGINT'); // SIGINT to child
299
- p.kill('SIGINT'); // SIGINT to parent
300
- }, 200);
301
- }
302
- else {
303
- buffer.push(data.toString().replace(/^\s+|\s+$/g, ''));
304
- }
305
- });
306
- p.on('close', function () {
307
- done();
308
- });
309
- });
310
- }
311
- it('should handle exec() errors', function (done) {
312
- var term = new unixTerminal_1.UnixTerminal('/bin/bogus.exe', []);
313
- term.on('exit', function (code, signal) {
314
- assert.strictEqual(code, 1);
315
- done();
316
- });
317
- });
318
- it('should handle chdir() errors', function (done) {
319
- var term = new unixTerminal_1.UnixTerminal('/bin/echo', [], { cwd: '/nowhere' });
320
- term.on('exit', function (code, signal) {
321
- assert.strictEqual(code, 1);
322
- done();
323
- });
324
- });
325
- it('should not leak child process', function (done) {
326
- var count = cp.execSync('ps -ax | grep node | wc -l');
327
- var term = new unixTerminal_1.UnixTerminal('node', ['-e', "\n console.log('ready');\n setTimeout(()=>console.log('timeout'), 200);"
328
- ]);
329
- term.on('data', function (data) { return __awaiter(void 0, void 0, void 0, function () {
330
- var newCount;
331
- return __generator(this, function (_a) {
332
- switch (_a.label) {
333
- case 0:
334
- if (!(data === 'ready\r\n')) return [3 /*break*/, 2];
335
- process.kill(term.pid, 'SIGINT');
336
- return [4 /*yield*/, setTimeout(function () { return null; }, 1000)];
337
- case 1:
338
- _a.sent();
339
- newCount = cp.execSync('ps -ax | grep node | wc -l');
340
- assert.strictEqual(count.toString(), newCount.toString());
341
- done();
342
- _a.label = 2;
343
- case 2: return [2 /*return*/];
344
- }
345
- });
346
- }); });
347
- });
348
- });
349
- });
350
- }
351
- //# sourceMappingURL=unixTerminal.test.js.map