@speedkit/cli 4.36.0 → 4.36.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (293) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +3 -29
  3. package/dist/commands/auto-prewarm.js +1 -1
  4. package/dist/commands/browser/clean.js +1 -2
  5. package/dist/commands/browser/list.js +1 -2
  6. package/dist/commands/browser/update.js +1 -2
  7. package/dist/commands/bulk-deploy.js +1 -1
  8. package/dist/commands/config/setup.js +4 -3
  9. package/dist/commands/deploy.js +3 -2
  10. package/dist/commands/diff-url-parameters.d.ts +2 -2
  11. package/dist/commands/diff-url-parameters.js +12 -5
  12. package/dist/commands/extension/add.js +1 -1
  13. package/dist/commands/extension/devtools.js +1 -1
  14. package/dist/commands/extension/list.js +1 -1
  15. package/dist/commands/extension/remove.js +1 -1
  16. package/dist/commands/extension/update.js +1 -1
  17. package/dist/commands/find-pops.js +3 -2
  18. package/dist/commands/generate-pop-config.js +9 -13
  19. package/dist/commands/onboarding.js +1 -1
  20. package/dist/commands/origin-request.js +1 -1
  21. package/dist/commands/pull.js +1 -1
  22. package/dist/commands/revalidate.js +4 -3
  23. package/dist/commands/wpt-launcher.js +3 -2
  24. package/dist/helpers/{chrome-flags.spec.js → spec/chrome-flags.spec.js} +1 -1
  25. package/dist/helpers/{origin-proxy.spec.js → spec/origin-proxy.spec.js} +1 -1
  26. package/dist/hooks/init/first-run.js +3 -3
  27. package/dist/hooks/{init → spec/init}/dns-result-order.spec.js +1 -1
  28. package/dist/hooks/{init → spec/init}/http1-global-dispatcher.spec.js +1 -1
  29. package/dist/models/cli-parameters.d.ts +0 -2
  30. package/dist/models/cli-parameters.js +0 -2
  31. package/dist/models/{cli-parameters.spec.js → spec/cli-parameters.spec.js} +1 -1
  32. package/dist/services/athena/athena-service-factory.d.ts +3 -1
  33. package/dist/services/athena/athena-service-factory.js +4 -2
  34. package/dist/services/athena/{athena-service.spec.js → spec/athena-service.spec.js} +1 -1
  35. package/dist/services/athena/{baqend-athena-service.spec.js → spec/baqend-athena-service.spec.js} +2 -2
  36. package/dist/services/browser-fetch/browser-origin-fetch.d.ts +1 -1
  37. package/dist/services/browser-fetch/browser-origin-fetcher.d.ts +1 -1
  38. package/dist/services/browser-fetch/{browser-origin-fetch.spec.js → spec/browser-origin-fetch.spec.js} +2 -2
  39. package/dist/services/browser-fetch/{browser-origin-fetcher.spec.js → spec/browser-origin-fetcher.spec.js} +1 -1
  40. package/dist/services/browser-fetch/{browser-response.spec.js → spec/browser-response.spec.js} +1 -1
  41. package/dist/services/browser-fetch/{device-emulation.spec.js → spec/device-emulation.spec.js} +2 -2
  42. package/dist/services/bundler/{bundle-service.spec.js → spec/bundle-service.spec.js} +1 -1
  43. package/dist/{helpers → services/cli}/cli-config.js +1 -1
  44. package/dist/services/cli/cli-service-factory.d.ts +10 -2
  45. package/dist/services/cli/cli-service-factory.js +11 -9
  46. package/dist/services/cli/cli-service-model.d.ts +10 -2
  47. package/dist/services/cli/cli-service.d.ts +37 -0
  48. package/dist/services/cli/cli-service.js +48 -1
  49. package/dist/{helpers/clipboard.d.ts → services/cli/clipboard/clipboard-service.d.ts} +3 -1
  50. package/dist/{helpers/clipboard.js → services/cli/clipboard/clipboard-service.js} +6 -1
  51. package/dist/services/cli/clipboard/index.d.ts +1 -0
  52. package/dist/services/cli/clipboard/index.js +1 -0
  53. package/dist/services/cli/index.d.ts +1 -0
  54. package/dist/services/cli/index.js +1 -0
  55. package/dist/{helpers → services/cli/spec}/cli-config.spec.js +1 -1
  56. package/dist/services/cli/{cli-service.spec.js → spec/cli-service.spec.js} +1 -1
  57. package/dist/{helpers → services/cli/spec}/environment.spec.js +1 -1
  58. package/dist/services/customer-config/customer-config-service-factory.d.ts +3 -1
  59. package/dist/services/customer-config/customer-config-service-factory.js +7 -3
  60. package/dist/services/customer-config/customer-config-service.d.ts +4 -2
  61. package/dist/services/customer-config/customer-config-service.js +4 -3
  62. package/dist/services/customer-config/site-analyzer/index.d.ts +3 -0
  63. package/dist/services/customer-config/site-analyzer/index.js +3 -0
  64. package/dist/{helpers/site-analyzer.d.ts → services/customer-config/site-analyzer/site-analyzer-model.d.ts} +0 -1
  65. package/dist/services/customer-config/site-analyzer/site-analyzer-service-factory.d.ts +7 -0
  66. package/dist/services/customer-config/site-analyzer/site-analyzer-service-factory.js +11 -0
  67. package/dist/services/customer-config/site-analyzer/site-analyzer-service.d.ts +16 -0
  68. package/dist/{helpers/site-analyzer.js → services/customer-config/site-analyzer/site-analyzer-service.js} +20 -5
  69. package/dist/services/deploy/bulk/bulk-deploy-service-factory.d.ts +1 -1
  70. package/dist/services/deploy/bulk/config-deploy-factory.d.ts +1 -1
  71. package/dist/services/deploy/checks/post-deploy/deprecated-deployment-detection-check.d.ts +2 -2
  72. package/dist/services/deploy/checks/post-deploy/refresh-deployment-job-check.d.ts +2 -2
  73. package/dist/services/deploy/checks/post-deploy/revalidated-module-check.d.ts +2 -2
  74. package/dist/services/deploy/checks/post-deploy/save-files-check.d.ts +2 -2
  75. package/dist/services/deploy/context/deploy-context.js +1 -1
  76. package/dist/services/deploy/deploy-service-factory.d.ts +3 -2
  77. package/dist/services/deploy/deploy-service-factory.js +9 -7
  78. package/dist/services/deploy/deploy-service.d.ts +2 -2
  79. package/dist/services/deploy/handler/customer-config-handler.d.ts +2 -2
  80. package/dist/services/deploy/handler/install-resource-handler.d.ts +2 -2
  81. package/dist/services/deploy/handler/install-resource-modifier/deleted-file-check.d.ts +2 -2
  82. package/dist/services/deploy/handler/module-handler.d.ts +2 -2
  83. package/dist/services/deploy/handler/server-config-handler.d.ts +2 -2
  84. package/dist/services/deploy/mr/base-config-reader.d.ts +1 -1
  85. package/dist/services/deploy/mr/base-config-reader.js +8 -5
  86. package/dist/services/deploy/mr/merge-request-deploy-service-factory.d.ts +1 -1
  87. package/dist/services/deploy/{bulk → spec/bulk}/bulk-deploy-service.spec.js +5 -5
  88. package/dist/services/deploy/{bulk → spec/bulk}/touched-configs.spec.js +2 -2
  89. package/dist/services/deploy/{checks → spec/checks}/activation/customer-approval-check.spec.js +2 -2
  90. package/dist/services/deploy/{checks → spec/checks}/post-deploy/refresh-deployment-job-check.spec.js +2 -2
  91. package/dist/services/deploy/{checks → spec/checks}/pre-deploy/split-change-check.spec.js +3 -3
  92. package/dist/services/deploy/{handler → spec/handler}/module-handler.spec.js +2 -2
  93. package/dist/services/deploy/{handler → spec/handler}/testing-installation-links.spec.js +1 -1
  94. package/dist/services/deploy/{mr → spec/mr}/live-state-check.spec.js +2 -2
  95. package/dist/services/deploy/{mr → spec/mr}/merge-request-description.spec.js +1 -1
  96. package/dist/services/deploy/{policy → spec/policy}/auto-deploy-policy.spec.js +2 -2
  97. package/dist/services/diff/diff-service-factory.d.ts +3 -1
  98. package/dist/services/diff/diff-service-factory.js +4 -2
  99. package/dist/services/diff/diff-service.d.ts +10 -2
  100. package/dist/services/diff/diff-service.js +26 -3
  101. package/dist/services/diff/index.d.ts +1 -0
  102. package/dist/services/diff/index.js +1 -0
  103. package/dist/services/document-handler-runtime/context/document-handler-runtime-context.d.ts +2 -14
  104. package/dist/services/document-handler-runtime/context/document-handler-runtime-context.js +0 -52
  105. package/dist/services/document-handler-runtime/document-handler-server.d.ts +2 -2
  106. package/dist/services/document-handler-runtime/factory/document-handler-runtime-service-factory.d.ts +3 -11
  107. package/dist/services/document-handler-runtime/factory/document-handler-runtime-service-factory.js +6 -72
  108. package/dist/services/document-handler-runtime/{document-handler-abort.spec.js → spec/document-handler-abort.spec.js} +2 -2
  109. package/dist/services/git/{git-repository.spec.js → spec/git-repository.spec.js} +1 -1
  110. package/dist/services/integration-api/handler/customer-config-handler.d.ts +2 -2
  111. package/dist/services/integration-api/integration-api-factory.d.ts +3 -2
  112. package/dist/services/integration-api/integration-api-factory.js +5 -3
  113. package/dist/services/integration-api/struct/customer-config-file.js +1 -1
  114. package/dist/services/integration-api/virtual/virtual-file-handler.d.ts +2 -2
  115. package/dist/services/onboarding/browser/config/browser-config.d.ts +1 -1
  116. package/dist/services/onboarding/browser/executable/executable-validator.d.ts +1 -2
  117. package/dist/services/onboarding/browser/extension/extension-downloader.d.ts +1 -2
  118. package/dist/services/onboarding/browser/extension/extension-validator.d.ts +1 -2
  119. package/dist/services/onboarding/dashboard/diff-against-current-page.d.ts +2 -2
  120. package/dist/services/onboarding/dashboard/diff-against-current-page.js +1 -1
  121. package/dist/services/onboarding/dashboard/request-diff-service.d.ts +3 -1
  122. package/dist/services/onboarding/dashboard/request-diff-service.js +5 -3
  123. package/dist/services/onboarding/fetch-event-handler.d.ts +2 -2
  124. package/dist/services/onboarding/fetch-events/speed-kit-install-js.d.ts +3 -1
  125. package/dist/services/onboarding/fetch-events/speed-kit-install-js.js +5 -3
  126. package/dist/services/onboarding/file-events/file-watcher.d.ts +2 -2
  127. package/dist/services/onboarding/file-events/file-watcher.js +2 -2
  128. package/dist/services/onboarding/onboarding-model.d.ts +1 -1
  129. package/dist/services/onboarding/onboarding-service-factory.d.ts +3 -2
  130. package/dist/services/onboarding/onboarding-service-factory.js +17 -17
  131. package/dist/services/onboarding/onboarding-service.d.ts +2 -2
  132. package/dist/services/onboarding/request-cache/cache.d.ts +2 -2
  133. package/dist/services/onboarding/server-config/index.d.ts +2 -2
  134. package/dist/services/onboarding/{browser → spec/browser}/executable/headed-user-agent.spec.js +1 -1
  135. package/dist/services/onboarding/{empty-service-worker.spec.js → spec/empty-service-worker.spec.js} +1 -1
  136. package/dist/services/onboarding/{onboarding-model.spec.js → spec/onboarding-model.spec.js} +2 -2
  137. package/dist/services/onboarding/{virtual-orestes-app → spec/virtual-orestes-app}/crawler.spec.js +1 -1
  138. package/dist/services/onboarding/{virtual-orestes-app → spec/virtual-orestes-app}/origin-error-cause.spec.js +1 -1
  139. package/dist/services/onboarding/virtual-orestes-app/crawler.d.ts +2 -2
  140. package/dist/services/onboarding/virtual-orestes-app/index.d.ts +2 -2
  141. package/dist/services/origin-request/asset-variations.js +1 -1
  142. package/dist/services/origin-request/origin-request-service-factory.d.ts +3 -2
  143. package/dist/services/origin-request/origin-request-service-factory.js +8 -6
  144. package/dist/services/origin-request/origin-request-service.d.ts +2 -2
  145. package/dist/services/origin-request/{asset-variations.spec.js → spec/asset-variations.spec.js} +1 -1
  146. package/dist/services/prewarm/assets/asset-api-client.d.ts +3 -1
  147. package/dist/services/prewarm/assets/asset-api-client.js +5 -3
  148. package/dist/services/prewarm/auto-pre-warm-factory.d.ts +3 -2
  149. package/dist/services/prewarm/auto-pre-warm-factory.js +8 -5
  150. package/dist/{helpers → services/prewarm}/normalize.d.ts +0 -6
  151. package/dist/{helpers → services/prewarm}/normalize.js +0 -8
  152. package/dist/services/prewarm/pre-warm-factory.d.ts +3 -1
  153. package/dist/services/prewarm/pre-warm-factory.js +7 -4
  154. package/dist/services/prewarm/{csv-reader.spec.js → spec/csv-reader.spec.js} +1 -1
  155. package/dist/services/prewarm/{prewarm-targets.spec.js → spec/prewarm-targets.spec.js} +1 -1
  156. package/dist/services/pull/pull-service-factory.d.ts +3 -2
  157. package/dist/services/pull/pull-service-factory.js +8 -6
  158. package/dist/services/query-builder/query-builder-factory.d.ts +3 -2
  159. package/dist/services/query-builder/query-builder-factory.js +9 -7
  160. package/dist/services/query-builder/query-builder-service.js +4 -5
  161. package/dist/services/query-builder/query-command.js +1 -1
  162. package/dist/services/query-builder/{queries/spec → spec/queries}/golden.spec.js +3 -3
  163. package/dist/services/query-builder/{queries/spec → spec/queries}/pops-query.spec.js +2 -2
  164. package/dist/services/query-builder/{queries/spec → spec/queries}/queries.spec.js +3 -3
  165. package/dist/services/query-builder/{queries/spec → spec/queries}/reported-bugs.spec.js +2 -2
  166. package/dist/services/query-builder/{query-builder-service.spec.js → spec/query-builder-service.spec.js} +4 -4
  167. package/dist/services/query-builder/{rules/spec → spec/rules}/pattern-language.spec.js +1 -1
  168. package/dist/services/query-builder/{rules/spec → spec/rules}/rule-parser.spec.js +1 -1
  169. package/dist/services/query-builder/{rules/spec → spec/rules}/rule-reducer.spec.js +2 -2
  170. package/dist/services/query-builder/{rules/spec → spec/rules}/rule-relevance.spec.js +2 -2
  171. package/dist/services/query-builder/{rules/spec → spec/rules}/rule-to-sql.spec.js +2 -2
  172. package/dist/services/query-builder/{rules/spec → spec/rules}/runtime-semantics.spec.js +1 -1
  173. package/dist/services/query-builder/{rules/spec → spec/rules}/strip-parameters.spec.js +3 -3
  174. package/dist/services/query-builder/{sql/spec → spec/sql}/expression.spec.js +2 -2
  175. package/dist/services/query-builder/{sql/spec → spec/sql}/format.spec.js +2 -2
  176. package/dist/services/query-builder/{sql/spec → spec/sql}/predicate.spec.js +1 -1
  177. package/dist/services/query-builder/{sql/spec → spec/sql}/regex.spec.js +1 -1
  178. package/dist/services/revalidate/revalidate-factory.d.ts +3 -1
  179. package/dist/services/revalidate/revalidate-factory.js +6 -3
  180. package/dist/services/revalidate/revalidate-service.d.ts +2 -2
  181. package/dist/services/revalidate/{revalidate-service.spec.js → spec/revalidate-service.spec.js} +1 -1
  182. package/dist/services/setup/browser/browser-setup-service.d.ts +1 -2
  183. package/dist/services/setup/difftool/difftool-setup-service.d.ts +1 -2
  184. package/dist/services/setup/extension/extension-installer.d.ts +1 -1
  185. package/dist/services/setup/extension/extension-setup-service.d.ts +1 -2
  186. package/dist/services/setup/setup-service-factory.d.ts +3 -1
  187. package/dist/services/setup/setup-service-factory.js +5 -4
  188. package/dist/services/setup/setup-service.d.ts +1 -2
  189. package/dist/services/setup/{extension → spec/extension}/crx.spec.js +1 -1
  190. package/dist/services/setup/{extension → spec/extension}/webstore.spec.js +1 -1
  191. package/dist/services/setup/{os → spec/os}/tool-registry.spec.js +1 -1
  192. package/oclif.manifest.json +1 -52
  193. package/package.json +3 -2
  194. package/dist/commands/document-handler.d.ts +0 -16
  195. package/dist/commands/document-handler.js +0 -32
  196. package/dist/helpers/customer-config.d.ts +0 -45
  197. package/dist/helpers/customer-config.js +0 -136
  198. package/dist/helpers/file-helper.d.ts +0 -8
  199. package/dist/helpers/file-helper.js +0 -28
  200. package/dist/helpers/is-directory.d.ts +0 -5
  201. package/dist/helpers/is-directory.js +0 -19
  202. package/dist/helpers/is-file.d.ts +0 -5
  203. package/dist/helpers/is-file.js +0 -19
  204. package/dist/helpers/logging-helper.d.ts +0 -15
  205. package/dist/helpers/logging-helper.js +0 -23
  206. package/dist/helpers/scrape.d.ts +0 -1
  207. package/dist/helpers/scrape.js +0 -8
  208. package/dist/helpers/speed-kit-rule-to-reg-exp.d.ts +0 -1
  209. package/dist/helpers/speed-kit-rule-to-reg-exp.js +0 -6
  210. package/dist/models/install.d.ts +0 -24
  211. package/dist/services/config-api-service.d.ts +0 -21
  212. package/dist/services/config-api-service.js +0 -107
  213. package/dist/services/diff-service.d.ts +0 -27
  214. package/dist/services/diff-service.js +0 -116
  215. package/dist/services/document-handler-runtime/document-handler-runtime-service.d.ts +0 -31
  216. package/dist/services/document-handler-runtime/document-handler-runtime-service.js +0 -222
  217. package/dist/services/document-handler-runtime/interface/document-handler-runtime-config-interface.d.ts +0 -3
  218. package/dist/services/document-handler-runtime/interface/document-handler-runtime-config-interface.js +0 -3
  219. package/dist/services/document-handler-runtime/templates/execute-document-handler.d.ts +0 -6
  220. package/dist/services/document-handler-runtime/templates/execute-document-handler.js +0 -74
  221. package/dist/services/document-handler-runtime/templates/orestes-mock.d.ts +0 -9
  222. package/dist/services/document-handler-runtime/templates/orestes-mock.js +0 -166
  223. package/dist/services/document-handler-runtime/templates/package-json.d.ts +0 -6
  224. package/dist/services/document-handler-runtime/templates/package-json.js +0 -17
  225. package/dist/services/document-handler-runtime/templates/test.d.ts +0 -6
  226. package/dist/services/document-handler-runtime/templates/test.js +0 -64
  227. /package/dist/helpers/{chrome-flags.spec.d.ts → spec/chrome-flags.spec.d.ts} +0 -0
  228. /package/dist/helpers/{origin-proxy.spec.d.ts → spec/origin-proxy.spec.d.ts} +0 -0
  229. /package/dist/hooks/{init → spec/init}/dns-result-order.spec.d.ts +0 -0
  230. /package/dist/hooks/{init → spec/init}/http1-global-dispatcher.spec.d.ts +0 -0
  231. /package/dist/models/{cli-parameters.spec.d.ts → spec/cli-parameters.spec.d.ts} +0 -0
  232. /package/dist/services/athena/{athena-service.spec.d.ts → spec/athena-service.spec.d.ts} +0 -0
  233. /package/dist/services/athena/{baqend-athena-service.spec.d.ts → spec/baqend-athena-service.spec.d.ts} +0 -0
  234. /package/dist/services/browser-fetch/{browser-origin-fetch.spec.d.ts → spec/browser-origin-fetch.spec.d.ts} +0 -0
  235. /package/dist/services/browser-fetch/{browser-origin-fetcher.spec.d.ts → spec/browser-origin-fetcher.spec.d.ts} +0 -0
  236. /package/dist/services/browser-fetch/{browser-response.spec.d.ts → spec/browser-response.spec.d.ts} +0 -0
  237. /package/dist/services/browser-fetch/{device-emulation.spec.d.ts → spec/device-emulation.spec.d.ts} +0 -0
  238. /package/dist/services/bundler/{bundle-service.spec.d.ts → spec/bundle-service.spec.d.ts} +0 -0
  239. /package/dist/{helpers → services/cli}/cli-config.d.ts +0 -0
  240. /package/dist/{helpers → services/cli}/environment.d.ts +0 -0
  241. /package/dist/{helpers → services/cli}/environment.js +0 -0
  242. /package/dist/{helpers → services/cli/spec}/cli-config.spec.d.ts +0 -0
  243. /package/dist/services/cli/{cli-service.spec.d.ts → spec/cli-service.spec.d.ts} +0 -0
  244. /package/dist/{helpers → services/cli/spec}/environment.spec.d.ts +0 -0
  245. /package/dist/{models/install.js → services/customer-config/site-analyzer/site-analyzer-model.js} +0 -0
  246. /package/dist/services/deploy/{bulk → spec/bulk}/bulk-deploy-service.spec.d.ts +0 -0
  247. /package/dist/services/deploy/{bulk → spec/bulk}/touched-configs.spec.d.ts +0 -0
  248. /package/dist/services/deploy/{checks → spec/checks}/activation/customer-approval-check.spec.d.ts +0 -0
  249. /package/dist/services/deploy/{checks → spec/checks}/post-deploy/refresh-deployment-job-check.spec.d.ts +0 -0
  250. /package/dist/services/deploy/{checks → spec/checks}/pre-deploy/split-change-check.spec.d.ts +0 -0
  251. /package/dist/services/deploy/{handler → spec/handler}/module-handler.spec.d.ts +0 -0
  252. /package/dist/services/deploy/{handler → spec/handler}/testing-installation-links.spec.d.ts +0 -0
  253. /package/dist/services/deploy/{mr → spec/mr}/live-state-check.spec.d.ts +0 -0
  254. /package/dist/services/deploy/{mr → spec/mr}/merge-request-description.spec.d.ts +0 -0
  255. /package/dist/services/deploy/{policy → spec/policy}/auto-deploy-policy.spec.d.ts +0 -0
  256. /package/dist/{helpers/html-format-helper.d.ts → services/diff/html-format.d.ts} +0 -0
  257. /package/dist/{helpers/html-format-helper.js → services/diff/html-format.js} +0 -0
  258. /package/dist/services/document-handler-runtime/{document-handler-abort.spec.d.ts → spec/document-handler-abort.spec.d.ts} +0 -0
  259. /package/dist/services/git/{git-repository.spec.d.ts → spec/git-repository.spec.d.ts} +0 -0
  260. /package/dist/{helpers → services/integration-api}/array-helper.d.ts +0 -0
  261. /package/dist/{helpers → services/integration-api}/array-helper.js +0 -0
  262. /package/dist/services/onboarding/{browser → spec/browser}/executable/headed-user-agent.spec.d.ts +0 -0
  263. /package/dist/services/onboarding/{empty-service-worker.spec.d.ts → spec/empty-service-worker.spec.d.ts} +0 -0
  264. /package/dist/services/onboarding/{onboarding-model.spec.d.ts → spec/onboarding-model.spec.d.ts} +0 -0
  265. /package/dist/services/onboarding/{virtual-orestes-app → spec/virtual-orestes-app}/crawler.spec.d.ts +0 -0
  266. /package/dist/services/onboarding/{virtual-orestes-app → spec/virtual-orestes-app}/origin-error-cause.spec.d.ts +0 -0
  267. /package/dist/{helpers → services/origin-request}/java-regex.d.ts +0 -0
  268. /package/dist/{helpers → services/origin-request}/java-regex.js +0 -0
  269. /package/dist/services/origin-request/{asset-variations.spec.d.ts → spec/asset-variations.spec.d.ts} +0 -0
  270. /package/dist/services/prewarm/{csv-reader.spec.d.ts → spec/csv-reader.spec.d.ts} +0 -0
  271. /package/dist/services/prewarm/{prewarm-targets.spec.d.ts → spec/prewarm-targets.spec.d.ts} +0 -0
  272. /package/dist/services/query-builder/{queries/spec → spec/queries}/golden-configs.d.ts +0 -0
  273. /package/dist/services/query-builder/{queries/spec → spec/queries}/golden-configs.js +0 -0
  274. /package/dist/services/query-builder/{queries/spec → spec/queries}/golden.spec.d.ts +0 -0
  275. /package/dist/services/query-builder/{queries/spec → spec/queries}/pops-query.spec.d.ts +0 -0
  276. /package/dist/services/query-builder/{queries/spec → spec/queries}/queries.spec.d.ts +0 -0
  277. /package/dist/services/query-builder/{queries/spec → spec/queries}/reported-bugs.spec.d.ts +0 -0
  278. /package/dist/services/query-builder/{query-builder-service.spec.d.ts → spec/query-builder-service.spec.d.ts} +0 -0
  279. /package/dist/services/query-builder/{rules/spec → spec/rules}/pattern-language.spec.d.ts +0 -0
  280. /package/dist/services/query-builder/{rules/spec → spec/rules}/rule-parser.spec.d.ts +0 -0
  281. /package/dist/services/query-builder/{rules/spec → spec/rules}/rule-reducer.spec.d.ts +0 -0
  282. /package/dist/services/query-builder/{rules/spec → spec/rules}/rule-relevance.spec.d.ts +0 -0
  283. /package/dist/services/query-builder/{rules/spec → spec/rules}/rule-to-sql.spec.d.ts +0 -0
  284. /package/dist/services/query-builder/{rules/spec → spec/rules}/runtime-semantics.spec.d.ts +0 -0
  285. /package/dist/services/query-builder/{rules/spec → spec/rules}/strip-parameters.spec.d.ts +0 -0
  286. /package/dist/services/query-builder/{sql/spec → spec/sql}/expression.spec.d.ts +0 -0
  287. /package/dist/services/query-builder/{sql/spec → spec/sql}/format.spec.d.ts +0 -0
  288. /package/dist/services/query-builder/{sql/spec → spec/sql}/predicate.spec.d.ts +0 -0
  289. /package/dist/services/query-builder/{sql/spec → spec/sql}/regex.spec.d.ts +0 -0
  290. /package/dist/services/revalidate/{revalidate-service.spec.d.ts → spec/revalidate-service.spec.d.ts} +0 -0
  291. /package/dist/services/setup/{extension → spec/extension}/crx.spec.d.ts +0 -0
  292. /package/dist/services/setup/{extension → spec/extension}/webstore.spec.d.ts +0 -0
  293. /package/dist/services/setup/{os → spec/os}/tool-registry.spec.d.ts +0 -0
@@ -1,5 +1,5 @@
1
1
  import { Frame, HTTPRequest } from "puppeteer";
2
- import { UserCliConfig } from "../../helpers/cli-config.js";
2
+ import { UserCliConfig } from "../cli/index.js";
3
3
  import { OriginFetchOptions } from "../../helpers/origin-proxy.js";
4
4
  /** Only the writers this fetcher uses, so it does not depend on the whole CLI service. */
5
5
  export interface BrowserFetchLogger {
@@ -1,7 +1,7 @@
1
1
  import { expect } from "chai";
2
2
  import { afterEach, beforeEach, describe, it } from "mocha";
3
- import { originFetch, resetOriginProxy, setOriginFetchTransport, } from "../../helpers/origin-proxy.js";
4
- import { installBrowserOriginFetch, } from "./browser-origin-fetch.js";
3
+ import { originFetch, resetOriginProxy, setOriginFetchTransport, } from "../../../helpers/origin-proxy.js";
4
+ import { installBrowserOriginFetch, } from "../browser-origin-fetch.js";
5
5
  /** Records what each leg was asked for, so the policy can be asserted on the calls it made. */
6
6
  class FetchLog {
7
7
  direct = [];
@@ -1,6 +1,6 @@
1
1
  import { expect } from "chai";
2
2
  import { describe, it } from "mocha";
3
- import { isDocumentRequest } from "./browser-origin-fetcher.js";
3
+ import { isDocumentRequest } from "../browser-origin-fetcher.js";
4
4
  const mainFrame = { name: "main" };
5
5
  const childFrame = { name: "child" };
6
6
  function request(isNavigation, frame) {
@@ -1,6 +1,6 @@
1
1
  import { expect } from "chai";
2
2
  import { describe, it } from "mocha";
3
- import { toFetchResponse, toPlainHeaders } from "./browser-response.js";
3
+ import { toFetchResponse, toPlainHeaders } from "../browser-response.js";
4
4
  /**
5
5
  * The four accessors `toFetchResponse` reads. Chrome reports repeated headers newline-joined in a
6
6
  * flat map, which is the shape this stands in for.
@@ -1,7 +1,7 @@
1
1
  import { expect } from "chai";
2
2
  import { describe, it } from "mocha";
3
- import { DEFAULT_USER_AGENT, MOBILE_USER_AGENT, TABLET_USER_AGENT, } from "../origin-request/asset-variations.js";
4
- import { deviceEmulation, deviceForUserAgent, isSpeedKitUserAgent, } from "./device-emulation.js";
3
+ import { DEFAULT_USER_AGENT, MOBILE_USER_AGENT, TABLET_USER_AGENT, } from "../../origin-request/asset-variations.js";
4
+ import { deviceEmulation, deviceForUserAgent, isSpeedKitUserAgent, } from "../device-emulation.js";
5
5
  const CHROME_VERSION = "Chrome/146.0.7680.165";
6
6
  describe("deviceForUserAgent", () => {
7
7
  it("maps the three user agents of the Asset API's device variations", () => {
@@ -3,7 +3,7 @@ import { after, before, describe, it } from "mocha";
3
3
  import { mkdtempSync, rmSync, writeFileSync } from "node:fs";
4
4
  import { tmpdir } from "node:os";
5
5
  import { join } from "node:path";
6
- import { BundleService } from "./bundle-service.js";
6
+ import { BundleService } from "../bundle-service.js";
7
7
  describe("BundleService resolve fallback", () => {
8
8
  const bundleWithFallback = (source, fallback, moduleDiscoveryDir = process.cwd()) => new BundleService(moduleDiscoveryDir).bundle({
9
9
  entryPoints: { "handler.js": source },
@@ -1,7 +1,7 @@
1
1
  import * as dotenv from "dotenv";
2
2
  import fs from "node:fs";
3
3
  import path, { resolve } from "node:path";
4
- import { parseChromeFlags } from "./chrome-flags.js";
4
+ import { parseChromeFlags } from "../../helpers/chrome-flags.js";
5
5
  dotenv.config({ quiet: true });
6
6
  const environmentMapping = {
7
7
  chromeExtensionPaths: "CHROME_EXTENSION_PATHS",
@@ -1,8 +1,16 @@
1
1
  import { CliService } from "./cli-service.js";
2
2
  import { CliContext } from "./cli-service-model.js";
3
+ /**
4
+ * Builds the CLI service. Deliberately neither a singleton nor cached.
5
+ *
6
+ * One instance is created per invocation — at the command — and threaded into
7
+ * every factory that needs it, each of which takes an optional `cli`. Sharing
8
+ * by construction rather than by global state is what keeps `--quiet` honest:
9
+ * with a cached instance the flag would be decided by whichever factory
10
+ * happened to build first, which is not something a caller can reason about.
11
+ */
3
12
  export declare class CliServiceFactory {
4
- private context?;
5
- service?: CliService;
13
+ private context;
6
14
  constructor(context?: CliContext);
7
15
  getService(): CliService;
8
16
  }
@@ -1,18 +1,20 @@
1
1
  import { CliService } from "./cli-service.js";
2
2
  import { CliContext } from "./cli-service-model.js";
3
+ /**
4
+ * Builds the CLI service. Deliberately neither a singleton nor cached.
5
+ *
6
+ * One instance is created per invocation — at the command — and threaded into
7
+ * every factory that needs it, each of which takes an optional `cli`. Sharing
8
+ * by construction rather than by global state is what keeps `--quiet` honest:
9
+ * with a cached instance the flag would be decided by whichever factory
10
+ * happened to build first, which is not something a caller can reason about.
11
+ */
3
12
  export class CliServiceFactory {
4
13
  context;
5
- service = undefined;
6
- constructor(context) {
14
+ constructor(context = new CliContext()) {
7
15
  this.context = context;
8
- if (!context) {
9
- this.context = new CliContext(false);
10
- }
11
16
  }
12
17
  getService() {
13
- if (!(this.service instanceof CliService)) {
14
- this.service = new CliService(this.context.quiet);
15
- }
16
- return this.service;
18
+ return new CliService(this.context.quiet);
17
19
  }
18
20
  }
@@ -27,11 +27,13 @@ export interface CliTableOptions {
27
27
  export interface CliServiceInterface {
28
28
  style: ChalkInstance;
29
29
  readonly quiet: boolean;
30
+ /** True when this shell cannot be prompted (CI, no TTY, SK_NON_INTERACTIVE). */
31
+ readonly nonInteractive: boolean;
30
32
  code(code: string, buffered?: boolean): void;
31
33
  codeStyle(code: string): string;
32
34
  comment(message: string, buffered?: boolean): void;
33
- confirm(message: string, defaultAnswer: boolean): Promise<boolean>;
34
- exit(code: number): void;
35
+ confirm(message: string, defaultAnswer?: boolean): Promise<boolean>;
36
+ exit(code?: number): void;
35
37
  prompt(message: string, options?: {
36
38
  defaultAnswer?: any;
37
39
  validator?: any;
@@ -43,6 +45,12 @@ export interface CliServiceInterface {
43
45
  checked?: boolean;
44
46
  description?: string;
45
47
  }[]): Promise<T[]>;
48
+ /** Put text on the system clipboard; resolves to whether it arrived. */
49
+ copyToClipboard(text: string): Promise<boolean>;
50
+ /** Machine-readable payload, verbatim, to the data channel. */
51
+ pipe(data: string): void;
52
+ /** A human-facing line that must stay out of the data channel. */
53
+ note(message: string): void;
46
54
  spacer(): void;
47
55
  startAction(name: string, message: string): void;
48
56
  endAction(name: string, message?: string): void;
@@ -8,9 +8,17 @@ export declare class CliService implements CliServiceInterface {
8
8
  private buffer;
9
9
  private progressBar?;
10
10
  private spinners;
11
+ private readonly clipboard;
11
12
  private readonly animates;
12
13
  /** The text of each running action, for the log line that replaces it. */
13
14
  private readonly actions;
15
+ /**
16
+ * True when this shell cannot be asked a question: CI, no TTY on either end,
17
+ * or SK_NON_INTERACTIVE. Callers that would otherwise block on a prompt check
18
+ * it and take the non-interactive branch — which is why it lives here rather
19
+ * than being re-derived wherever a prompt happens to be.
20
+ */
21
+ get nonInteractive(): boolean;
14
22
  constructor(quiet?: boolean);
15
23
  code(code: string, buffered?: boolean): void;
16
24
  codeStyle(code: string): string;
@@ -28,6 +36,35 @@ export declare class CliService implements CliServiceInterface {
28
36
  checked?: boolean;
29
37
  description?: string;
30
38
  }[]): Promise<T[]>;
39
+ /**
40
+ * Put text on the system clipboard.
41
+ *
42
+ * Reports whether it arrived rather than throwing: a machine with no
43
+ * clipboard tool, or one whose tool cannot be reached in time, is an
44
+ * ordinary condition, and every caller has something useful to print
45
+ * instead.
46
+ */
47
+ copyToClipboard(text: string): Promise<boolean>;
48
+ /**
49
+ * Write machine-readable output to the data channel, verbatim.
50
+ *
51
+ * No styling, no trailing newline, and deliberately not suppressed by
52
+ * `quiet`: under `--quiet` stdout *is* the result, and this is the one path
53
+ * whose bytes a caller pipes into a file or another process. Callers add
54
+ * their own separators, because whether the payload ends in a newline is
55
+ * part of the format.
56
+ *
57
+ * Human-facing lines never come through here — they go to `write` (stdout,
58
+ * for a terminal) or `note` (stderr, alongside a payload).
59
+ */
60
+ pipe(data: string): void;
61
+ /**
62
+ * A human-facing line that must stay out of the data channel.
63
+ *
64
+ * Goes to stderr, so it stays visible on the terminal while `pipe` output is
65
+ * being redirected — and so it can never corrupt the payload.
66
+ */
67
+ note(message: string): void;
31
68
  spacer(): void;
32
69
  startAction(name: string, message: string): void;
33
70
  endAction(name: string, message?: string): void;
@@ -3,6 +3,8 @@ import { Chalk } from "chalk";
3
3
  import Table from "tty-table";
4
4
  import { Presets, SingleBar } from "cli-progress";
5
5
  import Spinnies from "spinnies";
6
+ import { ClipboardService } from "./clipboard/index.js";
7
+ import { isCI, isNonInteractive } from "./environment.js";
6
8
  import { safe } from "../../helpers/safe.js";
7
9
  import { execSync } from "node:child_process";
8
10
  import ApplicationError from "../error-handling/error/application-error.js";
@@ -16,7 +18,7 @@ import ApplicationError from "../error-handling/error/application-error.js";
16
18
  * job that only ever built one.
17
19
  */
18
20
  function canAnimate() {
19
- return Boolean(!process.env.CI && process.stderr && process.stderr.isTTY);
21
+ return Boolean(!isCI() && process.stderr && process.stderr.isTTY);
20
22
  }
21
23
  /** The padding and the gutter that a table draws inside every column. */
22
24
  const CELL_OVERHEAD = 3;
@@ -61,9 +63,19 @@ export class CliService {
61
63
  buffer = [];
62
64
  progressBar;
63
65
  spinners;
66
+ clipboard = new ClipboardService();
64
67
  animates = canAnimate();
65
68
  /** The text of each running action, for the log line that replaces it. */
66
69
  actions = new Map();
70
+ /**
71
+ * True when this shell cannot be asked a question: CI, no TTY on either end,
72
+ * or SK_NON_INTERACTIVE. Callers that would otherwise block on a prompt check
73
+ * it and take the non-interactive branch — which is why it lives here rather
74
+ * than being re-derived wherever a prompt happens to be.
75
+ */
76
+ get nonInteractive() {
77
+ return isNonInteractive();
78
+ }
67
79
  constructor(quiet = false) {
68
80
  this.quiet = quiet;
69
81
  this.spinners = new Spinnies();
@@ -135,6 +147,41 @@ export class CliService {
135
147
  message: this.getFormattedMessage(message),
136
148
  });
137
149
  }
150
+ /**
151
+ * Put text on the system clipboard.
152
+ *
153
+ * Reports whether it arrived rather than throwing: a machine with no
154
+ * clipboard tool, or one whose tool cannot be reached in time, is an
155
+ * ordinary condition, and every caller has something useful to print
156
+ * instead.
157
+ */
158
+ async copyToClipboard(text) {
159
+ return this.clipboard.copy(text);
160
+ }
161
+ /**
162
+ * Write machine-readable output to the data channel, verbatim.
163
+ *
164
+ * No styling, no trailing newline, and deliberately not suppressed by
165
+ * `quiet`: under `--quiet` stdout *is* the result, and this is the one path
166
+ * whose bytes a caller pipes into a file or another process. Callers add
167
+ * their own separators, because whether the payload ends in a newline is
168
+ * part of the format.
169
+ *
170
+ * Human-facing lines never come through here — they go to `write` (stdout,
171
+ * for a terminal) or `note` (stderr, alongside a payload).
172
+ */
173
+ pipe(data) {
174
+ process.stdout.write(data);
175
+ }
176
+ /**
177
+ * A human-facing line that must stay out of the data channel.
178
+ *
179
+ * Goes to stderr, so it stays visible on the terminal while `pipe` output is
180
+ * being redirected — and so it can never corrupt the payload.
181
+ */
182
+ note(message) {
183
+ process.stderr.write(`${message}\n`);
184
+ }
138
185
  spacer() {
139
186
  console.log("");
140
187
  }
@@ -22,4 +22,6 @@
22
22
  *
23
23
  * @returns whether the text reached the clipboard.
24
24
  */
25
- export declare function copyToClipboard(text: string): Promise<boolean>;
25
+ export declare class ClipboardService {
26
+ copy(text: string): Promise<boolean>;
27
+ }
@@ -25,7 +25,12 @@ const TIMEOUT_IN_MS = 2000;
25
25
  *
26
26
  * @returns whether the text reached the clipboard.
27
27
  */
28
- export async function copyToClipboard(text) {
28
+ export class ClipboardService {
29
+ async copy(text) {
30
+ return copyToClipboard(text);
31
+ }
32
+ }
33
+ async function copyToClipboard(text) {
29
34
  if (isWayland()) {
30
35
  const copied = await copyWithWaylandClipboard(text);
31
36
  if (copied) {
@@ -0,0 +1 @@
1
+ export * from "./clipboard-service.js";
@@ -0,0 +1 @@
1
+ export * from "./clipboard-service.js";
@@ -1,3 +1,4 @@
1
1
  export * from "./cli-service.js";
2
2
  export * from "./cli-service-model.js";
3
3
  export * from "./cli-service-factory.js";
4
+ export * from "./cli-config.js";
@@ -1,3 +1,4 @@
1
1
  export * from "./cli-service.js";
2
2
  export * from "./cli-service-model.js";
3
3
  export * from "./cli-service-factory.js";
4
+ export * from "./cli-config.js";
@@ -3,7 +3,7 @@ import { describe, beforeEach, afterEach, it } from "mocha";
3
3
  import { mkdtempSync, rmSync, readFileSync } from "node:fs";
4
4
  import { tmpdir } from "node:os";
5
5
  import path from "node:path";
6
- import { CliConfig } from "./cli-config.js";
6
+ import { CliConfig } from "../cli-config.js";
7
7
  function fakeOclifConfig(dir) {
8
8
  return {
9
9
  configDir: dir,
@@ -1,6 +1,6 @@
1
1
  import { expect } from "chai";
2
2
  import { afterEach, beforeEach, describe, it } from "mocha";
3
- import { CliService } from "./cli-service.js";
3
+ import { CliService } from "../cli-service.js";
4
4
  /** The lines a block of work put on stdout. */
5
5
  function captured(work) {
6
6
  const lines = [];
@@ -1,6 +1,6 @@
1
1
  import { expect } from "chai";
2
2
  import { describe, it } from "mocha";
3
- import { isCI, isNonInteractive } from "./environment.js";
3
+ import { isCI, isNonInteractive } from "../environment.js";
4
4
  describe("environment.isCI", () => {
5
5
  it("is false for an empty environment", () => {
6
6
  expect(isCI({})).to.equal(false);
@@ -1,8 +1,10 @@
1
+ import { CliServiceInterface } from "../cli/index.js";
1
2
  import { CustomerConfigService, CustomerConfigServiceContext } from "./index.js";
2
3
  export declare class CustomerConfigServiceFactory {
4
+ private cli?;
3
5
  private readonly context;
4
6
  private service?;
5
- constructor(context: CustomerConfigServiceContext);
7
+ constructor(context: CustomerConfigServiceContext, cli?: CliServiceInterface);
6
8
  buildService(): Promise<CustomerConfigService>;
7
9
  private build;
8
10
  }
@@ -1,9 +1,12 @@
1
1
  import { CliServiceFactory } from "../cli/index.js";
2
2
  import { CustomerConfigService, } from "./index.js";
3
+ import { SiteAnalyzerServiceFactory } from "./site-analyzer/index.js";
3
4
  export class CustomerConfigServiceFactory {
5
+ cli;
4
6
  context;
5
7
  service;
6
- constructor(context) {
8
+ constructor(context, cli) {
9
+ this.cli = cli;
7
10
  this.context = context;
8
11
  }
9
12
  async buildService() {
@@ -14,7 +17,8 @@ export class CustomerConfigServiceFactory {
14
17
  }
15
18
  async build() {
16
19
  const context = this.context;
17
- const cliService = new CliServiceFactory().getService();
18
- this.service = new CustomerConfigService(context, cliService);
20
+ const cliService = this.cli ?? new CliServiceFactory().getService();
21
+ const siteAnalyzer = new SiteAnalyzerServiceFactory(cliService).getService();
22
+ this.service = new CustomerConfigService(context, cliService, siteAnalyzer);
19
23
  }
20
24
  }
@@ -1,8 +1,10 @@
1
- import { CliService } from "../cli/index.js";
1
+ import { CliServiceInterface } from "../cli/index.js";
2
+ import { SiteAnalyzerService } from "./site-analyzer/index.js";
2
3
  import { CustomerConfigServiceContext } from "./customer-config-service-context.js";
3
4
  import { CustomerConfigSettings } from "./customer-config-service-model.js";
4
5
  export declare class CustomerConfigService {
5
6
  private context;
7
+ private siteAnalyzer;
6
8
  private cli;
7
9
  private _appName;
8
10
  private _outputDirPath;
@@ -12,7 +14,7 @@ export declare class CustomerConfigService {
12
14
  private get outputDirPath();
13
15
  /** Set from the "Downtime Detection" feature answer in the wizard. */
14
16
  private includeDowntimeDetection;
15
- constructor(context: CustomerConfigServiceContext, cli: CliService);
17
+ constructor(context: CustomerConfigServiceContext, cli: CliServiceInterface, siteAnalyzer: SiteAnalyzerService);
16
18
  private getOutputDirPath;
17
19
  private getOutputFileName;
18
20
  private getPathWithChangedDir;
@@ -1,10 +1,10 @@
1
1
  import * as fs from "node:fs";
2
2
  import * as path from "node:path";
3
- import { analyzeSite, } from "../../helpers/site-analyzer.js";
4
3
  import { DirectoryOverwriteOption, EnvironmentType, ShopSystem, TEMPLATE_VARIABLES, } from "./customer-config-service-model.js";
5
4
  import { findUnknownVariables, resolveTemplateSource, } from "./template-source.js";
6
5
  export class CustomerConfigService {
7
6
  context;
7
+ siteAnalyzer;
8
8
  cli;
9
9
  _appName;
10
10
  _outputDirPath;
@@ -23,8 +23,9 @@ export class CustomerConfigService {
23
23
  }
24
24
  /** Set from the "Downtime Detection" feature answer in the wizard. */
25
25
  includeDowntimeDetection = false;
26
- constructor(context, cli) {
26
+ constructor(context, cli, siteAnalyzer) {
27
27
  this.context = context;
28
+ this.siteAnalyzer = siteAnalyzer;
28
29
  const { appName } = this.context;
29
30
  this.appName = appName;
30
31
  this.cli = cli;
@@ -193,7 +194,7 @@ export class CustomerConfigService {
193
194
  const shouldAnalyze = await this.cli.confirm("[Analysis] Analyze production site to auto-detect settings?", true);
194
195
  if (shouldAnalyze) {
195
196
  this.cli.startAction("ANALYSE:CUSTOMER:CONFIG", `Analyzing https://${productionHost}`);
196
- siteAnalysis = await analyzeSite(productionHost, (message) => this.cli.comment(message));
197
+ siteAnalysis = await this.siteAnalyzer.analyze(productionHost);
197
198
  if (siteAnalysis) {
198
199
  this.cli.successAction("ANALYSE:CUSTOMER:CONFIG");
199
200
  }
@@ -0,0 +1,3 @@
1
+ export * from "./site-analyzer-model.js";
2
+ export * from "./site-analyzer-service.js";
3
+ export * from "./site-analyzer-service-factory.js";
@@ -0,0 +1,3 @@
1
+ export * from "./site-analyzer-model.js";
2
+ export * from "./site-analyzer-service.js";
3
+ export * from "./site-analyzer-service-factory.js";
@@ -10,4 +10,3 @@ export interface SiteAnalysisResult {
10
10
  shopSystem: DetectedShopSystem;
11
11
  hasInstallJs: boolean;
12
12
  }
13
- export declare function analyzeSite(host: string, log?: (message: string) => void): Promise<SiteAnalysisResult | null>;
@@ -0,0 +1,7 @@
1
+ import { CliServiceInterface } from "../../cli/index.js";
2
+ import { SiteAnalyzerService } from "./site-analyzer-service.js";
3
+ export declare class SiteAnalyzerServiceFactory {
4
+ private cli?;
5
+ constructor(cli?: CliServiceInterface);
6
+ getService(): SiteAnalyzerService;
7
+ }
@@ -0,0 +1,11 @@
1
+ import { CliServiceFactory } from "../../cli/index.js";
2
+ import { SiteAnalyzerService } from "./site-analyzer-service.js";
3
+ export class SiteAnalyzerServiceFactory {
4
+ cli;
5
+ constructor(cli) {
6
+ this.cli = cli;
7
+ }
8
+ getService() {
9
+ return new SiteAnalyzerService(this.cli ?? new CliServiceFactory().getService());
10
+ }
11
+ }
@@ -0,0 +1,16 @@
1
+ import { CliServiceInterface } from "../../cli/index.js";
2
+ import { SiteAnalysisResult } from "./site-analyzer-model.js";
3
+ /**
4
+ * Reads a customer's live site and infers the config settings the wizard should
5
+ * default to — shop system, tracking, service worker, soft navigations.
6
+ *
7
+ * Every probe is best-effort: a site that cannot be reached, or answers with
8
+ * something unparseable, yields null and the wizard falls back to its defaults.
9
+ * That is a normal outcome, not an error, which is why `analyze` reports
10
+ * progress through the CLI rather than throwing.
11
+ */
12
+ export declare class SiteAnalyzerService {
13
+ private cli;
14
+ constructor(cli: CliServiceInterface);
15
+ analyze(host: string): Promise<SiteAnalysisResult | null>;
16
+ }
@@ -1,5 +1,5 @@
1
- import { safe } from "./safe.js";
2
- import { originFetch } from "./origin-proxy.js";
1
+ import { safe } from "../../../helpers/safe.js";
2
+ import { originFetch } from "../../../helpers/origin-proxy.js";
3
3
  const EMPTY_FLAGS = {
4
4
  useGATracking: false,
5
5
  withGoogleOptimize: false,
@@ -137,7 +137,22 @@ async function fetchAndAnalyze(host, log) {
137
137
  clearTimeout(timeout);
138
138
  }
139
139
  }
140
- export async function analyzeSite(host, log = console.log) {
141
- const result = await safe(fetchAndAnalyze(host, log));
142
- return result.success ? result.data : null;
140
+ /**
141
+ * Reads a customer's live site and infers the config settings the wizard should
142
+ * default to — shop system, tracking, service worker, soft navigations.
143
+ *
144
+ * Every probe is best-effort: a site that cannot be reached, or answers with
145
+ * something unparseable, yields null and the wizard falls back to its defaults.
146
+ * That is a normal outcome, not an error, which is why `analyze` reports
147
+ * progress through the CLI rather than throwing.
148
+ */
149
+ export class SiteAnalyzerService {
150
+ cli;
151
+ constructor(cli) {
152
+ this.cli = cli;
153
+ }
154
+ async analyze(host) {
155
+ const result = await safe(fetchAndAnalyze(host, (message) => this.cli.comment(message)));
156
+ return result.success ? result.data : null;
157
+ }
143
158
  }
@@ -1,4 +1,4 @@
1
- import { UserCliConfig } from "../../../helpers/cli-config.js";
1
+ import { UserCliConfig } from "../../cli/index.js";
2
2
  import { BulkDeployContext } from "./bulk-deploy-model.js";
3
3
  import { BulkDeployService } from "./bulk-deploy-service.js";
4
4
  export declare class BulkDeployServiceFactory {
@@ -1,4 +1,4 @@
1
- import { UserCliConfig } from "../../../helpers/cli-config.js";
1
+ import { UserCliConfig } from "../../cli/index.js";
2
2
  import { GitRepository, MergedRequest } from "../../git/index.js";
3
3
  import { MergeRequestDeployService } from "../mr/index.js";
4
4
  import { BulkAnswers, ConfigDeployFactoryInterface, TouchedConfig } from "./bulk-deploy-model.js";
@@ -1,6 +1,6 @@
1
1
  import { PostDeployCheckInterface } from "../../deploy-service-model.js";
2
2
  import { FileListInterface } from "../../../integration-api/index.js";
3
- import { CliService } from "../../../cli/index.js";
3
+ import { CliServiceInterface } from "../../../cli/index.js";
4
4
  import { ConfigApiService } from "../../../config-api/index.js";
5
5
  import { DeployPolicyInterface } from "../../policy/index.js";
6
6
  export declare class DeprecatedDeploymentDetectionCheck implements PostDeployCheckInterface {
@@ -9,7 +9,7 @@ export declare class DeprecatedDeploymentDetectionCheck implements PostDeployChe
9
9
  private configApi;
10
10
  private app;
11
11
  private policy;
12
- constructor(fileList: FileListInterface, cli: CliService, configApi: ConfigApiService, app: string, policy: DeployPolicyInterface);
12
+ constructor(fileList: FileListInterface, cli: CliServiceInterface, configApi: ConfigApiService, app: string, policy: DeployPolicyInterface);
13
13
  check(): Promise<void>;
14
14
  private deleteDeploymentJobDefinition;
15
15
  }
@@ -1,9 +1,9 @@
1
1
  import { EntityManager } from "baqend";
2
2
  import { PostDeployCheckInterface } from "../../deploy-service-model.js";
3
- import { CliService } from "../../../cli/index.js";
3
+ import { CliServiceInterface } from "../../../cli/index.js";
4
4
  export declare class RefreshDeploymentJobCheck implements PostDeployCheckInterface {
5
5
  private entityManager;
6
6
  private cli;
7
- constructor(entityManager: EntityManager, cli: CliService);
7
+ constructor(entityManager: EntityManager, cli: CliServiceInterface);
8
8
  check(): Promise<void>;
9
9
  }
@@ -1,10 +1,10 @@
1
- import { CliService } from "../../../cli/index.js";
1
+ import { CliServiceInterface } from "../../../cli/index.js";
2
2
  import { PostDeployCheckInterface } from "../../deploy-service-model.js";
3
3
  import { ConfigApiService } from "../../../config-api/index.js";
4
4
  export default class RevalidatedModuleCheck implements PostDeployCheckInterface {
5
5
  private readonly configApi;
6
6
  private cli;
7
7
  private readonly app;
8
- constructor(configApi: ConfigApiService, cli: CliService, app: string);
8
+ constructor(configApi: ConfigApiService, cli: CliServiceInterface, app: string);
9
9
  check(): Promise<void>;
10
10
  }
@@ -1,4 +1,4 @@
1
- import { CliService } from "../../../cli/index.js";
1
+ import { CliServiceInterface } from "../../../cli/index.js";
2
2
  import { FileListInterface, InstallResourceFile } from "../../../integration-api/index.js";
3
3
  import { PostDeployCheckInterface } from "../../deploy-service-model.js";
4
4
  import { DeployPolicyInterface } from "../../policy/index.js";
@@ -6,7 +6,7 @@ export default class SaveFilesCheck implements PostDeployCheckInterface {
6
6
  private policy;
7
7
  private fileList;
8
8
  private readonly cli;
9
- constructor(fileList: FileListInterface, cli: CliService, policy: DeployPolicyInterface);
9
+ constructor(fileList: FileListInterface, cli: CliServiceInterface, policy: DeployPolicyInterface);
10
10
  check(): Promise<void>;
11
11
  safeFiles(fileList: InstallResourceFile[]): Promise<void>;
12
12
  }
@@ -38,7 +38,7 @@ export default class DeployContext {
38
38
  }),
39
39
  approval: Flags.string({
40
40
  options: ["approved", "testing", "skip"],
41
- default: "skip",
41
+ // No default: oclif counts a defaulted flag as given, so dependsOn would fail every deploy.
42
42
  dependsOn: ["mr"],
43
43
  description: "what to do with a customer that approves every rollout themselves",
44
44
  }),