@claxedo/workspace-relay 0.5.0 → 0.5.2
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/LICENSE +21 -0
- package/README.md +82 -0
- package/dist/auth.d.ts +1 -0
- package/dist/cloudflare.d.ts +5 -0
- package/dist/cors-origins.d.ts +3 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +192 -55
- package/dist/main.d.ts +49 -0
- package/dist/main.mjs +40181 -173
- package/dist/server.d.ts +2 -1
- package/dist/worker-h2.d.ts +9 -0
- package/dist/worker.d.ts +2 -0
- package/package.json +19 -3
package/dist/server.d.ts
CHANGED
|
@@ -117,6 +117,7 @@ export type WorkspaceRelayRoutingOptions = {
|
|
|
117
117
|
fetch?: typeof fetch;
|
|
118
118
|
forwardTimeoutMs?: number;
|
|
119
119
|
directory?: WorkspaceRelayDirectory;
|
|
120
|
+
allowedOrigins?: string[];
|
|
120
121
|
};
|
|
121
122
|
export type WorkspaceRelayDrainOptions = {
|
|
122
123
|
/**
|
|
@@ -276,7 +277,7 @@ export declare function authorizeWorkspaceRelayRequest(options: WorkspaceRelayOp
|
|
|
276
277
|
response: Response;
|
|
277
278
|
code: string;
|
|
278
279
|
}>;
|
|
279
|
-
export declare function forwardWorkspaceRelayRequest(request: Request, target: WorkspaceRelayTarget, relayHostToken: string, path: string, requestFetch: typeof fetch, timeoutMs: number, trace?: WorkspaceRelayAuthorizeTrace): Promise<Response>;
|
|
280
|
+
export declare function forwardWorkspaceRelayRequest(request: Request, target: WorkspaceRelayTarget, relayHostToken: string, path: string, requestFetch: typeof fetch, timeoutMs: number, trace?: WorkspaceRelayAuthorizeTrace, originAllowed?: (origin: string) => boolean): Promise<Response>;
|
|
280
281
|
export type WorkspaceRelayApp = Hono & {
|
|
281
282
|
/**
|
|
282
283
|
* T16: clear the sampler's periodic flush timer. Tests must call this so
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { WorkspaceRelayRoom, type WorkspaceRelayWorkerEnv } from "./worker";
|
|
2
|
+
export { WorkspaceRelayRoom };
|
|
3
|
+
export type WorkspaceRelayH2WorkerEnv = WorkspaceRelayWorkerEnv & {
|
|
4
|
+
OPENER_COUNT?: string;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: {
|
|
7
|
+
fetch(request: Request, env: WorkspaceRelayH2WorkerEnv): Promise<Response>;
|
|
8
|
+
};
|
|
9
|
+
export default _default;
|
package/dist/worker.d.ts
CHANGED
|
@@ -15,9 +15,11 @@ export type WorkspaceRelayWorkerEnv = Record<string, unknown> & {
|
|
|
15
15
|
CLAXEDO_RELAY_AUDIT_ACCEPT_SAMPLE_RATE?: string;
|
|
16
16
|
CLAXEDO_RELAY_TUNNEL_CHANNEL_CAP?: string;
|
|
17
17
|
CLAXEDO_RELAY_TRACE_SAMPLE_RATE?: string;
|
|
18
|
+
CLAXEDO_RELAY_TRACE_FORCE_SECRET?: string;
|
|
18
19
|
CLAXEDO_RELAY_REVOCATION_CACHE_TTL_MS?: string;
|
|
19
20
|
CLAXEDO_RELAY_TARGET_CACHE_TTL_MS?: string;
|
|
20
21
|
CLAXEDO_APP_ORIGINS?: string;
|
|
22
|
+
CLAXEDO_RELAY_ALLOWED_ORIGINS?: string;
|
|
21
23
|
};
|
|
22
24
|
type ResolverClient = {
|
|
23
25
|
target(workspaceId: string, hostId: string): Promise<WorkspaceRelayTarget | undefined>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@claxedo/workspace-relay",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.2",
|
|
4
4
|
"type": "module",
|
|
5
|
+
"description": "Relay/tunnel server that routes authenticated traffic to workspace runtimes: JWT workspace tokens, header-stripping trust boundary, Bun and Cloudflare adapters",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/kyashrathore/Claxedo.git",
|
|
10
|
+
"directory": "packages/workspace-relay"
|
|
11
|
+
},
|
|
12
|
+
"keywords": [
|
|
13
|
+
"claxedo",
|
|
14
|
+
"relay",
|
|
15
|
+
"tunnel",
|
|
16
|
+
"workspaces"
|
|
17
|
+
],
|
|
5
18
|
"main": "./dist/index.mjs",
|
|
6
19
|
"types": "./dist/index.d.ts",
|
|
7
20
|
"exports": {
|
|
@@ -18,6 +31,7 @@
|
|
|
18
31
|
},
|
|
19
32
|
"files": [
|
|
20
33
|
"README.md",
|
|
34
|
+
"LICENSE",
|
|
21
35
|
"dist"
|
|
22
36
|
],
|
|
23
37
|
"publishConfig": {
|
|
@@ -32,7 +46,8 @@
|
|
|
32
46
|
"test": "bun test src"
|
|
33
47
|
},
|
|
34
48
|
"dependencies": {
|
|
35
|
-
"@claxedo/workspace-relay-protocol": "0.5.
|
|
49
|
+
"@claxedo/workspace-relay-protocol": "0.5.2",
|
|
50
|
+
"@sentry/bun": "10.64.0",
|
|
36
51
|
"hono": "4.10.7",
|
|
37
52
|
"jose": "6.0.11"
|
|
38
53
|
},
|
|
@@ -41,6 +56,7 @@
|
|
|
41
56
|
"@types/bun": "1.3.13",
|
|
42
57
|
"esbuild": "0.25.12",
|
|
43
58
|
"tsx": "4.22.3",
|
|
44
|
-
"typescript": "
|
|
59
|
+
"typescript": "catalog:",
|
|
60
|
+
"@daytona/sdk": "0.192.0"
|
|
45
61
|
}
|
|
46
62
|
}
|