@alwaysmeticulous/cli 2.326.1 → 2.328.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 (456) hide show
  1. package/dist/__tests__/commonjs-dependencies.spec.d.ts +2 -0
  2. package/dist/__tests__/commonjs-dependencies.spec.d.ts.map +1 -0
  3. package/dist/__tests__/commonjs-dependencies.spec.js +82 -0
  4. package/dist/__tests__/commonjs-dependencies.spec.js.map +1 -0
  5. package/dist/command-utils/__tests__/parse-rewrites.spec.js +2 -2
  6. package/dist/command-utils/__tests__/parse-rewrites.spec.js.map +1 -1
  7. package/dist/command-utils/__tests__/warn-regex-rewrites.spec.js +2 -2
  8. package/dist/command-utils/__tests__/warn-regex-rewrites.spec.js.map +1 -1
  9. package/dist/command-utils/common-options.js +2 -2
  10. package/dist/command-utils/common-options.js.map +1 -1
  11. package/dist/command-utils/detect-upload-mode.js +2 -2
  12. package/dist/command-utils/detect-upload-mode.js.map +1 -1
  13. package/dist/command-utils/detect-upload-mode.spec.js +2 -2
  14. package/dist/command-utils/detect-upload-mode.spec.js.map +1 -1
  15. package/dist/command-utils/download-session.utils.js +2 -2
  16. package/dist/command-utils/download-session.utils.js.map +1 -1
  17. package/dist/command-utils/json-args.js +2 -2
  18. package/dist/command-utils/json-args.js.map +1 -1
  19. package/dist/command-utils/json-args.spec.js +2 -2
  20. package/dist/command-utils/json-args.spec.js.map +1 -1
  21. package/dist/command-utils/parse-container-env.js +2 -2
  22. package/dist/command-utils/parse-container-env.js.map +1 -1
  23. package/dist/command-utils/parse-rewrites.js +2 -2
  24. package/dist/command-utils/parse-rewrites.js.map +1 -1
  25. package/dist/command-utils/print-json.js +2 -2
  26. package/dist/command-utils/print-json.js.map +1 -1
  27. package/dist/command-utils/sentry.utils.js +2 -2
  28. package/dist/command-utils/sentry.utils.js.map +1 -1
  29. package/dist/command-utils/warn-regex-rewrites.js +2 -2
  30. package/dist/command-utils/warn-regex-rewrites.js.map +1 -1
  31. package/dist/commands/agent/agent-review-writes.command.spec.js +2 -2
  32. package/dist/commands/agent/agent-review-writes.command.spec.js.map +1 -1
  33. package/dist/commands/agent/build-git-options.js +2 -2
  34. package/dist/commands/agent/build-git-options.js.map +1 -1
  35. package/dist/commands/agent/build-git-options.spec.js +2 -2
  36. package/dist/commands/agent/build-git-options.spec.js.map +1 -1
  37. package/dist/commands/agent/coverage-columns.util.js +2 -2
  38. package/dist/commands/agent/coverage-columns.util.js.map +1 -1
  39. package/dist/commands/agent/create-diff-comment.command.js +2 -2
  40. package/dist/commands/agent/create-diff-comment.command.js.map +1 -1
  41. package/dist/commands/agent/diff-comment-write.utils.js +2 -2
  42. package/dist/commands/agent/diff-comment-write.utils.js.map +1 -1
  43. package/dist/commands/agent/diff-comments.command.js +2 -2
  44. package/dist/commands/agent/diff-comments.command.js.map +1 -1
  45. package/dist/commands/agent/diff-comments.command.spec.js +2 -2
  46. package/dist/commands/agent/diff-comments.command.spec.js.map +1 -1
  47. package/dist/commands/agent/ignore-diff.command.js +2 -2
  48. package/dist/commands/agent/ignore-diff.command.js.map +1 -1
  49. package/dist/commands/agent/index.js +2 -2
  50. package/dist/commands/agent/index.js.map +1 -1
  51. package/dist/commands/agent/js-coverage-diff.command.js +2 -2
  52. package/dist/commands/agent/js-coverage-diff.command.js.map +1 -1
  53. package/dist/commands/agent/js-coverage.command.handler.spec.js +2 -2
  54. package/dist/commands/agent/js-coverage.command.handler.spec.js.map +1 -1
  55. package/dist/commands/agent/js-coverage.command.js +2 -2
  56. package/dist/commands/agent/js-coverage.command.js.map +1 -1
  57. package/dist/commands/agent/js-coverage.command.spec.js +2 -2
  58. package/dist/commands/agent/js-coverage.command.spec.js.map +1 -1
  59. package/dist/commands/agent/reject-diff.command.js +2 -2
  60. package/dist/commands/agent/reject-diff.command.js.map +1 -1
  61. package/dist/commands/agent/reject-diff.command.spec.js +2 -2
  62. package/dist/commands/agent/reject-diff.command.spec.js.map +1 -1
  63. package/dist/commands/agent/reply-to-diff-comment.command.js +2 -2
  64. package/dist/commands/agent/reply-to-diff-comment.command.js.map +1 -1
  65. package/dist/commands/agent/screenshot-dom-diff.command.js +2 -2
  66. package/dist/commands/agent/screenshot-dom-diff.command.js.map +1 -1
  67. package/dist/commands/agent/screenshot-image-files.command.js +2 -2
  68. package/dist/commands/agent/screenshot-image-files.command.js.map +1 -1
  69. package/dist/commands/agent/screenshot-image.command.js +2 -2
  70. package/dist/commands/agent/screenshot-image.command.js.map +1 -1
  71. package/dist/commands/agent/sessions.command.js +2 -2
  72. package/dist/commands/agent/sessions.command.js.map +1 -1
  73. package/dist/commands/agent/sessions.command.spec.js +2 -2
  74. package/dist/commands/agent/sessions.command.spec.js.map +1 -1
  75. package/dist/commands/agent/submit-feedback.command.js +2 -2
  76. package/dist/commands/agent/submit-feedback.command.js.map +1 -1
  77. package/dist/commands/agent/test-run-check.command.js +2 -2
  78. package/dist/commands/agent/test-run-check.command.js.map +1 -1
  79. package/dist/commands/agent/test-run-check.command.spec.js +2 -2
  80. package/dist/commands/agent/test-run-check.command.spec.js.map +1 -1
  81. package/dist/commands/agent/test-run-diffs.command.js +2 -2
  82. package/dist/commands/agent/test-run-diffs.command.js.map +1 -1
  83. package/dist/commands/agent/test-run-diffs.command.spec.js +2 -2
  84. package/dist/commands/agent/test-run-diffs.command.spec.js.map +1 -1
  85. package/dist/commands/agent/test-run-diffs.utils.js +2 -2
  86. package/dist/commands/agent/test-run-diffs.utils.js.map +1 -1
  87. package/dist/commands/agent/test-run-diffs.utils.spec.js +2 -2
  88. package/dist/commands/agent/test-run-diffs.utils.spec.js.map +1 -1
  89. package/dist/commands/agent/test-run-for-commit.command.js +2 -2
  90. package/dist/commands/agent/test-run-for-commit.command.js.map +1 -1
  91. package/dist/commands/agent/timeline.command.js +2 -2
  92. package/dist/commands/agent/timeline.command.js.map +1 -1
  93. package/dist/commands/agent/timeline.command.spec.js +2 -2
  94. package/dist/commands/agent/timeline.command.spec.js.map +1 -1
  95. package/dist/commands/agent/trigger-test-run.command.js +2 -2
  96. package/dist/commands/agent/trigger-test-run.command.js.map +1 -1
  97. package/dist/commands/agent/trigger-test-run.command.spec.js +2 -2
  98. package/dist/commands/agent/trigger-test-run.command.spec.js.map +1 -1
  99. package/dist/commands/agent/upload-build.command.js +2 -2
  100. package/dist/commands/agent/upload-build.command.js.map +1 -1
  101. package/dist/commands/all-commands.d.ts.map +1 -1
  102. package/dist/commands/all-commands.js +8 -6
  103. package/dist/commands/all-commands.js.map +1 -1
  104. package/dist/commands/auth/__tests__/get-project.command.spec.js +2 -2
  105. package/dist/commands/auth/__tests__/get-project.command.spec.js.map +1 -1
  106. package/dist/commands/auth/__tests__/list-projects.command.spec.js +2 -2
  107. package/dist/commands/auth/__tests__/list-projects.command.spec.js.map +1 -1
  108. package/dist/commands/auth/__tests__/login.command.spec.js +2 -2
  109. package/dist/commands/auth/__tests__/login.command.spec.js.map +1 -1
  110. package/dist/commands/auth/__tests__/logout.command.spec.js +2 -2
  111. package/dist/commands/auth/__tests__/logout.command.spec.js.map +1 -1
  112. package/dist/commands/auth/__tests__/set-project.command.spec.js +2 -2
  113. package/dist/commands/auth/__tests__/set-project.command.spec.js.map +1 -1
  114. package/dist/commands/auth/__tests__/whoami.command.spec.js +2 -2
  115. package/dist/commands/auth/__tests__/whoami.command.spec.js.map +1 -1
  116. package/dist/commands/auth/get-project.command.js +2 -2
  117. package/dist/commands/auth/get-project.command.js.map +1 -1
  118. package/dist/commands/auth/index.js +2 -2
  119. package/dist/commands/auth/index.js.map +1 -1
  120. package/dist/commands/auth/list-projects.command.js +2 -2
  121. package/dist/commands/auth/list-projects.command.js.map +1 -1
  122. package/dist/commands/auth/login.command.js +2 -2
  123. package/dist/commands/auth/login.command.js.map +1 -1
  124. package/dist/commands/auth/logout.command.js +2 -2
  125. package/dist/commands/auth/logout.command.js.map +1 -1
  126. package/dist/commands/auth/set-project.command.js +2 -2
  127. package/dist/commands/auth/set-project.command.js.map +1 -1
  128. package/dist/commands/auth/whoami.command.js +2 -2
  129. package/dist/commands/auth/whoami.command.js.map +1 -1
  130. package/dist/commands/ci/__tests__/label-commit.utils.spec.js +2 -2
  131. package/dist/commands/ci/__tests__/label-commit.utils.spec.js.map +1 -1
  132. package/dist/commands/ci/__tests__/session-filter.utils.spec.js +2 -2
  133. package/dist/commands/ci/__tests__/session-filter.utils.spec.js.map +1 -1
  134. package/dist/commands/ci/agent-test.command.d.ts +2 -0
  135. package/dist/commands/ci/agent-test.command.d.ts.map +1 -1
  136. package/dist/commands/ci/agent-test.command.js +28 -3
  137. package/dist/commands/ci/agent-test.command.js.map +1 -1
  138. package/dist/commands/ci/agent-test.command.spec.d.ts +2 -0
  139. package/dist/commands/ci/agent-test.command.spec.d.ts.map +1 -0
  140. package/dist/commands/ci/agent-test.command.spec.js +133 -0
  141. package/dist/commands/ci/agent-test.command.spec.js.map +1 -0
  142. package/dist/commands/ci/deprecated-trigger-options.js +2 -2
  143. package/dist/commands/ci/deprecated-trigger-options.js.map +1 -1
  144. package/dist/commands/ci/index.js +2 -2
  145. package/dist/commands/ci/index.js.map +1 -1
  146. package/dist/commands/ci/label-commit.command.js +2 -2
  147. package/dist/commands/ci/label-commit.command.js.map +1 -1
  148. package/dist/commands/ci/label-commit.core.js +2 -2
  149. package/dist/commands/ci/label-commit.core.js.map +1 -1
  150. package/dist/commands/ci/label-commit.types.js +2 -2
  151. package/dist/commands/ci/label-commit.types.js.map +1 -1
  152. package/dist/commands/ci/label-commit.utils.js +2 -2
  153. package/dist/commands/ci/label-commit.utils.js.map +1 -1
  154. package/dist/commands/ci/prepare.command.js +2 -2
  155. package/dist/commands/ci/prepare.command.js.map +1 -1
  156. package/dist/commands/ci/resolve-git-options.js +2 -2
  157. package/dist/commands/ci/resolve-git-options.js.map +1 -1
  158. package/dist/commands/ci/run-local.command.js +2 -2
  159. package/dist/commands/ci/run-local.command.js.map +1 -1
  160. package/dist/commands/ci/run-with-uploaded-asset-chunks.command.js +2 -2
  161. package/dist/commands/ci/run-with-uploaded-asset-chunks.command.js.map +1 -1
  162. package/dist/commands/ci/run-with-uploaded-asset-chunks.command.spec.js +2 -2
  163. package/dist/commands/ci/run-with-uploaded-asset-chunks.command.spec.js.map +1 -1
  164. package/dist/commands/ci/run-with-uploaded-asset-chunks.utils.js +2 -2
  165. package/dist/commands/ci/run-with-uploaded-asset-chunks.utils.js.map +1 -1
  166. package/dist/commands/ci/run.command.js +2 -2
  167. package/dist/commands/ci/run.command.js.map +1 -1
  168. package/dist/commands/ci/session-filter.utils.js +2 -2
  169. package/dist/commands/ci/session-filter.utils.js.map +1 -1
  170. package/dist/commands/ci/start-tunnel.command.js +2 -2
  171. package/dist/commands/ci/start-tunnel.command.js.map +1 -1
  172. package/dist/commands/ci/trigger-test-run.core.js +2 -2
  173. package/dist/commands/ci/trigger-test-run.core.js.map +1 -1
  174. package/dist/commands/ci/trigger-test-run.types.js +2 -2
  175. package/dist/commands/ci/trigger-test-run.types.js.map +1 -1
  176. package/dist/commands/ci/upload-asset-chunk.command.js +2 -2
  177. package/dist/commands/ci/upload-asset-chunk.command.js.map +1 -1
  178. package/dist/commands/ci/upload-assets.command.js +2 -2
  179. package/dist/commands/ci/upload-assets.command.js.map +1 -1
  180. package/dist/commands/ci/upload-container.command.js +2 -2
  181. package/dist/commands/ci/upload-container.command.js.map +1 -1
  182. package/dist/commands/crawl.command.js +2 -2
  183. package/dist/commands/crawl.command.js.map +1 -1
  184. package/dist/commands/debug/clean-workspaces.js +2 -2
  185. package/dist/commands/debug/clean-workspaces.js.map +1 -1
  186. package/dist/commands/debug/index.js +2 -2
  187. package/dist/commands/debug/index.js.map +1 -1
  188. package/dist/commands/debug/present-workspace.js +2 -2
  189. package/dist/commands/debug/present-workspace.js.map +1 -1
  190. package/dist/commands/debug/project-worktree.js +2 -2
  191. package/dist/commands/debug/project-worktree.js.map +1 -1
  192. package/dist/commands/deprecated-aliases.js +2 -2
  193. package/dist/commands/deprecated-aliases.js.map +1 -1
  194. package/dist/commands/download/index.js +2 -2
  195. package/dist/commands/download/index.js.map +1 -1
  196. package/dist/commands/download/replay.command.js +2 -2
  197. package/dist/commands/download/replay.command.js.map +1 -1
  198. package/dist/commands/download/session.command.js +2 -2
  199. package/dist/commands/download/session.command.js.map +1 -1
  200. package/dist/commands/download/test-run.command.js +2 -2
  201. package/dist/commands/download/test-run.command.js.map +1 -1
  202. package/dist/commands/local/get-edited-files.utils.js +2 -2
  203. package/dist/commands/local/get-edited-files.utils.js.map +1 -1
  204. package/dist/commands/local/get-edited-files.utils.spec.js +2 -2
  205. package/dist/commands/local/get-edited-files.utils.spec.js.map +1 -1
  206. package/dist/commands/local/index.js +2 -2
  207. package/dist/commands/local/index.js.map +1 -1
  208. package/dist/commands/local/relevant-sessions.command.js +2 -2
  209. package/dist/commands/local/relevant-sessions.command.js.map +1 -1
  210. package/dist/commands/onboard/__tests__/build-context.spec.d.ts +2 -0
  211. package/dist/commands/onboard/__tests__/build-context.spec.d.ts.map +1 -0
  212. package/dist/commands/onboard/__tests__/build-context.spec.js +179 -0
  213. package/dist/commands/onboard/__tests__/build-context.spec.js.map +1 -0
  214. package/dist/commands/onboard/__tests__/check-vcs-link.spec.d.ts +2 -0
  215. package/dist/commands/onboard/__tests__/check-vcs-link.spec.d.ts.map +1 -0
  216. package/dist/commands/onboard/__tests__/check-vcs-link.spec.js +164 -0
  217. package/dist/commands/onboard/__tests__/check-vcs-link.spec.js.map +1 -0
  218. package/dist/commands/onboard/__tests__/codex-mcp.spec.d.ts +2 -0
  219. package/dist/commands/onboard/__tests__/codex-mcp.spec.d.ts.map +1 -0
  220. package/dist/commands/onboard/__tests__/codex-mcp.spec.js +73 -0
  221. package/dist/commands/onboard/__tests__/codex-mcp.spec.js.map +1 -0
  222. package/dist/commands/onboard/__tests__/detect-framework.spec.d.ts +2 -0
  223. package/dist/commands/onboard/__tests__/detect-framework.spec.d.ts.map +1 -0
  224. package/dist/commands/onboard/__tests__/detect-framework.spec.js +277 -0
  225. package/dist/commands/onboard/__tests__/detect-framework.spec.js.map +1 -0
  226. package/dist/commands/onboard/__tests__/git-repo-info.spec.d.ts +2 -0
  227. package/dist/commands/onboard/__tests__/git-repo-info.spec.d.ts.map +1 -0
  228. package/dist/commands/onboard/__tests__/git-repo-info.spec.js +109 -0
  229. package/dist/commands/onboard/__tests__/git-repo-info.spec.js.map +1 -0
  230. package/dist/commands/onboard/__tests__/inline-doc-constants.spec.d.ts +2 -0
  231. package/dist/commands/onboard/__tests__/inline-doc-constants.spec.d.ts.map +1 -0
  232. package/dist/commands/onboard/__tests__/inline-doc-constants.spec.js +157 -0
  233. package/dist/commands/onboard/__tests__/inline-doc-constants.spec.js.map +1 -0
  234. package/dist/commands/onboard/__tests__/install-skills.spec.d.ts +2 -0
  235. package/dist/commands/onboard/__tests__/install-skills.spec.d.ts.map +1 -0
  236. package/dist/commands/onboard/__tests__/install-skills.spec.js +158 -0
  237. package/dist/commands/onboard/__tests__/install-skills.spec.js.map +1 -0
  238. package/dist/commands/onboard/__tests__/materialize-workspace.spec.d.ts +2 -0
  239. package/dist/commands/onboard/__tests__/materialize-workspace.spec.d.ts.map +1 -0
  240. package/dist/commands/onboard/__tests__/materialize-workspace.spec.js +116 -0
  241. package/dist/commands/onboard/__tests__/materialize-workspace.spec.js.map +1 -0
  242. package/dist/commands/onboard/__tests__/resolve-app.spec.d.ts +2 -0
  243. package/dist/commands/onboard/__tests__/resolve-app.spec.d.ts.map +1 -0
  244. package/dist/commands/onboard/__tests__/resolve-app.spec.js +166 -0
  245. package/dist/commands/onboard/__tests__/resolve-app.spec.js.map +1 -0
  246. package/dist/commands/onboard/__tests__/safe-repo-fs.spec.d.ts +2 -0
  247. package/dist/commands/onboard/__tests__/safe-repo-fs.spec.d.ts.map +1 -0
  248. package/dist/commands/onboard/__tests__/safe-repo-fs.spec.js +137 -0
  249. package/dist/commands/onboard/__tests__/safe-repo-fs.spec.js.map +1 -0
  250. package/dist/commands/onboard/__tests__/setup-agent-integrations.spec.d.ts +2 -0
  251. package/dist/commands/onboard/__tests__/setup-agent-integrations.spec.d.ts.map +1 -0
  252. package/dist/commands/onboard/__tests__/setup-agent-integrations.spec.js +286 -0
  253. package/dist/commands/onboard/__tests__/setup-agent-integrations.spec.js.map +1 -0
  254. package/dist/commands/onboard/build-context.d.ts +16 -0
  255. package/dist/commands/onboard/build-context.d.ts.map +1 -0
  256. package/dist/commands/onboard/build-context.js +104 -0
  257. package/dist/commands/onboard/build-context.js.map +1 -0
  258. package/dist/commands/onboard/check-vcs-link.d.ts +14 -0
  259. package/dist/commands/onboard/check-vcs-link.d.ts.map +1 -0
  260. package/dist/commands/onboard/check-vcs-link.js +111 -0
  261. package/dist/commands/onboard/check-vcs-link.js.map +1 -0
  262. package/dist/commands/onboard/codex-mcp.d.ts +24 -0
  263. package/dist/commands/onboard/codex-mcp.d.ts.map +1 -0
  264. package/dist/commands/onboard/codex-mcp.js +302 -0
  265. package/dist/commands/onboard/codex-mcp.js.map +1 -0
  266. package/dist/commands/onboard/customer-agents.d.ts +9 -0
  267. package/dist/commands/onboard/customer-agents.d.ts.map +1 -0
  268. package/dist/commands/onboard/customer-agents.js +19 -0
  269. package/dist/commands/onboard/customer-agents.js.map +1 -0
  270. package/dist/commands/onboard/customer-agents.json +17 -0
  271. package/dist/commands/onboard/customer-docs.d.ts +21 -0
  272. package/dist/commands/onboard/customer-docs.d.ts.map +1 -0
  273. package/dist/commands/onboard/customer-docs.js +31 -0
  274. package/dist/commands/onboard/customer-docs.js.map +1 -0
  275. package/dist/commands/onboard/customer-docs.json +35 -0
  276. package/dist/commands/onboard/detect-framework.d.ts +26 -0
  277. package/dist/commands/onboard/detect-framework.d.ts.map +1 -0
  278. package/dist/commands/onboard/detect-framework.js +305 -0
  279. package/dist/commands/onboard/detect-framework.js.map +1 -0
  280. package/dist/commands/onboard/discover-apps.d.ts +21 -0
  281. package/dist/commands/onboard/discover-apps.d.ts.map +1 -0
  282. package/dist/commands/onboard/discover-apps.js +318 -0
  283. package/dist/commands/onboard/discover-apps.js.map +1 -0
  284. package/dist/commands/onboard/docs-urls.d.ts +11 -0
  285. package/dist/commands/onboard/docs-urls.d.ts.map +1 -0
  286. package/dist/commands/onboard/docs-urls.js +17 -0
  287. package/dist/commands/onboard/docs-urls.js.map +1 -0
  288. package/dist/commands/onboard/git-repo-info.d.ts +15 -0
  289. package/dist/commands/onboard/git-repo-info.d.ts.map +1 -0
  290. package/dist/commands/onboard/git-repo-info.js +84 -0
  291. package/dist/commands/onboard/git-repo-info.js.map +1 -0
  292. package/dist/commands/onboard/index.d.ts +18 -0
  293. package/dist/commands/onboard/index.d.ts.map +1 -0
  294. package/dist/commands/onboard/index.js +164 -0
  295. package/dist/commands/onboard/index.js.map +1 -0
  296. package/dist/commands/onboard/inline-doc-constants.d.ts +21 -0
  297. package/dist/commands/onboard/inline-doc-constants.d.ts.map +1 -0
  298. package/dist/commands/onboard/inline-doc-constants.js +238 -0
  299. package/dist/commands/onboard/inline-doc-constants.js.map +1 -0
  300. package/dist/commands/onboard/launch-agent.d.ts +65 -0
  301. package/dist/commands/onboard/launch-agent.d.ts.map +1 -0
  302. package/dist/commands/onboard/launch-agent.js +311 -0
  303. package/dist/commands/onboard/launch-agent.js.map +1 -0
  304. package/dist/commands/onboard/materialize-workspace.d.ts +68 -0
  305. package/dist/commands/onboard/materialize-workspace.d.ts.map +1 -0
  306. package/dist/commands/onboard/materialize-workspace.js +177 -0
  307. package/dist/commands/onboard/materialize-workspace.js.map +1 -0
  308. package/dist/commands/onboard/print-summary.d.ts +10 -0
  309. package/dist/commands/onboard/print-summary.d.ts.map +1 -0
  310. package/dist/commands/onboard/print-summary.js +49 -0
  311. package/dist/commands/onboard/print-summary.js.map +1 -0
  312. package/dist/commands/onboard/resolve-app.d.ts +21 -0
  313. package/dist/commands/onboard/resolve-app.d.ts.map +1 -0
  314. package/dist/commands/onboard/resolve-app.js +78 -0
  315. package/dist/commands/onboard/resolve-app.js.map +1 -0
  316. package/dist/commands/onboard/resolve-project.d.ts +14 -0
  317. package/dist/commands/onboard/resolve-project.d.ts.map +1 -0
  318. package/dist/commands/onboard/resolve-project.js +92 -0
  319. package/dist/commands/onboard/resolve-project.js.map +1 -0
  320. package/dist/commands/onboard/safe-repo-fs.d.ts +59 -0
  321. package/dist/commands/onboard/safe-repo-fs.d.ts.map +1 -0
  322. package/dist/commands/onboard/safe-repo-fs.js +266 -0
  323. package/dist/commands/onboard/safe-repo-fs.js.map +1 -0
  324. package/dist/commands/onboard/setup-agent-integrations.d.ts +43 -0
  325. package/dist/commands/onboard/setup-agent-integrations.d.ts.map +1 -0
  326. package/dist/commands/onboard/setup-agent-integrations.js +324 -0
  327. package/dist/commands/onboard/setup-agent-integrations.js.map +1 -0
  328. package/dist/commands/onboard/templates/CLAUDE.md +213 -0
  329. package/dist/commands/onboard/templates/agents/auth-setup.md +117 -0
  330. package/dist/commands/onboard/templates/agents/ci-setup.md +742 -0
  331. package/dist/commands/onboard/templates/agents/csp-setup.md +78 -0
  332. package/dist/commands/onboard/templates/agents/false-positive-prevention.md +268 -0
  333. package/dist/commands/onboard/templates/agents/feature-flag-setup.md +133 -0
  334. package/dist/commands/onboard/templates/agents/local-simulation-verification.md +96 -0
  335. package/dist/commands/onboard/templates/agents/persisted-graphql-queries.md +150 -0
  336. package/dist/commands/onboard/templates/agents/recorder-installation.md +194 -0
  337. package/dist/commands/onboard/templates/agents/replay-fetch-retry-compatibility.md +252 -0
  338. package/dist/commands/onboard/templates/agents/reviewer.md +788 -0
  339. package/dist/commands/onboard/templates/agents/service-worker-compatibility.md +254 -0
  340. package/dist/commands/onboard/templates/agents/session-context.md +133 -0
  341. package/dist/commands/onboard/templates/agents/shared-worker-compatibility.md +187 -0
  342. package/dist/commands/onboard/templates/docs/additional-guides/backend-recorder.ts +340 -0
  343. package/dist/commands/onboard/templates/docs/ci/not-yet-run-checks.ts +58 -0
  344. package/dist/commands/onboard/templates/docs/ci.ts +19 -0
  345. package/dist/commands/onboard/templates/docs/cloud-replay.ts +145 -0
  346. package/dist/commands/onboard/templates/docs/constants.ts +37 -0
  347. package/dist/commands/onboard/templates/docs/github-actions-v2.ts +859 -0
  348. package/dist/commands/onboard/templates/docs/how-to/auth/bypassing-auth.ts +27 -0
  349. package/dist/commands/onboard/templates/docs/how-to/auth/enabling-full-auth.ts +91 -0
  350. package/dist/commands/onboard/templates/docs/how-to/configure-ignore-patterns.ts +77 -0
  351. package/dist/commands/onboard/templates/docs/how-to/enable-source-coverage.ts +84 -0
  352. package/dist/commands/onboard/templates/docs/how-to/fix-false-positive-diffs.ts +156 -0
  353. package/dist/commands/onboard/templates/docs/how-to/link-bitbucket.ts +15 -0
  354. package/dist/commands/onboard/templates/docs/how-to/link-gitlab.ts +22 -0
  355. package/dist/commands/onboard/templates/docs/how-to/record-session-context.ts +129 -0
  356. package/dist/commands/onboard/templates/docs/how-to/recorder-script.ts +139 -0
  357. package/dist/commands/onboard/templates/docs/how-to/testing-feature-flags.ts +97 -0
  358. package/dist/commands/onboard/templates/docs/how-to/testing-multiple-apps-or-app-variants.ts +40 -0
  359. package/dist/commands/onboard/templates/docs/how-to/troubleshoot-auth.ts +58 -0
  360. package/dist/commands/onboard/templates/docs/how-to/troubleshoot-failed-simulations.ts +97 -0
  361. package/dist/commands/onboard/templates/docs/how-to/typescript-types.ts +51 -0
  362. package/dist/commands/onboard/templates/docs/how-to/window-meticulous-object.ts +685 -0
  363. package/dist/commands/onboard/templates/docs/onboarding-guide.ts +415 -0
  364. package/dist/commands/onboard/templates/docs/recorder-getting-started.ts +24 -0
  365. package/dist/commands/onboard/templates/docs/recorder-snippets/constants.ts +1 -0
  366. package/dist/commands/onboard/templates/docs/recorder-snippets/explanation-of-methods-to-add-recorder.ts +21 -0
  367. package/dist/commands/onboard/templates/docs/recorder-snippets/npm-package-based-instructions/angular-instructions.ts +34 -0
  368. package/dist/commands/onboard/templates/docs/recorder-snippets/npm-package-based-instructions/any-other-framework-instructions.ts +118 -0
  369. package/dist/commands/onboard/templates/docs/recorder-snippets/npm-package-based-instructions/vue-instructions.ts +39 -0
  370. package/dist/commands/onboard/templates/docs/recorder-snippets/script-based-instructions/next-js-instructions.ts +49 -0
  371. package/dist/commands/onboard/templates/docs/recorder-snippets/script-based-instructions/nuxtjs-instructions.ts +68 -0
  372. package/dist/commands/onboard/templates/docs/recorder-snippets/script-based-instructions/rsbuild-instructions.ts +66 -0
  373. package/dist/commands/onboard/templates/docs/recorder-snippets/script-based-instructions/storybook-instructions.ts +59 -0
  374. package/dist/commands/onboard/templates/docs/recorder-snippets/script-based-instructions/sveltekit-instructions.ts +113 -0
  375. package/dist/commands/onboard/templates/docs/recorder-snippets/script-based-instructions/vite-instructions.ts +58 -0
  376. package/dist/commands/onboard/templates/docs/recorder-snippets/script-requirements.ts +51 -0
  377. package/dist/commands/onboard/templates/docs/recorder-snippets/steps-after-installing-recorder.ts +25 -0
  378. package/dist/commands/onboard/templates/docs/reference/cli-commands.ts +1324 -0
  379. package/dist/commands/onboard/templates/docs/session-recording/csp-exceptions.ts +17 -0
  380. package/dist/commands/onboard/templates/docs/session-recording/recorder-npm-dependency.ts +62 -0
  381. package/dist/commands/onboard/templates/docs-imports/src/lib/next/next.constants.ts +46 -0
  382. package/dist/commands/onboard/templates/docs-imports/src/lib/utils/internal-urls/docs-urls.utils.ts +254 -0
  383. package/dist/commands/onboard/templates/settings.json +14 -0
  384. package/dist/commands/project/index.js +2 -2
  385. package/dist/commands/project/index.js.map +1 -1
  386. package/dist/commands/project/show.command.js +2 -2
  387. package/dist/commands/project/show.command.js.map +1 -1
  388. package/dist/commands/project/upload-source.command.js +2 -2
  389. package/dist/commands/project/upload-source.command.js.map +1 -1
  390. package/dist/commands/record/__tests__/backend-dev-command.utils.spec.js +2 -2
  391. package/dist/commands/record/__tests__/backend-dev-command.utils.spec.js.map +1 -1
  392. package/dist/commands/record/__tests__/backend-sidecar.utils.spec.js +2 -2
  393. package/dist/commands/record/__tests__/backend-sidecar.utils.spec.js.map +1 -1
  394. package/dist/commands/record/__tests__/backend.command.spec.js +2 -2
  395. package/dist/commands/record/__tests__/backend.command.spec.js.map +1 -1
  396. package/dist/commands/record/__tests__/login.command.spec.js +2 -2
  397. package/dist/commands/record/__tests__/login.command.spec.js.map +1 -1
  398. package/dist/commands/record/__tests__/session.command.spec.js +2 -2
  399. package/dist/commands/record/__tests__/session.command.spec.js.map +1 -1
  400. package/dist/commands/record/backend-dev-command.utils.js +2 -2
  401. package/dist/commands/record/backend-dev-command.utils.js.map +1 -1
  402. package/dist/commands/record/backend-sidecar.utils.js +2 -2
  403. package/dist/commands/record/backend-sidecar.utils.js.map +1 -1
  404. package/dist/commands/record/backend.command.js +2 -2
  405. package/dist/commands/record/backend.command.js.map +1 -1
  406. package/dist/commands/record/index.js +2 -2
  407. package/dist/commands/record/index.js.map +1 -1
  408. package/dist/commands/record/login.command.js +2 -2
  409. package/dist/commands/record/login.command.js.map +1 -1
  410. package/dist/commands/record/session.command.js +2 -2
  411. package/dist/commands/record/session.command.js.map +1 -1
  412. package/dist/commands/replay-debugger.ui.js +2 -2
  413. package/dist/commands/replay-debugger.ui.js.map +1 -1
  414. package/dist/commands/replay.command.js +2 -2
  415. package/dist/commands/replay.command.js.map +1 -1
  416. package/dist/commands/schema.command.js +2 -2
  417. package/dist/commands/schema.command.js.map +1 -1
  418. package/dist/commands/schema.command.spec.js +2 -2
  419. package/dist/commands/schema.command.spec.js.map +1 -1
  420. package/dist/index.js +2 -2
  421. package/dist/index.js.map +1 -1
  422. package/dist/main.js +2 -2
  423. package/dist/main.js.map +1 -1
  424. package/dist/utils/__tests__/handle-auth-failure.spec.js +2 -2
  425. package/dist/utils/__tests__/handle-auth-failure.spec.js.map +1 -1
  426. package/dist/utils/__tests__/project-selection-hint.spec.js +2 -2
  427. package/dist/utils/__tests__/project-selection-hint.spec.js.map +1 -1
  428. package/dist/utils/__tests__/resolve-project-identifier.spec.js +2 -2
  429. package/dist/utils/__tests__/resolve-project-identifier.spec.js.map +1 -1
  430. package/dist/utils/__tests__/resolve-test-run-from-commit.spec.js +2 -2
  431. package/dist/utils/__tests__/resolve-test-run-from-commit.spec.js.map +1 -1
  432. package/dist/utils/__tests__/select-project.spec.js +5 -4
  433. package/dist/utils/__tests__/select-project.spec.js.map +1 -1
  434. package/dist/utils/cli-user-error.js +2 -2
  435. package/dist/utils/cli-user-error.js.map +1 -1
  436. package/dist/utils/constants.js +2 -2
  437. package/dist/utils/constants.js.map +1 -1
  438. package/dist/utils/environment.utils.js +2 -2
  439. package/dist/utils/environment.utils.js.map +1 -1
  440. package/dist/utils/format-coverage-ranges.js +2 -2
  441. package/dist/utils/format-coverage-ranges.js.map +1 -1
  442. package/dist/utils/handle-auth-failure.js +2 -2
  443. package/dist/utils/handle-auth-failure.js.map +1 -1
  444. package/dist/utils/out-of-date-client-error.js +2 -2
  445. package/dist/utils/out-of-date-client-error.js.map +1 -1
  446. package/dist/utils/project-selection-hint.js +2 -2
  447. package/dist/utils/project-selection-hint.js.map +1 -1
  448. package/dist/utils/resolve-project-identifier.js +2 -2
  449. package/dist/utils/resolve-project-identifier.js.map +1 -1
  450. package/dist/utils/resolve-test-run-from-commit.js +2 -2
  451. package/dist/utils/resolve-test-run-from-commit.js.map +1 -1
  452. package/dist/utils/select-project.d.ts +9 -0
  453. package/dist/utils/select-project.d.ts.map +1 -1
  454. package/dist/utils/select-project.js +58 -15
  455. package/dist/utils/select-project.js.map +1 -1
  456. package/package.json +14 -12
@@ -0,0 +1,139 @@
1
+ import { METICULOUS_SETUP_CALENDLY_LINK } from "src/lib/next/next.constants";
2
+ import {
3
+ INSTALLATION_INSTRUCTIONS_ANCHOR,
4
+ INSTALL_RECORDER_AS_NPM_DEPENDENCY_INSTALLATION_INSTRUCTIONS_URL,
5
+ NEXTJS_APP_ROUTER_ADDITIONAL_SETUP_URL,
6
+ } from "src/lib/utils/internal-urls/docs-urls.utils";
7
+ import { SNIPPET_URL } from "../recorder-snippets/constants";
8
+ import { nextJsInstructions } from "../recorder-snippets/script-based-instructions/next-js-instructions";
9
+ import { nuxtJsInstructions } from "../recorder-snippets/script-based-instructions/nuxtjs-instructions";
10
+ import { rsbuildInstructions } from "../recorder-snippets/script-based-instructions/rsbuild-instructions";
11
+ import { storybookInstructions } from "../recorder-snippets/script-based-instructions/storybook-instructions";
12
+ import { svelteKitInstructions } from "../recorder-snippets/script-based-instructions/sveltekit-instructions";
13
+ import { viteInstructions } from "../recorder-snippets/script-based-instructions/vite-instructions";
14
+ import { scriptRequirementsCalloutCard } from "../recorder-snippets/script-requirements";
15
+ import { STEPS_AFTER_INSTALLING_RECORDER } from "../recorder-snippets/steps-after-installing-recorder";
16
+
17
+ const BOOK_A_CALL_TIP = `If you have any issues setting up the recorder then click [here](${METICULOUS_SETUP_CALENDLY_LINK}) to book a call with us.`;
18
+
19
+ const POST_TAB_CONTENT = `
20
+ If you have any cross-origin or sandboxed iFrames then the recorder should be added to each of these iFrames as well as the main frame. ${BOOK_A_CALL_TIP}
21
+
22
+ ${STEPS_AFTER_INSTALLING_RECORDER}
23
+ `;
24
+
25
+ export const document = `---
26
+ {
27
+ "title": "Install the Meticulous recorder via a script tag"
28
+ }
29
+ ---
30
+
31
+ {% anchor id="${INSTALLATION_INSTRUCTIONS_ANCHOR}" /%}
32
+ # {% $frontmatter.title %}
33
+
34
+ Please select your framework or build tool:
35
+
36
+ {% tabs direction="grid" noTabSelectedByDefault=true %}
37
+ {% tab label="NextJS with the /pages directory" %}
38
+ ## Installing on NextJS with the /pages directory
39
+
40
+ ${scriptRequirementsCalloutCard({ isNextJs: "yes" })}
41
+
42
+ Add a script tag to your \`_document.js\` file within \`Head\`. If the layout doesn't yet have a \`<Head>\` tag then
43
+ you can add one within the \`<Html>\` tag.
44
+
45
+ ${nextJsInstructions("Head")}
46
+
47
+ ${POST_TAB_CONTENT}
48
+ {% /tab %}
49
+ {% tab label="NextJS with the /app directory" %}
50
+ ## Installing on NextJS with the /app directory
51
+
52
+ ${scriptRequirementsCalloutCard({ isNextJs: "yes" })}
53
+
54
+ Add a script tag to your \`/app/layout.tsx\` or \`/app/layout.jsx\` file within \`head\`. If the layout doesn't yet have a \`<head>\` tag then
55
+ you can add one within the \`<html>\` tag.
56
+
57
+ ${nextJsInstructions("head")}
58
+
59
+ After adding the snippet you'll need to follow a [few additional steps](${NEXTJS_APP_ROUTER_ADDITIONAL_SETUP_URL}) to ensure Meticulous can
60
+ correctly test your app.
61
+
62
+ ${POST_TAB_CONTENT}
63
+ {% /tab %}
64
+ {% tab label="Nuxt" %}
65
+ ## Installing on NuxtJS
66
+
67
+ ${scriptRequirementsCalloutCard({ isNextJs: "no" })}
68
+
69
+ ${nuxtJsInstructions()}
70
+
71
+ ${POST_TAB_CONTENT}
72
+ {% /tab %}
73
+ {% tab label="SvelteKit" %}
74
+ ## Installing on SvelteKit
75
+
76
+ ${scriptRequirementsCalloutCard({ isNextJs: "no" })}
77
+
78
+ ${svelteKitInstructions()}
79
+
80
+ ${POST_TAB_CONTENT}
81
+ {% /tab %}
82
+ {% tab label="Vite" %}
83
+ ## Installing on Vite
84
+
85
+ ${scriptRequirementsCalloutCard({ isNextJs: "no" })}
86
+
87
+ ${viteInstructions()}
88
+
89
+ ${POST_TAB_CONTENT}
90
+ {% /tab %}
91
+ {% tab label="rsbuild" %}
92
+ ## Installing on rsbuild
93
+
94
+ ${scriptRequirementsCalloutCard({ isNextJs: "no" })}
95
+
96
+ ${rsbuildInstructions()}
97
+
98
+ ${POST_TAB_CONTENT}
99
+ {% /tab %}
100
+ {% tab label="Storybook" %}
101
+ ## Installing on Storybook
102
+
103
+ ${scriptRequirementsCalloutCard({ isNextJs: "no" })}
104
+
105
+ ${storybookInstructions()}
106
+
107
+ ${POST_TAB_CONTENT}
108
+ {% /tab %}
109
+ {% tab label="Any other framework or build tool" %}
110
+ ## Installing on any other framework or build tool
111
+
112
+ ${scriptRequirementsCalloutCard({ isNextJs: "no" })}
113
+
114
+ Add the recorder as the first script tag in your \`<head>\` tag. If you only want to record sessions in non-production environments then
115
+ you will need to template your HTML to only include the script tag in non-production environments (if this is not possible then you can
116
+ [use an NPM dependency instead of a script tag](${INSTALL_RECORDER_AS_NPM_DEPENDENCY_INSTALLATION_INSTRUCTIONS_URL})).
117
+
118
+ {% code_with_project_selector %}
119
+ \`\`\`html
120
+ <head>
121
+ ...
122
+ <script
123
+ data-recording-token="{% project_recording_token /%}"
124
+ data-is-production-environment="<true/false>"
125
+ src="${SNIPPET_URL}">
126
+ </script>
127
+
128
+ <!--Meticulous snippet should be added before your app -->
129
+ ...
130
+ <script src="main_app.js"></script>
131
+ </head>
132
+ \`\`\`
133
+ {% /code_with_project_selector %}
134
+
135
+ ${POST_TAB_CONTENT}
136
+ {% /tab %}
137
+
138
+ {% /tabs %}
139
+ `;
@@ -0,0 +1,97 @@
1
+ import {
2
+ METICULOUS_WINDOW_OBJECT_URL,
3
+ NETWORK_STUBBING_EXPLANATION_URL,
4
+ RECORD_SESSION_CONTEXT_URL,
5
+ TESTING_POOL_URL,
6
+ TYPESCRIPT_TYPES_URL,
7
+ } from "src/lib/utils/internal-urls/docs-urls.utils";
8
+
9
+ export const document = `---
10
+ {
11
+ "title": "Testing Feature Flags with Meticulous"
12
+ }
13
+ ---
14
+
15
+ # {% $frontmatter.title %}
16
+
17
+ > **Note:** To learn how to *register* feature flags in your sessions, see [Recording the context of a user session](${RECORD_SESSION_CONTEXT_URL}). This page explains how Meticulous *tests* feature flags.
18
+
19
+ By default Meticulous will snapshot the network responses, local storage values, cookies and session storage values when a session is
20
+ originally recorded, and [stub out and replay those values](${NETWORK_STUBBING_EXPLANATION_URL}) when later replaying the session. This allows
21
+ Meticulous to test across varied feature flag configurations.
22
+
23
+ And since different feature flag combinations activate different code paths, and Meticulous
24
+ [optimizes the test suite to cover all code paths](${TESTING_POOL_URL}), Meticulous will normally automatically include
25
+ test cases for all relevant recorded feature flag combinations.
26
+
27
+ For example, say user 1 records a first user session, session A, and user 2 records a second user session, session B, and the value of the feature
28
+ flag *my_new_feature* is false for user 1 and true for user 2, then when Meticulous replays session A it'll replay with *my_new_feature* disabled,
29
+ and when Meticulous replays session B it'll replay with *my_new_feature* enabled. Meticulous will likely select both sessions into the test
30
+ suite since they cover different code paths.
31
+
32
+ ### Improving Test Coverage with New Feature Flags
33
+
34
+ As mentioned above Meticulous will automatically test feature flag combinations if sessions are recorded with the different feature flags enabled.
35
+ However any sessions recorded *prior* to the feature flag being introduced will likely not test the new feature since they'll replay old saved
36
+ network responses and local storage values without an entry for the new feature flag. This means test coverage of new features gated
37
+ behind feature flags can be limited until new sessions are recorded with that feature flag enabled.
38
+
39
+ You can fix this by enabling the feature flags by default when running as part of a Meticulous test in the case that the feature flag cannot be found in
40
+ the network response or local storage (i.e. when Meticulous is replaying old network responses or local storage values from before the
41
+ feature flag was introduced). We've included instructions for Statsig below, but a similar approach can be applied for any feature flagging
42
+ framework. **We recommend making this change if you often develop new features gated behind feature flags.**
43
+
44
+ ### Configuring Meticulous with Statsig
45
+
46
+ Before checking a feature flag value first check [window.Meticulous?.isRunningAsTest](${METICULOUS_WINDOW_OBJECT_URL}), and if so then
47
+ check if configuration for the feature flag is missing entirely - if it is then default the feature flag to enabled. This then allows
48
+ Meticulous to use old sessions to test new features. Here's an example for Statsig, however similar approaches can be followed for other
49
+ feature flagging frameworks, and for Statsig's React integration:
50
+
51
+ \`\`\`typescript
52
+ import { StatsigClient } from '@statsig/js-client';
53
+
54
+ const myStatsigClient = new StatsigClient(
55
+ YOUR_CLIENT_KEY,
56
+ { userID: 'a-user' },
57
+ ...
58
+ );
59
+ await myStatsigClient.initializeAsync();
60
+
61
+ // We wrap checkGate, and use the wrapped version in our code instead of directly calling myStatsigClient.checkGate
62
+ const checkGate = (gateName: string) => {
63
+ // If the application is running as part of a Meticulous test, and Meticulous is replaying old network responses or local storage values
64
+ // from before the feature gate was introduced then let's default the feature to on, so that Meticulous can use old user sessions to test
65
+ // new features.
66
+ //
67
+ // See https://docs.statsig.com/sdk/debugging
68
+ if (window.Meticulous?.isRunningAsTest
69
+ && myStatsigClient.getFeatureGate(gateName).details.reason.endsWith("Unrecognized")) {
70
+ return true;
71
+ }
72
+ return myStatsigClient.checkGate(gateName);
73
+ }
74
+ \`\`\`
75
+
76
+ ### Configuring Meticulous with LaunchDarkly
77
+
78
+ When accessing a variation default it to true if [window.Meticulous?.isRunningAsTest](${METICULOUS_WINDOW_OBJECT_URL}) is true.
79
+
80
+ Before:
81
+ \`\`\`typescript
82
+ client.variation('my_new_feature', false);
83
+ \`\`\`
84
+
85
+ After:
86
+
87
+ \`\`\`typescript
88
+ client.variation('my_new_feature', window.Meticulous?.isRunningAsTest ?? false);
89
+ \`\`\`
90
+
91
+ We recommend wrapping your client to make this the automatic behavior rather than updating every call site.
92
+
93
+ ## Related Pages
94
+
95
+ - [Recording the context of a user session](${RECORD_SESSION_CONTEXT_URL}) - Learn how to record feature flags and other session context
96
+ - [TypeScript Types for window.Meticulous](${TYPESCRIPT_TYPES_URL}) - Get type definitions for the \`window.Meticulous\` object
97
+ `;
@@ -0,0 +1,40 @@
1
+ import { METICULOUS_SUPPORT_EMAIL } from "src/lib/next/next.constants";
2
+ import { BASE_URL_EXPLANATION_URL } from "src/lib/utils/internal-urls/docs-urls.utils";
3
+
4
+ export const document = `---
5
+ {
6
+ "title": "Testing Multiple Apps or App Variants"
7
+ }
8
+ ---
9
+
10
+ # {% $frontmatter.title %}
11
+
12
+ ### I have a single app, but with multiple variants deployed under different configurations to different URLs. How do I use Meticulous to test them?
13
+
14
+ When Meticulous simulates sessions it is configured to simulate the sessions against a particular base URL - for example the \`report-diffs-action\` \`appUrl\` or the URL of the Vercel deployment. This URL will
15
+ normally be different to the URL the session was recorded at. When simulating a session, Meticulous takes the URL the session was recorded at and swaps out the origin with the new base URL. Learn more [here](${BASE_URL_EXPLANATION_URL}).
16
+
17
+ You'll therefore need to make sure that the base URL you are simulating sessions against serves up the same app under the same configuration as the base URL sessions are recorded on.
18
+
19
+ If you have multiple URLs that serve different variants of your app, for example, customized for different customers, then you can set up multiple Meticulous projects and multiple Vercel deployments or \`report-diffs-action\` calls - one to test each variant of the app using the sessions recorded for that variant. See below for more details.
20
+
21
+ ### I have multiple independent apps in the same monorepo. How do I use Meticulous to test them?
22
+
23
+ You'll most likely want to set up multiple Meticulous projects for the same GitHub repo. Each Meticulous project will have its own recording token, allowing you
24
+ to set up each app to record sessions in a different Meticulous project.
25
+
26
+ If you're using Github Actions to run Meticulous in CI you can then set up a separate call
27
+ to \`report-diffs-action\` for each Meticulous project, passing in the API token of the relevant project, and pointing it to a URL that serves the correct application.
28
+
29
+ If you're using Vercel, or another service that provides preview URLs, then you'll want to configure Vercel deployments for each application separately.
30
+ Navigate to the project settings page for each Meticulous project and configure that project to test against only the relevant Vercel deployments by
31
+ selecting the appropriate environments in the \`Environments to Test Against\` section.
32
+
33
+ ### GitHub check names with multiple projects
34
+
35
+ When you have multiple Meticulous projects connected to the same GitHub repository, the GitHub status check name includes the project name to differentiate them. For example, instead of *'Meticulous Tests'*, the checks will be named *'Meticulous Tests (project-a)'* and *'Meticulous Tests (project-b)'*.
36
+
37
+ If you have Meticulous configured as a [required check](/docs/make-check-blocking) in your branch protection rules, make sure the required check names match the actual check names. Adding a second project to a repo that previously only had one will change the check name, which can cause PRs to hang waiting for a check that no longer exists under the old name.
38
+
39
+ Reach out to [${METICULOUS_SUPPORT_EMAIL}](mailto:${METICULOUS_SUPPORT_EMAIL}) and we'll help you get set up.
40
+ `;
@@ -0,0 +1,58 @@
1
+ import { METICULOUS_SUPPORT_EMAIL } from "src/lib/next/next.constants";
2
+ import {
3
+ AUTH_BYPASSING_AUTH_URL,
4
+ AUTH_ENABLING_FULL_AUTH_URL,
5
+ } from "src/lib/utils/internal-urls/docs-urls.utils";
6
+
7
+ export const document = `---
8
+ {
9
+ "title": "Troubleshoot Authentication & Authorisation Issues"
10
+ }
11
+ ---
12
+
13
+ # {% $frontmatter.title %}
14
+
15
+ Auth issues are some of the most common issues that you might encounter while setting up Meticulous.
16
+ This class of issues is easily identifiable by sessions recorded on logged-in pages which, when simulated, consistently redirect to
17
+ log-in pages or 401 screens.
18
+
19
+ By default Meticulous automatically stubs all XHR, Fetch and WebSocket requests to your backend, and therefore does not necessarily need to
20
+ authenticate to your backend. In addition Meticulous will also automatically record and replay cookies,
21
+ local storage & session storage, and so will often be able to authenticate automatically.
22
+
23
+ However if you use server side rendering (SSR),
24
+ React server components, or wish to test your backend then you may need Meticulous to be able
25
+ to authenticate correctly with your backend. This works out of the box if your cookie expiries are long enough (at least a week) and
26
+ you're not using http only cookies. If this isn't the case click [here](${AUTH_ENABLING_FULL_AUTH_URL}) for docs on how to enable
27
+ Meticulous to authenticate correctly with your backend.
28
+
29
+ However even if you are only using Meticulous to test your frontend, there are still some common issues that can arise:
30
+
31
+ ### 1. Backend auth checks when serving the document's HTML
32
+
33
+ When requesting your app's document/HTML your backend may check the user's authentication and redirect them to a login page if they are no
34
+ longer authenticated. If this is the case you'll either need to [disable this redirect](${AUTH_BYPASSING_AUTH_URL}) when replaying the Meticulous tests against CI/preview URLs, or allow
35
+ [Meticulous to authenticate correctly against your backend](${AUTH_ENABLING_FULL_AUTH_URL}).
36
+
37
+ ### 2. Different auth setups across environments
38
+
39
+ This can be an issue if all of the following hold:
40
+
41
+ - The environment you replay sessions against in CI and the environment you record sessions on (e.g. localhost) use different auth setups, and:
42
+ - Your _frontend_ code checks the user's authentication status, and:
43
+ - This check would fail if the cookies or local storage were from an environment with a different auth setup (for example, your FE code
44
+ redirects the user to login unless a cookie with name \`auth.\${environment-name}\` exists).
45
+
46
+ In this case you'll either need to [disable the FE check when running Meticulous tests](${AUTH_BYPASSING_AUTH_URL}), or standardize your auth provider client across environments.
47
+
48
+ ### 3. You are using Auth0
49
+
50
+ In this case you may need to configure Auth0 to store user session data in local storage, or not use httpOnly cookies. See [here](${AUTH_ENABLING_FULL_AUTH_URL}?tab=Auth0) for more information.
51
+
52
+ ## Issues / questions?
53
+
54
+ We're always happy to help you with any issues you encounter while setting up or with anything else you might be unsure about.
55
+
56
+ Get in touch by emailing [${METICULOUS_SUPPORT_EMAIL}](mailto:${METICULOUS_SUPPORT_EMAIL}).
57
+
58
+ `;
@@ -0,0 +1,97 @@
1
+ import {
2
+ METICULOUS_SETUP_CALENDLY_LINK,
3
+ METICULOUS_SUPPORT_EMAIL,
4
+ } from "src/lib/next/next.constants";
5
+ import {
6
+ ENSURE_RECORDER_CAPTURES_ALL_REQUESTS_URL,
7
+ FIX_FALSE_POSITIVES_URL,
8
+ RECORD_AND_REPLAY_ON_DIFFERENT_ENVIRONMENTS_URL,
9
+ TESTING_POOL_URL,
10
+ TROUBLESHOOTING_FAILED_SIMULATIONS_STEPS_ANCHOR,
11
+ } from "src/lib/utils/internal-urls/docs-urls.utils";
12
+ import { METICULOUS_DEBUG_PR_LABEL, SIMULATION_TAB_NAMES } from "../constants";
13
+
14
+ export const document = `---
15
+ {
16
+ "title": "Troubleshoot Failed or Inaccurate Simulations"
17
+ }
18
+ ---
19
+
20
+ # {% $frontmatter.title %}
21
+
22
+ ## Some simulations on my PR test run are failing or inaccurate
23
+
24
+ Simulations can fail or replay inaccurately for a few reasons:
25
+
26
+ 1. **The session is out of date**: Your application has changed significantly since the session was originally recorded, such that the session can't be replayed against
27
+ the new version of your application. This could be due to UI changes, such that the session can't interact with the same elements. Or
28
+ it could be due to your application's API changing, triggering errors when Meticulous replays old out-of-date network requests from the
29
+ original session. Such failing replays can be safely ignored: Meticulous will automatically detect if the session is no longer able to cover certain code paths or user
30
+ flows on your new codebase and select one or more new sessions, with new network responses and user interactions, to correctly cover these paths.
31
+ 2. **There is an error with your recorder setup**, for example [it's not being initialized early enough so not capturing all network responses](${ENSURE_RECORDER_CAPTURES_ALL_REQUESTS_URL}).
32
+ 3. **There are fundamental differences between the environment the session was recorded on and the environment it is being replayed in**, [such
33
+ that sessions recorded on one environment can't be replayed on another](${RECORD_AND_REPLAY_ON_DIFFERENT_ENVIRONMENTS_URL}).
34
+
35
+ Follow the steps below to distinguish between these causes and troubleshoot why simulations may be failing.
36
+
37
+ {% anchor id="${TROUBLESHOOTING_FAILED_SIMULATIONS_STEPS_ANCHOR}" /%}
38
+ ## Troubleshooting why simulations may be failing
39
+
40
+ ### 1. Check if the user session can be simulated accurately *against the environment from which it was recorded*
41
+
42
+ To verify whether the user session can be simulated accurately in the same environment in which it was recorded, you can:
43
+
44
+ 1. Find a session from the **All Sessions** or **Selected Sessions** tab of your {% project_link %}Meticulous dashboard{% /project_link %}.
45
+ 2. Follow the command to "Replay this session" on the **Simulate** tab of the session page.
46
+ 3. Note that if the session was originally recorded on localhost then the \`--appUrl\` flag will be set to a localhost URL, and you'll
47
+ need to serve your app on that same port locally to replay the session (or edit the \`--appUrl\`).
48
+
49
+ While simulating the session, keep an eye out for common symptoms of an unsuccessfully simulated session:
50
+ - The simulation hits an error screen
51
+ - The simulation fails to populate pages with data
52
+ - The simulation hits an error state while navigating through a form and stays there for the duration of the simulation
53
+
54
+ If you see any of these symptoms, and the application has changed somewhat since the session was first recorded, then the
55
+ session is likely failing to replay because it is out of date, and there has since been a breaking API schema change or a breaking UI change.
56
+ Such replay failures can be safely ignored: Meticulous will automatically detect if the session is no longer able to cover certain code paths or user
57
+ flows on your new codebase and select one or more new sessions, with new network responses and user interactions, to correctly cover these paths. For
58
+ more information on how Meticulous selects sessions, see [here](${TESTING_POOL_URL}).
59
+
60
+ If the simulation was successful, proceed to the next troubleshooting step.
61
+
62
+ ### 2. Check if the user session can be simulated accurately *against the environment used for test runs*
63
+
64
+ To verify whether the user session can be simulated accurately in the environment used for test runs, you can:
65
+
66
+ 1. Navigate back to the session you selected in the previous step.
67
+ 2. Click on the **Simulations** tab to find a recent simulation in CI. You'll be able to tell it's a CI simulation since the 'Simulated Against'
68
+ URL will show a Meticulous secure tunnel URL (\`*.tunnels.meticulous.ai\`) or a Vercel, Netlify or Cloudflare preview URL.
69
+ 3. Select one of the simulations and follow the command to "Re-run the simulation with the Meticulous CLI" on the **${SIMULATION_TAB_NAMES.DEBUG_LOCALLY}** tab of the simulation page.
70
+
71
+ If you're triggering Meticulous tests in CI against Vercel, Netlify or Cloudflare preview URLs then you can run this command as is:
72
+ the \`--appUrl\` it is set to run against will most likely still be a valid preview URL.
73
+
74
+ If however you're triggering Meticulous tests in
75
+ CI against a Meticulous secure tunnel URL or a localhost server running in your CI runner then you'll need to edit the \`--appUrl\` to point to a valid URL. If you're
76
+ using the cloud replay action you can get a URL to run against by opening a new PR with \`${METICULOUS_DEBUG_PR_LABEL}\` in the title. This
77
+ will keep the secure tunnel open for debugging. Meticulous will post a comment on your PR on how to access the secure tunnel to debug
78
+ your application setup, and you can use this as the \`--appUrl\` to replay the simulation against. It will also post a username and password
79
+ which you must make available as \`METICULOUS_TUNNEL_USERNAME\` and \`METICULOUS_TUNNEL_PASSWORD\` environment variables when running the Meticulous
80
+ CLI.
81
+
82
+ Look out for any of the symptoms described in step 1. If the simulation fails when simulating against the test run environment but not when simulating against the original recording
83
+ environment then the issue is likely environmental differences between the recording and test run environments. For more
84
+ information on how to debug environmental differences, see [here](${FIX_FALSE_POSITIVES_URL}).
85
+
86
+ If the simulation was successful, please get in touch by emailing [${METICULOUS_SUPPORT_EMAIL}](mailto:${METICULOUS_SUPPORT_EMAIL}), or
87
+ [book a call with us](${METICULOUS_SETUP_CALENDLY_LINK}), and we will help you debug this issue.
88
+
89
+ ### 3. View the simulation timeline to see why it failed to replay
90
+
91
+ Find the simulation in the Meticulous web UI and click on the **${SIMULATION_TAB_NAMES.TIMELINE_AND_LOGS}** tab. From here you can zoom in using the scroll wheel and
92
+ pan by dragging. You'll be able to see each screenshot taken, each click, each console log recorded, and each network request made. Failures
93
+ are highlighted in red.
94
+
95
+ Alternatively, simulating a session locally via the **${SIMULATION_TAB_NAMES.DEBUG_LOCALLY}** tab with the flags \`--debugger --devTools\`
96
+ will let you step through the simulation one user event at a time and pinpoint exactly where the issue is occurring.
97
+ `;
@@ -0,0 +1,51 @@
1
+ export const document = `---
2
+ {
3
+ "title": "TypeScript Types for window.Meticulous"
4
+ }
5
+ ---
6
+
7
+ # {% $frontmatter.title %}
8
+
9
+ TypeScript definitions for the \`window.Meticulous\` object are available in the [\`@alwaysmeticulous/sdk-bundles-api\`](https://www.npmjs.com/package/@alwaysmeticulous/sdk-bundles-api) package.
10
+
11
+ ## Installation
12
+
13
+ Install the package as a dev dependency:
14
+
15
+ \`\`\`bash
16
+ npm install --save-dev @alwaysmeticulous/sdk-bundles-api
17
+ \`\`\`
18
+
19
+ ## Usage
20
+
21
+ Import the type and extend the Window interface:
22
+
23
+ \`\`\`typescript
24
+ import type { MeticulousPublicApi } from '@alwaysmeticulous/sdk-bundles-api';
25
+
26
+ declare global {
27
+ interface Window {
28
+ Meticulous?: MeticulousPublicApi;
29
+ }
30
+ }
31
+ \`\`\`
32
+
33
+ Now you have full type safety when using the \`window.Meticulous\` object:
34
+
35
+ \`\`\`typescript
36
+ // Detect if running as a test
37
+ if (window.Meticulous?.isRunningAsTest) {
38
+ console.log('Running as a Meticulous test');
39
+ }
40
+
41
+ // Record session context with type safety
42
+ window.Meticulous?.context.recordUserId('user-123');
43
+ window.Meticulous?.context.recordUserEmail('user@example.com');
44
+ window.Meticulous?.context.recordFeatureFlag('myFlag', true);
45
+ window.Meticulous?.context.recordCustomContext('userRole', 'admin');
46
+ \`\`\`
47
+
48
+ ## Full API Reference
49
+
50
+ For the complete type definition, see [public-window-api.ts](https://github.com/alwaysmeticulous/meticulous-sdk/blob/main/packages/sdk-bundles-api/src/window-api/public-window-api.ts) in the meticulous-sdk repository.
51
+ `;