cloudcommerce 0.0.94 → 0.0.96
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 +15 -0
- package/package.json +1 -1
- package/packages/api/package.json +1 -1
- package/packages/apps/correios/package.json +1 -1
- package/packages/apps/custom-shipping/package.json +1 -1
- package/packages/apps/discounts/package.json +1 -1
- package/packages/apps/frenet/package.json +1 -1
- package/packages/apps/tiny-erp/package.json +1 -1
- package/packages/cli/package.json +1 -1
- package/packages/config/package.json +1 -1
- package/packages/events/package.json +1 -1
- package/packages/firebase/package.json +1 -1
- package/packages/modules/package.json +1 -1
- package/packages/passport/package.json +1 -1
- package/packages/ssr/lib/firebase.js +1 -1
- package/packages/ssr/lib/firebase.js.map +1 -1
- package/packages/ssr/package.json +1 -1
- package/packages/ssr/src/firebase.ts +1 -1
- package/packages/storefront/dist/server/entry.mjs +6 -6
- package/packages/storefront/example.env +1 -1
- package/packages/storefront/package.json +1 -1
- package/packages/storefront/src/lib/helpers/image.ts +3 -1
- package/packages/storefront/storefront.config.mjs +5 -6
- package/packages/types/package.json +1 -1
- package/store.renovate.json +55 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,21 @@
|
|
|
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.0.96](https://github.com/ecomplus/cloud-commerce/compare/v0.0.95...v0.0.96) (2022-09-24)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **storefront:** Image size input with full image path using `STOREFRONT_BASE_DIR` ([59bb3f6](https://github.com/ecomplus/cloud-commerce/commit/59bb3f67fb074536fa280326ae8c268187b065f7))
|
|
11
|
+
* **storefront:** Must always set `process.env.STOREFRONT_BASE_DIR` instead of `import.meta.env` ([d4b0812](https://github.com/ecomplus/cloud-commerce/commit/d4b0812e4119119c4ac6489bbee7116b4927ac74))
|
|
12
|
+
|
|
13
|
+
### [0.0.95](https://github.com/ecomplus/cloud-commerce/compare/v0.0.94...v0.0.95) (2022-09-24)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
* **storefront:** Prevent error with undefined `import.meta.env` on config ([19ffb5b](https://github.com/ecomplus/cloud-commerce/commit/19ffb5bcc859d972d17ba45e4d0ad739333d38ad))
|
|
19
|
+
|
|
5
20
|
### [0.0.94](https://github.com/ecomplus/cloud-commerce/compare/v0.0.93...v0.0.94) (2022-09-24)
|
|
6
21
|
|
|
7
22
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cloudcommerce",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.96",
|
|
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>",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"firebase.js","sourceRoot":"","sources":["../src/firebase.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,OAAO,mCAAmC,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,aAAa,EAAE,CAAC;AAEhB,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,MAAM,MAAM,oCAAoC,CAAC;AACxD,OAAO,eAAe,MAAM,6BAA6B,CAAC;AAE1D,MAAM,EAAE,oBAAoB,EAAE,GAAG,MAAM,CAAC,GAAG,EAAE,CAAC;AAE9C,MAAM,CAAC,MAAM,GAAG,GAAG,SAAS,CAAC;IAC3B,cAAc,EAAE,EAAE;IAClB,MAAM,EAAE,QAAQ;IAChB,
|
|
1
|
+
{"version":3,"file":"firebase.js","sourceRoot":"","sources":["../src/firebase.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,OAAO,mCAAmC,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,aAAa,EAAE,CAAC;AAEhB,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,MAAM,MAAM,oCAAoC,CAAC;AACxD,OAAO,eAAe,MAAM,6BAA6B,CAAC;AAE1D,MAAM,EAAE,oBAAoB,EAAE,GAAG,MAAM,CAAC,GAAG,EAAE,CAAC;AAE9C,MAAM,CAAC,MAAM,GAAG,GAAG,SAAS,CAAC;IAC3B,cAAc,EAAE,EAAE;IAClB,MAAM,EAAE,QAAQ;IAChB,YAAY,EAAE,CAAC;IACf,GAAG,oBAAoB;CACxB,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;IACd,eAAe,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;AAC5B,CAAC,CAAC,CAAC"}
|
|
@@ -2,8 +2,7 @@ import * as adapter from '@astrojs/node/server.js';
|
|
|
2
2
|
import { defineComponent, h, createSSRApp, mergeProps, createVNode as createVNode$1, resolveDynamicComponent, withCtx, createTextVNode, toDisplayString, useSSRContext } from 'vue';
|
|
3
3
|
import { renderToString as renderToString$1, ssrRenderAttrs, ssrRenderSlot, ssrRenderVNode, ssrInterpolate, ssrRenderClass, ssrRenderList, ssrRenderAttr } from 'vue/server-renderer';
|
|
4
4
|
import { escape } from 'html-escaper';
|
|
5
|
-
/* empty css */import
|
|
6
|
-
import fs from 'fs';
|
|
5
|
+
/* empty css */import fs from 'fs';
|
|
7
6
|
import { resolve } from 'path';
|
|
8
7
|
import Deepmerge from '@fastify/deepmerge';
|
|
9
8
|
import * as $$module1$5 from '@ecomplus/utils';
|
|
@@ -1648,15 +1647,15 @@ const _getConfig = () => {
|
|
|
1648
1647
|
const {
|
|
1649
1648
|
STOREFRONT_BASE_DIR,
|
|
1650
1649
|
VITE_ECOM_STORE_ID,
|
|
1651
|
-
} = (Object.assign({"BASE_URL":"/","MODE":"production","DEV":false,"PROD":true},{
|
|
1650
|
+
} = (Object.assign({"BASE_URL":"/","MODE":"production","DEV":false,"PROD":true},{ECOM_STORE_ID:process.env.ECOM_STORE_ID,STOREFRONT_BASE_DIR:process.env.STOREFRONT_BASE_DIR,})) || process.env;
|
|
1652
1651
|
|
|
1653
1652
|
let baseDir;
|
|
1654
1653
|
if (STOREFRONT_BASE_DIR) {
|
|
1655
|
-
|
|
1656
|
-
baseDir = resolve(currentDir, STOREFRONT_BASE_DIR);
|
|
1654
|
+
baseDir = resolve(process.cwd(), STOREFRONT_BASE_DIR);
|
|
1657
1655
|
} else {
|
|
1658
1656
|
baseDir = process.cwd();
|
|
1659
1657
|
}
|
|
1658
|
+
process.env.STOREFRONT_BASE_DIR = baseDir;
|
|
1660
1659
|
const dirContent = resolve(baseDir, 'content');
|
|
1661
1660
|
if (VITE_ECOM_STORE_ID) {
|
|
1662
1661
|
config.set({ storeId: Number(VITE_ECOM_STORE_ID) });
|
|
@@ -2097,8 +2096,9 @@ const $$module1$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.definePropert
|
|
|
2097
2096
|
const tryImageSize = (src) => {
|
|
2098
2097
|
let dimensions = {};
|
|
2099
2098
|
if (typeof src === "string" && src.startsWith("/")) {
|
|
2099
|
+
const { STOREFRONT_BASE_DIR } = Object.assign({"BASE_URL":"/","MODE":"production","DEV":false,"PROD":true}, { STOREFRONT_BASE_DIR: process.env.STOREFRONT_BASE_DIR });
|
|
2100
2100
|
try {
|
|
2101
|
-
dimensions = imageSize(`public${src}`);
|
|
2101
|
+
dimensions = imageSize(resolve(STOREFRONT_BASE_DIR, `public${src}`));
|
|
2102
2102
|
} catch (e) {
|
|
2103
2103
|
dimensions = {};
|
|
2104
2104
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
STOREFRONT_BASE_DIR
|
|
1
|
+
STOREFRONT_BASE_DIR=.
|
|
2
2
|
ECOM_STORE_ID=1011
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
import { resolve as resolvePath } from 'path';
|
|
1
2
|
import imageSize from 'image-size';
|
|
2
3
|
|
|
3
4
|
const tryImageSize = (src: string) => {
|
|
4
5
|
let dimensions: { width?: number, height?: number } = {};
|
|
5
6
|
if (typeof src === 'string' && src.startsWith('/')) {
|
|
7
|
+
const { STOREFRONT_BASE_DIR } = import.meta.env;
|
|
6
8
|
try {
|
|
7
|
-
dimensions = imageSize(`public${src}`);
|
|
9
|
+
dimensions = imageSize(resolvePath(STOREFRONT_BASE_DIR, `public${src}`));
|
|
8
10
|
} catch (e) {
|
|
9
11
|
dimensions = {};
|
|
10
12
|
}
|
|
@@ -2,13 +2,11 @@ import fs from 'fs';
|
|
|
2
2
|
import { resolve as resolvePath } from 'path';
|
|
3
3
|
import config from '@cloudcommerce/config';
|
|
4
4
|
|
|
5
|
-
const getEnvVar = (name) => {
|
|
6
|
-
return import.meta.env[name] || process.env[name];
|
|
7
|
-
};
|
|
8
|
-
|
|
9
5
|
export default () => {
|
|
10
|
-
const
|
|
11
|
-
|
|
6
|
+
const {
|
|
7
|
+
STOREFRONT_BASE_DIR,
|
|
8
|
+
VITE_ECOM_STORE_ID,
|
|
9
|
+
} = import.meta.env || process.env;
|
|
12
10
|
|
|
13
11
|
let baseDir;
|
|
14
12
|
if (STOREFRONT_BASE_DIR) {
|
|
@@ -16,6 +14,7 @@ export default () => {
|
|
|
16
14
|
} else {
|
|
17
15
|
baseDir = process.cwd();
|
|
18
16
|
}
|
|
17
|
+
process.env.STOREFRONT_BASE_DIR = baseDir;
|
|
19
18
|
const dirContent = resolvePath(baseDir, 'content');
|
|
20
19
|
if (VITE_ECOM_STORE_ID) {
|
|
21
20
|
config.set({ storeId: Number(VITE_ECOM_STORE_ID) });
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": [
|
|
3
|
+
"config:base"
|
|
4
|
+
],
|
|
5
|
+
"schedule": [
|
|
6
|
+
"after 6am and before 10am on monday"
|
|
7
|
+
],
|
|
8
|
+
"labels": [
|
|
9
|
+
"dependencies"
|
|
10
|
+
],
|
|
11
|
+
"rangeStrategy": "bump",
|
|
12
|
+
"packageRules": [
|
|
13
|
+
{
|
|
14
|
+
"excludePackagePrefixes": [
|
|
15
|
+
"@ecomplus",
|
|
16
|
+
"@cloudcommerce"
|
|
17
|
+
],
|
|
18
|
+
"matchUpdateTypes": [
|
|
19
|
+
"minor",
|
|
20
|
+
"patch",
|
|
21
|
+
"lockFileMaintenance"
|
|
22
|
+
],
|
|
23
|
+
"groupName": "Many non-major"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"matchPackagePrefixes": [
|
|
27
|
+
"@cloudcommerce"
|
|
28
|
+
],
|
|
29
|
+
"matchUpdateTypes": [
|
|
30
|
+
"minor",
|
|
31
|
+
"patch"
|
|
32
|
+
],
|
|
33
|
+
"schedule": [
|
|
34
|
+
"after 11am and before 4pm every weekday"
|
|
35
|
+
],
|
|
36
|
+
"semanticCommitType": "fix",
|
|
37
|
+
"automerge": true,
|
|
38
|
+
"groupName": "Cloud Commerce bump non-major"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"matchPackagePrefixes": [
|
|
42
|
+
"@ecomplus"
|
|
43
|
+
],
|
|
44
|
+
"matchUpdateTypes": [
|
|
45
|
+
"minor",
|
|
46
|
+
"patch"
|
|
47
|
+
],
|
|
48
|
+
"schedule": [
|
|
49
|
+
"after 11am and before 4pm every weekday"
|
|
50
|
+
],
|
|
51
|
+
"semanticCommitType": "fix",
|
|
52
|
+
"groupName": "@ecomplus non-major"
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
}
|