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
@@ -104,11 +104,11 @@ jobs:
104
104
  ${{ steps.npm-paths.outputs.LIB_PATH }}
105
105
  ${{ steps.npm-paths.outputs.BIN_PATH }}
106
106
  ~/.npm-global/bin
107
- key: ${{ runner.os }}-npm-globals-firebase-tools-13.0.3
107
+ key: ${{ runner.os }}-npm-globals-firebase-tools-13.1.0
108
108
 
109
109
  - if: steps.npm-g-cache.outputs.cache-hit != 'true'
110
110
  shell: bash
111
- run: npm install -g firebase-tools@13.0.3
111
+ run: npm install -g firebase-tools@13.1.0
112
112
 
113
113
  - name: Initialize Firebase emulators
114
114
  shell: bash
package/.husky/commit-msg CHANGED
@@ -1,4 +1 @@
1
- #!/usr/bin/env sh
2
- . "$(dirname -- "$0")/_/husky.sh"
3
-
4
1
  npx --no -- commitlint --edit $1
package/.husky/pre-commit CHANGED
@@ -1,4 +1 @@
1
- #!/usr/bin/env sh
2
- . "$(dirname -- "$0")/_/husky.sh"
3
-
4
1
  npx lint-staged
package/CHANGELOG.md CHANGED
@@ -2,6 +2,30 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [2.2.1](https://github.com/ecomplus/cloud-commerce/compare/v2.2.0...v2.2.1) (2024-01-30)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * **storefront:** Fix `useSearchShowcase` to ensure URL params respected on initial (maybe) fetch ([1ecc3df](https://github.com/ecomplus/cloud-commerce/commit/1ecc3dfd2973c22e4186d37ee05cc266f5a56e31))
11
+ * **storefront:** New optional `pageSize` prop to search showcase compsable ([5b3fa04](https://github.com/ecomplus/cloud-commerce/commit/5b3fa04d837a4d54488ca7cc4e3b78131c0589b3))
12
+ * **storefront:** Update Astro to latest v4.2.6 ([#312](https://github.com/ecomplus/cloud-commerce/issues/312)) ([76ddf9a](https://github.com/ecomplus/cloud-commerce/commit/76ddf9ab17fc6bd31c674b580c185747260fc17f))
13
+
14
+ ## [2.2.0](https://github.com/ecomplus/cloud-commerce/compare/v2.1.0...v2.2.0) (2024-01-28)
15
+
16
+
17
+ ### Features
18
+
19
+ * **cli:** New `ci/bunny-remove-ab.sh` script to clear A/B edge rules on experiment end ([d5c7fc9](https://github.com/ecomplus/cloud-commerce/commit/d5c7fc9d9b34a7e1dc4231c4eeb7b4d5e8adcb37))
20
+ * **cli:** New `ci/bunny-setup.sh` script to setup bunny.net CDN for ISR with perma-cache ([c4bfc14](https://github.com/ecomplus/cloud-commerce/commit/c4bfc14ba9af404bb66e39e585426ea1c1b2542f))
21
+ * **ssr:** Supporting ISR with bunny.net perma-cache ([0bfbf45](https://github.com/ecomplus/cloud-commerce/commit/0bfbf45e4f84ce23920910de02f99f22ce244cd1))
22
+ * **storefront:** Integrating branch based A/B tests with GA4 ([69def97](https://github.com/ecomplus/cloud-commerce/commit/69def9782516afbe77d42131a3def54c6a875031))
23
+
24
+
25
+ ### Bug Fixes
26
+
27
+ * **cli:** Normalizing ci scripts with first arg project ID and second domain ([3c65466](https://github.com/ecomplus/cloud-commerce/commit/3c6546633edfcaedb415dee8acd1cbc5decd603f))
28
+
5
29
  ## [2.1.0](https://github.com/ecomplus/cloud-commerce/compare/v2.0.9...v2.1.0) (2024-01-26)
6
30
 
7
31
 
package/README.md CHANGED
@@ -1,12 +1,12 @@
1
- # E-Com Plus Open Cloud Commerce
1
+ # e-com.plus Open Cloud Commerce
2
2
 
3
- Open fair-code eCommerce platform to use on top of headless commerce APIs, it includes:
3
+ Open source eCommerce platform to use on top of headless commerce APIs, it includes:
4
4
  - High performant and fully customizable [Astro](https://astro.build/) + [Vue](https://vuejs.org/) storefront;
5
5
  - Storefront CMS and page builder;
6
6
  - Analytics and A/B testing;
7
7
  - Integrations for payments, shipping, ERPs, CRMs and others.
8
8
 
9
- Easy deployment on [Firebase](https://firebase.google.com/), plug & play with **[E-Com Plus APIs](https://developers.e-com.plus/)**.
9
+ Easy deployment on [Firebase](https://firebase.google.com/), plug & play with **[e-com.plus APIs](https://developers.e-com.plus/)**.
10
10
 
11
11
  ## Concepts
12
12
 
@@ -19,7 +19,3 @@ Easy deployment on [Firebase](https://firebase.google.com/), plug & play with **
19
19
  7. Easy third-party integrations.
20
20
 
21
21
  > WIP 🚧
22
-
23
- ## License
24
-
25
- [Fair-code](http://faircode.io) distributed under [**Apache 2.0 with Commons Clause**](https://github.com/ecomplus/cloud-commerce/blob/main/LICENSE.md) license.
package/action.yml CHANGED
@@ -153,11 +153,11 @@ runs:
153
153
  ${{ steps.npm-paths.outputs.LIB_PATH }}
154
154
  ${{ steps.npm-paths.outputs.BIN_PATH }}
155
155
  ~/.npm-global/bin
156
- key: ${{ runner.os }}-npm-g-firebase-tools-13.0.3
156
+ key: ${{ runner.os }}-npm-g-firebase-tools-13.1.0
157
157
 
158
- - if: ${{ github.event_name == 'push' && steps.npm-g-cache.outputs.cache-hit != 'true' }}
158
+ - if: github.event_name == 'push' && steps.npm-g-cache.outputs.cache-hit != 'true'
159
159
  shell: bash
160
- run: npm i --location=global firebase-tools@13.0.3
160
+ run: npm i --location=global firebase-tools@13.1.0
161
161
 
162
162
  - if: steps.npm-cache-many.outputs.cache-hit != 'true'
163
163
  name: Install codebase "many" dependencies
@@ -186,7 +186,7 @@ runs:
186
186
  echo "ecom_store_id=${ECOM_STORE_ID:-$(cat config.json | jq -r '.storeId')}" >> $GITHUB_ENV
187
187
  echo "git_branch=${GITHUB_HEAD_REF:-${GITHUB_REF_NAME}}" >> $GITHUB_ENV
188
188
 
189
- - uses: dorny/paths-filter@v2.11.1
189
+ - uses: dorny/paths-filter@v3.0.0
190
190
  id: changes
191
191
  with:
192
192
  filters: |
@@ -335,22 +335,25 @@ runs:
335
335
  fi
336
336
  fi
337
337
 
338
- - if: github.event_name == 'push' && contains(github.event.head_commit.message, '[config bunny]')
339
- name: Set bunny.net CDN pull zone basic configs
338
+ - if: github.event_name == 'push' && contains(github.event.head_commit.message, '[run:')
339
+ name: Run script from `@cloudcommerce/cli/ci/`
340
340
  shell: bash
341
341
  env:
342
+ COMMIT_MSG: ${{ github.event.head_commit.message }}
342
343
  ECOM_STORE_ID: ${{ env.ecom_store_id }}
343
344
  GIT_BRANCH: ${{ env.git_branch }}
345
+ FIREBASE_SERVICE_ACCOUNT: ${{ inputs.firebase-service-account }}
344
346
  BUNNYNET_API_KEY: ${{ inputs.bunnynet-api-key }}
345
347
  run: |
346
- if [ ! -z "$BUNNYNET_API_KEY" ]; then
348
+ if [ -n "$BUNNYNET_API_KEY" ]; then
349
+ script_name="${COMMIT_MSG#*\[run:}"
350
+ script_name="${script_name%%\]*}"
351
+ project_id=$(echo "$FIREBASE_SERVICE_ACCOUNT" | jq -r .project_id 2>/dev/null)
347
352
  domain=$(cat functions/ssr/content/settings.json | jq -r '.domain')
348
- if [ ! -z "$domain" ]; then
349
- bash $GITHUB_ACTION_PATH/packages/cli/ci/bunny-config-base.sh $domain
350
- fi
353
+ bash $GITHUB_ACTION_PATH/packages/cli/ci/$script_name.sh $project_id $domain
351
354
  fi
352
355
 
353
- - if: github.event_name == 'pull_request'
356
+ - if: github.event_name == 'pull_request' && github.event.action != 'closed'
354
357
  name: Build storefront static
355
358
  shell: bash
356
359
  env:
@@ -364,7 +367,9 @@ runs:
364
367
  fi
365
368
  npm --prefix "functions/ssr/" run build:static && npx cloudcommerce prepare
366
369
 
367
- - if: github.event_name == 'pull_request'
370
+ - if: |
371
+ github.event_name == 'pull_request' && github.event.action != 'closed'
372
+ && env.git_branch != 'main'
368
373
  name: Deploy Firebase Hosting PR preview
369
374
  id: deploy-preview
370
375
  uses: FirebaseExtended/action-hosting-deploy@v0
@@ -374,7 +379,9 @@ runs:
374
379
  channelId: ${{ (startsWith(env.git_branch, 'main-') && env.git_branch) || null }}
375
380
  expires: ${{ (startsWith(env.git_branch, 'main-') && '30d') || null }}
376
381
 
377
- - if: ${{ github.event_name == 'pull_request' && startsWith(env.git_branch, 'main-') }}
382
+ - if: |
383
+ github.event_name == 'pull_request' && github.event.action != 'closed'
384
+ && startsWith(env.git_branch, 'main-')
378
385
  name: Prepare bunny.net CDN for A/B testing
379
386
  shell: bash
380
387
  env:
@@ -383,9 +390,26 @@ runs:
383
390
  BUNNYNET_API_KEY: ${{ inputs.bunnynet-api-key }}
384
391
  CHANNEL_URL: ${{ steps.deploy-preview.outputs.details_url }}
385
392
  run: |
386
- if [ ! -z "$BUNNYNET_API_KEY" ]; then
393
+ if [ -n "$BUNNYNET_API_KEY" ]; then
394
+ domain=$(cat functions/ssr/content/settings.json | jq -r '.domain')
395
+ if [ -n "$domain" ]; then
396
+ bash $GITHUB_ACTION_PATH/packages/cli/ci/bunny-prepare-ab.sh 1 $domain $CHANNEL_URL
397
+ fi
398
+ fi
399
+
400
+ - if: |
401
+ github.event_name == 'pull_request' && github.event.action == 'closed'
402
+ && startsWith(env.git_branch, 'main-')
403
+ name: Clear A/B testing config on bunny.net CDN
404
+ shell: bash
405
+ env:
406
+ ECOM_STORE_ID: ${{ env.ecom_store_id }}
407
+ GIT_BRANCH: ${{ env.git_branch }}
408
+ BUNNYNET_API_KEY: ${{ inputs.bunnynet-api-key }}
409
+ run: |
410
+ if [ -n "$BUNNYNET_API_KEY" ]; then
387
411
  domain=$(cat functions/ssr/content/settings.json | jq -r '.domain')
388
- if [ ! -z "$domain" ]; then
389
- bash $GITHUB_ACTION_PATH/packages/cli/ci/bunny-prepare-ab.sh $domain $CHANNEL_URL
412
+ if [ -n "$domain" ]; then
413
+ bash $GITHUB_ACTION_PATH/packages/cli/ci/bunny-remove-ab.sh 1 $domain
390
414
  fi
391
415
  fi
@@ -12,6 +12,7 @@ on:
12
12
  - '.github/build-and-deploy'
13
13
  - '.github/workflows/build-and-deploy.yml'
14
14
  pull_request:
15
+ types: [opened, synchronize, reopened, closed]
15
16
  paths:
16
17
  - 'functions/ssr/**'
17
18
  - '.firebaserc'
@@ -22,8 +23,8 @@ jobs:
22
23
  name: Cloud Commerce build and deploy
23
24
  runs-on: ubuntu-latest
24
25
  if: |
25
- github.event.head_commit.message != 'Initial commit' &&
26
- !contains(github.event.head_commit.message, '[skip ci]')
26
+ github.event.head_commit.message != 'Initial commit'
27
+ && !contains(github.event.head_commit.message, '[skip ci]')
27
28
  steps:
28
29
  - uses: actions/checkout@v4
29
30
  with:
@@ -1,4 +1 @@
1
- #!/usr/bin/env sh
2
- . "$(dirname -- "$0")/_/husky.sh"
3
-
4
1
  npx lint-staged
@@ -15,8 +15,8 @@
15
15
  },
16
16
  "main": "index.js",
17
17
  "dependencies": {
18
- "@cloudcommerce/feeds": "^2.0.9",
19
- "@cloudcommerce/firebase": "^2.0.9",
20
- "@cloudcommerce/passport": "^2.0.9"
18
+ "@cloudcommerce/feeds": "^2.2.0",
19
+ "@cloudcommerce/firebase": "^2.2.0",
20
+ "@cloudcommerce/passport": "^2.2.0"
21
21
  }
22
22
  }
@@ -10,7 +10,8 @@
10
10
  "type": "doc-banners"
11
11
  },
12
12
  {
13
- "type": "context-showcase"
13
+ "type": "context-showcase",
14
+ "pageSize": 48
14
15
  }
15
16
  ]
16
17
  }
@@ -10,7 +10,8 @@
10
10
  "type": "doc-banners"
11
11
  },
12
12
  {
13
- "type": "context-showcase"
13
+ "type": "context-showcase",
14
+ "pageSize": 48
14
15
  }
15
16
  ]
16
17
  }
@@ -18,15 +18,15 @@
18
18
  },
19
19
  "main": "index.js",
20
20
  "dependencies": {
21
- "@cloudcommerce/api": "^2.0.9",
22
- "@cloudcommerce/firebase": "^2.0.9",
23
- "@cloudcommerce/ssr": "^2.0.9",
21
+ "@cloudcommerce/api": "^2.2.0",
22
+ "@cloudcommerce/firebase": "^2.2.0",
23
+ "@cloudcommerce/ssr": "^2.2.0",
24
24
  "@headlessui/vue": "^1.7.17"
25
25
  },
26
26
  "devDependencies": {
27
- "@cloudcommerce/i18n": "^2.0.9",
28
- "@cloudcommerce/storefront": "^2.0.9",
29
- "@cloudcommerce/types": "^2.0.9",
27
+ "@cloudcommerce/i18n": "^2.2.0",
28
+ "@cloudcommerce/storefront": "^2.2.0",
29
+ "@cloudcommerce/types": "^2.2.0",
30
30
  "@iconify-json/mingcute": "^1.1.15",
31
31
  "photoswipe": "^5.4.3"
32
32
  }
@@ -36,7 +36,7 @@ a, button, button > *, [role=button], [role=button] > * {
36
36
  ring-primary/30;
37
37
  }
38
38
  .ui-btn-secondary {
39
- @apply bg-secondary-100/50 text-secondary border-secondary
39
+ @apply bg-secondary-100/50 text-secondary-700 border-secondary
40
40
  hover:primary ring-secondary/30;
41
41
  }
42
42
  .ui-btn-contrast {
@@ -54,7 +54,7 @@ a, button, button > *, [role=button], [role=button] > * {
54
54
  @apply font-brand font-extrabold not-italic;
55
55
  }
56
56
  .ui-title {
57
- @apply text-3xl xl:text-5xl;
57
+ @apply text-3xl xl:text-5xl text-balance;
58
58
  }
59
59
 
60
60
  [class*=ui-badge] {
@@ -1,21 +1,30 @@
1
1
  <template>
2
- <section v-if="title" class="ui-section">
3
- <div class="flex items-center gap-4">
4
- <AImg
5
- v-if="logo"
6
- :picture="logo"
7
- :alt="logo.alt || title"
8
- class="h-auto max-w-[150px] xl:max-w-[200px]"
9
- />
10
- <h1 class="ui-title">
11
- {{ title }}
12
- </h1>
13
- </div>
14
- <div class="prose">
15
- <p v-if="description">
16
- {{ description }}
17
- </p>
18
- </div>
2
+ <section
3
+ v-if="title"
4
+ class="from-secondary-50/20 to-secondary-100 bg-gradient-to-br py-2"
5
+ >
6
+ <article class="ui-section">
7
+ <div class="prose mx-auto">
8
+ <div class="not-prose flex items-center gap-4 md:justify-center">
9
+ <AImg
10
+ v-if="logo"
11
+ :picture="logo"
12
+ :alt="logo.alt || title"
13
+ class="h-auto max-w-[150px] xl:max-w-[200px]"
14
+ />
15
+ <h1 class="ui-title from-secondary-600 to-secondary-700 bg-gradient-to-br
16
+ bg-clip-text text-center text-transparent">
17
+ {{ title }}
18
+ </h1>
19
+ </div>
20
+ <p
21
+ v-if="description"
22
+ :class="description.length < 120 && 'md:text-center'"
23
+ >
24
+ {{ description }}
25
+ </p>
26
+ </div>
27
+ </article>
19
28
  </section>
20
29
  </template>
21
30
 
@@ -36,11 +36,10 @@
36
36
  </div>
37
37
  <span
38
38
  v-if="discountPercentage"
39
- class=":uno: bg-secondary/70 text-on-secondary absolute
40
- right-2 top-9 py-0.5
41
- pl-3 pr-1.5 text-xs transition-transform
42
- [clip-path:polygon(20%_0,100%_0,100%_100%,0_100%)]
43
- group-hover:translate-x-2 group-hover:scale-110"
39
+ class=":uno: absolute right-2
40
+ top-9 rounded-full bg-gradient-to-bl from-fuchsia-100
41
+ to-fuchsia-100/20 px-2 py-0.5
42
+ text-xs text-fuchsia-900 transition-transform"
44
43
  >
45
44
  -<strong>{{ discountPercentage }}</strong>%
46
45
  </span>
@@ -6,7 +6,7 @@
6
6
  <ImagesGallery :pictures="product.pictures" />
7
7
  </template>
8
8
  </div>
9
- <div class="lg:sticky-header:translate-y-14 top-0 py-4
9
+ <div class="lg:sticky-header:translate-y-24 top-0 py-4
10
10
  transition-transform lg:sticky">
11
11
  <h1 class="text-secondary-900 ui-text-brand text-lg">
12
12
  {{ title }}
@@ -19,7 +19,8 @@
19
19
  <Fade>
20
20
  <section
21
21
  v-if="hasFiltersBar"
22
- class="to-base-100 ui-section-slim sticky-header:translate-y-16 lg:sticky-header:translate-y-14 sticky top-0
22
+ class="to-base-100 ui-section-slim sticky-header:translate-y-16
23
+ lg:sticky-header:translate-y-24 sticky top-0
23
24
  z-[12] flex items-center justify-between
24
25
  rounded-b bg-white/80 px-6 py-4 shadow-sm
25
26
  backdrop-blur-sm transition-transform"
@@ -65,13 +65,13 @@ export async function getStaticPaths() {
65
65
 
66
66
  <!DOCTYPE html>
67
67
  <html lang={routeContext?.lang.replace('_', '-')}>
68
- {routeContext
69
- && <Base>
68
+ {routeContext && <>
69
+ <Base>
70
70
  <BaseHead slot="base-head" />
71
71
  <PageHeader />
72
72
  <Main />
73
73
  <PageFooter />
74
74
  </Base>
75
- }
75
+ </>}
76
76
  {loadError && <Fragment set:html={loadError.responseHTML} />}
77
77
  </html>
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  import { type RouteContext, loadRouteContext } from '@@sf/ssr-context';
3
3
  import BaseHead from '@@sf/layouts/BaseHead.astro';
4
+ import { POSTS_PER_PAGE, countBlogPages } from './_blog-pages';
4
5
  import Base from '~/layouts/Base.astro';
5
6
  import PageHeader from '~/layouts/PageHeader.astro';
6
7
  import PageFooter from '~/layouts/PageFooter.astro';
7
8
  import BlogPosts, { type Props as BlogPostsProps } from '~/components/BlogPosts.vue';
8
- import { POSTS_PER_PAGE, countBlogPages } from './_blog-pages';
9
9
 
10
10
  let routeContext: RouteContext | undefined;
11
11
  let loadError: any;
@@ -33,8 +33,9 @@ await Promise.all(
33
33
  return new Promise((resolve) => {
34
34
  getContent(`blog/${slug}`).then((content) => {
35
35
  if (content) {
36
- const { markdown, ...post } = content;
37
- posts.push({ ...post, slug });
36
+ const post = { ...content, slug };
37
+ delete post.markdown;
38
+ posts.push(post);
38
39
  }
39
40
  resolve(null);
40
41
  });
@@ -53,7 +54,7 @@ export async function getStaticPaths() {
53
54
 
54
55
  <!DOCTYPE html>
55
56
  <html lang={routeContext.lang.replace('_', '-')}>
56
- {routeContext &&
57
+ {routeContext && <>
57
58
  <Base {metaTitle}>
58
59
  <Fragment slot="base-head">
59
60
  <BaseHead />
@@ -66,6 +67,6 @@ export async function getStaticPaths() {
66
67
  </main>
67
68
  <PageFooter />
68
69
  </Base>
69
- }
70
+ </>}
70
71
  {loadError && <Fragment set:html={loadError.responseHTML} />}
71
72
  </html>
@@ -15,8 +15,8 @@
15
15
  },
16
16
  "main": "index.js",
17
17
  "dependencies": {
18
- "@cloudcommerce/events": "^2.0.9",
19
- "@cloudcommerce/firebase": "^2.0.9",
20
- "@cloudcommerce/modules": "^2.0.9"
18
+ "@cloudcommerce/events": "^2.2.0",
19
+ "@cloudcommerce/firebase": "^2.2.0",
20
+ "@cloudcommerce/modules": "^2.2.0"
21
21
  }
22
22
  }
@@ -15,24 +15,22 @@
15
15
  "login": "cloudcommerce login",
16
16
  "setup": "bash scripts/install.sh && cloudcommerce setup",
17
17
  "setup:quiet": "cloudcommerce setup --no-deploy --no-commit",
18
- "prepare": "husky install"
18
+ "prepare": "husky"
19
19
  },
20
20
  "lint-staged": {
21
21
  "functions/ssr/**/*.{ts,vue,astro}": "eslint -c ./functions/ssr/.staged.eslintrc.cjs --fix",
22
22
  "functions/!(ssr)/**/*.ts": "eslint --fix"
23
23
  },
24
24
  "main": "functions/index.js",
25
- "author": "E-Com Club Softwares para E-commerce <ti@e-com.club>",
26
- "license": "Apache 2.0 with Commons Clause",
27
25
  "bugs": {
28
26
  "url": "https://github.com/ecomplus/cloud-commerce/issues"
29
27
  },
30
28
  "dependencies": {
31
- "@cloudcommerce/cli": "^2.0.9"
29
+ "@cloudcommerce/cli": "^2.2.0"
32
30
  },
33
31
  "devDependencies": {
34
- "@cloudcommerce/eslint": "^2.0.9",
35
- "husky": "^8.0.3",
32
+ "@cloudcommerce/eslint": "^2.2.0",
33
+ "husky": "^9.0.7",
36
34
  "lint-staged": "^15.2.0"
37
35
  }
38
36
  }
@@ -12,6 +12,7 @@ on:
12
12
  - '.github/build-and-deploy'
13
13
  - '.github/workflows/build-and-deploy.yml'
14
14
  pull_request:
15
+ types: [opened, synchronize, reopened, closed]
15
16
  paths:
16
17
  - 'functions/ssr/**'
17
18
  - '.firebaserc'
@@ -22,8 +23,8 @@ jobs:
22
23
  name: Cloud Commerce build and deploy
23
24
  runs-on: ubuntu-latest
24
25
  if: |
25
- github.event.head_commit.message != 'Initial commit' &&
26
- !contains(github.event.head_commit.message, '[skip ci]')
26
+ github.event.head_commit.message != 'Initial commit'
27
+ && !contains(github.event.head_commit.message, '[skip ci]')
27
28
  steps:
28
29
  - uses: actions/checkout@v4
29
30
  with:
@@ -75,3 +76,4 @@ jobs:
75
76
  pagarmev5-public-key: ${{ secrets.PAGARMEV5_PUBLIC_KEY }}
76
77
  tiktok-pixel-id: ${{ secrets.TIKTOK_PIXEL_ID }}
77
78
  tiktok-access-token: ${{ secrets.TIKTOK_ACCESS_TOKEN }}
79
+ public-dotenv: ${{ secrets.PUBLIC_DOTENV }}
@@ -17,8 +17,6 @@
17
17
  "setup:quiet": "cloudcommerce setup --no-deploy --no-commit"
18
18
  },
19
19
  "main": "functions/index.js",
20
- "author": "E-Com Club Softwares para E-commerce <ti@e-com.club>",
21
- "license": "Apache 2.0 with Commons Clause",
22
20
  "bugs": {
23
21
  "url": "https://github.com/ecomplus/cloud-commerce/issues"
24
22
  },
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cloudcommerce",
3
3
  "type": "module",
4
- "version": "2.1.0",
4
+ "version": "2.2.1",
5
5
  "description": "Open fair-code headless commerce platform: API-first, microservices based, event driven and cloud native",
6
6
  "main": "packages/api/lib/index.js",
7
7
  "author": "E-Com Club Softwares para E-commerce <ti@e-com.club>",
@@ -20,13 +20,13 @@
20
20
  "packages/!(storefront)/**/*.ts": "eslint --fix"
21
21
  },
22
22
  "devDependencies": {
23
- "@commitlint/cli": "^18.5.0",
24
- "@commitlint/config-conventional": "^18.5.0",
25
- "@commitlint/rules": "^18.4.4",
26
- "@types/node": "^18.19.8",
27
- "dotenv": "^16.3.2",
23
+ "@commitlint/cli": "^18.6.0",
24
+ "@commitlint/config-conventional": "^18.6.0",
25
+ "@commitlint/rules": "^18.6.0",
26
+ "@types/node": "^18.19.10",
27
+ "dotenv": "^16.4.1",
28
28
  "eslint": "^8.56.0",
29
- "husky": "^8.0.3",
29
+ "husky": "^9.0.7",
30
30
  "lint-staged": "^15.2.0",
31
31
  "standard-version": "^9.5.0",
32
32
  "ts-node": "^10.9.2",
@@ -34,13 +34,13 @@
34
34
  "typescript": "~5.2.2",
35
35
  "uglify-js": "^3.17.4",
36
36
  "vite": "^5.0.11",
37
- "vitest": "^1.2.1",
37
+ "vitest": "^1.2.2",
38
38
  "zx": "^7.2.3",
39
- "@cloudcommerce/eslint": "2.1.0"
39
+ "@cloudcommerce/eslint": "2.2.1"
40
40
  },
41
41
  "scripts": {
42
42
  "fix-install": "bash scripts/pre-install.sh && pnpm i",
43
- "postinstall": "husky install && pnpm run -r prepare-monorepo",
43
+ "postinstall": "husky && pnpm run -r prepare-monorepo",
44
44
  "new-pkg": "bash scripts/new-package.sh",
45
45
  "build": "turbo run build --filter='!./ecomplus-stores/**'",
46
46
  "build:apps": "turbo run build --filter='./packages/{apps/**,modules}'",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/api",
3
3
  "type": "module",
4
- "version": "2.1.0",
4
+ "version": "2.2.1",
5
5
  "description": "E-Com Plus Cloud Commerce APIs client/adapter",
6
6
  "main": "lib/api.js",
7
7
  "types": "lib/api.d.ts",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-affiliate-program",
3
3
  "type": "module",
4
- "version": "2.1.0",
4
+ "version": "2.2.1",
5
5
  "description": "E-Com Plus Cloud Commerce app for simple affiliate program",
6
6
  "main": "lib/index.js",
7
7
  "repository": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-correios",
3
3
  "type": "module",
4
- "version": "2.1.0",
4
+ "version": "2.2.1",
5
5
  "description": "E-Com Plus Cloud Commerce app for Correios shipping calculation",
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
  "@google-cloud/pubsub": "^4.1.1",
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-custom-payment",
3
3
  "type": "module",
4
- "version": "2.1.0",
4
+ "version": "2.2.1",
5
5
  "description": "E-Com Plus Cloud Commerce app for simple custom payment methods",
6
6
  "main": "lib/index.js",
7
7
  "repository": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-custom-shipping",
3
3
  "type": "module",
4
- "version": "2.1.0",
4
+ "version": "2.2.1",
5
5
  "description": "E-Com Plus Cloud Commerce app for custom shipping methods",
6
6
  "main": "lib/custom-shipping.js",
7
7
  "repository": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-datafrete",
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 Datafrete shipping gateway ",
6
6
  "main": "lib/datafrete.js",
7
7
  "exports": {
@@ -26,7 +26,7 @@
26
26
  "@cloudcommerce/api": "workspace:*",
27
27
  "@cloudcommerce/firebase": "workspace:*",
28
28
  "@ecomplus/utils": "1.5.0-rc.6",
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
  },