@fluidframework/runtime-definitions 2.0.0-internal.6.4.0 → 2.0.0-internal.7.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +86 -0
- package/api-extractor.json +9 -1
- package/api-report/runtime-definitions.api.md +532 -0
- package/dist/attribution.d.ts +1 -1
- package/dist/attribution.d.ts.map +1 -1
- package/dist/dataStoreContext.d.ts +18 -29
- package/dist/dataStoreContext.d.ts.map +1 -1
- package/dist/dataStoreContext.js +2 -2
- package/dist/dataStoreContext.js.map +1 -1
- package/dist/dataStoreRegistry.d.ts +3 -3
- package/dist/dataStoreRegistry.d.ts.map +1 -1
- package/dist/id-compressor/identifiers.d.ts +4 -4
- package/dist/id-compressor/identifiers.d.ts.map +1 -1
- package/dist/id-compressor/persisted-types/0.0.1.d.ts +4 -4
- package/dist/id-compressor/persisted-types/0.0.1.d.ts.map +1 -1
- package/dist/protocol.d.ts +1 -1
- package/dist/protocol.d.ts.map +1 -1
- package/dist/runtime-definitions-alpha.d.ts +1189 -0
- package/dist/runtime-definitions-beta.d.ts +1126 -0
- package/dist/runtime-definitions-public.d.ts +1126 -0
- package/dist/runtime-definitions.d.ts +1193 -0
- package/dist/summary.d.ts +2 -2
- package/dist/summary.d.ts.map +1 -1
- package/dist/summary.js +1 -1
- package/dist/summary.js.map +1 -1
- package/dist/tsdoc-metadata.json +1 -1
- package/package.json +17 -17
- package/src/dataStoreContext.ts +20 -29
|
@@ -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 { IEvent, IEventProvider, ITelemetryBaseLogger, IDisposable, IFluidRouter, IProvideFluidHandleContext, IFluidHandle, IRequest, IResponse, FluidObject } from "@fluidframework/core-interfaces";
|
|
5
|
+
import { IEvent, IEventProvider, ITelemetryBaseLogger, IDisposable, IFluidRouter, IProvideFluidHandleContext, IFluidHandle, IRequest, IResponse, FluidObject, IFluidHandleContext } from "@fluidframework/core-interfaces";
|
|
6
6
|
import { IAudience, IDeltaManager, AttachState, ILoaderOptions } from "@fluidframework/container-definitions";
|
|
7
7
|
import { IDocumentStorageService } from "@fluidframework/driver-definitions";
|
|
8
8
|
import { IClientDetails, IDocumentMessage, IQuorumClients, ISequencedDocumentMessage, ISnapshotTree } from "@fluidframework/protocol-definitions";
|
|
@@ -64,7 +64,7 @@ export declare const VisibilityState: {
|
|
|
64
64
|
*/
|
|
65
65
|
GloballyVisible: string;
|
|
66
66
|
};
|
|
67
|
-
export
|
|
67
|
+
export type VisibilityState = (typeof VisibilityState)[keyof typeof VisibilityState];
|
|
68
68
|
export interface IContainerRuntimeBaseEvents extends IEvent {
|
|
69
69
|
(event: "batchBegin", listener: (op: ISequencedDocumentMessage) => void): any;
|
|
70
70
|
/**
|
|
@@ -84,7 +84,7 @@ export interface IContainerRuntimeBaseEvents extends IEvent {
|
|
|
84
84
|
* and will be garbage collected. The current datastore cannot be aliased to a different value.
|
|
85
85
|
* 'AlreadyAliased' - the datastore has already been previously bound to another alias name.
|
|
86
86
|
*/
|
|
87
|
-
export
|
|
87
|
+
export type AliasResult = "Success" | "Conflict" | "AlreadyAliased";
|
|
88
88
|
/**
|
|
89
89
|
* Exposes some functionality/features of a data store:
|
|
90
90
|
* - Handle to the data store's entryPoint
|
|
@@ -103,18 +103,16 @@ export interface IDataStore {
|
|
|
103
103
|
trySetAlias(alias: string): Promise<AliasResult>;
|
|
104
104
|
/**
|
|
105
105
|
* Exposes a handle to the root object / entryPoint of the data store. Use this as the primary way of interacting
|
|
106
|
-
* with it.
|
|
107
|
-
* particular scenario) fall back to the current approach of requesting the root object through the request pattern.
|
|
108
|
-
*
|
|
109
|
-
* @remarks The plan is that eventually the data store will stop providing IFluidRouter functionality, this property
|
|
110
|
-
* will become non-optional and return an IFluidHandle (no undefined) and will become the only way to access
|
|
111
|
-
* the data store's entryPoint.
|
|
106
|
+
* with it.
|
|
112
107
|
*/
|
|
113
|
-
readonly entryPoint
|
|
108
|
+
readonly entryPoint: IFluidHandle<FluidObject>;
|
|
114
109
|
/**
|
|
110
|
+
* @deprecated Requesting will not be supported in a future major release.
|
|
111
|
+
* Instead, access the objects within the DataStore using entryPoint, and then navigate from there using
|
|
112
|
+
* app-specific logic (e.g. retrieving a handle from a DDS, or the entryPoint object could implement a request paradigm itself)
|
|
113
|
+
*
|
|
115
114
|
* IMPORTANT: This overload is provided for back-compat where IDataStore.request(\{ url: "/" \}) is already implemented and used.
|
|
116
115
|
* The functionality it can provide (if the DataStore implementation is built for it) is redundant with @see {@link IDataStore.entryPoint}.
|
|
117
|
-
* Once that API is mandatory on IDataStore, this overload will be deprecated.
|
|
118
116
|
*
|
|
119
117
|
* Refer to Removing-IFluidRouter.md for details on migrating from the request pattern to using entryPoint.
|
|
120
118
|
*
|
|
@@ -132,9 +130,6 @@ export interface IDataStore {
|
|
|
132
130
|
* Instead, access the objects within the DataStore using entryPoint, and then navigate from there using
|
|
133
131
|
* app-specific logic (e.g. retrieving a handle from a DDS, or the entryPoint object could implement a request paradigm itself)
|
|
134
132
|
*
|
|
135
|
-
* NOTE: IDataStore.request(\{url: "/"\}) is not yet deprecated. If and only if the DataStore implementation supports it,
|
|
136
|
-
* that overload may be used as a proxy for getting the entryPoint until {@link IDataStore.entryPoint} is mandatory.
|
|
137
|
-
*
|
|
138
133
|
* Refer to Removing-IFluidRouter.md for details on migrating from the request pattern to using entryPoint.
|
|
139
134
|
*/
|
|
140
135
|
request(request: IRequest): Promise<IResponse>;
|
|
@@ -147,7 +142,7 @@ export interface IDataStore {
|
|
|
147
142
|
* A reduced set of functionality of IContainerRuntime that a data store context/data store runtime will need
|
|
148
143
|
* TODO: this should be merged into IFluidDataStoreContext
|
|
149
144
|
*/
|
|
150
|
-
export interface IContainerRuntimeBase extends IEventProvider<IContainerRuntimeBaseEvents
|
|
145
|
+
export interface IContainerRuntimeBase extends IEventProvider<IContainerRuntimeBaseEvents> {
|
|
151
146
|
readonly logger: ITelemetryBaseLogger;
|
|
152
147
|
readonly clientDetails: IClientDetails;
|
|
153
148
|
/**
|
|
@@ -157,6 +152,7 @@ export interface IContainerRuntimeBase extends IEventProvider<IContainerRuntimeB
|
|
|
157
152
|
orderSequentially(callback: () => void): void;
|
|
158
153
|
/**
|
|
159
154
|
* Executes a request against the container runtime
|
|
155
|
+
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
160
156
|
*/
|
|
161
157
|
request(request: IRequest): Promise<IResponse>;
|
|
162
158
|
/**
|
|
@@ -199,6 +195,10 @@ export interface IContainerRuntimeBase extends IEventProvider<IContainerRuntimeB
|
|
|
199
195
|
* Returns the current audience.
|
|
200
196
|
*/
|
|
201
197
|
getAudience(): IAudience;
|
|
198
|
+
/**
|
|
199
|
+
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
200
|
+
*/
|
|
201
|
+
readonly IFluidHandleContext: IFluidHandleContext;
|
|
202
202
|
}
|
|
203
203
|
/**
|
|
204
204
|
* Minimal interface a data store runtime needs to provide for IFluidDataStoreContext to bind to control.
|
|
@@ -278,22 +278,16 @@ export interface IFluidDataStoreChannel extends IDisposable {
|
|
|
278
278
|
rollback?(type: string, content: any, localOpMetadata: unknown): void;
|
|
279
279
|
/**
|
|
280
280
|
* Exposes a handle to the root object / entryPoint of the component. Use this as the primary way of interacting
|
|
281
|
-
* with the component.
|
|
282
|
-
* in a particular scenario) fall back to the current approach of requesting the root object through the request
|
|
283
|
-
* pattern.
|
|
284
|
-
*
|
|
285
|
-
* @remarks The plan is that eventually the component will stop providing IFluidRouter functionality, this property
|
|
286
|
-
* will become non-optional and return an IFluidHandle (no undefined) and will become the only way to access
|
|
287
|
-
* the component's entryPoint.
|
|
281
|
+
* with the component.
|
|
288
282
|
*/
|
|
289
|
-
readonly entryPoint
|
|
283
|
+
readonly entryPoint: IFluidHandle<FluidObject>;
|
|
290
284
|
request(request: IRequest): Promise<IResponse>;
|
|
291
285
|
/**
|
|
292
286
|
* @deprecated - Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
293
287
|
*/
|
|
294
288
|
readonly IFluidRouter: IFluidRouter;
|
|
295
289
|
}
|
|
296
|
-
export
|
|
290
|
+
export type CreateChildSummarizerNodeFn = (summarizeInternal: SummarizeInternalFn, getGCDataFn: (fullGC?: boolean) => Promise<IGarbageCollectionData>,
|
|
297
291
|
/**
|
|
298
292
|
* @deprecated - The functionality to get base GC details has been moved to summarizer node.
|
|
299
293
|
*/
|
|
@@ -374,11 +368,6 @@ export interface IFluidDataStoreContext extends IEventProvider<IFluidDataStoreCo
|
|
|
374
368
|
* @param content - Content of the signal.
|
|
375
369
|
*/
|
|
376
370
|
submitSignal(type: string, content: any): void;
|
|
377
|
-
/**
|
|
378
|
-
* @deprecated To be removed in favor of makeVisible.
|
|
379
|
-
* Register the runtime to the container
|
|
380
|
-
*/
|
|
381
|
-
bindToContext(): void;
|
|
382
371
|
/**
|
|
383
372
|
* Called to make the data store locally visible in the container. This happens automatically for root data stores
|
|
384
373
|
* when they are marked as root. For non-root data stores, this happens when their handle is added to a visible DDS.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataStoreContext.d.ts","sourceRoot":"","sources":["../src/dataStoreContext.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,MAAM,EACN,cAAc,EACd,oBAAoB,EACpB,WAAW,
|
|
1
|
+
{"version":3,"file":"dataStoreContext.d.ts","sourceRoot":"","sources":["../src/dataStoreContext.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,MAAM,EACN,cAAc,EACd,oBAAoB,EACpB,WAAW,EAEX,YAAY,EACZ,0BAA0B,EAC1B,YAAY,EACZ,QAAQ,EACR,S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/dist/dataStoreContext.js
CHANGED
|
@@ -19,7 +19,7 @@ var FlushMode;
|
|
|
19
19
|
* batch at the end of the turn. The flush call on the runtime can be used to force send the current batch.
|
|
20
20
|
*/
|
|
21
21
|
FlushMode[FlushMode["TurnBased"] = 1] = "TurnBased";
|
|
22
|
-
})(FlushMode
|
|
22
|
+
})(FlushMode || (exports.FlushMode = FlushMode = {}));
|
|
23
23
|
var FlushModeExperimental;
|
|
24
24
|
(function (FlushModeExperimental) {
|
|
25
25
|
/**
|
|
@@ -32,7 +32,7 @@ var FlushModeExperimental;
|
|
|
32
32
|
* @experimental - Not ready for use
|
|
33
33
|
*/
|
|
34
34
|
FlushModeExperimental[FlushModeExperimental["Async"] = 2] = "Async";
|
|
35
|
-
})(FlushModeExperimental
|
|
35
|
+
})(FlushModeExperimental || (exports.FlushModeExperimental = FlushModeExperimental = {}));
|
|
36
36
|
/**
|
|
37
37
|
* This tells the visibility state of a Fluid object. It basically tracks whether the object is not visible, visible
|
|
38
38
|
* locally within the container only or visible globally to all clients.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataStoreContext.js","sourceRoot":"","sources":["../src/dataStoreContext.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAyCH;;GAEG;AACH,IAAY,SAWX;AAXD,WAAY,SAAS;IACpB;;OAEG;IACH,mDAAS,CAAA;IAET;;;OAGG;IACH,mDAAS,CAAA;AACV,CAAC,EAXW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAWpB;AAED,IAAY,qBAWX;AAXD,WAAY,qBAAqB;IAChC;;;;;;;;OAQG;IACH,mEAAS,CAAA;AACV,CAAC,EAXW,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAWhC;AAED;;;GAGG;AACU,QAAA,eAAe,GAAG;IAC9B;;OAEG;IACH,UAAU,EAAE,YAAY;IAExB;;;;OAIG;IACH,cAAc,EAAE,gBAAgB;IAEhC;;;;;;;;OAQG;IACH,eAAe,EAAE,iBAAiB;CAClC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tIEvent,\n\tIEventProvider,\n\tITelemetryBaseLogger,\n\tIDisposable,\n\tIFluidRouter,\n\tIProvideFluidHandleContext,\n\tIFluidHandle,\n\tIRequest,\n\tIResponse,\n\tFluidObject,\n} from \"@fluidframework/core-interfaces\";\nimport {\n\tIAudience,\n\tIDeltaManager,\n\tAttachState,\n\tILoaderOptions,\n} from \"@fluidframework/container-definitions\";\nimport { IDocumentStorageService } from \"@fluidframework/driver-definitions\";\nimport {\n\tIClientDetails,\n\tIDocumentMessage,\n\tIQuorumClients,\n\tISequencedDocumentMessage,\n\tISnapshotTree,\n} from \"@fluidframework/protocol-definitions\";\nimport { IProvideFluidDataStoreFactory } from \"./dataStoreFactory\";\nimport { IProvideFluidDataStoreRegistry } from \"./dataStoreRegistry\";\nimport { IGarbageCollectionData, IGarbageCollectionDetailsBase } from \"./garbageCollection\";\nimport { IInboundSignalMessage } from \"./protocol\";\nimport {\n\tCreateChildSummarizerNodeParam,\n\tISummarizerNodeWithGC,\n\tISummaryTreeWithStats,\n\tITelemetryContext,\n\tSummarizeInternalFn,\n} from \"./summary\";\nimport { IIdCompressor } from \"./id-compressor\";\n\n/**\n * Runtime flush mode handling\n */\nexport enum FlushMode {\n\t/**\n\t * In Immediate flush mode the runtime will immediately send all operations to the driver layer.\n\t */\n\tImmediate,\n\n\t/**\n\t * When in TurnBased flush mode the runtime will buffer operations in the current turn and send them as a single\n\t * batch at the end of the turn. The flush call on the runtime can be used to force send the current batch.\n\t */\n\tTurnBased,\n}\n\nexport enum FlushModeExperimental {\n\t/**\n\t * When in Async flush mode, the runtime will accumulate all operations across JS turns and send them as a single\n\t * batch when all micro-tasks are complete.\n\t *\n\t * This feature requires a version of the loader which supports reference sequence numbers. If an older version of\n\t * the loader is used, the runtime will fall back on FlushMode.TurnBased.\n\t *\n\t * @experimental - Not ready for use\n\t */\n\tAsync = 2,\n}\n\n/**\n * This tells the visibility state of a Fluid object. It basically tracks whether the object is not visible, visible\n * locally within the container only or visible globally to all clients.\n */\nexport const VisibilityState = {\n\t/**\n\t * Indicates that the object is not visible. This is the state when an object is first created.\n\t */\n\tNotVisible: \"NotVisible\",\n\n\t/**\n\t * Indicates that the object is visible locally within the container. This is the state when an object is attached\n\t * to the container's graph but the container itself isn't globally visible. The object's state goes from not\n\t * visible to locally visible.\n\t */\n\tLocallyVisible: \"LocallyVisible\",\n\n\t/**\n\t * Indicates that the object is visible globally to all clients. This is the state of an object in 2 scenarios:\n\t *\n\t * 1. It is attached to the container's graph when the container is globally visible. The object's state goes from\n\t * not visible to globally visible.\n\t *\n\t * 2. When a container becomes globally visible, all locally visible objects go from locally visible to globally\n\t * visible.\n\t */\n\tGloballyVisible: \"GloballyVisible\",\n};\nexport type VisibilityState = typeof VisibilityState[keyof typeof VisibilityState];\n\nexport interface IContainerRuntimeBaseEvents extends IEvent {\n\t(event: \"batchBegin\", listener: (op: ISequencedDocumentMessage) => void);\n\t/**\n\t * @param runtimeMessage - tells if op is runtime op. If it is, it was unpacked, i.e. it's type and content\n\t * represent internal container runtime type / content.\n\t */\n\t(event: \"op\", listener: (op: ISequencedDocumentMessage, runtimeMessage?: boolean) => void);\n\t(event: \"batchEnd\", listener: (error: any, op: ISequencedDocumentMessage) => void);\n\t(event: \"signal\", listener: (message: IInboundSignalMessage, local: boolean) => void);\n}\n\n/**\n * Encapsulates the return codes of the aliasing API.\n *\n * 'Success' - the datastore has been successfully aliased. It can now be used.\n * 'Conflict' - there is already a datastore bound to the provided alias. To acquire it's entry point, use\n * the `IContainerRuntime.getAliasedDataStoreEntryPoint` function. The current datastore should be discarded\n * and will be garbage collected. The current datastore cannot be aliased to a different value.\n * 'AlreadyAliased' - the datastore has already been previously bound to another alias name.\n */\nexport type AliasResult = \"Success\" | \"Conflict\" | \"AlreadyAliased\";\n\n/**\n * Exposes some functionality/features of a data store:\n * - Handle to the data store's entryPoint\n * - Fluid router for the data store\n * - Can be assigned an alias\n */\nexport interface IDataStore {\n\t/**\n\t * Attempt to assign an alias to the datastore.\n\t * If the operation succeeds, the datastore can be referenced\n\t * by the supplied alias and will not be garbage collected.\n\t *\n\t * @param alias - Given alias for this datastore.\n\t * @returns A promise with the {@link AliasResult}\n\t */\n\ttrySetAlias(alias: string): Promise<AliasResult>;\n\n\t/**\n\t * Exposes a handle to the root object / entryPoint of the data store. Use this as the primary way of interacting\n\t * with it. If this property is undefined (meaning that exposing the entryPoint hasn't been implemented in a\n\t * particular scenario) fall back to the current approach of requesting the root object through the request pattern.\n\t *\n\t * @remarks The plan is that eventually the data store will stop providing IFluidRouter functionality, this property\n\t * will become non-optional and return an IFluidHandle (no undefined) and will become the only way to access\n\t * the data store's entryPoint.\n\t */\n\treadonly entryPoint?: IFluidHandle<FluidObject>;\n\n\t/**\n\t * IMPORTANT: This overload is provided for back-compat where IDataStore.request(\\{ url: \"/\" \\}) is already implemented and used.\n\t * The functionality it can provide (if the DataStore implementation is built for it) is redundant with @see {@link IDataStore.entryPoint}.\n\t * Once that API is mandatory on IDataStore, this overload will be deprecated.\n\t *\n\t * Refer to Removing-IFluidRouter.md for details on migrating from the request pattern to using entryPoint.\n\t *\n\t * @param request - Only requesting \\{ url: \"/\" \\} is supported, requesting arbitrary URLs is deprecated.\n\t */\n\trequest(request: { url: \"/\"; headers?: undefined }): Promise<IResponse>;\n\n\t/**\n\t * Issue a request against the DataStore for a resource within it.\n\t * @param request - The request to be issued against the DataStore\n\t *\n\t * @deprecated - Requesting an arbitrary URL with headers will not be supported in a future major release.\n\t * Instead, access the objects within the DataStore using entryPoint, and then navigate from there using\n\t * app-specific logic (e.g. retrieving a handle from a DDS, or the entryPoint object could implement a request paradigm itself)\n\t *\n\t * NOTE: IDataStore.request(\\{url: \"/\"\\}) is not yet deprecated. If and only if the DataStore implementation supports it,\n\t * that overload may be used as a proxy for getting the entryPoint until {@link IDataStore.entryPoint} is mandatory.\n\t *\n\t * Refer to Removing-IFluidRouter.md for details on migrating from the request pattern to using entryPoint.\n\t */\n\trequest(request: IRequest): Promise<IResponse>;\n\n\t/**\n\t * @deprecated - Will be removed in future major release. Migrate all usage of IFluidRouter to the \"entryPoint\" pattern. Refer to Removing-IFluidRouter.md\n\t */\n\treadonly IFluidRouter: IFluidRouter;\n}\n\n/**\n * A reduced set of functionality of IContainerRuntime that a data store context/data store runtime will need\n * TODO: this should be merged into IFluidDataStoreContext\n */\nexport interface IContainerRuntimeBase\n\textends IEventProvider<IContainerRuntimeBaseEvents>,\n\t\tIProvideFluidHandleContext {\n\treadonly logger: ITelemetryBaseLogger;\n\treadonly clientDetails: IClientDetails;\n\n\t/**\n\t * Invokes the given callback and guarantees that all operations generated within the callback will be ordered\n\t * sequentially. Total size of all messages must be less than maxOpSize.\n\t */\n\torderSequentially(callback: () => void): void;\n\n\t/**\n\t * Executes a request against the container runtime\n\t */\n\trequest(request: IRequest): Promise<IResponse>;\n\n\t/**\n\t * Submits a container runtime level signal to be sent to other clients.\n\t * @param type - Type of the signal.\n\t * @param content - Content of the signal.\n\t */\n\tsubmitSignal(type: string, content: any): void;\n\n\t/**\n\t * @deprecated 0.16 Issue #1537, #3631\n\t * @internal\n\t */\n\t_createDataStoreWithProps(\n\t\tpkg: string | string[],\n\t\tprops?: any,\n\t\tid?: string,\n\t): Promise<IDataStore>;\n\n\t/**\n\t * Creates a data store and returns an object that exposes a handle to the data store's entryPoint, and also serves\n\t * as the data store's router. The data store is not bound to a container, and in such state is not persisted to\n\t * storage (file). Storing the entryPoint handle (or any other handle inside the data store, e.g. for DDS) into an\n\t * already attached DDS (or non-attached DDS that will eventually get attached to storage) will result in this\n\t * store being attached to storage.\n\t * @param pkg - Package name of the data store factory\n\t */\n\tcreateDataStore(pkg: string | string[]): Promise<IDataStore>;\n\n\t/**\n\t * Creates detached data store context. Only after context.attachRuntime() is called,\n\t * data store initialization is considered complete.\n\t */\n\tcreateDetachedDataStore(pkg: Readonly<string[]>): IFluidDataStoreContextDetached;\n\n\t/**\n\t * Get an absolute url for a provided container-relative request.\n\t * Returns undefined if the container or data store isn't attached to storage.\n\t * @param relativeUrl - A relative request within the container\n\t */\n\tgetAbsoluteUrl(relativeUrl: string): Promise<string | undefined>;\n\n\tuploadBlob(blob: ArrayBufferLike, signal?: AbortSignal): Promise<IFluidHandle<ArrayBufferLike>>;\n\n\t/**\n\t * Returns the current quorum.\n\t */\n\tgetQuorum(): IQuorumClients;\n\n\t/**\n\t * Returns the current audience.\n\t */\n\tgetAudience(): IAudience;\n}\n\n/**\n * Minimal interface a data store runtime needs to provide for IFluidDataStoreContext to bind to control.\n *\n * Functionality include attach, snapshot, op/signal processing, request routes, expose an entryPoint,\n * and connection state notifications\n */\nexport interface IFluidDataStoreChannel extends IDisposable {\n\treadonly id: string;\n\n\t/**\n\t * Indicates the attachment state of the channel to a host service.\n\t */\n\treadonly attachState: AttachState;\n\n\treadonly visibilityState: VisibilityState;\n\n\t/**\n\t * Runs through the graph and attaches the bound handles. Then binds this runtime to the container.\n\t * @deprecated This will be removed in favor of {@link IFluidDataStoreChannel.makeVisibleAndAttachGraph}.\n\t */\n\tattachGraph(): void;\n\n\t/**\n\t * Makes the data store channel visible in the container. Also, runs through its graph and attaches all\n\t * bound handles that represent its dependencies in the container's graph.\n\t */\n\tmakeVisibleAndAttachGraph(): void;\n\n\t/**\n\t * Retrieves the summary used as part of the initial summary message\n\t */\n\tgetAttachSummary(telemetryContext?: ITelemetryContext): ISummaryTreeWithStats;\n\n\t/**\n\t * Processes the op.\n\t */\n\tprocess(message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown): void;\n\n\t/**\n\t * Processes the signal.\n\t */\n\tprocessSignal(message: any, local: boolean): void;\n\n\t/**\n\t * Generates a summary for the channel.\n\t * Introduced with summarizerNode - will be required in a future release.\n\t * @param fullTree - true to bypass optimizations and force a full summary tree.\n\t * @param trackState - This tells whether we should track state from this summary.\n\t * @param telemetryContext - summary data passed through the layers for telemetry purposes\n\t */\n\tsummarize(\n\t\tfullTree?: boolean,\n\t\ttrackState?: boolean,\n\t\ttelemetryContext?: ITelemetryContext,\n\t): Promise<ISummaryTreeWithStats>;\n\n\t/**\n\t * Returns the data used for garbage collection. This includes a list of GC nodes that represent this context\n\t * including any of its children. Each node has a list of outbound routes to other GC nodes in the document.\n\t * @param fullGC - true to bypass optimizations and force full generation of GC data.\n\t */\n\tgetGCData(fullGC?: boolean): Promise<IGarbageCollectionData>;\n\n\t/**\n\t * After GC has run, called to notify this channel of routes that are used in it.\n\t * @param usedRoutes - The routes that are used in this channel.\n\t */\n\tupdateUsedRoutes(usedRoutes: string[]): void;\n\n\t/**\n\t * Notifies this object about changes in the connection state.\n\t * @param value - New connection state.\n\t * @param clientId - ID of the client. It's old ID when in disconnected state and\n\t * it's new client ID when we are connecting or connected.\n\t */\n\tsetConnectionState(connected: boolean, clientId?: string);\n\n\t/**\n\t * Ask the DDS to resubmit a message. This could be because we reconnected and this message was not acked.\n\t * @param type - The type of the original message.\n\t * @param content - The content of the original message.\n\t * @param localOpMetadata - The local metadata associated with the original message.\n\t */\n\treSubmit(type: string, content: any, localOpMetadata: unknown);\n\n\tapplyStashedOp(content: any): Promise<unknown>;\n\n\t/**\n\t * Revert a local message.\n\t * @param type - The type of the original message.\n\t * @param content - The content of the original message.\n\t * @param localOpMetadata - The local metadata associated with the original message.\n\t */\n\trollback?(type: string, content: any, localOpMetadata: unknown): void;\n\n\t/**\n\t * Exposes a handle to the root object / entryPoint of the component. Use this as the primary way of interacting\n\t * with the component. If this property is undefined (meaning that exposing the entryPoint hasn't been implemented\n\t * in a particular scenario) fall back to the current approach of requesting the root object through the request\n\t * pattern.\n\t *\n\t * @remarks The plan is that eventually the component will stop providing IFluidRouter functionality, this property\n\t * will become non-optional and return an IFluidHandle (no undefined) and will become the only way to access\n\t * the component's entryPoint.\n\t */\n\treadonly entryPoint?: IFluidHandle<FluidObject>;\n\n\trequest(request: IRequest): Promise<IResponse>;\n\n\t/**\n\t * @deprecated - Will be removed in future major release. Migrate all usage of IFluidRouter to the \"entryPoint\" pattern. Refer to Removing-IFluidRouter.md\n\t */\n\treadonly IFluidRouter: IFluidRouter;\n}\n\nexport type CreateChildSummarizerNodeFn = (\n\tsummarizeInternal: SummarizeInternalFn,\n\tgetGCDataFn: (fullGC?: boolean) => Promise<IGarbageCollectionData>,\n\t/**\n\t * @deprecated - The functionality to get base GC details has been moved to summarizer node.\n\t */\n\tgetBaseGCDetailsFn?: () => Promise<IGarbageCollectionDetailsBase>,\n) => ISummarizerNodeWithGC;\n\nexport interface IFluidDataStoreContextEvents extends IEvent {\n\t(event: \"attaching\" | \"attached\", listener: () => void);\n}\n\n/**\n * Represents the context for the data store. It is used by the data store runtime to\n * get information and call functionality to the container.\n */\nexport interface IFluidDataStoreContext\n\textends IEventProvider<IFluidDataStoreContextEvents>,\n\t\tPartial<IProvideFluidDataStoreRegistry>,\n\t\tIProvideFluidHandleContext {\n\treadonly id: string;\n\t/**\n\t * A data store created by a client, is a local data store for that client. Also, when a detached container loads\n\t * from a snapshot, all the data stores are treated as local data stores because at that stage the container\n\t * still doesn't exists in storage and so the data store couldn't have been created by any other client.\n\t * Value of this never changes even after the data store is attached.\n\t * As implementer of data store runtime, you can use this property to check that this data store belongs to this\n\t * client and hence implement any scenario based on that.\n\t */\n\treadonly isLocalDataStore: boolean;\n\t/**\n\t * The package path of the data store as per the package factory.\n\t */\n\treadonly packagePath: readonly string[];\n\treadonly options: ILoaderOptions;\n\treadonly clientId: string | undefined;\n\treadonly connected: boolean;\n\treadonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;\n\treadonly storage: IDocumentStorageService;\n\treadonly baseSnapshot: ISnapshotTree | undefined;\n\treadonly logger: ITelemetryBaseLogger;\n\treadonly clientDetails: IClientDetails;\n\treadonly idCompressor?: IIdCompressor;\n\t/**\n\t * Indicates the attachment state of the data store to a host service.\n\t */\n\treadonly attachState: AttachState;\n\n\treadonly containerRuntime: IContainerRuntimeBase;\n\n\t/**\n\t * @deprecated 0.16 Issue #1635, #3631\n\t */\n\treadonly createProps?: any;\n\n\t/**\n\t * Ambient services provided with the context\n\t */\n\treadonly scope: FluidObject;\n\n\t/**\n\t * Returns the current quorum.\n\t */\n\tgetQuorum(): IQuorumClients;\n\n\t/**\n\t * Returns the current audience.\n\t */\n\tgetAudience(): IAudience;\n\n\t/**\n\t * Invokes the given callback and expects that no ops are submitted\n\t * until execution finishes. If an op is submitted, an error will be raised.\n\t *\n\t * Can be disabled by feature gate `Fluid.ContainerRuntime.DisableOpReentryCheck`\n\t *\n\t * @param callback - the callback to be invoked\n\t */\n\tensureNoDataModelChanges<T>(callback: () => T): T;\n\n\t/**\n\t * Submits the message to be sent to other clients.\n\t * @param type - Type of the message.\n\t * @param content - Content of the message.\n\t * @param localOpMetadata - The local metadata associated with the message. This is kept locally and not sent to\n\t * the server. This will be sent back when this message is received back from the server. This is also sent if\n\t * we are asked to resubmit the message.\n\t */\n\tsubmitMessage(type: string, content: any, localOpMetadata: unknown): void;\n\n\t/**\n\t * Submits the signal to be sent to other clients.\n\t * @param type - Type of the signal.\n\t * @param content - Content of the signal.\n\t */\n\tsubmitSignal(type: string, content: any): void;\n\n\t/**\n\t * @deprecated To be removed in favor of makeVisible.\n\t * Register the runtime to the container\n\t */\n\tbindToContext(): void;\n\n\t/**\n\t * Called to make the data store locally visible in the container. This happens automatically for root data stores\n\t * when they are marked as root. For non-root data stores, this happens when their handle is added to a visible DDS.\n\t */\n\tmakeLocallyVisible(): void;\n\n\t/**\n\t * Call by IFluidDataStoreChannel, indicates that a channel is dirty and needs to be part of the summary.\n\t * @param address - The address of the channel that is dirty.\n\t */\n\tsetChannelDirty(address: string): void;\n\n\t/**\n\t * Get an absolute url to the container based on the provided relativeUrl.\n\t * Returns undefined if the container or data store isn't attached to storage.\n\t * @param relativeUrl - A relative request within the container\n\t */\n\tgetAbsoluteUrl(relativeUrl: string): Promise<string | undefined>;\n\n\tgetCreateChildSummarizerNodeFn(\n\t\t/**\n\t\t * Initial id or path part of this node\n\t\t */\n\t\tid: string,\n\t\t/**\n\t\t * Information needed to create the node.\n\t\t * If it is from a base summary, it will assert that a summary has been seen.\n\t\t * Attach information if it is created from an attach op.\n\t\t * If it is local, it will throw unsupported errors on calls to summarize.\n\t\t */\n\t\tcreateParam: CreateChildSummarizerNodeParam,\n\t): CreateChildSummarizerNodeFn;\n\n\tuploadBlob(blob: ArrayBufferLike, signal?: AbortSignal): Promise<IFluidHandle<ArrayBufferLike>>;\n\n\t/**\n\t * @deprecated - The functionality to get base GC details has been moved to summarizer node.\n\t *\n\t * Returns the GC details in the initial summary of this data store. This is used to initialize the data store\n\t * and its children with the GC details from the previous summary.\n\t */\n\tgetBaseGCDetails(): Promise<IGarbageCollectionDetailsBase>;\n\n\t/**\n\t * Called when a new outbound reference is added to another node. This is used by garbage collection to identify\n\t * all references added in the system.\n\t * @param srcHandle - The handle of the node that added the reference.\n\t * @param outboundHandle - The handle of the outbound node that is referenced.\n\t */\n\taddedGCOutboundReference?(srcHandle: IFluidHandle, outboundHandle: IFluidHandle): void;\n}\n\nexport interface IFluidDataStoreContextDetached extends IFluidDataStoreContext {\n\t/**\n\t * Binds a runtime to the context.\n\t */\n\tattachRuntime(\n\t\tfactory: IProvideFluidDataStoreFactory,\n\t\tdataStoreRuntime: IFluidDataStoreChannel,\n\t): Promise<void>;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"dataStoreContext.js","sourceRoot":"","sources":["../src/dataStoreContext.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AA2CH;;GAEG;AACH,IAAY,SAWX;AAXD,WAAY,SAAS;IACpB;;OAEG;IACH,mDAAS,CAAA;IAET;;;OAGG;IACH,mDAAS,CAAA;AACV,CAAC,EAXW,SAAS,yBAAT,SAAS,QAWpB;AAED,IAAY,qBAWX;AAXD,WAAY,qBAAqB;IAChC;;;;;;;;OAQG;IACH,mEAAS,CAAA;AACV,CAAC,EAXW,qBAAqB,qCAArB,qBAAqB,QAWhC;AAED;;;GAGG;AACU,QAAA,eAAe,GAAG;IAC9B;;OAEG;IACH,UAAU,EAAE,YAAY;IAExB;;;;OAIG;IACH,cAAc,EAAE,gBAAgB;IAEhC;;;;;;;;OAQG;IACH,eAAe,EAAE,iBAAiB;CAClC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tIEvent,\n\tIEventProvider,\n\tITelemetryBaseLogger,\n\tIDisposable,\n\t// eslint-disable-next-line import/no-deprecated\n\tIFluidRouter,\n\tIProvideFluidHandleContext,\n\tIFluidHandle,\n\tIRequest,\n\tIResponse,\n\tFluidObject,\n\tIFluidHandleContext,\n} from \"@fluidframework/core-interfaces\";\nimport {\n\tIAudience,\n\tIDeltaManager,\n\tAttachState,\n\tILoaderOptions,\n} from \"@fluidframework/container-definitions\";\nimport { IDocumentStorageService } from \"@fluidframework/driver-definitions\";\nimport {\n\tIClientDetails,\n\tIDocumentMessage,\n\tIQuorumClients,\n\tISequencedDocumentMessage,\n\tISnapshotTree,\n} from \"@fluidframework/protocol-definitions\";\nimport { IProvideFluidDataStoreFactory } from \"./dataStoreFactory\";\nimport { IProvideFluidDataStoreRegistry } from \"./dataStoreRegistry\";\nimport { IGarbageCollectionData, IGarbageCollectionDetailsBase } from \"./garbageCollection\";\nimport { IInboundSignalMessage } from \"./protocol\";\nimport {\n\tCreateChildSummarizerNodeParam,\n\tISummarizerNodeWithGC,\n\tISummaryTreeWithStats,\n\tITelemetryContext,\n\tSummarizeInternalFn,\n} from \"./summary\";\nimport { IIdCompressor } from \"./id-compressor\";\n\n/**\n * Runtime flush mode handling\n */\nexport enum FlushMode {\n\t/**\n\t * In Immediate flush mode the runtime will immediately send all operations to the driver layer.\n\t */\n\tImmediate,\n\n\t/**\n\t * When in TurnBased flush mode the runtime will buffer operations in the current turn and send them as a single\n\t * batch at the end of the turn. The flush call on the runtime can be used to force send the current batch.\n\t */\n\tTurnBased,\n}\n\nexport enum FlushModeExperimental {\n\t/**\n\t * When in Async flush mode, the runtime will accumulate all operations across JS turns and send them as a single\n\t * batch when all micro-tasks are complete.\n\t *\n\t * This feature requires a version of the loader which supports reference sequence numbers. If an older version of\n\t * the loader is used, the runtime will fall back on FlushMode.TurnBased.\n\t *\n\t * @experimental - Not ready for use\n\t */\n\tAsync = 2,\n}\n\n/**\n * This tells the visibility state of a Fluid object. It basically tracks whether the object is not visible, visible\n * locally within the container only or visible globally to all clients.\n */\nexport const VisibilityState = {\n\t/**\n\t * Indicates that the object is not visible. This is the state when an object is first created.\n\t */\n\tNotVisible: \"NotVisible\",\n\n\t/**\n\t * Indicates that the object is visible locally within the container. This is the state when an object is attached\n\t * to the container's graph but the container itself isn't globally visible. The object's state goes from not\n\t * visible to locally visible.\n\t */\n\tLocallyVisible: \"LocallyVisible\",\n\n\t/**\n\t * Indicates that the object is visible globally to all clients. This is the state of an object in 2 scenarios:\n\t *\n\t * 1. It is attached to the container's graph when the container is globally visible. The object's state goes from\n\t * not visible to globally visible.\n\t *\n\t * 2. When a container becomes globally visible, all locally visible objects go from locally visible to globally\n\t * visible.\n\t */\n\tGloballyVisible: \"GloballyVisible\",\n};\nexport type VisibilityState = (typeof VisibilityState)[keyof typeof VisibilityState];\n\nexport interface IContainerRuntimeBaseEvents extends IEvent {\n\t(event: \"batchBegin\", listener: (op: ISequencedDocumentMessage) => void);\n\t/**\n\t * @param runtimeMessage - tells if op is runtime op. If it is, it was unpacked, i.e. it's type and content\n\t * represent internal container runtime type / content.\n\t */\n\t(event: \"op\", listener: (op: ISequencedDocumentMessage, runtimeMessage?: boolean) => void);\n\t(event: \"batchEnd\", listener: (error: any, op: ISequencedDocumentMessage) => void);\n\t(event: \"signal\", listener: (message: IInboundSignalMessage, local: boolean) => void);\n}\n\n/**\n * Encapsulates the return codes of the aliasing API.\n *\n * 'Success' - the datastore has been successfully aliased. It can now be used.\n * 'Conflict' - there is already a datastore bound to the provided alias. To acquire it's entry point, use\n * the `IContainerRuntime.getAliasedDataStoreEntryPoint` function. The current datastore should be discarded\n * and will be garbage collected. The current datastore cannot be aliased to a different value.\n * 'AlreadyAliased' - the datastore has already been previously bound to another alias name.\n */\nexport type AliasResult = \"Success\" | \"Conflict\" | \"AlreadyAliased\";\n\n/**\n * Exposes some functionality/features of a data store:\n * - Handle to the data store's entryPoint\n * - Fluid router for the data store\n * - Can be assigned an alias\n */\nexport interface IDataStore {\n\t/**\n\t * Attempt to assign an alias to the datastore.\n\t * If the operation succeeds, the datastore can be referenced\n\t * by the supplied alias and will not be garbage collected.\n\t *\n\t * @param alias - Given alias for this datastore.\n\t * @returns A promise with the {@link AliasResult}\n\t */\n\ttrySetAlias(alias: string): Promise<AliasResult>;\n\n\t/**\n\t * Exposes a handle to the root object / entryPoint of the data store. Use this as the primary way of interacting\n\t * with it.\n\t */\n\treadonly entryPoint: IFluidHandle<FluidObject>;\n\n\t/**\n\t * @deprecated Requesting will not be supported in a future major release.\n\t * Instead, access the objects within the DataStore using entryPoint, and then navigate from there using\n\t * app-specific logic (e.g. retrieving a handle from a DDS, or the entryPoint object could implement a request paradigm itself)\n\t *\n\t * IMPORTANT: This overload is provided for back-compat where IDataStore.request(\\{ url: \"/\" \\}) is already implemented and used.\n\t * The functionality it can provide (if the DataStore implementation is built for it) is redundant with @see {@link IDataStore.entryPoint}.\n\t *\n\t * Refer to Removing-IFluidRouter.md for details on migrating from the request pattern to using entryPoint.\n\t *\n\t * @param request - Only requesting \\{ url: \"/\" \\} is supported, requesting arbitrary URLs is deprecated.\n\t */\n\trequest(request: { url: \"/\"; headers?: undefined }): Promise<IResponse>;\n\n\t/**\n\t * Issue a request against the DataStore for a resource within it.\n\t * @param request - The request to be issued against the DataStore\n\t *\n\t * @deprecated - Requesting an arbitrary URL with headers will not be supported in a future major release.\n\t * Instead, access the objects within the DataStore using entryPoint, and then navigate from there using\n\t * app-specific logic (e.g. retrieving a handle from a DDS, or the entryPoint object could implement a request paradigm itself)\n\t *\n\t * Refer to Removing-IFluidRouter.md for details on migrating from the request pattern to using entryPoint.\n\t */\n\trequest(request: IRequest): Promise<IResponse>;\n\n\t/**\n\t * @deprecated - Will be removed in future major release. Migrate all usage of IFluidRouter to the \"entryPoint\" pattern. Refer to Removing-IFluidRouter.md\n\t */\n\t// eslint-disable-next-line import/no-deprecated\n\treadonly IFluidRouter: IFluidRouter;\n}\n\n/**\n * A reduced set of functionality of IContainerRuntime that a data store context/data store runtime will need\n * TODO: this should be merged into IFluidDataStoreContext\n */\nexport interface IContainerRuntimeBase extends IEventProvider<IContainerRuntimeBaseEvents> {\n\treadonly logger: ITelemetryBaseLogger;\n\treadonly clientDetails: IClientDetails;\n\n\t/**\n\t * Invokes the given callback and guarantees that all operations generated within the callback will be ordered\n\t * sequentially. Total size of all messages must be less than maxOpSize.\n\t */\n\torderSequentially(callback: () => void): void;\n\n\t/**\n\t * Executes a request against the container runtime\n\t * @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the \"entryPoint\" pattern. Refer to Removing-IFluidRouter.md\n\t */\n\trequest(request: IRequest): Promise<IResponse>;\n\n\t/**\n\t * Submits a container runtime level signal to be sent to other clients.\n\t * @param type - Type of the signal.\n\t * @param content - Content of the signal.\n\t */\n\tsubmitSignal(type: string, content: any): void;\n\n\t/**\n\t * @deprecated 0.16 Issue #1537, #3631\n\t * @internal\n\t */\n\t_createDataStoreWithProps(\n\t\tpkg: string | string[],\n\t\tprops?: any,\n\t\tid?: string,\n\t): Promise<IDataStore>;\n\n\t/**\n\t * Creates a data store and returns an object that exposes a handle to the data store's entryPoint, and also serves\n\t * as the data store's router. The data store is not bound to a container, and in such state is not persisted to\n\t * storage (file). Storing the entryPoint handle (or any other handle inside the data store, e.g. for DDS) into an\n\t * already attached DDS (or non-attached DDS that will eventually get attached to storage) will result in this\n\t * store being attached to storage.\n\t * @param pkg - Package name of the data store factory\n\t */\n\tcreateDataStore(pkg: string | string[]): Promise<IDataStore>;\n\n\t/**\n\t * Creates detached data store context. Only after context.attachRuntime() is called,\n\t * data store initialization is considered complete.\n\t */\n\tcreateDetachedDataStore(pkg: Readonly<string[]>): IFluidDataStoreContextDetached;\n\n\t/**\n\t * Get an absolute url for a provided container-relative request.\n\t * Returns undefined if the container or data store isn't attached to storage.\n\t * @param relativeUrl - A relative request within the container\n\t */\n\tgetAbsoluteUrl(relativeUrl: string): Promise<string | undefined>;\n\n\tuploadBlob(blob: ArrayBufferLike, signal?: AbortSignal): Promise<IFluidHandle<ArrayBufferLike>>;\n\n\t/**\n\t * Returns the current quorum.\n\t */\n\tgetQuorum(): IQuorumClients;\n\n\t/**\n\t * Returns the current audience.\n\t */\n\tgetAudience(): IAudience;\n\n\t/**\n\t * @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the \"entryPoint\" pattern. Refer to Removing-IFluidRouter.md\n\t */\n\treadonly IFluidHandleContext: IFluidHandleContext;\n}\n\n/**\n * Minimal interface a data store runtime needs to provide for IFluidDataStoreContext to bind to control.\n *\n * Functionality include attach, snapshot, op/signal processing, request routes, expose an entryPoint,\n * and connection state notifications\n */\nexport interface IFluidDataStoreChannel extends IDisposable {\n\treadonly id: string;\n\n\t/**\n\t * Indicates the attachment state of the channel to a host service.\n\t */\n\treadonly attachState: AttachState;\n\n\treadonly visibilityState: VisibilityState;\n\n\t/**\n\t * Runs through the graph and attaches the bound handles. Then binds this runtime to the container.\n\t * @deprecated This will be removed in favor of {@link IFluidDataStoreChannel.makeVisibleAndAttachGraph}.\n\t */\n\tattachGraph(): void;\n\n\t/**\n\t * Makes the data store channel visible in the container. Also, runs through its graph and attaches all\n\t * bound handles that represent its dependencies in the container's graph.\n\t */\n\tmakeVisibleAndAttachGraph(): void;\n\n\t/**\n\t * Retrieves the summary used as part of the initial summary message\n\t */\n\tgetAttachSummary(telemetryContext?: ITelemetryContext): ISummaryTreeWithStats;\n\n\t/**\n\t * Processes the op.\n\t */\n\tprocess(message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown): void;\n\n\t/**\n\t * Processes the signal.\n\t */\n\tprocessSignal(message: any, local: boolean): void;\n\n\t/**\n\t * Generates a summary for the channel.\n\t * Introduced with summarizerNode - will be required in a future release.\n\t * @param fullTree - true to bypass optimizations and force a full summary tree.\n\t * @param trackState - This tells whether we should track state from this summary.\n\t * @param telemetryContext - summary data passed through the layers for telemetry purposes\n\t */\n\tsummarize(\n\t\tfullTree?: boolean,\n\t\ttrackState?: boolean,\n\t\ttelemetryContext?: ITelemetryContext,\n\t): Promise<ISummaryTreeWithStats>;\n\n\t/**\n\t * Returns the data used for garbage collection. This includes a list of GC nodes that represent this context\n\t * including any of its children. Each node has a list of outbound routes to other GC nodes in the document.\n\t * @param fullGC - true to bypass optimizations and force full generation of GC data.\n\t */\n\tgetGCData(fullGC?: boolean): Promise<IGarbageCollectionData>;\n\n\t/**\n\t * After GC has run, called to notify this channel of routes that are used in it.\n\t * @param usedRoutes - The routes that are used in this channel.\n\t */\n\tupdateUsedRoutes(usedRoutes: string[]): void;\n\n\t/**\n\t * Notifies this object about changes in the connection state.\n\t * @param value - New connection state.\n\t * @param clientId - ID of the client. It's old ID when in disconnected state and\n\t * it's new client ID when we are connecting or connected.\n\t */\n\tsetConnectionState(connected: boolean, clientId?: string);\n\n\t/**\n\t * Ask the DDS to resubmit a message. This could be because we reconnected and this message was not acked.\n\t * @param type - The type of the original message.\n\t * @param content - The content of the original message.\n\t * @param localOpMetadata - The local metadata associated with the original message.\n\t */\n\treSubmit(type: string, content: any, localOpMetadata: unknown);\n\n\tapplyStashedOp(content: any): Promise<unknown>;\n\n\t/**\n\t * Revert a local message.\n\t * @param type - The type of the original message.\n\t * @param content - The content of the original message.\n\t * @param localOpMetadata - The local metadata associated with the original message.\n\t */\n\trollback?(type: string, content: any, localOpMetadata: unknown): void;\n\n\t/**\n\t * Exposes a handle to the root object / entryPoint of the component. Use this as the primary way of interacting\n\t * with the component.\n\t */\n\treadonly entryPoint: IFluidHandle<FluidObject>;\n\n\trequest(request: IRequest): Promise<IResponse>;\n\n\t/**\n\t * @deprecated - Will be removed in future major release. Migrate all usage of IFluidRouter to the \"entryPoint\" pattern. Refer to Removing-IFluidRouter.md\n\t */\n\t// eslint-disable-next-line import/no-deprecated\n\treadonly IFluidRouter: IFluidRouter;\n}\n\nexport type CreateChildSummarizerNodeFn = (\n\tsummarizeInternal: SummarizeInternalFn,\n\tgetGCDataFn: (fullGC?: boolean) => Promise<IGarbageCollectionData>,\n\t/**\n\t * @deprecated - The functionality to get base GC details has been moved to summarizer node.\n\t */\n\tgetBaseGCDetailsFn?: () => Promise<IGarbageCollectionDetailsBase>,\n) => ISummarizerNodeWithGC;\n\nexport interface IFluidDataStoreContextEvents extends IEvent {\n\t(event: \"attaching\" | \"attached\", listener: () => void);\n}\n\n/**\n * Represents the context for the data store. It is used by the data store runtime to\n * get information and call functionality to the container.\n */\nexport interface IFluidDataStoreContext\n\textends IEventProvider<IFluidDataStoreContextEvents>,\n\t\tPartial<IProvideFluidDataStoreRegistry>,\n\t\tIProvideFluidHandleContext {\n\treadonly id: string;\n\t/**\n\t * A data store created by a client, is a local data store for that client. Also, when a detached container loads\n\t * from a snapshot, all the data stores are treated as local data stores because at that stage the container\n\t * still doesn't exists in storage and so the data store couldn't have been created by any other client.\n\t * Value of this never changes even after the data store is attached.\n\t * As implementer of data store runtime, you can use this property to check that this data store belongs to this\n\t * client and hence implement any scenario based on that.\n\t */\n\treadonly isLocalDataStore: boolean;\n\t/**\n\t * The package path of the data store as per the package factory.\n\t */\n\treadonly packagePath: readonly string[];\n\treadonly options: ILoaderOptions;\n\treadonly clientId: string | undefined;\n\treadonly connected: boolean;\n\treadonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;\n\treadonly storage: IDocumentStorageService;\n\treadonly baseSnapshot: ISnapshotTree | undefined;\n\treadonly logger: ITelemetryBaseLogger;\n\treadonly clientDetails: IClientDetails;\n\treadonly idCompressor?: IIdCompressor;\n\t/**\n\t * Indicates the attachment state of the data store to a host service.\n\t */\n\treadonly attachState: AttachState;\n\n\treadonly containerRuntime: IContainerRuntimeBase;\n\n\t/**\n\t * @deprecated 0.16 Issue #1635, #3631\n\t */\n\treadonly createProps?: any;\n\n\t/**\n\t * Ambient services provided with the context\n\t */\n\treadonly scope: FluidObject;\n\n\t/**\n\t * Returns the current quorum.\n\t */\n\tgetQuorum(): IQuorumClients;\n\n\t/**\n\t * Returns the current audience.\n\t */\n\tgetAudience(): IAudience;\n\n\t/**\n\t * Invokes the given callback and expects that no ops are submitted\n\t * until execution finishes. If an op is submitted, an error will be raised.\n\t *\n\t * Can be disabled by feature gate `Fluid.ContainerRuntime.DisableOpReentryCheck`\n\t *\n\t * @param callback - the callback to be invoked\n\t */\n\tensureNoDataModelChanges<T>(callback: () => T): T;\n\n\t/**\n\t * Submits the message to be sent to other clients.\n\t * @param type - Type of the message.\n\t * @param content - Content of the message.\n\t * @param localOpMetadata - The local metadata associated with the message. This is kept locally and not sent to\n\t * the server. This will be sent back when this message is received back from the server. This is also sent if\n\t * we are asked to resubmit the message.\n\t */\n\tsubmitMessage(type: string, content: any, localOpMetadata: unknown): void;\n\n\t/**\n\t * Submits the signal to be sent to other clients.\n\t * @param type - Type of the signal.\n\t * @param content - Content of the signal.\n\t */\n\tsubmitSignal(type: string, content: any): void;\n\n\t/**\n\t * Called to make the data store locally visible in the container. This happens automatically for root data stores\n\t * when they are marked as root. For non-root data stores, this happens when their handle is added to a visible DDS.\n\t */\n\tmakeLocallyVisible(): void;\n\n\t/**\n\t * Call by IFluidDataStoreChannel, indicates that a channel is dirty and needs to be part of the summary.\n\t * @param address - The address of the channel that is dirty.\n\t */\n\tsetChannelDirty(address: string): void;\n\n\t/**\n\t * Get an absolute url to the container based on the provided relativeUrl.\n\t * Returns undefined if the container or data store isn't attached to storage.\n\t * @param relativeUrl - A relative request within the container\n\t */\n\tgetAbsoluteUrl(relativeUrl: string): Promise<string | undefined>;\n\n\tgetCreateChildSummarizerNodeFn(\n\t\t/**\n\t\t * Initial id or path part of this node\n\t\t */\n\t\tid: string,\n\t\t/**\n\t\t * Information needed to create the node.\n\t\t * If it is from a base summary, it will assert that a summary has been seen.\n\t\t * Attach information if it is created from an attach op.\n\t\t * If it is local, it will throw unsupported errors on calls to summarize.\n\t\t */\n\t\tcreateParam: CreateChildSummarizerNodeParam,\n\t): CreateChildSummarizerNodeFn;\n\n\tuploadBlob(blob: ArrayBufferLike, signal?: AbortSignal): Promise<IFluidHandle<ArrayBufferLike>>;\n\n\t/**\n\t * @deprecated - The functionality to get base GC details has been moved to summarizer node.\n\t *\n\t * Returns the GC details in the initial summary of this data store. This is used to initialize the data store\n\t * and its children with the GC details from the previous summary.\n\t */\n\tgetBaseGCDetails(): Promise<IGarbageCollectionDetailsBase>;\n\n\t/**\n\t * Called when a new outbound reference is added to another node. This is used by garbage collection to identify\n\t * all references added in the system.\n\t * @param srcHandle - The handle of the node that added the reference.\n\t * @param outboundHandle - The handle of the outbound node that is referenced.\n\t */\n\taddedGCOutboundReference?(srcHandle: IFluidHandle, outboundHandle: IFluidHandle): void;\n}\n\nexport interface IFluidDataStoreContextDetached extends IFluidDataStoreContext {\n\t/**\n\t * Binds a runtime to the context.\n\t */\n\tattachRuntime(\n\t\tfactory: IProvideFluidDataStoreFactory,\n\t\tdataStoreRuntime: IFluidDataStoreChannel,\n\t): Promise<void>;\n}\n"]}
|
|
@@ -7,16 +7,16 @@ import { IProvideFluidDataStoreFactory } from "./dataStoreFactory";
|
|
|
7
7
|
* A single registry entry that may be used to create data stores
|
|
8
8
|
* It has to have either factory or registry, or both.
|
|
9
9
|
*/
|
|
10
|
-
export
|
|
10
|
+
export type FluidDataStoreRegistryEntry = Readonly<Partial<IProvideFluidDataStoreRegistry & IProvideFluidDataStoreFactory>>;
|
|
11
11
|
/**
|
|
12
12
|
* An associated pair of an identifier and registry entry. Registry entries
|
|
13
13
|
* may be dynamically loaded.
|
|
14
14
|
*/
|
|
15
|
-
export
|
|
15
|
+
export type NamedFluidDataStoreRegistryEntry = [string, Promise<FluidDataStoreRegistryEntry>];
|
|
16
16
|
/**
|
|
17
17
|
* An iterable identifier/registry entry pair list
|
|
18
18
|
*/
|
|
19
|
-
export
|
|
19
|
+
export type NamedFluidDataStoreRegistryEntries = Iterable<NamedFluidDataStoreRegistryEntry>;
|
|
20
20
|
export declare const IFluidDataStoreRegistry: keyof IProvideFluidDataStoreRegistry;
|
|
21
21
|
export interface IProvideFluidDataStoreRegistry {
|
|
22
22
|
readonly IFluidDataStoreRegistry: IFluidDataStoreRegistry;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataStoreRegistry.d.ts","sourceRoot":"","sources":["../src/dataStoreRegistry.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AAEnE;;;GAGG;AACH,
|
|
1
|
+
{"version":3,"file":"dataStoreRegistry.d.ts","sourceRoot":"","sources":["../src/dataStoreRegistry.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AAEnE;;;GAGG;AACH,MAAM,MAAM,2BAA2B,GAAG,QAAQ,CACjD,OAAO,CAAC,8BAA8B,GAAG,6BAA6B,CAAC,CACvE,CAAC;AACF;;;GAGG;AACH,MAAM,MAAM,gCAAgC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,2BAA2B,CAAC,CAAC,CAAC;AAC9F;;GAEG;AACH,MAAM,MAAM,kCAAkC,GAAG,QAAQ,CAAC,gCAAgC,CAAC,CAAC;AAE5F,eAAO,MAAM,uBAAuB,EAAE,MAAM,8BAClB,CAAC;AAE3B,MAAM,WAAW,8BAA8B;IAC9C,QAAQ,CAAC,uBAAuB,EAAE,uBAAuB,CAAC;CAC1D;AAED;;;GAGG;AACH,MAAM,WAAW,uBAAwB,SAAQ,8BAA8B;IAC9E,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,2BAA2B,GAAG,SAAS,CAAC,CAAC;CACpE"}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* Consumer-facing APIs and data structures should use session-space IDs as their lifetime and equality is stable and tied to
|
|
8
8
|
* the scope of the session (i.e. compressor) that produced them.
|
|
9
9
|
*/
|
|
10
|
-
export
|
|
10
|
+
export type SessionSpaceCompressedId = number & {
|
|
11
11
|
readonly SessionUnique: "cea55054-6b82-4cbf-ad19-1fa645ea3b3e";
|
|
12
12
|
};
|
|
13
13
|
/**
|
|
@@ -15,7 +15,7 @@ export declare type SessionSpaceCompressedId = number & {
|
|
|
15
15
|
* Serialized/persisted structures (e.g. ops) should use op-space IDs as a performance optimization, as they require less normalizing when
|
|
16
16
|
* received by a remote client due to the fact that op space for a given compressor is session space for all other compressors.
|
|
17
17
|
*/
|
|
18
|
-
export
|
|
18
|
+
export type OpSpaceCompressedId = number & {
|
|
19
19
|
readonly OpNormalized: "9209432d-a959-4df7-b2ad-767ead4dbcae";
|
|
20
20
|
};
|
|
21
21
|
/**
|
|
@@ -24,13 +24,13 @@ export declare type OpSpaceCompressedId = number & {
|
|
|
24
24
|
* with a string of the form xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx,
|
|
25
25
|
* where x is a lowercase hex digit.
|
|
26
26
|
*/
|
|
27
|
-
export
|
|
27
|
+
export type StableId = string & {
|
|
28
28
|
readonly StableId: "53172b0d-a3d5-41ea-bd75-b43839c97f5a";
|
|
29
29
|
};
|
|
30
30
|
/**
|
|
31
31
|
* A StableId which is suitable for use as a session identifier
|
|
32
32
|
*/
|
|
33
|
-
export
|
|
33
|
+
export type SessionId = StableId & {
|
|
34
34
|
readonly SessionId: "4498f850-e14e-4be9-8db0-89ec00997e58";
|
|
35
35
|
};
|
|
36
36
|
//# sourceMappingURL=identifiers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identifiers.d.ts","sourceRoot":"","sources":["../../src/id-compressor/identifiers.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AACH,
|
|
1
|
+
{"version":3,"file":"identifiers.d.ts","sourceRoot":"","sources":["../../src/id-compressor/identifiers.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AACH,MAAM,MAAM,wBAAwB,GAAG,MAAM,GAAG;IAC/C,QAAQ,CAAC,aAAa,EAAE,sCAAsC,CAAC;CAC/D,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG;IAC1C,QAAQ,CAAC,YAAY,EAAE,sCAAsC,CAAC;CAC9D,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG;IAAE,QAAQ,CAAC,QAAQ,EAAE,sCAAsC,CAAA;CAAE,CAAC;AAE9F;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG;IAAE,QAAQ,CAAC,SAAS,EAAE,sCAAsC,CAAA;CAAE,CAAC"}
|
|
@@ -6,19 +6,19 @@ import type { SessionId } from "../identifiers";
|
|
|
6
6
|
/**
|
|
7
7
|
* The serialized contents of an IdCompressor, suitable for persistence in a summary.
|
|
8
8
|
*/
|
|
9
|
-
export
|
|
9
|
+
export type SerializedIdCompressor = string & {
|
|
10
10
|
readonly _serializedIdCompressor: "8c73c57c-1cf4-4278-8915-6444cb4f6af5";
|
|
11
11
|
};
|
|
12
12
|
/**
|
|
13
13
|
* The serialized contents of an IdCompressor, suitable for persistence in a summary.
|
|
14
14
|
*/
|
|
15
|
-
export
|
|
15
|
+
export type SerializedIdCompressorWithNoSession = SerializedIdCompressor & {
|
|
16
16
|
readonly _noLocalState: "3aa2e1e8-cc28-4ea7-bc1a-a11dc3f26dfb";
|
|
17
17
|
};
|
|
18
18
|
/**
|
|
19
19
|
* The serialized contents of an IdCompressor, suitable for persistence in a summary.
|
|
20
20
|
*/
|
|
21
|
-
export
|
|
21
|
+
export type SerializedIdCompressorWithOngoingSession = SerializedIdCompressor & {
|
|
22
22
|
readonly _hasLocalState: "1281acae-6d14-47e7-bc92-71c8ee0819cb";
|
|
23
23
|
};
|
|
24
24
|
/**
|
|
@@ -38,7 +38,7 @@ export interface IdCreationRange {
|
|
|
38
38
|
* This value must *NOT* change without careful consideration to compatibility.
|
|
39
39
|
*/
|
|
40
40
|
export declare const initialClusterCapacity = 512;
|
|
41
|
-
export
|
|
41
|
+
export type IdCreationRangeWithStashedState = IdCreationRange & {
|
|
42
42
|
stashedState: SerializedIdCompressorWithOngoingSession;
|
|
43
43
|
};
|
|
44
44
|
//# sourceMappingURL=0.0.1.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"0.0.1.d.ts","sourceRoot":"","sources":["../../../src/id-compressor/persisted-types/0.0.1.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"0.0.1.d.ts","sourceRoot":"","sources":["../../../src/id-compressor/persisted-types/0.0.1.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,MAAM,GAAG;IAC7C,QAAQ,CAAC,uBAAuB,EAAE,sCAAsC,CAAC;CACzE,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,mCAAmC,GAAG,sBAAsB,GAAG;IAC1E,QAAQ,CAAC,aAAa,EAAE,sCAAsC,CAAC;CAC/D,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,wCAAwC,GAAG,sBAAsB,GAAG;IAC/E,QAAQ,CAAC,cAAc,EAAE,sCAAsC,CAAC;CAChE,CAAC;AAEF;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC/B,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,GAAG,CAAC,EAAE;QACd,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;QAC/B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;KACvB,CAAC;CACF;AAED;;;GAGG;AACH,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAE1C,MAAM,MAAM,+BAA+B,GAAG,eAAe,GAAG;IAC/D,YAAY,EAAE,wCAAwC,CAAC;CACvD,CAAC"}
|
package/dist/protocol.d.ts
CHANGED
|
@@ -63,7 +63,7 @@ export interface IAttachMessage {
|
|
|
63
63
|
* Older versions of attach messages could have null snapshots,
|
|
64
64
|
* so this gives correct typings for writing backward compatible code.
|
|
65
65
|
*/
|
|
66
|
-
export
|
|
66
|
+
export type InboundAttachMessage = Omit<IAttachMessage, "snapshot"> & {
|
|
67
67
|
snapshot: IAttachMessage["snapshot"] | null;
|
|
68
68
|
};
|
|
69
69
|
//# sourceMappingURL=protocol.d.ts.map
|
package/dist/protocol.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAE7E;;GAEG;AACH,MAAM,WAAW,SAAS;IACzB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,QAAQ,EAAE,GAAG,CAAC;CACd;AAED,MAAM,WAAW,eAAe;IAC/B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,0BAA0B,EAAE,MAAM,CAAC;IAEnC;;OAEG;IACH,QAAQ,EAAE;QACT,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,GAAG,CAAC;KACb,CAAC;CACF;AAED;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,cAAc;IAC5D,IAAI,EAAE,MAAM,CAAC;CACb;AAED;;;GAGG;AACH,MAAM,W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