@cloudcommerce/cli 0.24.1 → 0.25.0

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,4 +1,4 @@
1
1
 
2
- > @cloudcommerce/cli@0.24.0 build /home/leo/code/ecomplus/cloud-commerce/packages/cli
2
+ > @cloudcommerce/cli@0.24.1 build /home/leo/code/ecomplus/cloud-commerce/packages/cli
3
3
  > bash ../../scripts/build-lib.sh
4
4
 
package/lib/cli.js CHANGED
@@ -147,7 +147,11 @@ Finish by saving the following secrets to your GitHub repository:
147
147
  }
148
148
  if (argv._.includes('dev') || !argv._.length) {
149
149
  await prepareCodebases(true);
150
- return $`npm --prefix "${path.join(pwd, 'functions/ssr')}" run dev`;
150
+ const prefix = path.join(pwd, 'functions/ssr');
151
+ // https://docs.astro.build/en/reference/cli-reference/#astro-dev
152
+ const host = typeof argv.host === 'string' ? argv.host : '';
153
+ const port = typeof argv.port === 'string' || typeof argv.port === 'number' ? argv.port : '';
154
+ return $`npm --prefix "${prefix}" run dev -- --host ${host} --port ${port}`;
151
155
  }
152
156
  return $`echo 'Hello from @cloudcommerce/cli'`;
153
157
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/cli",
3
3
  "type": "module",
4
- "version": "0.24.1",
4
+ "version": "0.25.0",
5
5
  "description": "E-Com Plus Cloud Commerce CLI tools",
6
6
  "bin": {
7
7
  "cloudcommerce": "./bin/run.mjs"
@@ -26,7 +26,7 @@
26
26
  "libsodium-wrappers": "^0.7.11",
27
27
  "md5": "^2.3.0",
28
28
  "zx": "^7.2.3",
29
- "@cloudcommerce/api": "0.24.1"
29
+ "@cloudcommerce/api": "0.25.0"
30
30
  },
31
31
  "scripts": {
32
32
  "build": "bash ../../scripts/build-lib.sh"
package/src/cli.ts CHANGED
@@ -180,7 +180,11 @@ Finish by saving the following secrets to your GitHub repository:
180
180
 
181
181
  if (argv._.includes('dev') || !argv._.length) {
182
182
  await prepareCodebases(true);
183
- return $`npm --prefix "${path.join(pwd, 'functions/ssr')}" run dev`;
183
+ const prefix = path.join(pwd, 'functions/ssr');
184
+ // https://docs.astro.build/en/reference/cli-reference/#astro-dev
185
+ const host = typeof argv.host === 'string' ? argv.host : '';
186
+ const port = typeof argv.port === 'string' || typeof argv.port === 'number' ? argv.port : '';
187
+ return $`npm --prefix "${prefix}" run dev -- --host ${host} --port ${port}`;
184
188
  }
185
189
  return $`echo 'Hello from @cloudcommerce/cli'`;
186
190
  };