@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.
- package/api-report/container-runtime.legacy.beta.api.md +0 -3
- package/container-runtime.test-files.tar +0 -0
- package/dist/containerRuntime.d.ts +5 -5
- package/dist/containerRuntime.js +5 -5
- package/dist/containerRuntime.js.map +1 -1
- package/dist/index.d.ts +0 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/legacy.d.ts +0 -1
- package/dist/messageTypes.d.ts +1 -1
- package/dist/messageTypes.js +1 -1
- package/dist/messageTypes.js.map +1 -1
- package/dist/opLifecycle/duplicateBatchDetector.d.ts +2 -2
- package/dist/opLifecycle/duplicateBatchDetector.js +2 -2
- package/dist/opLifecycle/duplicateBatchDetector.js.map +1 -1
- package/dist/opLifecycle/opGroupingManager.d.ts +2 -2
- package/dist/opLifecycle/opGroupingManager.d.ts.map +1 -1
- package/dist/opLifecycle/opGroupingManager.js +5 -3
- package/dist/opLifecycle/opGroupingManager.js.map +1 -1
- package/dist/opLifecycle/opSerialization.d.ts +2 -2
- package/dist/opLifecycle/opSerialization.js +2 -2
- package/dist/opLifecycle/opSerialization.js.map +1 -1
- package/dist/opLifecycle/opSplitter.d.ts +1 -1
- package/dist/opLifecycle/opSplitter.js +1 -1
- package/dist/opLifecycle/opSplitter.js.map +1 -1
- package/dist/opLifecycle/outbox.d.ts +2 -2
- package/dist/opLifecycle/outbox.js +2 -2
- package/dist/opLifecycle/outbox.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/pendingStateManager.d.ts +1 -1
- package/dist/pendingStateManager.js +1 -1
- package/dist/pendingStateManager.js.map +1 -1
- package/dist/storageServiceWithAttachBlobs.d.ts +7 -7
- package/dist/storageServiceWithAttachBlobs.js +7 -7
- package/dist/storageServiceWithAttachBlobs.js.map +1 -1
- package/dist/summary/documentSchema.d.ts +1 -1
- package/dist/summary/documentSchema.js +1 -1
- package/dist/summary/documentSchema.js.map +1 -1
- package/dist/summary/orderedClientElection.js.map +1 -1
- package/dist/summary/summaryFormat.d.ts +6 -6
- package/dist/summary/summaryFormat.js.map +1 -1
- package/lib/containerRuntime.d.ts +5 -5
- package/lib/containerRuntime.js +5 -5
- package/lib/containerRuntime.js.map +1 -1
- package/lib/index.d.ts +0 -5
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/legacy.d.ts +0 -1
- package/lib/messageTypes.d.ts +1 -1
- package/lib/messageTypes.js +1 -1
- package/lib/messageTypes.js.map +1 -1
- package/lib/opLifecycle/duplicateBatchDetector.d.ts +2 -2
- package/lib/opLifecycle/duplicateBatchDetector.js +2 -2
- package/lib/opLifecycle/duplicateBatchDetector.js.map +1 -1
- package/lib/opLifecycle/opGroupingManager.d.ts +2 -2
- package/lib/opLifecycle/opGroupingManager.d.ts.map +1 -1
- package/lib/opLifecycle/opGroupingManager.js +5 -3
- package/lib/opLifecycle/opGroupingManager.js.map +1 -1
- package/lib/opLifecycle/opSerialization.d.ts +2 -2
- package/lib/opLifecycle/opSerialization.js +2 -2
- package/lib/opLifecycle/opSerialization.js.map +1 -1
- package/lib/opLifecycle/opSplitter.d.ts +1 -1
- package/lib/opLifecycle/opSplitter.js +1 -1
- package/lib/opLifecycle/opSplitter.js.map +1 -1
- package/lib/opLifecycle/outbox.d.ts +2 -2
- package/lib/opLifecycle/outbox.js +2 -2
- package/lib/opLifecycle/outbox.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/pendingStateManager.d.ts +1 -1
- package/lib/pendingStateManager.js +1 -1
- package/lib/pendingStateManager.js.map +1 -1
- package/lib/storageServiceWithAttachBlobs.d.ts +7 -7
- package/lib/storageServiceWithAttachBlobs.js +7 -7
- package/lib/storageServiceWithAttachBlobs.js.map +1 -1
- package/lib/summary/documentSchema.d.ts +1 -1
- package/lib/summary/documentSchema.js +1 -1
- package/lib/summary/documentSchema.js.map +1 -1
- package/lib/summary/orderedClientElection.js.map +1 -1
- package/lib/summary/summaryFormat.d.ts +6 -6
- package/lib/summary/summaryFormat.js.map +1 -1
- package/package.json +25 -20
- package/src/containerRuntime.ts +5 -5
- package/src/index.ts +0 -6
- package/src/messageTypes.ts +1 -1
- package/src/opLifecycle/duplicateBatchDetector.ts +2 -2
- package/src/opLifecycle/opGroupingManager.ts +7 -4
- package/src/opLifecycle/opSerialization.ts +2 -2
- package/src/opLifecycle/opSplitter.ts +1 -1
- package/src/opLifecycle/outbox.ts +2 -2
- package/src/packageVersion.ts +1 -1
- package/src/pendingStateManager.ts +1 -1
- package/src/storageServiceWithAttachBlobs.ts +7 -7
- package/src/summary/documentSchema.ts +1 -1
- package/src/summary/orderedClientElection.ts +1 -1
- package/src/summary/summaryFormat.ts +6 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"summaryFormat.js","sourceRoot":"","sources":["../../src/summary/summaryFormat.ts"],"names":[],"mappings":"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","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":"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","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"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/container-runtime",
|
|
3
|
-
"version": "2.70.0-
|
|
3
|
+
"version": "2.70.0-361248",
|
|
4
4
|
"description": "Fluid container runtime",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -119,18 +119,18 @@
|
|
|
119
119
|
"temp-directory": "nyc/.nyc_output"
|
|
120
120
|
},
|
|
121
121
|
"dependencies": {
|
|
122
|
-
"@fluid-internal/client-utils": "2.70.0-
|
|
123
|
-
"@fluidframework/container-definitions": "2.70.0-
|
|
124
|
-
"@fluidframework/container-runtime-definitions": "2.70.0-
|
|
125
|
-
"@fluidframework/core-interfaces": "2.70.0-
|
|
126
|
-
"@fluidframework/core-utils": "2.70.0-
|
|
127
|
-
"@fluidframework/datastore": "2.70.0-
|
|
128
|
-
"@fluidframework/driver-definitions": "2.70.0-
|
|
129
|
-
"@fluidframework/driver-utils": "2.70.0-
|
|
130
|
-
"@fluidframework/id-compressor": "2.70.0-
|
|
131
|
-
"@fluidframework/runtime-definitions": "2.70.0-
|
|
132
|
-
"@fluidframework/runtime-utils": "2.70.0-
|
|
133
|
-
"@fluidframework/telemetry-utils": "2.70.0-
|
|
122
|
+
"@fluid-internal/client-utils": "2.70.0-361248",
|
|
123
|
+
"@fluidframework/container-definitions": "2.70.0-361248",
|
|
124
|
+
"@fluidframework/container-runtime-definitions": "2.70.0-361248",
|
|
125
|
+
"@fluidframework/core-interfaces": "2.70.0-361248",
|
|
126
|
+
"@fluidframework/core-utils": "2.70.0-361248",
|
|
127
|
+
"@fluidframework/datastore": "2.70.0-361248",
|
|
128
|
+
"@fluidframework/driver-definitions": "2.70.0-361248",
|
|
129
|
+
"@fluidframework/driver-utils": "2.70.0-361248",
|
|
130
|
+
"@fluidframework/id-compressor": "2.70.0-361248",
|
|
131
|
+
"@fluidframework/runtime-definitions": "2.70.0-361248",
|
|
132
|
+
"@fluidframework/runtime-utils": "2.70.0-361248",
|
|
133
|
+
"@fluidframework/telemetry-utils": "2.70.0-361248",
|
|
134
134
|
"@tylerbu/sorted-btree-es6": "^1.8.0",
|
|
135
135
|
"double-ended-queue": "^2.1.0-0",
|
|
136
136
|
"lz4js": "^0.2.0",
|
|
@@ -140,16 +140,16 @@
|
|
|
140
140
|
"devDependencies": {
|
|
141
141
|
"@arethetypeswrong/cli": "^0.17.1",
|
|
142
142
|
"@biomejs/biome": "~1.9.3",
|
|
143
|
-
"@fluid-internal/mocha-test-setup": "2.70.0-
|
|
144
|
-
"@fluid-private/stochastic-test-utils": "2.70.0-
|
|
145
|
-
"@fluid-private/test-pairwise-generator": "2.70.0-
|
|
143
|
+
"@fluid-internal/mocha-test-setup": "2.70.0-361248",
|
|
144
|
+
"@fluid-private/stochastic-test-utils": "2.70.0-361248",
|
|
145
|
+
"@fluid-private/test-pairwise-generator": "2.70.0-361248",
|
|
146
146
|
"@fluid-tools/benchmark": "^0.51.0",
|
|
147
147
|
"@fluid-tools/build-cli": "^0.58.3",
|
|
148
148
|
"@fluidframework/build-common": "^2.0.3",
|
|
149
149
|
"@fluidframework/build-tools": "^0.58.3",
|
|
150
150
|
"@fluidframework/container-runtime-previous": "npm:@fluidframework/container-runtime@2.63.0",
|
|
151
|
-
"@fluidframework/eslint-config-fluid": "^6.
|
|
152
|
-
"@fluidframework/test-runtime-utils": "2.70.0-
|
|
151
|
+
"@fluidframework/eslint-config-fluid": "^6.1.0",
|
|
152
|
+
"@fluidframework/test-runtime-utils": "2.70.0-361248",
|
|
153
153
|
"@microsoft/api-extractor": "7.52.11",
|
|
154
154
|
"@types/double-ended-queue": "^2.1.0",
|
|
155
155
|
"@types/lz4js": "^0.2.0",
|
|
@@ -160,7 +160,7 @@
|
|
|
160
160
|
"concurrently": "^8.2.1",
|
|
161
161
|
"copyfiles": "^2.4.1",
|
|
162
162
|
"cross-env": "^7.0.3",
|
|
163
|
-
"eslint": "~8.
|
|
163
|
+
"eslint": "~8.57.1",
|
|
164
164
|
"mocha": "^10.8.2",
|
|
165
165
|
"mocha-multi-reporters": "^1.5.1",
|
|
166
166
|
"rimraf": "^4.4.0",
|
|
@@ -168,7 +168,12 @@
|
|
|
168
168
|
"typescript": "~5.4.5"
|
|
169
169
|
},
|
|
170
170
|
"typeValidation": {
|
|
171
|
-
"broken": {
|
|
171
|
+
"broken": {
|
|
172
|
+
"TypeAlias_MinimumVersionForCollab": {
|
|
173
|
+
"backCompat": false,
|
|
174
|
+
"forwardCompat": false
|
|
175
|
+
}
|
|
176
|
+
},
|
|
172
177
|
"entrypoint": "legacy"
|
|
173
178
|
},
|
|
174
179
|
"scripts": {
|
package/src/containerRuntime.ts
CHANGED
|
@@ -2347,7 +2347,7 @@ export class ContainerRuntime
|
|
|
2347
2347
|
* Api to fetch the snapshot from the service for a loadingGroupIds.
|
|
2348
2348
|
* @param loadingGroupIds - LoadingGroupId for which the snapshot is asked for.
|
|
2349
2349
|
* @param pathParts - Parts of the path, which we want to extract from the snapshot tree.
|
|
2350
|
-
* @returns
|
|
2350
|
+
* @returns snapshotTree and the sequence number of the snapshot.
|
|
2351
2351
|
*/
|
|
2352
2352
|
public async getSnapshotForLoadingGroupId(
|
|
2353
2353
|
loadingGroupIds: string[],
|
|
@@ -2457,7 +2457,7 @@ export class ContainerRuntime
|
|
|
2457
2457
|
* @param pathParts - Part of the path, which we want to extract from the snapshot tree.
|
|
2458
2458
|
* @param hasIsolatedChannels - whether the channels are present inside ".channels" subtree. Older
|
|
2459
2459
|
* snapshots will not have trees inside ".channels", so check that.
|
|
2460
|
-
* @returns
|
|
2460
|
+
* @returns requested snapshot tree based on the path parts.
|
|
2461
2461
|
*/
|
|
2462
2462
|
private getSnapshotTreeForPath(
|
|
2463
2463
|
snapshotTree: ISnapshotTree,
|
|
@@ -3421,7 +3421,7 @@ export class ContainerRuntime
|
|
|
3421
3421
|
/**
|
|
3422
3422
|
* Flush the current batch of ops to the ordering service for sequencing
|
|
3423
3423
|
* This method is not expected to be called in the middle of a batch.
|
|
3424
|
-
* @remarks
|
|
3424
|
+
* @remarks If it throws (e.g. if the batch is too large to send), the container will be closed.
|
|
3425
3425
|
*
|
|
3426
3426
|
* @param resubmitInfo - If defined, indicates this is a resubmission of a batch with the given Batch info needed for resubmit.
|
|
3427
3427
|
*/
|
|
@@ -3778,7 +3778,7 @@ export class ContainerRuntime
|
|
|
3778
3778
|
/**
|
|
3779
3779
|
* Builds the Summary tree including all the channels and the container state.
|
|
3780
3780
|
*
|
|
3781
|
-
* @remarks
|
|
3781
|
+
* @remarks Unfortunately, this function is accessed in a non-typesafe way by a legacy first-party partner,
|
|
3782
3782
|
* so until we can provide a proper API for their scenario, we need to ensure this function doesn't change.
|
|
3783
3783
|
*/
|
|
3784
3784
|
private async summarizeInternal(
|
|
@@ -4521,7 +4521,7 @@ export class ContainerRuntime
|
|
|
4521
4521
|
* Emit "dirty" or "saved" event based on the current dirty state of the document.
|
|
4522
4522
|
* This must be called every time the states underlying the dirty state change.
|
|
4523
4523
|
*
|
|
4524
|
-
* @privateRemarks
|
|
4524
|
+
* @privateRemarks It's helpful to think of this as an event handler registered
|
|
4525
4525
|
* for hypothetical "changed" events for PendingStateManager, Outbox, and Container Attach machinery.
|
|
4526
4526
|
* But those events don't exist so we manually call this wherever we know those changes happen.
|
|
4527
4527
|
*/
|
package/src/index.ts
CHANGED
|
@@ -20,12 +20,6 @@ export {
|
|
|
20
20
|
} from "./containerRuntime.js";
|
|
21
21
|
export type { ICompressionRuntimeOptions } from "./compressionDefinitions.js";
|
|
22
22
|
export { CompressionAlgorithms, disabledCompressionConfig } from "./compressionDefinitions.js";
|
|
23
|
-
export type {
|
|
24
|
-
/**
|
|
25
|
-
* @deprecated Import from `@fluidframework/runtime-definitions/legacy` instead.
|
|
26
|
-
*/
|
|
27
|
-
MinimumVersionForCollab,
|
|
28
|
-
} from "@fluidframework/runtime-definitions/internal";
|
|
29
23
|
export {
|
|
30
24
|
ContainerMessageType,
|
|
31
25
|
type UnknownContainerRuntimeMessage,
|
package/src/messageTypes.ts
CHANGED
|
@@ -44,7 +44,7 @@ export enum ContainerMessageType {
|
|
|
44
44
|
/**
|
|
45
45
|
* An op containing an IdRange of Ids allocated using the runtime's IdCompressor since
|
|
46
46
|
* the last allocation op was sent.
|
|
47
|
-
* See the
|
|
47
|
+
* See the {@link https://github.com/microsoft/FluidFramework/blob/main/packages/runtime/id-compressor/README.md|IdCompressor README} for more details.
|
|
48
48
|
*/
|
|
49
49
|
IdAllocation = "idAllocation",
|
|
50
50
|
|
|
@@ -39,7 +39,7 @@ export class DuplicateBatchDetector {
|
|
|
39
39
|
* Records this batch's batchId, and checks if it's a duplicate of a batch we've already seen.
|
|
40
40
|
* If it's a duplicate, also return the sequence number of the other batch for logging.
|
|
41
41
|
*
|
|
42
|
-
* @remarks
|
|
42
|
+
* @remarks We also use the minimumSequenceNumber to clear out old batchIds that are no longer at risk for duplicates.
|
|
43
43
|
*/
|
|
44
44
|
public processInboundBatch(
|
|
45
45
|
batchStart: BatchStartInfo,
|
|
@@ -97,7 +97,7 @@ export class DuplicateBatchDetector {
|
|
|
97
97
|
* Returns a snapshot of the state of the detector which can be included in a summary
|
|
98
98
|
* and used to "rehydrate" this class when loading from a snapshot.
|
|
99
99
|
*
|
|
100
|
-
* @returns
|
|
100
|
+
* @returns A serializable object representing the state of the detector, or undefined if there is nothing to save.
|
|
101
101
|
*/
|
|
102
102
|
public getRecentBatchInfoForSummary(
|
|
103
103
|
telemetryContext?: ITelemetryContext,
|
|
@@ -72,7 +72,7 @@ export class OpGroupingManager {
|
|
|
72
72
|
* This is needed as a placeholder if a batch becomes empty on resubmit, but we are tracking batch IDs.
|
|
73
73
|
* @param resubmittingBatchId - batch ID of the resubmitting batch
|
|
74
74
|
* @param referenceSequenceNumber - reference sequence number
|
|
75
|
-
* @returns
|
|
75
|
+
* @returns The outbound batch as well as the interior placeholder message
|
|
76
76
|
*/
|
|
77
77
|
public createEmptyGroupedBatch(
|
|
78
78
|
resubmittingBatchId: string,
|
|
@@ -112,7 +112,7 @@ export class OpGroupingManager {
|
|
|
112
112
|
*
|
|
113
113
|
* If the batch already has only 1 message, it is returned as-is.
|
|
114
114
|
*
|
|
115
|
-
* @remarks
|
|
115
|
+
* @remarks Remember that a BatchMessage has its content JSON serialized, so the incoming batch message contents
|
|
116
116
|
* must be parsed first, and then the type and contents mentioned above are hidden in that JSON serialization.
|
|
117
117
|
*/
|
|
118
118
|
public groupBatch(batch: OutboundBatch): OutboundSingletonBatch {
|
|
@@ -132,7 +132,7 @@ export class OpGroupingManager {
|
|
|
132
132
|
});
|
|
133
133
|
}
|
|
134
134
|
// We expect this will be on the first message, if present at all.
|
|
135
|
-
let groupedBatchId;
|
|
135
|
+
let groupedBatchId: unknown;
|
|
136
136
|
for (const message of batch.messages) {
|
|
137
137
|
if (message.metadata !== undefined) {
|
|
138
138
|
const { batch: _batch, batchId, ...rest } = message.metadata;
|
|
@@ -146,7 +146,10 @@ export class OpGroupingManager {
|
|
|
146
146
|
const serializedContent = JSON.stringify({
|
|
147
147
|
type: OpGroupingManager.groupedBatchOp,
|
|
148
148
|
contents: batch.messages.map<IGroupedMessage>((message) => ({
|
|
149
|
-
contents:
|
|
149
|
+
contents:
|
|
150
|
+
message.contents === undefined
|
|
151
|
+
? undefined
|
|
152
|
+
: (JSON.parse(message.contents) as unknown),
|
|
150
153
|
metadata: message.metadata,
|
|
151
154
|
compression: message.compression,
|
|
152
155
|
})),
|
|
@@ -18,7 +18,7 @@ import type { EmptyGroupedBatch } from "./opGroupingManager.js";
|
|
|
18
18
|
* Takes an incoming runtime message (outer type "op"), JSON.parses the message's contents in place,
|
|
19
19
|
* if needed (old Loader does this for us).
|
|
20
20
|
* Only to be used for runtime messages. The contents here would be the virtualized payload for a batch of ops.
|
|
21
|
-
* @remarks
|
|
21
|
+
* @remarks Serialization during submit happens via {@link serializeOp}
|
|
22
22
|
* @param mutableMessage - op message received
|
|
23
23
|
*/
|
|
24
24
|
export function ensureContentsDeserialized(mutableMessage: ISequencedDocumentMessage): void {
|
|
@@ -31,7 +31,7 @@ export function ensureContentsDeserialized(mutableMessage: ISequencedDocumentMes
|
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
33
|
* Before submitting an op to the Outbox, its contents must be serialized using this function.
|
|
34
|
-
* @remarks
|
|
34
|
+
* @remarks The deserialization on process happens via the function {@link ensureContentsDeserialized}.
|
|
35
35
|
*
|
|
36
36
|
* @param toSerialize - op message to serialize. Also supports an array of ops.
|
|
37
37
|
*/
|
|
@@ -118,7 +118,7 @@ export class OpSplitter {
|
|
|
118
118
|
* To illustrate the current functionality, if the input is `[largeOp]`, `largeOp` will be split into `[chunk1, chunk2, chunk3, chunk4]`.
|
|
119
119
|
* `chunk1`, `chunk2` and `chunk3` will be sent individually and `[chunk4]` will be returned.
|
|
120
120
|
*
|
|
121
|
-
* @remarks
|
|
121
|
+
* @remarks A side effect here is that 1 or more chunks are queued immediately for sending in next JS turn.
|
|
122
122
|
*
|
|
123
123
|
* @privateRemarks
|
|
124
124
|
* This maintains support for splitting a compressed batch with multiple messages (empty placeholders after the first),
|
|
@@ -252,7 +252,7 @@ export class Outbox {
|
|
|
252
252
|
* message as the first message. If flushing partial batch is not enabled, we will throw (except for reentrant ops).
|
|
253
253
|
* This would indicate we expected this case to be precluded by logic elsewhere.
|
|
254
254
|
*
|
|
255
|
-
* @remarks
|
|
255
|
+
* @remarks To detect batch interruption, we compare both the reference sequence number
|
|
256
256
|
* (i.e. last message processed by DeltaManager) and the client sequence number of the
|
|
257
257
|
* last message processed by the ContainerRuntime. In the absence of op reentrancy, this
|
|
258
258
|
* pair will remain stable during a single JS turn during which the batch is being built up.
|
|
@@ -539,7 +539,7 @@ export class Outbox {
|
|
|
539
539
|
/**
|
|
540
540
|
* As necessary and enabled, groups / compresses / chunks the given batch.
|
|
541
541
|
*
|
|
542
|
-
* @remarks
|
|
542
|
+
* @remarks If chunking happens, a side effect here is that 1 or more chunks are queued immediately for sending in next JS turn.
|
|
543
543
|
*
|
|
544
544
|
* @param localBatch - Local Batch to be virtualized - i.e. transformed into an Outbound Batch
|
|
545
545
|
* @param groupingEnabled - If true, Grouped batching is enabled.
|
package/src/packageVersion.ts
CHANGED
|
@@ -608,7 +608,7 @@ export class PendingStateManager implements IDisposable {
|
|
|
608
608
|
* @param sequenceNumber - The sequenceNumber from the server corresponding to the next pending message.
|
|
609
609
|
* @param message - [optional] The entire incoming message, for comparing contents with the pending message for extra validation.
|
|
610
610
|
* @throws DataProcessingError if the pending message content doesn't match the incoming message content.
|
|
611
|
-
* @returns
|
|
611
|
+
* @returns The localOpMetadata of the next pending message, to be sent to whoever submitted the original message.
|
|
612
612
|
*/
|
|
613
613
|
private processNextPendingMessage(
|
|
614
614
|
sequenceNumber: number,
|
|
@@ -30,7 +30,7 @@ export class StorageServiceWithAttachBlobs implements IRuntimeStorageService {
|
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
32
|
* {@link IRuntimeStorageService.policies}.
|
|
33
|
-
* @deprecated
|
|
33
|
+
* @deprecated This will be removed in a future release. The DataStore layer does not need this.
|
|
34
34
|
*/
|
|
35
35
|
public get policies(): IDocumentStorageServicePolicies | undefined {
|
|
36
36
|
return this.internalStorageService.policies;
|
|
@@ -49,7 +49,7 @@ export class StorageServiceWithAttachBlobs implements IRuntimeStorageService {
|
|
|
49
49
|
|
|
50
50
|
/**
|
|
51
51
|
* {@link IRuntimeStorageService.getSnapshotTree}.
|
|
52
|
-
* @deprecated
|
|
52
|
+
* @deprecated This will be removed in a future release. The DataStore layer does not need this.
|
|
53
53
|
*/
|
|
54
54
|
public async getSnapshotTree(
|
|
55
55
|
version?: IVersion,
|
|
@@ -61,7 +61,7 @@ export class StorageServiceWithAttachBlobs implements IRuntimeStorageService {
|
|
|
61
61
|
|
|
62
62
|
/**
|
|
63
63
|
* {@link IRuntimeStorageService.getSnapshot}.
|
|
64
|
-
* @deprecated
|
|
64
|
+
* @deprecated This will be removed in a future release. The DataStore layer does not need this.
|
|
65
65
|
*/
|
|
66
66
|
public async getSnapshot(snapshotFetchOptions?: ISnapshotFetchOptions): Promise<ISnapshot> {
|
|
67
67
|
if (this.internalStorageService.getSnapshot !== undefined) {
|
|
@@ -74,7 +74,7 @@ export class StorageServiceWithAttachBlobs implements IRuntimeStorageService {
|
|
|
74
74
|
|
|
75
75
|
/**
|
|
76
76
|
* {@link IRuntimeStorageService.getVersions}.
|
|
77
|
-
* @deprecated
|
|
77
|
+
* @deprecated This will be removed in a future release. The DataStore layer does not need this.
|
|
78
78
|
*/
|
|
79
79
|
public async getVersions(
|
|
80
80
|
// eslint-disable-next-line @rushstack/no-new-null
|
|
@@ -93,7 +93,7 @@ export class StorageServiceWithAttachBlobs implements IRuntimeStorageService {
|
|
|
93
93
|
|
|
94
94
|
/**
|
|
95
95
|
* {@link IRuntimeStorageService.uploadSummaryWithContext}.
|
|
96
|
-
* @deprecated
|
|
96
|
+
* @deprecated This will be removed in a future release. The DataStore layer does not need this.
|
|
97
97
|
*/
|
|
98
98
|
public async uploadSummaryWithContext(
|
|
99
99
|
summary: ISummaryTree,
|
|
@@ -104,7 +104,7 @@ export class StorageServiceWithAttachBlobs implements IRuntimeStorageService {
|
|
|
104
104
|
|
|
105
105
|
/**
|
|
106
106
|
* {@link IRuntimeStorageService.createBlob}.
|
|
107
|
-
* @deprecated
|
|
107
|
+
* @deprecated This will be removed in a future release. The DataStore layer does not need this.
|
|
108
108
|
*/
|
|
109
109
|
public async createBlob(file: ArrayBufferLike): Promise<ICreateBlobResponse> {
|
|
110
110
|
return this.internalStorageService.createBlob(file);
|
|
@@ -112,7 +112,7 @@ export class StorageServiceWithAttachBlobs implements IRuntimeStorageService {
|
|
|
112
112
|
|
|
113
113
|
/**
|
|
114
114
|
* {@link IRuntimeStorageService.downloadSummary}.
|
|
115
|
-
* @deprecated
|
|
115
|
+
* @deprecated This will be removed in a future release. The DataStore layer does not need this.
|
|
116
116
|
*/
|
|
117
117
|
public async downloadSummary(handle: ISummaryHandle): Promise<ISummaryTree> {
|
|
118
118
|
return this.internalStorageService.downloadSummary(handle);
|
|
@@ -740,7 +740,7 @@ export class DocumentsSchemaController {
|
|
|
740
740
|
* @param contents - contents of the messages
|
|
741
741
|
* @param local - whether op is local
|
|
742
742
|
* @param sequenceNumber - sequence number of the op
|
|
743
|
-
* @returns
|
|
743
|
+
* @returns true if schema was accepted, otherwise false (rejected due to failed CAS)
|
|
744
744
|
*/
|
|
745
745
|
public processDocumentSchemaMessages(
|
|
746
746
|
contents: IDocumentSchemaChangeMessageIncoming[],
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
import { summarizerClientType } from "./summarizerTypes.js";
|
|
28
28
|
|
|
29
29
|
// helper types for recursive readonly.
|
|
30
|
-
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
30
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type, @typescript-eslint/ban-types
|
|
31
31
|
export type ImmutablePrimitives = undefined | null | boolean | string | number | Function;
|
|
32
32
|
export type Immutable<T> = T extends ImmutablePrimitives
|
|
33
33
|
? T
|
|
@@ -23,7 +23,7 @@ import type { IGCMetadata } from "../gc/index.js";
|
|
|
23
23
|
import type { IDocumentSchema } from "./documentSchema.js";
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
|
-
* @deprecated
|
|
26
|
+
* @deprecated This interface will no longer be exported in the future(AB#8004).
|
|
27
27
|
* @legacy @beta
|
|
28
28
|
*/
|
|
29
29
|
export type OmitAttributesVersions<T> = Omit<
|
|
@@ -32,7 +32,7 @@ export type OmitAttributesVersions<T> = Omit<
|
|
|
32
32
|
>;
|
|
33
33
|
|
|
34
34
|
/**
|
|
35
|
-
* @deprecated
|
|
35
|
+
* @deprecated This interface will no longer be exported in the future(AB#8004).
|
|
36
36
|
* @legacy @beta
|
|
37
37
|
*/
|
|
38
38
|
export interface IFluidDataStoreAttributes0 {
|
|
@@ -48,7 +48,7 @@ export interface IFluidDataStoreAttributes0 {
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
/**
|
|
51
|
-
* @deprecated
|
|
51
|
+
* @deprecated This interface will no longer be exported in the future(AB#8004).
|
|
52
52
|
* @legacy @beta
|
|
53
53
|
*/
|
|
54
54
|
export interface IFluidDataStoreAttributes1
|
|
@@ -58,7 +58,7 @@ export interface IFluidDataStoreAttributes1
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
/**
|
|
61
|
-
* @deprecated
|
|
61
|
+
* @deprecated This interface will no longer be exported in the future(AB#8004).
|
|
62
62
|
* @legacy @beta
|
|
63
63
|
*/
|
|
64
64
|
export interface IFluidDataStoreAttributes2
|
|
@@ -81,7 +81,7 @@ export interface IFluidDataStoreAttributes2
|
|
|
81
81
|
* store like the package, snapshotFormatVersion to take different decisions based on a particular
|
|
82
82
|
* snapshotFormatVersion.
|
|
83
83
|
*
|
|
84
|
-
* @deprecated
|
|
84
|
+
* @deprecated This interface will no longer be exported in the future(AB#8004).
|
|
85
85
|
*
|
|
86
86
|
* @legacy @beta
|
|
87
87
|
*
|
|
@@ -126,7 +126,7 @@ export function hasIsolatedChannels(attributes: ReadFluidDataStoreAttributes): b
|
|
|
126
126
|
export interface IContainerRuntimeMetadata extends ICreateContainerMetadata, IGCMetadata {
|
|
127
127
|
readonly summaryFormatVersion: 1;
|
|
128
128
|
/**
|
|
129
|
-
* @deprecated
|
|
129
|
+
* @deprecated used by old (prior to 2.0 RC3) runtimes
|
|
130
130
|
*/
|
|
131
131
|
readonly message?: ISummaryMetadataMessage;
|
|
132
132
|
/**
|