@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,773 @@
1
+ /**
2
+ * What each fixture needs in a project: its driver packages, its block in
3
+ * environments.json, its PW_* variables, a compose service to run the
4
+ * backend locally, and a starter test. `propmaster fixture add|remove`
5
+ * applies it; doctor and `propmaster env` read it.
6
+ *
7
+ * Keep in step with FIXTURE_PACKAGES (src/fixtures/optional-package.ts), the
8
+ * config schema (src/config/schema.ts) and compose.test.yaml; the unit tests
9
+ * compare them.
10
+ */
11
+ /** Placeholder for values each environment has to fill in itself. */
12
+ export const PLACEHOLDER = 'CHANGE_ME';
13
+ const section = (group, title, vars) => ({ group, title, vars });
14
+ const service = (name, lines) => ({ name, yaml: [` ${name}:`, ...lines.map((l) => ` ${l}`)].join('\n') });
15
+ const one = (v) => [{ id: 'default', label: 'default', ...v }];
16
+ // ─── Services (the same images and ports as Propmaster's own compose.test.yaml) ─
17
+ const SERVICES = {
18
+ postgres: service('postgres', [
19
+ 'image: postgres:15',
20
+ 'environment:',
21
+ ' POSTGRES_DB: testdb',
22
+ ' POSTGRES_USER: testuser',
23
+ ' POSTGRES_PASSWORD: testpass',
24
+ 'ports: ["127.0.0.1:5432:5432"]',
25
+ 'healthcheck:',
26
+ ' test: ["CMD-SHELL", "pg_isready -U testuser -d testdb"]',
27
+ ' interval: 2s',
28
+ ' retries: 30',
29
+ ]),
30
+ mysql: service('mysql', [
31
+ 'image: mysql:8.0',
32
+ 'environment:',
33
+ ' MYSQL_DATABASE: testdb',
34
+ ' MYSQL_USER: testuser',
35
+ ' MYSQL_PASSWORD: testpass',
36
+ ' MYSQL_ROOT_PASSWORD: rootpass',
37
+ 'ports: ["127.0.0.1:3306:3306"]',
38
+ 'healthcheck:',
39
+ ' test: ["CMD", "mysqladmin", "ping", "-h", "127.0.0.1"]',
40
+ ' interval: 2s',
41
+ ' retries: 60',
42
+ ]),
43
+ mssql: service('mssql', [
44
+ 'image: mcr.microsoft.com/mssql/server:2022-latest',
45
+ 'environment:',
46
+ ' ACCEPT_EULA: "Y"',
47
+ ' MSSQL_SA_PASSWORD: "TestPass123!"',
48
+ 'ports: ["127.0.0.1:1433:1433"]',
49
+ 'healthcheck:',
50
+ ` test: ["CMD-SHELL", "/opt/mssql-tools18/bin/sqlcmd -S localhost -U sa -P 'TestPass123!' -C -Q 'SELECT 1'"]`,
51
+ ' interval: 5s',
52
+ ' retries: 30',
53
+ ]),
54
+ redis: service('redis', ['image: redis:7', 'ports: ["127.0.0.1:6379:6379"]', 'healthcheck:', ' test: ["CMD", "redis-cli", "ping"]', ' interval: 2s', ' retries: 30']),
55
+ mongodb: service('mongodb', [
56
+ 'image: mongo:7',
57
+ 'ports: ["127.0.0.1:27017:27017"]',
58
+ 'healthcheck:',
59
+ ' test: ["CMD", "mongosh", "--quiet", "--eval", "db.runCommand({ ping: 1 }).ok"]',
60
+ ' interval: 2s',
61
+ ' retries: 30',
62
+ ]),
63
+ neo4j: service('neo4j', [
64
+ 'image: neo4j:5',
65
+ 'environment:',
66
+ ' NEO4J_AUTH: neo4j/testpassword',
67
+ 'ports: ["127.0.0.1:7687:7687"]',
68
+ 'healthcheck:',
69
+ ' test: ["CMD", "cypher-shell", "-u", "neo4j", "-p", "testpassword", "RETURN 1"]',
70
+ ' interval: 5s',
71
+ ' retries: 30',
72
+ ]),
73
+ scylla: service('scylla', [
74
+ '# ScyllaDB: CQL-compatible with Cassandra and ready in seconds.',
75
+ 'image: scylladb/scylla:2026.3.6',
76
+ 'command: ["--smp", "1", "--memory", "750M", "--overprovisioned", "1", "--developer-mode", "1"]',
77
+ 'ports: ["127.0.0.1:9042:9042"]',
78
+ 'healthcheck:',
79
+ ` test: ["CMD-SHELL", "cqlsh -e 'SELECT now() FROM system.local' > /dev/null"]`,
80
+ ' interval: 5s',
81
+ ' timeout: 10s',
82
+ ' start_period: 10s',
83
+ ' retries: 30',
84
+ ]),
85
+ clickhouse: service('clickhouse', [
86
+ 'image: clickhouse/clickhouse-server:26.10',
87
+ 'environment:',
88
+ ' CLICKHOUSE_USER: testuser',
89
+ ' CLICKHOUSE_PASSWORD: testpass',
90
+ ' CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT: 1',
91
+ 'ulimits:',
92
+ ' nofile: { soft: 262144, hard: 262144 }',
93
+ 'ports: ["127.0.0.1:8123:8123"]',
94
+ 'healthcheck:',
95
+ ' test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:8123/ping > /dev/null"]',
96
+ ' interval: 3s',
97
+ ' timeout: 5s',
98
+ ' retries: 30',
99
+ ]),
100
+ kafka: service('kafka', [
101
+ 'image: apache/kafka:latest',
102
+ 'environment:',
103
+ ' KAFKA_NODE_ID: 1',
104
+ ' KAFKA_PROCESS_ROLES: broker,controller',
105
+ ' # Two listeners: kafka:19092 for other containers, localhost:9092 for the host.',
106
+ ' KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:19092,HOST://0.0.0.0:9092,CONTROLLER://0.0.0.0:9093',
107
+ ' KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:19092,HOST://localhost:9092',
108
+ ' KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT',
109
+ ' KAFKA_CONTROLLER_LISTENER_NAMES: CONTROLLER',
110
+ ' KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,HOST:PLAINTEXT,CONTROLLER:PLAINTEXT',
111
+ ' KAFKA_CONTROLLER_QUORUM_VOTERS: 1@localhost:9093',
112
+ ' KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true"',
113
+ ' KAFKA_NUM_PARTITIONS: 1',
114
+ ' KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1',
115
+ ' CLUSTER_ID: MkU3OEVBNTcwNTJENDM2Qk',
116
+ 'ports: ["127.0.0.1:9092:9092"]',
117
+ 'healthcheck:',
118
+ ' test: ["CMD-SHELL", "/opt/kafka/bin/kafka-broker-api-versions.sh --bootstrap-server localhost:9092"]',
119
+ ' interval: 5s',
120
+ ' retries: 30',
121
+ ]),
122
+ rabbitmq: service('rabbitmq', [
123
+ 'image: rabbitmq:4',
124
+ 'environment:',
125
+ ' RABBITMQ_DEFAULT_USER: testuser',
126
+ ' RABBITMQ_DEFAULT_PASS: testpass',
127
+ 'ports: ["127.0.0.1:5672:5672"]',
128
+ 'healthcheck:',
129
+ ' test: ["CMD", "rabbitmq-diagnostics", "-q", "check_port_connectivity"]',
130
+ ' interval: 5s',
131
+ ' retries: 30',
132
+ ]),
133
+ moto: service('moto', [
134
+ '# AWS emulator (S3, SQS, SNS, DynamoDB) on LocalStack\'s port: PW_AWS_ENDPOINT=http://localhost:4566',
135
+ 'image: motoserver/moto:5.2.5',
136
+ 'ports: ["127.0.0.1:4566:5000"]',
137
+ 'healthcheck:',
138
+ ' test: ["CMD-SHELL", "curl -fs http://localhost:5000/moto-api/ > /dev/null"]',
139
+ ' interval: 2s',
140
+ ' retries: 15',
141
+ ]),
142
+ elasticsearch: service('elasticsearch', [
143
+ 'image: elasticsearch:9.5.5',
144
+ 'ports: ["127.0.0.1:9200:9200"]',
145
+ 'environment:',
146
+ ' discovery.type: single-node',
147
+ ' xpack.security.enabled: "false"',
148
+ ' cluster.routing.allocation.disk.threshold_enabled: "false"',
149
+ ' ES_JAVA_OPTS: -Xms512m -Xmx512m',
150
+ 'healthcheck:',
151
+ ` test: ["CMD-SHELL", "curl -fs 'http://localhost:9200/_cluster/health?wait_for_status=yellow&timeout=1s' > /dev/null"]`,
152
+ ' interval: 3s',
153
+ ' retries: 40',
154
+ ]),
155
+ opensearch: service('opensearch', [
156
+ 'image: opensearchproject/opensearch:3.10.0',
157
+ 'ports: ["127.0.0.1:9201:9200"]',
158
+ 'environment:',
159
+ ' discovery.type: single-node',
160
+ ' DISABLE_SECURITY_PLUGIN: "true"',
161
+ ' DISABLE_INSTALL_DEMO_CONFIG: "true"',
162
+ ' cluster.routing.allocation.disk.threshold_enabled: "false"',
163
+ ' OPENSEARCH_JAVA_OPTS: -Xms512m -Xmx512m',
164
+ 'healthcheck:',
165
+ ` test: ["CMD-SHELL", "curl -fs 'http://localhost:9200/_cluster/health?wait_for_status=yellow&timeout=1s' > /dev/null"]`,
166
+ ' interval: 3s',
167
+ ' retries: 40',
168
+ ]),
169
+ grpcbin: service('grpcbin', [
170
+ '# gRPC test server with server reflection, plaintext on 9000. Replace with your own service.',
171
+ 'image: moul/grpcbin:latest',
172
+ 'ports: ["127.0.0.1:9000:9000"]',
173
+ 'healthcheck:',
174
+ ' test: ["CMD-SHELL", "nc -z localhost 9000"]',
175
+ ' interval: 2s',
176
+ ' retries: 15',
177
+ ]),
178
+ 'echo-server': service('echo-server', [
179
+ '# WebSocket echo on any path, SSE on /.sse. Replace with your own service. No shell, so no health check.',
180
+ 'image: jmalloc/echo-server:v0.3.7',
181
+ 'ports: ["127.0.0.1:8091:8080"]',
182
+ ]),
183
+ mailpit: service('mailpit', [
184
+ 'image: axllent/mailpit:latest',
185
+ 'ports: ["127.0.0.1:8025:8025", "127.0.0.1:1025:1025"] # API/UI, SMTP',
186
+ 'healthcheck:',
187
+ ' test: ["CMD", "/mailpit", "readyz"]',
188
+ ' interval: 2s',
189
+ ' retries: 15',
190
+ ]),
191
+ wiremock: service('wiremock', [
192
+ 'image: wiremock/wiremock:3.13.2',
193
+ 'ports: ["127.0.0.1:8089:8080"] # stubs and admin API (/__admin)',
194
+ 'healthcheck:',
195
+ ' test: ["CMD-SHELL", "curl -fs http://localhost:8080/__admin/health > /dev/null"]',
196
+ ' interval: 2s',
197
+ ' retries: 30',
198
+ ]),
199
+ };
200
+ // ─── Shared pieces ──────────────────────────────────────────────────────────
201
+ const AWS_CONFIG = [
202
+ { path: ['aws', 'endpoint'], value: 'http://localhost:4566' },
203
+ { path: ['aws', 'region'], value: 'us-east-1' },
204
+ ];
205
+ const AWS_ENV = section('aws', 'AWS (S3, SQS, SNS, DynamoDB)', [
206
+ { name: 'PW_AWS_ENDPOINT', value: 'http://localhost:4566' },
207
+ { name: 'PW_AWS_REGION', value: 'us-east-1' },
208
+ ]);
209
+ const database = (id, label, pkg, port, values, svc) => ({
210
+ id,
211
+ label,
212
+ packages: [pkg],
213
+ config: [{ path: ['database'], value: { type: id, ...(port ? { host: 'localhost', port } : {}), ...values } }],
214
+ env: [
215
+ section('database', 'SQL database', [
216
+ { name: 'PW_DB_TYPE', value: id },
217
+ ...(port ? [{ name: 'PW_DB_HOST', value: 'localhost' }, { name: 'PW_DB_PORT', value: String(port) }] : []),
218
+ { name: 'PW_DB_NAME', value: String(values.database) },
219
+ ...(values.username ? [{ name: 'PW_DB_USERNAME', value: String(values.username) }, { name: 'PW_DB_PASSWORD', value: String(values.password) }] : []),
220
+ ]),
221
+ ],
222
+ services: svc ? [svc] : [],
223
+ });
224
+ const kafkaVariant = (id, label, pkg) => ({
225
+ id,
226
+ label,
227
+ packages: [pkg],
228
+ config: [{ path: ['kafka'], value: { brokers: ['localhost:9092'], ...(id === 'confluent' ? { driver: 'confluent' } : {}) } }],
229
+ env: [section('kafka', 'Kafka', [{ name: 'PW_KAFKA_BROKERS', value: 'localhost:9092' }, ...(id === 'confluent' ? [{ name: 'PW_KAFKA_DRIVER', value: 'confluent' }] : [])])],
230
+ services: [SERVICES.kafka],
231
+ });
232
+ const searchVariant = (id, label, port, svc) => ({
233
+ id,
234
+ label,
235
+ packages: [],
236
+ config: [{ path: ['search'], value: { url: `http://localhost:${port}` } }],
237
+ env: [section('search', 'Search', [{ name: 'PW_SEARCH_URL', value: `http://localhost:${port}` }])],
238
+ services: [svc],
239
+ });
240
+ // ─── The catalog ────────────────────────────────────────────────────────────
241
+ export const FIXTURE_CATALOG = [
242
+ {
243
+ id: 'openapi',
244
+ label: 'OpenAPI / REST',
245
+ fixtures: ['openApiClient'],
246
+ testType: 'api',
247
+ category: 'API',
248
+ variants: one({
249
+ packages: ['openapi-client-axios'],
250
+ config: [{ path: ['openapi'], value: { specPath: './specs/api.yaml', baseUrl: 'http://localhost:3000' } }],
251
+ env: [section('openapi', 'OpenAPI', [{ name: 'PW_OPENAPI_SPEC_PATH', value: './specs/api.yaml' }, { name: 'PW_OPENAPI_BASE_URL', value: 'http://localhost:3000' }])],
252
+ services: [],
253
+ }),
254
+ starter: {
255
+ file: 'openapi',
256
+ describe: 'API — starter',
257
+ title: 'the OpenAPI spec loads and has operations',
258
+ params: 'openApiClient',
259
+ steps: [{ name: 'Step 1: Read the operations from the spec', code: 'expect(openApiClient.api.getOperations().length).toBeGreaterThan(0);' }],
260
+ },
261
+ next: 'Point openapi.specPath at your spec; `npx propmaster generate openapi` then writes a test per operation. YAML specs also need js-yaml.',
262
+ },
263
+ {
264
+ id: 'graphql',
265
+ label: 'GraphQL',
266
+ fixtures: ['graphqlClient'],
267
+ testType: 'api',
268
+ category: 'GQL',
269
+ variants: one({
270
+ packages: ['graphql-request', 'graphql'],
271
+ config: [{ path: ['graphql'], value: { endpoint: 'http://localhost:4000/graphql' } }],
272
+ env: [section('graphql', 'GraphQL', [{ name: 'PW_GRAPHQL_ENDPOINT', value: 'http://localhost:4000/graphql' }])],
273
+ services: [],
274
+ }),
275
+ starter: {
276
+ file: 'graphql',
277
+ describe: 'GraphQL — starter',
278
+ title: 'the endpoint answers a query',
279
+ params: 'graphqlClient',
280
+ steps: [
281
+ {
282
+ name: 'Step 1: Ask for the query type name',
283
+ code: "const data = await graphqlClient.query<{ __typename: string }>('{ __typename }');\nexpect(data.__typename).toBeTruthy();",
284
+ },
285
+ ],
286
+ },
287
+ },
288
+ {
289
+ id: 'grpc',
290
+ label: 'gRPC',
291
+ fixtures: ['grpcClient'],
292
+ testType: 'api',
293
+ category: 'GRPC',
294
+ variants: one({
295
+ packages: ['@grpc/grpc-js', '@grpc/proto-loader'],
296
+ config: [{ path: ['grpc'], value: { address: 'localhost:9000' } }],
297
+ env: [section('grpc', 'gRPC', [{ name: 'PW_GRPC_ADDRESS', value: 'localhost:9000' }, { name: 'PW_GRPC_PROTO_FILES', value: 'protos/service.proto', optional: true }])],
298
+ services: [SERVICES.grpcbin],
299
+ }),
300
+ starter: {
301
+ file: 'grpc',
302
+ describe: 'gRPC — starter',
303
+ title: 'the server lists its services',
304
+ params: 'grpcClient',
305
+ steps: [{ name: 'Step 1: List the services by reflection', code: 'expect((await grpcClient.services()).length).toBeGreaterThan(0);' }],
306
+ },
307
+ next: 'Without server reflection, set grpc.protoFiles to your .proto files.',
308
+ },
309
+ {
310
+ id: 'realtime',
311
+ label: 'WebSocket / SSE',
312
+ fixtures: ['realtimeClient'],
313
+ testType: 'api',
314
+ category: 'RT',
315
+ variants: one({
316
+ packages: ['ws'],
317
+ config: [{ path: ['realtime'], value: { url: 'http://localhost:8091' } }],
318
+ env: [section('realtime', 'WebSocket / SSE', [{ name: 'PW_REALTIME_URL', value: 'http://localhost:8091' }])],
319
+ services: [SERVICES['echo-server']],
320
+ }),
321
+ starter: {
322
+ file: 'realtime',
323
+ describe: 'WebSocket — starter',
324
+ title: 'a message sent comes back',
325
+ params: 'realtimeClient, testData',
326
+ setup: "const text = testData.unique('hello');",
327
+ steps: [
328
+ {
329
+ name: 'Step 1: Connect, send, and wait for the echo',
330
+ code: "const ws = await realtimeClient.connect('/');\nawait ws.send(text);\nexpect((await ws.waitForMessage(text)).data).toBe(text);",
331
+ },
332
+ ],
333
+ },
334
+ },
335
+ {
336
+ id: 'database',
337
+ label: 'SQL database',
338
+ fixtures: ['databaseClient'],
339
+ testType: 'integration',
340
+ category: 'DB',
341
+ variants: [
342
+ database('postgresql', 'PostgreSQL', 'pg', 5432, { database: 'testdb', username: 'testuser', password: 'testpass' }, SERVICES.postgres),
343
+ database('mysql', 'MySQL / MariaDB', 'mysql2', 3306, { database: 'testdb', username: 'testuser', password: 'testpass' }, SERVICES.mysql),
344
+ database('mssql', 'SQL Server', 'mssql', 1433, { database: 'master', username: 'sa', password: 'TestPass123!', trustServerCertificate: true }, SERVICES.mssql),
345
+ database('sqlite', 'SQLite', 'better-sqlite3', null, { database: './test.db' }, null),
346
+ ],
347
+ starter: {
348
+ file: 'database',
349
+ describe: 'Database — starter',
350
+ title: 'the database answers a query',
351
+ params: 'databaseClient',
352
+ steps: [
353
+ {
354
+ name: 'Step 1: Run SELECT 1',
355
+ code: "const rows = await databaseClient.query<{ one: number }>('SELECT 1 AS one');\nexpect(Number(rows[0].one)).toBe(1);",
356
+ },
357
+ ],
358
+ },
359
+ },
360
+ {
361
+ id: 'mongodb',
362
+ label: 'MongoDB',
363
+ fixtures: ['mongoDbClient'],
364
+ testType: 'integration',
365
+ category: 'MDB',
366
+ variants: one({
367
+ packages: ['mongodb'],
368
+ config: [{ path: ['mongodb'], value: { host: 'localhost', port: 27017, database: 'testdb' } }],
369
+ env: [section('mongodb', 'MongoDB', [{ name: 'PW_MONGODB_HOST', value: 'localhost' }, { name: 'PW_MONGODB_PORT', value: '27017' }, { name: 'PW_MONGODB_DATABASE', value: 'testdb' }])],
370
+ services: [SERVICES.mongodb],
371
+ }),
372
+ starter: {
373
+ file: 'mongodb',
374
+ describe: 'MongoDB — starter',
375
+ title: 'a document inserted can be found',
376
+ params: 'mongoDbClient, testData',
377
+ setup: "const name = testData.unique('starter');",
378
+ steps: [
379
+ { name: 'Step 1: Insert a document (removed after the test)', code: "await mongoDbClient.insertOne('starter', { name });" },
380
+ { name: 'Step 2: Find it', code: "expect(await mongoDbClient.findOne('starter', { name })).toMatchObject({ name });" },
381
+ ],
382
+ },
383
+ },
384
+ {
385
+ id: 'neo4j',
386
+ label: 'Neo4j',
387
+ fixtures: ['neo4jClient'],
388
+ testType: 'integration',
389
+ category: 'NEO',
390
+ variants: one({
391
+ packages: ['neo4j-driver'],
392
+ config: [{ path: ['neo4j'], value: { uri: 'bolt://localhost:7687', username: 'neo4j', password: 'testpassword' } }],
393
+ env: [
394
+ section('neo4j', 'Neo4j', [
395
+ { name: 'PW_NEO4J_URI', value: 'bolt://localhost:7687' },
396
+ { name: 'PW_NEO4J_USERNAME', value: 'neo4j' },
397
+ { name: 'PW_NEO4J_PASSWORD', value: 'testpassword' },
398
+ ]),
399
+ ],
400
+ services: [SERVICES.neo4j],
401
+ }),
402
+ starter: {
403
+ file: 'neo4j',
404
+ describe: 'Neo4j — starter',
405
+ title: 'a node written can be read',
406
+ params: 'neo4jClient, testData',
407
+ steps: [
408
+ { name: 'Step 1: Create a node (deleted after the test)', code: "await neo4jClient.write('CREATE (:Starter {runId: $runId})', { runId: testData.runId });" },
409
+ {
410
+ name: 'Step 2: Read it back',
411
+ code: "const rows = await neo4jClient.run<{ n: number }>('MATCH (s:Starter {runId: $runId}) RETURN count(s) AS n', { runId: testData.runId });\nexpect(rows[0].n).toBe(1);",
412
+ },
413
+ ],
414
+ },
415
+ },
416
+ {
417
+ id: 'cassandra',
418
+ label: 'Cassandra / ScyllaDB',
419
+ fixtures: ['cassandraClient'],
420
+ testType: 'integration',
421
+ category: 'CAS',
422
+ variants: one({
423
+ packages: ['cassandra-driver'],
424
+ config: [{ path: ['cassandra'], value: { contactPoints: ['localhost'], keyspace: 'tests', createKeyspace: true } }],
425
+ env: [
426
+ section('cassandra', 'Cassandra / ScyllaDB', [
427
+ { name: 'PW_CASSANDRA_CONTACT_POINTS', value: 'localhost' },
428
+ { name: 'PW_CASSANDRA_KEYSPACE', value: 'tests' },
429
+ { name: 'PW_CASSANDRA_CREATE_KEYSPACE', value: 'true' },
430
+ ]),
431
+ ],
432
+ services: [SERVICES.scylla],
433
+ }),
434
+ starter: {
435
+ file: 'cassandra',
436
+ describe: 'Cassandra — starter',
437
+ title: 'the cluster answers a query',
438
+ params: 'cassandraClient',
439
+ steps: [
440
+ {
441
+ name: 'Step 1: Read the release version',
442
+ code: "const rows = await cassandraClient.query<{ release_version: string }>('SELECT release_version FROM system.local');\nexpect(rows[0].release_version).toBeTruthy();",
443
+ },
444
+ ],
445
+ },
446
+ },
447
+ {
448
+ id: 'clickhouse',
449
+ label: 'ClickHouse',
450
+ fixtures: ['clickHouseClient'],
451
+ testType: 'integration',
452
+ category: 'CH',
453
+ variants: one({
454
+ packages: ['@clickhouse/client'],
455
+ config: [{ path: ['clickhouse'], value: { url: 'http://localhost:8123', database: 'tests', createDatabase: true } }],
456
+ env: [
457
+ section('clickhouse', 'ClickHouse', [
458
+ { name: 'PW_CLICKHOUSE_URL', value: 'http://localhost:8123' },
459
+ { name: 'PW_CLICKHOUSE_DATABASE', value: 'tests' },
460
+ { name: 'PW_CLICKHOUSE_CREATE_DATABASE', value: 'true' },
461
+ { name: 'PW_CLICKHOUSE_USERNAME', value: 'testuser' },
462
+ { name: 'PW_CLICKHOUSE_PASSWORD', value: 'testpass' },
463
+ ]),
464
+ ],
465
+ services: [SERVICES.clickhouse],
466
+ }),
467
+ starter: {
468
+ file: 'clickhouse',
469
+ describe: 'ClickHouse — starter',
470
+ title: 'the server answers a query',
471
+ params: 'clickHouseClient',
472
+ steps: [
473
+ {
474
+ name: 'Step 1: Read the server version',
475
+ code: "const [row] = await clickHouseClient.query<{ version: string }>('SELECT version() AS version');\nexpect(row.version).toBeTruthy();",
476
+ },
477
+ ],
478
+ },
479
+ },
480
+ {
481
+ id: 'redis',
482
+ label: 'Redis',
483
+ fixtures: ['redisClient'],
484
+ testType: 'integration',
485
+ category: 'RDS',
486
+ variants: one({
487
+ packages: ['ioredis'],
488
+ config: [{ path: ['redis'], value: { host: 'localhost', port: 6379 } }],
489
+ env: [section('redis', 'Redis', [{ name: 'PW_REDIS_HOST', value: 'localhost' }, { name: 'PW_REDIS_PORT', value: '6379' }, { name: 'PW_REDIS_PASSWORD', value: '', optional: true }])],
490
+ services: [SERVICES.redis],
491
+ }),
492
+ starter: {
493
+ file: 'redis',
494
+ describe: 'Redis — starter',
495
+ title: 'a key set can be read',
496
+ params: 'redisClient, testData',
497
+ setup: "const key = testData.unique('starter');",
498
+ steps: [
499
+ { name: 'Step 1: Set a key (deleted after the test)', code: "await redisClient.set(key, 'hello');" },
500
+ { name: 'Step 2: Read it back', code: "expect(await redisClient.get(key)).toBe('hello');" },
501
+ ],
502
+ },
503
+ },
504
+ {
505
+ id: 'kafka',
506
+ label: 'Kafka',
507
+ fixtures: ['kafkaClient'],
508
+ testType: 'integration',
509
+ category: 'KFK',
510
+ variants: [kafkaVariant('kafkajs', 'kafkajs (default)', 'kafkajs'), kafkaVariant('confluent', "Confluent's client (librdkafka)", '@confluentinc/kafka-javascript')],
511
+ starter: {
512
+ file: 'kafka',
513
+ describe: 'Kafka — starter',
514
+ title: 'a message produced can be consumed',
515
+ params: 'kafkaClient, testData',
516
+ setup: "const topic = testData.unique('starter');",
517
+ steps: [
518
+ { name: 'Step 1: Produce to a topic of the test\'s own', code: "await kafkaClient.produce(topic, [{ value: 'hello' }]);" },
519
+ {
520
+ name: 'Step 2: Consume it',
521
+ code: "const [message] = await kafkaClient.consume(topic, { count: 1, fromBeginning: true, timeout: 15_000 });\nexpect(message.value).toBe('hello');",
522
+ },
523
+ ],
524
+ },
525
+ },
526
+ {
527
+ id: 'amqp',
528
+ label: 'RabbitMQ / AMQP',
529
+ fixtures: ['amqpClient'],
530
+ testType: 'integration',
531
+ category: 'AMQ',
532
+ variants: one({
533
+ packages: ['amqplib'],
534
+ config: [{ path: ['amqp'], value: { url: 'amqp://testuser:testpass@localhost:5672' } }],
535
+ env: [section('amqp', 'RabbitMQ / AMQP', [{ name: 'PW_AMQP_URL', value: 'amqp://testuser:testpass@localhost:5672' }])],
536
+ services: [SERVICES.rabbitmq],
537
+ }),
538
+ starter: {
539
+ file: 'amqp',
540
+ describe: 'RabbitMQ — starter',
541
+ title: 'a message sent to a queue can be taken',
542
+ params: 'amqpClient, testData',
543
+ setup: "const queue = testData.unique('starter');",
544
+ steps: [
545
+ { name: 'Step 1: Make a queue (deleted after the test) and send to it', code: "await amqpClient.assertQueue(queue);\nawait amqpClient.sendToQueue(queue, 'hello');" },
546
+ { name: 'Step 2: Take it', code: "const [message] = await amqpClient.consume(queue, { count: 1, timeout: 5000 });\nexpect(message.body.toString()).toBe('hello');" },
547
+ ],
548
+ },
549
+ },
550
+ {
551
+ id: 's3',
552
+ label: 'AWS S3',
553
+ fixtures: ['s3Client'],
554
+ testType: 'integration',
555
+ category: 'AWS',
556
+ variants: one({
557
+ packages: ['@aws-sdk/client-s3'],
558
+ config: [...AWS_CONFIG, { path: ['aws', 's3'], value: { bucket: 'tests' } }],
559
+ env: [AWS_ENV, section('s3', 'S3', [{ name: 'PW_AWS_S3_BUCKET', value: 'tests' }])],
560
+ services: [SERVICES.moto],
561
+ }),
562
+ starter: {
563
+ file: 's3',
564
+ describe: 'S3 — starter',
565
+ title: 'an object put can be read',
566
+ params: 's3Client, testData',
567
+ setup: "const bucket = testData.unique('starter');",
568
+ steps: [
569
+ { name: 'Step 1: Make a bucket (deleted after the test)', code: 'await s3Client.createBucket(bucket);' },
570
+ {
571
+ name: 'Step 2: Put an object and read it back',
572
+ code: "await s3Client.putObject('hello.json', { hello: 'world' }, { bucket });\nexpect((await s3Client.getObject('hello.json', { bucket })).json()).toEqual({ hello: 'world' });",
573
+ },
574
+ ],
575
+ },
576
+ },
577
+ {
578
+ id: 'sqs',
579
+ label: 'AWS SQS / SNS',
580
+ fixtures: ['sqsClient'],
581
+ testType: 'integration',
582
+ category: 'AWS',
583
+ variants: one({ packages: ['@aws-sdk/client-sqs', '@aws-sdk/client-sns'], config: [...AWS_CONFIG], env: [AWS_ENV], services: [SERVICES.moto] }),
584
+ starter: {
585
+ file: 'sqs',
586
+ describe: 'SQS — starter',
587
+ title: 'a message sent to a queue can be received',
588
+ params: 'sqsClient, testData',
589
+ setup: "const queue = testData.unique('starter');",
590
+ steps: [
591
+ { name: 'Step 1: Make a queue (deleted after the test) and send to it', code: "await sqsClient.createQueue(queue);\nawait sqsClient.send(queue, { hello: 'world' });" },
592
+ { name: 'Step 2: Receive it', code: "const [message] = await sqsClient.receive(queue, { count: 1, timeout: 5000 });\nexpect(message.json()).toEqual({ hello: 'world' });" },
593
+ ],
594
+ },
595
+ },
596
+ {
597
+ id: 'dynamodb',
598
+ label: 'AWS DynamoDB',
599
+ fixtures: ['dynamoDbClient'],
600
+ testType: 'integration',
601
+ category: 'DDB',
602
+ variants: one({ packages: ['@aws-sdk/client-dynamodb', '@aws-sdk/lib-dynamodb'], config: [...AWS_CONFIG], env: [AWS_ENV], services: [SERVICES.moto] }),
603
+ starter: {
604
+ file: 'dynamodb',
605
+ describe: 'DynamoDB — starter',
606
+ title: 'an item put can be read',
607
+ params: 'dynamoDbClient',
608
+ setup: "const table = dynamoDbClient.tableName('starter');",
609
+ steps: [
610
+ { name: 'Step 1: Make a table (deleted after the test)', code: "await dynamoDbClient.createTable(table, { key: { id: 'S' } });" },
611
+ { name: 'Step 2: Put an item and read it back', code: "await dynamoDbClient.put(table, { id: '1', hello: 'world' });\nexpect(await dynamoDbClient.get(table, { id: '1' })).toMatchObject({ hello: 'world' });" },
612
+ ],
613
+ },
614
+ },
615
+ {
616
+ id: 'search',
617
+ label: 'Elasticsearch / OpenSearch',
618
+ fixtures: ['searchClient'],
619
+ testType: 'integration',
620
+ category: 'SRCH',
621
+ variants: [searchVariant('elasticsearch', 'Elasticsearch', 9200, SERVICES.elasticsearch), searchVariant('opensearch', 'OpenSearch', 9201, SERVICES.opensearch)],
622
+ starter: {
623
+ file: 'search',
624
+ describe: 'Search — starter',
625
+ title: 'a document indexed can be found',
626
+ params: 'searchClient',
627
+ setup: "const index = searchClient.indexName('starter');",
628
+ steps: [
629
+ { name: 'Step 1: Index a document in an index of the test\'s own', code: "await searchClient.index(index, { title: 'hello world' });" },
630
+ { name: 'Step 2: Search for it', code: "expect((await searchClient.search(index, { match: { title: 'hello' } })).total).toBe(1);" },
631
+ ],
632
+ },
633
+ },
634
+ {
635
+ id: 'inbox',
636
+ label: 'Email inbox (Mailpit)',
637
+ fixtures: ['inboxClient'],
638
+ testType: 'integration',
639
+ category: 'EML',
640
+ variants: one({
641
+ packages: [],
642
+ config: [{ path: ['inbox'], value: { url: 'http://localhost:8025', smtpHost: 'localhost', smtpPort: 1025 } }],
643
+ env: [
644
+ section('inbox', 'Email inbox (Mailpit)', [
645
+ { name: 'PW_INBOX_URL', value: 'http://localhost:8025' },
646
+ { name: 'PW_INBOX_SMTP_HOST', value: 'localhost' },
647
+ { name: 'PW_INBOX_SMTP_PORT', value: '1025' },
648
+ ]),
649
+ ],
650
+ services: [SERVICES.mailpit],
651
+ }),
652
+ starter: {
653
+ file: 'inbox',
654
+ describe: 'Inbox — starter',
655
+ title: 'a message sent arrives',
656
+ params: 'inboxClient',
657
+ setup: "const to = inboxClient.uniqueAddress('starter');",
658
+ steps: [
659
+ { name: 'Step 1: Send to an address of the test\'s own', code: "await inboxClient.send({ from: 'app@example.test', to, subject: 'Hello' });" },
660
+ { name: 'Step 2: Wait for it', code: "expect((await inboxClient.waitForMessage({ to })).subject).toBe('Hello');" },
661
+ ],
662
+ },
663
+ next: 'Point your application\'s SMTP settings at Mailpit (localhost:1025) for the tests.',
664
+ },
665
+ {
666
+ id: 'mock',
667
+ label: 'Mock server (WireMock)',
668
+ fixtures: ['mockServer'],
669
+ testType: 'integration',
670
+ category: 'MCK',
671
+ variants: one({
672
+ packages: [],
673
+ config: [{ path: ['mock'], value: { url: 'http://localhost:8089' } }],
674
+ env: [section('mock', 'Mock server (WireMock)', [{ name: 'PW_MOCK_URL', value: 'http://localhost:8089' }])],
675
+ services: [SERVICES.wiremock],
676
+ }),
677
+ starter: {
678
+ file: 'mock-server',
679
+ describe: 'Mock server — starter',
680
+ title: 'a stubbed call answers and is recorded',
681
+ params: 'mockServer, testData',
682
+ setup: "const path = `/${testData.unique('starter')}`;",
683
+ steps: [
684
+ { name: 'Step 1: Stub a path of the test\'s own', code: 'await mockServer.stub({ path }, { json: { ok: true } });' },
685
+ {
686
+ name: 'Step 2: Call it and check the call was recorded',
687
+ code: 'expect(await (await fetch(`${mockServer.url}${path}`)).json()).toEqual({ ok: true });\nawait mockServer.verify({ path }, { times: 1 });',
688
+ },
689
+ ],
690
+ },
691
+ next: 'Point your application at mockServer.url instead of the third-party API.',
692
+ },
693
+ {
694
+ id: 'otp',
695
+ label: 'One-time passwords (TOTP / HOTP)',
696
+ fixtures: ['otpClient'],
697
+ testType: 'api',
698
+ category: 'OTP',
699
+ variants: one({
700
+ packages: ['otplib'],
701
+ config: [{ path: ['otp'], value: { digits: 6, period: 30 } }],
702
+ env: [section('otp', 'One-time passwords', [{ name: 'PW_OTP_SECRET', value: '', optional: true }])],
703
+ services: [],
704
+ }),
705
+ starter: {
706
+ file: 'otp',
707
+ describe: 'OTP — starter',
708
+ title: 'a generated code verifies',
709
+ params: 'otpClient',
710
+ steps: [
711
+ {
712
+ name: 'Step 1: Generate a secret and a code, and verify it',
713
+ code: 'const secret = otpClient.generateSecret();\nconst code = await otpClient.generateTotp(secret);\nexpect(await otpClient.verifyTotp(code, secret)).toBe(true);',
714
+ },
715
+ ],
716
+ },
717
+ },
718
+ {
719
+ id: 'appium',
720
+ label: 'Appium (mobile)',
721
+ fixtures: ['appiumDriver'],
722
+ testType: 'mobile',
723
+ category: 'APM',
724
+ variants: one({
725
+ packages: ['webdriverio'],
726
+ config: [{ path: ['appium'], value: { serverUrl: 'http://127.0.0.1:4723', platform: 'android', deviceName: 'emulator-5554' } }],
727
+ env: [
728
+ section('appium', 'Appium', [
729
+ { name: 'PW_APPIUM_SERVER_URL', value: 'http://127.0.0.1:4723' },
730
+ { name: 'PW_APPIUM_PLATFORM', value: 'android' },
731
+ { name: 'PW_APPIUM_APP', value: './app.apk', optional: true },
732
+ ]),
733
+ ],
734
+ services: [],
735
+ }),
736
+ starter: {
737
+ file: 'appium',
738
+ describe: 'Appium — starter',
739
+ title: 'a session starts on the device',
740
+ params: 'appiumDriver',
741
+ steps: [{ name: 'Step 1: Check the session', code: 'expect(appiumDriver.sessionId).toBeTruthy();' }],
742
+ },
743
+ next: 'Start Appium (`npx appium`) and a device or emulator; set appium.app or the capabilities for your app.',
744
+ },
745
+ ];
746
+ /** The catalog entry for `id` (case-insensitive), or for a fixture name like `redisClient`. */
747
+ export function catalogEntry(id) {
748
+ const key = id.toLowerCase();
749
+ return FIXTURE_CATALOG.find((e) => e.id === key || e.fixtures.some((f) => f.toLowerCase() === key));
750
+ }
751
+ /** Every package any variant of `entry` installs. */
752
+ export function allPackages(entry) {
753
+ return [...new Set(entry.variants.flatMap((v) => v.packages))];
754
+ }
755
+ /** The starter test's source, with `id` as its TestCaseID. */
756
+ export function starterSource(entry, id) {
757
+ const { starter } = entry;
758
+ const indent = (code, spaces) => code
759
+ .split('\n')
760
+ .map((l) => `${' '.repeat(spaces)}${l}`)
761
+ .join('\n');
762
+ const steps = starter.steps.map((s) => ` await test.step('${s.name.replace(/'/g, "\\'")}', async () => {\n${indent(s.code, 12)}\n });`).join('\n\n');
763
+ return `import { test, expect } from '@inluxc/propmaster';
764
+
765
+ /** Starter test from \`propmaster fixture add ${entry.id}\`: replace it with your own. */
766
+ test.describe('${starter.describe}', () => {
767
+ test('[${id}] ${starter.title}', { tag: ['@${id}'] }, async ({ ${starter.params} }) => {
768
+ ${starter.setup ? `${indent(starter.setup, 8)}\n\n` : ''}${steps}
769
+ });
770
+ });
771
+ `;
772
+ }
773
+ //# sourceMappingURL=fixture-catalog.js.map