cloudcommerce 0.0.51 → 0.0.54

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 CHANGED
@@ -2,6 +2,28 @@
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.54](https://github.com/ecomplus/cloud-commerce/compare/v0.0.53...v0.0.54) (2022-08-19)
6
+
7
+ ### [0.0.53](https://github.com/ecomplus/cloud-commerce/compare/v0.0.52...v0.0.53) (2022-08-19)
8
+
9
+
10
+ ### Bug Fixes
11
+
12
+ * **cli:** Fix GCloud IAM roles with temporary `serviceUsageAdmin` for first deploy ([3481f0c](https://github.com/ecomplus/cloud-commerce/commit/3481f0c2dc47fd5b25c321bf28d12ed1b6e5ffde))
13
+
14
+ ### [0.0.52](https://github.com/ecomplus/cloud-commerce/compare/v0.0.51...v0.0.52) (2022-08-18)
15
+
16
+
17
+ ### Features
18
+
19
+ * **cli:** Add `--no-gcloud` option to setup command to skip GCloud IAM ([bbe5ce2](https://github.com/ecomplus/cloud-commerce/commit/bbe5ce2813c4276783d86fdd577e746fa5ecda1d))
20
+ * Properly config Firebase Hosting to call modules/passport/ssr Cloud Functions ([b6e6540](https://github.com/ecomplus/cloud-commerce/commit/b6e6540d29895287e4149a4b3c160e118144074a))
21
+
22
+
23
+ ### Bug Fixes
24
+
25
+ * **cli:** Fix GCloud IAM roles and properly check if service account already exists ([bb23dd0](https://github.com/ecomplus/cloud-commerce/commit/bb23dd049d992223285e8f51bc053d9fda775d10))
26
+
5
27
  ### [0.0.51](https://github.com/ecomplus/cloud-commerce/compare/v0.0.50...v0.0.51) (2022-08-17)
6
28
 
7
29
 
package/CONTRIBUTING.md CHANGED
@@ -35,9 +35,9 @@ If you want to deploy to a new Firebase project (needed for larger changes):
35
35
  - Set a nice project name (ID) and remember it;
36
36
  - You may enable Firebase Analytics for enhanced remote config options and A/B testing;
37
37
 
38
- 2. Go to _Firestore Database_ page (on sidebar) and _create database_:
38
+ 2. Go to _Creation > Firestore Database_ page (on sidebar) and _create database_:
39
39
  - Just bypass with default production mode and rules;
40
- - Select region `us-east1` (recommended);
40
+ - Select region `nam5 (us-central)` (recommended);
41
41
 
42
42
  3. Firebase free plan doesn't support sending external HTTP requests, so you'll need to upgrade to _Blaze_ (on demand) plan;
43
43
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cloudcommerce",
3
3
  "type": "module",
4
- "version": "0.0.51",
4
+ "version": "0.0.54",
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/api",
3
3
  "type": "module",
4
- "version": "0.0.51",
4
+ "version": "0.0.54",
5
5
  "description": "E-Com Plus Cloud Commerce APIs client/adapter",
6
6
  "main": "lib/index.js",
7
7
  "types": "lib/index.d.ts",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-discounts",
3
3
  "type": "module",
4
- "version": "0.0.51",
4
+ "version": "0.0.54",
5
5
  "description": "E-Com Plus Cloud Commerce app for complex discount rules",
6
6
  "main": "lib/discounts.js",
7
7
  "repository": {
@@ -36,7 +36,22 @@
36
36
  "firebase.json",
37
37
  "**/.*",
38
38
  "**/node_modules/**"
39
- ]
39
+ ],
40
+ "rewrites": [
41
+ {
42
+ "source": "/api/modules/**",
43
+ "function": "modules"
44
+ },
45
+ {
46
+ "source": "/api/passport/**",
47
+ "function": "passport"
48
+ },
49
+ {
50
+ "source": "**/!(*(*.)js|*(*.)css|*(*.)ico|*(*.)png|*(*.)gif|*(*.)jpg|*(*.)jpeg|*(*.)webp|*(*.)avif|*(*.)svg|*(*.)woff|*(*.)woff2|*(*.)otf|*(*.)ttf|*(*.)eot)",
51
+ "function": "ssr"
52
+ }
53
+ ],
54
+ "cleanUrls": true
40
55
  },
41
56
  "storage": {
42
57
  "rules": "storage.rules"
@@ -1,22 +1,27 @@
1
1
  import path from 'path';
2
- import { $, echo, fs } from 'zx';
2
+ import { $, fs } from 'zx';
3
3
 
4
4
  const serviceAccountId = 'cloud-commerce-gh-actions';
5
- const serviceAccountEmail = (projectId) => {
5
+ const getAccountEmail = (projectId) => {
6
6
  return `${serviceAccountId}@${projectId}.iam.gserviceaccount.com`;
7
7
  };
8
8
  const checkServiceAccountExists = async (projectId) => {
9
+ let hasServiceAccount;
9
10
  try {
10
- return $`gcloud iam service-accounts describe ${serviceAccountEmail(projectId)}`;
11
+ const { stderr } = await $`gcloud iam service-accounts describe ${getAccountEmail(projectId)}`;
12
+ hasServiceAccount = !/not_?found/i.test(stderr);
11
13
  } catch (e) {
12
14
  return null;
13
15
  }
16
+ return hasServiceAccount;
14
17
  };
15
18
  const siginGcloudAndSetIAM = async (projectId, pwd) => {
16
- await $`gcloud auth login`;
17
- await $`gcloud config set project ${projectId} `;
19
+ if (/no credential/i.test((await $`gcloud auth list`).stderr)) {
20
+ await $`gcloud auth login`;
21
+ }
22
+ await $`gcloud config set project ${projectId}`;
18
23
  const roles = [
19
- 'roles/cloudconfig.admin',
24
+ 'roles/firebase.admin',
20
25
  'roles/appengine.appAdmin',
21
26
  'roles/appengine.appCreator',
22
27
  'roles/artifactregistry.admin',
@@ -25,21 +30,23 @@ const siginGcloudAndSetIAM = async (projectId, pwd) => {
25
30
  'roles/iam.serviceAccountUser',
26
31
  'roles/run.viewer',
27
32
  'roles/serviceusage.apiKeysViewer',
33
+ 'roles/serviceusage.serviceUsageAdmin',
28
34
  ];
29
35
  const serviceAccount = await checkServiceAccountExists(projectId);
30
36
  if (!serviceAccount) {
31
37
  await $`gcloud iam service-accounts create ${serviceAccountId} \
32
- --description="A service account with permission to deploy Cloud Commerce from the GitHub repository to Firebase" \
33
- --display-name="Cloud Commerce GH Actions"`;
38
+ --description="A service account with permission to deploy Cloud Commerce from the GitHub repository to Firebase" \
39
+ --display-name="Cloud Commerce GH Actions"`;
34
40
  }
35
- const pathPolicyIAM = path.join(pwd, 'policyIAM.json');
41
+ await fs.ensureDir(path.join(pwd, '.cloudcommerce'));
42
+ const pathPolicyIAM = path.join(pwd, '.cloudcommerce', 'policyIAM.json');
36
43
  await $`gcloud projects get-iam-policy ${projectId} --format json > ${pathPolicyIAM}`;
37
44
  const policyIAM = fs.readJSONSync(pathPolicyIAM);
38
45
  const { bindings } = policyIAM;
39
- let updatePolicy = false;
46
+ let mustUpdatePolicy = false;
40
47
  roles.forEach((role) => {
41
48
  const roleFound = bindings.find((binding) => binding.role === role);
42
- const memberServiceAccount = `serviceAccount:${serviceAccountEmail(projectId)}`;
49
+ const memberServiceAccount = `serviceAccount:${getAccountEmail(projectId)}`;
43
50
  if (!roleFound) {
44
51
  const newBinding = {
45
52
  members: [
@@ -47,27 +54,35 @@ const siginGcloudAndSetIAM = async (projectId, pwd) => {
47
54
  ],
48
55
  role,
49
56
  };
57
+ if (role === 'roles/serviceusage.serviceUsageAdmin') {
58
+ const roleExpiration = Date.now() + 1000 * 60 * 60 * 12;
59
+ newBinding.condition = {
60
+ expression: `request.time < timestamp("${new Date(roleExpiration).toISOString()}")`,
61
+ title: 'Enable APIs on first deploy',
62
+ description: null,
63
+ };
64
+ }
50
65
  bindings.push(newBinding);
51
- updatePolicy = true;
66
+ mustUpdatePolicy = true;
52
67
  } else {
53
68
  const serviceAccountHavePermission = roleFound.members.find((account) => account === memberServiceAccount);
54
69
  if (!serviceAccountHavePermission) {
55
70
  roleFound.members.push(memberServiceAccount);
56
- updatePolicy = true;
71
+ mustUpdatePolicy = true;
57
72
  }
58
73
  }
59
74
  });
60
- if (updatePolicy) {
75
+ if (mustUpdatePolicy) {
61
76
  fs.writeJSONSync(pathPolicyIAM, policyIAM);
62
77
  return $`gcloud projects set-iam-policy ${projectId} ${pathPolicyIAM}`;
63
78
  }
64
- return echo``;
79
+ return null;
65
80
  };
66
81
  const createKeyServiceAccount = async (projectId, pwd) => {
67
82
  try {
68
- const pathFileKey = path.join(pwd, 'serviceAccountKey.json');
83
+ const pathFileKey = path.join(pwd, '.cloudcommerce', 'serviceAccountKey.json');
69
84
  await $`gcloud iam service-accounts keys create ${pathFileKey} \
70
- --iam-account=${serviceAccountEmail(projectId)}`;
85
+ --iam-account=${getAccountEmail(projectId)}`;
71
86
  return JSON.stringify(fs.readJSONSync(pathFileKey));
72
87
  } catch (e) {
73
88
  return null;
@@ -29,7 +29,7 @@ if (projectId) {
29
29
  const firebaserc = fs.readJSONSync(path.join(pwd, '.firebaserc'));
30
30
  projectId = firebaserc.projects.default;
31
31
  } catch (e) {
32
- projectId = 'ecom2-hello';
32
+ projectId = 'ecom2-001';
33
33
  }
34
34
  }
35
35
  }
@@ -37,7 +37,7 @@ if (projectId) {
37
37
  export default async () => {
38
38
  await fs.copy(path.join(__dirname, '..', 'config'), pwd);
39
39
  const options = Object.keys(argv).reduce((opts, key) => {
40
- if (key !== '_' && key !== 'deploy' && key !== 'commit') {
40
+ if (key !== '_' && argv[key] !== false) {
41
41
  // eslint-disable-next-line no-param-reassign
42
42
  opts += ` --${key} ${argv[key]}`;
43
43
  }
@@ -99,11 +99,13 @@ ECOM_STORE_ID=${storeId}
99
99
  }
100
100
  }
101
101
  let serviceAccountJSON = null;
102
- try {
103
- await siginGcloudAndSetIAM(projectId, pwd);
104
- serviceAccountJSON = await createKeyServiceAccount(projectId, pwd);
105
- } catch (e) {
106
- //
102
+ if (argv.gcloud !== false) {
103
+ try {
104
+ await siginGcloudAndSetIAM(projectId, pwd);
105
+ serviceAccountJSON = await createKeyServiceAccount(projectId, pwd);
106
+ } catch (e) {
107
+ //
108
+ }
107
109
  }
108
110
  return echo`
109
111
  ****
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/cli",
3
3
  "type": "module",
4
- "version": "0.0.51",
4
+ "version": "0.0.54",
5
5
  "description": "E-Com Plus Cloud Commerce CLI tools",
6
6
  "bin": {
7
7
  "cloudcommerce": "./bin/run.mjs"
@@ -1,27 +1,29 @@
1
1
  import path from 'path';
2
- import { $, echo, fs } from 'zx';
2
+ import { $, fs } from 'zx';
3
3
 
4
4
  const serviceAccountId = 'cloud-commerce-gh-actions';
5
- const serviceAccountEmail = (projectId: string) => {
5
+ const getAccountEmail = (projectId: string) => {
6
6
  return `${serviceAccountId}@${projectId}.iam.gserviceaccount.com`;
7
7
  };
8
8
 
9
9
  const checkServiceAccountExists = async (projectId: string) => {
10
+ let hasServiceAccount: boolean;
10
11
  try {
11
- return $`gcloud iam service-accounts describe ${serviceAccountEmail(projectId)}`;
12
+ const { stderr } = await $`gcloud iam service-accounts describe ${getAccountEmail(projectId)}`;
13
+ hasServiceAccount = !/not_?found/i.test(stderr);
12
14
  } catch (e) {
13
15
  return null;
14
16
  }
17
+ return hasServiceAccount;
15
18
  };
16
19
 
17
- const siginGcloudAndSetIAM = async (
18
- projectId: string,
19
- pwd: string,
20
- ) => {
21
- await $`gcloud auth login`;
22
- await $`gcloud config set project ${projectId} `;
20
+ const siginGcloudAndSetIAM = async (projectId: string, pwd: string) => {
21
+ if (/no credential/i.test((await $`gcloud auth list`).stderr)) {
22
+ await $`gcloud auth login`;
23
+ }
24
+ await $`gcloud config set project ${projectId}`;
23
25
  const roles = [
24
- 'roles/cloudconfig.admin',
26
+ 'roles/firebase.admin',
25
27
  'roles/appengine.appAdmin',
26
28
  'roles/appengine.appCreator',
27
29
  'roles/artifactregistry.admin',
@@ -30,55 +32,63 @@ const siginGcloudAndSetIAM = async (
30
32
  'roles/iam.serviceAccountUser',
31
33
  'roles/run.viewer',
32
34
  'roles/serviceusage.apiKeysViewer',
35
+ 'roles/serviceusage.serviceUsageAdmin',
33
36
  ];
34
37
  const serviceAccount = await checkServiceAccountExists(projectId);
35
38
  if (!serviceAccount) {
36
39
  await $`gcloud iam service-accounts create ${serviceAccountId} \
37
- --description="A service account with permission to deploy Cloud Commerce from the GitHub repository to Firebase" \
38
- --display-name="Cloud Commerce GH Actions"`;
40
+ --description="A service account with permission to deploy Cloud Commerce from the GitHub repository to Firebase" \
41
+ --display-name="Cloud Commerce GH Actions"`;
39
42
  }
40
- const pathPolicyIAM = path.join(pwd, 'policyIAM.json');
43
+ await fs.ensureDir(path.join(pwd, '.cloudcommerce'));
44
+ const pathPolicyIAM = path.join(pwd, '.cloudcommerce', 'policyIAM.json');
41
45
  await $`gcloud projects get-iam-policy ${projectId} --format json > ${pathPolicyIAM}`;
42
46
  const policyIAM = fs.readJSONSync(pathPolicyIAM);
43
47
  const { bindings } = policyIAM;
44
- let updatePolicy = false;
45
48
 
49
+ let mustUpdatePolicy = false;
46
50
  roles.forEach((role) => {
47
- const roleFound = bindings.find(
48
- (binding: { [key: string]: string | string[] }) => binding.role === role,
49
- );
50
- const memberServiceAccount = `serviceAccount:${serviceAccountEmail(projectId)}`;
51
+ const roleFound = bindings.find((binding) => binding.role === role);
52
+ const memberServiceAccount = `serviceAccount:${getAccountEmail(projectId)}`;
51
53
  if (!roleFound) {
52
- const newBinding = {
54
+ const newBinding: { [key: string]: any } = {
53
55
  members: [
54
56
  memberServiceAccount,
55
57
  ],
56
58
  role,
57
59
  };
60
+ if (role === 'roles/serviceusage.serviceUsageAdmin') {
61
+ const roleExpiration = Date.now() + 1000 * 60 * 60 * 12;
62
+ newBinding.condition = {
63
+ expression: `request.time < timestamp("${new Date(roleExpiration).toISOString()}")`,
64
+ title: 'Enable APIs on first deploy',
65
+ description: null,
66
+ };
67
+ }
58
68
  bindings.push(newBinding);
59
- updatePolicy = true;
69
+ mustUpdatePolicy = true;
60
70
  } else {
61
71
  const serviceAccountHavePermission = roleFound.members.find(
62
72
  (account: string) => account === memberServiceAccount,
63
73
  );
64
74
  if (!serviceAccountHavePermission) {
65
75
  roleFound.members.push(memberServiceAccount);
66
- updatePolicy = true;
76
+ mustUpdatePolicy = true;
67
77
  }
68
78
  }
69
79
  });
70
- if (updatePolicy) {
80
+ if (mustUpdatePolicy) {
71
81
  fs.writeJSONSync(pathPolicyIAM, policyIAM);
72
82
  return $`gcloud projects set-iam-policy ${projectId} ${pathPolicyIAM}`;
73
83
  }
74
- return echo``;
84
+ return null;
75
85
  };
76
86
 
77
87
  const createKeyServiceAccount = async (projectId: string, pwd: string) => {
78
88
  try {
79
- const pathFileKey = path.join(pwd, 'serviceAccountKey.json');
89
+ const pathFileKey = path.join(pwd, '.cloudcommerce', 'serviceAccountKey.json');
80
90
  await $`gcloud iam service-accounts keys create ${pathFileKey} \
81
- --iam-account=${serviceAccountEmail(projectId)}`;
91
+ --iam-account=${getAccountEmail(projectId)}`;
82
92
  return JSON.stringify(fs.readJSONSync(pathFileKey));
83
93
  } catch (e) {
84
94
  return null;
@@ -41,7 +41,7 @@ if (projectId) {
41
41
  const firebaserc = fs.readJSONSync(path.join(pwd, '.firebaserc'));
42
42
  projectId = firebaserc.projects.default;
43
43
  } catch (e) {
44
- projectId = 'ecom2-hello';
44
+ projectId = 'ecom2-001';
45
45
  }
46
46
  }
47
47
  }
@@ -50,7 +50,7 @@ export default async () => {
50
50
  await fs.copy(path.join(__dirname, '..', 'config'), pwd);
51
51
 
52
52
  const options = Object.keys(argv).reduce((opts, key) => {
53
- if (key !== '_' && key !== 'deploy' && key !== 'commit') {
53
+ if (key !== '_' && argv[key] !== false) {
54
54
  // eslint-disable-next-line no-param-reassign
55
55
  opts += ` --${key} ${argv[key]}`;
56
56
  }
@@ -121,11 +121,13 @@ ECOM_STORE_ID=${storeId}
121
121
  }
122
122
  }
123
123
  let serviceAccountJSON : string | null = null;
124
- try {
125
- await siginGcloudAndSetIAM(projectId as string, pwd);
126
- serviceAccountJSON = await createKeyServiceAccount(projectId as string, pwd);
127
- } catch (e) {
128
- //
124
+ if (argv.gcloud !== false) {
125
+ try {
126
+ await siginGcloudAndSetIAM(projectId as string, pwd);
127
+ serviceAccountJSON = await createKeyServiceAccount(projectId as string, pwd);
128
+ } catch (e) {
129
+ //
130
+ }
129
131
  }
130
132
 
131
133
  return echo`
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/events",
3
3
  "type": "module",
4
- "version": "0.0.51",
4
+ "version": "0.0.54",
5
5
  "description": "E-Com Plus Cloud Commerce app events",
6
6
  "main": "lib/index.js",
7
7
  "exports": {
@@ -17,7 +17,7 @@ const self = {
17
17
  countryCode: env.ECOM_COUNTRY_CODE || DEFAULT_COUNTRY_CODE,
18
18
  storeId: Number(env.ECOM_STORE_ID),
19
19
  httpsFunctionOptions: {
20
- region: env.DEPLOY_REGION || 'us-east1',
20
+ region: env.DEPLOY_REGION || 'us-central1',
21
21
  },
22
22
  apps: {
23
23
  discounts: {
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,uBAAuB,EACvB,oBAAoB,GACrB,MAAM,YAAY,CAAC;AAEpB,aAAa;AACb,MAAM,GAAG,GAA8B,CAAC,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,EAAE,GAAG,CAAC;OAC/E,CAAC,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,CAAC;OACtC,EAAE,CAAC;AAER,MAAM,SAAS,GAAG,SAAS,EAAE,CAAC;AAE9B,MAAM,IAAI,GAAG;IACX,QAAQ,EAAE;QACR,KAAK,EAAE,8BAA8B;QACrC,IAAI,EAAE,GAAG,CAAC,SAAS,IAAI,YAAY;QACnC,QAAQ,EAAE,GAAG,CAAC,aAAa,IAAI,gBAAgB;QAC/C,cAAc,EAAE,GAAG,CAAC,oBAAoB,IAAI,uBAAuB;QACnE,WAAW,EAAE,GAAG,CAAC,iBAAiB,IAAI,oBAAoB;QAC1D,OAAO,EAAE,MAAM,CAAC,GAAG,CAAC,aAAa,CAAC;QAClC,oBAAoB,EAAE;YACpB,MAAM,EAAE,GAAG,CAAC,aAAa,IAAI,UAAU;SACxC;QACD,IAAI,EAAE;YACJ,SAAS,EAAE;gBACT,KAAK,EAAE,IAAI;aACZ;SACF;KACF;CACF,CAAC;AAEF,eAAe;IACb,GAAG;QACD,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IACD,GAAG,CAAC,MAAM;QACR,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QACjD,IAAI,MAAM,CAAC,OAAO,EAAE;YAClB,GAAG,CAAC,aAAa,GAAG,MAAM,CAAC,OAAO,CAAC;SACpC;IACH,CAAC;CACF,CAAC"}
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,uBAAuB,EACvB,oBAAoB,GACrB,MAAM,YAAY,CAAC;AAEpB,aAAa;AACb,MAAM,GAAG,GAA8B,CAAC,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,EAAE,GAAG,CAAC;OAC/E,CAAC,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,CAAC;OACtC,EAAE,CAAC;AAER,MAAM,SAAS,GAAG,SAAS,EAAE,CAAC;AAE9B,MAAM,IAAI,GAAG;IACX,QAAQ,EAAE;QACR,KAAK,EAAE,8BAA8B;QACrC,IAAI,EAAE,GAAG,CAAC,SAAS,IAAI,YAAY;QACnC,QAAQ,EAAE,GAAG,CAAC,aAAa,IAAI,gBAAgB;QAC/C,cAAc,EAAE,GAAG,CAAC,oBAAoB,IAAI,uBAAuB;QACnE,WAAW,EAAE,GAAG,CAAC,iBAAiB,IAAI,oBAAoB;QAC1D,OAAO,EAAE,MAAM,CAAC,GAAG,CAAC,aAAa,CAAC;QAClC,oBAAoB,EAAE;YACpB,MAAM,EAAE,GAAG,CAAC,aAAa,IAAI,aAAa;SAC3C;QACD,IAAI,EAAE;YACJ,SAAS,EAAE;gBACT,KAAK,EAAE,IAAI;aACZ;SACF;KACF;CACF,CAAC;AAEF,eAAe;IACb,GAAG;QACD,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IACD,GAAG,CAAC,MAAM;QACR,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QACjD,IAAI,MAAM,CAAC,OAAO,EAAE;YAClB,GAAG,CAAC,aAAa,GAAG,MAAM,CAAC,OAAO,CAAC;SACpC;IACH,CAAC;CACF,CAAC"}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/firebase",
3
3
  "type": "module",
4
- "version": "0.0.51",
4
+ "version": "0.0.54",
5
5
  "description": "E-Com Plus Cloud Commerce on Firebase",
6
6
  "main": "lib/index.js",
7
7
  "types": "lib/index.d.ts",
@@ -22,7 +22,7 @@ const self = {
22
22
  countryCode: env.ECOM_COUNTRY_CODE || DEFAULT_COUNTRY_CODE,
23
23
  storeId: Number(env.ECOM_STORE_ID),
24
24
  httpsFunctionOptions: {
25
- region: env.DEPLOY_REGION || 'us-east1',
25
+ region: env.DEPLOY_REGION || 'us-central1',
26
26
  },
27
27
  apps: {
28
28
  discounts: {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/modules",
3
3
  "type": "module",
4
- "version": "0.0.51",
4
+ "version": "0.0.54",
5
5
  "description": "E-Com Plus Cloud Commerce modules API",
6
6
  "main": "lib/index.cjs",
7
7
  "exports": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/passport",
3
3
  "type": "module",
4
- "version": "0.0.51",
4
+ "version": "0.0.54",
5
5
  "description": "E-Com Plus Cloud Commerce customers authentication (passport) API",
6
6
  "main": "lib/index.js",
7
7
  "exports": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/ssr",
3
3
  "type": "module",
4
- "version": "0.0.51",
4
+ "version": "0.0.54",
5
5
  "description": "E-Com Plus Cloud Commerce storefront SSR",
6
6
  "main": "lib/index.js",
7
7
  "exports": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/storefront",
3
3
  "type": "module",
4
- "version": "0.0.51",
4
+ "version": "0.0.54",
5
5
  "description": "E-Com Plus Cloud Commerce storefront with Astro",
6
6
  "main": "src/index.js",
7
7
  "repository": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/types",
3
3
  "type": "module",
4
- "version": "0.0.51",
4
+ "version": "0.0.54",
5
5
  "description": "E-Com Plus Cloud Commerce reusable type definitions",
6
6
  "main": "index.ts",
7
7
  "repository": {