@velarscript/server 0.19.0 → 0.20.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.
@@ -1 +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"}
1
+ {"version":3,"file":"realtime-runtime.d.ts","sourceRoot":"","sources":["../src/realtime-runtime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,eAAO,MAAM,6BAA6B,QAsY7B,CAAC"}
@@ -9,7 +9,7 @@
9
9
  * values.
10
10
  */
11
11
  export const VELAR_SERVER_REALTIME_RUNTIME = String.raw `
12
- import { WebSocketClosedError as __velarRealtimeTransportClosed, WebSocketConnection as __velarRealtimeConnection } from "velar/websocket";
12
+ import { WebSocketClosedError as __velarRealtimeTransportClosed, WebSocketConnection as __velarRealtimeConnection, __velarWebSocketSendOwned as __velarRealtimeSendOwned } from "velar/websocket";
13
13
 
14
14
  const __velarRealtimePeers = new WeakMap();
15
15
  const __velarRealtimeApply = Reflect.apply;
@@ -271,7 +271,9 @@ async function __velarRealtimeWrite(peer) {
271
271
  state.queueSize -= 1;
272
272
  state.queuedBytes -= entry.size;
273
273
  try {
274
- await __velarRealtimeTimed(state.connection.send(entry.wire), state.options.drainTimeout);
274
+ // entry.wire 是入队时已复制的框架自有快照。走底层内部 ABI
275
+ // 可避免 WebSocket 公开 send 为防应用篡改而再复制一次 Bytes。
276
+ await __velarRealtimeTimed(__velarRealtimeSendOwned(state.connection, entry.wire), state.options.drainTimeout);
275
277
  entry.resolve(null);
276
278
  } catch (failure) {
277
279
  entry.reject(failure);
@@ -1 +1 @@
1
- {"version":3,"file":"realtime-runtime.js","sourceRoot":"","sources":["../src/realtime-runtime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,6BA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
  {
2
2
  "name": "@velarscript/server",
3
- "version": "0.19.0",
3
+ "version": "0.20.0",
4
4
  "description": "The official convention-based VelarScript server application framework.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -35,8 +35,8 @@
35
35
  }
36
36
  },
37
37
  "dependencies": {
38
- "@velarscript/compiler": "0.19.0",
39
- "@velarscript/node": "0.19.0",
38
+ "@velarscript/compiler": "0.20.0",
39
+ "@velarscript/node": "0.20.0",
40
40
  "yaml": "^2.9.0"
41
41
  },
42
42
  "exports": {