@yorkie-js/react 0.6.1-rc7 → 0.6.1
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.
|
@@ -20173,7 +20173,7 @@ function createAuthInterceptor(apiKey, token) {
|
|
|
20173
20173
|
};
|
|
20174
20174
|
}
|
|
20175
20175
|
const name = "@yorkie-js/sdk";
|
|
20176
|
-
const version = "0.6.
|
|
20176
|
+
const version = "0.6.1";
|
|
20177
20177
|
const pkg = {
|
|
20178
20178
|
name,
|
|
20179
20179
|
version
|
|
@@ -20438,7 +20438,7 @@ class Client {
|
|
|
20438
20438
|
* the changes should be applied to other replicas before GC time. For this,
|
|
20439
20439
|
* if the document is no longer used by this client, it should be detached.
|
|
20440
20440
|
*/
|
|
20441
|
-
detach(doc, options = {}) {
|
|
20441
|
+
detach(doc, options = { keepalive: false }) {
|
|
20442
20442
|
if (!this.isActive()) {
|
|
20443
20443
|
throw new YorkieError(
|
|
20444
20444
|
Code.ErrClientNotActivated,
|
|
@@ -20453,8 +20453,8 @@ class Client {
|
|
|
20453
20453
|
);
|
|
20454
20454
|
}
|
|
20455
20455
|
doc.update((_, p) => p.clear());
|
|
20456
|
-
|
|
20457
|
-
return this.rpcClient.detachDocument(
|
|
20456
|
+
const task = async () => {
|
|
20457
|
+
return await this.rpcClient.detachDocument(
|
|
20458
20458
|
{
|
|
20459
20459
|
clientId: this.id,
|
|
20460
20460
|
documentId: attachment.docID,
|
|
@@ -20476,7 +20476,14 @@ class Client {
|
|
|
20476
20476
|
await this.handleConnectError(err);
|
|
20477
20477
|
throw err;
|
|
20478
20478
|
});
|
|
20479
|
-
}
|
|
20479
|
+
};
|
|
20480
|
+
if (options.keepalive) {
|
|
20481
|
+
this.keepalive = true;
|
|
20482
|
+
const resp = task();
|
|
20483
|
+
this.keepalive = false;
|
|
20484
|
+
return resp;
|
|
20485
|
+
}
|
|
20486
|
+
return this.enqueueTask(task);
|
|
20480
20487
|
}
|
|
20481
20488
|
/**
|
|
20482
20489
|
* `changeRealtimeSync` changes the synchronization mode of the given document.
|