@fluidframework/datastore-definitions 0.53.0 → 0.54.0-47413
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/dist/channel.d.ts +8 -1
- package/dist/channel.d.ts.map +1 -1
- package/dist/channel.js.map +1 -1
- package/dist/dataStoreRuntime.d.ts +2 -2
- package/dist/dataStoreRuntime.d.ts.map +1 -1
- package/dist/dataStoreRuntime.js.map +1 -1
- package/package.json +18 -9
- package/src/channel.ts +9 -1
- package/src/dataStoreRuntime.ts +2 -2
package/dist/channel.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import { IFluidLoadable } from "@fluidframework/core-interfaces";
|
|
5
|
+
import { IFluidHandle, IFluidLoadable } from "@fluidframework/core-interfaces";
|
|
6
6
|
import { ISequencedDocumentMessage } from "@fluidframework/protocol-definitions";
|
|
7
7
|
import { IGarbageCollectionData, ISummaryTreeWithStats } from "@fluidframework/runtime-definitions";
|
|
8
8
|
import { IChannelAttributes } from "./storage";
|
|
@@ -84,6 +84,13 @@ export interface IDeltaConnection {
|
|
|
84
84
|
* that needs to be part of the summary but does not generate ops.
|
|
85
85
|
*/
|
|
86
86
|
dirty(): void;
|
|
87
|
+
/**
|
|
88
|
+
* Called when a new outbound reference is added to another node. This is used by garbage collection to identify
|
|
89
|
+
* all references added in the system.
|
|
90
|
+
* @param srcHandle - The handle of the node that added the reference.
|
|
91
|
+
* @param outboundHandle - The handle of the outbound node that is referenced.
|
|
92
|
+
*/
|
|
93
|
+
addedGCOutboundReference?(srcHandle: IFluidHandle, outboundHandle: IFluidHandle): void;
|
|
87
94
|
}
|
|
88
95
|
/**
|
|
89
96
|
* Storage services to read the objects at a given path.
|
package/dist/channel.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../src/channel.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../src/channel.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAC/E,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AACjF,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AACpG,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAE5D,MAAM,WAAW,QAAS,SAAQ,cAAc;IAC5C;;OAEG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAEpB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAExB,QAAQ,CAAC,UAAU,EAAE,kBAAkB,CAAC;IAExC;;;OAGG;IACH,SAAS,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE,OAAO,GAAG,qBAAqB,CAAC;IAE3E;;OAEG;IACH,UAAU,IAAI,OAAO,CAAC;IAEtB;;OAEG;IACH,OAAO,CAAC,QAAQ,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAE1C;;;;OAIG;IACH,SAAS,CAAC,MAAM,CAAC,EAAE,OAAO,GAAG,sBAAsB,CAAC;CACvD;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC1B;;;;;;OAMG;IACH,OAAO,EAAE,CAAC,OAAO,EAAE,yBAAyB,EAAE,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,OAAO,KAAK,IAAI,CAAC;IAEhG;;;OAGG;IACH,kBAAkB,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI,CAAC;IAE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BAAiB,EAAE,QAAQ,CAAC,kBAAkB,CAAC,GAChD,OAAO,CAAC,QAAQ,CAAC,CAAC;IAErB;;;;;;;;;;OAUG;IACH,MAAM,CAAC,OAAO,EAAE,sBAAsB,EAAE,EAAE,EAAE,MAAM,GAAG,QAAQ,CAAC;CACjE"}
|
package/dist/channel.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channel.js","sourceRoot":"","sources":["../src/channel.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IFluidLoadable } from \"@fluidframework/core-interfaces\";\nimport { ISequencedDocumentMessage } from \"@fluidframework/protocol-definitions\";\nimport { IGarbageCollectionData, ISummaryTreeWithStats } from \"@fluidframework/runtime-definitions\";\nimport { IChannelAttributes } from \"./storage\";\nimport { IFluidDataStoreRuntime } from \"./dataStoreRuntime\";\n\nexport interface IChannel extends IFluidLoadable {\n /**\n * A readonly identifier for the channel\n */\n readonly id: string;\n\n readonly owner?: string;\n\n readonly attributes: IChannelAttributes;\n\n /**\n * Generates summary of the channel.\n * @returns A tree representing the summary of the channel.\n */\n summarize(fullTree?: boolean, trackState?: boolean): ISummaryTreeWithStats;\n\n /**\n * True if the data structure is attached to storage.\n */\n isAttached(): boolean;\n\n /**\n * Enables the channel to send and receive ops\n */\n connect(services: IChannelServices): void;\n\n /**\n * Returns the GC data for this channel. It contains a list of GC nodes that contains references to\n * other GC nodes.\n * @param fullGC - true to bypass optimizations and force full generation of GC data.\n */\n getGCData(fullGC?: boolean): IGarbageCollectionData;\n}\n\n/**\n * Handler provided by shared data structure to process requests from the runtime.\n */\nexport interface IDeltaHandler {\n /**\n * Processes the op.\n * @param message - The message to process\n * @param local - Whether the message originated from the local client\n * @param localOpMetadata - For local client messages, this is the metadata that was submitted with the message.\n * For messages from a remote client, this will be undefined.\n */\n process: (message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown) => void;\n\n /**\n * State change events to indicate changes to the delta connection\n * @param connected - true if connected, false otherwise\n */\n setConnectionState(connected: boolean): void;\n\n /**\n * Called when the runtime asks the client to resubmit an op. This may be because the Container reconnected and\n * this op was not acked.\n * The client can choose to resubmit the same message, submit different / multiple messages or not submit anything\n * at all.\n * @param message - The original message that was submitted.\n * @param localOpMetadata - The local metadata associated with the original message.\n */\n reSubmit(message: any, localOpMetadata: unknown): void;\n\n applyStashedOp(message: any): unknown;\n}\n\n/**\n * Interface to represent a connection to a delta notification stream.\n */\nexport interface IDeltaConnection {\n connected: boolean;\n\n /**\n * Send new messages to the server.\n * @param messageContent - The content of the message to be sent.\n * @param localOpMetadata - The local metadata associated with the message. This is kept locally by the runtime\n * and not sent to the server. It will be provided back when this message is acknowledged by the server. It will\n * also be provided back when asked to resubmit the message.\n */\n submit(messageContent: any, localOpMetadata: unknown): void;\n\n /**\n * Attaches a message handler to the delta connection\n */\n attach(handler: IDeltaHandler): void;\n\n /**\n * Indicates that the channel is dirty and needs to be part of the summary. It is called by a SharedSummaryBlock\n * that needs to be part of the summary but does not generate ops.\n */\n dirty(): void;\n}\n\n/**\n * Storage services to read the objects at a given path.\n */\nexport interface IChannelStorageService {\n /**\n * Reads the object contained at the given path. Returns a buffer representation for the object.\n */\n readBlob(path: string): Promise<ArrayBufferLike>;\n\n /**\n * Determines if there is an object contained at the given path.\n */\n contains(path: string): Promise<boolean>;\n\n /**\n * Lists the blobs that exist at a specific path.\n */\n list(path: string): Promise<string[]>;\n}\n\n/**\n * Storage services to read the objects at a given path using the given delta connection.\n */\nexport interface IChannelServices {\n deltaConnection: IDeltaConnection;\n\n objectStorage: IChannelStorageService;\n}\n\n/**\n * Definitions of a channel factory. Factories follow a common model but enable custom behavior.\n */\nexport interface IChannelFactory {\n /**\n * String representing the type of the factory.\n */\n readonly type: string;\n\n /**\n * Attributes of the channel.\n */\n readonly attributes: IChannelAttributes;\n\n /**\n * Loads the given channel. This call is only ever invoked internally as the only thing\n * that is ever directly loaded is the document itself. Load will then only be called on documents that\n * were created and added to a channel.\n * @param runtime - Data store runtime containing state/info/helper methods about the data store.\n * @param id - ID of the channel.\n * @param services - Services to read objects at a given path using the delta connection.\n * @param channelAttributes - The attributes for the the channel to be loaded.\n * @returns The loaded object\n *\n * @privateRemarks\n * Thought: should the storage object include the version information and limit access to just files\n * for the given object? The latter seems good in general. But both are probably good things. We then just\n * need a way to allow the document to provide later storage for the object.\n */\n load(\n runtime: IFluidDataStoreRuntime,\n id: string,\n services: IChannelServices,\n channelAttributes: Readonly<IChannelAttributes>,\n ): Promise<IChannel>;\n\n /**\n * Creates a local version of the channel.\n * Calling attach on the object later will insert it into the object stream.\n * @param runtime - The runtime the new object will be associated with\n * @param id - The unique ID of the new object\n * @returns The newly created object.\n *\n * @privateRemarks\n * NOTE here - When we attach we need to submit all the pending ops prior to actually doing the attach\n * for consistency.\n */\n create(runtime: IFluidDataStoreRuntime, id: string): IChannel;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"channel.js","sourceRoot":"","sources":["../src/channel.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IFluidHandle, IFluidLoadable } from \"@fluidframework/core-interfaces\";\nimport { ISequencedDocumentMessage } from \"@fluidframework/protocol-definitions\";\nimport { IGarbageCollectionData, ISummaryTreeWithStats } from \"@fluidframework/runtime-definitions\";\nimport { IChannelAttributes } from \"./storage\";\nimport { IFluidDataStoreRuntime } from \"./dataStoreRuntime\";\n\nexport interface IChannel extends IFluidLoadable {\n /**\n * A readonly identifier for the channel\n */\n readonly id: string;\n\n readonly owner?: string;\n\n readonly attributes: IChannelAttributes;\n\n /**\n * Generates summary of the channel.\n * @returns A tree representing the summary of the channel.\n */\n summarize(fullTree?: boolean, trackState?: boolean): ISummaryTreeWithStats;\n\n /**\n * True if the data structure is attached to storage.\n */\n isAttached(): boolean;\n\n /**\n * Enables the channel to send and receive ops\n */\n connect(services: IChannelServices): void;\n\n /**\n * Returns the GC data for this channel. It contains a list of GC nodes that contains references to\n * other GC nodes.\n * @param fullGC - true to bypass optimizations and force full generation of GC data.\n */\n getGCData(fullGC?: boolean): IGarbageCollectionData;\n}\n\n/**\n * Handler provided by shared data structure to process requests from the runtime.\n */\nexport interface IDeltaHandler {\n /**\n * Processes the op.\n * @param message - The message to process\n * @param local - Whether the message originated from the local client\n * @param localOpMetadata - For local client messages, this is the metadata that was submitted with the message.\n * For messages from a remote client, this will be undefined.\n */\n process: (message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown) => void;\n\n /**\n * State change events to indicate changes to the delta connection\n * @param connected - true if connected, false otherwise\n */\n setConnectionState(connected: boolean): void;\n\n /**\n * Called when the runtime asks the client to resubmit an op. This may be because the Container reconnected and\n * this op was not acked.\n * The client can choose to resubmit the same message, submit different / multiple messages or not submit anything\n * at all.\n * @param message - The original message that was submitted.\n * @param localOpMetadata - The local metadata associated with the original message.\n */\n reSubmit(message: any, localOpMetadata: unknown): void;\n\n applyStashedOp(message: any): unknown;\n}\n\n/**\n * Interface to represent a connection to a delta notification stream.\n */\nexport interface IDeltaConnection {\n connected: boolean;\n\n /**\n * Send new messages to the server.\n * @param messageContent - The content of the message to be sent.\n * @param localOpMetadata - The local metadata associated with the message. This is kept locally by the runtime\n * and not sent to the server. It will be provided back when this message is acknowledged by the server. It will\n * also be provided back when asked to resubmit the message.\n */\n submit(messageContent: any, localOpMetadata: unknown): void;\n\n /**\n * Attaches a message handler to the delta connection\n */\n attach(handler: IDeltaHandler): void;\n\n /**\n * Indicates that the channel is dirty and needs to be part of the summary. It is called by a SharedSummaryBlock\n * that needs to be part of the summary but does not generate ops.\n */\n dirty(): void;\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\n/**\n * Storage services to read the objects at a given path.\n */\nexport interface IChannelStorageService {\n /**\n * Reads the object contained at the given path. Returns a buffer representation for the object.\n */\n readBlob(path: string): Promise<ArrayBufferLike>;\n\n /**\n * Determines if there is an object contained at the given path.\n */\n contains(path: string): Promise<boolean>;\n\n /**\n * Lists the blobs that exist at a specific path.\n */\n list(path: string): Promise<string[]>;\n}\n\n/**\n * Storage services to read the objects at a given path using the given delta connection.\n */\nexport interface IChannelServices {\n deltaConnection: IDeltaConnection;\n\n objectStorage: IChannelStorageService;\n}\n\n/**\n * Definitions of a channel factory. Factories follow a common model but enable custom behavior.\n */\nexport interface IChannelFactory {\n /**\n * String representing the type of the factory.\n */\n readonly type: string;\n\n /**\n * Attributes of the channel.\n */\n readonly attributes: IChannelAttributes;\n\n /**\n * Loads the given channel. This call is only ever invoked internally as the only thing\n * that is ever directly loaded is the document itself. Load will then only be called on documents that\n * were created and added to a channel.\n * @param runtime - Data store runtime containing state/info/helper methods about the data store.\n * @param id - ID of the channel.\n * @param services - Services to read objects at a given path using the delta connection.\n * @param channelAttributes - The attributes for the the channel to be loaded.\n * @returns The loaded object\n *\n * @privateRemarks\n * Thought: should the storage object include the version information and limit access to just files\n * for the given object? The latter seems good in general. But both are probably good things. We then just\n * need a way to allow the document to provide later storage for the object.\n */\n load(\n runtime: IFluidDataStoreRuntime,\n id: string,\n services: IChannelServices,\n channelAttributes: Readonly<IChannelAttributes>,\n ): Promise<IChannel>;\n\n /**\n * Creates a local version of the channel.\n * Calling attach on the object later will insert it into the object stream.\n * @param runtime - The runtime the new object will be associated with\n * @param id - The unique ID of the new object\n * @returns The newly created object.\n *\n * @privateRemarks\n * NOTE here - When we attach we need to submit all the pending ops prior to actually doing the attach\n * for consistency.\n */\n create(runtime: IFluidDataStoreRuntime, id: string): IChannel;\n}\n"]}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { IDisposable, IEvent, IEventProvider, ITelemetryLogger } from "@fluidframework/common-definitions";
|
|
6
6
|
import { IFluidHandleContext, IFluidSerializer, IFluidRouter, IFluidHandle } from "@fluidframework/core-interfaces";
|
|
7
7
|
import { IAudience, IDeltaManager, ContainerWarning, AttachState, ILoaderOptions } from "@fluidframework/container-definitions";
|
|
8
|
-
import { IDocumentMessage,
|
|
8
|
+
import { IDocumentMessage, IQuorumClients, ISequencedDocumentMessage } from "@fluidframework/protocol-definitions";
|
|
9
9
|
import { IInboundSignalMessage, IProvideFluidDataStoreRegistry } from "@fluidframework/runtime-definitions";
|
|
10
10
|
import { IChannel } from ".";
|
|
11
11
|
export interface IFluidDataStoreRuntimeEvents extends IEvent {
|
|
@@ -65,7 +65,7 @@ export interface IFluidDataStoreRuntime extends IFluidRouter, IEventProvider<IFl
|
|
|
65
65
|
/**
|
|
66
66
|
* Returns the current quorum.
|
|
67
67
|
*/
|
|
68
|
-
getQuorum():
|
|
68
|
+
getQuorum(): IQuorumClients;
|
|
69
69
|
/**
|
|
70
70
|
* Returns the current audience.
|
|
71
71
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataStoreRuntime.d.ts","sourceRoot":"","sources":["../src/dataStoreRuntime.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAC3G,OAAO,EACH,mBAAmB,EACnB,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACf,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACH,SAAS,EACT,aAAa,EACb,gBAAgB,EAChB,WAAW,EACX,cAAc,EACjB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EACH,gBAAgB,EAChB,
|
|
1
|
+
{"version":3,"file":"dataStoreRuntime.d.ts","sourceRoot":"","sources":["../src/dataStoreRuntime.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,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AA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IDisposable, IEvent, IEventProvider, ITelemetryLogger } from \"@fluidframework/common-definitions\";\nimport {\n IFluidHandleContext,\n IFluidSerializer,\n IFluidRouter,\n IFluidHandle,\n} from \"@fluidframework/core-interfaces\";\nimport {\n IAudience,\n IDeltaManager,\n ContainerWarning,\n AttachState,\n ILoaderOptions,\n} from \"@fluidframework/container-definitions\";\nimport {\n IDocumentMessage,\n
|
|
1
|
+
{"version":3,"file":"dataStoreRuntime.js","sourceRoot":"","sources":["../src/dataStoreRuntime.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IDisposable, IEvent, IEventProvider, ITelemetryLogger } from \"@fluidframework/common-definitions\";\nimport {\n IFluidHandleContext,\n IFluidSerializer,\n IFluidRouter,\n IFluidHandle,\n} from \"@fluidframework/core-interfaces\";\nimport {\n IAudience,\n IDeltaManager,\n ContainerWarning,\n AttachState,\n ILoaderOptions,\n} from \"@fluidframework/container-definitions\";\nimport {\n IDocumentMessage,\n IQuorumClients,\n ISequencedDocumentMessage,\n} from \"@fluidframework/protocol-definitions\";\nimport { IInboundSignalMessage, IProvideFluidDataStoreRegistry } from \"@fluidframework/runtime-definitions\";\nimport { IChannel } from \".\";\n\nexport interface IFluidDataStoreRuntimeEvents extends IEvent {\n (\n // eslint-disable-next-line @typescript-eslint/unified-signatures\n event: \"disconnected\" | \"dispose\" | \"attaching\" | \"attached\",\n listener: () => void,\n );\n (event: \"op\", listener: (message: ISequencedDocumentMessage) => void);\n (event: \"signal\", listener: (message: IInboundSignalMessage, local: boolean) => void);\n (event: \"connected\", listener: (clientId: string) => void);\n}\n\n/**\n * Represents the runtime for the data store. Contains helper functions/state of the data store.\n */\nexport interface IFluidDataStoreRuntime extends\n IFluidRouter,\n IEventProvider<IFluidDataStoreRuntimeEvents>,\n IDisposable,\n Partial<IProvideFluidDataStoreRegistry> {\n\n readonly id: string;\n\n /**\n * @deprecated - FluidSerializer is not required as DDSs are the only ones that serialize data.\n */\n readonly IFluidSerializer: IFluidSerializer;\n\n readonly IFluidHandleContext: IFluidHandleContext;\n\n readonly rootRoutingContext: IFluidHandleContext;\n readonly channelsRoutingContext: IFluidHandleContext;\n readonly objectsRoutingContext: IFluidHandleContext;\n\n readonly options: ILoaderOptions;\n\n readonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;\n\n readonly clientId: string | undefined;\n\n readonly connected: boolean;\n\n readonly logger: ITelemetryLogger;\n\n /**\n * Indicates the attachment state of the data store to a host service.\n */\n readonly attachState: AttachState;\n\n /**\n * Returns the channel with the given id\n */\n getChannel(id: string): Promise<IChannel>;\n\n /**\n * Creates a new channel of the given type.\n * @param id - ID of the channel to be created. A unique ID will be generated if left undefined.\n * @param type - Type of the channel.\n */\n createChannel(id: string | undefined, type: string): IChannel;\n\n /**\n * Bind the channel with the data store runtime. If the runtime\n * is attached then we attach the channel to make it live.\n */\n bindChannel(channel: IChannel): void;\n\n // Blob related calls\n /**\n * Api to upload a blob of data.\n * @param blob - blob to be uploaded.\n */\n uploadBlob(blob: ArrayBufferLike): Promise<IFluidHandle<ArrayBufferLike>>;\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 * Returns the current quorum.\n */\n getQuorum(): IQuorumClients;\n\n /**\n * Returns the current audience.\n */\n getAudience(): IAudience;\n\n /**\n * Resolves when a local data store is attached.\n */\n waitAttached(): Promise<void>;\n\n /**\n * Errors raised by distributed data structures\n * @deprecated Warnings are being deprecated\n */\n raiseContainerWarning(warning: ContainerWarning): void;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/datastore-definitions",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.54.0-47413",
|
|
4
4
|
"description": "Fluid data store definitions",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": "https://github.com/microsoft/FluidFramework",
|
|
@@ -33,17 +33,18 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@fluidframework/common-definitions": "^0.20.1",
|
|
35
35
|
"@fluidframework/common-utils": "^0.32.1",
|
|
36
|
-
"@fluidframework/container-definitions": "^0.
|
|
36
|
+
"@fluidframework/container-definitions": "^0.44.0-0",
|
|
37
37
|
"@fluidframework/core-interfaces": "^0.41.0",
|
|
38
38
|
"@fluidframework/protocol-definitions": "^0.1026.0",
|
|
39
|
-
"@fluidframework/runtime-definitions": "
|
|
40
|
-
"@types/node": "^
|
|
39
|
+
"@fluidframework/runtime-definitions": "0.54.0-47413",
|
|
40
|
+
"@types/node": "^14.18.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@fluidframework/build-common": "^0.23.0",
|
|
44
|
-
"@fluidframework/build-tools": "^0.2.
|
|
44
|
+
"@fluidframework/build-tools": "^0.2.46657",
|
|
45
45
|
"@fluidframework/datastore-definitions-0.51.1": "npm:@fluidframework/datastore-definitions@0.51.1",
|
|
46
46
|
"@fluidframework/datastore-definitions-0.52.0": "npm:@fluidframework/datastore-definitions@0.52.0",
|
|
47
|
+
"@fluidframework/datastore-definitions-0.53.0": "npm:@fluidframework/datastore-definitions@0.53.0",
|
|
47
48
|
"@fluidframework/eslint-config-fluid": "^0.24.0",
|
|
48
49
|
"@microsoft/api-extractor": "^7.16.1",
|
|
49
50
|
"@typescript-eslint/eslint-plugin": "~4.14.0",
|
|
@@ -62,23 +63,31 @@
|
|
|
62
63
|
"typescript-formatter": "7.1.0"
|
|
63
64
|
},
|
|
64
65
|
"typeValidation": {
|
|
65
|
-
"version": "0.
|
|
66
|
+
"version": "0.54.0",
|
|
66
67
|
"broken": {
|
|
67
68
|
"0.51.1": {
|
|
68
69
|
"InterfaceDeclaration_IChannel": {
|
|
69
|
-
"backCompat": false
|
|
70
|
+
"backCompat": false,
|
|
71
|
+
"forwardCompat": false
|
|
70
72
|
},
|
|
71
73
|
"InterfaceDeclaration_IChannelFactory": {
|
|
72
|
-
"backCompat": false
|
|
74
|
+
"backCompat": false,
|
|
75
|
+
"forwardCompat": false
|
|
73
76
|
},
|
|
74
77
|
"InterfaceDeclaration_IFluidDataStoreRuntime": {
|
|
75
|
-
"backCompat": false
|
|
78
|
+
"backCompat": false,
|
|
79
|
+
"forwardCompat": false
|
|
76
80
|
}
|
|
77
81
|
},
|
|
78
82
|
"0.52.0": {
|
|
79
83
|
"InterfaceDeclaration_IFluidDataStoreRuntime": {
|
|
80
84
|
"backCompat": false
|
|
81
85
|
}
|
|
86
|
+
},
|
|
87
|
+
"0.53.0": {
|
|
88
|
+
"InterfaceDeclaration_IFluidDataStoreRuntime": {
|
|
89
|
+
"backCompat": false
|
|
90
|
+
}
|
|
82
91
|
}
|
|
83
92
|
}
|
|
84
93
|
}
|
package/src/channel.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { IFluidLoadable } from "@fluidframework/core-interfaces";
|
|
6
|
+
import { IFluidHandle, IFluidLoadable } from "@fluidframework/core-interfaces";
|
|
7
7
|
import { ISequencedDocumentMessage } from "@fluidframework/protocol-definitions";
|
|
8
8
|
import { IGarbageCollectionData, ISummaryTreeWithStats } from "@fluidframework/runtime-definitions";
|
|
9
9
|
import { IChannelAttributes } from "./storage";
|
|
@@ -100,6 +100,14 @@ export interface IDeltaConnection {
|
|
|
100
100
|
* that needs to be part of the summary but does not generate ops.
|
|
101
101
|
*/
|
|
102
102
|
dirty(): void;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Called when a new outbound reference is added to another node. This is used by garbage collection to identify
|
|
106
|
+
* all references added in the system.
|
|
107
|
+
* @param srcHandle - The handle of the node that added the reference.
|
|
108
|
+
* @param outboundHandle - The handle of the outbound node that is referenced.
|
|
109
|
+
*/
|
|
110
|
+
addedGCOutboundReference?(srcHandle: IFluidHandle, outboundHandle: IFluidHandle): void;
|
|
103
111
|
}
|
|
104
112
|
|
|
105
113
|
/**
|
package/src/dataStoreRuntime.ts
CHANGED
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
} from "@fluidframework/container-definitions";
|
|
20
20
|
import {
|
|
21
21
|
IDocumentMessage,
|
|
22
|
-
|
|
22
|
+
IQuorumClients,
|
|
23
23
|
ISequencedDocumentMessage,
|
|
24
24
|
} from "@fluidframework/protocol-definitions";
|
|
25
25
|
import { IInboundSignalMessage, IProvideFluidDataStoreRegistry } from "@fluidframework/runtime-definitions";
|
|
@@ -108,7 +108,7 @@ export interface IFluidDataStoreRuntime extends
|
|
|
108
108
|
/**
|
|
109
109
|
* Returns the current quorum.
|
|
110
110
|
*/
|
|
111
|
-
getQuorum():
|
|
111
|
+
getQuorum(): IQuorumClients;
|
|
112
112
|
|
|
113
113
|
/**
|
|
114
114
|
* Returns the current audience.
|