@fluidframework/container-definitions 0.42.0-43895 → 0.43.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/api-report/container-definitions.api.md +124 -31
  2. package/dist/deltas.d.ts +12 -5
  3. package/dist/deltas.d.ts.map +1 -1
  4. package/dist/deltas.js +3 -0
  5. package/dist/deltas.js.map +1 -1
  6. package/dist/error.d.ts +17 -1
  7. package/dist/error.d.ts.map +1 -1
  8. package/dist/error.js.map +1 -1
  9. package/dist/fluidModule.d.ts +3 -2
  10. package/dist/fluidModule.d.ts.map +1 -1
  11. package/dist/fluidModule.js.map +1 -1
  12. package/dist/fluidPackage.d.ts +109 -0
  13. package/dist/fluidPackage.d.ts.map +1 -0
  14. package/dist/fluidPackage.js +24 -0
  15. package/dist/fluidPackage.js.map +1 -0
  16. package/dist/index.d.ts +1 -6
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/index.js +5 -4
  19. package/dist/index.js.map +1 -1
  20. package/dist/legacy/chaincode.d.ts +15 -2
  21. package/dist/legacy/chaincode.d.ts.map +1 -1
  22. package/dist/legacy/chaincode.js +3 -0
  23. package/dist/legacy/chaincode.js.map +1 -1
  24. package/dist/loader.d.ts +107 -6
  25. package/dist/loader.d.ts.map +1 -1
  26. package/dist/loader.js.map +1 -1
  27. package/dist/runtime.d.ts +10 -2
  28. package/dist/runtime.d.ts.map +1 -1
  29. package/dist/runtime.js.map +1 -1
  30. package/lib/deltas.d.ts +12 -5
  31. package/lib/deltas.d.ts.map +1 -1
  32. package/lib/deltas.js +3 -0
  33. package/lib/deltas.js.map +1 -1
  34. package/lib/error.d.ts +17 -1
  35. package/lib/error.d.ts.map +1 -1
  36. package/lib/error.js.map +1 -1
  37. package/lib/fluidModule.d.ts +3 -2
  38. package/lib/fluidModule.d.ts.map +1 -1
  39. package/lib/fluidModule.js.map +1 -1
  40. package/lib/fluidPackage.d.ts +109 -0
  41. package/lib/fluidPackage.d.ts.map +1 -0
  42. package/lib/fluidPackage.js +19 -0
  43. package/lib/fluidPackage.js.map +1 -0
  44. package/lib/index.d.ts +1 -6
  45. package/lib/index.d.ts.map +1 -1
  46. package/lib/index.js +1 -0
  47. package/lib/index.js.map +1 -1
  48. package/lib/legacy/chaincode.d.ts +15 -2
  49. package/lib/legacy/chaincode.d.ts.map +1 -1
  50. package/lib/legacy/chaincode.js +3 -0
  51. package/lib/legacy/chaincode.js.map +1 -1
  52. package/lib/loader.d.ts +107 -6
  53. package/lib/loader.d.ts.map +1 -1
  54. package/lib/loader.js.map +1 -1
  55. package/lib/runtime.d.ts +10 -2
  56. package/lib/runtime.d.ts.map +1 -1
  57. package/lib/runtime.js.map +1 -1
  58. package/package.json +86 -6
  59. package/src/deltas.ts +13 -6
  60. package/src/error.ts +19 -1
  61. package/src/fluidModule.ts +3 -2
  62. package/src/fluidPackage.ts +132 -0
  63. package/src/index.ts +1 -11
  64. package/src/legacy/chaincode.ts +16 -6
  65. package/src/loader.ts +123 -6
  66. package/src/runtime.ts +12 -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<IProvideFluidCodeDetailsComparer> {
89
- load(source: IFluidCodeDetails): Promise<IFluidModule>;
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,33 @@ 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
138
  // @deprecated
121
- readonly codeDetails: IFluidCodeDetails | undefined;
139
+ readonly codeDetails?: IFluidCodeDetails_2 | undefined;
140
+ readonly connected?: boolean;
141
+ readonly connectionState?: ConnectionState;
122
142
  deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;
143
+ // @alpha
144
+ forceReadonly?(readonly: boolean): any;
123
145
  getAbsoluteUrl(relativeUrl: string): Promise<string | undefined>;
124
- getLoadedCodeDetails?(): IFluidCodeDetails | undefined;
146
+ getLoadedCodeDetails?(): IFluidCodeDetails_2 | undefined;
125
147
  getQuorum(): IQuorum;
126
- getSpecifiedCodeDetails?(): IFluidCodeDetails | undefined;
148
+ getSpecifiedCodeDetails?(): IFluidCodeDetails_2 | undefined;
127
149
  readonly isDirty: boolean;
128
- proposeCodeDetails(codeDetails: IFluidCodeDetails): Promise<boolean>;
150
+ proposeCodeDetails(codeDetails: IFluidCodeDetails_2): Promise<boolean>;
151
+ readonly readOnlyInfo?: ReadOnlyInfo;
129
152
  request(request: IRequest): Promise<IResponse>;
130
153
  resolvedUrl: IResolvedUrl | undefined;
154
+ // @alpha
155
+ resume?(): void;
131
156
  serialize(): string;
157
+ // @alpha
158
+ setAutoReconnect?(reconnect: boolean): void;
132
159
  }
133
160
 
134
161
  // @public
@@ -155,6 +182,8 @@ export interface IContainerContext extends IDisposable {
155
182
  getAbsoluteUrl?(relativeUrl: string): Promise<string | undefined>;
156
183
  // (undocumented)
157
184
  getLoadedFromVersion(): IVersion | undefined;
185
+ // @deprecated (undocumented)
186
+ getSpecifiedCodeDetails?(): IFluidCodeDetails_2 | undefined;
158
187
  // (undocumented)
159
188
  readonly id: string;
160
189
  // (undocumented)
@@ -169,7 +198,7 @@ export interface IContainerContext extends IDisposable {
169
198
  readonly quorum: IQuorum;
170
199
  // (undocumented)
171
200
  raiseContainerWarning(warning: ContainerWarning): void;
172
- readonly scope: IFluidObject;
201
+ readonly scope: IFluidObject & FluidObject;
173
202
  // (undocumented)
174
203
  readonly serviceConfiguration: IClientConfiguration | undefined;
175
204
  // (undocumented)
@@ -191,9 +220,9 @@ export interface IContainerEvents extends IEvent {
191
220
  // (undocumented)
192
221
  (event: "connected", listener: (clientId: string) => void): any;
193
222
  // (undocumented)
194
- (event: "codeDetailsProposed", listener: (codeDetails: IFluidCodeDetails, proposal: IPendingProposal) => void): any;
223
+ (event: "codeDetailsProposed", listener: (codeDetails: IFluidCodeDetails_2, proposal: IPendingProposal) => void): any;
195
224
  // (undocumented)
196
- (event: "contextChanged", listener: (codeDetails: IFluidCodeDetails) => void): any;
225
+ (event: "contextChanged", listener: (codeDetails: IFluidCodeDetails_2) => void): any;
197
226
  // (undocumented)
198
227
  (event: "disconnected" | "attached", listener: () => void): any;
199
228
  // (undocumented)
@@ -287,7 +316,7 @@ export interface IDeltaQueueEvents<T> extends IErrorEvent {
287
316
  (event: "idle", listener: (count: number, duration: number) => void): any;
288
317
  }
289
318
 
290
- // @public (undocumented)
319
+ // @public @deprecated (undocumented)
291
320
  export const IDeltaSender: keyof IProvideDeltaSender;
292
321
 
293
322
  // @public
@@ -296,44 +325,90 @@ export interface IDeltaSender extends IProvideDeltaSender {
296
325
  }
297
326
 
298
327
  // @public
299
- export interface IErrorBase {
328
+ export interface IErrorBase extends Partial<Error> {
300
329
  readonly errorType: string;
301
- // (undocumented)
330
+ getTelemetryProperties?(): ITelemetryProperties;
302
331
  readonly message: string;
332
+ readonly name?: string;
333
+ readonly stack?: string;
303
334
  }
304
335
 
305
336
  // @public
306
- export interface IFluidBrowserPackage extends IFluidPackage {
337
+ export interface IFluidBrowserPackage extends IFluidPackage_2 {
307
338
  // (undocumented)
308
339
  fluid: {
309
340
  browser: IFluidBrowserPackageEnvironment;
310
- [environment: string]: IFluidPackageEnvironment;
341
+ [environment: string]: IFluidPackageEnvironment_2;
311
342
  };
312
343
  }
313
344
 
314
345
  // @public
315
- export interface IFluidBrowserPackageEnvironment extends IFluidPackageEnvironment {
346
+ export interface IFluidBrowserPackageEnvironment extends IFluidPackageEnvironment_2 {
316
347
  umd: {
317
348
  files: string[];
318
349
  library: string;
319
350
  };
320
351
  }
321
352
 
353
+ // @public
354
+ export interface IFluidCodeDetails {
355
+ readonly config?: IFluidCodeDetailsConfig;
356
+ readonly package: string | Readonly<IFluidPackage>;
357
+ }
358
+
359
+ // @public (undocumented)
360
+ export const IFluidCodeDetailsComparer: keyof IProvideFluidCodeDetailsComparer;
361
+
362
+ // @public
363
+ export interface IFluidCodeDetailsComparer extends IProvideFluidCodeDetailsComparer {
364
+ compare(a: IFluidCodeDetails, b: IFluidCodeDetails): Promise<number | undefined>;
365
+ satisfies(candidate: IFluidCodeDetails, constraint: IFluidCodeDetails): Promise<boolean>;
366
+ }
367
+
368
+ // @public
369
+ export interface IFluidCodeDetailsConfig {
370
+ // (undocumented)
371
+ readonly [key: string]: string;
372
+ }
373
+
322
374
  // @public
323
375
  export interface IFluidCodeResolver {
324
- resolveCodeDetails(details: IFluidCodeDetails): Promise<IResolvedFluidCodeDetails>;
376
+ resolveCodeDetails(details: IFluidCodeDetails_2): Promise<IResolvedFluidCodeDetails>;
325
377
  }
326
378
 
327
379
  // @public (undocumented)
328
380
  export interface IFluidModule {
329
381
  // (undocumented)
330
- fluidExport: IFluidObject & Partial<Readonly<IProvideFluidCodeDetailsComparer>>;
382
+ fluidExport: IFluidObject & FluidObject<IRuntimeFactory & IProvideFluidCodeDetailsComparer_2>;
331
383
  }
332
384
 
333
- // @public (undocumented)
385
+ // @public
386
+ export interface IFluidModuleWithDetails {
387
+ details: IFluidCodeDetails_2;
388
+ module: IFluidModule;
389
+ }
390
+
391
+ // @public
392
+ export interface IFluidPackage {
393
+ [key: string]: unknown;
394
+ fluid: {
395
+ [environment: string]: undefined | IFluidPackageEnvironment;
396
+ };
397
+ name: string;
398
+ }
399
+
400
+ // @public
401
+ export interface IFluidPackageEnvironment {
402
+ [target: string]: undefined | {
403
+ files: string[];
404
+ [key: string]: unknown;
405
+ };
406
+ }
407
+
408
+ // @public @deprecated (undocumented)
334
409
  export const IFluidTokenProvider: keyof IProvideFluidTokenProvider;
335
410
 
336
- // @public (undocumented)
411
+ // @public @deprecated (undocumented)
337
412
  export interface IFluidTokenProvider extends IProvideFluidTokenProvider {
338
413
  // (undocumented)
339
414
  intelligence: {
@@ -351,12 +426,12 @@ export interface IGenericError extends IErrorBase {
351
426
 
352
427
  // @public
353
428
  export interface IHostLoader extends ILoader {
354
- createDetachedContainer(codeDetails: IFluidCodeDetails): Promise<IContainer>;
429
+ createDetachedContainer(codeDetails: IFluidCodeDetails_2): Promise<IContainer>;
355
430
  rehydrateDetachedContainerFromSnapshot(snapshot: string): Promise<IContainer>;
356
431
  }
357
432
 
358
433
  // @public
359
- export interface ILoader extends IFluidRouter {
434
+ export interface ILoader extends IFluidRouter, Partial<IProvideLoader> {
360
435
  resolve(request: IRequest, pendingLocalState?: string): Promise<IContainer>;
361
436
  }
362
437
 
@@ -395,18 +470,30 @@ export interface IPendingLocalState {
395
470
  url: string;
396
471
  }
397
472
 
398
- // @public (undocumented)
473
+ // @public @deprecated (undocumented)
399
474
  export interface IProvideDeltaSender {
400
- // (undocumented)
475
+ // @deprecated (undocumented)
401
476
  readonly IDeltaSender: IDeltaSender;
402
477
  }
403
478
 
404
479
  // @public (undocumented)
480
+ export interface IProvideFluidCodeDetailsComparer {
481
+ // (undocumented)
482
+ readonly IFluidCodeDetailsComparer: IFluidCodeDetailsComparer;
483
+ }
484
+
485
+ // @public @deprecated (undocumented)
405
486
  export interface IProvideFluidTokenProvider {
406
487
  // (undocumented)
407
488
  readonly IFluidTokenProvider: IFluidTokenProvider;
408
489
  }
409
490
 
491
+ // @public (undocumented)
492
+ export interface IProvideLoader {
493
+ // (undocumented)
494
+ readonly ILoader: ILoader;
495
+ }
496
+
410
497
  // @public (undocumented)
411
498
  export interface IProvideRuntimeFactory {
412
499
  // (undocumented)
@@ -420,8 +507,8 @@ export interface IProxyLoaderFactory {
420
507
  }
421
508
 
422
509
  // @public
423
- export interface IResolvedFluidCodeDetails extends IFluidCodeDetails {
424
- readonly resolvedPackage: Readonly<IFluidPackage>;
510
+ export interface IResolvedFluidCodeDetails extends IFluidCodeDetails_2 {
511
+ readonly resolvedPackage: Readonly<IFluidPackage_2>;
425
512
  readonly resolvedPackageCacheId: string | undefined;
426
513
  }
427
514
 
@@ -448,6 +535,12 @@ export interface IRuntimeFactory extends IProvideRuntimeFactory {
448
535
  // @public
449
536
  export const isFluidBrowserPackage: (maybePkg: any) => maybePkg is Readonly<IFluidBrowserPackage>;
450
537
 
538
+ // @public (undocumented)
539
+ export const isFluidCodeDetails: (details: unknown) => details is Readonly<IFluidCodeDetails>;
540
+
541
+ // @public
542
+ export const isFluidPackage: (pkg: any) => pkg is Readonly<IFluidPackage>;
543
+
451
544
  // @public
452
545
  export interface IThrottlingWarning extends IErrorBase {
453
546
  // (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
@@ -42,11 +38,22 @@ export interface IDeltaHandlerStrategy {
42
38
  processSignal: (message: ISignalMessage) => void;
43
39
  }
44
40
  declare module "@fluidframework/core-interfaces" {
45
- interface IFluidObject extends Readonly<Partial<IProvideDeltaSender>> {
41
+ interface IFluidObject {
42
+ /** @deprecated - use `FluidObject<IDeltaSender>` instead */
43
+ readonly IDeltaSender?: IDeltaSender;
46
44
  }
47
45
  }
46
+ /**
47
+ * @deprecated - This will be removed in a later release.
48
+ */
48
49
  export declare const IDeltaSender: keyof IProvideDeltaSender;
50
+ /**
51
+ * @deprecated - This will be removed in a later release.
52
+ */
49
53
  export interface IProvideDeltaSender {
54
+ /**
55
+ * @deprecated - This will be removed in a later release.
56
+ */
50
57
  readonly IDeltaSender: IDeltaSender;
51
58
  }
52
59
  /**
@@ -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,EAA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E,OAAO,GAAG,SAAS,CAAC;IAC1C,gDAAgD;IAChD,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;CACjC,CAAC"}
package/dist/deltas.js CHANGED
@@ -5,5 +5,8 @@
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.IDeltaSender = void 0;
8
+ /**
9
+ * @deprecated - This will be removed in a later release.
10
+ */
8
11
  exports.IDeltaSender = "IDeltaSender";
9
12
  //# sourceMappingURL=deltas.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"deltas.js","sourceRoot":"","sources":["../src/deltas.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AA2DU,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 /**\n * @deprecated - please use `serviceConfiguration.maxMessageSize`\n */\n maxMessageSize: number;\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 // eslint-disable-next-line @typescript-eslint/no-empty-interface\n interface IFluidObject extends Readonly<Partial<IProvideDeltaSender>> { }\n}\n\nexport const IDeltaSender: keyof IProvideDeltaSender = \"IDeltaSender\";\n\nexport interface IProvideDeltaSender {\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 /** Terminate the connection to storage */\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"]}
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 /** Terminate the connection to storage */\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.
@@ -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,UAAU;IACvB;;;;OAIG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC5B;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"}
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;;O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;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\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 {\n /** errorType is a union of error types from\n * - container\n * - runtime\n * - drivers\n */\n readonly errorType: string;\n readonly message: string;\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"]}
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"]}
@@ -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 & Partial<Readonly<IProvideFluidCodeDetailsComparer>>;
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;AAEjG,MAAM,WAAW,YAAY;IACzB,WAAW,EAAE,YAAY,GAAG,OAAO,CAAC,QAAQ,CAAC,gCAAgC,CAAC,CAAC,CAAC;CACnF"}
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"}
@@ -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 & Partial<Readonly<IProvideFluidCodeDetailsComparer>>;\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, 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,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