cloudcommerce 0.0.118 → 0.0.120
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/ecomplus-stores/monocard/functions/core/package.json +1 -1
- package/ecomplus-stores/monocard/functions/events/package.json +2 -2
- package/ecomplus-stores/monocard/functions/modules/package.json +2 -2
- package/ecomplus-stores/monocard/functions/passport/package.json +2 -2
- package/ecomplus-stores/monocard/functions/ssr/package.json +5 -6
- package/ecomplus-stores/monocard/functions/ssr/src/components/DemoVideo.vue +1 -1
- package/ecomplus-stores/monocard/functions/ssr/src/components/MonocardCustomizer.vue +2 -1
- package/ecomplus-stores/monocard/functions/ssr/src/pages/fallback.astro +1 -1
- package/ecomplus-stores/monocard/package.json +1 -1
- package/package.json +1 -1
- package/packages/api/package.json +1 -1
- package/packages/apps/correios/package.json +2 -2
- package/packages/apps/custom-shipping/package.json +1 -1
- package/packages/apps/discounts/package.json +1 -1
- package/packages/apps/frenet/package.json +2 -2
- package/packages/apps/mercadopago/package.json +2 -2
- package/packages/apps/tiny-erp/package.json +2 -2
- package/packages/cli/package.json +1 -1
- package/packages/config/package.json +1 -1
- package/packages/events/lib/firebase.js +7 -0
- package/packages/events/lib/firebase.js.map +1 -0
- package/packages/events/lib/index.js +2 -0
- package/packages/events/lib/index.js.map +1 -0
- package/packages/events/package.json +1 -1
- package/packages/firebase/package.json +1 -1
- package/packages/i18n/package.json +1 -1
- package/packages/modules/lib/firebase/ajv.js +34 -0
- package/packages/modules/lib/firebase/ajv.js.map +1 -0
- package/packages/modules/lib/firebase/call-app-module.js +149 -0
- package/packages/modules/lib/firebase/call-app-module.js.map +1 -0
- package/packages/modules/lib/firebase/checkout.js +157 -0
- package/packages/modules/lib/firebase/checkout.js.map +1 -0
- package/packages/modules/lib/firebase/functions-checkout/fix-items.js +200 -0
- package/packages/modules/lib/firebase/functions-checkout/fix-items.js.map +1 -0
- package/packages/modules/lib/firebase/functions-checkout/get-custumerId.js +39 -0
- package/packages/modules/lib/firebase/functions-checkout/get-custumerId.js.map +1 -0
- package/packages/modules/lib/firebase/functions-checkout/handle-order-transaction.js +122 -0
- package/packages/modules/lib/firebase/functions-checkout/handle-order-transaction.js.map +1 -0
- package/packages/modules/lib/firebase/functions-checkout/new-order.js +191 -0
- package/packages/modules/lib/firebase/functions-checkout/new-order.js.map +1 -0
- package/packages/modules/lib/firebase/functions-checkout/request-to-module.js +60 -0
- package/packages/modules/lib/firebase/functions-checkout/request-to-module.js.map +1 -0
- package/packages/modules/lib/firebase/functions-checkout/utils.js +227 -0
- package/packages/modules/lib/firebase/functions-checkout/utils.js.map +1 -0
- package/packages/modules/lib/firebase/handle-module.js +169 -0
- package/packages/modules/lib/firebase/handle-module.js.map +1 -0
- package/packages/modules/lib/firebase/proxy-apps.js +1 -0
- package/packages/modules/lib/firebase/proxy-apps.js.map +1 -0
- package/packages/modules/lib/firebase/serve-modules-api.js +64 -0
- package/packages/modules/lib/firebase/serve-modules-api.js.map +1 -0
- package/packages/modules/lib/firebase.js +16 -0
- package/packages/modules/lib/firebase.js.map +1 -0
- package/packages/modules/lib/index.js +27 -0
- package/packages/modules/lib/index.js.map +1 -0
- package/packages/modules/package.json +2 -2
- package/packages/passport/package.json +1 -1
- package/packages/ssr/package.json +3 -2
- package/packages/storefront/dist/server/entry.mjs +10 -7
- package/packages/storefront/package.json +2 -2
- package/packages/types/package.json +1 -1
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.120](https://github.com/ecomplus/cloud-commerce/compare/v0.0.119...v0.0.120) (2022-10-16)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **deps:** Update `@astrojs/image` and all non-major ([45be751](https://github.com/ecomplus/cloud-commerce/commit/45be751329030c7cace01571e111523f41af17d6))
|
|
11
|
+
* **ssr:** Add `@cloudcommerce/i18n` to pkg dependencies ([d3bf23d](https://github.com/ecomplus/cloud-commerce/commit/d3bf23da42c10ef7561fdcb3802ef2d50f7f1959))
|
|
12
|
+
|
|
13
|
+
### [0.0.119](https://github.com/ecomplus/cloud-commerce/compare/v0.0.118...v0.0.119) (2022-10-15)
|
|
14
|
+
|
|
5
15
|
### [0.0.118](https://github.com/ecomplus/cloud-commerce/compare/v0.0.117...v0.0.118) (2022-10-15)
|
|
6
16
|
|
|
7
17
|
### [0.0.117](https://github.com/ecomplus/cloud-commerce/compare/v0.0.116...v0.0.117) (2022-10-15)
|
|
@@ -17,14 +17,13 @@
|
|
|
17
17
|
},
|
|
18
18
|
"main": "index.js",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@
|
|
21
|
-
"@cloudcommerce/
|
|
22
|
-
"@cloudcommerce/
|
|
20
|
+
"@astrojs/image": "^0.10.0",
|
|
21
|
+
"@cloudcommerce/api": "^0.0.119",
|
|
22
|
+
"@cloudcommerce/firebase": "^0.0.119",
|
|
23
|
+
"@cloudcommerce/ssr": "^0.0.119"
|
|
23
24
|
},
|
|
24
25
|
"devDependencies": {
|
|
25
|
-
"@
|
|
26
|
-
"@cloudcommerce/i18n": "^0.0.116",
|
|
27
|
-
"@cloudcommerce/storefront": "^0.0.116",
|
|
26
|
+
"@cloudcommerce/storefront": "^0.0.119",
|
|
28
27
|
"@iconify-json/arcticons": "^1.1.28",
|
|
29
28
|
"@iconify-json/wpf": "^1.1.2",
|
|
30
29
|
"lottie-web": "^5.9.6",
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
import type { Products } from '@cloudcommerce/api/types';
|
|
3
3
|
import { ref, computed, watch } from 'vue';
|
|
4
|
-
import
|
|
4
|
+
import ecomUtils from '@ecomplus/utils';
|
|
5
5
|
|
|
6
6
|
export interface Props {
|
|
7
7
|
monocard: Partial<Products>;
|
|
8
8
|
monocardWithLogo?: Partial<Products>;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
+
const { price: getPrice, formatMoney } = ecomUtils;
|
|
11
12
|
// eslint-disable-next-line vue/no-setup-props-destructure
|
|
12
13
|
const {
|
|
13
14
|
monocard,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
import loadPageContext, { PageContext } from '@cloudcommerce/storefront/src/lib/ssr-context';
|
|
3
|
-
import FallbackMain from '
|
|
3
|
+
import FallbackMain from '~/main/Fallback.astro';
|
|
4
4
|
import PagesLayout from '../layouts/Pages.astro';
|
|
5
5
|
|
|
6
6
|
let pageContext: PageContext;
|
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.120",
|
|
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,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/app-correios",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.120",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce app for Correios shipping calculation",
|
|
6
6
|
"main": "lib/correios.js",
|
|
7
7
|
"repository": {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@cloudcommerce/api": "workspace:*",
|
|
23
|
-
"axios": "^1.1.
|
|
23
|
+
"axios": "^1.1.3",
|
|
24
24
|
"xml2js": "^0.4.23"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/app-frenet",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.120",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce app for Frenet shipping calculation",
|
|
6
6
|
"main": "lib/frenet.js",
|
|
7
7
|
"repository": {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@cloudcommerce/api": "workspace:*",
|
|
23
|
-
"axios": "^1.1.
|
|
23
|
+
"axios": "^1.1.3"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@cloudcommerce/types": "workspace:*"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/app-mercadopago",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.120",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce app to integrate Mercado Pago",
|
|
6
6
|
"main": "lib/mercadopago.js",
|
|
7
7
|
"exports": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@cloudcommerce/api": "workspace:*",
|
|
27
27
|
"@cloudcommerce/firebase": "workspace:*",
|
|
28
|
-
"axios": "^1.1.
|
|
28
|
+
"axios": "^1.1.3",
|
|
29
29
|
"firebase-admin": "^11.1.0",
|
|
30
30
|
"firebase-functions": "^3.24.1"
|
|
31
31
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/app-tiny-erp",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.120",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce app for Tiny ERP",
|
|
6
6
|
"main": "lib/tiny-erp.js",
|
|
7
7
|
"repository": {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"@cloudcommerce/api": "workspace:*",
|
|
23
23
|
"@cloudcommerce/firebase": "workspace:*",
|
|
24
24
|
"@ecomplus/utils": "^1.4.1",
|
|
25
|
-
"axios": "^1.1.
|
|
25
|
+
"axios": "^1.1.3",
|
|
26
26
|
"firebase-admin": "^11.1.0",
|
|
27
27
|
"firebase-functions": "^3.24.1",
|
|
28
28
|
"form-data": "^4.0.0"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"firebase.js","sourceRoot":"","sources":["../src/firebase.ts"],"names":[],"mappings":"AAAA,iDAAiD;AACjD,OAAO,kCAAkC,CAAC;AAE1C,cAAc,6BAA6B,CAAC;AAE5C,cAAc,wCAAwC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import Ajv from 'ajv';
|
|
2
|
+
import addFormats from 'ajv-formats';
|
|
3
|
+
|
|
4
|
+
const ajvOptions = {
|
|
5
|
+
coerceTypes: false,
|
|
6
|
+
useDefaults: true,
|
|
7
|
+
removeAdditional: true,
|
|
8
|
+
// Explicitly set `allErrors` to false, when set to true a DoS attack is possible
|
|
9
|
+
allErrors: false,
|
|
10
|
+
multipleOfPrecision: 5,
|
|
11
|
+
allowMatchingProperties: true,
|
|
12
|
+
};
|
|
13
|
+
const ajv = addFormats(new Ajv(ajvOptions));
|
|
14
|
+
const parseAjvErrors = (errors, ajvInstance = ajv) => {
|
|
15
|
+
return ajvInstance.errorsText(errors, { separator: '\n' });
|
|
16
|
+
};
|
|
17
|
+
const sendRequestError = (res, modName, errors) => {
|
|
18
|
+
res.status(400).send({
|
|
19
|
+
status: 400,
|
|
20
|
+
error_code: 'MOD901',
|
|
21
|
+
message: 'Bad-formatted JSON body (POST) or URL params (GET), details in `user_message`',
|
|
22
|
+
user_message: {
|
|
23
|
+
en_us: ajv.errorsText(errors, { separator: '\n' }),
|
|
24
|
+
},
|
|
25
|
+
more_info: `/${modName}/schema`,
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export default ajv;
|
|
30
|
+
|
|
31
|
+
export {
|
|
32
|
+
ajv, ajvOptions, parseAjvErrors, sendRequestError,
|
|
33
|
+
};
|
|
34
|
+
// # sourceMappingURL=ajv.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ajv.js","sourceRoot":"","sources":["../../src/firebase/ajv.ts"],"names":[],"mappings":"AACA,OAAO,GAA6B,MAAM,KAAK,CAAC;AAChD,OAAO,UAAU,MAAM,aAAa,CAAC;AAErC,MAAM,UAAU,GAAY;IAC1B,WAAW,EAAE,KAAK;IAClB,WAAW,EAAE,IAAI;IACjB,gBAAgB,EAAE,IAAI;IACtB,iFAAiF;IACjF,SAAS,EAAE,KAAK;IAChB,mBAAmB,EAAE,CAAC;IACtB,uBAAuB,EAAE,IAAI;CAC9B,CAAC;AACF,MAAM,GAAG,GAAG,UAAU,CAAC,IAAI,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC;AAE5C,MAAM,cAAc,GAAG,CAAC,MAA6B,EAAE,WAAW,GAAG,GAAG,EAAE,EAAE;IAC1E,OAAO,WAAW,CAAC,UAAU,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;AAC7D,CAAC,CAAC;AAEF,MAAM,gBAAgB,GAAG,CAAC,GAAa,EAAE,OAAe,EAAE,MAA6B,EAAE,EAAE;IACzF,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;QACnB,MAAM,EAAE,GAAG;QACX,UAAU,EAAE,QAAQ;QACpB,OAAO,EAAE,+EAA+E;QACxF,YAAY,EAAE;YACZ,KAAK,EAAE,GAAG,CAAC,UAAU,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;SACnD;QACD,SAAS,EAAE,IAAI,OAAO,SAAS;KAChC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,eAAe,GAAG,CAAC;AAEnB,OAAO,EACL,GAAG,EACH,UAAU,EACV,cAAc,EACd,gBAAgB,GACjB,CAAC"}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { logger } from 'firebase-functions';
|
|
2
|
+
import axios from 'axios';
|
|
3
|
+
import config from '@cloudcommerce/firebase/lib/config';
|
|
4
|
+
|
|
5
|
+
// Blacklist urls to prevent consecultive errors
|
|
6
|
+
const blacklist = {};
|
|
7
|
+
|
|
8
|
+
export default async (appId, modName, url, data, isBigTimeout) => {
|
|
9
|
+
if (blacklist[url] > 2) {
|
|
10
|
+
logger.log(`> Skipping blacklisted ${url}`);
|
|
11
|
+
const err = new Error('Blacklited endpoint URL');
|
|
12
|
+
return Promise.reject(err);
|
|
13
|
+
}
|
|
14
|
+
const { storeId, apps } = config.get();
|
|
15
|
+
const checkErrorResponse = (logHead, resData) => {
|
|
16
|
+
if (typeof resData === 'object' && resData !== null) {
|
|
17
|
+
const { error, message } = resData;
|
|
18
|
+
if (typeof error === 'string' && error.length && typeof message === 'string') {
|
|
19
|
+
logger.warn(logHead, JSON.stringify({ error, message }));
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
const debugAndBlacklist = (response) => {
|
|
24
|
+
const status = response ? response.status : 0;
|
|
25
|
+
if (!blacklist[url]) {
|
|
26
|
+
blacklist[url] = 1;
|
|
27
|
+
} else {
|
|
28
|
+
blacklist[url] += 1;
|
|
29
|
+
}
|
|
30
|
+
setTimeout(() => {
|
|
31
|
+
if (blacklist[url] > 1) {
|
|
32
|
+
blacklist[url] -= 1;
|
|
33
|
+
} else {
|
|
34
|
+
delete blacklist[url];
|
|
35
|
+
}
|
|
36
|
+
}, !status ? 180000 : 6000);
|
|
37
|
+
const logHead = `${url} : ${status}`;
|
|
38
|
+
if (status >= 400 && status < 500) {
|
|
39
|
+
checkErrorResponse(logHead, response.data);
|
|
40
|
+
} else {
|
|
41
|
+
logger.info(logHead);
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
// eslint-disable-next-line no-unused-vars
|
|
45
|
+
let internalModuleFn;
|
|
46
|
+
if (modName === 'apply_discount') {
|
|
47
|
+
if (appId === apps.discounts.appId) {
|
|
48
|
+
internalModuleFn = async (_data = data) => {
|
|
49
|
+
return import('@cloudcommerce/app-discounts')
|
|
50
|
+
.then(({ applyDiscount }) => applyDiscount(_data));
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
} else if (modName === 'calculate_shipping') {
|
|
54
|
+
if (appId === apps.correios.appId) {
|
|
55
|
+
internalModuleFn = async (_data = data) => {
|
|
56
|
+
return import('@cloudcommerce/app-correios')
|
|
57
|
+
.then(({ calculateShipping }) => calculateShipping(_data));
|
|
58
|
+
};
|
|
59
|
+
} else if (appId === apps.customShipping.appId) {
|
|
60
|
+
internalModuleFn = async (_data = data) => {
|
|
61
|
+
return import('@cloudcommerce/app-custom-shipping')
|
|
62
|
+
.then(({ calculateShipping }) => calculateShipping(_data));
|
|
63
|
+
};
|
|
64
|
+
} else if (appId === apps.frenet.appId) {
|
|
65
|
+
internalModuleFn = async (_data = data) => {
|
|
66
|
+
return import('@cloudcommerce/app-frenet')
|
|
67
|
+
.then(({ calculateShipping }) => calculateShipping(_data));
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
} else if (modName === 'list_payments') {
|
|
71
|
+
if (appId === apps.mercadoPago.appId) {
|
|
72
|
+
internalModuleFn = async (_data = data) => {
|
|
73
|
+
return import('@cloudcommerce/app-mercadopago')
|
|
74
|
+
.then(({ listPayments }) => listPayments(_data));
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
} else if (modName === 'create_transaction') {
|
|
78
|
+
if (appId === apps.mercadoPago.appId) {
|
|
79
|
+
internalModuleFn = async (_data = data) => {
|
|
80
|
+
return import('@cloudcommerce/app-mercadopago')
|
|
81
|
+
.then(({ createTransaction }) => createTransaction(_data));
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
if (internalModuleFn) {
|
|
86
|
+
/*
|
|
87
|
+
global.app1_apply_discount_middleware = async (
|
|
88
|
+
data: any,
|
|
89
|
+
next: () => Promise<any>,
|
|
90
|
+
) => {
|
|
91
|
+
if (data.params.x === 'sample') {
|
|
92
|
+
return {};
|
|
93
|
+
}
|
|
94
|
+
return next(data);
|
|
95
|
+
};
|
|
96
|
+
*/
|
|
97
|
+
const middleware = global[`app${appId}_${modName}_middleware`];
|
|
98
|
+
try {
|
|
99
|
+
let appResponse;
|
|
100
|
+
if (typeof middleware === 'function') {
|
|
101
|
+
appResponse = await middleware(data, internalModuleFn);
|
|
102
|
+
} else {
|
|
103
|
+
appResponse = await internalModuleFn(data);
|
|
104
|
+
}
|
|
105
|
+
checkErrorResponse(`${appId}_${modName}`, appResponse);
|
|
106
|
+
return appResponse;
|
|
107
|
+
} catch (err) {
|
|
108
|
+
logger.error(err);
|
|
109
|
+
let message = 'Failed to execute module function';
|
|
110
|
+
if (typeof middleware === 'function') {
|
|
111
|
+
message += ' (has middleware)';
|
|
112
|
+
}
|
|
113
|
+
return {
|
|
114
|
+
error: 'INTERNAL_MODULE_ERROR',
|
|
115
|
+
message,
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
return axios({
|
|
120
|
+
method: 'POST',
|
|
121
|
+
maxRedirects: 2,
|
|
122
|
+
responseType: 'json',
|
|
123
|
+
maxContentLength: 1000000,
|
|
124
|
+
url,
|
|
125
|
+
data,
|
|
126
|
+
headers: {
|
|
127
|
+
'X-Store-ID': storeId.toString(),
|
|
128
|
+
},
|
|
129
|
+
// Wait 10s by default and 30s in specific cases
|
|
130
|
+
timeout: isBigTimeout ? 30000 : 10000,
|
|
131
|
+
})
|
|
132
|
+
.then((response) => {
|
|
133
|
+
debugAndBlacklist(response);
|
|
134
|
+
return response.data;
|
|
135
|
+
})
|
|
136
|
+
.catch((err) => {
|
|
137
|
+
const { response } = err;
|
|
138
|
+
debugAndBlacklist(response);
|
|
139
|
+
if (err.message || err.code) {
|
|
140
|
+
let msg = `Axios error ${err.code}: ${err.message}`;
|
|
141
|
+
if (data) {
|
|
142
|
+
msg += `\n\n${JSON.stringify(data)}`;
|
|
143
|
+
}
|
|
144
|
+
logger.warn(msg);
|
|
145
|
+
}
|
|
146
|
+
throw err;
|
|
147
|
+
});
|
|
148
|
+
};
|
|
149
|
+
// # sourceMappingURL=call-app-module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"call-app-module.js","sourceRoot":"","sources":["../../src/firebase/call-app-module.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,KAAwB,MAAM,OAAO,CAAC;AAC7C,OAAO,MAAM,MAAM,oCAAoC,CAAC;AAExD,gDAAgD;AAChD,MAAM,SAAS,GAAG,EAAE,CAAC;AAErB,eAAe,KAAK,EAClB,KAAa,EACb,OAAsB,EACtB,GAAW,EACX,IAAS,EACT,YAAqB,EACrB,EAAE;IACF,IAAI,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;QACtB,MAAM,CAAC,GAAG,CAAC,0BAA0B,GAAG,EAAE,CAAC,CAAC;QAC5C,MAAM,GAAG,GAAG,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;QACjD,OAAO,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;KAC5B;IACD,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC,GAAG,EAAE,CAAC;IAEvC,MAAM,kBAAkB,GAAG,CAAC,OAAe,EAAE,OAAY,EAAE,EAAE;QAC3D,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,KAAK,IAAI,EAAE;YACnD,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;YACnC,IAAI,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