intershell 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (357) hide show
  1. package/README.md +301 -0
  2. package/dist/commands/ci/act.d.ts +13 -0
  3. package/dist/commands/ci/act.d.ts.map +1 -0
  4. package/dist/commands/ci/act.js +89 -0
  5. package/dist/commands/ci/act.js.map +1 -0
  6. package/dist/commands/ci/attach-affected.d.ts +12 -0
  7. package/dist/commands/ci/attach-affected.d.ts.map +1 -0
  8. package/dist/commands/ci/attach-affected.js +83 -0
  9. package/dist/commands/ci/attach-affected.js.map +1 -0
  10. package/dist/commands/ci/attach-service-ports.d.ts +10 -0
  11. package/dist/commands/ci/attach-service-ports.d.ts.map +1 -0
  12. package/dist/commands/ci/attach-service-ports.js +25 -0
  13. package/dist/commands/ci/attach-service-ports.js.map +1 -0
  14. package/dist/commands/commit-check.d.ts +13 -0
  15. package/dist/commands/commit-check.d.ts.map +1 -0
  16. package/dist/commands/commit-check.js +110 -0
  17. package/dist/commands/commit-check.js.map +1 -0
  18. package/dist/commands/commit.d.ts +16 -0
  19. package/dist/commands/commit.d.ts.map +1 -0
  20. package/dist/commands/commit.js +91 -0
  21. package/dist/commands/commit.js.map +1 -0
  22. package/dist/commands/dev/check.d.ts +13 -0
  23. package/dist/commands/dev/check.d.ts.map +1 -0
  24. package/dist/commands/dev/check.js +91 -0
  25. package/dist/commands/dev/check.js.map +1 -0
  26. package/dist/commands/dev/cleanup.d.ts +10 -0
  27. package/dist/commands/dev/cleanup.d.ts.map +1 -0
  28. package/dist/commands/dev/cleanup.js +28 -0
  29. package/dist/commands/dev/cleanup.js.map +1 -0
  30. package/dist/commands/dev/rm.d.ts +12 -0
  31. package/dist/commands/dev/rm.d.ts.map +1 -0
  32. package/dist/commands/dev/rm.js +49 -0
  33. package/dist/commands/dev/rm.js.map +1 -0
  34. package/dist/commands/dev/setup.d.ts +10 -0
  35. package/dist/commands/dev/setup.d.ts.map +1 -0
  36. package/dist/commands/dev/setup.js +40 -0
  37. package/dist/commands/dev/setup.js.map +1 -0
  38. package/dist/commands/local/cleanup.d.ts +12 -0
  39. package/dist/commands/local/cleanup.d.ts.map +1 -0
  40. package/dist/commands/local/cleanup.js +62 -0
  41. package/dist/commands/local/cleanup.js.map +1 -0
  42. package/dist/commands/local/setup.d.ts +11 -0
  43. package/dist/commands/local/setup.d.ts.map +1 -0
  44. package/dist/commands/local/setup.js +55 -0
  45. package/dist/commands/local/setup.js.map +1 -0
  46. package/dist/commands/local/vscode.d.ts +17 -0
  47. package/dist/commands/local/vscode.d.ts.map +1 -0
  48. package/dist/commands/local/vscode.js +94 -0
  49. package/dist/commands/local/vscode.js.map +1 -0
  50. package/dist/commands/update-package-json.d.ts +12 -0
  51. package/dist/commands/update-package-json.d.ts.map +1 -0
  52. package/dist/commands/update-package-json.js +82 -0
  53. package/dist/commands/update-package-json.js.map +1 -0
  54. package/dist/commands/version/apply.d.ts +16 -0
  55. package/dist/commands/version/apply.d.ts.map +1 -0
  56. package/dist/commands/version/apply.js +120 -0
  57. package/dist/commands/version/apply.js.map +1 -0
  58. package/dist/commands/version/ci.d.ts +12 -0
  59. package/dist/commands/version/ci.d.ts.map +1 -0
  60. package/dist/commands/version/ci.js +67 -0
  61. package/dist/commands/version/ci.js.map +1 -0
  62. package/dist/commands/version/prepare.d.ts +19 -0
  63. package/dist/commands/version/prepare.d.ts.map +1 -0
  64. package/dist/commands/version/prepare.js +153 -0
  65. package/dist/commands/version/prepare.js.map +1 -0
  66. package/dist/core/colorify.d.ts +21 -0
  67. package/dist/core/colorify.d.ts.map +1 -0
  68. package/dist/core/colorify.js +56 -0
  69. package/dist/core/colorify.js.map +1 -0
  70. package/dist/core/index.d.ts +4 -0
  71. package/dist/core/index.d.ts.map +1 -0
  72. package/dist/core/index.js +3 -0
  73. package/dist/core/index.js.map +1 -0
  74. package/dist/core/types.d.ts +181 -0
  75. package/dist/core/types.d.ts.map +1 -0
  76. package/dist/core/types.js +5 -0
  77. package/dist/core/types.js.map +1 -0
  78. package/dist/core/wrapshell.d.ts +19 -0
  79. package/dist/core/wrapshell.d.ts.map +1 -0
  80. package/dist/core/wrapshell.js +323 -0
  81. package/dist/core/wrapshell.js.map +1 -0
  82. package/dist/entities/affected/affected.d.ts +4 -0
  83. package/dist/entities/affected/affected.d.ts.map +1 -0
  84. package/dist/entities/affected/affected.js +20 -0
  85. package/dist/entities/affected/affected.js.map +1 -0
  86. package/dist/entities/affected/affected.test.d.ts +2 -0
  87. package/dist/entities/affected/affected.test.d.ts.map +1 -0
  88. package/dist/entities/affected/affected.test.js +305 -0
  89. package/dist/entities/affected/affected.test.js.map +1 -0
  90. package/dist/entities/affected/index.d.ts +2 -0
  91. package/dist/entities/affected/index.d.ts.map +1 -0
  92. package/dist/entities/affected/index.js +2 -0
  93. package/dist/entities/affected/index.js.map +1 -0
  94. package/dist/entities/branch/branch.d.ts +8 -0
  95. package/dist/entities/branch/branch.d.ts.map +1 -0
  96. package/dist/entities/branch/branch.js +74 -0
  97. package/dist/entities/branch/branch.js.map +1 -0
  98. package/dist/entities/branch/branch.test.d.ts +2 -0
  99. package/dist/entities/branch/branch.test.d.ts.map +1 -0
  100. package/dist/entities/branch/branch.test.js +316 -0
  101. package/dist/entities/branch/branch.test.js.map +1 -0
  102. package/dist/entities/branch/branch.types.d.ts +6 -0
  103. package/dist/entities/branch/branch.types.d.ts.map +1 -0
  104. package/dist/entities/branch/branch.types.js +2 -0
  105. package/dist/entities/branch/branch.types.js.map +1 -0
  106. package/dist/entities/branch/index.d.ts +3 -0
  107. package/dist/entities/branch/index.d.ts.map +1 -0
  108. package/dist/entities/branch/index.js +3 -0
  109. package/dist/entities/branch/index.js.map +1 -0
  110. package/dist/entities/commit/commit.d.ts +15 -0
  111. package/dist/entities/commit/commit.d.ts.map +1 -0
  112. package/dist/entities/commit/commit.js +196 -0
  113. package/dist/entities/commit/commit.js.map +1 -0
  114. package/dist/entities/commit/commit.test.d.ts +26 -0
  115. package/dist/entities/commit/commit.test.d.ts.map +1 -0
  116. package/dist/entities/commit/commit.test.js +550 -0
  117. package/dist/entities/commit/commit.test.js.map +1 -0
  118. package/dist/entities/commit/commit.types.d.ts +49 -0
  119. package/dist/entities/commit/commit.types.d.ts.map +1 -0
  120. package/dist/entities/commit/commit.types.js +31 -0
  121. package/dist/entities/commit/commit.types.js.map +1 -0
  122. package/dist/entities/commit/index.d.ts +3 -0
  123. package/dist/entities/commit/index.d.ts.map +1 -0
  124. package/dist/entities/commit/index.js +3 -0
  125. package/dist/entities/commit/index.js.map +1 -0
  126. package/dist/entities/commit/pr.d.ts +11 -0
  127. package/dist/entities/commit/pr.d.ts.map +1 -0
  128. package/dist/entities/commit/pr.js +201 -0
  129. package/dist/entities/commit/pr.js.map +1 -0
  130. package/dist/entities/commit/pr.test.d.ts +2 -0
  131. package/dist/entities/commit/pr.test.d.ts.map +1 -0
  132. package/dist/entities/commit/pr.test.js +782 -0
  133. package/dist/entities/commit/pr.test.js.map +1 -0
  134. package/dist/entities/compose/compose.d.ts +18 -0
  135. package/dist/entities/compose/compose.d.ts.map +1 -0
  136. package/dist/entities/compose/compose.js +197 -0
  137. package/dist/entities/compose/compose.js.map +1 -0
  138. package/dist/entities/compose/compose.test.d.ts +2 -0
  139. package/dist/entities/compose/compose.test.d.ts.map +1 -0
  140. package/dist/entities/compose/compose.test.js +406 -0
  141. package/dist/entities/compose/compose.test.js.map +1 -0
  142. package/dist/entities/compose/compose.types.d.ts +77 -0
  143. package/dist/entities/compose/compose.types.d.ts.map +1 -0
  144. package/dist/entities/compose/compose.types.js +2 -0
  145. package/dist/entities/compose/compose.types.js.map +1 -0
  146. package/dist/entities/compose/index.d.ts +3 -0
  147. package/dist/entities/compose/index.d.ts.map +1 -0
  148. package/dist/entities/compose/index.js +3 -0
  149. package/dist/entities/compose/index.js.map +1 -0
  150. package/dist/entities/entities.shell.d.ts +29 -0
  151. package/dist/entities/entities.shell.d.ts.map +1 -0
  152. package/dist/entities/entities.shell.js +27 -0
  153. package/dist/entities/entities.shell.js.map +1 -0
  154. package/dist/entities/entities.shell.test.d.ts +2 -0
  155. package/dist/entities/entities.shell.test.d.ts.map +1 -0
  156. package/dist/entities/entities.shell.test.js +23 -0
  157. package/dist/entities/entities.shell.test.js.map +1 -0
  158. package/dist/entities/index.d.ts +12 -0
  159. package/dist/entities/index.d.ts.map +1 -0
  160. package/dist/entities/index.js +12 -0
  161. package/dist/entities/index.js.map +1 -0
  162. package/dist/entities/intershell-config/intershell-config.d.ts +11 -0
  163. package/dist/entities/intershell-config/intershell-config.d.ts.map +1 -0
  164. package/dist/entities/intershell-config/intershell-config.default.d.ts +188 -0
  165. package/dist/entities/intershell-config/intershell-config.default.d.ts.map +1 -0
  166. package/dist/entities/intershell-config/intershell-config.default.js +225 -0
  167. package/dist/entities/intershell-config/intershell-config.default.js.map +1 -0
  168. package/dist/entities/intershell-config/intershell-config.js +132 -0
  169. package/dist/entities/intershell-config/intershell-config.js.map +1 -0
  170. package/dist/entities/intershell-config/intershell-config.test.d.ts +2 -0
  171. package/dist/entities/intershell-config/intershell-config.test.d.ts.map +1 -0
  172. package/dist/entities/intershell-config/intershell-config.test.js +102 -0
  173. package/dist/entities/intershell-config/intershell-config.test.js.map +1 -0
  174. package/dist/entities/intershell-config/intershell-config.types.d.ts +103 -0
  175. package/dist/entities/intershell-config/intershell-config.types.d.ts.map +1 -0
  176. package/dist/entities/intershell-config/intershell-config.types.js +2 -0
  177. package/dist/entities/intershell-config/intershell-config.types.js.map +1 -0
  178. package/dist/entities/package/index.d.ts +4 -0
  179. package/dist/entities/package/index.d.ts.map +1 -0
  180. package/dist/entities/package/index.js +4 -0
  181. package/dist/entities/package/index.js.map +1 -0
  182. package/dist/entities/package/package.d.ts +49 -0
  183. package/dist/entities/package/package.d.ts.map +1 -0
  184. package/dist/entities/package/package.js +234 -0
  185. package/dist/entities/package/package.js.map +1 -0
  186. package/dist/entities/package/package.shell.d.ts +48 -0
  187. package/dist/entities/package/package.shell.d.ts.map +1 -0
  188. package/dist/entities/package/package.shell.js +118 -0
  189. package/dist/entities/package/package.shell.js.map +1 -0
  190. package/dist/entities/package/package.test.d.ts +23 -0
  191. package/dist/entities/package/package.test.d.ts.map +1 -0
  192. package/dist/entities/package/package.test.js +637 -0
  193. package/dist/entities/package/package.test.js.map +1 -0
  194. package/dist/entities/package/package.types.d.ts +48 -0
  195. package/dist/entities/package/package.types.d.ts.map +1 -0
  196. package/dist/entities/package/package.types.js +2 -0
  197. package/dist/entities/package/package.types.js.map +1 -0
  198. package/dist/entities/package-changelog/index.d.ts +4 -0
  199. package/dist/entities/package-changelog/index.d.ts.map +1 -0
  200. package/dist/entities/package-changelog/index.js +4 -0
  201. package/dist/entities/package-changelog/index.js.map +1 -0
  202. package/dist/entities/package-changelog/package-changelog.d.ts +20 -0
  203. package/dist/entities/package-changelog/package-changelog.d.ts.map +1 -0
  204. package/dist/entities/package-changelog/package-changelog.js +59 -0
  205. package/dist/entities/package-changelog/package-changelog.js.map +1 -0
  206. package/dist/entities/package-changelog/package-changelog.types.d.ts +25 -0
  207. package/dist/entities/package-changelog/package-changelog.types.d.ts.map +1 -0
  208. package/dist/entities/package-changelog/package-changelog.types.js +2 -0
  209. package/dist/entities/package-changelog/package-changelog.types.js.map +1 -0
  210. package/dist/entities/package-changelog/template.d.ts +20 -0
  211. package/dist/entities/package-changelog/template.d.ts.map +1 -0
  212. package/dist/entities/package-changelog/template.default.d.ts +10 -0
  213. package/dist/entities/package-changelog/template.default.d.ts.map +1 -0
  214. package/dist/entities/package-changelog/template.default.js +85 -0
  215. package/dist/entities/package-changelog/template.default.js.map +1 -0
  216. package/dist/entities/package-changelog/template.js +90 -0
  217. package/dist/entities/package-changelog/template.js.map +1 -0
  218. package/dist/entities/package-commits/dependency-analyzer.d.ts +35 -0
  219. package/dist/entities/package-commits/dependency-analyzer.d.ts.map +1 -0
  220. package/dist/entities/package-commits/dependency-analyzer.js +169 -0
  221. package/dist/entities/package-commits/dependency-analyzer.js.map +1 -0
  222. package/dist/entities/package-commits/dependency-analyzer.test.d.ts +2 -0
  223. package/dist/entities/package-commits/dependency-analyzer.test.d.ts.map +1 -0
  224. package/dist/entities/package-commits/dependency-analyzer.test.js +25 -0
  225. package/dist/entities/package-commits/dependency-analyzer.test.js.map +1 -0
  226. package/dist/entities/package-commits/index.d.ts +3 -0
  227. package/dist/entities/package-commits/index.d.ts.map +1 -0
  228. package/dist/entities/package-commits/index.js +3 -0
  229. package/dist/entities/package-commits/index.js.map +1 -0
  230. package/dist/entities/package-commits/package-commits.d.ts +33 -0
  231. package/dist/entities/package-commits/package-commits.d.ts.map +1 -0
  232. package/dist/entities/package-commits/package-commits.js +149 -0
  233. package/dist/entities/package-commits/package-commits.js.map +1 -0
  234. package/dist/entities/package-commits/package-commits.test.d.ts +2 -0
  235. package/dist/entities/package-commits/package-commits.test.d.ts.map +1 -0
  236. package/dist/entities/package-commits/package-commits.test.js +40 -0
  237. package/dist/entities/package-commits/package-commits.test.js.map +1 -0
  238. package/dist/entities/package-tags/index.d.ts +2 -0
  239. package/dist/entities/package-tags/index.d.ts.map +1 -0
  240. package/dist/entities/package-tags/index.js +2 -0
  241. package/dist/entities/package-tags/index.js.map +1 -0
  242. package/dist/entities/package-tags/package-tags.d.ts +24 -0
  243. package/dist/entities/package-tags/package-tags.d.ts.map +1 -0
  244. package/dist/entities/package-tags/package-tags.js +197 -0
  245. package/dist/entities/package-tags/package-tags.js.map +1 -0
  246. package/dist/entities/package-tags/package-tags.test.d.ts +2 -0
  247. package/dist/entities/package-tags/package-tags.test.d.ts.map +1 -0
  248. package/dist/entities/package-tags/package-tags.test.js +60 -0
  249. package/dist/entities/package-tags/package-tags.test.js.map +1 -0
  250. package/dist/entities/package-version/index.d.ts +3 -0
  251. package/dist/entities/package-version/index.d.ts.map +1 -0
  252. package/dist/entities/package-version/index.js +3 -0
  253. package/dist/entities/package-version/index.js.map +1 -0
  254. package/dist/entities/package-version/package-version.d.ts +16 -0
  255. package/dist/entities/package-version/package-version.d.ts.map +1 -0
  256. package/dist/entities/package-version/package-version.js +166 -0
  257. package/dist/entities/package-version/package-version.js.map +1 -0
  258. package/dist/entities/package-version/package-version.test.d.ts +2 -0
  259. package/dist/entities/package-version/package-version.test.d.ts.map +1 -0
  260. package/dist/entities/package-version/package-version.test.js +113 -0
  261. package/dist/entities/package-version/package-version.test.js.map +1 -0
  262. package/dist/entities/package-version/package-version.types.d.ts +31 -0
  263. package/dist/entities/package-version/package-version.types.d.ts.map +1 -0
  264. package/dist/entities/package-version/package-version.types.js +2 -0
  265. package/dist/entities/package-version/package-version.types.js.map +1 -0
  266. package/dist/entities/tag/index.d.ts +3 -0
  267. package/dist/entities/tag/index.d.ts.map +1 -0
  268. package/dist/entities/tag/index.js +3 -0
  269. package/dist/entities/tag/index.js.map +1 -0
  270. package/dist/entities/tag/tag.d.ts +24 -0
  271. package/dist/entities/tag/tag.d.ts.map +1 -0
  272. package/dist/entities/tag/tag.js +168 -0
  273. package/dist/entities/tag/tag.js.map +1 -0
  274. package/dist/entities/tag/tag.test.d.ts +2 -0
  275. package/dist/entities/tag/tag.test.d.ts.map +1 -0
  276. package/dist/entities/tag/tag.test.js +638 -0
  277. package/dist/entities/tag/tag.test.js.map +1 -0
  278. package/dist/entities/tag/tag.types.d.ts +35 -0
  279. package/dist/entities/tag/tag.types.d.ts.map +1 -0
  280. package/dist/entities/tag/tag.types.js +2 -0
  281. package/dist/entities/tag/tag.types.js.map +1 -0
  282. package/dist/index.d.ts +3 -0
  283. package/dist/index.d.ts.map +1 -0
  284. package/dist/index.js +6 -0
  285. package/dist/index.js.map +1 -0
  286. package/package.json +73 -0
  287. package/src/commands/ci/act.ts +95 -0
  288. package/src/commands/ci/attach-affected.ts +93 -0
  289. package/src/commands/ci/attach-service-ports.ts +31 -0
  290. package/src/commands/commit-check.ts +124 -0
  291. package/src/commands/commit.ts +103 -0
  292. package/src/commands/dev/check.ts +117 -0
  293. package/src/commands/dev/cleanup.ts +34 -0
  294. package/src/commands/dev/rm.ts +66 -0
  295. package/src/commands/dev/setup.ts +48 -0
  296. package/src/commands/local/cleanup.ts +74 -0
  297. package/src/commands/local/setup.ts +68 -0
  298. package/src/commands/local/vscode.ts +118 -0
  299. package/src/commands/update-package-json.ts +104 -0
  300. package/src/commands/version/apply.ts +156 -0
  301. package/src/commands/version/ci.ts +85 -0
  302. package/src/commands/version/prepare.ts +217 -0
  303. package/src/core/colorify.ts +61 -0
  304. package/src/core/index.ts +3 -0
  305. package/src/core/types.ts +262 -0
  306. package/src/core/wrapshell.ts +388 -0
  307. package/src/entities/affected/affected.test.ts +427 -0
  308. package/src/entities/affected/affected.ts +22 -0
  309. package/src/entities/affected/index.ts +1 -0
  310. package/src/entities/branch/branch.test.ts +348 -0
  311. package/src/entities/branch/branch.ts +89 -0
  312. package/src/entities/branch/branch.types.ts +5 -0
  313. package/src/entities/branch/index.ts +2 -0
  314. package/src/entities/commit/commit.test.ts +769 -0
  315. package/src/entities/commit/commit.ts +245 -0
  316. package/src/entities/commit/commit.types.ts +81 -0
  317. package/src/entities/commit/index.ts +2 -0
  318. package/src/entities/commit/pr.test.ts +860 -0
  319. package/src/entities/commit/pr.ts +241 -0
  320. package/src/entities/compose/compose.test.ts +496 -0
  321. package/src/entities/compose/compose.ts +251 -0
  322. package/src/entities/compose/compose.types.ts +88 -0
  323. package/src/entities/compose/index.ts +2 -0
  324. package/src/entities/entities.shell.test.ts +35 -0
  325. package/src/entities/entities.shell.ts +81 -0
  326. package/src/entities/index.ts +11 -0
  327. package/src/entities/intershell-config/intershell-config.default.ts +229 -0
  328. package/src/entities/intershell-config/intershell-config.test.ts +117 -0
  329. package/src/entities/intershell-config/intershell-config.ts +143 -0
  330. package/src/entities/intershell-config/intershell-config.types.ts +118 -0
  331. package/src/entities/package/index.ts +3 -0
  332. package/src/entities/package/package.shell.ts +124 -0
  333. package/src/entities/package/package.test.ts +830 -0
  334. package/src/entities/package/package.ts +267 -0
  335. package/src/entities/package/package.types.ts +49 -0
  336. package/src/entities/package-changelog/index.ts +3 -0
  337. package/src/entities/package-changelog/package-changelog.ts +81 -0
  338. package/src/entities/package-changelog/package-changelog.types.ts +30 -0
  339. package/src/entities/package-changelog/template.default.ts +109 -0
  340. package/src/entities/package-changelog/template.ts +118 -0
  341. package/src/entities/package-commits/dependency-analyzer.test.ts +29 -0
  342. package/src/entities/package-commits/dependency-analyzer.ts +194 -0
  343. package/src/entities/package-commits/index.ts +2 -0
  344. package/src/entities/package-commits/package-commits.test.ts +44 -0
  345. package/src/entities/package-commits/package-commits.ts +191 -0
  346. package/src/entities/package-tags/index.ts +1 -0
  347. package/src/entities/package-tags/package-tags.test.ts +73 -0
  348. package/src/entities/package-tags/package-tags.ts +234 -0
  349. package/src/entities/package-version/index.ts +2 -0
  350. package/src/entities/package-version/package-version.test.ts +141 -0
  351. package/src/entities/package-version/package-version.ts +234 -0
  352. package/src/entities/package-version/package-version.types.ts +35 -0
  353. package/src/entities/tag/index.ts +2 -0
  354. package/src/entities/tag/tag.test.ts +844 -0
  355. package/src/entities/tag/tag.ts +208 -0
  356. package/src/entities/tag/tag.types.ts +37 -0
  357. package/src/index.ts +7 -0
package/README.md ADDED
@@ -0,0 +1,301 @@
1
+ # 🚀 InterShell - Next Generation CLI Framework
2
+
3
+ > **Interactive CLI applications made simple with page-based navigation and state management**
4
+
5
+ InterShell is a modern, type-safe CLI framework for building interactive command-line applications. It provides a clean separation between I/O handling and application logic through an event-driven architecture with page-based navigation.
6
+
7
+ ## ✨ Features
8
+
9
+ - **🎮 Page-Based Navigation** - Structure your CLI as pages with clean transitions
10
+ - **📊 State Management** - Redux-like state management with reducers and actions
11
+ - **🎨 Enhanced Colors** - Rich color support with RGB, HSL, and gradient effects
12
+ - **🔧 Type Safety** - Full TypeScript support with strict type checking
13
+ - **⚡ Event-Driven** - Clean event system for better testability and extensibility
14
+ - **🎯 Zero Dependencies** - Built from the ground up for Bun with no external deps
15
+ - **🧪 Testable** - Clean architecture makes testing individual components easy
16
+
17
+ ## 📦 Packages
18
+
19
+ InterShell is organized as a monorepo with multiple packages:
20
+
21
+ ### `../core`
22
+ Foundation utilities and types for the InterShell framework:
23
+ - Enhanced colorify system with RGB, HSL, and gradient support
24
+ - WrapShell script creation framework with type-safe argument parsing
25
+ - CLI utility functions for common operations
26
+ - Comprehensive type definitions
27
+
28
+ ### `@intershell/interactive`
29
+ Interactive CLI framework with page-based navigation:
30
+ - Main InterShell framework orchestrator
31
+ - Event-based InteractiveCLI implementation
32
+ - Page system with builders and common page types
33
+ - State management with reducers and actions
34
+
35
+ <svg aria-roledescription="flowchart-v2" role="graphics-document document" viewBox="-8 -8 878.8938598632812 301" style="max-width: 878.8938598632812px;" xmlns="http://www.w3.org/2000/svg" width="100%" id="mermaid-svg-1755831685709-tfz8nz33o"><style>#mermaid-svg-1755831685709-tfz8nz33o{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#cccccc;}#mermaid-svg-1755831685709-tfz8nz33o .error-icon{fill:#5a1d1d;}#mermaid-svg-1755831685709-tfz8nz33o .error-text{fill:#f48771;stroke:#f48771;}#mermaid-svg-1755831685709-tfz8nz33o .edge-thickness-normal{stroke-width:2px;}#mermaid-svg-1755831685709-tfz8nz33o .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-1755831685709-tfz8nz33o .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-1755831685709-tfz8nz33o .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-1755831685709-tfz8nz33o .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-1755831685709-tfz8nz33o .marker{fill:#cccccc;stroke:#cccccc;}#mermaid-svg-1755831685709-tfz8nz33o .marker.cross{stroke:#cccccc;}#mermaid-svg-1755831685709-tfz8nz33o svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-1755831685709-tfz8nz33o .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#cccccc;}#mermaid-svg-1755831685709-tfz8nz33o .cluster-label text{fill:#e7e7e7;}#mermaid-svg-1755831685709-tfz8nz33o .cluster-label span,#mermaid-svg-1755831685709-tfz8nz33o p{color:#e7e7e7;}#mermaid-svg-1755831685709-tfz8nz33o .label text,#mermaid-svg-1755831685709-tfz8nz33o span,#mermaid-svg-1755831685709-tfz8nz33o p{fill:#cccccc;color:#cccccc;}#mermaid-svg-1755831685709-tfz8nz33o .node rect,#mermaid-svg-1755831685709-tfz8nz33o .node circle,#mermaid-svg-1755831685709-tfz8nz33o .node ellipse,#mermaid-svg-1755831685709-tfz8nz33o .node polygon,#mermaid-svg-1755831685709-tfz8nz33o .node path{fill:#1e1e1e;stroke:#6b6b6b;stroke-width:1px;}#mermaid-svg-1755831685709-tfz8nz33o .flowchart-label text{text-anchor:middle;}#mermaid-svg-1755831685709-tfz8nz33o .node .label{text-align:center;}#mermaid-svg-1755831685709-tfz8nz33o .node.clickable{cursor:pointer;}#mermaid-svg-1755831685709-tfz8nz33o .arrowheadPath{fill:#e1e1e1;}#mermaid-svg-1755831685709-tfz8nz33o .edgePath .path{stroke:#cccccc;stroke-width:2.0px;}#mermaid-svg-1755831685709-tfz8nz33o .flowchart-link{stroke:#cccccc;fill:none;}#mermaid-svg-1755831685709-tfz8nz33o .edgeLabel{background-color:#1e1e1e99;text-align:center;}#mermaid-svg-1755831685709-tfz8nz33o .edgeLabel rect{opacity:0.5;background-color:#1e1e1e99;fill:#1e1e1e99;}#mermaid-svg-1755831685709-tfz8nz33o .labelBkg{background-color:rgba(30, 30, 30, 0.5);}#mermaid-svg-1755831685709-tfz8nz33o .cluster rect{fill:#3a3d41;stroke:#303031;stroke-width:1px;}#mermaid-svg-1755831685709-tfz8nz33o .cluster text{fill:#e7e7e7;}#mermaid-svg-1755831685709-tfz8nz33o .cluster span,#mermaid-svg-1755831685709-tfz8nz33o p{color:#e7e7e7;}#mermaid-svg-1755831685709-tfz8nz33o div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;background:#4d4d4d;border:1px solid #007fd4;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-1755831685709-tfz8nz33o .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#cccccc;}#mermaid-svg-1755831685709-tfz8nz33o :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;}</style><g><marker orient="auto" markerHeight="12" markerWidth="12" markerUnits="userSpaceOnUse" refY="5" refX="6" viewBox="0 0 10 10" class="marker flowchart" id="mermaid-svg-1755831685709-tfz8nz33o_flowchart-pointEnd"><path style="stroke-width: 1; stroke-dasharray: 1, 0;" class="arrowMarkerPath" d="M 0 0 L 10 5 L 0 10 z"/></marker><marker orient="auto" markerHeight="12" markerWidth="12" markerUnits="userSpaceOnUse" refY="5" refX="4.5" viewBox="0 0 10 10" class="marker flowchart" id="mermaid-svg-1755831685709-tfz8nz33o_flowchart-pointStart"><path style="stroke-width: 1; stroke-dasharray: 1, 0;" class="arrowMarkerPath" d="M 0 5 L 10 10 L 10 0 z"/></marker><marker orient="auto" markerHeight="11" markerWidth="11" markerUnits="userSpaceOnUse" refY="5" refX="11" viewBox="0 0 10 10" class="marker flowchart" id="mermaid-svg-1755831685709-tfz8nz33o_flowchart-circleEnd"><circle style="stroke-width: 1; stroke-dasharray: 1, 0;" class="arrowMarkerPath" r="5" cy="5" cx="5"/></marker><marker orient="auto" markerHeight="11" markerWidth="11" markerUnits="userSpaceOnUse" refY="5" refX="-1" viewBox="0 0 10 10" class="marker flowchart" id="mermaid-svg-1755831685709-tfz8nz33o_flowchart-circleStart"><circle style="stroke-width: 1; stroke-dasharray: 1, 0;" class="arrowMarkerPath" r="5" cy="5" cx="5"/></marker><marker orient="auto" markerHeight="11" markerWidth="11" markerUnits="userSpaceOnUse" refY="5.2" refX="12" viewBox="0 0 11 11" class="marker cross flowchart" id="mermaid-svg-1755831685709-tfz8nz33o_flowchart-crossEnd"><path style="stroke-width: 2; stroke-dasharray: 1, 0;" class="arrowMarkerPath" d="M 1,1 l 9,9 M 10,1 l -9,9"/></marker><marker orient="auto" markerHeight="11" markerWidth="11" markerUnits="userSpaceOnUse" refY="5.2" refX="-1" viewBox="0 0 11 11" class="marker cross flowchart" id="mermaid-svg-1755831685709-tfz8nz33o_flowchart-crossStart"><path style="stroke-width: 2; stroke-dasharray: 1, 0;" class="arrowMarkerPath" d="M 1,1 l 9,9 M 10,1 l -9,9"/></marker><g class="root"><g class="clusters"/><g class="edgePaths"><path marker-end="url(#mermaid-svg-1755831685709-tfz8nz33o_flowchart-pointEnd)" style="fill:none;" class="edge-thickness-normal edge-pattern-solid flowchart-link LS-A LE-A1" id="L-A-A1-0" d="M81.61,33.75L75.187,37.917C68.764,42.083,55.919,50.417,49.496,57.867C43.073,65.317,43.073,71.883,43.073,75.167L43.073,78.45"/><path marker-end="url(#mermaid-svg-1755831685709-tfz8nz33o_flowchart-pointEnd)" style="fill:none;" class="edge-thickness-normal edge-pattern-solid flowchart-link LS-A LE-A2" id="L-A-A2-0" d="M133.634,33.75L140.057,37.917C146.48,42.083,159.326,50.417,165.748,57.867C172.171,65.317,172.171,71.883,172.171,75.167L172.171,78.45"/><path marker-end="url(#mermaid-svg-1755831685709-tfz8nz33o_flowchart-pointEnd)" style="fill:none;" class="edge-thickness-normal edge-pattern-solid flowchart-link LS-A LE-A3" id="L-A-A3-0" d="M162.951,28.354L187.369,33.42C211.787,38.486,260.623,48.618,285.041,56.967C309.46,65.317,309.46,71.883,309.46,75.167L309.46,78.45"/><path marker-end="url(#mermaid-svg-1755831685709-tfz8nz33o_flowchart-pointEnd)" style="fill:none;" class="edge-thickness-normal edge-pattern-solid flowchart-link LS-B LE-C" id="L-B-C-0" d="M410.723,109.288L382.431,114.823C354.14,120.359,297.556,131.429,269.265,140.248C240.973,149.067,240.973,155.633,240.973,158.917L240.973,162.2"/><path marker-end="url(#mermaid-svg-1755831685709-tfz8nz33o_flowchart-pointEnd)" style="fill:none;" class="edge-thickness-normal edge-pattern-solid flowchart-link LS-B LE-D" id="L-B-D-0" d="M410.723,113.526L394.15,118.355C377.577,123.184,344.431,132.842,327.859,144.65C311.286,156.458,311.286,170.417,311.286,184.375C311.286,198.333,311.286,212.292,340.776,224.84C370.266,237.388,429.246,248.525,458.736,254.094L488.226,259.663"/><path marker-end="url(#mermaid-svg-1755831685709-tfz8nz33o_flowchart-pointEnd)" style="fill:none;" class="edge-thickness-normal edge-pattern-solid flowchart-link LS-B LE-E" id="L-B-E-0" d="M499.277,109.451L526.911,114.959C554.544,120.467,609.811,131.484,644.53,141.463C679.249,151.442,693.42,160.384,700.506,164.854L707.591,169.325"/><path marker-end="url(#mermaid-svg-1755831685709-tfz8nz33o_flowchart-pointEnd)" style="fill:none;" class="edge-thickness-normal edge-pattern-solid flowchart-link LS-C LE-F" id="L-C-F-0" d="M215.54,201.25L209.26,205.417C202.981,209.583,190.421,217.917,184.141,225.367C177.861,232.817,177.861,239.383,177.861,242.667L177.861,245.95"/><path marker-end="url(#mermaid-svg-1755831685709-tfz8nz33o_flowchart-pointEnd)" style="fill:none;" class="edge-thickness-normal edge-pattern-solid flowchart-link LS-C LE-D" id="L-C-D-0" d="M240.973,201.25L240.973,205.417C240.973,209.583,240.973,217.917,282.176,227.991C323.378,238.065,405.783,249.88,446.985,255.787L488.188,261.694"/><path marker-end="url(#mermaid-svg-1755831685709-tfz8nz33o_flowchart-pointEnd)" style="fill:none;" class="edge-thickness-normal edge-pattern-solid flowchart-link LS-H LE-D" id="L-H-D-0" d="M402.767,201.25L402.767,205.417C402.767,209.583,402.767,217.917,417.037,226.67C431.307,235.424,459.848,244.598,474.118,249.185L488.389,253.772"/><path marker-end="url(#mermaid-svg-1755831685709-tfz8nz33o_flowchart-pointEnd)" style="fill:none;" class="edge-thickness-normal edge-pattern-solid flowchart-link LS-I LE-J" id="L-I-J-0" d="M790.327,33.75L782.179,37.917C774.032,42.083,757.737,50.417,749.589,57.867C741.442,65.317,741.442,71.883,741.442,75.167L741.442,78.45"/><path marker-end="url(#mermaid-svg-1755831685709-tfz8nz33o_flowchart-pointEnd)" style="fill:none;" class="edge-thickness-normal edge-pattern-solid flowchart-link LS-I LE-D" id="L-I-D-0" d="M819.926,33.75L819.087,37.917C818.248,42.083,816.57,50.417,815.731,61.563C814.893,72.708,814.893,86.667,814.893,100.625C814.893,114.583,814.893,128.542,814.893,142.5C814.893,156.458,814.893,170.417,814.893,184.375C814.893,198.333,814.893,212.292,775.392,225.139C735.891,237.987,656.89,249.725,617.39,255.593L577.889,261.462"/><path marker-end="url(#mermaid-svg-1755831685709-tfz8nz33o_flowchart-pointEnd)" style="fill:none;" class="edge-thickness-normal edge-pattern-solid flowchart-link LS-J LE-E" id="L-J-E-0" d="M741.442,117.5L741.442,121.667C741.442,125.833,741.442,134.167,740.652,141.641C739.862,149.115,738.283,155.73,737.493,159.037L736.703,162.345"/><path marker-end="url(#mermaid-svg-1755831685709-tfz8nz33o_flowchart-pointEnd)" style="fill:none;" class="edge-thickness-normal edge-pattern-solid flowchart-link LS-K LE-D" id="L-K-D-0" d="M528.617,201.25L528.617,205.417C528.617,209.583,528.617,217.917,528.964,225.372C529.311,232.826,530.006,239.403,530.353,242.691L530.701,245.979"/><path marker-end="url(#mermaid-svg-1755831685709-tfz8nz33o_flowchart-pointEnd)" style="fill:none;" class="edge-thickness-normal edge-pattern-solid flowchart-link LS-L LE-D" id="L-L-D-0" d="M630.029,201.25L630.029,205.417C630.029,209.583,630.029,217.917,621.19,225.9C612.35,233.883,594.671,241.516,585.831,245.333L576.991,249.149"/><path marker-end="url(#mermaid-svg-1755831685709-tfz8nz33o_flowchart-pointEnd)" style="fill:none;" class="edge-thickness-normal edge-pattern-solid flowchart-link LS-E LE-D" id="L-E-D-0" d="M731.442,201.25L731.442,205.417C731.442,209.583,731.442,217.917,705.84,227.487C680.239,237.057,629.035,247.864,603.434,253.268L577.832,258.671"/><path marker-end="url(#mermaid-svg-1755831685709-tfz8nz33o_flowchart-pointEnd)" style="fill:none;" class="edge-thickness-normal edge-pattern-solid flowchart-link LS-C LE-D" id="L-C-D-1" d="M255.141,201.25L258.639,205.417C262.137,209.583,269.133,217.917,307.977,227.844C346.821,237.772,417.512,249.295,452.858,255.056L488.203,260.817"/><path marker-end="url(#mermaid-svg-1755831685709-tfz8nz33o_flowchart-pointEnd)" style="fill:none;" class="edge-thickness-normal edge-pattern-solid flowchart-link LS-I LE-D" id="L-I-D-1" d="M827.986,33.75L829.137,37.917C830.288,42.083,832.59,50.417,833.741,61.563C834.893,72.708,834.893,86.667,834.893,100.625C834.893,114.583,834.893,128.542,834.893,142.5C834.893,156.458,834.893,170.417,834.893,184.375C834.893,198.333,834.893,212.292,792.06,225.213C749.227,238.134,663.562,250.018,620.729,255.96L577.896,261.902"/></g><g class="edgeLabels"><g class="edgeLabel"><g transform="translate(0, 0)" class="label"><foreignObject height="0" width="0"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g transform="translate(0, 0)" class="label"><foreignObject height="0" width="0"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g transform="translate(0, 0)" class="label"><foreignObject height="0" width="0"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g transform="translate(0, 0)" class="label"><foreignObject height="0" width="0"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g transform="translate(0, 0)" class="label"><foreignObject height="0" width="0"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g transform="translate(0, 0)" class="label"><foreignObject height="0" width="0"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g transform="translate(0, 0)" class="label"><foreignObject height="0" width="0"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g transform="translate(0, 0)" class="label"><foreignObject height="0" width="0"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g transform="translate(0, 0)" class="label"><foreignObject height="0" width="0"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g transform="translate(0, 0)" class="label"><foreignObject height="0" width="0"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g transform="translate(0, 0)" class="label"><foreignObject height="0" width="0"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g transform="translate(0, 0)" class="label"><foreignObject height="0" width="0"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g transform="translate(0, 0)" class="label"><foreignObject height="0" width="0"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g transform="translate(0, 0)" class="label"><foreignObject height="0" width="0"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g transform="translate(0, 0)" class="label"><foreignObject height="0" width="0"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g transform="translate(0, 0)" class="label"><foreignObject height="0" width="0"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g transform="translate(0, 0)" class="label"><foreignObject height="0" width="0"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="edgeLabel"></span></div></foreignObject></g></g></g><g class="nodes"><g transform="translate(107.62206649780273, 16.875)" id="flowchart-A-1059" class="node default default flowchart-label"><rect height="33.75" width="110.65754699707031" y="-16.875" x="-55.328773498535156" ry="0" rx="0" style="fill:#fff3e0;" class="basic label-container"/><g transform="translate(-47.828773498535156, -9.375)" style="" class="label"><rect/><foreignObject height="18.75" width="95.65754699707031"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="nodeLabel">Core Package</span></div></foreignObject></g></g><g transform="translate(43.072914123535156, 100.625)" id="flowchart-A1-1060" class="node default default flowchart-label"><rect height="33.75" width="86.14582824707031" y="-16.875" x="-43.072914123535156" ry="0" rx="0" style="" class="basic label-container"/><g transform="translate(-35.572914123535156, -9.375)" style="" class="label"><rect/><foreignObject height="18.75" width="71.14582824707031"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="nodeLabel">colorify.ts</span></div></foreignObject></g></g><g transform="translate(172.1712188720703, 100.625)" id="flowchart-A2-1062" class="node default default flowchart-label"><rect height="33.75" width="72.05078125" y="-16.875" x="-36.025390625" ry="0" rx="0" style="" class="basic label-container"/><g transform="translate(-28.525390625, -9.375)" style="" class="label"><rect/><foreignObject height="18.75" width="57.05078125"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="nodeLabel">types.ts</span></div></foreignObject></g></g><g transform="translate(309.4596290588379, 100.625)" id="flowchart-A3-1064" class="node default default flowchart-label"><rect height="33.75" width="102.52603912353516" y="-16.875" x="-51.26301956176758" ry="0" rx="0" style="" class="basic label-container"/><g transform="translate(-43.76301956176758, -9.375)" style="" class="label"><rect/><foreignObject height="18.75" width="87.52603912353516"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="nodeLabel">wrapshell.ts</span></div></foreignObject></g></g><g transform="translate(454.99999237060547, 100.625)" id="flowchart-B-1065" class="node default default flowchart-label"><rect height="33.75" width="88.5546875" y="-16.875" x="-44.27734375" ry="0" rx="0" style="" class="basic label-container"/><g transform="translate(-36.77734375, -9.375)" style="" class="label"><rect/><foreignObject height="18.75" width="73.5546875"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="nodeLabel">Changelog</span></div></foreignObject></g></g><g transform="translate(240.97330474853516, 184.375)" id="flowchart-C-1066" class="node default default flowchart-label"><rect height="33.75" width="70.625" y="-16.875" x="-35.3125" ry="0" rx="0" style="" class="basic label-container"/><g transform="translate(-27.8125, -9.375)" style="" class="label"><rect/><foreignObject height="18.75" width="55.625"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="nodeLabel">Commit</span></div></foreignObject></g></g><g transform="translate(533.0403575897217, 268.125)" id="flowchart-D-1068" class="node default default flowchart-label"><rect height="33.75" width="79.21223449707031" y="-16.875" x="-39.606117248535156" ry="0" rx="0" style="fill:#e1f5fe;" class="basic label-container"/><g transform="translate(-32.106117248535156, -9.375)" style="" class="label"><rect/><foreignObject height="18.75" width="64.21223449707031"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="nodeLabel">Packages</span></div></foreignObject></g></g><g transform="translate(731.4420433044434, 184.375)" id="flowchart-E-1070" class="node default default flowchart-label"><rect height="33.75" width="38.73697853088379" y="-16.875" x="-19.368489265441895" ry="0" rx="0" style="fill:#f3e5f5;" class="basic label-container"/><g transform="translate(-11.868489265441895, -9.375)" style="" class="label"><rect/><foreignObject height="18.75" width="23.73697853088379"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="nodeLabel">Tag</span></div></foreignObject></g></g><g transform="translate(177.86132717132568, 268.125)" id="flowchart-F-1072" class="node default default flowchart-label"><rect height="33.75" width="33.23567581176758" y="-16.875" x="-16.61783790588379" ry="0" rx="0" style="" class="basic label-container"/><g transform="translate(-9.117837905883789, -9.375)" style="" class="label"><rect/><foreignObject height="18.75" width="18.235675811767578"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="nodeLabel">PR</span></div></foreignObject></g></g><g transform="translate(402.7669219970703, 184.375)" id="flowchart-H-1075" class="node default default flowchart-label"><rect height="33.75" width="112.96223449707031" y="-16.875" x="-56.481117248535156" ry="0" rx="0" style="" class="basic label-container"/><g transform="translate(-48.981117248535156, -9.375)" style="" class="label"><rect/><foreignObject height="18.75" width="97.96223449707031"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="nodeLabel">Commit Rules</span></div></foreignObject></g></g><g transform="translate(823.3235530853271, 16.875)" id="flowchart-I-1077" class="node default default flowchart-label"><rect height="33.75" width="79.140625" y="-16.875" x="-39.5703125" ry="0" rx="0" style="" class="basic label-container"/><g transform="translate(-32.0703125, -9.375)" style="" class="label"><rect/><foreignObject height="18.75" width="64.140625"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="nodeLabel">Compose</span></div></foreignObject></g></g><g transform="translate(741.4420433044434, 100.625)" id="flowchart-J-1078" class="node default default flowchart-label"><rect height="33.75" width="76.90103912353516" y="-16.875" x="-38.45051956176758" ry="0" rx="0" style="" class="basic label-container"/><g transform="translate(-30.950519561767578, -9.375)" style="" class="label"><rect/><foreignObject height="18.75" width="61.901039123535156"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="nodeLabel">Affected</span></div></foreignObject></g></g><g transform="translate(528.616527557373, 184.375)" id="flowchart-K-1083" class="node default default flowchart-label"><rect height="33.75" width="38.73697853088379" y="-16.875" x="-19.368489265441895" ry="0" rx="0" style="" class="basic label-container"/><g transform="translate(-11.868489265441895, -9.375)" style="" class="label"><rect/><foreignObject height="18.75" width="23.73697853088379"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="nodeLabel">Tag</span></div></foreignObject></g></g><g transform="translate(630.0292854309082, 184.375)" id="flowchart-L-1085" class="node default default flowchart-label"><rect height="33.75" width="64.08853912353516" y="-16.875" x="-32.04426956176758" ry="0" rx="0" style="" class="basic label-container"/><g transform="translate(-24.544269561767578, -9.375)" style="" class="label"><rect/><foreignObject height="18.75" width="49.088539123535156"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="nodeLabel">Branch</span></div></foreignObject></g></g></g></g></g></svg>
36
+
37
+ ## 🚀 Quick Start
38
+
39
+ ### Installation
40
+
41
+ ```bash
42
+ # Install the packages you need
43
+ bun add ../core @intershell/interactive
44
+
45
+ # Or with npm
46
+ npm install ../core @intershell/interactive
47
+ ```
48
+
49
+ ### Basic Example
50
+
51
+ ```typescript
52
+ import { InterShellFramework, PageBuilder } from '@intershell/interactive';
53
+ import { colorify } from '../core';
54
+
55
+ // Define your application state
56
+ interface AppState {
57
+ name: string;
58
+ confirmed: boolean;
59
+ }
60
+
61
+ // Create pages with the PageBuilder
62
+ const pages = [
63
+ PageBuilder.create<AppState>('input', 'Enter Name')
64
+ .render(async (cli, state) => {
65
+ cli.clearScreen();
66
+ console.log(colorify.bold('👤 What is your name?'));
67
+
68
+ const name = await cli.prompt('Name:', {
69
+ clearScreen: false,
70
+ allowEmpty: false,
71
+ });
72
+
73
+ // Update state directly (or use actions/reducers for complex apps)
74
+ state.name = name;
75
+ })
76
+ .handleKey(() => null)
77
+ .getNextAction((state) => ({ type: 'NEXT_PAGE' }))
78
+ .build(),
79
+
80
+ PageBuilder.create<AppState>('confirm', 'Confirm')
81
+ .render(async (cli, state) => {
82
+ cli.clearScreen();
83
+ console.log(colorify.bold('✅ Confirmation'));
84
+
85
+ const confirmed = await cli.confirm(`Hello ${state.name}, continue?`);
86
+ state.confirmed = confirmed;
87
+ })
88
+ .handleKey(() => null)
89
+ .getNextAction((state) =>
90
+ state.confirmed ? { type: 'EXIT' } : { type: 'PREV_PAGE' }
91
+ )
92
+ .build(),
93
+ ];
94
+
95
+ // Create and run the framework
96
+ const framework = new InterShellFramework(
97
+ { name: '', confirmed: false }, // Initial state
98
+ pages,
99
+ {} // Reducers (empty for simple state updates)
100
+ );
101
+
102
+ const finalState = await framework.run();
103
+ console.log('Final state:', finalState);
104
+ ```
105
+
106
+ ## 🎯 Core Concepts
107
+
108
+ ### Pages
109
+ Pages are the building blocks of your CLI application. Each page handles a specific part of your workflow:
110
+
111
+ ```typescript
112
+ const page = PageBuilder.create<State>('page-id', 'Page Title')
113
+ .description('What this page does')
114
+ .render(async (cli, state) => {
115
+ // Render the page content
116
+ // Use cli.prompt(), cli.select(), cli.confirm() for user input
117
+ })
118
+ .handleKey((key, state) => {
119
+ // Handle raw key presses (optional)
120
+ return null; // or return an action
121
+ })
122
+ .getNextAction((state) => {
123
+ // Determine what happens next
124
+ return { type: 'NEXT_PAGE' }; // or other actions
125
+ })
126
+ .build();
127
+ ```
128
+
129
+ ### State Management
130
+ For complex applications, use actions and reducers:
131
+
132
+ ```typescript
133
+ type Action =
134
+ | { type: 'SET_NAME'; payload: string }
135
+ | { type: 'SET_AGE'; payload: number };
136
+
137
+ const reducers = {
138
+ SET_NAME: (state: State, action: Action): State => ({
139
+ ...state,
140
+ name: (action as any).payload,
141
+ }),
142
+ SET_AGE: (state: State, action: Action): State => ({
143
+ ...state,
144
+ age: (action as any).payload,
145
+ }),
146
+ };
147
+
148
+ // In your page render function:
149
+ return { type: 'SET_NAME', payload: name };
150
+ ```
151
+
152
+ ### Navigation Actions
153
+ Control page flow with navigation actions:
154
+
155
+ - `{ type: 'NEXT_PAGE' }` - Go to the next page
156
+ - `{ type: 'PREV_PAGE' }` - Go to the previous page
157
+ - `{ type: 'CHANGE_PAGE'; payload: 'page-id' }` - Go to a specific page
158
+ - `{ type: 'RE_RENDER' }` - Re-render the current page
159
+ - `{ type: 'EXIT' }` - Exit the application
160
+ - `{ type: 'CUSTOM'; payload: action }` - Dispatch a custom action
161
+
162
+ ## 🎨 Enhanced Colors
163
+
164
+ InterShell includes a powerful color system:
165
+
166
+ ```typescript
167
+ import { colorify } from '../core';
168
+
169
+ // Basic colors
170
+ console.log(colorify.red('Error message'));
171
+ console.log(colorify.green('Success message'));
172
+ console.log(colorify.blue('Info message'));
173
+
174
+ // Styles
175
+ console.log(colorify.bold('Bold text'));
176
+ console.log(colorify.italic('Italic text'));
177
+ console.log(colorify.underline('Underlined text'));
178
+
179
+ // Advanced colors
180
+ console.log(colorify.rgb(255, 128, 0)('Custom RGB color'));
181
+ console.log(colorify.hex('#ff8000')('Hex color'));
182
+ console.log(colorify.hsl(30, 1, 0.5)('HSL color'));
183
+
184
+ // Effects
185
+ console.log(colorify.gradient(['#ff0000', '#00ff00', '#0000ff'])('Gradient text'));
186
+ console.log(colorify.rainbow('Rainbow text'));
187
+ ```
188
+
189
+ ## 🔧 Script Creation
190
+
191
+ Create type-safe CLI scripts with WrapShell:
192
+
193
+ ```typescript
194
+ import { WrapShell, validators } from '../core';
195
+
196
+ const script = WrapShell.createScript({
197
+ name: 'My CLI Tool',
198
+ description: 'A sample CLI application',
199
+ usage: 'my-tool [options]',
200
+ examples: ['my-tool --name John --age 25'],
201
+ options: [
202
+ {
203
+ short: '-n',
204
+ long: '--name',
205
+ description: 'Your name',
206
+ required: true,
207
+ validator: validators.nonEmpty,
208
+ },
209
+ {
210
+ short: '-a',
211
+ long: '--age',
212
+ description: 'Your age',
213
+ required: false,
214
+ defaultValue: '0',
215
+ validator: validators.integer,
216
+ }
217
+ ]
218
+ }, async (args, console) => {
219
+ console.log(`Hello, ${args.name}! You are ${args.age} years old.`);
220
+ });
221
+
222
+ await script.run();
223
+ ```
224
+
225
+ ## 🧪 Testing
226
+
227
+ InterShell's architecture makes testing easy:
228
+
229
+ ```typescript
230
+ import { PageBuilder } from '@intershell/interactive';
231
+ import { describe, it, expect } from 'vitest';
232
+
233
+ describe('My Page', () => {
234
+ it('should update state correctly', () => {
235
+ const page = PageBuilder.create('test', 'Test Page')
236
+ .render(async (cli, state) => {
237
+ state.value = 'updated';
238
+ })
239
+ .handleKey(() => null)
240
+ .getNextAction(() => ({ type: 'NEXT_PAGE' }))
241
+ .build();
242
+
243
+ const state = { value: 'initial' };
244
+ const mockCli = createMockCLI();
245
+
246
+ await page.render(mockCli, state);
247
+ expect(state.value).toBe('updated');
248
+ });
249
+ });
250
+ ```
251
+
252
+ ## 🚀 Examples
253
+
254
+ Check out the examples in the `examples/` directory:
255
+
256
+ - **Simple Demo** - Basic page navigation and state management
257
+ - **Complex Form** - Multi-step form with validation
258
+ - **File Manager** - Interactive file browser
259
+ - **Git Helper** - Interactive git workflow tool
260
+
261
+ ## 🏗️ Architecture
262
+
263
+ InterShell follows a clean architecture with clear separation of concerns:
264
+
265
+ ```
266
+ ┌─────────────────────┐
267
+ │ CLI Application │
268
+ ├─────────────────────┤
269
+ │ InterShell Framework │
270
+ ├─────────────────────┤
271
+ │ Page System │
272
+ ├─────────────────────┤
273
+ │ Interactive CLI │
274
+ ├─────────────────────┤
275
+ │ Core Utilities │
276
+ └─────────────────────┘
277
+ ```
278
+
279
+ ### Key Principles
280
+
281
+ 1. **Event-Driven** - Clean event system for extensibility
282
+ 2. **Immutable State** - Predictable state management
283
+ 3. **Composable Pages** - Mix and match pages for different workflows
284
+ 4. **Type Safety** - Full TypeScript support throughout
285
+ 5. **Testability** - Easy to test individual components
286
+
287
+ ## 🤝 Contributing
288
+
289
+ We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.
290
+
291
+ ## 📄 License
292
+
293
+ MIT License - see [LICENSE](LICENSE) for details.
294
+
295
+ ## 🙏 Acknowledgments
296
+
297
+ InterShell is inspired by modern web frameworks and CLI tools, bringing the best patterns to interactive command-line applications.
298
+
299
+ ---
300
+
301
+ **Built with ❤️ by the Monobun team**
@@ -0,0 +1,13 @@
1
+ import { Command } from "@oclif/core";
2
+ export default class CiAct extends Command {
3
+ static description: string;
4
+ static examples: string[];
5
+ static flags: {
6
+ event: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
7
+ workflow: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
8
+ verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
9
+ };
10
+ run(): Promise<void>;
11
+ private cleanupActContainers;
12
+ }
13
+ //# sourceMappingURL=act.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"act.d.ts","sourceRoot":"","sources":["../../../src/commands/ci/act.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAS,MAAM,aAAa,CAAC;AAG7C,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,OAAO;IACzC,MAAM,CAAC,WAAW,SACmE;IAErF,MAAM,CAAC,QAAQ,WAKb;IAEF,MAAM,CAAC,KAAK;;;;MAiBV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;YAmBZ,oBAAoB;CA0ClC"}
@@ -0,0 +1,89 @@
1
+ import { Command, Flags } from "@oclif/core";
2
+ import { $ } from "bun";
3
+ export default class CiAct extends Command {
4
+ static description = "Uses catthehacker/ubuntu:act-latest image which has unzip available for Bun setup";
5
+ static examples = [
6
+ "intershell ci:act -v --verbose -e pull_request -w .github/workflows/Check.yml",
7
+ "intershell ci:act --event push --workflow .github/workflows/Build.yml",
8
+ "intershell ci:act --event release --workflow .github/workflows/Deploy.yml",
9
+ "intershell ci:act --event workflow_run --workflow .github/workflows/Check.yml",
10
+ ];
11
+ static flags = {
12
+ event: Flags.string({
13
+ char: "e",
14
+ description: "GitHub event to simulate (e.g., pull_request, push)",
15
+ required: true,
16
+ options: ["pull_request", "push", "release", "workflow_dispatch", "workflow_run"],
17
+ }),
18
+ workflow: Flags.string({
19
+ char: "w",
20
+ description: "Workflow file to test (e.g., .github/workflows/Check.yml)",
21
+ required: true,
22
+ }),
23
+ verbose: Flags.boolean({
24
+ char: "v",
25
+ description: "Enable verbose output",
26
+ default: false,
27
+ }),
28
+ };
29
+ async run() {
30
+ const { flags } = await this.parse(CiAct);
31
+ this.log(`📋 on: ${flags.event} at: ${flags.workflow} \n`);
32
+ try {
33
+ await $ `act ${flags.event} -W ${flags.workflow} -P ubuntu-latest=catthehacker/ubuntu:act-latest --quiet`;
34
+ if (flags.verbose) {
35
+ this.log("✅ Success with catthehacker/ubuntu:act-latest image!");
36
+ }
37
+ }
38
+ catch (error) {
39
+ this.error(`❌ Act test failed: ${error}`);
40
+ }
41
+ finally {
42
+ await this.cleanupActContainers();
43
+ }
44
+ this.log("✅ GitHub Actions test completed!");
45
+ }
46
+ async cleanupActContainers() {
47
+ try {
48
+ this.log("\n🧹 Cleaning up act containers...");
49
+ try {
50
+ // Check if any act containers exist before trying to stop them
51
+ const runningContainers = await $ `docker ps -q --filter "label=com.act.container"`.text();
52
+ if (runningContainers.trim()) {
53
+ await $ `docker ps -q --filter "label=com.act.container" | xargs -r docker stop`;
54
+ this.log("✅ Stopped running act containers");
55
+ }
56
+ }
57
+ catch (error) {
58
+ console.warn("⚠️ Warning: act containers do not exist:", error);
59
+ }
60
+ try {
61
+ // Remove all act containers (including stopped ones)
62
+ const allContainers = await $ `docker ps -aq --filter "label=com.act.container"`.text();
63
+ if (allContainers.trim()) {
64
+ await $ `docker ps -aq --filter "label=com.act.container" | xargs -r docker rm`;
65
+ this.log("✅ Removed act containers");
66
+ }
67
+ }
68
+ catch (error) {
69
+ console.warn("⚠️ Warning: act containers may not have been cleaned up:", error);
70
+ }
71
+ try {
72
+ // Remove act networks
73
+ const networks = await $ `docker network ls -q --filter "label=com.act.network"`.text();
74
+ if (networks.trim()) {
75
+ await $ `docker network ls -q --filter "label=com.act.network" | xargs -r docker network rm`;
76
+ this.log("✅ Removed act networks");
77
+ }
78
+ }
79
+ catch (error) {
80
+ console.warn("⚠️ Warning: act networks do not exist:", error);
81
+ }
82
+ this.log("✅ Act containers cleaned up successfully!");
83
+ }
84
+ catch (error) {
85
+ console.warn("⚠️ Warning: Some containers may not have been cleaned up:", error);
86
+ }
87
+ }
88
+ }
89
+ //# sourceMappingURL=act.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"act.js","sourceRoot":"","sources":["../../../src/commands/ci/act.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,12 @@
1
+ import { Command } from "@oclif/core";
2
+ export default class CiAttachAffected extends Command {
3
+ static description: string;
4
+ static examples: string[];
5
+ static flags: {
6
+ "output-id": import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
7
+ mode: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
8
+ "base-sha": import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
9
+ };
10
+ run(): Promise<void>;
11
+ }
12
+ //# sourceMappingURL=attach-affected.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attach-affected.d.ts","sourceRoot":"","sources":["../../../src/commands/ci/attach-affected.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAS,MAAM,aAAa,CAAC;AAG7C,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,OAAO;IACpD,MAAM,CAAC,WAAW,SAAgD;IAElE,MAAM,CAAC,QAAQ,WAAoE;IAEnF,MAAM,CAAC,KAAK;;;;MAgBV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAkE1B"}
@@ -0,0 +1,83 @@
1
+ import { Command, Flags } from "@oclif/core";
2
+ import { EntityAffected, EntityCompose } from "../../entities";
3
+ export default class CiAttachAffected extends Command {
4
+ static description = "Attach affected services to GitHub Actions";
5
+ static examples = ["intershell ci:attach-affected -o affected-services -m docker"];
6
+ static flags = {
7
+ "output-id": Flags.string({
8
+ char: "o",
9
+ description: "The ID of the output to attach the affected packages to",
10
+ required: true,
11
+ }),
12
+ mode: Flags.string({
13
+ char: "m",
14
+ description: "The mode to use for the affected services",
15
+ required: true,
16
+ options: ["docker", "turbo"],
17
+ }),
18
+ "base-sha": Flags.string({
19
+ char: "b",
20
+ description: "The base SHA to compare against (defaults to latest tag)",
21
+ }),
22
+ };
23
+ async run() {
24
+ const { flags } = await this.parse(CiAttachAffected);
25
+ const mode = flags.mode;
26
+ const outputId = flags["output-id"];
27
+ if (mode === "docker") {
28
+ this.log("🐳 Using docker output mode");
29
+ }
30
+ else {
31
+ this.log("🚀 Using turbo output mode");
32
+ }
33
+ let baseSha = flags["base-sha"];
34
+ if (!baseSha) {
35
+ const eventName = process.env.GITHUB_EVENT_NAME;
36
+ const isPR = eventName === "pull_request";
37
+ if (isPR) {
38
+ // Try multiple sources for base SHA
39
+ baseSha = process.env.GITHUB_BASE_SHA;
40
+ // If GITHUB_BASE_SHA is not available, try to get it from GitHub context
41
+ if (!baseSha && process.env.GITHUB_EVENT_PATH) {
42
+ try {
43
+ const eventData = JSON.parse(await Bun.file(process.env.GITHUB_EVENT_PATH).text());
44
+ baseSha = eventData.pull_request?.base?.sha;
45
+ this.log(`🔍 Got base SHA from GitHub context: ${baseSha}`);
46
+ }
47
+ catch (error) {
48
+ this.log(`🔍 Failed to read GitHub context: ${error}`);
49
+ }
50
+ }
51
+ if (baseSha) {
52
+ this.log(`🔍 PR detected, using base branch: ${baseSha}`);
53
+ }
54
+ else {
55
+ this.log("🔍 PR detected, but base SHA not available from any source, using HEAD~1");
56
+ baseSha = "HEAD~1";
57
+ }
58
+ }
59
+ else {
60
+ baseSha = process.env.GITHUB_BEFORE_SHA || "HEAD~1";
61
+ this.log(`🔍 Push detected, using base SHA: ${baseSha}`);
62
+ }
63
+ }
64
+ else {
65
+ this.log(`🔍 Using provided base SHA: ${baseSha}`);
66
+ }
67
+ this.log(`🔍 Comparing changes from ${baseSha} to HEAD`);
68
+ const affectedList = mode === "docker"
69
+ ? await new EntityCompose("docker-compose.yml").getAffectedServices(baseSha)
70
+ : await EntityAffected.getAffectedPackages(baseSha);
71
+ this.log(`🔍 Found ${affectedList.length} affected items`);
72
+ const affectedServicesNames = affectedList
73
+ .map((i) => mode === "docker" ? (typeof i !== "string" ? i.name : i) : `--filter="${i}"`)
74
+ .join(" ");
75
+ // Output in GitHub Actions format
76
+ if (process.env.GITHUB_OUTPUT) {
77
+ const output = `${outputId}<<EOF\n${affectedServicesNames}\nEOF\n`;
78
+ await Bun.write(process.env.GITHUB_OUTPUT, output);
79
+ this.log(`\nAttached: ${outputId}=${affectedServicesNames}\n`);
80
+ }
81
+ }
82
+ }
83
+ //# sourceMappingURL=attach-affected.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attach-affected.js","sourceRoot":"","sources":["../../../src/commands/ci/attach-affected.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,10 @@
1
+ import { Command } from "@oclif/core";
2
+ export default class CiAttachServicePorts extends Command {
3
+ static description: string;
4
+ static examples: string[];
5
+ static flags: {
6
+ "output-id": import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
7
+ };
8
+ run(): Promise<void>;
9
+ }
10
+ //# sourceMappingURL=attach-service-ports.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attach-service-ports.d.ts","sourceRoot":"","sources":["../../../src/commands/ci/attach-service-ports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAS,MAAM,aAAa,CAAC;AAG7C,MAAM,CAAC,OAAO,OAAO,oBAAqB,SAAQ,OAAO;IACxD,MAAM,CAAC,WAAW,SAA4C;IAE9D,MAAM,CAAC,QAAQ,WAA2D;IAE1E,MAAM,CAAC,KAAK;;MAMV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAc1B"}
@@ -0,0 +1,25 @@
1
+ import { Command, Flags } from "@oclif/core";
2
+ import { EntityCompose } from "../../entities";
3
+ export default class CiAttachServicePorts extends Command {
4
+ static description = "Attach service ports to GitHub Actions";
5
+ static examples = ["intershell ci:attach-service-ports -o service-ports"];
6
+ static flags = {
7
+ "output-id": Flags.string({
8
+ char: "o",
9
+ description: "The ID of the output to attach the affected packages to",
10
+ required: true,
11
+ }),
12
+ };
13
+ async run() {
14
+ const { flags } = await this.parse(CiAttachServicePorts);
15
+ const outputId = flags["output-id"];
16
+ const portMappings = await new EntityCompose("docker-compose.yml").getPortMappings();
17
+ // Output in GitHub Actions format
18
+ if (process.env.GITHUB_OUTPUT) {
19
+ const output = `${outputId}<<EOF\n${JSON.stringify(portMappings)}\nEOF\n`;
20
+ await Bun.write(process.env.GITHUB_OUTPUT, output);
21
+ this.log(`\nAttached: ${outputId}=${JSON.stringify(portMappings)}\n`);
22
+ }
23
+ }
24
+ }
25
+ //# sourceMappingURL=attach-service-ports.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attach-service-ports.js","sourceRoot":"","sources":["../../../src/commands/ci/attach-service-ports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,MAAM,CAAC,OAAO,OAAO,oBAAqB,SAAQ,OAAO;IACxD,MAAM,CAAC,WAAW,GAAG,wCAAwC,CAAC;IAE9D,MAAM,CAAC,QAAQ,GAAG,CAAC,qDAAqD,CAAC,CAAC;IAE1E,MAAM,CAAC,KAAK,GAAG;QACd,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC;YACzB,IAAI,EAAE,GAAG;YACT,WAAW,EAAE,yDAAyD;YACtE,QAAQ,EAAE,IAAI;SACd,CAAC;KACF,CAAC;IAEF,KAAK,CAAC,GAAG;QACR,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC;QAEzD,MAAM,QAAQ,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC;QAEpC,MAAM,YAAY,GAAG,MAAM,IAAI,aAAa,CAAC,oBAAoB,CAAC,CAAC,eAAe,EAAE,CAAC;QAErF,kCAAkC;QAClC,IAAI,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC;YAC/B,MAAM,MAAM,GAAG,GAAG,QAAQ,UAAU,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,SAAS,CAAC;YAC1E,MAAM,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;YACnD,IAAI,CAAC,GAAG,CAAC,eAAe,QAAQ,IAAI,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QACvE,CAAC;IACF,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { Command } from "@oclif/core";
2
+ export default class CommitCheck extends Command {
3
+ static description: string;
4
+ static examples: string[];
5
+ static flags: {
6
+ message: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
7
+ "message-file": import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
8
+ branch: import("@oclif/core/interfaces").BooleanFlag<boolean>;
9
+ staged: import("@oclif/core/interfaces").BooleanFlag<boolean>;
10
+ };
11
+ run(): Promise<void>;
12
+ }
13
+ //# sourceMappingURL=commit-check.d.ts.map