@speedkit/cli 4.36.0 → 4.36.2

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 (480) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.md +3 -29
  3. package/dist/base/sk-command.d.ts +41 -0
  4. package/dist/base/sk-command.js +56 -0
  5. package/dist/commands/auto-prewarm.d.ts +6 -4
  6. package/dist/commands/auto-prewarm.js +13 -66
  7. package/dist/commands/autocomplete/fish.d.ts +2 -2
  8. package/dist/commands/autocomplete/fish.js +3 -2
  9. package/dist/commands/browser/clean.d.ts +2 -2
  10. package/dist/commands/browser/clean.js +6 -7
  11. package/dist/commands/browser/list.d.ts +2 -2
  12. package/dist/commands/browser/list.js +6 -8
  13. package/dist/commands/browser/update.d.ts +2 -2
  14. package/dist/commands/browser/update.js +9 -12
  15. package/dist/commands/bulk-deploy.d.ts +4 -2
  16. package/dist/commands/bulk-deploy.js +7 -37
  17. package/dist/commands/config/edit.d.ts +2 -2
  18. package/dist/commands/config/edit.js +2 -2
  19. package/dist/commands/config/setup.d.ts +5 -2
  20. package/dist/commands/config/setup.js +10 -19
  21. package/dist/commands/deploy.d.ts +12 -3
  22. package/dist/commands/deploy.js +14 -19
  23. package/dist/commands/diff-url-parameters.d.ts +5 -4
  24. package/dist/commands/diff-url-parameters.js +28 -18
  25. package/dist/commands/extension/add.d.ts +2 -2
  26. package/dist/commands/extension/add.js +6 -6
  27. package/dist/commands/extension/devtools.d.ts +2 -2
  28. package/dist/commands/extension/devtools.js +6 -7
  29. package/dist/commands/extension/list.d.ts +2 -2
  30. package/dist/commands/extension/list.js +5 -6
  31. package/dist/commands/extension/remove.d.ts +2 -2
  32. package/dist/commands/extension/remove.js +6 -6
  33. package/dist/commands/extension/update.d.ts +2 -2
  34. package/dist/commands/extension/update.js +5 -6
  35. package/dist/commands/find-pops.d.ts +2 -2
  36. package/dist/commands/find-pops.js +11 -11
  37. package/dist/commands/generate-customer-config.d.ts +5 -2
  38. package/dist/commands/generate-customer-config.js +9 -27
  39. package/dist/commands/generate-pop-config.d.ts +2 -2
  40. package/dist/commands/generate-pop-config.js +26 -26
  41. package/dist/commands/login.d.ts +2 -2
  42. package/dist/commands/login.js +6 -9
  43. package/dist/commands/onboarding.d.ts +18 -3
  44. package/dist/commands/onboarding.js +13 -11
  45. package/dist/commands/origin-request.d.ts +4 -2
  46. package/dist/commands/origin-request.js +10 -42
  47. package/dist/commands/prewarm.d.ts +4 -2
  48. package/dist/commands/prewarm.js +12 -56
  49. package/dist/commands/pull.d.ts +4 -2
  50. package/dist/commands/pull.js +9 -14
  51. package/dist/commands/query/parameter.d.ts +4 -2
  52. package/dist/commands/query/parameter.js +12 -19
  53. package/dist/commands/query/prewarm.d.ts +4 -2
  54. package/dist/commands/query/prewarm.js +16 -23
  55. package/dist/commands/revalidate.d.ts +4 -2
  56. package/dist/commands/revalidate.js +14 -56
  57. package/dist/commands/wpt-launcher.d.ts +2 -2
  58. package/dist/commands/wpt-launcher.js +17 -17
  59. package/dist/helpers/{chrome-flags.spec.js → spec/chrome-flags.spec.js} +1 -1
  60. package/dist/helpers/{origin-proxy.spec.js → spec/origin-proxy.spec.js} +1 -1
  61. package/dist/hooks/init/first-run.js +9 -10
  62. package/dist/hooks/{init → spec/init}/dns-result-order.spec.js +1 -1
  63. package/dist/hooks/{init → spec/init}/http1-global-dispatcher.spec.js +1 -1
  64. package/dist/models/context.d.ts +24 -0
  65. package/dist/models/context.js +31 -0
  66. package/dist/services/athena/athena-flags.d.ts +18 -0
  67. package/dist/services/athena/athena-flags.js +29 -0
  68. package/dist/services/athena/athena-service-build-context.d.ts +25 -0
  69. package/dist/services/athena/athena-service-build-context.js +4 -0
  70. package/dist/services/athena/athena-service-factory.d.ts +3 -14
  71. package/dist/services/athena/athena-service-factory.js +11 -25
  72. package/dist/services/athena/baqend-athena-service.d.ts +3 -14
  73. package/dist/services/athena/baqend-athena-service.js +8 -16
  74. package/dist/services/athena/index.d.ts +1 -0
  75. package/dist/services/athena/index.js +1 -0
  76. package/dist/services/athena/{athena-service.spec.js → spec/athena-service.spec.js} +1 -1
  77. package/dist/services/athena/{baqend-athena-service.spec.js → spec/baqend-athena-service.spec.js} +4 -4
  78. package/dist/services/browser-fetch/browser-origin-fetch.d.ts +2 -2
  79. package/dist/services/browser-fetch/browser-origin-fetch.js +1 -1
  80. package/dist/services/browser-fetch/browser-origin-fetcher.d.ts +3 -3
  81. package/dist/services/browser-fetch/browser-origin-fetcher.js +5 -5
  82. package/dist/services/browser-fetch/{browser-origin-fetch.spec.js → spec/browser-origin-fetch.spec.js} +12 -12
  83. package/dist/services/browser-fetch/{browser-origin-fetcher.spec.js → spec/browser-origin-fetcher.spec.js} +1 -1
  84. package/dist/services/browser-fetch/{browser-response.spec.js → spec/browser-response.spec.js} +1 -1
  85. package/dist/services/browser-fetch/{device-emulation.spec.js → spec/device-emulation.spec.js} +2 -2
  86. package/dist/services/bundler/{bundle-service.spec.js → spec/bundle-service.spec.js} +1 -1
  87. package/dist/services/cli/cli-environment-factory.d.ts +25 -0
  88. package/dist/services/cli/cli-environment-factory.js +30 -0
  89. package/dist/services/cli/cli-environment.d.ts +73 -0
  90. package/dist/services/cli/cli-environment.js +216 -0
  91. package/dist/services/cli/cli-service-build-context.d.ts +10 -0
  92. package/dist/services/cli/cli-service-build-context.js +4 -0
  93. package/dist/services/cli/cli-service-factory.d.ts +12 -4
  94. package/dist/services/cli/cli-service-factory.js +11 -9
  95. package/dist/services/cli/cli-service-model.d.ts +10 -6
  96. package/dist/services/cli/cli-service-model.js +0 -6
  97. package/dist/services/cli/cli-service.d.ts +52 -1
  98. package/dist/services/cli/cli-service.js +60 -14
  99. package/dist/services/cli/cli-settings.d.ts +37 -0
  100. package/dist/services/cli/cli-settings.js +23 -0
  101. package/dist/{helpers/clipboard.d.ts → services/cli/clipboard/clipboard-service.d.ts} +3 -1
  102. package/dist/{helpers/clipboard.js → services/cli/clipboard/clipboard-service.js} +6 -1
  103. package/dist/services/cli/clipboard/index.d.ts +1 -0
  104. package/dist/services/cli/clipboard/index.js +1 -0
  105. package/dist/services/cli/command-build-context.d.ts +23 -0
  106. package/dist/services/cli/index.d.ts +5 -0
  107. package/dist/services/cli/index.js +5 -0
  108. package/dist/services/cli/spec/cli-environment-detection.spec.js +52 -0
  109. package/dist/services/cli/spec/cli-environment.spec.js +125 -0
  110. package/dist/services/cli/{cli-service.spec.js → spec/cli-service.spec.js} +10 -20
  111. package/dist/services/config-api/client.d.ts +3 -3
  112. package/dist/services/config-api/client.js +4 -4
  113. package/dist/services/config-api/config-api-factory.js +3 -3
  114. package/dist/services/config-api/entity-manager-provider.d.ts +11 -0
  115. package/dist/services/config-api/{entity-manager-factory.js → entity-manager-provider.js} +7 -1
  116. package/dist/services/customer-config/customer-config-service-build-context.d.ts +33 -0
  117. package/dist/services/customer-config/customer-config-service-build-context.js +36 -0
  118. package/dist/services/customer-config/customer-config-service-factory.d.ts +3 -2
  119. package/dist/services/customer-config/customer-config-service-factory.js +5 -4
  120. package/dist/services/customer-config/customer-config-service.d.ts +5 -3
  121. package/dist/services/customer-config/customer-config-service.js +4 -3
  122. package/dist/services/customer-config/index.d.ts +1 -1
  123. package/dist/services/customer-config/index.js +1 -1
  124. package/dist/services/customer-config/site-analyzer/index.d.ts +4 -0
  125. package/dist/services/customer-config/site-analyzer/index.js +4 -0
  126. package/dist/{helpers/site-analyzer.d.ts → services/customer-config/site-analyzer/site-analyzer-model.d.ts} +0 -1
  127. package/dist/services/customer-config/site-analyzer/site-analyzer-service-build-context.d.ts +6 -0
  128. package/dist/services/customer-config/site-analyzer/site-analyzer-service-build-context.js +4 -0
  129. package/dist/services/customer-config/site-analyzer/site-analyzer-service-factory.d.ts +7 -0
  130. package/dist/services/customer-config/site-analyzer/site-analyzer-service-factory.js +10 -0
  131. package/dist/services/customer-config/site-analyzer/site-analyzer-service.d.ts +16 -0
  132. package/dist/{helpers/site-analyzer.js → services/customer-config/site-analyzer/site-analyzer-service.js} +20 -5
  133. package/dist/services/deploy/bulk/bulk-deploy-model.d.ts +0 -25
  134. package/dist/services/deploy/bulk/bulk-deploy-model.js +1 -27
  135. package/dist/services/deploy/bulk/bulk-deploy-service-build-context.d.ts +51 -0
  136. package/dist/services/deploy/bulk/bulk-deploy-service-build-context.js +50 -0
  137. package/dist/services/deploy/bulk/bulk-deploy-service-factory.d.ts +2 -4
  138. package/dist/services/deploy/bulk/bulk-deploy-service-factory.js +2 -5
  139. package/dist/services/deploy/bulk/bulk-deploy-service.d.ts +3 -2
  140. package/dist/services/deploy/bulk/config-deploy-factory.d.ts +3 -3
  141. package/dist/services/deploy/bulk/config-deploy-factory.js +16 -8
  142. package/dist/services/deploy/bulk/index.d.ts +1 -0
  143. package/dist/services/deploy/bulk/index.js +1 -0
  144. package/dist/services/deploy/checks/activation/customer-approval-check.d.ts +3 -1
  145. package/dist/services/deploy/checks/activation/customer-approval-check.js +4 -2
  146. package/dist/services/deploy/checks/post-deploy/deprecated-deployment-detection-check.d.ts +2 -2
  147. package/dist/services/deploy/checks/post-deploy/refresh-deployment-job-check.d.ts +2 -2
  148. package/dist/services/deploy/checks/post-deploy/revalidated-module-check.d.ts +2 -2
  149. package/dist/services/deploy/checks/post-deploy/save-files-check.d.ts +2 -2
  150. package/dist/services/deploy/checks/pre-deploy/device-detection-changed-check.d.ts +3 -1
  151. package/dist/services/deploy/checks/pre-deploy/device-detection-changed-check.js +4 -2
  152. package/dist/services/deploy/checks/pre-deploy/split-change-check.d.ts +3 -1
  153. package/dist/services/deploy/checks/pre-deploy/split-change-check.js +4 -2
  154. package/dist/services/deploy/deploy-service-build-context.d.ts +63 -0
  155. package/dist/services/deploy/deploy-service-build-context.js +64 -0
  156. package/dist/services/deploy/deploy-service-factory.d.ts +4 -6
  157. package/dist/services/deploy/deploy-service-factory.js +25 -14
  158. package/dist/services/deploy/deploy-service.d.ts +2 -2
  159. package/dist/services/deploy/handler/customer-config-handler.d.ts +2 -2
  160. package/dist/services/deploy/handler/install-resource-handler.d.ts +2 -2
  161. package/dist/services/deploy/handler/install-resource-modifier/deleted-file-check.d.ts +2 -2
  162. package/dist/services/deploy/handler/module-handler.d.ts +2 -2
  163. package/dist/services/deploy/handler/server-config-handler.d.ts +2 -2
  164. package/dist/services/deploy/mr/base-config-reader.d.ts +6 -4
  165. package/dist/services/deploy/mr/base-config-reader.js +14 -13
  166. package/dist/services/deploy/mr/index.d.ts +1 -0
  167. package/dist/services/deploy/mr/index.js +1 -0
  168. package/dist/services/deploy/mr/merge-request-deploy-model.d.ts +0 -35
  169. package/dist/services/deploy/mr/merge-request-deploy-model.js +0 -34
  170. package/dist/services/deploy/mr/merge-request-deploy-service-build-context.d.ts +32 -0
  171. package/dist/services/deploy/mr/merge-request-deploy-service-build-context.js +20 -0
  172. package/dist/services/deploy/mr/merge-request-deploy-service-factory.d.ts +2 -4
  173. package/dist/services/deploy/mr/merge-request-deploy-service-factory.js +31 -10
  174. package/dist/services/deploy/mr/merge-request-deploy-service.d.ts +3 -2
  175. package/dist/services/deploy/{bulk → spec/bulk}/bulk-deploy-service.spec.js +18 -7
  176. package/dist/services/deploy/{bulk → spec/bulk}/touched-configs.spec.js +2 -2
  177. package/dist/services/deploy/{checks → spec/checks}/activation/customer-approval-check.spec.js +9 -7
  178. package/dist/services/deploy/{checks → spec/checks}/post-deploy/refresh-deployment-job-check.spec.js +2 -2
  179. package/dist/services/deploy/{checks → spec/checks}/pre-deploy/split-change-check.spec.js +5 -4
  180. package/dist/services/deploy/{handler → spec/handler}/module-handler.spec.js +2 -2
  181. package/dist/services/deploy/{handler → spec/handler}/testing-installation-links.spec.js +1 -1
  182. package/dist/services/deploy/{mr → spec/mr}/live-state-check.spec.js +2 -2
  183. package/dist/services/deploy/{mr → spec/mr}/merge-request-description.spec.js +1 -1
  184. package/dist/services/deploy/{policy → spec/policy}/auto-deploy-policy.spec.js +2 -2
  185. package/dist/services/diff/diff-service-build-context.d.ts +14 -0
  186. package/dist/services/diff/diff-service-build-context.js +4 -0
  187. package/dist/services/diff/diff-service-factory.d.ts +4 -3
  188. package/dist/services/diff/diff-service-factory.js +3 -4
  189. package/dist/services/diff/diff-service.d.ts +10 -2
  190. package/dist/services/diff/diff-service.js +26 -3
  191. package/dist/services/diff/index.d.ts +2 -1
  192. package/dist/services/diff/index.js +2 -1
  193. package/dist/services/document-handler-runtime/document-handler-runtime-model.d.ts +7 -0
  194. package/dist/services/document-handler-runtime/document-handler-runtime-model.js +10 -0
  195. package/dist/services/document-handler-runtime/document-handler-runtime-service-build-context.d.ts +11 -0
  196. package/dist/services/document-handler-runtime/document-handler-runtime-service-build-context.js +4 -0
  197. package/dist/services/document-handler-runtime/document-handler-server.d.ts +2 -2
  198. package/dist/services/document-handler-runtime/document-handler-server.js +2 -2
  199. package/dist/services/document-handler-runtime/factory/document-handler-runtime-service-factory.d.ts +3 -14
  200. package/dist/services/document-handler-runtime/factory/document-handler-runtime-service-factory.js +14 -80
  201. package/dist/services/document-handler-runtime/server/request.js +1 -1
  202. package/dist/services/document-handler-runtime/{document-handler-abort.spec.js → spec/document-handler-abort.spec.js} +2 -2
  203. package/dist/services/document-handler-runtime/templates/database-mock.d.ts +1 -1
  204. package/dist/services/document-handler-runtime/templates/database-mock.js +1 -1
  205. package/dist/services/git/{git-repository.spec.js → spec/git-repository.spec.js} +1 -1
  206. package/dist/services/integration-api/customer-config-flags.d.ts +16 -0
  207. package/dist/services/integration-api/customer-config-flags.js +30 -0
  208. package/dist/services/integration-api/handler/customer-config-handler.d.ts +2 -2
  209. package/dist/services/integration-api/handler/install-resource-handler.d.ts +8 -0
  210. package/dist/services/integration-api/handler/install-resource-handler.js +10 -1
  211. package/dist/services/integration-api/index.d.ts +1 -0
  212. package/dist/services/integration-api/index.js +1 -0
  213. package/dist/services/integration-api/integration-api-factory.d.ts +4 -5
  214. package/dist/services/integration-api/integration-api-factory.js +11 -9
  215. package/dist/services/integration-api/integration-api-model.d.ts +0 -9
  216. package/dist/services/integration-api/integration-api-model.js +0 -16
  217. package/dist/services/integration-api/integration-api-service-build-context.d.ts +19 -0
  218. package/dist/services/integration-api/integration-api-service-build-context.js +4 -0
  219. package/dist/services/integration-api/spec/config-plugin.spec.js +1 -1
  220. package/dist/services/integration-api/spec/integration-api-service.spec.js +7 -3
  221. package/dist/services/integration-api/spec/speed-kit-config-file.spec.js +9 -2
  222. package/dist/services/integration-api/struct/config-plugin.d.ts +1 -1
  223. package/dist/services/integration-api/struct/config-plugin.js +12 -7
  224. package/dist/services/integration-api/struct/customer-config-file.js +1 -1
  225. package/dist/services/integration-api/struct/speed-kit-config-file.d.ts +18 -2
  226. package/dist/services/integration-api/struct/speed-kit-config-file.js +22 -12
  227. package/dist/services/integration-api/struct/speed-kit-config.d.ts +1 -1
  228. package/dist/services/integration-api/virtual/virtual-file-handler.d.ts +2 -2
  229. package/dist/services/onboarding/browser/config/browser-config.d.ts +3 -3
  230. package/dist/services/onboarding/browser/config/browser-config.js +5 -5
  231. package/dist/services/onboarding/browser/executable/executable-validator.d.ts +3 -4
  232. package/dist/services/onboarding/browser/executable/executable-validator.js +17 -15
  233. package/dist/services/onboarding/browser/extension/extension-downloader.d.ts +3 -4
  234. package/dist/services/onboarding/browser/extension/extension-downloader.js +6 -6
  235. package/dist/services/onboarding/browser/extension/extension-validator.d.ts +3 -4
  236. package/dist/services/onboarding/browser/extension/extension-validator.js +4 -4
  237. package/dist/services/onboarding/dashboard/diff-against-current-page.d.ts +2 -2
  238. package/dist/services/onboarding/dashboard/diff-against-current-page.js +1 -1
  239. package/dist/services/onboarding/dashboard/request-diff-service.d.ts +3 -1
  240. package/dist/services/onboarding/dashboard/request-diff-service.js +5 -3
  241. package/dist/services/onboarding/fetch-event-handler.d.ts +2 -2
  242. package/dist/services/onboarding/fetch-events/speed-kit-install-js.d.ts +3 -1
  243. package/dist/services/onboarding/fetch-events/speed-kit-install-js.js +5 -3
  244. package/dist/services/onboarding/file-events/file-watcher.d.ts +2 -2
  245. package/dist/services/onboarding/file-events/file-watcher.js +3 -2
  246. package/dist/services/onboarding/index.d.ts +1 -1
  247. package/dist/services/onboarding/index.js +1 -1
  248. package/dist/services/onboarding/onboarding-model.d.ts +8 -24
  249. package/dist/services/onboarding/onboarding-model.js +19 -87
  250. package/dist/services/onboarding/onboarding-service-build-context.d.ts +57 -0
  251. package/dist/services/onboarding/onboarding-service-build-context.js +67 -0
  252. package/dist/services/onboarding/onboarding-service-factory.d.ts +2 -4
  253. package/dist/services/onboarding/onboarding-service-factory.js +50 -37
  254. package/dist/services/onboarding/onboarding-service.d.ts +2 -2
  255. package/dist/services/onboarding/request-cache/cache.d.ts +2 -2
  256. package/dist/services/onboarding/server-config/index.d.ts +2 -2
  257. package/dist/services/onboarding/{browser → spec/browser}/executable/headed-user-agent.spec.js +1 -1
  258. package/dist/services/onboarding/{empty-service-worker.spec.js → spec/empty-service-worker.spec.js} +1 -1
  259. package/dist/services/onboarding/{onboarding-model.spec.js → spec/onboarding-model.spec.js} +13 -8
  260. package/dist/services/onboarding/{virtual-orestes-app → spec/virtual-orestes-app}/crawler.spec.js +1 -1
  261. package/dist/services/onboarding/{virtual-orestes-app → spec/virtual-orestes-app}/origin-error-cause.spec.js +1 -1
  262. package/dist/services/onboarding/virtual-orestes-app/crawler.d.ts +2 -2
  263. package/dist/services/onboarding/virtual-orestes-app/index.d.ts +2 -2
  264. package/dist/services/origin-request/asset-variations.js +1 -1
  265. package/dist/services/origin-request/index.d.ts +1 -1
  266. package/dist/services/origin-request/index.js +1 -1
  267. package/dist/services/origin-request/origin-request-service-build-context.d.ts +52 -0
  268. package/dist/services/origin-request/origin-request-service-build-context.js +54 -0
  269. package/dist/services/origin-request/origin-request-service-factory.d.ts +2 -4
  270. package/dist/services/origin-request/origin-request-service-factory.js +10 -8
  271. package/dist/services/origin-request/origin-request-service.d.ts +3 -3
  272. package/dist/services/origin-request/{asset-variations.spec.js → spec/asset-variations.spec.js} +1 -1
  273. package/dist/services/pop-config/index.d.ts +1 -0
  274. package/dist/services/pop-config/index.js +1 -0
  275. package/dist/services/pop-config/pop-config-factory.d.ts +4 -1
  276. package/dist/services/pop-config/pop-config-factory.js +10 -3
  277. package/dist/services/pop-config/pop-config-service-build-context.d.ts +10 -0
  278. package/dist/services/pop-config/pop-config-service-build-context.js +4 -0
  279. package/dist/services/prewarm/assets/asset-api-client.d.ts +3 -1
  280. package/dist/services/prewarm/assets/asset-api-client.js +5 -3
  281. package/dist/services/prewarm/auto-pre-warm-factory.d.ts +3 -30
  282. package/dist/services/prewarm/auto-pre-warm-factory.js +7 -9
  283. package/dist/services/prewarm/auto-pre-warm-service-build-context.d.ts +84 -0
  284. package/dist/services/prewarm/auto-pre-warm-service-build-context.js +68 -0
  285. package/dist/services/prewarm/index.d.ts +2 -0
  286. package/dist/services/prewarm/index.js +2 -0
  287. package/dist/{helpers → services/prewarm}/normalize.d.ts +0 -6
  288. package/dist/{helpers → services/prewarm}/normalize.js +0 -8
  289. package/dist/services/prewarm/pre-warm-factory.d.ts +4 -3
  290. package/dist/services/prewarm/pre-warm-factory.js +5 -4
  291. package/dist/services/prewarm/pre-warm-model.d.ts +0 -10
  292. package/dist/services/prewarm/pre-warm-model.js +0 -18
  293. package/dist/services/prewarm/pre-warm-service-build-context.d.ts +47 -0
  294. package/dist/services/prewarm/pre-warm-service-build-context.js +64 -0
  295. package/dist/services/prewarm/{csv-reader.spec.js → spec/csv-reader.spec.js} +1 -1
  296. package/dist/services/prewarm/{prewarm-targets.spec.js → spec/prewarm-targets.spec.js} +1 -1
  297. package/dist/services/pull/index.d.ts +1 -0
  298. package/dist/services/pull/index.js +1 -0
  299. package/dist/services/pull/pull-service-build-context.d.ts +28 -0
  300. package/dist/services/pull/pull-service-build-context.js +17 -0
  301. package/dist/services/pull/pull-service-factory.d.ts +3 -4
  302. package/dist/services/pull/pull-service-factory.js +11 -10
  303. package/dist/services/pull/pull-service-model.d.ts +0 -5
  304. package/dist/services/pull/pull-service-model.js +0 -9
  305. package/dist/services/query-builder/query-builder-factory.d.ts +9 -6
  306. package/dist/services/query-builder/query-builder-factory.js +24 -11
  307. package/dist/{models/cli-parameters.d.ts → services/query-builder/query-builder-flags.d.ts} +1 -122
  308. package/dist/services/query-builder/query-builder-flags.js +150 -0
  309. package/dist/services/query-builder/query-builder-model.d.ts +1 -14
  310. package/dist/services/query-builder/query-builder-service-build-context.d.ts +113 -0
  311. package/dist/services/query-builder/query-builder-service-build-context.js +68 -0
  312. package/dist/services/query-builder/query-builder-service.d.ts +3 -3
  313. package/dist/services/query-builder/query-builder-service.js +4 -5
  314. package/dist/services/query-builder/{queries/spec → spec/queries}/golden.spec.js +3 -3
  315. package/dist/services/query-builder/{queries/spec → spec/queries}/pops-query.spec.js +2 -2
  316. package/dist/services/query-builder/{queries/spec → spec/queries}/queries.spec.js +3 -3
  317. package/dist/services/query-builder/{queries/spec → spec/queries}/reported-bugs.spec.js +2 -2
  318. package/dist/{models/cli-parameters.spec.js → services/query-builder/spec/query-builder-flags.spec.js} +1 -1
  319. package/dist/services/query-builder/{query-builder-service.spec.js → spec/query-builder-service.spec.js} +4 -4
  320. package/dist/services/query-builder/{rules/spec → spec/rules}/pattern-language.spec.js +1 -1
  321. package/dist/services/query-builder/{rules/spec → spec/rules}/rule-parser.spec.js +1 -1
  322. package/dist/services/query-builder/{rules/spec → spec/rules}/rule-reducer.spec.js +2 -2
  323. package/dist/services/query-builder/{rules/spec → spec/rules}/rule-relevance.spec.js +2 -2
  324. package/dist/services/query-builder/{rules/spec → spec/rules}/rule-to-sql.spec.js +2 -2
  325. package/dist/services/query-builder/{rules/spec → spec/rules}/runtime-semantics.spec.js +1 -1
  326. package/dist/services/query-builder/{rules/spec → spec/rules}/strip-parameters.spec.js +3 -3
  327. package/dist/services/query-builder/{sql/spec → spec/sql}/expression.spec.js +2 -2
  328. package/dist/services/query-builder/{sql/spec → spec/sql}/format.spec.js +2 -2
  329. package/dist/services/query-builder/{sql/spec → spec/sql}/predicate.spec.js +1 -1
  330. package/dist/services/query-builder/{sql/spec → spec/sql}/regex.spec.js +1 -1
  331. package/dist/services/revalidate/index.d.ts +1 -0
  332. package/dist/services/revalidate/index.js +1 -0
  333. package/dist/services/revalidate/revalidate-factory.d.ts +3 -3
  334. package/dist/services/revalidate/revalidate-factory.js +1 -2
  335. package/dist/services/revalidate/revalidate-model.d.ts +0 -9
  336. package/dist/services/revalidate/revalidate-model.js +0 -8
  337. package/dist/services/revalidate/revalidate-service-build-context.d.ts +38 -0
  338. package/dist/services/revalidate/revalidate-service-build-context.js +59 -0
  339. package/dist/services/revalidate/revalidate-service.d.ts +2 -2
  340. package/dist/services/revalidate/{revalidate-service.spec.js → spec/revalidate-service.spec.js} +1 -1
  341. package/dist/services/setup/browser/browser-setup-service.d.ts +3 -5
  342. package/dist/services/setup/browser/browser-setup-service.js +16 -18
  343. package/dist/services/setup/difftool/difftool-setup-service.d.ts +3 -5
  344. package/dist/services/setup/difftool/difftool-setup-service.js +5 -7
  345. package/dist/services/setup/extension/extension-installer.d.ts +1 -1
  346. package/dist/services/setup/extension/extension-setup-service.d.ts +3 -5
  347. package/dist/services/setup/extension/extension-setup-service.js +8 -10
  348. package/dist/services/setup/index.d.ts +1 -1
  349. package/dist/services/setup/index.js +1 -1
  350. package/dist/services/setup/setup-service-build-context.d.ts +27 -0
  351. package/dist/services/setup/setup-service-build-context.js +26 -0
  352. package/dist/services/setup/setup-service-factory.d.ts +2 -4
  353. package/dist/services/setup/setup-service-factory.js +10 -17
  354. package/dist/services/setup/setup-service.d.ts +4 -6
  355. package/dist/services/setup/setup-service.js +6 -7
  356. package/dist/services/setup/{extension → spec/extension}/crx.spec.js +1 -1
  357. package/dist/services/setup/{extension → spec/extension}/webstore.spec.js +1 -1
  358. package/dist/services/setup/spec/os/tool-registry.spec.d.ts +1 -0
  359. package/dist/services/setup/{os → spec/os}/tool-registry.spec.js +1 -1
  360. package/oclif.manifest.json +1 -52
  361. package/package.json +6 -3
  362. package/dist/commands/document-handler.d.ts +0 -16
  363. package/dist/commands/document-handler.js +0 -32
  364. package/dist/helpers/cli-config.d.ts +0 -59
  365. package/dist/helpers/cli-config.js +0 -180
  366. package/dist/helpers/cli-config.spec.js +0 -117
  367. package/dist/helpers/customer-config.d.ts +0 -45
  368. package/dist/helpers/customer-config.js +0 -136
  369. package/dist/helpers/environment.d.ts +0 -15
  370. package/dist/helpers/environment.js +0 -40
  371. package/dist/helpers/environment.spec.js +0 -28
  372. package/dist/helpers/file-helper.d.ts +0 -8
  373. package/dist/helpers/file-helper.js +0 -28
  374. package/dist/helpers/is-directory.d.ts +0 -5
  375. package/dist/helpers/is-directory.js +0 -19
  376. package/dist/helpers/is-file.d.ts +0 -5
  377. package/dist/helpers/is-file.js +0 -19
  378. package/dist/helpers/logging-helper.d.ts +0 -15
  379. package/dist/helpers/logging-helper.js +0 -23
  380. package/dist/helpers/scrape.d.ts +0 -1
  381. package/dist/helpers/scrape.js +0 -8
  382. package/dist/helpers/speed-kit-rule-to-reg-exp.d.ts +0 -1
  383. package/dist/helpers/speed-kit-rule-to-reg-exp.js +0 -6
  384. package/dist/models/cli-parameters.js +0 -299
  385. package/dist/models/install.d.ts +0 -24
  386. package/dist/services/config-api/entity-manager-factory.d.ts +0 -5
  387. package/dist/services/config-api-service.d.ts +0 -21
  388. package/dist/services/config-api-service.js +0 -107
  389. package/dist/services/customer-config/customer-config-service-context.d.ts +0 -13
  390. package/dist/services/customer-config/customer-config-service-context.js +0 -21
  391. package/dist/services/deploy/context/deploy-context.d.ts +0 -32
  392. package/dist/services/deploy/context/deploy-context.js +0 -72
  393. package/dist/services/diff/diff-model.d.ts +0 -9
  394. package/dist/services/diff/diff-model.js +0 -12
  395. package/dist/services/diff-service.d.ts +0 -27
  396. package/dist/services/diff-service.js +0 -116
  397. package/dist/services/document-handler-runtime/context/document-handler-runtime-context.d.ts +0 -24
  398. package/dist/services/document-handler-runtime/context/document-handler-runtime-context.js +0 -62
  399. package/dist/services/document-handler-runtime/document-handler-runtime-service.d.ts +0 -31
  400. package/dist/services/document-handler-runtime/document-handler-runtime-service.js +0 -222
  401. package/dist/services/document-handler-runtime/interface/document-handler-runtime-config-interface.d.ts +0 -3
  402. package/dist/services/document-handler-runtime/interface/document-handler-runtime-config-interface.js +0 -3
  403. package/dist/services/document-handler-runtime/templates/execute-document-handler.d.ts +0 -6
  404. package/dist/services/document-handler-runtime/templates/execute-document-handler.js +0 -74
  405. package/dist/services/document-handler-runtime/templates/orestes-mock.d.ts +0 -9
  406. package/dist/services/document-handler-runtime/templates/orestes-mock.js +0 -166
  407. package/dist/services/document-handler-runtime/templates/package-json.d.ts +0 -6
  408. package/dist/services/document-handler-runtime/templates/package-json.js +0 -17
  409. package/dist/services/document-handler-runtime/templates/test.d.ts +0 -6
  410. package/dist/services/document-handler-runtime/templates/test.js +0 -64
  411. package/dist/services/origin-request/origin-request-context.d.ts +0 -13
  412. package/dist/services/origin-request/origin-request-context.js +0 -23
  413. package/dist/services/query-builder/query-command.d.ts +0 -28
  414. package/dist/services/query-builder/query-command.js +0 -37
  415. package/dist/services/setup/setup-context.d.ts +0 -14
  416. package/dist/services/setup/setup-context.js +0 -15
  417. /package/dist/helpers/{chrome-flags.spec.d.ts → spec/chrome-flags.spec.d.ts} +0 -0
  418. /package/dist/helpers/{origin-proxy.spec.d.ts → spec/origin-proxy.spec.d.ts} +0 -0
  419. /package/dist/hooks/{init → spec/init}/dns-result-order.spec.d.ts +0 -0
  420. /package/dist/hooks/{init → spec/init}/http1-global-dispatcher.spec.d.ts +0 -0
  421. /package/dist/services/athena/{athena-service.spec.d.ts → spec/athena-service.spec.d.ts} +0 -0
  422. /package/dist/services/athena/{baqend-athena-service.spec.d.ts → spec/baqend-athena-service.spec.d.ts} +0 -0
  423. /package/dist/services/browser-fetch/{browser-origin-fetch.spec.d.ts → spec/browser-origin-fetch.spec.d.ts} +0 -0
  424. /package/dist/services/browser-fetch/{browser-origin-fetcher.spec.d.ts → spec/browser-origin-fetcher.spec.d.ts} +0 -0
  425. /package/dist/services/browser-fetch/{browser-response.spec.d.ts → spec/browser-response.spec.d.ts} +0 -0
  426. /package/dist/services/browser-fetch/{device-emulation.spec.d.ts → spec/device-emulation.spec.d.ts} +0 -0
  427. /package/dist/services/bundler/{bundle-service.spec.d.ts → spec/bundle-service.spec.d.ts} +0 -0
  428. /package/dist/{helpers/cli-config.spec.d.ts → services/cli/command-build-context.js} +0 -0
  429. /package/dist/{helpers/environment.spec.d.ts → services/cli/spec/cli-environment-detection.spec.d.ts} +0 -0
  430. /package/dist/{models/cli-parameters.spec.d.ts → services/cli/spec/cli-environment.spec.d.ts} +0 -0
  431. /package/dist/services/cli/{cli-service.spec.d.ts → spec/cli-service.spec.d.ts} +0 -0
  432. /package/dist/{models/install.js → services/customer-config/site-analyzer/site-analyzer-model.js} +0 -0
  433. /package/dist/services/deploy/{bulk → spec/bulk}/bulk-deploy-service.spec.d.ts +0 -0
  434. /package/dist/services/deploy/{bulk → spec/bulk}/touched-configs.spec.d.ts +0 -0
  435. /package/dist/services/deploy/{checks → spec/checks}/activation/customer-approval-check.spec.d.ts +0 -0
  436. /package/dist/services/deploy/{checks → spec/checks}/post-deploy/refresh-deployment-job-check.spec.d.ts +0 -0
  437. /package/dist/services/deploy/{checks → spec/checks}/pre-deploy/split-change-check.spec.d.ts +0 -0
  438. /package/dist/services/deploy/{handler → spec/handler}/module-handler.spec.d.ts +0 -0
  439. /package/dist/services/deploy/{handler → spec/handler}/testing-installation-links.spec.d.ts +0 -0
  440. /package/dist/services/deploy/{mr → spec/mr}/live-state-check.spec.d.ts +0 -0
  441. /package/dist/services/deploy/{mr → spec/mr}/merge-request-description.spec.d.ts +0 -0
  442. /package/dist/services/deploy/{policy → spec/policy}/auto-deploy-policy.spec.d.ts +0 -0
  443. /package/dist/{helpers/html-format-helper.d.ts → services/diff/html-format.d.ts} +0 -0
  444. /package/dist/{helpers/html-format-helper.js → services/diff/html-format.js} +0 -0
  445. /package/dist/services/document-handler-runtime/{document-handler-abort.spec.d.ts → spec/document-handler-abort.spec.d.ts} +0 -0
  446. /package/dist/services/git/{git-repository.spec.d.ts → spec/git-repository.spec.d.ts} +0 -0
  447. /package/dist/{helpers → services/integration-api}/array-helper.d.ts +0 -0
  448. /package/dist/{helpers → services/integration-api}/array-helper.js +0 -0
  449. /package/dist/services/onboarding/{browser → spec/browser}/executable/headed-user-agent.spec.d.ts +0 -0
  450. /package/dist/services/onboarding/{empty-service-worker.spec.d.ts → spec/empty-service-worker.spec.d.ts} +0 -0
  451. /package/dist/services/onboarding/{onboarding-model.spec.d.ts → spec/onboarding-model.spec.d.ts} +0 -0
  452. /package/dist/services/onboarding/{virtual-orestes-app → spec/virtual-orestes-app}/crawler.spec.d.ts +0 -0
  453. /package/dist/services/onboarding/{virtual-orestes-app → spec/virtual-orestes-app}/origin-error-cause.spec.d.ts +0 -0
  454. /package/dist/{helpers → services/origin-request}/java-regex.d.ts +0 -0
  455. /package/dist/{helpers → services/origin-request}/java-regex.js +0 -0
  456. /package/dist/services/origin-request/{asset-variations.spec.d.ts → spec/asset-variations.spec.d.ts} +0 -0
  457. /package/dist/services/prewarm/{csv-reader.spec.d.ts → spec/csv-reader.spec.d.ts} +0 -0
  458. /package/dist/services/prewarm/{prewarm-targets.spec.d.ts → spec/prewarm-targets.spec.d.ts} +0 -0
  459. /package/dist/services/query-builder/{queries/spec → spec/queries}/golden-configs.d.ts +0 -0
  460. /package/dist/services/query-builder/{queries/spec → spec/queries}/golden-configs.js +0 -0
  461. /package/dist/services/query-builder/{queries/spec → spec/queries}/golden.spec.d.ts +0 -0
  462. /package/dist/services/query-builder/{queries/spec → spec/queries}/pops-query.spec.d.ts +0 -0
  463. /package/dist/services/query-builder/{queries/spec → spec/queries}/queries.spec.d.ts +0 -0
  464. /package/dist/services/query-builder/{queries/spec → spec/queries}/reported-bugs.spec.d.ts +0 -0
  465. /package/dist/services/query-builder/{query-builder-service.spec.d.ts → spec/query-builder-flags.spec.d.ts} +0 -0
  466. /package/dist/services/query-builder/{rules/spec/pattern-language.spec.d.ts → spec/query-builder-service.spec.d.ts} +0 -0
  467. /package/dist/services/query-builder/{rules/spec/rule-parser.spec.d.ts → spec/rules/pattern-language.spec.d.ts} +0 -0
  468. /package/dist/services/query-builder/{rules/spec/rule-reducer.spec.d.ts → spec/rules/rule-parser.spec.d.ts} +0 -0
  469. /package/dist/services/query-builder/{rules/spec/rule-relevance.spec.d.ts → spec/rules/rule-reducer.spec.d.ts} +0 -0
  470. /package/dist/services/query-builder/{rules/spec/rule-to-sql.spec.d.ts → spec/rules/rule-relevance.spec.d.ts} +0 -0
  471. /package/dist/services/query-builder/{rules/spec/runtime-semantics.spec.d.ts → spec/rules/rule-to-sql.spec.d.ts} +0 -0
  472. /package/dist/services/query-builder/{rules/spec/strip-parameters.spec.d.ts → spec/rules/runtime-semantics.spec.d.ts} +0 -0
  473. /package/dist/services/query-builder/{sql/spec/expression.spec.d.ts → spec/rules/strip-parameters.spec.d.ts} +0 -0
  474. /package/dist/services/query-builder/{sql/spec/format.spec.d.ts → spec/sql/expression.spec.d.ts} +0 -0
  475. /package/dist/services/query-builder/{sql/spec/predicate.spec.d.ts → spec/sql/format.spec.d.ts} +0 -0
  476. /package/dist/services/query-builder/{sql/spec/regex.spec.d.ts → spec/sql/predicate.spec.d.ts} +0 -0
  477. /package/dist/services/{revalidate/revalidate-service.spec.d.ts → query-builder/spec/sql/regex.spec.d.ts} +0 -0
  478. /package/dist/services/{setup/extension/crx.spec.d.ts → revalidate/spec/revalidate-service.spec.d.ts} +0 -0
  479. /package/dist/services/setup/{extension/webstore.spec.d.ts → spec/extension/crx.spec.d.ts} +0 -0
  480. /package/dist/services/setup/{os/tool-registry.spec.d.ts → spec/extension/webstore.spec.d.ts} +0 -0
@@ -1,19 +0,0 @@
1
- import { stat } from "node:fs/promises";
2
- /**
3
- * @deprecated
4
- * @param directory
5
- */
6
- export async function isDirectory(directory) {
7
- try {
8
- const stats = await stat(directory);
9
- return stats.isDirectory();
10
- }
11
- catch (error) {
12
- if (typeof error === "object" &&
13
- "code" in error &&
14
- error.code === "ENOENT") {
15
- return false;
16
- }
17
- throw error;
18
- }
19
- }
@@ -1,5 +0,0 @@
1
- /**
2
- * @deprecated
3
- * @param filename
4
- */
5
- export declare function isFile(filename: string): Promise<boolean>;
@@ -1,19 +0,0 @@
1
- import { stat } from "node:fs/promises";
2
- /**
3
- * @deprecated
4
- * @param filename
5
- */
6
- export async function isFile(filename) {
7
- try {
8
- const stats = await stat(filename);
9
- return stats.isFile();
10
- }
11
- catch (error) {
12
- if (typeof error === "object" &&
13
- "code" in error &&
14
- error.code === "ENOENT") {
15
- return false;
16
- }
17
- throw error;
18
- }
19
- }
@@ -1,15 +0,0 @@
1
- /**
2
- * Logs the given message 'green' in the console.
3
- * @deprecated
4
- */
5
- export declare function logInfo(message: string, ...optionalParameters: unknown[]): void;
6
- /**
7
- * Logs the given message 'red' in the console.
8
- * @deprecated
9
- */
10
- export declare function logError(message: string, ...optionalParameters: unknown[]): void;
11
- /**
12
- * Logs the given message 'yellow' in the console.
13
- * @deprecated
14
- */
15
- export declare function logWarning(message: string, ...optionalParameters: unknown[]): void;
@@ -1,23 +0,0 @@
1
- import chalk from "chalk";
2
- // TODO: use CliService instead
3
- /**
4
- * Logs the given message 'green' in the console.
5
- * @deprecated
6
- */
7
- export function logInfo(message, ...optionalParameters) {
8
- console.log(chalk.green(message), ...optionalParameters);
9
- }
10
- /**
11
- * Logs the given message 'red' in the console.
12
- * @deprecated
13
- */
14
- export function logError(message, ...optionalParameters) {
15
- console.log(chalk.red(message), ...optionalParameters);
16
- }
17
- /**
18
- * Logs the given message 'yellow' in the console.
19
- * @deprecated
20
- */
21
- export function logWarning(message, ...optionalParameters) {
22
- console.log(chalk.yellow(message), ...optionalParameters);
23
- }
@@ -1 +0,0 @@
1
- export default function scrape(url: string): Promise<string>;
@@ -1,8 +0,0 @@
1
- import { originFetch } from "./origin-proxy.js";
2
- export default async function scrape(url) {
3
- const response = await originFetch(url);
4
- if (response.status !== 200) {
5
- return null;
6
- }
7
- return response.text();
8
- }
@@ -1 +0,0 @@
1
- export declare function speedKitRuleToRegExp(url: string): RegExp;
@@ -1,6 +0,0 @@
1
- function escapeRegExp(string_) {
2
- return string_.replaceAll(/[\s#$()*+,.?[\\\]^{|}-]/g, "\\$&");
3
- }
4
- export function speedKitRuleToRegExp(url) {
5
- return new RegExp(`^${escapeRegExp(url).replaceAll("\\*", ".*")}$`);
6
- }
@@ -1,299 +0,0 @@
1
- import { Args, Flags } from "@oclif/core";
2
- // Imported from the modules rather than from the query-builder barrels: this
3
- // file is loaded by every command, and the rules barrel pulls in the automata
4
- // library.
5
- import { parseMatchPattern } from "../services/query-builder/rules/match-pattern.js";
6
- import { DEVICE_VARIATIONS } from "../services/query-builder/queries/device.js";
7
- import { DEFAULT_ATHENA_CATALOG } from "../services/athena/athena-service-model.js";
8
- export var CLIParameters;
9
- (function (CLIParameters) {
10
- CLIParameters["AppName"] = "app";
11
- CLIParameters["Artifacts"] = "artifacts";
12
- CLIParameters["ConfigName"] = "configName";
13
- CLIParameters["ContentTypes"] = "contentTypes";
14
- CLIParameters["Catalog"] = "catalog";
15
- CLIParameters["Cookies"] = "cookies";
16
- CLIParameters["Count"] = "count";
17
- CLIParameters["CreateTests"] = "CreateTests";
18
- CLIParameters["CustomerPath"] = "customerPath";
19
- CLIParameters["CustomersDirectory"] = "customersDirectory";
20
- CLIParameters["Days"] = "days";
21
- CLIParameters["Delay"] = "delay";
22
- CLIParameters["Device"] = "device";
23
- CLIParameters["Domain"] = "domain";
24
- CLIParameters["DryRun"] = "dryRun";
25
- CLIParameters["Execute"] = "execute";
26
- CLIParameters["BySet"] = "bySet";
27
- CLIParameters["ExcludeNoindex"] = "excludeNoindex";
28
- CLIParameters["ExcludeNotFound"] = "excludeNotFound";
29
- CLIParameters["ExcludeSuspicious"] = "excludeSuspicious";
30
- CLIParameters["Explain"] = "explain";
31
- CLIParameters["Group"] = "group";
32
- CLIParameters["HardNavigationsOnly"] = "hardNavigationsOnly";
33
- CLIParameters["HideDiff"] = "hideDiff";
34
- CLIParameters["Ips"] = "ips";
35
- CLIParameters["KeepParameterSorting"] = "keepParameterSorting";
36
- CLIParameters["Limit"] = "limit";
37
- CLIParameters["Match"] = "match";
38
- CLIParameters["MinHits"] = "minHits";
39
- CLIParameters["MinImpressions"] = "minImpressions";
40
- CLIParameters["Quiet"] = "quiet";
41
- CLIParameters["Mobile"] = "mobile";
42
- CLIParameters["PageUrl"] = "pageUrl";
43
- CLIParameters["Path"] = "path";
44
- CLIParameters["SlackToken"] = "slackToken";
45
- CLIParameters["TestId"] = "testId";
46
- CLIParameters["Urls"] = "urls";
47
- CLIParameters["Variation"] = "variation";
48
- CLIParameters["VariationPath"] = "variationPath";
49
- CLIParameters["Verbose"] = "verbose";
50
- CLIParameters["Workgroup"] = "workgroup";
51
- CLIParameters["useTestConfig"] = "useTestConfig";
52
- })(CLIParameters || (CLIParameters = {}));
53
- /* eslint-disable @typescript-eslint/no-duplicate-enum-values */
54
- export var CLIParametersChar;
55
- (function (CLIParametersChar) {
56
- CLIParametersChar["AppName"] = "a";
57
- CLIParametersChar["Artifacts"] = "a";
58
- CLIParametersChar["ConfigName"] = "c";
59
- CLIParametersChar["ContentTypes"] = "c";
60
- CLIParametersChar["Cookies"] = "c";
61
- CLIParametersChar["CreateTests"] = "t";
62
- CLIParametersChar["CustomerPath"] = "p";
63
- CLIParametersChar["CustomersDirectory"] = "d";
64
- CLIParametersChar["Days"] = "d";
65
- CLIParametersChar["Delay"] = "d";
66
- CLIParametersChar["Domain"] = "d";
67
- CLIParametersChar["DryRun"] = "d";
68
- CLIParametersChar["Execute"] = "e";
69
- CLIParametersChar["Group"] = "g";
70
- CLIParametersChar["HideDiff"] = "h";
71
- CLIParametersChar["Ips"] = "i";
72
- CLIParametersChar["KeepParameterSorting"] = "k";
73
- CLIParametersChar["Mobile"] = "m";
74
- CLIParametersChar["SlackToken"] = "t";
75
- CLIParametersChar["Path"] = "p";
76
- CLIParametersChar["Variation"] = "v";
77
- CLIParametersChar["VariationPath"] = "p";
78
- CLIParametersChar["Quiet"] = "q";
79
- CLIParametersChar["useTestConfig"] = "t";
80
- })(CLIParametersChar || (CLIParametersChar = {}));
81
- /* eslint-enable @typescript-eslint/no-duplicate-enum-values */
82
- export var CLIParametersExample;
83
- (function (CLIParametersExample) {
84
- CLIParametersExample["AppName"] = "decathlon";
85
- CLIParametersExample["Artifacts"] = "dynamic,SpeedKit";
86
- CLIParametersExample["ConfigName"] = "production";
87
- CLIParametersExample["ContentTypes"] = "image,style";
88
- CLIParametersExample["Cookies"] = "consentCookies";
89
- CLIParametersExample["CustomerPath"] = "customers/decathlon.de";
90
- CLIParametersExample["CustomersDirectory"] = "customers";
91
- CLIParametersExample["Delay"] = "1200";
92
- CLIParametersExample["Devices"] = "desktop,mobile";
93
- CLIParametersExample["Domain"] = "www.decathlon.de";
94
- CLIParametersExample["Group"] = "B";
95
- CLIParametersExample["Ips"] = "151.101.120.194";
96
- CLIParametersExample["Match"] = "^/p/";
97
- CLIParametersExample["Mobile"] = "Y";
98
- CLIParametersExample["PageUrl"] = "https://www.decathlon.de/";
99
- CLIParametersExample["Path"] = "C:\\Users\\testUser\\file.csv";
100
- CLIParametersExample["SlackToken"] = "someSlackToken";
101
- CLIParametersExample["TestId"] = "listing-50vs50";
102
- CLIParametersExample["Urls"] = "url1,url2,url3";
103
- CLIParametersExample["Variation"] = "MOBILE";
104
- CLIParametersExample["Variations"] = "MOBILE,DESKTOP";
105
- CLIParametersExample["VariationPath"] = "C:\\Users\\testUser\\variations.csv";
106
- })(CLIParametersExample || (CLIParametersExample = {}));
107
- export const CLI_CONFIG_NAME = {
108
- [CLIParameters.ConfigName]: Flags.string({
109
- char: CLIParametersChar.ConfigName,
110
- default: "production",
111
- description: "The costumer config name",
112
- required: false,
113
- }),
114
- };
115
- // to enable testMode for deploy and onboarding command
116
- // it will set the field app to the configured testApp
117
- // and name to the original configured app
118
- export const CLI_CONFIG_IS_TEST = {
119
- [CLIParameters.useTestConfig]: Flags.boolean({
120
- char: CLIParametersChar.useTestConfig,
121
- description: "Override app with configured testApp",
122
- }),
123
- };
124
- /** Shared wording, so every query command describes the window the same way. */
125
- export const CLI_QUERY_DAYS_DESCRIPTION = "Number of days the query looks back";
126
- /**
127
- * How far back a query looks. Its own object because `generate-pop-config`
128
- * takes it without the `-d` shorthand, which `--deploy` holds there.
129
- */
130
- export const CLI_QUERY_DAYS = {
131
- [CLIParameters.Days]: Flags.integer({
132
- char: CLIParametersChar.Days,
133
- description: CLI_QUERY_DAYS_DESCRIPTION,
134
- min: 1,
135
- required: false,
136
- }),
137
- };
138
- /**
139
- * What a query command does with the query it built. Both commands take them,
140
- * so a query can be piped or run without a detour through the clipboard.
141
- */
142
- export const CLI_QUERY_OUTPUT = {
143
- [CLIParameters.Execute]: Flags.boolean({
144
- char: CLIParametersChar.Execute,
145
- default: false,
146
- description: "Execute the query directly and write the result to a <app>-<date>-<query>.csv file",
147
- }),
148
- [CLIParameters.Quiet]: Flags.boolean({
149
- char: CLIParametersChar.Quiet,
150
- default: false,
151
- description: "Output only the raw query without clipboard copy or styling",
152
- }),
153
- };
154
- /**
155
- * Which page impressions a query leaves out, and whether to account for every
156
- * rule it does not carry over literally. Bots are always excluded.
157
- */
158
- export const CLI_QUERY_FILTERS = {
159
- [CLIParameters.ExcludeNoindex]: Flags.boolean({
160
- default: false,
161
- description: "Exclude page impressions of pages marked noindex",
162
- }),
163
- [CLIParameters.ExcludeSuspicious]: Flags.boolean({
164
- default: false,
165
- description: "Exclude page impressions Speed Kit classified as suspicious",
166
- }),
167
- [CLIParameters.Explain]: Flags.boolean({
168
- default: false,
169
- description: "Account for every rule the query leaves out, reduces or approximates",
170
- }),
171
- [CLIParameters.HardNavigationsOnly]: Flags.boolean({
172
- default: false,
173
- description: "Exclude soft (SPA) navigations",
174
- }),
175
- };
176
- /**
177
- * Which variation the pre-warm list carries per url, instead of leaving the
178
- * pre-warmer to request every url in every variation.
179
- *
180
- * The two flags answer the same question from two different sources — the
181
- * traffic, or the operator — so combining them would cross-produce the list
182
- * again, which is what they are there to stop. A command that also reads a
183
- * variations file from disk excludes that one on its own side.
184
- */
185
- export const CLI_QUERY_VARIATIONS = {
186
- [CLIParameters.Device]: Flags.string({
187
- delimiter: ",",
188
- description: "Split the list by device class, so every url is warmed in the variations it was actually requested in. A class not named is left out",
189
- exclusive: [CLIParameters.Variation],
190
- multiple: true,
191
- options: [...DEVICE_VARIATIONS],
192
- required: false,
193
- }),
194
- [CLIParameters.Variation]: Flags.string({
195
- char: CLIParametersChar.Variation,
196
- delimiter: ",",
197
- description: "Pair every url of the list with each of these variations. For the custom variations no traffic can reveal, e.g. 'desktop-pdp-a,mobile-pdp-a'",
198
- exclusive: [CLIParameters.Device],
199
- multiple: true,
200
- required: false,
201
- }),
202
- };
203
- /**
204
- * What the pre-warm query keeps of a long tail that is mostly seen once.
205
- *
206
- * Every flag here shapes the list itself, so a command that builds that list
207
- * takes all of them — `sk auto-prewarm` included, or a count could describe a
208
- * list the pre-warmer would never produce.
209
- */
210
- export const CLI_QUERY_PREWARM_LIST = {
211
- ...CLI_QUERY_VARIATIONS,
212
- [CLIParameters.ExcludeNotFound]: Flags.boolean({
213
- default: false,
214
- description: "Leave out urls the origin answers with a 404 more often than not",
215
- }),
216
- [CLIParameters.Limit]: Flags.integer({
217
- description: "Keep only the most requested urls",
218
- min: 1,
219
- required: false,
220
- }),
221
- [CLIParameters.Match]: Flags.string({
222
- description: "Keep only urls whose path matches this regular expression, e.g. '^/p/'. The path is matched with its query string, the way a version 1 pathname rule matches it, so '[?&]size=' works too. Repeat the flag to keep the urls matching any of several patterns, and start a pattern with (?i) to match case-insensitively",
223
- multiple: true,
224
- parse: async (input) => {
225
- try {
226
- parseMatchPattern(input);
227
- }
228
- catch (error) {
229
- throw new Error(`--match ${input} is not a regular expression: ${error.message}`, { cause: error });
230
- }
231
- return input;
232
- },
233
- required: false,
234
- }),
235
- [CLIParameters.MinHits]: Flags.integer({
236
- description: "Keep only urls requested at least this often in the window",
237
- min: 1,
238
- required: false,
239
- }),
240
- };
241
- /**
242
- * The pre-warm query flags in full: the list-shaping ones plus `--count`, which
243
- * reports the list's size instead of returning it. Only a command that can
244
- * answer with a count takes this one — `sk auto-prewarm` warms the list, so it
245
- * takes {@link CLI_QUERY_PREWARM_LIST} instead.
246
- */
247
- export const CLI_QUERY_PREWARM = {
248
- ...CLI_QUERY_PREWARM_LIST,
249
- [CLIParameters.Count]: Flags.boolean({
250
- default: false,
251
- description: "Run the query and report how large the list is instead of what is in it: urls, the impressions they stand for, and a row per variation where the list carries variations. Every other flag still applies, so this counts the list the same command would produce",
252
- exclusive: [CLIParameters.Execute],
253
- }),
254
- };
255
- /**
256
- * Where a query that is executed actually runs.
257
- *
258
- * The catalog is the account's, not the query's: our own logins reach the rum
259
- * tables under `live`, while a role scoped to one account reaches the same
260
- * tables under `AwsDataCatalog`. `SK_ATHENA_CATALOG` lets a CI job say so once.
261
- *
262
- * Athena resolves the account's default workgroup when none is named, which is
263
- * only right where the credentials are allowed to use it — a role scoped to one
264
- * workgroup is refused on any other, and the result location is a workgroup
265
- * setting too. `SK_ATHENA_WORKGROUP` lets a CI job set it once for every
266
- * command in the job.
267
- */
268
- export const CLI_ATHENA = {
269
- [CLIParameters.Catalog]: Flags.string({
270
- default: DEFAULT_ATHENA_CATALOG,
271
- description: "Athena data catalog holding the rum tables. Names the catalog both in the query and in the context it runs in, so the two always agree",
272
- env: "SK_ATHENA_CATALOG",
273
- required: false,
274
- }),
275
- [CLIParameters.Workgroup]: Flags.string({
276
- description: "Athena workgroup to run the query in, e.g. 'prewarming'. Defaults to the account's default workgroup",
277
- env: "SK_ATHENA_WORKGROUP",
278
- required: false,
279
- }),
280
- };
281
- /** How the parameter query presents what it found. */
282
- export const CLI_QUERY_PARAMETER = {
283
- [CLIParameters.BySet]: Flags.boolean({
284
- default: false,
285
- description: "Rank whole sets of parameters instead of single parameters, to see which ones travel together",
286
- }),
287
- [CLIParameters.MinImpressions]: Flags.integer({
288
- description: "Leave out parameters seen on fewer page impressions than this",
289
- min: 1,
290
- required: false,
291
- }),
292
- };
293
- export const CLI_CUSTOMER_CONFIG = {
294
- [CLIParameters.CustomerPath]: Args.directory({
295
- name: CLIParameters.CustomerPath,
296
- required: true,
297
- description: "The customer config path",
298
- }),
299
- };
@@ -1,24 +0,0 @@
1
- export interface InstallConfigs<T> {
2
- config: T;
3
- custom: T;
4
- sw: T;
5
- loader: T;
6
- dynamicFetcher: T;
7
- dynamicFetcherConfig: T;
8
- documentHandler: T;
9
- documentHandlerConfig: T;
10
- customStyle: T;
11
- }
12
- export default interface Install extends Partial<InstallConfigs<string>> {
13
- id?: string;
14
- version?: number;
15
- acl?: string;
16
- createdAt?: Date;
17
- updatedAt?: Date;
18
- status?: string;
19
- swVersion?: string;
20
- domain: string;
21
- configVersion?: number;
22
- description?: string;
23
- origins?: string[];
24
- }
@@ -1,5 +0,0 @@
1
- import { EntityManager } from "baqend";
2
- export declare class EntityManagerFactory {
3
- EntityManager: EntityManager;
4
- getEntityManager(app: string): Promise<EntityManager>;
5
- }
@@ -1,21 +0,0 @@
1
- import { EntityManager } from "baqend";
2
- import Install from "../models/install.js";
3
- /**
4
- * @deprecated
5
- */
6
- export default class ConfigApiService {
7
- private db;
8
- private readonly app;
9
- private readonly requestInit;
10
- constructor(database: EntityManager, app: string);
11
- fetchActiveInstall(configName: string): Promise<Install | null>;
12
- activateInstall(install: Install): Promise<Install>;
13
- updateInstall(install: Install): Promise<Install | null>;
14
- createNewInstall(domain: string, origins: string[]): Promise<Install>;
15
- cloneInstall(install: Install): Promise<Install>;
16
- getRemoteModule(moduleName: string): Promise<string>;
17
- saveRemoteModule(moduleCode: string, moduleName: string): Promise<string>;
18
- getRemoteServerConfig(): Promise<string>;
19
- saveRemoteServerConfig(localPath: string, configurationVersion: string): Promise<void>;
20
- fetchAndGetBody<T>(url: string, requestInit?: NonNullable<unknown>): Promise<T>;
21
- }
@@ -1,107 +0,0 @@
1
- import * as fs from "fs-extra";
2
- import fetch from "node-fetch";
3
- import https from "node:https";
4
- const agent = new https.Agent({
5
- rejectUnauthorized: false,
6
- keepAlive: true,
7
- });
8
- /**
9
- * @deprecated
10
- */
11
- export default class ConfigApiService {
12
- db;
13
- app;
14
- requestInit;
15
- constructor(database, app) {
16
- this.db = database;
17
- this.app = app;
18
- this.requestInit = {
19
- agent,
20
- method: "GET",
21
- headers: {
22
- Host: `${this.app}.app.baqend.com`,
23
- authorization: `BAT ${this.db.token}`,
24
- "Content-Type": "application/json;charset=UTF-8",
25
- },
26
- timeout: 10_000,
27
- };
28
- }
29
- async fetchActiveInstall(configName) {
30
- const urlPath = `https://${this.app}.app.baqend.com/v1/speedkit/installation?domain=${configName}&status=active`;
31
- const body = await this.fetchAndGetBody(urlPath);
32
- return body[0];
33
- }
34
- async activateInstall(install) {
35
- const activateUrl = `https://${this.app}.app.baqend.com/v1/speedkit/installation/${install.domain}/${install.configVersion}/activate`;
36
- const postInit = Object.assign({}, this.requestInit, {
37
- body: "{}",
38
- method: "POST",
39
- });
40
- return (await this.fetchAndGetBody(activateUrl, postInit));
41
- }
42
- // Update live version with the osk local body
43
- async updateInstall(install) {
44
- const postInit = Object.assign({}, this.requestInit, {
45
- body: JSON.stringify(install),
46
- method: "PUT",
47
- });
48
- const updateUrl = `https://${this.app}.app.baqend.com/v1/speedkit/installation/${install.domain}/${install.configVersion}`;
49
- return (await this.fetchAndGetBody(updateUrl, postInit));
50
- }
51
- async createNewInstall(domain, origins) {
52
- const postInit = Object.assign({}, this.requestInit, {
53
- body: `{origins: ${JSON.stringify(origins)}}`,
54
- method: "POST",
55
- });
56
- const updateUrl = `https://${this.app}.app.baqend.com/v1/speedkit/installation/${domain}`;
57
- const body = await this.fetchAndGetBody(updateUrl, postInit);
58
- return body;
59
- }
60
- async cloneInstall(install) {
61
- const postInit = Object.assign({}, this.requestInit, {
62
- body: "{}",
63
- method: "POST",
64
- });
65
- const cloneUrl = `https://${this.app}.app.baqend.com/v1/speedkit/installation/${install.domain}/${install.configVersion}/clone`;
66
- const body = await this.fetchAndGetBody(cloneUrl, postInit);
67
- return body;
68
- }
69
- async getRemoteModule(moduleName) {
70
- return await this.db.code.loadCode(moduleName, "module");
71
- }
72
- async saveRemoteModule(moduleCode, moduleName) {
73
- return await this.db.code.saveCode(moduleName, "module", moduleCode);
74
- }
75
- async getRemoteServerConfig() {
76
- const urlPath = `https://${this.app}.app.baqend.com/v1/config`;
77
- const body = await this.fetchAndGetBody(urlPath);
78
- return JSON.stringify(body, null, "\t");
79
- }
80
- async saveRemoteServerConfig(localPath, configurationVersion) {
81
- const localServerConfigContent = fs.readFileSync(localPath, "utf-8");
82
- const localServerConfig = JSON.parse(localServerConfigContent);
83
- localServerConfig.revision.version = configurationVersion;
84
- const urlPath = `https://${this.app}.app.baqend.com/v1/config`;
85
- const putInit = Object.assign({}, this.requestInit, {
86
- body: JSON.stringify(localServerConfig),
87
- method: "PUT",
88
- headers: {
89
- Host: `${this.app}.app.baqend.com`,
90
- // Origin: "origin",
91
- authorization: `BAT ${this.db.token}`,
92
- "Content-Type": "application/json",
93
- "If-Match": configurationVersion,
94
- },
95
- });
96
- await this.fetchAndGetBody(urlPath, putInit);
97
- }
98
- async fetchAndGetBody(url, requestInit = this.requestInit) {
99
- const response = await fetch(url, requestInit);
100
- const body = await response.json();
101
- if (response.status !== 200) {
102
- // @ts-expect-error unknown message in body
103
- throw new Error(body.message);
104
- }
105
- return body;
106
- }
107
- }
@@ -1,13 +0,0 @@
1
- export declare class CustomerConfigServiceContext {
2
- appName: string;
3
- customersDirectory: string;
4
- /** Explicit templates/ root; overrides checkout detection and the remote fetch. */
5
- templatesPath?: string;
6
- /** Template set = wizard mode: "customer-config" (default) or "pre-poc". */
7
- mode: string;
8
- constructor(appName?: string, customersDirectory?: string,
9
- /** Explicit templates/ root; overrides checkout detection and the remote fetch. */
10
- templatesPath?: string,
11
- /** Template set = wizard mode: "customer-config" (default) or "pre-poc". */
12
- mode?: string);
13
- }
@@ -1,21 +0,0 @@
1
- import { CLIParametersExample } from "../../models/cli-parameters.js";
2
- export class CustomerConfigServiceContext {
3
- appName;
4
- customersDirectory;
5
- templatesPath;
6
- mode;
7
- constructor(appName = "", customersDirectory = CLIParametersExample.CustomersDirectory,
8
- /** Explicit templates/ root; overrides checkout detection and the remote fetch. */
9
- templatesPath,
10
- /** Template set = wizard mode: "customer-config" (default) or "pre-poc". */
11
- mode = "customer-config") {
12
- this.appName = appName;
13
- this.customersDirectory = customersDirectory;
14
- this.templatesPath = templatesPath;
15
- this.mode = mode;
16
- this.appName = appName;
17
- this.customersDirectory = customersDirectory;
18
- this.templatesPath = templatesPath;
19
- this.mode = mode;
20
- }
21
- }
@@ -1,32 +0,0 @@
1
- import { Command } from "@oclif/core/command";
2
- export default class DeployContext {
3
- readonly customerPath: string;
4
- readonly configName: string;
5
- readonly dryRun: boolean;
6
- readonly useTestConfig: boolean;
7
- /** Leave out the modules and the server config, which a bulk never deploys. */
8
- readonly installFilesOnly: boolean;
9
- /**
10
- * Leave out the checks that run after the upload. Each of them asks the
11
- * app for its jobs and its modules, which a run over many customers pays
12
- * for once per customer.
13
- */
14
- readonly skipPostDeployChecks: boolean;
15
- /** Open the diff tool for a file that differs, as a person expects. */
16
- readonly opensDiffTool: boolean;
17
- static flags: Record<string, Command.Flag>;
18
- readonly artifacts?: string[];
19
- readonly isProduction: boolean;
20
- constructor(customerPath: string, configName?: string, artifacts?: string, dryRun?: boolean, useTestConfig?: boolean,
21
- /** Leave out the modules and the server config, which a bulk never deploys. */
22
- installFilesOnly?: boolean,
23
- /**
24
- * Leave out the checks that run after the upload. Each of them asks the
25
- * app for its jobs and its modules, which a run over many customers pays
26
- * for once per customer.
27
- */
28
- skipPostDeployChecks?: boolean,
29
- /** Open the diff tool for a file that differs, as a person expects. */
30
- opensDiffTool?: boolean);
31
- hasArtifacts(): boolean;
32
- }