@ezetgalaxy/titan 25.16.0 → 26.0.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.
package/README.md CHANGED
@@ -1,19 +1,17 @@
1
1
 
2
2
  ```
3
- ████████╗██╗████████╗ █████╗ ███╗ ██╗
4
- ╚══██╔══╝██║╚══██╔══╝██╔══██╗████╗ ██║
5
- ██║ ██║ ██║ ███████║██╔██╗ ██║
6
- ██║ ██║ ██║ ██╔══██║██║╚██╗██║
7
- ██║ ██║ ██║ ██║ ██║██║ ╚████║
8
- ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═══╝
3
+ ████████╗██╗████████╗ █████╗ ███╗ ██╗ ██████╗ ██████╗ ██████╗ ██████╗
4
+ ╚══██╔══╝██║╚══██╔══╝██╔══██╗████╗ ██║ ╚════██╗██╔═████╗╚════██╗██╔════╝
5
+ ██║ ██║ ██║ ███████║██╔██╗ ██║ █████╔╝██║██╔██║ █████╔╝███████╗
6
+ ██║ ██║ ██║ ██╔══██║██║╚██╗██║ ██╔═══╝ ████╔╝██║██╔═══╝ ██═══██║
7
+ ██║ ██║ ██║ ██║ ██║██║ ╚████║ ███████╗╚██████╔╝███████╗███████║
8
+ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═══╝ ╚══════╝ ╚═════╝ ╚══════╝╚══════╝
9
9
  ```
10
10
 
11
11
  # Notice
12
12
 
13
- ✅ **Production mode is ready**
14
13
  💙 **Enjoy development mode `titan dev`**
15
- **No more `globalThis` required**
16
- 💟 **Website for titan docs: https://titan-docs-ez.vercel.app/docs**
14
+ 💟 **Titan Planet docs: https://titan-docs-ez.vercel.app/docs**
17
15
  🚀 **CLI: `titan` is now the canonical command. `tit` remains supported as an alias.**
18
16
 
19
17
  ---
@@ -22,7 +20,7 @@
22
20
 
23
21
  **JavaScript Simplicity. Rust Power. Zero Configuration.**
24
22
 
25
- Titan Planet is a JavaScript-first backend framework that compiles your JavaScript routes and actions into a **native Rust + Axum server**.
23
+ Titan Planet is a JavaScript-first backend framework that embeds JS actions into a Rust + Axum server and ships as a single native binary. Routes are compiled to static metadata; only actions run in the embedded JS runtime. No Node.js. No event loop in production.
26
24
 
27
25
  You write **zero Rust**.
28
26
  Titan ships a full backend engine, dev server, bundler, router, action runtime, and Docker deploy pipeline — all powered by Rust under the hood.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ezetgalaxy/titan",
3
- "version": "25.16.0",
4
- "description": "JavaScript backend framework that compiles your JS into a Rust + Axum server.",
3
+ "version": "26.0.0",
4
+ "description": "Titan Planet is a JavaScript-first backend framework that embeds JS actions into a Rust + Axum server and ships as a single native binary. Routes are compiled to static metadata; only actions run in the embedded JS runtime. No Node.js. No event loop in production.",
5
5
  "license": "ISC",
6
6
  "author": "ezetgalaxy",
7
7
  "type": "module",
@@ -229,10 +229,14 @@ fn inject_t_runtime(ctx: &mut Context, action_name: &str) {
229
229
  .unwrap_or("GET")
230
230
  .to_string();
231
231
 
232
- let body_opt = opts_json
233
- .get("body")
234
- .and_then(|v| v.as_str())
235
- .map(|s| s.to_string());
232
+ let body_opt = opts_json.get("body").map(|v| {
233
+ if v.is_string() {
234
+ v.as_str().unwrap().to_string()
235
+ } else {
236
+ serde_json::to_string(v).unwrap_or_default()
237
+ }
238
+ });
239
+
236
240
 
237
241
  let mut header_pairs = Vec::new();
238
242
  if let Some(Value::Object(map)) = opts_json.get("headers") {
@@ -247,7 +251,12 @@ fn inject_t_runtime(ctx: &mut Context, action_name: &str) {
247
251
  // 3. Blocking HTTP (safe fallback)
248
252
  // -----------------------------
249
253
  let out_json = task::block_in_place(move || {
250
- let client = Client::new();
254
+ let client = Client::builder()
255
+ .use_rustls_tls()
256
+ .tcp_nodelay(true)
257
+ .build()
258
+ .unwrap();
259
+
251
260
 
252
261
  let mut req = client.request(method.parse().unwrap_or(reqwest::Method::GET), &url);
253
262