cloudcommerce 0.0.96 → 0.0.98

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.
Files changed (84) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/package.json +3 -3
  3. package/packages/api/package.json +1 -1
  4. package/packages/apps/correios/lib-mjs/correios-ws.mjs +2 -1
  5. package/packages/apps/correios/package.json +1 -1
  6. package/packages/apps/custom-shipping/package.json +1 -1
  7. package/packages/apps/discounts/package.json +1 -1
  8. package/packages/apps/frenet/package.json +1 -1
  9. package/packages/apps/tiny-erp/lib/event-to-tiny.js +94 -94
  10. package/packages/apps/tiny-erp/lib/index.js +1 -1
  11. package/packages/apps/tiny-erp/lib/integration/after-tiny-queue.js +74 -71
  12. package/packages/apps/tiny-erp/lib/integration/export-order-to-tiny.js +73 -70
  13. package/packages/apps/tiny-erp/lib/integration/export-product-to-tiny.js +53 -49
  14. package/packages/apps/tiny-erp/lib/integration/helpers/format-tiny-date.js +3 -3
  15. package/packages/apps/tiny-erp/lib/integration/import-order-from-tiny.js +75 -76
  16. package/packages/apps/tiny-erp/lib/integration/import-product-from-tiny.js +140 -137
  17. package/packages/apps/tiny-erp/lib/integration/parsers/order-from-tiny.js +39 -40
  18. package/packages/apps/tiny-erp/lib/integration/parsers/order-to-tiny.js +178 -173
  19. package/packages/apps/tiny-erp/lib/integration/parsers/product-from-tiny.js +171 -173
  20. package/packages/apps/tiny-erp/lib/integration/parsers/product-to-tiny.js +127 -123
  21. package/packages/apps/tiny-erp/lib/integration/parsers/status-from-tiny.js +32 -32
  22. package/packages/apps/tiny-erp/lib/integration/parsers/status-to-tiny.js +37 -37
  23. package/packages/apps/tiny-erp/lib/integration/post-tiny-erp.js +43 -42
  24. package/packages/apps/tiny-erp/lib/tiny-erp.js +6 -8
  25. package/packages/apps/tiny-erp/lib/tiny-webhook.js +73 -76
  26. package/packages/apps/tiny-erp/package.json +2 -2
  27. package/packages/cli/package.json +1 -1
  28. package/packages/config/package.json +1 -1
  29. package/packages/events/package.json +2 -2
  30. package/packages/firebase/package.json +3 -3
  31. package/packages/modules/lib/firebase/ajv.js +19 -24
  32. package/packages/modules/lib/firebase/call-app-module.js +116 -110
  33. package/packages/modules/lib/firebase/checkout.js +151 -152
  34. package/packages/modules/lib/firebase/functions-checkout/fix-items.js +194 -187
  35. package/packages/modules/lib/firebase/functions-checkout/get-custumerId.js +25 -26
  36. package/packages/modules/lib/firebase/functions-checkout/handle-order-transaction.js +110 -109
  37. package/packages/modules/lib/firebase/functions-checkout/new-order.js +177 -177
  38. package/packages/modules/lib/firebase/functions-checkout/request-to-module.js +59 -59
  39. package/packages/modules/lib/firebase/functions-checkout/utils.js +195 -197
  40. package/packages/modules/lib/firebase/handle-module.js +144 -146
  41. package/packages/modules/lib/firebase/proxy-apps.js +2 -1
  42. package/packages/modules/lib/firebase/serve-modules-api.js +52 -53
  43. package/packages/modules/lib/firebase.js +4 -6
  44. package/packages/modules/lib/index.js +12 -15
  45. package/packages/modules/package.json +2 -2
  46. package/packages/passport/package.json +2 -2
  47. package/packages/ssr/package.json +2 -2
  48. package/packages/storefront/.eslintrc.cjs +1 -0
  49. package/packages/storefront/astro.config.mjs +11 -1
  50. package/packages/storefront/dist/client/LoginOffcanvas.daf3f717.js +1 -0
  51. package/packages/storefront/dist/client/assets/_...522e6bf2.css +4 -0
  52. package/packages/storefront/dist/client/assets/{_...ee104f19.css → _...a48b75c7.css} +1 -1
  53. package/packages/storefront/dist/client/chunks/LoginForm.d9251274.js +1066 -0
  54. package/packages/storefront/dist/client/chunks/LoginOffcanvas.07fe6492.js +1 -0
  55. package/packages/storefront/dist/client/{hoisted.46e058d2.js → chunks/index.esm.84a649c7.js} +77 -17
  56. package/packages/storefront/dist/client/chunks/preload-helper.f15ab524.js +1 -0
  57. package/packages/storefront/dist/client/chunks/runtime-dom.esm-bundler.738639ee.js +1 -0
  58. package/packages/storefront/dist/client/client.b552d86a.js +1 -0
  59. package/packages/storefront/dist/client/hoisted.054c36ac.js +1 -0
  60. package/packages/storefront/dist/client/manifest.webmanifest +1 -1
  61. package/packages/storefront/dist/client/sw.js +1 -1
  62. package/packages/storefront/dist/server/entry.mjs +370 -180
  63. package/packages/storefront/dist/server/manifest.webmanifest +1 -1
  64. package/packages/storefront/package.json +6 -5
  65. package/packages/storefront/src/assets/pico.css +0 -1
  66. package/packages/storefront/src/env.d.ts +1 -1
  67. package/packages/storefront/src/lib/components/AOffcanvas.vue +98 -0
  68. package/packages/storefront/src/lib/components/LoginForm.vue +54 -0
  69. package/packages/storefront/src/lib/components/LoginOffcanvas.vue +41 -0
  70. package/packages/storefront/src/lib/components/TheHeader.vue +37 -3
  71. package/packages/storefront/src/lib/components/TopBar.vue +13 -21
  72. package/packages/storefront/src/lib/layouts/BaseBody.astro +41 -38
  73. package/packages/storefront/src/lib/layouts/BaseHead.astro +0 -5
  74. package/packages/storefront/src/lib/layouts/BaseStateJson.astro +12 -11
  75. package/packages/storefront/src/lib/layouts/PagesHeader.astro +29 -20
  76. package/packages/storefront/src/lib/scripts/firebase-app.ts +16 -0
  77. package/packages/storefront/src/lib/{helpers → ssr}/image.ts +1 -1
  78. package/packages/storefront/src/pages/app/account.astro +0 -0
  79. package/packages/storefront/storefront.config.mjs +1 -1
  80. package/packages/storefront/tsconfig.json +4 -1
  81. package/packages/types/package.json +1 -1
  82. package/packages/storefront/dist/client/assets/_...73e01db2.css +0 -4
  83. package/packages/storefront/dist/client/client.80baece3.js +0 -1
  84. package/packages/storefront/src/lib/components/LoginModal.vue +0 -82
@@ -3,167 +3,165 @@ import Ajv from 'ajv';
3
3
  import addFormats from 'ajv-formats';
4
4
  import api from '@cloudcommerce/api';
5
5
  import config from '@cloudcommerce/firebase/lib/config';
6
- import {
7
- ajv, ajvOptions, parseAjvErrors, sendRequestError,
8
- } from './ajv.js';
6
+ import { ajv, ajvOptions, parseAjvErrors, sendRequestError, } from './ajv.js';
9
7
  import callAppModule from './call-app-module.js';
10
-
11
8
  const ajvAppsResponse = addFormats(new Ajv({ ...ajvOptions, allErrors: true }));
12
9
  // Cache apps list and no params modules results
13
10
  const appsCache = {};
14
11
  const resultsCache = {};
15
12
  async function runModule(params, res, modName, validate, responseValidate, appId) {
16
- const respond = (result) => res.send({
17
- result,
18
- meta: params,
19
- });
20
- const { storeId } = config.get();
21
- const isEmptyParams = (!params || !Object.keys(params).length);
22
- if (!validate(params)) {
23
- return sendRequestError(res, modName, validate.errors);
24
- }
25
- let canCache = true;
26
- const cacheKey = `${storeId}:${modName}`;
27
- const listAppsParams = {
28
- state: 'active',
29
- [`modules.${modName}.enabled`]: true,
30
- fields: `_id,app_id,version,data,hidden_data,modules.${modName}`,
31
- };
32
- if (appId
33
- && (typeof appId === 'number' || (typeof appId === 'string' && /^\d+$/.test(appId)))) {
34
- if (typeof appId === 'string') {
35
- appId = parseInt(appId, 10);
13
+ const respond = (result) => res.send({
14
+ result,
15
+ meta: params,
16
+ });
17
+ const { storeId } = config.get();
18
+ const isEmptyParams = (!params || !Object.keys(params).length);
19
+ if (!validate(params)) {
20
+ return sendRequestError(res, modName, validate.errors);
36
21
  }
37
- canCache = false;
38
- listAppsParams.app_id = appId;
39
- listAppsParams.limit = 1;
40
- }
41
- let canCacheResults = false;
42
- if (canCache && isEmptyParams) {
43
- if (resultsCache[cacheKey]) {
44
- return respond(resultsCache[cacheKey]);
22
+ let canCache = true;
23
+ const cacheKey = `${storeId}:${modName}`;
24
+ const listAppsParams = {
25
+ state: 'active',
26
+ [`modules.${modName}.enabled`]: true,
27
+ fields: `_id,app_id,version,data,hidden_data,modules.${modName}`,
28
+ };
29
+ if (appId
30
+ && (typeof appId === 'number' || (typeof appId === 'string' && /^\d+$/.test(appId)))) {
31
+ if (typeof appId === 'string') {
32
+ appId = parseInt(appId, 10);
33
+ }
34
+ canCache = false;
35
+ listAppsParams.app_id = appId;
36
+ listAppsParams.limit = 1;
45
37
  }
46
- canCacheResults = true;
47
- }
48
- let appsList;
49
- if (canCache && appsCache[cacheKey]) {
50
- appsList = appsCache[cacheKey];
51
- } else {
52
- try {
53
- const { data } = await api.get('applications', {
54
- params: listAppsParams,
55
- });
56
- appsList = data.result;
57
- } catch (err) {
58
- logger.error(err);
59
- const error = err;
60
- return res.status(500).send({
61
- status: 500,
62
- error_code: 'MOD801',
63
- message: `Store API returned status ${error.statusCode} trying to list apps`,
64
- more_info: error.data?.user_message?.en_us,
65
- });
38
+ let canCacheResults = false;
39
+ if (canCache && isEmptyParams) {
40
+ if (resultsCache[cacheKey]) {
41
+ return respond(resultsCache[cacheKey]);
42
+ }
43
+ canCacheResults = true;
66
44
  }
67
- }
68
- if (Array.isArray(appsList)) {
69
- if (!appsList.length) {
70
- return respond([]);
45
+ let appsList;
46
+ if (canCache && appsCache[cacheKey]) {
47
+ appsList = appsCache[cacheKey];
71
48
  }
72
- if (canCache && !appsCache[cacheKey]) {
73
- appsCache[cacheKey] = appsList;
74
- setTimeout(() => {
75
- appsCache[cacheKey] = null;
76
- delete appsCache[cacheKey];
77
- }, appsList.length ? 60000 : 3000);
49
+ else {
50
+ try {
51
+ const { data } = await api.get('applications', {
52
+ params: listAppsParams,
53
+ });
54
+ appsList = data.result;
55
+ }
56
+ catch (err) {
57
+ logger.error(err);
58
+ const error = err;
59
+ return res.status(500).send({
60
+ status: 500,
61
+ error_code: 'MOD801',
62
+ message: `Store API returned status ${error.statusCode} trying to list apps`,
63
+ more_info: error.data?.user_message?.en_us,
64
+ });
65
+ }
78
66
  }
79
- const moduleReqs = [];
80
- for (let i = 0; i < appsList.length; i++) {
81
- const application = appsList[i];
82
- if (!application.hidden_data) {
83
- application.hidden_data = {};
84
- }
85
- if (!application.data) {
86
- application.data = {};
87
- }
88
- const appModuleUrl = application.modules[modName].endpoint;
89
- // Handle request with big timeout if proxying one app (by ID) only
90
- const isBigTimeout = !!(appId);
91
- const appModuleBody = {
92
- storeId,
93
- module: modName,
94
- params,
95
- application,
96
- };
97
- const reqStartTime = Date.now();
98
- moduleReqs.push(new Promise((resolve) => {
99
- let response;
100
- let isError = false;
101
- let errorMessage = null;
102
- callAppModule(appId, modName, appModuleUrl, appModuleBody, isBigTimeout)
103
- .then((appResponse) => {
104
- response = appResponse;
105
- if (appResponse?.error) {
106
- isError = true;
107
- errorMessage = appResponse.message || String(appResponse.error);
67
+ if (Array.isArray(appsList)) {
68
+ if (!appsList.length) {
69
+ return respond([]);
70
+ }
71
+ if (canCache && !appsCache[cacheKey]) {
72
+ appsCache[cacheKey] = appsList;
73
+ setTimeout(() => {
74
+ appsCache[cacheKey] = null;
75
+ delete appsCache[cacheKey];
76
+ }, appsList.length ? 60000 : 3000);
77
+ }
78
+ const moduleReqs = [];
79
+ for (let i = 0; i < appsList.length; i++) {
80
+ const application = appsList[i];
81
+ if (!application.hidden_data) {
82
+ application.hidden_data = {};
108
83
  }
109
- })
110
- .catch((err) => {
111
- response = null;
112
- isError = true;
113
- errorMessage = err.message;
114
- })
115
- .finally(() => {
116
- const result = {
117
- _id: application._id,
118
- app_id: application.app_id,
119
- took: Date.now() - reqStartTime,
120
- version: application.version,
121
- validated: false,
122
- response_errors: null,
123
- error: isError,
124
- error_message: errorMessage,
125
- response,
84
+ if (!application.data) {
85
+ application.data = {};
86
+ }
87
+ const appModuleUrl = application.modules[modName].endpoint;
88
+ // Handle request with big timeout if proxying one app (by ID) only
89
+ const isBigTimeout = !!(appId);
90
+ const appModuleBody = {
91
+ storeId,
92
+ module: modName,
93
+ params,
94
+ application,
126
95
  };
127
- if (!isError && typeof response === 'object' && response !== null) {
128
- result.validated = responseValidate(response);
129
- if (!result.validated) {
130
- // @ts-ignore
131
- result.response_errors = parseAjvErrors(responseValidate.errors, ajvAppsResponse);
132
- }
96
+ const reqStartTime = Date.now();
97
+ moduleReqs.push(new Promise((resolve) => {
98
+ let response;
99
+ let isError = false;
100
+ let errorMessage = null;
101
+ callAppModule(appId, modName, appModuleUrl, appModuleBody, isBigTimeout)
102
+ .then((appResponse) => {
103
+ response = appResponse;
104
+ if (appResponse?.error) {
105
+ isError = true;
106
+ errorMessage = appResponse.message || String(appResponse.error);
107
+ }
108
+ })
109
+ .catch((err) => {
110
+ response = null;
111
+ isError = true;
112
+ errorMessage = err.message;
113
+ })
114
+ .finally(() => {
115
+ const result = {
116
+ _id: application._id,
117
+ app_id: application.app_id,
118
+ took: Date.now() - reqStartTime,
119
+ version: application.version,
120
+ validated: false,
121
+ response_errors: null,
122
+ error: isError,
123
+ error_message: errorMessage,
124
+ response,
125
+ };
126
+ if (!isError && typeof response === 'object' && response !== null) {
127
+ result.validated = responseValidate(response);
128
+ if (!result.validated) {
129
+ // @ts-ignore
130
+ result.response_errors = parseAjvErrors(responseValidate.errors, ajvAppsResponse);
131
+ }
132
+ }
133
+ resolve(result);
134
+ });
135
+ }));
136
+ }
137
+ return Promise.all(moduleReqs).then((results) => {
138
+ if (!results.find(({ response }) => response)) {
139
+ res.status(409);
140
+ canCacheResults = false;
141
+ }
142
+ if (canCacheResults && !resultsCache[cacheKey]) {
143
+ resultsCache[cacheKey] = results;
144
+ setTimeout(() => {
145
+ resultsCache[cacheKey] = null;
146
+ delete resultsCache[cacheKey];
147
+ }, 60000);
133
148
  }
134
- resolve(result);
135
- });
136
- }));
149
+ return respond(results);
150
+ });
137
151
  }
138
- return Promise.all(moduleReqs).then((results) => {
139
- if (!results.find(({ response }) => response)) {
140
- res.status(409);
141
- canCacheResults = false;
142
- }
143
- if (canCacheResults && !resultsCache[cacheKey]) {
144
- resultsCache[cacheKey] = results;
145
- setTimeout(() => {
146
- resultsCache[cacheKey] = null;
147
- delete resultsCache[cacheKey];
148
- }, 60000);
149
- }
150
- return respond(results);
151
- });
152
- }
153
- // Shoud never happen
154
- return res.sendStatus(501);
152
+ // Shoud never happen
153
+ return res.sendStatus(501);
155
154
  }
156
-
157
155
  export default (modName, schema, responseSchema, req, res) => {
158
- const validate = ajv.compile(schema);
159
- const responseValidate = ajvAppsResponse.compile(responseSchema);
160
- return {
161
- GET() {
162
- runModule(req.query, res, modName, validate, responseValidate);
163
- },
164
- POST() {
165
- runModule(req.body, res, modName, validate, responseValidate, req.query.app_id);
166
- },
167
- };
156
+ const validate = ajv.compile(schema);
157
+ const responseValidate = ajvAppsResponse.compile(responseSchema);
158
+ return {
159
+ GET() {
160
+ runModule(req.query, res, modName, validate, responseValidate);
161
+ },
162
+ POST() {
163
+ runModule(req.body, res, modName, validate, responseValidate, req.query.app_id);
164
+ },
165
+ };
168
166
  };
169
- // # sourceMappingURL=handle-module.js.map
167
+ //# sourceMappingURL=handle-module.js.map
@@ -1 +1,2 @@
1
- // # sourceMappingURL=proxy-apps.js.map
1
+ "use strict";
2
+ //# sourceMappingURL=proxy-apps.js.map
@@ -1,63 +1,62 @@
1
1
  import { schemas } from '../index.js';
2
2
  import handleModule from './handle-module.js';
3
3
  import checkout from './checkout.js';
4
-
5
4
  export default (req, res) => {
6
- const { method } = req;
7
- if (method !== 'POST' && method !== 'GET') {
8
- return res.sendStatus(405);
9
- }
10
- if (method === 'POST'
11
- && (!req.body || typeof req.body !== 'object' || Array.isArray(req.body))) {
12
- return res.sendStatus(400);
13
- }
14
- let { url } = req;
15
- if (url.endsWith('.json')) {
16
- url = url.slice(0, -5);
17
- }
18
- [url] = url.split('?');
19
- const modName = url.split('/')[1];
20
- const sendSchema = (isResponseSchema = false) => {
21
- return res.status(200)
22
- .setHeader('Cache-Control', 'public, max-age=3600')
23
- .send(schemas[modName][isResponseSchema ? 'response' : 'params']);
24
- };
25
- if (modName === '@checkout') {
26
- if (url === '/@checkout') {
27
- if (method === 'GET') {
28
- return res.status(405)
29
- .send({
30
- error_code: 'CKT101',
31
- message: 'GET is acceptable only to JSON schema, at /@checkout/schema',
32
- });
33
- }
34
- return checkout(schemas[modName].params, req, res, req.hostname);
35
- }
36
- if (url === '/@checkout/schema') {
37
- return sendSchema();
38
- }
39
- return res.sendStatus(404);
40
- }
41
- if (schemas[modName]) {
42
- const { params: schema, response: responseSchema } = schemas[modName];
43
- if (!schema.$schema) {
44
- schema.$schema = 'http://json-schema.org/draft-07/schema#';
45
- schema.title = `Module \`${modName}\`: Params model`;
5
+ const { method } = req;
6
+ if (method !== 'POST' && method !== 'GET') {
7
+ return res.sendStatus(405);
46
8
  }
47
- if (!responseSchema.$schema) {
48
- responseSchema.$schema = 'http://json-schema.org/draft-07/schema#';
49
- responseSchema.title = `Module \`${modName}\`: App response model`;
9
+ if (method === 'POST'
10
+ && (!req.body || typeof req.body !== 'object' || Array.isArray(req.body))) {
11
+ return res.sendStatus(400);
50
12
  }
51
- if (url === `/${modName}/schema`) {
52
- return sendSchema();
13
+ let { url } = req;
14
+ if (url.endsWith('.json')) {
15
+ url = url.slice(0, -5);
53
16
  }
54
- if (url === `/${modName}/response_schema`) {
55
- return sendSchema(true);
17
+ [url] = url.split('?');
18
+ const modName = url.split('/')[1];
19
+ const sendSchema = (isResponseSchema = false) => {
20
+ return res.status(200)
21
+ .setHeader('Cache-Control', 'public, max-age=3600')
22
+ .send(schemas[modName][isResponseSchema ? 'response' : 'params']);
23
+ };
24
+ if (modName === '@checkout') {
25
+ if (url === '/@checkout') {
26
+ if (method === 'GET') {
27
+ return res.status(405)
28
+ .send({
29
+ error_code: 'CKT101',
30
+ message: 'GET is acceptable only to JSON schema, at /@checkout/schema',
31
+ });
32
+ }
33
+ return checkout(schemas[modName].params, req, res, req.hostname);
34
+ }
35
+ if (url === '/@checkout/schema') {
36
+ return sendSchema();
37
+ }
38
+ return res.sendStatus(404);
56
39
  }
57
- if (url === `/${modName}`) {
58
- return handleModule(modName, schema, responseSchema, req, res)[method]();
40
+ if (schemas[modName]) {
41
+ const { params: schema, response: responseSchema } = schemas[modName];
42
+ if (!schema.$schema) {
43
+ schema.$schema = 'http://json-schema.org/draft-07/schema#';
44
+ schema.title = `Module \`${modName}\`: Params model`;
45
+ }
46
+ if (!responseSchema.$schema) {
47
+ responseSchema.$schema = 'http://json-schema.org/draft-07/schema#';
48
+ responseSchema.title = `Module \`${modName}\`: App response model`;
49
+ }
50
+ if (url === `/${modName}/schema`) {
51
+ return sendSchema();
52
+ }
53
+ if (url === `/${modName}/response_schema`) {
54
+ return sendSchema(true);
55
+ }
56
+ if (url === `/${modName}`) {
57
+ return handleModule(modName, schema, responseSchema, req, res)[method]();
58
+ }
59
59
  }
60
- }
61
- return res.sendStatus(404);
60
+ return res.sendStatus(404);
62
61
  };
63
- // # sourceMappingURL=serve-modules-api.js.map
62
+ //# sourceMappingURL=serve-modules-api.js.map
@@ -4,13 +4,11 @@ import '@cloudcommerce/firebase/lib/init';
4
4
  import { onRequest } from 'firebase-functions/v2/https';
5
5
  import config from '@cloudcommerce/firebase/lib/config';
6
6
  import serveModulesApi from './firebase/serve-modules-api.js';
7
-
8
7
  const { httpsFunctionOptions } = config.get();
9
-
10
8
  export const modules = onRequest({
11
- concurrency: 6,
12
- ...httpsFunctionOptions,
9
+ concurrency: 6,
10
+ ...httpsFunctionOptions,
13
11
  }, (req, res) => {
14
- serveModulesApi(req, res);
12
+ serveModulesApi(req, res);
15
13
  });
16
- // # sourceMappingURL=firebase.js.map
14
+ //# sourceMappingURL=firebase.js.map
@@ -3,23 +3,20 @@ import * as applyDiscount from '../schemas/apply_discount.cjs';
3
3
  import * as listPayments from '../schemas/list_payments.cjs';
4
4
  import * as createTransaction from '../schemas/create_transaction.cjs';
5
5
  import * as checkout from '../schemas/@checkout.cjs';
6
-
7
6
  const schemas = {
8
- calculate_shipping: calculateShipping,
9
- apply_discount: applyDiscount,
10
- list_payments: listPayments,
11
- create_transaction: createTransaction,
12
- '@checkout': checkout,
7
+ calculate_shipping: calculateShipping,
8
+ apply_discount: applyDiscount,
9
+ list_payments: listPayments,
10
+ create_transaction: createTransaction,
11
+ '@checkout': checkout,
13
12
  };
14
-
15
13
  export default {
16
- calculateShipping,
17
- applyDiscount,
18
- listPayments,
19
- createTransaction,
20
- checkout,
21
- schemas,
14
+ calculateShipping,
15
+ applyDiscount,
16
+ listPayments,
17
+ createTransaction,
18
+ checkout,
19
+ schemas,
22
20
  };
23
-
24
21
  export { schemas };
25
- // # sourceMappingURL=index.js.map
22
+ //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/modules",
3
3
  "type": "module",
4
- "version": "0.0.96",
4
+ "version": "0.0.98",
5
5
  "description": "E-Com Plus Cloud Commerce modules API",
6
6
  "main": "lib/index.cjs",
7
7
  "exports": {
@@ -34,7 +34,7 @@
34
34
  "ajv-formats": "^2.1.1",
35
35
  "axios": "^0.27.2",
36
36
  "firebase-admin": "^11.0.1",
37
- "firebase-functions": "^3.23.0",
37
+ "firebase-functions": "^3.24.0",
38
38
  "source-map-support": "^0.5.21"
39
39
  },
40
40
  "devDependencies": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/passport",
3
3
  "type": "module",
4
- "version": "0.0.96",
4
+ "version": "0.0.98",
5
5
  "description": "E-Com Plus Cloud Commerce customers authentication (passport) API",
6
6
  "main": "lib/index.js",
7
7
  "exports": {
@@ -26,7 +26,7 @@
26
26
  "@cloudcommerce/api": "workspace:*",
27
27
  "@cloudcommerce/firebase": "workspace:*",
28
28
  "firebase-admin": "^11.0.1",
29
- "firebase-functions": "^3.23.0",
29
+ "firebase-functions": "^3.24.0",
30
30
  "source-map-support": "^0.5.21"
31
31
  },
32
32
  "devDependencies": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/ssr",
3
3
  "type": "module",
4
- "version": "0.0.96",
4
+ "version": "0.0.98",
5
5
  "description": "E-Com Plus Cloud Commerce storefront SSR",
6
6
  "main": "lib/index.js",
7
7
  "exports": {
@@ -30,7 +30,7 @@
30
30
  "color": "^4.2.3",
31
31
  "compression": "^1.7.4",
32
32
  "firebase-admin": "^11.0.1",
33
- "firebase-functions": "^3.23.0",
33
+ "firebase-functions": "^3.24.0",
34
34
  "html-escaper": "^3.0.3",
35
35
  "image-size": "^1.0.2",
36
36
  "kleur": "^4.1.5",
@@ -2,5 +2,6 @@ module.exports = {
2
2
  extends: '../../.eslintrc.cjs',
3
3
  rules: {
4
4
  'no-console': 'off',
5
+ 'import/no-unresolved': 'off',
5
6
  },
6
7
  };
@@ -13,7 +13,12 @@ import getConfig from './storefront.config.mjs';
13
13
 
14
14
  dotenv.config();
15
15
 
16
- const { domain, primaryColor, settings } = getConfig();
16
+ const {
17
+ lang,
18
+ domain,
19
+ primaryColor,
20
+ settings,
21
+ } = getConfig();
17
22
 
18
23
  const _vitePWAOptions = {
19
24
  manifest: {
@@ -136,6 +141,11 @@ const genAstroConfig = ({
136
141
  plugins: [
137
142
  VitePWA(vitePWAOptions),
138
143
  ],
144
+ resolve: {
145
+ alias: {
146
+ '@i18n': `@ecomplus/i18n/src/${lang}/index.js`,
147
+ },
148
+ },
139
149
  },
140
150
  });
141
151
 
@@ -0,0 +1 @@
1
+ import{_ as i}from"./chunks/LoginOffcanvas.07fe6492.js";import"./chunks/preload-helper.f15ab524.js";import"./chunks/runtime-dom.esm-bundler.738639ee.js";/* empty css */export{i as default};