Compare commits

..

8 Commits

Author SHA1 Message Date
Guido D'Orsi
469ac44ff5 Merge pull request #2548 from garden-co/changeset-release/main
Version Packages
2025-06-17 18:46:02 +02:00
github-actions[bot]
ea0045580c Version Packages 2025-06-17 16:45:11 +00:00
Guido D'Orsi
b84bf1826b Merge pull request #2547 from garden-co/feat/load-fileStream
fix: resolve FileStream.load only when the file is fully loaded
2025-06-17 18:41:31 +02:00
Guido D'Orsi
a4fb2edfc2 fix: pin biome version to 1.9.4 2025-06-17 18:35:40 +02:00
Guido D'Orsi
06c5a1c2ba fix: resolve FileStream.load only when the file is fully loaded 2025-06-17 18:30:30 +02:00
Guido D'Orsi
b85423b39f Merge pull request #2546 from garden-co/changeset-release/main
Version Packages
2025-06-17 18:15:58 +02:00
github-actions[bot]
b698ffbf45 Version Packages 2025-06-17 16:03:38 +00:00
Guido D'Orsi
a026073c41 fix: export CoRecordSchema & CoProfileSchema types 2025-06-17 18:00:03 +02:00
67 changed files with 676 additions and 84 deletions

View File

@@ -13,7 +13,7 @@ jobs:
- name: Setup Biome
uses: biomejs/setup-biome@v2
with:
version: latest
version: 1.9.4
- name: Run Biome
run: biome ci .

View File

@@ -1,5 +1,23 @@
# passkey-svelte
## 0.0.88
### Patch Changes
- Updated dependencies [06c5a1c]
- jazz-tools@0.14.28
- jazz-browser-media-images@0.14.28
- jazz-svelte@0.14.28
## 0.0.87
### Patch Changes
- Updated dependencies [a026073]
- jazz-tools@0.14.27
- jazz-browser-media-images@0.14.27
- jazz-svelte@0.14.27
## 0.0.86
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "chat-svelte",
"version": "0.0.86",
"version": "0.0.88",
"type": "module",
"private": true,
"scripts": {

View File

@@ -1,5 +1,19 @@
# cojson-storage-indexeddb
## 0.14.28
### Patch Changes
- cojson@0.14.28
- cojson-storage@0.14.28
## 0.14.27
### Patch Changes
- cojson@0.14.27
- cojson-storage@0.14.27
## 0.14.26
### Patch Changes

View File

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

View File

@@ -1,5 +1,19 @@
# cojson-storage-sqlite
## 0.14.28
### Patch Changes
- cojson@0.14.28
- cojson-storage@0.14.28
## 0.14.27
### Patch Changes
- cojson@0.14.27
- cojson-storage@0.14.27
## 0.14.26
### Patch Changes

View File

@@ -1,13 +1,13 @@
{
"name": "cojson-storage-sqlite",
"type": "module",
"version": "0.14.26",
"version": "0.14.28",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"license": "MIT",
"dependencies": {
"better-sqlite3": "^11.7.0",
"cojson": "workspace:0.14.26",
"cojson": "workspace:0.14.28",
"cojson-storage": "workspace:*"
},
"devDependencies": {

View File

@@ -1,5 +1,17 @@
# cojson-storage
## 0.14.28
### Patch Changes
- cojson@0.14.28
## 0.14.27
### Patch Changes
- cojson@0.14.27
## 0.14.26
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "cojson-storage",
"version": "0.14.26",
"version": "0.14.28",
"main": "dist/index.js",
"type": "module",
"types": "dist/index.d.ts",

View File

@@ -1,5 +1,17 @@
# cojson-transport-nodejs-ws
## 0.14.28
### Patch Changes
- cojson@0.14.28
## 0.14.27
### Patch Changes
- cojson@0.14.27
## 0.14.26
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "cojson-transport-ws",
"type": "module",
"version": "0.14.26",
"version": "0.14.28",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"license": "MIT",

View File

@@ -1,5 +1,9 @@
# cojson
## 0.14.28
## 0.14.27
## 0.14.26
### Patch Changes

View File

@@ -25,7 +25,7 @@
},
"type": "module",
"license": "MIT",
"version": "0.14.26",
"version": "0.14.28",
"devDependencies": {
"@opentelemetry/sdk-metrics": "^2.0.0",
"typescript": "catalog:"

View File

@@ -1,5 +1,25 @@
# jazz-auth-betterauth
## 0.14.28
### Patch Changes
- Updated dependencies [06c5a1c]
- jazz-tools@0.14.28
- jazz-browser@0.14.28
- jazz-betterauth-client-plugin@0.14.28
- cojson@0.14.28
## 0.14.27
### Patch Changes
- Updated dependencies [a026073]
- jazz-tools@0.14.27
- jazz-browser@0.14.27
- jazz-betterauth-client-plugin@0.14.27
- cojson@0.14.27
## 0.14.26
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "jazz-auth-betterauth",
"version": "0.14.26",
"version": "0.14.28",
"type": "module",
"main": "dist/index.js",
"types": "src/index.ts",

View File

@@ -1,5 +1,23 @@
# jazz-auth-clerk
## 0.14.28
### Patch Changes
- Updated dependencies [06c5a1c]
- jazz-tools@0.14.28
- jazz-browser@0.14.28
- cojson@0.14.28
## 0.14.27
### Patch Changes
- Updated dependencies [a026073]
- jazz-tools@0.14.27
- jazz-browser@0.14.27
- cojson@0.14.27
## 0.14.26
### Patch Changes

View File

@@ -1,14 +1,14 @@
{
"name": "jazz-auth-clerk",
"version": "0.14.26",
"version": "0.14.28",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"license": "MIT",
"dependencies": {
"cojson": "workspace:0.14.26",
"jazz-browser": "workspace:0.14.26",
"jazz-tools": "workspace:0.14.26"
"cojson": "workspace:0.14.28",
"jazz-browser": "workspace:0.14.28",
"jazz-tools": "workspace:0.14.28"
},
"scripts": {
"format-and-lint": "biome check .",

View File

@@ -1,5 +1,17 @@
# jazz-betterauth-client-plugin
## 0.14.28
### Patch Changes
- jazz-betterauth-server-plugin@0.14.28
## 0.14.27
### Patch Changes
- jazz-betterauth-server-plugin@0.14.27
## 0.14.26
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "jazz-betterauth-client-plugin",
"version": "0.14.26",
"version": "0.14.28",
"type": "module",
"main": "dist/index.js",
"types": "src/index.ts",

View File

@@ -1,5 +1,23 @@
# jazz-betterauth-server-plugin
## 0.14.28
### Patch Changes
- Updated dependencies [06c5a1c]
- jazz-tools@0.14.28
- jazz-browser@0.14.28
- cojson@0.14.28
## 0.14.27
### Patch Changes
- Updated dependencies [a026073]
- jazz-tools@0.14.27
- jazz-browser@0.14.27
- cojson@0.14.27
## 0.14.26
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "jazz-betterauth-server-plugin",
"version": "0.14.26",
"version": "0.14.28",
"type": "module",
"main": "dist/index.js",
"types": "src/index.ts",

View File

@@ -1,5 +1,21 @@
# jazz-browser-media-images
## 0.14.28
### Patch Changes
- Updated dependencies [06c5a1c]
- jazz-tools@0.14.28
- jazz-browser@0.14.28
## 0.14.27
### Patch Changes
- Updated dependencies [a026073]
- jazz-tools@0.14.27
- jazz-browser@0.14.27
## 0.14.26
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "jazz-browser-media-images",
"version": "0.14.26",
"version": "0.14.28",
"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.26",
"jazz-tools": "workspace:0.14.26",
"jazz-browser": "workspace:0.14.28",
"jazz-tools": "workspace:0.14.28",
"pica": "^9.0.1"
},
"scripts": {

View File

@@ -1,5 +1,25 @@
# jazz-browser
## 0.14.28
### Patch Changes
- Updated dependencies [06c5a1c]
- jazz-tools@0.14.28
- cojson@0.14.28
- cojson-storage-indexeddb@0.14.28
- cojson-transport-ws@0.14.28
## 0.14.27
### Patch Changes
- Updated dependencies [a026073]
- jazz-tools@0.14.27
- cojson@0.14.27
- cojson-storage-indexeddb@0.14.27
- cojson-transport-ws@0.14.27
## 0.14.26
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "jazz-browser",
"version": "0.14.26",
"version": "0.14.28",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",

View File

@@ -1,5 +1,29 @@
# jazz-browser
## 0.14.28
### Patch Changes
- Updated dependencies [06c5a1c]
- jazz-tools@0.14.28
- jazz-auth-clerk@0.14.28
- jazz-react-core@0.14.28
- jazz-react-native-core@0.14.28
- cojson@0.14.28
- cojson-transport-ws@0.14.28
## 0.14.27
### Patch Changes
- Updated dependencies [a026073]
- jazz-tools@0.14.27
- jazz-auth-clerk@0.14.27
- jazz-react-core@0.14.27
- jazz-react-native-core@0.14.27
- cojson@0.14.27
- cojson-transport-ws@0.14.27
## 0.14.26
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "jazz-expo",
"version": "0.14.26",
"version": "0.14.28",
"type": "module",
"main": "./dist/index.js",
"module": "./dist/index.js",

View File

@@ -1,5 +1,21 @@
# jazz-inspector-element
## 0.14.28
### Patch Changes
- Updated dependencies [06c5a1c]
- jazz-tools@0.14.28
- jazz-inspector@0.14.28
## 0.14.27
### Patch Changes
- Updated dependencies [a026073]
- jazz-tools@0.14.27
- jazz-inspector@0.14.27
## 0.14.26
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "jazz-inspector-element",
"version": "0.14.26",
"version": "0.14.28",
"type": "module",
"main": "./dist/main.js",
"types": "./dist/main.d.ts",

View File

@@ -1,5 +1,23 @@
# jazz-inspector
## 0.14.28
### Patch Changes
- Updated dependencies [06c5a1c]
- jazz-tools@0.14.28
- jazz-react-core@0.14.28
- cojson@0.14.28
## 0.14.27
### Patch Changes
- Updated dependencies [a026073]
- jazz-tools@0.14.27
- jazz-react-core@0.14.27
- cojson@0.14.27
## 0.14.26
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "jazz-inspector",
"version": "0.14.26",
"version": "0.14.28",
"type": "module",
"main": "./dist/app.js",
"types": "./dist/app.d.ts",

View File

@@ -1,5 +1,23 @@
# jazz-autosub
## 0.14.28
### Patch Changes
- Updated dependencies [06c5a1c]
- jazz-tools@0.14.28
- cojson@0.14.28
- cojson-transport-ws@0.14.28
## 0.14.27
### Patch Changes
- Updated dependencies [a026073]
- jazz-tools@0.14.27
- cojson@0.14.27
- cojson-transport-ws@0.14.27
## 0.14.26
### Patch Changes

View File

@@ -5,7 +5,7 @@
"types": "dist/index.d.ts",
"type": "module",
"license": "MIT",
"version": "0.14.26",
"version": "0.14.28",
"dependencies": {
"cojson": "workspace:*",
"cojson-transport-ws": "workspace:*",

View File

@@ -1,5 +1,29 @@
# jazz-react-auth-betterauth
## 0.14.28
### Patch Changes
- Updated dependencies [06c5a1c]
- jazz-tools@0.14.28
- jazz-auth-betterauth@0.14.28
- jazz-browser@0.14.28
- jazz-react@0.14.28
- jazz-betterauth-client-plugin@0.14.28
- cojson@0.14.28
## 0.14.27
### Patch Changes
- Updated dependencies [a026073]
- jazz-tools@0.14.27
- jazz-auth-betterauth@0.14.27
- jazz-browser@0.14.27
- jazz-react@0.14.27
- jazz-betterauth-client-plugin@0.14.27
- cojson@0.14.27
## 0.14.26
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "jazz-react-auth-betterauth",
"version": "0.14.26",
"version": "0.14.28",
"type": "module",
"main": "dist/index.js",
"types": "src/index.tsx",

View File

@@ -1,5 +1,27 @@
# jazz-browser-media-images
## 0.14.28
### Patch Changes
- Updated dependencies [06c5a1c]
- jazz-tools@0.14.28
- jazz-auth-clerk@0.14.28
- jazz-browser@0.14.28
- jazz-react@0.14.28
- cojson@0.14.28
## 0.14.27
### Patch Changes
- Updated dependencies [a026073]
- jazz-tools@0.14.27
- jazz-auth-clerk@0.14.27
- jazz-browser@0.14.27
- jazz-react@0.14.27
- cojson@0.14.27
## 0.14.26
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "jazz-react-auth-clerk",
"version": "0.14.26",
"version": "0.14.28",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",

View File

@@ -1,5 +1,21 @@
# jazz-react-core
## 0.14.28
### Patch Changes
- Updated dependencies [06c5a1c]
- jazz-tools@0.14.28
- cojson@0.14.28
## 0.14.27
### Patch Changes
- Updated dependencies [a026073]
- jazz-tools@0.14.27
- cojson@0.14.27
## 0.14.26
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "jazz-react-core",
"version": "0.14.26",
"version": "0.14.28",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",

View File

@@ -1,5 +1,27 @@
# jazz-browser
## 0.14.28
### Patch Changes
- Updated dependencies [06c5a1c]
- jazz-tools@0.14.28
- jazz-react-core@0.14.28
- cojson@0.14.28
- cojson-storage@0.14.28
- cojson-transport-ws@0.14.28
## 0.14.27
### Patch Changes
- Updated dependencies [a026073]
- jazz-tools@0.14.27
- jazz-react-core@0.14.27
- cojson@0.14.27
- cojson-storage@0.14.27
- cojson-transport-ws@0.14.27
## 0.14.26
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "jazz-react-native-core",
"type": "module",
"version": "0.14.26",
"version": "0.14.28",
"license": "MIT",
"main": "./dist/index.js",
"module": "./dist/index.js",

View File

@@ -1,5 +1,19 @@
# jazz-browser-media-images
## 0.14.28
### Patch Changes
- Updated dependencies [06c5a1c]
- jazz-tools@0.14.28
## 0.14.27
### Patch Changes
- Updated dependencies [a026073]
- jazz-tools@0.14.27
## 0.14.26
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "jazz-react-native-media-images",
"version": "0.14.26",
"version": "0.14.28",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",

View File

@@ -1,5 +1,25 @@
# jazz-browser
## 0.14.28
### Patch Changes
- Updated dependencies [06c5a1c]
- jazz-tools@0.14.28
- jazz-react-native-core@0.14.28
- cojson@0.14.28
- cojson-storage@0.14.28
## 0.14.27
### Patch Changes
- Updated dependencies [a026073]
- jazz-tools@0.14.27
- jazz-react-native-core@0.14.27
- cojson@0.14.27
- cojson-storage@0.14.27
## 0.14.26
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "jazz-react-native",
"version": "0.14.26",
"version": "0.14.28",
"type": "module",
"main": "./dist/index.js",
"module": "./dist/index.js",

View File

@@ -1,5 +1,29 @@
# jazz-react
## 0.14.28
### Patch Changes
- Updated dependencies [06c5a1c]
- jazz-tools@0.14.28
- jazz-browser@0.14.28
- jazz-browser-media-images@0.14.28
- jazz-react-core@0.14.28
- cojson@0.14.28
- cojson-transport-ws@0.14.28
## 0.14.27
### Patch Changes
- Updated dependencies [a026073]
- jazz-tools@0.14.27
- jazz-browser@0.14.27
- jazz-browser-media-images@0.14.27
- jazz-react-core@0.14.27
- cojson@0.14.27
- cojson-transport-ws@0.14.27
## 0.14.26
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "jazz-react",
"version": "0.14.26",
"version": "0.14.28",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
@@ -23,10 +23,10 @@
"@scure/bip39": "^1.3.0",
"cojson": "workspace:*",
"cojson-transport-ws": "workspace:*",
"jazz-browser-media-images": "workspace:0.14.26",
"jazz-browser": "workspace:0.14.26",
"jazz-react-core": "workspace:0.14.26",
"jazz-tools": "workspace:0.14.26"
"jazz-browser-media-images": "workspace:0.14.28",
"jazz-browser": "workspace:0.14.28",
"jazz-react-core": "workspace:0.14.28",
"jazz-tools": "workspace:0.14.28"
},
"devDependencies": {
"@testing-library/dom": "^10.4.0",

View File

@@ -1,5 +1,21 @@
# jazz-richtext-prosemirror
## 0.14.28
### Patch Changes
- Updated dependencies [06c5a1c]
- jazz-tools@0.14.28
- jazz-browser@0.14.28
## 0.14.27
### Patch Changes
- Updated dependencies [a026073]
- jazz-tools@0.14.27
- jazz-browser@0.14.27
## 0.14.26
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "jazz-richtext-prosemirror",
"version": "0.14.26",
"version": "0.14.28",
"description": "ProseMirror integration for Jazz rich text editing",
"main": "dist/index.js",
"types": "src/index.ts",

View File

@@ -1,5 +1,23 @@
# jazz-richtext-tiptap
## 0.14.28
### Patch Changes
- Updated dependencies [06c5a1c]
- jazz-tools@0.14.28
- jazz-browser@0.14.28
- jazz-richtext-prosemirror@0.14.28
## 0.14.27
### Patch Changes
- Updated dependencies [a026073]
- jazz-tools@0.14.27
- jazz-browser@0.14.27
- jazz-richtext-prosemirror@0.14.27
## 0.14.26
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "jazz-richtext-tiptap",
"version": "0.14.26",
"version": "0.14.28",
"description": "Tiptap integration for Jazz rich text editing",
"main": "dist/index.js",
"types": "src/index.ts",

View File

@@ -1,5 +1,25 @@
# jazz-run
## 0.14.28
### Patch Changes
- Updated dependencies [06c5a1c]
- jazz-tools@0.14.28
- cojson@0.14.28
- cojson-storage-sqlite@0.14.28
- cojson-transport-ws@0.14.28
## 0.14.27
### Patch Changes
- Updated dependencies [a026073]
- jazz-tools@0.14.27
- cojson@0.14.27
- cojson-storage-sqlite@0.14.27
- cojson-transport-ws@0.14.27
## 0.14.26
### Patch Changes

View File

@@ -3,7 +3,7 @@
"bin": "./dist/index.js",
"type": "module",
"license": "MIT",
"version": "0.14.26",
"version": "0.14.28",
"exports": {
"./startSyncServer": {
"import": "./dist/startSyncServer.js",
@@ -28,11 +28,11 @@
"@effect/printer-ansi": "^0.34.5",
"@effect/schema": "^0.71.1",
"@effect/typeclass": "^0.25.5",
"cojson": "workspace:0.14.26",
"cojson-storage-sqlite": "workspace:0.14.26",
"cojson-transport-ws": "workspace:0.14.26",
"cojson": "workspace:0.14.28",
"cojson-storage-sqlite": "workspace:0.14.28",
"cojson-transport-ws": "workspace:0.14.28",
"effect": "^3.6.5",
"jazz-tools": "workspace:0.14.26",
"jazz-tools": "workspace:0.14.28",
"ws": "^8.14.2"
},
"devDependencies": {

View File

@@ -1,5 +1,23 @@
# jazz-svelte
## 0.14.28
### Patch Changes
- Updated dependencies [06c5a1c]
- jazz-tools@0.14.28
- jazz-browser@0.14.28
- cojson@0.14.28
## 0.14.27
### Patch Changes
- Updated dependencies [a026073]
- jazz-tools@0.14.27
- jazz-browser@0.14.27
- cojson@0.14.27
## 0.14.26
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "jazz-svelte",
"version": "0.14.26",
"version": "0.14.28",
"scripts": {
"dev": "vite dev",
"build": "vite build && npm run package",

View File

@@ -1,5 +1,19 @@
# jazz-tools
## 0.14.28
### Patch Changes
- 06c5a1c: Resolve FileStream.load() only when the stream is fully downloaded
- cojson@0.14.28
## 0.14.27
### Patch Changes
- a026073: Export CoRecordSchema & CoProfileSchema types
- cojson@0.14.27
## 0.14.26
### Patch Changes

View File

@@ -17,7 +17,7 @@
},
"type": "module",
"license": "MIT",
"version": "0.14.26",
"version": "0.14.28",
"dependencies": {
"@scure/bip39": "^1.3.0",
"cojson": "workspace:*",

View File

@@ -769,26 +769,6 @@ export class FileStream extends CoValueBase implements CoValue {
): Promise<Blob | undefined> {
let stream = await this.load(id, options);
/**
* If the user hasn't requested an incomplete blob and the
* stream isn't complete wait for the stream download before progressing
*/
if (!options?.allowUnfinished && !stream?.isBinaryStreamEnded()) {
stream = await new Promise<FileStream>((resolve) => {
subscribeToCoValueWithoutMe(
this,
id,
options || {},
(value, unsubscribe) => {
if (value.isBinaryStreamEnded()) {
unsubscribe();
resolve(value);
}
},
);
});
}
return stream?.toBlob({
allowUnfinished: options?.allowUnfinished,
});
@@ -884,12 +864,37 @@ export class FileStream extends CoValueBase implements CoValue {
* Load a `FileStream`
* @category Subscription & Loading
*/
static load<C extends FileStream>(
static async load<C extends FileStream>(
this: CoValueClass<C>,
id: ID<C>,
options?: { loadAs?: Account | AnonymousJazzAgent },
): Promise<Resolved<C, true> | null> {
return loadCoValueWithoutMe(this, id, options);
options?: {
loadAs?: Account | AnonymousJazzAgent;
allowUnfinished?: boolean;
},
): Promise<FileStream | null> {
const stream = await loadCoValueWithoutMe(this, id, options);
/**
* If the user hasn't requested an incomplete blob and the
* stream isn't complete wait for the stream download before progressing
*/
if (!options?.allowUnfinished && !stream?.isBinaryStreamEnded()) {
return new Promise<FileStream>((resolve) => {
subscribeToCoValueWithoutMe(
this,
id,
options || {},
(value, unsubscribe) => {
if (value.isBinaryStreamEnded()) {
unsubscribe();
resolve(value);
}
},
);
});
}
return stream;
}
/**

View File

@@ -103,4 +103,6 @@ export {
type ResolveQuery,
type ResolveQueryStrict,
type InitFor,
type CoRecordSchema,
type CoProfileSchema,
} from "./internal.js";

View File

@@ -589,6 +589,55 @@ describe("FileStream loading & Subscription", async () => {
});
});
describe("FileStream.load", async () => {
async function setup() {
const me = await Account.create({
creationProps: { name: "Hermes Puggington" },
crypto: Crypto,
});
const stream = FileStream.create({ owner: me });
stream.start({ mimeType: "text/plain" });
return { stream, me };
}
test("resolves only when the stream is ended", async () => {
const { stream, me } = await setup();
stream.push(new Uint8Array([1]));
const promise = FileStream.load(stream.id, { loadAs: me });
stream.push(new Uint8Array([2]));
stream.end();
const blob = await promise;
// The promise resolves only when the stream is ended
// so we get a blob with all the chunks
expect(blob?.getChunks()?.finished).toBe(true);
});
test("resolves with an unfinshed blob if allowUnfinished: true", async () => {
const { stream, me } = await setup();
stream.push(new Uint8Array([1]));
const promise = FileStream.load(stream.id, {
loadAs: me,
allowUnfinished: true,
});
const blob = await promise;
stream.push(new Uint8Array([2]));
// The promise resolves before the stream is ended
// so we get a blob only with the first chunk
expect(blob?.getChunks({ allowUnfinished: true })?.finished).toBe(false);
});
});
describe("FileStream.loadAsBlob", async () => {
async function setup() {
const me = await Account.create({

View File

@@ -1,5 +1,23 @@
# jazz-react
## 0.14.28
### Patch Changes
- Updated dependencies [06c5a1c]
- jazz-tools@0.14.28
- jazz-browser@0.14.28
- cojson@0.14.28
## 0.14.27
### Patch Changes
- Updated dependencies [a026073]
- jazz-tools@0.14.27
- jazz-browser@0.14.27
- cojson@0.14.27
## 0.14.26
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "jazz-vue",
"version": "0.14.26",
"version": "0.14.28",
"type": "module",
"main": "dist/index.js",
"types": "src/index.ts",

28
pnpm-lock.yaml generated
View File

@@ -2263,7 +2263,7 @@ importers:
specifier: ^11.7.0
version: 11.7.0
cojson:
specifier: workspace:0.14.26
specifier: workspace:0.14.28
version: link:../cojson
cojson-storage:
specifier: workspace:*
@@ -2362,13 +2362,13 @@ importers:
packages/jazz-auth-clerk:
dependencies:
cojson:
specifier: workspace:0.14.26
specifier: workspace:0.14.28
version: link:../cojson
jazz-browser:
specifier: workspace:0.14.26
specifier: workspace:0.14.28
version: link:../jazz-browser
jazz-tools:
specifier: workspace:0.14.26
specifier: workspace:0.14.28
version: link:../jazz-tools
devDependencies:
typescript:
@@ -2444,10 +2444,10 @@ importers:
specifier: ^4.1.0
version: 4.1.0
jazz-browser:
specifier: workspace:0.14.26
specifier: workspace:0.14.28
version: link:../jazz-browser
jazz-tools:
specifier: workspace:0.14.26
specifier: workspace:0.14.28
version: link:../jazz-tools
pica:
specifier: ^9.0.1
@@ -2608,16 +2608,16 @@ importers:
specifier: workspace:*
version: link:../cojson-transport-ws
jazz-browser:
specifier: workspace:0.14.26
specifier: workspace:0.14.28
version: link:../jazz-browser
jazz-browser-media-images:
specifier: workspace:0.14.26
specifier: workspace:0.14.28
version: link:../jazz-browser-media-images
jazz-react-core:
specifier: workspace:0.14.26
specifier: workspace:0.14.28
version: link:../jazz-react-core
jazz-tools:
specifier: workspace:0.14.26
specifier: workspace:0.14.28
version: link:../jazz-tools
devDependencies:
'@testing-library/dom':
@@ -2941,19 +2941,19 @@ importers:
specifier: ^0.25.5
version: 0.25.8(effect@3.11.9)
cojson:
specifier: workspace:0.14.26
specifier: workspace:0.14.28
version: link:../cojson
cojson-storage-sqlite:
specifier: workspace:0.14.26
specifier: workspace:0.14.28
version: link:../cojson-storage-sqlite
cojson-transport-ws:
specifier: workspace:0.14.26
specifier: workspace:0.14.28
version: link:../cojson-transport-ws
effect:
specifier: ^3.6.5
version: 3.11.9
jazz-tools:
specifier: workspace:0.14.26
specifier: workspace:0.14.28
version: link:../jazz-tools
ws:
specifier: ^8.14.2

View File

@@ -1,5 +1,23 @@
# jazz-react-tailwind-starter
## 0.0.119
### Patch Changes
- Updated dependencies [06c5a1c]
- jazz-tools@0.14.28
- jazz-inspector@0.14.28
- jazz-react@0.14.28
## 0.0.118
### Patch Changes
- Updated dependencies [a026073]
- jazz-tools@0.14.27
- jazz-inspector@0.14.27
- jazz-react@0.14.27
## 0.0.117
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "jazz-react-tailwind-starter",
"private": true,
"version": "0.0.117",
"version": "0.0.119",
"type": "module",
"scripts": {
"dev": "vite",

View File

@@ -1,5 +1,23 @@
# svelte-passkey-auth
## 0.0.93
### Patch Changes
- Updated dependencies [06c5a1c]
- jazz-tools@0.14.28
- jazz-inspector-element@0.14.28
- jazz-svelte@0.14.28
## 0.0.92
### Patch Changes
- Updated dependencies [a026073]
- jazz-tools@0.14.27
- jazz-inspector-element@0.14.27
- jazz-svelte@0.14.27
## 0.0.91
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "svelte-passkey-auth",
"version": "0.0.91",
"version": "0.0.93",
"type": "module",
"private": true,
"scripts": {