@fluidframework/runtime-definitions 2.0.0-internal.8.0.1 → 2.0.0-rc.1.0.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 +44 -0
- package/README.md +0 -6
- package/api-extractor-lint.json +1 -10
- package/api-extractor.json +1 -9
- package/api-report/runtime-definitions.api.md +10 -9
- package/dist/dataStoreContext.d.ts +3 -0
- package/dist/dataStoreContext.d.ts.map +1 -1
- package/dist/dataStoreContext.js.map +1 -1
- package/dist/garbageCollection.d.ts +1 -1
- package/dist/garbageCollection.js.map +1 -1
- package/dist/protocol.d.ts +4 -4
- package/dist/protocol.js.map +1 -1
- package/dist/runtime-definitions-alpha.d.ts +52 -9
- package/dist/runtime-definitions-beta.d.ts +116 -44
- package/dist/runtime-definitions-public.d.ts +116 -44
- package/dist/runtime-definitions-untrimmed.d.ts +12 -9
- package/dist/summary.d.ts +4 -4
- package/dist/summary.js.map +1 -1
- package/package.json +37 -44
- package/src/dataStoreContext.ts +3 -0
- package/src/garbageCollection.ts +1 -1
- package/src/protocol.ts +4 -4
- package/src/summary.ts +4 -4
- package/tsconfig.json +5 -3
- package/lib/runtime-definitions-alpha.d.ts +0 -953
- package/lib/runtime-definitions-beta.d.ts +0 -192
- package/lib/runtime-definitions-public.d.ts +0 -192
- package/lib/runtime-definitions-untrimmed.d.ts +0 -1068
- /package/{.eslintrc.js → .eslintrc.cjs} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,49 @@
|
|
|
1
1
|
# @fluidframework/runtime-definitions
|
|
2
2
|
|
|
3
|
+
## 2.0.0-rc.1.0.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Updated server dependencies ([#19122](https://github.com/microsoft/FluidFramework/issues/19122)) [25366b4229](https://github.com/microsoft/FluidFramework/commits/25366b422918cb43685c5f328b50450749592902)
|
|
8
|
+
|
|
9
|
+
The following Fluid server dependencies have been updated to the latest version, 3.0.0. [See the full changelog.](https://github.com/microsoft/FluidFramework/releases/tag/server_v3.0.0)
|
|
10
|
+
|
|
11
|
+
- @fluidframework/gitresources
|
|
12
|
+
- @fluidframework/server-kafka-orderer
|
|
13
|
+
- @fluidframework/server-lambdas
|
|
14
|
+
- @fluidframework/server-lambdas-driver
|
|
15
|
+
- @fluidframework/server-local-server
|
|
16
|
+
- @fluidframework/server-memory-orderer
|
|
17
|
+
- @fluidframework/protocol-base
|
|
18
|
+
- @fluidframework/server-routerlicious
|
|
19
|
+
- @fluidframework/server-routerlicious-base
|
|
20
|
+
- @fluidframework/server-services
|
|
21
|
+
- @fluidframework/server-services-client
|
|
22
|
+
- @fluidframework/server-services-core
|
|
23
|
+
- @fluidframework/server-services-ordering-kafkanode
|
|
24
|
+
- @fluidframework/server-services-ordering-rdkafka
|
|
25
|
+
- @fluidframework/server-services-ordering-zookeeper
|
|
26
|
+
- @fluidframework/server-services-shared
|
|
27
|
+
- @fluidframework/server-services-telemetry
|
|
28
|
+
- @fluidframework/server-services-utils
|
|
29
|
+
- @fluidframework/server-test-utils
|
|
30
|
+
- tinylicious
|
|
31
|
+
|
|
32
|
+
- Updated @fluidframework/protocol-definitions ([#19122](https://github.com/microsoft/FluidFramework/issues/19122)) [25366b4229](https://github.com/microsoft/FluidFramework/commits/25366b422918cb43685c5f328b50450749592902)
|
|
33
|
+
|
|
34
|
+
The @fluidframework/protocol-definitions dependency has been upgraded to v3.1.0. [See the full
|
|
35
|
+
changelog.](https://github.com/microsoft/FluidFramework/blob/main/common/lib/protocol-definitions/CHANGELOG.md#310)
|
|
36
|
+
|
|
37
|
+
- garbage collection: Deprecate addedGCOutboundReference ([#18456](https://github.com/microsoft/FluidFramework/issues/18456)) [0619cf8a41](https://github.com/microsoft/FluidFramework/commits/0619cf8a4197bee6d5ac56cac05db92008939817)
|
|
38
|
+
|
|
39
|
+
The `addedGCOutboundReference` property on IDeltaConnection, IFluidDataStoreContext, and MockFluidDataStoreRuntime is
|
|
40
|
+
now deprecated.
|
|
41
|
+
|
|
42
|
+
The responsibility of adding outbound references (for Garbage Collection tracking) is moving up to the ContainerRuntime.
|
|
43
|
+
Previously, DDSes themselves were responsible to detect and report added outbound references (via a handle being stored),
|
|
44
|
+
so these interfaces (and corresponding mock) needed to plumb that information up to the ContainerRuntime layer where GC sits.
|
|
45
|
+
This is no longer necessary so they're being removed in an upcoming release.
|
|
46
|
+
|
|
3
47
|
## 2.0.0-internal.8.0.0
|
|
4
48
|
|
|
5
49
|
### Major Changes
|
package/README.md
CHANGED
|
@@ -13,12 +13,6 @@ When taking a dependency on a Fluid Framework library, we recommend using a `^`
|
|
|
13
13
|
While Fluid Framework libraries may use different ranges with interdependencies between other Fluid Framework libraries,
|
|
14
14
|
library consumers should always prefer `^`.
|
|
15
15
|
|
|
16
|
-
Note that when depending on a library version of the form `2.0.0-internal.x.y.z`, called the Fluid internal version scheme,
|
|
17
|
-
you must use a `>= <` dependency range (such as `>=2.0.0-internal.x.y.z <2.0.0-internal.w.0.0` where `w` is `x+1`).
|
|
18
|
-
Standard `^` and `~` ranges will not work as expected.
|
|
19
|
-
See the [@fluid-tools/version-tools](https://github.com/microsoft/FluidFramework/blob/main/build-tools/packages/version-tools/README.md)
|
|
20
|
-
package for more information including tools to convert between version schemes.
|
|
21
|
-
|
|
22
16
|
<!-- prettier-ignore-end -->
|
|
23
17
|
|
|
24
18
|
<!-- AUTO-GENERATED-CONTENT:END -->
|
package/api-extractor-lint.json
CHANGED
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
|
3
|
-
"extends": "../../../common/build/build-common/api-extractor-lint.json"
|
|
4
|
-
"messages": {
|
|
5
|
-
"extractorMessageReporting": {
|
|
6
|
-
// TODO: remove once base config has this enabled as an error
|
|
7
|
-
"ae-incompatible-release-tags": {
|
|
8
|
-
"logLevel": "error",
|
|
9
|
-
"addToApiReportFile": false
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
}
|
|
3
|
+
"extends": "../../../common/build/build-common/api-extractor-lint.json"
|
|
13
4
|
}
|
package/api-extractor.json
CHANGED
|
@@ -1,12 +1,4 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
|
3
|
-
"extends": "../../../common/build/build-common/api-extractor-base.json"
|
|
4
|
-
"messages": {
|
|
5
|
-
"extractorMessageReporting": {
|
|
6
|
-
// TODO: Add missing documentation and remove this rule override
|
|
7
|
-
"ae-undocumented": {
|
|
8
|
-
"logLevel": "none"
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
}
|
|
3
|
+
"extends": "../../../common/build/build-common/api-extractor-base.json"
|
|
12
4
|
}
|
|
@@ -117,7 +117,7 @@ export const gcTombstoneBlobKey = "__tombstones";
|
|
|
117
117
|
// @internal
|
|
118
118
|
export const gcTreeKey = "gc";
|
|
119
119
|
|
|
120
|
-
// @
|
|
120
|
+
// @alpha
|
|
121
121
|
export interface IAttachMessage {
|
|
122
122
|
id: string;
|
|
123
123
|
snapshot: ITree;
|
|
@@ -165,13 +165,13 @@ export { IdCompressor }
|
|
|
165
165
|
|
|
166
166
|
export { IdCreationRange }
|
|
167
167
|
|
|
168
|
-
// @
|
|
168
|
+
// @alpha
|
|
169
169
|
export interface IEnvelope {
|
|
170
170
|
address: string;
|
|
171
171
|
contents: any;
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
-
// @
|
|
174
|
+
// @public
|
|
175
175
|
export interface IExperimentalIncrementalSummaryContext {
|
|
176
176
|
latestSummarySequenceNumber: number;
|
|
177
177
|
summaryPath: string;
|
|
@@ -206,6 +206,7 @@ export interface IFluidDataStoreChannel extends IDisposable {
|
|
|
206
206
|
|
|
207
207
|
// @alpha
|
|
208
208
|
export interface IFluidDataStoreContext extends IEventProvider<IFluidDataStoreContextEvents>, Partial<IProvideFluidDataStoreRegistry>, IProvideFluidHandleContext {
|
|
209
|
+
// @deprecated (undocumented)
|
|
209
210
|
addedGCOutboundReference?(srcHandle: IFluidHandle, outboundHandle: IFluidHandle): void;
|
|
210
211
|
readonly attachState: AttachState;
|
|
211
212
|
// (undocumented)
|
|
@@ -282,7 +283,7 @@ export interface IFluidDataStoreRegistry extends IProvideFluidDataStoreRegistry
|
|
|
282
283
|
get(name: string): Promise<FluidDataStoreRegistryEntry | undefined>;
|
|
283
284
|
}
|
|
284
285
|
|
|
285
|
-
// @
|
|
286
|
+
// @public
|
|
286
287
|
export interface IGarbageCollectionData {
|
|
287
288
|
gcNodes: {
|
|
288
289
|
[id: string]: string[];
|
|
@@ -299,13 +300,13 @@ export { IIdCompressor }
|
|
|
299
300
|
|
|
300
301
|
export { IIdCompressorCore }
|
|
301
302
|
|
|
302
|
-
// @
|
|
303
|
+
// @public
|
|
303
304
|
export interface IInboundSignalMessage extends ISignalMessage {
|
|
304
305
|
// (undocumented)
|
|
305
306
|
type: string;
|
|
306
307
|
}
|
|
307
308
|
|
|
308
|
-
// @
|
|
309
|
+
// @alpha
|
|
309
310
|
export type InboundAttachMessage = Omit<IAttachMessage, "snapshot"> & {
|
|
310
311
|
snapshot: IAttachMessage["snapshot"] | null;
|
|
311
312
|
};
|
|
@@ -393,7 +394,7 @@ export interface ISummarizerNodeWithGC extends ISummarizerNode {
|
|
|
393
394
|
updateUsedRoutes(usedRoutes: string[]): void;
|
|
394
395
|
}
|
|
395
396
|
|
|
396
|
-
// @
|
|
397
|
+
// @public
|
|
397
398
|
export interface ISummaryStats {
|
|
398
399
|
// (undocumented)
|
|
399
400
|
blobNodeCount: number;
|
|
@@ -407,13 +408,13 @@ export interface ISummaryStats {
|
|
|
407
408
|
unreferencedBlobSize: number;
|
|
408
409
|
}
|
|
409
410
|
|
|
410
|
-
// @
|
|
411
|
+
// @public
|
|
411
412
|
export interface ISummaryTreeWithStats {
|
|
412
413
|
stats: ISummaryStats;
|
|
413
414
|
summary: ISummaryTree;
|
|
414
415
|
}
|
|
415
416
|
|
|
416
|
-
// @
|
|
417
|
+
// @public
|
|
417
418
|
export interface ITelemetryContext {
|
|
418
419
|
get(prefix: string, property: string): TelemetryEventPropertyType;
|
|
419
420
|
serialize(): string;
|
|
@@ -383,6 +383,9 @@ export interface IFluidDataStoreContext extends IEventProvider<IFluidDataStoreCo
|
|
|
383
383
|
*/
|
|
384
384
|
getBaseGCDetails(): Promise<IGarbageCollectionDetailsBase>;
|
|
385
385
|
/**
|
|
386
|
+
* @deprecated There is no replacement for this, its functionality is no longer needed at this layer.
|
|
387
|
+
* It will be removed in a future release, sometime after 2.0.0-internal.8.0.0
|
|
388
|
+
*
|
|
386
389
|
* Called when a new outbound reference is added to another node. This is used by garbage collection to identify
|
|
387
390
|
* all references added in the system.
|
|
388
391
|
* @param srcHandle - The handle of the node that added the reference.
|
|
@@ -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,EACX,0BAA0B,EAC1B,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,WAAW,EACX,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACN,SAAS,EACT,aAAa,EACb,WAAW,EACX,cAAc,EACd,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,EACN,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,yBAAyB,EACzB,aAAa,EACb,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAE,8BAA8B,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,EAAE,sBAAsB,E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AKG;IACH,gBAAgB,IAAI,OAAO,CAAC,6BAA6B,CAAC,CAAC;IAE3D
|
|
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,EACX,0BAA0B,EAC1B,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,WAAW,EACX,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACN,SAAS,EACT,aAAa,EACb,WAAW,EACX,cAAc,EACd,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,EACN,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,yBAAyB,EACzB,aAAa,EACb,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAE,8BAA8B,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,6BAA6B,EAAE,MAAM,qBAAqB,CAAC;AAC5F,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,EACN,8BAA8B,EAC9B,qBAAqB,EACrB,qBAAqB,EACrB,iBAAiB,EACjB,mBAAmB,EACnB,MAAM,WAAW,CAAC;AAEnB;;;GAGG;AACH,oBAAY,SAAS;IACpB;;OAEG;IACH,SAAS,IAAA;IAET;;;OAGG;IACH,SAAS,IAAA;CACT;AAED;;GAEG;AACH,oBAAY,qBAAqB;IAChC;;;;;;;;OAQG;IACH,KAAK,IAAI;CACT;AAED;;;;GAIG;AACH,eAAO,MAAM,eAAe;IAC3B;;OAEG;;IAGH;;;;OAIG;;IAGH;;;;;;;;OAQG;;CAEH,CAAC;AACF;;GAEG;AACH,MAAM,M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;AAXD,WAAY,SAAS;IACpB;;OAEG;IACH,mDAAS,CAAA;IAET;;;OAGG;IACH,mDAAS,CAAA;AACV,CAAC,EAXW,SAAS,yBAAT,SAAS,QAWpB;AAED;;GAEG;AACH,IAAY,qBAWX;AAXD,WAAY,qBAAqB;IAChC;;;;;;;;OAQG;IACH,mEAAS,CAAA;AACV,CAAC,EAXW,qBAAqB,qCAArB,qBAAqB,QAWhC;AAED;;;;GAIG;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\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 { IIdCompressor } from \"@fluidframework/id-compressor\";\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\";\n\n/**\n * Runtime flush mode handling\n * @alpha\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\n/**\n * @internal\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 * @alpha\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};\n/**\n * @alpha\n */\nexport type VisibilityState = (typeof VisibilityState)[keyof typeof VisibilityState];\n\n/**\n * @alpha\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 * @alpha\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 * @alpha\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\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 * @alpha\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 * 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 */\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 * @alpha\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\n/**\n * @alpha\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\n/**\n * @alpha\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 * @alpha\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 * @param targetClientId - When specified, the signal is only sent to the provided client id.\n\t */\n\tsubmitSignal(type: string, content: any, targetClientId?: string): 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\n/**\n * @alpha\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;;;AAwCH;;;GAGG;AACH,IAAY,SAWX;AAXD,WAAY,SAAS;IACpB;;OAEG;IACH,mDAAS,CAAA;IAET;;;OAGG;IACH,mDAAS,CAAA;AACV,CAAC,EAXW,SAAS,yBAAT,SAAS,QAWpB;AAED;;GAEG;AACH,IAAY,qBAWX;AAXD,WAAY,qBAAqB;IAChC;;;;;;;;OAQG;IACH,mEAAS,CAAA;AACV,CAAC,EAXW,qBAAqB,qCAArB,qBAAqB,QAWhC;AAED;;;;GAIG;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\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 { IIdCompressor } from \"@fluidframework/id-compressor\";\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\";\n\n/**\n * Runtime flush mode handling\n * @alpha\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\n/**\n * @internal\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 * @alpha\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};\n/**\n * @alpha\n */\nexport type VisibilityState = (typeof VisibilityState)[keyof typeof VisibilityState];\n\n/**\n * @alpha\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 * @alpha\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 * @alpha\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\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 * @alpha\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 * 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 */\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 * @alpha\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\n/**\n * @alpha\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\n/**\n * @alpha\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 * @alpha\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 * @param targetClientId - When specified, the signal is only sent to the provided client id.\n\t */\n\tsubmitSignal(type: string, content: any, targetClientId?: string): 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 * @deprecated There is no replacement for this, its functionality is no longer needed at this layer.\n\t * It will be removed in a future release, sometime after 2.0.0-internal.8.0.0\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\n/**\n * @alpha\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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"garbageCollection.js","sourceRoot":"","sources":["../src/garbageCollection.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;;;GAIG;AACU,QAAA,SAAS,GAAG,IAAI,CAAC;AAC9B;;;;GAIG;AACU,QAAA,YAAY,GAAG,MAAM,CAAC;AACnC;;;;GAIG;AACU,QAAA,kBAAkB,GAAG,cAAc,CAAC;AACjD;;;;GAIG;AACU,QAAA,gBAAgB,GAAG,gBAAgB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * The key for the GC tree in summary.\n *\n * @internal\n */\nexport const gcTreeKey = \"gc\";\n/**\n * They prefix for GC blobs in the GC tree in summary.\n *\n * @internal\n */\nexport const gcBlobPrefix = \"__gc\";\n/**\n * The key for tombstone blob in the GC tree in summary.\n *\n * @internal\n */\nexport const gcTombstoneBlobKey = \"__tombstones\";\n/**\n * The key for deleted nodes blob in the GC tree in summary.\n *\n * @internal\n */\nexport const gcDeletedBlobKey = \"__deletedNodes\";\n\n/**\n * Garbage collection data returned by nodes in a Container.\n * Used for running GC in the Container.\n * @
|
|
1
|
+
{"version":3,"file":"garbageCollection.js","sourceRoot":"","sources":["../src/garbageCollection.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;;;GAIG;AACU,QAAA,SAAS,GAAG,IAAI,CAAC;AAC9B;;;;GAIG;AACU,QAAA,YAAY,GAAG,MAAM,CAAC;AACnC;;;;GAIG;AACU,QAAA,kBAAkB,GAAG,cAAc,CAAC;AACjD;;;;GAIG;AACU,QAAA,gBAAgB,GAAG,gBAAgB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * The key for the GC tree in summary.\n *\n * @internal\n */\nexport const gcTreeKey = \"gc\";\n/**\n * They prefix for GC blobs in the GC tree in summary.\n *\n * @internal\n */\nexport const gcBlobPrefix = \"__gc\";\n/**\n * The key for tombstone blob in the GC tree in summary.\n *\n * @internal\n */\nexport const gcTombstoneBlobKey = \"__tombstones\";\n/**\n * The key for deleted nodes blob in the GC tree in summary.\n *\n * @internal\n */\nexport const gcDeletedBlobKey = \"__deletedNodes\";\n\n/**\n * Garbage collection data returned by nodes in a Container.\n * Used for running GC in the Container.\n * @public\n */\nexport interface IGarbageCollectionData {\n\t/**\n\t * The GC nodes of a Fluid object in the Container. Each node has an id and a set of routes to other GC nodes.\n\t */\n\tgcNodes: { [id: string]: string[] };\n}\n\n/**\n * GC details provided to each node during creation.\n * @alpha\n */\nexport interface IGarbageCollectionDetailsBase {\n\t/**\n\t * A list of routes to Fluid objects that are used in this node.\n\t */\n\tusedRoutes?: string[];\n\t/**\n\t * The GC data of this node.\n\t */\n\tgcData?: IGarbageCollectionData;\n}\n"]}
|
package/dist/protocol.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { ISignalMessage, ITree } from "@fluidframework/protocol-definitions";
|
|
6
6
|
/**
|
|
7
7
|
* An envelope wraps the contents with the intended target
|
|
8
|
-
* @
|
|
8
|
+
* @alpha
|
|
9
9
|
*/
|
|
10
10
|
export interface IEnvelope {
|
|
11
11
|
/**
|
|
@@ -39,7 +39,7 @@ export interface ISignalEnvelope {
|
|
|
39
39
|
}
|
|
40
40
|
/**
|
|
41
41
|
* Represents ISignalMessage with its type.
|
|
42
|
-
* @
|
|
42
|
+
* @public
|
|
43
43
|
*/
|
|
44
44
|
export interface IInboundSignalMessage extends ISignalMessage {
|
|
45
45
|
type: string;
|
|
@@ -47,7 +47,7 @@ export interface IInboundSignalMessage extends ISignalMessage {
|
|
|
47
47
|
/**
|
|
48
48
|
* Message send by client attaching local data structure.
|
|
49
49
|
* Contains snapshot of data structure which is the current state of this data structure.
|
|
50
|
-
* @
|
|
50
|
+
* @alpha
|
|
51
51
|
*/
|
|
52
52
|
export interface IAttachMessage {
|
|
53
53
|
/**
|
|
@@ -68,7 +68,7 @@ export interface IAttachMessage {
|
|
|
68
68
|
* but it should not be used when creating a new attach op.
|
|
69
69
|
* Older versions of attach messages could have null snapshots,
|
|
70
70
|
* so this gives correct typings for writing backward compatible code.
|
|
71
|
-
* @
|
|
71
|
+
* @alpha
|
|
72
72
|
*/
|
|
73
73
|
export type InboundAttachMessage = Omit<IAttachMessage, "snapshot"> & {
|
|
74
74
|
snapshot: IAttachMessage["snapshot"] | null;
|
package/dist/protocol.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocol.js","sourceRoot":"","sources":["../src/protocol.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 { ISignalMessage, ITree } from \"@fluidframework/protocol-definitions\";\n\n/**\n * An envelope wraps the contents with the intended target\n * @
|
|
1
|
+
{"version":3,"file":"protocol.js","sourceRoot":"","sources":["../src/protocol.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 { ISignalMessage, ITree } from \"@fluidframework/protocol-definitions\";\n\n/**\n * An envelope wraps the contents with the intended target\n * @alpha\n */\nexport interface IEnvelope {\n\t/**\n\t * The target for the envelope\n\t */\n\taddress: string;\n\n\t/**\n\t * The contents of the envelope\n\t */\n\tcontents: any;\n}\n\n/**\n * @internal\n */\nexport interface ISignalEnvelope {\n\t/**\n\t * The target for the envelope, undefined for the container\n\t */\n\taddress?: string;\n\n\t/**\n\t * Identifier for the signal being submitted.\n\t */\n\tclientSignalSequenceNumber: number;\n\n\t/**\n\t * The contents of the envelope\n\t */\n\tcontents: {\n\t\ttype: string;\n\t\tcontent: any;\n\t};\n}\n\n/**\n * Represents ISignalMessage with its type.\n * @public\n */\nexport interface IInboundSignalMessage extends ISignalMessage {\n\ttype: string;\n}\n\n/**\n * Message send by client attaching local data structure.\n * Contains snapshot of data structure which is the current state of this data structure.\n * @alpha\n */\nexport interface IAttachMessage {\n\t/**\n\t * The identifier for the object\n\t */\n\tid: string;\n\n\t/**\n\t * The type of object\n\t */\n\ttype: string;\n\n\t/**\n\t * Initial snapshot of the document (contains ownership)\n\t */\n\tsnapshot: ITree;\n}\n\n/**\n * This type should be used when reading an incoming attach op,\n * but it should not be used when creating a new attach op.\n * Older versions of attach messages could have null snapshots,\n * so this gives correct typings for writing backward compatible code.\n * @alpha\n */\nexport type InboundAttachMessage = Omit<IAttachMessage, \"snapshot\"> & {\n\tsnapshot: IAttachMessage[\"snapshot\"] | null;\n};\n"]}
|
|
@@ -145,7 +145,25 @@ export declare enum FlushMode {
|
|
|
145
145
|
|
|
146
146
|
/* Excluded from this release type: gcTreeKey */
|
|
147
147
|
|
|
148
|
-
|
|
148
|
+
/**
|
|
149
|
+
* Message send by client attaching local data structure.
|
|
150
|
+
* Contains snapshot of data structure which is the current state of this data structure.
|
|
151
|
+
* @alpha
|
|
152
|
+
*/
|
|
153
|
+
export declare interface IAttachMessage {
|
|
154
|
+
/**
|
|
155
|
+
* The identifier for the object
|
|
156
|
+
*/
|
|
157
|
+
id: string;
|
|
158
|
+
/**
|
|
159
|
+
* The type of object
|
|
160
|
+
*/
|
|
161
|
+
type: string;
|
|
162
|
+
/**
|
|
163
|
+
* Initial snapshot of the document (contains ownership)
|
|
164
|
+
*/
|
|
165
|
+
snapshot: ITree;
|
|
166
|
+
}
|
|
149
167
|
|
|
150
168
|
/**
|
|
151
169
|
* A reduced set of functionality of IContainerRuntime that a data store context/data store runtime will need
|
|
@@ -243,12 +261,25 @@ export { IdCompressor }
|
|
|
243
261
|
|
|
244
262
|
export { IdCreationRange }
|
|
245
263
|
|
|
246
|
-
|
|
264
|
+
/**
|
|
265
|
+
* An envelope wraps the contents with the intended target
|
|
266
|
+
* @alpha
|
|
267
|
+
*/
|
|
268
|
+
export declare interface IEnvelope {
|
|
269
|
+
/**
|
|
270
|
+
* The target for the envelope
|
|
271
|
+
*/
|
|
272
|
+
address: string;
|
|
273
|
+
/**
|
|
274
|
+
* The contents of the envelope
|
|
275
|
+
*/
|
|
276
|
+
contents: any;
|
|
277
|
+
}
|
|
247
278
|
|
|
248
279
|
/**
|
|
249
280
|
* @experimental - Can be deleted/changed at any time
|
|
250
281
|
* Contains the necessary information to allow DDSes to do incremental summaries
|
|
251
|
-
* @
|
|
282
|
+
* @public
|
|
252
283
|
*/
|
|
253
284
|
export declare interface IExperimentalIncrementalSummaryContext {
|
|
254
285
|
/**
|
|
@@ -469,6 +500,9 @@ export declare interface IFluidDataStoreContext extends IEventProvider<IFluidDat
|
|
|
469
500
|
*/
|
|
470
501
|
getBaseGCDetails(): Promise<IGarbageCollectionDetailsBase>;
|
|
471
502
|
/**
|
|
503
|
+
* @deprecated There is no replacement for this, its functionality is no longer needed at this layer.
|
|
504
|
+
* It will be removed in a future release, sometime after 2.0.0-internal.8.0.0
|
|
505
|
+
*
|
|
472
506
|
* Called when a new outbound reference is added to another node. This is used by garbage collection to identify
|
|
473
507
|
* all references added in the system.
|
|
474
508
|
* @param srcHandle - The handle of the node that added the reference.
|
|
@@ -534,7 +568,7 @@ export declare interface IFluidDataStoreRegistry extends IProvideFluidDataStoreR
|
|
|
534
568
|
/**
|
|
535
569
|
* Garbage collection data returned by nodes in a Container.
|
|
536
570
|
* Used for running GC in the Container.
|
|
537
|
-
* @
|
|
571
|
+
* @public
|
|
538
572
|
*/
|
|
539
573
|
export declare interface IGarbageCollectionData {
|
|
540
574
|
/**
|
|
@@ -566,13 +600,22 @@ export { IIdCompressorCore }
|
|
|
566
600
|
|
|
567
601
|
/**
|
|
568
602
|
* Represents ISignalMessage with its type.
|
|
569
|
-
* @
|
|
603
|
+
* @public
|
|
570
604
|
*/
|
|
571
605
|
export declare interface IInboundSignalMessage extends ISignalMessage {
|
|
572
606
|
type: string;
|
|
573
607
|
}
|
|
574
608
|
|
|
575
|
-
|
|
609
|
+
/**
|
|
610
|
+
* This type should be used when reading an incoming attach op,
|
|
611
|
+
* but it should not be used when creating a new attach op.
|
|
612
|
+
* Older versions of attach messages could have null snapshots,
|
|
613
|
+
* so this gives correct typings for writing backward compatible code.
|
|
614
|
+
* @alpha
|
|
615
|
+
*/
|
|
616
|
+
export declare type InboundAttachMessage = Omit<IAttachMessage, "snapshot"> & {
|
|
617
|
+
snapshot: IAttachMessage["snapshot"] | null;
|
|
618
|
+
};
|
|
576
619
|
|
|
577
620
|
/**
|
|
578
621
|
* @alpha
|
|
@@ -792,7 +835,7 @@ export declare interface ISummarizerNodeWithGC extends ISummarizerNode {
|
|
|
792
835
|
|
|
793
836
|
/**
|
|
794
837
|
* Contains the aggregation data from a Tree/Subtree.
|
|
795
|
-
* @
|
|
838
|
+
* @public
|
|
796
839
|
*/
|
|
797
840
|
export declare interface ISummaryStats {
|
|
798
841
|
treeNodeCount: number;
|
|
@@ -808,7 +851,7 @@ export declare interface ISummaryStats {
|
|
|
808
851
|
* each of its DDS.
|
|
809
852
|
* Any component that implements IChannelContext, IFluidDataStoreChannel or extends SharedObject
|
|
810
853
|
* will be taking part of the summarization process.
|
|
811
|
-
* @
|
|
854
|
+
* @public
|
|
812
855
|
*/
|
|
813
856
|
export declare interface ISummaryTreeWithStats {
|
|
814
857
|
/**
|
|
@@ -825,7 +868,7 @@ export declare interface ISummaryTreeWithStats {
|
|
|
825
868
|
/**
|
|
826
869
|
* Contains telemetry data relevant to summarization workflows.
|
|
827
870
|
* This object is expected to be modified directly by various summarize methods.
|
|
828
|
-
* @
|
|
871
|
+
* @public
|
|
829
872
|
*/
|
|
830
873
|
export declare interface ITelemetryContext {
|
|
831
874
|
/**
|