@inluxc/propmaster 0.0.0-stage → 1.0.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 (444) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +696 -2
  3. package/dist/src/annotations/index.d.ts +11 -0
  4. package/dist/src/annotations/index.d.ts.map +1 -0
  5. package/dist/src/annotations/index.js +11 -0
  6. package/dist/src/annotations/index.js.map +1 -0
  7. package/dist/src/annotations/recorder.d.ts +57 -0
  8. package/dist/src/annotations/recorder.d.ts.map +1 -0
  9. package/dist/src/annotations/recorder.js +100 -0
  10. package/dist/src/annotations/recorder.js.map +1 -0
  11. package/dist/src/annotations/truncation.d.ts +34 -0
  12. package/dist/src/annotations/truncation.d.ts.map +1 -0
  13. package/dist/src/annotations/truncation.js +54 -0
  14. package/dist/src/annotations/truncation.js.map +1 -0
  15. package/dist/src/auth/apply.d.ts +15 -0
  16. package/dist/src/auth/apply.d.ts.map +1 -0
  17. package/dist/src/auth/apply.js +21 -0
  18. package/dist/src/auth/apply.js.map +1 -0
  19. package/dist/src/auth/setup.d.ts +56 -0
  20. package/dist/src/auth/setup.d.ts.map +1 -0
  21. package/dist/src/auth/setup.js +79 -0
  22. package/dist/src/auth/setup.js.map +1 -0
  23. package/dist/src/auth/state-file.d.ts +8 -0
  24. package/dist/src/auth/state-file.d.ts.map +1 -0
  25. package/dist/src/auth/state-file.js +13 -0
  26. package/dist/src/auth/state-file.js.map +1 -0
  27. package/dist/src/auth/token-manager.d.ts +61 -0
  28. package/dist/src/auth/token-manager.d.ts.map +1 -0
  29. package/dist/src/auth/token-manager.js +200 -0
  30. package/dist/src/auth/token-manager.js.map +1 -0
  31. package/dist/src/cli/banner.d.ts +23 -0
  32. package/dist/src/cli/banner.d.ts.map +1 -0
  33. package/dist/src/cli/banner.js +67 -0
  34. package/dist/src/cli/banner.js.map +1 -0
  35. package/dist/src/cli/check-tests.d.ts +143 -0
  36. package/dist/src/cli/check-tests.d.ts.map +1 -0
  37. package/dist/src/cli/check-tests.js +541 -0
  38. package/dist/src/cli/check-tests.js.map +1 -0
  39. package/dist/src/cli/coverage.d.ts +14 -0
  40. package/dist/src/cli/coverage.d.ts.map +1 -0
  41. package/dist/src/cli/coverage.js +97 -0
  42. package/dist/src/cli/coverage.js.map +1 -0
  43. package/dist/src/cli/doctor.d.ts +82 -0
  44. package/dist/src/cli/doctor.d.ts.map +1 -0
  45. package/dist/src/cli/doctor.js +656 -0
  46. package/dist/src/cli/doctor.js.map +1 -0
  47. package/dist/src/cli/env.d.ts +76 -0
  48. package/dist/src/cli/env.d.ts.map +1 -0
  49. package/dist/src/cli/env.js +344 -0
  50. package/dist/src/cli/env.js.map +1 -0
  51. package/dist/src/cli/failures.d.ts +29 -0
  52. package/dist/src/cli/failures.d.ts.map +1 -0
  53. package/dist/src/cli/failures.js +114 -0
  54. package/dist/src/cli/failures.js.map +1 -0
  55. package/dist/src/cli/fixture-catalog.d.ts +83 -0
  56. package/dist/src/cli/fixture-catalog.d.ts.map +1 -0
  57. package/dist/src/cli/fixture-catalog.js +773 -0
  58. package/dist/src/cli/fixture-catalog.js.map +1 -0
  59. package/dist/src/cli/fixture.d.ts +149 -0
  60. package/dist/src/cli/fixture.d.ts.map +1 -0
  61. package/dist/src/cli/fixture.js +742 -0
  62. package/dist/src/cli/fixture.js.map +1 -0
  63. package/dist/src/cli/flaky.d.ts +25 -0
  64. package/dist/src/cli/flaky.d.ts.map +1 -0
  65. package/dist/src/cli/flaky.js +96 -0
  66. package/dist/src/cli/flaky.js.map +1 -0
  67. package/dist/src/cli/generate.d.ts +37 -0
  68. package/dist/src/cli/generate.d.ts.map +1 -0
  69. package/dist/src/cli/generate.js +230 -0
  70. package/dist/src/cli/generate.js.map +1 -0
  71. package/dist/src/cli/init.d.ts +36 -0
  72. package/dist/src/cli/init.d.ts.map +1 -0
  73. package/dist/src/cli/init.js +1039 -0
  74. package/dist/src/cli/init.js.map +1 -0
  75. package/dist/src/cli/json-edit.d.ts +58 -0
  76. package/dist/src/cli/json-edit.d.ts.map +1 -0
  77. package/dist/src/cli/json-edit.js +250 -0
  78. package/dist/src/cli/json-edit.js.map +1 -0
  79. package/dist/src/cli/layout.d.ts +31 -0
  80. package/dist/src/cli/layout.d.ts.map +1 -0
  81. package/dist/src/cli/layout.js +175 -0
  82. package/dist/src/cli/layout.js.map +1 -0
  83. package/dist/src/cli/mcp-setup.d.ts +141 -0
  84. package/dist/src/cli/mcp-setup.d.ts.map +1 -0
  85. package/dist/src/cli/mcp-setup.js +548 -0
  86. package/dist/src/cli/mcp-setup.js.map +1 -0
  87. package/dist/src/cli/organize.d.ts +136 -0
  88. package/dist/src/cli/organize.d.ts.map +1 -0
  89. package/dist/src/cli/organize.js +467 -0
  90. package/dist/src/cli/organize.js.map +1 -0
  91. package/dist/src/cli/prompts.d.ts +102 -0
  92. package/dist/src/cli/prompts.d.ts.map +1 -0
  93. package/dist/src/cli/prompts.js +346 -0
  94. package/dist/src/cli/prompts.js.map +1 -0
  95. package/dist/src/cli/standards.d.ts +160 -0
  96. package/dist/src/cli/standards.d.ts.map +1 -0
  97. package/dist/src/cli/standards.js +389 -0
  98. package/dist/src/cli/standards.js.map +1 -0
  99. package/dist/src/cli/style.d.ts +28 -0
  100. package/dist/src/cli/style.d.ts.map +1 -0
  101. package/dist/src/cli/style.js +57 -0
  102. package/dist/src/cli/style.js.map +1 -0
  103. package/dist/src/config/env-loader.d.ts +33 -0
  104. package/dist/src/config/env-loader.d.ts.map +1 -0
  105. package/dist/src/config/env-loader.js +72 -0
  106. package/dist/src/config/env-loader.js.map +1 -0
  107. package/dist/src/config/index.d.ts +10 -0
  108. package/dist/src/config/index.d.ts.map +1 -0
  109. package/dist/src/config/index.js +10 -0
  110. package/dist/src/config/index.js.map +1 -0
  111. package/dist/src/config/loader.d.ts +66 -0
  112. package/dist/src/config/loader.d.ts.map +1 -0
  113. package/dist/src/config/loader.js +810 -0
  114. package/dist/src/config/loader.js.map +1 -0
  115. package/dist/src/config/schema.d.ts +596 -0
  116. package/dist/src/config/schema.d.ts.map +1 -0
  117. package/dist/src/config/schema.js +9 -0
  118. package/dist/src/config/schema.js.map +1 -0
  119. package/dist/src/containers/container-manager.d.ts +157 -0
  120. package/dist/src/containers/container-manager.d.ts.map +1 -0
  121. package/dist/src/containers/container-manager.js +627 -0
  122. package/dist/src/containers/container-manager.js.map +1 -0
  123. package/dist/src/coverage/code-coverage.d.ts +89 -0
  124. package/dist/src/coverage/code-coverage.d.ts.map +1 -0
  125. package/dist/src/coverage/code-coverage.js +395 -0
  126. package/dist/src/coverage/code-coverage.js.map +1 -0
  127. package/dist/src/coverage/inventory.d.ts +80 -0
  128. package/dist/src/coverage/inventory.d.ts.map +1 -0
  129. package/dist/src/coverage/inventory.js +417 -0
  130. package/dist/src/coverage/inventory.js.map +1 -0
  131. package/dist/src/coverage/languages.d.ts +34 -0
  132. package/dist/src/coverage/languages.d.ts.map +1 -0
  133. package/dist/src/coverage/languages.js +156 -0
  134. package/dist/src/coverage/languages.js.map +1 -0
  135. package/dist/src/coverage/report.d.ts +128 -0
  136. package/dist/src/coverage/report.d.ts.map +1 -0
  137. package/dist/src/coverage/report.js +472 -0
  138. package/dist/src/coverage/report.js.map +1 -0
  139. package/dist/src/errors.d.ts +164 -0
  140. package/dist/src/errors.d.ts.map +1 -0
  141. package/dist/src/errors.js +267 -0
  142. package/dist/src/errors.js.map +1 -0
  143. package/dist/src/fixtures/amqp.fixture.d.ts +163 -0
  144. package/dist/src/fixtures/amqp.fixture.d.ts.map +1 -0
  145. package/dist/src/fixtures/amqp.fixture.js +494 -0
  146. package/dist/src/fixtures/amqp.fixture.js.map +1 -0
  147. package/dist/src/fixtures/appium.fixture.d.ts +112 -0
  148. package/dist/src/fixtures/appium.fixture.d.ts.map +1 -0
  149. package/dist/src/fixtures/appium.fixture.js +309 -0
  150. package/dist/src/fixtures/appium.fixture.js.map +1 -0
  151. package/dist/src/fixtures/aws.d.ts +44 -0
  152. package/dist/src/fixtures/aws.d.ts.map +1 -0
  153. package/dist/src/fixtures/aws.js +93 -0
  154. package/dist/src/fixtures/aws.js.map +1 -0
  155. package/dist/src/fixtures/cassandra.fixture.d.ts +179 -0
  156. package/dist/src/fixtures/cassandra.fixture.d.ts.map +1 -0
  157. package/dist/src/fixtures/cassandra.fixture.js +489 -0
  158. package/dist/src/fixtures/cassandra.fixture.js.map +1 -0
  159. package/dist/src/fixtures/clickhouse.fixture.d.ts +171 -0
  160. package/dist/src/fixtures/clickhouse.fixture.d.ts.map +1 -0
  161. package/dist/src/fixtures/clickhouse.fixture.js +514 -0
  162. package/dist/src/fixtures/clickhouse.fixture.js.map +1 -0
  163. package/dist/src/fixtures/database.fixture.d.ts +63 -0
  164. package/dist/src/fixtures/database.fixture.d.ts.map +1 -0
  165. package/dist/src/fixtures/database.fixture.js +407 -0
  166. package/dist/src/fixtures/database.fixture.js.map +1 -0
  167. package/dist/src/fixtures/dynamodb.fixture.d.ts +243 -0
  168. package/dist/src/fixtures/dynamodb.fixture.d.ts.map +1 -0
  169. package/dist/src/fixtures/dynamodb.fixture.js +580 -0
  170. package/dist/src/fixtures/dynamodb.fixture.js.map +1 -0
  171. package/dist/src/fixtures/graphql.fixture.d.ts +107 -0
  172. package/dist/src/fixtures/graphql.fixture.d.ts.map +1 -0
  173. package/dist/src/fixtures/graphql.fixture.js +158 -0
  174. package/dist/src/fixtures/graphql.fixture.js.map +1 -0
  175. package/dist/src/fixtures/grpc.fixture.d.ts +167 -0
  176. package/dist/src/fixtures/grpc.fixture.d.ts.map +1 -0
  177. package/dist/src/fixtures/grpc.fixture.js +635 -0
  178. package/dist/src/fixtures/grpc.fixture.js.map +1 -0
  179. package/dist/src/fixtures/inbox.fixture.d.ts +136 -0
  180. package/dist/src/fixtures/inbox.fixture.d.ts.map +1 -0
  181. package/dist/src/fixtures/inbox.fixture.js +239 -0
  182. package/dist/src/fixtures/inbox.fixture.js.map +1 -0
  183. package/dist/src/fixtures/index.d.ts +174 -0
  184. package/dist/src/fixtures/index.d.ts.map +1 -0
  185. package/dist/src/fixtures/index.js +370 -0
  186. package/dist/src/fixtures/index.js.map +1 -0
  187. package/dist/src/fixtures/kafka-driver.d.ts +108 -0
  188. package/dist/src/fixtures/kafka-driver.d.ts.map +1 -0
  189. package/dist/src/fixtures/kafka-driver.js +113 -0
  190. package/dist/src/fixtures/kafka-driver.js.map +1 -0
  191. package/dist/src/fixtures/kafka.fixture.d.ts +75 -0
  192. package/dist/src/fixtures/kafka.fixture.d.ts.map +1 -0
  193. package/dist/src/fixtures/kafka.fixture.js +188 -0
  194. package/dist/src/fixtures/kafka.fixture.js.map +1 -0
  195. package/dist/src/fixtures/mock-server.fixture.d.ts +142 -0
  196. package/dist/src/fixtures/mock-server.fixture.d.ts.map +1 -0
  197. package/dist/src/fixtures/mock-server.fixture.js +271 -0
  198. package/dist/src/fixtures/mock-server.fixture.js.map +1 -0
  199. package/dist/src/fixtures/mongodb.fixture.d.ts +121 -0
  200. package/dist/src/fixtures/mongodb.fixture.d.ts.map +1 -0
  201. package/dist/src/fixtures/mongodb.fixture.js +258 -0
  202. package/dist/src/fixtures/mongodb.fixture.js.map +1 -0
  203. package/dist/src/fixtures/neo4j.fixture.d.ts +72 -0
  204. package/dist/src/fixtures/neo4j.fixture.d.ts.map +1 -0
  205. package/dist/src/fixtures/neo4j.fixture.js +202 -0
  206. package/dist/src/fixtures/neo4j.fixture.js.map +1 -0
  207. package/dist/src/fixtures/openapi.fixture.d.ts +101 -0
  208. package/dist/src/fixtures/openapi.fixture.d.ts.map +1 -0
  209. package/dist/src/fixtures/openapi.fixture.js +266 -0
  210. package/dist/src/fixtures/openapi.fixture.js.map +1 -0
  211. package/dist/src/fixtures/optional-package.d.ts +54 -0
  212. package/dist/src/fixtures/optional-package.d.ts.map +1 -0
  213. package/dist/src/fixtures/optional-package.js +79 -0
  214. package/dist/src/fixtures/optional-package.js.map +1 -0
  215. package/dist/src/fixtures/otp.fixture.d.ts +60 -0
  216. package/dist/src/fixtures/otp.fixture.d.ts.map +1 -0
  217. package/dist/src/fixtures/otp.fixture.js +101 -0
  218. package/dist/src/fixtures/otp.fixture.js.map +1 -0
  219. package/dist/src/fixtures/realtime.fixture.d.ts +205 -0
  220. package/dist/src/fixtures/realtime.fixture.d.ts.map +1 -0
  221. package/dist/src/fixtures/realtime.fixture.js +606 -0
  222. package/dist/src/fixtures/realtime.fixture.js.map +1 -0
  223. package/dist/src/fixtures/redis.fixture.d.ts +55 -0
  224. package/dist/src/fixtures/redis.fixture.d.ts.map +1 -0
  225. package/dist/src/fixtures/redis.fixture.js +209 -0
  226. package/dist/src/fixtures/redis.fixture.js.map +1 -0
  227. package/dist/src/fixtures/s3.fixture.d.ts +126 -0
  228. package/dist/src/fixtures/s3.fixture.d.ts.map +1 -0
  229. package/dist/src/fixtures/s3.fixture.js +296 -0
  230. package/dist/src/fixtures/s3.fixture.js.map +1 -0
  231. package/dist/src/fixtures/search.fixture.d.ts +178 -0
  232. package/dist/src/fixtures/search.fixture.d.ts.map +1 -0
  233. package/dist/src/fixtures/search.fixture.js +472 -0
  234. package/dist/src/fixtures/search.fixture.js.map +1 -0
  235. package/dist/src/fixtures/sqs.fixture.d.ts +172 -0
  236. package/dist/src/fixtures/sqs.fixture.d.ts.map +1 -0
  237. package/dist/src/fixtures/sqs.fixture.js +428 -0
  238. package/dist/src/fixtures/sqs.fixture.js.map +1 -0
  239. package/dist/src/index.d.ts +43 -0
  240. package/dist/src/index.d.ts.map +1 -0
  241. package/dist/src/index.js +48 -0
  242. package/dist/src/index.js.map +1 -0
  243. package/dist/src/mcp/guards.d.ts +21 -0
  244. package/dist/src/mcp/guards.d.ts.map +1 -0
  245. package/dist/src/mcp/guards.js +118 -0
  246. package/dist/src/mcp/guards.js.map +1 -0
  247. package/dist/src/mcp/project-tools.d.ts +14 -0
  248. package/dist/src/mcp/project-tools.d.ts.map +1 -0
  249. package/dist/src/mcp/project-tools.js +252 -0
  250. package/dist/src/mcp/project-tools.js.map +1 -0
  251. package/dist/src/mcp/protocol.d.ts +116 -0
  252. package/dist/src/mcp/protocol.d.ts.map +1 -0
  253. package/dist/src/mcp/protocol.js +199 -0
  254. package/dist/src/mcp/protocol.js.map +1 -0
  255. package/dist/src/mcp/server.d.ts +43 -0
  256. package/dist/src/mcp/server.d.ts.map +1 -0
  257. package/dist/src/mcp/server.js +244 -0
  258. package/dist/src/mcp/server.js.map +1 -0
  259. package/dist/src/mcp/test-tools.d.ts +65 -0
  260. package/dist/src/mcp/test-tools.d.ts.map +1 -0
  261. package/dist/src/mcp/test-tools.js +380 -0
  262. package/dist/src/mcp/test-tools.js.map +1 -0
  263. package/dist/src/mcp/tools.d.ts +49 -0
  264. package/dist/src/mcp/tools.d.ts.map +1 -0
  265. package/dist/src/mcp/tools.js +726 -0
  266. package/dist/src/mcp/tools.js.map +1 -0
  267. package/dist/src/network-error.d.ts +11 -0
  268. package/dist/src/network-error.d.ts.map +1 -0
  269. package/dist/src/network-error.js +34 -0
  270. package/dist/src/network-error.js.map +1 -0
  271. package/dist/src/openapi/contract.d.ts +98 -0
  272. package/dist/src/openapi/contract.d.ts.map +1 -0
  273. package/dist/src/openapi/contract.js +407 -0
  274. package/dist/src/openapi/contract.js.map +1 -0
  275. package/dist/src/openapi/generate.d.ts +89 -0
  276. package/dist/src/openapi/generate.d.ts.map +1 -0
  277. package/dist/src/openapi/generate.js +607 -0
  278. package/dist/src/openapi/generate.js.map +1 -0
  279. package/dist/src/openapi/load.d.ts +8 -0
  280. package/dist/src/openapi/load.d.ts.map +1 -0
  281. package/dist/src/openapi/load.js +26 -0
  282. package/dist/src/openapi/load.js.map +1 -0
  283. package/dist/src/package-manager.d.ts +58 -0
  284. package/dist/src/package-manager.d.ts.map +1 -0
  285. package/dist/src/package-manager.js +137 -0
  286. package/dist/src/package-manager.js.map +1 -0
  287. package/dist/src/reporter/history.d.ts +85 -0
  288. package/dist/src/reporter/history.d.ts.map +1 -0
  289. package/dist/src/reporter/history.js +147 -0
  290. package/dist/src/reporter/history.js.map +1 -0
  291. package/dist/src/reporter/index.d.ts +59 -0
  292. package/dist/src/reporter/index.d.ts.map +1 -0
  293. package/dist/src/reporter/index.js +201 -0
  294. package/dist/src/reporter/index.js.map +1 -0
  295. package/dist/src/reporter/last-run.d.ts +88 -0
  296. package/dist/src/reporter/last-run.d.ts.map +1 -0
  297. package/dist/src/reporter/last-run.js +133 -0
  298. package/dist/src/reporter/last-run.js.map +1 -0
  299. package/dist/src/reporter/quarantine.d.ts +62 -0
  300. package/dist/src/reporter/quarantine.d.ts.map +1 -0
  301. package/dist/src/reporter/quarantine.js +148 -0
  302. package/dist/src/reporter/quarantine.js.map +1 -0
  303. package/dist/src/secrets/index.d.ts +4 -0
  304. package/dist/src/secrets/index.d.ts.map +1 -0
  305. package/dist/src/secrets/index.js +3 -0
  306. package/dist/src/secrets/index.js.map +1 -0
  307. package/dist/src/secrets/provider.interface.d.ts +30 -0
  308. package/dist/src/secrets/provider.interface.d.ts.map +1 -0
  309. package/dist/src/secrets/provider.interface.js +2 -0
  310. package/dist/src/secrets/provider.interface.js.map +1 -0
  311. package/dist/src/secrets/providers/aws.provider.d.ts +33 -0
  312. package/dist/src/secrets/providers/aws.provider.d.ts.map +1 -0
  313. package/dist/src/secrets/providers/aws.provider.js +88 -0
  314. package/dist/src/secrets/providers/aws.provider.js.map +1 -0
  315. package/dist/src/secrets/providers/azure.provider.d.ts +26 -0
  316. package/dist/src/secrets/providers/azure.provider.d.ts.map +1 -0
  317. package/dist/src/secrets/providers/azure.provider.js +71 -0
  318. package/dist/src/secrets/providers/azure.provider.js.map +1 -0
  319. package/dist/src/secrets/providers/env-file.provider.d.ts +29 -0
  320. package/dist/src/secrets/providers/env-file.provider.d.ts.map +1 -0
  321. package/dist/src/secrets/providers/env-file.provider.js +56 -0
  322. package/dist/src/secrets/providers/env-file.provider.js.map +1 -0
  323. package/dist/src/secrets/providers/gitlab.provider.d.ts +26 -0
  324. package/dist/src/secrets/providers/gitlab.provider.d.ts.map +1 -0
  325. package/dist/src/secrets/providers/gitlab.provider.js +67 -0
  326. package/dist/src/secrets/providers/gitlab.provider.js.map +1 -0
  327. package/dist/src/secrets/providers/index.d.ts +52 -0
  328. package/dist/src/secrets/providers/index.d.ts.map +1 -0
  329. package/dist/src/secrets/providers/index.js +81 -0
  330. package/dist/src/secrets/providers/index.js.map +1 -0
  331. package/dist/src/secrets/providers/openbao.provider.d.ts +28 -0
  332. package/dist/src/secrets/providers/openbao.provider.d.ts.map +1 -0
  333. package/dist/src/secrets/providers/openbao.provider.js +29 -0
  334. package/dist/src/secrets/providers/openbao.provider.js.map +1 -0
  335. package/dist/src/secrets/providers/vault-compatible.d.ts +140 -0
  336. package/dist/src/secrets/providers/vault-compatible.d.ts.map +1 -0
  337. package/dist/src/secrets/providers/vault-compatible.js +405 -0
  338. package/dist/src/secrets/providers/vault-compatible.js.map +1 -0
  339. package/dist/src/secrets/providers/vault.provider.d.ts +27 -0
  340. package/dist/src/secrets/providers/vault.provider.d.ts.map +1 -0
  341. package/dist/src/secrets/providers/vault.provider.js +23 -0
  342. package/dist/src/secrets/providers/vault.provider.js.map +1 -0
  343. package/dist/src/secrets/secrets-manager.d.ts +67 -0
  344. package/dist/src/secrets/secrets-manager.d.ts.map +1 -0
  345. package/dist/src/secrets/secrets-manager.js +255 -0
  346. package/dist/src/secrets/secrets-manager.js.map +1 -0
  347. package/dist/src/steps/amqp.steps.d.ts +37 -0
  348. package/dist/src/steps/amqp.steps.d.ts.map +1 -0
  349. package/dist/src/steps/amqp.steps.js +86 -0
  350. package/dist/src/steps/amqp.steps.js.map +1 -0
  351. package/dist/src/steps/appium.steps.d.ts +53 -0
  352. package/dist/src/steps/appium.steps.d.ts.map +1 -0
  353. package/dist/src/steps/appium.steps.js +109 -0
  354. package/dist/src/steps/appium.steps.js.map +1 -0
  355. package/dist/src/steps/aws.steps.d.ts +47 -0
  356. package/dist/src/steps/aws.steps.d.ts.map +1 -0
  357. package/dist/src/steps/aws.steps.js +116 -0
  358. package/dist/src/steps/aws.steps.js.map +1 -0
  359. package/dist/src/steps/browser.steps.d.ts +54 -0
  360. package/dist/src/steps/browser.steps.d.ts.map +1 -0
  361. package/dist/src/steps/browser.steps.js +102 -0
  362. package/dist/src/steps/browser.steps.js.map +1 -0
  363. package/dist/src/steps/cassandra.steps.d.ts +32 -0
  364. package/dist/src/steps/cassandra.steps.d.ts.map +1 -0
  365. package/dist/src/steps/cassandra.steps.js +81 -0
  366. package/dist/src/steps/cassandra.steps.js.map +1 -0
  367. package/dist/src/steps/clickhouse.steps.d.ts +30 -0
  368. package/dist/src/steps/clickhouse.steps.d.ts.map +1 -0
  369. package/dist/src/steps/clickhouse.steps.js +73 -0
  370. package/dist/src/steps/clickhouse.steps.js.map +1 -0
  371. package/dist/src/steps/database.steps.d.ts +43 -0
  372. package/dist/src/steps/database.steps.d.ts.map +1 -0
  373. package/dist/src/steps/database.steps.js +79 -0
  374. package/dist/src/steps/database.steps.js.map +1 -0
  375. package/dist/src/steps/dynamodb.steps.d.ts +32 -0
  376. package/dist/src/steps/dynamodb.steps.d.ts.map +1 -0
  377. package/dist/src/steps/dynamodb.steps.js +89 -0
  378. package/dist/src/steps/dynamodb.steps.js.map +1 -0
  379. package/dist/src/steps/graphql.steps.d.ts +60 -0
  380. package/dist/src/steps/graphql.steps.d.ts.map +1 -0
  381. package/dist/src/steps/graphql.steps.js +76 -0
  382. package/dist/src/steps/graphql.steps.js.map +1 -0
  383. package/dist/src/steps/grpc.steps.d.ts +29 -0
  384. package/dist/src/steps/grpc.steps.d.ts.map +1 -0
  385. package/dist/src/steps/grpc.steps.js +68 -0
  386. package/dist/src/steps/grpc.steps.js.map +1 -0
  387. package/dist/src/steps/inbox.steps.d.ts +30 -0
  388. package/dist/src/steps/inbox.steps.d.ts.map +1 -0
  389. package/dist/src/steps/inbox.steps.js +72 -0
  390. package/dist/src/steps/inbox.steps.js.map +1 -0
  391. package/dist/src/steps/index.d.ts +43 -0
  392. package/dist/src/steps/index.d.ts.map +1 -0
  393. package/dist/src/steps/index.js +26 -0
  394. package/dist/src/steps/index.js.map +1 -0
  395. package/dist/src/steps/kafka.steps.d.ts +56 -0
  396. package/dist/src/steps/kafka.steps.d.ts.map +1 -0
  397. package/dist/src/steps/kafka.steps.js +61 -0
  398. package/dist/src/steps/kafka.steps.js.map +1 -0
  399. package/dist/src/steps/mock-server.steps.d.ts +21 -0
  400. package/dist/src/steps/mock-server.steps.d.ts.map +1 -0
  401. package/dist/src/steps/mock-server.steps.js +45 -0
  402. package/dist/src/steps/mock-server.steps.js.map +1 -0
  403. package/dist/src/steps/mongodb.steps.d.ts +107 -0
  404. package/dist/src/steps/mongodb.steps.d.ts.map +1 -0
  405. package/dist/src/steps/mongodb.steps.js +117 -0
  406. package/dist/src/steps/mongodb.steps.js.map +1 -0
  407. package/dist/src/steps/openapi.steps.d.ts +49 -0
  408. package/dist/src/steps/openapi.steps.d.ts.map +1 -0
  409. package/dist/src/steps/openapi.steps.js +113 -0
  410. package/dist/src/steps/openapi.steps.js.map +1 -0
  411. package/dist/src/steps/otp.steps.d.ts +43 -0
  412. package/dist/src/steps/otp.steps.d.ts.map +1 -0
  413. package/dist/src/steps/otp.steps.js +83 -0
  414. package/dist/src/steps/otp.steps.js.map +1 -0
  415. package/dist/src/steps/realtime.steps.d.ts +40 -0
  416. package/dist/src/steps/realtime.steps.d.ts.map +1 -0
  417. package/dist/src/steps/realtime.steps.js +116 -0
  418. package/dist/src/steps/realtime.steps.js.map +1 -0
  419. package/dist/src/steps/redis.steps.d.ts +54 -0
  420. package/dist/src/steps/redis.steps.d.ts.map +1 -0
  421. package/dist/src/steps/redis.steps.js +89 -0
  422. package/dist/src/steps/redis.steps.js.map +1 -0
  423. package/dist/src/steps/search.steps.d.ts +23 -0
  424. package/dist/src/steps/search.steps.d.ts.map +1 -0
  425. package/dist/src/steps/search.steps.js +54 -0
  426. package/dist/src/steps/search.steps.js.map +1 -0
  427. package/dist/src/test-data/factory.d.ts +82 -0
  428. package/dist/src/test-data/factory.d.ts.map +1 -0
  429. package/dist/src/test-data/factory.js +116 -0
  430. package/dist/src/test-data/factory.js.map +1 -0
  431. package/dist/src/test-data/index.d.ts +4 -0
  432. package/dist/src/test-data/index.d.ts.map +1 -0
  433. package/dist/src/test-data/index.js +4 -0
  434. package/dist/src/test-data/index.js.map +1 -0
  435. package/dist/src/test-data/registry.d.ts +37 -0
  436. package/dist/src/test-data/registry.d.ts.map +1 -0
  437. package/dist/src/test-data/registry.js +51 -0
  438. package/dist/src/test-data/registry.js.map +1 -0
  439. package/dist/src/test-data/tracking.d.ts +47 -0
  440. package/dist/src/test-data/tracking.d.ts.map +1 -0
  441. package/dist/src/test-data/tracking.js +166 -0
  442. package/dist/src/test-data/tracking.js.map +1 -0
  443. package/environments.json +263 -0
  444. package/package.json +299 -5
@@ -0,0 +1,164 @@
1
+ /**
2
+ * Error types for the Playwright Framework Template.
3
+ *
4
+ * All framework errors extend FrameworkError for consistent handling.
5
+ * Each error class includes contextual fields to aid debugging.
6
+ *
7
+ * Hierarchy:
8
+ * FrameworkError
9
+ * ├── ConfigurationError — config loading/validation failures
10
+ * ├── FixtureInitError — fixture setup failures (connection, init, boot, install)
11
+ * ├── FixtureOperationError — fixture runtime failures (query, produce, consume)
12
+ * ├── SecretsError — secrets fetching/resolution failures
13
+ * ├── DependencyError — fixture dependency resolution failures
14
+ * ├── MissingPackageError — a fixture's driver package isn't installed
15
+ * └── ContractError — an API request or response doesn't match the OpenAPI spec
16
+ */
17
+ /**
18
+ * Base error class for all framework errors.
19
+ */
20
+ export declare class FrameworkError extends Error {
21
+ constructor(message: string, options?: ErrorOptions);
22
+ }
23
+ /**
24
+ * Thrown when configuration loading or validation fails.
25
+ *
26
+ * Contextual fields:
27
+ * - missingKeys: list of missing config keys with their expected source
28
+ * - filePath: path to the config file that failed to load/parse
29
+ * - parseError: description of the parse failure
30
+ */
31
+ export declare class ConfigurationError extends FrameworkError {
32
+ readonly missingKeys: Array<{
33
+ key: string;
34
+ source: string;
35
+ }>;
36
+ readonly filePath?: string | undefined;
37
+ readonly parseError?: string | undefined;
38
+ constructor(missingKeys: Array<{
39
+ key: string;
40
+ source: string;
41
+ }>, filePath?: string | undefined, parseError?: string | undefined);
42
+ }
43
+ /**
44
+ * Thrown when a fixture fails during setup/initialization.
45
+ *
46
+ * Contextual fields via details:
47
+ * - host, port: for connection failures (database, redis)
48
+ * - specPath/specUrl: for OpenAPI spec load failures
49
+ * - brokerAddress: for Kafka connection failures
50
+ * - serverUrl, capabilities: for Appium session failures (credentials redacted)
51
+ * - timeout: timeout value that was exceeded
52
+ * - reason: human-readable failure reason
53
+ */
54
+ export declare class FixtureInitError extends FrameworkError {
55
+ readonly fixtureName: string;
56
+ readonly operation: 'connect' | 'init' | 'boot' | 'install';
57
+ readonly details: Record<string, unknown>;
58
+ readonly cause?: Error | undefined;
59
+ constructor(fixtureName: string, operation: 'connect' | 'init' | 'boot' | 'install', details: Record<string, unknown>, cause?: Error | undefined);
60
+ }
61
+ /**
62
+ * Thrown when a fixture operation fails at runtime.
63
+ *
64
+ * Contextual fields via details:
65
+ * - sql: the SQL statement that failed (database)
66
+ * - topic: the Kafka topic involved (kafka)
67
+ * - reason: human-readable failure reason
68
+ * - timeout: timeout value that was exceeded
69
+ */
70
+ export declare class FixtureOperationError extends FrameworkError {
71
+ readonly fixtureName: string;
72
+ readonly operation: 'query' | 'produce' | 'consume' | 'find' | 'findOne' | 'insertOne' | 'insertMany' | 'updateOne' | 'updateMany' | 'deleteOne' | 'deleteMany' | 'aggregate' | 'run' | 'write' | 'transaction' | 'command' | 'release' | 'waitForMessage' | 'extractCode' | 'extractLink' | 'send' | 'stub' | 'verify' | 'insert' | 'build' | 'cleanup' | 'publish' | 'sendToQueue' | 'listen' | 'purge' | 'checkQueue' | 'exchangeExists' | 'assertQueue' | 'assertExchange' | 'bindQueue' | 'json' | 'putObject' | 'getObject' | 'headObject' | 'listObjects' | 'deleteObject' | 'createBucket' | 'receive' | 'createQueue' | 'createTopic' | 'waitForObject' | 'index' | 'get' | 'search' | 'count' | 'deleteByQuery' | 'createIndex' | 'deleteIndex' | 'refresh' | 'request' | 'waitForDocument' | 'call' | 'serverStream' | 'clientStream' | 'bidiStream' | 'loadProtos' | 'reflection' | 'connect' | 'subscribe' | 'waitForClose' | 'put' | 'update' | 'delete' | 'scan' | 'createTable' | 'deleteTable' | 'waitForItem' | 'execute' | 'batch' | 'createKeyspace' | 'waitForRows' | 'createDatabase';
73
+ readonly details: Record<string, unknown>;
74
+ readonly cause?: Error | undefined;
75
+ constructor(fixtureName: string, operation: 'query' | 'produce' | 'consume' | 'find' | 'findOne' | 'insertOne' | 'insertMany' | 'updateOne' | 'updateMany' | 'deleteOne' | 'deleteMany' | 'aggregate' | 'run' | 'write' | 'transaction' | 'command' | 'release' | 'waitForMessage' | 'extractCode' | 'extractLink' | 'send' | 'stub' | 'verify' | 'insert' | 'build' | 'cleanup' | 'publish' | 'sendToQueue' | 'listen' | 'purge' | 'checkQueue' | 'exchangeExists' | 'assertQueue' | 'assertExchange' | 'bindQueue' | 'json' | 'putObject' | 'getObject' | 'headObject' | 'listObjects' | 'deleteObject' | 'createBucket' | 'receive' | 'createQueue' | 'createTopic' | 'waitForObject' | 'index' | 'get' | 'search' | 'count' | 'deleteByQuery' | 'createIndex' | 'deleteIndex' | 'refresh' | 'request' | 'waitForDocument' | 'call' | 'serverStream' | 'clientStream' | 'bidiStream' | 'loadProtos' | 'reflection' | 'connect' | 'subscribe' | 'waitForClose' | 'put' | 'update' | 'delete' | 'scan' | 'createTable' | 'deleteTable' | 'waitForItem' | 'execute' | 'batch' | 'createKeyspace' | 'waitForRows' | 'createDatabase', details: Record<string, unknown>, cause?: Error | undefined);
76
+ }
77
+ /**
78
+ * Thrown when secrets fetching or resolution fails.
79
+ *
80
+ * Contextual fields:
81
+ * - providerName: the secrets provider that was used
82
+ * - operation: what was being attempted (fetch, timeout, resolve, mapping)
83
+ * - secretKey: the specific secret key involved
84
+ * - details: additional context (available providers, invalid field, etc.)
85
+ */
86
+ export declare class SecretsError extends FrameworkError {
87
+ readonly providerName: string;
88
+ readonly operation: 'fetch' | 'timeout' | 'resolve' | 'mapping';
89
+ readonly secretKey?: string | undefined;
90
+ readonly details?: Record<string, unknown> | undefined;
91
+ readonly cause?: Error | undefined;
92
+ constructor(providerName: string, operation: 'fetch' | 'timeout' | 'resolve' | 'mapping', secretKey?: string | undefined, details?: Record<string, unknown> | undefined, cause?: Error | undefined);
93
+ }
94
+ /**
95
+ * Thrown when fixture dependency resolution fails.
96
+ *
97
+ * Contextual fields:
98
+ * - fixtureName: the fixture that has the dependency issue
99
+ * - missingDependency: name of the unresolved dependency
100
+ * - cycleParticipants: list of fixture names involved in a circular dependency
101
+ */
102
+ export declare class DependencyError extends FrameworkError {
103
+ readonly fixtureName: string;
104
+ readonly missingDependency?: string | undefined;
105
+ readonly cycleParticipants?: string[] | undefined;
106
+ constructor(fixtureName: string, missingDependency?: string | undefined, cycleParticipants?: string[] | undefined);
107
+ }
108
+ /**
109
+ * Thrown when a fixture is used but the package it needs (its "driver") isn't
110
+ * installed. Drivers are optional peer dependencies, so a project installs
111
+ * only the ones for the fixtures it uses.
112
+ *
113
+ * Contextual fields:
114
+ * - `fixtureName`: the fixture that needs the package (e.g. `kafkaClient`)
115
+ * - `packageName`: the package that couldn't be loaded (e.g. `kafkajs`)
116
+ * - `installCommand`: the command that fixes it
117
+ */
118
+ export declare class MissingPackageError extends FrameworkError {
119
+ readonly fixtureName: string;
120
+ readonly packageName: string;
121
+ readonly installCommand: string;
122
+ constructor(fixtureName: string, packageName: string, packages?: string[], options?: ErrorOptions);
123
+ }
124
+ /** One way a request or response body breaks the OpenAPI spec. */
125
+ export interface ContractViolation {
126
+ /** JSON path of the offending value: `$` (the body), `$.items[2].price`, ... */
127
+ path: string;
128
+ /** What is wrong, e.g. `must be integer`, `is required`. */
129
+ message: string;
130
+ /** What the schema expects (a type, the allowed values, a limit), when there is one. */
131
+ expected?: unknown;
132
+ /** The value found at `path` (absent for a missing property). */
133
+ actual?: unknown;
134
+ }
135
+ /**
136
+ * Thrown when a request or response doesn't match the OpenAPI spec
137
+ * (`openapi.validateResponses` / `validateRequests`, or
138
+ * `OpenApiSteps.verifyMatchesSchema`).
139
+ *
140
+ * Contextual fields:
141
+ * - `operationId`, `method`, `path`: the operation the message was checked against
142
+ * - `kind`: `request` or `response`
143
+ * - `status`, `contentType`: what was checked
144
+ * - `violations`: each mismatch with its JSON path, expected and actual value
145
+ */
146
+ export declare class ContractError extends FrameworkError {
147
+ readonly kind: 'request' | 'response';
148
+ readonly operation: {
149
+ operationId?: string;
150
+ method: string;
151
+ path: string;
152
+ };
153
+ readonly violations: ContractViolation[];
154
+ readonly status?: number | undefined;
155
+ readonly contentType?: string | undefined;
156
+ constructor(kind: 'request' | 'response', operation: {
157
+ operationId?: string;
158
+ method: string;
159
+ path: string;
160
+ }, violations: ContractViolation[], status?: number | undefined, contentType?: string | undefined, options?: ErrorOptions);
161
+ }
162
+ /** One line per violation: `$.id: must be integer (expected integer, got "abc")`. */
163
+ export declare function formatViolation(v: ContractViolation): string;
164
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH;;GAEG;AACH,qBAAa,cAAe,SAAQ,KAAK;IACrC,YAAY,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,EAIlD;CACJ;AAED;;;;;;;GAOG;AACH,qBAAa,kBAAmB,SAAQ,cAAc;aAE9B,WAAW,EAAE,KAAK,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;aACnD,QAAQ,CAAC,EAAE,MAAM;aACjB,UAAU,CAAC,EAAE,MAAM;IAHvC,YACoB,WAAW,EAAE,KAAK,CAAC;QAAE,GAAG,EAAE,MAAM,CA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,YACoB,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,EACnC,QAAQ,GAAE,MAAM,EAAkB,EAClC,OAAO,CAAC,EAAE,YAAY,EAUzB;CACJ;AAED,kEAAkE;AAClE,MAAM,WAAW,iBAAiB;IAC9B,gFAAgF;IAChF,IAAI,EAAE,MAAM,CAAC;IACb,4DAA4D;IAC5D,OAAO,EAAE,MAAM,CAAC;IAChB,wFAAwF;IACxF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iEAAiE;IACjE,MAAM,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;;;;;;;GAUG;AACH,qBAAa,aAAc,SAAQ,cAAc;aAEzB,IAAI,EAAE,SAAS,GAAG,UAAU;aAC5B,SAAS,EAAE;QAAE,WAAW,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE;aACjE,UAAU,EAAE,iBAAiB,EAAE;aAC/B,MAAM,CAAC,EAAE,MAAM;aACf,WAAW,CAAC,EAAE,MAAM;IALxC,YACoB,IAAI,EAAE,SAAS,GAAG,UAAU,EAC5B,SAAS,EAAE;QAAE,WAAW,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EACjE,UAAU,EAAE,iBAAiB,EAAE,EAC/B,MAAM,CAAC,EAAE,MAAM,YAAA,EACf,WAAW,CAAC,EAAE,MAAM,YAAA,EACpC,OAAO,CAAC,EAAE,YAAY,EAIzB;CACJ;AAUD,qFAAqF;AACrF,wBAAgB,eAAe,CAAC,CAAC,EAAE,iBAAiB,GAAG,MAAM,CAK5D"}
@@ -0,0 +1,267 @@
1
+ /**
2
+ * Error types for the Playwright Framework Template.
3
+ *
4
+ * All framework errors extend FrameworkError for consistent handling.
5
+ * Each error class includes contextual fields to aid debugging.
6
+ *
7
+ * Hierarchy:
8
+ * FrameworkError
9
+ * ├── ConfigurationError — config loading/validation failures
10
+ * ├── FixtureInitError — fixture setup failures (connection, init, boot, install)
11
+ * ├── FixtureOperationError — fixture runtime failures (query, produce, consume)
12
+ * ├── SecretsError — secrets fetching/resolution failures
13
+ * ├── DependencyError — fixture dependency resolution failures
14
+ * ├── MissingPackageError — a fixture's driver package isn't installed
15
+ * └── ContractError — an API request or response doesn't match the OpenAPI spec
16
+ */
17
+ import { packageCommand, packageManager } from './package-manager.js';
18
+ /**
19
+ * Base error class for all framework errors.
20
+ */
21
+ export class FrameworkError extends Error {
22
+ constructor(message, options) {
23
+ super(message, options);
24
+ this.name = 'FrameworkError';
25
+ Object.setPrototypeOf(this, new.target.prototype);
26
+ }
27
+ }
28
+ /**
29
+ * Thrown when configuration loading or validation fails.
30
+ *
31
+ * Contextual fields:
32
+ * - missingKeys: list of missing config keys with their expected source
33
+ * - filePath: path to the config file that failed to load/parse
34
+ * - parseError: description of the parse failure
35
+ */
36
+ export class ConfigurationError extends FrameworkError {
37
+ missingKeys;
38
+ filePath;
39
+ parseError;
40
+ constructor(missingKeys, filePath, parseError) {
41
+ super(formatConfigError(missingKeys, filePath, parseError));
42
+ this.missingKeys = missingKeys;
43
+ this.filePath = filePath;
44
+ this.parseError = parseError;
45
+ this.name = 'ConfigurationError';
46
+ }
47
+ }
48
+ /**
49
+ * Thrown when a fixture fails during setup/initialization.
50
+ *
51
+ * Contextual fields via details:
52
+ * - host, port: for connection failures (database, redis)
53
+ * - specPath/specUrl: for OpenAPI spec load failures
54
+ * - brokerAddress: for Kafka connection failures
55
+ * - serverUrl, capabilities: for Appium session failures (credentials redacted)
56
+ * - timeout: timeout value that was exceeded
57
+ * - reason: human-readable failure reason
58
+ */
59
+ export class FixtureInitError extends FrameworkError {
60
+ fixtureName;
61
+ operation;
62
+ details;
63
+ cause;
64
+ constructor(fixtureName, operation, details, cause) {
65
+ super(formatFixtureError(fixtureName, operation, details), cause ? { cause } : undefined);
66
+ this.fixtureName = fixtureName;
67
+ this.operation = operation;
68
+ this.details = details;
69
+ this.cause = cause;
70
+ this.name = 'FixtureInitError';
71
+ }
72
+ }
73
+ /**
74
+ * Thrown when a fixture operation fails at runtime.
75
+ *
76
+ * Contextual fields via details:
77
+ * - sql: the SQL statement that failed (database)
78
+ * - topic: the Kafka topic involved (kafka)
79
+ * - reason: human-readable failure reason
80
+ * - timeout: timeout value that was exceeded
81
+ */
82
+ export class FixtureOperationError extends FrameworkError {
83
+ fixtureName;
84
+ operation;
85
+ details;
86
+ cause;
87
+ constructor(fixtureName, operation, details, cause) {
88
+ super(formatFixtureError(fixtureName, operation, details), cause ? { cause } : undefined);
89
+ this.fixtureName = fixtureName;
90
+ this.operation = operation;
91
+ this.details = details;
92
+ this.cause = cause;
93
+ this.name = 'FixtureOperationError';
94
+ }
95
+ }
96
+ /**
97
+ * Thrown when secrets fetching or resolution fails.
98
+ *
99
+ * Contextual fields:
100
+ * - providerName: the secrets provider that was used
101
+ * - operation: what was being attempted (fetch, timeout, resolve, mapping)
102
+ * - secretKey: the specific secret key involved
103
+ * - details: additional context (available providers, invalid field, etc.)
104
+ */
105
+ export class SecretsError extends FrameworkError {
106
+ providerName;
107
+ operation;
108
+ secretKey;
109
+ details;
110
+ cause;
111
+ constructor(providerName, operation, secretKey, details, cause) {
112
+ super(formatSecretsError(providerName, operation, secretKey, details), cause ? { cause } : undefined);
113
+ this.providerName = providerName;
114
+ this.operation = operation;
115
+ this.secretKey = secretKey;
116
+ this.details = details;
117
+ this.cause = cause;
118
+ this.name = 'SecretsError';
119
+ }
120
+ }
121
+ /**
122
+ * Thrown when fixture dependency resolution fails.
123
+ *
124
+ * Contextual fields:
125
+ * - fixtureName: the fixture that has the dependency issue
126
+ * - missingDependency: name of the unresolved dependency
127
+ * - cycleParticipants: list of fixture names involved in a circular dependency
128
+ */
129
+ export class DependencyError extends FrameworkError {
130
+ fixtureName;
131
+ missingDependency;
132
+ cycleParticipants;
133
+ constructor(fixtureName, missingDependency, cycleParticipants) {
134
+ super(formatDependencyError(fixtureName, missingDependency, cycleParticipants));
135
+ this.fixtureName = fixtureName;
136
+ this.missingDependency = missingDependency;
137
+ this.cycleParticipants = cycleParticipants;
138
+ this.name = 'DependencyError';
139
+ }
140
+ }
141
+ /**
142
+ * Thrown when a fixture is used but the package it needs (its "driver") isn't
143
+ * installed. Drivers are optional peer dependencies, so a project installs
144
+ * only the ones for the fixtures it uses.
145
+ *
146
+ * Contextual fields:
147
+ * - `fixtureName`: the fixture that needs the package (e.g. `kafkaClient`)
148
+ * - `packageName`: the package that couldn't be loaded (e.g. `kafkajs`)
149
+ * - `installCommand`: the command that fixes it
150
+ */
151
+ export class MissingPackageError extends FrameworkError {
152
+ fixtureName;
153
+ packageName;
154
+ installCommand;
155
+ constructor(fixtureName, packageName, packages = [packageName], options) {
156
+ const installCommand = packageCommand(packageManager(process.cwd()), 'install', packages).join(' ');
157
+ super(`The "${fixtureName}" fixture needs the "${packageName}" package, which isn't installed.\n` +
158
+ ` Install it with: ${installCommand}`, options);
159
+ this.fixtureName = fixtureName;
160
+ this.packageName = packageName;
161
+ this.name = 'MissingPackageError';
162
+ this.installCommand = installCommand;
163
+ }
164
+ }
165
+ /**
166
+ * Thrown when a request or response doesn't match the OpenAPI spec
167
+ * (`openapi.validateResponses` / `validateRequests`, or
168
+ * `OpenApiSteps.verifyMatchesSchema`).
169
+ *
170
+ * Contextual fields:
171
+ * - `operationId`, `method`, `path`: the operation the message was checked against
172
+ * - `kind`: `request` or `response`
173
+ * - `status`, `contentType`: what was checked
174
+ * - `violations`: each mismatch with its JSON path, expected and actual value
175
+ */
176
+ export class ContractError extends FrameworkError {
177
+ kind;
178
+ operation;
179
+ violations;
180
+ status;
181
+ contentType;
182
+ constructor(kind, operation, violations, status, contentType, options) {
183
+ super(formatContractError(kind, operation, violations, status, contentType), options);
184
+ this.kind = kind;
185
+ this.operation = operation;
186
+ this.violations = violations;
187
+ this.status = status;
188
+ this.contentType = contentType;
189
+ this.name = 'ContractError';
190
+ }
191
+ }
192
+ const MAX_LISTED_VIOLATIONS = 20;
193
+ function describeValue(value) {
194
+ if (value === undefined)
195
+ return 'undefined';
196
+ const json = JSON.stringify(value);
197
+ return json.length > 80 ? `${json.slice(0, 77)}...` : json;
198
+ }
199
+ /** One line per violation: `$.id: must be integer (expected integer, got "abc")`. */
200
+ export function formatViolation(v) {
201
+ const extra = [];
202
+ if (v.expected !== undefined)
203
+ extra.push(`expected ${typeof v.expected === 'string' ? v.expected : describeValue(v.expected)}`);
204
+ if ('actual' in v)
205
+ extra.push(`got ${describeValue(v.actual)}`);
206
+ return `${v.path}: ${v.message}${extra.length ? ` (${extra.join(', ')})` : ''}`;
207
+ }
208
+ function formatContractError(kind, operation, violations, status, contentType) {
209
+ const where = `${operation.method.toUpperCase()} ${operation.path}`;
210
+ const name = operation.operationId ? `${operation.operationId} (${where})` : where;
211
+ const what = kind === 'response'
212
+ ? `The response from ${name}${status !== undefined ? ` with status ${status}` : ''}${contentType ? ` (${contentType})` : ''}`
213
+ : `The request body for ${name}${contentType ? ` (${contentType})` : ''}`;
214
+ const listed = violations.slice(0, MAX_LISTED_VIOLATIONS).map((v) => ` - ${formatViolation(v)}`);
215
+ if (violations.length > MAX_LISTED_VIOLATIONS)
216
+ listed.push(` ... and ${violations.length - MAX_LISTED_VIOLATIONS} more`);
217
+ return `${what} doesn't match the OpenAPI spec:\n${listed.join('\n')}`;
218
+ }
219
+ // --- Formatting helpers ---
220
+ function formatConfigError(missingKeys, filePath, parseError) {
221
+ const parts = ['Configuration error'];
222
+ if (filePath && parseError) {
223
+ parts.push(`failed to parse "${filePath}": ${parseError}`);
224
+ }
225
+ else if (filePath) {
226
+ parts.push(`file "${filePath}" could not be loaded`);
227
+ }
228
+ else if (parseError) {
229
+ parts.push(parseError);
230
+ }
231
+ if (missingKeys.length > 0) {
232
+ const keyList = missingKeys
233
+ .map(({ key, source }) => `"${key}" (expected in ${source})`)
234
+ .join(', ');
235
+ parts.push(`missing keys: ${keyList}`);
236
+ }
237
+ return parts.join(': ');
238
+ }
239
+ function formatFixtureError(fixtureName, operation, details) {
240
+ const detailStr = Object.entries(details)
241
+ .map(([k, v]) => `${k}=${JSON.stringify(v)}`)
242
+ .join(', ');
243
+ return `Fixture "${fixtureName}" ${operation} failed: ${detailStr}`;
244
+ }
245
+ function formatSecretsError(providerName, operation, secretKey, details) {
246
+ const parts = [`Secrets error [${providerName}] ${operation}`];
247
+ if (secretKey) {
248
+ parts.push(`key="${secretKey}"`);
249
+ }
250
+ if (details && Object.keys(details).length > 0) {
251
+ const detailStr = Object.entries(details)
252
+ .map(([k, v]) => `${k}=${JSON.stringify(v)}`)
253
+ .join(', ');
254
+ parts.push(detailStr);
255
+ }
256
+ return parts.join(': ');
257
+ }
258
+ function formatDependencyError(fixtureName, missingDependency, cycleParticipants) {
259
+ if (cycleParticipants && cycleParticipants.length > 0) {
260
+ return `Circular dependency detected: ${cycleParticipants.join(' → ')} → ${cycleParticipants[0]}`;
261
+ }
262
+ if (missingDependency) {
263
+ return `Fixture "${fixtureName}" depends on "${missingDependency}" which is not registered`;
264
+ }
265
+ return `Dependency error in fixture "${fixtureName}"`;
266
+ }
267
+ //# sourceMappingURL=errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtE;;GAEG;AACH,MAAM,OAAO,cAAe,SAAQ,KAAK;IACrC,YAAY,OAAe,EAAE,OAAsB;QAC/C,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACxB,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC;QAC7B,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,IAAI,MAAM,CAAC,SAAS,CAAC,CAAC;IACtD,CAAC;CACJ;AAED;;;;;;;GAOG;AACH,MAAM,OAAO,kBAAmB,SAAQ,cAAc;I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/ AMQP 0-9-1 fixture.
3
+ *
4
+ * `amqpClient` publishes messages and checks what an application published,
5
+ * without taking messages away from it:
6
+ *
7
+ * - `publish()` / `sendToQueue()` wait for the broker's confirm, and fail when
8
+ * no queue is bound for the routing key (a message that would be dropped).
9
+ * - `listen(exchange, bindingKey)` binds a temporary, exclusive queue to the
10
+ * exchange. The app's own queues keep getting their copies; the test reads
11
+ * its copy from the listener.
12
+ * - `consume(queue)` takes messages from a named queue: for a queue the test
13
+ * owns, or one whose messages the test means to remove.
14
+ * - Queues, exchanges and bindings declared through the client are deleted
15
+ * again when the test ends.
16
+ *
17
+ * Uses amqplib, an optional peer dependency loaded on first use.
18
+ */
19
+ import type { ConsumeMessage, Message, Options } from 'amqplib';
20
+ import type { ContainerManager } from '../containers/container-manager.js';
21
+ import type { AmqpFixtureConfig } from '../config/schema.js';
22
+ import type { CleanupRegistry, KeepOption } from '../test-data/registry.js';
23
+ /** A message body: a string or Buffer is sent as is, anything else as JSON. */
24
+ export type AmqpBody = string | Buffer | Record<string, unknown> | unknown[] | number | boolean | null;
25
+ /** Message properties for `publish()` and `sendToQueue()`. */
26
+ export interface AmqpPublishOptions {
27
+ headers?: Record<string, unknown>;
28
+ /** Default: `application/json` for an object body, `text/plain` for a string, none for a Buffer. */
29
+ contentType?: string;
30
+ contentEncoding?: string;
31
+ correlationId?: string;
32
+ messageId?: string;
33
+ replyTo?: string;
34
+ type?: string;
35
+ appId?: string;
36
+ userId?: string;
37
+ priority?: number;
38
+ /** Milliseconds until the message expires in a queue. */
39
+ expiration?: string | number;
40
+ /** Seconds since the epoch. */
41
+ timestamp?: number;
42
+ /** Survive a broker restart (delivery mode 2). Default: false. */
43
+ persistent?: boolean;
44
+ /**
45
+ * Fail when no queue is bound for the routing key (default: true). The
46
+ * broker would drop such a message silently, which in a test is almost
47
+ * always a wrong exchange or routing key. Set false to allow it.
48
+ */
49
+ mandatory?: boolean;
50
+ }
51
+ /** A received message. */
52
+ export interface AmqpMessage {
53
+ /** The body decoded as UTF-8. */
54
+ body: string;
55
+ /** The raw body. */
56
+ content: Buffer;
57
+ /** The body parsed as JSON; throws when it isn't JSON. */
58
+ json<T = unknown>(): T;
59
+ exchange: string;
60
+ routingKey: string;
61
+ redelivered: boolean;
62
+ headers: Record<string, unknown>;
63
+ /** Every AMQP property (contentType, correlationId, messageId, type, timestamp, ...). */
64
+ properties: Message['properties'];
65
+ }
66
+ export interface AmqpWaitOptions {
67
+ /** Milliseconds to wait (default: the config's `timeout`, else 10000). */
68
+ timeout?: number;
69
+ }
70
+ export interface AmqpConsumeOptions extends AmqpWaitOptions {
71
+ /** Stop after this many messages (default: 1). */
72
+ count?: number;
73
+ }
74
+ export interface AmqpListenOptions {
75
+ /** Binding arguments, e.g. `{ 'x-match': 'all', type: 'order' }` for a headers exchange. */
76
+ arguments?: Record<string, unknown>;
77
+ }
78
+ /**
79
+ * A temporary queue bound to an exchange. It receives a copy of every
80
+ * matching message published after `listen()` resolved, and is deleted when
81
+ * the test ends (or on `close()`).
82
+ */
83
+ export interface AmqpListener {
84
+ readonly queue: string;
85
+ readonly exchange: string;
86
+ readonly bindingKey: string;
87
+ /** Every message received so far, oldest first. */
88
+ readonly received: readonly AmqpMessage[];
89
+ /** Waits until `count` messages (default 1) have arrived, or the timeout; returns what arrived. */
90
+ messages(options?: AmqpConsumeOptions): Promise<AmqpMessage[]>;
91
+ /**
92
+ * The first message (received so far, or still to come) that matches
93
+ * `predicate`. Throws on timeout, listing what arrived instead.
94
+ */
95
+ waitForMessage(predicate?: (message: AmqpMessage) => boolean, options?: AmqpWaitOptions): Promise<AmqpMessage>;
96
+ close(): Promise<void>;
97
+ }
98
+ export interface AmqpQueueInfo {
99
+ queue: string;
100
+ messageCount: number;
101
+ consumerCount: number;
102
+ }
103
+ export type AmqpAssertQueueOptions = Options.AssertQueue & KeepOption;
104
+ export type AmqpAssertExchangeOptions = Options.AssertExchange & KeepOption;
105
+ export interface AmqpClient {
106
+ /** Publishes to an exchange (`''` is the default exchange) and waits for the broker's confirm. */
107
+ publish(exchange: string, routingKey: string, message: AmqpBody, options?: AmqpPublishOptions): Promise<void>;
108
+ /** Publishes straight to a queue through the default exchange. */
109
+ sendToQueue(queue: string, message: AmqpBody, options?: AmqpPublishOptions): Promise<void>;
110
+ /** Binds a temporary queue to `exchange`; `bindingKey` defaults to `#` (everything on a topic exchange). */
111
+ listen(exchange: string, bindingKey?: string, options?: AmqpListenOptions): Promise<AmqpListener>;
112
+ /** Takes up to `count` messages (default 1) from a queue, acknowledging them. Returns what arrived before the timeout. */
113
+ consume(queue: string, options?: AmqpConsumeOptions): Promise<AmqpMessage[]>;
114
+ /** Removes every ready message from a queue; returns how many. */
115
+ purge(queue: string): Promise<number>;
116
+ /** Message and consumer counts of a queue, or null when it doesn't exist. */
117
+ checkQueue(queue: string): Promise<AmqpQueueInfo | null>;
118
+ /** True when the exchange exists. */
119
+ exchangeExists(exchange: string): Promise<boolean>;
120
+ /**
121
+ * Declares a queue; returns its name (the broker picks one for `''`).
122
+ * Deleted when the test ends, unless `{ keep: true }` or it already existed.
123
+ */
124
+ assertQueue(queue: string, options?: AmqpAssertQueueOptions): Promise<string>;
125
+ /** Declares an exchange. Deleted when the test ends, unless `{ keep: true }` or it already existed. */
126
+ assertExchange(exchange: string, type: 'direct' | 'topic' | 'fanout' | 'headers' | string, options?: AmqpAssertExchangeOptions): Promise<void>;
127
+ /** Binds a queue to an exchange. Unbound when the test ends, unless `{ keep: true }`. */
128
+ bindQueue(queue: string, exchange: string, pattern: string, options?: KeepOption & {
129
+ arguments?: Record<string, unknown>;
130
+ }): Promise<void>;
131
+ /** Closes the connection (the fixture also does this after the test). */
132
+ close(): Promise<void>;
133
+ }
134
+ /** The broker URL for a config: `url` as is, else built from host, port, credentials and vhost. */
135
+ export declare function amqpUrl(config: AmqpFixtureConfig): string;
136
+ /** The URL with its password replaced, for error messages. */
137
+ export declare function redactAmqpUrl(url: string): string;
138
+ /** Encodes a body and fills in the content type it implies. */
139
+ export declare function encodeBody(message: AmqpBody, contentType?: string): {
140
+ content: Buffer;
141
+ contentType?: string;
142
+ };
143
+ /** Turns an amqplib message into an AmqpMessage. */
144
+ export declare function toAmqpMessage(msg: Pick<ConsumeMessage, 'content' | 'fields' | 'properties'>): AmqpMessage;
145
+ /** Adds what to do to broker errors whose message doesn't say it. */
146
+ export declare function explainBrokerError(reason: string): string;
147
+ /**
148
+ * Connects and builds the client. `registry` records the undo for declared
149
+ * queues, exchanges and bindings; without one nothing is cleaned up.
150
+ */
151
+ export declare function createAmqpClient(config: AmqpFixtureConfig, registry?: CleanupRegistry): Promise<AmqpClient>;
152
+ /**
153
+ * Fixture definition for test.extend(). The connection is per test; the undo
154
+ * actions for declared queues, exchanges and bindings run before it closes.
155
+ */
156
+ export declare const amqpFixture: {
157
+ amqpClient: ({ amqp, stagehandContainers, dataCleanup }: {
158
+ amqp: AmqpFixtureConfig | undefined;
159
+ stagehandContainers: ContainerManager;
160
+ dataCleanup: CleanupRegistry;
161
+ }, use: (client: AmqpClient) => Promise<void>) => Promise<void>;
162
+ };
163
+ //# sourceMappingURL=amqp.fixture.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"amqp.fixture.d.ts","sourceRoot":"","sources":["../../../src/fixtures/amqp.fixture.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAyC,cAAc,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAEvG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAE5E,+EAA+E;AAC/E,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,EAAE,GAAG,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