intershell 0.3.7 → 0.4.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 (461) hide show
  1. package/README.md +70 -202
  2. package/dist/affected/affected.d.ts.map +1 -0
  3. package/dist/affected/affected.js.map +1 -0
  4. package/dist/affected/affected.test.d.ts.map +1 -0
  5. package/dist/affected/affected.test.js.map +1 -0
  6. package/dist/affected/index.d.ts.map +1 -0
  7. package/dist/affected/index.js.map +1 -0
  8. package/dist/branch/branch.d.ts.map +1 -0
  9. package/dist/{entities/branch → branch}/branch.js +12 -5
  10. package/dist/branch/branch.js.map +1 -0
  11. package/dist/branch/branch.test.d.ts.map +1 -0
  12. package/dist/{entities/branch → branch}/branch.test.js +55 -0
  13. package/dist/branch/branch.test.js.map +1 -0
  14. package/dist/branch/branch.types.d.ts.map +1 -0
  15. package/dist/branch/branch.types.js.map +1 -0
  16. package/dist/branch/index.d.ts.map +1 -0
  17. package/dist/branch/index.js.map +1 -0
  18. package/dist/commit/commit.d.ts.map +1 -0
  19. package/dist/{entities/commit → commit}/commit.js +12 -6
  20. package/dist/commit/commit.js.map +1 -0
  21. package/dist/commit/commit.test.d.ts.map +1 -0
  22. package/dist/{entities/commit → commit}/commit.test.js +87 -0
  23. package/dist/commit/commit.test.js.map +1 -0
  24. package/dist/commit/commit.types.d.ts.map +1 -0
  25. package/dist/commit/commit.types.js.map +1 -0
  26. package/dist/commit/index.d.ts.map +1 -0
  27. package/dist/commit/index.js.map +1 -0
  28. package/dist/commit/pr.d.ts.map +1 -0
  29. package/dist/commit/pr.js.map +1 -0
  30. package/dist/commit/pr.test.d.ts.map +1 -0
  31. package/dist/commit/pr.test.js.map +1 -0
  32. package/dist/commit-check.d.ts +2 -0
  33. package/dist/commit-check.d.ts.map +1 -0
  34. package/dist/commit-check.js +119 -0
  35. package/dist/commit-check.js.map +1 -0
  36. package/dist/compose/compose.d.ts.map +1 -0
  37. package/dist/compose/compose.js.map +1 -0
  38. package/dist/compose/compose.test.d.ts.map +1 -0
  39. package/dist/compose/compose.test.js.map +1 -0
  40. package/dist/compose/compose.types.d.ts.map +1 -0
  41. package/dist/compose/compose.types.js.map +1 -0
  42. package/dist/compose/index.d.ts.map +1 -0
  43. package/dist/compose/index.js.map +1 -0
  44. package/dist/{entities/entities.shell.d.ts → entities.shell.d.ts} +1 -0
  45. package/dist/entities.shell.d.ts.map +1 -0
  46. package/dist/{entities/entities.shell.js → entities.shell.js} +1 -0
  47. package/dist/entities.shell.js.map +1 -0
  48. package/dist/entities.shell.test.d.ts.map +1 -0
  49. package/dist/entities.shell.test.js.map +1 -0
  50. package/dist/index.d.ts +11 -2
  51. package/dist/index.d.ts.map +1 -1
  52. package/dist/index.js +11 -5
  53. package/dist/index.js.map +1 -1
  54. package/dist/intershell-config/intershell-config.d.ts.map +1 -0
  55. package/dist/{entities/intershell-config → intershell-config}/intershell-config.default.d.ts +1 -1
  56. package/dist/intershell-config/intershell-config.default.d.ts.map +1 -0
  57. package/dist/{entities/intershell-config → intershell-config}/intershell-config.default.js +1 -8
  58. package/dist/intershell-config/intershell-config.default.js.map +1 -0
  59. package/dist/{entities/intershell-config → intershell-config}/intershell-config.js +14 -3
  60. package/dist/intershell-config/intershell-config.js.map +1 -0
  61. package/dist/intershell-config/intershell-config.test.d.ts.map +1 -0
  62. package/dist/intershell-config/intershell-config.test.js.map +1 -0
  63. package/dist/{entities/intershell-config → intershell-config}/intershell-config.types.d.ts +3 -3
  64. package/dist/intershell-config/intershell-config.types.d.ts.map +1 -0
  65. package/dist/intershell-config/intershell-config.types.js.map +1 -0
  66. package/dist/package/index.d.ts.map +1 -0
  67. package/dist/package/index.js.map +1 -0
  68. package/dist/package/package.d.ts.map +1 -0
  69. package/dist/package/package.js.map +1 -0
  70. package/dist/package/package.shell.d.ts.map +1 -0
  71. package/dist/package/package.shell.js.map +1 -0
  72. package/dist/package/package.test.d.ts.map +1 -0
  73. package/dist/package/package.test.js.map +1 -0
  74. package/dist/package/package.types.d.ts.map +1 -0
  75. package/dist/package/package.types.js.map +1 -0
  76. package/dist/package-changelog/index.d.ts.map +1 -0
  77. package/dist/package-changelog/index.js.map +1 -0
  78. package/dist/package-changelog/package-changelog.d.ts.map +1 -0
  79. package/dist/package-changelog/package-changelog.js.map +1 -0
  80. package/dist/package-changelog/package-changelog.types.d.ts.map +1 -0
  81. package/dist/package-changelog/package-changelog.types.js.map +1 -0
  82. package/dist/package-changelog/template.d.ts.map +1 -0
  83. package/dist/package-changelog/template.default.d.ts.map +1 -0
  84. package/dist/package-changelog/template.default.js.map +1 -0
  85. package/dist/package-changelog/template.js.map +1 -0
  86. package/dist/package-commits/dependency-analyzer.d.ts.map +1 -0
  87. package/dist/package-commits/dependency-analyzer.js.map +1 -0
  88. package/dist/package-commits/dependency-analyzer.test.d.ts.map +1 -0
  89. package/dist/package-commits/dependency-analyzer.test.js.map +1 -0
  90. package/dist/package-commits/index.d.ts.map +1 -0
  91. package/dist/package-commits/index.js.map +1 -0
  92. package/dist/package-commits/package-commits.d.ts.map +1 -0
  93. package/dist/package-commits/package-commits.js.map +1 -0
  94. package/dist/package-commits/package-commits.test.d.ts.map +1 -0
  95. package/dist/package-commits/package-commits.test.js.map +1 -0
  96. package/dist/package-tags/index.d.ts.map +1 -0
  97. package/dist/package-tags/index.js.map +1 -0
  98. package/dist/{entities/package-tags → package-tags}/package-tags.d.ts +1 -1
  99. package/dist/package-tags/package-tags.d.ts.map +1 -0
  100. package/dist/{entities/package-tags → package-tags}/package-tags.js +2 -3
  101. package/dist/package-tags/package-tags.js.map +1 -0
  102. package/dist/package-tags/package-tags.test.d.ts.map +1 -0
  103. package/dist/package-tags/package-tags.test.js.map +1 -0
  104. package/dist/package-version/index.d.ts.map +1 -0
  105. package/dist/package-version/index.js.map +1 -0
  106. package/dist/package-version/package-version.d.ts.map +1 -0
  107. package/dist/package-version/package-version.js.map +1 -0
  108. package/dist/package-version/package-version.test.d.ts.map +1 -0
  109. package/dist/package-version/package-version.test.js.map +1 -0
  110. package/dist/package-version/package-version.types.d.ts.map +1 -0
  111. package/dist/package-version/package-version.types.js.map +1 -0
  112. package/dist/tag/index.d.ts.map +1 -0
  113. package/dist/tag/index.js.map +1 -0
  114. package/dist/tag/tag.d.ts.map +1 -0
  115. package/dist/{entities/tag → tag}/tag.js +12 -3
  116. package/dist/tag/tag.js.map +1 -0
  117. package/dist/tag/tag.test.d.ts.map +1 -0
  118. package/dist/tag/tag.test.js.map +1 -0
  119. package/dist/tag/tag.types.d.ts.map +1 -0
  120. package/dist/tag/tag.types.js.map +1 -0
  121. package/docs/1_ENTITIES.md +62 -0
  122. package/package.json +31 -46
  123. package/src/{entities/branch → branch}/branch.test.ts +64 -3
  124. package/src/{entities/branch → branch}/branch.ts +13 -5
  125. package/src/{entities/commit → commit}/commit.test.ts +100 -0
  126. package/src/{entities/commit → commit}/commit.ts +15 -5
  127. package/src/commit-check.ts +138 -0
  128. package/src/{entities/entities.shell.ts → entities.shell.ts} +2 -0
  129. package/src/index.ts +11 -7
  130. package/src/{entities/intershell-config → intershell-config}/intershell-config.default.ts +1 -8
  131. package/src/{entities/intershell-config → intershell-config}/intershell-config.ts +17 -3
  132. package/src/{entities/intershell-config → intershell-config}/intershell-config.types.ts +3 -3
  133. package/src/{entities/package-tags → package-tags}/package-tags.ts +2 -3
  134. package/src/{entities/tag → tag}/tag.ts +13 -3
  135. package/dist/commands/ci/act.d.ts +0 -13
  136. package/dist/commands/ci/act.d.ts.map +0 -1
  137. package/dist/commands/ci/act.js +0 -89
  138. package/dist/commands/ci/act.js.map +0 -1
  139. package/dist/commands/ci/attach-affected.d.ts +0 -12
  140. package/dist/commands/ci/attach-affected.d.ts.map +0 -1
  141. package/dist/commands/ci/attach-affected.js +0 -83
  142. package/dist/commands/ci/attach-affected.js.map +0 -1
  143. package/dist/commands/ci/attach-service-ports.d.ts +0 -10
  144. package/dist/commands/ci/attach-service-ports.d.ts.map +0 -1
  145. package/dist/commands/ci/attach-service-ports.js +0 -25
  146. package/dist/commands/ci/attach-service-ports.js.map +0 -1
  147. package/dist/commands/commit-check.d.ts +0 -13
  148. package/dist/commands/commit-check.d.ts.map +0 -1
  149. package/dist/commands/commit-check.js +0 -110
  150. package/dist/commands/commit-check.js.map +0 -1
  151. package/dist/commands/commit.d.ts +0 -16
  152. package/dist/commands/commit.d.ts.map +0 -1
  153. package/dist/commands/commit.js +0 -91
  154. package/dist/commands/commit.js.map +0 -1
  155. package/dist/commands/dev/check.d.ts +0 -13
  156. package/dist/commands/dev/check.d.ts.map +0 -1
  157. package/dist/commands/dev/check.js +0 -91
  158. package/dist/commands/dev/check.js.map +0 -1
  159. package/dist/commands/dev/cleanup.d.ts +0 -10
  160. package/dist/commands/dev/cleanup.d.ts.map +0 -1
  161. package/dist/commands/dev/cleanup.js +0 -28
  162. package/dist/commands/dev/cleanup.js.map +0 -1
  163. package/dist/commands/dev/rm.d.ts +0 -12
  164. package/dist/commands/dev/rm.d.ts.map +0 -1
  165. package/dist/commands/dev/rm.js +0 -49
  166. package/dist/commands/dev/rm.js.map +0 -1
  167. package/dist/commands/dev/setup.d.ts +0 -10
  168. package/dist/commands/dev/setup.d.ts.map +0 -1
  169. package/dist/commands/dev/setup.js +0 -40
  170. package/dist/commands/dev/setup.js.map +0 -1
  171. package/dist/commands/local/cleanup.d.ts +0 -12
  172. package/dist/commands/local/cleanup.d.ts.map +0 -1
  173. package/dist/commands/local/cleanup.js +0 -62
  174. package/dist/commands/local/cleanup.js.map +0 -1
  175. package/dist/commands/local/setup.d.ts +0 -11
  176. package/dist/commands/local/setup.d.ts.map +0 -1
  177. package/dist/commands/local/setup.js +0 -55
  178. package/dist/commands/local/setup.js.map +0 -1
  179. package/dist/commands/local/vscode.d.ts +0 -17
  180. package/dist/commands/local/vscode.d.ts.map +0 -1
  181. package/dist/commands/local/vscode.js +0 -94
  182. package/dist/commands/local/vscode.js.map +0 -1
  183. package/dist/commands/update-package-json.d.ts +0 -12
  184. package/dist/commands/update-package-json.d.ts.map +0 -1
  185. package/dist/commands/update-package-json.js +0 -82
  186. package/dist/commands/update-package-json.js.map +0 -1
  187. package/dist/commands/version/apply.d.ts +0 -16
  188. package/dist/commands/version/apply.d.ts.map +0 -1
  189. package/dist/commands/version/apply.js +0 -120
  190. package/dist/commands/version/apply.js.map +0 -1
  191. package/dist/commands/version/ci.d.ts +0 -12
  192. package/dist/commands/version/ci.d.ts.map +0 -1
  193. package/dist/commands/version/ci.js +0 -67
  194. package/dist/commands/version/ci.js.map +0 -1
  195. package/dist/commands/version/prepare.d.ts +0 -19
  196. package/dist/commands/version/prepare.d.ts.map +0 -1
  197. package/dist/commands/version/prepare.js +0 -158
  198. package/dist/commands/version/prepare.js.map +0 -1
  199. package/dist/core/colorify.d.ts +0 -21
  200. package/dist/core/colorify.d.ts.map +0 -1
  201. package/dist/core/colorify.js +0 -56
  202. package/dist/core/colorify.js.map +0 -1
  203. package/dist/core/index.d.ts +0 -4
  204. package/dist/core/index.d.ts.map +0 -1
  205. package/dist/core/index.js +0 -3
  206. package/dist/core/index.js.map +0 -1
  207. package/dist/core/types.d.ts +0 -181
  208. package/dist/core/types.d.ts.map +0 -1
  209. package/dist/core/types.js +0 -5
  210. package/dist/core/types.js.map +0 -1
  211. package/dist/core/wrapshell.d.ts +0 -19
  212. package/dist/core/wrapshell.d.ts.map +0 -1
  213. package/dist/core/wrapshell.js +0 -323
  214. package/dist/core/wrapshell.js.map +0 -1
  215. package/dist/entities/affected/affected.d.ts.map +0 -1
  216. package/dist/entities/affected/affected.js.map +0 -1
  217. package/dist/entities/affected/affected.test.d.ts.map +0 -1
  218. package/dist/entities/affected/affected.test.js.map +0 -1
  219. package/dist/entities/affected/index.d.ts.map +0 -1
  220. package/dist/entities/affected/index.js.map +0 -1
  221. package/dist/entities/branch/branch.d.ts.map +0 -1
  222. package/dist/entities/branch/branch.js.map +0 -1
  223. package/dist/entities/branch/branch.test.d.ts.map +0 -1
  224. package/dist/entities/branch/branch.test.js.map +0 -1
  225. package/dist/entities/branch/branch.types.d.ts.map +0 -1
  226. package/dist/entities/branch/branch.types.js.map +0 -1
  227. package/dist/entities/branch/index.d.ts.map +0 -1
  228. package/dist/entities/branch/index.js.map +0 -1
  229. package/dist/entities/commit/commit.d.ts.map +0 -1
  230. package/dist/entities/commit/commit.js.map +0 -1
  231. package/dist/entities/commit/commit.test.d.ts.map +0 -1
  232. package/dist/entities/commit/commit.test.js.map +0 -1
  233. package/dist/entities/commit/commit.types.d.ts.map +0 -1
  234. package/dist/entities/commit/commit.types.js.map +0 -1
  235. package/dist/entities/commit/index.d.ts.map +0 -1
  236. package/dist/entities/commit/index.js.map +0 -1
  237. package/dist/entities/commit/pr.d.ts.map +0 -1
  238. package/dist/entities/commit/pr.js.map +0 -1
  239. package/dist/entities/commit/pr.test.d.ts.map +0 -1
  240. package/dist/entities/commit/pr.test.js.map +0 -1
  241. package/dist/entities/compose/compose.d.ts.map +0 -1
  242. package/dist/entities/compose/compose.js.map +0 -1
  243. package/dist/entities/compose/compose.test.d.ts.map +0 -1
  244. package/dist/entities/compose/compose.test.js.map +0 -1
  245. package/dist/entities/compose/compose.types.d.ts.map +0 -1
  246. package/dist/entities/compose/compose.types.js.map +0 -1
  247. package/dist/entities/compose/index.d.ts.map +0 -1
  248. package/dist/entities/compose/index.js.map +0 -1
  249. package/dist/entities/entities.shell.d.ts.map +0 -1
  250. package/dist/entities/entities.shell.js.map +0 -1
  251. package/dist/entities/entities.shell.test.d.ts.map +0 -1
  252. package/dist/entities/entities.shell.test.js.map +0 -1
  253. package/dist/entities/index.d.ts +0 -12
  254. package/dist/entities/index.d.ts.map +0 -1
  255. package/dist/entities/index.js +0 -12
  256. package/dist/entities/index.js.map +0 -1
  257. package/dist/entities/intershell-config/intershell-config.d.ts.map +0 -1
  258. package/dist/entities/intershell-config/intershell-config.default.d.ts.map +0 -1
  259. package/dist/entities/intershell-config/intershell-config.default.js.map +0 -1
  260. package/dist/entities/intershell-config/intershell-config.js.map +0 -1
  261. package/dist/entities/intershell-config/intershell-config.test.d.ts.map +0 -1
  262. package/dist/entities/intershell-config/intershell-config.test.js.map +0 -1
  263. package/dist/entities/intershell-config/intershell-config.types.d.ts.map +0 -1
  264. package/dist/entities/intershell-config/intershell-config.types.js.map +0 -1
  265. package/dist/entities/package/index.d.ts.map +0 -1
  266. package/dist/entities/package/index.js.map +0 -1
  267. package/dist/entities/package/package.d.ts.map +0 -1
  268. package/dist/entities/package/package.js.map +0 -1
  269. package/dist/entities/package/package.shell.d.ts.map +0 -1
  270. package/dist/entities/package/package.shell.js.map +0 -1
  271. package/dist/entities/package/package.test.d.ts.map +0 -1
  272. package/dist/entities/package/package.test.js.map +0 -1
  273. package/dist/entities/package/package.types.d.ts.map +0 -1
  274. package/dist/entities/package/package.types.js.map +0 -1
  275. package/dist/entities/package-changelog/index.d.ts.map +0 -1
  276. package/dist/entities/package-changelog/index.js.map +0 -1
  277. package/dist/entities/package-changelog/package-changelog.d.ts.map +0 -1
  278. package/dist/entities/package-changelog/package-changelog.js.map +0 -1
  279. package/dist/entities/package-changelog/package-changelog.types.d.ts.map +0 -1
  280. package/dist/entities/package-changelog/package-changelog.types.js.map +0 -1
  281. package/dist/entities/package-changelog/template.d.ts.map +0 -1
  282. package/dist/entities/package-changelog/template.default.d.ts.map +0 -1
  283. package/dist/entities/package-changelog/template.default.js.map +0 -1
  284. package/dist/entities/package-changelog/template.js.map +0 -1
  285. package/dist/entities/package-commits/dependency-analyzer.d.ts.map +0 -1
  286. package/dist/entities/package-commits/dependency-analyzer.js.map +0 -1
  287. package/dist/entities/package-commits/dependency-analyzer.test.d.ts.map +0 -1
  288. package/dist/entities/package-commits/dependency-analyzer.test.js.map +0 -1
  289. package/dist/entities/package-commits/index.d.ts.map +0 -1
  290. package/dist/entities/package-commits/index.js.map +0 -1
  291. package/dist/entities/package-commits/package-commits.d.ts.map +0 -1
  292. package/dist/entities/package-commits/package-commits.js.map +0 -1
  293. package/dist/entities/package-commits/package-commits.test.d.ts.map +0 -1
  294. package/dist/entities/package-commits/package-commits.test.js.map +0 -1
  295. package/dist/entities/package-tags/index.d.ts.map +0 -1
  296. package/dist/entities/package-tags/index.js.map +0 -1
  297. package/dist/entities/package-tags/package-tags.d.ts.map +0 -1
  298. package/dist/entities/package-tags/package-tags.js.map +0 -1
  299. package/dist/entities/package-tags/package-tags.test.d.ts.map +0 -1
  300. package/dist/entities/package-tags/package-tags.test.js.map +0 -1
  301. package/dist/entities/package-version/index.d.ts.map +0 -1
  302. package/dist/entities/package-version/index.js.map +0 -1
  303. package/dist/entities/package-version/package-version.d.ts.map +0 -1
  304. package/dist/entities/package-version/package-version.js.map +0 -1
  305. package/dist/entities/package-version/package-version.test.d.ts.map +0 -1
  306. package/dist/entities/package-version/package-version.test.js.map +0 -1
  307. package/dist/entities/package-version/package-version.types.d.ts.map +0 -1
  308. package/dist/entities/package-version/package-version.types.js.map +0 -1
  309. package/dist/entities/tag/index.d.ts.map +0 -1
  310. package/dist/entities/tag/index.js.map +0 -1
  311. package/dist/entities/tag/tag.d.ts.map +0 -1
  312. package/dist/entities/tag/tag.js.map +0 -1
  313. package/dist/entities/tag/tag.test.d.ts.map +0 -1
  314. package/dist/entities/tag/tag.test.js.map +0 -1
  315. package/dist/entities/tag/tag.types.d.ts.map +0 -1
  316. package/dist/entities/tag/tag.types.js.map +0 -1
  317. package/src/commands/ci/act.ts +0 -95
  318. package/src/commands/ci/attach-affected.ts +0 -93
  319. package/src/commands/ci/attach-service-ports.ts +0 -31
  320. package/src/commands/commit-check.ts +0 -124
  321. package/src/commands/commit.ts +0 -103
  322. package/src/commands/dev/check.ts +0 -117
  323. package/src/commands/dev/cleanup.ts +0 -34
  324. package/src/commands/dev/rm.ts +0 -66
  325. package/src/commands/dev/setup.ts +0 -48
  326. package/src/commands/local/cleanup.ts +0 -74
  327. package/src/commands/local/setup.ts +0 -68
  328. package/src/commands/local/vscode.ts +0 -118
  329. package/src/commands/update-package-json.ts +0 -104
  330. package/src/commands/version/apply.ts +0 -156
  331. package/src/commands/version/ci.ts +0 -85
  332. package/src/commands/version/prepare.ts +0 -223
  333. package/src/core/colorify.ts +0 -61
  334. package/src/core/index.ts +0 -3
  335. package/src/core/types.ts +0 -262
  336. package/src/core/wrapshell.ts +0 -388
  337. package/src/entities/index.ts +0 -11
  338. /package/dist/{entities/affected → affected}/affected.d.ts +0 -0
  339. /package/dist/{entities/affected → affected}/affected.js +0 -0
  340. /package/dist/{entities/affected → affected}/affected.test.d.ts +0 -0
  341. /package/dist/{entities/affected → affected}/affected.test.js +0 -0
  342. /package/dist/{entities/affected → affected}/index.d.ts +0 -0
  343. /package/dist/{entities/affected → affected}/index.js +0 -0
  344. /package/dist/{entities/branch → branch}/branch.d.ts +0 -0
  345. /package/dist/{entities/branch → branch}/branch.test.d.ts +0 -0
  346. /package/dist/{entities/branch → branch}/branch.types.d.ts +0 -0
  347. /package/dist/{entities/branch → branch}/branch.types.js +0 -0
  348. /package/dist/{entities/branch → branch}/index.d.ts +0 -0
  349. /package/dist/{entities/branch → branch}/index.js +0 -0
  350. /package/dist/{entities/commit → commit}/commit.d.ts +0 -0
  351. /package/dist/{entities/commit → commit}/commit.test.d.ts +0 -0
  352. /package/dist/{entities/commit → commit}/commit.types.d.ts +0 -0
  353. /package/dist/{entities/commit → commit}/commit.types.js +0 -0
  354. /package/dist/{entities/commit → commit}/index.d.ts +0 -0
  355. /package/dist/{entities/commit → commit}/index.js +0 -0
  356. /package/dist/{entities/commit → commit}/pr.d.ts +0 -0
  357. /package/dist/{entities/commit → commit}/pr.js +0 -0
  358. /package/dist/{entities/commit → commit}/pr.test.d.ts +0 -0
  359. /package/dist/{entities/commit → commit}/pr.test.js +0 -0
  360. /package/dist/{entities/compose → compose}/compose.d.ts +0 -0
  361. /package/dist/{entities/compose → compose}/compose.js +0 -0
  362. /package/dist/{entities/compose → compose}/compose.test.d.ts +0 -0
  363. /package/dist/{entities/compose → compose}/compose.test.js +0 -0
  364. /package/dist/{entities/compose → compose}/compose.types.d.ts +0 -0
  365. /package/dist/{entities/compose → compose}/compose.types.js +0 -0
  366. /package/dist/{entities/compose → compose}/index.d.ts +0 -0
  367. /package/dist/{entities/compose → compose}/index.js +0 -0
  368. /package/dist/{entities/entities.shell.test.d.ts → entities.shell.test.d.ts} +0 -0
  369. /package/dist/{entities/entities.shell.test.js → entities.shell.test.js} +0 -0
  370. /package/dist/{entities/intershell-config → intershell-config}/intershell-config.d.ts +0 -0
  371. /package/dist/{entities/intershell-config → intershell-config}/intershell-config.test.d.ts +0 -0
  372. /package/dist/{entities/intershell-config → intershell-config}/intershell-config.test.js +0 -0
  373. /package/dist/{entities/intershell-config → intershell-config}/intershell-config.types.js +0 -0
  374. /package/dist/{entities/package → package}/index.d.ts +0 -0
  375. /package/dist/{entities/package → package}/index.js +0 -0
  376. /package/dist/{entities/package → package}/package.d.ts +0 -0
  377. /package/dist/{entities/package → package}/package.js +0 -0
  378. /package/dist/{entities/package → package}/package.shell.d.ts +0 -0
  379. /package/dist/{entities/package → package}/package.shell.js +0 -0
  380. /package/dist/{entities/package → package}/package.test.d.ts +0 -0
  381. /package/dist/{entities/package → package}/package.test.js +0 -0
  382. /package/dist/{entities/package → package}/package.types.d.ts +0 -0
  383. /package/dist/{entities/package → package}/package.types.js +0 -0
  384. /package/dist/{entities/package-changelog → package-changelog}/index.d.ts +0 -0
  385. /package/dist/{entities/package-changelog → package-changelog}/index.js +0 -0
  386. /package/dist/{entities/package-changelog → package-changelog}/package-changelog.d.ts +0 -0
  387. /package/dist/{entities/package-changelog → package-changelog}/package-changelog.js +0 -0
  388. /package/dist/{entities/package-changelog → package-changelog}/package-changelog.types.d.ts +0 -0
  389. /package/dist/{entities/package-changelog → package-changelog}/package-changelog.types.js +0 -0
  390. /package/dist/{entities/package-changelog → package-changelog}/template.d.ts +0 -0
  391. /package/dist/{entities/package-changelog → package-changelog}/template.default.d.ts +0 -0
  392. /package/dist/{entities/package-changelog → package-changelog}/template.default.js +0 -0
  393. /package/dist/{entities/package-changelog → package-changelog}/template.js +0 -0
  394. /package/dist/{entities/package-commits → package-commits}/dependency-analyzer.d.ts +0 -0
  395. /package/dist/{entities/package-commits → package-commits}/dependency-analyzer.js +0 -0
  396. /package/dist/{entities/package-commits → package-commits}/dependency-analyzer.test.d.ts +0 -0
  397. /package/dist/{entities/package-commits → package-commits}/dependency-analyzer.test.js +0 -0
  398. /package/dist/{entities/package-commits → package-commits}/index.d.ts +0 -0
  399. /package/dist/{entities/package-commits → package-commits}/index.js +0 -0
  400. /package/dist/{entities/package-commits → package-commits}/package-commits.d.ts +0 -0
  401. /package/dist/{entities/package-commits → package-commits}/package-commits.js +0 -0
  402. /package/dist/{entities/package-commits → package-commits}/package-commits.test.d.ts +0 -0
  403. /package/dist/{entities/package-commits → package-commits}/package-commits.test.js +0 -0
  404. /package/dist/{entities/package-tags → package-tags}/index.d.ts +0 -0
  405. /package/dist/{entities/package-tags → package-tags}/index.js +0 -0
  406. /package/dist/{entities/package-tags → package-tags}/package-tags.test.d.ts +0 -0
  407. /package/dist/{entities/package-tags → package-tags}/package-tags.test.js +0 -0
  408. /package/dist/{entities/package-version → package-version}/index.d.ts +0 -0
  409. /package/dist/{entities/package-version → package-version}/index.js +0 -0
  410. /package/dist/{entities/package-version → package-version}/package-version.d.ts +0 -0
  411. /package/dist/{entities/package-version → package-version}/package-version.js +0 -0
  412. /package/dist/{entities/package-version → package-version}/package-version.test.d.ts +0 -0
  413. /package/dist/{entities/package-version → package-version}/package-version.test.js +0 -0
  414. /package/dist/{entities/package-version → package-version}/package-version.types.d.ts +0 -0
  415. /package/dist/{entities/package-version → package-version}/package-version.types.js +0 -0
  416. /package/dist/{entities/tag → tag}/index.d.ts +0 -0
  417. /package/dist/{entities/tag → tag}/index.js +0 -0
  418. /package/dist/{entities/tag → tag}/tag.d.ts +0 -0
  419. /package/dist/{entities/tag → tag}/tag.test.d.ts +0 -0
  420. /package/dist/{entities/tag → tag}/tag.test.js +0 -0
  421. /package/dist/{entities/tag → tag}/tag.types.d.ts +0 -0
  422. /package/dist/{entities/tag → tag}/tag.types.js +0 -0
  423. /package/src/{entities/affected → affected}/affected.test.ts +0 -0
  424. /package/src/{entities/affected → affected}/affected.ts +0 -0
  425. /package/src/{entities/affected → affected}/index.ts +0 -0
  426. /package/src/{entities/branch → branch}/branch.types.ts +0 -0
  427. /package/src/{entities/branch → branch}/index.ts +0 -0
  428. /package/src/{entities/commit → commit}/commit.types.ts +0 -0
  429. /package/src/{entities/commit → commit}/index.ts +0 -0
  430. /package/src/{entities/commit → commit}/pr.test.ts +0 -0
  431. /package/src/{entities/commit → commit}/pr.ts +0 -0
  432. /package/src/{entities/compose → compose}/compose.test.ts +0 -0
  433. /package/src/{entities/compose → compose}/compose.ts +0 -0
  434. /package/src/{entities/compose → compose}/compose.types.ts +0 -0
  435. /package/src/{entities/compose → compose}/index.ts +0 -0
  436. /package/src/{entities/entities.shell.test.ts → entities.shell.test.ts} +0 -0
  437. /package/src/{entities/intershell-config → intershell-config}/intershell-config.test.ts +0 -0
  438. /package/src/{entities/package → package}/index.ts +0 -0
  439. /package/src/{entities/package → package}/package.shell.ts +0 -0
  440. /package/src/{entities/package → package}/package.test.ts +0 -0
  441. /package/src/{entities/package → package}/package.ts +0 -0
  442. /package/src/{entities/package → package}/package.types.ts +0 -0
  443. /package/src/{entities/package-changelog → package-changelog}/index.ts +0 -0
  444. /package/src/{entities/package-changelog → package-changelog}/package-changelog.ts +0 -0
  445. /package/src/{entities/package-changelog → package-changelog}/package-changelog.types.ts +0 -0
  446. /package/src/{entities/package-changelog → package-changelog}/template.default.ts +0 -0
  447. /package/src/{entities/package-changelog → package-changelog}/template.ts +0 -0
  448. /package/src/{entities/package-commits → package-commits}/dependency-analyzer.test.ts +0 -0
  449. /package/src/{entities/package-commits → package-commits}/dependency-analyzer.ts +0 -0
  450. /package/src/{entities/package-commits → package-commits}/index.ts +0 -0
  451. /package/src/{entities/package-commits → package-commits}/package-commits.test.ts +0 -0
  452. /package/src/{entities/package-commits → package-commits}/package-commits.ts +0 -0
  453. /package/src/{entities/package-tags → package-tags}/index.ts +0 -0
  454. /package/src/{entities/package-tags → package-tags}/package-tags.test.ts +0 -0
  455. /package/src/{entities/package-version → package-version}/index.ts +0 -0
  456. /package/src/{entities/package-version → package-version}/package-version.test.ts +0 -0
  457. /package/src/{entities/package-version → package-version}/package-version.ts +0 -0
  458. /package/src/{entities/package-version → package-version}/package-version.types.ts +0 -0
  459. /package/src/{entities/tag → tag}/index.ts +0 -0
  460. /package/src/{entities/tag → tag}/tag.test.ts +0 -0
  461. /package/src/{entities/tag → tag}/tag.types.ts +0 -0
@@ -1,388 +0,0 @@
1
- import { existsSync, statSync } from "node:fs";
2
- import { colorify } from "./colorify";
3
- import type {
4
- ArgOption,
5
- HookContext,
6
- HookSystem,
7
- InferArgs,
8
- ScriptConfig,
9
- ScriptHandler,
10
- ScriptInstance,
11
- } from "./types";
12
-
13
- const validators = {
14
- nonEmpty: (value: string): boolean | string => {
15
- if (value.trim().length === 0) {
16
- return "Value cannot be empty";
17
- }
18
- return true;
19
- },
20
- boolean: (value: string): boolean | string => {
21
- const lowerValue = value.toLowerCase();
22
- if (lowerValue === "true" || lowerValue === "1" || lowerValue === "yes") {
23
- return true;
24
- }
25
- if (lowerValue === "false" || lowerValue === "0" || lowerValue === "no") {
26
- return true;
27
- }
28
- return "Value must be a boolean (true/false, 1/0, yes/no)";
29
- },
30
- number: (value: string): boolean | string => {
31
- const num = Number(value);
32
- if (Number.isNaN(num) || !Number.isFinite(num)) {
33
- return "Value must be a valid number";
34
- }
35
- return true;
36
- },
37
- integer: (value: string): boolean | string => {
38
- const num = Number(value);
39
- if (Number.isNaN(num) || !Number.isFinite(num) || !Number.isInteger(num)) {
40
- return "Value must be an integer";
41
- }
42
- return true;
43
- },
44
- fileExists: (filePath: string): boolean | string => {
45
- try {
46
- const file = Bun.file(filePath);
47
- if (!file.size) {
48
- return `File "${filePath}" not found.`;
49
- }
50
- return true;
51
- } catch {
52
- return `File "${filePath}" not found.`;
53
- }
54
- },
55
- directoryExists: (path: string): boolean | string => {
56
- try {
57
- const exists = existsSync(path) && statSync(path).isDirectory();
58
- if (!exists) {
59
- return `Directory does not exist: ${path}`;
60
- }
61
- return true;
62
- } catch (error) {
63
- return `Error checking directory: ${error instanceof Error ? error.message : String(error)}`;
64
- }
65
- },
66
- enum:
67
- (allowedValues: string[]) =>
68
- (value: string): boolean | string => {
69
- if (!allowedValues.includes(value)) {
70
- return `Invalid value "${value}". Valid values: ${allowedValues.join(", ")}`;
71
- }
72
- return true;
73
- },
74
- regex:
75
- (pattern: RegExp, message?: string) =>
76
- (value: string): boolean | string => {
77
- if (!pattern.test(value)) {
78
- return message || `Value must match pattern: ${pattern}`;
79
- }
80
- return true;
81
- },
82
- custom:
83
- <T>(validator: (value: string) => T | string) =>
84
- (value: string): boolean | string => {
85
- try {
86
- const result = validator(value);
87
- if (typeof result === "string") {
88
- return result;
89
- }
90
- return true;
91
- } catch (error) {
92
- return error instanceof Error ? error.message : String(error);
93
- }
94
- },
95
- url: (value: string): boolean | string => {
96
- try {
97
- new URL(value);
98
- return true;
99
- } catch {
100
- return "Value must be a valid URL";
101
- }
102
- },
103
- email: (value: string): boolean | string => {
104
- const emailRegex = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
105
- if (!emailRegex.test(value)) {
106
- return "Value must be a valid email address";
107
- }
108
- return true;
109
- },
110
- semver: (value: string): boolean | string => {
111
- const semverRegex =
112
- /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/;
113
- if (!semverRegex.test(value)) {
114
- return "Value must be a valid semantic version (e.g., 1.0.0)";
115
- }
116
- return true;
117
- },
118
- } as const;
119
-
120
- const defaultConfig = {
121
- name: "Script",
122
- description: "A CLI script",
123
- options: [
124
- {
125
- short: "-v",
126
- long: "--verbose",
127
- description: "Enable verbose logging",
128
- required: false,
129
- type: "boolean" as const,
130
- defaultValue: true,
131
- validator: validators.boolean,
132
- },
133
- {
134
- short: "-q",
135
- long: "--quiet",
136
- description: "Suppress output",
137
- required: false,
138
- type: "boolean" as const,
139
- defaultValue: false,
140
- validator: validators.boolean,
141
- },
142
- {
143
- short: "",
144
- long: "--dry-run",
145
- description: "Show what would happen without executing",
146
- required: false,
147
- type: "boolean" as const,
148
- defaultValue: false,
149
- validator: validators.boolean,
150
- },
151
- {
152
- short: "-h",
153
- long: "--help",
154
- description: "Show help information",
155
- required: false,
156
- type: "boolean" as const,
157
- defaultValue: false,
158
- validator: validators.boolean,
159
- },
160
- ],
161
- } as const satisfies ScriptConfig;
162
-
163
- class WrapShell<TConfig extends ScriptConfig> {
164
- private config: TConfig;
165
- private hooks: Partial<HookSystem<TConfig>> = {};
166
-
167
- constructor(config: TConfig) {
168
- this.config = config;
169
- }
170
-
171
- static createScript<TConfig extends ScriptConfig>(
172
- config: TConfig,
173
- handler: ScriptHandler<TConfig>,
174
- ): ScriptInstance<TConfig> {
175
- const wrapShell = new WrapShell(config);
176
-
177
- return {
178
- config,
179
- handler,
180
- run: async (passedArgs?: InferArgs<TConfig>) => {
181
- const context: HookContext<TConfig> = {
182
- startTime: Date.now(),
183
- args:
184
- passedArgs ||
185
- (await wrapShell.parseArgs().catch((e) => {
186
- wrapShell.showHelp(null);
187
- console.error(e);
188
- process.exit(1);
189
- })),
190
- script: { config, handler, run: async () => {} },
191
- };
192
-
193
- try {
194
- if (wrapShell.hooks.beforeRun) {
195
- for (const hook of wrapShell.hooks.beforeRun) {
196
- await hook(context);
197
- }
198
- }
199
-
200
- const enhancedConsole = wrapShell.createEnhancedConsole(context.args);
201
- const result = await handler(context.args, enhancedConsole);
202
-
203
- if (wrapShell.hooks.afterRun) {
204
- for (const hook of wrapShell.hooks.afterRun) {
205
- await hook(context);
206
- }
207
- }
208
-
209
- return result;
210
- } catch (error) {
211
- if (wrapShell.hooks.onError) {
212
- for (const hook of wrapShell.hooks.onError) {
213
- await hook({ ...context, error: error as Error });
214
- }
215
- }
216
-
217
- if (!context.args.debug) {
218
- (error as Error).stack = undefined;
219
- }
220
-
221
- throw error;
222
- }
223
- },
224
- };
225
- }
226
-
227
- private async parseArgs(): Promise<InferArgs<TConfig>> {
228
- const args = process.argv.slice(2);
229
- const result: Record<string, unknown> = {};
230
- const allOptions = [...defaultConfig.options, ...this.config.options];
231
-
232
- allOptions.forEach((option) => {
233
- const key = option.long.replace("--", "");
234
- if (
235
- option.required === false &&
236
- "defaultValue" in option &&
237
- option.defaultValue !== undefined
238
- ) {
239
- result[key] = option.defaultValue;
240
- }
241
- });
242
-
243
- for (let i = 0; i < args.length; i++) {
244
- const arg = args[i];
245
- const nextArg = args[i + 1];
246
-
247
- if (arg === "-h" || arg === "--help") {
248
- this.showHelp(result as InferArgs<TConfig>);
249
- process.exit(0);
250
- }
251
-
252
- const option = allOptions.find((opt) => opt.short === arg || opt.long === arg);
253
- if (option) {
254
- const key = option.long.replace("--", "");
255
-
256
- if (option.type === "boolean") {
257
- result[key] = true;
258
- } else if (nextArg && !nextArg.startsWith("-")) {
259
- result[key] = nextArg;
260
- i++;
261
- }
262
- }
263
- }
264
-
265
- await this.validateParsedArgs(result, allOptions);
266
-
267
- return result as InferArgs<TConfig>;
268
- }
269
-
270
- private async validateParsedArgs(
271
- args: Record<string, unknown>,
272
- options: readonly ArgOption[],
273
- ): Promise<void> {
274
- for (const option of options) {
275
- const key = option.long.replace("--", "");
276
- const value = args[key];
277
-
278
- if (option.required && (value === undefined || value === null || value === "")) {
279
- throw new Error(`Required option ${option.long} is missing`);
280
- }
281
-
282
- if (value !== undefined && option.validator) {
283
- let validation: boolean | string | Promise<boolean | string>;
284
-
285
- if (option.type === "string[]" || option.type === "number[]") {
286
- // For array types, pass the array directly
287
- if (Array.isArray(value)) {
288
- validation = await (
289
- option.validator as (value: string[]) => boolean | string | Promise<boolean | string>
290
- )(value);
291
- } else {
292
- throw new Error(`Expected array for ${option.long}, got ${typeof value}`);
293
- }
294
- } else {
295
- // For single value types, convert to string
296
- validation = await (
297
- option.validator as (value: string) => boolean | string | Promise<boolean | string>
298
- )(String(value));
299
- }
300
-
301
- if (typeof validation === "string") {
302
- throw new Error(`Invalid value for ${option.long}: ${validation}`);
303
- }
304
- }
305
- }
306
- }
307
-
308
- private createEnhancedConsole(args: InferArgs<TConfig>): Console {
309
- const originalConsole = console;
310
-
311
- return Object.assign({}, originalConsole, {
312
- log: (...props: Parameters<typeof console.log>) => {
313
- if (!("quiet" in args) || !args.quiet) {
314
- originalConsole.log(...props);
315
- }
316
- },
317
- info: (...props: Parameters<typeof console.info>) => {
318
- if (!("quiet" in args) || !args.quiet) {
319
- originalConsole.warn(...props);
320
- }
321
- },
322
- warn: (...props: Parameters<typeof console.warn>) => {
323
- if (!("quiet" in args) || !args.quiet) {
324
- originalConsole.warn(...props);
325
- }
326
- },
327
- error: (...props: Parameters<typeof console.error>) => {
328
- originalConsole.error(...props);
329
- },
330
- });
331
- }
332
-
333
- private showHelp(args: InferArgs<TConfig> | null): void {
334
- const xConsole = this.createEnhancedConsole(args || ({} as InferArgs<TConfig>));
335
- xConsole.log(colorify.blue(this.config.name));
336
- xConsole.log(this.config.description);
337
- xConsole.log();
338
-
339
- if (this.config.usage) {
340
- xConsole.log("Usage:");
341
- xConsole.log(` ${this.config.usage}\n`);
342
- }
343
-
344
- const allOptions = [...defaultConfig.options, ...this.config.options];
345
- if (allOptions.length > 0) {
346
- xConsole.log("Options:");
347
- allOptions.forEach((option) => {
348
- const shortFlag = option.short ? `${option.short}, ` : " ";
349
- const required = option.required ? colorify.red(" (required)") : "";
350
- xConsole.log(` ${shortFlag}${option.long}${required}`);
351
- xConsole.log(` ${option.description}`);
352
- });
353
- xConsole.log();
354
- }
355
-
356
- if (this.config.examples && this.config.examples.length > 0) {
357
- xConsole.log("Examples:");
358
- this.config.examples.forEach((example) => {
359
- xConsole.log(` ${colorify.gray(example)}`);
360
- });
361
- }
362
- }
363
-
364
- static hooks = {
365
- beforeRun: <TConfig extends ScriptConfig>(
366
- hook: (context: HookContext<TConfig>) => Promise<void> | void,
367
- ) => hook,
368
- afterRun: <TConfig extends ScriptConfig>(
369
- hook: (context: HookContext<TConfig>) => Promise<void> | void,
370
- ) => hook,
371
- onError: <TConfig extends ScriptConfig>(
372
- hook: (context: HookContext<TConfig> & { error: Error }) => Promise<void> | void,
373
- ) => hook,
374
- onValidation: <TConfig extends ScriptConfig>(
375
- hook: (context: HookContext<TConfig>) => Promise<void> | void,
376
- ) => hook,
377
- };
378
-
379
- static validators = validators;
380
- }
381
-
382
- export function createScript<TConfig extends ScriptConfig>(
383
- config: TConfig,
384
- handler: ScriptHandler<TConfig>,
385
- ): ScriptInstance<TConfig> {
386
- return WrapShell.createScript(config, handler);
387
- }
388
- createScript.validators = validators;
@@ -1,11 +0,0 @@
1
- export * from "./affected";
2
- export * from "./branch";
3
- export * from "./commit";
4
- export * from "./compose";
5
- export * from "./intershell-config/intershell-config.default";
6
- export * from "./package";
7
- export * from "./package-changelog";
8
- export * from "./package-commits";
9
- export * from "./package-tags";
10
- export * from "./package-version";
11
- export * from "./tag";
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes