@dcupl/cli 1.3.1 → 1.4.0-beta.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 (460) hide show
  1. package/README.md +107 -0
  2. package/dist/cli.d.ts +4 -0
  3. package/dist/cli.js +1247 -0
  4. package/dist/cli.js.map +1 -0
  5. package/dist/functions/app/app-id.d.ts +1 -0
  6. package/dist/functions/app/app-id.js +13 -0
  7. package/dist/functions/app/app-id.js.map +1 -0
  8. package/dist/functions/app/client/daemon-client.d.ts +16 -0
  9. package/dist/functions/app/client/daemon-client.js +67 -0
  10. package/dist/functions/app/client/daemon-client.js.map +1 -0
  11. package/dist/functions/app/commands/build.d.ts +10 -0
  12. package/dist/functions/app/commands/build.js +23 -0
  13. package/dist/functions/app/commands/build.js.map +1 -0
  14. package/dist/functions/app/commands/create.d.ts +35 -0
  15. package/dist/functions/app/commands/create.js +130 -0
  16. package/dist/functions/app/commands/create.js.map +1 -0
  17. package/dist/functions/app/commands/data/_data-helpers.d.ts +23 -0
  18. package/dist/functions/app/commands/data/_data-helpers.js +32 -0
  19. package/dist/functions/app/commands/data/_data-helpers.js.map +1 -0
  20. package/dist/functions/app/commands/data/remove.d.ts +3 -0
  21. package/dist/functions/app/commands/data/remove.js +9 -0
  22. package/dist/functions/app/commands/data/remove.js.map +1 -0
  23. package/dist/functions/app/commands/data/render.d.ts +34 -0
  24. package/dist/functions/app/commands/data/render.js +36 -0
  25. package/dist/functions/app/commands/data/render.js.map +1 -0
  26. package/dist/functions/app/commands/data/reset.d.ts +12 -0
  27. package/dist/functions/app/commands/data/reset.js +15 -0
  28. package/dist/functions/app/commands/data/reset.js.map +1 -0
  29. package/dist/functions/app/commands/data/set.d.ts +3 -0
  30. package/dist/functions/app/commands/data/set.js +9 -0
  31. package/dist/functions/app/commands/data/set.js.map +1 -0
  32. package/dist/functions/app/commands/data/update.d.ts +3 -0
  33. package/dist/functions/app/commands/data/update.js +9 -0
  34. package/dist/functions/app/commands/data/update.js.map +1 -0
  35. package/dist/functions/app/commands/data/upsert.d.ts +3 -0
  36. package/dist/functions/app/commands/data/upsert.js +9 -0
  37. package/dist/functions/app/commands/data/upsert.js.map +1 -0
  38. package/dist/functions/app/commands/destroy.d.ts +18 -0
  39. package/dist/functions/app/commands/destroy.js +55 -0
  40. package/dist/functions/app/commands/destroy.js.map +1 -0
  41. package/dist/functions/app/commands/detect-serve.d.ts +34 -0
  42. package/dist/functions/app/commands/detect-serve.js +169 -0
  43. package/dist/functions/app/commands/detect-serve.js.map +1 -0
  44. package/dist/functions/app/commands/fn/_fn-helpers.d.ts +13 -0
  45. package/dist/functions/app/commands/fn/_fn-helpers.js +11 -0
  46. package/dist/functions/app/commands/fn/_fn-helpers.js.map +1 -0
  47. package/dist/functions/app/commands/fn/aggregate.d.ts +11 -0
  48. package/dist/functions/app/commands/fn/aggregate.js +34 -0
  49. package/dist/functions/app/commands/fn/aggregate.js.map +1 -0
  50. package/dist/functions/app/commands/fn/facets.d.ts +15 -0
  51. package/dist/functions/app/commands/fn/facets.js +35 -0
  52. package/dist/functions/app/commands/fn/facets.js.map +1 -0
  53. package/dist/functions/app/commands/fn/group-by.d.ts +10 -0
  54. package/dist/functions/app/commands/fn/group-by.js +38 -0
  55. package/dist/functions/app/commands/fn/group-by.js.map +1 -0
  56. package/dist/functions/app/commands/fn/metadata.d.ts +8 -0
  57. package/dist/functions/app/commands/fn/metadata.js +13 -0
  58. package/dist/functions/app/commands/fn/metadata.js.map +1 -0
  59. package/dist/functions/app/commands/list.d.ts +7 -0
  60. package/dist/functions/app/commands/list.js +24 -0
  61. package/dist/functions/app/commands/list.js.map +1 -0
  62. package/dist/functions/app/commands/loader-hash.d.ts +2 -0
  63. package/dist/functions/app/commands/loader-hash.js +39 -0
  64. package/dist/functions/app/commands/loader-hash.js.map +1 -0
  65. package/dist/functions/app/commands/loaders/add.d.ts +15 -0
  66. package/dist/functions/app/commands/loaders/add.js +27 -0
  67. package/dist/functions/app/commands/loaders/add.js.map +1 -0
  68. package/dist/functions/app/commands/loaders/get.d.ts +12 -0
  69. package/dist/functions/app/commands/loaders/get.js +16 -0
  70. package/dist/functions/app/commands/loaders/get.js.map +1 -0
  71. package/dist/functions/app/commands/loaders/list.d.ts +11 -0
  72. package/dist/functions/app/commands/loaders/list.js +14 -0
  73. package/dist/functions/app/commands/loaders/list.js.map +1 -0
  74. package/dist/functions/app/commands/loaders/process-flags.d.ts +8 -0
  75. package/dist/functions/app/commands/loaders/process-flags.js +31 -0
  76. package/dist/functions/app/commands/loaders/process-flags.js.map +1 -0
  77. package/dist/functions/app/commands/loaders/process.d.ts +14 -0
  78. package/dist/functions/app/commands/loaders/process.js +23 -0
  79. package/dist/functions/app/commands/loaders/process.js.map +1 -0
  80. package/dist/functions/app/commands/loaders/remove.d.ts +12 -0
  81. package/dist/functions/app/commands/loaders/remove.js +16 -0
  82. package/dist/functions/app/commands/loaders/remove.js.map +1 -0
  83. package/dist/functions/app/commands/loaders/resolve-key.d.ts +6 -0
  84. package/dist/functions/app/commands/loaders/resolve-key.js +26 -0
  85. package/dist/functions/app/commands/loaders/resolve-key.js.map +1 -0
  86. package/dist/functions/app/commands/logs.d.ts +10 -0
  87. package/dist/functions/app/commands/logs.js +25 -0
  88. package/dist/functions/app/commands/logs.js.map +1 -0
  89. package/dist/functions/app/commands/models/get.d.ts +11 -0
  90. package/dist/functions/app/commands/models/get.js +12 -0
  91. package/dist/functions/app/commands/models/get.js.map +1 -0
  92. package/dist/functions/app/commands/models/keys.d.ts +10 -0
  93. package/dist/functions/app/commands/models/keys.js +12 -0
  94. package/dist/functions/app/commands/models/keys.js.map +1 -0
  95. package/dist/functions/app/commands/models/remove.d.ts +11 -0
  96. package/dist/functions/app/commands/models/remove.js +12 -0
  97. package/dist/functions/app/commands/models/remove.js.map +1 -0
  98. package/dist/functions/app/commands/models/set.d.ts +12 -0
  99. package/dist/functions/app/commands/models/set.js +23 -0
  100. package/dist/functions/app/commands/models/set.js.map +1 -0
  101. package/dist/functions/app/commands/query/execute.d.ts +19 -0
  102. package/dist/functions/app/commands/query/execute.js +88 -0
  103. package/dist/functions/app/commands/query/execute.js.map +1 -0
  104. package/dist/functions/app/commands/query/one.d.ts +13 -0
  105. package/dist/functions/app/commands/query/one.js +14 -0
  106. package/dist/functions/app/commands/query/one.js.map +1 -0
  107. package/dist/functions/app/commands/query-input.d.ts +1 -0
  108. package/dist/functions/app/commands/query-input.js +12 -0
  109. package/dist/functions/app/commands/query-input.js.map +1 -0
  110. package/dist/functions/app/commands/render.d.ts +44 -0
  111. package/dist/functions/app/commands/render.js +139 -0
  112. package/dist/functions/app/commands/render.js.map +1 -0
  113. package/dist/functions/app/commands/resolve-app.d.ts +12 -0
  114. package/dist/functions/app/commands/resolve-app.js +34 -0
  115. package/dist/functions/app/commands/resolve-app.js.map +1 -0
  116. package/dist/functions/app/commands/resolve-source.d.ts +31 -0
  117. package/dist/functions/app/commands/resolve-source.js +82 -0
  118. package/dist/functions/app/commands/resolve-source.js.map +1 -0
  119. package/dist/functions/app/commands/status.d.ts +12 -0
  120. package/dist/functions/app/commands/status.js +30 -0
  121. package/dist/functions/app/commands/status.js.map +1 -0
  122. package/dist/functions/app/commands/validate-report.d.ts +89 -0
  123. package/dist/functions/app/commands/validate-report.js +65 -0
  124. package/dist/functions/app/commands/validate-report.js.map +1 -0
  125. package/dist/functions/app/commands/validate.d.ts +32 -0
  126. package/dist/functions/app/commands/validate.js +91 -0
  127. package/dist/functions/app/commands/validate.js.map +1 -0
  128. package/dist/functions/app/commands/warn-if-pending.d.ts +3 -0
  129. package/dist/functions/app/commands/warn-if-pending.js +9 -0
  130. package/dist/functions/app/commands/warn-if-pending.js.map +1 -0
  131. package/dist/functions/app/daemon/app-server.module.d.ts +7 -0
  132. package/dist/functions/app/daemon/app-server.module.js +41 -0
  133. package/dist/functions/app/daemon/app-server.module.js.map +1 -0
  134. package/dist/functions/app/daemon/controllers/data.controller.d.ts +94 -0
  135. package/dist/functions/app/daemon/controllers/data.controller.js +134 -0
  136. package/dist/functions/app/daemon/controllers/data.controller.js.map +1 -0
  137. package/dist/functions/app/daemon/controllers/fn.controller.d.ts +21 -0
  138. package/dist/functions/app/daemon/controllers/fn.controller.js +59 -0
  139. package/dist/functions/app/daemon/controllers/fn.controller.js.map +1 -0
  140. package/dist/functions/app/daemon/controllers/lifecycle.controller.d.ts +29 -0
  141. package/dist/functions/app/daemon/controllers/lifecycle.controller.js +65 -0
  142. package/dist/functions/app/daemon/controllers/lifecycle.controller.js.map +1 -0
  143. package/dist/functions/app/daemon/controllers/loaders.controller.d.ts +31 -0
  144. package/dist/functions/app/daemon/controllers/loaders.controller.js +72 -0
  145. package/dist/functions/app/daemon/controllers/loaders.controller.js.map +1 -0
  146. package/dist/functions/app/daemon/controllers/models.controller.d.ts +30 -0
  147. package/dist/functions/app/daemon/controllers/models.controller.js +80 -0
  148. package/dist/functions/app/daemon/controllers/models.controller.js.map +1 -0
  149. package/dist/functions/app/daemon/controllers/query.controller.d.ts +22 -0
  150. package/dist/functions/app/daemon/controllers/query.controller.js +43 -0
  151. package/dist/functions/app/daemon/controllers/query.controller.js.map +1 -0
  152. package/dist/functions/app/daemon/daemon-args.d.ts +13 -0
  153. package/dist/functions/app/daemon/daemon-args.js +38 -0
  154. package/dist/functions/app/daemon/daemon-args.js.map +1 -0
  155. package/dist/functions/app/daemon/filters/envelope-exception.filter.d.ts +4 -0
  156. package/dist/functions/app/daemon/filters/envelope-exception.filter.js +58 -0
  157. package/dist/functions/app/daemon/filters/envelope-exception.filter.js.map +1 -0
  158. package/dist/functions/app/daemon/guards/api-key.guard.d.ts +7 -0
  159. package/dist/functions/app/daemon/guards/api-key.guard.js +26 -0
  160. package/dist/functions/app/daemon/guards/api-key.guard.js.map +1 -0
  161. package/dist/functions/app/daemon/interceptors/pending-changes.interceptor.d.ts +8 -0
  162. package/dist/functions/app/daemon/interceptors/pending-changes.interceptor.js +25 -0
  163. package/dist/functions/app/daemon/interceptors/pending-changes.interceptor.js.map +1 -0
  164. package/dist/functions/app/daemon/main.d.ts +1 -0
  165. package/dist/functions/app/daemon/main.js +86 -0
  166. package/dist/functions/app/daemon/main.js.map +1 -0
  167. package/dist/functions/app/daemon/services/auto-gen.d.ts +7 -0
  168. package/dist/functions/app/daemon/services/auto-gen.js +18 -0
  169. package/dist/functions/app/daemon/services/auto-gen.js.map +1 -0
  170. package/dist/functions/app/daemon/services/dcupl-host.service.d.ts +69 -0
  171. package/dist/functions/app/daemon/services/dcupl-host.service.js +267 -0
  172. package/dist/functions/app/daemon/services/dcupl-host.service.js.map +1 -0
  173. package/dist/functions/app/daemon/services/idle-watchdog.service.d.ts +12 -0
  174. package/dist/functions/app/daemon/services/idle-watchdog.service.js +38 -0
  175. package/dist/functions/app/daemon/services/idle-watchdog.service.js.map +1 -0
  176. package/dist/functions/app/daemon/services/ingest.service.d.ts +12 -0
  177. package/dist/functions/app/daemon/services/ingest.service.js +126 -0
  178. package/dist/functions/app/daemon/services/ingest.service.js.map +1 -0
  179. package/dist/functions/app/daemon/services/init-options.d.ts +16 -0
  180. package/dist/functions/app/daemon/services/init-options.js +56 -0
  181. package/dist/functions/app/daemon/services/init-options.js.map +1 -0
  182. package/dist/functions/app/daemon/services/loaders.service.d.ts +27 -0
  183. package/dist/functions/app/daemon/services/loaders.service.js +169 -0
  184. package/dist/functions/app/daemon/services/loaders.service.js.map +1 -0
  185. package/dist/functions/app/daemon/services/normalize-query.d.ts +11 -0
  186. package/dist/functions/app/daemon/services/normalize-query.js +29 -0
  187. package/dist/functions/app/daemon/services/normalize-query.js.map +1 -0
  188. package/dist/functions/app/e2e/port-lock.d.ts +2 -0
  189. package/dist/functions/app/e2e/port-lock.js +53 -0
  190. package/dist/functions/app/e2e/port-lock.js.map +1 -0
  191. package/dist/functions/app/registry/daemon-log.d.ts +3 -0
  192. package/dist/functions/app/registry/daemon-log.js +32 -0
  193. package/dist/functions/app/registry/daemon-log.js.map +1 -0
  194. package/dist/functions/app/registry/registry.d.ts +15 -0
  195. package/dist/functions/app/registry/registry.js +111 -0
  196. package/dist/functions/app/registry/registry.js.map +1 -0
  197. package/dist/functions/app/registry/serve-registry.d.ts +16 -0
  198. package/dist/functions/app/registry/serve-registry.js +93 -0
  199. package/dist/functions/app/registry/serve-registry.js.map +1 -0
  200. package/dist/functions/app/types.d.ts +124 -0
  201. package/dist/functions/app/types.js +3 -0
  202. package/dist/functions/app/types.js.map +1 -0
  203. package/dist/functions/config/commands/get.d.ts +14 -0
  204. package/dist/functions/config/commands/get.js +46 -0
  205. package/dist/functions/config/commands/get.js.map +1 -0
  206. package/dist/functions/config/commands/set.d.ts +7 -0
  207. package/dist/functions/config/commands/set.js +66 -0
  208. package/dist/functions/config/commands/set.js.map +1 -0
  209. package/dist/functions/config/io.d.ts +6 -0
  210. package/dist/functions/config/io.js +35 -0
  211. package/dist/functions/config/io.js.map +1 -0
  212. package/dist/functions/config/prompts.d.ts +7 -0
  213. package/dist/functions/config/prompts.js +51 -0
  214. package/dist/functions/config/prompts.js.map +1 -0
  215. package/dist/functions/files/commands/copy.d.ts +22 -0
  216. package/dist/functions/files/commands/copy.js +21 -0
  217. package/dist/functions/files/commands/copy.js.map +1 -0
  218. package/dist/functions/files/commands/create-folder.d.ts +19 -0
  219. package/dist/functions/files/commands/create-folder.js +19 -0
  220. package/dist/functions/files/commands/create-folder.js.map +1 -0
  221. package/dist/functions/files/commands/delete.d.ts +21 -0
  222. package/dist/functions/files/commands/delete.js +37 -0
  223. package/dist/functions/files/commands/delete.js.map +1 -0
  224. package/dist/functions/files/commands/list.d.ts +20 -0
  225. package/dist/functions/files/commands/list.js +29 -0
  226. package/dist/functions/files/commands/list.js.map +1 -0
  227. package/dist/functions/files/commands/move.d.ts +24 -0
  228. package/dist/functions/files/commands/move.js +37 -0
  229. package/dist/functions/files/commands/move.js.map +1 -0
  230. package/dist/functions/files/commands/pull.d.ts +31 -0
  231. package/dist/functions/files/commands/pull.js +132 -0
  232. package/dist/functions/files/commands/pull.js.map +1 -0
  233. package/dist/functions/files/commands/push.d.ts +30 -0
  234. package/dist/functions/files/commands/push.js +116 -0
  235. package/dist/functions/files/commands/push.js.map +1 -0
  236. package/dist/functions/files/commands/read.d.ts +19 -0
  237. package/dist/functions/files/commands/read.js +25 -0
  238. package/dist/functions/files/commands/read.js.map +1 -0
  239. package/dist/functions/files/commands/render.d.ts +89 -0
  240. package/dist/functions/files/commands/render.js +229 -0
  241. package/dist/functions/files/commands/render.js.map +1 -0
  242. package/dist/functions/files/commands/status.d.ts +23 -0
  243. package/dist/functions/files/commands/status.js +58 -0
  244. package/dist/functions/files/commands/status.js.map +1 -0
  245. package/dist/functions/files/commands/versions/copy.d.ts +8 -0
  246. package/dist/functions/files/commands/versions/copy.js +34 -0
  247. package/dist/functions/files/commands/versions/copy.js.map +1 -0
  248. package/dist/functions/files/commands/versions/delete.d.ts +7 -0
  249. package/dist/functions/files/commands/versions/delete.js +35 -0
  250. package/dist/functions/files/commands/versions/delete.js.map +1 -0
  251. package/dist/functions/files/commands/versions/list.d.ts +3 -0
  252. package/dist/functions/files/commands/versions/list.js +10 -0
  253. package/dist/functions/files/commands/versions/list.js.map +1 -0
  254. package/dist/functions/files/commands/write.d.ts +24 -0
  255. package/dist/functions/files/commands/write.js +36 -0
  256. package/dist/functions/files/commands/write.js.map +1 -0
  257. package/dist/functions/files/files-pull.d.ts +26 -2
  258. package/dist/functions/files/files-pull.js +100 -30
  259. package/dist/functions/files/files-pull.js.map +1 -1
  260. package/dist/functions/files/files-push.d.ts +3 -1
  261. package/dist/functions/files/files-push.js +64 -48
  262. package/dist/functions/files/files-push.js.map +1 -1
  263. package/dist/functions/files/helper/confirm.d.ts +5 -0
  264. package/dist/functions/files/helper/confirm.js +14 -0
  265. package/dist/functions/files/helper/confirm.js.map +1 -0
  266. package/dist/functions/files/helper/resolve-version.d.ts +5 -0
  267. package/dist/functions/files/helper/resolve-version.js +15 -0
  268. package/dist/functions/files/helper/resolve-version.js.map +1 -0
  269. package/dist/functions/files/sync/baseline-derive.d.ts +3 -0
  270. package/dist/functions/files/sync/baseline-derive.js +49 -0
  271. package/dist/functions/files/sync/baseline-derive.js.map +1 -0
  272. package/dist/functions/files/sync/diff.d.ts +9 -0
  273. package/dist/functions/files/sync/diff.js +80 -0
  274. package/dist/functions/files/sync/diff.js.map +1 -0
  275. package/dist/functions/files/sync/manifest.d.ts +12 -0
  276. package/dist/functions/files/sync/manifest.js +74 -0
  277. package/dist/functions/files/sync/manifest.js.map +1 -0
  278. package/dist/functions/files/sync/scope.d.ts +4 -0
  279. package/dist/functions/files/sync/scope.js +44 -0
  280. package/dist/functions/files/sync/scope.js.map +1 -0
  281. package/dist/functions/files/sync/state.d.ts +8 -0
  282. package/dist/functions/files/sync/state.js +74 -0
  283. package/dist/functions/files/sync/state.js.map +1 -0
  284. package/dist/functions/files/sync/transfer.d.ts +47 -0
  285. package/dist/functions/files/sync/transfer.js +132 -0
  286. package/dist/functions/files/sync/transfer.js.map +1 -0
  287. package/dist/functions/files/sync/types.d.ts +41 -0
  288. package/dist/functions/files/sync/types.js +3 -0
  289. package/dist/functions/files/sync/types.js.map +1 -0
  290. package/dist/functions/files/test-helpers.d.ts +13 -0
  291. package/dist/functions/files/test-helpers.js +34 -0
  292. package/dist/functions/files/test-helpers.js.map +1 -0
  293. package/dist/functions/generate/files/generate-code.d.ts +3 -1
  294. package/dist/functions/generate/files/generate-code.js +2 -0
  295. package/dist/functions/generate/files/generate-code.js.map +1 -1
  296. package/dist/functions/generate/files/generate-files.d.ts +12 -2
  297. package/dist/functions/generate/files/generate-files.js +155 -224
  298. package/dist/functions/generate/files/generate-files.js.map +1 -1
  299. package/dist/functions/generate/files/generate.helper.d.ts +2 -2
  300. package/dist/functions/generate/files/generate.helper.js +5 -7
  301. package/dist/functions/generate/files/generate.helper.js.map +1 -1
  302. package/dist/functions/generate/model-from-data/generate-model-from-data.d.ts +10 -0
  303. package/dist/functions/generate/model-from-data/generate-model-from-data.js +184 -0
  304. package/dist/functions/generate/model-from-data/generate-model-from-data.js.map +1 -0
  305. package/dist/functions/generate/model-from-data/infer-key.d.ts +19 -0
  306. package/dist/functions/generate/model-from-data/infer-key.js +54 -0
  307. package/dist/functions/generate/model-from-data/infer-key.js.map +1 -0
  308. package/dist/functions/generate/model-from-data/infer-to-model.d.ts +6 -0
  309. package/dist/functions/generate/model-from-data/infer-to-model.js +59 -0
  310. package/dist/functions/generate/model-from-data/infer-to-model.js.map +1 -0
  311. package/dist/functions/generate/projects/generate-project.d.ts +12 -1
  312. package/dist/functions/generate/projects/generate-project.js +338 -65
  313. package/dist/functions/generate/projects/generate-project.js.map +1 -1
  314. package/dist/functions/helper/api-client.d.ts +18 -0
  315. package/dist/functions/helper/api-client.js +88 -0
  316. package/dist/functions/helper/api-client.js.map +1 -0
  317. package/dist/functions/helper/config.helper.d.ts +16 -2
  318. package/dist/functions/helper/config.helper.js +25 -4
  319. package/dist/functions/helper/config.helper.js.map +1 -1
  320. package/dist/functions/helper/output.d.ts +9 -0
  321. package/dist/functions/helper/output.js +71 -0
  322. package/dist/functions/helper/output.js.map +1 -0
  323. package/dist/functions/helper/parse-fail.d.ts +11 -0
  324. package/dist/functions/helper/parse-fail.js +106 -0
  325. package/dist/functions/helper/parse-fail.js.map +1 -0
  326. package/dist/functions/schemas/command.d.ts +21 -0
  327. package/dist/functions/schemas/command.js +57 -0
  328. package/dist/functions/schemas/command.js.map +1 -0
  329. package/dist/functions/schemas/examples/AppLoaderConfiguration.example.json +18 -0
  330. package/dist/functions/schemas/examples/DataMapperStepConfig.example.json +1 -0
  331. package/dist/functions/schemas/examples/ModelDefinition.example.json +21 -0
  332. package/dist/functions/schemas/examples/RequestStepConfig.example.json +1 -0
  333. package/dist/functions/schemas/examples/ResponseScriptConfig.example.json +1 -0
  334. package/dist/functions/schemas/examples/ScriptStepConfig.example.json +1 -0
  335. package/dist/functions/schemas/examples/TemplateV3.example.json +62 -0
  336. package/dist/functions/schemas/examples/TriggerRequestConfig.example.json +1 -0
  337. package/dist/functions/schemas/examples/WorkflowConfigV3.example.json +53 -0
  338. package/dist/functions/schemas/extract.d.ts +2 -0
  339. package/dist/functions/schemas/extract.js +68 -0
  340. package/dist/functions/schemas/extract.js.map +1 -0
  341. package/dist/functions/schemas/format.d.ts +8 -0
  342. package/dist/functions/schemas/format.js +53 -0
  343. package/dist/functions/schemas/format.js.map +1 -0
  344. package/dist/functions/schemas/registry.d.ts +15 -0
  345. package/dist/functions/schemas/registry.js +179 -0
  346. package/dist/functions/schemas/registry.js.map +1 -0
  347. package/dist/functions/schemas/resolve.d.ts +10 -0
  348. package/dist/functions/schemas/resolve.js +28 -0
  349. package/dist/functions/schemas/resolve.js.map +1 -0
  350. package/dist/functions/serve/commands/list.d.ts +9 -0
  351. package/dist/functions/serve/commands/list.js +44 -0
  352. package/dist/functions/serve/commands/list.js.map +1 -0
  353. package/dist/functions/serve/commands/stop.d.ts +11 -0
  354. package/dist/functions/serve/commands/stop.js +34 -0
  355. package/dist/functions/serve/commands/stop.js.map +1 -0
  356. package/dist/functions/serve/dev-server/dev-server.controller.d.ts +12 -8
  357. package/dist/functions/serve/dev-server/dev-server.controller.js +20 -10
  358. package/dist/functions/serve/dev-server/dev-server.controller.js.map +1 -1
  359. package/dist/functions/serve/dev-server/dev-server.module.js +2 -2
  360. package/dist/functions/serve/dev-server/dev-server.module.js.map +1 -1
  361. package/dist/functions/serve/dev-server/dev-server.service.d.ts +9 -7
  362. package/dist/functions/serve/dev-server/dev-server.service.js +35 -23
  363. package/dist/functions/serve/dev-server/dev-server.service.js.map +1 -1
  364. package/dist/functions/serve/main.d.ts +1 -0
  365. package/dist/functions/serve/main.js +37 -15
  366. package/dist/functions/serve/main.js.map +1 -1
  367. package/dist/functions/serve/serve-self-register.d.ts +9 -0
  368. package/dist/functions/serve/serve-self-register.js +30 -0
  369. package/dist/functions/serve/serve-self-register.js.map +1 -0
  370. package/dist/functions/testing/testing-helper.d.ts +1 -1
  371. package/dist/functions/testing/testing-helper.js.map +1 -1
  372. package/dist/functions/testing/testing.d.ts +2 -1
  373. package/dist/functions/testing/testing.js +7 -6
  374. package/dist/functions/testing/testing.js.map +1 -1
  375. package/dist/functions/version/command.d.ts +17 -0
  376. package/dist/functions/version/command.js +54 -0
  377. package/dist/functions/version/command.js.map +1 -0
  378. package/dist/functions/welcome.js.map +1 -1
  379. package/dist/functions/workflow/commands/deploy.d.ts +29 -0
  380. package/dist/functions/workflow/commands/deploy.js +54 -0
  381. package/dist/functions/workflow/commands/deploy.js.map +1 -0
  382. package/dist/functions/workflow/commands/get.d.ts +10 -0
  383. package/dist/functions/workflow/commands/get.js +10 -0
  384. package/dist/functions/workflow/commands/get.js.map +1 -0
  385. package/dist/functions/workflow/commands/history.d.ts +10 -0
  386. package/dist/functions/workflow/commands/history.js +25 -0
  387. package/dist/functions/workflow/commands/history.js.map +1 -0
  388. package/dist/functions/workflow/commands/list.d.ts +7 -0
  389. package/dist/functions/workflow/commands/list.js +11 -0
  390. package/dist/functions/workflow/commands/list.js.map +1 -0
  391. package/dist/functions/workflow/commands/runners-get.d.ts +10 -0
  392. package/dist/functions/workflow/commands/runners-get.js +10 -0
  393. package/dist/functions/workflow/commands/runners-get.js.map +1 -0
  394. package/dist/functions/workflow/commands/runners.d.ts +7 -0
  395. package/dist/functions/workflow/commands/runners.js +11 -0
  396. package/dist/functions/workflow/commands/runners.js.map +1 -0
  397. package/dist/functions/workflow/commands/status.d.ts +10 -0
  398. package/dist/functions/workflow/commands/status.js +10 -0
  399. package/dist/functions/workflow/commands/status.js.map +1 -0
  400. package/dist/functions/workflow/commands/template.d.ts +9 -0
  401. package/dist/functions/workflow/commands/template.js +10 -0
  402. package/dist/functions/workflow/commands/template.js.map +1 -0
  403. package/dist/functions/workflow/commands/test.d.ts +36 -0
  404. package/dist/functions/workflow/commands/test.js +158 -0
  405. package/dist/functions/workflow/commands/test.js.map +1 -0
  406. package/dist/functions/workflow/commands/trace.d.ts +11 -0
  407. package/dist/functions/workflow/commands/trace.js +24 -0
  408. package/dist/functions/workflow/commands/trace.js.map +1 -0
  409. package/dist/functions/workflow/commands/undeploy.d.ts +13 -0
  410. package/dist/functions/workflow/commands/undeploy.js +17 -0
  411. package/dist/functions/workflow/commands/undeploy.js.map +1 -0
  412. package/dist/functions/workflow/commands/validate.d.ts +18 -0
  413. package/dist/functions/workflow/commands/validate.js +35 -0
  414. package/dist/functions/workflow/commands/validate.js.map +1 -0
  415. package/dist/functions/workflow/template-io.d.ts +2 -0
  416. package/dist/functions/workflow/template-io.js +25 -0
  417. package/dist/functions/workflow/template-io.js.map +1 -0
  418. package/dist/functions/workflow/trace.d.ts +20 -0
  419. package/dist/functions/workflow/trace.js +82 -0
  420. package/dist/functions/workflow/trace.js.map +1 -0
  421. package/dist/functions/workflow/types.d.ts +27 -0
  422. package/dist/functions/workflow/types.js +3 -0
  423. package/dist/functions/workflow/types.js.map +1 -0
  424. package/dist/functions/workflow/validate.d.ts +2 -0
  425. package/dist/functions/workflow/validate.js +37 -0
  426. package/dist/functions/workflow/validate.js.map +1 -0
  427. package/dist/functions/workflow/wait-for-swap.d.ts +27 -0
  428. package/dist/functions/workflow/wait-for-swap.js +33 -0
  429. package/dist/functions/workflow/wait-for-swap.js.map +1 -0
  430. package/dist/functions/workflow/workflow-api.d.ts +27 -0
  431. package/dist/functions/workflow/workflow-api.js +68 -0
  432. package/dist/functions/workflow/workflow-api.js.map +1 -0
  433. package/dist/index.js +9 -102
  434. package/dist/index.js.map +1 -1
  435. package/files/common/dcupl.config.json +3 -2
  436. package/files/common/readme.md +5 -2
  437. package/files/dev-server/index.html +108 -14
  438. package/files/starters/starter_empty/dcupl/api/.gitkeep +0 -0
  439. package/files/starters/starter_empty/dcupl/data/.gitkeep +0 -0
  440. package/files/starters/starter_empty/dcupl/dcupl.lc.json +10 -0
  441. package/files/starters/starter_empty/dcupl/models/.gitkeep +0 -0
  442. package/files/starters/starter_empty/dcupl/workflows/.gitkeep +0 -0
  443. package/files/starters/starter_empty/dcupl.config.json +11 -0
  444. package/files/starters/starter_empty/package.json +14 -0
  445. package/package.json +60 -36
  446. package/dist/functions/files/files-copy.d.ts +0 -5
  447. package/dist/functions/files/files-copy.js +0 -43
  448. package/dist/functions/files/files-copy.js.map +0 -1
  449. package/dist/functions/files/files-list-versions.d.ts +0 -2
  450. package/dist/functions/files/files-list-versions.js +0 -39
  451. package/dist/functions/files/files-list-versions.js.map +0 -1
  452. package/dist/functions/start-dcupl/start-dcupl.d.ts +0 -7
  453. package/dist/functions/start-dcupl/start-dcupl.js +0 -51
  454. package/dist/functions/start-dcupl/start-dcupl.js.map +0 -1
  455. package/dist/functions/testing/tests/generated-completeness.spec.d.ts +0 -1
  456. package/dist/functions/testing/tests/generated-completeness.spec.js +0 -143
  457. package/dist/functions/testing/tests/generated-completeness.spec.js.map +0 -1
  458. package/dist/functions/testing/tests/model_tests.spec.d.ts +0 -1
  459. package/dist/functions/testing/tests/model_tests.spec.js +0 -92
  460. package/dist/functions/testing/tests/model_tests.spec.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getTestingConfigFileValue = exports.getSecretFileValue = exports.getConfigFileValue = exports.CLI_DEFAULTS = exports.defaultDcuplCliConfig = void 0;
3
+ exports.getTestingConfigFileValue = exports.getSecretFileState = exports.getSecretFileValue = exports.setConfigFileValue = exports.getConfigFileValue = exports.CLI_DEFAULTS = exports.defaultDcuplCliConfig = void 0;
4
4
  const fs_extra_1 = require("fs-extra");
5
5
  const path_1 = require("path");
6
6
  const comment_json_1 = require("comment-json");
@@ -32,10 +32,12 @@ exports.CLI_DEFAULTS = {
32
32
  loaderConfigFileName: 'dcupl.lc.json',
33
33
  customTestEnding: '.spec.js',
34
34
  };
35
- const getConfigFileValue = (currentBasePath, configFileName = exports.CLI_DEFAULTS.configFileName) => {
35
+ const getConfigFileValue = (currentBasePath, configFileName = exports.CLI_DEFAULTS.configFileName, options = {}) => {
36
36
  const configFilePath = (0, path_1.join)(currentBasePath, configFileName);
37
37
  if (!(0, fs_extra_1.existsSync)(configFilePath)) {
38
- console.log(`Error: ${configFileName} not found`);
38
+ if (!options.quiet) {
39
+ console.log(`Error: ${configFileName} not found`);
40
+ }
39
41
  return null;
40
42
  }
41
43
  const configFileAsString = (0, fs_extra_1.readFileSync)(configFilePath, { encoding: 'utf-8' });
@@ -43,6 +45,12 @@ const getConfigFileValue = (currentBasePath, configFileName = exports.CLI_DEFAUL
43
45
  return configFile;
44
46
  };
45
47
  exports.getConfigFileValue = getConfigFileValue;
48
+ const setConfigFileValue = (currentBasePath, config, configFileName = exports.CLI_DEFAULTS.configFileName) => {
49
+ const configFilePath = (0, path_1.join)(currentBasePath, configFileName);
50
+ const configAsString = (0, comment_json_1.stringify)(config, null, 2);
51
+ (0, fs_extra_1.writeFileSync)(configFilePath, configAsString, { encoding: 'utf-8' });
52
+ };
53
+ exports.setConfigFileValue = setConfigFileValue;
46
54
  const getSecretFileValue = (currentBasePath, secretsFileName = exports.CLI_DEFAULTS.secretsFileName) => {
47
55
  const secretsFilePath = (0, path_1.join)(currentBasePath, secretsFileName);
48
56
  if (!(0, fs_extra_1.existsSync)(secretsFilePath)) {
@@ -57,9 +65,22 @@ const getSecretFileValue = (currentBasePath, secretsFileName = exports.CLI_DEFAU
57
65
  return secretsFile;
58
66
  };
59
67
  exports.getSecretFileValue = getSecretFileValue;
68
+ const getSecretFileState = (currentBasePath, secretsFileName = exports.CLI_DEFAULTS.secretsFileName) => {
69
+ const secretsFilePath = (0, path_1.join)(currentBasePath, secretsFileName);
70
+ if (!(0, fs_extra_1.existsSync)(secretsFilePath)) {
71
+ return { kind: 'missing-file' };
72
+ }
73
+ const raw = JSON.parse((0, fs_extra_1.readFileSync)(secretsFilePath, { encoding: 'utf-8' }));
74
+ const apiKey = raw.apiKey;
75
+ if (typeof apiKey !== 'string' || apiKey.length === 0) {
76
+ return { kind: 'missing-key', raw };
77
+ }
78
+ return { kind: 'ok', apiKey };
79
+ };
80
+ exports.getSecretFileState = getSecretFileState;
60
81
  const getTestingConfigFileValue = (currentBasePath, testConfigFileName = exports.CLI_DEFAULTS.testingConfigFileName) => {
61
82
  const cliConfig = (0, exports.getConfigFileValue)(currentBasePath);
62
- const testFolderName = cliConfig?.testing?.testConfigs || exports.defaultDcuplCliConfig.testing?.testConfigs;
83
+ const testFolderName = cliConfig?.testing?.testConfigs || exports.defaultDcuplCliConfig.testing.testConfigs;
63
84
  const testConfigFilePath = (0, path_1.join)(currentBasePath, testFolderName, testConfigFileName);
64
85
  if (!(0, fs_extra_1.existsSync)(testConfigFilePath)) {
65
86
  console.log(`Error: ${testConfigFileName} not found`);
@@ -1 +1 @@
1
- {"version":3,"file":"config.helper.js","sourceRoot":"","sources":["../../../src/functions/helper/config.helper.ts"],"names":[],"mappings":";;;AAAA,uCAAoD;AACpD,+BAA4B;AAC5B,+CAAqC;AA4BxB,QAAA,qBAAqB,GAAmB;IACnD,SAAS,EAAE,EAAE;IACb,UAAU,EAAE,qBAAqB;IACjC,cAAc,EAAE,cAAc;IAC9B,YAAY,EAAE,YAAY;IAC1B,UAAU,EAAE,OAAO;IACnB,mBAAmB,EAAE,oBAAoB;IACzC,eAAe,EAAE,eAAe;IAChC,gBAAgB,EAAE,iBAAiB;IACnC,aAAa,EAAE,2BAA2B;IAC1C,OAAO,EAAE;QACP,UAAU,EAAE,YAAY;QACxB,WAAW,EAAE,mBAAmB;QAChC,WAAW,EAAE,oBAAoB;KAClC;IACD,WAAW,EAAE;QACX,OAAO,EAAE,CAAC,WAAW,EAAE,UAAU,CAAC;QAClC,OAAO,EAAE,EAAE;KACZ;CACF,CAAC;AAEW,QAAA,YAAY,GAAG;IAC1B,cAAc,EAAE,mBAAmB;IACnC,eAAe,EAAE,oBAAoB;IACrC,qBAAqB,EAAE,wBAAwB;IAC/C,qBAAqB,EAAE,iCAAiC;IACxD,oBAAoB,EAAE,eAAe;IACrC,gBAAgB,EAAE,UAAU;CAC7B,CAAC;AAMK,MAAM,kBAA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BAwBpC"}
@@ -0,0 +1,9 @@
1
+ export interface Output {
2
+ success<T>(data: T, renderer?: (v: T) => string): void;
3
+ error(message: string, code: string): void;
4
+ warn(message: string): void;
5
+ table(data: any[], columns?: string[]): void;
6
+ isJson(): boolean;
7
+ }
8
+ export declare function createOutput(json: boolean): Output;
9
+ export declare function createSilentOutput(): Output;
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createOutput = createOutput;
4
+ exports.createSilentOutput = createSilentOutput;
5
+ function writeLine(s) {
6
+ process.stdout.write(`${s}\n`);
7
+ }
8
+ function createOutput(json) {
9
+ return {
10
+ isJson() {
11
+ return json;
12
+ },
13
+ success(data, renderer) {
14
+ if (json) {
15
+ writeLine(JSON.stringify(data));
16
+ return;
17
+ }
18
+ if (renderer) {
19
+ writeLine(renderer(data));
20
+ return;
21
+ }
22
+ if (typeof data === 'string') {
23
+ writeLine(data);
24
+ return;
25
+ }
26
+ if (Array.isArray(data) && data.length > 0 && data.every((row) => row && typeof row === 'object' && !Array.isArray(row))) {
27
+ console.table(data);
28
+ return;
29
+ }
30
+ writeLine(JSON.stringify(data, null, 2));
31
+ },
32
+ warn(message) {
33
+ if (json)
34
+ return;
35
+ process.stderr.write(`${message}\n`);
36
+ },
37
+ error(message, code) {
38
+ const text = (message ?? '').trim() || (code ?? '').trim() || 'Unknown error';
39
+ if (json) {
40
+ writeLine(JSON.stringify({ error: text, code: (code ?? '').trim() || 'UNKNOWN' }));
41
+ }
42
+ else {
43
+ writeLine(`Error: ${text}`);
44
+ }
45
+ process.exit(1);
46
+ },
47
+ table(data, columns) {
48
+ if (json) {
49
+ writeLine(JSON.stringify(data));
50
+ }
51
+ else {
52
+ if (columns) {
53
+ console.table(data, columns);
54
+ }
55
+ else {
56
+ console.table(data);
57
+ }
58
+ }
59
+ },
60
+ };
61
+ }
62
+ function createSilentOutput() {
63
+ return {
64
+ isJson: () => false,
65
+ success: () => { },
66
+ warn: () => { },
67
+ table: () => { },
68
+ error: () => { },
69
+ };
70
+ }
71
+ //# sourceMappingURL=output.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"output.js","sourceRoot":"","sources":["../../../src/functions/helper/output.ts"],"names":[],"mappings":";;AAeA,oCA4DC;AAQD,gDAQC;AAhFD,SAAS,SAAS,CAAC,CAAS;IAC1B,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AACjC,CAAC;AAED,SAAgB,YAAY,CAAC,IAAa;IACxC,OAAO;QACL,MAAM;YACJ,OAAO,IAAI,CAAC;QACd,CAAC;QAED,OAAO,CAAI,IAAO,EAAE,QAA2B;YAC7C,IAAI,IAAI,EAAE,CAAC;gBACT,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;gBAChC,OAAO;YACT,CAAC;YACD,IAAI,QAAQ,EAAE,CAAC;gBACb,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;gBAC1B,OAAO;YACT,CAAC;YACD,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;gBAC7B,SAAS,CAAC,IAAI,CAAC,CAAC;gBAChB,OAAO;YACT,CAAC;YAED,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;gBACzH,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;gBACpB,OAAO;YACT,CAAC;YACD,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QAC3C,CAAC;QAED,IAAI,CAAC,OAAe;YAElB,IAAI,IAAI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,EAAE,GAAE,CAAC;KACtB,CAAC;AACJ,CAAC"}
@@ -0,0 +1,11 @@
1
+ export declare function levenshtein(a: string, b: string): number;
2
+ export declare function suggestClosest(unknown: string, candidates: string[]): string | undefined;
3
+ export declare function suggestOption(unknown: string, knownKeys: string[]): string | undefined;
4
+ export interface ParseFailure {
5
+ message: string;
6
+ hint: string;
7
+ code: 'UNKNOWN_OPTION' | 'PARSE_ERROR';
8
+ showHelp: boolean;
9
+ }
10
+ export declare function formatParseFailure(msg: string, rawArgs: string[], knownKeys: string[], commandNames?: string[]): ParseFailure;
11
+ export declare function handleParseFailure(msg: string | null | undefined, err: Error | undefined, y: unknown, rawArgs: string[], exit?: (code: number) => never): void;
@@ -0,0 +1,106 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.levenshtein = levenshtein;
4
+ exports.suggestClosest = suggestClosest;
5
+ exports.suggestOption = suggestOption;
6
+ exports.formatParseFailure = formatParseFailure;
7
+ exports.handleParseFailure = handleParseFailure;
8
+ const output_1 = require("./output");
9
+ const INTERNAL_KEYS = new Set(['_', '$0', '--']);
10
+ function levenshtein(a, b) {
11
+ const dp = Array.from({ length: b.length + 1 }, (_, j) => j);
12
+ for (let i = 1; i <= a.length; i++) {
13
+ let prev = dp[0];
14
+ dp[0] = i;
15
+ for (let j = 1; j <= b.length; j++) {
16
+ const tmp = dp[j];
17
+ dp[j] = Math.min(dp[j] + 1, dp[j - 1] + 1, prev + (a[i - 1] === b[j - 1] ? 0 : 1));
18
+ prev = tmp;
19
+ }
20
+ }
21
+ return dp[b.length];
22
+ }
23
+ function suggestClosest(unknown, candidates) {
24
+ let best;
25
+ let bestDist = Infinity;
26
+ for (const c of candidates) {
27
+ const d = levenshtein(unknown.toLowerCase(), c.toLowerCase());
28
+ if (d < bestDist) {
29
+ bestDist = d;
30
+ best = c;
31
+ }
32
+ }
33
+ if (best === undefined)
34
+ return undefined;
35
+ const threshold = Math.min(3, Math.max(1, Math.floor(unknown.length / 2)));
36
+ return bestDist <= threshold ? best : undefined;
37
+ }
38
+ function suggestOption(unknown, knownKeys) {
39
+ const candidates = knownKeys.filter((k) => !INTERNAL_KEYS.has(k) && !/[A-Z]/.test(k));
40
+ return suggestClosest(unknown, candidates);
41
+ }
42
+ function toKebab(key) {
43
+ return key.replace(/[A-Z]/g, (c) => `-${c.toLowerCase()}`);
44
+ }
45
+ function wasPassedAsFlag(token, kebab, rawArgs) {
46
+ return rawArgs.some((a) => a === `--${token}` ||
47
+ a === `--${kebab}` ||
48
+ a.startsWith(`--${token}=`) ||
49
+ a.startsWith(`--${kebab}=`) ||
50
+ a === `--no-${token}` ||
51
+ a === `--no-${kebab}`);
52
+ }
53
+ function formatParseFailure(msg, rawArgs, knownKeys, commandNames = []) {
54
+ const commandPath = [];
55
+ for (const a of rawArgs) {
56
+ if (a.startsWith('-'))
57
+ break;
58
+ commandPath.push(a);
59
+ }
60
+ const hint = `Run 'dcupl${commandPath.length ? ` ${commandPath.join(' ')}` : ''} --help' for usage.`;
61
+ const unknownMatch = msg.match(/^Unknown arguments?: (.+)$/);
62
+ if (unknownMatch) {
63
+ const parts = unknownMatch[1].split(',').map((t) => t.trim()).map((token) => {
64
+ const kebab = toKebab(token);
65
+ if (!wasPassedAsFlag(token, kebab, rawArgs)) {
66
+ if (token === rawArgs[0] && !token.startsWith('-')) {
67
+ const suggestion = suggestClosest(token, commandNames);
68
+ if (suggestion)
69
+ return `Unknown argument: ${token}. Did you mean '${suggestion}'?`;
70
+ }
71
+ return `Unknown argument: ${token}`;
72
+ }
73
+ const wasNo = rawArgs.some((a) => a === `--no-${token}` || a === `--no-${kebab}`);
74
+ const displayFlag = wasNo ? `--no-${kebab}` : `--${kebab}`;
75
+ const suggestion = suggestOption(kebab, knownKeys);
76
+ return `Unknown option: ${displayFlag}${suggestion ? `. Did you mean --${suggestion}?` : ''}`;
77
+ });
78
+ return { message: parts.join('\n'), hint, code: 'UNKNOWN_OPTION', showHelp: false };
79
+ }
80
+ if (/^Did you mean/.test(msg)) {
81
+ return { message: msg, hint, code: 'UNKNOWN_OPTION', showHelp: false };
82
+ }
83
+ const isDemandCommand = /Not enough non-option arguments/.test(msg) || /Please specify a command/.test(msg);
84
+ return { message: msg, hint, code: 'PARSE_ERROR', showHelp: isDemandCommand };
85
+ }
86
+ function handleParseFailure(msg, err, y, rawArgs, exit = process.exit) {
87
+ if (!msg) {
88
+ if (err) {
89
+ (0, output_1.createOutput)(rawArgs.includes('--json')).error(err.message || String(err), err.code || 'COMMAND_FAILED');
90
+ }
91
+ exit(1);
92
+ return;
93
+ }
94
+ const json = rawArgs.includes('--json');
95
+ const instance = y;
96
+ const knownKeys = Object.keys(instance.getOptions?.().key ?? {});
97
+ const commandNames = instance.getInternalMethods?.().getCommandInstance?.().getCommands?.() ?? [];
98
+ const failure = formatParseFailure(msg, rawArgs, knownKeys, commandNames);
99
+ const output = (0, output_1.createOutput)(json);
100
+ if (!json && failure.showHelp)
101
+ instance.showHelp?.();
102
+ const text = json || failure.showHelp ? failure.message : `${failure.message}\n${failure.hint}`;
103
+ output.error(text, failure.code);
104
+ exit(1);
105
+ }
106
+ //# sourceMappingURL=parse-fail.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parse-fail.js","sourceRoot":"","sources":["../../../src/functions/helper/parse-fail.ts"],"names":[],"mappings":";;AAIA,kCAYC;AAED,wCAiBC;AAED,sCAKC;AAyBD,gDA2CC;AAED,gDAkCC;AAlJD,qCAAwC;AAExC,MAAM,aAAa,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;AAEjD,SAAgB,WAAW,CAAC,CAAS,EAAE,CAAS;IAC9C,MAAM,EAAE,GAAa,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;IACvE,K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AgB,CAAC,CAAC;QAClI,CAAC;QACD,IAAI,CAAC,CAAC,CAAC,CAAC;QACR,OAAO;IACT,CAAC;IACD,MAAM,IAAI,GAAG,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACxC,MAAM,QAAQ,GAAG,CAIhB,CAAC;IACF,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC;IAGjE,MAAM,YAAY,GAAG,QAAQ,CAAC,kBAAkB,EAAE,EAAE,CAAC,kBAAkB,EAAE,EAAE,CAAC,WAAW,EAAE,EAAE,IAAI,EAAE,CAAC;IAClG,MAAM,OAAO,GAAG,kBAAkB,CAAC,GAAG,EAAE,OAAO,EAAE,SAAS,EAAE,YAAY,CAAC,CAAC;IAC1E,MAAM,MAAM,GAAG,IAAA,qBAAY,EAAC,IAAI,CAAC,CAAC;IAClC,IAAI,CAAC,IAAI,IAAI,OAAO,CAAC,QAAQ;QAAE,QAAQ,CAAC,QAAQ,EAAE,EAAE,CAAC;IACrD,MAAM,IAAI,GAAG,IAAI,IAAI,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,OAAO,KAAK,OAAO,CAAC,IAAI,EAAE,CAAC;IAChG,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjC,IAAI,CAAC,CAAC,CAAC,CAAC;AACV,CAAC"}
@@ -0,0 +1,21 @@
1
+ import type { Output } from '../helper/output.js';
2
+ import type { SchemaEntry } from './registry.js';
3
+ export type SchemasListArgv = {
4
+ json?: boolean;
5
+ };
6
+ export type SchemasListDeps = {
7
+ loadEntries?: () => SchemaEntry[];
8
+ };
9
+ export declare function schemasListCommand(argv: SchemasListArgv, output: Output, deps?: SchemasListDeps): void;
10
+ export type SchemasGetArgv = {
11
+ name: string;
12
+ json?: boolean;
13
+ example?: boolean;
14
+ };
15
+ export type SchemasGetDeps = {
16
+ findEntry?: (name: string) => SchemaEntry | undefined;
17
+ resolvePath?: (entry: SchemaEntry) => string;
18
+ extract?: (entry: SchemaEntry, filePath: string) => string;
19
+ readExample?: (entry: SchemaEntry) => string | undefined;
20
+ };
21
+ export declare function schemasGetCommand(argv: SchemasGetArgv, output: Output, deps?: SchemasGetDeps): void;
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.schemasListCommand = schemasListCommand;
4
+ exports.schemasGetCommand = schemasGetCommand;
5
+ const tslib_1 = require("tslib");
6
+ const fs = tslib_1.__importStar(require("fs"));
7
+ const path = tslib_1.__importStar(require("path"));
8
+ const registry_js_1 = require("./registry.js");
9
+ const format_js_1 = require("./format.js");
10
+ const resolve_js_1 = require("./resolve.js");
11
+ const extract_js_1 = require("./extract.js");
12
+ function schemasListCommand(argv, output, deps = {}) {
13
+ const load = deps.loadEntries ?? (() => registry_js_1.SCHEMA_REGISTRY);
14
+ const entries = load();
15
+ const mode = argv.json ? 'json' : 'text';
16
+ output.success((0, format_js_1.formatList)(entries, { mode }));
17
+ }
18
+ function defaultExamplesDir() {
19
+ const compiled = path.join(__dirname, 'examples');
20
+ if (fs.existsSync(compiled))
21
+ return compiled;
22
+ const repoRoot = path.resolve(__dirname, '..', '..', '..');
23
+ return path.join(repoRoot, 'src', 'functions', 'schemas', 'examples');
24
+ }
25
+ function defaultReadExample(entry) {
26
+ if (!entry.exampleFile)
27
+ return undefined;
28
+ const dir = defaultExamplesDir();
29
+ const p = path.join(dir, entry.exampleFile);
30
+ if (!fs.existsSync(p))
31
+ return undefined;
32
+ return fs.readFileSync(p, 'utf-8').trim();
33
+ }
34
+ function schemasGetCommand(argv, output, deps = {}) {
35
+ const find = deps.findEntry ?? registry_js_1.findSchema;
36
+ const resolve = deps.resolvePath ?? ((e) => (0, resolve_js_1.resolveSchemaSource)(e).path);
37
+ const extract = deps.extract ?? extract_js_1.extractSchema;
38
+ const readExample = deps.readExample ?? defaultReadExample;
39
+ const entry = find(argv.name);
40
+ if (!entry) {
41
+ output.error(`Schema '${argv.name}' is not registered. Run 'dcupl schemas list' to see available schemas.`, 'SCHEMA_NOT_FOUND');
42
+ return;
43
+ }
44
+ let source;
45
+ try {
46
+ const filePath = resolve(entry);
47
+ source = extract(entry, filePath);
48
+ }
49
+ catch (err) {
50
+ output.error(err?.message ?? String(err), 'SCHEMA_EXTRACTION_FAILED');
51
+ return;
52
+ }
53
+ const example = argv.example ? readExample(entry) : undefined;
54
+ const mode = argv.json ? 'json' : 'text';
55
+ output.success((0, format_js_1.formatGet)(entry, source, example, { mode }));
56
+ }
57
+ //# sourceMappingURL=command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command.js","sourceRoot":"","sources":["../../../src/functions/schemas/command.ts"],"names":[],"mappings":";;AAeA,gDASC;AA6BD,8CAgCC;;AArFD,+CAAyB;AACzB,mDAA6B;AAE7B,+CAA4D;AAE5D,2CAAoD;AACpD,6CAAmD;AACnD,6CAA6C;AAQ7C,SAAgB,kBAAkB,CAChC,IAAqB,EACrB,MAAc,EACd,OAAwB,EAAE;IAE1B,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,IAAI,CAAC,GAAkB,EAAE,CAAC,6BAAe,CAAC,CAAC;IACxE,MAAM,OAAO,GAAG,IAAI,EAAE,CAAC;IACvB,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;IACzC,MAAM,CAAC,OAAO,CAAC,IAAA,sBAAU,EAAC,OAAO,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;AAChD,CAAC;AAWD,SAAS,kBAAkB;IAIzB,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IAClD,IAAI,EAAE,CAAC,UAAU,CA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AC7F,kBAAkB,CACnB,CAAC;QACF,OAAO;IACT,CAAC;IAED,IAAI,MAAc,CAAC;IACnB,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;QAChC,MAAM,GAAG,OAAO,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IACpC,CAAC;IAAC,OAAO,GAAQ,EAAE,CAAC;QAClB,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,OAAO,IAAI,MAAM,CAAC,GAAG,CAAC,EAAE,0BAA0B,CAAC,CAAC;QACtE,OAAO;IACT,CAAC;IAED,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAC9D,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;IACzC,MAAM,CAAC,OAAO,CAAC,IAAA,qBAAS,EAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;AAC9D,CAAC"}
@@ -0,0 +1,18 @@
1
+ {
2
+ "resources": [
3
+ { "type": "model", "key": "Product", "url": "models/product.model.json" },
4
+ { "type": "model", "key": "Category", "url": "models/category.model.json" },
5
+ { "type": "data", "key": "products", "model": "Product", "url": "data/products.csv" },
6
+ { "type": "data", "key": "categories", "model": "Category", "url": "data/categories.json" }
7
+ ],
8
+ "environments": [
9
+ { "key": "default", "variables": [] },
10
+ { "key": "staging", "variables": [{ "key": "API_URL", "value": "https://staging.example.com" }] }
11
+ ],
12
+ "applications": [
13
+ { "key": "catalog", "name": "Product Catalog", "resourceTags": [] }
14
+ ],
15
+ "options": {
16
+ "missingModelHandling": {}
17
+ }
18
+ }
@@ -0,0 +1 @@
1
+ { "mappings": [{ "origin": "customer.name", "target": "customerName" }, { "origin": "total", "target": "amount" }] }
@@ -0,0 +1,21 @@
1
+ {
2
+ "key": "Product",
3
+ "properties": [
4
+ { "key": "id", "type": "string" },
5
+ { "key": "name", "type": "string" },
6
+ { "key": "price", "type": "float" },
7
+ { "key": "tags", "type": "Array<string>" },
8
+ { "key": "createdAt", "type": "date" }
9
+ ],
10
+ "references": [
11
+ {
12
+ "key": "category",
13
+ "type": "singleValued",
14
+ "model": "Category",
15
+ "origin": "categoryId"
16
+ }
17
+ ],
18
+ "data": [
19
+ { "id": "p1", "name": "Widget", "price": 9.99, "tags": ["new"], "createdAt": "2026-01-15T00:00:00Z", "categoryId": "c1" }
20
+ ]
21
+ }
@@ -0,0 +1 @@
1
+ { "url": "https://api.example.com/orders", "method": "GET", "autoParse": true }
@@ -0,0 +1 @@
1
+ { "script": "return { status: 200, body: { ok: true, count: $items().length } };" }
@@ -0,0 +1 @@
1
+ { "script": "// $items(): NodeExecutionData[] arriving on the 'main' port\nreturn $items().map((i) => ({ json: { ...i.json, processed: true } }));" }
@@ -0,0 +1,62 @@
1
+ {
2
+ "key": "import-products",
3
+ "name": "Import Products",
4
+ "description": "Fetch products from an upstream API and map them into the Product model.",
5
+ "version": "1.0.0",
6
+ "variables": [
7
+ { "name": "apiUrl", "value": "https://api.example.com/products", "description": "Upstream API endpoint" }
8
+ ],
9
+ "config": {
10
+ "version": "3",
11
+ "nodes": [
12
+ {
13
+ "id": "trigger",
14
+ "name": "On request",
15
+ "nodeClass": "trigger",
16
+ "type": "trigger-request",
17
+ "inputs": [],
18
+ "outputs": [{ "type": "main" }],
19
+ "config": { "path": "/import-products", "methods": ["POST"] }
20
+ },
21
+ {
22
+ "id": "fetch",
23
+ "name": "Fetch products",
24
+ "nodeClass": "step",
25
+ "type": "request",
26
+ "inputs": [{ "type": "main" }],
27
+ "outputs": [{ "type": "main" }, { "type": "error" }],
28
+ "config": { "url": "{{ variables.apiUrl }}", "method": "GET" }
29
+ },
30
+ {
31
+ "id": "map",
32
+ "name": "Map to Product",
33
+ "nodeClass": "step",
34
+ "type": "data-mapper",
35
+ "inputs": [{ "type": "main" }],
36
+ "outputs": [{ "type": "main" }, { "type": "error" }],
37
+ "config": {
38
+ "model": "Product",
39
+ "mappings": [
40
+ { "origin": "id", "target": "id" },
41
+ { "origin": "title", "target": "name" },
42
+ { "origin": "price", "target": "price" }
43
+ ]
44
+ }
45
+ },
46
+ {
47
+ "id": "respond",
48
+ "name": "Respond",
49
+ "nodeClass": "response",
50
+ "type": "response-script",
51
+ "inputs": [{ "type": "main" }],
52
+ "outputs": [],
53
+ "config": { "script": "return { ok: true, count: $items().length }" }
54
+ }
55
+ ],
56
+ "edges": [
57
+ { "id": "e1", "source": { "nodeId": "trigger", "port": "main" }, "target": { "nodeId": "fetch", "port": "main" } },
58
+ { "id": "e2", "source": { "nodeId": "fetch", "port": "main" }, "target": { "nodeId": "map", "port": "main" } },
59
+ { "id": "e3", "source": { "nodeId": "map", "port": "main" }, "target": { "nodeId": "respond", "port": "main" } }
60
+ ]
61
+ }
62
+ }
@@ -0,0 +1 @@
1
+ { "path": "/orders", "methods": ["POST"] }
@@ -0,0 +1,53 @@
1
+ {
2
+ "version": "3",
3
+ "nodes": [
4
+ {
5
+ "id": "trigger",
6
+ "name": "On request",
7
+ "nodeClass": "trigger",
8
+ "type": "trigger-request",
9
+ "inputs": [],
10
+ "outputs": [{ "type": "main" }],
11
+ "config": { "path": "/import-products", "methods": ["POST"] }
12
+ },
13
+ {
14
+ "id": "fetch",
15
+ "name": "Fetch products",
16
+ "nodeClass": "step",
17
+ "type": "request",
18
+ "inputs": [{ "type": "main" }],
19
+ "outputs": [{ "type": "main" }, { "type": "error" }],
20
+ "config": { "url": "{{ variables.apiUrl }}", "method": "GET" }
21
+ },
22
+ {
23
+ "id": "map",
24
+ "name": "Map to Product",
25
+ "nodeClass": "step",
26
+ "type": "data-mapper",
27
+ "inputs": [{ "type": "main" }],
28
+ "outputs": [{ "type": "main" }, { "type": "error" }],
29
+ "config": {
30
+ "model": "Product",
31
+ "mappings": [
32
+ { "origin": "id", "target": "id" },
33
+ { "origin": "title", "target": "name" },
34
+ { "origin": "price", "target": "price" }
35
+ ]
36
+ }
37
+ },
38
+ {
39
+ "id": "respond",
40
+ "name": "Respond",
41
+ "nodeClass": "response",
42
+ "type": "response-script",
43
+ "inputs": [{ "type": "main" }],
44
+ "outputs": [],
45
+ "config": { "script": "return { ok: true, count: $items().length }" }
46
+ }
47
+ ],
48
+ "edges": [
49
+ { "id": "e1", "source": { "nodeId": "trigger", "port": "main" }, "target": { "nodeId": "fetch", "port": "main" } },
50
+ { "id": "e2", "source": { "nodeId": "fetch", "port": "main" }, "target": { "nodeId": "map", "port": "main" } },
51
+ { "id": "e3", "source": { "nodeId": "map", "port": "main" }, "target": { "nodeId": "respond", "port": "main" } }
52
+ ]
53
+ }
@@ -0,0 +1,2 @@
1
+ import type { SchemaEntry } from './registry.js';
2
+ export declare function extractSchema(entry: SchemaEntry, filePath: string): string;
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.extractSchema = extractSchema;
4
+ const ts_morph_1 = require("ts-morph");
5
+ function findDeclaration(file, name) {
6
+ return (file.getInterface(name) ??
7
+ file.getTypeAlias(name) ??
8
+ file.getEnum(name) ??
9
+ file.getClass(name) ??
10
+ file.getModule(name) ??
11
+ file.getVariableDeclaration(name));
12
+ }
13
+ function declarationName(decl) {
14
+ if (decl.getKind() === ts_morph_1.SyntaxKind.VariableDeclaration) {
15
+ return decl.getName?.();
16
+ }
17
+ return decl.getName?.();
18
+ }
19
+ function declarationFullText(decl) {
20
+ if (decl.getKind() === ts_morph_1.SyntaxKind.VariableDeclaration) {
21
+ const stmt = decl.getFirstAncestorByKind(ts_morph_1.SyntaxKind.VariableStatement);
22
+ if (stmt)
23
+ return stmt.getFullText().trim();
24
+ }
25
+ return decl.getFullText().trim();
26
+ }
27
+ function collectIdentifiers(decl) {
28
+ const names = new Set();
29
+ decl.forEachDescendant((node) => {
30
+ if (node.getKind() === ts_morph_1.SyntaxKind.Identifier) {
31
+ names.add(node.getText());
32
+ }
33
+ });
34
+ return [...names];
35
+ }
36
+ function extractSchema(entry, filePath) {
37
+ const project = new ts_morph_1.Project({
38
+ compilerOptions: { allowJs: false, declaration: true, noEmit: true },
39
+ skipAddingFilesFromTsConfig: true,
40
+ skipFileDependencyResolution: true,
41
+ });
42
+ const file = project.addSourceFileAtPath(filePath);
43
+ const rootName = entry.exportPath.split('.')[0];
44
+ const root = findDeclaration(file, rootName);
45
+ if (!root) {
46
+ throw new Error(`Schema export '${entry.exportPath}' not found in ${filePath}`);
47
+ }
48
+ const collected = [];
49
+ const seen = new Set();
50
+ const queue = [root];
51
+ while (queue.length) {
52
+ const decl = queue.shift();
53
+ const name = declarationName(decl);
54
+ if (!name || seen.has(name))
55
+ continue;
56
+ seen.add(name);
57
+ collected.push({ name, text: declarationFullText(decl) });
58
+ for (const id of collectIdentifiers(decl)) {
59
+ if (seen.has(id))
60
+ continue;
61
+ const next = findDeclaration(file, id);
62
+ if (next)
63
+ queue.push(next);
64
+ }
65
+ }
66
+ return collected.map(c => c.text).join('\n\n');
67
+ }
68
+ //# sourceMappingURL=extract.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extract.js","sourceRoot":"","sources":["../../../src/functions/schemas/extract.ts"],"names":[],"mappings":";;AA6CA,sCAmCC;AAhFD,uCAAiE;AAQjE,SAAS,eAAe,CAAC,IAAgB,EAAE,IAAY;IACrD,OAAO,CACL,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC;QACvB,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC;QACvB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;QAClB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;QACnB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;QACpB,IAAI,CAAC,sBAAsB,CAAC,IAAI,CAAC,CAClC,CAAC;AACJ,CAAC;AAED,SAAS,eAAe,CAAC,IAAU;IACjC,IAAI,IAAI,CA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