@blocksuite/sync
Advanced tools
Comparing version 0.13.0-canary-202403080648-55b867a to 0.13.0-canary-202403090414-5dad4e2
@@ -9,3 +9,3 @@ import { type DBSchema, type IDBPDatabase } from 'idb'; | ||
}; | ||
type WorkspacePersist = { | ||
type DocCollectionPersist = { | ||
id: string; | ||
@@ -15,5 +15,5 @@ updates: UpdateMessage[]; | ||
interface BlockSuiteBinaryDB extends DBSchema { | ||
workspace: { | ||
collection: { | ||
key: string; | ||
value: WorkspacePersist; | ||
value: DocCollectionPersist; | ||
}; | ||
@@ -20,0 +20,0 @@ } |
@@ -6,3 +6,3 @@ import { openDB } from 'idb'; | ||
export function upgradeDB(db) { | ||
db.createObjectStore('workspace', { keyPath: 'id' }); | ||
db.createObjectStore('collection', { keyPath: 'id' }); | ||
} | ||
@@ -29,4 +29,4 @@ export class IndexedDBDocSource { | ||
const store = db | ||
.transaction('workspace', 'readonly') | ||
.objectStore('workspace'); | ||
.transaction('collection', 'readonly') | ||
.objectStore('collection'); | ||
const data = await store.get(docId); | ||
@@ -44,4 +44,4 @@ if (!data) { | ||
const store = db | ||
.transaction('workspace', 'readwrite') | ||
.objectStore('workspace'); | ||
.transaction('collection', 'readwrite') | ||
.objectStore('collection'); | ||
const { updates } = (await store.get(docId)) ?? { updates: [] }; | ||
@@ -48,0 +48,0 @@ let rows = [ |
{ | ||
"name": "@blocksuite/sync", | ||
"version": "0.13.0-canary-202403080648-55b867a", | ||
"version": "0.13.0-canary-202403090414-5dad4e2", | ||
"description": "BlockSuite data synchronization engine abstraction and implementation.", | ||
@@ -13,3 +13,3 @@ "type": "module", | ||
"idb": "^8.0.0", | ||
"@blocksuite/global": "0.13.0-canary-202403080648-55b867a" | ||
"@blocksuite/global": "0.13.0-canary-202403090414-5dad4e2" | ||
}, | ||
@@ -16,0 +16,0 @@ "devDependencies": {}, |
@@ -14,3 +14,3 @@ import { type DBSchema, type IDBPDatabase, openDB } from 'idb'; | ||
type WorkspacePersist = { | ||
type DocCollectionPersist = { | ||
id: string; | ||
@@ -21,5 +21,5 @@ updates: UpdateMessage[]; | ||
interface BlockSuiteBinaryDB extends DBSchema { | ||
workspace: { | ||
collection: { | ||
key: string; | ||
value: WorkspacePersist; | ||
value: DocCollectionPersist; | ||
}; | ||
@@ -29,3 +29,3 @@ } | ||
export function upgradeDB(db: IDBPDatabase<BlockSuiteBinaryDB>) { | ||
db.createObjectStore('workspace', { keyPath: 'id' }); | ||
db.createObjectStore('collection', { keyPath: 'id' }); | ||
} | ||
@@ -62,4 +62,4 @@ | ||
const store = db | ||
.transaction('workspace', 'readonly') | ||
.objectStore('workspace'); | ||
.transaction('collection', 'readonly') | ||
.objectStore('collection'); | ||
const data = await store.get(docId); | ||
@@ -82,4 +82,4 @@ | ||
const store = db | ||
.transaction('workspace', 'readwrite') | ||
.objectStore('workspace'); | ||
.transaction('collection', 'readwrite') | ||
.objectStore('collection'); | ||
@@ -86,0 +86,0 @@ const { updates } = (await store.get(docId)) ?? { updates: [] }; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
143738
+ Added@blocksuite/global@0.13.0-canary-202403090414-5dad4e2(transitive)
- Removed@blocksuite/global@0.13.0-canary-202403080648-55b867a(transitive)
Updated@blocksuite/global@0.13.0-canary-202403090414-5dad4e2