@livestore/adapter-node 0.3.0-dev.47 → 0.3.0-dev.48
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/worker-schema.d.ts +11 -11
- package/dist/worker-schema.js +2 -2
- package/dist/worker-schema.js.map +1 -1
- package/package.json +6 -6
- package/src/worker-schema.ts +2 -2
package/dist/worker-schema.d.ts
CHANGED
|
@@ -110,9 +110,9 @@ export declare namespace LeaderWorkerInner {
|
|
|
110
110
|
} & {
|
|
111
111
|
cursor: Schema.Struct<{
|
|
112
112
|
mergeCounter: typeof Schema.Number;
|
|
113
|
-
|
|
114
|
-
global: Schema.BrandSchema<number & import("effect/Brand").Brand<"
|
|
115
|
-
client: Schema.BrandSchema<number & import("effect/Brand").Brand<"
|
|
113
|
+
eventNum: Schema.Struct<{
|
|
114
|
+
global: Schema.BrandSchema<number & import("effect/Brand").Brand<"GlobalEventSequenceNumber">, number, never>;
|
|
115
|
+
client: Schema.BrandSchema<number & import("effect/Brand").Brand<"ClientEventSequenceNumber">, number, never>;
|
|
116
116
|
}>;
|
|
117
117
|
}>;
|
|
118
118
|
}, Schema.Struct<{
|
|
@@ -127,13 +127,13 @@ export declare namespace LeaderWorkerInner {
|
|
|
127
127
|
batch: Schema.Array$<Schema.Struct<{
|
|
128
128
|
name: typeof Schema.String;
|
|
129
129
|
args: typeof Schema.Any;
|
|
130
|
-
|
|
131
|
-
global: Schema.BrandSchema<number & import("effect/Brand").Brand<"
|
|
132
|
-
client: Schema.BrandSchema<number & import("effect/Brand").Brand<"
|
|
130
|
+
seqNum: Schema.Struct<{
|
|
131
|
+
global: Schema.BrandSchema<number & import("effect/Brand").Brand<"GlobalEventSequenceNumber">, number, never>;
|
|
132
|
+
client: Schema.BrandSchema<number & import("effect/Brand").Brand<"ClientEventSequenceNumber">, number, never>;
|
|
133
133
|
}>;
|
|
134
|
-
|
|
135
|
-
global: Schema.BrandSchema<number & import("effect/Brand").Brand<"
|
|
136
|
-
client: Schema.BrandSchema<number & import("effect/Brand").Brand<"
|
|
134
|
+
parentSeqNum: Schema.Struct<{
|
|
135
|
+
global: Schema.BrandSchema<number & import("effect/Brand").Brand<"GlobalEventSequenceNumber">, number, never>;
|
|
136
|
+
client: Schema.BrandSchema<number & import("effect/Brand").Brand<"ClientEventSequenceNumber">, number, never>;
|
|
137
137
|
}>;
|
|
138
138
|
clientId: typeof Schema.String;
|
|
139
139
|
sessionId: typeof Schema.String;
|
|
@@ -170,8 +170,8 @@ export declare namespace LeaderWorkerInner {
|
|
|
170
170
|
const GetLeaderHead_base: Schema.TaggedRequestClass<GetLeaderHead, "GetLeaderHead", {
|
|
171
171
|
readonly _tag: Schema.tag<"GetLeaderHead">;
|
|
172
172
|
}, Schema.Struct<{
|
|
173
|
-
global: Schema.BrandSchema<number & import("effect/Brand").Brand<"
|
|
174
|
-
client: Schema.BrandSchema<number & import("effect/Brand").Brand<"
|
|
173
|
+
global: Schema.BrandSchema<number & import("effect/Brand").Brand<"GlobalEventSequenceNumber">, number, never>;
|
|
174
|
+
client: Schema.BrandSchema<number & import("effect/Brand").Brand<"ClientEventSequenceNumber">, number, never>;
|
|
175
175
|
}>, typeof UnexpectedError>;
|
|
176
176
|
export class GetLeaderHead extends GetLeaderHead_base {
|
|
177
177
|
}
|
package/dist/worker-schema.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BootStatus, Devtools, LeaderAheadError, LeaderPullCursor, MigrationsReport, SyncState, UnexpectedError, } from '@livestore/common';
|
|
2
|
-
import {
|
|
2
|
+
import { EventSequenceNumber, LiveStoreEvent } from '@livestore/common/schema';
|
|
3
3
|
import { Schema, Transferable } from '@livestore/utils/effect';
|
|
4
4
|
export const WorkerArgv = Schema.parseJson(Schema.Struct({
|
|
5
5
|
clientId: Schema.String,
|
|
@@ -115,7 +115,7 @@ export var LeaderWorkerInner;
|
|
|
115
115
|
LeaderWorkerInner.ExportEventlog = ExportEventlog;
|
|
116
116
|
class GetLeaderHead extends Schema.TaggedRequest()('GetLeaderHead', {
|
|
117
117
|
payload: {},
|
|
118
|
-
success:
|
|
118
|
+
success: EventSequenceNumber.EventSequenceNumber,
|
|
119
119
|
failure: UnexpectedError,
|
|
120
120
|
}) {
|
|
121
121
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worker-schema.js","sourceRoot":"","sources":["../src/worker-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,QAAQ,EACR,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,SAAS,EACT,eAAe,GAChB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"worker-schema.js","sourceRoot":"","sources":["../src/worker-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,QAAQ,EACR,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,SAAS,EACT,eAAe,GAChB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAC9E,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAE9D,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,SAAS,CACxC,MAAM,CAAC,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC,MAAM;IACvB,OAAO,EAAE,MAAM,CAAC,MAAM;IACtB,SAAS,EAAE,MAAM,CAAC,MAAM;CACzB,CAAC,CACH,CAAA;AAED,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,CAAC;IAC/C,IAAI,EAAE,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC;CAClC,CAAC,CAAA;AAIF,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC;IACzC,IAAI,EAAE,MAAM,CAAC,OAAO,CA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CAAC,UAAU,EAAE;QACzE,OAAO,EAAE,EAAE;QACX,OAAO,EAAE,MAAM,CAAC,IAAI;QACpB,OAAO,EAAE,eAAe;KACzB,CAAC;KAAG;IAJQ,0BAAQ,WAIhB,CAAA;IAEL,MAAa,oBAAqB,SAAQ,MAAM,CAAC,aAAa,EAAwB,CAAC,sBAAsB,EAAE;QAC7G,OAAO,EAAE;YACP,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,YAAY;SACtC;QACD,OAAO,EAAE,MAAM,CAAC,IAAI;QACpB,OAAO,EAAE,eAAe;KACzB,CAAC;KAAG;IANQ,sCAAoB,uBAM5B,CAAA;IAEQ,yBAAO,GAAG,MAAM,CAAC,KAAK,CACjC,cAAc,EACd,gBAAgB,EAChB,UAAU,EACV,YAAY,EACZ,MAAM,EACN,mBAAmB,EACnB,cAAc,EACd,aAAa,EACb,kBAAkB,EAClB,QAAQ,EACR,oBAAoB,CACrB,CAAA;AAEH,CAAC,EA7GgB,iBAAiB,KAAjB,iBAAiB,QA6GjC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@livestore/adapter-node",
|
|
3
|
-
"version": "0.3.0-dev.
|
|
3
|
+
"version": "0.3.0-dev.48",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"exports": {
|
|
@@ -26,13 +26,13 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@livestore/devtools-vite": "0.3.0-dev.
|
|
29
|
+
"@livestore/devtools-vite": "0.3.0-dev.48",
|
|
30
30
|
"@opentelemetry/api": "1.9.0",
|
|
31
31
|
"vite": "6.3.4",
|
|
32
|
-
"@livestore/common": "0.3.0-dev.
|
|
33
|
-
"@livestore/sqlite-wasm": "0.3.0-dev.
|
|
34
|
-
"@livestore/
|
|
35
|
-
"@livestore/
|
|
32
|
+
"@livestore/common": "0.3.0-dev.48",
|
|
33
|
+
"@livestore/sqlite-wasm": "0.3.0-dev.48",
|
|
34
|
+
"@livestore/webmesh": "0.3.0-dev.48",
|
|
35
|
+
"@livestore/utils": "0.3.0-dev.48"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@rollup/plugin-commonjs": "^28.0.3",
|
package/src/worker-schema.ts
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
SyncState,
|
|
8
8
|
UnexpectedError,
|
|
9
9
|
} from '@livestore/common'
|
|
10
|
-
import {
|
|
10
|
+
import { EventSequenceNumber, LiveStoreEvent } from '@livestore/common/schema'
|
|
11
11
|
import { Schema, Transferable } from '@livestore/utils/effect'
|
|
12
12
|
|
|
13
13
|
export const WorkerArgv = Schema.parseJson(
|
|
@@ -131,7 +131,7 @@ export namespace LeaderWorkerInner {
|
|
|
131
131
|
|
|
132
132
|
export class GetLeaderHead extends Schema.TaggedRequest<GetLeaderHead>()('GetLeaderHead', {
|
|
133
133
|
payload: {},
|
|
134
|
-
success:
|
|
134
|
+
success: EventSequenceNumber.EventSequenceNumber,
|
|
135
135
|
failure: UnexpectedError,
|
|
136
136
|
}) {}
|
|
137
137
|
|