@fluidframework/runtime-definitions 2.70.0-361788 → 2.71.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 +30 -0
- package/api-report/runtime-definitions.legacy.alpha.api.md +4 -21
- package/api-report/runtime-definitions.legacy.beta.api.md +4 -21
- package/dist/containerExtensionProvider.d.ts +92 -0
- package/dist/containerExtensionProvider.d.ts.map +1 -0
- package/dist/containerExtensionProvider.js +7 -0
- package/dist/containerExtensionProvider.js.map +1 -0
- package/dist/dataStoreContext.d.ts +17 -3
- package/dist/dataStoreContext.d.ts.map +1 -1
- package/dist/dataStoreContext.js.map +1 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/legacy.d.ts +0 -3
- package/dist/legacyAlpha.d.ts +0 -3
- package/dist/protocol.d.ts +26 -2
- package/dist/protocol.d.ts.map +1 -1
- package/dist/protocol.js.map +1 -1
- package/dist/stagingMode.d.ts +8 -31
- package/dist/stagingMode.d.ts.map +1 -1
- package/dist/stagingMode.js.map +1 -1
- package/lib/containerExtensionProvider.d.ts +92 -0
- package/lib/containerExtensionProvider.d.ts.map +1 -0
- package/lib/containerExtensionProvider.js +6 -0
- package/lib/containerExtensionProvider.js.map +1 -0
- package/lib/dataStoreContext.d.ts +17 -3
- package/lib/dataStoreContext.d.ts.map +1 -1
- package/lib/dataStoreContext.js.map +1 -1
- package/lib/index.d.ts +4 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/legacy.d.ts +0 -3
- package/lib/legacyAlpha.d.ts +0 -3
- package/lib/protocol.d.ts +26 -2
- package/lib/protocol.d.ts.map +1 -1
- package/lib/protocol.js.map +1 -1
- package/lib/stagingMode.d.ts +8 -31
- package/lib/stagingMode.d.ts.map +1 -1
- package/lib/stagingMode.js.map +1 -1
- package/package.json +12 -24
- package/src/containerExtensionProvider.ts +107 -0
- package/src/dataStoreContext.ts +19 -3
- package/src/index.ts +12 -3
- package/src/protocol.ts +28 -3
- package/src/stagingMode.ts +8 -31
package/lib/legacy.d.ts
CHANGED
|
@@ -13,7 +13,6 @@ export {
|
|
|
13
13
|
AliasResult,
|
|
14
14
|
AttributionInfo,
|
|
15
15
|
AttributionKey,
|
|
16
|
-
CommitStagedChangesOptionsExperimental,
|
|
17
16
|
CreateChildSummarizerNodeFn,
|
|
18
17
|
CreateChildSummarizerNodeParam,
|
|
19
18
|
CreateSummarizerNodeSource,
|
|
@@ -23,7 +22,6 @@ export {
|
|
|
23
22
|
IAttachMessage,
|
|
24
23
|
IContainerRuntimeBase,
|
|
25
24
|
IContainerRuntimeBaseEvents,
|
|
26
|
-
IContainerRuntimeBaseExperimental,
|
|
27
25
|
IDataStore,
|
|
28
26
|
IEnvelope,
|
|
29
27
|
IExperimentalIncrementalSummaryContext,
|
|
@@ -60,7 +58,6 @@ export {
|
|
|
60
58
|
NamedFluidDataStoreRegistryEntry2,
|
|
61
59
|
OpAttributionKey,
|
|
62
60
|
PackagePath,
|
|
63
|
-
StageControlsExperimental,
|
|
64
61
|
SummarizeInternalFn,
|
|
65
62
|
VisibilityState
|
|
66
63
|
// #endregion
|
package/lib/legacyAlpha.d.ts
CHANGED
|
@@ -13,7 +13,6 @@ export {
|
|
|
13
13
|
AliasResult,
|
|
14
14
|
AttributionInfo,
|
|
15
15
|
AttributionKey,
|
|
16
|
-
CommitStagedChangesOptionsExperimental,
|
|
17
16
|
CreateChildSummarizerNodeFn,
|
|
18
17
|
CreateChildSummarizerNodeParam,
|
|
19
18
|
CreateSummarizerNodeSource,
|
|
@@ -23,7 +22,6 @@ export {
|
|
|
23
22
|
IAttachMessage,
|
|
24
23
|
IContainerRuntimeBase,
|
|
25
24
|
IContainerRuntimeBaseEvents,
|
|
26
|
-
IContainerRuntimeBaseExperimental,
|
|
27
25
|
IDataStore,
|
|
28
26
|
IEnvelope,
|
|
29
27
|
IExperimentalIncrementalSummaryContext,
|
|
@@ -60,7 +58,6 @@ export {
|
|
|
60
58
|
NamedFluidDataStoreRegistryEntry2,
|
|
61
59
|
OpAttributionKey,
|
|
62
60
|
PackagePath,
|
|
63
|
-
StageControlsExperimental,
|
|
64
61
|
SummarizeInternalFn,
|
|
65
62
|
VisibilityState,
|
|
66
63
|
// #endregion
|
package/lib/protocol.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import type { ITree, ISignalMessage, ISequencedDocumentMessage } from "@fluidfra
|
|
|
8
8
|
* An envelope wraps the contents with the intended target
|
|
9
9
|
* @legacy @beta
|
|
10
10
|
*/
|
|
11
|
-
export interface IEnvelope {
|
|
11
|
+
export interface IEnvelope<TContents = any> {
|
|
12
12
|
/**
|
|
13
13
|
* The target for the envelope
|
|
14
14
|
*/
|
|
@@ -16,7 +16,7 @@ export interface IEnvelope {
|
|
|
16
16
|
/**
|
|
17
17
|
* The contents of the envelope
|
|
18
18
|
*/
|
|
19
|
-
contents:
|
|
19
|
+
contents: TContents;
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
22
|
* Represents ISignalMessage with its type.
|
|
@@ -100,6 +100,30 @@ export interface IRuntimeMessageCollection {
|
|
|
100
100
|
*/
|
|
101
101
|
readonly messagesContent: readonly IRuntimeMessagesContent[];
|
|
102
102
|
}
|
|
103
|
+
/**
|
|
104
|
+
* Outgoing {@link IFluidDataStoreChannel} message structures.
|
|
105
|
+
* @internal
|
|
106
|
+
*
|
|
107
|
+
* @privateRemarks
|
|
108
|
+
* Future use opportunity:
|
|
109
|
+
* - Change {@link IFluidDataStoreChannel} and {@link IFluidParentContext},
|
|
110
|
+
* to have a generic specifying `T extends FluidDataStoreMessage` and uses
|
|
111
|
+
* `T["type"]` and `T["content"]` to qualify message related methods,
|
|
112
|
+
* preferably where `submitMessage`, `reSubmit`, and `rollback` have
|
|
113
|
+
* overloads to ensure callers pair values correctly.
|
|
114
|
+
* - A further improvement would be to reshape `submitMessage`, `reSubmit`,
|
|
115
|
+
* and `rollback` to accept `T` as `message` parameter instead of `type`
|
|
116
|
+
* and `content` parameters that are hard to convince TypeScript must be
|
|
117
|
+
* paired in implementations.
|
|
118
|
+
* - Caveat to enhanced type safety is that a user that changes their own
|
|
119
|
+
* `FluidDataStoreMessage` definition over time needs to account for
|
|
120
|
+
* protocol changes. So `unknown` should continue to be used for incoming
|
|
121
|
+
* message methods (where messages are not known to originate locally).
|
|
122
|
+
*/
|
|
123
|
+
export interface FluidDataStoreMessage {
|
|
124
|
+
type: string;
|
|
125
|
+
content: unknown;
|
|
126
|
+
}
|
|
103
127
|
/**
|
|
104
128
|
* Interface to provide access to snapshot blobs to DataStore layer.
|
|
105
129
|
*
|
package/lib/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,KAAK,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AAC7E,OAAO,KAAK,EACX,KAAK,EACL,cAAc,EACd,yBAAyB,EACzB,MAAM,6CAA6C,CAAC;AAErD;;;GAGG;
|
|
1
|
+
{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AAC7E,OAAO,KAAK,EACX,KAAK,EACL,cAAc,EACd,yBAAyB,EACzB,MAAM,6CAA6C,CAAC;AAErD;;;GAGG;AAEH,MAAM,WAAW,SAAS,CAAC,SAAS,GAAG,GAAG;IACzC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,WAAW,qBAAqB,CAAC,QAAQ,SAAS,YAAY,GAAG,YAAY,CAClF,SAAQ,cAAc,CAAC,QAAQ,CAAC;IAChC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;CAChC;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC9B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC;CAChB;AAED;;;;;;GAMG;AACH,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC,GAAG;IAErE,QAAQ,EAAE,cAAc,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC;CAC5C,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAC3C,yBAAyB,EACzB,UAAU,GAAG,sBAAsB,CACnC,CAAC;AAEF;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACvC;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B;;OAEG;IACH,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;IAClC;;OAEG;IACH,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;CACtC;AAED;;;;GAIG;AACH,MAAM,WAAW,yBAAyB;IACzC;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,yBAAyB,CAAC;IAC7C;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,QAAQ,CAAC,eAAe,EAAE,SAAS,uBAAuB,EAAE,CAAC;CAC7D;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,WAAW,qBAAqB;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;CACjB;AAED;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACtC;;OAEG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;CAC/C"}
|
package/lib/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 type { TypedMessage } from \"@fluidframework/core-interfaces/internal\";\nimport type {\n\tITree,\n\tISignalMessage,\n\tISequencedDocumentMessage,\n} from \"@fluidframework/driver-definitions/internal\";\n\n/**\n * An envelope wraps the contents with the intended target\n * @legacy @beta\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\
|
|
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 type { TypedMessage } from \"@fluidframework/core-interfaces/internal\";\nimport type {\n\tITree,\n\tISignalMessage,\n\tISequencedDocumentMessage,\n} from \"@fluidframework/driver-definitions/internal\";\n\n/**\n * An envelope wraps the contents with the intended target\n * @legacy @beta\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any -- TODO (#28746): breaking change\nexport interface IEnvelope<TContents = any> {\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: TContents;\n}\n\n/**\n * Represents ISignalMessage with its type.\n * @legacy @beta\n */\nexport interface IInboundSignalMessage<TMessage extends TypedMessage = TypedMessage>\n\textends ISignalMessage<TMessage> {\n\treadonly type: TMessage[\"type\"];\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 * @legacy @beta\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 * @legacy @beta\n */\nexport type InboundAttachMessage = Omit<IAttachMessage, \"snapshot\"> & {\n\t// eslint-disable-next-line @rushstack/no-new-null -- TODO: breaking change; protocol might even explicitly use null\n\tsnapshot: IAttachMessage[\"snapshot\"] | null;\n};\n\n/**\n * This is the message type that is used within the runtime when processing a sequenced message.\n * It is the same as ISequencedDocumentMessage, but without the contents and clientSequenceNumbers\n * which are sent separately. The contents are modified at multiple layers in the stack so having it\n * separate doesn't require packing and unpacking the entire message.\n * @legacy @beta\n */\nexport type ISequencedMessageEnvelope = Omit<\n\tISequencedDocumentMessage,\n\t\"contents\" | \"clientSequenceNumber\"\n>;\n\n/**\n * These are the contents of a runtime message as it is processed throughout the stack.\n * @legacy @beta\n * @sealed\n */\nexport interface IRuntimeMessagesContent {\n\t/**\n\t * The contents of the message, i.e., the payload\n\t */\n\treadonly contents: unknown;\n\t/**\n\t * The local metadata associated with the original message that was submitted\n\t */\n\treadonly localOpMetadata: unknown;\n\t/**\n\t * The client sequence number of the message\n\t */\n\treadonly clientSequenceNumber: number;\n}\n\n/**\n * A collection of messages that are processed by the runtime.\n * @legacy @beta\n * @sealed\n */\nexport interface IRuntimeMessageCollection {\n\t/**\n\t * The envelope for all the messages in the collection\n\t */\n\treadonly envelope: ISequencedMessageEnvelope;\n\t/**\n\t * Whether these messages were originally generated by the client processing them\n\t */\n\treadonly local: boolean;\n\t/**\n\t * The contents of the messages in the collection\n\t */\n\treadonly messagesContent: readonly IRuntimeMessagesContent[];\n}\n\n/**\n * Outgoing {@link IFluidDataStoreChannel} message structures.\n * @internal\n *\n * @privateRemarks\n * Future use opportunity:\n * - Change {@link IFluidDataStoreChannel} and {@link IFluidParentContext},\n * to have a generic specifying `T extends FluidDataStoreMessage` and uses\n * `T[\"type\"]` and `T[\"content\"]` to qualify message related methods,\n * preferably where `submitMessage`, `reSubmit`, and `rollback` have\n * overloads to ensure callers pair values correctly.\n * - A further improvement would be to reshape `submitMessage`, `reSubmit`,\n * and `rollback` to accept `T` as `message` parameter instead of `type`\n * and `content` parameters that are hard to convince TypeScript must be\n * paired in implementations.\n * - Caveat to enhanced type safety is that a user that changes their own\n * `FluidDataStoreMessage` definition over time needs to account for\n * protocol changes. So `unknown` should continue to be used for incoming\n * message methods (where messages are not known to originate locally).\n */\nexport interface FluidDataStoreMessage {\n\ttype: string;\n\tcontent: unknown;\n}\n\n/**\n * Interface to provide access to snapshot blobs to DataStore layer.\n *\n * @legacy @beta\n */\nexport interface IRuntimeStorageService {\n\t/**\n\t * Reads the object with the given ID, returns content in arrayBufferLike\n\t */\n\treadBlob(id: string): Promise<ArrayBufferLike>;\n}\n"]}
|
package/lib/stagingMode.d.ts
CHANGED
|
@@ -5,14 +5,9 @@
|
|
|
5
5
|
import type { IContainerRuntimeBase } from "./dataStoreContext.js";
|
|
6
6
|
/**
|
|
7
7
|
* Options for committing staged changes in experimental staging mode.
|
|
8
|
-
*
|
|
9
|
-
* @experimental
|
|
10
|
-
* @deprecated These APIs are unstable, and can be changed at will. They should only be used with direct agreement with the Fluid Framework.
|
|
11
|
-
* @legacy @beta
|
|
12
|
-
* @sealed
|
|
13
|
-
* @privateRemarks After partners move to the alpha interfaces this interface should be renamed and tagged to be internal.
|
|
8
|
+
* @internal
|
|
14
9
|
*/
|
|
15
|
-
export interface
|
|
10
|
+
export interface CommitStagedChangesOptionsInternal {
|
|
16
11
|
/**
|
|
17
12
|
* If true, intermediate states created by changes made while in staging mode will be "squashed" out of the
|
|
18
13
|
* ops which were created during staging mode.
|
|
@@ -33,25 +28,16 @@ export interface CommitStagedChangesOptionsExperimental {
|
|
|
33
28
|
* Controls for managing staged changes in experimental staging mode.
|
|
34
29
|
*
|
|
35
30
|
* Provides methods to either commit or discard changes made while in staging mode.
|
|
36
|
-
*
|
|
37
|
-
* @experimental
|
|
38
|
-
* @deprecated These APIs are unstable, and can be changed at will. They should only be used with direct agreement with the Fluid Framework.
|
|
39
|
-
* @legacy @beta
|
|
40
|
-
* @sealed
|
|
41
|
-
* @privateRemarks After partners move to the alpha interfaces this interface should be renamed and tagged to be internal.
|
|
31
|
+
* @internal
|
|
42
32
|
*/
|
|
43
|
-
export interface
|
|
33
|
+
export interface StageControlsInternal extends StageControlsAlpha {
|
|
44
34
|
/**
|
|
45
35
|
* Exit staging mode and commit to any changes made while in staging mode.
|
|
46
36
|
* This will cause them to be sent to the ordering service, and subsequent changes
|
|
47
37
|
* made by this container will additionally flow freely to the ordering service.
|
|
48
38
|
* @param options - Options when committing changes.
|
|
49
39
|
*/
|
|
50
|
-
readonly commitChanges: (options?: Partial<
|
|
51
|
-
/**
|
|
52
|
-
* Exit staging mode and discard any changes made while in staging mode.
|
|
53
|
-
*/
|
|
54
|
-
readonly discardChanges: () => void;
|
|
40
|
+
readonly commitChanges: (options?: Partial<CommitStagedChangesOptionsInternal>) => void;
|
|
55
41
|
}
|
|
56
42
|
/**
|
|
57
43
|
* Controls for managing staged changes in alpha staging mode.
|
|
@@ -75,23 +61,14 @@ export interface StageControlsAlpha {
|
|
|
75
61
|
}
|
|
76
62
|
/**
|
|
77
63
|
* Experimental extension of {@link IContainerRuntimeBase} to support staging mode.
|
|
78
|
-
*
|
|
79
|
-
* @experimental
|
|
80
|
-
* @deprecated These APIs are unstable, and can be changed at will. They should only be used with direct agreement with the Fluid Framework.
|
|
81
|
-
* @legacy @beta
|
|
82
|
-
* @sealed
|
|
83
|
-
* @privateRemarks After partners move to the alpha interfaces this interface should be renamed and tagged to be internal.
|
|
64
|
+
* @internal
|
|
84
65
|
*/
|
|
85
|
-
export interface
|
|
66
|
+
export interface IContainerRuntimeBaseInternal extends ContainerRuntimeBaseAlpha {
|
|
86
67
|
/**
|
|
87
68
|
* Enters staging mode, allowing changes to be staged before being committed or discarded.
|
|
88
69
|
* @returns Controls for committing or discarding staged changes.
|
|
89
70
|
*/
|
|
90
|
-
enterStagingMode
|
|
91
|
-
/**
|
|
92
|
-
* Indicates whether the container is currently in staging mode.
|
|
93
|
-
*/
|
|
94
|
-
readonly inStagingMode?: boolean;
|
|
71
|
+
enterStagingMode(): StageControlsInternal;
|
|
95
72
|
}
|
|
96
73
|
/**
|
|
97
74
|
* Alpha interface for container runtime base supporting staging mode.
|
package/lib/stagingMode.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stagingMode.d.ts","sourceRoot":"","sources":["../src/stagingMode.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAEnE
|
|
1
|
+
{"version":3,"file":"stagingMode.d.ts","sourceRoot":"","sources":["../src/stagingMode.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAEnE;;;GAGG;AACH,MAAM,WAAW,kCAAkC;IAClD;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;;;;GAKG;AACH,MAAM,WAAW,qBAAsB,SAAQ,kBAAkB;IAChE;;;;;OAKG;IACH,QAAQ,CAAC,aAAa,EAAE,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,kCAAkC,CAAC,KAAK,IAAI,CAAC;CACxF;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB;IAClC;;;;OAIG;IACH,QAAQ,CAAC,aAAa,EAAE,MAAM,IAAI,CAAC;IACnC;;OAEG;IACH,QAAQ,CAAC,cAAc,EAAE,MAAM,IAAI,CAAC;CACpC;AAED;;;GAGG;AACH,MAAM,WAAW,6BAA8B,SAAQ,yBAAyB;IAC/E;;;OAGG;IACH,gBAAgB,IAAI,qBAAqB,CAAC;CAC1C;AAED;;;;;GAKG;AACH,MAAM,WAAW,yBAA0B,SAAQ,qBAAqB;IACvE;;;OAGG;IACH,gBAAgB,IAAI,kBAAkB,CAAC;IACvC;;OAEG;IACH,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;CAChC;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,qBAAqB,GAAG,yBAAyB,CAEpF"}
|
package/lib/stagingMode.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stagingMode.js","sourceRoot":"","sources":["../src/stagingMode.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"stagingMode.js","sourceRoot":"","sources":["../src/stagingMode.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA6FH;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,IAA2B;IACxD,OAAO,IAAiC,CAAC;AAC1C,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IContainerRuntimeBase } from \"./dataStoreContext.js\";\n\n/**\n * Options for committing staged changes in experimental staging mode.\n * @internal\n */\nexport interface CommitStagedChangesOptionsInternal {\n\t/**\n\t * If true, intermediate states created by changes made while in staging mode will be \"squashed\" out of the\n\t * ops which were created during staging mode.\n\t * Defaults to false.\n\t * @remarks\n\t * The squash parameter is analogous to `git squash` but differs in a notable way: ops created by a client exiting staging mode\n\t * are not necessarily coalesced into a single op or something like it.\n\t * It still does have the desirable property that \"unnecessary changes\" (such as inserting some content then removing it) will\n\t * be removed from the set of submitted ops, which means it helps reduce network traffic and the chance of unwanted data being\n\t * persisted--even if only temporarily--in the document.\n\t *\n\t * By not attempting to reduce the set of changes to a single op a la `git squash`, we can better preserve the ordering of\n\t * changes that remote clients see such that they better align with the client which submitted the changes.\n\t */\n\tsquash?: boolean;\n}\n\n/**\n * Controls for managing staged changes in experimental staging mode.\n *\n * Provides methods to either commit or discard changes made while in staging mode.\n * @internal\n */\nexport interface StageControlsInternal extends StageControlsAlpha {\n\t/**\n\t * Exit staging mode and commit to any changes made while in staging mode.\n\t * This will cause them to be sent to the ordering service, and subsequent changes\n\t * made by this container will additionally flow freely to the ordering service.\n\t * @param options - Options when committing changes.\n\t */\n\treadonly commitChanges: (options?: Partial<CommitStagedChangesOptionsInternal>) => void;\n}\n\n/**\n * Controls for managing staged changes in alpha staging mode.\n *\n * Provides methods to either commit or discard changes made while in staging mode.\n *\n * @legacy @alpha\n * @sealed\n */\nexport interface StageControlsAlpha {\n\t/**\n\t * Exit staging mode and commit to any changes made while in staging mode.\n\t * This will cause them to be sent to the ordering service, and subsequent changes\n\t * made by this container will additionally flow freely to the ordering service.\n\t */\n\treadonly commitChanges: () => void;\n\t/**\n\t * Exit staging mode and discard any changes made while in staging mode.\n\t */\n\treadonly discardChanges: () => void;\n}\n\n/**\n * Experimental extension of {@link IContainerRuntimeBase} to support staging mode.\n * @internal\n */\nexport interface IContainerRuntimeBaseInternal extends ContainerRuntimeBaseAlpha {\n\t/**\n\t * Enters staging mode, allowing changes to be staged before being committed or discarded.\n\t * @returns Controls for committing or discarding staged changes.\n\t */\n\tenterStagingMode(): StageControlsInternal;\n}\n\n/**\n * Alpha interface for container runtime base supporting staging mode.\n *\n * @legacy @alpha\n * @sealed\n */\nexport interface ContainerRuntimeBaseAlpha extends IContainerRuntimeBase {\n\t/**\n\t * Enters staging mode, allowing changes to be staged before being committed or discarded.\n\t * @returns Controls for committing or discarding staged changes.\n\t */\n\tenterStagingMode(): StageControlsAlpha;\n\t/**\n\t * Indicates whether the container is currently in staging mode.\n\t */\n\treadonly inStagingMode: boolean;\n}\n\n/**\n * Converts types to their alpha counterparts to expose alpha functionality.\n * @legacy @alpha\n * @sealed\n */\nexport function asLegacyAlpha(base: IContainerRuntimeBase): ContainerRuntimeBaseAlpha {\n\treturn base as ContainerRuntimeBaseAlpha;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/runtime-definitions",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.71.0",
|
|
4
4
|
"description": "Fluid Runtime definitions",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -57,11 +57,12 @@
|
|
|
57
57
|
"main": "lib/index.js",
|
|
58
58
|
"types": "lib/public.d.ts",
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@
|
|
61
|
-
"@fluidframework/
|
|
62
|
-
"@fluidframework/
|
|
63
|
-
"@fluidframework/
|
|
64
|
-
"@fluidframework/
|
|
60
|
+
"@fluid-internal/client-utils": "~2.71.0",
|
|
61
|
+
"@fluidframework/container-definitions": "~2.71.0",
|
|
62
|
+
"@fluidframework/core-interfaces": "~2.71.0",
|
|
63
|
+
"@fluidframework/driver-definitions": "~2.71.0",
|
|
64
|
+
"@fluidframework/id-compressor": "~2.71.0",
|
|
65
|
+
"@fluidframework/telemetry-utils": "~2.71.0"
|
|
65
66
|
},
|
|
66
67
|
"devDependencies": {
|
|
67
68
|
"@arethetypeswrong/cli": "^0.17.1",
|
|
@@ -69,8 +70,8 @@
|
|
|
69
70
|
"@fluid-tools/build-cli": "^0.58.3",
|
|
70
71
|
"@fluidframework/build-common": "^2.0.3",
|
|
71
72
|
"@fluidframework/build-tools": "^0.58.3",
|
|
72
|
-
"@fluidframework/eslint-config-fluid": "^
|
|
73
|
-
"@fluidframework/runtime-definitions-previous": "npm:@fluidframework/runtime-definitions@2.
|
|
73
|
+
"@fluidframework/eslint-config-fluid": "^7.0.0",
|
|
74
|
+
"@fluidframework/runtime-definitions-previous": "npm:@fluidframework/runtime-definitions@2.70.0",
|
|
74
75
|
"@microsoft/api-extractor": "7.52.11",
|
|
75
76
|
"concurrently": "^8.2.1",
|
|
76
77
|
"copyfiles": "^2.4.1",
|
|
@@ -79,20 +80,7 @@
|
|
|
79
80
|
"typescript": "~5.4.5"
|
|
80
81
|
},
|
|
81
82
|
"typeValidation": {
|
|
82
|
-
"broken": {
|
|
83
|
-
"Interface_IFluidDataStoreContext": {
|
|
84
|
-
"backCompat": false
|
|
85
|
-
},
|
|
86
|
-
"Interface_IFluidDataStoreContextDetached": {
|
|
87
|
-
"backCompat": false
|
|
88
|
-
},
|
|
89
|
-
"Interface_IFluidParentContext": {
|
|
90
|
-
"backCompat": false
|
|
91
|
-
},
|
|
92
|
-
"Interface_IRuntimeStorageService": {
|
|
93
|
-
"backCompat": false
|
|
94
|
-
}
|
|
95
|
-
},
|
|
83
|
+
"broken": {},
|
|
96
84
|
"entrypoint": "legacy"
|
|
97
85
|
},
|
|
98
86
|
"scripts": {
|
|
@@ -125,8 +113,8 @@
|
|
|
125
113
|
"ci:build:api-reports:legacy": "api-extractor run --config api-extractor/api-extractor.legacy.json",
|
|
126
114
|
"ci:build:docs": "api-extractor run",
|
|
127
115
|
"clean": "rimraf --glob dist lib {alpha,beta,internal,legacy}.d.ts \"**/*.tsbuildinfo\" \"**/*.build.log\" _api-extractor-temp",
|
|
128
|
-
"eslint": "eslint --format stylish src",
|
|
129
|
-
"eslint:fix": "eslint --format stylish src --fix --fix-type problem,suggestion,layout",
|
|
116
|
+
"eslint": "eslint --quiet --format stylish src",
|
|
117
|
+
"eslint:fix": "eslint --quiet --format stylish src --fix --fix-type problem,suggestion,layout",
|
|
130
118
|
"format": "npm run format:biome",
|
|
131
119
|
"format:biome": "biome check . --write",
|
|
132
120
|
"lint": "fluid-build . --task lint",
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { ILayerCompatSupportRequirements } from "@fluid-internal/client-utils";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Identifying characteristics of a registrant for checking runtime compatibility.
|
|
10
|
+
*
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
export interface ExtensionCompatibilityDetails {
|
|
14
|
+
/**
|
|
15
|
+
* Compatibility generation.
|
|
16
|
+
*/
|
|
17
|
+
readonly generation: number;
|
|
18
|
+
/**
|
|
19
|
+
* Semver string representing the version of the registrant.
|
|
20
|
+
*/
|
|
21
|
+
readonly version: string;
|
|
22
|
+
/**
|
|
23
|
+
* Set of capabilities supported by the registrant.
|
|
24
|
+
*/
|
|
25
|
+
readonly capabilities: ReadonlySet<string>;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Information about an instantiation of an extension.
|
|
30
|
+
*
|
|
31
|
+
* @internal
|
|
32
|
+
*/
|
|
33
|
+
export interface UnknownExtensionInstantiation {
|
|
34
|
+
compatibility: ExtensionCompatibilityDetails;
|
|
35
|
+
interface: unknown;
|
|
36
|
+
extension: unknown;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Description of expectations for an extension instance.
|
|
41
|
+
*
|
|
42
|
+
* Provided to {@link ContainerExtensionProvider.getExtension} and used to
|
|
43
|
+
* validate existing extension is runtime compatible.
|
|
44
|
+
*
|
|
45
|
+
* @internal
|
|
46
|
+
*/
|
|
47
|
+
export interface ContainerExtensionExpectations {
|
|
48
|
+
/**
|
|
49
|
+
* Requirements imposed on the host/container for the extension.
|
|
50
|
+
*/
|
|
51
|
+
readonly hostRequirements: ILayerCompatSupportRequirements;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Expectations for an existing extension instance.
|
|
55
|
+
*/
|
|
56
|
+
readonly instanceExpectations: ExtensionCompatibilityDetails;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Called when an existing extension instantiation appears unable to meet
|
|
60
|
+
* expectations. Allows for custom resolution with the prior instantiation
|
|
61
|
+
* including more sophisticated acceptance logic.
|
|
62
|
+
* @param priorInstantiation - The prior instantiation of the extension.
|
|
63
|
+
*/
|
|
64
|
+
resolvePriorInstantiation(
|
|
65
|
+
priorInstantiation: UnknownExtensionInstantiation,
|
|
66
|
+
): Readonly<UnknownExtensionInstantiation>;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/* eslint-disable @fluid-internal/fluid/no-hyphen-after-jsdoc-tag -- false positive AB#50920 */
|
|
70
|
+
/**
|
|
71
|
+
* Unique identifier for extension
|
|
72
|
+
*
|
|
73
|
+
* @remarks
|
|
74
|
+
* A string known to all clients working with a certain ContainerExtension and unique
|
|
75
|
+
* among ContainerExtensions. No `/` may be used in the string. Recommend using
|
|
76
|
+
* concatenation of: type of unique identifier, `:` (required), and unique identifier.
|
|
77
|
+
*
|
|
78
|
+
* @example Examples
|
|
79
|
+
* ```typescript
|
|
80
|
+
* "guid:g0fl001d-1415-5000-c00l-g0fa54g0b1g1"
|
|
81
|
+
* "name:@foo-scope_bar:v1"
|
|
82
|
+
* ```
|
|
83
|
+
*
|
|
84
|
+
* @internal
|
|
85
|
+
*/
|
|
86
|
+
export type ContainerExtensionId = `${string}:${string}`;
|
|
87
|
+
/* eslint-enable @fluid-internal/fluid/no-hyphen-after-jsdoc-tag */
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* @sealed
|
|
91
|
+
* @internal
|
|
92
|
+
*/
|
|
93
|
+
export interface ContainerExtensionProvider {
|
|
94
|
+
/**
|
|
95
|
+
* Gets an extension from store.
|
|
96
|
+
*
|
|
97
|
+
* @param id - Identifier for the requested extension
|
|
98
|
+
* @param expectations - Extension compatibility requirements
|
|
99
|
+
* @param context - Custom use context for extension
|
|
100
|
+
* @returns The extension
|
|
101
|
+
*/
|
|
102
|
+
getExtension<TInterface, TUseContext extends unknown[] = []>(
|
|
103
|
+
id: ContainerExtensionId,
|
|
104
|
+
expectations: ContainerExtensionExpectations,
|
|
105
|
+
...context: TUseContext
|
|
106
|
+
): TInterface;
|
|
107
|
+
}
|
package/src/dataStoreContext.ts
CHANGED
|
@@ -28,6 +28,7 @@ import type {
|
|
|
28
28
|
import type { IIdCompressor } from "@fluidframework/id-compressor";
|
|
29
29
|
|
|
30
30
|
import type { MinimumVersionForCollab } from "./compatibilityDefinitions.js";
|
|
31
|
+
import type { ContainerExtensionProvider } from "./containerExtensionProvider.js";
|
|
31
32
|
import type {
|
|
32
33
|
IFluidDataStoreFactory,
|
|
33
34
|
IProvideFluidDataStoreFactory,
|
|
@@ -400,7 +401,7 @@ export interface IFluidDataStoreChannel extends IDisposable {
|
|
|
400
401
|
* @param clientId - ID of the client. It's old ID when in disconnected state and
|
|
401
402
|
* it's new client ID when we are connecting or connected.
|
|
402
403
|
*/
|
|
403
|
-
setConnectionState(connected: boolean, clientId?: string);
|
|
404
|
+
setConnectionState(connected: boolean, clientId?: string): void;
|
|
404
405
|
|
|
405
406
|
/**
|
|
406
407
|
* Notifies this object about changes in the readonly state
|
|
@@ -426,7 +427,7 @@ export interface IFluidDataStoreChannel extends IDisposable {
|
|
|
426
427
|
* See remarks about squashing contract on `CommitStagedChangesOptionsExperimental`.
|
|
427
428
|
*/
|
|
428
429
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- TODO (#28746): breaking change
|
|
429
|
-
reSubmit(type: string, content: any, localOpMetadata: unknown, squash?: boolean);
|
|
430
|
+
reSubmit(type: string, content: any, localOpMetadata: unknown, squash?: boolean): void;
|
|
430
431
|
|
|
431
432
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- TODO (#28746): breaking change
|
|
432
433
|
applyStashedOp(content: any): Promise<unknown>;
|
|
@@ -482,7 +483,8 @@ export interface IPendingMessagesState {
|
|
|
482
483
|
* Therefore the semantics of these two interfaces is not really distinct.
|
|
483
484
|
*
|
|
484
485
|
* @privateRemarks
|
|
485
|
-
* In addition to the use for datastores via IFluidDataStoreContext, this is
|
|
486
|
+
* In addition to the use for datastores via IFluidDataStoreContext, this is
|
|
487
|
+
* partially implemented by ContainerRuntime to provide context to the ChannelCollection.
|
|
486
488
|
*
|
|
487
489
|
* @legacy @beta
|
|
488
490
|
*/
|
|
@@ -692,6 +694,20 @@ export interface IFluidDataStoreContext extends IFluidParentContext {
|
|
|
692
694
|
): ReturnType<Exclude<T["createDataStore"], undefined>>;
|
|
693
695
|
}
|
|
694
696
|
|
|
697
|
+
/**
|
|
698
|
+
* Internal extension to {@link IFluidDataStoreContext} for use across FluidFramework packages.
|
|
699
|
+
*
|
|
700
|
+
* @remarks
|
|
701
|
+
* Important: this interface does cross layer boundaries and must follow `@legacy`
|
|
702
|
+
* layer compatibility patterns.
|
|
703
|
+
* This is meant to be a staging ground ahead of adding properties to {@link IFluidDataStoreContext}.
|
|
704
|
+
*
|
|
705
|
+
* @internal
|
|
706
|
+
*/
|
|
707
|
+
export interface FluidDataStoreContextInternal
|
|
708
|
+
extends IFluidDataStoreContext,
|
|
709
|
+
ContainerExtensionProvider {}
|
|
710
|
+
|
|
695
711
|
/**
|
|
696
712
|
* @legacy @beta
|
|
697
713
|
*/
|
package/src/index.ts
CHANGED
|
@@ -10,9 +10,17 @@ export type {
|
|
|
10
10
|
LocalAttributionKey,
|
|
11
11
|
OpAttributionKey,
|
|
12
12
|
} from "./attribution.js";
|
|
13
|
+
export type {
|
|
14
|
+
ContainerExtensionId,
|
|
15
|
+
ContainerExtensionProvider,
|
|
16
|
+
ContainerExtensionExpectations,
|
|
17
|
+
ExtensionCompatibilityDetails,
|
|
18
|
+
UnknownExtensionInstantiation,
|
|
19
|
+
} from "./containerExtensionProvider.js";
|
|
13
20
|
export type {
|
|
14
21
|
AliasResult,
|
|
15
22
|
CreateChildSummarizerNodeFn,
|
|
23
|
+
FluidDataStoreContextInternal,
|
|
16
24
|
IContainerRuntimeBase,
|
|
17
25
|
IContainerRuntimeBaseEvents,
|
|
18
26
|
IDataStore,
|
|
@@ -47,6 +55,7 @@ export {
|
|
|
47
55
|
gcTreeKey,
|
|
48
56
|
} from "./garbageCollectionDefinitions.js";
|
|
49
57
|
export type {
|
|
58
|
+
FluidDataStoreMessage,
|
|
50
59
|
IAttachMessage,
|
|
51
60
|
IEnvelope,
|
|
52
61
|
IInboundSignalMessage,
|
|
@@ -86,8 +95,8 @@ export type { MinimumVersionForCollab } from "./compatibilityDefinitions.js";
|
|
|
86
95
|
export {
|
|
87
96
|
type ContainerRuntimeBaseAlpha,
|
|
88
97
|
type StageControlsAlpha,
|
|
89
|
-
type
|
|
90
|
-
type
|
|
91
|
-
type
|
|
98
|
+
type CommitStagedChangesOptionsInternal,
|
|
99
|
+
type IContainerRuntimeBaseInternal,
|
|
100
|
+
type StageControlsInternal,
|
|
92
101
|
asLegacyAlpha,
|
|
93
102
|
} from "./stagingMode.js";
|
package/src/protocol.ts
CHANGED
|
@@ -14,7 +14,8 @@ import type {
|
|
|
14
14
|
* An envelope wraps the contents with the intended target
|
|
15
15
|
* @legacy @beta
|
|
16
16
|
*/
|
|
17
|
-
|
|
17
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- TODO (#28746): breaking change
|
|
18
|
+
export interface IEnvelope<TContents = any> {
|
|
18
19
|
/**
|
|
19
20
|
* The target for the envelope
|
|
20
21
|
*/
|
|
@@ -23,8 +24,7 @@ export interface IEnvelope {
|
|
|
23
24
|
/**
|
|
24
25
|
* The contents of the envelope
|
|
25
26
|
*/
|
|
26
|
-
|
|
27
|
-
contents: any;
|
|
27
|
+
contents: TContents;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
/**
|
|
@@ -122,6 +122,31 @@ export interface IRuntimeMessageCollection {
|
|
|
122
122
|
readonly messagesContent: readonly IRuntimeMessagesContent[];
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
+
/**
|
|
126
|
+
* Outgoing {@link IFluidDataStoreChannel} message structures.
|
|
127
|
+
* @internal
|
|
128
|
+
*
|
|
129
|
+
* @privateRemarks
|
|
130
|
+
* Future use opportunity:
|
|
131
|
+
* - Change {@link IFluidDataStoreChannel} and {@link IFluidParentContext},
|
|
132
|
+
* to have a generic specifying `T extends FluidDataStoreMessage` and uses
|
|
133
|
+
* `T["type"]` and `T["content"]` to qualify message related methods,
|
|
134
|
+
* preferably where `submitMessage`, `reSubmit`, and `rollback` have
|
|
135
|
+
* overloads to ensure callers pair values correctly.
|
|
136
|
+
* - A further improvement would be to reshape `submitMessage`, `reSubmit`,
|
|
137
|
+
* and `rollback` to accept `T` as `message` parameter instead of `type`
|
|
138
|
+
* and `content` parameters that are hard to convince TypeScript must be
|
|
139
|
+
* paired in implementations.
|
|
140
|
+
* - Caveat to enhanced type safety is that a user that changes their own
|
|
141
|
+
* `FluidDataStoreMessage` definition over time needs to account for
|
|
142
|
+
* protocol changes. So `unknown` should continue to be used for incoming
|
|
143
|
+
* message methods (where messages are not known to originate locally).
|
|
144
|
+
*/
|
|
145
|
+
export interface FluidDataStoreMessage {
|
|
146
|
+
type: string;
|
|
147
|
+
content: unknown;
|
|
148
|
+
}
|
|
149
|
+
|
|
125
150
|
/**
|
|
126
151
|
* Interface to provide access to snapshot blobs to DataStore layer.
|
|
127
152
|
*
|
package/src/stagingMode.ts
CHANGED
|
@@ -7,14 +7,9 @@ import type { IContainerRuntimeBase } from "./dataStoreContext.js";
|
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Options for committing staged changes in experimental staging mode.
|
|
10
|
-
*
|
|
11
|
-
* @experimental
|
|
12
|
-
* @deprecated These APIs are unstable, and can be changed at will. They should only be used with direct agreement with the Fluid Framework.
|
|
13
|
-
* @legacy @beta
|
|
14
|
-
* @sealed
|
|
15
|
-
* @privateRemarks After partners move to the alpha interfaces this interface should be renamed and tagged to be internal.
|
|
10
|
+
* @internal
|
|
16
11
|
*/
|
|
17
|
-
export interface
|
|
12
|
+
export interface CommitStagedChangesOptionsInternal {
|
|
18
13
|
/**
|
|
19
14
|
* If true, intermediate states created by changes made while in staging mode will be "squashed" out of the
|
|
20
15
|
* ops which were created during staging mode.
|
|
@@ -36,25 +31,16 @@ export interface CommitStagedChangesOptionsExperimental {
|
|
|
36
31
|
* Controls for managing staged changes in experimental staging mode.
|
|
37
32
|
*
|
|
38
33
|
* Provides methods to either commit or discard changes made while in staging mode.
|
|
39
|
-
*
|
|
40
|
-
* @experimental
|
|
41
|
-
* @deprecated These APIs are unstable, and can be changed at will. They should only be used with direct agreement with the Fluid Framework.
|
|
42
|
-
* @legacy @beta
|
|
43
|
-
* @sealed
|
|
44
|
-
* @privateRemarks After partners move to the alpha interfaces this interface should be renamed and tagged to be internal.
|
|
34
|
+
* @internal
|
|
45
35
|
*/
|
|
46
|
-
export interface
|
|
36
|
+
export interface StageControlsInternal extends StageControlsAlpha {
|
|
47
37
|
/**
|
|
48
38
|
* Exit staging mode and commit to any changes made while in staging mode.
|
|
49
39
|
* This will cause them to be sent to the ordering service, and subsequent changes
|
|
50
40
|
* made by this container will additionally flow freely to the ordering service.
|
|
51
41
|
* @param options - Options when committing changes.
|
|
52
42
|
*/
|
|
53
|
-
readonly commitChanges: (options?: Partial<
|
|
54
|
-
/**
|
|
55
|
-
* Exit staging mode and discard any changes made while in staging mode.
|
|
56
|
-
*/
|
|
57
|
-
readonly discardChanges: () => void;
|
|
43
|
+
readonly commitChanges: (options?: Partial<CommitStagedChangesOptionsInternal>) => void;
|
|
58
44
|
}
|
|
59
45
|
|
|
60
46
|
/**
|
|
@@ -80,23 +66,14 @@ export interface StageControlsAlpha {
|
|
|
80
66
|
|
|
81
67
|
/**
|
|
82
68
|
* Experimental extension of {@link IContainerRuntimeBase} to support staging mode.
|
|
83
|
-
*
|
|
84
|
-
* @experimental
|
|
85
|
-
* @deprecated These APIs are unstable, and can be changed at will. They should only be used with direct agreement with the Fluid Framework.
|
|
86
|
-
* @legacy @beta
|
|
87
|
-
* @sealed
|
|
88
|
-
* @privateRemarks After partners move to the alpha interfaces this interface should be renamed and tagged to be internal.
|
|
69
|
+
* @internal
|
|
89
70
|
*/
|
|
90
|
-
export interface
|
|
71
|
+
export interface IContainerRuntimeBaseInternal extends ContainerRuntimeBaseAlpha {
|
|
91
72
|
/**
|
|
92
73
|
* Enters staging mode, allowing changes to be staged before being committed or discarded.
|
|
93
74
|
* @returns Controls for committing or discarding staged changes.
|
|
94
75
|
*/
|
|
95
|
-
enterStagingMode
|
|
96
|
-
/**
|
|
97
|
-
* Indicates whether the container is currently in staging mode.
|
|
98
|
-
*/
|
|
99
|
-
readonly inStagingMode?: boolean;
|
|
76
|
+
enterStagingMode(): StageControlsInternal;
|
|
100
77
|
}
|
|
101
78
|
|
|
102
79
|
/**
|