@livestore/devtools-web-common 0.3.2-dev.0 → 0.3.2-dev.5
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/dist/.tsbuildinfo +1 -1
- package/dist/web-channel/index.d.ts +2 -2
- package/dist/web-channel/index.d.ts.map +1 -1
- package/dist/web-channel/index.js +2 -6
- package/dist/web-channel/index.js.map +1 -1
- package/dist/worker/mod.d.ts +2 -2
- package/dist/worker/mod.js +1 -1
- package/package.json +4 -4
- package/src/web-channel/index.ts +4 -7
- package/src/worker/mod.ts +2 -2
|
@@ -2,8 +2,8 @@ import { Devtools, UnexpectedError } from '@livestore/common';
|
|
|
2
2
|
import type { Scope, Worker } from '@livestore/utils/effect';
|
|
3
3
|
import { Effect, Schema, WebChannel } from '@livestore/utils/effect';
|
|
4
4
|
import type { MeshNode } from '@livestore/webmesh';
|
|
5
|
-
import * as WorkerSchema from '../worker/schema.
|
|
6
|
-
export * as WorkerSchema from '../worker/schema.
|
|
5
|
+
import * as WorkerSchema from '../worker/schema.ts';
|
|
6
|
+
export * as WorkerSchema from '../worker/schema.ts';
|
|
7
7
|
declare global {
|
|
8
8
|
var __debugWebmeshNode: any;
|
|
9
9
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/web-channel/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAE7D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAC5D,OAAO,EAAY,MAAM,EAAE,MAAM,EAAU,UAAU,EAAE,MAAM,yBAAyB,CAAA;AACtF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAGlD,OAAO,KAAK,YAAY,MAAM,qBAAqB,CAAA;AAEnD,OAAO,KAAK,YAAY,MAAM,qBAAqB,CAAA;AAE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 @@ import { Devtools, UnexpectedError } from '@livestore/common';
|
|
|
2
2
|
import { LS_DEV } from '@livestore/utils';
|
|
3
3
|
import { Deferred, Effect, Schema, Stream, WebChannel } from '@livestore/utils/effect';
|
|
4
4
|
import { WebmeshSchema } from '@livestore/webmesh';
|
|
5
|
-
import * as WorkerSchema from
|
|
6
|
-
export * as WorkerSchema from
|
|
5
|
+
import * as WorkerSchema from "../worker/schema.js";
|
|
6
|
+
export * as WorkerSchema from "../worker/schema.js";
|
|
7
7
|
export const makeSessionInfoBroadcastChannel = WebChannel.broadcastChannel({
|
|
8
8
|
channelName: 'session-info',
|
|
9
9
|
schema: Devtools.SessionInfo.Message,
|
|
@@ -28,17 +28,13 @@ export const ClientSessionContentscriptMainRes = Schema.TaggedStruct('ClientSess
|
|
|
28
28
|
// Effect.suspend is needed since `window` is not available in the shared worker
|
|
29
29
|
export const makeStaticClientSessionChannel = {
|
|
30
30
|
contentscriptMain: Effect.suspend(() => WebChannel.windowChannel({
|
|
31
|
-
// eslint-disable-next-line unicorn/prefer-global-this
|
|
32
31
|
listenWindow: window,
|
|
33
|
-
// eslint-disable-next-line unicorn/prefer-global-this
|
|
34
32
|
sendWindow: window,
|
|
35
33
|
schema: { listen: ClientSessionContentscriptMainReq, send: ClientSessionContentscriptMainRes },
|
|
36
34
|
ids: { own: 'contentscript-main-static', other: 'client-session-static' },
|
|
37
35
|
})),
|
|
38
36
|
clientSession: Effect.suspend(() => WebChannel.windowChannel({
|
|
39
|
-
// eslint-disable-next-line unicorn/prefer-global-this
|
|
40
37
|
listenWindow: window,
|
|
41
|
-
// eslint-disable-next-line unicorn/prefer-global-this
|
|
42
38
|
sendWindow: window,
|
|
43
39
|
schema: { listen: ClientSessionContentscriptMainRes, send: ClientSessionContentscriptMainReq },
|
|
44
40
|
ids: { own: 'client-session-static', other: 'contentscript-main-static' },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/web-channel/index.ts"],"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|
|
|
1
1
|
import { Context, Layer, Stream } from '@livestore/utils/effect';
|
|
2
2
|
import type { MeshNode } from '@livestore/webmesh';
|
|
3
|
-
import type * as SharedWorkerSchema from './schema.
|
|
4
|
-
export * as Schema from './schema.
|
|
3
|
+
import type * as SharedWorkerSchema from './schema.ts';
|
|
4
|
+
export * as Schema from './schema.ts';
|
|
5
5
|
declare const CacheService_base: Context.TagClass<CacheService, "@livestore/devtools-web-common:CacheService", {
|
|
6
6
|
node: MeshNode;
|
|
7
7
|
}>;
|
package/dist/worker/mod.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LS_DEV } from '@livestore/utils';
|
|
2
2
|
import { Context, Effect, Layer, Stream, WebChannel } from '@livestore/utils/effect';
|
|
3
3
|
import { makeMeshNode, WebmeshSchema } from '@livestore/webmesh';
|
|
4
|
-
export * as Schema from
|
|
4
|
+
export * as Schema from "./schema.js";
|
|
5
5
|
export class CacheService extends Context.Tag('@livestore/devtools-web-common:CacheService')() {
|
|
6
6
|
static layer = ({ nodeName }) => Effect.gen(function* () {
|
|
7
7
|
const node = yield* makeMeshNode(nodeName);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@livestore/devtools-web-common",
|
|
3
|
-
"version": "0.3.2-dev.
|
|
3
|
+
"version": "0.3.2-dev.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"exports": {
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@livestore/common": "0.3.2-dev.
|
|
18
|
-
"@livestore/utils": "0.3.2-dev.
|
|
19
|
-
"@livestore/webmesh": "0.3.2-dev.
|
|
17
|
+
"@livestore/common": "0.3.2-dev.5",
|
|
18
|
+
"@livestore/utils": "0.3.2-dev.5",
|
|
19
|
+
"@livestore/webmesh": "0.3.2-dev.5"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {},
|
|
22
22
|
"files": [
|
package/src/web-channel/index.ts
CHANGED
|
@@ -5,12 +5,11 @@ import { Deferred, Effect, Schema, Stream, WebChannel } from '@livestore/utils/e
|
|
|
5
5
|
import type { MeshNode } from '@livestore/webmesh'
|
|
6
6
|
import { WebmeshSchema } from '@livestore/webmesh'
|
|
7
7
|
|
|
8
|
-
import * as WorkerSchema from '../worker/schema.
|
|
8
|
+
import * as WorkerSchema from '../worker/schema.ts'
|
|
9
9
|
|
|
10
|
-
export * as WorkerSchema from '../worker/schema.
|
|
10
|
+
export * as WorkerSchema from '../worker/schema.ts'
|
|
11
11
|
|
|
12
12
|
declare global {
|
|
13
|
-
// eslint-disable-next-line no-var
|
|
14
13
|
var __debugWebmeshNode: any
|
|
15
14
|
}
|
|
16
15
|
|
|
@@ -47,9 +46,8 @@ export const ClientSessionContentscriptMainRes = Schema.TaggedStruct('ClientSess
|
|
|
47
46
|
export const makeStaticClientSessionChannel = {
|
|
48
47
|
contentscriptMain: Effect.suspend(() =>
|
|
49
48
|
WebChannel.windowChannel({
|
|
50
|
-
// eslint-disable-next-line unicorn/prefer-global-this
|
|
51
49
|
listenWindow: window,
|
|
52
|
-
|
|
50
|
+
|
|
53
51
|
sendWindow: window,
|
|
54
52
|
schema: { listen: ClientSessionContentscriptMainReq, send: ClientSessionContentscriptMainRes },
|
|
55
53
|
ids: { own: 'contentscript-main-static', other: 'client-session-static' },
|
|
@@ -57,9 +55,8 @@ export const makeStaticClientSessionChannel = {
|
|
|
57
55
|
),
|
|
58
56
|
clientSession: Effect.suspend(() =>
|
|
59
57
|
WebChannel.windowChannel({
|
|
60
|
-
// eslint-disable-next-line unicorn/prefer-global-this
|
|
61
58
|
listenWindow: window,
|
|
62
|
-
|
|
59
|
+
|
|
63
60
|
sendWindow: window,
|
|
64
61
|
schema: { listen: ClientSessionContentscriptMainRes, send: ClientSessionContentscriptMainReq },
|
|
65
62
|
ids: { own: 'client-session-static', other: 'contentscript-main-static' },
|
package/src/worker/mod.ts
CHANGED
|
@@ -3,9 +3,9 @@ import { Context, Effect, Layer, Stream, WebChannel } from '@livestore/utils/eff
|
|
|
3
3
|
import type { MeshNode } from '@livestore/webmesh'
|
|
4
4
|
import { makeMeshNode, WebmeshSchema } from '@livestore/webmesh'
|
|
5
5
|
|
|
6
|
-
import type * as SharedWorkerSchema from './schema.
|
|
6
|
+
import type * as SharedWorkerSchema from './schema.ts'
|
|
7
7
|
|
|
8
|
-
export * as Schema from './schema.
|
|
8
|
+
export * as Schema from './schema.ts'
|
|
9
9
|
|
|
10
10
|
export class CacheService extends Context.Tag('@livestore/devtools-web-common:CacheService')<
|
|
11
11
|
CacheService,
|