@botpress/cli 2.0.2 → 2.0.4

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 (383) hide show
  1. package/e2e/tests/install-interfaces.ts +1 -0
  2. package/e2e/tests/install-package.ts +1 -0
  3. package/package.json +3 -3
  4. package/templates/empty-bot/package.json +2 -2
  5. package/templates/empty-integration/package.json +2 -2
  6. package/templates/empty-plugin/package.json +1 -1
  7. package/templates/hello-world/package.json +2 -2
  8. package/templates/webhook-message/package.json +2 -2
  9. package/.turbo/turbo-build.log +0 -22
  10. package/dist/api/bot-body.js +0 -89
  11. package/dist/api/bot-body.js.map +0 -7
  12. package/dist/api/client.js +0 -162
  13. package/dist/api/client.js.map +0 -7
  14. package/dist/api/find-previous-version.js +0 -66
  15. package/dist/api/find-previous-version.js.map +0 -7
  16. package/dist/api/find-previous-version.test.js +0 -76
  17. package/dist/api/find-previous-version.test.js.map +0 -7
  18. package/dist/api/index.js +0 -23
  19. package/dist/api/index.js.map +0 -7
  20. package/dist/api/integration-body.js +0 -146
  21. package/dist/api/integration-body.js.map +0 -7
  22. package/dist/api/interface-body.js +0 -95
  23. package/dist/api/interface-body.js.map +0 -7
  24. package/dist/api/paging.js +0 -42
  25. package/dist/api/paging.js.map +0 -7
  26. package/dist/api/plugin-body.js +0 -84
  27. package/dist/api/plugin-body.js.map +0 -7
  28. package/dist/api/types.js +0 -17
  29. package/dist/api/types.js.map +0 -7
  30. package/dist/code-generation/bot-implementation/bot-implementation.js +0 -116
  31. package/dist/code-generation/bot-implementation/bot-implementation.js.map +0 -7
  32. package/dist/code-generation/bot-implementation/bot-plugins/index.js +0 -80
  33. package/dist/code-generation/bot-implementation/bot-plugins/index.js.map +0 -7
  34. package/dist/code-generation/bot-implementation/bot-plugins/plugin-module.js +0 -129
  35. package/dist/code-generation/bot-implementation/bot-plugins/plugin-module.js.map +0 -7
  36. package/dist/code-generation/bot-implementation/bot-typings/actions-module.js +0 -88
  37. package/dist/code-generation/bot-implementation/bot-typings/actions-module.js.map +0 -7
  38. package/dist/code-generation/bot-implementation/bot-typings/events-module.js +0 -63
  39. package/dist/code-generation/bot-implementation/bot-typings/events-module.js.map +0 -7
  40. package/dist/code-generation/bot-implementation/bot-typings/index.js +0 -109
  41. package/dist/code-generation/bot-implementation/bot-typings/index.js.map +0 -7
  42. package/dist/code-generation/bot-implementation/bot-typings/states-module.js +0 -64
  43. package/dist/code-generation/bot-implementation/bot-typings/states-module.js.map +0 -7
  44. package/dist/code-generation/bot-implementation/index.js +0 -66
  45. package/dist/code-generation/bot-implementation/index.js.map +0 -7
  46. package/dist/code-generation/consts.js +0 -45
  47. package/dist/code-generation/consts.js.map +0 -7
  48. package/dist/code-generation/generators.js +0 -81
  49. package/dist/code-generation/generators.js.map +0 -7
  50. package/dist/code-generation/index.js +0 -49
  51. package/dist/code-generation/index.js.map +0 -7
  52. package/dist/code-generation/integration-implementation/index.js +0 -70
  53. package/dist/code-generation/integration-implementation/index.js.map +0 -7
  54. package/dist/code-generation/integration-implementation/integration-implementation.js +0 -114
  55. package/dist/code-generation/integration-implementation/integration-implementation.js.map +0 -7
  56. package/dist/code-generation/integration-implementation/integration-secret.js +0 -78
  57. package/dist/code-generation/integration-implementation/integration-secret.js.map +0 -7
  58. package/dist/code-generation/integration-implementation/integration-typings/actions-module.js +0 -88
  59. package/dist/code-generation/integration-implementation/integration-typings/actions-module.js.map +0 -7
  60. package/dist/code-generation/integration-implementation/integration-typings/channels-module.js +0 -107
  61. package/dist/code-generation/integration-implementation/integration-typings/channels-module.js.map +0 -7
  62. package/dist/code-generation/integration-implementation/integration-typings/configuration-module.js +0 -62
  63. package/dist/code-generation/integration-implementation/integration-typings/configuration-module.js.map +0 -7
  64. package/dist/code-generation/integration-implementation/integration-typings/configurations-module.js +0 -70
  65. package/dist/code-generation/integration-implementation/integration-typings/configurations-module.js.map +0 -7
  66. package/dist/code-generation/integration-implementation/integration-typings/entities-module.js +0 -63
  67. package/dist/code-generation/integration-implementation/integration-typings/entities-module.js.map +0 -7
  68. package/dist/code-generation/integration-implementation/integration-typings/events-module.js +0 -63
  69. package/dist/code-generation/integration-implementation/integration-typings/events-module.js.map +0 -7
  70. package/dist/code-generation/integration-implementation/integration-typings/index.js +0 -128
  71. package/dist/code-generation/integration-implementation/integration-typings/index.js.map +0 -7
  72. package/dist/code-generation/integration-implementation/integration-typings/states-module.js +0 -64
  73. package/dist/code-generation/integration-implementation/integration-typings/states-module.js.map +0 -7
  74. package/dist/code-generation/integration-package/index.js +0 -94
  75. package/dist/code-generation/integration-package/index.js.map +0 -7
  76. package/dist/code-generation/integration-package/integration-package-definition/actions-module.js +0 -88
  77. package/dist/code-generation/integration-package/integration-package-definition/actions-module.js.map +0 -7
  78. package/dist/code-generation/integration-package/integration-package-definition/channels-module.js +0 -107
  79. package/dist/code-generation/integration-package/integration-package-definition/channels-module.js.map +0 -7
  80. package/dist/code-generation/integration-package/integration-package-definition/configuration-module.js +0 -63
  81. package/dist/code-generation/integration-package/integration-package-definition/configuration-module.js.map +0 -7
  82. package/dist/code-generation/integration-package/integration-package-definition/configurations-module.js +0 -70
  83. package/dist/code-generation/integration-package/integration-package-definition/configurations-module.js.map +0 -7
  84. package/dist/code-generation/integration-package/integration-package-definition/entities-module.js +0 -63
  85. package/dist/code-generation/integration-package/integration-package-definition/entities-module.js.map +0 -7
  86. package/dist/code-generation/integration-package/integration-package-definition/events-module.js +0 -66
  87. package/dist/code-generation/integration-package/integration-package-definition/events-module.js.map +0 -7
  88. package/dist/code-generation/integration-package/integration-package-definition/index.js +0 -140
  89. package/dist/code-generation/integration-package/integration-package-definition/index.js.map +0 -7
  90. package/dist/code-generation/integration-package/integration-package-definition/states-module.js +0 -66
  91. package/dist/code-generation/integration-package/integration-package-definition/states-module.js.map +0 -7
  92. package/dist/code-generation/integration-package/integration-package-definition/typings.js +0 -17
  93. package/dist/code-generation/integration-package/integration-package-definition/typings.js.map +0 -7
  94. package/dist/code-generation/interface-implementation/index.js +0 -29
  95. package/dist/code-generation/interface-implementation/index.js.map +0 -7
  96. package/dist/code-generation/interface-implementation/integration-typings/actions-module.js +0 -88
  97. package/dist/code-generation/interface-implementation/integration-typings/actions-module.js.map +0 -7
  98. package/dist/code-generation/interface-implementation/integration-typings/channels-module.js +0 -107
  99. package/dist/code-generation/interface-implementation/integration-typings/channels-module.js.map +0 -7
  100. package/dist/code-generation/interface-implementation/integration-typings/entities-module.js +0 -63
  101. package/dist/code-generation/interface-implementation/integration-typings/entities-module.js.map +0 -7
  102. package/dist/code-generation/interface-implementation/integration-typings/events-module.js +0 -63
  103. package/dist/code-generation/interface-implementation/integration-typings/events-module.js.map +0 -7
  104. package/dist/code-generation/interface-implementation/integration-typings/index.js +0 -121
  105. package/dist/code-generation/interface-implementation/integration-typings/index.js.map +0 -7
  106. package/dist/code-generation/interface-package/index.js +0 -94
  107. package/dist/code-generation/interface-package/index.js.map +0 -7
  108. package/dist/code-generation/interface-package/interface-package-definition/actions-module.js +0 -88
  109. package/dist/code-generation/interface-package/interface-package-definition/actions-module.js.map +0 -7
  110. package/dist/code-generation/interface-package/interface-package-definition/channels-module.js +0 -98
  111. package/dist/code-generation/interface-package/interface-package-definition/channels-module.js.map +0 -7
  112. package/dist/code-generation/interface-package/interface-package-definition/entities-module.js +0 -63
  113. package/dist/code-generation/interface-package/interface-package-definition/entities-module.js.map +0 -7
  114. package/dist/code-generation/interface-package/interface-package-definition/events-module.js +0 -66
  115. package/dist/code-generation/interface-package/interface-package-definition/events-module.js.map +0 -7
  116. package/dist/code-generation/interface-package/interface-package-definition/index.js +0 -104
  117. package/dist/code-generation/interface-package/interface-package-definition/index.js.map +0 -7
  118. package/dist/code-generation/interface-package/interface-package-definition/typings.js +0 -17
  119. package/dist/code-generation/interface-package/interface-package-definition/typings.js.map +0 -7
  120. package/dist/code-generation/module.js +0 -183
  121. package/dist/code-generation/module.js.map +0 -7
  122. package/dist/code-generation/plugin-implementation/index.js +0 -60
  123. package/dist/code-generation/plugin-implementation/index.js.map +0 -7
  124. package/dist/code-generation/plugin-implementation/plugin-implementation.js +0 -90
  125. package/dist/code-generation/plugin-implementation/plugin-implementation.js.map +0 -7
  126. package/dist/code-generation/plugin-implementation/plugin-typings/actions-module.js +0 -88
  127. package/dist/code-generation/plugin-implementation/plugin-typings/actions-module.js.map +0 -7
  128. package/dist/code-generation/plugin-implementation/plugin-typings/configuration-module.js +0 -61
  129. package/dist/code-generation/plugin-implementation/plugin-typings/configuration-module.js.map +0 -7
  130. package/dist/code-generation/plugin-implementation/plugin-typings/events-module.js +0 -63
  131. package/dist/code-generation/plugin-implementation/plugin-typings/events-module.js.map +0 -7
  132. package/dist/code-generation/plugin-implementation/plugin-typings/index.js +0 -150
  133. package/dist/code-generation/plugin-implementation/plugin-typings/index.js.map +0 -7
  134. package/dist/code-generation/plugin-implementation/plugin-typings/states-module.js +0 -64
  135. package/dist/code-generation/plugin-implementation/plugin-typings/states-module.js.map +0 -7
  136. package/dist/code-generation/plugin-package/index.js +0 -151
  137. package/dist/code-generation/plugin-package/index.js.map +0 -7
  138. package/dist/code-generation/plugin-package/plugin-package-definition/actions-module.js +0 -88
  139. package/dist/code-generation/plugin-package/plugin-package-definition/actions-module.js.map +0 -7
  140. package/dist/code-generation/plugin-package/plugin-package-definition/configuration-module.js +0 -56
  141. package/dist/code-generation/plugin-package/plugin-package-definition/configuration-module.js.map +0 -7
  142. package/dist/code-generation/plugin-package/plugin-package-definition/events-module.js +0 -66
  143. package/dist/code-generation/plugin-package/plugin-package-definition/events-module.js.map +0 -7
  144. package/dist/code-generation/plugin-package/plugin-package-definition/index.js +0 -107
  145. package/dist/code-generation/plugin-package/plugin-package-definition/index.js.map +0 -7
  146. package/dist/code-generation/plugin-package/plugin-package-definition/states-module.js +0 -66
  147. package/dist/code-generation/plugin-package/plugin-package-definition/states-module.js.map +0 -7
  148. package/dist/code-generation/plugin-package/plugin-package-definition/typings.js +0 -17
  149. package/dist/code-generation/plugin-package/plugin-package-definition/typings.js.map +0 -7
  150. package/dist/code-generation/strings.js +0 -115
  151. package/dist/code-generation/strings.js.map +0 -7
  152. package/dist/code-generation/typings.js +0 -17
  153. package/dist/code-generation/typings.js.map +0 -7
  154. package/dist/command-definitions.js +0 -84
  155. package/dist/command-definitions.js.map +0 -7
  156. package/dist/command-implementations/add-command.js +0 -249
  157. package/dist/command-implementations/add-command.js.map +0 -7
  158. package/dist/command-implementations/base-command.js +0 -69
  159. package/dist/command-implementations/base-command.js.map +0 -7
  160. package/dist/command-implementations/bot-commands.js +0 -117
  161. package/dist/command-implementations/bot-commands.js.map +0 -7
  162. package/dist/command-implementations/build-command.js +0 -53
  163. package/dist/command-implementations/build-command.js.map +0 -7
  164. package/dist/command-implementations/bundle-command.js +0 -87
  165. package/dist/command-implementations/bundle-command.js.map +0 -7
  166. package/dist/command-implementations/deploy-command.js +0 -481
  167. package/dist/command-implementations/deploy-command.js.map +0 -7
  168. package/dist/command-implementations/dev-command.js +0 -345
  169. package/dist/command-implementations/dev-command.js.map +0 -7
  170. package/dist/command-implementations/gen-command.js +0 -110
  171. package/dist/command-implementations/gen-command.js.map +0 -7
  172. package/dist/command-implementations/global-command.js +0 -137
  173. package/dist/command-implementations/global-command.js.map +0 -7
  174. package/dist/command-implementations/index.js +0 -103
  175. package/dist/command-implementations/index.js.map +0 -7
  176. package/dist/command-implementations/init-command.js +0 -162
  177. package/dist/command-implementations/init-command.js.map +0 -7
  178. package/dist/command-implementations/integration-commands.js +0 -130
  179. package/dist/command-implementations/integration-commands.js.map +0 -7
  180. package/dist/command-implementations/interface-commands.js +0 -110
  181. package/dist/command-implementations/interface-commands.js.map +0 -7
  182. package/dist/command-implementations/lint-command.js +0 -151
  183. package/dist/command-implementations/lint-command.js.map +0 -7
  184. package/dist/command-implementations/login-command.js +0 -82
  185. package/dist/command-implementations/login-command.js.map +0 -7
  186. package/dist/command-implementations/logout-command.js +0 -35
  187. package/dist/command-implementations/logout-command.js.map +0 -7
  188. package/dist/command-implementations/plugin-commands.js +0 -111
  189. package/dist/command-implementations/plugin-commands.js.map +0 -7
  190. package/dist/command-implementations/project-command.js +0 -383
  191. package/dist/command-implementations/project-command.js.map +0 -7
  192. package/dist/command-implementations/read-command.js +0 -70
  193. package/dist/command-implementations/read-command.js.map +0 -7
  194. package/dist/command-implementations/serve-command.js +0 -68
  195. package/dist/command-implementations/serve-command.js.map +0 -7
  196. package/dist/command-tree.js +0 -60
  197. package/dist/command-tree.js.map +0 -7
  198. package/dist/config.js +0 -332
  199. package/dist/config.js.map +0 -7
  200. package/dist/consts.js +0 -124
  201. package/dist/consts.js.map +0 -7
  202. package/dist/errors.js +0 -202
  203. package/dist/errors.js.map +0 -7
  204. package/dist/index.js +0 -51
  205. package/dist/index.js.map +0 -7
  206. package/dist/init.js +0 -50
  207. package/dist/init.js.map +0 -7
  208. package/dist/linter/base-linter.js +0 -75
  209. package/dist/linter/base-linter.js.map +0 -7
  210. package/dist/linter/base-linter.test.js +0 -187
  211. package/dist/linter/base-linter.test.js.map +0 -7
  212. package/dist/linter/bot-linter.js +0 -35
  213. package/dist/linter/bot-linter.js.map +0 -7
  214. package/dist/linter/integration-linter.js +0 -35
  215. package/dist/linter/integration-linter.js.map +0 -7
  216. package/dist/linter/interface-linter.js +0 -35
  217. package/dist/linter/interface-linter.js.map +0 -7
  218. package/dist/linter/ruleset-tests/bot.ruleset.test.js +0 -358
  219. package/dist/linter/ruleset-tests/bot.ruleset.test.js.map +0 -7
  220. package/dist/linter/ruleset-tests/common.js +0 -37
  221. package/dist/linter/ruleset-tests/common.js.map +0 -7
  222. package/dist/linter/ruleset-tests/integration.ruleset.test.js +0 -887
  223. package/dist/linter/ruleset-tests/integration.ruleset.test.js.map +0 -7
  224. package/dist/linter/ruleset-tests/interface.ruleset.test.js +0 -383
  225. package/dist/linter/ruleset-tests/interface.ruleset.test.js.map +0 -7
  226. package/dist/linter/rulesets/bot.ruleset.js +0 -191
  227. package/dist/linter/rulesets/bot.ruleset.js.map +0 -7
  228. package/dist/linter/rulesets/integration.ruleset.js +0 -378
  229. package/dist/linter/rulesets/integration.ruleset.js.map +0 -7
  230. package/dist/linter/rulesets/interface.ruleset.js +0 -157
  231. package/dist/linter/rulesets/interface.ruleset.js.map +0 -7
  232. package/dist/linter/spectral-functions.js +0 -36
  233. package/dist/linter/spectral-functions.js.map +0 -7
  234. package/dist/logger/base-logger.js +0 -170
  235. package/dist/logger/base-logger.js.map +0 -7
  236. package/dist/logger/index.js +0 -86
  237. package/dist/logger/index.js.map +0 -7
  238. package/dist/package-ref.js +0 -107
  239. package/dist/package-ref.js.map +0 -7
  240. package/dist/package-ref.test.js +0 -109
  241. package/dist/package-ref.test.js.map +0 -7
  242. package/dist/register-yargs.js +0 -91
  243. package/dist/register-yargs.js.map +0 -7
  244. package/dist/root.js +0 -41
  245. package/dist/root.js.map +0 -7
  246. package/dist/sdk/index.js +0 -22
  247. package/dist/sdk/index.js.map +0 -7
  248. package/dist/sdk/resolve-bot-interfaces.js +0 -43
  249. package/dist/sdk/resolve-bot-interfaces.js.map +0 -7
  250. package/dist/sdk/resolve-integration-interfaces.js +0 -161
  251. package/dist/sdk/resolve-integration-interfaces.js.map +0 -7
  252. package/dist/sdk/validate-bot.js +0 -88
  253. package/dist/sdk/validate-bot.js.map +0 -7
  254. package/dist/sdk/validate-integration.js +0 -72
  255. package/dist/sdk/validate-integration.js.map +0 -7
  256. package/dist/typings.js +0 -17
  257. package/dist/typings.js.map +0 -7
  258. package/dist/utils/cache-utils.js +0 -104
  259. package/dist/utils/cache-utils.js.map +0 -7
  260. package/dist/utils/case-utils.js +0 -84
  261. package/dist/utils/case-utils.js.map +0 -7
  262. package/dist/utils/case-utils.test.js +0 -75
  263. package/dist/utils/case-utils.test.js.map +0 -7
  264. package/dist/utils/esbuild-utils.js +0 -92
  265. package/dist/utils/esbuild-utils.js.map +0 -7
  266. package/dist/utils/event-emitter.js +0 -63
  267. package/dist/utils/event-emitter.js.map +0 -7
  268. package/dist/utils/file-watcher.js +0 -73
  269. package/dist/utils/file-watcher.js.map +0 -7
  270. package/dist/utils/guard-utils.js +0 -32
  271. package/dist/utils/guard-utils.js.map +0 -7
  272. package/dist/utils/id-utils.js +0 -59
  273. package/dist/utils/id-utils.js.map +0 -7
  274. package/dist/utils/index.js +0 -99
  275. package/dist/utils/index.js.map +0 -7
  276. package/dist/utils/object-utils.js +0 -32
  277. package/dist/utils/object-utils.js.map +0 -7
  278. package/dist/utils/path-utils.js +0 -106
  279. package/dist/utils/path-utils.js.map +0 -7
  280. package/dist/utils/path-utils.test.js +0 -72
  281. package/dist/utils/path-utils.test.js.map +0 -7
  282. package/dist/utils/pkgjson-utils.js +0 -57
  283. package/dist/utils/pkgjson-utils.js.map +0 -7
  284. package/dist/utils/promise-utils.js +0 -33
  285. package/dist/utils/promise-utils.js.map +0 -7
  286. package/dist/utils/promise-utils.test.js +0 -14
  287. package/dist/utils/promise-utils.test.js.map +0 -7
  288. package/dist/utils/prompt-utils.js +0 -105
  289. package/dist/utils/prompt-utils.js.map +0 -7
  290. package/dist/utils/record-utils.js +0 -118
  291. package/dist/utils/record-utils.js.map +0 -7
  292. package/dist/utils/record-utils.test.js +0 -38
  293. package/dist/utils/record-utils.test.js.map +0 -7
  294. package/dist/utils/require-utils.js +0 -90
  295. package/dist/utils/require-utils.js.map +0 -7
  296. package/dist/utils/require-utils.test.js +0 -54
  297. package/dist/utils/require-utils.test.js.map +0 -7
  298. package/dist/utils/schema-utils.js +0 -64
  299. package/dist/utils/schema-utils.js.map +0 -7
  300. package/dist/utils/schema-utils.test.js +0 -50
  301. package/dist/utils/schema-utils.test.js.map +0 -7
  302. package/dist/utils/semver-utils.js +0 -45
  303. package/dist/utils/semver-utils.js.map +0 -7
  304. package/dist/utils/string-utils.js +0 -42
  305. package/dist/utils/string-utils.js.map +0 -7
  306. package/dist/utils/template-utils.js +0 -51
  307. package/dist/utils/template-utils.js.map +0 -7
  308. package/dist/utils/tunnel-utils.js +0 -129
  309. package/dist/utils/tunnel-utils.js.map +0 -7
  310. package/dist/utils/type-utils.js +0 -17
  311. package/dist/utils/type-utils.js.map +0 -7
  312. package/dist/utils/url-utils.js +0 -67
  313. package/dist/utils/url-utils.js.map +0 -7
  314. package/dist/worker/child-entrypoint.js +0 -58
  315. package/dist/worker/child-entrypoint.js.map +0 -7
  316. package/dist/worker/child-wrapper.js +0 -119
  317. package/dist/worker/child-wrapper.js.map +0 -7
  318. package/dist/worker/config.js +0 -44
  319. package/dist/worker/config.js.map +0 -7
  320. package/dist/worker/index.js +0 -32
  321. package/dist/worker/index.js.map +0 -7
  322. package/dist/worker/is-child.js +0 -55
  323. package/dist/worker/is-child.js.map +0 -7
  324. package/dist/worker/worker-state.js +0 -71
  325. package/dist/worker/worker-state.js.map +0 -7
  326. package/dist/worker/worker.js +0 -91
  327. package/dist/worker/worker.js.map +0 -7
  328. package/templates/empty-bot/.botpress/implementation/index.ts +0 -50
  329. package/templates/empty-bot/.botpress/implementation/plugins/index.ts +0 -11
  330. package/templates/empty-bot/.botpress/implementation/typings/actions/index.ts +0 -6
  331. package/templates/empty-bot/.botpress/implementation/typings/events/index.ts +0 -6
  332. package/templates/empty-bot/.botpress/implementation/typings/index.ts +0 -20
  333. package/templates/empty-bot/.botpress/implementation/typings/integrations/index.ts +0 -6
  334. package/templates/empty-bot/.botpress/implementation/typings/states/index.ts +0 -6
  335. package/templates/empty-bot/.botpress/index.ts +0 -5
  336. package/templates/empty-integration/.botpress/implementation/index.ts +0 -57
  337. package/templates/empty-integration/.botpress/implementation/typings/actions/index.ts +0 -6
  338. package/templates/empty-integration/.botpress/implementation/typings/channels/index.ts +0 -6
  339. package/templates/empty-integration/.botpress/implementation/typings/configuration/index.ts +0 -2
  340. package/templates/empty-integration/.botpress/implementation/typings/configurations/index.ts +0 -6
  341. package/templates/empty-integration/.botpress/implementation/typings/entities/index.ts +0 -6
  342. package/templates/empty-integration/.botpress/implementation/typings/events/index.ts +0 -6
  343. package/templates/empty-integration/.botpress/implementation/typings/index.ts +0 -31
  344. package/templates/empty-integration/.botpress/implementation/typings/states/index.ts +0 -6
  345. package/templates/empty-integration/.botpress/index.ts +0 -2
  346. package/templates/empty-integration/.botpress/secrets/index.ts +0 -6
  347. package/templates/empty-plugin/.botpress/implementation/index.ts +0 -35
  348. package/templates/empty-plugin/.botpress/implementation/typings/actions/index.ts +0 -6
  349. package/templates/empty-plugin/.botpress/implementation/typings/configuration/index.ts +0 -2
  350. package/templates/empty-plugin/.botpress/implementation/typings/events/index.ts +0 -6
  351. package/templates/empty-plugin/.botpress/implementation/typings/index.ts +0 -26
  352. package/templates/empty-plugin/.botpress/implementation/typings/integrations/index.ts +0 -6
  353. package/templates/empty-plugin/.botpress/implementation/typings/interfaces/index.ts +0 -6
  354. package/templates/empty-plugin/.botpress/implementation/typings/states/index.ts +0 -6
  355. package/templates/empty-plugin/.botpress/index.ts +0 -1
  356. package/templates/hello-world/.botpress/implementation/index.ts +0 -57
  357. package/templates/hello-world/.botpress/implementation/typings/actions/helloWorld/index.ts +0 -12
  358. package/templates/hello-world/.botpress/implementation/typings/actions/helloWorld/input.ts +0 -5
  359. package/templates/hello-world/.botpress/implementation/typings/actions/helloWorld/output.ts +0 -5
  360. package/templates/hello-world/.botpress/implementation/typings/actions/index.ts +0 -9
  361. package/templates/hello-world/.botpress/implementation/typings/channels/index.ts +0 -6
  362. package/templates/hello-world/.botpress/implementation/typings/configuration/index.ts +0 -2
  363. package/templates/hello-world/.botpress/implementation/typings/configurations/index.ts +0 -6
  364. package/templates/hello-world/.botpress/implementation/typings/entities/index.ts +0 -6
  365. package/templates/hello-world/.botpress/implementation/typings/events/index.ts +0 -6
  366. package/templates/hello-world/.botpress/implementation/typings/index.ts +0 -31
  367. package/templates/hello-world/.botpress/implementation/typings/states/index.ts +0 -6
  368. package/templates/hello-world/.botpress/index.ts +0 -2
  369. package/templates/hello-world/.botpress/secrets/index.ts +0 -6
  370. package/templates/webhook-message/.botpress/implementation/index.ts +0 -57
  371. package/templates/webhook-message/.botpress/implementation/typings/actions/index.ts +0 -6
  372. package/templates/webhook-message/.botpress/implementation/typings/channels/index.ts +0 -9
  373. package/templates/webhook-message/.botpress/implementation/typings/channels/webhook/index.ts +0 -12
  374. package/templates/webhook-message/.botpress/implementation/typings/channels/webhook/messages/index.ts +0 -9
  375. package/templates/webhook-message/.botpress/implementation/typings/channels/webhook/messages/text.ts +0 -5
  376. package/templates/webhook-message/.botpress/implementation/typings/configuration/index.ts +0 -8
  377. package/templates/webhook-message/.botpress/implementation/typings/configurations/index.ts +0 -6
  378. package/templates/webhook-message/.botpress/implementation/typings/entities/index.ts +0 -6
  379. package/templates/webhook-message/.botpress/implementation/typings/events/index.ts +0 -6
  380. package/templates/webhook-message/.botpress/implementation/typings/index.ts +0 -31
  381. package/templates/webhook-message/.botpress/implementation/typings/states/index.ts +0 -6
  382. package/templates/webhook-message/.botpress/index.ts +0 -2
  383. package/templates/webhook-message/.botpress/secrets/index.ts +0 -6
@@ -1,887 +0,0 @@
1
- "use strict";
2
- var import_vitest = require("vitest");
3
- var import_integration = require("../rulesets/integration.ruleset");
4
- var import_common = require("./common");
5
- const describeRule = (0, import_common.createDescribeRule)()(import_integration.INTEGRATION_RULESET);
6
- const EMPTY_STRING = "";
7
- const TRUTHY_STRING = "truthy";
8
- const ACTION_NAME = "actionName";
9
- const EVENT_NAME = "eventName";
10
- const CONFIG_NAME = "configName";
11
- const PARAM_NAME = "paramName";
12
- const PROPERTIES_PARAM = "properties";
13
- const PARAM_NAMES = [PARAM_NAME, PROPERTIES_PARAM];
14
- const TAG_NAME = "tagName";
15
- const CHANNEL_NAME = "channelName";
16
- const STATE_NAME = "stateName";
17
- const SECRET_NAME = "SECRET_NAME";
18
- const MESSAGE_TYPE = "text";
19
- const ZUI = "x-zui";
20
- const LEGACY_ZUI = "ui";
21
- describeRule("integration-title-must-be-present", (lint) => {
22
- (0, import_vitest.test)("missing title should trigger", async () => {
23
- const definition = {};
24
- const results = await lint(definition);
25
- (0, import_vitest.expect)(results).toHaveLength(1);
26
- (0, import_vitest.expect)(results[0]?.message).toContain("title");
27
- });
28
- (0, import_vitest.test)("empty title should trigger", async () => {
29
- const definition = { title: EMPTY_STRING };
30
- const results = await lint(definition);
31
- (0, import_vitest.expect)(results).toHaveLength(1);
32
- (0, import_vitest.expect)(results[0]?.path).toEqual(["title"]);
33
- });
34
- (0, import_vitest.test)("valid title should not trigger", async () => {
35
- const definition = { title: TRUTHY_STRING };
36
- const results = await lint(definition);
37
- (0, import_vitest.expect)(results).toHaveLength(0);
38
- });
39
- });
40
- describeRule("integration-description-must-be-present", (lint) => {
41
- (0, import_vitest.test)("missing description should trigger", async () => {
42
- const definition = {};
43
- const results = await lint(definition);
44
- (0, import_vitest.expect)(results).toHaveLength(1);
45
- (0, import_vitest.expect)(results[0]?.message).toContain("description");
46
- });
47
- (0, import_vitest.test)("empty description should trigger", async () => {
48
- const definition = { description: EMPTY_STRING };
49
- const results = await lint(definition);
50
- (0, import_vitest.expect)(results).toHaveLength(1);
51
- (0, import_vitest.expect)(results[0]?.path).toEqual(["description"]);
52
- });
53
- (0, import_vitest.test)("valid description should not trigger", async () => {
54
- const definition = { description: TRUTHY_STRING };
55
- const results = await lint(definition);
56
- (0, import_vitest.expect)(results).toHaveLength(0);
57
- });
58
- });
59
- describeRule("integration-must-have-an-icon", (lint) => {
60
- (0, import_vitest.test)("missing icon should trigger", async () => {
61
- const definition = {};
62
- const results = await lint(definition);
63
- (0, import_vitest.expect)(results).toHaveLength(1);
64
- (0, import_vitest.expect)(results[0]?.message).toContain("icon");
65
- });
66
- (0, import_vitest.test)("empty icon should trigger", async () => {
67
- const definition = { icon: EMPTY_STRING };
68
- const results = await lint(definition);
69
- (0, import_vitest.expect)(results).toHaveLength(1);
70
- (0, import_vitest.expect)(results[0]?.path).toEqual(["icon"]);
71
- });
72
- (0, import_vitest.test)("valid icon should not trigger", async () => {
73
- const definition = { icon: TRUTHY_STRING };
74
- const results = await lint(definition);
75
- (0, import_vitest.expect)(results).toHaveLength(0);
76
- });
77
- });
78
- describeRule("integration-must-have-a-readme-file", (lint) => {
79
- (0, import_vitest.test)("missing readme should trigger", async () => {
80
- const definition = {};
81
- const results = await lint(definition);
82
- (0, import_vitest.expect)(results).toHaveLength(1);
83
- (0, import_vitest.expect)(results[0]?.message).toContain("readme");
84
- });
85
- (0, import_vitest.test)("empty readme should trigger", async () => {
86
- const definition = { readme: EMPTY_STRING };
87
- const results = await lint(definition);
88
- (0, import_vitest.expect)(results).toHaveLength(1);
89
- (0, import_vitest.expect)(results[0]?.path).toEqual(["readme"]);
90
- });
91
- (0, import_vitest.test)("valid readme should not trigger", async () => {
92
- const definition = { readme: TRUTHY_STRING };
93
- const results = await lint(definition);
94
- (0, import_vitest.expect)(results).toHaveLength(0);
95
- });
96
- });
97
- describeRule("actions-should-have-a-title", (lint) => {
98
- (0, import_vitest.test)("missing title should trigger", async () => {
99
- const definition = { actions: { [ACTION_NAME]: {} } };
100
- const results = await lint(definition);
101
- (0, import_vitest.expect)(results).toHaveLength(1);
102
- (0, import_vitest.expect)(results[0]?.path).toEqual(["actions", ACTION_NAME]);
103
- (0, import_vitest.expect)(results[0]?.message).toContain("title");
104
- });
105
- (0, import_vitest.test)("empty title should trigger", async () => {
106
- const definition = { actions: { [ACTION_NAME]: { title: EMPTY_STRING } } };
107
- const results = await lint(definition);
108
- (0, import_vitest.expect)(results).toHaveLength(1);
109
- (0, import_vitest.expect)(results[0]?.path).toEqual(["actions", ACTION_NAME, "title"]);
110
- (0, import_vitest.expect)(results[0]?.message).toContain("title");
111
- });
112
- (0, import_vitest.test)("valid title should not trigger", async () => {
113
- const definition = { actions: { [ACTION_NAME]: { title: TRUTHY_STRING } } };
114
- const results = await lint(definition);
115
- (0, import_vitest.expect)(results).toHaveLength(0);
116
- });
117
- });
118
- describeRule("actions-must-have-a-description", (lint) => {
119
- (0, import_vitest.test)("missing description should trigger", async () => {
120
- const definition = { actions: { [ACTION_NAME]: {} } };
121
- const results = await lint(definition);
122
- (0, import_vitest.expect)(results).toHaveLength(1);
123
- (0, import_vitest.expect)(results[0]?.path).toEqual(["actions", ACTION_NAME]);
124
- (0, import_vitest.expect)(results[0]?.message).toContain("description");
125
- });
126
- (0, import_vitest.test)("empty description should trigger", async () => {
127
- const definition = {
128
- actions: { [ACTION_NAME]: { description: EMPTY_STRING } }
129
- };
130
- const results = await lint(definition);
131
- (0, import_vitest.expect)(results).toHaveLength(1);
132
- (0, import_vitest.expect)(results[0]?.path).toEqual(["actions", ACTION_NAME, "description"]);
133
- (0, import_vitest.expect)(results[0]?.message).toContain("description");
134
- });
135
- (0, import_vitest.test)("valid description should not trigger", async () => {
136
- const definition = {
137
- actions: { [ACTION_NAME]: { description: TRUTHY_STRING } }
138
- };
139
- const results = await lint(definition);
140
- (0, import_vitest.expect)(results).toHaveLength(0);
141
- });
142
- });
143
- describeRule("action-inputparams-should-have-a-title", (lint) => {
144
- import_vitest.test.each(PARAM_NAMES)("missing title should trigger (%s)", async (paramName) => {
145
- const definition = {
146
- actions: { [ACTION_NAME]: { input: { schema: { properties: { [paramName]: { [ZUI]: {} } } } } } }
147
- };
148
- const results = await lint(definition);
149
- (0, import_vitest.expect)(results).toHaveLength(1);
150
- (0, import_vitest.expect)(results[0]?.path).toEqual(["actions", ACTION_NAME, "input", "schema", "properties", paramName, ZUI]);
151
- (0, import_vitest.expect)(results[0]?.message).toContain("title");
152
- });
153
- import_vitest.test.each(PARAM_NAMES)("empty title should trigger (%s)", async (paramName) => {
154
- const definition = {
155
- actions: {
156
- [ACTION_NAME]: { input: { schema: { properties: { [paramName]: { [ZUI]: { title: EMPTY_STRING } } } } } }
157
- }
158
- };
159
- const results = await lint(definition);
160
- (0, import_vitest.expect)(results).toHaveLength(1);
161
- (0, import_vitest.expect)(results[0]?.path).toEqual(["actions", ACTION_NAME, "input", "schema", "properties", paramName, ZUI, "title"]);
162
- (0, import_vitest.expect)(results[0]?.message).toContain("title");
163
- });
164
- import_vitest.test.each(PARAM_NAMES)("valid title should not trigger (%s)", async (paramName) => {
165
- const definition = {
166
- actions: {
167
- [ACTION_NAME]: { input: { schema: { properties: { [paramName]: { [ZUI]: { title: TRUTHY_STRING } } } } } }
168
- }
169
- };
170
- const results = await lint(definition);
171
- (0, import_vitest.expect)(results).toHaveLength(0);
172
- });
173
- });
174
- describeRule("action-inputparams-must-have-a-description", (lint) => {
175
- import_vitest.test.each(PARAM_NAMES)("missing description should trigger (%s)", async (paramName) => {
176
- const definition = {
177
- actions: { [ACTION_NAME]: { input: { schema: { properties: { [paramName]: {} } } } } }
178
- };
179
- const results = await lint(definition);
180
- (0, import_vitest.expect)(results).toHaveLength(1);
181
- (0, import_vitest.expect)(results[0]?.path).toEqual(["actions", ACTION_NAME, "input", "schema", "properties", paramName]);
182
- (0, import_vitest.expect)(results[0]?.message).toContain("description");
183
- });
184
- import_vitest.test.each(PARAM_NAMES)("empty description should trigger (%s)", async (paramName) => {
185
- const definition = {
186
- actions: {
187
- [ACTION_NAME]: { input: { schema: { properties: { [paramName]: { description: EMPTY_STRING } } } } }
188
- }
189
- };
190
- const results = await lint(definition);
191
- (0, import_vitest.expect)(results).toHaveLength(1);
192
- (0, import_vitest.expect)(results[0]?.path).toEqual([
193
- "actions",
194
- ACTION_NAME,
195
- "input",
196
- "schema",
197
- "properties",
198
- paramName,
199
- "description"
200
- ]);
201
- (0, import_vitest.expect)(results[0]?.message).toContain("description");
202
- });
203
- import_vitest.test.each(PARAM_NAMES)("valid description should not trigger (%s)", async (paramName) => {
204
- const definition = {
205
- actions: {
206
- [ACTION_NAME]: { input: { schema: { properties: { [paramName]: { description: TRUTHY_STRING } } } } }
207
- }
208
- };
209
- const results = await lint(definition);
210
- (0, import_vitest.expect)(results).toHaveLength(0);
211
- });
212
- });
213
- describeRule("action-outputparams-should-have-a-title", (lint) => {
214
- import_vitest.test.each(PARAM_NAMES)("missing title should trigger (%s)", async (paramName) => {
215
- const definition = {
216
- actions: { [ACTION_NAME]: { output: { schema: { properties: { [paramName]: { [ZUI]: {} } } } } } }
217
- };
218
- const results = await lint(definition);
219
- (0, import_vitest.expect)(results).toHaveLength(1);
220
- (0, import_vitest.expect)(results[0]?.path).toEqual(["actions", ACTION_NAME, "output", "schema", "properties", paramName, ZUI]);
221
- (0, import_vitest.expect)(results[0]?.message).toContain("title");
222
- });
223
- import_vitest.test.each(PARAM_NAMES)("empty title should trigger (%s)", async (paramName) => {
224
- const definition = {
225
- actions: {
226
- [ACTION_NAME]: { output: { schema: { properties: { [paramName]: { [ZUI]: { title: EMPTY_STRING } } } } } }
227
- }
228
- };
229
- const results = await lint(definition);
230
- (0, import_vitest.expect)(results).toHaveLength(1);
231
- (0, import_vitest.expect)(results[0]?.path).toEqual([
232
- "actions",
233
- ACTION_NAME,
234
- "output",
235
- "schema",
236
- "properties",
237
- paramName,
238
- ZUI,
239
- "title"
240
- ]);
241
- (0, import_vitest.expect)(results[0]?.message).toContain("title");
242
- });
243
- import_vitest.test.each(PARAM_NAMES)("valid title should not trigger (%s)", async (paramName) => {
244
- const definition = {
245
- actions: {
246
- [ACTION_NAME]: { output: { schema: { properties: { [paramName]: { [ZUI]: { title: TRUTHY_STRING } } } } } }
247
- }
248
- };
249
- const results = await lint(definition);
250
- (0, import_vitest.expect)(results).toHaveLength(0);
251
- });
252
- });
253
- describeRule("action-outputparams-must-have-a-description", (lint) => {
254
- import_vitest.test.each(PARAM_NAMES)("missing description should trigger (%s)", async (paramName) => {
255
- const definition = {
256
- actions: { [ACTION_NAME]: { output: { schema: { properties: { [paramName]: {} } } } } }
257
- };
258
- const results = await lint(definition);
259
- (0, import_vitest.expect)(results).toHaveLength(1);
260
- (0, import_vitest.expect)(results[0]?.path).toEqual(["actions", ACTION_NAME, "output", "schema", "properties", paramName]);
261
- (0, import_vitest.expect)(results[0]?.message).toContain("description");
262
- });
263
- import_vitest.test.each(PARAM_NAMES)("empty description should trigger (%s)", async (paramName) => {
264
- const definition = {
265
- actions: {
266
- [ACTION_NAME]: { output: { schema: { properties: { [paramName]: { description: EMPTY_STRING } } } } }
267
- }
268
- };
269
- const results = await lint(definition);
270
- (0, import_vitest.expect)(results).toHaveLength(1);
271
- (0, import_vitest.expect)(results[0]?.path).toEqual([
272
- "actions",
273
- ACTION_NAME,
274
- "output",
275
- "schema",
276
- "properties",
277
- paramName,
278
- "description"
279
- ]);
280
- (0, import_vitest.expect)(results[0]?.message).toContain("description");
281
- });
282
- import_vitest.test.each(PARAM_NAMES)("valid description should not trigger (%s)", async (paramName) => {
283
- const definition = {
284
- actions: {
285
- [ACTION_NAME]: { output: { schema: { properties: { [paramName]: { description: TRUTHY_STRING } } } } }
286
- }
287
- };
288
- const results = await lint(definition);
289
- (0, import_vitest.expect)(results).toHaveLength(0);
290
- });
291
- });
292
- describeRule("event-outputparams-should-have-title", (lint) => {
293
- import_vitest.test.each(PARAM_NAMES)("missing title should trigger (%s)", async (paramName) => {
294
- const definition = {
295
- events: { [EVENT_NAME]: { schema: { properties: { [paramName]: { [ZUI]: {} } } } } }
296
- };
297
- const results = await lint(definition);
298
- (0, import_vitest.expect)(results).toHaveLength(1);
299
- (0, import_vitest.expect)(results[0]?.path).toEqual(["events", EVENT_NAME, "schema", "properties", paramName, ZUI]);
300
- (0, import_vitest.expect)(results[0]?.message).toContain("title");
301
- });
302
- import_vitest.test.each(PARAM_NAMES)("empty title should trigger (%s)", async (paramName) => {
303
- const definition = {
304
- events: {
305
- [EVENT_NAME]: { schema: { properties: { [paramName]: { [ZUI]: { title: EMPTY_STRING } } } } }
306
- }
307
- };
308
- const results = await lint(definition);
309
- (0, import_vitest.expect)(results).toHaveLength(1);
310
- (0, import_vitest.expect)(results[0]?.path).toEqual(["events", EVENT_NAME, "schema", "properties", paramName, ZUI, "title"]);
311
- (0, import_vitest.expect)(results[0]?.message).toContain("title");
312
- });
313
- import_vitest.test.each(PARAM_NAMES)("valid title should not trigger (%s)", async (paramName) => {
314
- const definition = {
315
- events: {
316
- [EVENT_NAME]: { schema: { properties: { [paramName]: { [ZUI]: { title: TRUTHY_STRING } } } } }
317
- }
318
- };
319
- const results = await lint(definition);
320
- (0, import_vitest.expect)(results).toHaveLength(0);
321
- });
322
- });
323
- describeRule("event-outputparams-must-have-description", (lint) => {
324
- import_vitest.test.each(PARAM_NAMES)("missing description should trigger (%s)", async (paramName) => {
325
- const definition = {
326
- events: { [EVENT_NAME]: { schema: { properties: { [paramName]: {} } } } }
327
- };
328
- const results = await lint(definition);
329
- (0, import_vitest.expect)(results).toHaveLength(1);
330
- (0, import_vitest.expect)(results[0]?.path).toEqual(["events", EVENT_NAME, "schema", "properties", paramName]);
331
- (0, import_vitest.expect)(results[0]?.message).toContain("description");
332
- });
333
- import_vitest.test.each(PARAM_NAMES)("empty description should trigger (%s)", async (paramName) => {
334
- const definition = {
335
- events: {
336
- [EVENT_NAME]: { schema: { properties: { [paramName]: { description: EMPTY_STRING } } } }
337
- }
338
- };
339
- const results = await lint(definition);
340
- (0, import_vitest.expect)(results).toHaveLength(1);
341
- (0, import_vitest.expect)(results[0]?.path).toEqual(["events", EVENT_NAME, "schema", "properties", paramName, "description"]);
342
- (0, import_vitest.expect)(results[0]?.message).toContain("description");
343
- });
344
- import_vitest.test.each(PARAM_NAMES)("valid description should not trigger (%s)", async (paramName) => {
345
- const definition = {
346
- events: {
347
- [EVENT_NAME]: { schema: { properties: { [paramName]: { description: TRUTHY_STRING } } } }
348
- }
349
- };
350
- const results = await lint(definition);
351
- (0, import_vitest.expect)(results).toHaveLength(0);
352
- });
353
- });
354
- describeRule("events-must-have-a-title", (lint) => {
355
- (0, import_vitest.test)("missing title should trigger", async () => {
356
- const definition = { events: { [EVENT_NAME]: {} } };
357
- const results = await lint(definition);
358
- (0, import_vitest.expect)(results).toHaveLength(1);
359
- (0, import_vitest.expect)(results[0]?.path).toEqual(["events", EVENT_NAME]);
360
- (0, import_vitest.expect)(results[0]?.message).toContain("title");
361
- });
362
- (0, import_vitest.test)("empty title should trigger", async () => {
363
- const definition = { events: { [EVENT_NAME]: { title: EMPTY_STRING } } };
364
- const results = await lint(definition);
365
- (0, import_vitest.expect)(results).toHaveLength(1);
366
- (0, import_vitest.expect)(results[0]?.path).toEqual(["events", EVENT_NAME, "title"]);
367
- (0, import_vitest.expect)(results[0]?.message).toContain("title");
368
- });
369
- (0, import_vitest.test)("valid title should not trigger", async () => {
370
- const definition = { events: { [EVENT_NAME]: { title: TRUTHY_STRING } } };
371
- const results = await lint(definition);
372
- (0, import_vitest.expect)(results).toHaveLength(0);
373
- });
374
- });
375
- describeRule("events-must-have-a-description", (lint) => {
376
- (0, import_vitest.test)("missing description should trigger", async () => {
377
- const definition = { events: { [EVENT_NAME]: {} } };
378
- const results = await lint(definition);
379
- (0, import_vitest.expect)(results).toHaveLength(1);
380
- (0, import_vitest.expect)(results[0]?.path).toEqual(["events", EVENT_NAME]);
381
- (0, import_vitest.expect)(results[0]?.message).toContain("description");
382
- });
383
- (0, import_vitest.test)("empty description should trigger", async () => {
384
- const definition = { events: { [EVENT_NAME]: { description: EMPTY_STRING } } };
385
- const results = await lint(definition);
386
- (0, import_vitest.expect)(results).toHaveLength(1);
387
- (0, import_vitest.expect)(results[0]?.path).toEqual(["events", EVENT_NAME, "description"]);
388
- (0, import_vitest.expect)(results[0]?.message).toContain("description");
389
- });
390
- (0, import_vitest.test)("valid description should not trigger", async () => {
391
- const definition = {
392
- events: { [EVENT_NAME]: { description: TRUTHY_STRING } }
393
- };
394
- const results = await lint(definition);
395
- (0, import_vitest.expect)(results).toHaveLength(0);
396
- });
397
- });
398
- describeRule("configuration-fields-must-have-a-title", (lint) => {
399
- import_vitest.test.each(PARAM_NAMES)("missing title should trigger (%s)", async (paramName) => {
400
- const definition = {
401
- configuration: { schema: { properties: { [paramName]: { [ZUI]: {} } } } }
402
- };
403
- const results = await lint(definition);
404
- (0, import_vitest.expect)(results).toHaveLength(1);
405
- (0, import_vitest.expect)(results[0]?.path).toEqual(["configuration", "schema", "properties", paramName, ZUI]);
406
- (0, import_vitest.expect)(results[0]?.message).toContain("title");
407
- });
408
- import_vitest.test.each(PARAM_NAMES)("empty title should trigger (%s)", async (paramName) => {
409
- const definition = {
410
- configuration: { schema: { properties: { [paramName]: { [ZUI]: { title: EMPTY_STRING } } } } }
411
- };
412
- const results = await lint(definition);
413
- (0, import_vitest.expect)(results).toHaveLength(1);
414
- (0, import_vitest.expect)(results[0]?.path).toEqual(["configuration", "schema", "properties", paramName, ZUI, "title"]);
415
- (0, import_vitest.expect)(results[0]?.message).toContain("title");
416
- });
417
- import_vitest.test.each(PARAM_NAMES)("valid title should not trigger (%s)", async (paramName) => {
418
- const definition = {
419
- configuration: { schema: { properties: { [paramName]: { [ZUI]: { title: TRUTHY_STRING } } } } }
420
- };
421
- const results = await lint(definition);
422
- (0, import_vitest.expect)(results).toHaveLength(0);
423
- });
424
- });
425
- describeRule("configuration-fields-must-have-a-description", (lint) => {
426
- import_vitest.test.each(PARAM_NAMES)("missing description should trigger (%s)", async (paramName) => {
427
- const definition = {
428
- configuration: { schema: { properties: { [paramName]: {} } } }
429
- };
430
- const results = await lint(definition);
431
- (0, import_vitest.expect)(results).toHaveLength(1);
432
- (0, import_vitest.expect)(results[0]?.path).toEqual(["configuration", "schema", "properties", paramName]);
433
- (0, import_vitest.expect)(results[0]?.message).toContain("description");
434
- });
435
- import_vitest.test.each(PARAM_NAMES)("empty description should trigger (%s)", async (paramName) => {
436
- const definition = {
437
- configuration: { schema: { properties: { [paramName]: { description: EMPTY_STRING } } } }
438
- };
439
- const results = await lint(definition);
440
- (0, import_vitest.expect)(results).toHaveLength(1);
441
- (0, import_vitest.expect)(results[0]?.path).toEqual(["configuration", "schema", "properties", paramName, "description"]);
442
- (0, import_vitest.expect)(results[0]?.message).toContain("description");
443
- });
444
- import_vitest.test.each(PARAM_NAMES)("valid description should not trigger (%s)", async (paramName) => {
445
- const definition = {
446
- configuration: { schema: { properties: { [paramName]: { description: TRUTHY_STRING } } } }
447
- };
448
- const results = await lint(definition);
449
- (0, import_vitest.expect)(results).toHaveLength(0);
450
- });
451
- });
452
- describeRule("multiple-configurations-must-have-a-title", (lint) => {
453
- (0, import_vitest.test)("missing title should trigger", async () => {
454
- const definition = {
455
- configurations: { [CONFIG_NAME]: {} }
456
- };
457
- const results = await lint(definition);
458
- (0, import_vitest.expect)(results).toHaveLength(1);
459
- (0, import_vitest.expect)(results[0]?.path).toEqual(["configurations", CONFIG_NAME]);
460
- (0, import_vitest.expect)(results[0]?.message).toContain("title");
461
- });
462
- (0, import_vitest.test)("empty title should trigger", async () => {
463
- const definition = {
464
- configurations: { [CONFIG_NAME]: { title: EMPTY_STRING } }
465
- };
466
- const results = await lint(definition);
467
- (0, import_vitest.expect)(results).toHaveLength(1);
468
- (0, import_vitest.expect)(results[0]?.path).toEqual(["configurations", CONFIG_NAME, "title"]);
469
- (0, import_vitest.expect)(results[0]?.message).toContain("title");
470
- });
471
- (0, import_vitest.test)("valid title should not trigger", async () => {
472
- const definition = {
473
- configurations: { [CONFIG_NAME]: { title: TRUTHY_STRING } }
474
- };
475
- const results = await lint(definition);
476
- (0, import_vitest.expect)(results).toHaveLength(0);
477
- });
478
- });
479
- describeRule("multiple-configurations-must-have-a-description", (lint) => {
480
- (0, import_vitest.test)("missing description should trigger", async () => {
481
- const definition = {
482
- configurations: { [CONFIG_NAME]: {} }
483
- };
484
- const results = await lint(definition);
485
- (0, import_vitest.expect)(results).toHaveLength(1);
486
- (0, import_vitest.expect)(results[0]?.path).toEqual(["configurations", CONFIG_NAME]);
487
- (0, import_vitest.expect)(results[0]?.message).toContain("description");
488
- });
489
- (0, import_vitest.test)("empty description should trigger", async () => {
490
- const definition = {
491
- configurations: { [CONFIG_NAME]: { description: EMPTY_STRING } }
492
- };
493
- const results = await lint(definition);
494
- (0, import_vitest.expect)(results).toHaveLength(1);
495
- (0, import_vitest.expect)(results[0]?.path).toEqual(["configurations", CONFIG_NAME, "description"]);
496
- (0, import_vitest.expect)(results[0]?.message).toContain("description");
497
- });
498
- (0, import_vitest.test)("valid description should not trigger", async () => {
499
- const definition = {
500
- configurations: { [CONFIG_NAME]: { description: TRUTHY_STRING } }
501
- };
502
- const results = await lint(definition);
503
- (0, import_vitest.expect)(results).toHaveLength(0);
504
- });
505
- });
506
- describeRule("multipes-configurations-fields-must-have-a-title", (lint) => {
507
- import_vitest.test.each(PARAM_NAMES)("missing title should trigger (%s)", async (paramName) => {
508
- const definition = {
509
- configurations: { [CONFIG_NAME]: { schema: { properties: { [paramName]: { [ZUI]: {} } } } } }
510
- };
511
- const results = await lint(definition);
512
- (0, import_vitest.expect)(results).toHaveLength(1);
513
- (0, import_vitest.expect)(results[0]?.path).toEqual(["configurations", CONFIG_NAME, "schema", "properties", paramName, ZUI]);
514
- (0, import_vitest.expect)(results[0]?.message).toContain("title");
515
- });
516
- import_vitest.test.each(PARAM_NAMES)("empty title should trigger (%s)", async (paramName) => {
517
- const definition = {
518
- configurations: {
519
- [CONFIG_NAME]: { schema: { properties: { [paramName]: { [ZUI]: { title: EMPTY_STRING } } } } }
520
- }
521
- };
522
- const results = await lint(definition);
523
- (0, import_vitest.expect)(results).toHaveLength(1);
524
- (0, import_vitest.expect)(results[0]?.path).toEqual(["configurations", CONFIG_NAME, "schema", "properties", paramName, ZUI, "title"]);
525
- (0, import_vitest.expect)(results[0]?.message).toContain("title");
526
- });
527
- import_vitest.test.each(PARAM_NAMES)("valid title should not trigger (%s)", async (paramName) => {
528
- const definition = {
529
- configurations: {
530
- [CONFIG_NAME]: { schema: { properties: { [paramName]: { [ZUI]: { title: TRUTHY_STRING } } } } }
531
- }
532
- };
533
- const results = await lint(definition);
534
- (0, import_vitest.expect)(results).toHaveLength(0);
535
- });
536
- });
537
- describeRule("multipes-configurations-fields-must-have-a-description", (lint) => {
538
- import_vitest.test.each(PARAM_NAMES)("missing description should trigger (%s)", async (paramName) => {
539
- const definition = {
540
- configurations: { [CONFIG_NAME]: { schema: { properties: { [paramName]: {} } } } }
541
- };
542
- const results = await lint(definition);
543
- (0, import_vitest.expect)(results).toHaveLength(1);
544
- (0, import_vitest.expect)(results[0]?.path).toEqual(["configurations", CONFIG_NAME, "schema", "properties", paramName]);
545
- (0, import_vitest.expect)(results[0]?.message).toContain("description");
546
- });
547
- import_vitest.test.each(PARAM_NAMES)("empty description should trigger (%s)", async (paramName) => {
548
- const definition = {
549
- configurations: {
550
- [CONFIG_NAME]: { schema: { properties: { [paramName]: { description: EMPTY_STRING } } } }
551
- }
552
- };
553
- const results = await lint(definition);
554
- (0, import_vitest.expect)(results).toHaveLength(1);
555
- (0, import_vitest.expect)(results[0]?.path).toEqual(["configurations", CONFIG_NAME, "schema", "properties", paramName, "description"]);
556
- (0, import_vitest.expect)(results[0]?.message).toContain("description");
557
- });
558
- import_vitest.test.each(PARAM_NAMES)("valid description should not trigger (%s)", async (paramName) => {
559
- const definition = {
560
- configurations: {
561
- [CONFIG_NAME]: { schema: { properties: { [paramName]: { description: TRUTHY_STRING } } } }
562
- }
563
- };
564
- const results = await lint(definition);
565
- (0, import_vitest.expect)(results).toHaveLength(0);
566
- });
567
- });
568
- describeRule("user-tags-should-have-a-title", (lint) => {
569
- (0, import_vitest.test)("missing title should trigger", async () => {
570
- const definition = { user: { tags: { [TAG_NAME]: {} } } };
571
- const results = await lint(definition);
572
- (0, import_vitest.expect)(results).toHaveLength(1);
573
- (0, import_vitest.expect)(results[0]?.path).toEqual(["user", "tags", TAG_NAME]);
574
- (0, import_vitest.expect)(results[0]?.message).toContain("title");
575
- });
576
- (0, import_vitest.test)("empty title should trigger", async () => {
577
- const definition = { user: { tags: { [TAG_NAME]: { title: EMPTY_STRING } } } };
578
- const results = await lint(definition);
579
- (0, import_vitest.expect)(results).toHaveLength(1);
580
- (0, import_vitest.expect)(results[0]?.path).toEqual(["user", "tags", TAG_NAME, "title"]);
581
- (0, import_vitest.expect)(results[0]?.message).toContain("title");
582
- });
583
- (0, import_vitest.test)("valid title should not trigger", async () => {
584
- const definition = {
585
- user: { tags: { [TAG_NAME]: { title: TRUTHY_STRING } } }
586
- };
587
- const results = await lint(definition);
588
- (0, import_vitest.expect)(results).toHaveLength(0);
589
- });
590
- });
591
- describeRule("user-tags-must-have-a-description", (lint) => {
592
- (0, import_vitest.test)("missing description should trigger", async () => {
593
- const definition = { user: { tags: { [TAG_NAME]: {} } } };
594
- const results = await lint(definition);
595
- (0, import_vitest.expect)(results).toHaveLength(1);
596
- (0, import_vitest.expect)(results[0]?.path).toEqual(["user", "tags", TAG_NAME]);
597
- (0, import_vitest.expect)(results[0]?.message).toContain("description");
598
- });
599
- (0, import_vitest.test)("empty description should trigger", async () => {
600
- const definition = {
601
- user: { tags: { [TAG_NAME]: { description: EMPTY_STRING } } }
602
- };
603
- const results = await lint(definition);
604
- (0, import_vitest.expect)(results).toHaveLength(1);
605
- (0, import_vitest.expect)(results[0]?.path).toEqual(["user", "tags", TAG_NAME, "description"]);
606
- (0, import_vitest.expect)(results[0]?.message).toContain("description");
607
- });
608
- (0, import_vitest.test)("valid description should not trigger", async () => {
609
- const definition = {
610
- user: { tags: { [TAG_NAME]: { description: TRUTHY_STRING } } }
611
- };
612
- const results = await lint(definition);
613
- (0, import_vitest.expect)(results).toHaveLength(0);
614
- });
615
- });
616
- describeRule("channels-should-have-a-title", (lint) => {
617
- (0, import_vitest.test)("missing title should trigger", async () => {
618
- const definition = { channels: { [CHANNEL_NAME]: {} } };
619
- const results = await lint(definition);
620
- (0, import_vitest.expect)(results).toHaveLength(1);
621
- (0, import_vitest.expect)(results[0]?.path).toEqual(["channels", CHANNEL_NAME]);
622
- (0, import_vitest.expect)(results[0]?.message).toContain("title");
623
- });
624
- (0, import_vitest.test)("empty title should trigger", async () => {
625
- const definition = { channels: { [CHANNEL_NAME]: { title: EMPTY_STRING } } };
626
- const results = await lint(definition);
627
- (0, import_vitest.expect)(results).toHaveLength(1);
628
- (0, import_vitest.expect)(results[0]?.path).toEqual(["channels", CHANNEL_NAME, "title"]);
629
- (0, import_vitest.expect)(results[0]?.message).toContain("title");
630
- });
631
- (0, import_vitest.test)("valid title should not trigger", async () => {
632
- const definition = { channels: { [CHANNEL_NAME]: { title: TRUTHY_STRING } } };
633
- const results = await lint(definition);
634
- (0, import_vitest.expect)(results).toHaveLength(0);
635
- });
636
- });
637
- describeRule("channels-must-have-a-description", (lint) => {
638
- (0, import_vitest.test)("missing description should trigger", async () => {
639
- const definition = { channels: { [CHANNEL_NAME]: {} } };
640
- const results = await lint(definition);
641
- (0, import_vitest.expect)(results).toHaveLength(1);
642
- (0, import_vitest.expect)(results[0]?.path).toEqual(["channels", CHANNEL_NAME]);
643
- (0, import_vitest.expect)(results[0]?.message).toContain("description");
644
- });
645
- (0, import_vitest.test)("empty description should trigger", async () => {
646
- const definition = {
647
- channels: { [CHANNEL_NAME]: { description: EMPTY_STRING } }
648
- };
649
- const results = await lint(definition);
650
- (0, import_vitest.expect)(results).toHaveLength(1);
651
- (0, import_vitest.expect)(results[0]?.path).toEqual(["channels", CHANNEL_NAME, "description"]);
652
- (0, import_vitest.expect)(results[0]?.message).toContain("description");
653
- });
654
- (0, import_vitest.test)("valid description should not trigger", async () => {
655
- const definition = {
656
- channels: { [CHANNEL_NAME]: { description: TRUTHY_STRING } }
657
- };
658
- const results = await lint(definition);
659
- (0, import_vitest.expect)(results).toHaveLength(0);
660
- });
661
- });
662
- describeRule("channels-conversation-tags-should-have-a-title", (lint) => {
663
- (0, import_vitest.test)("missing title should trigger", async () => {
664
- const definition = {
665
- channels: { [CHANNEL_NAME]: { conversation: { tags: { [TAG_NAME]: {} } } } }
666
- };
667
- const results = await lint(definition);
668
- (0, import_vitest.expect)(results).toHaveLength(1);
669
- (0, import_vitest.expect)(results[0]?.path).toEqual(["channels", CHANNEL_NAME, "conversation", "tags", TAG_NAME]);
670
- (0, import_vitest.expect)(results[0]?.message).toContain("title");
671
- });
672
- (0, import_vitest.test)("empty title should trigger", async () => {
673
- const definition = {
674
- channels: { [CHANNEL_NAME]: { conversation: { tags: { [TAG_NAME]: { title: EMPTY_STRING } } } } }
675
- };
676
- const results = await lint(definition);
677
- (0, import_vitest.expect)(results).toHaveLength(1);
678
- (0, import_vitest.expect)(results[0]?.path).toEqual(["channels", CHANNEL_NAME, "conversation", "tags", TAG_NAME, "title"]);
679
- (0, import_vitest.expect)(results[0]?.message).toContain("title");
680
- });
681
- (0, import_vitest.test)("valid title should not trigger", async () => {
682
- const definition = {
683
- channels: { [CHANNEL_NAME]: { conversation: { tags: { [TAG_NAME]: { title: TRUTHY_STRING } } } } }
684
- };
685
- const results = await lint(definition);
686
- (0, import_vitest.expect)(results).toHaveLength(0);
687
- });
688
- });
689
- describeRule("channels-conversation-tags-must-have-a-description", (lint) => {
690
- (0, import_vitest.test)("missing description should trigger", async () => {
691
- const definition = {
692
- channels: { [CHANNEL_NAME]: { conversation: { tags: { [TAG_NAME]: {} } } } }
693
- };
694
- const results = await lint(definition);
695
- (0, import_vitest.expect)(results).toHaveLength(1);
696
- (0, import_vitest.expect)(results[0]?.path).toEqual(["channels", CHANNEL_NAME, "conversation", "tags", TAG_NAME]);
697
- (0, import_vitest.expect)(results[0]?.message).toContain("description");
698
- });
699
- (0, import_vitest.test)("empty description should trigger", async () => {
700
- const definition = {
701
- channels: { [CHANNEL_NAME]: { conversation: { tags: { [TAG_NAME]: { description: EMPTY_STRING } } } } }
702
- };
703
- const results = await lint(definition);
704
- (0, import_vitest.expect)(results).toHaveLength(1);
705
- (0, import_vitest.expect)(results[0]?.path).toEqual(["channels", CHANNEL_NAME, "conversation", "tags", TAG_NAME, "description"]);
706
- (0, import_vitest.expect)(results[0]?.message).toContain("description");
707
- });
708
- (0, import_vitest.test)("valid description should not trigger", async () => {
709
- const definition = {
710
- channels: { [CHANNEL_NAME]: { conversation: { tags: { [TAG_NAME]: { description: TRUTHY_STRING } } } } }
711
- };
712
- const results = await lint(definition);
713
- (0, import_vitest.expect)(results).toHaveLength(0);
714
- });
715
- });
716
- describeRule("channels-message-tags-should-have-a-title", (lint) => {
717
- (0, import_vitest.test)("missing title should trigger", async () => {
718
- const definition = {
719
- channels: { [CHANNEL_NAME]: { message: { tags: { [TAG_NAME]: {} } } } }
720
- };
721
- const results = await lint(definition);
722
- (0, import_vitest.expect)(results).toHaveLength(1);
723
- (0, import_vitest.expect)(results[0]?.path).toEqual(["channels", CHANNEL_NAME, "message", "tags", TAG_NAME]);
724
- (0, import_vitest.expect)(results[0]?.message).toContain("title");
725
- });
726
- (0, import_vitest.test)("empty title should trigger", async () => {
727
- const definition = {
728
- channels: { [CHANNEL_NAME]: { message: { tags: { [TAG_NAME]: { title: EMPTY_STRING } } } } }
729
- };
730
- const results = await lint(definition);
731
- (0, import_vitest.expect)(results).toHaveLength(1);
732
- (0, import_vitest.expect)(results[0]?.path).toEqual(["channels", CHANNEL_NAME, "message", "tags", TAG_NAME, "title"]);
733
- (0, import_vitest.expect)(results[0]?.message).toContain("title");
734
- });
735
- (0, import_vitest.test)("valid title should not trigger", async () => {
736
- const definition = {
737
- channels: { [CHANNEL_NAME]: { message: { tags: { [TAG_NAME]: { title: TRUTHY_STRING } } } } }
738
- };
739
- const results = await lint(definition);
740
- (0, import_vitest.expect)(results).toHaveLength(0);
741
- });
742
- });
743
- describeRule("channels-message-tags-must-have-a-description", (lint) => {
744
- (0, import_vitest.test)("missing description should trigger", async () => {
745
- const definition = {
746
- channels: { [CHANNEL_NAME]: { message: { tags: { [TAG_NAME]: {} } } } }
747
- };
748
- const results = await lint(definition);
749
- (0, import_vitest.expect)(results).toHaveLength(1);
750
- (0, import_vitest.expect)(results[0]?.path).toEqual(["channels", CHANNEL_NAME, "message", "tags", TAG_NAME]);
751
- (0, import_vitest.expect)(results[0]?.message).toContain("description");
752
- });
753
- (0, import_vitest.test)("empty description should trigger", async () => {
754
- const definition = {
755
- channels: { [CHANNEL_NAME]: { message: { tags: { [TAG_NAME]: { description: EMPTY_STRING } } } } }
756
- };
757
- const results = await lint(definition);
758
- (0, import_vitest.expect)(results).toHaveLength(1);
759
- (0, import_vitest.expect)(results[0]?.path).toEqual(["channels", CHANNEL_NAME, "message", "tags", TAG_NAME, "description"]);
760
- (0, import_vitest.expect)(results[0]?.message).toContain("description");
761
- });
762
- (0, import_vitest.test)("valid description should not trigger", async () => {
763
- const definition = {
764
- channels: { [CHANNEL_NAME]: { message: { tags: { [TAG_NAME]: { description: TRUTHY_STRING } } } } }
765
- };
766
- const results = await lint(definition);
767
- (0, import_vitest.expect)(results).toHaveLength(0);
768
- });
769
- });
770
- describeRule("legacy-zui-title-should-be-removed", (lint) => {
771
- import_vitest.test.each(PARAM_NAMES)("legacy zui title should trigger (%s)", async (paramName) => {
772
- const definition = {
773
- actions: {
774
- [ACTION_NAME]: { input: { [LEGACY_ZUI]: { [paramName]: { title: TRUTHY_STRING } }, schema: {} } }
775
- },
776
- configuration: {
777
- [LEGACY_ZUI]: { [paramName]: { title: TRUTHY_STRING } },
778
- schema: {}
779
- },
780
- events: { [EVENT_NAME]: { [LEGACY_ZUI]: { [paramName]: { title: TRUTHY_STRING } }, schema: {} } },
781
- channels: {
782
- [CHANNEL_NAME]: {
783
- messages: { [MESSAGE_TYPE]: { [LEGACY_ZUI]: { [paramName]: { title: TRUTHY_STRING } }, schema: {} } }
784
- }
785
- },
786
- states: { [STATE_NAME]: { [LEGACY_ZUI]: { [paramName]: { title: TRUTHY_STRING } }, schema: {} } }
787
- };
788
- const results = await lint(definition);
789
- (0, import_vitest.expect)(results).toHaveLength(5);
790
- (0, import_vitest.expect)(results[0]?.message).toContain(".title()");
791
- });
792
- });
793
- describeRule("legacy-zui-examples-should-be-removed", (lint) => {
794
- import_vitest.test.each(PARAM_NAMES)("legacy zui examples should trigger (%s)", async (paramName) => {
795
- const definition = {
796
- actions: {
797
- [ACTION_NAME]: { input: { [LEGACY_ZUI]: { [paramName]: { examples: [TRUTHY_STRING] } }, schema: {} } }
798
- },
799
- configuration: {
800
- [LEGACY_ZUI]: { [paramName]: { examples: [TRUTHY_STRING] } },
801
- schema: {}
802
- },
803
- events: { [EVENT_NAME]: { [LEGACY_ZUI]: { [paramName]: { examples: [TRUTHY_STRING] } }, schema: {} } },
804
- channels: {
805
- [CHANNEL_NAME]: {
806
- messages: { [MESSAGE_TYPE]: { [LEGACY_ZUI]: { [paramName]: { examples: [TRUTHY_STRING] } }, schema: {} } }
807
- }
808
- },
809
- states: { [STATE_NAME]: { [LEGACY_ZUI]: { [paramName]: { examples: [TRUTHY_STRING] } }, schema: {} } }
810
- };
811
- const results = await lint(definition);
812
- (0, import_vitest.expect)(results).toHaveLength(5);
813
- (0, import_vitest.expect)(results[0]?.message).toContain("examples");
814
- });
815
- });
816
- describeRule("state-fields-should-have-title", (lint) => {
817
- import_vitest.test.each(PARAM_NAMES)("missing title should trigger (%s)", async (paramName) => {
818
- const definition = {
819
- states: { [STATE_NAME]: { schema: { properties: { [paramName]: { [ZUI]: {} } } } } }
820
- };
821
- const results = await lint(definition);
822
- (0, import_vitest.expect)(results).toHaveLength(1);
823
- (0, import_vitest.expect)(results[0]?.path).toEqual(["states", STATE_NAME, "schema", "properties", paramName, ZUI]);
824
- });
825
- import_vitest.test.each(PARAM_NAMES)("empty title should trigger (%s)", async (paramName) => {
826
- const definition = {
827
- states: { [STATE_NAME]: { schema: { properties: { [paramName]: { [ZUI]: { title: EMPTY_STRING } } } } } }
828
- };
829
- const results = await lint(definition);
830
- (0, import_vitest.expect)(results).toHaveLength(1);
831
- (0, import_vitest.expect)(results[0]?.path).toEqual(["states", STATE_NAME, "schema", "properties", paramName, ZUI, "title"]);
832
- });
833
- import_vitest.test.each(PARAM_NAMES)("valid title should not trigger (%s)", async (paramName) => {
834
- const definition = {
835
- states: { [STATE_NAME]: { schema: { properties: { [paramName]: { [ZUI]: { title: TRUTHY_STRING } } } } } }
836
- };
837
- const results = await lint(definition);
838
- (0, import_vitest.expect)(results).toHaveLength(0);
839
- });
840
- });
841
- describeRule("state-fields-must-have-description", (lint) => {
842
- import_vitest.test.each(PARAM_NAMES)("missing description should trigger (%s)", async (paramName) => {
843
- const definition = {
844
- states: { [STATE_NAME]: { schema: { properties: { [paramName]: {} } } } }
845
- };
846
- const results = await lint(definition);
847
- (0, import_vitest.expect)(results).toHaveLength(1);
848
- (0, import_vitest.expect)(results[0]?.path).toEqual(["states", STATE_NAME, "schema", "properties", paramName]);
849
- });
850
- import_vitest.test.each(PARAM_NAMES)("empty description should trigger (%s)", async (paramName) => {
851
- const definition = {
852
- states: { [STATE_NAME]: { schema: { properties: { [paramName]: { description: EMPTY_STRING } } } } }
853
- };
854
- const results = await lint(definition);
855
- (0, import_vitest.expect)(results).toHaveLength(1);
856
- (0, import_vitest.expect)(results[0]?.path).toEqual(["states", STATE_NAME, "schema", "properties", paramName, "description"]);
857
- });
858
- import_vitest.test.each(PARAM_NAMES)("valid description should not trigger (%s)", async (paramName) => {
859
- const definition = {
860
- states: { [STATE_NAME]: { schema: { properties: { [paramName]: { description: TRUTHY_STRING } } } } }
861
- };
862
- const results = await lint(definition);
863
- (0, import_vitest.expect)(results).toHaveLength(0);
864
- });
865
- });
866
- describeRule("secrets-must-have-a-description", (lint) => {
867
- (0, import_vitest.test)("missing description should trigger", async () => {
868
- const definition = { secrets: { [SECRET_NAME]: {} } };
869
- const results = await lint(definition);
870
- (0, import_vitest.expect)(results).toHaveLength(1);
871
- });
872
- (0, import_vitest.test)("empty description should trigger", async () => {
873
- const definition = {
874
- secrets: { [SECRET_NAME]: { description: EMPTY_STRING } }
875
- };
876
- const results = await lint(definition);
877
- (0, import_vitest.expect)(results).toHaveLength(1);
878
- });
879
- (0, import_vitest.test)("valid description should not trigger", async () => {
880
- const definition = {
881
- secrets: { [SECRET_NAME]: { description: TRUTHY_STRING } }
882
- };
883
- const results = await lint(definition);
884
- (0, import_vitest.expect)(results).toHaveLength(0);
885
- });
886
- });
887
- //# sourceMappingURL=integration.ruleset.test.js.map