mikrojs 0.0.0 → 0.0.7

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 (497) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +76 -0
  3. package/bin/mikrojs.js +3 -0
  4. package/dist/_exports/ble.d.ts +3 -0
  5. package/dist/_exports/ble.d.ts.map +1 -0
  6. package/dist/_exports/ble.js +2 -0
  7. package/dist/_exports/ble.js.map +1 -0
  8. package/dist/_exports/cbor.d.ts +3 -0
  9. package/dist/_exports/cbor.d.ts.map +1 -0
  10. package/dist/_exports/cbor.js +2 -0
  11. package/dist/_exports/cbor.js.map +1 -0
  12. package/dist/_exports/console.d.ts +2 -0
  13. package/dist/_exports/console.d.ts.map +1 -0
  14. package/dist/_exports/console.js +2 -0
  15. package/dist/_exports/console.js.map +1 -0
  16. package/dist/_exports/env.d.ts +2 -0
  17. package/dist/_exports/env.d.ts.map +1 -0
  18. package/dist/_exports/env.js +2 -0
  19. package/dist/_exports/env.js.map +1 -0
  20. package/dist/_exports/format.d.ts +2 -0
  21. package/dist/_exports/format.d.ts.map +1 -0
  22. package/dist/_exports/format.js +2 -0
  23. package/dist/_exports/format.js.map +1 -0
  24. package/dist/_exports/fs.d.ts +2 -0
  25. package/dist/_exports/fs.d.ts.map +1 -0
  26. package/dist/_exports/fs.js +2 -0
  27. package/dist/_exports/fs.js.map +1 -0
  28. package/dist/_exports/http/helpers.d.ts +3 -0
  29. package/dist/_exports/http/helpers.d.ts.map +1 -0
  30. package/dist/_exports/http/helpers.js +5 -0
  31. package/dist/_exports/http/helpers.js.map +1 -0
  32. package/dist/_exports/http/request.d.ts +4 -0
  33. package/dist/_exports/http/request.d.ts.map +1 -0
  34. package/dist/_exports/http/request.js +10 -0
  35. package/dist/_exports/http/request.js.map +1 -0
  36. package/dist/_exports/i2c.d.ts +2 -0
  37. package/dist/_exports/i2c.d.ts.map +1 -0
  38. package/dist/_exports/i2c.js +2 -0
  39. package/dist/_exports/i2c.js.map +1 -0
  40. package/dist/_exports/index.d.ts +61 -0
  41. package/dist/_exports/index.d.ts.map +1 -0
  42. package/dist/_exports/index.js +4 -0
  43. package/dist/_exports/index.js.map +1 -0
  44. package/dist/_exports/inspect.d.ts +2 -0
  45. package/dist/_exports/inspect.d.ts.map +1 -0
  46. package/dist/_exports/inspect.js +2 -0
  47. package/dist/_exports/inspect.js.map +1 -0
  48. package/dist/_exports/kv/nvs.d.ts +3 -0
  49. package/dist/_exports/kv/nvs.d.ts.map +1 -0
  50. package/dist/_exports/kv/nvs.js +2 -0
  51. package/dist/_exports/kv/nvs.js.map +1 -0
  52. package/dist/_exports/kv/rtc.d.ts +3 -0
  53. package/dist/_exports/kv/rtc.d.ts.map +1 -0
  54. package/dist/_exports/kv/rtc.js +2 -0
  55. package/dist/_exports/kv/rtc.js.map +1 -0
  56. package/dist/_exports/neopixel.d.ts +2 -0
  57. package/dist/_exports/neopixel.d.ts.map +1 -0
  58. package/dist/_exports/neopixel.js +2 -0
  59. package/dist/_exports/neopixel.js.map +1 -0
  60. package/dist/_exports/pin.d.ts +2 -0
  61. package/dist/_exports/pin.d.ts.map +1 -0
  62. package/dist/_exports/pin.js +2 -0
  63. package/dist/_exports/pin.js.map +1 -0
  64. package/dist/_exports/pwm.d.ts +2 -0
  65. package/dist/_exports/pwm.d.ts.map +1 -0
  66. package/dist/_exports/pwm.js +2 -0
  67. package/dist/_exports/pwm.js.map +1 -0
  68. package/dist/_exports/reader.d.ts +2 -0
  69. package/dist/_exports/reader.d.ts.map +1 -0
  70. package/dist/_exports/reader.js +2 -0
  71. package/dist/_exports/reader.js.map +1 -0
  72. package/dist/_exports/result.d.ts +2 -0
  73. package/dist/_exports/result.d.ts.map +1 -0
  74. package/dist/_exports/result.js +2 -0
  75. package/dist/_exports/result.js.map +1 -0
  76. package/dist/_exports/schema.d.ts +2 -0
  77. package/dist/_exports/schema.d.ts.map +1 -0
  78. package/dist/_exports/schema.js +2 -0
  79. package/dist/_exports/schema.js.map +1 -0
  80. package/dist/_exports/sim.d.ts +199 -0
  81. package/dist/_exports/sim.d.ts.map +1 -0
  82. package/dist/_exports/sim.js +8 -0
  83. package/dist/_exports/sim.js.map +1 -0
  84. package/dist/_exports/sleep.d.ts +2 -0
  85. package/dist/_exports/sleep.d.ts.map +1 -0
  86. package/dist/_exports/sleep.js +2 -0
  87. package/dist/_exports/sleep.js.map +1 -0
  88. package/dist/_exports/sntp.d.ts +3 -0
  89. package/dist/_exports/sntp.d.ts.map +1 -0
  90. package/dist/_exports/sntp.js +2 -0
  91. package/dist/_exports/sntp.js.map +1 -0
  92. package/dist/_exports/spi.d.ts +2 -0
  93. package/dist/_exports/spi.d.ts.map +1 -0
  94. package/dist/_exports/spi.js +2 -0
  95. package/dist/_exports/spi.js.map +1 -0
  96. package/dist/_exports/stdio.d.ts +2 -0
  97. package/dist/_exports/stdio.d.ts.map +1 -0
  98. package/dist/_exports/stdio.js +2 -0
  99. package/dist/_exports/stdio.js.map +1 -0
  100. package/dist/_exports/stream.d.ts +2 -0
  101. package/dist/_exports/stream.d.ts.map +1 -0
  102. package/dist/_exports/stream.js +2 -0
  103. package/dist/_exports/stream.js.map +1 -0
  104. package/dist/_exports/sys.d.ts +2 -0
  105. package/dist/_exports/sys.d.ts.map +1 -0
  106. package/dist/_exports/sys.js +2 -0
  107. package/dist/_exports/sys.js.map +1 -0
  108. package/dist/_exports/test.d.ts +2 -0
  109. package/dist/_exports/test.d.ts.map +1 -0
  110. package/dist/_exports/test.js +2 -0
  111. package/dist/_exports/test.js.map +1 -0
  112. package/dist/_exports/uart.d.ts +2 -0
  113. package/dist/_exports/uart.d.ts.map +1 -0
  114. package/dist/_exports/uart.js +2 -0
  115. package/dist/_exports/uart.js.map +1 -0
  116. package/dist/_exports/wifi.d.ts +3 -0
  117. package/dist/_exports/wifi.d.ts.map +1 -0
  118. package/dist/_exports/wifi.js +2 -0
  119. package/dist/_exports/wifi.js.map +1 -0
  120. package/dist/cli/cli.d.ts +3 -0
  121. package/dist/cli/cli.d.ts.map +1 -0
  122. package/dist/cli/cli.js +215 -0
  123. package/dist/cli/cli.js.map +1 -0
  124. package/dist/cli/cliWrapper.d.ts +3 -0
  125. package/dist/cli/cliWrapper.d.ts.map +1 -0
  126. package/dist/cli/cliWrapper.js +27 -0
  127. package/dist/cli/cliWrapper.js.map +1 -0
  128. package/dist/cli/commands/build-runtime.d.ts +14 -0
  129. package/dist/cli/commands/build-runtime.d.ts.map +1 -0
  130. package/dist/cli/commands/build-runtime.js +122 -0
  131. package/dist/cli/commands/build-runtime.js.map +1 -0
  132. package/dist/cli/commands/build.d.ts +31 -0
  133. package/dist/cli/commands/build.d.ts.map +1 -0
  134. package/dist/cli/commands/build.js +145 -0
  135. package/dist/cli/commands/build.js.map +1 -0
  136. package/dist/cli/commands/clean.d.ts +16 -0
  137. package/dist/cli/commands/clean.d.ts.map +1 -0
  138. package/dist/cli/commands/clean.js +148 -0
  139. package/dist/cli/commands/clean.js.map +1 -0
  140. package/dist/cli/commands/console.d.ts +19 -0
  141. package/dist/cli/commands/console.d.ts.map +1 -0
  142. package/dist/cli/commands/console.js +32 -0
  143. package/dist/cli/commands/console.js.map +1 -0
  144. package/dist/cli/commands/deploy.d.ts +63 -0
  145. package/dist/cli/commands/deploy.d.ts.map +1 -0
  146. package/dist/cli/commands/deploy.js +242 -0
  147. package/dist/cli/commands/deploy.js.map +1 -0
  148. package/dist/cli/commands/dev.d.ts +41 -0
  149. package/dist/cli/commands/dev.d.ts.map +1 -0
  150. package/dist/cli/commands/dev.js +170 -0
  151. package/dist/cli/commands/dev.js.map +1 -0
  152. package/dist/cli/commands/docs.d.ts +7 -0
  153. package/dist/cli/commands/docs.d.ts.map +1 -0
  154. package/dist/cli/commands/docs.js +20 -0
  155. package/dist/cli/commands/docs.js.map +1 -0
  156. package/dist/cli/commands/env.d.ts +59 -0
  157. package/dist/cli/commands/env.d.ts.map +1 -0
  158. package/dist/cli/commands/env.js +257 -0
  159. package/dist/cli/commands/env.js.map +1 -0
  160. package/dist/cli/commands/erase.d.ts +18 -0
  161. package/dist/cli/commands/erase.d.ts.map +1 -0
  162. package/dist/cli/commands/erase.js +90 -0
  163. package/dist/cli/commands/erase.js.map +1 -0
  164. package/dist/cli/commands/flash.d.ts +30 -0
  165. package/dist/cli/commands/flash.d.ts.map +1 -0
  166. package/dist/cli/commands/flash.js +243 -0
  167. package/dist/cli/commands/flash.js.map +1 -0
  168. package/dist/cli/commands/home.d.ts +7 -0
  169. package/dist/cli/commands/home.d.ts.map +1 -0
  170. package/dist/cli/commands/home.js +20 -0
  171. package/dist/cli/commands/home.js.map +1 -0
  172. package/dist/cli/commands/ls.d.ts +17 -0
  173. package/dist/cli/commands/ls.d.ts.map +1 -0
  174. package/dist/cli/commands/ls.js +62 -0
  175. package/dist/cli/commands/ls.js.map +1 -0
  176. package/dist/cli/commands/sim/clean.d.ts +7 -0
  177. package/dist/cli/commands/sim/clean.d.ts.map +1 -0
  178. package/dist/cli/commands/sim/clean.js +34 -0
  179. package/dist/cli/commands/sim/clean.js.map +1 -0
  180. package/dist/cli/commands/sim/deploy.d.ts +46 -0
  181. package/dist/cli/commands/sim/deploy.d.ts.map +1 -0
  182. package/dist/cli/commands/sim/deploy.js +127 -0
  183. package/dist/cli/commands/sim/deploy.js.map +1 -0
  184. package/dist/cli/commands/sim/dev.d.ts +40 -0
  185. package/dist/cli/commands/sim/dev.d.ts.map +1 -0
  186. package/dist/cli/commands/sim/dev.js +254 -0
  187. package/dist/cli/commands/sim/dev.js.map +1 -0
  188. package/dist/cli/commands/sim/env.d.ts +56 -0
  189. package/dist/cli/commands/sim/env.d.ts.map +1 -0
  190. package/dist/cli/commands/sim/env.js +204 -0
  191. package/dist/cli/commands/sim/env.js.map +1 -0
  192. package/dist/cli/commands/sim/profile.d.ts +67 -0
  193. package/dist/cli/commands/sim/profile.d.ts.map +1 -0
  194. package/dist/cli/commands/sim/profile.js +354 -0
  195. package/dist/cli/commands/sim/profile.js.map +1 -0
  196. package/dist/cli/commands/sim/repl.d.ts +16 -0
  197. package/dist/cli/commands/sim/repl.d.ts.map +1 -0
  198. package/dist/cli/commands/sim/repl.js +119 -0
  199. package/dist/cli/commands/sim/repl.js.map +1 -0
  200. package/dist/cli/commands/sim/reset.d.ts +11 -0
  201. package/dist/cli/commands/sim/reset.d.ts.map +1 -0
  202. package/dist/cli/commands/sim/reset.js +59 -0
  203. package/dist/cli/commands/sim/reset.js.map +1 -0
  204. package/dist/cli/commands/sim/scaffold.d.ts +11 -0
  205. package/dist/cli/commands/sim/scaffold.d.ts.map +1 -0
  206. package/dist/cli/commands/sim/scaffold.js +41 -0
  207. package/dist/cli/commands/sim/scaffold.js.map +1 -0
  208. package/dist/cli/commands/sim/test.d.ts +49 -0
  209. package/dist/cli/commands/sim/test.d.ts.map +1 -0
  210. package/dist/cli/commands/sim/test.js +364 -0
  211. package/dist/cli/commands/sim/test.js.map +1 -0
  212. package/dist/cli/commands/sim.d.ts +220 -0
  213. package/dist/cli/commands/sim.d.ts.map +1 -0
  214. package/dist/cli/commands/sim.js +69 -0
  215. package/dist/cli/commands/sim.js.map +1 -0
  216. package/dist/cli/commands/tail.d.ts +14 -0
  217. package/dist/cli/commands/tail.d.ts.map +1 -0
  218. package/dist/cli/commands/tail.js +50 -0
  219. package/dist/cli/commands/tail.js.map +1 -0
  220. package/dist/cli/commands/test.d.ts +39 -0
  221. package/dist/cli/commands/test.d.ts.map +1 -0
  222. package/dist/cli/commands/test.js +432 -0
  223. package/dist/cli/commands/test.js.map +1 -0
  224. package/dist/cli/components/DevicePicker.d.ts +9 -0
  225. package/dist/cli/components/DevicePicker.d.ts.map +1 -0
  226. package/dist/cli/components/DevicePicker.js +71 -0
  227. package/dist/cli/components/DevicePicker.js.map +1 -0
  228. package/dist/cli/components/EnvEditor.d.ts +12 -0
  229. package/dist/cli/components/EnvEditor.d.ts.map +1 -0
  230. package/dist/cli/components/EnvEditor.js +201 -0
  231. package/dist/cli/components/EnvEditor.js.map +1 -0
  232. package/dist/cli/components/TextInput.d.ts +28 -0
  233. package/dist/cli/components/TextInput.d.ts.map +1 -0
  234. package/dist/cli/components/TextInput.js +73 -0
  235. package/dist/cli/components/TextInput.js.map +1 -0
  236. package/dist/cli/components/TitledBox.d.ts +27 -0
  237. package/dist/cli/components/TitledBox.d.ts.map +1 -0
  238. package/dist/cli/components/TitledBox.js +111 -0
  239. package/dist/cli/components/TitledBox.js.map +1 -0
  240. package/dist/cli/hooks/useDevices.d.ts +23 -0
  241. package/dist/cli/hooks/useDevices.d.ts.map +1 -0
  242. package/dist/cli/hooks/useDevices.js +19 -0
  243. package/dist/cli/hooks/useDevices.js.map +1 -0
  244. package/dist/cli/lib/RenderAndExit.d.ts +6 -0
  245. package/dist/cli/lib/RenderAndExit.d.ts.map +1 -0
  246. package/dist/cli/lib/RenderAndExit.js +8 -0
  247. package/dist/cli/lib/RenderAndExit.js.map +1 -0
  248. package/dist/cli/lib/Spinner.d.ts +11 -0
  249. package/dist/cli/lib/Spinner.d.ts.map +1 -0
  250. package/dist/cli/lib/Spinner.js +22 -0
  251. package/dist/cli/lib/Spinner.js.map +1 -0
  252. package/dist/cli/lib/agent.d.ts +38 -0
  253. package/dist/cli/lib/agent.d.ts.map +1 -0
  254. package/dist/cli/lib/agent.js +87 -0
  255. package/dist/cli/lib/agent.js.map +1 -0
  256. package/dist/cli/lib/boards.d.ts +23 -0
  257. package/dist/cli/lib/boards.d.ts.map +1 -0
  258. package/dist/cli/lib/boards.js +67 -0
  259. package/dist/cli/lib/boards.js.map +1 -0
  260. package/dist/cli/lib/build.d.ts +47 -0
  261. package/dist/cli/lib/build.d.ts.map +1 -0
  262. package/dist/cli/lib/build.js +533 -0
  263. package/dist/cli/lib/build.js.map +1 -0
  264. package/dist/cli/lib/connectSim.d.ts +21 -0
  265. package/dist/cli/lib/connectSim.d.ts.map +1 -0
  266. package/dist/cli/lib/connectSim.js +20 -0
  267. package/dist/cli/lib/connectSim.js.map +1 -0
  268. package/dist/cli/lib/deploy.d.ts +42 -0
  269. package/dist/cli/lib/deploy.d.ts.map +1 -0
  270. package/dist/cli/lib/deploy.js +121 -0
  271. package/dist/cli/lib/deploy.js.map +1 -0
  272. package/dist/cli/lib/deployProgress.d.ts +8 -0
  273. package/dist/cli/lib/deployProgress.d.ts.map +1 -0
  274. package/dist/cli/lib/deployProgress.js +32 -0
  275. package/dist/cli/lib/deployProgress.js.map +1 -0
  276. package/dist/cli/lib/dotenv.d.ts +16 -0
  277. package/dist/cli/lib/dotenv.d.ts.map +1 -0
  278. package/dist/cli/lib/dotenv.js +33 -0
  279. package/dist/cli/lib/dotenv.js.map +1 -0
  280. package/dist/cli/lib/esbuild.d.ts +7 -0
  281. package/dist/cli/lib/esbuild.d.ts.map +1 -0
  282. package/dist/cli/lib/esbuild.js +15 -0
  283. package/dist/cli/lib/esbuild.js.map +1 -0
  284. package/dist/cli/lib/esptool.d.ts +41 -0
  285. package/dist/cli/lib/esptool.d.ts.map +1 -0
  286. package/dist/cli/lib/esptool.js +43 -0
  287. package/dist/cli/lib/esptool.js.map +1 -0
  288. package/dist/cli/lib/firmware.d.ts +24 -0
  289. package/dist/cli/lib/firmware.d.ts.map +1 -0
  290. package/dist/cli/lib/firmware.js +379 -0
  291. package/dist/cli/lib/firmware.js.map +1 -0
  292. package/dist/cli/lib/firmwareCompat.d.ts +19 -0
  293. package/dist/cli/lib/firmwareCompat.d.ts.map +1 -0
  294. package/dist/cli/lib/firmwareCompat.js +31 -0
  295. package/dist/cli/lib/firmwareCompat.js.map +1 -0
  296. package/dist/cli/lib/heapBaseline.d.ts +15 -0
  297. package/dist/cli/lib/heapBaseline.d.ts.map +1 -0
  298. package/dist/cli/lib/heapBaseline.js +39 -0
  299. package/dist/cli/lib/heapBaseline.js.map +1 -0
  300. package/dist/cli/lib/ink-table/index.d.ts +88 -0
  301. package/dist/cli/lib/ink-table/index.d.ts.map +1 -0
  302. package/dist/cli/lib/ink-table/index.js +217 -0
  303. package/dist/cli/lib/ink-table/index.js.map +1 -0
  304. package/dist/cli/lib/loadMikroConfig.d.ts +7 -0
  305. package/dist/cli/lib/loadMikroConfig.d.ts.map +1 -0
  306. package/dist/cli/lib/loadMikroConfig.js +26 -0
  307. package/dist/cli/lib/loadMikroConfig.js.map +1 -0
  308. package/dist/cli/lib/minify.d.ts +3 -0
  309. package/dist/cli/lib/minify.d.ts.map +1 -0
  310. package/dist/cli/lib/minify.js +89 -0
  311. package/dist/cli/lib/minify.js.map +1 -0
  312. package/dist/cli/lib/openSim.d.ts +29 -0
  313. package/dist/cli/lib/openSim.d.ts.map +1 -0
  314. package/dist/cli/lib/openSim.js +32 -0
  315. package/dist/cli/lib/openSim.js.map +1 -0
  316. package/dist/cli/lib/ospawn.d.ts +34 -0
  317. package/dist/cli/lib/ospawn.d.ts.map +1 -0
  318. package/dist/cli/lib/ospawn.js +90 -0
  319. package/dist/cli/lib/ospawn.js.map +1 -0
  320. package/dist/cli/lib/parseMinifier.d.ts +10 -0
  321. package/dist/cli/lib/parseMinifier.d.ts.map +1 -0
  322. package/dist/cli/lib/parseMinifier.js +49 -0
  323. package/dist/cli/lib/parseMinifier.js.map +1 -0
  324. package/dist/cli/lib/parseSize.d.ts +6 -0
  325. package/dist/cli/lib/parseSize.d.ts.map +1 -0
  326. package/dist/cli/lib/parseSize.js +25 -0
  327. package/dist/cli/lib/parseSize.js.map +1 -0
  328. package/dist/cli/lib/projectRoot.d.ts +11 -0
  329. package/dist/cli/lib/projectRoot.d.ts.map +1 -0
  330. package/dist/cli/lib/projectRoot.js +28 -0
  331. package/dist/cli/lib/projectRoot.js.map +1 -0
  332. package/dist/cli/lib/protocol.d.ts +144 -0
  333. package/dist/cli/lib/protocol.d.ts.map +1 -0
  334. package/dist/cli/lib/protocol.js +385 -0
  335. package/dist/cli/lib/protocol.js.map +1 -0
  336. package/dist/cli/lib/recover.d.ts +25 -0
  337. package/dist/cli/lib/recover.d.ts.map +1 -0
  338. package/dist/cli/lib/recover.js +144 -0
  339. package/dist/cli/lib/recover.js.map +1 -0
  340. package/dist/cli/lib/resolveEntry.d.ts +7 -0
  341. package/dist/cli/lib/resolveEntry.d.ts.map +1 -0
  342. package/dist/cli/lib/resolveEntry.js +30 -0
  343. package/dist/cli/lib/resolveEntry.js.map +1 -0
  344. package/dist/cli/lib/runHooks.d.ts +34 -0
  345. package/dist/cli/lib/runHooks.d.ts.map +1 -0
  346. package/dist/cli/lib/runHooks.js +90 -0
  347. package/dist/cli/lib/runHooks.js.map +1 -0
  348. package/dist/cli/lib/serial/InkReplConsole.d.ts +27 -0
  349. package/dist/cli/lib/serial/InkReplConsole.d.ts.map +1 -0
  350. package/dist/cli/lib/serial/InkReplConsole.js +24 -0
  351. package/dist/cli/lib/serial/InkReplConsole.js.map +1 -0
  352. package/dist/cli/lib/serial/InkReplMode.d.ts +38 -0
  353. package/dist/cli/lib/serial/InkReplMode.d.ts.map +1 -0
  354. package/dist/cli/lib/serial/InkReplMode.js +90 -0
  355. package/dist/cli/lib/serial/InkReplMode.js.map +1 -0
  356. package/dist/cli/lib/serial/ReplConsole.d.ts +21 -0
  357. package/dist/cli/lib/serial/ReplConsole.d.ts.map +1 -0
  358. package/dist/cli/lib/serial/ReplConsole.js +249 -0
  359. package/dist/cli/lib/serial/ReplConsole.js.map +1 -0
  360. package/dist/cli/lib/serial/devSession.d.ts +53 -0
  361. package/dist/cli/lib/serial/devSession.d.ts.map +1 -0
  362. package/dist/cli/lib/serial/devSession.js +160 -0
  363. package/dist/cli/lib/serial/devSession.js.map +1 -0
  364. package/dist/cli/lib/serial/dispatchReplCommand.d.ts +25 -0
  365. package/dist/cli/lib/serial/dispatchReplCommand.d.ts.map +1 -0
  366. package/dist/cli/lib/serial/dispatchReplCommand.js +27 -0
  367. package/dist/cli/lib/serial/dispatchReplCommand.js.map +1 -0
  368. package/dist/cli/lib/serial/openSession.d.ts +28 -0
  369. package/dist/cli/lib/serial/openSession.d.ts.map +1 -0
  370. package/dist/cli/lib/serial/openSession.js +48 -0
  371. package/dist/cli/lib/serial/openSession.js.map +1 -0
  372. package/dist/cli/lib/serial/replStateMachine.d.ts +169 -0
  373. package/dist/cli/lib/serial/replStateMachine.d.ts.map +1 -0
  374. package/dist/cli/lib/serial/replStateMachine.js +650 -0
  375. package/dist/cli/lib/serial/replStateMachine.js.map +1 -0
  376. package/dist/cli/lib/serial/runAgentRepl.d.ts +33 -0
  377. package/dist/cli/lib/serial/runAgentRepl.d.ts.map +1 -0
  378. package/dist/cli/lib/serial/runAgentRepl.js +80 -0
  379. package/dist/cli/lib/serial/runAgentRepl.js.map +1 -0
  380. package/dist/cli/lib/session.d.ts +163 -0
  381. package/dist/cli/lib/session.d.ts.map +1 -0
  382. package/dist/cli/lib/session.js +490 -0
  383. package/dist/cli/lib/session.js.map +1 -0
  384. package/dist/cli/lib/simConfig.d.ts +15 -0
  385. package/dist/cli/lib/simConfig.d.ts.map +1 -0
  386. package/dist/cli/lib/simConfig.js +25 -0
  387. package/dist/cli/lib/simConfig.js.map +1 -0
  388. package/dist/cli/lib/simPid.d.ts +30 -0
  389. package/dist/cli/lib/simPid.d.ts.map +1 -0
  390. package/dist/cli/lib/simPid.js +112 -0
  391. package/dist/cli/lib/simPid.js.map +1 -0
  392. package/dist/cli/lib/simTransport.d.ts +17 -0
  393. package/dist/cli/lib/simTransport.d.ts.map +1 -0
  394. package/dist/cli/lib/simTransport.js +80 -0
  395. package/dist/cli/lib/simTransport.js.map +1 -0
  396. package/dist/cli/lib/testRunner.d.ts +86 -0
  397. package/dist/cli/lib/testRunner.d.ts.map +1 -0
  398. package/dist/cli/lib/testRunner.js +469 -0
  399. package/dist/cli/lib/testRunner.js.map +1 -0
  400. package/dist/cli/lib/transport.d.ts +34 -0
  401. package/dist/cli/lib/transport.d.ts.map +1 -0
  402. package/dist/cli/lib/transport.js +117 -0
  403. package/dist/cli/lib/transport.js.map +1 -0
  404. package/dist/cli/lib/useObservable.d.ts +4 -0
  405. package/dist/cli/lib/useObservable.d.ts.map +1 -0
  406. package/dist/cli/lib/useObservable.js +22 -0
  407. package/dist/cli/lib/useObservable.js.map +1 -0
  408. package/dist/cli/lib/watcher.d.ts +10 -0
  409. package/dist/cli/lib/watcher.d.ts.map +1 -0
  410. package/dist/cli/lib/watcher.js +34 -0
  411. package/dist/cli/lib/watcher.js.map +1 -0
  412. package/dist/constants.d.ts +13 -0
  413. package/dist/constants.d.ts.map +1 -0
  414. package/dist/constants.js +27 -0
  415. package/dist/constants.js.map +1 -0
  416. package/dist/simulator/builtins/ble.d.ts +3 -0
  417. package/dist/simulator/builtins/ble.d.ts.map +1 -0
  418. package/dist/simulator/builtins/ble.js +45 -0
  419. package/dist/simulator/builtins/ble.js.map +1 -0
  420. package/dist/simulator/builtins/console.d.ts +8 -0
  421. package/dist/simulator/builtins/console.d.ts.map +1 -0
  422. package/dist/simulator/builtins/console.js +24 -0
  423. package/dist/simulator/builtins/console.js.map +1 -0
  424. package/dist/simulator/builtins/http.d.ts +3 -0
  425. package/dist/simulator/builtins/http.d.ts.map +1 -0
  426. package/dist/simulator/builtins/http.js +32 -0
  427. package/dist/simulator/builtins/http.js.map +1 -0
  428. package/dist/simulator/builtins/i2c.d.ts +3 -0
  429. package/dist/simulator/builtins/i2c.d.ts.map +1 -0
  430. package/dist/simulator/builtins/i2c.js +16 -0
  431. package/dist/simulator/builtins/i2c.js.map +1 -0
  432. package/dist/simulator/builtins/index.d.ts +7 -0
  433. package/dist/simulator/builtins/index.d.ts.map +1 -0
  434. package/dist/simulator/builtins/index.js +49 -0
  435. package/dist/simulator/builtins/index.js.map +1 -0
  436. package/dist/simulator/builtins/kv.d.ts +3 -0
  437. package/dist/simulator/builtins/kv.d.ts.map +1 -0
  438. package/dist/simulator/builtins/kv.js +38 -0
  439. package/dist/simulator/builtins/kv.js.map +1 -0
  440. package/dist/simulator/builtins/neopixel.d.ts +3 -0
  441. package/dist/simulator/builtins/neopixel.d.ts.map +1 -0
  442. package/dist/simulator/builtins/neopixel.js +13 -0
  443. package/dist/simulator/builtins/neopixel.js.map +1 -0
  444. package/dist/simulator/builtins/nvs-kv.d.ts +3 -0
  445. package/dist/simulator/builtins/nvs-kv.d.ts.map +1 -0
  446. package/dist/simulator/builtins/nvs-kv.js +34 -0
  447. package/dist/simulator/builtins/nvs-kv.js.map +1 -0
  448. package/dist/simulator/builtins/pin.d.ts +3 -0
  449. package/dist/simulator/builtins/pin.d.ts.map +1 -0
  450. package/dist/simulator/builtins/pin.js +31 -0
  451. package/dist/simulator/builtins/pin.js.map +1 -0
  452. package/dist/simulator/builtins/pwm.d.ts +3 -0
  453. package/dist/simulator/builtins/pwm.d.ts.map +1 -0
  454. package/dist/simulator/builtins/pwm.js +29 -0
  455. package/dist/simulator/builtins/pwm.js.map +1 -0
  456. package/dist/simulator/builtins/sleep.d.ts +3 -0
  457. package/dist/simulator/builtins/sleep.d.ts.map +1 -0
  458. package/dist/simulator/builtins/sleep.js +32 -0
  459. package/dist/simulator/builtins/sleep.js.map +1 -0
  460. package/dist/simulator/builtins/sntp.d.ts +3 -0
  461. package/dist/simulator/builtins/sntp.d.ts.map +1 -0
  462. package/dist/simulator/builtins/sntp.js +12 -0
  463. package/dist/simulator/builtins/sntp.js.map +1 -0
  464. package/dist/simulator/builtins/spi.d.ts +3 -0
  465. package/dist/simulator/builtins/spi.d.ts.map +1 -0
  466. package/dist/simulator/builtins/spi.js +15 -0
  467. package/dist/simulator/builtins/spi.js.map +1 -0
  468. package/dist/simulator/builtins/types.d.ts +24 -0
  469. package/dist/simulator/builtins/types.d.ts.map +1 -0
  470. package/dist/simulator/builtins/types.js +2 -0
  471. package/dist/simulator/builtins/types.js.map +1 -0
  472. package/dist/simulator/builtins/uart.d.ts +3 -0
  473. package/dist/simulator/builtins/uart.d.ts.map +1 -0
  474. package/dist/simulator/builtins/uart.js +20 -0
  475. package/dist/simulator/builtins/uart.js.map +1 -0
  476. package/dist/simulator/builtins/wifi.d.ts +3 -0
  477. package/dist/simulator/builtins/wifi.d.ts.map +1 -0
  478. package/dist/simulator/builtins/wifi.js +54 -0
  479. package/dist/simulator/builtins/wifi.js.map +1 -0
  480. package/dist/simulator/devRunner.d.ts +41 -0
  481. package/dist/simulator/devRunner.d.ts.map +1 -0
  482. package/dist/simulator/devRunner.js +140 -0
  483. package/dist/simulator/devRunner.js.map +1 -0
  484. package/dist/simulator/loadSimStubs.d.ts +15 -0
  485. package/dist/simulator/loadSimStubs.d.ts.map +1 -0
  486. package/dist/simulator/loadSimStubs.js +54 -0
  487. package/dist/simulator/loadSimStubs.js.map +1 -0
  488. package/dist/simulator/simProcess.d.ts +11 -0
  489. package/dist/simulator/simProcess.d.ts.map +1 -0
  490. package/dist/simulator/simProcess.js +963 -0
  491. package/dist/simulator/simProcess.js.map +1 -0
  492. package/dist/simulator/simTemplates.d.ts +6 -0
  493. package/dist/simulator/simTemplates.d.ts.map +1 -0
  494. package/dist/simulator/simTemplates.js +21 -0
  495. package/dist/simulator/simTemplates.js.map +1 -0
  496. package/package.json +123 -2
  497. package/runtime.d.ts +95 -0
@@ -0,0 +1,220 @@
1
+ import type { InferValue } from '@optique/core/parser';
2
+ import { type ComponentType } from 'react';
3
+ export declare const args: import("@optique/core").Parser<"sync", {
4
+ readonly action: "sim";
5
+ readonly sub: {
6
+ readonly subcommand: "clean";
7
+ } | {
8
+ readonly subcommand: "deploy";
9
+ readonly entry: string | undefined;
10
+ readonly env: string | undefined;
11
+ readonly secrets: string | undefined;
12
+ readonly noEnvFile: true | undefined;
13
+ readonly erase: true | undefined;
14
+ readonly noRestart: true | undefined;
15
+ readonly noMinify: true | undefined;
16
+ readonly minifier: string | undefined;
17
+ readonly minifyLevel: string | undefined;
18
+ readonly noBytecode: true | undefined;
19
+ readonly json: true | undefined;
20
+ readonly agent: true | undefined;
21
+ } | {
22
+ readonly subcommand: "dev";
23
+ readonly entry: string | undefined;
24
+ readonly noMinify: true | undefined;
25
+ readonly minifier: string | undefined;
26
+ readonly minifyLevel: string | undefined;
27
+ readonly noBytecode: true | undefined;
28
+ readonly env: string | undefined;
29
+ readonly secrets: string | undefined;
30
+ readonly noEnvFile: true | undefined;
31
+ readonly agent: true | undefined;
32
+ } | {
33
+ readonly subcommand: "env";
34
+ readonly envSub: {
35
+ readonly envSubcommand: "list";
36
+ readonly json: true | undefined;
37
+ readonly agent: true | undefined;
38
+ } | {
39
+ readonly envSubcommand: "get";
40
+ readonly key: string;
41
+ readonly json: true | undefined;
42
+ readonly agent: true | undefined;
43
+ } | {
44
+ readonly envSubcommand: "set";
45
+ readonly secret: true | undefined;
46
+ readonly key: string;
47
+ readonly value: string | undefined;
48
+ readonly json: true | undefined;
49
+ readonly agent: true | undefined;
50
+ } | {
51
+ readonly envSubcommand: "delete";
52
+ readonly key: string;
53
+ readonly json: true | undefined;
54
+ readonly agent: true | undefined;
55
+ };
56
+ } | {
57
+ readonly subcommand: "profile";
58
+ readonly entry: string | undefined;
59
+ readonly memLimit: string | undefined;
60
+ readonly memoryBudget: number | undefined;
61
+ readonly chip: string | undefined;
62
+ readonly top: number | undefined;
63
+ readonly sort: string | undefined;
64
+ readonly minBytes: number | undefined;
65
+ readonly includeNative: true | undefined;
66
+ readonly includeBuiltins: true | undefined;
67
+ readonly onlyNative: true | undefined;
68
+ readonly onlyBuiltins: true | undefined;
69
+ readonly bundle: true | undefined;
70
+ readonly noBundle: true | undefined;
71
+ readonly noMinify: true | undefined;
72
+ readonly minifier: string | undefined;
73
+ readonly minifyLevel: string | undefined;
74
+ readonly json: true | undefined;
75
+ readonly env: string | undefined;
76
+ readonly noEnvFile: true | undefined;
77
+ } | {
78
+ readonly subcommand: "repl";
79
+ readonly agent: true | undefined;
80
+ } | {
81
+ readonly subcommand: "reset";
82
+ readonly yes: true | undefined;
83
+ } | {
84
+ readonly subcommand: "scaffold";
85
+ readonly overwrite: true | undefined;
86
+ } | {
87
+ readonly subcommand: "test";
88
+ readonly filters: readonly string[];
89
+ readonly env: string | undefined;
90
+ readonly secrets: string | undefined;
91
+ readonly noEnvFile: true | undefined;
92
+ readonly noMinify: true | undefined;
93
+ readonly minifier: string | undefined;
94
+ readonly minifyLevel: string | undefined;
95
+ readonly noBytecode: true | undefined;
96
+ readonly timeout: string | undefined;
97
+ readonly updateHeapBaselines: true | undefined;
98
+ readonly diagnostics: true | undefined;
99
+ readonly json: true | undefined;
100
+ readonly agent: true | undefined;
101
+ };
102
+ }, ["matched", string] | ["parsing", {
103
+ readonly action: "sim";
104
+ readonly sub: [0, import("@optique/core").ParserResult<["matched", string] | ["parsing", {
105
+ readonly subcommand: "dev";
106
+ readonly entry: [import("@optique/core").ValueParserResult<string> | undefined] | undefined;
107
+ readonly noMinify: [import("@optique/core").ValueParserResult<true> | undefined] | undefined;
108
+ readonly minifier: [import("@optique/core").ValueParserResult<string> | undefined] | undefined;
109
+ readonly minifyLevel: [import("@optique/core").ValueParserResult<string> | undefined] | undefined;
110
+ readonly noBytecode: [import("@optique/core").ValueParserResult<true> | undefined] | undefined;
111
+ readonly env: [import("@optique/core").ValueParserResult<string> | undefined] | undefined;
112
+ readonly secrets: [import("@optique/core").ValueParserResult<string> | undefined] | undefined;
113
+ readonly noEnvFile: [import("@optique/core").ValueParserResult<true> | undefined] | undefined;
114
+ readonly agent: [import("@optique/core").ValueParserResult<true> | undefined] | undefined;
115
+ }] | undefined>] | [1, import("@optique/core").ParserResult<["matched", string] | ["parsing", {
116
+ readonly subcommand: "deploy";
117
+ readonly entry: [import("@optique/core").ValueParserResult<string> | undefined] | undefined;
118
+ readonly env: [import("@optique/core").ValueParserResult<string> | undefined] | undefined;
119
+ readonly secrets: [import("@optique/core").ValueParserResult<string> | undefined] | undefined;
120
+ readonly noEnvFile: [import("@optique/core").ValueParserResult<true> | undefined] | undefined;
121
+ readonly erase: [import("@optique/core").ValueParserResult<true> | undefined] | undefined;
122
+ readonly noRestart: [import("@optique/core").ValueParserResult<true> | undefined] | undefined;
123
+ readonly noMinify: [import("@optique/core").ValueParserResult<true> | undefined] | undefined;
124
+ readonly minifier: [import("@optique/core").ValueParserResult<string> | undefined] | undefined;
125
+ readonly minifyLevel: [import("@optique/core").ValueParserResult<string> | undefined] | undefined;
126
+ readonly noBytecode: [import("@optique/core").ValueParserResult<true> | undefined] | undefined;
127
+ readonly json: [import("@optique/core").ValueParserResult<true> | undefined] | undefined;
128
+ readonly agent: [import("@optique/core").ValueParserResult<true> | undefined] | undefined;
129
+ }] | undefined>] | [2, import("@optique/core").ParserResult<["matched", string] | ["parsing", {
130
+ readonly subcommand: "repl";
131
+ readonly agent: [import("@optique/core").ValueParserResult<true> | undefined] | undefined;
132
+ }] | undefined>] | [3, import("@optique/core").ParserResult<["matched", string] | ["parsing", {
133
+ readonly subcommand: "test";
134
+ readonly filters: readonly (import("@optique/core").ValueParserResult<string> | undefined)[];
135
+ readonly env: [import("@optique/core").ValueParserResult<string> | undefined] | undefined;
136
+ readonly secrets: [import("@optique/core").ValueParserResult<string> | undefined] | undefined;
137
+ readonly noEnvFile: [import("@optique/core").ValueParserResult<true> | undefined] | undefined;
138
+ readonly noMinify: [import("@optique/core").ValueParserResult<true> | undefined] | undefined;
139
+ readonly minifier: [import("@optique/core").ValueParserResult<string> | undefined] | undefined;
140
+ readonly minifyLevel: [import("@optique/core").ValueParserResult<string> | undefined] | undefined;
141
+ readonly noBytecode: [import("@optique/core").ValueParserResult<true> | undefined] | undefined;
142
+ readonly timeout: [import("@optique/core").ValueParserResult<string> | undefined] | undefined;
143
+ readonly updateHeapBaselines: [import("@optique/core").ValueParserResult<true> | undefined] | undefined;
144
+ readonly diagnostics: [import("@optique/core").ValueParserResult<true> | undefined] | undefined;
145
+ readonly json: [import("@optique/core").ValueParserResult<true> | undefined] | undefined;
146
+ readonly agent: [import("@optique/core").ValueParserResult<true> | undefined] | undefined;
147
+ }] | undefined>] | [4, import("@optique/core").ParserResult<["matched", string] | ["parsing", {
148
+ readonly subcommand: "env";
149
+ readonly envSub: [0, import("@optique/core").ParserResult<["matched", string] | ["parsing", {
150
+ readonly envSubcommand: "list";
151
+ readonly json: [import("@optique/core").ValueParserResult<true> | undefined] | undefined;
152
+ readonly agent: [import("@optique/core").ValueParserResult<true> | undefined] | undefined;
153
+ }] | undefined>] | [1, import("@optique/core").ParserResult<["matched", string] | ["parsing", {
154
+ readonly envSubcommand: "get";
155
+ readonly key: import("@optique/core").ValueParserResult<string> | undefined;
156
+ readonly json: [import("@optique/core").ValueParserResult<true> | undefined] | undefined;
157
+ readonly agent: [import("@optique/core").ValueParserResult<true> | undefined] | undefined;
158
+ }] | undefined>] | [2, import("@optique/core").ParserResult<["matched", string] | ["parsing", {
159
+ readonly envSubcommand: "set";
160
+ readonly secret: [import("@optique/core").ValueParserResult<true> | undefined] | undefined;
161
+ readonly key: import("@optique/core").ValueParserResult<string> | undefined;
162
+ readonly value: [import("@optique/core").ValueParserResult<string> | undefined] | undefined;
163
+ readonly json: [import("@optique/core").ValueParserResult<true> | undefined] | undefined;
164
+ readonly agent: [import("@optique/core").ValueParserResult<true> | undefined] | undefined;
165
+ }] | undefined>] | [3, import("@optique/core").ParserResult<["matched", string] | ["parsing", {
166
+ readonly envSubcommand: "delete";
167
+ readonly key: import("@optique/core").ValueParserResult<string> | undefined;
168
+ readonly json: [import("@optique/core").ValueParserResult<true> | undefined] | undefined;
169
+ readonly agent: [import("@optique/core").ValueParserResult<true> | undefined] | undefined;
170
+ }] | undefined>] | undefined;
171
+ }] | undefined>] | [5, import("@optique/core").ParserResult<["matched", string] | ["parsing", {
172
+ readonly subcommand: "clean";
173
+ }] | undefined>] | [6, import("@optique/core").ParserResult<["matched", string] | ["parsing", {
174
+ readonly subcommand: "reset";
175
+ readonly yes: [import("@optique/core").ValueParserResult<true> | undefined] | undefined;
176
+ }] | undefined>] | [7, import("@optique/core").ParserResult<["matched", string] | ["parsing", {
177
+ readonly subcommand: "profile";
178
+ readonly entry: [import("@optique/core").ValueParserResult<string> | undefined] | undefined;
179
+ readonly memLimit: [import("@optique/core").ValueParserResult<string> | undefined] | undefined;
180
+ readonly memoryBudget: [import("@optique/core").ValueParserResult<number> | undefined] | undefined;
181
+ readonly chip: [import("@optique/core").ValueParserResult<string> | undefined] | undefined;
182
+ readonly top: [import("@optique/core").ValueParserResult<number> | undefined] | undefined;
183
+ readonly sort: [import("@optique/core").ValueParserResult<string> | undefined] | undefined;
184
+ readonly minBytes: [import("@optique/core").ValueParserResult<number> | undefined] | undefined;
185
+ readonly includeNative: [import("@optique/core").ValueParserResult<true> | undefined] | undefined;
186
+ readonly includeBuiltins: [import("@optique/core").ValueParserResult<true> | undefined] | undefined;
187
+ readonly onlyNative: [import("@optique/core").ValueParserResult<true> | undefined] | undefined;
188
+ readonly onlyBuiltins: [import("@optique/core").ValueParserResult<true> | undefined] | undefined;
189
+ readonly bundle: [import("@optique/core").ValueParserResult<true> | undefined] | undefined;
190
+ readonly noBundle: [import("@optique/core").ValueParserResult<true> | undefined] | undefined;
191
+ readonly noMinify: [import("@optique/core").ValueParserResult<true> | undefined] | undefined;
192
+ readonly minifier: [import("@optique/core").ValueParserResult<string> | undefined] | undefined;
193
+ readonly minifyLevel: [import("@optique/core").ValueParserResult<string> | undefined] | undefined;
194
+ readonly json: [import("@optique/core").ValueParserResult<true> | undefined] | undefined;
195
+ readonly env: [import("@optique/core").ValueParserResult<string> | undefined] | undefined;
196
+ readonly noEnvFile: [import("@optique/core").ValueParserResult<true> | undefined] | undefined;
197
+ }] | undefined>] | [8, import("@optique/core").ParserResult<["matched", string] | ["parsing", {
198
+ readonly subcommand: "scaffold";
199
+ readonly overwrite: [import("@optique/core").ValueParserResult<true> | undefined] | undefined;
200
+ }] | undefined>] | undefined;
201
+ }] | undefined>;
202
+ type Args = InferValue<typeof args>;
203
+ export declare function run(config: Args): Promise<void>;
204
+ /**
205
+ * Map subcommand → React component for the dispatcher in cli.ts.
206
+ * Subcommands without an Ink component (one-shots) return null.
207
+ */
208
+ export declare function getInkComponent(sub: Args['sub']): {
209
+ Component: ComponentType<{
210
+ args: any;
211
+ }>;
212
+ props: any;
213
+ } | null;
214
+ export default function SimComponent(props: {
215
+ args: Args;
216
+ }): import("react").ReactElement<{
217
+ args: any;
218
+ }, string | import("react").JSXElementConstructor<any>> | null;
219
+ export {};
220
+ //# sourceMappingURL=sim.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/sim.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,sBAAsB,CAAA;AACpD,OAAO,EAAC,KAAK,aAAa,EAAgB,MAAM,OAAO,CAAA;AAYvD,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eAgBhB,CAAA;AAED,KAAK,IAAI,GAAG,UAAU,CAAC,OAAO,IAAI,CAAC,CAAA;AAEnC,wBAAsB,GAAG,CAAC,MAAM,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CA+BrD;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,GACf;IAAC,SAAS,EAAE,aAAa,CAAC;QAAC,IAAI,EAAE,GAAG,CAAA;KAAC,CAAC,CAAC;IAAC,KAAK,EAAE,GAAG,CAAA;CAAC,GAAG,IAAI,CAS5D;AAED,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAK,EAAE;IAAC,IAAI,EAAE,IAAI,CAAA;CAAC;UAXpB,GAAG;+DAetC"}
@@ -0,0 +1,69 @@
1
+ import { command, constant } from '@optique/core';
2
+ import { object as objectConstruct, or as orConstruct } from '@optique/core/constructs';
3
+ import { createElement } from 'react';
4
+ import * as cleanSub from './sim/clean.js';
5
+ import * as deploySub from './sim/deploy.js';
6
+ import * as devSub from './sim/dev.js';
7
+ import * as envSub from './sim/env.js';
8
+ import * as profileSub from './sim/profile.js';
9
+ import * as replSub from './sim/repl.js';
10
+ import * as resetSub from './sim/reset.js';
11
+ import * as scaffoldSub from './sim/scaffold.js';
12
+ import * as testSub from './sim/test.js';
13
+ export const args = command('sim', objectConstruct({
14
+ action: constant('sim'),
15
+ sub: orConstruct(devSub.args, deploySub.args, replSub.args, testSub.args, envSub.args, cleanSub.args, resetSub.args, profileSub.args, scaffoldSub.args),
16
+ }));
17
+ export async function run(config) {
18
+ const sub = config.sub;
19
+ switch (sub.subcommand) {
20
+ case 'dev':
21
+ await devSub.run(sub);
22
+ break;
23
+ case 'deploy':
24
+ await deploySub.run(sub);
25
+ break;
26
+ case 'repl':
27
+ await replSub.run(sub);
28
+ break;
29
+ case 'test':
30
+ await testSub.run(sub);
31
+ break;
32
+ case 'env':
33
+ await envSub.run(sub);
34
+ break;
35
+ case 'clean':
36
+ cleanSub.run();
37
+ break;
38
+ case 'reset':
39
+ await resetSub.run(sub);
40
+ break;
41
+ case 'profile':
42
+ await profileSub.run(sub);
43
+ break;
44
+ case 'scaffold':
45
+ scaffoldSub.run(sub);
46
+ break;
47
+ }
48
+ }
49
+ /**
50
+ * Map subcommand → React component for the dispatcher in cli.ts.
51
+ * Subcommands without an Ink component (one-shots) return null.
52
+ */
53
+ export function getInkComponent(sub) {
54
+ switch (sub.subcommand) {
55
+ case 'dev':
56
+ return { Component: devSub.default, props: { args: sub } };
57
+ case 'repl':
58
+ return { Component: replSub.default, props: { args: sub } };
59
+ default:
60
+ return null;
61
+ }
62
+ }
63
+ export default function SimComponent(props) {
64
+ const inkUi = getInkComponent(props.args.sub);
65
+ if (!inkUi)
66
+ return null;
67
+ return createElement(inkUi.Component, inkUi.props);
68
+ }
69
+ //# sourceMappingURL=sim.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim.js","sourceRoot":"","sources":["../../../src/cli/commands/sim.tsx"],"names":[],"mappings":"AAAA,OAA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K,CAAC,KAAK,CAAC,CAAA;AACpD,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { InferValue } from '@optique/core/parser';
2
+ export declare const args: import("@optique/core").Parser<"sync", {
3
+ readonly action: "tail";
4
+ readonly port: string | undefined;
5
+ readonly restart: true | undefined;
6
+ readonly logLevel: string | undefined;
7
+ }, ["matched", string] | ["parsing", {
8
+ readonly action: "tail";
9
+ readonly port: [import("@optique/core").ValueParserResult<string> | undefined] | undefined;
10
+ readonly restart: [import("@optique/core").ValueParserResult<true> | undefined] | undefined;
11
+ readonly logLevel: [import("@optique/core").ValueParserResult<string> | undefined] | undefined;
12
+ }] | undefined>;
13
+ export declare function run(config: InferValue<typeof args>): Promise<void>;
14
+ //# sourceMappingURL=tail.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tail.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/tail.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,sBAAsB,CAAA;AASpD,eAAO,MAAM,IAAI;;;;;;;;;;eAgBhB,CAAA;AAmBD,wBAAsB,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,OAAO,IAAI,CAAC,iBAoBxD"}
@@ -0,0 +1,50 @@
1
+ import { command, constant, message, optional } from '@optique/core';
2
+ import { object } from '@optique/core/constructs';
3
+ import { flag, option } from '@optique/core/primitives';
4
+ import { string } from '@optique/core/valueparser';
5
+ import { logLevelAllows, parseLogLevel } from '../lib/parseMinifier.js';
6
+ import { openSession } from '../lib/serial/openSession.js';
7
+ export const args = command('tail', object({
8
+ action: constant('tail'),
9
+ port: optional(option('-p', '--port', string({ metavar: 'PORT' }), {
10
+ description: message `Serial port to connect to, example: /dev/cu.usbmodem101`,
11
+ })),
12
+ restart: optional(flag('-r', '--restart', { description: message `Restart the device first` })),
13
+ logLevel: optional(option('--loglevel', string({ metavar: 'LEVEL' }), {
14
+ description: message `Drop device output below this level: none, error, warn, info, debug (default: debug)`,
15
+ })),
16
+ }));
17
+ function formatEvent(event, logLevel) {
18
+ switch (event.type) {
19
+ case 'log':
20
+ case 'warn':
21
+ case 'error':
22
+ case 'info':
23
+ case 'debug':
24
+ return logLevelAllows(logLevel, event.type) ? event.text : null;
25
+ case 'eval_error':
26
+ return event.text;
27
+ case 'raw':
28
+ return event.text.trim().length > 0 ? event.text : null;
29
+ default:
30
+ return null;
31
+ }
32
+ }
33
+ export async function run(config) {
34
+ const logLevel = parseLogLevel(config.logLevel) ?? 'debug';
35
+ const handles = await openSession({ port: config.port });
36
+ if (config.restart) {
37
+ handles.session.restart();
38
+ }
39
+ handles.session.messages$.subscribe((event) => {
40
+ const line = formatEvent(event, logLevel);
41
+ if (line !== null) {
42
+ process.stdout.write(line + '\n');
43
+ }
44
+ });
45
+ process.on('exit', () => handles.close());
46
+ process.on('SIGINT', () => process.exit(0));
47
+ process.on('SIGTERM', () => process.exit(0));
48
+ await new Promise(() => { });
49
+ }
50
+ //# sourceMappingURL=tail.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tail.js","sourceRoot":"","sources":["../../../src/cli/commands/tail.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAC,MAAM,eAAe,CAAA;AAClE,OAAO,EAAC,MAAM,EAAC,MAAM,0BAA0B,CAAA;AAE/C,OAAO,EAAC,IAAI,EAAE,MAAM,EAAC,MAAM,0BAA0B,CAAA;AACrD,OAAO,EAAC,MAAM,EAAC,MAAM,2BAA2B,CAAA;AAGhD,OAAO,EAAC,cAAc,EAAE,aAAa,EAAC,MAAM,yBAAyB,CAAA;AACrE,OAAO,EAAC,WAAW,EAAC,MAAM,8BAA8B,CAAA;AAGxD,MAAM,CAAC,MAAM,IAAI,GAAG,OAAO,CACzB,MAAM,EACN,MAAM,CAAC;IACL,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC;IACxB,IAAI,EAAE,QAAQ,CACZ,MAAM,CAAC,IAA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IAAI,EAAC,CAAC,CAAA;IAEtD,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;QACnB,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,CAAA;IAC3B,CAAC;IAED,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,EAAE;QAC5C,MAAM,IAAI,GAAG,WAAW,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;QACzC,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;YAClB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC,CAAA;QACnC,CAAC;IACH,CAAC,CAAC,CAAA;IAEF,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC,CAAA;IACzC,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAA;IAC3C,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAA;IAE5C,MAAM,IAAI,OAAO,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAA;AAC7B,CAAC"}
@@ -0,0 +1,39 @@
1
+ import type { InferValue } from '@optique/core/parser';
2
+ export declare const args: import("@optique/core").Parser<"sync", {
3
+ readonly action: "test";
4
+ readonly filters: readonly string[];
5
+ readonly port: string | undefined;
6
+ readonly env: string | undefined;
7
+ readonly secrets: string | undefined;
8
+ readonly noEnvFile: true | undefined;
9
+ readonly noMinify: true | undefined;
10
+ readonly minifier: string | undefined;
11
+ readonly minifyLevel: string | undefined;
12
+ readonly noBytecode: true | undefined;
13
+ readonly timeout: string | undefined;
14
+ readonly updateHeapBaselines: true | undefined;
15
+ readonly yes: true | undefined;
16
+ readonly diagnostics: true | undefined;
17
+ readonly json: true | undefined;
18
+ readonly agent: true | undefined;
19
+ }, ["matched", string] | ["parsing", {
20
+ readonly action: "test";
21
+ readonly filters: readonly (import("@optique/core").ValueParserResult<string> | undefined)[];
22
+ readonly port: [import("@optique/core").ValueParserResult<string> | undefined] | undefined;
23
+ readonly env: [import("@optique/core").ValueParserResult<string> | undefined] | undefined;
24
+ readonly secrets: [import("@optique/core").ValueParserResult<string> | undefined] | undefined;
25
+ readonly noEnvFile: [import("@optique/core").ValueParserResult<true> | undefined] | undefined;
26
+ readonly noMinify: [import("@optique/core").ValueParserResult<true> | undefined] | undefined;
27
+ readonly minifier: [import("@optique/core").ValueParserResult<string> | undefined] | undefined;
28
+ readonly minifyLevel: [import("@optique/core").ValueParserResult<string> | undefined] | undefined;
29
+ readonly noBytecode: [import("@optique/core").ValueParserResult<true> | undefined] | undefined;
30
+ readonly timeout: [import("@optique/core").ValueParserResult<string> | undefined] | undefined;
31
+ readonly updateHeapBaselines: [import("@optique/core").ValueParserResult<true> | undefined] | undefined;
32
+ readonly yes: [import("@optique/core").ValueParserResult<true> | undefined] | undefined;
33
+ readonly diagnostics: [import("@optique/core").ValueParserResult<true> | undefined] | undefined;
34
+ readonly json: [import("@optique/core").ValueParserResult<true> | undefined] | undefined;
35
+ readonly agent: [import("@optique/core").ValueParserResult<true> | undefined] | undefined;
36
+ }] | undefined>;
37
+ export declare function run(config: InferValue<typeof args>): Promise<void>;
38
+ export default function _Test(): null;
39
+ //# sourceMappingURL=test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/test.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,sBAAsB,CAAA;AAkBpD,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eA4DhB,CAAA;AAaD,wBAAsB,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,OAAO,IAAI,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAuMxE;AAkMD,MAAM,CAAC,OAAO,UAAU,KAAK,SAE5B"}