@fluidframework/container-runtime 2.70.0-360753 → 2.70.0-361248

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 (99) hide show
  1. package/api-report/container-runtime.legacy.beta.api.md +0 -3
  2. package/container-runtime.test-files.tar +0 -0
  3. package/dist/containerRuntime.d.ts +5 -5
  4. package/dist/containerRuntime.js +5 -5
  5. package/dist/containerRuntime.js.map +1 -1
  6. package/dist/index.d.ts +0 -5
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js.map +1 -1
  9. package/dist/legacy.d.ts +0 -1
  10. package/dist/messageTypes.d.ts +1 -1
  11. package/dist/messageTypes.js +1 -1
  12. package/dist/messageTypes.js.map +1 -1
  13. package/dist/opLifecycle/duplicateBatchDetector.d.ts +2 -2
  14. package/dist/opLifecycle/duplicateBatchDetector.js +2 -2
  15. package/dist/opLifecycle/duplicateBatchDetector.js.map +1 -1
  16. package/dist/opLifecycle/opGroupingManager.d.ts +2 -2
  17. package/dist/opLifecycle/opGroupingManager.d.ts.map +1 -1
  18. package/dist/opLifecycle/opGroupingManager.js +5 -3
  19. package/dist/opLifecycle/opGroupingManager.js.map +1 -1
  20. package/dist/opLifecycle/opSerialization.d.ts +2 -2
  21. package/dist/opLifecycle/opSerialization.js +2 -2
  22. package/dist/opLifecycle/opSerialization.js.map +1 -1
  23. package/dist/opLifecycle/opSplitter.d.ts +1 -1
  24. package/dist/opLifecycle/opSplitter.js +1 -1
  25. package/dist/opLifecycle/opSplitter.js.map +1 -1
  26. package/dist/opLifecycle/outbox.d.ts +2 -2
  27. package/dist/opLifecycle/outbox.js +2 -2
  28. package/dist/opLifecycle/outbox.js.map +1 -1
  29. package/dist/packageVersion.d.ts +1 -1
  30. package/dist/packageVersion.js +1 -1
  31. package/dist/packageVersion.js.map +1 -1
  32. package/dist/pendingStateManager.d.ts +1 -1
  33. package/dist/pendingStateManager.js +1 -1
  34. package/dist/pendingStateManager.js.map +1 -1
  35. package/dist/storageServiceWithAttachBlobs.d.ts +7 -7
  36. package/dist/storageServiceWithAttachBlobs.js +7 -7
  37. package/dist/storageServiceWithAttachBlobs.js.map +1 -1
  38. package/dist/summary/documentSchema.d.ts +1 -1
  39. package/dist/summary/documentSchema.js +1 -1
  40. package/dist/summary/documentSchema.js.map +1 -1
  41. package/dist/summary/orderedClientElection.js.map +1 -1
  42. package/dist/summary/summaryFormat.d.ts +6 -6
  43. package/dist/summary/summaryFormat.js.map +1 -1
  44. package/lib/containerRuntime.d.ts +5 -5
  45. package/lib/containerRuntime.js +5 -5
  46. package/lib/containerRuntime.js.map +1 -1
  47. package/lib/index.d.ts +0 -5
  48. package/lib/index.d.ts.map +1 -1
  49. package/lib/index.js.map +1 -1
  50. package/lib/legacy.d.ts +0 -1
  51. package/lib/messageTypes.d.ts +1 -1
  52. package/lib/messageTypes.js +1 -1
  53. package/lib/messageTypes.js.map +1 -1
  54. package/lib/opLifecycle/duplicateBatchDetector.d.ts +2 -2
  55. package/lib/opLifecycle/duplicateBatchDetector.js +2 -2
  56. package/lib/opLifecycle/duplicateBatchDetector.js.map +1 -1
  57. package/lib/opLifecycle/opGroupingManager.d.ts +2 -2
  58. package/lib/opLifecycle/opGroupingManager.d.ts.map +1 -1
  59. package/lib/opLifecycle/opGroupingManager.js +5 -3
  60. package/lib/opLifecycle/opGroupingManager.js.map +1 -1
  61. package/lib/opLifecycle/opSerialization.d.ts +2 -2
  62. package/lib/opLifecycle/opSerialization.js +2 -2
  63. package/lib/opLifecycle/opSerialization.js.map +1 -1
  64. package/lib/opLifecycle/opSplitter.d.ts +1 -1
  65. package/lib/opLifecycle/opSplitter.js +1 -1
  66. package/lib/opLifecycle/opSplitter.js.map +1 -1
  67. package/lib/opLifecycle/outbox.d.ts +2 -2
  68. package/lib/opLifecycle/outbox.js +2 -2
  69. package/lib/opLifecycle/outbox.js.map +1 -1
  70. package/lib/packageVersion.d.ts +1 -1
  71. package/lib/packageVersion.js +1 -1
  72. package/lib/packageVersion.js.map +1 -1
  73. package/lib/pendingStateManager.d.ts +1 -1
  74. package/lib/pendingStateManager.js +1 -1
  75. package/lib/pendingStateManager.js.map +1 -1
  76. package/lib/storageServiceWithAttachBlobs.d.ts +7 -7
  77. package/lib/storageServiceWithAttachBlobs.js +7 -7
  78. package/lib/storageServiceWithAttachBlobs.js.map +1 -1
  79. package/lib/summary/documentSchema.d.ts +1 -1
  80. package/lib/summary/documentSchema.js +1 -1
  81. package/lib/summary/documentSchema.js.map +1 -1
  82. package/lib/summary/orderedClientElection.js.map +1 -1
  83. package/lib/summary/summaryFormat.d.ts +6 -6
  84. package/lib/summary/summaryFormat.js.map +1 -1
  85. package/package.json +25 -20
  86. package/src/containerRuntime.ts +5 -5
  87. package/src/index.ts +0 -6
  88. package/src/messageTypes.ts +1 -1
  89. package/src/opLifecycle/duplicateBatchDetector.ts +2 -2
  90. package/src/opLifecycle/opGroupingManager.ts +7 -4
  91. package/src/opLifecycle/opSerialization.ts +2 -2
  92. package/src/opLifecycle/opSplitter.ts +1 -1
  93. package/src/opLifecycle/outbox.ts +2 -2
  94. package/src/packageVersion.ts +1 -1
  95. package/src/pendingStateManager.ts +1 -1
  96. package/src/storageServiceWithAttachBlobs.ts +7 -7
  97. package/src/summary/documentSchema.ts +1 -1
  98. package/src/summary/orderedClientElection.ts +1 -1
  99. package/src/summary/summaryFormat.ts +6 -6
@@ -1 +1 @@
1
- {"version":3,"file":"summaryFormat.js","sourceRoot":"","sources":["../../src/summary/summaryFormat.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA6D;AAC7D,2EAAiE;AAKjE,oEAAqE;AACrE,2EAKsD;AAEtD,sDAAwD;AA6ExD,SAAgB,0BAA0B,CAAC,UAAwC;IAClF,IAAI,UAAU,CAAC,oBAAoB,EAAE,CAAC;QACrC;;;WAGG;QACH,OAAO,UAAU,CAAC,oBAAoB,CAAC;IACxC,CAAC;SAAM,IAAI,UAAU,CAAC,qBAAqB,KAAK,KAA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B,GAAG,WAAW,CAAC;AAE5C;;;;;GAKG;AACU,QAAA,iBAAiB,GAAG;IAChC,wBAAgB;IAChB,UAAU;IACV,kBAAkB;IAClB,wBAAa;IACb,oBAAS;IACT,4BAAoB;CACpB,CAAC;AAEW,QAAA,2BAA2B,GAAG,YAAY,CAAC;AAExD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,SAAgB,yBAAyB,CAAC,eAAsC;IAC/E,eAAe,CAAC,OAAO,GAAG;QACzB,IAAI,EAAE,gCAAW,CAAC,IAAI;QACtB,IAAI,EAAE,EAAE,CAAC,2BAAgB,CAAC,EAAE,eAAe,CAAC,OAAO,EAAE;KACrD,CAAC;IACF,eAAe,CAAC,KAAK,CAAC,aAAa,EAAE,CAAC;AACvC,CAAC;AAND,8DAMC;AAEM,KAAK,UAAU,2BAA2B,CAChD,OAA+B,EAC/B,QAAuB;IAEvB,MAAM,UAAU,GAAG,MAAM,IAAA,uBAAY,EACpC,OAAO,EACP,QAAQ,CAAC,KAAK,CAAC,mCAA2B,CAAC,CAC3C,CAAC;IACF,qFAAqF;IACrF,mGAAmG;IACnG,uFAAuF;IACvF,0FAA0F;IAC1F,MAAM,aAAa,GAAG,0BAA0B,CAAC,UAAU,CAAC,CAAC;IAC7D,IAAA,iBAAM,EAAC,aAAa,GAAG,CAAC,EAAE,KAAK,CAAC,qCAAqC,CAAC,CAAC;IACvE,OAAO,UAAU,CAAC;AACnB,CAAC;AAfD,kEAeC;AAED,kEAA4E;AAAnE,+GAAA,mBAAmB,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport { SummaryType } from \"@fluidframework/driver-definitions\";\nimport type {\n\tISnapshotTree,\n\tISequencedDocumentMessage,\n} from \"@fluidframework/driver-definitions/internal\";\nimport { readAndParse } from \"@fluidframework/driver-utils/internal\";\nimport {\n\ttype ISummaryTreeWithStats,\n\tchannelsTreeName,\n\tgcTreeKey,\n\ttype IRuntimeStorageService,\n} from \"@fluidframework/runtime-definitions/internal\";\n\nimport { blobsTreeName } from \"../blobManager/index.js\";\nimport type { IGCMetadata } from \"../gc/index.js\";\n\nimport type { IDocumentSchema } from \"./documentSchema.js\";\n\n/**\n * @deprecated - This interface will no longer be exported in the future(AB#8004).\n * @legacy @beta\n */\nexport type OmitAttributesVersions<T> = Omit<\n\tT,\n\t\"snapshotFormatVersion\" | \"summaryFormatVersion\"\n>;\n\n/**\n * @deprecated - This interface will no longer be exported in the future(AB#8004).\n * @legacy @beta\n */\nexport interface IFluidDataStoreAttributes0 {\n\treadonly snapshotFormatVersion?: undefined;\n\treadonly summaryFormatVersion?: undefined;\n\tpkg: string;\n\t/**\n\t * This tells whether a data store is root. Root data stores are never collected.\n\t * Non-root data stores may be collected if they are not used. If this is not present, default it to\n\t * true. This will ensure that older data stores are incorrectly collected.\n\t */\n\treadonly isRootDataStore?: boolean;\n}\n\n/**\n * @deprecated - This interface will no longer be exported in the future(AB#8004).\n * @legacy @beta\n */\nexport interface IFluidDataStoreAttributes1\n\textends OmitAttributesVersions<IFluidDataStoreAttributes0> {\n\treadonly snapshotFormatVersion: \"0.1\";\n\treadonly summaryFormatVersion?: undefined;\n}\n\n/**\n * @deprecated - This interface will no longer be exported in the future(AB#8004).\n * @legacy @beta\n */\nexport interface IFluidDataStoreAttributes2\n\textends OmitAttributesVersions<IFluidDataStoreAttributes1> {\n\t/**\n\t * Switch from snapshotFormatVersion to summaryFormatVersion\n\t */\n\treadonly snapshotFormatVersion?: undefined;\n\treadonly summaryFormatVersion: 2;\n\t/**\n\t * True if channels are not isolated in .channels subtrees, otherwise isolated.\n\t * This is required in both datastore attributes as well as the root container,\n\t * because reused summary handles may cause different format versions in each\n\t * datastore subtree within the summary.\n\t */\n\treadonly disableIsolatedChannels?: true;\n}\n/**\n * Added IFluidDataStoreAttributes similar to IChannelAttributes which will tell the attributes of a\n * store like the package, snapshotFormatVersion to take different decisions based on a particular\n * snapshotFormatVersion.\n *\n * @deprecated - This interface will no longer be exported in the future(AB#8004).\n *\n * @legacy @beta\n *\n */\nexport type ReadFluidDataStoreAttributes =\n\t| IFluidDataStoreAttributes0\n\t| IFluidDataStoreAttributes1\n\t| IFluidDataStoreAttributes2;\nexport type WriteFluidDataStoreAttributes =\n\t| IFluidDataStoreAttributes1\n\t| IFluidDataStoreAttributes2;\n\nexport function getAttributesFormatVersion(attributes: ReadFluidDataStoreAttributes): number {\n\tif (attributes.summaryFormatVersion) {\n\t\t/**\n\t\t * Version 2+: Introduces .channels trees for isolation of\n\t\t * channel trees from data store objects.\n\t\t */\n\t\treturn attributes.summaryFormatVersion;\n\t} else if (attributes.snapshotFormatVersion === \"0.1\") {\n\t\t/**\n\t\t * Version 1: from this version the pkg within the data store\n\t\t * attributes blob is a JSON array rather than a string.\n\t\t */\n\t\treturn 1;\n\t}\n\t/**\n\t * Version 0: format version is missing from summary.\n\t * This indicates it is an older version.\n\t */\n\treturn 0;\n}\n\nexport function hasIsolatedChannels(attributes: ReadFluidDataStoreAttributes): boolean {\n\treturn !!attributes.summaryFormatVersion && !attributes.disableIsolatedChannels;\n}\n\n/**\n * @internal\n */\n\nexport interface IContainerRuntimeMetadata extends ICreateContainerMetadata, IGCMetadata {\n\treadonly summaryFormatVersion: 1;\n\t/**\n\t * @deprecated - used by old (prior to 2.0 RC3) runtimes\n\t */\n\treadonly message?: ISummaryMetadataMessage;\n\t/**\n\t * The last message processed at the time of summary. Only primitive property types are added to the summary.\n\t */\n\treadonly lastMessage?: ISummaryMetadataMessage;\n\t/**\n\t * True if channels are not isolated in .channels subtrees, otherwise isolated.\n\t */\n\treadonly disableIsolatedChannels?: true;\n\t/**\n\t * The summary number for a container's summary. Incremented on summaries throughout its lifetime.\n\t */\n\treadonly summaryNumber?: number;\n\t/**\n\t * GUID to identify a document in telemetry\n\t */\n\treadonly telemetryDocumentId?: string;\n\n\treadonly documentSchema?: IDocumentSchema;\n}\n\n/**\n * @internal\n */\nexport interface ICreateContainerMetadata {\n\t/**\n\t * Runtime version of the container when it was first created\n\t */\n\tcreateContainerRuntimeVersion?: string;\n\t/**\n\t * Timestamp of the container when it was first created\n\t */\n\tcreateContainerTimestamp?: number;\n}\n\n/**\n * The properties of an ISequencedDocumentMessage to be stored in the metadata blob in summary.\n * @internal\n */\nexport type ISummaryMetadataMessage = Pick<\n\tISequencedDocumentMessage,\n\t| \"clientId\"\n\t| \"clientSequenceNumber\"\n\t| \"minimumSequenceNumber\"\n\t| \"referenceSequenceNumber\"\n\t| \"sequenceNumber\"\n\t| \"timestamp\"\n\t| \"type\"\n>;\n\n/**\n * Extracts the properties from an ISequencedDocumentMessage as defined by ISummaryMetadataMessage. This message is\n * added to the metadata blob in summary.\n */\nexport const extractSummaryMetadataMessage = (\n\tmessage?: ISequencedDocumentMessage,\n): ISummaryMetadataMessage | undefined =>\n\tmessage === undefined\n\t\t? undefined\n\t\t: {\n\t\t\t\tclientId: message.clientId,\n\t\t\t\tclientSequenceNumber: message.clientSequenceNumber,\n\t\t\t\tminimumSequenceNumber: message.minimumSequenceNumber,\n\t\t\t\treferenceSequenceNumber: message.referenceSequenceNumber,\n\t\t\t\tsequenceNumber: message.sequenceNumber,\n\t\t\t\ttimestamp: message.timestamp,\n\t\t\t\ttype: message.type,\n\t\t\t};\n\nexport function getMetadataFormatVersion(metadata?: IContainerRuntimeMetadata): number {\n\t/**\n\t * Version 2+: Introduces runtime sequence number for data verification.\n\t *\n\t * Version 1+: Introduces .metadata blob and .channels trees for isolation of\n\t * data store trees from container-level objects.\n\t * Also introduces enableGC option stored in the summary.\n\t *\n\t * Version 0: metadata blob missing; format version is missing from summary.\n\t * This indicates it is an older version.\n\t */\n\treturn metadata?.summaryFormatVersion ?? 0;\n}\n\nexport const aliasBlobName = \".aliases\";\nexport const metadataBlobName = \".metadata\";\nexport const chunksBlobName = \".chunks\";\nexport const recentBatchInfoBlobName = \".recentBatchInfo\";\nexport const electedSummarizerBlobName = \".electedSummarizer\";\nexport const idCompressorBlobName = \".idCompressor\";\n\nexport function rootHasIsolatedChannels(metadata?: IContainerRuntimeMetadata): boolean {\n\treturn !!metadata && !metadata.disableIsolatedChannels;\n}\n\nexport const protocolTreeName = \".protocol\";\n\n/**\n * List of tree IDs at the container level which are reserved.\n * This is for older versions of summaries that do not yet have an\n * isolated data stores namespace. Without the namespace, this must\n * be used to prevent name collisions with data store IDs.\n */\nexport const nonDataStorePaths = [\n\tprotocolTreeName,\n\t\".logTail\",\n\t\".serviceProtocol\",\n\tblobsTreeName,\n\tgcTreeKey,\n\tidCompressorBlobName,\n];\n\nexport const dataStoreAttributesBlobName = \".component\";\n\n/**\n * Modifies summary tree and stats to put tree under .channels tree.\n *\n * @param summarizeResult - Summary tree and stats to modify\n *\n * @example\n *\n * Converts from:\n *\n * ```typescript\n * {\n * type: SummaryType.Tree,\n * tree: { a: {...}, b: {...}, c: {...} },\n * }\n * ```\n *\n * to:\n *\n * ```typescript\n * {\n * type: SummaryType.Tree,\n * tree: {\n * \".channels\": {\n * type: SummaryType.Tree,\n * tree: { a: {...}, b: {...}, c: {...} }\n * },\n * },\n * }\n * ```\n *\n * And adds +1 to treeNodeCount in stats.\n */\nexport function wrapSummaryInChannelsTree(summarizeResult: ISummaryTreeWithStats): void {\n\tsummarizeResult.summary = {\n\t\ttype: SummaryType.Tree,\n\t\ttree: { [channelsTreeName]: summarizeResult.summary },\n\t};\n\tsummarizeResult.stats.treeNodeCount++;\n}\n\nexport async function getFluidDataStoreAttributes(\n\tstorage: IRuntimeStorageService,\n\tsnapshot: ISnapshotTree,\n): Promise<ReadFluidDataStoreAttributes> {\n\tconst attributes = await readAndParse<ReadFluidDataStoreAttributes>(\n\t\tstorage,\n\t\tsnapshot.blobs[dataStoreAttributesBlobName],\n\t);\n\t// Use the snapshotFormatVersion to determine how the pkg is encoded in the snapshot.\n\t// For snapshotFormatVersion = \"0.1\" (1) or above, pkg is jsonified, otherwise it is just a string.\n\t// However the feature of loading a detached container from snapshot, is added when the\n\t// snapshotFormatVersion is at least \"0.1\" (1), so we don't expect it to be anything else.\n\tconst formatVersion = getAttributesFormatVersion(attributes);\n\tassert(formatVersion > 0, 0x1d5 /* Invalid snapshot format version */);\n\treturn attributes;\n}\n\nexport { blobHeadersBlobName } from \"@fluidframework/driver-utils/internal\";\n"]}
1
+ {"version":3,"file":"summaryFormat.js","sourceRoot":"","sources":["../../src/summary/summaryFormat.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA6D;AAC7D,2EAAiE;AAKjE,oEAAqE;AACrE,2EAKsD;AAEtD,sDAAwD;AA6ExD,SAAgB,0BAA0B,CAAC,UAAwC;IAClF,IAAI,UAAU,CAAC,oBAAoB,EAAE,CAAC;QACrC;;;WAGG;QACH,OAAO,UAAU,CAAC,oBAAoB,CAAC;IACxC,CAAC;SAAM,IAAI,UAAU,CAAC,qBAAqB,KAAK,KAAK,EAAE,CAAC;QACvD;;;WAGG;QACH,OAAO,CAAC,CAAC;IACV,CAAC;IACD;;;OAGG;IACH,OAAO,CAAC,CAAC;AACV,CAAC;AAnBD,gEAmBC;AAED,SAAgB,mBAAmB,CAAC,UAAwC;IAC3E,OAAO,CAAC,CAAC,UAAU,CAAC,oBAAoB,IAAI,CAAC,UAAU,CAAC,uBAAuB,CAAC;AACjF,CAAC;AAFD,kDAEC;AA6DD;;;GAGG;AACI,MAAM,6BAA6B,GAAG,CAC5C,OAAmC,EACG,EAAE,CACxC,OAAO,KAAK,SAAS;IACpB,CAAC,CAAC,SAAS;IACX,CAAC,CAAC;QACA,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,oBAAoB,EAAE,OAAO,CAAC,oBAAoB;QAClD,qBAAqB,EAAE,OAAO,CAAC,qBAAqB;QACpD,uBAAuB,EAAE,OAAO,CAAC,uBAAuB;QACxD,cAAc,EAAE,OAAO,CAAC,cAAc;QACtC,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,IAAI,EAAE,O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AC,CAC3C,CAAC;IACF,qFAAqF;IACrF,mGAAmG;IACnG,uFAAuF;IACvF,0FAA0F;IAC1F,MAAM,aAAa,GAAG,0BAA0B,CAAC,UAAU,CAAC,CAAC;IAC7D,IAAA,iBAAM,EAAC,aAAa,GAAG,CAAC,EAAE,KAAK,CAAC,qCAAqC,CAAC,CAAC;IACvE,OAAO,UAAU,CAAC;AACnB,CAAC;AAfD,kEAeC;AAED,kEAA4E;AAAnE,+GAAA,mBAAmB,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport { SummaryType } from \"@fluidframework/driver-definitions\";\nimport type {\n\tISnapshotTree,\n\tISequencedDocumentMessage,\n} from \"@fluidframework/driver-definitions/internal\";\nimport { readAndParse } from \"@fluidframework/driver-utils/internal\";\nimport {\n\ttype ISummaryTreeWithStats,\n\tchannelsTreeName,\n\tgcTreeKey,\n\ttype IRuntimeStorageService,\n} from \"@fluidframework/runtime-definitions/internal\";\n\nimport { blobsTreeName } from \"../blobManager/index.js\";\nimport type { IGCMetadata } from \"../gc/index.js\";\n\nimport type { IDocumentSchema } from \"./documentSchema.js\";\n\n/**\n * @deprecated This interface will no longer be exported in the future(AB#8004).\n * @legacy @beta\n */\nexport type OmitAttributesVersions<T> = Omit<\n\tT,\n\t\"snapshotFormatVersion\" | \"summaryFormatVersion\"\n>;\n\n/**\n * @deprecated This interface will no longer be exported in the future(AB#8004).\n * @legacy @beta\n */\nexport interface IFluidDataStoreAttributes0 {\n\treadonly snapshotFormatVersion?: undefined;\n\treadonly summaryFormatVersion?: undefined;\n\tpkg: string;\n\t/**\n\t * This tells whether a data store is root. Root data stores are never collected.\n\t * Non-root data stores may be collected if they are not used. If this is not present, default it to\n\t * true. This will ensure that older data stores are incorrectly collected.\n\t */\n\treadonly isRootDataStore?: boolean;\n}\n\n/**\n * @deprecated This interface will no longer be exported in the future(AB#8004).\n * @legacy @beta\n */\nexport interface IFluidDataStoreAttributes1\n\textends OmitAttributesVersions<IFluidDataStoreAttributes0> {\n\treadonly snapshotFormatVersion: \"0.1\";\n\treadonly summaryFormatVersion?: undefined;\n}\n\n/**\n * @deprecated This interface will no longer be exported in the future(AB#8004).\n * @legacy @beta\n */\nexport interface IFluidDataStoreAttributes2\n\textends OmitAttributesVersions<IFluidDataStoreAttributes1> {\n\t/**\n\t * Switch from snapshotFormatVersion to summaryFormatVersion\n\t */\n\treadonly snapshotFormatVersion?: undefined;\n\treadonly summaryFormatVersion: 2;\n\t/**\n\t * True if channels are not isolated in .channels subtrees, otherwise isolated.\n\t * This is required in both datastore attributes as well as the root container,\n\t * because reused summary handles may cause different format versions in each\n\t * datastore subtree within the summary.\n\t */\n\treadonly disableIsolatedChannels?: true;\n}\n/**\n * Added IFluidDataStoreAttributes similar to IChannelAttributes which will tell the attributes of a\n * store like the package, snapshotFormatVersion to take different decisions based on a particular\n * snapshotFormatVersion.\n *\n * @deprecated This interface will no longer be exported in the future(AB#8004).\n *\n * @legacy @beta\n *\n */\nexport type ReadFluidDataStoreAttributes =\n\t| IFluidDataStoreAttributes0\n\t| IFluidDataStoreAttributes1\n\t| IFluidDataStoreAttributes2;\nexport type WriteFluidDataStoreAttributes =\n\t| IFluidDataStoreAttributes1\n\t| IFluidDataStoreAttributes2;\n\nexport function getAttributesFormatVersion(attributes: ReadFluidDataStoreAttributes): number {\n\tif (attributes.summaryFormatVersion) {\n\t\t/**\n\t\t * Version 2+: Introduces .channels trees for isolation of\n\t\t * channel trees from data store objects.\n\t\t */\n\t\treturn attributes.summaryFormatVersion;\n\t} else if (attributes.snapshotFormatVersion === \"0.1\") {\n\t\t/**\n\t\t * Version 1: from this version the pkg within the data store\n\t\t * attributes blob is a JSON array rather than a string.\n\t\t */\n\t\treturn 1;\n\t}\n\t/**\n\t * Version 0: format version is missing from summary.\n\t * This indicates it is an older version.\n\t */\n\treturn 0;\n}\n\nexport function hasIsolatedChannels(attributes: ReadFluidDataStoreAttributes): boolean {\n\treturn !!attributes.summaryFormatVersion && !attributes.disableIsolatedChannels;\n}\n\n/**\n * @internal\n */\n\nexport interface IContainerRuntimeMetadata extends ICreateContainerMetadata, IGCMetadata {\n\treadonly summaryFormatVersion: 1;\n\t/**\n\t * @deprecated used by old (prior to 2.0 RC3) runtimes\n\t */\n\treadonly message?: ISummaryMetadataMessage;\n\t/**\n\t * The last message processed at the time of summary. Only primitive property types are added to the summary.\n\t */\n\treadonly lastMessage?: ISummaryMetadataMessage;\n\t/**\n\t * True if channels are not isolated in .channels subtrees, otherwise isolated.\n\t */\n\treadonly disableIsolatedChannels?: true;\n\t/**\n\t * The summary number for a container's summary. Incremented on summaries throughout its lifetime.\n\t */\n\treadonly summaryNumber?: number;\n\t/**\n\t * GUID to identify a document in telemetry\n\t */\n\treadonly telemetryDocumentId?: string;\n\n\treadonly documentSchema?: IDocumentSchema;\n}\n\n/**\n * @internal\n */\nexport interface ICreateContainerMetadata {\n\t/**\n\t * Runtime version of the container when it was first created\n\t */\n\tcreateContainerRuntimeVersion?: string;\n\t/**\n\t * Timestamp of the container when it was first created\n\t */\n\tcreateContainerTimestamp?: number;\n}\n\n/**\n * The properties of an ISequencedDocumentMessage to be stored in the metadata blob in summary.\n * @internal\n */\nexport type ISummaryMetadataMessage = Pick<\n\tISequencedDocumentMessage,\n\t| \"clientId\"\n\t| \"clientSequenceNumber\"\n\t| \"minimumSequenceNumber\"\n\t| \"referenceSequenceNumber\"\n\t| \"sequenceNumber\"\n\t| \"timestamp\"\n\t| \"type\"\n>;\n\n/**\n * Extracts the properties from an ISequencedDocumentMessage as defined by ISummaryMetadataMessage. This message is\n * added to the metadata blob in summary.\n */\nexport const extractSummaryMetadataMessage = (\n\tmessage?: ISequencedDocumentMessage,\n): ISummaryMetadataMessage | undefined =>\n\tmessage === undefined\n\t\t? undefined\n\t\t: {\n\t\t\t\tclientId: message.clientId,\n\t\t\t\tclientSequenceNumber: message.clientSequenceNumber,\n\t\t\t\tminimumSequenceNumber: message.minimumSequenceNumber,\n\t\t\t\treferenceSequenceNumber: message.referenceSequenceNumber,\n\t\t\t\tsequenceNumber: message.sequenceNumber,\n\t\t\t\ttimestamp: message.timestamp,\n\t\t\t\ttype: message.type,\n\t\t\t};\n\nexport function getMetadataFormatVersion(metadata?: IContainerRuntimeMetadata): number {\n\t/**\n\t * Version 2+: Introduces runtime sequence number for data verification.\n\t *\n\t * Version 1+: Introduces .metadata blob and .channels trees for isolation of\n\t * data store trees from container-level objects.\n\t * Also introduces enableGC option stored in the summary.\n\t *\n\t * Version 0: metadata blob missing; format version is missing from summary.\n\t * This indicates it is an older version.\n\t */\n\treturn metadata?.summaryFormatVersion ?? 0;\n}\n\nexport const aliasBlobName = \".aliases\";\nexport const metadataBlobName = \".metadata\";\nexport const chunksBlobName = \".chunks\";\nexport const recentBatchInfoBlobName = \".recentBatchInfo\";\nexport const electedSummarizerBlobName = \".electedSummarizer\";\nexport const idCompressorBlobName = \".idCompressor\";\n\nexport function rootHasIsolatedChannels(metadata?: IContainerRuntimeMetadata): boolean {\n\treturn !!metadata && !metadata.disableIsolatedChannels;\n}\n\nexport const protocolTreeName = \".protocol\";\n\n/**\n * List of tree IDs at the container level which are reserved.\n * This is for older versions of summaries that do not yet have an\n * isolated data stores namespace. Without the namespace, this must\n * be used to prevent name collisions with data store IDs.\n */\nexport const nonDataStorePaths = [\n\tprotocolTreeName,\n\t\".logTail\",\n\t\".serviceProtocol\",\n\tblobsTreeName,\n\tgcTreeKey,\n\tidCompressorBlobName,\n];\n\nexport const dataStoreAttributesBlobName = \".component\";\n\n/**\n * Modifies summary tree and stats to put tree under .channels tree.\n *\n * @param summarizeResult - Summary tree and stats to modify\n *\n * @example\n *\n * Converts from:\n *\n * ```typescript\n * {\n * type: SummaryType.Tree,\n * tree: { a: {...}, b: {...}, c: {...} },\n * }\n * ```\n *\n * to:\n *\n * ```typescript\n * {\n * type: SummaryType.Tree,\n * tree: {\n * \".channels\": {\n * type: SummaryType.Tree,\n * tree: { a: {...}, b: {...}, c: {...} }\n * },\n * },\n * }\n * ```\n *\n * And adds +1 to treeNodeCount in stats.\n */\nexport function wrapSummaryInChannelsTree(summarizeResult: ISummaryTreeWithStats): void {\n\tsummarizeResult.summary = {\n\t\ttype: SummaryType.Tree,\n\t\ttree: { [channelsTreeName]: summarizeResult.summary },\n\t};\n\tsummarizeResult.stats.treeNodeCount++;\n}\n\nexport async function getFluidDataStoreAttributes(\n\tstorage: IRuntimeStorageService,\n\tsnapshot: ISnapshotTree,\n): Promise<ReadFluidDataStoreAttributes> {\n\tconst attributes = await readAndParse<ReadFluidDataStoreAttributes>(\n\t\tstorage,\n\t\tsnapshot.blobs[dataStoreAttributesBlobName],\n\t);\n\t// Use the snapshotFormatVersion to determine how the pkg is encoded in the snapshot.\n\t// For snapshotFormatVersion = \"0.1\" (1) or above, pkg is jsonified, otherwise it is just a string.\n\t// However the feature of loading a detached container from snapshot, is added when the\n\t// snapshotFormatVersion is at least \"0.1\" (1), so we don't expect it to be anything else.\n\tconst formatVersion = getAttributesFormatVersion(attributes);\n\tassert(formatVersion > 0, 0x1d5 /* Invalid snapshot format version */);\n\treturn attributes;\n}\n\nexport { blobHeadersBlobName } from \"@fluidframework/driver-utils/internal\";\n"]}
@@ -581,7 +581,7 @@ export declare class ContainerRuntime extends TypedEventEmitter<IContainerRuntim
581
581
  * Api to fetch the snapshot from the service for a loadingGroupIds.
582
582
  * @param loadingGroupIds - LoadingGroupId for which the snapshot is asked for.
583
583
  * @param pathParts - Parts of the path, which we want to extract from the snapshot tree.
584
- * @returns - snapshotTree and the sequence number of the snapshot.
584
+ * @returns snapshotTree and the sequence number of the snapshot.
585
585
  */
586
586
  getSnapshotForLoadingGroupId(loadingGroupIds: string[], pathParts: string[]): Promise<{
587
587
  snapshotTree: ISnapshotTree;
@@ -593,7 +593,7 @@ export declare class ContainerRuntime extends TypedEventEmitter<IContainerRuntim
593
593
  * @param pathParts - Part of the path, which we want to extract from the snapshot tree.
594
594
  * @param hasIsolatedChannels - whether the channels are present inside ".channels" subtree. Older
595
595
  * snapshots will not have trees inside ".channels", so check that.
596
- * @returns - requested snapshot tree based on the path parts.
596
+ * @returns requested snapshot tree based on the path parts.
597
597
  */
598
598
  private getSnapshotTreeForPath;
599
599
  /**
@@ -698,7 +698,7 @@ export declare class ContainerRuntime extends TypedEventEmitter<IContainerRuntim
698
698
  /**
699
699
  * Flush the current batch of ops to the ordering service for sequencing
700
700
  * This method is not expected to be called in the middle of a batch.
701
- * @remarks - If it throws (e.g. if the batch is too large to send), the container will be closed.
701
+ * @remarks If it throws (e.g. if the batch is too large to send), the container will be closed.
702
702
  *
703
703
  * @param resubmitInfo - If defined, indicates this is a resubmission of a batch with the given Batch info needed for resubmit.
704
704
  */
@@ -771,7 +771,7 @@ export declare class ContainerRuntime extends TypedEventEmitter<IContainerRuntim
771
771
  /**
772
772
  * Builds the Summary tree including all the channels and the container state.
773
773
  *
774
- * @remarks - Unfortunately, this function is accessed in a non-typesafe way by a legacy first-party partner,
774
+ * @remarks Unfortunately, this function is accessed in a non-typesafe way by a legacy first-party partner,
775
775
  * so until we can provide a proper API for their scenario, we need to ensure this function doesn't change.
776
776
  */
777
777
  private summarizeInternal;
@@ -905,7 +905,7 @@ export declare class ContainerRuntime extends TypedEventEmitter<IContainerRuntim
905
905
  * Emit "dirty" or "saved" event based on the current dirty state of the document.
906
906
  * This must be called every time the states underlying the dirty state change.
907
907
  *
908
- * @privateRemarks - It's helpful to think of this as an event handler registered
908
+ * @privateRemarks It's helpful to think of this as an event handler registered
909
909
  * for hypothetical "changed" events for PendingStateManager, Outbox, and Container Attach machinery.
910
910
  * But those events don't exist so we manually call this wherever we know those changes happen.
911
911
  */
@@ -1253,7 +1253,7 @@ export class ContainerRuntime extends TypedEventEmitter {
1253
1253
  * Api to fetch the snapshot from the service for a loadingGroupIds.
1254
1254
  * @param loadingGroupIds - LoadingGroupId for which the snapshot is asked for.
1255
1255
  * @param pathParts - Parts of the path, which we want to extract from the snapshot tree.
1256
- * @returns - snapshotTree and the sequence number of the snapshot.
1256
+ * @returns snapshotTree and the sequence number of the snapshot.
1257
1257
  */
1258
1258
  async getSnapshotForLoadingGroupId(loadingGroupIds, pathParts) {
1259
1259
  const sortedLoadingGroupIds = loadingGroupIds.sort();
@@ -1336,7 +1336,7 @@ export class ContainerRuntime extends TypedEventEmitter {
1336
1336
  * @param pathParts - Part of the path, which we want to extract from the snapshot tree.
1337
1337
  * @param hasIsolatedChannels - whether the channels are present inside ".channels" subtree. Older
1338
1338
  * snapshots will not have trees inside ".channels", so check that.
1339
- * @returns - requested snapshot tree based on the path parts.
1339
+ * @returns requested snapshot tree based on the path parts.
1340
1340
  */
1341
1341
  getSnapshotTreeForPath(snapshotTree, pathParts, hasIsolatedChannels) {
1342
1342
  let childTree = snapshotTree;
@@ -2068,7 +2068,7 @@ export class ContainerRuntime extends TypedEventEmitter {
2068
2068
  /**
2069
2069
  * Flush the current batch of ops to the ordering service for sequencing
2070
2070
  * This method is not expected to be called in the middle of a batch.
2071
- * @remarks - If it throws (e.g. if the batch is too large to send), the container will be closed.
2071
+ * @remarks If it throws (e.g. if the batch is too large to send), the container will be closed.
2072
2072
  *
2073
2073
  * @param resubmitInfo - If defined, indicates this is a resubmission of a batch with the given Batch info needed for resubmit.
2074
2074
  */
@@ -2275,7 +2275,7 @@ export class ContainerRuntime extends TypedEventEmitter {
2275
2275
  /**
2276
2276
  * Builds the Summary tree including all the channels and the container state.
2277
2277
  *
2278
- * @remarks - Unfortunately, this function is accessed in a non-typesafe way by a legacy first-party partner,
2278
+ * @remarks Unfortunately, this function is accessed in a non-typesafe way by a legacy first-party partner,
2279
2279
  * so until we can provide a proper API for their scenario, we need to ensure this function doesn't change.
2280
2280
  */
2281
2281
  async summarizeInternal(fullTree, trackState, telemetryContext) {
@@ -2817,7 +2817,7 @@ export class ContainerRuntime extends TypedEventEmitter {
2817
2817
  * Emit "dirty" or "saved" event based on the current dirty state of the document.
2818
2818
  * This must be called every time the states underlying the dirty state change.
2819
2819
  *
2820
- * @privateRemarks - It's helpful to think of this as an event handler registered
2820
+ * @privateRemarks It's helpful to think of this as an event handler registered
2821
2821
  * for hypothetical "changed" events for PendingStateManager, Outbox, and Container Attach machinery.
2822
2822
  * But those events don't exist so we manually call this wherever we know those changes happen.
2823
2823
  */