@ionyx-apps/cli 0.2.1 → 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.
Files changed (37) hide show
  1. package/bin/ionyx.exe +0 -0
  2. package/ionyx-cli/Cargo.toml +40 -0
  3. package/ionyx-cli/src/commands/build.rs +53 -0
  4. package/ionyx-cli/src/commands/bundle.rs +349 -0
  5. package/ionyx-cli/src/commands/config.rs +36 -0
  6. package/ionyx-cli/src/commands/dev.rs +142 -0
  7. package/ionyx-cli/src/commands/doctor.rs +158 -0
  8. package/ionyx-cli/src/commands/info.rs +79 -0
  9. package/ionyx-cli/src/commands/init.rs +64 -0
  10. package/ionyx-cli/src/commands/mod.rs +9 -0
  11. package/ionyx-cli/src/commands/plugin.rs +34 -0
  12. package/ionyx-cli/src/commands/run.rs +54 -0
  13. package/ionyx-cli/src/config/mod.rs +155 -0
  14. package/ionyx-cli/src/main.rs +161 -0
  15. package/ionyx-cli/src/templates/basic/src-ionyx/Cargo.toml +26 -20
  16. package/ionyx-cli/src/templates/basic/src-ionyx/src/lib.rs +6 -0
  17. package/ionyx-cli/src/templates/basic/src-ionyx/src/protocol.rs +5 -4
  18. package/ionyx-cli/src/templates/leptos/Cargo.toml +13 -13
  19. package/ionyx-cli/src/templates/leptos/src-ionyx/Cargo.toml +20 -20
  20. package/ionyx-cli/src/templates/leptos/src-ionyx/src/protocol.rs +5 -4
  21. package/ionyx-cli/src/templates/react/src-ionyx/Cargo.toml +26 -20
  22. package/ionyx-cli/src/templates/react/src-ionyx/src/lib.rs +6 -0
  23. package/ionyx-cli/src/templates/react/src-ionyx/src/protocol.rs +5 -4
  24. package/ionyx-cli/src/templates/src-ionyx/Cargo.toml +18 -18
  25. package/ionyx-cli/src/templates/svelte/src-ionyx/Cargo.toml +26 -20
  26. package/ionyx-cli/src/templates/svelte/src-ionyx/src/lib.rs +6 -0
  27. package/ionyx-cli/src/templates/svelte/src-ionyx/src/protocol.rs +5 -4
  28. package/ionyx-cli/src/templates/vanilla/src-ionyx/Cargo.toml +26 -20
  29. package/ionyx-cli/src/templates/vanilla/src-ionyx/src/lib.rs +6 -0
  30. package/ionyx-cli/src/templates/vanilla/src-ionyx/src/protocol.rs +5 -4
  31. package/ionyx-cli/src/templates/vue/src-ionyx/Cargo.toml +26 -20
  32. package/ionyx-cli/src/templates/vue/src-ionyx/src/lib.rs +6 -0
  33. package/ionyx-cli/src/templates/vue/src-ionyx/src/protocol.rs +5 -4
  34. package/package.json +12 -4
  35. package/bin/cargo-ionyx-win.exe +0 -0
  36. package/bin/cargo-ionyx.exe +0 -0
  37. package/ionyx-cli/src/templates/react/src-ionyx/Cargo.lock +0 -5536
@@ -0,0 +1,6 @@
1
+ //! Vue template library for Ionyx Framework
2
+
3
+ pub mod protocol;
4
+
5
+ // Re-export main protocol handler
6
+ pub use protocol::CustomProtocolHandler;
@@ -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.2.1",
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,12 +11,20 @@
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)",
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": [
18
- "bin/",
19
- "ionyx-cli/src/templates/",
19
+ "bin/index.js",
20
+ "bin/ionyx.js",
21
+ "bin/ionyx.exe",
22
+ "!bin/cargo-ionyx*",
23
+ "ionyx-cli/Cargo.toml",
24
+ "ionyx-cli/src/",
25
+ "!ionyx-cli/src/templates/**/target/**",
26
+ "!ionyx-cli/src/templates/**/node_modules/**",
27
+ "!ionyx-cli/src/templates/**/*.lock",
20
28
  "README.md",
21
29
  "LICENSE"
22
30
  ],
Binary file
Binary file