@inluxc/propmaster 0.0.0-stage → 1.0.1

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 +379 -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,407 @@
1
+ /**
2
+ * Database Connection Fixture for the Playwright Framework Template.
3
+ *
4
+ * Provides a DatabaseClient with query() and execute() methods,
5
+ * supporting PostgreSQL (pg), MySQL (mysql2), MSSQL (mssql), and SQLite (better-sqlite3).
6
+ *
7
+ * Lifecycle:
8
+ * Setup: Read config → Create connection pool → Verify connectivity (ping)
9
+ * Teardown: Drain pool → Close all connections
10
+ *
11
+ * Errors:
12
+ * - FixtureInitError on connection failure (includes host, port, timeout)
13
+ * - FixtureOperationError on query failure (includes SQL statement)
14
+ */
15
+ import { FixtureInitError, FixtureOperationError } from '../errors.js';
16
+ import { loadOptional } from './optional-package.js';
17
+ import { trackDatabase } from '../test-data/tracking.js';
18
+ const DEFAULT_CONNECTION_TIMEOUT = 10000;
19
+ const DEFAULT_QUERY_TIMEOUT = 30000;
20
+ /**
21
+ * Creates a PostgreSQL database client using the `pg` library.
22
+ */
23
+ async function createPostgresClient(config) {
24
+ const { Pool } = await loadOptional('pg', 'databaseClient (postgresql)');
25
+ const connectionTimeout = config.connectionTimeout ?? DEFAULT_CONNECTION_TIMEOUT;
26
+ const queryTimeout = config.queryTimeout ?? DEFAULT_QUERY_TIMEOUT;
27
+ const pool = new Pool({
28
+ host: config.host,
29
+ port: config.port,
30
+ database: config.database,
31
+ user: config.username,
32
+ password: config.password,
33
+ connectionTimeoutMillis: connectionTimeout,
34
+ statement_timeout: queryTimeout,
35
+ });
36
+ // Verify connectivity with a ping query
37
+ try {
38
+ const client = await pool.connect();
39
+ try {
40
+ await client.query('SELECT 1');
41
+ }
42
+ finally {
43
+ client.release();
44
+ }
45
+ }
46
+ catch (error) {
47
+ await pool.end().catch(() => { });
48
+ throw new FixtureInitError('database', 'connect', {
49
+ host: config.host,
50
+ port: config.port,
51
+ timeout: connectionTimeout,
52
+ reason: error instanceof Error ? error.message : String(error),
53
+ }, error instanceof Error ? error : undefined);
54
+ }
55
+ return {
56
+ async query(sql, params) {
57
+ try {
58
+ const result = await pool.query(sql, params);
59
+ return result.rows;
60
+ }
61
+ catch (error) {
62
+ throw new FixtureOperationError('database', 'query', {
63
+ sql,
64
+ reason: error instanceof Error ? error.message : String(error),
65
+ timeout: queryTimeout,
66
+ }, error instanceof Error ? error : undefined);
67
+ }
68
+ },
69
+ async execute(sql, params) {
70
+ try {
71
+ const result = await pool.query(sql, params);
72
+ return { affectedRows: result.rowCount ?? 0 };
73
+ }
74
+ catch (error) {
75
+ throw new FixtureOperationError('database', 'query', {
76
+ sql,
77
+ reason: error instanceof Error ? error.message : String(error),
78
+ timeout: queryTimeout,
79
+ }, error instanceof Error ? error : undefined);
80
+ }
81
+ },
82
+ async close() {
83
+ await pool.end();
84
+ },
85
+ };
86
+ }
87
+ /**
88
+ * Creates a MySQL database client using the `mysql2` library.
89
+ */
90
+ async function createMysqlClient(config) {
91
+ const mysql = await loadOptional('mysql2/promise', 'databaseClient (mysql)', ['mysql2']);
92
+ const connectionTimeout = config.connectionTimeout ?? DEFAULT_CONNECTION_TIMEOUT;
93
+ const queryTimeout = config.queryTimeout ?? DEFAULT_QUERY_TIMEOUT;
94
+ let pool;
95
+ try {
96
+ pool = mysql.createPool({
97
+ host: config.host,
98
+ port: config.port,
99
+ database: config.database,
100
+ user: config.username,
101
+ password: config.password,
102
+ connectTimeout: connectionTimeout,
103
+ waitForConnections: true,
104
+ connectionLimit: 10,
105
+ });
106
+ // Verify connectivity with a ping query
107
+ const connection = await pool.getConnection();
108
+ try {
109
+ await connection.query('SELECT 1');
110
+ }
111
+ finally {
112
+ connection.release();
113
+ }
114
+ }
115
+ catch (error) {
116
+ if (pool) {
117
+ await pool.end().catch(() => { });
118
+ }
119
+ throw new FixtureInitError('database', 'connect', {
120
+ host: config.host,
121
+ port: config.port,
122
+ timeout: connectionTimeout,
123
+ reason: error instanceof Error ? error.message : String(error),
124
+ }, error instanceof Error ? error : undefined);
125
+ }
126
+ return {
127
+ async query(sql, params) {
128
+ try {
129
+ const normalized = normalizePositionalParams(sql, params);
130
+ const connection = await pool.getConnection();
131
+ try {
132
+ await connection.query(`SET SESSION MAX_EXECUTION_TIME = ${queryTimeout}`);
133
+ const [rows] = await connection.query(normalized.sql, normalized.params);
134
+ return rows;
135
+ }
136
+ finally {
137
+ connection.release();
138
+ }
139
+ }
140
+ catch (error) {
141
+ if (error instanceof FixtureOperationError)
142
+ throw error;
143
+ throw new FixtureOperationError('database', 'query', {
144
+ sql,
145
+ reason: error instanceof Error ? error.message : String(error),
146
+ timeout: queryTimeout,
147
+ }, error instanceof Error ? error : undefined);
148
+ }
149
+ },
150
+ async execute(sql, params) {
151
+ try {
152
+ const normalized = normalizePositionalParams(sql, params);
153
+ const connection = await pool.getConnection();
154
+ try {
155
+ await connection.query(`SET SESSION MAX_EXECUTION_TIME = ${queryTimeout}`);
156
+ const [result] = await connection.query(normalized.sql, normalized.params);
157
+ const affectedRows = result.affectedRows ?? 0;
158
+ return { affectedRows };
159
+ }
160
+ finally {
161
+ connection.release();
162
+ }
163
+ }
164
+ catch (error) {
165
+ if (error instanceof FixtureOperationError)
166
+ throw error;
167
+ throw new FixtureOperationError('database', 'query', {
168
+ sql,
169
+ reason: error instanceof Error ? error.message : String(error),
170
+ timeout: queryTimeout,
171
+ }, error instanceof Error ? error : undefined);
172
+ }
173
+ },
174
+ async close() {
175
+ await pool.end();
176
+ },
177
+ };
178
+ }
179
+ /**
180
+ * Converts PostgreSQL-style positional parameters ($1, $2, ...) to question-mark style (?)
181
+ * used by MySQL and SQLite. Optionally normalizes parameter values (e.g., booleans to integers)
182
+ * for drivers that don't support boolean binding.
183
+ */
184
+ function normalizePositionalParams(sql, params, options) {
185
+ // Replace $1, $2, ... with ?
186
+ const normalizedSql = sql.replace(/\$(\d+)/g, '?');
187
+ let normalizedParams = params ?? [];
188
+ if (options?.convertBooleans) {
189
+ normalizedParams = normalizedParams.map((p) => {
190
+ if (typeof p === 'boolean')
191
+ return p ? 1 : 0;
192
+ return p;
193
+ });
194
+ }
195
+ return { sql: normalizedSql, params: normalizedParams };
196
+ }
197
+ /**
198
+ * Creates a SQLite database client using the `better-sqlite3` library.
199
+ */
200
+ async function createSqliteClient(config) {
201
+ // CommonJS `export =` module: a dynamic import exposes it as `default`.
202
+ const BetterSqlite3 = await loadOptional('better-sqlite3', 'databaseClient (sqlite)');
203
+ const queryTimeout = config.queryTimeout ?? DEFAULT_QUERY_TIMEOUT;
204
+ let db;
205
+ try {
206
+ db = new BetterSqlite3.default(config.database);
207
+ // Set a busy timeout equivalent to connection timeout
208
+ db.pragma(`busy_timeout = ${config.connectionTimeout ?? DEFAULT_CONNECTION_TIMEOUT}`);
209
+ // Verify connectivity
210
+ db.prepare('SELECT 1').get();
211
+ }
212
+ catch (error) {
213
+ throw new FixtureInitError('database', 'connect', {
214
+ host: config.host ?? 'local',
215
+ port: config.port ?? 0,
216
+ timeout: config.connectionTimeout ?? DEFAULT_CONNECTION_TIMEOUT,
217
+ reason: error instanceof Error ? error.message : String(error),
218
+ }, error instanceof Error ? error : undefined);
219
+ }
220
+ return {
221
+ async query(sql, params) {
222
+ try {
223
+ db.pragma(`busy_timeout = ${queryTimeout}`);
224
+ const normalized = normalizePositionalParams(sql, params, { convertBooleans: true });
225
+ const stmt = db.prepare(normalized.sql);
226
+ const rows = normalized.params.length > 0 ? stmt.all(...normalized.params) : stmt.all();
227
+ return rows;
228
+ }
229
+ catch (error) {
230
+ throw new FixtureOperationError('database', 'query', {
231
+ sql,
232
+ reason: error instanceof Error ? error.message : String(error),
233
+ timeout: queryTimeout,
234
+ }, error instanceof Error ? error : undefined);
235
+ }
236
+ },
237
+ async execute(sql, params) {
238
+ try {
239
+ db.pragma(`busy_timeout = ${queryTimeout}`);
240
+ const normalized = normalizePositionalParams(sql, params, { convertBooleans: true });
241
+ const stmt = db.prepare(normalized.sql);
242
+ const result = normalized.params.length > 0 ? stmt.run(...normalized.params) : stmt.run();
243
+ return { affectedRows: result.changes };
244
+ }
245
+ catch (error) {
246
+ throw new FixtureOperationError('database', 'query', {
247
+ sql,
248
+ reason: error instanceof Error ? error.message : String(error),
249
+ timeout: queryTimeout,
250
+ }, error instanceof Error ? error : undefined);
251
+ }
252
+ },
253
+ async close() {
254
+ db.close();
255
+ },
256
+ };
257
+ }
258
+ /**
259
+ * Creates a MSSQL database client using the `mssql` library.
260
+ */
261
+ async function createMssqlClient(config) {
262
+ const mssqlModule = await loadOptional('mssql', 'databaseClient (mssql)');
263
+ // Handle ESM/CJS interop — ConnectionPool may be on default export or top-level
264
+ const mssql = (mssqlModule.default ?? mssqlModule);
265
+ const connectionTimeout = config.connectionTimeout ?? DEFAULT_CONNECTION_TIMEOUT;
266
+ const queryTimeout = config.queryTimeout ?? DEFAULT_QUERY_TIMEOUT;
267
+ const mssqlConfig = {
268
+ server: config.host ?? 'localhost',
269
+ port: config.port ?? 1433,
270
+ database: config.database,
271
+ user: config.username,
272
+ password: config.password,
273
+ connectionTimeout,
274
+ requestTimeout: queryTimeout,
275
+ options: {
276
+ encrypt: config.encrypt ?? true,
277
+ trustServerCertificate: config.trustServerCertificate ?? false,
278
+ },
279
+ pool: {
280
+ max: 10,
281
+ min: 0,
282
+ idleTimeoutMillis: 30000,
283
+ },
284
+ };
285
+ let pool;
286
+ try {
287
+ pool = await new mssql.ConnectionPool(mssqlConfig).connect();
288
+ // Verify connectivity with a ping query
289
+ await pool.request().query('SELECT 1 AS ping');
290
+ }
291
+ catch (error) {
292
+ throw new FixtureInitError('database', 'connect', {
293
+ host: config.host,
294
+ port: config.port ?? 1433,
295
+ timeout: connectionTimeout,
296
+ reason: error instanceof Error ? error.message : String(error),
297
+ }, error instanceof Error ? error : undefined);
298
+ }
299
+ return {
300
+ async query(sqlText, params) {
301
+ try {
302
+ const request = pool.request();
303
+ // Bind positional parameters as @p1, @p2, etc.
304
+ if (params && params.length > 0) {
305
+ params.forEach((param, index) => {
306
+ request.input(`p${index + 1}`, param);
307
+ });
308
+ // Replace $1, $2, ... placeholders with @p1, @p2, ...
309
+ sqlText = sqlText.replace(/\$(\d+)/g, (_, num) => `@p${num}`);
310
+ }
311
+ const result = await request.query(sqlText);
312
+ return result.recordset;
313
+ }
314
+ catch (error) {
315
+ throw new FixtureOperationError('database', 'query', {
316
+ sql: sqlText,
317
+ reason: error instanceof Error ? error.message : String(error),
318
+ timeout: queryTimeout,
319
+ }, error instanceof Error ? error : undefined);
320
+ }
321
+ },
322
+ async execute(sqlText, params) {
323
+ try {
324
+ const request = pool.request();
325
+ if (params && params.length > 0) {
326
+ params.forEach((param, index) => {
327
+ request.input(`p${index + 1}`, param);
328
+ });
329
+ sqlText = sqlText.replace(/\$(\d+)/g, (_, num) => `@p${num}`);
330
+ }
331
+ const result = await request.query(sqlText);
332
+ return { affectedRows: result.rowsAffected[0] ?? 0 };
333
+ }
334
+ catch (error) {
335
+ throw new FixtureOperationError('database', 'query', {
336
+ sql: sqlText,
337
+ reason: error instanceof Error ? error.message : String(error),
338
+ timeout: queryTimeout,
339
+ }, error instanceof Error ? error : undefined);
340
+ }
341
+ },
342
+ async close() {
343
+ await pool.close();
344
+ },
345
+ };
346
+ }
347
+ /**
348
+ * Creates a DatabaseClient based on the configured database type.
349
+ */
350
+ export async function createDatabaseClient(config) {
351
+ switch (config.type) {
352
+ case 'postgresql':
353
+ return createPostgresClient(config);
354
+ case 'mysql':
355
+ return createMysqlClient(config);
356
+ case 'mssql':
357
+ return createMssqlClient(config);
358
+ case 'sqlite':
359
+ return createSqliteClient(config);
360
+ default:
361
+ throw new FixtureInitError('database', 'connect', {
362
+ reason: `Unsupported database type: ${config.type}`,
363
+ });
364
+ }
365
+ }
366
+ /**
367
+ * Playwright fixture definition for the database client.
368
+ *
369
+ * Usage in tests:
370
+ * test('query users', async ({ databaseClient }) => {
371
+ * const users = await databaseClient.query<User>('SELECT * FROM users');
372
+ * expect(users).toHaveLength(3);
373
+ * });
374
+ */
375
+ export const databaseFixture = {
376
+ databaseClient: async ({ database, stagehandContainers, dataCleanup }, use) => {
377
+ // Use config from project `use` block if provided, otherwise fall back to ConfigLoader
378
+ let config = database;
379
+ if (!config) {
380
+ const { ConfigLoader } = await import('../config/loader.js');
381
+ const loader = new ConfigLoader();
382
+ const frameworkConfig = loader.load();
383
+ config = frameworkConfig.database;
384
+ }
385
+ if (!config) {
386
+ throw new FixtureInitError('database', 'connect', {
387
+ reason: 'Database configuration is missing. Provide database config in environments.json, environment variables, or project use block.',
388
+ });
389
+ }
390
+ // With `container` set, start (or reuse) this worker's database container.
391
+ config = await stagehandContainers.database(config);
392
+ // Setup: create client and verify connectivity
393
+ const connection = await createDatabaseClient(config);
394
+ const client = trackDatabase(connection, dataCleanup);
395
+ // Provide client to the test
396
+ try {
397
+ await use(client);
398
+ // Undo the test's inserts (every client is still connected here)
399
+ await dataCleanup.flush();
400
+ }
401
+ finally {
402
+ // Teardown: close connections
403
+ await connection.close();
404
+ }
405
+ },
406
+ };
407
+ //# sourceMappingURL=database.fixture.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"database.fixture.js","sourceRoot":"","sources":["../../../src/fixtures/database.fixture.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,cA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a,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;QAEtD,6BAA6B;QAC7B,IAAI,CAAC;YACD,MAAM,GAAG,CAAC,MAAM,CAAC,CAAC;YAClB,iEAAiE;YACjE,MAAM,WAAW,CAAC,KAAK,EAAE,CAAC;QAC9B,CAAC;gBAAS,CAAC;YACP,8BAA8B;YAC9B,MAAM,UAAU,CAAC,KAAK,EAAE,CAAC;QAC7B,CAAC;IACL,CAAC;CACJ,CAAC"}
@@ -0,0 +1,243 @@
1
+ /**
2
+ * DynamoDB fixture.
3
+ *
4
+ * `dynamoDbClient` reads and writes DynamoDB items as plain objects, against
5
+ * an emulator (Moto, LocalStack, DynamoDB Local) or a real test account:
6
+ *
7
+ * - `put`, `get`, `update`, `delete`, `query` and `scan` take and return plain
8
+ * objects; conditions and filters are plain objects too
9
+ * (`{ status: 'open', total: { '>': 10 } }`), so no expression strings,
10
+ * placeholder names or `{ S: '...' }` values.
11
+ * - What a test writes is undone afterwards: a new item is deleted, an
12
+ * overwritten or updated one gets its previous content back.
13
+ * - `waitForItem()` and `waitForQuery()` poll until the application has
14
+ * written what the test expects, and fail with what is there instead.
15
+ * - `createTable()` makes a table from a short definition for local runs and
16
+ * deletes it after the test; `tableName()` gives a per-test name.
17
+ *
18
+ * Uses @aws-sdk/client-dynamodb and @aws-sdk/lib-dynamodb (the document
19
+ * client), optional peer dependencies loaded on first use.
20
+ */
21
+ import type { DynamoDBClient as SdkDynamoDbClient } from '@aws-sdk/client-dynamodb';
22
+ import type { DynamoDBDocumentClient } from '@aws-sdk/lib-dynamodb';
23
+ import type { AwsFixtureConfig } from '../config/schema.js';
24
+ import type { ContainerManager } from '../containers/container-manager.js';
25
+ import type { CleanupRegistry, KeepOption } from '../test-data/registry.js';
26
+ export declare const DEFAULT_DYNAMODB_TABLE_PREFIX = "propmaster-tests-";
27
+ /** An item: a plain object. Numbers come back as JS numbers, sets as `Set`, binary as `Uint8Array`. */
28
+ export type DynamoItem = Record<string, unknown>;
29
+ /** The key of an item: its partition key, and its sort key if the table has one. */
30
+ export type DynamoKey = Record<string, unknown>;
31
+ /**
32
+ * A comparison for one attribute. A plain value means "equals". To compare a
33
+ * whole map that has one of these operator names as its only field, wrap it:
34
+ * `{ '=': { between: 1 } }`.
35
+ */
36
+ export type DynamoComparison = unknown | {
37
+ '=': unknown;
38
+ } | {
39
+ '<>': unknown;
40
+ } | {
41
+ '<': unknown;
42
+ } | {
43
+ '<=': unknown;
44
+ } | {
45
+ '>': unknown;
46
+ } | {
47
+ '>=': unknown;
48
+ } | {
49
+ between: [unknown, unknown];
50
+ } | {
51
+ beginsWith: string;
52
+ } | {
53
+ contains: unknown;
54
+ } | {
55
+ exists: boolean;
56
+ } | {
57
+ in: unknown[];
58
+ };
59
+ /**
60
+ * Conditions on attributes, all of which must hold: `{ status: 'open', total: { '>': 10 } }`.
61
+ * A dotted name is a path into a map (`'address.city'`).
62
+ */
63
+ export type DynamoConditions = Record<string, DynamoComparison>;
64
+ /** A hand-written expression, for anything the object form can't say. */
65
+ export interface DynamoExpression {
66
+ expression: string;
67
+ names?: Record<string, string>;
68
+ values?: Record<string, unknown>;
69
+ }
70
+ export interface DynamoPutOptions extends KeepOption {
71
+ /** Only write when there is no item with this key yet; fails otherwise. */
72
+ ifNotExists?: boolean;
73
+ /** Only write when the existing item matches. */
74
+ condition?: DynamoConditions | DynamoExpression;
75
+ }
76
+ export interface DynamoUpdateOptions extends KeepOption {
77
+ /** Attributes to remove. */
78
+ remove?: string[];
79
+ /** Only update when the existing item matches (e.g. `{ version: 3 }`). */
80
+ condition?: DynamoConditions | DynamoExpression;
81
+ }
82
+ export interface DynamoDeleteOptions {
83
+ condition?: DynamoConditions | DynamoExpression;
84
+ }
85
+ export interface DynamoGetOptions {
86
+ /** Strongly consistent read (default: true, so a test reads its own writes). */
87
+ consistent?: boolean;
88
+ }
89
+ export interface DynamoQueryOptions {
90
+ /** A global or local secondary index to query instead of the table. */
91
+ index?: string;
92
+ /** Conditions on non-key attributes, applied after the key condition. */
93
+ filter?: DynamoConditions | DynamoExpression;
94
+ /** Stop after this many items (default: every page). */
95
+ limit?: number;
96
+ /** Newest (highest sort key) first. */
97
+ descending?: boolean;
98
+ /** Strongly consistent read (default: true; ignored on a global index, which can't be read consistently). */
99
+ consistent?: boolean;
100
+ }
101
+ export interface DynamoScanOptions {
102
+ index?: string;
103
+ filter?: DynamoConditions | DynamoExpression;
104
+ limit?: number;
105
+ /** Strongly consistent read (default: true; ignored on a global index). */
106
+ consistent?: boolean;
107
+ }
108
+ export interface DynamoWaitOptions {
109
+ /** Milliseconds to wait (default: the config's `timeout`, else 10000). */
110
+ timeout?: number;
111
+ }
112
+ export interface DynamoWaitForItemOptions<T> extends DynamoWaitOptions {
113
+ /** Keep waiting until the item also satisfies this (e.g. `(o) => o.status === 'shipped'`). */
114
+ until?: (item: T) => boolean;
115
+ }
116
+ export interface DynamoWaitForQueryOptions extends DynamoWaitOptions, Omit<DynamoQueryOptions, 'limit'> {
117
+ /** How many matching items to wait for (default: 1). */
118
+ count?: number;
119
+ }
120
+ /** An attribute type in a table definition: string, number or binary. */
121
+ export type DynamoKeyType = 'S' | 'N' | 'B';
122
+ /** An index: its key attributes in order (partition key first, then the sort key). */
123
+ export type DynamoKeyDefinition = Record<string, DynamoKeyType>;
124
+ /**
125
+ * A table: `{ key: { customerId: 'S', orderedAt: 'N' } }`. The first key
126
+ * attribute is the partition key, the second (if any) the sort key. Tables are
127
+ * on-demand (pay per request); indexes project every attribute.
128
+ */
129
+ export interface DynamoTableDefinition {
130
+ key: DynamoKeyDefinition;
131
+ /** Global secondary indexes by name, e.g. `{ byStatus: { status: 'S', orderedAt: 'N' } }`. */
132
+ indexes?: Record<string, DynamoKeyDefinition>;
133
+ /** Local secondary indexes by name: the table's partition key plus another sort key, e.g. `{ byTotal: { customerId: 'S', total: 'N' } }`. */
134
+ localIndexes?: Record<string, DynamoKeyDefinition>;
135
+ /** Attribute holding an expiry time (epoch seconds) to turn on TTL. */
136
+ ttl?: string;
137
+ /** Turn on a stream with this view of the changed items. */
138
+ stream?: 'NEW_IMAGE' | 'OLD_IMAGE' | 'NEW_AND_OLD_IMAGES' | 'KEYS_ONLY';
139
+ }
140
+ /** The key attributes of a table, as DynamoDB reports them. */
141
+ export interface DynamoTableKey {
142
+ partitionKey: string;
143
+ sortKey?: string;
144
+ }
145
+ export interface DynamoDbClient {
146
+ /** This test's table-name prefix, e.g. `propmaster-tests-t0-9f2a1c0b-`. */
147
+ readonly tablePrefix: string;
148
+ /** `tablePrefix + name`: a table name of this test's own, for `createTable()`. */
149
+ tableName(name: string): string;
150
+ /** Writes an item (replacing one with the same key). Undone after the test unless `{ keep: true }`. */
151
+ put(table: string, item: DynamoItem, options?: DynamoPutOptions): Promise<void>;
152
+ /** Writes several items; each is undone like `put()`. */
153
+ putMany(table: string, items: DynamoItem[], options?: KeepOption): Promise<void>;
154
+ /** Reads an item by its key, or null when there is none. */
155
+ get<T extends DynamoItem = DynamoItem>(table: string, key: DynamoKey, options?: DynamoGetOptions): Promise<T | null>;
156
+ /**
157
+ * Sets attributes of an item (creating it if it's missing) and returns the
158
+ * item after the change. `changes` is `{ status: 'shipped' }` or an
159
+ * expression. Undone after the test unless `{ keep: true }`.
160
+ */
161
+ update<T extends DynamoItem = DynamoItem>(table: string, key: DynamoKey, changes: DynamoItem | DynamoExpression, options?: DynamoUpdateOptions): Promise<T>;
162
+ /** Deletes an item and returns it, or null when there was none (not undone). */
163
+ delete<T extends DynamoItem = DynamoItem>(table: string, key: DynamoKey, options?: DynamoDeleteOptions): Promise<T | null>;
164
+ /**
165
+ * Items whose key matches, in sort-key order: `{ customerId: 'c-1' }`, or
166
+ * with a sort-key condition `{ customerId: 'c-1', orderedAt: { '>=': 1700000000 } }`.
167
+ */
168
+ query<T extends DynamoItem = DynamoItem>(table: string, keyCondition: DynamoConditions | DynamoExpression, options?: DynamoQueryOptions): Promise<T[]>;
169
+ /** Every item in the table (or index), optionally filtered. Reads the whole table: fine for a test table, slow for a big one. */
170
+ scan<T extends DynamoItem = DynamoItem>(table: string, options?: DynamoScanOptions): Promise<T[]>;
171
+ /** Number of items matching a key condition. */
172
+ count(table: string, keyCondition: DynamoConditions | DynamoExpression, options?: Omit<DynamoQueryOptions, 'limit' | 'descending'>): Promise<number>;
173
+ /** Polls until the item exists (and passes `until`). Throws on timeout with what was there. */
174
+ waitForItem<T extends DynamoItem = DynamoItem>(table: string, key: DynamoKey, options?: DynamoWaitForItemOptions<T>): Promise<T>;
175
+ /** Polls a query until it returns at least `count` items (default 1), then returns them. */
176
+ waitForQuery<T extends DynamoItem = DynamoItem>(table: string, keyCondition: DynamoConditions | DynamoExpression, options?: DynamoWaitForQueryOptions): Promise<T[]>;
177
+ /** Creates a table and waits until it and its indexes are active. Deleted after the test unless `{ keep: true }` or it already existed. */
178
+ createTable(table: string, definition: DynamoTableDefinition, options?: KeepOption): Promise<void>;
179
+ /** Deletes a table (not undone). */
180
+ deleteTable(table: string): Promise<void>;
181
+ /** True when the table exists. */
182
+ tableExists(table: string): Promise<boolean>;
183
+ /** The table's key attributes. */
184
+ tableKey(table: string): Promise<DynamoTableKey>;
185
+ /** The low-level AWS SDK client, for anything else. */
186
+ readonly sdk: SdkDynamoDbClient;
187
+ /** The document client (plain objects in and out), for anything else. */
188
+ readonly documentClient: DynamoDBDocumentClient;
189
+ close(): void;
190
+ }
191
+ export interface CreateDynamoDbClientOptions {
192
+ /** Undo stack for writes and tables; without one nothing is cleaned up. */
193
+ registry?: CleanupRegistry;
194
+ /** Run ID in the per-test table prefix (default: a new one). */
195
+ runId?: string;
196
+ }
197
+ /**
198
+ * Builds expression strings with `#n0`/`:v0` placeholders. One builder per
199
+ * request, so the key condition, filter and condition never reuse a name.
200
+ */
201
+ export declare class ExpressionBuilder {
202
+ readonly names: Record<string, string>;
203
+ readonly values: Record<string, unknown>;
204
+ private readonly nameIds;
205
+ private valueCount;
206
+ /** `#n0` for `status`, `#n1.#n2` for `address.city`. */
207
+ path(attribute: string): string;
208
+ value(v: unknown): string;
209
+ /** One `AND`-joined condition from an object, or a hand-written expression with its names and values merged in. */
210
+ conditions(conditions: DynamoConditions | DynamoExpression): string;
211
+ private comparison;
212
+ /** `SET #n0 = :v0, ... REMOVE #n1` for an update. */
213
+ update(changes: DynamoItem | DynamoExpression, remove?: string[], key?: DynamoKey): string;
214
+ /** An expression with its placeholders filled in, for messages: `status = "open" AND total > 10`. */
215
+ readable(expression: string): string;
216
+ /** The names and values, or undefined when empty (DynamoDB rejects empty maps). */
217
+ get expressionAttributes(): {
218
+ ExpressionAttributeNames?: Record<string, string>;
219
+ ExpressionAttributeValues?: Record<string, unknown>;
220
+ };
221
+ }
222
+ /** The `CreateTable` input for a definition. */
223
+ export declare function createTableInput(table: string, definition: DynamoTableDefinition): Record<string, unknown>;
224
+ /** The key attributes of an item, or an error naming the ones it lacks. */
225
+ export declare function keyOf(item: DynamoItem, key: DynamoTableKey, table: string): DynamoKey;
226
+ /** Short JSON for error messages. */
227
+ export declare function preview(value: unknown, max?: number): string;
228
+ /** Builds the client. */
229
+ export declare function createDynamoDbClient(config: AwsFixtureConfig, options?: CreateDynamoDbClientOptions): Promise<DynamoDbClient>;
230
+ /**
231
+ * Fixture definition for test.extend(). The undo actions run before the
232
+ * SDK client is destroyed.
233
+ */
234
+ export declare const dynamoDbFixture: {
235
+ dynamoDbClient: ({ aws, stagehandContainers, dataCleanup }: {
236
+ aws: AwsFixtureConfig | undefined;
237
+ stagehandContainers: ContainerManager;
238
+ dataCleanup: CleanupRegistry;
239
+ }, use: (client: DynamoDbClient) => Promise<void>, testInfo: {
240
+ workerIndex: number;
241
+ }) => Promise<void>;
242
+ };
243
+ //# sourceMappingURL=dynamodb.fixture.d.ts.map