Compare commits
11 Commits
jazz-auth-
...
jazz-auth-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0088aa8b25 | ||
|
|
35a66df1e4 | ||
|
|
3b2fa64a82 | ||
|
|
3d1027f278 | ||
|
|
cc78386163 | ||
|
|
c240eed6a4 | ||
|
|
2a9b7f5d52 | ||
|
|
f2fbd29de5 | ||
|
|
c960176a2a | ||
|
|
fd4bae4cc1 | ||
|
|
ae32b7c19b |
@@ -1,5 +1,18 @@
|
||||
# betterauth
|
||||
|
||||
## 0.1.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3d1027f]
|
||||
- Updated dependencies [c240eed]
|
||||
- jazz-tools@0.14.2
|
||||
- jazz-betterauth-server-plugin@0.14.2
|
||||
- jazz-inspector@0.14.2
|
||||
- jazz-react@0.14.2
|
||||
- jazz-react-auth-betterauth@0.14.2
|
||||
- jazz-betterauth-client-plugin@0.14.2
|
||||
|
||||
## 0.1.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "betterauth",
|
||||
"version": "0.1.6",
|
||||
"version": "0.1.7",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
# chat-rn-expo-clerk
|
||||
|
||||
## 1.0.126
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3d1027f]
|
||||
- Updated dependencies [c240eed]
|
||||
- jazz-tools@0.14.2
|
||||
- jazz-expo@0.14.2
|
||||
- jazz-react-native-media-images@0.14.2
|
||||
|
||||
## 1.0.125
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "chat-rn-expo-clerk",
|
||||
"main": "index.js",
|
||||
"version": "1.0.125",
|
||||
"version": "1.0.126",
|
||||
"scripts": {
|
||||
"build": "expo export -p ios",
|
||||
"start": "expo start",
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# chat-rn-expo
|
||||
|
||||
## 1.0.113
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3d1027f]
|
||||
- Updated dependencies [c240eed]
|
||||
- jazz-tools@0.14.2
|
||||
- jazz-expo@0.14.2
|
||||
|
||||
## 1.0.112
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "chat-rn-expo",
|
||||
"version": "1.0.112",
|
||||
"version": "1.0.113",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"build": "tsc --noEmit && expo export -p ios",
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# chat-rn
|
||||
|
||||
## 1.0.121
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3d1027f]
|
||||
- Updated dependencies [c240eed]
|
||||
- jazz-tools@0.14.2
|
||||
- jazz-react-native@0.14.2
|
||||
|
||||
## 1.0.120
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "chat-rn",
|
||||
"version": "1.0.120",
|
||||
"version": "1.0.121",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"android": "react-native run-android",
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
# chat-vue
|
||||
|
||||
## 0.0.104
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3d1027f]
|
||||
- Updated dependencies [c240eed]
|
||||
- jazz-tools@0.14.2
|
||||
- jazz-browser@0.14.2
|
||||
- jazz-vue@0.14.2
|
||||
|
||||
## 0.0.103
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "chat-vue",
|
||||
"version": "0.0.103",
|
||||
"version": "0.0.104",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
# jazz-example-chat
|
||||
|
||||
## 0.0.202
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3d1027f]
|
||||
- Updated dependencies [c240eed]
|
||||
- jazz-tools@0.14.2
|
||||
- jazz-inspector@0.14.2
|
||||
- jazz-react@0.14.2
|
||||
|
||||
## 0.0.201
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "jazz-example-chat",
|
||||
"private": true,
|
||||
"version": "0.0.201",
|
||||
"version": "0.0.202",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
# minimal-auth-clerk
|
||||
|
||||
## 0.0.101
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3d1027f]
|
||||
- Updated dependencies [c240eed]
|
||||
- jazz-tools@0.14.2
|
||||
- jazz-react@0.14.2
|
||||
- jazz-react-auth-clerk@0.14.2
|
||||
|
||||
## 0.0.100
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "clerk",
|
||||
"private": true,
|
||||
"version": "0.0.100",
|
||||
"version": "0.0.101",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
# file-share-svelte
|
||||
|
||||
## 0.0.85
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3d1027f]
|
||||
- Updated dependencies [c240eed]
|
||||
- jazz-tools@0.14.2
|
||||
- jazz-inspector-element@0.14.2
|
||||
- jazz-svelte@0.14.2
|
||||
|
||||
## 0.0.84
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "file-share-svelte",
|
||||
"version": "0.0.84",
|
||||
"version": "0.0.85",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
# jazz-tailwind-demo-auth-starter
|
||||
|
||||
## 0.0.41
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3d1027f]
|
||||
- Updated dependencies [c240eed]
|
||||
- jazz-tools@0.14.2
|
||||
- jazz-inspector@0.14.2
|
||||
- jazz-react@0.14.2
|
||||
|
||||
## 0.0.40
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "filestream",
|
||||
"private": true,
|
||||
"version": "0.0.40",
|
||||
"version": "0.0.41",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# form
|
||||
|
||||
## 0.1.42
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3d1027f]
|
||||
- Updated dependencies [c240eed]
|
||||
- jazz-tools@0.14.2
|
||||
- jazz-react@0.14.2
|
||||
|
||||
## 0.1.41
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "form",
|
||||
"private": true,
|
||||
"version": "0.1.41",
|
||||
"version": "0.1.42",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# image-upload
|
||||
|
||||
## 0.0.98
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3d1027f]
|
||||
- Updated dependencies [c240eed]
|
||||
- jazz-tools@0.14.2
|
||||
- jazz-react@0.14.2
|
||||
|
||||
## 0.0.97
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "image-upload",
|
||||
"private": true,
|
||||
"version": "0.0.97",
|
||||
"version": "0.0.98",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# jazz-example-inspector
|
||||
|
||||
## 0.0.151
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-inspector@0.14.2
|
||||
|
||||
## 0.0.150
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "jazz-inspector-app",
|
||||
"private": true,
|
||||
"version": "0.0.150",
|
||||
"version": "0.0.151",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# multi-cursors
|
||||
|
||||
## 0.0.94
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3d1027f]
|
||||
- Updated dependencies [c240eed]
|
||||
- jazz-tools@0.14.2
|
||||
- jazz-react@0.14.2
|
||||
|
||||
## 0.0.93
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "multi-cursors",
|
||||
"private": true,
|
||||
"version": "0.0.93",
|
||||
"version": "0.0.94",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
# multiauth
|
||||
|
||||
## 0.0.42
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3d1027f]
|
||||
- Updated dependencies [c240eed]
|
||||
- jazz-tools@0.14.2
|
||||
- jazz-react@0.14.2
|
||||
- jazz-react-auth-clerk@0.14.2
|
||||
|
||||
## 0.0.41
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "multiauth",
|
||||
"private": true,
|
||||
"version": "0.0.41",
|
||||
"version": "0.0.42",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
# jazz-example-musicplayer
|
||||
|
||||
## 0.0.123
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3d1027f]
|
||||
- Updated dependencies [c240eed]
|
||||
- jazz-tools@0.14.2
|
||||
- jazz-inspector@0.14.2
|
||||
- jazz-react@0.14.2
|
||||
|
||||
## 0.0.122
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "jazz-example-music-player",
|
||||
"private": true,
|
||||
"version": "0.0.122",
|
||||
"version": "0.0.123",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# organization
|
||||
|
||||
## 0.0.94
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3d1027f]
|
||||
- Updated dependencies [c240eed]
|
||||
- jazz-tools@0.14.2
|
||||
- jazz-react@0.14.2
|
||||
|
||||
## 0.0.93
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "organization",
|
||||
"private": true,
|
||||
"version": "0.0.93",
|
||||
"version": "0.0.94",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# passkey-svelte
|
||||
|
||||
## 0.0.89
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3d1027f]
|
||||
- Updated dependencies [c240eed]
|
||||
- jazz-tools@0.14.2
|
||||
- jazz-svelte@0.14.2
|
||||
|
||||
## 0.0.88
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "passkey-svelte",
|
||||
"version": "0.0.88",
|
||||
"version": "0.0.89",
|
||||
"type": "module",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# minimal-auth-passkey
|
||||
|
||||
## 0.0.99
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3d1027f]
|
||||
- Updated dependencies [c240eed]
|
||||
- jazz-tools@0.14.2
|
||||
- jazz-react@0.14.2
|
||||
|
||||
## 0.0.98
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "passkey",
|
||||
"private": true,
|
||||
"version": "0.0.98",
|
||||
"version": "0.0.99",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# passphrase
|
||||
|
||||
## 0.0.96
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3d1027f]
|
||||
- Updated dependencies [c240eed]
|
||||
- jazz-tools@0.14.2
|
||||
- jazz-react@0.14.2
|
||||
|
||||
## 0.0.95
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "passphrase",
|
||||
"private": true,
|
||||
"version": "0.0.95",
|
||||
"version": "0.0.96",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# jazz-password-manager
|
||||
|
||||
## 0.0.120
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3d1027f]
|
||||
- Updated dependencies [c240eed]
|
||||
- jazz-tools@0.14.2
|
||||
- jazz-react@0.14.2
|
||||
|
||||
## 0.0.119
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "jazz-password-manager",
|
||||
"private": true,
|
||||
"version": "0.0.119",
|
||||
"version": "0.0.120",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# jazz-example-pets
|
||||
|
||||
## 0.0.218
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3d1027f]
|
||||
- Updated dependencies [c240eed]
|
||||
- jazz-tools@0.14.2
|
||||
- jazz-react@0.14.2
|
||||
|
||||
## 0.0.217
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "jazz-example-pets",
|
||||
"private": true,
|
||||
"version": "0.0.217",
|
||||
"version": "0.0.218",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# reactions
|
||||
|
||||
## 0.0.98
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3d1027f]
|
||||
- Updated dependencies [c240eed]
|
||||
- jazz-tools@0.14.2
|
||||
- jazz-react@0.14.2
|
||||
|
||||
## 0.0.97
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "reactions",
|
||||
"private": true,
|
||||
"version": "0.0.97",
|
||||
"version": "0.0.98",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
# richtext-tiptap
|
||||
|
||||
## 0.1.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3d1027f]
|
||||
- Updated dependencies [c240eed]
|
||||
- jazz-tools@0.14.2
|
||||
- jazz-react@0.14.2
|
||||
- jazz-richtext-tiptap@0.1.11
|
||||
|
||||
## 0.1.10
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "richtext-tiptap",
|
||||
"private": true,
|
||||
"version": "0.1.10",
|
||||
"version": "0.1.11",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
# richtext
|
||||
|
||||
## 0.0.88
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3d1027f]
|
||||
- Updated dependencies [c240eed]
|
||||
- jazz-tools@0.14.2
|
||||
- jazz-react@0.14.2
|
||||
- jazz-richtext-prosemirror@0.1.22
|
||||
|
||||
## 0.0.87
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "richtext",
|
||||
"private": true,
|
||||
"version": "0.0.87",
|
||||
"version": "0.0.88",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
# todo-vue
|
||||
|
||||
## 0.0.102
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3d1027f]
|
||||
- Updated dependencies [c240eed]
|
||||
- jazz-tools@0.14.2
|
||||
- jazz-browser@0.14.2
|
||||
- jazz-vue@0.14.2
|
||||
|
||||
## 0.0.101
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "todo-vue",
|
||||
"version": "0.0.101",
|
||||
"version": "0.0.102",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# jazz-example-todo
|
||||
|
||||
## 0.0.217
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3d1027f]
|
||||
- Updated dependencies [c240eed]
|
||||
- jazz-tools@0.14.2
|
||||
- jazz-react@0.14.2
|
||||
|
||||
## 0.0.216
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "jazz-example-todo",
|
||||
"private": true,
|
||||
"version": "0.0.216",
|
||||
"version": "0.0.217",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
# version-history
|
||||
|
||||
## 0.0.96
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3d1027f]
|
||||
- Updated dependencies [c240eed]
|
||||
- jazz-tools@0.14.2
|
||||
- jazz-inspector@0.14.2
|
||||
- jazz-react@0.14.2
|
||||
|
||||
## 0.0.95
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "version-history",
|
||||
"private": true,
|
||||
"version": "0.0.95",
|
||||
"version": "0.0.96",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { CodeGroup, ContentByFramework } from "@/components/forMdx";
|
||||
|
||||
export const metadata = {
|
||||
export const metadata = {
|
||||
description: "Learn how to subscribe to CoValues, specify loading depths, and handle loading states and inaccessible data."
|
||||
};
|
||||
|
||||
@@ -26,27 +26,26 @@ If you're using React in your project, check out our [React hooks](/docs/react/u
|
||||
|
||||
<CodeGroup>
|
||||
```ts twoslash
|
||||
import { ID, CoMap, coField } from "jazz-tools";
|
||||
const taskId = "co_123" as ID<Task>;
|
||||
import { co, z } from "jazz-tools";
|
||||
const taskId = "co_123";
|
||||
// ---cut-before---
|
||||
class Task extends CoMap {
|
||||
title = coField.string;
|
||||
description = coField.string;
|
||||
status = coField.literal("todo", "in-progress", "completed");
|
||||
assignedTo = coField.optional.string;
|
||||
}
|
||||
const Task = co.map({
|
||||
title: z.string(),
|
||||
description: z.string(),
|
||||
status: z.literal(["todo", "in-progress", "completed"]),
|
||||
assignedTo: z.optional(z.string()),
|
||||
});
|
||||
|
||||
// ...
|
||||
|
||||
// Subscribe to a Task by ID
|
||||
const unsubscribe = Task.subscribe(taskId, (updatedTask) => {
|
||||
const unsubscribe = Task.subscribe(taskId, {}, (updatedTask) => {
|
||||
console.log("Task updated:", updatedTask.title);
|
||||
console.log("New status:", updatedTask.status);
|
||||
});
|
||||
|
||||
// Clean up when you're done
|
||||
unsubscribe();
|
||||
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
@@ -54,14 +53,14 @@ If you already have a CoValue instance, you can subscribe to it by calling its `
|
||||
|
||||
<CodeGroup>
|
||||
```ts twoslash
|
||||
import { ID, CoMap, coField } from "jazz-tools";
|
||||
import { co, z } from "jazz-tools";
|
||||
|
||||
class Task extends CoMap {
|
||||
title = coField.string;
|
||||
description = coField.string;
|
||||
status = coField.literal("todo", "in-progress", "completed");
|
||||
assignedTo = coField.optional.string;
|
||||
}
|
||||
const Task = co.map({
|
||||
title: z.string(),
|
||||
description: z.string(),
|
||||
status: z.literal(["todo", "in-progress", "completed"]),
|
||||
assignedTo: z.optional(z.string()),
|
||||
});
|
||||
const otherProps = {} as any;
|
||||
// ---cut-before---
|
||||
const task = Task.create({
|
||||
@@ -88,22 +87,20 @@ Jazz provides a `useCoState` hook that provides a convenient way to subscribe to
|
||||
<CodeGroup>
|
||||
```tsx twoslash
|
||||
import React from "react";
|
||||
import { ID, CoMap, coField, CoList } from "jazz-tools";
|
||||
|
||||
class Task extends CoMap {
|
||||
title = coField.string;
|
||||
status = coField.literal("todo", "in-progress", "completed");
|
||||
}
|
||||
class Project extends CoMap {
|
||||
name = coField.string;
|
||||
tasks = coField.ref(ListOfTasks);
|
||||
}
|
||||
class ListOfTasks extends CoList.Of(coField.ref(Task)) {}
|
||||
import { co, z, ID, Loaded } from "jazz-tools";
|
||||
|
||||
const Task = co.map({
|
||||
title: z.string(),
|
||||
status: z.literal(["todo", "in-progress", "completed"]),
|
||||
});
|
||||
const Project = co.map({
|
||||
name: z.string(),
|
||||
tasks: co.list(Task),
|
||||
});
|
||||
// ---cut-before---
|
||||
import { useCoState } from "jazz-react";
|
||||
|
||||
function GardenPlanner({ projectId }: { projectId: ID<Project> }) {
|
||||
function GardenPlanner({ projectId }: { projectId: string }) {
|
||||
// Subscribe to a project and its tasks
|
||||
const project = useCoState(Project, projectId, {
|
||||
resolve: {
|
||||
@@ -125,7 +122,7 @@ function GardenPlanner({ projectId }: { projectId: ID<Project> }) {
|
||||
);
|
||||
}
|
||||
|
||||
function TaskList({ tasks }: { tasks: Task[] }) {
|
||||
function TaskList({ tasks }: { tasks: Loaded<typeof Task>[] }) {
|
||||
return (
|
||||
<ul>
|
||||
{tasks.map((task) => (
|
||||
@@ -152,37 +149,38 @@ Like `useCoState`, you can specify a resolve query to also subscribe to CoValues
|
||||
<CodeGroup>
|
||||
```tsx twoslash
|
||||
import React from "react";
|
||||
import { ID, CoMap, coField, CoList, Account } from "jazz-tools";
|
||||
class Task extends CoMap {
|
||||
title = coField.string;
|
||||
}
|
||||
class ListOfTasks extends CoList.Of(coField.ref(Task)) {}
|
||||
class Project extends CoMap {
|
||||
name = coField.string;
|
||||
tasks = coField.ref(ListOfTasks);
|
||||
}
|
||||
class ListOfProjects extends CoList.Of(coField.ref(Project)) {}
|
||||
import { co, z } from "jazz-tools";
|
||||
const Task = co.map({
|
||||
title: z.string(),
|
||||
});
|
||||
|
||||
const Project = co.map({
|
||||
name: z.string(),
|
||||
tasks: co.list(Task),
|
||||
});
|
||||
|
||||
const AccountRoot = co.map({
|
||||
myProjects: co.list(Project),
|
||||
});
|
||||
|
||||
const MyAppAccount = co.account({
|
||||
root: AccountRoot,
|
||||
profile: co.profile(),
|
||||
});
|
||||
|
||||
class AccountRoot extends CoMap {
|
||||
myProjects = coField.ref(ListOfProjects);
|
||||
}
|
||||
class MyAppAccount extends Account {
|
||||
root = coField.ref(AccountRoot);
|
||||
}
|
||||
declare module "jazz-react" { interface Register { Account: MyAppAccount; } }
|
||||
// ---cut-before---
|
||||
import { useAccount } from "jazz-react";
|
||||
|
||||
function ProjectList() {
|
||||
const { me } = useAccount({
|
||||
const { me } = useAccount(MyAppAccount, {
|
||||
resolve: {
|
||||
profile: true,
|
||||
root: {
|
||||
myProjects: {
|
||||
$each: {
|
||||
tasks: true
|
||||
}
|
||||
}
|
||||
tasks: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
@@ -191,17 +189,20 @@ function ProjectList() {
|
||||
return <div>Loading...</div>;
|
||||
}
|
||||
|
||||
return <div>
|
||||
<h1>{me.profile.name}'s projects</h1>
|
||||
<ul>
|
||||
{me.root.myProjects.map(project => (
|
||||
<li key={project.id}>
|
||||
{project.name} ({project.tasks.length} tasks)
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
return (
|
||||
<div>
|
||||
<h1>{me.profile.name}'s projects</h1>
|
||||
<ul>
|
||||
{me.root.myProjects.map((project) => (
|
||||
<li key={project.id}>
|
||||
{project.name} ({project.tasks.length} tasks)
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
@@ -219,14 +220,14 @@ This allows you to handle loading, error, and success states in your application
|
||||
|
||||
<CodeGroup>
|
||||
```ts twoslash
|
||||
import { ID, CoMap, coField } from "jazz-tools";
|
||||
class Task extends CoMap {
|
||||
title = coField.string;
|
||||
}
|
||||
import { co, z, Loaded } from "jazz-tools";
|
||||
const Task = co.map({
|
||||
title: z.string(),
|
||||
});
|
||||
|
||||
const taskId = "co_123" as ID<Task>;
|
||||
const taskId = "co_123";
|
||||
// ---cut-before---
|
||||
Task.subscribe(taskId, (task) => {
|
||||
Task.subscribe(taskId, {}, (task: Loaded<typeof Task>) => {
|
||||
if (task === undefined) {
|
||||
console.log("Task is loading...");
|
||||
} else if (task === null) {
|
||||
@@ -248,27 +249,25 @@ Resolve queries let you declare exactly which references to load and how deep to
|
||||
|
||||
<CodeGroup>
|
||||
```ts twoslash
|
||||
import { ID, CoMap, coField, CoList } from "jazz-tools";
|
||||
const projectId = "co_123" as ID<Project>;
|
||||
import { co, z, CoListSchema } from "jazz-tools";
|
||||
const projectId = "co_123";
|
||||
|
||||
// ---cut-before---
|
||||
class Project extends CoMap {
|
||||
name = coField.string;
|
||||
tasks = coField.ref(ListOfTasks);
|
||||
owner = coField.ref(TeamMember);
|
||||
}
|
||||
const TeamMember = co.map({
|
||||
name: z.string(),
|
||||
});
|
||||
|
||||
class Task extends CoMap {
|
||||
title = coField.string;
|
||||
subtasks = coField.ref(ListOfTasks);
|
||||
assignee = coField.optional.ref(TeamMember);
|
||||
}
|
||||
const Task = co.map({
|
||||
title: z.string(),
|
||||
assignee: z.optional(TeamMember),
|
||||
get subtasks(): CoListSchema<typeof Task> { return co.list(Task) },
|
||||
});
|
||||
|
||||
class TeamMember extends CoMap {
|
||||
name = coField.string;
|
||||
}
|
||||
|
||||
class ListOfTasks extends CoList.Of(coField.ref(Task)) {}
|
||||
const Project = co.map({
|
||||
name: z.string(),
|
||||
tasks: co.list(Task),
|
||||
owner: TeamMember,
|
||||
});
|
||||
|
||||
// Load just the project, not its references
|
||||
const project = await Project.load(projectId);
|
||||
@@ -349,28 +348,26 @@ When loading data with references, the load operation will fail if one of the re
|
||||
When a user tries to load a reference they don't have access to:
|
||||
|
||||
<CodeGroup>
|
||||
```typescript twoslash
|
||||
import { ID, CoMap, coField, CoList } from "jazz-tools";
|
||||
```ts twoslash
|
||||
import { co, z, CoListSchema } from "jazz-tools";
|
||||
|
||||
class Project extends CoMap {
|
||||
name = coField.string;
|
||||
tasks = coField.ref(ListOfTasks);
|
||||
owner = coField.ref(TeamMember);
|
||||
}
|
||||
const TeamMember = co.map({
|
||||
name: z.string(),
|
||||
});
|
||||
|
||||
class Task extends CoMap {
|
||||
title = coField.string;
|
||||
subtasks = coField.ref(ListOfTasks);
|
||||
assignee = coField.optional.ref(TeamMember);
|
||||
}
|
||||
const Task = co.map({
|
||||
title: z.string(),
|
||||
assignee: z.optional(TeamMember),
|
||||
get subtasks(): CoListSchema<typeof Task> { return co.list(Task) },
|
||||
});
|
||||
|
||||
class TeamMember extends CoMap {
|
||||
name = coField.string;
|
||||
}
|
||||
const Project = co.map({
|
||||
name: z.string(),
|
||||
tasks: co.list(Task),
|
||||
owner: TeamMember,
|
||||
});
|
||||
|
||||
class ListOfTasks extends CoList.Of(coField.ref(Task)) {}
|
||||
|
||||
const taskId = "co_123" as ID<Task>;
|
||||
const taskId = "co_123";
|
||||
|
||||
// ---cut-before---
|
||||
// If assignee is not accessible to the user:
|
||||
@@ -390,28 +387,26 @@ The behavior is the same for optional and required references.
|
||||
When a list contains references to items the user can't access:
|
||||
|
||||
<CodeGroup>
|
||||
```typescript twoslash
|
||||
import { ID, CoMap, coField, CoList } from "jazz-tools";
|
||||
```ts twoslash
|
||||
import { co, z, CoListSchema } from "jazz-tools";
|
||||
|
||||
class Project extends CoMap {
|
||||
name = coField.string;
|
||||
tasks = coField.ref(ListOfTasks);
|
||||
owner = coField.ref(TeamMember);
|
||||
}
|
||||
const TeamMember = co.map({
|
||||
name: z.string(),
|
||||
});
|
||||
|
||||
class Task extends CoMap {
|
||||
title = coField.string;
|
||||
subtasks = coField.ref(ListOfTasks);
|
||||
assignee = coField.optional.ref(TeamMember);
|
||||
}
|
||||
const Task = co.map({
|
||||
title: z.string(),
|
||||
assignee: z.optional(TeamMember),
|
||||
get subtasks(): CoListSchema<typeof Task> { return co.list(Task) },
|
||||
});
|
||||
|
||||
class TeamMember extends CoMap {
|
||||
name = coField.string;
|
||||
}
|
||||
const Project = co.map({
|
||||
name: z.string(),
|
||||
tasks: co.list(Task),
|
||||
owner: TeamMember,
|
||||
});
|
||||
|
||||
class ListOfTasks extends CoList.Of(coField.ref(Task)) {}
|
||||
|
||||
const projectId = "co_123" as ID<Project>;
|
||||
const projectId = "co_123";
|
||||
// ---cut-before---
|
||||
// If any item in the list is not accessible:
|
||||
const project = await Project.load(projectId, {
|
||||
@@ -428,28 +423,26 @@ If any item in a list is inaccessible to the user, the entire load operation wil
|
||||
When trying to load an object with an inaccessible reference without directly resolving it:
|
||||
|
||||
<CodeGroup>
|
||||
```typescript twoslash
|
||||
import { ID, CoMap, coField, CoList } from "jazz-tools";
|
||||
```ts twoslash
|
||||
import { co, z, CoListSchema } from "jazz-tools";
|
||||
|
||||
class Project extends CoMap {
|
||||
name = coField.string;
|
||||
tasks = coField.ref(ListOfTasks);
|
||||
owner = coField.ref(TeamMember);
|
||||
}
|
||||
const TeamMember = co.map({
|
||||
name: z.string(),
|
||||
});
|
||||
|
||||
class Task extends CoMap {
|
||||
title = coField.string;
|
||||
subtasks = coField.ref(ListOfTasks);
|
||||
assignee = coField.optional.ref(TeamMember);
|
||||
}
|
||||
const Task = co.map({
|
||||
title: z.string(),
|
||||
assignee: z.optional(TeamMember),
|
||||
get subtasks(): CoListSchema<typeof Task> { return co.list(Task) },
|
||||
});
|
||||
|
||||
class TeamMember extends CoMap {
|
||||
name = coField.string;
|
||||
}
|
||||
const Project = co.map({
|
||||
name: z.string(),
|
||||
tasks: co.list(Task),
|
||||
owner: TeamMember,
|
||||
});
|
||||
|
||||
class ListOfTasks extends CoList.Of(coField.ref(Task)) {}
|
||||
|
||||
const projectId = "co_123" as ID<Project>;
|
||||
const projectId = "co_123";
|
||||
// ---cut-before---
|
||||
const project = await Project.load(projectId, {
|
||||
resolve: true
|
||||
@@ -474,21 +467,24 @@ This is especially useful when in your app access to these items might be revoke
|
||||
This way the inaccessible items are replaced with `null` in the returned list.
|
||||
|
||||
<CodeGroup>
|
||||
```typescript twoslash
|
||||
import { ID, CoMap, CoList, co, Group, Account } from "jazz-tools";
|
||||
import { assert } from "vitest";
|
||||
```ts twoslash
|
||||
import { co, z, CoListSchema, Group } from "jazz-tools";
|
||||
import { createJazzTestAccount } from "jazz-tools/testing";
|
||||
|
||||
class Person extends CoMap {
|
||||
name = co.string;
|
||||
}
|
||||
class Friends extends CoList.Of(co.ref(Person)) {}
|
||||
const me = await createJazzTestAccount();
|
||||
const account2 = await createJazzTestAccount();
|
||||
|
||||
const privateGroup = Group.create();
|
||||
const publicGroup = Group.create();
|
||||
const me = {} as unknown as Account;
|
||||
const Person = co.map({
|
||||
name: z.string(),
|
||||
});
|
||||
|
||||
const Friends = co.list(Person);
|
||||
|
||||
const privateGroup = Group.create({ owner: account2 });
|
||||
const publicGroup = Group.create({ owner: me });
|
||||
|
||||
// ---cut-before---
|
||||
const source = Friends.create(
|
||||
const source = co.list(Person).create(
|
||||
[
|
||||
Person.create(
|
||||
{
|
||||
@@ -506,7 +502,7 @@ const source = Friends.create(
|
||||
publicGroup,
|
||||
);
|
||||
|
||||
const friends = await Friends.load(source.id, {
|
||||
const friends = await co.list(Person).load(source.id, {
|
||||
resolve: {
|
||||
$each: { $onError: null }
|
||||
},
|
||||
@@ -515,47 +511,47 @@ const friends = await Friends.load(source.id, {
|
||||
|
||||
// Thanks to $onError catching the errors, the list is loaded
|
||||
// because we have access to friends
|
||||
friends // => Friends
|
||||
|
||||
assert(friends);
|
||||
console.log(friends); // Person[]
|
||||
|
||||
// Jane is null because we lack access rights
|
||||
// and we have used $onError to catch the error on the list items
|
||||
friends[0] // => null
|
||||
console.log(friends?.[0]); // null
|
||||
|
||||
// Alice is not null because we have access
|
||||
// the type is nullable because we have used $onError
|
||||
friends[1] // => Person
|
||||
console.log(friends?.[1]); // Person
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
The `$onError` works as a "catch" clause option to block any error in the resolved childs.
|
||||
The `$onError` works as a "catch" clause option to block any error in the resolved children.
|
||||
|
||||
<CodeGroup>
|
||||
```typescript twoslash
|
||||
import { ID, CoMap, CoList, co, Group, Account } from "jazz-tools";
|
||||
import { assert } from "vitest";
|
||||
```ts twoslash
|
||||
import { createJazzTestAccount } from "jazz-tools/testing";
|
||||
const me = await createJazzTestAccount();
|
||||
const account2 = await createJazzTestAccount();
|
||||
|
||||
class Person extends CoMap {
|
||||
name = co.string;
|
||||
dog = co.ref(Dog);
|
||||
}
|
||||
class Dog extends CoMap {
|
||||
name = co.string;
|
||||
}
|
||||
class Friends extends CoList.Of(co.ref(Person)) {}
|
||||
import { Group, co, z } from "jazz-tools";
|
||||
|
||||
class User extends CoMap {
|
||||
name = co.string;
|
||||
friends = co.ref(Friends);
|
||||
}
|
||||
const Dog = co.map({
|
||||
name: z.string(),
|
||||
});
|
||||
|
||||
const privateGroup = Group.create();
|
||||
const publicGroup = Group.create();
|
||||
const me = {} as unknown as Account;
|
||||
const Person = co.map({
|
||||
name: z.string(),
|
||||
dog: Dog,
|
||||
});
|
||||
|
||||
const User = co.map({
|
||||
name: z.string(),
|
||||
friends: co.list(Person),
|
||||
});
|
||||
|
||||
const privateGroup = Group.create({ owner: account2 });
|
||||
const publicGroup = Group.create({ owner: me });
|
||||
|
||||
// ---cut-before---
|
||||
const source = Friends.create(
|
||||
const source = co.list(Person).create(
|
||||
[
|
||||
Person.create(
|
||||
{
|
||||
@@ -571,47 +567,47 @@ const source = Friends.create(
|
||||
publicGroup,
|
||||
);
|
||||
|
||||
const friends = await Friends.load(source.id, {
|
||||
const friends = await co.list(Person).load(source.id, {
|
||||
resolve: {
|
||||
$each: { dog: true, $onError: null }
|
||||
},
|
||||
loadAs: me,
|
||||
});
|
||||
|
||||
assert(friends);
|
||||
|
||||
// Jane is null because we don't have access to Rex
|
||||
// and we have used $onError to catch the error on the list items
|
||||
friends[0] // => null
|
||||
console.log(friends?.[0]); // null
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
We can actually use `$onError` everywhere in the resolve query, so we can use it to catch the error on dog:
|
||||
|
||||
<CodeGroup>
|
||||
```typescript twoslash
|
||||
import { ID, CoMap, CoList, co, Group, Account } from "jazz-tools";
|
||||
import { assert } from "vitest";
|
||||
```ts twoslash
|
||||
import { createJazzTestAccount } from "jazz-tools/testing";
|
||||
const me = await createJazzTestAccount();
|
||||
const account2 = await createJazzTestAccount();
|
||||
|
||||
class Person extends CoMap {
|
||||
name = co.string;
|
||||
dog = co.ref(Dog);
|
||||
}
|
||||
class Dog extends CoMap {
|
||||
name = co.string;
|
||||
}
|
||||
class Friends extends CoList.Of(co.ref(Person)) {}
|
||||
import { co, z, Group } from "jazz-tools";
|
||||
|
||||
class User extends CoMap {
|
||||
name = co.string;
|
||||
friends = co.ref(Friends);
|
||||
}
|
||||
const Dog = co.map({
|
||||
name: z.string(),
|
||||
});
|
||||
|
||||
const privateGroup = Group.create();
|
||||
const publicGroup = Group.create();
|
||||
const me = {} as unknown as Account;
|
||||
const Person = co.map({
|
||||
name: z.string(),
|
||||
dog: Dog,
|
||||
});
|
||||
|
||||
const source = Friends.create(
|
||||
const User = co.map({
|
||||
name: z.string(),
|
||||
friends: co.list(Person),
|
||||
});
|
||||
|
||||
const privateGroup = Group.create({ owner: account2 });
|
||||
const publicGroup = Group.create({ owner: me });
|
||||
|
||||
const source = co.list(Person).create(
|
||||
[
|
||||
Person.create(
|
||||
{
|
||||
@@ -628,71 +624,71 @@ const source = Friends.create(
|
||||
);
|
||||
|
||||
// ---cut-before---
|
||||
const friends = await Friends.load(source.id, {
|
||||
const friends = await co.list(Person).load(source.id, {
|
||||
resolve: {
|
||||
$each: { dog: { $onError: null } }
|
||||
},
|
||||
loadAs: me,
|
||||
});
|
||||
|
||||
assert(friends);
|
||||
|
||||
// Jane now is not-nullable at type level because
|
||||
// we have moved $onError down to the dog field
|
||||
//
|
||||
// This also means that if we don't have access to Jane
|
||||
// the entire friends list will be null
|
||||
friends[0] // => Person
|
||||
console.log(friends?.[0]); // => Person
|
||||
|
||||
// Jane's dog is null because we don't have access to Rex
|
||||
// and we have used $onError to catch the error
|
||||
friends[0].dog // => null
|
||||
console.log(friends?.[0]?.dog); // => null
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
## Type Safety with Resolved Type
|
||||
## Type Safety with Loaded Type
|
||||
|
||||
Jazz provides the `Resolved` type to help you define and enforce the structure of deeply loaded data in your application. This makes it easier to ensure that components receive the data they expect with proper TypeScript validation.
|
||||
Jazz provides the `Loaded` type to help you define and enforce the structure of deeply loaded data in your application. This makes it easier to ensure that components receive the data they expect with proper TypeScript validation.
|
||||
|
||||
The `Resolved` type is especially useful when passing data between components, as it guarantees that all necessary nested data has been loaded:
|
||||
The `Loaded` type is especially useful when passing data between components, as it guarantees that all necessary nested data has been loaded:
|
||||
|
||||
<ContentByFramework framework="react">
|
||||
<CodeGroup>
|
||||
```tsx twoslash
|
||||
import { CoListSchema, Loaded, co, z } from "jazz-tools";
|
||||
import React from "react";
|
||||
import { ID, CoMap, coField, CoList, Resolved } from "jazz-tools";
|
||||
|
||||
class Project extends CoMap {
|
||||
name = coField.string;
|
||||
tasks = coField.ref(ListOfTasks);
|
||||
owner = coField.ref(TeamMember);
|
||||
}
|
||||
const TeamMember = co.map({
|
||||
name: z.string(),
|
||||
});
|
||||
|
||||
class Task extends CoMap {
|
||||
title = coField.string;
|
||||
subtasks = coField.ref(ListOfTasks);
|
||||
assignee = coField.optional.ref(TeamMember);
|
||||
}
|
||||
|
||||
class TeamMember extends CoMap {
|
||||
name = coField.string;
|
||||
}
|
||||
|
||||
class ListOfTasks extends CoList.Of(coField.ref(Task)) {}
|
||||
const Task = co.map({
|
||||
title: z.string(),
|
||||
assignee: z.optional(TeamMember),
|
||||
get subtasks(): CoListSchema<typeof Task> {
|
||||
return co.list(Task);
|
||||
},
|
||||
});
|
||||
|
||||
const Project = co.map({
|
||||
name: z.string(),
|
||||
tasks: co.list(Task),
|
||||
owner: TeamMember,
|
||||
});
|
||||
|
||||
// ---cut-before---
|
||||
// Define a type that includes resolved nested data
|
||||
type ProjectWithTasks = Resolved<Project, {
|
||||
tasks: { $each: true }
|
||||
}>;
|
||||
// Define a type that includes loaded nested data
|
||||
type ProjectWithTasks = Loaded<
|
||||
typeof Project,
|
||||
{
|
||||
tasks: { $each: true };
|
||||
}
|
||||
>;
|
||||
|
||||
// Component that expects a fully resolved project
|
||||
// Component that expects a fully loaded project
|
||||
function TaskList({ project }: { project: ProjectWithTasks }) {
|
||||
// TypeScript knows tasks are loaded, so this is type-safe
|
||||
return (
|
||||
<ul>
|
||||
{project.tasks.map(task => (
|
||||
{project.tasks.map((task) => (
|
||||
<li key={task.id}>{task.title}</li>
|
||||
))}
|
||||
</ul>
|
||||
@@ -700,26 +696,30 @@ function TaskList({ project }: { project: ProjectWithTasks }) {
|
||||
}
|
||||
|
||||
// For more complex resolutions
|
||||
type FullyLoadedProject = Resolved<Project, {
|
||||
tasks: {
|
||||
$each: {
|
||||
subtasks: true,
|
||||
assignee: true
|
||||
}
|
||||
},
|
||||
owner: true
|
||||
}>;
|
||||
type FullyLoadedProject = Loaded<
|
||||
typeof Project,
|
||||
{
|
||||
tasks: {
|
||||
$each: {
|
||||
subtasks: true;
|
||||
assignee: true;
|
||||
};
|
||||
};
|
||||
owner: true;
|
||||
}
|
||||
>;
|
||||
|
||||
// Function that requires deeply resolved data
|
||||
// Function that requires deeply loaded data
|
||||
function processProject(project: FullyLoadedProject) {
|
||||
// Safe access to all resolved properties
|
||||
// Safe access to all loaded properties
|
||||
console.log(`Project ${project.name} owned by ${project.owner.name}`);
|
||||
|
||||
project.tasks.forEach(task => {
|
||||
project.tasks.forEach((task) => {
|
||||
console.log(`Task: ${task.title}, Assigned to: ${task.assignee?.name}`);
|
||||
console.log(`Subtasks: ${task.subtasks.length}`);
|
||||
});
|
||||
}
|
||||
|
||||
```
|
||||
</CodeGroup>
|
||||
</ContentByFramework>
|
||||
@@ -727,59 +727,62 @@ function processProject(project: FullyLoadedProject) {
|
||||
<ContentByFramework framework="vanilla">
|
||||
<CodeGroup>
|
||||
```ts twoslash
|
||||
import { ID, CoMap, coField, CoList, Resolved } from "jazz-tools";
|
||||
import { CoListSchema, Loaded, co, z } from "jazz-tools";
|
||||
|
||||
class Project extends CoMap {
|
||||
name = coField.string;
|
||||
tasks = coField.ref(ListOfTasks);
|
||||
owner = coField.ref(TeamMember);
|
||||
}
|
||||
const TeamMember = co.map({
|
||||
name: z.string(),
|
||||
});
|
||||
|
||||
class Task extends CoMap {
|
||||
title = coField.string;
|
||||
subtasks = coField.ref(ListOfTasks);
|
||||
assignee = coField.optional.ref(TeamMember);
|
||||
}
|
||||
|
||||
class TeamMember extends CoMap {
|
||||
name = coField.string;
|
||||
}
|
||||
|
||||
class ListOfTasks extends CoList.Of(coField.ref(Task)) {}
|
||||
const Task = co.map({
|
||||
title: z.string(),
|
||||
assignee: z.optional(TeamMember),
|
||||
get subtasks(): CoListSchema<typeof Task> {
|
||||
return co.list(Task);
|
||||
},
|
||||
});
|
||||
|
||||
const Project = co.map({
|
||||
name: z.string(),
|
||||
tasks: co.list(Task),
|
||||
owner: TeamMember,
|
||||
});
|
||||
|
||||
// ---cut-before---
|
||||
// Define a type that includes resolved nested data
|
||||
type ProjectWithTasks = Resolved<Project, {
|
||||
tasks: { $each: true }
|
||||
}>;
|
||||
// Define a type that includes loaded nested data
|
||||
type ProjectWithTasks = Loaded<
|
||||
typeof Project,
|
||||
{
|
||||
tasks: { $each: true };
|
||||
}
|
||||
>;
|
||||
|
||||
// Function that expects resolved data
|
||||
async function taskList({project}: {project: ProjectWithTasks}) {
|
||||
// Function that expects loaded data
|
||||
async function taskList({ project }: { project: ProjectWithTasks }) {
|
||||
// TypeScript knows tasks are loaded, so this is type-safe
|
||||
return project.tasks
|
||||
.map(task => task.title)
|
||||
.join(`\n - `);
|
||||
return project.tasks.map((task) => task.title).join(`\n - `);
|
||||
}
|
||||
|
||||
// For more complex resolutions
|
||||
type FullyLoadedProject = Resolved<Project, {
|
||||
tasks: {
|
||||
$each: {
|
||||
title: true,
|
||||
subtasks: true,
|
||||
assignee: true
|
||||
}
|
||||
},
|
||||
owner: true
|
||||
}>;
|
||||
type FullyLoadedProject = Loaded<
|
||||
typeof Project,
|
||||
{
|
||||
tasks: {
|
||||
$each: {
|
||||
title: true;
|
||||
subtasks: true;
|
||||
assignee: true;
|
||||
};
|
||||
};
|
||||
owner: true;
|
||||
}
|
||||
>;
|
||||
|
||||
// Function that requires deeply resolved data
|
||||
// Function that requires deeply loaded data
|
||||
function processProject(project: FullyLoadedProject) {
|
||||
// Safe access to all resolved properties
|
||||
// Safe access to all loaded properties
|
||||
console.log(`Project ${project.name} owned by ${project.owner.name}`);
|
||||
|
||||
project.tasks.forEach(task => {
|
||||
project.tasks.forEach((task) => {
|
||||
console.log(`Task: ${task.title}, Assigned to: ${task.assignee?.name}`);
|
||||
console.log(`Subtasks: ${task.subtasks.length}`);
|
||||
});
|
||||
@@ -788,7 +791,7 @@ function processProject(project: FullyLoadedProject) {
|
||||
</CodeGroup>
|
||||
</ContentByFramework>
|
||||
|
||||
Using the `Resolved` type helps catch errors at compile time rather than runtime, ensuring that your components and functions receive data with the proper resolution depth. This is especially useful for larger applications where data is passed between many components.
|
||||
Using the `Loaded` type helps catch errors at compile time rather than runtime, ensuring that your components and functions receive data with the proper resolution depth. This is especially useful for larger applications where data is passed between many components.
|
||||
|
||||
## Ensuring Data is Loaded
|
||||
|
||||
@@ -796,29 +799,29 @@ Sometimes you need to make sure data is loaded before proceeding with an operati
|
||||
|
||||
<CodeGroup>
|
||||
```ts twoslash
|
||||
import { ID, CoMap, coField, CoList, Resolved } from "jazz-tools";
|
||||
import { CoListSchema, Loaded, co, z } from "jazz-tools";
|
||||
|
||||
class Project extends CoMap {
|
||||
name = coField.string;
|
||||
tasks = coField.ref(ListOfTasks);
|
||||
owner = coField.ref(TeamMember);
|
||||
}
|
||||
const TeamMember = co.map({
|
||||
name: z.string(),
|
||||
});
|
||||
|
||||
class Task extends CoMap {
|
||||
title = coField.string;
|
||||
status = coField.literal("todo", "in-progress", "completed");
|
||||
subtasks = coField.ref(ListOfTasks);
|
||||
assignee = coField.optional.ref(TeamMember);
|
||||
}
|
||||
const Task = co.map({
|
||||
title: z.string(),
|
||||
status: z.literal(["todo", "in-progress", "completed"]),
|
||||
assignee: z.string().optional(),
|
||||
get subtasks(): CoListSchema<typeof Task> {
|
||||
return co.list(Task);
|
||||
},
|
||||
});
|
||||
|
||||
class TeamMember extends CoMap {
|
||||
name = coField.string;
|
||||
}
|
||||
|
||||
class ListOfTasks extends CoList.Of(coField.ref(Task)) {}
|
||||
const Project = co.map({
|
||||
name: z.string(),
|
||||
tasks: co.list(Task),
|
||||
owner: TeamMember,
|
||||
});
|
||||
|
||||
// ---cut-before---
|
||||
async function completeAllTasks(projectId: ID<Project>) {
|
||||
async function completeAllTasks(projectId: string) {
|
||||
// Ensure the project is loaded
|
||||
const project = await Project.load(projectId, { resolve: true });
|
||||
if (!project) return;
|
||||
@@ -827,13 +830,13 @@ async function completeAllTasks(projectId: ID<Project>) {
|
||||
const loadedProject = await project.ensureLoaded({
|
||||
resolve: {
|
||||
tasks: {
|
||||
$each: true
|
||||
}
|
||||
}
|
||||
$each: true,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
// Now we can safely access and modify tasks
|
||||
loadedProject.tasks.forEach(task => {
|
||||
loadedProject.tasks.forEach((task) => {
|
||||
task.status = "completed";
|
||||
});
|
||||
}
|
||||
@@ -848,4 +851,4 @@ async function completeAllTasks(projectId: ID<Project>) {
|
||||
2. **Use framework integrations**: They handle subscription lifecycle automatically
|
||||
3. **Clean up subscriptions**: Always store and call the unsubscribe function when you're done
|
||||
4. **Handle all loading states**: Check for undefined (loading), null (not found), and success states
|
||||
5. **Use the Resolved type**: Add compile-time type safety for components that require specific resolution patterns
|
||||
5. **Use the Loaded type**: Add compile-time type safety for components that require specific resolution patterns
|
||||
|
||||
@@ -451,7 +451,9 @@ export class RawGroup<
|
||||
}
|
||||
|
||||
getCurrentReadKeyId() {
|
||||
if (this.myRole() === "writeOnly") {
|
||||
const myRole = this.myRole();
|
||||
|
||||
if (myRole === "writeOnly") {
|
||||
const accountId = this.core.node.getCurrentAgent().id;
|
||||
|
||||
const key = this.get(`writeKeyFor_${accountId}`) as KeyID;
|
||||
@@ -469,6 +471,16 @@ export class RawGroup<
|
||||
return key;
|
||||
}
|
||||
|
||||
if (!myRole) {
|
||||
const accountId = this.core.node.getCurrentAgent().id;
|
||||
|
||||
const key = this.get(`writeKeyFor_${accountId}`) as KeyID;
|
||||
|
||||
if (key) {
|
||||
return key;
|
||||
}
|
||||
}
|
||||
|
||||
return this.get("readKey");
|
||||
}
|
||||
|
||||
@@ -670,22 +682,24 @@ export class RawGroup<
|
||||
);
|
||||
}
|
||||
|
||||
const value = role === "inherit" ? "extend" : role;
|
||||
|
||||
this.set(`parent_${parent.id}`, value, "trusting");
|
||||
parent.set(`child_${this.id}`, "extend", "trusting");
|
||||
|
||||
if (
|
||||
parent.myRole() !== "admin" &&
|
||||
parent.myRole() !== "writer" &&
|
||||
parent.myRole() !== "reader" &&
|
||||
parent.myRole() !== "writeOnly"
|
||||
) {
|
||||
throw new Error(
|
||||
"To extend a group, the current account must be a member of the parent group",
|
||||
// Create a writeOnly key in the parent group to be able to reveal the current child key to the parent group
|
||||
parent.internalCreateWriteOnlyKeyForMember(
|
||||
this.core.node.getCurrentAgent().id,
|
||||
this.core.node.getCurrentAgent().currentAgentID(),
|
||||
);
|
||||
}
|
||||
|
||||
const value = role === "inherit" ? "extend" : role;
|
||||
|
||||
this.set(`parent_${parent.id}`, value, "trusting");
|
||||
parent.set(`child_${this.id}`, "extend", "trusting");
|
||||
|
||||
const { id: parentReadKeyID, secret: parentReadKeySecret } =
|
||||
parent.core.getCurrentReadKey();
|
||||
if (!parentReadKeySecret) {
|
||||
|
||||
@@ -345,18 +345,6 @@ function determineValidTransactionsForGroup(
|
||||
validTransactions.push({ txID: { sessionID, txIndex }, tx });
|
||||
continue;
|
||||
} else if (isChildExtension(change.key)) {
|
||||
if (
|
||||
memberState[transactor] !== "admin" &&
|
||||
memberState[transactor] !== "writer" &&
|
||||
memberState[transactor] !== "reader" &&
|
||||
memberState[transactor] !== "writeOnly"
|
||||
) {
|
||||
logPermissionError(
|
||||
"Only admins, writers, readers and writeOnly can set child extensions",
|
||||
);
|
||||
continue;
|
||||
}
|
||||
|
||||
validTransactions.push({ txID: { sessionID, txIndex }, tx });
|
||||
continue;
|
||||
} else if (isWriteKeyForMember(change.key)) {
|
||||
|
||||
@@ -157,6 +157,29 @@ describe("extend", () => {
|
||||
|
||||
expect(childGroup.roleOf(node2.accountID)).toEqual(undefined);
|
||||
});
|
||||
|
||||
test("should be possible to extend a group without having membership in the parent group", async () => {
|
||||
const { node1, node2, node3 } = await createThreeConnectedNodes(
|
||||
"server",
|
||||
"server",
|
||||
"server",
|
||||
);
|
||||
|
||||
const parentGroup = node1.node.createGroup();
|
||||
const childGroup = node2.node.createGroup();
|
||||
|
||||
const alice = await loadCoValueOrFail(node1.node, node3.accountID);
|
||||
parentGroup.addMember(alice, "writer");
|
||||
|
||||
const parentGroupOnNode2 = await loadCoValueOrFail(
|
||||
node2.node,
|
||||
parentGroup.id,
|
||||
);
|
||||
|
||||
childGroup.extend(parentGroupOnNode2);
|
||||
|
||||
expect(childGroup.roleOf(alice.id)).toBe("writer");
|
||||
});
|
||||
});
|
||||
|
||||
describe("unextend", () => {
|
||||
@@ -191,6 +214,78 @@ describe("unextend", () => {
|
||||
expect(childGroup.roleOf(alice.id)).toBe(undefined);
|
||||
});
|
||||
|
||||
test("should work when the account has no access to the parent group but owns the writeKey", async () => {
|
||||
const { node1, node2, node3 } = await createThreeConnectedNodes(
|
||||
"server",
|
||||
"server",
|
||||
"server",
|
||||
);
|
||||
|
||||
const parentGroup = node1.node.createGroup();
|
||||
const childGroup = node2.node.createGroup();
|
||||
|
||||
const alice = await loadCoValueOrFail(node1.node, node3.accountID);
|
||||
parentGroup.addMember(alice, "writer");
|
||||
|
||||
const parentGroupOnNode2 = await loadCoValueOrFail(
|
||||
node2.node,
|
||||
parentGroup.id,
|
||||
);
|
||||
|
||||
childGroup.extend(parentGroupOnNode2);
|
||||
|
||||
expect(childGroup.roleOf(alice.id)).toBe("writer");
|
||||
|
||||
// `childGroup` no longer has `parentGroup`'s members
|
||||
await childGroup.revokeExtend(parentGroup);
|
||||
expect(childGroup.roleOf(alice.id)).toBe(undefined);
|
||||
|
||||
const map = childGroup.createMap();
|
||||
map.set("test", "Hello!");
|
||||
|
||||
const mapOnAlice = await loadCoValueOrFail(node3.node, map.id);
|
||||
|
||||
expect(mapOnAlice.get("test")).toEqual(undefined);
|
||||
});
|
||||
|
||||
test("should work when the account has no access to the parent group and not owns the writeKey", async () => {
|
||||
const {
|
||||
node1: bobNode,
|
||||
node2: johnNode,
|
||||
node3: aliceNode,
|
||||
} = await createThreeConnectedNodes("server", "server", "server");
|
||||
|
||||
const parentGroup = bobNode.node.createGroup();
|
||||
const childGroup = johnNode.node.createGroup();
|
||||
|
||||
const parentGroupOnJohn = await loadCoValueOrFail(
|
||||
johnNode.node,
|
||||
parentGroup.id,
|
||||
);
|
||||
|
||||
childGroup.extend(parentGroupOnJohn);
|
||||
|
||||
const bob = await loadCoValueOrFail(johnNode.node, bobNode.accountID);
|
||||
const alice = await loadCoValueOrFail(johnNode.node, aliceNode.accountID);
|
||||
childGroup.addMember(alice, "admin");
|
||||
|
||||
const childGroupOnAlice = await loadCoValueOrFail(
|
||||
aliceNode.node,
|
||||
childGroup.id,
|
||||
);
|
||||
|
||||
// `childGroup` no longer has `parentGroup`'s members
|
||||
await childGroupOnAlice.revokeExtend(parentGroup);
|
||||
expect(childGroupOnAlice.roleOf(bob.id)).toBe(undefined);
|
||||
|
||||
const map = childGroupOnAlice.createMap();
|
||||
map.set("test", "Hello!");
|
||||
|
||||
const mapOnBob = await loadCoValueOrFail(bobNode.node, map.id);
|
||||
|
||||
expect(mapOnBob.get("test")).toEqual(undefined);
|
||||
});
|
||||
|
||||
test("should do nothing if applied to a group that is not extended", async () => {
|
||||
const { node1, node2, node3 } = await createThreeConnectedNodes(
|
||||
"server",
|
||||
|
||||
@@ -1982,40 +1982,6 @@ test("Writers, readers and writeOnly can set child extensions", () => {
|
||||
expect(groupAsReader.get(`child_${childGroup.id}`)).toEqual("extend");
|
||||
});
|
||||
|
||||
test("Invitees can not set child extensions", () => {
|
||||
const { group, node } = newGroupHighLevel();
|
||||
const childGroup = node.createGroup();
|
||||
|
||||
const adminInvite = createAccountInNode(node);
|
||||
const writerInvite = createAccountInNode(node);
|
||||
const readerInvite = createAccountInNode(node);
|
||||
|
||||
group.addMember(adminInvite, "adminInvite");
|
||||
group.addMember(writerInvite, "writerInvite");
|
||||
group.addMember(readerInvite, "readerInvite");
|
||||
|
||||
const groupAsAdminInvite = expectGroup(
|
||||
group.core.contentInClonedNodeWithDifferentAccount(adminInvite),
|
||||
);
|
||||
|
||||
groupAsAdminInvite.set(`child_${childGroup.id}`, "extend", "trusting");
|
||||
expect(groupAsAdminInvite.get(`child_${childGroup.id}`)).toBeUndefined();
|
||||
|
||||
const groupAsWriterInvite = expectGroup(
|
||||
group.core.contentInClonedNodeWithDifferentAccount(writerInvite),
|
||||
);
|
||||
|
||||
groupAsWriterInvite.set(`child_${childGroup.id}`, "extend", "trusting");
|
||||
expect(groupAsWriterInvite.get(`child_${childGroup.id}`)).toBeUndefined();
|
||||
|
||||
const groupAsReaderInvite = expectGroup(
|
||||
group.core.contentInClonedNodeWithDifferentAccount(readerInvite),
|
||||
);
|
||||
|
||||
groupAsReaderInvite.set(`child_${childGroup.id}`, "extend", "trusting");
|
||||
expect(groupAsReaderInvite.get(`child_${childGroup.id}`)).toBeUndefined();
|
||||
});
|
||||
|
||||
test("Member roles are inherited by child groups (except invites)", () => {
|
||||
const { group, node, admin } = newGroupHighLevel();
|
||||
const parentGroup = node.createGroup();
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
# jazz-auth-betterauth
|
||||
|
||||
## 0.14.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3d1027f]
|
||||
- Updated dependencies [c240eed]
|
||||
- jazz-tools@0.14.2
|
||||
- jazz-browser@0.14.2
|
||||
- jazz-betterauth-client-plugin@0.14.2
|
||||
|
||||
## 0.14.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "jazz-auth-betterauth",
|
||||
"version": "0.14.1",
|
||||
"version": "0.14.2",
|
||||
"type": "module",
|
||||
"main": "dist/index.js",
|
||||
"types": "src/index.ts",
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# jazz-auth-clerk
|
||||
|
||||
## 0.14.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3d1027f]
|
||||
- Updated dependencies [c240eed]
|
||||
- jazz-tools@0.14.2
|
||||
- jazz-browser@0.14.2
|
||||
|
||||
## 0.14.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
{
|
||||
"name": "jazz-auth-clerk",
|
||||
"version": "0.14.1",
|
||||
"version": "0.14.2",
|
||||
"type": "module",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"cojson": "workspace:0.14.1",
|
||||
"jazz-browser": "workspace:0.14.1",
|
||||
"jazz-tools": "workspace:0.14.1"
|
||||
"jazz-browser": "workspace:0.14.2",
|
||||
"jazz-tools": "workspace:0.14.2"
|
||||
},
|
||||
"scripts": {
|
||||
"format-and-lint": "biome check .",
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# jazz-betterauth-client-plugin
|
||||
|
||||
## 0.14.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-betterauth-server-plugin@0.14.2
|
||||
|
||||
## 0.14.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "jazz-betterauth-client-plugin",
|
||||
"version": "0.14.1",
|
||||
"version": "0.14.2",
|
||||
"type": "module",
|
||||
"main": "dist/index.js",
|
||||
"types": "src/index.ts",
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# jazz-betterauth-server-plugin
|
||||
|
||||
## 0.14.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3d1027f]
|
||||
- Updated dependencies [c240eed]
|
||||
- jazz-tools@0.14.2
|
||||
- jazz-browser@0.14.2
|
||||
|
||||
## 0.14.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "jazz-betterauth-server-plugin",
|
||||
"version": "0.14.1",
|
||||
"version": "0.14.2",
|
||||
"type": "module",
|
||||
"main": "dist/index.js",
|
||||
"types": "src/index.ts",
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# jazz-browser-media-images
|
||||
|
||||
## 0.14.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3d1027f]
|
||||
- Updated dependencies [c240eed]
|
||||
- jazz-tools@0.14.2
|
||||
- jazz-browser@0.14.2
|
||||
|
||||
## 0.14.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "jazz-browser-media-images",
|
||||
"version": "0.14.1",
|
||||
"version": "0.14.2",
|
||||
"type": "module",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
@@ -8,8 +8,8 @@
|
||||
"dependencies": {
|
||||
"@types/image-blob-reduce": "^4.1.1",
|
||||
"image-blob-reduce": "^4.1.0",
|
||||
"jazz-browser": "workspace:0.14.1",
|
||||
"jazz-tools": "workspace:0.14.1",
|
||||
"jazz-browser": "workspace:0.14.2",
|
||||
"jazz-tools": "workspace:0.14.2",
|
||||
"pica": "^9.0.1"
|
||||
},
|
||||
"scripts": {
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
# jazz-browser
|
||||
|
||||
## 0.14.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3d1027f]
|
||||
- Updated dependencies [c240eed]
|
||||
- jazz-tools@0.14.2
|
||||
|
||||
## 0.14.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "jazz-browser",
|
||||
"version": "0.14.1",
|
||||
"version": "0.14.2",
|
||||
"type": "module",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
|
||||
@@ -1,5 +1,16 @@
|
||||
# jazz-browser
|
||||
|
||||
## 0.14.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3d1027f]
|
||||
- Updated dependencies [c240eed]
|
||||
- jazz-tools@0.14.2
|
||||
- jazz-auth-clerk@0.14.2
|
||||
- jazz-react-core@0.14.2
|
||||
- jazz-react-native-core@0.14.2
|
||||
|
||||
## 0.14.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "jazz-expo",
|
||||
"version": "0.14.1",
|
||||
"version": "0.14.2",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.js",
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# jazz-inspector-element
|
||||
|
||||
## 0.14.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3d1027f]
|
||||
- Updated dependencies [c240eed]
|
||||
- jazz-tools@0.14.2
|
||||
- jazz-inspector@0.14.2
|
||||
|
||||
## 0.14.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "jazz-inspector-element",
|
||||
"version": "0.14.1",
|
||||
"version": "0.14.2",
|
||||
"type": "module",
|
||||
"main": "./dist/main.js",
|
||||
"types": "./dist/main.d.ts",
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# jazz-inspector
|
||||
|
||||
## 0.14.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3d1027f]
|
||||
- Updated dependencies [c240eed]
|
||||
- jazz-tools@0.14.2
|
||||
- jazz-react-core@0.14.2
|
||||
|
||||
## 0.14.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "jazz-inspector",
|
||||
"version": "0.14.1",
|
||||
"version": "0.14.2",
|
||||
"type": "module",
|
||||
"main": "./dist/app.js",
|
||||
"types": "./dist/app.d.ts",
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
# jazz-autosub
|
||||
|
||||
## 0.14.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3d1027f]
|
||||
- Updated dependencies [c240eed]
|
||||
- jazz-tools@0.14.2
|
||||
|
||||
## 0.14.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"types": "dist/index.d.ts",
|
||||
"type": "module",
|
||||
"license": "MIT",
|
||||
"version": "0.14.1",
|
||||
"version": "0.14.2",
|
||||
"dependencies": {
|
||||
"cojson": "workspace:*",
|
||||
"cojson-transport-ws": "workspace:*",
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
# jazz-react-auth-betterauth
|
||||
|
||||
## 0.14.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3d1027f]
|
||||
- Updated dependencies [c240eed]
|
||||
- jazz-tools@0.14.2
|
||||
- jazz-auth-betterauth@0.14.2
|
||||
- jazz-browser@0.14.2
|
||||
- jazz-react@0.14.2
|
||||
- jazz-betterauth-client-plugin@0.14.2
|
||||
|
||||
## 0.14.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "jazz-react-auth-betterauth",
|
||||
"version": "0.14.1",
|
||||
"version": "0.14.2",
|
||||
"type": "module",
|
||||
"main": "dist/index.js",
|
||||
"types": "src/index.tsx",
|
||||
|
||||
@@ -1,5 +1,16 @@
|
||||
# jazz-browser-media-images
|
||||
|
||||
## 0.14.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3d1027f]
|
||||
- Updated dependencies [c240eed]
|
||||
- jazz-tools@0.14.2
|
||||
- jazz-auth-clerk@0.14.2
|
||||
- jazz-browser@0.14.2
|
||||
- jazz-react@0.14.2
|
||||
|
||||
## 0.14.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "jazz-react-auth-clerk",
|
||||
"version": "0.14.1",
|
||||
"version": "0.14.2",
|
||||
"type": "module",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
# jazz-react-core
|
||||
|
||||
## 0.14.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3d1027f]
|
||||
- Updated dependencies [c240eed]
|
||||
- jazz-tools@0.14.2
|
||||
|
||||
## 0.14.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "jazz-react-core",
|
||||
"version": "0.14.1",
|
||||
"version": "0.14.2",
|
||||
"type": "module",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# jazz-browser
|
||||
|
||||
## 0.14.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3d1027f]
|
||||
- Updated dependencies [c240eed]
|
||||
- jazz-tools@0.14.2
|
||||
- jazz-react-core@0.14.2
|
||||
|
||||
## 0.14.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "jazz-react-native-core",
|
||||
"type": "module",
|
||||
"version": "0.14.1",
|
||||
"version": "0.14.2",
|
||||
"license": "MIT",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.js",
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
# jazz-browser-media-images
|
||||
|
||||
## 0.14.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3d1027f]
|
||||
- Updated dependencies [c240eed]
|
||||
- jazz-tools@0.14.2
|
||||
|
||||
## 0.14.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "jazz-react-native-media-images",
|
||||
"version": "0.14.1",
|
||||
"version": "0.14.2",
|
||||
"type": "module",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# jazz-browser
|
||||
|
||||
## 0.14.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3d1027f]
|
||||
- Updated dependencies [c240eed]
|
||||
- jazz-tools@0.14.2
|
||||
- jazz-react-native-core@0.14.2
|
||||
|
||||
## 0.14.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "jazz-react-native",
|
||||
"version": "0.14.1",
|
||||
"version": "0.14.2",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.js",
|
||||
|
||||
@@ -1,5 +1,16 @@
|
||||
# jazz-react
|
||||
|
||||
## 0.14.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3d1027f]
|
||||
- Updated dependencies [c240eed]
|
||||
- jazz-tools@0.14.2
|
||||
- jazz-browser@0.14.2
|
||||
- jazz-browser-media-images@0.14.2
|
||||
- jazz-react-core@0.14.2
|
||||
|
||||
## 0.14.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "jazz-react",
|
||||
"version": "0.14.1",
|
||||
"version": "0.14.2",
|
||||
"type": "module",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
@@ -18,10 +18,10 @@
|
||||
"dependencies": {
|
||||
"@scure/bip39": "^1.3.0",
|
||||
"cojson": "workspace:0.14.1",
|
||||
"jazz-browser-media-images": "workspace:0.14.1",
|
||||
"jazz-browser": "workspace:0.14.1",
|
||||
"jazz-react-core": "workspace:0.14.1",
|
||||
"jazz-tools": "workspace:0.14.1"
|
||||
"jazz-browser-media-images": "workspace:0.14.2",
|
||||
"jazz-browser": "workspace:0.14.2",
|
||||
"jazz-react-core": "workspace:0.14.2",
|
||||
"jazz-tools": "workspace:0.14.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@testing-library/dom": "^10.4.0",
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# jazz-richtext-prosemirror
|
||||
|
||||
## 0.1.22
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3d1027f]
|
||||
- Updated dependencies [c240eed]
|
||||
- jazz-tools@0.14.2
|
||||
- jazz-browser@0.14.2
|
||||
|
||||
## 0.1.21
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "jazz-richtext-prosemirror",
|
||||
"version": "0.1.21",
|
||||
"version": "0.1.22",
|
||||
"description": "ProseMirror integration for Jazz rich text editing",
|
||||
"main": "dist/index.js",
|
||||
"types": "src/index.ts",
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
# jazz-richtext-tiptap
|
||||
|
||||
## 0.1.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3d1027f]
|
||||
- Updated dependencies [c240eed]
|
||||
- jazz-tools@0.14.2
|
||||
- jazz-browser@0.14.2
|
||||
- jazz-richtext-prosemirror@0.1.22
|
||||
|
||||
## 0.1.10
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "jazz-richtext-tiptap",
|
||||
"version": "0.1.10",
|
||||
"version": "0.1.11",
|
||||
"description": "Tiptap integration for Jazz rich text editing",
|
||||
"main": "dist/index.js",
|
||||
"types": "src/index.ts",
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
# jazz-run
|
||||
|
||||
## 0.14.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3d1027f]
|
||||
- Updated dependencies [c240eed]
|
||||
- jazz-tools@0.14.2
|
||||
|
||||
## 0.14.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"bin": "./dist/index.js",
|
||||
"type": "module",
|
||||
"license": "MIT",
|
||||
"version": "0.14.1",
|
||||
"version": "0.14.2",
|
||||
"exports": {
|
||||
"./startSyncServer": {
|
||||
"import": "./dist/startSyncServer.js",
|
||||
@@ -32,7 +32,7 @@
|
||||
"cojson-storage-sqlite": "workspace:0.14.1",
|
||||
"cojson-transport-ws": "workspace:0.14.1",
|
||||
"effect": "^3.6.5",
|
||||
"jazz-tools": "workspace:0.14.1",
|
||||
"jazz-tools": "workspace:0.14.2",
|
||||
"ws": "^8.14.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# jazz-svelte
|
||||
|
||||
## 0.14.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3d1027f]
|
||||
- Updated dependencies [c240eed]
|
||||
- jazz-tools@0.14.2
|
||||
- jazz-browser@0.14.2
|
||||
|
||||
## 0.14.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user