capnweb 0.0.0-6d805d4 → 0.0.0-76fdff1

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,2 +1,2 @@
1
- export { RpcPromise, RpcSession, RpcSessionOptions, RpcStub, RpcTarget, RpcTransport, deserialize, newHttpBatchRpcResponse, newHttpBatchRpcSession, newMessagePortRpcSession, newWebSocketRpcSession, newWorkersRpcResponse, newWorkersWebSocketRpcResponse, nodeHttpBatchRpcResponse, serialize } from './index.cjs';
1
+ export { RpcCompatible, RpcPromise, RpcSession, RpcSessionOptions, RpcStub, RpcTarget, RpcTransport, deserialize, newHttpBatchRpcResponse, newHttpBatchRpcSession, newMessagePortRpcSession, newWebSocketRpcSession, newWorkersRpcResponse, newWorkersWebSocketRpcResponse, nodeHttpBatchRpcResponse, serialize } from './index.cjs';
2
2
  import 'node:http';
@@ -1,2 +1,2 @@
1
- export { RpcPromise, RpcSession, RpcSessionOptions, RpcStub, RpcTarget, RpcTransport, deserialize, newHttpBatchRpcResponse, newHttpBatchRpcSession, newMessagePortRpcSession, newWebSocketRpcSession, newWorkersRpcResponse, newWorkersWebSocketRpcResponse, nodeHttpBatchRpcResponse, serialize } from './index.js';
1
+ export { RpcCompatible, RpcPromise, RpcSession, RpcSessionOptions, RpcStub, RpcTarget, RpcTransport, deserialize, newHttpBatchRpcResponse, newHttpBatchRpcSession, newMessagePortRpcSession, newWebSocketRpcSession, newWorkersRpcResponse, newWorkersWebSocketRpcResponse, nodeHttpBatchRpcResponse, serialize } from './index.js';
2
2
  import 'node:http';
@@ -1,15 +1,15 @@
1
1
  import * as cfw from 'cloudflare:workers';
2
2
 
3
3
  // src/symbols.ts
4
- var WORKERS_MODULE_SYMBOL = Symbol("workers-module");
4
+ var WORKERS_MODULE_SYMBOL = /* @__PURE__ */ Symbol("workers-module");
5
5
  globalThis[WORKERS_MODULE_SYMBOL] = cfw;
6
6
 
7
7
  // src/core.ts
8
8
  if (!Symbol.dispose) {
9
- Symbol.dispose = Symbol.for("dispose");
9
+ Symbol.dispose = /* @__PURE__ */ Symbol.for("dispose");
10
10
  }
11
11
  if (!Symbol.asyncDispose) {
12
- Symbol.asyncDispose = Symbol.for("asyncDispose");
12
+ Symbol.asyncDispose = /* @__PURE__ */ Symbol.for("asyncDispose");
13
13
  }
14
14
  if (!Promise.withResolvers) {
15
15
  Promise.withResolvers = function() {
@@ -25,6 +25,8 @@ if (!Promise.withResolvers) {
25
25
  var workersModule = globalThis[WORKERS_MODULE_SYMBOL];
26
26
  var RpcTarget = workersModule ? workersModule.RpcTarget : class {
27
27
  };
28
+ var AsyncFunction = (async function() {
29
+ }).constructor;
28
30
  function typeForRpc(value) {
29
31
  switch (typeof value) {
30
32
  case "boolean":
@@ -49,6 +51,7 @@ function typeForRpc(value) {
49
51
  case Object.prototype:
50
52
  return "object";
51
53
  case Function.prototype:
54
+ case AsyncFunction.prototype:
52
55
  return "function";
53
56
  case Array.prototype:
54
57
  return "array";
@@ -132,7 +135,7 @@ function withCallInterceptor(interceptor, callback) {
132
135
  doCall = oldValue;
133
136
  }
134
137
  }
135
- var RAW_STUB = Symbol("realStub");
138
+ var RAW_STUB = /* @__PURE__ */ Symbol("realStub");
136
139
  var PROXY_HANDLERS = {
137
140
  apply(target, thisArg, argumentsList) {
138
141
  let stub = target.raw;