@quenty/studio-bridge 0.21.1 → 0.22.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (482) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +109 -17
  3. package/build-scripts/transform-add-session-attribute.lua +1 -0
  4. package/deploy.nevermore.json +10 -0
  5. package/dist/src/bridge/bridge-connection.d.ts +26 -2
  6. package/dist/src/bridge/bridge-connection.d.ts.map +1 -1
  7. package/dist/src/bridge/bridge-connection.js +159 -14
  8. package/dist/src/bridge/bridge-connection.js.map +1 -1
  9. package/dist/src/bridge/bridge-connection.test.js +81 -0
  10. package/dist/src/bridge/bridge-connection.test.js.map +1 -1
  11. package/dist/src/bridge/bridge-session.d.ts +35 -2
  12. package/dist/src/bridge/bridge-session.d.ts.map +1 -1
  13. package/dist/src/bridge/bridge-session.js +185 -28
  14. package/dist/src/bridge/bridge-session.js.map +1 -1
  15. package/dist/src/bridge/bridge-session.test.js +6 -4
  16. package/dist/src/bridge/bridge-session.test.js.map +1 -1
  17. package/dist/src/bridge/index.d.ts +1 -1
  18. package/dist/src/bridge/index.d.ts.map +1 -1
  19. package/dist/src/bridge/index.js.map +1 -1
  20. package/dist/src/bridge/internal/bridge-client.d.ts +4 -0
  21. package/dist/src/bridge/internal/bridge-client.d.ts.map +1 -1
  22. package/dist/src/bridge/internal/bridge-client.js +20 -7
  23. package/dist/src/bridge/internal/bridge-client.js.map +1 -1
  24. package/dist/src/bridge/internal/bridge-client.test.js +18 -0
  25. package/dist/src/bridge/internal/bridge-client.test.js.map +1 -1
  26. package/dist/src/bridge/internal/bridge-host.d.ts +13 -1
  27. package/dist/src/bridge/internal/bridge-host.d.ts.map +1 -1
  28. package/dist/src/bridge/internal/bridge-host.js +35 -0
  29. package/dist/src/bridge/internal/bridge-host.js.map +1 -1
  30. package/dist/src/bridge/internal/bridge-host.test.js +31 -0
  31. package/dist/src/bridge/internal/bridge-host.test.js.map +1 -1
  32. package/dist/src/bridge/internal/hand-off.d.ts.map +1 -1
  33. package/dist/src/bridge/internal/hand-off.js +4 -1
  34. package/dist/src/bridge/internal/hand-off.js.map +1 -1
  35. package/dist/src/bridge/internal/host-protocol.d.ts +8 -0
  36. package/dist/src/bridge/internal/host-protocol.d.ts.map +1 -1
  37. package/dist/src/bridge/internal/host-protocol.js +120 -13
  38. package/dist/src/bridge/internal/host-protocol.js.map +1 -1
  39. package/dist/src/bridge/internal/host-protocol.test.js +13 -0
  40. package/dist/src/bridge/internal/host-protocol.test.js.map +1 -1
  41. package/dist/src/bridge/internal/instance-state.d.ts +9 -0
  42. package/dist/src/bridge/internal/instance-state.d.ts.map +1 -0
  43. package/dist/src/bridge/internal/instance-state.js +28 -0
  44. package/dist/src/bridge/internal/instance-state.js.map +1 -0
  45. package/dist/src/bridge/internal/transport-client.d.ts.map +1 -1
  46. package/dist/src/bridge/internal/transport-client.js +2 -1
  47. package/dist/src/bridge/internal/transport-client.js.map +1 -1
  48. package/dist/src/bridge/internal/transport-server.d.ts.map +1 -1
  49. package/dist/src/bridge/internal/transport-server.js +5 -1
  50. package/dist/src/bridge/internal/transport-server.js.map +1 -1
  51. package/dist/src/bridge/types.d.ts +43 -4
  52. package/dist/src/bridge/types.d.ts.map +1 -1
  53. package/dist/src/bridge/types.js.map +1 -1
  54. package/dist/src/cli/adapters/cli-command-adapter-handler.test.js +24 -0
  55. package/dist/src/cli/adapters/cli-command-adapter-handler.test.js.map +1 -1
  56. package/dist/src/cli/adapters/cli-command-adapter.d.ts +6 -0
  57. package/dist/src/cli/adapters/cli-command-adapter.d.ts.map +1 -1
  58. package/dist/src/cli/adapters/cli-command-adapter.js +107 -11
  59. package/dist/src/cli/adapters/cli-command-adapter.js.map +1 -1
  60. package/dist/src/cli/adapters/group-builder.d.ts +3 -0
  61. package/dist/src/cli/adapters/group-builder.d.ts.map +1 -1
  62. package/dist/src/cli/adapters/group-builder.js +34 -15
  63. package/dist/src/cli/adapters/group-builder.js.map +1 -1
  64. package/dist/src/cli/adapters/group-builder.test.js +26 -2
  65. package/dist/src/cli/adapters/group-builder.test.js.map +1 -1
  66. package/dist/src/cli/adapters/help-formatter.d.ts.map +1 -1
  67. package/dist/src/cli/adapters/help-formatter.js +4 -3
  68. package/dist/src/cli/adapters/help-formatter.js.map +1 -1
  69. package/dist/src/cli/adapters/help-formatter.test.js +1 -1
  70. package/dist/src/cli/adapters/help-formatter.test.js.map +1 -1
  71. package/dist/src/cli/adapters/playtest-edit-guard.test.d.ts +2 -0
  72. package/dist/src/cli/adapters/playtest-edit-guard.test.d.ts.map +1 -0
  73. package/dist/src/cli/adapters/playtest-edit-guard.test.js +28 -0
  74. package/dist/src/cli/adapters/playtest-edit-guard.test.js.map +1 -0
  75. package/dist/src/cli/args/global-args.d.ts +1 -1
  76. package/dist/src/cli/args/global-args.d.ts.map +1 -1
  77. package/dist/src/cli/cli-output-context.d.ts +14 -0
  78. package/dist/src/cli/cli-output-context.d.ts.map +1 -0
  79. package/dist/src/cli/cli-output-context.js +39 -0
  80. package/dist/src/cli/cli-output-context.js.map +1 -0
  81. package/dist/src/cli/cli-output-context.test.d.ts +2 -0
  82. package/dist/src/cli/cli-output-context.test.d.ts.map +1 -0
  83. package/dist/src/cli/cli-output-context.test.js +38 -0
  84. package/dist/src/cli/cli-output-context.test.js.map +1 -0
  85. package/dist/src/cli/cli.js +40 -17
  86. package/dist/src/cli/cli.js.map +1 -1
  87. package/dist/src/cli/managed-studio-run.d.ts +21 -0
  88. package/dist/src/cli/managed-studio-run.d.ts.map +1 -0
  89. package/dist/src/cli/managed-studio-run.js +75 -0
  90. package/dist/src/cli/managed-studio-run.js.map +1 -0
  91. package/dist/src/cli/managed-studio-run.test.d.ts +2 -0
  92. package/dist/src/cli/managed-studio-run.test.d.ts.map +1 -0
  93. package/dist/src/cli/managed-studio-run.test.js +52 -0
  94. package/dist/src/cli/managed-studio-run.test.js.map +1 -0
  95. package/dist/src/cli/resolve-session.js +1 -1
  96. package/dist/src/cli/resolve-session.js.map +1 -1
  97. package/dist/src/cli/resolve-session.test.js +1 -1
  98. package/dist/src/cli/resolve-session.test.js.map +1 -1
  99. package/dist/src/cli/script-executor.d.ts +13 -1
  100. package/dist/src/cli/script-executor.d.ts.map +1 -1
  101. package/dist/src/cli/script-executor.js +77 -47
  102. package/dist/src/cli/script-executor.js.map +1 -1
  103. package/dist/src/commands/console/exec/exec.d.ts +17 -0
  104. package/dist/src/commands/console/exec/exec.d.ts.map +1 -1
  105. package/dist/src/commands/console/exec/exec.js +39 -7
  106. package/dist/src/commands/console/exec/exec.js.map +1 -1
  107. package/dist/src/commands/console/exec/exec.test.js +62 -3
  108. package/dist/src/commands/console/exec/exec.test.js.map +1 -1
  109. package/dist/src/commands/console/logs/logs.d.ts +30 -2
  110. package/dist/src/commands/console/logs/logs.d.ts.map +1 -1
  111. package/dist/src/commands/console/logs/logs.js +82 -7
  112. package/dist/src/commands/console/logs/logs.js.map +1 -1
  113. package/dist/src/commands/console/logs/logs.test.js +63 -4
  114. package/dist/src/commands/console/logs/logs.test.js.map +1 -1
  115. package/dist/src/commands/explorer/export/export.d.ts +19 -0
  116. package/dist/src/commands/explorer/export/export.d.ts.map +1 -0
  117. package/dist/src/commands/explorer/export/export.js +37 -0
  118. package/dist/src/commands/explorer/export/export.js.map +1 -0
  119. package/dist/src/commands/explorer/export/export.test.d.ts +2 -0
  120. package/dist/src/commands/explorer/export/export.test.d.ts.map +1 -0
  121. package/dist/src/commands/explorer/export/export.test.js +25 -0
  122. package/dist/src/commands/explorer/export/export.test.js.map +1 -0
  123. package/dist/src/commands/explorer/find/find.d.ts +28 -0
  124. package/dist/src/commands/explorer/find/find.d.ts.map +1 -0
  125. package/dist/src/commands/explorer/find/find.js +75 -0
  126. package/dist/src/commands/explorer/find/find.js.map +1 -0
  127. package/dist/src/commands/explorer/find/find.test.d.ts +2 -0
  128. package/dist/src/commands/explorer/find/find.test.d.ts.map +1 -0
  129. package/dist/src/commands/explorer/find/find.test.js +44 -0
  130. package/dist/src/commands/explorer/find/find.test.js.map +1 -0
  131. package/dist/src/commands/explorer/grep/grep.d.ts +24 -0
  132. package/dist/src/commands/explorer/grep/grep.d.ts.map +1 -0
  133. package/dist/src/commands/explorer/grep/grep.js +63 -0
  134. package/dist/src/commands/explorer/grep/grep.js.map +1 -0
  135. package/dist/src/commands/explorer/grep/grep.test.d.ts +2 -0
  136. package/dist/src/commands/explorer/grep/grep.test.d.ts.map +1 -0
  137. package/dist/src/commands/explorer/grep/grep.test.js +42 -0
  138. package/dist/src/commands/explorer/grep/grep.test.js.map +1 -0
  139. package/dist/src/commands/explorer/import/import.d.ts +21 -0
  140. package/dist/src/commands/explorer/import/import.d.ts.map +1 -0
  141. package/dist/src/commands/explorer/import/import.js +37 -0
  142. package/dist/src/commands/explorer/import/import.js.map +1 -0
  143. package/dist/src/commands/explorer/import/import.test.d.ts +2 -0
  144. package/dist/src/commands/explorer/import/import.test.d.ts.map +1 -0
  145. package/dist/src/commands/explorer/import/import.test.js +45 -0
  146. package/dist/src/commands/explorer/import/import.test.js.map +1 -0
  147. package/dist/src/commands/formatters.test.js +7 -1
  148. package/dist/src/commands/formatters.test.js.map +1 -1
  149. package/dist/src/commands/framework/action-loader.d.ts +5 -1
  150. package/dist/src/commands/framework/action-loader.d.ts.map +1 -1
  151. package/dist/src/commands/framework/action-loader.js +9 -2
  152. package/dist/src/commands/framework/action-loader.js.map +1 -1
  153. package/dist/src/commands/framework/action-loader.test.js +23 -0
  154. package/dist/src/commands/framework/action-loader.test.js.map +1 -1
  155. package/dist/src/commands/framework/arg-builder.d.ts +15 -2
  156. package/dist/src/commands/framework/arg-builder.d.ts.map +1 -1
  157. package/dist/src/commands/framework/arg-builder.js +22 -2
  158. package/dist/src/commands/framework/arg-builder.js.map +1 -1
  159. package/dist/src/commands/framework/define-command.d.ts +19 -3
  160. package/dist/src/commands/framework/define-command.d.ts.map +1 -1
  161. package/dist/src/commands/framework/define-command.js.map +1 -1
  162. package/dist/src/commands/framework/index.d.ts +1 -1
  163. package/dist/src/commands/framework/index.d.ts.map +1 -1
  164. package/dist/src/commands/framework/index.js.map +1 -1
  165. package/dist/src/commands/index.d.ts +11 -0
  166. package/dist/src/commands/index.d.ts.map +1 -1
  167. package/dist/src/commands/index.js +11 -0
  168. package/dist/src/commands/index.js.map +1 -1
  169. package/dist/src/commands/linux/inject-credentials/inject-credentials.d.ts.map +1 -1
  170. package/dist/src/commands/linux/inject-credentials/inject-credentials.js +1 -3
  171. package/dist/src/commands/linux/inject-credentials/inject-credentials.js.map +1 -1
  172. package/dist/src/commands/linux/setup/setup.d.ts.map +1 -1
  173. package/dist/src/commands/linux/setup/setup.js +1 -3
  174. package/dist/src/commands/linux/setup/setup.js.map +1 -1
  175. package/dist/src/commands/linux/status/status.d.ts +9 -1
  176. package/dist/src/commands/linux/status/status.d.ts.map +1 -1
  177. package/dist/src/commands/linux/status/status.js +66 -86
  178. package/dist/src/commands/linux/status/status.js.map +1 -1
  179. package/dist/src/commands/playtest/player/add/add.d.ts +17 -0
  180. package/dist/src/commands/playtest/player/add/add.d.ts.map +1 -0
  181. package/dist/src/commands/playtest/player/add/add.js +45 -0
  182. package/dist/src/commands/playtest/player/add/add.js.map +1 -0
  183. package/dist/src/commands/playtest/player/list/list.d.ts +13 -0
  184. package/dist/src/commands/playtest/player/list/list.d.ts.map +1 -0
  185. package/dist/src/commands/playtest/player/list/list.js +33 -0
  186. package/dist/src/commands/playtest/player/list/list.js.map +1 -0
  187. package/dist/src/commands/playtest/player/playtest-players.d.ts +36 -0
  188. package/dist/src/commands/playtest/player/playtest-players.d.ts.map +1 -0
  189. package/dist/src/commands/playtest/player/playtest-players.js +187 -0
  190. package/dist/src/commands/playtest/player/playtest-players.js.map +1 -0
  191. package/dist/src/commands/playtest/player/playtest-players.test.d.ts +2 -0
  192. package/dist/src/commands/playtest/player/playtest-players.test.d.ts.map +1 -0
  193. package/dist/src/commands/playtest/player/playtest-players.test.js +89 -0
  194. package/dist/src/commands/playtest/player/playtest-players.test.js.map +1 -0
  195. package/dist/src/commands/playtest/player/remove/remove.d.ts +17 -0
  196. package/dist/src/commands/playtest/player/remove/remove.d.ts.map +1 -0
  197. package/dist/src/commands/playtest/player/remove/remove.js +42 -0
  198. package/dist/src/commands/playtest/player/remove/remove.js.map +1 -0
  199. package/dist/src/commands/playtest/playtest-sessions.d.ts +49 -0
  200. package/dist/src/commands/playtest/playtest-sessions.d.ts.map +1 -0
  201. package/dist/src/commands/playtest/playtest-sessions.js +283 -0
  202. package/dist/src/commands/playtest/playtest-sessions.js.map +1 -0
  203. package/dist/src/commands/playtest/playtest-sessions.test.d.ts +2 -0
  204. package/dist/src/commands/playtest/playtest-sessions.test.d.ts.map +1 -0
  205. package/dist/src/commands/playtest/playtest-sessions.test.js +87 -0
  206. package/dist/src/commands/playtest/playtest-sessions.test.js.map +1 -0
  207. package/dist/src/commands/playtest/restart/restart.d.ts +23 -0
  208. package/dist/src/commands/playtest/restart/restart.d.ts.map +1 -0
  209. package/dist/src/commands/playtest/restart/restart.js +105 -0
  210. package/dist/src/commands/playtest/restart/restart.js.map +1 -0
  211. package/dist/src/commands/playtest/run/run.d.ts +47 -0
  212. package/dist/src/commands/playtest/run/run.d.ts.map +1 -0
  213. package/dist/src/commands/playtest/run/run.js +137 -0
  214. package/dist/src/commands/playtest/run/run.js.map +1 -0
  215. package/dist/src/commands/playtest/start/start.d.ts +42 -0
  216. package/dist/src/commands/playtest/start/start.d.ts.map +1 -0
  217. package/dist/src/commands/playtest/start/start.js +70 -0
  218. package/dist/src/commands/playtest/start/start.js.map +1 -0
  219. package/dist/src/commands/playtest/stop/stop.d.ts +15 -0
  220. package/dist/src/commands/playtest/stop/stop.d.ts.map +1 -0
  221. package/dist/src/commands/playtest/stop/stop.js +24 -0
  222. package/dist/src/commands/playtest/stop/stop.js.map +1 -0
  223. package/dist/src/commands/process/close/close.d.ts +19 -10
  224. package/dist/src/commands/process/close/close.d.ts.map +1 -1
  225. package/dist/src/commands/process/close/close.js +118 -15
  226. package/dist/src/commands/process/close/close.js.map +1 -1
  227. package/dist/src/commands/process/close/close.test.d.ts +2 -0
  228. package/dist/src/commands/process/close/close.test.d.ts.map +1 -0
  229. package/dist/src/commands/process/close/close.test.js +190 -0
  230. package/dist/src/commands/process/close/close.test.js.map +1 -0
  231. package/dist/src/commands/process/info/info.d.ts +45 -5
  232. package/dist/src/commands/process/info/info.d.ts.map +1 -1
  233. package/dist/src/commands/process/info/info.js +117 -13
  234. package/dist/src/commands/process/info/info.js.map +1 -1
  235. package/dist/src/commands/process/info/info.test.js +140 -38
  236. package/dist/src/commands/process/info/info.test.js.map +1 -1
  237. package/dist/src/commands/process/launch/launch.d.ts +11 -1
  238. package/dist/src/commands/process/launch/launch.d.ts.map +1 -1
  239. package/dist/src/commands/process/launch/launch.js +37 -7
  240. package/dist/src/commands/process/launch/launch.js.map +1 -1
  241. package/dist/src/commands/process/launch/launch.test.js +99 -20
  242. package/dist/src/commands/process/launch/launch.test.js.map +1 -1
  243. package/dist/src/commands/process/list/list.d.ts +2 -1
  244. package/dist/src/commands/process/list/list.d.ts.map +1 -1
  245. package/dist/src/commands/process/list/list.js +9 -6
  246. package/dist/src/commands/process/list/list.js.map +1 -1
  247. package/dist/src/commands/process/list/list.test.js +1 -0
  248. package/dist/src/commands/process/list/list.test.js.map +1 -1
  249. package/dist/src/commands/process/run/run.d.ts +9 -0
  250. package/dist/src/commands/process/run/run.d.ts.map +1 -1
  251. package/dist/src/commands/process/run/run.js +15 -5
  252. package/dist/src/commands/process/run/run.js.map +1 -1
  253. package/dist/src/commands/serve/serve.d.ts +2 -0
  254. package/dist/src/commands/serve/serve.d.ts.map +1 -1
  255. package/dist/src/commands/serve/serve.js +17 -4
  256. package/dist/src/commands/serve/serve.js.map +1 -1
  257. package/dist/src/commands/serve/serve.test.js +9 -2
  258. package/dist/src/commands/serve/serve.test.js.map +1 -1
  259. package/dist/src/commands/viewport/screenshot/screenshot.d.ts.map +1 -1
  260. package/dist/src/commands/viewport/screenshot/screenshot.js +4 -1
  261. package/dist/src/commands/viewport/screenshot/screenshot.js.map +1 -1
  262. package/dist/src/commands/viewport/screenshot/screenshot.test.js +5 -9
  263. package/dist/src/commands/viewport/screenshot/screenshot.test.js.map +1 -1
  264. package/dist/src/deploy/deploy-places.d.ts +39 -0
  265. package/dist/src/deploy/deploy-places.d.ts.map +1 -0
  266. package/dist/src/deploy/deploy-places.js +162 -0
  267. package/dist/src/deploy/deploy-places.js.map +1 -0
  268. package/dist/src/deploy/deploy-places.test.d.ts +2 -0
  269. package/dist/src/deploy/deploy-places.test.d.ts.map +1 -0
  270. package/dist/src/deploy/deploy-places.test.js +96 -0
  271. package/dist/src/deploy/deploy-places.test.js.map +1 -0
  272. package/dist/src/index.d.ts +2 -2
  273. package/dist/src/index.d.ts.map +1 -1
  274. package/dist/src/index.js +1 -1
  275. package/dist/src/index.js.map +1 -1
  276. package/dist/src/plugin/persistent-plugin-installer.d.ts.map +1 -1
  277. package/dist/src/plugin/persistent-plugin-installer.js +2 -1
  278. package/dist/src/plugin/persistent-plugin-installer.js.map +1 -1
  279. package/dist/src/plugin/persistent-plugin-installer.test.js +3 -0
  280. package/dist/src/plugin/persistent-plugin-installer.test.js.map +1 -1
  281. package/dist/src/plugin/plugin-build-version.d.ts +7 -0
  282. package/dist/src/plugin/plugin-build-version.d.ts.map +1 -0
  283. package/dist/src/plugin/plugin-build-version.js +42 -0
  284. package/dist/src/plugin/plugin-build-version.js.map +1 -0
  285. package/dist/src/plugin/plugin-build-version.test.d.ts +2 -0
  286. package/dist/src/plugin/plugin-build-version.test.d.ts.map +1 -0
  287. package/dist/src/plugin/plugin-build-version.test.js +41 -0
  288. package/dist/src/plugin/plugin-build-version.test.js.map +1 -0
  289. package/dist/src/plugin/plugin-injector.d.ts.map +1 -1
  290. package/dist/src/plugin/plugin-injector.js +7 -1
  291. package/dist/src/plugin/plugin-injector.js.map +1 -1
  292. package/dist/src/process/studio-process-closer.d.ts +35 -0
  293. package/dist/src/process/studio-process-closer.d.ts.map +1 -0
  294. package/dist/src/process/studio-process-closer.js +129 -0
  295. package/dist/src/process/studio-process-closer.js.map +1 -0
  296. package/dist/src/process/studio-process-closer.test.d.ts +2 -0
  297. package/dist/src/process/studio-process-closer.test.d.ts.map +1 -0
  298. package/dist/src/process/studio-process-closer.test.js +80 -0
  299. package/dist/src/process/studio-process-closer.test.js.map +1 -0
  300. package/dist/src/process/studio-settings.d.ts +14 -0
  301. package/dist/src/process/studio-settings.d.ts.map +1 -0
  302. package/dist/src/process/studio-settings.js +50 -0
  303. package/dist/src/process/studio-settings.js.map +1 -0
  304. package/dist/src/process/studio-settings.test.d.ts +2 -0
  305. package/dist/src/process/studio-settings.test.d.ts.map +1 -0
  306. package/dist/src/process/studio-settings.test.js +16 -0
  307. package/dist/src/process/studio-settings.test.js.map +1 -0
  308. package/dist/src/process/studio-window-state.d.ts +13 -0
  309. package/dist/src/process/studio-window-state.d.ts.map +1 -0
  310. package/dist/src/process/studio-window-state.js +48 -0
  311. package/dist/src/process/studio-window-state.js.map +1 -0
  312. package/dist/src/server/studio-bridge-server.d.ts +3 -1
  313. package/dist/src/server/studio-bridge-server.d.ts.map +1 -1
  314. package/dist/src/server/studio-bridge-server.js +12 -4
  315. package/dist/src/server/studio-bridge-server.js.map +1 -1
  316. package/dist/src/server/web-socket-protocol.d.ts +173 -6
  317. package/dist/src/server/web-socket-protocol.d.ts.map +1 -1
  318. package/dist/src/server/web-socket-protocol.js +244 -1
  319. package/dist/src/server/web-socket-protocol.js.map +1 -1
  320. package/dist/src/server/web-socket-protocol.test.js +48 -0
  321. package/dist/src/server/web-socket-protocol.test.js.map +1 -1
  322. package/dist/src/test/e2e/persistent-session.test.js +121 -0
  323. package/dist/src/test/e2e/persistent-session.test.js.map +1 -1
  324. package/dist/src/test/e2e/split-server.test.d.ts +3 -5
  325. package/dist/src/test/e2e/split-server.test.d.ts.map +1 -1
  326. package/dist/src/test/e2e/split-server.test.js +3 -5
  327. package/dist/src/test/e2e/split-server.test.js.map +1 -1
  328. package/dist/tsconfig.tsbuildinfo +1 -1
  329. package/docker/Dockerfile +3 -0
  330. package/package.json +8 -6
  331. package/src/bridge/bridge-connection.test.ts +126 -0
  332. package/src/bridge/bridge-connection.ts +217 -22
  333. package/src/bridge/bridge-session.test.ts +6 -4
  334. package/src/bridge/bridge-session.ts +273 -28
  335. package/src/bridge/index.ts +3 -0
  336. package/src/bridge/internal/bridge-client.test.ts +23 -0
  337. package/src/bridge/internal/bridge-client.ts +25 -7
  338. package/src/bridge/internal/bridge-host.test.ts +38 -0
  339. package/src/bridge/internal/bridge-host.ts +47 -0
  340. package/src/bridge/internal/hand-off.ts +4 -1
  341. package/src/bridge/internal/host-protocol.test.ts +15 -0
  342. package/src/bridge/internal/host-protocol.ts +148 -37
  343. package/src/bridge/internal/instance-state.ts +34 -0
  344. package/src/bridge/internal/transport-client.ts +2 -1
  345. package/src/bridge/internal/transport-server.ts +5 -1
  346. package/src/bridge/types.ts +47 -2
  347. package/src/cli/adapters/cli-command-adapter-handler.test.ts +28 -0
  348. package/src/cli/adapters/cli-command-adapter.ts +150 -18
  349. package/src/cli/adapters/group-builder.test.ts +34 -2
  350. package/src/cli/adapters/group-builder.ts +52 -20
  351. package/src/cli/adapters/help-formatter.test.ts +1 -1
  352. package/src/cli/adapters/help-formatter.ts +4 -3
  353. package/src/cli/adapters/playtest-edit-guard.test.ts +54 -0
  354. package/src/cli/args/global-args.ts +1 -1
  355. package/src/cli/cli-output-context.test.ts +55 -0
  356. package/src/cli/cli-output-context.ts +50 -0
  357. package/src/cli/cli.ts +49 -17
  358. package/src/cli/managed-studio-run.test.ts +71 -0
  359. package/src/cli/managed-studio-run.ts +135 -0
  360. package/src/cli/resolve-session.test.ts +1 -1
  361. package/src/cli/resolve-session.ts +1 -1
  362. package/src/cli/script-executor.ts +99 -51
  363. package/src/commands/console/exec/exec.test.ts +96 -3
  364. package/src/commands/console/exec/exec.ts +59 -6
  365. package/src/commands/console/exec/execute.lua +356 -240
  366. package/src/commands/console/exec/execute.spec.lua +286 -0
  367. package/src/commands/console/logs/logs.test.ts +76 -4
  368. package/src/commands/console/logs/logs.ts +132 -17
  369. package/src/commands/console/logs/query-logs.lua +85 -52
  370. package/src/commands/console/logs/query-logs.spec.lua +132 -0
  371. package/src/commands/explorer/export/export-instances.lua +108 -0
  372. package/src/commands/explorer/export/export-instances.spec.lua +87 -0
  373. package/src/commands/explorer/export/export.test.ts +27 -0
  374. package/src/commands/explorer/export/export.ts +60 -0
  375. package/src/commands/explorer/find/find-instances.lua +174 -0
  376. package/src/commands/explorer/find/find-instances.spec.lua +122 -0
  377. package/src/commands/explorer/find/find.test.ts +53 -0
  378. package/src/commands/explorer/find/find.ts +113 -0
  379. package/src/commands/explorer/grep/grep-scripts.lua +214 -0
  380. package/src/commands/explorer/grep/grep-scripts.spec.lua +130 -0
  381. package/src/commands/explorer/grep/grep.test.ts +45 -0
  382. package/src/commands/explorer/grep/grep.ts +93 -0
  383. package/src/commands/explorer/import/import-instances.lua +106 -0
  384. package/src/commands/explorer/import/import-instances.spec.lua +84 -0
  385. package/src/commands/explorer/import/import.test.ts +60 -0
  386. package/src/commands/explorer/import/import.ts +66 -0
  387. package/src/commands/explorer/query/query-data-model.lua +124 -152
  388. package/src/commands/explorer/query/query-data-model.spec.lua +150 -0
  389. package/src/commands/formatters.test.ts +7 -1
  390. package/src/commands/framework/action-loader.test.ts +28 -0
  391. package/src/commands/framework/action-loader.ts +10 -2
  392. package/src/commands/framework/arg-builder.ts +26 -3
  393. package/src/commands/framework/define-command.ts +32 -3
  394. package/src/commands/framework/index.ts +1 -0
  395. package/src/commands/index.ts +50 -0
  396. package/src/commands/linux/inject-credentials/inject-credentials.ts +1 -3
  397. package/src/commands/linux/setup/setup.ts +1 -3
  398. package/src/commands/linux/status/status.ts +105 -98
  399. package/src/commands/playtest/player/add/add.ts +85 -0
  400. package/src/commands/playtest/player/list/list.ts +57 -0
  401. package/src/commands/playtest/player/playtest-players.test.ts +146 -0
  402. package/src/commands/playtest/player/playtest-players.ts +270 -0
  403. package/src/commands/playtest/player/remove/remove.ts +78 -0
  404. package/src/commands/playtest/playtest-sessions.test.ts +143 -0
  405. package/src/commands/playtest/playtest-sessions.ts +417 -0
  406. package/src/commands/playtest/restart/restart.ts +199 -0
  407. package/src/commands/playtest/run/playtest-runner.luau +264 -0
  408. package/src/commands/playtest/run/playtest-runner.spec.lua +71 -0
  409. package/src/commands/playtest/run/run-playtest-script.lua +139 -0
  410. package/src/commands/playtest/run/run-playtest-script.spec.lua +43 -0
  411. package/src/commands/playtest/run/run.ts +239 -0
  412. package/src/commands/playtest/start/start-playtest.lua +108 -0
  413. package/src/commands/playtest/start/start.ts +138 -0
  414. package/src/commands/playtest/stop/end-playtest.lua +47 -0
  415. package/src/commands/playtest/stop/stop.ts +51 -0
  416. package/src/commands/process/close/close.test.ts +250 -0
  417. package/src/commands/process/close/close.ts +183 -17
  418. package/src/commands/process/info/info.test.ts +198 -44
  419. package/src/commands/process/info/info.ts +204 -15
  420. package/src/commands/process/info/query-state.lua +42 -29
  421. package/src/commands/process/info/query-state.spec.lua +39 -0
  422. package/src/commands/process/launch/launch.test.ts +138 -21
  423. package/src/commands/process/launch/launch.ts +69 -9
  424. package/src/commands/process/list/list.test.ts +1 -0
  425. package/src/commands/process/list/list.ts +14 -6
  426. package/src/commands/process/run/run.ts +26 -5
  427. package/src/commands/serve/serve.test.ts +17 -2
  428. package/src/commands/serve/serve.ts +25 -6
  429. package/src/commands/viewport/screenshot/capture-screenshot.lua +175 -182
  430. package/src/commands/viewport/screenshot/capture-screenshot.spec.lua +129 -0
  431. package/src/commands/viewport/screenshot/screenshot.test.ts +7 -10
  432. package/src/commands/viewport/screenshot/screenshot.ts +6 -1
  433. package/src/deploy/deploy-places.test.ts +127 -0
  434. package/src/deploy/deploy-places.ts +229 -0
  435. package/src/index.ts +11 -0
  436. package/src/plugin/persistent-plugin-installer.test.ts +4 -0
  437. package/src/plugin/persistent-plugin-installer.ts +2 -1
  438. package/src/plugin/plugin-build-version.test.ts +55 -0
  439. package/src/plugin/plugin-build-version.ts +53 -0
  440. package/src/plugin/plugin-injector.ts +7 -1
  441. package/src/process/studio-process-closer.test.ts +107 -0
  442. package/src/process/studio-process-closer.ts +187 -0
  443. package/src/process/studio-settings.test.ts +18 -0
  444. package/src/process/studio-settings.ts +61 -0
  445. package/src/process/studio-window-state.ts +65 -0
  446. package/src/server/studio-bridge-server.ts +15 -4
  447. package/src/server/web-socket-protocol.test.ts +55 -0
  448. package/src/server/web-socket-protocol.ts +468 -8
  449. package/src/test/e2e/persistent-session.test.ts +137 -0
  450. package/src/test/e2e/split-server.test.ts +3 -5
  451. package/templates/studio-bridge-plugin/default.project.json +3 -0
  452. package/templates/studio-bridge-plugin/src/Shared/ActionRouter.lua +208 -159
  453. package/templates/studio-bridge-plugin/src/Shared/ActionRouter.spec.lua +418 -0
  454. package/templates/studio-bridge-plugin/src/Shared/BuiltInActions.lua +94 -0
  455. package/templates/studio-bridge-plugin/src/Shared/BuiltInActions.spec.lua +166 -0
  456. package/templates/studio-bridge-plugin/src/Shared/DiscoveryStateMachine.lua +118 -137
  457. package/templates/studio-bridge-plugin/src/Shared/DiscoveryStateMachine.spec.lua +228 -0
  458. package/templates/studio-bridge-plugin/src/Shared/MessageBuffer.lua +80 -109
  459. package/templates/studio-bridge-plugin/src/Shared/MessageBuffer.spec.lua +116 -0
  460. package/templates/studio-bridge-plugin/src/Shared/StudioBridgeConnection.lua +233 -0
  461. package/templates/studio-bridge-plugin/src/Shared/StudioBridgeConnection.spec.lua +239 -0
  462. package/templates/studio-bridge-plugin/src/Shared/StudioBridgeLogUtils.lua +53 -0
  463. package/templates/studio-bridge-plugin/src/Shared/StudioBridgeLogUtils.spec.lua +27 -0
  464. package/templates/studio-bridge-plugin/src/Shared/StudioBridgeSessionUtils.lua +164 -0
  465. package/templates/studio-bridge-plugin/src/Shared/StudioBridgeSessionUtils.spec.lua +159 -0
  466. package/templates/studio-bridge-plugin/src/StudioBridgePlugin.server.lua +266 -368
  467. package/templates/studio-bridge-plugin/src/Vendor/png.lua +8 -2
  468. package/test/default.project.json +41 -0
  469. package/test/jest.config.lua +3 -0
  470. package/test/scripts/Server/ServerMain.server.lua +10 -0
  471. package/tsconfig.json +1 -0
  472. package/templates/studio-bridge-plugin/src/Shared/Protocol.lua +0 -132
  473. package/templates/studio-bridge-plugin-test/test/actions.test.lua +0 -580
  474. package/templates/studio-bridge-plugin-test/test/discovery.test.lua +0 -622
  475. package/templates/studio-bridge-plugin-test/test/execute-handler.test.lua +0 -517
  476. package/templates/studio-bridge-plugin-test/test/hash-lifecycle.test.lua +0 -814
  477. package/templates/studio-bridge-plugin-test/test/integration.test.lua +0 -1020
  478. package/templates/studio-bridge-plugin-test/test/new-actions.test.lua +0 -339
  479. package/templates/studio-bridge-plugin-test/test/plugin-entry.test.lua +0 -493
  480. package/templates/studio-bridge-plugin-test/test/protocol.test.lua +0 -506
  481. package/templates/studio-bridge-plugin-test/test/roblox-mocks.lua +0 -108
  482. package/templates/studio-bridge-plugin-test/test/test-runner.lua +0 -112
@@ -1 +1 @@
1
- {"version":3,"file":"info.test.js","sourceRoot":"","sources":["../../../../../src/commands/process/info/info.test.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAClD,OAAO,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AAEnD,SAAS,iBAAiB,CAAC,WAK1B;IACC,OAAO;QACL,eAAe,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC,WAAW,CAAC;KACjD,CAAC;AACX,CAAC;AAED,QAAQ,CAAC,wBAAwB,EAAE,GAAG,EAAE;IACtC,EAAE,CAAC,mCAAmC,EAAE,KAAK,IAAI,EAAE;QACjD,MAAM,OAAO,GAAG,iBAAiB,CAAC;YAChC,KAAK,EAAE,MAAM;YACb,OA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Q,EAAE,QAAQ,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;IAC7C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1,17 +1,27 @@
1
1
  /**
2
- * `process launch` — launch Roblox Studio, optionally with a place file.
2
+ * `process launch` — launch Roblox Studio, optionally with a place file, a
3
+ * cloud place, or a target from the nearest `deploy.nevermore.json`.
3
4
  */
4
5
  export interface LaunchOptions {
5
6
  placePath?: string;
6
7
  placeId?: number;
7
8
  universeId?: number;
9
+ /** A `deploy.nevermore.json` target, e.g. `test` or `integration.places.hub`. */
10
+ deployTarget?: string;
11
+ /** Where to start looking for `deploy.nevermore.json`. Default: the current directory. */
12
+ cwd?: string;
8
13
  }
9
14
  export interface LaunchResult {
10
15
  launched: boolean;
16
+ /** The `deploy.nevermore.json` target that was opened, if any. */
17
+ deployTarget?: string;
18
+ placeId?: number;
19
+ universeId?: number;
11
20
  summary: string;
12
21
  }
13
22
  export declare function launchHandlerAsync(options?: LaunchOptions): Promise<LaunchResult>;
14
23
  interface LaunchArgs {
24
+ deployTarget?: string;
15
25
  place?: string;
16
26
  placeId?: number;
17
27
  universeId?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"launch.d.ts","sourceRoot":"","sources":["../../../../../src/commands/process/launch/launch.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH,MAAM,WAAW,aAAa;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,wBAAsB,kBAAkB,CACtC,OAAO,GAAE,aAAkB,GAC1B,OAAO,CAAC,YAAY,CAAC,CAYvB;AAED,UAAU,UAAU;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,aAAa,yFA0BxB,CAAC"}
1
+ {"version":3,"file":"launch.d.ts","sourceRoot":"","sources":["../../../../../src/commands/process/launch/launch.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAWH,MAAM,WAAW,aAAa;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iFAAiF;IACjF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,0FAA0F;IAC1F,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,OAAO,CAAC;IAClB,kEAAkE;IAClE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,wBAAsB,kBAAkB,CACtC,OAAO,GAAE,aAAkB,GAC1B,OAAO,CAAC,YAAY,CAAC,CAkDvB;AAED,UAAU,UAAU;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,aAAa,yFAiCxB,CAAC"}
@@ -1,27 +1,56 @@
1
1
  /**
2
- * `process launch` — launch Roblox Studio, optionally with a place file.
2
+ * `process launch` — launch Roblox Studio, optionally with a place file, a
3
+ * cloud place, or a target from the nearest `deploy.nevermore.json`.
3
4
  */
5
+ import * as path from 'path';
4
6
  import { defineCommand } from '../../framework/define-command.js';
5
7
  import { arg } from '../../framework/arg-builder.js';
6
8
  import { launchStudioAsync } from '../../../process/studio-process-manager.js';
9
+ import { DEPLOY_CONFIG_FILE_NAME, resolveDeployPlaceAsync, } from '../../../deploy/deploy-places.js';
7
10
  export async function launchHandlerAsync(options = {}) {
8
- await launchStudioAsync(options);
9
- const target = options.placeId != null
10
- ? `place ${options.placeId}${options.universeId != null ? ` (universe ${options.universeId})` : ''}`
11
- : options.placePath;
11
+ const hasExplicitPlace = options.placePath !== undefined || options.placeId !== undefined;
12
+ if (hasExplicitPlace && options.deployTarget !== undefined) {
13
+ throw new Error(`Pass a deploy target or --place / --place-id, not both (got '${options.deployTarget}')`);
14
+ }
15
+ const deployPlace = hasExplicitPlace
16
+ ? undefined
17
+ : await resolveDeployPlaceAsync(options.cwd ?? process.cwd(), options.deployTarget);
18
+ if (deployPlace) {
19
+ const { placeId, universeId } = deployPlace.place;
20
+ await launchStudioAsync({ placeId, universeId });
21
+ const configDir = path.relative(options.cwd ?? process.cwd(), path.dirname(deployPlace.configPath));
22
+ return {
23
+ launched: true,
24
+ deployTarget: deployPlace.selector,
25
+ placeId,
26
+ universeId,
27
+ summary: `Studio launched with '${deployPlace.selector}' (place ${placeId}, universe ${universeId}) from ${path.join(configDir, DEPLOY_CONFIG_FILE_NAME)}`,
28
+ };
29
+ }
30
+ const { placePath, placeId, universeId } = options;
31
+ await launchStudioAsync({ placePath, placeId, universeId });
32
+ const opened = placeId != null
33
+ ? `place ${placeId}${universeId != null ? ` (universe ${universeId})` : ''}`
34
+ : placePath;
12
35
  return {
13
36
  launched: true,
14
- summary: `Studio launched${target ? ` with ${target}` : ''}`,
37
+ placeId,
38
+ universeId,
39
+ summary: `Studio launched${opened ? ` with ${opened}` : ''}`,
15
40
  };
16
41
  }
17
42
  export const launchCommand = defineCommand({
18
43
  group: 'process',
19
44
  name: 'launch',
20
- description: 'Launch Roblox Studio',
45
+ description: "Launch Roblox Studio, by default with the place of the nearest deploy.nevermore.json's default target",
21
46
  category: 'infrastructure',
22
47
  safety: 'none',
23
48
  scope: 'standalone',
24
49
  args: {
50
+ deployTarget: arg.positional({
51
+ description: 'deploy.nevermore.json target to open, e.g. test or integration.places.hub (default: its default target)',
52
+ required: false,
53
+ }),
25
54
  place: arg.option({ description: 'Path to a .rbxl place file' }),
26
55
  placeId: arg.option({
27
56
  description: 'Cloud place id to open in Studio (edit mode, via the EditPlace deep-link)',
@@ -33,6 +62,7 @@ export const launchCommand = defineCommand({
33
62
  }),
34
63
  },
35
64
  handler: async (args) => launchHandlerAsync({
65
+ deployTarget: args.deployTarget,
36
66
  placePath: args.place,
37
67
  placeId: args.placeId,
38
68
  universeId: args.universeId,
@@ -1 +1 @@
1
- {"version":3,"file":"launch.js","sourceRoot":"","sources":["../../../../../src/commands/process/launch/launch.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAE,GAAG,EAAE,MAAM,gCAAgC,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAa/E,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,UAAyB,EAAE;IAE3B,MAAM,iBAAiB,CAAC,OAAO,CAAC,CAAC;IACjC,MAAM,MAAM,GACV,OAAO,CAAC,OAAO,IAAI,IAAI;QACrB,CAAC,CAAC,SAAS,OAAO,CAAC,OAAO,GACtB,OAAO,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,cAAc,OAAO,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC,EACrE,EAAE;QACJ,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;IACxB,OAAO;QACL,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,kBAAkB,MAAM,CAAC,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE;KAC7D,CAAC;AACJ,CAAC;AAQD,MAAM,CAAC,MAAM,aAAa,GAAG,aAAa,CAA2B;IACnE,KAAK,EAAE,SAAS;IAChB,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,sBAAsB;IACnC,QAAQ,EAAE,gBAAgB;IAC1B,MAAM,EAAE,MAAM;IACd,KAAK,EAAE,YAAY;IACnB,IAAI,EAAE;QACJ,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,4BAA4B,EAAE,CAAC;QAChE,OAAO,EAAE,GAAG,CAAC,MAAM,CAAC;YAClB,WAAW,EACT,2EAA2E;YAC7E,IAAI,EAAE,QAAQ;SACf,CAAC;QACF,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC;YACrB,WAAW,EACT,+DAA+D;YACjE,IAAI,EAAE,QAAQ;SACf,CAAC;KACH;IACD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,CACtB,kBAAkB,CAAC;QACjB,SAAS,EAAE,IAAI,CAAC,KAAK;QACrB,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,UAAU,EAAE,IAAI,CAAC,UAAU;KAC5B,CAAC;CACL,CAAC,CAAC"}
1
+ {"version":3,"file":"launch.js","sourceRoot":"","sources":["../../../../../src/commands/process/launch/launch.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAE,GAAG,EAAE,MAAM,gCAAgC,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAC/E,OAAO,EACL,uBAAuB,EACvB,uBAAuB,GACxB,MAAM,kCAAkC,CAAC;AAqB1C,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,UAAyB,EAAE;IAE3B,MAAM,gBAAgB,GACpB,OAAO,CAAC,SAAS,KAAK,SAAS,IAAI,OAAO,CAAC,OAAO,KAAK,SAAS,CAAC;IACnE,IAAI,gBAAgB,IAAI,OAAO,CAAC,YAAY,KAAK,SAAS,EAAE,CAAC;QAC3D,MAAM,IAAI,KAAK,CACb,gEAAgE,OAAO,CAAC,YAAY,IAAI,CACz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S,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE;KAC7D,CAAC;AACJ,CAAC;AASD,MAAM,CAAC,MAAM,aAAa,GAAG,aAAa,CAA2B;IACnE,KAAK,EAAE,SAAS;IAChB,IAAI,EAAE,QAAQ;IACd,WAAW,EACT,uGAAuG;IACzG,QAAQ,EAAE,gBAAgB;IAC1B,MAAM,EAAE,MAAM;IACd,KAAK,EAAE,YAAY;IACnB,IAAI,EAAE;QACJ,YAAY,EAAE,GAAG,CAAC,UAAU,CAAC;YAC3B,WAAW,EACT,yGAAyG;YAC3G,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,4BAA4B,EAAE,CAAC;QAChE,OAAO,EAAE,GAAG,CAAC,MAAM,CAAC;YAClB,WAAW,EACT,2EAA2E;YAC7E,IAAI,EAAE,QAAQ;SACf,CAAC;QACF,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC;YACrB,WAAW,EACT,+DAA+D;YACjE,IAAI,EAAE,QAAQ;SACf,CAAC;KACH;IACD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,CACtB,kBAAkB,CAAC;QACjB,YAAY,EAAE,IAAI,CAAC,YAAY;QAC/B,SAAS,EAAE,IAAI,CAAC,KAAK;QACrB,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,UAAU,EAAE,IAAI,CAAC,UAAU;KAC5B,CAAC;CACL,CAAC,CAAC"}
@@ -1,7 +1,10 @@
1
1
  /**
2
2
  * Unit tests for the launch command handler.
3
3
  */
4
- import { describe, it, expect, vi } from 'vitest';
4
+ import * as fs from 'fs/promises';
5
+ import * as os from 'os';
6
+ import * as path from 'path';
7
+ import { afterEach, beforeEach, describe, it, expect, vi } from 'vitest';
5
8
  // Mock the process manager before importing the handler
6
9
  vi.mock('../../../process/studio-process-manager.js', () => ({
7
10
  launchStudioAsync: vi.fn().mockResolvedValue({
@@ -11,27 +14,45 @@ vi.mock('../../../process/studio-process-manager.js', () => ({
11
14
  }));
12
15
  import { launchHandlerAsync } from './launch.js';
13
16
  import { launchStudioAsync } from '../../../process/studio-process-manager.js';
17
+ let tempDir;
18
+ beforeEach(async () => {
19
+ tempDir = await fs.mkdtemp(path.join(os.tmpdir(), 'launch-test-'));
20
+ vi.mocked(launchStudioAsync).mockClear();
21
+ });
22
+ afterEach(async () => {
23
+ await fs.rm(tempDir, { recursive: true, force: true });
24
+ });
25
+ async function writeDeployConfigAsync(dir, config) {
26
+ await fs.writeFile(path.join(dir, 'deploy.nevermore.json'), JSON.stringify(config));
27
+ }
28
+ const place = (placeId, name) => ({
29
+ name,
30
+ universeId: 900,
31
+ placeId,
32
+ project: 'default.project.json',
33
+ });
14
34
  describe('launchHandlerAsync', () => {
15
- it('calls launchStudioAsync and returns result', async () => {
16
- const result = await launchHandlerAsync();
17
- expect(launchStudioAsync).toHaveBeenCalled();
35
+ it('launches a bare Studio outside any deploy.nevermore.json', async () => {
36
+ const result = await launchHandlerAsync({ cwd: tempDir });
37
+ expect(launchStudioAsync).toHaveBeenCalledWith({});
18
38
  expect(result.launched).toBe(true);
19
39
  expect(result.summary).toBe('Studio launched');
20
40
  });
21
41
  it('passes place path to launchStudioAsync', async () => {
22
42
  const result = await launchHandlerAsync({
23
43
  placePath: '/tmp/game.rbxl',
44
+ cwd: tempDir,
24
45
  });
25
46
  expect(launchStudioAsync).toHaveBeenCalledWith({
26
47
  placePath: '/tmp/game.rbxl',
27
48
  });
28
- expect(result.launched).toBe(true);
29
49
  expect(result.summary).toBe('Studio launched with /tmp/game.rbxl');
30
50
  });
31
51
  it('passes cloud place + universe ids to launchStudioAsync', async () => {
32
52
  const result = await launchHandlerAsync({
33
53
  placeId: 84760113521251,
34
54
  universeId: 9893751595,
55
+ cwd: tempDir,
35
56
  });
36
57
  expect(launchStudioAsync).toHaveBeenCalledWith({
37
58
  placeId: 84760113521251,
@@ -40,27 +61,85 @@ describe('launchHandlerAsync', () => {
40
61
  expect(result.summary).toBe('Studio launched with place 84760113521251 (universe 9893751595)');
41
62
  });
42
63
  it('summarizes a cloud place id without a universe id', async () => {
43
- const result = await launchHandlerAsync({ placeId: 123 });
64
+ const result = await launchHandlerAsync({ placeId: 123, cwd: tempDir });
44
65
  expect(result.summary).toBe('Studio launched with place 123');
45
66
  });
46
- it('passes an empty options object when nothing is specified', async () => {
47
- await launchHandlerAsync({});
48
- expect(launchStudioAsync).toHaveBeenCalledWith({});
67
+ it('propagates errors from launchStudioAsync', async () => {
68
+ vi.mocked(launchStudioAsync).mockRejectedValueOnce(new Error('Studio not found'));
69
+ await expect(launchHandlerAsync({ cwd: tempDir })).rejects.toThrow('Studio not found');
49
70
  });
50
- it('returns correct summary without place path', async () => {
51
- const result = await launchHandlerAsync({});
71
+ });
72
+ describe('launchHandlerAsync with deploy.nevermore.json', () => {
73
+ it("opens the default target's place from a parent directory's config", async () => {
74
+ await writeDeployConfigAsync(tempDir, { targets: { test: place(111) } });
75
+ const nested = path.join(tempDir, 'src', 'Server');
76
+ await fs.mkdir(nested, { recursive: true });
77
+ const result = await launchHandlerAsync({ cwd: nested });
78
+ expect(launchStudioAsync).toHaveBeenCalledWith({
79
+ placeId: 111,
80
+ universeId: 900,
81
+ });
82
+ expect(result).toMatchObject({
83
+ deployTarget: 'test',
84
+ placeId: 111,
85
+ universeId: 900,
86
+ });
87
+ expect(result.summary).toBe(`Studio launched with 'test' (place 111, universe 900) from ${path.join('..', '..', 'deploy.nevermore.json')}`);
88
+ });
89
+ it('opens a named target and narrows to one of its places', async () => {
90
+ await writeDeployConfigAsync(tempDir, {
91
+ targets: {
92
+ test: place(111),
93
+ integration: { places: [place(222, 'hub'), place(333, 'arena')] },
94
+ },
95
+ });
96
+ const result = await launchHandlerAsync({
97
+ deployTarget: 'integration.places.arena',
98
+ cwd: tempDir,
99
+ });
100
+ expect(launchStudioAsync).toHaveBeenCalledWith({
101
+ placeId: 333,
102
+ universeId: 900,
103
+ });
104
+ expect(result.deployTarget).toBe('integration.places.arena');
105
+ });
106
+ it('asks which place to open for a target with several', async () => {
107
+ await writeDeployConfigAsync(tempDir, {
108
+ targets: {
109
+ integration: { places: [place(222, 'hub'), place(333, 'arena')] },
110
+ },
111
+ });
112
+ await expect(launchHandlerAsync({ deployTarget: 'integration', cwd: tempDir })).rejects.toThrow("Target 'integration' has 2 places. Pick one:\n - integration.places.hub\n - integration.places.arena");
113
+ expect(launchStudioAsync).not.toHaveBeenCalled();
114
+ });
115
+ it('skips a config without targets, like a repo root universe id', async () => {
116
+ await writeDeployConfigAsync(tempDir, { universeId: 900 });
117
+ const result = await launchHandlerAsync({ cwd: tempDir });
118
+ expect(launchStudioAsync).toHaveBeenCalledWith({});
52
119
  expect(result.summary).toBe('Studio launched');
53
120
  });
54
- it('propagates errors from launchStudioAsync', async () => {
55
- vi.mocked(launchStudioAsync).mockRejectedValueOnce(new Error('Studio not found'));
56
- await expect(launchHandlerAsync()).rejects.toThrow('Studio not found');
121
+ it('asks for a target when the config has no default', async () => {
122
+ await writeDeployConfigAsync(tempDir, {
123
+ targets: { alpha: place(1), beta: place(2) },
124
+ });
125
+ await expect(launchHandlerAsync({ cwd: tempDir })).rejects.toThrow('has several targets and no default. Name one: alpha, beta');
126
+ });
127
+ it('fails on a target when no deploy.nevermore.json is found', async () => {
128
+ await expect(launchHandlerAsync({ deployTarget: 'test', cwd: tempDir })).rejects.toThrow(/No deploy.nevermore.json in .* to find target 'test'/);
129
+ });
130
+ it('refuses a target together with --place', async () => {
131
+ await expect(launchHandlerAsync({
132
+ deployTarget: 'test',
133
+ placePath: '/tmp/game.rbxl',
134
+ cwd: tempDir,
135
+ })).rejects.toThrow('not both');
57
136
  });
58
- it('result shape matches LaunchResult interface', async () => {
59
- const result = await launchHandlerAsync();
60
- expect(result).toHaveProperty('launched');
61
- expect(result).toHaveProperty('summary');
62
- expect(typeof result.launched).toBe('boolean');
63
- expect(typeof result.summary).toBe('string');
137
+ it('prefers an explicit --place over the config', async () => {
138
+ await writeDeployConfigAsync(tempDir, { targets: { test: place(111) } });
139
+ await launchHandlerAsync({ placePath: '/tmp/game.rbxl', cwd: tempDir });
140
+ expect(launchStudioAsync).toHaveBeenCalledWith({
141
+ placePath: '/tmp/game.rbxl',
142
+ });
64
143
  });
65
144
  });
66
145
  //# sourceMappingURL=launch.test.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"launch.test.js","sourceRoot":"","sources":["../../../../../src/commands/process/launch/launch.test.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAElD,wDAAwD;AACxD,EAAE,CAAC,IAAI,CAAC,4CAA4C,EAAE,GAAG,EAAE,CAAC,CAAC;IAC3D,iBAAiB,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC;QAC3C,OAAO,EAAE,EAAE;QACX,SAAS,EAAE,EAAE,CAAC,EAAE,EAAE;KACnB,CAAC;CACH,CAAC,CAAC,CAAC;AAEJ,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAE/E,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;IAClC,EAAE,CAAC,4CAA4C,EAAE,KAAK,IAAI,EAAE;QAC1D,MAAM,MAAM,GAAG,MAAM,kBAAkB,EAAE,CAAC;QAE1C,MAAM,CAAC,iBAAiB,CAAC,CAAC,gBAAgB,EAAE,CAAC;QAC7C,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACnC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;IACjD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,wCAAwC,EAAE,KAAK,IAAI,EAAE;QACtD,MAAM,MAAM,GAAG,M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B,YAAY,EAAE,MAAM;YACpB,SAAS,EAAE,gBAAgB;YAC3B,GAAG,EAAE,OAAO;SACb,CAAC,CACH,CAAC,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IAChC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,6CAA6C,EAAE,KAAK,IAAI,EAAE;QAC3D,MAAM,sBAAsB,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC;QAEzE,MAAM,kBAAkB,CAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC;QAExE,MAAM,CAAC,iBAAiB,CAAC,CAAC,oBAAoB,CAAC;YAC7C,SAAS,EAAE,gBAAgB;SAC5B,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * `process list` — list connected Studio sessions.
3
3
  */
4
+ import { type SessionTargeting } from '../../framework/define-command.js';
4
5
  import type { BridgeConnection } from '../../../bridge/index.js';
5
6
  import type { SessionInfo } from '../../../bridge/index.js';
6
7
  export interface SessionsResult {
@@ -10,7 +11,7 @@ export interface SessionsResult {
10
11
  /**
11
12
  * List all connected Studio sessions with a summary message.
12
13
  */
13
- export declare function listSessionsHandlerAsync(connection: BridgeConnection): Promise<SessionsResult>;
14
+ export declare function listSessionsHandlerAsync(connection: BridgeConnection, targeting?: SessionTargeting): Promise<SessionsResult>;
14
15
  export declare function formatSessionsTable(result: SessionsResult): string;
15
16
  export declare const listCommand: import("../../framework/define-command.js").CommandDefinition<unknown, SessionsResult>;
16
17
  //# sourceMappingURL=list.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../../../src/commands/process/list/list.ts"],"names":[],"mappings":"AAAA;;GAEG;AAQH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAI5D,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,wBAAsB,wBAAwB,CAC5C,UAAU,EAAE,gBAAgB,GAC3B,OAAO,CAAC,cAAc,CAAC,CAezB;AAiBD,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM,CAGlE;AAED,eAAO,MAAM,WAAW,wFAYtB,CAAC"}
1
+ {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../../../src/commands/process/list/list.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAEL,KAAK,gBAAgB,EACtB,MAAM,mCAAmC,CAAC;AAM3C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAI5D,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,wBAAsB,wBAAwB,CAC5C,UAAU,EAAE,gBAAgB,EAC5B,SAAS,GAAE,gBAAqB,GAC/B,OAAO,CAAC,cAAc,CAAC,CAiBzB;AAiBD,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM,CAGlE;AAED,eAAO,MAAM,WAAW,wFActB,CAAC"}
@@ -1,19 +1,21 @@
1
1
  /**
2
2
  * `process list` — list connected Studio sessions.
3
3
  */
4
- import { defineCommand } from '../../framework/define-command.js';
4
+ import { defineCommand, } from '../../framework/define-command.js';
5
5
  import { OutputHelper } from '@quenty/cli-output-helpers';
6
6
  import { formatTable, } from '@quenty/cli-output-helpers/reporting';
7
7
  import { colorizeState } from '../format-state.js';
8
8
  /**
9
9
  * List all connected Studio sessions with a summary message.
10
10
  */
11
- export async function listSessionsHandlerAsync(connection) {
12
- const sessions = connection.listSessions();
11
+ export async function listSessionsHandlerAsync(connection, targeting = {}) {
12
+ const sessions = connection.findSessions(targeting.target, targeting.context);
13
13
  if (sessions.length === 0) {
14
14
  return {
15
15
  sessions: [],
16
- summary: 'No active sessions. Is Studio running with the studio-bridge plugin?',
16
+ summary: connection.listSessions().length > 0
17
+ ? 'No sessions match --target/--context.'
18
+ : 'No active sessions. Is Studio running with the studio-bridge plugin?',
17
19
  };
18
20
  }
19
21
  return {
@@ -24,7 +26,7 @@ export async function listSessionsHandlerAsync(connection) {
24
26
  const sessionColumns = [
25
27
  {
26
28
  header: 'Session',
27
- value: (s) => s.sessionId.slice(0, 8),
29
+ value: (s) => s.sessionId,
28
30
  format: (v) => OutputHelper.formatHint(v),
29
31
  },
30
32
  { header: 'Context', value: (s) => s.context },
@@ -47,10 +49,11 @@ export const listCommand = defineCommand({
47
49
  category: 'infrastructure',
48
50
  safety: 'read',
49
51
  scope: 'connection',
52
+ coversAllSessions: true,
50
53
  args: {},
51
54
  cli: {
52
55
  format: formatSessionsTable,
53
56
  },
54
- handler: async (connection) => listSessionsHandlerAsync(connection),
57
+ handler: async (connection, _args, targeting) => listSessionsHandlerAsync(connection, targeting),
55
58
  });
56
59
  //# sourceMappingURL=list.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"list.js","sourceRoot":"","sources":["../../../../../src/commands/process/list/list.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EACL,WAAW,GAEZ,MAAM,sCAAsC,CAAC;AAI9C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAOnD;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAC5C,UAA4B;IAE5B,MAAM,QAA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CAAC,CAAC,EAAE,EAAE,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC;KAC1C;IACD,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE;IAC9C,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,EAAE;IAC9C;QACE,MAAM,EAAE,OAAO;QACf,KAAK,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK;QACrB,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,aAAa,CAAC,CAAgB,CAAC;KAC/C;CACF,CAAC;AAEF,MAAM,UAAU,mBAAmB,CAAC,MAAsB;IACxD,IAAI,MAAM,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,MAAM,CAAC,OAAO,CAAC;IACxD,OAAO,WAAW,CAAC,MAAM,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;AACtD,CAAC;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,aAAa,CAAC;IACvC,KAAK,EAAE,SAAS;IAChB,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,gCAAgC;IAC7C,QAAQ,EAAE,gBAAgB;IAC1B,MAAM,EAAE,MAAM;IACd,KAAK,EAAE,YAAY;IACnB,iBAAiB,EAAE,IAAI;IACvB,IAAI,EAAE,EAAE;IACR,GAAG,EAAE;QACH,MAAM,EAAE,mBAAmB;KAC5B;IACD,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,CAC9C,wBAAwB,CAAC,UAAU,EAAE,SAAS,CAAC;CAClD,CAAC,CAAC"}
@@ -22,6 +22,7 @@ function createSessionInfo(overrides = {}) {
22
22
  function createMockConnection(sessions) {
23
23
  return {
24
24
  listSessions: () => sessions,
25
+ findSessions: () => sessions,
25
26
  getSession: (id) => sessions.find((s) => s.sessionId === id),
26
27
  };
27
28
  }
@@ -1 +1 @@
1
- {"version":3,"file":"list.test.js","sourceRoot":"","sources":["../../../../../src/commands/process/list/list.test.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAE9C,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAErD,SAAS,iBAAiB,CAAC,YAAkC,EAAE;IAC7D,OAAO;QACL,SAAS,EAAE,WAAW;QACtB,SAAS,EAAE,WAAW;QACtB,KAAK,EAAE,MAAM;QACb,aAAa,EAAE,OAAO;QACtB,YAAY,EAAE,CAAC,SAAS,EAAE,YAAY,CAAC;QACvC,WAAW,EAAE,IAAI,IAAI,EAAE;QACvB,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,MAAM;QACf,UAAU,EAAE,QAAQ;QACpB,OAAO,EAAE,GAAG;QACZ,MAAM,EAAE,GAAG;QACX,GAAG,SAAS;KACb,CAAC;AACJ,CAAC;AAED,SAAS,oBAAoB,CAAC,QAAuB;IACnD,OAAO;QACL,YAAY,EAAE,GAAG,EAAE,CAAC,QAAQ;QAC5B,UAAU,EAAE,CAAC,EAAU,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,KAAK,EAAE,CAAC;KAC9D,CAAC;AACX,CAAC;AAED,QAAQ,CAAC,0BAA0B,EAAE,GAAG,EAAE;IACxC,EAAE,CAAC,6CAA6C,EAAE,KAAK,IAAI,EAAE;QAC3D,MAAM,IAAI,GAAG,oBAAoB,CAAC,EAAE,CAAC,CAAC;QACtC,MAAM,MAAM,GAAG,MAAM,wBAAwB,CAAC,IAAI,CAAC,CAAC;QAEpD,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QACpC,MAAM,CAA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;QACpC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACjC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC7B,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACnC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -6,6 +6,7 @@
6
6
  * This is standalone (no existing connection needed) and is CLI-only.
7
7
  * MCP does NOT expose this command.
8
8
  */
9
+ import type { SerializedReturnValue } from '../../../server/web-socket-protocol.js';
9
10
  export interface ProcessRunOptions {
10
11
  scriptContent: string;
11
12
  packageName: string;
@@ -14,9 +15,16 @@ export interface ProcessRunOptions {
14
15
  verbose: boolean;
15
16
  showLogs: boolean;
16
17
  filePath?: string;
18
+ quiet?: boolean;
19
+ /** Passed to the script as `...`. */
20
+ args?: string[];
17
21
  }
18
22
  export interface ProcessRunResult {
19
23
  success: boolean;
24
+ output: string[];
25
+ error?: string;
26
+ returnValues?: SerializedReturnValue[];
27
+ durationMs: number;
20
28
  summary: string;
21
29
  }
22
30
  interface ProcessRunArgs {
@@ -24,6 +32,7 @@ interface ProcessRunArgs {
24
32
  file?: string;
25
33
  place?: string;
26
34
  timeout?: number;
35
+ scriptArgs?: string[];
27
36
  }
28
37
  export declare function processRunHandlerAsync(options: ProcessRunOptions): Promise<ProcessRunResult>;
29
38
  export declare const processRunCommand: import("../../framework/define-command.js").CommandDefinition<ProcessRunArgs, ProcessRunResult>;
@@ -1 +1 @@
1
- {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../../../src/commands/process/run/run.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAOH,MAAM,WAAW,iBAAiB;IAChC,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB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B,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,UAAU,cAAc;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB;AAED,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAAC,gBAAgB,CAAC,CAY3B;AAED,eAAO,MAAM,iBAAiB,iGAuD5B,CAAC"}
@@ -10,15 +10,15 @@ import { OutputHelper } from '@quenty/cli-output-helpers';
10
10
  import { defineCommand } from '../../framework/define-command.js';
11
11
  import { arg } from '../../framework/arg-builder.js';
12
12
  import { resolveScriptContentAsync } from '../../../cli/resolve-script-content.js';
13
+ import { isJsonOutputEnabled } from '../../../cli/cli-output-context.js';
14
+ import { formatReturnValues } from '../../console/exec/exec.js';
13
15
  export async function processRunHandlerAsync(options) {
14
16
  // Lazy import to avoid pulling in StudioBridgeServer at module load
15
17
  const { executeScriptAsync } = await import('../../../cli/script-executor.js');
16
- // executeScriptAsync calls process.exit internally, so this return
17
- // is only reachable in test scenarios where it's mocked.
18
- await executeScriptAsync(options);
18
+ const result = await executeScriptAsync(options);
19
19
  return {
20
- success: true,
21
- summary: 'Script execution completed.',
20
+ ...result,
21
+ summary: result.success ? 'Script completed.' : 'Script failed.',
22
22
  };
23
23
  }
24
24
  export const processRunCommand = defineCommand({
@@ -45,6 +45,14 @@ export const processRunCommand = defineCommand({
45
45
  description: 'Execution timeout in milliseconds',
46
46
  type: 'number',
47
47
  }),
48
+ scriptArgs: arg.passthrough({
49
+ description: 'Arguments after --, passed to the script as ... (all strings)',
50
+ }),
51
+ },
52
+ cli: {
53
+ format: (result) => result.returnValues && result.returnValues.length > 0
54
+ ? formatReturnValues(result.returnValues)
55
+ : '',
48
56
  },
49
57
  handler: async (args) => {
50
58
  const { scriptContent, filePath } = await resolveScriptContentAsync(args);
@@ -56,6 +64,8 @@ export const processRunCommand = defineCommand({
56
64
  verbose: OutputHelper.isVerbose(),
57
65
  showLogs: true,
58
66
  filePath,
67
+ quiet: isJsonOutputEnabled(),
68
+ args: args.scriptArgs,
59
69
  });
60
70
  },
61
71
  // No MCP config -- process run is CLI-only
@@ -1 +1 @@
1
- {"version":3,"file":"run.js","sourceRoot":"","sources":["../../../../../src/commands/process/run/run.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAE,GAAG,EAAE,MAAM,gCAAgC,CAAC;AACrD,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AAwBnF,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAC1C,OAA0B;IAE1B,oEAAoE;IACpE,MAAM,EAAE,kBAAkB,EAAE,GAAG,MAAM,MAAM,CACzC,iCAAiC,CAClC,CAAC;IAEF,mEAAmE;IACnE,yDAAyD;IACzD,MAAM,kBAAkB,CAAC,OAAO,CAAC,CAAC;IAElC,OAAO;QACL,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,6BAA6B;KACvC,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,iBAAiB,GAAG,aAAa,CAG5C;IACA,KAAK,EAAE,SAAS;IAChB,IAAI,EAAE,KAAK;IACX,WAAW,EACT,iEAAiE;IACnE,QAAQ,EAAE,WAAW;IACrB,MAAM,EAAE,MAAM;IACd,KAAK,EAAE,YAAY;IACnB,IAAI,EAAE;QACJ,IAAI,EAAE,GAAG,CAAC,UAAU,CAAC;YACnB,WAAW,EAAE,6BAA6B;YAC1C,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC;YACf,WAAW,EAAE,uCAAuC;YACpD,KAAK,EAA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C,CAAC;QAE1E,OAAO,sBAAsB,CAAC;YAC5B,aAAa;YACb,WAAW,EAAE,eAAe;YAC5B,SAAS,EAAE,IAAI,CAAC,KAAK;YACrB,SAAS,EAAE,IAAI,CAAC,OAAO,IAAI,OAAO;YAClC,OAAO,EAAE,YAAY,CAAC,SAAS,EAAE;YACjC,QAAQ,EAAE,IAAI;YACd,QAAQ;YACR,KAAK,EAAE,mBAAmB,EAAE;YAC5B,IAAI,EAAE,IAAI,CAAC,UAAU;SACtB,CAAC,CAAC;IACL,CAAC;IACD,2CAA2C;CAC5C,CAAC,CAAC"}
@@ -10,6 +10,8 @@ export interface ServeOptions {
10
10
  export interface ServeResult {
11
11
  port: number;
12
12
  event: string;
13
+ timestamp: string;
14
+ summary: string;
13
15
  }
14
16
  /** Blocks until shutdown signal or timeout. */
15
17
  export declare function serveHandlerAsync(options?: ServeOptions): Promise<ServeResult>;
@@ -1 +1 @@
1
- {"version":3,"file":"serve.d.ts","sourceRoot":"","sources":["../../../../src/commands/serve/serve.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,+CAA+C;AAC/C,wBAAsB,iBAAiB,CACrC,OAAO,GAAE,YAAiB,GACzB,OAAO,CAAC,WAAW,CAAC,CAmHtB;AAED,eAAO,MAAM,YAAY,uFAmBvB,CAAC"}
1
+ {"version":3,"file":"serve.d.ts","sourceRoot":"","sources":["../../../../src/commands/serve/serve.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,+CAA+C;AAC/C,wBAAsB,iBAAiB,CACrC,OAAO,GAAE,YAAiB,GACzB,OAAO,CAAC,WAAW,CAAC,CAkItB;AAED,eAAO,MAAM,YAAY,uFAoBvB,CAAC"}
@@ -5,9 +5,13 @@
5
5
  import { defineCommand } from '../framework/define-command.js';
6
6
  import { arg } from '../framework/arg-builder.js';
7
7
  import { BridgeConnection } from '../../bridge/index.js';
8
+ import { isJsonOutputEnabled } from '../../cli/cli-output-context.js';
8
9
  /** Blocks until shutdown signal or timeout. */
9
10
  export async function serveHandlerAsync(options = {}) {
10
11
  const port = options.port ?? 38741;
12
+ options = { ...options, json: options.json || isJsonOutputEnabled() };
13
+ const alreadyRunning = new Error(`Port ${port} is already in use. A bridge host is already running. ` +
14
+ `Connect as a client with any studio-bridge command, or use --port to start on a different port.`);
11
15
  let connection;
12
16
  try {
13
17
  connection = await BridgeConnection.connectAsync({
@@ -19,11 +23,15 @@ export async function serveHandlerAsync(options = {}) {
19
23
  if (err instanceof Error &&
20
24
  'code' in err &&
21
25
  err.code === 'EADDRINUSE') {
22
- throw new Error(`Port ${port} is already in use. A bridge host is already running. ` +
23
- `Connect as a client with any studio-bridge command, or use --port to start on a different port.`);
26
+ throw alreadyRunning;
24
27
  }
25
28
  throw err;
26
29
  }
30
+ if (connection.role !== 'host') {
31
+ await connection.disconnectAsync();
32
+ throw alreadyRunning;
33
+ }
34
+ const listeningPort = connection.port;
27
35
  // Log startup
28
36
  if (options.json) {
29
37
  console.log(JSON.stringify({
@@ -103,12 +111,17 @@ export async function serveHandlerAsync(options = {}) {
103
111
  // Never resolves -- process runs until signal
104
112
  });
105
113
  }
106
- return { port: connection.port, event: 'stopped' };
114
+ return {
115
+ port: listeningPort,
116
+ event: 'stopped',
117
+ timestamp: new Date().toISOString(),
118
+ summary: 'Bridge host stopped.',
119
+ };
107
120
  }
108
121
  export const serveCommand = defineCommand({
109
122
  group: null,
110
123
  name: 'serve',
111
- description: 'Start the bridge server',
124
+ description: 'Start the bridge server (optional: keeps Studio connected, so commands run in about a second instead of ten)',
112
125
  category: 'infrastructure',
113
126
  safety: 'none',
114
127
  scope: 'standalone',