@fluidframework/datastore 0.58.2001 → 0.59.2000-61729
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/dataStoreRuntime.d.ts +17 -5
- package/dist/dataStoreRuntime.d.ts.map +1 -1
- package/dist/dataStoreRuntime.js +106 -57
- package/dist/dataStoreRuntime.js.map +1 -1
- package/dist/fluidHandle.d.ts +8 -4
- package/dist/fluidHandle.d.ts.map +1 -1
- package/dist/fluidHandle.js +28 -20
- package/dist/fluidHandle.js.map +1 -1
- package/dist/localChannelContext.d.ts +2 -2
- package/dist/localChannelContext.d.ts.map +1 -1
- package/dist/localChannelContext.js +9 -9
- package/dist/localChannelContext.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.d.ts.map +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/lib/dataStoreRuntime.d.ts +17 -5
- package/lib/dataStoreRuntime.d.ts.map +1 -1
- package/lib/dataStoreRuntime.js +107 -58
- package/lib/dataStoreRuntime.js.map +1 -1
- package/lib/fluidHandle.d.ts +8 -4
- package/lib/fluidHandle.d.ts.map +1 -1
- package/lib/fluidHandle.js +28 -20
- package/lib/fluidHandle.js.map +1 -1
- package/lib/localChannelContext.d.ts +2 -2
- package/lib/localChannelContext.d.ts.map +1 -1
- package/lib/localChannelContext.js +9 -9
- package/lib/localChannelContext.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.d.ts.map +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/package.json +28 -17
- package/src/dataStoreRuntime.ts +123 -64
- package/src/fluidHandle.ts +31 -24
- package/src/localChannelContext.ts +9 -9
- package/src/packageVersion.ts +1 -1
|
@@ -38,7 +38,7 @@ import { ChannelStorageService } from "./channelStorageService";
|
|
|
38
38
|
*/
|
|
39
39
|
export abstract class LocalChannelContextBase implements IChannelContext {
|
|
40
40
|
public channel: IChannel | undefined;
|
|
41
|
-
private
|
|
41
|
+
private globallyVisible = false;
|
|
42
42
|
protected readonly pending: ISequencedDocumentMessage[] = [];
|
|
43
43
|
protected factory: IChannelFactory | undefined;
|
|
44
44
|
constructor(
|
|
@@ -62,14 +62,14 @@ export abstract class LocalChannelContextBase implements IChannelContext {
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
public setConnectionState(connected: boolean, clientId?: string) {
|
|
65
|
-
// Connection events are ignored if the data store is not yet
|
|
66
|
-
if (this.
|
|
65
|
+
// Connection events are ignored if the data store is not yet globallyVisible or loaded
|
|
66
|
+
if (this.globallyVisible && this.isLoaded) {
|
|
67
67
|
this.servicesGetter().value.deltaConnection.setConnectionState(connected);
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
public processOp(message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown): void {
|
|
72
|
-
assert(this.
|
|
72
|
+
assert(this.globallyVisible, 0x2d3 /* "Local channel must be globally visible when processing op" */);
|
|
73
73
|
|
|
74
74
|
// A local channel may not be loaded in case where we rehydrate the container from a snapshot because of
|
|
75
75
|
// delay loading. So after the container is attached and some other client joins which start generating
|
|
@@ -85,7 +85,7 @@ export abstract class LocalChannelContextBase implements IChannelContext {
|
|
|
85
85
|
|
|
86
86
|
public reSubmit(content: any, localOpMetadata: unknown) {
|
|
87
87
|
assert(this.isLoaded, 0x18a /* "Channel should be loaded to resubmit ops" */);
|
|
88
|
-
assert(this.
|
|
88
|
+
assert(this.globallyVisible, 0x2d4 /* "Local channel must be globally visible when resubmitting op" */);
|
|
89
89
|
this.servicesGetter().value.deltaConnection.reSubmit(content, localOpMetadata);
|
|
90
90
|
}
|
|
91
91
|
|
|
@@ -108,16 +108,16 @@ export abstract class LocalChannelContextBase implements IChannelContext {
|
|
|
108
108
|
return summarizeChannel(this.channel, true /* fullTree */, false /* trackState */);
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
public
|
|
112
|
-
if (this.
|
|
113
|
-
throw new Error("Channel is already
|
|
111
|
+
public makeVisible(): void {
|
|
112
|
+
if (this.globallyVisible) {
|
|
113
|
+
throw new Error("Channel is already globally visible");
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
if (this.isLoaded) {
|
|
117
117
|
assert(!!this.channel, 0x192 /* "Channel should be there if loaded!!" */);
|
|
118
118
|
this.channel.connect(this.servicesGetter().value);
|
|
119
119
|
}
|
|
120
|
-
this.
|
|
120
|
+
this.globallyVisible = true;
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
/**
|
package/src/packageVersion.ts
CHANGED