cloudcommerce 2.7.5 → 2.8.8

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 (74) hide show
  1. package/CHANGELOG.md +42 -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/ssr/src/components/Banner.vue +6 -4
  5. package/ecomplus-stores/barradoce/functions/ssr/src/components/CheckoutPage.vue +2 -2
  6. package/ecomplus-stores/barradoce/functions/ssr/src/components/ProductCard.vue +5 -3
  7. package/ecomplus-stores/barradoce/functions/ssr/src/components/SearchModal.vue +3 -2
  8. package/ecomplus-stores/barradoce/functions/ssr/src/components/ShopHeaderMenu.vue +12 -12
  9. package/ecomplus-stores/barradoce/functions/ssr/src/components/ShopHeaderSubmenu.vue +17 -12
  10. package/ecomplus-stores/barradoce/functions/ssr/src/components/ShopSidenavCategory.vue +11 -9
  11. package/ecomplus-stores/barradoce/functions/ssr/src/main/Fallback.astro +23 -13
  12. package/ecomplus-stores/barradoce/functions/ssr/src/pages/404.astro +30 -0
  13. package/ecomplus-stores/barradoce/functions/with-apps/package.json +3 -3
  14. package/ecomplus-stores/barradoce/package.json +2 -2
  15. package/package.json +4 -4
  16. package/packages/api/package.json +1 -1
  17. package/packages/apps/affiliate-program/package.json +2 -2
  18. package/packages/apps/correios/package.json +3 -3
  19. package/packages/apps/custom-payment/package.json +1 -1
  20. package/packages/apps/custom-shipping/package.json +1 -1
  21. package/packages/apps/datafrete/package.json +2 -2
  22. package/packages/apps/discounts/package.json +1 -1
  23. package/packages/apps/emails/package.json +2 -2
  24. package/packages/apps/fb-conversions/package.json +2 -2
  25. package/packages/apps/flash-courier/package.json +2 -2
  26. package/packages/apps/frenet/package.json +2 -2
  27. package/packages/apps/galaxpay/package.json +2 -2
  28. package/packages/apps/google-analytics/package.json +2 -2
  29. package/packages/apps/jadlog/package.json +1 -1
  30. package/packages/apps/loyalty-points/package.json +1 -1
  31. package/packages/apps/mandae/package.json +2 -2
  32. package/packages/apps/melhor-envio/package.json +2 -2
  33. package/packages/apps/mercadopago/package.json +2 -2
  34. package/packages/apps/pagarme/package.json +3 -3
  35. package/packages/apps/pagarme-v5/package.json +2 -2
  36. package/packages/apps/paghiper/package.json +2 -2
  37. package/packages/apps/pix/package.json +2 -2
  38. package/packages/apps/tiny-erp/package.json +2 -2
  39. package/packages/apps/webhooks/package.json +2 -2
  40. package/packages/cli/lib/cli.js +3 -3
  41. package/packages/cli/package.json +1 -1
  42. package/packages/cli/src/cli.ts +3 -3
  43. package/packages/config/package.json +1 -1
  44. package/packages/emails/package.json +2 -2
  45. package/packages/eslint/package.json +1 -1
  46. package/packages/events/package.json +2 -2
  47. package/packages/feeds/package.json +1 -1
  48. package/packages/firebase/package.json +3 -3
  49. package/packages/i18n/package.json +1 -1
  50. package/packages/modules/package.json +2 -2
  51. package/packages/passport/package.json +2 -2
  52. package/packages/ssr/lib/lib/serve-storefront.js +5 -1
  53. package/packages/ssr/lib/lib/serve-storefront.js.map +1 -1
  54. package/packages/ssr/package.json +4 -4
  55. package/packages/ssr/src/lib/serve-storefront.ts +5 -1
  56. package/packages/storefront/astro.config.mjs +1 -0
  57. package/packages/storefront/client.d.ts +1 -0
  58. package/packages/storefront/config/astro/client-sf-directive.mjs +0 -3
  59. package/packages/storefront/config/storefront.tailwind.cjs +13 -0
  60. package/packages/storefront/config/storefront.unocss.cjs +20 -18
  61. package/packages/storefront/package.json +4 -4
  62. package/packages/storefront/src/lib/components/globals/ALink.vue +48 -2
  63. package/packages/storefront/src/lib/composables/use-product-shelf.ts +2 -2
  64. package/packages/storefront/src/lib/composables/use-search-showcase.ts +2 -2
  65. package/packages/storefront/src/lib/composables/use-shipping-calculator.ts +6 -3
  66. package/packages/storefront/src/lib/composables/use-shop-header.ts +10 -7
  67. package/packages/storefront/src/lib/composables/use-sku-selector.ts +1 -1
  68. package/packages/storefront/src/lib/layouts/Base.astro +5 -0
  69. package/packages/storefront/src/lib/layouts/BaseHead.astro +5 -10
  70. package/packages/storefront/src/lib/scripts/push-analytics-events.ts +4 -5
  71. package/packages/storefront/src/lib/state/use-analytics.ts +10 -4
  72. package/packages/test-base/package.json +1 -1
  73. package/packages/types/package.json +1 -1
  74. package/packages/storefront/src/lib/components/ViewTransitions.astro +0 -426
package/CHANGELOG.md CHANGED
@@ -2,6 +2,48 @@
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.8.8](https://github.com/ecomplus/cloud-commerce/compare/v2.8.7...v2.8.8) (2024-03-13)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * **cli:** Handle `start` (npm start) with ssr dev server ([0093426](https://github.com/ecomplus/cloud-commerce/commit/009342688ee2e753abd943c3fd07b161e08ccf3e))
11
+ * **storefront:** Move script importing `astro:prefetch` to body, within `base-body-scripts` slot ([141cca4](https://github.com/ecomplus/cloud-commerce/commit/141cca42733a7a9b13b83fb0556d39a1e953dd8d))
12
+ * **storefront:** Properly listen grids data load on SKU selector composable ([5c0ad4f](https://github.com/ecomplus/cloud-commerce/commit/5c0ad4f6ef1b60bb5bea0834a23c2f92dd66597c))
13
+
14
+ ### [2.8.7](https://github.com/ecomplus/cloud-commerce/compare/v2.8.6...v2.8.7) (2024-03-12)
15
+
16
+ ### [2.8.6](https://github.com/ecomplus/cloud-commerce/compare/v2.8.5...v2.8.6) (2024-03-12)
17
+
18
+ ### [2.8.5](https://github.com/ecomplus/cloud-commerce/compare/v2.8.4...v2.8.5) (2024-03-12)
19
+
20
+ ### [2.8.4](https://github.com/ecomplus/cloud-commerce/compare/v2.8.3...v2.8.4) (2024-03-12)
21
+
22
+ ### [2.8.3](https://github.com/ecomplus/cloud-commerce/compare/v2.8.2...v2.8.3) (2024-03-12)
23
+
24
+ ### [2.8.2](https://github.com/ecomplus/cloud-commerce/compare/v2.8.1...v2.8.2) (2024-03-12)
25
+
26
+ ### [2.8.1](https://github.com/ecomplus/cloud-commerce/compare/v2.8.0...v2.8.1) (2024-03-12)
27
+
28
+ ## [2.8.0](https://github.com/ecomplus/cloud-commerce/compare/v2.7.5...v2.8.0) (2024-03-12)
29
+
30
+
31
+ ### Features
32
+
33
+ * **ssr:** Start setting `CDN-Tag` header when bunny.net CDN detected for advanced cache purge ([fba85fc](https://github.com/ecomplus/cloud-commerce/commit/fba85fc67cf024343f216b647635340efc040ef7))
34
+ * **storefront:** New optional `prefetch` prop to `<ALink>` global component ([547998c](https://github.com/ecomplus/cloud-commerce/commit/547998c3317551dd7ec24e064a67e26e9fa5111c))
35
+
36
+
37
+ ### Bug Fixes
38
+
39
+ * **deps:** Update non-major dependencies ([#345](https://github.com/ecomplus/cloud-commerce/issues/345)) ([c5b9fa7](https://github.com/ecomplus/cloud-commerce/commit/c5b9fa79d09ab3ac63f783c680e029c84620603b))
40
+ * **storefront:** Bump Astro to v4.5.0 ([#344](https://github.com/ecomplus/cloud-commerce/issues/344)) ([8e04667](https://github.com/ecomplus/cloud-commerce/commit/8e04667320321132353a343512327cedd4202f2d))
41
+ * **storefront:** Ensure offset,limit is respected on related products shelf ([e05db9d](https://github.com/ecomplus/cloud-commerce/commit/e05db9d72556f1d2adbe3f8a5fd2e631f2ed4121))
42
+ * **storefront:** Fix parsing extra animate utilities and keyframes from Tailwind config to UnoCSS ([df9c170](https://github.com/ecomplus/cloud-commerce/commit/df9c17037633608e757580bce76e7cc04511ccbd))
43
+ * **storefront:** Programatically prefetch visible links on global `<ALink>` ([0a3aa96](https://github.com/ecomplus/cloud-commerce/commit/0a3aa9690fbf9da80aaac1015f2d92340b958abf))
44
+ * **storefront:** Properly set status 404 (or 5xx) on async API context error ([b371cb4](https://github.com/ecomplus/cloud-commerce/commit/b371cb4dc2fb4494f685d1d810ffe2b9baeda3d6))
45
+ * **storefront:** Send analytics page view as origin URL on error fallback page ([bd9a47b](https://github.com/ecomplus/cloud-commerce/commit/bd9a47b2f652f30465f58544257208f75dc1862d))
46
+
5
47
  ### [2.7.5](https://github.com/ecomplus/cloud-commerce/compare/v2.7.4...v2.7.5) (2024-03-09)
6
48
 
7
49
 
@@ -15,8 +15,8 @@
15
15
  },
16
16
  "main": "index.js",
17
17
  "dependencies": {
18
- "@cloudcommerce/feeds": "^2.7.4",
19
- "@cloudcommerce/firebase": "^2.7.4",
20
- "@cloudcommerce/passport": "^2.7.4"
18
+ "@cloudcommerce/feeds": "^2.8.7",
19
+ "@cloudcommerce/firebase": "^2.8.7",
20
+ "@cloudcommerce/passport": "^2.8.7"
21
21
  }
22
22
  }
@@ -19,16 +19,16 @@
19
19
  },
20
20
  "main": "index.js",
21
21
  "dependencies": {
22
- "@cloudcommerce/api": "^2.7.4",
23
- "@cloudcommerce/firebase": "^2.7.4",
24
- "@cloudcommerce/ssr": "^2.7.4",
22
+ "@cloudcommerce/api": "^2.8.7",
23
+ "@cloudcommerce/firebase": "^2.8.7",
24
+ "@cloudcommerce/ssr": "^2.8.7",
25
25
  "@headlessui/vue": "^1.7.18",
26
26
  "micromark": "^4.0.0"
27
27
  },
28
28
  "devDependencies": {
29
- "@cloudcommerce/i18n": "^2.7.4",
30
- "@cloudcommerce/storefront": "^2.7.4",
31
- "@cloudcommerce/types": "^2.7.4",
29
+ "@cloudcommerce/i18n": "^2.8.7",
30
+ "@cloudcommerce/storefront": "^2.8.7",
31
+ "@cloudcommerce/types": "^2.8.7",
32
32
  "@iconify-json/mingcute": "^1.1.16",
33
33
  "photoswipe": "^5.4.3"
34
34
  }
@@ -7,6 +7,7 @@
7
7
  >
8
8
  <ALink
9
9
  :href="href"
10
+ prefetch="visible"
10
11
  :class="hasHeader
11
12
  ? 'lg:col-span-3 sm:order-last [&_img]:max-w-full sm:[&_img]:max-w-none'
12
13
  + ' [&_img]:aspect-video sm:[&_img]:aspect-[2.5] [&_img]:object-cover'
@@ -22,13 +23,13 @@
22
23
  <Component
23
24
  v-if="parsedTitle"
24
25
  :is="headingTag"
25
- class="ui-title mt-1"
26
+ class="mt-1 ui-title"
26
27
  >
27
28
  {{ parsedTitle }}
28
29
  </Component>
29
30
  <p
30
31
  v-if="parsedSubtitle"
31
- class="text-base-800 mt-4 text-lg font-medium uppercase
32
+ class="mt-4 text-lg font-medium uppercase text-base-800
32
33
  md:mt-6 lg:text-xl"
33
34
  >
34
35
  {{ parsedSubtitle }}
@@ -36,9 +37,10 @@
36
37
  <ALink
37
38
  v-if="parsedButtonText"
38
39
  :href="buttonLink"
39
- class="ui-btn-lg ui-btn-contrast mt-7 min-w-[150px] md:mt-10"
40
+ :prefetch="href ? 'hover' : 'visible'"
41
+ class="mt-7 min-w-[150px] ui-btn-lg ui-btn-contrast md:mt-10"
40
42
  >
41
- <i class="i-tag-chevron-fill mr-1"></i>
43
+ <i class="mr-1 i-tag-chevron-fill"></i>
42
44
  {{ parsedButtonText }}
43
45
  </ALink>
44
46
  </div>
@@ -3,9 +3,9 @@
3
3
  <section class="bg-base-50">
4
4
  <div class="flex flex-wrap items-center
5
5
  justify-center gap-6 ui-section lg:gap-12">
6
- <a href="/">
6
+ <ALink href="/">
7
7
  <slot name="logo" />
8
- </a>
8
+ </ALink>
9
9
  <div class="flex items-center gap-2">
10
10
  <i class="m-0 bg-success-400 text-3xl i-shield-check-solid"></i>
11
11
  <span class="text-base text-base-600">
@@ -6,6 +6,7 @@
6
6
  >
7
7
  <ALink
8
8
  :href="link"
9
+ prefetch="visible"
9
10
  class="flex h-full flex-col overflow-hidden rounded bg-white
10
11
  ring-black/5 group-hover:shadow group-hover:ring-1"
11
12
  >
@@ -67,7 +68,7 @@
67
68
  class="absolute -top-11 right-1 z-10 flex items-center gap-1
68
69
  rounded-full px-3 py-2 leading-none
69
70
  opacity-75 primary hover:opacity-100
70
- md:-top-4 lg:-top-9 lg:left-4 lg:ml-0"
71
+ md:-top-4 lg:-top-9 lg:left-4 lg:right-auto lg:ml-0"
71
72
  @click.stop.prevent="addProductToCart(product)"
72
73
  :aria-label="$t.i19addToCart"
73
74
  >
@@ -80,7 +81,7 @@
80
81
  </template>
81
82
 
82
83
  <script setup lang="ts">
83
- import { watchOnce, useElementHover } from '@vueuse/core';
84
+ import { useElementHover } from '@vueuse/core';
84
85
  import { addProductToCart } from '@@sf/state/shopping-cart';
85
86
  import {
86
87
  type Props as UseProductCardProps,
@@ -109,7 +110,8 @@ const {
109
110
  const card = ref<HTMLElement | null>(null);
110
111
  const isHovered = useElementHover(card);
111
112
  const wasHoveredOnce = ref(false);
112
- watchOnce(isHovered, () => {
113
+ const unwatch = watch(isHovered, () => {
113
114
  wasHoveredOnce.value = true;
115
+ unwatch();
114
116
  });
115
117
  </script>
@@ -47,13 +47,14 @@
47
47
  >
48
48
  <strong>{{ productCount }}</strong> {{ $t.i19itemsFound }}
49
49
  </p>
50
- <a
50
+ <ALink
51
51
  v-if="productCount > products.length"
52
+ prefetch="visible"
52
53
  :href="getSearchUrl(term)"
53
54
  class="w-auto whitespace-nowrap text-center ui-btn ui-btn-primary"
54
55
  >
55
56
  {{ $t.i19seeAll }}
56
- </a>
57
+ </ALink>
57
58
  </div>
58
59
  <div class="lg:col-span-2">
59
60
  <nav>
@@ -1,8 +1,8 @@
1
1
  <template>
2
2
  <nav>
3
3
  <ul
4
- class="text-base-700 sticky-header:transition-none flex justify-between
5
- gap-1.5 transition-all"
4
+ class="flex justify-between gap-1.5 text-base-700
5
+ transition-all sticky-header:transition-none"
6
6
  :class="inlineMenuTrees.length < 7
7
7
  ? 'text-sm'
8
8
  : `leading-none text-[.75rem]
@@ -18,20 +18,20 @@
18
18
  ]"
19
19
  >
20
20
  <template #button="{ open }">
21
- <span class="hover:text-primary group">
22
- <span class="text-secondary-500 hidden xl:inline">
21
+ <span class="group hover:text-primary">
22
+ <span class="hidden text-secondary-500 xl:inline">
23
23
  <i v-if="categoryTree.slug.includes('confeitar')"
24
- class="i-cupcake-line me-1"></i>
24
+ class="me-1 i-cupcake-line"></i>
25
25
  <i v-else-if="categoryTree.slug.includes('cortadores')"
26
- class="i-scissors-2-line me-1"></i>
26
+ class="me-1 i-scissors-2-line"></i>
27
27
  <i v-else-if="categoryTree.slug.includes('panificacao')"
28
- class="i-bread-line me-1"></i>
28
+ class="me-1 i-bread-line"></i>
29
29
  <i v-else-if="categoryTree.slug.includes('embalagens')"
30
- class="i-package-2-line me-1"></i>
30
+ class="me-1 i-package-2-line"></i>
31
31
  <i v-else-if="categoryTree.slug.includes('chocolate')"
32
- class="i-cookie-man-line me-1"></i>
32
+ class="me-1 i-cookie-man-line"></i>
33
33
  <i v-else-if="categoryTree.slug.includes('ingredientes')"
34
- class="i-drop-line me-1"></i>
34
+ class="me-1 i-drop-line"></i>
35
35
  </span>
36
36
  <h3
37
37
  class="inline tracking-tight group-hover:underline"
@@ -45,14 +45,14 @@
45
45
  </span>
46
46
  </template>
47
47
  </ShopHeaderSubmenu>
48
- <a
48
+ <ALink
49
49
  v-else
50
50
  :href="`/${categoryTree.slug}`"
51
51
  class="hover:text-primary hover:underline"
52
52
  :class="inlineMenuTrees.length < 7 ? 'decoration-2' : null"
53
53
  >
54
54
  <h3 class="inline">{{ categoryTree.name }}</h3>
55
- </a>
55
+ </ALink>
56
56
  </li>
57
57
  </ul>
58
58
  </nav>
@@ -12,8 +12,8 @@
12
12
  <Fade>
13
13
  <PopoverPanel
14
14
  v-slot="{ close }"
15
- class="Popover text-base-700 absolute top-3 z-50
16
- !transform rounded bg-white/80 px-7 py-5 text-base
15
+ class="Popover absolute top-3 z-50 !transform
16
+ rounded bg-white/80 px-7 py-5 text-base text-base-700
17
17
  shadow backdrop-blur-md"
18
18
  :class="countMenuCols === 1 ? 'w-auto'
19
19
  : countMenuCols === 2
@@ -30,11 +30,15 @@
30
30
  :key="`link-${i}`"
31
31
  class="mb-2 text-sm"
32
32
  >
33
- <a :href="`/${subcategory.slug}`" class="hover:text-primary">
33
+ <ALink
34
+ :href="`/${subcategory.slug}`"
35
+ prefetch="visible"
36
+ class="hover:text-primary"
37
+ >
34
38
  <h3 :class="countMenuCols === 1 && 'whitespace-nowrap'">
35
39
  {{ subcategory.name }}
36
40
  </h3>
37
- </a>
41
+ </ALink>
38
42
  </li>
39
43
  </ul>
40
44
  <div
@@ -42,21 +46,21 @@
42
46
  :key="i"
43
47
  class="flex-1"
44
48
  >
45
- <a :href="`/${subcategory.slug}`" class="hover:text-primary">
49
+ <ALink :href="`/${subcategory.slug}`" class="hover:text-primary">
46
50
  <h3>{{ subcategory.name }}</h3>
47
- </a>
48
- <ul class="text-base-600 mb-1.5 mt-1 text-sm">
51
+ </ALink>
52
+ <ul class="mb-1.5 mt-1 text-sm text-base-600">
49
53
  <li
50
54
  v-for="(nestedSubcategory, ii) in subcategory.subcategories"
51
55
  :key="`${i}-${ii}`"
52
56
  class="mb-0.5"
53
57
  >
54
- <a
58
+ <ALink
55
59
  :href="`/${nestedSubcategory.slug}`"
56
60
  class="hover:text-primary hover:underline"
57
61
  >
58
62
  <h3>{{ nestedSubcategory.name }}</h3>
59
- </a>
63
+ </ALink>
60
64
  </li>
61
65
  </ul>
62
66
  </div>
@@ -68,12 +72,13 @@
68
72
  <AImg :picture="categoryPicture" class="ml-auto rounded" />
69
73
  </div>
70
74
  </div>
71
- <a
75
+ <ALink
72
76
  :href="`/${categoryTree.slug}`"
73
- class="text-base-600 mt-1 block text-xs leading-snug underline"
77
+ prefetch="visible"
78
+ class="mt-1 block text-xs leading-snug text-base-600 underline"
74
79
  >
75
80
  {{ $t.i19seeAll$1Category.replace('$1', categoryTree.name) }}
76
- </a>
81
+ </ALink>
77
82
  <button ref="close" @click.stop="close" class="hidden"></button>
78
83
  </PopoverPanel>
79
84
  </Fade>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <li class="text-base-800 text-lg">
2
+ <li class="text-lg text-base-800">
3
3
  <details
4
4
  v-if="categoryTree.subcategories.length"
5
5
  class="z-10 overflow-y-auto overflow-x-hidden bg-white
@@ -7,8 +7,8 @@
7
7
  @toggle="isOpen = !isOpen"
8
8
  >
9
9
  <summary
10
- class="active:bg-base-100 cursor-pointer list-none px-6
11
- py-3 transition-colors"
10
+ class="cursor-pointer list-none px-6 py-3
11
+ transition-colors active:bg-base-100"
12
12
  :class="isOpen ? 'bg-base-100' : null"
13
13
  >
14
14
  <i :class="!isOpen
@@ -35,19 +35,21 @@
35
35
  :category-tree="subcategoryTree"
36
36
  />
37
37
  <li>
38
- <a
38
+ <ALink
39
39
  :href="`/${categoryTree.slug}`"
40
- class="active:bg-base-200 block px-6 py-3 text-base underline"
40
+ prefetch="visible"
41
+ class="block px-6 py-3 text-base underline active:bg-base-200"
41
42
  >
42
43
  {{ $t.i19seeAll$1Category.replace('$1', categoryTree.name) }}
43
- </a>
44
+ </ALink>
44
45
  </li>
45
46
  </ul>
46
47
  </details>
47
- <a
48
+ <ALink
48
49
  v-else
49
50
  :href="`/${categoryTree.slug}`"
50
- class="active:bg-base-200 block px-6 py-3"
51
+ prefetch="visible"
52
+ class="block px-6 py-3 active:bg-base-200"
51
53
  >
52
54
  <AImg
53
55
  v-if="!isOpen && categoryTree.icon"
@@ -56,7 +58,7 @@
56
58
  class="mr-3 inline h-5 w-auto"
57
59
  />
58
60
  <h3 class="inline">{{ categoryTree.name }}</h3>
59
- </a>
61
+ </ALink>
60
62
  </li>
61
63
  </template>
62
64
 
@@ -5,29 +5,39 @@ import {
5
5
  i19errorMsg,
6
6
  i19notFound,
7
7
  } from '@@i18n';
8
+
9
+ export interface Props {
10
+ statusCode?: number;
11
+ }
12
+
13
+ const { statusCode } = Astro.props;
8
14
  ---
9
15
 
10
16
  <main>
11
- <article class="prose mx-auto px-8 pb-32 pt-20">
17
+ <article class="mx-auto px-8 pb-32 pt-20 prose">
12
18
  <h1>{i19error} :/</h1>
13
- <p class="hidden text-xl" id="errorMsg">
19
+ <p class={`${(!statusCode || statusCode === 404) ? 'hidden ' : ''}text-xl`} id="errorMsg">
14
20
  {i19errorMsg}
15
21
  </p>
16
- <p class="hidden text-xl" id="404Msg">
22
+ <p class={`${statusCode !== 404 ? 'hidden ' : ''}text-xl`} id="404Msg">
17
23
  {i19notFound} (404)
18
24
  </p>
19
- <p class="text-xl" id="loadingMsg">
20
- ... ... ...
21
- </p>
25
+ {!statusCode && <>
26
+ <p class="text-xl" id="loadingMsg">
27
+ ... ... ...
28
+ </p>
29
+ </>}
22
30
  <a href="/" class="text-2xl">
23
- <i class="i-arrow-right mr-1 rotate-180"></i>
31
+ <i class="mr-1 rotate-180 i-arrow-right"></i>
24
32
  {i19home}
25
33
  </a>
26
34
  </article>
27
- <script>
28
- const msgId = window.location.search.includes('status=404')
29
- ? '404Msg' : '5xxMsg';
30
- document.getElementById(msgId)!.style.display = 'block';
31
- document.getElementById('loadingMsg')!.style.display = 'none';
32
- </script>
35
+ {!statusCode && <>
36
+ <script>
37
+ const msgId = window.location.search.includes('status=404')
38
+ ? '404Msg' : '5xxMsg';
39
+ document.getElementById(msgId)!.style.display = 'block';
40
+ document.getElementById('loadingMsg')!.style.display = 'none';
41
+ </script>
42
+ </>}
33
43
  </main>
@@ -0,0 +1,30 @@
1
+ ---
2
+ import { i19notFound } from '@@i18n';
3
+ import { type RouteContext, loadRouteContext } from '@@sf/ssr-context';
4
+ import BaseHead from '@@sf/layouts/BaseHead.astro';
5
+ import Base from '~/layouts/Base.astro';
6
+ import PageHeader from '~/layouts/PageHeader.astro';
7
+ import FallbackMain from '~/main/Fallback.astro';
8
+ import PageFooter from '~/layouts/PageFooter.astro';
9
+
10
+ let routeContext: RouteContext;
11
+ try {
12
+ routeContext = await loadRouteContext(Astro);
13
+ } catch (err: any) {
14
+ return err.astroResponse;
15
+ }
16
+ const { settings } = routeContext;
17
+ ---
18
+
19
+ <!DOCTYPE html>
20
+ <html lang={routeContext?.lang.replace('_', '-')}>
21
+ <Base>
22
+ <Fragment slot="base-head">
23
+ <BaseHead />
24
+ <title>{`${i19notFound} | ${settings.name}`}</title>
25
+ </Fragment>
26
+ <PageHeader />
27
+ <FallbackMain statusCode={404} />
28
+ <PageFooter />
29
+ </Base>
30
+ </html>
@@ -15,8 +15,8 @@
15
15
  },
16
16
  "main": "index.js",
17
17
  "dependencies": {
18
- "@cloudcommerce/events": "^2.7.4",
19
- "@cloudcommerce/firebase": "^2.7.4",
20
- "@cloudcommerce/modules": "^2.7.4"
18
+ "@cloudcommerce/events": "^2.8.7",
19
+ "@cloudcommerce/firebase": "^2.8.7",
20
+ "@cloudcommerce/modules": "^2.8.7"
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.7.4"
29
+ "@cloudcommerce/cli": "^2.8.7"
30
30
  },
31
31
  "devDependencies": {
32
- "@cloudcommerce/eslint": "^2.7.4",
32
+ "@cloudcommerce/eslint": "^2.8.7",
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.7.5",
4
+ "version": "2.8.8",
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>",
@@ -23,20 +23,20 @@
23
23
  "@commitlint/cli": "^19.0.3",
24
24
  "@commitlint/config-conventional": "^19.0.3",
25
25
  "@commitlint/rules": "^19.0.3",
26
- "@types/node": "^18.19.21",
26
+ "@types/node": "^18.19.22",
27
27
  "dotenv": "^16.4.5",
28
28
  "eslint": "^8.57.0",
29
29
  "husky": "^9.0.11",
30
30
  "lint-staged": "^15.2.2",
31
31
  "standard-version": "^9.5.0",
32
32
  "ts-node": "^10.9.2",
33
- "turbo": "^1.12.4",
33
+ "turbo": "^1.12.5",
34
34
  "typescript": "~5.2.2",
35
35
  "uglify-js": "^3.17.4",
36
36
  "vite": "^5.1.5",
37
37
  "vitest": "^1.3.1",
38
38
  "zx": "^7.2.3",
39
- "@cloudcommerce/eslint": "2.7.5"
39
+ "@cloudcommerce/eslint": "2.8.8"
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.7.5",
4
+ "version": "2.8.8",
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.7.5",
4
+ "version": "2.8.8",
5
5
  "description": "E-Com Plus Cloud Commerce app for simple affiliate program",
6
6
  "main": "lib/index.js",
7
7
  "repository": {
@@ -22,7 +22,7 @@
22
22
  "@cloudcommerce/api": "workspace:*",
23
23
  "@cloudcommerce/firebase": "workspace:*",
24
24
  "firebase-admin": "^12.0.0",
25
- "firebase-functions": "^4.7.0"
25
+ "firebase-functions": "^4.8.0"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@cloudcommerce/types": "workspace:*"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-correios",
3
3
  "type": "module",
4
- "version": "2.7.5",
4
+ "version": "2.8.8",
5
5
  "description": "E-Com Plus Cloud Commerce app for Correios shipping calculation",
6
6
  "main": "lib/index.js",
7
7
  "exports": {
@@ -26,10 +26,10 @@
26
26
  "dependencies": {
27
27
  "@cloudcommerce/api": "workspace:*",
28
28
  "@cloudcommerce/firebase": "workspace:*",
29
- "@google-cloud/pubsub": "^4.3.2",
29
+ "@google-cloud/pubsub": "^4.3.3",
30
30
  "axios": "^1.6.7",
31
31
  "firebase-admin": "^12.0.0",
32
- "firebase-functions": "^4.7.0"
32
+ "firebase-functions": "^4.8.0"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@cloudcommerce/test-base": "workspace:*",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-custom-payment",
3
3
  "type": "module",
4
- "version": "2.7.5",
4
+ "version": "2.8.8",
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.7.5",
4
+ "version": "2.8.8",
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.7.5",
4
+ "version": "2.8.8",
5
5
  "description": "E-Com Plus Cloud Commerce app to integrate Datafrete shipping gateway ",
6
6
  "main": "lib/datafrete.js",
7
7
  "exports": {
@@ -28,7 +28,7 @@
28
28
  "@ecomplus/utils": "1.5.0-rc.6",
29
29
  "axios": "^1.6.7",
30
30
  "firebase-admin": "^12.0.0",
31
- "firebase-functions": "^4.7.0"
31
+ "firebase-functions": "^4.8.0"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@cloudcommerce/types": "workspace:*",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-discounts",
3
3
  "type": "module",
4
- "version": "2.7.5",
4
+ "version": "2.8.8",
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.7.5",
4
+ "version": "2.8.8",
5
5
  "description": "E-Com Plus Cloud Commerce default transactional email app",
6
6
  "main": "lib/index.js",
7
7
  "repository": {
@@ -24,7 +24,7 @@
24
24
  "@cloudcommerce/firebase": "workspace:*",
25
25
  "@ecomplus/transactional-mails": "^2.0.2",
26
26
  "firebase-admin": "^12.0.0",
27
- "firebase-functions": "^4.7.0"
27
+ "firebase-functions": "^4.8.0"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@cloudcommerce/types": "workspace:*",