@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,14 +1,10 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CustomerConfigService = void 0;
4
- const tslib_1 = require("tslib");
5
- const fs = tslib_1.__importStar(require("node:fs"));
6
- const path = tslib_1.__importStar(require("node:path"));
7
- const Handlebars = tslib_1.__importStar(require("handlebars"));
8
- const cli_1 = require("../cli");
9
- const site_analyzer_js_1 = require("../../helpers/site-analyzer.js");
10
- const customer_config_service_model_1 = require("./customer-config-service-model");
11
- class CustomerConfigService {
1
+ import * as fs from "node:fs";
2
+ import * as path from "node:path";
3
+ import Handlebars from "handlebars";
4
+ import { analyzeSite, } from "../../helpers/site-analyzer.js";
5
+ import { DirectoryOverwriteOption, EnvironmentType, ShopSystem, } from "./customer-config-service-model.js";
6
+ import { fileURLToPath } from "node:url";
7
+ export class CustomerConfigService {
12
8
  context;
13
9
  cli;
14
10
  _appName;
@@ -73,17 +69,17 @@ class CustomerConfigService {
73
69
  // protect output directory if already existing and not empty:
74
70
  if (this.isDirNotEmpty(directoryPath)) {
75
71
  this.cli.spacer();
76
- const selectedDirectoryOverwriteOption = await this.cli.select(`Output directory ${directoryPath} is not empty. How to proceed?`, Object.values(customer_config_service_model_1.DirectoryOverwriteOption).map((option) => ({
72
+ const selectedDirectoryOverwriteOption = await this.cli.select(`Output directory ${directoryPath} is not empty. How to proceed?`, Object.values(DirectoryOverwriteOption).map((option) => ({
77
73
  name: option,
78
74
  value: option,
79
75
  })));
80
76
  switch (selectedDirectoryOverwriteOption) {
81
- case customer_config_service_model_1.DirectoryOverwriteOption.OVERWRITE_COMPLETELY: {
77
+ case DirectoryOverwriteOption.OVERWRITE_COMPLETELY: {
82
78
  fs.rmSync(directoryPath, { recursive: true, force: true });
83
79
  fs.mkdirSync(directoryPath, { recursive: true });
84
80
  break;
85
81
  }
86
- case customer_config_service_model_1.DirectoryOverwriteOption.NEW_NAME: {
82
+ case DirectoryOverwriteOption.NEW_NAME: {
87
83
  return await this.chooseNewOutputDirectoryName(directoryPath);
88
84
  }
89
85
  }
@@ -97,23 +93,27 @@ class CustomerConfigService {
97
93
  // write files:
98
94
  for (const templateFile of this.templates) {
99
95
  const outputFileName = this.getHandlebarsOutputFileName(templateFile);
100
- this.cli.startAction(`Adding ${outputFileName}`);
96
+ this.cli.startAction(`CREATE:CUSTOMER:CONFIG:${outputFileName}`, `Adding ${outputFileName}`);
101
97
  try {
102
98
  const outputFilePath = path.join(this.outputDirPath, outputFileName);
103
99
  if (!(await this.shouldFileBeOverwritten(outputFilePath))) {
104
- this.cli.endAction(cli_1.CliActionStatus.SKIPPED);
100
+ this.cli.endAction(`CREATE:CUSTOMER:CONFIG:${outputFileName}`, "skipped!");
105
101
  continue;
106
102
  }
107
- const filePath = path.join(__dirname, "./templates", templateFile);
103
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
104
+ const filePath = path.resolve(__dirname, "templates", templateFile);
108
105
  const content = fs.readFileSync(filePath, "utf8");
109
106
  const template = Handlebars.compile(content);
110
107
  const result = template(configSettings);
111
108
  fs.mkdirSync(path.dirname(outputFilePath), { recursive: true });
112
109
  fs.writeFileSync(outputFilePath, result);
113
- this.cli.endAction(cli_1.CliActionStatus.COMPLETED);
110
+ this.cli.successAction(`CREATE:CUSTOMER:CONFIG:${outputFileName}`);
114
111
  }
115
- catch {
116
- this.cli.endAction(cli_1.CliActionStatus.FAILED);
112
+ catch (error) {
113
+ this.cli.failAction(`CREATE:CUSTOMER:CONFIG:${outputFileName}`);
114
+ this.cli.writeError(
115
+ // @ts-expect-error unknown error
116
+ error?.message || "something strange happened here!");
117
117
  }
118
118
  }
119
119
  this.cli.spacer();
@@ -138,7 +138,9 @@ class CustomerConfigService {
138
138
  return true;
139
139
  }
140
140
  async getConfigSettings() {
141
- let { production, staging, includeServiceWorker, isShopify, isShopware, isSalesforce, isOxid, isPlentymarkets, } = {};
141
+ let {
142
+ // eslint-disable-next-line no-useless-assignment
143
+ production, staging, includeServiceWorker, isShopify, isShopware, isSalesforce, isOxid, isPlentymarkets, } = {};
142
144
  this.appName = await this.cli.prompt(`[App] Enter desired Speed Kit app name:`, {
143
145
  validator: (input) => /^[\da-z]+(?:-[\da-z]+)*$/.test(input) ? "" : "No valid kebab-case",
144
146
  defaultAnswer: this.appName,
@@ -151,34 +153,33 @@ class CustomerConfigService {
151
153
  let siteAnalysis = null;
152
154
  const shouldAnalyze = await this.cli.confirm("[Analysis] Analyze production site to auto-detect settings?", true);
153
155
  if (shouldAnalyze) {
154
- this.cli.startAction(`Analyzing https://${productionHost}`);
155
- siteAnalysis = await (0, site_analyzer_js_1.analyzeSite)(productionHost, (message) => this.cli.comment(message));
156
+ this.cli.startAction("ANALYSE:CUSTOMER:CONFIG", `Analyzing https://${productionHost}`);
157
+ siteAnalysis = await analyzeSite(productionHost, (message) => this.cli.comment(message));
156
158
  if (siteAnalysis) {
157
- this.cli.endAction(cli_1.CliActionStatus.COMPLETED);
159
+ this.cli.successAction("ANALYSE:CUSTOMER:CONFIG");
158
160
  }
159
161
  else {
160
- this.cli.endAction(cli_1.CliActionStatus.SKIPPED);
161
- this.cli.comment("Could not analyze site — using defaults.");
162
+ this.cli.endAction("ANALYSE:CUSTOMER:CONFIG", "Could not analyze site — using defaults.");
162
163
  }
163
164
  }
164
165
  this.cli.spacer();
165
166
  // 3. Shop system
166
167
  const detectedShopMap = {
167
- shopify: customer_config_service_model_1.ShopSystem.SHOPIFY,
168
- shopware: customer_config_service_model_1.ShopSystem.SHOPWARE,
169
- salesforce: customer_config_service_model_1.ShopSystem.SALESFORCE,
170
- oxid: customer_config_service_model_1.ShopSystem.OXID,
171
- plentymarkets: customer_config_service_model_1.ShopSystem.PLENTYMARKETS,
172
- magento: customer_config_service_model_1.ShopSystem.MAGENTO,
173
- woocommerce: customer_config_service_model_1.ShopSystem.WOOCOMMERCE,
174
- bigcommerce: customer_config_service_model_1.ShopSystem.BIGCOMMERCE,
175
- prestashop: customer_config_service_model_1.ShopSystem.PRESTASHOP,
176
- jtl: customer_config_service_model_1.ShopSystem.JTL,
177
- commercetools: customer_config_service_model_1.ShopSystem.COMMERCETOOLS,
178
- spryker: customer_config_service_model_1.ShopSystem.SPRYKER,
179
- shoptet: customer_config_service_model_1.ShopSystem.SHOPTET,
180
- ecforce: customer_config_service_model_1.ShopSystem.ECFORCE,
181
- futureshop: customer_config_service_model_1.ShopSystem.FUTURESHOP,
168
+ shopify: ShopSystem.SHOPIFY,
169
+ shopware: ShopSystem.SHOPWARE,
170
+ salesforce: ShopSystem.SALESFORCE,
171
+ oxid: ShopSystem.OXID,
172
+ plentymarkets: ShopSystem.PLENTYMARKETS,
173
+ magento: ShopSystem.MAGENTO,
174
+ woocommerce: ShopSystem.WOOCOMMERCE,
175
+ bigcommerce: ShopSystem.BIGCOMMERCE,
176
+ prestashop: ShopSystem.PRESTASHOP,
177
+ jtl: ShopSystem.JTL,
178
+ commercetools: ShopSystem.COMMERCETOOLS,
179
+ spryker: ShopSystem.SPRYKER,
180
+ shoptet: ShopSystem.SHOPTET,
181
+ ecforce: ShopSystem.ECFORCE,
182
+ futureshop: ShopSystem.FUTURESHOP,
182
183
  };
183
184
  const detectedShop = siteAnalysis?.shopSystem
184
185
  ? detectedShopMap[siteAnalysis.shopSystem]
@@ -193,33 +194,33 @@ class CustomerConfigService {
193
194
  this.cli.comment("[Shop System] Could not detect shop system from site.");
194
195
  }
195
196
  selectedShopSystem = await this.cli.select("[Shop System] Which shop system is in use?", [
196
- customer_config_service_model_1.ShopSystem.SHOPIFY,
197
- customer_config_service_model_1.ShopSystem.SHOPWARE,
198
- customer_config_service_model_1.ShopSystem.SALESFORCE,
199
- customer_config_service_model_1.ShopSystem.OXID,
200
- customer_config_service_model_1.ShopSystem.PLENTYMARKETS,
201
- customer_config_service_model_1.ShopSystem.OTHER,
197
+ ShopSystem.SHOPIFY,
198
+ ShopSystem.SHOPWARE,
199
+ ShopSystem.SALESFORCE,
200
+ ShopSystem.OXID,
201
+ ShopSystem.PLENTYMARKETS,
202
+ ShopSystem.OTHER,
202
203
  ].map((option) => ({ name: option, value: option })));
203
204
  }
204
205
  this.cli.spacer();
205
206
  switch (selectedShopSystem) {
206
- case customer_config_service_model_1.ShopSystem.SHOPIFY: {
207
+ case ShopSystem.SHOPIFY: {
207
208
  isShopify = true;
208
209
  break;
209
210
  }
210
- case customer_config_service_model_1.ShopSystem.SHOPWARE: {
211
+ case ShopSystem.SHOPWARE: {
211
212
  isShopware = true;
212
213
  break;
213
214
  }
214
- case customer_config_service_model_1.ShopSystem.SALESFORCE: {
215
+ case ShopSystem.SALESFORCE: {
215
216
  isSalesforce = true;
216
217
  break;
217
218
  }
218
- case customer_config_service_model_1.ShopSystem.OXID: {
219
+ case ShopSystem.OXID: {
219
220
  isOxid = true;
220
221
  break;
221
222
  }
222
- case customer_config_service_model_1.ShopSystem.PLENTYMARKETS: {
223
+ case ShopSystem.PLENTYMARKETS: {
223
224
  isPlentymarkets = true;
224
225
  break;
225
226
  }
@@ -233,7 +234,7 @@ class CustomerConfigService {
233
234
  if (!isShopify) {
234
235
  const withStaging = await this.cli.confirm("[Staging] Should a staging config also be added?", false);
235
236
  if (withStaging) {
236
- staging = await this.getEnvironmentConfig(customer_config_service_model_1.EnvironmentType.STAGING, productionHost.replace("www", "staging"));
237
+ staging = await this.getEnvironmentConfig(EnvironmentType.STAGING, productionHost.replace("www", "staging"));
237
238
  }
238
239
  this.cli.spacer();
239
240
  }
@@ -369,7 +370,7 @@ class CustomerConfigService {
369
370
  this.cli.spacer();
370
371
  }
371
372
  // Resolve shop system display name for template
372
- const shopSystemName = selectedShopSystem === customer_config_service_model_1.ShopSystem.OTHER ? undefined : selectedShopSystem;
373
+ const shopSystemName = selectedShopSystem === ShopSystem.OTHER ? undefined : selectedShopSystem;
373
374
  return {
374
375
  appName: this.appName,
375
376
  production,
@@ -418,4 +419,3 @@ class CustomerConfigService {
418
419
  this.cli.writeSuccess("\nConfig generation completed 👏\n");
419
420
  }
420
421
  }
421
- exports.CustomerConfigService = CustomerConfigService;
@@ -1,4 +1,4 @@
1
- export * from "./customer-config-service";
2
- export * from "./customer-config-service-context";
3
- export * from "./customer-config-service-model";
4
- export * from "./customer-config-service-factory";
1
+ export * from "./customer-config-service.js";
2
+ export * from "./customer-config-service-context.js";
3
+ export * from "./customer-config-service-model.js";
4
+ export * from "./customer-config-service-factory.js";
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./customer-config-service"), exports);
5
- tslib_1.__exportStar(require("./customer-config-service-context"), exports);
6
- tslib_1.__exportStar(require("./customer-config-service-model"), exports);
7
- tslib_1.__exportStar(require("./customer-config-service-factory"), exports);
1
+ export * from "./customer-config-service.js";
2
+ export * from "./customer-config-service-context.js";
3
+ export * from "./customer-config-service-model.js";
4
+ export * from "./customer-config-service-factory.js";
@@ -109,13 +109,22 @@ const config = {
109
109
  wrapPreRenderedElementsWithCustomRootTags(document);
110
110
  addPolyFillAfterMainPreRenderTemplate(document);
111
111
  triggerShadowRendering(document);
112
+ {{#if isShopify}}
113
+ // Shopify specific: inject scripts into sk-html which set css variables (normally set to html element)
114
+ injectCSSVariableScripts(document);
115
+ {{/if}}
112
116
  {{#if addSSRInnerShadowDomSupport}}
113
117
 
114
118
  overrideCustomElementDefine(document);
115
119
  walkPreRenderedElements(document);
116
120
  {{/if}}
117
121
  {{else}}
118
- // do nothing
122
+ {{#if isShopify}}
123
+ // Shopify specific: inject script which sets css variables on the html element
124
+ injectCSSVariableScripts(document);
125
+ {{else}}
126
+ // do nothing
127
+ {{/if}}
119
128
  {{/if}}
120
129
  },
121
130
  {{#if isPlentymarkets}}
@@ -652,3 +661,81 @@ export const post = async (db, req, res) => {
652
661
  }
653
662
  {{/if}}
654
663
  {{/if}}
664
+ {{#if isShopify}}
665
+
666
+ /**
667
+ * Injects scripts into sk-html within each shadow root that set CSS custom
668
+ * properties (e.g. --window-height, --announcement-bar-height, --header-height)
669
+ * on sk-html instead of the document's html element.
670
+ *
671
+ * @param document
672
+ */
673
+ function injectCSSVariableScripts(document) {
674
+ {{#if addSSR}}
675
+ const customShadowRoots = getCustomShadowElements(document);
676
+ for (const customShadowRoot of customShadowRoots) {
677
+ const skHtml = customShadowRoot.querySelector("sk-html");
678
+ if (!skHtml) continue;
679
+
680
+ const script = document.createElement("script");
681
+ script.textContent = `(${setCSSVariablesOnSkHtml.toString()})();`;
682
+ // insert script before #main so styles are applied earlier
683
+ const main = skHtml.querySelector("#main");
684
+ if (main) {
685
+ main.before(script);
686
+ } else {
687
+ skHtml.appendChild(script);
688
+ }
689
+ }
690
+ {{else}}
691
+ const script = document.createElement("script");
692
+ script.textContent = `(${setCSSVariablesOnHtml.toString()})();`;
693
+ // insert script before #main so styles are applied earlier
694
+ const main = document.querySelector("#main");
695
+ if (!main) return;
696
+ main.before(script);
697
+ {{/if}}
698
+ }
699
+
700
+ /**
701
+ * Client-side script that sets CSS custom properties on {{#if addSSR}}sk-html{{else}}the html element{{/if}}
702
+ * (e.g. --window-height, --announcement-bar-height, --header-height).
703
+ * Injected via .toString() into the document.
704
+ *
705
+ * TODO: double check whether the set CSS variables are being used by the theme
706
+ * and that the queried selectors are correct for this Shopify store.
707
+ */
708
+ /* eslint-disable no-undef -- client-side function serialised via .toString() */
709
+ function {{#if addSSR}}setCSSVariablesOnSkHtml{{else}}setCSSVariablesOnHtml{{/if}}() {
710
+ {{#if addSSR}}
711
+ const host = document.querySelector("sk-shadow-app-root");
712
+ const root = host?.shadowRoot;
713
+ if (!root) return;
714
+ const skHtml = root.querySelector("sk-html");
715
+ if (!skHtml) return;
716
+ {{else}}
717
+ const html = document.querySelector("html");
718
+ if (!html) return;
719
+ {{/if}}
720
+
721
+ requestAnimationFrame(() => {
722
+ const viewportHeight = window.visualViewport ? window.visualViewport.height : document.documentElement.clientHeight;
723
+ {{#if addSSR}}skHtml{{else}}html{{/if}}.style.setProperty("--window-height", viewportHeight + "px");
724
+ });
725
+
726
+ const announcementBar = {{#if addSSR}}root{{else}}document{{/if}}.querySelector('[id^="shopify-section"][id$="announcement-bar"]');
727
+ if (announcementBar) {
728
+ {{#if addSSR}}skHtml{{else}}html{{/if}}.style.setProperty("--announcement-bar-height", announcementBar.clientHeight + "px");
729
+ }
730
+
731
+ const headerElement = {{#if addSSR}}root{{else}}document{{/if}}.querySelector('[id^="shopify-section"][id$="header"]');
732
+ if (headerElement) {
733
+ const headerHeight = headerElement.clientHeight;
734
+ const headerHeightWithoutBottomNav = headerElement.querySelector(".header__wrapper")?.clientHeight;
735
+ {{#if addSSR}}skHtml{{else}}html{{/if}}.style.setProperty("--header-height", headerHeight + "px");
736
+ if (headerHeightWithoutBottomNav != null) {
737
+ {{#if addSSR}}skHtml{{else}}html{{/if}}.style.setProperty("--header-height-without-bottom-nav", headerHeightWithoutBottomNav + "px");
738
+ }
739
+ }
740
+ }
741
+ {{/if}}
@@ -1,5 +1,5 @@
1
- import Install from "../interface/install";
2
- import { ConfigApiService } from "../../config-api";
1
+ import Install from "../interface/install.js";
2
+ import { ConfigApiService } from "../../config-api/index.js";
3
3
  export default class InstallResourceBuilder {
4
4
  changed: boolean;
5
5
  resource: Install;
@@ -1,8 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const deepmerge_1 = tslib_1.__importDefault(require("deepmerge"));
5
- class InstallResourceBuilder {
1
+ import deepmerge from "deepmerge";
2
+ export default class InstallResourceBuilder {
6
3
  changed = false;
7
4
  resource;
8
5
  configApi;
@@ -42,9 +39,8 @@ class InstallResourceBuilder {
42
39
  return this.resource;
43
40
  }
44
41
  deepMerge(object1, object2) {
45
- return (0, deepmerge_1.default)(object1, object2, {
42
+ return deepmerge(object1, object2, {
46
43
  arrayMerge: (destinationArray, sourceArray, _options) => sourceArray,
47
44
  });
48
45
  }
49
46
  }
50
- exports.default = InstallResourceBuilder;
@@ -1,7 +1,7 @@
1
- import { PostDeployCheckInterface } from "../../deploy-service-model";
2
- import { FileListInterface } from "../../../integration-api";
3
- import { CliService } from "../../../cli";
4
- import { ConfigApiService } from "../../../config-api";
1
+ import { PostDeployCheckInterface } from "../../deploy-service-model.js";
2
+ import { FileListInterface } from "../../../integration-api/index.js";
3
+ import { CliService } from "../../../cli/index.js";
4
+ import { ConfigApiService } from "../../../config-api/index.js";
5
5
  export declare class DeprecatedDeploymentDetectionCheck implements PostDeployCheckInterface {
6
6
  private fileList;
7
7
  private cli;
@@ -1,11 +1,7 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DeprecatedDeploymentDetectionCheck = void 0;
4
- const cli_1 = require("../../../cli");
5
- const files_1 = require("../../../../models/files");
6
- const safe_1 = require("../../../../helpers/safe");
7
- const post_deploy_deployment_detection_error_1 = require("../../error/post-deploy-deployment-detection-error");
8
- class DeprecatedDeploymentDetectionCheck {
1
+ import { INTEGRATION_FILES } from "../../../../models/files.js";
2
+ import { safe } from "../../../../helpers/safe.js";
3
+ import { PostDeployDeploymentDetectionError } from "../../error/post-deploy-deployment-detection-error.js";
4
+ export class DeprecatedDeploymentDetectionCheck {
9
5
  fileList;
10
6
  cli;
11
7
  configApi;
@@ -17,18 +13,18 @@ class DeprecatedDeploymentDetectionCheck {
17
13
  this.app = app;
18
14
  }
19
15
  async check() {
20
- this.cli.startAction("[postDeployCheck] deploymentDetection");
21
- const configFile = this.fileList.getByName(files_1.INTEGRATION_FILES.CONFIG.DOCUMENT_HANDLER);
22
- const moduleFile = this.fileList.getByName(files_1.INTEGRATION_FILES.DEPRECATED.DEPLOYMENT_DETECTION);
16
+ this.cli.startAction("POST:CHECK:DEPLOYMENT_DETECTION", "[postDeployCheck] deploymentDetection");
17
+ const configFile = this.fileList.getByName(INTEGRATION_FILES.CONFIG.DOCUMENT_HANDLER);
18
+ const moduleFile = this.fileList.getByName(INTEGRATION_FILES.DEPRECATED.DEPLOYMENT_DETECTION);
23
19
  // no config_documentHandler or module: deploymentDetection found
24
20
  if (!configFile || moduleFile) {
25
- this.cli.endAction(cli_1.CliActionStatus.COMPLETED);
21
+ this.cli.successAction("POST:CHECK:DEPLOYMENT_DETECTION");
26
22
  return;
27
23
  }
28
24
  const content = configFile.getContent();
29
25
  if (!content.includes("executeDeploymentDetection: true") &&
30
26
  !content.includes("executeDeploymentDetection: {")) {
31
- this.cli.endAction(cli_1.CliActionStatus.COMPLETED);
27
+ this.cli.successAction("POST:CHECK:DEPLOYMENT_DETECTION");
32
28
  return;
33
29
  }
34
30
  const entityManager = await this.configApi.client.getEntityManager();
@@ -36,8 +32,8 @@ class DeprecatedDeploymentDetectionCheck {
36
32
  .find()
37
33
  .eq("id", "/db/jobs.Definition/deployment-check")
38
34
  .singleResult();
39
- const moduleResult = await (0, safe_1.safe)(this.configApi.getModule(files_1.INTEGRATION_FILES.DEPRECATED.DEPLOYMENT_DETECTION));
40
- this.cli.endAction(cli_1.CliActionStatus.COMPLETED);
35
+ const moduleResult = await safe(this.configApi.getModule(INTEGRATION_FILES.DEPRECATED.DEPLOYMENT_DETECTION));
36
+ this.cli.successAction("POST:CHECK:DEPLOYMENT_DETECTION");
41
37
  if (deployCheckJob) {
42
38
  this.cli.writeWarning(`Found active Job for ${this.cli.style.bold("deprecated")} deploymentDetection in app: ${this.app}`);
43
39
  if (await this.cli.confirm("Delete job for deploymentDetection?")) {
@@ -49,24 +45,23 @@ class DeprecatedDeploymentDetectionCheck {
49
45
  moduleResult.data.length > 0) {
50
46
  this.cli.writeWarning(`Found ${this.cli.style.bold("deprecated")} module deploymentDetection in app: ${this.app}`);
51
47
  if (await this.cli.confirm("Delete module deploymentDetection?")) {
52
- this.cli.startAction("Delete module deploymentDetection");
53
- await this.configApi.deleteModule(files_1.INTEGRATION_FILES.DEPRECATED.DEPLOYMENT_DETECTION);
54
- this.cli.endAction(cli_1.CliActionStatus.COMPLETED);
48
+ this.cli.startAction("POST:CHECK:DEPLOYMENT_DETECTION:DELETE", "Delete module deploymentDetection");
49
+ await this.configApi.deleteModule(INTEGRATION_FILES.DEPRECATED.DEPLOYMENT_DETECTION);
50
+ this.cli.successAction("POST:CHECK:DEPLOYMENT_DETECTION:DELETE");
55
51
  }
56
52
  }
57
53
  }
58
54
  async deleteDeploymentJobDefinition(deployCheckJob) {
59
- this.cli.startAction("Delete job deploymentDetection-check");
60
- const result = await (0, safe_1.safe)(deployCheckJob.delete());
55
+ this.cli.startAction("POST:CHECK:DEPLOYMENT_DETECTION:DELETE_CRON", "Delete job deploymentDetection-check");
56
+ const result = await safe(deployCheckJob.delete());
61
57
  if (result.success === true) {
62
- this.cli.endAction(cli_1.CliActionStatus.COMPLETED);
58
+ this.cli.successAction("POST:CHECK:DEPLOYMENT_DETECTION:DELETE_CRON");
63
59
  return;
64
60
  }
65
- this.cli.endAction(cli_1.CliActionStatus.FAILED);
66
- throw new post_deploy_deployment_detection_error_1.PostDeployDeploymentDetectionError(result.error, [
61
+ this.cli.failAction("POST:CHECK:DEPLOYMENT_DETECTION:DELETE_CRON");
62
+ throw new PostDeployDeploymentDetectionError(result.error, [
67
63
  `check https://dashboard.baqend.com/app/${this.app}/db/jobs.Definition`,
68
64
  "delete entry manual",
69
65
  ]);
70
66
  }
71
67
  }
72
- exports.DeprecatedDeploymentDetectionCheck = DeprecatedDeploymentDetectionCheck;
@@ -1,6 +1,6 @@
1
- import { CliService } from "../../../cli";
2
- import { PostDeployCheckInterface } from "../../deploy-service-model";
3
- import { ConfigApiService } from "../../../config-api";
1
+ import { CliService } from "../../../cli/index.js";
2
+ import { PostDeployCheckInterface } from "../../deploy-service-model.js";
3
+ import { ConfigApiService } from "../../../config-api/index.js";
4
4
  export default class RevalidatedModuleCheck implements PostDeployCheckInterface {
5
5
  private readonly configApi;
6
6
  private cli;
@@ -1,11 +1,8 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const cli_1 = require("../../../cli");
4
- const safe_1 = require("../../../../helpers/safe");
5
- const deploy_module_file_error_1 = require("../../error/deploy-module-file-error");
6
- const check_module_file_error_1 = require("../../error/check-module-file-error");
1
+ import { safe } from "../../../../helpers/safe.js";
2
+ import { DeployModuleFileError } from "../../error/deploy-module-file-error.js";
3
+ import { CheckModuleFileError } from "../../error/check-module-file-error.js";
7
4
  const REVALIDATED_MODULE_NAME = "speedKit.Revalidated";
8
- class RevalidatedModuleCheck {
5
+ export default class RevalidatedModuleCheck {
9
6
  configApi;
10
7
  cli;
11
8
  app;
@@ -15,17 +12,16 @@ class RevalidatedModuleCheck {
15
12
  this.app = app;
16
13
  }
17
14
  async check() {
18
- this.cli.startAction("[postDeployCheck] check for revalidated module");
19
- const result = await (0, safe_1.safe)(this.configApi.getModule(REVALIDATED_MODULE_NAME));
15
+ this.cli.startAction("POST:CHECK:REVALIDATED_MODULE", "[postDeployCheck] check for revalidated module");
16
+ const result = await safe(this.configApi.getModule(REVALIDATED_MODULE_NAME));
20
17
  if (result.success === true && result.data) {
21
- this.cli.endAction(cli_1.CliActionStatus.COMPLETED);
18
+ this.cli.successAction("POST:CHECK:REVALIDATED_MODULE");
22
19
  return;
23
20
  }
24
- this.cli.endAction(cli_1.CliActionStatus.FAILED);
21
+ this.cli.failAction("POST:CHECK:REVALIDATED_MODULE");
25
22
  if (result.success === false) {
26
- throw new deploy_module_file_error_1.DeployModuleFileError(result.error);
23
+ throw new DeployModuleFileError(result.error);
27
24
  }
28
- throw new check_module_file_error_1.CheckModuleFileError(`it seems ${REVALIDATED_MODULE_NAME} does not exists in the app ${this.app}`, ["please execute:", `sk generate-pop-config ${this.app}`]);
25
+ throw new CheckModuleFileError(`it seems ${REVALIDATED_MODULE_NAME} does not exists in the app ${this.app}`, ["please execute:", `sk generate-pop-config ${this.app}`]);
29
26
  }
30
27
  }
31
- exports.default = RevalidatedModuleCheck;
@@ -1,6 +1,6 @@
1
- import { CliService } from "../../../cli";
2
- import { FileListInterface, InstallResourceFile } from "../../../integration-api";
3
- import { PostDeployCheckInterface } from "../../deploy-service-model";
1
+ import { CliService } from "../../../cli/index.js";
2
+ import { FileListInterface, InstallResourceFile } from "../../../integration-api/index.js";
3
+ import { PostDeployCheckInterface } from "../../deploy-service-model.js";
4
4
  export default class SaveFilesCheck implements PostDeployCheckInterface {
5
5
  private fileList;
6
6
  private readonly cli;
@@ -1,9 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const cli_1 = require("../../../cli");
4
- const safe_1 = require("../../../../helpers/safe");
5
- const safe_file_error_1 = require("../../error/safe-file-error");
6
- class SaveFilesCheck {
1
+ import { safe } from "../../../../helpers/safe.js";
2
+ import { SafeFileError } from "../../error/safe-file-error.js";
3
+ export default class SaveFilesCheck {
7
4
  fileList;
8
5
  cli;
9
6
  constructor(fileList, cli) {
@@ -20,13 +17,13 @@ class SaveFilesCheck {
20
17
  if (!(await this.cli.confirm(`Changes to localFiles will be saved now. Proceed?`))) {
21
18
  return;
22
19
  }
23
- this.cli.startAction("safe changed files");
24
- const result = await (0, safe_1.safe)(this.safeFiles(fileList));
20
+ this.cli.startAction("POST:DEPLOY:SAVE_FILES", "safe changed files");
21
+ const result = await safe(this.safeFiles(fileList));
25
22
  if (result.success === false) {
26
- this.cli.endAction(cli_1.CliActionStatus.FAILED);
27
- throw new safe_file_error_1.SafeFileError(result.error);
23
+ this.cli.failAction("POST:DEPLOY:SAVE_FILES");
24
+ throw new SafeFileError(result.error);
28
25
  }
29
- this.cli.endAction(cli_1.CliActionStatus.COMPLETED);
26
+ this.cli.successAction("POST:DEPLOY:SAVE_FILES");
30
27
  }
31
28
  async safeFiles(fileList) {
32
29
  for (const file of fileList) {
@@ -35,4 +32,3 @@ class SaveFilesCheck {
35
32
  }
36
33
  }
37
34
  }
38
- exports.default = SaveFilesCheck;
@@ -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 DeviceDetectionChangedCheck {
5
5
  private cli;
6
6
  private fileList;