@livestore/common 0.0.54-dev.18 → 0.0.54-dev.19
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/debug-info.d.ts +8 -8
- package/dist/debug-info.d.ts.map +1 -1
- package/dist/debug-info.js +4 -7
- package/dist/debug-info.js.map +1 -1
- package/dist/devtools/devtools-messages.d.ts +23 -3
- package/dist/devtools/devtools-messages.d.ts.map +1 -1
- package/dist/devtools/devtools-messages.js +16 -2
- package/dist/devtools/devtools-messages.js.map +1 -1
- package/package.json +3 -3
- package/src/debug-info.ts +4 -9
- package/src/devtools/devtools-messages.ts +16 -0
- package/dist/devtools/index copy.d.ts +0 -214
- package/dist/devtools/index copy.d.ts.map +0 -1
- package/dist/devtools/index copy.js +0 -137
- package/dist/devtools/index copy.js.map +0 -1
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
import { Schema } from '@livestore/utils/effect';
|
|
2
|
-
import { DebugInfo } from '../debug-info.js';
|
|
3
|
-
import { mutationEventSchemaEncodedAny } from '../schema/mutations.js';
|
|
4
|
-
import { PreparedBindValues } from '../util.js';
|
|
5
|
-
const requestId = Schema.String;
|
|
6
|
-
const channelId = Schema.String;
|
|
7
|
-
export class SnapshotReq extends Schema.TaggedStruct('LSD.SnapshotReq', {
|
|
8
|
-
requestId,
|
|
9
|
-
channelId,
|
|
10
|
-
}) {
|
|
11
|
-
}
|
|
12
|
-
export class SnapshotRes extends Schema.TaggedStruct('LSD.SnapshotRes', {
|
|
13
|
-
requestId,
|
|
14
|
-
snapshot: Schema.Uint8Array,
|
|
15
|
-
}) {
|
|
16
|
-
}
|
|
17
|
-
export class DebugInfoReq extends Schema.TaggedStruct('LSD.DebugInfoReq', {
|
|
18
|
-
requestId,
|
|
19
|
-
channelId,
|
|
20
|
-
}) {
|
|
21
|
-
}
|
|
22
|
-
export class DebugInfoRes extends Schema.TaggedStruct('LSD.DebugInfoRes', {
|
|
23
|
-
requestId,
|
|
24
|
-
debugInfo: DebugInfo,
|
|
25
|
-
}) {
|
|
26
|
-
}
|
|
27
|
-
export class DebugInfoResetReq extends Schema.TaggedStruct('LSD.DebugInfoResetReq', {
|
|
28
|
-
requestId,
|
|
29
|
-
channelId,
|
|
30
|
-
}) {
|
|
31
|
-
}
|
|
32
|
-
export class DebugInfoResetRes extends Schema.TaggedStruct('LSD.DebugInfoResetRes', {
|
|
33
|
-
requestId,
|
|
34
|
-
}) {
|
|
35
|
-
}
|
|
36
|
-
export class DebugInfoRerunQueryReq extends Schema.TaggedStruct('LSD.DebugInfoRerunQueryReq', {
|
|
37
|
-
requestId,
|
|
38
|
-
channelId,
|
|
39
|
-
queryStr: Schema.String,
|
|
40
|
-
bindValues: Schema.UndefinedOr(PreparedBindValues),
|
|
41
|
-
queriedTables: Schema.ReadonlySet(Schema.String),
|
|
42
|
-
}) {
|
|
43
|
-
}
|
|
44
|
-
export class DebugInfoRerunQueryRes extends Schema.TaggedStruct('LSD.DebugInfoRerunQueryRes', {
|
|
45
|
-
requestId,
|
|
46
|
-
}) {
|
|
47
|
-
}
|
|
48
|
-
export class MutationBroadcast extends Schema.TaggedStruct('LSD.MutationBroadcast', {
|
|
49
|
-
requestId,
|
|
50
|
-
mutationEventEncoded: mutationEventSchemaEncodedAny,
|
|
51
|
-
persisted: Schema.Boolean,
|
|
52
|
-
}) {
|
|
53
|
-
}
|
|
54
|
-
export class MutationLogReq extends Schema.TaggedStruct('LSD.MutationLogReq', {
|
|
55
|
-
requestId,
|
|
56
|
-
channelId,
|
|
57
|
-
}) {
|
|
58
|
-
}
|
|
59
|
-
export class MutationLogRes extends Schema.TaggedStruct('LSD.MutationLogRes', {
|
|
60
|
-
requestId,
|
|
61
|
-
mutationLog: Schema.Uint8Array,
|
|
62
|
-
}) {
|
|
63
|
-
}
|
|
64
|
-
export class SignalsSubscribe extends Schema.TaggedStruct('LSD.SignalsSubscribe', {
|
|
65
|
-
requestId,
|
|
66
|
-
channelId,
|
|
67
|
-
includeResults: Schema.Boolean,
|
|
68
|
-
}) {
|
|
69
|
-
}
|
|
70
|
-
export class SignalsUnsubscribe extends Schema.TaggedStruct('LSD.SignalsUnsubscribe', {
|
|
71
|
-
requestId,
|
|
72
|
-
channelId,
|
|
73
|
-
}) {
|
|
74
|
-
}
|
|
75
|
-
export class SignalsRes extends Schema.TaggedStruct('LSD.SignalsRes', {
|
|
76
|
-
requestId,
|
|
77
|
-
signals: Schema.Any,
|
|
78
|
-
}) {
|
|
79
|
-
}
|
|
80
|
-
export class LiveQueriesSubscribe extends Schema.TaggedStruct('LSD.LiveQueriesSubscribe', {
|
|
81
|
-
requestId,
|
|
82
|
-
channelId,
|
|
83
|
-
}) {
|
|
84
|
-
}
|
|
85
|
-
export class LiveQueriesUnsubscribe extends Schema.TaggedStruct('LSD.LiveQueriesUnsubscribe', {
|
|
86
|
-
requestId,
|
|
87
|
-
channelId,
|
|
88
|
-
}) {
|
|
89
|
-
}
|
|
90
|
-
export class SerializedLiveQuery extends Schema.Struct({
|
|
91
|
-
_tag: Schema.Literal('js', 'sql', 'graphql'),
|
|
92
|
-
id: Schema.Number,
|
|
93
|
-
label: Schema.String,
|
|
94
|
-
runs: Schema.Number,
|
|
95
|
-
executionTimes: Schema.Array(Schema.Number),
|
|
96
|
-
lastestResult: Schema.Any,
|
|
97
|
-
activeSubscriptions: Schema.Array(Schema.Struct({ frames: Schema.Array(Schema.Struct({ name: Schema.String, filePath: Schema.String })) })),
|
|
98
|
-
}) {
|
|
99
|
-
}
|
|
100
|
-
export class LiveQueriesRes extends Schema.TaggedStruct('LSD.LiveQueriesRes', {
|
|
101
|
-
requestId,
|
|
102
|
-
liveQueries: Schema.Array(SerializedLiveQuery),
|
|
103
|
-
}) {
|
|
104
|
-
}
|
|
105
|
-
export class ResetAllDataReq extends Schema.TaggedStruct('LSD.ResetAllDataReq', {
|
|
106
|
-
requestId,
|
|
107
|
-
channelId,
|
|
108
|
-
mode: Schema.Literal('all-data', 'only-app-db'),
|
|
109
|
-
}) {
|
|
110
|
-
}
|
|
111
|
-
export class ResetAllDataRes extends Schema.TaggedStruct('LSD.ResetAllDataRes', {
|
|
112
|
-
requestId,
|
|
113
|
-
}) {
|
|
114
|
-
}
|
|
115
|
-
export class DevtoolsReadyBroadcast extends Schema.TaggedStruct('LSD.DevtoolsReadyBroadcast', {}) {
|
|
116
|
-
}
|
|
117
|
-
export class AppHostReadyBroadcast extends Schema.TaggedStruct('LSD.AppHostReadyBroadcast', {
|
|
118
|
-
channelId,
|
|
119
|
-
}) {
|
|
120
|
-
}
|
|
121
|
-
export class Disconnect extends Schema.TaggedStruct('LSD.Disconnect', {
|
|
122
|
-
requestId,
|
|
123
|
-
channelId,
|
|
124
|
-
}) {
|
|
125
|
-
}
|
|
126
|
-
export class SchemaChanged extends Schema.TaggedStruct('LSD.SchemaChanged', {
|
|
127
|
-
requestId,
|
|
128
|
-
}) {
|
|
129
|
-
}
|
|
130
|
-
export const MessageToAppHost = Schema.Union(SnapshotReq, MutationLogReq, DebugInfoReq, DebugInfoResetReq, DebugInfoRerunQueryReq, SignalsSubscribe, SignalsUnsubscribe, LiveQueriesSubscribe, LiveQueriesUnsubscribe, ResetAllDataReq, DevtoolsReadyBroadcast, Disconnect);
|
|
131
|
-
export const MessageFromAppHost = Schema.Union(SnapshotRes, MutationLogRes, DebugInfoRes, DebugInfoResetRes, DebugInfoRerunQueryRes, SignalsRes, LiveQueriesRes, ResetAllDataRes, Disconnect, SchemaChanged, MutationBroadcast, AppHostReadyBroadcast);
|
|
132
|
-
// TODO make specific over app key
|
|
133
|
-
export const makeBroadcastChannels = () => ({
|
|
134
|
-
fromAppHost: new BroadcastChannel(`livestore-devtools-from-app-host`),
|
|
135
|
-
toAppHost: new BroadcastChannel(`livestore-devtools-to-app-host`),
|
|
136
|
-
});
|
|
137
|
-
//# sourceMappingURL=index%20copy.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index copy.js","source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