@automerge/automerge-repo
Advanced tools
Comparing version 2.0.0-alpha.2 to 2.0.0-alpha.3
@@ -161,2 +161,6 @@ import * as A from "@automerge/automerge/slim/next"; | ||
broadcast(message: unknown): void; | ||
metrics(): { | ||
numOps: number; | ||
numChanges: number; | ||
}; | ||
} | ||
@@ -163,0 +167,0 @@ /** @hidden */ |
@@ -385,2 +385,5 @@ import * as A from "@automerge/automerge/slim/next"; | ||
} | ||
metrics() { | ||
return A.stats(this.#doc); | ||
} | ||
} | ||
@@ -387,0 +390,0 @@ // STATE MACHINE TYPES & CONSTANTS |
@@ -93,2 +93,7 @@ import { EventEmitter } from "eventemitter3"; | ||
shutdown(): Promise<void>; | ||
metrics(): { | ||
documents: { | ||
[key: string]: any; | ||
}; | ||
}; | ||
} | ||
@@ -95,0 +100,0 @@ export interface RepoConfig { |
@@ -424,2 +424,5 @@ import { next as Automerge } from "@automerge/automerge/slim"; | ||
} | ||
metrics() { | ||
return { documents: this.#synchronizer.metrics() }; | ||
} | ||
} |
@@ -26,3 +26,12 @@ import { Repo } from "../Repo.js"; | ||
get peers(): PeerId[]; | ||
metrics(): { | ||
[key: string]: { | ||
peers: PeerId[]; | ||
size: { | ||
numOps: number; | ||
numChanges: number; | ||
}; | ||
}; | ||
}; | ||
} | ||
//# sourceMappingURL=CollectionSynchronizer.d.ts.map |
@@ -121,2 +121,7 @@ import debug from "debug"; | ||
} | ||
metrics() { | ||
return Object.fromEntries(Object.entries(this.#docSynchronizers).map(([documentId, synchronizer]) => { | ||
return [documentId, synchronizer.metrics()]; | ||
})); | ||
} | ||
} |
@@ -27,4 +27,11 @@ import * as A from "@automerge/automerge/slim/next"; | ||
receiveSyncMessage(message: SyncMessage | RequestMessage): void; | ||
metrics(): { | ||
peers: PeerId[]; | ||
size: { | ||
numOps: number; | ||
numChanges: number; | ||
}; | ||
}; | ||
} | ||
export {}; | ||
//# sourceMappingURL=DocSynchronizer.d.ts.map |
@@ -289,2 +289,8 @@ import * as A from "@automerge/automerge/slim/next"; | ||
} | ||
metrics() { | ||
return { | ||
peers: this.#peers, | ||
size: this.#handle.metrics(), | ||
}; | ||
} | ||
} |
{ | ||
"name": "@automerge/automerge-repo", | ||
"version": "2.0.0-alpha.2", | ||
"version": "2.0.0-alpha.3", | ||
"description": "A repository object to manage a collection of automerge documents", | ||
@@ -26,3 +26,3 @@ "repository": "https://github.com/automerge/automerge-repo/tree/master/packages/automerge-repo", | ||
"dependencies": { | ||
"@automerge/automerge": "^2.2.7", | ||
"@automerge/automerge": "^2.2.8", | ||
"bs58check": "^3.0.1", | ||
@@ -64,3 +64,3 @@ "cbor-x": "^1.3.0", | ||
}, | ||
"gitHead": "373ce97a1c3153b476926290942e8a55cde7874b" | ||
"gitHead": "f7d3f5ee20f537e4382d000eef57484d9e8e6c4a" | ||
} |
@@ -442,2 +442,6 @@ import * as A from "@automerge/automerge/slim/next" | ||
} | ||
metrics(): { numOps: number; numChanges: number } { | ||
return A.stats(this.#doc) | ||
} | ||
} | ||
@@ -444,0 +448,0 @@ |
@@ -548,2 +548,6 @@ import { next as Automerge } from "@automerge/automerge/slim" | ||
} | ||
metrics(): { documents: { [key: string]: any } } { | ||
return { documents: this.#synchronizer.metrics() } | ||
} | ||
} | ||
@@ -550,0 +554,0 @@ |
@@ -156,2 +156,17 @@ import debug from "debug" | ||
} | ||
metrics(): { | ||
[key: string]: { | ||
peers: PeerId[] | ||
size: { numOps: number; numChanges: number } | ||
} | ||
} { | ||
return Object.fromEntries( | ||
Object.entries(this.#docSynchronizers).map( | ||
([documentId, synchronizer]) => { | ||
return [documentId, synchronizer.metrics()] | ||
} | ||
) | ||
) | ||
} | ||
} |
@@ -404,2 +404,9 @@ import * as A from "@automerge/automerge/slim/next" | ||
} | ||
metrics(): { peers: PeerId[]; size: { numOps: number; numChanges: number } } { | ||
return { | ||
peers: this.#peers, | ||
size: this.#handle.metrics(), | ||
} | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
440561
10201
Updated@automerge/automerge@^2.2.8