@fluidframework/container-loader 2.70.0-361092 → 2.70.0-361788

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 (61) hide show
  1. package/dist/attachment.d.ts +1 -1
  2. package/dist/attachment.js +1 -1
  3. package/dist/attachment.js.map +1 -1
  4. package/dist/connectionStateHandler.d.ts +1 -1
  5. package/dist/connectionStateHandler.js +1 -1
  6. package/dist/connectionStateHandler.js.map +1 -1
  7. package/dist/container.d.ts.map +1 -1
  8. package/dist/container.js +3 -2
  9. package/dist/container.js.map +1 -1
  10. package/dist/containerContext.d.ts +1 -1
  11. package/dist/containerContext.js +1 -1
  12. package/dist/containerContext.js.map +1 -1
  13. package/dist/containerStorageAdapter.d.ts +1 -8
  14. package/dist/containerStorageAdapter.d.ts.map +1 -1
  15. package/dist/containerStorageAdapter.js +0 -9
  16. package/dist/containerStorageAdapter.js.map +1 -1
  17. package/dist/loaderLayerCompatState.d.ts +4 -3
  18. package/dist/loaderLayerCompatState.d.ts.map +1 -1
  19. package/dist/loaderLayerCompatState.js +4 -34
  20. package/dist/loaderLayerCompatState.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/serializedStateManager.d.ts +2 -2
  25. package/dist/serializedStateManager.js +3 -3
  26. package/dist/serializedStateManager.js.map +1 -1
  27. package/lib/attachment.d.ts +1 -1
  28. package/lib/attachment.js +1 -1
  29. package/lib/attachment.js.map +1 -1
  30. package/lib/connectionStateHandler.d.ts +1 -1
  31. package/lib/connectionStateHandler.js +1 -1
  32. package/lib/connectionStateHandler.js.map +1 -1
  33. package/lib/container.d.ts.map +1 -1
  34. package/lib/container.js +3 -2
  35. package/lib/container.js.map +1 -1
  36. package/lib/containerContext.d.ts +1 -1
  37. package/lib/containerContext.js +1 -1
  38. package/lib/containerContext.js.map +1 -1
  39. package/lib/containerStorageAdapter.d.ts +1 -8
  40. package/lib/containerStorageAdapter.d.ts.map +1 -1
  41. package/lib/containerStorageAdapter.js +0 -9
  42. package/lib/containerStorageAdapter.js.map +1 -1
  43. package/lib/loaderLayerCompatState.d.ts +4 -3
  44. package/lib/loaderLayerCompatState.d.ts.map +1 -1
  45. package/lib/loaderLayerCompatState.js +5 -35
  46. package/lib/loaderLayerCompatState.js.map +1 -1
  47. package/lib/packageVersion.d.ts +1 -1
  48. package/lib/packageVersion.js +1 -1
  49. package/lib/packageVersion.js.map +1 -1
  50. package/lib/serializedStateManager.d.ts +2 -2
  51. package/lib/serializedStateManager.js +3 -3
  52. package/lib/serializedStateManager.js.map +1 -1
  53. package/package.json +11 -11
  54. package/src/attachment.ts +1 -1
  55. package/src/connectionStateHandler.ts +1 -1
  56. package/src/container.ts +7 -3
  57. package/src/containerContext.ts +1 -1
  58. package/src/containerStorageAdapter.ts +1 -11
  59. package/src/loaderLayerCompatState.ts +21 -36
  60. package/src/packageVersion.ts +1 -1
  61. package/src/serializedStateManager.ts +3 -3
@@ -36,7 +36,7 @@ export interface IContainerContextConfig extends Readonly<Required<Omit<IContain
36
36
  */
37
37
  export declare class ContainerContext implements Required<Omit<IContainerContext, "snapshotWithContents">>, Pick<IContainerContext, "snapshotWithContents">, IProvideLayerCompatDetails {
38
38
  /**
39
- * @deprecated - This has been replaced by ILayerCompatDetails.
39
+ * @deprecated This has been replaced by ILayerCompatDetails.
40
40
  */
41
41
  readonly supportedFeatures: ReadonlyMap<string, unknown>;
42
42
  readonly options: ILoaderOptions;
@@ -32,7 +32,7 @@ export class ContainerContext {
32
32
  }
33
33
  constructor(config) {
34
34
  /**
35
- * @deprecated - This has been replaced by ILayerCompatDetails.
35
+ * @deprecated This has been replaced by ILayerCompatDetails.
36
36
  */
37
37
  this.supportedFeatures = new Map([
38
38
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"containerContext.js","sourceRoot":"","sources":["../src/containerContext.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAkCH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C5C,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;QAClC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;QAC9B,IAAI,CAAC,yBAAyB,GAAG,MAAM,CAAC,yBAAyB,CAAC;QAClE,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;QAC5C,IAAI,CAAC,aAAa,GAAG,MAAM,CAAC,aAAa,CAAC;QAC1C,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;QAChC,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,YAAY,CAAC;QACxC,IAAI,CAAC,iBAAiB,GAAG,MAAM,CAAC,iBAAiB,CAAC;QAClD,IAAI,MAAM,CAAC,oBAAoB,KAAK,SAAS,EAAE,CAAC;YAC/C,IAAI,CAAC,oBAAoB,GAAG,MAAM,CAAC,oBAAoB,CAAC;QACzD,CAAC;QAED,IAAI,CAAC,kBAAkB,GAAG,MAAM,CAAC,kBAAkB,CAAC;QACpD,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,WAAW,CAAC;QACvC,IAAI,CAAC,yBAAyB,GAAG,MAAM,CAAC,wBAAwB,CAAC;QACjE,IAAI,CAAC,aAAa,GAAG,MAAM,CAAC,YAAY,CAAC;QACzC,IAAI,CAAC,eAAe,GAAG,MAAM,CAAC,cAAc,CAAC;QAC7C,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;IAC/B,CAAC;IAEM,oBAAoB;QAC1B,OAAO,IAAI,CAAC,OAAO,CAAC;IACrB,CAAC;IAED,IAAW,WAAW;QACrB,OAAO,IAAI,CAAC,eAAe,EAAE,CAAC;IAC/B,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tILayerCompatDetails,\n\tIProvideLayerCompatDetails,\n} from \"@fluid-internal/client-utils\";\nimport type {\n\tAttachState,\n\tIAudience,\n\tICriticalContainerError,\n} from \"@fluidframework/container-definitions\";\nimport type {\n\tIBatchMessage,\n\tIContainerContext,\n\tILoader,\n\tILoaderOptions,\n\tIDeltaManager,\n\tIContainerStorageService,\n} from \"@fluidframework/container-definitions/internal\";\nimport type { FluidObject } from \"@fluidframework/core-interfaces\";\nimport type { ISignalEnvelope } from \"@fluidframework/core-interfaces/internal\";\nimport type { IClientDetails, IQuorumClients } from \"@fluidframework/driver-definitions\";\nimport type {\n\tISnapshot,\n\tIDocumentMessage,\n\tISnapshotTree,\n\tISummaryContent,\n\tIVersion,\n\tMessageType,\n\tISequencedDocumentMessage,\n} from \"@fluidframework/driver-definitions/internal\";\nimport type { ITelemetryLoggerExt } from \"@fluidframework/telemetry-utils/internal\";\n\nimport type { ConnectionState } from \"./connectionState.js\";\nimport { loaderCompatDetailsForRuntime } from \"./loaderLayerCompatState.js\";\n\n/**\n * Configuration object for ContainerContext constructor.\n *\n * @remarks\n * A large subset of properties are from {@link IContainerContext}. Select\n * properties are explicitly omitted so that, as {@link ContainerContext} is\n * extended, newly added properties are not overlooked (but may also be\n * explicitly omitted here by adding to the list).\n */\nexport interface IContainerContextConfig\n\textends Readonly<\n\t\tRequired<\n\t\t\tOmit<\n\t\t\t\tIContainerContext,\n\t\t\t\t| \"clientId\"\n\t\t\t\t| \"connected\"\n\t\t\t\t| \"attachState\"\n\t\t\t\t| \"getLoadedFromVersion\"\n\t\t\t\t| \"supportedFeatures\"\n\t\t\t\t| \"id\"\n\t\t\t\t| \"snapshotWithContents\"\n\t\t\t>\n\t\t>\n\t> {\n\t// This overrides IContainerContext.options with specific type.\n\treadonly options: ILoaderOptions;\n\treadonly version: IVersion | undefined;\n\treadonly getContainerDiagnosticId: () => string | undefined;\n\treadonly getClientId: () => string | undefined;\n\treadonly getAttachState: () => AttachState;\n\treadonly getConnected: () => boolean;\n\treadonly existing: boolean;\n\treadonly taggedLogger: ITelemetryLoggerExt;\n\t// This \"overrides\" IContainerContext.snapshotWithContents to be required but allow `undefined`.\n\treadonly snapshotWithContents: IContainerContext[\"snapshotWithContents\"] | undefined;\n}\n\n/**\n * {@inheritDoc @fluidframework/container-definitions#IContainerContext}\n */\nexport class ContainerContext\n\timplements\n\t\tRequired<Omit<IContainerContext, \"snapshotWithContents\">>,\n\t\tPick<IContainerContext, \"snapshotWithContents\">,\n\t\tIProvideLayerCompatDetails\n{\n\t/**\n\t * @deprecated - This has been replaced by ILayerCompatDetails.\n\t */\n\tpublic readonly supportedFeatures: ReadonlyMap<string, unknown> = new Map([\n\t\t/**\n\t\t * This version of the loader accepts `referenceSequenceNumber`, provided by the container runtime,\n\t\t * as a parameter to the `submitBatchFn` and `submitSummaryFn` functions.\n\t\t * This is then used to set the reference sequence numbers of the submitted ops in the DeltaManager.\n\t\t */\n\t\t[\"referenceSequenceNumbers\", true],\n\t]);\n\n\tpublic readonly options: ILoaderOptions;\n\tpublic readonly scope: FluidObject;\n\tpublic readonly baseSnapshot: ISnapshotTree | undefined;\n\tpublic readonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;\n\tpublic readonly storage: IContainerStorageService;\n\tpublic readonly quorum: IQuorumClients;\n\tpublic readonly audience: IAudience;\n\tpublic readonly loader: ILoader;\n\tpublic readonly submitFn: (\n\t\ttype: MessageType,\n\t\tcontents: unknown,\n\t\tbatch: boolean,\n\t\tappData: unknown,\n\t) => number;\n\tpublic readonly submitSummaryFn: (\n\t\tsummaryOp: ISummaryContent,\n\t\treferenceSequenceNumber?: number,\n\t) => number;\n\t/**\n\t * @returns clientSequenceNumber of last message in a batch\n\t */\n\tpublic readonly submitBatchFn: (\n\t\tbatch: IBatchMessage[],\n\t\treferenceSequenceNumber?: number,\n\t) => number;\n\t/**\n\t * `unknown` should be removed once `@alpha` tag is removed from IContainerContext\n\t * @see {@link https://dev.azure.com/fluidframework/internal/_workitems/edit/7462}\n\t * Any changes to submitSignalFn `content` should be checked internally by temporarily changing IContainerContext and removing all `unknown`s\n\t */\n\tpublic readonly submitSignalFn: (\n\t\tcontent: unknown | ISignalEnvelope,\n\t\ttargetClientId?: string,\n\t) => void;\n\tpublic readonly disposeFn: (error?: ICriticalContainerError) => void;\n\tpublic readonly closeFn: (error?: ICriticalContainerError) => void;\n\tpublic readonly updateDirtyContainerState: (dirty: boolean) => void;\n\tpublic readonly getAbsoluteUrl: (relativeUrl: string) => Promise<string | undefined>;\n\tpublic readonly clientDetails: IClientDetails;\n\tpublic readonly existing: boolean;\n\tpublic readonly taggedLogger: ITelemetryLoggerExt;\n\tpublic readonly pendingLocalState: unknown;\n\tpublic readonly snapshotWithContents?: ISnapshot;\n\n\tpublic readonly getConnectionState: () => ConnectionState;\n\n\tprivate readonly _getClientId: () => string | undefined;\n\tprivate readonly _getContainerDiagnosticId: () => string | undefined;\n\tprivate readonly _getConnected: () => boolean;\n\tprivate readonly _getAttachState: () => AttachState;\n\tprivate readonly version: IVersion | undefined;\n\n\tpublic get clientId(): string | undefined {\n\t\treturn this._getClientId();\n\t}\n\n\t/**\n\t * DISCLAIMER: this id is only for telemetry purposes. Not suitable for any other usages.\n\t */\n\tpublic get id(): string {\n\t\treturn this._getContainerDiagnosticId() ?? \"\";\n\t}\n\n\t/**\n\t * When true, ops are free to flow\n\t * When false, ops should be kept as pending or rejected\n\t */\n\tpublic get connected(): boolean {\n\t\treturn this._getConnected();\n\t}\n\n\t/**\n\t * The compatibility details of the Loader layer that is exposed to the Runtime layer\n\t * for validating Runtime-Loader compatibility.\n\t */\n\tpublic get ILayerCompatDetails(): ILayerCompatDetails {\n\t\treturn loaderCompatDetailsForRuntime;\n\t}\n\n\tconstructor(config: IContainerContextConfig) {\n\t\tthis.options = config.options;\n\t\tthis.scope = config.scope;\n\t\tthis.baseSnapshot = config.baseSnapshot;\n\t\tthis.deltaManager = config.deltaManager;\n\t\tthis.storage = config.storage;\n\t\tthis.quorum = config.quorum;\n\t\tthis.audience = config.audience;\n\t\tthis.loader = config.loader;\n\t\tthis.submitFn = config.submitFn;\n\t\tthis.submitSummaryFn = config.submitSummaryFn;\n\t\tthis.submitBatchFn = config.submitBatchFn;\n\t\tthis.submitSignalFn = config.submitSignalFn;\n\t\tthis.disposeFn = config.disposeFn;\n\t\tthis.closeFn = config.closeFn;\n\t\tthis.updateDirtyContainerState = config.updateDirtyContainerState;\n\t\tthis.getAbsoluteUrl = config.getAbsoluteUrl;\n\t\tthis.clientDetails = config.clientDetails;\n\t\tthis.existing = config.existing;\n\t\tthis.taggedLogger = config.taggedLogger;\n\t\tthis.pendingLocalState = config.pendingLocalState;\n\t\tif (config.snapshotWithContents !== undefined) {\n\t\t\tthis.snapshotWithContents = config.snapshotWithContents;\n\t\t}\n\n\t\tthis.getConnectionState = config.getConnectionState;\n\t\tthis._getClientId = config.getClientId;\n\t\tthis._getContainerDiagnosticId = config.getContainerDiagnosticId;\n\t\tthis._getConnected = config.getConnected;\n\t\tthis._getAttachState = config.getAttachState;\n\t\tthis.version = config.version;\n\t}\n\n\tpublic getLoadedFromVersion(): IVersion | undefined {\n\t\treturn this.version;\n\t}\n\n\tpublic get attachState(): AttachState {\n\t\treturn this._getAttachState();\n\t}\n}\n"]}
1
+ {"version":3,"file":"containerContext.js","sourceRoot":"","sources":["../src/containerContext.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAkCH,OAAO,EAAE,6BAA6B,EAAE,MAAM,6BAA6B,CAAC;AAuC5E;;GAEG;AACH,MAAM,OAAO,gBAAgB;IAsE5B,IAAW,QAAQ;QAClB,OAAO,IAAI,CAAC,YAAY,EAAE,CAAC;IAC5B,CAAC;IAED;;OAEG;IACH,IAAW,EAAE;QACZ,OAAO,IAAI,CAAC,yBAAyB,EAAE,IAAI,EAAE,CAAC;IAC/C,CAAC;IAED;;;OAGG;IACH,IAAW,SAAS;QACnB,OAAO,IAAI,CAAC,aAAa,EAAE,CAAC;IAC7B,CAAC;IAED;;;OAGG;IACH,IAAW,mBAAmB;QAC7B,OAAO,6BAA6B,CAAC;IACtC,CAAC;IAED,YAAY,MAA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AiB,CAAC;QAClD,IAAI,MAAM,CAAC,oBAAoB,KAAK,SAAS,EAAE,CAAC;YAC/C,IAAI,CAAC,oBAAoB,GAAG,MAAM,CAAC,oBAAoB,CAAC;QACzD,CAAC;QAED,IAAI,CAAC,kBAAkB,GAAG,MAAM,CAAC,kBAAkB,CAAC;QACpD,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,WAAW,CAAC;QACvC,IAAI,CAAC,yBAAyB,GAAG,MAAM,CAAC,wBAAwB,CAAC;QACjE,IAAI,CAAC,aAAa,GAAG,MAAM,CAAC,YAAY,CAAC;QACzC,IAAI,CAAC,eAAe,GAAG,MAAM,CAAC,cAAc,CAAC;QAC7C,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;IAC/B,CAAC;IAEM,oBAAoB;QAC1B,OAAO,IAAI,CAAC,OAAO,CAAC;IACrB,CAAC;IAED,IAAW,WAAW;QACrB,OAAO,IAAI,CAAC,eAAe,EAAE,CAAC;IAC/B,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tILayerCompatDetails,\n\tIProvideLayerCompatDetails,\n} from \"@fluid-internal/client-utils\";\nimport type {\n\tAttachState,\n\tIAudience,\n\tICriticalContainerError,\n} from \"@fluidframework/container-definitions\";\nimport type {\n\tIBatchMessage,\n\tIContainerContext,\n\tILoader,\n\tILoaderOptions,\n\tIDeltaManager,\n\tIContainerStorageService,\n} from \"@fluidframework/container-definitions/internal\";\nimport type { FluidObject } from \"@fluidframework/core-interfaces\";\nimport type { ISignalEnvelope } from \"@fluidframework/core-interfaces/internal\";\nimport type { IClientDetails, IQuorumClients } from \"@fluidframework/driver-definitions\";\nimport type {\n\tISnapshot,\n\tIDocumentMessage,\n\tISnapshotTree,\n\tISummaryContent,\n\tIVersion,\n\tMessageType,\n\tISequencedDocumentMessage,\n} from \"@fluidframework/driver-definitions/internal\";\nimport type { ITelemetryLoggerExt } from \"@fluidframework/telemetry-utils/internal\";\n\nimport type { ConnectionState } from \"./connectionState.js\";\nimport { loaderCompatDetailsForRuntime } from \"./loaderLayerCompatState.js\";\n\n/**\n * Configuration object for ContainerContext constructor.\n *\n * @remarks\n * A large subset of properties are from {@link IContainerContext}. Select\n * properties are explicitly omitted so that, as {@link ContainerContext} is\n * extended, newly added properties are not overlooked (but may also be\n * explicitly omitted here by adding to the list).\n */\nexport interface IContainerContextConfig\n\textends Readonly<\n\t\tRequired<\n\t\t\tOmit<\n\t\t\t\tIContainerContext,\n\t\t\t\t| \"clientId\"\n\t\t\t\t| \"connected\"\n\t\t\t\t| \"attachState\"\n\t\t\t\t| \"getLoadedFromVersion\"\n\t\t\t\t| \"supportedFeatures\"\n\t\t\t\t| \"id\"\n\t\t\t\t| \"snapshotWithContents\"\n\t\t\t>\n\t\t>\n\t> {\n\t// This overrides IContainerContext.options with specific type.\n\treadonly options: ILoaderOptions;\n\treadonly version: IVersion | undefined;\n\treadonly getContainerDiagnosticId: () => string | undefined;\n\treadonly getClientId: () => string | undefined;\n\treadonly getAttachState: () => AttachState;\n\treadonly getConnected: () => boolean;\n\treadonly existing: boolean;\n\treadonly taggedLogger: ITelemetryLoggerExt;\n\t// This \"overrides\" IContainerContext.snapshotWithContents to be required but allow `undefined`.\n\treadonly snapshotWithContents: IContainerContext[\"snapshotWithContents\"] | undefined;\n}\n\n/**\n * {@inheritDoc @fluidframework/container-definitions#IContainerContext}\n */\nexport class ContainerContext\n\timplements\n\t\tRequired<Omit<IContainerContext, \"snapshotWithContents\">>,\n\t\tPick<IContainerContext, \"snapshotWithContents\">,\n\t\tIProvideLayerCompatDetails\n{\n\t/**\n\t * @deprecated This has been replaced by ILayerCompatDetails.\n\t */\n\tpublic readonly supportedFeatures: ReadonlyMap<string, unknown> = new Map([\n\t\t/**\n\t\t * This version of the loader accepts `referenceSequenceNumber`, provided by the container runtime,\n\t\t * as a parameter to the `submitBatchFn` and `submitSummaryFn` functions.\n\t\t * This is then used to set the reference sequence numbers of the submitted ops in the DeltaManager.\n\t\t */\n\t\t[\"referenceSequenceNumbers\", true],\n\t]);\n\n\tpublic readonly options: ILoaderOptions;\n\tpublic readonly scope: FluidObject;\n\tpublic readonly baseSnapshot: ISnapshotTree | undefined;\n\tpublic readonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;\n\tpublic readonly storage: IContainerStorageService;\n\tpublic readonly quorum: IQuorumClients;\n\tpublic readonly audience: IAudience;\n\tpublic readonly loader: ILoader;\n\tpublic readonly submitFn: (\n\t\ttype: MessageType,\n\t\tcontents: unknown,\n\t\tbatch: boolean,\n\t\tappData: unknown,\n\t) => number;\n\tpublic readonly submitSummaryFn: (\n\t\tsummaryOp: ISummaryContent,\n\t\treferenceSequenceNumber?: number,\n\t) => number;\n\t/**\n\t * @returns clientSequenceNumber of last message in a batch\n\t */\n\tpublic readonly submitBatchFn: (\n\t\tbatch: IBatchMessage[],\n\t\treferenceSequenceNumber?: number,\n\t) => number;\n\t/**\n\t * `unknown` should be removed once `@alpha` tag is removed from IContainerContext\n\t * @see {@link https://dev.azure.com/fluidframework/internal/_workitems/edit/7462}\n\t * Any changes to submitSignalFn `content` should be checked internally by temporarily changing IContainerContext and removing all `unknown`s\n\t */\n\tpublic readonly submitSignalFn: (\n\t\tcontent: unknown | ISignalEnvelope,\n\t\ttargetClientId?: string,\n\t) => void;\n\tpublic readonly disposeFn: (error?: ICriticalContainerError) => void;\n\tpublic readonly closeFn: (error?: ICriticalContainerError) => void;\n\tpublic readonly updateDirtyContainerState: (dirty: boolean) => void;\n\tpublic readonly getAbsoluteUrl: (relativeUrl: string) => Promise<string | undefined>;\n\tpublic readonly clientDetails: IClientDetails;\n\tpublic readonly existing: boolean;\n\tpublic readonly taggedLogger: ITelemetryLoggerExt;\n\tpublic readonly pendingLocalState: unknown;\n\tpublic readonly snapshotWithContents?: ISnapshot;\n\n\tpublic readonly getConnectionState: () => ConnectionState;\n\n\tprivate readonly _getClientId: () => string | undefined;\n\tprivate readonly _getContainerDiagnosticId: () => string | undefined;\n\tprivate readonly _getConnected: () => boolean;\n\tprivate readonly _getAttachState: () => AttachState;\n\tprivate readonly version: IVersion | undefined;\n\n\tpublic get clientId(): string | undefined {\n\t\treturn this._getClientId();\n\t}\n\n\t/**\n\t * DISCLAIMER: this id is only for telemetry purposes. Not suitable for any other usages.\n\t */\n\tpublic get id(): string {\n\t\treturn this._getContainerDiagnosticId() ?? \"\";\n\t}\n\n\t/**\n\t * When true, ops are free to flow\n\t * When false, ops should be kept as pending or rejected\n\t */\n\tpublic get connected(): boolean {\n\t\treturn this._getConnected();\n\t}\n\n\t/**\n\t * The compatibility details of the Loader layer that is exposed to the Runtime layer\n\t * for validating Runtime-Loader compatibility.\n\t */\n\tpublic get ILayerCompatDetails(): ILayerCompatDetails {\n\t\treturn loaderCompatDetailsForRuntime;\n\t}\n\n\tconstructor(config: IContainerContextConfig) {\n\t\tthis.options = config.options;\n\t\tthis.scope = config.scope;\n\t\tthis.baseSnapshot = config.baseSnapshot;\n\t\tthis.deltaManager = config.deltaManager;\n\t\tthis.storage = config.storage;\n\t\tthis.quorum = config.quorum;\n\t\tthis.audience = config.audience;\n\t\tthis.loader = config.loader;\n\t\tthis.submitFn = config.submitFn;\n\t\tthis.submitSummaryFn = config.submitSummaryFn;\n\t\tthis.submitBatchFn = config.submitBatchFn;\n\t\tthis.submitSignalFn = config.submitSignalFn;\n\t\tthis.disposeFn = config.disposeFn;\n\t\tthis.closeFn = config.closeFn;\n\t\tthis.updateDirtyContainerState = config.updateDirtyContainerState;\n\t\tthis.getAbsoluteUrl = config.getAbsoluteUrl;\n\t\tthis.clientDetails = config.clientDetails;\n\t\tthis.existing = config.existing;\n\t\tthis.taggedLogger = config.taggedLogger;\n\t\tthis.pendingLocalState = config.pendingLocalState;\n\t\tif (config.snapshotWithContents !== undefined) {\n\t\t\tthis.snapshotWithContents = config.snapshotWithContents;\n\t\t}\n\n\t\tthis.getConnectionState = config.getConnectionState;\n\t\tthis._getClientId = config.getClientId;\n\t\tthis._getContainerDiagnosticId = config.getContainerDiagnosticId;\n\t\tthis._getConnected = config.getConnected;\n\t\tthis._getAttachState = config.getAttachState;\n\t\tthis.version = config.version;\n\t}\n\n\tpublic getLoadedFromVersion(): IVersion | undefined {\n\t\treturn this.version;\n\t}\n\n\tpublic get attachState(): AttachState {\n\t\treturn this._getAttachState();\n\t}\n}\n"]}
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import type { ISnapshotTreeWithBlobContents, IContainerStorageService } from "@fluidframework/container-definitions/internal";
6
6
  import type { IDisposable } from "@fluidframework/core-interfaces";
7
- import type { ISummaryHandle, ISummaryTree } from "@fluidframework/driver-definitions";
7
+ import type { ISummaryTree } from "@fluidframework/driver-definitions";
8
8
  import type { FetchSource, IDocumentService, IDocumentStorageService, IDocumentStorageServicePolicies, ISnapshot, ISnapshotFetchOptions, ISummaryContext, ICreateBlobResponse, ISnapshotTree, IVersion } from "@fluidframework/driver-definitions/internal";
9
9
  import type { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils/internal";
10
10
  import type { MemoryDetachedBlobStorage } from "./memoryBlobStorage.js";
@@ -64,13 +64,6 @@ export declare class ContainerStorageAdapter implements ISerializedStateManagerD
64
64
  getVersions(versionId: string | null, count: number, scenarioName?: string, fetchSource?: FetchSource): Promise<IVersion[]>;
65
65
  uploadSummaryWithContext(summary: ISummaryTree, context: ISummaryContext): Promise<string>;
66
66
  createBlob(file: ArrayBufferLike): Promise<ICreateBlobResponse>;
67
- /**
68
- * {@link IRuntimeStorageService.downloadSummary}.
69
- *
70
- * @deprecated - This API is deprecated and will be removed in a future release. No replacement is planned as
71
- * it is unused in the Runtime and below layers.
72
- */
73
- downloadSummary(handle: ISummaryHandle): Promise<ISummaryTree>;
74
67
  }
75
68
  /**
76
69
  * Get blob contents of a snapshot tree from storage (or, ideally, cache)
@@ -1 +1 @@
1
- {"version":3,"file":"containerStorageAdapter.d.ts","sourceRoot":"","sources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CAAC;IAQ9C,WAAW,CAGvB,SAAS,EAAE,MAAM,GAAG,IAAI,EACxB,KAAK,EAAE,MAAM,EACb,YAAY,CAAC,EAAE,MAAM,EACrB,WAAW,CAAC,EAAE,WAAW,GACvB,OAAO,CAAC,QAAQ,EAAE,CAAC;IAIT,wBAAwB,CACpC,OAAO,EAAE,YAAY,EACrB,OAAO,EAAE,eAAe,GACtB,OAAO,CAAC,MAAM,CAAC;IAIL,UAAU,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,mBAAmB,CAAC;CAG5E;AA6DD;;GAEG;AACH,wBAAsB,uBAAuB,CAC5C,QAAQ,EAAE,SAAS,GAAG,aAAa,EACnC,OAAO,EAAE,IAAI,CAAC,uBAAuB,EAAE,UAAU,CAAC,GAChD,OAAO,CAAC,yBAAyB,CAAC,CAYpC;AAqCD;;GAEG;AACH,wBAAgB,uCAAuC,CACtD,QAAQ,EAAE,6BAA6B,GACrC,yBAAyB,CAI3B"}
@@ -155,15 +155,6 @@ export class ContainerStorageAdapter {
155
155
  async createBlob(file) {
156
156
  return this._storageService.createBlob(file);
157
157
  }
158
- /**
159
- * {@link IRuntimeStorageService.downloadSummary}.
160
- *
161
- * @deprecated - This API is deprecated and will be removed in a future release. No replacement is planned as
162
- * it is unused in the Runtime and below layers.
163
- */
164
- async downloadSummary(handle) {
165
- return this._storageService.downloadSummary(handle);
166
- }
167
158
  }
168
159
  /**
169
160
  * Storage which only supports createBlob() and readBlob(). This is used with IDetachedBlobStorage to support
@@ -1 +1 @@
1
- {"version":3,"file":"containerStorageAdapter.js","sourceRoot":"","sources":["../src/containerStorageAdapter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAM9D,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAc7D,OAAO,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,uCAAuC,CAAC;AAI1F,OAAO,EAAE,0BA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CAA2C,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;QACpE,CAAC;IACF,CAAC;IACD,KAAK,MAAM,EAAE,IAAI,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QAC5C,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC,EAAE,CAAC,CAAC;QACtC,MAAM,CAAC,IAAI,KAAK,SAAS,EAAE,KAAK,CAAC,6CAA6C,CAAC,CAAC;QAChF,oDAAoD;QACpD,KAAK,CAAC,EAAE,CAAC,GAAG,cAAc,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAC1C,CAAC;AACF,CAAC;AAED,wDAAwD;AACxD,SAAS,0CAA0C,CAClD,IAAmC,EACnC,KAAgC;IAEhC,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;IAC7C,MAAM,CACL,EAAE,KAAK,SAAS,EAChB,KAAK,CAAC,mEAAmE,CACzE,CAAC;IACF,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC,EAAE,CAAC,CAAC;IACtC,MAAM,CAAC,IAAI,KAAK,SAAS,EAAE,KAAK,CAAC,2CAA2C,CAAC,CAAC;IAC9E,oDAAoD;IACpD,KAAK,CAAC,EAAE,CAAC,GAAG,cAAc,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;AAC1C,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { bufferToString } from \"@fluid-internal/client-utils\";\nimport type {\n\tISnapshotTreeWithBlobContents,\n\tIContainerStorageService,\n} from \"@fluidframework/container-definitions/internal\";\nimport type { IDisposable } from \"@fluidframework/core-interfaces\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport type { ISummaryHandle, ISummaryTree } from \"@fluidframework/driver-definitions\";\nimport type {\n\tFetchSource,\n\tIDocumentService,\n\tIDocumentStorageService,\n\tIDocumentStorageServicePolicies,\n\tISnapshot,\n\tISnapshotFetchOptions,\n\tISummaryContext,\n\tICreateBlobResponse,\n\tISnapshotTree,\n\tIVersion,\n} from \"@fluidframework/driver-definitions/internal\";\nimport { isInstanceOfISnapshot, UsageError } from \"@fluidframework/driver-utils/internal\";\nimport type { ITelemetryLoggerExt } from \"@fluidframework/telemetry-utils/internal\";\n\nimport type { MemoryDetachedBlobStorage } from \"./memoryBlobStorage.js\";\nimport { ProtocolTreeStorageService } from \"./protocolTreeDocumentStorageService.js\";\nimport { RetriableDocumentStorageService } from \"./retriableDocumentStorageService.js\";\nimport type {\n\tISerializedStateManagerDocumentStorageService,\n\tSerializedSnapshotInfo,\n} from \"./serializedStateManager.js\";\nimport { convertSnapshotInfoToSnapshot } from \"./utils.js\";\n\n/**\n * Stringified blobs from a summary/snapshot tree.\n * @internal\n */\nexport interface ISerializableBlobContents {\n\t[id: string]: string;\n}\n\n/**\n * This class wraps the actual storage and make sure no wrong apis are called according to\n * container attach state.\n */\nexport class ContainerStorageAdapter\n\timplements\n\t\tISerializedStateManagerDocumentStorageService,\n\t\tIContainerStorageService,\n\t\tIDisposable\n{\n\tprivate _storageService: IDocumentStorageService & Partial<IDisposable>;\n\n\tprivate _summarizeProtocolTree: boolean | undefined;\n\t/**\n\t * Whether the adapter will enforce sending combined summary trees.\n\t */\n\tpublic get summarizeProtocolTree(): boolean {\n\t\treturn this._summarizeProtocolTree === true;\n\t}\n\n\tprivate _loadedGroupIdSnapshots: Record<string, ISnapshot> = {};\n\t/**\n\t * Any loading group id (virtualized) snapshot download from storage will be stored here.\n\t */\n\tpublic get loadedGroupIdSnapshots(): Record<string, ISnapshot> {\n\t\treturn this._loadedGroupIdSnapshots;\n\t}\n\n\t/**\n\t * ArrayBufferLikes containing blobs from a snapshot\n\t */\n\tprivate readonly blobContents: { [id: string]: ArrayBufferLike } = {};\n\n\t/**\n\t * An adapter that ensures we're using detachedBlobStorage up until we connect to a real service, and then\n\t * after connecting to a real service augments it with retry and combined summary tree enforcement.\n\t * @param detachedBlobStorage - The detached blob storage to use up until we connect to a real service\n\t * @param logger - Telemetry logger\n\t * @param loadingGroupIdSnapshotsFromPendingState - in offline mode, any loading group snapshots we've downloaded from the service that were stored in the pending state\n\t * @param addProtocolSummaryIfMissing - a callback to permit the container to inspect the summary we're about to\n\t * upload, and fix it up with a protocol tree if needed\n\t * @param enableSummarizeProtocolTree - Enable uploading a protocol summary. Note: preference is given to service policy's \"summarizeProtocolTree\" before this value.\n\t */\n\tpublic constructor(\n\t\tdetachedBlobStorage: MemoryDetachedBlobStorage | undefined,\n\t\tprivate readonly logger: ITelemetryLoggerExt,\n\t\tprivate loadingGroupIdSnapshotsFromPendingState:\n\t\t\t| Record<string, SerializedSnapshotInfo>\n\t\t\t| undefined,\n\t\tprivate readonly addProtocolSummaryIfMissing: (summaryTree: ISummaryTree) => ISummaryTree,\n\t\tprivate readonly enableSummarizeProtocolTree: boolean | undefined,\n\t) {\n\t\tthis._storageService = new BlobOnlyStorage(detachedBlobStorage, logger);\n\t}\n\n\tdisposed: boolean = false;\n\tdispose(error?: Error): void {\n\t\tthis._storageService?.dispose?.(error);\n\t\tthis.disposed = true;\n\t}\n\n\tpublic connectToService(service: IDocumentService): void {\n\t\tif (!(this._storageService instanceof BlobOnlyStorage)) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst storageServiceP = service.connectToStorage();\n\t\tconst retriableStorage = (this._storageService = new RetriableDocumentStorageService(\n\t\t\tstorageServiceP,\n\t\t\tthis.logger,\n\t\t));\n\n\t\t// A storage service wrapper which intercept calls to uploadSummaryWithContext and ensure they include\n\t\t// the protocol summary, provided single-commit summary is enabled.\n\t\tthis._storageService = new ProtocolTreeStorageService(\n\t\t\tretriableStorage,\n\t\t\t(...props) => {\n\t\t\t\tthis.logger.sendTelemetryEvent({ eventName: \"summarizeProtocolTreeEnabled\" });\n\t\t\t\treturn this.addProtocolSummaryIfMissing(...props);\n\t\t\t},\n\t\t\t// A callback to ensure we fetch the most updated value of service.policies.summarizeProtocolTree, which could be set\n\t\t\t// based on the response received from the service after connection is established.\n\t\t\t() => {\n\t\t\t\t// Determine whether or not container should upload the protocol summary along with the summary.\n\t\t\t\t// This is determined based on what value is set for serve policy's summariProtocolTree value or the enableSummarizeProtocolTree\n\t\t\t\t// retrievd from the loader options or monitoring context config.\n\t\t\t\tconst shouldSummarizeProtocolTree =\n\t\t\t\t\tservice.policies?.summarizeProtocolTree ?? this.enableSummarizeProtocolTree ?? false;\n\n\t\t\t\tif (this._summarizeProtocolTree !== shouldSummarizeProtocolTree) {\n\t\t\t\t\tthis.logger.sendTelemetryEvent({\n\t\t\t\t\t\teventName: \"isSummarizeProtocolTreeEnabled\",\n\t\t\t\t\t\tdetails: { value: shouldSummarizeProtocolTree },\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tthis._summarizeProtocolTree = shouldSummarizeProtocolTree;\n\t\t\t\treturn this._summarizeProtocolTree;\n\t\t\t},\n\t\t);\n\t}\n\n\tpublic cacheSnapshotBlobs(snapshotBlobs: Map<string, ArrayBuffer>): void {\n\t\tfor (const [id, value] of snapshotBlobs.entries()) {\n\t\t\tthis.blobContents[id] ??= value;\n\t\t}\n\t}\n\n\tpublic clearPendingState(): void {\n\t\tthis.loadingGroupIdSnapshotsFromPendingState = undefined;\n\t}\n\n\tpublic get policies(): IDocumentStorageServicePolicies | undefined {\n\t\t// back-compat 0.40 containerRuntime requests policies even in detached container if storage is present\n\t\t// and storage is always present in >=0.41.\n\t\ttry {\n\t\t\treturn this._storageService.policies;\n\t\t} catch {\n\t\t\t// No-op\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tpublic get maximumCacheDurationMs(): IDocumentStorageServicePolicies[\"maximumCacheDurationMs\"] {\n\t\treturn this.policies?.maximumCacheDurationMs;\n\t}\n\n\tpublic async getSnapshotTree(\n\t\tversion?: IVersion,\n\t\tscenarioName?: string,\n\t\t// API called below uses null\n\t\t// eslint-disable-next-line @rushstack/no-new-null\n\t): Promise<ISnapshotTree | null> {\n\t\treturn this._storageService.getSnapshotTree(version, scenarioName);\n\t}\n\n\tpublic async getSnapshot(snapshotFetchOptions?: ISnapshotFetchOptions): Promise<ISnapshot> {\n\t\tlet snapshot: ISnapshot;\n\t\tif (\n\t\t\tthis.loadingGroupIdSnapshotsFromPendingState !== undefined &&\n\t\t\tsnapshotFetchOptions?.loadingGroupIds !== undefined\n\t\t) {\n\t\t\tconst localSnapshot =\n\t\t\t\tthis.loadingGroupIdSnapshotsFromPendingState[snapshotFetchOptions.loadingGroupIds[0]];\n\t\t\tassert(localSnapshot !== undefined, 0x970 /* Local snapshot must be present */);\n\t\t\tsnapshot = convertSnapshotInfoToSnapshot(localSnapshot);\n\t\t} else {\n\t\t\tif (this._storageService.getSnapshot === undefined) {\n\t\t\t\tthrow new UsageError(\n\t\t\t\t\t\"getSnapshot api should exist in internal storage in ContainerStorageAdapter\",\n\t\t\t\t);\n\t\t\t}\n\t\t\tsnapshot = await this._storageService.getSnapshot(snapshotFetchOptions);\n\t\t}\n\n\t\t// Track the latest snapshot for each loading group id\n\t\tconst loadingGroupIds = snapshotFetchOptions?.loadingGroupIds;\n\t\tassert(\n\t\t\tsnapshot.sequenceNumber !== undefined,\n\t\t\t0x971 /* Snapshot must have sequence number */,\n\t\t);\n\t\tif (loadingGroupIds !== undefined) {\n\t\t\tfor (const loadingGroupId of loadingGroupIds) {\n\t\t\t\t// Do we actually want to update the stored snapshot?\n\t\t\t\t// What if the incoming snapshot is way newer than the stored snapshot?\n\t\t\t\t// We only want to update the stored snapshot if the incoming snapshot is newer (stored sequence number < incoming sequence number)\n\t\t\t\tconst storedSeqNum =\n\t\t\t\t\tthis._loadedGroupIdSnapshots[loadingGroupId]?.sequenceNumber ?? -1;\n\t\t\t\tif (storedSeqNum < snapshot.sequenceNumber) {\n\t\t\t\t\tthis._loadedGroupIdSnapshots[loadingGroupId] = snapshot;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn snapshot;\n\t}\n\n\tpublic async readBlob(id: string): Promise<ArrayBufferLike> {\n\t\tconst maybeBlob = this.blobContents[id];\n\t\tif (maybeBlob !== undefined) {\n\t\t\treturn maybeBlob;\n\t\t}\n\t\treturn this._storageService.readBlob(id);\n\t}\n\n\tpublic async getVersions(\n\t\t// API used below uses null\n\t\t// eslint-disable-next-line @rushstack/no-new-null\n\t\tversionId: string | null,\n\t\tcount: number,\n\t\tscenarioName?: string,\n\t\tfetchSource?: FetchSource,\n\t): Promise<IVersion[]> {\n\t\treturn this._storageService.getVersions(versionId, count, scenarioName, fetchSource);\n\t}\n\n\tpublic async uploadSummaryWithContext(\n\t\tsummary: ISummaryTree,\n\t\tcontext: ISummaryContext,\n\t): Promise<string> {\n\t\treturn this._storageService.uploadSummaryWithContext(summary, context);\n\t}\n\n\tpublic async createBlob(file: ArrayBufferLike): Promise<ICreateBlobResponse> {\n\t\treturn this._storageService.createBlob(file);\n\t}\n\n\t/**\n\t * {@link IRuntimeStorageService.downloadSummary}.\n\t *\n\t * @deprecated - This API is deprecated and will be removed in a future release. No replacement is planned as\n\t * it is unused in the Runtime and below layers.\n\t */\n\tpublic async downloadSummary(handle: ISummaryHandle): Promise<ISummaryTree> {\n\t\treturn this._storageService.downloadSummary(handle);\n\t}\n}\n\n/**\n * Storage which only supports createBlob() and readBlob(). This is used with IDetachedBlobStorage to support\n * blobs in detached containers.\n */\nclass BlobOnlyStorage implements IDocumentStorageService {\n\tconstructor(\n\t\tprivate readonly detachedStorage: MemoryDetachedBlobStorage | undefined,\n\t\tprivate readonly logger: ITelemetryLoggerExt,\n\t) {}\n\n\tpublic async createBlob(content: ArrayBufferLike): Promise<ICreateBlobResponse> {\n\t\treturn this.verifyStorage().createBlob(content);\n\t}\n\n\tpublic async readBlob(blobId: string): Promise<ArrayBufferLike> {\n\t\treturn this.verifyStorage().readBlob(blobId);\n\t}\n\n\tprivate verifyStorage(): MemoryDetachedBlobStorage {\n\t\tif (this.detachedStorage === undefined) {\n\t\t\tthrow new UsageError(\"Real storage calls not allowed in Unattached container\");\n\t\t}\n\t\treturn this.detachedStorage;\n\t}\n\n\tpublic get policies(): IDocumentStorageServicePolicies | undefined {\n\t\treturn this.notCalled();\n\t}\n\n\t/* eslint-disable @typescript-eslint/unbound-method */\n\t// eslint-disable-next-line @rushstack/no-new-null\n\tpublic getSnapshotTree: () => Promise<ISnapshotTree | null> = this.notCalled;\n\tpublic getSnapshot: () => Promise<ISnapshot> = this.notCalled;\n\tpublic getVersions: () => Promise<IVersion[]> = this.notCalled;\n\tpublic write: () => Promise<IVersion> = this.notCalled;\n\tpublic uploadSummaryWithContext: () => Promise<string> = this.notCalled;\n\tpublic downloadSummary: () => Promise<ISummaryTree> = this.notCalled;\n\t/* eslint-enable @typescript-eslint/unbound-method */\n\n\tprivate notCalled(): never {\n\t\tthis.verifyStorage();\n\t\ttry {\n\t\t\t// some browsers may not populate stack unless exception is thrown\n\t\t\tthrow new Error(\"BlobOnlyStorage not implemented method used\");\n\t\t} catch (error) {\n\t\t\tthis.logger.sendTelemetryEvent({ eventName: \"BlobOnlyStorageWrongCall\" }, error);\n\t\t\tthrow error;\n\t\t}\n\t}\n}\n\n// runtime will write a tree to the summary containing \"attachment\" type entries\n// which reference attachment blobs by ID, along with a blob containing the blob redirect table.\n// However, some drivers do not support the \"attachment\" type and will convert them to \"blob\" type\n// entries. We want to avoid saving these to reduce the size of stashed change blobs, but we\n// need to make sure the blob redirect table is saved.\nconst blobsTreeName = \".blobs\";\nconst redirectTableBlobName = \".redirectTable\";\n\n/**\n * Get blob contents of a snapshot tree from storage (or, ideally, cache)\n */\nexport async function getBlobContentsFromTree(\n\tsnapshot: ISnapshot | ISnapshotTree,\n\tstorage: Pick<IDocumentStorageService, \"readBlob\">,\n): Promise<ISerializableBlobContents> {\n\tconst blobs = {};\n\tif (isInstanceOfISnapshot(snapshot)) {\n\t\tconst blobContents = snapshot.blobContents;\n\t\tfor (const [id, content] of blobContents.entries()) {\n\t\t\t// ArrayBufferLike will not survive JSON.stringify()\n\t\t\tblobs[id] = bufferToString(content, \"utf8\");\n\t\t}\n\t} else {\n\t\tawait getBlobContentsFromTreeCore(snapshot, blobs, storage);\n\t}\n\treturn blobs;\n}\n\nasync function getBlobContentsFromTreeCore(\n\ttree: ISnapshotTree,\n\tblobs: ISerializableBlobContents,\n\tstorage: Pick<IDocumentStorageService, \"readBlob\">,\n\troot = true,\n): Promise<unknown[]> {\n\tconst treePs: Promise<unknown>[] = [];\n\tfor (const [key, subTree] of Object.entries(tree.trees)) {\n\t\tif (root && key === blobsTreeName) {\n\t\t\ttreePs.push(getBlobManagerTreeFromTree(subTree, blobs, storage));\n\t\t} else {\n\t\t\ttreePs.push(getBlobContentsFromTreeCore(subTree, blobs, storage, false));\n\t\t}\n\t}\n\tfor (const id of Object.values(tree.blobs)) {\n\t\tconst blob = await storage.readBlob(id);\n\t\t// ArrayBufferLike will not survive JSON.stringify()\n\t\tblobs[id] = bufferToString(blob, \"utf8\");\n\t}\n\treturn Promise.all(treePs);\n}\n\n// save redirect table from .blobs tree but nothing else\nasync function getBlobManagerTreeFromTree(\n\ttree: ISnapshotTree,\n\tblobs: ISerializableBlobContents,\n\tstorage: Pick<IDocumentStorageService, \"readBlob\">,\n): Promise<void> {\n\tconst id = tree.blobs[redirectTableBlobName];\n\tassert(id !== undefined, 0x9ce /* id is undefined in getBlobManagerTreeFromTree */);\n\tconst blob = await storage.readBlob(id);\n\t// ArrayBufferLike will not survive JSON.stringify()\n\tblobs[id] = bufferToString(blob, \"utf8\");\n}\n\n/**\n * Extract blob contents from a snapshot tree with blob contents\n */\nexport function getBlobContentsFromTreeWithBlobContents(\n\tsnapshot: ISnapshotTreeWithBlobContents,\n): ISerializableBlobContents {\n\tconst blobs = {};\n\tgetBlobContentsFromTreeWithBlobContentsCore(snapshot, blobs);\n\treturn blobs;\n}\n\nfunction getBlobContentsFromTreeWithBlobContentsCore(\n\ttree: ISnapshotTreeWithBlobContents,\n\tblobs: ISerializableBlobContents,\n\troot = true,\n): void {\n\tfor (const [key, subTree] of Object.entries(tree.trees)) {\n\t\tif (root && key === blobsTreeName) {\n\t\t\tgetBlobManagerTreeFromTreeWithBlobContents(subTree, blobs);\n\t\t} else {\n\t\t\tgetBlobContentsFromTreeWithBlobContentsCore(subTree, blobs, false);\n\t\t}\n\t}\n\tfor (const id of Object.values(tree.blobs)) {\n\t\tconst blob = tree.blobsContents?.[id];\n\t\tassert(blob !== undefined, 0x2ec /* \"Blob must be present in blobsContents\" */);\n\t\t// ArrayBufferLike will not survive JSON.stringify()\n\t\tblobs[id] = bufferToString(blob, \"utf8\");\n\t}\n}\n\n// save redirect table from .blobs tree but nothing else\nfunction getBlobManagerTreeFromTreeWithBlobContents(\n\ttree: ISnapshotTreeWithBlobContents,\n\tblobs: ISerializableBlobContents,\n): void {\n\tconst id = tree.blobs[redirectTableBlobName];\n\tassert(\n\t\tid !== undefined,\n\t\t0x9cf /* id is undefined in getBlobManagerTreeFromTreeWithBlobContents */,\n\t);\n\tconst blob = tree.blobsContents?.[id];\n\tassert(blob !== undefined, 0x70f /* Blob must be present in blobsContents */);\n\t// ArrayBufferLike will not survive JSON.stringify()\n\tblobs[id] = bufferToString(blob, \"utf8\");\n}\n"]}
1
+ {"version":3,"file":"containerStorageAdapter.js","sourceRoot":"","sources":["../src/containerStorageAdapter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAM9D,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAc7D,OAAO,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,uCAAuC,CAAC;AAI1F,OAAO,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AACrF,OAAO,EAAE,+BAA+B,EAAE,MAAM,sCAAsC,CAAC;AAKvF,OAAO,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAC;AAU3D;;;GAGG;AACH,MAAM,OAAO,uBAAuB;IAS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CAAC;QAChF,oDAAoD;QACpD,KAAK,CAAC,EAAE,CAAC,GAAG,cAAc,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAC1C,CAAC;AACF,CAAC;AAED,wDAAwD;AACxD,SAAS,0CAA0C,CAClD,IAAmC,EACnC,KAAgC;IAEhC,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;IAC7C,MAAM,CACL,EAAE,KAAK,SAAS,EAChB,KAAK,CAAC,mEAAmE,CACzE,CAAC;IACF,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC,EAAE,CAAC,CAAC;IACtC,MAAM,CAAC,IAAI,KAAK,SAAS,EAAE,KAAK,CAAC,2CAA2C,CAAC,CAAC;IAC9E,oDAAoD;IACpD,KAAK,CAAC,EAAE,CAAC,GAAG,cAAc,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;AAC1C,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { bufferToString } from \"@fluid-internal/client-utils\";\nimport type {\n\tISnapshotTreeWithBlobContents,\n\tIContainerStorageService,\n} from \"@fluidframework/container-definitions/internal\";\nimport type { IDisposable } from \"@fluidframework/core-interfaces\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport type { ISummaryTree } from \"@fluidframework/driver-definitions\";\nimport type {\n\tFetchSource,\n\tIDocumentService,\n\tIDocumentStorageService,\n\tIDocumentStorageServicePolicies,\n\tISnapshot,\n\tISnapshotFetchOptions,\n\tISummaryContext,\n\tICreateBlobResponse,\n\tISnapshotTree,\n\tIVersion,\n} from \"@fluidframework/driver-definitions/internal\";\nimport { isInstanceOfISnapshot, UsageError } from \"@fluidframework/driver-utils/internal\";\nimport type { ITelemetryLoggerExt } from \"@fluidframework/telemetry-utils/internal\";\n\nimport type { MemoryDetachedBlobStorage } from \"./memoryBlobStorage.js\";\nimport { ProtocolTreeStorageService } from \"./protocolTreeDocumentStorageService.js\";\nimport { RetriableDocumentStorageService } from \"./retriableDocumentStorageService.js\";\nimport type {\n\tISerializedStateManagerDocumentStorageService,\n\tSerializedSnapshotInfo,\n} from \"./serializedStateManager.js\";\nimport { convertSnapshotInfoToSnapshot } from \"./utils.js\";\n\n/**\n * Stringified blobs from a summary/snapshot tree.\n * @internal\n */\nexport interface ISerializableBlobContents {\n\t[id: string]: string;\n}\n\n/**\n * This class wraps the actual storage and make sure no wrong apis are called according to\n * container attach state.\n */\nexport class ContainerStorageAdapter\n\timplements\n\t\tISerializedStateManagerDocumentStorageService,\n\t\tIContainerStorageService,\n\t\tIDisposable\n{\n\tprivate _storageService: IDocumentStorageService & Partial<IDisposable>;\n\n\tprivate _summarizeProtocolTree: boolean | undefined;\n\t/**\n\t * Whether the adapter will enforce sending combined summary trees.\n\t */\n\tpublic get summarizeProtocolTree(): boolean {\n\t\treturn this._summarizeProtocolTree === true;\n\t}\n\n\tprivate _loadedGroupIdSnapshots: Record<string, ISnapshot> = {};\n\t/**\n\t * Any loading group id (virtualized) snapshot download from storage will be stored here.\n\t */\n\tpublic get loadedGroupIdSnapshots(): Record<string, ISnapshot> {\n\t\treturn this._loadedGroupIdSnapshots;\n\t}\n\n\t/**\n\t * ArrayBufferLikes containing blobs from a snapshot\n\t */\n\tprivate readonly blobContents: { [id: string]: ArrayBufferLike } = {};\n\n\t/**\n\t * An adapter that ensures we're using detachedBlobStorage up until we connect to a real service, and then\n\t * after connecting to a real service augments it with retry and combined summary tree enforcement.\n\t * @param detachedBlobStorage - The detached blob storage to use up until we connect to a real service\n\t * @param logger - Telemetry logger\n\t * @param loadingGroupIdSnapshotsFromPendingState - in offline mode, any loading group snapshots we've downloaded from the service that were stored in the pending state\n\t * @param addProtocolSummaryIfMissing - a callback to permit the container to inspect the summary we're about to\n\t * upload, and fix it up with a protocol tree if needed\n\t * @param enableSummarizeProtocolTree - Enable uploading a protocol summary. Note: preference is given to service policy's \"summarizeProtocolTree\" before this value.\n\t */\n\tpublic constructor(\n\t\tdetachedBlobStorage: MemoryDetachedBlobStorage | undefined,\n\t\tprivate readonly logger: ITelemetryLoggerExt,\n\t\tprivate loadingGroupIdSnapshotsFromPendingState:\n\t\t\t| Record<string, SerializedSnapshotInfo>\n\t\t\t| undefined,\n\t\tprivate readonly addProtocolSummaryIfMissing: (summaryTree: ISummaryTree) => ISummaryTree,\n\t\tprivate readonly enableSummarizeProtocolTree: boolean | undefined,\n\t) {\n\t\tthis._storageService = new BlobOnlyStorage(detachedBlobStorage, logger);\n\t}\n\n\tdisposed: boolean = false;\n\tdispose(error?: Error): void {\n\t\tthis._storageService?.dispose?.(error);\n\t\tthis.disposed = true;\n\t}\n\n\tpublic connectToService(service: IDocumentService): void {\n\t\tif (!(this._storageService instanceof BlobOnlyStorage)) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst storageServiceP = service.connectToStorage();\n\t\tconst retriableStorage = (this._storageService = new RetriableDocumentStorageService(\n\t\t\tstorageServiceP,\n\t\t\tthis.logger,\n\t\t));\n\n\t\t// A storage service wrapper which intercept calls to uploadSummaryWithContext and ensure they include\n\t\t// the protocol summary, provided single-commit summary is enabled.\n\t\tthis._storageService = new ProtocolTreeStorageService(\n\t\t\tretriableStorage,\n\t\t\t(...props) => {\n\t\t\t\tthis.logger.sendTelemetryEvent({ eventName: \"summarizeProtocolTreeEnabled\" });\n\t\t\t\treturn this.addProtocolSummaryIfMissing(...props);\n\t\t\t},\n\t\t\t// A callback to ensure we fetch the most updated value of service.policies.summarizeProtocolTree, which could be set\n\t\t\t// based on the response received from the service after connection is established.\n\t\t\t() => {\n\t\t\t\t// Determine whether or not container should upload the protocol summary along with the summary.\n\t\t\t\t// This is determined based on what value is set for serve policy's summariProtocolTree value or the enableSummarizeProtocolTree\n\t\t\t\t// retrievd from the loader options or monitoring context config.\n\t\t\t\tconst shouldSummarizeProtocolTree =\n\t\t\t\t\tservice.policies?.summarizeProtocolTree ?? this.enableSummarizeProtocolTree ?? false;\n\n\t\t\t\tif (this._summarizeProtocolTree !== shouldSummarizeProtocolTree) {\n\t\t\t\t\tthis.logger.sendTelemetryEvent({\n\t\t\t\t\t\teventName: \"isSummarizeProtocolTreeEnabled\",\n\t\t\t\t\t\tdetails: { value: shouldSummarizeProtocolTree },\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tthis._summarizeProtocolTree = shouldSummarizeProtocolTree;\n\t\t\t\treturn this._summarizeProtocolTree;\n\t\t\t},\n\t\t);\n\t}\n\n\tpublic cacheSnapshotBlobs(snapshotBlobs: Map<string, ArrayBuffer>): void {\n\t\tfor (const [id, value] of snapshotBlobs.entries()) {\n\t\t\tthis.blobContents[id] ??= value;\n\t\t}\n\t}\n\n\tpublic clearPendingState(): void {\n\t\tthis.loadingGroupIdSnapshotsFromPendingState = undefined;\n\t}\n\n\tpublic get policies(): IDocumentStorageServicePolicies | undefined {\n\t\t// back-compat 0.40 containerRuntime requests policies even in detached container if storage is present\n\t\t// and storage is always present in >=0.41.\n\t\ttry {\n\t\t\treturn this._storageService.policies;\n\t\t} catch {\n\t\t\t// No-op\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tpublic get maximumCacheDurationMs(): IDocumentStorageServicePolicies[\"maximumCacheDurationMs\"] {\n\t\treturn this.policies?.maximumCacheDurationMs;\n\t}\n\n\tpublic async getSnapshotTree(\n\t\tversion?: IVersion,\n\t\tscenarioName?: string,\n\t\t// API called below uses null\n\t\t// eslint-disable-next-line @rushstack/no-new-null\n\t): Promise<ISnapshotTree | null> {\n\t\treturn this._storageService.getSnapshotTree(version, scenarioName);\n\t}\n\n\tpublic async getSnapshot(snapshotFetchOptions?: ISnapshotFetchOptions): Promise<ISnapshot> {\n\t\tlet snapshot: ISnapshot;\n\t\tif (\n\t\t\tthis.loadingGroupIdSnapshotsFromPendingState !== undefined &&\n\t\t\tsnapshotFetchOptions?.loadingGroupIds !== undefined\n\t\t) {\n\t\t\tconst localSnapshot =\n\t\t\t\tthis.loadingGroupIdSnapshotsFromPendingState[snapshotFetchOptions.loadingGroupIds[0]];\n\t\t\tassert(localSnapshot !== undefined, 0x970 /* Local snapshot must be present */);\n\t\t\tsnapshot = convertSnapshotInfoToSnapshot(localSnapshot);\n\t\t} else {\n\t\t\tif (this._storageService.getSnapshot === undefined) {\n\t\t\t\tthrow new UsageError(\n\t\t\t\t\t\"getSnapshot api should exist in internal storage in ContainerStorageAdapter\",\n\t\t\t\t);\n\t\t\t}\n\t\t\tsnapshot = await this._storageService.getSnapshot(snapshotFetchOptions);\n\t\t}\n\n\t\t// Track the latest snapshot for each loading group id\n\t\tconst loadingGroupIds = snapshotFetchOptions?.loadingGroupIds;\n\t\tassert(\n\t\t\tsnapshot.sequenceNumber !== undefined,\n\t\t\t0x971 /* Snapshot must have sequence number */,\n\t\t);\n\t\tif (loadingGroupIds !== undefined) {\n\t\t\tfor (const loadingGroupId of loadingGroupIds) {\n\t\t\t\t// Do we actually want to update the stored snapshot?\n\t\t\t\t// What if the incoming snapshot is way newer than the stored snapshot?\n\t\t\t\t// We only want to update the stored snapshot if the incoming snapshot is newer (stored sequence number < incoming sequence number)\n\t\t\t\tconst storedSeqNum =\n\t\t\t\t\tthis._loadedGroupIdSnapshots[loadingGroupId]?.sequenceNumber ?? -1;\n\t\t\t\tif (storedSeqNum < snapshot.sequenceNumber) {\n\t\t\t\t\tthis._loadedGroupIdSnapshots[loadingGroupId] = snapshot;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn snapshot;\n\t}\n\n\tpublic async readBlob(id: string): Promise<ArrayBufferLike> {\n\t\tconst maybeBlob = this.blobContents[id];\n\t\tif (maybeBlob !== undefined) {\n\t\t\treturn maybeBlob;\n\t\t}\n\t\treturn this._storageService.readBlob(id);\n\t}\n\n\tpublic async getVersions(\n\t\t// API used below uses null\n\t\t// eslint-disable-next-line @rushstack/no-new-null\n\t\tversionId: string | null,\n\t\tcount: number,\n\t\tscenarioName?: string,\n\t\tfetchSource?: FetchSource,\n\t): Promise<IVersion[]> {\n\t\treturn this._storageService.getVersions(versionId, count, scenarioName, fetchSource);\n\t}\n\n\tpublic async uploadSummaryWithContext(\n\t\tsummary: ISummaryTree,\n\t\tcontext: ISummaryContext,\n\t): Promise<string> {\n\t\treturn this._storageService.uploadSummaryWithContext(summary, context);\n\t}\n\n\tpublic async createBlob(file: ArrayBufferLike): Promise<ICreateBlobResponse> {\n\t\treturn this._storageService.createBlob(file);\n\t}\n}\n\n/**\n * Storage which only supports createBlob() and readBlob(). This is used with IDetachedBlobStorage to support\n * blobs in detached containers.\n */\nclass BlobOnlyStorage implements IDocumentStorageService {\n\tconstructor(\n\t\tprivate readonly detachedStorage: MemoryDetachedBlobStorage | undefined,\n\t\tprivate readonly logger: ITelemetryLoggerExt,\n\t) {}\n\n\tpublic async createBlob(content: ArrayBufferLike): Promise<ICreateBlobResponse> {\n\t\treturn this.verifyStorage().createBlob(content);\n\t}\n\n\tpublic async readBlob(blobId: string): Promise<ArrayBufferLike> {\n\t\treturn this.verifyStorage().readBlob(blobId);\n\t}\n\n\tprivate verifyStorage(): MemoryDetachedBlobStorage {\n\t\tif (this.detachedStorage === undefined) {\n\t\t\tthrow new UsageError(\"Real storage calls not allowed in Unattached container\");\n\t\t}\n\t\treturn this.detachedStorage;\n\t}\n\n\tpublic get policies(): IDocumentStorageServicePolicies | undefined {\n\t\treturn this.notCalled();\n\t}\n\n\t/* eslint-disable @typescript-eslint/unbound-method */\n\t// eslint-disable-next-line @rushstack/no-new-null\n\tpublic getSnapshotTree: () => Promise<ISnapshotTree | null> = this.notCalled;\n\tpublic getSnapshot: () => Promise<ISnapshot> = this.notCalled;\n\tpublic getVersions: () => Promise<IVersion[]> = this.notCalled;\n\tpublic write: () => Promise<IVersion> = this.notCalled;\n\tpublic uploadSummaryWithContext: () => Promise<string> = this.notCalled;\n\tpublic downloadSummary: () => Promise<ISummaryTree> = this.notCalled;\n\t/* eslint-enable @typescript-eslint/unbound-method */\n\n\tprivate notCalled(): never {\n\t\tthis.verifyStorage();\n\t\ttry {\n\t\t\t// some browsers may not populate stack unless exception is thrown\n\t\t\tthrow new Error(\"BlobOnlyStorage not implemented method used\");\n\t\t} catch (error) {\n\t\t\tthis.logger.sendTelemetryEvent({ eventName: \"BlobOnlyStorageWrongCall\" }, error);\n\t\t\tthrow error;\n\t\t}\n\t}\n}\n\n// runtime will write a tree to the summary containing \"attachment\" type entries\n// which reference attachment blobs by ID, along with a blob containing the blob redirect table.\n// However, some drivers do not support the \"attachment\" type and will convert them to \"blob\" type\n// entries. We want to avoid saving these to reduce the size of stashed change blobs, but we\n// need to make sure the blob redirect table is saved.\nconst blobsTreeName = \".blobs\";\nconst redirectTableBlobName = \".redirectTable\";\n\n/**\n * Get blob contents of a snapshot tree from storage (or, ideally, cache)\n */\nexport async function getBlobContentsFromTree(\n\tsnapshot: ISnapshot | ISnapshotTree,\n\tstorage: Pick<IDocumentStorageService, \"readBlob\">,\n): Promise<ISerializableBlobContents> {\n\tconst blobs = {};\n\tif (isInstanceOfISnapshot(snapshot)) {\n\t\tconst blobContents = snapshot.blobContents;\n\t\tfor (const [id, content] of blobContents.entries()) {\n\t\t\t// ArrayBufferLike will not survive JSON.stringify()\n\t\t\tblobs[id] = bufferToString(content, \"utf8\");\n\t\t}\n\t} else {\n\t\tawait getBlobContentsFromTreeCore(snapshot, blobs, storage);\n\t}\n\treturn blobs;\n}\n\nasync function getBlobContentsFromTreeCore(\n\ttree: ISnapshotTree,\n\tblobs: ISerializableBlobContents,\n\tstorage: Pick<IDocumentStorageService, \"readBlob\">,\n\troot = true,\n): Promise<unknown[]> {\n\tconst treePs: Promise<unknown>[] = [];\n\tfor (const [key, subTree] of Object.entries(tree.trees)) {\n\t\tif (root && key === blobsTreeName) {\n\t\t\ttreePs.push(getBlobManagerTreeFromTree(subTree, blobs, storage));\n\t\t} else {\n\t\t\ttreePs.push(getBlobContentsFromTreeCore(subTree, blobs, storage, false));\n\t\t}\n\t}\n\tfor (const id of Object.values(tree.blobs)) {\n\t\tconst blob = await storage.readBlob(id);\n\t\t// ArrayBufferLike will not survive JSON.stringify()\n\t\tblobs[id] = bufferToString(blob, \"utf8\");\n\t}\n\treturn Promise.all(treePs);\n}\n\n// save redirect table from .blobs tree but nothing else\nasync function getBlobManagerTreeFromTree(\n\ttree: ISnapshotTree,\n\tblobs: ISerializableBlobContents,\n\tstorage: Pick<IDocumentStorageService, \"readBlob\">,\n): Promise<void> {\n\tconst id = tree.blobs[redirectTableBlobName];\n\tassert(id !== undefined, 0x9ce /* id is undefined in getBlobManagerTreeFromTree */);\n\tconst blob = await storage.readBlob(id);\n\t// ArrayBufferLike will not survive JSON.stringify()\n\tblobs[id] = bufferToString(blob, \"utf8\");\n}\n\n/**\n * Extract blob contents from a snapshot tree with blob contents\n */\nexport function getBlobContentsFromTreeWithBlobContents(\n\tsnapshot: ISnapshotTreeWithBlobContents,\n): ISerializableBlobContents {\n\tconst blobs = {};\n\tgetBlobContentsFromTreeWithBlobContentsCore(snapshot, blobs);\n\treturn blobs;\n}\n\nfunction getBlobContentsFromTreeWithBlobContentsCore(\n\ttree: ISnapshotTreeWithBlobContents,\n\tblobs: ISerializableBlobContents,\n\troot = true,\n): void {\n\tfor (const [key, subTree] of Object.entries(tree.trees)) {\n\t\tif (root && key === blobsTreeName) {\n\t\t\tgetBlobManagerTreeFromTreeWithBlobContents(subTree, blobs);\n\t\t} else {\n\t\t\tgetBlobContentsFromTreeWithBlobContentsCore(subTree, blobs, false);\n\t\t}\n\t}\n\tfor (const id of Object.values(tree.blobs)) {\n\t\tconst blob = tree.blobsContents?.[id];\n\t\tassert(blob !== undefined, 0x2ec /* \"Blob must be present in blobsContents\" */);\n\t\t// ArrayBufferLike will not survive JSON.stringify()\n\t\tblobs[id] = bufferToString(blob, \"utf8\");\n\t}\n}\n\n// save redirect table from .blobs tree but nothing else\nfunction getBlobManagerTreeFromTreeWithBlobContents(\n\ttree: ISnapshotTreeWithBlobContents,\n\tblobs: ISerializableBlobContents,\n): void {\n\tconst id = tree.blobs[redirectTableBlobName];\n\tassert(\n\t\tid !== undefined,\n\t\t0x9cf /* id is undefined in getBlobManagerTreeFromTreeWithBlobContents */,\n\t);\n\tconst blob = tree.blobsContents?.[id];\n\tassert(blob !== undefined, 0x70f /* Blob must be present in blobsContents */);\n\t// ArrayBufferLike will not survive JSON.stringify()\n\tblobs[id] = bufferToString(blob, \"utf8\");\n}\n"]}
@@ -2,8 +2,9 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import { type ILayerCompatDetails, type ILayerCompatSupportRequirements } from "@fluid-internal/client-utils";
5
+ import type { ILayerCompatDetails, ILayerCompatSupportRequirements } from "@fluid-internal/client-utils";
6
6
  import type { ICriticalContainerError } from "@fluidframework/container-definitions";
7
+ import { type ITelemetryLoggerExt } from "@fluidframework/telemetry-utils/internal";
7
8
  /**
8
9
  * The core compatibility details of the Loader layer that is the same across all layer boundaries.
9
10
  * @internal
@@ -37,10 +38,10 @@ export declare const driverSupportRequirementsForLoader: ILayerCompatSupportRequ
37
38
  * Validates that the Runtime layer is compatible with the Loader. *
38
39
  * @internal
39
40
  */
40
- export declare function validateRuntimeCompatibility(maybeRuntimeCompatDetails: ILayerCompatDetails | undefined): void;
41
+ export declare function validateRuntimeCompatibility(maybeRuntimeCompatDetails: ILayerCompatDetails | undefined, logger: ITelemetryLoggerExt): void;
41
42
  /**
42
43
  * Validates that the Driver layer is compatible with the Loader.
43
44
  * @internal
44
45
  */
45
- export declare function validateDriverCompatibility(maybeDriverCompatDetails: ILayerCompatDetails | undefined, disposeFn: (error?: ICriticalContainerError) => void): void;
46
+ export declare function validateDriverCompatibility(maybeDriverCompatDetails: ILayerCompatDetails | undefined, disposeFn: (error?: ICriticalContainerError) => void, logger: ITelemetryLoggerExt): void;
46
47
  //# sourceMappingURL=loaderLayerCompatState.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"loaderLayerCompatState.d.ts","sourceRoot":"","sources":["../src/loaderLayerCompatState.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAEN,KAAK,mBAAmB,EACxB,KAAK,+BAA+B,EACpC,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAKrF;;;GAGG;AACH,eAAO,MAAM,uBAAuB;IACnC;;OAEG;;IAEH;;OAEG;;CAEH,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,6BAA6B,EAAE,mBAM3C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,mCAAmC,EAAE,+BAUjD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kCAAkC,EAAE,+BAUhD,CAAC;AAEF;;;GAGG;AACH,wBAAgB,4BAA4B,CAC3C,yBAAyB,EAAE,mBAAmB,GAAG,SAAS,GACxD,IAAI,CAmBN;AAED;;;GAGG;AACH,wBAAgB,2BAA2B,CAC1C,wBAAwB,EAAE,mBAAmB,GAAG,SAAS,EACzD,SAAS,EAAE,CAAC,KAAK,CAAC,EAAE,uBAAuB,KAAK,IAAI,GAClD,IAAI,CAoBN"}
1
+ {"version":3,"file":"loaderLayerCompatState.d.ts","sourceRoot":"","sources":["../src/loaderLayerCompatState.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACX,mBAAmB,EACnB,+BAA+B,EAC/B,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AACrF,OAAO,EAEN,KAAK,mBAAmB,EACxB,MAAM,0CAA0C,CAAC;AAIlD;;;GAGG;AACH,eAAO,MAAM,uBAAuB;IACnC;;OAEG;;IAEH;;OAEG;;CAEH,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,6BAA6B,EAAE,mBAM3C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,mCAAmC,EAAE,+BAUjD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kCAAkC,EAAE,+BAUhD,CAAC;AAEF;;;GAGG;AACH,wBAAgB,4BAA4B,CAC3C,yBAAyB,EAAE,mBAAmB,GAAG,SAAS,EAC1D,MAAM,EAAE,mBAAmB,GACzB,IAAI,CAUN;AAED;;;GAGG;AACH,wBAAgB,2BAA2B,CAC1C,wBAAwB,EAAE,mBAAmB,GAAG,SAAS,EACzD,SAAS,EAAE,CAAC,KAAK,CAAC,EAAE,uBAAuB,KAAK,IAAI,EACpD,MAAM,EAAE,mBAAmB,GACzB,IAAI,CAUN"}
@@ -2,8 +2,7 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import { checkLayerCompatibility, } from "@fluid-internal/client-utils";
6
- import { UsageError } from "@fluidframework/telemetry-utils/internal";
5
+ import { validateLayerCompatibility, } from "@fluidframework/telemetry-utils/internal";
7
6
  import { pkgVersion } from "./packageVersion.js";
8
7
  /**
9
8
  * The core compatibility details of the Loader layer that is the same across all layer boundaries.
@@ -64,43 +63,14 @@ export const driverSupportRequirementsForLoader = {
64
63
  * Validates that the Runtime layer is compatible with the Loader. *
65
64
  * @internal
66
65
  */
67
- export function validateRuntimeCompatibility(maybeRuntimeCompatDetails) {
68
- const layerCheckResult = checkLayerCompatibility(runtimeSupportRequirementsForLoader, maybeRuntimeCompatDetails);
69
- if (!layerCheckResult.isCompatible) {
70
- const error = new UsageError("Loader is not compatible with Runtime", {
71
- errorDetails: JSON.stringify({
72
- loaderVersion: loaderCompatDetailsForRuntime.pkgVersion,
73
- runtimeVersion: maybeRuntimeCompatDetails?.pkgVersion,
74
- loaderGeneration: loaderCompatDetailsForRuntime.generation,
75
- runtimeGeneration: maybeRuntimeCompatDetails?.generation,
76
- minSupportedGeneration: runtimeSupportRequirementsForLoader.minSupportedGeneration,
77
- isGenerationCompatible: layerCheckResult.isGenerationCompatible,
78
- unsupportedFeatures: layerCheckResult.unsupportedFeatures,
79
- }),
80
- });
81
- throw error;
82
- }
66
+ export function validateRuntimeCompatibility(maybeRuntimeCompatDetails, logger) {
67
+ validateLayerCompatibility("loader", "runtime", loaderCompatDetailsForRuntime, runtimeSupportRequirementsForLoader, maybeRuntimeCompatDetails, () => { } /* disposeFn - no op. This will be handled by the caller */, logger);
83
68
  }
84
69
  /**
85
70
  * Validates that the Driver layer is compatible with the Loader.
86
71
  * @internal
87
72
  */
88
- export function validateDriverCompatibility(maybeDriverCompatDetails, disposeFn) {
89
- const layerCheckResult = checkLayerCompatibility(driverSupportRequirementsForLoader, maybeDriverCompatDetails);
90
- if (!layerCheckResult.isCompatible) {
91
- const error = new UsageError("Loader is not compatible with Driver", {
92
- errorDetails: JSON.stringify({
93
- loaderVersion: loaderCoreCompatDetails.pkgVersion,
94
- driverVersion: maybeDriverCompatDetails?.pkgVersion,
95
- loaderGeneration: loaderCoreCompatDetails.generation,
96
- driverGeneration: maybeDriverCompatDetails?.generation,
97
- minSupportedGeneration: driverSupportRequirementsForLoader.minSupportedGeneration,
98
- isGenerationCompatible: layerCheckResult.isGenerationCompatible,
99
- unsupportedFeatures: layerCheckResult.unsupportedFeatures,
100
- }),
101
- });
102
- disposeFn(error);
103
- throw error;
104
- }
73
+ export function validateDriverCompatibility(maybeDriverCompatDetails, disposeFn, logger) {
74
+ validateLayerCompatibility("loader", "driver", loaderCompatDetailsForRuntime, driverSupportRequirementsForLoader, maybeDriverCompatDetails, disposeFn, logger);
105
75
  }
106
76
  //# sourceMappingURL=loaderLayerCompatState.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"loaderLayerCompatState.js","sourceRoot":"","sources":["../src/loaderLayerCompatState.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,uBAAuB,GAGvB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AAEtE,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD;;;GAGG;AACH,MAAM,CAAC,MAA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;IAEpD,MAAM,gBAAgB,GAAG,uBAAuB,CAC/C,kCAAkC,EAClC,wBAAwB,CACxB,CAAC;IACF,IAAI,CAAC,gBAAgB,CAAC,YAAY,EAAE,CAAC;QACpC,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,sCAAsC,EAAE;YACpE,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC;gBAC5B,aAAa,EAAE,uBAAuB,CAAC,UAAU;gBACjD,aAAa,EAAE,wBAAwB,EAAE,UAAU;gBACnD,gBAAgB,EAAE,uBAAuB,CAAC,UAAU;gBACpD,gBAAgB,EAAE,wBAAwB,EAAE,UAAU;gBACtD,sBAAsB,EAAE,kCAAkC,CAAC,sBAAsB;gBACjF,sBAAsB,EAAE,gBAAgB,CAAC,sBAAsB;gBAC/D,mBAAmB,EAAE,gBAAgB,CAAC,mBAAmB;aACzD,CAAC;SACF,CAAC,CAAC;QACH,SAAS,CAAC,KAAK,CAAC,CAAC;QACjB,MAAM,KAAK,CAAC;IACb,CAAC;AACF,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tcheckLayerCompatibility,\n\ttype ILayerCompatDetails,\n\ttype ILayerCompatSupportRequirements,\n} from \"@fluid-internal/client-utils\";\nimport type { ICriticalContainerError } from \"@fluidframework/container-definitions\";\nimport { UsageError } from \"@fluidframework/telemetry-utils/internal\";\n\nimport { pkgVersion } from \"./packageVersion.js\";\n\n/**\n * The core compatibility details of the Loader layer that is the same across all layer boundaries.\n * @internal\n */\nexport const loaderCoreCompatDetails = {\n\t/**\n\t * The package version of the Loader layer.\n\t */\n\tpkgVersion,\n\t/**\n\t * The current generation of the Loader layer.\n\t */\n\tgeneration: 1,\n};\n\n/**\n * Loader's compatibility details that is exposed to the Runtime layer.\n * @internal\n */\nexport const loaderCompatDetailsForRuntime: ILayerCompatDetails = {\n\t...loaderCoreCompatDetails,\n\t/**\n\t * The features supported by the Loader layer across the Loader / Runtime boundary.\n\t */\n\tsupportedFeatures: new Set<string>(),\n};\n\n/**\n * The requirements that the Runtime layer must meet to be compatible with this Loader.\n * @internal\n */\nexport const runtimeSupportRequirementsForLoader: ILayerCompatSupportRequirements = {\n\t/**\n\t * Minimum generation that Runtime must be at to be compatible with Loader. Note that 0 is used here for\n\t * Runtime layers before the introduction of the layer compatibility enforcement.\n\t */\n\tminSupportedGeneration: 0,\n\t/**\n\t * The features that the Runtime must support to be compatible with Loader.\n\t */\n\trequiredFeatures: [],\n};\n\n/**\n * The requirements that the Driver layer must meet to be compatible with this Loader.\n * @internal\n */\nexport const driverSupportRequirementsForLoader: ILayerCompatSupportRequirements = {\n\t/**\n\t * Minimum generation that Driver must be at to be compatible with Loader. Note that 0 is used here for\n\t * Driver layers before the introduction of the layer compatibility enforcement.\n\t */\n\tminSupportedGeneration: 0,\n\t/**\n\t * The features that the Driver must support to be compatible with Loader.\n\t */\n\trequiredFeatures: [],\n};\n\n/**\n * Validates that the Runtime layer is compatible with the Loader. *\n * @internal\n */\nexport function validateRuntimeCompatibility(\n\tmaybeRuntimeCompatDetails: ILayerCompatDetails | undefined,\n): void {\n\tconst layerCheckResult = checkLayerCompatibility(\n\t\truntimeSupportRequirementsForLoader,\n\t\tmaybeRuntimeCompatDetails,\n\t);\n\tif (!layerCheckResult.isCompatible) {\n\t\tconst error = new UsageError(\"Loader is not compatible with Runtime\", {\n\t\t\terrorDetails: JSON.stringify({\n\t\t\t\tloaderVersion: loaderCompatDetailsForRuntime.pkgVersion,\n\t\t\t\truntimeVersion: maybeRuntimeCompatDetails?.pkgVersion,\n\t\t\t\tloaderGeneration: loaderCompatDetailsForRuntime.generation,\n\t\t\t\truntimeGeneration: maybeRuntimeCompatDetails?.generation,\n\t\t\t\tminSupportedGeneration: runtimeSupportRequirementsForLoader.minSupportedGeneration,\n\t\t\t\tisGenerationCompatible: layerCheckResult.isGenerationCompatible,\n\t\t\t\tunsupportedFeatures: layerCheckResult.unsupportedFeatures,\n\t\t\t}),\n\t\t});\n\t\tthrow error;\n\t}\n}\n\n/**\n * Validates that the Driver layer is compatible with the Loader.\n * @internal\n */\nexport function validateDriverCompatibility(\n\tmaybeDriverCompatDetails: ILayerCompatDetails | undefined,\n\tdisposeFn: (error?: ICriticalContainerError) => void,\n): void {\n\tconst layerCheckResult = checkLayerCompatibility(\n\t\tdriverSupportRequirementsForLoader,\n\t\tmaybeDriverCompatDetails,\n\t);\n\tif (!layerCheckResult.isCompatible) {\n\t\tconst error = new UsageError(\"Loader is not compatible with Driver\", {\n\t\t\terrorDetails: JSON.stringify({\n\t\t\t\tloaderVersion: loaderCoreCompatDetails.pkgVersion,\n\t\t\t\tdriverVersion: maybeDriverCompatDetails?.pkgVersion,\n\t\t\t\tloaderGeneration: loaderCoreCompatDetails.generation,\n\t\t\t\tdriverGeneration: maybeDriverCompatDetails?.generation,\n\t\t\t\tminSupportedGeneration: driverSupportRequirementsForLoader.minSupportedGeneration,\n\t\t\t\tisGenerationCompatible: layerCheckResult.isGenerationCompatible,\n\t\t\t\tunsupportedFeatures: layerCheckResult.unsupportedFeatures,\n\t\t\t}),\n\t\t});\n\t\tdisposeFn(error);\n\t\tthrow error;\n\t}\n}\n"]}
1
+ {"version":3,"file":"loaderLayerCompatState.js","sourceRoot":"","sources":["../src/loaderLayerCompatState.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,EACN,0BAA0B,GAE1B,MAAM,0CAA0C,CAAC;AAElD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACtC;;OAEG;IACH,UAAU;IACV;;OAEG;IACH,UAAU,EAAE,CAAC;CACb,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAwB;IACjE,GAAG,uBAAuB;IAC1B;;OAEG;IACH,iBAAiB,EAAE,IAAI,GAAG,EAAU;CACpC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAAoC;IACnF;;;OAGG;IACH,sBAAsB,EAAE,CAAC;IACzB;;OAEG;IACH,gBAAgB,EAAE,EAAE;CACpB,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,kCAAkC,GAAoC;IAClF;;;OAGG;IACH,sBAAsB,EAAE,CAAC;IACzB;;OAEG;IACH,gBAAgB,EAAE,EAAE;CACpB,CAAC;AAEF;;;GAGG;AACH,MAAM,UAAU,4BAA4B,CAC3C,yBAA0D,EAC1D,MAA2B;IAE3B,0BAA0B,CACzB,QAAQ,EACR,SAAS,EACT,6BAA6B,EAC7B,mCAAmC,EACnC,yBAAyB,EACzB,GAAG,EAAE,GAAE,CAAC,CAAC,2DAA2D,EACpE,MAAM,CACN,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,2BAA2B,CAC1C,wBAAyD,EACzD,SAAoD,EACpD,MAA2B;IAE3B,0BAA0B,CACzB,QAAQ,EACR,QAAQ,EACR,6BAA6B,EAC7B,kCAAkC,EAClC,wBAAwB,EACxB,SAAS,EACT,MAAM,CACN,CAAC;AACH,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tILayerCompatDetails,\n\tILayerCompatSupportRequirements,\n} from \"@fluid-internal/client-utils\";\nimport type { ICriticalContainerError } from \"@fluidframework/container-definitions\";\nimport {\n\tvalidateLayerCompatibility,\n\ttype ITelemetryLoggerExt,\n} from \"@fluidframework/telemetry-utils/internal\";\n\nimport { pkgVersion } from \"./packageVersion.js\";\n\n/**\n * The core compatibility details of the Loader layer that is the same across all layer boundaries.\n * @internal\n */\nexport const loaderCoreCompatDetails = {\n\t/**\n\t * The package version of the Loader layer.\n\t */\n\tpkgVersion,\n\t/**\n\t * The current generation of the Loader layer.\n\t */\n\tgeneration: 1,\n};\n\n/**\n * Loader's compatibility details that is exposed to the Runtime layer.\n * @internal\n */\nexport const loaderCompatDetailsForRuntime: ILayerCompatDetails = {\n\t...loaderCoreCompatDetails,\n\t/**\n\t * The features supported by the Loader layer across the Loader / Runtime boundary.\n\t */\n\tsupportedFeatures: new Set<string>(),\n};\n\n/**\n * The requirements that the Runtime layer must meet to be compatible with this Loader.\n * @internal\n */\nexport const runtimeSupportRequirementsForLoader: ILayerCompatSupportRequirements = {\n\t/**\n\t * Minimum generation that Runtime must be at to be compatible with Loader. Note that 0 is used here for\n\t * Runtime layers before the introduction of the layer compatibility enforcement.\n\t */\n\tminSupportedGeneration: 0,\n\t/**\n\t * The features that the Runtime must support to be compatible with Loader.\n\t */\n\trequiredFeatures: [],\n};\n\n/**\n * The requirements that the Driver layer must meet to be compatible with this Loader.\n * @internal\n */\nexport const driverSupportRequirementsForLoader: ILayerCompatSupportRequirements = {\n\t/**\n\t * Minimum generation that Driver must be at to be compatible with Loader. Note that 0 is used here for\n\t * Driver layers before the introduction of the layer compatibility enforcement.\n\t */\n\tminSupportedGeneration: 0,\n\t/**\n\t * The features that the Driver must support to be compatible with Loader.\n\t */\n\trequiredFeatures: [],\n};\n\n/**\n * Validates that the Runtime layer is compatible with the Loader. *\n * @internal\n */\nexport function validateRuntimeCompatibility(\n\tmaybeRuntimeCompatDetails: ILayerCompatDetails | undefined,\n\tlogger: ITelemetryLoggerExt,\n): void {\n\tvalidateLayerCompatibility(\n\t\t\"loader\",\n\t\t\"runtime\",\n\t\tloaderCompatDetailsForRuntime,\n\t\truntimeSupportRequirementsForLoader,\n\t\tmaybeRuntimeCompatDetails,\n\t\t() => {} /* disposeFn - no op. This will be handled by the caller */,\n\t\tlogger,\n\t);\n}\n\n/**\n * Validates that the Driver layer is compatible with the Loader.\n * @internal\n */\nexport function validateDriverCompatibility(\n\tmaybeDriverCompatDetails: ILayerCompatDetails | undefined,\n\tdisposeFn: (error?: ICriticalContainerError) => void,\n\tlogger: ITelemetryLoggerExt,\n): void {\n\tvalidateLayerCompatibility(\n\t\t\"loader\",\n\t\t\"driver\",\n\t\tloaderCompatDetailsForRuntime,\n\t\tdriverSupportRequirementsForLoader,\n\t\tmaybeDriverCompatDetails,\n\t\tdisposeFn,\n\t\tlogger,\n\t);\n}\n"]}
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export declare const pkgName = "@fluidframework/container-loader";
8
- export declare const pkgVersion = "2.70.0-361092";
8
+ export declare const pkgVersion = "2.70.0-361788";
9
9
  //# sourceMappingURL=packageVersion.d.ts.map
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export const pkgName = "@fluidframework/container-loader";
8
- export const pkgVersion = "2.70.0-361092";
8
+ export const pkgVersion = "2.70.0-361788";
9
9
  //# sourceMappingURL=packageVersion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,kCAAkC,CAAC;AAC1D,MAAM,CAAC,MAAM,UAAU,GAAG,eAAe,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/container-loader\";\nexport const pkgVersion = \"2.70.0-361092\";\n"]}
1
+ {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,kCAAkC,CAAC;AAC1D,MAAM,CAAC,MAAM,UAAU,GAAG,eAAe,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/container-loader\";\nexport const pkgVersion = \"2.70.0-361788\";\n"]}
@@ -199,7 +199,7 @@ export declare function getLatestSnapshotInfo(mc: MonitoringContext, storageAdap
199
199
  * @param mc - The monitoring context.
200
200
  * @param storageAdapter - The storage adapter providing a getSnapshot method to retrieve the ISnapshot and version.
201
201
  * @param specifiedVersion - An optional version string specifying the version of the snapshot tree to fetch.
202
- * @returns - The fetched snapshot tree and its version.
202
+ * @returns The fetched snapshot tree and its version.
203
203
  */
204
204
  export declare function fetchISnapshot(mc: MonitoringContext, storageAdapter: Pick<IDocumentStorageService, "getSnapshot">, specifiedVersion: string | undefined): Promise<{
205
205
  snapshot?: ISnapshot;
@@ -211,7 +211,7 @@ export declare function fetchISnapshot(mc: MonitoringContext, storageAdapter: Pi
211
211
  * @param mc - The monitoring context.
212
212
  * @param storageAdapter - The storage adapter providing methods to retrieve the ISnapshotTree and version.
213
213
  * @param specifiedVersion - An optional version string specifying the version of the snapshot tree to fetch.
214
- * @returns - The fetched snapshot tree and its version.
214
+ * @returns The fetched snapshot tree and its version.
215
215
  */
216
216
  export declare function fetchISnapshotTree(mc: MonitoringContext, storageAdapter: Pick<IDocumentStorageService, "getSnapshotTree" | "getVersions">, specifiedVersion: string | undefined): Promise<{
217
217
  snapshot?: ISnapshotTree;
@@ -375,7 +375,7 @@ export async function getLatestSnapshotInfo(mc, storageAdapter, supportGetSnapsh
375
375
  * @param storageAdapter - The storage adapter providing methods to retrieve the snapshot.
376
376
  * @param supportGetSnapshotApi - a boolean indicating whether to use the fetchISnapshot or fetchISnapshotTree.
377
377
  * @param specifiedVersion - An optional version string specifying the version of the snapshot tree to fetch.
378
- * @returns - An ISnapshotTree and its version.
378
+ * @returns An ISnapshotTree and its version.
379
379
  */
380
380
  async function getSnapshot(mc, storageAdapter, supportGetSnapshotApi, specifiedVersion) {
381
381
  const { snapshot, version } = supportGetSnapshotApi
@@ -390,7 +390,7 @@ async function getSnapshot(mc, storageAdapter, supportGetSnapshotApi, specifiedV
390
390
  * @param mc - The monitoring context.
391
391
  * @param storageAdapter - The storage adapter providing a getSnapshot method to retrieve the ISnapshot and version.
392
392
  * @param specifiedVersion - An optional version string specifying the version of the snapshot tree to fetch.
393
- * @returns - The fetched snapshot tree and its version.
393
+ * @returns The fetched snapshot tree and its version.
394
394
  */
395
395
  export async function fetchISnapshot(mc, storageAdapter, specifiedVersion) {
396
396
  const snapshot = await storageAdapter.getSnapshot?.({ versionId: specifiedVersion });
@@ -420,7 +420,7 @@ export async function fetchISnapshot(mc, storageAdapter, specifiedVersion) {
420
420
  * @param mc - The monitoring context.
421
421
  * @param storageAdapter - The storage adapter providing methods to retrieve the ISnapshotTree and version.
422
422
  * @param specifiedVersion - An optional version string specifying the version of the snapshot tree to fetch.
423
- * @returns - The fetched snapshot tree and its version.
423
+ * @returns The fetched snapshot tree and its version.
424
424
  */
425
425
  export async function fetchISnapshotTree(mc, storageAdapter, specifiedVersion) {
426
426
  // API uses null