@syncular/testkit 0.30.16 → 0.32.0

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/server.d.ts CHANGED
@@ -1,12 +1,3 @@
1
- /**
2
- * The in-memory test server: one `SqliteServerStorage` (`:memory:`), a
3
- * `MemorySegmentStore`, and a `RealtimeHub`, all sharing the test's virtual
4
- * clock. It is the SHIPPED `@syncular/server` core — the kit adds no
5
- * server logic, it only wires the pieces an app would wire in production
6
- * (minus the HTTP adapter). Clients reach it through the loopback seam in
7
- * `client.ts`, calling `handleSyncRequest` / `handleSegmentDownload`
8
- * directly.
9
- */
10
1
  import { type ClientSchema } from '@syncular/client';
11
2
  import { type CommitValidator, MemorySegmentStore, type RealtimeHub, type ResolveScopes, SqliteServerStorage, type SyncRequestContext, type ValidatorRegistry } from '@syncular/server';
12
3
  import type { VirtualClock } from './clock.js';
package/dist/server.js CHANGED
@@ -7,6 +7,7 @@
7
7
  * `client.ts`, calling `handleSyncRequest` / `handleSegmentDownload`
8
8
  * directly.
9
9
  */
10
+ import { buildSqliteImage } from '@syncular/server/sqlite';
10
11
  import { compileClientSchema } from '@syncular/client';
11
12
  import { createRealtimeHub, MemorySegmentStore, SqliteServerStorage, } from '@syncular/server';
12
13
  /** Default partition every actor lives in (apps override via options). */
@@ -40,6 +41,7 @@ export function createTestServer(options) {
40
41
  const resolveScopes = options.resolveScopes ?? allowAllScopes(schema);
41
42
  const clockFn = () => clock.now();
42
43
  const hub = createRealtimeHub({
44
+ sqliteImageBuilder: buildSqliteImage,
43
45
  schema: serverSchema,
44
46
  storage,
45
47
  resolveScopes,
@@ -58,6 +60,7 @@ export function createTestServer(options) {
58
60
  hub,
59
61
  partition,
60
62
  ctxFor: (actorId) => ({
63
+ sqliteImageBuilder: buildSqliteImage,
61
64
  partition,
62
65
  actorId,
63
66
  schema: serverSchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syncular/testkit",
3
- "version": "0.30.16",
3
+ "version": "0.32.0",
4
4
  "description": "Syncular test kit: in-process loopback server + clients for integration scenarios",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Benjamin Kniffler",
@@ -64,8 +64,8 @@
64
64
  "test": "bun test --preload ./test/setup.ts"
65
65
  },
66
66
  "dependencies": {
67
- "@syncular/server": "0.30.16",
68
- "@syncular/client": "0.30.16"
67
+ "@syncular/server": "0.32.0",
68
+ "@syncular/client": "0.32.0"
69
69
  },
70
70
  "peerDependencies": {
71
71
  "react": ">=18.0.0"
@@ -77,7 +77,7 @@
77
77
  },
78
78
  "devDependencies": {
79
79
  "@happy-dom/global-registrator": "^20.0.0",
80
- "@syncular/react": "0.30.16",
80
+ "@syncular/react": "0.32.0",
81
81
  "@testing-library/react": "^16.1.0",
82
82
  "@types/react": "^18.3.0",
83
83
  "react": "^18.3.1",
package/src/server.ts CHANGED
@@ -7,6 +7,7 @@
7
7
  * `client.ts`, calling `handleSyncRequest` / `handleSegmentDownload`
8
8
  * directly.
9
9
  */
10
+ import { buildSqliteImage } from '@syncular/server/sqlite';
10
11
 
11
12
  import { type ClientSchema, compileClientSchema } from '@syncular/client';
12
13
  import {
@@ -80,6 +81,7 @@ export function createTestServer(options: TestServerOptions): TestServer {
80
81
  const resolveScopes = options.resolveScopes ?? allowAllScopes(schema);
81
82
  const clockFn = () => clock.now();
82
83
  const hub = createRealtimeHub({
84
+ sqliteImageBuilder: buildSqliteImage,
83
85
  schema: serverSchema,
84
86
  storage,
85
87
  resolveScopes,
@@ -98,6 +100,7 @@ export function createTestServer(options: TestServerOptions): TestServer {
98
100
  hub,
99
101
  partition,
100
102
  ctxFor: (actorId) => ({
103
+ sqliteImageBuilder: buildSqliteImage,
101
104
  partition,
102
105
  actorId,
103
106
  schema: serverSchema,