Compare commits
15 Commits
jazz-react
...
jazz-react
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
86acbcd0d6 | ||
|
|
9111c85445 | ||
|
|
1d87879787 | ||
|
|
7c777f2bdf | ||
|
|
aa8067b8d0 | ||
|
|
bd66cdeb78 | ||
|
|
8d29e50669 | ||
|
|
5a7398d242 | ||
|
|
74b984fbe6 | ||
|
|
f8e00204b4 | ||
|
|
76543df765 | ||
|
|
15d4b2a5f7 | ||
|
|
2e67f91fe0 | ||
|
|
0eb21a3471 | ||
|
|
aabe7bef34 |
@@ -1,5 +1,23 @@
|
||||
# chat-rn-clerk
|
||||
|
||||
## 1.0.54
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react-native@0.9.13
|
||||
- jazz-react-native-auth-clerk@0.9.13
|
||||
- jazz-tools@0.9.13
|
||||
- jazz-react-native-media-images@0.9.13
|
||||
|
||||
## 1.0.53
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react-native@0.9.12
|
||||
- jazz-react-native-auth-clerk@0.9.12
|
||||
- jazz-tools@0.9.12
|
||||
- jazz-react-native-media-images@0.9.12
|
||||
|
||||
## 1.0.52
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "chat-rn-clerk",
|
||||
"main": "index.js",
|
||||
"version": "1.0.52",
|
||||
"version": "1.0.54",
|
||||
"scripts": {
|
||||
"build": "expo export -p ios",
|
||||
"start": "expo start",
|
||||
|
||||
@@ -1,13 +1,7 @@
|
||||
import { useClerk, useUser } from "@clerk/clerk-expo";
|
||||
import { JazzProvider, setupKvStore } from "jazz-react-native";
|
||||
import { useJazzClerkAuth } from "jazz-react-native-auth-clerk";
|
||||
import React, {
|
||||
createContext,
|
||||
PropsWithChildren,
|
||||
useContext,
|
||||
useEffect,
|
||||
useState,
|
||||
} from "react";
|
||||
import React, { createContext, PropsWithChildren, useContext } from "react";
|
||||
import { Text, View } from "react-native";
|
||||
const AuthContext = createContext<{
|
||||
isAuthenticated: boolean;
|
||||
@@ -27,15 +21,7 @@ export function JazzAndAuth({ children }: PropsWithChildren) {
|
||||
const { isSignedIn, isLoaded: isClerkLoaded } = useUser();
|
||||
const clerk = useClerk();
|
||||
const [auth, state] = useJazzClerkAuth(clerk, kvStore);
|
||||
const [isAuthenticated, setIsAuthenticated] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
if (isSignedIn && isClerkLoaded && auth) {
|
||||
setIsAuthenticated(true);
|
||||
} else {
|
||||
setIsAuthenticated(false);
|
||||
}
|
||||
}, [isSignedIn, isClerkLoaded, auth]);
|
||||
const isAuthenticated = Boolean(isSignedIn && isClerkLoaded && auth);
|
||||
|
||||
return (
|
||||
<AuthContext.Provider
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
# chat-rn
|
||||
|
||||
## 1.0.51
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react-native@0.9.13
|
||||
- jazz-tools@0.9.13
|
||||
|
||||
## 1.0.50
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react-native@0.9.12
|
||||
- jazz-tools@0.9.12
|
||||
|
||||
## 1.0.49
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "chat-rn",
|
||||
"version": "1.0.49",
|
||||
"version": "1.0.51",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"build": "expo export -p ios",
|
||||
|
||||
@@ -1,5 +1,21 @@
|
||||
# chat-vue
|
||||
|
||||
## 0.0.38
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-browser@0.9.13
|
||||
- jazz-tools@0.9.13
|
||||
- jazz-vue@0.9.13
|
||||
|
||||
## 0.0.37
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-browser@0.9.12
|
||||
- jazz-tools@0.9.12
|
||||
- jazz-vue@0.9.12
|
||||
|
||||
## 0.0.36
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "chat-vue",
|
||||
"version": "0.0.36",
|
||||
"version": "0.0.38",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
||||
@@ -1,5 +1,21 @@
|
||||
# jazz-example-chat
|
||||
|
||||
## 0.0.134
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.13
|
||||
- jazz-tools@0.9.13
|
||||
- jazz-browser-media-images@0.9.13
|
||||
|
||||
## 0.0.133
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.12
|
||||
- jazz-tools@0.9.12
|
||||
- jazz-browser-media-images@0.9.12
|
||||
|
||||
## 0.0.132
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "jazz-example-chat",
|
||||
"private": true,
|
||||
"version": "0.0.132",
|
||||
"version": "0.0.134",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -1,5 +1,21 @@
|
||||
# minimal-auth-clerk
|
||||
|
||||
## 0.0.33
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.13
|
||||
- jazz-react-auth-clerk@0.9.13
|
||||
- jazz-tools@0.9.13
|
||||
|
||||
## 0.0.32
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.12
|
||||
- jazz-react-auth-clerk@0.9.12
|
||||
- jazz-tools@0.9.12
|
||||
|
||||
## 0.0.31
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "clerk",
|
||||
"private": true,
|
||||
"version": "0.0.31",
|
||||
"version": "0.0.33",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
@@ -13,7 +13,7 @@
|
||||
"dependencies": {
|
||||
"@clerk/clerk-react": "^5.4.1",
|
||||
"jazz-react": "workspace:*",
|
||||
"jazz-react-auth-clerk": "workspace:0.9.11",
|
||||
"jazz-react-auth-clerk": "workspace:0.9.13",
|
||||
"jazz-tools": "workspace:*",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1"
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
# file-share-svelte
|
||||
|
||||
## 0.0.18
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-svelte@0.9.13
|
||||
- jazz-tools@0.9.13
|
||||
|
||||
## 0.0.17
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-svelte@0.9.12
|
||||
- jazz-tools@0.9.12
|
||||
|
||||
## 0.0.16
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "file-share-svelte",
|
||||
"version": "0.0.16",
|
||||
"version": "0.0.18",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
||||
@@ -1,5 +1,21 @@
|
||||
# form
|
||||
|
||||
## 0.0.29
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.13
|
||||
- jazz-tools@0.9.13
|
||||
- jazz-browser-media-images@0.9.13
|
||||
|
||||
## 0.0.28
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.12
|
||||
- jazz-tools@0.9.12
|
||||
- jazz-browser-media-images@0.9.12
|
||||
|
||||
## 0.0.27
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "form",
|
||||
"private": true,
|
||||
"version": "0.0.27",
|
||||
"version": "0.0.29",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -1,5 +1,21 @@
|
||||
# image-upload
|
||||
|
||||
## 0.0.31
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.13
|
||||
- jazz-tools@0.9.13
|
||||
- jazz-browser-media-images@0.9.13
|
||||
|
||||
## 0.0.30
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.12
|
||||
- jazz-tools@0.9.12
|
||||
- jazz-browser-media-images@0.9.12
|
||||
|
||||
## 0.0.29
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "image-upload",
|
||||
"private": true,
|
||||
"version": "0.0.29",
|
||||
"version": "0.0.31",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -1,5 +1,21 @@
|
||||
# jazz-example-inspector
|
||||
|
||||
## 0.0.98
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [8d29e50]
|
||||
- cojson-transport-ws@0.9.13
|
||||
- cojson@0.9.13
|
||||
|
||||
## 0.0.97
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [15d4b2a]
|
||||
- cojson-transport-ws@0.9.12
|
||||
- cojson@0.9.12
|
||||
|
||||
## 0.0.96
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "jazz-inspector-app",
|
||||
"private": true,
|
||||
"version": "0.0.96",
|
||||
"version": "0.0.98",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
@@ -16,8 +16,8 @@
|
||||
"@radix-ui/react-toast": "^1.1.4",
|
||||
"class-variance-authority": "^0.7.0",
|
||||
"clsx": "^2.0.0",
|
||||
"cojson": "workspace:0.9.11",
|
||||
"cojson-transport-ws": "workspace:0.9.11",
|
||||
"cojson": "workspace:0.9.13",
|
||||
"cojson-transport-ws": "workspace:0.9.13",
|
||||
"hash-slash": "workspace:0.2.1",
|
||||
"lucide-react": "^0.274.0",
|
||||
"qrcode": "^1.5.3",
|
||||
|
||||
@@ -1,5 +1,21 @@
|
||||
# jazz-example-musicplayer
|
||||
|
||||
## 0.0.54
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-inspector@0.9.13
|
||||
- jazz-react@0.9.13
|
||||
- jazz-tools@0.9.13
|
||||
|
||||
## 0.0.53
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-inspector@0.9.12
|
||||
- jazz-react@0.9.12
|
||||
- jazz-tools@0.9.12
|
||||
|
||||
## 0.0.52
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "jazz-example-music-player",
|
||||
"private": true,
|
||||
"version": "0.0.52",
|
||||
"version": "0.0.54",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
@@ -18,8 +18,8 @@
|
||||
"@radix-ui/react-toast": "^1.1.4",
|
||||
"class-variance-authority": "^0.7.0",
|
||||
"clsx": "^2.0.0",
|
||||
"jazz-react": "workspace:0.9.11",
|
||||
"jazz-tools": "workspace:0.9.11",
|
||||
"jazz-react": "workspace:0.9.13",
|
||||
"jazz-tools": "workspace:0.9.13",
|
||||
"jazz-inspector": "workspace:*",
|
||||
"lucide-react": "^0.274.0",
|
||||
"react": "^18.3.1",
|
||||
|
||||
@@ -1,5 +1,21 @@
|
||||
# jazz-example-onboarding
|
||||
|
||||
## 0.0.35
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.13
|
||||
- jazz-tools@0.9.13
|
||||
- jazz-browser-media-images@0.9.13
|
||||
|
||||
## 0.0.34
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.12
|
||||
- jazz-tools@0.9.12
|
||||
- jazz-browser-media-images@0.9.12
|
||||
|
||||
## 0.0.33
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "jazz-example-onboarding",
|
||||
"private": true,
|
||||
"version": "0.0.33",
|
||||
"version": "0.0.35",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
# organization
|
||||
|
||||
## 0.0.27
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.13
|
||||
- jazz-tools@0.9.13
|
||||
|
||||
## 0.0.26
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.12
|
||||
- jazz-tools@0.9.12
|
||||
|
||||
## 0.0.25
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "organization",
|
||||
"private": true,
|
||||
"version": "0.0.25",
|
||||
"version": "0.0.27",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
# passkey-svelte
|
||||
|
||||
## 0.0.22
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-svelte@0.9.13
|
||||
|
||||
## 0.0.21
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-svelte@0.9.12
|
||||
|
||||
## 0.0.20
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "passkey-svelte",
|
||||
"version": "0.0.20",
|
||||
"version": "0.0.22",
|
||||
"type": "module",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
# minimal-auth-passkey
|
||||
|
||||
## 0.0.32
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.13
|
||||
- jazz-tools@0.9.13
|
||||
|
||||
## 0.0.31
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.12
|
||||
- jazz-tools@0.9.12
|
||||
|
||||
## 0.0.30
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "passkey",
|
||||
"private": true,
|
||||
"version": "0.0.30",
|
||||
"version": "0.0.32",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
# jazz-password-manager
|
||||
|
||||
## 0.0.53
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.13
|
||||
- jazz-tools@0.9.13
|
||||
|
||||
## 0.0.52
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.12
|
||||
- jazz-tools@0.9.12
|
||||
|
||||
## 0.0.51
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "jazz-password-manager",
|
||||
"private": true,
|
||||
"version": "0.0.51",
|
||||
"version": "0.0.53",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
@@ -12,8 +12,8 @@
|
||||
"clean-install": "rm -rf node_modules pnpm-lock.yaml && pnpm install"
|
||||
},
|
||||
"dependencies": {
|
||||
"jazz-react": "workspace:0.9.11",
|
||||
"jazz-tools": "workspace:0.9.11",
|
||||
"jazz-react": "workspace:0.9.13",
|
||||
"jazz-tools": "workspace:0.9.13",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"react-hook-form": "^7.41.5",
|
||||
|
||||
@@ -1,5 +1,21 @@
|
||||
# jazz-example-pets
|
||||
|
||||
## 0.0.151
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.13
|
||||
- jazz-tools@0.9.13
|
||||
- jazz-browser-media-images@0.9.13
|
||||
|
||||
## 0.0.150
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.12
|
||||
- jazz-tools@0.9.12
|
||||
- jazz-browser-media-images@0.9.12
|
||||
|
||||
## 0.0.149
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "jazz-example-pets",
|
||||
"private": true,
|
||||
"version": "0.0.149",
|
||||
"version": "0.0.151",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
@@ -19,9 +19,9 @@
|
||||
"@radix-ui/react-toast": "^1.1.4",
|
||||
"class-variance-authority": "^0.7.0",
|
||||
"clsx": "^2.0.0",
|
||||
"jazz-browser-media-images": "workspace:0.9.11",
|
||||
"jazz-react": "workspace:0.9.11",
|
||||
"jazz-tools": "workspace:0.9.11",
|
||||
"jazz-browser-media-images": "workspace:0.9.13",
|
||||
"jazz-react": "workspace:0.9.13",
|
||||
"jazz-tools": "workspace:0.9.13",
|
||||
"lucide-react": "^0.274.0",
|
||||
"qrcode": "^1.5.3",
|
||||
"react": "^18.3.1",
|
||||
@@ -41,7 +41,7 @@
|
||||
"@vitejs/plugin-react-swc": "^3.3.2",
|
||||
"autoprefixer": "^10.4.20",
|
||||
"is-ci": "^3.0.1",
|
||||
"jazz-run": "workspace:0.9.11",
|
||||
"jazz-run": "workspace:0.9.13",
|
||||
"postcss": "^8.4.27",
|
||||
"tailwindcss": "^3.4.15",
|
||||
"typescript": "~5.6.2",
|
||||
|
||||
@@ -1,5 +1,21 @@
|
||||
# reactions
|
||||
|
||||
## 0.0.31
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.13
|
||||
- jazz-tools@0.9.13
|
||||
- jazz-browser-media-images@0.9.13
|
||||
|
||||
## 0.0.30
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.12
|
||||
- jazz-tools@0.9.12
|
||||
- jazz-browser-media-images@0.9.12
|
||||
|
||||
## 0.0.29
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "reactions",
|
||||
"private": true,
|
||||
"version": "0.0.29",
|
||||
"version": "0.0.31",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -1,5 +1,21 @@
|
||||
# todo-vue
|
||||
|
||||
## 0.0.36
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-browser@0.9.13
|
||||
- jazz-tools@0.9.13
|
||||
- jazz-vue@0.9.13
|
||||
|
||||
## 0.0.35
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-browser@0.9.12
|
||||
- jazz-tools@0.9.12
|
||||
- jazz-vue@0.9.12
|
||||
|
||||
## 0.0.34
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "todo-vue",
|
||||
"version": "0.0.34",
|
||||
"version": "0.0.36",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
# jazz-example-todo
|
||||
|
||||
## 0.0.150
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.13
|
||||
- jazz-tools@0.9.13
|
||||
|
||||
## 0.0.149
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.12
|
||||
- jazz-tools@0.9.12
|
||||
|
||||
## 0.0.148
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "jazz-example-todo",
|
||||
"private": true,
|
||||
"version": "0.0.148",
|
||||
"version": "0.0.150",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
@@ -16,8 +16,8 @@
|
||||
"@radix-ui/react-toast": "^1.1.4",
|
||||
"class-variance-authority": "^0.7.0",
|
||||
"clsx": "^2.0.0",
|
||||
"jazz-react": "workspace:0.9.11",
|
||||
"jazz-tools": "workspace:0.9.11",
|
||||
"jazz-react": "workspace:0.9.13",
|
||||
"jazz-tools": "workspace:0.9.13",
|
||||
"lucide-react": "^0.274.0",
|
||||
"qrcode": "^1.5.3",
|
||||
"react": "^18.3.1",
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
# version-history
|
||||
|
||||
## 0.0.28
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.13
|
||||
- jazz-tools@0.9.13
|
||||
|
||||
## 0.0.27
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.12
|
||||
- jazz-tools@0.9.12
|
||||
|
||||
## 0.0.26
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "version-history",
|
||||
"private": true,
|
||||
"version": "0.0.26",
|
||||
"version": "0.0.28",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -1,5 +1,21 @@
|
||||
# cojson-storage-indexeddb
|
||||
|
||||
## 0.9.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [8d29e50]
|
||||
- cojson-storage@0.9.13
|
||||
- cojson@0.9.13
|
||||
|
||||
## 0.9.12
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [15d4b2a]
|
||||
- cojson-storage@0.9.12
|
||||
- cojson@0.9.12
|
||||
|
||||
## 0.9.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cojson-storage-indexeddb",
|
||||
"version": "0.9.11",
|
||||
"version": "0.9.13",
|
||||
"main": "dist/index.js",
|
||||
"type": "module",
|
||||
"types": "src/index.ts",
|
||||
|
||||
@@ -1,5 +1,21 @@
|
||||
# cojson-storage-sqlite
|
||||
|
||||
## 0.8.56
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [8d29e50]
|
||||
- cojson-storage@0.9.13
|
||||
- cojson@0.9.13
|
||||
|
||||
## 0.8.55
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [15d4b2a]
|
||||
- cojson-storage@0.9.12
|
||||
- cojson@0.9.12
|
||||
|
||||
## 0.8.54
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "cojson-storage-rn-sqlite",
|
||||
"type": "module",
|
||||
"version": "0.8.54",
|
||||
"version": "0.8.56",
|
||||
"main": "dist/index.js",
|
||||
"types": "src/index.ts",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -1,5 +1,23 @@
|
||||
# cojson-storage-sqlite
|
||||
|
||||
## 0.9.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 8d29e50: Restore the logger wrapper and adapt the API to pino
|
||||
- Updated dependencies [8d29e50]
|
||||
- cojson-storage@0.9.13
|
||||
- cojson@0.9.13
|
||||
|
||||
## 0.9.12
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 15d4b2a: Revert the custom logger
|
||||
- Updated dependencies [15d4b2a]
|
||||
- cojson-storage@0.9.12
|
||||
- cojson@0.9.12
|
||||
|
||||
## 0.9.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"name": "cojson-storage-sqlite",
|
||||
"type": "module",
|
||||
"version": "0.9.11",
|
||||
"version": "0.9.13",
|
||||
"main": "dist/index.js",
|
||||
"types": "src/index.ts",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"better-sqlite3": "^11.7.0",
|
||||
"cojson": "workspace:0.9.11",
|
||||
"cojson": "workspace:0.9.13",
|
||||
"cojson-storage": "workspace:*"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -28,6 +28,10 @@ export type RawTransactionRow = {
|
||||
tx: string;
|
||||
};
|
||||
|
||||
export function getErrorMessage(error: unknown) {
|
||||
return error instanceof Error ? error.message : "Unknown error";
|
||||
}
|
||||
|
||||
export class SQLiteClient implements DBClientInterface {
|
||||
private readonly db: DatabaseT;
|
||||
private readonly toLocalNode: OutgoingSyncQueue;
|
||||
@@ -53,7 +57,10 @@ export class SQLiteClient implements DBClientInterface {
|
||||
header: parsedHeader,
|
||||
};
|
||||
} catch (e) {
|
||||
logger.warn(coValueId, "Invalid JSON in header", e, coValueRow?.header);
|
||||
const headerValue = coValueRow?.header ?? "";
|
||||
logger.warn("Invalid JSON in header: " + headerValue, {
|
||||
id: coValueId,
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -80,7 +87,7 @@ export class SQLiteClient implements DBClientInterface {
|
||||
tx: JSON.parse(transactionRow.tx) as Transaction,
|
||||
}));
|
||||
} catch (e) {
|
||||
logger.warn("Invalid JSON in transaction", e);
|
||||
logger.warn("Invalid JSON in transaction");
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,15 +49,14 @@ export class SQLiteNode {
|
||||
? v.slice(0, 20) + "..."
|
||||
: v,
|
||||
)}`,
|
||||
e,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
processMessages().catch((e) =>
|
||||
logger.error("Error in processMessages in sqlite", e),
|
||||
);
|
||||
};
|
||||
|
||||
processMessages().catch((e) =>
|
||||
logger.error("Error in processMessages in sqlite", e),
|
||||
);
|
||||
}
|
||||
|
||||
static async asPeer({
|
||||
|
||||
@@ -1,5 +1,21 @@
|
||||
# cojson-storage
|
||||
|
||||
## 0.9.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 8d29e50: Restore the logger wrapper and adapt the API to pino
|
||||
- Updated dependencies [8d29e50]
|
||||
- cojson@0.9.13
|
||||
|
||||
## 0.9.12
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 15d4b2a: Revert the custom logger
|
||||
- Updated dependencies [15d4b2a]
|
||||
- cojson@0.9.12
|
||||
|
||||
## 0.9.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cojson-storage",
|
||||
"version": "0.9.11",
|
||||
"version": "0.9.13",
|
||||
"main": "dist/index.js",
|
||||
"type": "module",
|
||||
"types": "src/index.ts",
|
||||
|
||||
@@ -1,5 +1,21 @@
|
||||
# cojson-transport-nodejs-ws
|
||||
|
||||
## 0.9.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 8d29e50: Restore the logger wrapper and adapt the API to pino
|
||||
- Updated dependencies [8d29e50]
|
||||
- cojson@0.9.13
|
||||
|
||||
## 0.9.12
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 15d4b2a: Revert the custom logger
|
||||
- Updated dependencies [15d4b2a]
|
||||
- cojson@0.9.12
|
||||
|
||||
## 0.9.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "cojson-transport-ws",
|
||||
"type": "module",
|
||||
"version": "0.9.11",
|
||||
"version": "0.9.13",
|
||||
"main": "dist/index.js",
|
||||
"types": "src/index.ts",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"cojson": "workspace:0.9.11",
|
||||
"cojson": "workspace:0.9.13",
|
||||
"typescript": "~5.6.2"
|
||||
},
|
||||
"scripts": {
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
logger,
|
||||
} from "cojson";
|
||||
import { BatchedOutgoingMessages } from "./BatchedOutgoingMessages.js";
|
||||
import { deserializeMessages } from "./serialization.js";
|
||||
import { deserializeMessages, getErrorMessage } from "./serialization.js";
|
||||
import { AnyWebSocket } from "./types.js";
|
||||
|
||||
export const BUFFER_LIMIT = 100_000;
|
||||
@@ -164,9 +164,7 @@ export function createWebSocketPeer({
|
||||
|
||||
if (!result.ok) {
|
||||
logger.warn(
|
||||
"Error while deserializing messages",
|
||||
event.data,
|
||||
result.error,
|
||||
"Error while deserializing messages: " + getErrorMessage(result.error),
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
import { SyncMessage, logger } from "cojson";
|
||||
import { PingMsg } from "./types.js";
|
||||
|
||||
export function getErrorMessage(error: unknown) {
|
||||
return error instanceof Error ? error.message : "Unknown error";
|
||||
}
|
||||
|
||||
export function addMessageToBacklog(backlog: string, message: SyncMessage) {
|
||||
if (!backlog) {
|
||||
return JSON.stringify(message);
|
||||
@@ -24,7 +28,7 @@ export function deserializeMessages(messages: unknown) {
|
||||
| PingMsg[],
|
||||
} as const;
|
||||
} catch (e) {
|
||||
logger.error("Error while deserializing messages", e);
|
||||
logger.error("Error while deserializing messages: " + getErrorMessage(e));
|
||||
return {
|
||||
ok: false,
|
||||
error: e,
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
# cojson
|
||||
|
||||
## 0.9.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 8d29e50: Restore the logger wrapper and adapt the API to pino
|
||||
|
||||
## 0.9.12
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 15d4b2a: Revert the custom logger
|
||||
|
||||
## 0.9.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
},
|
||||
"type": "module",
|
||||
"license": "MIT",
|
||||
"version": "0.9.11",
|
||||
"version": "0.9.13",
|
||||
"devDependencies": {
|
||||
"@opentelemetry/sdk-metrics": "^1.29.0",
|
||||
"@types/jest": "^29.5.3",
|
||||
|
||||
@@ -138,7 +138,10 @@ export class PeerState {
|
||||
}
|
||||
|
||||
gracefulShutdown() {
|
||||
logger.debug("Gracefully closing", this.id);
|
||||
logger.debug("Gracefully closing", {
|
||||
peerId: this.id,
|
||||
peerRole: this.role,
|
||||
});
|
||||
this.closeQueue();
|
||||
this.peer.outgoing.close();
|
||||
this.closed = true;
|
||||
|
||||
@@ -304,7 +304,10 @@ async function loadCoValueFromPeers(
|
||||
if (coValueEntry.state.type === "loading") {
|
||||
const timeout = setTimeout(() => {
|
||||
if (coValueEntry.state.type === "loading") {
|
||||
logger.warn("Failed to load coValue from peer", peer.id);
|
||||
logger.warn("Failed to load coValue from peer", {
|
||||
peerId: peer.id,
|
||||
peerRole: peer.role,
|
||||
});
|
||||
coValueEntry.dispatch({
|
||||
type: "not-found-in-peer",
|
||||
peerId: peer.id,
|
||||
|
||||
@@ -60,7 +60,7 @@ export class RawAccount<
|
||||
);
|
||||
|
||||
if (agents.length !== 1) {
|
||||
logger.warn("Account has " + agents.length + " agents", this.id);
|
||||
logger.warn("Account has " + agents.length + " agents", { id: this.id });
|
||||
}
|
||||
|
||||
this._cachedCurrentAgentID = agents[0];
|
||||
|
||||
@@ -322,7 +322,7 @@ export class RawGroup<
|
||||
const secret = this.core.getReadKey(keyID);
|
||||
|
||||
if (!secret) {
|
||||
logger.error("Can't find key", keyID);
|
||||
logger.error("Can't find key " + keyID);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -193,7 +193,9 @@ export class PureJSCrypto extends CryptoProvider<Blake3State> {
|
||||
try {
|
||||
return JSON.parse(textDecoder.decode(plaintext));
|
||||
} catch (e) {
|
||||
logger.error("Failed to decrypt/parse sealed message", e);
|
||||
logger.error(
|
||||
"Failed to decrypt/parse sealed message: " + (e as Error)?.message,
|
||||
);
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -241,8 +241,9 @@ export class WasmCrypto extends CryptoProvider<Uint8Array> {
|
||||
try {
|
||||
return JSON.parse(textDecoder.decode(plaintext));
|
||||
} catch (e) {
|
||||
logger.error("Failed to decrypt/parse sealed message", e);
|
||||
return undefined;
|
||||
logger.error(
|
||||
"Failed to decrypt/parse sealed message: " + (e as Error)?.message,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -160,7 +160,7 @@ export abstract class CryptoProvider<Blake3State = any> {
|
||||
try {
|
||||
return parseJSON(this.decryptRaw(encrypted, keySecret, nOnceMaterial));
|
||||
} catch (e) {
|
||||
logger.error("Decryption error", e);
|
||||
logger.error("Decryption error: " + (e as Error)?.message);
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -231,7 +231,7 @@ export class LocalNode {
|
||||
|
||||
return node;
|
||||
} catch (e) {
|
||||
logger.error("Error withLoadedAccount", e);
|
||||
logger.error("Error withLoadedAccount: " + (e as Error)?.message);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
@@ -270,7 +270,9 @@ export class LocalNode {
|
||||
this.syncManager.getServerAndStoragePeers(skipLoadingFromPeer);
|
||||
|
||||
await entry.loadFromPeers(peers).catch((e) => {
|
||||
logger.error("Error loading from peers", id, e);
|
||||
logger.error("Error loading from peers: " + (e as Error)?.message, {
|
||||
id,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -324,7 +326,9 @@ export class LocalNode {
|
||||
unsubscribe = coValue.subscribe(callback);
|
||||
})
|
||||
.catch((e) => {
|
||||
logger.error("Error subscribing to ", id, e);
|
||||
logger.error(
|
||||
"Error subscribing to " + id + ": " + (e as Error)?.message,
|
||||
);
|
||||
});
|
||||
|
||||
return () => {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import type { JsonValue } from "./jsonValue.js";
|
||||
|
||||
export enum LogLevel {
|
||||
DEBUG = 0,
|
||||
INFO = 1,
|
||||
@@ -7,25 +9,25 @@ export enum LogLevel {
|
||||
}
|
||||
|
||||
export interface LogSystem {
|
||||
debug(message: string, ...args: any[]): void;
|
||||
info(message: string, ...args: any[]): void;
|
||||
warn(message: string, ...args: any[]): void;
|
||||
error(message: string, ...args: any[]): void;
|
||||
debug(message: string, attributes?: Record<string, JsonValue>): void;
|
||||
info(message: string, attributes?: Record<string, JsonValue>): void;
|
||||
warn(message: string, attributes?: Record<string, JsonValue>): void;
|
||||
error(message: string, attributes?: Record<string, JsonValue>): void;
|
||||
}
|
||||
|
||||
// Default console-based logging system
|
||||
export class ConsoleLogSystem implements LogSystem {
|
||||
debug(message: string, ...args: any[]) {
|
||||
console.debug(message, ...args);
|
||||
debug(message: string, attributes?: Record<string, JsonValue>) {
|
||||
console.debug(message, attributes);
|
||||
}
|
||||
info(message: string, ...args: any[]) {
|
||||
console.info(message, ...args);
|
||||
info(message: string, attributes?: Record<string, JsonValue>) {
|
||||
console.info(message, attributes);
|
||||
}
|
||||
warn(message: string, ...args: any[]) {
|
||||
console.warn(message, ...args);
|
||||
warn(message: string, attributes?: Record<string, JsonValue>) {
|
||||
console.warn(message, attributes);
|
||||
}
|
||||
error(message: string, ...args: any[]) {
|
||||
console.error(message, ...args);
|
||||
error(message: string, attributes?: Record<string, JsonValue>) {
|
||||
console.error(message, attributes);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,27 +51,27 @@ export class Logger {
|
||||
this.logSystem = logSystem;
|
||||
}
|
||||
|
||||
debug(message: string, ...args: any[]) {
|
||||
debug(message: string, attributes?: Record<string, JsonValue>) {
|
||||
if (this.level <= LogLevel.DEBUG) {
|
||||
this.logSystem.debug(message, ...args);
|
||||
this.logSystem.debug(message, attributes);
|
||||
}
|
||||
}
|
||||
|
||||
info(message: string, ...args: any[]) {
|
||||
info(message: string, attributes?: Record<string, JsonValue>) {
|
||||
if (this.level <= LogLevel.INFO) {
|
||||
this.logSystem.info(message, ...args);
|
||||
this.logSystem.info(message, attributes);
|
||||
}
|
||||
}
|
||||
|
||||
warn(message: string, ...args: any[]) {
|
||||
warn(message: string, attributes?: Record<string, JsonValue>) {
|
||||
if (this.level <= LogLevel.WARN) {
|
||||
this.logSystem.warn(message, ...args);
|
||||
this.logSystem.warn(message, attributes);
|
||||
}
|
||||
}
|
||||
|
||||
error(message: string, ...args: any[]) {
|
||||
error(message: string, attributes?: Record<string, JsonValue>) {
|
||||
if (this.level <= LogLevel.ERROR) {
|
||||
this.logSystem.error(message, ...args);
|
||||
this.logSystem.error(message, attributes);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,12 +42,15 @@ export function disablePermissionErrors() {
|
||||
logPermissionErrors = false;
|
||||
}
|
||||
|
||||
function logPermissionError(...args: unknown[]) {
|
||||
function logPermissionError(
|
||||
message: string,
|
||||
attributes?: Record<string, JsonValue>,
|
||||
) {
|
||||
if (logPermissionErrors === false) {
|
||||
return;
|
||||
}
|
||||
|
||||
logger.warn("Permission error", ...args);
|
||||
logger.warn("Permission error: " + message, attributes);
|
||||
}
|
||||
|
||||
export function determineValidTransactions(
|
||||
@@ -227,17 +230,10 @@ function determineValidTransactionsForGroup(
|
||||
try {
|
||||
changes = parseJSON(tx.changes);
|
||||
} catch (e) {
|
||||
logPermissionError(
|
||||
coValue.id,
|
||||
"Invalid JSON in transaction",
|
||||
e,
|
||||
logPermissionError("Invalid JSON in transaction", {
|
||||
id: coValue.id,
|
||||
tx,
|
||||
JSON.stringify(tx.changes, (k, v) =>
|
||||
k === "changes" || k === "encryptedChanges"
|
||||
? v.slice(0, 20) + "..."
|
||||
: v,
|
||||
),
|
||||
);
|
||||
});
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -90,8 +90,9 @@ export class LSMStorage<WH, RH, FS extends FileSystem<WH, RH>> {
|
||||
k === "changes" || k === "encryptedChanges"
|
||||
? v.slice(0, 20) + "..."
|
||||
: v,
|
||||
)}`,
|
||||
e,
|
||||
)}
|
||||
Error: ${e instanceof Error ? e.message : "Unknown error"},
|
||||
`,
|
||||
);
|
||||
}
|
||||
nMsg++;
|
||||
@@ -241,7 +242,7 @@ export class LSMStorage<WH, RH, FS extends FileSystem<WH, RH>> {
|
||||
} else {
|
||||
const merged = mergeChunks(coValue, newContentAsChunk);
|
||||
if (merged === "nonContigous") {
|
||||
logger.warn(
|
||||
console.warn(
|
||||
"Non-contigous new content for " + newContent.id,
|
||||
Object.entries(coValue.sessionEntries).map(([session, entries]) =>
|
||||
entries.map((entry) => ({
|
||||
@@ -316,7 +317,7 @@ export class LSMStorage<WH, RH, FS extends FileSystem<WH, RH>> {
|
||||
const merged = mergeChunks(result, nextChunk);
|
||||
|
||||
if (merged === "nonContigous") {
|
||||
logger.warn(
|
||||
console.warn(
|
||||
"Non-contigous chunks while loading " + id,
|
||||
result,
|
||||
nextChunk,
|
||||
@@ -375,7 +376,7 @@ export class LSMStorage<WH, RH, FS extends FileSystem<WH, RH>> {
|
||||
if (existingChunk) {
|
||||
const merged = mergeChunks(existingChunk, chunk);
|
||||
if (merged === "nonContigous") {
|
||||
logger.info(
|
||||
console.log(
|
||||
"Non-contigous chunks in " + chunk.id + ", " + fileName,
|
||||
existingChunk,
|
||||
chunk,
|
||||
@@ -449,7 +450,7 @@ export class LSMStorage<WH, RH, FS extends FileSystem<WH, RH>> {
|
||||
if (existingChunk) {
|
||||
const merged = mergeChunks(existingChunk, chunk);
|
||||
if (merged === "nonContigous") {
|
||||
logger.info(
|
||||
console.log(
|
||||
"Non-contigous chunks in " + entry.id + ", " + blockFile,
|
||||
existingChunk,
|
||||
chunk,
|
||||
|
||||
@@ -23,6 +23,10 @@ export function emptyKnownState(id: RawCoID): CoValueKnownState {
|
||||
};
|
||||
}
|
||||
|
||||
function getErrorMessage(e: unknown) {
|
||||
return e instanceof Error ? e.message : "Unknown error";
|
||||
}
|
||||
|
||||
export type SyncMessage =
|
||||
| LoadMessage
|
||||
| KnownStateMessage
|
||||
@@ -183,7 +187,7 @@ export class SyncManager {
|
||||
|
||||
if (entry.state.type !== "available") {
|
||||
entry.loadFromPeers([peer]).catch((e: unknown) => {
|
||||
logger.error("Error sending load", e);
|
||||
logger.error("Error sending load: " + getErrorMessage(e));
|
||||
});
|
||||
return;
|
||||
}
|
||||
@@ -200,7 +204,7 @@ export class SyncManager {
|
||||
action: "load",
|
||||
...coValue.knownState(),
|
||||
}).catch((e: unknown) => {
|
||||
logger.error("Error sending load", e);
|
||||
logger.error("Error sending load: " + getErrorMessage(e));
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -230,7 +234,7 @@ export class SyncManager {
|
||||
asDependencyOf,
|
||||
...coValue.knownState(),
|
||||
}).catch((e: unknown) => {
|
||||
logger.error("Error sending known state", e);
|
||||
logger.error("Error sending known state: " + getErrorMessage(e));
|
||||
});
|
||||
|
||||
peer.toldKnownState.add(id);
|
||||
@@ -258,7 +262,7 @@ export class SyncManager {
|
||||
let lastYield = performance.now();
|
||||
for (const [_i, piece] of newContentPieces.entries()) {
|
||||
this.trySendToPeer(peer, piece).catch((e: unknown) => {
|
||||
logger.error("Error sending content piece", e);
|
||||
logger.error("Error sending content piece: " + getErrorMessage(e));
|
||||
});
|
||||
|
||||
if (performance.now() - lastYield > 10) {
|
||||
@@ -331,7 +335,10 @@ export class SyncManager {
|
||||
return;
|
||||
}
|
||||
if (msg === "PingTimeout") {
|
||||
logger.error("Ping timeout from peer", peer.id);
|
||||
logger.error("Ping timeout from peer", {
|
||||
peerId: peer.id,
|
||||
peerRole: peer.role,
|
||||
});
|
||||
return;
|
||||
}
|
||||
try {
|
||||
@@ -354,13 +361,22 @@ export class SyncManager {
|
||||
processMessages()
|
||||
.then(() => {
|
||||
if (peer.crashOnClose) {
|
||||
logger.warn("Unexepcted close from peer", peer.id);
|
||||
logger.error("Unexepcted close from peer", {
|
||||
peerId: peer.id,
|
||||
peerRole: peer.role,
|
||||
});
|
||||
this.local.crashed = new Error("Unexpected close from peer");
|
||||
throw new Error("Unexpected close from peer");
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
logger.error("Error processing messages from peer", peer.id, e);
|
||||
logger.error(
|
||||
"Error processing messages from peer: " + getErrorMessage(e),
|
||||
{
|
||||
peerId: peer.id,
|
||||
peerRole: peer.role,
|
||||
},
|
||||
);
|
||||
if (peer.crashOnClose) {
|
||||
this.local.crashed = e;
|
||||
throw new Error(e);
|
||||
@@ -596,17 +612,11 @@ export class SyncManager {
|
||||
// );
|
||||
|
||||
if (result.isErr()) {
|
||||
logger.error(
|
||||
"Failed to add transactions from",
|
||||
peer.id,
|
||||
result.error,
|
||||
msg.id,
|
||||
newTransactions.length + " new transactions",
|
||||
"after: " + newContentForSession.after,
|
||||
"our last known tx idx initially: " + ourKnownTxIdx,
|
||||
"our last known tx idx now: " +
|
||||
coValue.sessionLogs.get(sessionID)?.transactions.length,
|
||||
);
|
||||
logger.error("Failed to add transactions: " + result.error.type, {
|
||||
peerId: peer.id,
|
||||
peerRole: peer.role,
|
||||
id: msg.id,
|
||||
});
|
||||
peer.erroredCoValues.set(msg.id, result.error);
|
||||
continue;
|
||||
}
|
||||
@@ -627,7 +637,13 @@ export class SyncManager {
|
||||
isCorrection: true,
|
||||
...coValue.knownState(),
|
||||
}).catch((e) => {
|
||||
logger.error("Error sending known state correction", e);
|
||||
logger.error(
|
||||
"Error sending known state correction: " + getErrorMessage(e),
|
||||
{
|
||||
peerId: peer.id,
|
||||
peerRole: peer.role,
|
||||
},
|
||||
);
|
||||
});
|
||||
} else {
|
||||
/**
|
||||
@@ -641,7 +657,10 @@ export class SyncManager {
|
||||
action: "known",
|
||||
...coValue.knownState(),
|
||||
}).catch((e: unknown) => {
|
||||
logger.error("Error sending known state", e);
|
||||
logger.error("Error sending known state: " + getErrorMessage(e), {
|
||||
peerId: peer.id,
|
||||
peerRole: peer.role,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -20,8 +20,14 @@ describe("Logger", () => {
|
||||
|
||||
expect(mockLogSystem.debug).not.toHaveBeenCalled();
|
||||
expect(mockLogSystem.info).not.toHaveBeenCalled();
|
||||
expect(mockLogSystem.warn).toHaveBeenCalledWith("Warning message");
|
||||
expect(mockLogSystem.error).toHaveBeenCalledWith("Error message");
|
||||
expect(mockLogSystem.warn).toHaveBeenCalledWith(
|
||||
"Warning message",
|
||||
undefined,
|
||||
);
|
||||
expect(mockLogSystem.error).toHaveBeenCalledWith(
|
||||
"Error message",
|
||||
undefined,
|
||||
);
|
||||
});
|
||||
|
||||
test("should pass additional arguments to log system", () => {
|
||||
@@ -33,14 +39,12 @@ describe("Logger", () => {
|
||||
};
|
||||
|
||||
const logger = new Logger(LogLevel.DEBUG, mockLogSystem);
|
||||
const additionalArgs = [{ foo: "bar" }, 42, "extra"];
|
||||
|
||||
logger.debug("Debug message", ...additionalArgs);
|
||||
logger.debug("Debug message", { foo: "bar" });
|
||||
|
||||
expect(mockLogSystem.debug).toHaveBeenCalledWith(
|
||||
"Debug message",
|
||||
...additionalArgs,
|
||||
);
|
||||
expect(mockLogSystem.debug).toHaveBeenCalledWith("Debug message", {
|
||||
foo: "bar",
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -60,7 +64,7 @@ describe("Logger", () => {
|
||||
|
||||
logger.setLevel(LogLevel.WARN);
|
||||
logger.warn("Warning 2"); // Should log
|
||||
expect(mockLogSystem.warn).toHaveBeenCalledWith("Warning 2");
|
||||
expect(mockLogSystem.warn).toHaveBeenCalledWith("Warning 2", undefined);
|
||||
});
|
||||
|
||||
test("should allow changing log system at runtime", () => {
|
||||
@@ -81,12 +85,12 @@ describe("Logger", () => {
|
||||
const logger = new Logger(LogLevel.INFO, mockLogSystem1);
|
||||
|
||||
logger.info("Message 1");
|
||||
expect(mockLogSystem1.info).toHaveBeenCalledWith("Message 1");
|
||||
expect(mockLogSystem1.info).toHaveBeenCalledWith("Message 1", undefined);
|
||||
expect(mockLogSystem2.info).not.toHaveBeenCalled();
|
||||
|
||||
logger.setLogSystem(mockLogSystem2);
|
||||
logger.info("Message 2");
|
||||
expect(mockLogSystem2.info).toHaveBeenCalledWith("Message 2");
|
||||
expect(mockLogSystem2.info).toHaveBeenCalledWith("Message 2", undefined);
|
||||
expect(mockLogSystem1.info).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
});
|
||||
@@ -103,17 +107,17 @@ describe("Logger", () => {
|
||||
const logger = new Logger();
|
||||
logger.setLevel(LogLevel.DEBUG);
|
||||
const testMessage = "Test message";
|
||||
const testArgs = [{ data: "test" }, 123];
|
||||
const testArgs = { data: "test" };
|
||||
|
||||
logger.debug(testMessage, ...testArgs);
|
||||
logger.info(testMessage, ...testArgs);
|
||||
logger.warn(testMessage, ...testArgs);
|
||||
logger.error(testMessage, ...testArgs);
|
||||
logger.debug(testMessage, testArgs);
|
||||
logger.info(testMessage, testArgs);
|
||||
logger.warn(testMessage, testArgs);
|
||||
logger.error(testMessage, testArgs);
|
||||
|
||||
expect(consoleSpy.debug).toHaveBeenCalledWith(testMessage, ...testArgs);
|
||||
expect(consoleSpy.info).toHaveBeenCalledWith(testMessage, ...testArgs);
|
||||
expect(consoleSpy.warn).toHaveBeenCalledWith(testMessage, ...testArgs);
|
||||
expect(consoleSpy.error).toHaveBeenCalledWith(testMessage, ...testArgs);
|
||||
expect(consoleSpy.debug).toHaveBeenCalledWith(testMessage, testArgs);
|
||||
expect(consoleSpy.info).toHaveBeenCalledWith(testMessage, testArgs);
|
||||
expect(consoleSpy.warn).toHaveBeenCalledWith(testMessage, testArgs);
|
||||
expect(consoleSpy.error).toHaveBeenCalledWith(testMessage, testArgs);
|
||||
|
||||
// Cleanup
|
||||
Object.values(consoleSpy).forEach((spy) => spy.mockRestore());
|
||||
|
||||
@@ -1,5 +1,23 @@
|
||||
# jazz-browser-media-images
|
||||
|
||||
## 0.9.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [8d29e50]
|
||||
- cojson@0.9.13
|
||||
- jazz-browser@0.9.13
|
||||
- jazz-tools@0.9.13
|
||||
|
||||
## 0.9.12
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [15d4b2a]
|
||||
- cojson@0.9.12
|
||||
- jazz-browser@0.9.12
|
||||
- jazz-tools@0.9.12
|
||||
|
||||
## 0.9.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
{
|
||||
"name": "jazz-browser-auth-clerk",
|
||||
"version": "0.9.11",
|
||||
"version": "0.9.13",
|
||||
"type": "module",
|
||||
"main": "dist/index.js",
|
||||
"types": "src/index.ts",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"cojson": "workspace:0.9.11",
|
||||
"jazz-browser": "workspace:0.9.11",
|
||||
"jazz-tools": "workspace:0.9.11"
|
||||
"cojson": "workspace:0.9.13",
|
||||
"jazz-browser": "workspace:0.9.13",
|
||||
"jazz-tools": "workspace:0.9.13"
|
||||
},
|
||||
"scripts": {
|
||||
"format-and-lint": "biome check .",
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
# jazz-browser-media-images
|
||||
|
||||
## 0.9.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-browser@0.9.13
|
||||
- jazz-tools@0.9.13
|
||||
|
||||
## 0.9.12
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-browser@0.9.12
|
||||
- jazz-tools@0.9.12
|
||||
|
||||
## 0.9.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "jazz-browser-media-images",
|
||||
"version": "0.9.11",
|
||||
"version": "0.9.13",
|
||||
"type": "module",
|
||||
"main": "dist/index.js",
|
||||
"types": "src/index.ts",
|
||||
@@ -8,8 +8,8 @@
|
||||
"dependencies": {
|
||||
"@types/image-blob-reduce": "^4.1.1",
|
||||
"image-blob-reduce": "^4.1.0",
|
||||
"jazz-browser": "workspace:0.9.11",
|
||||
"jazz-tools": "workspace:0.9.11",
|
||||
"jazz-browser": "workspace:0.9.13",
|
||||
"jazz-tools": "workspace:0.9.13",
|
||||
"pica": "^9.0.1",
|
||||
"typescript": "~5.6.2"
|
||||
},
|
||||
|
||||
@@ -1,5 +1,25 @@
|
||||
# jazz-browser
|
||||
|
||||
## 0.9.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [8d29e50]
|
||||
- cojson-transport-ws@0.9.13
|
||||
- cojson@0.9.13
|
||||
- cojson-storage-indexeddb@0.9.13
|
||||
- jazz-tools@0.9.13
|
||||
|
||||
## 0.9.12
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [15d4b2a]
|
||||
- cojson-transport-ws@0.9.12
|
||||
- cojson@0.9.12
|
||||
- cojson-storage-indexeddb@0.9.12
|
||||
- jazz-tools@0.9.12
|
||||
|
||||
## 0.9.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
{
|
||||
"name": "jazz-browser",
|
||||
"version": "0.9.11",
|
||||
"version": "0.9.13",
|
||||
"type": "module",
|
||||
"main": "dist/index.js",
|
||||
"types": "src/index.ts",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@scure/bip39": "^1.3.0",
|
||||
"cojson": "workspace:0.9.11",
|
||||
"cojson-storage-indexeddb": "workspace:0.9.11",
|
||||
"cojson-transport-ws": "workspace:0.9.11",
|
||||
"jazz-tools": "workspace:0.9.11",
|
||||
"cojson": "workspace:0.9.13",
|
||||
"cojson-storage-indexeddb": "workspace:0.9.13",
|
||||
"cojson-transport-ws": "workspace:0.9.13",
|
||||
"jazz-tools": "workspace:0.9.13",
|
||||
"typescript": "~5.6.2"
|
||||
},
|
||||
"scripts": {
|
||||
|
||||
@@ -1,5 +1,23 @@
|
||||
# jazz-inspector
|
||||
|
||||
## 0.9.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [8d29e50]
|
||||
- cojson@0.9.13
|
||||
- jazz-react-core@0.8.54
|
||||
- jazz-tools@0.9.13
|
||||
|
||||
## 0.9.12
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [15d4b2a]
|
||||
- cojson@0.9.12
|
||||
- jazz-react-core@0.8.53
|
||||
- jazz-tools@0.9.12
|
||||
|
||||
## 0.9.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "jazz-inspector",
|
||||
"version": "0.9.11",
|
||||
"version": "0.9.13",
|
||||
"type": "module",
|
||||
"main": "./dist/jazz-inspector.js",
|
||||
"types": "./src/app.tsx",
|
||||
|
||||
@@ -1,5 +1,23 @@
|
||||
# jazz-autosub
|
||||
|
||||
## 0.9.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [8d29e50]
|
||||
- cojson-transport-ws@0.9.13
|
||||
- cojson@0.9.13
|
||||
- jazz-tools@0.9.13
|
||||
|
||||
## 0.9.12
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [15d4b2a]
|
||||
- cojson-transport-ws@0.9.12
|
||||
- cojson@0.9.12
|
||||
- jazz-tools@0.9.12
|
||||
|
||||
## 0.9.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
"types": "src/index.ts",
|
||||
"type": "module",
|
||||
"license": "MIT",
|
||||
"version": "0.9.11",
|
||||
"version": "0.9.13",
|
||||
"dependencies": {
|
||||
"cojson": "workspace:0.9.11",
|
||||
"cojson-transport-ws": "workspace:0.9.11",
|
||||
"jazz-tools": "workspace:0.9.11",
|
||||
"cojson": "workspace:0.9.13",
|
||||
"cojson-transport-ws": "workspace:0.9.13",
|
||||
"jazz-tools": "workspace:0.9.13",
|
||||
"ws": "^8.14.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
76
packages/jazz-nodejs/src/test/startSyncServer.test.ts
Normal file
76
packages/jazz-nodejs/src/test/startSyncServer.test.ts
Normal file
@@ -0,0 +1,76 @@
|
||||
import { randomUUID } from "crypto";
|
||||
import { tmpdir } from "os";
|
||||
import { join } from "path";
|
||||
import { createWorkerAccount } from "jazz-run/createWorkerAccount";
|
||||
import { startSyncServer } from "jazz-run/startSyncServer";
|
||||
import { CoMap, co } from "jazz-tools";
|
||||
import { describe, expect, test } from "vitest";
|
||||
import { startWorker } from "../index";
|
||||
|
||||
class TestMap extends CoMap {
|
||||
value = co.string;
|
||||
}
|
||||
|
||||
describe("startSyncServer", () => {
|
||||
test("persists values in storage and loads them after restart", async () => {
|
||||
// Create a temporary database file
|
||||
const dbPath = join(tmpdir(), `test-${randomUUID()}.db`);
|
||||
|
||||
// Start first server instance
|
||||
const server1 = await startSyncServer({
|
||||
port: "0", // Random available port
|
||||
inMemory: false,
|
||||
db: dbPath,
|
||||
});
|
||||
|
||||
const port = (server1.address() as any).port;
|
||||
const syncServer = `ws://localhost:${port}`;
|
||||
|
||||
// Create worker account and start first worker
|
||||
const { accountID, agentSecret } = await createWorkerAccount({
|
||||
name: "test-worker",
|
||||
peer: syncServer,
|
||||
});
|
||||
|
||||
const worker1 = await startWorker({
|
||||
accountID,
|
||||
accountSecret: agentSecret,
|
||||
syncServer,
|
||||
});
|
||||
|
||||
// Create and sync test data
|
||||
const map = TestMap.create({ value: "testValue" });
|
||||
|
||||
// Close first server
|
||||
await worker1.done();
|
||||
server1.close();
|
||||
|
||||
// Start second server instance with same DB
|
||||
const server2 = await startSyncServer({
|
||||
port: "0",
|
||||
inMemory: false,
|
||||
db: dbPath,
|
||||
});
|
||||
|
||||
const port2 = (server2.address() as any).port;
|
||||
const syncServer2 = `ws://localhost:${port2}`;
|
||||
|
||||
// Start second worker with same account
|
||||
const worker2 = await startWorker({
|
||||
accountID,
|
||||
accountSecret: agentSecret,
|
||||
syncServer: syncServer2,
|
||||
});
|
||||
|
||||
// Try to load the previously created map
|
||||
const loadedMap = await TestMap.load(map.id, {});
|
||||
|
||||
// Verify the data persisted
|
||||
expect(loadedMap).not.toBe(null);
|
||||
expect(loadedMap?.value).toBe("testValue");
|
||||
|
||||
// Cleanup
|
||||
await worker2.done();
|
||||
server2.close();
|
||||
});
|
||||
});
|
||||
@@ -3,7 +3,6 @@ import { startSyncServer } from "jazz-run/startSyncServer";
|
||||
import { CoMap, Group, InboxSender, co } from "jazz-tools";
|
||||
import { describe, expect, onTestFinished, test } from "vitest";
|
||||
import { startWorker } from "../index";
|
||||
import { waitFor } from "./utils";
|
||||
|
||||
async function setup() {
|
||||
const { server, port } = await setupSyncServer();
|
||||
|
||||
@@ -1,5 +1,25 @@
|
||||
# jazz-browser-media-images
|
||||
|
||||
## 0.9.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [8d29e50]
|
||||
- cojson@0.9.13
|
||||
- jazz-browser-auth-clerk@0.9.13
|
||||
- jazz-react@0.9.13
|
||||
- jazz-tools@0.9.13
|
||||
|
||||
## 0.9.12
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [15d4b2a]
|
||||
- cojson@0.9.12
|
||||
- jazz-browser-auth-clerk@0.9.12
|
||||
- jazz-react@0.9.12
|
||||
- jazz-tools@0.9.12
|
||||
|
||||
## 0.9.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
{
|
||||
"name": "jazz-react-auth-clerk",
|
||||
"version": "0.9.11",
|
||||
"version": "0.9.13",
|
||||
"type": "module",
|
||||
"main": "dist/index.js",
|
||||
"types": "src/index.tsx",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"cojson": "workspace:0.9.11",
|
||||
"jazz-browser-auth-clerk": "workspace:0.9.11",
|
||||
"jazz-react": "workspace:0.9.11",
|
||||
"jazz-tools": "workspace:0.9.11"
|
||||
"cojson": "workspace:0.9.13",
|
||||
"jazz-browser-auth-clerk": "workspace:0.9.13",
|
||||
"jazz-react": "workspace:0.9.13",
|
||||
"jazz-tools": "workspace:0.9.13"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "^18.2.0"
|
||||
|
||||
@@ -1,5 +1,21 @@
|
||||
# jazz-react-core
|
||||
|
||||
## 0.8.54
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [8d29e50]
|
||||
- cojson@0.9.13
|
||||
- jazz-tools@0.9.13
|
||||
|
||||
## 0.8.53
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [15d4b2a]
|
||||
- cojson@0.9.12
|
||||
- jazz-tools@0.9.12
|
||||
|
||||
## 0.8.52
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "jazz-react-core",
|
||||
"version": "0.8.52",
|
||||
"version": "0.8.54",
|
||||
"type": "module",
|
||||
"main": "dist/index.js",
|
||||
"types": "src/index.ts",
|
||||
|
||||
@@ -1,5 +1,23 @@
|
||||
# jazz-react-native-auth-clerk
|
||||
|
||||
## 0.9.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [8d29e50]
|
||||
- cojson@0.9.13
|
||||
- jazz-react-native@0.9.13
|
||||
- jazz-tools@0.9.13
|
||||
|
||||
## 0.9.12
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [15d4b2a]
|
||||
- cojson@0.9.12
|
||||
- jazz-react-native@0.9.12
|
||||
- jazz-tools@0.9.12
|
||||
|
||||
## 0.9.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "jazz-react-native-auth-clerk",
|
||||
"version": "0.9.11",
|
||||
"version": "0.9.13",
|
||||
"type": "module",
|
||||
"main": "dist/index.js",
|
||||
"types": "src/index.ts",
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
# jazz-browser-media-images
|
||||
|
||||
## 0.9.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-tools@0.9.13
|
||||
|
||||
## 0.9.12
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-tools@0.9.12
|
||||
|
||||
## 0.9.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "jazz-react-native-media-images",
|
||||
"version": "0.9.11",
|
||||
"version": "0.9.13",
|
||||
"type": "module",
|
||||
"main": "dist/index.js",
|
||||
"types": "src/index.ts",
|
||||
|
||||
@@ -1,5 +1,27 @@
|
||||
# jazz-browser
|
||||
|
||||
## 0.9.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [8d29e50]
|
||||
- cojson-transport-ws@0.9.13
|
||||
- cojson@0.9.13
|
||||
- cojson-storage-rn-sqlite@0.8.56
|
||||
- jazz-react-core@0.8.54
|
||||
- jazz-tools@0.9.13
|
||||
|
||||
## 0.9.12
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [15d4b2a]
|
||||
- cojson-transport-ws@0.9.12
|
||||
- cojson@0.9.12
|
||||
- cojson-storage-rn-sqlite@0.8.55
|
||||
- jazz-react-core@0.8.53
|
||||
- jazz-tools@0.9.12
|
||||
|
||||
## 0.9.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "jazz-react-native",
|
||||
"version": "0.9.11",
|
||||
"version": "0.9.13",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.js",
|
||||
|
||||
@@ -7,6 +7,7 @@ import {
|
||||
TextInput,
|
||||
TouchableOpacity,
|
||||
View,
|
||||
useColorScheme,
|
||||
} from "react-native";
|
||||
import { KvStore } from "../storage/kv-store-context.js";
|
||||
import { RNDemoAuth } from "./DemoAuthMethod.js";
|
||||
@@ -104,7 +105,8 @@ export const DemoAuthBasicUI = ({
|
||||
appName: string;
|
||||
state: DemoAuthState;
|
||||
}) => {
|
||||
const darkMode = false;
|
||||
const colorScheme = useColorScheme();
|
||||
const darkMode = colorScheme === "dark";
|
||||
const [username, setUsername] = useState<string>("");
|
||||
const [errorMessage, setErrorMessage] = useState<string | null>(null);
|
||||
|
||||
|
||||
@@ -1,5 +1,25 @@
|
||||
# jazz-react
|
||||
|
||||
## 0.9.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [8d29e50]
|
||||
- cojson@0.9.13
|
||||
- jazz-browser@0.9.13
|
||||
- jazz-react-core@0.8.54
|
||||
- jazz-tools@0.9.13
|
||||
|
||||
## 0.9.12
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [15d4b2a]
|
||||
- cojson@0.9.12
|
||||
- jazz-browser@0.9.12
|
||||
- jazz-react-core@0.8.53
|
||||
- jazz-tools@0.9.12
|
||||
|
||||
## 0.9.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "jazz-react",
|
||||
"version": "0.9.11",
|
||||
"version": "0.9.13",
|
||||
"type": "module",
|
||||
"main": "dist/index.js",
|
||||
"types": "src/index.ts",
|
||||
@@ -17,9 +17,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@scure/bip39": "^1.3.0",
|
||||
"cojson": "workspace:0.9.11",
|
||||
"jazz-browser": "workspace:0.9.11",
|
||||
"jazz-tools": "workspace:0.9.11",
|
||||
"cojson": "workspace:0.9.13",
|
||||
"jazz-browser": "workspace:0.9.13",
|
||||
"jazz-tools": "workspace:0.9.13",
|
||||
"jazz-react-core": "workspace:*"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -1,5 +1,25 @@
|
||||
# jazz-run
|
||||
|
||||
## 0.9.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [8d29e50]
|
||||
- cojson-storage-sqlite@0.9.13
|
||||
- cojson-transport-ws@0.9.13
|
||||
- cojson@0.9.13
|
||||
- jazz-tools@0.9.13
|
||||
|
||||
## 0.9.12
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [15d4b2a]
|
||||
- cojson-storage-sqlite@0.9.12
|
||||
- cojson-transport-ws@0.9.12
|
||||
- cojson@0.9.12
|
||||
- jazz-tools@0.9.12
|
||||
|
||||
## 0.9.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"bin": "./dist/index.js",
|
||||
"type": "module",
|
||||
"license": "MIT",
|
||||
"version": "0.9.11",
|
||||
"version": "0.9.13",
|
||||
"exports": {
|
||||
"./startSyncServer": {
|
||||
"import": "./dist/startSyncServer.js",
|
||||
@@ -28,11 +28,11 @@
|
||||
"@effect/printer-ansi": "^0.34.5",
|
||||
"@effect/schema": "^0.71.1",
|
||||
"@effect/typeclass": "^0.25.5",
|
||||
"cojson": "workspace:0.9.11",
|
||||
"cojson-storage-sqlite": "workspace:0.9.11",
|
||||
"cojson-transport-ws": "workspace:0.9.11",
|
||||
"cojson": "workspace:0.9.13",
|
||||
"cojson-storage-sqlite": "workspace:0.9.13",
|
||||
"cojson-transport-ws": "workspace:0.9.13",
|
||||
"effect": "^3.6.5",
|
||||
"jazz-tools": "workspace:0.9.11",
|
||||
"jazz-tools": "workspace:0.9.13",
|
||||
"ws": "^8.14.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -1,5 +1,23 @@
|
||||
# jazz-svelte
|
||||
|
||||
## 0.9.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [8d29e50]
|
||||
- cojson@0.9.13
|
||||
- jazz-browser@0.9.13
|
||||
- jazz-tools@0.9.13
|
||||
|
||||
## 0.9.12
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [15d4b2a]
|
||||
- cojson@0.9.12
|
||||
- jazz-browser@0.9.12
|
||||
- jazz-tools@0.9.12
|
||||
|
||||
## 0.9.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "jazz-svelte",
|
||||
"version": "0.9.11",
|
||||
"version": "0.9.13",
|
||||
"scripts": {
|
||||
"dev": "vite dev",
|
||||
"build": "vite build && npm run package",
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user