@fluidframework/container-definitions 2.0.0-dev.7.4.0.216897 → 2.0.0-dev.7.4.0.217212
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/api-report/container-definitions.api.md +35 -35
- package/dist/audience.d.ts +2 -2
- package/dist/audience.js.map +1 -1
- package/dist/container-definitions-alpha.d.ts +1125 -56
- package/dist/container-definitions-untrimmed.d.ts +39 -39
- package/dist/deltas.d.ts +7 -7
- package/dist/deltas.js.map +1 -1
- package/dist/error.d.ts +2 -2
- package/dist/error.js.map +1 -1
- package/dist/fluidModule.d.ts +1 -1
- package/dist/fluidModule.js.map +1 -1
- package/dist/fluidPackage.d.ts +7 -7
- package/dist/fluidPackage.js +1 -1
- package/dist/fluidPackage.js.map +1 -1
- package/dist/loader.d.ts +12 -12
- package/dist/loader.js.map +1 -1
- package/dist/runtime.d.ts +8 -8
- package/dist/runtime.js +2 -2
- package/dist/runtime.js.map +1 -1
- package/lib/audience.d.ts +2 -2
- package/lib/audience.js.map +1 -1
- package/lib/container-definitions-alpha.d.ts +1125 -56
- package/lib/container-definitions-untrimmed.d.ts +39 -39
- package/lib/deltas.d.ts +7 -7
- package/lib/deltas.js.map +1 -1
- package/lib/error.d.ts +2 -2
- package/lib/error.js.map +1 -1
- package/lib/fluidModule.d.ts +1 -1
- package/lib/fluidModule.js.map +1 -1
- package/lib/fluidPackage.d.ts +7 -7
- package/lib/fluidPackage.js +1 -1
- package/lib/fluidPackage.js.map +1 -1
- package/lib/loader.d.ts +12 -12
- package/lib/loader.js.map +1 -1
- package/lib/runtime.d.ts +8 -8
- package/lib/runtime.js +2 -2
- package/lib/runtime.js.map +1 -1
- package/package.json +3 -3
- package/src/audience.ts +2 -2
- package/src/deltas.ts +7 -7
- package/src/error.ts +2 -2
- package/src/fluidModule.ts +1 -1
- package/src/fluidPackage.ts +7 -7
- package/src/loader.ts +12 -12
- package/src/runtime.ts +8 -8
|
@@ -39,7 +39,7 @@ import { MessageType } from '@fluidframework/protocol-definitions';
|
|
|
39
39
|
/**
|
|
40
40
|
* The attachment state of some Fluid data (e.g. a container or data store), denoting whether it is uploaded to the
|
|
41
41
|
* service. The transition from detached to attached state is a one-way transition.
|
|
42
|
-
* @
|
|
42
|
+
* @alpha
|
|
43
43
|
*/
|
|
44
44
|
export declare enum AttachState {
|
|
45
45
|
/**
|
|
@@ -61,37 +61,37 @@ export declare enum AttachState {
|
|
|
61
61
|
/**
|
|
62
62
|
* Namespace for the different connection states a container can be in.
|
|
63
63
|
* PLEASE NOTE: The sequence of the numerical values does no correspond to the typical connection state progression.
|
|
64
|
-
* @
|
|
64
|
+
* @alpha
|
|
65
65
|
*/
|
|
66
66
|
export declare namespace ConnectionState {
|
|
67
67
|
/**
|
|
68
68
|
* The container is not connected to the delta server.
|
|
69
69
|
* Note - When in this state the container may be about to reconnect,
|
|
70
70
|
* or may remain disconnected until explicitly told to connect.
|
|
71
|
-
* @
|
|
71
|
+
* @alpha
|
|
72
72
|
*/
|
|
73
73
|
export type Disconnected = 0;
|
|
74
74
|
/**
|
|
75
75
|
* The container is disconnected but actively trying to establish a new connection.
|
|
76
76
|
* PLEASE NOTE that this numerical value falls out of the order you may expect for this state.
|
|
77
|
-
* @
|
|
77
|
+
* @alpha
|
|
78
78
|
*/
|
|
79
79
|
export type EstablishingConnection = 3;
|
|
80
80
|
/**
|
|
81
81
|
* The container has an inbound connection only, and is catching up to the latest known state from the service.
|
|
82
|
-
* @
|
|
82
|
+
* @alpha
|
|
83
83
|
*/
|
|
84
84
|
export type CatchingUp = 1;
|
|
85
85
|
/**
|
|
86
86
|
* The container is fully connected and syncing.
|
|
87
|
-
* @
|
|
87
|
+
* @alpha
|
|
88
88
|
*/
|
|
89
89
|
export type Connected = 2;
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
/**
|
|
93
93
|
* Type defining the different states of connectivity a Container can be in.
|
|
94
|
-
* @
|
|
94
|
+
* @alpha
|
|
95
95
|
*/
|
|
96
96
|
export declare type ConnectionState = ConnectionState.Disconnected | ConnectionState.EstablishingConnection | ConnectionState.CatchingUp | ConnectionState.Connected;
|
|
97
97
|
|
|
@@ -153,7 +153,7 @@ export declare type ContainerErrorTypes = (typeof ContainerErrorTypes)[keyof typ
|
|
|
153
153
|
|
|
154
154
|
/**
|
|
155
155
|
* Represents warnings raised on container.
|
|
156
|
-
* @
|
|
156
|
+
* @alpha
|
|
157
157
|
*/
|
|
158
158
|
export declare interface ContainerWarning extends IErrorBase {
|
|
159
159
|
/**
|
|
@@ -169,7 +169,7 @@ export declare interface ContainerWarning extends IErrorBase {
|
|
|
169
169
|
*
|
|
170
170
|
* See {@link https://nodejs.org/api/events.html#class-eventemitter | here} for an overview of the `EventEmitter`
|
|
171
171
|
* class.
|
|
172
|
-
* @
|
|
172
|
+
* @alpha
|
|
173
173
|
*/
|
|
174
174
|
export declare interface IAudience extends EventEmitter {
|
|
175
175
|
/**
|
|
@@ -189,7 +189,7 @@ export declare interface IAudience extends EventEmitter {
|
|
|
189
189
|
|
|
190
190
|
/**
|
|
191
191
|
* Manages the state and the members for {@link IAudience}
|
|
192
|
-
* @
|
|
192
|
+
* @alpha
|
|
193
193
|
*/
|
|
194
194
|
export declare interface IAudienceOwner extends IAudience {
|
|
195
195
|
/**
|
|
@@ -205,7 +205,7 @@ export declare interface IAudienceOwner extends IAudience {
|
|
|
205
205
|
|
|
206
206
|
/**
|
|
207
207
|
* Payload type for IContainerContext.submitBatchFn()
|
|
208
|
-
* @
|
|
208
|
+
* @alpha
|
|
209
209
|
*/
|
|
210
210
|
export declare interface IBatchMessage {
|
|
211
211
|
contents?: string;
|
|
@@ -231,7 +231,7 @@ export declare interface ICodeDetailsLoader extends Partial<IProvideFluidCodeDet
|
|
|
231
231
|
|
|
232
232
|
/**
|
|
233
233
|
* Contract representing the result of a newly established connection to the server for syncing deltas.
|
|
234
|
-
* @
|
|
234
|
+
* @alpha
|
|
235
235
|
*/
|
|
236
236
|
export declare interface IConnectionDetails {
|
|
237
237
|
clientId: string;
|
|
@@ -252,7 +252,7 @@ export declare interface IConnectionDetails {
|
|
|
252
252
|
|
|
253
253
|
/**
|
|
254
254
|
* The Host's view of a Container and its connection to storage
|
|
255
|
-
* @
|
|
255
|
+
* @alpha
|
|
256
256
|
*/
|
|
257
257
|
export declare interface IContainer extends IEventProvider<IContainerEvents>, IFluidRouter {
|
|
258
258
|
/**
|
|
@@ -440,7 +440,7 @@ export declare interface IContainer extends IEventProvider<IContainerEvents>, IF
|
|
|
440
440
|
* IContainerContext is fundamentally just the set of things that an IRuntimeFactory (and IRuntime) will consume from the
|
|
441
441
|
* loader layer. It gets passed into the IRuntimeFactory.instantiateRuntime call. Only include members on this interface
|
|
442
442
|
* if you intend them to be consumed/called from the runtime layer.
|
|
443
|
-
* @
|
|
443
|
+
* @alpha
|
|
444
444
|
*/
|
|
445
445
|
export declare interface IContainerContext {
|
|
446
446
|
readonly options: ILoaderOptions;
|
|
@@ -508,7 +508,7 @@ export declare interface IContainerContext {
|
|
|
508
508
|
|
|
509
509
|
/**
|
|
510
510
|
* Events emitted by the {@link IContainer} "upwards" to the Loader and Host.
|
|
511
|
-
* @
|
|
511
|
+
* @alpha
|
|
512
512
|
*/
|
|
513
513
|
export declare interface IContainerEvents extends IEvent {
|
|
514
514
|
/**
|
|
@@ -677,13 +677,13 @@ export declare interface IContainerLoadMode {
|
|
|
677
677
|
* - {@link @fluidframework/odsp-driver-definitions#OdspErrorType}
|
|
678
678
|
*
|
|
679
679
|
* - {@link @fluidframework/routerlicious-driver#RouterliciousErrorType}
|
|
680
|
-
* @
|
|
680
|
+
* @alpha
|
|
681
681
|
*/
|
|
682
682
|
export declare type ICriticalContainerError = IErrorBase;
|
|
683
683
|
|
|
684
684
|
/**
|
|
685
685
|
* Manages the transmission of ops between the runtime and storage.
|
|
686
|
-
* @
|
|
686
|
+
* @alpha
|
|
687
687
|
*/
|
|
688
688
|
export declare interface IDeltaManager<T, U> extends IEventProvider<IDeltaManagerEvents>, IDeltaSender {
|
|
689
689
|
/**
|
|
@@ -752,7 +752,7 @@ export declare interface IDeltaManager<T, U> extends IEventProvider<IDeltaManage
|
|
|
752
752
|
|
|
753
753
|
/**
|
|
754
754
|
* Events emitted by {@link IDeltaManager}.
|
|
755
|
-
* @
|
|
755
|
+
* @alpha
|
|
756
756
|
*/
|
|
757
757
|
export declare interface IDeltaManagerEvents extends IEvent {
|
|
758
758
|
/**
|
|
@@ -822,7 +822,7 @@ export declare interface IDeltaManagerEvents extends IEvent {
|
|
|
822
822
|
|
|
823
823
|
/**
|
|
824
824
|
* Queue of ops to be sent to or processed from storage
|
|
825
|
-
* @
|
|
825
|
+
* @alpha
|
|
826
826
|
*/
|
|
827
827
|
export declare interface IDeltaQueue<T> extends IEventProvider<IDeltaQueueEvents<T>>, IDisposable {
|
|
828
828
|
/**
|
|
@@ -868,7 +868,7 @@ export declare interface IDeltaQueue<T> extends IEventProvider<IDeltaQueueEvents
|
|
|
868
868
|
|
|
869
869
|
/**
|
|
870
870
|
* Events emitted by {@link IDeltaQueue}.
|
|
871
|
-
* @
|
|
871
|
+
* @alpha
|
|
872
872
|
*/
|
|
873
873
|
export declare interface IDeltaQueueEvents<T> extends IErrorEvent {
|
|
874
874
|
/**
|
|
@@ -909,7 +909,7 @@ export declare interface IDeltaQueueEvents<T> extends IErrorEvent {
|
|
|
909
909
|
|
|
910
910
|
/**
|
|
911
911
|
* Contract supporting delivery of outbound messages to the server
|
|
912
|
-
* @
|
|
912
|
+
* @alpha
|
|
913
913
|
*/
|
|
914
914
|
export declare interface IDeltaSender {
|
|
915
915
|
/**
|
|
@@ -965,7 +965,7 @@ export declare interface IFluidBrowserPackageEnvironment extends IFluidPackageEn
|
|
|
965
965
|
|
|
966
966
|
/**
|
|
967
967
|
* Data structure used to describe the code to load on the Fluid document
|
|
968
|
-
* @
|
|
968
|
+
* @alpha
|
|
969
969
|
*/
|
|
970
970
|
export declare interface IFluidCodeDetails {
|
|
971
971
|
/**
|
|
@@ -983,13 +983,13 @@ export declare interface IFluidCodeDetails {
|
|
|
983
983
|
}
|
|
984
984
|
|
|
985
985
|
/**
|
|
986
|
-
* @
|
|
986
|
+
* @alpha
|
|
987
987
|
*/
|
|
988
988
|
export declare const IFluidCodeDetailsComparer: keyof IProvideFluidCodeDetailsComparer;
|
|
989
989
|
|
|
990
990
|
/**
|
|
991
991
|
* Provides capability to compare Fluid code details.
|
|
992
|
-
* @
|
|
992
|
+
* @alpha
|
|
993
993
|
*/
|
|
994
994
|
export declare interface IFluidCodeDetailsComparer extends IProvideFluidCodeDetailsComparer {
|
|
995
995
|
/**
|
|
@@ -1018,7 +1018,7 @@ export declare interface IFluidCodeDetailsComparer extends IProvideFluidCodeDeta
|
|
|
1018
1018
|
|
|
1019
1019
|
/**
|
|
1020
1020
|
* Package manager configuration. Provides a key value mapping of config values
|
|
1021
|
-
* @
|
|
1021
|
+
* @alpha
|
|
1022
1022
|
*/
|
|
1023
1023
|
export declare interface IFluidCodeDetailsConfig {
|
|
1024
1024
|
readonly [key: string]: string;
|
|
@@ -1043,7 +1043,7 @@ export declare interface IFluidCodeResolver {
|
|
|
1043
1043
|
}
|
|
1044
1044
|
|
|
1045
1045
|
/**
|
|
1046
|
-
* @
|
|
1046
|
+
* @alpha
|
|
1047
1047
|
*/
|
|
1048
1048
|
export declare interface IFluidModule {
|
|
1049
1049
|
fluidExport: FluidObject<IRuntimeFactory & IProvideFluidCodeDetailsComparer>;
|
|
@@ -1072,7 +1072,7 @@ export declare interface IFluidModuleWithDetails {
|
|
|
1072
1072
|
* While compatible with the npm package format it is not necessary that that package is an
|
|
1073
1073
|
* npm package:
|
|
1074
1074
|
* {@link https://stackoverflow.com/questions/10065564/add-custom-metadata-or-config-to-package-json-is-it-valid}
|
|
1075
|
-
* @
|
|
1075
|
+
* @alpha
|
|
1076
1076
|
*/
|
|
1077
1077
|
export declare interface IFluidPackage {
|
|
1078
1078
|
/**
|
|
@@ -1099,7 +1099,7 @@ export declare interface IFluidPackage {
|
|
|
1099
1099
|
|
|
1100
1100
|
/**
|
|
1101
1101
|
* Specifies an environment on Fluid property of a IFluidPackage.
|
|
1102
|
-
* @
|
|
1102
|
+
* @alpha
|
|
1103
1103
|
*/
|
|
1104
1104
|
export declare interface IFluidPackageEnvironment {
|
|
1105
1105
|
/**
|
|
@@ -1126,7 +1126,7 @@ export { IGenericError }
|
|
|
1126
1126
|
|
|
1127
1127
|
/**
|
|
1128
1128
|
* Defines list of properties expected for getPendingLocalState
|
|
1129
|
-
* @
|
|
1129
|
+
* @alpha
|
|
1130
1130
|
*/
|
|
1131
1131
|
export declare interface IGetPendingLocalStateProps {
|
|
1132
1132
|
/**
|
|
@@ -1169,7 +1169,7 @@ export declare interface IHostLoader extends ILoader {
|
|
|
1169
1169
|
|
|
1170
1170
|
/**
|
|
1171
1171
|
* The Runtime's view of the Loader, used for loading Containers
|
|
1172
|
-
* @
|
|
1172
|
+
* @alpha
|
|
1173
1173
|
*/
|
|
1174
1174
|
export declare interface ILoader extends Partial<IProvideLoader> {
|
|
1175
1175
|
/**
|
|
@@ -1213,7 +1213,7 @@ export declare interface ILoaderHeader {
|
|
|
1213
1213
|
}
|
|
1214
1214
|
|
|
1215
1215
|
/**
|
|
1216
|
-
* @
|
|
1216
|
+
* @alpha
|
|
1217
1217
|
*/
|
|
1218
1218
|
export declare type ILoaderOptions = {
|
|
1219
1219
|
[key in string | number]: any;
|
|
@@ -1254,21 +1254,21 @@ export declare interface IPendingLocalState {
|
|
|
1254
1254
|
}
|
|
1255
1255
|
|
|
1256
1256
|
/**
|
|
1257
|
-
* @
|
|
1257
|
+
* @alpha
|
|
1258
1258
|
*/
|
|
1259
1259
|
export declare interface IProvideFluidCodeDetailsComparer {
|
|
1260
1260
|
readonly IFluidCodeDetailsComparer: IFluidCodeDetailsComparer;
|
|
1261
1261
|
}
|
|
1262
1262
|
|
|
1263
1263
|
/**
|
|
1264
|
-
* @
|
|
1264
|
+
* @alpha
|
|
1265
1265
|
*/
|
|
1266
1266
|
export declare interface IProvideLoader {
|
|
1267
1267
|
readonly ILoader: ILoader;
|
|
1268
1268
|
}
|
|
1269
1269
|
|
|
1270
1270
|
/**
|
|
1271
|
-
* @
|
|
1271
|
+
* @alpha
|
|
1272
1272
|
*/
|
|
1273
1273
|
export declare interface IProvideRuntimeFactory {
|
|
1274
1274
|
readonly IRuntimeFactory: IRuntimeFactory;
|
|
@@ -1293,7 +1293,7 @@ export declare interface IResolvedFluidCodeDetails extends IFluidCodeDetails {
|
|
|
1293
1293
|
/**
|
|
1294
1294
|
* The IRuntime represents an instantiation of a code package within a Container.
|
|
1295
1295
|
* Primarily held by the ContainerContext to be able to interact with the running instance of the Container.
|
|
1296
|
-
* @
|
|
1296
|
+
* @alpha
|
|
1297
1297
|
*/
|
|
1298
1298
|
export declare interface IRuntime extends IDisposable {
|
|
1299
1299
|
/**
|
|
@@ -1351,7 +1351,7 @@ export declare interface IRuntime extends IDisposable {
|
|
|
1351
1351
|
}
|
|
1352
1352
|
|
|
1353
1353
|
/**
|
|
1354
|
-
* @
|
|
1354
|
+
* @alpha
|
|
1355
1355
|
*/
|
|
1356
1356
|
export declare const IRuntimeFactory: keyof IProvideRuntimeFactory;
|
|
1357
1357
|
|
|
@@ -1360,7 +1360,7 @@ export declare const IRuntimeFactory: keyof IProvideRuntimeFactory;
|
|
|
1360
1360
|
*
|
|
1361
1361
|
* Provides the entry point for the ContainerContext to load the proper IRuntime
|
|
1362
1362
|
* to start up the running instance of the Container.
|
|
1363
|
-
* @
|
|
1363
|
+
* @alpha
|
|
1364
1364
|
*/
|
|
1365
1365
|
export declare interface IRuntimeFactory extends IProvideRuntimeFactory {
|
|
1366
1366
|
/**
|
|
@@ -1398,7 +1398,7 @@ export declare const isFluidPackage: (pkg: unknown) => pkg is Readonly<IFluidPac
|
|
|
1398
1398
|
* in separate property: {@link ISnapshotTreeWithBlobContents.blobsContents}.
|
|
1399
1399
|
*
|
|
1400
1400
|
* @remarks This is used as the `ContainerContext`'s base snapshot when attaching.
|
|
1401
|
-
* @
|
|
1401
|
+
* @alpha
|
|
1402
1402
|
*/
|
|
1403
1403
|
export declare interface ISnapshotTreeWithBlobContents extends ISnapshotTree {
|
|
1404
1404
|
blobsContents: {
|
|
@@ -1444,7 +1444,7 @@ export declare enum LoaderHeader {
|
|
|
1444
1444
|
}
|
|
1445
1445
|
|
|
1446
1446
|
/**
|
|
1447
|
-
* @
|
|
1447
|
+
* @alpha
|
|
1448
1448
|
*/
|
|
1449
1449
|
export declare type ReadOnlyInfo = {
|
|
1450
1450
|
readonly readonly: false | undefined;
|
package/lib/deltas.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { IAnyDriverError } from "@fluidframework/driver-definitions";
|
|
|
7
7
|
import { IClientConfiguration, IClientDetails, IDocumentMessage, ISequencedDocumentMessage, ISignalMessage, ITokenClaims } from "@fluidframework/protocol-definitions";
|
|
8
8
|
/**
|
|
9
9
|
* Contract representing the result of a newly established connection to the server for syncing deltas.
|
|
10
|
-
* @
|
|
10
|
+
* @alpha
|
|
11
11
|
*/
|
|
12
12
|
export interface IConnectionDetails {
|
|
13
13
|
clientId: string;
|
|
@@ -27,7 +27,7 @@ export interface IConnectionDetails {
|
|
|
27
27
|
}
|
|
28
28
|
/**
|
|
29
29
|
* Contract supporting delivery of outbound messages to the server
|
|
30
|
-
* @
|
|
30
|
+
* @alpha
|
|
31
31
|
*/
|
|
32
32
|
export interface IDeltaSender {
|
|
33
33
|
/**
|
|
@@ -37,7 +37,7 @@ export interface IDeltaSender {
|
|
|
37
37
|
}
|
|
38
38
|
/**
|
|
39
39
|
* Events emitted by {@link IDeltaManager}.
|
|
40
|
-
* @
|
|
40
|
+
* @alpha
|
|
41
41
|
*/
|
|
42
42
|
export interface IDeltaManagerEvents extends IEvent {
|
|
43
43
|
/**
|
|
@@ -106,7 +106,7 @@ export interface IDeltaManagerEvents extends IEvent {
|
|
|
106
106
|
}
|
|
107
107
|
/**
|
|
108
108
|
* Manages the transmission of ops between the runtime and storage.
|
|
109
|
-
* @
|
|
109
|
+
* @alpha
|
|
110
110
|
*/
|
|
111
111
|
export interface IDeltaManager<T, U> extends IEventProvider<IDeltaManagerEvents>, IDeltaSender {
|
|
112
112
|
/**
|
|
@@ -174,7 +174,7 @@ export interface IDeltaManager<T, U> extends IEventProvider<IDeltaManagerEvents>
|
|
|
174
174
|
}
|
|
175
175
|
/**
|
|
176
176
|
* Events emitted by {@link IDeltaQueue}.
|
|
177
|
-
* @
|
|
177
|
+
* @alpha
|
|
178
178
|
*/
|
|
179
179
|
export interface IDeltaQueueEvents<T> extends IErrorEvent {
|
|
180
180
|
/**
|
|
@@ -214,7 +214,7 @@ export interface IDeltaQueueEvents<T> extends IErrorEvent {
|
|
|
214
214
|
}
|
|
215
215
|
/**
|
|
216
216
|
* Queue of ops to be sent to or processed from storage
|
|
217
|
-
* @
|
|
217
|
+
* @alpha
|
|
218
218
|
*/
|
|
219
219
|
export interface IDeltaQueue<T> extends IEventProvider<IDeltaQueueEvents<T>>, IDisposable {
|
|
220
220
|
/**
|
|
@@ -258,7 +258,7 @@ export interface IDeltaQueue<T> extends IEventProvider<IDeltaQueueEvents<T>>, ID
|
|
|
258
258
|
}>;
|
|
259
259
|
}
|
|
260
260
|
/**
|
|
261
|
-
* @
|
|
261
|
+
* @alpha
|
|
262
262
|
*/
|
|
263
263
|
export type ReadOnlyInfo = {
|
|
264
264
|
readonly readonly: false | undefined;
|
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 {\n\tIDisposable,\n\tIEventProvider,\n\tIEvent,\n\tIErrorEvent,\n\tIErrorBase,\n} from \"@fluidframework/core-interfaces\";\nimport { IAnyDriverError } from \"@fluidframework/driver-definitions\";\nimport {\n\tIClientConfiguration,\n\tIClientDetails,\n\tIDocumentMessage,\n\tISequencedDocumentMessage,\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 * @
|
|
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\tIErrorBase,\n} from \"@fluidframework/core-interfaces\";\nimport { IAnyDriverError } from \"@fluidframework/driver-definitions\";\nimport {\n\tIClientConfiguration,\n\tIClientDetails,\n\tIDocumentMessage,\n\tISequencedDocumentMessage,\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 * @alpha\n */\nexport interface IConnectionDetails {\n\tclientId: string;\n\tclaims: ITokenClaims;\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 * Contract supporting delivery of outbound messages to the server\n * @alpha\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 * @alpha\n */\nexport interface IDeltaManagerEvents extends IEvent {\n\t/**\n\t * @deprecated No replacement API recommended.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\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 * Emitted periodically with latest information on network roundtrip latency\n\t */\n\t(event: \"pong\", 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 * - `error` : error if any for the disconnect.\n\t */\n\t(event: \"disconnect\", listener: (reason: string, error?: IAnyDriverError) => 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(\n\t\tevent: \"readonly\",\n\t\tlistener: (\n\t\t\treadonly: boolean,\n\t\t\treadonlyConnectionReason?: { reason: string; error?: IErrorBase },\n\t\t) => void,\n\t);\n}\n\n/**\n * Manages the transmission of ops between the runtime and storage.\n * @alpha\n */\nexport interface IDeltaManager<T, U> extends IEventProvider<IDeltaManagerEvents>, IDeltaSender {\n\t/**\n\t * The queue of inbound delta messages\n\t */\n\treadonly inbound: IDeltaQueue<T>;\n\n\t/**\n\t * The queue of outbound delta messages\n\t */\n\treadonly outbound: IDeltaQueue<U[]>;\n\n\t/**\n\t * The queue of inbound delta signals\n\t */\n\treadonly inboundSignal: IDeltaQueue<ISignalMessage>;\n\n\t/**\n\t * The current minimum sequence number\n\t */\n\treadonly minimumSequenceNumber: number;\n\n\t/**\n\t * The last sequence number processed by the delta manager\n\t */\n\treadonly lastSequenceNumber: number;\n\n\t/**\n\t * The last message processed by the delta manager\n\t */\n\treadonly lastMessage: ISequencedDocumentMessage | undefined;\n\n\t/**\n\t * The latest sequence number the delta manager is aware of\n\t */\n\treadonly lastKnownSeqNumber: number;\n\n\t/**\n\t * The initial sequence number set when attaching the op handler\n\t */\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/**\n\t * Details of client\n\t */\n\treadonly clientDetails: IClientDetails;\n\n\t/**\n\t * Protocol version being used to communicate with the service\n\t */\n\treadonly version: string;\n\n\t/**\n\t * Max message size allowed to the delta manager\n\t */\n\treadonly maxMessageSize: number;\n\n\t/**\n\t * Service configuration provided by the service.\n\t */\n\treadonly serviceConfiguration: IClientConfiguration | undefined;\n\n\t/**\n\t * Flag to indicate whether the client can write or not.\n\t */\n\treadonly active: boolean;\n\n\treadonly readOnlyInfo: ReadOnlyInfo;\n\n\t/**\n\t * Submit a signal to the service to be broadcast to other connected clients, but not persisted\n\t */\n\t// TODO: use `unknown` instead (API breaking)\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tsubmitSignal(content: any, targetClientId?: string): void;\n}\n\n/**\n * Events emitted by {@link IDeltaQueue}.\n * @alpha\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 * @alpha\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\n/**\n * @alpha\n */\nexport type ReadOnlyInfo =\n\t| {\n\t\t\treadonly readonly: false | undefined;\n\t }\n\t| {\n\t\t\treadonly readonly: true;\n\n\t\t\t/**\n\t\t\t * Read-only because `forceReadOnly()` was called.\n\t\t\t */\n\t\t\treadonly forced: boolean;\n\n\t\t\t/**\n\t\t\t * Read-only because client does not have write permissions for document.\n\t\t\t */\n\t\t\treadonly permissions: boolean | undefined;\n\n\t\t\t/**\n\t\t\t * Read-only with no delta stream connection.\n\t\t\t */\n\t\t\treadonly storageOnly: boolean;\n\n\t\t\t/**\n\t\t\t * Extra info on why connection to delta stream is not possible.\n\t\t\t *\n\t\t\t * @remarks This info might be provided if {@link ReadOnlyInfo.storageOnly} is set to `true`.\n\t\t\t */\n\t\t\treadonly storageOnlyReason?: string;\n\t };\n"]}
|
package/lib/error.d.ts
CHANGED
|
@@ -58,7 +58,7 @@ export declare enum ContainerErrorType {
|
|
|
58
58
|
}
|
|
59
59
|
/**
|
|
60
60
|
* Represents warnings raised on container.
|
|
61
|
-
* @
|
|
61
|
+
* @alpha
|
|
62
62
|
*/
|
|
63
63
|
export interface ContainerWarning extends IErrorBase {
|
|
64
64
|
/**
|
|
@@ -82,7 +82,7 @@ export interface ContainerWarning extends IErrorBase {
|
|
|
82
82
|
* - {@link @fluidframework/odsp-driver-definitions#OdspErrorType}
|
|
83
83
|
*
|
|
84
84
|
* - {@link @fluidframework/routerlicious-driver#RouterliciousErrorType}
|
|
85
|
-
* @
|
|
85
|
+
* @alpha
|
|
86
86
|
*/
|
|
87
87
|
export type ICriticalContainerError = IErrorBase;
|
|
88
88
|
//# sourceMappingURL=error.d.ts.map
|
package/lib/error.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.js","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,eAAe,EAAc,MAAM,iCAAiC,CAAC;AAE9E;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IAClC,GAAG,eAAe;IAClB;;;OAGG;IACH,yBAAyB,EAAE,2BAA2B;CAC7C,CAAC;AAOX;;;;;GAKG;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 { FluidErrorTypes, IErrorBase } from \"@fluidframework/core-interfaces\";\n\n/**\n * Different error types the ClientSession may report out to the Host.\n * @internal\n */\nexport const ContainerErrorTypes = {\n\t...FluidErrorTypes,\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} as const;\n\n/**\n * @internal\n */\nexport type ContainerErrorTypes = (typeof ContainerErrorTypes)[keyof typeof ContainerErrorTypes];\n\n/**\n * Different error types the Container may report out to the Host.\n *\n * @deprecated ContainerErrorType is being deprecated as a public export. Please use {@link ContainerErrorTypes#clientSessionExpiredError} instead.\n * @internal\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 * Represents warnings raised on container.\n * @
|
|
1
|
+
{"version":3,"file":"error.js","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,eAAe,EAAc,MAAM,iCAAiC,CAAC;AAE9E;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IAClC,GAAG,eAAe;IAClB;;;OAGG;IACH,yBAAyB,EAAE,2BAA2B;CAC7C,CAAC;AAOX;;;;;GAKG;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 { FluidErrorTypes, IErrorBase } from \"@fluidframework/core-interfaces\";\n\n/**\n * Different error types the ClientSession may report out to the Host.\n * @internal\n */\nexport const ContainerErrorTypes = {\n\t...FluidErrorTypes,\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} as const;\n\n/**\n * @internal\n */\nexport type ContainerErrorTypes = (typeof ContainerErrorTypes)[keyof typeof ContainerErrorTypes];\n\n/**\n * Different error types the Container may report out to the Host.\n *\n * @deprecated ContainerErrorType is being deprecated as a public export. Please use {@link ContainerErrorTypes#clientSessionExpiredError} instead.\n * @internal\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 * Represents warnings raised on container.\n * @alpha\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 *\n * @see\n *\n * The following are commonly thrown error types, but `errorType` could be any string.\n *\n * - {@link @fluidframework/core-interfaces#ContainerErrorType}\n *\n * - {@link @fluidframework/driver-definitions#DriverErrorType}\n *\n * - {@link @fluidframework/odsp-driver-definitions#OdspErrorType}\n *\n * - {@link @fluidframework/routerlicious-driver#RouterliciousErrorType}\n * @alpha\n */\nexport type ICriticalContainerError = IErrorBase;\n"]}
|
package/lib/fluidModule.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { FluidObject } from "@fluidframework/core-interfaces";
|
|
|
6
6
|
import { IProvideFluidCodeDetailsComparer } from "./fluidPackage";
|
|
7
7
|
import { IRuntimeFactory } from "./runtime";
|
|
8
8
|
/**
|
|
9
|
-
* @
|
|
9
|
+
* @alpha
|
|
10
10
|
*/
|
|
11
11
|
export interface IFluidModule {
|
|
12
12
|
fluidExport: FluidObject<IRuntimeFactory & IProvideFluidCodeDetailsComparer>;
|
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\n/**\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\n/**\n * @alpha\n */\nexport interface IFluidModule {\n\tfluidExport: FluidObject<IRuntimeFactory & IProvideFluidCodeDetailsComparer>;\n}\n"]}
|
package/lib/fluidPackage.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* Specifies an environment on Fluid property of a IFluidPackage.
|
|
7
|
-
* @
|
|
7
|
+
* @alpha
|
|
8
8
|
*/
|
|
9
9
|
export interface IFluidPackageEnvironment {
|
|
10
10
|
/**
|
|
@@ -31,7 +31,7 @@ export interface IFluidPackageEnvironment {
|
|
|
31
31
|
* While compatible with the npm package format it is not necessary that that package is an
|
|
32
32
|
* npm package:
|
|
33
33
|
* {@link https://stackoverflow.com/questions/10065564/add-custom-metadata-or-config-to-package-json-is-it-valid}
|
|
34
|
-
* @
|
|
34
|
+
* @alpha
|
|
35
35
|
*/
|
|
36
36
|
export interface IFluidPackage {
|
|
37
37
|
/**
|
|
@@ -63,14 +63,14 @@ export interface IFluidPackage {
|
|
|
63
63
|
export declare const isFluidPackage: (pkg: unknown) => pkg is Readonly<IFluidPackage>;
|
|
64
64
|
/**
|
|
65
65
|
* Package manager configuration. Provides a key value mapping of config values
|
|
66
|
-
* @
|
|
66
|
+
* @alpha
|
|
67
67
|
*/
|
|
68
68
|
export interface IFluidCodeDetailsConfig {
|
|
69
69
|
readonly [key: string]: string;
|
|
70
70
|
}
|
|
71
71
|
/**
|
|
72
72
|
* Data structure used to describe the code to load on the Fluid document
|
|
73
|
-
* @
|
|
73
|
+
* @alpha
|
|
74
74
|
*/
|
|
75
75
|
export interface IFluidCodeDetails {
|
|
76
76
|
/**
|
|
@@ -92,18 +92,18 @@ export interface IFluidCodeDetails {
|
|
|
92
92
|
*/
|
|
93
93
|
export declare const isFluidCodeDetails: (details: unknown) => details is Readonly<IFluidCodeDetails>;
|
|
94
94
|
/**
|
|
95
|
-
* @
|
|
95
|
+
* @alpha
|
|
96
96
|
*/
|
|
97
97
|
export declare const IFluidCodeDetailsComparer: keyof IProvideFluidCodeDetailsComparer;
|
|
98
98
|
/**
|
|
99
|
-
* @
|
|
99
|
+
* @alpha
|
|
100
100
|
*/
|
|
101
101
|
export interface IProvideFluidCodeDetailsComparer {
|
|
102
102
|
readonly IFluidCodeDetailsComparer: IFluidCodeDetailsComparer;
|
|
103
103
|
}
|
|
104
104
|
/**
|
|
105
105
|
* Provides capability to compare Fluid code details.
|
|
106
|
-
* @
|
|
106
|
+
* @alpha
|
|
107
107
|
*/
|
|
108
108
|
export interface IFluidCodeDetailsComparer extends IProvideFluidCodeDetailsComparer {
|
|
109
109
|
/**
|
package/lib/fluidPackage.js
CHANGED
|
@@ -22,7 +22,7 @@ export const isFluidCodeDetails = (details) => {
|
|
|
22
22
|
(maybeCodeDetails?.config === undefined || typeof maybeCodeDetails?.config === "object"));
|
|
23
23
|
};
|
|
24
24
|
/**
|
|
25
|
-
* @
|
|
25
|
+
* @alpha
|
|
26
26
|
*/
|
|
27
27
|
export const IFluidCodeDetailsComparer = "IFluidCodeDetailsComparer";
|
|
28
28
|
//# 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;AA4DH;;;;GAIG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,GAAY,EAAkC,EAAE,CAC9E,OAAO,GAAG,KAAK,QAAQ;IACvB,OAAQ,GAA8B,EAAE,IAAI,KAAK,QAAQ;IACzD,OAAQ,GAA8B,EAAE,KAAK,KAAK,QAAQ,CAAC;AA8B5D;;;GAGG;AACH,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,gBAAgB,EAAE,OAAO,KAAK,QAAQ;YAC7C,cAAc,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;QAC3C,CAAC,gBAAgB,EAAE,MAAM,KAAK,SAAS,IAAI,OAAO,gBAAgB,EAAE,MAAM,KAAK,QAAQ,CAAC,CACxF,CAAC;AACH,CAAC,CAAC;AAEF;;GAEG;AACH,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 * @
|
|
1
|
+
{"version":3,"file":"fluidPackage.js","sourceRoot":"","sources":["../src/fluidPackage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA4DH;;;;GAIG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,GAAY,EAAkC,EAAE,CAC9E,OAAO,GAAG,KAAK,QAAQ;IACvB,OAAQ,GAA8B,EAAE,IAAI,KAAK,QAAQ;IACzD,OAAQ,GAA8B,EAAE,KAAK,KAAK,QAAQ,CAAC;AA8B5D;;;GAGG;AACH,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,gBAAgB,EAAE,OAAO,KAAK,QAAQ;YAC7C,cAAc,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;QAC3C,CAAC,gBAAgB,EAAE,MAAM,KAAK,SAAS,IAAI,OAAO,gBAAgB,EAAE,MAAM,KAAK,QAAQ,CAAC,CACxF,CAAC;AACH,CAAC,CAAC;AAEF;;GAEG;AACH,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 * @alpha\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 * @alpha\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 * @internal\n */\nexport const isFluidPackage = (pkg: unknown): pkg is Readonly<IFluidPackage> =>\n\ttypeof pkg === \"object\" &&\n\ttypeof (pkg as Partial<IFluidPackage>)?.name === \"string\" &&\n\ttypeof (pkg as Partial<IFluidPackage>)?.fluid === \"object\";\n\n/**\n * Package manager configuration. Provides a key value mapping of config values\n * @alpha\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 * @alpha\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\n/**\n * Determines if any object is an IFluidCodeDetails\n * @internal\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\n/**\n * @alpha\n */\nexport const IFluidCodeDetailsComparer: keyof IProvideFluidCodeDetailsComparer =\n\t\"IFluidCodeDetailsComparer\";\n\n/**\n * @alpha\n */\nexport interface IProvideFluidCodeDetailsComparer {\n\treadonly IFluidCodeDetailsComparer: IFluidCodeDetailsComparer;\n}\n\n/**\n * Provides capability to compare Fluid code details.\n * @alpha\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"]}
|