capnweb 0.0.0-76fdff1 → 0.0.0-89a706f
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 +0 -4
- package/dist/index-workers.cjs +4 -7
- package/dist/index-workers.cjs.map +1 -1
- package/dist/index-workers.js +4 -7
- package/dist/index-workers.js.map +1 -1
- package/dist/index.cjs +4 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -7
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -642,10 +642,6 @@ function newWebSocketRpcSession(
|
|
|
642
642
|
: Disposable;
|
|
643
643
|
```
|
|
644
644
|
|
|
645
|
-
### HTTP server using Hono
|
|
646
|
-
|
|
647
|
-
If your app is built on [Hono](https://hono.dev/) (on any runtime it supports), check out [`@hono/capnweb`](https://github.com/honojs/middleware/tree/main/packages/capnweb).
|
|
648
|
-
|
|
649
645
|
### MessagePort
|
|
650
646
|
|
|
651
647
|
Cap'n Web can also talk over MessagePorts. This can be used in a browser to talk to Web Workers, iframes, etc.
|
package/dist/index-workers.cjs
CHANGED
|
@@ -23,15 +23,15 @@ function _interopNamespace(e) {
|
|
|
23
23
|
var cfw__namespace = /*#__PURE__*/_interopNamespace(cfw);
|
|
24
24
|
|
|
25
25
|
// src/symbols.ts
|
|
26
|
-
var WORKERS_MODULE_SYMBOL =
|
|
26
|
+
var WORKERS_MODULE_SYMBOL = Symbol("workers-module");
|
|
27
27
|
globalThis[WORKERS_MODULE_SYMBOL] = cfw__namespace;
|
|
28
28
|
|
|
29
29
|
// src/core.ts
|
|
30
30
|
if (!Symbol.dispose) {
|
|
31
|
-
Symbol.dispose =
|
|
31
|
+
Symbol.dispose = Symbol.for("dispose");
|
|
32
32
|
}
|
|
33
33
|
if (!Symbol.asyncDispose) {
|
|
34
|
-
Symbol.asyncDispose =
|
|
34
|
+
Symbol.asyncDispose = Symbol.for("asyncDispose");
|
|
35
35
|
}
|
|
36
36
|
if (!Promise.withResolvers) {
|
|
37
37
|
Promise.withResolvers = function() {
|
|
@@ -47,8 +47,6 @@ if (!Promise.withResolvers) {
|
|
|
47
47
|
var workersModule = globalThis[WORKERS_MODULE_SYMBOL];
|
|
48
48
|
var RpcTarget = workersModule ? workersModule.RpcTarget : class {
|
|
49
49
|
};
|
|
50
|
-
var AsyncFunction = (async function() {
|
|
51
|
-
}).constructor;
|
|
52
50
|
function typeForRpc(value) {
|
|
53
51
|
switch (typeof value) {
|
|
54
52
|
case "boolean":
|
|
@@ -73,7 +71,6 @@ function typeForRpc(value) {
|
|
|
73
71
|
case Object.prototype:
|
|
74
72
|
return "object";
|
|
75
73
|
case Function.prototype:
|
|
76
|
-
case AsyncFunction.prototype:
|
|
77
74
|
return "function";
|
|
78
75
|
case Array.prototype:
|
|
79
76
|
return "array";
|
|
@@ -157,7 +154,7 @@ function withCallInterceptor(interceptor, callback) {
|
|
|
157
154
|
doCall = oldValue;
|
|
158
155
|
}
|
|
159
156
|
}
|
|
160
|
-
var RAW_STUB =
|
|
157
|
+
var RAW_STUB = Symbol("realStub");
|
|
161
158
|
var PROXY_HANDLERS = {
|
|
162
159
|
apply(target, thisArg, argumentsList) {
|
|
163
160
|
let stub = target.raw;
|