@fluidframework/runtime-definitions 2.0.0-rc.4.0.6 → 2.0.0-rc.5.0.1
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 +51 -0
- package/api-extractor/api-extractor-lint-bundle.json +5 -0
- package/api-extractor/api-extractor-lint-legacy.cjs.json +5 -0
- package/api-extractor/api-extractor-lint-legacy.esm.json +5 -0
- package/api-extractor/api-extractor-lint-public.cjs.json +5 -0
- package/api-extractor/api-extractor-lint-public.esm.json +5 -0
- package/api-extractor.json +1 -1
- package/api-report/{runtime-definitions.api.md → runtime-definitions.alpha.api.md} +34 -82
- package/api-report/runtime-definitions.beta.api.md +37 -0
- package/api-report/runtime-definitions.public.api.md +37 -0
- package/biome.jsonc +4 -0
- package/dist/attribution.d.ts +1 -1
- package/dist/attribution.d.ts.map +1 -1
- package/dist/attribution.js.map +1 -1
- package/dist/dataStoreContext.d.ts +17 -33
- package/dist/dataStoreContext.d.ts.map +1 -1
- package/dist/dataStoreContext.js.map +1 -1
- package/dist/dataStoreFactory.d.ts.map +1 -1
- package/dist/dataStoreFactory.js.map +1 -1
- package/dist/garbageCollectionDefinitions.d.ts +1 -1
- package/dist/garbageCollectionDefinitions.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/legacy.d.ts +6 -8
- package/dist/protocol.d.ts +3 -3
- package/dist/protocol.d.ts.map +1 -1
- package/dist/protocol.js.map +1 -1
- package/dist/public.d.ts +2 -9
- package/dist/summary.d.ts +27 -22
- package/dist/summary.d.ts.map +1 -1
- package/dist/summary.js.map +1 -1
- package/lib/attribution.d.ts +1 -1
- package/lib/attribution.d.ts.map +1 -1
- package/lib/attribution.js.map +1 -1
- package/lib/dataStoreContext.d.ts +17 -33
- package/lib/dataStoreContext.d.ts.map +1 -1
- package/lib/dataStoreContext.js.map +1 -1
- package/lib/dataStoreFactory.d.ts.map +1 -1
- package/lib/dataStoreFactory.js.map +1 -1
- package/lib/garbageCollectionDefinitions.d.ts +1 -1
- package/lib/garbageCollectionDefinitions.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/legacy.d.ts +6 -8
- package/lib/protocol.d.ts +3 -3
- package/lib/protocol.d.ts.map +1 -1
- package/lib/protocol.js.map +1 -1
- package/lib/public.d.ts +2 -9
- package/lib/summary.d.ts +27 -22
- package/lib/summary.d.ts.map +1 -1
- package/lib/summary.js.map +1 -1
- package/lib/tsdoc-metadata.json +1 -1
- package/package.json +46 -17
- package/src/attribution.ts +1 -1
- package/src/dataStoreContext.ts +31 -46
- package/src/dataStoreFactory.ts +2 -1
- package/src/garbageCollectionDefinitions.ts +1 -1
- package/src/index.ts +1 -0
- package/src/protocol.ts +3 -3
- package/src/summary.ts +32 -24
- package/tsconfig.json +1 -0
- package/tsdoc.json +4 -0
package/lib/summary.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"summary.js","sourceRoot":"","sources":["../src/summary.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA6IH;;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;AAsKD;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,WAAW,CAAC;AAiD5C;;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\tISequencedDocumentMessage,\n\tISnapshotTree,\n\tISummaryTree,\n\tITree,\n\tSummaryTree,\n} from \"@fluidframework/protocol-definitions\";\n\nimport type {\n\tIGarbageCollectionData,\n\tIGarbageCollectionDetailsBase,\n} from \"./garbageCollectionDefinitions.js\";\n\n/**\n * Contains the aggregation data from a Tree/Subtree.\n * @public\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 * @public\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 * @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 * @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 * @public\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\tsummarySequenceNumber: number;\n\t/**\n\t * The sequence number of the most recent summary that was acknowledged by the server.\n\t */\n\tlatestSummarySequenceNumber: 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\tsummaryPath: string;\n}\n\n/**\n * @alpha\n */\nexport type SummarizeInternalFn = (\n\tfullTree: boolean,\n\ttrackState: boolean,\n\ttelemetryContext?: ITelemetryContext,\n\tincrementalSummaryContext?: IExperimentalIncrementalSummaryContext,\n) => Promise<ISummarizeInternalResult>;\n\n/**\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 * @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 * @alpha\n */\nexport enum CreateSummarizerNodeSource {\n\tFromSummary,\n\tFromAttach,\n\tLocal,\n}\n/**\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 * @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\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 * @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 is expected to be modified directly by various summarize methods.\n * @public\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\t/**\n\t * Get the telemetry data being tracked\n\t *\n\t * @deprecated This interface should only be used for instrumenting, not for attempting to read already-set telemetry data.\n\t *\n\t * @param prefix - unique prefix for this data (ex: \"fluid:map:\")\n\t * @param property - property name of the telemetry data being tracked (ex: \"DirectoryCount\")\n\t * @returns undefined if item not found\n\t */\n\tget(prefix: string, property: string): TelemetryBaseEventPropertyType;\n\n\t/**\n\t * Returns a serialized version of all the telemetry data.\n\t * Should be used when logging in telemetry events.\n\t *\n\t * @deprecated This interface should only be used for instrumenting. A concrete implementation will likely have a serialize function\n\t * but this functionality should not be used by other code being given an ITelemetryContext.\n\t */\n\tserialize(): string;\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;AAsKD;;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 { ISummaryTree } from \"@fluidframework/driver-definitions\";\nimport type {\n\tISnapshotTree,\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 * @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 * @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 * @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 * @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 * @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\tsummarySequenceNumber: number;\n\t/**\n\t * The sequence number of the most recent summary that was acknowledged by the server.\n\t */\n\tlatestSummarySequenceNumber: 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\tsummaryPath: string;\n}\n\n/**\n * @alpha\n */\nexport type SummarizeInternalFn = (\n\tfullTree: boolean,\n\ttrackState: boolean,\n\ttelemetryContext?: ITelemetryContext,\n\tincrementalSummaryContext?: IExperimentalIncrementalSummaryContext,\n) => Promise<ISummarizeInternalResult>;\n\n/**\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 * @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 * @alpha\n */\nexport enum CreateSummarizerNodeSource {\n\tFromSummary,\n\tFromAttach,\n\tLocal,\n}\n/**\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 * @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\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 * @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 * @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"]}
|
package/lib/tsdoc-metadata.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/runtime-definitions",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.5.0.1",
|
|
4
4
|
"description": "Fluid Runtime definitions",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -47,32 +47,53 @@
|
|
|
47
47
|
"main": "lib/index.js",
|
|
48
48
|
"types": "lib/public.d.ts",
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@fluidframework/container-definitions": ">=2.0.0-rc.
|
|
51
|
-
"@fluidframework/core-interfaces": ">=2.0.0-rc.
|
|
52
|
-
"@fluidframework/driver-definitions": ">=2.0.0-rc.
|
|
53
|
-
"@fluidframework/id-compressor": ">=2.0.0-rc.
|
|
54
|
-
"@fluidframework/
|
|
50
|
+
"@fluidframework/container-definitions": ">=2.0.0-rc.5.0.1 <2.0.0-rc.5.1.0",
|
|
51
|
+
"@fluidframework/core-interfaces": ">=2.0.0-rc.5.0.1 <2.0.0-rc.5.1.0",
|
|
52
|
+
"@fluidframework/driver-definitions": ">=2.0.0-rc.5.0.1 <2.0.0-rc.5.1.0",
|
|
53
|
+
"@fluidframework/id-compressor": ">=2.0.0-rc.5.0.1 <2.0.0-rc.5.1.0",
|
|
54
|
+
"@fluidframework/telemetry-utils": ">=2.0.0-rc.5.0.1 <2.0.0-rc.5.1.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@arethetypeswrong/cli": "^0.15.2",
|
|
58
|
-
"@biomejs/biome": "^1.
|
|
59
|
-
"@fluid-tools/build-cli": "^0.
|
|
58
|
+
"@biomejs/biome": "^1.7.3",
|
|
59
|
+
"@fluid-tools/build-cli": "^0.39.0",
|
|
60
60
|
"@fluidframework/build-common": "^2.0.3",
|
|
61
|
-
"@fluidframework/build-tools": "^0.
|
|
62
|
-
"@fluidframework/eslint-config-fluid": "^5.
|
|
63
|
-
"@fluidframework/runtime-definitions-previous": "npm:@fluidframework/runtime-definitions@2.0.0-rc.
|
|
64
|
-
"@microsoft/api-extractor": "^7.
|
|
61
|
+
"@fluidframework/build-tools": "^0.39.0",
|
|
62
|
+
"@fluidframework/eslint-config-fluid": "^5.3.0",
|
|
63
|
+
"@fluidframework/runtime-definitions-previous": "npm:@fluidframework/runtime-definitions@2.0.0-rc.4.0.0",
|
|
64
|
+
"@microsoft/api-extractor": "^7.45.1",
|
|
65
|
+
"concurrently": "^8.2.1",
|
|
65
66
|
"copyfiles": "^2.4.1",
|
|
66
67
|
"eslint": "~8.55.0",
|
|
67
68
|
"eslint-plugin-deprecation": "~2.0.0",
|
|
68
69
|
"prettier": "~3.0.3",
|
|
69
70
|
"rimraf": "^4.4.0",
|
|
70
|
-
"typescript": "~5.
|
|
71
|
+
"typescript": "~5.4.5"
|
|
71
72
|
},
|
|
72
73
|
"typeValidation": {
|
|
73
74
|
"broken": {
|
|
74
|
-
"
|
|
75
|
-
"forwardCompat": false
|
|
75
|
+
"InterfaceDeclaration_IContainerRuntimeBase": {
|
|
76
|
+
"forwardCompat": false,
|
|
77
|
+
"backCompat": false
|
|
78
|
+
},
|
|
79
|
+
"InterfaceDeclaration_IFluidDataStoreContext": {
|
|
80
|
+
"forwardCompat": false,
|
|
81
|
+
"backCompat": false
|
|
82
|
+
},
|
|
83
|
+
"InterfaceDeclaration_IFluidDataStoreContextDetached": {
|
|
84
|
+
"forwardCompat": false,
|
|
85
|
+
"backCompat": false
|
|
86
|
+
},
|
|
87
|
+
"InterfaceDeclaration_IFluidParentContext": {
|
|
88
|
+
"forwardCompat": false,
|
|
89
|
+
"backCompat": false
|
|
90
|
+
},
|
|
91
|
+
"InterfaceDeclaration_ITelemetryContext": {
|
|
92
|
+
"backCompat": false
|
|
93
|
+
},
|
|
94
|
+
"RemovedInterfaceDeclaration_IFluidDataStoreContextEvents": {
|
|
95
|
+
"forwardCompat": false,
|
|
96
|
+
"backCompat": false
|
|
76
97
|
},
|
|
77
98
|
"InterfaceDeclaration_IFluidDataStoreChannel": {
|
|
78
99
|
"forwardCompat": false
|
|
@@ -91,13 +112,21 @@
|
|
|
91
112
|
"build:test:cjs": "fluid-tsc commonjs --project ./src/test/tsconfig.cjs.json",
|
|
92
113
|
"build:test:esm": "tsc --project ./src/test/tsconfig.json",
|
|
93
114
|
"check:are-the-types-wrong": "attw --pack .",
|
|
115
|
+
"check:biome": "biome check . --formatter-enabled=true",
|
|
116
|
+
"check:exports": "concurrently \"npm:check:exports:*\"",
|
|
117
|
+
"check:exports:bundle-release-tags": "api-extractor run --config api-extractor/api-extractor-lint-bundle.json",
|
|
118
|
+
"check:exports:cjs:legacy": "api-extractor run --config api-extractor/api-extractor-lint-legacy.cjs.json",
|
|
119
|
+
"check:exports:cjs:public": "api-extractor run --config api-extractor/api-extractor-lint-public.cjs.json",
|
|
120
|
+
"check:exports:esm:legacy": "api-extractor run --config api-extractor/api-extractor-lint-legacy.esm.json",
|
|
121
|
+
"check:exports:esm:public": "api-extractor run --config api-extractor/api-extractor-lint-public.esm.json",
|
|
122
|
+
"check:format": "npm run check:biome",
|
|
94
123
|
"check:prettier": "prettier --check . --cache --ignore-path ../../../.prettierignore",
|
|
95
|
-
"check:release-tags": "api-extractor run --local --config ./api-extractor-lint.json",
|
|
96
124
|
"ci:build:docs": "api-extractor run",
|
|
97
125
|
"clean": "rimraf --glob dist lib \"*.d.ts\" \"**/*.tsbuildinfo\" \"**/*.build.log\" _api-extractor-temp",
|
|
98
126
|
"eslint": "eslint --format stylish src",
|
|
99
127
|
"eslint:fix": "eslint --format stylish src --fix --fix-type problem,suggestion,layout",
|
|
100
|
-
"format": "
|
|
128
|
+
"format": "npm run format:biome",
|
|
129
|
+
"format:biome": "biome check . --formatter-enabled=true --apply",
|
|
101
130
|
"format:prettier": "prettier --write . --cache --ignore-path ../../../.prettierignore",
|
|
102
131
|
"lint": "fluid-build . --task lint",
|
|
103
132
|
"lint:fix": "fluid-build . --task eslint:fix --task format",
|
package/src/attribution.ts
CHANGED
package/src/dataStoreContext.ts
CHANGED
|
@@ -11,21 +11,22 @@ import type {
|
|
|
11
11
|
IEvent,
|
|
12
12
|
IEventProvider,
|
|
13
13
|
IFluidHandle,
|
|
14
|
-
IFluidHandleInternal,
|
|
15
|
-
IProvideFluidHandleContext,
|
|
16
14
|
IRequest,
|
|
17
15
|
IResponse,
|
|
18
16
|
ITelemetryBaseLogger,
|
|
17
|
+
} from "@fluidframework/core-interfaces";
|
|
18
|
+
import type {
|
|
19
|
+
IFluidHandleInternal,
|
|
20
|
+
IProvideFluidHandleContext,
|
|
19
21
|
} from "@fluidframework/core-interfaces/internal";
|
|
20
|
-
import type {
|
|
21
|
-
import type { IIdCompressor } from "@fluidframework/id-compressor";
|
|
22
|
+
import type { IClientDetails, IQuorumClients } from "@fluidframework/driver-definitions";
|
|
22
23
|
import type {
|
|
23
|
-
|
|
24
|
+
IDocumentStorageService,
|
|
24
25
|
IDocumentMessage,
|
|
25
|
-
IQuorumClients,
|
|
26
|
-
ISequencedDocumentMessage,
|
|
27
26
|
ISnapshotTree,
|
|
28
|
-
|
|
27
|
+
ISequencedDocumentMessage,
|
|
28
|
+
} from "@fluidframework/driver-definitions/internal";
|
|
29
|
+
import type { IIdCompressor } from "@fluidframework/id-compressor";
|
|
29
30
|
|
|
30
31
|
import type { IProvideFluidDataStoreFactory } from "./dataStoreFactory.js";
|
|
31
32
|
import type { IProvideFluidDataStoreRegistry } from "./dataStoreRegistry.js";
|
|
@@ -170,7 +171,7 @@ export interface IDataStore {
|
|
|
170
171
|
* @alpha
|
|
171
172
|
*/
|
|
172
173
|
export interface IContainerRuntimeBase extends IEventProvider<IContainerRuntimeBaseEvents> {
|
|
173
|
-
readonly
|
|
174
|
+
readonly baseLogger: ITelemetryBaseLogger;
|
|
174
175
|
readonly clientDetails: IClientDetails;
|
|
175
176
|
readonly disposed: boolean;
|
|
176
177
|
|
|
@@ -210,7 +211,10 @@ export interface IContainerRuntimeBase extends IEventProvider<IContainerRuntimeB
|
|
|
210
211
|
* When not specified the datastore will belong to a `default` group. Read more about it in this
|
|
211
212
|
* {@link https://github.com/microsoft/FluidFramework/blob/main/packages/runtime/container-runtime/README.md | README}
|
|
212
213
|
*/
|
|
213
|
-
createDataStore(
|
|
214
|
+
createDataStore(
|
|
215
|
+
pkg: Readonly<string | string[]>,
|
|
216
|
+
loadingGroupId?: string,
|
|
217
|
+
): Promise<IDataStore>;
|
|
214
218
|
|
|
215
219
|
/**
|
|
216
220
|
* Creates detached data store context. Only after context.attachRuntime() is called,
|
|
@@ -232,7 +236,10 @@ export interface IContainerRuntimeBase extends IEventProvider<IContainerRuntimeB
|
|
|
232
236
|
*/
|
|
233
237
|
getAbsoluteUrl(relativeUrl: string): Promise<string | undefined>;
|
|
234
238
|
|
|
235
|
-
uploadBlob(
|
|
239
|
+
uploadBlob(
|
|
240
|
+
blob: ArrayBufferLike,
|
|
241
|
+
signal?: AbortSignal,
|
|
242
|
+
): Promise<IFluidHandle<ArrayBufferLike>>;
|
|
236
243
|
|
|
237
244
|
/**
|
|
238
245
|
* Returns the current quorum.
|
|
@@ -291,17 +298,12 @@ export interface IFluidDataStoreChannel extends IDisposable {
|
|
|
291
298
|
/**
|
|
292
299
|
* Synchronously retrieves GC Data (representing the outbound routes present) for the initial state of the DataStore
|
|
293
300
|
*/
|
|
294
|
-
getAttachGCData
|
|
301
|
+
getAttachGCData(telemetryContext?: ITelemetryContext): IGarbageCollectionData;
|
|
295
302
|
|
|
296
303
|
/**
|
|
297
304
|
* Processes the op.
|
|
298
305
|
*/
|
|
299
|
-
process(
|
|
300
|
-
message: ISequencedDocumentMessage,
|
|
301
|
-
local: boolean,
|
|
302
|
-
localOpMetadata: unknown,
|
|
303
|
-
addedOutboundReference?: (fromNodePath: string, toNodePath: string) => void,
|
|
304
|
-
): void;
|
|
306
|
+
process(message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown): void;
|
|
305
307
|
|
|
306
308
|
/**
|
|
307
309
|
* Processes the signal.
|
|
@@ -399,7 +401,7 @@ export interface IFluidParentContext
|
|
|
399
401
|
readonly connected: boolean;
|
|
400
402
|
readonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;
|
|
401
403
|
readonly storage: IDocumentStorageService;
|
|
402
|
-
readonly
|
|
404
|
+
readonly baseLogger: ITelemetryBaseLogger;
|
|
403
405
|
readonly clientDetails: IClientDetails;
|
|
404
406
|
readonly idCompressor?: IIdCompressor;
|
|
405
407
|
/**
|
|
@@ -497,27 +499,21 @@ export interface IFluidParentContext
|
|
|
497
499
|
signal?: AbortSignal,
|
|
498
500
|
): Promise<IFluidHandleInternal<ArrayBufferLike>>;
|
|
499
501
|
|
|
500
|
-
/**
|
|
501
|
-
* @deprecated There is no replacement for this, its functionality is no longer needed at this layer.
|
|
502
|
-
* It will be removed in a future release, sometime after 2.0.0-internal.8.0.0
|
|
503
|
-
*
|
|
504
|
-
* Similar capability is exposed with from/to string paths instead of handles via @see addedGCOutboundRoute
|
|
505
|
-
*
|
|
506
|
-
* Called when a new outbound reference is added to another node. This is used by garbage collection to identify
|
|
507
|
-
* all references added in the system.
|
|
508
|
-
* @param srcHandle - The handle of the node that added the reference.
|
|
509
|
-
* @param outboundHandle - The handle of the outbound node that is referenced.
|
|
510
|
-
*/
|
|
511
|
-
addedGCOutboundReference?(
|
|
512
|
-
srcHandle: { absolutePath: string },
|
|
513
|
-
outboundHandle: { absolutePath: string },
|
|
514
|
-
): void;
|
|
515
|
-
|
|
516
502
|
/**
|
|
517
503
|
* Called by IFluidDataStoreChannel, indicates that a channel is dirty and needs to be part of the summary.
|
|
518
504
|
* @param address - The address of the channel that is dirty.
|
|
519
505
|
*/
|
|
520
506
|
setChannelDirty(address: string): void;
|
|
507
|
+
|
|
508
|
+
/**
|
|
509
|
+
* Called when a new outbound reference is added to another node. This is used by garbage collection to identify
|
|
510
|
+
* all references added in the system.
|
|
511
|
+
*
|
|
512
|
+
* @param fromPath - The absolute path of the node that added the reference.
|
|
513
|
+
* @param toPath - The absolute path of the outbound node that is referenced.
|
|
514
|
+
* @param messageTimestampMs - The timestamp of the message that added the reference.
|
|
515
|
+
*/
|
|
516
|
+
addedGCOutboundRoute(fromPath: string, toPath: string, messageTimestampMs?: number): void;
|
|
521
517
|
}
|
|
522
518
|
|
|
523
519
|
/**
|
|
@@ -554,17 +550,6 @@ export interface IFluidDataStoreContext extends IFluidParentContext {
|
|
|
554
550
|
* and its children with the GC details from the previous summary.
|
|
555
551
|
*/
|
|
556
552
|
getBaseGCDetails(): Promise<IGarbageCollectionDetailsBase>;
|
|
557
|
-
|
|
558
|
-
/**
|
|
559
|
-
* (Same as @see addedGCOutboundReference, but with string paths instead of handles)
|
|
560
|
-
*
|
|
561
|
-
* Called when a new outbound reference is added to another node. This is used by garbage collection to identify
|
|
562
|
-
* all references added in the system.
|
|
563
|
-
*
|
|
564
|
-
* @param fromPath - The absolute path of the node that added the reference.
|
|
565
|
-
* @param toPath - The absolute path of the outbound node that is referenced.
|
|
566
|
-
*/
|
|
567
|
-
addedGCOutboundRoute?(fromPath: string, toPath: string): void;
|
|
568
553
|
}
|
|
569
554
|
|
|
570
555
|
/**
|
package/src/dataStoreFactory.ts
CHANGED
|
@@ -8,7 +8,8 @@ import type { IFluidDataStoreChannel, IFluidDataStoreContext } from "./dataStore
|
|
|
8
8
|
/**
|
|
9
9
|
* @alpha
|
|
10
10
|
*/
|
|
11
|
-
export const IFluidDataStoreFactory: keyof IProvideFluidDataStoreFactory =
|
|
11
|
+
export const IFluidDataStoreFactory: keyof IProvideFluidDataStoreFactory =
|
|
12
|
+
"IFluidDataStoreFactory";
|
|
12
13
|
|
|
13
14
|
/**
|
|
14
15
|
* @alpha
|
package/src/index.ts
CHANGED
package/src/protocol.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import type {
|
|
6
|
+
import type { ITree, ISignalMessage } from "@fluidframework/driver-definitions/internal";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* An envelope wraps the contents with the intended target
|
|
@@ -47,10 +47,10 @@ export interface ISignalEnvelope {
|
|
|
47
47
|
|
|
48
48
|
/**
|
|
49
49
|
* Represents ISignalMessage with its type.
|
|
50
|
-
* @
|
|
50
|
+
* @alpha
|
|
51
51
|
*/
|
|
52
52
|
export interface IInboundSignalMessage extends ISignalMessage {
|
|
53
|
-
type: string;
|
|
53
|
+
readonly type: string;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
/**
|
package/src/summary.ts
CHANGED
|
@@ -4,13 +4,14 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import type { TelemetryBaseEventPropertyType } from "@fluidframework/core-interfaces";
|
|
7
|
+
import type { ISummaryTree } from "@fluidframework/driver-definitions";
|
|
7
8
|
import type {
|
|
8
|
-
ISequencedDocumentMessage,
|
|
9
9
|
ISnapshotTree,
|
|
10
|
-
ISummaryTree,
|
|
11
10
|
ITree,
|
|
12
11
|
SummaryTree,
|
|
13
|
-
|
|
12
|
+
ISequencedDocumentMessage,
|
|
13
|
+
} from "@fluidframework/driver-definitions/internal";
|
|
14
|
+
import type { TelemetryEventPropertyTypeExt } from "@fluidframework/telemetry-utils/internal";
|
|
14
15
|
|
|
15
16
|
import type {
|
|
16
17
|
IGarbageCollectionData,
|
|
@@ -19,7 +20,7 @@ import type {
|
|
|
19
20
|
|
|
20
21
|
/**
|
|
21
22
|
* Contains the aggregation data from a Tree/Subtree.
|
|
22
|
-
* @
|
|
23
|
+
* @alpha
|
|
23
24
|
*/
|
|
24
25
|
export interface ISummaryStats {
|
|
25
26
|
treeNodeCount: number;
|
|
@@ -35,7 +36,7 @@ export interface ISummaryStats {
|
|
|
35
36
|
* each of its DDS.
|
|
36
37
|
* Any component that implements IChannelContext, IFluidDataStoreChannel or extends SharedObject
|
|
37
38
|
* will be taking part of the summarization process.
|
|
38
|
-
* @
|
|
39
|
+
* @alpha
|
|
39
40
|
*/
|
|
40
41
|
export interface ISummaryTreeWithStats {
|
|
41
42
|
/**
|
|
@@ -85,7 +86,7 @@ export interface ISummarizeInternalResult extends ISummarizeResult {
|
|
|
85
86
|
/**
|
|
86
87
|
* @experimental - Can be deleted/changed at any time
|
|
87
88
|
* Contains the necessary information to allow DDSes to do incremental summaries
|
|
88
|
-
* @
|
|
89
|
+
* @alpha
|
|
89
90
|
*/
|
|
90
91
|
export interface IExperimentalIncrementalSummaryContext {
|
|
91
92
|
/**
|
|
@@ -322,17 +323,17 @@ export const channelsTreeName = ".channels";
|
|
|
322
323
|
|
|
323
324
|
/**
|
|
324
325
|
* Contains telemetry data relevant to summarization workflows.
|
|
325
|
-
* This object is expected to be modified directly by various summarize methods.
|
|
326
|
-
* @
|
|
326
|
+
* This object, in contrast to ITelemetryContext, is expected to be modified directly by various summarize methods.
|
|
327
|
+
* @internal
|
|
327
328
|
*/
|
|
328
|
-
export interface
|
|
329
|
+
export interface ITelemetryContextExt {
|
|
329
330
|
/**
|
|
330
331
|
* Sets value for telemetry data being tracked.
|
|
331
332
|
* @param prefix - unique prefix to tag this data with (ex: "fluid:map:")
|
|
332
333
|
* @param property - property name of the telemetry data being tracked (ex: "DirectoryCount")
|
|
333
334
|
* @param value - value to attribute to this summary telemetry data
|
|
334
335
|
*/
|
|
335
|
-
set(prefix: string, property: string, value:
|
|
336
|
+
set(prefix: string, property: string, value: TelemetryEventPropertyTypeExt): void;
|
|
336
337
|
|
|
337
338
|
/**
|
|
338
339
|
* Sets multiple values for telemetry data being tracked.
|
|
@@ -343,28 +344,35 @@ export interface ITelemetryContext {
|
|
|
343
344
|
setMultiple(
|
|
344
345
|
prefix: string,
|
|
345
346
|
property: string,
|
|
346
|
-
values: Record<string,
|
|
347
|
+
values: Record<string, TelemetryEventPropertyTypeExt>,
|
|
347
348
|
): void;
|
|
349
|
+
}
|
|
348
350
|
|
|
351
|
+
/**
|
|
352
|
+
* Contains telemetry data relevant to summarization workflows.
|
|
353
|
+
* This object is expected to be modified directly by various summarize methods.
|
|
354
|
+
* @alpha
|
|
355
|
+
*/
|
|
356
|
+
export interface ITelemetryContext {
|
|
349
357
|
/**
|
|
350
|
-
*
|
|
351
|
-
*
|
|
352
|
-
* @deprecated This interface should only be used for instrumenting, not for attempting to read already-set telemetry data.
|
|
353
|
-
*
|
|
354
|
-
* @param prefix - unique prefix for this data (ex: "fluid:map:")
|
|
358
|
+
* Sets value for telemetry data being tracked.
|
|
359
|
+
* @param prefix - unique prefix to tag this data with (ex: "fluid:map:")
|
|
355
360
|
* @param property - property name of the telemetry data being tracked (ex: "DirectoryCount")
|
|
356
|
-
* @
|
|
361
|
+
* @param value - value to attribute to this summary telemetry data
|
|
357
362
|
*/
|
|
358
|
-
|
|
363
|
+
set(prefix: string, property: string, value: TelemetryBaseEventPropertyType): void;
|
|
359
364
|
|
|
360
365
|
/**
|
|
361
|
-
*
|
|
362
|
-
*
|
|
363
|
-
*
|
|
364
|
-
* @
|
|
365
|
-
* but this functionality should not be used by other code being given an ITelemetryContext.
|
|
366
|
+
* Sets multiple values for telemetry data being tracked.
|
|
367
|
+
* @param prefix - unique prefix to tag this data with (ex: "fluid:summarize:")
|
|
368
|
+
* @param property - property name of the telemetry data being tracked (ex: "Options")
|
|
369
|
+
* @param values - A set of values to attribute to this summary telemetry data.
|
|
366
370
|
*/
|
|
367
|
-
|
|
371
|
+
setMultiple(
|
|
372
|
+
prefix: string,
|
|
373
|
+
property: string,
|
|
374
|
+
values: Record<string, TelemetryBaseEventPropertyType>,
|
|
375
|
+
): void;
|
|
368
376
|
}
|
|
369
377
|
|
|
370
378
|
/**
|
package/tsconfig.json
CHANGED
package/tsdoc.json
ADDED