@speedkit/cli 3.43.2 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (413) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/README.md +6 -6
  3. package/bin/dev +2 -15
  4. package/bin/run +2 -2
  5. package/dist/commands/build-parameter-query.d.ts +3 -3
  6. package/dist/commands/build-parameter-query.js +12 -15
  7. package/dist/commands/build-prewarm-query.d.ts +4 -4
  8. package/dist/commands/build-prewarm-query.js +13 -16
  9. package/dist/commands/config/edit.js +7 -11
  10. package/dist/commands/deploy.d.ts +3 -5
  11. package/dist/commands/deploy.js +12 -16
  12. package/dist/commands/diff-url-parameters.d.ts +3 -3
  13. package/dist/commands/diff-url-parameters.js +27 -30
  14. package/dist/commands/document-handler.d.ts +4 -4
  15. package/dist/commands/document-handler.js +13 -17
  16. package/dist/commands/find-pops.d.ts +2 -2
  17. package/dist/commands/find-pops.js +22 -24
  18. package/dist/commands/generate-customer-config.d.ts +2 -2
  19. package/dist/commands/generate-customer-config.js +13 -16
  20. package/dist/commands/generate-pop-config.d.ts +7 -7
  21. package/dist/commands/generate-pop-config.js +32 -41
  22. package/dist/commands/login.d.ts +1 -1
  23. package/dist/commands/login.js +13 -17
  24. package/dist/commands/onboarding.d.ts +3 -5
  25. package/dist/commands/onboarding.js +10 -13
  26. package/dist/commands/prewarm.d.ts +9 -9
  27. package/dist/commands/prewarm.js +25 -28
  28. package/dist/commands/pull.d.ts +3 -3
  29. package/dist/commands/pull.js +11 -14
  30. package/dist/commands/wpt-launcher.d.ts +7 -7
  31. package/dist/commands/wpt-launcher.js +21 -26
  32. package/dist/helpers/array-helper.js +1 -4
  33. package/dist/helpers/build-query-helper.js +5 -12
  34. package/dist/helpers/cli-config.d.ts +3 -3
  35. package/dist/helpers/cli-config.js +11 -16
  36. package/dist/helpers/customer-config.d.ts +4 -8
  37. package/dist/helpers/customer-config.js +18 -23
  38. package/dist/helpers/evaluate-speed-kit-config.d.ts +1 -1
  39. package/dist/helpers/evaluate-speed-kit-config.js +42 -26
  40. package/dist/helpers/file-helper.js +8 -13
  41. package/dist/helpers/get-parsed-config.d.ts +1 -1
  42. package/dist/helpers/get-parsed-config.js +6 -10
  43. package/dist/helpers/html-format-helper.js +3 -6
  44. package/dist/helpers/is-directory.js +3 -6
  45. package/dist/helpers/is-file.js +3 -6
  46. package/dist/helpers/logging-helper.js +7 -13
  47. package/dist/helpers/normalize.js +10 -17
  48. package/dist/helpers/race.d.ts +1 -1
  49. package/dist/helpers/race.js +3 -9
  50. package/dist/helpers/safe.js +1 -4
  51. package/dist/helpers/scrape.d.ts +1 -1
  52. package/dist/helpers/scrape.js +3 -7
  53. package/dist/helpers/site-analyzer.js +5 -9
  54. package/dist/helpers/speed-kit-rule-to-reg-exp.js +1 -4
  55. package/dist/models/cli-parameters.d.ts +4 -4
  56. package/dist/models/cli-parameters.js +13 -16
  57. package/dist/models/files.js +1 -4
  58. package/dist/models/install.js +1 -2
  59. package/dist/models/os.js +1 -4
  60. package/dist/services/athena/athena-service-factory.d.ts +1 -1
  61. package/dist/services/athena/athena-service-factory.js +15 -19
  62. package/dist/services/athena/athena-service-model.js +2 -5
  63. package/dist/services/athena/athena-service.d.ts +1 -1
  64. package/dist/services/athena/athena-service.js +18 -23
  65. package/dist/services/athena/error/athena-query-error.d.ts +1 -1
  66. package/dist/services/athena/error/athena-query-error.js +2 -7
  67. package/dist/services/athena/error/fetch-credentials-error.d.ts +1 -1
  68. package/dist/services/athena/error/fetch-credentials-error.js +2 -7
  69. package/dist/services/athena/index.d.ts +4 -4
  70. package/dist/services/athena/index.js +4 -7
  71. package/dist/services/bundler/bundle-service-factory.d.ts +3 -1
  72. package/dist/services/bundler/bundle-service-factory.js +7 -7
  73. package/dist/services/bundler/bundle-service.d.ts +9 -12
  74. package/dist/services/bundler/bundle-service.js +42 -32
  75. package/dist/services/bundler/error/bundle-fetch-error.d.ts +1 -1
  76. package/dist/services/bundler/error/bundle-fetch-error.js +2 -7
  77. package/dist/services/bundler/error/bundle-resolve-error.d.ts +1 -1
  78. package/dist/services/bundler/error/bundle-resolve-error.js +2 -7
  79. package/dist/services/bundler/index.d.ts +2 -2
  80. package/dist/services/bundler/index.js +2 -5
  81. package/dist/services/cli/cli-service-factory.d.ts +2 -2
  82. package/dist/services/cli/cli-service-factory.js +6 -10
  83. package/dist/services/cli/cli-service-model.d.ts +21 -6
  84. package/dist/services/cli/cli-service-model.js +3 -7
  85. package/dist/services/cli/cli-service.d.ts +10 -8
  86. package/dist/services/cli/cli-service.js +64 -61
  87. package/dist/services/cli/error/cli-type-error.js +1 -4
  88. package/dist/services/cli/index.d.ts +3 -3
  89. package/dist/services/cli/index.js +3 -6
  90. package/dist/services/config-api/client.d.ts +2 -2
  91. package/dist/services/config-api/client.js +29 -34
  92. package/dist/services/config-api/config-api-factory.d.ts +2 -2
  93. package/dist/services/config-api/config-api-factory.js +15 -20
  94. package/dist/services/config-api/config-api-model.d.ts +2 -2
  95. package/dist/services/config-api/config-api-model.js +1 -5
  96. package/dist/services/config-api/config-api-service.d.ts +2 -2
  97. package/dist/services/config-api/config-api-service.js +1 -5
  98. package/dist/services/config-api/entity-manager-factory.js +3 -7
  99. package/dist/services/config-api/error/json-response-error.d.ts +1 -1
  100. package/dist/services/config-api/error/json-response-error.js +2 -7
  101. package/dist/services/config-api/error/login-error.d.ts +1 -1
  102. package/dist/services/config-api/error/login-error.js +2 -7
  103. package/dist/services/config-api/error/orestes-api-error.d.ts +1 -1
  104. package/dist/services/config-api/error/orestes-api-error.js +2 -7
  105. package/dist/services/config-api/index.d.ts +3 -3
  106. package/dist/services/config-api/index.js +3 -6
  107. package/dist/services/config-api-service.d.ts +1 -1
  108. package/dist/services/config-api-service.js +6 -11
  109. package/dist/services/customer-config/customer-config-service-context.js +3 -7
  110. package/dist/services/customer-config/customer-config-service-factory.d.ts +1 -1
  111. package/dist/services/customer-config/customer-config-service-factory.js +6 -10
  112. package/dist/services/customer-config/customer-config-service-model.js +6 -9
  113. package/dist/services/customer-config/customer-config-service.d.ts +3 -3
  114. package/dist/services/customer-config/customer-config-service.js +55 -55
  115. package/dist/services/customer-config/index.d.ts +4 -4
  116. package/dist/services/customer-config/index.js +4 -7
  117. package/dist/services/customer-config/templates/config_documentHandler.js.hbs +88 -1
  118. package/dist/services/deploy/builder/install-resource-builder.d.ts +2 -2
  119. package/dist/services/deploy/builder/install-resource-builder.js +3 -7
  120. package/dist/services/deploy/checks/post-deploy/deprecated-deployment-detection-check.d.ts +4 -4
  121. package/dist/services/deploy/checks/post-deploy/deprecated-deployment-detection-check.js +19 -24
  122. package/dist/services/deploy/checks/post-deploy/revalidated-module-check.d.ts +3 -3
  123. package/dist/services/deploy/checks/post-deploy/revalidated-module-check.js +10 -14
  124. package/dist/services/deploy/checks/post-deploy/save-files-check.d.ts +3 -3
  125. package/dist/services/deploy/checks/post-deploy/save-files-check.js +8 -12
  126. package/dist/services/deploy/checks/pre-deploy/device-detection-changed-check.d.ts +3 -3
  127. package/dist/services/deploy/checks/pre-deploy/device-detection-changed-check.js +14 -20
  128. package/dist/services/deploy/checks/pre-deploy/split-change-check.d.ts +3 -3
  129. package/dist/services/deploy/checks/pre-deploy/split-change-check.js +19 -20
  130. package/dist/services/deploy/context/deploy-context.d.ts +2 -2
  131. package/dist/services/deploy/context/deploy-context.js +10 -14
  132. package/dist/services/deploy/deploy-service-factory.d.ts +3 -3
  133. package/dist/services/deploy/deploy-service-factory.js +36 -40
  134. package/dist/services/deploy/deploy-service-model.d.ts +10 -10
  135. package/dist/services/deploy/deploy-service-model.js +1 -2
  136. package/dist/services/deploy/deploy-service.d.ts +4 -4
  137. package/dist/services/deploy/deploy-service.js +10 -15
  138. package/dist/services/deploy/error/check-module-file-error.d.ts +1 -1
  139. package/dist/services/deploy/error/check-module-file-error.js +2 -7
  140. package/dist/services/deploy/error/deploy-install-resource-error.d.ts +1 -1
  141. package/dist/services/deploy/error/deploy-install-resource-error.js +2 -7
  142. package/dist/services/deploy/error/deploy-module-file-error.d.ts +1 -1
  143. package/dist/services/deploy/error/deploy-module-file-error.js +2 -7
  144. package/dist/services/deploy/error/deploy-server-config-error.d.ts +1 -1
  145. package/dist/services/deploy/error/deploy-server-config-error.js +2 -7
  146. package/dist/services/deploy/error/evaluate-sk-config-error.d.ts +1 -1
  147. package/dist/services/deploy/error/evaluate-sk-config-error.js +2 -7
  148. package/dist/services/deploy/error/file-handler-error.d.ts +1 -1
  149. package/dist/services/deploy/error/file-handler-error.js +2 -7
  150. package/dist/services/deploy/error/post-deploy-deployment-detection-error.d.ts +1 -1
  151. package/dist/services/deploy/error/post-deploy-deployment-detection-error.js +2 -7
  152. package/dist/services/deploy/error/safe-file-error.d.ts +1 -1
  153. package/dist/services/deploy/error/safe-file-error.js +2 -7
  154. package/dist/services/deploy/handler/customer-config-handler.d.ts +6 -6
  155. package/dist/services/deploy/handler/customer-config-handler.js +6 -10
  156. package/dist/services/deploy/handler/install-resource-handler.d.ts +7 -7
  157. package/dist/services/deploy/handler/install-resource-handler.js +22 -27
  158. package/dist/services/deploy/handler/install-resource-modifier/deleted-file-check.d.ts +4 -4
  159. package/dist/services/deploy/handler/install-resource-modifier/deleted-file-check.js +1 -4
  160. package/dist/services/deploy/handler/module-handler.d.ts +6 -6
  161. package/dist/services/deploy/handler/module-handler.js +12 -18
  162. package/dist/services/deploy/handler/server-config-handler.d.ts +5 -5
  163. package/dist/services/deploy/handler/server-config-handler.js +10 -14
  164. package/dist/services/deploy/interface/deploy-handler-interface.d.ts +1 -1
  165. package/dist/services/deploy/interface/deploy-handler-interface.js +1 -2
  166. package/dist/services/deploy/interface/install-configs.js +1 -2
  167. package/dist/services/deploy/interface/install-resource-processor-interface.d.ts +1 -1
  168. package/dist/services/deploy/interface/install-resource-processor-interface.js +1 -2
  169. package/dist/services/deploy/interface/install.d.ts +1 -1
  170. package/dist/services/deploy/interface/install.js +1 -2
  171. package/dist/services/deploy/interface/runtime-modifier.d.ts +1 -1
  172. package/dist/services/deploy/interface/runtime-modifier.js +1 -2
  173. package/dist/services/deploy/interface/validate-origins-response.js +1 -2
  174. package/dist/services/diff/diff-model.js +1 -5
  175. package/dist/services/diff/diff-service-factory.d.ts +1 -1
  176. package/dist/services/diff/diff-service-factory.js +6 -10
  177. package/dist/services/diff/diff-service.d.ts +1 -1
  178. package/dist/services/diff/diff-service.js +19 -24
  179. package/dist/services/diff/index.d.ts +3 -3
  180. package/dist/services/diff/index.js +3 -6
  181. package/dist/services/diff-service.d.ts +1 -1
  182. package/dist/services/diff-service.js +16 -21
  183. package/dist/services/document-handler-runtime/context/document-handler-runtime-context.js +30 -34
  184. package/dist/services/document-handler-runtime/document-handler-runtime-service.d.ts +3 -3
  185. package/dist/services/document-handler-runtime/document-handler-runtime-service.js +38 -42
  186. package/dist/services/document-handler-runtime/document-handler-server.d.ts +7 -11
  187. package/dist/services/document-handler-runtime/document-handler-server.js +77 -59
  188. package/dist/services/document-handler-runtime/error/required-file-not-found-error.js +1 -4
  189. package/dist/services/document-handler-runtime/factory/document-handler-runtime-service-factory.d.ts +5 -5
  190. package/dist/services/document-handler-runtime/factory/document-handler-runtime-service-factory.js +42 -46
  191. package/dist/services/document-handler-runtime/interface/document-handler-runtime-config-interface.js +1 -4
  192. package/dist/services/document-handler-runtime/interface/template-context-interface.d.ts +2 -3
  193. package/dist/services/document-handler-runtime/interface/template-context-interface.js +1 -2
  194. package/dist/services/document-handler-runtime/interface/template-interface.d.ts +2 -2
  195. package/dist/services/document-handler-runtime/interface/template-interface.js +1 -2
  196. package/dist/services/document-handler-runtime/interface/template-parameter-interface.js +1 -2
  197. package/dist/services/document-handler-runtime/server/document-handler-response.d.ts +1 -3
  198. package/dist/services/document-handler-runtime/server/document-handler-response.js +1 -5
  199. package/dist/services/document-handler-runtime/server/request.d.ts +4 -10
  200. package/dist/services/document-handler-runtime/server/request.js +1 -5
  201. package/dist/services/document-handler-runtime/templates/abstract-template.d.ts +3 -3
  202. package/dist/services/document-handler-runtime/templates/abstract-template.js +3 -7
  203. package/dist/services/document-handler-runtime/templates/database-mock.d.ts +2 -2
  204. package/dist/services/document-handler-runtime/templates/database-mock.js +2 -6
  205. package/dist/services/document-handler-runtime/templates/execute-document-handler.d.ts +2 -2
  206. package/dist/services/document-handler-runtime/templates/execute-document-handler.js +2 -6
  207. package/dist/services/document-handler-runtime/templates/orestes-mock.d.ts +2 -2
  208. package/dist/services/document-handler-runtime/templates/orestes-mock.js +2 -6
  209. package/dist/services/document-handler-runtime/templates/package-json.d.ts +3 -5
  210. package/dist/services/document-handler-runtime/templates/package-json.js +2 -6
  211. package/dist/services/document-handler-runtime/templates/test.d.ts +2 -2
  212. package/dist/services/document-handler-runtime/templates/test.js +2 -6
  213. package/dist/services/error-handling/error/application-error.d.ts +1 -1
  214. package/dist/services/error-handling/error/application-error.js +1 -5
  215. package/dist/services/error-handling/error/config-file-error.d.ts +1 -1
  216. package/dist/services/error-handling/error/config-file-error.js +2 -7
  217. package/dist/services/error-handling/error/connection-error.d.ts +1 -1
  218. package/dist/services/error-handling/error/connection-error.js +2 -7
  219. package/dist/services/integration-api/error/customer-config-error.d.ts +1 -1
  220. package/dist/services/integration-api/error/customer-config-error.js +2 -5
  221. package/dist/services/integration-api/error/customer-config-legacy-error.d.ts +1 -1
  222. package/dist/services/integration-api/error/customer-config-legacy-error.js +2 -6
  223. package/dist/services/integration-api/error/invalid-config-format-error.d.ts +1 -1
  224. package/dist/services/integration-api/error/invalid-config-format-error.js +4 -7
  225. package/dist/services/integration-api/error/mandatory-file-missing-error.d.ts +1 -1
  226. package/dist/services/integration-api/error/mandatory-file-missing-error.js +2 -6
  227. package/dist/services/integration-api/error/origin-error.d.ts +1 -1
  228. package/dist/services/integration-api/error/origin-error.js +2 -5
  229. package/dist/services/integration-api/error/read-files-error.d.ts +1 -1
  230. package/dist/services/integration-api/error/read-files-error.js +2 -7
  231. package/dist/services/integration-api/external/external-file-reader.d.ts +1 -1
  232. package/dist/services/integration-api/external/external-file-reader.js +9 -14
  233. package/dist/services/integration-api/file-list.d.ts +1 -1
  234. package/dist/services/integration-api/file-list.js +8 -11
  235. package/dist/services/integration-api/file-reader.js +11 -15
  236. package/dist/services/integration-api/file-writer.js +4 -8
  237. package/dist/services/integration-api/handler/customer-config-handler.d.ts +5 -5
  238. package/dist/services/integration-api/handler/customer-config-handler.js +17 -21
  239. package/dist/services/integration-api/handler/file-handler.d.ts +2 -2
  240. package/dist/services/integration-api/handler/file-handler.js +1 -4
  241. package/dist/services/integration-api/handler/install-resource-handler.d.ts +2 -2
  242. package/dist/services/integration-api/handler/install-resource-handler.js +6 -10
  243. package/dist/services/integration-api/handler/module-handler.d.ts +2 -2
  244. package/dist/services/integration-api/handler/module-handler.js +4 -8
  245. package/dist/services/integration-api/handler/server-config-handler.d.ts +2 -2
  246. package/dist/services/integration-api/handler/server-config-handler.js +4 -8
  247. package/dist/services/integration-api/index.d.ts +3 -3
  248. package/dist/services/integration-api/index.js +3 -6
  249. package/dist/services/integration-api/integration-api-factory.d.ts +3 -3
  250. package/dist/services/integration-api/integration-api-factory.js +23 -28
  251. package/dist/services/integration-api/integration-api-model.d.ts +17 -19
  252. package/dist/services/integration-api/integration-api-model.js +16 -21
  253. package/dist/services/integration-api/integration-api-service.d.ts +5 -5
  254. package/dist/services/integration-api/integration-api-service.js +6 -12
  255. package/dist/services/integration-api/spec/customer-config-validator.spec.js +29 -32
  256. package/dist/services/integration-api/spec/file-list.spec.js +107 -110
  257. package/dist/services/integration-api/spec/file-reader.spec.js +27 -30
  258. package/dist/services/integration-api/spec/file-writer.spec.js +34 -37
  259. package/dist/services/integration-api/spec/integration-api-service.spec.js +42 -45
  260. package/dist/services/integration-api/spec/mandatory-files-validator.spec.js +48 -51
  261. package/dist/services/integration-api/struct/customer-config-file.d.ts +1 -1
  262. package/dist/services/integration-api/struct/customer-config-file.js +10 -15
  263. package/dist/services/integration-api/struct/customer-config.d.ts +4 -8
  264. package/dist/services/integration-api/struct/customer-config.js +5 -10
  265. package/dist/services/integration-api/struct/file.d.ts +1 -1
  266. package/dist/services/integration-api/struct/file.js +9 -13
  267. package/dist/services/integration-api/struct/install-resource-file.d.ts +2 -2
  268. package/dist/services/integration-api/struct/install-resource-file.js +4 -8
  269. package/dist/services/integration-api/struct/module-file.d.ts +2 -2
  270. package/dist/services/integration-api/struct/module-file.js +4 -8
  271. package/dist/services/integration-api/struct/ro-file.d.ts +1 -1
  272. package/dist/services/integration-api/struct/ro-file.js +1 -5
  273. package/dist/services/integration-api/struct/server-config-file.d.ts +2 -2
  274. package/dist/services/integration-api/struct/server-config-file.js +4 -8
  275. package/dist/services/integration-api/struct/virtual-file.d.ts +1 -1
  276. package/dist/services/integration-api/struct/virtual-file.js +3 -7
  277. package/dist/services/integration-api/validator/customer-config-validator.d.ts +1 -1
  278. package/dist/services/integration-api/validator/customer-config-validator.js +8 -12
  279. package/dist/services/integration-api/validator/mandatory-files-validator.d.ts +2 -2
  280. package/dist/services/integration-api/validator/mandatory-files-validator.js +4 -8
  281. package/dist/services/integration-api/virtual/external-recipe.d.ts +2 -2
  282. package/dist/services/integration-api/virtual/external-recipe.js +1 -5
  283. package/dist/services/integration-api/virtual/static-recipe.d.ts +1 -1
  284. package/dist/services/integration-api/virtual/static-recipe.js +1 -5
  285. package/dist/services/integration-api/virtual/virtual-file-handler.d.ts +2 -2
  286. package/dist/services/integration-api/virtual/virtual-file-handler.js +8 -13
  287. package/dist/services/onboarding/browser/abort-response.js +1 -5
  288. package/dist/services/onboarding/browser/baqend-response.d.ts +1 -1
  289. package/dist/services/onboarding/browser/baqend-response.js +1 -5
  290. package/dist/services/onboarding/browser/config/browser-config.d.ts +1 -1
  291. package/dist/services/onboarding/browser/config/browser-config.js +15 -20
  292. package/dist/services/onboarding/browser/executable/executable-validator.d.ts +2 -2
  293. package/dist/services/onboarding/browser/executable/executable-validator.js +12 -17
  294. package/dist/services/onboarding/browser/extension/devtools-extension-api.d.ts +1 -1
  295. package/dist/services/onboarding/browser/extension/devtools-extension-api.js +1 -5
  296. package/dist/services/onboarding/browser/extension/extension-downloader.d.ts +2 -2
  297. package/dist/services/onboarding/browser/extension/extension-downloader.js +24 -30
  298. package/dist/services/onboarding/browser/extension/extension-validator.d.ts +3 -3
  299. package/dist/services/onboarding/browser/extension/extension-validator.js +18 -23
  300. package/dist/services/onboarding/browser/origin-response.d.ts +1 -1
  301. package/dist/services/onboarding/browser/origin-response.js +1 -5
  302. package/dist/services/onboarding/config-renderer/install-file-recipe.d.ts +2 -2
  303. package/dist/services/onboarding/config-renderer/install-file-recipe.js +1 -5
  304. package/dist/services/onboarding/config-renderer/speed-kit-install-context.d.ts +3 -3
  305. package/dist/services/onboarding/config-renderer/speed-kit-install-context.js +8 -11
  306. package/dist/services/onboarding/dashboard/diff-against-current-page.d.ts +4 -4
  307. package/dist/services/onboarding/dashboard/diff-against-current-page.js +9 -14
  308. package/dist/services/onboarding/dashboard/index.d.ts +7 -7
  309. package/dist/services/onboarding/dashboard/index.js +8 -13
  310. package/dist/services/onboarding/dashboard/parameter-query-builder.d.ts +1 -1
  311. package/dist/services/onboarding/dashboard/parameter-query-builder.js +9 -13
  312. package/dist/services/onboarding/dashboard/request-diff-service.d.ts +3 -3
  313. package/dist/services/onboarding/dashboard/request-diff-service.js +14 -19
  314. package/dist/services/onboarding/error/browser-extension-error.d.ts +1 -1
  315. package/dist/services/onboarding/error/browser-extension-error.js +1 -5
  316. package/dist/services/onboarding/error/document-handler-transform-error.js +1 -5
  317. package/dist/services/onboarding/error/unsupported-encoding-error.d.ts +1 -1
  318. package/dist/services/onboarding/error/unsupported-encoding-error.js +2 -7
  319. package/dist/services/onboarding/error/validate-extension-error.d.ts +1 -1
  320. package/dist/services/onboarding/error/validate-extension-error.js +2 -7
  321. package/dist/services/onboarding/error/vm-empty-response-error.d.ts +1 -1
  322. package/dist/services/onboarding/error/vm-empty-response-error.js +2 -7
  323. package/dist/services/onboarding/error/vm-error.d.ts +1 -1
  324. package/dist/services/onboarding/error/vm-error.js +2 -7
  325. package/dist/services/onboarding/fetch-event-handler.d.ts +4 -4
  326. package/dist/services/onboarding/fetch-event-handler.js +19 -25
  327. package/dist/services/onboarding/fetch-events/customer-domain-document-response.d.ts +4 -4
  328. package/dist/services/onboarding/fetch-events/customer-domain-document-response.js +15 -20
  329. package/dist/services/onboarding/fetch-events/customer-service-worker-js.d.ts +3 -3
  330. package/dist/services/onboarding/fetch-events/customer-service-worker-js.js +4 -8
  331. package/dist/services/onboarding/fetch-events/dashboard-request.d.ts +3 -3
  332. package/dist/services/onboarding/fetch-events/dashboard-request.js +1 -5
  333. package/dist/services/onboarding/fetch-events/speed-kit-asset-request.d.ts +5 -5
  334. package/dist/services/onboarding/fetch-events/speed-kit-asset-request.js +1 -5
  335. package/dist/services/onboarding/fetch-events/speed-kit-install-html.d.ts +4 -4
  336. package/dist/services/onboarding/fetch-events/speed-kit-install-html.js +3 -7
  337. package/dist/services/onboarding/fetch-events/speed-kit-install-js.d.ts +5 -5
  338. package/dist/services/onboarding/fetch-events/speed-kit-install-js.js +7 -11
  339. package/dist/services/onboarding/fetch-events/speed-kit-rum-pi-request.d.ts +6 -6
  340. package/dist/services/onboarding/fetch-events/speed-kit-rum-pi-request.js +4 -8
  341. package/dist/services/onboarding/fetch-events/speed-kit-service-worker-js.d.ts +3 -3
  342. package/dist/services/onboarding/fetch-events/speed-kit-service-worker-js.js +3 -7
  343. package/dist/services/onboarding/file-events/file-watcher.d.ts +5 -5
  344. package/dist/services/onboarding/file-events/file-watcher.js +24 -28
  345. package/dist/services/onboarding/index.d.ts +3 -3
  346. package/dist/services/onboarding/index.js +3 -8
  347. package/dist/services/onboarding/onboarding-model.d.ts +21 -23
  348. package/dist/services/onboarding/onboarding-model.js +22 -27
  349. package/dist/services/onboarding/onboarding-service-factory.d.ts +3 -3
  350. package/dist/services/onboarding/onboarding-service-factory.js +102 -108
  351. package/dist/services/onboarding/onboarding-service.d.ts +6 -6
  352. package/dist/services/onboarding/onboarding-service.js +12 -18
  353. package/dist/services/onboarding/request-cache/cache.d.ts +3 -3
  354. package/dist/services/onboarding/request-cache/cache.js +1 -5
  355. package/dist/services/onboarding/server-config/index.d.ts +3 -3
  356. package/dist/services/onboarding/server-config/index.js +6 -11
  357. package/dist/services/onboarding/templates/install-speed-kit-html-template.d.ts +1 -1
  358. package/dist/services/onboarding/templates/install-speed-kit-html-template.js +2 -7
  359. package/dist/services/onboarding/templates/install-speed-kit-js-template.d.ts +1 -1
  360. package/dist/services/onboarding/templates/install-speed-kit-js-template.js +2 -7
  361. package/dist/services/onboarding/todo-collector.d.ts +3 -3
  362. package/dist/services/onboarding/todo-collector.js +3 -7
  363. package/dist/services/onboarding/virtual-orestes-app/crawler.d.ts +2 -2
  364. package/dist/services/onboarding/virtual-orestes-app/crawler.js +12 -16
  365. package/dist/services/onboarding/virtual-orestes-app/index.d.ts +7 -7
  366. package/dist/services/onboarding/virtual-orestes-app/index.js +25 -32
  367. package/dist/services/pop-config/index.d.ts +3 -3
  368. package/dist/services/pop-config/index.js +3 -6
  369. package/dist/services/pop-config/pop-config-factory.d.ts +1 -1
  370. package/dist/services/pop-config/pop-config-factory.js +5 -9
  371. package/dist/services/pop-config/pop-config-model.d.ts +2 -2
  372. package/dist/services/pop-config/pop-config-model.js +1 -2
  373. package/dist/services/pop-config/pop-config-service.d.ts +2 -2
  374. package/dist/services/pop-config/pop-config-service.js +1 -5
  375. package/dist/services/prewarm/assets/asset-api-client.d.ts +2 -2
  376. package/dist/services/prewarm/assets/asset-api-client.js +18 -23
  377. package/dist/services/prewarm/assets/asset-item.d.ts +1 -1
  378. package/dist/services/prewarm/assets/asset-item.js +6 -10
  379. package/dist/services/prewarm/assets/asset-list.d.ts +2 -2
  380. package/dist/services/prewarm/assets/asset-list.js +6 -10
  381. package/dist/services/prewarm/csv-reader.js +6 -11
  382. package/dist/services/prewarm/error/invalid-origin-error.d.ts +1 -1
  383. package/dist/services/prewarm/error/invalid-origin-error.js +2 -7
  384. package/dist/services/prewarm/error/read-csv-error.d.ts +1 -1
  385. package/dist/services/prewarm/error/read-csv-error.js +2 -7
  386. package/dist/services/prewarm/index.d.ts +3 -3
  387. package/dist/services/prewarm/index.js +3 -6
  388. package/dist/services/prewarm/pre-warm-factory.d.ts +1 -1
  389. package/dist/services/prewarm/pre-warm-factory.js +13 -17
  390. package/dist/services/prewarm/pre-warm-model.js +16 -20
  391. package/dist/services/prewarm/pre-warm-service.d.ts +3 -3
  392. package/dist/services/prewarm/pre-warm-service.js +18 -22
  393. package/dist/services/pull/index.d.ts +3 -3
  394. package/dist/services/pull/index.js +3 -6
  395. package/dist/services/pull/pull-service-factory.d.ts +2 -2
  396. package/dist/services/pull/pull-service-factory.js +12 -16
  397. package/dist/services/pull/pull-service-model.js +4 -9
  398. package/dist/services/pull/pull-service.d.ts +3 -3
  399. package/dist/services/pull/pull-service.js +14 -19
  400. package/dist/services/query-builder/error/parse-config-speed-kit-error.d.ts +1 -1
  401. package/dist/services/query-builder/error/parse-config-speed-kit-error.js +2 -6
  402. package/dist/services/query-builder/query/parameter.js +1 -5
  403. package/dist/services/query-builder/query/prewarm.js +1 -5
  404. package/dist/services/query-builder/query-builder-factory.d.ts +3 -3
  405. package/dist/services/query-builder/query-builder-factory.js +16 -20
  406. package/dist/services/query-builder/query-builder-model.d.ts +6 -6
  407. package/dist/services/query-builder/query-builder-model.js +2 -5
  408. package/dist/services/query-builder/query-builder-service.d.ts +2 -2
  409. package/dist/services/query-builder/query-builder-service.js +24 -30
  410. package/oclif.manifest.json +15 -15
  411. package/package.json +63 -54
  412. package/dist/dummy.spec.d.ts +0 -1
  413. package/dist/dummy.spec.js +0 -18
@@ -1,11 +1,7 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DeviceDetectionChangedCheck = void 0;
4
- const cli_1 = require("../../../cli");
5
- const files_1 = require("../../../../models/files");
6
- const safe_1 = require("../../../../helpers/safe");
7
- const evaluate_speed_kit_config_1 = require("../../../../helpers/evaluate-speed-kit-config");
8
- class DeviceDetectionChangedCheck {
1
+ import { INTEGRATION_FILES } from "../../../../models/files.js";
2
+ import { safe } from "../../../../helpers/safe.js";
3
+ import { evaluateLocalAndRemoteSpeedKit } from "../../../../helpers/evaluate-speed-kit-config.js";
4
+ export class DeviceDetectionChangedCheck {
9
5
  cli;
10
6
  fileList;
11
7
  configApi;
@@ -25,9 +21,9 @@ class DeviceDetectionChangedCheck {
25
21
  // do not check for environments other than production
26
22
  !this.isProduction ||
27
23
  // do not check if speedKitConfigFile is not to be deployed
28
- !this.fileList.hasFile(files_1.INTEGRATION_FILES.CONFIG.SPEED_KIT) ||
24
+ !this.fileList.hasFile(INTEGRATION_FILES.CONFIG.SPEED_KIT) ||
29
25
  this.fileList
30
- .getByName(files_1.INTEGRATION_FILES.CONFIG.SPEED_KIT)
26
+ .getByName(INTEGRATION_FILES.CONFIG.SPEED_KIT)
31
27
  .shouldSkipFile()) {
32
28
  return;
33
29
  }
@@ -36,19 +32,19 @@ class DeviceDetectionChangedCheck {
36
32
  if (!activeInstallResource) {
37
33
  return;
38
34
  }
39
- this.cli.startAction("Checking for customDeviceDetection");
40
- const speedKitConfigFile = this.fileList.getByName(files_1.INTEGRATION_FILES.CONFIG.SPEED_KIT);
35
+ this.cli.startAction("PRE:CHECK:DEVICE_DETECTION", "Checking for customDeviceDetection");
36
+ const speedKitConfigFile = this.fileList.getByName(INTEGRATION_FILES.CONFIG.SPEED_KIT);
41
37
  const activeSpeedKitConfig = activeInstallResource[speedKitConfigFile.remoteKey];
42
- const changesResponse = await (0, safe_1.safe)(this.checkForChangedDeviceDetection(speedKitConfigFile, activeSpeedKitConfig));
38
+ const changesResponse = await safe(this.checkForChangedDeviceDetection(speedKitConfigFile, activeSpeedKitConfig));
43
39
  if (changesResponse.success === false) {
44
- this.cli.endAction(cli_1.CliActionStatus.FAILED);
40
+ this.cli.failAction("PRE:CHECK:DEVICE_DETECTION");
45
41
  this.cli.writeError(`Unable to evaluate changes: ${changesResponse.error}`);
46
42
  return;
47
43
  }
48
44
  const changes = changesResponse.data.map((value) => {
49
45
  return "config_SpeedKit." + value;
50
46
  });
51
- this.cli.endAction(cli_1.CliActionStatus.COMPLETED);
47
+ this.cli.successAction("PRE:CHECK:DEVICE_DETECTION");
52
48
  if (changes.length === 0) {
53
49
  return;
54
50
  }
@@ -60,7 +56,7 @@ class DeviceDetectionChangedCheck {
60
56
  }
61
57
  async checkForChangedDeviceDetection(speedKitConfigFile, activeSpeedKitConfig) {
62
58
  const changes = [];
63
- const { localSpeedKit, remoteSpeedKit } = await (0, evaluate_speed_kit_config_1.evaluateLocalAndRemoteSpeedKit)(this.customerConfig.app, this.customerConfig.origins[0], speedKitConfigFile, activeSpeedKitConfig);
59
+ const { localSpeedKit, remoteSpeedKit } = await evaluateLocalAndRemoteSpeedKit(this.customerConfig.app, this.customerConfig.origins[0], speedKitConfigFile, activeSpeedKitConfig);
64
60
  if ((localSpeedKit.detectDevice && !remoteSpeedKit.detectDevice) ||
65
61
  (!localSpeedKit.detectDevice && remoteSpeedKit.detectDevice)) {
66
62
  changes.push("detectDevice");
@@ -93,14 +89,12 @@ class DeviceDetectionChangedCheck {
93
89
  return changes;
94
90
  }
95
91
  async getActiveInstallResource() {
96
- const activeInstallResourceResponse = await (0, safe_1.safe)(this.configApi.getActiveInstall(this.configName));
92
+ const activeInstallResourceResponse = await safe(this.configApi.getActiveInstall(this.configName));
97
93
  if (activeInstallResourceResponse.success !== true) {
98
- this.cli.endAction(cli_1.CliActionStatus.FAILED);
99
- this.cli.writeError("Could not load active install resource");
94
+ this.cli.failAction("PRE:CHECK:DEVICE_DETECTION", "Could not load active install resource");
100
95
  this.cli.exit(1);
101
96
  return;
102
97
  }
103
98
  return activeInstallResourceResponse.data;
104
99
  }
105
100
  }
106
- exports.DeviceDetectionChangedCheck = DeviceDetectionChangedCheck;
@@ -1,6 +1,6 @@
1
- import { FileListInterface, CustomerConfig } from "../../../integration-api";
2
- import { CliServiceInterface } from "../../../cli";
3
- import { ConfigApiService } from "../../../config-api";
1
+ import { FileListInterface, CustomerConfig } from "../../../integration-api/index.js";
2
+ import { CliServiceInterface } from "../../../cli/index.js";
3
+ import { ConfigApiService } from "../../../config-api/index.js";
4
4
  export declare class SplitChangeCheck {
5
5
  private cli;
6
6
  private fileList;
@@ -1,11 +1,8 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SplitChangeCheck = void 0;
4
- const cli_1 = require("../../../cli");
5
- const files_1 = require("../../../../models/files");
6
- const safe_1 = require("../../../../helpers/safe");
7
- const evaluate_speed_kit_config_1 = require("../../../../helpers/evaluate-speed-kit-config");
8
- class SplitChangeCheck {
1
+ import { INTEGRATION_FILES } from "../../../../models/files.js";
2
+ import { safe } from "../../../../helpers/safe.js";
3
+ import { evaluateLocalAndRemoteSpeedKit } from "../../../../helpers/evaluate-speed-kit-config.js";
4
+ import ApplicationError from "../../../error-handling/error/application-error.js";
5
+ export class SplitChangeCheck {
9
6
  cli;
10
7
  fileList;
11
8
  configApi;
@@ -25,9 +22,9 @@ class SplitChangeCheck {
25
22
  // do not check for environments other than production
26
23
  !this.isProduction ||
27
24
  // do not check if speedKitConfigFile is not to be deployed
28
- !this.fileList.hasFile(files_1.INTEGRATION_FILES.CONFIG.SPEED_KIT) ||
25
+ !this.fileList.hasFile(INTEGRATION_FILES.CONFIG.SPEED_KIT) ||
29
26
  this.fileList
30
- .getByName(files_1.INTEGRATION_FILES.CONFIG.SPEED_KIT)
27
+ .getByName(INTEGRATION_FILES.CONFIG.SPEED_KIT)
31
28
  .shouldSkipFile()) {
32
29
  return;
33
30
  }
@@ -36,20 +33,24 @@ class SplitChangeCheck {
36
33
  if (!activeInstallResource) {
37
34
  return;
38
35
  }
39
- this.cli.startAction("Checking Split Test ID");
40
- const speedKitConfigFile = this.fileList.getByName(files_1.INTEGRATION_FILES.CONFIG.SPEED_KIT);
36
+ this.cli.startAction("PRE:CHECK:SPLIT_CHANGE", "Checking Split Test ID");
37
+ const speedKitConfigFile = this.fileList.getByName(INTEGRATION_FILES.CONFIG.SPEED_KIT);
41
38
  const activeSpeedKitConfig = activeInstallResource[speedKitConfigFile.remoteKey];
42
- const changesResponse = await (0, safe_1.safe)(this.checkSplitsForEachOrigin(speedKitConfigFile, activeSpeedKitConfig));
39
+ if (!activeSpeedKitConfig) {
40
+ throw new ApplicationError("RemoteSpeedKitConfig is empty");
41
+ }
42
+ const changesResponse = await safe(this.checkSplitsForEachOrigin(speedKitConfigFile, activeSpeedKitConfig));
43
43
  if (changesResponse.success === false) {
44
- this.cli.endAction(cli_1.CliActionStatus.FAILED);
44
+ this.cli.failAction("PRE:CHECK:SPLIT_CHANGE");
45
45
  this.cli.writeError(`Unable to evaluate changes: ${changesResponse.error}`);
46
46
  return;
47
47
  }
48
48
  const changes = changesResponse.data;
49
- this.cli.endAction(cli_1.CliActionStatus.COMPLETED);
49
+ this.cli.successAction("PRE:CHECK:SPLIT_CHANGE");
50
50
  if (changes.length === 0) {
51
51
  return;
52
52
  }
53
+ // @ts-expect-error incompatible type
53
54
  this.cli.table(changes, { origin: {}, type: {}, old: {}, new: {} });
54
55
  const result = await this.cli.confirm("Split change detected. Do you want to continue?", false);
55
56
  if (!result) {
@@ -59,7 +60,7 @@ class SplitChangeCheck {
59
60
  async checkSplitsForEachOrigin(speedKitConfigFile, activeSpeedKitConfig) {
60
61
  const changes = [];
61
62
  for (const origin of this.customerConfig.origins) {
62
- const { localSpeedKit, remoteSpeedKit } = await (0, evaluate_speed_kit_config_1.evaluateLocalAndRemoteSpeedKit)(this.customerConfig.app, origin, speedKitConfigFile, activeSpeedKitConfig);
63
+ const { localSpeedKit, remoteSpeedKit } = await evaluateLocalAndRemoteSpeedKit(this.customerConfig.app, origin, speedKitConfigFile, activeSpeedKitConfig);
63
64
  // check for split change
64
65
  if (localSpeedKit.split !== remoteSpeedKit.split) {
65
66
  changes.push({
@@ -111,14 +112,12 @@ class SplitChangeCheck {
111
112
  return changes;
112
113
  }
113
114
  async getActiveInstallResource() {
114
- const activeInstallResourceResponse = await (0, safe_1.safe)(this.configApi.getActiveInstall(this.configName));
115
+ const activeInstallResourceResponse = await safe(this.configApi.getActiveInstall(this.configName));
115
116
  if (activeInstallResourceResponse.success !== true) {
116
- this.cli.endAction(cli_1.CliActionStatus.FAILED);
117
- this.cli.writeError("Could not load active install resource");
117
+ this.cli.failAction("PRE:CHECK:SPLIT_CHANGE", "Could not load active install resource");
118
118
  this.cli.exit(1);
119
119
  return;
120
120
  }
121
121
  return activeInstallResourceResponse.data;
122
122
  }
123
123
  }
124
- exports.SplitChangeCheck = SplitChangeCheck;
@@ -1,10 +1,10 @@
1
- import { FlagInput } from "@oclif/core/lib/interfaces/parser";
1
+ import { Command } from "@oclif/core/command";
2
2
  export default class DeployContext {
3
3
  readonly customerPath: string;
4
4
  readonly configName: string;
5
5
  readonly dryRun: boolean;
6
6
  readonly useTestConfig: boolean;
7
- static flags: FlagInput;
7
+ static flags: Record<string, Command.Flag>;
8
8
  readonly artifacts?: string[];
9
9
  readonly isProduction: boolean;
10
10
  constructor(customerPath: string, configName?: string, artifacts?: string, dryRun?: boolean, useTestConfig?: boolean);
@@ -1,31 +1,28 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const dotenv = tslib_1.__importStar(require("dotenv"));
5
- const cli_parameters_1 = require("../../../models/cli-parameters");
6
- const core_1 = require("@oclif/core");
7
- dotenv.config();
1
+ import * as dotenv from "dotenv";
2
+ import { CLI_CONFIG_IS_TEST, CLI_CONFIG_NAME, } from "../../../models/cli-parameters.js";
3
+ import { Flags } from "@oclif/core";
4
+ dotenv.config({ quiet: true });
8
5
  const DEFAULT_CONFIG_NAME = "production";
9
6
  const ARTIFACTS_SEPARATOR = ",";
10
- class DeployContext {
7
+ export default class DeployContext {
11
8
  customerPath;
12
9
  configName;
13
10
  dryRun;
14
11
  useTestConfig;
15
12
  static flags = {
16
- ...cli_parameters_1.CLI_CONFIG_NAME,
17
- ...cli_parameters_1.CLI_CONFIG_IS_TEST,
18
- dryRun: core_1.Flags.boolean({
13
+ ...CLI_CONFIG_NAME,
14
+ ...CLI_CONFIG_IS_TEST,
15
+ dryRun: Flags.boolean({
19
16
  char: "d",
20
17
  default: false,
21
18
  description: "dry run",
22
19
  }),
23
- verboseLevel: core_1.Flags.boolean({
20
+ verboseLevel: Flags.boolean({
24
21
  char: "v",
25
22
  default: false,
26
23
  description: "Show all messages",
27
24
  }),
28
- artifacts: core_1.Flags.string({
25
+ artifacts: Flags.string({
29
26
  char: "a",
30
27
  description: "which files to upload",
31
28
  }),
@@ -44,4 +41,3 @@ class DeployContext {
44
41
  return this.artifacts?.length > 0;
45
42
  }
46
43
  }
47
- exports.default = DeployContext;
@@ -1,6 +1,6 @@
1
- import { UserCliConfig } from "../../helpers/cli-config";
2
- import DeployContext from "./context/deploy-context";
3
- import DeployService from "./deploy-service";
1
+ import { UserCliConfig } from "../../helpers/cli-config.js";
2
+ import DeployContext from "./context/deploy-context.js";
3
+ import DeployService from "./deploy-service.js";
4
4
  export default class DeployServiceFactory {
5
5
  private context;
6
6
  private cliConfig;
@@ -1,23 +1,20 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const cli_1 = require("../cli");
5
- const diff_1 = require("../diff");
6
- const install_resource_builder_1 = tslib_1.__importDefault(require("./builder/install-resource-builder"));
7
- const revalidated_module_check_1 = tslib_1.__importDefault(require("./checks/post-deploy/revalidated-module-check"));
8
- const save_files_check_1 = tslib_1.__importDefault(require("./checks/post-deploy/save-files-check"));
9
- const deploy_service_1 = tslib_1.__importDefault(require("./deploy-service"));
10
- const customer_config_handler_1 = tslib_1.__importDefault(require("./handler/customer-config-handler"));
11
- const install_resource_handler_1 = tslib_1.__importDefault(require("./handler/install-resource-handler"));
12
- const deleted_file_check_1 = tslib_1.__importDefault(require("./handler/install-resource-modifier/deleted-file-check"));
13
- const module_handler_1 = tslib_1.__importDefault(require("./handler/module-handler"));
14
- const server_config_handler_1 = tslib_1.__importDefault(require("./handler/server-config-handler"));
15
- const integration_api_1 = require("../integration-api");
16
- const split_change_check_1 = require("./checks/pre-deploy/split-change-check");
17
- const config_api_1 = require("../config-api");
18
- const deprecated_deployment_detection_check_1 = require("./checks/post-deploy/deprecated-deployment-detection-check");
19
- const device_detection_changed_check_1 = require("./checks/pre-deploy/device-detection-changed-check");
20
- class DeployServiceFactory {
1
+ import { CliServiceFactory } from "../cli/index.js";
2
+ import { DiffContext, DiffServiceFactory } from "../diff/index.js";
3
+ import InstallResourceBuilder from "./builder/install-resource-builder.js";
4
+ import RevalidatedModuleCheck from "./checks/post-deploy/revalidated-module-check.js";
5
+ import SaveFilesCheck from "./checks/post-deploy/save-files-check.js";
6
+ import DeployService from "./deploy-service.js";
7
+ import CustomerConfigHandler from "./handler/customer-config-handler.js";
8
+ import InstallResourceHandler from "./handler/install-resource-handler.js";
9
+ import DeletedFileCheck from "./handler/install-resource-modifier/deleted-file-check.js";
10
+ import ModuleHandler from "./handler/module-handler.js";
11
+ import ServerConfigHandler from "./handler/server-config-handler.js";
12
+ import { IntegrationApiFactory, IntegrationApiContext, DEFAULT_BLOCKED_FOLDERS, } from "../integration-api/index.js";
13
+ import { SplitChangeCheck } from "./checks/pre-deploy/split-change-check.js";
14
+ import { ConfigApiContext, ConfigApiServiceFactory, } from "../config-api/index.js";
15
+ import { DeprecatedDeploymentDetectionCheck } from "./checks/post-deploy/deprecated-deployment-detection-check.js";
16
+ import { DeviceDetectionChangedCheck } from "./checks/pre-deploy/device-detection-changed-check.js";
17
+ export default class DeployServiceFactory {
21
18
  context;
22
19
  cliConfig;
23
20
  service = undefined;
@@ -26,7 +23,7 @@ class DeployServiceFactory {
26
23
  this.cliConfig = cliConfig;
27
24
  }
28
25
  async buildService() {
29
- if (!(this.service instanceof deploy_service_1.default)) {
26
+ if (!(this.service instanceof DeployService)) {
30
27
  await this.build();
31
28
  }
32
29
  return this.service;
@@ -36,35 +33,34 @@ class DeployServiceFactory {
36
33
  const customer = files.getCustomerConfig().config;
37
34
  const configName = customer.name || this.context.configName;
38
35
  const configApi = this.getConfigApi(customer.app);
39
- const diffService = new diff_1.DiffServiceFactory(new diff_1.DiffContext(this.cliConfig.diffExec, this.cliConfig.diffExecTemplate)).getService();
40
- const cliService = new cli_1.CliServiceFactory().getService();
41
- const installResourceBuilder = new install_resource_builder_1.default(configApi);
42
- const deletedFilesChecker = new deleted_file_check_1.default(cliService, this.context.hasArtifacts());
43
- this.service = new deploy_service_1.default(files, [
44
- new customer_config_handler_1.default(customer, configApi, configName, diffService, cliService, installResourceBuilder),
45
- new install_resource_handler_1.default(customer, configApi, configName, diffService, cliService, installResourceBuilder, deletedFilesChecker),
46
- new module_handler_1.default(configApi, diffService, cliService, []),
47
- new server_config_handler_1.default(configApi, diffService, cliService),
36
+ const diffService = new DiffServiceFactory(new DiffContext(this.cliConfig.diffExec, this.cliConfig.diffExecTemplate)).getService();
37
+ const cliService = new CliServiceFactory().getService();
38
+ const installResourceBuilder = new InstallResourceBuilder(configApi);
39
+ const deletedFilesChecker = new DeletedFileCheck(cliService, this.context.hasArtifacts());
40
+ this.service = new DeployService(files, [
41
+ new CustomerConfigHandler(customer, configApi, configName, diffService, cliService, installResourceBuilder),
42
+ new InstallResourceHandler(customer, configApi, configName, diffService, cliService, installResourceBuilder, deletedFilesChecker),
43
+ new ModuleHandler(configApi, diffService, cliService, []),
44
+ new ServerConfigHandler(configApi, diffService, cliService),
48
45
  ], cliService, [
49
- new split_change_check_1.SplitChangeCheck(cliService, files, configApi, customer, configName, this.context.isProduction),
50
- new device_detection_changed_check_1.DeviceDetectionChangedCheck(cliService, files, configApi, customer, configName, this.context.isProduction),
46
+ new SplitChangeCheck(cliService, files, configApi, customer, configName, this.context.isProduction),
47
+ new DeviceDetectionChangedCheck(cliService, files, configApi, customer, configName, this.context.isProduction),
51
48
  ], this.getPostDeployChecks(files, cliService, configApi, customer.app), this.context.dryRun);
52
49
  }
53
50
  getConfigApi(app) {
54
- const configApiContext = new config_api_1.ConfigApiContext(app);
55
- return new config_api_1.ConfigApiServiceFactory(configApiContext).getService();
51
+ const configApiContext = new ConfigApiContext(app);
52
+ return new ConfigApiServiceFactory(configApiContext).getService();
56
53
  }
57
54
  async getIntegrationFiles() {
58
- const integrationApiContext = new integration_api_1.IntegrationApiContext(this.context.customerPath, this.context.configName, this.context.artifacts, integration_api_1.DEFAULT_BLOCKED_FOLDERS, this.context.useTestConfig);
59
- const integrationApi = new integration_api_1.IntegrationApiFactory(integrationApiContext, this.cliConfig).buildService();
55
+ const integrationApiContext = new IntegrationApiContext(this.context.customerPath, this.context.configName, this.context.artifacts, DEFAULT_BLOCKED_FOLDERS, this.context.useTestConfig);
56
+ const integrationApi = new IntegrationApiFactory(integrationApiContext, this.cliConfig).buildService();
60
57
  return integrationApi.run();
61
58
  }
62
59
  getPostDeployChecks(files, cliService, configApi, app) {
63
60
  return [
64
- new save_files_check_1.default(files, cliService),
65
- new revalidated_module_check_1.default(configApi, cliService, app),
66
- new deprecated_deployment_detection_check_1.DeprecatedDeploymentDetectionCheck(files, cliService, configApi, app),
61
+ new SaveFilesCheck(files, cliService),
62
+ new RevalidatedModuleCheck(configApi, cliService, app),
63
+ new DeprecatedDeploymentDetectionCheck(files, cliService, configApi, app),
67
64
  ];
68
65
  }
69
66
  }
70
- exports.default = DeployServiceFactory;
@@ -4,26 +4,26 @@ export interface PostDeployCheckInterface {
4
4
  export interface PreDeployCheckInterface {
5
5
  check(): Promise<void>;
6
6
  }
7
- export type Change = {
7
+ export interface Change {
8
8
  origin: string;
9
9
  type: string;
10
10
  old: string;
11
11
  new: string;
12
- };
13
- export type speedKitVariationRule = {
12
+ }
13
+ export interface speedKitVariationRule {
14
14
  contentType?: string[];
15
15
  host?: string[];
16
- pathname?: Array<string | RegExp>;
17
- url?: Array<string | RegExp>;
18
- };
19
- export type speedKitVariationRules = {
16
+ pathname?: (string | RegExp)[];
17
+ url?: (string | RegExp)[];
18
+ }
19
+ export interface speedKitVariationRules {
20
20
  rules?: speedKitVariationRule;
21
21
  variationFunction: (request: Request, device: string, cookies: Map<string, string>) => string;
22
- };
23
- export type speedKit = {
22
+ }
23
+ export interface speedKit {
24
24
  split: number;
25
25
  splitTestId: string;
26
26
  userAgentDetection?: boolean;
27
27
  detectDevice?: (doc: Document) => string | null;
28
28
  customVariation?: speedKitVariationRules[];
29
- };
29
+ }
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
@@ -1,7 +1,7 @@
1
- import DeployHandlerInterface from "./interface/deploy-handler-interface";
2
- import { CliService } from "../cli";
3
- import { FileListInterface } from "../integration-api/";
4
- import { PostDeployCheckInterface, PreDeployCheckInterface } from "./deploy-service-model";
1
+ import DeployHandlerInterface from "./interface/deploy-handler-interface.js";
2
+ import { CliService } from "../cli/index.js";
3
+ import { FileListInterface } from "../integration-api/index.js";
4
+ import { PostDeployCheckInterface, PreDeployCheckInterface } from "./deploy-service-model.js";
5
5
  export default class DeployService {
6
6
  private readonly fileList;
7
7
  private readonly deployHandler;
@@ -1,7 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const files_1 = require("../../models/files");
4
- class DeployService {
1
+ import { INTEGRATION_FILES } from "../../models/files.js";
2
+ export default class DeployService {
5
3
  fileList;
6
4
  deployHandler;
7
5
  cli;
@@ -38,16 +36,14 @@ class DeployService {
38
36
  await this.runPostDeployChecks();
39
37
  }
40
38
  async handleType(type) {
41
- for (let iterator = 0; iterator < this.deployHandler.length; iterator++) {
42
- const handler = this.deployHandler[iterator];
39
+ for (const handler of this.deployHandler) {
43
40
  if (handler.canHandle(type)) {
44
41
  await handler.handle(this.fileList.getByType(type));
45
42
  }
46
43
  }
47
44
  }
48
45
  async uploadType(type) {
49
- for (let iterator = 0; iterator < this.deployHandler.length; iterator++) {
50
- const handler = this.deployHandler[iterator];
46
+ for (const handler of this.deployHandler) {
51
47
  if (handler.canHandle(type)) {
52
48
  await handler.upload(this.fileList.getByType(type));
53
49
  }
@@ -66,22 +62,21 @@ class DeployService {
66
62
  filterFilesToProcess() {
67
63
  this.fileList.filter((file) => {
68
64
  // if we have a documentHandlerConfig we don't need an assetHandler
69
- if (file.name === files_1.INTEGRATION_FILES.DEPRECATED.ASSET_HANDLER &&
70
- this.fileList.hasFile(files_1.INTEGRATION_FILES.CONFIG.DOCUMENT_HANDLER)) {
65
+ if (file.name === INTEGRATION_FILES.DEPRECATED.ASSET_HANDLER &&
66
+ this.fileList.hasFile(INTEGRATION_FILES.CONFIG.DOCUMENT_HANDLER)) {
71
67
  return false;
72
68
  }
73
69
  // if we don't have a documentHandlerConfig we don't need styles
74
- if (file.name === files_1.INTEGRATION_FILES.CONFIG.DYNAMIC_STYLES &&
75
- !this.fileList.hasFile(files_1.INTEGRATION_FILES.CONFIG.DOCUMENT_HANDLER)) {
70
+ if (file.name === INTEGRATION_FILES.CONFIG.DYNAMIC_STYLES &&
71
+ !this.fileList.hasFile(INTEGRATION_FILES.CONFIG.DOCUMENT_HANDLER)) {
76
72
  return false;
77
73
  }
78
74
  // if we don't have a documentHandlerConfig we don't need dynamicBlocks
79
- if (file.name === files_1.INTEGRATION_FILES.CONFIG.DYNAMIC_BLOCKS &&
80
- !this.fileList.hasFile(files_1.INTEGRATION_FILES.CONFIG.DOCUMENT_HANDLER)) {
75
+ if (file.name === INTEGRATION_FILES.CONFIG.DYNAMIC_BLOCKS &&
76
+ !this.fileList.hasFile(INTEGRATION_FILES.CONFIG.DOCUMENT_HANDLER)) {
81
77
  return false;
82
78
  }
83
79
  return true;
84
80
  });
85
81
  }
86
82
  }
87
- exports.default = DeployService;
@@ -1,4 +1,4 @@
1
- import ApplicationError from "../../error-handling/error/application-error";
1
+ import ApplicationError from "../../error-handling/error/application-error.js";
2
2
  export declare class CheckModuleFileError extends ApplicationError {
3
3
  readonly code = "CHECK_MODULE_ERROR";
4
4
  }
@@ -1,9 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CheckModuleFileError = void 0;
4
- const tslib_1 = require("tslib");
5
- const application_error_1 = tslib_1.__importDefault(require("../../error-handling/error/application-error"));
6
- class CheckModuleFileError extends application_error_1.default {
1
+ import ApplicationError from "../../error-handling/error/application-error.js";
2
+ export class CheckModuleFileError extends ApplicationError {
7
3
  code = "CHECK_MODULE_ERROR";
8
4
  }
9
- exports.CheckModuleFileError = CheckModuleFileError;
@@ -1,4 +1,4 @@
1
- import ApplicationError from "../../error-handling/error/application-error";
1
+ import ApplicationError from "../../error-handling/error/application-error.js";
2
2
  export declare class DeployInstallResourceError extends ApplicationError {
3
3
  readonly code = "INSTALL_RESOURCE_API_ERROR";
4
4
  }
@@ -1,9 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DeployInstallResourceError = void 0;
4
- const tslib_1 = require("tslib");
5
- const application_error_1 = tslib_1.__importDefault(require("../../error-handling/error/application-error"));
6
- class DeployInstallResourceError extends application_error_1.default {
1
+ import ApplicationError from "../../error-handling/error/application-error.js";
2
+ export class DeployInstallResourceError extends ApplicationError {
7
3
  code = "INSTALL_RESOURCE_API_ERROR";
8
4
  }
9
- exports.DeployInstallResourceError = DeployInstallResourceError;
@@ -1,4 +1,4 @@
1
- import ApplicationError from "../../error-handling/error/application-error";
1
+ import ApplicationError from "../../error-handling/error/application-error.js";
2
2
  export declare class DeployModuleFileError extends ApplicationError {
3
3
  readonly code = "MODULE_API_ERROR";
4
4
  }
@@ -1,9 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DeployModuleFileError = void 0;
4
- const tslib_1 = require("tslib");
5
- const application_error_1 = tslib_1.__importDefault(require("../../error-handling/error/application-error"));
6
- class DeployModuleFileError extends application_error_1.default {
1
+ import ApplicationError from "../../error-handling/error/application-error.js";
2
+ export class DeployModuleFileError extends ApplicationError {
7
3
  code = "MODULE_API_ERROR";
8
4
  }
9
- exports.DeployModuleFileError = DeployModuleFileError;
@@ -1,4 +1,4 @@
1
- import ApplicationError from "../../error-handling/error/application-error";
1
+ import ApplicationError from "../../error-handling/error/application-error.js";
2
2
  export declare class DeployServerConfigError extends ApplicationError {
3
3
  readonly code = "SERVER_MODULE_API_ERROR";
4
4
  }
@@ -1,9 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DeployServerConfigError = void 0;
4
- const tslib_1 = require("tslib");
5
- const application_error_1 = tslib_1.__importDefault(require("../../error-handling/error/application-error"));
6
- class DeployServerConfigError extends application_error_1.default {
1
+ import ApplicationError from "../../error-handling/error/application-error.js";
2
+ export class DeployServerConfigError extends ApplicationError {
7
3
  code = "SERVER_MODULE_API_ERROR";
8
4
  }
9
- exports.DeployServerConfigError = DeployServerConfigError;
@@ -1,4 +1,4 @@
1
- import ApplicationError from "../../error-handling/error/application-error";
1
+ import ApplicationError from "../../error-handling/error/application-error.js";
2
2
  export declare class EvaluateSkConfigError extends ApplicationError {
3
3
  readonly code = "CONFIG_SPEEDKIT_PARSE_ERROR";
4
4
  }
@@ -1,9 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EvaluateSkConfigError = void 0;
4
- const tslib_1 = require("tslib");
5
- const application_error_1 = tslib_1.__importDefault(require("../../error-handling/error/application-error"));
6
- class EvaluateSkConfigError extends application_error_1.default {
1
+ import ApplicationError from "../../error-handling/error/application-error.js";
2
+ export class EvaluateSkConfigError extends ApplicationError {
7
3
  code = "CONFIG_SPEEDKIT_PARSE_ERROR";
8
4
  }
9
- exports.EvaluateSkConfigError = EvaluateSkConfigError;
@@ -1,4 +1,4 @@
1
- import ApplicationError from "../../error-handling/error/application-error";
1
+ import ApplicationError from "../../error-handling/error/application-error.js";
2
2
  export declare class FileHandlerError extends ApplicationError {
3
3
  readonly code = "NO_HANDLER_FOR_FILE_TYPE";
4
4
  }
@@ -1,9 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FileHandlerError = void 0;
4
- const tslib_1 = require("tslib");
5
- const application_error_1 = tslib_1.__importDefault(require("../../error-handling/error/application-error"));
6
- class FileHandlerError extends application_error_1.default {
1
+ import ApplicationError from "../../error-handling/error/application-error.js";
2
+ export class FileHandlerError extends ApplicationError {
7
3
  code = "NO_HANDLER_FOR_FILE_TYPE";
8
4
  }
9
- exports.FileHandlerError = FileHandlerError;
@@ -1,4 +1,4 @@
1
- import ApplicationError from "../../error-handling/error/application-error";
1
+ import ApplicationError from "../../error-handling/error/application-error.js";
2
2
  export declare class PostDeployDeploymentDetectionError extends ApplicationError {
3
3
  readonly code = "POST_DEPLOY";
4
4
  }
@@ -1,9 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PostDeployDeploymentDetectionError = void 0;
4
- const tslib_1 = require("tslib");
5
- const application_error_1 = tslib_1.__importDefault(require("../../error-handling/error/application-error"));
6
- class PostDeployDeploymentDetectionError extends application_error_1.default {
1
+ import ApplicationError from "../../error-handling/error/application-error.js";
2
+ export class PostDeployDeploymentDetectionError extends ApplicationError {
7
3
  code = "POST_DEPLOY";
8
4
  }
9
- exports.PostDeployDeploymentDetectionError = PostDeployDeploymentDetectionError;
@@ -1,4 +1,4 @@
1
- import ApplicationError from "../../error-handling/error/application-error";
1
+ import ApplicationError from "../../error-handling/error/application-error.js";
2
2
  export declare class SafeFileError extends ApplicationError {
3
3
  readonly code = "SAFE_FILES_ERROR";
4
4
  }