@ahqstore/cli 1.0.0-rc6 → 1.0.0-rc8

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.
Files changed (3) hide show
  1. package/install.js +2 -2
  2. package/package.json +6 -3
  3. package/src/cli.js +15 -4
package/install.js CHANGED
@@ -17,7 +17,7 @@ const success = chalk.green(chalk.bold("PASS:"));
17
17
  console.log(`${warn} Checking Operating System`);
18
18
  console.log(`${info} ${platform}`);
19
19
 
20
- if (platform === "win32" || platform === "linux") {
20
+ if (platform === "win32" || platform === "linux" || platform == "darwin") {
21
21
  console.log(`${success} OS Valid!`);
22
22
  } else {
23
23
  console.log(`${errr} OS Invalid!`);
@@ -30,7 +30,7 @@ const arch = process.arch;
30
30
  console.log(`${warn} Checking Architecture`);
31
31
  console.log(`${info} ${arch}`);
32
32
 
33
- if (arch == "x64") {
33
+ if (arch == "x64" || arch == "arm64") {
34
34
  console.log(`${success} Arch Validated`);
35
35
  } else {
36
36
  console.log(`${errr} Arch Invalid`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ahqstore/cli",
3
- "version": "1.0.0-rc6",
3
+ "version": "1.0.0-rc8",
4
4
  "description": "The AHQ Store CLI",
5
5
  "type": "module",
6
6
  "main": "./src/cli.js",
@@ -12,8 +12,11 @@
12
12
  "postinstall": "node install.js"
13
13
  },
14
14
  "dependencies": {
15
- "@ahqstore/cli-rs-linux": "1.0.0-rc2",
16
- "@ahqstore/cli-rs-win32": "1.0.0-rc2",
15
+ "@ahqstore/cli-rs-win32-x64": "1.0.0-rc10",
16
+ "@ahqstore/cli-rs-darwin-x64": "1.0.0-rc10",
17
+ "@ahqstore/cli-rs-darwin-arm64": "1.0.0-rc10",
18
+ "@ahqstore/cli-rs-linux-x64": "1.0.0-rc10",
19
+ "@ahqstore/cli-rs-linux-arm64": "1.0.0-rc10",
17
20
  "chalk": "^5.3.0"
18
21
  },
19
22
  "keywords": [
package/src/cli.js CHANGED
@@ -1,11 +1,22 @@
1
1
  #! /usr/bin/env node
2
+ import { Chalk } from "chalk";
3
+
2
4
  const platform = process.platform;
5
+ const arch = process.platform;
3
6
  const args = process.argv.slice(2) || [];
4
7
 
5
8
  (async () => {
6
- if (platform == "win32") {
7
- (await import("@ahqstore/cli-rs-win32")).nodeEntrypoint(args);
8
- } else {
9
- (await import("@ahqstore/cli-rs-linux")).nodeEntrypoint(args);
9
+ try {
10
+ (await import(`@ahqstore/cli-rs-${platform}-${arch}`)).nodeEntrypoint(args);
11
+ } catch (e) {
12
+ const chalk = new Chalk();
13
+ console.log(chalk.red(e));
14
+ console.log(
15
+ chalk.red(
16
+ chalk.bold(
17
+ "Error running cli, consider using cargo version\ncargo install ahqstore_cli_rs"
18
+ )
19
+ )
20
+ );
10
21
  }
11
22
  })();