cloudcommerce 0.0.127 → 0.0.128
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 +7 -0
- package/action.yml +7 -7
- 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/emails/package.json +1 -1
- package/packages/apps/frenet/package.json +1 -1
- package/packages/apps/infinitepay/package.json +1 -1
- package/packages/apps/mercadopago/package.json +1 -1
- package/packages/apps/pagarme/package.json +1 -1
- package/packages/apps/pix/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/emails/package.json +1 -1
- package/packages/events/package.json +1 -1
- package/packages/firebase/lib/config.js +9 -4
- package/packages/firebase/lib/config.js.map +1 -1
- package/packages/firebase/package.json +1 -1
- package/packages/firebase/src/config.ts +9 -3
- 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 +1 -1
- package/packages/storefront/package.json +1 -1
- 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
|
+
### [0.0.128](https://github.com/ecomplus/cloud-commerce/compare/v0.0.127...v0.0.128) (2022-12-01)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **config:** Check `SETTINGS_FILEPATH` and add last fallback to _functions/ssr/..._ ([ae6e92a](https://github.com/ecomplus/cloud-commerce/commit/ae6e92a03c9a12ad8d8e7b690592f6e673a71362))
|
|
11
|
+
|
|
5
12
|
### [0.0.127](https://github.com/ecomplus/cloud-commerce/compare/v0.0.126...v0.0.127) (2022-12-01)
|
|
6
13
|
|
|
7
14
|
|
package/action.yml
CHANGED
|
@@ -19,19 +19,19 @@ inputs:
|
|
|
19
19
|
tiny-erp-token:
|
|
20
20
|
description: 'App: Tiny ERP API token'
|
|
21
21
|
mail-sender:
|
|
22
|
-
description:
|
|
22
|
+
description: 'Emails: sender email'
|
|
23
23
|
mail-sender-name:
|
|
24
|
-
description:
|
|
24
|
+
description: 'Emails: sender name (default is store name)'
|
|
25
25
|
mail-reply-to:
|
|
26
|
-
description:
|
|
26
|
+
description: 'Emails: Reply email'
|
|
27
27
|
smpt-host:
|
|
28
|
-
description:
|
|
28
|
+
description: 'Emails: SMTP hostname'
|
|
29
29
|
smpt-port:
|
|
30
|
-
description:
|
|
30
|
+
description: 'Emails: SMTP port number'
|
|
31
31
|
smpt-user:
|
|
32
|
-
description:
|
|
32
|
+
description: 'Emails: SMTP username'
|
|
33
33
|
smpt-pass:
|
|
34
|
-
description:
|
|
34
|
+
description: 'Emails: SMTP password'
|
|
35
35
|
sendgrid-api-key:
|
|
36
36
|
description: 'Emails: SendGrid API key configuration'
|
|
37
37
|
|
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.128",
|
|
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,5 +1,5 @@
|
|
|
1
|
-
import { join as joinPath } from 'path';
|
|
2
|
-
import { readFileSync } from 'fs';
|
|
1
|
+
import { join as joinPath } from 'node:path';
|
|
2
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
3
3
|
import config from '@cloudcommerce/config';
|
|
4
4
|
|
|
5
5
|
const tinyErpEvents = [
|
|
@@ -13,9 +13,14 @@ const emailsEvents = [
|
|
|
13
13
|
'orders-anyStatusSet',
|
|
14
14
|
];
|
|
15
15
|
const {
|
|
16
|
-
DEPLOY_REGION, SSR_DEPLOY_REGION, SSR_DEPLOY_MEMORY, SSR_DEPLOY_TIMEOUT_SECONDS, SSR_DEPLOY_MIN_INSTANCES,
|
|
16
|
+
SETTINGS_FILEPATH, DEPLOY_REGION, SSR_DEPLOY_REGION, SSR_DEPLOY_MEMORY, SSR_DEPLOY_TIMEOUT_SECONDS, SSR_DEPLOY_MIN_INSTANCES,
|
|
17
17
|
} = process.env;
|
|
18
|
-
|
|
18
|
+
let cmsSettingsFile = SETTINGS_FILEPATH && existsSync(SETTINGS_FILEPATH)
|
|
19
|
+
? SETTINGS_FILEPATH
|
|
20
|
+
: joinPath(process.cwd(), 'content/settings.json');
|
|
21
|
+
if (!existsSync(cmsSettingsFile)) {
|
|
22
|
+
cmsSettingsFile = joinPath(process.cwd(), 'functions/ssr/content/settings.json');
|
|
23
|
+
}
|
|
19
24
|
const cmsSettings = JSON.parse(readFileSync(cmsSettingsFile, 'utf-8'));
|
|
20
25
|
const mergeConfig = {
|
|
21
26
|
hello: 'from @cloudcommerce/firebase',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,MAAsB,MAAM,uBAAuB,CAAC;AAE3D,MAAM,aAAa,GAAmB;IACpC,qBAAqB;IACrB,cAAc;IACd,mBAAmB;IACnB,sBAAsB;CACvB,CAAC;AAE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YACP,KAAK,EAAE,MAAM;YACb,MAAM,EAAE,aAAa;SACtB;QACD,WAAW,EAAE;YACX,KAAK,EAAE,MAAM;SACd;QACD,MAAM,EAAE;YACN,KAAK,EAAE,IAAI;YACX,MAAM,EAAE,YAAY;SACrB;QACD,OAAO,EAAE;YACP,KAAK,EAAE,MAAM;SACd;QACD,GAAG,EAAE;YACH,KAAK,EAAE,MAAM;SACd;QACD,WAAW,EAAE;YACX,KAAK,EAAE,MAAM;SACd;KACF;IACD,WAAW;CACZ,CAAC;AACF,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;AAExB,eAAe,MAId,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ApiEventName, CmsSettings } from '@cloudcommerce/types';
|
|
2
|
-
import { join as joinPath } from 'path';
|
|
3
|
-
import { readFileSync } from 'fs';
|
|
2
|
+
import { join as joinPath } from 'node:path';
|
|
3
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
4
4
|
import config, { BaseConfig } from '@cloudcommerce/config';
|
|
5
5
|
|
|
6
6
|
const tinyErpEvents: ApiEventName[] = [
|
|
@@ -16,6 +16,7 @@ const emailsEvents: ApiEventName[] = [
|
|
|
16
16
|
];
|
|
17
17
|
|
|
18
18
|
const {
|
|
19
|
+
SETTINGS_FILEPATH,
|
|
19
20
|
DEPLOY_REGION,
|
|
20
21
|
SSR_DEPLOY_REGION,
|
|
21
22
|
SSR_DEPLOY_MEMORY,
|
|
@@ -23,7 +24,12 @@ const {
|
|
|
23
24
|
SSR_DEPLOY_MIN_INSTANCES,
|
|
24
25
|
} = process.env;
|
|
25
26
|
|
|
26
|
-
|
|
27
|
+
let cmsSettingsFile = SETTINGS_FILEPATH && existsSync(SETTINGS_FILEPATH)
|
|
28
|
+
? SETTINGS_FILEPATH
|
|
29
|
+
: joinPath(process.cwd(), 'content/settings.json');
|
|
30
|
+
if (!existsSync(cmsSettingsFile)) {
|
|
31
|
+
cmsSettingsFile = joinPath(process.cwd(), 'functions/ssr/content/settings.json');
|
|
32
|
+
}
|
|
27
33
|
const cmsSettings: CmsSettings = JSON.parse(readFileSync(cmsSettingsFile, 'utf-8'));
|
|
28
34
|
|
|
29
35
|
const mergeConfig = {
|