@cloudcommerce/cli 0.0.28 → 0.0.31

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.
@@ -1,5 +1,5 @@
1
- @cloudcommerce/cli:build: cache hit, replaying output bbbdc859e666e28e
2
- @cloudcommerce/cli:build: 
3
- @cloudcommerce/cli:build: > @cloudcommerce/cli@0.0.27 build /home/leo/code/ecomplus/cloud-commerce/packages/cli
4
- @cloudcommerce/cli:build: > sh ../../scripts/build-lib.sh
5
- @cloudcommerce/cli:build: 
1
+ @cloudcommerce/cli:build: cache hit, replaying output 8f70f09f3bff3ef2
2
+ @cloudcommerce/cli:build: 
3
+ @cloudcommerce/cli:build: > @cloudcommerce/cli@0.0.30 build /home/leo/code/ecomplus/cloud-commerce/packages/cli
4
+ @cloudcommerce/cli:build: > sh ../../scripts/build-lib.sh
5
+ @cloudcommerce/cli:build: 
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', 'config.json'), JSON.stringify({ storeId }, null, 2));
66
- fs.writeFileSync(path.join(pwd, 'functions', '.env'), `ECOM_AUTHENTICATION_ID=${authenticationId}\nECOM_API_KEY=${apiKey}\n`);
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.28",
4
+ "version": "0.0.31",
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.27",
26
+ "@cloudcommerce/api": "0.0.31",
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}\nECOM_API_KEY=${apiKey}\n`,
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]"`;