cloudcommerce 2.6.1 → 2.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/ecomplus-stores/barradoce/functions/many/package.json +3 -3
  3. package/ecomplus-stores/barradoce/functions/ssr/package.json +6 -6
  4. package/ecomplus-stores/barradoce/functions/with-apps/package.json +3 -3
  5. package/ecomplus-stores/barradoce/package.json +2 -2
  6. package/package.json +2 -2
  7. package/packages/api/package.json +1 -1
  8. package/packages/apps/affiliate-program/package.json +1 -1
  9. package/packages/apps/correios/package.json +1 -1
  10. package/packages/apps/custom-payment/package.json +1 -1
  11. package/packages/apps/custom-shipping/package.json +1 -1
  12. package/packages/apps/datafrete/package.json +1 -1
  13. package/packages/apps/discounts/package.json +1 -1
  14. package/packages/apps/emails/package.json +1 -1
  15. package/packages/apps/fb-conversions/package.json +1 -1
  16. package/packages/apps/flash-courier/package.json +1 -1
  17. package/packages/apps/frenet/package.json +1 -1
  18. package/packages/apps/galaxpay/package.json +1 -1
  19. package/packages/apps/google-analytics/package.json +1 -1
  20. package/packages/apps/jadlog/package.json +1 -1
  21. package/packages/apps/loyalty-points/package.json +1 -1
  22. package/packages/apps/mandae/package.json +1 -1
  23. package/packages/apps/melhor-envio/package.json +1 -1
  24. package/packages/apps/mercadopago/package.json +1 -1
  25. package/packages/apps/pagarme/package.json +1 -1
  26. package/packages/apps/pagarme-v5/package.json +1 -1
  27. package/packages/apps/paghiper/package.json +1 -1
  28. package/packages/apps/pix/package.json +1 -1
  29. package/packages/apps/tiny-erp/package.json +1 -1
  30. package/packages/apps/webhooks/package.json +1 -1
  31. package/packages/cli/package.json +1 -1
  32. package/packages/config/package.json +1 -1
  33. package/packages/emails/package.json +1 -1
  34. package/packages/eslint/package.json +1 -1
  35. package/packages/events/package.json +1 -1
  36. package/packages/feeds/package.json +1 -1
  37. package/packages/firebase/package.json +1 -1
  38. package/packages/i18n/package.json +1 -1
  39. package/packages/modules/package.json +1 -1
  40. package/packages/passport/package.json +1 -1
  41. package/packages/ssr/lib/lib/cron-ssr-save-views.js +21 -16
  42. package/packages/ssr/lib/lib/cron-ssr-save-views.js.map +1 -1
  43. package/packages/ssr/package.json +1 -1
  44. package/packages/ssr/src/lib/cron-ssr-save-views.ts +27 -20
  45. package/packages/storefront/package.json +1 -1
  46. package/packages/test-base/package.json +1 -1
  47. package/packages/types/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
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.6.2](https://github.com/ecomplus/cloud-commerce/compare/v2.6.1...v2.6.2) (2024-02-24)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * **ssr:** Ensure cache refresh req is sent after CDN cache purge on cron save views ([943f001](https://github.com/ecomplus/cloud-commerce/commit/943f00128e618354b84fd203db071b6245351281))
11
+
5
12
  ### [2.6.1](https://github.com/ecomplus/cloud-commerce/compare/v2.6.0...v2.6.1) (2024-02-24)
6
13
 
7
14
 
@@ -15,8 +15,8 @@
15
15
  },
16
16
  "main": "index.js",
17
17
  "dependencies": {
18
- "@cloudcommerce/feeds": "^2.6.0",
19
- "@cloudcommerce/firebase": "^2.6.0",
20
- "@cloudcommerce/passport": "^2.6.0"
18
+ "@cloudcommerce/feeds": "^2.6.1",
19
+ "@cloudcommerce/firebase": "^2.6.1",
20
+ "@cloudcommerce/passport": "^2.6.1"
21
21
  }
22
22
  }
@@ -19,16 +19,16 @@
19
19
  },
20
20
  "main": "index.js",
21
21
  "dependencies": {
22
- "@cloudcommerce/api": "^2.6.0",
23
- "@cloudcommerce/firebase": "^2.6.0",
24
- "@cloudcommerce/ssr": "^2.6.0",
22
+ "@cloudcommerce/api": "^2.6.1",
23
+ "@cloudcommerce/firebase": "^2.6.1",
24
+ "@cloudcommerce/ssr": "^2.6.1",
25
25
  "@headlessui/vue": "^1.7.18",
26
26
  "micromark": "^4.0.0"
27
27
  },
28
28
  "devDependencies": {
29
- "@cloudcommerce/i18n": "^2.6.0",
30
- "@cloudcommerce/storefront": "^2.6.0",
31
- "@cloudcommerce/types": "^2.6.0",
29
+ "@cloudcommerce/i18n": "^2.6.1",
30
+ "@cloudcommerce/storefront": "^2.6.1",
31
+ "@cloudcommerce/types": "^2.6.1",
32
32
  "@iconify-json/mingcute": "^1.1.16",
33
33
  "photoswipe": "^5.4.3"
34
34
  }
@@ -15,8 +15,8 @@
15
15
  },
16
16
  "main": "index.js",
17
17
  "dependencies": {
18
- "@cloudcommerce/events": "^2.6.0",
19
- "@cloudcommerce/firebase": "^2.6.0",
20
- "@cloudcommerce/modules": "^2.6.0"
18
+ "@cloudcommerce/events": "^2.6.1",
19
+ "@cloudcommerce/firebase": "^2.6.1",
20
+ "@cloudcommerce/modules": "^2.6.1"
21
21
  }
22
22
  }
@@ -26,10 +26,10 @@
26
26
  "url": "https://github.com/ecomplus/cloud-commerce/issues"
27
27
  },
28
28
  "dependencies": {
29
- "@cloudcommerce/cli": "^2.6.0"
29
+ "@cloudcommerce/cli": "^2.6.1"
30
30
  },
31
31
  "devDependencies": {
32
- "@cloudcommerce/eslint": "^2.6.0",
32
+ "@cloudcommerce/eslint": "^2.6.1",
33
33
  "husky": "^9.0.10",
34
34
  "lint-staged": "^15.2.2"
35
35
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cloudcommerce",
3
3
  "type": "module",
4
- "version": "2.6.1",
4
+ "version": "2.6.2",
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>",
@@ -36,7 +36,7 @@
36
36
  "vite": "^5.0.11",
37
37
  "vitest": "^1.3.0",
38
38
  "zx": "^7.2.3",
39
- "@cloudcommerce/eslint": "2.6.1"
39
+ "@cloudcommerce/eslint": "2.6.2"
40
40
  },
41
41
  "scripts": {
42
42
  "fix-install": "bash scripts/pre-install.sh && pnpm i",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/api",
3
3
  "type": "module",
4
- "version": "2.6.1",
4
+ "version": "2.6.2",
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.6.1",
4
+ "version": "2.6.2",
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.6.1",
4
+ "version": "2.6.2",
5
5
  "description": "E-Com Plus Cloud Commerce app for Correios shipping calculation",
6
6
  "main": "lib/index.js",
7
7
  "exports": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-custom-payment",
3
3
  "type": "module",
4
- "version": "2.6.1",
4
+ "version": "2.6.2",
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.6.1",
4
+ "version": "2.6.2",
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.6.1",
4
+ "version": "2.6.2",
5
5
  "description": "E-Com Plus Cloud Commerce app to integrate Datafrete shipping gateway ",
6
6
  "main": "lib/datafrete.js",
7
7
  "exports": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-discounts",
3
3
  "type": "module",
4
- "version": "2.6.1",
4
+ "version": "2.6.2",
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.6.1",
4
+ "version": "2.6.2",
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.6.1",
4
+ "version": "2.6.2",
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.6.1",
4
+ "version": "2.6.2",
5
5
  "description": "E-Com Plus Cloud Commerce app to integrate Flash Courier",
6
6
  "main": "lib/index.js",
7
7
  "exports": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-frenet",
3
3
  "type": "module",
4
- "version": "2.6.1",
4
+ "version": "2.6.2",
5
5
  "description": "E-Com Plus Cloud Commerce app for Frenet shipping calculation",
6
6
  "main": "lib/frenet.js",
7
7
  "exports": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-galaxpay",
3
3
  "type": "module",
4
- "version": "2.6.1",
4
+ "version": "2.6.2",
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": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-google-analytics",
3
3
  "type": "module",
4
- "version": "2.6.1",
4
+ "version": "2.6.2",
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": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-jadlog",
3
3
  "type": "module",
4
- "version": "2.6.1",
4
+ "version": "2.6.2",
5
5
  "description": "E-Com Plus Cloud Commerce app for Jadlog shipping calculation",
6
6
  "main": "lib/index.js",
7
7
  "repository": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-loyalty-points",
3
3
  "type": "module",
4
- "version": "2.6.1",
4
+ "version": "2.6.2",
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.6.1",
4
+ "version": "2.6.2",
5
5
  "description": "E-Com Plus Cloud Commerce app to integrate Mandaê shipping intermediator",
6
6
  "main": "lib/index.js",
7
7
  "repository": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-melhor-envio",
3
3
  "type": "module",
4
- "version": "2.6.1",
4
+ "version": "2.6.2",
5
5
  "description": "E-Com Plus Cloud Commerce app to integrate Melhor Envio",
6
6
  "main": "lib/index.js",
7
7
  "exports": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-mercadopago",
3
3
  "type": "module",
4
- "version": "2.6.1",
4
+ "version": "2.6.2",
5
5
  "description": "E-Com Plus Cloud Commerce app to integrate Mercado Pago",
6
6
  "main": "lib/mercadopago.js",
7
7
  "exports": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-pagarme",
3
3
  "type": "module",
4
- "version": "2.6.1",
4
+ "version": "2.6.2",
5
5
  "description": "E-Com Plus Cloud Commerce app to integrate Pagar.me",
6
6
  "main": "lib/pagarme.js",
7
7
  "exports": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-pagarme-v5",
3
3
  "type": "module",
4
- "version": "2.6.1",
4
+ "version": "2.6.2",
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": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-paghiper",
3
3
  "type": "module",
4
- "version": "2.6.1",
4
+ "version": "2.6.2",
5
5
  "description": "E-Com Plus Cloud Commerce app to integrate PagHiper",
6
6
  "main": "lib/paghiper.js",
7
7
  "exports": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-pix",
3
3
  "type": "module",
4
- "version": "2.6.1",
4
+ "version": "2.6.2",
5
5
  "description": "E-Com Plus Cloud Commerce app to integrate Pix API (Bacen)",
6
6
  "main": "lib/pix.js",
7
7
  "exports": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-tiny-erp",
3
3
  "type": "module",
4
- "version": "2.6.1",
4
+ "version": "2.6.2",
5
5
  "description": "E-Com Plus Cloud Commerce app for Tiny ERP",
6
6
  "main": "lib/tiny-erp.js",
7
7
  "repository": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-webhooks",
3
3
  "type": "module",
4
- "version": "2.6.1",
4
+ "version": "2.6.2",
5
5
  "description": "E-Com Plus Cloud Commerce app for general order webhooks",
6
6
  "main": "lib/index.js",
7
7
  "repository": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/cli",
3
3
  "type": "module",
4
- "version": "2.6.1",
4
+ "version": "2.6.2",
5
5
  "description": "E-Com Plus Cloud Commerce CLI tools",
6
6
  "bin": {
7
7
  "cloudcommerce": "./bin/run.mjs"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/config",
3
3
  "type": "module",
4
- "version": "2.6.1",
4
+ "version": "2.6.2",
5
5
  "description": "E-Com Plus Cloud Commerce base config",
6
6
  "main": "lib/config.js",
7
7
  "exports": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/emails",
3
3
  "type": "module",
4
- "version": "2.6.1",
4
+ "version": "2.6.2",
5
5
  "description": "E-Com Plus Cloud Commerce email sender",
6
6
  "main": "lib/index.js",
7
7
  "types": "lib/index.d.ts",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/eslint",
3
3
  "type": "module",
4
- "version": "2.6.1",
4
+ "version": "2.6.2",
5
5
  "description": "E-Com Plus Cloud Commerce ESLint config",
6
6
  "main": "lib/index.js",
7
7
  "repository": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/events",
3
3
  "type": "module",
4
- "version": "2.6.1",
4
+ "version": "2.6.2",
5
5
  "description": "E-Com Plus Cloud Commerce app events",
6
6
  "main": "lib/index.js",
7
7
  "exports": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/feeds",
3
3
  "type": "module",
4
- "version": "2.6.1",
4
+ "version": "2.6.2",
5
5
  "description": "E-Com Plus Cloud Commerce catalog feeds",
6
6
  "main": "lib/index.js",
7
7
  "exports": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/firebase",
3
3
  "type": "module",
4
- "version": "2.6.1",
4
+ "version": "2.6.2",
5
5
  "description": "E-Com Plus Cloud Commerce on Firebase",
6
6
  "main": "lib/index.js",
7
7
  "types": "lib/index.d.ts",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/i18n",
3
3
  "type": "module",
4
- "version": "2.6.1",
4
+ "version": "2.6.2",
5
5
  "description": "E-Com Plus Cloud Commerce i18n",
6
6
  "main": "lib/all.js",
7
7
  "exports": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/modules",
3
3
  "type": "module",
4
- "version": "2.6.1",
4
+ "version": "2.6.2",
5
5
  "description": "E-Com Plus Cloud Commerce modules API",
6
6
  "main": "lib/index.cjs",
7
7
  "exports": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/passport",
3
3
  "type": "module",
4
- "version": "2.6.1",
4
+ "version": "2.6.2",
5
5
  "description": "E-Com Plus Cloud Commerce customers authentication (passport) API",
6
6
  "main": "lib/index.js",
7
7
  "exports": {
@@ -1,5 +1,5 @@
1
1
  import { getFirestore } from 'firebase-admin/firestore';
2
- import { error } from 'firebase-functions/logger';
2
+ import { info, error } from 'firebase-functions/logger';
3
3
  import axios from 'axios';
4
4
  import api from '@cloudcommerce/api';
5
5
  import config from '@cloudcommerce/firebase/lib/config';
@@ -101,13 +101,15 @@ const saveViews = async () => {
101
101
  const url = data.url.replace(/\?.*$/, '');
102
102
  doc.ref.update({ isCachePurged: true });
103
103
  if (url?.startsWith(`https://${domain}`) && !purgedUrls.includes(url)) {
104
- await bunnyAxios('/purge', {
105
- method: 'POST',
106
- params: {
107
- async: 'false',
108
- url,
109
- },
110
- });
104
+ const reqs = [
105
+ bunnyAxios('/purge', {
106
+ method: 'POST',
107
+ params: {
108
+ async: permaCacheZoneFolder ? 'true' : 'false',
109
+ url,
110
+ },
111
+ }),
112
+ ];
111
113
  purgedUrls.push(url);
112
114
  if (permaCacheZoneFolder) {
113
115
  let pathname = url.replace(`https://${domain}`, '');
@@ -121,20 +123,23 @@ const saveViews = async () => {
121
123
  // https://support.bunny.net/hc/en-us/articles/360017048720-Perma-Cache-Folder-Structure-Explained
122
124
  const permaCachePath = `__bcdn_perma_cache__/${permaCacheZoneFolder}`
123
125
  + `/${folderpath}___${filename}___/___file___`;
124
- await axios({
126
+ reqs.push(axios({
125
127
  method: 'DELETE',
126
128
  url: `https://storage.bunnycdn.com/${bunnyStorageName}/${permaCachePath}`,
127
129
  headers: {
128
130
  AccessKey: bunnyStoragePass,
129
131
  },
130
- })
131
- .then(() => {
132
- axios.get(`${url}?__isrV=${deployRand}`).catch(error);
133
- })
134
- .catch((err) => {
135
- if (err.response?.status !== 404) throw err;
136
- });
132
+ }).catch((err) => {
133
+ if (err.response?.status !== 404) throw err;
134
+ }));
137
135
  }
136
+ await Promise.all(reqs).then(([, deletePermaCacheRes]) => {
137
+ if (deletePermaCacheRes) {
138
+ info(`Full cache bump ${url}`);
139
+ return axios.get(`${url}?__isrV=${deployRand}`).catch(error);
140
+ }
141
+ return null;
142
+ });
138
143
  }
139
144
  }
140
145
  } catch (err) {
@@ -1 +1 @@
1
- {"version":3,"file":"cron-ssr-save-views.js","sourceRoot":"","sources":["../../src/lib/cron-ssr-save-views.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAClD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,GAAG,MAAM,oBAAoB,CAAC;AACrC,OAAO,MAAM,MAAM,oCAAoC,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;AAEjF,MAAM,SAAS,GAAG,KAAK,IAAI,EAAE;IAC3B,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,GAAG,CAAC;IAClD,qCAAqC;IACrC,MAAM,EAAE,GAAG,YAAY,EAAE,CAAC;IAC1B,MAAM,oBAAoB,GAAG,MAAM,EAAE,CAAC,UAAU,CAAC,iBAAiB,CAAC;SAChE,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC;IACpB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,oBAAoB,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACzD,MAAM,GAAG,GAAG,oBAAoB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACzC,MAAM,EAAE,YAAY,EAAE,GAAG,GAAG,CAAC,IAAI,EAA8B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C;AAEF,eAAe,SAAS,CAAC"}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/ssr",
3
3
  "type": "module",
4
- "version": "2.6.1",
4
+ "version": "2.6.2",
5
5
  "description": "E-Com Plus Cloud Commerce storefront SSR",
6
6
  "main": "lib/index.js",
7
7
  "exports": {
@@ -1,5 +1,5 @@
1
1
  import { getFirestore } from 'firebase-admin/firestore';
2
- import { error } from 'firebase-functions/logger';
2
+ import { info, error } from 'firebase-functions/logger';
3
3
  import axios from 'axios';
4
4
  import api from '@cloudcommerce/api';
5
5
  import config from '@cloudcommerce/firebase/lib/config';
@@ -103,13 +103,15 @@ const saveViews = async () => {
103
103
  const url = data.url.replace(/\?.*$/, '');
104
104
  doc.ref.update({ isCachePurged: true });
105
105
  if (url?.startsWith(`https://${domain}`) && !purgedUrls.includes(url)) {
106
- await bunnyAxios('/purge', {
107
- method: 'POST',
108
- params: {
109
- async: 'false',
110
- url,
111
- },
112
- });
106
+ const reqs: Promise<any>[] = [
107
+ bunnyAxios('/purge', {
108
+ method: 'POST',
109
+ params: {
110
+ async: permaCacheZoneFolder ? 'true' : 'false',
111
+ url,
112
+ },
113
+ }),
114
+ ];
113
115
  purgedUrls.push(url);
114
116
  if (permaCacheZoneFolder) {
115
117
  let pathname = url.replace(`https://${domain}`, '');
@@ -123,20 +125,25 @@ const saveViews = async () => {
123
125
  // https://support.bunny.net/hc/en-us/articles/360017048720-Perma-Cache-Folder-Structure-Explained
124
126
  const permaCachePath = `__bcdn_perma_cache__/${permaCacheZoneFolder}`
125
127
  + `/${folderpath}___${filename}___/___file___`;
126
- await axios({
127
- method: 'DELETE',
128
- url: `https://storage.bunnycdn.com/${bunnyStorageName}/${permaCachePath}`,
129
- headers: {
130
- AccessKey: bunnyStoragePass,
131
- },
132
- })
133
- .then(() => {
134
- axios.get(`${url}?__isrV=${deployRand}`).catch(error);
135
- })
136
- .catch((err) => {
128
+ reqs.push(
129
+ axios({
130
+ method: 'DELETE',
131
+ url: `https://storage.bunnycdn.com/${bunnyStorageName}/${permaCachePath}`,
132
+ headers: {
133
+ AccessKey: bunnyStoragePass,
134
+ },
135
+ }).catch((err) => {
137
136
  if (err.response?.status !== 404) throw err;
138
- });
137
+ }),
138
+ );
139
139
  }
140
+ await Promise.all(reqs).then(([, deletePermaCacheRes]) => {
141
+ if (deletePermaCacheRes) {
142
+ info(`Full cache bump ${url}`);
143
+ return axios.get(`${url}?__isrV=${deployRand}`).catch(error);
144
+ }
145
+ return null;
146
+ });
140
147
  }
141
148
  }
142
149
  } catch (err: any) {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/storefront",
3
3
  "type": "module",
4
- "version": "2.6.1",
4
+ "version": "2.6.2",
5
5
  "description": "E-Com Plus Cloud Commerce storefront with Astro",
6
6
  "bin": {
7
7
  "storefront": "./scripts/build-prod.sh"
@@ -2,7 +2,7 @@
2
2
  "name": "@cloudcommerce/test-base",
3
3
  "private": true,
4
4
  "type": "module",
5
- "version": "2.6.1",
5
+ "version": "2.6.2",
6
6
  "description": "E-Com Plus Cloud Commerce basic setup for testing",
7
7
  "main": "lib/index.js",
8
8
  "repository": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/types",
3
3
  "type": "module",
4
- "version": "2.6.1",
4
+ "version": "2.6.2",
5
5
  "description": "E-Com Plus Cloud Commerce reusable type definitions",
6
6
  "main": "index.ts",
7
7
  "repository": {