@livestore/common 0.3.0-dev.31 → 0.3.0-dev.33
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/derived-mutations.d.ts +77 -0
- package/dist/derived-mutations.d.ts.map +1 -0
- package/dist/derived-mutations.js +54 -0
- package/dist/derived-mutations.js.map +1 -0
- package/dist/derived-mutations.test.d.ts +2 -0
- package/dist/derived-mutations.test.d.ts.map +1 -0
- package/dist/derived-mutations.test.js +93 -0
- package/dist/derived-mutations.test.js.map +1 -0
- package/dist/devtools/devtools-bridge.d.ts +12 -0
- package/dist/devtools/devtools-bridge.d.ts.map +1 -0
- package/dist/devtools/devtools-bridge.js +2 -0
- package/dist/devtools/devtools-bridge.js.map +1 -0
- package/dist/devtools/devtools-messages-client-session.d.ts +29 -29
- package/dist/devtools/devtools-messages-common.d.ts +6 -6
- package/dist/devtools/devtools-messages-leader.d.ts +24 -24
- package/dist/devtools/index.d.ts +42 -0
- package/dist/devtools/index.d.ts.map +1 -0
- package/dist/devtools/index.js +49 -0
- package/dist/devtools/index.js.map +1 -0
- package/dist/init-singleton-tables.d.ts +4 -0
- package/dist/init-singleton-tables.d.ts.map +1 -0
- package/dist/init-singleton-tables.js +16 -0
- package/dist/init-singleton-tables.js.map +1 -0
- package/dist/leader-thread/leader-worker-devtools.d.ts +1 -1
- package/dist/mutation.d.ts +14 -0
- package/dist/mutation.d.ts.map +1 -0
- package/dist/mutation.js +71 -0
- package/dist/mutation.js.map +1 -0
- package/dist/query-info.d.ts +38 -0
- package/dist/query-info.d.ts.map +1 -0
- package/dist/query-info.js +7 -0
- package/dist/query-info.js.map +1 -0
- package/dist/rehydrate-from-mutationlog.d.ts +14 -0
- package/dist/rehydrate-from-mutationlog.d.ts.map +1 -0
- package/dist/rehydrate-from-mutationlog.js +72 -0
- package/dist/rehydrate-from-mutationlog.js.map +1 -0
- package/dist/schema/EventDef.d.ts +2 -2
- package/dist/schema/index.d.ts +62 -0
- package/dist/schema/index.d.ts.map +1 -0
- package/dist/schema/index.js +67 -0
- package/dist/schema/index.js.map +1 -0
- package/dist/schema/mutations.d.ts +227 -0
- package/dist/schema/mutations.d.ts.map +1 -0
- package/dist/schema/mutations.js +68 -0
- package/dist/schema/mutations.js.map +1 -0
- package/dist/schema-management/migrations.js +2 -0
- package/dist/schema-management/migrations.js.map +1 -1
- package/dist/sync/next/test/event-fixtures.d.ts +7 -7
- package/dist/sync/next/test/mutation-fixtures.d.ts +73 -0
- package/dist/sync/next/test/mutation-fixtures.d.ts.map +1 -0
- package/dist/sync/next/test/mutation-fixtures.js +161 -0
- package/dist/sync/next/test/mutation-fixtures.js.map +1 -0
- package/dist/sync/next-mutation-event-id-pair.d.ts +14 -0
- package/dist/sync/next-mutation-event-id-pair.d.ts.map +1 -0
- package/dist/sync/next-mutation-event-id-pair.js +13 -0
- package/dist/sync/next-mutation-event-id-pair.js.map +1 -0
- package/dist/sync/syncstate.d.ts +2 -2
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/src/schema-management/migrations.ts +1 -0
- package/src/version.ts +1 -1
@@ -0,0 +1,77 @@
|
|
1
|
+
import type { SqliteDsl } from '@livestore/db-schema';
|
2
|
+
import type { GetValForKey } from '@livestore/utils';
|
3
|
+
import type { MutationEvent } from './schema/mutations.js';
|
4
|
+
import type * as DbSchema from './schema/table-def.js';
|
5
|
+
export declare const makeDerivedMutationDefsForTable: <TTableDef extends DbSchema.TableDefBase<DbSchema.DefaultSqliteTableDefConstrained, DbSchema.TableOptions & {
|
6
|
+
deriveMutations: {
|
7
|
+
enabled: true;
|
8
|
+
};
|
9
|
+
}>>(table: TTableDef) => {
|
10
|
+
insert: import("./schema/mutations.js").MutationDef<`_Derived_Create_${any}`, {
|
11
|
+
readonly [x: string]: any;
|
12
|
+
} & {
|
13
|
+
readonly [x: string]: any;
|
14
|
+
}, any>;
|
15
|
+
update: import("./schema/mutations.js").MutationDef<`_Derived_Update_${any}`, {
|
16
|
+
readonly values: {};
|
17
|
+
readonly where: {};
|
18
|
+
}, {
|
19
|
+
readonly values: {};
|
20
|
+
readonly where: {};
|
21
|
+
}>;
|
22
|
+
delete: import("./schema/mutations.js").MutationDef<`_Derived_Delete_${any}`, {
|
23
|
+
readonly where: {};
|
24
|
+
}, {
|
25
|
+
readonly where: {};
|
26
|
+
}>;
|
27
|
+
};
|
28
|
+
export declare const deriveCreateMutationDef: <TTableDef extends DbSchema.TableDefBase<DbSchema.DefaultSqliteTableDefConstrained, DbSchema.TableOptions & {
|
29
|
+
deriveMutations: {
|
30
|
+
enabled: true;
|
31
|
+
};
|
32
|
+
}>>(table: TTableDef) => import("./schema/mutations.js").MutationDef<`_Derived_Create_${any}`, {
|
33
|
+
readonly [x: string]: any;
|
34
|
+
} & {
|
35
|
+
readonly [x: string]: any;
|
36
|
+
}, any>;
|
37
|
+
export declare const deriveUpdateMutationDef: <TTableDef extends DbSchema.TableDefBase<DbSchema.DefaultSqliteTableDefConstrained, DbSchema.TableOptions & {
|
38
|
+
deriveMutations: {
|
39
|
+
enabled: true;
|
40
|
+
};
|
41
|
+
}>>(table: TTableDef) => import("./schema/mutations.js").MutationDef<`_Derived_Update_${any}`, {
|
42
|
+
readonly values: {};
|
43
|
+
readonly where: {};
|
44
|
+
}, {
|
45
|
+
readonly values: {};
|
46
|
+
readonly where: {};
|
47
|
+
}>;
|
48
|
+
export declare const deriveDeleteMutationDef: <TTableDef extends DbSchema.TableDefBase<DbSchema.DefaultSqliteTableDefConstrained, DbSchema.TableOptions & {
|
49
|
+
deriveMutations: {
|
50
|
+
enabled: true;
|
51
|
+
};
|
52
|
+
}>>(table: TTableDef) => import("./schema/mutations.js").MutationDef<`_Derived_Delete_${any}`, {
|
53
|
+
readonly where: {};
|
54
|
+
}, {
|
55
|
+
readonly where: {};
|
56
|
+
}>;
|
57
|
+
/**
|
58
|
+
* Convenience helper functions on top of the derived mutation definitions.
|
59
|
+
*/
|
60
|
+
export type DerivedMutationHelperFns<TColumns extends SqliteDsl.ConstraintColumns, TOptions extends DbSchema.TableOptions> = {
|
61
|
+
insert: DerivedMutationHelperFns.InsertMutationFn<TColumns, TOptions>;
|
62
|
+
update: DerivedMutationHelperFns.UpdateMutationFn<TColumns, TOptions>;
|
63
|
+
delete: DerivedMutationHelperFns.DeleteMutationFn<TColumns, TOptions>;
|
64
|
+
};
|
65
|
+
export declare namespace DerivedMutationHelperFns {
|
66
|
+
export type InsertMutationFn<TColumns extends SqliteDsl.ConstraintColumns, TOptions extends DbSchema.TableOptions> = SqliteDsl.AnyIfConstained<TColumns, UseShortcut<TOptions> extends true ? (values?: GetValForKey<SqliteDsl.FromColumns.InsertRowDecoded<TColumns>, 'value'>) => MutationEvent.PartialAny : (values: SqliteDsl.FromColumns.InsertRowDecoded<TColumns>) => MutationEvent.PartialAny>;
|
67
|
+
export type UpdateMutationFn<TColumns extends SqliteDsl.ConstraintColumns, TOptions extends DbSchema.TableOptions> = SqliteDsl.AnyIfConstained<TColumns, UseShortcut<TOptions> extends true ? (values: Partial<GetValForKey<SqliteDsl.FromColumns.RowDecoded<TColumns>, 'value'>>) => MutationEvent.PartialAny : (args: {
|
68
|
+
where: Partial<SqliteDsl.FromColumns.RowDecoded<TColumns>>;
|
69
|
+
values: Partial<SqliteDsl.FromColumns.RowDecoded<TColumns>>;
|
70
|
+
}) => MutationEvent.PartialAny>;
|
71
|
+
export type DeleteMutationFn<TColumns extends SqliteDsl.ConstraintColumns, _TOptions extends DbSchema.TableOptions> = (args: {
|
72
|
+
where: Partial<SqliteDsl.FromColumns.RowDecoded<TColumns>>;
|
73
|
+
}) => MutationEvent.PartialAny;
|
74
|
+
type UseShortcut<TOptions extends DbSchema.TableOptions> = TOptions['isSingleColumn'] extends true ? TOptions['isSingleton'] extends true ? true : false : false;
|
75
|
+
export {};
|
76
|
+
}
|
77
|
+
//# sourceMappingURL=derived-mutations.d.ts.map
|
@@ -0,0 +1 @@
|
|
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,CAAC,SAAS,CAAC,WAAW,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAA;QAC1D,MAAM,EAAE,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAA;KAC5D,KAAK,aAAa,CAAC,UAAU,CACnC,CAAA;IAED,MAAM,MAAM,gBAAgB,CAC1B,QAAQ,SAAS,SAAS,CAAC,iBAAiB,EAC5C,SAAS,SAAS,QAAQ,CAAC,YAAY,IACrC,CAAC,IAAI,EAAE;QAAE,KAAK,EAAE,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAA;KAAE,KAAK,aAAa,CAAC,UAAU,CAAA;IAEtG,KAAK,WAAW,CAAC,QAAQ,SAAS,QAAQ,CAAC,YAAY,IAAI,QAAQ,CAAC,gBAAgB,CAAC,SAAS,IAAI,GAC9F,QAAQ,CAAC,aAAa,CAAC,SAAS,IAAI,GAClC,IAAI,GACJ,KAAK,GACP,KAAK,CAAA;;CACV"}
|
@@ -0,0 +1,54 @@
|
|
1
|
+
import { ReadonlyRecord, Schema } from '@livestore/utils/effect';
|
2
|
+
import { defineMutation } from './schema/mutations.js';
|
3
|
+
import { getDefaultValuesDecoded } from './schema/schema-helpers.js';
|
4
|
+
import { deleteRows, insertRow, updateRows } from './sql-queries/sql-queries.js';
|
5
|
+
export const makeDerivedMutationDefsForTable = (table) => ({
|
6
|
+
insert: deriveCreateMutationDef(table),
|
7
|
+
update: deriveUpdateMutationDef(table),
|
8
|
+
delete: deriveDeleteMutationDef(table),
|
9
|
+
});
|
10
|
+
export const deriveCreateMutationDef = (table) => {
|
11
|
+
const tableName = table.sqliteDef.name;
|
12
|
+
const [optionalFields, requiredColumns] = ReadonlyRecord.partition(table.sqliteDef.columns, (col) => col.nullable === false && col.default._tag === 'None');
|
13
|
+
const insertSchema = Schema.Struct(ReadonlyRecord.map(requiredColumns, (col) => col.schema))
|
14
|
+
.pipe(Schema.extend(Schema.partial(Schema.Struct(ReadonlyRecord.map(optionalFields, (col) => col.schema)))))
|
15
|
+
.annotations({ title: `${tableName}:Insert` });
|
16
|
+
return defineMutation(`_Derived_Create_${tableName}`, insertSchema, ({ id, ...explicitDefaultValues }) => {
|
17
|
+
const defaultValues = getDefaultValuesDecoded(table, explicitDefaultValues);
|
18
|
+
const [sql, bindValues] = insertRow({
|
19
|
+
tableName: table.sqliteDef.name,
|
20
|
+
columns: table.sqliteDef.columns,
|
21
|
+
values: { ...defaultValues, id },
|
22
|
+
});
|
23
|
+
return { sql, bindValues, writeTables: new Set([tableName]) };
|
24
|
+
}, { localOnly: table.options.deriveMutations.localOnly });
|
25
|
+
};
|
26
|
+
export const deriveUpdateMutationDef = (table) => {
|
27
|
+
const tableName = table.sqliteDef.name;
|
28
|
+
return defineMutation(`_Derived_Update_${tableName}`, Schema.Struct({
|
29
|
+
where: Schema.partial(table.schema),
|
30
|
+
values: Schema.partial(table.schema),
|
31
|
+
}).annotations({ title: `${tableName}:Update` }), ({ where, values }) => {
|
32
|
+
const [sql, bindValues] = updateRows({
|
33
|
+
tableName: table.sqliteDef.name,
|
34
|
+
columns: table.sqliteDef.columns,
|
35
|
+
where,
|
36
|
+
updateValues: values,
|
37
|
+
});
|
38
|
+
return { sql, bindValues, writeTables: new Set([tableName]) };
|
39
|
+
}, { localOnly: table.options.deriveMutations.localOnly });
|
40
|
+
};
|
41
|
+
export const deriveDeleteMutationDef = (table) => {
|
42
|
+
const tableName = table.sqliteDef.name;
|
43
|
+
return defineMutation(`_Derived_Delete_${tableName}`, Schema.Struct({
|
44
|
+
where: Schema.partial(table.schema),
|
45
|
+
}), ({ where }) => {
|
46
|
+
const [sql, bindValues] = deleteRows({
|
47
|
+
tableName: table.sqliteDef.name,
|
48
|
+
columns: table.sqliteDef.columns,
|
49
|
+
where,
|
50
|
+
});
|
51
|
+
return { sql, bindValues, writeTables: new Set([tableName]) };
|
52
|
+
}, { localOnly: table.options.deriveMutations.localOnly });
|
53
|
+
};
|
54
|
+
//# sourceMappingURL=derived-mutations.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"derived-mutations.js","sourceRoot":"","sources":["../src/derived-mutations.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAGhE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAA;AAEpE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAA;AAEhF,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAM7C,KAAgB,EAChB,EAAE,CAAC,CAAC;IACJ,MAAM,EAAE,uBAAuB,CAAC,KAAK,CAAC;IACtC,MAAM,EAAE,uBAAuB,CAAC,KAAK,CAAC;IACtC,MAAM,EAAE,uBAAuB,CAAC,KAAK,CAAC;CACvC,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAMrC,KAAgB,EAChB,EAAE;IACF,MAAM,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC,IAAI,CAAA;IAEtC,MAAM,CAAC,cAAc,EAAE,eAAe,CAAC,GAAG,cAAc,CAAC,SAAS,CAC/D,KAAK,CAAC,SAA4C,CAAC,OAAO,EAC3D,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,QAAQ,KAAK,KAAK,IAAI,GAAG,CAAC,OAAO,CAAC,IAAI,KAAK,MAAM,CAC/D,CAAA;IAED,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,eAAe,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;SACzF,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,cAAc,CAA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@@
|
|
1
|
+
{"version":3,"file":"derived-mutations.test.d.ts","sourceRoot":"","sources":["../src/derived-mutations.test.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,93 @@
|
|
1
|
+
import { describe, expect, test } from 'vitest';
|
2
|
+
import { appConfig, todos } from './__tests__/fixture.js';
|
3
|
+
describe('derived mutations', () => {
|
4
|
+
test('todos', () => {
|
5
|
+
expect(patchId(todos.insert({ id: 't1', completed: true, text: 'Task 1' }))).toMatchInlineSnapshot(`
|
6
|
+
{
|
7
|
+
"args": {
|
8
|
+
"completed": true,
|
9
|
+
"id": "t1",
|
10
|
+
"text": "Task 1",
|
11
|
+
},
|
12
|
+
"id": "00000000-0000-0000-0000-000000000000",
|
13
|
+
"mutation": "_Derived_Create_todos",
|
14
|
+
}
|
15
|
+
`);
|
16
|
+
expect(patchId(todos.update({ where: { id: 't1' }, values: { text: 'Task 1 - fixed' } }))).toMatchInlineSnapshot(`
|
17
|
+
{
|
18
|
+
"args": {
|
19
|
+
"values": {
|
20
|
+
"text": "Task 1 - fixed",
|
21
|
+
},
|
22
|
+
"where": {
|
23
|
+
"id": "t1",
|
24
|
+
},
|
25
|
+
},
|
26
|
+
"id": "00000000-0000-0000-0000-000000000000",
|
27
|
+
"mutation": "_Derived_Update_todos",
|
28
|
+
}
|
29
|
+
`);
|
30
|
+
expect(patchId(todos.delete({ where: { id: 't1' } }))).toMatchInlineSnapshot(`
|
31
|
+
{
|
32
|
+
"args": {
|
33
|
+
"where": {
|
34
|
+
"id": "t1",
|
35
|
+
},
|
36
|
+
},
|
37
|
+
"id": "00000000-0000-0000-0000-000000000000",
|
38
|
+
"mutation": "_Derived_Delete_todos",
|
39
|
+
}
|
40
|
+
`);
|
41
|
+
});
|
42
|
+
test('app_config', () => {
|
43
|
+
expect(patchId(appConfig.insert())).toMatchInlineSnapshot(`
|
44
|
+
{
|
45
|
+
"args": {
|
46
|
+
"id": "singleton",
|
47
|
+
"value": {
|
48
|
+
"value": undefined,
|
49
|
+
},
|
50
|
+
},
|
51
|
+
"id": "00000000-0000-0000-0000-000000000000",
|
52
|
+
"mutation": "_Derived_Create_app_config",
|
53
|
+
}
|
54
|
+
`);
|
55
|
+
expect(patchId(appConfig.insert({ fontSize: 12, theme: 'dark' }))).toMatchInlineSnapshot(`
|
56
|
+
{
|
57
|
+
"args": {
|
58
|
+
"id": "singleton",
|
59
|
+
"value": {
|
60
|
+
"value": {
|
61
|
+
"fontSize": 12,
|
62
|
+
"theme": "dark",
|
63
|
+
},
|
64
|
+
},
|
65
|
+
},
|
66
|
+
"id": "00000000-0000-0000-0000-000000000000",
|
67
|
+
"mutation": "_Derived_Create_app_config",
|
68
|
+
}
|
69
|
+
`);
|
70
|
+
expect(patchId(appConfig.update({ fontSize: 13 }))).toMatchInlineSnapshot(`
|
71
|
+
{
|
72
|
+
"args": {
|
73
|
+
"values": {
|
74
|
+
"value": {
|
75
|
+
"fontSize": 13,
|
76
|
+
},
|
77
|
+
},
|
78
|
+
"where": {
|
79
|
+
"id": "singleton",
|
80
|
+
},
|
81
|
+
},
|
82
|
+
"id": "00000000-0000-0000-0000-000000000000",
|
83
|
+
"mutation": "_Derived_Update_app_config",
|
84
|
+
}
|
85
|
+
`);
|
86
|
+
});
|
87
|
+
});
|
88
|
+
const patchId = (muationEvent) => {
|
89
|
+
// TODO use new id paradigm
|
90
|
+
const id = `00000000-0000-0000-0000-000000000000`;
|
91
|
+
return { ...muationEvent, id };
|
92
|
+
};
|
93
|
+
//# sourceMappingURL=derived-mutations.test.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"derived-mutations.test.js","sourceRoot":"","sources":["../src/derived-mutations.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAE/C,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAGzD,QAAQ,CAAC,mBAAmB,EAAE,GAAG,EAAE;I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AM,OAAO,GAAG,CAAC,YAAsC,EAAE,EAAE;IACzD,2BAA2B;IAC3B,MAAM,EAAE,GAAG,sCAAsC,CAAA;IACjD,OAAO,EAAE,GAAG,YAAY,EAAE,EAAE,EAAE,CAAA;AAChC,CAAC,CAAA"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import type { Effect, PubSub } from '@livestore/utils/effect';
|
2
|
+
import type * as Devtools from './devtools-messages.js';
|
3
|
+
export type PrepareDevtoolsBridge = {
|
4
|
+
/** Messages coming from the app host (usually responses to requests) */
|
5
|
+
responsePubSub: PubSub.PubSub<Devtools.MessageFromAppHostCoordinator | Devtools.MessageFromAppHostStore>;
|
6
|
+
sendToAppHost: (msg: Devtools.MessageToAppHostCoordinator | Devtools.MessageToAppHostStore) => Effect.Effect<void>;
|
7
|
+
appHostId: string;
|
8
|
+
copyToClipboard: (text: string) => Effect.Effect<void>;
|
9
|
+
sendEscapeKey?: Effect.Effect<void>;
|
10
|
+
isLeader: boolean;
|
11
|
+
};
|
12
|
+
//# sourceMappingURL=devtools-bridge.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"devtools-bridge.d.ts","sourceRoot":"","sources":["../../src/devtools/devtools-bridge.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAE7D,OAAO,KAAK,KAAK,QAAQ,MAAM,wBAAwB,CAAA;AAEvD,MAAM,MAAM,qBAAqB,GAAG;IAClC,wEAAwE;IACxE,cAAc,EAAE,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,6BAA6B,GAAG,QAAQ,CAAC,uBAAuB,CAAC,CAAA;IACxG,aAAa,EAAE,CAAC,GAAG,EAAE,QAAQ,CAAC,2BAA2B,GAAG,QAAQ,CAAC,qBAAqB,KAAK,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;IAClH,SAAS,EAAE,MAAM,CAAA;IACjB,eAAe,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;IACtD,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;IACnC,QAAQ,EAAE,OAAO,CAAA;CAClB,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"devtools-bridge.js","sourceRoot":"","sources":["../../src/devtools/devtools-bridge.ts"],"names":[],"mappings":""}
|
@@ -2,7 +2,7 @@ import { Schema } from '@livestore/utils/effect';
|
|
2
2
|
declare const DebugInfoReq_base: Schema.Struct<{
|
3
3
|
_tag: Schema.tag<"LSD.ClientSession.DebugInfoReq">;
|
4
4
|
} & {
|
5
|
-
liveStoreVersion: Schema.Literal<["0.3.0-dev.
|
5
|
+
liveStoreVersion: Schema.Literal<["0.3.0-dev.33"]>;
|
6
6
|
} & {
|
7
7
|
clientId: typeof Schema.String;
|
8
8
|
sessionId: typeof Schema.String;
|
@@ -13,7 +13,7 @@ export declare class DebugInfoReq extends DebugInfoReq_base {
|
|
13
13
|
declare const DebugInfoRes_base: Schema.Struct<{
|
14
14
|
_tag: Schema.tag<"LSD.ClientSession.DebugInfoRes">;
|
15
15
|
} & {
|
16
|
-
liveStoreVersion: Schema.Literal<["0.3.0-dev.
|
16
|
+
liveStoreVersion: Schema.Literal<["0.3.0-dev.33"]>;
|
17
17
|
} & {
|
18
18
|
clientId: typeof Schema.String;
|
19
19
|
sessionId: typeof Schema.String;
|
@@ -23,38 +23,38 @@ declare const DebugInfoRes_base: Schema.Struct<{
|
|
23
23
|
slowQueries: Schema.transform<Schema.Struct<{
|
24
24
|
size: typeof Schema.Number;
|
25
25
|
items: Schema.Array$<Schema.Schema<{
|
26
|
+
readonly queryStr: string;
|
26
27
|
readonly bindValues: ((readonly (string | number | Uint8Array<ArrayBufferLike> | null)[] | {
|
27
28
|
readonly [x: string]: string | number | Uint8Array<ArrayBufferLike> | null;
|
28
29
|
}) & import("effect/Brand").Brand<"PreparedBindValues">) | undefined;
|
29
|
-
readonly queryStr: string;
|
30
30
|
readonly durationMs: number;
|
31
31
|
readonly rowsCount: number | undefined;
|
32
32
|
readonly queriedTables: ReadonlySet<string>;
|
33
33
|
readonly startTimePerfNow: number;
|
34
34
|
}, {
|
35
|
+
readonly queryStr: string;
|
35
36
|
readonly bindValues: readonly (string | number | readonly number[] | null)[] | {
|
36
37
|
readonly [x: string]: string | number | readonly number[] | null;
|
37
38
|
} | undefined;
|
38
|
-
readonly queryStr: string;
|
39
39
|
readonly durationMs: number;
|
40
40
|
readonly rowsCount: number | undefined;
|
41
41
|
readonly queriedTables: readonly string[];
|
42
42
|
readonly startTimePerfNow: number;
|
43
43
|
}, never>>;
|
44
44
|
}>, Schema.Schema<import("../bounded-collections.js").BoundArray<{
|
45
|
+
readonly queryStr: string;
|
45
46
|
readonly bindValues: ((readonly (string | number | Uint8Array<ArrayBufferLike> | null)[] | {
|
46
47
|
readonly [x: string]: string | number | Uint8Array<ArrayBufferLike> | null;
|
47
48
|
}) & import("effect/Brand").Brand<"PreparedBindValues">) | undefined;
|
48
|
-
readonly queryStr: string;
|
49
49
|
readonly durationMs: number;
|
50
50
|
readonly rowsCount: number | undefined;
|
51
51
|
readonly queriedTables: ReadonlySet<string>;
|
52
52
|
readonly startTimePerfNow: number;
|
53
53
|
}>, import("../bounded-collections.js").BoundArray<{
|
54
|
+
readonly queryStr: string;
|
54
55
|
readonly bindValues: ((readonly (string | number | Uint8Array<ArrayBufferLike> | null)[] | {
|
55
56
|
readonly [x: string]: string | number | Uint8Array<ArrayBufferLike> | null;
|
56
57
|
}) & import("effect/Brand").Brand<"PreparedBindValues">) | undefined;
|
57
|
-
readonly queryStr: string;
|
58
58
|
readonly durationMs: number;
|
59
59
|
readonly rowsCount: number | undefined;
|
60
60
|
readonly queriedTables: ReadonlySet<string>;
|
@@ -73,7 +73,7 @@ export declare class DebugInfoRes extends DebugInfoRes_base {
|
|
73
73
|
declare const DebugInfoHistorySubscribe_base: Schema.Struct<{
|
74
74
|
_tag: Schema.tag<"LSD.ClientSession.DebugInfoHistorySubscribe">;
|
75
75
|
} & {
|
76
|
-
liveStoreVersion: Schema.Literal<["0.3.0-dev.
|
76
|
+
liveStoreVersion: Schema.Literal<["0.3.0-dev.33"]>;
|
77
77
|
} & {
|
78
78
|
clientId: typeof Schema.String;
|
79
79
|
sessionId: typeof Schema.String;
|
@@ -86,7 +86,7 @@ export declare class DebugInfoHistorySubscribe extends DebugInfoHistorySubscribe
|
|
86
86
|
declare const DebugInfoHistoryRes_base: Schema.Struct<{
|
87
87
|
_tag: Schema.tag<"LSD.ClientSession.DebugInfoHistoryRes">;
|
88
88
|
} & {
|
89
|
-
liveStoreVersion: Schema.Literal<["0.3.0-dev.
|
89
|
+
liveStoreVersion: Schema.Literal<["0.3.0-dev.33"]>;
|
90
90
|
} & {
|
91
91
|
clientId: typeof Schema.String;
|
92
92
|
sessionId: typeof Schema.String;
|
@@ -96,38 +96,38 @@ declare const DebugInfoHistoryRes_base: Schema.Struct<{
|
|
96
96
|
slowQueries: Schema.transform<Schema.Struct<{
|
97
97
|
size: typeof Schema.Number;
|
98
98
|
items: Schema.Array$<Schema.Schema<{
|
99
|
+
readonly queryStr: string;
|
99
100
|
readonly bindValues: ((readonly (string | number | Uint8Array<ArrayBufferLike> | null)[] | {
|
100
101
|
readonly [x: string]: string | number | Uint8Array<ArrayBufferLike> | null;
|
101
102
|
}) & import("effect/Brand").Brand<"PreparedBindValues">) | undefined;
|
102
|
-
readonly queryStr: string;
|
103
103
|
readonly durationMs: number;
|
104
104
|
readonly rowsCount: number | undefined;
|
105
105
|
readonly queriedTables: ReadonlySet<string>;
|
106
106
|
readonly startTimePerfNow: number;
|
107
107
|
}, {
|
108
|
+
readonly queryStr: string;
|
108
109
|
readonly bindValues: readonly (string | number | readonly number[] | null)[] | {
|
109
110
|
readonly [x: string]: string | number | readonly number[] | null;
|
110
111
|
} | undefined;
|
111
|
-
readonly queryStr: string;
|
112
112
|
readonly durationMs: number;
|
113
113
|
readonly rowsCount: number | undefined;
|
114
114
|
readonly queriedTables: readonly string[];
|
115
115
|
readonly startTimePerfNow: number;
|
116
116
|
}, never>>;
|
117
117
|
}>, Schema.Schema<import("../bounded-collections.js").BoundArray<{
|
118
|
+
readonly queryStr: string;
|
118
119
|
readonly bindValues: ((readonly (string | number | Uint8Array<ArrayBufferLike> | null)[] | {
|
119
120
|
readonly [x: string]: string | number | Uint8Array<ArrayBufferLike> | null;
|
120
121
|
}) & import("effect/Brand").Brand<"PreparedBindValues">) | undefined;
|
121
|
-
readonly queryStr: string;
|
122
122
|
readonly durationMs: number;
|
123
123
|
readonly rowsCount: number | undefined;
|
124
124
|
readonly queriedTables: ReadonlySet<string>;
|
125
125
|
readonly startTimePerfNow: number;
|
126
126
|
}>, import("../bounded-collections.js").BoundArray<{
|
127
|
+
readonly queryStr: string;
|
127
128
|
readonly bindValues: ((readonly (string | number | Uint8Array<ArrayBufferLike> | null)[] | {
|
128
129
|
readonly [x: string]: string | number | Uint8Array<ArrayBufferLike> | null;
|
129
130
|
}) & import("effect/Brand").Brand<"PreparedBindValues">) | undefined;
|
130
|
-
readonly queryStr: string;
|
131
131
|
readonly durationMs: number;
|
132
132
|
readonly rowsCount: number | undefined;
|
133
133
|
readonly queriedTables: ReadonlySet<string>;
|
@@ -147,7 +147,7 @@ export declare class DebugInfoHistoryRes extends DebugInfoHistoryRes_base {
|
|
147
147
|
declare const DebugInfoHistoryUnsubscribe_base: Schema.Struct<{
|
148
148
|
_tag: Schema.tag<"LSD.ClientSession.DebugInfoHistoryUnsubscribe">;
|
149
149
|
} & {
|
150
|
-
liveStoreVersion: Schema.Literal<["0.3.0-dev.
|
150
|
+
liveStoreVersion: Schema.Literal<["0.3.0-dev.33"]>;
|
151
151
|
} & {
|
152
152
|
clientId: typeof Schema.String;
|
153
153
|
sessionId: typeof Schema.String;
|
@@ -160,7 +160,7 @@ export declare class DebugInfoHistoryUnsubscribe extends DebugInfoHistoryUnsubsc
|
|
160
160
|
declare const DebugInfoResetReq_base: Schema.Struct<{
|
161
161
|
_tag: Schema.tag<"LSD.ClientSession.DebugInfoResetReq">;
|
162
162
|
} & {
|
163
|
-
liveStoreVersion: Schema.Literal<["0.3.0-dev.
|
163
|
+
liveStoreVersion: Schema.Literal<["0.3.0-dev.33"]>;
|
164
164
|
} & {
|
165
165
|
clientId: typeof Schema.String;
|
166
166
|
sessionId: typeof Schema.String;
|
@@ -171,7 +171,7 @@ export declare class DebugInfoResetReq extends DebugInfoResetReq_base {
|
|
171
171
|
declare const DebugInfoResetRes_base: Schema.Struct<{
|
172
172
|
_tag: Schema.tag<"LSD.ClientSession.DebugInfoResetRes">;
|
173
173
|
} & {
|
174
|
-
liveStoreVersion: Schema.Literal<["0.3.0-dev.
|
174
|
+
liveStoreVersion: Schema.Literal<["0.3.0-dev.33"]>;
|
175
175
|
} & {
|
176
176
|
clientId: typeof Schema.String;
|
177
177
|
sessionId: typeof Schema.String;
|
@@ -182,7 +182,7 @@ export declare class DebugInfoResetRes extends DebugInfoResetRes_base {
|
|
182
182
|
declare const DebugInfoRerunQueryReq_base: Schema.Struct<{
|
183
183
|
_tag: Schema.tag<"LSD.ClientSession.DebugInfoRerunQueryReq">;
|
184
184
|
} & {
|
185
|
-
liveStoreVersion: Schema.Literal<["0.3.0-dev.
|
185
|
+
liveStoreVersion: Schema.Literal<["0.3.0-dev.33"]>;
|
186
186
|
} & {
|
187
187
|
clientId: typeof Schema.String;
|
188
188
|
sessionId: typeof Schema.String;
|
@@ -197,7 +197,7 @@ export declare class DebugInfoRerunQueryReq extends DebugInfoRerunQueryReq_base
|
|
197
197
|
declare const DebugInfoRerunQueryRes_base: Schema.Struct<{
|
198
198
|
_tag: Schema.tag<"LSD.ClientSession.DebugInfoRerunQueryRes">;
|
199
199
|
} & {
|
200
|
-
liveStoreVersion: Schema.Literal<["0.3.0-dev.
|
200
|
+
liveStoreVersion: Schema.Literal<["0.3.0-dev.33"]>;
|
201
201
|
} & {
|
202
202
|
clientId: typeof Schema.String;
|
203
203
|
sessionId: typeof Schema.String;
|
@@ -208,7 +208,7 @@ export declare class DebugInfoRerunQueryRes extends DebugInfoRerunQueryRes_base
|
|
208
208
|
declare const SyncHeadSubscribe_base: Schema.Struct<{
|
209
209
|
_tag: Schema.tag<"LSD.ClientSession.SyncHeadSubscribe">;
|
210
210
|
} & {
|
211
|
-
liveStoreVersion: Schema.Literal<["0.3.0-dev.
|
211
|
+
liveStoreVersion: Schema.Literal<["0.3.0-dev.33"]>;
|
212
212
|
} & {
|
213
213
|
clientId: typeof Schema.String;
|
214
214
|
sessionId: typeof Schema.String;
|
@@ -221,7 +221,7 @@ export declare class SyncHeadSubscribe extends SyncHeadSubscribe_base {
|
|
221
221
|
declare const SyncHeadUnsubscribe_base: Schema.Struct<{
|
222
222
|
_tag: Schema.tag<"LSD.ClientSession.SyncHeadUnsubscribe">;
|
223
223
|
} & {
|
224
|
-
liveStoreVersion: Schema.Literal<["0.3.0-dev.
|
224
|
+
liveStoreVersion: Schema.Literal<["0.3.0-dev.33"]>;
|
225
225
|
} & {
|
226
226
|
clientId: typeof Schema.String;
|
227
227
|
sessionId: typeof Schema.String;
|
@@ -234,7 +234,7 @@ export declare class SyncHeadUnsubscribe extends SyncHeadUnsubscribe_base {
|
|
234
234
|
declare const SyncHeadRes_base: Schema.Struct<{
|
235
235
|
_tag: Schema.tag<"LSD.ClientSession.SyncHeadRes">;
|
236
236
|
} & {
|
237
|
-
liveStoreVersion: Schema.Literal<["0.3.0-dev.
|
237
|
+
liveStoreVersion: Schema.Literal<["0.3.0-dev.33"]>;
|
238
238
|
} & {
|
239
239
|
clientId: typeof Schema.String;
|
240
240
|
sessionId: typeof Schema.String;
|
@@ -255,7 +255,7 @@ export declare class SyncHeadRes extends SyncHeadRes_base {
|
|
255
255
|
declare const ReactivityGraphSubscribe_base: Schema.Struct<{
|
256
256
|
_tag: Schema.tag<"LSD.ClientSession.ReactivityGraphSubscribe">;
|
257
257
|
} & {
|
258
|
-
liveStoreVersion: Schema.Literal<["0.3.0-dev.
|
258
|
+
liveStoreVersion: Schema.Literal<["0.3.0-dev.33"]>;
|
259
259
|
} & {
|
260
260
|
clientId: typeof Schema.String;
|
261
261
|
sessionId: typeof Schema.String;
|
@@ -269,7 +269,7 @@ export declare class ReactivityGraphSubscribe extends ReactivityGraphSubscribe_b
|
|
269
269
|
declare const ReactivityGraphUnsubscribe_base: Schema.Struct<{
|
270
270
|
_tag: Schema.tag<"LSD.ClientSession.ReactivityGraphUnsubscribe">;
|
271
271
|
} & {
|
272
|
-
liveStoreVersion: Schema.Literal<["0.3.0-dev.
|
272
|
+
liveStoreVersion: Schema.Literal<["0.3.0-dev.33"]>;
|
273
273
|
} & {
|
274
274
|
clientId: typeof Schema.String;
|
275
275
|
sessionId: typeof Schema.String;
|
@@ -282,7 +282,7 @@ export declare class ReactivityGraphUnsubscribe extends ReactivityGraphUnsubscri
|
|
282
282
|
declare const ReactivityGraphRes_base: Schema.Struct<{
|
283
283
|
_tag: Schema.tag<"LSD.ClientSession.ReactivityGraphRes">;
|
284
284
|
} & {
|
285
|
-
liveStoreVersion: Schema.Literal<["0.3.0-dev.
|
285
|
+
liveStoreVersion: Schema.Literal<["0.3.0-dev.33"]>;
|
286
286
|
} & {
|
287
287
|
clientId: typeof Schema.String;
|
288
288
|
sessionId: typeof Schema.String;
|
@@ -296,7 +296,7 @@ export declare class ReactivityGraphRes extends ReactivityGraphRes_base {
|
|
296
296
|
declare const LiveQueriesSubscribe_base: Schema.Struct<{
|
297
297
|
_tag: Schema.tag<"LSD.ClientSession.LiveQueriesSubscribe">;
|
298
298
|
} & {
|
299
|
-
liveStoreVersion: Schema.Literal<["0.3.0-dev.
|
299
|
+
liveStoreVersion: Schema.Literal<["0.3.0-dev.33"]>;
|
300
300
|
} & {
|
301
301
|
clientId: typeof Schema.String;
|
302
302
|
sessionId: typeof Schema.String;
|
@@ -309,7 +309,7 @@ export declare class LiveQueriesSubscribe extends LiveQueriesSubscribe_base {
|
|
309
309
|
declare const LiveQueriesUnsubscribe_base: Schema.Struct<{
|
310
310
|
_tag: Schema.tag<"LSD.ClientSession.LiveQueriesUnsubscribe">;
|
311
311
|
} & {
|
312
|
-
liveStoreVersion: Schema.Literal<["0.3.0-dev.
|
312
|
+
liveStoreVersion: Schema.Literal<["0.3.0-dev.33"]>;
|
313
313
|
} & {
|
314
314
|
clientId: typeof Schema.String;
|
315
315
|
sessionId: typeof Schema.String;
|
@@ -338,7 +338,7 @@ export declare class SerializedLiveQuery extends SerializedLiveQuery_base {
|
|
338
338
|
declare const LiveQueriesRes_base: Schema.Struct<{
|
339
339
|
_tag: Schema.tag<"LSD.ClientSession.LiveQueriesRes">;
|
340
340
|
} & {
|
341
|
-
liveStoreVersion: Schema.Literal<["0.3.0-dev.
|
341
|
+
liveStoreVersion: Schema.Literal<["0.3.0-dev.33"]>;
|
342
342
|
} & {
|
343
343
|
clientId: typeof Schema.String;
|
344
344
|
sessionId: typeof Schema.String;
|
@@ -352,7 +352,7 @@ export declare class LiveQueriesRes extends LiveQueriesRes_base {
|
|
352
352
|
declare const Ping_base: Schema.Struct<{
|
353
353
|
_tag: Schema.tag<"LSD.ClientSession.Ping">;
|
354
354
|
} & {
|
355
|
-
liveStoreVersion: Schema.Literal<["0.3.0-dev.
|
355
|
+
liveStoreVersion: Schema.Literal<["0.3.0-dev.33"]>;
|
356
356
|
} & {
|
357
357
|
clientId: typeof Schema.String;
|
358
358
|
sessionId: typeof Schema.String;
|
@@ -363,7 +363,7 @@ export declare class Ping extends Ping_base {
|
|
363
363
|
declare const Pong_base: Schema.Struct<{
|
364
364
|
_tag: Schema.tag<"LSD.ClientSession.Pong">;
|
365
365
|
} & {
|
366
|
-
liveStoreVersion: Schema.Literal<["0.3.0-dev.
|
366
|
+
liveStoreVersion: Schema.Literal<["0.3.0-dev.33"]>;
|
367
367
|
} & {
|
368
368
|
clientId: typeof Schema.String;
|
369
369
|
sessionId: typeof Schema.String;
|
@@ -374,7 +374,7 @@ export declare class Pong extends Pong_base {
|
|
374
374
|
declare const Disconnect_base: Schema.Struct<{
|
375
375
|
_tag: Schema.tag<"LSD.ClientSession.Disconnect">;
|
376
376
|
} & {
|
377
|
-
liveStoreVersion: Schema.Literal<["0.3.0-dev.
|
377
|
+
liveStoreVersion: Schema.Literal<["0.3.0-dev.33"]>;
|
378
378
|
} & {
|
379
379
|
clientId: typeof Schema.String;
|
380
380
|
sessionId: typeof Schema.String;
|
@@ -9,23 +9,23 @@ export type NetworkStatus = typeof NetworkStatus.Type;
|
|
9
9
|
export declare const requestId: typeof Schema.String;
|
10
10
|
export declare const clientId: typeof Schema.String;
|
11
11
|
export declare const sessionId: typeof Schema.String;
|
12
|
-
export declare const liveStoreVersion: Schema.Literal<["0.3.0-dev.
|
12
|
+
export declare const liveStoreVersion: Schema.Literal<["0.3.0-dev.33"]>;
|
13
13
|
export declare const LSDMessage: <Tag extends string, Fields extends Schema.Struct.Fields>(tag: Tag, fields: Fields) => Schema.Struct<{
|
14
14
|
_tag: Schema.tag<Tag>;
|
15
15
|
} & {
|
16
|
-
liveStoreVersion: Schema.Literal<["0.3.0-dev.
|
16
|
+
liveStoreVersion: Schema.Literal<["0.3.0-dev.33"]>;
|
17
17
|
} & Fields>;
|
18
18
|
export declare const LSDChannelMessage: <Tag extends string, Fields extends Schema.Struct.Fields>(tag: Tag, fields: Fields) => Schema.Struct<{
|
19
19
|
_tag: Schema.tag<Tag>;
|
20
20
|
} & {
|
21
|
-
liveStoreVersion: Schema.Literal<["0.3.0-dev.
|
21
|
+
liveStoreVersion: Schema.Literal<["0.3.0-dev.33"]>;
|
22
22
|
} & {
|
23
23
|
clientId: typeof Schema.String;
|
24
24
|
} & Fields>;
|
25
25
|
export declare const LSDClientSessionChannelMessage: <Tag extends string, Fields extends Schema.Struct.Fields>(tag: Tag, fields: Fields) => Schema.Struct<{
|
26
26
|
_tag: Schema.tag<Tag>;
|
27
27
|
} & {
|
28
|
-
liveStoreVersion: Schema.Literal<["0.3.0-dev.
|
28
|
+
liveStoreVersion: Schema.Literal<["0.3.0-dev.33"]>;
|
29
29
|
} & {
|
30
30
|
clientId: typeof Schema.String;
|
31
31
|
sessionId: typeof Schema.String;
|
@@ -33,7 +33,7 @@ export declare const LSDClientSessionChannelMessage: <Tag extends string, Fields
|
|
33
33
|
export declare const LSDClientSessionReqResMessage: <Tag extends string, Fields extends Schema.Struct.Fields>(tag: Tag, fields: Fields) => Schema.Struct<{
|
34
34
|
_tag: Schema.tag<Tag>;
|
35
35
|
} & {
|
36
|
-
liveStoreVersion: Schema.Literal<["0.3.0-dev.
|
36
|
+
liveStoreVersion: Schema.Literal<["0.3.0-dev.33"]>;
|
37
37
|
} & {
|
38
38
|
clientId: typeof Schema.String;
|
39
39
|
sessionId: typeof Schema.String;
|
@@ -42,7 +42,7 @@ export declare const LSDClientSessionReqResMessage: <Tag extends string, Fields
|
|
42
42
|
export declare const LSDReqResMessage: <Tag extends string, Fields extends Schema.Struct.Fields>(tag: Tag, fields: Fields) => Schema.Struct<{
|
43
43
|
_tag: Schema.tag<Tag>;
|
44
44
|
} & {
|
45
|
-
liveStoreVersion: Schema.Literal<["0.3.0-dev.
|
45
|
+
liveStoreVersion: Schema.Literal<["0.3.0-dev.33"]>;
|
46
46
|
} & {
|
47
47
|
clientId: typeof Schema.String;
|
48
48
|
} & {
|