@wopee-io/wopee.pw 4.4.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 (335) hide show
  1. package/.commit.hbs +71 -0
  2. package/.commitlintrc.json +3 -0
  3. package/.eslintignore +2 -0
  4. package/.eslintrc +21 -0
  5. package/.github/actions/npm_clean_install/action.yaml +35 -0
  6. package/.github/workflows/ci_cd.yaml +146 -0
  7. package/.prettierignore +3 -0
  8. package/.prettierrc +12 -0
  9. package/README.md +3 -0
  10. package/build/core/domain/configuration/config.interface.d.ts +7 -0
  11. package/build/core/domain/configuration/config.interface.js +3 -0
  12. package/build/core/domain/configuration/config.interface.js.map +1 -0
  13. package/build/core/domain/configuration/index.d.ts +2 -0
  14. package/build/core/domain/configuration/index.js +3 -0
  15. package/build/core/domain/configuration/index.js.map +1 -0
  16. package/build/core/domain/index.d.ts +2 -0
  17. package/build/core/domain/index.js +19 -0
  18. package/build/core/domain/index.js.map +1 -0
  19. package/build/core/domain/valueObjects/index.d.ts +2 -0
  20. package/build/core/domain/valueObjects/index.js +3 -0
  21. package/build/core/domain/valueObjects/index.js.map +1 -0
  22. package/build/core/domain/valueObjects/track.interface.d.ts +13 -0
  23. package/build/core/domain/valueObjects/track.interface.js +3 -0
  24. package/build/core/domain/valueObjects/track.interface.js.map +1 -0
  25. package/build/core/index.d.ts +3 -0
  26. package/build/core/index.js +20 -0
  27. package/build/core/index.js.map +1 -0
  28. package/build/core/ports/configPort/configDefaults.d.ts +2 -0
  29. package/build/core/ports/configPort/configDefaults.js +20 -0
  30. package/build/core/ports/configPort/configDefaults.js.map +1 -0
  31. package/build/core/ports/configPort/configPort.d.ts +6 -0
  32. package/build/core/ports/configPort/configPort.js +12 -0
  33. package/build/core/ports/configPort/configPort.js.map +1 -0
  34. package/build/core/ports/configPort/index.d.ts +2 -0
  35. package/build/core/ports/configPort/index.js +6 -0
  36. package/build/core/ports/configPort/index.js.map +1 -0
  37. package/build/core/ports/index.d.ts +1 -0
  38. package/build/core/ports/index.js +18 -0
  39. package/build/core/ports/index.js.map +1 -0
  40. package/build/core/services/index.d.ts +1 -0
  41. package/build/core/services/index.js +18 -0
  42. package/build/core/services/index.js.map +1 -0
  43. package/build/core/services/wopeeService/index.d.ts +2 -0
  44. package/build/core/services/wopeeService/index.js +6 -0
  45. package/build/core/services/wopeeService/index.js.map +1 -0
  46. package/build/core/services/wopeeService/wopee.d.ts +19 -0
  47. package/build/core/services/wopeeService/wopee.js +163 -0
  48. package/build/core/services/wopeeService/wopee.js.map +1 -0
  49. package/build/index.d.ts +3 -0
  50. package/build/index.js +20 -0
  51. package/build/index.js.map +1 -0
  52. package/build/infrastructure/adapters/envConfigAdapter/envConfigAdapter.d.ts +6 -0
  53. package/build/infrastructure/adapters/envConfigAdapter/envConfigAdapter.js +28 -0
  54. package/build/infrastructure/adapters/envConfigAdapter/envConfigAdapter.js.map +1 -0
  55. package/build/infrastructure/adapters/envConfigAdapter/index.d.ts +2 -0
  56. package/build/infrastructure/adapters/envConfigAdapter/index.js +6 -0
  57. package/build/infrastructure/adapters/envConfigAdapter/index.js.map +1 -0
  58. package/build/infrastructure/adapters/index.d.ts +1 -0
  59. package/build/infrastructure/adapters/index.js +18 -0
  60. package/build/infrastructure/adapters/index.js.map +1 -0
  61. package/build/infrastructure/index.d.ts +1 -0
  62. package/build/infrastructure/index.js +18 -0
  63. package/build/infrastructure/index.js.map +1 -0
  64. package/build/shared/index.d.ts +1 -0
  65. package/build/shared/index.js +18 -0
  66. package/build/shared/index.js.map +1 -0
  67. package/build/shared/metadata/index.d.ts +2 -0
  68. package/build/shared/metadata/index.js +6 -0
  69. package/build/shared/metadata/index.js.map +1 -0
  70. package/build/shared/metadata/versionMetadata.d.ts +1 -0
  71. package/build/shared/metadata/versionMetadata.js +21 -0
  72. package/build/shared/metadata/versionMetadata.js.map +1 -0
  73. package/docs/configuration.md +21 -0
  74. package/docs/minimal.md +26 -0
  75. package/jest.config.ts +16 -0
  76. package/node_modules/@autonomous-testing/sdk/.commit.hbs +71 -0
  77. package/node_modules/@autonomous-testing/sdk/.commitlintrc.json +3 -0
  78. package/node_modules/@autonomous-testing/sdk/.eslintignore +2 -0
  79. package/node_modules/@autonomous-testing/sdk/.eslintrc +21 -0
  80. package/node_modules/@autonomous-testing/sdk/.github/actions/npm_clean_install/action.yaml +35 -0
  81. package/node_modules/@autonomous-testing/sdk/.github/workflows/ci_cd.yaml +149 -0
  82. package/node_modules/@autonomous-testing/sdk/.prettierignore +3 -0
  83. package/node_modules/@autonomous-testing/sdk/.prettierrc +12 -0
  84. package/node_modules/@autonomous-testing/sdk/README.md +57 -0
  85. package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/createIntegrationScenarioPayload.interface.d.ts +14 -0
  86. package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/createIntegrationScenarioPayload.interface.js +10 -0
  87. package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/createIntegrationStepPayload.interface.d.ts +32 -0
  88. package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/createIntegrationStepPayload.interface.js +16 -0
  89. package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/createIntegrationSuitePayload.interface.d.ts +11 -0
  90. package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/createIntegrationSuitePayload.interface.js +9 -0
  91. package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/index.d.ts +14 -0
  92. package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/index.js +16 -0
  93. package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/integrationScenario.interface.d.ts +14 -0
  94. package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/integrationScenario.interface.js +10 -0
  95. package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/integrationStep.interface.d.ts +24 -0
  96. package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/integrationStep.interface.js +20 -0
  97. package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/integrationSuite.interface.d.ts +14 -0
  98. package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/integrationSuite.interface.js +10 -0
  99. package/node_modules/@autonomous-testing/sdk/build/core/domain/index.d.ts +2 -0
  100. package/node_modules/@autonomous-testing/sdk/build/core/domain/index.js +18 -0
  101. package/node_modules/@autonomous-testing/sdk/build/core/index.d.ts +3 -0
  102. package/node_modules/@autonomous-testing/sdk/build/core/index.js +19 -0
  103. package/node_modules/@autonomous-testing/sdk/build/core/ports/api.d.ts +16 -0
  104. package/node_modules/@autonomous-testing/sdk/build/core/ports/api.js +7 -0
  105. package/node_modules/@autonomous-testing/sdk/build/core/ports/index.d.ts +4 -0
  106. package/node_modules/@autonomous-testing/sdk/build/core/ports/index.js +8 -0
  107. package/node_modules/@autonomous-testing/sdk/build/core/ports/logger.d.ts +7 -0
  108. package/node_modules/@autonomous-testing/sdk/build/core/ports/logger.js +7 -0
  109. package/node_modules/@autonomous-testing/sdk/build/index.d.ts +5 -0
  110. package/node_modules/@autonomous-testing/sdk/build/index.js +22 -0
  111. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/adapter.d.ts +19 -0
  112. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/adapter.js +123 -0
  113. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/factories.d.ts +9 -0
  114. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/factories.js +144 -0
  115. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/index.d.ts +4 -0
  116. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/index.js +8 -0
  117. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/interface.d.ts +235 -0
  118. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/interface.js +82 -0
  119. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/mutations.d.ts +5 -0
  120. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/mutations.js +85 -0
  121. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/consoleLogger/consoleLogger.d.ts +36 -0
  122. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/consoleLogger/consoleLogger.js +49 -0
  123. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/consoleLogger/index.d.ts +3 -0
  124. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/consoleLogger/index.js +6 -0
  125. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/index.d.ts +4 -0
  126. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/index.js +20 -0
  127. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/noLogger/index.d.ts +3 -0
  128. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/noLogger/index.js +6 -0
  129. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/noLogger/noLogger.d.ts +31 -0
  130. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/noLogger/noLogger.js +34 -0
  131. package/node_modules/@autonomous-testing/sdk/build/infrastructure/index.d.ts +3 -0
  132. package/node_modules/@autonomous-testing/sdk/build/infrastructure/index.js +19 -0
  133. package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/apolloAdapterService/apolloAdapterService.d.ts +4 -0
  134. package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/apolloAdapterService/apolloAdapterService.js +12 -0
  135. package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/apolloAdapterService/apolloService.interface.d.ts +7 -0
  136. package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/apolloAdapterService/apolloService.interface.js +3 -0
  137. package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/apolloAdapterService/index.d.ts +4 -0
  138. package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/apolloAdapterService/index.js +6 -0
  139. package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/index.d.ts +3 -0
  140. package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/index.js +19 -0
  141. package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/loggerService/consoleLoggerOptions.interface.d.ts +4 -0
  142. package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/loggerService/consoleLoggerOptions.interface.js +3 -0
  143. package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/loggerService/index.d.ts +4 -0
  144. package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/loggerService/index.js +6 -0
  145. package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/loggerService/loggerOptions.interface.d.ts +22 -0
  146. package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/loggerService/loggerOptions.interface.js +15 -0
  147. package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/loggerService/loggerService.d.ts +4 -0
  148. package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/loggerService/loggerService.js +32 -0
  149. package/node_modules/@autonomous-testing/sdk/build/shared/index.d.ts +3 -0
  150. package/node_modules/@autonomous-testing/sdk/build/shared/index.js +19 -0
  151. package/node_modules/@autonomous-testing/sdk/build/shared/metadata/index.d.ts +3 -0
  152. package/node_modules/@autonomous-testing/sdk/build/shared/metadata/index.js +7 -0
  153. package/node_modules/@autonomous-testing/sdk/build/shared/metadata/versionMetadata.d.ts +3 -0
  154. package/node_modules/@autonomous-testing/sdk/build/shared/metadata/versionMetadata.js +6 -0
  155. package/node_modules/@autonomous-testing/sdk/build/shared/utils/error.interface.d.ts +4 -0
  156. package/node_modules/@autonomous-testing/sdk/build/shared/utils/error.interface.js +12 -0
  157. package/node_modules/@autonomous-testing/sdk/build/shared/utils/index.d.ts +5 -0
  158. package/node_modules/@autonomous-testing/sdk/build/shared/utils/index.js +22 -0
  159. package/node_modules/@autonomous-testing/sdk/build/shared/utils/mergeDicts/index.d.ts +3 -0
  160. package/node_modules/@autonomous-testing/sdk/build/shared/utils/mergeDicts/index.js +7 -0
  161. package/node_modules/@autonomous-testing/sdk/build/shared/utils/mergeDicts/mergeDicts.d.ts +17 -0
  162. package/node_modules/@autonomous-testing/sdk/build/shared/utils/mergeDicts/mergeDicts.js +29 -0
  163. package/node_modules/@autonomous-testing/sdk/build/shared/utils/zodHelper/index.d.ts +3 -0
  164. package/node_modules/@autonomous-testing/sdk/build/shared/utils/zodHelper/index.js +6 -0
  165. package/node_modules/@autonomous-testing/sdk/build/shared/utils/zodHelper/zodHelper.d.ts +14 -0
  166. package/node_modules/@autonomous-testing/sdk/build/shared/utils/zodHelper/zodHelper.js +39 -0
  167. package/node_modules/@autonomous-testing/sdk/package.json +50 -0
  168. package/node_modules/@autonomous-testing/sdk/release.config.mjs +55 -0
  169. package/node_modules/asynckit/LICENSE +21 -0
  170. package/node_modules/asynckit/README.md +233 -0
  171. package/node_modules/asynckit/bench.js +76 -0
  172. package/node_modules/asynckit/index.js +6 -0
  173. package/node_modules/asynckit/lib/abort.js +29 -0
  174. package/node_modules/asynckit/lib/async.js +34 -0
  175. package/node_modules/asynckit/lib/defer.js +26 -0
  176. package/node_modules/asynckit/lib/iterate.js +75 -0
  177. package/node_modules/asynckit/lib/readable_asynckit.js +91 -0
  178. package/node_modules/asynckit/lib/readable_parallel.js +25 -0
  179. package/node_modules/asynckit/lib/readable_serial.js +25 -0
  180. package/node_modules/asynckit/lib/readable_serial_ordered.js +29 -0
  181. package/node_modules/asynckit/lib/state.js +37 -0
  182. package/node_modules/asynckit/lib/streamify.js +141 -0
  183. package/node_modules/asynckit/lib/terminator.js +29 -0
  184. package/node_modules/asynckit/package.json +63 -0
  185. package/node_modules/asynckit/parallel.js +43 -0
  186. package/node_modules/asynckit/serial.js +17 -0
  187. package/node_modules/asynckit/serialOrdered.js +75 -0
  188. package/node_modules/asynckit/stream.js +21 -0
  189. package/node_modules/axios/CHANGELOG.md +943 -0
  190. package/node_modules/axios/LICENSE +19 -0
  191. package/node_modules/axios/README.md +991 -0
  192. package/node_modules/axios/SECURITY.md +5 -0
  193. package/node_modules/axios/UPGRADE_GUIDE.md +168 -0
  194. package/node_modules/axios/dist/axios.js +2595 -0
  195. package/node_modules/axios/dist/axios.map +1 -0
  196. package/node_modules/axios/dist/axios.min.js +3 -0
  197. package/node_modules/axios/dist/axios.min.map +1 -0
  198. package/node_modules/axios/index.d.ts +254 -0
  199. package/node_modules/axios/index.js +1 -0
  200. package/node_modules/axios/lib/adapters/README.md +37 -0
  201. package/node_modules/axios/lib/adapters/http.js +424 -0
  202. package/node_modules/axios/lib/adapters/xhr.js +222 -0
  203. package/node_modules/axios/lib/axios.js +64 -0
  204. package/node_modules/axios/lib/cancel/CancelToken.js +119 -0
  205. package/node_modules/axios/lib/cancel/CanceledError.js +22 -0
  206. package/node_modules/axios/lib/cancel/isCancel.js +5 -0
  207. package/node_modules/axios/lib/core/Axios.js +160 -0
  208. package/node_modules/axios/lib/core/AxiosError.js +86 -0
  209. package/node_modules/axios/lib/core/InterceptorManager.js +54 -0
  210. package/node_modules/axios/lib/core/README.md +8 -0
  211. package/node_modules/axios/lib/core/buildFullPath.js +20 -0
  212. package/node_modules/axios/lib/core/dispatchRequest.js +87 -0
  213. package/node_modules/axios/lib/core/mergeConfig.js +100 -0
  214. package/node_modules/axios/lib/core/settle.js +25 -0
  215. package/node_modules/axios/lib/core/transformData.js +22 -0
  216. package/node_modules/axios/lib/defaults/env/FormData.js +2 -0
  217. package/node_modules/axios/lib/defaults/index.js +146 -0
  218. package/node_modules/axios/lib/defaults/transitional.js +7 -0
  219. package/node_modules/axios/lib/env/README.md +3 -0
  220. package/node_modules/axios/lib/env/data.js +3 -0
  221. package/node_modules/axios/lib/helpers/README.md +7 -0
  222. package/node_modules/axios/lib/helpers/bind.js +11 -0
  223. package/node_modules/axios/lib/helpers/buildURL.js +70 -0
  224. package/node_modules/axios/lib/helpers/combineURLs.js +14 -0
  225. package/node_modules/axios/lib/helpers/cookies.js +53 -0
  226. package/node_modules/axios/lib/helpers/deprecatedMethod.js +24 -0
  227. package/node_modules/axios/lib/helpers/isAbsoluteURL.js +14 -0
  228. package/node_modules/axios/lib/helpers/isAxiosError.js +13 -0
  229. package/node_modules/axios/lib/helpers/isURLSameOrigin.js +68 -0
  230. package/node_modules/axios/lib/helpers/normalizeHeaderName.js +12 -0
  231. package/node_modules/axios/lib/helpers/null.js +2 -0
  232. package/node_modules/axios/lib/helpers/parseHeaders.js +53 -0
  233. package/node_modules/axios/lib/helpers/parseProtocol.js +6 -0
  234. package/node_modules/axios/lib/helpers/spread.js +27 -0
  235. package/node_modules/axios/lib/helpers/toFormData.js +72 -0
  236. package/node_modules/axios/lib/helpers/validator.js +86 -0
  237. package/node_modules/axios/lib/utils.js +470 -0
  238. package/node_modules/axios/package.json +87 -0
  239. package/node_modules/axios/tsconfig.json +14 -0
  240. package/node_modules/axios/tslint.json +6 -0
  241. package/node_modules/combined-stream/License +19 -0
  242. package/node_modules/combined-stream/Readme.md +138 -0
  243. package/node_modules/combined-stream/lib/combined_stream.js +208 -0
  244. package/node_modules/combined-stream/package.json +25 -0
  245. package/node_modules/delayed-stream/.npmignore +1 -0
  246. package/node_modules/delayed-stream/License +19 -0
  247. package/node_modules/delayed-stream/Makefile +7 -0
  248. package/node_modules/delayed-stream/Readme.md +141 -0
  249. package/node_modules/delayed-stream/lib/delayed_stream.js +107 -0
  250. package/node_modules/delayed-stream/package.json +27 -0
  251. package/node_modules/follow-redirects/LICENSE +18 -0
  252. package/node_modules/follow-redirects/README.md +155 -0
  253. package/node_modules/follow-redirects/debug.js +15 -0
  254. package/node_modules/follow-redirects/http.js +1 -0
  255. package/node_modules/follow-redirects/https.js +1 -0
  256. package/node_modules/follow-redirects/index.js +672 -0
  257. package/node_modules/follow-redirects/package.json +58 -0
  258. package/node_modules/form-data/License +19 -0
  259. package/node_modules/form-data/README.md.bak +358 -0
  260. package/node_modules/form-data/Readme.md +358 -0
  261. package/node_modules/form-data/index.d.ts +62 -0
  262. package/node_modules/form-data/lib/browser.js +2 -0
  263. package/node_modules/form-data/lib/form_data.js +501 -0
  264. package/node_modules/form-data/lib/populate.js +10 -0
  265. package/node_modules/form-data/package.json +68 -0
  266. package/node_modules/mime-db/HISTORY.md +507 -0
  267. package/node_modules/mime-db/LICENSE +23 -0
  268. package/node_modules/mime-db/README.md +100 -0
  269. package/node_modules/mime-db/db.json +8519 -0
  270. package/node_modules/mime-db/index.js +12 -0
  271. package/node_modules/mime-db/package.json +60 -0
  272. package/node_modules/mime-types/HISTORY.md +397 -0
  273. package/node_modules/mime-types/LICENSE +23 -0
  274. package/node_modules/mime-types/README.md +113 -0
  275. package/node_modules/mime-types/index.js +188 -0
  276. package/node_modules/mime-types/package.json +44 -0
  277. package/node_modules/process/.eslintrc +21 -0
  278. package/node_modules/process/LICENSE +22 -0
  279. package/node_modules/process/README.md +26 -0
  280. package/node_modules/process/browser.js +184 -0
  281. package/node_modules/process/index.js +2 -0
  282. package/node_modules/process/package.json +27 -0
  283. package/node_modules/process/test.js +199 -0
  284. package/node_modules/zod/LICENSE +21 -0
  285. package/node_modules/zod/README.md +2876 -0
  286. package/node_modules/zod/index.d.ts +2 -0
  287. package/node_modules/zod/lib/ZodError.d.ts +164 -0
  288. package/node_modules/zod/lib/ZodError.js +137 -0
  289. package/node_modules/zod/lib/__tests__/Mocker.d.ts +17 -0
  290. package/node_modules/zod/lib/__tests__/Mocker.js +57 -0
  291. package/node_modules/zod/lib/benchmarks/datetime.d.ts +5 -0
  292. package/node_modules/zod/lib/benchmarks/datetime.js +54 -0
  293. package/node_modules/zod/lib/benchmarks/discriminatedUnion.d.ts +5 -0
  294. package/node_modules/zod/lib/benchmarks/discriminatedUnion.js +79 -0
  295. package/node_modules/zod/lib/benchmarks/index.d.ts +1 -0
  296. package/node_modules/zod/lib/benchmarks/index.js +59 -0
  297. package/node_modules/zod/lib/benchmarks/ipv4.d.ts +5 -0
  298. package/node_modules/zod/lib/benchmarks/ipv4.js +54 -0
  299. package/node_modules/zod/lib/benchmarks/object.d.ts +5 -0
  300. package/node_modules/zod/lib/benchmarks/object.js +70 -0
  301. package/node_modules/zod/lib/benchmarks/primitives.d.ts +5 -0
  302. package/node_modules/zod/lib/benchmarks/primitives.js +170 -0
  303. package/node_modules/zod/lib/benchmarks/realworld.d.ts +5 -0
  304. package/node_modules/zod/lib/benchmarks/realworld.js +56 -0
  305. package/node_modules/zod/lib/benchmarks/string.d.ts +5 -0
  306. package/node_modules/zod/lib/benchmarks/string.js +55 -0
  307. package/node_modules/zod/lib/benchmarks/union.d.ts +5 -0
  308. package/node_modules/zod/lib/benchmarks/union.js +79 -0
  309. package/node_modules/zod/lib/errors.d.ts +5 -0
  310. package/node_modules/zod/lib/errors.js +17 -0
  311. package/node_modules/zod/lib/external.d.ts +6 -0
  312. package/node_modules/zod/lib/external.js +18 -0
  313. package/node_modules/zod/lib/helpers/enumUtil.d.ts +8 -0
  314. package/node_modules/zod/lib/helpers/enumUtil.js +2 -0
  315. package/node_modules/zod/lib/helpers/errorUtil.d.ts +9 -0
  316. package/node_modules/zod/lib/helpers/errorUtil.js +8 -0
  317. package/node_modules/zod/lib/helpers/parseUtil.d.ts +78 -0
  318. package/node_modules/zod/lib/helpers/parseUtil.js +125 -0
  319. package/node_modules/zod/lib/helpers/partialUtil.d.ts +8 -0
  320. package/node_modules/zod/lib/helpers/partialUtil.js +2 -0
  321. package/node_modules/zod/lib/helpers/typeAliases.d.ts +2 -0
  322. package/node_modules/zod/lib/helpers/typeAliases.js +2 -0
  323. package/node_modules/zod/lib/helpers/util.d.ts +82 -0
  324. package/node_modules/zod/lib/helpers/util.js +142 -0
  325. package/node_modules/zod/lib/index.d.ts +4 -0
  326. package/node_modules/zod/lib/index.js +29 -0
  327. package/node_modules/zod/lib/index.mjs +4236 -0
  328. package/node_modules/zod/lib/index.umd.js +4351 -0
  329. package/node_modules/zod/lib/locales/en.d.ts +3 -0
  330. package/node_modules/zod/lib/locales/en.js +129 -0
  331. package/node_modules/zod/lib/types.d.ts +1127 -0
  332. package/node_modules/zod/lib/types.js +3677 -0
  333. package/node_modules/zod/package.json +119 -0
  334. package/package.json +57 -0
  335. package/release.config.mjs +55 -0
@@ -0,0 +1,163 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.Wopee = void 0;
13
+ const envConfigAdapter_js_1 = require("../../../infrastructure/adapters/envConfigAdapter/envConfigAdapter.js");
14
+ const index_js_1 = require("../../../shared/index.js");
15
+ const sdk_1 = require("@autonomous-testing/sdk");
16
+ class Wopee {
17
+ constructor() {
18
+ this._config = null;
19
+ (0, index_js_1.logVersionMetadata)();
20
+ this._config = new envConfigAdapter_js_1.EnvConfigAdapter().loadConfig();
21
+ if (this._config.screenshotValidation.screenshotValidationEnabled) {
22
+ this._screenshotValidation = this._createApolloTrackAdapter();
23
+ }
24
+ }
25
+ _createApolloTrackAdapter() {
26
+ var _a, _b, _c, _d, _e, _f, _g, _h;
27
+ const apolloAdapterConfig = {
28
+ apiKey: this._config.screenshotValidation.apiKey,
29
+ apiUrl: this._config.screenshotValidation.apiUrl,
30
+ branchName: (_a = this._config.screenshotValidation) === null || _a === void 0 ? void 0 : _a.branchName,
31
+ enableSoftAssert: (_b = this._config.screenshotValidation) === null || _b === void 0 ? void 0 : _b.enableSoftAssert,
32
+ projectUuid: this._config.screenshotValidation.projectUuid,
33
+ browser: (_c = this._config.screenshotValidation) === null || _c === void 0 ? void 0 : _c.browser,
34
+ comment: (_d = this._config.screenshotValidation) === null || _d === void 0 ? void 0 : _d.comment,
35
+ device: (_e = this._config.screenshotValidation) === null || _e === void 0 ? void 0 : _e.device,
36
+ os: (_f = this._config.screenshotValidation) === null || _f === void 0 ? void 0 : _f.os,
37
+ pixelToPixelDiffTolerance: this._config.screenshotValidation.pixelToPixelDiffTolerance,
38
+ viewport: (_g = this._config.screenshotValidation) === null || _g === void 0 ? void 0 : _g.viewport,
39
+ customTags: (_h = this._config.screenshotValidation) === null || _h === void 0 ? void 0 : _h.customTags,
40
+ };
41
+ return (0, sdk_1.createApolloTrackAdapter)({
42
+ apolloAdapterConfig: apolloAdapterConfig,
43
+ loggerOptions: { logger: 'ConsoleLogger' },
44
+ });
45
+ }
46
+ startSuite(suiteName) {
47
+ return __awaiter(this, void 0, void 0, function* () {
48
+ if (this._config.screenshotValidation.screenshotValidationEnabled) {
49
+ yield this._screenshotValidation.createIntegrationSuite({ suiteName });
50
+ }
51
+ });
52
+ }
53
+ startScenario(scenarioName) {
54
+ return __awaiter(this, void 0, void 0, function* () {
55
+ if (this._config.screenshotValidation.screenshotValidationEnabled) {
56
+ yield this._screenshotValidation.createIntegrationScenario({ scenarioName });
57
+ }
58
+ });
59
+ }
60
+ stopScenario() {
61
+ return __awaiter(this, void 0, void 0, function* () {
62
+ if (this._config.screenshotValidation.screenshotValidationEnabled) {
63
+ yield this._screenshotValidation.stopIntegrationScenario();
64
+ }
65
+ });
66
+ }
67
+ _trackImage(trackImageOptions) {
68
+ return __awaiter(this, void 0, void 0, function* () {
69
+ const payload = sdk_1.CreateIntegrationStepPayloadSchema.parse(Object.assign({}, trackImageOptions));
70
+ return yield this._screenshotValidation.createIntegrationStep(payload);
71
+ });
72
+ }
73
+ trackImage(trackImageOptions) {
74
+ return __awaiter(this, void 0, void 0, function* () {
75
+ if (this._config.screenshotValidation.screenshotValidationEnabled) {
76
+ return yield this._trackImage(trackImageOptions);
77
+ }
78
+ return null;
79
+ });
80
+ }
81
+ _trackFullPage(trackFullPageOptions) {
82
+ return __awaiter(this, void 0, void 0, function* () {
83
+ let apolloTrackResult = null;
84
+ if (this._config.screenshotValidation.screenshotValidationEnabled) {
85
+ const pageScreenshotOptions = {
86
+ animations: 'disabled',
87
+ caret: 'initial',
88
+ fullPage: true,
89
+ scale: 'css',
90
+ type: 'png',
91
+ };
92
+ const imageBuffer = yield trackFullPageOptions.page.screenshot(pageScreenshotOptions);
93
+ const imageBase64 = imageBuffer.toString('base64');
94
+ const payload = sdk_1.CreateIntegrationStepPayloadSchema.parse(Object.assign(Object.assign({}, trackFullPageOptions), { imageBase64 }));
95
+ apolloTrackResult = yield this._screenshotValidation.createIntegrationStep(payload);
96
+ }
97
+ return apolloTrackResult;
98
+ });
99
+ }
100
+ trackFullPage(trackFullPageOptions) {
101
+ return __awaiter(this, void 0, void 0, function* () {
102
+ if (this._config.screenshotValidation.screenshotValidationEnabled) {
103
+ return yield this._trackFullPage(trackFullPageOptions);
104
+ }
105
+ return null;
106
+ });
107
+ }
108
+ _trackElement(trackElementOptions) {
109
+ return __awaiter(this, void 0, void 0, function* () {
110
+ let apolloTrackResult = null;
111
+ if (this._config.screenshotValidation.screenshotValidationEnabled) {
112
+ const locatorScreenshotOptions = {
113
+ animations: 'disabled',
114
+ caret: 'initial',
115
+ scale: 'css',
116
+ type: 'png',
117
+ };
118
+ const imageBuffer = yield trackElementOptions.locator.screenshot(locatorScreenshotOptions);
119
+ const imageBase64 = imageBuffer.toString('base64');
120
+ const payload = sdk_1.CreateIntegrationStepPayloadSchema.parse(Object.assign(Object.assign({}, trackElementOptions), { imageBase64 }));
121
+ apolloTrackResult = yield this._screenshotValidation.createIntegrationStep(payload);
122
+ }
123
+ return apolloTrackResult;
124
+ });
125
+ }
126
+ trackElement(trackElementOptions) {
127
+ return __awaiter(this, void 0, void 0, function* () {
128
+ if (this._config.screenshotValidation.screenshotValidationEnabled) {
129
+ return yield this._trackElement(trackElementOptions);
130
+ }
131
+ return null;
132
+ });
133
+ }
134
+ _trackViewport(trackViewportOptions) {
135
+ return __awaiter(this, void 0, void 0, function* () {
136
+ let apolloTrackResult = null;
137
+ if (this._config.screenshotValidation.screenshotValidationEnabled) {
138
+ const pageScreenshotOptions = {
139
+ animations: 'disabled',
140
+ caret: 'initial',
141
+ fullPage: false,
142
+ scale: 'css',
143
+ type: 'png',
144
+ };
145
+ const imageBuffer = yield trackViewportOptions.page.screenshot(pageScreenshotOptions);
146
+ const imageBase64 = imageBuffer.toString('base64');
147
+ const payload = sdk_1.CreateIntegrationStepPayloadSchema.parse(Object.assign(Object.assign({}, trackViewportOptions), { imageBase64 }));
148
+ apolloTrackResult = yield this._screenshotValidation.createIntegrationStep(payload);
149
+ }
150
+ return apolloTrackResult;
151
+ });
152
+ }
153
+ trackViewport(trackViewportOptions) {
154
+ return __awaiter(this, void 0, void 0, function* () {
155
+ if (this._config.screenshotValidation.screenshotValidationEnabled) {
156
+ return yield this._trackViewport(trackViewportOptions);
157
+ }
158
+ return null;
159
+ });
160
+ }
161
+ }
162
+ exports.Wopee = Wopee;
163
+ //# sourceMappingURL=wopee.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wopee.js","sourceRoot":"","sources":["../../../../lib/core/services/wopeeService/wopee.ts"],"names":[],"mappings":"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","sourcesContent":["import { EnvConfigAdapter } from '../../../infrastructure/adapters/envConfigAdapter/envConfigAdapter.js';\nimport { logVersionMetadata } from '../../../shared/index.js';\nimport { WopeeOptions } from '../../domain/configuration/config.interface.js';\nimport {\n TrackElementOptions,\n TrackFullPageOptions,\n TrackImageOptions,\n TrackViewportOptions,\n} from '../../domain/valueObjects/track.interface.js';\nimport {\n ApolloAdapter,\n ApolloAdapterConfig,\n CreateIntegrationStepPayload,\n CreateIntegrationStepPayloadSchema,\n IntegrationStep,\n createApolloTrackAdapter,\n} from '@autonomous-testing/sdk';\nimport { LocatorScreenshotOptions, PageScreenshotOptions } from '@playwright/test';\n\n/**\n * The Wopee class provides methods to configure and manage screenshot validation\n * for testing environments, leveraging external APIs and customized options.\n */\nexport class Wopee {\n private _config: WopeeOptions = null;\n private _screenshotValidation: ApolloAdapter;\n\n /**\n * Initializes the class by logging version metadata, parsing configuration,\n * and setting up instance options based on environmental variables or defaults.\n */\n constructor() {\n logVersionMetadata();\n this._config = new EnvConfigAdapter().loadConfig();\n\n if (this._config.screenshotValidation.screenshotValidationEnabled) {\n this._screenshotValidation = this._createApolloTrackAdapter();\n }\n }\n\n /**\n * Creates an ApolloTrackAdapter for tracking and validating screenshots.\n * @returns {ApolloTrackAdapter} The initialized tracking adapter.\n */\n private _createApolloTrackAdapter(): ApolloAdapter {\n const apolloAdapterConfig: ApolloAdapterConfig = {\n apiKey: this._config.screenshotValidation.apiKey,\n apiUrl: this._config.screenshotValidation.apiUrl,\n branchName: this._config.screenshotValidation?.branchName,\n enableSoftAssert: this._config.screenshotValidation?.enableSoftAssert,\n projectUuid: this._config.screenshotValidation.projectUuid,\n browser: this._config.screenshotValidation?.browser,\n comment: this._config.screenshotValidation?.comment,\n device: this._config.screenshotValidation?.device,\n os: this._config.screenshotValidation?.os,\n pixelToPixelDiffTolerance: this._config.screenshotValidation.pixelToPixelDiffTolerance,\n viewport: this._config.screenshotValidation?.viewport,\n customTags: this._config.screenshotValidation?.customTags,\n };\n return createApolloTrackAdapter({\n apolloAdapterConfig: apolloAdapterConfig,\n loggerOptions: { logger: 'ConsoleLogger' },\n });\n }\n\n /**\n * Starts the screenshot validation process, create/connect to Suite.\n */\n async startSuite(suiteName: string): Promise<void> {\n if (this._config.screenshotValidation.screenshotValidationEnabled) {\n await this._screenshotValidation.createIntegrationSuite({ suiteName });\n }\n }\n\n /**\n * Starts the screenshot validation process, create/connect to Suite.\n */\n async startScenario(scenarioName: string): Promise<void> {\n if (this._config.screenshotValidation.screenshotValidationEnabled) {\n await this._screenshotValidation.createIntegrationScenario({ scenarioName });\n }\n }\n\n /**\n * Stops the screenshot validation process.\n */\n async stopScenario(): Promise<void> {\n if (this._config.screenshotValidation.screenshotValidationEnabled) {\n await this._screenshotValidation.stopIntegrationScenario();\n }\n }\n\n async _trackImage(trackImageOptions: TrackImageOptions): Promise<IntegrationStep> {\n const payload: CreateIntegrationStepPayload = CreateIntegrationStepPayloadSchema.parse({\n ...trackImageOptions,\n });\n return await this._screenshotValidation.createIntegrationStep(payload);\n }\n\n /**\n * Submits a given image for tracking and validation.\n * @param trackImageOptions Parameters for image tracking.\n * @returns {ApolloTrackResult} The result of the tracking operation.\n */\n async trackImage(trackImageOptions: TrackImageOptions): Promise<IntegrationStep> {\n if (this._config.screenshotValidation.screenshotValidationEnabled) {\n return await this._trackImage(trackImageOptions);\n }\n return null;\n }\n\n async _trackFullPage(trackFullPageOptions: TrackFullPageOptions): Promise<IntegrationStep> {\n let apolloTrackResult: IntegrationStep = null;\n if (this._config.screenshotValidation.screenshotValidationEnabled) {\n const pageScreenshotOptions: PageScreenshotOptions = {\n animations: 'disabled',\n caret: 'initial',\n fullPage: true,\n scale: 'css',\n type: 'png',\n };\n const imageBuffer = await trackFullPageOptions.page.screenshot(pageScreenshotOptions);\n const imageBase64 = imageBuffer.toString('base64');\n const payload: CreateIntegrationStepPayload = CreateIntegrationStepPayloadSchema.parse({\n ...trackFullPageOptions,\n imageBase64,\n });\n apolloTrackResult = await this._screenshotValidation.createIntegrationStep(payload);\n }\n return apolloTrackResult;\n }\n\n /**\n * Captures and tracks a full page screenshot for validation.\n * @param trackFullPageOptions Parameters for image tracking.\n * @returns {ApolloTrackResult} The result of the tracking operation.\n */\n async trackFullPage(trackFullPageOptions: TrackFullPageOptions): Promise<IntegrationStep> {\n if (this._config.screenshotValidation.screenshotValidationEnabled) {\n return await this._trackFullPage(trackFullPageOptions);\n }\n return null;\n }\n\n async _trackElement(trackElementOptions: TrackElementOptions): Promise<IntegrationStep> {\n let apolloTrackResult: IntegrationStep = null;\n if (this._config.screenshotValidation.screenshotValidationEnabled) {\n const locatorScreenshotOptions: LocatorScreenshotOptions = {\n animations: 'disabled',\n caret: 'initial',\n scale: 'css',\n type: 'png',\n };\n const imageBuffer = await trackElementOptions.locator.screenshot(locatorScreenshotOptions);\n const imageBase64 = imageBuffer.toString('base64');\n const payload: CreateIntegrationStepPayload = CreateIntegrationStepPayloadSchema.parse({\n ...trackElementOptions,\n imageBase64,\n });\n apolloTrackResult = await this._screenshotValidation.createIntegrationStep(payload);\n }\n return apolloTrackResult;\n }\n\n /**\n * Captures and tracks a element screenshot for validation.\n * @param trackElementOptions Parameters for image tracking.\n * @returns {ApolloTrackResult} The result of the tracking operation.\n */\n async trackElement(trackElementOptions: TrackElementOptions): Promise<IntegrationStep> {\n if (this._config.screenshotValidation.screenshotValidationEnabled) {\n return await this._trackElement(trackElementOptions);\n }\n return null;\n }\n\n async _trackViewport(trackViewportOptions: TrackViewportOptions): Promise<IntegrationStep> {\n let apolloTrackResult: IntegrationStep = null;\n if (this._config.screenshotValidation.screenshotValidationEnabled) {\n const pageScreenshotOptions: PageScreenshotOptions = {\n animations: 'disabled',\n caret: 'initial',\n fullPage: false,\n scale: 'css',\n type: 'png',\n };\n const imageBuffer = await trackViewportOptions.page.screenshot(pageScreenshotOptions);\n const imageBase64 = imageBuffer.toString('base64');\n const payload: CreateIntegrationStepPayload = CreateIntegrationStepPayloadSchema.parse({\n ...trackViewportOptions,\n imageBase64,\n });\n apolloTrackResult = await this._screenshotValidation.createIntegrationStep(payload);\n }\n return apolloTrackResult;\n }\n\n /**\n * Captures and tracks a viewport screenshot for validation.\n * @param TrackViewportOptions Parameters for image tracking.\n * @returns {ApolloTrackResult} The result of the tracking operation.\n */\n async trackViewport(trackViewportOptions: TrackViewportOptions): Promise<IntegrationStep> {\n if (this._config.screenshotValidation.screenshotValidationEnabled) {\n return await this._trackViewport(trackViewportOptions);\n }\n return null;\n }\n}\n"]}
@@ -0,0 +1,3 @@
1
+ export * from './core/index.js';
2
+ export * from './infrastructure/index.js';
3
+ export * from './shared/index.js';
package/build/index.js ADDED
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./core/index.js"), exports);
18
+ __exportStar(require("./infrastructure/index.js"), exports);
19
+ __exportStar(require("./shared/index.js"), exports);
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,4DAA0C;AAC1C,oDAAkC","sourcesContent":["export * from './core/index.js';\nexport * from './infrastructure/index.js';\nexport * from './shared/index.js';\n"]}
@@ -0,0 +1,6 @@
1
+ import { WopeeOptions } from '../../../core/domain/configuration/config.interface.js';
2
+ import { ConfigPort } from '../../../core/ports/configPort/configPort.js';
3
+ import 'dotenv/config';
4
+ export declare class EnvConfigAdapter extends ConfigPort {
5
+ _loadConfig(): WopeeOptions;
6
+ }
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EnvConfigAdapter = void 0;
4
+ const configPort_js_1 = require("../../../core/ports/configPort/configPort.js");
5
+ require("dotenv/config");
6
+ class EnvConfigAdapter extends configPort_js_1.ConfigPort {
7
+ _loadConfig() {
8
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
9
+ const screenshotValidationOptions = {
10
+ apiKey: (_a = process.env) === null || _a === void 0 ? void 0 : _a.WOPEE_API_KEY,
11
+ apiUrl: (_b = process.env) === null || _b === void 0 ? void 0 : _b.WOPEE_API_URL,
12
+ branchName: (_c = process.env) === null || _c === void 0 ? void 0 : _c.WOPEE_BRANCH_NAME,
13
+ browser: (_d = process.env) === null || _d === void 0 ? void 0 : _d.WOPEE_BROWSER,
14
+ comment: (_e = process.env) === null || _e === void 0 ? void 0 : _e.WOPEE_COMMENT,
15
+ customTags: (_f = process.env) === null || _f === void 0 ? void 0 : _f.WOPEE_CUSTOM_TAGS,
16
+ device: (_g = process.env) === null || _g === void 0 ? void 0 : _g.WOPEE_DEVICE,
17
+ enableSoftAssert: (_h = process.env) === null || _h === void 0 ? void 0 : _h.WOPEE_ENABLE_SOFT_ASSERT,
18
+ os: (_j = process.env) === null || _j === void 0 ? void 0 : _j.WOPEE_OS,
19
+ pixelToPixelDiffTolerance: (_k = process.env) === null || _k === void 0 ? void 0 : _k.WOPEE_PIXEL_TO_PIXEL_DIFF_TOLERANCE,
20
+ projectUuid: (_l = process.env) === null || _l === void 0 ? void 0 : _l.WOPEE_PROJECT_UUID,
21
+ screenshotValidationEnabled: (_m = process.env) === null || _m === void 0 ? void 0 : _m.WOPEE_SCREENSHOT_VALIDATION_ENABLED,
22
+ viewport: (_o = process.env) === null || _o === void 0 ? void 0 : _o.WOPEE_VIEWPORT,
23
+ };
24
+ return { screenshotValidation: screenshotValidationOptions };
25
+ }
26
+ }
27
+ exports.EnvConfigAdapter = EnvConfigAdapter;
28
+ //# sourceMappingURL=envConfigAdapter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"envConfigAdapter.js","sourceRoot":"","sources":["../../../../lib/infrastructure/adapters/envConfigAdapter/envConfigAdapter.ts"],"names":[],"mappings":";;;AACA,gFAA0E;AAC1E,yBAAuB;AAEvB,MAAa,gBAAiB,SAAQ,0BAAU;IAC9C,WAAW;;QACT,MAAM,2BAA2B,GAAG;YAClC,MAAM,EAAE,MAAA,OAAO,CAAC,GAAG,0CAAE,aAAa;YAClC,MAAM,EAAE,MAAA,OAAO,CAAC,GAAG,0CAAE,aAAa;YAClC,UAAU,EAAE,MAAA,OAAO,CAAC,GAAG,0CAAE,iBAAiB;YAC1C,OAAO,EAAE,MAAA,OAAO,CAAC,GAAG,0CAAE,aAAa;YACnC,OAAO,EAAE,MAAA,OAAO,CAAC,GAAG,0CAAE,aAAa;YACnC,UAAU,EAAE,MAAA,OAAO,CAAC,GAAG,0CAAE,iBAAiB;YAC1C,MAAM,EAAE,MAAA,OAAO,CAAC,GAAG,0CAAE,YAAY;YACjC,gBAAgB,EAAE,MAAA,OAAO,CAAC,GAAG,0CAAE,wBAAwB;YACvD,EAAE,EAAE,MAAA,OAAO,CAAC,GAAG,0CAAE,QAAQ;YACzB,yBAAyB,EAAE,MAAA,OAAO,CAAC,GAAG,0CAAE,mCAAmC;YAC3E,WAAW,EAAE,MAAA,OAAO,CAAC,GAAG,0CAAE,kBAAkB;YAC5C,2BAA2B,EAAE,MAAA,OAAO,CAAC,GAAG,0CAAE,mCAAmC;YAC7E,QAAQ,EAAE,MAAA,OAAO,CAAC,GAAG,0CAAE,cAAc;SACtC,CAAC;QAEF,OAAO,EAAE,oBAAoB,EAAE,2BAAiE,EAAE,CAAC;IACrG,CAAC;CACF;AApBD,4CAoBC","sourcesContent":["import { ScreenshotValidationOptions, WopeeOptions } from '../../../core/domain/configuration/config.interface.js';\nimport { ConfigPort } from '../../../core/ports/configPort/configPort.js';\nimport 'dotenv/config';\n\nexport class EnvConfigAdapter extends ConfigPort {\n _loadConfig(): WopeeOptions {\n const screenshotValidationOptions = {\n apiKey: process.env?.WOPEE_API_KEY,\n apiUrl: process.env?.WOPEE_API_URL,\n branchName: process.env?.WOPEE_BRANCH_NAME,\n browser: process.env?.WOPEE_BROWSER,\n comment: process.env?.WOPEE_COMMENT,\n customTags: process.env?.WOPEE_CUSTOM_TAGS,\n device: process.env?.WOPEE_DEVICE,\n enableSoftAssert: process.env?.WOPEE_ENABLE_SOFT_ASSERT,\n os: process.env?.WOPEE_OS,\n pixelToPixelDiffTolerance: process.env?.WOPEE_PIXEL_TO_PIXEL_DIFF_TOLERANCE,\n projectUuid: process.env?.WOPEE_PROJECT_UUID,\n screenshotValidationEnabled: process.env?.WOPEE_SCREENSHOT_VALIDATION_ENABLED,\n viewport: process.env?.WOPEE_VIEWPORT,\n };\n\n return { screenshotValidation: screenshotValidationOptions as any as ScreenshotValidationOptions };\n }\n}\n"]}
@@ -0,0 +1,2 @@
1
+ import { EnvConfigAdapter } from './envConfigAdapter.js';
2
+ export { EnvConfigAdapter };
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EnvConfigAdapter = void 0;
4
+ const envConfigAdapter_js_1 = require("./envConfigAdapter.js");
5
+ Object.defineProperty(exports, "EnvConfigAdapter", { enumerable: true, get: function () { return envConfigAdapter_js_1.EnvConfigAdapter; } });
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../lib/infrastructure/adapters/envConfigAdapter/index.ts"],"names":[],"mappings":";;;AAAA,+DAAyD;AAEhD,iGAFA,sCAAgB,OAEA","sourcesContent":["import { EnvConfigAdapter } from './envConfigAdapter.js';\n\nexport { EnvConfigAdapter };\n"]}
@@ -0,0 +1 @@
1
+ export * from './envConfigAdapter/index.js';
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./envConfigAdapter/index.js"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/infrastructure/adapters/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8DAA4C","sourcesContent":["export * from './envConfigAdapter/index.js';\n"]}
@@ -0,0 +1 @@
1
+ export * from './adapters/index.js';
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./adapters/index.js"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/infrastructure/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC","sourcesContent":["export * from './adapters/index.js';\n"]}
@@ -0,0 +1 @@
1
+ export * from './metadata/index.js';
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./metadata/index.js"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/shared/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC","sourcesContent":["export * from './metadata/index.js';\n"]}
@@ -0,0 +1,2 @@
1
+ import { logVersionMetadata } from './versionMetadata.js';
2
+ export { logVersionMetadata };
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.logVersionMetadata = void 0;
4
+ const versionMetadata_js_1 = require("./versionMetadata.js");
5
+ Object.defineProperty(exports, "logVersionMetadata", { enumerable: true, get: function () { return versionMetadata_js_1.logVersionMetadata; } });
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/shared/metadata/index.ts"],"names":[],"mappings":";;;AAAA,6DAA0D;AAEjD,mGAFA,uCAAkB,OAEA","sourcesContent":["import { logVersionMetadata } from './versionMetadata.js';\n\nexport { logVersionMetadata };\n"]}
@@ -0,0 +1 @@
1
+ export declare const logVersionMetadata: () => void;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.logVersionMetadata = void 0;
4
+ const child_process_1 = require("child_process");
5
+ const logVersionMetadata = () => {
6
+ let version = "4.4.0"
7
+ let hash = "4acc9b751f18b6f707bd1ccb909f1a8c0c69bc01"
8
+ if (version === '__LOCAL__') {
9
+ version = process.env.npm_package_version || '__LOCAL__';
10
+ }
11
+ if (hash === '__LOCAL__') {
12
+ hash = (0, child_process_1.execSync)('git rev-parse HEAD').toString().trim();
13
+ const status = (0, child_process_1.execSync)('git status --porcelain').toString().trim();
14
+ if (status) {
15
+ hash = `${hash}: ${status.split('\n').join(', ')}`;
16
+ }
17
+ }
18
+ console.log('info', `Initializing Wopee's Playwright integration: version(${version}), hash(${hash})`);
19
+ };
20
+ exports.logVersionMetadata = logVersionMetadata;
21
+ //# sourceMappingURL=versionMetadata.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"versionMetadata.js","sourceRoot":"","sources":["../../../lib/shared/metadata/versionMetadata.ts"],"names":[],"mappings":";;;AAAA,iDAAyC;AAElC,MAAM,kBAAkB,GAAG,GAAS,EAAE;IAC3C,IAAI,OAAO,GAAW,WAAW,CAAC;IAClC,IAAI,IAAI,GAAW,WAAW,CAAC;IAG/B,IAAI,OAAO,KAAK,WAAW,EAAE,CAAC;QAC5B,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,mBAAmB,IAAI,WAAW,CAAC;IAC3D,CAAC;IAGD,IAAI,IAAI,KAAK,WAAW,EAAE,CAAC;QACzB,IAAI,GAAG,IAAA,wBAAQ,EAAC,oBAAoB,CAAC,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC;QACxD,MAAM,MAAM,GAAG,IAAA,wBAAQ,EAAC,wBAAwB,CAAC,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC;QACpE,IAAI,MAAM,EAAE,CAAC;YACX,IAAI,GAAG,GAAG,IAAI,KAAK,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QACrD,CAAC;IACH,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,wDAAwD,OAAO,WAAW,IAAI,GAAG,CAAC,CAAC;AACzG,CAAC,CAAC;AAnBW,QAAA,kBAAkB,sBAmB7B","sourcesContent":["import { execSync } from 'child_process';\n\nexport const logVersionMetadata = (): void => {\n let version: string = '__LOCAL__';\n let hash: string = '__LOCAL__';\n\n // If version is not \"__LOCAL__,\" get it from npm package\n if (version === '__LOCAL__') {\n version = process.env.npm_package_version || '__LOCAL__';\n }\n\n // If hash is not \"__LOCAL__,\" get it from Git\n if (hash === '__LOCAL__') {\n hash = execSync('git rev-parse HEAD').toString().trim();\n const status = execSync('git status --porcelain').toString().trim();\n if (status) {\n hash = `${hash}: ${status.split('\\n').join(', ')}`;\n }\n }\n\n console.log('info', `Initializing Wopee's Playwright integration: version(${version}), hash(${hash})`);\n};\n"]}
@@ -0,0 +1,21 @@
1
+ ## Fixture level configuration
2
+
3
+ Each configuration option is provided by environment variable given as
4
+
5
+ | Configuration option | Environmental variable |
6
+ | ------------------------------------------------ | ----------------------------------- |
7
+ | screenshotValidation.screenshotValidationEnabled | WOPEE_SCREENSHOT_VALIDATION_ENABLED |
8
+ | screenshotValidation.apiKey | WOPEE_API_KEY |
9
+ | screenshotValidation.apiUrl | WOPEE_API_URL |
10
+ | screenshotValidation.projectUuid | WOPEE_PROJECT_UUID |
11
+ | screenshotValidation.branchName | WOPEE_BRANCH_NAME |
12
+ | screenshotValidation.enableSoftAssert | WOPEE_ENABLE_SOFT_ASSERT |
13
+ | screenshotValidation.browser | WOPEE_BROWSER |
14
+ | screenshotValidation.comment | WOPEE_COMMENT |
15
+ | screenshotValidation.device | WOPEE_DEVICE |
16
+ | screenshotValidation.os | WOPEE_OS |
17
+ | screenshotValidation.pixelToPixelDiffTolerance | WOPEE_PIXEL_TO_PIXEL_DIFF_TOLERANCE |
18
+ | screenshotValidation.viewport | WOPEE_VIEWPORT |
19
+ | screenshotValidation.customTags | WOPEE_CUSTOM_TAGS |
20
+
21
+ where separate values are described in `WopeeOptions` and `ScreenshotValidationOptions` interfaces with default values defined in `DEFAULT_SCREENSHOT_VALIDATION_OPTIONS`,
@@ -0,0 +1,26 @@
1
+ ## Minimal example
2
+
3
+ ```typescript
4
+ import { Wopee } from '@autonomous-testing/wopee.pw';
5
+ import { test } from '@playwright/test';
6
+
7
+ test.describe('test', () => {
8
+ let wopee: Wopee;
9
+ test.beforeAll(async () => {
10
+ wopee = new Wopee();
11
+ await wopee.startSuite('suite name');
12
+ });
13
+
14
+ test.afterEach(async () => {
15
+ await wopee.stopScenario();
16
+ });
17
+
18
+ test('test', async ({ page }) => {
19
+ await page.goto('https://playwright.dev/');
20
+
21
+ const screenshot = await page.screenshot();
22
+ const imageBase64 = screenshot.toString('base64');
23
+ await wopee.trackImage({ stepName: 'image', scenarioName: 'test', imageBase64: imageBase64 });
24
+ });
25
+ });
26
+ ```
package/jest.config.ts ADDED
@@ -0,0 +1,16 @@
1
+ import type { Config } from 'jest';
2
+
3
+ const config: Config = {
4
+ preset: 'ts-jest',
5
+ testEnvironment: 'node',
6
+ testMatch: ['**/lib/**/*test.ts'],
7
+ transform: {
8
+ '\\.[jt]sx?$': 'ts-jest',
9
+ },
10
+ moduleNameMapper: {
11
+ '(.+)\\.js': '$1',
12
+ },
13
+ extensionsToTreatAsEsm: ['.ts'],
14
+ };
15
+
16
+ export default config;
@@ -0,0 +1,71 @@
1
+ {{#if scope}}
2
+ **{{scope}}:**
3
+ {{~/if}}
4
+ {{#if subject}}
5
+ {{~subject}}
6
+ {{~else}}
7
+ {{~header}}
8
+ {{~/if}}
9
+
10
+ {{~! commit link }}
11
+ {{#if @root.linkReferences~}}
12
+ ([{{shortHash}}](
13
+ {{~#if @root.repository}}
14
+ {{~#if @root.host}}
15
+ {{~@root.host}}/
16
+ {{~/if}}
17
+ {{~#if @root.owner}}
18
+ {{~@root.owner}}/
19
+ {{~/if}}
20
+ {{~@root.repository}}
21
+ {{~else}}
22
+ {{~@root.repoUrl}}
23
+ {{~/if}}/
24
+ {{~@root.commit}}/{{hash}}))
25
+ {{~else}}
26
+ {{~shortHash}}
27
+ {{~/if}}
28
+
29
+ {{~! commit references }}
30
+ {{~#if references~}}
31
+ , closes
32
+ {{~#each references}}
33
+ {{#if @root.linkReferences~}}
34
+ [
35
+ {{~#if this.owner}}
36
+ {{~this.owner}}/
37
+ {{~/if}}
38
+ {{~this.repository}}#{{this.issue}}](
39
+ {{~#if @root.repository}}
40
+ {{~#if @root.host}}
41
+ {{~@root.host}}/
42
+ {{~/if}}
43
+ {{~#if this.repository}}
44
+ {{~#if this.owner}}
45
+ {{~this.owner}}/
46
+ {{~/if}}
47
+ {{~this.repository}}
48
+ {{~else}}
49
+ {{~#if @root.owner}}
50
+ {{~@root.owner}}/
51
+ {{~/if}}
52
+ {{~@root.repository}}
53
+ {{~/if}}
54
+ {{~else}}
55
+ {{~@root.repoUrl}}
56
+ {{~/if}}/
57
+ {{~@root.issue}}/{{this.issue}})
58
+ {{~else}}
59
+ {{~#if this.owner}}
60
+ {{~this.owner}}/
61
+ {{~/if}}
62
+ {{~this.repository}}#{{this.issue}}
63
+ {{~/if}}{{/each}}
64
+ {{~/if}}
65
+
66
+ {{~#if body}}
67
+ {{#raw}}{{/raw}}
68
+ {{body}}
69
+ {{~/if}}
70
+
71
+ {{#raw}}{{/raw}}
@@ -0,0 +1,3 @@
1
+ {
2
+ "extends": ["@commitlint/config-angular"]
3
+ }
@@ -0,0 +1,2 @@
1
+ build/
2
+ node_modules/
@@ -0,0 +1,21 @@
1
+ {
2
+ "parser": "@typescript-eslint/parser",
3
+ "parserOptions": {
4
+ "project": "tsconfig.json",
5
+ "sourceType": "module"
6
+ },
7
+ "plugins": ["@typescript-eslint/eslint-plugin"],
8
+ "extends": ["plugin:@typescript-eslint/recommended", "plugin:prettier/recommended"],
9
+ "root": true,
10
+ "env": {
11
+ "node": true
12
+ },
13
+ "rules": {
14
+ "@typescript-eslint/ban-ts-comment": "off",
15
+ "@typescript-eslint/explicit-function-return-type": "off",
16
+ "@typescript-eslint/explicit-module-boundary-types": "off",
17
+ "@typescript-eslint/interface-name-prefix": "off",
18
+ "@typescript-eslint/no-explicit-any": "off",
19
+ "@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_" }]
20
+ }
21
+ }
@@ -0,0 +1,35 @@
1
+ name: Clean install Node.js dependencies
2
+ description: Install Node.js and all dependencies.
3
+
4
+ inputs:
5
+ nodejs-version:
6
+ description: 'Node.js version.'
7
+ required: false
8
+ default: '21'
9
+ npm-token:
10
+ description: 'Token for @autonomous-testing:=https://npm.pkg.github.com.'
11
+ required: true
12
+
13
+ runs:
14
+ using: 'composite'
15
+
16
+ steps:
17
+ - name: Setup node
18
+ uses: actions/setup-node@v4
19
+ with:
20
+ node-version: ${{inputs.nodejs-version}}
21
+
22
+ - name: Cache
23
+ id: cache
24
+ uses: actions/cache@v4
25
+ with:
26
+ path: node_modules
27
+ key: nodejs-${{inputs.nodejs-version}}-${{hashFiles('package-lock.json')}}
28
+ restore-keys: nodejs-${{inputs.nodejs-version}}-
29
+
30
+ - name: Npm clean install
31
+ if: steps.cache.outputs.cache-hit != 'true'
32
+ shell: bash
33
+ env:
34
+ NPM_TOKEN: ${{inputs.npm-token}}
35
+ run: npm clean-install