@automerge/automerge-repo 1.0.7 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/DocHandle.d.ts +1 -1
- package/dist/DocHandle.d.ts.map +1 -1
- package/dist/DocHandle.js +2 -2
- package/dist/DocUrl.d.ts.map +1 -1
- package/dist/Repo.d.ts +6 -3
- package/dist/Repo.d.ts.map +1 -1
- package/dist/Repo.js +13 -8
- package/dist/helpers/debounce.d.ts +14 -0
- package/dist/helpers/debounce.d.ts.map +1 -0
- package/dist/helpers/debounce.js +21 -0
- package/dist/helpers/throttle.d.ts +28 -0
- package/dist/helpers/throttle.d.ts.map +1 -0
- package/dist/helpers/throttle.js +39 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/network/NetworkSubsystem.d.ts +1 -1
- package/dist/network/NetworkSubsystem.d.ts.map +1 -1
- package/dist/storage/StorageSubsystem.d.ts +1 -1
- package/dist/storage/StorageSubsystem.d.ts.map +1 -1
- package/dist/storage/StorageSubsystem.js +2 -2
- package/dist/synchronizer/CollectionSynchronizer.d.ts +1 -1
- package/dist/synchronizer/CollectionSynchronizer.d.ts.map +1 -1
- package/dist/synchronizer/CollectionSynchronizer.js +1 -1
- package/dist/synchronizer/DocSynchronizer.d.ts +1 -0
- package/dist/synchronizer/DocSynchronizer.d.ts.map +1 -1
- package/dist/synchronizer/DocSynchronizer.js +3 -5
- package/dist/synchronizer/Synchronizer.d.ts +1 -1
- package/dist/synchronizer/Synchronizer.d.ts.map +1 -1
- package/fuzz/fuzz.ts +8 -6
- package/fuzz/tsconfig.json +8 -0
- package/package.json +2 -2
- package/src/DocHandle.ts +3 -4
- package/src/DocUrl.ts +3 -1
- package/src/Repo.ts +27 -16
- package/src/helpers/debounce.ts +25 -0
- package/src/helpers/headsAreSame.ts +1 -1
- package/src/helpers/throttle.ts +43 -0
- package/src/index.ts +3 -3
- package/src/network/NetworkSubsystem.ts +1 -1
- package/src/storage/StorageSubsystem.ts +4 -4
- package/src/synchronizer/CollectionSynchronizer.ts +2 -2
- package/src/synchronizer/DocSynchronizer.ts +10 -7
- package/src/synchronizer/Synchronizer.ts +1 -1
- package/test/CollectionSynchronizer.test.ts +1 -1
- package/test/DocHandle.test.ts +1 -1
- package/test/DocSynchronizer.test.ts +0 -4
- package/test/Repo.test.ts +115 -124
- package/test/helpers/DummyNetworkAdapter.ts +9 -4
- package/test/helpers/DummyStorageAdapter.ts +4 -2
- package/dist/EphemeralData.d.ts +0 -20
- package/dist/EphemeralData.d.ts.map +0 -1
- package/dist/EphemeralData.js +0 -1
- package/src/EphemeralData.ts +0 -17
package/dist/EphemeralData.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/src/EphemeralData.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { DocumentId, PeerId } from "./index.js"
|
|
2
|
-
import { EphemeralMessage, MessageContents } from "./network/messages.js"
|
|
3
|
-
|
|
4
|
-
// types
|
|
5
|
-
/** A randomly generated string created when the {@link Repo} starts up */
|
|
6
|
-
export type SessionId = string & { __SessionId: false }
|
|
7
|
-
|
|
8
|
-
export interface EphemeralDataPayload {
|
|
9
|
-
documentId: DocumentId
|
|
10
|
-
peerId: PeerId
|
|
11
|
-
data: { peerId: PeerId; documentId: DocumentId; data: unknown }
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export type EphemeralDataMessageEvents = {
|
|
15
|
-
message: (event: MessageContents<EphemeralMessage>) => void
|
|
16
|
-
data: (event: EphemeralDataPayload) => void
|
|
17
|
-
}
|