@fluidframework/runtime-definitions 2.0.0-internal.1.2.0.93071 → 2.0.0-internal.1.2.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.
@@ -41,10 +41,12 @@ export declare const VisibilityState: {
41
41
  LocallyVisible: string;
42
42
  /**
43
43
  * Indicates that the object is visible globally to all clients. This is the state of an object in 2 scenarios:
44
+ *
44
45
  * 1. It is attached to the container's graph when the container is globally visible. The object's state goes from
45
- * not visible to globally visible.
46
+ * not visible to globally visible.
47
+ *
46
48
  * 2. When a container becomes globally visible, all locally visible objects go from locally visible to globally
47
- * visible.
49
+ * visible.
48
50
  */
49
51
  GloballyVisible: string;
50
52
  };
@@ -143,6 +145,12 @@ export interface IContainerRuntimeBase extends IEventProvider<IContainerRuntimeB
143
145
  */
144
146
  getAudience(): IAudience;
145
147
  }
148
+ /** @deprecated - Used only in deprecated API bindToContext */
149
+ export declare enum BindState {
150
+ NotBound = "NotBound",
151
+ Binding = "Binding",
152
+ Bound = "Bound"
153
+ }
146
154
  /**
147
155
  * Minimal interface a data store runtime need to provide for IFluidDataStoreContext to bind to control
148
156
  *
@@ -289,6 +297,11 @@ export interface IFluidDataStoreContext extends IEventProvider<IFluidDataStoreCo
289
297
  * @param content - Content of the signal.
290
298
  */
291
299
  submitSignal(type: string, content: any): void;
300
+ /**
301
+ * @deprecated - To be removed in favor of makeVisible.
302
+ * Register the runtime to the container
303
+ */
304
+ bindToContext(): void;
292
305
  /**
293
306
  * Called to make the data store locally visible in the container. This happens automatically for root data stores
294
307
  * when they are marked as root. For non-root data stores, this happens when their handle is added to a visible DDS.
@@ -1 +1 @@
1
- {"version":3,"file":"dataStoreContext.d.ts","sourceRoot":"","sources":["../src/dataStoreContext.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAC/G,OAAO,EAC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EACtC,gBAAgB,EAAE,sBAAsB,GACzC,OAAO,CAAC,IAAI,CAAC,CAAC;CACpB"}
@@ -4,7 +4,7 @@
4
4
  * Licensed under the MIT License.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.VisibilityState = exports.FlushMode = void 0;
7
+ exports.BindState = exports.VisibilityState = exports.FlushMode = void 0;
8
8
  /**
9
9
  * Runtime flush mode handling
10
10
  */
@@ -35,11 +35,20 @@ exports.VisibilityState = {
35
35
  LocallyVisible: "LocallyVisible",
36
36
  /**
37
37
  * Indicates that the object is visible globally to all clients. This is the state of an object in 2 scenarios:
38
+ *
38
39
  * 1. It is attached to the container's graph when the container is globally visible. The object's state goes from
39
- * not visible to globally visible.
40
+ * not visible to globally visible.
41
+ *
40
42
  * 2. When a container becomes globally visible, all locally visible objects go from locally visible to globally
41
- * visible.
43
+ * visible.
42
44
  */
43
45
  GloballyVisible: "GloballyVisible",
44
46
  };
47
+ /** @deprecated - Used only in deprecated API bindToContext */
48
+ var BindState;
49
+ (function (BindState) {
50
+ BindState["NotBound"] = "NotBound";
51
+ BindState["Binding"] = "Binding";
52
+ BindState["Bound"] = "Bound";
53
+ })(BindState = exports.BindState || (exports.BindState = {}));
45
54
  //# sourceMappingURL=dataStoreContext.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dataStoreContext.js","sourceRoot":"","sources":["../src/dataStoreContext.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAyCH;;GAEG;AACH,IAAY,SAWX;AAXD,WAAY,SAAS;IACjB;;OAEG;IACH,mDAAS,CAAA;IAET;;;OAGG;IACH,mDAAS,CAAA;AACb,CAAC,EAXW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAWpB;AAED;;;GAGG;AACU,QAAA,eAAe,GAAG;IAC3B,mGAAmG;IACnG,UAAU,EAAE,YAAY;IAExB;;;;OAIG;IACH,cAAc,EAAE,gBAAgB;IAEhC;;;;;;OAMG;IACH,eAAe,EAAE,iBAAiB;CACrC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ITelemetryBaseLogger, IDisposable, IEvent, IEventProvider } from \"@fluidframework/common-definitions\";\nimport {\n IFluidRouter,\n IProvideFluidHandleContext,\n IFluidHandle,\n IRequest,\n IResponse,\n FluidObject,\n} from \"@fluidframework/core-interfaces\";\nimport {\n IAudience,\n IDeltaManager,\n AttachState,\n ILoaderOptions,\n} from \"@fluidframework/container-definitions\";\nimport { IDocumentStorageService } from \"@fluidframework/driver-definitions\";\nimport {\n IClientDetails,\n IDocumentMessage,\n IQuorumClients,\n ISequencedDocumentMessage,\n ISnapshotTree,\n} from \"@fluidframework/protocol-definitions\";\nimport { IProvideFluidDataStoreFactory } from \"./dataStoreFactory\";\nimport { IProvideFluidDataStoreRegistry } from \"./dataStoreRegistry\";\nimport {\n IGarbageCollectionData,\n IGarbageCollectionDetailsBase,\n IGarbageCollectionSummaryDetails,\n} from \"./garbageCollection\";\nimport { IInboundSignalMessage } from \"./protocol\";\nimport {\n CreateChildSummarizerNodeParam,\n ISummarizerNodeWithGC,\n ISummaryTreeWithStats,\n ITelemetryContext,\n SummarizeInternalFn,\n} from \"./summary\";\n\n/**\n * Runtime flush mode handling\n */\nexport enum FlushMode {\n /**\n * In Immediate flush mode the runtime will immediately send all operations to the driver layer.\n */\n Immediate,\n\n /**\n * When in TurnBased flush mode the runtime will buffer operations in the current turn and send them as a single\n * batch at the end of the turn. The flush call on the runtime can be used to force send the current batch.\n */\n TurnBased,\n}\n\n/**\n * This tells the visibility state of a Fluid object. It basically tracks whether the object is not visible, visible\n * locally within the container only or visible globally to all clients.\n */\nexport const VisibilityState = {\n /** Indicates that the object is not visible. This is the state when an object is first created. */\n NotVisible: \"NotVisible\",\n\n /**\n * Indicates that the object is visible locally within the container. This is the state when an object is attached\n * to the container's graph but the container itself isn't globally visible. The object's state goes from not\n * visible to locally visible.\n */\n LocallyVisible: \"LocallyVisible\",\n\n /**\n * Indicates that the object is visible globally to all clients. This is the state of an object in 2 scenarios:\n * 1. It is attached to the container's graph when the container is globally visible. The object's state goes from\n * not visible to globally visible.\n * 2. When a container becomes globally visible, all locally visible objects go from locally visible to globally\n * visible.\n */\n GloballyVisible: \"GloballyVisible\",\n};\nexport type VisibilityState = typeof VisibilityState[keyof typeof VisibilityState];\n\nexport interface IContainerRuntimeBaseEvents extends IEvent{\n (event: \"batchBegin\", listener: (op: ISequencedDocumentMessage) => void);\n /**\n * @param runtimeMessage - tells if op is runtime op. If it is, it was unpacked, i.e. it's type and content\n * represent internal container runtime type / content.\n */\n (event: \"op\", listener: (op: ISequencedDocumentMessage, runtimeMessage?: boolean) => void);\n (event: \"batchEnd\", listener: (error: any, op: ISequencedDocumentMessage) => void);\n (event: \"signal\", listener: (message: IInboundSignalMessage, local: boolean) => void);\n}\n\n/**\n * Encapsulates the return codes of the aliasing API.\n *\n * 'Success' - the datastore has been successfully aliased. It can now be used.\n * 'Conflict' - there is already a datastore bound to the provided alias. To acquire a handle to it,\n * use the `IContainerRuntime.getRootDataStore` function. The current datastore should be discarded\n * and will be garbage collected. The current datastore cannot be aliased to a different value.\n * 'AlreadyAliased' - the datastore has already been previously bound to another alias name.\n */\nexport type AliasResult = \"Success\" | \"Conflict\" | \"AlreadyAliased\";\n\n/**\n * A fluid router with the capability of being assigned an alias\n */\nexport interface IDataStore extends IFluidRouter {\n /**\n * Attempt to assign an alias to the datastore.\n * If the operation succeeds, the datastore can be referenced\n * by the supplied alias and will not be garbage collected.\n *\n * @param alias - Given alias for this datastore.\n */\n trySetAlias(alias: string): Promise<AliasResult>;\n}\n\n/**\n * A reduced set of functionality of IContainerRuntime that a data store context/data store runtime will need\n * TODO: this should be merged into IFluidDataStoreContext\n */\nexport interface IContainerRuntimeBase extends\n IEventProvider<IContainerRuntimeBaseEvents>,\n IProvideFluidHandleContext {\n\n readonly logger: ITelemetryBaseLogger;\n readonly clientDetails: IClientDetails;\n\n /**\n * Invokes the given callback and guarantees that all operations generated within the callback will be ordered\n * sequentially. Total size of all messages must be less than maxOpSize.\n */\n orderSequentially(callback: () => void): void;\n\n /**\n * Sets the flush mode for operations on the document.\n * @deprecated Will be removed in 0.60. See #9480.\n */\n setFlushMode(mode: FlushMode): void;\n\n /**\n * Executes a request against the container runtime\n */\n request(request: IRequest): Promise<IResponse>;\n\n /**\n * Submits a container runtime level signal to be sent to other clients.\n * @param type - Type of the signal.\n * @param content - Content of the signal.\n */\n submitSignal(type: string, content: any): void;\n\n /**\n * @deprecated 0.16 Issue #1537, #3631\n * @internal\n */\n _createDataStoreWithProps(\n pkg: string | string[],\n props?: any,\n id?: string,\n ): Promise<IDataStore>;\n\n /**\n * Creates data store. Returns router of data store. Data store is not bound to container,\n * store in such state is not persisted to storage (file). Storing a handle to this store\n * (or any of its parts, like DDS) into already attached DDS (or non-attached DDS that will eventually\n * gets attached to storage) will result in this store being attached to storage.\n * @param pkg - Package name of the data store factory\n */\n createDataStore(pkg: string | string[]): Promise<IDataStore>;\n\n /**\n * Creates detached data store context. Only after context.attachRuntime() is called,\n * data store initialization is considered complete.\n */\n createDetachedDataStore(pkg: Readonly<string[]>): IFluidDataStoreContextDetached;\n\n /**\n * Get an absolute url for a provided container-relative request.\n * Returns undefined if the container or data store isn't attached to storage.\n * @param relativeUrl - A relative request within the container\n */\n getAbsoluteUrl(relativeUrl: string): Promise<string | undefined>;\n\n uploadBlob(blob: ArrayBufferLike): Promise<IFluidHandle<ArrayBufferLike>>;\n\n /**\n * Returns the current quorum.\n */\n getQuorum(): IQuorumClients;\n\n /**\n * Returns the current audience.\n */\n getAudience(): IAudience;\n}\n\n/**\n * Minimal interface a data store runtime need to provide for IFluidDataStoreContext to bind to control\n *\n * Functionality include attach, snapshot, op/signal processing, request routes,\n * and connection state notifications\n */\nexport interface IFluidDataStoreChannel extends\n IFluidRouter,\n IDisposable {\n\n readonly id: string;\n\n /**\n * Indicates the attachment state of the channel to a host service.\n */\n readonly attachState: AttachState;\n\n readonly visibilityState?: VisibilityState;\n\n /**\n * Runs through the graph and attaches the bound handles. Then binds this runtime to the container.\n * @deprecated This will be removed in favor of {@link IFluidDataStoreChannel.makeVisibleAndAttachGraph}.\n */\n attachGraph(): void;\n\n /**\n * Makes the data store channel visible in the container. Also, runs through its graph and attaches all\n * bound handles that represent its dependencies in the container's graph.\n */\n makeVisibleAndAttachGraph(): void;\n\n /**\n * Retrieves the summary used as part of the initial summary message\n */\n getAttachSummary(telemetryContext?: ITelemetryContext): ISummaryTreeWithStats;\n\n /**\n * Processes the op.\n */\n process(message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown): void;\n\n /**\n * Processes the signal.\n */\n processSignal(message: any, local: boolean): void;\n\n /**\n * Generates a summary for the channel.\n * Introduced with summarizerNode - will be required in a future release.\n * @param fullTree - true to bypass optimizations and force a full summary tree.\n * @param trackState - This tells whether we should track state from this summary.\n * @param telemetryContext - summary data passed through the layers for telemetry purposes\n */\n summarize(\n fullTree?: boolean,\n trackState?: boolean,\n telemetryContext?: ITelemetryContext,\n ): Promise<ISummaryTreeWithStats>;\n\n /**\n * Returns the data used for garbage collection. This includes a list of GC nodes that represent this context\n * including any of its children. Each node has a list of outbound routes to other GC nodes in the document.\n * @param fullGC - true to bypass optimizations and force full generation of GC data.\n */\n getGCData(fullGC?: boolean): Promise<IGarbageCollectionData>;\n\n /**\n * After GC has run, called to notify this channel of routes that are used in it.\n * @param usedRoutes - The routes that are used in this channel.\n * @param gcTimestamp - The time when GC was run that generated these used routes. If any node becomes unreferenced\n * as part of this GC run, this should be used to update the time when it happens.\n */\n updateUsedRoutes(usedRoutes: string[], gcTimestamp?: number): void;\n\n /**\n * Notifies this object about changes in the connection state.\n * @param value - New connection state.\n * @param clientId - ID of the client. It's old ID when in disconnected state and\n * it's new client ID when we are connecting or connected.\n */\n setConnectionState(connected: boolean, clientId?: string);\n\n /**\n * Ask the DDS to resubmit a message. This could be because we reconnected and this message was not acked.\n * @param type - The type of the original message.\n * @param content - The content of the original message.\n * @param localOpMetadata - The local metadata associated with the original message.\n */\n reSubmit(type: string, content: any, localOpMetadata: unknown);\n\n applyStashedOp(content: any): Promise<unknown>;\n\n /**\n * Revert a local message.\n * @param type - The type of the original message.\n * @param content - The content of the original message.\n * @param localOpMetadata - The local metadata associated with the original message.\n */\n rollback?(type: string, content: any, localOpMetadata: unknown): void;\n}\n\nexport type CreateChildSummarizerNodeFn = (\n summarizeInternal: SummarizeInternalFn,\n getGCDataFn: (fullGC?: boolean) => Promise<IGarbageCollectionData>,\n getInitialGCSummaryDetailsFn: () => Promise<IGarbageCollectionSummaryDetails>,\n) => ISummarizerNodeWithGC;\n\nexport interface IFluidDataStoreContextEvents extends IEvent {\n (event: \"attaching\" | \"attached\", listener: () => void);\n}\n\n/**\n * Represents the context for the data store. It is used by the data store runtime to\n * get information and call functionality to the container.\n */\nexport interface IFluidDataStoreContext extends\n IEventProvider<IFluidDataStoreContextEvents>,\n Partial<IProvideFluidDataStoreRegistry>,\n IProvideFluidHandleContext {\n readonly id: string;\n /**\n * A data store created by a client, is a local data store for that client. Also, when a detached container loads\n * from a snapshot, all the data stores are treated as local data stores because at that stage the container\n * still doesn't exists in storage and so the data store couldn't have been created by any other client.\n * Value of this never changes even after the data store is attached.\n * As implementer of data store runtime, you can use this property to check that this data store belongs to this\n * client and hence implement any scenario based on that.\n */\n readonly isLocalDataStore: boolean;\n /**\n * The package path of the data store as per the package factory.\n */\n readonly packagePath: readonly string[];\n readonly options: ILoaderOptions;\n readonly clientId: string | undefined;\n readonly connected: boolean;\n readonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;\n readonly storage: IDocumentStorageService;\n readonly baseSnapshot: ISnapshotTree | undefined;\n readonly logger: ITelemetryBaseLogger;\n readonly clientDetails: IClientDetails;\n /**\n * Indicates the attachment state of the data store to a host service.\n */\n readonly attachState: AttachState;\n\n readonly containerRuntime: IContainerRuntimeBase;\n\n /**\n * @deprecated 0.16 Issue #1635, #3631\n */\n readonly createProps?: any;\n\n /**\n * Ambient services provided with the context\n */\n readonly scope: FluidObject;\n\n /**\n * Returns the current quorum.\n */\n getQuorum(): IQuorumClients;\n\n /**\n * Returns the current audience.\n */\n getAudience(): IAudience;\n\n /**\n * Submits the message to be sent to other clients.\n * @param type - Type of the message.\n * @param content - Content of the message.\n * @param localOpMetadata - The local metadata associated with the message. This is kept locally and not sent to\n * the server. This will be sent back when this message is received back from the server. This is also sent if\n * we are asked to resubmit the message.\n */\n submitMessage(type: string, content: any, localOpMetadata: unknown): void;\n\n /**\n * Submits the signal to be sent to other clients.\n * @param type - Type of the signal.\n * @param content - Content of the signal.\n */\n submitSignal(type: string, content: any): void;\n\n /**\n * Called to make the data store locally visible in the container. This happens automatically for root data stores\n * when they are marked as root. For non-root data stores, this happens when their handle is added to a visible DDS.\n */\n makeLocallyVisible(): void;\n\n /**\n * Call by IFluidDataStoreChannel, indicates that a channel is dirty and needs to be part of the summary.\n * @param address - The address of the channel that is dirty.\n */\n setChannelDirty(address: string): void;\n\n /**\n * Get an absolute url to the container based on the provided relativeUrl.\n * Returns undefined if the container or data store isn't attached to storage.\n * @param relativeUrl - A relative request within the container\n */\n getAbsoluteUrl(relativeUrl: string): Promise<string | undefined>;\n\n getCreateChildSummarizerNodeFn(\n /** Initial id or path part of this node */\n id: string,\n /**\n * Information needed to create the node.\n * If it is from a base summary, it will assert that a summary has been seen.\n * Attach information if it is created from an attach op.\n * If it is local, it will throw unsupported errors on calls to summarize.\n */\n createParam: CreateChildSummarizerNodeParam,\n ): CreateChildSummarizerNodeFn;\n\n uploadBlob(blob: ArrayBufferLike): Promise<IFluidHandle<ArrayBufferLike>>;\n\n /**\n * @deprecated Renamed to {@link IFluidDataStoreContext.getBaseGCDetails}.\n */\n getInitialGCSummaryDetails(): Promise<IGarbageCollectionSummaryDetails>;\n\n /**\n * Returns the GC details in the initial summary of this data store. This is used to initialize the data store\n * and its children with the GC details from the previous summary.\n */\n getBaseGCDetails?(): Promise<IGarbageCollectionDetailsBase>;\n\n /**\n * Called when a new outbound reference is added to another node. This is used by garbage collection to identify\n * all references added in the system.\n * @param srcHandle - The handle of the node that added the reference.\n * @param outboundHandle - The handle of the outbound node that is referenced.\n */\n addedGCOutboundReference?(srcHandle: IFluidHandle, outboundHandle: IFluidHandle): void;\n}\n\nexport interface IFluidDataStoreContextDetached extends IFluidDataStoreContext {\n /**\n * Binds a runtime to the context.\n */\n attachRuntime(\n factory: IProvideFluidDataStoreFactory,\n dataStoreRuntime: IFluidDataStoreChannel,\n ): Promise<void>;\n}\n"]}
1
+ {"version":3,"file":"dataStoreContext.js","sourceRoot":"","sources":["../src/dataStoreContext.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAyCH;;GAEG;AACH,IAAY,SAWX;AAXD,WAAY,SAAS;IACjB;;OAEG;IACH,mDAAS,CAAA;IAET;;;OAGG;IACH,mDAAS,CAAA;AACb,CAAC,EAXW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAWpB;AAED;;;GAGG;AACU,QAAA,eAAe,GAAG;IAC3B,mGAAmG;IACnG,UAAU,EAAE,YAAY;IAExB;;;;OAIG;IACH,cAAc,EAAE,gBAAgB;IAEhC;;;;;;;;OAQG;IACH,eAAe,EAAE,iBAAiB;CACrC,CAAC;AAuHF,8DAA8D;AAC9D,IAAY,SAIX;AAJD,WAAY,SAAS;IACjB,kCAAqB,CAAA;IACrB,gCAAmB,CAAA;IACnB,4BAAe,CAAA;AACnB,CAAC,EAJW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAIpB","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ITelemetryBaseLogger, IDisposable, IEvent, IEventProvider } from \"@fluidframework/common-definitions\";\nimport {\n IFluidRouter,\n IProvideFluidHandleContext,\n IFluidHandle,\n IRequest,\n IResponse,\n FluidObject,\n} from \"@fluidframework/core-interfaces\";\nimport {\n IAudience,\n IDeltaManager,\n AttachState,\n ILoaderOptions,\n} from \"@fluidframework/container-definitions\";\nimport { IDocumentStorageService } from \"@fluidframework/driver-definitions\";\nimport {\n IClientDetails,\n IDocumentMessage,\n IQuorumClients,\n ISequencedDocumentMessage,\n ISnapshotTree,\n} from \"@fluidframework/protocol-definitions\";\nimport { IProvideFluidDataStoreFactory } from \"./dataStoreFactory\";\nimport { IProvideFluidDataStoreRegistry } from \"./dataStoreRegistry\";\nimport {\n IGarbageCollectionData,\n IGarbageCollectionDetailsBase,\n IGarbageCollectionSummaryDetails,\n} from \"./garbageCollection\";\nimport { IInboundSignalMessage } from \"./protocol\";\nimport {\n CreateChildSummarizerNodeParam,\n ISummarizerNodeWithGC,\n ISummaryTreeWithStats,\n ITelemetryContext,\n SummarizeInternalFn,\n} from \"./summary\";\n\n/**\n * Runtime flush mode handling\n */\nexport enum FlushMode {\n /**\n * In Immediate flush mode the runtime will immediately send all operations to the driver layer.\n */\n Immediate,\n\n /**\n * When in TurnBased flush mode the runtime will buffer operations in the current turn and send them as a single\n * batch at the end of the turn. The flush call on the runtime can be used to force send the current batch.\n */\n TurnBased,\n}\n\n/**\n * This tells the visibility state of a Fluid object. It basically tracks whether the object is not visible, visible\n * locally within the container only or visible globally to all clients.\n */\nexport const VisibilityState = {\n /** Indicates that the object is not visible. This is the state when an object is first created. */\n NotVisible: \"NotVisible\",\n\n /**\n * Indicates that the object is visible locally within the container. This is the state when an object is attached\n * to the container's graph but the container itself isn't globally visible. The object's state goes from not\n * visible to locally visible.\n */\n LocallyVisible: \"LocallyVisible\",\n\n /**\n * Indicates that the object is visible globally to all clients. This is the state of an object in 2 scenarios:\n *\n * 1. It is attached to the container's graph when the container is globally visible. The object's state goes from\n * not visible to globally visible.\n *\n * 2. When a container becomes globally visible, all locally visible objects go from locally visible to globally\n * visible.\n */\n GloballyVisible: \"GloballyVisible\",\n};\nexport type VisibilityState = typeof VisibilityState[keyof typeof VisibilityState];\n\nexport interface IContainerRuntimeBaseEvents extends IEvent{\n (event: \"batchBegin\", listener: (op: ISequencedDocumentMessage) => void);\n /**\n * @param runtimeMessage - tells if op is runtime op. If it is, it was unpacked, i.e. it's type and content\n * represent internal container runtime type / content.\n */\n (event: \"op\", listener: (op: ISequencedDocumentMessage, runtimeMessage?: boolean) => void);\n (event: \"batchEnd\", listener: (error: any, op: ISequencedDocumentMessage) => void);\n (event: \"signal\", listener: (message: IInboundSignalMessage, local: boolean) => void);\n}\n\n/**\n * Encapsulates the return codes of the aliasing API.\n *\n * 'Success' - the datastore has been successfully aliased. It can now be used.\n * 'Conflict' - there is already a datastore bound to the provided alias. To acquire a handle to it,\n * use the `IContainerRuntime.getRootDataStore` function. The current datastore should be discarded\n * and will be garbage collected. The current datastore cannot be aliased to a different value.\n * 'AlreadyAliased' - the datastore has already been previously bound to another alias name.\n */\nexport type AliasResult = \"Success\" | \"Conflict\" | \"AlreadyAliased\";\n\n/**\n * A fluid router with the capability of being assigned an alias\n */\nexport interface IDataStore extends IFluidRouter {\n /**\n * Attempt to assign an alias to the datastore.\n * If the operation succeeds, the datastore can be referenced\n * by the supplied alias and will not be garbage collected.\n *\n * @param alias - Given alias for this datastore.\n */\n trySetAlias(alias: string): Promise<AliasResult>;\n}\n\n/**\n * A reduced set of functionality of IContainerRuntime that a data store context/data store runtime will need\n * TODO: this should be merged into IFluidDataStoreContext\n */\nexport interface IContainerRuntimeBase extends\n IEventProvider<IContainerRuntimeBaseEvents>,\n IProvideFluidHandleContext {\n\n readonly logger: ITelemetryBaseLogger;\n readonly clientDetails: IClientDetails;\n\n /**\n * Invokes the given callback and guarantees that all operations generated within the callback will be ordered\n * sequentially. Total size of all messages must be less than maxOpSize.\n */\n orderSequentially(callback: () => void): void;\n\n /**\n * Sets the flush mode for operations on the document.\n * @deprecated Will be removed in 0.60. See #9480.\n */\n setFlushMode(mode: FlushMode): void;\n\n /**\n * Executes a request against the container runtime\n */\n request(request: IRequest): Promise<IResponse>;\n\n /**\n * Submits a container runtime level signal to be sent to other clients.\n * @param type - Type of the signal.\n * @param content - Content of the signal.\n */\n submitSignal(type: string, content: any): void;\n\n /**\n * @deprecated 0.16 Issue #1537, #3631\n * @internal\n */\n _createDataStoreWithProps(\n pkg: string | string[],\n props?: any,\n id?: string,\n ): Promise<IDataStore>;\n\n /**\n * Creates data store. Returns router of data store. Data store is not bound to container,\n * store in such state is not persisted to storage (file). Storing a handle to this store\n * (or any of its parts, like DDS) into already attached DDS (or non-attached DDS that will eventually\n * gets attached to storage) will result in this store being attached to storage.\n * @param pkg - Package name of the data store factory\n */\n createDataStore(pkg: string | string[]): Promise<IDataStore>;\n\n /**\n * Creates detached data store context. Only after context.attachRuntime() is called,\n * data store initialization is considered complete.\n */\n createDetachedDataStore(pkg: Readonly<string[]>): IFluidDataStoreContextDetached;\n\n /**\n * Get an absolute url for a provided container-relative request.\n * Returns undefined if the container or data store isn't attached to storage.\n * @param relativeUrl - A relative request within the container\n */\n getAbsoluteUrl(relativeUrl: string): Promise<string | undefined>;\n\n uploadBlob(blob: ArrayBufferLike): Promise<IFluidHandle<ArrayBufferLike>>;\n\n /**\n * Returns the current quorum.\n */\n getQuorum(): IQuorumClients;\n\n /**\n * Returns the current audience.\n */\n getAudience(): IAudience;\n}\n\n/** @deprecated - Used only in deprecated API bindToContext */\nexport enum BindState {\n NotBound = \"NotBound\",\n Binding = \"Binding\",\n Bound = \"Bound\",\n}\n\n/**\n * Minimal interface a data store runtime need to provide for IFluidDataStoreContext to bind to control\n *\n * Functionality include attach, snapshot, op/signal processing, request routes,\n * and connection state notifications\n */\nexport interface IFluidDataStoreChannel extends\n IFluidRouter,\n IDisposable {\n\n readonly id: string;\n\n /**\n * Indicates the attachment state of the channel to a host service.\n */\n readonly attachState: AttachState;\n\n readonly visibilityState?: VisibilityState;\n\n /**\n * Runs through the graph and attaches the bound handles. Then binds this runtime to the container.\n * @deprecated This will be removed in favor of {@link IFluidDataStoreChannel.makeVisibleAndAttachGraph}.\n */\n attachGraph(): void;\n\n /**\n * Makes the data store channel visible in the container. Also, runs through its graph and attaches all\n * bound handles that represent its dependencies in the container's graph.\n */\n makeVisibleAndAttachGraph(): void;\n\n /**\n * Retrieves the summary used as part of the initial summary message\n */\n getAttachSummary(telemetryContext?: ITelemetryContext): ISummaryTreeWithStats;\n\n /**\n * Processes the op.\n */\n process(message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown): void;\n\n /**\n * Processes the signal.\n */\n processSignal(message: any, local: boolean): void;\n\n /**\n * Generates a summary for the channel.\n * Introduced with summarizerNode - will be required in a future release.\n * @param fullTree - true to bypass optimizations and force a full summary tree.\n * @param trackState - This tells whether we should track state from this summary.\n * @param telemetryContext - summary data passed through the layers for telemetry purposes\n */\n summarize(\n fullTree?: boolean,\n trackState?: boolean,\n telemetryContext?: ITelemetryContext,\n ): Promise<ISummaryTreeWithStats>;\n\n /**\n * Returns the data used for garbage collection. This includes a list of GC nodes that represent this context\n * including any of its children. Each node has a list of outbound routes to other GC nodes in the document.\n * @param fullGC - true to bypass optimizations and force full generation of GC data.\n */\n getGCData(fullGC?: boolean): Promise<IGarbageCollectionData>;\n\n /**\n * After GC has run, called to notify this channel of routes that are used in it.\n * @param usedRoutes - The routes that are used in this channel.\n * @param gcTimestamp - The time when GC was run that generated these used routes. If any node becomes unreferenced\n * as part of this GC run, this should be used to update the time when it happens.\n */\n updateUsedRoutes(usedRoutes: string[], gcTimestamp?: number): void;\n\n /**\n * Notifies this object about changes in the connection state.\n * @param value - New connection state.\n * @param clientId - ID of the client. It's old ID when in disconnected state and\n * it's new client ID when we are connecting or connected.\n */\n setConnectionState(connected: boolean, clientId?: string);\n\n /**\n * Ask the DDS to resubmit a message. This could be because we reconnected and this message was not acked.\n * @param type - The type of the original message.\n * @param content - The content of the original message.\n * @param localOpMetadata - The local metadata associated with the original message.\n */\n reSubmit(type: string, content: any, localOpMetadata: unknown);\n\n applyStashedOp(content: any): Promise<unknown>;\n\n /**\n * Revert a local message.\n * @param type - The type of the original message.\n * @param content - The content of the original message.\n * @param localOpMetadata - The local metadata associated with the original message.\n */\n rollback?(type: string, content: any, localOpMetadata: unknown): void;\n}\n\nexport type CreateChildSummarizerNodeFn = (\n summarizeInternal: SummarizeInternalFn,\n getGCDataFn: (fullGC?: boolean) => Promise<IGarbageCollectionData>,\n getInitialGCSummaryDetailsFn: () => Promise<IGarbageCollectionSummaryDetails>,\n) => ISummarizerNodeWithGC;\n\nexport interface IFluidDataStoreContextEvents extends IEvent {\n (event: \"attaching\" | \"attached\", listener: () => void);\n}\n\n/**\n * Represents the context for the data store. It is used by the data store runtime to\n * get information and call functionality to the container.\n */\nexport interface IFluidDataStoreContext extends\n IEventProvider<IFluidDataStoreContextEvents>,\n Partial<IProvideFluidDataStoreRegistry>,\n IProvideFluidHandleContext {\n readonly id: string;\n /**\n * A data store created by a client, is a local data store for that client. Also, when a detached container loads\n * from a snapshot, all the data stores are treated as local data stores because at that stage the container\n * still doesn't exists in storage and so the data store couldn't have been created by any other client.\n * Value of this never changes even after the data store is attached.\n * As implementer of data store runtime, you can use this property to check that this data store belongs to this\n * client and hence implement any scenario based on that.\n */\n readonly isLocalDataStore: boolean;\n /**\n * The package path of the data store as per the package factory.\n */\n readonly packagePath: readonly string[];\n readonly options: ILoaderOptions;\n readonly clientId: string | undefined;\n readonly connected: boolean;\n readonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;\n readonly storage: IDocumentStorageService;\n readonly baseSnapshot: ISnapshotTree | undefined;\n readonly logger: ITelemetryBaseLogger;\n readonly clientDetails: IClientDetails;\n /**\n * Indicates the attachment state of the data store to a host service.\n */\n readonly attachState: AttachState;\n\n readonly containerRuntime: IContainerRuntimeBase;\n\n /**\n * @deprecated 0.16 Issue #1635, #3631\n */\n readonly createProps?: any;\n\n /**\n * Ambient services provided with the context\n */\n readonly scope: FluidObject;\n\n /**\n * Returns the current quorum.\n */\n getQuorum(): IQuorumClients;\n\n /**\n * Returns the current audience.\n */\n getAudience(): IAudience;\n\n /**\n * Submits the message to be sent to other clients.\n * @param type - Type of the message.\n * @param content - Content of the message.\n * @param localOpMetadata - The local metadata associated with the message. This is kept locally and not sent to\n * the server. This will be sent back when this message is received back from the server. This is also sent if\n * we are asked to resubmit the message.\n */\n submitMessage(type: string, content: any, localOpMetadata: unknown): void;\n\n /**\n * Submits the signal to be sent to other clients.\n * @param type - Type of the signal.\n * @param content - Content of the signal.\n */\n submitSignal(type: string, content: any): void;\n\n /**\n * @deprecated - To be removed in favor of makeVisible.\n * Register the runtime to the container\n */\n bindToContext(): void;\n\n /**\n * Called to make the data store locally visible in the container. This happens automatically for root data stores\n * when they are marked as root. For non-root data stores, this happens when their handle is added to a visible DDS.\n */\n makeLocallyVisible(): void;\n\n /**\n * Call by IFluidDataStoreChannel, indicates that a channel is dirty and needs to be part of the summary.\n * @param address - The address of the channel that is dirty.\n */\n setChannelDirty(address: string): void;\n\n /**\n * Get an absolute url to the container based on the provided relativeUrl.\n * Returns undefined if the container or data store isn't attached to storage.\n * @param relativeUrl - A relative request within the container\n */\n getAbsoluteUrl(relativeUrl: string): Promise<string | undefined>;\n\n getCreateChildSummarizerNodeFn(\n /** Initial id or path part of this node */\n id: string,\n /**\n * Information needed to create the node.\n * If it is from a base summary, it will assert that a summary has been seen.\n * Attach information if it is created from an attach op.\n * If it is local, it will throw unsupported errors on calls to summarize.\n */\n createParam: CreateChildSummarizerNodeParam,\n ): CreateChildSummarizerNodeFn;\n\n uploadBlob(blob: ArrayBufferLike): Promise<IFluidHandle<ArrayBufferLike>>;\n\n /**\n * @deprecated Renamed to {@link IFluidDataStoreContext.getBaseGCDetails}.\n */\n getInitialGCSummaryDetails(): Promise<IGarbageCollectionSummaryDetails>;\n\n /**\n * Returns the GC details in the initial summary of this data store. This is used to initialize the data store\n * and its children with the GC details from the previous summary.\n */\n getBaseGCDetails?(): Promise<IGarbageCollectionDetailsBase>;\n\n /**\n * Called when a new outbound reference is added to another node. This is used by garbage collection to identify\n * all references added in the system.\n * @param srcHandle - The handle of the node that added the reference.\n * @param outboundHandle - The handle of the outbound node that is referenced.\n */\n addedGCOutboundReference?(srcHandle: IFluidHandle, outboundHandle: IFluidHandle): void;\n}\n\nexport interface IFluidDataStoreContextDetached extends IFluidDataStoreContext {\n /**\n * Binds a runtime to the context.\n */\n attachRuntime(\n factory: IProvideFluidDataStoreFactory,\n dataStoreRuntime: IFluidDataStoreChannel,\n ): Promise<void>;\n}\n"]}
package/dist/summary.d.ts CHANGED
@@ -172,16 +172,25 @@ export interface ISummarizerNode {
172
172
  }
173
173
  /**
174
174
  * Extends the functionality of ISummarizerNode to support garbage collection. It adds / updates the following APIs:
175
- * - usedRoutes - The routes in this node that are currently in use.
176
- * - getGCData - A new API that can be used to get the garbage collection data for this node.
177
- * - summarize - Added a trackState flag which indicates whether the summarizer node should track the state of the
178
- * summary or not.
179
- * - createChild - Added the following params:
180
- * - getGCDataFn - This gets the GC data from the caller. This must be provided in order for getGCData to work.
181
- * - getInitialGCDetailsFn - This gets the initial GC details from the caller.
182
- * - deleteChild - Deletes a child node.
183
- * - isReferenced - This tells whether this node is referenced in the document or not.
184
- * - updateUsedRoutes - Used to notify this node of routes that are currently in use in it.
175
+ *
176
+ * `usedRoutes`: The routes in this node that are currently in use.
177
+ *
178
+ * `getGCData`: A new API that can be used to get the garbage collection data for this node.
179
+ *
180
+ * `summarize`: Added a trackState flag which indicates whether the summarizer node should track the state of the
181
+ * summary or not.
182
+ *
183
+ * `createChild`: Added the following params:
184
+ *
185
+ * - `getGCDataFn`: This gets the GC data from the caller. This must be provided in order for getGCData to work.
186
+ *
187
+ * - `getInitialGCDetailsFn`: This gets the initial GC details from the caller.
188
+ *
189
+ * `deleteChild`: Deletes a child node.
190
+ *
191
+ * `isReferenced`: This tells whether this node is referenced in the document or not.
192
+ *
193
+ * `updateUsedRoutes`: Used to notify this node of routes that are currently in use in it.
185
194
  */
186
195
  export interface ISummarizerNodeWithGC extends ISummarizerNode {
187
196
  createChild(
@@ -1 +1 @@
1
- {"version":3,"file":"summary.d.ts","sourceRoot":"","s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AA1B,kCAA0B,KAA1B,kCAA0B,QAIrC;AAuJY,QAAA,gBAAgB,GAAG,WAAW,CAAC;AA8B/B,QAAA,qBAAqB,GAAG,WAAW,CAAC;AAEpC,QAAA,yBAAyB,GAAG,eAAe,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { TelemetryEventPropertyType } from \"@fluidframework/common-definitions\";\nimport {\n SummaryTree,\n ISummaryTree,\n ISequencedDocumentMessage,\n ISnapshotTree,\n ITree,\n} from \"@fluidframework/protocol-definitions\";\nimport {\n IGarbageCollectionData,\n IGarbageCollectionDetailsBase,\n IGarbageCollectionSummaryDetails,\n} from \"./garbageCollection\";\n\n/**\n * Contains the aggregation data from a Tree/Subtree.\n */\nexport interface ISummaryStats {\n treeNodeCount: number;\n blobNodeCount: number;\n handleNodeCount: number;\n totalBlobSize: number;\n unreferencedBlobSize: 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 */\nexport interface ISummaryTreeWithStats {\n /** Represents an aggregation of node counts and blob sizes associated to the current summary information */\n stats: ISummaryStats;\n /**\n * A recursive data structure that will be converted to a snapshot tree and uploaded\n * to the backend.\n */\n summary: ISummaryTree;\n}\n\n/**\n * Represents a summary at a current sequence number.\n */\nexport interface ISummarizeResult {\n stats: ISummaryStats;\n summary: 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 * id:\"\"\n * pathPartsForChildren: [\"path1\"]\n * stats: ...\n * summary:\n * ...\n * \"path1\":\n * ```\n */\nexport interface ISummarizeInternalResult extends ISummarizeResult {\n id: string;\n /** Additional path parts between this node's ID and its children's IDs. */\n pathPartsForChildren?: string[];\n}\n\n/** The garbage collection data of each node in the reference graph. */\nexport interface IGarbageCollectionNodeData {\n /** The set of routes to other nodes in the graph. */\n outboundRoutes: string[];\n /** If the node is unreferenced, the timestamp of when it was marked unreferenced. */\n unreferencedTimestampMs?: number;\n}\n\n/**\n * The garbage collection state of the reference graph. It contains a list of all the nodes in the graph and their\n * GC data.\n */\nexport interface IGarbageCollectionState {\n gcNodes: { [ id: string ]: IGarbageCollectionNodeData; };\n}\n\nexport type SummarizeInternalFn = (\n fullTree: boolean,\n trackState: boolean,\n telemetryContext?: ITelemetryContext,\n) => Promise<ISummarizeInternalResult>;\n\nexport interface ISummarizerNodeConfig {\n /**\n * True to reuse previous handle when unchanged since last acked summary.\n * Defaults to true.\n */\n readonly canReuseHandle?: boolean;\n /**\n * True to always stop execution on error during summarize, or false to\n * attempt creating a summary that is a pointer ot the last acked summary\n * plus outstanding ops in case of internal summarize failure.\n * Defaults to false.\n *\n * BUG BUG: Default to true while we investigate problem\n * with differential summaries\n */\n readonly throwOnFailure?: true;\n}\n\nexport interface ISummarizerNodeConfigWithGC extends ISummarizerNodeConfig {\n /**\n * True if GC is disabled. If so, don't track GC related state for a summary.\n * This is propagated to all child nodes.\n */\n readonly gcDisabled?: boolean;\n}\n\nexport enum CreateSummarizerNodeSource {\n FromSummary,\n FromAttach,\n Local,\n}\nexport type CreateChildSummarizerNodeParam = {\n type: CreateSummarizerNodeSource.FromSummary;\n} | {\n type: CreateSummarizerNodeSource.FromAttach;\n sequenceNumber: number;\n snapshot: ITree;\n} | {\n type: CreateSummarizerNodeSource.Local;\n};\n\nexport interface ISummarizerNode {\n /** Latest successfully acked summary reference sequence number */\n readonly referenceSequenceNumber: number;\n /**\n * Marks the node as having a change with the given sequence number.\n * @param sequenceNumber - sequence number of change\n */\n invalidate(sequenceNumber: number): void;\n /**\n * Calls the internal summarize function and handles internal state tracking.\n * If unchanged and fullTree is false, it will reuse previous summary subtree.\n * If an error is encountered and throwOnFailure is false, it will try to make\n * a summary with a pointer to the previous summary + a blob of outstanding ops.\n * @param fullTree - true to skip optimizations and always generate the full tree\n * @param trackState - indicates whether the summarizer node should track the state of the summary or not\n * @param telemetryContext - summary data passed through the layers for telemetry purposes\n */\n summarize(\n fullTree: boolean,\n trackState?: boolean,\n telemetryContext?: ITelemetryContext,\n ): Promise<ISummarizeResult>;\n /**\n * Checks if there are any additional path parts for children that need to\n * be loaded from the base summary. Additional path parts represent parts\n * of the path between this SummarizerNode and any child SummarizerNodes\n * that it might have. For example: if datastore \"a\" contains dds \"b\", but the\n * path is \"/a/.channels/b\", then the additional path part is \".channels\".\n * @param snapshot - the base summary to parse\n */\n loadBaseSummaryWithoutDifferential(snapshot: ISnapshotTree): void;\n /**\n * Does all the work of loadBaseSummaryWithoutDifferential. Additionally if\n * the base summary is a differential summary containing handle + outstanding ops blob,\n * then this will return the innermost base summary, and update the state by\n * tracking the outstanding ops.\n * @param snapshot - the base summary to parse\n * @param readAndParseBlob - function to read and parse blobs from storage\n * @returns the base summary to be used\n */\n loadBaseSummary(\n snapshot: ISnapshotTree,\n readAndParseBlob: <T>(id: string) => Promise<T>,\n ): Promise<ISnapshotTree>;\n /**\n * Records an op representing a change to this node/subtree.\n * @param op - op of change to record\n */\n recordChange(op: ISequencedDocumentMessage): void;\n\n createChild(\n /** Summarize function */\n summarizeInternalFn: SummarizeInternalFn,\n /** Initial id or path part of this node */\n id: string,\n /**\n * Information needed to create the node.\n * If it is from a base summary, it will assert that a summary has been seen.\n * Attach information if it is created from an attach op.\n * If it is local, it will throw unsupported errors on calls to summarize.\n */\n createParam: CreateChildSummarizerNodeParam,\n /** Optional configuration affecting summarize behavior */\n config?: ISummarizerNodeConfig,\n ): ISummarizerNode;\n\n getChild(id: string): ISummarizerNode | undefined;\n}\n\n/**\n * Extends the functionality of ISummarizerNode to support garbage collection. It adds / updates the following APIs:\n * - usedRoutes - The routes in this node that are currently in use.\n * - getGCData - A new API that can be used to get the garbage collection data for this node.\n * - summarize - Added a trackState flag which indicates whether the summarizer node should track the state of the\n * summary or not.\n * - createChild - Added the following params:\n * - getGCDataFn - This gets the GC data from the caller. This must be provided in order for getGCData to work.\n * - getInitialGCDetailsFn - This gets the initial GC details from the caller.\n * - deleteChild - Deletes a child node.\n * - isReferenced - This tells whether this node is referenced in the document or not.\n * - updateUsedRoutes - Used to notify this node of routes that are currently in use in it.\n */\nexport interface ISummarizerNodeWithGC extends ISummarizerNode {\n createChild(\n /** Summarize function */\n summarizeInternalFn: SummarizeInternalFn,\n /** Initial id or path part of this node */\n id: string,\n /**\n * Information needed to create the node.\n * If it is from a base summary, it will assert that a summary has been seen.\n * Attach information if it is created from an attach op.\n * If it is local, it will throw unsupported errors on calls to summarize.\n */\n createParam: CreateChildSummarizerNodeParam,\n /** Optional configuration affecting summarize behavior */\n config?: ISummarizerNodeConfigWithGC,\n getGCDataFn?: (fullGC?: boolean) => Promise<IGarbageCollectionData>,\n getInitialGCSummaryDetailsFn?: () => Promise<IGarbageCollectionSummaryDetails>,\n ): ISummarizerNodeWithGC;\n\n /**\n * Delete the child with the given id..\n */\n deleteChild(id: string): void;\n\n getChild(id: string): ISummarizerNodeWithGC | undefined;\n\n /**\n * Returns this node's data that is used for garbage collection. This includes a list of GC nodes that represent\n * this node. Each node has a set of outbound routes to other GC nodes in the document.\n * @param fullGC - true to bypass optimizations and force full generation of GC data.\n */\n getGCData(fullGC?: boolean): Promise<IGarbageCollectionData>;\n\n /** Tells whether this node is being referenced in this document or not. Unreferenced node will get GC'd */\n isReferenced(): boolean;\n\n /**\n * After GC has run, called to notify this node of routes that are used in it. These are used for the following:\n * 1. To identify if this node is being referenced in the document or not.\n * 2. To identify if this node or any of its children's used routes changed since last summary.\n *\n * @param usedRoutes - The routes that are used in this node.\n * @param gcTimestamp - The time when GC was run that generated these used routes. If a node becomes unreferenced\n * as part of this GC run, this timestamp is used to update the time when it happens.\n */\n updateUsedRoutes(usedRoutes: string[], gcTimestamp?: number): void;\n\n /**\n * Returns the GC details that may be added to this node's summary.\n *\n * @deprecated Renamed to {@link ISummarizerNodeWithGC.getBaseGCDetails}.\n */\n getGCSummaryDetails(): IGarbageCollectionSummaryDetails;\n\n /** Returns the GC details to be added to this node's summary and is used to initialize new nodes' GC state. */\n getBaseGCDetails?(): IGarbageCollectionDetailsBase;\n}\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 */\nexport interface ITelemetryContext {\n /**\n * Sets value for telemetry data being tracked.\n * @param prefix - unique prefix to tag this data with (ex: \"fluid:map:\")\n * @param property - property name of the telemetry data being tracked (ex: \"DirectoryCount\")\n * @param value - value to attribute to this summary telemetry data\n */\n set(prefix: string, property: string, value: TelemetryEventPropertyType): void;\n\n /**\n * Get the telemetry data being tracked\n * @param prefix - unique prefix for this data (ex: \"fluid:map:\")\n * @param property - property name of the telemetry data being tracked (ex: \"DirectoryCount\")\n * @returns undefined if item not found\n */\n get(prefix: string, property: string): TelemetryEventPropertyType;\n\n /**\n * Returns a serialized version of all the telemetry data.\n * Should be used when logging in telemetry events.\n */\n serialize(): string;\n}\n\nexport const blobCountPropertyName = \"BlobCount\";\n\nexport const totalBlobSizePropertyName = \"TotalBlobSize\";\n"]}
1
+ {"version":3,"file":"summary.js","sourceRoot":"","sources":["../src/summary.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAwHH,IAAY,0BAIX;AAJD,WAAY,0BAA0B;IAClC,yFAAW,CAAA;IACX,uFAAU,CAAA;IACV,6EAAK,CAAA;AACT,CAAC,EAJW,0BAA0B,GAA1B,kCAA0B,KAA1B,kCAA0B,QAIrC;AAgKY,QAAA,gBAAgB,GAAG,WAAW,CAAC;AA8B/B,QAAA,qBAAqB,GAAG,WAAW,CAAC;AAEpC,QAAA,yBAAyB,GAAG,eAAe,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { TelemetryEventPropertyType } from \"@fluidframework/common-definitions\";\nimport {\n SummaryTree,\n ISummaryTree,\n ISequencedDocumentMessage,\n ISnapshotTree,\n ITree,\n} from \"@fluidframework/protocol-definitions\";\nimport {\n IGarbageCollectionData,\n IGarbageCollectionDetailsBase,\n IGarbageCollectionSummaryDetails,\n} from \"./garbageCollection\";\n\n/**\n * Contains the aggregation data from a Tree/Subtree.\n */\nexport interface ISummaryStats {\n treeNodeCount: number;\n blobNodeCount: number;\n handleNodeCount: number;\n totalBlobSize: number;\n unreferencedBlobSize: 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 */\nexport interface ISummaryTreeWithStats {\n /** Represents an aggregation of node counts and blob sizes associated to the current summary information */\n stats: ISummaryStats;\n /**\n * A recursive data structure that will be converted to a snapshot tree and uploaded\n * to the backend.\n */\n summary: ISummaryTree;\n}\n\n/**\n * Represents a summary at a current sequence number.\n */\nexport interface ISummarizeResult {\n stats: ISummaryStats;\n summary: 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 * id:\"\"\n * pathPartsForChildren: [\"path1\"]\n * stats: ...\n * summary:\n * ...\n * \"path1\":\n * ```\n */\nexport interface ISummarizeInternalResult extends ISummarizeResult {\n id: string;\n /** Additional path parts between this node's ID and its children's IDs. */\n pathPartsForChildren?: string[];\n}\n\n/** The garbage collection data of each node in the reference graph. */\nexport interface IGarbageCollectionNodeData {\n /** The set of routes to other nodes in the graph. */\n outboundRoutes: string[];\n /** If the node is unreferenced, the timestamp of when it was marked unreferenced. */\n unreferencedTimestampMs?: number;\n}\n\n/**\n * The garbage collection state of the reference graph. It contains a list of all the nodes in the graph and their\n * GC data.\n */\nexport interface IGarbageCollectionState {\n gcNodes: { [ id: string ]: IGarbageCollectionNodeData; };\n}\n\nexport type SummarizeInternalFn = (\n fullTree: boolean,\n trackState: boolean,\n telemetryContext?: ITelemetryContext,\n) => Promise<ISummarizeInternalResult>;\n\nexport interface ISummarizerNodeConfig {\n /**\n * True to reuse previous handle when unchanged since last acked summary.\n * Defaults to true.\n */\n readonly canReuseHandle?: boolean;\n /**\n * True to always stop execution on error during summarize, or false to\n * attempt creating a summary that is a pointer ot the last acked summary\n * plus outstanding ops in case of internal summarize failure.\n * Defaults to false.\n *\n * BUG BUG: Default to true while we investigate problem\n * with differential summaries\n */\n readonly throwOnFailure?: true;\n}\n\nexport interface ISummarizerNodeConfigWithGC extends ISummarizerNodeConfig {\n /**\n * True if GC is disabled. If so, don't track GC related state for a summary.\n * This is propagated to all child nodes.\n */\n readonly gcDisabled?: boolean;\n}\n\nexport enum CreateSummarizerNodeSource {\n FromSummary,\n FromAttach,\n Local,\n}\nexport type CreateChildSummarizerNodeParam = {\n type: CreateSummarizerNodeSource.FromSummary;\n} | {\n type: CreateSummarizerNodeSource.FromAttach;\n sequenceNumber: number;\n snapshot: ITree;\n} | {\n type: CreateSummarizerNodeSource.Local;\n};\n\nexport interface ISummarizerNode {\n /** Latest successfully acked summary reference sequence number */\n readonly referenceSequenceNumber: number;\n /**\n * Marks the node as having a change with the given sequence number.\n * @param sequenceNumber - sequence number of change\n */\n invalidate(sequenceNumber: number): void;\n /**\n * Calls the internal summarize function and handles internal state tracking.\n * If unchanged and fullTree is false, it will reuse previous summary subtree.\n * If an error is encountered and throwOnFailure is false, it will try to make\n * a summary with a pointer to the previous summary + a blob of outstanding ops.\n * @param fullTree - true to skip optimizations and always generate the full tree\n * @param trackState - indicates whether the summarizer node should track the state of the summary or not\n * @param telemetryContext - summary data passed through the layers for telemetry purposes\n */\n summarize(\n fullTree: boolean,\n trackState?: boolean,\n telemetryContext?: ITelemetryContext,\n ): Promise<ISummarizeResult>;\n /**\n * Checks if there are any additional path parts for children that need to\n * be loaded from the base summary. Additional path parts represent parts\n * of the path between this SummarizerNode and any child SummarizerNodes\n * that it might have. For example: if datastore \"a\" contains dds \"b\", but the\n * path is \"/a/.channels/b\", then the additional path part is \".channels\".\n * @param snapshot - the base summary to parse\n */\n loadBaseSummaryWithoutDifferential(snapshot: ISnapshotTree): void;\n /**\n * Does all the work of loadBaseSummaryWithoutDifferential. Additionally if\n * the base summary is a differential summary containing handle + outstanding ops blob,\n * then this will return the innermost base summary, and update the state by\n * tracking the outstanding ops.\n * @param snapshot - the base summary to parse\n * @param readAndParseBlob - function to read and parse blobs from storage\n * @returns the base summary to be used\n */\n loadBaseSummary(\n snapshot: ISnapshotTree,\n readAndParseBlob: <T>(id: string) => Promise<T>,\n ): Promise<ISnapshotTree>;\n /**\n * Records an op representing a change to this node/subtree.\n * @param op - op of change to record\n */\n recordChange(op: ISequencedDocumentMessage): void;\n\n createChild(\n /** Summarize function */\n summarizeInternalFn: SummarizeInternalFn,\n /** Initial id or path part of this node */\n id: string,\n /**\n * Information needed to create the node.\n * If it is from a base summary, it will assert that a summary has been seen.\n * Attach information if it is created from an attach op.\n * If it is local, it will throw unsupported errors on calls to summarize.\n */\n createParam: CreateChildSummarizerNodeParam,\n /** Optional configuration affecting summarize behavior */\n config?: ISummarizerNodeConfig,\n ): ISummarizerNode;\n\n getChild(id: string): ISummarizerNode | undefined;\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 */\nexport interface ISummarizerNodeWithGC extends ISummarizerNode {\n createChild(\n /** Summarize function */\n summarizeInternalFn: SummarizeInternalFn,\n /** Initial id or path part of this node */\n id: string,\n /**\n * Information needed to create the node.\n * If it is from a base summary, it will assert that a summary has been seen.\n * Attach information if it is created from an attach op.\n * If it is local, it will throw unsupported errors on calls to summarize.\n */\n createParam: CreateChildSummarizerNodeParam,\n /** Optional configuration affecting summarize behavior */\n config?: ISummarizerNodeConfigWithGC,\n getGCDataFn?: (fullGC?: boolean) => Promise<IGarbageCollectionData>,\n getInitialGCSummaryDetailsFn?: () => Promise<IGarbageCollectionSummaryDetails>,\n ): ISummarizerNodeWithGC;\n\n /**\n * Delete the child with the given id..\n */\n deleteChild(id: string): void;\n\n getChild(id: string): ISummarizerNodeWithGC | undefined;\n\n /**\n * Returns this node's data that is used for garbage collection. This includes a list of GC nodes that represent\n * this node. Each node has a set of outbound routes to other GC nodes in the document.\n * @param fullGC - true to bypass optimizations and force full generation of GC data.\n */\n getGCData(fullGC?: boolean): Promise<IGarbageCollectionData>;\n\n /** Tells whether this node is being referenced in this document or not. Unreferenced node will get GC'd */\n isReferenced(): boolean;\n\n /**\n * After GC has run, called to notify this node of routes that are used in it. These are used for the following:\n * 1. To identify if this node is being referenced in the document or not.\n * 2. To identify if this node or any of its children's used routes changed since last summary.\n *\n * @param usedRoutes - The routes that are used in this node.\n * @param gcTimestamp - The time when GC was run that generated these used routes. If a node becomes unreferenced\n * as part of this GC run, this timestamp is used to update the time when it happens.\n */\n updateUsedRoutes(usedRoutes: string[], gcTimestamp?: number): void;\n\n /**\n * Returns the GC details that may be added to this node's summary.\n *\n * @deprecated Renamed to {@link ISummarizerNodeWithGC.getBaseGCDetails}.\n */\n getGCSummaryDetails(): IGarbageCollectionSummaryDetails;\n\n /** Returns the GC details to be added to this node's summary and is used to initialize new nodes' GC state. */\n getBaseGCDetails?(): IGarbageCollectionDetailsBase;\n}\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 */\nexport interface ITelemetryContext {\n /**\n * Sets value for telemetry data being tracked.\n * @param prefix - unique prefix to tag this data with (ex: \"fluid:map:\")\n * @param property - property name of the telemetry data being tracked (ex: \"DirectoryCount\")\n * @param value - value to attribute to this summary telemetry data\n */\n set(prefix: string, property: string, value: TelemetryEventPropertyType): void;\n\n /**\n * Get the telemetry data being tracked\n * @param prefix - unique prefix for this data (ex: \"fluid:map:\")\n * @param property - property name of the telemetry data being tracked (ex: \"DirectoryCount\")\n * @returns undefined if item not found\n */\n get(prefix: string, property: string): TelemetryEventPropertyType;\n\n /**\n * Returns a serialized version of all the telemetry data.\n * Should be used when logging in telemetry events.\n */\n serialize(): string;\n}\n\nexport const blobCountPropertyName = \"BlobCount\";\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.0.0-internal.1.2.0.93071",
3
+ "version": "2.0.0-internal.1.2.1",
4
4
  "description": "Fluid Runtime definitions",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -34,16 +34,16 @@
34
34
  "dependencies": {
35
35
  "@fluidframework/common-definitions": "^0.20.1",
36
36
  "@fluidframework/common-utils": "^1.0.0",
37
- "@fluidframework/container-definitions": "2.0.0-internal.1.2.0.93071",
38
- "@fluidframework/core-interfaces": "2.0.0-internal.1.2.0.93071",
39
- "@fluidframework/driver-definitions": "2.0.0-internal.1.2.0.93071",
37
+ "@fluidframework/container-definitions": "^2.0.0-internal.1.2.1",
38
+ "@fluidframework/core-interfaces": "^2.0.0-internal.1.2.1",
39
+ "@fluidframework/driver-definitions": "^2.0.0-internal.1.2.1",
40
40
  "@fluidframework/protocol-definitions": "^1.0.0",
41
41
  "@types/node": "^14.18.0"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@fluidframework/build-common": "^1.0.0",
45
45
  "@fluidframework/build-tools": "^0.4.4000",
46
- "@fluidframework/eslint-config-fluid": "^0.28.2000",
46
+ "@fluidframework/eslint-config-fluid": "^1.0.0",
47
47
  "@fluidframework/runtime-definitions-previous": "npm:@fluidframework/runtime-definitions@^1.0.0",
48
48
  "@microsoft/api-extractor": "^7.22.2",
49
49
  "@rushstack/eslint-config": "^2.5.1",
@@ -61,7 +61,6 @@
61
61
  "forwardCompat": false
62
62
  },
63
63
  "InterfaceDeclaration_IFluidDataStoreContext": {
64
- "backCompat": false,
65
64
  "forwardCompat": false
66
65
  },
67
66
  "InterfaceDeclaration_IFluidDataStoreChannel": {
@@ -69,7 +68,6 @@
69
68
  "forwardCompat": false
70
69
  },
71
70
  "InterfaceDeclaration_IFluidDataStoreContextDetached": {
72
- "backCompat": false,
73
71
  "forwardCompat": false
74
72
  }
75
73
  }
@@ -75,10 +75,12 @@ export const VisibilityState = {
75
75
 
76
76
  /**
77
77
  * Indicates that the object is visible globally to all clients. This is the state of an object in 2 scenarios:
78
+ *
78
79
  * 1. It is attached to the container's graph when the container is globally visible. The object's state goes from
79
- * not visible to globally visible.
80
+ * not visible to globally visible.
81
+ *
80
82
  * 2. When a container becomes globally visible, all locally visible objects go from locally visible to globally
81
- * visible.
83
+ * visible.
82
84
  */
83
85
  GloballyVisible: "GloballyVisible",
84
86
  };
@@ -200,6 +202,13 @@ export interface IContainerRuntimeBase extends
200
202
  getAudience(): IAudience;
201
203
  }
202
204
 
205
+ /** @deprecated - Used only in deprecated API bindToContext */
206
+ export enum BindState {
207
+ NotBound = "NotBound",
208
+ Binding = "Binding",
209
+ Bound = "Bound",
210
+ }
211
+
203
212
  /**
204
213
  * Minimal interface a data store runtime need to provide for IFluidDataStoreContext to bind to control
205
214
  *
@@ -385,6 +394,12 @@ export interface IFluidDataStoreContext extends
385
394
  */
386
395
  submitSignal(type: string, content: any): void;
387
396
 
397
+ /**
398
+ * @deprecated - To be removed in favor of makeVisible.
399
+ * Register the runtime to the container
400
+ */
401
+ bindToContext(): void;
402
+
388
403
  /**
389
404
  * Called to make the data store locally visible in the container. This happens automatically for root data stores
390
405
  * when they are marked as root. For non-root data stores, this happens when their handle is added to a visible DDS.
package/src/summary.ts CHANGED
@@ -207,16 +207,25 @@ export interface ISummarizerNode {
207
207
 
208
208
  /**
209
209
  * Extends the functionality of ISummarizerNode to support garbage collection. It adds / updates the following APIs:
210
- * - usedRoutes - The routes in this node that are currently in use.
211
- * - getGCData - A new API that can be used to get the garbage collection data for this node.
212
- * - summarize - Added a trackState flag which indicates whether the summarizer node should track the state of the
213
- * summary or not.
214
- * - createChild - Added the following params:
215
- * - getGCDataFn - This gets the GC data from the caller. This must be provided in order for getGCData to work.
216
- * - getInitialGCDetailsFn - This gets the initial GC details from the caller.
217
- * - deleteChild - Deletes a child node.
218
- * - isReferenced - This tells whether this node is referenced in the document or not.
219
- * - updateUsedRoutes - Used to notify this node of routes that are currently in use in it.
210
+ *
211
+ * `usedRoutes`: The routes in this node that are currently in use.
212
+ *
213
+ * `getGCData`: A new API that can be used to get the garbage collection data for this node.
214
+ *
215
+ * `summarize`: Added a trackState flag which indicates whether the summarizer node should track the state of the
216
+ * summary or not.
217
+ *
218
+ * `createChild`: Added the following params:
219
+ *
220
+ * - `getGCDataFn`: This gets the GC data from the caller. This must be provided in order for getGCData to work.
221
+ *
222
+ * - `getInitialGCDetailsFn`: This gets the initial GC details from the caller.
223
+ *
224
+ * `deleteChild`: Deletes a child node.
225
+ *
226
+ * `isReferenced`: This tells whether this node is referenced in the document or not.
227
+ *
228
+ * `updateUsedRoutes`: Used to notify this node of routes that are currently in use in it.
220
229
  */
221
230
  export interface ISummarizerNodeWithGC extends ISummarizerNode {
222
231
  createChild(