@fluidframework/container-definitions 0.42.0-44121 → 0.44.0-47282
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 +113 -27
- package/dist/deltas.d.ts +1 -5
- package/dist/deltas.d.ts.map +1 -1
- package/dist/deltas.js.map +1 -1
- package/dist/error.d.ts +17 -1
- package/dist/error.d.ts.map +1 -1
- package/dist/error.js.map +1 -1
- package/dist/fluidModule.d.ts +3 -2
- package/dist/fluidModule.d.ts.map +1 -1
- package/dist/fluidModule.js.map +1 -1
- package/dist/fluidPackage.d.ts +109 -0
- package/dist/fluidPackage.d.ts.map +1 -0
- package/dist/fluidPackage.js +24 -0
- package/dist/fluidPackage.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/loader.d.ts +98 -8
- package/dist/loader.d.ts.map +1 -1
- package/dist/loader.js.map +1 -1
- package/dist/runtime.d.ts +13 -2
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js.map +1 -1
- package/lib/deltas.d.ts +1 -5
- package/lib/deltas.d.ts.map +1 -1
- package/lib/deltas.js.map +1 -1
- package/lib/error.d.ts +17 -1
- package/lib/error.d.ts.map +1 -1
- package/lib/error.js.map +1 -1
- package/lib/fluidModule.d.ts +3 -2
- package/lib/fluidModule.d.ts.map +1 -1
- package/lib/fluidModule.js.map +1 -1
- package/lib/fluidPackage.d.ts +109 -0
- package/lib/fluidPackage.d.ts.map +1 -0
- package/lib/fluidPackage.js +19 -0
- package/lib/fluidPackage.js.map +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/loader.d.ts +98 -8
- package/lib/loader.d.ts.map +1 -1
- package/lib/loader.js.map +1 -1
- package/lib/runtime.d.ts +13 -2
- package/lib/runtime.d.ts.map +1 -1
- package/lib/runtime.js.map +1 -1
- package/package.json +147 -7
- package/src/deltas.ts +1 -5
- package/src/error.ts +19 -1
- package/src/fluidModule.ts +3 -2
- package/src/fluidPackage.ts +132 -0
- package/src/index.ts +1 -0
- package/src/loader.ts +113 -9
- package/src/runtime.ts +15 -2
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import { ConnectionMode } from '@fluidframework/protocol-definitions';
|
|
8
8
|
import { EventEmitter } from 'events';
|
|
9
|
+
import { FluidObject } from '@fluidframework/core-interfaces';
|
|
9
10
|
import { IClient } from '@fluidframework/protocol-definitions';
|
|
10
11
|
import { IClientConfiguration } from '@fluidframework/protocol-definitions';
|
|
11
12
|
import { IClientDetails } from '@fluidframework/protocol-definitions';
|
|
@@ -15,15 +16,15 @@ import { IDocumentStorageService } from '@fluidframework/driver-definitions';
|
|
|
15
16
|
import { IErrorEvent } from '@fluidframework/common-definitions';
|
|
16
17
|
import { IEvent } from '@fluidframework/common-definitions';
|
|
17
18
|
import { IEventProvider } from '@fluidframework/common-definitions';
|
|
18
|
-
import { IFluidCodeDetails } from '@fluidframework/core-interfaces';
|
|
19
|
+
import { IFluidCodeDetails as IFluidCodeDetails_2 } from '@fluidframework/core-interfaces';
|
|
19
20
|
import { IFluidConfiguration } from '@fluidframework/core-interfaces';
|
|
20
21
|
import { IFluidObject } from '@fluidframework/core-interfaces';
|
|
21
|
-
import { IFluidPackage } from '@fluidframework/core-interfaces';
|
|
22
|
-
import { IFluidPackageEnvironment } from '@fluidframework/core-interfaces';
|
|
22
|
+
import { IFluidPackage as IFluidPackage_2 } from '@fluidframework/core-interfaces';
|
|
23
|
+
import { IFluidPackageEnvironment as IFluidPackageEnvironment_2 } from '@fluidframework/core-interfaces';
|
|
23
24
|
import { IFluidResolvedUrl } from '@fluidframework/driver-definitions';
|
|
24
25
|
import { IFluidRouter } from '@fluidframework/core-interfaces';
|
|
25
26
|
import { IPendingProposal } from '@fluidframework/protocol-definitions';
|
|
26
|
-
import { IProvideFluidCodeDetailsComparer } from '@fluidframework/core-interfaces';
|
|
27
|
+
import { IProvideFluidCodeDetailsComparer as IProvideFluidCodeDetailsComparer_2 } from '@fluidframework/core-interfaces';
|
|
27
28
|
import { IQuorum } from '@fluidframework/protocol-definitions';
|
|
28
29
|
import { IRequest } from '@fluidframework/core-interfaces';
|
|
29
30
|
import { IResolvedUrl } from '@fluidframework/driver-definitions';
|
|
@@ -34,6 +35,7 @@ import { ISignalMessage } from '@fluidframework/protocol-definitions';
|
|
|
34
35
|
import { ISnapshotTree } from '@fluidframework/protocol-definitions';
|
|
35
36
|
import { ISummaryTree } from '@fluidframework/protocol-definitions';
|
|
36
37
|
import { ITelemetryBaseLogger } from '@fluidframework/common-definitions';
|
|
38
|
+
import { ITelemetryProperties } from '@fluidframework/common-definitions';
|
|
37
39
|
import { ITokenClaims } from '@fluidframework/protocol-definitions';
|
|
38
40
|
import { ITree } from '@fluidframework/protocol-definitions';
|
|
39
41
|
import { IVersion } from '@fluidframework/protocol-definitions';
|
|
@@ -56,6 +58,16 @@ export enum BindState {
|
|
|
56
58
|
NotBound = "NotBound"
|
|
57
59
|
}
|
|
58
60
|
|
|
61
|
+
// @public
|
|
62
|
+
export namespace ConnectionState {
|
|
63
|
+
export type Connected = 2;
|
|
64
|
+
export type Connecting = 1;
|
|
65
|
+
export type Disconnected = 0;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// @public
|
|
69
|
+
export type ConnectionState = ConnectionState.Disconnected | ConnectionState.Connecting | ConnectionState.Connected;
|
|
70
|
+
|
|
59
71
|
// @public
|
|
60
72
|
export enum ContainerErrorType {
|
|
61
73
|
dataCorruptionError = "dataCorruptionError",
|
|
@@ -84,9 +96,14 @@ export interface ICodeAllowList {
|
|
|
84
96
|
testSource(source: IResolvedFluidCodeDetails): Promise<boolean>;
|
|
85
97
|
}
|
|
86
98
|
|
|
99
|
+
// @public
|
|
100
|
+
export interface ICodeDetailsLoader extends Partial<IProvideFluidCodeDetailsComparer_2> {
|
|
101
|
+
load(source: IFluidCodeDetails_2): Promise<IFluidModuleWithDetails>;
|
|
102
|
+
}
|
|
103
|
+
|
|
87
104
|
// @public @deprecated
|
|
88
|
-
export interface ICodeLoader extends Partial<
|
|
89
|
-
load(source:
|
|
105
|
+
export interface ICodeLoader extends Partial<IProvideFluidCodeDetailsComparer_2> {
|
|
106
|
+
load(source: IFluidCodeDetails_2): Promise<IFluidModule>;
|
|
90
107
|
}
|
|
91
108
|
|
|
92
109
|
// @public
|
|
@@ -100,8 +117,6 @@ export interface IConnectionDetails {
|
|
|
100
117
|
existing: boolean;
|
|
101
118
|
// (undocumented)
|
|
102
119
|
initialClients: ISignalClient[];
|
|
103
|
-
// @deprecated (undocumented)
|
|
104
|
-
maxMessageSize: number;
|
|
105
120
|
// (undocumented)
|
|
106
121
|
mode: ConnectionMode;
|
|
107
122
|
// (undocumented)
|
|
@@ -114,21 +129,31 @@ export interface IConnectionDetails {
|
|
|
114
129
|
export interface IContainer extends IEventProvider<IContainerEvents>, IFluidRouter {
|
|
115
130
|
attach(request: IRequest): Promise<void>;
|
|
116
131
|
readonly attachState: AttachState;
|
|
132
|
+
readonly audience: IAudience;
|
|
133
|
+
// @alpha
|
|
134
|
+
readonly clientId?: string | undefined;
|
|
117
135
|
close(error?: ICriticalContainerError): void;
|
|
118
136
|
closeAndGetPendingLocalState(): string;
|
|
119
137
|
readonly closed: boolean;
|
|
120
|
-
|
|
121
|
-
readonly
|
|
138
|
+
readonly connected: boolean;
|
|
139
|
+
readonly connectionState: ConnectionState;
|
|
122
140
|
deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;
|
|
141
|
+
// @alpha
|
|
142
|
+
forceReadonly?(readonly: boolean): any;
|
|
123
143
|
getAbsoluteUrl(relativeUrl: string): Promise<string | undefined>;
|
|
124
|
-
getLoadedCodeDetails?():
|
|
144
|
+
getLoadedCodeDetails?(): IFluidCodeDetails_2 | undefined;
|
|
125
145
|
getQuorum(): IQuorum;
|
|
126
|
-
getSpecifiedCodeDetails?():
|
|
146
|
+
getSpecifiedCodeDetails?(): IFluidCodeDetails_2 | undefined;
|
|
127
147
|
readonly isDirty: boolean;
|
|
128
|
-
proposeCodeDetails(codeDetails:
|
|
148
|
+
proposeCodeDetails(codeDetails: IFluidCodeDetails_2): Promise<boolean>;
|
|
149
|
+
readonly readOnlyInfo: ReadOnlyInfo;
|
|
129
150
|
request(request: IRequest): Promise<IResponse>;
|
|
130
151
|
resolvedUrl: IResolvedUrl | undefined;
|
|
152
|
+
// @alpha
|
|
153
|
+
resume?(): void;
|
|
131
154
|
serialize(): string;
|
|
155
|
+
// @alpha
|
|
156
|
+
setAutoReconnect?(reconnect: boolean): void;
|
|
132
157
|
}
|
|
133
158
|
|
|
134
159
|
// @public
|
|
@@ -155,7 +180,9 @@ export interface IContainerContext extends IDisposable {
|
|
|
155
180
|
getAbsoluteUrl?(relativeUrl: string): Promise<string | undefined>;
|
|
156
181
|
// (undocumented)
|
|
157
182
|
getLoadedFromVersion(): IVersion | undefined;
|
|
158
|
-
// (undocumented)
|
|
183
|
+
// @deprecated (undocumented)
|
|
184
|
+
getSpecifiedCodeDetails?(): IFluidCodeDetails_2 | undefined;
|
|
185
|
+
// @deprecated (undocumented)
|
|
159
186
|
readonly id: string;
|
|
160
187
|
// (undocumented)
|
|
161
188
|
readonly loader: ILoader;
|
|
@@ -169,7 +196,7 @@ export interface IContainerContext extends IDisposable {
|
|
|
169
196
|
readonly quorum: IQuorum;
|
|
170
197
|
// (undocumented)
|
|
171
198
|
raiseContainerWarning(warning: ContainerWarning): void;
|
|
172
|
-
readonly scope: IFluidObject;
|
|
199
|
+
readonly scope: IFluidObject & FluidObject;
|
|
173
200
|
// (undocumented)
|
|
174
201
|
readonly serviceConfiguration: IClientConfiguration | undefined;
|
|
175
202
|
// (undocumented)
|
|
@@ -191,9 +218,9 @@ export interface IContainerEvents extends IEvent {
|
|
|
191
218
|
// (undocumented)
|
|
192
219
|
(event: "connected", listener: (clientId: string) => void): any;
|
|
193
220
|
// (undocumented)
|
|
194
|
-
(event: "codeDetailsProposed", listener: (codeDetails:
|
|
221
|
+
(event: "codeDetailsProposed", listener: (codeDetails: IFluidCodeDetails_2, proposal: IPendingProposal) => void): any;
|
|
195
222
|
// (undocumented)
|
|
196
|
-
(event: "contextChanged", listener: (codeDetails:
|
|
223
|
+
(event: "contextChanged", listener: (codeDetails: IFluidCodeDetails_2) => void): any;
|
|
197
224
|
// (undocumented)
|
|
198
225
|
(event: "disconnected" | "attached", listener: () => void): any;
|
|
199
226
|
// (undocumented)
|
|
@@ -227,6 +254,7 @@ export interface IDeltaHandlerStrategy {
|
|
|
227
254
|
export interface IDeltaManager<T, U> extends IEventProvider<IDeltaManagerEvents>, IDeltaSender, IDisposable {
|
|
228
255
|
readonly active: boolean;
|
|
229
256
|
readonly clientDetails: IClientDetails;
|
|
257
|
+
// @deprecated (undocumented)
|
|
230
258
|
close(): void;
|
|
231
259
|
readonly hasCheckpointSequenceNumber: boolean;
|
|
232
260
|
readonly inbound: IDeltaQueue<T>;
|
|
@@ -296,38 +324,84 @@ export interface IDeltaSender extends IProvideDeltaSender {
|
|
|
296
324
|
}
|
|
297
325
|
|
|
298
326
|
// @public
|
|
299
|
-
export interface IErrorBase {
|
|
327
|
+
export interface IErrorBase extends Partial<Error> {
|
|
300
328
|
readonly errorType: string;
|
|
301
|
-
|
|
329
|
+
getTelemetryProperties?(): ITelemetryProperties;
|
|
302
330
|
readonly message: string;
|
|
331
|
+
readonly name?: string;
|
|
332
|
+
readonly stack?: string;
|
|
303
333
|
}
|
|
304
334
|
|
|
305
335
|
// @public
|
|
306
|
-
export interface IFluidBrowserPackage extends
|
|
336
|
+
export interface IFluidBrowserPackage extends IFluidPackage_2 {
|
|
307
337
|
// (undocumented)
|
|
308
338
|
fluid: {
|
|
309
339
|
browser: IFluidBrowserPackageEnvironment;
|
|
310
|
-
[environment: string]:
|
|
340
|
+
[environment: string]: IFluidPackageEnvironment_2;
|
|
311
341
|
};
|
|
312
342
|
}
|
|
313
343
|
|
|
314
344
|
// @public
|
|
315
|
-
export interface IFluidBrowserPackageEnvironment extends
|
|
345
|
+
export interface IFluidBrowserPackageEnvironment extends IFluidPackageEnvironment_2 {
|
|
316
346
|
umd: {
|
|
317
347
|
files: string[];
|
|
318
348
|
library: string;
|
|
319
349
|
};
|
|
320
350
|
}
|
|
321
351
|
|
|
352
|
+
// @public
|
|
353
|
+
export interface IFluidCodeDetails {
|
|
354
|
+
readonly config?: IFluidCodeDetailsConfig;
|
|
355
|
+
readonly package: string | Readonly<IFluidPackage>;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
// @public (undocumented)
|
|
359
|
+
export const IFluidCodeDetailsComparer: keyof IProvideFluidCodeDetailsComparer;
|
|
360
|
+
|
|
361
|
+
// @public
|
|
362
|
+
export interface IFluidCodeDetailsComparer extends IProvideFluidCodeDetailsComparer {
|
|
363
|
+
compare(a: IFluidCodeDetails, b: IFluidCodeDetails): Promise<number | undefined>;
|
|
364
|
+
satisfies(candidate: IFluidCodeDetails, constraint: IFluidCodeDetails): Promise<boolean>;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
// @public
|
|
368
|
+
export interface IFluidCodeDetailsConfig {
|
|
369
|
+
// (undocumented)
|
|
370
|
+
readonly [key: string]: string;
|
|
371
|
+
}
|
|
372
|
+
|
|
322
373
|
// @public
|
|
323
374
|
export interface IFluidCodeResolver {
|
|
324
|
-
resolveCodeDetails(details:
|
|
375
|
+
resolveCodeDetails(details: IFluidCodeDetails_2): Promise<IResolvedFluidCodeDetails>;
|
|
325
376
|
}
|
|
326
377
|
|
|
327
378
|
// @public (undocumented)
|
|
328
379
|
export interface IFluidModule {
|
|
329
380
|
// (undocumented)
|
|
330
|
-
fluidExport: IFluidObject &
|
|
381
|
+
fluidExport: IFluidObject & FluidObject<IRuntimeFactory & IProvideFluidCodeDetailsComparer_2>;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
// @public
|
|
385
|
+
export interface IFluidModuleWithDetails {
|
|
386
|
+
details: IFluidCodeDetails_2;
|
|
387
|
+
module: IFluidModule;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
// @public
|
|
391
|
+
export interface IFluidPackage {
|
|
392
|
+
[key: string]: unknown;
|
|
393
|
+
fluid: {
|
|
394
|
+
[environment: string]: undefined | IFluidPackageEnvironment;
|
|
395
|
+
};
|
|
396
|
+
name: string;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
// @public
|
|
400
|
+
export interface IFluidPackageEnvironment {
|
|
401
|
+
[target: string]: undefined | {
|
|
402
|
+
files: string[];
|
|
403
|
+
[key: string]: unknown;
|
|
404
|
+
};
|
|
331
405
|
}
|
|
332
406
|
|
|
333
407
|
// @public @deprecated (undocumented)
|
|
@@ -351,7 +425,7 @@ export interface IGenericError extends IErrorBase {
|
|
|
351
425
|
|
|
352
426
|
// @public
|
|
353
427
|
export interface IHostLoader extends ILoader {
|
|
354
|
-
createDetachedContainer(codeDetails:
|
|
428
|
+
createDetachedContainer(codeDetails: IFluidCodeDetails_2): Promise<IContainer>;
|
|
355
429
|
rehydrateDetachedContainerFromSnapshot(snapshot: string): Promise<IContainer>;
|
|
356
430
|
}
|
|
357
431
|
|
|
@@ -401,6 +475,12 @@ export interface IProvideDeltaSender {
|
|
|
401
475
|
readonly IDeltaSender: IDeltaSender;
|
|
402
476
|
}
|
|
403
477
|
|
|
478
|
+
// @public (undocumented)
|
|
479
|
+
export interface IProvideFluidCodeDetailsComparer {
|
|
480
|
+
// (undocumented)
|
|
481
|
+
readonly IFluidCodeDetailsComparer: IFluidCodeDetailsComparer;
|
|
482
|
+
}
|
|
483
|
+
|
|
404
484
|
// @public @deprecated (undocumented)
|
|
405
485
|
export interface IProvideFluidTokenProvider {
|
|
406
486
|
// (undocumented)
|
|
@@ -426,8 +506,8 @@ export interface IProxyLoaderFactory {
|
|
|
426
506
|
}
|
|
427
507
|
|
|
428
508
|
// @public
|
|
429
|
-
export interface IResolvedFluidCodeDetails extends
|
|
430
|
-
readonly resolvedPackage: Readonly<
|
|
509
|
+
export interface IResolvedFluidCodeDetails extends IFluidCodeDetails_2 {
|
|
510
|
+
readonly resolvedPackage: Readonly<IFluidPackage_2>;
|
|
431
511
|
readonly resolvedPackageCacheId: string | undefined;
|
|
432
512
|
}
|
|
433
513
|
|
|
@@ -454,6 +534,12 @@ export interface IRuntimeFactory extends IProvideRuntimeFactory {
|
|
|
454
534
|
// @public
|
|
455
535
|
export const isFluidBrowserPackage: (maybePkg: any) => maybePkg is Readonly<IFluidBrowserPackage>;
|
|
456
536
|
|
|
537
|
+
// @public (undocumented)
|
|
538
|
+
export const isFluidCodeDetails: (details: unknown) => details is Readonly<IFluidCodeDetails>;
|
|
539
|
+
|
|
540
|
+
// @public
|
|
541
|
+
export const isFluidPackage: (pkg: any) => pkg is Readonly<IFluidPackage>;
|
|
542
|
+
|
|
457
543
|
// @public
|
|
458
544
|
export interface IThrottlingWarning extends IErrorBase {
|
|
459
545
|
// (undocumented)
|
package/dist/deltas.d.ts
CHANGED
|
@@ -14,10 +14,6 @@ export interface IConnectionDetails {
|
|
|
14
14
|
mode: ConnectionMode;
|
|
15
15
|
version: string;
|
|
16
16
|
initialClients: ISignalClient[];
|
|
17
|
-
/**
|
|
18
|
-
* @deprecated - please use `serviceConfiguration.maxMessageSize`
|
|
19
|
-
*/
|
|
20
|
-
maxMessageSize: number;
|
|
21
17
|
serviceConfiguration: IClientConfiguration;
|
|
22
18
|
/**
|
|
23
19
|
* Last known sequence number to ordering service at the time of connection
|
|
@@ -134,7 +130,7 @@ export interface IDeltaManager<T, U> extends IEventProvider<IDeltaManagerEvents>
|
|
|
134
130
|
*/
|
|
135
131
|
readonly readonly?: boolean;
|
|
136
132
|
readonly readOnlyInfo: ReadOnlyInfo;
|
|
137
|
-
/**
|
|
133
|
+
/** @deprecated - Use Container.close() or IContainerContext.closeFn() */
|
|
138
134
|
close(): void;
|
|
139
135
|
/** Submit a signal to the service to be broadcast to other connected clients, but not persisted */
|
|
140
136
|
submitSignal(content: any): void;
|
package/dist/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,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACtG,OAAO,EACH,cAAc,EACd,oBAAoB,EACpB,cAAc,EACd,gBAAgB,EAChB,yBAAyB,EACzB,aAAa,EACb,cAAc,EACd,YAAY,EACf,MAAM,sCAAsC,CAAC;AAE9C;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,YAAY,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,cAAc,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,aAAa,EAAE,CAAC;IAChC
|
|
1
|
+
{"version":3,"file":"deltas.d.ts","sourceRoot":"","sources":["../src/deltas.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACtG,OAAO,EACH,cAAc,EACd,oBAAoB,EACpB,cAAc,EACd,gBAAgB,EAChB,yBAAyB,EACzB,aAAa,EACb,cAAc,EACd,YAAY,EACf,MAAM,sCAAsC,CAAC;AAE9C;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,YAAY,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,cAAc,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,aAAa,EAAE,CAAC;IAChC,oBAAoB,EAAE,oBAAoB,CAAC;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K,GAAG,SAAS,CAAC;CACxC,GAAG;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;CACjC,CAAC"}
|
package/dist/deltas.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deltas.js","sourceRoot":"","sources":["../src/deltas.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;
|
|
1
|
+
{"version":3,"file":"deltas.js","sourceRoot":"","sources":["../src/deltas.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAyDH;;GAEG;AACU,QAAA,YAAY,GAA8B,cAAc,CAAC","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 * Last known sequence number to ordering service at the time of connection\n * It may lap actual last sequence number (quite a bit, if container is very active).\n * But it's 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\ndeclare module \"@fluidframework/core-interfaces\" {\n interface IFluidObject {\n /** @deprecated - use `FluidObject<IDeltaSender>` instead */\n readonly IDeltaSender?: IDeltaSender\n }\n}\n\n/**\n * @deprecated - This will be removed in a later release.\n */\nexport const IDeltaSender: keyof IProvideDeltaSender = \"IDeltaSender\";\n\n/**\n * @deprecated - This will be removed in a later release.\n */\nexport interface IProvideDeltaSender {\n /**\n * @deprecated - This will be removed in a later release.\n */\n readonly IDeltaSender: IDeltaSender;\n}\n\n/**\n * Contract supporting delivery of outbound messages to the server\n */\nexport interface IDeltaSender extends IProvideDeltaSender {\n /**\n * Flush all pending messages through the outbound queue\n */\n flush(): void;\n}\n\n/** Events emitted by the Delta Manager */\nexport interface IDeltaManagerEvents extends IEvent {\n (event: \"prepareSend\", listener: (messageBuffer: any[]) => void);\n (event: \"submitOp\", listener: (message: IDocumentMessage) => void);\n (event: \"op\", listener: (message: ISequencedDocumentMessage, processingTime: number) => void);\n (event: \"allSentOpsAckd\", listener: () => void);\n (event: \"pong\" | \"processTime\", listener: (latency: number) => void);\n /**\n * The connect event fires once we've received the connect_document_success message from the\n * server. This happens prior to the client's join message (if there is a join message).\n */\n (event: \"connect\", listener: (details: IConnectionDetails, opsBehind?: number) => void);\n (event: \"disconnect\", listener: (reason: string) => void);\n (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> 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 /**\n * Tells if container is in read-only mode.\n * Data stores should listen for \"readonly\" notifications and disallow user making changes to data stores.\n * Readonly state can be because of no storage write permission,\n * or due to host forcing readonly mode for container.\n *\n * We do not differentiate here between no write access to storage vs. host disallowing changes to container -\n * in all cases container runtime and data stores should respect readonly state and not allow local changes.\n *\n * It is undefined if we have not yet established websocket connection\n * and do not know if user has write access to a file.\n * @deprecated - use readOnlyInfo\n */\n readonly readonly?: boolean;\n\n readonly readOnlyInfo: ReadOnlyInfo;\n\n /** @deprecated - Use Container.close() or IContainerContext.closeFn() */\n close(): void;\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/** Events emitted by a Delta Queue */\nexport interface IDeltaQueueEvents<T> extends IErrorEvent {\n (event: \"push\" | \"op\", listener: (task: T) => void);\n /**\n * @param count - number of events (T) processed before becoming idle\n * @param duration - amount of time it took to process elements (milliseconds).\n */\n (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 /**\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 */\n idle: boolean;\n\n /**\n * Pauses processing on the queue\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 waitTillProcessingDone(): Promise<void>;\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"]}
|
package/dist/error.d.ts
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
+
import { ITelemetryProperties } from "@fluidframework/common-definitions";
|
|
5
6
|
/**
|
|
6
7
|
* Different error types the Container may report out to the Host
|
|
7
8
|
*/
|
|
@@ -30,14 +31,29 @@ export declare enum ContainerErrorType {
|
|
|
30
31
|
/**
|
|
31
32
|
* Base interface for all errors and warnings at container level
|
|
32
33
|
*/
|
|
33
|
-
export interface IErrorBase {
|
|
34
|
+
export interface IErrorBase extends Partial<Error> {
|
|
34
35
|
/** errorType is a union of error types from
|
|
35
36
|
* - container
|
|
36
37
|
* - runtime
|
|
37
38
|
* - drivers
|
|
38
39
|
*/
|
|
39
40
|
readonly errorType: string;
|
|
41
|
+
/**
|
|
42
|
+
* See Error.message
|
|
43
|
+
* Privacy Note - This is a freeform string that we may not control in all cases (e.g. a dependency throws an error)
|
|
44
|
+
* If there are known cases where this contains privacy-sensitive data it will be tagged and included in the result
|
|
45
|
+
* of getTelemetryProperties. When logging, consider fetching it that way rather than straight from this field.
|
|
46
|
+
*/
|
|
40
47
|
readonly message: string;
|
|
48
|
+
/** See Error.name */
|
|
49
|
+
readonly name?: string;
|
|
50
|
+
/** See Error.stack */
|
|
51
|
+
readonly stack?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Returns all properties of this error object that are either safe to log
|
|
54
|
+
* or explicitly tagged as containing privacy-sensitive data.
|
|
55
|
+
*/
|
|
56
|
+
getTelemetryProperties?(): ITelemetryProperties;
|
|
41
57
|
}
|
|
42
58
|
/**
|
|
43
59
|
* Represents warnings raised on container.
|
package/dist/error.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,oBAAY,kBAAkB;IAC1B;;OAEG;IACH,YAAY,iBAAiB;IAE7B;;OAEG;IACH,eAAe,oBAAoB;IAEnC;;OAEG;IACH,mBAAmB,wBAAwB;IAE3C;;OAEG;IACH,mBAAmB,wBAAwB;IAE3C;;OAEG;IACF,UAAU,eAAe;CACzB;AAEL;;GAEG;AACH,MAAM,WAAW,
|
|
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;IAC1B;;OAEG;IACH,YAAY,iBAAiB;IAE7B;;OAEG;IACH,eAAe,oBAAoB;IAEnC;;OAEG;IACH,mBAAmB,wBAAwB;IAE3C;;OAEG;IACH,mBAAmB,wBAAwB;IAE3C;;OAEG;IACF,UAAU,eAAe;CACzB;AAEL;;GAEG;AACH,MAAM,WAAW,UAAW,SAAQ,OAAO,CAAC,KAAK,CAAC;IAC9C;;;;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;CACnD;AAED;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,UAAU;IAChD;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,oBAAY,uBAAuB,GAAG,UAAU,CAAC;AAEjD;;GAEG;AACH,MAAM,WAAW,aAAc,SAAQ,UAAU;IAC7C,QAAQ,CAAC,SAAS,EAAE,kBAAkB,CAAC,YAAY,CAAC;IACpD,KAAK,CAAC,EAAE,GAAG,CAAC;CACf;AAED;;GAEG;AACF,MAAM,WAAW,WAAY,SAAQ,UAAU;IAC5C,QAAQ,CAAC,SAAS,EAAE,kBAAkB,CAAC,UAAU,CAAC;CACrD;AAED;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,UAAU;IAClD,QAAQ,CAAC,SAAS,EAAE,kBAAkB,CAAC,eAAe,CAAC;IACvD,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;CACtC"}
|
package/dist/error.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.js","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;
|
|
1
|
+
{"version":3,"file":"error.js","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIH;;GAEG;AACH,IAAY,kBAyBP;AAzBL,WAAY,kBAAkB;IAC1B;;OAEG;IACH,mDAA6B,CAAA;IAE7B;;OAEG;IACH,yDAAmC,CAAA;IAEnC;;OAEG;IACH,iEAA2C,CAAA;IAE3C;;OAEG;IACH,iEAA2C,CAAA;IAE3C;;OAEG;IACF,+CAAyB,CAAA;AAC1B,CAAC,EAzBO,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAyBzB","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 /**\n * Some error, most likely an exception caught by runtime and propagated to container as critical error\n */\n genericError = \"genericError\",\n\n /**\n * Throttling error from server. Server is busy and is asking not to reconnect for some time\n */\n throttlingError = \"throttlingError\",\n\n /**\n * Data loss error detected by Container / DeltaManager. Likely points to storage issue.\n */\n dataCorruptionError = \"dataCorruptionError\",\n\n /**\n * Error encountered when processing an operation. May correlate with data corruption.\n */\n dataProcessingError = \"dataProcessingError\",\n\n /**\n * Error indicating an API is being used improperly resulting in an invalid operation.\n */\n usageError = \"usageError\",\n }\n\n/**\n * Base interface for all errors and warnings at container level\n */\nexport interface IErrorBase extends Partial<Error> {\n /** errorType is a union of error types from\n * - container\n * - runtime\n * - drivers\n */\n readonly errorType: string;\n\n /**\n * See Error.message\n * Privacy Note - This is a freeform string that we may not control in all cases (e.g. a dependency throws an error)\n * If there are known cases where this contains privacy-sensitive data it will be tagged and included in the result\n * of getTelemetryProperties. When logging, consider fetching it that way rather than straight from this field.\n */\n readonly message: string;\n /** See Error.name */\n readonly name?: string;\n /** See Error.stack */\n readonly stack?: string;\n /**\n * Returns all properties of this error object that are either safe to log\n * or explicitly tagged as containing privacy-sensitive data.\n */\n getTelemetryProperties?(): ITelemetryProperties;\n}\n\n/**\n * Represents warnings raised on container.\n */\nexport interface ContainerWarning extends IErrorBase {\n /**\n * Whether this error has already been logged. Used to avoid logging errors twice.\n * Default is false.\n */\n logged?: 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 readonly errorType: ContainerErrorType.genericError;\n error?: any;\n}\n\n/**\n * Error indicating an API is being used improperly resulting in an invalid operation.\n */\n export interface IUsageError extends IErrorBase {\n readonly errorType: ContainerErrorType.usageError;\n}\n\n/**\n * Warning emitted when requests to storage are being throttled\n */\nexport interface IThrottlingWarning extends IErrorBase {\n readonly errorType: ContainerErrorType.throttlingError;\n readonly retryAfterSeconds: number;\n}\n"]}
|
package/dist/fluidModule.d.ts
CHANGED
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import { IFluidObject, IProvideFluidCodeDetailsComparer } from "@fluidframework/core-interfaces";
|
|
5
|
+
import { FluidObject, IFluidObject, IProvideFluidCodeDetailsComparer } from "@fluidframework/core-interfaces";
|
|
6
|
+
import { IRuntimeFactory } from "./runtime";
|
|
6
7
|
export interface IFluidModule {
|
|
7
|
-
fluidExport: IFluidObject &
|
|
8
|
+
fluidExport: IFluidObject & FluidObject<IRuntimeFactory & IProvideFluidCodeDetailsComparer>;
|
|
8
9
|
}
|
|
9
10
|
//# sourceMappingURL=fluidModule.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fluidModule.d.ts","sourceRoot":"","sources":["../src/fluidModule.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,gCAAgC,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"fluidModule.d.ts","sourceRoot":"","sources":["../src/fluidModule.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,gCAAgC,EAAE,MAAM,iCAAiC,CAAC;AAC9G,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAE5C,MAAM,WAAW,YAAY;IACzB,WAAW,EAAE,YAAY,GAAG,WAAW,CAAC,eAAe,GAAG,gCAAgC,CAAC,CAAC;CAC/F"}
|
package/dist/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 { IFluidObject, IProvideFluidCodeDetailsComparer } from \"@fluidframework/core-interfaces\";\n\nexport interface IFluidModule {\n fluidExport: IFluidObject &
|
|
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, IFluidObject, IProvideFluidCodeDetailsComparer } from \"@fluidframework/core-interfaces\";\nimport { IRuntimeFactory } from \"./runtime\";\n\nexport interface IFluidModule {\n fluidExport: IFluidObject & FluidObject<IRuntimeFactory & IProvideFluidCodeDetailsComparer>;\n}\n"]}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Specifies an environment on Fluid property of a IFluidPackage
|
|
7
|
+
*/
|
|
8
|
+
export interface IFluidPackageEnvironment {
|
|
9
|
+
/**
|
|
10
|
+
* The name of the target. For a browser environment, this could be umd for scripts
|
|
11
|
+
* or css for styles.
|
|
12
|
+
*/
|
|
13
|
+
[target: string]: undefined | {
|
|
14
|
+
/**
|
|
15
|
+
* List of files for the target. These can be relative or absolute.
|
|
16
|
+
* The code loader should resolve relative paths, and validate all
|
|
17
|
+
* full urls.
|
|
18
|
+
*/
|
|
19
|
+
files: string[];
|
|
20
|
+
/**
|
|
21
|
+
* General access for extended fields as specific usages will
|
|
22
|
+
* likely have additional infornamation like a definition
|
|
23
|
+
* of Library, the entrypoint for umd packages
|
|
24
|
+
*/
|
|
25
|
+
[key: string]: unknown;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Fluid-specific properties expected on a package to be loaded by the code loader.
|
|
30
|
+
* While compatible with the npm package format it is not necessary that that package is an
|
|
31
|
+
* npm package:
|
|
32
|
+
* {@link https://stackoverflow.com/questions/10065564/add-custom-metadata-or-config-to-package-json-is-it-valid}
|
|
33
|
+
*/
|
|
34
|
+
export interface IFluidPackage {
|
|
35
|
+
/**
|
|
36
|
+
* The name of the package that this code represnets
|
|
37
|
+
*/
|
|
38
|
+
name: string;
|
|
39
|
+
/**
|
|
40
|
+
* This object represents the Fluid specific properties of the package
|
|
41
|
+
*/
|
|
42
|
+
fluid: {
|
|
43
|
+
/**
|
|
44
|
+
* The name of the of the environment. This should be something like browser, or node
|
|
45
|
+
* and contain the necessary targets for loading this code in that environment.
|
|
46
|
+
*/
|
|
47
|
+
[environment: string]: undefined | IFluidPackageEnvironment;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* General access for extended fields as specific usages will
|
|
51
|
+
* likely have additional infornamation like a definition of
|
|
52
|
+
* compatible versions, or deployment information like rings or rollouts.
|
|
53
|
+
*/
|
|
54
|
+
[key: string]: unknown;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Check if the package.json defines a Fluid package
|
|
58
|
+
* @param pkg - the package json data to check if it is a Fluid package.
|
|
59
|
+
*/
|
|
60
|
+
export declare const isFluidPackage: (pkg: any) => pkg is Readonly<IFluidPackage>;
|
|
61
|
+
/**
|
|
62
|
+
* Package manager configuration. Provides a key value mapping of config values
|
|
63
|
+
*/
|
|
64
|
+
export interface IFluidCodeDetailsConfig {
|
|
65
|
+
readonly [key: string]: string;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Data structure used to describe the code to load on the Fluid document
|
|
69
|
+
*/
|
|
70
|
+
export interface IFluidCodeDetails {
|
|
71
|
+
/**
|
|
72
|
+
* The code package to be used on the Fluid document. This is either the package name which will be loaded
|
|
73
|
+
* from a package manager. Or the expanded Fluid package.
|
|
74
|
+
*/
|
|
75
|
+
readonly package: string | Readonly<IFluidPackage>;
|
|
76
|
+
/**
|
|
77
|
+
* Configuration details. This includes links to the package manager and base CDNs.
|
|
78
|
+
*/
|
|
79
|
+
readonly config?: IFluidCodeDetailsConfig;
|
|
80
|
+
}
|
|
81
|
+
export declare const isFluidCodeDetails: (details: unknown) => details is Readonly<IFluidCodeDetails>;
|
|
82
|
+
export declare const IFluidCodeDetailsComparer: keyof IProvideFluidCodeDetailsComparer;
|
|
83
|
+
export interface IProvideFluidCodeDetailsComparer {
|
|
84
|
+
readonly IFluidCodeDetailsComparer: IFluidCodeDetailsComparer;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Provides capability to compare Fluid code details.
|
|
88
|
+
*/
|
|
89
|
+
export interface IFluidCodeDetailsComparer extends IProvideFluidCodeDetailsComparer {
|
|
90
|
+
/**
|
|
91
|
+
* Determines if the `candidate` code details satisfy the constraints specified in `constraint` code details.
|
|
92
|
+
*
|
|
93
|
+
* Similar semantics to:
|
|
94
|
+
* {@link https://github.com/npm/node-semver#usage}
|
|
95
|
+
*/
|
|
96
|
+
satisfies(candidate: IFluidCodeDetails, constraint: IFluidCodeDetails): Promise<boolean>;
|
|
97
|
+
/**
|
|
98
|
+
* Return a number representing the ascending sort order of the `a` and `b` code details;
|
|
99
|
+
* `< 0` if `a < b`.
|
|
100
|
+
* `= 0` if `a === b`.
|
|
101
|
+
* `> 0` if `a > b`.
|
|
102
|
+
* `undefined` if `a` is not comparable to `b`.
|
|
103
|
+
*
|
|
104
|
+
* Similar semantics to:
|
|
105
|
+
* {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#Description | Array.sort}
|
|
106
|
+
*/
|
|
107
|
+
compare(a: IFluidCodeDetails, b: IFluidCodeDetails): Promise<number | undefined>;
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=fluidPackage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fluidPackage.d.ts","sourceRoot":"","sources":["../src/fluidPackage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEF;;GAEG;AACJ,MAAM,WAAW,wBAAwB;IAErC;;;OAGG;IACH,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG;QAC1B;;;;WAIG;QACH,KAAK,EAAE,MAAM,EAAE,CAAC;QAEhB;;;;WAIG;QACH,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KAC1B,CAAA;CACJ;AAED;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC1B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,KAAK,EAAE;QACH;;;WAGG;QACH,CAAC,WAAW,EAAE,MAAM,GAAI,SAAS,GAAG,wBAAwB,CAAC;KAChE,CAAC;IACF;;;;OAIG;IACH,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc,QAAS,GAAG,mCAGF,CAAC;AAEtC;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACpC,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CAClC;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAC9B;;;OAGG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,CAAC;IAEnD;;OAEG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,uBAAuB,CAAC;CAC7C;AAED,eAAO,MAAM,kBAAkB,YAAa,OAAO,2CAKlD,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,MAAM,gCAA8D,CAAC;AAE7G,MAAM,WAAW,gCAAgC;IAC7C,QAAQ,CAAC,yBAAyB,EAAE,yBAAyB,CAAE;CAClE;AAED;;GAEG;AACH,MAAM,WAAW,yBAA0B,SAAQ,gCAAgC;IAE/E;;;;;OAKG;IACH,SAAS,CAAC,SAAS,EAAE,iBAAiB,EAAE,UAAU,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAGzF;;;;;;;;;OASG;IACH,OAAO,CAAC,CAAC,EAAE,iBAAiB,EAAE,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;CAEpF"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*!
|
|
3
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
4
|
+
* Licensed under the MIT License.
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.IFluidCodeDetailsComparer = exports.isFluidCodeDetails = exports.isFluidPackage = void 0;
|
|
8
|
+
/**
|
|
9
|
+
* Check if the package.json defines a Fluid package
|
|
10
|
+
* @param pkg - the package json data to check if it is a Fluid package.
|
|
11
|
+
*/
|
|
12
|
+
const isFluidPackage = (pkg) => typeof pkg === "object"
|
|
13
|
+
&& typeof (pkg === null || pkg === void 0 ? void 0 : pkg.name) === "string"
|
|
14
|
+
&& typeof (pkg === null || pkg === void 0 ? void 0 : pkg.fluid) === "object";
|
|
15
|
+
exports.isFluidPackage = isFluidPackage;
|
|
16
|
+
const isFluidCodeDetails = (details) => {
|
|
17
|
+
const maybeCodeDetails = details;
|
|
18
|
+
return typeof maybeCodeDetails === "object"
|
|
19
|
+
&& (typeof (maybeCodeDetails === null || maybeCodeDetails === void 0 ? void 0 : maybeCodeDetails.package) === "string" || exports.isFluidPackage(maybeCodeDetails === null || maybeCodeDetails === void 0 ? void 0 : maybeCodeDetails.package))
|
|
20
|
+
&& ((maybeCodeDetails === null || maybeCodeDetails === void 0 ? void 0 : maybeCodeDetails.config) === undefined || typeof (maybeCodeDetails === null || maybeCodeDetails === void 0 ? void 0 : maybeCodeDetails.config) === "object");
|
|
21
|
+
};
|
|
22
|
+
exports.isFluidCodeDetails = isFluidCodeDetails;
|
|
23
|
+
exports.IFluidCodeDetailsComparer = "IFluidCodeDetailsComparer";
|
|
24
|
+
//# sourceMappingURL=fluidPackage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fluidPackage.js","sourceRoot":"","sources":["../src/fluidPackage.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAyDH;;;GAGG;AACI,MAAM,cAAc,GAAG,CAAC,GAAQ,EAAkC,EAAE,CACvE,OAAO,GAAG,KAAK,QAAQ;OACpB,QAAO,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,IAAI,CAAA,KAAK,QAAQ;OAC7B,QAAO,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,KAAK,CAAA,KAAK,QAAQ,CAAC;AAHzB,QAAA,cAAc,kBAGW;AAyB/B,MAAM,kBAAkB,GAAG,CAAC,OAAgB,EAA0C,EAAE;IAC3F,MAAM,gBAAgB,GAAG,OAAiD,CAAC;IAC3E,OAAO,OAAO,gBAAgB,KAAK,QAAQ;WACpC,CAAC,QAAO,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,OAAO,CAAA,KAAK,QAAQ,IAAI,sBAAc,CAAC,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,OAAO,CAAC,CAAC;WAC5F,CAAC,CAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,MAAM,MAAK,SAAS,IAAI,QAAO,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,MAAM,CAAA,KAAK,QAAQ,CAAC,CAAC;AACpG,CAAC,CAAC;AALW,QAAA,kBAAkB,sBAK7B;AAEW,QAAA,yBAAyB,GAA2C,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\n /**\n * The name of the target. For a browser environment, this could be umd for scripts\n * or css for styles.\n */\n [target: string]: undefined | {\n /**\n * List of files for the target. These can be relative or absolute.\n * The code loader should resolve relative paths, and validate all\n * full urls.\n */\n files: string[];\n\n /**\n * General access for extended fields as specific usages will\n * likely have additional infornamation like a definition\n * of Library, the entrypoint for umd packages\n */\n [key: string]: unknown;\n }\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 /**\n * The name of the package that this code represnets\n */\n name: string;\n /**\n * This object represents the Fluid specific properties of the package\n */\n fluid: {\n /**\n * The name of the of the environment. This should be something like browser, or node\n * and contain the necessary targets for loading this code in that environment.\n */\n [environment: string]: undefined | IFluidPackageEnvironment;\n };\n /**\n * General access for extended fields as specific usages will\n * likely have additional infornamation like a definition of\n * compatible versions, or deployment information like rings or rollouts.\n */\n [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 typeof pkg === \"object\"\n && typeof pkg?.name === \"string\"\n && typeof pkg?.fluid === \"object\";\n\n/**\n * Package manager configuration. Provides a key value mapping of config values\n */\nexport interface IFluidCodeDetailsConfig {\n readonly [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 /**\n * The code package to be used on the Fluid document. This is either the package name which will be loaded\n * from a package manager. Or the expanded Fluid package.\n */\n readonly package: string | Readonly<IFluidPackage>;\n\n /**\n * Configuration details. This includes links to the package manager and base CDNs.\n */\n readonly config?: IFluidCodeDetailsConfig;\n}\n\nexport const isFluidCodeDetails = (details: unknown): details is Readonly<IFluidCodeDetails> =>{\n const maybeCodeDetails = details as Partial<IFluidCodeDetails> | undefined;\n return typeof maybeCodeDetails === \"object\"\n && (typeof maybeCodeDetails?.package === \"string\" || isFluidPackage(maybeCodeDetails?.package))\n && (maybeCodeDetails?.config === undefined || typeof maybeCodeDetails?.config === \"object\");\n};\n\nexport const IFluidCodeDetailsComparer: keyof IProvideFluidCodeDetailsComparer = \"IFluidCodeDetailsComparer\";\n\nexport interface IProvideFluidCodeDetailsComparer {\n readonly IFluidCodeDetailsComparer: IFluidCodeDetailsComparer ;\n}\n\n/**\n * Provides capability to compare Fluid code details.\n */\nexport interface IFluidCodeDetailsComparer extends IProvideFluidCodeDetailsComparer {\n\n /**\n * Determines if the `candidate` code details satisfy the constraints specified in `constraint` code details.\n *\n * Similar semantics to:\n * {@link https://github.com/npm/node-semver#usage}\n */\n satisfies(candidate: IFluidCodeDetails, constraint: IFluidCodeDetails): Promise<boolean>;\n\n/* eslint-disable max-len */\n /**\n * Return a number representing the ascending sort order of the `a` and `b` code details;\n * `< 0` if `a < b`.\n * `= 0` if `a === b`.\n * `> 0` if `a > b`.\n * `undefined` if `a` is not comparable to `b`.\n *\n * Similar semantics to:\n * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#Description | Array.sort}\n */\n compare(a: IFluidCodeDetails, b: IFluidCodeDetails): Promise<number | undefined>;\n/* eslint-enable max-len */\n}\n"]}
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AAEjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AAEjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC"}
|