@camunda8/cli 3.1.0 → 3.2.0-alpha.10

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 (311) hide show
  1. package/CONTEXT.md +7 -15
  2. package/EXAMPLES.md +253 -1
  3. package/PLUGIN-HELP.md +1 -1
  4. package/README.md +50 -180
  5. package/dist/command-dispatch.d.ts +1 -1
  6. package/dist/command-dispatch.d.ts.map +1 -1
  7. package/dist/command-dispatch.js +1 -1
  8. package/dist/command-dispatch.js.map +1 -1
  9. package/dist/commands/completion.d.ts +1 -1
  10. package/dist/commands/completion.d.ts.map +1 -1
  11. package/dist/commands/completion.js +2 -3
  12. package/dist/commands/completion.js.map +1 -1
  13. package/dist/commands/deploy.d.ts +13 -0
  14. package/dist/commands/deploy.d.ts.map +1 -0
  15. package/dist/commands/deploy.js +328 -0
  16. package/dist/commands/deploy.js.map +1 -0
  17. package/dist/commands/forms.d.ts +1 -1
  18. package/dist/commands/forms.d.ts.map +1 -1
  19. package/dist/commands/forms.js +8 -8
  20. package/dist/commands/forms.js.map +1 -1
  21. package/dist/commands/helpers/deploy-helpers.d.ts +120 -0
  22. package/dist/commands/helpers/deploy-helpers.d.ts.map +1 -0
  23. package/dist/{deployments.js → commands/helpers/deploy-helpers.js} +307 -155
  24. package/dist/commands/helpers/deploy-helpers.js.map +1 -0
  25. package/dist/commands/identity-authorizations.d.ts +5 -18
  26. package/dist/commands/identity-authorizations.d.ts.map +1 -1
  27. package/dist/commands/identity-authorizations.js +8 -10
  28. package/dist/commands/identity-authorizations.js.map +1 -1
  29. package/dist/commands/identity-groups.d.ts +5 -5
  30. package/dist/commands/identity-groups.d.ts.map +1 -1
  31. package/dist/commands/identity-groups.js +7 -8
  32. package/dist/commands/identity-groups.js.map +1 -1
  33. package/dist/commands/identity-mapping-rules.d.ts +5 -5
  34. package/dist/commands/identity-mapping-rules.d.ts.map +1 -1
  35. package/dist/commands/identity-mapping-rules.js +7 -8
  36. package/dist/commands/identity-mapping-rules.js.map +1 -1
  37. package/dist/commands/identity-roles.d.ts +5 -5
  38. package/dist/commands/identity-roles.d.ts.map +1 -1
  39. package/dist/commands/identity-roles.js +7 -8
  40. package/dist/commands/identity-roles.js.map +1 -1
  41. package/dist/commands/identity-tenants.d.ts +5 -5
  42. package/dist/commands/identity-tenants.d.ts.map +1 -1
  43. package/dist/commands/identity-tenants.js +7 -8
  44. package/dist/commands/identity-tenants.js.map +1 -1
  45. package/dist/commands/identity-users.d.ts +5 -5
  46. package/dist/commands/identity-users.d.ts.map +1 -1
  47. package/dist/commands/identity-users.js +7 -8
  48. package/dist/commands/identity-users.js.map +1 -1
  49. package/dist/commands/identity.d.ts +11 -31
  50. package/dist/commands/identity.d.ts.map +1 -1
  51. package/dist/commands/identity.js +15 -15
  52. package/dist/commands/identity.js.map +1 -1
  53. package/dist/commands/incidents.d.ts +3 -3
  54. package/dist/commands/incidents.d.ts.map +1 -1
  55. package/dist/commands/incidents.js +6 -6
  56. package/dist/commands/incidents.js.map +1 -1
  57. package/dist/commands/jobs.d.ts +4 -4
  58. package/dist/commands/jobs.d.ts.map +1 -1
  59. package/dist/commands/jobs.js +7 -7
  60. package/dist/commands/jobs.js.map +1 -1
  61. package/dist/commands/mcp-proxy.d.ts +1 -1
  62. package/dist/commands/mcp-proxy.d.ts.map +1 -1
  63. package/dist/commands/mcp-proxy.js +5 -9
  64. package/dist/commands/mcp-proxy.js.map +1 -1
  65. package/dist/commands/messages.d.ts +2 -2
  66. package/dist/commands/messages.d.ts.map +1 -1
  67. package/dist/commands/messages.js +4 -4
  68. package/dist/commands/messages.js.map +1 -1
  69. package/dist/commands/open.d.ts +4 -4
  70. package/dist/commands/open.d.ts.map +1 -1
  71. package/dist/commands/open.js +6 -6
  72. package/dist/commands/open.js.map +1 -1
  73. package/dist/commands/plugins.d.ts +9 -9
  74. package/dist/commands/plugins.d.ts.map +1 -1
  75. package/dist/commands/plugins.js +2 -7
  76. package/dist/commands/plugins.js.map +1 -1
  77. package/dist/commands/process-definitions.d.ts +2 -2
  78. package/dist/commands/process-definitions.d.ts.map +1 -1
  79. package/dist/commands/process-definitions.js +5 -5
  80. package/dist/commands/process-definitions.js.map +1 -1
  81. package/dist/commands/process-instances.d.ts +5 -5
  82. package/dist/commands/process-instances.d.ts.map +1 -1
  83. package/dist/commands/process-instances.js +8 -9
  84. package/dist/commands/process-instances.js.map +1 -1
  85. package/dist/commands/profiles.d.ts +4 -36
  86. package/dist/commands/profiles.d.ts.map +1 -1
  87. package/dist/commands/profiles.js +43 -41
  88. package/dist/commands/profiles.js.map +1 -1
  89. package/dist/commands/run.d.ts +2 -2
  90. package/dist/commands/run.d.ts.map +1 -1
  91. package/dist/commands/run.js +4 -4
  92. package/dist/commands/run.js.map +1 -1
  93. package/dist/commands/search.d.ts +7 -7
  94. package/dist/commands/search.d.ts.map +1 -1
  95. package/dist/commands/search.js +9 -11
  96. package/dist/commands/search.js.map +1 -1
  97. package/dist/commands/session.d.ts +4 -4
  98. package/dist/commands/session.d.ts.map +1 -1
  99. package/dist/commands/session.js +26 -5
  100. package/dist/commands/session.js.map +1 -1
  101. package/dist/commands/topology.d.ts +1 -1
  102. package/dist/commands/topology.d.ts.map +1 -1
  103. package/dist/commands/topology.js +2 -2
  104. package/dist/commands/topology.js.map +1 -1
  105. package/dist/commands/user-tasks.d.ts +2 -2
  106. package/dist/commands/user-tasks.d.ts.map +1 -1
  107. package/dist/commands/user-tasks.js +5 -5
  108. package/dist/commands/user-tasks.js.map +1 -1
  109. package/dist/commands/variables.d.ts +1 -1
  110. package/dist/commands/variables.d.ts.map +1 -1
  111. package/dist/commands/variables.js +3 -3
  112. package/dist/commands/variables.js.map +1 -1
  113. package/dist/commands/watch.d.ts +2 -2
  114. package/dist/commands/watch.d.ts.map +1 -1
  115. package/dist/commands/watch.js +86 -19
  116. package/dist/commands/watch.js.map +1 -1
  117. package/dist/core/client.d.ts.map +1 -0
  118. package/dist/core/client.js.map +1 -0
  119. package/dist/{config.d.ts → core/config.d.ts} +28 -2
  120. package/dist/core/config.d.ts.map +1 -0
  121. package/dist/{config.js → core/config.js} +61 -5
  122. package/dist/core/config.js.map +1 -0
  123. package/dist/core/errors.d.ts.map +1 -0
  124. package/dist/core/errors.js.map +1 -0
  125. package/dist/core/index.d.ts +7 -0
  126. package/dist/core/index.d.ts.map +1 -0
  127. package/dist/core/index.js +13 -0
  128. package/dist/core/index.js.map +1 -0
  129. package/dist/core/logger.d.ts.map +1 -0
  130. package/dist/core/logger.js.map +1 -0
  131. package/dist/core/runtime.d.ts.map +1 -0
  132. package/dist/{runtime.js → core/runtime.js} +2 -2
  133. package/dist/core/runtime.js.map +1 -0
  134. package/dist/core/update-check.d.ts.map +1 -0
  135. package/dist/core/update-check.js.map +1 -0
  136. package/dist/default-plugins/bpmn/README.md +12 -3
  137. package/dist/default-plugins/bpmn/c8ctl-plugin.js +7376 -108
  138. package/dist/default-plugins/bpmn/package.json +8 -1
  139. package/dist/default-plugins/cluster/c8ctl-plugin.js +66 -9
  140. package/dist/default-plugins/element-template/README.md +6 -3
  141. package/dist/default-plugins/element-template/c8ctl-plugin.js +10195 -229
  142. package/dist/default-plugins/element-template/docs/design.md +1 -1
  143. package/dist/default-plugins/element-template/package.json +11 -1
  144. package/dist/default-plugins/feel/c8ctl-plugin.js +14030 -584
  145. package/dist/default-plugins/feel/package.json +4 -1
  146. package/dist/{command-framework.d.ts → framework/command-framework.d.ts} +23 -9
  147. package/dist/framework/command-framework.d.ts.map +1 -0
  148. package/dist/{command-framework.js → framework/command-framework.js} +16 -29
  149. package/dist/framework/command-framework.js.map +1 -0
  150. package/dist/{command-registry.d.ts → framework/command-registry.d.ts} +35 -8
  151. package/dist/framework/command-registry.d.ts.map +1 -0
  152. package/dist/{command-registry.js → framework/command-registry.js} +74 -9
  153. package/dist/framework/command-registry.js.map +1 -0
  154. package/dist/{command-validation.d.ts → framework/command-validation.d.ts} +0 -14
  155. package/dist/framework/command-validation.d.ts.map +1 -0
  156. package/dist/{command-validation.js → framework/command-validation.js} +1 -34
  157. package/dist/framework/command-validation.js.map +1 -0
  158. package/dist/framework/index.d.ts +10 -0
  159. package/dist/framework/index.d.ts.map +1 -0
  160. package/dist/framework/index.js +16 -0
  161. package/dist/framework/index.js.map +1 -0
  162. package/dist/{plugin-loader.d.ts → framework/plugins/plugin-loader.d.ts} +30 -5
  163. package/dist/framework/plugins/plugin-loader.d.ts.map +1 -0
  164. package/dist/{plugin-loader.js → framework/plugins/plugin-loader.js} +26 -10
  165. package/dist/framework/plugins/plugin-loader.js.map +1 -0
  166. package/dist/framework/plugins/plugin-registry.d.ts.map +1 -0
  167. package/dist/{plugin-registry.js → framework/plugins/plugin-registry.js} +1 -1
  168. package/dist/framework/plugins/plugin-registry.js.map +1 -0
  169. package/dist/framework/plugins/plugin-version.d.ts.map +1 -0
  170. package/dist/framework/plugins/plugin-version.js.map +1 -0
  171. package/dist/{completion.d.ts → framework/ui/completion.d.ts} +2 -2
  172. package/dist/framework/ui/completion.d.ts.map +1 -0
  173. package/dist/{completion.js → framework/ui/completion.js} +7 -9
  174. package/dist/framework/ui/completion.js.map +1 -0
  175. package/dist/framework/ui/help.d.ts.map +1 -0
  176. package/dist/{help.js → framework/ui/help.js} +4 -4
  177. package/dist/framework/ui/help.js.map +1 -0
  178. package/dist/framework/ui/prompt.d.ts +132 -0
  179. package/dist/framework/ui/prompt.d.ts.map +1 -0
  180. package/dist/framework/ui/prompt.js +298 -0
  181. package/dist/framework/ui/prompt.js.map +1 -0
  182. package/dist/index.d.ts.map +1 -1
  183. package/dist/index.js +24 -20
  184. package/dist/index.js.map +1 -1
  185. package/dist/utils/command-local/deploy-version.d.ts +21 -0
  186. package/dist/utils/command-local/deploy-version.d.ts.map +1 -0
  187. package/dist/utils/command-local/deploy-version.js +31 -0
  188. package/dist/utils/command-local/deploy-version.js.map +1 -0
  189. package/dist/{mcp-proxy-helpers.d.ts → utils/command-local/mcp-proxy-helpers.d.ts} +1 -1
  190. package/dist/utils/command-local/mcp-proxy-helpers.d.ts.map +1 -0
  191. package/dist/{mcp-proxy-helpers.js → utils/command-local/mcp-proxy-helpers.js} +1 -1
  192. package/dist/utils/command-local/mcp-proxy-helpers.js.map +1 -0
  193. package/dist/utils/command-local/open-helpers.d.ts.map +1 -0
  194. package/dist/{open-helpers.js → utils/command-local/open-helpers.js} +2 -2
  195. package/dist/utils/command-local/open-helpers.js.map +1 -0
  196. package/dist/{search-helpers.d.ts → utils/command-local/search-helpers.d.ts} +1 -1
  197. package/dist/utils/command-local/search-helpers.d.ts.map +1 -0
  198. package/dist/utils/command-local/search-helpers.js.map +1 -0
  199. package/dist/utils/command-local/watch-constants.d.ts.map +1 -0
  200. package/dist/utils/command-local/watch-constants.js.map +1 -0
  201. package/dist/utils/index.d.ts +10 -0
  202. package/dist/utils/index.d.ts.map +1 -0
  203. package/dist/utils/index.js +16 -0
  204. package/dist/utils/index.js.map +1 -0
  205. package/dist/utils/shared/date-filter.d.ts.map +1 -0
  206. package/dist/utils/shared/date-filter.js.map +1 -0
  207. package/dist/{ignore.d.ts → utils/shared/ignore.d.ts} +19 -1
  208. package/dist/utils/shared/ignore.d.ts.map +1 -0
  209. package/dist/utils/shared/ignore.js +234 -0
  210. package/dist/utils/shared/ignore.js.map +1 -0
  211. package/dist/utils/shared/resource-extensions.d.ts.map +1 -0
  212. package/dist/utils/shared/resource-extensions.js.map +1 -0
  213. package/dist/utils/shared/validation.d.ts +23 -0
  214. package/dist/utils/shared/validation.d.ts.map +1 -0
  215. package/dist/utils/shared/validation.js +43 -0
  216. package/dist/utils/shared/validation.js.map +1 -0
  217. package/dist/vendor/bpmnlint.cjs +25907 -0
  218. package/package.json +12 -14
  219. package/dist/client.d.ts.map +0 -1
  220. package/dist/client.js.map +0 -1
  221. package/dist/command-framework.d.ts.map +0 -1
  222. package/dist/command-framework.js.map +0 -1
  223. package/dist/command-registry.d.ts.map +0 -1
  224. package/dist/command-registry.js.map +0 -1
  225. package/dist/command-validation.d.ts.map +0 -1
  226. package/dist/command-validation.js.map +0 -1
  227. package/dist/commands/resource-extensions.d.ts.map +0 -1
  228. package/dist/commands/resource-extensions.js.map +0 -1
  229. package/dist/completion.d.ts.map +0 -1
  230. package/dist/completion.js.map +0 -1
  231. package/dist/config.d.ts.map +0 -1
  232. package/dist/config.js.map +0 -1
  233. package/dist/date-filter.d.ts.map +0 -1
  234. package/dist/date-filter.js.map +0 -1
  235. package/dist/default-plugins/bpmn/c8ctl-plugin.js.map +0 -1
  236. package/dist/default-plugins/bpmn/lint.js +0 -320
  237. package/dist/default-plugins/bpmn/lint.js.map +0 -1
  238. package/dist/default-plugins/element-template/c8ctl-plugin.js.map +0 -1
  239. package/dist/default-plugins/element-template/commands/apply.js +0 -336
  240. package/dist/default-plugins/element-template/commands/apply.js.map +0 -1
  241. package/dist/default-plugins/element-template/commands/get-properties.js +0 -344
  242. package/dist/default-plugins/element-template/commands/get-properties.js.map +0 -1
  243. package/dist/default-plugins/element-template/commands/get.js +0 -107
  244. package/dist/default-plugins/element-template/commands/get.js.map +0 -1
  245. package/dist/default-plugins/element-template/commands/info.js +0 -189
  246. package/dist/default-plugins/element-template/commands/info.js.map +0 -1
  247. package/dist/default-plugins/element-template/commands/search.js +0 -102
  248. package/dist/default-plugins/element-template/commands/search.js.map +0 -1
  249. package/dist/default-plugins/element-template/commands/sync.js +0 -36
  250. package/dist/default-plugins/element-template/commands/sync.js.map +0 -1
  251. package/dist/default-plugins/element-template/helpers.js +0 -429
  252. package/dist/default-plugins/element-template/helpers.js.map +0 -1
  253. package/dist/default-plugins/element-template/marketplace.js +0 -586
  254. package/dist/default-plugins/element-template/marketplace.js.map +0 -1
  255. package/dist/default-plugins/element-template/template-ref.js +0 -232
  256. package/dist/default-plugins/element-template/template-ref.js.map +0 -1
  257. package/dist/default-plugins/feel/c8ctl-plugin.js.map +0 -1
  258. package/dist/default-plugins/hello-world/README.md +0 -161
  259. package/dist/default-plugins/hello-world/c8ctl-plugin.js +0 -69
  260. package/dist/default-plugins/hello-world/package.json +0 -8
  261. package/dist/deployments.d.ts +0 -42
  262. package/dist/deployments.d.ts.map +0 -1
  263. package/dist/deployments.js.map +0 -1
  264. package/dist/errors.d.ts.map +0 -1
  265. package/dist/errors.js.map +0 -1
  266. package/dist/help.d.ts.map +0 -1
  267. package/dist/help.js.map +0 -1
  268. package/dist/ignore.d.ts.map +0 -1
  269. package/dist/ignore.js +0 -101
  270. package/dist/ignore.js.map +0 -1
  271. package/dist/logger.d.ts.map +0 -1
  272. package/dist/logger.js.map +0 -1
  273. package/dist/mcp-proxy-helpers.d.ts.map +0 -1
  274. package/dist/mcp-proxy-helpers.js.map +0 -1
  275. package/dist/open-helpers.d.ts.map +0 -1
  276. package/dist/open-helpers.js.map +0 -1
  277. package/dist/plugin-loader.d.ts.map +0 -1
  278. package/dist/plugin-loader.js.map +0 -1
  279. package/dist/plugin-registry.d.ts.map +0 -1
  280. package/dist/plugin-registry.js.map +0 -1
  281. package/dist/plugin-version.d.ts.map +0 -1
  282. package/dist/plugin-version.js.map +0 -1
  283. package/dist/runtime.d.ts.map +0 -1
  284. package/dist/runtime.js.map +0 -1
  285. package/dist/search-helpers.d.ts.map +0 -1
  286. package/dist/search-helpers.js.map +0 -1
  287. package/dist/update-check.d.ts.map +0 -1
  288. package/dist/update-check.js.map +0 -1
  289. package/dist/watch-constants.d.ts.map +0 -1
  290. package/dist/watch-constants.js.map +0 -1
  291. /package/dist/{client.d.ts → core/client.d.ts} +0 -0
  292. /package/dist/{client.js → core/client.js} +0 -0
  293. /package/dist/{errors.d.ts → core/errors.d.ts} +0 -0
  294. /package/dist/{errors.js → core/errors.js} +0 -0
  295. /package/dist/{logger.d.ts → core/logger.d.ts} +0 -0
  296. /package/dist/{logger.js → core/logger.js} +0 -0
  297. /package/dist/{runtime.d.ts → core/runtime.d.ts} +0 -0
  298. /package/dist/{update-check.d.ts → core/update-check.d.ts} +0 -0
  299. /package/dist/{update-check.js → core/update-check.js} +0 -0
  300. /package/dist/{plugin-registry.d.ts → framework/plugins/plugin-registry.d.ts} +0 -0
  301. /package/dist/{plugin-version.d.ts → framework/plugins/plugin-version.d.ts} +0 -0
  302. /package/dist/{plugin-version.js → framework/plugins/plugin-version.js} +0 -0
  303. /package/dist/{help.d.ts → framework/ui/help.d.ts} +0 -0
  304. /package/dist/{open-helpers.d.ts → utils/command-local/open-helpers.d.ts} +0 -0
  305. /package/dist/{search-helpers.js → utils/command-local/search-helpers.js} +0 -0
  306. /package/dist/{watch-constants.d.ts → utils/command-local/watch-constants.d.ts} +0 -0
  307. /package/dist/{watch-constants.js → utils/command-local/watch-constants.js} +0 -0
  308. /package/dist/{date-filter.d.ts → utils/shared/date-filter.d.ts} +0 -0
  309. /package/dist/{date-filter.js → utils/shared/date-filter.js} +0 -0
  310. /package/dist/{commands → utils/shared}/resource-extensions.d.ts +0 -0
  311. /package/dist/{commands → utils/shared}/resource-extensions.js +0 -0
@@ -4,7 +4,7 @@
4
4
  * (#291). Search command handlers in `src/commands/search.ts` re-import
5
5
  * these.
6
6
  */
7
- import type { Logger } from "./logger.ts";
7
+ import type { Logger } from "../../core/index.ts";
8
8
  /** Default page size the Camunda REST API uses when no explicit limit is set */
9
9
  export declare const API_DEFAULT_PAGE_SIZE = 100;
10
10
  /**
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-helpers.d.ts","sourceRoot":"","sources":["../../../src/utils/command-local/search-helpers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAElD,gFAAgF;AAChF,eAAO,MAAM,qBAAqB,MAAM,CAAC;AAEzC;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB,GAAI,OAAO,MAAM,KAAG,OAC3B,CAAC;AAE3B,eAAO,MAAM,cAAc,GAAI,OAAO,MAAM,KAAG,MAAM,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAChB,CAAC;AAExD;;;GAGG;AACH,eAAO,MAAM,eAAe,GAC3B,SAAS,MAAM,EACf,yBAAsB,KACpB,MAmBF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,GAClC,OAAO,OAAO,EACd,SAAS,MAAM,KACb,OAGF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,oBAAoB,GAChC,OAAO,OAAO,EACd,SAAS,MAAM,KACb,OAGF,CAAC;AAEF;;GAEG;AACH,wBAAgB,YAAY,CAC3B,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,OAAO,EACnB,YAAY,CAAC,EAAE,MAAM,EAAE,GACrB,IAAI,CAcN;AAED;;GAEG;AACH,wBAAgB,cAAc,CAC7B,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,EACb,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,OAAO,GACjB,IAAI,CAWN"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-helpers.js","sourceRoot":"","sources":["../../../src/utils/command-local/search-helpers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,gFAAgF;AAChF,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CAAC;AAEzC;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,KAAa,EAAW,EAAE,CAC9D,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAE3B,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAAa,EAA8B,EAAE,CAC3E,oBAAoB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;AAExD;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAC9B,OAAe,EACf,eAAe,GAAG,IAAI,EACb,EAAE;IACX,IAAI,KAAK,GAAG,EAAE,CAAC;IACf,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EA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-constants.d.ts","sourceRoot":"","sources":["../../../src/utils/command-local/watch-constants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,iFAAiF;AACjF,eAAO,MAAM,eAAe,OAAO,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"watch-constants.js","sourceRoot":"","sources":["../../../src/utils/command-local/watch-constants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,iFAAiF;AACjF,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,CAAC"}
@@ -0,0 +1,10 @@
1
+ export * from "./command-local/deploy-version.ts";
2
+ export * from "./command-local/mcp-proxy-helpers.ts";
3
+ export * from "./command-local/open-helpers.ts";
4
+ export * from "./command-local/search-helpers.ts";
5
+ export * from "./command-local/watch-constants.ts";
6
+ export * from "./shared/date-filter.ts";
7
+ export * from "./shared/ignore.ts";
8
+ export * from "./shared/resource-extensions.ts";
9
+ export * from "./shared/validation.ts";
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAMA,cAAc,mCAAmC,CAAC;AAClD,cAAc,sCAAsC,CAAC;AACrD,cAAc,iCAAiC,CAAC;AAChD,cAAc,mCAAmC,CAAC;AAClD,cAAc,oCAAoC,CAAC;AACnD,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iCAAiC,CAAC;AAChD,cAAc,wBAAwB,CAAC"}
@@ -0,0 +1,16 @@
1
+ // Public barrel for the `utils` layer.
2
+ //
3
+ // Other layers and the composition root MUST import utils symbols through this
4
+ // barrel (`../utils/index.ts`), never from deep utils files. Intra-utils imports
5
+ // use direct sibling paths. Enforced by
6
+ // tests/unit/layering-import-boundary.test.ts (Rules A and B).
7
+ export * from "./command-local/deploy-version.js";
8
+ export * from "./command-local/mcp-proxy-helpers.js";
9
+ export * from "./command-local/open-helpers.js";
10
+ export * from "./command-local/search-helpers.js";
11
+ export * from "./command-local/watch-constants.js";
12
+ export * from "./shared/date-filter.js";
13
+ export * from "./shared/ignore.js";
14
+ export * from "./shared/resource-extensions.js";
15
+ export * from "./shared/validation.js";
16
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,EAAE;AACF,+EAA+E;AAC/E,iFAAiF;AACjF,wCAAwC;AACxC,+DAA+D;AAC/D,cAAc,mCAAmC,CAAC;AAClD,cAAc,sCAAsC,CAAC;AACrD,cAAc,iCAAiC,CAAC;AAChD,cAAc,mCAAmC,CAAC;AAClD,cAAc,oCAAoC,CAAC;AACnD,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iCAAiC,CAAC;AAChD,cAAc,wBAAwB,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date-filter.d.ts","sourceRoot":"","sources":["../../../src/utils/shared/date-filter.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;GAKG;AACH,wBAAgB,YAAY,CAC3B,KAAK,EAAE,MAAM,GACX;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAgBvC;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAC9B,IAAI,CAAC,EAAE,MAAM,EACb,EAAE,CAAC,EAAE,MAAM,GACT;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAKlC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date-filter.js","sourceRoot":"","sources":["../../../src/utils/shared/date-filter.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAC3B,KAAa;IAEb,MAAM,cAAc,GAAG,KAAK,CAAC,OA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AC,KAAK,CAAC,CAAC;QAC1B,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;YAAE,OAAO,IAAI,CAAC;QAC3C,OAAO,KAAK,CAAC;IACd,CAAC;IAED,oBAAoB;IACpB,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACpD,MAAM,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,KAAK,gBAAgB,CAAC,CAAC;IAC7C,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;QAAE,OAAO,IAAI,CAAC;IAE3C,OAAO,QAAQ,KAAK,OAAO;QAC1B,CAAC,CAAC,GAAG,KAAK,gBAAgB;QAC1B,CAAC,CAAC,GAAG,KAAK,gBAAgB,CAAC;AAC7B,CAAC"}
@@ -9,8 +9,14 @@
9
9
  * The `.c8ignore` file is resolved from the deploy/watch target directory
10
10
  * (via `resolveIgnoreBaseDir`), falling back to `process.cwd()` when no
11
11
  * target is specified. See #258.
12
+ *
13
+ * Pattern matching is implemented using `node:path#matchesGlob` (Node ≥ 21)
14
+ * and supports the subset of gitignore-style rules documented below.
12
15
  */
13
- import { type Ignore } from "ignore";
16
+ /** A compiled set of .c8ignore / default patterns. */
17
+ export interface Ignore {
18
+ ignores(path: string): boolean;
19
+ }
14
20
  /**
15
21
  * Load ignore rules from the `.c8ignore` file in `baseDir` (if present)
16
22
  * merged with built-in default patterns.
@@ -38,4 +44,16 @@ export declare function isIgnored(ig: Ignore, filePath: string, baseDir: string)
38
44
  * `resolve(".")` === `process.cwd()` — backward-compatible.
39
45
  */
40
46
  export declare function resolveIgnoreBaseDir(paths: string[]): string;
47
+ /**
48
+ * Load "deploy-always" rules from a `.c8ignore` file.
49
+ *
50
+ * Reads only the negation patterns (`!pattern`) and builds a positive
51
+ * matcher from them — stripping the `!` prefix. The resulting `Ignore`
52
+ * matches files that should always be deployed (regardless of the
53
+ * extension allow-list) because the user negated them in `.c8ignore`.
54
+ *
55
+ * Returns `null` when no `.c8ignore` exists or it contains no negation
56
+ * patterns.
57
+ */
58
+ export declare function loadDeployAlwaysRules(baseDir: string): Ignore | null;
41
59
  //# sourceMappingURL=ignore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ignore.d.ts","sourceRoot":"","sources":["../../../src/utils/shared/ignore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AASH,sDAAsD;AACtD,MAAM,WAAW,MAAM;IACtB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;CAC/B;AAkHD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAcvD;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CACxB,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,GACb,OAAO,CAWT;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAwC5D;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAqBpE"}
@@ -0,0 +1,234 @@
1
+ /**
2
+ * .c8ignore support — filter files/directories using .gitignore-style patterns.
3
+ *
4
+ * Default ignore patterns (always active):
5
+ * node_modules/
6
+ * target/
7
+ * .git/
8
+ *
9
+ * The `.c8ignore` file is resolved from the deploy/watch target directory
10
+ * (via `resolveIgnoreBaseDir`), falling back to `process.cwd()` when no
11
+ * target is specified. See #258.
12
+ *
13
+ * Pattern matching is implemented using `node:path#matchesGlob` (Node ≥ 21)
14
+ * and supports the subset of gitignore-style rules documented below.
15
+ */
16
+ import { existsSync, readFileSync, statSync } from "node:fs";
17
+ import { dirname, join, matchesGlob, relative, resolve, sep } from "node:path";
18
+ const DEFAULT_PATTERNS = ["node_modules/", "target/", ".git/"];
19
+ const C8IGNORE_FILENAME = ".c8ignore";
20
+ /**
21
+ * Translate a single gitignore-style line into one or more glob patterns
22
+ * suitable for `path.matchesGlob`.
23
+ *
24
+ * Rules applied (subset of gitignore spec). These mirror the behaviour of the
25
+ * `ignore` npm package — see the `c8ignore-parity` regression guard:
26
+ * - Lines starting with `#` and blank lines are skipped.
27
+ * - A leading `!` negates the pattern.
28
+ * - A trailing `/` restricts matching to directories: the pattern matches the
29
+ * directory entry (a path queried *with* a trailing slash, e.g. `build/`)
30
+ * and its contents, but NOT a bare path of the same name (`build`), which
31
+ * gitignore would treat as a file. The directory walker queries directory
32
+ * entries with a trailing slash, so traversal pruning still works.
33
+ * - A trailing `/**` (e.g. `foo/**`) matches everything *inside* the directory
34
+ * but not the directory entry itself.
35
+ * - A leading `/` or an embedded `/` anchors the pattern to the base dir.
36
+ * - Otherwise the pattern matches at any depth.
37
+ */
38
+ function parsePattern(raw) {
39
+ // Trim trailing whitespace. The full gitignore spec allows a trailing `\ `
40
+ // to preserve spaces, but that edge case is not needed here — we
41
+ // deliberately omit it for simplicity.
42
+ const trimmed = raw.trimEnd();
43
+ if (!trimmed || trimmed.startsWith("#"))
44
+ return null;
45
+ const negate = trimmed.startsWith("!");
46
+ const withoutNegate = negate ? trimmed.slice(1) : trimmed;
47
+ // A trailing slash restricts the pattern to directories.
48
+ const dirOnly = withoutNegate.endsWith("/");
49
+ const withoutTrailing = withoutNegate.replace(/\/$/, "");
50
+ // A leading / anchors the pattern to the base directory — the slash is a
51
+ // positional marker, not part of the glob itself.
52
+ const pattern = withoutTrailing.replace(/^\//, "");
53
+ if (!pattern)
54
+ return null;
55
+ // Anchored: a leading slash, or any embedded slash, pins the pattern to the
56
+ // base directory. Otherwise it matches at any depth.
57
+ const anchored = withoutNegate.startsWith("/") || pattern.includes("/");
58
+ let globs;
59
+ if (dirOnly) {
60
+ // Directory-only (`dir/`): match the directory entry (queried with a
61
+ // trailing slash) and everything under it, but NOT a bare path of the
62
+ // same name. `dir/**` matches `dir/` and `dir/child`, never bare `dir`.
63
+ globs = anchored
64
+ ? [`${pattern}/**`]
65
+ : [`${pattern}/**`, `**/${pattern}/**`];
66
+ }
67
+ else if (pattern.endsWith("/**")) {
68
+ // Contents-only (`dir/**`): match everything inside the directory but
69
+ // not the directory entry itself.
70
+ const core = pattern.slice(0, -3);
71
+ globs = [`${core}/*`, `${core}/*/**`];
72
+ }
73
+ else if (anchored) {
74
+ // Anchored entry: match the entry itself (file or directory) and its
75
+ // contents. e.g. `/src`, `src/build`.
76
+ globs = [pattern, `${pattern}/**`];
77
+ }
78
+ else {
79
+ // Unanchored entry: match as a file or directory at any depth.
80
+ // e.g. `*.log` or `target` → the entry and its contents at any depth.
81
+ globs = [pattern, `**/${pattern}`, `${pattern}/**`, `**/${pattern}/**`];
82
+ }
83
+ return { negate, globs };
84
+ }
85
+ function buildIgnoreChecker(patterns) {
86
+ const matches = (path, { globs }) => globs.some((g) => matchesGlob(path, g));
87
+ // gitignore rule: you cannot re-include a file if a parent directory of
88
+ // that file is excluded. Returns true when any ancestor of `rel` is
89
+ // ignored by the first `upTo` patterns (last-match-wins for ancestors).
90
+ // Ancestors are directories, so they are queried with a trailing slash —
91
+ // otherwise directory-only patterns (`dir/`) would not match them.
92
+ const ancestorIgnored = (rel, upTo) => rel
93
+ .split("/")
94
+ .slice(1)
95
+ .some((_, depth) => {
96
+ const ancestor = `${rel
97
+ .split("/")
98
+ .slice(0, depth + 1)
99
+ .join("/")}/`;
100
+ return patterns
101
+ .slice(0, upTo)
102
+ .reduce((ignored, p) => (matches(ancestor, p) ? !p.negate : ignored), false);
103
+ });
104
+ return (rel) => patterns.reduce((ignored, p, i) => {
105
+ if (!matches(rel, p))
106
+ return ignored;
107
+ if (p.negate) {
108
+ // A negation can only un-ignore a path if no parent directory is
109
+ // currently excluded (gitignore rule: excluded dirs cannot be
110
+ // re-included via negation on their descendants).
111
+ return ancestorIgnored(rel, i) ? ignored : false;
112
+ }
113
+ return true;
114
+ }, false);
115
+ }
116
+ /**
117
+ * Load ignore rules from the `.c8ignore` file in `baseDir` (if present)
118
+ * merged with built-in default patterns.
119
+ */
120
+ export function loadIgnoreRules(baseDir) {
121
+ const lines = [...DEFAULT_PATTERNS];
122
+ const ignoreFilePath = join(baseDir, C8IGNORE_FILENAME);
123
+ if (existsSync(ignoreFilePath)) {
124
+ const content = readFileSync(ignoreFilePath, "utf-8");
125
+ lines.push(...content.split("\n"));
126
+ }
127
+ const patterns = lines
128
+ .map(parsePattern)
129
+ .filter((p) => p !== null);
130
+ return { ignores: buildIgnoreChecker(patterns) };
131
+ }
132
+ /**
133
+ * Check whether a path should be ignored.
134
+ *
135
+ * `filePath` must be an absolute path.
136
+ * `baseDir` is the root directory the ignore rules are relative to.
137
+ *
138
+ * Returns `true` when the path matches an ignore rule.
139
+ */
140
+ export function isIgnored(ig, filePath, baseDir) {
141
+ let rel = relative(baseDir, filePath);
142
+ // `ignore` expects forward-slash separators
143
+ if (sep !== "/") {
144
+ rel = rel.split(sep).join("/");
145
+ }
146
+ // Paths outside baseDir can't be ignored
147
+ if (rel === "" || rel === ".." || rel.startsWith("../")) {
148
+ return false;
149
+ }
150
+ return ig.ignores(rel);
151
+ }
152
+ /**
153
+ * Determine the base directory for `.c8ignore` lookup from the paths the
154
+ * user passed to `deploy` or `watch`.
155
+ *
156
+ * - Single directory path → use that directory.
157
+ * - Single file path → use its parent directory.
158
+ * - Multiple paths → deepest common ancestor directory.
159
+ * - No paths → fall back to `process.cwd()`.
160
+ *
161
+ * When no target is specified the CLI defaults to `["."]`, so
162
+ * `resolve(".")` === `process.cwd()` — backward-compatible.
163
+ */
164
+ export function resolveIgnoreBaseDir(paths) {
165
+ if (paths.length === 0)
166
+ return resolve(process.cwd());
167
+ const toDir = (p) => {
168
+ const abs = resolve(p);
169
+ try {
170
+ return statSync(abs).isDirectory() ? abs : dirname(abs);
171
+ }
172
+ catch {
173
+ // Path may not exist yet; use parent directory
174
+ return dirname(abs);
175
+ }
176
+ };
177
+ const dirs = paths.map(toDir);
178
+ if (dirs.length === 1)
179
+ return dirs[0];
180
+ // Multiple paths: find deepest common ancestor.
181
+ // On Windows, drive letters are case-insensitive (c:\ === C:\),
182
+ // so we compare segments case-insensitively on win32.
183
+ const caseFold = process.platform === "win32"
184
+ ? (s) => s.toLowerCase()
185
+ : (s) => s;
186
+ const segments = dirs.map((d) => d.split(sep));
187
+ const common = [];
188
+ const maxCommonLength = Math.min(...segments.map((s) => s.length));
189
+ for (let i = 0; i < maxCommonLength; i++) {
190
+ const seg = segments[0][i];
191
+ if (!segments.every((s) => caseFold(s[i]) === caseFold(seg))) {
192
+ break;
193
+ }
194
+ common.push(seg);
195
+ }
196
+ if (common.length === 0)
197
+ return resolve(process.cwd());
198
+ // Normalize filesystem root: on POSIX [''] → '/', on Windows ['C:'] → 'C:\'
199
+ const joined = common.join(sep);
200
+ return joined === "" || joined.endsWith(":") ? resolve(joined + sep) : joined;
201
+ }
202
+ /**
203
+ * Load "deploy-always" rules from a `.c8ignore` file.
204
+ *
205
+ * Reads only the negation patterns (`!pattern`) and builds a positive
206
+ * matcher from them — stripping the `!` prefix. The resulting `Ignore`
207
+ * matches files that should always be deployed (regardless of the
208
+ * extension allow-list) because the user negated them in `.c8ignore`.
209
+ *
210
+ * Returns `null` when no `.c8ignore` exists or it contains no negation
211
+ * patterns.
212
+ */
213
+ export function loadDeployAlwaysRules(baseDir) {
214
+ const ignoreFilePath = join(baseDir, C8IGNORE_FILENAME);
215
+ if (!existsSync(ignoreFilePath))
216
+ return null;
217
+ const content = readFileSync(ignoreFilePath, "utf-8");
218
+ const positivePatterns = [];
219
+ for (const raw of content.split("\n")) {
220
+ const trimmed = raw.trimEnd();
221
+ // Parse the full line so `parsePattern` handles comment detection,
222
+ // negation stripping, and anchoring correctly. A manual `!` strip
223
+ // before parsing would mis-classify patterns like `!#file` (the `#`
224
+ // would be treated as a comment after the `!` is removed).
225
+ const parsed = parsePattern(trimmed);
226
+ if (parsed?.negate) {
227
+ positivePatterns.push({ ...parsed, negate: false });
228
+ }
229
+ }
230
+ if (positivePatterns.length === 0)
231
+ return null;
232
+ return { ignores: buildIgnoreChecker(positivePatterns) };
233
+ }
234
+ //# sourceMappingURL=ignore.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ignore.js","sourceRoot":"","sources":["../../../src/utils/shared/ignore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAE/E,MAAM,gBAAgB,GAAG,CAAC,eAAe,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;AAE/D,MAAM,iBAAiB,GAAG,WAAW,CAAC;AAYtC;;;;;;;;;;;;;;;;;GAiBG;AACH,SAAS,YAAY,CAAC,GAAW;IAChC,2EAA2E;IAC3E,iEAAiE;IACjE,uCAAuC;IACvC,MAAM,OAAO,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC;IAC9B,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC;IAErD,MAAM,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;IACvC,MAAM,aAAa,GAAG,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;IAE1D,yDAAyD;IACzD,MAAM,OAAO,GAAG,aAAa,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;IAC5C,MAAM,eAAe,GAAG,aAAa,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACzD,yEAAyE;IACzE,kDAAkD;IAClD,MAAM,OAAO,GAAG,eAAe,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YAAY,CAAC,OAAO,CAAC,CAAC;QACrC,IAAI,MAAM,EAAE,MAAM,EAAE,CAAC;YACpB,gBAAgB,CAAC,IAAI,CAAC,EAAE,GAAG,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;QACrD,CAAC;IACF,CAAC;IAED,IAAI,gBAAgB,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IAC/C,OAAO,EAAE,OAAO,EAAE,kBAAkB,CAAC,gBAAgB,CAAC,EAAE,CAAC;AAC1D,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resource-extensions.d.ts","sourceRoot":"","sources":["../../../src/utils/shared/resource-extensions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,eAAO,MAAM,qBAAqB,UAA6B,CAAC;AAEhE;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,UAYrC,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resource-extensions.js","sourceRoot":"","sources":["../../../src/utils/shared/resource-extensions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;AAEhE;;;;GAIG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACxC,OAAO;IACP,MAAM;IACN,OAAO;IACP,KAAK;IACL,MAAM;IACN,MAAM;IACN,MAAM;IACN,OAAO;IACP,SAAS;IACT,MAAM;IACN,OAAO;CACP,CAAC"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Generic CLI input validators with no dependency on the command registry.
3
+ *
4
+ * These narrow raw CLI strings to validated values and exit with code 1 on
5
+ * invalid input. They live in `utils/` (leaf layer, core-only deps) so that
6
+ * non-command modules — e.g. `utils/command-local/open-helpers.ts` — can reuse
7
+ * them without importing the `framework/` layer.
8
+ */
9
+ /**
10
+ * Validate that a positional argument is present and non-empty.
11
+ * Unlike requireOption (for --flags), this uses a descriptive label
12
+ * in the error message.
13
+ * Exits with code 1 if missing.
14
+ */
15
+ export declare function requirePositional(value: string | undefined, label: string, hint?: string): string;
16
+ /**
17
+ * Validate that a string value is one of an allowed set.
18
+ * Works with readonly tuples (e.g. `OPEN_APPS as const`).
19
+ * Uses .find() so TypeScript narrows to T with no cast.
20
+ * Exits with code 1 if invalid, listing valid values.
21
+ */
22
+ export declare function requireOneOf<T extends string>(value: string, allowed: readonly T[], label: string, hint?: string): T;
23
+ //# sourceMappingURL=validation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../src/utils/shared/validation.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAChC,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,KAAK,EAAE,MAAM,EACb,IAAI,CAAC,EAAE,MAAM,GACX,MAAM,CAQR;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,MAAM,EAC5C,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,SAAS,CAAC,EAAE,EACrB,KAAK,EAAE,MAAM,EACb,IAAI,CAAC,EAAE,MAAM,GACX,CAAC,CAWH"}
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Generic CLI input validators with no dependency on the command registry.
3
+ *
4
+ * These narrow raw CLI strings to validated values and exit with code 1 on
5
+ * invalid input. They live in `utils/` (leaf layer, core-only deps) so that
6
+ * non-command modules — e.g. `utils/command-local/open-helpers.ts` — can reuse
7
+ * them without importing the `framework/` layer.
8
+ */
9
+ import { getLogger } from "../../core/index.js";
10
+ /**
11
+ * Validate that a positional argument is present and non-empty.
12
+ * Unlike requireOption (for --flags), this uses a descriptive label
13
+ * in the error message.
14
+ * Exits with code 1 if missing.
15
+ */
16
+ export function requirePositional(value, label, hint) {
17
+ if (!value) {
18
+ const logger = getLogger();
19
+ logger.error(`${label} is required`);
20
+ if (hint)
21
+ logger.info(hint);
22
+ process.exit(1);
23
+ }
24
+ return value;
25
+ }
26
+ /**
27
+ * Validate that a string value is one of an allowed set.
28
+ * Works with readonly tuples (e.g. `OPEN_APPS as const`).
29
+ * Uses .find() so TypeScript narrows to T with no cast.
30
+ * Exits with code 1 if invalid, listing valid values.
31
+ */
32
+ export function requireOneOf(value, allowed, label, hint) {
33
+ const match = allowed.find((v) => v === value);
34
+ if (match === undefined) {
35
+ const logger = getLogger();
36
+ logger.error(`Unknown ${label} '${value}'. Available: ${allowed.join(", ")}`);
37
+ if (hint)
38
+ logger.info(hint);
39
+ process.exit(1);
40
+ }
41
+ return match;
42
+ }
43
+ //# sourceMappingURL=validation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validation.js","sourceRoot":"","sources":["../../../src/utils/shared/validation.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAChC,KAAyB,EACzB,KAAa,EACb,IAAa;IAEb,IAAI,CAAC,KAAK,EAAE,CAAC;QACZ,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;QAC3B,MAAM,CAAC,KAAK,CAAC,GAAG,KAAK,cAAc,CAAC,CAAC;QACrC,IAAI,IAAI;YAAE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC5B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACjB,CAAC;IACD,OAAO,KAAK,CAAC;AACd,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAC3B,KAAa,EACb,OAAqB,EACrB,KAAa,EACb,IAAa;IAEb,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC;IAC/C,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACzB,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;QAC3B,MAAM,CAAC,KAAK,CACX,WAAW,KAAK,KAAK,KAAK,iBAAiB,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAC/D,CAAC;QACF,IAAI,IAAI;YAAE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC5B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACjB,CAAC;IACD,OAAO,KAAK,CAAC;AACd,CAAC"}