Compare commits

..

66 Commits

Author SHA1 Message Date
Guido D'Orsi
c4b8befe27 Merge pull request #1278 from garden-co/changeset-release/main
Version Packages
2025-01-27 09:21:29 +01:00
Guido D'Orsi
06f667ef2a Merge pull request #1280 from doingandlearning/patch-2
Update README.md
2025-01-27 09:21:16 +01:00
github-actions[bot]
bac3cc7bf8 Version Packages 2025-01-27 08:17:07 +00:00
Guido D'Orsi
6ad0a9f886 chore: changeset 2025-01-27 09:15:44 +01:00
Kevin Cunningham
9b12932b66 Update README.md 2025-01-26 09:10:49 +00:00
Guido D'Orsi
82bb0d51d9 Merge pull request #1277 from garden-co/changeset-release/main
Version Packages
2025-01-25 20:27:12 +01:00
Guido D'Orsi
39dede92e8 Merge pull request #1273 from garden-co/fix/remove-npm-create
Remove npm create jazz-app from instructions
2025-01-25 20:27:00 +01:00
github-actions[bot]
84f4e6e48d Version Packages 2025-01-25 19:22:29 +00:00
Guido D'Orsi
e629dea585 fix: remove internal imports to cojson 2025-01-25 20:21:22 +01:00
Guido D'Orsi
2faf22ffff chore: changeset 2025-01-25 18:45:43 +01:00
Guido D'Orsi
2273505a13 Merge pull request #1276 from anchpop/@anchpop/remove-inspector-vite
fix(jazz-inspector): export typescript types and remove unneeded vite build step
2025-01-25 18:45:30 +01:00
Andre Popovitch
19eb29d831 fix(jazz-inspector): export typescript types and remove unneeded vite build step 2025-01-26 00:04:00 +09:00
Andre Popovitch
738c4c2bd7 fix(jazz-inspector): Add files entry to package.json so dist is included in published releases 2025-01-25 23:37:27 +09:00
Guido D'Orsi
64e2273475 Merge pull request #1274 from garden-co/changeset-release/main
Version Packages
2025-01-25 11:20:10 +01:00
github-actions[bot]
5a85c89154 Version Packages 2025-01-25 10:18:09 +00:00
Guido D'Orsi
8898b10e89 chore: changeset 2025-01-25 11:16:54 +01:00
Andre Popovitch
dc2d4e25f7 Remove npm create for examples 2025-01-25 18:09:52 +08:00
Trisha Lim
9275c4f6c0 Remove npm create jazz-app from instructions 2025-01-25 18:07:48 +08:00
Guido D'Orsi
ac3c2df474 Merge pull request #1268 from garden-co/changeset-release/main
Version Packages
2025-01-24 17:32:53 +01:00
github-actions[bot]
681f973d4b Version Packages 2025-01-24 16:17:09 +00:00
Guido D'Orsi
338be7622f Merge pull request #1269 from garden-co/feat/group-add-member-typechecks
fix: improve typescript types for group.addMember
2025-01-24 17:15:57 +01:00
Guido D'Orsi
1227047b03 fix: improve typescript types for group.addMember 2025-01-24 17:07:32 +01:00
Guido D'Orsi
9afde8d0be Merge pull request #1267 from garden-co/feat/invite
feat: move invite API in jazz-tools
2025-01-24 17:06:10 +01:00
Guido D'Orsi
c2ca1feba0 feat: move invite API in jazz-tools 2025-01-24 16:52:34 +01:00
pax
98c265304a Merge pull request #1265 from garden-co/changeset-release/main
Version Packages
2025-01-24 16:57:00 +02:00
github-actions[bot]
675e3e8046 Version Packages 2025-01-24 14:44:45 +00:00
pax
4acba8c990 Merge pull request #1245 from garden-co/JZI-64/handle-gibberish-names-when-signing-up-using-email
Extract friendly user name for profile creation when authenticating using Clerk with a regular email address
2025-01-24 16:43:46 +02:00
pax-k
a93adeb1fe chore: cleanup 2025-01-24 16:35:32 +02:00
pax-k
cf8773f3de chore: pnpm lock 2025-01-24 16:28:27 +02:00
pax-k
3be94ae1e7 feat: extended clerk auth creation props with "other" field 2025-01-24 14:31:04 +02:00
pax-k
6a8aa06d18 fix: cleaning clerk creds 2025-01-24 13:36:27 +02:00
Anselm Eickhoff
dc17889209 Fix incorrect sentence about migrate being static 2025-01-24 10:57:53 +00:00
Guido D'Orsi
55f9d8e120 Merge pull request #1260 from garden-co/changeset-release/main
Version Packages
2025-01-24 09:47:45 +01:00
github-actions[bot]
15b9457ed8 Version Packages 2025-01-24 08:03:18 +00:00
Guido D'Orsi
898297e95c Merge pull request #1259 from garden-co/jazz-672-create-jazz-app-cant-clone-repos
Fix: create-jazz-app fails if no starter param
2025-01-24 09:02:16 +01:00
Trisha Lim
0fc4f24cd5 Add changeset 2025-01-24 15:25:50 +08:00
Trisha Lim
63b5ad9edf Fix: create-jazz-app fails if no starter param 2025-01-24 15:23:23 +08:00
Trisha Lim
873c3264ca Update gitignore 2025-01-24 14:56:22 +08:00
Trisha Lim
34f89e48aa Fix example readme instructions 2025-01-24 14:56:22 +08:00
pax-k
24b3b6afc1 chore: changeset 2025-01-22 20:33:55 +02:00
pax-k
c2eed7e2c4 fix: extract friendly user name for profile creation when authenticating using clerk with a regular email address 2025-01-22 20:32:32 +02:00
Guido D'Orsi
f97ef696e3 Merge pull request #1244 from garden-co/changeset-release/main
Version Packages
2025-01-22 19:22:23 +01:00
github-actions[bot]
ad65cb8ab5 Version Packages 2025-01-22 18:22:06 +00:00
Guido D'Orsi
8d8131410a Merge pull request #1243 from garden-co/testing-migration-ctx
fix: correctly set the globalMe before the migration when calling createJazzTestAccount
2025-01-22 19:20:52 +01:00
Guido D'Orsi
7491711b72 fix: correctly set the globalMe before the migration when calling createJazzTestAccount 2025-01-22 19:19:07 +01:00
Giordano Ricci
5933aa59c1 Merge pull request #1242 from garden-co/changeset-release/main
Version Packages
2025-01-22 17:33:31 +00:00
github-actions[bot]
da96bec465 Version Packages 2025-01-22 17:30:19 +00:00
Guido D'Orsi
483422c0e9 Merge pull request #1241 from garden-co/guido/test
feat: API to setup a test sync in the test environment
2025-01-22 18:28:38 +01:00
Guido D'Orsi
3df93cc147 chore: changeset 2025-01-22 18:22:16 +01:00
Guido D'Orsi
d686edfa6c chore: add tests and use ref to track the current sync server 2025-01-22 18:22:15 +01:00
Giordano Ricci
497b0ade1f feat: API to setup a test sync in the test environment 2025-01-22 18:21:48 +01:00
Guido D'Orsi
86acbcd0d6 Merge pull request #1237 from garden-co/changeset-release/main
Version Packages
2025-01-22 12:51:45 +01:00
github-actions[bot]
9111c85445 Version Packages 2025-01-22 11:46:06 +00:00
Guido D'Orsi
1d87879787 Merge pull request #1231 from garden-co/revert-1229-revert-custom-logger
Restore cutom logger
2025-01-22 12:44:53 +01:00
Guido D'Orsi
7c777f2bdf test: cover the storage regression with a test 2025-01-22 12:41:51 +01:00
Benjamin S. Leveritt
aa8067b8d0 Merge pull request #1234 from garden-co/fix-clerk-example
chore: simplify clerk example auth-context
2025-01-22 10:15:21 +00:00
Guido D'Orsi
bd66cdeb78 chore: simplify clerk example auth-context 2025-01-22 10:29:54 +01:00
Guido D'Orsi
8d29e50669 feat: adapt the logger interface to pino 2025-01-21 17:52:40 +01:00
Guido D'Orsi
5a7398d242 Revert "Revert custom logger" 2025-01-21 17:08:37 +01:00
Guido D'Orsi
74b984fbe6 Merge pull request #1230 from garden-co/changeset-release/main
Version Packages
2025-01-21 16:53:36 +01:00
github-actions[bot]
f8e00204b4 Version Packages 2025-01-21 15:49:31 +00:00
Guido D'Orsi
76543df765 Merge pull request #1229 from garden-co/revert-custom-logger
Revert custom logger
2025-01-21 16:48:17 +01:00
Guido D'Orsi
15d4b2a5f7 chore: changeset 2025-01-21 16:44:37 +01:00
Guido D'Orsi
2e67f91fe0 Revert "feat: make it possible to customize the logger in cojson"
This reverts commit 5863badbb0.
2025-01-21 16:42:54 +01:00
Benjamin S. Leveritt
0eb21a3471 Merge pull request #1216 from boorad/feat/demo-auth-theme
fix: phone theme drives light/dark mode in Demo Auth
2025-01-20 13:27:19 +00:00
Brad Anderson
aabe7bef34 fix: phone theme drives light/dark mode in Demo Auth 2025-01-17 23:07:38 -05:00
166 changed files with 3553 additions and 611 deletions

View File

@@ -1,5 +1,82 @@
# chat-rn-clerk
## 1.0.60
### Patch Changes
- jazz-react-native@0.9.19
- jazz-react-native-auth-clerk@0.9.19
- jazz-tools@0.9.19
- jazz-react-native-media-images@0.9.19
## 1.0.59
### Patch Changes
- jazz-react-native@0.9.18
- jazz-react-native-auth-clerk@0.9.18
- jazz-tools@0.9.18
- jazz-react-native-media-images@0.9.18
## 1.0.58
### Patch Changes
- Updated dependencies [c2ca1fe]
- Updated dependencies [1227047]
- jazz-tools@0.9.17
- jazz-react-native@0.9.17
- jazz-react-native-auth-clerk@0.9.17
- jazz-react-native-media-images@0.9.17
## 1.0.57
### Patch Changes
- Updated dependencies [24b3b6a]
- jazz-react-native-auth-clerk@0.9.16
- jazz-tools@0.9.16
- jazz-react-native@0.9.16
- jazz-react-native-media-images@0.9.16
## 1.0.56
### Patch Changes
- Updated dependencies [7491711]
- jazz-tools@0.9.15
- jazz-react-native@0.9.15
- jazz-react-native-auth-clerk@0.9.15
- jazz-react-native-media-images@0.9.15
## 1.0.55
### Patch Changes
- Updated dependencies [3df93cc]
- jazz-tools@0.9.14
- jazz-react-native@0.9.14
- jazz-react-native-auth-clerk@0.9.14
- jazz-react-native-media-images@0.9.14
## 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

View File

@@ -1,7 +1,7 @@
{
"name": "chat-rn-clerk",
"main": "index.js",
"version": "1.0.52",
"version": "1.0.60",
"scripts": {
"build": "expo export -p ios",
"start": "expo start",

View File

@@ -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

View File

@@ -1,5 +1,66 @@
# chat-rn
## 1.0.57
### Patch Changes
- jazz-react-native@0.9.19
- jazz-tools@0.9.19
## 1.0.56
### Patch Changes
- jazz-react-native@0.9.18
- jazz-tools@0.9.18
## 1.0.55
### Patch Changes
- Updated dependencies [c2ca1fe]
- Updated dependencies [1227047]
- jazz-tools@0.9.17
- jazz-react-native@0.9.17
## 1.0.54
### Patch Changes
- Updated dependencies [24b3b6a]
- jazz-tools@0.9.16
- jazz-react-native@0.9.16
## 1.0.53
### Patch Changes
- Updated dependencies [7491711]
- jazz-tools@0.9.15
- jazz-react-native@0.9.15
## 1.0.52
### Patch Changes
- Updated dependencies [3df93cc]
- jazz-tools@0.9.14
- jazz-react-native@0.9.14
## 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

View File

@@ -1,6 +1,6 @@
{
"name": "chat-rn",
"version": "1.0.49",
"version": "1.0.57",
"main": "index.js",
"scripts": {
"build": "expo export -p ios",

View File

@@ -1,5 +1,74 @@
# chat-vue
## 0.0.44
### Patch Changes
- jazz-browser@0.9.19
- jazz-tools@0.9.19
- jazz-vue@0.9.19
## 0.0.43
### Patch Changes
- jazz-browser@0.9.18
- jazz-tools@0.9.18
- jazz-vue@0.9.18
## 0.0.42
### Patch Changes
- Updated dependencies [c2ca1fe]
- Updated dependencies [1227047]
- jazz-tools@0.9.17
- jazz-browser@0.9.17
- jazz-vue@0.9.17
## 0.0.41
### Patch Changes
- Updated dependencies [24b3b6a]
- jazz-tools@0.9.16
- jazz-browser@0.9.16
- jazz-vue@0.9.16
## 0.0.40
### Patch Changes
- Updated dependencies [7491711]
- jazz-tools@0.9.15
- jazz-browser@0.9.15
- jazz-vue@0.9.15
## 0.0.39
### Patch Changes
- Updated dependencies [3df93cc]
- jazz-tools@0.9.14
- jazz-browser@0.9.14
- jazz-vue@0.9.14
## 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

View File

@@ -11,10 +11,6 @@ You can either
Create a new Jazz project, and use this example as a template.
```bash
npm create jazz-app@latest --example chat-vue --project-name chat-vue
```
or
```bash
npx create-jazz-app@latest --example chat-vue --project-name chat-vue
```

View File

@@ -1,6 +1,6 @@
{
"name": "chat-vue",
"version": "0.0.36",
"version": "0.0.44",
"private": true,
"type": "module",
"scripts": {

View File

@@ -1,5 +1,74 @@
# jazz-example-chat
## 0.0.140
### Patch Changes
- jazz-react@0.9.19
- jazz-tools@0.9.19
- jazz-browser-media-images@0.9.19
## 0.0.139
### Patch Changes
- jazz-react@0.9.18
- jazz-tools@0.9.18
- jazz-browser-media-images@0.9.18
## 0.0.138
### Patch Changes
- Updated dependencies [c2ca1fe]
- Updated dependencies [1227047]
- jazz-tools@0.9.17
- jazz-browser-media-images@0.9.17
- jazz-react@0.9.17
## 0.0.137
### Patch Changes
- Updated dependencies [24b3b6a]
- jazz-tools@0.9.16
- jazz-browser-media-images@0.9.16
- jazz-react@0.9.16
## 0.0.136
### Patch Changes
- Updated dependencies [7491711]
- jazz-tools@0.9.15
- jazz-browser-media-images@0.9.15
- jazz-react@0.9.15
## 0.0.135
### Patch Changes
- Updated dependencies [3df93cc]
- jazz-tools@0.9.14
- jazz-browser-media-images@0.9.14
- jazz-react@0.9.14
## 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

View File

@@ -13,10 +13,6 @@ You can either
Create a new Jazz project, and use this example as a template.
```bash
npm create jazz-app@latest --example chat --project-name chat
```
or
```bash
npx create-jazz-app@latest --example chat --project-name chat
```

View File

@@ -1,7 +1,7 @@
{
"name": "jazz-example-chat",
"private": true,
"version": "0.0.132",
"version": "0.0.140",
"type": "module",
"scripts": {
"dev": "vite",

View File

@@ -1,5 +1,74 @@
# minimal-auth-clerk
## 0.0.39
### Patch Changes
- jazz-react@0.9.19
- jazz-react-auth-clerk@0.9.19
- jazz-tools@0.9.19
## 0.0.38
### Patch Changes
- jazz-react@0.9.18
- jazz-react-auth-clerk@0.9.18
- jazz-tools@0.9.18
## 0.0.37
### Patch Changes
- Updated dependencies [c2ca1fe]
- Updated dependencies [1227047]
- jazz-tools@0.9.17
- jazz-react@0.9.17
- jazz-react-auth-clerk@0.9.17
## 0.0.36
### Patch Changes
- Updated dependencies [24b3b6a]
- jazz-react-auth-clerk@0.9.16
- jazz-tools@0.9.16
- jazz-react@0.9.16
## 0.0.35
### Patch Changes
- Updated dependencies [7491711]
- jazz-tools@0.9.15
- jazz-react@0.9.15
- jazz-react-auth-clerk@0.9.15
## 0.0.34
### Patch Changes
- Updated dependencies [3df93cc]
- jazz-tools@0.9.14
- jazz-react@0.9.14
- jazz-react-auth-clerk@0.9.14
## 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

View File

@@ -15,11 +15,7 @@ You can either
Create a new Jazz project, and use this example as a template.
```bash
npm create jazz-app@latest --start clerk --project-name clerk
```
or
```bash
npx create-jazz-app@latest --start clerk --project-name clerk
npx create-jazz-app@latest --example clerk --project-name clerk
```
Go to the new project directory.

View File

@@ -1,7 +1,7 @@
{
"name": "clerk",
"private": true,
"version": "0.0.31",
"version": "0.0.39",
"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.19",
"jazz-tools": "workspace:*",
"react": "^18.3.1",
"react-dom": "^18.3.1"

View File

@@ -1,5 +1,66 @@
# file-share-svelte
## 0.0.24
### Patch Changes
- jazz-svelte@0.9.19
- jazz-tools@0.9.19
## 0.0.23
### Patch Changes
- jazz-svelte@0.9.18
- jazz-tools@0.9.18
## 0.0.22
### Patch Changes
- Updated dependencies [c2ca1fe]
- Updated dependencies [1227047]
- jazz-tools@0.9.17
- jazz-svelte@0.9.17
## 0.0.21
### Patch Changes
- Updated dependencies [24b3b6a]
- jazz-tools@0.9.16
- jazz-svelte@0.9.16
## 0.0.20
### Patch Changes
- Updated dependencies [7491711]
- jazz-tools@0.9.15
- jazz-svelte@0.9.15
## 0.0.19
### Patch Changes
- Updated dependencies [3df93cc]
- jazz-tools@0.9.14
- jazz-svelte@0.9.14
## 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

View File

@@ -1,6 +1,6 @@
{
"name": "file-share-svelte",
"version": "0.0.16",
"version": "0.0.24",
"private": true,
"type": "module",
"scripts": {

View File

@@ -1,5 +1,74 @@
# form
## 0.0.35
### Patch Changes
- jazz-react@0.9.19
- jazz-tools@0.9.19
- jazz-browser-media-images@0.9.19
## 0.0.34
### Patch Changes
- jazz-react@0.9.18
- jazz-tools@0.9.18
- jazz-browser-media-images@0.9.18
## 0.0.33
### Patch Changes
- Updated dependencies [c2ca1fe]
- Updated dependencies [1227047]
- jazz-tools@0.9.17
- jazz-browser-media-images@0.9.17
- jazz-react@0.9.17
## 0.0.32
### Patch Changes
- Updated dependencies [24b3b6a]
- jazz-tools@0.9.16
- jazz-browser-media-images@0.9.16
- jazz-react@0.9.16
## 0.0.31
### Patch Changes
- Updated dependencies [7491711]
- jazz-tools@0.9.15
- jazz-browser-media-images@0.9.15
- jazz-react@0.9.15
## 0.0.30
### Patch Changes
- Updated dependencies [3df93cc]
- jazz-tools@0.9.14
- jazz-browser-media-images@0.9.14
- jazz-react@0.9.14
## 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

View File

@@ -28,11 +28,7 @@ You can either
Create a new Jazz project, and use this example as a template.
```bash
npm create jazz-app@latest --start form --project-name form
```
or
```bash
npx create-jazz-app@latest --start form --project-name form
npx create-jazz-app@latest --example form --project-name form
```
Go to the new project directory.

View File

@@ -1,7 +1,7 @@
{
"name": "form",
"private": true,
"version": "0.0.27",
"version": "0.0.35",
"type": "module",
"scripts": {
"dev": "vite",

View File

@@ -1,5 +1,74 @@
# image-upload
## 0.0.37
### Patch Changes
- jazz-react@0.9.19
- jazz-tools@0.9.19
- jazz-browser-media-images@0.9.19
## 0.0.36
### Patch Changes
- jazz-react@0.9.18
- jazz-tools@0.9.18
- jazz-browser-media-images@0.9.18
## 0.0.35
### Patch Changes
- Updated dependencies [c2ca1fe]
- Updated dependencies [1227047]
- jazz-tools@0.9.17
- jazz-browser-media-images@0.9.17
- jazz-react@0.9.17
## 0.0.34
### Patch Changes
- Updated dependencies [24b3b6a]
- jazz-tools@0.9.16
- jazz-browser-media-images@0.9.16
- jazz-react@0.9.16
## 0.0.33
### Patch Changes
- Updated dependencies [7491711]
- jazz-tools@0.9.15
- jazz-browser-media-images@0.9.15
- jazz-react@0.9.15
## 0.0.32
### Patch Changes
- Updated dependencies [3df93cc]
- jazz-tools@0.9.14
- jazz-browser-media-images@0.9.14
- jazz-react@0.9.14
## 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

View File

@@ -15,10 +15,6 @@ You can either
Create a new Jazz project, and use this example as a template.
```bash
npm create jazz-app@latest --example image-upload --project-name image-upload
```
or
```bash
npx create-jazz-app@latest --example image-upload --project-name image-upload
```

View File

@@ -1,7 +1,7 @@
{
"name": "image-upload",
"private": true,
"version": "0.0.29",
"version": "0.0.37",
"type": "module",
"scripts": {
"dev": "vite",

View File

@@ -1,5 +1,37 @@
# jazz-example-inspector
## 0.0.100
### Patch Changes
- Updated dependencies [6ad0a9f]
- cojson@0.9.19
- cojson-transport-ws@0.9.19
## 0.0.99
### Patch Changes
- Updated dependencies [8898b10]
- cojson@0.9.18
- cojson-transport-ws@0.9.18
## 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

View File

@@ -1,7 +1,7 @@
{
"name": "jazz-inspector-app",
"private": true,
"version": "0.0.96",
"version": "0.0.100",
"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.19",
"cojson-transport-ws": "workspace:0.9.19",
"hash-slash": "workspace:0.2.1",
"lucide-react": "^0.274.0",
"qrcode": "^1.5.3",

View File

@@ -1,5 +1,81 @@
# jazz-example-musicplayer
## 0.0.61
### Patch Changes
- jazz-inspector@0.9.20
- jazz-react@0.9.19
- jazz-tools@0.9.19
## 0.0.60
### Patch Changes
- Updated dependencies [2faf22f]
- jazz-inspector@0.9.19
## 0.0.59
### Patch Changes
- jazz-inspector@0.9.18
- jazz-react@0.9.18
- jazz-tools@0.9.18
## 0.0.58
### Patch Changes
- Updated dependencies [c2ca1fe]
- Updated dependencies [1227047]
- jazz-tools@0.9.17
- jazz-inspector@0.9.17
- jazz-react@0.9.17
## 0.0.57
### Patch Changes
- Updated dependencies [24b3b6a]
- jazz-tools@0.9.16
- jazz-inspector@0.9.16
- jazz-react@0.9.16
## 0.0.56
### Patch Changes
- Updated dependencies [7491711]
- jazz-tools@0.9.15
- jazz-inspector@0.9.15
- jazz-react@0.9.15
## 0.0.55
### Patch Changes
- Updated dependencies [3df93cc]
- jazz-tools@0.9.14
- jazz-inspector@0.9.14
- jazz-react@0.9.14
## 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

View File

@@ -13,10 +13,6 @@ You can either
Create a new Jazz project, and use this example as a template.
```bash
npm create jazz-app@latest --example music-player --project-name music-player
```
or
```bash
npx create-jazz-app@latest --example music-player --project-name music-player
```

View File

@@ -1,7 +1,7 @@
{
"name": "jazz-example-music-player",
"private": true,
"version": "0.0.52",
"version": "0.0.61",
"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.19",
"jazz-tools": "workspace:0.9.19",
"jazz-inspector": "workspace:*",
"lucide-react": "^0.274.0",
"react": "^18.3.1",

View File

@@ -1,5 +1,74 @@
# jazz-example-onboarding
## 0.0.41
### Patch Changes
- jazz-react@0.9.19
- jazz-tools@0.9.19
- jazz-browser-media-images@0.9.19
## 0.0.40
### Patch Changes
- jazz-react@0.9.18
- jazz-tools@0.9.18
- jazz-browser-media-images@0.9.18
## 0.0.39
### Patch Changes
- Updated dependencies [c2ca1fe]
- Updated dependencies [1227047]
- jazz-tools@0.9.17
- jazz-browser-media-images@0.9.17
- jazz-react@0.9.17
## 0.0.38
### Patch Changes
- Updated dependencies [24b3b6a]
- jazz-tools@0.9.16
- jazz-browser-media-images@0.9.16
- jazz-react@0.9.16
## 0.0.37
### Patch Changes
- Updated dependencies [7491711]
- jazz-tools@0.9.15
- jazz-browser-media-images@0.9.15
- jazz-react@0.9.15
## 0.0.36
### Patch Changes
- Updated dependencies [3df93cc]
- jazz-tools@0.9.14
- jazz-browser-media-images@0.9.14
- jazz-react@0.9.14
## 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

View File

@@ -11,10 +11,6 @@ You can either
Create a new Jazz project, and use this example as a template.
```bash
npm create jazz-app@latest --example onboarding --project-name onboarding
```
or
```bash
npx create-jazz-app@latest --example onboarding --project-name onboarding
```

View File

@@ -1,7 +1,7 @@
{
"name": "jazz-example-onboarding",
"private": true,
"version": "0.0.33",
"version": "0.0.41",
"type": "module",
"scripts": {
"dev": "vite",

View File

@@ -1,5 +1,66 @@
# organization
## 0.0.33
### Patch Changes
- jazz-react@0.9.19
- jazz-tools@0.9.19
## 0.0.32
### Patch Changes
- jazz-react@0.9.18
- jazz-tools@0.9.18
## 0.0.31
### Patch Changes
- Updated dependencies [c2ca1fe]
- Updated dependencies [1227047]
- jazz-tools@0.9.17
- jazz-react@0.9.17
## 0.0.30
### Patch Changes
- Updated dependencies [24b3b6a]
- jazz-tools@0.9.16
- jazz-react@0.9.16
## 0.0.29
### Patch Changes
- Updated dependencies [7491711]
- jazz-tools@0.9.15
- jazz-react@0.9.15
## 0.0.28
### Patch Changes
- Updated dependencies [3df93cc]
- jazz-tools@0.9.14
- jazz-react@0.9.14
## 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

View File

@@ -16,10 +16,6 @@ You can either
Create a new Jazz project, and use this example as a template.
```bash
npm create jazz-app@latest --example organization --project-name organization
```
or
```bash
npx create-jazz-app@latest --example organization --project-name organization
```

View File

@@ -1,7 +1,7 @@
{
"name": "organization",
"private": true,
"version": "0.0.25",
"version": "0.0.33",
"type": "module",
"scripts": {
"dev": "vite",

View File

@@ -1,5 +1,53 @@
# passkey-svelte
## 0.0.28
### Patch Changes
- jazz-svelte@0.9.19
## 0.0.27
### Patch Changes
- jazz-svelte@0.9.18
## 0.0.26
### Patch Changes
- jazz-svelte@0.9.17
## 0.0.25
### Patch Changes
- jazz-svelte@0.9.16
## 0.0.24
### Patch Changes
- jazz-svelte@0.9.15
## 0.0.23
### Patch Changes
- jazz-svelte@0.9.14
## 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

View File

@@ -21,10 +21,6 @@ You can either
Create a new Jazz project, and use this example as a template.
```bash
npm create jazz-app@latest --example passkey-svelte --project-name passkey-svelte
```
or
```bash
npx create-jazz-app@latest --example passkey-svelte --project-name passkey-svelte
```

View File

@@ -1,6 +1,6 @@
{
"name": "passkey-svelte",
"version": "0.0.20",
"version": "0.0.28",
"type": "module",
"private": true,
"scripts": {

View File

@@ -1,5 +1,66 @@
# minimal-auth-passkey
## 0.0.38
### Patch Changes
- jazz-react@0.9.19
- jazz-tools@0.9.19
## 0.0.37
### Patch Changes
- jazz-react@0.9.18
- jazz-tools@0.9.18
## 0.0.36
### Patch Changes
- Updated dependencies [c2ca1fe]
- Updated dependencies [1227047]
- jazz-tools@0.9.17
- jazz-react@0.9.17
## 0.0.35
### Patch Changes
- Updated dependencies [24b3b6a]
- jazz-tools@0.9.16
- jazz-react@0.9.16
## 0.0.34
### Patch Changes
- Updated dependencies [7491711]
- jazz-tools@0.9.15
- jazz-react@0.9.15
## 0.0.33
### Patch Changes
- Updated dependencies [3df93cc]
- jazz-tools@0.9.14
- jazz-react@0.9.14
## 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

View File

@@ -15,10 +15,6 @@ You can either
Create a new Jazz project, and use this example as a template.
```bash
npm create jazz-app@latest --example passkey --project-name passkey
```
or
```bash
npx create-jazz-app@latest --example passkey --project-name passkey
```

View File

@@ -1,7 +1,7 @@
{
"name": "passkey",
"private": true,
"version": "0.0.30",
"version": "0.0.38",
"type": "module",
"scripts": {
"dev": "vite",

View File

@@ -1,5 +1,66 @@
# jazz-password-manager
## 0.0.59
### Patch Changes
- jazz-react@0.9.19
- jazz-tools@0.9.19
## 0.0.58
### Patch Changes
- jazz-react@0.9.18
- jazz-tools@0.9.18
## 0.0.57
### Patch Changes
- Updated dependencies [c2ca1fe]
- Updated dependencies [1227047]
- jazz-tools@0.9.17
- jazz-react@0.9.17
## 0.0.56
### Patch Changes
- Updated dependencies [24b3b6a]
- jazz-tools@0.9.16
- jazz-react@0.9.16
## 0.0.55
### Patch Changes
- Updated dependencies [7491711]
- jazz-tools@0.9.15
- jazz-react@0.9.15
## 0.0.54
### Patch Changes
- Updated dependencies [3df93cc]
- jazz-tools@0.9.14
- jazz-react@0.9.14
## 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

View File

@@ -15,10 +15,6 @@ You can either
Create a new Jazz project, and use this example as a template.
```bash
npm create jazz-app@latest --example password-manager --project-name password-manager
```
or
```bash
npx create-jazz-app@latest --example password-manager --project-name password-manager
```

View File

@@ -1,7 +1,7 @@
{
"name": "jazz-password-manager",
"private": true,
"version": "0.0.51",
"version": "0.0.59",
"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.19",
"jazz-tools": "workspace:0.9.19",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-hook-form": "^7.41.5",

View File

@@ -1,5 +1,74 @@
# jazz-example-pets
## 0.0.157
### Patch Changes
- jazz-react@0.9.19
- jazz-tools@0.9.19
- jazz-browser-media-images@0.9.19
## 0.0.156
### Patch Changes
- jazz-react@0.9.18
- jazz-tools@0.9.18
- jazz-browser-media-images@0.9.18
## 0.0.155
### Patch Changes
- Updated dependencies [c2ca1fe]
- Updated dependencies [1227047]
- jazz-tools@0.9.17
- jazz-browser-media-images@0.9.17
- jazz-react@0.9.17
## 0.0.154
### Patch Changes
- Updated dependencies [24b3b6a]
- jazz-tools@0.9.16
- jazz-browser-media-images@0.9.16
- jazz-react@0.9.16
## 0.0.153
### Patch Changes
- Updated dependencies [7491711]
- jazz-tools@0.9.15
- jazz-browser-media-images@0.9.15
- jazz-react@0.9.15
## 0.0.152
### Patch Changes
- Updated dependencies [3df93cc]
- jazz-tools@0.9.14
- jazz-browser-media-images@0.9.14
- jazz-react@0.9.14
## 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

View File

@@ -13,10 +13,6 @@ You can either
Create a new Jazz project, and use this example as a template.
```bash
npm create jazz-app@latest --example pets --project-name pets
```
or
```bash
npx create-jazz-app@latest --example pets --project-name pets
```

View File

@@ -1,7 +1,7 @@
{
"name": "jazz-example-pets",
"private": true,
"version": "0.0.149",
"version": "0.0.157",
"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.19",
"jazz-react": "workspace:0.9.19",
"jazz-tools": "workspace:0.9.19",
"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.19",
"postcss": "^8.4.27",
"tailwindcss": "^3.4.15",
"typescript": "~5.6.2",

View File

@@ -1,5 +1,74 @@
# reactions
## 0.0.37
### Patch Changes
- jazz-react@0.9.19
- jazz-tools@0.9.19
- jazz-browser-media-images@0.9.19
## 0.0.36
### Patch Changes
- jazz-react@0.9.18
- jazz-tools@0.9.18
- jazz-browser-media-images@0.9.18
## 0.0.35
### Patch Changes
- Updated dependencies [c2ca1fe]
- Updated dependencies [1227047]
- jazz-tools@0.9.17
- jazz-browser-media-images@0.9.17
- jazz-react@0.9.17
## 0.0.34
### Patch Changes
- Updated dependencies [24b3b6a]
- jazz-tools@0.9.16
- jazz-browser-media-images@0.9.16
- jazz-react@0.9.16
## 0.0.33
### Patch Changes
- Updated dependencies [7491711]
- jazz-tools@0.9.15
- jazz-browser-media-images@0.9.15
- jazz-react@0.9.15
## 0.0.32
### Patch Changes
- Updated dependencies [3df93cc]
- jazz-tools@0.9.14
- jazz-browser-media-images@0.9.14
- jazz-react@0.9.14
## 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

View File

@@ -13,10 +13,6 @@ You can either
Create a new Jazz project, and use this example as a template.
```bash
npm create jazz-app@latest --example reactions --project-name reactions
```
or
```bash
npx create-jazz-app@latest --example reactions --project-name reactions
```

View File

@@ -1,7 +1,7 @@
{
"name": "reactions",
"private": true,
"version": "0.0.29",
"version": "0.0.37",
"type": "module",
"scripts": {
"dev": "vite",

View File

@@ -1,5 +1,74 @@
# todo-vue
## 0.0.42
### Patch Changes
- jazz-browser@0.9.19
- jazz-tools@0.9.19
- jazz-vue@0.9.19
## 0.0.41
### Patch Changes
- jazz-browser@0.9.18
- jazz-tools@0.9.18
- jazz-vue@0.9.18
## 0.0.40
### Patch Changes
- Updated dependencies [c2ca1fe]
- Updated dependencies [1227047]
- jazz-tools@0.9.17
- jazz-browser@0.9.17
- jazz-vue@0.9.17
## 0.0.39
### Patch Changes
- Updated dependencies [24b3b6a]
- jazz-tools@0.9.16
- jazz-browser@0.9.16
- jazz-vue@0.9.16
## 0.0.38
### Patch Changes
- Updated dependencies [7491711]
- jazz-tools@0.9.15
- jazz-browser@0.9.15
- jazz-vue@0.9.15
## 0.0.37
### Patch Changes
- Updated dependencies [3df93cc]
- jazz-tools@0.9.14
- jazz-browser@0.9.14
- jazz-vue@0.9.14
## 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

View File

@@ -11,10 +11,6 @@ You can either
Create a new Jazz project, and use this example as a template.
```bash
npm create jazz-app@latest --example todo-vue --project-name todo-vue
```
or
```bash
npx create-jazz-app@latest --example todo-vue --project-name todo-vue
```

View File

@@ -1,6 +1,6 @@
{
"name": "todo-vue",
"version": "0.0.34",
"version": "0.0.42",
"private": true,
"type": "module",
"scripts": {

View File

@@ -1,5 +1,66 @@
# jazz-example-todo
## 0.0.156
### Patch Changes
- jazz-react@0.9.19
- jazz-tools@0.9.19
## 0.0.155
### Patch Changes
- jazz-react@0.9.18
- jazz-tools@0.9.18
## 0.0.154
### Patch Changes
- Updated dependencies [c2ca1fe]
- Updated dependencies [1227047]
- jazz-tools@0.9.17
- jazz-react@0.9.17
## 0.0.153
### Patch Changes
- Updated dependencies [24b3b6a]
- jazz-tools@0.9.16
- jazz-react@0.9.16
## 0.0.152
### Patch Changes
- Updated dependencies [7491711]
- jazz-tools@0.9.15
- jazz-react@0.9.15
## 0.0.151
### Patch Changes
- Updated dependencies [3df93cc]
- jazz-tools@0.9.14
- jazz-react@0.9.14
## 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

View File

@@ -13,10 +13,6 @@ You can either
Create a new Jazz project, and use this example as a template.
```bash
npm create jazz-app@latest --example todo --project-name todo
```
or
```bash
npx create-jazz-app@latest --example todo --project-name todo
```

View File

@@ -1,7 +1,7 @@
{
"name": "jazz-example-todo",
"private": true,
"version": "0.0.148",
"version": "0.0.156",
"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.19",
"jazz-tools": "workspace:0.9.19",
"lucide-react": "^0.274.0",
"qrcode": "^1.5.3",
"react": "^18.3.1",

View File

@@ -1,5 +1,66 @@
# version-history
## 0.0.34
### Patch Changes
- jazz-react@0.9.19
- jazz-tools@0.9.19
## 0.0.33
### Patch Changes
- jazz-react@0.9.18
- jazz-tools@0.9.18
## 0.0.32
### Patch Changes
- Updated dependencies [c2ca1fe]
- Updated dependencies [1227047]
- jazz-tools@0.9.17
- jazz-react@0.9.17
## 0.0.31
### Patch Changes
- Updated dependencies [24b3b6a]
- jazz-tools@0.9.16
- jazz-react@0.9.16
## 0.0.30
### Patch Changes
- Updated dependencies [7491711]
- jazz-tools@0.9.15
- jazz-react@0.9.15
## 0.0.29
### Patch Changes
- Updated dependencies [3df93cc]
- jazz-tools@0.9.14
- jazz-react@0.9.14
## 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

View File

@@ -13,10 +13,6 @@ You can either
Create a new Jazz project, and use this example as a template.
```bash
npm create jazz-app@latest --example version-history --project-name version-history
```
or
```bash
npx create-jazz-app@latest --example version-history --project-name version-history
```

View File

@@ -1,7 +1,7 @@
{
"name": "version-history",
"private": true,
"version": "0.0.26",
"version": "0.0.34",
"type": "module",
"scripts": {
"dev": "vite",

View File

@@ -132,7 +132,7 @@ As you develop your app, you'll likely want to
- initialise data in a user's `root` and `profile`
- add more data to your `root` and `profile` schemas
You can achieve both by overriding the static `migrate()` method on your `Account` schema class.
You can achieve both by overriding the `migrate()` method on your `Account` schema class.
### When migrations run

View File

@@ -8,14 +8,6 @@ The Jazz docs are currently heavily work in progress, sorry about that!
Run the following command to create a new Jazz project from one of our example apps:
<CodeGroup>
```sh
npm create jazz-app@latest
```
</CodeGroup>
or
<CodeGroup>
```sh
npx create-jazz-app@latest

View File

@@ -1,5 +1,37 @@
# cojson-storage-indexeddb
## 0.9.19
### Patch Changes
- Updated dependencies [6ad0a9f]
- cojson@0.9.19
- cojson-storage@0.9.19
## 0.9.18
### Patch Changes
- Updated dependencies [8898b10]
- cojson@0.9.18
- cojson-storage@0.9.18
## 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

View File

@@ -1,6 +1,6 @@
{
"name": "cojson-storage-indexeddb",
"version": "0.9.11",
"version": "0.9.19",
"main": "dist/index.js",
"type": "module",
"types": "src/index.ts",

View File

@@ -1,5 +1,37 @@
# cojson-storage-sqlite
## 0.8.58
### Patch Changes
- Updated dependencies [6ad0a9f]
- cojson@0.9.19
- cojson-storage@0.9.19
## 0.8.57
### Patch Changes
- Updated dependencies [8898b10]
- cojson@0.9.18
- cojson-storage@0.9.18
## 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

View File

@@ -1,7 +1,7 @@
{
"name": "cojson-storage-rn-sqlite",
"type": "module",
"version": "0.8.54",
"version": "0.8.58",
"main": "dist/index.js",
"types": "src/index.ts",
"license": "MIT",

View File

@@ -1,5 +1,39 @@
# cojson-storage-sqlite
## 0.9.19
### Patch Changes
- Updated dependencies [6ad0a9f]
- cojson@0.9.19
- cojson-storage@0.9.19
## 0.9.18
### Patch Changes
- Updated dependencies [8898b10]
- cojson@0.9.18
- cojson-storage@0.9.18
## 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

View File

@@ -1,13 +1,13 @@
{
"name": "cojson-storage-sqlite",
"type": "module",
"version": "0.9.11",
"version": "0.9.19",
"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.19",
"cojson-storage": "workspace:*"
},
"devDependencies": {

View File

@@ -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 [];
}
}

View File

@@ -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({

View File

@@ -1,5 +1,35 @@
# cojson-storage
## 0.9.19
### Patch Changes
- Updated dependencies [6ad0a9f]
- cojson@0.9.19
## 0.9.18
### Patch Changes
- Updated dependencies [8898b10]
- cojson@0.9.18
## 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

View File

@@ -1,6 +1,6 @@
{
"name": "cojson-storage",
"version": "0.9.11",
"version": "0.9.19",
"main": "dist/index.js",
"type": "module",
"types": "src/index.ts",

View File

@@ -1,5 +1,35 @@
# cojson-transport-nodejs-ws
## 0.9.19
### Patch Changes
- Updated dependencies [6ad0a9f]
- cojson@0.9.19
## 0.9.18
### Patch Changes
- Updated dependencies [8898b10]
- cojson@0.9.18
## 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

View File

@@ -1,12 +1,12 @@
{
"name": "cojson-transport-ws",
"type": "module",
"version": "0.9.11",
"version": "0.9.19",
"main": "dist/index.js",
"types": "src/index.ts",
"license": "MIT",
"dependencies": {
"cojson": "workspace:0.9.11",
"cojson": "workspace:0.9.19",
"typescript": "~5.6.2"
},
"scripts": {

View File

@@ -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;
}

View File

@@ -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,

View File

@@ -1,5 +1,29 @@
# cojson
## 0.9.19
### Patch Changes
- 6ad0a9f: Export Json types
## 0.9.18
### Patch Changes
- 8898b10: Export AccountRole type
## 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

View File

@@ -24,7 +24,7 @@
},
"type": "module",
"license": "MIT",
"version": "0.9.11",
"version": "0.9.19",
"devDependencies": {
"@opentelemetry/sdk-metrics": "^1.29.0",
"@types/jest": "^29.5.3",

View File

@@ -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;

View File

@@ -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,

View File

@@ -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];

View File

@@ -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;
}

View File

@@ -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;
}
}

View File

@@ -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,
);
}
}
}

View File

@@ -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;
}
}

View File

@@ -17,6 +17,8 @@ import { OpID, RawCoList } from "./coValues/coList.js";
import { RawCoMap } from "./coValues/coMap.js";
import { RawCoPlainText, stringifyOpID } from "./coValues/coPlainText.js";
import {
BinaryStreamItem,
BinaryStreamStart,
CoStreamItem,
RawBinaryCoStream,
RawCoStream,
@@ -38,7 +40,7 @@ import {
} from "./ids.js";
import { Stringified, parseJSON, stableStringify } from "./jsonStringify.js";
import { LocalNode } from "./localNode.js";
import type { Role } from "./permissions.js";
import type { AccountRole, Role } from "./permissions.js";
import { Channel, connectedPeers } from "./streamUtils.js";
import { accountOrAgentIDfromSessionID } from "./typeUtils/accountOrAgentIDfromSessionID.js";
import { expectGroup } from "./typeUtils/expectGroup.js";
@@ -57,7 +59,7 @@ import type {
import type { InviteSecret } from "./coValues/group.js";
import type { AgentSecret } from "./crypto/crypto.js";
import type { AgentID, RawCoID, SessionID } from "./ids.js";
import type { JsonValue } from "./jsonValue.js";
import type { JsonObject, JsonValue } from "./jsonValue.js";
import type * as Media from "./media.js";
import { disablePermissionErrors } from "./permissions.js";
import type {
@@ -128,6 +130,7 @@ export {
ControlledAgent,
RawControlledAccount,
MAX_RECOMMENDED_TX_SIZE,
JsonObject,
JsonValue,
Peer,
BinaryStreamInfo,
@@ -143,6 +146,8 @@ export {
RawCoPlainText,
stringifyOpID,
logger,
base64URLtoBytes,
bytesToBase64url,
};
export type {
@@ -157,7 +162,10 @@ export type {
CoValueUniqueness,
Stringified,
CoStreamItem,
BinaryStreamItem,
BinaryStreamStart,
OpID,
AccountRole,
};
// eslint-disable-next-line @typescript-eslint/no-namespace

View File

@@ -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 () => {

View File

@@ -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);
}
}
}

View File

@@ -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;
}

View File

@@ -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,

View File

@@ -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,
});
});
}

View File

@@ -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());

View File

@@ -1,5 +1,11 @@
# create-jazz-app
## 0.1.8
### Patch Changes
- 0fc4f24: fix create-jazz-app fails if no starter param
## 0.1.7
### Patch Changes

View File

@@ -17,13 +17,6 @@ You can create a new Jazz app in two ways:
### Interactive mode
Simply run:
```bash
npm create jazz-app@latest
```
or
```bash
npx create-jazz-app@latest
```
@@ -38,7 +31,7 @@ Then follow the interactive prompts to select your:
Or specify all options directly:
```bash
npm create jazz-app@latest -- --starter react-demo-auth --project-name my-app --package-manager npm
npx create-jazz-app@latest --starter react-demo-auth --project-name my-app --package-manager npm
```
### Start with an example app

View File

@@ -5,7 +5,7 @@
"types": "src/index.ts",
"type": "module",
"license": "MIT",
"version": "0.1.7",
"version": "0.1.8",
"bin": {
"create-jazz-app": "./dist/index.js"
},

View File

@@ -263,7 +263,8 @@ async function promptUser(
return {
...answers,
...partialOptions,
template: partialOptions.starter || partialOptions.example,
template:
answers.starter || partialOptions.starter || partialOptions.example,
} as ScaffoldOptions;
}

View File

@@ -1,5 +1,77 @@
# jazz-browser-media-images
## 0.9.19
### Patch Changes
- Updated dependencies [6ad0a9f]
- cojson@0.9.19
- jazz-browser@0.9.19
- jazz-tools@0.9.19
## 0.9.18
### Patch Changes
- Updated dependencies [8898b10]
- cojson@0.9.18
- jazz-browser@0.9.18
- jazz-tools@0.9.18
## 0.9.17
### Patch Changes
- Updated dependencies [c2ca1fe]
- Updated dependencies [1227047]
- jazz-tools@0.9.17
- jazz-browser@0.9.17
## 0.9.16
### Patch Changes
- 24b3b6a: Extract friendly user name for profile creation when authenticating using Clerk with a regular email address.
Email passed to creationProps when using Clerk auth
Clear stored Clerk credentials on logout
- Updated dependencies [24b3b6a]
- jazz-tools@0.9.16
- jazz-browser@0.9.16
## 0.9.15
### Patch Changes
- Updated dependencies [7491711]
- jazz-tools@0.9.15
- jazz-browser@0.9.15
## 0.9.14
### Patch Changes
- Updated dependencies [3df93cc]
- jazz-tools@0.9.14
- jazz-browser@0.9.14
## 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

View File

@@ -1,14 +1,14 @@
{
"name": "jazz-browser-auth-clerk",
"version": "0.9.11",
"version": "0.9.19",
"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.19",
"jazz-browser": "workspace:0.9.19",
"jazz-tools": "workspace:0.9.19"
},
"scripts": {
"format-and-lint": "biome check .",

View File

@@ -1,8 +1,6 @@
import { AgentSecret } from "cojson";
import { Account, AuthMethod, AuthResult, Credentials, ID } from "jazz-tools";
const localStorageKey = "jazz-clerk-auth";
export type MinimalClerkClient = {
user:
| {
@@ -10,6 +8,10 @@ export type MinimalClerkClient = {
unsafeMetadata: Record<string, any>;
fullName: string | null;
username: string | null;
firstName: string | null;
primaryEmailAddress: {
emailAddress: string;
} | null;
id: string;
update: (args: {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -21,6 +23,8 @@ export type MinimalClerkClient = {
signOut: () => Promise<void>;
};
const localStorageKey = "jazz-clerk-auth";
function saveCredentialsToLocalStorage(credentials: Credentials) {
localStorage.setItem(
localStorageKey,
@@ -31,6 +35,10 @@ function saveCredentialsToLocalStorage(credentials: Credentials) {
);
}
function clearStoredCredentials() {
localStorage.removeItem(localStorageKey);
}
export class BrowserClerkAuth implements AuthMethod {
constructor(
public driver: BrowserClerkAuth.Driver,
@@ -38,8 +46,21 @@ export class BrowserClerkAuth implements AuthMethod {
) {}
async start(): Promise<AuthResult> {
// Check local storage for credentials
const locallyStoredCredentials = localStorage.getItem(localStorageKey);
// clear localStorage if the current Clerk user doesn't match stored credentials
let locallyStoredCredentials = localStorage.getItem(localStorageKey);
if (locallyStoredCredentials && this.clerkClient.user) {
try {
const stored = JSON.parse(locallyStoredCredentials);
const clerkMetadata = this.clerkClient.user.unsafeMetadata;
if (clerkMetadata.jazzAccountID !== stored.accountID) {
clearStoredCredentials();
}
} catch (e) {
clearStoredCredentials();
}
}
locallyStoredCredentials = localStorage.getItem(localStorageKey);
if (locallyStoredCredentials) {
try {
@@ -53,7 +74,7 @@ export class BrowserClerkAuth implements AuthMethod {
this.driver.onError(error);
},
logOut: () => {
localStorage.removeItem(localStorageKey);
clearStoredCredentials();
void this.clerkClient.signOut();
},
};
@@ -86,6 +107,7 @@ export class BrowserClerkAuth implements AuthMethod {
this.driver.onError(error);
},
logOut: () => {
clearStoredCredentials();
void this.clerkClient.signOut();
},
};
@@ -96,8 +118,15 @@ export class BrowserClerkAuth implements AuthMethod {
creationProps: {
name:
this.clerkClient.user.fullName ||
this.clerkClient.user.firstName ||
this.clerkClient.user.username ||
this.clerkClient.user.primaryEmailAddress?.emailAddress?.split(
"@",
)[0] ||
this.clerkClient.user.id,
other: {
email: this.clerkClient.user.primaryEmailAddress?.emailAddress,
},
},
saveCredentials: async ({ accountID, secret }: Credentials) => {
saveCredentialsToLocalStorage({
@@ -116,6 +145,7 @@ export class BrowserClerkAuth implements AuthMethod {
this.driver.onError(error);
},
logOut: () => {
clearStoredCredentials();
void this.clerkClient.signOut();
},
};

View File

@@ -30,6 +30,8 @@ describe("BrowserClerkAuth", () => {
unsafeMetadata: {},
fullName: "Test User",
username: "testuser",
firstName: null,
primaryEmailAddress: null,
id: "test-id",
update: vi.fn(),
},
@@ -75,6 +77,8 @@ describe("BrowserClerkAuth", () => {
},
fullName: "Test User",
username: "testuser",
firstName: null,
primaryEmailAddress: null,
id: "test-id",
update: vi.fn(),
},
@@ -115,5 +119,68 @@ describe("BrowserClerkAuth", () => {
expect(mockClerkClient.signOut).toHaveBeenCalled();
});
it("should resolve name from available user fields", async () => {
const testCases = [
{
user: {
unsafeMetadata: {},
fullName: "Full Name",
firstName: null,
username: null,
primaryEmailAddress: null,
id: "test-id",
update: vi.fn(),
},
expected: "Full Name",
},
{
user: {
unsafeMetadata: {},
fullName: null,
firstName: "First",
username: null,
primaryEmailAddress: null,
id: "test-id",
update: vi.fn(),
},
expected: "First",
},
{
user: {
unsafeMetadata: {},
fullName: null,
firstName: null,
username: "username123",
primaryEmailAddress: null,
id: "test-id",
update: vi.fn(),
},
expected: "username123",
},
{
user: {
unsafeMetadata: {},
fullName: null,
firstName: null,
username: null,
primaryEmailAddress: { emailAddress: "test@example.com" },
id: "test-id",
update: vi.fn(),
},
expected: "test",
},
];
for (const { user, expected } of testCases) {
const auth = new BrowserClerkAuth(mockDriver, {
...mockClerkClient,
user,
});
const result = await auth.start();
expect(result.type).toBe("new");
expect((result as any).creationProps.name).toBe(expected);
}
});
});
});

View File

@@ -1,5 +1,66 @@
# jazz-browser-media-images
## 0.9.19
### Patch Changes
- jazz-browser@0.9.19
- jazz-tools@0.9.19
## 0.9.18
### Patch Changes
- jazz-browser@0.9.18
- jazz-tools@0.9.18
## 0.9.17
### Patch Changes
- Updated dependencies [c2ca1fe]
- Updated dependencies [1227047]
- jazz-tools@0.9.17
- jazz-browser@0.9.17
## 0.9.16
### Patch Changes
- Updated dependencies [24b3b6a]
- jazz-tools@0.9.16
- jazz-browser@0.9.16
## 0.9.15
### Patch Changes
- Updated dependencies [7491711]
- jazz-tools@0.9.15
- jazz-browser@0.9.15
## 0.9.14
### Patch Changes
- Updated dependencies [3df93cc]
- jazz-tools@0.9.14
- jazz-browser@0.9.14
## 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

View File

@@ -1,6 +1,6 @@
{
"name": "jazz-browser-media-images",
"version": "0.9.11",
"version": "0.9.19",
"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.19",
"jazz-tools": "workspace:0.9.19",
"pica": "^9.0.1",
"typescript": "~5.6.2"
},

View File

@@ -1,5 +1,74 @@
# jazz-browser
## 0.9.19
### Patch Changes
- Updated dependencies [6ad0a9f]
- cojson@0.9.19
- cojson-storage-indexeddb@0.9.19
- cojson-transport-ws@0.9.19
- jazz-tools@0.9.19
## 0.9.18
### Patch Changes
- Updated dependencies [8898b10]
- cojson@0.9.18
- cojson-storage-indexeddb@0.9.18
- cojson-transport-ws@0.9.18
- jazz-tools@0.9.18
## 0.9.17
### Patch Changes
- Updated dependencies [c2ca1fe]
- Updated dependencies [1227047]
- jazz-tools@0.9.17
## 0.9.16
### Patch Changes
- Updated dependencies [24b3b6a]
- jazz-tools@0.9.16
## 0.9.15
### Patch Changes
- Updated dependencies [7491711]
- jazz-tools@0.9.15
## 0.9.14
### Patch Changes
- Updated dependencies [3df93cc]
- jazz-tools@0.9.14
## 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

Some files were not shown because too many files have changed in this diff Show More