@cloudcommerce/cli 2.25.0 → 2.25.2
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/lib/cli.js +5 -5
- package/lib/setup-gcloud.js +1 -1
- package/lib/setup-gh.js +2 -2
- package/package.json +2 -2
package/lib/cli.js
CHANGED
|
@@ -30,7 +30,7 @@ if (projectId) {
|
|
|
30
30
|
try {
|
|
31
31
|
const gac = fs.readJSONSync(joinPath(pwd, GOOGLE_APPLICATION_CREDENTIALS));
|
|
32
32
|
projectId = gac.project_id;
|
|
33
|
-
} catch
|
|
33
|
+
} catch {
|
|
34
34
|
//
|
|
35
35
|
}
|
|
36
36
|
}
|
|
@@ -38,7 +38,7 @@ if (projectId) {
|
|
|
38
38
|
try {
|
|
39
39
|
const firebaserc = fs.readJSONSync(joinPath(pwd, '.firebaserc'));
|
|
40
40
|
projectId = firebaserc.projects.default;
|
|
41
|
-
} catch
|
|
41
|
+
} catch {
|
|
42
42
|
projectId = 'ecom2-demo';
|
|
43
43
|
}
|
|
44
44
|
}
|
|
@@ -128,7 +128,7 @@ ECOM_STORE_ID=${storeId}
|
|
|
128
128
|
await $`git add .firebaserc functions/config.json`;
|
|
129
129
|
await $`git commit -m "Setup store [skip ci]"`;
|
|
130
130
|
await $`git push`;
|
|
131
|
-
} catch
|
|
131
|
+
} catch {
|
|
132
132
|
//
|
|
133
133
|
}
|
|
134
134
|
}
|
|
@@ -137,7 +137,7 @@ ECOM_STORE_ID=${storeId}
|
|
|
137
137
|
try {
|
|
138
138
|
await siginGcloudAndSetIAM(projectId, pwd);
|
|
139
139
|
serviceAccountJSON = await createServiceAccountKey(projectId, pwd);
|
|
140
|
-
} catch
|
|
140
|
+
} catch {
|
|
141
141
|
//
|
|
142
142
|
}
|
|
143
143
|
}
|
|
@@ -145,7 +145,7 @@ ECOM_STORE_ID=${storeId}
|
|
|
145
145
|
if (GITHUB_TOKEN && argv.github !== false) {
|
|
146
146
|
try {
|
|
147
147
|
hasCreatedAllSecrets = await createGhSecrets(apiKey, authenticationId, serviceAccountJSON, GITHUB_TOKEN);
|
|
148
|
-
} catch
|
|
148
|
+
} catch {
|
|
149
149
|
//
|
|
150
150
|
}
|
|
151
151
|
}
|
package/lib/setup-gcloud.js
CHANGED
|
@@ -187,7 +187,7 @@ const createServiceAccountKey = async (projectId, pwd) => {
|
|
|
187
187
|
await $`echo '${privateKeyData}' | base64 --decode > ${pathFileKey}`;
|
|
188
188
|
}
|
|
189
189
|
return JSON.stringify(fs.readJSONSync(pathFileKey));
|
|
190
|
-
} catch
|
|
190
|
+
} catch {
|
|
191
191
|
return null;
|
|
192
192
|
}
|
|
193
193
|
};
|
package/lib/setup-gh.js
CHANGED
|
@@ -8,7 +8,7 @@ const getRemoteRepo = async () => {
|
|
|
8
8
|
.replace(/.*github.com[/:]/, '')
|
|
9
9
|
.replace('.git', '')
|
|
10
10
|
.replace('\n', '');
|
|
11
|
-
} catch
|
|
11
|
+
} catch {
|
|
12
12
|
return null;
|
|
13
13
|
}
|
|
14
14
|
};
|
|
@@ -51,7 +51,7 @@ const createGhSecrets = async (ecomApiKey, ecomAuthentication, firebaseServiceAc
|
|
|
51
51
|
await createGhSecret('FIREBASE_SERVICE_ACCOUNT', firebaseServiceAccount);
|
|
52
52
|
return true;
|
|
53
53
|
}
|
|
54
|
-
} catch
|
|
54
|
+
} catch {
|
|
55
55
|
//
|
|
56
56
|
}
|
|
57
57
|
return false;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/cli",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.25.
|
|
4
|
+
"version": "2.25.2",
|
|
5
5
|
"description": "e-com.plus Cloud Commerce CLI tools",
|
|
6
6
|
"bin": {
|
|
7
7
|
"cloudcommerce": "./bin/run.mjs"
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"md5": "^2.3.0",
|
|
37
37
|
"typescript": "~5.5.4",
|
|
38
38
|
"zx": "^8.1.4",
|
|
39
|
-
"@cloudcommerce/api": "2.25.
|
|
39
|
+
"@cloudcommerce/api": "2.25.2"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
42
|
"build": "bash ../../scripts/build-lib.sh"
|