@fluidframework/datastore 0.59.2000-63294 → 0.59.3000-66610

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 (42) hide show
  1. package/dist/channelContext.js +2 -2
  2. package/dist/channelContext.js.map +1 -1
  3. package/dist/channelDeltaConnection.js +2 -2
  4. package/dist/channelDeltaConnection.js.map +1 -1
  5. package/dist/channelStorageService.d.ts +1 -1
  6. package/dist/channelStorageService.d.ts.map +1 -1
  7. package/dist/channelStorageService.js +1 -1
  8. package/dist/channelStorageService.js.map +1 -1
  9. package/dist/dataStoreRuntime.d.ts.map +1 -1
  10. package/dist/dataStoreRuntime.js +37 -37
  11. package/dist/dataStoreRuntime.js.map +1 -1
  12. package/dist/fluidHandle.js +1 -1
  13. package/dist/fluidHandle.js.map +1 -1
  14. package/dist/localChannelContext.js +19 -19
  15. package/dist/localChannelContext.js.map +1 -1
  16. package/dist/localChannelStorageService.js +2 -2
  17. package/dist/localChannelStorageService.js.map +1 -1
  18. package/dist/packageVersion.d.ts +1 -1
  19. package/dist/packageVersion.js +1 -1
  20. package/dist/packageVersion.js.map +1 -1
  21. package/dist/remoteChannelContext.d.ts.map +1 -1
  22. package/dist/remoteChannelContext.js +21 -12
  23. package/dist/remoteChannelContext.js.map +1 -1
  24. package/lib/channelStorageService.d.ts +1 -1
  25. package/lib/channelStorageService.d.ts.map +1 -1
  26. package/lib/channelStorageService.js.map +1 -1
  27. package/lib/dataStoreRuntime.d.ts.map +1 -1
  28. package/lib/dataStoreRuntime.js +8 -8
  29. package/lib/dataStoreRuntime.js.map +1 -1
  30. package/lib/localChannelContext.js.map +1 -1
  31. package/lib/packageVersion.d.ts +1 -1
  32. package/lib/packageVersion.js +1 -1
  33. package/lib/packageVersion.js.map +1 -1
  34. package/lib/remoteChannelContext.d.ts.map +1 -1
  35. package/lib/remoteChannelContext.js +12 -3
  36. package/lib/remoteChannelContext.js.map +1 -1
  37. package/package.json +16 -15
  38. package/src/channelStorageService.ts +3 -3
  39. package/src/dataStoreRuntime.ts +8 -9
  40. package/src/localChannelContext.ts +7 -7
  41. package/src/packageVersion.ts +1 -1
  42. package/src/remoteChannelContext.ts +15 -6
@@ -21,14 +21,14 @@ exports.createServiceEndpoints = createServiceEndpoints;
21
21
  function summarizeChannel(channel, fullTree = false, trackState = false) {
22
22
  const summarizeResult = channel.getAttachSummary(fullTree, trackState);
23
23
  // Add the channel attributes to the returned result.
24
- runtime_utils_1.addBlobToSummary(summarizeResult, exports.attributesBlobKey, JSON.stringify(channel.attributes));
24
+ (0, runtime_utils_1.addBlobToSummary)(summarizeResult, exports.attributesBlobKey, JSON.stringify(channel.attributes));
25
25
  return summarizeResult;
26
26
  }
27
27
  exports.summarizeChannel = summarizeChannel;
28
28
  async function summarizeChannelAsync(channel, fullTree = false, trackState = false) {
29
29
  const summarizeResult = await channel.summarize(fullTree, trackState);
30
30
  // Add the channel attributes to the returned result.
31
- runtime_utils_1.addBlobToSummary(summarizeResult, exports.attributesBlobKey, JSON.stringify(channel.attributes));
31
+ (0, runtime_utils_1.addBlobToSummary)(summarizeResult, exports.attributesBlobKey, JSON.stringify(channel.attributes));
32
32
  return summarizeResult;
33
33
  }
34
34
  exports.summarizeChannelAsync = summarizeChannelAsync;
@@ -1 +1 @@
1
- {"version":3,"file":"channelContext.js","sourceRoot":"","sources":["../src/channelContext.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAYH,iEAAiE;AACjE,qEAAkE;AAClE,mEAAgE;AAEnD,QAAA,iBAAiB,GAAG,aAAa,CAAC;AAgC/C,SAAgB,sBAAsB,CAClC,EAAU,EACV,SAAkB,EAClB,QAA0D,EAC1D,OAAmB,EACnB,0BAA2F,EAC3F,cAAuC,EACvC,MAAwB,EACxB,IAAoB,EACpB,UAAyC;IAEzC,MAAM,eAAe,GAAG,IAAI,+CAAsB,CAC9C,EAAE,EACF,SAAS,EACT,CAAC,OAAO,EAAE,eAAe,EAAE,EAAE,CAAC,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAC,EAChE,OAAO,EACP,0BAA0B,CAAC,CAAC;IAChC,MAAM,aAAa,GAAG,IAAI,6CAAqB,CAAC,IAAI,EAAE,cAAc,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC;IAE1F,OAAO;QACH,eAAe;QACf,aAAa;KAChB,CAAC;AACN,CAAC;AAvBD,wDAuBC;AAED,SAAgB,gBAAgB,CAC5B,OAAiB,EACjB,WAAoB,KAAK,EACzB,aAAsB,KAAK;IAE3B,MAAM,eAAe,GAAG,OAAO,CAAC,gBAAgB,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;IAEvE,qDAAqD;IACrD,gCAAgB,CAAC,eAAe,EAAE,yBAAiB,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC;IACzF,OAAO,eAAe,CAAC;AAC3B,CAAC;AAVD,4CAUC;AAEM,KAAK,UAAU,qBAAqB,CACvC,OAAiB,EACjB,WAAoB,KAAK,EACzB,aAAsB,KAAK;IAE3B,MAAM,eAAe,GAAG,MAAM,OAAO,CAAC,SAAS,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;IAEtE,qDAAqD;IACrD,gCAAgB,CAAC,eAAe,EAAE,yBAAiB,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC;IACzF,OAAO,eAAe,CAAC;AAC3B,CAAC;AAVD,sDAUC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ITelemetryLogger } from \"@fluidframework/common-definitions\";\nimport { IFluidHandle } from \"@fluidframework/core-interfaces\";\nimport { IChannel } from \"@fluidframework/datastore-definitions\";\nimport { IDocumentStorageService } from \"@fluidframework/driver-definitions\";\nimport { ISequencedDocumentMessage, ISnapshotTree } from \"@fluidframework/protocol-definitions\";\nimport {\n IGarbageCollectionData,\n ISummarizeResult,\n ISummaryTreeWithStats,\n} from \"@fluidframework/runtime-definitions\";\nimport { addBlobToSummary } from \"@fluidframework/runtime-utils\";\nimport { ChannelDeltaConnection } from \"./channelDeltaConnection\";\nimport { ChannelStorageService } from \"./channelStorageService\";\n\nexport const attributesBlobKey = \".attributes\";\n\nexport interface IChannelContext {\n getChannel(): Promise<IChannel>;\n\n setConnectionState(connected: boolean, clientId?: string);\n\n processOp(message: ISequencedDocumentMessage, local: boolean, localOpMetadata?: unknown): void;\n\n summarize(fullTree?: boolean, trackState?: boolean): Promise<ISummarizeResult>;\n\n reSubmit(content: any, localOpMetadata: unknown): void;\n\n applyStashedOp(content: any): unknown;\n\n /**\n * Returns the data used for garbage collection. This includes a list of GC nodes that represent this context\n * including any of its children. Each node has a set of outbound routes to other GC nodes in the document.\n * @param fullGC - true to bypass optimizations and force full generation of GC data.\n */\n getGCData(fullGC?: boolean): Promise<IGarbageCollectionData>;\n\n /**\n * After GC has run, called to notify this context of routes that are used in it. These are used for the following:\n * 1. To identify if this context is being referenced in the document or not.\n * 2. To identify if this context or any of its children's used routes changed since last summary.\n * 3. They are added to the summary generated by this context.\n * 4. To update the timestamp when this context is marked as unreferenced.\n */\n updateUsedRoutes(usedRoutes: string[], gcTimestamp?: number): void;\n}\n\nexport function createServiceEndpoints(\n id: string,\n connected: boolean,\n submitFn: (content: any, localOpMetadata: unknown) => void,\n dirtyFn: () => void,\n addedGCOutboundReferenceFn: (srcHandle: IFluidHandle, outboundHandle: IFluidHandle) => void,\n storageService: IDocumentStorageService,\n logger: ITelemetryLogger,\n tree?: ISnapshotTree,\n extraBlobs?: Map<string, ArrayBufferLike>,\n) {\n const deltaConnection = new ChannelDeltaConnection(\n id,\n connected,\n (message, localOpMetadata) => submitFn(message, localOpMetadata),\n dirtyFn,\n addedGCOutboundReferenceFn);\n const objectStorage = new ChannelStorageService(tree, storageService, logger, extraBlobs);\n\n return {\n deltaConnection,\n objectStorage,\n };\n}\n\nexport function summarizeChannel(\n channel: IChannel,\n fullTree: boolean = false,\n trackState: boolean = false,\n): ISummaryTreeWithStats {\n const summarizeResult = channel.getAttachSummary(fullTree, trackState);\n\n // Add the channel attributes to the returned result.\n addBlobToSummary(summarizeResult, attributesBlobKey, JSON.stringify(channel.attributes));\n return summarizeResult;\n}\n\nexport async function summarizeChannelAsync(\n channel: IChannel,\n fullTree: boolean = false,\n trackState: boolean = false,\n): Promise<ISummaryTreeWithStats> {\n const summarizeResult = await channel.summarize(fullTree, trackState);\n\n // Add the channel attributes to the returned result.\n addBlobToSummary(summarizeResult, attributesBlobKey, JSON.stringify(channel.attributes));\n return summarizeResult;\n}\n"]}
1
+ {"version":3,"file":"channelContext.js","sourceRoot":"","sources":["../src/channelContext.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAYH,iEAAiE;AACjE,qEAAkE;AAClE,mEAAgE;AAEnD,QAAA,iBAAiB,GAAG,aAAa,CAAC;AAgC/C,SAAgB,sBAAsB,CAClC,EAAU,EACV,SAAkB,EAClB,QAA0D,EAC1D,OAAmB,EACnB,0BAA2F,EAC3F,cAAuC,EACvC,MAAwB,EACxB,IAAoB,EACpB,UAAyC;IAEzC,MAAM,eAAe,GAAG,IAAI,+CAAsB,CAC9C,EAAE,EACF,SAAS,EACT,CAAC,OAAO,EAAE,eAAe,EAAE,EAAE,CAAC,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAC,EAChE,OAAO,EACP,0BAA0B,CAAC,CAAC;IAChC,MAAM,aAAa,GAAG,IAAI,6CAAqB,CAAC,IAAI,EAAE,cAAc,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC;IAE1F,OAAO;QACH,eAAe;QACf,aAAa;KAChB,CAAC;AACN,CAAC;AAvBD,wDAuBC;AAED,SAAgB,gBAAgB,CAC5B,OAAiB,EACjB,WAAoB,KAAK,EACzB,aAAsB,KAAK;IAE3B,MAAM,eAAe,GAAG,OAAO,CAAC,gBAAgB,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;IAEvE,qDAAqD;IACrD,IAAA,gCAAgB,EAAC,eAAe,EAAE,yBAAiB,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC;IACzF,OAAO,eAAe,CAAC;AAC3B,CAAC;AAVD,4CAUC;AAEM,KAAK,UAAU,qBAAqB,CACvC,OAAiB,EACjB,WAAoB,KAAK,EACzB,aAAsB,KAAK;IAE3B,MAAM,eAAe,GAAG,MAAM,OAAO,CAAC,SAAS,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;IAEtE,qDAAqD;IACrD,IAAA,gCAAgB,EAAC,eAAe,EAAE,yBAAiB,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC;IACzF,OAAO,eAAe,CAAC;AAC3B,CAAC;AAVD,sDAUC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ITelemetryLogger } from \"@fluidframework/common-definitions\";\nimport { IFluidHandle } from \"@fluidframework/core-interfaces\";\nimport { IChannel } from \"@fluidframework/datastore-definitions\";\nimport { IDocumentStorageService } from \"@fluidframework/driver-definitions\";\nimport { ISequencedDocumentMessage, ISnapshotTree } from \"@fluidframework/protocol-definitions\";\nimport {\n IGarbageCollectionData,\n ISummarizeResult,\n ISummaryTreeWithStats,\n} from \"@fluidframework/runtime-definitions\";\nimport { addBlobToSummary } from \"@fluidframework/runtime-utils\";\nimport { ChannelDeltaConnection } from \"./channelDeltaConnection\";\nimport { ChannelStorageService } from \"./channelStorageService\";\n\nexport const attributesBlobKey = \".attributes\";\n\nexport interface IChannelContext {\n getChannel(): Promise<IChannel>;\n\n setConnectionState(connected: boolean, clientId?: string);\n\n processOp(message: ISequencedDocumentMessage, local: boolean, localOpMetadata?: unknown): void;\n\n summarize(fullTree?: boolean, trackState?: boolean): Promise<ISummarizeResult>;\n\n reSubmit(content: any, localOpMetadata: unknown): void;\n\n applyStashedOp(content: any): unknown;\n\n /**\n * Returns the data used for garbage collection. This includes a list of GC nodes that represent this context\n * including any of its children. Each node has a set of outbound routes to other GC nodes in the document.\n * @param fullGC - true to bypass optimizations and force full generation of GC data.\n */\n getGCData(fullGC?: boolean): Promise<IGarbageCollectionData>;\n\n /**\n * After GC has run, called to notify this context of routes that are used in it. These are used for the following:\n * 1. To identify if this context is being referenced in the document or not.\n * 2. To identify if this context or any of its children's used routes changed since last summary.\n * 3. They are added to the summary generated by this context.\n * 4. To update the timestamp when this context is marked as unreferenced.\n */\n updateUsedRoutes(usedRoutes: string[], gcTimestamp?: number): void;\n}\n\nexport function createServiceEndpoints(\n id: string,\n connected: boolean,\n submitFn: (content: any, localOpMetadata: unknown) => void,\n dirtyFn: () => void,\n addedGCOutboundReferenceFn: (srcHandle: IFluidHandle, outboundHandle: IFluidHandle) => void,\n storageService: IDocumentStorageService,\n logger: ITelemetryLogger,\n tree?: ISnapshotTree,\n extraBlobs?: Map<string, ArrayBufferLike>,\n) {\n const deltaConnection = new ChannelDeltaConnection(\n id,\n connected,\n (message, localOpMetadata) => submitFn(message, localOpMetadata),\n dirtyFn,\n addedGCOutboundReferenceFn);\n const objectStorage = new ChannelStorageService(tree, storageService, logger, extraBlobs);\n\n return {\n deltaConnection,\n objectStorage,\n };\n}\n\nexport function summarizeChannel(\n channel: IChannel,\n fullTree: boolean = false,\n trackState: boolean = false,\n): ISummaryTreeWithStats {\n const summarizeResult = channel.getAttachSummary(fullTree, trackState);\n\n // Add the channel attributes to the returned result.\n addBlobToSummary(summarizeResult, attributesBlobKey, JSON.stringify(channel.attributes));\n return summarizeResult;\n}\n\nexport async function summarizeChannelAsync(\n channel: IChannel,\n fullTree: boolean = false,\n trackState: boolean = false,\n): Promise<ISummaryTreeWithStats> {\n const summarizeResult = await channel.summarize(fullTree, trackState);\n\n // Add the channel attributes to the returned result.\n addBlobToSummary(summarizeResult, attributesBlobKey, JSON.stringify(channel.attributes));\n return summarizeResult;\n}\n"]}
@@ -16,14 +16,14 @@ class ChannelDeltaConnection {
16
16
  this.addedGCOutboundReference = addedGCOutboundReference;
17
17
  }
18
18
  get handler() {
19
- common_utils_1.assert(!!this._handler, 0x177 /* "Missing delta handler" */);
19
+ (0, common_utils_1.assert)(!!this._handler, 0x177 /* "Missing delta handler" */);
20
20
  return this._handler;
21
21
  }
22
22
  get connected() {
23
23
  return this._connected;
24
24
  }
25
25
  attach(handler) {
26
- common_utils_1.assert(this._handler === undefined, 0x178 /* "Missing delta handler on attach" */);
26
+ (0, common_utils_1.assert)(this._handler === undefined, 0x178 /* "Missing delta handler on attach" */);
27
27
  this._handler = handler;
28
28
  }
29
29
  setConnectionState(connected) {
@@ -1 +1 @@
1
- {"version":3,"file":"channelDeltaConnection.js","sourceRoot":"","sources":["../src/channelDeltaConnection.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+DAAsD;AAGtD,qEAAsE;AAGtE,MAAa,sBAAsB;IAW/B,YACW,QAAgB,EACf,UAAmB,EACX,MAAqE,EACrE,KAAiB,EACjB,wBAAyF;QAJlG,aAAQ,GAAR,QAAQ,CAAQ;QACf,eAAU,GAAV,UAAU,CAAS;QACX,WAAM,GAAN,MAAM,CAA+D;QACrE,UAAK,GAAL,KAAK,CAAY;QACjB,6BAAwB,GAAxB,wBAAwB,CAAiE;IAC7G,CAAC;IAdD,IAAY,OAAO;QACf,qBAAM,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,CAAC,6BAA6B,CAAC,CAAC;QAC7D,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IACD,IAAW,SAAS;QAChB,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;IAUM,MAAM,CAAC,OAAsB;QAChC,qBAAM,CAAC,IAAI,CAAC,QAAQ,KAAK,SAAS,EAAE,KAAK,CAAC,uCAAuC,CAAC,CAAC;QACnF,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;IAC5B,CAAC;IAEM,kBAAkB,CAAC,SAAkB;QACxC,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC,SAAS,CAAC,CAAC;IAC/C,CAAC;IAEM,OAAO,CAAC,OAAkC,EAAE,KAAc,EAAE,eAAwB;QACvF,IAAI;YACA,sFAAsF;YACtF,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,KAAK,EAAE,eAAe,CAAC,CAAC;SACzD;QAAC,OAAO,KAAK,EAAE;YACZ,MAAM,qCAAmB,CAAC,kBAAkB,CACxC,KAAK,EAAE,8CAA8C,EAAE,OAAO,CAAC,CAAC;SACvE;IACL,CAAC;IAEM,QAAQ,CAAC,OAAY,EAAE,eAAwB;QAClD,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;IACpD,CAAC;IAEM,cAAc,CAAC,OAAkC;QACpD,OAAO,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;IAChD,CAAC;CACJ;AA9CD,wDA8CC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/common-utils\";\nimport { IDocumentMessage, ISequencedDocumentMessage } from \"@fluidframework/protocol-definitions\";\nimport { IDeltaConnection, IDeltaHandler } from \"@fluidframework/datastore-definitions\";\nimport { DataProcessingError } from \"@fluidframework/container-utils\";\nimport { IFluidHandle } from \"@fluidframework/core-interfaces\";\n\nexport class ChannelDeltaConnection implements IDeltaConnection {\n private _handler: IDeltaHandler | undefined;\n\n private get handler(): IDeltaHandler {\n assert(!!this._handler, 0x177 /* \"Missing delta handler\" */);\n return this._handler;\n }\n public get connected(): boolean {\n return this._connected;\n }\n\n constructor(\n public objectId: string,\n private _connected: boolean,\n public readonly submit: (message: IDocumentMessage, localOpMetadata: unknown) => void,\n public readonly dirty: () => void,\n public readonly addedGCOutboundReference: (srcHandle: IFluidHandle, outboundHandle: IFluidHandle) => void) {\n }\n\n public attach(handler: IDeltaHandler) {\n assert(this._handler === undefined, 0x178 /* \"Missing delta handler on attach\" */);\n this._handler = handler;\n }\n\n public setConnectionState(connected: boolean) {\n this._connected = connected;\n this.handler.setConnectionState(connected);\n }\n\n public process(message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown) {\n try {\n // catches as data processing error whether or not they come from async pending queues\n this.handler.process(message, local, localOpMetadata);\n } catch (error) {\n throw DataProcessingError.wrapIfUnrecognized(\n error, \"channelDeltaConnectionFailedToProcessMessage\", message);\n }\n }\n\n public reSubmit(content: any, localOpMetadata: unknown) {\n this.handler.reSubmit(content, localOpMetadata);\n }\n\n public applyStashedOp(message: ISequencedDocumentMessage): unknown {\n return this.handler.applyStashedOp(message);\n }\n}\n"]}
1
+ {"version":3,"file":"channelDeltaConnection.js","sourceRoot":"","sources":["../src/channelDeltaConnection.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+DAAsD;AAGtD,qEAAsE;AAGtE,MAAa,sBAAsB;IAW/B,YACW,QAAgB,EACf,UAAmB,EACX,MAAqE,EACrE,KAAiB,EACjB,wBAAyF;QAJlG,aAAQ,GAAR,QAAQ,CAAQ;QACf,eAAU,GAAV,UAAU,CAAS;QACX,WAAM,GAAN,MAAM,CAA+D;QACrE,UAAK,GAAL,KAAK,CAAY;QACjB,6BAAwB,GAAxB,wBAAwB,CAAiE;IAC7G,CAAC;IAdD,IAAY,OAAO;QACf,IAAA,qBAAM,EAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,CAAC,6BAA6B,CAAC,CAAC;QAC7D,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IACD,IAAW,SAAS;QAChB,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;IAUM,MAAM,CAAC,OAAsB;QAChC,IAAA,qBAAM,EAAC,IAAI,CAAC,QAAQ,KAAK,SAAS,EAAE,KAAK,CAAC,uCAAuC,CAAC,CAAC;QACnF,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;IAC5B,CAAC;IAEM,kBAAkB,CAAC,SAAkB;QACxC,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC,SAAS,CAAC,CAAC;IAC/C,CAAC;IAEM,OAAO,CAAC,OAAkC,EAAE,KAAc,EAAE,eAAwB;QACvF,IAAI;YACA,sFAAsF;YACtF,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,KAAK,EAAE,eAAe,CAAC,CAAC;SACzD;QAAC,OAAO,KAAK,EAAE;YACZ,MAAM,qCAAmB,CAAC,kBAAkB,CACxC,KAAK,EAAE,8CAA8C,EAAE,OAAO,CAAC,CAAC;SACvE;IACL,CAAC;IAEM,QAAQ,CAAC,OAAY,EAAE,eAAwB;QAClD,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;IACpD,CAAC;IAEM,cAAc,CAAC,OAAkC;QACpD,OAAO,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;IAChD,CAAC;CACJ;AA9CD,wDA8CC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/common-utils\";\nimport { IDocumentMessage, ISequencedDocumentMessage } from \"@fluidframework/protocol-definitions\";\nimport { IDeltaConnection, IDeltaHandler } from \"@fluidframework/datastore-definitions\";\nimport { DataProcessingError } from \"@fluidframework/container-utils\";\nimport { IFluidHandle } from \"@fluidframework/core-interfaces\";\n\nexport class ChannelDeltaConnection implements IDeltaConnection {\n private _handler: IDeltaHandler | undefined;\n\n private get handler(): IDeltaHandler {\n assert(!!this._handler, 0x177 /* \"Missing delta handler\" */);\n return this._handler;\n }\n public get connected(): boolean {\n return this._connected;\n }\n\n constructor(\n public objectId: string,\n private _connected: boolean,\n public readonly submit: (message: IDocumentMessage, localOpMetadata: unknown) => void,\n public readonly dirty: () => void,\n public readonly addedGCOutboundReference: (srcHandle: IFluidHandle, outboundHandle: IFluidHandle) => void) {\n }\n\n public attach(handler: IDeltaHandler) {\n assert(this._handler === undefined, 0x178 /* \"Missing delta handler on attach\" */);\n this._handler = handler;\n }\n\n public setConnectionState(connected: boolean) {\n this._connected = connected;\n this.handler.setConnectionState(connected);\n }\n\n public process(message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown) {\n try {\n // catches as data processing error whether or not they come from async pending queues\n this.handler.process(message, local, localOpMetadata);\n } catch (error) {\n throw DataProcessingError.wrapIfUnrecognized(\n error, \"channelDeltaConnectionFailedToProcessMessage\", message);\n }\n }\n\n public reSubmit(content: any, localOpMetadata: unknown) {\n this.handler.reSubmit(content, localOpMetadata);\n }\n\n public applyStashedOp(message: ISequencedDocumentMessage): unknown {\n return this.handler.applyStashedOp(message);\n }\n}\n"]}
@@ -13,7 +13,7 @@ export declare class ChannelStorageService implements IChannelStorageService {
13
13
  private readonly extraBlobs?;
14
14
  private static flattenTree;
15
15
  private readonly flattenedTree;
16
- constructor(tree: ISnapshotTree | undefined, storage: Pick<IDocumentStorageService, "readBlob">, logger: ITelemetryLogger, extraBlobs?: Map<string, ArrayBuffer | SharedArrayBuffer> | undefined);
16
+ constructor(tree: ISnapshotTree | undefined, storage: Pick<IDocumentStorageService, "readBlob">, logger: ITelemetryLogger, extraBlobs?: Map<string, ArrayBufferLike> | undefined);
17
17
  contains(path: string): Promise<boolean>;
18
18
  readBlob(path: string): Promise<ArrayBufferLike>;
19
19
  list(path: string): Promise<string[]>;
@@ -1 +1 @@
1
- {"version":3,"file":"channelStorageService.d.ts","sourceRoot":"","sources":["../src/channelStorageService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CA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AO,CAAC,QAAQ,CAAC,UAAU,CAAC;IAlBhC,OAAO,CAAC,MAAM,CAAC,WAAW;IAY1B,OAAO,CAAC,QAAQ,CAAC,aAAa,CAA8B;gBAGvC,IAAI,EAAE,aAAa,GAAG,SAAS,EAC/B,OAAO,EAAE,IAAI,CAAC,uBAAuB,EAAE,UAAU,CAAC,EAClD,MAAM,EAAE,gBAAgB,EACxB,UAAU,CAAC,0CAA8B;IASjD,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAIxC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;IAehD,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;YAepC,YAAY;CAG7B"}
@@ -46,7 +46,7 @@ class ChannelStorageService {
46
46
  async list(path) {
47
47
  var _a;
48
48
  let tree = this.tree;
49
- const pathParts = runtime_utils_1.getNormalizedObjectStoragePathParts(path);
49
+ const pathParts = (0, runtime_utils_1.getNormalizedObjectStoragePathParts)(path);
50
50
  while (tree !== undefined && pathParts.length > 0) {
51
51
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
52
52
  const part = pathParts.shift();
@@ -1 +1 @@
1
- {"version":3,"file":"channelStorageService.js","sourceRoot":"","sources":["../src/channelStorageService.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAKH,iEAAoF;AAGpF,MAAa,qBAAqB;IAe9B,YACqB,IAA+B,EAC/B,OAAkD,EAClD,MAAwB,EACxB,UAAyC;QAHzC,SAAI,GAAJ,IAAI,CAA2B;QAC/B,YAAO,GAAP,OAAO,CAA2C;QAClD,WAAM,GAAN,MAAM,CAAkB;QACxB,eAAU,GAAV,UAAU,CAA+B;QAE1D,IAAI,CAAC,aAAa,GAAG,EAAE,CAAC;QACxB,mCAAmC;QACnC,IAAI,IAAI,KAAK,SAAS,EAAE;YACnB,qBAAqB,CAAC,WAAW,CAAC,EAAE,EA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jB,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,IAAY;;QAC1B,IAAI,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACrB,MAAM,SAAS,GAAG,mDAAmC,CAAC,IAAI,CAAC,CAAC;QAC5D,OAAO,IAAI,KAAK,SAAS,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE;YAC/C,oEAAoE;YACpE,MAAM,IAAI,GAAG,SAAS,CAAC,KAAK,EAAG,CAAC;YAChC,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;SAC3B;QACD,IAAI,IAAI,KAAK,SAAS,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE;YAC9C,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;SAC1C;QAED,OAAO,MAAM,CAAC,IAAI,OAAC,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,KAAK,mCAAI,EAAE,CAAC,CAAC;IAC1C,CAAC;IAEO,KAAK,CAAC,YAAY,CAAC,IAAY;QACnC,OAAO,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IACpC,CAAC;CACJ;AAjED,sDAiEC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IDocumentStorageService } from \"@fluidframework/driver-definitions\";\nimport { ISnapshotTree } from \"@fluidframework/protocol-definitions\";\nimport { IChannelStorageService } from \"@fluidframework/datastore-definitions\";\nimport { getNormalizedObjectStoragePathParts } from \"@fluidframework/runtime-utils\";\nimport { ITelemetryLogger } from \"@fluidframework/common-definitions\";\n\nexport class ChannelStorageService implements IChannelStorageService {\n private static flattenTree(base: string, tree: ISnapshotTree, results: { [path: string]: string }) {\n // eslint-disable-next-line guard-for-in, no-restricted-syntax\n for (const path in tree.trees) {\n ChannelStorageService.flattenTree(`${base}${path}/`, tree.trees[path], results);\n }\n\n // eslint-disable-next-line guard-for-in, no-restricted-syntax\n for (const blob in tree.blobs) {\n results[`${base}${blob}`] = tree.blobs[blob];\n }\n }\n\n private readonly flattenedTree: { [path: string]: string };\n\n constructor(\n private readonly tree: ISnapshotTree | undefined,\n private readonly storage: Pick<IDocumentStorageService, \"readBlob\">,\n private readonly logger: ITelemetryLogger,\n private readonly extraBlobs?: Map<string, ArrayBufferLike>,\n ) {\n this.flattenedTree = {};\n // Create a map from paths to blobs\n if (tree !== undefined) {\n ChannelStorageService.flattenTree(\"\", tree, this.flattenedTree);\n }\n }\n\n public async contains(path: string): Promise<boolean> {\n return this.flattenedTree[path] !== undefined;\n }\n\n public async readBlob(path: string): Promise<ArrayBufferLike> {\n const id = await this.getIdForPath(path);\n const blob = this.extraBlobs !== undefined\n ? this.extraBlobs.get(id)\n : undefined;\n\n if (blob !== undefined) {\n return blob;\n }\n const blobP = this.storage.readBlob(id);\n blobP.catch((error) => this.logger.sendErrorEvent({ eventName: \"ChannelStorageBlobError\"}, error));\n\n return blobP;\n }\n\n public async list(path: string): Promise<string[]> {\n let tree = this.tree;\n const pathParts = getNormalizedObjectStoragePathParts(path);\n while (tree !== undefined && pathParts.length > 0) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const part = pathParts.shift()!;\n tree = tree.trees[part];\n }\n if (tree === undefined || pathParts.length !== 0) {\n throw new Error(\"path does not exist\");\n }\n\n return Object.keys(tree?.blobs ?? {});\n }\n\n private async getIdForPath(path: string): Promise<string> {\n return this.flattenedTree[path];\n }\n}\n"]}
1
+ {"version":3,"file":"channelStorageService.js","sourceRoot":"","sources":["../src/channelStorageService.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAKH,iEAAoF;AAGpF,MAAa,qBAAqB;IAe9B,YACqB,IAA+B,EAC/B,OAAkD,EAClD,MAAwB,EACxB,UAAyC;QAHzC,SAAI,GAAJ,IAAI,CAA2B;QAC/B,YAAO,GAAP,OAAO,CAA2C;QAClD,WAAM,GAAN,MAAM,CAAkB;QACxB,eAAU,GAAV,UAAU,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AE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,EAAE,SAAS,EAAE,yBAAyB,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC;QAEpG,OAAO,KAAK,CAAC;IACjB,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,IAAY;;QAC1B,IAAI,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACrB,MAAM,SAAS,GAAG,IAAA,mDAAmC,EAAC,IAAI,CAAC,CAAC;QAC5D,OAAO,IAAI,KAAK,SAAS,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE;YAC/C,oEAAoE;YACpE,MAAM,IAAI,GAAG,SAAS,CAAC,KAAK,EAAG,CAAC;YAChC,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;SAC3B;QACD,IAAI,IAAI,KAAK,SAAS,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE;YAC9C,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;SAC1C;QAED,OAAO,MAAM,CAAC,IAAI,CAAC,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,KAAK,mCAAI,EAAE,CAAC,CAAC;IAC1C,CAAC;IAEO,KAAK,CAAC,YAAY,CAAC,IAAY;QACnC,OAAO,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IACpC,CAAC;CACJ;AAjED,sDAiEC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IDocumentStorageService } from \"@fluidframework/driver-definitions\";\nimport { ISnapshotTree } from \"@fluidframework/protocol-definitions\";\nimport { IChannelStorageService } from \"@fluidframework/datastore-definitions\";\nimport { getNormalizedObjectStoragePathParts } from \"@fluidframework/runtime-utils\";\nimport { ITelemetryLogger } from \"@fluidframework/common-definitions\";\n\nexport class ChannelStorageService implements IChannelStorageService {\n private static flattenTree(base: string, tree: ISnapshotTree, results: { [path: string]: string; }) {\n // eslint-disable-next-line guard-for-in, no-restricted-syntax\n for (const path in tree.trees) {\n ChannelStorageService.flattenTree(`${base}${path}/`, tree.trees[path], results);\n }\n\n // eslint-disable-next-line guard-for-in, no-restricted-syntax\n for (const blob in tree.blobs) {\n results[`${base}${blob}`] = tree.blobs[blob];\n }\n }\n\n private readonly flattenedTree: { [path: string]: string; };\n\n constructor(\n private readonly tree: ISnapshotTree | undefined,\n private readonly storage: Pick<IDocumentStorageService, \"readBlob\">,\n private readonly logger: ITelemetryLogger,\n private readonly extraBlobs?: Map<string, ArrayBufferLike>,\n ) {\n this.flattenedTree = {};\n // Create a map from paths to blobs\n if (tree !== undefined) {\n ChannelStorageService.flattenTree(\"\", tree, this.flattenedTree);\n }\n }\n\n public async contains(path: string): Promise<boolean> {\n return this.flattenedTree[path] !== undefined;\n }\n\n public async readBlob(path: string): Promise<ArrayBufferLike> {\n const id = await this.getIdForPath(path);\n const blob = this.extraBlobs !== undefined\n ? this.extraBlobs.get(id)\n : undefined;\n\n if (blob !== undefined) {\n return blob;\n }\n const blobP = this.storage.readBlob(id);\n blobP.catch((error) => this.logger.sendErrorEvent({ eventName: \"ChannelStorageBlobError\" }, error));\n\n return blobP;\n }\n\n public async list(path: string): Promise<string[]> {\n let tree = this.tree;\n const pathParts = getNormalizedObjectStoragePathParts(path);\n while (tree !== undefined && pathParts.length > 0) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const part = pathParts.shift()!;\n tree = tree.trees[part];\n }\n if (tree === undefined || pathParts.length !== 0) {\n throw new Error(\"path does not exist\");\n }\n\n return Object.keys(tree?.blobs ?? {});\n }\n\n private async getIdForPath(path: string): Promise<string> {\n return this.flattenedTree[path];\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"dataStoreRuntime.d.ts","sourceRoot":"","sources":["../src/dataStoreRuntime.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,oC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,CAAC,IAAI,CAAC;IAI1C;;OAEG;IACH,OAAO,CAAC,aAAa;IA6BrB,OAAO,CAAC,eAAe;IAKvB,OAAO,CAAC,MAAM;IAQd;;;;;;OAMG;IACI,QAAQ,CAAC,IAAI,EAAE,oBAAoB,EAAE,OAAO,EAAE,GAAG,EAAE,eAAe,EAAE,OAAO;IAsBrE,cAAc,CAAC,OAAO,EAAE,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC;IAQ3D,OAAO,CAAC,eAAe;IAKvB,OAAO,CAAC,gBAAgB;IAiBxB,OAAO,CAAC,cAAc;IAsCtB,OAAO,CAAC,eAAe;CAK1B;AAED;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,6BACF,QAAQ,WAAW,qBAAqB,KAAK,QAAQ,SAAS,CAAC,SACnF,4BAA4B,iCASD,CAAC;AAEtC;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,sBACT,qBAAqB,KAAK,QAAQ;IAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;CAAE,GAAG,SAAS,CAAE,SACjG,4BAA4B,iCAiCD,CAAC"}
@@ -42,7 +42,7 @@ class FluidDataStoreRuntime extends common_utils_1.TypedEventEmitter {
42
42
  // A list of handles that are bound when the data store is not visible. We have to make them visible when the data
43
43
  // store becomes visible.
44
44
  this.pendingHandlesToMakeVisible = new Set();
45
- this.logger = telemetry_utils_1.ChildLogger.create(dataStoreContext.logger, "FluidDataStoreRuntime", { all: { dataStoreId: uuid_1.v4() } });
45
+ this.logger = telemetry_utils_1.ChildLogger.create(dataStoreContext.logger, "FluidDataStoreRuntime", { all: { dataStoreId: (0, uuid_1.v4)() } });
46
46
  this.id = dataStoreContext.id;
47
47
  this.options = dataStoreContext.options;
48
48
  this.deltaManager = dataStoreContext.deltaManager;
@@ -52,7 +52,7 @@ class FluidDataStoreRuntime extends common_utils_1.TypedEventEmitter {
52
52
  this.channelsBaseGCDetails = new common_utils_1.LazyPromise(async () => {
53
53
  var _a, _b, _c;
54
54
  const baseGCDetails = await ((_c = (_b = (_a = this.dataStoreContext).getBaseGCDetails) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : this.dataStoreContext.getInitialGCSummaryDetails());
55
- return garbage_collector_1.unpackChildNodesGCDetails(baseGCDetails);
55
+ return (0, garbage_collector_1.unpackChildNodesGCDetails)(baseGCDetails);
56
56
  });
57
57
  // Must always receive the data store type inside of the attributes
58
58
  if ((tree === null || tree === void 0 ? void 0 : tree.trees) !== undefined) {
@@ -137,7 +137,7 @@ class FluidDataStoreRuntime extends common_utils_1.TypedEventEmitter {
137
137
  return this._attachState;
138
138
  }
139
139
  get absolutePath() {
140
- return runtime_utils_1.generateHandleContextPath(this.id, this.routeContext);
140
+ return (0, runtime_utils_1.generateHandleContextPath)(this.id, this.routeContext);
141
141
  }
142
142
  get routeContext() {
143
143
  return this.dataStoreContext.IFluidHandleContext;
@@ -175,14 +175,14 @@ class FluidDataStoreRuntime extends common_utils_1.TypedEventEmitter {
175
175
  }
176
176
  catch (error) {
177
177
  this.logger.sendErrorEvent({ eventName: "GetChannelFailedInRequest" }, error);
178
- return runtime_utils_1.createResponseError(500, `Failed to get Channel: ${error}`, request);
178
+ return (0, runtime_utils_1.createResponseError)(500, `Failed to get Channel: ${error}`, request);
179
179
  }
180
180
  }
181
181
  // Otherwise defer to an attached request handler
182
- return runtime_utils_1.create404Response(request);
182
+ return (0, runtime_utils_1.create404Response)(request);
183
183
  }
184
184
  catch (error) {
185
- return runtime_utils_1.exceptionToResponse(error);
185
+ return (0, runtime_utils_1.exceptionToResponse)(error);
186
186
  }
187
187
  }
188
188
  async getChannel(id) {
@@ -198,9 +198,9 @@ class FluidDataStoreRuntime extends common_utils_1.TypedEventEmitter {
198
198
  const channel = await context.getChannel();
199
199
  return channel;
200
200
  }
201
- createChannel(id = uuid_1.v4(), type) {
201
+ createChannel(id = (0, uuid_1.v4)(), type) {
202
202
  this.verifyNotClosed();
203
- common_utils_1.assert(!this.contexts.has(id), 0x179 /* "createChannel() with existing ID" */);
203
+ (0, common_utils_1.assert)(!this.contexts.has(id), 0x179 /* "createChannel() with existing ID" */);
204
204
  this.notBoundedChannelContextSet.add(id);
205
205
  const context = new localChannelContext_1.LocalChannelContext(id, this.sharedObjectRegistry, type, this, this.dataStoreContext, this.dataStoreContext.storage, this.logger, (content, localOpMetadata) => this.submitChannelOp(id, content, localOpMetadata), (address) => this.setChannelDirty(address), (srcHandle, outboundHandle) => this.addedGCOutboundReference(srcHandle, outboundHandle));
206
206
  this.contexts.set(id, context);
@@ -213,7 +213,7 @@ class FluidDataStoreRuntime extends common_utils_1.TypedEventEmitter {
213
213
  deferred.resolve(context);
214
214
  this.contextsDeferred.set(id, deferred);
215
215
  }
216
- common_utils_1.assert(!!context.channel, 0x17a /* "Channel should be loaded when created!!" */);
216
+ (0, common_utils_1.assert)(!!context.channel, 0x17a /* "Channel should be loaded when created!!" */);
217
217
  return context.channel;
218
218
  }
219
219
  /**
@@ -222,7 +222,7 @@ class FluidDataStoreRuntime extends common_utils_1.TypedEventEmitter {
222
222
  * @param channel - channel to be registered.
223
223
  */
224
224
  bindChannel(channel) {
225
- common_utils_1.assert(this.notBoundedChannelContextSet.has(channel.id), 0x17b /* "Channel to be binded should be in not bounded set" */);
225
+ (0, common_utils_1.assert)(this.notBoundedChannelContextSet.has(channel.id), 0x17b /* "Channel to be binded should be in not bounded set" */);
226
226
  this.notBoundedChannelContextSet.delete(channel.id);
227
227
  // If our data store is attached, then attach the channel.
228
228
  if (this.isAttached) {
@@ -294,7 +294,7 @@ class FluidDataStoreRuntime extends common_utils_1.TypedEventEmitter {
294
294
  for (const [, object] of this.contexts) {
295
295
  object.setConnectionState(connected, clientId);
296
296
  }
297
- telemetry_utils_1.raiseConnectedEvent(this.logger, this, connected, clientId);
297
+ (0, telemetry_utils_1.raiseConnectedEvent)(this.logger, this, connected, clientId);
298
298
  }
299
299
  getQuorum() {
300
300
  return this.quorum;
@@ -317,13 +317,13 @@ class FluidDataStoreRuntime extends common_utils_1.TypedEventEmitter {
317
317
  // If a non-local operation then go and create the object
318
318
  // Otherwise mark it as officially attached.
319
319
  if (local) {
320
- common_utils_1.assert(this.pendingAttach.has(id), 0x17c /* "Unexpected attach (local) channel OP" */);
320
+ (0, common_utils_1.assert)(this.pendingAttach.has(id), 0x17c /* "Unexpected attach (local) channel OP" */);
321
321
  this.pendingAttach.delete(id);
322
322
  }
323
323
  else {
324
- common_utils_1.assert(!this.contexts.has(id), 0x17d);
324
+ (0, common_utils_1.assert)(!this.contexts.has(id), 0x17d);
325
325
  const flatBlobs = new Map();
326
- const snapshotTree = driver_utils_1.buildSnapshotTree(attachMessage.snapshot.entries, flatBlobs);
326
+ const snapshotTree = (0, driver_utils_1.buildSnapshotTree)(attachMessage.snapshot.entries, flatBlobs);
327
327
  const remoteChannelContext = new remoteChannelContext_1.RemoteChannelContext(this, this.dataStoreContext, this.dataStoreContext.storage, (content, localContentMetadata) => this.submitChannelOp(id, content, localContentMetadata), (address) => this.setChannelDirty(address), (srcHandle, outboundHandle) => this.addedGCOutboundReference(srcHandle, outboundHandle), id, snapshotTree, this.sharedObjectRegistry, flatBlobs, this.dataStoreContext.getCreateChildSummarizerNodeFn(id, {
328
328
  type: runtime_definitions_1.CreateSummarizerNodeSource.FromAttach,
329
329
  sequenceNumber: message.sequenceNumber,
@@ -431,10 +431,10 @@ class FluidDataStoreRuntime extends common_utils_1.TypedEventEmitter {
431
431
  updateUsedRoutes(usedRoutes, gcTimestamp) {
432
432
  var _a;
433
433
  // Get a map of channel ids to routes used in it.
434
- const usedContextRoutes = garbage_collector_1.unpackChildNodesUsedRoutes(usedRoutes);
434
+ const usedContextRoutes = (0, garbage_collector_1.unpackChildNodesUsedRoutes)(usedRoutes);
435
435
  // Verify that the used routes are correct.
436
436
  for (const [id] of usedContextRoutes) {
437
- common_utils_1.assert(this.contexts.has(id), 0x17e /* "Used route does not belong to any known context" */);
437
+ (0, common_utils_1.assert)(this.contexts.has(id), 0x17e /* "Used route does not belong to any known context" */);
438
438
  }
439
439
  // Update the used routes in each context. Used routes is empty for unused context.
440
440
  for (const [contextId, context] of this.contexts) {
@@ -457,10 +457,16 @@ class FluidDataStoreRuntime extends common_utils_1.TypedEventEmitter {
457
457
  * @returns the requested channel's base GC details.
458
458
  */
459
459
  async getChannelBaseGCDetails(channelId) {
460
+ var _a;
460
461
  let channelBaseGCDetails = (await this.channelsBaseGCDetails).get(channelId);
461
462
  if (channelBaseGCDetails === undefined) {
462
463
  channelBaseGCDetails = {};
463
464
  }
465
+ else if (((_a = channelBaseGCDetails.gcData) === null || _a === void 0 ? void 0 : _a.gcNodes) !== undefined) {
466
+ // Note: if the child channel has an explicit handle route to its parent, it will be removed here and
467
+ // expected to be added back by the parent when getGCData is called.
468
+ (0, garbage_collector_1.removeRouteFromAllNodes)(channelBaseGCDetails.gcData.gcNodes, this.absolutePath);
469
+ }
464
470
  // Currently, channel context's are always considered used. So, it there are no used routes for it, we still
465
471
  // need to mark it as used. Add self-route (empty string) to the channel context's used routes.
466
472
  if (channelBaseGCDetails.usedRoutes === undefined || channelBaseGCDetails.usedRoutes.length === 0) {
@@ -480,18 +486,12 @@ class FluidDataStoreRuntime extends common_utils_1.TypedEventEmitter {
480
486
  .filter(([contextId, _]) => {
481
487
  const isAttached = this.isChannelAttached(contextId);
482
488
  // We are not expecting local dds! Summary may not capture local state.
483
- common_utils_1.assert(isAttached, 0x17f /* "Not expecting detached channels during summarize" */);
489
+ (0, common_utils_1.assert)(isAttached, 0x17f /* "Not expecting detached channels during summarize" */);
484
490
  // If the object is registered - and we have received the sequenced op creating the object
485
491
  // (i.e. it has a base mapping) - then we go ahead and summarize
486
492
  return isAttached;
487
493
  }).map(async ([contextId, context]) => {
488
- // If BlobAggregationStorage is engaged, we have to write full summary for data stores
489
- // BlobAggregationStorage relies on this behavior, as it aggregates blobs across DDSs.
490
- // Not generating full summary will mean data loss, as we will overwrite aggregate blob in new summary,
491
- // and any virtual blobs that stayed (for unchanged DDSs) will need aggregate blob in previous summary
492
- // that is no longer present in this summary.
493
- // This is temporal limitation that can be lifted in future once BlobAggregationStorage becomes smarter.
494
- const contextSummary = await context.summarize(true /* fullTree */, trackState);
494
+ const contextSummary = await context.summarize(fullTree, trackState);
495
495
  summaryBuilder.addWithStats(contextId, contextSummary);
496
496
  }));
497
497
  return summaryBuilder.getSummaryTree();
@@ -525,14 +525,14 @@ class FluidDataStoreRuntime extends common_utils_1.TypedEventEmitter {
525
525
  let summaryTree;
526
526
  if (context.isLoaded) {
527
527
  const contextSummary = context.getAttachSummary();
528
- common_utils_1.assert(contextSummary.summary.type === protocol_definitions_1.SummaryType.Tree, 0x180 /* "getAttachSummary should always return a tree" */);
528
+ (0, common_utils_1.assert)(contextSummary.summary.type === protocol_definitions_1.SummaryType.Tree, 0x180 /* "getAttachSummary should always return a tree" */);
529
529
  summaryTree = { stats: contextSummary.stats, summary: contextSummary.summary };
530
530
  }
531
531
  else {
532
532
  // If this channel is not yet loaded, then there should be no changes in the snapshot from which
533
533
  // it was created as it is detached container. So just use the previous snapshot.
534
- common_utils_1.assert(!!this.dataStoreContext.baseSnapshot, 0x181 /* "BaseSnapshot should be there as detached container loaded from snapshot" */);
535
- summaryTree = runtime_utils_1.convertSnapshotTreeToSummaryTree(this.dataStoreContext.baseSnapshot.trees[contextId]);
534
+ (0, common_utils_1.assert)(!!this.dataStoreContext.baseSnapshot, 0x181 /* "BaseSnapshot should be there as detached container loaded from snapshot" */);
535
+ summaryTree = (0, runtime_utils_1.convertSnapshotTreeToSummaryTree)(this.dataStoreContext.baseSnapshot.trees[contextId]);
536
536
  }
537
537
  summaryBuilder.addWithStats(contextId, summaryTree);
538
538
  }
@@ -562,11 +562,11 @@ class FluidDataStoreRuntime extends common_utils_1.TypedEventEmitter {
562
562
  return;
563
563
  }
564
564
  channel.handle.attachGraph();
565
- common_utils_1.assert(this.isAttached, 0x182 /* "Data store should be attached to attach the channel." */);
566
- common_utils_1.assert(this.visibilityState === runtime_definitions_1.VisibilityState.GloballyVisible, 0x2d0 /* "Data store should be globally visible to attach channels." */);
567
- const summarizeResult = channelContext_1.summarizeChannel(channel, true /* fullTree */, false /* trackState */);
565
+ (0, common_utils_1.assert)(this.isAttached, 0x182 /* "Data store should be attached to attach the channel." */);
566
+ (0, common_utils_1.assert)(this.visibilityState === runtime_definitions_1.VisibilityState.GloballyVisible, 0x2d0 /* "Data store should be globally visible to attach channels." */);
567
+ const summarizeResult = (0, channelContext_1.summarizeChannel)(channel, true /* fullTree */, false /* trackState */);
568
568
  // Attach message needs the summary in ITree format. Convert the ISummaryTree into an ITree.
569
- const snapshot = runtime_utils_1.convertSummaryTreeToITree(summarizeResult.summary);
569
+ const snapshot = (0, runtime_utils_1.convertSummaryTreeToITree)(summarizeResult.summary);
570
570
  const message = {
571
571
  id: channel.id,
572
572
  snapshot,
@@ -600,7 +600,7 @@ class FluidDataStoreRuntime extends common_utils_1.TypedEventEmitter {
600
600
  // For Operations, find the right channel and trigger resubmission on it.
601
601
  const envelope = content;
602
602
  const channelContext = this.contexts.get(envelope.address);
603
- common_utils_1.assert(!!channelContext, 0x183 /* "There should be a channel context for the op" */);
603
+ (0, common_utils_1.assert)(!!channelContext, 0x183 /* "There should be a channel context for the op" */);
604
604
  channelContext.reSubmit(envelope.contents, localOpMetadata);
605
605
  break;
606
606
  }
@@ -609,13 +609,13 @@ class FluidDataStoreRuntime extends common_utils_1.TypedEventEmitter {
609
609
  this.submit(type, content, localOpMetadata);
610
610
  break;
611
611
  default:
612
- common_utils_1.unreachableCase(type);
612
+ (0, common_utils_1.unreachableCase)(type);
613
613
  }
614
614
  }
615
615
  async applyStashedOp(content) {
616
616
  const envelope = content;
617
617
  const channelContext = this.contexts.get(envelope.address);
618
- common_utils_1.assert(!!channelContext, 0x184 /* "There should be a channel context for the op" */);
618
+ (0, common_utils_1.assert)(!!channelContext, 0x184 /* "There should be a channel context for the op" */);
619
619
  await channelContext.getChannel();
620
620
  return channelContext.applyStashedOp(envelope.contents);
621
621
  }
@@ -628,7 +628,7 @@ class FluidDataStoreRuntime extends common_utils_1.TypedEventEmitter {
628
628
  const envelope = message.contents;
629
629
  const transformed = Object.assign(Object.assign({}, message), { contents: envelope.contents });
630
630
  const channelContext = this.contexts.get(envelope.address);
631
- common_utils_1.assert(!!channelContext, 0x185 /* "Channel not found" */);
631
+ (0, common_utils_1.assert)(!!channelContext, 0x185 /* "Channel not found" */);
632
632
  channelContext.processOp(transformed, local, localOpMetadata);
633
633
  return channelContext;
634
634
  }
@@ -646,7 +646,7 @@ class FluidDataStoreRuntime extends common_utils_1.TypedEventEmitter {
646
646
  */
647
647
  this.attachGraph();
648
648
  this._attachState = container_definitions_1.AttachState.Attaching;
649
- common_utils_1.assert(this.visibilityState === runtime_definitions_1.VisibilityState.LocallyVisible, 0x2d1 /* "Data store should be locally visible before it can become globally visible." */);
649
+ (0, common_utils_1.assert)(this.visibilityState === runtime_definitions_1.VisibilityState.LocallyVisible, 0x2d1 /* "Data store should be locally visible before it can become globally visible." */);
650
650
  // Mark the data store globally visible and make its child channels visible as well.
651
651
  this.visibilityState = runtime_definitions_1.VisibilityState.GloballyVisible;
652
652
  this.localChannelContextQueue.forEach((channel) => {
@@ -658,7 +658,7 @@ class FluidDataStoreRuntime extends common_utils_1.TypedEventEmitter {
658
658
  this.emit("attaching");
659
659
  });
660
660
  this.dataStoreContext.once("attached", () => {
661
- common_utils_1.assert(this.visibilityState === runtime_definitions_1.VisibilityState.GloballyVisible, 0x2d2 /* "Data store should be globally visible when its attached." */);
661
+ (0, common_utils_1.assert)(this.visibilityState === runtime_definitions_1.VisibilityState.GloballyVisible, 0x2d2 /* "Data store should be globally visible when its attached." */);
662
662
  this._attachState = container_definitions_1.AttachState.Attached;
663
663
  this.emit("attached");
664
664
  });