cloudcommerce 2.1.0 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (158) hide show
  1. package/.github/workflows/test-apps.yml +2 -2
  2. package/.husky/commit-msg +0 -3
  3. package/.husky/pre-commit +0 -3
  4. package/CHANGELOG.md +24 -0
  5. package/README.md +3 -7
  6. package/action.yml +40 -16
  7. package/ecomplus-stores/barra-doce/.github/workflows/build-and-deploy.yml +3 -2
  8. package/ecomplus-stores/barra-doce/.husky/pre-commit +0 -3
  9. package/ecomplus-stores/barra-doce/functions/many/package.json +3 -3
  10. package/ecomplus-stores/barra-doce/functions/ssr/content/pages/brands.json +2 -1
  11. package/ecomplus-stores/barra-doce/functions/ssr/content/pages/categories.json +2 -1
  12. package/ecomplus-stores/barra-doce/functions/ssr/package.json +6 -6
  13. package/ecomplus-stores/barra-doce/functions/ssr/src/assets/style.css +2 -2
  14. package/ecomplus-stores/barra-doce/functions/ssr/src/components/PageTitle.vue +26 -17
  15. package/ecomplus-stores/barra-doce/functions/ssr/src/components/ProductCard.vue +4 -5
  16. package/ecomplus-stores/barra-doce/functions/ssr/src/components/ProductDetails.vue +1 -1
  17. package/ecomplus-stores/barra-doce/functions/ssr/src/components/SearchShowcase.vue +2 -1
  18. package/ecomplus-stores/barra-doce/functions/ssr/src/pages/[...slug].astro +3 -3
  19. package/ecomplus-stores/barra-doce/functions/ssr/src/pages/blog/[page].astro +6 -5
  20. package/ecomplus-stores/barra-doce/functions/with-apps/package.json +3 -3
  21. package/ecomplus-stores/barra-doce/package.json +4 -6
  22. package/ecomplus-stores/tia-sonia/.github/workflows/build-and-deploy.yml +4 -2
  23. package/ecomplus-stores/tia-sonia/package.json +0 -2
  24. package/package.json +10 -10
  25. package/packages/api/package.json +1 -1
  26. package/packages/apps/affiliate-program/package.json +1 -1
  27. package/packages/apps/correios/package.json +2 -2
  28. package/packages/apps/custom-payment/package.json +1 -1
  29. package/packages/apps/custom-shipping/package.json +1 -1
  30. package/packages/apps/datafrete/package.json +2 -2
  31. package/packages/apps/discounts/package.json +1 -1
  32. package/packages/apps/emails/package.json +1 -1
  33. package/packages/apps/fb-conversions/package.json +1 -1
  34. package/packages/apps/flash-courier/package.json +2 -2
  35. package/packages/apps/frenet/package.json +2 -2
  36. package/packages/apps/galaxpay/package.json +2 -2
  37. package/packages/apps/google-analytics/package.json +2 -2
  38. package/packages/apps/jadlog/package.json +2 -2
  39. package/packages/apps/loyalty-points/package.json +1 -1
  40. package/packages/apps/mandae/package.json +2 -2
  41. package/packages/apps/melhor-envio/package.json +2 -2
  42. package/packages/apps/mercadopago/package.json +2 -2
  43. package/packages/apps/pagarme/package.json +2 -2
  44. package/packages/apps/pagarme-v5/package.json +2 -2
  45. package/packages/apps/paghiper/package.json +2 -2
  46. package/packages/apps/pix/package.json +2 -2
  47. package/packages/apps/tiny-erp/package.json +2 -2
  48. package/packages/apps/webhooks/package.json +2 -2
  49. package/packages/cli/ci/bunny-config-base.sh +68 -12
  50. package/packages/cli/ci/bunny-prepare-ab.sh +35 -26
  51. package/packages/cli/ci/bunny-remove-ab.sh +54 -0
  52. package/packages/cli/ci/bunny-setup.sh +103 -0
  53. package/packages/cli/config/firebase.json +0 -13
  54. package/packages/cli/lib/cli.js +4 -12
  55. package/packages/cli/package.json +2 -2
  56. package/packages/cli/src/cli.ts +8 -12
  57. package/packages/config/package.json +1 -1
  58. package/packages/emails/package.json +2 -2
  59. package/packages/eslint/package.json +2 -2
  60. package/packages/events/package.json +1 -1
  61. package/packages/feeds/package.json +1 -1
  62. package/packages/firebase/package.json +2 -2
  63. package/packages/i18n/package.json +1 -1
  64. package/packages/modules/package.json +2 -2
  65. package/packages/passport/package.json +1 -1
  66. package/packages/ssr/lib/lib/cron-ssr-save-views.js +76 -4
  67. package/packages/ssr/lib/lib/cron-ssr-save-views.js.map +1 -1
  68. package/packages/ssr/package.json +4 -4
  69. package/packages/ssr/src/lib/cron-ssr-save-views.ts +78 -4
  70. package/packages/storefront/client.d.ts +2 -0
  71. package/packages/storefront/dist/client/_astro/{AccountPage.9BlGHXT3.js → AccountPage.89hLh9p2.js} +1 -1
  72. package/packages/storefront/dist/client/_astro/{CartSidebar.55UgTcV0.js → CartSidebar.G25ZUnKP.js} +1 -1
  73. package/packages/storefront/dist/client/_astro/{ProductDetails.ENLKdSz_.js → ProductDetails.ntFWLjla.js} +1 -1
  74. package/packages/storefront/dist/client/_astro/{ProductShelf.lCBJky3e.js → ProductShelf.PPitdYxI.js} +1 -1
  75. package/packages/storefront/dist/client/_astro/{ProductShelf.CNf5JDrU.js → ProductShelf.xSxmHkTe.js} +1 -1
  76. package/packages/storefront/dist/client/_astro/{SearchModal.4osqtafp.js → SearchModal.R55jFaBZ.js} +1 -1
  77. package/packages/storefront/dist/client/_astro/{SearchShowcase.hg6TWrz3.js → SearchShowcase.I1PPFu_n.js} +1 -1
  78. package/packages/storefront/dist/client/_astro/{ShopHeader.xLMeJpqV.js → ShopHeader.OLf0l4Ot.js} +2 -2
  79. package/packages/storefront/dist/client/_astro/{_slug_.r344YGqG.css → _slug_.Hc-dqhcW.css} +1 -1
  80. package/packages/storefront/dist/client/_astro/customer-session.AcETMuhI.js +7 -0
  81. package/packages/storefront/dist/client/_astro/ecom-icon_12falx.png +0 -0
  82. package/packages/storefront/dist/client/_astro/ecom-icon_15pqnO.png +0 -0
  83. package/packages/storefront/dist/client/_astro/ecom-icon_t3guw.png +0 -0
  84. package/packages/storefront/dist/client/_astro/{firebase-app.cPMfoOsn.js → firebase-app.VduCDgof.js} +1 -1
  85. package/packages/storefront/dist/client/_astro/headphone_T2Jjc.avif +0 -0
  86. package/packages/storefront/dist/client/_astro/headphone_Z1CG18r.webp +0 -0
  87. package/packages/storefront/dist/client/_astro/{hoisted.J15ErMtK.js → hoisted.PxLuJZKI.js} +1 -1
  88. package/packages/storefront/dist/client/_astro/{hoisted.KYhwGfsv.js → hoisted.WBjTfX6e.js} +1 -1
  89. package/packages/storefront/dist/client/_astro/{hoisted.HGTzAuTI.js → hoisted.Wi6YpdWJ.js} +1 -1
  90. package/packages/storefront/dist/client/_astro/{index-dd468b12.D5s8VdAL.js → index-dd468b12.fl8bpn8l.js} +3 -3
  91. package/packages/storefront/dist/client/_astro/logo_1UBsBq.webp +0 -0
  92. package/packages/storefront/dist/client/_astro/logo_Z1K5PE9.png +0 -0
  93. package/packages/storefront/dist/client/_astro/logo_Z1KIIl1.avif +0 -0
  94. package/packages/storefront/dist/client/_astro/passion_LHbe9.webp +0 -0
  95. package/packages/storefront/dist/client/_astro/passion_Z23MeUb.avif +0 -0
  96. package/packages/storefront/dist/client/_astro/rect8589_1TtOHY.png +0 -0
  97. package/packages/storefront/dist/client/_astro/rect8589_1f5opX.webp +0 -0
  98. package/packages/storefront/dist/client/_astro/rect8589_IUskt.webp +0 -0
  99. package/packages/storefront/dist/client/_astro/rect8589_Uxfdf.png +0 -0
  100. package/packages/storefront/dist/client/_astro/rect8589_Z15uApA.png +0 -0
  101. package/packages/storefront/dist/client/_astro/rect8589_Z1Ap1Im.avif +0 -0
  102. package/packages/storefront/dist/client/_astro/rect8589_Z1JT1HB.webp +0 -0
  103. package/packages/storefront/dist/client/_astro/rect8589_ZY9mtN.avif +0 -0
  104. package/packages/storefront/dist/client/_astro/rect8589_tMFW0.avif +0 -0
  105. package/packages/storefront/dist/client/_astro/rect859_1TgQXS.avif +0 -0
  106. package/packages/storefront/dist/client/_astro/rect859_2Nm1z.avif +0 -0
  107. package/packages/storefront/dist/client/_astro/rect859_DIqwR.png +0 -0
  108. package/packages/storefront/dist/client/_astro/rect859_Z1IKDb2.png +0 -0
  109. package/packages/storefront/dist/client/_astro/rect859_Z29FI4V.webp +0 -0
  110. package/packages/storefront/dist/client/_astro/rect859_Z2kFHGk.avif +0 -0
  111. package/packages/storefront/dist/client/_astro/rect859_ZkpPFI.webp +0 -0
  112. package/packages/storefront/dist/client/_astro/rect859_jXzBi.png +0 -0
  113. package/packages/storefront/dist/client/_astro/rect859_x1l16.webp +0 -0
  114. package/packages/storefront/dist/client/_astro/rect89_1TSfW7.avif +0 -0
  115. package/packages/storefront/dist/client/_astro/rect89_Z1re32x.webp +0 -0
  116. package/packages/storefront/dist/client/_astro/{shopping-cart.ZdSCrjS6.js → shopping-cart.dJsZkyuD.js} +1 -1
  117. package/packages/storefront/dist/client/_astro/use-analytics.uqK_2k_k.js +1 -0
  118. package/packages/storefront/dist/client/_astro/{use-product-card.-9TsgDDW.js → use-product-card.WRVLjenR.js} +1 -1
  119. package/packages/storefront/dist/client/~fallback.html +98 -0
  120. package/packages/storefront/dist/client/~index.html +128 -0
  121. package/packages/storefront/dist/server/chunks/{CartSidebar_7UWmGIF6.mjs → CartSidebar_yYIzwp_R.mjs} +1 -1
  122. package/packages/storefront/dist/server/chunks/{SearchModal_MNdcYMws.mjs → SearchModal_GvRUZ6ce.mjs} +1 -1
  123. package/packages/storefront/dist/server/chunks/{_.._h5R83hoK.mjs → _.._Lq3r7hpv.mjs} +1 -1
  124. package/packages/storefront/dist/server/chunks/{_page__lWVlZyRe.mjs → _page__LqbeNfr1.mjs} +1 -1
  125. package/packages/storefront/dist/server/chunks/{account_jmelxnlw.mjs → account_4n4rpirV.mjs} +1 -1
  126. package/packages/storefront/dist/server/chunks/astro/{assets-service_xNulQtBO.mjs → assets-service_yXRChsFH.mjs} +11 -66
  127. package/packages/storefront/dist/server/chunks/{astro_tggR3S_9.mjs → astro_F4pl3toV.mjs} +1 -7
  128. package/packages/storefront/dist/server/chunks/{index_e3ytAL8v.mjs → index_SwXtE1IM.mjs} +1 -1
  129. package/packages/storefront/dist/server/chunks/{node_kUJIRL0c.mjs → node_Nzz44v5l.mjs} +1 -1
  130. package/packages/storefront/dist/server/chunks/pages/{__wihn0dYD.mjs → __z8Igc_-f.mjs} +102 -298
  131. package/packages/storefront/dist/server/chunks/pages/{_page__Sb1eYhpz.mjs → _page__-V1Q-Ymk.mjs} +3 -17
  132. package/packages/storefront/dist/server/chunks/pages/account_frSUn7gD.mjs +22 -0
  133. package/packages/storefront/dist/server/chunks/pages/{index_mQXYNYRg.mjs → index_QqJiJpFy.mjs} +4 -15
  134. package/packages/storefront/dist/server/chunks/pages/node_FoDIj_f7.mjs +257 -0
  135. package/packages/storefront/dist/server/chunks/pages/~fallback_t0lNhRm9.mjs +33 -0
  136. package/packages/storefront/dist/server/chunks/~fallback_EWqi0UyU.mjs +6 -0
  137. package/packages/storefront/dist/server/entry.mjs +8 -8
  138. package/packages/storefront/dist/server/images.dist.csv +30 -0
  139. package/packages/storefront/dist/server/images.src.csv +11 -0
  140. package/packages/storefront/dist/server/manifest_ZHJUD8_m.mjs +196 -0
  141. package/packages/storefront/dist/server/renderers.mjs +1 -1
  142. package/packages/storefront/dist/server/static-builds.csv +71 -0
  143. package/packages/storefront/package.json +7 -7
  144. package/packages/storefront/src/lib/composables/use-search-showcase.ts +34 -8
  145. package/packages/storefront/src/lib/layouts/BaseHead.astro +1 -0
  146. package/packages/storefront/src/lib/state/search-engine.ts +7 -2
  147. package/packages/storefront/src/lib/state/use-analytics.ts +24 -6
  148. package/packages/test-base/package.json +1 -1
  149. package/packages/types/package.json +1 -1
  150. package/ecomplus-stores/barra-doce/LICENSE.md +0 -230
  151. package/ecomplus-stores/tia-sonia/LICENSE.md +0 -230
  152. package/packages/storefront/dist/client/_astro/customer-session.hXdZh5Ii.js +0 -7
  153. package/packages/storefront/dist/client/_astro/use-analytics.tCrQbW8O.js +0 -1
  154. package/packages/storefront/dist/server/chunks/pages/account_-mULVQUB.mjs +0 -32
  155. package/packages/storefront/dist/server/chunks/pages/node_-qe5LuQh.mjs +0 -112
  156. package/packages/storefront/dist/server/chunks/pages/~fallback_ad_xyGHU.mjs +0 -58
  157. package/packages/storefront/dist/server/chunks/~fallback_EZqiEAFE.mjs +0 -6
  158. package/packages/storefront/dist/server/manifest_RrmXPEuL.mjs +0 -196
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-discounts",
3
3
  "type": "module",
4
- "version": "2.1.0",
4
+ "version": "2.2.1",
5
5
  "description": "E-Com Plus Cloud Commerce app for complex discount rules",
6
6
  "main": "lib/discounts.js",
7
7
  "repository": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-emails",
3
3
  "type": "module",
4
- "version": "2.1.0",
4
+ "version": "2.2.1",
5
5
  "description": "E-Com Plus Cloud Commerce default transactional email app",
6
6
  "main": "lib/index.js",
7
7
  "repository": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-fb-conversions",
3
3
  "type": "module",
4
- "version": "2.1.0",
4
+ "version": "2.2.1",
5
5
  "description": "E-Com Plus Cloud Commerce app to send carts/orders to Facebook Conversions API",
6
6
  "main": "lib/index.js",
7
7
  "repository": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-flash-courier",
3
3
  "type": "module",
4
- "version": "2.1.0",
4
+ "version": "2.2.1",
5
5
  "description": "E-Com Plus Cloud Commerce app to integrate Flash Courier",
6
6
  "main": "lib/index.js",
7
7
  "exports": {
@@ -25,7 +25,7 @@
25
25
  "dependencies": {
26
26
  "@cloudcommerce/api": "workspace:*",
27
27
  "@cloudcommerce/firebase": "workspace:*",
28
- "axios": "^1.6.5",
28
+ "axios": "^1.6.7",
29
29
  "firebase-functions": "^4.6.0"
30
30
  },
31
31
  "devDependencies": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-frenet",
3
3
  "type": "module",
4
- "version": "2.1.0",
4
+ "version": "2.2.1",
5
5
  "description": "E-Com Plus Cloud Commerce app for Frenet shipping calculation",
6
6
  "main": "lib/frenet.js",
7
7
  "exports": {
@@ -26,7 +26,7 @@
26
26
  "dependencies": {
27
27
  "@cloudcommerce/api": "workspace:*",
28
28
  "@cloudcommerce/firebase": "workspace:*",
29
- "axios": "^1.6.5",
29
+ "axios": "^1.6.7",
30
30
  "firebase-admin": "^12.0.0",
31
31
  "firebase-functions": "^4.6.0"
32
32
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-galaxpay",
3
3
  "type": "module",
4
- "version": "2.1.0",
4
+ "version": "2.2.1",
5
5
  "description": "E-Com Plus Cloud Commerce app to integrate Galax Pay for recurring payments",
6
6
  "main": "lib/galaxpay.js",
7
7
  "exports": {
@@ -25,7 +25,7 @@
25
25
  "dependencies": {
26
26
  "@cloudcommerce/api": "workspace:*",
27
27
  "@cloudcommerce/firebase": "workspace:*",
28
- "axios": "^1.6.5",
28
+ "axios": "^1.6.7",
29
29
  "firebase-admin": "^12.0.0",
30
30
  "firebase-functions": "^4.6.0"
31
31
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-google-analytics",
3
3
  "type": "module",
4
- "version": "2.1.0",
4
+ "version": "2.2.1",
5
5
  "description": "E-Com Plus Cloud Commerce app to send carts/orders events to GA Measurement Protocol",
6
6
  "main": "lib/index.js",
7
7
  "repository": {
@@ -21,7 +21,7 @@
21
21
  "dependencies": {
22
22
  "@cloudcommerce/api": "workspace:*",
23
23
  "@cloudcommerce/firebase": "workspace:*",
24
- "axios": "^1.6.5",
24
+ "axios": "^1.6.7",
25
25
  "firebase-admin": "^12.0.0",
26
26
  "firebase-functions": "^4.6.0"
27
27
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-jadlog",
3
3
  "type": "module",
4
- "version": "2.1.0",
4
+ "version": "2.2.1",
5
5
  "description": "E-Com Plus Cloud Commerce app for Jadlog shipping calculation",
6
6
  "main": "lib/index.js",
7
7
  "repository": {
@@ -20,7 +20,7 @@
20
20
  },
21
21
  "dependencies": {
22
22
  "@cloudcommerce/api": "workspace:*",
23
- "axios": "^1.6.5"
23
+ "axios": "^1.6.7"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@cloudcommerce/types": "workspace:*"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-loyalty-points",
3
3
  "type": "module",
4
- "version": "2.1.0",
4
+ "version": "2.2.1",
5
5
  "description": "E-Com Plus Cloud Commerce app to handle simple loyalty points programs",
6
6
  "main": "lib/loyalty-points.js",
7
7
  "exports": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-mandae",
3
3
  "type": "module",
4
- "version": "2.1.0",
4
+ "version": "2.2.1",
5
5
  "description": "E-Com Plus Cloud Commerce app to integrate Mandaê shipping intermediator",
6
6
  "main": "lib/index.js",
7
7
  "repository": {
@@ -21,7 +21,7 @@
21
21
  "dependencies": {
22
22
  "@cloudcommerce/api": "workspace:*",
23
23
  "@ecomplus/utils": "1.5.0-rc.6",
24
- "axios": "^1.6.5",
24
+ "axios": "^1.6.7",
25
25
  "firebase-functions": "^4.6.0"
26
26
  },
27
27
  "devDependencies": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-melhor-envio",
3
3
  "type": "module",
4
- "version": "2.1.0",
4
+ "version": "2.2.1",
5
5
  "description": "E-Com Plus Cloud Commerce app to integrate Melhor Envio",
6
6
  "main": "lib/index.js",
7
7
  "exports": {
@@ -25,7 +25,7 @@
25
25
  "dependencies": {
26
26
  "@cloudcommerce/api": "workspace:*",
27
27
  "@cloudcommerce/firebase": "workspace:*",
28
- "axios": "^1.6.5",
28
+ "axios": "^1.6.7",
29
29
  "firebase-admin": "^12.0.0",
30
30
  "firebase-functions": "^4.6.0"
31
31
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-mercadopago",
3
3
  "type": "module",
4
- "version": "2.1.0",
4
+ "version": "2.2.1",
5
5
  "description": "E-Com Plus Cloud Commerce app to integrate Mercado Pago",
6
6
  "main": "lib/mercadopago.js",
7
7
  "exports": {
@@ -26,7 +26,7 @@
26
26
  "dependencies": {
27
27
  "@cloudcommerce/api": "workspace:*",
28
28
  "@cloudcommerce/firebase": "workspace:*",
29
- "axios": "^1.6.5",
29
+ "axios": "^1.6.7",
30
30
  "firebase-admin": "^12.0.0",
31
31
  "firebase-functions": "^4.6.0"
32
32
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-pagarme",
3
3
  "type": "module",
4
- "version": "2.1.0",
4
+ "version": "2.2.1",
5
5
  "description": "E-Com Plus Cloud Commerce app to integrate Pagar.me",
6
6
  "main": "lib/pagarme.js",
7
7
  "exports": {
@@ -25,7 +25,7 @@
25
25
  "dependencies": {
26
26
  "@cloudcommerce/api": "workspace:*",
27
27
  "@cloudcommerce/firebase": "workspace:*",
28
- "axios": "^1.6.5",
28
+ "axios": "^1.6.7",
29
29
  "firebase-admin": "^12.0.0",
30
30
  "firebase-functions": "^4.6.0",
31
31
  "pagarme": "^4.33.1",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-pagarme-v5",
3
3
  "type": "module",
4
- "version": "2.1.0",
4
+ "version": "2.2.1",
5
5
  "description": "E-Com Plus Cloud Commerce app to integrate Pagar.me API v5 with recurring payments",
6
6
  "main": "lib/index.js",
7
7
  "exports": {
@@ -27,7 +27,7 @@
27
27
  "@cloudcommerce/api": "workspace:*",
28
28
  "@cloudcommerce/firebase": "workspace:*",
29
29
  "@ecomplus/utils": "1.5.0-rc.6",
30
- "axios": "^1.6.5",
30
+ "axios": "^1.6.7",
31
31
  "firebase-admin": "^12.0.0",
32
32
  "firebase-functions": "^4.6.0"
33
33
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-paghiper",
3
3
  "type": "module",
4
- "version": "2.1.0",
4
+ "version": "2.2.1",
5
5
  "description": "E-Com Plus Cloud Commerce app to integrate PagHiper",
6
6
  "main": "lib/paghiper.js",
7
7
  "exports": {
@@ -25,7 +25,7 @@
25
25
  "dependencies": {
26
26
  "@cloudcommerce/api": "workspace:*",
27
27
  "@cloudcommerce/firebase": "workspace:*",
28
- "axios": "^1.6.5",
28
+ "axios": "^1.6.7",
29
29
  "firebase-admin": "^12.0.0",
30
30
  "firebase-functions": "^4.6.0"
31
31
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-pix",
3
3
  "type": "module",
4
- "version": "2.1.0",
4
+ "version": "2.2.1",
5
5
  "description": "E-Com Plus Cloud Commerce app to integrate Pix API (Bacen)",
6
6
  "main": "lib/pix.js",
7
7
  "exports": {
@@ -25,7 +25,7 @@
25
25
  "dependencies": {
26
26
  "@cloudcommerce/api": "workspace:*",
27
27
  "@cloudcommerce/firebase": "workspace:*",
28
- "axios": "^1.6.5",
28
+ "axios": "^1.6.7",
29
29
  "firebase-admin": "^12.0.0",
30
30
  "firebase-functions": "^4.6.0"
31
31
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-tiny-erp",
3
3
  "type": "module",
4
- "version": "2.1.0",
4
+ "version": "2.2.1",
5
5
  "description": "E-Com Plus Cloud Commerce app for Tiny ERP",
6
6
  "main": "lib/tiny-erp.js",
7
7
  "repository": {
@@ -22,7 +22,7 @@
22
22
  "@cloudcommerce/api": "workspace:*",
23
23
  "@cloudcommerce/firebase": "workspace:*",
24
24
  "@ecomplus/utils": "1.5.0-rc.6",
25
- "axios": "^1.6.5",
25
+ "axios": "^1.6.7",
26
26
  "firebase-admin": "^12.0.0",
27
27
  "firebase-functions": "^4.6.0",
28
28
  "form-data": "4.0.0"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-webhooks",
3
3
  "type": "module",
4
- "version": "2.1.0",
4
+ "version": "2.2.1",
5
5
  "description": "E-Com Plus Cloud Commerce app for general order webhooks",
6
6
  "main": "lib/index.js",
7
7
  "repository": {
@@ -21,7 +21,7 @@
21
21
  "dependencies": {
22
22
  "@cloudcommerce/api": "workspace:*",
23
23
  "@cloudcommerce/firebase": "workspace:*",
24
- "axios": "^1.6.5",
24
+ "axios": "^1.6.7",
25
25
  "firebase-admin": "^12.0.0",
26
26
  "firebase-functions": "^4.6.0"
27
27
  },
@@ -5,11 +5,16 @@ if [ -z "$BUNNYNET_API_KEY" ]; then
5
5
  exit 1
6
6
  fi
7
7
  if [ $# -eq 0 ]; then
8
+ echo "Provide the Firebase project ID as the first argument"
9
+ exit 1
10
+ fi
11
+ if [ $# -eq 1 ]; then
8
12
  echo "Provide the domain as the first argument"
9
13
  exit 1
10
14
  fi
11
15
 
12
- domain=$1
16
+ project_id=$1
17
+ domain=$2
13
18
 
14
19
  response=$(curl --silent --request GET \
15
20
  --url https://api.bunny.net/pullzone \
@@ -51,9 +56,7 @@ curl --silent --request POST \
51
56
  "css"
52
57
  ],
53
58
  "EnableAccessControlOriginHeader": true,
54
- "DisableCookies": false,
55
- "EnableOriginShield": true,
56
- "CacheControlMaxAgeOverride": -1,
59
+ "DisableCookies": true,
57
60
  "CacheControlPublicMaxAgeOverride": -1,
58
61
  "BurstSize": 0,
59
62
  "RequestLimit": 0,
@@ -70,11 +73,8 @@ curl --silent --request POST \
70
73
  "EnableAvifVary": false,
71
74
  "EnableCountryCodeVary": false,
72
75
  "EnableMobileVary": false,
73
- "EnableCookieVary": true,
74
- "CookieVaryParameters": [
75
- "bid",
76
- "branch"
77
- ],
76
+ "EnableCookieVary": false,
77
+ "CookieVaryParameters": [],
78
78
  "EnableHostnameVary": false,
79
79
  "LoggingIPAnonymizationEnabled": true,
80
80
  "EnableTLS1": true,
@@ -87,7 +87,6 @@ curl --silent --request POST \
87
87
  "LogForwardingEnabled": false,
88
88
  "LoggingSaveToStorage": false,
89
89
  "FollowRedirects": false,
90
- "PermaCacheStorageZoneId": 0,
91
90
  "OriginRetries": 0,
92
91
  "OriginConnectTimeout": 5,
93
92
  "OriginResponseTimeout": 15,
@@ -112,7 +111,7 @@ curl --silent --request POST \
112
111
  "LogForwardingFormat": 1,
113
112
  "ShieldDDosProtectionType": 1,
114
113
  "ShieldDDosProtectionEnabled": false,
115
- "EnableRequestCoalescing": true,
114
+ "EnableRequestCoalescing": false,
116
115
  "RequestCoalescingTimeout": 30,
117
116
  "DisableLetsEncrypt": false,
118
117
  "EnableBunnyImageAi": false,
@@ -162,8 +161,65 @@ configure_edge_rule "APIs bypass CDN cache" '
162
161
  "Parameter1": ""
163
162
  }
164
163
  ],
165
- "TriggerMatchingType": 0,
164
+ "TriggerMatchingType": 1,
166
165
  "Description": "APIs bypass CDN cache",
167
166
  "Enabled": true
168
167
  }
169
168
  '
169
+
170
+ configure_edge_rule "APIs bypass perma-cache" '
171
+ {
172
+ "ActionType": 15,
173
+ "ActionParameter1": null,
174
+ "ActionParameter2": null,
175
+ "Triggers": [
176
+ {
177
+ "Type": 0,
178
+ "PatternMatches": [
179
+ "*/_api/*",
180
+ "*/_feeds/*",
181
+ "*/.*/git/*",
182
+ "*/_analytics"
183
+ ],
184
+ "PatternMatchingType": 0,
185
+ "Parameter1": ""
186
+ }
187
+ ],
188
+ "TriggerMatchingType": 1,
189
+ "Description": "APIs bypass perma-cache",
190
+ "Enabled": true
191
+ }
192
+ '
193
+
194
+ configure_edge_rule "SSR browser cache" '
195
+ {
196
+ "ActionType": 16,
197
+ "ActionParameter1": "120",
198
+ "ActionParameter2": null,
199
+ "Triggers": [
200
+ {
201
+ "Type": 0,
202
+ "PatternMatches": [
203
+ "*/_astro/*"
204
+ ],
205
+ "PatternMatchingType": 2,
206
+ "Parameter1": ""
207
+ },
208
+ {
209
+ "Type": 3,
210
+ "PatternMatches": [
211
+ "webp",
212
+ "png",
213
+ "jpg",
214
+ "woff2",
215
+ "mp4"
216
+ ],
217
+ "PatternMatchingType": 2,
218
+ "Parameter1": ""
219
+ }
220
+ ],
221
+ "TriggerMatchingType": 1,
222
+ "Description": "SSR browser cache",
223
+ "Enabled": true
224
+ }
225
+ '
@@ -5,17 +5,17 @@ if [ -z "$BUNNYNET_API_KEY" ]; then
5
5
  exit 1
6
6
  fi
7
7
  if [ $# -eq 0 ]; then
8
+ echo "Provide the Firebase project ID as the first argument"
9
+ exit 1
10
+ fi
11
+ if [ $# -eq 1 ]; then
8
12
  echo "Provide the domain as the first argument"
9
13
  exit 1
10
14
  fi
11
15
 
12
- domain=$1
13
- channel_url=$2
14
-
15
- curl --request POST \
16
- --url "https://api.bunny.net/purge?url=https://$domain/&async=false" \
17
- --header "AccessKey: $BUNNYNET_API_KEY"
18
- echo "> Purged https://$domain/ cache"
16
+ project_id=$1
17
+ domain=$2
18
+ channel_url=$3
19
19
 
20
20
  base_uri=""
21
21
  additional_patterns=()
@@ -27,16 +27,12 @@ fetch_and_purge() {
27
27
 
28
28
  for slug in $slugs; do
29
29
  if [ -n "$slug" ]; then
30
- curl --request POST \
31
- --url "https://api.bunny.net/purge?url=https://$domain/$slug" \
32
- --header "AccessKey: $BUNNYNET_API_KEY"
33
30
  additional_patterns+=("\"https://$domain/$slug\"")
34
- echo "> Purged https://$domain/$slug cache"
35
31
  fi
36
32
  done
37
33
  }
38
34
 
39
- if [ ! -z "$ECOM_STORE_ID" ]; then
35
+ if [ -n "$ECOM_STORE_ID" ]; then
40
36
  base_uri="https://ecomplus.io/v2/:$ECOM_STORE_ID/"
41
37
 
42
38
  fetch_and_purge 'products?fields=slug&sort=-sales&limit=2'
@@ -119,31 +115,31 @@ ab_testing_data="
119
115
  \"Enabled\": true
120
116
  }"
121
117
 
122
- ab_testing_cookie_data="
118
+ ab_testing_bypass_data="
123
119
  {
124
- \"ActionType\": 2,
125
- \"ActionParameter1\": \"$channel_url\",
120
+ \"ActionType\": 3,
121
+ \"ActionParameter1\": \"0\",
126
122
  \"ActionParameter2\": \"\",
127
123
  \"Triggers\": [
128
124
  {
129
- \"Type\": 10,
125
+ \"Type\": 0,
130
126
  \"PatternMatches\": [
131
- \"$GIT_BRANCH\"
127
+ \"https://$domain/\"
132
128
  ],
133
129
  \"PatternMatchingType\": 0,
134
- \"Parameter1\": \"branch\"
130
+ \"Parameter1\": \"\"
135
131
  }
136
132
  ],
137
133
  \"TriggerMatchingType\": 1,
138
- \"Description\": \"A/B testing cookie [$GIT_BRANCH]\",
134
+ \"Description\": \"A/B CDN cache bypass [$GIT_BRANCH]\",
139
135
  \"Enabled\": true
140
136
  }"
141
137
 
142
- ab_testing_bypass_data="
138
+ ab_testing_perma_bypass_data="
143
139
  {
144
- \"ActionType\": 3,
145
- \"ActionParameter1\": \"0\",
146
- \"ActionParameter2\": \"\",
140
+ \"ActionType\": 15,
141
+ \"ActionParameter1\": null,
142
+ \"ActionParameter2\": null,
147
143
  \"Triggers\": [
148
144
  {
149
145
  \"Type\": 0,
@@ -155,10 +151,23 @@ ab_testing_bypass_data="
155
151
  }
156
152
  ],
157
153
  \"TriggerMatchingType\": 1,
158
- \"Description\": \"A/B testing cache bypass\",
154
+ \"Description\": \"A/B perma-cache bypass [$GIT_BRANCH]\",
159
155
  \"Enabled\": true
160
156
  }"
161
157
 
162
158
  configure_edge_rule "A/B testing [$GIT_BRANCH]" "$ab_testing_data"
163
- configure_edge_rule "A/B testing cookie [$GIT_BRANCH]" "$ab_testing_cookie_data" false
164
- configure_edge_rule "A/B testing cache bypass" "$ab_testing_bypass_data"
159
+ configure_edge_rule "A/B CDN cache bypass [$GIT_BRANCH]" "$ab_testing_bypass_data"
160
+ configure_edge_rule "A/B perma-cache bypass [$GIT_BRANCH]" "$ab_testing_perma_bypass_data"
161
+
162
+ curl --silent --request POST \
163
+ --url "https://api.bunny.net/purge?url=https://$domain/" \
164
+ --header "AccessKey: $BUNNYNET_API_KEY"
165
+ printf "\n> Purged https://$domain/ cache"
166
+
167
+ for slug_url in "${additional_patterns[@]}"; do
168
+ clean_url=${slug_url//\"/}
169
+ curl --silent --request POST \
170
+ --url "https://api.bunny.net/purge?url=$clean_url" \
171
+ --header "AccessKey: $BUNNYNET_API_KEY"
172
+ echo "> Purged $clean_url cache"
173
+ done
@@ -0,0 +1,54 @@
1
+ #!/bin/bash
2
+
3
+ if [ -z "$BUNNYNET_API_KEY" ]; then
4
+ echo "BUNNYNET_API_KEY env var must be set"
5
+ exit 1
6
+ fi
7
+ if [ $# -eq 0 ]; then
8
+ echo "Provide the Firebase project ID as the first argument"
9
+ exit 1
10
+ fi
11
+ if [ $# -eq 1 ]; then
12
+ echo "Provide the domain as the first argument"
13
+ exit 1
14
+ fi
15
+
16
+ project_id=$1
17
+ domain=$2
18
+
19
+ if [ -z "$GIT_BRANCH" ]; then
20
+ echo "GIT_BRANCH env not set, skipping edge rules removal"
21
+ exit 0
22
+ fi
23
+
24
+ response=$(curl --silent --request GET \
25
+ --url https://api.bunny.net/pullzone \
26
+ --header "AccessKey: $BUNNYNET_API_KEY" \
27
+ --header 'accept: application/json')
28
+
29
+ pull_zone_id=$(echo $response | jq --arg domain "$domain" '[.[] | select(.Hostnames[].Value | contains($domain)).Id][0]')
30
+ if [ -z "$pull_zone_id" ]; then
31
+ echo "bunny.net pull zone not found for domain $domain"
32
+ exit 1
33
+ fi
34
+
35
+ edge_rules=$(echo $response | jq --arg id "$pull_zone_id" '.[] | select(.Id == ($id | tonumber)).EdgeRules')
36
+
37
+ remove_edge_rule() {
38
+ local description=$1
39
+ local found_rule=$(echo $edge_rules | jq --arg description "$description" '.[] | select(.Description == $description)')
40
+ local guid=$(echo $found_rule | jq -r '.Guid // empty')
41
+
42
+ if [ -n "$guid" ]; then
43
+ curl --silent --request DELETE \
44
+ --url "https://api.bunny.net/pullzone/$pull_zone_id/edgerules/$guid" \
45
+ --header "AccessKey: $BUNNYNET_API_KEY"
46
+ echo "> Removed edge rule \"$description\""
47
+ else
48
+ echo "> Edge rule \"$description\" not found"
49
+ fi
50
+ }
51
+
52
+ remove_edge_rule "A/B testing [$GIT_BRANCH]"
53
+ remove_edge_rule "A/B CDN cache bypass [$GIT_BRANCH]"
54
+ remove_edge_rule "A/B perma-cache bypass [$GIT_BRANCH]"