@cloudcommerce/cli 0.0.33 → 0.0.35
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/.turbo/turbo-build.log +5 -5
- package/lib/index.js +11 -2
- package/package.json +2 -2
- package/src/index.ts +12 -3
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
[
|
|
2
|
-
[
|
|
3
|
-
[
|
|
4
|
-
[
|
|
5
|
-
[
|
|
1
|
+
[33m@cloudcommerce/cli:build[0m: cache hit, replaying output [2mbdb1e5f68e0c0d5a[0m
|
|
2
|
+
[33m@cloudcommerce/cli:build: [0m
|
|
3
|
+
[33m@cloudcommerce/cli:build: [0m> @cloudcommerce/cli@0.0.34 build /home/leo/code/ecomplus/cloud-commerce/packages/cli
|
|
4
|
+
[33m@cloudcommerce/cli:build: [0m> sh ../../scripts/build-lib.sh
|
|
5
|
+
[33m@cloudcommerce/cli:build: [0m
|
package/lib/index.js
CHANGED
|
@@ -41,11 +41,20 @@ export default async () => {
|
|
|
41
41
|
}
|
|
42
42
|
return opts;
|
|
43
43
|
}, '');
|
|
44
|
-
const $firebase =
|
|
44
|
+
const $firebase = (cmd) => {
|
|
45
45
|
return $`firebase --project=${projectId} ${cmd}${options}`;
|
|
46
46
|
};
|
|
47
47
|
if (argv._.includes('serve')) {
|
|
48
|
-
return $firebase('emulators:start')
|
|
48
|
+
return $firebase('emulators:start').catch(async (err) => {
|
|
49
|
+
await echo`
|
|
50
|
+
Try killing open emulators with:
|
|
51
|
+
${chalk.bold('npx kill-port 4000 9099 5001 8080 5000 8085 9199 4400 4500')}
|
|
52
|
+
`;
|
|
53
|
+
if (err.stdout.includes('port taken')) {
|
|
54
|
+
return process.exit(1);
|
|
55
|
+
}
|
|
56
|
+
throw err;
|
|
57
|
+
});
|
|
49
58
|
}
|
|
50
59
|
if (argv._.find((cmd) => /^(\w+:)?(shell|start)$/.test(cmd))) {
|
|
51
60
|
return $firebase('functions:shell');
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/cli",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.35",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce CLI tools",
|
|
6
6
|
"bin": {
|
|
7
7
|
"cloudcommerce": "./bin/run.mjs"
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
},
|
|
24
24
|
"homepage": "https://github.com/ecomplus/cloud-commerce/tree/main/packages/cli#readme",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@cloudcommerce/api": "0.0.
|
|
26
|
+
"@cloudcommerce/api": "0.0.35",
|
|
27
27
|
"md5": "^2.3.0",
|
|
28
28
|
"zx": "^7.0.7"
|
|
29
29
|
},
|
package/src/index.ts
CHANGED
|
@@ -54,13 +54,23 @@ export default async () => {
|
|
|
54
54
|
}
|
|
55
55
|
return opts;
|
|
56
56
|
}, '');
|
|
57
|
-
const $firebase =
|
|
57
|
+
const $firebase = (cmd: string) => {
|
|
58
58
|
return $`firebase --project=${projectId} ${cmd}${options}`;
|
|
59
59
|
};
|
|
60
60
|
|
|
61
61
|
if (argv._.includes('serve')) {
|
|
62
|
-
return $firebase('emulators:start')
|
|
62
|
+
return $firebase('emulators:start').catch(async (err: any) => {
|
|
63
|
+
await echo`
|
|
64
|
+
Try killing open emulators with:
|
|
65
|
+
${chalk.bold('npx kill-port 4000 9099 5001 8080 5000 8085 9199 4400 4500')}
|
|
66
|
+
`;
|
|
67
|
+
if (err.stdout.includes('port taken')) {
|
|
68
|
+
return process.exit(1);
|
|
69
|
+
}
|
|
70
|
+
throw err;
|
|
71
|
+
});
|
|
63
72
|
}
|
|
73
|
+
|
|
64
74
|
if (argv._.find((cmd) => /^(\w+:)?(shell|start)$/.test(cmd))) {
|
|
65
75
|
return $firebase('functions:shell');
|
|
66
76
|
}
|
|
@@ -70,7 +80,6 @@ export default async () => {
|
|
|
70
80
|
if (argv._.includes('deploy')) {
|
|
71
81
|
return $firebase('deploy');
|
|
72
82
|
}
|
|
73
|
-
|
|
74
83
|
if (argv._.includes('login')) {
|
|
75
84
|
await $firebase('login');
|
|
76
85
|
return login();
|