@fluidframework/container-definitions 2.5.0 → 2.10.0-305357
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/api-report/container-definitions.legacy.alpha.api.md +0 -4
- package/dist/deltas.d.ts +19 -12
- package/dist/deltas.d.ts.map +1 -1
- package/dist/deltas.js +9 -0
- package/dist/deltas.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/lib/deltas.d.ts +19 -12
- package/lib/deltas.d.ts.map +1 -1
- package/lib/deltas.js +7 -1
- package/lib/deltas.js.map +1 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/package.json +17 -7
- package/src/deltas.ts +27 -14
- package/src/index.ts +2 -0
|
@@ -204,8 +204,6 @@ export interface IDeltaManager<T, U> extends IEventProvider<IDeltaManagerEvents>
|
|
|
204
204
|
readonly active: boolean;
|
|
205
205
|
readonly clientDetails: IClientDetails;
|
|
206
206
|
readonly hasCheckpointSequenceNumber: boolean;
|
|
207
|
-
// @deprecated
|
|
208
|
-
readonly inbound: IDeltaQueue<T>;
|
|
209
207
|
readonly inboundSignal: IDeltaQueue<ISignalMessage>;
|
|
210
208
|
readonly initialSequenceNumber: number;
|
|
211
209
|
readonly lastKnownSeqNumber: number;
|
|
@@ -213,8 +211,6 @@ export interface IDeltaManager<T, U> extends IEventProvider<IDeltaManagerEvents>
|
|
|
213
211
|
readonly lastSequenceNumber: number;
|
|
214
212
|
readonly maxMessageSize: number;
|
|
215
213
|
readonly minimumSequenceNumber: number;
|
|
216
|
-
// @deprecated
|
|
217
|
-
readonly outbound: IDeltaQueue<U[]>;
|
|
218
214
|
// (undocumented)
|
|
219
215
|
readonly readOnlyInfo: ReadOnlyInfo;
|
|
220
216
|
readonly serviceConfiguration: IClientConfiguration | undefined;
|
package/dist/deltas.d.ts
CHANGED
|
@@ -121,18 +121,6 @@ export interface IDeltaManagerEvents extends IEvent {
|
|
|
121
121
|
* @alpha
|
|
122
122
|
*/
|
|
123
123
|
export interface IDeltaManager<T, U> extends IEventProvider<IDeltaManagerEvents>, IDeltaSender {
|
|
124
|
-
/**
|
|
125
|
-
* The queue of inbound delta messages
|
|
126
|
-
* @deprecated Do not use, for internal use only. There are a lot of complications in core pieces of the runtime
|
|
127
|
-
* may break if this is used directly. For example summarization and op processing.
|
|
128
|
-
*/
|
|
129
|
-
readonly inbound: IDeltaQueue<T>;
|
|
130
|
-
/**
|
|
131
|
-
* The queue of outbound delta messages
|
|
132
|
-
* @deprecated Do not use, for internal use only. There are a lot of complications in core pieces of the runtime
|
|
133
|
-
* may break if this is used directly. For example op submission
|
|
134
|
-
*/
|
|
135
|
-
readonly outbound: IDeltaQueue<U[]>;
|
|
136
124
|
/**
|
|
137
125
|
* The queue of inbound delta signals
|
|
138
126
|
*/
|
|
@@ -188,6 +176,25 @@ export interface IDeltaManager<T, U> extends IEventProvider<IDeltaManagerEvents>
|
|
|
188
176
|
*/
|
|
189
177
|
submitSignal(content: any, targetClientId?: string): void;
|
|
190
178
|
}
|
|
179
|
+
/**
|
|
180
|
+
* DeltaManager which is used internally by the Fluid layers and not exposed to the end users.
|
|
181
|
+
* @internal
|
|
182
|
+
*/
|
|
183
|
+
export interface IDeltaManagerFull<T = ISequencedDocumentMessage, U = IDocumentMessage> extends IDeltaManager<T, U> {
|
|
184
|
+
/**
|
|
185
|
+
* The queue of inbound delta messages
|
|
186
|
+
*/
|
|
187
|
+
readonly inbound: IDeltaQueue<T>;
|
|
188
|
+
/**
|
|
189
|
+
* The queue of outbound delta messages
|
|
190
|
+
*/
|
|
191
|
+
readonly outbound: IDeltaQueue<U[]>;
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Type guard to check if the given deltaManager is of type {@link @fluidframework/container-definitions#IDeltaManagerFull}.
|
|
195
|
+
* @internal
|
|
196
|
+
*/
|
|
197
|
+
export declare function isIDeltaManagerFull(deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>): deltaManager is IDeltaManagerFull;
|
|
191
198
|
/**
|
|
192
199
|
* Events emitted by {@link IDeltaQueue}.
|
|
193
200
|
* @sealed
|
package/dist/deltas.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deltas.d.ts","sourceRoot":"","sources":["../src/deltas.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACX,WAAW,EACX,UAAU,EACV,WAAW,EACX,MAAM,EACN,cAAc,EACd,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,KAAK,EACX,eAAe,EACf,oBAAoB,EACpB,gBAAgB,EAChB,YAAY,EACZ,yBAAyB,EACzB,cAAc,EACd,MAAM,6CAA6C,CAAC;AAErD;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IAClC;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB,MAAM,EAAE,YAAY,CAAC;IACrB,oBAAoB,EAAE,oBAAoB,CAAC;IAE3C;;;;;;;;;OASG;IACH,wBAAwB,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7C;AAED;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC5B;;OAEG;IACH,KAAK,IAAI,IAAI,CAAC;CACd;AAED;;;;;GAKG;AACH,MAAM,WAAW,mBAAoB,SAAQ,MAAM;IAClD;;OAEG;IAEH,CAAC,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,CAAC,aAAa,EAAE,GAAG,EAAE,KAAK,IAAI,OAAE;IAEjE;;OAEG;IACH,CAAC,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,IAAI,OAAE;IAEnE;;;;;;;;;;;;;;OAcG;IACH,CACC,KAAK,EAAE,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QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACvE;AAED;;;GAGG;AACH,MAAM,MAAM,YAAY,GACrB;IACA,QAAQ,CAAC,QAAQ,EAAE,KAAK,GAAG,SAAS,CAAC;CACpC,GACD;IACA,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC;IAExB;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IAEzB;;OAEG;IACH,QAAQ,CAAC,WAAW,EAAE,OAAO,GAAG,SAAS,CAAC;IAE1C;;OAEG;IACH,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAE9B;;;;OAIG;IACH,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;CACnC,CAAC"}
|
package/dist/deltas.js
CHANGED
|
@@ -4,4 +4,13 @@
|
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.isIDeltaManagerFull = void 0;
|
|
8
|
+
/**
|
|
9
|
+
* Type guard to check if the given deltaManager is of type {@link @fluidframework/container-definitions#IDeltaManagerFull}.
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
function isIDeltaManagerFull(deltaManager) {
|
|
13
|
+
return "inbound" in deltaManager && "outbound" in deltaManager;
|
|
14
|
+
}
|
|
15
|
+
exports.isIDeltaManagerFull = isIDeltaManagerFull;
|
|
7
16
|
//# sourceMappingURL=deltas.js.map
|
package/dist/deltas.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deltas.js","sourceRoot":"","sources":["../src/deltas.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 type {\n\tIDisposable,\n\tIErrorBase,\n\tIErrorEvent,\n\tIEvent,\n\tIEventProvider,\n} from \"@fluidframework/core-interfaces\";\nimport type { IClientDetails } from \"@fluidframework/driver-definitions\";\nimport type {\n\tIAnyDriverError,\n\tIClientConfiguration,\n\tIDocumentMessage,\n\tITokenClaims,\n\tISequencedDocumentMessage,\n\tISignalMessage,\n} from \"@fluidframework/driver-definitions/internal\";\n\n/**\n * Contract representing the result of a newly established connection to the server for syncing deltas.\n * @legacy\n * @alpha\n */\nexport interface IConnectionDetails {\n\t/**\n\t * The client's unique identifier assigned by the service.\n\t *\n\t * @remarks It is not stable across reconnections.\n\t */\n\tclientId: string;\n\n\tclaims: ITokenClaims;\n\tserviceConfiguration: IClientConfiguration;\n\n\t/**\n\t * Last known sequence number to ordering service at the time of connection.\n\t *\n\t * @remarks\n\t *\n\t * It may lag behind the actual last sequence number (quite a bit, if the container is very active),\n\t * but it's the best information the client has to figure out how far behind it is, at least\n\t * for \"read\" connections. \"write\" connections may use the client's own \"join\" op to obtain similar\n\t * information which is likely to be more up-to-date.\n\t */\n\tcheckpointSequenceNumber: number | undefined;\n}\n\n/**\n * Contract supporting delivery of outbound messages to the server\n * @sealed\n * @legacy\n * @alpha\n */\nexport interface IDeltaSender {\n\t/**\n\t * Flush all pending messages through the outbound queue\n\t */\n\tflush(): void;\n}\n\n/**\n * Events emitted by {@link IDeltaManager}.\n * @sealed\n * @legacy\n * @alpha\n */\nexport interface IDeltaManagerEvents extends IEvent {\n\t/**\n\t * @deprecated No replacement API recommended.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t(event: \"prepareSend\", listener: (messageBuffer: any[]) => void);\n\n\t/**\n\t * @deprecated No replacement API recommended.\n\t */\n\t(event: \"submitOp\", listener: (message: IDocumentMessage) => void);\n\n\t/**\n\t * Emitted immediately after processing an incoming operation (op).\n\t *\n\t * @remarks\n\t *\n\t * Note: this event is not intended for general use.\n\t * Prefer to listen to events on the appropriate ultimate recipients of the ops, rather than listening to the\n\t * ops directly on the {@link IDeltaManager}.\n\t *\n\t * Listener parameters:\n\t *\n\t * - `message`: The op that was processed.\n\t *\n\t * - `processingTime`: The amount of time it took to process the inbound operation (op), expressed in milliseconds.\n\t */\n\t(\n\t\tevent: \"op\",\n\t\tlistener: (message: ISequencedDocumentMessage, processingTime: number) => void,\n\t);\n\n\t/**\n\t * Emitted periodically with latest information on network roundtrip latency\n\t */\n\t(event: \"pong\", listener: (latency: number) => void);\n\n\t/**\n\t * Emitted when the {@link IDeltaManager} completes connecting to the Fluid service.\n\t *\n\t * @remarks\n\t * This occurs once we've received the connect_document_success message from the server,\n\t * and happens prior to the client's join message (if there is a join message).\n\t *\n\t * Listener parameters:\n\t *\n\t * - `details`: Connection metadata.\n\t *\n\t * - `opsBehind`: An estimate of far behind the client is relative to the service in terms of ops.\n\t * Will not be specified if an estimate cannot be determined.\n\t */\n\t(event: \"connect\", listener: (details: IConnectionDetails, opsBehind?: number) => void);\n\n\t/**\n\t * Emitted when the {@link IDeltaManager} becomes disconnected from the Fluid service.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `reason`: Describes the reason for which the delta manager was disconnected.\n\t * - `error` : error if any for the disconnect.\n\t */\n\t(event: \"disconnect\", listener: (reason: string, error?: IAnyDriverError) => void);\n\n\t/**\n\t * Emitted when read/write permissions change.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `readonly`: Whether or not the delta manager is now read-only.\n\t */\n\t(\n\t\tevent: \"readonly\",\n\t\tlistener: (\n\t\t\treadonly: boolean,\n\t\t\treadonlyConnectionReason?: { reason: string; error?: IErrorBase },\n\t\t) => void,\n\t);\n}\n\n/**\n * Manages the transmission of ops between the runtime and storage.\n * @sealed\n * @legacy\n * @alpha\n */\nexport interface IDeltaManager<T, U>\n\textends IEventProvider<IDeltaManagerEvents>,\n\t\tIDeltaSender {\n\t/**\n\t * The queue of inbound delta messages\n\t * @deprecated Do not use, for internal use only. There are a lot of complications in core pieces of the runtime\n\t * may break if this is used directly. For example summarization and op processing.\n\t */\n\treadonly inbound: IDeltaQueue<T>;\n\n\t/**\n\t * The queue of outbound delta messages\n\t * @deprecated Do not use, for internal use only. There are a lot of complications in core pieces of the runtime\n\t * may break if this is used directly. For example op submission\n\t */\n\treadonly outbound: IDeltaQueue<U[]>;\n\n\t/**\n\t * The queue of inbound delta signals\n\t */\n\treadonly inboundSignal: IDeltaQueue<ISignalMessage>;\n\n\t/**\n\t * The current minimum sequence number\n\t */\n\treadonly minimumSequenceNumber: number;\n\n\t/**\n\t * The last sequence number processed by the delta manager\n\t */\n\treadonly lastSequenceNumber: number;\n\n\t/**\n\t * The last message processed by the delta manager\n\t */\n\treadonly lastMessage: ISequencedDocumentMessage | undefined;\n\n\t/**\n\t * The latest sequence number the delta manager is aware of\n\t */\n\treadonly lastKnownSeqNumber: number;\n\n\t/**\n\t * The initial sequence number set when attaching the op handler\n\t */\n\treadonly initialSequenceNumber: number;\n\n\t/**\n\t * Tells if current connection has checkpoint information.\n\t * I.e. we know how far behind the client was at the time of establishing connection\n\t */\n\treadonly hasCheckpointSequenceNumber: boolean;\n\n\t/**\n\t * Details of client\n\t */\n\treadonly clientDetails: IClientDetails;\n\n\t/**\n\t * Protocol version being used to communicate with the service\n\t */\n\treadonly version: string;\n\n\t/**\n\t * Max message size allowed to the delta manager\n\t */\n\treadonly maxMessageSize: number;\n\n\t/**\n\t * Service configuration provided by the service.\n\t */\n\treadonly serviceConfiguration: IClientConfiguration | undefined;\n\n\t/**\n\t * Flag to indicate whether the client can write or not.\n\t */\n\treadonly active: boolean;\n\n\treadonly readOnlyInfo: ReadOnlyInfo;\n\n\t/**\n\t * Submit a signal to the service to be broadcast to other connected clients, but not persisted\n\t */\n\t// TODO: use `unknown` instead (API breaking)\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tsubmitSignal(content: any, targetClientId?: string): void;\n}\n\n/**\n * Events emitted by {@link IDeltaQueue}.\n * @sealed\n * @legacy\n * @alpha\n */\nexport interface IDeltaQueueEvents<T> extends IErrorEvent {\n\t/**\n\t * Emitted when a task is enqueued.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `task`: The task being enqueued.\n\t */\n\t(event: \"push\", listener: (task: T) => void);\n\n\t/**\n\t * Emitted immediately after processing an enqueued task and removing it from the queue.\n\t *\n\t * @remarks\n\t *\n\t * Note: this event is not intended for general use.\n\t * Prefer to listen to events on the appropriate ultimate recipients of the ops, rather than listening to the\n\t * ops directly on the {@link IDeltaQueue}.\n\t *\n\t * Listener parameters:\n\t *\n\t * - `task`: The task that was processed.\n\t */\n\t(event: \"op\", listener: (task: T) => void);\n\n\t/**\n\t * Emitted when the queue of tasks to process is emptied.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `count`: The number of events (`T`) processed before becoming idle.\n\t *\n\t * - `duration`: The amount of time it took to process elements (in milliseconds).\n\t *\n\t * @see {@link IDeltaQueue.idle}\n\t */\n\t(event: \"idle\", listener: (count: number, duration: number) => void);\n}\n\n/**\n * Queue of ops to be sent to or processed from storage\n * @sealed\n * @legacy\n * @alpha\n */\nexport interface IDeltaQueue<T> extends IEventProvider<IDeltaQueueEvents<T>>, IDisposable {\n\t/**\n\t * Flag indicating whether or not the queue was paused\n\t */\n\tpaused: boolean;\n\n\t/**\n\t * The number of messages remaining in the queue\n\t */\n\tlength: number;\n\n\t/**\n\t * Flag indicating whether or not the queue is idle.\n\t * I.e. there are no remaining messages to processes.\n\t */\n\tidle: boolean;\n\n\t/**\n\t * Pauses processing on the queue.\n\t *\n\t * @returns A promise which resolves when processing has been paused.\n\t */\n\tpause(): Promise<void>;\n\n\t/**\n\t * Resumes processing on the queue\n\t */\n\tresume(): void;\n\n\t/**\n\t * Peeks at the next message in the queue\n\t */\n\tpeek(): T | undefined;\n\n\t/**\n\t * Returns all the items in the queue as an array. Does not remove them from the queue.\n\t */\n\ttoArray(): T[];\n\n\t/**\n\t * returns number of ops processed and time it took to process these ops.\n\t * Zeros if queue did not process anything (had no messages, was paused or had hit an error before)\n\t */\n\twaitTillProcessingDone(): Promise<{ count: number; duration: number }>;\n}\n\n/**\n * @legacy\n * @alpha\n */\nexport type ReadOnlyInfo =\n\t| {\n\t\t\treadonly readonly: false | undefined;\n\t }\n\t| {\n\t\t\treadonly readonly: true;\n\n\t\t\t/**\n\t\t\t * Read-only because `forceReadOnly()` was called.\n\t\t\t */\n\t\t\treadonly forced: boolean;\n\n\t\t\t/**\n\t\t\t * Read-only because client does not have write permissions for document.\n\t\t\t */\n\t\t\treadonly permissions: boolean | undefined;\n\n\t\t\t/**\n\t\t\t * Read-only with no delta stream connection.\n\t\t\t */\n\t\t\treadonly storageOnly: boolean;\n\n\t\t\t/**\n\t\t\t * Extra info on why connection to delta stream is not possible.\n\t\t\t *\n\t\t\t * @remarks This info might be provided if {@link ReadOnlyInfo.storageOnly} is set to `true`.\n\t\t\t */\n\t\t\treadonly storageOnlyReason?: string;\n\t };\n"]}
|
|
1
|
+
{"version":3,"file":"deltas.js","sourceRoot":"","sources":["../src/deltas.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAmPH;;;GAGG;AACH,SAAgB,mBAAmB,CAClC,YAAwE;IAExE,OAAO,SAAS,IAAI,YAAY,IAAI,UAAU,IAAI,YAAY,CAAC;AAChE,CAAC;AAJD,kDAIC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tIDisposable,\n\tIErrorBase,\n\tIErrorEvent,\n\tIEvent,\n\tIEventProvider,\n} from \"@fluidframework/core-interfaces\";\nimport type { IClientDetails } from \"@fluidframework/driver-definitions\";\nimport type {\n\tIAnyDriverError,\n\tIClientConfiguration,\n\tIDocumentMessage,\n\tITokenClaims,\n\tISequencedDocumentMessage,\n\tISignalMessage,\n} from \"@fluidframework/driver-definitions/internal\";\n\n/**\n * Contract representing the result of a newly established connection to the server for syncing deltas.\n * @legacy\n * @alpha\n */\nexport interface IConnectionDetails {\n\t/**\n\t * The client's unique identifier assigned by the service.\n\t *\n\t * @remarks It is not stable across reconnections.\n\t */\n\tclientId: string;\n\n\tclaims: ITokenClaims;\n\tserviceConfiguration: IClientConfiguration;\n\n\t/**\n\t * Last known sequence number to ordering service at the time of connection.\n\t *\n\t * @remarks\n\t *\n\t * It may lag behind the actual last sequence number (quite a bit, if the container is very active),\n\t * but it's the best information the client has to figure out how far behind it is, at least\n\t * for \"read\" connections. \"write\" connections may use the client's own \"join\" op to obtain similar\n\t * information which is likely to be more up-to-date.\n\t */\n\tcheckpointSequenceNumber: number | undefined;\n}\n\n/**\n * Contract supporting delivery of outbound messages to the server\n * @sealed\n * @legacy\n * @alpha\n */\nexport interface IDeltaSender {\n\t/**\n\t * Flush all pending messages through the outbound queue\n\t */\n\tflush(): void;\n}\n\n/**\n * Events emitted by {@link IDeltaManager}.\n * @sealed\n * @legacy\n * @alpha\n */\nexport interface IDeltaManagerEvents extends IEvent {\n\t/**\n\t * @deprecated No replacement API recommended.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t(event: \"prepareSend\", listener: (messageBuffer: any[]) => void);\n\n\t/**\n\t * @deprecated No replacement API recommended.\n\t */\n\t(event: \"submitOp\", listener: (message: IDocumentMessage) => void);\n\n\t/**\n\t * Emitted immediately after processing an incoming operation (op).\n\t *\n\t * @remarks\n\t *\n\t * Note: this event is not intended for general use.\n\t * Prefer to listen to events on the appropriate ultimate recipients of the ops, rather than listening to the\n\t * ops directly on the {@link IDeltaManager}.\n\t *\n\t * Listener parameters:\n\t *\n\t * - `message`: The op that was processed.\n\t *\n\t * - `processingTime`: The amount of time it took to process the inbound operation (op), expressed in milliseconds.\n\t */\n\t(\n\t\tevent: \"op\",\n\t\tlistener: (message: ISequencedDocumentMessage, processingTime: number) => void,\n\t);\n\n\t/**\n\t * Emitted periodically with latest information on network roundtrip latency\n\t */\n\t(event: \"pong\", listener: (latency: number) => void);\n\n\t/**\n\t * Emitted when the {@link IDeltaManager} completes connecting to the Fluid service.\n\t *\n\t * @remarks\n\t * This occurs once we've received the connect_document_success message from the server,\n\t * and happens prior to the client's join message (if there is a join message).\n\t *\n\t * Listener parameters:\n\t *\n\t * - `details`: Connection metadata.\n\t *\n\t * - `opsBehind`: An estimate of far behind the client is relative to the service in terms of ops.\n\t * Will not be specified if an estimate cannot be determined.\n\t */\n\t(event: \"connect\", listener: (details: IConnectionDetails, opsBehind?: number) => void);\n\n\t/**\n\t * Emitted when the {@link IDeltaManager} becomes disconnected from the Fluid service.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `reason`: Describes the reason for which the delta manager was disconnected.\n\t * - `error` : error if any for the disconnect.\n\t */\n\t(event: \"disconnect\", listener: (reason: string, error?: IAnyDriverError) => void);\n\n\t/**\n\t * Emitted when read/write permissions change.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `readonly`: Whether or not the delta manager is now read-only.\n\t */\n\t(\n\t\tevent: \"readonly\",\n\t\tlistener: (\n\t\t\treadonly: boolean,\n\t\t\treadonlyConnectionReason?: { reason: string; error?: IErrorBase },\n\t\t) => void,\n\t);\n}\n\n/**\n * Manages the transmission of ops between the runtime and storage.\n * @sealed\n * @legacy\n * @alpha\n */\nexport interface IDeltaManager<T, U>\n\textends IEventProvider<IDeltaManagerEvents>,\n\t\tIDeltaSender {\n\t/**\n\t * The queue of inbound delta signals\n\t */\n\treadonly inboundSignal: IDeltaQueue<ISignalMessage>;\n\n\t/**\n\t * The current minimum sequence number\n\t */\n\treadonly minimumSequenceNumber: number;\n\n\t/**\n\t * The last sequence number processed by the delta manager\n\t */\n\treadonly lastSequenceNumber: number;\n\n\t/**\n\t * The last message processed by the delta manager\n\t */\n\treadonly lastMessage: ISequencedDocumentMessage | undefined;\n\n\t/**\n\t * The latest sequence number the delta manager is aware of\n\t */\n\treadonly lastKnownSeqNumber: number;\n\n\t/**\n\t * The initial sequence number set when attaching the op handler\n\t */\n\treadonly initialSequenceNumber: number;\n\n\t/**\n\t * Tells if current connection has checkpoint information.\n\t * I.e. we know how far behind the client was at the time of establishing connection\n\t */\n\treadonly hasCheckpointSequenceNumber: boolean;\n\n\t/**\n\t * Details of client\n\t */\n\treadonly clientDetails: IClientDetails;\n\n\t/**\n\t * Protocol version being used to communicate with the service\n\t */\n\treadonly version: string;\n\n\t/**\n\t * Max message size allowed to the delta manager\n\t */\n\treadonly maxMessageSize: number;\n\n\t/**\n\t * Service configuration provided by the service.\n\t */\n\treadonly serviceConfiguration: IClientConfiguration | undefined;\n\n\t/**\n\t * Flag to indicate whether the client can write or not.\n\t */\n\treadonly active: boolean;\n\n\treadonly readOnlyInfo: ReadOnlyInfo;\n\n\t/**\n\t * Submit a signal to the service to be broadcast to other connected clients, but not persisted\n\t */\n\t// TODO: use `unknown` instead (API breaking)\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tsubmitSignal(content: any, targetClientId?: string): void;\n}\n\n/**\n * DeltaManager which is used internally by the Fluid layers and not exposed to the end users.\n * @internal\n */\nexport interface IDeltaManagerFull<T = ISequencedDocumentMessage, U = IDocumentMessage>\n\textends IDeltaManager<T, U> {\n\t/**\n\t * The queue of inbound delta messages\n\t */\n\treadonly inbound: IDeltaQueue<T>;\n\n\t/**\n\t * The queue of outbound delta messages\n\t */\n\treadonly outbound: IDeltaQueue<U[]>;\n}\n\n/**\n * Type guard to check if the given deltaManager is of type {@link @fluidframework/container-definitions#IDeltaManagerFull}.\n * @internal\n */\nexport function isIDeltaManagerFull(\n\tdeltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>,\n): deltaManager is IDeltaManagerFull {\n\treturn \"inbound\" in deltaManager && \"outbound\" in deltaManager;\n}\n\n/**\n * Events emitted by {@link IDeltaQueue}.\n * @sealed\n * @legacy\n * @alpha\n */\nexport interface IDeltaQueueEvents<T> extends IErrorEvent {\n\t/**\n\t * Emitted when a task is enqueued.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `task`: The task being enqueued.\n\t */\n\t(event: \"push\", listener: (task: T) => void);\n\n\t/**\n\t * Emitted immediately after processing an enqueued task and removing it from the queue.\n\t *\n\t * @remarks\n\t *\n\t * Note: this event is not intended for general use.\n\t * Prefer to listen to events on the appropriate ultimate recipients of the ops, rather than listening to the\n\t * ops directly on the {@link IDeltaQueue}.\n\t *\n\t * Listener parameters:\n\t *\n\t * - `task`: The task that was processed.\n\t */\n\t(event: \"op\", listener: (task: T) => void);\n\n\t/**\n\t * Emitted when the queue of tasks to process is emptied.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `count`: The number of events (`T`) processed before becoming idle.\n\t *\n\t * - `duration`: The amount of time it took to process elements (in milliseconds).\n\t *\n\t * @see {@link IDeltaQueue.idle}\n\t */\n\t(event: \"idle\", listener: (count: number, duration: number) => void);\n}\n\n/**\n * Queue of ops to be sent to or processed from storage\n * @sealed\n * @legacy\n * @alpha\n */\nexport interface IDeltaQueue<T> extends IEventProvider<IDeltaQueueEvents<T>>, IDisposable {\n\t/**\n\t * Flag indicating whether or not the queue was paused\n\t */\n\tpaused: boolean;\n\n\t/**\n\t * The number of messages remaining in the queue\n\t */\n\tlength: number;\n\n\t/**\n\t * Flag indicating whether or not the queue is idle.\n\t * I.e. there are no remaining messages to processes.\n\t */\n\tidle: boolean;\n\n\t/**\n\t * Pauses processing on the queue.\n\t *\n\t * @returns A promise which resolves when processing has been paused.\n\t */\n\tpause(): Promise<void>;\n\n\t/**\n\t * Resumes processing on the queue\n\t */\n\tresume(): void;\n\n\t/**\n\t * Peeks at the next message in the queue\n\t */\n\tpeek(): T | undefined;\n\n\t/**\n\t * Returns all the items in the queue as an array. Does not remove them from the queue.\n\t */\n\ttoArray(): T[];\n\n\t/**\n\t * returns number of ops processed and time it took to process these ops.\n\t * Zeros if queue did not process anything (had no messages, was paused or had hit an error before)\n\t */\n\twaitTillProcessingDone(): Promise<{ count: number; duration: number }>;\n}\n\n/**\n * @legacy\n * @alpha\n */\nexport type ReadOnlyInfo =\n\t| {\n\t\t\treadonly readonly: false | undefined;\n\t }\n\t| {\n\t\t\treadonly readonly: true;\n\n\t\t\t/**\n\t\t\t * Read-only because `forceReadOnly()` was called.\n\t\t\t */\n\t\t\treadonly forced: boolean;\n\n\t\t\t/**\n\t\t\t * Read-only because client does not have write permissions for document.\n\t\t\t */\n\t\t\treadonly permissions: boolean | undefined;\n\n\t\t\t/**\n\t\t\t * Read-only with no delta stream connection.\n\t\t\t */\n\t\t\treadonly storageOnly: boolean;\n\n\t\t\t/**\n\t\t\t * Extra info on why connection to delta stream is not possible.\n\t\t\t *\n\t\t\t * @remarks This info might be provided if {@link ReadOnlyInfo.storageOnly} is set to `true`.\n\t\t\t */\n\t\t\treadonly storageOnlyReason?: string;\n\t };\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
export type { IAudience, IAudienceOwner, IAudienceEvents, ISelf } from "./audience.js";
|
|
11
11
|
export type { IFluidBrowserPackage, IFluidBrowserPackageEnvironment, } from "./browserPackage.js";
|
|
12
12
|
export { isFluidBrowserPackage } from "./browserPackage.js";
|
|
13
|
-
export type { IConnectionDetails, IDeltaManager, IDeltaManagerEvents, IDeltaQueue, IDeltaQueueEvents, IDeltaSender, ReadOnlyInfo, } from "./deltas.js";
|
|
13
|
+
export type { IConnectionDetails, IDeltaManager, IDeltaManagerEvents, IDeltaManagerFull, IDeltaQueue, IDeltaQueueEvents, IDeltaSender, ReadOnlyInfo, } from "./deltas.js";
|
|
14
|
+
export { isIDeltaManagerFull } from "./deltas.js";
|
|
14
15
|
export type { ContainerWarning, ICriticalContainerError } from "./error.js";
|
|
15
16
|
export { ContainerErrorTypes } from "./error.js";
|
|
16
17
|
export type { ConnectionState, ICodeDetailsLoader, IContainer, IContainerEvents, IContainerLoadMode, IFluidCodeResolver, IFluidModuleWithDetails, IHostLoader, ILoader, ILoaderHeader, ILoaderOptions, IProvideLoader, IResolvedFluidCodeDetails, ISnapshotTreeWithBlobContents, } from "./loader.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index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ACtB,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE5D,YAAY;AACX;;GAEG;AACH,UAAU;AACV;;GAEG;AACH,kBAAkB,GAClB,MAAM,0CAA0C,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -4,9 +4,11 @@
|
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.IRuntimeFactory = exports.AttachState = exports.isFluidCodeDetails = exports.isFluidPackage = exports.IFluidCodeDetailsComparer = exports.LoaderHeader = exports.ContainerErrorTypes = exports.isFluidBrowserPackage = void 0;
|
|
7
|
+
exports.IRuntimeFactory = exports.AttachState = exports.isFluidCodeDetails = exports.isFluidPackage = exports.IFluidCodeDetailsComparer = exports.LoaderHeader = exports.ContainerErrorTypes = exports.isIDeltaManagerFull = exports.isFluidBrowserPackage = void 0;
|
|
8
8
|
var browserPackage_js_1 = require("./browserPackage.js");
|
|
9
9
|
Object.defineProperty(exports, "isFluidBrowserPackage", { enumerable: true, get: function () { return browserPackage_js_1.isFluidBrowserPackage; } });
|
|
10
|
+
var deltas_js_1 = require("./deltas.js");
|
|
11
|
+
Object.defineProperty(exports, "isIDeltaManagerFull", { enumerable: true, get: function () { return deltas_js_1.isIDeltaManagerFull; } });
|
|
10
12
|
var error_js_1 = require("./error.js");
|
|
11
13
|
Object.defineProperty(exports, "ContainerErrorTypes", { enumerable: true, get: function () { return error_js_1.ContainerErrorTypes; } });
|
|
12
14
|
var loader_js_1 = require("./loader.js");
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAaH,yDAA4D;AAAnD,0HAAA,qBAAqB,OAAA;AAW9B,uCAAiD;AAAxC,+GAAA,mBAAmB,OAAA;AAiB5B,yCAA2C;AAAlC,yGAAA,YAAY,OAAA;AASrB,qDAI2B;AAH1B,4HAAA,yBAAyB,OAAA;AACzB,iHAAA,cAAc,OAAA;AACd,qHAAA,kBAAkB,OAAA;AASnB,2CAA4D;AAAnD,yGAAA,WAAW,OAAA;AAAE,6GAAA,eAAe,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * This library contains the interfaces and types concerning the `Loader` and loading the `Container`.\n *\n * @packageDocumentation\n */\n\nexport type { IAudience, IAudienceOwner, IAudienceEvents, ISelf } from \"./audience.js\";\nexport type {\n\tIFluidBrowserPackage,\n\tIFluidBrowserPackageEnvironment,\n} from \"./browserPackage.js\";\nexport { isFluidBrowserPackage } from \"./browserPackage.js\";\nexport type {\n\tIConnectionDetails,\n\tIDeltaManager,\n\tIDeltaManagerEvents,\n\tIDeltaQueue,\n\tIDeltaQueueEvents,\n\tIDeltaSender,\n\tReadOnlyInfo,\n} from \"./deltas.js\";\nexport type { ContainerWarning, ICriticalContainerError } from \"./error.js\";\nexport { ContainerErrorTypes } from \"./error.js\";\nexport type {\n\tConnectionState,\n\tICodeDetailsLoader,\n\tIContainer,\n\tIContainerEvents,\n\tIContainerLoadMode,\n\tIFluidCodeResolver,\n\tIFluidModuleWithDetails,\n\tIHostLoader,\n\tILoader,\n\tILoaderHeader,\n\tILoaderOptions,\n\tIProvideLoader,\n\tIResolvedFluidCodeDetails,\n\tISnapshotTreeWithBlobContents,\n} from \"./loader.js\";\nexport { LoaderHeader } from \"./loader.js\";\nexport type { IFluidModule } from \"./fluidModule.js\";\nexport type {\n\tIFluidPackage,\n\tIFluidPackageEnvironment,\n\tIFluidCodeDetails,\n\tIFluidCodeDetailsConfig,\n\tIProvideFluidCodeDetailsComparer,\n} from \"./fluidPackage.js\";\nexport {\n\tIFluidCodeDetailsComparer,\n\tisFluidPackage,\n\tisFluidCodeDetails,\n} from \"./fluidPackage.js\";\nexport type {\n\tIBatchMessage,\n\tIContainerContext,\n\tIProvideRuntimeFactory,\n\tIRuntime,\n\tIGetPendingLocalStateProps,\n} from \"./runtime.js\";\nexport { AttachState, IRuntimeFactory } from \"./runtime.js\";\n\nexport type {\n\t/**\n\t * @deprecated IErrorBase is being deprecated as a public export is moving to \"core-interfaces\".\n\t */\n\tIErrorBase,\n\t/**\n\t * @deprecated IThrottlingWarning is being deprecated as a public export is moving to \"core-interfaces\".\n\t */\n\tIThrottlingWarning,\n} from \"@fluidframework/core-interfaces/internal\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAaH,yDAA4D;AAAnD,0HAAA,qBAAqB,OAAA;AAW9B,yCAAkD;AAAzC,gHAAA,mBAAmB,OAAA;AAE5B,uCAAiD;AAAxC,+GAAA,mBAAmB,OAAA;AAiB5B,yCAA2C;AAAlC,yGAAA,YAAY,OAAA;AASrB,qDAI2B;AAH1B,4HAAA,yBAAyB,OAAA;AACzB,iHAAA,cAAc,OAAA;AACd,qHAAA,kBAAkB,OAAA;AASnB,2CAA4D;AAAnD,yGAAA,WAAW,OAAA;AAAE,6GAAA,eAAe,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * This library contains the interfaces and types concerning the `Loader` and loading the `Container`.\n *\n * @packageDocumentation\n */\n\nexport type { IAudience, IAudienceOwner, IAudienceEvents, ISelf } from \"./audience.js\";\nexport type {\n\tIFluidBrowserPackage,\n\tIFluidBrowserPackageEnvironment,\n} from \"./browserPackage.js\";\nexport { isFluidBrowserPackage } from \"./browserPackage.js\";\nexport type {\n\tIConnectionDetails,\n\tIDeltaManager,\n\tIDeltaManagerEvents,\n\tIDeltaManagerFull,\n\tIDeltaQueue,\n\tIDeltaQueueEvents,\n\tIDeltaSender,\n\tReadOnlyInfo,\n} from \"./deltas.js\";\nexport { isIDeltaManagerFull } from \"./deltas.js\";\nexport type { ContainerWarning, ICriticalContainerError } from \"./error.js\";\nexport { ContainerErrorTypes } from \"./error.js\";\nexport type {\n\tConnectionState,\n\tICodeDetailsLoader,\n\tIContainer,\n\tIContainerEvents,\n\tIContainerLoadMode,\n\tIFluidCodeResolver,\n\tIFluidModuleWithDetails,\n\tIHostLoader,\n\tILoader,\n\tILoaderHeader,\n\tILoaderOptions,\n\tIProvideLoader,\n\tIResolvedFluidCodeDetails,\n\tISnapshotTreeWithBlobContents,\n} from \"./loader.js\";\nexport { LoaderHeader } from \"./loader.js\";\nexport type { IFluidModule } from \"./fluidModule.js\";\nexport type {\n\tIFluidPackage,\n\tIFluidPackageEnvironment,\n\tIFluidCodeDetails,\n\tIFluidCodeDetailsConfig,\n\tIProvideFluidCodeDetailsComparer,\n} from \"./fluidPackage.js\";\nexport {\n\tIFluidCodeDetailsComparer,\n\tisFluidPackage,\n\tisFluidCodeDetails,\n} from \"./fluidPackage.js\";\nexport type {\n\tIBatchMessage,\n\tIContainerContext,\n\tIProvideRuntimeFactory,\n\tIRuntime,\n\tIGetPendingLocalStateProps,\n} from \"./runtime.js\";\nexport { AttachState, IRuntimeFactory } from \"./runtime.js\";\n\nexport type {\n\t/**\n\t * @deprecated IErrorBase is being deprecated as a public export is moving to \"core-interfaces\".\n\t */\n\tIErrorBase,\n\t/**\n\t * @deprecated IThrottlingWarning is being deprecated as a public export is moving to \"core-interfaces\".\n\t */\n\tIThrottlingWarning,\n} from \"@fluidframework/core-interfaces/internal\";\n"]}
|
package/lib/deltas.d.ts
CHANGED
|
@@ -121,18 +121,6 @@ export interface IDeltaManagerEvents extends IEvent {
|
|
|
121
121
|
* @alpha
|
|
122
122
|
*/
|
|
123
123
|
export interface IDeltaManager<T, U> extends IEventProvider<IDeltaManagerEvents>, IDeltaSender {
|
|
124
|
-
/**
|
|
125
|
-
* The queue of inbound delta messages
|
|
126
|
-
* @deprecated Do not use, for internal use only. There are a lot of complications in core pieces of the runtime
|
|
127
|
-
* may break if this is used directly. For example summarization and op processing.
|
|
128
|
-
*/
|
|
129
|
-
readonly inbound: IDeltaQueue<T>;
|
|
130
|
-
/**
|
|
131
|
-
* The queue of outbound delta messages
|
|
132
|
-
* @deprecated Do not use, for internal use only. There are a lot of complications in core pieces of the runtime
|
|
133
|
-
* may break if this is used directly. For example op submission
|
|
134
|
-
*/
|
|
135
|
-
readonly outbound: IDeltaQueue<U[]>;
|
|
136
124
|
/**
|
|
137
125
|
* The queue of inbound delta signals
|
|
138
126
|
*/
|
|
@@ -188,6 +176,25 @@ export interface IDeltaManager<T, U> extends IEventProvider<IDeltaManagerEvents>
|
|
|
188
176
|
*/
|
|
189
177
|
submitSignal(content: any, targetClientId?: string): void;
|
|
190
178
|
}
|
|
179
|
+
/**
|
|
180
|
+
* DeltaManager which is used internally by the Fluid layers and not exposed to the end users.
|
|
181
|
+
* @internal
|
|
182
|
+
*/
|
|
183
|
+
export interface IDeltaManagerFull<T = ISequencedDocumentMessage, U = IDocumentMessage> extends IDeltaManager<T, U> {
|
|
184
|
+
/**
|
|
185
|
+
* The queue of inbound delta messages
|
|
186
|
+
*/
|
|
187
|
+
readonly inbound: IDeltaQueue<T>;
|
|
188
|
+
/**
|
|
189
|
+
* The queue of outbound delta messages
|
|
190
|
+
*/
|
|
191
|
+
readonly outbound: IDeltaQueue<U[]>;
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Type guard to check if the given deltaManager is of type {@link @fluidframework/container-definitions#IDeltaManagerFull}.
|
|
195
|
+
* @internal
|
|
196
|
+
*/
|
|
197
|
+
export declare function isIDeltaManagerFull(deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>): deltaManager is IDeltaManagerFull;
|
|
191
198
|
/**
|
|
192
199
|
* Events emitted by {@link IDeltaQueue}.
|
|
193
200
|
* @sealed
|
package/lib/deltas.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deltas.d.ts","sourceRoot":"","sources":["../src/deltas.ts"],"names":[],"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AE,OAAO,GAAG,SAAS,CAAC;IAE1C;;OAEG;IACH,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAE9B;;;;OAIG;IACH,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;CACnC,CAAC"}
|
package/lib/deltas.js
CHANGED
|
@@ -2,5 +2,11 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Type guard to check if the given deltaManager is of type {@link @fluidframework/container-definitions#IDeltaManagerFull}.
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export function isIDeltaManagerFull(deltaManager) {
|
|
10
|
+
return "inbound" in deltaManager && "outbound" in deltaManager;
|
|
11
|
+
}
|
|
6
12
|
//# sourceMappingURL=deltas.js.map
|
package/lib/deltas.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deltas.js","sourceRoot":"","sources":["../src/deltas.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 type {\n\tIDisposable,\n\tIErrorBase,\n\tIErrorEvent,\n\tIEvent,\n\tIEventProvider,\n} from \"@fluidframework/core-interfaces\";\nimport type { IClientDetails } from \"@fluidframework/driver-definitions\";\nimport type {\n\tIAnyDriverError,\n\tIClientConfiguration,\n\tIDocumentMessage,\n\tITokenClaims,\n\tISequencedDocumentMessage,\n\tISignalMessage,\n} from \"@fluidframework/driver-definitions/internal\";\n\n/**\n * Contract representing the result of a newly established connection to the server for syncing deltas.\n * @legacy\n * @alpha\n */\nexport interface IConnectionDetails {\n\t/**\n\t * The client's unique identifier assigned by the service.\n\t *\n\t * @remarks It is not stable across reconnections.\n\t */\n\tclientId: string;\n\n\tclaims: ITokenClaims;\n\tserviceConfiguration: IClientConfiguration;\n\n\t/**\n\t * Last known sequence number to ordering service at the time of connection.\n\t *\n\t * @remarks\n\t *\n\t * It may lag behind the actual last sequence number (quite a bit, if the container is very active),\n\t * but it's the best information the client has to figure out how far behind it is, at least\n\t * for \"read\" connections. \"write\" connections may use the client's own \"join\" op to obtain similar\n\t * information which is likely to be more up-to-date.\n\t */\n\tcheckpointSequenceNumber: number | undefined;\n}\n\n/**\n * Contract supporting delivery of outbound messages to the server\n * @sealed\n * @legacy\n * @alpha\n */\nexport interface IDeltaSender {\n\t/**\n\t * Flush all pending messages through the outbound queue\n\t */\n\tflush(): void;\n}\n\n/**\n * Events emitted by {@link IDeltaManager}.\n * @sealed\n * @legacy\n * @alpha\n */\nexport interface IDeltaManagerEvents extends IEvent {\n\t/**\n\t * @deprecated No replacement API recommended.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t(event: \"prepareSend\", listener: (messageBuffer: any[]) => void);\n\n\t/**\n\t * @deprecated No replacement API recommended.\n\t */\n\t(event: \"submitOp\", listener: (message: IDocumentMessage) => void);\n\n\t/**\n\t * Emitted immediately after processing an incoming operation (op).\n\t *\n\t * @remarks\n\t *\n\t * Note: this event is not intended for general use.\n\t * Prefer to listen to events on the appropriate ultimate recipients of the ops, rather than listening to the\n\t * ops directly on the {@link IDeltaManager}.\n\t *\n\t * Listener parameters:\n\t *\n\t * - `message`: The op that was processed.\n\t *\n\t * - `processingTime`: The amount of time it took to process the inbound operation (op), expressed in milliseconds.\n\t */\n\t(\n\t\tevent: \"op\",\n\t\tlistener: (message: ISequencedDocumentMessage, processingTime: number) => void,\n\t);\n\n\t/**\n\t * Emitted periodically with latest information on network roundtrip latency\n\t */\n\t(event: \"pong\", listener: (latency: number) => void);\n\n\t/**\n\t * Emitted when the {@link IDeltaManager} completes connecting to the Fluid service.\n\t *\n\t * @remarks\n\t * This occurs once we've received the connect_document_success message from the server,\n\t * and happens prior to the client's join message (if there is a join message).\n\t *\n\t * Listener parameters:\n\t *\n\t * - `details`: Connection metadata.\n\t *\n\t * - `opsBehind`: An estimate of far behind the client is relative to the service in terms of ops.\n\t * Will not be specified if an estimate cannot be determined.\n\t */\n\t(event: \"connect\", listener: (details: IConnectionDetails, opsBehind?: number) => void);\n\n\t/**\n\t * Emitted when the {@link IDeltaManager} becomes disconnected from the Fluid service.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `reason`: Describes the reason for which the delta manager was disconnected.\n\t * - `error` : error if any for the disconnect.\n\t */\n\t(event: \"disconnect\", listener: (reason: string, error?: IAnyDriverError) => void);\n\n\t/**\n\t * Emitted when read/write permissions change.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `readonly`: Whether or not the delta manager is now read-only.\n\t */\n\t(\n\t\tevent: \"readonly\",\n\t\tlistener: (\n\t\t\treadonly: boolean,\n\t\t\treadonlyConnectionReason?: { reason: string; error?: IErrorBase },\n\t\t) => void,\n\t);\n}\n\n/**\n * Manages the transmission of ops between the runtime and storage.\n * @sealed\n * @legacy\n * @alpha\n */\nexport interface IDeltaManager<T, U>\n\textends IEventProvider<IDeltaManagerEvents>,\n\t\tIDeltaSender {\n\t/**\n\t * The queue of inbound delta messages\n\t * @deprecated Do not use, for internal use only. There are a lot of complications in core pieces of the runtime\n\t * may break if this is used directly. For example summarization and op processing.\n\t */\n\treadonly inbound: IDeltaQueue<T>;\n\n\t/**\n\t * The queue of outbound delta messages\n\t * @deprecated Do not use, for internal use only. There are a lot of complications in core pieces of the runtime\n\t * may break if this is used directly. For example op submission\n\t */\n\treadonly outbound: IDeltaQueue<U[]>;\n\n\t/**\n\t * The queue of inbound delta signals\n\t */\n\treadonly inboundSignal: IDeltaQueue<ISignalMessage>;\n\n\t/**\n\t * The current minimum sequence number\n\t */\n\treadonly minimumSequenceNumber: number;\n\n\t/**\n\t * The last sequence number processed by the delta manager\n\t */\n\treadonly lastSequenceNumber: number;\n\n\t/**\n\t * The last message processed by the delta manager\n\t */\n\treadonly lastMessage: ISequencedDocumentMessage | undefined;\n\n\t/**\n\t * The latest sequence number the delta manager is aware of\n\t */\n\treadonly lastKnownSeqNumber: number;\n\n\t/**\n\t * The initial sequence number set when attaching the op handler\n\t */\n\treadonly initialSequenceNumber: number;\n\n\t/**\n\t * Tells if current connection has checkpoint information.\n\t * I.e. we know how far behind the client was at the time of establishing connection\n\t */\n\treadonly hasCheckpointSequenceNumber: boolean;\n\n\t/**\n\t * Details of client\n\t */\n\treadonly clientDetails: IClientDetails;\n\n\t/**\n\t * Protocol version being used to communicate with the service\n\t */\n\treadonly version: string;\n\n\t/**\n\t * Max message size allowed to the delta manager\n\t */\n\treadonly maxMessageSize: number;\n\n\t/**\n\t * Service configuration provided by the service.\n\t */\n\treadonly serviceConfiguration: IClientConfiguration | undefined;\n\n\t/**\n\t * Flag to indicate whether the client can write or not.\n\t */\n\treadonly active: boolean;\n\n\treadonly readOnlyInfo: ReadOnlyInfo;\n\n\t/**\n\t * Submit a signal to the service to be broadcast to other connected clients, but not persisted\n\t */\n\t// TODO: use `unknown` instead (API breaking)\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tsubmitSignal(content: any, targetClientId?: string): void;\n}\n\n/**\n * Events emitted by {@link IDeltaQueue}.\n * @sealed\n * @legacy\n * @alpha\n */\nexport interface IDeltaQueueEvents<T> extends IErrorEvent {\n\t/**\n\t * Emitted when a task is enqueued.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `task`: The task being enqueued.\n\t */\n\t(event: \"push\", listener: (task: T) => void);\n\n\t/**\n\t * Emitted immediately after processing an enqueued task and removing it from the queue.\n\t *\n\t * @remarks\n\t *\n\t * Note: this event is not intended for general use.\n\t * Prefer to listen to events on the appropriate ultimate recipients of the ops, rather than listening to the\n\t * ops directly on the {@link IDeltaQueue}.\n\t *\n\t * Listener parameters:\n\t *\n\t * - `task`: The task that was processed.\n\t */\n\t(event: \"op\", listener: (task: T) => void);\n\n\t/**\n\t * Emitted when the queue of tasks to process is emptied.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `count`: The number of events (`T`) processed before becoming idle.\n\t *\n\t * - `duration`: The amount of time it took to process elements (in milliseconds).\n\t *\n\t * @see {@link IDeltaQueue.idle}\n\t */\n\t(event: \"idle\", listener: (count: number, duration: number) => void);\n}\n\n/**\n * Queue of ops to be sent to or processed from storage\n * @sealed\n * @legacy\n * @alpha\n */\nexport interface IDeltaQueue<T> extends IEventProvider<IDeltaQueueEvents<T>>, IDisposable {\n\t/**\n\t * Flag indicating whether or not the queue was paused\n\t */\n\tpaused: boolean;\n\n\t/**\n\t * The number of messages remaining in the queue\n\t */\n\tlength: number;\n\n\t/**\n\t * Flag indicating whether or not the queue is idle.\n\t * I.e. there are no remaining messages to processes.\n\t */\n\tidle: boolean;\n\n\t/**\n\t * Pauses processing on the queue.\n\t *\n\t * @returns A promise which resolves when processing has been paused.\n\t */\n\tpause(): Promise<void>;\n\n\t/**\n\t * Resumes processing on the queue\n\t */\n\tresume(): void;\n\n\t/**\n\t * Peeks at the next message in the queue\n\t */\n\tpeek(): T | undefined;\n\n\t/**\n\t * Returns all the items in the queue as an array. Does not remove them from the queue.\n\t */\n\ttoArray(): T[];\n\n\t/**\n\t * returns number of ops processed and time it took to process these ops.\n\t * Zeros if queue did not process anything (had no messages, was paused or had hit an error before)\n\t */\n\twaitTillProcessingDone(): Promise<{ count: number; duration: number }>;\n}\n\n/**\n * @legacy\n * @alpha\n */\nexport type ReadOnlyInfo =\n\t| {\n\t\t\treadonly readonly: false | undefined;\n\t }\n\t| {\n\t\t\treadonly readonly: true;\n\n\t\t\t/**\n\t\t\t * Read-only because `forceReadOnly()` was called.\n\t\t\t */\n\t\t\treadonly forced: boolean;\n\n\t\t\t/**\n\t\t\t * Read-only because client does not have write permissions for document.\n\t\t\t */\n\t\t\treadonly permissions: boolean | undefined;\n\n\t\t\t/**\n\t\t\t * Read-only with no delta stream connection.\n\t\t\t */\n\t\t\treadonly storageOnly: boolean;\n\n\t\t\t/**\n\t\t\t * Extra info on why connection to delta stream is not possible.\n\t\t\t *\n\t\t\t * @remarks This info might be provided if {@link ReadOnlyInfo.storageOnly} is set to `true`.\n\t\t\t */\n\t\t\treadonly storageOnlyReason?: string;\n\t };\n"]}
|
|
1
|
+
{"version":3,"file":"deltas.js","sourceRoot":"","sources":["../src/deltas.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAmPH;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CAClC,YAAwE;IAExE,OAAO,SAAS,IAAI,YAAY,IAAI,UAAU,IAAI,YAAY,CAAC;AAChE,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tIDisposable,\n\tIErrorBase,\n\tIErrorEvent,\n\tIEvent,\n\tIEventProvider,\n} from \"@fluidframework/core-interfaces\";\nimport type { IClientDetails } from \"@fluidframework/driver-definitions\";\nimport type {\n\tIAnyDriverError,\n\tIClientConfiguration,\n\tIDocumentMessage,\n\tITokenClaims,\n\tISequencedDocumentMessage,\n\tISignalMessage,\n} from \"@fluidframework/driver-definitions/internal\";\n\n/**\n * Contract representing the result of a newly established connection to the server for syncing deltas.\n * @legacy\n * @alpha\n */\nexport interface IConnectionDetails {\n\t/**\n\t * The client's unique identifier assigned by the service.\n\t *\n\t * @remarks It is not stable across reconnections.\n\t */\n\tclientId: string;\n\n\tclaims: ITokenClaims;\n\tserviceConfiguration: IClientConfiguration;\n\n\t/**\n\t * Last known sequence number to ordering service at the time of connection.\n\t *\n\t * @remarks\n\t *\n\t * It may lag behind the actual last sequence number (quite a bit, if the container is very active),\n\t * but it's the best information the client has to figure out how far behind it is, at least\n\t * for \"read\" connections. \"write\" connections may use the client's own \"join\" op to obtain similar\n\t * information which is likely to be more up-to-date.\n\t */\n\tcheckpointSequenceNumber: number | undefined;\n}\n\n/**\n * Contract supporting delivery of outbound messages to the server\n * @sealed\n * @legacy\n * @alpha\n */\nexport interface IDeltaSender {\n\t/**\n\t * Flush all pending messages through the outbound queue\n\t */\n\tflush(): void;\n}\n\n/**\n * Events emitted by {@link IDeltaManager}.\n * @sealed\n * @legacy\n * @alpha\n */\nexport interface IDeltaManagerEvents extends IEvent {\n\t/**\n\t * @deprecated No replacement API recommended.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t(event: \"prepareSend\", listener: (messageBuffer: any[]) => void);\n\n\t/**\n\t * @deprecated No replacement API recommended.\n\t */\n\t(event: \"submitOp\", listener: (message: IDocumentMessage) => void);\n\n\t/**\n\t * Emitted immediately after processing an incoming operation (op).\n\t *\n\t * @remarks\n\t *\n\t * Note: this event is not intended for general use.\n\t * Prefer to listen to events on the appropriate ultimate recipients of the ops, rather than listening to the\n\t * ops directly on the {@link IDeltaManager}.\n\t *\n\t * Listener parameters:\n\t *\n\t * - `message`: The op that was processed.\n\t *\n\t * - `processingTime`: The amount of time it took to process the inbound operation (op), expressed in milliseconds.\n\t */\n\t(\n\t\tevent: \"op\",\n\t\tlistener: (message: ISequencedDocumentMessage, processingTime: number) => void,\n\t);\n\n\t/**\n\t * Emitted periodically with latest information on network roundtrip latency\n\t */\n\t(event: \"pong\", listener: (latency: number) => void);\n\n\t/**\n\t * Emitted when the {@link IDeltaManager} completes connecting to the Fluid service.\n\t *\n\t * @remarks\n\t * This occurs once we've received the connect_document_success message from the server,\n\t * and happens prior to the client's join message (if there is a join message).\n\t *\n\t * Listener parameters:\n\t *\n\t * - `details`: Connection metadata.\n\t *\n\t * - `opsBehind`: An estimate of far behind the client is relative to the service in terms of ops.\n\t * Will not be specified if an estimate cannot be determined.\n\t */\n\t(event: \"connect\", listener: (details: IConnectionDetails, opsBehind?: number) => void);\n\n\t/**\n\t * Emitted when the {@link IDeltaManager} becomes disconnected from the Fluid service.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `reason`: Describes the reason for which the delta manager was disconnected.\n\t * - `error` : error if any for the disconnect.\n\t */\n\t(event: \"disconnect\", listener: (reason: string, error?: IAnyDriverError) => void);\n\n\t/**\n\t * Emitted when read/write permissions change.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `readonly`: Whether or not the delta manager is now read-only.\n\t */\n\t(\n\t\tevent: \"readonly\",\n\t\tlistener: (\n\t\t\treadonly: boolean,\n\t\t\treadonlyConnectionReason?: { reason: string; error?: IErrorBase },\n\t\t) => void,\n\t);\n}\n\n/**\n * Manages the transmission of ops between the runtime and storage.\n * @sealed\n * @legacy\n * @alpha\n */\nexport interface IDeltaManager<T, U>\n\textends IEventProvider<IDeltaManagerEvents>,\n\t\tIDeltaSender {\n\t/**\n\t * The queue of inbound delta signals\n\t */\n\treadonly inboundSignal: IDeltaQueue<ISignalMessage>;\n\n\t/**\n\t * The current minimum sequence number\n\t */\n\treadonly minimumSequenceNumber: number;\n\n\t/**\n\t * The last sequence number processed by the delta manager\n\t */\n\treadonly lastSequenceNumber: number;\n\n\t/**\n\t * The last message processed by the delta manager\n\t */\n\treadonly lastMessage: ISequencedDocumentMessage | undefined;\n\n\t/**\n\t * The latest sequence number the delta manager is aware of\n\t */\n\treadonly lastKnownSeqNumber: number;\n\n\t/**\n\t * The initial sequence number set when attaching the op handler\n\t */\n\treadonly initialSequenceNumber: number;\n\n\t/**\n\t * Tells if current connection has checkpoint information.\n\t * I.e. we know how far behind the client was at the time of establishing connection\n\t */\n\treadonly hasCheckpointSequenceNumber: boolean;\n\n\t/**\n\t * Details of client\n\t */\n\treadonly clientDetails: IClientDetails;\n\n\t/**\n\t * Protocol version being used to communicate with the service\n\t */\n\treadonly version: string;\n\n\t/**\n\t * Max message size allowed to the delta manager\n\t */\n\treadonly maxMessageSize: number;\n\n\t/**\n\t * Service configuration provided by the service.\n\t */\n\treadonly serviceConfiguration: IClientConfiguration | undefined;\n\n\t/**\n\t * Flag to indicate whether the client can write or not.\n\t */\n\treadonly active: boolean;\n\n\treadonly readOnlyInfo: ReadOnlyInfo;\n\n\t/**\n\t * Submit a signal to the service to be broadcast to other connected clients, but not persisted\n\t */\n\t// TODO: use `unknown` instead (API breaking)\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tsubmitSignal(content: any, targetClientId?: string): void;\n}\n\n/**\n * DeltaManager which is used internally by the Fluid layers and not exposed to the end users.\n * @internal\n */\nexport interface IDeltaManagerFull<T = ISequencedDocumentMessage, U = IDocumentMessage>\n\textends IDeltaManager<T, U> {\n\t/**\n\t * The queue of inbound delta messages\n\t */\n\treadonly inbound: IDeltaQueue<T>;\n\n\t/**\n\t * The queue of outbound delta messages\n\t */\n\treadonly outbound: IDeltaQueue<U[]>;\n}\n\n/**\n * Type guard to check if the given deltaManager is of type {@link @fluidframework/container-definitions#IDeltaManagerFull}.\n * @internal\n */\nexport function isIDeltaManagerFull(\n\tdeltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>,\n): deltaManager is IDeltaManagerFull {\n\treturn \"inbound\" in deltaManager && \"outbound\" in deltaManager;\n}\n\n/**\n * Events emitted by {@link IDeltaQueue}.\n * @sealed\n * @legacy\n * @alpha\n */\nexport interface IDeltaQueueEvents<T> extends IErrorEvent {\n\t/**\n\t * Emitted when a task is enqueued.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `task`: The task being enqueued.\n\t */\n\t(event: \"push\", listener: (task: T) => void);\n\n\t/**\n\t * Emitted immediately after processing an enqueued task and removing it from the queue.\n\t *\n\t * @remarks\n\t *\n\t * Note: this event is not intended for general use.\n\t * Prefer to listen to events on the appropriate ultimate recipients of the ops, rather than listening to the\n\t * ops directly on the {@link IDeltaQueue}.\n\t *\n\t * Listener parameters:\n\t *\n\t * - `task`: The task that was processed.\n\t */\n\t(event: \"op\", listener: (task: T) => void);\n\n\t/**\n\t * Emitted when the queue of tasks to process is emptied.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `count`: The number of events (`T`) processed before becoming idle.\n\t *\n\t * - `duration`: The amount of time it took to process elements (in milliseconds).\n\t *\n\t * @see {@link IDeltaQueue.idle}\n\t */\n\t(event: \"idle\", listener: (count: number, duration: number) => void);\n}\n\n/**\n * Queue of ops to be sent to or processed from storage\n * @sealed\n * @legacy\n * @alpha\n */\nexport interface IDeltaQueue<T> extends IEventProvider<IDeltaQueueEvents<T>>, IDisposable {\n\t/**\n\t * Flag indicating whether or not the queue was paused\n\t */\n\tpaused: boolean;\n\n\t/**\n\t * The number of messages remaining in the queue\n\t */\n\tlength: number;\n\n\t/**\n\t * Flag indicating whether or not the queue is idle.\n\t * I.e. there are no remaining messages to processes.\n\t */\n\tidle: boolean;\n\n\t/**\n\t * Pauses processing on the queue.\n\t *\n\t * @returns A promise which resolves when processing has been paused.\n\t */\n\tpause(): Promise<void>;\n\n\t/**\n\t * Resumes processing on the queue\n\t */\n\tresume(): void;\n\n\t/**\n\t * Peeks at the next message in the queue\n\t */\n\tpeek(): T | undefined;\n\n\t/**\n\t * Returns all the items in the queue as an array. Does not remove them from the queue.\n\t */\n\ttoArray(): T[];\n\n\t/**\n\t * returns number of ops processed and time it took to process these ops.\n\t * Zeros if queue did not process anything (had no messages, was paused or had hit an error before)\n\t */\n\twaitTillProcessingDone(): Promise<{ count: number; duration: number }>;\n}\n\n/**\n * @legacy\n * @alpha\n */\nexport type ReadOnlyInfo =\n\t| {\n\t\t\treadonly readonly: false | undefined;\n\t }\n\t| {\n\t\t\treadonly readonly: true;\n\n\t\t\t/**\n\t\t\t * Read-only because `forceReadOnly()` was called.\n\t\t\t */\n\t\t\treadonly forced: boolean;\n\n\t\t\t/**\n\t\t\t * Read-only because client does not have write permissions for document.\n\t\t\t */\n\t\t\treadonly permissions: boolean | undefined;\n\n\t\t\t/**\n\t\t\t * Read-only with no delta stream connection.\n\t\t\t */\n\t\t\treadonly storageOnly: boolean;\n\n\t\t\t/**\n\t\t\t * Extra info on why connection to delta stream is not possible.\n\t\t\t *\n\t\t\t * @remarks This info might be provided if {@link ReadOnlyInfo.storageOnly} is set to `true`.\n\t\t\t */\n\t\t\treadonly storageOnlyReason?: string;\n\t };\n"]}
|
package/lib/index.d.ts
CHANGED
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
export type { IAudience, IAudienceOwner, IAudienceEvents, ISelf } from "./audience.js";
|
|
11
11
|
export type { IFluidBrowserPackage, IFluidBrowserPackageEnvironment, } from "./browserPackage.js";
|
|
12
12
|
export { isFluidBrowserPackage } from "./browserPackage.js";
|
|
13
|
-
export type { IConnectionDetails, IDeltaManager, IDeltaManagerEvents, IDeltaQueue, IDeltaQueueEvents, IDeltaSender, ReadOnlyInfo, } from "./deltas.js";
|
|
13
|
+
export type { IConnectionDetails, IDeltaManager, IDeltaManagerEvents, IDeltaManagerFull, IDeltaQueue, IDeltaQueueEvents, IDeltaSender, ReadOnlyInfo, } from "./deltas.js";
|
|
14
|
+
export { isIDeltaManagerFull } from "./deltas.js";
|
|
14
15
|
export type { ContainerWarning, ICriticalContainerError } from "./error.js";
|
|
15
16
|
export { ContainerErrorTypes } from "./error.js";
|
|
16
17
|
export type { ConnectionState, ICodeDetailsLoader, IContainer, IContainerEvents, IContainerLoadMode, IFluidCodeResolver, IFluidModuleWithDetails, IHostLoader, ILoader, ILoaderHeader, ILoaderOptions, IProvideLoader, IResolvedFluidCodeDetails, ISnapshotTreeWithBlobContents, } from "./loader.js";
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AAEH,YAAY,EAAE,SAAS,EAAE,cAAc,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACvF,YAAY,EACX,oBAAoB,EACpB,+BAA+B,GAC/B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,YAAY,EACX,kBAAkB,EAClB,aAAa,EACb,mBAAmB,EACnB,WAAW,EACX,iBAAiB,EACjB,YAAY,EACZ,YAAY,GACZ,MAAM,aAAa,C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EACnB,iBAAiB,EACjB,WAAW,EACX,iBAAiB,EACjB,YAAY,EACZ,YAAY,GACZ,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,YAAY,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAC5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjD,YAAY,EACX,eAAe,EACf,kBAAkB,EAClB,UAAU,EACV,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,EAClB,uBAAuB,EACvB,WAAW,EACX,OAAO,EACP,aAAa,EACb,cAAc,EACd,cAAc,EACd,yBAAyB,EACzB,6BAA6B,GAC7B,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,YAAY,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,YAAY,EACX,aAAa,EACb,wBAAwB,EACxB,iBAAiB,EACjB,uBAAuB,EACvB,gCAAgC,GAChC,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACN,yBAAyB,EACzB,cAAc,EACd,kBAAkB,GAClB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EACX,aAAa,EACb,iBAAiB,EACjB,sBAAsB,EACtB,QAAQ,EACR,0BAA0B,GAC1B,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE5D,YAAY;AACX;;GAEG;AACH,UAAU;AACV;;GAEG;AACH,kBAAkB,GAClB,MAAM,0CAA0C,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
export { isFluidBrowserPackage } from "./browserPackage.js";
|
|
6
|
+
export { isIDeltaManagerFull } from "./deltas.js";
|
|
6
7
|
export { ContainerErrorTypes } from "./error.js";
|
|
7
8
|
export { LoaderHeader } from "./loader.js";
|
|
8
9
|
export { IFluidCodeDetailsComparer, isFluidPackage, isFluidCodeDetails, } from "./fluidPackage.js";
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAaH,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAW5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAiBjD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAS3C,OAAO,EACN,yBAAyB,EACzB,cAAc,EACd,kBAAkB,GAClB,MAAM,mBAAmB,CAAC;AAQ3B,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * This library contains the interfaces and types concerning the `Loader` and loading the `Container`.\n *\n * @packageDocumentation\n */\n\nexport type { IAudience, IAudienceOwner, IAudienceEvents, ISelf } from \"./audience.js\";\nexport type {\n\tIFluidBrowserPackage,\n\tIFluidBrowserPackageEnvironment,\n} from \"./browserPackage.js\";\nexport { isFluidBrowserPackage } from \"./browserPackage.js\";\nexport type {\n\tIConnectionDetails,\n\tIDeltaManager,\n\tIDeltaManagerEvents,\n\tIDeltaQueue,\n\tIDeltaQueueEvents,\n\tIDeltaSender,\n\tReadOnlyInfo,\n} from \"./deltas.js\";\nexport type { ContainerWarning, ICriticalContainerError } from \"./error.js\";\nexport { ContainerErrorTypes } from \"./error.js\";\nexport type {\n\tConnectionState,\n\tICodeDetailsLoader,\n\tIContainer,\n\tIContainerEvents,\n\tIContainerLoadMode,\n\tIFluidCodeResolver,\n\tIFluidModuleWithDetails,\n\tIHostLoader,\n\tILoader,\n\tILoaderHeader,\n\tILoaderOptions,\n\tIProvideLoader,\n\tIResolvedFluidCodeDetails,\n\tISnapshotTreeWithBlobContents,\n} from \"./loader.js\";\nexport { LoaderHeader } from \"./loader.js\";\nexport type { IFluidModule } from \"./fluidModule.js\";\nexport type {\n\tIFluidPackage,\n\tIFluidPackageEnvironment,\n\tIFluidCodeDetails,\n\tIFluidCodeDetailsConfig,\n\tIProvideFluidCodeDetailsComparer,\n} from \"./fluidPackage.js\";\nexport {\n\tIFluidCodeDetailsComparer,\n\tisFluidPackage,\n\tisFluidCodeDetails,\n} from \"./fluidPackage.js\";\nexport type {\n\tIBatchMessage,\n\tIContainerContext,\n\tIProvideRuntimeFactory,\n\tIRuntime,\n\tIGetPendingLocalStateProps,\n} from \"./runtime.js\";\nexport { AttachState, IRuntimeFactory } from \"./runtime.js\";\n\nexport type {\n\t/**\n\t * @deprecated IErrorBase is being deprecated as a public export is moving to \"core-interfaces\".\n\t */\n\tIErrorBase,\n\t/**\n\t * @deprecated IThrottlingWarning is being deprecated as a public export is moving to \"core-interfaces\".\n\t */\n\tIThrottlingWarning,\n} from \"@fluidframework/core-interfaces/internal\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAaH,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAW5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAElD,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAiBjD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAS3C,OAAO,EACN,yBAAyB,EACzB,cAAc,EACd,kBAAkB,GAClB,MAAM,mBAAmB,CAAC;AAQ3B,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * This library contains the interfaces and types concerning the `Loader` and loading the `Container`.\n *\n * @packageDocumentation\n */\n\nexport type { IAudience, IAudienceOwner, IAudienceEvents, ISelf } from \"./audience.js\";\nexport type {\n\tIFluidBrowserPackage,\n\tIFluidBrowserPackageEnvironment,\n} from \"./browserPackage.js\";\nexport { isFluidBrowserPackage } from \"./browserPackage.js\";\nexport type {\n\tIConnectionDetails,\n\tIDeltaManager,\n\tIDeltaManagerEvents,\n\tIDeltaManagerFull,\n\tIDeltaQueue,\n\tIDeltaQueueEvents,\n\tIDeltaSender,\n\tReadOnlyInfo,\n} from \"./deltas.js\";\nexport { isIDeltaManagerFull } from \"./deltas.js\";\nexport type { ContainerWarning, ICriticalContainerError } from \"./error.js\";\nexport { ContainerErrorTypes } from \"./error.js\";\nexport type {\n\tConnectionState,\n\tICodeDetailsLoader,\n\tIContainer,\n\tIContainerEvents,\n\tIContainerLoadMode,\n\tIFluidCodeResolver,\n\tIFluidModuleWithDetails,\n\tIHostLoader,\n\tILoader,\n\tILoaderHeader,\n\tILoaderOptions,\n\tIProvideLoader,\n\tIResolvedFluidCodeDetails,\n\tISnapshotTreeWithBlobContents,\n} from \"./loader.js\";\nexport { LoaderHeader } from \"./loader.js\";\nexport type { IFluidModule } from \"./fluidModule.js\";\nexport type {\n\tIFluidPackage,\n\tIFluidPackageEnvironment,\n\tIFluidCodeDetails,\n\tIFluidCodeDetailsConfig,\n\tIProvideFluidCodeDetailsComparer,\n} from \"./fluidPackage.js\";\nexport {\n\tIFluidCodeDetailsComparer,\n\tisFluidPackage,\n\tisFluidCodeDetails,\n} from \"./fluidPackage.js\";\nexport type {\n\tIBatchMessage,\n\tIContainerContext,\n\tIProvideRuntimeFactory,\n\tIRuntime,\n\tIGetPendingLocalStateProps,\n} from \"./runtime.js\";\nexport { AttachState, IRuntimeFactory } from \"./runtime.js\";\n\nexport type {\n\t/**\n\t * @deprecated IErrorBase is being deprecated as a public export is moving to \"core-interfaces\".\n\t */\n\tIErrorBase,\n\t/**\n\t * @deprecated IThrottlingWarning is being deprecated as a public export is moving to \"core-interfaces\".\n\t */\n\tIThrottlingWarning,\n} from \"@fluidframework/core-interfaces/internal\";\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/container-definitions",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.10.0-305357",
|
|
4
4
|
"description": "Fluid container definitions",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -47,16 +47,16 @@
|
|
|
47
47
|
"main": "lib/index.js",
|
|
48
48
|
"types": "lib/public.d.ts",
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@fluidframework/core-interfaces": "
|
|
51
|
-
"@fluidframework/driver-definitions": "
|
|
50
|
+
"@fluidframework/core-interfaces": "2.10.0-305357",
|
|
51
|
+
"@fluidframework/driver-definitions": "2.10.0-305357"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@arethetypeswrong/cli": "^0.16.4",
|
|
55
55
|
"@biomejs/biome": "~1.9.3",
|
|
56
|
-
"@fluid-tools/build-cli": "^0.
|
|
56
|
+
"@fluid-tools/build-cli": "^0.50.0",
|
|
57
57
|
"@fluidframework/build-common": "^2.0.3",
|
|
58
|
-
"@fluidframework/build-tools": "^0.
|
|
59
|
-
"@fluidframework/container-definitions-previous": "npm:@fluidframework/container-definitions@~2.
|
|
58
|
+
"@fluidframework/build-tools": "^0.50.0",
|
|
59
|
+
"@fluidframework/container-definitions-previous": "npm:@fluidframework/container-definitions@~2.5.0",
|
|
60
60
|
"@fluidframework/eslint-config-fluid": "^5.4.0",
|
|
61
61
|
"@microsoft/api-extractor": "7.47.8",
|
|
62
62
|
"concurrently": "^8.2.1",
|
|
@@ -68,7 +68,17 @@
|
|
|
68
68
|
"typescript": "~5.4.5"
|
|
69
69
|
},
|
|
70
70
|
"typeValidation": {
|
|
71
|
-
"broken": {
|
|
71
|
+
"broken": {
|
|
72
|
+
"Interface_IContainer": {
|
|
73
|
+
"backCompat": false
|
|
74
|
+
},
|
|
75
|
+
"Interface_IContainerContext": {
|
|
76
|
+
"backCompat": false
|
|
77
|
+
},
|
|
78
|
+
"Interface_IDeltaManager": {
|
|
79
|
+
"backCompat": false
|
|
80
|
+
}
|
|
81
|
+
},
|
|
72
82
|
"entrypoint": "legacy"
|
|
73
83
|
},
|
|
74
84
|
"scripts": {
|
package/src/deltas.ts
CHANGED
|
@@ -156,20 +156,6 @@ export interface IDeltaManagerEvents extends IEvent {
|
|
|
156
156
|
export interface IDeltaManager<T, U>
|
|
157
157
|
extends IEventProvider<IDeltaManagerEvents>,
|
|
158
158
|
IDeltaSender {
|
|
159
|
-
/**
|
|
160
|
-
* The queue of inbound delta messages
|
|
161
|
-
* @deprecated Do not use, for internal use only. There are a lot of complications in core pieces of the runtime
|
|
162
|
-
* may break if this is used directly. For example summarization and op processing.
|
|
163
|
-
*/
|
|
164
|
-
readonly inbound: IDeltaQueue<T>;
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* The queue of outbound delta messages
|
|
168
|
-
* @deprecated Do not use, for internal use only. There are a lot of complications in core pieces of the runtime
|
|
169
|
-
* may break if this is used directly. For example op submission
|
|
170
|
-
*/
|
|
171
|
-
readonly outbound: IDeltaQueue<U[]>;
|
|
172
|
-
|
|
173
159
|
/**
|
|
174
160
|
* The queue of inbound delta signals
|
|
175
161
|
*/
|
|
@@ -241,6 +227,33 @@ export interface IDeltaManager<T, U>
|
|
|
241
227
|
submitSignal(content: any, targetClientId?: string): void;
|
|
242
228
|
}
|
|
243
229
|
|
|
230
|
+
/**
|
|
231
|
+
* DeltaManager which is used internally by the Fluid layers and not exposed to the end users.
|
|
232
|
+
* @internal
|
|
233
|
+
*/
|
|
234
|
+
export interface IDeltaManagerFull<T = ISequencedDocumentMessage, U = IDocumentMessage>
|
|
235
|
+
extends IDeltaManager<T, U> {
|
|
236
|
+
/**
|
|
237
|
+
* The queue of inbound delta messages
|
|
238
|
+
*/
|
|
239
|
+
readonly inbound: IDeltaQueue<T>;
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* The queue of outbound delta messages
|
|
243
|
+
*/
|
|
244
|
+
readonly outbound: IDeltaQueue<U[]>;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Type guard to check if the given deltaManager is of type {@link @fluidframework/container-definitions#IDeltaManagerFull}.
|
|
249
|
+
* @internal
|
|
250
|
+
*/
|
|
251
|
+
export function isIDeltaManagerFull(
|
|
252
|
+
deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>,
|
|
253
|
+
): deltaManager is IDeltaManagerFull {
|
|
254
|
+
return "inbound" in deltaManager && "outbound" in deltaManager;
|
|
255
|
+
}
|
|
256
|
+
|
|
244
257
|
/**
|
|
245
258
|
* Events emitted by {@link IDeltaQueue}.
|
|
246
259
|
* @sealed
|
package/src/index.ts
CHANGED
|
@@ -19,11 +19,13 @@ export type {
|
|
|
19
19
|
IConnectionDetails,
|
|
20
20
|
IDeltaManager,
|
|
21
21
|
IDeltaManagerEvents,
|
|
22
|
+
IDeltaManagerFull,
|
|
22
23
|
IDeltaQueue,
|
|
23
24
|
IDeltaQueueEvents,
|
|
24
25
|
IDeltaSender,
|
|
25
26
|
ReadOnlyInfo,
|
|
26
27
|
} from "./deltas.js";
|
|
28
|
+
export { isIDeltaManagerFull } from "./deltas.js";
|
|
27
29
|
export type { ContainerWarning, ICriticalContainerError } from "./error.js";
|
|
28
30
|
export { ContainerErrorTypes } from "./error.js";
|
|
29
31
|
export type {
|