@fluidframework/datastore 2.0.0-dev-rc.5.0.0.271717 → 2.0.0-dev-rc.5.0.0.272889

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 (56) hide show
  1. package/api-extractor/api-extractor-lint-bundle.json +5 -0
  2. package/api-extractor/api-extractor-lint-legacy.cjs.json +5 -0
  3. package/api-extractor/api-extractor-lint-legacy.esm.json +5 -0
  4. package/api-extractor/api-extractor-lint-public.cjs.json +5 -0
  5. package/api-extractor/api-extractor-lint-public.esm.json +5 -0
  6. package/api-extractor.json +1 -1
  7. package/dist/channelContext.d.ts.map +1 -1
  8. package/dist/channelContext.js.map +1 -1
  9. package/dist/channelDeltaConnection.d.ts.map +1 -1
  10. package/dist/channelDeltaConnection.js.map +1 -1
  11. package/dist/dataStoreRuntime.d.ts +12 -7
  12. package/dist/dataStoreRuntime.d.ts.map +1 -1
  13. package/dist/dataStoreRuntime.js +29 -34
  14. package/dist/dataStoreRuntime.js.map +1 -1
  15. package/dist/fluidHandle.d.ts.map +1 -1
  16. package/dist/fluidHandle.js.map +1 -1
  17. package/dist/localChannelContext.d.ts.map +1 -1
  18. package/dist/localChannelContext.js.map +1 -1
  19. package/dist/localChannelStorageService.d.ts.map +1 -1
  20. package/dist/localChannelStorageService.js.map +1 -1
  21. package/dist/packageVersion.d.ts +1 -1
  22. package/dist/packageVersion.js +1 -1
  23. package/dist/packageVersion.js.map +1 -1
  24. package/dist/remoteChannelContext.d.ts.map +1 -1
  25. package/dist/remoteChannelContext.js.map +1 -1
  26. package/lib/channelContext.d.ts.map +1 -1
  27. package/lib/channelContext.js.map +1 -1
  28. package/lib/channelDeltaConnection.d.ts.map +1 -1
  29. package/lib/channelDeltaConnection.js.map +1 -1
  30. package/lib/dataStoreRuntime.d.ts +12 -7
  31. package/lib/dataStoreRuntime.d.ts.map +1 -1
  32. package/lib/dataStoreRuntime.js +29 -34
  33. package/lib/dataStoreRuntime.js.map +1 -1
  34. package/lib/fluidHandle.d.ts.map +1 -1
  35. package/lib/fluidHandle.js +1 -1
  36. package/lib/fluidHandle.js.map +1 -1
  37. package/lib/localChannelContext.d.ts.map +1 -1
  38. package/lib/localChannelContext.js +1 -1
  39. package/lib/localChannelContext.js.map +1 -1
  40. package/lib/localChannelStorageService.d.ts.map +1 -1
  41. package/lib/localChannelStorageService.js.map +1 -1
  42. package/lib/packageVersion.d.ts +1 -1
  43. package/lib/packageVersion.js +1 -1
  44. package/lib/packageVersion.js.map +1 -1
  45. package/lib/remoteChannelContext.d.ts.map +1 -1
  46. package/lib/remoteChannelContext.js.map +1 -1
  47. package/package.json +23 -17
  48. package/src/channelContext.ts +5 -1
  49. package/src/channelDeltaConnection.ts +9 -2
  50. package/src/dataStoreRuntime.ts +66 -83
  51. package/src/fluidHandle.ts +7 -2
  52. package/src/localChannelContext.ts +8 -2
  53. package/src/localChannelStorageService.ts +1 -4
  54. package/src/packageVersion.ts +1 -1
  55. package/src/remoteChannelContext.ts +5 -6
  56. package/tsdoc.json +4 -0
@@ -1 +1 @@
1
- {"version":3,"file":"remoteChannelContext.d.ts","sourceRoot":"","sources":["../src/remoteChannelContext.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,QAAQ,EAAE,sBAAsB,EAAE,MAAM,gDAAgD,CAAC;AAClG,OAAO,EACN,uBAAuB,EACvB,aAAa,EACb,yBAAyB,EACzB,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAEN,iBAAiB,EACjB,sBAAsB,EACtB,2BAA2B,EAC3B,sBAAsB,EAEtB,gBAAgB,EAEhB,MAAM,8CAA8C,CAAC;AAOtD,OAAO,EAEN,eAAe,EAKf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,qBAAa,oBAAqB,YAAW,eAAe;IAiB1D,OAAO,CAAC,QAAQ,CAAC,EAAE;IAhBpB,OAAO,CAAC,QAAQ,CAAS;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,EAAE,CAAC;QACxC,OAAO,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAClC,CAAC;IAEM,gBAAgB,CAAC,UAAoB;QAC3C;;;;;WAKG;QACH,IAAI,CAAC,cAAc,CAAC,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC5C,CAAC;;AA7MuB,6CAAwB,GAAG,IAAI,AAAP,CAAQ","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { AttachState } from \"@fluidframework/container-definitions\";\nimport { assert, LazyPromise } from \"@fluidframework/core-utils/internal\";\nimport { IChannel, IFluidDataStoreRuntime } from \"@fluidframework/datastore-definitions/internal\";\nimport {\n\tIDocumentStorageService,\n\tISnapshotTree,\n\tISequencedDocumentMessage,\n} from \"@fluidframework/driver-definitions/internal\";\nimport {\n\tIExperimentalIncrementalSummaryContext,\n\tITelemetryContext,\n\tIGarbageCollectionData,\n\tCreateChildSummarizerNodeFn,\n\tIFluidDataStoreContext,\n\tISummarizeInternalResult,\n\tISummarizeResult,\n\tISummarizerNodeWithGC,\n} from \"@fluidframework/runtime-definitions/internal\";\nimport {\n\tITelemetryLoggerExt,\n\tThresholdCounter,\n\tcreateChildLogger,\n} from \"@fluidframework/telemetry-utils/internal\";\n\nimport {\n\tChannelServiceEndpoints,\n\tIChannelContext,\n\tcreateChannelServiceEndpoints,\n\tloadChannel,\n\tloadChannelFactoryAndAttributes,\n\tsummarizeChannelAsync,\n} from \"./channelContext.js\";\nimport { ISharedObjectRegistry } from \"./dataStoreRuntime.js\";\n\nexport class RemoteChannelContext implements IChannelContext {\n\tprivate isLoaded = false;\n\tprivate pending: ISequencedDocumentMessage[] | undefined = [];\n\tprivate readonly channelP: Promise<IChannel>;\n\tprivate channel: IChannel | undefined;\n\tprivate readonly services: ChannelServiceEndpoints;\n\tprivate readonly summarizerNode: ISummarizerNodeWithGC;\n\tprivate readonly subLogger: ITelemetryLoggerExt;\n\tprivate readonly thresholdOpsCounter: ThresholdCounter;\n\tprivate static readonly pendingOpsCountThreshold = 1000;\n\n\tconstructor(\n\t\truntime: IFluidDataStoreRuntime,\n\t\tdataStoreContext: IFluidDataStoreContext,\n\t\tstorageService: IDocumentStorageService,\n\t\tsubmitFn: (content: any, localOpMetadata: unknown) => void,\n\t\tdirtyFn: (address: string) => void,\n\t\tprivate readonly id: string,\n\t\tbaseSnapshot: ISnapshotTree,\n\t\tregistry: ISharedObjectRegistry,\n\t\textraBlobs: Map<string, ArrayBufferLike> | undefined,\n\t\tcreateSummarizerNode: CreateChildSummarizerNodeFn,\n\t\tattachMessageType?: string,\n\t) {\n\t\tassert(!this.id.includes(\"/\"), 0x310 /* Channel context ID cannot contain slashes */);\n\n\t\tthis.subLogger = createChildLogger({\n\t\t\tlogger: runtime.logger,\n\t\t\tnamespace: \"RemoteChannelContext\",\n\t\t});\n\n\t\tthis.services = createChannelServiceEndpoints(\n\t\t\tdataStoreContext.connected,\n\t\t\tsubmitFn,\n\t\t\t() => dirtyFn(this.id),\n\t\t\t() => runtime.attachState !== AttachState.Detached,\n\t\t\tstorageService,\n\t\t\tthis.subLogger,\n\t\t\tbaseSnapshot,\n\t\t\textraBlobs,\n\t\t);\n\n\t\tthis.channelP = new LazyPromise<IChannel>(async () => {\n\t\t\tconst { attributes, factory } = await loadChannelFactoryAndAttributes(\n\t\t\t\tdataStoreContext,\n\t\t\t\tthis.services,\n\t\t\t\tthis.id,\n\t\t\t\tregistry,\n\t\t\t\tattachMessageType,\n\t\t\t);\n\n\t\t\tconst channel = await loadChannel(\n\t\t\t\truntime,\n\t\t\t\tattributes,\n\t\t\t\tfactory,\n\t\t\t\tthis.services,\n\t\t\t\tthis.subLogger,\n\t\t\t\tthis.id,\n\t\t\t);\n\n\t\t\t// Send all pending messages to the channel\n\t\t\tassert(this.pending !== undefined, 0x23f /* \"pending undefined\" */);\n\t\t\tfor (const message of this.pending) {\n\t\t\t\tthis.services.deltaConnection.process(\n\t\t\t\t\tmessage,\n\t\t\t\t\tfalse,\n\t\t\t\t\tundefined /* localOpMetadata */,\n\t\t\t\t);\n\t\t\t}\n\t\t\tthis.thresholdOpsCounter.send(\"ProcessPendingOps\", this.pending.length);\n\n\t\t\t// Commit changes.\n\t\t\tthis.channel = channel;\n\t\t\tthis.pending = undefined;\n\t\t\tthis.isLoaded = true;\n\n\t\t\t// Because have some await between we created the service and here, the connection state might have changed\n\t\t\t// and we don't propagate the connection state when we are not loaded. So we have to set it again here.\n\t\t\tthis.services.deltaConnection.setConnectionState(dataStoreContext.connected);\n\t\t\treturn this.channel;\n\t\t});\n\n\t\tconst thisSummarizeInternal = async (\n\t\t\tfullTree: boolean,\n\t\t\ttrackState: boolean,\n\t\t\ttelemetryContext?: ITelemetryContext,\n\t\t\tincrementalSummaryContext?: IExperimentalIncrementalSummaryContext,\n\t\t) =>\n\t\t\tthis.summarizeInternal(\n\t\t\t\tfullTree,\n\t\t\t\ttrackState,\n\t\t\t\ttelemetryContext,\n\t\t\t\tincrementalSummaryContext,\n\t\t\t);\n\n\t\tthis.summarizerNode = createSummarizerNode(\n\t\t\tthisSummarizeInternal,\n\t\t\tasync (fullGC?: boolean) => this.getGCDataInternal(fullGC),\n\t\t);\n\n\t\tthis.thresholdOpsCounter = new ThresholdCounter(\n\t\t\tRemoteChannelContext.pendingOpsCountThreshold,\n\t\t\tthis.subLogger,\n\t\t);\n\t}\n\n\t// eslint-disable-next-line @typescript-eslint/promise-function-async\n\tpublic getChannel(): Promise<IChannel> {\n\t\treturn this.channelP;\n\t}\n\n\tpublic setConnectionState(connected: boolean, clientId?: string) {\n\t\t// Connection events are ignored if the data store is not yet loaded\n\t\tif (!this.isLoaded) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.services.deltaConnection.setConnectionState(connected);\n\t}\n\n\tpublic applyStashedOp(content: any): unknown {\n\t\tassert(this.isLoaded, 0x194 /* \"Remote channel must be loaded when rebasing op\" */);\n\t\treturn this.services.deltaConnection.applyStashedOp(content);\n\t}\n\n\tpublic processOp(\n\t\tmessage: ISequencedDocumentMessage,\n\t\tlocal: boolean,\n\t\tlocalOpMetadata: unknown,\n\t): void {\n\t\tthis.summarizerNode.invalidate(message.sequenceNumber);\n\n\t\tif (this.isLoaded) {\n\t\t\tthis.services.deltaConnection.process(message, local, localOpMetadata);\n\t\t} else {\n\t\t\tassert(!local, 0x195 /* \"Remote channel must not be local when processing op\" */);\n\t\t\tassert(this.pending !== undefined, 0x23e /* \"pending is undefined\" */);\n\t\t\tthis.pending.push(message);\n\t\t\tthis.thresholdOpsCounter.sendIfMultiple(\"StorePendingOps\", this.pending.length);\n\t\t}\n\t}\n\n\tpublic reSubmit(content: any, localOpMetadata: unknown) {\n\t\tassert(this.isLoaded, 0x196 /* \"Remote channel must be loaded when resubmitting op\" */);\n\n\t\tthis.services.deltaConnection.reSubmit(content, localOpMetadata);\n\t}\n\n\tpublic rollback(content: any, localOpMetadata: unknown) {\n\t\tassert(this.isLoaded, 0x2f0 /* \"Remote channel must be loaded when rolling back op\" */);\n\n\t\tthis.services.deltaConnection.rollback(content, localOpMetadata);\n\t}\n\n\t/**\n\t * Returns a summary at the current sequence number.\n\t * @param fullTree - true to bypass optimizations and force a full summary tree\n\t * @param trackState - This tells whether we should track state from this summary.\n\t * @param telemetryContext - summary data passed through the layers for telemetry purposes\n\t */\n\tpublic async summarize(\n\t\tfullTree: boolean = false,\n\t\ttrackState: boolean = true,\n\t\ttelemetryContext?: ITelemetryContext,\n\t): Promise<ISummarizeResult> {\n\t\treturn this.summarizerNode.summarize(fullTree, trackState, telemetryContext);\n\t}\n\n\tprivate async summarizeInternal(\n\t\tfullTree: boolean,\n\t\ttrackState: boolean,\n\t\ttelemetryContext?: ITelemetryContext,\n\t\tincrementalSummaryContext?: IExperimentalIncrementalSummaryContext,\n\t): Promise<ISummarizeInternalResult> {\n\t\tconst channel = await this.getChannel();\n\t\tconst summarizeResult = await summarizeChannelAsync(\n\t\t\tchannel,\n\t\t\tfullTree,\n\t\t\ttrackState,\n\t\t\ttelemetryContext,\n\t\t\tincrementalSummaryContext,\n\t\t);\n\t\treturn { ...summarizeResult, id: this.id };\n\t}\n\n\t/**\n\t * Returns the data used for garbage collection. This includes a list of GC nodes that represent this context.\n\t * Each node has a set of outbound routes to other GC nodes in the document.\n\t * If there is no new data in this context since the last summary, previous GC data is used.\n\t * If there is new data, the GC data is generated again (by calling getGCDataInternal).\n\t * @param fullGC - true to bypass optimizations and force full generation of GC data.\n\t */\n\tpublic async getGCData(fullGC: boolean = false): Promise<IGarbageCollectionData> {\n\t\treturn this.summarizerNode.getGCData(fullGC);\n\t}\n\n\t/**\n\t * Generates the data used for garbage collection. This is called when there is new data since last summary. It\n\t * loads the context and calls into the channel to get its GC data.\n\t * @param fullGC - true to bypass optimizations and force full generation of GC data.\n\t */\n\tprivate async getGCDataInternal(fullGC: boolean = false): Promise<IGarbageCollectionData> {\n\t\tconst channel = await this.getChannel();\n\t\treturn channel.getGCData(fullGC);\n\t}\n\n\tpublic updateUsedRoutes(usedRoutes: string[]) {\n\t\t/**\n\t\t * Currently, DDSes are always considered referenced and are not garbage collected. Update the summarizer node's\n\t\t * used routes to contain a route to this channel context.\n\t\t * Once we have GC at DDS level, this will be updated to use the passed usedRoutes. See -\n\t\t * https://github.com/microsoft/FluidFramework/issues/4611\n\t\t */\n\t\tthis.summarizerNode.updateUsedRoutes([\"\"]);\n\t}\n}\n"]}
1
+ {"version":3,"file":"remoteChannelContext.js","sourceRoot":"","sources":["../src/remoteChannelContext.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAoB1E,OAAO,EAEN,gBAAgB,EAChB,iBAAiB,GACjB,MAAM,0CAA0C,CAAC;AAElD,OAAO,EAGN,6BAA6B,EAC7B,WAAW,EACX,+BAA+B,EAC/B,qBAAqB,G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6CAAwB,GAAG,IAAI,AAAP,CAAQ","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { AttachState } from \"@fluidframework/container-definitions\";\nimport { assert, LazyPromise } from \"@fluidframework/core-utils/internal\";\nimport {\n\tIChannel,\n\tIFluidDataStoreRuntime,\n} from \"@fluidframework/datastore-definitions/internal\";\nimport {\n\tIDocumentStorageService,\n\tISnapshotTree,\n\tISequencedDocumentMessage,\n} from \"@fluidframework/driver-definitions/internal\";\nimport {\n\tIExperimentalIncrementalSummaryContext,\n\tITelemetryContext,\n\tIGarbageCollectionData,\n\tCreateChildSummarizerNodeFn,\n\tIFluidDataStoreContext,\n\tISummarizeInternalResult,\n\tISummarizeResult,\n\tISummarizerNodeWithGC,\n} from \"@fluidframework/runtime-definitions/internal\";\nimport {\n\tITelemetryLoggerExt,\n\tThresholdCounter,\n\tcreateChildLogger,\n} from \"@fluidframework/telemetry-utils/internal\";\n\nimport {\n\tChannelServiceEndpoints,\n\tIChannelContext,\n\tcreateChannelServiceEndpoints,\n\tloadChannel,\n\tloadChannelFactoryAndAttributes,\n\tsummarizeChannelAsync,\n} from \"./channelContext.js\";\nimport { ISharedObjectRegistry } from \"./dataStoreRuntime.js\";\n\nexport class RemoteChannelContext implements IChannelContext {\n\tprivate isLoaded = false;\n\tprivate pending: ISequencedDocumentMessage[] | undefined = [];\n\tprivate readonly channelP: Promise<IChannel>;\n\tprivate channel: IChannel | undefined;\n\tprivate readonly services: ChannelServiceEndpoints;\n\tprivate readonly summarizerNode: ISummarizerNodeWithGC;\n\tprivate readonly subLogger: ITelemetryLoggerExt;\n\tprivate readonly thresholdOpsCounter: ThresholdCounter;\n\tprivate static readonly pendingOpsCountThreshold = 1000;\n\n\tconstructor(\n\t\truntime: IFluidDataStoreRuntime,\n\t\tdataStoreContext: IFluidDataStoreContext,\n\t\tstorageService: IDocumentStorageService,\n\t\tsubmitFn: (content: any, localOpMetadata: unknown) => void,\n\t\tdirtyFn: (address: string) => void,\n\t\tprivate readonly id: string,\n\t\tbaseSnapshot: ISnapshotTree,\n\t\tregistry: ISharedObjectRegistry,\n\t\textraBlobs: Map<string, ArrayBufferLike> | undefined,\n\t\tcreateSummarizerNode: CreateChildSummarizerNodeFn,\n\t\tattachMessageType?: string,\n\t) {\n\t\tassert(!this.id.includes(\"/\"), 0x310 /* Channel context ID cannot contain slashes */);\n\n\t\tthis.subLogger = createChildLogger({\n\t\t\tlogger: runtime.logger,\n\t\t\tnamespace: \"RemoteChannelContext\",\n\t\t});\n\n\t\tthis.services = createChannelServiceEndpoints(\n\t\t\tdataStoreContext.connected,\n\t\t\tsubmitFn,\n\t\t\t() => dirtyFn(this.id),\n\t\t\t() => runtime.attachState !== AttachState.Detached,\n\t\t\tstorageService,\n\t\t\tthis.subLogger,\n\t\t\tbaseSnapshot,\n\t\t\textraBlobs,\n\t\t);\n\n\t\tthis.channelP = new LazyPromise<IChannel>(async () => {\n\t\t\tconst { attributes, factory } = await loadChannelFactoryAndAttributes(\n\t\t\t\tdataStoreContext,\n\t\t\t\tthis.services,\n\t\t\t\tthis.id,\n\t\t\t\tregistry,\n\t\t\t\tattachMessageType,\n\t\t\t);\n\n\t\t\tconst channel = await loadChannel(\n\t\t\t\truntime,\n\t\t\t\tattributes,\n\t\t\t\tfactory,\n\t\t\t\tthis.services,\n\t\t\t\tthis.subLogger,\n\t\t\t\tthis.id,\n\t\t\t);\n\n\t\t\t// Send all pending messages to the channel\n\t\t\tassert(this.pending !== undefined, 0x23f /* \"pending undefined\" */);\n\t\t\tfor (const message of this.pending) {\n\t\t\t\tthis.services.deltaConnection.process(message, false, undefined /* localOpMetadata */);\n\t\t\t}\n\t\t\tthis.thresholdOpsCounter.send(\"ProcessPendingOps\", this.pending.length);\n\n\t\t\t// Commit changes.\n\t\t\tthis.channel = channel;\n\t\t\tthis.pending = undefined;\n\t\t\tthis.isLoaded = true;\n\n\t\t\t// Because have some await between we created the service and here, the connection state might have changed\n\t\t\t// and we don't propagate the connection state when we are not loaded. So we have to set it again here.\n\t\t\tthis.services.deltaConnection.setConnectionState(dataStoreContext.connected);\n\t\t\treturn this.channel;\n\t\t});\n\n\t\tconst thisSummarizeInternal = async (\n\t\t\tfullTree: boolean,\n\t\t\ttrackState: boolean,\n\t\t\ttelemetryContext?: ITelemetryContext,\n\t\t\tincrementalSummaryContext?: IExperimentalIncrementalSummaryContext,\n\t\t) =>\n\t\t\tthis.summarizeInternal(\n\t\t\t\tfullTree,\n\t\t\t\ttrackState,\n\t\t\t\ttelemetryContext,\n\t\t\t\tincrementalSummaryContext,\n\t\t\t);\n\n\t\tthis.summarizerNode = createSummarizerNode(\n\t\t\tthisSummarizeInternal,\n\t\t\tasync (fullGC?: boolean) => this.getGCDataInternal(fullGC),\n\t\t);\n\n\t\tthis.thresholdOpsCounter = new ThresholdCounter(\n\t\t\tRemoteChannelContext.pendingOpsCountThreshold,\n\t\t\tthis.subLogger,\n\t\t);\n\t}\n\n\t// eslint-disable-next-line @typescript-eslint/promise-function-async\n\tpublic getChannel(): Promise<IChannel> {\n\t\treturn this.channelP;\n\t}\n\n\tpublic setConnectionState(connected: boolean, clientId?: string) {\n\t\t// Connection events are ignored if the data store is not yet loaded\n\t\tif (!this.isLoaded) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.services.deltaConnection.setConnectionState(connected);\n\t}\n\n\tpublic applyStashedOp(content: any): unknown {\n\t\tassert(this.isLoaded, 0x194 /* \"Remote channel must be loaded when rebasing op\" */);\n\t\treturn this.services.deltaConnection.applyStashedOp(content);\n\t}\n\n\tpublic processOp(\n\t\tmessage: ISequencedDocumentMessage,\n\t\tlocal: boolean,\n\t\tlocalOpMetadata: unknown,\n\t): void {\n\t\tthis.summarizerNode.invalidate(message.sequenceNumber);\n\n\t\tif (this.isLoaded) {\n\t\t\tthis.services.deltaConnection.process(message, local, localOpMetadata);\n\t\t} else {\n\t\t\tassert(!local, 0x195 /* \"Remote channel must not be local when processing op\" */);\n\t\t\tassert(this.pending !== undefined, 0x23e /* \"pending is undefined\" */);\n\t\t\tthis.pending.push(message);\n\t\t\tthis.thresholdOpsCounter.sendIfMultiple(\"StorePendingOps\", this.pending.length);\n\t\t}\n\t}\n\n\tpublic reSubmit(content: any, localOpMetadata: unknown) {\n\t\tassert(this.isLoaded, 0x196 /* \"Remote channel must be loaded when resubmitting op\" */);\n\n\t\tthis.services.deltaConnection.reSubmit(content, localOpMetadata);\n\t}\n\n\tpublic rollback(content: any, localOpMetadata: unknown) {\n\t\tassert(this.isLoaded, 0x2f0 /* \"Remote channel must be loaded when rolling back op\" */);\n\n\t\tthis.services.deltaConnection.rollback(content, localOpMetadata);\n\t}\n\n\t/**\n\t * Returns a summary at the current sequence number.\n\t * @param fullTree - true to bypass optimizations and force a full summary tree\n\t * @param trackState - This tells whether we should track state from this summary.\n\t * @param telemetryContext - summary data passed through the layers for telemetry purposes\n\t */\n\tpublic async summarize(\n\t\tfullTree: boolean = false,\n\t\ttrackState: boolean = true,\n\t\ttelemetryContext?: ITelemetryContext,\n\t): Promise<ISummarizeResult> {\n\t\treturn this.summarizerNode.summarize(fullTree, trackState, telemetryContext);\n\t}\n\n\tprivate async summarizeInternal(\n\t\tfullTree: boolean,\n\t\ttrackState: boolean,\n\t\ttelemetryContext?: ITelemetryContext,\n\t\tincrementalSummaryContext?: IExperimentalIncrementalSummaryContext,\n\t): Promise<ISummarizeInternalResult> {\n\t\tconst channel = await this.getChannel();\n\t\tconst summarizeResult = await summarizeChannelAsync(\n\t\t\tchannel,\n\t\t\tfullTree,\n\t\t\ttrackState,\n\t\t\ttelemetryContext,\n\t\t\tincrementalSummaryContext,\n\t\t);\n\t\treturn { ...summarizeResult, id: this.id };\n\t}\n\n\t/**\n\t * Returns the data used for garbage collection. This includes a list of GC nodes that represent this context.\n\t * Each node has a set of outbound routes to other GC nodes in the document.\n\t * If there is no new data in this context since the last summary, previous GC data is used.\n\t * If there is new data, the GC data is generated again (by calling getGCDataInternal).\n\t * @param fullGC - true to bypass optimizations and force full generation of GC data.\n\t */\n\tpublic async getGCData(fullGC: boolean = false): Promise<IGarbageCollectionData> {\n\t\treturn this.summarizerNode.getGCData(fullGC);\n\t}\n\n\t/**\n\t * Generates the data used for garbage collection. This is called when there is new data since last summary. It\n\t * loads the context and calls into the channel to get its GC data.\n\t * @param fullGC - true to bypass optimizations and force full generation of GC data.\n\t */\n\tprivate async getGCDataInternal(fullGC: boolean = false): Promise<IGarbageCollectionData> {\n\t\tconst channel = await this.getChannel();\n\t\treturn channel.getGCData(fullGC);\n\t}\n\n\tpublic updateUsedRoutes(usedRoutes: string[]) {\n\t\t/**\n\t\t * Currently, DDSes are always considered referenced and are not garbage collected. Update the summarizer node's\n\t\t * used routes to contain a route to this channel context.\n\t\t * Once we have GC at DDS level, this will be updated to use the passed usedRoutes. See -\n\t\t * https://github.com/microsoft/FluidFramework/issues/4611\n\t\t */\n\t\tthis.summarizerNode.updateUsedRoutes([\"\"]);\n\t}\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/datastore",
3
- "version": "2.0.0-dev-rc.5.0.0.271717",
3
+ "version": "2.0.0-dev-rc.5.0.0.272889",
4
4
  "description": "Fluid data store implementation",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -67,35 +67,36 @@
67
67
  "temp-directory": "nyc/.nyc_output"
68
68
  },
69
69
  "dependencies": {
70
- "@fluid-internal/client-utils": "2.0.0-dev-rc.5.0.0.271717",
71
- "@fluidframework/container-definitions": "2.0.0-dev-rc.5.0.0.271717",
72
- "@fluidframework/core-interfaces": "2.0.0-dev-rc.5.0.0.271717",
73
- "@fluidframework/core-utils": "2.0.0-dev-rc.5.0.0.271717",
74
- "@fluidframework/datastore-definitions": "2.0.0-dev-rc.5.0.0.271717",
75
- "@fluidframework/driver-definitions": "2.0.0-dev-rc.5.0.0.271717",
76
- "@fluidframework/driver-utils": "2.0.0-dev-rc.5.0.0.271717",
77
- "@fluidframework/id-compressor": "2.0.0-dev-rc.5.0.0.271717",
78
- "@fluidframework/runtime-definitions": "2.0.0-dev-rc.5.0.0.271717",
79
- "@fluidframework/runtime-utils": "2.0.0-dev-rc.5.0.0.271717",
80
- "@fluidframework/telemetry-utils": "2.0.0-dev-rc.5.0.0.271717",
70
+ "@fluid-internal/client-utils": "2.0.0-dev-rc.5.0.0.272889",
71
+ "@fluidframework/container-definitions": "2.0.0-dev-rc.5.0.0.272889",
72
+ "@fluidframework/core-interfaces": "2.0.0-dev-rc.5.0.0.272889",
73
+ "@fluidframework/core-utils": "2.0.0-dev-rc.5.0.0.272889",
74
+ "@fluidframework/datastore-definitions": "2.0.0-dev-rc.5.0.0.272889",
75
+ "@fluidframework/driver-definitions": "2.0.0-dev-rc.5.0.0.272889",
76
+ "@fluidframework/driver-utils": "2.0.0-dev-rc.5.0.0.272889",
77
+ "@fluidframework/id-compressor": "2.0.0-dev-rc.5.0.0.272889",
78
+ "@fluidframework/runtime-definitions": "2.0.0-dev-rc.5.0.0.272889",
79
+ "@fluidframework/runtime-utils": "2.0.0-dev-rc.5.0.0.272889",
80
+ "@fluidframework/telemetry-utils": "2.0.0-dev-rc.5.0.0.272889",
81
81
  "uuid": "^9.0.0"
82
82
  },
83
83
  "devDependencies": {
84
84
  "@arethetypeswrong/cli": "^0.15.2",
85
85
  "@biomejs/biome": "^1.7.3",
86
- "@fluid-internal/mocha-test-setup": "2.0.0-dev-rc.5.0.0.271717",
86
+ "@fluid-internal/mocha-test-setup": "2.0.0-dev-rc.5.0.0.272889",
87
87
  "@fluid-tools/build-cli": "^0.39.0",
88
88
  "@fluidframework/build-common": "^2.0.3",
89
89
  "@fluidframework/build-tools": "^0.39.0",
90
90
  "@fluidframework/datastore-previous": "npm:@fluidframework/datastore@2.0.0-rc.4.0.0",
91
91
  "@fluidframework/eslint-config-fluid": "^5.3.0",
92
- "@fluidframework/test-runtime-utils": "2.0.0-dev-rc.5.0.0.271717",
92
+ "@fluidframework/test-runtime-utils": "2.0.0-dev-rc.5.0.0.272889",
93
93
  "@microsoft/api-extractor": "^7.45.1",
94
94
  "@types/lodash": "^4.14.118",
95
95
  "@types/mocha": "^9.1.1",
96
96
  "@types/node": "^18.19.0",
97
97
  "@types/uuid": "^9.0.2",
98
98
  "c8": "^8.0.1",
99
+ "concurrently": "^8.2.1",
99
100
  "copyfiles": "^2.4.1",
100
101
  "cross-env": "^7.0.3",
101
102
  "eslint": "~8.55.0",
@@ -125,14 +126,19 @@
125
126
  "build:test:esm": "tsc --project ./src/test/tsconfig.json",
126
127
  "check:are-the-types-wrong": "attw --pack .",
127
128
  "check:biome": "biome check . --formatter-enabled=true",
128
- "check:format": "npm run check:prettier",
129
+ "check:exports": "concurrently \"npm:check:exports:*\"",
130
+ "check:exports:bundle-release-tags": "api-extractor run --config api-extractor/api-extractor-lint-bundle.json",
131
+ "check:exports:cjs:legacy": "api-extractor run --config api-extractor/api-extractor-lint-legacy.cjs.json",
132
+ "check:exports:cjs:public": "api-extractor run --config api-extractor/api-extractor-lint-public.cjs.json",
133
+ "check:exports:esm:legacy": "api-extractor run --config api-extractor/api-extractor-lint-legacy.esm.json",
134
+ "check:exports:esm:public": "api-extractor run --config api-extractor/api-extractor-lint-public.esm.json",
135
+ "check:format": "npm run check:biome",
129
136
  "check:prettier": "prettier --check . --cache --ignore-path ../../../.prettierignore",
130
- "check:release-tags": "api-extractor run --local --config ./api-extractor-lint.json",
131
137
  "ci:build:docs": "api-extractor run",
132
138
  "clean": "rimraf --glob dist lib \"*.d.ts\" \"**/*.tsbuildinfo\" \"**/*.build.log\" _api-extractor-temp nyc",
133
139
  "eslint": "eslint --format stylish src",
134
140
  "eslint:fix": "eslint --format stylish src --fix --fix-type problem,suggestion,layout",
135
- "format": "npm run format:prettier",
141
+ "format": "npm run format:biome",
136
142
  "format:biome": "biome check . --formatter-enabled=true --apply",
137
143
  "format:prettier": "prettier --write . --cache --ignore-path ../../../.prettierignore",
138
144
  "lint": "fluid-build . --task lint",
@@ -41,7 +41,11 @@ export interface IChannelContext {
41
41
 
42
42
  setConnectionState(connected: boolean, clientId?: string);
43
43
 
44
- processOp(message: ISequencedDocumentMessage, local: boolean, localOpMetadata?: unknown): void;
44
+ processOp(
45
+ message: ISequencedDocumentMessage,
46
+ local: boolean,
47
+ localOpMetadata?: unknown,
48
+ ): void;
45
49
 
46
50
  summarize(
47
51
  fullTree?: boolean,
@@ -4,7 +4,10 @@
4
4
  */
5
5
 
6
6
  import { assert } from "@fluidframework/core-utils/internal";
7
- import { IDeltaConnection, IDeltaHandler } from "@fluidframework/datastore-definitions/internal";
7
+ import {
8
+ IDeltaConnection,
9
+ IDeltaHandler,
10
+ } from "@fluidframework/datastore-definitions/internal";
8
11
  import { ISequencedDocumentMessage } from "@fluidframework/driver-definitions/internal";
9
12
  import { DataProcessingError } from "@fluidframework/telemetry-utils/internal";
10
13
 
@@ -72,7 +75,11 @@ export class ChannelDeltaConnection implements IDeltaConnection {
72
75
  this.handler.setConnectionState(connected);
73
76
  }
74
77
 
75
- public process(message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown) {
78
+ public process(
79
+ message: ISequencedDocumentMessage,
80
+ local: boolean,
81
+ localOpMetadata: unknown,
82
+ ) {
76
83
  try {
77
84
  // catches as data processing error whether or not they come from async pending queues
78
85
  processWithStashedOpMetadataHandling(
@@ -6,7 +6,12 @@
6
6
  import { TypedEventEmitter } from "@fluid-internal/client-utils";
7
7
  import { AttachState, IAudience } from "@fluidframework/container-definitions";
8
8
  import { IDeltaManager } from "@fluidframework/container-definitions/internal";
9
- import { FluidObject, IFluidHandle, IRequest, IResponse } from "@fluidframework/core-interfaces";
9
+ import {
10
+ FluidObject,
11
+ IFluidHandle,
12
+ IRequest,
13
+ IResponse,
14
+ } from "@fluidframework/core-interfaces";
10
15
  import { IFluidHandleContext } from "@fluidframework/core-interfaces/internal";
11
16
  import type { IFluidHandleInternal } from "@fluidframework/core-interfaces/internal";
12
17
  import {
@@ -258,10 +263,7 @@ export class FluidDataStoreRuntime
258
263
  // container from snapshot where we load detached container from a snapshot, isLocalDataStore would be
259
264
  // true. In this case create a RehydratedLocalChannelContext.
260
265
  if (dataStoreContext.isLocalDataStore) {
261
- channelContext = this.createRehydratedLocalChannelContext(
262
- path,
263
- tree.trees[path],
264
- );
266
+ channelContext = this.createRehydratedLocalChannelContext(path, tree.trees[path]);
265
267
  // This is the case of rehydrating a detached container from snapshot. Now due to delay loading of
266
268
  // data store, if the data store is loaded after the container is attached, then we missed making
267
269
  // the channel visible. So do it now. Otherwise, add it to local channel context queue, so
@@ -276,8 +278,7 @@ export class FluidDataStoreRuntime
276
278
  this,
277
279
  dataStoreContext,
278
280
  dataStoreContext.storage,
279
- (content, localOpMetadata) =>
280
- this.submitChannelOp(path, content, localOpMetadata),
281
+ (content, localOpMetadata) => this.submitChannelOp(path, content, localOpMetadata),
281
282
  (address: string) => this.setChannelDirty(address),
282
283
  path,
283
284
  tree.trees[path],
@@ -366,10 +367,7 @@ export class FluidDataStoreRuntime
366
367
 
367
368
  return { mimeType: "fluid/object", status: 200, value: channel };
368
369
  } catch (error) {
369
- this.mc.logger.sendErrorEvent(
370
- { eventName: "GetChannelFailedInRequest" },
371
- error,
372
- );
370
+ this.mc.logger.sendErrorEvent({ eventName: "GetChannelFailedInRequest" }, error);
373
371
 
374
372
  return createResponseError(500, `Failed to get Channel: ${error}`, request);
375
373
  }
@@ -484,8 +482,7 @@ export class FluidDataStoreRuntime
484
482
  this.dataStoreContext,
485
483
  this.dataStoreContext.storage,
486
484
  this.logger,
487
- (content, localOpMetadata) =>
488
- this.submitChannelOp(channel.id, content, localOpMetadata),
485
+ (content, localOpMetadata) => this.submitChannelOp(channel.id, content, localOpMetadata),
489
486
  (address: string) => this.setChannelDirty(address),
490
487
  );
491
488
  this.contexts.set(channel.id, context);
@@ -639,7 +636,11 @@ export class FluidDataStoreRuntime
639
636
  );
640
637
  }
641
638
 
642
- public process(message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown) {
639
+ public process(
640
+ message: ISequencedDocumentMessage,
641
+ local: boolean,
642
+ localOpMetadata: unknown,
643
+ ) {
643
644
  this.verifyNotClosed();
644
645
 
645
646
  try {
@@ -653,7 +654,7 @@ export class FluidDataStoreRuntime
653
654
  processAttachMessageGCData(attachMessage.snapshot, (nodeId, toPath) => {
654
655
  // Note: nodeId will be "/" unless and until we support sub-DDS GC Nodes
655
656
  const fromPath = `/${this.id}/${id}${nodeId === "/" ? "" : nodeId}`;
656
- this.dataStoreContext.addedGCOutboundRoute(fromPath, toPath);
657
+ this.dataStoreContext.addedGCOutboundRoute(fromPath, toPath, message.timestamp);
657
658
  });
658
659
 
659
660
  // If a non-local operation then go and create the object
@@ -743,6 +744,27 @@ export class FluidDataStoreRuntime
743
744
  builder.addNode("/", this.getOutboundRoutes());
744
745
  }
745
746
 
747
+ /**
748
+ * Returns a summary at the current sequence number.
749
+ * @param fullTree - true to bypass optimizations and force a full summary tree
750
+ * @param trackState - This tells whether we should track state from this summary.
751
+ * @param telemetryContext - summary data passed through the layers for telemetry purposes
752
+ */
753
+ public async summarize(
754
+ fullTree: boolean = false,
755
+ trackState: boolean = true,
756
+ telemetryContext?: ITelemetryContext,
757
+ ): Promise<ISummaryTreeWithStats> {
758
+ const summaryBuilder = new SummaryTreeBuilder();
759
+ await this.visitContextsDuringSummary(
760
+ async (contextId: string, context: IChannelContext) => {
761
+ const contextSummary = await context.summarize(fullTree, trackState, telemetryContext);
762
+ summaryBuilder.addWithStats(contextId, contextSummary);
763
+ },
764
+ );
765
+ return summaryBuilder.getSummaryTree();
766
+ }
767
+
746
768
  /**
747
769
  * Generates data used for garbage collection. This includes a list of GC nodes that represent this channel
748
770
  * including any of its child channel contexts. Each node has a set of outbound routes to other GC nodes in the
@@ -760,22 +782,14 @@ export class FluidDataStoreRuntime
760
782
  */
761
783
  public async getGCData(fullGC: boolean = false): Promise<IGarbageCollectionData> {
762
784
  const builder = new GCDataBuilder();
763
- // Iterate over each channel context and get their GC data.
764
- await Promise.all(
765
- Array.from(this.contexts)
766
- .filter(([contextId, _]) => {
767
- // Get GC data only for attached contexts. Detached contexts are not connected in the GC reference
768
- // graph so any references they might have won't be connected as well.
769
- return this.isChannelAttached(contextId);
770
- })
771
- .map(async ([contextId, context]) => {
772
- const contextGCData = await context.getGCData(fullGC);
773
- // Prefix the child's id to the ids of its GC nodes so they can be identified as belonging to the child.
774
- // This also gradually builds the id of each node to be a path from the root.
775
- builder.prefixAndAddNodes(contextId, contextGCData.gcNodes);
776
- }),
785
+ await this.visitContextsDuringSummary(
786
+ async (contextId: string, context: IChannelContext) => {
787
+ const contextGCData = await context.getGCData(fullGC);
788
+ // Prefix the child's id to the ids of its GC nodes so they can be identified as belonging to the child.
789
+ // This also gradually builds the id of each node to be a path from the root.
790
+ builder.prefixAndAddNodes(contextId, contextGCData.gcNodes);
791
+ },
777
792
  );
778
-
779
793
  this.updateGCNodes(builder);
780
794
  return builder.getGCData();
781
795
  }
@@ -803,46 +817,6 @@ export class FluidDataStoreRuntime
803
817
  }
804
818
  }
805
819
 
806
- /**
807
- * Returns a summary at the current sequence number.
808
- * @param fullTree - true to bypass optimizations and force a full summary tree
809
- * @param trackState - This tells whether we should track state from this summary.
810
- * @param telemetryContext - summary data passed through the layers for telemetry purposes
811
- */
812
- public async summarize(
813
- fullTree: boolean = false,
814
- trackState: boolean = true,
815
- telemetryContext?: ITelemetryContext,
816
- ): Promise<ISummaryTreeWithStats> {
817
- const summaryBuilder = new SummaryTreeBuilder();
818
-
819
- // Iterate over each data store and ask it to summarize
820
- await Promise.all(
821
- Array.from(this.contexts)
822
- .filter(([contextId, _]) => {
823
- const isAttached = this.isChannelAttached(contextId);
824
- // We are not expecting local dds! Summary may not capture local state.
825
- assert(
826
- isAttached,
827
- 0x17f /* "Not expecting detached channels during summarize" */,
828
- );
829
- // If the object is registered - and we have received the sequenced op creating the object
830
- // (i.e. it has a base mapping) - then we go ahead and summarize
831
- return isAttached;
832
- })
833
- .map(async ([contextId, context]) => {
834
- const contextSummary = await context.summarize(
835
- fullTree,
836
- trackState,
837
- telemetryContext,
838
- );
839
- summaryBuilder.addWithStats(contextId, contextSummary);
840
- }),
841
- );
842
-
843
- return summaryBuilder.getSummaryTree();
844
- }
845
-
846
820
  public getAttachSummary(telemetryContext?: ITelemetryContext): ISummaryTreeWithStats {
847
821
  const summaryBuilder = new SummaryTreeBuilder();
848
822
  this.visitLocalBoundContextsDuringAttach(
@@ -895,6 +869,21 @@ export class FluidDataStoreRuntime
895
869
  return gcDataBuilder.getGCData();
896
870
  }
897
871
 
872
+ /**
873
+ * Helper method for preparing to summarize this channel.
874
+ * Runs the callback for each bound context to incorporate its data however the caller specifies
875
+ */
876
+ private async visitContextsDuringSummary(
877
+ visitor: (contextId: string, context: IChannelContext) => Promise<void>,
878
+ ): Promise<void> {
879
+ for (const [contextId, context] of this.contexts) {
880
+ const isAttached = this.isChannelAttached(contextId);
881
+ // We are not expecting local dds! Summary / GC data may not capture local state.
882
+ assert(isAttached, 0x17f /* "Not expecting detached channels during summarize" */);
883
+ await visitor(contextId, context);
884
+ }
885
+ }
886
+
898
887
  /**
899
888
  * Helper method for preparing to attach this dataStore.
900
889
  * Runs the callback for each bound context to incorporate its data however the caller specifies
@@ -982,7 +971,10 @@ export class FluidDataStoreRuntime
982
971
 
983
972
  toFluidHandleInternal(channel.handle).attachGraph();
984
973
 
985
- assert(this.isAttached, 0x182 /* "Data store should be attached to attach the channel." */);
974
+ assert(
975
+ this.isAttached,
976
+ 0x182 /* "Data store should be attached to attach the channel." */,
977
+ );
986
978
  assert(
987
979
  this.visibilityState === VisibilityState.GloballyVisible,
988
980
  0x2d0 /* "Data store should be globally visible to attach channels." */,
@@ -1042,10 +1034,7 @@ export class FluidDataStoreRuntime
1042
1034
  // For Operations, find the right channel and trigger resubmission on it.
1043
1035
  const envelope = content as IEnvelope;
1044
1036
  const channelContext = this.contexts.get(envelope.address);
1045
- assert(
1046
- !!channelContext,
1047
- 0x183 /* "There should be a channel context for the op" */,
1048
- );
1037
+ assert(!!channelContext, 0x183 /* "There should be a channel context for the op" */);
1049
1038
  channelContext.reSubmit(envelope.contents, localOpMetadata);
1050
1039
  break;
1051
1040
  }
@@ -1071,10 +1060,7 @@ export class FluidDataStoreRuntime
1071
1060
  // For Operations, find the right channel and trigger resubmission on it.
1072
1061
  const envelope = content as IEnvelope;
1073
1062
  const channelContext = this.contexts.get(envelope.address);
1074
- assert(
1075
- !!channelContext,
1076
- 0x2ed /* "There should be a channel context for the op" */,
1077
- );
1063
+ assert(!!channelContext, 0x2ed /* "There should be a channel context for the op" */);
1078
1064
  channelContext.rollback(envelope.contents, localOpMetadata);
1079
1065
  break;
1080
1066
  }
@@ -1110,10 +1096,7 @@ export class FluidDataStoreRuntime
1110
1096
  case DataStoreMessageType.ChannelOp: {
1111
1097
  const envelope = content.content as IEnvelope;
1112
1098
  const channelContext = this.contexts.get(envelope.address);
1113
- assert(
1114
- !!channelContext,
1115
- 0x184 /* "There should be a channel context for the op" */,
1116
- );
1099
+ assert(!!channelContext, 0x184 /* "There should be a channel context for the op" */);
1117
1100
  await channelContext.getChannel();
1118
1101
  return channelContext.applyStashedOp(envelope.contents);
1119
1102
  }
@@ -6,13 +6,18 @@
6
6
  import { FluidObject } from "@fluidframework/core-interfaces";
7
7
  import type { IFluidHandleInternal } from "@fluidframework/core-interfaces/internal";
8
8
  import { IFluidHandleContext } from "@fluidframework/core-interfaces/internal";
9
- import { generateHandleContextPath, FluidHandleBase } from "@fluidframework/runtime-utils/internal";
9
+ import {
10
+ generateHandleContextPath,
11
+ FluidHandleBase,
12
+ } from "@fluidframework/runtime-utils/internal";
10
13
 
11
14
  /**
12
15
  * Handle for a shared {@link @fluidframework/core-interfaces#FluidObject}.
13
16
  * @alpha
14
17
  */
15
- export class FluidObjectHandle<T extends FluidObject = FluidObject> extends FluidHandleBase<T> {
18
+ export class FluidObjectHandle<
19
+ T extends FluidObject = FluidObject,
20
+ > extends FluidHandleBase<T> {
16
21
  private readonly pendingHandlesToMakeVisible: Set<IFluidHandleInternal> = new Set();
17
22
 
18
23
  /**
@@ -5,7 +5,10 @@
5
5
 
6
6
  import { ISnapshotTreeWithBlobContents } from "@fluidframework/container-definitions/internal";
7
7
  import { assert, Lazy, LazyPromise } from "@fluidframework/core-utils/internal";
8
- import { IChannel, IFluidDataStoreRuntime } from "@fluidframework/datastore-definitions/internal";
8
+ import {
9
+ IChannel,
10
+ IFluidDataStoreRuntime,
11
+ } from "@fluidframework/datastore-definitions/internal";
9
12
  import {
10
13
  IDocumentStorageService,
11
14
  ISnapshotTree,
@@ -17,7 +20,10 @@ import {
17
20
  IGarbageCollectionData,
18
21
  ISummarizeResult,
19
22
  } from "@fluidframework/runtime-definitions/internal";
20
- import { ITelemetryLoggerExt, DataProcessingError } from "@fluidframework/telemetry-utils/internal";
23
+ import {
24
+ ITelemetryLoggerExt,
25
+ DataProcessingError,
26
+ } from "@fluidframework/telemetry-utils/internal";
21
27
 
22
28
  import {
23
29
  ChannelServiceEndpoints,
@@ -43,10 +43,7 @@ export class LocalChannelStorageService implements IChannelStorageService {
43
43
 
44
44
  case TreeEntry.Tree:
45
45
  if (path.startsWith(entry.path)) {
46
- return this.readBlobSyncInternal(
47
- path.substr(entry.path.length + 1),
48
- entry.value,
49
- );
46
+ return this.readBlobSyncInternal(path.substr(entry.path.length + 1), entry.value);
50
47
  }
51
48
  break;
52
49
 
@@ -6,4 +6,4 @@
6
6
  */
7
7
 
8
8
  export const pkgName = "@fluidframework/datastore";
9
- export const pkgVersion = "2.0.0-dev-rc.5.0.0.271717";
9
+ export const pkgVersion = "2.0.0-dev-rc.5.0.0.272889";
@@ -5,7 +5,10 @@
5
5
 
6
6
  import { AttachState } from "@fluidframework/container-definitions";
7
7
  import { assert, LazyPromise } from "@fluidframework/core-utils/internal";
8
- import { IChannel, IFluidDataStoreRuntime } from "@fluidframework/datastore-definitions/internal";
8
+ import {
9
+ IChannel,
10
+ IFluidDataStoreRuntime,
11
+ } from "@fluidframework/datastore-definitions/internal";
9
12
  import {
10
13
  IDocumentStorageService,
11
14
  ISnapshotTree,
@@ -100,11 +103,7 @@ export class RemoteChannelContext implements IChannelContext {
100
103
  // Send all pending messages to the channel
101
104
  assert(this.pending !== undefined, 0x23f /* "pending undefined" */);
102
105
  for (const message of this.pending) {
103
- this.services.deltaConnection.process(
104
- message,
105
- false,
106
- undefined /* localOpMetadata */,
107
- );
106
+ this.services.deltaConnection.process(message, false, undefined /* localOpMetadata */);
108
107
  }
109
108
  this.thresholdOpsCounter.send("ProcessPendingOps", this.pending.length);
110
109
 
package/tsdoc.json ADDED
@@ -0,0 +1,4 @@
1
+ {
2
+ "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json",
3
+ "extends": ["../../../common/build/build-common/tsdoc-base.json"]
4
+ }