cloudcommerce 0.41.2 → 0.41.3
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.
- package/CHANGELOG.md +8 -0
- package/package.json +2 -2
- package/packages/api/package.json +1 -1
- package/packages/apps/affilate-program/package.json +1 -1
- package/packages/apps/correios/package.json +1 -1
- package/packages/apps/custom-payment/package.json +1 -1
- package/packages/apps/custom-shipping/package.json +1 -1
- package/packages/apps/datafrete/package.json +1 -1
- package/packages/apps/discounts/package.json +1 -1
- package/packages/apps/emails/package.json +1 -1
- package/packages/apps/fb-conversions/package.json +1 -1
- package/packages/apps/flash-courier/package.json +1 -1
- package/packages/apps/frenet/package.json +1 -1
- package/packages/apps/galaxpay/package.json +1 -1
- package/packages/apps/google-analytics/package.json +1 -1
- package/packages/apps/jadlog/package.json +1 -1
- package/packages/apps/loyalty-points/package.json +1 -1
- package/packages/apps/mandae/package.json +1 -1
- package/packages/apps/melhor-envio/package.json +1 -1
- package/packages/apps/mercadopago/package.json +1 -1
- package/packages/apps/pagarme/package.json +1 -1
- package/packages/apps/pagarme-v5/package.json +1 -1
- package/packages/apps/paghiper/package.json +1 -1
- package/packages/apps/pix/package.json +1 -1
- package/packages/apps/tiny-erp/package.json +1 -1
- package/packages/apps/webhooks/package.json +1 -1
- package/packages/cli/package.json +1 -1
- package/packages/config/package.json +1 -1
- package/packages/emails/package.json +1 -1
- package/packages/eslint/package.json +1 -1
- package/packages/events/package.json +1 -1
- package/packages/feeds/package.json +1 -1
- package/packages/firebase/package.json +1 -1
- package/packages/i18n/package.json +1 -1
- package/packages/modules/package.json +1 -1
- package/packages/passport/package.json +1 -1
- package/packages/ssr/package.json +3 -3
- package/packages/storefront/package.json +3 -3
- package/packages/storefront/src/lib/layouts/BaseHead.astro +25 -12
- package/packages/test-base/package.json +1 -1
- package/packages/types/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
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.41.3](https://github.com/ecomplus/cloud-commerce/compare/v0.41.2...v0.41.3) (2024-01-04)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **deps:** Fix Vue semver to (latest) ^3.4.5, bump Astro to v4.1.0 (feat) ([1249e6b](https://github.com/ecomplus/cloud-commerce/commit/1249e6ba79afbc55bb6da686cbebd63ab4c9e148))
|
|
11
|
+
* **storefront:** Fix base `<head>` Astro partial to not set meta title and description to all pages ([83213b3](https://github.com/ecomplus/cloud-commerce/commit/83213b3c2c2645cd6b4cf4c472b5dee4a86da37e))
|
|
12
|
+
|
|
5
13
|
### [0.41.2](https://github.com/ecomplus/cloud-commerce/compare/v0.41.1...v0.41.2) (2024-01-04)
|
|
6
14
|
|
|
7
15
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cloudcommerce",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.41.
|
|
4
|
+
"version": "0.41.3",
|
|
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": "^5.0.10",
|
|
31
31
|
"vitest": "^1.1.1",
|
|
32
32
|
"zx": "^7.2.3",
|
|
33
|
-
"@cloudcommerce/eslint": "0.41.
|
|
33
|
+
"@cloudcommerce/eslint": "0.41.3"
|
|
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/ssr",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.41.
|
|
4
|
+
"version": "0.41.3",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce storefront SSR",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"exports": {
|
|
@@ -32,13 +32,13 @@
|
|
|
32
32
|
"@cloudcommerce/i18n": "workspace:*",
|
|
33
33
|
"@ecomplus/utils": "1.5.0-rc.6",
|
|
34
34
|
"@vueuse/core": "10.7.1",
|
|
35
|
-
"astro": "4.0
|
|
35
|
+
"astro": "4.1.0",
|
|
36
36
|
"astro-capo": "^0.0.1",
|
|
37
37
|
"axios": "^1.6.3",
|
|
38
38
|
"firebase-admin": "^11.11.1",
|
|
39
39
|
"firebase-functions": "^4.5.0",
|
|
40
40
|
"mitt": "^3.0.1",
|
|
41
|
-
"vue": "3.4.
|
|
41
|
+
"vue": "^3.4.5"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@cloudcommerce/types": "workspace:*",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/storefront",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.41.
|
|
4
|
+
"version": "0.41.3",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce storefront with Astro",
|
|
6
6
|
"bin": {
|
|
7
7
|
"storefront": "./scripts/build-prod.sh"
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@types/gtag.js": "^0.0.18",
|
|
43
43
|
"@vite-pwa/astro": "^0.2.0",
|
|
44
44
|
"@vueuse/core": "10.7.1",
|
|
45
|
-
"astro": "4.0
|
|
45
|
+
"astro": "4.1.0",
|
|
46
46
|
"astro-capo": "^0.0.1",
|
|
47
47
|
"chroma-js": "^2.4.2",
|
|
48
48
|
"dotenv": "^16.3.1",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"unplugin-auto-import": "^0.17.3",
|
|
58
58
|
"vite": "^5.0.10",
|
|
59
59
|
"vite-plugin-pwa": "^0.17.4",
|
|
60
|
-
"vue": "3.4.
|
|
60
|
+
"vue": "^3.4.5",
|
|
61
61
|
"wade": "0.3.3",
|
|
62
62
|
"yaml": "^2.3.4"
|
|
63
63
|
},
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
import { pwaInfo } from 'virtual:pwa-info';
|
|
3
3
|
import { img as getImg, price as getPrice } from '@ecomplus/utils';
|
|
4
|
+
import { i19searchProducts } from '@@i18n';
|
|
4
5
|
import ViewTransitions from '@@sf/components/ViewTransitions.astro';
|
|
5
6
|
|
|
6
7
|
export interface Props {
|
|
@@ -19,6 +20,8 @@ const getIconUrl = (size: number) => {
|
|
|
19
20
|
|
|
20
21
|
const {
|
|
21
22
|
storeId,
|
|
23
|
+
isHomepage,
|
|
24
|
+
isSearchPage,
|
|
22
25
|
searchPageTerm,
|
|
23
26
|
cmsContent,
|
|
24
27
|
fetchingApiContext,
|
|
@@ -39,22 +42,32 @@ if (fetchingApiContext) {
|
|
|
39
42
|
|
|
40
43
|
const apiDoc = apiContext.doc;
|
|
41
44
|
const state: Record<string, any> = apiDoc || cmsContent || {};
|
|
42
|
-
let title = state.meta_title ||
|
|
45
|
+
let title: string = state.meta_title ||
|
|
43
46
|
state.metaTitle ||
|
|
44
47
|
(state.name && `${state.name} | ${settings.name}`) ||
|
|
45
48
|
(state.title && `${state.title} | ${settings.name}`) ||
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
title = title.replace('$term', searchPageTerm);
|
|
49
|
-
if (!title.includes(searchPageTerm)) {
|
|
50
|
-
title = `${searchPageTerm} | ${title}`;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
const description = state.meta_description ||
|
|
49
|
+
'';
|
|
50
|
+
let description: string = state.meta_description ||
|
|
54
51
|
state.metaDescription ||
|
|
55
52
|
state.short_description ||
|
|
56
53
|
state.description ||
|
|
57
|
-
settings.description
|
|
54
|
+
settings.description ||
|
|
55
|
+
'';
|
|
56
|
+
if (isHomepage) {
|
|
57
|
+
if (!title) title = settings.name;
|
|
58
|
+
if (!description) description = settings.description;
|
|
59
|
+
}
|
|
60
|
+
if (isSearchPage) {
|
|
61
|
+
if (searchPageTerm) {
|
|
62
|
+
if (!title) title = settings.name;
|
|
63
|
+
title = title.replace('$term', searchPageTerm);
|
|
64
|
+
if (!title.includes(searchPageTerm)) {
|
|
65
|
+
title = `${searchPageTerm} | ${title}`;
|
|
66
|
+
}
|
|
67
|
+
} else if (!title) {
|
|
68
|
+
title = `${i19searchProducts} | ${settings.name}`;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
58
71
|
const favicon = settings.icon ? getIconUrl(32) : '/favicon.ico';
|
|
59
72
|
const shortcutIcon = settings.icon ? getIconUrl(192) : null;
|
|
60
73
|
const canonicalUrl = new URL(Astro.url.pathname, Astro.site || `https://${domain}`);
|
|
@@ -157,8 +170,8 @@ const inlineJSONLd = JSON.stringify({
|
|
|
157
170
|
<link rel="icon" type="image/png" href={favicon} sizes="32x32" />
|
|
158
171
|
{shortcutIcon &&
|
|
159
172
|
<link rel="icon" type="image/png" href={shortcutIcon} sizes="192x192" />}
|
|
160
|
-
<title>{title}</title>
|
|
161
|
-
<meta name="description" content={description}>
|
|
173
|
+
{title && <title>{title}</title>}
|
|
174
|
+
{description && <meta name="description" content={description}>}
|
|
162
175
|
<meta name="author" content={settings.name}>
|
|
163
176
|
<meta name="generator" content={Astro.generator} />
|
|
164
177
|
<link rel="canonical" href={canonicalUrl} />
|