@ahqstore/cli 0.2.6 → 0.3.4

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 (43) hide show
  1. package/Cargo.toml +48 -0
  2. package/README.md +0 -43
  3. package/build.rs +8 -0
  4. package/cli-rs/Cargo.toml +45 -0
  5. package/cli-rs/README.md +41 -0
  6. package/cli-rs/build.rs +4 -0
  7. package/cli-rs/finalize.js +25 -0
  8. package/cli-rs/rust-toolchain.toml +2 -0
  9. package/cli-rs/src/app/build/config.rs +54 -0
  10. package/cli-rs/src/app/build/icon.rs +48 -0
  11. package/cli-rs/src/app/build/mod.rs +217 -0
  12. package/cli-rs/src/app/build/release.rs +50 -0
  13. package/cli-rs/src/app/create/icon.png +0 -0
  14. package/cli-rs/src/app/create/inquire.rs +189 -0
  15. package/cli-rs/src/app/create/mod.rs +74 -0
  16. package/cli-rs/src/app/create/readme.md +71 -0
  17. package/cli-rs/src/app/help.rs +77 -0
  18. package/cli-rs/src/app/mod.rs +39 -0
  19. package/cli-rs/src/app/shared/file_sorter.rs +34 -0
  20. package/cli-rs/src/app/shared/mod.rs +62 -0
  21. package/cli-rs/src/app/shared/platforms.rs +69 -0
  22. package/cli-rs/src/lib.rs +13 -0
  23. package/cli-rs/src/main.rs +10 -0
  24. package/cli-rs/tslink.toml +2 -0
  25. package/index.js +259 -0
  26. package/package.json +45 -29
  27. package/src/app/build/config.rs +54 -0
  28. package/src/app/build/icon.rs +48 -0
  29. package/src/app/build/mod.rs +217 -0
  30. package/src/app/build/release.rs +50 -0
  31. package/src/app/create/icon.png +0 -0
  32. package/src/app/create/inquire.rs +189 -0
  33. package/src/app/create/mod.rs +74 -0
  34. package/src/app/create/readme.md +71 -0
  35. package/src/app/help.rs +77 -0
  36. package/src/app/mod.rs +39 -0
  37. package/src/app/shared/file_sorter.rs +34 -0
  38. package/src/app/shared/mod.rs +62 -0
  39. package/src/app/shared/platforms.rs +69 -0
  40. package/src/lib.rs +12 -0
  41. package/src/main.rs +10 -0
  42. package/install.js +0 -44
  43. package/src/cli.js +0 -24
package/install.js DELETED
@@ -1,44 +0,0 @@
1
- import { Chalk } from "chalk";
2
- const chalk = new Chalk();
3
-
4
- const platform = process.platform;
5
-
6
- const sep = "---------------------------------";
7
-
8
- console.log(sep);
9
- console.log(` AHQ Store CLI`);
10
- console.log(sep);
11
-
12
- const info = chalk.blue(chalk.bold("INFO:"));
13
- const warn = chalk.yellow(chalk.bold("WARN:"));
14
- const errr = chalk.red(chalk.bold("ERRR:"));
15
- const success = chalk.green(chalk.bold("PASS:"));
16
-
17
- console.log(`${warn} Checking Operating System`);
18
- console.log(`${info} ${platform}`);
19
-
20
- if (platform === "win32" || platform === "linux" || platform == "darwin") {
21
- console.log(`${success} OS Valid!`);
22
- } else {
23
- console.log(`${errr} OS Invalid!`);
24
- console.log("NOT OK");
25
- throw new Error(`Invalid Platform ${platform}`);
26
- }
27
-
28
- const arch = process.arch;
29
-
30
- console.log(`${warn} Checking Architecture`);
31
- console.log(`${info} ${arch}`);
32
-
33
- if (arch == "x64" || (platform != "win32" && arch == "arm64")) {
34
- console.log(`${success} Arch Validated`);
35
- } else {
36
- console.log(`${errr} Arch Invalid`);
37
- console.log("NOT OK");
38
- console.log("Install using CARGO\ncargo install ahqstore_cli_rs");
39
- throw new Error(`Invalid Architecture ${arch}`);
40
- }
41
-
42
- console.log(sep);
43
- console.log("Postinstall Script Successful");
44
- console.log(sep);
package/src/cli.js DELETED
@@ -1,24 +0,0 @@
1
- #! /usr/bin/env node
2
- import { Chalk } from "chalk";
3
-
4
- const { platform, arch } = process;
5
- const args = process.argv.slice(2) || [];
6
-
7
- (async () => {
8
- try {
9
- const pkg = await import(`@ahqstore/cli-rs-${platform}-${arch}`);
10
- console.log(pkg);
11
-
12
- pkg.nodeEntrypoint(args, process.env["GH_ACTION"] != null);
13
- } catch (e) {
14
- const chalk = new Chalk();
15
- console.log(chalk.red(e));
16
- console.log(
17
- chalk.red(
18
- chalk.bold(
19
- "Error running cli, consider using cargo version\ncargo install ahqstore_cli_rs"
20
- )
21
- )
22
- );
23
- }
24
- })();