@zuplo/cli 6.73.21 → 6.73.22
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/node_modules/@fastify/forwarded/LICENSE +1 -3
- package/node_modules/@fastify/forwarded/index.js +1 -1
- package/node_modules/@fastify/forwarded/package.json +6 -6
- package/node_modules/@zuplo/core/customer.cli.minified.js +1 -1
- package/node_modules/@zuplo/core/index.minified.js +1 -1
- package/node_modules/@zuplo/core/package.json +1 -1
- package/node_modules/@zuplo/graphql/package.json +1 -1
- package/node_modules/@zuplo/openapi-tools/package.json +1 -1
- package/node_modules/@zuplo/otel/package.json +1 -1
- package/node_modules/@zuplo/runtime/out/esm/{chunk-DBFG5V2I.js → chunk-6QCPRMBS.js} +77 -77
- package/node_modules/@zuplo/runtime/out/esm/chunk-6QCPRMBS.js.map +1 -0
- package/node_modules/@zuplo/runtime/out/esm/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/types/index.d.ts +73 -46
- package/node_modules/@zuplo/runtime/package.json +1 -1
- package/package.json +6 -6
- package/node_modules/@zuplo/runtime/out/esm/chunk-DBFG5V2I.js.map +0 -1
- /package/node_modules/@zuplo/runtime/out/esm/{chunk-DBFG5V2I.js.LEGAL.txt → chunk-6QCPRMBS.js.LEGAL.txt} +0 -0
|
@@ -15687,65 +15687,92 @@ declare interface WebSearchTool {
|
|
|
15687
15687
|
}
|
|
15688
15688
|
|
|
15689
15689
|
/**
|
|
15690
|
-
*
|
|
15691
|
-
* Enables WebSocket support in your API gateway for real-time communication.
|
|
15690
|
+
* Proxies WebSocket connections to an upstream URL.
|
|
15692
15691
|
*
|
|
15693
|
-
* @
|
|
15694
|
-
*
|
|
15695
|
-
*
|
|
15692
|
+
* @deprecated Use {@link webSocketPipelineHandler} instead. `webSocketHandler`
|
|
15693
|
+
* is retained as a backwards-compatible alias and resolves to the exact same
|
|
15694
|
+
* handler — with no inbound/outbound message policies configured it is a
|
|
15695
|
+
* transparent passthrough, so existing routes keep working unchanged. Because
|
|
15696
|
+
* it is the same function, routes using this name report
|
|
15697
|
+
* `zuplo.handler.type = "websocket-pipeline"`.
|
|
15698
|
+
* @public
|
|
15699
|
+
*/
|
|
15700
|
+
export declare const webSocketHandler: typeof webSocketPipelineHandler;
|
|
15701
|
+
|
|
15702
|
+
/**
|
|
15703
|
+
* A WebSocket connection-level hook, invoked once when the connection opens.
|
|
15696
15704
|
*
|
|
15697
|
-
* @
|
|
15698
|
-
*
|
|
15699
|
-
*
|
|
15700
|
-
*
|
|
15701
|
-
*
|
|
15702
|
-
*
|
|
15703
|
-
*
|
|
15704
|
-
*
|
|
15705
|
-
*
|
|
15706
|
-
*
|
|
15707
|
-
*
|
|
15708
|
-
*
|
|
15709
|
-
*
|
|
15710
|
-
*
|
|
15711
|
-
*
|
|
15712
|
-
*
|
|
15713
|
-
*
|
|
15714
|
-
*
|
|
15715
|
-
|
|
15716
|
-
|
|
15705
|
+
* Mirrors {@link WebSocketPolicyFunction} without the per-message `data`
|
|
15706
|
+
* argument. It runs after both the client and upstream legs are established and
|
|
15707
|
+
* before any frame is relayed. Throwing (or returning a rejected promise)
|
|
15708
|
+
* aborts the connection: both sockets are closed and no `101 Switching
|
|
15709
|
+
* Protocols` response is returned to the caller.
|
|
15710
|
+
*
|
|
15711
|
+
* @param target - The upstream socket (gateway to origin).
|
|
15712
|
+
* @param source - The client-facing socket (gateway to caller).
|
|
15713
|
+
* @param request - The {@link ZuploRequest} that initiated the upgrade.
|
|
15714
|
+
* @param context - The {@link ZuploContext}.
|
|
15715
|
+
*
|
|
15716
|
+
* @remarks
|
|
15717
|
+
* Configuring `onOpen` opts the connection out of the zero-overhead Cloudflare
|
|
15718
|
+
* passthrough splice: the worker stays in the data path so the hook has both
|
|
15719
|
+
* live sockets to act on. If you need connection-level `close`/`error`/`message`
|
|
15720
|
+
* handling, attach your own listeners to either socket from within the hook.
|
|
15721
|
+
*
|
|
15722
|
+
* @public
|
|
15723
|
+
*/
|
|
15724
|
+
export declare type WebSocketOnOpenHook = (
|
|
15725
|
+
target: WebSocket,
|
|
15726
|
+
source: WebSocket,
|
|
15727
|
+
request: ZuploRequest,
|
|
15728
|
+
context: ZuploContext
|
|
15729
|
+
) => void | Promise<void>;
|
|
15730
|
+
|
|
15731
|
+
/**
|
|
15732
|
+
* Handle WebSocket requests by proxying them to a different URL, optionally
|
|
15733
|
+
* running inbound/outbound message policies and/or a connection-level `onOpen`
|
|
15734
|
+
* hook.
|
|
15735
|
+
*
|
|
15736
|
+
* When no intercept policies are configured the handler behaves like the plain
|
|
15737
|
+
* `webSocketHandler`: messages are forwarded verbatim and, on Cloudflare,
|
|
15738
|
+
* the upstream socket is spliced directly to the client so the worker stays out
|
|
15739
|
+
* of the per-message data path. The worker only sits in the message path (and
|
|
15740
|
+
* policies are only wired up) when at least one inbound or outbound policy is
|
|
15741
|
+
* configured.
|
|
15742
|
+
*
|
|
15743
|
+
* The optional `onOpen` hook (see {@link WebSocketOnOpenHook}) runs once after
|
|
15744
|
+
* both legs are established and before any frame is relayed. Because it needs
|
|
15745
|
+
* both live sockets, configuring it keeps the worker in the data path (the
|
|
15746
|
+
* Cloudflare splice is skipped). Throwing from the hook aborts the connection.
|
|
15717
15747
|
*
|
|
15718
15748
|
* @example
|
|
15749
|
+
* A route that runs an `onOpen` hook and an inbound message policy. `onOpen`
|
|
15750
|
+
* is declared at the `options` level, a sibling of `policies`:
|
|
15719
15751
|
* ```json
|
|
15720
|
-
* // Dynamic WebSocket routing based on path parameters
|
|
15721
15752
|
* {
|
|
15722
|
-
* "
|
|
15723
|
-
* "
|
|
15724
|
-
*
|
|
15725
|
-
*
|
|
15726
|
-
*
|
|
15727
|
-
*
|
|
15728
|
-
*
|
|
15729
|
-
*
|
|
15730
|
-
*
|
|
15731
|
-
*
|
|
15753
|
+
* "handler": {
|
|
15754
|
+
* "export": "webSocketPipelineHandler",
|
|
15755
|
+
* "module": "$import(@zuplo/runtime)",
|
|
15756
|
+
* "options": {
|
|
15757
|
+
* "rewritePattern": "https://example.com/socket",
|
|
15758
|
+
* "onOpen": {
|
|
15759
|
+
* "export": "onWebSocketOpen",
|
|
15760
|
+
* "module": "$import(./modules/ws-onopen)"
|
|
15761
|
+
* },
|
|
15762
|
+
* "policies": {
|
|
15763
|
+
* "inbound": [
|
|
15764
|
+
* { "export": "authFrame", "module": "$import(./modules/ws-auth)" }
|
|
15765
|
+
* ]
|
|
15732
15766
|
* }
|
|
15733
15767
|
* }
|
|
15734
15768
|
* }
|
|
15735
15769
|
* }
|
|
15736
15770
|
* ```
|
|
15737
|
-
|
|
15738
|
-
export declare function webSocketHandler(
|
|
15739
|
-
request: ZuploRequest,
|
|
15740
|
-
context: ZuploContext
|
|
15741
|
-
): Promise<Response>;
|
|
15742
|
-
|
|
15743
|
-
/**
|
|
15744
|
-
* Handle websocket requests to a different url
|
|
15771
|
+
*
|
|
15745
15772
|
* @param request - The ZuploRequest
|
|
15746
15773
|
* @param context - The ZuploContext
|
|
15747
|
-
* @returns
|
|
15748
|
-
* @
|
|
15774
|
+
* @returns A WebSocket upgrade Response (101 Switching Protocols)
|
|
15775
|
+
* @public
|
|
15749
15776
|
*/
|
|
15750
15777
|
export declare function webSocketPipelineHandler(
|
|
15751
15778
|
request: ZuploRequest,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zuplo/cli",
|
|
3
|
-
"version": "6.73.
|
|
3
|
+
"version": "6.73.22",
|
|
4
4
|
"repository": "https://github.com/zuplo/zuplo",
|
|
5
5
|
"author": "Zuplo, Inc.",
|
|
6
6
|
"type": "module",
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
"@opentelemetry/api": "1.9.0",
|
|
28
28
|
"@opentelemetry/api-logs": "0.220.0",
|
|
29
29
|
"@swc/core": "1.10.18",
|
|
30
|
-
"@zuplo/core": "6.73.
|
|
30
|
+
"@zuplo/core": "6.73.22",
|
|
31
31
|
"@zuplo/editor": "1.0.29844086763",
|
|
32
|
-
"@zuplo/openapi-tools": "6.73.
|
|
33
|
-
"@zuplo/runtime": "6.73.
|
|
32
|
+
"@zuplo/openapi-tools": "6.73.22",
|
|
33
|
+
"@zuplo/runtime": "6.73.22",
|
|
34
34
|
"chalk": "5.4.1",
|
|
35
35
|
"chokidar": "3.5.3",
|
|
36
36
|
"cookie": "1.0.2",
|
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
"workerd": "1.20241230.0",
|
|
62
62
|
"yargs": "17.7.2",
|
|
63
63
|
"zod": "3.25.76",
|
|
64
|
-
"@zuplo/graphql": "6.73.
|
|
65
|
-
"@zuplo/otel": "6.73.
|
|
64
|
+
"@zuplo/graphql": "6.73.22",
|
|
65
|
+
"@zuplo/otel": "6.73.22"
|
|
66
66
|
},
|
|
67
67
|
"bundleDependencies": [
|
|
68
68
|
"@inquirer/prompts",
|