cloudcommerce 0.0.44 → 0.0.45
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 +10 -0
- package/action.yml +8 -6
- package/package.json +1 -1
- package/packages/api/package.json +1 -1
- package/packages/apps/discounts/package.json +1 -1
- package/packages/cli/package.json +1 -1
- package/packages/events/package.json +1 -1
- package/packages/events/src/firebase.ts +2 -1
- package/packages/firebase/lib/index.d.ts +1 -1
- package/packages/firebase/lib/index.js +2 -1
- package/packages/firebase/lib/index.js.map +1 -1
- package/packages/firebase/package.json +1 -1
- package/packages/firebase/src/index.ts +2 -1
- package/packages/modules/lib/firebase.js +2 -1
- package/packages/modules/lib/firebase.js.map +1 -1
- package/packages/modules/package.json +1 -1
- package/packages/modules/src/firebase.ts +2 -1
- package/packages/passport/lib/firebase.js +2 -1
- package/packages/passport/lib/firebase.js.map +1 -1
- package/packages/passport/package.json +1 -1
- package/packages/passport/src/firebase.ts +2 -1
- package/packages/ssr/package.json +1 -1
- package/packages/storefront/package.json +1 -1
- package/packages/types/package.json +1 -1
- package/pnpm-lock.yaml +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
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.45](https://github.com/ecomplus/cloud-commerce/compare/v0.0.44...v0.0.45) (2022-08-05)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* GH Action must install dependencies of each functions codebase ([0e1212a](https://github.com/ecomplus/cloud-commerce/commit/0e1212a61c455de0e1b698e9086c1df2a6c24fd7))
|
|
11
|
+
* GH Action must install dependencies of each functions codebase ([7379f0e](https://github.com/ecomplus/cloud-commerce/commit/7379f0e01e9ce94a666735e12dd38a29f090d238))
|
|
12
|
+
* GH Action must install optional dependencies for functions deploy ([59b281e](https://github.com/ecomplus/cloud-commerce/commit/59b281e74346dbe360c2810eb9749304214df17c))
|
|
13
|
+
* Set Firebase Functions names with snake case ([2ec6a31](https://github.com/ecomplus/cloud-commerce/commit/2ec6a31a42cd7692f5b004d65dff6d2e0b3bad30))
|
|
14
|
+
|
|
5
15
|
### [0.0.44](https://github.com/ecomplus/cloud-commerce/compare/v0.0.43...v0.0.44) (2022-08-05)
|
|
6
16
|
|
|
7
17
|
|
package/action.yml
CHANGED
|
@@ -29,17 +29,19 @@ runs:
|
|
|
29
29
|
|
|
30
30
|
- if: github.event_name == 'push'
|
|
31
31
|
shell: bash
|
|
32
|
-
run: npm i --location=global firebase-tools
|
|
32
|
+
run: npm i --location=global firebase-tools@11
|
|
33
33
|
|
|
34
34
|
- shell: bash
|
|
35
|
-
run: npm ci --
|
|
35
|
+
run: npm ci --omit=dev
|
|
36
36
|
|
|
37
37
|
- shell: bash
|
|
38
38
|
working-directory: functions
|
|
39
|
-
run:
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
run: |
|
|
40
|
+
for d in */ ; do
|
|
41
|
+
cd $d
|
|
42
|
+
npm ci --omit=dev
|
|
43
|
+
cd ..
|
|
44
|
+
done
|
|
43
45
|
|
|
44
46
|
- if: github.event_name == 'push'
|
|
45
47
|
name: Deploy to Firebase live
|
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.45",
|
|
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>",
|
|
@@ -12,7 +12,8 @@ initializeApp();
|
|
|
12
12
|
const eventMaxAgeMs = 60000;
|
|
13
13
|
const newOrderTopic: AppEventsTopic = 'orders-new';
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
// eslint-disable-next-line camelcase
|
|
16
|
+
export const on_new_order = runWith({ failurePolicy: true })
|
|
16
17
|
.pubsub.topic(newOrderTopic).onPublish((message, context) => {
|
|
17
18
|
const eventAgeMs = Date.now() - Date.parse(context.timestamp);
|
|
18
19
|
if (eventAgeMs > eventMaxAgeMs) {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import 'source-map-support/register.js';
|
|
2
2
|
import '@cloudcommerce/api/fetch-polyfill.js';
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const cron_store_events: import("firebase-functions/v1").CloudFunction<unknown>;
|
|
@@ -9,7 +9,8 @@ import checkStoreEvents from './handlers/check-store-events.js';
|
|
|
9
9
|
|
|
10
10
|
initializeApp();
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
// eslint-disable-next-line camelcase
|
|
13
|
+
export const cron_store_events = pubsub.schedule('* * * * *').onRun(() => {
|
|
13
14
|
return checkStoreEvents();
|
|
14
15
|
});
|
|
15
16
|
// # sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,iDAAiD;AAEjD,OAAO,gCAAgC,CAAC;AACxC,OAAO,sCAAsC,CAAC;AAC9C,gEAAgE;AAChE,gDAAgD;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,gBAAgB,MAAM,+BAA+B,CAAC;AAE7D,aAAa,EAAE,CAAC;AAEhB,MAAM,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,iDAAiD;AAEjD,OAAO,gCAAgC,CAAC;AACxC,OAAO,sCAAsC,CAAC;AAC9C,gEAAgE;AAChE,gDAAgD;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,gBAAgB,MAAM,+BAA+B,CAAC;AAE7D,aAAa,EAAE,CAAC;AAEhB,qCAAqC;AACrC,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE;IACvE,OAAO,gBAAgB,EAAE,CAAC;AAC5B,CAAC,CAAC,CAAC"}
|
|
@@ -10,6 +10,7 @@ import checkStoreEvents from './handlers/check-store-events';
|
|
|
10
10
|
|
|
11
11
|
initializeApp();
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
// eslint-disable-next-line camelcase
|
|
14
|
+
export const cron_store_events = pubsub.schedule('* * * * *').onRun(() => {
|
|
14
15
|
return checkStoreEvents();
|
|
15
16
|
});
|
|
@@ -11,7 +11,8 @@ import serveModulesApi from './firebase/serve-modules-api.js';
|
|
|
11
11
|
initializeApp();
|
|
12
12
|
const { httpsFunctionOptions } = config.get();
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
// eslint-disable-next-line camelcase
|
|
15
|
+
export const modules_api = onRequest(httpsFunctionOptions, (req, res) => {
|
|
15
16
|
const { authenticationId, apiKey } = getEnv();
|
|
16
17
|
// Hide API key for security
|
|
17
18
|
process.env.ECOM_API_KEY = '***';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"firebase.js","sourceRoot":"","sources":["../src/firebase.ts"],"names":[],"mappings":"AAAA,iDAAiD;AAEjD,OAAO,gCAAgC,CAAC;AACxC,gDAAgD;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,gDAAgD;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,MAAM,MAAM,oCAAoC,CAAC;AACxD,OAAO,MAAM,MAAM,iCAAiC,CAAC;AACrD,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAE3D,aAAa,EAAE,CAAC;AAChB,MAAM,EAAE,oBAAoB,EAAE,GAAG,MAAM,CAAC,GAAG,EAAE,CAAC;AAE9C,MAAM,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"firebase.js","sourceRoot":"","sources":["../src/firebase.ts"],"names":[],"mappings":"AAAA,iDAAiD;AAEjD,OAAO,gCAAgC,CAAC;AACxC,gDAAgD;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,gDAAgD;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,MAAM,MAAM,oCAAoC,CAAC;AACxD,OAAO,MAAM,MAAM,iCAAiC,CAAC;AACrD,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAE3D,aAAa,EAAE,CAAC;AAChB,MAAM,EAAE,oBAAoB,EAAE,GAAG,MAAM,CAAC,GAAG,EAAE,CAAC;AAE9C,qCAAqC;AACrC,MAAM,CAAC,MAAM,WAAW,GAAG,SAAS,CAAC,oBAAoB,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;IACtE,MAAM,EAAE,gBAAgB,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC;IAC9C,4BAA4B;IAC5B,OAAO,CAAC,GAAG,CAAC,YAAY,GAAG,KAAK,CAAC;IACjC,eAAe,CAAC,GAAG,EAAE,GAAG,EAAE;QACxB,gBAAgB;QAChB,MAAM;KACP,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -12,7 +12,8 @@ import serveModulesApi from './firebase/serve-modules-api';
|
|
|
12
12
|
initializeApp();
|
|
13
13
|
const { httpsFunctionOptions } = config.get();
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
// eslint-disable-next-line camelcase
|
|
16
|
+
export const modules_api = onRequest(httpsFunctionOptions, (req, res) => {
|
|
16
17
|
const { authenticationId, apiKey } = getEnv();
|
|
17
18
|
// Hide API key for security
|
|
18
19
|
process.env.ECOM_API_KEY = '***';
|
|
@@ -9,7 +9,8 @@ import config from '@cloudcommerce/firebase/lib/config';
|
|
|
9
9
|
initializeApp();
|
|
10
10
|
const options = config.get().httpsFunctionOptions;
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
// eslint-disable-next-line camelcase
|
|
13
|
+
export const passport_api = onRequest(options, (request, response) => {
|
|
13
14
|
process.env.ECOM_API_KEY = '***';
|
|
14
15
|
response.send('Hello passport!');
|
|
15
16
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"firebase.js","sourceRoot":"","sources":["../src/firebase.ts"],"names":[],"mappings":"AAAA,iDAAiD;AAEjD,OAAO,gCAAgC,CAAC;AACxC,gDAAgD;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,gDAAgD;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,MAAM,MAAM,oCAAoC,CAAC;AAExD,aAAa,EAAE,CAAC;AAChB,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,EAAE,CAAC,oBAAoB,CAAC;AAElD,MAAM,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"firebase.js","sourceRoot":"","sources":["../src/firebase.ts"],"names":[],"mappings":"AAAA,iDAAiD;AAEjD,OAAO,gCAAgC,CAAC;AACxC,gDAAgD;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,gDAAgD;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,MAAM,MAAM,oCAAoC,CAAC;AAExD,aAAa,EAAE,CAAC;AAChB,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,EAAE,CAAC,oBAAoB,CAAC;AAElD,qCAAqC;AACrC,MAAM,CAAC,MAAM,YAAY,GAAG,SAAS,CAAC,OAAO,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,EAAE;IACnE,OAAO,CAAC,GAAG,CAAC,YAAY,GAAG,KAAK,CAAC;IACjC,QAAQ,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;AACnC,CAAC,CAAC,CAAC"}
|
|
@@ -10,7 +10,8 @@ import config from '@cloudcommerce/firebase/lib/config';
|
|
|
10
10
|
initializeApp();
|
|
11
11
|
const options = config.get().httpsFunctionOptions;
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
// eslint-disable-next-line camelcase
|
|
14
|
+
export const passport_api = onRequest(options, (request, response) => {
|
|
14
15
|
process.env.ECOM_API_KEY = '***';
|
|
15
16
|
response.send('Hello passport!');
|
|
16
17
|
});
|
package/pnpm-lock.yaml
CHANGED
|
@@ -78,7 +78,7 @@ importers:
|
|
|
78
78
|
packages/events:
|
|
79
79
|
specifiers:
|
|
80
80
|
'@cloudcommerce/api': workspace:*
|
|
81
|
-
'@cloudcommerce/firebase': workspace
|
|
81
|
+
'@cloudcommerce/firebase': workspace:*
|
|
82
82
|
'@cloudcommerce/types': workspace:*
|
|
83
83
|
'@firebase/app-types': ^0.7.0
|
|
84
84
|
firebase-admin: ^11.0.1
|
|
@@ -118,7 +118,7 @@ importers:
|
|
|
118
118
|
packages/modules:
|
|
119
119
|
specifiers:
|
|
120
120
|
'@cloudcommerce/api': workspace:*
|
|
121
|
-
'@cloudcommerce/app-discounts': workspace
|
|
121
|
+
'@cloudcommerce/app-discounts': workspace:*
|
|
122
122
|
'@cloudcommerce/firebase': workspace:*
|
|
123
123
|
'@cloudcommerce/types': workspace:*
|
|
124
124
|
'@firebase/app-types': ^0.7.0
|
|
@@ -198,36 +198,36 @@ importers:
|
|
|
198
198
|
|
|
199
199
|
store:
|
|
200
200
|
specifiers:
|
|
201
|
-
'@cloudcommerce/cli': ^0.0.
|
|
201
|
+
'@cloudcommerce/cli': ^0.0.44
|
|
202
202
|
dependencies:
|
|
203
203
|
'@cloudcommerce/cli': link:../packages/cli
|
|
204
204
|
|
|
205
205
|
store/functions/core:
|
|
206
206
|
specifiers:
|
|
207
|
-
'@cloudcommerce/firebase': ^0.0.
|
|
207
|
+
'@cloudcommerce/firebase': ^0.0.44
|
|
208
208
|
dependencies:
|
|
209
209
|
'@cloudcommerce/firebase': link:../../../packages/firebase
|
|
210
210
|
|
|
211
211
|
store/functions/modules:
|
|
212
212
|
specifiers:
|
|
213
|
-
'@cloudcommerce/firebase': ^0.0.
|
|
214
|
-
'@cloudcommerce/modules': ^0.0.
|
|
213
|
+
'@cloudcommerce/firebase': ^0.0.44
|
|
214
|
+
'@cloudcommerce/modules': ^0.0.44
|
|
215
215
|
dependencies:
|
|
216
216
|
'@cloudcommerce/firebase': link:../../../packages/firebase
|
|
217
217
|
'@cloudcommerce/modules': link:../../../packages/modules
|
|
218
218
|
|
|
219
219
|
store/functions/passport:
|
|
220
220
|
specifiers:
|
|
221
|
-
'@cloudcommerce/firebase': ^0.0.
|
|
222
|
-
'@cloudcommerce/passport': ^0.0.
|
|
221
|
+
'@cloudcommerce/firebase': ^0.0.44
|
|
222
|
+
'@cloudcommerce/passport': ^0.0.44
|
|
223
223
|
dependencies:
|
|
224
224
|
'@cloudcommerce/firebase': link:../../../packages/firebase
|
|
225
225
|
'@cloudcommerce/passport': link:../../../packages/passport
|
|
226
226
|
|
|
227
227
|
store/functions/ssr:
|
|
228
228
|
specifiers:
|
|
229
|
-
'@cloudcommerce/firebase': ^0.0.
|
|
230
|
-
'@cloudcommerce/ssr': ^0.0.
|
|
229
|
+
'@cloudcommerce/firebase': ^0.0.44
|
|
230
|
+
'@cloudcommerce/ssr': ^0.0.44
|
|
231
231
|
dependencies:
|
|
232
232
|
'@cloudcommerce/firebase': link:../../../packages/firebase
|
|
233
233
|
'@cloudcommerce/ssr': link:../../../packages/ssr
|