@cloudcommerce/cli 0.0.29 → 0.0.32
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 +5 -2
- package/package.json +2 -2
- package/src/index.ts +8 -5
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
[
|
|
2
|
-
[
|
|
3
|
-
[
|
|
4
|
-
[
|
|
5
|
-
[
|
|
1
|
+
[34m@cloudcommerce/cli:build[0m: cache hit, replaying output [2maf1f136ccfb4103a[0m
|
|
2
|
+
[34m@cloudcommerce/cli:build: [0m
|
|
3
|
+
[34m@cloudcommerce/cli:build: [0m> @cloudcommerce/cli@0.0.31 build /home/leo/code/ecomplus/cloud-commerce/packages/cli
|
|
4
|
+
[34m@cloudcommerce/cli:build: [0m> sh ../../scripts/build-lib.sh
|
|
5
|
+
[34m@cloudcommerce/cli:build: [0m
|
package/lib/index.js
CHANGED
|
@@ -62,12 +62,15 @@ export default async () => {
|
|
|
62
62
|
}
|
|
63
63
|
if (argv._.includes('setup')) {
|
|
64
64
|
const { storeId, authenticationId, apiKey } = await login();
|
|
65
|
-
fs.writeFileSync(path.join(pwd, 'functions', '
|
|
66
|
-
|
|
65
|
+
fs.writeFileSync(path.join(pwd, 'functions', '.env'), `ECOM_AUTHENTICATION_ID=${authenticationId}
|
|
66
|
+
ECOM_API_KEY=${apiKey}
|
|
67
|
+
ECOM_STORE_ID=${storeId}
|
|
68
|
+
`);
|
|
67
69
|
if (argv.deploy !== false) {
|
|
68
70
|
await $firebase('deploy');
|
|
69
71
|
}
|
|
70
72
|
if (argv.commit !== false) {
|
|
73
|
+
fs.writeFileSync(path.join(pwd, 'functions', 'config.json'), JSON.stringify({ storeId }, null, 2));
|
|
71
74
|
try {
|
|
72
75
|
await $`git add .firebaserc functions/config.json`;
|
|
73
76
|
await $`git commit -m "Setup store [skip ci]"`;
|
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.32",
|
|
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.32",
|
|
27
27
|
"md5": "^2.3.0",
|
|
28
28
|
"zx": "^7.0.7"
|
|
29
29
|
},
|
package/src/index.ts
CHANGED
|
@@ -78,18 +78,21 @@ export default async () => {
|
|
|
78
78
|
|
|
79
79
|
if (argv._.includes('setup')) {
|
|
80
80
|
const { storeId, authenticationId, apiKey } = await login();
|
|
81
|
-
fs.writeFileSync(
|
|
82
|
-
path.join(pwd, 'functions', 'config.json'),
|
|
83
|
-
JSON.stringify({ storeId }, null, 2),
|
|
84
|
-
);
|
|
85
81
|
fs.writeFileSync(
|
|
86
82
|
path.join(pwd, 'functions', '.env'),
|
|
87
|
-
`ECOM_AUTHENTICATION_ID=${authenticationId}
|
|
83
|
+
`ECOM_AUTHENTICATION_ID=${authenticationId}
|
|
84
|
+
ECOM_API_KEY=${apiKey}
|
|
85
|
+
ECOM_STORE_ID=${storeId}
|
|
86
|
+
`,
|
|
88
87
|
);
|
|
89
88
|
if (argv.deploy !== false) {
|
|
90
89
|
await $firebase('deploy');
|
|
91
90
|
}
|
|
92
91
|
if (argv.commit !== false) {
|
|
92
|
+
fs.writeFileSync(
|
|
93
|
+
path.join(pwd, 'functions', 'config.json'),
|
|
94
|
+
JSON.stringify({ storeId }, null, 2),
|
|
95
|
+
);
|
|
93
96
|
try {
|
|
94
97
|
await $`git add .firebaserc functions/config.json`;
|
|
95
98
|
await $`git commit -m "Setup store [skip ci]"`;
|