reflectdb 0.1.1 → 0.1.2
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/cjs/react/index.cjs +3 -3
- package/dist/react/index.js +3 -3
- package/package.json +5 -4
package/dist/cjs/react/index.cjs
CHANGED
|
@@ -1191,7 +1191,7 @@ function pushSafely(client) {
|
|
|
1191
1191
|
}
|
|
1192
1192
|
|
|
1193
1193
|
// src/react/context.tsx
|
|
1194
|
-
var
|
|
1194
|
+
var jsx_runtime = require("react/jsx-runtime");
|
|
1195
1195
|
var SyncContext = import_react.createContext(null);
|
|
1196
1196
|
function createBrowserWsTransport(url) {
|
|
1197
1197
|
let ws = null;
|
|
@@ -1307,10 +1307,10 @@ function SyncProvider({
|
|
|
1307
1307
|
}, [url, clientId, storage, managedTables]);
|
|
1308
1308
|
if (!ctx)
|
|
1309
1309
|
return null;
|
|
1310
|
-
return /* @__PURE__ */
|
|
1310
|
+
return /* @__PURE__ */ jsx_runtime.jsx(SyncContext.Provider, {
|
|
1311
1311
|
value: ctx,
|
|
1312
1312
|
children
|
|
1313
|
-
}
|
|
1313
|
+
});
|
|
1314
1314
|
}
|
|
1315
1315
|
function useSyncClient() {
|
|
1316
1316
|
const ctx = import_react.useContext(SyncContext);
|
package/dist/react/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import"../shared/esm-k7kedp3y.js";
|
|
|
8
8
|
|
|
9
9
|
// src/react/context.tsx
|
|
10
10
|
import { createContext, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
11
|
-
import {
|
|
11
|
+
import { jsx } from "react/jsx-runtime";
|
|
12
12
|
var SyncContext = createContext(null);
|
|
13
13
|
function createBrowserWsTransport(url) {
|
|
14
14
|
let ws = null;
|
|
@@ -124,10 +124,10 @@ function SyncProvider({
|
|
|
124
124
|
}, [url, clientId, storage, managedTables]);
|
|
125
125
|
if (!ctx)
|
|
126
126
|
return null;
|
|
127
|
-
return /* @__PURE__ */
|
|
127
|
+
return /* @__PURE__ */ jsx(SyncContext.Provider, {
|
|
128
128
|
value: ctx,
|
|
129
129
|
children
|
|
130
|
-
}
|
|
130
|
+
});
|
|
131
131
|
}
|
|
132
132
|
function useSyncClient() {
|
|
133
133
|
const ctx = useContext(SyncContext);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "reflectdb",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Real-time sync engine for TypeScript — a server database and offline-first browser clients stay in sync, with optimistic writes and typed queries.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bun",
|
|
@@ -218,18 +218,19 @@
|
|
|
218
218
|
"access": "public"
|
|
219
219
|
},
|
|
220
220
|
"scripts": {
|
|
221
|
-
"build": "bunup --filter esm && bunup --filter cjs",
|
|
221
|
+
"build": "NODE_ENV=production bunup --filter esm && NODE_ENV=production bunup --filter cjs && bun run verify:jsx",
|
|
222
222
|
"format": "oxfmt",
|
|
223
223
|
"lint": "oxlint",
|
|
224
224
|
"prepare": "bun simple-git-hooks",
|
|
225
225
|
"release": "bumpp --commit --push --tag",
|
|
226
226
|
"test": "bun test",
|
|
227
227
|
"test:coverage": "bun test --coverage",
|
|
228
|
-
"test:watch": "bun test --watch",
|
|
229
|
-
"test:ui": "bun test/ui/server.tsx",
|
|
230
228
|
"test:sync": "bun test/ui/test-sync.ts",
|
|
229
|
+
"test:ui": "bun test/ui/server.tsx",
|
|
230
|
+
"test:watch": "bun test --watch",
|
|
231
231
|
"type-check": "tsc --noEmit",
|
|
232
232
|
"verify:exports": "bun scripts/verify-exports.ts",
|
|
233
|
+
"verify:jsx": "bun scripts/verify-jsx.ts",
|
|
233
234
|
"verify:node": "bun scripts/verify-node-consumer.ts"
|
|
234
235
|
},
|
|
235
236
|
"devDependencies": {
|