@concavejs/runtime-node 0.0.1-alpha.4
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.
Potentially problematic release.
This version of @concavejs/runtime-node might be problematic. Click here for more details.
- package/README.md +85 -0
- package/dist/factory.d.ts +54 -0
- package/dist/factory.js +47381 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +49169 -0
- package/dist/module-loader/fs-module-loader.d.ts +15 -0
- package/dist/server/dev.d.ts +7 -0
- package/dist/server/http-handler.d.ts +12 -0
- package/dist/server/index.d.ts +88 -0
- package/dist/server/index.js +47366 -0
- package/dist/server/sync-handler.d.ts +17 -0
- package/package.json +46 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WebSocket Sync Handler for Node.js
|
|
3
|
+
*
|
|
4
|
+
* Composes shared sync primitives with ws WebSocket
|
|
5
|
+
*/
|
|
6
|
+
import { WebSocket } from "ws";
|
|
7
|
+
import type { UdfExec } from "@concavejs/core/udf";
|
|
8
|
+
import type { UdfExecutionAdapter } from "@concavejs/core/udf/execution-adapter";
|
|
9
|
+
import { SyncHandlerBase } from "@concavejs/runtime-base/sync";
|
|
10
|
+
export declare class NodeSyncHandler extends SyncHandlerBase<WebSocket> {
|
|
11
|
+
constructor(udfExecutor: UdfExec, adapter?: UdfExecutionAdapter, isDev?: boolean);
|
|
12
|
+
protected getSessionIdPrefix(): string;
|
|
13
|
+
protected isWebSocketOpen(ws: WebSocket): boolean;
|
|
14
|
+
protected sendToWebSocket(ws: WebSocket, data: string): void;
|
|
15
|
+
protected closeWebSocket(ws: WebSocket, code: number, reason: string): void;
|
|
16
|
+
protected getWebSocketReadyState(ws: WebSocket): number;
|
|
17
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@concavejs/runtime-node",
|
|
3
|
+
"version": "0.0.1-alpha.4",
|
|
4
|
+
"license": "FSL-1.1-Apache-2.0",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"access": "public"
|
|
7
|
+
},
|
|
8
|
+
"type": "module",
|
|
9
|
+
"description": "Node.js runtime implementation for Concave",
|
|
10
|
+
"main": "./dist/index.js",
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"default": "./dist/index.js"
|
|
16
|
+
},
|
|
17
|
+
"./factory": {
|
|
18
|
+
"types": "./dist/factory.d.ts",
|
|
19
|
+
"default": "./dist/factory.js"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"scripts": {
|
|
23
|
+
"build": "rm -rf dist && bun build ./src/index.ts --outfile dist/index.js --target node --format esm && bun build ./src/factory.ts --outfile dist/factory.js --target node --format esm && bun build ./src/server/index.ts --outfile dist/server/index.js --target node --format esm && tsc -p tsconfig.json --emitDeclarationOnly --declaration --declarationMap false --outDir dist",
|
|
24
|
+
"dev": "node --experimental-sqlite --watch src/server/dev.ts",
|
|
25
|
+
"test": "bun run build && node --experimental-sqlite --test test/**/*.test.mjs"
|
|
26
|
+
},
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"@concavejs/core": "0.0.1-alpha.4",
|
|
29
|
+
"@concavejs/runtime-base": "0.0.1-alpha.4",
|
|
30
|
+
"@concavejs/docstore-node-sqlite": "0.0.1-alpha.4",
|
|
31
|
+
"@concavejs/blobstore-node-fs": "0.0.1-alpha.4",
|
|
32
|
+
"convex": "^1.27.3",
|
|
33
|
+
"tsx": "^4.19.2",
|
|
34
|
+
"ws": "^8.18.0"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@types/node": "^24.9.1",
|
|
38
|
+
"@types/ws": "^8.5.13"
|
|
39
|
+
},
|
|
40
|
+
"engines": {
|
|
41
|
+
"node": ">=22.5.0"
|
|
42
|
+
},
|
|
43
|
+
"files": [
|
|
44
|
+
"dist"
|
|
45
|
+
]
|
|
46
|
+
}
|