@fluidframework/container-definitions 2.0.0-dev.2.3.0.115467 → 2.0.0-dev.3.1.0.125672
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/.eslintrc.js +20 -9
- package/README.md +5 -5
- package/api-extractor.json +2 -2
- package/dist/audience.d.ts +3 -4
- package/dist/audience.d.ts.map +1 -1
- package/dist/audience.js.map +1 -1
- package/dist/browserPackage.d.ts.map +1 -1
- package/dist/browserPackage.js +3 -3
- package/dist/browserPackage.js.map +1 -1
- package/dist/deltas.d.ts +12 -0
- package/dist/deltas.d.ts.map +1 -1
- package/dist/deltas.js.map +1 -1
- package/dist/error.d.ts.map +1 -1
- package/dist/error.js.map +1 -1
- package/dist/fluidModule.d.ts.map +1 -1
- package/dist/fluidModule.js.map +1 -1
- package/dist/fluidPackage.d.ts.map +1 -1
- package/dist/fluidPackage.js +5 -6
- package/dist/fluidPackage.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/loader.d.ts +20 -2
- package/dist/loader.d.ts.map +1 -1
- package/dist/loader.js.map +1 -1
- package/dist/runtime.d.ts +2 -1
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js.map +1 -1
- package/dist/tokenProvider.d.ts.map +1 -1
- package/dist/tokenProvider.js.map +1 -1
- package/lib/audience.d.ts +3 -4
- package/lib/audience.d.ts.map +1 -1
- package/lib/audience.js.map +1 -1
- package/lib/browserPackage.d.ts.map +1 -1
- package/lib/browserPackage.js +3 -3
- package/lib/browserPackage.js.map +1 -1
- package/lib/deltas.d.ts +12 -0
- package/lib/deltas.d.ts.map +1 -1
- package/lib/deltas.js.map +1 -1
- package/lib/error.d.ts.map +1 -1
- package/lib/error.js.map +1 -1
- package/lib/fluidModule.d.ts.map +1 -1
- package/lib/fluidModule.js.map +1 -1
- package/lib/fluidPackage.d.ts.map +1 -1
- package/lib/fluidPackage.js +5 -6
- package/lib/fluidPackage.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/loader.d.ts +20 -2
- package/lib/loader.d.ts.map +1 -1
- package/lib/loader.js.map +1 -1
- package/lib/runtime.d.ts +2 -1
- package/lib/runtime.d.ts.map +1 -1
- package/lib/runtime.js.map +1 -1
- package/lib/tokenProvider.d.ts.map +1 -1
- package/lib/tokenProvider.js.map +1 -1
- package/package.json +17 -14
- package/prettier.config.cjs +1 -1
- package/src/audience.ts +25 -22
- package/src/browserPackage.ts +33 -34
- package/src/deltas.ts +267 -245
- package/src/error.ts +58 -58
- package/src/fluidModule.ts +1 -1
- package/src/fluidPackage.ts +86 -86
- package/src/index.ts +51 -47
- package/src/loader.ts +498 -489
- package/src/runtime.ts +144 -148
- package/src/tokenProvider.ts +2 -2
- package/tsconfig.esnext.json +6 -6
- package/tsconfig.json +8 -15
package/dist/runtime.d.ts
CHANGED
|
@@ -106,6 +106,7 @@ export interface IContainerContext extends IDisposable {
|
|
|
106
106
|
readonly submitBatchFn: (batch: IBatchMessage[]) => number;
|
|
107
107
|
readonly submitSummaryFn: (summaryOp: ISummaryContent) => number;
|
|
108
108
|
readonly submitSignalFn: (contents: any) => void;
|
|
109
|
+
readonly disposeFn?: (error?: ICriticalContainerError) => void;
|
|
109
110
|
readonly closeFn: (error?: ICriticalContainerError) => void;
|
|
110
111
|
readonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;
|
|
111
112
|
readonly quorum: IQuorumClients;
|
|
@@ -164,6 +165,6 @@ export interface IRuntimeFactory extends IProvideRuntimeFactory {
|
|
|
164
165
|
* @param context - container context to be supplied to the runtime
|
|
165
166
|
* @param existing - whether to instantiate for the first time or from an existing context
|
|
166
167
|
*/
|
|
167
|
-
instantiateRuntime(context: IContainerContext, existing
|
|
168
|
+
instantiateRuntime(context: IContainerContext, existing: boolean): Promise<IRuntime>;
|
|
168
169
|
}
|
|
169
170
|
//# sourceMappingURL=runtime.d.ts.map
|
package/dist/runtime.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACvF,OAAO,
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACvF,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AACnF,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,EACN,oBAAoB,EACpB,cAAc,EACd,yBAAyB,EACzB,aAAa,EACb,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,6BAA6B,EAAE,MAAM,UAAU,CAAC;AAClF,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEnD;;;GAGG;AACH,oBAAY,WAAW;IACtB;;;OAGG;IACH,QAAQ,aAAa;IAErB;;OAEG;IACH,SAAS,cAAc;IAEvB;;;OAGG;IACH,QAAQ,aAAa;CACrB;AAED;;;GAGG;AACH,MAAM,WAAW,QAAS,SAAQ,WAAW;IAC5C;;OAEG;IACH,OAAO,CAAC,OAAO,EAAE,QAAQ,GAA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WAAW,CAAC;IAElC,oBAAoB,IAAI,QAAQ,GAAG,SAAS,CAAC;IAE7C,yBAAyB,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;IAChD;;;;OAIG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,eAAe,EAAE,MAAM,sBAA0C,CAAC;AAE/E,MAAM,WAAW,sBAAsB;IACtC,QAAQ,CAAC,eAAe,EAAE,eAAe,CAAC;CAC1C;AAED;;;;;GAKG;AACH,MAAM,WAAW,eAAgB,SAAQ,sBAAsB;IAC9D;;;;;;OAMG;IACH,kBAAkB,CAAC,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;CACrF"}
|
package/dist/runtime.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.js","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;
|
|
1
|
+
{"version":3,"file":"runtime.js","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAuBH;;;GAGG;AACH,IAAY,WAiBX;AAjBD,WAAY,WAAW;IACtB;;;OAGG;IACH,oCAAqB,CAAA;IAErB;;OAEG;IACH,sCAAuB,CAAA;IAEvB;;;OAGG;IACH,oCAAqB,CAAA;AACtB,CAAC,EAjBW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAiBtB;AAsIY,QAAA,eAAe,GAAiC,iBAAiB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ITelemetryBaseLogger, IDisposable } from \"@fluidframework/common-definitions\";\nimport { FluidObject, IRequest, IResponse } from \"@fluidframework/core-interfaces\";\nimport { IDocumentStorageService } from \"@fluidframework/driver-definitions\";\nimport {\n\tIClientConfiguration,\n\tIClientDetails,\n\tISequencedDocumentMessage,\n\tISnapshotTree,\n\tMessageType,\n\tISummaryTree,\n\tIVersion,\n\tIDocumentMessage,\n\tIQuorumClients,\n\tISummaryContent,\n} from \"@fluidframework/protocol-definitions\";\nimport { IAudience } from \"./audience\";\nimport { IDeltaManager } from \"./deltas\";\nimport { ICriticalContainerError } from \"./error\";\nimport { ILoader, ILoaderOptions, ISnapshotTreeWithBlobContents } from \"./loader\";\nimport { IFluidCodeDetails } from \"./fluidPackage\";\n\n/**\n * The attachment state of some Fluid data (e.g. a container or data store), denoting whether it is uploaded to the\n * service. The transition from detached to attached state is a one-way transition.\n */\nexport enum AttachState {\n\t/**\n\t * In detached state, the data is only present on the local client's machine. It has not yet been uploaded\n\t * to the service.\n\t */\n\tDetached = \"Detached\",\n\n\t/**\n\t * In attaching state, the data has started the upload to the service, but has not yet completed.\n\t */\n\tAttaching = \"Attaching\",\n\n\t/**\n\t * In attached state, the data has completed upload to the service. It can be accessed by other clients after\n\t * reaching attached state.\n\t */\n\tAttached = \"Attached\",\n}\n\n/**\n * The IRuntime represents an instantiation of a code package within a Container.\n * Primarily held by the ContainerContext to be able to interact with the running instance of the Container.\n */\nexport interface IRuntime extends IDisposable {\n\t/**\n\t * Executes a request against the runtime\n\t */\n\trequest(request: IRequest): Promise<IResponse>;\n\n\t/**\n\t * Notifies the runtime of a change in the connection state\n\t */\n\tsetConnectionState(connected: boolean, clientId?: string);\n\n\t/**\n\t * Processes the given op (message)\n\t */\n\tprocess(message: ISequencedDocumentMessage, local: boolean);\n\n\t/**\n\t * Processes the given signal\n\t */\n\tprocessSignal(message: any, local: boolean);\n\n\t/**\n\t * Create a summary. Used when attaching or serializing a detached container.\n\t *\n\t * @param blobRedirectTable - A table passed during the attach process. While detached, blob upload is supported\n\t * using IDs generated locally. After attach, these IDs cannot be used, so this table maps the old local IDs to the\n\t * new storage IDs so requests can be redirected.\n\t */\n\tcreateSummary(blobRedirectTable?: Map<string, string>): ISummaryTree;\n\n\t/**\n\t * Propagate the container state when container is attaching or attached.\n\t * @param attachState - State of the container.\n\t */\n\tsetAttachState(attachState: AttachState.Attaching | AttachState.Attached): void;\n\n\t/**\n\t * Get pending local state in a serializable format to be given back to a newly loaded container\n\t */\n\tgetPendingLocalState(): unknown;\n\n\t/**\n\t * Notify runtime that container is moving to \"Attaching\" state\n\t * @param snapshot - snapshot created at attach time\n\t */\n\tnotifyAttaching(snapshot: ISnapshotTreeWithBlobContents): void;\n}\n\n/**\n * Payload type for IContainerContext.submitBatchFn()\n */\nexport interface IBatchMessage {\n\tcontents?: string;\n\tmetadata: Record<string, unknown> | undefined;\n\tcompression?: string;\n}\n\n/**\n * The ContainerContext is a proxy standing between the Container and the Container's IRuntime.\n * This allows the Container to terminate the connection to the IRuntime.\n *\n * Specifically, there is an event on Container, onContextChanged, which mean a new code proposal has been loaded,\n * so the old IRuntime is no longer valid, as its ContainerContext has been revoked,\n * and the Container has created a new ContainerContext.\n */\nexport interface IContainerContext extends IDisposable {\n\t/** @deprecated Please pass in existing directly in instantiateRuntime */\n\treadonly existing: boolean | undefined;\n\treadonly options: ILoaderOptions;\n\treadonly clientId: string | undefined;\n\treadonly clientDetails: IClientDetails;\n\treadonly storage: IDocumentStorageService;\n\treadonly connected: boolean;\n\treadonly baseSnapshot: ISnapshotTree | undefined;\n\t/** @deprecated Please use submitBatchFn & submitSummaryFn */\n\treadonly submitFn: (type: MessageType, contents: any, batch: boolean, appData?: any) => number;\n\t/** @returns clientSequenceNumber of last message in a batch */\n\treadonly submitBatchFn: (batch: IBatchMessage[]) => number;\n\treadonly submitSummaryFn: (summaryOp: ISummaryContent) => number;\n\treadonly submitSignalFn: (contents: any) => void;\n\treadonly disposeFn?: (error?: ICriticalContainerError) => void;\n\treadonly closeFn: (error?: ICriticalContainerError) => void;\n\treadonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;\n\treadonly quorum: IQuorumClients;\n\t/**\n\t * @deprecated This method is provided as a migration tool for customers currently reading the code details\n\t * from within the Container by directly accessing the Quorum proposals. The code details should not be accessed\n\t * from within the Container as this requires coupling between the container contents and the code loader.\n\t * Direct access to Quorum proposals will be removed in an upcoming release, and in a further future release this\n\t * migration tool will be removed.\n\t */\n\tgetSpecifiedCodeDetails?(): IFluidCodeDetails | undefined;\n\treadonly audience: IAudience | undefined;\n\treadonly loader: ILoader;\n\t// The logger implementation, which would support tagged events, should be provided by the loader.\n\treadonly taggedLogger: ITelemetryBaseLogger;\n\treadonly serviceConfiguration: IClientConfiguration | undefined;\n\tpendingLocalState?: unknown;\n\n\t/**\n\t * Ambient services provided with the context\n\t */\n\treadonly scope: FluidObject;\n\n\t/**\n\t * Get an absolute url for a provided container-relative request.\n\t * @param relativeUrl - A relative request within the container\n\t *\n\t * TODO: Optional for backwards compatibility. Make non-optional in version 0.19\n\t */\n\tgetAbsoluteUrl?(relativeUrl: string): Promise<string | undefined>;\n\n\t/**\n\t * Indicates the attachment state of the container to a host service.\n\t */\n\treadonly attachState: AttachState;\n\n\tgetLoadedFromVersion(): IVersion | undefined;\n\n\tupdateDirtyContainerState(dirty: boolean): void;\n\t/**\n\t * WARNING: this id is meant for telemetry usages ONLY, not recommended for other consumption\n\t * This id is not supposed to be exposed anywhere else. It is dependant on usage or drivers\n\t * and scenarios which can change in the future.\n\t */\n\treadonly id: string;\n}\n\nexport const IRuntimeFactory: keyof IProvideRuntimeFactory = \"IRuntimeFactory\";\n\nexport interface IProvideRuntimeFactory {\n\treadonly IRuntimeFactory: IRuntimeFactory;\n}\n\n/**\n * Exported module definition\n *\n * Provides the entry point for the ContainerContext to load the proper IRuntime\n * to start up the running instance of the Container.\n */\nexport interface IRuntimeFactory extends IProvideRuntimeFactory {\n\t/**\n\t * Instantiates a new IRuntime for the given IContainerContext to proxy to\n\t * This is the main entry point to the Container's business logic\n\t *\n\t * @param context - container context to be supplied to the runtime\n\t * @param existing - whether to instantiate for the first time or from an existing context\n\t */\n\tinstantiateRuntime(context: IContainerContext, existing: boolean): Promise<IRuntime>;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokenProvider.d.ts","sourceRoot":"","sources":["../src/tokenProvider.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,mBAAmB,EAAE,MAAM,0BAAkD,CAAC;AAE3F,MAAM,WAAW,0BAA0B;
|
|
1
|
+
{"version":3,"file":"tokenProvider.d.ts","sourceRoot":"","sources":["../src/tokenProvider.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,mBAAmB,EAAE,MAAM,0BAAkD,CAAC;AAE3F,MAAM,WAAW,0BAA0B;IAC1C,QAAQ,CAAC,mBAAmB,EAAE,mBAAmB,CAAC;CAClD;AAED,MAAM,WAAW,mBAAoB,SAAQ,0BAA0B;IACtE,YAAY,EAAE;QAAE,CAAC,OAAO,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;CACzC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokenProvider.js","sourceRoot":"","sources":["../src/tokenProvider.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEU,QAAA,mBAAmB,GAAqC,qBAAqB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport const IFluidTokenProvider: keyof IProvideFluidTokenProvider = \"IFluidTokenProvider\";\n\nexport interface IProvideFluidTokenProvider {\n
|
|
1
|
+
{"version":3,"file":"tokenProvider.js","sourceRoot":"","sources":["../src/tokenProvider.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEU,QAAA,mBAAmB,GAAqC,qBAAqB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport const IFluidTokenProvider: keyof IProvideFluidTokenProvider = \"IFluidTokenProvider\";\n\nexport interface IProvideFluidTokenProvider {\n\treadonly IFluidTokenProvider: IFluidTokenProvider;\n}\n\nexport interface IFluidTokenProvider extends IProvideFluidTokenProvider {\n\tintelligence: { [service: string]: any };\n}\n"]}
|
package/lib/audience.d.ts
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
/// <reference types="node" />
|
|
6
5
|
import { EventEmitter } from "events";
|
|
7
6
|
import { IClient } from "@fluidframework/protocol-definitions";
|
|
8
7
|
/**
|
|
@@ -14,9 +13,9 @@ export interface IAudienceOwner extends IAudience {
|
|
|
14
13
|
*/
|
|
15
14
|
addMember(clientId: string, details: IClient): void;
|
|
16
15
|
/**
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
* Removes a client from the audience. Only emits an event if a client is actually removed
|
|
17
|
+
* @returns if a client was removed from the audience
|
|
18
|
+
*/
|
|
20
19
|
removeMember(clientId: string): boolean;
|
|
21
20
|
}
|
|
22
21
|
/**
|
package/lib/audience.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audience.d.ts","sourceRoot":"","sources":["../src/audience.ts"],"names":[],"mappings":"AAAA;;;GAGG
|
|
1
|
+
{"version":3,"file":"audience.d.ts","sourceRoot":"","sources":["../src/audience.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AAE/D;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,SAAS;IAChD;;OAEG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IAEpD;;;OAGG;IACH,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CACxC;AAED;;;;;GAKG;AACH,MAAM,WAAW,SAAU,SAAQ,YAAY;IAC9C;;OAEG;IACH,EAAE,CACD,KAAK,EAAE,WAAW,GAAG,cAAc,EACnC,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,KAAK,IAAI,GACnD,IAAI,CAAC;IAER;;OAEG;IACH,UAAU,IAAI,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEnC;;;OAGG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CACjD"}
|
package/lib/audience.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audience.js","sourceRoot":"","sources":["../src/audience.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 { EventEmitter } from \"events\";\nimport { IClient } from \"@fluidframework/protocol-definitions\";\n\n/**\n * Manages the state and the members for {@link IAudience}\n */\nexport interface IAudienceOwner extends IAudience {\n
|
|
1
|
+
{"version":3,"file":"audience.js","sourceRoot":"","sources":["../src/audience.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 { EventEmitter } from \"events\";\nimport { IClient } from \"@fluidframework/protocol-definitions\";\n\n/**\n * Manages the state and the members for {@link IAudience}\n */\nexport interface IAudienceOwner extends IAudience {\n\t/**\n\t * Adds a new client to the audience\n\t */\n\taddMember(clientId: string, details: IClient): void;\n\n\t/**\n\t * Removes a client from the audience. Only emits an event if a client is actually removed\n\t * @returns if a client was removed from the audience\n\t */\n\tremoveMember(clientId: string): boolean;\n}\n\n/**\n * Audience represents all clients connected to the op stream, both read-only and read/write.\n *\n * See {@link https://nodejs.org/api/events.html#class-eventemitter | here} for an overview of the `EventEmitter`\n * class.\n */\nexport interface IAudience extends EventEmitter {\n\t/**\n\t * See {@link https://nodejs.dev/learn/the-nodejs-event-emitter | here} for an overview of `EventEmitter.on`.\n\t */\n\ton(\n\t\tevent: \"addMember\" | \"removeMember\",\n\t\tlistener: (clientId: string, client: IClient) => void,\n\t): this;\n\n\t/**\n\t * List all clients connected to the op stream, keyed off their clientId\n\t */\n\tgetMembers(): Map<string, IClient>;\n\n\t/**\n\t * Get details about the connected client with the specified clientId,\n\t * or undefined if the specified client isn't connected\n\t */\n\tgetMember(clientId: string): IClient | undefined;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browserPackage.d.ts","sourceRoot":"","sources":["../src/browserPackage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,aAAa,EAAkB,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAEzF;;GAEG;AACH,MAAM,WAAW,+BAAgC,SAAQ,wBAAwB;
|
|
1
|
+
{"version":3,"file":"browserPackage.d.ts","sourceRoot":"","sources":["../src/browserPackage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,aAAa,EAAkB,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAEzF;;GAEG;AACH,MAAM,WAAW,+BAAgC,SAAQ,wBAAwB;IAChF;;;OAGG;IACH,GAAG,EAAE;QACJ;;;WAGG;QACH,KAAK,EAAE,MAAM,EAAE,CAAC;QAEhB;;;WAGG;QACH,OAAO,EAAE,MAAM,CAAC;KAChB,CAAC;CACF;AAED;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,aAAa;IAC1D;;OAEG;IACH,KAAK,EAAE;QACN;;WAEG;QACH,OAAO,EAAE,+BAA+B,CAAC;QACzC;;WAEG;QACH,CAAC,WAAW,EAAE,MAAM,GAAG,wBAAwB,CAAC;KAChD,CAAC;CACF;AAED;;;GAGG;AACH,eAAO,MAAM,qBAAqB,aAAc,GAAG,+CAGC,CAAC"}
|
package/lib/browserPackage.js
CHANGED
|
@@ -9,8 +9,8 @@ import { isFluidPackage } from "./fluidPackage";
|
|
|
9
9
|
*/
|
|
10
10
|
export const isFluidBrowserPackage = (maybePkg) => {
|
|
11
11
|
var _a, _b, _c, _d, _e, _f;
|
|
12
|
-
return isFluidPackage(maybePkg)
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
return isFluidPackage(maybePkg) &&
|
|
13
|
+
typeof ((_c = (_b = (_a = maybePkg === null || maybePkg === void 0 ? void 0 : maybePkg.fluid) === null || _a === void 0 ? void 0 : _a.browser) === null || _b === void 0 ? void 0 : _b.umd) === null || _c === void 0 ? void 0 : _c.library) === "string" &&
|
|
14
|
+
Array.isArray((_f = (_e = (_d = maybePkg === null || maybePkg === void 0 ? void 0 : maybePkg.fluid) === null || _d === void 0 ? void 0 : _d.browser) === null || _e === void 0 ? void 0 : _e.umd) === null || _f === void 0 ? void 0 : _f.files);
|
|
15
15
|
};
|
|
16
16
|
//# sourceMappingURL=browserPackage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browserPackage.js","sourceRoot":"","sources":["../src/browserPackage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAiB,cAAc,EAA4B,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"browserPackage.js","sourceRoot":"","sources":["../src/browserPackage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAiB,cAAc,EAA4B,MAAM,gBAAgB,CAAC;AA4CzF;;;GAGG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,QAAa,EAA8C,EAAE;;IAClG,OAAA,cAAc,CAAC,QAAQ,CAAC;QACxB,OAAO,CAAA,MAAA,MAAA,MAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,KAAK,0CAAE,OAAO,0CAAE,GAAG,0CAAE,OAAO,CAAA,KAAK,QAAQ;QAC1D,KAAK,CAAC,OAAO,CAAC,MAAA,MAAA,MAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,KAAK,0CAAE,OAAO,0CAAE,GAAG,0CAAE,KAAK,CAAC,CAAA;CAAA,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IFluidPackage, isFluidPackage, IFluidPackageEnvironment } from \"./fluidPackage\";\n\n/**\n * A specific Fluid package environment for browsers\n */\nexport interface IFluidBrowserPackageEnvironment extends IFluidPackageEnvironment {\n\t/**\n\t * The Universal Module Definition (umd) target specifics the scripts necessary for\n\t * loading a packages in a browser environment and finding its entry point.\n\t */\n\tumd: {\n\t\t/**\n\t\t * The bundled js files for loading this package.\n\t\t * These files will be loaded and executed in order.\n\t\t */\n\t\tfiles: string[];\n\n\t\t/**\n\t\t * The global name that the script entry points will be exposed.\n\t\t * This entry point should be an {@link @fluidframework/container-definitions#IFluidModule}.\n\t\t */\n\t\tlibrary: string;\n\t};\n}\n\n/**\n * A Fluid package for specification for browser environments\n */\nexport interface IFluidBrowserPackage extends IFluidPackage {\n\t/**\n\t * {@inheritDoc @fluidframework/core-interfaces#IFluidPackage.fluid}\n\t */\n\tfluid: {\n\t\t/**\n\t\t * The browser specific package information for this package\n\t\t */\n\t\tbrowser: IFluidBrowserPackageEnvironment;\n\t\t/**\n\t\t * {@inheritDoc @fluidframework/core-interfaces#IFluidPackage.fluid.environment}\n\t\t */\n\t\t[environment: string]: IFluidPackageEnvironment;\n\t};\n}\n\n/**\n * Determines if any object is an IFluidBrowserPackage\n * @param maybePkg - The object to check for compatibility with IFluidBrowserPackage\n */\nexport const isFluidBrowserPackage = (maybePkg: any): maybePkg is Readonly<IFluidBrowserPackage> =>\n\tisFluidPackage(maybePkg) &&\n\ttypeof maybePkg?.fluid?.browser?.umd?.library === \"string\" &&\n\tArray.isArray(maybePkg?.fluid?.browser?.umd?.files);\n"]}
|
package/lib/deltas.d.ts
CHANGED
|
@@ -10,9 +10,21 @@ import { ConnectionMode, IClientConfiguration, IClientDetails, IDocumentMessage,
|
|
|
10
10
|
export interface IConnectionDetails {
|
|
11
11
|
clientId: string;
|
|
12
12
|
claims: ITokenClaims;
|
|
13
|
+
/**
|
|
14
|
+
* @deprecated No replacement API recommended.
|
|
15
|
+
*/
|
|
13
16
|
existing: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated No replacement API recommended.
|
|
19
|
+
*/
|
|
14
20
|
mode: ConnectionMode;
|
|
21
|
+
/**
|
|
22
|
+
* @deprecated No replacement API recommended.
|
|
23
|
+
*/
|
|
15
24
|
version: string;
|
|
25
|
+
/**
|
|
26
|
+
* @deprecated No replacement API recommended.
|
|
27
|
+
*/
|
|
16
28
|
initialClients: ISignalClient[];
|
|
17
29
|
serviceConfiguration: IClientConfiguration;
|
|
18
30
|
/**
|
package/lib/deltas.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deltas.d.ts","sourceRoot":"","sources":["../src/deltas.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"deltas.d.ts","sourceRoot":"","sources":["../src/deltas.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,WAAW,EACX,cAAc,EACd,MAAM,EACN,WAAW,EACX,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACN,cAAc,EACd,oBAAoB,EACpB,cAAc,EACd,gBAAgB,EAChB,yBAAyB,EACzB,aAAa,EACb,cAAc,EACd,YAAY,EACZ,MAAM,sCAAsC,CAAC;AAE9C;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,YAAY,CAAC;IAErB;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,IAAI,EAAE,cAAc,CAAC;IAErB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,cAAc,EAAE,aAAa,EAAE,CAAC;IAChC,oBAAoB,EAAE,oBAAoB,CAAC;IAE3C;;;;;;;;;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pC,GACD;IACA,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC;IACxB,mDAAmD;IACnD,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,4EAA4E;IAC5E,QAAQ,CAAC,WAAW,EAAE,OAAO,GAAG,SAAS,CAAC;IAC1C,gDAAgD;IAChD,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;CAC7B,CAAC"}
|
package/lib/deltas.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deltas.js","sourceRoot":"","sources":["../src/deltas.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IDisposable, IEventProvider, IEvent, IErrorEvent } from \"@fluidframework/common-definitions\";\nimport {\n ConnectionMode,\n IClientConfiguration,\n IClientDetails,\n IDocumentMessage,\n ISequencedDocumentMessage,\n ISignalClient,\n ISignalMessage,\n ITokenClaims,\n} from \"@fluidframework/protocol-definitions\";\n\n/**\n * Contract representing the result of a newly established connection to the server for syncing deltas.\n */\nexport interface IConnectionDetails {\n clientId: string;\n claims: ITokenClaims;\n existing: boolean;\n mode: ConnectionMode;\n version: string;\n initialClients: ISignalClient[];\n serviceConfiguration: IClientConfiguration;\n\n /**\n * Last known sequence number to ordering service at the time of connection.\n *\n * @remarks\n *\n * It may lap actual last sequence number (quite a bit, if container is very active).\n * But it's the best information for client to figure out how far it is behind, at least\n * for \"read\" connections. \"write\" connections may use own \"join\" op to similar information,\n * that is likely to be more up-to-date.\n */\n checkpointSequenceNumber: number | undefined;\n}\n\n/**\n * Interface used to define a strategy for handling incoming delta messages\n */\nexport interface IDeltaHandlerStrategy {\n /**\n * Processes the message.\n */\n process: (message: ISequencedDocumentMessage) => void;\n\n /**\n * Processes the signal.\n */\n processSignal: (message: ISignalMessage) => void;\n}\n\n/**\n * Contract supporting delivery of outbound messages to the server\n */\nexport interface IDeltaSender {\n /**\n * Flush all pending messages through the outbound queue\n */\n flush(): void;\n}\n\n/**\n * Events emitted by {@link IDeltaManager}.\n */\n/* eslint-disable @typescript-eslint/unified-signatures */\nexport interface IDeltaManagerEvents extends IEvent {\n /**\n * @deprecated No replacement API recommended.\n */\n (event: \"prepareSend\", listener: (messageBuffer: any[]) => void);\n\n /**\n * @deprecated No replacement API recommended.\n */\n (event: \"submitOp\", listener: (message: IDocumentMessage) => void);\n\n /**\n * Emitted immediately after processing an incoming operation (op).\n *\n * @remarks\n *\n * Note: this event is not intended for general use.\n * Prefer to listen to events on the appropriate ultimate recipients of the ops, rather than listening to the\n * ops directly on the {@link IDeltaManager}.\n *\n * Listener parameters:\n *\n * - `message`: The op that was processed.\n *\n * - `processingTime`: The amount of time it took to process the inbound operation (op), expressed in milliseconds.\n */\n (event: \"op\", listener: (message: ISequencedDocumentMessage, processingTime: number) => void);\n\n /**\n * @deprecated No replacement API recommended.\n */\n (event: \"allSentOpsAckd\", listener: () => void);\n\n /**\n * @deprecated No replacement API recommended.\n */\n (event: \"pong\", listener: (latency: number) => void);\n\n /**\n * @deprecated No replacement API recommended.\n */\n (event: \"processTime\", listener: (latency: number) => void);\n\n /**\n * Emitted when the {@link IDeltaManager} completes connecting to the Fluid service.\n *\n * @remarks\n * This occurs once we've received the connect_document_success message from the server,\n * and happens prior to the client's join message (if there is a join message).\n *\n * Listener parameters:\n *\n * - `details`: Connection metadata.\n *\n * - `opsBehind`: An estimate of far behind the client is relative to the service in terms of ops.\n * Will not be specified if an estimate cannot be determined.\n */\n (event: \"connect\", listener: (details: IConnectionDetails, opsBehind?: number) => void);\n\n /**\n * Emitted when the {@link IDeltaManager} becomes disconnected from the Fluid service.\n *\n * @remarks Listener parameters:\n *\n * - `reason`: Describes the reason for which the delta manager was disconnected.\n */\n (event: \"disconnect\", listener: (reason: string) => void);\n\n /**\n * Emitted when read/write permissions change.\n *\n * @remarks Listener parameters:\n *\n * - `readonly`: Whether or not the delta manager is now read-only.\n */\n (event: \"readonly\", listener: (readonly: boolean) => void);\n}\n/* eslint-enable @typescript-eslint/unified-signatures */\n\n/**\n * Manages the transmission of ops between the runtime and storage.\n */\nexport interface IDeltaManager<T, U> extends IEventProvider<IDeltaManagerEvents>, IDeltaSender, IDisposable {\n /** The queue of inbound delta messages */\n readonly inbound: IDeltaQueue<T>;\n\n /** The queue of outbound delta messages */\n readonly outbound: IDeltaQueue<U[]>;\n\n /** The queue of inbound delta signals */\n readonly inboundSignal: IDeltaQueue<ISignalMessage>;\n\n /** The current minimum sequence number */\n readonly minimumSequenceNumber: number;\n\n /** The last sequence number processed by the delta manager */\n readonly lastSequenceNumber: number;\n\n /** The last message processed by the delta manager */\n readonly lastMessage: ISequencedDocumentMessage | undefined;\n\n /** The latest sequence number the delta manager is aware of */\n readonly lastKnownSeqNumber: number;\n\n /** The initial sequence number set when attaching the op handler */\n readonly initialSequenceNumber: number;\n\n /**\n * Tells if current connection has checkpoint information.\n * I.e. we know how far behind the client was at the time of establishing connection\n */\n readonly hasCheckpointSequenceNumber: boolean;\n\n /** Details of client */\n readonly clientDetails: IClientDetails;\n\n /** Protocol version being used to communicate with the service */\n readonly version: string;\n\n /** Max message size allowed to the delta manager */\n readonly maxMessageSize: number;\n\n /** Service configuration provided by the service. */\n readonly serviceConfiguration: IClientConfiguration | undefined;\n\n /** Flag to indicate whether the client can write or not. */\n readonly active: boolean;\n\n readonly readOnlyInfo: ReadOnlyInfo;\n\n /** Submit a signal to the service to be broadcast to other connected clients, but not persisted */\n submitSignal(content: any): void;\n}\n\n/**\n * Events emitted by {@link IDeltaQueue}.\n */\n/* eslint-disable @typescript-eslint/unified-signatures */\nexport interface IDeltaQueueEvents<T> extends IErrorEvent {\n /**\n * Emitted when a task is enqueued.\n *\n * @remarks Listener parameters:\n *\n * - `task`: The task being enqueued.\n */\n (event: \"push\", listener: (task: T) => void);\n\n /**\n * Emitted immediately after processing an enqueued task and removing it from the queue.\n *\n * @remarks\n *\n * Note: this event is not intended for general use.\n * Prefer to listen to events on the appropriate ultimate recipients of the ops, rather than listening to the\n * ops directly on the {@link IDeltaQueue}.\n *\n * Listener parameters:\n *\n * - `task`: The task that was processed.\n */\n (event: \"op\", listener: (task: T) => void);\n\n /**\n * Emitted when the queue of tasks to process is emptied.\n *\n * @remarks Listener parameters:\n *\n * - `count`: The number of events (`T`) processed before becoming idle.\n *\n * - `duration`: The amount of time it took to process elements (in milliseconds).\n *\n * @see {@link IDeltaQueue.idle}\n */\n (event: \"idle\", listener: (count: number, duration: number) => void);\n}\n/* eslint-enable @typescript-eslint/unified-signatures */\n\n/**\n * Queue of ops to be sent to or processed from storage\n */\nexport interface IDeltaQueue<T> extends IEventProvider<IDeltaQueueEvents<T>>, IDisposable {\n /**\n * Flag indicating whether or not the queue was paused\n */\n paused: boolean;\n\n /**\n * The number of messages remaining in the queue\n */\n length: number;\n\n /**\n * Flag indicating whether or not the queue is idle.\n * I.e. there are no remaining messages to processes.\n */\n idle: boolean;\n\n /**\n * Pauses processing on the queue.\n *\n * @returns A promise which resolves when processing has been paused.\n */\n pause(): Promise<void>;\n\n /**\n * Resumes processing on the queue\n */\n resume(): void;\n\n /**\n * Peeks at the next message in the queue\n */\n peek(): T | undefined;\n\n /**\n * Returns all the items in the queue as an array. Does not remove them from the queue.\n */\n toArray(): T[];\n\n /**\n * returns number of ops processed and time it took to process these ops.\n * Zeros if queue did not process anything (had no messages, was paused or had hit an error before)\n */\n waitTillProcessingDone(): Promise<{ count: number; duration: number; }>;\n}\n\nexport type ReadOnlyInfo = {\n readonly readonly: false | undefined;\n} | {\n readonly readonly: true;\n /** read-only because forceReadOnly() was called */\n readonly forced: boolean;\n /** read-only because client does not have write permissions for document */\n readonly permissions: boolean | undefined;\n /** read-only with no delta stream connection */\n readonly storageOnly: boolean;\n};\n"]}
|
|
1
|
+
{"version":3,"file":"deltas.js","sourceRoot":"","sources":["../src/deltas.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tIDisposable,\n\tIEventProvider,\n\tIEvent,\n\tIErrorEvent,\n} from \"@fluidframework/common-definitions\";\nimport {\n\tConnectionMode,\n\tIClientConfiguration,\n\tIClientDetails,\n\tIDocumentMessage,\n\tISequencedDocumentMessage,\n\tISignalClient,\n\tISignalMessage,\n\tITokenClaims,\n} from \"@fluidframework/protocol-definitions\";\n\n/**\n * Contract representing the result of a newly established connection to the server for syncing deltas.\n */\nexport interface IConnectionDetails {\n\tclientId: string;\n\tclaims: ITokenClaims;\n\n\t/**\n\t * @deprecated No replacement API recommended.\n\t */\n\texisting: boolean;\n\n\t/**\n\t * @deprecated No replacement API recommended.\n\t */\n\tmode: ConnectionMode;\n\n\t/**\n\t * @deprecated No replacement API recommended.\n\t */\n\tversion: string;\n\n\t/**\n\t * @deprecated No replacement API recommended.\n\t */\n\tinitialClients: ISignalClient[];\n\tserviceConfiguration: IClientConfiguration;\n\n\t/**\n\t * Last known sequence number to ordering service at the time of connection.\n\t *\n\t * @remarks\n\t *\n\t * It may lap actual last sequence number (quite a bit, if container is very active).\n\t * But it's the best information for client to figure out how far it is behind, at least\n\t * for \"read\" connections. \"write\" connections may use own \"join\" op to similar information,\n\t * that is likely to be more up-to-date.\n\t */\n\tcheckpointSequenceNumber: number | undefined;\n}\n\n/**\n * Interface used to define a strategy for handling incoming delta messages\n */\nexport interface IDeltaHandlerStrategy {\n\t/**\n\t * Processes the message.\n\t */\n\tprocess: (message: ISequencedDocumentMessage) => void;\n\n\t/**\n\t * Processes the signal.\n\t */\n\tprocessSignal: (message: ISignalMessage) => void;\n}\n\n/**\n * Contract supporting delivery of outbound messages to the server\n */\nexport interface IDeltaSender {\n\t/**\n\t * Flush all pending messages through the outbound queue\n\t */\n\tflush(): void;\n}\n\n/**\n * Events emitted by {@link IDeltaManager}.\n */\nexport interface IDeltaManagerEvents extends IEvent {\n\t/**\n\t * @deprecated No replacement API recommended.\n\t */\n\t(event: \"prepareSend\", listener: (messageBuffer: any[]) => void);\n\n\t/**\n\t * @deprecated No replacement API recommended.\n\t */\n\t(event: \"submitOp\", listener: (message: IDocumentMessage) => void);\n\n\t/**\n\t * Emitted immediately after processing an incoming operation (op).\n\t *\n\t * @remarks\n\t *\n\t * Note: this event is not intended for general use.\n\t * Prefer to listen to events on the appropriate ultimate recipients of the ops, rather than listening to the\n\t * ops directly on the {@link IDeltaManager}.\n\t *\n\t * Listener parameters:\n\t *\n\t * - `message`: The op that was processed.\n\t *\n\t * - `processingTime`: The amount of time it took to process the inbound operation (op), expressed in milliseconds.\n\t */\n\t(event: \"op\", listener: (message: ISequencedDocumentMessage, processingTime: number) => void);\n\n\t/**\n\t * @deprecated No replacement API recommended.\n\t */\n\t(event: \"allSentOpsAckd\", listener: () => void);\n\n\t/**\n\t * @deprecated No replacement API recommended.\n\t */\n\t(event: \"pong\", listener: (latency: number) => void);\n\n\t/**\n\t * @deprecated No replacement API recommended.\n\t */\n\t(event: \"processTime\", listener: (latency: number) => void);\n\n\t/**\n\t * Emitted when the {@link IDeltaManager} completes connecting to the Fluid service.\n\t *\n\t * @remarks\n\t * This occurs once we've received the connect_document_success message from the server,\n\t * and happens prior to the client's join message (if there is a join message).\n\t *\n\t * Listener parameters:\n\t *\n\t * - `details`: Connection metadata.\n\t *\n\t * - `opsBehind`: An estimate of far behind the client is relative to the service in terms of ops.\n\t * Will not be specified if an estimate cannot be determined.\n\t */\n\t(event: \"connect\", listener: (details: IConnectionDetails, opsBehind?: number) => void);\n\n\t/**\n\t * Emitted when the {@link IDeltaManager} becomes disconnected from the Fluid service.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `reason`: Describes the reason for which the delta manager was disconnected.\n\t */\n\t(event: \"disconnect\", listener: (reason: string) => void);\n\n\t/**\n\t * Emitted when read/write permissions change.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `readonly`: Whether or not the delta manager is now read-only.\n\t */\n\t(event: \"readonly\", listener: (readonly: boolean) => void);\n}\n\n/**\n * Manages the transmission of ops between the runtime and storage.\n */\nexport interface IDeltaManager<T, U>\n\textends IEventProvider<IDeltaManagerEvents>,\n\t\tIDeltaSender,\n\t\tIDisposable {\n\t/** The queue of inbound delta messages */\n\treadonly inbound: IDeltaQueue<T>;\n\n\t/** The queue of outbound delta messages */\n\treadonly outbound: IDeltaQueue<U[]>;\n\n\t/** The queue of inbound delta signals */\n\treadonly inboundSignal: IDeltaQueue<ISignalMessage>;\n\n\t/** The current minimum sequence number */\n\treadonly minimumSequenceNumber: number;\n\n\t/** The last sequence number processed by the delta manager */\n\treadonly lastSequenceNumber: number;\n\n\t/** The last message processed by the delta manager */\n\treadonly lastMessage: ISequencedDocumentMessage | undefined;\n\n\t/** The latest sequence number the delta manager is aware of */\n\treadonly lastKnownSeqNumber: number;\n\n\t/** The initial sequence number set when attaching the op handler */\n\treadonly initialSequenceNumber: number;\n\n\t/**\n\t * Tells if current connection has checkpoint information.\n\t * I.e. we know how far behind the client was at the time of establishing connection\n\t */\n\treadonly hasCheckpointSequenceNumber: boolean;\n\n\t/** Details of client */\n\treadonly clientDetails: IClientDetails;\n\n\t/** Protocol version being used to communicate with the service */\n\treadonly version: string;\n\n\t/** Max message size allowed to the delta manager */\n\treadonly maxMessageSize: number;\n\n\t/** Service configuration provided by the service. */\n\treadonly serviceConfiguration: IClientConfiguration | undefined;\n\n\t/** Flag to indicate whether the client can write or not. */\n\treadonly active: boolean;\n\n\treadonly readOnlyInfo: ReadOnlyInfo;\n\n\t/** Submit a signal to the service to be broadcast to other connected clients, but not persisted */\n\tsubmitSignal(content: any): void;\n}\n\n/**\n * Events emitted by {@link IDeltaQueue}.\n */\nexport interface IDeltaQueueEvents<T> extends IErrorEvent {\n\t/**\n\t * Emitted when a task is enqueued.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `task`: The task being enqueued.\n\t */\n\t(event: \"push\", listener: (task: T) => void);\n\n\t/**\n\t * Emitted immediately after processing an enqueued task and removing it from the queue.\n\t *\n\t * @remarks\n\t *\n\t * Note: this event is not intended for general use.\n\t * Prefer to listen to events on the appropriate ultimate recipients of the ops, rather than listening to the\n\t * ops directly on the {@link IDeltaQueue}.\n\t *\n\t * Listener parameters:\n\t *\n\t * - `task`: The task that was processed.\n\t */\n\t(event: \"op\", listener: (task: T) => void);\n\n\t/**\n\t * Emitted when the queue of tasks to process is emptied.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `count`: The number of events (`T`) processed before becoming idle.\n\t *\n\t * - `duration`: The amount of time it took to process elements (in milliseconds).\n\t *\n\t * @see {@link IDeltaQueue.idle}\n\t */\n\t(event: \"idle\", listener: (count: number, duration: number) => void);\n}\n\n/**\n * Queue of ops to be sent to or processed from storage\n */\nexport interface IDeltaQueue<T> extends IEventProvider<IDeltaQueueEvents<T>>, IDisposable {\n\t/**\n\t * Flag indicating whether or not the queue was paused\n\t */\n\tpaused: boolean;\n\n\t/**\n\t * The number of messages remaining in the queue\n\t */\n\tlength: number;\n\n\t/**\n\t * Flag indicating whether or not the queue is idle.\n\t * I.e. there are no remaining messages to processes.\n\t */\n\tidle: boolean;\n\n\t/**\n\t * Pauses processing on the queue.\n\t *\n\t * @returns A promise which resolves when processing has been paused.\n\t */\n\tpause(): Promise<void>;\n\n\t/**\n\t * Resumes processing on the queue\n\t */\n\tresume(): void;\n\n\t/**\n\t * Peeks at the next message in the queue\n\t */\n\tpeek(): T | undefined;\n\n\t/**\n\t * Returns all the items in the queue as an array. Does not remove them from the queue.\n\t */\n\ttoArray(): T[];\n\n\t/**\n\t * returns number of ops processed and time it took to process these ops.\n\t * Zeros if queue did not process anything (had no messages, was paused or had hit an error before)\n\t */\n\twaitTillProcessingDone(): Promise<{ count: number; duration: number }>;\n}\n\nexport type ReadOnlyInfo =\n\t| {\n\t\t\treadonly readonly: false | undefined;\n\t }\n\t| {\n\t\t\treadonly readonly: true;\n\t\t\t/** read-only because forceReadOnly() was called */\n\t\t\treadonly forced: boolean;\n\t\t\t/** read-only because client does not have write permissions for document */\n\t\t\treadonly permissions: boolean | undefined;\n\t\t\t/** read-only with no delta stream connection */\n\t\t\treadonly storageOnly: boolean;\n\t };\n"]}
|
package/lib/error.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAE1E;;GAEG;AACH,oBAAY,kBAAkB;
|
|
1
|
+
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAE1E;;GAEG;AACH,oBAAY,kBAAkB;IAC7B;;OAEG;IACH,YAAY,iBAAiB;IAE7B;;OAEG;IACH,eAAe,oBAAoB;IAEnC;;OAEG;IACH,mBAAmB,wBAAwB;IAE3C;;OAEG;IACH,mBAAmB,wBAAwB;IAE3C;;OAEG;IACH,UAAU,eAAe;IAEzB;;;OAGG;IACH,yBAAyB,8BAA8B;CACvD;AAED;;GAEG;AACH,MAAM,WAAW,UAAW,SAAQ,OAAO,CAAC,KAAK,CAAC;IACjD;;;;OAIG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAE3B;;;;;OAKG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,qBAAqB;IACrB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,sBAAsB;IACtB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,sBAAsB,CAAC,IAAI,oBAAoB,CAAC;CAChD;AAED;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,UAAU;IACnD;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;GAEG;AACH,oBAAY,uBAAuB,GAAG,UAAU,CAAC;AAEjD;;GAEG;AACH,MAAM,WAAW,aAAc,SAAQ,UAAU;IAChD,QAAQ,CAAC,SAAS,EAAE,kBAAkB,CAAC,YAAY,CAAC;IACpD,KAAK,CAAC,EAAE,GAAG,CAAC;CACZ;AAED;;GAEG;AACH,MAAM,WAAW,WAAY,SAAQ,UAAU;IAC9C,QAAQ,CAAC,SAAS,EAAE,kBAAkB,CAAC,UAAU,CAAC;CAClD;AAED;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,UAAU;IACrD,QAAQ,CAAC,SAAS,EAAE,kBAAkB,CAAC,eAAe,CAAC;IACvD,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;CACnC"}
|
package/lib/error.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.js","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;GAEG;AACH,MAAM,CAAN,IAAY,kBA+BX;AA/BD,WAAY,kBAAkB;
|
|
1
|
+
{"version":3,"file":"error.js","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;GAEG;AACH,MAAM,CAAN,IAAY,kBA+BX;AA/BD,WAAY,kBAAkB;IAC7B;;OAEG;IACH,mDAA6B,CAAA;IAE7B;;OAEG;IACH,yDAAmC,CAAA;IAEnC;;OAEG;IACH,iEAA2C,CAAA;IAE3C;;OAEG;IACH,iEAA2C,CAAA;IAE3C;;OAEG;IACH,+CAAyB,CAAA;IAEzB;;;OAGG;IACH,6EAAuD,CAAA;AACxD,CAAC,EA/BW,kBAAkB,KAAlB,kBAAkB,QA+B7B","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ITelemetryProperties } from \"@fluidframework/common-definitions\";\n\n/**\n * Different error types the Container may report out to the Host\n */\nexport enum ContainerErrorType {\n\t/**\n\t * Some error, most likely an exception caught by runtime and propagated to container as critical error\n\t */\n\tgenericError = \"genericError\",\n\n\t/**\n\t * Throttling error from server. Server is busy and is asking not to reconnect for some time\n\t */\n\tthrottlingError = \"throttlingError\",\n\n\t/**\n\t * Data loss error detected by Container / DeltaManager. Likely points to storage issue.\n\t */\n\tdataCorruptionError = \"dataCorruptionError\",\n\n\t/**\n\t * Error encountered when processing an operation. May correlate with data corruption.\n\t */\n\tdataProcessingError = \"dataProcessingError\",\n\n\t/**\n\t * Error indicating an API is being used improperly resulting in an invalid operation.\n\t */\n\tusageError = \"usageError\",\n\n\t/**\n\t * Error indicating an client session has expired. Currently this only happens when GC is allowed on a document and\n\t * aids in safely deleting unused objects.\n\t */\n\tclientSessionExpiredError = \"clientSessionExpiredError\",\n}\n\n/**\n * Base interface for all errors and warnings at container level\n */\nexport interface IErrorBase extends Partial<Error> {\n\t/** errorType is a union of error types from\n\t * - container\n\t * - runtime\n\t * - drivers\n\t */\n\treadonly errorType: string;\n\n\t/**\n\t * See Error.message\n\t * Privacy Note - This is a freeform string that we may not control in all cases (e.g. a dependency throws an error)\n\t * If there are known cases where this contains privacy-sensitive data it will be tagged and included in the result\n\t * of getTelemetryProperties. When logging, consider fetching it that way rather than straight from this field.\n\t */\n\treadonly message: string;\n\t/** See Error.name */\n\treadonly name?: string;\n\t/** See Error.stack */\n\treadonly stack?: string;\n\t/**\n\t * Returns all properties of this error object that are either safe to log\n\t * or explicitly tagged as containing privacy-sensitive data.\n\t */\n\tgetTelemetryProperties?(): ITelemetryProperties;\n}\n\n/**\n * Represents warnings raised on container.\n */\nexport interface ContainerWarning extends IErrorBase {\n\t/**\n\t * Whether this error has already been logged. Used to avoid logging errors twice.\n\t *\n\t * @defaultValue `false`\n\t */\n\tlogged?: boolean;\n}\n\n/**\n * Represents errors raised on container.\n */\nexport type ICriticalContainerError = IErrorBase;\n\n/**\n * Generic wrapper for an unrecognized/uncategorized error object\n */\nexport interface IGenericError extends IErrorBase {\n\treadonly errorType: ContainerErrorType.genericError;\n\terror?: any;\n}\n\n/**\n * Error indicating an API is being used improperly resulting in an invalid operation.\n */\nexport interface IUsageError extends IErrorBase {\n\treadonly errorType: ContainerErrorType.usageError;\n}\n\n/**\n * Warning emitted when requests to storage are being throttled\n */\nexport interface IThrottlingWarning extends IErrorBase {\n\treadonly errorType: ContainerErrorType.throttlingError;\n\treadonly retryAfterSeconds: number;\n}\n"]}
|
package/lib/fluidModule.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fluidModule.d.ts","sourceRoot":"","sources":["../src/fluidModule.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,gCAAgC,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAE5C,MAAM,WAAW,YAAY;
|
|
1
|
+
{"version":3,"file":"fluidModule.d.ts","sourceRoot":"","sources":["../src/fluidModule.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,gCAAgC,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAE5C,MAAM,WAAW,YAAY;IAC5B,WAAW,EAAE,WAAW,CAAC,eAAe,GAAG,gCAAgC,CAAC,CAAC;CAC7E"}
|
package/lib/fluidModule.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fluidModule.js","sourceRoot":"","sources":["../src/fluidModule.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 { FluidObject } from \"@fluidframework/core-interfaces\";\nimport { IProvideFluidCodeDetailsComparer } from \"./fluidPackage\";\nimport { IRuntimeFactory } from \"./runtime\";\n\nexport interface IFluidModule {\n
|
|
1
|
+
{"version":3,"file":"fluidModule.js","sourceRoot":"","sources":["../src/fluidModule.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 { FluidObject } from \"@fluidframework/core-interfaces\";\nimport { IProvideFluidCodeDetailsComparer } from \"./fluidPackage\";\nimport { IRuntimeFactory } from \"./runtime\";\n\nexport interface IFluidModule {\n\tfluidExport: FluidObject<IRuntimeFactory & IProvideFluidCodeDetailsComparer>;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fluidPackage.d.ts","sourceRoot":"","sources":["../src/fluidPackage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,WAAW,wBAAwB;
|
|
1
|
+
{"version":3,"file":"fluidPackage.d.ts","sourceRoot":"","sources":["../src/fluidPackage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACxC;;;OAGG;IACH,CAAC,MAAM,EAAE,MAAM,GACZ,SAAS,GACT;QACA;;;;WAIG;QACH,KAAK,EAAE,MAAM,EAAE,CAAC;QAEhB;;;;WAIG;QACH,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACtB,CAAC;CACL;AAED;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC7B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,KAAK,EAAE;QACN;;;WAGG;QACH,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,GAAG,wBAAwB,CAAC;KAC5D,CAAC;IACF;;;;OAIG;IACH,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACvB;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc,QAAS,GAAG,mCACoD,CAAC;AAE5F;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACvC,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CAC/B;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IACjC;;;OAGG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,CAAC;IAEnD;;;;;OAKG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,uBAAuB,CAAC;CAC1C;AAED,eAAO,MAAM,kBAAkB,YAAa,OAAO,2CAQlD,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,MAAM,gCAClB,CAAC;AAE7B,MAAM,WAAW,gCAAgC;IAChD,QAAQ,CAAC,yBAAyB,EAAE,yBAAyB,CAAC;CAC9D;AAED;;GAEG;AACH,MAAM,WAAW,yBAA0B,SAAQ,gCAAgC;IAClF;;;;;OAKG;IACH,SAAS,CAAC,SAAS,EAAE,iBAAiB,EAAE,UAAU,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAEzF;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,CAAC,EAAE,iBAAiB,EAAE,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;CACjF"}
|
package/lib/fluidPackage.js
CHANGED
|
@@ -6,14 +6,13 @@
|
|
|
6
6
|
* Check if the package.json defines a Fluid package
|
|
7
7
|
* @param pkg - the package json data to check if it is a Fluid package.
|
|
8
8
|
*/
|
|
9
|
-
export const isFluidPackage = (pkg) => typeof pkg === "object"
|
|
10
|
-
&& typeof (pkg === null || pkg === void 0 ? void 0 : pkg.name) === "string"
|
|
11
|
-
&& typeof (pkg === null || pkg === void 0 ? void 0 : pkg.fluid) === "object";
|
|
9
|
+
export const isFluidPackage = (pkg) => typeof pkg === "object" && typeof (pkg === null || pkg === void 0 ? void 0 : pkg.name) === "string" && typeof (pkg === null || pkg === void 0 ? void 0 : pkg.fluid) === "object";
|
|
12
10
|
export const isFluidCodeDetails = (details) => {
|
|
13
11
|
const maybeCodeDetails = details;
|
|
14
|
-
return typeof maybeCodeDetails === "object"
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
return (typeof maybeCodeDetails === "object" &&
|
|
13
|
+
(typeof (maybeCodeDetails === null || maybeCodeDetails === void 0 ? void 0 : maybeCodeDetails.package) === "string" ||
|
|
14
|
+
isFluidPackage(maybeCodeDetails === null || maybeCodeDetails === void 0 ? void 0 : maybeCodeDetails.package)) &&
|
|
15
|
+
((maybeCodeDetails === null || maybeCodeDetails === void 0 ? void 0 : maybeCodeDetails.config) === undefined || typeof (maybeCodeDetails === null || maybeCodeDetails === void 0 ? void 0 : maybeCodeDetails.config) === "object"));
|
|
17
16
|
};
|
|
18
17
|
export const IFluidCodeDetailsComparer = "IFluidCodeDetailsComparer";
|
|
19
18
|
//# sourceMappingURL=fluidPackage.js.map
|
package/lib/fluidPackage.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fluidPackage.js","sourceRoot":"","sources":["../src/fluidPackage.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"fluidPackage.js","sourceRoot":"","sources":["../src/fluidPackage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA0DH;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,GAAQ,EAAkC,EAAE,CAC1E,OAAO,GAAG,KAAK,QAAQ,IAAI,OAAO,CAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,IAAI,CAAA,KAAK,QAAQ,IAAI,OAAO,CAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,KAAK,CAAA,KAAK,QAAQ,CAAC;AA4B5F,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,OAAgB,EAA0C,EAAE;IAC9F,MAAM,gBAAgB,GAAG,OAAiD,CAAC;IAC3E,OAAO,CACN,OAAO,gBAAgB,KAAK,QAAQ;QACpC,CAAC,OAAO,CAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,OAAO,CAAA,KAAK,QAAQ;YAC7C,cAAc,CAAC,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,OAAO,CAAC,CAAC;QAC3C,CAAC,CAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,MAAM,MAAK,SAAS,IAAI,OAAO,CAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,MAAM,CAAA,KAAK,QAAQ,CAAC,CACxF,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,yBAAyB,GACrC,2BAA2B,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Specifies an environment on Fluid property of a IFluidPackage.\n */\nexport interface IFluidPackageEnvironment {\n\t/**\n\t * The name of the target. For a browser environment, this could be umd for scripts\n\t * or css for styles.\n\t */\n\t[target: string]:\n\t\t| undefined\n\t\t| {\n\t\t\t\t/**\n\t\t\t\t * List of files for the target. These can be relative or absolute.\n\t\t\t\t * The code loader should resolve relative paths, and validate all\n\t\t\t\t * full urls.\n\t\t\t\t */\n\t\t\t\tfiles: string[];\n\n\t\t\t\t/**\n\t\t\t\t * General access for extended fields as specific usages will\n\t\t\t\t * likely have additional infornamation like a definition\n\t\t\t\t * of Library, the entrypoint for umd packages.\n\t\t\t\t */\n\t\t\t\t[key: string]: unknown;\n\t\t };\n}\n\n/**\n * Fluid-specific properties expected on a package to be loaded by the code loader.\n * While compatible with the npm package format it is not necessary that that package is an\n * npm package:\n * {@link https://stackoverflow.com/questions/10065564/add-custom-metadata-or-config-to-package-json-is-it-valid}\n */\nexport interface IFluidPackage {\n\t/**\n\t * The name of the package that this code represnets\n\t */\n\tname: string;\n\t/**\n\t * This object represents the Fluid specific properties of the package\n\t */\n\tfluid: {\n\t\t/**\n\t\t * The name of the of the environment. This should be something like browser, or node\n\t\t * and contain the necessary targets for loading this code in that environment.\n\t\t */\n\t\t[environment: string]: undefined | IFluidPackageEnvironment;\n\t};\n\t/**\n\t * General access for extended fields as specific usages will\n\t * likely have additional infornamation like a definition of\n\t * compatible versions, or deployment information like rings or rollouts.\n\t */\n\t[key: string]: unknown;\n}\n\n/**\n * Check if the package.json defines a Fluid package\n * @param pkg - the package json data to check if it is a Fluid package.\n */\nexport const isFluidPackage = (pkg: any): pkg is Readonly<IFluidPackage> =>\n\ttypeof pkg === \"object\" && typeof pkg?.name === \"string\" && typeof pkg?.fluid === \"object\";\n\n/**\n * Package manager configuration. Provides a key value mapping of config values\n */\nexport interface IFluidCodeDetailsConfig {\n\treadonly [key: string]: string;\n}\n\n/**\n * Data structure used to describe the code to load on the Fluid document\n */\nexport interface IFluidCodeDetails {\n\t/**\n\t * The code package to be used on the Fluid document. This is either the package name which will be loaded\n\t * from a package manager. Or the expanded Fluid package.\n\t */\n\treadonly package: string | Readonly<IFluidPackage>;\n\n\t/**\n\t * Configuration details. This includes links to the package manager and base CDNs.\n\t *\n\t * @remarks This is strictly consumer-defined data.\n\t * Its contents and semantics (including whether or not this data is present) are completely up to the consumer.\n\t */\n\treadonly config?: IFluidCodeDetailsConfig;\n}\n\nexport const isFluidCodeDetails = (details: unknown): details is Readonly<IFluidCodeDetails> => {\n\tconst maybeCodeDetails = details as Partial<IFluidCodeDetails> | undefined;\n\treturn (\n\t\ttypeof maybeCodeDetails === \"object\" &&\n\t\t(typeof maybeCodeDetails?.package === \"string\" ||\n\t\t\tisFluidPackage(maybeCodeDetails?.package)) &&\n\t\t(maybeCodeDetails?.config === undefined || typeof maybeCodeDetails?.config === \"object\")\n\t);\n};\n\nexport const IFluidCodeDetailsComparer: keyof IProvideFluidCodeDetailsComparer =\n\t\"IFluidCodeDetailsComparer\";\n\nexport interface IProvideFluidCodeDetailsComparer {\n\treadonly IFluidCodeDetailsComparer: IFluidCodeDetailsComparer;\n}\n\n/**\n * Provides capability to compare Fluid code details.\n */\nexport interface IFluidCodeDetailsComparer extends IProvideFluidCodeDetailsComparer {\n\t/**\n\t * Determines if the `candidate` code details satisfy the constraints specified in `constraint` code details.\n\t *\n\t * Similar semantics to:\n\t * {@link https://github.com/npm/node-semver#usage}\n\t */\n\tsatisfies(candidate: IFluidCodeDetails, constraint: IFluidCodeDetails): Promise<boolean>;\n\n\t/**\n\t * Return a number representing the ascending sort order of the `a` and `b` code details:\n\t *\n\t * - `< 0` if `a < b`.\n\t *\n\t * - `= 0` if `a === b`.\n\t *\n\t * - `> 0` if `a > b`.\n\t *\n\t * - `undefined` if `a` is not comparable to `b`.\n\t *\n\t * Similar semantics to:\n\t * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#description | Array.sort}\n\t */\n\tcompare(a: IFluidCodeDetails, b: IFluidCodeDetails): Promise<number | undefined>;\n}\n"]}
|
package/lib/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @packageDocumentation
|
|
9
9
|
*/
|
|
10
10
|
export { IAudience, IAudienceOwner } from "./audience";
|
|
11
|
-
export { IFluidBrowserPackage, IFluidBrowserPackageEnvironment, isFluidBrowserPackage } from "./browserPackage";
|
|
11
|
+
export { IFluidBrowserPackage, IFluidBrowserPackageEnvironment, isFluidBrowserPackage, } from "./browserPackage";
|
|
12
12
|
export { IConnectionDetails, IDeltaHandlerStrategy, IDeltaManager, IDeltaManagerEvents, IDeltaSender, IDeltaQueue, IDeltaQueueEvents, ReadOnlyInfo, } from "./deltas";
|
|
13
13
|
export { ContainerErrorType, ContainerWarning, ICriticalContainerError, IErrorBase, IGenericError, IUsageError, IThrottlingWarning, } from "./error";
|
|
14
14
|
export { ConnectionState, ICodeAllowList, ICodeDetailsLoader, IContainer, IContainerEvents, IContainerLoadMode, IFluidCodeResolver, IFluidModuleWithDetails, IHostLoader, ILoader, ILoaderHeader, ILoaderOptions, IPendingLocalState, IProvideLoader, IResolvedFluidCodeDetails, ISnapshotTreeWithBlobContents, LoaderHeader, } from "./loader";
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,EACN,oBAAoB,EACpB,+BAA+B,EAC/B,qBAAqB,GACrB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACN,kBAAkB,EAClB,qBAAqB,EACrB,aAAa,EACb,mBAAmB,EACnB,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,YAAY,GACZ,MAAM,UAAU,CAAC;AAClB,OAAO,EACN,kBAAkB,EAClB,gBAAgB,EAChB,uBAAuB,EACvB,UAAU,EACV,aAAa,EACb,WAAW,EACX,kBAAkB,GAClB,MAAM,SAAS,CAAC;AACjB,OAAO,EACN,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,UAAU,EACV,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,EAClB,uBAAuB,EACvB,WAAW,EACX,OAAO,EACP,aAAa,EACb,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,yBAAyB,EACzB,6BAA6B,EAC7B,YAAY,GACZ,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EACN,aAAa,EACb,wBAAwB,EACxB,iBAAiB,EACjB,yBAAyB,EACzB,uBAAuB,EACvB,gCAAgC,EAChC,cAAc,EACd,kBAAkB,GAClB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACN,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,sBAAsB,EACtB,QAAQ,EACR,eAAe,GACf,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
export { isFluidBrowserPackage } from "./browserPackage";
|
|
5
|
+
export { isFluidBrowserPackage, } from "./browserPackage";
|
|
6
6
|
export { ContainerErrorType, } from "./error";
|
|
7
7
|
export { LoaderHeader, } from "./loader";
|
|
8
8
|
export { IFluidCodeDetailsComparer, isFluidPackage, isFluidCodeDetails, } from "./fluidPackage";
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,OAAO,EAGN,qBAAqB,GACrB,MAAM,kBAAkB,CAAC;AAW1B,OAAO,EACN,kBAAkB,GAOlB,MAAM,SAAS,CAAC;AACjB,OAAO,EAiBN,YAAY,GACZ,MAAM,UAAU,CAAC;AAElB,OAAO,EAIN,yBAAyB,EAGzB,cAAc,EACd,kBAAkB,GAClB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACN,WAAW,EAKX,eAAe,GACf,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,mBAAmB,EAA8B,MAAM,iBAAiB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * This library contains the interfaces and types concerning the `Loader` and loading the `Container`.\n *\n * @packageDocumentation\n */\n\nexport { IAudience, IAudienceOwner } from \"./audience\";\nexport {\n\tIFluidBrowserPackage,\n\tIFluidBrowserPackageEnvironment,\n\tisFluidBrowserPackage,\n} from \"./browserPackage\";\nexport {\n\tIConnectionDetails,\n\tIDeltaHandlerStrategy,\n\tIDeltaManager,\n\tIDeltaManagerEvents,\n\tIDeltaSender,\n\tIDeltaQueue,\n\tIDeltaQueueEvents,\n\tReadOnlyInfo,\n} from \"./deltas\";\nexport {\n\tContainerErrorType,\n\tContainerWarning,\n\tICriticalContainerError,\n\tIErrorBase,\n\tIGenericError,\n\tIUsageError,\n\tIThrottlingWarning,\n} from \"./error\";\nexport {\n\tConnectionState,\n\tICodeAllowList,\n\tICodeDetailsLoader,\n\tIContainer,\n\tIContainerEvents,\n\tIContainerLoadMode,\n\tIFluidCodeResolver,\n\tIFluidModuleWithDetails,\n\tIHostLoader,\n\tILoader,\n\tILoaderHeader,\n\tILoaderOptions,\n\tIPendingLocalState,\n\tIProvideLoader,\n\tIResolvedFluidCodeDetails,\n\tISnapshotTreeWithBlobContents,\n\tLoaderHeader,\n} from \"./loader\";\nexport { IFluidModule } from \"./fluidModule\";\nexport {\n\tIFluidPackage,\n\tIFluidPackageEnvironment,\n\tIFluidCodeDetails,\n\tIFluidCodeDetailsComparer,\n\tIFluidCodeDetailsConfig,\n\tIProvideFluidCodeDetailsComparer,\n\tisFluidPackage,\n\tisFluidCodeDetails,\n} from \"./fluidPackage\";\nexport {\n\tAttachState,\n\tIBatchMessage,\n\tIContainerContext,\n\tIProvideRuntimeFactory,\n\tIRuntime,\n\tIRuntimeFactory,\n} from \"./runtime\";\nexport { IFluidTokenProvider, IProvideFluidTokenProvider } from \"./tokenProvider\";\n"]}
|
package/lib/loader.d.ts
CHANGED
|
@@ -152,6 +152,16 @@ export interface IContainerEvents extends IEvent {
|
|
|
152
152
|
* @see {@link IContainer.close}
|
|
153
153
|
*/
|
|
154
154
|
(event: "closed", listener: (error?: ICriticalContainerError) => void): any;
|
|
155
|
+
/**
|
|
156
|
+
* Emitted when the {@link IContainer} is disposed, which permanently disables it.
|
|
157
|
+
*
|
|
158
|
+
* @remarks Listener parameters:
|
|
159
|
+
*
|
|
160
|
+
* - `error`: If the container was disposed due to error, this will contain details about the error that caused it.
|
|
161
|
+
*
|
|
162
|
+
* @see {@link IContainer.dispose}
|
|
163
|
+
*/
|
|
164
|
+
(event: "disposed", listener: (error?: ICriticalContainerError) => void): any;
|
|
155
165
|
/**
|
|
156
166
|
* Emitted when the container encounters a state which may lead to errors, which may be actionable by the consumer.
|
|
157
167
|
*
|
|
@@ -220,8 +230,8 @@ export declare namespace ConnectionState {
|
|
|
220
230
|
*/
|
|
221
231
|
type EstablishingConnection = 3;
|
|
222
232
|
/**
|
|
223
|
-
|
|
224
|
-
|
|
233
|
+
* The container has an inbound connection only, and is catching up to the latest known state from the service.
|
|
234
|
+
*/
|
|
225
235
|
type CatchingUp = 1;
|
|
226
236
|
/**
|
|
227
237
|
* The container is fully connected and syncing.
|
|
@@ -273,6 +283,14 @@ export interface IContainer extends IEventProvider<IContainerEvents>, IFluidRout
|
|
|
273
283
|
* Whether or not there are any local changes that have not been saved.
|
|
274
284
|
*/
|
|
275
285
|
readonly isDirty: boolean;
|
|
286
|
+
/**
|
|
287
|
+
* Disposes the container. If not already closed, this acts as a closure and then disposes runtime resources.
|
|
288
|
+
* The container is not expected to be used anymore once it is disposed.
|
|
289
|
+
*
|
|
290
|
+
* @param error - If the container is being disposed due to error, this provides details about the error that
|
|
291
|
+
* resulted in disposing it.
|
|
292
|
+
*/
|
|
293
|
+
dispose?(error?: ICriticalContainerError): void;
|
|
276
294
|
/**
|
|
277
295
|
* Closes the container.
|
|
278
296
|
*
|
package/lib/loader.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../src/loader.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../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