@fluidframework/datastore-definitions 0.59.2000-63294 → 0.59.3000-66610
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 +12 -2
- package/dist/channel.d.ts.map +1 -1
- package/dist/channel.js.map +1 -1
- package/package.json +6 -6
- package/src/channel.ts +12 -2
package/dist/channel.d.ts
CHANGED
|
@@ -26,11 +26,13 @@ export interface IChannel extends IFluidLoadable {
|
|
|
26
26
|
*/
|
|
27
27
|
summarize(fullTree?: boolean, trackState?: boolean): Promise<ISummaryTreeWithStats>;
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
29
|
+
* Checks if the channel is attached to storage.
|
|
30
|
+
* @returns True iff the channel is attached.
|
|
30
31
|
*/
|
|
31
32
|
isAttached(): boolean;
|
|
32
33
|
/**
|
|
33
|
-
* Enables the channel to send and receive ops
|
|
34
|
+
* Enables the channel to send and receive ops.
|
|
35
|
+
* @param services - Services to connect to
|
|
34
36
|
*/
|
|
35
37
|
connect(services: IChannelServices): void;
|
|
36
38
|
/**
|
|
@@ -66,6 +68,14 @@ export interface IDeltaHandler {
|
|
|
66
68
|
* @param localOpMetadata - The local metadata associated with the original message.
|
|
67
69
|
*/
|
|
68
70
|
reSubmit(message: any, localOpMetadata: unknown): void;
|
|
71
|
+
/**
|
|
72
|
+
* Apply changes from an op. Used when rehydrating an attached container
|
|
73
|
+
* with pending changes. This prepares the SharedObject for seeing an ACK
|
|
74
|
+
* for the op or resubmitting the op upon reconnection.
|
|
75
|
+
* @param message - Contents of a stashed op.
|
|
76
|
+
* @returns localMetadata of the op, to be passed to process() or resubmit()
|
|
77
|
+
* when the op is ACKed or resubmitted, respectively
|
|
78
|
+
*/
|
|
69
79
|
applyStashedOp(message: any): unknown;
|
|
70
80
|
}
|
|
71
81
|
/**
|
package/dist/channel.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channel.d.ts","sourceRoot":"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AEd;;;;;OAKG;IACH,wBAAwB,CAAC,CAAC,SAAS,EAAE,YAAY,EAAE,cAAc,EAAE,YAAY,GAAG,IAAI,CAAC;CAC1F;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACnC;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;IAEjD;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAEzC;;OAEG;IACH,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;CACzC;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC7B,eAAe,EAAE,gBAAgB,CAAC;IAElC,aAAa,EAAE,sBAAsB,CAAC;CACzC;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC5B;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,QAAQ,CAAC,UAAU,EAAE,kBAAkB,CAAC;IAExC;;;;;;;;;;;;;;OAcG;IACH,IAAI,CACA,OAAO,EAAE,sBAAsB,EAC/B,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,gBAAgB,EAC1B,iBAAiB,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 { 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 synchronously.\n * @returns A tree representing the summary of the channel.\n */\n getAttachSummary(fullTree?: boolean, trackState?: boolean): ISummaryTreeWithStats;\n\n /**\n * Generates summary of the channel asynchronously.\n * This should not be called where the channel can be modified while summarization is in progress.\n * @returns A tree representing the summary of the channel.\n */\n summarize(fullTree?: boolean, trackState?: boolean): Promise<ISummaryTreeWithStats>;\n\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 synchronously.\n * @returns A tree representing the summary of the channel.\n */\n getAttachSummary(fullTree?: boolean, trackState?: boolean): ISummaryTreeWithStats;\n\n /**\n * Generates summary of the channel asynchronously.\n * This should not be called where the channel can be modified while summarization is in progress.\n * @returns A tree representing the summary of the channel.\n */\n summarize(fullTree?: boolean, trackState?: boolean): Promise<ISummaryTreeWithStats>;\n\n /**\n * Checks if the channel is attached to storage.\n * @returns True iff the channel is attached.\n */\n isAttached(): boolean;\n\n /**\n * Enables the channel to send and receive ops.\n * @param services - Services to connect to\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 /**\n * Apply changes from an op. Used when rehydrating an attached container\n * with pending changes. This prepares the SharedObject for seeing an ACK\n * for the op or resubmitting the op upon reconnection.\n * @param message - Contents of a stashed op.\n * @returns localMetadata of the op, to be passed to process() or resubmit()\n * when the op is ACKed or resubmitted, respectively\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"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/datastore-definitions",
|
|
3
|
-
"version": "0.59.
|
|
3
|
+
"version": "0.59.3000-66610",
|
|
4
4
|
"description": "Fluid data store definitions",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -36,13 +36,13 @@
|
|
|
36
36
|
"@fluidframework/container-definitions": "^0.48.1000",
|
|
37
37
|
"@fluidframework/core-interfaces": "^0.43.1000",
|
|
38
38
|
"@fluidframework/protocol-definitions": "^0.1028.1000",
|
|
39
|
-
"@fluidframework/runtime-definitions": "0.59.
|
|
39
|
+
"@fluidframework/runtime-definitions": "0.59.3000-66610",
|
|
40
40
|
"@types/node": "^14.18.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@fluidframework/build-common": "^0.23.0",
|
|
44
|
-
"@fluidframework/datastore-definitions-previous": "npm:@fluidframework/datastore-definitions@0.59.
|
|
45
|
-
"@fluidframework/eslint-config-fluid": "^0.28.
|
|
44
|
+
"@fluidframework/datastore-definitions-previous": "npm:@fluidframework/datastore-definitions@0.59.2000",
|
|
45
|
+
"@fluidframework/eslint-config-fluid": "^0.28.2000-0",
|
|
46
46
|
"@microsoft/api-extractor": "^7.22.2",
|
|
47
47
|
"@rushstack/eslint-config": "^2.5.1",
|
|
48
48
|
"@typescript-eslint/eslint-plugin": "~5.9.0",
|
|
@@ -60,11 +60,11 @@
|
|
|
60
60
|
"eslint-plugin-tsdoc": "~0.2.14",
|
|
61
61
|
"eslint-plugin-unicorn": "~40.0.0",
|
|
62
62
|
"rimraf": "^2.6.2",
|
|
63
|
-
"typescript": "~4.
|
|
63
|
+
"typescript": "~4.5.5",
|
|
64
64
|
"typescript-formatter": "7.1.0"
|
|
65
65
|
},
|
|
66
66
|
"typeValidation": {
|
|
67
|
-
"version": "0.59.
|
|
67
|
+
"version": "0.59.3000",
|
|
68
68
|
"broken": {}
|
|
69
69
|
}
|
|
70
70
|
}
|
package/src/channel.ts
CHANGED
|
@@ -33,12 +33,14 @@ export interface IChannel extends IFluidLoadable {
|
|
|
33
33
|
summarize(fullTree?: boolean, trackState?: boolean): Promise<ISummaryTreeWithStats>;
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
36
|
+
* Checks if the channel is attached to storage.
|
|
37
|
+
* @returns True iff the channel is attached.
|
|
37
38
|
*/
|
|
38
39
|
isAttached(): boolean;
|
|
39
40
|
|
|
40
41
|
/**
|
|
41
|
-
* Enables the channel to send and receive ops
|
|
42
|
+
* Enables the channel to send and receive ops.
|
|
43
|
+
* @param services - Services to connect to
|
|
42
44
|
*/
|
|
43
45
|
connect(services: IChannelServices): void;
|
|
44
46
|
|
|
@@ -79,6 +81,14 @@ export interface IDeltaHandler {
|
|
|
79
81
|
*/
|
|
80
82
|
reSubmit(message: any, localOpMetadata: unknown): void;
|
|
81
83
|
|
|
84
|
+
/**
|
|
85
|
+
* Apply changes from an op. Used when rehydrating an attached container
|
|
86
|
+
* with pending changes. This prepares the SharedObject for seeing an ACK
|
|
87
|
+
* for the op or resubmitting the op upon reconnection.
|
|
88
|
+
* @param message - Contents of a stashed op.
|
|
89
|
+
* @returns localMetadata of the op, to be passed to process() or resubmit()
|
|
90
|
+
* when the op is ACKed or resubmitted, respectively
|
|
91
|
+
*/
|
|
82
92
|
applyStashedOp(message: any): unknown;
|
|
83
93
|
}
|
|
84
94
|
|