@fluidframework/runtime-definitions 2.0.0-internal.2.0.3 → 2.0.0-internal.2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dataStoreContext.d.ts +32 -7
- package/dist/dataStoreContext.d.ts.map +1 -1
- package/dist/dataStoreContext.js.map +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +16 -16
- package/dist/index.js.map +1 -1
- package/package.json +10 -12
- package/src/dataStoreContext.ts +34 -7
- package/src/index.ts +43 -6
|
@@ -72,7 +72,10 @@ export interface IContainerRuntimeBaseEvents extends IEvent {
|
|
|
72
72
|
*/
|
|
73
73
|
export declare type AliasResult = "Success" | "Conflict" | "AlreadyAliased";
|
|
74
74
|
/**
|
|
75
|
-
*
|
|
75
|
+
* Exposes some functionality/features of a data store:
|
|
76
|
+
* - Handle to the data store's entryPoint
|
|
77
|
+
* - Fluid router for the data store
|
|
78
|
+
* - Can be assigned an alias
|
|
76
79
|
*/
|
|
77
80
|
export interface IDataStore extends IFluidRouter {
|
|
78
81
|
/**
|
|
@@ -83,6 +86,16 @@ export interface IDataStore extends IFluidRouter {
|
|
|
83
86
|
* @param alias - Given alias for this datastore.
|
|
84
87
|
*/
|
|
85
88
|
trySetAlias(alias: string): Promise<AliasResult>;
|
|
89
|
+
/**
|
|
90
|
+
* Exposes a handle to the root object / entryPoint of the data store. Use this as the primary way of interacting
|
|
91
|
+
* with it. If this property is undefined (meaning that exposing the entryPoint hasn't been implemented in a
|
|
92
|
+
* particular scenario) fall back to the current approach of requesting the root object through the request pattern.
|
|
93
|
+
*
|
|
94
|
+
* @remarks The plan is that eventually the data store will stop providing IFluidRouter functionality, this property
|
|
95
|
+
* will become non-optional and return an IFluidHandle (no undefined) and will become the only way to access
|
|
96
|
+
* the data store's entryPoint.
|
|
97
|
+
*/
|
|
98
|
+
readonly entryPoint?: IFluidHandle<FluidObject>;
|
|
86
99
|
}
|
|
87
100
|
/**
|
|
88
101
|
* A reduced set of functionality of IContainerRuntime that a data store context/data store runtime will need
|
|
@@ -112,10 +125,11 @@ export interface IContainerRuntimeBase extends IEventProvider<IContainerRuntimeB
|
|
|
112
125
|
*/
|
|
113
126
|
_createDataStoreWithProps(pkg: string | string[], props?: any, id?: string): Promise<IDataStore>;
|
|
114
127
|
/**
|
|
115
|
-
* Creates data store
|
|
116
|
-
* store
|
|
117
|
-
* (
|
|
118
|
-
*
|
|
128
|
+
* Creates a data store and returns an object that exposes a handle to the data store's entryPoint, and also serves
|
|
129
|
+
* as the data store's router. The data store is not bound to a container, and in such state is not persisted to
|
|
130
|
+
* storage (file). Storing the entryPoint handle (or any other handle inside the data store, e.g. for DDS) into an
|
|
131
|
+
* already attached DDS (or non-attached DDS that will eventually get attached to storage) will result in this
|
|
132
|
+
* store being attached to storage.
|
|
119
133
|
* @param pkg - Package name of the data store factory
|
|
120
134
|
*/
|
|
121
135
|
createDataStore(pkg: string | string[]): Promise<IDataStore>;
|
|
@@ -147,9 +161,9 @@ export declare enum BindState {
|
|
|
147
161
|
Bound = "Bound"
|
|
148
162
|
}
|
|
149
163
|
/**
|
|
150
|
-
* Minimal interface a data store runtime
|
|
164
|
+
* Minimal interface a data store runtime needs to provide for IFluidDataStoreContext to bind to control.
|
|
151
165
|
*
|
|
152
|
-
* Functionality include attach, snapshot, op/signal processing, request routes,
|
|
166
|
+
* Functionality include attach, snapshot, op/signal processing, request routes, expose an entryPoint,
|
|
153
167
|
* and connection state notifications
|
|
154
168
|
*/
|
|
155
169
|
export interface IFluidDataStoreChannel extends IFluidRouter, IDisposable {
|
|
@@ -222,6 +236,17 @@ export interface IFluidDataStoreChannel extends IFluidRouter, IDisposable {
|
|
|
222
236
|
* @param localOpMetadata - The local metadata associated with the original message.
|
|
223
237
|
*/
|
|
224
238
|
rollback?(type: string, content: any, localOpMetadata: unknown): void;
|
|
239
|
+
/**
|
|
240
|
+
* Exposes a handle to the root object / entryPoint of the component. Use this as the primary way of interacting
|
|
241
|
+
* with the component. If this property is undefined (meaning that exposing the entryPoint hasn't been implemented
|
|
242
|
+
* in a particular scenario) fall back to the current approach of requesting the root object through the request
|
|
243
|
+
* pattern.
|
|
244
|
+
*
|
|
245
|
+
* @remarks The plan is that eventually the component will stop providing IFluidRouter functionality, this property
|
|
246
|
+
* will become non-optional and return an IFluidHandle (no undefined) and will become the only way to access
|
|
247
|
+
* the component's entryPoint.
|
|
248
|
+
*/
|
|
249
|
+
readonly entryPoint?: IFluidHandle<FluidObject>;
|
|
225
250
|
}
|
|
226
251
|
export declare type CreateChildSummarizerNodeFn = (summarizeInternal: SummarizeInternalFn, getGCDataFn: (fullGC?: boolean) => Promise<IGarbageCollectionData>, getBaseGCDetailsFn: () => Promise<IGarbageCollectionDetailsBase>) => ISummarizerNodeWithGC;
|
|
227
252
|
export interface IFluidDataStoreContextEvents extends IEvent {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataStoreContext.d.ts","sourceRoot":"","sources":["../src/dataStoreContext.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAC/G,OAAO,EACH,YAAY,EACZ,0BAA0B,EAC1B,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,WAAW,EACd,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACH,SAAS,EACT,aAAa,EACb,WAAW,EACX,cAAc,EACjB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,EACH,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,yBAAyB,EACzB,aAAa,EAChB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAE,8BAA8B,EAAE,MAAM,qBAAqB,CAAC;AAC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;IACrB,gCAAmB,CAAA;IACnB,4BAAe,CAAA;AACnB,CAAC,EAJW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAIpB","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ITelemetryBaseLogger, IDisposable, IEvent, IEventProvider } from \"@fluidframework/common-definitions\";\nimport {\n IFluidRouter,\n IProvideFluidHandleContext,\n IFluidHandle,\n IRequest,\n IResponse,\n FluidObject,\n} from \"@fluidframework/core-interfaces\";\nimport {\n IAudience,\n IDeltaManager,\n AttachState,\n ILoaderOptions,\n} from \"@fluidframework/container-definitions\";\nimport { IDocumentStorageService } from \"@fluidframework/driver-definitions\";\nimport {\n IClientDetails,\n IDocumentMessage,\n IQuorumClients,\n ISequencedDocumentMessage,\n ISnapshotTree,\n} from \"@fluidframework/protocol-definitions\";\nimport { IProvideFluidDataStoreFactory } from \"./dataStoreFactory\";\nimport { IProvideFluidDataStoreRegistry } from \"./dataStoreRegistry\";\nimport {\n IGarbageCollectionData,\n IGarbageCollectionDetailsBase,\n} from \"./garbageCollection\";\nimport { IInboundSignalMessage } from \"./protocol\";\nimport {\n CreateChildSummarizerNodeParam,\n ISummarizerNodeWithGC,\n ISummaryTreeWithStats,\n ITelemetryContext,\n SummarizeInternalFn,\n} from \"./summary\";\n\n/**\n * Runtime flush mode handling\n */\nexport enum FlushMode {\n /**\n * In Immediate flush mode the runtime will immediately send all operations to the driver layer.\n */\n Immediate,\n\n /**\n * When in TurnBased flush mode the runtime will buffer operations in the current turn and send them as a single\n * batch at the end of the turn. The flush call on the runtime can be used to force send the current batch.\n */\n TurnBased,\n}\n\n/**\n * This tells the visibility state of a Fluid object. It basically tracks whether the object is not visible, visible\n * locally within the container only or visible globally to all clients.\n */\nexport const VisibilityState = {\n /** Indicates that the object is not visible. This is the state when an object is first created. */\n NotVisible: \"NotVisible\",\n\n /**\n * Indicates that the object is visible locally within the container. This is the state when an object is attached\n * to the container's graph but the container itself isn't globally visible. The object's state goes from not\n * visible to locally visible.\n */\n LocallyVisible: \"LocallyVisible\",\n\n /**\n * Indicates that the object is visible globally to all clients. This is the state of an object in 2 scenarios:\n *\n * 1. It is attached to the container's graph when the container is globally visible. The object's state goes from\n * not visible to globally visible.\n *\n * 2. When a container becomes globally visible, all locally visible objects go from locally visible to globally\n * visible.\n */\n GloballyVisible: \"GloballyVisible\",\n};\nexport type VisibilityState = typeof VisibilityState[keyof typeof VisibilityState];\n\nexport interface IContainerRuntimeBaseEvents extends IEvent{\n (event: \"batchBegin\", listener: (op: ISequencedDocumentMessage) => void);\n /**\n * @param runtimeMessage - tells if op is runtime op. If it is, it was unpacked, i.e. it's type and content\n * represent internal container runtime type / content.\n */\n (event: \"op\", listener: (op: ISequencedDocumentMessage, runtimeMessage?: boolean) => void);\n (event: \"batchEnd\", listener: (error: any, op: ISequencedDocumentMessage) => void);\n (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 a handle to it,\n * use the `IContainerRuntime.getRootDataStore` function. The current datastore should be discarded\n * and will be garbage collected. The current datastore cannot be aliased to a different value.\n * 'AlreadyAliased' - the datastore has already been previously bound to another alias name.\n */\nexport type AliasResult = \"Success\" | \"Conflict\" | \"AlreadyAliased\";\n\n/**\n * A fluid router with the capability of being assigned an alias\n */\nexport interface IDataStore extends IFluidRouter {\n /**\n * Attempt to assign an alias to the datastore.\n * If the operation succeeds, the datastore can be referenced\n * by the supplied alias and will not be garbage collected.\n *\n * @param alias - Given alias for this datastore.\n */\n trySetAlias(alias: string): Promise<AliasResult>;\n}\n\n/**\n * A reduced set of functionality of IContainerRuntime that a data store context/data store runtime will need\n * TODO: this should be merged into IFluidDataStoreContext\n */\nexport interface IContainerRuntimeBase extends\n IEventProvider<IContainerRuntimeBaseEvents>,\n IProvideFluidHandleContext {\n\n readonly logger: ITelemetryBaseLogger;\n readonly clientDetails: IClientDetails;\n\n /**\n * Invokes the given callback and guarantees that all operations generated within the callback will be ordered\n * sequentially. Total size of all messages must be less than maxOpSize.\n */\n orderSequentially(callback: () => void): void;\n\n /**\n * Executes a request against the container runtime\n */\n request(request: IRequest): Promise<IResponse>;\n\n /**\n * Submits a container runtime level signal to be sent to other clients.\n * @param type - Type of the signal.\n * @param content - Content of the signal.\n */\n submitSignal(type: string, content: any): void;\n\n /**\n * @deprecated 0.16 Issue #1537, #3631\n * @internal\n */\n _createDataStoreWithProps(\n pkg: string | string[],\n props?: any,\n id?: string,\n ): Promise<IDataStore>;\n\n /**\n * Creates data store. Returns router of data store. Data store is not bound to container,\n * store in such state is not persisted to storage (file). Storing a handle to this store\n * (or any of its parts, like DDS) into already attached DDS (or non-attached DDS that will eventually\n * gets attached to storage) will result in this store being attached to storage.\n * @param pkg - Package name of the data store factory\n */\n createDataStore(pkg: string | string[]): Promise<IDataStore>;\n\n /**\n * Creates detached data store context. Only after context.attachRuntime() is called,\n * data store initialization is considered complete.\n */\n createDetachedDataStore(pkg: Readonly<string[]>): IFluidDataStoreContextDetached;\n\n /**\n * Get an absolute url for a provided container-relative request.\n * Returns undefined if the container or data store isn't attached to storage.\n * @param relativeUrl - A relative request within the container\n */\n getAbsoluteUrl(relativeUrl: string): Promise<string | undefined>;\n\n uploadBlob(blob: ArrayBufferLike): Promise<IFluidHandle<ArrayBufferLike>>;\n\n /**\n * Returns the current quorum.\n */\n getQuorum(): IQuorumClients;\n\n /**\n * Returns the current audience.\n */\n getAudience(): IAudience;\n}\n\n/** @deprecated - Used only in deprecated API bindToContext */\nexport enum BindState {\n NotBound = \"NotBound\",\n Binding = \"Binding\",\n Bound = \"Bound\",\n}\n\n/**\n * Minimal interface a data store runtime need to provide for IFluidDataStoreContext to bind to control\n *\n * Functionality include attach, snapshot, op/signal processing, request routes,\n * and connection state notifications\n */\nexport interface IFluidDataStoreChannel extends\n IFluidRouter,\n IDisposable {\n\n readonly id: string;\n\n /**\n * Indicates the attachment state of the channel to a host service.\n */\n readonly attachState: AttachState;\n\n readonly visibilityState?: VisibilityState;\n\n /**\n * Runs through the graph and attaches the bound handles. Then binds this runtime to the container.\n * @deprecated This will be removed in favor of {@link IFluidDataStoreChannel.makeVisibleAndAttachGraph}.\n */\n attachGraph(): void;\n\n /**\n * Makes the data store channel visible in the container. Also, runs through its graph and attaches all\n * bound handles that represent its dependencies in the container's graph.\n */\n makeVisibleAndAttachGraph(): void;\n\n /**\n * Retrieves the summary used as part of the initial summary message\n */\n getAttachSummary(telemetryContext?: ITelemetryContext): ISummaryTreeWithStats;\n\n /**\n * Processes the op.\n */\n process(message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown): void;\n\n /**\n * Processes the signal.\n */\n processSignal(message: any, local: boolean): void;\n\n /**\n * Generates a summary for the channel.\n * Introduced with summarizerNode - will be required in a future release.\n * @param fullTree - true to bypass optimizations and force a full summary tree.\n * @param trackState - This tells whether we should track state from this summary.\n * @param telemetryContext - summary data passed through the layers for telemetry purposes\n */\n summarize(\n fullTree?: boolean,\n trackState?: boolean,\n telemetryContext?: ITelemetryContext,\n ): Promise<ISummaryTreeWithStats>;\n\n /**\n * Returns the data used for garbage collection. This includes a list of GC nodes that represent this context\n * including any of its children. Each node has a list of outbound routes to other GC nodes in the document.\n * @param fullGC - true to bypass optimizations and force full generation of GC data.\n */\n getGCData(fullGC?: boolean): Promise<IGarbageCollectionData>;\n\n /**\n * After GC has run, called to notify this channel of routes that are used in it.\n * @param usedRoutes - The routes that are used in this channel.\n */\n updateUsedRoutes(usedRoutes: string[]): void;\n\n /**\n * Notifies this object about changes in the connection state.\n * @param value - New connection state.\n * @param clientId - ID of the client. It's old ID when in disconnected state and\n * it's new client ID when we are connecting or connected.\n */\n setConnectionState(connected: boolean, clientId?: string);\n\n /**\n * Ask the DDS to resubmit a message. This could be because we reconnected and this message was not acked.\n * @param type - The type of the original message.\n * @param content - The content of the original message.\n * @param localOpMetadata - The local metadata associated with the original message.\n */\n reSubmit(type: string, content: any, localOpMetadata: unknown);\n\n applyStashedOp(content: any): Promise<unknown>;\n\n /**\n * Revert a local message.\n * @param type - The type of the original message.\n * @param content - The content of the original message.\n * @param localOpMetadata - The local metadata associated with the original message.\n */\n rollback?(type: string, content: any, localOpMetadata: unknown): void;\n}\n\nexport type CreateChildSummarizerNodeFn = (\n summarizeInternal: SummarizeInternalFn,\n getGCDataFn: (fullGC?: boolean) => Promise<IGarbageCollectionData>,\n getBaseGCDetailsFn: () => Promise<IGarbageCollectionDetailsBase>,\n) => ISummarizerNodeWithGC;\n\nexport interface IFluidDataStoreContextEvents extends IEvent {\n (event: \"attaching\" | \"attached\", listener: () => void);\n}\n\n/**\n * Represents the context for the data store. It is used by the data store runtime to\n * get information and call functionality to the container.\n */\nexport interface IFluidDataStoreContext extends\n IEventProvider<IFluidDataStoreContextEvents>,\n Partial<IProvideFluidDataStoreRegistry>,\n IProvideFluidHandleContext {\n readonly id: string;\n /**\n * A data store created by a client, is a local data store for that client. Also, when a detached container loads\n * from a snapshot, all the data stores are treated as local data stores because at that stage the container\n * still doesn't exists in storage and so the data store couldn't have been created by any other client.\n * Value of this never changes even after the data store is attached.\n * As implementer of data store runtime, you can use this property to check that this data store belongs to this\n * client and hence implement any scenario based on that.\n */\n readonly isLocalDataStore: boolean;\n /**\n * The package path of the data store as per the package factory.\n */\n readonly packagePath: readonly string[];\n readonly options: ILoaderOptions;\n readonly clientId: string | undefined;\n readonly connected: boolean;\n readonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;\n readonly storage: IDocumentStorageService;\n readonly baseSnapshot: ISnapshotTree | undefined;\n readonly logger: ITelemetryBaseLogger;\n readonly clientDetails: IClientDetails;\n /**\n * Indicates the attachment state of the data store to a host service.\n */\n readonly attachState: AttachState;\n\n readonly containerRuntime: IContainerRuntimeBase;\n\n /**\n * @deprecated 0.16 Issue #1635, #3631\n */\n readonly createProps?: any;\n\n /**\n * Ambient services provided with the context\n */\n readonly scope: FluidObject;\n\n /**\n * Returns the current quorum.\n */\n getQuorum(): IQuorumClients;\n\n /**\n * Returns the current audience.\n */\n getAudience(): IAudience;\n\n /**\n * Submits the message to be sent to other clients.\n * @param type - Type of the message.\n * @param content - Content of the message.\n * @param localOpMetadata - The local metadata associated with the message. This is kept locally and not sent to\n * the server. This will be sent back when this message is received back from the server. This is also sent if\n * we are asked to resubmit the message.\n */\n submitMessage(type: string, content: any, localOpMetadata: unknown): void;\n\n /**\n * Submits the signal to be sent to other clients.\n * @param type - Type of the signal.\n * @param content - Content of the signal.\n */\n submitSignal(type: string, content: any): void;\n\n /**\n * @deprecated - To be removed in favor of makeVisible.\n * Register the runtime to the container\n */\n bindToContext(): void;\n\n /**\n * Called to make the data store locally visible in the container. This happens automatically for root data stores\n * when they are marked as root. For non-root data stores, this happens when their handle is added to a visible DDS.\n */\n makeLocallyVisible(): void;\n\n /**\n * Call by IFluidDataStoreChannel, indicates that a channel is dirty and needs to be part of the summary.\n * @param address - The address of the channel that is dirty.\n */\n setChannelDirty(address: string): void;\n\n /**\n * Get an absolute url to the container based on the provided relativeUrl.\n * Returns undefined if the container or data store isn't attached to storage.\n * @param relativeUrl - A relative request within the container\n */\n getAbsoluteUrl(relativeUrl: string): Promise<string | undefined>;\n\n getCreateChildSummarizerNodeFn(\n /** Initial id or path part of this node */\n id: string,\n /**\n * Information needed to create the node.\n * If it is from a base summary, it will assert that a summary has been seen.\n * Attach information if it is created from an attach op.\n * If it is local, it will throw unsupported errors on calls to summarize.\n */\n createParam: CreateChildSummarizerNodeParam,\n ): CreateChildSummarizerNodeFn;\n\n uploadBlob(blob: ArrayBufferLike): Promise<IFluidHandle<ArrayBufferLike>>;\n\n /**\n * Returns the GC details in the initial summary of this data store. This is used to initialize the data store\n * and its children with the GC details from the previous summary.\n */\n getBaseGCDetails(): Promise<IGarbageCollectionDetailsBase>;\n\n /**\n * Called when a new outbound reference is added to another node. This is used by garbage collection to identify\n * all references added in the system.\n * @param srcHandle - The handle of the node that added the reference.\n * @param outboundHandle - The handle of the outbound node that is referenced.\n */\n addedGCOutboundReference?(srcHandle: IFluidHandle, outboundHandle: IFluidHandle): void;\n}\n\nexport interface IFluidDataStoreContextDetached extends IFluidDataStoreContext {\n /**\n * Binds a runtime to the context.\n */\n attachRuntime(\n factory: IProvideFluidDataStoreFactory,\n dataStoreRuntime: IFluidDataStoreChannel,\n ): Promise<void>;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"dataStoreContext.js","sourceRoot":"","sources":["../src/dataStoreContext.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAwCH;;GAEG;AACH,IAAY,SAWX;AAXD,WAAY,SAAS;IACjB;;OAEG;IACH,mDAAS,CAAA;IAET;;;OAGG;IACH,mDAAS,CAAA;AACb,CAAC,EAXW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAWpB;AAED;;;GAGG;AACU,QAAA,eAAe,GAAG;IAC3B,mGAAmG;IACnG,UAAU,EAAE,YAAY;IAExB;;;;OAIG;IACH,cAAc,EAAE,gBAAgB;IAEhC;;;;;;;;OAQG;IACH,eAAe,EAAE,iBAAiB;CACrC,CAAC;AAgIF,8DAA8D;AAC9D,IAAY,SAIX;AAJD,WAAY,SAAS;IACjB,kCAAqB,CAAA;IACrB,gCAAmB,CAAA;IACnB,4BAAe,CAAA;AACnB,CAAC,EAJW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAIpB","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ITelemetryBaseLogger, IDisposable, IEvent, IEventProvider } from \"@fluidframework/common-definitions\";\nimport {\n IFluidRouter,\n IProvideFluidHandleContext,\n IFluidHandle,\n IRequest,\n IResponse,\n FluidObject,\n} from \"@fluidframework/core-interfaces\";\nimport {\n IAudience,\n IDeltaManager,\n AttachState,\n ILoaderOptions,\n} from \"@fluidframework/container-definitions\";\nimport { IDocumentStorageService } from \"@fluidframework/driver-definitions\";\nimport {\n IClientDetails,\n IDocumentMessage,\n IQuorumClients,\n ISequencedDocumentMessage,\n ISnapshotTree,\n} from \"@fluidframework/protocol-definitions\";\nimport { IProvideFluidDataStoreFactory } from \"./dataStoreFactory\";\nimport { IProvideFluidDataStoreRegistry } from \"./dataStoreRegistry\";\nimport {\n IGarbageCollectionData,\n IGarbageCollectionDetailsBase,\n} from \"./garbageCollection\";\nimport { IInboundSignalMessage } from \"./protocol\";\nimport {\n CreateChildSummarizerNodeParam,\n ISummarizerNodeWithGC,\n ISummaryTreeWithStats,\n ITelemetryContext,\n SummarizeInternalFn,\n} from \"./summary\";\n\n/**\n * Runtime flush mode handling\n */\nexport enum FlushMode {\n /**\n * In Immediate flush mode the runtime will immediately send all operations to the driver layer.\n */\n Immediate,\n\n /**\n * When in TurnBased flush mode the runtime will buffer operations in the current turn and send them as a single\n * batch at the end of the turn. The flush call on the runtime can be used to force send the current batch.\n */\n TurnBased,\n}\n\n/**\n * This tells the visibility state of a Fluid object. It basically tracks whether the object is not visible, visible\n * locally within the container only or visible globally to all clients.\n */\nexport const VisibilityState = {\n /** Indicates that the object is not visible. This is the state when an object is first created. */\n NotVisible: \"NotVisible\",\n\n /**\n * Indicates that the object is visible locally within the container. This is the state when an object is attached\n * to the container's graph but the container itself isn't globally visible. The object's state goes from not\n * visible to locally visible.\n */\n LocallyVisible: \"LocallyVisible\",\n\n /**\n * Indicates that the object is visible globally to all clients. This is the state of an object in 2 scenarios:\n *\n * 1. It is attached to the container's graph when the container is globally visible. The object's state goes from\n * not visible to globally visible.\n *\n * 2. When a container becomes globally visible, all locally visible objects go from locally visible to globally\n * visible.\n */\n GloballyVisible: \"GloballyVisible\",\n};\nexport type VisibilityState = typeof VisibilityState[keyof typeof VisibilityState];\n\nexport interface IContainerRuntimeBaseEvents extends IEvent{\n (event: \"batchBegin\", listener: (op: ISequencedDocumentMessage) => void);\n /**\n * @param runtimeMessage - tells if op is runtime op. If it is, it was unpacked, i.e. it's type and content\n * represent internal container runtime type / content.\n */\n (event: \"op\", listener: (op: ISequencedDocumentMessage, runtimeMessage?: boolean) => void);\n (event: \"batchEnd\", listener: (error: any, op: ISequencedDocumentMessage) => void);\n (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 a handle to it,\n * use the `IContainerRuntime.getRootDataStore` function. The current datastore should be discarded\n * and will be garbage collected. The current datastore cannot be aliased to a different value.\n * 'AlreadyAliased' - the datastore has already been previously bound to another alias name.\n */\nexport type AliasResult = \"Success\" | \"Conflict\" | \"AlreadyAliased\";\n\n/**\n * Exposes some functionality/features of a data store:\n * - Handle to the data store's entryPoint\n * - Fluid router for the data store\n * - Can be assigned an alias\n */\nexport interface IDataStore extends IFluidRouter {\n /**\n * Attempt to assign an alias to the datastore.\n * If the operation succeeds, the datastore can be referenced\n * by the supplied alias and will not be garbage collected.\n *\n * @param alias - Given alias for this datastore.\n */\n trySetAlias(alias: string): Promise<AliasResult>;\n\n /**\n * Exposes a handle to the root object / entryPoint of the data store. Use this as the primary way of interacting\n * with it. If this property is undefined (meaning that exposing the entryPoint hasn't been implemented in a\n * particular scenario) fall back to the current approach of requesting the root object through the request pattern.\n *\n * @remarks The plan is that eventually the data store will stop providing IFluidRouter functionality, this property\n * will become non-optional and return an IFluidHandle (no undefined) and will become the only way to access\n * the data store's entryPoint.\n */\n readonly 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 */\nexport interface IContainerRuntimeBase extends\n IEventProvider<IContainerRuntimeBaseEvents>,\n IProvideFluidHandleContext {\n\n readonly logger: ITelemetryBaseLogger;\n readonly clientDetails: IClientDetails;\n\n /**\n * Invokes the given callback and guarantees that all operations generated within the callback will be ordered\n * sequentially. Total size of all messages must be less than maxOpSize.\n */\n orderSequentially(callback: () => void): void;\n\n /**\n * Executes a request against the container runtime\n */\n request(request: IRequest): Promise<IResponse>;\n\n /**\n * Submits a container runtime level signal to be sent to other clients.\n * @param type - Type of the signal.\n * @param content - Content of the signal.\n */\n submitSignal(type: string, content: any): void;\n\n /**\n * @deprecated 0.16 Issue #1537, #3631\n * @internal\n */\n _createDataStoreWithProps(\n pkg: string | string[],\n props?: any,\n id?: string,\n ): Promise<IDataStore>;\n\n /**\n * Creates a data store and returns an object that exposes a handle to the data store's entryPoint, and also serves\n * as the data store's router. The data store is not bound to a container, and in such state is not persisted to\n * storage (file). Storing the entryPoint handle (or any other handle inside the data store, e.g. for DDS) into an\n * already attached DDS (or non-attached DDS that will eventually get attached to storage) will result in this\n * store being attached to storage.\n * @param pkg - Package name of the data store factory\n */\n createDataStore(pkg: string | string[]): Promise<IDataStore>;\n\n /**\n * Creates detached data store context. Only after context.attachRuntime() is called,\n * data store initialization is considered complete.\n */\n createDetachedDataStore(pkg: Readonly<string[]>): IFluidDataStoreContextDetached;\n\n /**\n * Get an absolute url for a provided container-relative request.\n * Returns undefined if the container or data store isn't attached to storage.\n * @param relativeUrl - A relative request within the container\n */\n getAbsoluteUrl(relativeUrl: string): Promise<string | undefined>;\n\n uploadBlob(blob: ArrayBufferLike): Promise<IFluidHandle<ArrayBufferLike>>;\n\n /**\n * Returns the current quorum.\n */\n getQuorum(): IQuorumClients;\n\n /**\n * Returns the current audience.\n */\n getAudience(): IAudience;\n}\n\n/** @deprecated - Used only in deprecated API bindToContext */\nexport enum BindState {\n NotBound = \"NotBound\",\n Binding = \"Binding\",\n Bound = \"Bound\",\n}\n\n/**\n * Minimal interface a data store runtime needs to provide for IFluidDataStoreContext to bind to control.\n *\n * Functionality include attach, snapshot, op/signal processing, request routes, expose an entryPoint,\n * and connection state notifications\n */\nexport interface IFluidDataStoreChannel extends\n IFluidRouter,\n IDisposable {\n\n readonly id: string;\n\n /**\n * Indicates the attachment state of the channel to a host service.\n */\n readonly attachState: AttachState;\n\n readonly visibilityState?: VisibilityState;\n\n /**\n * Runs through the graph and attaches the bound handles. Then binds this runtime to the container.\n * @deprecated This will be removed in favor of {@link IFluidDataStoreChannel.makeVisibleAndAttachGraph}.\n */\n attachGraph(): void;\n\n /**\n * Makes the data store channel visible in the container. Also, runs through its graph and attaches all\n * bound handles that represent its dependencies in the container's graph.\n */\n makeVisibleAndAttachGraph(): void;\n\n /**\n * Retrieves the summary used as part of the initial summary message\n */\n getAttachSummary(telemetryContext?: ITelemetryContext): ISummaryTreeWithStats;\n\n /**\n * Processes the op.\n */\n process(message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown): void;\n\n /**\n * Processes the signal.\n */\n processSignal(message: any, local: boolean): void;\n\n /**\n * Generates a summary for the channel.\n * Introduced with summarizerNode - will be required in a future release.\n * @param fullTree - true to bypass optimizations and force a full summary tree.\n * @param trackState - This tells whether we should track state from this summary.\n * @param telemetryContext - summary data passed through the layers for telemetry purposes\n */\n summarize(\n fullTree?: boolean,\n trackState?: boolean,\n telemetryContext?: ITelemetryContext,\n ): Promise<ISummaryTreeWithStats>;\n\n /**\n * Returns the data used for garbage collection. This includes a list of GC nodes that represent this context\n * including any of its children. Each node has a list of outbound routes to other GC nodes in the document.\n * @param fullGC - true to bypass optimizations and force full generation of GC data.\n */\n getGCData(fullGC?: boolean): Promise<IGarbageCollectionData>;\n\n /**\n * After GC has run, called to notify this channel of routes that are used in it.\n * @param usedRoutes - The routes that are used in this channel.\n */\n updateUsedRoutes(usedRoutes: string[]): void;\n\n /**\n * Notifies this object about changes in the connection state.\n * @param value - New connection state.\n * @param clientId - ID of the client. It's old ID when in disconnected state and\n * it's new client ID when we are connecting or connected.\n */\n setConnectionState(connected: boolean, clientId?: string);\n\n /**\n * Ask the DDS to resubmit a message. This could be because we reconnected and this message was not acked.\n * @param type - The type of the original message.\n * @param content - The content of the original message.\n * @param localOpMetadata - The local metadata associated with the original message.\n */\n reSubmit(type: string, content: any, localOpMetadata: unknown);\n\n applyStashedOp(content: any): Promise<unknown>;\n\n /**\n * Revert a local message.\n * @param type - The type of the original message.\n * @param content - The content of the original message.\n * @param localOpMetadata - The local metadata associated with the original message.\n */\n rollback?(type: string, content: any, localOpMetadata: unknown): void;\n\n /**\n * Exposes a handle to the root object / entryPoint of the component. Use this as the primary way of interacting\n * with the component. If this property is undefined (meaning that exposing the entryPoint hasn't been implemented\n * in a particular scenario) fall back to the current approach of requesting the root object through the request\n * pattern.\n *\n * @remarks The plan is that eventually the component will stop providing IFluidRouter functionality, this property\n * will become non-optional and return an IFluidHandle (no undefined) and will become the only way to access\n * the component's entryPoint.\n */\n readonly entryPoint?: IFluidHandle<FluidObject>;\n}\n\nexport type CreateChildSummarizerNodeFn = (\n summarizeInternal: SummarizeInternalFn,\n getGCDataFn: (fullGC?: boolean) => Promise<IGarbageCollectionData>,\n getBaseGCDetailsFn: () => Promise<IGarbageCollectionDetailsBase>,\n) => ISummarizerNodeWithGC;\n\nexport interface IFluidDataStoreContextEvents extends IEvent {\n (event: \"attaching\" | \"attached\", listener: () => void);\n}\n\n/**\n * Represents the context for the data store. It is used by the data store runtime to\n * get information and call functionality to the container.\n */\nexport interface IFluidDataStoreContext extends\n IEventProvider<IFluidDataStoreContextEvents>,\n Partial<IProvideFluidDataStoreRegistry>,\n IProvideFluidHandleContext {\n readonly id: string;\n /**\n * A data store created by a client, is a local data store for that client. Also, when a detached container loads\n * from a snapshot, all the data stores are treated as local data stores because at that stage the container\n * still doesn't exists in storage and so the data store couldn't have been created by any other client.\n * Value of this never changes even after the data store is attached.\n * As implementer of data store runtime, you can use this property to check that this data store belongs to this\n * client and hence implement any scenario based on that.\n */\n readonly isLocalDataStore: boolean;\n /**\n * The package path of the data store as per the package factory.\n */\n readonly packagePath: readonly string[];\n readonly options: ILoaderOptions;\n readonly clientId: string | undefined;\n readonly connected: boolean;\n readonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;\n readonly storage: IDocumentStorageService;\n readonly baseSnapshot: ISnapshotTree | undefined;\n readonly logger: ITelemetryBaseLogger;\n readonly clientDetails: IClientDetails;\n /**\n * Indicates the attachment state of the data store to a host service.\n */\n readonly attachState: AttachState;\n\n readonly containerRuntime: IContainerRuntimeBase;\n\n /**\n * @deprecated 0.16 Issue #1635, #3631\n */\n readonly createProps?: any;\n\n /**\n * Ambient services provided with the context\n */\n readonly scope: FluidObject;\n\n /**\n * Returns the current quorum.\n */\n getQuorum(): IQuorumClients;\n\n /**\n * Returns the current audience.\n */\n getAudience(): IAudience;\n\n /**\n * Submits the message to be sent to other clients.\n * @param type - Type of the message.\n * @param content - Content of the message.\n * @param localOpMetadata - The local metadata associated with the message. This is kept locally and not sent to\n * the server. This will be sent back when this message is received back from the server. This is also sent if\n * we are asked to resubmit the message.\n */\n submitMessage(type: string, content: any, localOpMetadata: unknown): void;\n\n /**\n * Submits the signal to be sent to other clients.\n * @param type - Type of the signal.\n * @param content - Content of the signal.\n */\n submitSignal(type: string, content: any): void;\n\n /**\n * @deprecated - To be removed in favor of makeVisible.\n * Register the runtime to the container\n */\n bindToContext(): void;\n\n /**\n * Called to make the data store locally visible in the container. This happens automatically for root data stores\n * when they are marked as root. For non-root data stores, this happens when their handle is added to a visible DDS.\n */\n makeLocallyVisible(): void;\n\n /**\n * Call by IFluidDataStoreChannel, indicates that a channel is dirty and needs to be part of the summary.\n * @param address - The address of the channel that is dirty.\n */\n setChannelDirty(address: string): void;\n\n /**\n * Get an absolute url to the container based on the provided relativeUrl.\n * Returns undefined if the container or data store isn't attached to storage.\n * @param relativeUrl - A relative request within the container\n */\n getAbsoluteUrl(relativeUrl: string): Promise<string | undefined>;\n\n getCreateChildSummarizerNodeFn(\n /** Initial id or path part of this node */\n id: string,\n /**\n * Information needed to create the node.\n * If it is from a base summary, it will assert that a summary has been seen.\n * Attach information if it is created from an attach op.\n * If it is local, it will throw unsupported errors on calls to summarize.\n */\n createParam: CreateChildSummarizerNodeParam,\n ): CreateChildSummarizerNodeFn;\n\n uploadBlob(blob: ArrayBufferLike): Promise<IFluidHandle<ArrayBufferLike>>;\n\n /**\n * Returns the GC details in the initial summary of this data store. This is used to initialize the data store\n * and its children with the GC details from the previous summary.\n */\n getBaseGCDetails(): Promise<IGarbageCollectionDetailsBase>;\n\n /**\n * Called when a new outbound reference is added to another node. This is used by garbage collection to identify\n * all references added in the system.\n * @param srcHandle - The handle of the node that added the reference.\n * @param outboundHandle - The handle of the outbound node that is referenced.\n */\n addedGCOutboundReference?(srcHandle: IFluidHandle, outboundHandle: IFluidHandle): void;\n}\n\nexport interface IFluidDataStoreContextDetached extends IFluidDataStoreContext {\n /**\n * Binds a runtime to the context.\n */\n attachRuntime(\n factory: IProvideFluidDataStoreFactory,\n dataStoreRuntime: IFluidDataStoreChannel,\n ): Promise<void>;\n}\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
5
|
+
export { AliasResult, BindState, CreateChildSummarizerNodeFn, FlushMode, IContainerRuntimeBase, IContainerRuntimeBaseEvents, IDataStore, IFluidDataStoreChannel, IFluidDataStoreContext, IFluidDataStoreContextDetached, IFluidDataStoreContextEvents, VisibilityState, } from "./dataStoreContext";
|
|
6
|
+
export { IFluidDataStoreFactory, IProvideFluidDataStoreFactory } from "./dataStoreFactory";
|
|
7
|
+
export { FluidDataStoreRegistryEntry, IFluidDataStoreRegistry, IProvideFluidDataStoreRegistry, NamedFluidDataStoreRegistryEntries, NamedFluidDataStoreRegistryEntry, } from "./dataStoreRegistry";
|
|
8
|
+
export { gcBlobKey, IGarbageCollectionData, IGarbageCollectionDetailsBase } from "./garbageCollection";
|
|
9
|
+
export { IAttachMessage, IEnvelope, IInboundSignalMessage, InboundAttachMessage, ISignalEnvelope } from "./protocol";
|
|
10
|
+
export { blobCountPropertyName, channelsTreeName, CreateChildSummarizerNodeParam, CreateSummarizerNodeSource, IGarbageCollectionNodeData, IGarbageCollectionState, ISummarizeInternalResult, ISummarizeResult, ISummarizerNode, ISummarizerNodeConfig, ISummarizerNodeConfigWithGC, ISummarizerNodeWithGC, ISummaryStats, ISummaryTreeWithStats, ITelemetryContext, SummarizeInternalFn, totalBlobSizePropertyName, } from "./summary";
|
|
11
11
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,WAAW,EACX,SAAS,EACT,2BAA2B,EAC3B,SAAS,EACT,qBAAqB,EACrB,2BAA2B,EAC3B,UAAU,EACV,sBAAsB,EACtB,sBAAsB,EACtB,8BAA8B,EAC9B,4BAA4B,EAC5B,eAAe,GACf,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,sBAAsB,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AAC3F,OAAO,EACN,2BAA2B,EAC3B,uBAAuB,EACvB,8BAA8B,EAC9B,kCAAkC,EAClC,gCAAgC,GAChC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,sBAAsB,EAAE,6BAA6B,EAAE,MAAM,qBAAqB,CAAC;AACvG,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AACrH,OAAO,EACN,qBAAqB,EACrB,gBAAgB,EAChB,8BAA8B,EAC9B,0BAA0B,EAC1B,0BAA0B,EAC1B,uBAAuB,EACvB,wBAAwB,EACxB,gBAAgB,EAChB,eAAe,EACf,qBAAqB,EACrB,2BAA2B,EAC3B,qBAAqB,EACrB,aAAa,EACb,qBAAqB,EACrB,iBAAiB,EACjB,mBAAmB,EACnB,yBAAyB,GACzB,MAAM,WAAW,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -3,21 +3,21 @@
|
|
|
3
3
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
-
if (k2 === undefined) k2 = k;
|
|
8
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
7
|
+
exports.totalBlobSizePropertyName = exports.CreateSummarizerNodeSource = exports.channelsTreeName = exports.blobCountPropertyName = exports.gcBlobKey = exports.IFluidDataStoreRegistry = exports.IFluidDataStoreFactory = exports.VisibilityState = exports.FlushMode = exports.BindState = void 0;
|
|
8
|
+
var dataStoreContext_1 = require("./dataStoreContext");
|
|
9
|
+
Object.defineProperty(exports, "BindState", { enumerable: true, get: function () { return dataStoreContext_1.BindState; } });
|
|
10
|
+
Object.defineProperty(exports, "FlushMode", { enumerable: true, get: function () { return dataStoreContext_1.FlushMode; } });
|
|
11
|
+
Object.defineProperty(exports, "VisibilityState", { enumerable: true, get: function () { return dataStoreContext_1.VisibilityState; } });
|
|
12
|
+
var dataStoreFactory_1 = require("./dataStoreFactory");
|
|
13
|
+
Object.defineProperty(exports, "IFluidDataStoreFactory", { enumerable: true, get: function () { return dataStoreFactory_1.IFluidDataStoreFactory; } });
|
|
14
|
+
var dataStoreRegistry_1 = require("./dataStoreRegistry");
|
|
15
|
+
Object.defineProperty(exports, "IFluidDataStoreRegistry", { enumerable: true, get: function () { return dataStoreRegistry_1.IFluidDataStoreRegistry; } });
|
|
16
|
+
var garbageCollection_1 = require("./garbageCollection");
|
|
17
|
+
Object.defineProperty(exports, "gcBlobKey", { enumerable: true, get: function () { return garbageCollection_1.gcBlobKey; } });
|
|
18
|
+
var summary_1 = require("./summary");
|
|
19
|
+
Object.defineProperty(exports, "blobCountPropertyName", { enumerable: true, get: function () { return summary_1.blobCountPropertyName; } });
|
|
20
|
+
Object.defineProperty(exports, "channelsTreeName", { enumerable: true, get: function () { return summary_1.channelsTreeName; } });
|
|
21
|
+
Object.defineProperty(exports, "CreateSummarizerNodeSource", { enumerable: true, get: function () { return summary_1.CreateSummarizerNodeSource; } });
|
|
22
|
+
Object.defineProperty(exports, "totalBlobSizePropertyName", { enumerable: true, get: function () { return summary_1.totalBlobSizePropertyName; } });
|
|
23
23
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,uDAa4B;AAX3B,6GAAA,SAAS,OAAA;AAET,6GAAA,SAAS,OAAA;AAQT,mHAAA,eAAe,OAAA;AAEhB,uDAA2F;AAAlF,0HAAA,sBAAsB,OAAA;AAC/B,yDAM6B;AAJ5B,4HAAA,uBAAuB,OAAA;AAKxB,yDAAuG;AAA9F,8GAAA,SAAS,OAAA;AAElB,qCAkBmB;AAjBlB,gHAAA,qBAAqB,OAAA;AACrB,2GAAA,gBAAgB,OAAA;AAEhB,qHAAA,0BAA0B,OAAA;AAa1B,oHAAA,yBAAyB,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tAliasResult,\n\tBindState,\n\tCreateChildSummarizerNodeFn,\n\tFlushMode,\n\tIContainerRuntimeBase,\n\tIContainerRuntimeBaseEvents,\n\tIDataStore,\n\tIFluidDataStoreChannel,\n\tIFluidDataStoreContext,\n\tIFluidDataStoreContextDetached,\n\tIFluidDataStoreContextEvents,\n\tVisibilityState,\n} from \"./dataStoreContext\";\nexport { IFluidDataStoreFactory, IProvideFluidDataStoreFactory } from \"./dataStoreFactory\";\nexport {\n\tFluidDataStoreRegistryEntry,\n\tIFluidDataStoreRegistry,\n\tIProvideFluidDataStoreRegistry,\n\tNamedFluidDataStoreRegistryEntries,\n\tNamedFluidDataStoreRegistryEntry,\n} from \"./dataStoreRegistry\";\nexport { gcBlobKey, IGarbageCollectionData, IGarbageCollectionDetailsBase } from \"./garbageCollection\";\nexport { IAttachMessage, IEnvelope, IInboundSignalMessage, InboundAttachMessage, ISignalEnvelope } from \"./protocol\";\nexport {\n\tblobCountPropertyName,\n\tchannelsTreeName,\n\tCreateChildSummarizerNodeParam,\n\tCreateSummarizerNodeSource,\n\tIGarbageCollectionNodeData,\n\tIGarbageCollectionState,\n\tISummarizeInternalResult,\n\tISummarizeResult,\n\tISummarizerNode,\n\tISummarizerNodeConfig,\n\tISummarizerNodeConfigWithGC,\n\tISummarizerNodeWithGC,\n\tISummaryStats,\n\tISummaryTreeWithStats,\n\tITelemetryContext,\n\tSummarizeInternalFn,\n\ttotalBlobSizePropertyName,\n} from \"./summary\";\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/runtime-definitions",
|
|
3
|
-
"version": "2.0.0-internal.2.0
|
|
3
|
+
"version": "2.0.0-internal.2.1.0",
|
|
4
4
|
"description": "Fluid Runtime definitions",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -27,23 +27,22 @@
|
|
|
27
27
|
"lint": "npm run eslint",
|
|
28
28
|
"lint:fix": "npm run eslint:fix",
|
|
29
29
|
"tsc": "tsc",
|
|
30
|
-
"tsfmt": "tsfmt --verify",
|
|
31
|
-
"tsfmt:fix": "tsfmt --replace",
|
|
32
30
|
"typetests:gen": "fluid-type-validator -g -d ."
|
|
33
31
|
},
|
|
34
32
|
"dependencies": {
|
|
35
33
|
"@fluidframework/common-definitions": "^0.20.1",
|
|
36
34
|
"@fluidframework/common-utils": "^1.0.0",
|
|
37
|
-
"@fluidframework/container-definitions": ">=2.0.0-internal.2.0
|
|
38
|
-
"@fluidframework/core-interfaces": ">=2.0.0-internal.2.0
|
|
39
|
-
"@fluidframework/driver-definitions": ">=2.0.0-internal.2.0
|
|
35
|
+
"@fluidframework/container-definitions": ">=2.0.0-internal.2.1.0 <2.0.0-internal.3.0.0",
|
|
36
|
+
"@fluidframework/core-interfaces": ">=2.0.0-internal.2.1.0 <2.0.0-internal.3.0.0",
|
|
37
|
+
"@fluidframework/driver-definitions": ">=2.0.0-internal.2.1.0 <2.0.0-internal.3.0.0",
|
|
40
38
|
"@fluidframework/protocol-definitions": "^1.1.0",
|
|
41
39
|
"@types/node": "^14.18.0"
|
|
42
40
|
},
|
|
43
41
|
"devDependencies": {
|
|
44
|
-
"@
|
|
45
|
-
"@fluidframework/build-
|
|
46
|
-
"@fluidframework/
|
|
42
|
+
"@fluid-tools/build-cli": "^0.5.0",
|
|
43
|
+
"@fluidframework/build-common": "^1.1.0",
|
|
44
|
+
"@fluidframework/build-tools": "^0.5.0",
|
|
45
|
+
"@fluidframework/eslint-config-fluid": "^1.1.0",
|
|
47
46
|
"@fluidframework/runtime-definitions-previous": "npm:@fluidframework/runtime-definitions@2.0.0-internal.2.0.0",
|
|
48
47
|
"@microsoft/api-extractor": "^7.22.2",
|
|
49
48
|
"@rushstack/eslint-config": "^2.5.1",
|
|
@@ -51,11 +50,10 @@
|
|
|
51
50
|
"copyfiles": "^2.4.1",
|
|
52
51
|
"eslint": "~8.6.0",
|
|
53
52
|
"rimraf": "^2.6.2",
|
|
54
|
-
"typescript": "~4.5.5"
|
|
55
|
-
"typescript-formatter": "7.1.0"
|
|
53
|
+
"typescript": "~4.5.5"
|
|
56
54
|
},
|
|
57
55
|
"typeValidation": {
|
|
58
|
-
"version": "2.0.0-internal.2.0
|
|
56
|
+
"version": "2.0.0-internal.2.1.0",
|
|
59
57
|
"broken": {}
|
|
60
58
|
}
|
|
61
59
|
}
|
package/src/dataStoreContext.ts
CHANGED
|
@@ -108,7 +108,10 @@ export interface IContainerRuntimeBaseEvents extends IEvent{
|
|
|
108
108
|
export type AliasResult = "Success" | "Conflict" | "AlreadyAliased";
|
|
109
109
|
|
|
110
110
|
/**
|
|
111
|
-
*
|
|
111
|
+
* Exposes some functionality/features of a data store:
|
|
112
|
+
* - Handle to the data store's entryPoint
|
|
113
|
+
* - Fluid router for the data store
|
|
114
|
+
* - Can be assigned an alias
|
|
112
115
|
*/
|
|
113
116
|
export interface IDataStore extends IFluidRouter {
|
|
114
117
|
/**
|
|
@@ -119,6 +122,17 @@ export interface IDataStore extends IFluidRouter {
|
|
|
119
122
|
* @param alias - Given alias for this datastore.
|
|
120
123
|
*/
|
|
121
124
|
trySetAlias(alias: string): Promise<AliasResult>;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Exposes a handle to the root object / entryPoint of the data store. Use this as the primary way of interacting
|
|
128
|
+
* with it. If this property is undefined (meaning that exposing the entryPoint hasn't been implemented in a
|
|
129
|
+
* particular scenario) fall back to the current approach of requesting the root object through the request pattern.
|
|
130
|
+
*
|
|
131
|
+
* @remarks The plan is that eventually the data store will stop providing IFluidRouter functionality, this property
|
|
132
|
+
* will become non-optional and return an IFluidHandle (no undefined) and will become the only way to access
|
|
133
|
+
* the data store's entryPoint.
|
|
134
|
+
*/
|
|
135
|
+
readonly entryPoint?: IFluidHandle<FluidObject>;
|
|
122
136
|
}
|
|
123
137
|
|
|
124
138
|
/**
|
|
@@ -161,10 +175,11 @@ export interface IContainerRuntimeBase extends
|
|
|
161
175
|
): Promise<IDataStore>;
|
|
162
176
|
|
|
163
177
|
/**
|
|
164
|
-
* Creates data store
|
|
165
|
-
* store
|
|
166
|
-
* (
|
|
167
|
-
*
|
|
178
|
+
* Creates a data store and returns an object that exposes a handle to the data store's entryPoint, and also serves
|
|
179
|
+
* as the data store's router. The data store is not bound to a container, and in such state is not persisted to
|
|
180
|
+
* storage (file). Storing the entryPoint handle (or any other handle inside the data store, e.g. for DDS) into an
|
|
181
|
+
* already attached DDS (or non-attached DDS that will eventually get attached to storage) will result in this
|
|
182
|
+
* store being attached to storage.
|
|
168
183
|
* @param pkg - Package name of the data store factory
|
|
169
184
|
*/
|
|
170
185
|
createDataStore(pkg: string | string[]): Promise<IDataStore>;
|
|
@@ -203,9 +218,9 @@ export enum BindState {
|
|
|
203
218
|
}
|
|
204
219
|
|
|
205
220
|
/**
|
|
206
|
-
* Minimal interface a data store runtime
|
|
221
|
+
* Minimal interface a data store runtime needs to provide for IFluidDataStoreContext to bind to control.
|
|
207
222
|
*
|
|
208
|
-
* Functionality include attach, snapshot, op/signal processing, request routes,
|
|
223
|
+
* Functionality include attach, snapshot, op/signal processing, request routes, expose an entryPoint,
|
|
209
224
|
* and connection state notifications
|
|
210
225
|
*/
|
|
211
226
|
export interface IFluidDataStoreChannel extends
|
|
@@ -299,6 +314,18 @@ export interface IFluidDataStoreChannel extends
|
|
|
299
314
|
* @param localOpMetadata - The local metadata associated with the original message.
|
|
300
315
|
*/
|
|
301
316
|
rollback?(type: string, content: any, localOpMetadata: unknown): void;
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* Exposes a handle to the root object / entryPoint of the component. Use this as the primary way of interacting
|
|
320
|
+
* with the component. If this property is undefined (meaning that exposing the entryPoint hasn't been implemented
|
|
321
|
+
* in a particular scenario) fall back to the current approach of requesting the root object through the request
|
|
322
|
+
* pattern.
|
|
323
|
+
*
|
|
324
|
+
* @remarks The plan is that eventually the component will stop providing IFluidRouter functionality, this property
|
|
325
|
+
* will become non-optional and return an IFluidHandle (no undefined) and will become the only way to access
|
|
326
|
+
* the component's entryPoint.
|
|
327
|
+
*/
|
|
328
|
+
readonly entryPoint?: IFluidHandle<FluidObject>;
|
|
302
329
|
}
|
|
303
330
|
|
|
304
331
|
export type CreateChildSummarizerNodeFn = (
|
package/src/index.ts
CHANGED
|
@@ -3,9 +3,46 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
export {
|
|
7
|
+
AliasResult,
|
|
8
|
+
BindState,
|
|
9
|
+
CreateChildSummarizerNodeFn,
|
|
10
|
+
FlushMode,
|
|
11
|
+
IContainerRuntimeBase,
|
|
12
|
+
IContainerRuntimeBaseEvents,
|
|
13
|
+
IDataStore,
|
|
14
|
+
IFluidDataStoreChannel,
|
|
15
|
+
IFluidDataStoreContext,
|
|
16
|
+
IFluidDataStoreContextDetached,
|
|
17
|
+
IFluidDataStoreContextEvents,
|
|
18
|
+
VisibilityState,
|
|
19
|
+
} from "./dataStoreContext";
|
|
20
|
+
export { IFluidDataStoreFactory, IProvideFluidDataStoreFactory } from "./dataStoreFactory";
|
|
21
|
+
export {
|
|
22
|
+
FluidDataStoreRegistryEntry,
|
|
23
|
+
IFluidDataStoreRegistry,
|
|
24
|
+
IProvideFluidDataStoreRegistry,
|
|
25
|
+
NamedFluidDataStoreRegistryEntries,
|
|
26
|
+
NamedFluidDataStoreRegistryEntry,
|
|
27
|
+
} from "./dataStoreRegistry";
|
|
28
|
+
export { gcBlobKey, IGarbageCollectionData, IGarbageCollectionDetailsBase } from "./garbageCollection";
|
|
29
|
+
export { IAttachMessage, IEnvelope, IInboundSignalMessage, InboundAttachMessage, ISignalEnvelope } from "./protocol";
|
|
30
|
+
export {
|
|
31
|
+
blobCountPropertyName,
|
|
32
|
+
channelsTreeName,
|
|
33
|
+
CreateChildSummarizerNodeParam,
|
|
34
|
+
CreateSummarizerNodeSource,
|
|
35
|
+
IGarbageCollectionNodeData,
|
|
36
|
+
IGarbageCollectionState,
|
|
37
|
+
ISummarizeInternalResult,
|
|
38
|
+
ISummarizeResult,
|
|
39
|
+
ISummarizerNode,
|
|
40
|
+
ISummarizerNodeConfig,
|
|
41
|
+
ISummarizerNodeConfigWithGC,
|
|
42
|
+
ISummarizerNodeWithGC,
|
|
43
|
+
ISummaryStats,
|
|
44
|
+
ISummaryTreeWithStats,
|
|
45
|
+
ITelemetryContext,
|
|
46
|
+
SummarizeInternalFn,
|
|
47
|
+
totalBlobSizePropertyName,
|
|
48
|
+
} from "./summary";
|