@ahqstore/cli 0.6.0 → 0.10.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,42 +0,0 @@
1
- use serde::{Deserialize, Serialize};
2
-
3
- #[derive(Debug, Serialize, Deserialize, Default)]
4
- #[allow(non_snake_case)]
5
- pub struct FileFinder<'a> {
6
- #[serde(borrow)]
7
- pub windowsAmd64Finder: Option<Finder<'a>>,
8
- #[serde(borrow)]
9
- pub windowsArm64Finder: Option<Finder<'a>>,
10
- #[serde(borrow)]
11
- pub linuxAmd64Finder: Option<Finder<'a>>,
12
- #[serde(borrow)]
13
- pub linuxArm64Finder: Option<Finder<'a>>,
14
- #[serde(borrow)]
15
- pub linuxArm32Finder: Option<Finder<'a>>,
16
- #[serde(borrow)]
17
- pub androidUniversalFinder: Option<Finder<'a>>,
18
- }
19
-
20
- #[derive(Debug, Serialize, Deserialize, Default)]
21
- #[allow(non_snake_case)]
22
- pub struct Finder<'a> {
23
- #[serde(borrow)]
24
- pub startsWith: Option<&'a str>,
25
- #[serde(borrow)]
26
- pub contains: Option<&'a str>,
27
- #[serde(borrow)]
28
- pub endsWith: Option<&'a str>,
29
- }
30
-
31
- impl<'a> FileFinder<'a> {
32
- pub fn new() -> Self {
33
- Self {
34
- windowsAmd64Finder: Some(Finder {
35
- startsWith: Some("This-is"),
36
- contains: Some("an"),
37
- endsWith: Some(".example"),
38
- }),
39
- ..Default::default()
40
- }
41
- }
42
- }
@@ -1,66 +0,0 @@
1
- use serde::{Deserialize, Serialize};
2
- use std::collections::HashMap;
3
-
4
- use ahqstore_types::AppRepo;
5
-
6
- pub type Str = String;
7
- pub type Config<'a> = HashMap<String, IMetadata<'a>>;
8
-
9
- mod file_sorter;
10
- mod platforms;
11
- pub use file_sorter::*;
12
- pub use platforms::*;
13
-
14
- #[derive(Debug, Serialize, Deserialize)]
15
- #[allow(non_snake_case)]
16
- pub struct IMetadata<'a> {
17
- pub appId: Str,
18
- pub appShortcutName: Str,
19
- pub appDisplayName: Str,
20
- pub authorId: Str,
21
- pub description: Str,
22
- pub repo: AppRepo,
23
- #[serde[borrow]]
24
- pub platform: IPlatform<'a>,
25
- #[serde[borrow]]
26
- pub finder: FileFinder<'a>,
27
- pub site: Option<Str>,
28
- pub source: Option<Str>,
29
- pub redistributed: Option<Str>,
30
- pub license_or_tos: Option<Str>,
31
- }
32
-
33
- impl<'a> IMetadata<'a> {
34
- #[allow(non_snake_case)]
35
- pub fn new(
36
- appId: Str,
37
- appShortcutName: Str,
38
- appDisplayName: Str,
39
- authorId: Str,
40
- description: Str,
41
- repo: AppRepo,
42
- platform: IPlatform<'a>,
43
- ) -> Config {
44
- let mut config = Config::new();
45
-
46
- config.insert(
47
- appId.clone(),
48
- Self {
49
- appId,
50
- appShortcutName,
51
- appDisplayName,
52
- authorId,
53
- description,
54
- repo,
55
- platform,
56
- finder: FileFinder::new(),
57
- site: None,
58
- source: None,
59
- redistributed: None,
60
- license_or_tos: None
61
- },
62
- );
63
-
64
- config
65
- }
66
- }
@@ -1,45 +0,0 @@
1
- use ahqstore_types::InstallerFormat;
2
- use serde::{Deserialize, Serialize};
3
-
4
- #[derive(Debug, Serialize, Deserialize)]
5
- #[allow(non_snake_case)]
6
- pub struct IPlatform<'a> {
7
- pub winAmd64Platform: Option<InstallerFormat>,
8
- pub winArm64Platform: Option<InstallerFormat>,
9
- pub linuxAmd64Platform: Option<InstallerFormat>,
10
- pub linuxArm64Platform: Option<InstallerFormat>,
11
- pub linuxArm32Platform: Option<InstallerFormat>,
12
- pub androidUniversal: Option<InstallerFormat>,
13
- #[serde(borrow)]
14
- pub winAmd64Options: Option<IOWin<'a>>,
15
- #[serde(borrow)]
16
- pub winArm64Options: Option<IOWin<'a>>,
17
- }
18
-
19
- #[derive(Debug, Serialize, Deserialize, Clone)]
20
- pub struct IOWin<'a> {
21
- #[serde(borrow)]
22
- pub zip_file_exec: Option<&'a str>,
23
- #[serde(borrow)]
24
- pub exe_installer_args: Option<Vec<&'a str>>,
25
- }
26
-
27
- impl<'a> IPlatform<'a> {
28
- pub fn new() -> Self {
29
- let io_win = IOWin {
30
- exe_installer_args: Some(vec![]),
31
- zip_file_exec: None,
32
- };
33
-
34
- Self {
35
- winAmd64Platform: None,
36
- winArm64Platform: None,
37
- linuxAmd64Platform: None,
38
- linuxArm32Platform: None,
39
- linuxArm64Platform: None,
40
- androidUniversal: None,
41
- winAmd64Options: Some(io_win.clone()),
42
- winArm64Options: Some(io_win)
43
- }
44
- }
45
- }
package/src/lib.rs DELETED
@@ -1,12 +0,0 @@
1
- mod app;
2
-
3
- pub use app::shared;
4
-
5
- #[cfg(feature = "node")]
6
- #[macro_use]
7
- extern crate napi_derive;
8
-
9
- #[cfg_attr(feature = "node", napi)]
10
- pub fn node_entrypoint(args: Vec<String>, gh: bool) {
11
- app::start(args, gh);
12
- }
package/src/main.rs DELETED
@@ -1,10 +0,0 @@
1
- use std::env::args;
2
-
3
- mod app;
4
-
5
- fn main() {
6
- let mut arg = args().collect::<Vec<String>>();
7
- arg.remove(0);
8
-
9
- app::start(arg, std::env::var("GH_ACTION").is_ok());
10
- }