@ionyx-apps/cli 0.3.0 → 0.3.1

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.
package/bin/ionyx.exe CHANGED
Binary file
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "ionyx-cli"
3
- version = "0.1.0"
3
+ version = "0.3.1"
4
4
  edition = "2021"
5
5
  description = "Ionyx Framework CLI Tool"
6
6
  authors = ["Ionyx Team"]
@@ -1,26 +1,26 @@
1
- [package]
2
- name = "my-ionyx-app"
3
- version = "0.1.0"
4
- edition = "2021"
5
-
6
- [workspace]
7
-
8
- [lib]
9
- name = "my_ionyx_app"
10
- path = "src/lib.rs"
11
-
12
- [[bin]]
13
- name = "my-ionyx-app"
14
- path = "main.rs"
15
-
16
- [dependencies]
17
- ionyx = { path = "../../../../../../src-ionyx" }
18
- anyhow = "1.0"
19
- wry = "0.54"
20
- tao = "0.34"
21
-
22
- [profile.release]
23
- opt-level = 3
24
- lto = true
25
- codegen-units = 1
26
- panic = "abort"
1
+ [package]
2
+ name = "my-ionyx-app"
3
+ version = "0.3.1"
4
+ edition = "2021"
5
+
6
+ [workspace]
7
+
8
+ [lib]
9
+ name = "my_ionyx_app"
10
+ path = "src/lib.rs"
11
+
12
+ [[bin]]
13
+ name = "my-ionyx-app"
14
+ path = "main.rs"
15
+
16
+ [dependencies]
17
+ ionyx = { path = "../../../../../../src-ionyx" }
18
+ anyhow = "1.0"
19
+ wry = "0.54"
20
+ tao = "0.34"
21
+
22
+ [profile.release]
23
+ opt-level = 3
24
+ lto = true
25
+ codegen-units = 1
26
+ panic = "abort"
@@ -35,12 +35,12 @@ impl CustomProtocolHandler {
35
35
  }
36
36
 
37
37
  pub fn handle_request(&self, request: Request<Vec<u8>>) -> Response<Cow<'static, [u8]>> {
38
- let path = request.uri().path();
39
-
40
38
  // Debug modunda (npm run dev açıkken) bu handler'ın işi yok aslında,
41
39
  // WebView doğrudan localhost'a gitmeli. Ama bir şekilde buraya düşerse
42
40
  // 404 yerine temiz bir hata dönüyoruz.
43
- if cfg!(debug_assertions) {
41
+ #[cfg(debug_assertions)]
42
+ {
43
+ let _uri_path = request.uri().path();
44
44
  return Response::builder()
45
45
  .status(StatusCode::NOT_FOUND)
46
46
  .header("Content-Type", "text/plain")
@@ -51,7 +51,8 @@ impl CustomProtocolHandler {
51
51
  // Release modunda gömülü dosyaları işle
52
52
  #[cfg(not(debug_assertions))]
53
53
  {
54
- let clean_path = path.trim_start_matches('/');
54
+ let uri_path = request.uri().path();
55
+ let clean_path = uri_path.trim_start_matches('/');
55
56
  let file_path = if clean_path.is_empty() { "index.html" } else { clean_path };
56
57
 
57
58
  match EMBEDDED_ASSETS.get_file(file_path) {
@@ -1,14 +1,14 @@
1
- [package]
2
- name = "my-ionyx-app"
3
- version = "0.1.0"
4
- edition = "2021"
5
-
6
- [lib]
7
- crate-type = ["cdylib"]
8
-
9
- [dependencies]
10
- leptos = { version = "0.6", features = ["csr"] }
11
- wasm-bindgen = "0.2"
12
- console_log = "1.0"
13
- log = "0.4"
1
+ [package]
2
+ name = "my-ionyx-app"
3
+ version = "0.3.1"
4
+ edition = "2021"
5
+
6
+ [lib]
7
+ crate-type = ["cdylib"]
8
+
9
+ [dependencies]
10
+ leptos = { version = "0.6", features = ["csr"] }
11
+ wasm-bindgen = "0.2"
12
+ console_log = "1.0"
13
+ log = "0.4"
14
14
  console_error_panic_hook = "0.1"
@@ -1,20 +1,20 @@
1
- [package]
2
- name = "my-ionyx-app"
3
- version = "0.1.0"
4
- edition = "2021"
5
-
6
- [workspace]
7
-
8
- [[bin]]
9
- name = "my-ionyx-app"
10
- path = "main.rs"
11
-
12
- [dependencies]
13
- ionyx = { path = "../../../../../../src-ionyx" }
14
- anyhow = "1.0"
15
-
16
- [profile.release]
17
- opt-level = 3
18
- lto = true
19
- codegen-units = 1
20
- panic = "abort"
1
+ [package]
2
+ name = "my-ionyx-app"
3
+ version = "0.3.1"
4
+ edition = "2021"
5
+
6
+ [workspace]
7
+
8
+ [[bin]]
9
+ name = "my-ionyx-app"
10
+ path = "main.rs"
11
+
12
+ [dependencies]
13
+ ionyx = { path = "../../../../../../src-ionyx" }
14
+ anyhow = "1.0"
15
+
16
+ [profile.release]
17
+ opt-level = 3
18
+ lto = true
19
+ codegen-units = 1
20
+ panic = "abort"
@@ -35,12 +35,12 @@ impl CustomProtocolHandler {
35
35
  }
36
36
 
37
37
  pub fn handle_request(&self, request: Request<Vec<u8>>) -> Response<Cow<'static, [u8]>> {
38
- let path = request.uri().path();
39
-
40
38
  // Debug modunda (npm run dev açıkken) bu handler'ın işi yok aslında,
41
39
  // WebView doğrudan localhost'a gitmeli. Ama bir şekilde buraya düşerse
42
40
  // 404 yerine temiz bir hata dönüyoruz.
43
- if cfg!(debug_assertions) {
41
+ #[cfg(debug_assertions)]
42
+ {
43
+ let _uri_path = request.uri().path();
44
44
  return Response::builder()
45
45
  .status(StatusCode::NOT_FOUND)
46
46
  .header("Content-Type", "text/plain")
@@ -51,7 +51,8 @@ impl CustomProtocolHandler {
51
51
  // Release modunda gömülü dosyaları işle
52
52
  #[cfg(not(debug_assertions))]
53
53
  {
54
- let clean_path = path.trim_start_matches('/');
54
+ let uri_path = request.uri().path();
55
+ let clean_path = uri_path.trim_start_matches('/');
55
56
  let file_path = if clean_path.is_empty() { "index.html" } else { clean_path };
56
57
 
57
58
  match EMBEDDED_ASSETS.get_file(file_path) {
@@ -1,26 +1,26 @@
1
- [package]
2
- name = "my-ionyx-app"
3
- version = "0.1.0"
4
- edition = "2021"
5
-
6
- [workspace]
7
-
8
- [lib]
9
- name = "my_ionyx_app"
10
- path = "src/lib.rs"
11
-
12
- [[bin]]
13
- name = "my-ionyx-app"
14
- path = "main.rs"
15
-
16
- [dependencies]
17
- ionyx = { path = "../../../../../../src-ionyx" }
18
- anyhow = "1.0"
19
- wry = "0.54"
20
- tao = "0.34"
21
-
22
- [profile.release]
23
- opt-level = 3
24
- lto = true
25
- codegen-units = 1
26
- panic = "abort"
1
+ [package]
2
+ name = "my-ionyx-app"
3
+ version = "0.3.1"
4
+ edition = "2021"
5
+
6
+ [workspace]
7
+
8
+ [lib]
9
+ name = "my_ionyx_app"
10
+ path = "src/lib.rs"
11
+
12
+ [[bin]]
13
+ name = "my-ionyx-app"
14
+ path = "main.rs"
15
+
16
+ [dependencies]
17
+ ionyx = { path = "../../../../../../src-ionyx" }
18
+ anyhow = "1.0"
19
+ wry = "0.54"
20
+ tao = "0.34"
21
+
22
+ [profile.release]
23
+ opt-level = 3
24
+ lto = true
25
+ codegen-units = 1
26
+ panic = "abort"
@@ -35,12 +35,12 @@ impl CustomProtocolHandler {
35
35
  }
36
36
 
37
37
  pub fn handle_request(&self, request: Request<Vec<u8>>) -> Response<Cow<'static, [u8]>> {
38
- let path = request.uri().path();
39
-
40
38
  // Debug modunda (npm run dev açıkken) bu handler'ın işi yok aslında,
41
39
  // WebView doğrudan localhost'a gitmeli. Ama bir şekilde buraya düşerse
42
40
  // 404 yerine temiz bir hata dönüyoruz.
43
- if cfg!(debug_assertions) {
41
+ #[cfg(debug_assertions)]
42
+ {
43
+ let _uri_path = request.uri().path();
44
44
  return Response::builder()
45
45
  .status(StatusCode::NOT_FOUND)
46
46
  .header("Content-Type", "text/plain")
@@ -51,7 +51,8 @@ impl CustomProtocolHandler {
51
51
  // Release modunda gömülü dosyaları işle
52
52
  #[cfg(not(debug_assertions))]
53
53
  {
54
- let clean_path = path.trim_start_matches('/');
54
+ let uri_path = request.uri().path();
55
+ let clean_path = uri_path.trim_start_matches('/');
55
56
  let file_path = if clean_path.is_empty() { "index.html" } else { clean_path };
56
57
 
57
58
  match EMBEDDED_ASSETS.get_file(file_path) {
@@ -1,18 +1,18 @@
1
- [package]
2
- name = "my-ionyx-app"
3
- version = "0.1.0"
4
- edition = "2021"
5
-
6
- [[bin]]
7
- name = "my-ionyx-app"
8
- path = "main.rs"
9
-
10
- [dependencies]
11
- ionyx = "1.0.0"
12
- anyhow = "1.0"
13
-
14
- [profile.release]
15
- opt-level = 3
16
- lto = true
17
- codegen-units = 1
18
- panic = "abort"
1
+ [package]
2
+ name = "my-ionyx-app"
3
+ version = "0.3.1"
4
+ edition = "2021"
5
+
6
+ [[bin]]
7
+ name = "my-ionyx-app"
8
+ path = "main.rs"
9
+
10
+ [dependencies]
11
+ ionyx = "1.0.0"
12
+ anyhow = "1.0"
13
+
14
+ [profile.release]
15
+ opt-level = 3
16
+ lto = true
17
+ codegen-units = 1
18
+ panic = "abort"
@@ -1,26 +1,26 @@
1
- [package]
2
- name = "my-ionyx-app"
3
- version = "0.1.0"
4
- edition = "2021"
5
-
6
- [workspace]
7
-
8
- [lib]
9
- name = "my_ionyx_app"
10
- path = "src/lib.rs"
11
-
12
- [[bin]]
13
- name = "my-ionyx-app"
14
- path = "main.rs"
15
-
16
- [dependencies]
17
- ionyx = { path = "../../../../../../src-ionyx" }
18
- anyhow = "1.0"
19
- wry = "0.54"
20
- tao = "0.34"
21
-
22
- [profile.release]
23
- opt-level = 3
24
- lto = true
25
- codegen-units = 1
26
- panic = "abort"
1
+ [package]
2
+ name = "my-ionyx-app"
3
+ version = "0.3.1"
4
+ edition = "2021"
5
+
6
+ [workspace]
7
+
8
+ [lib]
9
+ name = "my_ionyx_app"
10
+ path = "src/lib.rs"
11
+
12
+ [[bin]]
13
+ name = "my-ionyx-app"
14
+ path = "main.rs"
15
+
16
+ [dependencies]
17
+ ionyx = { path = "../../../../../../src-ionyx" }
18
+ anyhow = "1.0"
19
+ wry = "0.54"
20
+ tao = "0.34"
21
+
22
+ [profile.release]
23
+ opt-level = 3
24
+ lto = true
25
+ codegen-units = 1
26
+ panic = "abort"
@@ -35,12 +35,12 @@ impl CustomProtocolHandler {
35
35
  }
36
36
 
37
37
  pub fn handle_request(&self, request: Request<Vec<u8>>) -> Response<Cow<'static, [u8]>> {
38
- let path = request.uri().path();
39
-
40
38
  // Debug modunda (npm run dev açıkken) bu handler'ın işi yok aslında,
41
39
  // WebView doğrudan localhost'a gitmeli. Ama bir şekilde buraya düşerse
42
40
  // 404 yerine temiz bir hata dönüyoruz.
43
- if cfg!(debug_assertions) {
41
+ #[cfg(debug_assertions)]
42
+ {
43
+ let _uri_path = request.uri().path();
44
44
  return Response::builder()
45
45
  .status(StatusCode::NOT_FOUND)
46
46
  .header("Content-Type", "text/plain")
@@ -51,7 +51,8 @@ impl CustomProtocolHandler {
51
51
  // Release modunda gömülü dosyaları işle
52
52
  #[cfg(not(debug_assertions))]
53
53
  {
54
- let clean_path = path.trim_start_matches('/');
54
+ let uri_path = request.uri().path();
55
+ let clean_path = uri_path.trim_start_matches('/');
55
56
  let file_path = if clean_path.is_empty() { "index.html" } else { clean_path };
56
57
 
57
58
  match EMBEDDED_ASSETS.get_file(file_path) {
@@ -1,26 +1,26 @@
1
- [package]
2
- name = "my-ionyx-app"
3
- version = "0.1.0"
4
- edition = "2021"
5
-
6
- [workspace]
7
-
8
- [lib]
9
- name = "my_ionyx_app"
10
- path = "src/lib.rs"
11
-
12
- [[bin]]
13
- name = "my-ionyx-app"
14
- path = "main.rs"
15
-
16
- [dependencies]
17
- ionyx = { path = "../../../../../../src-ionyx" }
18
- anyhow = "1.0"
19
- wry = "0.54"
20
- tao = "0.34"
21
-
22
- [profile.release]
23
- opt-level = 3
24
- lto = true
25
- codegen-units = 1
26
- panic = "abort"
1
+ [package]
2
+ name = "my-ionyx-app"
3
+ version = "0.3.1"
4
+ edition = "2021"
5
+
6
+ [workspace]
7
+
8
+ [lib]
9
+ name = "my_ionyx_app"
10
+ path = "src/lib.rs"
11
+
12
+ [[bin]]
13
+ name = "my-ionyx-app"
14
+ path = "main.rs"
15
+
16
+ [dependencies]
17
+ ionyx = { path = "../../../../../../src-ionyx" }
18
+ anyhow = "1.0"
19
+ wry = "0.54"
20
+ tao = "0.34"
21
+
22
+ [profile.release]
23
+ opt-level = 3
24
+ lto = true
25
+ codegen-units = 1
26
+ panic = "abort"
@@ -35,12 +35,12 @@ impl CustomProtocolHandler {
35
35
  }
36
36
 
37
37
  pub fn handle_request(&self, request: Request<Vec<u8>>) -> Response<Cow<'static, [u8]>> {
38
- let path = request.uri().path();
39
-
40
38
  // Debug modunda (npm run dev açıkken) bu handler'ın işi yok aslında,
41
39
  // WebView doğrudan localhost'a gitmeli. Ama bir şekilde buraya düşerse
42
40
  // 404 yerine temiz bir hata dönüyoruz.
43
- if cfg!(debug_assertions) {
41
+ #[cfg(debug_assertions)]
42
+ {
43
+ let _uri_path = request.uri().path();
44
44
  return Response::builder()
45
45
  .status(StatusCode::NOT_FOUND)
46
46
  .header("Content-Type", "text/plain")
@@ -51,7 +51,8 @@ impl CustomProtocolHandler {
51
51
  // Release modunda gömülü dosyaları işle
52
52
  #[cfg(not(debug_assertions))]
53
53
  {
54
- let clean_path = path.trim_start_matches('/');
54
+ let uri_path = request.uri().path();
55
+ let clean_path = uri_path.trim_start_matches('/');
55
56
  let file_path = if clean_path.is_empty() { "index.html" } else { clean_path };
56
57
 
57
58
  match EMBEDDED_ASSETS.get_file(file_path) {
@@ -1,26 +1,26 @@
1
- [package]
2
- name = "my-ionyx-app"
3
- version = "0.1.0"
4
- edition = "2021"
5
-
6
- [workspace]
7
-
8
- [lib]
9
- name = "my_ionyx_app"
10
- path = "src/lib.rs"
11
-
12
- [[bin]]
13
- name = "my-ionyx-app"
14
- path = "main.rs"
15
-
16
- [dependencies]
17
- ionyx = { path = "../../../../../../src-ionyx" }
18
- anyhow = "1.0"
19
- wry = "0.54"
20
- tao = "0.34"
21
-
22
- [profile.release]
23
- opt-level = 3
24
- lto = true
25
- codegen-units = 1
26
- panic = "abort"
1
+ [package]
2
+ name = "my-ionyx-app"
3
+ version = "0.3.1"
4
+ edition = "2021"
5
+
6
+ [workspace]
7
+
8
+ [lib]
9
+ name = "my_ionyx_app"
10
+ path = "src/lib.rs"
11
+
12
+ [[bin]]
13
+ name = "my-ionyx-app"
14
+ path = "main.rs"
15
+
16
+ [dependencies]
17
+ ionyx = { path = "../../../../../../src-ionyx" }
18
+ anyhow = "1.0"
19
+ wry = "0.54"
20
+ tao = "0.34"
21
+
22
+ [profile.release]
23
+ opt-level = 3
24
+ lto = true
25
+ codegen-units = 1
26
+ panic = "abort"
@@ -17,12 +17,12 @@ impl CustomProtocolHandler {
17
17
  }
18
18
 
19
19
  pub fn handle_request(&self, request: Request<Vec<u8>>) -> Response<Cow<'static, [u8]>> {
20
- let path = request.uri().path();
21
-
22
20
  // Debug modunda (npm run dev açıkken) bu handler'ın işi yok aslında,
23
21
  // WebView doğrudan localhost'a gitmeli. Ama bir şekilde buraya düşerse
24
22
  // 404 yerine temiz bir hata dönüyoruz.
25
- if cfg!(debug_assertions) {
23
+ #[cfg(debug_assertions)]
24
+ {
25
+ let _uri_path = request.uri().path();
26
26
  return Response::builder()
27
27
  .status(StatusCode::NOT_FOUND)
28
28
  .header("Content-Type", "text/plain")
@@ -33,7 +33,8 @@ impl CustomProtocolHandler {
33
33
  // Release modunda gömülü dosyaları işle
34
34
  #[cfg(not(debug_assertions))]
35
35
  {
36
- let clean_path = path.trim_start_matches('/');
36
+ let uri_path = request.uri().path();
37
+ let clean_path = uri_path.trim_start_matches('/');
37
38
  let file_path = if clean_path.is_empty() { "index.html" } else { clean_path };
38
39
 
39
40
  match EMBEDDED_ASSETS.get_file(file_path) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ionyx-apps/cli",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Ionyx Framework CLI - High-performance desktop apps with Rust and WebGPU",
5
5
  "main": "index.js",
6
6
  "type": "commonjs",
@@ -11,7 +11,8 @@
11
11
  "ionyx": "node bin/ionyx.js",
12
12
  "dev": "cd ionyx-cli && cargo run --bin ionyx",
13
13
  "build": "cd ionyx-cli && cargo build --release",
14
- "prepack": "npm run build && (copy ionyx-cli\\target\\release\\ionyx.exe bin\\ionyx.exe || cp ionyx-cli/target/release/ionyx bin/ionyx) && (upx --best --lzma bin\\ionyx.exe || echo 'UPX not available, skipping compression')",
14
+ "clean:templates": "node clean-templates.js",
15
+ "prepack": "npm run clean:templates && npm run build && (copy ionyx-cli\\target\\release\\ionyx.exe bin\\ionyx.exe || cp ionyx-cli/target/release/ionyx bin/ionyx) && (upx --best --lzma bin\\ionyx.exe || echo 'UPX not available, skipping compression')",
15
16
  "test": "node test-framework.js"
16
17
  },
17
18
  "files": [