@fluidframework/runtime-definitions 2.53.0 → 2.60.0
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/CHANGELOG.md +4 -0
- package/api-report/{runtime-definitions.legacy.alpha.api.md → runtime-definitions.legacy.beta.api.md} +57 -57
- package/dist/attribution.d.ts +5 -10
- package/dist/attribution.d.ts.map +1 -1
- package/dist/attribution.js.map +1 -1
- package/dist/compatibilityDefinitions.d.ts +1 -2
- package/dist/compatibilityDefinitions.d.ts.map +1 -1
- package/dist/compatibilityDefinitions.js.map +1 -1
- package/dist/dataStoreContext.d.ts +17 -34
- package/dist/dataStoreContext.d.ts.map +1 -1
- package/dist/dataStoreContext.js +2 -4
- package/dist/dataStoreContext.js.map +1 -1
- package/dist/dataStoreFactory.d.ts +3 -6
- package/dist/dataStoreFactory.d.ts.map +1 -1
- package/dist/dataStoreFactory.js +1 -2
- package/dist/dataStoreFactory.js.map +1 -1
- package/dist/dataStoreRegistry.d.ts +7 -14
- package/dist/dataStoreRegistry.d.ts.map +1 -1
- package/dist/dataStoreRegistry.js +1 -2
- package/dist/dataStoreRegistry.js.map +1 -1
- package/dist/garbageCollectionDefinitions.d.ts +2 -4
- package/dist/garbageCollectionDefinitions.d.ts.map +1 -1
- package/dist/garbageCollectionDefinitions.js.map +1 -1
- package/dist/protocol.d.ts +8 -16
- package/dist/protocol.d.ts.map +1 -1
- package/dist/protocol.js.map +1 -1
- package/dist/summary.d.ts +13 -26
- package/dist/summary.d.ts.map +1 -1
- package/dist/summary.js +1 -2
- package/dist/summary.js.map +1 -1
- package/lib/attribution.d.ts +5 -10
- package/lib/attribution.d.ts.map +1 -1
- package/lib/attribution.js.map +1 -1
- package/lib/compatibilityDefinitions.d.ts +1 -2
- package/lib/compatibilityDefinitions.d.ts.map +1 -1
- package/lib/compatibilityDefinitions.js.map +1 -1
- package/lib/dataStoreContext.d.ts +17 -34
- package/lib/dataStoreContext.d.ts.map +1 -1
- package/lib/dataStoreContext.js +2 -4
- package/lib/dataStoreContext.js.map +1 -1
- package/lib/dataStoreFactory.d.ts +3 -6
- package/lib/dataStoreFactory.d.ts.map +1 -1
- package/lib/dataStoreFactory.js +1 -2
- package/lib/dataStoreFactory.js.map +1 -1
- package/lib/dataStoreRegistry.d.ts +7 -14
- package/lib/dataStoreRegistry.d.ts.map +1 -1
- package/lib/dataStoreRegistry.js +1 -2
- package/lib/dataStoreRegistry.js.map +1 -1
- package/lib/garbageCollectionDefinitions.d.ts +2 -4
- package/lib/garbageCollectionDefinitions.d.ts.map +1 -1
- package/lib/garbageCollectionDefinitions.js.map +1 -1
- package/lib/protocol.d.ts +8 -16
- package/lib/protocol.d.ts.map +1 -1
- package/lib/protocol.js.map +1 -1
- package/lib/summary.d.ts +13 -26
- package/lib/summary.d.ts.map +1 -1
- package/lib/summary.js +1 -2
- package/lib/summary.js.map +1 -1
- package/package.json +8 -8
- package/src/attribution.ts +5 -10
- package/src/compatibilityDefinitions.ts +1 -2
- package/src/dataStoreContext.ts +17 -34
- package/src/dataStoreFactory.ts +3 -6
- package/src/dataStoreRegistry.ts +7 -14
- package/src/garbageCollectionDefinitions.ts +2 -4
- package/src/protocol.ts +8 -16
- package/src/summary.ts +13 -26
package/lib/summary.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"summary.d.ts","sourceRoot":"","sources":["../src/summary.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,iCAAiC,CAAC;AACtF,OAAO,KAAK,EACX,aAAa,EACb,YAAY,EACZ,KAAK,EACL,WAAW,EACX,yBAAyB,EACzB,MAAM,6CAA6C,CAAC;AACrD,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,0CAA0C,CAAC;AAE9F,OAAO,KAAK,EACX,sBAAsB,EACtB,6BAA6B,EAC7B,MAAM,mCAAmC,CAAC;AAE3C
|
|
1
|
+
{"version":3,"file":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,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,6BAA6B,GAAG,IAAI,CAAC;IAElF;;;;;OAKG;IACH,WAAW,CACV,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,6BAA6B,CAAC,GACnD,IAAI,CAAC;CACR;AAED;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IACjC;;;;;OAKG;IACH,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,8BAA8B,GAAG,IAAI,CAAC;IAEnF;;;;;OAKG;IACH,WAAW,CACV,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,8BAA8B,CAAC,GACpD,IAAI,CAAC;CACR;AAED;;GAEG;AACH,eAAO,MAAM,qBAAqB,cAAc,CAAC;AAEjD;;GAEG;AACH,eAAO,MAAM,yBAAyB,kBAAkB,CAAC"}
|
package/lib/summary.js
CHANGED
package/lib/summary.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"summary.js","sourceRoot":"","sources":["../src/summary.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAsJH;;;GAGG;AACH,MAAM,CAAN,IAAY,0BAIX;AAJD,WAAY,0BAA0B;IACrC,yFAAW,CAAA;IACX,uFAAU,CAAA;IACV,6EAAK,CAAA;AACN,CAAC,EAJW,0BAA0B,KAA1B,0BAA0B,QAIrC;AA4KD;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,WAAW,CAAC;AAyD5C;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,WAAW,CAAC;AAEjD;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,eAAe,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { TelemetryBaseEventPropertyType } from \"@fluidframework/core-interfaces\";\nimport type {\n\tISnapshotTree,\n\tISummaryTree,\n\tITree,\n\tSummaryTree,\n\tISequencedDocumentMessage,\n} from \"@fluidframework/driver-definitions/internal\";\nimport type { TelemetryEventPropertyTypeExt } from \"@fluidframework/telemetry-utils/internal\";\n\nimport type {\n\tIGarbageCollectionData,\n\tIGarbageCollectionDetailsBase,\n} from \"./garbageCollectionDefinitions.js\";\n\n/**\n * Contains the aggregation data from a Tree/Subtree.\n * @legacy\n * @alpha\n */\nexport interface ISummaryStats {\n\ttreeNodeCount: number;\n\tblobNodeCount: number;\n\thandleNodeCount: number;\n\ttotalBlobSize: number;\n\tunreferencedBlobSize: number;\n}\n\n/**\n * Represents the summary tree for a node along with the statistics for that tree.\n * For example, for a given data store, it contains the data for data store along with a subtree for\n * each of its DDS.\n * Any component that implements IChannelContext, IFluidDataStoreChannel or extends SharedObject\n * will be taking part of the summarization process.\n * @legacy\n * @alpha\n */\nexport interface ISummaryTreeWithStats {\n\t/**\n\t * Represents an aggregation of node counts and blob sizes associated to the current summary information\n\t */\n\tstats: ISummaryStats;\n\t/**\n\t * A recursive data structure that will be converted to a snapshot tree and uploaded\n\t * to the backend.\n\t */\n\tsummary: ISummaryTree;\n}\n\n/**\n * Represents a summary at a current sequence number.\n * @legacy\n * @alpha\n */\nexport interface ISummarizeResult {\n\tstats: ISummaryStats;\n\tsummary: SummaryTree;\n}\n\n/**\n * Contains the same data as ISummaryResult but in order to avoid naming collisions,\n * the data store summaries are wrapped around an array of labels identified by pathPartsForChildren.\n *\n * @example\n *\n * ```typescript\n * id:\"\"\n * pathPartsForChildren: [\"path1\"]\n * stats: ...\n * summary:\n * ...\n * \"path1\":\n * ```\n * @legacy\n * @alpha\n */\nexport interface ISummarizeInternalResult extends ISummarizeResult {\n\tid: string;\n\t/**\n\t * Additional path parts between this node's ID and its children's IDs.\n\t */\n\tpathPartsForChildren?: string[];\n}\n\n/**\n * @experimental - Can be deleted/changed at any time\n * Contains the necessary information to allow DDSes to do incremental summaries\n * @legacy\n * @alpha\n */\nexport interface IExperimentalIncrementalSummaryContext {\n\t/**\n\t * The sequence number of the summary generated that will be sent to the server.\n\t */\n\treadonly summarySequenceNumber: number;\n\t/**\n\t * The sequence number of the most recent summary that was acknowledged by the server.\n\t */\n\treadonly latestSummarySequenceNumber: number;\n\t/**\n\t * The path to the runtime/datastore/dds that is used to generate summary handles\n\t * Note: Summary handles are nodes of the summary tree that point to previous parts of the last successful summary\n\t * instead of being a blob or tree node\n\t *\n\t * This path contains the id of the data store and dds which should not be leaked to layers below them. Ideally,\n\t * a layer should not know its own id. This is important for channel unification work and there has been a lot of\n\t * work to remove these kinds of leakages. Some still exist, which have to be fixed but we should not be adding\n\t * more dependencies.\n\t */\n\t// TODO: remove summaryPath\n\treadonly summaryPath: string;\n}\n\n/**\n * @legacy\n * @alpha\n */\nexport type SummarizeInternalFn = (\n\tfullTree: boolean,\n\ttrackState: boolean,\n\ttelemetryContext?: ITelemetryContext,\n\tincrementalSummaryContext?: IExperimentalIncrementalSummaryContext,\n) => Promise<ISummarizeInternalResult>;\n\n/**\n * @legacy\n * @alpha\n */\nexport interface ISummarizerNodeConfig {\n\t/**\n\t * True to reuse previous handle when unchanged since last acked summary.\n\t * Defaults to true.\n\t */\n\treadonly canReuseHandle?: boolean;\n}\n\n/**\n * @legacy\n * @alpha\n */\nexport interface ISummarizerNodeConfigWithGC extends ISummarizerNodeConfig {\n\t/**\n\t * True if GC is disabled. If so, don't track GC related state for a summary.\n\t * This is propagated to all child nodes.\n\t */\n\treadonly gcDisabled?: boolean;\n}\n\n/**\n * @legacy\n * @alpha\n */\nexport enum CreateSummarizerNodeSource {\n\tFromSummary,\n\tFromAttach,\n\tLocal,\n}\n/**\n * @legacy\n * @alpha\n */\nexport type CreateChildSummarizerNodeParam =\n\t| {\n\t\t\ttype: CreateSummarizerNodeSource.FromSummary;\n\t }\n\t| {\n\t\t\ttype: CreateSummarizerNodeSource.FromAttach;\n\t\t\tsequenceNumber: number;\n\t\t\tsnapshot: ITree;\n\t }\n\t| {\n\t\t\ttype: CreateSummarizerNodeSource.Local;\n\t };\n\n/**\n * @legacy\n * @alpha\n */\nexport interface ISummarizerNode {\n\t/**\n\t * Latest successfully acked summary reference sequence number\n\t */\n\treadonly referenceSequenceNumber: number;\n\t/**\n\t * Marks the node as having a change with the given sequence number.\n\t * @param sequenceNumber - sequence number of change\n\t */\n\tinvalidate(sequenceNumber: number): void;\n\t/**\n\t * Calls the internal summarize function and handles internal state tracking.\n\t * @param fullTree - true to skip optimizations and always generate the full tree\n\t * @param trackState - indicates whether the summarizer node should track the state of the summary or not\n\t * @param telemetryContext - summary data passed through the layers for telemetry purposes\n\t */\n\tsummarize(\n\t\tfullTree: boolean,\n\t\ttrackState?: boolean,\n\t\ttelemetryContext?: ITelemetryContext,\n\t): Promise<ISummarizeResult>;\n\t/**\n\t * Checks if there are any additional path parts for children that need to\n\t * be loaded from the base summary. Additional path parts represent parts\n\t * of the path between this SummarizerNode and any child SummarizerNodes\n\t * that it might have. For example: if datastore \"a\" contains dds \"b\", but the\n\t * path is \"/a/.channels/b\", then the additional path part is \".channels\".\n\t * @param snapshot - the base summary to parse\n\t *\n\t * @deprecated The code now always assumes that all summary nodes have .channels\n\t * in their handle so there is no need to maintain any additional path information.\n\t */\n\tupdateBaseSummaryState(snapshot: ISnapshotTree): void;\n\t/**\n\t * Records an op representing a change to this node/subtree.\n\t * @param op - op of change to record\n\t */\n\trecordChange(op: ISequencedDocumentMessage): void;\n\n\tcreateChild(\n\t\t/**\n\t\t * Summarize function\n\t\t */\n\t\tsummarizeInternalFn: SummarizeInternalFn,\n\t\t/**\n\t\t * Initial id or path part of this node\n\t\t */\n\t\tid: string,\n\t\t/**\n\t\t * Information needed to create the node.\n\t\t * If it is from a base summary, it will assert that a summary has been seen.\n\t\t * Attach information if it is created from an attach op.\n\t\t * If it is local, it will throw unsupported errors on calls to summarize.\n\t\t */\n\t\tcreateParam: CreateChildSummarizerNodeParam,\n\t\t/**\n\t\t * Optional configuration affecting summarize behavior\n\t\t */\n\t\tconfig?: ISummarizerNodeConfig,\n\t): ISummarizerNode;\n\n\tgetChild(id: string): ISummarizerNode | undefined;\n\n\t/**\n\t * True if a summary is currently in progress\n\t */\n\tisSummaryInProgress?(): boolean;\n}\n\n/**\n * Extends the functionality of ISummarizerNode to support garbage collection. It adds / updates the following APIs:\n *\n * `usedRoutes`: The routes in this node that are currently in use.\n *\n * `getGCData`: A new API that can be used to get the garbage collection data for this node.\n *\n * `summarize`: Added a trackState flag which indicates whether the summarizer node should track the state of the\n * summary or not.\n *\n * `createChild`: Added the following params:\n *\n * - `getGCDataFn`: This gets the GC data from the caller. This must be provided in order for getGCData to work.\n *\n * - `getInitialGCDetailsFn`: This gets the initial GC details from the caller.\n *\n * `deleteChild`: Deletes a child node.\n *\n * `isReferenced`: This tells whether this node is referenced in the document or not.\n *\n * `updateUsedRoutes`: Used to notify this node of routes that are currently in use in it.\n * @legacy\n * @alpha\n */\nexport interface ISummarizerNodeWithGC extends ISummarizerNode {\n\tcreateChild(\n\t\t/**\n\t\t * Summarize function\n\t\t */\n\t\tsummarizeInternalFn: SummarizeInternalFn,\n\t\t/**\n\t\t * Initial id or path part of this node\n\t\t */\n\t\tid: string,\n\t\t/**\n\t\t * Information needed to create the node.\n\t\t * If it is from a base summary, it will assert that a summary has been seen.\n\t\t * Attach information if it is created from an attach op.\n\t\t * If it is local, it will throw unsupported errors on calls to summarize.\n\t\t */\n\t\tcreateParam: CreateChildSummarizerNodeParam,\n\t\t/**\n\t\t * Optional configuration affecting summarize behavior\n\t\t */\n\t\tconfig?: ISummarizerNodeConfigWithGC,\n\t\tgetGCDataFn?: (fullGC?: boolean) => Promise<IGarbageCollectionData>,\n\t\t/**\n\t\t * @deprecated The functionality to update child's base GC details is incorporated in the summarizer node.\n\t\t */\n\t\tgetBaseGCDetailsFn?: () => Promise<IGarbageCollectionDetailsBase>,\n\t): ISummarizerNodeWithGC;\n\n\t/**\n\t * Delete the child with the given id..\n\t */\n\tdeleteChild(id: string): void;\n\n\tgetChild(id: string): ISummarizerNodeWithGC | undefined;\n\n\t/**\n\t * Returns this node's data that is used for garbage collection. This includes a list of GC nodes that represent\n\t * this node. Each node has a set of outbound routes to other GC nodes in the document.\n\t * @param fullGC - true to bypass optimizations and force full generation of GC data.\n\t */\n\tgetGCData(fullGC?: boolean): Promise<IGarbageCollectionData>;\n\n\t/**\n\t * Tells whether this node is being referenced in this document or not. Unreferenced node will get GC'd\n\t */\n\tisReferenced(): boolean;\n\n\t/**\n\t * After GC has run, called to notify this node of routes that are used in it. These are used for the following:\n\t * 1. To identify if this node is being referenced in the document or not.\n\t * 2. To identify if this node or any of its children's used routes changed since last summary.\n\t *\n\t * @param usedRoutes - The routes that are used in this node.\n\t */\n\tupdateUsedRoutes(usedRoutes: string[]): void;\n}\n\n/**\n * @internal\n */\nexport const channelsTreeName = \".channels\";\n\n/**\n * Contains telemetry data relevant to summarization workflows.\n * This object, in contrast to ITelemetryContext, is expected to be modified directly by various summarize methods.\n * @internal\n */\nexport interface ITelemetryContextExt {\n\t/**\n\t * Sets value for telemetry data being tracked.\n\t * @param prefix - unique prefix to tag this data with (ex: \"fluid:map:\")\n\t * @param property - property name of the telemetry data being tracked (ex: \"DirectoryCount\")\n\t * @param value - value to attribute to this summary telemetry data\n\t */\n\tset(prefix: string, property: string, value: TelemetryEventPropertyTypeExt): void;\n\n\t/**\n\t * Sets multiple values for telemetry data being tracked.\n\t * @param prefix - unique prefix to tag this data with (ex: \"fluid:summarize:\")\n\t * @param property - property name of the telemetry data being tracked (ex: \"Options\")\n\t * @param values - A set of values to attribute to this summary telemetry data.\n\t */\n\tsetMultiple(\n\t\tprefix: string,\n\t\tproperty: string,\n\t\tvalues: Record<string, TelemetryEventPropertyTypeExt>,\n\t): void;\n}\n\n/**\n * Contains telemetry data relevant to summarization workflows.\n * This object is expected to be modified directly by various summarize methods.\n * @legacy\n * @alpha\n */\nexport interface ITelemetryContext {\n\t/**\n\t * Sets value for telemetry data being tracked.\n\t * @param prefix - unique prefix to tag this data with (ex: \"fluid:map:\")\n\t * @param property - property name of the telemetry data being tracked (ex: \"DirectoryCount\")\n\t * @param value - value to attribute to this summary telemetry data\n\t */\n\tset(prefix: string, property: string, value: TelemetryBaseEventPropertyType): void;\n\n\t/**\n\t * Sets multiple values for telemetry data being tracked.\n\t * @param prefix - unique prefix to tag this data with (ex: \"fluid:summarize:\")\n\t * @param property - property name of the telemetry data being tracked (ex: \"Options\")\n\t * @param values - A set of values to attribute to this summary telemetry data.\n\t */\n\tsetMultiple(\n\t\tprefix: string,\n\t\tproperty: string,\n\t\tvalues: Record<string, TelemetryBaseEventPropertyType>,\n\t): void;\n}\n\n/**\n * @internal\n */\nexport const blobCountPropertyName = \"BlobCount\";\n\n/**\n * @internal\n */\nexport const totalBlobSizePropertyName = \"TotalBlobSize\";\n"]}
|
|
1
|
+
{"version":3,"file":"summary.js","sourceRoot":"","sources":["../src/summary.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA8IH;;GAEG;AACH,MAAM,CAAN,IAAY,0BAIX;AAJD,WAAY,0BAA0B;IACrC,yFAAW,CAAA;IACX,uFAAU,CAAA;IACV,6EAAK,CAAA;AACN,CAAC,EAJW,0BAA0B,KAA1B,0BAA0B,QAIrC;AAyKD;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,WAAW,CAAC;AAwD5C;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,WAAW,CAAC;AAEjD;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,eAAe,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { TelemetryBaseEventPropertyType } from \"@fluidframework/core-interfaces\";\nimport type {\n\tISnapshotTree,\n\tISummaryTree,\n\tITree,\n\tSummaryTree,\n\tISequencedDocumentMessage,\n} from \"@fluidframework/driver-definitions/internal\";\nimport type { TelemetryEventPropertyTypeExt } from \"@fluidframework/telemetry-utils/internal\";\n\nimport type {\n\tIGarbageCollectionData,\n\tIGarbageCollectionDetailsBase,\n} from \"./garbageCollectionDefinitions.js\";\n\n/**\n * Contains the aggregation data from a Tree/Subtree.\n * @legacy @beta\n */\nexport interface ISummaryStats {\n\ttreeNodeCount: number;\n\tblobNodeCount: number;\n\thandleNodeCount: number;\n\ttotalBlobSize: number;\n\tunreferencedBlobSize: number;\n}\n\n/**\n * Represents the summary tree for a node along with the statistics for that tree.\n * For example, for a given data store, it contains the data for data store along with a subtree for\n * each of its DDS.\n * Any component that implements IChannelContext, IFluidDataStoreChannel or extends SharedObject\n * will be taking part of the summarization process.\n * @legacy @beta\n */\nexport interface ISummaryTreeWithStats {\n\t/**\n\t * Represents an aggregation of node counts and blob sizes associated to the current summary information\n\t */\n\tstats: ISummaryStats;\n\t/**\n\t * A recursive data structure that will be converted to a snapshot tree and uploaded\n\t * to the backend.\n\t */\n\tsummary: ISummaryTree;\n}\n\n/**\n * Represents a summary at a current sequence number.\n * @legacy @beta\n */\nexport interface ISummarizeResult {\n\tstats: ISummaryStats;\n\tsummary: SummaryTree;\n}\n\n/**\n * Contains the same data as ISummaryResult but in order to avoid naming collisions,\n * the data store summaries are wrapped around an array of labels identified by pathPartsForChildren.\n *\n * @example\n *\n * ```typescript\n * id:\"\"\n * pathPartsForChildren: [\"path1\"]\n * stats: ...\n * summary:\n * ...\n * \"path1\":\n * ```\n * @legacy @beta\n */\nexport interface ISummarizeInternalResult extends ISummarizeResult {\n\tid: string;\n\t/**\n\t * Additional path parts between this node's ID and its children's IDs.\n\t */\n\tpathPartsForChildren?: string[];\n}\n\n/**\n * @experimental - Can be deleted/changed at any time\n * Contains the necessary information to allow DDSes to do incremental summaries\n * @legacy @beta\n */\nexport interface IExperimentalIncrementalSummaryContext {\n\t/**\n\t * The sequence number of the summary generated that will be sent to the server.\n\t */\n\treadonly summarySequenceNumber: number;\n\t/**\n\t * The sequence number of the most recent summary that was acknowledged by the server.\n\t */\n\treadonly latestSummarySequenceNumber: number;\n\t/**\n\t * The path to the runtime/datastore/dds that is used to generate summary handles\n\t * Note: Summary handles are nodes of the summary tree that point to previous parts of the last successful summary\n\t * instead of being a blob or tree node\n\t *\n\t * This path contains the id of the data store and dds which should not be leaked to layers below them. Ideally,\n\t * a layer should not know its own id. This is important for channel unification work and there has been a lot of\n\t * work to remove these kinds of leakages. Some still exist, which have to be fixed but we should not be adding\n\t * more dependencies.\n\t */\n\t// TODO: remove summaryPath\n\treadonly summaryPath: string;\n}\n\n/**\n * @legacy @beta\n */\nexport type SummarizeInternalFn = (\n\tfullTree: boolean,\n\ttrackState: boolean,\n\ttelemetryContext?: ITelemetryContext,\n\tincrementalSummaryContext?: IExperimentalIncrementalSummaryContext,\n) => Promise<ISummarizeInternalResult>;\n\n/**\n * @legacy @beta\n */\nexport interface ISummarizerNodeConfig {\n\t/**\n\t * True to reuse previous handle when unchanged since last acked summary.\n\t * Defaults to true.\n\t */\n\treadonly canReuseHandle?: boolean;\n}\n\n/**\n * @legacy @beta\n */\nexport interface ISummarizerNodeConfigWithGC extends ISummarizerNodeConfig {\n\t/**\n\t * True if GC is disabled. If so, don't track GC related state for a summary.\n\t * This is propagated to all child nodes.\n\t */\n\treadonly gcDisabled?: boolean;\n}\n\n/**\n * @legacy @beta\n */\nexport enum CreateSummarizerNodeSource {\n\tFromSummary,\n\tFromAttach,\n\tLocal,\n}\n/**\n * @legacy @beta\n */\nexport type CreateChildSummarizerNodeParam =\n\t| {\n\t\t\ttype: CreateSummarizerNodeSource.FromSummary;\n\t }\n\t| {\n\t\t\ttype: CreateSummarizerNodeSource.FromAttach;\n\t\t\tsequenceNumber: number;\n\t\t\tsnapshot: ITree;\n\t }\n\t| {\n\t\t\ttype: CreateSummarizerNodeSource.Local;\n\t };\n\n/**\n * @legacy @beta\n */\nexport interface ISummarizerNode {\n\t/**\n\t * Latest successfully acked summary reference sequence number\n\t */\n\treadonly referenceSequenceNumber: number;\n\t/**\n\t * Marks the node as having a change with the given sequence number.\n\t * @param sequenceNumber - sequence number of change\n\t */\n\tinvalidate(sequenceNumber: number): void;\n\t/**\n\t * Calls the internal summarize function and handles internal state tracking.\n\t * @param fullTree - true to skip optimizations and always generate the full tree\n\t * @param trackState - indicates whether the summarizer node should track the state of the summary or not\n\t * @param telemetryContext - summary data passed through the layers for telemetry purposes\n\t */\n\tsummarize(\n\t\tfullTree: boolean,\n\t\ttrackState?: boolean,\n\t\ttelemetryContext?: ITelemetryContext,\n\t): Promise<ISummarizeResult>;\n\t/**\n\t * Checks if there are any additional path parts for children that need to\n\t * be loaded from the base summary. Additional path parts represent parts\n\t * of the path between this SummarizerNode and any child SummarizerNodes\n\t * that it might have. For example: if datastore \"a\" contains dds \"b\", but the\n\t * path is \"/a/.channels/b\", then the additional path part is \".channels\".\n\t * @param snapshot - the base summary to parse\n\t *\n\t * @deprecated The code now always assumes that all summary nodes have .channels\n\t * in their handle so there is no need to maintain any additional path information.\n\t */\n\tupdateBaseSummaryState(snapshot: ISnapshotTree): void;\n\t/**\n\t * Records an op representing a change to this node/subtree.\n\t * @param op - op of change to record\n\t */\n\trecordChange(op: ISequencedDocumentMessage): void;\n\n\tcreateChild(\n\t\t/**\n\t\t * Summarize function\n\t\t */\n\t\tsummarizeInternalFn: SummarizeInternalFn,\n\t\t/**\n\t\t * Initial id or path part of this node\n\t\t */\n\t\tid: string,\n\t\t/**\n\t\t * Information needed to create the node.\n\t\t * If it is from a base summary, it will assert that a summary has been seen.\n\t\t * Attach information if it is created from an attach op.\n\t\t * If it is local, it will throw unsupported errors on calls to summarize.\n\t\t */\n\t\tcreateParam: CreateChildSummarizerNodeParam,\n\t\t/**\n\t\t * Optional configuration affecting summarize behavior\n\t\t */\n\t\tconfig?: ISummarizerNodeConfig,\n\t): ISummarizerNode;\n\n\tgetChild(id: string): ISummarizerNode | undefined;\n\n\t/**\n\t * True if a summary is currently in progress\n\t */\n\tisSummaryInProgress?(): boolean;\n}\n\n/**\n * Extends the functionality of ISummarizerNode to support garbage collection. It adds / updates the following APIs:\n *\n * `usedRoutes`: The routes in this node that are currently in use.\n *\n * `getGCData`: A new API that can be used to get the garbage collection data for this node.\n *\n * `summarize`: Added a trackState flag which indicates whether the summarizer node should track the state of the\n * summary or not.\n *\n * `createChild`: Added the following params:\n *\n * - `getGCDataFn`: This gets the GC data from the caller. This must be provided in order for getGCData to work.\n *\n * - `getInitialGCDetailsFn`: This gets the initial GC details from the caller.\n *\n * `deleteChild`: Deletes a child node.\n *\n * `isReferenced`: This tells whether this node is referenced in the document or not.\n *\n * `updateUsedRoutes`: Used to notify this node of routes that are currently in use in it.\n * @legacy @beta\n */\nexport interface ISummarizerNodeWithGC extends ISummarizerNode {\n\tcreateChild(\n\t\t/**\n\t\t * Summarize function\n\t\t */\n\t\tsummarizeInternalFn: SummarizeInternalFn,\n\t\t/**\n\t\t * Initial id or path part of this node\n\t\t */\n\t\tid: string,\n\t\t/**\n\t\t * Information needed to create the node.\n\t\t * If it is from a base summary, it will assert that a summary has been seen.\n\t\t * Attach information if it is created from an attach op.\n\t\t * If it is local, it will throw unsupported errors on calls to summarize.\n\t\t */\n\t\tcreateParam: CreateChildSummarizerNodeParam,\n\t\t/**\n\t\t * Optional configuration affecting summarize behavior\n\t\t */\n\t\tconfig?: ISummarizerNodeConfigWithGC,\n\t\tgetGCDataFn?: (fullGC?: boolean) => Promise<IGarbageCollectionData>,\n\t\t/**\n\t\t * @deprecated The functionality to update child's base GC details is incorporated in the summarizer node.\n\t\t */\n\t\tgetBaseGCDetailsFn?: () => Promise<IGarbageCollectionDetailsBase>,\n\t): ISummarizerNodeWithGC;\n\n\t/**\n\t * Delete the child with the given id..\n\t */\n\tdeleteChild(id: string): void;\n\n\tgetChild(id: string): ISummarizerNodeWithGC | undefined;\n\n\t/**\n\t * Returns this node's data that is used for garbage collection. This includes a list of GC nodes that represent\n\t * this node. Each node has a set of outbound routes to other GC nodes in the document.\n\t * @param fullGC - true to bypass optimizations and force full generation of GC data.\n\t */\n\tgetGCData(fullGC?: boolean): Promise<IGarbageCollectionData>;\n\n\t/**\n\t * Tells whether this node is being referenced in this document or not. Unreferenced node will get GC'd\n\t */\n\tisReferenced(): boolean;\n\n\t/**\n\t * After GC has run, called to notify this node of routes that are used in it. These are used for the following:\n\t * 1. To identify if this node is being referenced in the document or not.\n\t * 2. To identify if this node or any of its children's used routes changed since last summary.\n\t *\n\t * @param usedRoutes - The routes that are used in this node.\n\t */\n\tupdateUsedRoutes(usedRoutes: string[]): void;\n}\n\n/**\n * @internal\n */\nexport const channelsTreeName = \".channels\";\n\n/**\n * Contains telemetry data relevant to summarization workflows.\n * This object, in contrast to ITelemetryContext, is expected to be modified directly by various summarize methods.\n * @internal\n */\nexport interface ITelemetryContextExt {\n\t/**\n\t * Sets value for telemetry data being tracked.\n\t * @param prefix - unique prefix to tag this data with (ex: \"fluid:map:\")\n\t * @param property - property name of the telemetry data being tracked (ex: \"DirectoryCount\")\n\t * @param value - value to attribute to this summary telemetry data\n\t */\n\tset(prefix: string, property: string, value: TelemetryEventPropertyTypeExt): void;\n\n\t/**\n\t * Sets multiple values for telemetry data being tracked.\n\t * @param prefix - unique prefix to tag this data with (ex: \"fluid:summarize:\")\n\t * @param property - property name of the telemetry data being tracked (ex: \"Options\")\n\t * @param values - A set of values to attribute to this summary telemetry data.\n\t */\n\tsetMultiple(\n\t\tprefix: string,\n\t\tproperty: string,\n\t\tvalues: Record<string, TelemetryEventPropertyTypeExt>,\n\t): void;\n}\n\n/**\n * Contains telemetry data relevant to summarization workflows.\n * This object is expected to be modified directly by various summarize methods.\n * @legacy @beta\n */\nexport interface ITelemetryContext {\n\t/**\n\t * Sets value for telemetry data being tracked.\n\t * @param prefix - unique prefix to tag this data with (ex: \"fluid:map:\")\n\t * @param property - property name of the telemetry data being tracked (ex: \"DirectoryCount\")\n\t * @param value - value to attribute to this summary telemetry data\n\t */\n\tset(prefix: string, property: string, value: TelemetryBaseEventPropertyType): void;\n\n\t/**\n\t * Sets multiple values for telemetry data being tracked.\n\t * @param prefix - unique prefix to tag this data with (ex: \"fluid:summarize:\")\n\t * @param property - property name of the telemetry data being tracked (ex: \"Options\")\n\t * @param values - A set of values to attribute to this summary telemetry data.\n\t */\n\tsetMultiple(\n\t\tprefix: string,\n\t\tproperty: string,\n\t\tvalues: Record<string, TelemetryBaseEventPropertyType>,\n\t): void;\n}\n\n/**\n * @internal\n */\nexport const blobCountPropertyName = \"BlobCount\";\n\n/**\n * @internal\n */\nexport const totalBlobSizePropertyName = \"TotalBlobSize\";\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/runtime-definitions",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.60.0",
|
|
4
4
|
"description": "Fluid Runtime definitions",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -47,11 +47,11 @@
|
|
|
47
47
|
"main": "lib/index.js",
|
|
48
48
|
"types": "lib/public.d.ts",
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@fluidframework/container-definitions": "~2.
|
|
51
|
-
"@fluidframework/core-interfaces": "~2.
|
|
52
|
-
"@fluidframework/driver-definitions": "~2.
|
|
53
|
-
"@fluidframework/id-compressor": "~2.
|
|
54
|
-
"@fluidframework/telemetry-utils": "~2.
|
|
50
|
+
"@fluidframework/container-definitions": "~2.60.0",
|
|
51
|
+
"@fluidframework/core-interfaces": "~2.60.0",
|
|
52
|
+
"@fluidframework/driver-definitions": "~2.60.0",
|
|
53
|
+
"@fluidframework/id-compressor": "~2.60.0",
|
|
54
|
+
"@fluidframework/telemetry-utils": "~2.60.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@arethetypeswrong/cli": "^0.17.1",
|
|
@@ -59,8 +59,8 @@
|
|
|
59
59
|
"@fluid-tools/build-cli": "^0.57.0",
|
|
60
60
|
"@fluidframework/build-common": "^2.0.3",
|
|
61
61
|
"@fluidframework/build-tools": "^0.57.0",
|
|
62
|
-
"@fluidframework/eslint-config-fluid": "^
|
|
63
|
-
"@fluidframework/runtime-definitions-previous": "npm:@fluidframework/runtime-definitions@2.
|
|
62
|
+
"@fluidframework/eslint-config-fluid": "^6.0.0",
|
|
63
|
+
"@fluidframework/runtime-definitions-previous": "npm:@fluidframework/runtime-definitions@2.53.0",
|
|
64
64
|
"@microsoft/api-extractor": "7.52.8",
|
|
65
65
|
"concurrently": "^8.2.1",
|
|
66
66
|
"copyfiles": "^2.4.1",
|
package/src/attribution.ts
CHANGED
|
@@ -8,8 +8,7 @@ import type { IUser } from "@fluidframework/driver-definitions";
|
|
|
8
8
|
/**
|
|
9
9
|
* AttributionKey representing a reference to some op in the op stream.
|
|
10
10
|
* Content associated with this key aligns with content modified by that op.
|
|
11
|
-
* @legacy
|
|
12
|
-
* @alpha
|
|
11
|
+
* @legacy @beta
|
|
13
12
|
*/
|
|
14
13
|
export interface OpAttributionKey {
|
|
15
14
|
/**
|
|
@@ -33,8 +32,7 @@ export interface OpAttributionKey {
|
|
|
33
32
|
* is currently unsupported, as applications can effectively modify content anonymously while detached.
|
|
34
33
|
* The runtime has no mechanism for reliably obtaining the user. It would be reasonable to start supporting
|
|
35
34
|
* this functionality if the host provided additional context to their attributor or attach calls.
|
|
36
|
-
* @legacy
|
|
37
|
-
* @alpha
|
|
35
|
+
* @legacy @beta
|
|
38
36
|
*/
|
|
39
37
|
export interface DetachedAttributionKey {
|
|
40
38
|
type: "detached";
|
|
@@ -52,8 +50,7 @@ export interface DetachedAttributionKey {
|
|
|
52
50
|
|
|
53
51
|
/**
|
|
54
52
|
* AttributionKey associated with content that has been made locally but not yet acked by the server.
|
|
55
|
-
* @legacy
|
|
56
|
-
* @alpha
|
|
53
|
+
* @legacy @beta
|
|
57
54
|
*/
|
|
58
55
|
export interface LocalAttributionKey {
|
|
59
56
|
type: "local";
|
|
@@ -61,15 +58,13 @@ export interface LocalAttributionKey {
|
|
|
61
58
|
|
|
62
59
|
/**
|
|
63
60
|
* Can be indexed into the ContainerRuntime in order to retrieve {@link AttributionInfo}.
|
|
64
|
-
* @legacy
|
|
65
|
-
* @alpha
|
|
61
|
+
* @legacy @beta
|
|
66
62
|
*/
|
|
67
63
|
export type AttributionKey = OpAttributionKey | DetachedAttributionKey | LocalAttributionKey;
|
|
68
64
|
|
|
69
65
|
/**
|
|
70
66
|
* Attribution information associated with a change.
|
|
71
|
-
* @legacy
|
|
72
|
-
* @alpha
|
|
67
|
+
* @legacy @beta
|
|
73
68
|
*/
|
|
74
69
|
export interface AttributionInfo {
|
|
75
70
|
/**
|
package/src/dataStoreContext.ts
CHANGED
|
@@ -51,8 +51,7 @@ import type {
|
|
|
51
51
|
|
|
52
52
|
/**
|
|
53
53
|
* Runtime flush mode handling
|
|
54
|
-
* @legacy
|
|
55
|
-
* @alpha
|
|
54
|
+
* @legacy @beta
|
|
56
55
|
*/
|
|
57
56
|
export enum FlushMode {
|
|
58
57
|
/**
|
|
@@ -89,8 +88,7 @@ export enum FlushModeExperimental {
|
|
|
89
88
|
/**
|
|
90
89
|
* This tells the visibility state of a Fluid object. It basically tracks whether the object is not visible, visible
|
|
91
90
|
* locally within the container only or visible globally to all clients.
|
|
92
|
-
* @legacy
|
|
93
|
-
* @alpha
|
|
91
|
+
* @legacy @beta
|
|
94
92
|
*/
|
|
95
93
|
export const VisibilityState = {
|
|
96
94
|
/**
|
|
@@ -117,14 +115,12 @@ export const VisibilityState = {
|
|
|
117
115
|
GloballyVisible: "GloballyVisible",
|
|
118
116
|
};
|
|
119
117
|
/**
|
|
120
|
-
* @legacy
|
|
121
|
-
* @alpha
|
|
118
|
+
* @legacy @beta
|
|
122
119
|
*/
|
|
123
120
|
export type VisibilityState = (typeof VisibilityState)[keyof typeof VisibilityState];
|
|
124
121
|
|
|
125
122
|
/**
|
|
126
|
-
* @legacy
|
|
127
|
-
* @alpha
|
|
123
|
+
* @legacy @beta
|
|
128
124
|
* @sealed
|
|
129
125
|
*/
|
|
130
126
|
export interface IContainerRuntimeBaseEvents extends IEvent {
|
|
@@ -162,8 +158,7 @@ export interface IContainerRuntimeBaseEvents extends IEvent {
|
|
|
162
158
|
* and will be garbage collected. The current datastore cannot be aliased to a different value.
|
|
163
159
|
*
|
|
164
160
|
* 'AlreadyAliased' - the datastore has already been previously bound to another alias name.
|
|
165
|
-
* @legacy
|
|
166
|
-
* @alpha
|
|
161
|
+
* @legacy @beta
|
|
167
162
|
*/
|
|
168
163
|
export type AliasResult = "Success" | "Conflict" | "AlreadyAliased";
|
|
169
164
|
|
|
@@ -179,8 +174,7 @@ export type AliasResult = "Success" | "Conflict" | "AlreadyAliased";
|
|
|
179
174
|
* @privateRemarks
|
|
180
175
|
* TODO: These docs should define what a "data store" is, and not do so by just referencing "data store".
|
|
181
176
|
*
|
|
182
|
-
* @legacy
|
|
183
|
-
* @alpha
|
|
177
|
+
* @legacy @beta
|
|
184
178
|
*/
|
|
185
179
|
export interface IDataStore {
|
|
186
180
|
/**
|
|
@@ -204,8 +198,7 @@ export interface IDataStore {
|
|
|
204
198
|
* A reduced set of functionality of {@link @fluidframework/container-runtime-definitions#IContainerRuntime} that a data store context/data store runtime will need.
|
|
205
199
|
* @privateRemarks
|
|
206
200
|
* TODO: this should be merged into IFluidDataStoreContext
|
|
207
|
-
* @legacy
|
|
208
|
-
* @alpha
|
|
201
|
+
* @legacy @beta
|
|
209
202
|
* @sealed
|
|
210
203
|
*/
|
|
211
204
|
export interface IContainerRuntimeBase extends IEventProvider<IContainerRuntimeBaseEvents> {
|
|
@@ -316,8 +309,7 @@ export interface IContainerRuntimeBase extends IEventProvider<IContainerRuntimeB
|
|
|
316
309
|
/**
|
|
317
310
|
* @experimental
|
|
318
311
|
* @deprecated - These APIs are unstable, and can be changed at will. They should only be used with direct agreement with the Fluid Framework.
|
|
319
|
-
* @legacy
|
|
320
|
-
* @alpha
|
|
312
|
+
* @legacy @beta
|
|
321
313
|
* @sealed
|
|
322
314
|
*/
|
|
323
315
|
export interface CommitStagedChangesOptionsExperimental {
|
|
@@ -341,8 +333,7 @@ export interface CommitStagedChangesOptionsExperimental {
|
|
|
341
333
|
/**
|
|
342
334
|
* @experimental
|
|
343
335
|
* @deprecated - These APIs are unstable, and can be changed at will. They should only be used with direct agreement with the Fluid Framework.
|
|
344
|
-
* @legacy
|
|
345
|
-
* @alpha
|
|
336
|
+
* @legacy @beta
|
|
346
337
|
* @sealed
|
|
347
338
|
*/
|
|
348
339
|
export interface StageControlsExperimental {
|
|
@@ -362,8 +353,7 @@ export interface StageControlsExperimental {
|
|
|
362
353
|
/**
|
|
363
354
|
* @experimental
|
|
364
355
|
* @deprecated - These APIs are unstable, and can be changed at will. They should only be used with direct agreement with the Fluid Framework.
|
|
365
|
-
* @legacy
|
|
366
|
-
* @alpha
|
|
356
|
+
* @legacy @beta
|
|
367
357
|
* @sealed
|
|
368
358
|
*/
|
|
369
359
|
export interface IContainerRuntimeBaseExperimental extends IContainerRuntimeBase {
|
|
@@ -377,8 +367,7 @@ export interface IContainerRuntimeBaseExperimental extends IContainerRuntimeBase
|
|
|
377
367
|
* Policies allow data store authors to define specific behaviors or constraints for their data stores.
|
|
378
368
|
* These settings can impact how the data store interacts with the runtime and other components.
|
|
379
369
|
*
|
|
380
|
-
* @legacy
|
|
381
|
-
* @alpha
|
|
370
|
+
* @legacy @beta
|
|
382
371
|
*/
|
|
383
372
|
export interface IFluidDataStorePolicies {
|
|
384
373
|
/**
|
|
@@ -396,8 +385,7 @@ export interface IFluidDataStorePolicies {
|
|
|
396
385
|
*
|
|
397
386
|
* Functionality include attach, snapshot, op/signal processing, request routes, expose an entryPoint,
|
|
398
387
|
* and connection state notifications
|
|
399
|
-
* @legacy
|
|
400
|
-
* @alpha
|
|
388
|
+
* @legacy @beta
|
|
401
389
|
*/
|
|
402
390
|
export interface IFluidDataStoreChannel extends IDisposable {
|
|
403
391
|
/**
|
|
@@ -517,8 +505,7 @@ export interface IFluidDataStoreChannel extends IDisposable {
|
|
|
517
505
|
}
|
|
518
506
|
|
|
519
507
|
/**
|
|
520
|
-
* @legacy
|
|
521
|
-
* @alpha
|
|
508
|
+
* @legacy @beta
|
|
522
509
|
*/
|
|
523
510
|
export type CreateChildSummarizerNodeFn = (
|
|
524
511
|
summarizeInternal: SummarizeInternalFn,
|
|
@@ -550,8 +537,7 @@ export interface IPendingMessagesState {
|
|
|
550
537
|
* @privateRemarks
|
|
551
538
|
* In addition to the use for datastores via IFluidDataStoreContext, this is implemented by ContainerRuntime to provide context to the ChannelCollection.
|
|
552
539
|
*
|
|
553
|
-
* @legacy
|
|
554
|
-
* @alpha
|
|
540
|
+
* @legacy @beta
|
|
555
541
|
*/
|
|
556
542
|
export interface IFluidParentContext
|
|
557
543
|
extends IProvideFluidHandleContext,
|
|
@@ -683,8 +669,7 @@ export interface IFluidParentContext
|
|
|
683
669
|
* Each string in the array is the "identifier" to pick a specific {@link NamedFluidDataStoreRegistryEntry2} within a {@link NamedFluidDataStoreRegistryEntries}.
|
|
684
670
|
*
|
|
685
671
|
* Due to some usages joining this array with "/", it is recommended to avoid using "/" in the strings.
|
|
686
|
-
* @legacy
|
|
687
|
-
* @alpha
|
|
672
|
+
* @legacy @beta
|
|
688
673
|
*/
|
|
689
674
|
export type PackagePath = readonly string[];
|
|
690
675
|
|
|
@@ -694,8 +679,7 @@ export type PackagePath = readonly string[];
|
|
|
694
679
|
* @remarks
|
|
695
680
|
* This context is provided to the implementation of {@link IFluidDataStoreChannel} which powers the datastore.
|
|
696
681
|
*
|
|
697
|
-
* @legacy
|
|
698
|
-
* @alpha
|
|
682
|
+
* @legacy @beta
|
|
699
683
|
*/
|
|
700
684
|
export interface IFluidDataStoreContext extends IFluidParentContext {
|
|
701
685
|
readonly id: string;
|
|
@@ -756,8 +740,7 @@ export interface IFluidDataStoreContext extends IFluidParentContext {
|
|
|
756
740
|
}
|
|
757
741
|
|
|
758
742
|
/**
|
|
759
|
-
* @legacy
|
|
760
|
-
* @alpha
|
|
743
|
+
* @legacy @beta
|
|
761
744
|
*/
|
|
762
745
|
export interface IFluidDataStoreContextDetached extends IFluidDataStoreContext {
|
|
763
746
|
/**
|
package/src/dataStoreFactory.ts
CHANGED
|
@@ -6,15 +6,13 @@
|
|
|
6
6
|
import type { IFluidDataStoreChannel, IFluidDataStoreContext } from "./dataStoreContext.js";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* @legacy
|
|
10
|
-
* @alpha
|
|
9
|
+
* @legacy @beta
|
|
11
10
|
*/
|
|
12
11
|
export const IFluidDataStoreFactory: keyof IProvideFluidDataStoreFactory =
|
|
13
12
|
"IFluidDataStoreFactory";
|
|
14
13
|
|
|
15
14
|
/**
|
|
16
|
-
* @legacy
|
|
17
|
-
* @alpha
|
|
15
|
+
* @legacy @beta
|
|
18
16
|
*/
|
|
19
17
|
export interface IProvideFluidDataStoreFactory {
|
|
20
18
|
readonly IFluidDataStoreFactory: IFluidDataStoreFactory;
|
|
@@ -34,8 +32,7 @@ export interface IProvideFluidDataStoreFactory {
|
|
|
34
32
|
* The factory is responsible for creating new instances of data stores and loading existing ones.
|
|
35
33
|
* The factory ensures that the data store is correctly initialized.
|
|
36
34
|
*
|
|
37
|
-
* @legacy
|
|
38
|
-
* @alpha
|
|
35
|
+
* @legacy @beta
|
|
39
36
|
*/
|
|
40
37
|
export interface IFluidDataStoreFactory extends IProvideFluidDataStoreFactory {
|
|
41
38
|
/**
|
package/src/dataStoreRegistry.ts
CHANGED
|
@@ -8,8 +8,7 @@ import type { IProvideFluidDataStoreFactory } from "./dataStoreFactory.js";
|
|
|
8
8
|
/**
|
|
9
9
|
* A single registry entry that may be used to create data stores
|
|
10
10
|
* It has to have either factory or registry, or both.
|
|
11
|
-
* @legacy
|
|
12
|
-
* @alpha
|
|
11
|
+
* @legacy @beta
|
|
13
12
|
*/
|
|
14
13
|
export type FluidDataStoreRegistryEntry = Readonly<
|
|
15
14
|
Partial<IProvideFluidDataStoreRegistry & IProvideFluidDataStoreFactory>
|
|
@@ -17,16 +16,14 @@ export type FluidDataStoreRegistryEntry = Readonly<
|
|
|
17
16
|
/**
|
|
18
17
|
* An associated pair of an identifier and registry entry.
|
|
19
18
|
* Registry entries may be dynamically loaded.
|
|
20
|
-
* @legacy
|
|
21
|
-
* @alpha
|
|
19
|
+
* @legacy @beta
|
|
22
20
|
*/
|
|
23
21
|
export type NamedFluidDataStoreRegistryEntry = [string, Promise<FluidDataStoreRegistryEntry>];
|
|
24
22
|
|
|
25
23
|
/**
|
|
26
24
|
* An associated pair of an identifier and registry entry.
|
|
27
25
|
* Registry entries may be dynamically loaded.
|
|
28
|
-
* @legacy
|
|
29
|
-
* @alpha
|
|
26
|
+
* @legacy @beta
|
|
30
27
|
*/
|
|
31
28
|
export type NamedFluidDataStoreRegistryEntry2 = [
|
|
32
29
|
string,
|
|
@@ -34,21 +31,18 @@ export type NamedFluidDataStoreRegistryEntry2 = [
|
|
|
34
31
|
];
|
|
35
32
|
/**
|
|
36
33
|
* An iterable identifier/registry entry pair list
|
|
37
|
-
* @legacy
|
|
38
|
-
* @alpha
|
|
34
|
+
* @legacy @beta
|
|
39
35
|
*/
|
|
40
36
|
export type NamedFluidDataStoreRegistryEntries = Iterable<NamedFluidDataStoreRegistryEntry2>;
|
|
41
37
|
|
|
42
38
|
/**
|
|
43
|
-
* @legacy
|
|
44
|
-
* @alpha
|
|
39
|
+
* @legacy @beta
|
|
45
40
|
*/
|
|
46
41
|
export const IFluidDataStoreRegistry: keyof IProvideFluidDataStoreRegistry =
|
|
47
42
|
"IFluidDataStoreRegistry";
|
|
48
43
|
|
|
49
44
|
/**
|
|
50
|
-
* @legacy
|
|
51
|
-
* @alpha
|
|
45
|
+
* @legacy @beta
|
|
52
46
|
*/
|
|
53
47
|
export interface IProvideFluidDataStoreRegistry {
|
|
54
48
|
readonly IFluidDataStoreRegistry: IFluidDataStoreRegistry;
|
|
@@ -57,8 +51,7 @@ export interface IProvideFluidDataStoreRegistry {
|
|
|
57
51
|
/**
|
|
58
52
|
* An association of identifiers to data store registry entries, where the
|
|
59
53
|
* entries can be used to create data stores.
|
|
60
|
-
* @legacy
|
|
61
|
-
* @alpha
|
|
54
|
+
* @legacy @beta
|
|
62
55
|
*/
|
|
63
56
|
export interface IFluidDataStoreRegistry extends IProvideFluidDataStoreRegistry {
|
|
64
57
|
/**
|
|
@@ -37,8 +37,7 @@ export const gcDataBlobKey = ".gcdata";
|
|
|
37
37
|
/**
|
|
38
38
|
* Garbage collection data returned by nodes in a Container.
|
|
39
39
|
* Used for running GC in the Container.
|
|
40
|
-
* @legacy
|
|
41
|
-
* @alpha
|
|
40
|
+
* @legacy @beta
|
|
42
41
|
*/
|
|
43
42
|
export interface IGarbageCollectionData {
|
|
44
43
|
/**
|
|
@@ -49,8 +48,7 @@ export interface IGarbageCollectionData {
|
|
|
49
48
|
|
|
50
49
|
/**
|
|
51
50
|
* GC details provided to each node during creation.
|
|
52
|
-
* @legacy
|
|
53
|
-
* @alpha
|
|
51
|
+
* @legacy @beta
|
|
54
52
|
*/
|
|
55
53
|
export interface IGarbageCollectionDetailsBase {
|
|
56
54
|
/**
|
package/src/protocol.ts
CHANGED
|
@@ -22,8 +22,7 @@ import type {
|
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* An envelope wraps the contents with the intended target
|
|
25
|
-
* @legacy
|
|
26
|
-
* @alpha
|
|
25
|
+
* @legacy @beta
|
|
27
26
|
*/
|
|
28
27
|
export interface IEnvelope {
|
|
29
28
|
/**
|
|
@@ -40,8 +39,7 @@ export interface IEnvelope {
|
|
|
40
39
|
|
|
41
40
|
/**
|
|
42
41
|
* Represents ISignalMessage with its type.
|
|
43
|
-
* @legacy
|
|
44
|
-
* @alpha
|
|
42
|
+
* @legacy @beta
|
|
45
43
|
*/
|
|
46
44
|
export interface IInboundSignalMessage<TMessage extends TypedMessage = TypedMessage>
|
|
47
45
|
extends ISignalMessage<TMessage> {
|
|
@@ -51,8 +49,7 @@ export interface IInboundSignalMessage<TMessage extends TypedMessage = TypedMess
|
|
|
51
49
|
/**
|
|
52
50
|
* Message send by client attaching local data structure.
|
|
53
51
|
* Contains snapshot of data structure which is the current state of this data structure.
|
|
54
|
-
* @legacy
|
|
55
|
-
* @alpha
|
|
52
|
+
* @legacy @beta
|
|
56
53
|
*/
|
|
57
54
|
export interface IAttachMessage {
|
|
58
55
|
/**
|
|
@@ -76,8 +73,7 @@ export interface IAttachMessage {
|
|
|
76
73
|
* but it should not be used when creating a new attach op.
|
|
77
74
|
* Older versions of attach messages could have null snapshots,
|
|
78
75
|
* so this gives correct typings for writing backward compatible code.
|
|
79
|
-
* @legacy
|
|
80
|
-
* @alpha
|
|
76
|
+
* @legacy @beta
|
|
81
77
|
*/
|
|
82
78
|
export type InboundAttachMessage = Omit<IAttachMessage, "snapshot"> & {
|
|
83
79
|
// eslint-disable-next-line @rushstack/no-new-null -- TODO: breaking change; protocol might even explicitly use null
|
|
@@ -89,8 +85,7 @@ export type InboundAttachMessage = Omit<IAttachMessage, "snapshot"> & {
|
|
|
89
85
|
* It is the same as ISequencedDocumentMessage, but without the contents and clientSequenceNumbers
|
|
90
86
|
* which are sent separately. The contents are modified at multiple layers in the stack so having it
|
|
91
87
|
* separate doesn't require packing and unpacking the entire message.
|
|
92
|
-
* @
|
|
93
|
-
* @legacy
|
|
88
|
+
* @legacy @beta
|
|
94
89
|
*/
|
|
95
90
|
export type ISequencedMessageEnvelope = Omit<
|
|
96
91
|
ISequencedDocumentMessage,
|
|
@@ -99,8 +94,7 @@ export type ISequencedMessageEnvelope = Omit<
|
|
|
99
94
|
|
|
100
95
|
/**
|
|
101
96
|
* These are the contents of a runtime message as it is processed throughout the stack.
|
|
102
|
-
* @
|
|
103
|
-
* @legacy
|
|
97
|
+
* @legacy @beta
|
|
104
98
|
* @sealed
|
|
105
99
|
*/
|
|
106
100
|
export interface IRuntimeMessagesContent {
|
|
@@ -120,8 +114,7 @@ export interface IRuntimeMessagesContent {
|
|
|
120
114
|
|
|
121
115
|
/**
|
|
122
116
|
* A collection of messages that are processed by the runtime.
|
|
123
|
-
* @
|
|
124
|
-
* @legacy
|
|
117
|
+
* @legacy @beta
|
|
125
118
|
* @sealed
|
|
126
119
|
*/
|
|
127
120
|
export interface IRuntimeMessageCollection {
|
|
@@ -142,8 +135,7 @@ export interface IRuntimeMessageCollection {
|
|
|
142
135
|
/**
|
|
143
136
|
* Interface to provide access to snapshot blobs to DataStore layer.
|
|
144
137
|
*
|
|
145
|
-
* @legacy
|
|
146
|
-
* @alpha
|
|
138
|
+
* @legacy @beta
|
|
147
139
|
*/
|
|
148
140
|
export interface IRuntimeStorageService {
|
|
149
141
|
/**
|
package/src/summary.ts
CHANGED
|
@@ -20,8 +20,7 @@ import type {
|
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* Contains the aggregation data from a Tree/Subtree.
|
|
23
|
-
* @legacy
|
|
24
|
-
* @alpha
|
|
23
|
+
* @legacy @beta
|
|
25
24
|
*/
|
|
26
25
|
export interface ISummaryStats {
|
|
27
26
|
treeNodeCount: number;
|
|
@@ -37,8 +36,7 @@ export interface ISummaryStats {
|
|
|
37
36
|
* each of its DDS.
|
|
38
37
|
* Any component that implements IChannelContext, IFluidDataStoreChannel or extends SharedObject
|
|
39
38
|
* will be taking part of the summarization process.
|
|
40
|
-
* @legacy
|
|
41
|
-
* @alpha
|
|
39
|
+
* @legacy @beta
|
|
42
40
|
*/
|
|
43
41
|
export interface ISummaryTreeWithStats {
|
|
44
42
|
/**
|
|
@@ -54,8 +52,7 @@ export interface ISummaryTreeWithStats {
|
|
|
54
52
|
|
|
55
53
|
/**
|
|
56
54
|
* Represents a summary at a current sequence number.
|
|
57
|
-
* @legacy
|
|
58
|
-
* @alpha
|
|
55
|
+
* @legacy @beta
|
|
59
56
|
*/
|
|
60
57
|
export interface ISummarizeResult {
|
|
61
58
|
stats: ISummaryStats;
|
|
@@ -76,8 +73,7 @@ export interface ISummarizeResult {
|
|
|
76
73
|
* ...
|
|
77
74
|
* "path1":
|
|
78
75
|
* ```
|
|
79
|
-
* @legacy
|
|
80
|
-
* @alpha
|
|
76
|
+
* @legacy @beta
|
|
81
77
|
*/
|
|
82
78
|
export interface ISummarizeInternalResult extends ISummarizeResult {
|
|
83
79
|
id: string;
|
|
@@ -90,8 +86,7 @@ export interface ISummarizeInternalResult extends ISummarizeResult {
|
|
|
90
86
|
/**
|
|
91
87
|
* @experimental - Can be deleted/changed at any time
|
|
92
88
|
* Contains the necessary information to allow DDSes to do incremental summaries
|
|
93
|
-
* @legacy
|
|
94
|
-
* @alpha
|
|
89
|
+
* @legacy @beta
|
|
95
90
|
*/
|
|
96
91
|
export interface IExperimentalIncrementalSummaryContext {
|
|
97
92
|
/**
|
|
@@ -117,8 +112,7 @@ export interface IExperimentalIncrementalSummaryContext {
|
|
|
117
112
|
}
|
|
118
113
|
|
|
119
114
|
/**
|
|
120
|
-
* @legacy
|
|
121
|
-
* @alpha
|
|
115
|
+
* @legacy @beta
|
|
122
116
|
*/
|
|
123
117
|
export type SummarizeInternalFn = (
|
|
124
118
|
fullTree: boolean,
|
|
@@ -128,8 +122,7 @@ export type SummarizeInternalFn = (
|
|
|
128
122
|
) => Promise<ISummarizeInternalResult>;
|
|
129
123
|
|
|
130
124
|
/**
|
|
131
|
-
* @legacy
|
|
132
|
-
* @alpha
|
|
125
|
+
* @legacy @beta
|
|
133
126
|
*/
|
|
134
127
|
export interface ISummarizerNodeConfig {
|
|
135
128
|
/**
|
|
@@ -140,8 +133,7 @@ export interface ISummarizerNodeConfig {
|
|
|
140
133
|
}
|
|
141
134
|
|
|
142
135
|
/**
|
|
143
|
-
* @legacy
|
|
144
|
-
* @alpha
|
|
136
|
+
* @legacy @beta
|
|
145
137
|
*/
|
|
146
138
|
export interface ISummarizerNodeConfigWithGC extends ISummarizerNodeConfig {
|
|
147
139
|
/**
|
|
@@ -152,8 +144,7 @@ export interface ISummarizerNodeConfigWithGC extends ISummarizerNodeConfig {
|
|
|
152
144
|
}
|
|
153
145
|
|
|
154
146
|
/**
|
|
155
|
-
* @legacy
|
|
156
|
-
* @alpha
|
|
147
|
+
* @legacy @beta
|
|
157
148
|
*/
|
|
158
149
|
export enum CreateSummarizerNodeSource {
|
|
159
150
|
FromSummary,
|
|
@@ -161,8 +152,7 @@ export enum CreateSummarizerNodeSource {
|
|
|
161
152
|
Local,
|
|
162
153
|
}
|
|
163
154
|
/**
|
|
164
|
-
* @legacy
|
|
165
|
-
* @alpha
|
|
155
|
+
* @legacy @beta
|
|
166
156
|
*/
|
|
167
157
|
export type CreateChildSummarizerNodeParam =
|
|
168
158
|
| {
|
|
@@ -178,8 +168,7 @@ export type CreateChildSummarizerNodeParam =
|
|
|
178
168
|
};
|
|
179
169
|
|
|
180
170
|
/**
|
|
181
|
-
* @legacy
|
|
182
|
-
* @alpha
|
|
171
|
+
* @legacy @beta
|
|
183
172
|
*/
|
|
184
173
|
export interface ISummarizerNode {
|
|
185
174
|
/**
|
|
@@ -271,8 +260,7 @@ export interface ISummarizerNode {
|
|
|
271
260
|
* `isReferenced`: This tells whether this node is referenced in the document or not.
|
|
272
261
|
*
|
|
273
262
|
* `updateUsedRoutes`: Used to notify this node of routes that are currently in use in it.
|
|
274
|
-
* @legacy
|
|
275
|
-
* @alpha
|
|
263
|
+
* @legacy @beta
|
|
276
264
|
*/
|
|
277
265
|
export interface ISummarizerNodeWithGC extends ISummarizerNode {
|
|
278
266
|
createChild(
|
|
@@ -366,8 +354,7 @@ export interface ITelemetryContextExt {
|
|
|
366
354
|
/**
|
|
367
355
|
* Contains telemetry data relevant to summarization workflows.
|
|
368
356
|
* This object is expected to be modified directly by various summarize methods.
|
|
369
|
-
* @legacy
|
|
370
|
-
* @alpha
|
|
357
|
+
* @legacy @beta
|
|
371
358
|
*/
|
|
372
359
|
export interface ITelemetryContext {
|
|
373
360
|
/**
|