@zap-js/client 0.0.5 → 0.0.7
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.
|
@@ -9,6 +9,7 @@ import { CodegenRunner } from './codegen-runner.js';
|
|
|
9
9
|
import { HotReloadServer } from './hot-reload.js';
|
|
10
10
|
import { RouteScannerRunner } from './route-scanner.js';
|
|
11
11
|
import { ProcessManager, IpcServer } from '../runtime/index.js';
|
|
12
|
+
import { initRpcClient } from '../runtime/rpc-client.js';
|
|
12
13
|
import { cliLogger } from '../cli/utils/logger.js';
|
|
13
14
|
// Register tsx loader for TypeScript imports
|
|
14
15
|
// This must be called before any dynamic imports of .ts files
|
|
@@ -299,6 +300,10 @@ export class DevServer extends EventEmitter {
|
|
|
299
300
|
this.ipcServer = new IpcServer(this.socketPath);
|
|
300
301
|
await this.ipcServer.start();
|
|
301
302
|
this.log('debug', `IPC server listening on ${this.socketPath}`);
|
|
303
|
+
// Initialize RPC client for bidirectional IPC communication
|
|
304
|
+
// This allows TypeScript route handlers to call Rust functions via rpc.call()
|
|
305
|
+
initRpcClient(this.socketPath + '.rpc');
|
|
306
|
+
this.log('debug', `RPC client initialized on ${this.socketPath}.rpc`);
|
|
302
307
|
// Load and register route handlers
|
|
303
308
|
const routes = await this.loadRouteHandlers(routeTree);
|
|
304
309
|
console.log(`[dev-server] Loaded ${routes.length} route configurations`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zap-js/client",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"description": "High-performance fullstack React framework - Client package",
|
|
5
5
|
"homepage": "https://github.com/saint0x/zapjs",
|
|
6
6
|
"repository": {
|
|
@@ -12,8 +12,12 @@
|
|
|
12
12
|
},
|
|
13
13
|
"type": "module",
|
|
14
14
|
"main": "./dist/runtime/index.js",
|
|
15
|
+
"types": "./index.d.ts",
|
|
15
16
|
"exports": {
|
|
16
|
-
".":
|
|
17
|
+
".": {
|
|
18
|
+
"types": "./index.d.ts",
|
|
19
|
+
"default": "./dist/runtime/index.js"
|
|
20
|
+
},
|
|
17
21
|
"./router": "./dist/router/index.js"
|
|
18
22
|
},
|
|
19
23
|
"bin": {
|