@fluidframework/datastore 2.53.1 → 2.61.0-355054

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 (86) hide show
  1. package/.mocharc.cjs +1 -2
  2. package/CHANGELOG.md +4 -0
  3. package/api-report/{datastore.legacy.alpha.api.md → datastore.legacy.beta.api.md} +7 -7
  4. package/dist/channelContext.d.ts +5 -5
  5. package/dist/channelContext.d.ts.map +1 -1
  6. package/dist/channelContext.js.map +1 -1
  7. package/dist/channelDeltaConnection.d.ts +1 -1
  8. package/dist/channelDeltaConnection.d.ts.map +1 -1
  9. package/dist/channelDeltaConnection.js.map +1 -1
  10. package/dist/channelStorageService.d.ts +3 -3
  11. package/dist/channelStorageService.d.ts.map +1 -1
  12. package/dist/channelStorageService.js.map +1 -1
  13. package/dist/dataStoreRuntime.d.ts +15 -21
  14. package/dist/dataStoreRuntime.d.ts.map +1 -1
  15. package/dist/dataStoreRuntime.js +5 -26
  16. package/dist/dataStoreRuntime.js.map +1 -1
  17. package/dist/fluidHandle.d.ts +3 -4
  18. package/dist/fluidHandle.d.ts.map +1 -1
  19. package/dist/fluidHandle.js +1 -2
  20. package/dist/fluidHandle.js.map +1 -1
  21. package/dist/index.d.ts +1 -1
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js.map +1 -1
  24. package/dist/legacy.d.ts +2 -1
  25. package/dist/localChannelContext.d.ts +6 -6
  26. package/dist/localChannelContext.d.ts.map +1 -1
  27. package/dist/localChannelContext.js.map +1 -1
  28. package/dist/localChannelStorageService.d.ts +2 -2
  29. package/dist/localChannelStorageService.d.ts.map +1 -1
  30. package/dist/localChannelStorageService.js.map +1 -1
  31. package/dist/packageVersion.d.ts +1 -1
  32. package/dist/packageVersion.d.ts.map +1 -1
  33. package/dist/packageVersion.js +1 -1
  34. package/dist/packageVersion.js.map +1 -1
  35. package/dist/remoteChannelContext.d.ts +5 -5
  36. package/dist/remoteChannelContext.d.ts.map +1 -1
  37. package/dist/remoteChannelContext.js.map +1 -1
  38. package/internal.d.ts +1 -1
  39. package/legacy.d.ts +1 -1
  40. package/lib/channelContext.d.ts +5 -5
  41. package/lib/channelContext.d.ts.map +1 -1
  42. package/lib/channelContext.js.map +1 -1
  43. package/lib/channelDeltaConnection.d.ts +1 -1
  44. package/lib/channelDeltaConnection.d.ts.map +1 -1
  45. package/lib/channelDeltaConnection.js.map +1 -1
  46. package/lib/channelStorageService.d.ts +3 -3
  47. package/lib/channelStorageService.d.ts.map +1 -1
  48. package/lib/channelStorageService.js.map +1 -1
  49. package/lib/dataStoreRuntime.d.ts +15 -21
  50. package/lib/dataStoreRuntime.d.ts.map +1 -1
  51. package/lib/dataStoreRuntime.js +5 -26
  52. package/lib/dataStoreRuntime.js.map +1 -1
  53. package/lib/fluidHandle.d.ts +3 -4
  54. package/lib/fluidHandle.d.ts.map +1 -1
  55. package/lib/fluidHandle.js +1 -2
  56. package/lib/fluidHandle.js.map +1 -1
  57. package/lib/index.d.ts +1 -1
  58. package/lib/index.d.ts.map +1 -1
  59. package/lib/index.js.map +1 -1
  60. package/lib/legacy.d.ts +2 -1
  61. package/lib/localChannelContext.d.ts +6 -6
  62. package/lib/localChannelContext.d.ts.map +1 -1
  63. package/lib/localChannelContext.js.map +1 -1
  64. package/lib/localChannelStorageService.d.ts +2 -2
  65. package/lib/localChannelStorageService.d.ts.map +1 -1
  66. package/lib/localChannelStorageService.js +1 -1
  67. package/lib/localChannelStorageService.js.map +1 -1
  68. package/lib/packageVersion.d.ts +1 -1
  69. package/lib/packageVersion.d.ts.map +1 -1
  70. package/lib/packageVersion.js +1 -1
  71. package/lib/packageVersion.js.map +1 -1
  72. package/lib/remoteChannelContext.d.ts +5 -5
  73. package/lib/remoteChannelContext.d.ts.map +1 -1
  74. package/lib/remoteChannelContext.js.map +1 -1
  75. package/lib/tsdoc-metadata.json +1 -1
  76. package/package.json +24 -24
  77. package/src/channelContext.ts +7 -7
  78. package/src/channelDeltaConnection.ts +1 -1
  79. package/src/channelStorageService.ts +3 -3
  80. package/src/dataStoreRuntime.ts +38 -56
  81. package/src/fluidHandle.ts +3 -4
  82. package/src/index.ts +1 -1
  83. package/src/localChannelContext.ts +11 -11
  84. package/src/localChannelStorageService.ts +6 -2
  85. package/src/packageVersion.ts +1 -1
  86. package/src/remoteChannelContext.ts +10 -10
@@ -4,16 +4,18 @@
4
4
  */
5
5
 
6
6
  import { TypedEventEmitter, type ILayerCompatDetails } from "@fluid-internal/client-utils";
7
- import { AttachState, IAudience } from "@fluidframework/container-definitions";
8
- import { IDeltaManager } from "@fluidframework/container-definitions/internal";
9
- import {
7
+ import { AttachState, type IAudience } from "@fluidframework/container-definitions";
8
+ import type { IDeltaManager } from "@fluidframework/container-definitions/internal";
9
+ import type {
10
10
  FluidObject,
11
11
  IFluidHandle,
12
12
  IRequest,
13
13
  IResponse,
14
14
  } from "@fluidframework/core-interfaces";
15
- import { IFluidHandleContext } from "@fluidframework/core-interfaces/internal";
16
- import type { IFluidHandleInternal } from "@fluidframework/core-interfaces/internal";
15
+ import type {
16
+ IFluidHandleContext,
17
+ IFluidHandleInternal,
18
+ } from "@fluidframework/core-interfaces/internal";
17
19
  import {
18
20
  assert,
19
21
  debugAssert,
@@ -21,42 +23,42 @@ import {
21
23
  LazyPromise,
22
24
  unreachableCase,
23
25
  } from "@fluidframework/core-utils/internal";
24
- import {
26
+ import type {
25
27
  IChannel,
26
28
  IChannelFactory,
27
29
  IFluidDataStoreRuntime,
28
30
  IFluidDataStoreRuntimeEvents,
29
- type IDeltaManagerErased,
31
+ IDeltaManagerErased,
30
32
  // eslint-disable-next-line import/no-deprecated
31
- type IFluidDataStoreRuntimeExperimental,
33
+ IFluidDataStoreRuntimeExperimental,
32
34
  } from "@fluidframework/datastore-definitions/internal";
33
35
  import {
34
- IClientDetails,
35
- IQuorumClients,
36
- ISummaryBlob,
37
- ISummaryTree,
36
+ type IClientDetails,
37
+ type IQuorumClients,
38
+ type ISummaryBlob,
39
+ type ISummaryTree,
38
40
  SummaryType,
39
41
  } from "@fluidframework/driver-definitions";
40
- import {
42
+ import type {
41
43
  IDocumentMessage,
42
- type ISnapshotTree,
44
+ ISnapshotTree,
43
45
  ISequencedDocumentMessage,
44
46
  } from "@fluidframework/driver-definitions/internal";
45
47
  import { buildSnapshotTree } from "@fluidframework/driver-utils/internal";
46
- import { IIdCompressor } from "@fluidframework/id-compressor";
48
+ import type { IIdCompressor } from "@fluidframework/id-compressor";
47
49
  import {
48
- ISummaryTreeWithStats,
49
- ITelemetryContext,
50
- IGarbageCollectionData,
51
- CreateChildSummarizerNodeParam,
50
+ type ISummaryTreeWithStats,
51
+ type ITelemetryContext,
52
+ type IGarbageCollectionData,
53
+ type CreateChildSummarizerNodeParam,
52
54
  CreateSummarizerNodeSource,
53
- IAttachMessage,
54
- IEnvelope,
55
- IFluidDataStoreChannel,
56
- IFluidDataStoreContext,
55
+ type IAttachMessage,
56
+ type IEnvelope,
57
+ type IFluidDataStoreChannel,
58
+ type IFluidDataStoreContext,
57
59
  VisibilityState,
58
60
  gcDataBlobKey,
59
- IInboundSignalMessage,
61
+ type IInboundSignalMessage,
60
62
  type IRuntimeMessageCollection,
61
63
  type IRuntimeMessagesContent,
62
64
  // eslint-disable-next-line import/no-deprecated
@@ -83,10 +85,10 @@ import {
83
85
  encodeCompactIdToString,
84
86
  } from "@fluidframework/runtime-utils/internal";
85
87
  import {
86
- ITelemetryLoggerExt,
88
+ type ITelemetryLoggerExt,
87
89
  DataProcessingError,
88
90
  LoggingError,
89
- MonitoringContext,
91
+ type MonitoringContext,
90
92
  UsageError,
91
93
  createChildMonitoringContext,
92
94
  generateStack,
@@ -95,7 +97,7 @@ import {
95
97
  } from "@fluidframework/telemetry-utils/internal";
96
98
  import { v4 as uuid } from "uuid";
97
99
 
98
- import { IChannelContext, summarizeChannel } from "./channelContext.js";
100
+ import { type IChannelContext, summarizeChannel } from "./channelContext.js";
99
101
  import {
100
102
  dataStoreCompatDetailsForRuntime,
101
103
  validateRuntimeCompatibility,
@@ -126,8 +128,7 @@ function contextSupportsFeature<K extends keyof IFluidDataStoreContextFeaturesTo
126
128
  }
127
129
 
128
130
  /**
129
- * @legacy
130
- * @alpha
131
+ * @legacy @beta
131
132
  */
132
133
  export enum DataStoreMessageType {
133
134
  // Creates a new channel
@@ -136,8 +137,7 @@ export enum DataStoreMessageType {
136
137
  }
137
138
 
138
139
  /**
139
- * @legacy
140
- * @alpha
140
+ * @legacy @beta
141
141
  */
142
142
  export interface ISharedObjectRegistry {
143
143
  // TODO consider making this async. A consequence is that either the creation of a distributed data type
@@ -167,8 +167,7 @@ function initializePendingOpCount(): { value: number } {
167
167
 
168
168
  /**
169
169
  * Base data store class
170
- * @legacy
171
- * @alpha
170
+ * @legacy @beta
172
171
  */
173
172
  export class FluidDataStoreRuntime
174
173
  extends TypedEventEmitter<IFluidDataStoreRuntimeEvents>
@@ -1129,25 +1128,10 @@ export class FluidDataStoreRuntime
1129
1128
  private visitLocalBoundContextsDuringAttach(
1130
1129
  visitor: (contextId: string, context: LocalChannelContextBase) => void,
1131
1130
  ): void {
1132
- /**
1133
- * back-compat 0.59.1000 - getAttachSummary() is called when making a data store globally visible (previously
1134
- * attaching state). Ideally, attachGraph() should have already be called making it locally visible. However,
1135
- * before visibility state was added, this may not have been the case and getAttachSummary() could be called:
1136
- *
1137
- * 1. Before attaching the data store - When a detached container is attached.
1138
- *
1139
- * 2. After attaching the data store - When a data store is created and bound in an attached container.
1140
- *
1141
- * The basic idea is that all local object should become locally visible before they are globally visible.
1142
- */
1143
- this.attachGraph();
1144
-
1145
- // This assert cannot be added now due to back-compat. To be uncommented when the following issue is fixed -
1146
- // https://github.com/microsoft/FluidFramework/issues/9688.
1147
- //
1148
- // assert(this.visibilityState === VisibilityState.LocallyVisible,
1149
- // "The data store should be locally visible when generating attach summary",
1150
- // );
1131
+ assert(
1132
+ this.visibilityState === VisibilityState.LocallyVisible,
1133
+ 0xc2c /* The data store should be locally visible when generating attach summary */,
1134
+ );
1151
1135
 
1152
1136
  const visitedContexts = new Set<string>();
1153
1137
  let visitedLength = -1;
@@ -1511,8 +1495,7 @@ export class FluidDataStoreRuntime
1511
1495
  * Request handler is only called when data store can't resolve request, i.e. for custom requests.
1512
1496
  * @param Base - base class, inherits from FluidDataStoreRuntime
1513
1497
  * @param requestHandler - request handler to mix in
1514
- * @legacy
1515
- * @alpha
1498
+ * @legacy @beta
1516
1499
  */
1517
1500
  export const mixinRequestHandler = (
1518
1501
  requestHandler: (request: IRequest, runtime: FluidDataStoreRuntime) => Promise<IResponse>,
@@ -1533,8 +1516,7 @@ export const mixinRequestHandler = (
1533
1516
  * @param handler - handler that returns info about blob to be added to summary.
1534
1517
  * Or undefined not to add anything to summary.
1535
1518
  * @param Base - base class, inherits from FluidDataStoreRuntime
1536
- * @legacy
1537
- * @alpha
1519
+ * @legacy @beta
1538
1520
  */
1539
1521
  export const mixinSummaryHandler = (
1540
1522
  handler: (
@@ -3,8 +3,8 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
- import { FluidObject } from "@fluidframework/core-interfaces";
7
- import { IFluidHandleContext } from "@fluidframework/core-interfaces/internal";
6
+ import type { FluidObject } from "@fluidframework/core-interfaces";
7
+ import type { IFluidHandleContext } from "@fluidframework/core-interfaces/internal";
8
8
  import {
9
9
  generateHandleContextPath,
10
10
  FluidHandleBase,
@@ -12,8 +12,7 @@ import {
12
12
 
13
13
  /**
14
14
  * Handle for a shared {@link @fluidframework/core-interfaces#FluidObject}.
15
- * @legacy
16
- * @alpha
15
+ * @legacy @beta
17
16
  */
18
17
  export class FluidObjectHandle<
19
18
  T extends FluidObject = FluidObject,
package/src/index.ts CHANGED
@@ -7,7 +7,7 @@ export { FluidObjectHandle } from "./fluidHandle.js";
7
7
  export {
8
8
  DataStoreMessageType,
9
9
  FluidDataStoreRuntime,
10
- ISharedObjectRegistry,
10
+ type ISharedObjectRegistry,
11
11
  mixinRequestHandler,
12
12
  mixinSummaryHandler,
13
13
  } from "./dataStoreRuntime.js";
@@ -3,37 +3,37 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
- import { ISnapshotTreeWithBlobContents } from "@fluidframework/container-definitions/internal";
6
+ import type { ISnapshotTreeWithBlobContents } from "@fluidframework/container-definitions/internal";
7
7
  import { assert, Lazy, LazyPromise } from "@fluidframework/core-utils/internal";
8
- import {
8
+ import type {
9
9
  IChannel,
10
10
  IFluidDataStoreRuntime,
11
11
  } from "@fluidframework/datastore-definitions/internal";
12
- import { ISnapshotTree } from "@fluidframework/driver-definitions/internal";
13
- import {
12
+ import type { ISnapshotTree } from "@fluidframework/driver-definitions/internal";
13
+ import type {
14
14
  ITelemetryContext,
15
15
  IFluidDataStoreContext,
16
16
  IGarbageCollectionData,
17
17
  ISummarizeResult,
18
- type IPendingMessagesState,
19
- type IRuntimeMessageCollection,
20
- type IRuntimeStorageService,
18
+ IPendingMessagesState,
19
+ IRuntimeMessageCollection,
20
+ IRuntimeStorageService,
21
21
  } from "@fluidframework/runtime-definitions/internal";
22
22
  import {
23
- ITelemetryLoggerExt,
23
+ type ITelemetryLoggerExt,
24
24
  DataProcessingError,
25
25
  } from "@fluidframework/telemetry-utils/internal";
26
26
 
27
27
  import {
28
- ChannelServiceEndpoints,
29
- IChannelContext,
28
+ type ChannelServiceEndpoints,
29
+ type IChannelContext,
30
30
  createChannelServiceEndpoints,
31
31
  loadChannel,
32
32
  loadChannelFactoryAndAttributes,
33
33
  summarizeChannel,
34
34
  summarizeChannelAsync,
35
35
  } from "./channelContext.js";
36
- import { ISharedObjectRegistry } from "./dataStoreRuntime.js";
36
+ import type { ISharedObjectRegistry } from "./dataStoreRuntime.js";
37
37
 
38
38
  /**
39
39
  * Channel context for a locally created channel
@@ -4,8 +4,12 @@
4
4
  */
5
5
 
6
6
  import { stringToBuffer } from "@fluid-internal/client-utils";
7
- import { IChannelStorageService } from "@fluidframework/datastore-definitions/internal";
8
- import { IBlob, ITree, TreeEntry } from "@fluidframework/driver-definitions/internal";
7
+ import type { IChannelStorageService } from "@fluidframework/datastore-definitions/internal";
8
+ import {
9
+ type IBlob,
10
+ type ITree,
11
+ TreeEntry,
12
+ } from "@fluidframework/driver-definitions/internal";
9
13
  import { listBlobsAtTreePath } from "@fluidframework/runtime-utils/internal";
10
14
 
11
15
  export class LocalChannelStorageService implements IChannelStorageService {
@@ -6,4 +6,4 @@
6
6
  */
7
7
 
8
8
  export const pkgName = "@fluidframework/datastore";
9
- export const pkgVersion = "2.53.1";
9
+ export const pkgVersion = "2.61.0-355054";
@@ -5,12 +5,12 @@
5
5
 
6
6
  import { AttachState } from "@fluidframework/container-definitions/internal";
7
7
  import { assert, LazyPromise } from "@fluidframework/core-utils/internal";
8
- import {
8
+ import type {
9
9
  IChannel,
10
10
  IFluidDataStoreRuntime,
11
11
  } from "@fluidframework/datastore-definitions/internal";
12
- import { ISnapshotTree } from "@fluidframework/driver-definitions/internal";
13
- import {
12
+ import type { ISnapshotTree } from "@fluidframework/driver-definitions/internal";
13
+ import type {
14
14
  IExperimentalIncrementalSummaryContext,
15
15
  ITelemetryContext,
16
16
  IGarbageCollectionData,
@@ -19,25 +19,25 @@ import {
19
19
  ISummarizeInternalResult,
20
20
  ISummarizeResult,
21
21
  ISummarizerNodeWithGC,
22
- type IPendingMessagesState,
23
- type IRuntimeMessageCollection,
24
- type IRuntimeStorageService,
22
+ IPendingMessagesState,
23
+ IRuntimeMessageCollection,
24
+ IRuntimeStorageService,
25
25
  } from "@fluidframework/runtime-definitions/internal";
26
26
  import {
27
- ITelemetryLoggerExt,
27
+ type ITelemetryLoggerExt,
28
28
  ThresholdCounter,
29
29
  createChildLogger,
30
30
  } from "@fluidframework/telemetry-utils/internal";
31
31
 
32
32
  import {
33
- ChannelServiceEndpoints,
34
- IChannelContext,
33
+ type ChannelServiceEndpoints,
34
+ type IChannelContext,
35
35
  createChannelServiceEndpoints,
36
36
  loadChannel,
37
37
  loadChannelFactoryAndAttributes,
38
38
  summarizeChannelAsync,
39
39
  } from "./channelContext.js";
40
- import { ISharedObjectRegistry } from "./dataStoreRuntime.js";
40
+ import type { ISharedObjectRegistry } from "./dataStoreRuntime.js";
41
41
 
42
42
  export class RemoteChannelContext implements IChannelContext {
43
43
  private isLoaded = false;