@nice-code/action 0.7.0 → 0.9.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/build/ActionDevtoolsCore-B4s6aGvI.d.ts +79 -0
- package/build/ActionDevtoolsCore-BLeY_N-3.js +159 -0
- package/build/ActionDevtoolsCore-BLeY_N-3.js.map +1 -0
- package/build/ActionDevtoolsCore-Pg7ERO3L.d.ts +79 -0
- package/build/ActionDevtoolsCore-yfJ9tkvl.js +154 -0
- package/build/ActionDevtoolsCore-yfJ9tkvl.js.map +1 -0
- package/build/ActionPayload.types-BN-rXFBK.d.ts +2328 -0
- package/build/ActionPayload.types-D28ELKXC.d.ts +2328 -0
- package/build/RunningAction.types-C176rqHG.js +22 -0
- package/build/RunningAction.types-C176rqHG.js.map +1 -0
- package/build/RunningAction.types-DjCX1xp5.js +39 -0
- package/build/RunningAction.types-DjCX1xp5.js.map +1 -0
- package/build/devtools/browser/index.d.ts +17 -0
- package/build/devtools/browser/index.js +3775 -5814
- package/build/devtools/browser/index.js.map +1 -0
- package/build/devtools/server/index.d.ts +35 -0
- package/build/devtools/server/index.js +97 -255
- package/build/devtools/server/index.js.map +1 -0
- package/build/index.d.ts +2 -0
- package/build/index.js +3877 -3674
- package/build/index.js.map +1 -0
- package/build/react-query/index.d.ts +17 -0
- package/build/react-query/index.js +60 -60
- package/build/react-query/index.js.map +1 -0
- package/package.json +34 -29
- package/build/types/ActionDefinition/Action/Action.combined.types.d.ts +0 -37
- package/build/types/ActionDefinition/Action/ActionBase.d.ts +0 -14
- package/build/types/ActionDefinition/Action/ActionBase.types.d.ts +0 -24
- package/build/types/ActionDefinition/Action/Context/ActionContext.d.ts +0 -25
- package/build/types/ActionDefinition/Action/Context/ActionContext.types.d.ts +0 -35
- package/build/types/ActionDefinition/Action/Core/ActionCore.d.ts +0 -19
- package/build/types/ActionDefinition/Action/Core/ActionCore.types.d.ts +0 -10
- package/build/types/ActionDefinition/Action/Payload/ActionPayload.d.ts +0 -14
- package/build/types/ActionDefinition/Action/Payload/ActionPayload.types.d.ts +0 -110
- package/build/types/ActionDefinition/Action/Payload/ActionPayload_Progress.d.ts +0 -15
- package/build/types/ActionDefinition/Action/Payload/ActionPayload_Request.d.ts +0 -26
- package/build/types/ActionDefinition/Action/Payload/ActionPayload_Result.d.ts +0 -19
- package/build/types/ActionDefinition/Action/RunningAction.d.ts +0 -36
- package/build/types/ActionDefinition/Action/RunningAction.types.d.ts +0 -73
- package/build/types/ActionDefinition/Domain/ActionDomain.d.ts +0 -42
- package/build/types/ActionDefinition/Domain/ActionDomain.types.d.ts +0 -43
- package/build/types/ActionDefinition/Domain/ActionDomainBase.d.ts +0 -14
- package/build/types/ActionDefinition/Domain/ActionRootDomain.d.ts +0 -24
- package/build/types/ActionDefinition/Domain/helpers/createRootActionDomain.d.ts +0 -5
- package/build/types/ActionDefinition/Schema/ActionSchema.d.ts +0 -68
- package/build/types/ActionDefinition/Schema/ActionSchema.types.d.ts +0 -28
- package/build/types/ActionRuntime/ActionDomainManager.d.ts +0 -13
- package/build/types/ActionRuntime/ActionRuntime.d.ts +0 -56
- package/build/types/ActionRuntime/ActionRuntime.types.d.ts +0 -22
- package/build/types/ActionRuntime/ActionRuntimeManager.d.ts +0 -20
- package/build/types/ActionRuntime/Handler/ActionHandler.d.ts +0 -16
- package/build/types/ActionRuntime/Handler/ActionHandler.types.d.ts +0 -65
- package/build/types/ActionRuntime/Handler/ExternalClient/ActionExternalClientHandler.d.ts +0 -45
- package/build/types/ActionRuntime/Handler/ExternalClient/ActionExternalClientHandler.types.d.ts +0 -7
- package/build/types/ActionRuntime/Handler/ExternalClient/Transport/ConnectionTransportManager.d.ts +0 -16
- package/build/types/ActionRuntime/Handler/ExternalClient/Transport/Custom/CustomConnection.d.ts +0 -7
- package/build/types/ActionRuntime/Handler/ExternalClient/Transport/Custom/CustomTransport.d.ts +0 -43
- package/build/types/ActionRuntime/Handler/ExternalClient/Transport/Custom/TransportCustom.types.d.ts +0 -11
- package/build/types/ActionRuntime/Handler/ExternalClient/Transport/Http/HttpConnection.d.ts +0 -8
- package/build/types/ActionRuntime/Handler/ExternalClient/Transport/Http/HttpTransport.d.ts +0 -26
- package/build/types/ActionRuntime/Handler/ExternalClient/Transport/Http/TransportHttp.types.d.ts +0 -16
- package/build/types/ActionRuntime/Handler/ExternalClient/Transport/Transport.d.ts +0 -27
- package/build/types/ActionRuntime/Handler/ExternalClient/Transport/Transport.types.d.ts +0 -125
- package/build/types/ActionRuntime/Handler/ExternalClient/Transport/TransportConnection.d.ts +0 -27
- package/build/types/ActionRuntime/Handler/ExternalClient/Transport/WebSocket/TransportWebSocket.types.d.ts +0 -41
- package/build/types/ActionRuntime/Handler/ExternalClient/Transport/WebSocket/WebSocketConnection.d.ts +0 -33
- package/build/types/ActionRuntime/Handler/ExternalClient/Transport/WebSocket/WebSocketTransport.d.ts +0 -60
- package/build/types/ActionRuntime/Handler/ExternalClient/Transport/WebSocket/actionFrameCrypto.d.ts +0 -31
- package/build/types/ActionRuntime/Handler/ExternalClient/Transport/WebSocket/actionWireCodec.d.ts +0 -41
- package/build/types/ActionRuntime/Handler/ExternalClient/Transport/WebSocket/actionWsHandshake.d.ts +0 -187
- package/build/types/ActionRuntime/Handler/ExternalClient/Transport/WebSocket/createBinaryWsAdapter.d.ts +0 -20
- package/build/types/ActionRuntime/Handler/ExternalClient/Transport/WebSocket/createBinaryWsSessionFactory.d.ts +0 -31
- package/build/types/ActionRuntime/Handler/ExternalClient/Transport/WebSocket/secureWsChannel.d.ts +0 -63
- package/build/types/ActionRuntime/Handler/ExternalClient/Transport/WebSocket/ws_util.d.ts +0 -11
- package/build/types/ActionRuntime/Handler/ExternalClient/Transport/err_nice_transport.d.ts +0 -36
- package/build/types/ActionRuntime/Handler/ExternalClient/Transport/err_nice_transport_ws.d.ts +0 -18
- package/build/types/ActionRuntime/Handler/ExternalClient/Transport/helpers/addTransportStatusMetadata.d.ts +0 -2
- package/build/types/ActionRuntime/Handler/ExternalClient/Transport/helpers/createUnsetTransportResolvers.d.ts +0 -2
- package/build/types/ActionRuntime/Handler/ExternalClient/err_nice_external_client.d.ts +0 -5
- package/build/types/ActionRuntime/Handler/Local/ActionLocalHandler.d.ts +0 -55
- package/build/types/ActionRuntime/Handler/Local/ActionLocalHandler.types.d.ts +0 -7
- package/build/types/ActionRuntime/Handler/Server/ActionServerHandler.d.ts +0 -197
- package/build/types/ActionRuntime/Handler/Server/createSecureActionServer.d.ts +0 -71
- package/build/types/ActionRuntime/HandlerCallStack.d.ts +0 -3
- package/build/types/ActionRuntime/Routing/ActionRouter.d.ts +0 -55
- package/build/types/ActionRuntime/Routing/ActionRouter.types.d.ts +0 -20
- package/build/types/ActionRuntime/RuntimeCoordinate.d.ts +0 -58
- package/build/types/ActionRuntime/test/helpers/new_action_test_data.d.ts +0 -207
- package/build/types/ActionRuntime/utils/runtimeCoordinateToStringIds.d.ts +0 -2
- package/build/types/devtools/browser/NiceActionDevtools.d.ts +0 -14
- package/build/types/devtools/browser/components/ActionErrorDisplay.d.ts +0 -5
- package/build/types/devtools/browser/components/CallStackSection.d.ts +0 -8
- package/build/types/devtools/browser/components/ChildDispatchChips.d.ts +0 -6
- package/build/types/devtools/browser/components/Chip.d.ts +0 -22
- package/build/types/devtools/browser/components/DetailSection.d.ts +0 -5
- package/build/types/devtools/browser/components/DomainChip.d.ts +0 -8
- package/build/types/devtools/browser/components/HandlerChips.d.ts +0 -21
- package/build/types/devtools/browser/components/Icon.d.ts +0 -16
- package/build/types/devtools/browser/components/MetaSection.d.ts +0 -4
- package/build/types/devtools/browser/components/NiceErrorDisplay.d.ts +0 -19
- package/build/types/devtools/browser/components/OriginChip.d.ts +0 -15
- package/build/types/devtools/browser/components/PanelChrome.d.ts +0 -41
- package/build/types/devtools/browser/components/RoutingSection.d.ts +0 -5
- package/build/types/devtools/browser/components/RunningTimer.d.ts +0 -7
- package/build/types/devtools/browser/components/SectionLabel.d.ts +0 -4
- package/build/types/devtools/browser/components/StackTraceSection.d.ts +0 -9
- package/build/types/devtools/browser/components/Tooltip.d.ts +0 -24
- package/build/types/devtools/browser/components/action_detail/ActionDetailPanel.d.ts +0 -7
- package/build/types/devtools/browser/components/action_list/ActionEntryRow.d.ts +0 -14
- package/build/types/devtools/browser/components/action_list/ActionInputAndOutputChip.d.ts +0 -11
- package/build/types/devtools/browser/components/action_list/ActionList.d.ts +0 -10
- package/build/types/devtools/browser/components/action_list/IoTooltipContent.d.ts +0 -6
- package/build/types/devtools/browser/components/action_list/action_list.types.d.ts +0 -4
- package/build/types/devtools/browser/components/sourceMapResolver.d.ts +0 -6
- package/build/types/devtools/browser/components/utils.d.ts +0 -22
- package/build/types/devtools/browser/devtools_dock.d.ts +0 -54
- package/build/types/devtools/browser/devtools_storage.d.ts +0 -6
- package/build/types/devtools/browser/index.d.ts +0 -3
- package/build/types/devtools/browser/ui_util/size.d.ts +0 -6
- package/build/types/devtools/core/ActionDevtools.types.d.ts +0 -55
- package/build/types/devtools/core/ActionDevtoolsCore.d.ts +0 -14
- package/build/types/devtools/core/devtools_colors.d.ts +0 -63
- package/build/types/devtools/server/NiceActionServerDevtools.d.ts +0 -30
- package/build/types/devtools/server/index.d.ts +0 -3
- package/build/types/errors/err_nice_action.d.ts +0 -96
- package/build/types/index.d.ts +0 -41
- package/build/types/nice_action.static.d.ts +0 -3
- package/build/types/react-query/hooks/useActionMutation.d.ts +0 -10
- package/build/types/react-query/hooks/useActionQuery.d.ts +0 -17
- package/build/types/react-query/index.d.ts +0 -2
- package/build/types/utils/assertIsActionJson.d.ts +0 -2
- package/build/types/utils/decodeActionFrame.d.ts +0 -17
- package/build/types/utils/getAssumedRuntimeEnvironment.d.ts +0 -2
- package/build/types/utils/hashPayloadData.d.ts +0 -5
- package/build/types/utils/isActionPayload_Any_JsonObject.d.ts +0 -2
- package/build/types/utils/isActionPayload_Progress_JsonObject.d.ts +0 -2
- package/build/types/utils/isActionPayload_Request_JsonObject.d.ts +0 -2
- package/build/types/utils/isActionPayload_Result_JsonObject.d.ts +0 -2
- package/build/types/utils/isAction_Any_Instance.d.ts +0 -3
- package/build/types/utils/isAction_Any_JsonObject.d.ts +0 -2
- package/build/types/utils/isAction_Base_JsonObject.d.ts +0 -2
- package/build/types/utils/isAction_Context_JsonObject.d.ts +0 -2
- package/build/types/utils/isAction_Core_JsonObject.d.ts +0 -2
- package/build/types/utils/typescript/MaybePromise.d.ts +0 -1
- package/build/types/utils/wait.utils.d.ts +0 -13
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { a as TDevtoolsActionStatus, i as IDevtoolsObservableDomain, n as IActionDevtoolsCoreOptions, o as TDevtoolsListener, r as IDevtoolsActionEntry, t as ActionDevtoolsCore } from "../../ActionDevtoolsCore-Pg7ERO3L.js";
|
|
2
|
+
|
|
3
|
+
//#region src/devtools/server/NiceActionServerDevtools.d.ts
|
|
4
|
+
type TServerDevtoolsLogFn = (message: string, data?: Record<string, unknown>) => void;
|
|
5
|
+
interface IActionServerDevtoolsOptions {
|
|
6
|
+
/**
|
|
7
|
+
* Custom logger function. Defaults to console.log / console.error.
|
|
8
|
+
*/
|
|
9
|
+
logger?: TServerDevtoolsLogFn;
|
|
10
|
+
/**
|
|
11
|
+
* Output format.
|
|
12
|
+
* - "pretty": human-readable lines (default)
|
|
13
|
+
* - "json": newline-delimited JSON for log aggregators
|
|
14
|
+
*/
|
|
15
|
+
format?: "pretty" | "json";
|
|
16
|
+
/**
|
|
17
|
+
* Whether to log action input/output payloads.
|
|
18
|
+
* Disable if payloads may contain sensitive data. Defaults to true.
|
|
19
|
+
*/
|
|
20
|
+
logPayloads?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Whether devtools are active. Defaults to process.env.NODE_ENV !== "production".
|
|
23
|
+
*/
|
|
24
|
+
enabled?: boolean;
|
|
25
|
+
}
|
|
26
|
+
declare class ActionServerDevtools {
|
|
27
|
+
private readonly _options;
|
|
28
|
+
private readonly _inFlight;
|
|
29
|
+
constructor(options?: IActionServerDevtoolsOptions);
|
|
30
|
+
attachToDomain(domain: IDevtoolsObservableDomain): () => void;
|
|
31
|
+
private _log;
|
|
32
|
+
}
|
|
33
|
+
//#endregion
|
|
34
|
+
export { ActionDevtoolsCore, ActionServerDevtools, type IActionDevtoolsCoreOptions, type IActionServerDevtoolsOptions, type IDevtoolsActionEntry, type IDevtoolsObservableDomain, type TDevtoolsActionStatus, type TDevtoolsListener, type TServerDevtoolsLogFn };
|
|
35
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,264 +1,106 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
} else if (type === "finished" /* finished */) {
|
|
73
|
-
this._updateEntry(runningAction.cuid, (e) => {
|
|
74
|
-
const responseRouting = extractRouting(update.response?.context);
|
|
75
|
-
const localRouting = extractRouting(runningAction.context);
|
|
76
|
-
const routing = responseRouting.length >= localRouting.length ? responseRouting : localRouting;
|
|
77
|
-
const base = {
|
|
78
|
-
...e,
|
|
79
|
-
endTime: time,
|
|
80
|
-
meta: { ...e.meta, routing }
|
|
81
|
-
};
|
|
82
|
-
const finishType = update.finishType;
|
|
83
|
-
if (finishType === "success" /* success */) {
|
|
84
|
-
const result = update.response?.result;
|
|
85
|
-
const outputHash = update.response?.outputHash;
|
|
86
|
-
if (result != null && !result.ok) {
|
|
87
|
-
const rawError = result.error;
|
|
88
|
-
const errorStack2 = rawError instanceof Error ? rawError.stack : undefined;
|
|
89
|
-
return {
|
|
90
|
-
...base,
|
|
91
|
-
status: "action-error",
|
|
92
|
-
outputHash,
|
|
93
|
-
error: serializeErrorForDisplay(rawError),
|
|
94
|
-
errorStack: errorStack2
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
return { ...base, status: "success", output: result?.output, outputHash };
|
|
98
|
-
}
|
|
99
|
-
if (finishType === "failed" /* failed */) {
|
|
100
|
-
const rawError = update.error;
|
|
101
|
-
const errorStack2 = rawError instanceof Error ? rawError.stack : undefined;
|
|
102
|
-
return {
|
|
103
|
-
...base,
|
|
104
|
-
status: "failed",
|
|
105
|
-
error: serializeErrorForDisplay(rawError),
|
|
106
|
-
errorStack: errorStack2
|
|
107
|
-
};
|
|
108
|
-
}
|
|
109
|
-
const abortReason = update.reason;
|
|
110
|
-
const errorStack = abortReason instanceof Error ? abortReason.stack : undefined;
|
|
111
|
-
return {
|
|
112
|
-
...base,
|
|
113
|
-
status: "aborted",
|
|
114
|
-
abortReason: serializeErrorForDisplay(abortReason),
|
|
115
|
-
errorStack
|
|
116
|
-
};
|
|
117
|
-
});
|
|
118
|
-
}
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
getEntries() {
|
|
122
|
-
return this._entries;
|
|
123
|
-
}
|
|
124
|
-
subscribe(listener) {
|
|
125
|
-
this._listeners.add(listener);
|
|
126
|
-
listener(this._entries);
|
|
127
|
-
return () => {
|
|
128
|
-
this._listeners.delete(listener);
|
|
129
|
-
};
|
|
130
|
-
}
|
|
131
|
-
clear() {
|
|
132
|
-
this._entries = [];
|
|
133
|
-
this._notify();
|
|
134
|
-
}
|
|
135
|
-
_updateEntry(cuid, updater) {
|
|
136
|
-
this._entries = this._entries.map((e) => e.cuid === cuid ? updater(e) : e);
|
|
137
|
-
this._notify();
|
|
138
|
-
}
|
|
139
|
-
_notify() {
|
|
140
|
-
const snapshot = this._entries;
|
|
141
|
-
for (const listener of this._listeners)
|
|
142
|
-
listener(snapshot);
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
// src/devtools/server/NiceActionServerDevtools.ts
|
|
146
|
-
class ActionServerDevtools {
|
|
147
|
-
_options;
|
|
148
|
-
_inFlight = new Map;
|
|
149
|
-
constructor(options = {}) {
|
|
150
|
-
const defaultEnabled = typeof process !== "undefined" ? process["env"]["NODE_ENV"] !== "production" : true;
|
|
151
|
-
this._options = {
|
|
152
|
-
logger: options.logger ?? defaultConsoleLogger,
|
|
153
|
-
format: options.format ?? "pretty",
|
|
154
|
-
logPayloads: options.logPayloads ?? true,
|
|
155
|
-
enabled: options.enabled ?? defaultEnabled
|
|
156
|
-
};
|
|
157
|
-
}
|
|
158
|
-
attachToDomain(domain) {
|
|
159
|
-
if (!this._options.enabled) {
|
|
160
|
-
return () => {};
|
|
161
|
-
}
|
|
162
|
-
return domain.addActionListener((update) => {
|
|
163
|
-
const { runningAction, type, time } = update;
|
|
164
|
-
const actionPath = [...runningAction.allDomains, runningAction.id].join(".");
|
|
165
|
-
if (type === "started" /* started */) {
|
|
166
|
-
this._inFlight.set(runningAction.cuid, { startTime: time });
|
|
167
|
-
this._log("started", actionPath, runningAction.cuid, {
|
|
168
|
-
...this._options.logPayloads ? { input: runningAction.state?.request?.input } : {}
|
|
169
|
-
});
|
|
170
|
-
} else if (type === "progress" /* progress */) {
|
|
171
|
-
this._log("progress", actionPath, runningAction.cuid, { progress: update.progress });
|
|
172
|
-
} else if (type === "finished" /* finished */) {
|
|
173
|
-
const timing = this._inFlight.get(runningAction.cuid);
|
|
174
|
-
const duration = timing != null ? time - timing.startTime : undefined;
|
|
175
|
-
this._inFlight.delete(runningAction.cuid);
|
|
176
|
-
const finishType = update.finishType;
|
|
177
|
-
if (finishType === "success" /* success */) {
|
|
178
|
-
const result = update.response?.result;
|
|
179
|
-
if (result != null && !result.ok) {
|
|
180
|
-
this._log("action-error", actionPath, runningAction.cuid, {
|
|
181
|
-
...duration != null ? { duration: `${duration}ms` } : {},
|
|
182
|
-
error: serializeError(result.error)
|
|
183
|
-
});
|
|
184
|
-
} else {
|
|
185
|
-
this._log("success", actionPath, runningAction.cuid, {
|
|
186
|
-
...duration != null ? { duration: `${duration}ms` } : {},
|
|
187
|
-
...this._options.logPayloads ? { output: result?.output } : {}
|
|
188
|
-
});
|
|
189
|
-
}
|
|
190
|
-
} else if (finishType === "failed" /* failed */) {
|
|
191
|
-
this._log("failed", actionPath, runningAction.cuid, {
|
|
192
|
-
...duration != null ? { duration: `${duration}ms` } : {},
|
|
193
|
-
error: serializeError(update.error)
|
|
194
|
-
});
|
|
195
|
-
} else {
|
|
196
|
-
this._log("aborted", actionPath, runningAction.cuid, {
|
|
197
|
-
...duration != null ? { duration: `${duration}ms` } : {},
|
|
198
|
-
...update.reason != null ? { reason: String(update.reason) } : {}
|
|
199
|
-
});
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
});
|
|
203
|
-
}
|
|
204
|
-
_log(event, actionPath, cuid, data) {
|
|
205
|
-
const { logger, format } = this._options;
|
|
206
|
-
if (format === "json") {
|
|
207
|
-
logger(JSON.stringify({
|
|
208
|
-
time: new Date().toISOString(),
|
|
209
|
-
event,
|
|
210
|
-
action: actionPath,
|
|
211
|
-
cuid,
|
|
212
|
-
...data
|
|
213
|
-
}));
|
|
214
|
-
return;
|
|
215
|
-
}
|
|
216
|
-
const prefix = PRETTY_PREFIX[event] ?? `[${event}]`;
|
|
217
|
-
const suffix = Object.keys(data).length > 0 ? ` ${formatPrettyData(data)}` : "";
|
|
218
|
-
logger(`${prefix} ${actionPath} cuid=${cuid}${suffix}`);
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
var PRETTY_PREFIX = {
|
|
222
|
-
started: "[nice-action] ►",
|
|
223
|
-
progress: "[nice-action] ",
|
|
224
|
-
success: "[nice-action] ✓",
|
|
225
|
-
failed: "[nice-action] ✗",
|
|
226
|
-
aborted: "[nice-action] ○"
|
|
1
|
+
import "../../RunningAction.types-C176rqHG.js";
|
|
2
|
+
import { t as ActionDevtoolsCore } from "../../ActionDevtoolsCore-yfJ9tkvl.js";
|
|
3
|
+
//#region src/devtools/server/NiceActionServerDevtools.ts
|
|
4
|
+
var ActionServerDevtools = class {
|
|
5
|
+
_options;
|
|
6
|
+
_inFlight = /* @__PURE__ */ new Map();
|
|
7
|
+
constructor(options = {}) {
|
|
8
|
+
const defaultEnabled = typeof process !== "undefined" ? false : true;
|
|
9
|
+
this._options = {
|
|
10
|
+
logger: options.logger ?? defaultConsoleLogger,
|
|
11
|
+
format: options.format ?? "pretty",
|
|
12
|
+
logPayloads: options.logPayloads ?? true,
|
|
13
|
+
enabled: options.enabled ?? defaultEnabled
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
attachToDomain(domain) {
|
|
17
|
+
if (!this._options.enabled) return () => {};
|
|
18
|
+
return domain.addActionListener((update) => {
|
|
19
|
+
const { runningAction, type, time } = update;
|
|
20
|
+
const actionPath = [...runningAction.allDomains, runningAction.id].join(".");
|
|
21
|
+
if (type === "started") {
|
|
22
|
+
this._inFlight.set(runningAction.cuid, { startTime: time });
|
|
23
|
+
this._log("started", actionPath, runningAction.cuid, { ...this._options.logPayloads ? { input: runningAction.state?.request?.input } : {} });
|
|
24
|
+
} else if (type === "progress") this._log("progress", actionPath, runningAction.cuid, { progress: update.progress });
|
|
25
|
+
else if (type === "finished") {
|
|
26
|
+
const timing = this._inFlight.get(runningAction.cuid);
|
|
27
|
+
const duration = timing != null ? time - timing.startTime : void 0;
|
|
28
|
+
this._inFlight.delete(runningAction.cuid);
|
|
29
|
+
const finishType = update.finishType;
|
|
30
|
+
if (finishType === "success") {
|
|
31
|
+
const result = update.response?.result;
|
|
32
|
+
if (result != null && !result.ok) this._log("action-error", actionPath, runningAction.cuid, {
|
|
33
|
+
...duration != null ? { duration: `${duration}ms` } : {},
|
|
34
|
+
error: serializeError(result.error)
|
|
35
|
+
});
|
|
36
|
+
else this._log("success", actionPath, runningAction.cuid, {
|
|
37
|
+
...duration != null ? { duration: `${duration}ms` } : {},
|
|
38
|
+
...this._options.logPayloads ? { output: result?.output } : {}
|
|
39
|
+
});
|
|
40
|
+
} else if (finishType === "failed") this._log("failed", actionPath, runningAction.cuid, {
|
|
41
|
+
...duration != null ? { duration: `${duration}ms` } : {},
|
|
42
|
+
error: serializeError(update.error)
|
|
43
|
+
});
|
|
44
|
+
else this._log("aborted", actionPath, runningAction.cuid, {
|
|
45
|
+
...duration != null ? { duration: `${duration}ms` } : {},
|
|
46
|
+
...update.reason != null ? { reason: String(update.reason) } : {}
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
_log(event, actionPath, cuid, data) {
|
|
52
|
+
const { logger, format } = this._options;
|
|
53
|
+
if (format === "json") {
|
|
54
|
+
logger(JSON.stringify({
|
|
55
|
+
time: (/* @__PURE__ */ new Date()).toISOString(),
|
|
56
|
+
event,
|
|
57
|
+
action: actionPath,
|
|
58
|
+
cuid,
|
|
59
|
+
...data
|
|
60
|
+
}));
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
logger(`${PRETTY_PREFIX[event] ?? `[${event}]`} ${actionPath} cuid=${cuid}${Object.keys(data).length > 0 ? ` ${formatPrettyData(data)}` : ""}`);
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
const PRETTY_PREFIX = {
|
|
67
|
+
started: "[nice-action] ►",
|
|
68
|
+
progress: "[nice-action] ",
|
|
69
|
+
success: "[nice-action] ✓",
|
|
70
|
+
failed: "[nice-action] ✗",
|
|
71
|
+
aborted: "[nice-action] ○"
|
|
227
72
|
};
|
|
228
73
|
function formatPrettyData(data) {
|
|
229
|
-
|
|
74
|
+
return Object.entries(data).map(([k, v]) => `${k}=${safeStringify(v)}`).join(" ");
|
|
230
75
|
}
|
|
231
76
|
function safeStringify(value) {
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
} catch {
|
|
241
|
-
return String(value);
|
|
242
|
-
}
|
|
77
|
+
if (value === void 0) return "undefined";
|
|
78
|
+
if (value === null) return "null";
|
|
79
|
+
if (typeof value === "string") return `"${value}"`;
|
|
80
|
+
try {
|
|
81
|
+
return JSON.stringify(value);
|
|
82
|
+
} catch {
|
|
83
|
+
return String(value);
|
|
84
|
+
}
|
|
243
85
|
}
|
|
244
86
|
function serializeError(err) {
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
87
|
+
if (err == null) return err;
|
|
88
|
+
if (err instanceof Error) return {
|
|
89
|
+
message: err.message,
|
|
90
|
+
name: err.name,
|
|
91
|
+
stack: err.stack
|
|
92
|
+
};
|
|
93
|
+
if (typeof err === "object") try {
|
|
94
|
+
return JSON.parse(JSON.stringify(err));
|
|
95
|
+
} catch {
|
|
96
|
+
return String(err);
|
|
97
|
+
}
|
|
98
|
+
return err;
|
|
257
99
|
}
|
|
258
100
|
function defaultConsoleLogger(message) {
|
|
259
|
-
|
|
101
|
+
console.log(message);
|
|
260
102
|
}
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
103
|
+
//#endregion
|
|
104
|
+
export { ActionDevtoolsCore, ActionServerDevtools };
|
|
105
|
+
|
|
106
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/devtools/server/NiceActionServerDevtools.ts"],"sourcesContent":["import {\r\n ERunningActionFinishedType,\r\n ERunningActionUpdateType,\r\n} from \"../../ActionDefinition/Action/RunningAction.types\";\r\nimport type { IDevtoolsObservableDomain } from \"../core/ActionDevtools.types\";\r\n\r\nexport type TServerDevtoolsLogFn = (message: string, data?: Record<string, unknown>) => void;\r\n\r\nexport interface IActionServerDevtoolsOptions {\r\n /**\r\n * Custom logger function. Defaults to console.log / console.error.\r\n */\r\n logger?: TServerDevtoolsLogFn;\r\n /**\r\n * Output format.\r\n * - \"pretty\": human-readable lines (default)\r\n * - \"json\": newline-delimited JSON for log aggregators\r\n */\r\n format?: \"pretty\" | \"json\";\r\n /**\r\n * Whether to log action input/output payloads.\r\n * Disable if payloads may contain sensitive data. Defaults to true.\r\n */\r\n logPayloads?: boolean;\r\n /**\r\n * Whether devtools are active. Defaults to process.env.NODE_ENV !== \"production\".\r\n */\r\n enabled?: boolean;\r\n}\r\n\r\ninterface IStartedTiming {\r\n startTime: number;\r\n}\r\n\r\nexport class ActionServerDevtools {\r\n private readonly _options: Required<IActionServerDevtoolsOptions>;\r\n private readonly _inFlight: Map<string, IStartedTiming> = new Map();\r\n\r\n constructor(options: IActionServerDevtoolsOptions = {}) {\r\n const defaultEnabled =\r\n typeof process !== \"undefined\" ? process[\"env\"][\"NODE_ENV\"] !== \"production\" : true;\r\n\r\n this._options = {\r\n logger: options.logger ?? defaultConsoleLogger,\r\n format: options.format ?? \"pretty\",\r\n logPayloads: options.logPayloads ?? true,\r\n enabled: options.enabled ?? defaultEnabled,\r\n };\r\n }\r\n\r\n attachToDomain(domain: IDevtoolsObservableDomain): () => void {\r\n if (!this._options.enabled) {\r\n return () => {};\r\n }\r\n\r\n return domain.addActionListener((update) => {\r\n const { runningAction, type, time } = update;\r\n const actionPath = [...runningAction.allDomains, runningAction.id].join(\".\");\r\n\r\n if (type === ERunningActionUpdateType.started) {\r\n this._inFlight.set(runningAction.cuid, { startTime: time });\r\n this._log(\"started\", actionPath, runningAction.cuid, {\r\n ...(this._options.logPayloads ? { input: runningAction.state?.request?.input } : {}),\r\n });\r\n } else if (type === ERunningActionUpdateType.progress) {\r\n this._log(\"progress\", actionPath, runningAction.cuid, { progress: update.progress });\r\n } else if (type === ERunningActionUpdateType.finished) {\r\n const timing = this._inFlight.get(runningAction.cuid);\r\n const duration = timing != null ? time - timing.startTime : undefined;\r\n this._inFlight.delete(runningAction.cuid);\r\n\r\n const finishType: string = update.finishType;\r\n\r\n if (finishType === ERunningActionFinishedType.success) {\r\n const result = update.response?.result;\r\n if (result != null && !result.ok) {\r\n this._log(\"action-error\", actionPath, runningAction.cuid, {\r\n ...(duration != null ? { duration: `${duration}ms` } : {}),\r\n error: serializeError(result.error),\r\n });\r\n } else {\r\n this._log(\"success\", actionPath, runningAction.cuid, {\r\n ...(duration != null ? { duration: `${duration}ms` } : {}),\r\n ...(this._options.logPayloads ? { output: result?.output } : {}),\r\n });\r\n }\r\n } else if (finishType === ERunningActionFinishedType.failed) {\r\n this._log(\"failed\", actionPath, runningAction.cuid, {\r\n ...(duration != null ? { duration: `${duration}ms` } : {}),\r\n error: serializeError(update.error),\r\n });\r\n } else {\r\n this._log(\"aborted\", actionPath, runningAction.cuid, {\r\n ...(duration != null ? { duration: `${duration}ms` } : {}),\r\n ...(update.reason != null ? { reason: String(update.reason) } : {}),\r\n });\r\n }\r\n }\r\n });\r\n }\r\n\r\n private _log(\r\n event: string,\r\n actionPath: string,\r\n cuid: string,\r\n data: Record<string, unknown>,\r\n ): void {\r\n const { logger, format } = this._options;\r\n\r\n if (format === \"json\") {\r\n logger(\r\n JSON.stringify({\r\n time: new Date().toISOString(),\r\n event,\r\n action: actionPath,\r\n cuid,\r\n ...data,\r\n }),\r\n );\r\n return;\r\n }\r\n\r\n const prefix = PRETTY_PREFIX[event] ?? `[${event}]`;\r\n const suffix = Object.keys(data).length > 0 ? ` ${formatPrettyData(data)}` : \"\";\r\n logger(`${prefix} ${actionPath} cuid=${cuid}${suffix}`);\r\n }\r\n}\r\n\r\nconst PRETTY_PREFIX: Record<string, string> = {\r\n started: \"[nice-action] ►\",\r\n progress: \"[nice-action] \",\r\n success: \"[nice-action] ✓\",\r\n failed: \"[nice-action] ✗\",\r\n aborted: \"[nice-action] ○\",\r\n};\r\n\r\nfunction formatPrettyData(data: Record<string, unknown>): string {\r\n return Object.entries(data)\r\n .map(([k, v]) => `${k}=${safeStringify(v)}`)\r\n .join(\" \");\r\n}\r\n\r\nfunction safeStringify(value: unknown): string {\r\n if (value === undefined) return \"undefined\";\r\n if (value === null) return \"null\";\r\n if (typeof value === \"string\") return `\"${value}\"`;\r\n try {\r\n return JSON.stringify(value);\r\n } catch {\r\n return String(value);\r\n }\r\n}\r\n\r\nfunction serializeError(err: unknown): unknown {\r\n if (err == null) return err;\r\n if (err instanceof Error) return { message: err.message, name: err.name, stack: err.stack };\r\n if (typeof err === \"object\") {\r\n try {\r\n return JSON.parse(JSON.stringify(err));\r\n } catch {\r\n return String(err);\r\n }\r\n }\r\n return err;\r\n}\r\n\r\nfunction defaultConsoleLogger(message: string): void {\r\n console.log(message);\r\n}\r\n"],"mappings":"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"}
|
package/build/index.d.ts
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { $ as createBinaryWsAdapter, $n as TInferOutputFromSchema, $t as ITransportDispatchAction, A as createSecureActionServerHandler, An as ERunningActionState, At as ICustomTransportSendOptions, B as IConnectionAttachment, Bn as IRuntimeCoordinate, Bt as MaybePromise, C as decodeActionFrame, Cn as TUpdateActionRunConfig, Ct as IHttpTransportOptions, D as IHibernatableWsServerAdapterOptions, Dn as IActionCore, Dt as err_nice_transport, E as IHibernatableWsServerAdapter, En as ActionPayload_Request, Et as EErrId_NiceTransport, F as IActionServerHandlerOptions, Fn as IRunningActionUpdate_Success, Ft as ActionDomain, G as createSecureWebSocketTransport, Gn as TRuntimeCoordinateStringId, Gt as ETransportStatus, H as WsConnectionStateStore, Hn as IRuntimeFullCoordinates, Ht as createExternalClientHandler, I as TActionChannelFormatMessage, In as TRunningActionUpdate, It as ActionRootDomain, J as IWebSocketTransportSocketOptions, Jn as IActionRootDomain, Jt as IActionTransportInitialized, K as defineSecureWsChannel, Kn as IActionDomain, Kt as ETransportType, L as TActionConnectionEncoding, Ln as TRunningActionUpdateFinished, Lt as ActionRuntime, M as createActionFetchHandler, Mn as IRunningActionUpdate_Abort, Mt as err_nice_external_client, N as ActionServerHandler, Nn as IRunningActionUpdate_Progress, Nt as createActionRootDomain, O as ISecureActionServerHandlerOptions, On as IActionCore_JsonObject, Ot as CustomTransport, P as IActionServerConnectionBinding, Pn as IRunningActionUpdate_Started, Pt as ActionCore, Q as createBinaryWsSessionFactory, Qn as TInferInputFromSchema, Qt as IActionTransportResolvers, R as TServerConnectionCaseFn, Rn as TRunningActionUpdateListener, Rt as ActionLocalHandler, S as IActionFrameDecoder, Sn as TTransportStatusInfo_GetTransport_Output, St as HttpTransport, T as err_nice_action, Tn as ActionPayload_Progress, Tt as err_nice_transport_ws, U as ISecureWebSocketTransportOptions, Un as RuntimeCoordinate, Ut as ITransportConnectionContext, V as IWsConnectionStateStoreOptions, Vn as IRuntimeCoordinateSpecifics, Vt as ActionExternalClientHandler, W as ISecureWsChannel, Wn as TRuntimeCoordinateEnvId, Wt as Transport, X as WebSocketTransport, Xn as TActionDomainSchema, Xt as IActionTransportReadyData_Base, Y as TWebSocketTransportOptions, Yn as TActionDomainChildDef, Yt as IActionTransportReady, Z as IBinaryWsSessionOptions, Zn as TDomainActionId, Zt as IActionTransportReadyData_Methods, _ as TActionProgress, _n as TSendActionDataMethod, _t as encodeHandshakeMessage, a as IActionPayload_Data_Base, an as ITransportStatusInfo_Failed, ar as TActionSchemaOptions, at as IClientHandshakeConfig, b as isActionPayload_Request_JsonObject, bn as TTransportInitializationFinishedInfo, bt as IActionFrameCryptoConfig, c as IActionPayload_Request_JsonObject, cn as ITransportStatusInfo_Unsupported, ct as IHandshakeEncryptionKeyMaterial, d as IActionProgress_Custom, dn as TOnResolveAnyIncomingActionData, dt as THandshakeMessage, en as ITransportMethod_SendActionData_Input, er as TPossibleDomainId, et as IActionTransportDef_Ws, f as IActionProgress_None, fn as TOnResolveAnyIncomingActionData_Json, ft as createClientHandshake, g as TActionPayload_Any_JsonObject, gn as TOnResolveIncomingResponseJson, gt as decodeHandshakeMessage, h as TActionPayload_Any_Instance, hn as TOnResolveIncomingResponse, ht as createStorageTofuVerifyKeyResolver, i as IActionPayload_Base_JsonObject, in as ITransportStatusInfo_Base, ir as actionSchema, it as ESecurityLevel, j as IActionFetchHandlerOptions, jn as ERunningActionUpdateType, jt as TCustomTransportOptions, k as createHibernatableWsServerAdapter, kn as ERunningActionFinishedType, kt as ICustomTransportAdvancedOptions, l as IActionPayload_Result, ln as IUpdateActionRunConfig_Output, lt as IHandshakeResult, m as IActionRouteItemHandler, mn as TOnResolveIncomingRequestJson, mt as createServerHandshake, n as EActionProgressType, nn as ITransportRouteClientParams, nr as ActionSchema, nt as IActionTransportReadyData_Ws, o as IActionPayload_Progress, on as ITransportStatusInfo_Initializing, or as TActionSerializationDefinition, ot as IClientVerifyKeyResolveInput, p as IActionProgress_Percentage, pn as TOnResolveIncomingRequest, pt as createInMemoryTofuVerifyKeyResolver, q as IWebSocketTransportAdvancedOptions, qn as IActionDomainChildOptions, qt as IActionTransportDef, r as IActionPayload_Base, rn as ITransportRouteInfo, rr as TInferActionError, rt as EHandshakeMessageType, s as IActionPayload_Progress_JsonObject, sn as ITransportStatusInfo_Ready, sr as TTransportedValue, st as IClientVerifyKeyResolver, t as EActionPayloadType, tn as ITransportRouteActionParams, tr as TPossibleDomainIdList, tt as IActionTransportInitialized_Ws, u as IActionPayload_Result_JsonObject, un as TGetTransportFn, ut as IServerHandshakeConfig, v as TActionResultOutcome, vn as TSendReturnDataMethod, vt as runtimeLinkId, w as EErrId_NiceAction, wn as RunningAction, wt as EErrId_NiceTransport_WebSocket, x as isActionPayload_Any_JsonObject, xn as TTransportStatusInfo, xt as createActionFrameCrypto, y as isActionPayload_Result_JsonObject, yn as TTransportCache, yt as IActionFrameCrypto, z as createServerHandler, zn as ActionPayload_Result, zt as createLocalHandler } from "./ActionPayload.types-BN-rXFBK.js";
|
|
2
|
+
export { ActionCore, ActionDomain, ActionExternalClientHandler, ActionLocalHandler, type ActionPayload_Progress, type ActionPayload_Request, type ActionPayload_Result, ActionRootDomain, ActionRuntime, ActionSchema, ActionServerHandler, CustomTransport, EActionPayloadType, EActionProgressType, EErrId_NiceAction, EErrId_NiceTransport, EErrId_NiceTransport_WebSocket, EHandshakeMessageType, ERunningActionFinishedType, ERunningActionState, ERunningActionUpdateType, ESecurityLevel, ETransportStatus, ETransportType, HttpTransport, IActionCore, IActionCore_JsonObject, type IActionDomain, type IActionDomainChildOptions, type IActionFetchHandlerOptions, type IActionFrameCrypto, type IActionFrameCryptoConfig, type IActionFrameDecoder, IActionPayload_Base, IActionPayload_Base_JsonObject, IActionPayload_Data_Base, IActionPayload_Progress, IActionPayload_Progress_JsonObject, IActionPayload_Request_JsonObject, IActionPayload_Result, IActionPayload_Result_JsonObject, IActionProgress_Custom, IActionProgress_None, IActionProgress_Percentage, type IActionRootDomain, IActionRouteItemHandler, type IActionServerConnectionBinding, type IActionServerHandlerOptions, IActionTransportDef, type IActionTransportDef_Ws, IActionTransportInitialized, type IActionTransportInitialized_Ws, IActionTransportReady, IActionTransportReadyData_Base, IActionTransportReadyData_Methods, type IActionTransportReadyData_Ws, IActionTransportResolvers, type IBinaryWsSessionOptions, type IClientHandshakeConfig, type IClientVerifyKeyResolveInput, type IClientVerifyKeyResolver, type IConnectionAttachment, ICustomTransportAdvancedOptions, ICustomTransportSendOptions, type IHandshakeEncryptionKeyMaterial, type IHandshakeResult, type IHibernatableWsServerAdapter, type IHibernatableWsServerAdapterOptions, type IHttpTransportOptions, type IRunningActionUpdate_Abort, type IRunningActionUpdate_Progress, type IRunningActionUpdate_Started, type IRunningActionUpdate_Success, IRuntimeCoordinate, IRuntimeCoordinateSpecifics, IRuntimeFullCoordinates, type ISecureActionServerHandlerOptions, type ISecureWebSocketTransportOptions, type ISecureWsChannel, type IServerHandshakeConfig, type ITransportConnectionContext, ITransportDispatchAction, ITransportMethod_SendActionData_Input, ITransportRouteActionParams, ITransportRouteClientParams, ITransportRouteInfo, ITransportStatusInfo_Base, ITransportStatusInfo_Failed, ITransportStatusInfo_Initializing, ITransportStatusInfo_Ready, ITransportStatusInfo_Unsupported, IUpdateActionRunConfig_Output, type IWebSocketTransportAdvancedOptions, type IWebSocketTransportSocketOptions, type IWsConnectionStateStoreOptions, MaybePromise, RunningAction, RuntimeCoordinate, type TActionChannelFormatMessage, type TActionConnectionEncoding, type TActionDomainChildDef, type TActionDomainSchema, TActionPayload_Any_Instance, TActionPayload_Any_JsonObject, TActionProgress, TActionResultOutcome, type TActionSchemaOptions, type TActionSerializationDefinition, TCustomTransportOptions, type TDomainActionId, TGetTransportFn, type THandshakeMessage, type TInferActionError, type TInferInputFromSchema, type TInferOutputFromSchema, TOnResolveAnyIncomingActionData, TOnResolveAnyIncomingActionData_Json, TOnResolveIncomingRequest, TOnResolveIncomingRequestJson, TOnResolveIncomingResponse, TOnResolveIncomingResponseJson, type TPossibleDomainId, type TPossibleDomainIdList, type TRunningActionUpdate, type TRunningActionUpdateFinished, type TRunningActionUpdateListener, TRuntimeCoordinateEnvId, TRuntimeCoordinateStringId, TSendActionDataMethod, TSendReturnDataMethod, type TServerConnectionCaseFn, TTransportCache, TTransportInitializationFinishedInfo, TTransportStatusInfo, TTransportStatusInfo_GetTransport_Output, type TTransportedValue, TUpdateActionRunConfig, type TWebSocketTransportOptions, Transport, WebSocketTransport, WsConnectionStateStore, actionSchema, createActionFetchHandler, createActionFrameCrypto, createActionRootDomain, createBinaryWsAdapter, createBinaryWsSessionFactory, createClientHandshake, createExternalClientHandler, createHibernatableWsServerAdapter, createInMemoryTofuVerifyKeyResolver, createLocalHandler, createSecureActionServerHandler, createSecureWebSocketTransport, createServerHandler, createServerHandshake, createStorageTofuVerifyKeyResolver, decodeActionFrame, decodeHandshakeMessage, defineSecureWsChannel, encodeHandshakeMessage, err_nice_action, err_nice_external_client, err_nice_transport, err_nice_transport_ws, isActionPayload_Any_JsonObject, isActionPayload_Request_JsonObject, isActionPayload_Result_JsonObject, runtimeLinkId };
|