@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.
Files changed (37) hide show
  1. package/dist/dataStoreRuntime.d.ts +17 -5
  2. package/dist/dataStoreRuntime.d.ts.map +1 -1
  3. package/dist/dataStoreRuntime.js +106 -57
  4. package/dist/dataStoreRuntime.js.map +1 -1
  5. package/dist/fluidHandle.d.ts +8 -4
  6. package/dist/fluidHandle.d.ts.map +1 -1
  7. package/dist/fluidHandle.js +28 -20
  8. package/dist/fluidHandle.js.map +1 -1
  9. package/dist/localChannelContext.d.ts +2 -2
  10. package/dist/localChannelContext.d.ts.map +1 -1
  11. package/dist/localChannelContext.js +9 -9
  12. package/dist/localChannelContext.js.map +1 -1
  13. package/dist/packageVersion.d.ts +1 -1
  14. package/dist/packageVersion.d.ts.map +1 -1
  15. package/dist/packageVersion.js +1 -1
  16. package/dist/packageVersion.js.map +1 -1
  17. package/lib/dataStoreRuntime.d.ts +17 -5
  18. package/lib/dataStoreRuntime.d.ts.map +1 -1
  19. package/lib/dataStoreRuntime.js +107 -58
  20. package/lib/dataStoreRuntime.js.map +1 -1
  21. package/lib/fluidHandle.d.ts +8 -4
  22. package/lib/fluidHandle.d.ts.map +1 -1
  23. package/lib/fluidHandle.js +28 -20
  24. package/lib/fluidHandle.js.map +1 -1
  25. package/lib/localChannelContext.d.ts +2 -2
  26. package/lib/localChannelContext.d.ts.map +1 -1
  27. package/lib/localChannelContext.js +9 -9
  28. package/lib/localChannelContext.js.map +1 -1
  29. package/lib/packageVersion.d.ts +1 -1
  30. package/lib/packageVersion.d.ts.map +1 -1
  31. package/lib/packageVersion.js +1 -1
  32. package/lib/packageVersion.js.map +1 -1
  33. package/package.json +28 -17
  34. package/src/dataStoreRuntime.ts +123 -64
  35. package/src/fluidHandle.ts +31 -24
  36. package/src/localChannelContext.ts +9 -9
  37. 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 attached = false;
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 attached or loaded
66
- if (this.attached && this.isLoaded) {
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.attached, 0x188 /* "Local channel must be attached when processing op" */);
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.attached, 0x18b /* "Local channel must be attached when resubmitting op" */);
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 markAttached(): void {
112
- if (this.attached) {
113
- throw new Error("Channel is already attached");
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.attached = true;
120
+ this.globallyVisible = true;
121
121
  }
122
122
 
123
123
  /**
@@ -6,4 +6,4 @@
6
6
  */
7
7
 
8
8
  export const pkgName = "@fluidframework/datastore";
9
- export const pkgVersion = "0.58.2001";
9
+ export const pkgVersion = "0.59.2000-61729";