cloudcommerce 0.28.5 → 0.29.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 (59) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/ecomplus-stores/barra-doce/functions/many/package.json +3 -3
  3. package/ecomplus-stores/barra-doce/functions/ssr/package.json +6 -6
  4. package/ecomplus-stores/barra-doce/functions/with-apps/package.json +3 -3
  5. package/ecomplus-stores/barra-doce/package.json +2 -2
  6. package/ecomplus-stores/monocard/functions/many/package.json +3 -3
  7. package/ecomplus-stores/monocard/functions/ssr/package.json +6 -6
  8. package/ecomplus-stores/monocard/functions/with-apps/package.json +3 -3
  9. package/ecomplus-stores/monocard/package.json +2 -2
  10. package/package.json +2 -2
  11. package/packages/api/package.json +1 -1
  12. package/packages/apps/affilate-program/package.json +1 -1
  13. package/packages/apps/correios/package.json +1 -1
  14. package/packages/apps/custom-payment/package.json +1 -1
  15. package/packages/apps/custom-shipping/package.json +1 -1
  16. package/packages/apps/datafrete/package.json +1 -1
  17. package/packages/apps/discounts/package.json +1 -1
  18. package/packages/apps/emails/package.json +1 -1
  19. package/packages/apps/fb-conversions/package.json +1 -1
  20. package/packages/apps/flash-courier/package.json +1 -1
  21. package/packages/apps/frenet/package.json +1 -1
  22. package/packages/apps/galaxpay/package.json +1 -1
  23. package/packages/apps/google-analytics/package.json +1 -1
  24. package/packages/apps/jadlog/package.json +1 -1
  25. package/packages/apps/loyalty-points/package.json +1 -1
  26. package/packages/apps/melhor-envio/package.json +1 -1
  27. package/packages/apps/mercadopago/package.json +1 -1
  28. package/packages/apps/pagarme/package.json +1 -1
  29. package/packages/apps/paghiper/package.json +1 -1
  30. package/packages/apps/pix/package.json +1 -1
  31. package/packages/apps/tiny-erp/package.json +1 -1
  32. package/packages/apps/webhooks/package.json +1 -1
  33. package/packages/cli/config/firebase.json +2 -2
  34. package/packages/cli/package.json +1 -1
  35. package/packages/config/package.json +1 -1
  36. package/packages/emails/package.json +1 -1
  37. package/packages/eslint/package.json +1 -1
  38. package/packages/events/package.json +1 -1
  39. package/packages/feeds/package.json +1 -1
  40. package/packages/firebase/package.json +1 -1
  41. package/packages/i18n/package.json +1 -1
  42. package/packages/modules/lib/firebase/serve-modules-api.js +1 -1
  43. package/packages/modules/lib/firebase/serve-modules-api.js.map +1 -1
  44. package/packages/modules/package.json +1 -1
  45. package/packages/modules/src/firebase/serve-modules-api.ts +1 -1
  46. package/packages/passport/lib/firebase/serve-passport-api.js +1 -1
  47. package/packages/passport/lib/firebase/serve-passport-api.js.map +1 -1
  48. package/packages/passport/package.json +1 -1
  49. package/packages/passport/src/firebase/serve-passport-api.ts +1 -1
  50. package/packages/ssr/package.json +1 -1
  51. package/packages/storefront/config/astro/context-directive.mjs +14 -3
  52. package/packages/storefront/config/astro/index.d.ts +1 -1
  53. package/packages/storefront/config/storefront.config.mjs +0 -4
  54. package/packages/storefront/package.json +1 -1
  55. package/packages/storefront/src/lib/components/AccountLink.vue +2 -2
  56. package/packages/storefront/src/lib/state/customer-session.ts +1 -1
  57. package/packages/storefront/src/lib/state/modules-info.ts +1 -1
  58. package/packages/test-base/package.json +1 -1
  59. package/packages/types/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,25 @@
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
+ ## [0.29.0](https://github.com/ecomplus/cloud-commerce/compare/v0.28.5...v0.29.0) (2023-10-17)
6
+
7
+
8
+ ### ⚠ BREAKING CHANGES
9
+
10
+ * Default modules and passport APIs URLs changed
11
+
12
+ ### Features
13
+
14
+ * **storefront:** Update Astro `client:context` custom directive to accept "idle" value ([3ce1f3b](https://github.com/ecomplus/cloud-commerce/commit/3ce1f3b1e60feb3071eec0f5e36ece4af851a658))
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * **ssr:** Set default demoStore CDN assets prefix as done by storefront config ([5de0ac1](https://github.com/ecomplus/cloud-commerce/commit/5de0ac1c18e481317d2f10f4aad5d77ad80a5488)), closes [#L53-L55](https://github.com/ecomplus/cloud-commerce/issues/L53-L55)
20
+
21
+
22
+ * Moving modules and passport APIs to /_api/* routes ([eed3d73](https://github.com/ecomplus/cloud-commerce/commit/eed3d731257d06fa81a31ccdec8466f9c465d59b))
23
+
5
24
  ### [0.28.5](https://github.com/ecomplus/cloud-commerce/compare/v0.28.4...v0.28.5) (2023-10-17)
6
25
 
7
26
 
@@ -15,8 +15,8 @@
15
15
  },
16
16
  "main": "index.js",
17
17
  "dependencies": {
18
- "@cloudcommerce/feeds": "^0.28.4",
19
- "@cloudcommerce/firebase": "^0.28.4",
20
- "@cloudcommerce/passport": "^0.28.4"
18
+ "@cloudcommerce/feeds": "^0.28.5",
19
+ "@cloudcommerce/firebase": "^0.28.5",
20
+ "@cloudcommerce/passport": "^0.28.5"
21
21
  }
22
22
  }
@@ -17,14 +17,14 @@
17
17
  },
18
18
  "main": "index.js",
19
19
  "dependencies": {
20
- "@cloudcommerce/api": "^0.28.4",
21
- "@cloudcommerce/firebase": "^0.28.4",
22
- "@cloudcommerce/ssr": "^0.28.4"
20
+ "@cloudcommerce/api": "^0.28.5",
21
+ "@cloudcommerce/firebase": "^0.28.5",
22
+ "@cloudcommerce/ssr": "^0.28.5"
23
23
  },
24
24
  "devDependencies": {
25
- "@cloudcommerce/i18n": "^0.28.4",
26
- "@cloudcommerce/storefront": "^0.28.4",
27
- "@cloudcommerce/types": "^0.28.4",
25
+ "@cloudcommerce/i18n": "^0.28.5",
26
+ "@cloudcommerce/storefront": "^0.28.5",
27
+ "@cloudcommerce/types": "^0.28.5",
28
28
  "@fontsource/croissant-one": "^5.0.9",
29
29
  "@iconify-json/mingcute": "^1.1.9"
30
30
  }
@@ -15,8 +15,8 @@
15
15
  },
16
16
  "main": "index.js",
17
17
  "dependencies": {
18
- "@cloudcommerce/events": "^0.28.4",
19
- "@cloudcommerce/firebase": "^0.28.4",
20
- "@cloudcommerce/modules": "^0.28.4"
18
+ "@cloudcommerce/events": "^0.28.5",
19
+ "@cloudcommerce/firebase": "^0.28.5",
20
+ "@cloudcommerce/modules": "^0.28.5"
21
21
  }
22
22
  }
@@ -23,9 +23,9 @@
23
23
  "url": "https://github.com/ecomplus/cloud-commerce/issues"
24
24
  },
25
25
  "dependencies": {
26
- "@cloudcommerce/cli": "^0.28.4"
26
+ "@cloudcommerce/cli": "^0.28.5"
27
27
  },
28
28
  "devDependencies": {
29
- "@cloudcommerce/eslint": "^0.28.4"
29
+ "@cloudcommerce/eslint": "^0.28.5"
30
30
  }
31
31
  }
@@ -15,8 +15,8 @@
15
15
  },
16
16
  "main": "index.js",
17
17
  "dependencies": {
18
- "@cloudcommerce/feeds": "^0.28.4",
19
- "@cloudcommerce/firebase": "^0.28.4",
20
- "@cloudcommerce/passport": "^0.28.4"
18
+ "@cloudcommerce/feeds": "^0.28.5",
19
+ "@cloudcommerce/firebase": "^0.28.5",
20
+ "@cloudcommerce/passport": "^0.28.5"
21
21
  }
22
22
  }
@@ -17,15 +17,15 @@
17
17
  },
18
18
  "main": "index.js",
19
19
  "dependencies": {
20
- "@cloudcommerce/api": "^0.28.4",
21
- "@cloudcommerce/firebase": "^0.28.4",
22
- "@cloudcommerce/ssr": "^0.28.4",
20
+ "@cloudcommerce/api": "^0.28.5",
21
+ "@cloudcommerce/firebase": "^0.28.5",
22
+ "@cloudcommerce/ssr": "^0.28.5",
23
23
  "@vueuse/motion": "2.0.0-beta.22"
24
24
  },
25
25
  "devDependencies": {
26
- "@cloudcommerce/i18n": "^0.28.4",
27
- "@cloudcommerce/storefront": "^0.28.4",
28
- "@cloudcommerce/types": "^0.28.4",
26
+ "@cloudcommerce/i18n": "^0.28.5",
27
+ "@cloudcommerce/storefront": "^0.28.5",
28
+ "@cloudcommerce/types": "^0.28.5",
29
29
  "@fontsource-variable/inter": "^5.0.8",
30
30
  "@iconify-json/ri": "^1.1.8",
31
31
  "@iconify-json/wpf": "^1.1.4",
@@ -15,8 +15,8 @@
15
15
  },
16
16
  "main": "index.js",
17
17
  "dependencies": {
18
- "@cloudcommerce/events": "^0.28.4",
19
- "@cloudcommerce/firebase": "^0.28.4",
20
- "@cloudcommerce/modules": "^0.28.4"
18
+ "@cloudcommerce/events": "^0.28.5",
19
+ "@cloudcommerce/firebase": "^0.28.5",
20
+ "@cloudcommerce/modules": "^0.28.5"
21
21
  }
22
22
  }
@@ -23,9 +23,9 @@
23
23
  "url": "https://github.com/ecomplus/cloud-commerce/issues"
24
24
  },
25
25
  "dependencies": {
26
- "@cloudcommerce/cli": "^0.28.4"
26
+ "@cloudcommerce/cli": "^0.28.5"
27
27
  },
28
28
  "devDependencies": {
29
- "@cloudcommerce/eslint": "^0.28.4"
29
+ "@cloudcommerce/eslint": "^0.28.5"
30
30
  }
31
31
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cloudcommerce",
3
3
  "type": "module",
4
- "version": "0.28.5",
4
+ "version": "0.29.0",
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>",
@@ -30,7 +30,7 @@
30
30
  "vite": "^4.4.11",
31
31
  "vitest": "^0.34.6",
32
32
  "zx": "^7.2.3",
33
- "@cloudcommerce/eslint": "0.28.5"
33
+ "@cloudcommerce/eslint": "0.29.0"
34
34
  },
35
35
  "scripts": {
36
36
  "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": "0.28.5",
4
+ "version": "0.29.0",
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-affilate-program",
3
3
  "type": "module",
4
- "version": "0.28.5",
4
+ "version": "0.29.0",
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": "0.28.5",
4
+ "version": "0.29.0",
5
5
  "description": "E-Com Plus Cloud Commerce app for Correios shipping calculation",
6
6
  "main": "lib/correios.js",
7
7
  "repository": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-custom-payment",
3
3
  "type": "module",
4
- "version": "0.28.5",
4
+ "version": "0.29.0",
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": "0.28.5",
4
+ "version": "0.29.0",
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": "0.28.5",
4
+ "version": "0.29.0",
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": "0.28.5",
4
+ "version": "0.29.0",
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": "0.28.5",
4
+ "version": "0.29.0",
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": "0.28.5",
4
+ "version": "0.29.0",
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": "0.28.5",
4
+ "version": "0.29.0",
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": "0.28.5",
4
+ "version": "0.29.0",
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": "0.28.5",
4
+ "version": "0.29.0",
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": "0.28.5",
4
+ "version": "0.29.0",
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": "0.28.5",
4
+ "version": "0.29.0",
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": "0.28.5",
4
+ "version": "0.29.0",
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-melhor-envio",
3
3
  "type": "module",
4
- "version": "0.28.5",
4
+ "version": "0.29.0",
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": "0.28.5",
4
+ "version": "0.29.0",
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": "0.28.5",
4
+ "version": "0.29.0",
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-paghiper",
3
3
  "type": "module",
4
- "version": "0.28.5",
4
+ "version": "0.29.0",
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": "0.28.5",
4
+ "version": "0.29.0",
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": "0.28.5",
4
+ "version": "0.29.0",
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": "0.28.5",
4
+ "version": "0.29.0",
5
5
  "description": "E-Com Plus Cloud Commerce app for general order webhooks",
6
6
  "main": "lib/index.js",
7
7
  "repository": {
@@ -47,12 +47,12 @@
47
47
  ],
48
48
  "rewrites": [
49
49
  {
50
- "source": "/api/modules/**",
50
+ "source": "/_api/modules/**",
51
51
  "function": "modules",
52
52
  "region": "us-east4"
53
53
  },
54
54
  {
55
- "source": "/api/passport/**",
55
+ "source": "/_api/passport/**",
56
56
  "function": "passport",
57
57
  "region": "us-east4"
58
58
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/cli",
3
3
  "type": "module",
4
- "version": "0.28.5",
4
+ "version": "0.29.0",
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": "0.28.5",
4
+ "version": "0.29.0",
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": "0.28.5",
4
+ "version": "0.29.0",
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": "0.28.5",
4
+ "version": "0.29.0",
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": "0.28.5",
4
+ "version": "0.29.0",
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": "0.28.5",
4
+ "version": "0.29.0",
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": "0.28.5",
4
+ "version": "0.29.0",
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": "0.28.5",
4
+ "version": "0.29.0",
5
5
  "description": "E-Com Plus Cloud Commerce i18n",
6
6
  "main": "lib/all.js",
7
7
  "exports": {
@@ -16,7 +16,7 @@ export default (req, res) => {
16
16
  url = url.slice(0, -5);
17
17
  }
18
18
  [url] = url.split('?');
19
- url = url.replace('/api/modules', ''); // due to hosting rewrite
19
+ url = url.replace('/_api/modules', ''); // due to hosting rewrite
20
20
  const modName = url.split('/')[1];
21
21
  const sendSchema = (isResponseSchema = false) => {
22
22
  return res.status(200)
@@ -1 +1 @@
1
- {"version":3,"file":"serve-modules-api.js","sourceRoot":"","sources":["../../src/firebase/serve-modules-api.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAC3C,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,eAAe,CAAC,GAAY,EAAE,GAAa,EAAE,EAAE;IAC7C,MAAM,EAAE,MAAM,EAAE,GAAG,GAAG,CAAC;IACvB,IAAI,MAAM,KAAK,MAAM,IAAI,MAAM,KAAK,KAAK,EAAE;Q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,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;SAC1E;KACF;IACD,OAAO,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;AAC7B,CAAC,CAAC"}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/modules",
3
3
  "type": "module",
4
- "version": "0.28.5",
4
+ "version": "0.29.0",
5
5
  "description": "E-Com Plus Cloud Commerce modules API",
6
6
  "main": "lib/index.cjs",
7
7
  "exports": {
@@ -20,7 +20,7 @@ export default (req: Request, res: Response) => {
20
20
  url = url.slice(0, -5);
21
21
  }
22
22
  [url] = url.split('?');
23
- url = url.replace('/api/modules', ''); // due to hosting rewrite
23
+ url = url.replace('/_api/modules', ''); // due to hosting rewrite
24
24
  const modName = url.split('/')[1];
25
25
 
26
26
  const sendSchema = (isResponseSchema = false) => {
@@ -6,7 +6,7 @@ export default async (req, res) => {
6
6
  if (url.endsWith('.json')) {
7
7
  url = url.slice(0, -5);
8
8
  }
9
- url = url.replace('/api/passport', ''); // due to hosting rewrite
9
+ url = url.replace('/_api/passport', ''); // due to hosting rewrite
10
10
  const endpoint = url.split('/')[1];
11
11
  if (endpoint !== 'token') {
12
12
  res.sendStatus(404);
@@ -1 +1 @@
1
- {"version":3,"file":"serve-passport-api.js","sourceRoot":"","sources":["../../src/firebase/serve-passport-api.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,oBAAoB,MAAM,yBAAyB,CAAC;AAE3D,eAAe,KAAK,EAAE,GAAY,EAAE,GAAa,EAAE,EAAE;IACnD,IAAI,EAAE,GAAG,EAAE,GAAG,GAAG,CAAC;IAClB,IAAI,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE;QACzB,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;KACxB;IACD,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,eAAe,EAA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,CAAC,EAAE;QACzB,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;KACxB;IACD,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,gBAAgB,EAAE,EAAE,CAAC,CAAC,CAAC,yBAAyB;IAClE,MAAM,QAAQ,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAEnC,IAAI,QAAQ,KAAK,OAAO,EAAE;QACxB,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;QACpB,OAAO;KACR;IACD,MAAM,iBAAiB,GAAG,GAAG,CAAC,OAAO,CAAC,aAAa,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACnE,IAAI,CAAC,iBAAiB,EAAE;QACtB,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;QACpB,OAAO;KACR;IACD,IAAI;QACF,MAAM,eAAe,GAAG,MAAM,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;QACtE,IAAI,eAAe,KAAK,IAAI,EAAE;YAC5B,GAAG,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;YAC1B,OAAO;SACR;QACD,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;YACnB,MAAM,EAAE,GAAG;YACX,KAAK,EAAE,2CAA2C;SACnD,CAAC,CAAC;KACJ;IAAC,OAAO,GAAG,EAAE;QACZ,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAClB,GAAG,CAAC,UAAU,CAAE,GAAgB,CAAC,UAAU,IAAI,GAAG,CAAC,CAAC;KACrD;AACH,CAAC,CAAC"}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/passport",
3
3
  "type": "module",
4
- "version": "0.28.5",
4
+ "version": "0.29.0",
5
5
  "description": "E-Com Plus Cloud Commerce customers authentication (passport) API",
6
6
  "main": "lib/index.js",
7
7
  "exports": {
@@ -8,7 +8,7 @@ export default async (req: Request, res: Response) => {
8
8
  if (url.endsWith('.json')) {
9
9
  url = url.slice(0, -5);
10
10
  }
11
- url = url.replace('/api/passport', ''); // due to hosting rewrite
11
+ url = url.replace('/_api/passport', ''); // due to hosting rewrite
12
12
  const endpoint = url.split('/')[1];
13
13
 
14
14
  if (endpoint !== 'token') {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/ssr",
3
3
  "type": "module",
4
- "version": "0.28.5",
4
+ "version": "0.29.0",
5
5
  "description": "E-Com Plus Cloud Commerce storefront SSR",
6
6
  "main": "lib/index.js",
7
7
  "exports": {
@@ -3,19 +3,30 @@
3
3
  * Check event emits at BaseHead.astro
4
4
  * @type {import('astro').ClientDirective}
5
5
  */
6
- export default (load) => {
6
+ export default (load, opts) => {
7
7
  const hy = async () => {
8
8
  const hydrate = await load();
9
9
  await hydrate();
10
10
  };
11
+ const next = () => {
12
+ if (opts.value === 'idle') {
13
+ if (typeof window.requestIdleCallback === 'function') {
14
+ setTimeout(() => window.requestIdleCallback(hy), 9);
15
+ return;
16
+ }
17
+ setTimeout(hy, 200);
18
+ return;
19
+ }
20
+ hy();
21
+ };
11
22
  const id = window.$storefront?.apiContext?.doc._id || null;
12
23
  if (window._firstLoadContextId === id && window._emitedContextId === id) {
13
24
  console.log('[ctx] first load');
14
- hy();
25
+ next();
15
26
  setTimeout(() => {
16
27
  delete window._firstLoadContextId;
17
28
  }, 49);
18
29
  return;
19
30
  }
20
- window.addEventListener('storefront:apiContext', hy, { once: true });
31
+ window.addEventListener('storefront:apiContext', next, { once: true });
21
32
  };
@@ -3,6 +3,6 @@ import 'astro';
3
3
 
4
4
  declare module 'astro' {
5
5
  interface AstroClientDirectives {
6
- 'client:context'?: boolean
6
+ 'client:context'?: boolean | 'idle';
7
7
  }
8
8
  }
@@ -50,10 +50,6 @@ export default () => {
50
50
  currencySymbol,
51
51
  } = config.get();
52
52
 
53
- if (!settings.assetsPrefix && storeId === 1011 && domain === 'demo.ecomplus.app') {
54
- settings.assetsPrefix = 'https://s2-demo.b-cdn.net';
55
- }
56
-
57
53
  return {
58
54
  storeId,
59
55
  lang,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/storefront",
3
3
  "type": "module",
4
- "version": "0.28.5",
4
+ "version": "0.29.0",
5
5
  "description": "E-Com Plus Cloud Commerce storefront with Astro",
6
6
  "bin": {
7
7
  "storefront": "./scripts/build-prod.sh"
@@ -4,7 +4,7 @@ import { computed } from 'vue';
4
4
  export interface Props {
5
5
  to?: 'orders' | 'favorites';
6
6
  accountUrl?: string;
7
- returnUrl?: string;
7
+ returnUrl?: string | null;
8
8
  isSignUp?: boolean;
9
9
  }
10
10
 
@@ -20,7 +20,7 @@ const href = computed(() => {
20
20
  } else {
21
21
  url += '?';
22
22
  }
23
- return `${url}return_url=${props.returnUrl}`;
23
+ return props.returnUrl ? `${url}return_url=${props.returnUrl}` : url;
24
24
  }
25
25
  const { settings } = globalThis.$storefront;
26
26
  if (props.to === 'orders' && settings.ordersUrl) {
@@ -63,7 +63,7 @@ const authenticate = async () => {
63
63
  }
64
64
  const { domain } = window.$storefront.settings;
65
65
  try {
66
- const resAuth = await fetch(`https://${domain}/api/passport/token`, {
66
+ const resAuth = await fetch(`https://${domain}/_api/passport/token`, {
67
67
  method: 'POST',
68
68
  headers: {
69
69
  'Content-Type': 'application/json',
@@ -67,7 +67,7 @@ if (!import.meta.env.SSR) {
67
67
  }
68
68
 
69
69
  modulesToFetch.forEach(({ modName, reqOptions }) => {
70
- afetch(`/api/modules/${modName}`, reqOptions)
70
+ afetch(`/_api/modules/${modName}`, reqOptions)
71
71
  .then(async (response) => {
72
72
  if (response.ok) {
73
73
  const modInfo = {};
@@ -2,7 +2,7 @@
2
2
  "name": "@cloudcommerce/test-base",
3
3
  "private": true,
4
4
  "type": "module",
5
- "version": "0.28.5",
5
+ "version": "0.29.0",
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": "0.28.5",
4
+ "version": "0.29.0",
5
5
  "description": "E-Com Plus Cloud Commerce reusable type definitions",
6
6
  "main": "index.ts",
7
7
  "repository": {