@fluidframework/container-loader 2.0.0-internal.5.2.0 → 2.0.0-internal.5.3.0
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/CHANGELOG.md +11 -0
- package/dist/connectionManager.d.ts +1 -1
- package/dist/connectionManager.d.ts.map +1 -1
- package/dist/connectionManager.js.map +1 -1
- package/dist/connectionStateHandler.d.ts +1 -1
- package/dist/connectionStateHandler.d.ts.map +1 -1
- package/dist/connectionStateHandler.js.map +1 -1
- package/dist/container.d.ts +10 -4
- package/dist/container.d.ts.map +1 -1
- package/dist/container.js +22 -9
- package/dist/container.js.map +1 -1
- package/dist/containerContext.d.ts +5 -12
- package/dist/containerContext.d.ts.map +1 -1
- package/dist/containerContext.js +4 -16
- package/dist/containerContext.js.map +1 -1
- package/dist/containerStorageAdapter.d.ts.map +1 -1
- package/dist/containerStorageAdapter.js +38 -6
- package/dist/containerStorageAdapter.js.map +1 -1
- package/dist/contracts.d.ts +1 -3
- package/dist/contracts.d.ts.map +1 -1
- package/dist/contracts.js.map +1 -1
- package/dist/deltaManager.d.ts +2 -1
- package/dist/deltaManager.d.ts.map +1 -1
- package/dist/deltaManager.js.map +1 -1
- package/dist/disposal.d.ts +13 -0
- package/dist/disposal.d.ts.map +1 -0
- package/dist/disposal.js +25 -0
- package/dist/disposal.js.map +1 -0
- package/dist/loader.d.ts +1 -2
- package/dist/loader.d.ts.map +1 -1
- package/dist/loader.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/protocol.d.ts +6 -0
- package/dist/protocol.d.ts.map +1 -1
- package/dist/protocol.js +17 -1
- package/dist/protocol.js.map +1 -1
- package/dist/quorum.d.ts +1 -17
- package/dist/quorum.d.ts.map +1 -1
- package/dist/quorum.js +1 -17
- package/dist/quorum.js.map +1 -1
- package/lib/connectionManager.d.ts +1 -1
- package/lib/connectionManager.d.ts.map +1 -1
- package/lib/connectionManager.js.map +1 -1
- package/lib/connectionStateHandler.d.ts +1 -1
- package/lib/connectionStateHandler.d.ts.map +1 -1
- package/lib/connectionStateHandler.js.map +1 -1
- package/lib/container.d.ts +10 -4
- package/lib/container.d.ts.map +1 -1
- package/lib/container.js +24 -11
- package/lib/container.js.map +1 -1
- package/lib/containerContext.d.ts +5 -12
- package/lib/containerContext.d.ts.map +1 -1
- package/lib/containerContext.js +4 -16
- package/lib/containerContext.js.map +1 -1
- package/lib/containerStorageAdapter.d.ts.map +1 -1
- package/lib/containerStorageAdapter.js +38 -6
- package/lib/containerStorageAdapter.js.map +1 -1
- package/lib/contracts.d.ts +1 -3
- package/lib/contracts.d.ts.map +1 -1
- package/lib/contracts.js.map +1 -1
- package/lib/deltaManager.d.ts +2 -1
- package/lib/deltaManager.d.ts.map +1 -1
- package/lib/deltaManager.js.map +1 -1
- package/lib/disposal.d.ts +13 -0
- package/lib/disposal.d.ts.map +1 -0
- package/lib/disposal.js +21 -0
- package/lib/disposal.js.map +1 -0
- package/lib/loader.d.ts +1 -2
- package/lib/loader.d.ts.map +1 -1
- package/lib/loader.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/protocol.d.ts +6 -0
- package/lib/protocol.d.ts.map +1 -1
- package/lib/protocol.js +15 -0
- package/lib/protocol.js.map +1 -1
- package/lib/quorum.d.ts +1 -17
- package/lib/quorum.d.ts.map +1 -1
- package/lib/quorum.js +1 -16
- package/lib/quorum.js.map +1 -1
- package/package.json +18 -14
- package/src/connectionManager.ts +1 -2
- package/src/connectionStateHandler.ts +1 -1
- package/src/container.ts +49 -25
- package/src/containerContext.ts +2 -18
- package/src/containerStorageAdapter.ts +46 -4
- package/src/contracts.ts +1 -3
- package/src/deltaManager.ts +15 -8
- package/src/disposal.ts +25 -0
- package/src/loader.ts +1 -1
- package/src/packageVersion.ts +1 -1
- package/src/protocol.ts +18 -0
- package/src/quorum.ts +2 -31
- package/dist/deltaManagerProxy.d.ts +0 -42
- package/dist/deltaManagerProxy.d.ts.map +0 -1
- package/dist/deltaManagerProxy.js +0 -79
- package/dist/deltaManagerProxy.js.map +0 -1
- package/lib/deltaManagerProxy.d.ts +0 -42
- package/lib/deltaManagerProxy.d.ts.map +0 -1
- package/lib/deltaManagerProxy.js +0 -74
- package/lib/deltaManagerProxy.js.map +0 -1
- package/src/deltaManagerProxy.ts +0 -109
package/src/quorum.ts
CHANGED
|
@@ -2,38 +2,9 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import { assert
|
|
5
|
+
import { assert } from "@fluidframework/common-utils";
|
|
6
6
|
import { IFluidCodeDetails } from "@fluidframework/core-interfaces";
|
|
7
|
-
import {
|
|
8
|
-
ICommittedProposal,
|
|
9
|
-
IQuorum,
|
|
10
|
-
IQuorumEvents,
|
|
11
|
-
ISequencedClient,
|
|
12
|
-
} from "@fluidframework/protocol-definitions";
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Proxies Quorum events.
|
|
16
|
-
*/
|
|
17
|
-
export class QuorumProxy extends EventForwarder<IQuorumEvents> implements IQuorum {
|
|
18
|
-
public readonly propose: (key: string, value: any) => Promise<void>;
|
|
19
|
-
public readonly has: (key: string) => boolean;
|
|
20
|
-
public readonly get: (key: string) => any;
|
|
21
|
-
public readonly getMembers: () => Map<string, ISequencedClient>;
|
|
22
|
-
public readonly getMember: (clientId: string) => ISequencedClient | undefined;
|
|
23
|
-
|
|
24
|
-
constructor(quorum: IQuorum) {
|
|
25
|
-
super(quorum);
|
|
26
|
-
|
|
27
|
-
// This is heavily used object, increase limit at which Node prints warnings.
|
|
28
|
-
super.setMaxListeners(50);
|
|
29
|
-
|
|
30
|
-
this.propose = doIfNotDisposed(this, quorum.propose.bind(quorum));
|
|
31
|
-
this.has = doIfNotDisposed(this, quorum.has.bind(quorum));
|
|
32
|
-
this.get = doIfNotDisposed(this, quorum.get.bind(quorum));
|
|
33
|
-
this.getMembers = doIfNotDisposed(this, quorum.getMembers.bind(quorum));
|
|
34
|
-
this.getMember = doIfNotDisposed(this, quorum.getMember.bind(quorum));
|
|
35
|
-
}
|
|
36
|
-
}
|
|
7
|
+
import { ICommittedProposal } from "@fluidframework/protocol-definitions";
|
|
37
8
|
|
|
38
9
|
export function getCodeDetailsFromQuorumValues(
|
|
39
10
|
quorumValues: [string, ICommittedProposal][],
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
*/
|
|
5
|
-
import { IDeltaManager, IDeltaQueue, IDeltaQueueEvents } from "@fluidframework/container-definitions";
|
|
6
|
-
import { EventForwarder } from "@fluidframework/common-utils";
|
|
7
|
-
import { IDocumentMessage, ISequencedDocumentMessage, ISignalMessage } from "@fluidframework/protocol-definitions";
|
|
8
|
-
import { DeltaManagerProxyBase } from "@fluidframework/container-utils";
|
|
9
|
-
/**
|
|
10
|
-
* Proxy to the real IDeltaQueue - used to restrict access
|
|
11
|
-
*/
|
|
12
|
-
export declare class DeltaQueueProxy<T> extends EventForwarder<IDeltaQueueEvents<T>> implements IDeltaQueue<T> {
|
|
13
|
-
private readonly queue;
|
|
14
|
-
get paused(): boolean;
|
|
15
|
-
get length(): number;
|
|
16
|
-
get idle(): boolean;
|
|
17
|
-
constructor(queue: IDeltaQueue<T>);
|
|
18
|
-
peek(): T | undefined;
|
|
19
|
-
toArray(): T[];
|
|
20
|
-
systemPause(): Promise<void>;
|
|
21
|
-
pause(): Promise<void>;
|
|
22
|
-
systemResume(): Promise<void>;
|
|
23
|
-
resume(): Promise<void>;
|
|
24
|
-
waitTillProcessingDone(): Promise<{
|
|
25
|
-
count: number;
|
|
26
|
-
duration: number;
|
|
27
|
-
}>;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Proxy to the real IDeltaManager - used to restrict access
|
|
31
|
-
*/
|
|
32
|
-
export declare class DeltaManagerProxy extends DeltaManagerProxyBase implements IDeltaManager<ISequencedDocumentMessage, IDocumentMessage> {
|
|
33
|
-
get inbound(): IDeltaQueue<ISequencedDocumentMessage>;
|
|
34
|
-
private readonly _inbound;
|
|
35
|
-
get outbound(): IDeltaQueue<IDocumentMessage[]>;
|
|
36
|
-
private readonly _outbound;
|
|
37
|
-
get inboundSignal(): IDeltaQueue<ISignalMessage>;
|
|
38
|
-
private readonly _inboundSignal;
|
|
39
|
-
constructor(deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>);
|
|
40
|
-
dispose(): void;
|
|
41
|
-
}
|
|
42
|
-
//# sourceMappingURL=deltaManagerProxy.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deltaManagerProxy.d.ts","sourceRoot":"","sources":["../src/deltaManagerProxy.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EACN,gBAAgB,EAChB,yBAAyB,EACzB,cAAc,EACd,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAExE;;GAEG;AACH,qBAAa,eAAe,CAAC,CAAC,CAC7B,SAAQ,cAAc,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAC3C,YAAW,WAAW,CAAC,CAAC,CAAC;IAcb,OAAO,CAAC,QAAQ,CAAC,KAAK;IAZlC,IAAW,MAAM,IAAI,OAAO,CAE3B;IAED,IAAW,MAAM,IAAI,MAAM,CAE1B;IAED,IAAW,IAAI,IAAI,OAAO,CAEzB;gBAE4B,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC;IAI3C,IAAI,IAAI,CAAC,GAAG,SAAS;IAIrB,OAAO,IAAI,CAAC,EAAE;IAKR,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IAI5B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAKtB,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;IAI7B,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAIvB,sBAAsB;;;;CAGnC;AAED;;GAEG;AACH,qBAAa,iBACZ,SAAQ,qBACR,YAAW,aAAa,CAAC,yBAAyB,EAAE,gBAAgB,CAAC;IAErE,IAAW,OAAO,IAAI,WAAW,CAAC,yBAAyB,CAAC,CAE3D;IACD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAyC;IAElE,IAAW,QAAQ,IAAI,WAAW,CAAC,gBAAgB,EAAE,CAAC,CAErD;IACD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAkC;IAE5D,IAAW,aAAa,IAAI,WAAW,CAAC,cAAc,CAAC,CAEtD;IACD,OAAO,CAAC,QAAQ,CAAC,cAAc,CAA8B;gBAEjD,YAAY,EAAE,aAAa,CAAC,yBAAyB,EAAE,gBAAgB,CAAC;IAQ7E,OAAO,IAAI,IAAI;CAMtB"}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*!
|
|
3
|
-
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
4
|
-
* Licensed under the MIT License.
|
|
5
|
-
*/
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.DeltaManagerProxy = exports.DeltaQueueProxy = void 0;
|
|
8
|
-
const common_utils_1 = require("@fluidframework/common-utils");
|
|
9
|
-
const container_utils_1 = require("@fluidframework/container-utils");
|
|
10
|
-
/**
|
|
11
|
-
* Proxy to the real IDeltaQueue - used to restrict access
|
|
12
|
-
*/
|
|
13
|
-
class DeltaQueueProxy extends common_utils_1.EventForwarder {
|
|
14
|
-
constructor(queue) {
|
|
15
|
-
super(queue);
|
|
16
|
-
this.queue = queue;
|
|
17
|
-
}
|
|
18
|
-
get paused() {
|
|
19
|
-
return this.queue.paused;
|
|
20
|
-
}
|
|
21
|
-
get length() {
|
|
22
|
-
return this.queue.length;
|
|
23
|
-
}
|
|
24
|
-
get idle() {
|
|
25
|
-
return this.queue.idle;
|
|
26
|
-
}
|
|
27
|
-
peek() {
|
|
28
|
-
return this.queue.peek();
|
|
29
|
-
}
|
|
30
|
-
toArray() {
|
|
31
|
-
return this.queue.toArray();
|
|
32
|
-
}
|
|
33
|
-
// back-compat: usage removed in 0.33, remove in future versions
|
|
34
|
-
async systemPause() {
|
|
35
|
-
return this.pause();
|
|
36
|
-
}
|
|
37
|
-
async pause() {
|
|
38
|
-
return this.queue.pause();
|
|
39
|
-
}
|
|
40
|
-
// back-compat: usage removed in 0.33, remove in future versions
|
|
41
|
-
async systemResume() {
|
|
42
|
-
return this.resume();
|
|
43
|
-
}
|
|
44
|
-
async resume() {
|
|
45
|
-
this.queue.resume();
|
|
46
|
-
}
|
|
47
|
-
async waitTillProcessingDone() {
|
|
48
|
-
return this.queue.waitTillProcessingDone();
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
exports.DeltaQueueProxy = DeltaQueueProxy;
|
|
52
|
-
/**
|
|
53
|
-
* Proxy to the real IDeltaManager - used to restrict access
|
|
54
|
-
*/
|
|
55
|
-
class DeltaManagerProxy extends container_utils_1.DeltaManagerProxyBase {
|
|
56
|
-
constructor(deltaManager) {
|
|
57
|
-
super(deltaManager);
|
|
58
|
-
this._inbound = new DeltaQueueProxy(deltaManager.inbound);
|
|
59
|
-
this._outbound = new DeltaQueueProxy(deltaManager.outbound);
|
|
60
|
-
this._inboundSignal = new DeltaQueueProxy(deltaManager.inboundSignal);
|
|
61
|
-
}
|
|
62
|
-
get inbound() {
|
|
63
|
-
return this._inbound;
|
|
64
|
-
}
|
|
65
|
-
get outbound() {
|
|
66
|
-
return this._outbound;
|
|
67
|
-
}
|
|
68
|
-
get inboundSignal() {
|
|
69
|
-
return this._inboundSignal;
|
|
70
|
-
}
|
|
71
|
-
dispose() {
|
|
72
|
-
this._inbound.dispose();
|
|
73
|
-
this._outbound.dispose();
|
|
74
|
-
this._inboundSignal.dispose();
|
|
75
|
-
super.dispose();
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
exports.DeltaManagerProxy = DeltaManagerProxy;
|
|
79
|
-
//# sourceMappingURL=deltaManagerProxy.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deltaManagerProxy.js","sourceRoot":"","sources":["../src/deltaManagerProxy.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAOH,+DAA8D;AAM9D,qEAAwE;AAExE;;GAEG;AACH,MAAa,eACZ,SAAQ,6BAAoC;IAe5C,YAA6B,KAAqB;QACjD,KAAK,CAAC,KAAK,CAAC,CAAC;QADe,UAAK,GAAL,KAAK,CAAgB;IAElD,CAAC;IAdD,IAAW,MAAM;QAChB,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;IAC1B,CAAC;IAED,IAAW,MAAM;QAChB,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;IAC1B,CAAC;IAED,IAAW,IAAI;QACd,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;IACxB,CAAC;IAMM,IAAI;QACV,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;IAC1B,CAAC;IAEM,OAAO;QACb,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;IAC7B,CAAC;IAED,gEAAgE;IACzD,KAAK,CAAC,WAAW;QACvB,OAAO,IAAI,CAAC,KAAK,EAAE,CAAC;IACrB,CAAC;IAEM,KAAK,CAAC,KAAK;QACjB,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;IAC3B,CAAC;IAED,gEAAgE;IACzD,KAAK,CAAC,YAAY;QACxB,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC;IACtB,CAAC;IAEM,KAAK,CAAC,MAAM;QAClB,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;IACrB,CAAC;IAEM,KAAK,CAAC,sBAAsB;QAClC,OAAO,IAAI,CAAC,KAAK,CAAC,sBAAsB,EAAE,CAAC;IAC5C,CAAC;CACD;AAjDD,0CAiDC;AAED;;GAEG;AACH,MAAa,iBACZ,SAAQ,uCAAqB;IAkB7B,YAAY,YAAwE;QACnF,KAAK,CAAC,YAAY,CAAC,CAAC;QAEpB,IAAI,CAAC,QAAQ,GAAG,IAAI,eAAe,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;QAC1D,IAAI,CAAC,SAAS,GAAG,IAAI,eAAe,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;QAC5D,IAAI,CAAC,cAAc,GAAG,IAAI,eAAe,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC;IACvE,CAAC;IArBD,IAAW,OAAO;QACjB,OAAO,IAAI,CAAC,QAAQ,CAAC;IACtB,CAAC;IAGD,IAAW,QAAQ;QAClB,OAAO,IAAI,CAAC,SAAS,CAAC;IACvB,CAAC;IAGD,IAAW,aAAa;QACvB,OAAO,IAAI,CAAC,cAAc,CAAC;IAC5B,CAAC;IAWM,OAAO;QACb,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;QACxB,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC;QACzB,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,CAAC;QAC9B,KAAK,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC;CACD;AAjCD,8CAiCC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tIDeltaManager,\n\tIDeltaQueue,\n\tIDeltaQueueEvents,\n} from \"@fluidframework/container-definitions\";\nimport { EventForwarder } from \"@fluidframework/common-utils\";\nimport {\n\tIDocumentMessage,\n\tISequencedDocumentMessage,\n\tISignalMessage,\n} from \"@fluidframework/protocol-definitions\";\nimport { DeltaManagerProxyBase } from \"@fluidframework/container-utils\";\n\n/**\n * Proxy to the real IDeltaQueue - used to restrict access\n */\nexport class DeltaQueueProxy<T>\n\textends EventForwarder<IDeltaQueueEvents<T>>\n\timplements IDeltaQueue<T>\n{\n\tpublic get paused(): boolean {\n\t\treturn this.queue.paused;\n\t}\n\n\tpublic get length(): number {\n\t\treturn this.queue.length;\n\t}\n\n\tpublic get idle(): boolean {\n\t\treturn this.queue.idle;\n\t}\n\n\tconstructor(private readonly queue: IDeltaQueue<T>) {\n\t\tsuper(queue);\n\t}\n\n\tpublic peek(): T | undefined {\n\t\treturn this.queue.peek();\n\t}\n\n\tpublic toArray(): T[] {\n\t\treturn this.queue.toArray();\n\t}\n\n\t// back-compat: usage removed in 0.33, remove in future versions\n\tpublic async systemPause(): Promise<void> {\n\t\treturn this.pause();\n\t}\n\n\tpublic async pause(): Promise<void> {\n\t\treturn this.queue.pause();\n\t}\n\n\t// back-compat: usage removed in 0.33, remove in future versions\n\tpublic async systemResume(): Promise<void> {\n\t\treturn this.resume();\n\t}\n\n\tpublic async resume(): Promise<void> {\n\t\tthis.queue.resume();\n\t}\n\n\tpublic async waitTillProcessingDone() {\n\t\treturn this.queue.waitTillProcessingDone();\n\t}\n}\n\n/**\n * Proxy to the real IDeltaManager - used to restrict access\n */\nexport class DeltaManagerProxy\n\textends DeltaManagerProxyBase\n\timplements IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>\n{\n\tpublic get inbound(): IDeltaQueue<ISequencedDocumentMessage> {\n\t\treturn this._inbound;\n\t}\n\tprivate readonly _inbound: IDeltaQueue<ISequencedDocumentMessage>;\n\n\tpublic get outbound(): IDeltaQueue<IDocumentMessage[]> {\n\t\treturn this._outbound;\n\t}\n\tprivate readonly _outbound: IDeltaQueue<IDocumentMessage[]>;\n\n\tpublic get inboundSignal(): IDeltaQueue<ISignalMessage> {\n\t\treturn this._inboundSignal;\n\t}\n\tprivate readonly _inboundSignal: IDeltaQueue<ISignalMessage>;\n\n\tconstructor(deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>) {\n\t\tsuper(deltaManager);\n\n\t\tthis._inbound = new DeltaQueueProxy(deltaManager.inbound);\n\t\tthis._outbound = new DeltaQueueProxy(deltaManager.outbound);\n\t\tthis._inboundSignal = new DeltaQueueProxy(deltaManager.inboundSignal);\n\t}\n\n\tpublic dispose(): void {\n\t\tthis._inbound.dispose();\n\t\tthis._outbound.dispose();\n\t\tthis._inboundSignal.dispose();\n\t\tsuper.dispose();\n\t}\n}\n"]}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
*/
|
|
5
|
-
import { IDeltaManager, IDeltaQueue, IDeltaQueueEvents } from "@fluidframework/container-definitions";
|
|
6
|
-
import { EventForwarder } from "@fluidframework/common-utils";
|
|
7
|
-
import { IDocumentMessage, ISequencedDocumentMessage, ISignalMessage } from "@fluidframework/protocol-definitions";
|
|
8
|
-
import { DeltaManagerProxyBase } from "@fluidframework/container-utils";
|
|
9
|
-
/**
|
|
10
|
-
* Proxy to the real IDeltaQueue - used to restrict access
|
|
11
|
-
*/
|
|
12
|
-
export declare class DeltaQueueProxy<T> extends EventForwarder<IDeltaQueueEvents<T>> implements IDeltaQueue<T> {
|
|
13
|
-
private readonly queue;
|
|
14
|
-
get paused(): boolean;
|
|
15
|
-
get length(): number;
|
|
16
|
-
get idle(): boolean;
|
|
17
|
-
constructor(queue: IDeltaQueue<T>);
|
|
18
|
-
peek(): T | undefined;
|
|
19
|
-
toArray(): T[];
|
|
20
|
-
systemPause(): Promise<void>;
|
|
21
|
-
pause(): Promise<void>;
|
|
22
|
-
systemResume(): Promise<void>;
|
|
23
|
-
resume(): Promise<void>;
|
|
24
|
-
waitTillProcessingDone(): Promise<{
|
|
25
|
-
count: number;
|
|
26
|
-
duration: number;
|
|
27
|
-
}>;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Proxy to the real IDeltaManager - used to restrict access
|
|
31
|
-
*/
|
|
32
|
-
export declare class DeltaManagerProxy extends DeltaManagerProxyBase implements IDeltaManager<ISequencedDocumentMessage, IDocumentMessage> {
|
|
33
|
-
get inbound(): IDeltaQueue<ISequencedDocumentMessage>;
|
|
34
|
-
private readonly _inbound;
|
|
35
|
-
get outbound(): IDeltaQueue<IDocumentMessage[]>;
|
|
36
|
-
private readonly _outbound;
|
|
37
|
-
get inboundSignal(): IDeltaQueue<ISignalMessage>;
|
|
38
|
-
private readonly _inboundSignal;
|
|
39
|
-
constructor(deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>);
|
|
40
|
-
dispose(): void;
|
|
41
|
-
}
|
|
42
|
-
//# sourceMappingURL=deltaManagerProxy.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deltaManagerProxy.d.ts","sourceRoot":"","sources":["../src/deltaManagerProxy.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EACN,gBAAgB,EAChB,yBAAyB,EACzB,cAAc,EACd,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAExE;;GAEG;AACH,qBAAa,eAAe,CAAC,CAAC,CAC7B,SAAQ,cAAc,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAC3C,YAAW,WAAW,CAAC,CAAC,CAAC;IAcb,OAAO,CAAC,QAAQ,CAAC,KAAK;IAZlC,IAAW,MAAM,IAAI,OAAO,CAE3B;IAED,IAAW,MAAM,IAAI,MAAM,CAE1B;IAED,IAAW,IAAI,IAAI,OAAO,CAEzB;gBAE4B,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC;IAI3C,IAAI,IAAI,CAAC,GAAG,SAAS;IAIrB,OAAO,IAAI,CAAC,EAAE;IAKR,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IAI5B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAKtB,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;IAI7B,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAIvB,sBAAsB;;;;CAGnC;AAED;;GAEG;AACH,qBAAa,iBACZ,SAAQ,qBACR,YAAW,aAAa,CAAC,yBAAyB,EAAE,gBAAgB,CAAC;IAErE,IAAW,OAAO,IAAI,WAAW,CAAC,yBAAyB,CAAC,CAE3D;IACD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAyC;IAElE,IAAW,QAAQ,IAAI,WAAW,CAAC,gBAAgB,EAAE,CAAC,CAErD;IACD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAkC;IAE5D,IAAW,aAAa,IAAI,WAAW,CAAC,cAAc,CAAC,CAEtD;IACD,OAAO,CAAC,QAAQ,CAAC,cAAc,CAA8B;gBAEjD,YAAY,EAAE,aAAa,CAAC,yBAAyB,EAAE,gBAAgB,CAAC;IAQ7E,OAAO,IAAI,IAAI;CAMtB"}
|
package/lib/deltaManagerProxy.js
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
*/
|
|
5
|
-
import { EventForwarder } from "@fluidframework/common-utils";
|
|
6
|
-
import { DeltaManagerProxyBase } from "@fluidframework/container-utils";
|
|
7
|
-
/**
|
|
8
|
-
* Proxy to the real IDeltaQueue - used to restrict access
|
|
9
|
-
*/
|
|
10
|
-
export class DeltaQueueProxy extends EventForwarder {
|
|
11
|
-
constructor(queue) {
|
|
12
|
-
super(queue);
|
|
13
|
-
this.queue = queue;
|
|
14
|
-
}
|
|
15
|
-
get paused() {
|
|
16
|
-
return this.queue.paused;
|
|
17
|
-
}
|
|
18
|
-
get length() {
|
|
19
|
-
return this.queue.length;
|
|
20
|
-
}
|
|
21
|
-
get idle() {
|
|
22
|
-
return this.queue.idle;
|
|
23
|
-
}
|
|
24
|
-
peek() {
|
|
25
|
-
return this.queue.peek();
|
|
26
|
-
}
|
|
27
|
-
toArray() {
|
|
28
|
-
return this.queue.toArray();
|
|
29
|
-
}
|
|
30
|
-
// back-compat: usage removed in 0.33, remove in future versions
|
|
31
|
-
async systemPause() {
|
|
32
|
-
return this.pause();
|
|
33
|
-
}
|
|
34
|
-
async pause() {
|
|
35
|
-
return this.queue.pause();
|
|
36
|
-
}
|
|
37
|
-
// back-compat: usage removed in 0.33, remove in future versions
|
|
38
|
-
async systemResume() {
|
|
39
|
-
return this.resume();
|
|
40
|
-
}
|
|
41
|
-
async resume() {
|
|
42
|
-
this.queue.resume();
|
|
43
|
-
}
|
|
44
|
-
async waitTillProcessingDone() {
|
|
45
|
-
return this.queue.waitTillProcessingDone();
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Proxy to the real IDeltaManager - used to restrict access
|
|
50
|
-
*/
|
|
51
|
-
export class DeltaManagerProxy extends DeltaManagerProxyBase {
|
|
52
|
-
constructor(deltaManager) {
|
|
53
|
-
super(deltaManager);
|
|
54
|
-
this._inbound = new DeltaQueueProxy(deltaManager.inbound);
|
|
55
|
-
this._outbound = new DeltaQueueProxy(deltaManager.outbound);
|
|
56
|
-
this._inboundSignal = new DeltaQueueProxy(deltaManager.inboundSignal);
|
|
57
|
-
}
|
|
58
|
-
get inbound() {
|
|
59
|
-
return this._inbound;
|
|
60
|
-
}
|
|
61
|
-
get outbound() {
|
|
62
|
-
return this._outbound;
|
|
63
|
-
}
|
|
64
|
-
get inboundSignal() {
|
|
65
|
-
return this._inboundSignal;
|
|
66
|
-
}
|
|
67
|
-
dispose() {
|
|
68
|
-
this._inbound.dispose();
|
|
69
|
-
this._outbound.dispose();
|
|
70
|
-
this._inboundSignal.dispose();
|
|
71
|
-
super.dispose();
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
//# sourceMappingURL=deltaManagerProxy.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deltaManagerProxy.js","sourceRoot":"","sources":["../src/deltaManagerProxy.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAM9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAExE;;GAEG;AACH,MAAM,OAAO,eACZ,SAAQ,cAAoC;IAe5C,YAA6B,KAAqB;QACjD,KAAK,CAAC,KAAK,CAAC,CAAC;QADe,UAAK,GAAL,KAAK,CAAgB;IAElD,CAAC;IAdD,IAAW,MAAM;QAChB,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;IAC1B,CAAC;IAED,IAAW,MAAM;QAChB,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;IAC1B,CAAC;IAED,IAAW,IAAI;QACd,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;IACxB,CAAC;IAMM,IAAI;QACV,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;IAC1B,CAAC;IAEM,OAAO;QACb,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;IAC7B,CAAC;IAED,gEAAgE;IACzD,KAAK,CAAC,WAAW;QACvB,OAAO,IAAI,CAAC,KAAK,EAAE,CAAC;IACrB,CAAC;IAEM,KAAK,CAAC,KAAK;QACjB,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;IAC3B,CAAC;IAED,gEAAgE;IACzD,KAAK,CAAC,YAAY;QACxB,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC;IACtB,CAAC;IAEM,KAAK,CAAC,MAAM;QAClB,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;IACrB,CAAC;IAEM,KAAK,CAAC,sBAAsB;QAClC,OAAO,IAAI,CAAC,KAAK,CAAC,sBAAsB,EAAE,CAAC;IAC5C,CAAC;CACD;AAED;;GAEG;AACH,MAAM,OAAO,iBACZ,SAAQ,qBAAqB;IAkB7B,YAAY,YAAwE;QACnF,KAAK,CAAC,YAAY,CAAC,CAAC;QAEpB,IAAI,CAAC,QAAQ,GAAG,IAAI,eAAe,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;QAC1D,IAAI,CAAC,SAAS,GAAG,IAAI,eAAe,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;QAC5D,IAAI,CAAC,cAAc,GAAG,IAAI,eAAe,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC;IACvE,CAAC;IArBD,IAAW,OAAO;QACjB,OAAO,IAAI,CAAC,QAAQ,CAAC;IACtB,CAAC;IAGD,IAAW,QAAQ;QAClB,OAAO,IAAI,CAAC,SAAS,CAAC;IACvB,CAAC;IAGD,IAAW,aAAa;QACvB,OAAO,IAAI,CAAC,cAAc,CAAC;IAC5B,CAAC;IAWM,OAAO;QACb,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;QACxB,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC;QACzB,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,CAAC;QAC9B,KAAK,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tIDeltaManager,\n\tIDeltaQueue,\n\tIDeltaQueueEvents,\n} from \"@fluidframework/container-definitions\";\nimport { EventForwarder } from \"@fluidframework/common-utils\";\nimport {\n\tIDocumentMessage,\n\tISequencedDocumentMessage,\n\tISignalMessage,\n} from \"@fluidframework/protocol-definitions\";\nimport { DeltaManagerProxyBase } from \"@fluidframework/container-utils\";\n\n/**\n * Proxy to the real IDeltaQueue - used to restrict access\n */\nexport class DeltaQueueProxy<T>\n\textends EventForwarder<IDeltaQueueEvents<T>>\n\timplements IDeltaQueue<T>\n{\n\tpublic get paused(): boolean {\n\t\treturn this.queue.paused;\n\t}\n\n\tpublic get length(): number {\n\t\treturn this.queue.length;\n\t}\n\n\tpublic get idle(): boolean {\n\t\treturn this.queue.idle;\n\t}\n\n\tconstructor(private readonly queue: IDeltaQueue<T>) {\n\t\tsuper(queue);\n\t}\n\n\tpublic peek(): T | undefined {\n\t\treturn this.queue.peek();\n\t}\n\n\tpublic toArray(): T[] {\n\t\treturn this.queue.toArray();\n\t}\n\n\t// back-compat: usage removed in 0.33, remove in future versions\n\tpublic async systemPause(): Promise<void> {\n\t\treturn this.pause();\n\t}\n\n\tpublic async pause(): Promise<void> {\n\t\treturn this.queue.pause();\n\t}\n\n\t// back-compat: usage removed in 0.33, remove in future versions\n\tpublic async systemResume(): Promise<void> {\n\t\treturn this.resume();\n\t}\n\n\tpublic async resume(): Promise<void> {\n\t\tthis.queue.resume();\n\t}\n\n\tpublic async waitTillProcessingDone() {\n\t\treturn this.queue.waitTillProcessingDone();\n\t}\n}\n\n/**\n * Proxy to the real IDeltaManager - used to restrict access\n */\nexport class DeltaManagerProxy\n\textends DeltaManagerProxyBase\n\timplements IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>\n{\n\tpublic get inbound(): IDeltaQueue<ISequencedDocumentMessage> {\n\t\treturn this._inbound;\n\t}\n\tprivate readonly _inbound: IDeltaQueue<ISequencedDocumentMessage>;\n\n\tpublic get outbound(): IDeltaQueue<IDocumentMessage[]> {\n\t\treturn this._outbound;\n\t}\n\tprivate readonly _outbound: IDeltaQueue<IDocumentMessage[]>;\n\n\tpublic get inboundSignal(): IDeltaQueue<ISignalMessage> {\n\t\treturn this._inboundSignal;\n\t}\n\tprivate readonly _inboundSignal: IDeltaQueue<ISignalMessage>;\n\n\tconstructor(deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>) {\n\t\tsuper(deltaManager);\n\n\t\tthis._inbound = new DeltaQueueProxy(deltaManager.inbound);\n\t\tthis._outbound = new DeltaQueueProxy(deltaManager.outbound);\n\t\tthis._inboundSignal = new DeltaQueueProxy(deltaManager.inboundSignal);\n\t}\n\n\tpublic dispose(): void {\n\t\tthis._inbound.dispose();\n\t\tthis._outbound.dispose();\n\t\tthis._inboundSignal.dispose();\n\t\tsuper.dispose();\n\t}\n}\n"]}
|
package/src/deltaManagerProxy.ts
DELETED
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import {
|
|
7
|
-
IDeltaManager,
|
|
8
|
-
IDeltaQueue,
|
|
9
|
-
IDeltaQueueEvents,
|
|
10
|
-
} from "@fluidframework/container-definitions";
|
|
11
|
-
import { EventForwarder } from "@fluidframework/common-utils";
|
|
12
|
-
import {
|
|
13
|
-
IDocumentMessage,
|
|
14
|
-
ISequencedDocumentMessage,
|
|
15
|
-
ISignalMessage,
|
|
16
|
-
} from "@fluidframework/protocol-definitions";
|
|
17
|
-
import { DeltaManagerProxyBase } from "@fluidframework/container-utils";
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Proxy to the real IDeltaQueue - used to restrict access
|
|
21
|
-
*/
|
|
22
|
-
export class DeltaQueueProxy<T>
|
|
23
|
-
extends EventForwarder<IDeltaQueueEvents<T>>
|
|
24
|
-
implements IDeltaQueue<T>
|
|
25
|
-
{
|
|
26
|
-
public get paused(): boolean {
|
|
27
|
-
return this.queue.paused;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
public get length(): number {
|
|
31
|
-
return this.queue.length;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
public get idle(): boolean {
|
|
35
|
-
return this.queue.idle;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
constructor(private readonly queue: IDeltaQueue<T>) {
|
|
39
|
-
super(queue);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
public peek(): T | undefined {
|
|
43
|
-
return this.queue.peek();
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
public toArray(): T[] {
|
|
47
|
-
return this.queue.toArray();
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// back-compat: usage removed in 0.33, remove in future versions
|
|
51
|
-
public async systemPause(): Promise<void> {
|
|
52
|
-
return this.pause();
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
public async pause(): Promise<void> {
|
|
56
|
-
return this.queue.pause();
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
// back-compat: usage removed in 0.33, remove in future versions
|
|
60
|
-
public async systemResume(): Promise<void> {
|
|
61
|
-
return this.resume();
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
public async resume(): Promise<void> {
|
|
65
|
-
this.queue.resume();
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
public async waitTillProcessingDone() {
|
|
69
|
-
return this.queue.waitTillProcessingDone();
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* Proxy to the real IDeltaManager - used to restrict access
|
|
75
|
-
*/
|
|
76
|
-
export class DeltaManagerProxy
|
|
77
|
-
extends DeltaManagerProxyBase
|
|
78
|
-
implements IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>
|
|
79
|
-
{
|
|
80
|
-
public get inbound(): IDeltaQueue<ISequencedDocumentMessage> {
|
|
81
|
-
return this._inbound;
|
|
82
|
-
}
|
|
83
|
-
private readonly _inbound: IDeltaQueue<ISequencedDocumentMessage>;
|
|
84
|
-
|
|
85
|
-
public get outbound(): IDeltaQueue<IDocumentMessage[]> {
|
|
86
|
-
return this._outbound;
|
|
87
|
-
}
|
|
88
|
-
private readonly _outbound: IDeltaQueue<IDocumentMessage[]>;
|
|
89
|
-
|
|
90
|
-
public get inboundSignal(): IDeltaQueue<ISignalMessage> {
|
|
91
|
-
return this._inboundSignal;
|
|
92
|
-
}
|
|
93
|
-
private readonly _inboundSignal: IDeltaQueue<ISignalMessage>;
|
|
94
|
-
|
|
95
|
-
constructor(deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>) {
|
|
96
|
-
super(deltaManager);
|
|
97
|
-
|
|
98
|
-
this._inbound = new DeltaQueueProxy(deltaManager.inbound);
|
|
99
|
-
this._outbound = new DeltaQueueProxy(deltaManager.outbound);
|
|
100
|
-
this._inboundSignal = new DeltaQueueProxy(deltaManager.inboundSignal);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
public dispose(): void {
|
|
104
|
-
this._inbound.dispose();
|
|
105
|
-
this._outbound.dispose();
|
|
106
|
-
this._inboundSignal.dispose();
|
|
107
|
-
super.dispose();
|
|
108
|
-
}
|
|
109
|
-
}
|