@velarscript/server 0.18.1 → 0.19.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/README.md +52 -3
- package/dist/compiler.d.ts +1 -1
- package/dist/compiler.d.ts.map +1 -1
- package/dist/compiler.js +145 -7
- package/dist/compiler.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/realtime-runtime.d.ts +12 -0
- package/dist/realtime-runtime.d.ts.map +1 -0
- package/dist/realtime-runtime.js +400 -0
- package/dist/realtime-runtime.js.map +1 -0
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +1 -0
- package/dist/runtime.js.map +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -2,9 +2,58 @@
|
|
|
2
2
|
|
|
3
3
|
The official convention-based VelarScript server application framework. It is
|
|
4
4
|
activated explicitly in `velar.json`, composes `@velarscript/node`, and owns
|
|
5
|
-
root `application.yml` loading,
|
|
6
|
-
application
|
|
7
|
-
|
|
5
|
+
root `application.yml` loading, application startup assembly, typed
|
|
6
|
+
application-scoped connection lifecycle, and a target-specific realtime
|
|
7
|
+
session module.
|
|
8
|
+
|
|
9
|
+
The realtime boundary has two deliberate layers:
|
|
10
|
+
|
|
11
|
+
- `velar/websocket` owns HTTP upgrade, frames, Origin admission, close codes,
|
|
12
|
+
transport limits, and the physical connection.
|
|
13
|
+
- server-target `velar/realtime.realtimeSession` owns the repeatable application session:
|
|
14
|
+
decode, sequential command handling, one bounded outbound mailbox, one
|
|
15
|
+
writer, failure policy, cleanup, and close notification.
|
|
16
|
+
|
|
17
|
+
Applications still own authentication, rooms, subscriptions, command/event
|
|
18
|
+
types, serialization, authorization, and delivery guarantees. A shared
|
|
19
|
+
protocol package can therefore be consumed by both server and browser without
|
|
20
|
+
making the server framework depend on one client or one wire format.
|
|
21
|
+
|
|
22
|
+
```velar fragment
|
|
23
|
+
import {Bytes} from "velar/binary"
|
|
24
|
+
import {RealtimeFailureAction, RealtimePeer, realtimeSession} from "velar/realtime"
|
|
25
|
+
import {WebSocketConnection} from "velar/websocket"
|
|
26
|
+
|
|
27
|
+
type Command:
|
|
28
|
+
operation: string
|
|
29
|
+
|
|
30
|
+
type ServerEvent:
|
|
31
|
+
event: string
|
|
32
|
+
|
|
33
|
+
def decode(message: string | Bytes) -> Command:
|
|
34
|
+
if message is string: return Json.parse(message, Command)
|
|
35
|
+
throw Error("Binary commands are not supported")
|
|
36
|
+
|
|
37
|
+
def encode(event: ServerEvent) -> string | Bytes:
|
|
38
|
+
return Json.stringify(event)
|
|
39
|
+
|
|
40
|
+
async def receive(command: Command, peer: RealtimePeer<ServerEvent>):
|
|
41
|
+
await peer.send({event: command.operation})
|
|
42
|
+
|
|
43
|
+
async def session(connection: WebSocketConnection):
|
|
44
|
+
await realtimeSession(
|
|
45
|
+
connection,
|
|
46
|
+
{decode, encode},
|
|
47
|
+
receive,
|
|
48
|
+
failed=async (_failure, _peer) => RealtimeFailureAction.close,
|
|
49
|
+
)
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
`send` waits until that message reaches the transport. `trySend` never waits
|
|
53
|
+
and returns `false` when the session mailbox is full. Inbound commands are
|
|
54
|
+
handled in wire order. The framework deliberately does not replay commands or
|
|
55
|
+
claim stronger-than-WebSocket delivery; sequence numbers, acknowledgements,
|
|
56
|
+
resume cursors, and idempotency keys belong to the shared application protocol.
|
|
8
57
|
|
|
9
58
|
`authenticate(credential, verify)` turns one checked `security` descriptor into
|
|
10
59
|
a request-scoped `Provider<Identity>`. The verifier must resolve to a typed
|
package/dist/compiler.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type CompilerExtension, type ModuleInterface } from "@velarscript/compiler";
|
|
2
|
-
export declare const VELAR_SERVER_API_VERSION = "0.
|
|
2
|
+
export declare const VELAR_SERVER_API_VERSION = "0.14";
|
|
3
3
|
export declare const serverModuleInterfaces: ReadonlyMap<string, ModuleInterface>;
|
|
4
4
|
export declare const serverModuleSources: ReadonlyMap<string, string>;
|
|
5
5
|
export declare const velarCompilerExtension: CompilerExtension;
|
package/dist/compiler.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compiler.d.ts","sourceRoot":"","sources":["../src/compiler.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,iBAAiB,
|
|
1
|
+
{"version":3,"file":"compiler.d.ts","sourceRoot":"","sources":["../src/compiler.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,iBAAiB,EAGtB,KAAK,eAAe,EAErB,MAAM,uBAAuB,CAAC;AAiB/B,eAAO,MAAM,wBAAwB,SAAS,CAAC;AA8N/C,eAAO,MAAM,sBAAsB,EAAE,WAAW,CAAC,MAAM,EAAE,eAAe,CAA4B,CAAC;AASrG,eAAO,MAAM,mBAAmB,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAyB,CAAC;AAMtF,eAAO,MAAM,sBAAsB,EAAE,iBA+BnC,CAAC;AAEH,OAAO,EAAC,qBAAqB,EAAE,KAAK,iBAAiB,EAAC,MAAM,qBAAqB,CAAC"}
|
package/dist/compiler.js
CHANGED
|
@@ -2,13 +2,21 @@ import {} from "@velarscript/compiler";
|
|
|
2
2
|
import { VELAR_STRICT_JSON_RUNTIME, VELAR_TYPE_REGISTRY_RUNTIME, } from "@velarscript/compiler/extension";
|
|
3
3
|
import { VELAR_NODE_API_VERSION, nodeModuleDependencies, nodeModuleInterfaces, nodeModuleSources, velarNodeCompilerExtension, } from "@velarscript/node/compiler";
|
|
4
4
|
import { inferServerIntrinsic } from "./analyzer.js";
|
|
5
|
+
import { VELAR_SERVER_REALTIME_RUNTIME } from "./realtime-runtime.js";
|
|
5
6
|
import { VELAR_SERVER_RUNTIME } from "./runtime.js";
|
|
6
|
-
export const VELAR_SERVER_API_VERSION = "0.
|
|
7
|
+
export const VELAR_SERVER_API_VERSION = "0.14";
|
|
7
8
|
const unknownType = { kind: "unknown" };
|
|
8
9
|
const stringType = { kind: "string" };
|
|
9
10
|
const numberType = { kind: "number" };
|
|
11
|
+
const boolType = { kind: "bool" };
|
|
12
|
+
const nullType = { kind: "null" };
|
|
13
|
+
const errorType = { kind: "class", name: "Error" };
|
|
14
|
+
const bytesType = { kind: "named", name: "Bytes", identity: "velar/binary#type:Bytes" };
|
|
15
|
+
const durationType = { kind: "named", name: "Duration" };
|
|
10
16
|
const serverType = { kind: "named", name: "Server", identity: "velar/serve#type:Server" };
|
|
11
17
|
const serveAppType = { kind: "named", name: "ServeApp", identity: "velar/serve#type:ServeApp" };
|
|
18
|
+
const webSocketConnectionType = { kind: "named", name: "WebSocketConnection", identity: "velar/websocket#type:WebSocketConnection" };
|
|
19
|
+
const webSocketCloseType = { kind: "named", name: "WebSocketClose", identity: "velar/websocket#type:WebSocketClose" };
|
|
12
20
|
const providerType = {
|
|
13
21
|
kind: "extension",
|
|
14
22
|
extensionId: "@velarscript/node",
|
|
@@ -28,18 +36,133 @@ function functionType(parameterNames, parameters, result, requiredParameters = p
|
|
|
28
36
|
function intrinsic(name, parameterNames, parameters, result, requiredParameters = parameters.length) {
|
|
29
37
|
return { kind: "intrinsic", name, parameterNames, parameters, requiredParameters, result };
|
|
30
38
|
}
|
|
31
|
-
|
|
39
|
+
const realtimeWireType = { kind: "union", members: [stringType, bytesType] };
|
|
40
|
+
const realtimeFailureIdentity = "velar/realtime#type:RealtimeFailure";
|
|
41
|
+
const realtimeFailureType = { kind: "named", name: "RealtimeFailure", identity: realtimeFailureIdentity };
|
|
42
|
+
const realtimeFailureActionIdentity = "velar/realtime#enum:RealtimeFailureAction";
|
|
43
|
+
const realtimeFailureActionMembers = new Set(["continue", "close"]);
|
|
44
|
+
const realtimeFailureActionType = { kind: "enum", name: "RealtimeFailureAction", identity: realtimeFailureActionIdentity };
|
|
45
|
+
const realtimePeerStateIdentity = "velar/realtime#enum:RealtimePeerState";
|
|
46
|
+
const realtimePeerStateMembers = new Set(["open", "closing", "closed"]);
|
|
47
|
+
const realtimePeerStateType = { kind: "enum", name: "RealtimePeerState", identity: realtimePeerStateIdentity };
|
|
48
|
+
const realtimeBackpressureIdentity = "velar/realtime#class:RealtimeBackpressureError";
|
|
49
|
+
const realtimePeerIdentity = "velar/realtime#type:RealtimePeer";
|
|
50
|
+
const realtimeCodecIdentity = "velar/realtime#type:RealtimeCodec";
|
|
51
|
+
const realtimePeerElement = { kind: "parameter", name: "T", index: 0 };
|
|
52
|
+
const realtimeCodecIncoming = { kind: "parameter", name: "Incoming", index: 0 };
|
|
53
|
+
const realtimeCodecOutgoing = { kind: "parameter", name: "Outgoing", index: 1 };
|
|
54
|
+
function genericApplication(name, identity, arguments_) {
|
|
55
|
+
const labels = arguments_.map((argument, index) => argument.kind === "parameter" ? argument.name : `T${index + 1}`);
|
|
56
|
+
return { kind: "named", name: `${name}<${labels.join(", ")}>`, identity, application: { declaration: identity, name, arguments: arguments_ } };
|
|
57
|
+
}
|
|
58
|
+
const realtimePeerOf = (value) => genericApplication("RealtimePeer", realtimePeerIdentity, [value]);
|
|
59
|
+
const realtimeCodecOf = (incoming, outgoing) => genericApplication("RealtimeCodec", realtimeCodecIdentity, [incoming, outgoing]);
|
|
60
|
+
const realtimePeerTemplate = {
|
|
61
|
+
identity: realtimePeerIdentity,
|
|
62
|
+
name: "RealtimePeer",
|
|
63
|
+
parameterNames: ["T"],
|
|
64
|
+
parameterBounds: [null],
|
|
65
|
+
fields: new Map([
|
|
66
|
+
["state", functionType([], [], realtimePeerStateType)],
|
|
67
|
+
["send", functionType(["message"], [realtimePeerElement], promise(nullType))],
|
|
68
|
+
["trySend", functionType(["message"], [realtimePeerElement], boolType)],
|
|
69
|
+
["close", functionType(["code", "reason"], [numberType, stringType], promise(nullType), 0)],
|
|
70
|
+
]),
|
|
71
|
+
readonlyFields: new Set(["state", "send", "trySend", "close"]),
|
|
72
|
+
};
|
|
73
|
+
const realtimeCodecTemplate = {
|
|
74
|
+
identity: realtimeCodecIdentity,
|
|
75
|
+
name: "RealtimeCodec",
|
|
76
|
+
parameterNames: ["Incoming", "Outgoing"],
|
|
77
|
+
parameterBounds: [null, null],
|
|
78
|
+
fields: new Map([
|
|
79
|
+
["decode", functionType(["message"], [realtimeWireType], realtimeCodecIncoming)],
|
|
80
|
+
["encode", functionType(["message"], [realtimeCodecOutgoing], realtimeWireType)],
|
|
81
|
+
]),
|
|
82
|
+
readonlyFields: new Set(["decode", "encode"]),
|
|
83
|
+
};
|
|
84
|
+
const realtimeGenericTypes = new Map([
|
|
85
|
+
["RealtimePeer", realtimePeerTemplate],
|
|
86
|
+
["RealtimeCodec", realtimeCodecTemplate],
|
|
87
|
+
]);
|
|
88
|
+
const realtimeFailureFields = new Map([
|
|
89
|
+
["phase", stringType],
|
|
90
|
+
["error", errorType],
|
|
91
|
+
["recoverable", boolType],
|
|
92
|
+
]);
|
|
93
|
+
const realtimeFailureActionInfo = {
|
|
94
|
+
identity: realtimeFailureActionIdentity,
|
|
95
|
+
members: realtimeFailureActionMembers,
|
|
96
|
+
wireValues: new Map([...realtimeFailureActionMembers].map((member) => [member, member])),
|
|
97
|
+
};
|
|
98
|
+
const realtimePeerStateInfo = {
|
|
99
|
+
identity: realtimePeerStateIdentity,
|
|
100
|
+
members: realtimePeerStateMembers,
|
|
101
|
+
wireValues: new Map([...realtimePeerStateMembers].map((member) => [member, member])),
|
|
102
|
+
};
|
|
103
|
+
const realtimeBackpressureClass = {
|
|
104
|
+
identity: realtimeBackpressureIdentity,
|
|
105
|
+
parameters: [stringType],
|
|
106
|
+
parameterNames: ["message"],
|
|
107
|
+
requiredParameters: 0,
|
|
108
|
+
base: "Error",
|
|
109
|
+
abstract: false,
|
|
110
|
+
fields: new Map(),
|
|
111
|
+
getters: new Set(),
|
|
112
|
+
abstractGetters: new Set(),
|
|
113
|
+
methods: new Map(),
|
|
114
|
+
abstractMethods: new Set(),
|
|
115
|
+
staticFields: new Map(),
|
|
116
|
+
staticGetters: new Set(),
|
|
117
|
+
staticMethods: new Map(),
|
|
118
|
+
};
|
|
119
|
+
const realtimeSessionOptions = {
|
|
120
|
+
kind: "object",
|
|
121
|
+
fields: new Map([
|
|
122
|
+
["maxQueuedMessages", numberType],
|
|
123
|
+
["maxQueuedBytes", numberType],
|
|
124
|
+
["drainTimeout", durationType],
|
|
125
|
+
]),
|
|
126
|
+
optionalFields: new Set(["maxQueuedMessages", "maxQueuedBytes", "drainTimeout"]),
|
|
127
|
+
};
|
|
128
|
+
const realtimeInput = { kind: "parameter", name: "Incoming", index: 0 };
|
|
129
|
+
const realtimeOutput = { kind: "parameter", name: "Outgoing", index: 1 };
|
|
130
|
+
const realtimePeerOutput = realtimePeerOf(realtimeOutput);
|
|
131
|
+
const realtimeCleanup = functionType([], [], promise(nullType));
|
|
132
|
+
const realtimeOpened = functionType(["peer"], [realtimePeerOutput], promise({ kind: "optional", inner: realtimeCleanup }));
|
|
133
|
+
const realtimeReceive = functionType(["message", "peer"], [realtimeInput, realtimePeerOutput], promise(nullType));
|
|
134
|
+
const realtimeFailed = functionType(["failure", "peer"], [realtimeFailureType, realtimePeerOutput], promise(realtimeFailureActionType));
|
|
135
|
+
const realtimeClosed = functionType(["peer", "close"], [realtimePeerOutput, webSocketCloseType], promise(nullType));
|
|
136
|
+
const optionalFunction = (value) => ({ kind: "optional", inner: value });
|
|
137
|
+
const realtimeSessionFunction = {
|
|
138
|
+
kind: "function",
|
|
139
|
+
typeParameterNames: ["Incoming", "Outgoing"],
|
|
140
|
+
parameterNames: ["connection", "codec", "receive", "opened", "failed", "closed", "options"],
|
|
141
|
+
parameters: [
|
|
142
|
+
webSocketConnectionType,
|
|
143
|
+
realtimeCodecOf(realtimeInput, realtimeOutput),
|
|
144
|
+
realtimeReceive,
|
|
145
|
+
optionalFunction(realtimeOpened),
|
|
146
|
+
optionalFunction(realtimeFailed),
|
|
147
|
+
optionalFunction(realtimeClosed),
|
|
148
|
+
realtimeSessionOptions,
|
|
149
|
+
],
|
|
150
|
+
requiredParameters: 3,
|
|
151
|
+
result: promise(nullType),
|
|
152
|
+
};
|
|
153
|
+
function moduleInterface(exports, namedTypes = new Map(), namedTypeIdentities = new Map(), enums = new Map(), classes = new Map(), namedTypeReadonlyFields = new Map(), genericTypes = new Map()) {
|
|
32
154
|
return {
|
|
33
155
|
exports,
|
|
34
156
|
mutableExports: new Set(),
|
|
35
157
|
reactiveExports: new Map(),
|
|
36
158
|
reExports: new Map(),
|
|
37
|
-
namedTypes
|
|
38
|
-
namedTypeReadonlyFields
|
|
39
|
-
namedTypeIdentities
|
|
159
|
+
namedTypes,
|
|
160
|
+
namedTypeReadonlyFields,
|
|
161
|
+
namedTypeIdentities,
|
|
162
|
+
genericTypes,
|
|
40
163
|
typeAliases: new Map(),
|
|
41
|
-
enums
|
|
42
|
-
classes
|
|
164
|
+
enums,
|
|
165
|
+
classes,
|
|
43
166
|
tests: [],
|
|
44
167
|
extensionExports: new Map(),
|
|
45
168
|
extensionData: new Map(),
|
|
@@ -51,8 +174,21 @@ const serverModuleInterface = moduleInterface(new Map([
|
|
|
51
174
|
["configuration", intrinsic("server.configuration", ["target", "path", "maxBytes"], [unknownType, { kind: "union", members: [stringType, { kind: "null" }] }, numberType], promise(unknownType), 1)],
|
|
52
175
|
["database", intrinsic("server.database", ["connect", "disconnect"], [unknownType, unknownType], providerType)],
|
|
53
176
|
]));
|
|
177
|
+
const serverRealtimeModuleInterface = moduleInterface(new Map([
|
|
178
|
+
["RealtimeBackpressureError", { kind: "classConstructor", name: "RealtimeBackpressureError", identity: realtimeBackpressureIdentity }],
|
|
179
|
+
["RealtimeCodec", { kind: "typeObject", name: "RealtimeCodec", value: realtimeCodecOf(realtimeCodecIncoming, realtimeCodecOutgoing) }],
|
|
180
|
+
["RealtimeFailure", { kind: "typeObject", name: "RealtimeFailure", value: realtimeFailureType }],
|
|
181
|
+
["RealtimeFailureAction", { kind: "enumObject", name: "RealtimeFailureAction", identity: realtimeFailureActionIdentity, members: realtimeFailureActionMembers }],
|
|
182
|
+
["RealtimePeer", { kind: "typeObject", name: "RealtimePeer", value: realtimePeerOf(realtimePeerElement) }],
|
|
183
|
+
["RealtimePeerState", { kind: "enumObject", name: "RealtimePeerState", identity: realtimePeerStateIdentity, members: realtimePeerStateMembers }],
|
|
184
|
+
["realtimeSession", realtimeSessionFunction],
|
|
185
|
+
]), new Map([["RealtimeFailure", realtimeFailureFields]]), new Map([["RealtimeFailure", realtimeFailureIdentity]]), new Map([
|
|
186
|
+
["RealtimeFailureAction", realtimeFailureActionInfo],
|
|
187
|
+
["RealtimePeerState", realtimePeerStateInfo],
|
|
188
|
+
]), new Map([["RealtimeBackpressureError", realtimeBackpressureClass]]), new Map([["RealtimeFailure", new Set(realtimeFailureFields.keys())]]), realtimeGenericTypes);
|
|
54
189
|
const composedModuleInterfaces = new Map(nodeModuleInterfaces);
|
|
55
190
|
composedModuleInterfaces.set("velar/server", serverModuleInterface);
|
|
191
|
+
composedModuleInterfaces.set("velar/realtime", serverRealtimeModuleInterface);
|
|
56
192
|
export const serverModuleInterfaces = composedModuleInterfaces;
|
|
57
193
|
const composedModuleSources = new Map(nodeModuleSources);
|
|
58
194
|
composedModuleSources.set("velar/server", String.raw `
|
|
@@ -60,9 +196,11 @@ ${VELAR_STRICT_JSON_RUNTIME}
|
|
|
60
196
|
${VELAR_TYPE_REGISTRY_RUNTIME}
|
|
61
197
|
${VELAR_SERVER_RUNTIME}
|
|
62
198
|
`.trimStart());
|
|
199
|
+
composedModuleSources.set("velar/realtime", VELAR_SERVER_REALTIME_RUNTIME);
|
|
63
200
|
export const serverModuleSources = composedModuleSources;
|
|
64
201
|
const serverModuleDependencies = new Map(nodeModuleDependencies);
|
|
65
202
|
serverModuleDependencies.set("velar/server", ["velar/fs", "velar/serve"]);
|
|
203
|
+
serverModuleDependencies.set("velar/realtime", ["velar/websocket"]);
|
|
66
204
|
export const velarCompilerExtension = Object.freeze({
|
|
67
205
|
id: "@velarscript/server",
|
|
68
206
|
contract: Object.freeze({
|
package/dist/compiler.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compiler.js","sourceRoot":"","sources":["../src/compiler.ts"],"names":[],"mappings":"AAAA,OAAO,EAIN,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,yBAAyB,EACzB,2BAA2B,GAE5B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EACtB,oBAAoB,EACpB,iBAAiB,EACjB,0BAA0B,GAC3B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAEpD,MAAM,CAAC,MAAM,wBAAwB,GAAG,MAAM,CAAC;AAE/C,MAAM,WAAW,GAAc,EAAC,IAAI,EAAE,SAAS,EAAC,CAAC;AACjD,MAAM,UAAU,GAAc,EAAC,IAAI,EAAE,QAAQ,EAAC,CAAC;AAC/C,MAAM,UAAU,GAAc,EAAC,IAAI,EAAE,QAAQ,EAAC,CAAC;AAC/C,MAAM,UAAU,GAAc,EAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,yBAAyB,EAAC,CAAC;AACnG,MAAM,YAAY,GAAc,EAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,2BAA2B,EAAC,CAAC;AACzG,MAAM,YAAY,GAAc;IAC9B,IAAI,EAAE,WAAW;IACjB,WAAW,EAAE,mBAAmB;IAChC,MAAM,EAAE,gBAAgB;IACxB,IAAI,EAAE,UAAU;IAChB,UAAU,EAAE,IAAI,GAAG,EAAE;IACrB,kBAAkB,EAAE,IAAI,GAAG,EAAE;IAC7B,SAAS,EAAE,CAAC,WAAW,EAAE,WAAW,CAAC;IACrC,OAAO,EAAE,EAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE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E,0BAA0B,CAAC,MAAO;IAC1C,MAAM,EAAE,0BAA0B,CAAC,MAAO;IAC1C,QAAQ,EAAE,0BAA0B,CAAC,QAAS;IAC9C,QAAQ,EAAE,0BAA0B,CAAC,QAAS;IAC9C,UAAU,EAAE,0BAA0B,CAAC,UAAW;IAClD,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC;QACtB,GAAG,0BAA0B,CAAC,QAAQ;QACtC,cAAc,CAAC,OAAyC;YACtD,OAAO,oBAAoB,CAAC,OAAO,CAAC,IAAI,0BAA0B,CAAC,QAAQ,EAAE,cAAc,EAAE,CAAC,OAAO,CAAC,CAAC;QACzG,CAAC;KACF,CAAC;IACF,MAAM,EAAE,0BAA0B,CAAC,MAAO;IAC1C,aAAa,EAAE,0BAA0B,CAAC,aAAc;IACxD,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC;QACrB,UAAU,EAAE,wBAAwB;QACpC,UAAU,EAAE,sBAAsB;QAClC,OAAO,EAAE,mBAAmB;QAC5B,YAAY,EAAE,wBAAwB;KACvC,CAAC;CACH,CAAC,CAAC;AAEH,OAAO,EAAC,qBAAqB,EAAyB,MAAM,qBAAqB,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { VELAR_SERVER_API_VERSION } from "./compiler.ts";
|
|
2
2
|
export { velarProjectExtension, type VelarServerConfig } from "./project-config.ts";
|
|
3
|
-
export declare const VELAR_SERVER_MODULES: readonly ["velar/server"];
|
|
3
|
+
export declare const VELAR_SERVER_MODULES: readonly ["velar/server", "velar/realtime"];
|
|
4
4
|
export declare const VELAR_SERVER_CONFIGURATION_FILES: readonly ["application.yml"];
|
|
5
5
|
export interface VelarServerFrameworkManifest {
|
|
6
6
|
readonly name: "@velarscript/server";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAC,qBAAqB,EAAE,KAAK,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AAElF,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAC,qBAAqB,EAAE,KAAK,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AAElF,eAAO,MAAM,oBAAoB,6CAGtB,CAAC;AAEZ,eAAO,MAAM,gCAAgC,8BAElC,CAAC;AAEZ,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,IAAI,EAAE,qBAAqB,CAAC;IACrC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,OAAO,EAAE,OAAO,oBAAoB,CAAC;IAC9C,QAAQ,CAAC,kBAAkB,EAAE,OAAO,gCAAgC,CAAC;CACtE;AAED,eAAO,MAAM,oBAAoB,EAAE,4BAKjC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -3,6 +3,7 @@ export { VELAR_SERVER_API_VERSION } from "./compiler.js";
|
|
|
3
3
|
export { velarProjectExtension } from "./project-config.js";
|
|
4
4
|
export const VELAR_SERVER_MODULES = Object.freeze([
|
|
5
5
|
"velar/server",
|
|
6
|
+
"velar/realtime",
|
|
6
7
|
]);
|
|
7
8
|
export const VELAR_SERVER_CONFIGURATION_FILES = Object.freeze([
|
|
8
9
|
"application.yml",
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAEzD,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAC,qBAAqB,EAAyB,MAAM,qBAAqB,CAAC;AAElF,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,MAAM,CAAC;IAChD,cAAc;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAEzD,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAC,qBAAqB,EAAyB,MAAM,qBAAqB,CAAC;AAElF,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,MAAM,CAAC;IAChD,cAAc;IACd,gBAAgB;CACR,CAAC,CAAC;AAEZ,MAAM,CAAC,MAAM,gCAAgC,GAAG,MAAM,CAAC,MAAM,CAAC;IAC5D,iBAAiB;CACT,CAAC,CAAC;AASZ,MAAM,CAAC,MAAM,oBAAoB,GAAiC,MAAM,CAAC,MAAM,CAAC;IAC9E,IAAI,EAAE,qBAAqB;IAC3B,UAAU,EAAE,wBAAwB;IACpC,OAAO,EAAE,oBAAoB;IAC7B,kBAAkB,EAAE,gCAAgC;CACrD,CAAC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Application-level WebSocket session ownership for the server target of
|
|
3
|
+
* `velar/realtime`.
|
|
4
|
+
*
|
|
5
|
+
* The Node target still owns frames and the physical connection. This layer
|
|
6
|
+
* owns the repeatable application pattern: one bounded outbound mailbox, one
|
|
7
|
+
* writer, sequential inbound dispatch, deterministic cleanup, and one public
|
|
8
|
+
* failure policy. Codecs and business delivery guarantees remain application
|
|
9
|
+
* values.
|
|
10
|
+
*/
|
|
11
|
+
export declare const VELAR_SERVER_REALTIME_RUNTIME: string;
|
|
12
|
+
//# sourceMappingURL=realtime-runtime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"realtime-runtime.d.ts","sourceRoot":"","sources":["../src/realtime-runtime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,eAAO,MAAM,6BAA6B,QAoY7B,CAAC"}
|
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Application-level WebSocket session ownership for the server target of
|
|
3
|
+
* `velar/realtime`.
|
|
4
|
+
*
|
|
5
|
+
* The Node target still owns frames and the physical connection. This layer
|
|
6
|
+
* owns the repeatable application pattern: one bounded outbound mailbox, one
|
|
7
|
+
* writer, sequential inbound dispatch, deterministic cleanup, and one public
|
|
8
|
+
* failure policy. Codecs and business delivery guarantees remain application
|
|
9
|
+
* values.
|
|
10
|
+
*/
|
|
11
|
+
export const VELAR_SERVER_REALTIME_RUNTIME = String.raw `
|
|
12
|
+
import { WebSocketClosedError as __velarRealtimeTransportClosed, WebSocketConnection as __velarRealtimeConnection } from "velar/websocket";
|
|
13
|
+
|
|
14
|
+
const __velarRealtimePeers = new WeakMap();
|
|
15
|
+
const __velarRealtimeApply = Reflect.apply;
|
|
16
|
+
const __velarRealtimeArray = Array;
|
|
17
|
+
const __velarRealtimeArrayIsArray = Array.isArray;
|
|
18
|
+
const __velarRealtimeFreeze = Object.freeze;
|
|
19
|
+
const __velarRealtimeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
20
|
+
const __velarRealtimeGetOwnPropertyNames = Object.getOwnPropertyNames;
|
|
21
|
+
const __velarRealtimeArrayIncludes = Array.prototype.includes;
|
|
22
|
+
const __velarRealtimeNumberIsSafeInteger = Number.isSafeInteger;
|
|
23
|
+
const __velarRealtimePromise = Promise;
|
|
24
|
+
const __velarRealtimePromiseReject = Promise.reject;
|
|
25
|
+
const __velarRealtimePromiseThen = Promise.prototype.then;
|
|
26
|
+
const __velarRealtimeStringCharCodeAt = String.prototype.charCodeAt;
|
|
27
|
+
const __velarRealtimeWeakMapGet = WeakMap.prototype.get;
|
|
28
|
+
const __velarRealtimeWeakMapHas = WeakMap.prototype.has;
|
|
29
|
+
const __velarRealtimeWeakMapSet = WeakMap.prototype.set;
|
|
30
|
+
const __velarRealtimeSetTimeout = globalThis.setTimeout;
|
|
31
|
+
const __velarRealtimeClearTimeout = globalThis.clearTimeout;
|
|
32
|
+
const __velarRealtimeOptionNames = __velarRealtimeFreeze(["maxQueuedMessages", "maxQueuedBytes", "drainTimeout"]);
|
|
33
|
+
const __velarRealtimeDefaultQueuedMessages = 64;
|
|
34
|
+
const __velarRealtimeDefaultQueuedBytes = 1024 * 1024;
|
|
35
|
+
const __velarRealtimeDefaultDrainTimeout = 5000;
|
|
36
|
+
|
|
37
|
+
export class RealtimeBackpressureError extends Error {
|
|
38
|
+
constructor(message = "Realtime session outbound queue is full") { super(message); this.name = "RealtimeBackpressureError"; }
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function __velarRealtimeCall(operation, receiver, arguments_) {
|
|
42
|
+
return __velarRealtimeApply(operation, receiver, arguments_);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function __velarRealtimeRejected(failure) {
|
|
46
|
+
return __velarRealtimeCall(__velarRealtimePromiseReject, __velarRealtimePromise, [failure]);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function __velarRealtimeRecord(value, label, allowed = null) {
|
|
50
|
+
if (value === null || typeof value !== "object" || __velarRealtimeCall(__velarRealtimeArrayIsArray, Array, [value])) {
|
|
51
|
+
throw new TypeError(label + " must be a record");
|
|
52
|
+
}
|
|
53
|
+
const names = __velarRealtimeCall(__velarRealtimeGetOwnPropertyNames, Object, [value]);
|
|
54
|
+
for (let index = 0; index < names.length; index += 1) {
|
|
55
|
+
const name = names[index];
|
|
56
|
+
if (allowed !== null && !__velarRealtimeCall(__velarRealtimeArrayIncludes, allowed, [name])) throw new TypeError(label + " has unknown field '" + name + "'");
|
|
57
|
+
const descriptor = __velarRealtimeCall(__velarRealtimeGetOwnPropertyDescriptor, Object, [value, name]);
|
|
58
|
+
if (!descriptor?.enumerable || !("value" in descriptor)) throw new TypeError(label + " fields must be enumerable data values");
|
|
59
|
+
}
|
|
60
|
+
return value;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function __velarRealtimeOption(options, name) {
|
|
64
|
+
const descriptor = __velarRealtimeCall(__velarRealtimeGetOwnPropertyDescriptor, Object, [options, name]);
|
|
65
|
+
return descriptor && "value" in descriptor ? descriptor.value : undefined;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function __velarRealtimeInteger(value, fallback, minimum, maximum, label) {
|
|
69
|
+
if (value === undefined || value === null) return fallback;
|
|
70
|
+
if (!__velarRealtimeCall(__velarRealtimeNumberIsSafeInteger, Number, [value]) || value < minimum || value > maximum) {
|
|
71
|
+
throw new RangeError(label + " must be an integer from " + minimum + " through " + maximum);
|
|
72
|
+
}
|
|
73
|
+
return value;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function __velarRealtimeDuration(value, fallback, label) {
|
|
77
|
+
if (value === undefined || value === null) return fallback;
|
|
78
|
+
if (typeof value !== "string") throw new TypeError(label + " must be Duration");
|
|
79
|
+
const match = /^([+-]?(?:\d+(?:\.\d+)?|\.\d+))(ms|s)$/.exec(value);
|
|
80
|
+
if (!match) throw new TypeError(label + " must be Duration such as 5s");
|
|
81
|
+
const milliseconds = Number(match[1]) * (match[2] === "s" ? 1000 : 1);
|
|
82
|
+
if (!Number.isFinite(milliseconds) || milliseconds < 0 || milliseconds > 2147483647) {
|
|
83
|
+
throw new RangeError(label + " is outside the supported range");
|
|
84
|
+
}
|
|
85
|
+
return milliseconds;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function __velarRealtimeOptions(value = {}) {
|
|
89
|
+
const options = __velarRealtimeRecord(value, "Realtime session options", __velarRealtimeOptionNames);
|
|
90
|
+
return __velarRealtimeFreeze({
|
|
91
|
+
maxQueuedMessages: __velarRealtimeInteger(__velarRealtimeOption(options, "maxQueuedMessages"), __velarRealtimeDefaultQueuedMessages, 1, 10000, "Realtime maxQueuedMessages"),
|
|
92
|
+
maxQueuedBytes: __velarRealtimeInteger(__velarRealtimeOption(options, "maxQueuedBytes"), __velarRealtimeDefaultQueuedBytes, 1, 64 * 1024 * 1024, "Realtime maxQueuedBytes"),
|
|
93
|
+
drainTimeout: __velarRealtimeDuration(__velarRealtimeOption(options, "drainTimeout"), __velarRealtimeDefaultDrainTimeout, "Realtime drainTimeout"),
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
function __velarRealtimeCodec(value) {
|
|
98
|
+
const codec = __velarRealtimeRecord(value, "Realtime codec", ["decode", "encode"]);
|
|
99
|
+
const decode = __velarRealtimeOption(codec, "decode");
|
|
100
|
+
const encode = __velarRealtimeOption(codec, "encode");
|
|
101
|
+
if (typeof decode !== "function" || typeof encode !== "function") {
|
|
102
|
+
throw new TypeError("Realtime codec requires decode and encode functions");
|
|
103
|
+
}
|
|
104
|
+
return __velarRealtimeFreeze({decode, encode});
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
function __velarRealtimeCallback(value, label) {
|
|
108
|
+
if (value !== null && typeof value !== "function") throw new TypeError(label + " must be a function or null");
|
|
109
|
+
return value;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
function __velarRealtimeUtf8Size(value, maximum) {
|
|
113
|
+
let size = 0;
|
|
114
|
+
for (let index = 0; index < value.length; index += 1) {
|
|
115
|
+
const code = __velarRealtimeCall(__velarRealtimeStringCharCodeAt, value, [index]);
|
|
116
|
+
if (code < 0x80) size += 1;
|
|
117
|
+
else if (code < 0x800) size += 2;
|
|
118
|
+
else if (code >= 0xd800 && code <= 0xdbff && index + 1 < value.length) {
|
|
119
|
+
const following = __velarRealtimeCall(__velarRealtimeStringCharCodeAt, value, [index + 1]);
|
|
120
|
+
if (following >= 0xdc00 && following <= 0xdfff) { size += 4; index += 1; }
|
|
121
|
+
else size += 3;
|
|
122
|
+
} else size += 3;
|
|
123
|
+
if (size > maximum) return size;
|
|
124
|
+
}
|
|
125
|
+
return size;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
function __velarRealtimeMessage(value, label, maximum) {
|
|
129
|
+
if (typeof value === "string") {
|
|
130
|
+
const size = __velarRealtimeUtf8Size(value, maximum);
|
|
131
|
+
return size > maximum ? null : {wire: value, size};
|
|
132
|
+
}
|
|
133
|
+
if (value instanceof Uint8Array) {
|
|
134
|
+
if (value.byteLength > maximum) return null;
|
|
135
|
+
const wire = new Uint8Array(value.byteLength);
|
|
136
|
+
wire.set(value);
|
|
137
|
+
return {wire, size: wire.byteLength};
|
|
138
|
+
}
|
|
139
|
+
throw new TypeError(label + " must be text or Bytes");
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
function __velarRealtimeFailure(phase, failure, recoverable) {
|
|
143
|
+
const error = failure instanceof Error ? failure : new Error("Realtime " + phase + " failed");
|
|
144
|
+
return __velarRealtimeFreeze({phase, error, recoverable});
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
function __velarRealtimePeerState(peer) {
|
|
148
|
+
const state = __velarRealtimeCall(__velarRealtimeWeakMapGet, __velarRealtimePeers, [peer]);
|
|
149
|
+
if (!state) throw new TypeError("RealtimePeer method requires a RealtimePeer receiver");
|
|
150
|
+
return state;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
function __velarRealtimeRejectQueued(state, failure) {
|
|
154
|
+
while (state.queueSize > 0) {
|
|
155
|
+
const entry = state.queue[state.queueHead];
|
|
156
|
+
state.queue[state.queueHead] = null;
|
|
157
|
+
state.queueHead = (state.queueHead + 1) % state.queue.length;
|
|
158
|
+
state.queueSize -= 1;
|
|
159
|
+
state.queuedBytes -= entry.size;
|
|
160
|
+
entry.reject(failure);
|
|
161
|
+
}
|
|
162
|
+
state.queueHead = 0;
|
|
163
|
+
state.queuedBytes = 0;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
function __velarRealtimeWake(state) {
|
|
167
|
+
if (state.wake !== null) { const wake = state.wake; state.wake = null; wake(null); }
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
function __velarRealtimeEnqueue(state, value, observed) {
|
|
171
|
+
if (!state.accepting) {
|
|
172
|
+
if (observed) return __velarRealtimeRejected(new __velarRealtimeTransportClosed("Realtime session is closing"));
|
|
173
|
+
return false;
|
|
174
|
+
}
|
|
175
|
+
if (state.queueSize >= state.options.maxQueuedMessages) {
|
|
176
|
+
if (observed) return __velarRealtimeRejected(new RealtimeBackpressureError());
|
|
177
|
+
return false;
|
|
178
|
+
}
|
|
179
|
+
let message;
|
|
180
|
+
try {
|
|
181
|
+
const remaining = state.options.maxQueuedBytes - state.queuedBytes;
|
|
182
|
+
message = __velarRealtimeMessage(__velarRealtimeCall(state.codec.encode, undefined, [value]), "Realtime codec encode result", remaining);
|
|
183
|
+
}
|
|
184
|
+
catch (failure) {
|
|
185
|
+
state.writeFailure ??= __velarRealtimeFailure("encode", failure, false);
|
|
186
|
+
state.accepting = false;
|
|
187
|
+
__velarRealtimeWake(state);
|
|
188
|
+
if (observed) return __velarRealtimeRejected(state.writeFailure.error);
|
|
189
|
+
throw state.writeFailure.error;
|
|
190
|
+
}
|
|
191
|
+
if (message === null) {
|
|
192
|
+
if (observed) return __velarRealtimeRejected(new RealtimeBackpressureError());
|
|
193
|
+
return false;
|
|
194
|
+
}
|
|
195
|
+
const position = (state.queueHead + state.queueSize) % state.queue.length;
|
|
196
|
+
if (!observed) {
|
|
197
|
+
state.queue[position] = {wire: message.wire, size: message.size, resolve: () => {}, reject: () => {}};
|
|
198
|
+
state.queueSize += 1;
|
|
199
|
+
state.queuedBytes += message.size;
|
|
200
|
+
__velarRealtimeWake(state);
|
|
201
|
+
return true;
|
|
202
|
+
}
|
|
203
|
+
return new __velarRealtimePromise((resolve, reject) => {
|
|
204
|
+
state.queue[position] = {wire: message.wire, size: message.size, resolve, reject};
|
|
205
|
+
state.queueSize += 1;
|
|
206
|
+
state.queuedBytes += message.size;
|
|
207
|
+
__velarRealtimeWake(state);
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
const __velarRealtimePeerPrototype = __velarRealtimeFreeze({
|
|
212
|
+
state() {
|
|
213
|
+
const state = __velarRealtimePeerState(this);
|
|
214
|
+
if (state.done) return "closed";
|
|
215
|
+
if (!state.accepting) return "closing";
|
|
216
|
+
return "open";
|
|
217
|
+
},
|
|
218
|
+
send(value) { return __velarRealtimeEnqueue(__velarRealtimePeerState(this), value, true); },
|
|
219
|
+
trySend(value) { return __velarRealtimeEnqueue(__velarRealtimePeerState(this), value, false); },
|
|
220
|
+
close(code = 1000, reason = "") {
|
|
221
|
+
const state = __velarRealtimePeerState(this);
|
|
222
|
+
if (!__velarRealtimeCall(__velarRealtimeNumberIsSafeInteger, Number, [code]) || code < 1000 || code > 4999) {
|
|
223
|
+
return __velarRealtimeRejected(new RangeError("Realtime close code must be from 1000 through 4999"));
|
|
224
|
+
}
|
|
225
|
+
if (typeof reason !== "string" || __velarRealtimeUtf8Size(reason, 123) > 123) {
|
|
226
|
+
return __velarRealtimeRejected(new RangeError("Realtime close reason cannot exceed 123 UTF-8 bytes"));
|
|
227
|
+
}
|
|
228
|
+
if (!state.done && state.requestedClose === null) state.requestedClose = {code, reason};
|
|
229
|
+
state.accepting = false;
|
|
230
|
+
__velarRealtimeWake(state);
|
|
231
|
+
return state.closePromise;
|
|
232
|
+
},
|
|
233
|
+
});
|
|
234
|
+
|
|
235
|
+
function __velarRealtimeCreatePeer(connection, codec, options) {
|
|
236
|
+
let resolveClose;
|
|
237
|
+
const closePromise = new __velarRealtimePromise(resolve => { resolveClose = resolve; });
|
|
238
|
+
const peer = Object.create(__velarRealtimePeerPrototype);
|
|
239
|
+
const state = {connection, codec, options, queue: new __velarRealtimeArray(options.maxQueuedMessages), queueHead: 0, queueSize: 0, queuedBytes: 0, wake: null, accepting: true, done: false, requestedClose: null, writeFailure: null, closePromise, resolveClose};
|
|
240
|
+
__velarRealtimeCall(__velarRealtimeWeakMapSet, __velarRealtimePeers, [peer, state]);
|
|
241
|
+
return __velarRealtimeFreeze(peer);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
function __velarRealtimeTimed(source, milliseconds) {
|
|
245
|
+
if (milliseconds === 0) return source;
|
|
246
|
+
return new __velarRealtimePromise((resolve, reject) => {
|
|
247
|
+
let settled = false;
|
|
248
|
+
const timer = __velarRealtimeSetTimeout(() => {
|
|
249
|
+
if (settled) return;
|
|
250
|
+
settled = true;
|
|
251
|
+
reject(new RealtimeBackpressureError("Realtime session did not drain before its deadline"));
|
|
252
|
+
}, milliseconds);
|
|
253
|
+
__velarRealtimeCall(__velarRealtimePromiseThen, source, [
|
|
254
|
+
value => { if (!settled) { settled = true; __velarRealtimeClearTimeout(timer); resolve(value); } },
|
|
255
|
+
failure => { if (!settled) { settled = true; __velarRealtimeClearTimeout(timer); reject(failure); } },
|
|
256
|
+
]);
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
async function __velarRealtimeWrite(peer) {
|
|
261
|
+
const state = __velarRealtimePeerState(peer);
|
|
262
|
+
try {
|
|
263
|
+
while (state.accepting || state.queueSize > 0) {
|
|
264
|
+
if (state.queueSize === 0) {
|
|
265
|
+
await new __velarRealtimePromise(resolve => { state.wake = resolve; });
|
|
266
|
+
continue;
|
|
267
|
+
}
|
|
268
|
+
const entry = state.queue[state.queueHead];
|
|
269
|
+
state.queue[state.queueHead] = null;
|
|
270
|
+
state.queueHead = (state.queueHead + 1) % state.queue.length;
|
|
271
|
+
state.queueSize -= 1;
|
|
272
|
+
state.queuedBytes -= entry.size;
|
|
273
|
+
try {
|
|
274
|
+
await __velarRealtimeTimed(state.connection.send(entry.wire), state.options.drainTimeout);
|
|
275
|
+
entry.resolve(null);
|
|
276
|
+
} catch (failure) {
|
|
277
|
+
entry.reject(failure);
|
|
278
|
+
state.writeFailure = __velarRealtimeFailure("send", failure, false);
|
|
279
|
+
state.accepting = false;
|
|
280
|
+
__velarRealtimeRejectQueued(state, state.writeFailure.error);
|
|
281
|
+
break;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
} finally {
|
|
285
|
+
const close = state.requestedClose ?? (state.writeFailure === null ? {code: 1000, reason: "Realtime session finished"} : {code: 1011, reason: "Realtime send failed"});
|
|
286
|
+
try { await state.connection.close(close.code, close.reason); } catch {}
|
|
287
|
+
state.resolveClose(null);
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
async function __velarRealtimeFailureAction(callback, failure, peer) {
|
|
292
|
+
if (callback === null) return "close";
|
|
293
|
+
const action = await callback(failure, peer);
|
|
294
|
+
if (action !== "continue" && action !== "close") throw new TypeError("Realtime failure callback must return RealtimeFailureAction.continue or RealtimeFailureAction.close");
|
|
295
|
+
if (!failure.recoverable && action === "continue") return "close";
|
|
296
|
+
return action;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
export async function realtimeSession(connection, codec, receive, opened = null, failed = null, closed = null, options = {}) {
|
|
300
|
+
connection = __velarRealtimeConnection.parse(connection);
|
|
301
|
+
codec = __velarRealtimeCodec(codec);
|
|
302
|
+
if (typeof receive !== "function") throw new TypeError("realtimeSession receive must be a function");
|
|
303
|
+
opened = __velarRealtimeCallback(opened, "realtimeSession opened");
|
|
304
|
+
failed = __velarRealtimeCallback(failed, "realtimeSession failed");
|
|
305
|
+
closed = __velarRealtimeCallback(closed, "realtimeSession closed");
|
|
306
|
+
const peer = __velarRealtimeCreatePeer(connection, codec, __velarRealtimeOptions(options));
|
|
307
|
+
const state = __velarRealtimePeerState(peer);
|
|
308
|
+
const writer = __velarRealtimeWrite(peer);
|
|
309
|
+
let cleanup = null;
|
|
310
|
+
let terminalFailure = null;
|
|
311
|
+
let terminalFailureReported = false;
|
|
312
|
+
try {
|
|
313
|
+
if (opened !== null) {
|
|
314
|
+
try {
|
|
315
|
+
cleanup = await opened(peer);
|
|
316
|
+
if (cleanup !== null && typeof cleanup !== "function") throw new TypeError("realtimeSession opened must resolve to a cleanup function or null");
|
|
317
|
+
} catch (failure) {
|
|
318
|
+
terminalFailure = __velarRealtimeFailure("opened", failure, false);
|
|
319
|
+
terminalFailureReported = true;
|
|
320
|
+
try { await __velarRealtimeFailureAction(failed, terminalFailure, peer); }
|
|
321
|
+
finally { state.requestedClose = {code: 1011, reason: "Realtime session setup failed"}; }
|
|
322
|
+
return null;
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
while (state.accepting) {
|
|
326
|
+
let wire;
|
|
327
|
+
try { wire = await connection.next(); }
|
|
328
|
+
catch (failure) { terminalFailure = __velarRealtimeFailure("transport", failure, false); break; }
|
|
329
|
+
if (wire === null) break;
|
|
330
|
+
let message;
|
|
331
|
+
try { message = __velarRealtimeCall(codec.decode, undefined, [wire]); }
|
|
332
|
+
catch (failure) {
|
|
333
|
+
const decoded = __velarRealtimeFailure("decode", failure, true);
|
|
334
|
+
if (await __velarRealtimeFailureAction(failed, decoded, peer) === "continue") continue;
|
|
335
|
+
state.requestedClose = {code: 1007, reason: "Realtime message is invalid"};
|
|
336
|
+
break;
|
|
337
|
+
}
|
|
338
|
+
try { await receive(message, peer); }
|
|
339
|
+
catch (failure) {
|
|
340
|
+
const handled = __velarRealtimeFailure("receive", failure, true);
|
|
341
|
+
if (await __velarRealtimeFailureAction(failed, handled, peer) === "continue") continue;
|
|
342
|
+
state.requestedClose = {code: 1011, reason: "Realtime command failed"};
|
|
343
|
+
break;
|
|
344
|
+
}
|
|
345
|
+
if (state.writeFailure !== null) { terminalFailure = state.writeFailure; break; }
|
|
346
|
+
}
|
|
347
|
+
} finally {
|
|
348
|
+
state.accepting = false;
|
|
349
|
+
__velarRealtimeWake(state);
|
|
350
|
+
let cleanupFailure = null;
|
|
351
|
+
if (cleanup !== null) {
|
|
352
|
+
try { await cleanup(); }
|
|
353
|
+
catch (failure) { cleanupFailure = failure; }
|
|
354
|
+
}
|
|
355
|
+
try { await writer; }
|
|
356
|
+
catch (failure) { terminalFailure ??= __velarRealtimeFailure("send", failure, false); }
|
|
357
|
+
const close = await connection.closeInfo();
|
|
358
|
+
state.done = true;
|
|
359
|
+
if (terminalFailure !== null && failed !== null && terminalFailure !== state.writeFailure && !terminalFailureReported) {
|
|
360
|
+
try { await __velarRealtimeFailureAction(failed, terminalFailure, peer); } catch {}
|
|
361
|
+
}
|
|
362
|
+
if (closed !== null) await closed(peer, close);
|
|
363
|
+
if (cleanupFailure !== null) throw cleanupFailure;
|
|
364
|
+
}
|
|
365
|
+
return null;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
const __velarRealtimePeerType = __velarRealtimeFreeze({
|
|
369
|
+
is(value) { return __velarRealtimeCall(__velarRealtimeWeakMapHas, __velarRealtimePeers, [value]); },
|
|
370
|
+
parse(value) { if (!this.is(value)) throw new TypeError("Value does not match RealtimePeer"); return value; },
|
|
371
|
+
});
|
|
372
|
+
const __velarRealtimeCodecType = __velarRealtimeFreeze({
|
|
373
|
+
is(value) { try { __velarRealtimeCodec(value); return true; } catch { return false; } },
|
|
374
|
+
parse(value) { return __velarRealtimeCodec(value); },
|
|
375
|
+
});
|
|
376
|
+
const __velarRealtimeFailureType = __velarRealtimeFreeze({
|
|
377
|
+
is(value) { return value !== null && typeof value === "object" && typeof value.phase === "string" && value.error instanceof Error && typeof value.recoverable === "boolean"; },
|
|
378
|
+
parse(value) { if (!this.is(value)) throw new TypeError("Value does not match RealtimeFailure"); return value; },
|
|
379
|
+
});
|
|
380
|
+
|
|
381
|
+
export const RealtimePeer = __velarRealtimeFreeze({...__velarRealtimePeerType, of() { return __velarRealtimePeerType; }});
|
|
382
|
+
export const RealtimeCodec = __velarRealtimeFreeze({...__velarRealtimeCodecType, of() { return __velarRealtimeCodecType; }});
|
|
383
|
+
export const RealtimeFailure = __velarRealtimeFailureType;
|
|
384
|
+
export const RealtimeFailureAction = __velarRealtimeFreeze({
|
|
385
|
+
continue: "continue",
|
|
386
|
+
close: "close",
|
|
387
|
+
is(value) { return value === "continue" || value === "close"; },
|
|
388
|
+
parse(value) { if (!this.is(value)) throw new TypeError("Value does not match RealtimeFailureAction"); return value; },
|
|
389
|
+
values() { return ["continue", "close"]; },
|
|
390
|
+
});
|
|
391
|
+
export const RealtimePeerState = __velarRealtimeFreeze({
|
|
392
|
+
open: "open",
|
|
393
|
+
closing: "closing",
|
|
394
|
+
closed: "closed",
|
|
395
|
+
is(value) { return value === "open" || value === "closing" || value === "closed"; },
|
|
396
|
+
parse(value) { if (!this.is(value)) throw new TypeError("Value does not match RealtimePeerState"); return value; },
|
|
397
|
+
values() { return ["open", "closing", "closed"]; },
|
|
398
|
+
});
|
|
399
|
+
`.trimStart();
|
|
400
|
+
//# sourceMappingURL=realtime-runtime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"realtime-runtime.js","sourceRoot":"","sources":["../src/realtime-runtime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoYtD,CAAC,SAAS,EAAE,CAAC"}
|
package/dist/runtime.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,oBAAoB,QAiLpB,CAAC"}
|
package/dist/runtime.js
CHANGED
package/dist/runtime.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.js","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,4EAA4E;AAC5E,sEAAsE;
|
|
1
|
+
{"version":3,"file":"runtime.js","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,4EAA4E;AAC5E,sEAAsE;AAEtE,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiL7C,CAAC,SAAS,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@velarscript/server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.0",
|
|
4
4
|
"description": "The official convention-based VelarScript server application framework.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -27,16 +27,16 @@
|
|
|
27
27
|
"velar": {
|
|
28
28
|
"extension": {
|
|
29
29
|
"kind": "application",
|
|
30
|
-
"apiVersion": "0.
|
|
30
|
+
"apiVersion": "0.14",
|
|
31
31
|
"manifestKey": "server",
|
|
32
32
|
"composes": {
|
|
33
|
-
"@velarscript/node": "0.
|
|
33
|
+
"@velarscript/node": "0.14"
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@velarscript/compiler": "0.
|
|
39
|
-
"@velarscript/node": "0.
|
|
38
|
+
"@velarscript/compiler": "0.19.0",
|
|
39
|
+
"@velarscript/node": "0.19.0",
|
|
40
40
|
"yaml": "^2.9.0"
|
|
41
41
|
},
|
|
42
42
|
"exports": {
|