@fluidframework/container-definitions 0.46.0-50372 → 0.47.1000

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 (47) hide show
  1. package/api-report/container-definitions.api.md +4 -6
  2. package/dist/error.d.ts +2 -1
  3. package/dist/error.d.ts.map +1 -1
  4. package/dist/error.js +2 -1
  5. package/dist/error.js.map +1 -1
  6. package/dist/index.d.ts +1 -1
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +1 -1
  9. package/dist/index.js.map +1 -1
  10. package/dist/legacy/{chaincode.d.ts → index.d.ts} +1 -1
  11. package/dist/legacy/index.d.ts.map +1 -0
  12. package/dist/legacy/{chaincode.js → index.js} +1 -1
  13. package/dist/legacy/index.js.map +1 -0
  14. package/dist/loader.d.ts +2 -2
  15. package/dist/loader.d.ts.map +1 -1
  16. package/dist/loader.js.map +1 -1
  17. package/dist/runtime.d.ts +2 -9
  18. package/dist/runtime.d.ts.map +1 -1
  19. package/dist/runtime.js.map +1 -1
  20. package/lib/error.d.ts +2 -1
  21. package/lib/error.d.ts.map +1 -1
  22. package/lib/error.js +2 -1
  23. package/lib/error.js.map +1 -1
  24. package/lib/index.d.ts +1 -1
  25. package/lib/index.d.ts.map +1 -1
  26. package/lib/index.js +1 -1
  27. package/lib/index.js.map +1 -1
  28. package/lib/legacy/{chaincode.d.ts → index.d.ts} +1 -1
  29. package/lib/legacy/index.d.ts.map +1 -0
  30. package/lib/legacy/{chaincode.js → index.js} +1 -1
  31. package/lib/legacy/index.js.map +1 -0
  32. package/lib/loader.d.ts +2 -2
  33. package/lib/loader.d.ts.map +1 -1
  34. package/lib/loader.js.map +1 -1
  35. package/lib/runtime.d.ts +2 -9
  36. package/lib/runtime.d.ts.map +1 -1
  37. package/lib/runtime.js.map +1 -1
  38. package/package.json +55 -7
  39. package/src/error.ts +2 -1
  40. package/src/index.ts +1 -1
  41. package/src/legacy/{chaincode.ts → index.ts} +0 -0
  42. package/src/loader.ts +3 -2
  43. package/src/runtime.ts +2 -9
  44. package/dist/legacy/chaincode.d.ts.map +0 -1
  45. package/dist/legacy/chaincode.js.map +0 -1
  46. package/lib/legacy/chaincode.d.ts.map +0 -1
  47. package/lib/legacy/chaincode.js.map +0 -1
@@ -22,13 +22,13 @@ import { IFluidPackage as IFluidPackage_2 } from '@fluidframework/core-interface
22
22
  import { IFluidPackageEnvironment as IFluidPackageEnvironment_2 } from '@fluidframework/core-interfaces';
23
23
  import { IFluidResolvedUrl } from '@fluidframework/driver-definitions';
24
24
  import { IFluidRouter } from '@fluidframework/core-interfaces';
25
- import { IPendingProposal } from '@fluidframework/protocol-definitions';
26
25
  import { IProvideFluidCodeDetailsComparer as IProvideFluidCodeDetailsComparer_2 } from '@fluidframework/core-interfaces';
27
26
  import { IQuorumClients } from '@fluidframework/protocol-definitions';
28
27
  import { IRequest } from '@fluidframework/core-interfaces';
29
28
  import { IResolvedUrl } from '@fluidframework/driver-definitions';
30
29
  import { IResponse } from '@fluidframework/core-interfaces';
31
30
  import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
31
+ import { ISequencedProposal } from '@fluidframework/protocol-definitions';
32
32
  import { ISignalClient } from '@fluidframework/protocol-definitions';
33
33
  import { ISignalMessage } from '@fluidframework/protocol-definitions';
34
34
  import { ISnapshotTree } from '@fluidframework/protocol-definitions';
@@ -181,8 +181,6 @@ export interface IContainerContext extends IDisposable {
181
181
  getSpecifiedCodeDetails?(): IFluidCodeDetails_2 | undefined;
182
182
  // (undocumented)
183
183
  readonly loader: ILoader;
184
- // @deprecated (undocumented)
185
- readonly logger?: ITelemetryBaseLogger;
186
184
  // (undocumented)
187
185
  readonly options: ILoaderOptions;
188
186
  // (undocumented)
@@ -190,7 +188,7 @@ export interface IContainerContext extends IDisposable {
190
188
  // (undocumented)
191
189
  readonly quorum: IQuorumClients;
192
190
  // @deprecated (undocumented)
193
- raiseContainerWarning(warning: ContainerWarning): void;
191
+ raiseContainerWarning?(warning: ContainerWarning): void;
194
192
  readonly scope: IFluidObject & FluidObject;
195
193
  // (undocumented)
196
194
  readonly serviceConfiguration: IClientConfiguration | undefined;
@@ -201,7 +199,7 @@ export interface IContainerContext extends IDisposable {
201
199
  // (undocumented)
202
200
  readonly submitSignalFn: (contents: any) => void;
203
201
  // (undocumented)
204
- readonly taggedLogger?: ITelemetryBaseLogger;
202
+ readonly taggedLogger: ITelemetryBaseLogger;
205
203
  // (undocumented)
206
204
  updateDirtyContainerState(dirty: boolean): void;
207
205
  }
@@ -213,7 +211,7 @@ export interface IContainerEvents extends IEvent {
213
211
  // (undocumented)
214
212
  (event: "connected", listener: (clientId: string) => void): any;
215
213
  // (undocumented)
216
- (event: "codeDetailsProposed", listener: (codeDetails: IFluidCodeDetails_2, proposal: IPendingProposal) => void): any;
214
+ (event: "codeDetailsProposed", listener: (codeDetails: IFluidCodeDetails_2, proposal: ISequencedProposal) => void): any;
217
215
  // (undocumented)
218
216
  (event: "contextChanged", listener: (codeDetails: IFluidCodeDetails_2) => void): any;
219
217
  // (undocumented)
package/dist/error.d.ts CHANGED
@@ -28,7 +28,8 @@ export declare enum ContainerErrorType {
28
28
  */
29
29
  usageError = "usageError",
30
30
  /**
31
- * Error indicating an client session has expired.
31
+ * Error indicating an client session has expired. Currently this only happens when GC is allowed on a document and
32
+ * aids in safely deleting unused objects.
32
33
  */
33
34
  clientSessionExpiredError = "clientSessionExpiredError"
34
35
  }
@@ -1 +1 @@
1
- {"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAE1E;;GAEG;AACH,oBAAY,kBAAkB;IAC1B;;OAEG;IACH,YAAY,iBAAiB;IAE7B;;OAEG;IACH,eAAe,oBAAoB;IAEnC;;OAEG;IACH,mBAAmB,wBAAwB;IAE3C;;OAEG;IACH,mBAAmB,wBAAwB;IAE3C;;OAEG;IACF,UAAU,e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AAoB;IAEnC;;OAEG;IACH,mBAAmB,wBAAwB;IAE3C;;OAEG;IACH,mBAAmB,wBAAwB;IAE3C;;OAEG;IACF,UAAU,eAAe;IAE1B;;;OAGG;IACH,yBAAyB,8BAA8B;CAC1D;AAED;;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 CHANGED
@@ -31,7 +31,8 @@ var ContainerErrorType;
31
31
  */
32
32
  ContainerErrorType["usageError"] = "usageError";
33
33
  /**
34
- * Error indicating an client session has expired.
34
+ * Error indicating an client session has expired. Currently this only happens when GC is allowed on a document and
35
+ * aids in safely deleting unused objects.
35
36
  */
36
37
  ContainerErrorType["clientSessionExpiredError"] = "clientSessionExpiredError";
37
38
  })(ContainerErrorType = exports.ContainerErrorType || (exports.ContainerErrorType = {}));
package/dist/error.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"error.js","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIH;;GAEG;AACH,IAAY,kBA8BX;AA9BD,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;IAE1B;;OAEG;IACH,6EAAuD,CAAA;AAC3D,CAAC,EA9BW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QA8B7B","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 * Error indicating an client session has expired.\n */\n clientSessionExpiredError = \"clientSessionExpiredError\",\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"]}
1
+ {"version":3,"file":"error.js","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIH;;GAEG;AACH,IAAY,kBA+BX;AA/BD,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;IAE1B;;;OAGG;IACH,6EAAuD,CAAA;AAC3D,CAAC,EA/BW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QA+B7B","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ITelemetryProperties } from \"@fluidframework/common-definitions\";\n\n/**\n * Different error types the Container may report out to the Host\n */\nexport enum ContainerErrorType {\n /**\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 * Error indicating an client session has expired. Currently this only happens when GC is allowed on a document and\n * aids in safely deleting unused objects.\n */\n clientSessionExpiredError = \"clientSessionExpiredError\",\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/index.d.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  */
5
5
  export * from "./audience";
6
6
  export * from "./browserPackage";
7
- export * from "./legacy/chaincode";
7
+ export * from "./legacy";
8
8
  export * from "./deltas";
9
9
  export * from "./error";
10
10
  export * from "./loader";
@@ -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;AACjC,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"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,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"}
package/dist/index.js CHANGED
@@ -16,7 +16,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
16
16
  */
17
17
  __exportStar(require("./audience"), exports);
18
18
  __exportStar(require("./browserPackage"), exports);
19
- __exportStar(require("./legacy/chaincode"), exports);
19
+ __exportStar(require("./legacy"), exports);
20
20
  __exportStar(require("./deltas"), exports);
21
21
  __exportStar(require("./error"), exports);
22
22
  __exportStar(require("./loader"), exports);
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;GAGG;AACH,6CAA2B;AAC3B,mDAAiC;AACjC,qDAAmC;AACnC,2CAAyB;AACzB,0CAAwB;AACxB,2CAAyB;AACzB,gDAA8B;AAC9B,iDAA+B;AAC/B,gDAA8B;AAC9B,4CAA0B","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nexport * from \"./audience\";\nexport * from \"./browserPackage\";\nexport * from \"./legacy/chaincode\";\nexport * from \"./deltas\";\nexport * from \"./error\";\nexport * from \"./loader\";\nexport * from \"./fluidModule\";\nexport * from \"./fluidPackage\";\nexport * from \"./proxyLoader\";\nexport * from \"./runtime\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;GAGG;AACH,6CAA2B;AAC3B,mDAAiC;AACjC,2CAAyB;AACzB,2CAAyB;AACzB,0CAAwB;AACxB,2CAAyB;AACzB,gDAA8B;AAC9B,iDAA+B;AAC/B,gDAA8B;AAC9B,4CAA0B","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nexport * from \"./audience\";\nexport * from \"./browserPackage\";\nexport * from \"./legacy\";\nexport * from \"./deltas\";\nexport * from \"./error\";\nexport * from \"./loader\";\nexport * from \"./fluidModule\";\nexport * from \"./fluidPackage\";\nexport * from \"./proxyLoader\";\nexport * from \"./runtime\";\n"]}
@@ -29,4 +29,4 @@ declare module "@fluidframework/core-interfaces" {
29
29
  readonly IFluidTokenProvider?: IFluidTokenProvider;
30
30
  }
31
31
  }
32
- //# sourceMappingURL=chaincode.d.ts.map
32
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/legacy/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE7C;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,MAAM,0BAAkD,CAAC;AAE3F;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACvC,QAAQ,CAAC,mBAAmB,EAAE,mBAAmB,CAAC;CACrD;AAED;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,0BAA0B;IACnE,YAAY,EAAE;QAAE,CAAC,OAAO,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;CAC5C;AAED,OAAO,QAAQ,iCAAiC,CAAC;IAC7C,UAAiB,YAAY;QACzB,+DAA+D;QAC/D,QAAQ,CAAC,eAAe,CAAC,EAAE,eAAe,CAAC;QAC3C,mEAAmE;QACnE,QAAQ,CAAC,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;KACtD;CACJ"}
@@ -9,4 +9,4 @@ exports.IFluidTokenProvider = void 0;
9
9
  * @deprecated - This will be removed in a later release.
10
10
  */
11
11
  exports.IFluidTokenProvider = "IFluidTokenProvider";
12
- //# sourceMappingURL=chaincode.js.map
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/legacy/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIH;;GAEG;AACU,QAAA,mBAAmB,GAAqC,qBAAqB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IRuntimeFactory } from \"../runtime\";\n\n/**\n * @deprecated - This will be removed in a later release.\n */\nexport const IFluidTokenProvider: keyof IProvideFluidTokenProvider = \"IFluidTokenProvider\";\n\n/**\n * @deprecated - This will be removed in a later release.\n */\nexport interface IProvideFluidTokenProvider {\n readonly IFluidTokenProvider: IFluidTokenProvider;\n}\n\n/**\n * @deprecated - This will be removed in a later release.\n */\nexport interface IFluidTokenProvider extends IProvideFluidTokenProvider {\n intelligence: { [service: string]: any };\n}\n\ndeclare module \"@fluidframework/core-interfaces\" {\n export interface IFluidObject {\n /** @deprecated - use `FluidObject<IRuntimeFactory>` instead */\n readonly IRuntimeFactory?: IRuntimeFactory;\n /** @deprecated - use `FluidObject<IFluidTokenProvider>` instead */\n readonly IFluidTokenProvider?: IFluidTokenProvider;\n }\n}\n"]}
package/dist/loader.d.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  import { IRequest, IResponse, IFluidRouter, IFluidCodeDetails, IFluidPackage, IProvideFluidCodeDetailsComparer } from "@fluidframework/core-interfaces";
6
- import { IClientDetails, IDocumentMessage, IPendingProposal, IQuorumClients, ISequencedDocumentMessage } from "@fluidframework/protocol-definitions";
6
+ import { IClientDetails, IDocumentMessage, IQuorumClients, ISequencedDocumentMessage, ISequencedProposal } from "@fluidframework/protocol-definitions";
7
7
  import { IResolvedUrl } from "@fluidframework/driver-definitions";
8
8
  import { IEvent, IEventProvider } from "@fluidframework/common-definitions";
9
9
  import { IAudience } from "./audience";
@@ -92,7 +92,7 @@ export interface ICodeAllowList {
92
92
  export interface IContainerEvents extends IEvent {
93
93
  (event: "readonly", listener: (readonly: boolean) => void): void;
94
94
  (event: "connected", listener: (clientId: string) => void): any;
95
- (event: "codeDetailsProposed", listener: (codeDetails: IFluidCodeDetails, proposal: IPendingProposal) => void): any;
95
+ (event: "codeDetailsProposed", listener: (codeDetails: IFluidCodeDetails, proposal: ISequencedProposal) => void): any;
96
96
  (event: "contextChanged", listener: (codeDetails: IFluidCodeDetails) => void): any;
97
97
  (event: "disconnected" | "attached", listener: () => void): any;
98
98
  (event: "closed", listener: (error?: ICriticalContainerError) => void): any;
@@ -1 +1 @@
1
- {"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../src/loader.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACH,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,gCAAgC,EACnC,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACH,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,yBAAyB,EAC5B,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAExC;;;;GAIG;AACH,MAAM,WAAW,WAAY,SAAQ,OAAO,CAAC,gCAAgC,CAAC;IAC1E;;OAEG;IACH,IAAI,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;CAC1D;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACpC,yGAAyG;IACzG,MAAM,EAAE,YAAY,CAAC;IACrB;;;;OAIG;IACH,OAAO,EAAE,iBAAiB,CAAC;CAC9B;AAED;;;GAGG;AACH,MAAM,WAAW,kBAChB,SAAQ,OAAO,CAAC,gCAAgC,CAAC;IACjD;;;;;OAKG;IACH,IAAI,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC;CACl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,CAAC,YAAY,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACtC,CAAC,YAAY,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAClC,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9C;AAED,MAAM,WAAW,cAAc;IAC3B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC7B;AAED,OAAO,QAAQ,iCAAiC,CAAC;IAE7C,UAAiB,cAAe,SAAQ,OAAO,CAAC,aAAa,CAAC;KAAI;IAElE,UAAiB,YAAY;QACzB;;WAEG;QACH,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;KAC9B;CACJ;AAED,MAAM,WAAW,kBAAkB;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,mBAAmB,EAAE,OAAO,CAAC;CAChC"}
@@ -1 +1 @@
1
- {"version":3,"file":"loader.js","sourceRoot":"","sources":["../src/loader.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAuXH;;GAEG;AACH,IAAY,YAsBX;AAtBD,WAAY,YAAY;IACpB;;OAEG;IACH,qCAAqB,CAAA;IAErB,sDAAsC,CAAA;IAEtC;;OAEG;IACH,qCAAqB,CAAA;IACrB,6CAA6B,CAAA;IAC7B,wDAAwC,CAAA;IAExC;;;;;OAKG;IACH,mCAAmB,CAAA;AACvB,CAAC,EAtBW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAsBvB","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n IRequest,\n IResponse,\n IFluidRouter,\n IFluidCodeDetails,\n IFluidPackage,\n IProvideFluidCodeDetailsComparer,\n} from \"@fluidframework/core-interfaces\";\nimport {\n IClientDetails,\n IDocumentMessage,\n IPendingProposal,\n IQuorumClients,\n ISequencedDocumentMessage,\n} from \"@fluidframework/protocol-definitions\";\nimport { IResolvedUrl } from \"@fluidframework/driver-definitions\";\nimport { IEvent, IEventProvider } from \"@fluidframework/common-definitions\";\nimport { IAudience } from \"./audience\";\nimport { IDeltaManager, ReadOnlyInfo } from \"./deltas\";\nimport { ICriticalContainerError, ContainerWarning } from \"./error\";\nimport { IFluidModule } from \"./fluidModule\";\nimport { AttachState } from \"./runtime\";\n\n/**\n * Code loading interface\n *\n * @deprecated in favor of {@link @fluidframework/container-loader#ICodeDetailsLoader}\n */\nexport interface ICodeLoader extends Partial<IProvideFluidCodeDetailsComparer> {\n /**\n * Loads the package specified by code details and returns a promise to its entry point exports.\n */\n load(source: IFluidCodeDetails): Promise<IFluidModule>;\n}\n\n/**\n * Encapsulates a module entry point with corresponding code details.\n */\nexport interface IFluidModuleWithDetails {\n /** Fluid code module that implements the runtime factory needed to instantiate the container runtime. */\n module: IFluidModule;\n /**\n * Code details associated with the module. Represents a document schema this module supports.\n * If the code loader implements the {@link @fluidframework/core-interfaces#IFluidCodeDetailsComparer} interface,\n * it'll be called to determine whether the module code details satisfy the new code proposal in the quorum.\n */\n details: IFluidCodeDetails;\n}\n\n/**\n * Fluid code loader resolves a code module matching the document schema, i.e. code details, such as\n * a package name and package version range.\n */\nexport interface ICodeDetailsLoader\n extends Partial<IProvideFluidCodeDetailsComparer> {\n /**\n * Load the code module (package) that is capable to interact with the document.\n *\n * @param source - Code proposal that articulates the current schema the document is written in.\n * @returns - Code module entry point along with the code details associated with it.\n */\n load(source: IFluidCodeDetails): Promise<IFluidModuleWithDetails>;\n}\n\n/**\n* The interface returned from a IFluidCodeResolver which represents IFluidCodeDetails\n * that have been resolved and are ready to load\n */\nexport interface IResolvedFluidCodeDetails extends IFluidCodeDetails {\n /**\n * A resolved version of the Fluid package. All Fluid browser file entries should be absolute urls.\n */\n readonly resolvedPackage: Readonly<IFluidPackage>;\n /**\n * If not undefined, this id will be used to cache the entry point for the code package\n */\n readonly resolvedPackageCacheId: string | undefined;\n}\n\n/**\n * Fluid code resolvers take a Fluid code details, and resolve the\n * full Fluid package including absolute urls for the browser file entries.\n * The Fluid code resolver is coupled to a specific cdn and knows how to resolve\n * the code detail for loading from that cdn. This include resolving to the most recent\n * version of package that supports the provided code details.\n */\nexport interface IFluidCodeResolver {\n /**\n * Resolves a Fluid code details into a form that can be loaded\n * @param details - The Fluid code details to resolve\n * @returns - A IResolvedFluidCodeDetails where the\n * resolvedPackage's Fluid file entries are absolute urls, and\n * an optional resolvedPackageCacheId if the loaded package should be\n * cached.\n */\n resolveCodeDetails(details: IFluidCodeDetails): Promise<IResolvedFluidCodeDetails>;\n}\n\n/**\n * Code AllowListing Interface\n */\nexport interface ICodeAllowList {\n testSource(source: IResolvedFluidCodeDetails): Promise<boolean>;\n}\n\n/**\n * Events emitted by the Container \"upwards\" to the Loader and Host\n */\nexport interface IContainerEvents extends IEvent {\n (event: \"readonly\", listener: (readonly: boolean) => void): void;\n (event: \"connected\", listener: (clientId: string) => void);\n (event: \"codeDetailsProposed\", listener: (codeDetails: IFluidCodeDetails, proposal: IPendingProposal) => void);\n (event: \"contextChanged\", listener: (codeDetails: IFluidCodeDetails) => void);\n (event: \"disconnected\" | \"attached\", listener: () => void);\n (event: \"closed\", listener: (error?: ICriticalContainerError) => void);\n (event: \"warning\", listener: (error: ContainerWarning) => void);\n (event: \"op\", listener: (message: ISequencedDocumentMessage) => void);\n (event: \"dirty\" | \"saved\", listener: (dirty: boolean) => void);\n}\n\n/**\n * Namespace for the different connection states a container can be in\n */\nexport namespace ConnectionState {\n /**\n * The document is no longer connected to the delta server\n */\n export type Disconnected = 0;\n\n /**\n * The document has an inbound connection but is still pending for outbound deltas\n */\n export type Connecting = 1;\n\n /**\n * The document is fully connected\n */\n export type Connected = 2;\n}\n\n/**\n * Type defining the different states of connectivity a container can be in\n */\nexport type ConnectionState = ConnectionState.Disconnected | ConnectionState.Connecting | ConnectionState.Connected;\n\n/**\n * The Host's view of the Container and its connection to storage\n */\nexport interface IContainer extends IEventProvider<IContainerEvents>, IFluidRouter {\n\n /**\n * The Delta Manager supporting the op stream for this Container\n */\n deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;\n\n /**\n * The collection of write clients which were connected as of the current sequence number.\n * Also contains a map of key-value pairs that must be agreed upon by all clients before being accepted.\n */\n getQuorum(): IQuorumClients;\n\n /**\n * Represents the resolved url to the Container\n */\n resolvedUrl: IResolvedUrl | undefined;\n\n /**\n * Indicates the attachment state of the container to a host service.\n */\n readonly attachState: AttachState;\n\n /**\n * Get the code details that are currently specified for the container.\n * @returns The current code details if any are specified, undefined if none are specified.\n */\n getSpecifiedCodeDetails(): IFluidCodeDetails | undefined;\n\n /**\n * Get the code details that were used to load the container.\n * @returns The code details that were used to load the container if it is loaded, undefined if it is not yet\n * loaded.\n */\n getLoadedCodeDetails(): IFluidCodeDetails | undefined;\n\n /**\n * Returns true if the container has been closed, otherwise false\n */\n readonly closed: boolean;\n\n /**\n * Returns true if the container is dirty, i.e. there are user changes that has not been saved\n * Closing container in this state results in data loss for user.\n * Container usually gets into this situation due to loss of connectivity.\n */\n readonly isDirty: boolean;\n\n /**\n * Closes the container\n */\n close(error?: ICriticalContainerError): void;\n\n /**\n * Closes the container and returns serialized local state intended to be\n * given to a newly loaded container\n */\n closeAndGetPendingLocalState(): string;\n\n /**\n * Propose new code details that define the code to be loaded\n * for this container's runtime. The returned promise will\n * be true when the proposal is accepted, and false if\n * the proposal is rejected.\n */\n proposeCodeDetails(codeDetails: IFluidCodeDetails): Promise<boolean>\n\n /**\n * Attaches the Container to the Container specified by the given Request.\n *\n * TODO - in the case of failure options should give a retry policy. Or some continuation function\n * that allows attachment to a secondary document.\n */\n attach(request: IRequest): Promise<void>;\n\n /**\n * Extract the snapshot from the detached container.\n */\n serialize(): string;\n\n /**\n * Get an absolute url for a provided container-relative request url.\n * If the container is not attached, this will return undefined.\n *\n * @param relativeUrl - A container-relative request URL\n */\n getAbsoluteUrl(relativeUrl: string): Promise<string | undefined>;\n\n /**\n * Issue a request against the container for a resource.\n * @param request - The request to be issued against the container\n */\n request(request: IRequest): Promise<IResponse>;\n\n /**\n * Provides the current connected state of the container\n */\n readonly connectionState: ConnectionState;\n\n /**\n * Boolean indicating whether the container is currently connected or not\n */\n readonly connected: boolean;\n\n /**\n * Dictates whether or not the current container will automatically attempt to reconnect to the delta stream\n * after receiving a disconnect event\n * @param reconnect - Boolean indicating if reconnect should automatically occur\n * @alpha\n */\n setAutoReconnect?(reconnect: boolean): void;\n\n /**\n * Have the container attempt to resume processing ops\n * @alpha\n */\n resume?(): void;\n\n /**\n * The audience information for all clients currently associated with the document in the current session\n */\n readonly audience: IAudience;\n\n /**\n * The server provided ID of the client.\n * Set once this.connected is true, otherwise undefined\n * @alpha\n */\n readonly clientId?: string | undefined;\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 */\n readonly readOnlyInfo: ReadOnlyInfo;\n\n /**\n * Allows the host to have the container force to be in read-only mode\n * @param readonly - Boolean that toggles if read-only policies will be enforced\n * @alpha\n */\n forceReadonly?(readonly: boolean);\n}\n\n/**\n * The Runtime's view of the Loader, used for loading Containers\n */\nexport interface ILoader extends IFluidRouter, Partial<IProvideLoader> {\n /**\n * Resolves the resource specified by the URL + headers contained in the request object\n * to the underlying container that will resolve the request.\n *\n * An analogy for this is resolve is a DNS resolve of a Fluid container. Request then executes\n * a request against the server found from the resolve step.\n */\n resolve(request: IRequest, pendingLocalState?: string): Promise<IContainer>;\n}\n\n/**\n * The Host's view of the Loader, used for loading Containers\n */\nexport interface IHostLoader extends ILoader {\n /**\n * Creates a new container using the specified chaincode but in an unattached state. While unattached all\n * updates will only be local until the user explicitly attaches the container to a service provider.\n */\n createDetachedContainer(codeDetails: IFluidCodeDetails): Promise<IContainer>;\n\n /**\n * Creates a new container using the specified snapshot but in an unattached state. While unattached all\n * updates will only be local until the user explicitly attaches the container to a service provider.\n */\n rehydrateDetachedContainerFromSnapshot(snapshot: string): Promise<IContainer>;\n}\n\nexport type ILoaderOptions = {\n [key in string | number]: any;\n} & {\n /**\n * Set caching behavior for the loader. If true, we will load a container from cache if one\n * with the same id/version exists or create a new container and cache it if it does not. If\n * false, always load a new container and don't cache it. If the container has already been\n * closed, it will not be cached. A cache option in the LoaderHeader for an individual\n * request will override the Loader's value.\n * Defaults to true.\n */\n cache?: boolean;\n\n /**\n * Provide the current Loader through the scope object when creating Containers. It is added\n * as the `ILoader` property, and will overwrite an existing property of the same name on the\n * scope. Useful for when the host wants to provide the current Loader's functionality to\n * individual Data Stores, which is typically expected when creating with a Loader.\n * Defaults to true.\n */\n provideScopeLoader?: boolean;\n\n // Below two are the options based on which we decide how often client needs to send noops in case of active\n // connection which is not sending any op. The end result is the \"AND\" of these 2 options. So the client\n // should hit the min time and count to send the noop.\n /**\n * Set min time(in ms) frequency with which noops would be sent in case of active connection which is\n * not sending any op.\n */\n noopTimeFrequency?: number;\n\n /**\n * Set min op frequency with which noops would be sent in case of active connection which is not sending any op.\n */\n noopCountFrequency?: number;\n\n /**\n * Max time(in ms) container will wait for a leave message of a disconnected client.\n */\n maxClientLeaveWaitTime?: number,\n};\n\n/**\n * Accepted header keys for requests coming to the Loader\n */\nexport enum LoaderHeader {\n /**\n * Override the Loader's default caching behavior for this container.\n */\n cache = \"fluid-cache\",\n\n clientDetails = \"fluid-client-details\",\n\n /**\n * Start the container in a paused, unconnected state. Defaults to false\n */\n loadMode = \"loadMode\",\n reconnect = \"fluid-reconnect\",\n sequenceNumber = \"fluid-sequence-number\",\n\n /**\n * One of the following:\n * null or \"null\": use ops, no snapshots\n * undefined: fetch latest snapshot\n * otherwise, version sha to load snapshot\n */\n version = \"version\",\n}\n\nexport interface IContainerLoadMode {\n opsBeforeReturn?:\n /*\n * No trailing ops are applied before container is returned.\n * Default value.\n */\n | undefined\n /*\n * Only cached trailing ops are applied before returning container.\n * Caching is optional and could be implemented by the driver.\n * If driver does not implement any kind of local caching strategy, this is same as above.\n * Driver may cache a lot of ops, so care needs to be exercised (see below).\n */\n | \"cached\"\n /*\n * All trailing ops in storage are fetched and applied before container is returned\n * This mode might have significant impact on boot speed (depends on storage perf characteristics)\n * Also there might be a lot of trailing ops and applying them might take time, so hosts are\n * recommended to have some progress UX / cancellation built into loading flow when using this option.\n */\n | \"all\"\n deltaConnection?:\n /*\n * Connection to delta stream is made only when Container.resume() call is made. Op processing\n * is paused (when container is returned from Loader.resolve()) until Container.resume() call is made.\n */\n | \"none\"\n /*\n * Connection to delta stream is made only when Container.resume() call is made.\n * Op fetching from storage is performed and ops are applied as they come in.\n * This is useful option if connection to delta stream is expensive and thus it's beneficial to move it\n * out from critical boot sequence, but it's beneficial to allow catch up to happen as fast as possible.\n */\n | \"delayed\"\n /*\n * Connection to delta stream is made right away.\n * Ops processing is enabled and ops are flowing through the system.\n * Default value.\n */\n | undefined\n}\n\n/**\n * Set of Request Headers that the Loader understands and may inspect or modify\n */\nexport interface ILoaderHeader {\n [LoaderHeader.cache]: boolean;\n [LoaderHeader.clientDetails]: IClientDetails;\n [LoaderHeader.loadMode]: IContainerLoadMode;\n [LoaderHeader.sequenceNumber]: number;\n [LoaderHeader.reconnect]: boolean;\n [LoaderHeader.version]: string | undefined;\n}\n\nexport interface IProvideLoader {\n readonly ILoader: ILoader;\n}\n\ndeclare module \"@fluidframework/core-interfaces\" {\n export interface IRequestHeader extends Partial<ILoaderHeader> { }\n\n export interface IFluidObject {\n /**\n * @deprecated - use `FluidObject<ILoader>` instead\n */\n readonly ILoader?: ILoader;\n }\n}\n\nexport interface IPendingLocalState {\n url: string;\n pendingRuntimeState: unknown;\n}\n"]}
1
+ {"version":3,"file":"loader.js","sourceRoot":"","sources":["../src/loader.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAuXH;;GAEG;AACH,IAAY,YAsBX;AAtBD,WAAY,YAAY;IACpB;;OAEG;IACH,qCAAqB,CAAA;IAErB,sDAAsC,CAAA;IAEtC;;OAEG;IACH,qCAAqB,CAAA;IACrB,6CAA6B,CAAA;IAC7B,wDAAwC,CAAA;IAExC;;;;;OAKG;IACH,mCAAmB,CAAA;AACvB,CAAC,EAtBW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAsBvB","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n IRequest,\n IResponse,\n IFluidRouter,\n IFluidCodeDetails,\n IFluidPackage,\n IProvideFluidCodeDetailsComparer,\n} from \"@fluidframework/core-interfaces\";\nimport {\n IClientDetails,\n IDocumentMessage,\n IQuorumClients,\n ISequencedDocumentMessage,\n ISequencedProposal,\n} from \"@fluidframework/protocol-definitions\";\nimport { IResolvedUrl } from \"@fluidframework/driver-definitions\";\nimport { IEvent, IEventProvider } from \"@fluidframework/common-definitions\";\nimport { IAudience } from \"./audience\";\nimport { IDeltaManager, ReadOnlyInfo } from \"./deltas\";\nimport { ICriticalContainerError, ContainerWarning } from \"./error\";\nimport { IFluidModule } from \"./fluidModule\";\nimport { AttachState } from \"./runtime\";\n\n/**\n * Code loading interface\n *\n * @deprecated in favor of {@link @fluidframework/container-loader#ICodeDetailsLoader}\n */\nexport interface ICodeLoader extends Partial<IProvideFluidCodeDetailsComparer> {\n /**\n * Loads the package specified by code details and returns a promise to its entry point exports.\n */\n load(source: IFluidCodeDetails): Promise<IFluidModule>;\n}\n\n/**\n * Encapsulates a module entry point with corresponding code details.\n */\nexport interface IFluidModuleWithDetails {\n /** Fluid code module that implements the runtime factory needed to instantiate the container runtime. */\n module: IFluidModule;\n /**\n * Code details associated with the module. Represents a document schema this module supports.\n * If the code loader implements the {@link @fluidframework/core-interfaces#IFluidCodeDetailsComparer} interface,\n * it'll be called to determine whether the module code details satisfy the new code proposal in the quorum.\n */\n details: IFluidCodeDetails;\n}\n\n/**\n * Fluid code loader resolves a code module matching the document schema, i.e. code details, such as\n * a package name and package version range.\n */\nexport interface ICodeDetailsLoader\n extends Partial<IProvideFluidCodeDetailsComparer> {\n /**\n * Load the code module (package) that is capable to interact with the document.\n *\n * @param source - Code proposal that articulates the current schema the document is written in.\n * @returns - Code module entry point along with the code details associated with it.\n */\n load(source: IFluidCodeDetails): Promise<IFluidModuleWithDetails>;\n}\n\n/**\n* The interface returned from a IFluidCodeResolver which represents IFluidCodeDetails\n * that have been resolved and are ready to load\n */\nexport interface IResolvedFluidCodeDetails extends IFluidCodeDetails {\n /**\n * A resolved version of the Fluid package. All Fluid browser file entries should be absolute urls.\n */\n readonly resolvedPackage: Readonly<IFluidPackage>;\n /**\n * If not undefined, this id will be used to cache the entry point for the code package\n */\n readonly resolvedPackageCacheId: string | undefined;\n}\n\n/**\n * Fluid code resolvers take a Fluid code details, and resolve the\n * full Fluid package including absolute urls for the browser file entries.\n * The Fluid code resolver is coupled to a specific cdn and knows how to resolve\n * the code detail for loading from that cdn. This include resolving to the most recent\n * version of package that supports the provided code details.\n */\nexport interface IFluidCodeResolver {\n /**\n * Resolves a Fluid code details into a form that can be loaded\n * @param details - The Fluid code details to resolve\n * @returns - A IResolvedFluidCodeDetails where the\n * resolvedPackage's Fluid file entries are absolute urls, and\n * an optional resolvedPackageCacheId if the loaded package should be\n * cached.\n */\n resolveCodeDetails(details: IFluidCodeDetails): Promise<IResolvedFluidCodeDetails>;\n}\n\n/**\n * Code AllowListing Interface\n */\nexport interface ICodeAllowList {\n testSource(source: IResolvedFluidCodeDetails): Promise<boolean>;\n}\n\n/**\n * Events emitted by the Container \"upwards\" to the Loader and Host\n */\nexport interface IContainerEvents extends IEvent {\n (event: \"readonly\", listener: (readonly: boolean) => void): void;\n (event: \"connected\", listener: (clientId: string) => void);\n (event: \"codeDetailsProposed\", listener: (codeDetails: IFluidCodeDetails, proposal: ISequencedProposal) => void);\n (event: \"contextChanged\", listener: (codeDetails: IFluidCodeDetails) => void);\n (event: \"disconnected\" | \"attached\", listener: () => void);\n (event: \"closed\", listener: (error?: ICriticalContainerError) => void);\n (event: \"warning\", listener: (error: ContainerWarning) => void);\n (event: \"op\", listener: (message: ISequencedDocumentMessage) => void);\n (event: \"dirty\" | \"saved\", listener: (dirty: boolean) => void);\n}\n\n/**\n * Namespace for the different connection states a container can be in\n */\nexport namespace ConnectionState {\n /**\n * The document is no longer connected to the delta server\n */\n export type Disconnected = 0;\n\n /**\n * The document has an inbound connection but is still pending for outbound deltas\n */\n export type Connecting = 1;\n\n /**\n * The document is fully connected\n */\n export type Connected = 2;\n}\n\n/**\n * Type defining the different states of connectivity a container can be in\n */\nexport type ConnectionState = ConnectionState.Disconnected | ConnectionState.Connecting | ConnectionState.Connected;\n\n/**\n * The Host's view of the Container and its connection to storage\n */\nexport interface IContainer extends IEventProvider<IContainerEvents>, IFluidRouter {\n\n /**\n * The Delta Manager supporting the op stream for this Container\n */\n deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;\n\n /**\n * The collection of write clients which were connected as of the current sequence number.\n * Also contains a map of key-value pairs that must be agreed upon by all clients before being accepted.\n */\n getQuorum(): IQuorumClients;\n\n /**\n * Represents the resolved url to the Container\n */\n resolvedUrl: IResolvedUrl | undefined;\n\n /**\n * Indicates the attachment state of the container to a host service.\n */\n readonly attachState: AttachState;\n\n /**\n * Get the code details that are currently specified for the container.\n * @returns The current code details if any are specified, undefined if none are specified.\n */\n getSpecifiedCodeDetails(): IFluidCodeDetails | undefined;\n\n /**\n * Get the code details that were used to load the container.\n * @returns The code details that were used to load the container if it is loaded, undefined if it is not yet\n * loaded.\n */\n getLoadedCodeDetails(): IFluidCodeDetails | undefined;\n\n /**\n * Returns true if the container has been closed, otherwise false\n */\n readonly closed: boolean;\n\n /**\n * Returns true if the container is dirty, i.e. there are user changes that has not been saved\n * Closing container in this state results in data loss for user.\n * Container usually gets into this situation due to loss of connectivity.\n */\n readonly isDirty: boolean;\n\n /**\n * Closes the container\n */\n close(error?: ICriticalContainerError): void;\n\n /**\n * Closes the container and returns serialized local state intended to be\n * given to a newly loaded container\n */\n closeAndGetPendingLocalState(): string;\n\n /**\n * Propose new code details that define the code to be loaded\n * for this container's runtime. The returned promise will\n * be true when the proposal is accepted, and false if\n * the proposal is rejected.\n */\n proposeCodeDetails(codeDetails: IFluidCodeDetails): Promise<boolean>\n\n /**\n * Attaches the Container to the Container specified by the given Request.\n *\n * TODO - in the case of failure options should give a retry policy. Or some continuation function\n * that allows attachment to a secondary document.\n */\n attach(request: IRequest): Promise<void>;\n\n /**\n * Extract the snapshot from the detached container.\n */\n serialize(): string;\n\n /**\n * Get an absolute url for a provided container-relative request url.\n * If the container is not attached, this will return undefined.\n *\n * @param relativeUrl - A container-relative request URL\n */\n getAbsoluteUrl(relativeUrl: string): Promise<string | undefined>;\n\n /**\n * Issue a request against the container for a resource.\n * @param request - The request to be issued against the container\n */\n request(request: IRequest): Promise<IResponse>;\n\n /**\n * Provides the current connected state of the container\n */\n readonly connectionState: ConnectionState;\n\n /**\n * Boolean indicating whether the container is currently connected or not\n */\n readonly connected: boolean;\n\n /**\n * Dictates whether or not the current container will automatically attempt to reconnect to the delta stream\n * after receiving a disconnect event\n * @param reconnect - Boolean indicating if reconnect should automatically occur\n * @alpha\n */\n setAutoReconnect?(reconnect: boolean): void;\n\n /**\n * Have the container attempt to resume processing ops\n * @alpha\n */\n resume?(): void;\n\n /**\n * The audience information for all clients currently associated with the document in the current session\n */\n readonly audience: IAudience;\n\n /**\n * The server provided ID of the client.\n * Set once this.connected is true, otherwise undefined\n * @alpha\n */\n readonly clientId?: string | undefined;\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 */\n readonly readOnlyInfo: ReadOnlyInfo;\n\n /**\n * Allows the host to have the container force to be in read-only mode\n * @param readonly - Boolean that toggles if read-only policies will be enforced\n * @alpha\n */\n forceReadonly?(readonly: boolean);\n}\n\n/**\n * The Runtime's view of the Loader, used for loading Containers\n */\nexport interface ILoader extends IFluidRouter, Partial<IProvideLoader> {\n /**\n * Resolves the resource specified by the URL + headers contained in the request object\n * to the underlying container that will resolve the request.\n *\n * An analogy for this is resolve is a DNS resolve of a Fluid container. Request then executes\n * a request against the server found from the resolve step.\n */\n resolve(request: IRequest, pendingLocalState?: string): Promise<IContainer>;\n}\n\n/**\n * The Host's view of the Loader, used for loading Containers\n */\nexport interface IHostLoader extends ILoader {\n /**\n * Creates a new container using the specified chaincode but in an unattached state. While unattached all\n * updates will only be local until the user explicitly attaches the container to a service provider.\n */\n createDetachedContainer(codeDetails: IFluidCodeDetails): Promise<IContainer>;\n\n /**\n * Creates a new container using the specified snapshot but in an unattached state. While unattached all\n * updates will only be local until the user explicitly attaches the container to a service provider.\n */\n rehydrateDetachedContainerFromSnapshot(snapshot: string): Promise<IContainer>;\n}\n\nexport type ILoaderOptions = {\n [key in string | number]: any;\n} & {\n /**\n * Set caching behavior for the loader. If true, we will load a container from cache if one\n * with the same id/version exists or create a new container and cache it if it does not. If\n * false, always load a new container and don't cache it. If the container has already been\n * closed, it will not be cached. A cache option in the LoaderHeader for an individual\n * request will override the Loader's value.\n * Defaults to true.\n */\n cache?: boolean;\n\n /**\n * Provide the current Loader through the scope object when creating Containers. It is added\n * as the `ILoader` property, and will overwrite an existing property of the same name on the\n * scope. Useful for when the host wants to provide the current Loader's functionality to\n * individual Data Stores, which is typically expected when creating with a Loader.\n * Defaults to true.\n */\n provideScopeLoader?: boolean;\n\n // Below two are the options based on which we decide how often client needs to send noops in case of active\n // connection which is not sending any op. The end result is the \"AND\" of these 2 options. So the client\n // should hit the min time and count to send the noop.\n /**\n * Set min time(in ms) frequency with which noops would be sent in case of active connection which is\n * not sending any op.\n */\n noopTimeFrequency?: number;\n\n /**\n * Set min op frequency with which noops would be sent in case of active connection which is not sending any op.\n */\n noopCountFrequency?: number;\n\n /**\n * Max time(in ms) container will wait for a leave message of a disconnected client.\n */\n maxClientLeaveWaitTime?: number,\n};\n\n/**\n * Accepted header keys for requests coming to the Loader\n */\nexport enum LoaderHeader {\n /**\n * Override the Loader's default caching behavior for this container.\n */\n cache = \"fluid-cache\",\n\n clientDetails = \"fluid-client-details\",\n\n /**\n * Start the container in a paused, unconnected state. Defaults to false\n */\n loadMode = \"loadMode\",\n reconnect = \"fluid-reconnect\",\n sequenceNumber = \"fluid-sequence-number\",\n\n /**\n * One of the following:\n * null or \"null\": use ops, no snapshots\n * undefined: fetch latest snapshot\n * otherwise, version sha to load snapshot\n */\n version = \"version\",\n}\n\nexport interface IContainerLoadMode {\n opsBeforeReturn?:\n /*\n * No trailing ops are applied before container is returned.\n * Default value.\n */\n | undefined\n /*\n * Only cached trailing ops are applied before returning container.\n * Caching is optional and could be implemented by the driver.\n * If driver does not implement any kind of local caching strategy, this is same as above.\n * Driver may cache a lot of ops, so care needs to be exercised (see below).\n */\n | \"cached\"\n /*\n * All trailing ops in storage are fetched and applied before container is returned\n * This mode might have significant impact on boot speed (depends on storage perf characteristics)\n * Also there might be a lot of trailing ops and applying them might take time, so hosts are\n * recommended to have some progress UX / cancellation built into loading flow when using this option.\n */\n | \"all\"\n deltaConnection?:\n /*\n * Connection to delta stream is made only when Container.resume() call is made. Op processing\n * is paused (when container is returned from Loader.resolve()) until Container.resume() call is made.\n */\n | \"none\"\n /*\n * Connection to delta stream is made only when Container.resume() call is made.\n * Op fetching from storage is performed and ops are applied as they come in.\n * This is useful option if connection to delta stream is expensive and thus it's beneficial to move it\n * out from critical boot sequence, but it's beneficial to allow catch up to happen as fast as possible.\n */\n | \"delayed\"\n /*\n * Connection to delta stream is made right away.\n * Ops processing is enabled and ops are flowing through the system.\n * Default value.\n */\n | undefined\n}\n\n/**\n * Set of Request Headers that the Loader understands and may inspect or modify\n */\nexport interface ILoaderHeader {\n [LoaderHeader.cache]: boolean;\n [LoaderHeader.clientDetails]: IClientDetails;\n [LoaderHeader.loadMode]: IContainerLoadMode;\n [LoaderHeader.sequenceNumber]: number;\n [LoaderHeader.reconnect]: boolean;\n [LoaderHeader.version]: string | undefined;\n}\n\nexport interface IProvideLoader {\n readonly ILoader: ILoader;\n}\n\ndeclare module \"@fluidframework/core-interfaces\" {\n // eslint-disable-next-line @typescript-eslint/no-empty-interface\n export interface IRequestHeader extends Partial<ILoaderHeader> { }\n\n export interface IFluidObject {\n /**\n * @deprecated - use `FluidObject<ILoader>` instead\n */\n readonly ILoader?: ILoader;\n }\n}\n\nexport interface IPendingLocalState {\n url: string;\n pendingRuntimeState: unknown;\n}\n"]}
package/dist/runtime.d.ts CHANGED
@@ -105,14 +105,7 @@ export interface IContainerContext extends IDisposable {
105
105
  getSpecifiedCodeDetails?(): IFluidCodeDetails | undefined;
106
106
  readonly audience: IAudience | undefined;
107
107
  readonly loader: ILoader;
108
- /** @deprecated - Use `taggedLogger` if present. Otherwise, be sure to handle tagged data
109
- * before sending events to this logger. In time we will assume the presence of `taggedLogger`,
110
- * but in the meantime, current and older loader versions buttress loggers that do not support tags.
111
- * IContainerContext will retain both options, but hosts must now support tags as the loader
112
- * will soon plumb taggedLogger's events (potentially tagged) to the host's logger.
113
- */
114
- readonly logger?: ITelemetryBaseLogger;
115
- readonly taggedLogger?: ITelemetryBaseLogger;
108
+ readonly taggedLogger: ITelemetryBaseLogger;
116
109
  readonly serviceConfiguration: IClientConfiguration | undefined;
117
110
  pendingLocalState?: unknown;
118
111
  /**
@@ -122,7 +115,7 @@ export interface IContainerContext extends IDisposable {
122
115
  /**
123
116
  * @deprecated 0.56, will be removed in the next release
124
117
  */
125
- raiseContainerWarning(warning: ContainerWarning): void;
118
+ raiseContainerWarning?(warning: ContainerWarning): void;
126
119
  /**
127
120
  * Get an absolute url for a provided container-relative request.
128
121
  * @param relativeUrl - A relative request within the container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AmB,CAAA;IACnB,4BAAe,CAAA;AACnB,CAAC,EAJW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAIpB;AAwHY,QAAA,eAAe,GAAiC,iBAAiB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ITelemetryBaseLogger, IDisposable } from \"@fluidframework/common-definitions\";\nimport {\n FluidObject,\n IFluidCodeDetails,\n IFluidObject,\n IRequest,\n IResponse,\n} from \"@fluidframework/core-interfaces\";\nimport { IDocumentStorageService } from \"@fluidframework/driver-definitions\";\nimport {\n IClientConfiguration,\n IClientDetails,\n ISequencedDocumentMessage,\n ISnapshotTree,\n MessageType,\n ISummaryTree,\n IVersion,\n IDocumentMessage,\n IQuorumClients,\n} from \"@fluidframework/protocol-definitions\";\nimport { IAudience } from \"./audience\";\nimport { IDeltaManager } from \"./deltas\";\nimport { ICriticalContainerError, ContainerWarning } from \"./error\";\nimport { ILoader, ILoaderOptions } from \"./loader\";\n\n/**\n * The attachment state of some Fluid data (e.g. a container or data store), denoting whether it is uploaded to the\n * service. The transition from detached to attached state is a one-way transition.\n */\nexport enum AttachState {\n /**\n * In detached state, the data is only present on the local client's machine. It has not yet been uploaded\n * to the service.\n */\n Detached = \"Detached\",\n\n /**\n * In attaching state, the data has started the upload to the service, but has not yet completed.\n */\n Attaching = \"Attaching\",\n\n /**\n * In attached state, the data has completed upload to the service. It can be accessed by other clients after\n * reaching attached state.\n */\n Attached = \"Attached\",\n}\n\n// Represents the bind state of the entity.\nexport enum BindState {\n NotBound = \"NotBound\",\n Binding = \"Binding\",\n Bound = \"Bound\",\n}\n\n/**\n * The IRuntime represents an instantiation of a code package within a Container.\n * Primarily held by the ContainerContext to be able to interact with the running instance of the Container.\n */\nexport interface IRuntime extends IDisposable {\n\n /**\n * Executes a request against the runtime\n */\n request(request: IRequest): Promise<IResponse>;\n\n /**\n * Notifies the runtime of a change in the connection state\n */\n setConnectionState(connected: boolean, clientId?: string);\n\n /**\n * Processes the given op (message)\n */\n process(message: ISequencedDocumentMessage, local: boolean, context: any);\n\n /**\n * Processes the given signal\n */\n processSignal(message: any, local: boolean);\n\n /**\n * Create a summary. Used when attaching or serializing a detached container.\n *\n * @param blobRedirectTable - A table passed during the attach process. While detached, blob upload is supported\n * using IDs generated locally. After attach, these IDs cannot be used, so this table maps the old local IDs to the\n * new storage IDs so requests can be redirected.\n */\n createSummary(blobRedirectTable?: Map<string, string>): ISummaryTree;\n\n /**\n * Propagate the container state when container is attaching or attached.\n * @param attachState - State of the container.\n */\n setAttachState(attachState: AttachState.Attaching | AttachState.Attached): void;\n\n /**\n * Get pending local state in a serializable format to be given back to a newly loaded container\n */\n getPendingLocalState(): unknown;\n}\n\n/**\n * The ContainerContext is a proxy standing between the Container and the Container's IRuntime.\n * This allows the Container to terminate the connection to the IRuntime.\n *\n * Specifically, there is an event on Container, onContextChanged, which mean a new code proposal has been loaded,\n * so the old IRuntime is no longer valid, as its ContainerContext has been revoked,\n * and the Container has created a new ContainerContext.\n */\nexport interface IContainerContext extends IDisposable {\n readonly existing: boolean | undefined;\n readonly options: ILoaderOptions;\n readonly clientId: string | undefined;\n readonly clientDetails: IClientDetails;\n readonly storage: IDocumentStorageService;\n readonly connected: boolean;\n readonly baseSnapshot: ISnapshotTree | undefined;\n readonly submitFn: (type: MessageType, contents: any, batch: boolean, appData?: any) => number;\n readonly submitSignalFn: (contents: any) => void;\n readonly closeFn: (error?: ICriticalContainerError) => void;\n readonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;\n readonly quorum: IQuorumClients;\n /**\n * @deprecated This method is provided as a migration tool for customers currently reading the code details\n * from within the Container by directly accessing the Quorum proposals. The code details should not be accessed\n * from within the Container as this requires coupling between the container contents and the code loader.\n * Direct access to Quorum proposals will be removed in an upcoming release, and in a further future release this\n * migration tool will be removed.\n */\n getSpecifiedCodeDetails?(): IFluidCodeDetails | undefined;\n readonly audience: IAudience | undefined;\n readonly loader: ILoader;\n /** @deprecated - Use `taggedLogger` if present. Otherwise, be sure to handle tagged data\n * before sending events to this logger. In time we will assume the presence of `taggedLogger`,\n * but in the meantime, current and older loader versions buttress loggers that do not support tags.\n * IContainerContext will retain both options, but hosts must now support tags as the loader\n * will soon plumb taggedLogger's events (potentially tagged) to the host's logger.\n */\n readonly logger?: ITelemetryBaseLogger;\n // The logger implementation, which would support tagged events, should be provided by the loader.\n readonly taggedLogger?: ITelemetryBaseLogger;\n readonly serviceConfiguration: IClientConfiguration | undefined;\n pendingLocalState?: unknown;\n\n /**\n * Ambient services provided with the context\n */\n readonly scope: IFluidObject & FluidObject;\n\n /**\n * @deprecated 0.56, will be removed in the next release\n */\n raiseContainerWarning(warning: ContainerWarning): void;\n\n /**\n * Get an absolute url for a provided container-relative request.\n * @param relativeUrl - A relative request within the container\n *\n * TODO: Optional for backwards compatibility. Make non-optional in version 0.19\n */\n getAbsoluteUrl?(relativeUrl: string): Promise<string | undefined>;\n\n /**\n * Indicates the attachment state of the container to a host service.\n */\n readonly attachState: AttachState;\n\n getLoadedFromVersion(): IVersion | undefined;\n\n updateDirtyContainerState(dirty: boolean): void;\n}\n\nexport const IRuntimeFactory: keyof IProvideRuntimeFactory = \"IRuntimeFactory\";\n\nexport interface IProvideRuntimeFactory {\n readonly IRuntimeFactory: IRuntimeFactory;\n}\n\n/**\n * Exported module definition\n *\n * Provides the entry point for the ContainerContext to load the proper IRuntime\n * to start up the running instance of the Container.\n */\nexport interface IRuntimeFactory extends IProvideRuntimeFactory {\n /**\n * Instantiates a new IRuntime for the given IContainerContext to proxy to\n * This is the main entry point to the Container's business logic\n *\n * @param context - container context to be supplied to the runtime\n * @param existing - whether to instantiate for the first time or from an existing context\n */\n instantiateRuntime(context: IContainerContext, existing?: boolean): Promise<IRuntime>;\n}\n"]}
1
+ {"version":3,"file":"runtime.js","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AA2BH;;;GAGG;AACH,IAAY,WAiBX;AAjBD,WAAY,WAAW;IACnB;;;OAGG;IACH,oCAAqB,CAAA;IAErB;;OAEG;IACH,sCAAuB,CAAA;IAEvB;;;OAGG;IACH,oCAAqB,CAAA;AACzB,CAAC,EAjBW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAiBtB;AAED,2CAA2C;AAC3C,IAAY,SAIX;AAJD,WAAY,SAAS;IACjB,kCAAqB,CAAA;IACrB,gCAAmB,CAAA;IACnB,4BAAe,CAAA;AACnB,CAAC,EAJW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAIpB;AAiHY,QAAA,eAAe,GAAiC,iBAAiB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ITelemetryBaseLogger, IDisposable } from \"@fluidframework/common-definitions\";\nimport {\n FluidObject,\n IFluidCodeDetails,\n IFluidObject,\n IRequest,\n IResponse,\n} from \"@fluidframework/core-interfaces\";\nimport { IDocumentStorageService } from \"@fluidframework/driver-definitions\";\nimport {\n IClientConfiguration,\n IClientDetails,\n ISequencedDocumentMessage,\n ISnapshotTree,\n MessageType,\n ISummaryTree,\n IVersion,\n IDocumentMessage,\n IQuorumClients,\n} from \"@fluidframework/protocol-definitions\";\nimport { IAudience } from \"./audience\";\nimport { IDeltaManager } from \"./deltas\";\nimport { ICriticalContainerError, ContainerWarning } from \"./error\";\nimport { ILoader, ILoaderOptions } from \"./loader\";\n\n/**\n * The attachment state of some Fluid data (e.g. a container or data store), denoting whether it is uploaded to the\n * service. The transition from detached to attached state is a one-way transition.\n */\nexport enum AttachState {\n /**\n * In detached state, the data is only present on the local client's machine. It has not yet been uploaded\n * to the service.\n */\n Detached = \"Detached\",\n\n /**\n * In attaching state, the data has started the upload to the service, but has not yet completed.\n */\n Attaching = \"Attaching\",\n\n /**\n * In attached state, the data has completed upload to the service. It can be accessed by other clients after\n * reaching attached state.\n */\n Attached = \"Attached\",\n}\n\n// Represents the bind state of the entity.\nexport enum BindState {\n NotBound = \"NotBound\",\n Binding = \"Binding\",\n Bound = \"Bound\",\n}\n\n/**\n * The IRuntime represents an instantiation of a code package within a Container.\n * Primarily held by the ContainerContext to be able to interact with the running instance of the Container.\n */\nexport interface IRuntime extends IDisposable {\n\n /**\n * Executes a request against the runtime\n */\n request(request: IRequest): Promise<IResponse>;\n\n /**\n * Notifies the runtime of a change in the connection state\n */\n setConnectionState(connected: boolean, clientId?: string);\n\n /**\n * Processes the given op (message)\n */\n process(message: ISequencedDocumentMessage, local: boolean, context: any);\n\n /**\n * Processes the given signal\n */\n processSignal(message: any, local: boolean);\n\n /**\n * Create a summary. Used when attaching or serializing a detached container.\n *\n * @param blobRedirectTable - A table passed during the attach process. While detached, blob upload is supported\n * using IDs generated locally. After attach, these IDs cannot be used, so this table maps the old local IDs to the\n * new storage IDs so requests can be redirected.\n */\n createSummary(blobRedirectTable?: Map<string, string>): ISummaryTree;\n\n /**\n * Propagate the container state when container is attaching or attached.\n * @param attachState - State of the container.\n */\n setAttachState(attachState: AttachState.Attaching | AttachState.Attached): void;\n\n /**\n * Get pending local state in a serializable format to be given back to a newly loaded container\n */\n getPendingLocalState(): unknown;\n}\n\n/**\n * The ContainerContext is a proxy standing between the Container and the Container's IRuntime.\n * This allows the Container to terminate the connection to the IRuntime.\n *\n * Specifically, there is an event on Container, onContextChanged, which mean a new code proposal has been loaded,\n * so the old IRuntime is no longer valid, as its ContainerContext has been revoked,\n * and the Container has created a new ContainerContext.\n */\nexport interface IContainerContext extends IDisposable {\n readonly existing: boolean | undefined;\n readonly options: ILoaderOptions;\n readonly clientId: string | undefined;\n readonly clientDetails: IClientDetails;\n readonly storage: IDocumentStorageService;\n readonly connected: boolean;\n readonly baseSnapshot: ISnapshotTree | undefined;\n readonly submitFn: (type: MessageType, contents: any, batch: boolean, appData?: any) => number;\n readonly submitSignalFn: (contents: any) => void;\n readonly closeFn: (error?: ICriticalContainerError) => void;\n readonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;\n readonly quorum: IQuorumClients;\n /**\n * @deprecated This method is provided as a migration tool for customers currently reading the code details\n * from within the Container by directly accessing the Quorum proposals. The code details should not be accessed\n * from within the Container as this requires coupling between the container contents and the code loader.\n * Direct access to Quorum proposals will be removed in an upcoming release, and in a further future release this\n * migration tool will be removed.\n */\n getSpecifiedCodeDetails?(): IFluidCodeDetails | undefined;\n readonly audience: IAudience | undefined;\n readonly loader: ILoader;\n // The logger implementation, which would support tagged events, should be provided by the loader.\n readonly taggedLogger: ITelemetryBaseLogger;\n readonly serviceConfiguration: IClientConfiguration | undefined;\n pendingLocalState?: unknown;\n\n /**\n * Ambient services provided with the context\n */\n readonly scope: IFluidObject & FluidObject;\n\n /**\n * @deprecated 0.56, will be removed in the next release\n */\n raiseContainerWarning?(warning: ContainerWarning): void;\n\n /**\n * Get an absolute url for a provided container-relative request.\n * @param relativeUrl - A relative request within the container\n *\n * TODO: Optional for backwards compatibility. Make non-optional in version 0.19\n */\n getAbsoluteUrl?(relativeUrl: string): Promise<string | undefined>;\n\n /**\n * Indicates the attachment state of the container to a host service.\n */\n readonly attachState: AttachState;\n\n getLoadedFromVersion(): IVersion | undefined;\n\n updateDirtyContainerState(dirty: boolean): void;\n}\n\nexport const IRuntimeFactory: keyof IProvideRuntimeFactory = \"IRuntimeFactory\";\n\nexport interface IProvideRuntimeFactory {\n readonly IRuntimeFactory: IRuntimeFactory;\n}\n\n/**\n * Exported module definition\n *\n * Provides the entry point for the ContainerContext to load the proper IRuntime\n * to start up the running instance of the Container.\n */\nexport interface IRuntimeFactory extends IProvideRuntimeFactory {\n /**\n * Instantiates a new IRuntime for the given IContainerContext to proxy to\n * This is the main entry point to the Container's business logic\n *\n * @param context - container context to be supplied to the runtime\n * @param existing - whether to instantiate for the first time or from an existing context\n */\n instantiateRuntime(context: IContainerContext, existing?: boolean): Promise<IRuntime>;\n}\n"]}
package/lib/error.d.ts CHANGED
@@ -28,7 +28,8 @@ export declare enum ContainerErrorType {
28
28
  */
29
29
  usageError = "usageError",
30
30
  /**
31
- * Error indicating an client session has expired.
31
+ * Error indicating an client session has expired. Currently this only happens when GC is allowed on a document and
32
+ * aids in safely deleting unused objects.
32
33
  */
33
34
  clientSessionExpiredError = "clientSessionExpiredError"
34
35
  }
@@ -1 +1 @@
1
- {"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAE1E;;GAEG;AACH,oBAAY,kBAAkB;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;IAE1B;;OAEG;IACH,yBAAyB,8BAA8B;CAC1D;AAED;;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,CAA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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/lib/error.js CHANGED
@@ -28,7 +28,8 @@ export var ContainerErrorType;
28
28
  */
29
29
  ContainerErrorType["usageError"] = "usageError";
30
30
  /**
31
- * Error indicating an client session has expired.
31
+ * Error indicating an client session has expired. Currently this only happens when GC is allowed on a document and
32
+ * aids in safely deleting unused objects.
32
33
  */
33
34
  ContainerErrorType["clientSessionExpiredError"] = "clientSessionExpiredError";
34
35
  })(ContainerErrorType || (ContainerErrorType = {}));
package/lib/error.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"error.js","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;GAEG;AACH,MAAM,CAAN,IAAY,kBA8BX;AA9BD,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;IAE1B;;OAEG;IACH,6EAAuD,CAAA;AAC3D,CAAC,EA9BW,kBAAkB,KAAlB,kBAAkB,QA8B7B","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 * Error indicating an client session has expired.\n */\n clientSessionExpiredError = \"clientSessionExpiredError\",\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"]}
1
+ {"version":3,"file":"error.js","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;GAEG;AACH,MAAM,CAAN,IAAY,kBA+BX;AA/BD,WAAY,kBAAkB;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;IAE1B;;;OAGG;IACH,6EAAuD,CAAA;AAC3D,CAAC,EA/BW,kBAAkB,KAAlB,kBAAkB,QA+B7B","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ITelemetryProperties } from \"@fluidframework/common-definitions\";\n\n/**\n * Different error types the Container may report out to the Host\n */\nexport enum ContainerErrorType {\n /**\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 * Error indicating an client session has expired. Currently this only happens when GC is allowed on a document and\n * aids in safely deleting unused objects.\n */\n clientSessionExpiredError = \"clientSessionExpiredError\",\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/lib/index.d.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  */
5
5
  export * from "./audience";
6
6
  export * from "./browserPackage";
7
- export * from "./legacy/chaincode";
7
+ export * from "./legacy";
8
8
  export * from "./deltas";
9
9
  export * from "./error";
10
10
  export * from "./loader";
@@ -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;AACjC,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"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,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"}
package/lib/index.js CHANGED
@@ -4,7 +4,7 @@
4
4
  */
5
5
  export * from "./audience";
6
6
  export * from "./browserPackage";
7
- export * from "./legacy/chaincode";
7
+ export * from "./legacy";
8
8
  export * from "./deltas";
9
9
  export * from "./error";
10
10
  export * from "./loader";
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,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","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nexport * from \"./audience\";\nexport * from \"./browserPackage\";\nexport * from \"./legacy/chaincode\";\nexport * from \"./deltas\";\nexport * from \"./error\";\nexport * from \"./loader\";\nexport * from \"./fluidModule\";\nexport * from \"./fluidPackage\";\nexport * from \"./proxyLoader\";\nexport * from \"./runtime\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,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","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nexport * from \"./audience\";\nexport * from \"./browserPackage\";\nexport * from \"./legacy\";\nexport * from \"./deltas\";\nexport * from \"./error\";\nexport * from \"./loader\";\nexport * from \"./fluidModule\";\nexport * from \"./fluidPackage\";\nexport * from \"./proxyLoader\";\nexport * from \"./runtime\";\n"]}
@@ -29,4 +29,4 @@ declare module "@fluidframework/core-interfaces" {
29
29
  readonly IFluidTokenProvider?: IFluidTokenProvider;
30
30
  }
31
31
  }
32
- //# sourceMappingURL=chaincode.d.ts.map
32
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/legacy/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE7C;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,MAAM,0BAAkD,CAAC;AAE3F;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACvC,QAAQ,CAAC,mBAAmB,EAAE,mBAAmB,CAAC;CACrD;AAED;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,0BAA0B;IACnE,YAAY,EAAE;QAAE,CAAC,OAAO,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;CAC5C;AAED,OAAO,QAAQ,iCAAiC,CAAC;IAC7C,UAAiB,YAAY;QACzB,+DAA+D;QAC/D,QAAQ,CAAC,eAAe,CAAC,EAAE,eAAe,CAAC;QAC3C,mEAAmE;QACnE,QAAQ,CAAC,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;KACtD;CACJ"}
@@ -6,4 +6,4 @@
6
6
  * @deprecated - This will be removed in a later release.
7
7
  */
8
8
  export const IFluidTokenProvider = "IFluidTokenProvider";
9
- //# sourceMappingURL=chaincode.js.map
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/legacy/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAqC,qBAAqB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IRuntimeFactory } from \"../runtime\";\n\n/**\n * @deprecated - This will be removed in a later release.\n */\nexport const IFluidTokenProvider: keyof IProvideFluidTokenProvider = \"IFluidTokenProvider\";\n\n/**\n * @deprecated - This will be removed in a later release.\n */\nexport interface IProvideFluidTokenProvider {\n readonly IFluidTokenProvider: IFluidTokenProvider;\n}\n\n/**\n * @deprecated - This will be removed in a later release.\n */\nexport interface IFluidTokenProvider extends IProvideFluidTokenProvider {\n intelligence: { [service: string]: any };\n}\n\ndeclare module \"@fluidframework/core-interfaces\" {\n export interface IFluidObject {\n /** @deprecated - use `FluidObject<IRuntimeFactory>` instead */\n readonly IRuntimeFactory?: IRuntimeFactory;\n /** @deprecated - use `FluidObject<IFluidTokenProvider>` instead */\n readonly IFluidTokenProvider?: IFluidTokenProvider;\n }\n}\n"]}
package/lib/loader.d.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  import { IRequest, IResponse, IFluidRouter, IFluidCodeDetails, IFluidPackage, IProvideFluidCodeDetailsComparer } from "@fluidframework/core-interfaces";
6
- import { IClientDetails, IDocumentMessage, IPendingProposal, IQuorumClients, ISequencedDocumentMessage } from "@fluidframework/protocol-definitions";
6
+ import { IClientDetails, IDocumentMessage, IQuorumClients, ISequencedDocumentMessage, ISequencedProposal } from "@fluidframework/protocol-definitions";
7
7
  import { IResolvedUrl } from "@fluidframework/driver-definitions";
8
8
  import { IEvent, IEventProvider } from "@fluidframework/common-definitions";
9
9
  import { IAudience } from "./audience";
@@ -92,7 +92,7 @@ export interface ICodeAllowList {
92
92
  export interface IContainerEvents extends IEvent {
93
93
  (event: "readonly", listener: (readonly: boolean) => void): void;
94
94
  (event: "connected", listener: (clientId: string) => void): any;
95
- (event: "codeDetailsProposed", listener: (codeDetails: IFluidCodeDetails, proposal: IPendingProposal) => void): any;
95
+ (event: "codeDetailsProposed", listener: (codeDetails: IFluidCodeDetails, proposal: ISequencedProposal) => void): any;
96
96
  (event: "contextChanged", listener: (codeDetails: IFluidCodeDetails) => void): any;
97
97
  (event: "disconnected" | "attached", listener: () => void): any;
98
98
  (event: "closed", listener: (error?: ICriticalContainerError) => void): any;
@@ -1 +1 @@
1
- {"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../src/loader.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACH,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,gCAAgC,EACnC,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACH,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,yBAAyB,EAC5B,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;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MAAM,CAAN,IAAY,YAsBX;AAtBD,WAAY,YAAY;IACpB;;OAEG;IACH,qCAAqB,CAAA;IAErB,sDAAsC,CAAA;IAEtC;;OAEG;IACH,qCAAqB,CAAA;IACrB,6CAA6B,CAAA;IAC7B,wDAAwC,CAAA;IAExC;;;;;OAKG;IACH,mCAAmB,CAAA;AACvB,CAAC,EAtBW,YAAY,KAAZ,YAAY,QAsBvB","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n IRequest,\n IResponse,\n IFluidRouter,\n IFluidCodeDetails,\n IFluidPackage,\n IProvideFluidCodeDetailsComparer,\n} from \"@fluidframework/core-interfaces\";\nimport {\n IClientDetails,\n IDocumentMessage,\n IPendingProposal,\n IQuorumClients,\n ISequencedDocumentMessage,\n} from \"@fluidframework/protocol-definitions\";\nimport { IResolvedUrl } from \"@fluidframework/driver-definitions\";\nimport { IEvent, IEventProvider } from \"@fluidframework/common-definitions\";\nimport { IAudience } from \"./audience\";\nimport { IDeltaManager, ReadOnlyInfo } from \"./deltas\";\nimport { ICriticalContainerError, ContainerWarning } from \"./error\";\nimport { IFluidModule } from \"./fluidModule\";\nimport { AttachState } from \"./runtime\";\n\n/**\n * Code loading interface\n *\n * @deprecated in favor of {@link @fluidframework/container-loader#ICodeDetailsLoader}\n */\nexport interface ICodeLoader extends Partial<IProvideFluidCodeDetailsComparer> {\n /**\n * Loads the package specified by code details and returns a promise to its entry point exports.\n */\n load(source: IFluidCodeDetails): Promise<IFluidModule>;\n}\n\n/**\n * Encapsulates a module entry point with corresponding code details.\n */\nexport interface IFluidModuleWithDetails {\n /** Fluid code module that implements the runtime factory needed to instantiate the container runtime. */\n module: IFluidModule;\n /**\n * Code details associated with the module. Represents a document schema this module supports.\n * If the code loader implements the {@link @fluidframework/core-interfaces#IFluidCodeDetailsComparer} interface,\n * it'll be called to determine whether the module code details satisfy the new code proposal in the quorum.\n */\n details: IFluidCodeDetails;\n}\n\n/**\n * Fluid code loader resolves a code module matching the document schema, i.e. code details, such as\n * a package name and package version range.\n */\nexport interface ICodeDetailsLoader\n extends Partial<IProvideFluidCodeDetailsComparer> {\n /**\n * Load the code module (package) that is capable to interact with the document.\n *\n * @param source - Code proposal that articulates the current schema the document is written in.\n * @returns - Code module entry point along with the code details associated with it.\n */\n load(source: IFluidCodeDetails): Promise<IFluidModuleWithDetails>;\n}\n\n/**\n* The interface returned from a IFluidCodeResolver which represents IFluidCodeDetails\n * that have been resolved and are ready to load\n */\nexport interface IResolvedFluidCodeDetails extends IFluidCodeDetails {\n /**\n * A resolved version of the Fluid package. All Fluid browser file entries should be absolute urls.\n */\n readonly resolvedPackage: Readonly<IFluidPackage>;\n /**\n * If not undefined, this id will be used to cache the entry point for the code package\n */\n readonly resolvedPackageCacheId: string | undefined;\n}\n\n/**\n * Fluid code resolvers take a Fluid code details, and resolve the\n * full Fluid package including absolute urls for the browser file entries.\n * The Fluid code resolver is coupled to a specific cdn and knows how to resolve\n * the code detail for loading from that cdn. This include resolving to the most recent\n * version of package that supports the provided code details.\n */\nexport interface IFluidCodeResolver {\n /**\n * Resolves a Fluid code details into a form that can be loaded\n * @param details - The Fluid code details to resolve\n * @returns - A IResolvedFluidCodeDetails where the\n * resolvedPackage's Fluid file entries are absolute urls, and\n * an optional resolvedPackageCacheId if the loaded package should be\n * cached.\n */\n resolveCodeDetails(details: IFluidCodeDetails): Promise<IResolvedFluidCodeDetails>;\n}\n\n/**\n * Code AllowListing Interface\n */\nexport interface ICodeAllowList {\n testSource(source: IResolvedFluidCodeDetails): Promise<boolean>;\n}\n\n/**\n * Events emitted by the Container \"upwards\" to the Loader and Host\n */\nexport interface IContainerEvents extends IEvent {\n (event: \"readonly\", listener: (readonly: boolean) => void): void;\n (event: \"connected\", listener: (clientId: string) => void);\n (event: \"codeDetailsProposed\", listener: (codeDetails: IFluidCodeDetails, proposal: IPendingProposal) => void);\n (event: \"contextChanged\", listener: (codeDetails: IFluidCodeDetails) => void);\n (event: \"disconnected\" | \"attached\", listener: () => void);\n (event: \"closed\", listener: (error?: ICriticalContainerError) => void);\n (event: \"warning\", listener: (error: ContainerWarning) => void);\n (event: \"op\", listener: (message: ISequencedDocumentMessage) => void);\n (event: \"dirty\" | \"saved\", listener: (dirty: boolean) => void);\n}\n\n/**\n * Namespace for the different connection states a container can be in\n */\nexport namespace ConnectionState {\n /**\n * The document is no longer connected to the delta server\n */\n export type Disconnected = 0;\n\n /**\n * The document has an inbound connection but is still pending for outbound deltas\n */\n export type Connecting = 1;\n\n /**\n * The document is fully connected\n */\n export type Connected = 2;\n}\n\n/**\n * Type defining the different states of connectivity a container can be in\n */\nexport type ConnectionState = ConnectionState.Disconnected | ConnectionState.Connecting | ConnectionState.Connected;\n\n/**\n * The Host's view of the Container and its connection to storage\n */\nexport interface IContainer extends IEventProvider<IContainerEvents>, IFluidRouter {\n\n /**\n * The Delta Manager supporting the op stream for this Container\n */\n deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;\n\n /**\n * The collection of write clients which were connected as of the current sequence number.\n * Also contains a map of key-value pairs that must be agreed upon by all clients before being accepted.\n */\n getQuorum(): IQuorumClients;\n\n /**\n * Represents the resolved url to the Container\n */\n resolvedUrl: IResolvedUrl | undefined;\n\n /**\n * Indicates the attachment state of the container to a host service.\n */\n readonly attachState: AttachState;\n\n /**\n * Get the code details that are currently specified for the container.\n * @returns The current code details if any are specified, undefined if none are specified.\n */\n getSpecifiedCodeDetails(): IFluidCodeDetails | undefined;\n\n /**\n * Get the code details that were used to load the container.\n * @returns The code details that were used to load the container if it is loaded, undefined if it is not yet\n * loaded.\n */\n getLoadedCodeDetails(): IFluidCodeDetails | undefined;\n\n /**\n * Returns true if the container has been closed, otherwise false\n */\n readonly closed: boolean;\n\n /**\n * Returns true if the container is dirty, i.e. there are user changes that has not been saved\n * Closing container in this state results in data loss for user.\n * Container usually gets into this situation due to loss of connectivity.\n */\n readonly isDirty: boolean;\n\n /**\n * Closes the container\n */\n close(error?: ICriticalContainerError): void;\n\n /**\n * Closes the container and returns serialized local state intended to be\n * given to a newly loaded container\n */\n closeAndGetPendingLocalState(): string;\n\n /**\n * Propose new code details that define the code to be loaded\n * for this container's runtime. The returned promise will\n * be true when the proposal is accepted, and false if\n * the proposal is rejected.\n */\n proposeCodeDetails(codeDetails: IFluidCodeDetails): Promise<boolean>\n\n /**\n * Attaches the Container to the Container specified by the given Request.\n *\n * TODO - in the case of failure options should give a retry policy. Or some continuation function\n * that allows attachment to a secondary document.\n */\n attach(request: IRequest): Promise<void>;\n\n /**\n * Extract the snapshot from the detached container.\n */\n serialize(): string;\n\n /**\n * Get an absolute url for a provided container-relative request url.\n * If the container is not attached, this will return undefined.\n *\n * @param relativeUrl - A container-relative request URL\n */\n getAbsoluteUrl(relativeUrl: string): Promise<string | undefined>;\n\n /**\n * Issue a request against the container for a resource.\n * @param request - The request to be issued against the container\n */\n request(request: IRequest): Promise<IResponse>;\n\n /**\n * Provides the current connected state of the container\n */\n readonly connectionState: ConnectionState;\n\n /**\n * Boolean indicating whether the container is currently connected or not\n */\n readonly connected: boolean;\n\n /**\n * Dictates whether or not the current container will automatically attempt to reconnect to the delta stream\n * after receiving a disconnect event\n * @param reconnect - Boolean indicating if reconnect should automatically occur\n * @alpha\n */\n setAutoReconnect?(reconnect: boolean): void;\n\n /**\n * Have the container attempt to resume processing ops\n * @alpha\n */\n resume?(): void;\n\n /**\n * The audience information for all clients currently associated with the document in the current session\n */\n readonly audience: IAudience;\n\n /**\n * The server provided ID of the client.\n * Set once this.connected is true, otherwise undefined\n * @alpha\n */\n readonly clientId?: string | undefined;\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 */\n readonly readOnlyInfo: ReadOnlyInfo;\n\n /**\n * Allows the host to have the container force to be in read-only mode\n * @param readonly - Boolean that toggles if read-only policies will be enforced\n * @alpha\n */\n forceReadonly?(readonly: boolean);\n}\n\n/**\n * The Runtime's view of the Loader, used for loading Containers\n */\nexport interface ILoader extends IFluidRouter, Partial<IProvideLoader> {\n /**\n * Resolves the resource specified by the URL + headers contained in the request object\n * to the underlying container that will resolve the request.\n *\n * An analogy for this is resolve is a DNS resolve of a Fluid container. Request then executes\n * a request against the server found from the resolve step.\n */\n resolve(request: IRequest, pendingLocalState?: string): Promise<IContainer>;\n}\n\n/**\n * The Host's view of the Loader, used for loading Containers\n */\nexport interface IHostLoader extends ILoader {\n /**\n * Creates a new container using the specified chaincode but in an unattached state. While unattached all\n * updates will only be local until the user explicitly attaches the container to a service provider.\n */\n createDetachedContainer(codeDetails: IFluidCodeDetails): Promise<IContainer>;\n\n /**\n * Creates a new container using the specified snapshot but in an unattached state. While unattached all\n * updates will only be local until the user explicitly attaches the container to a service provider.\n */\n rehydrateDetachedContainerFromSnapshot(snapshot: string): Promise<IContainer>;\n}\n\nexport type ILoaderOptions = {\n [key in string | number]: any;\n} & {\n /**\n * Set caching behavior for the loader. If true, we will load a container from cache if one\n * with the same id/version exists or create a new container and cache it if it does not. If\n * false, always load a new container and don't cache it. If the container has already been\n * closed, it will not be cached. A cache option in the LoaderHeader for an individual\n * request will override the Loader's value.\n * Defaults to true.\n */\n cache?: boolean;\n\n /**\n * Provide the current Loader through the scope object when creating Containers. It is added\n * as the `ILoader` property, and will overwrite an existing property of the same name on the\n * scope. Useful for when the host wants to provide the current Loader's functionality to\n * individual Data Stores, which is typically expected when creating with a Loader.\n * Defaults to true.\n */\n provideScopeLoader?: boolean;\n\n // Below two are the options based on which we decide how often client needs to send noops in case of active\n // connection which is not sending any op. The end result is the \"AND\" of these 2 options. So the client\n // should hit the min time and count to send the noop.\n /**\n * Set min time(in ms) frequency with which noops would be sent in case of active connection which is\n * not sending any op.\n */\n noopTimeFrequency?: number;\n\n /**\n * Set min op frequency with which noops would be sent in case of active connection which is not sending any op.\n */\n noopCountFrequency?: number;\n\n /**\n * Max time(in ms) container will wait for a leave message of a disconnected client.\n */\n maxClientLeaveWaitTime?: number,\n};\n\n/**\n * Accepted header keys for requests coming to the Loader\n */\nexport enum LoaderHeader {\n /**\n * Override the Loader's default caching behavior for this container.\n */\n cache = \"fluid-cache\",\n\n clientDetails = \"fluid-client-details\",\n\n /**\n * Start the container in a paused, unconnected state. Defaults to false\n */\n loadMode = \"loadMode\",\n reconnect = \"fluid-reconnect\",\n sequenceNumber = \"fluid-sequence-number\",\n\n /**\n * One of the following:\n * null or \"null\": use ops, no snapshots\n * undefined: fetch latest snapshot\n * otherwise, version sha to load snapshot\n */\n version = \"version\",\n}\n\nexport interface IContainerLoadMode {\n opsBeforeReturn?:\n /*\n * No trailing ops are applied before container is returned.\n * Default value.\n */\n | undefined\n /*\n * Only cached trailing ops are applied before returning container.\n * Caching is optional and could be implemented by the driver.\n * If driver does not implement any kind of local caching strategy, this is same as above.\n * Driver may cache a lot of ops, so care needs to be exercised (see below).\n */\n | \"cached\"\n /*\n * All trailing ops in storage are fetched and applied before container is returned\n * This mode might have significant impact on boot speed (depends on storage perf characteristics)\n * Also there might be a lot of trailing ops and applying them might take time, so hosts are\n * recommended to have some progress UX / cancellation built into loading flow when using this option.\n */\n | \"all\"\n deltaConnection?:\n /*\n * Connection to delta stream is made only when Container.resume() call is made. Op processing\n * is paused (when container is returned from Loader.resolve()) until Container.resume() call is made.\n */\n | \"none\"\n /*\n * Connection to delta stream is made only when Container.resume() call is made.\n * Op fetching from storage is performed and ops are applied as they come in.\n * This is useful option if connection to delta stream is expensive and thus it's beneficial to move it\n * out from critical boot sequence, but it's beneficial to allow catch up to happen as fast as possible.\n */\n | \"delayed\"\n /*\n * Connection to delta stream is made right away.\n * Ops processing is enabled and ops are flowing through the system.\n * Default value.\n */\n | undefined\n}\n\n/**\n * Set of Request Headers that the Loader understands and may inspect or modify\n */\nexport interface ILoaderHeader {\n [LoaderHeader.cache]: boolean;\n [LoaderHeader.clientDetails]: IClientDetails;\n [LoaderHeader.loadMode]: IContainerLoadMode;\n [LoaderHeader.sequenceNumber]: number;\n [LoaderHeader.reconnect]: boolean;\n [LoaderHeader.version]: string | undefined;\n}\n\nexport interface IProvideLoader {\n readonly ILoader: ILoader;\n}\n\ndeclare module \"@fluidframework/core-interfaces\" {\n export interface IRequestHeader extends Partial<ILoaderHeader> { }\n\n export interface IFluidObject {\n /**\n * @deprecated - use `FluidObject<ILoader>` instead\n */\n readonly ILoader?: ILoader;\n }\n}\n\nexport interface IPendingLocalState {\n url: string;\n pendingRuntimeState: unknown;\n}\n"]}
1
+ {"version":3,"file":"loader.js","sourceRoot":"","sources":["../src/loader.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAuXH;;GAEG;AACH,MAAM,CAAN,IAAY,YAsBX;AAtBD,WAAY,YAAY;IACpB;;OAEG;IACH,qCAAqB,CAAA;IAErB,sDAAsC,CAAA;IAEtC;;OAEG;IACH,qCAAqB,CAAA;IACrB,6CAA6B,CAAA;IAC7B,wDAAwC,CAAA;IAExC;;;;;OAKG;IACH,mCAAmB,CAAA;AACvB,CAAC,EAtBW,YAAY,KAAZ,YAAY,QAsBvB","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n IRequest,\n IResponse,\n IFluidRouter,\n IFluidCodeDetails,\n IFluidPackage,\n IProvideFluidCodeDetailsComparer,\n} from \"@fluidframework/core-interfaces\";\nimport {\n IClientDetails,\n IDocumentMessage,\n IQuorumClients,\n ISequencedDocumentMessage,\n ISequencedProposal,\n} from \"@fluidframework/protocol-definitions\";\nimport { IResolvedUrl } from \"@fluidframework/driver-definitions\";\nimport { IEvent, IEventProvider } from \"@fluidframework/common-definitions\";\nimport { IAudience } from \"./audience\";\nimport { IDeltaManager, ReadOnlyInfo } from \"./deltas\";\nimport { ICriticalContainerError, ContainerWarning } from \"./error\";\nimport { IFluidModule } from \"./fluidModule\";\nimport { AttachState } from \"./runtime\";\n\n/**\n * Code loading interface\n *\n * @deprecated in favor of {@link @fluidframework/container-loader#ICodeDetailsLoader}\n */\nexport interface ICodeLoader extends Partial<IProvideFluidCodeDetailsComparer> {\n /**\n * Loads the package specified by code details and returns a promise to its entry point exports.\n */\n load(source: IFluidCodeDetails): Promise<IFluidModule>;\n}\n\n/**\n * Encapsulates a module entry point with corresponding code details.\n */\nexport interface IFluidModuleWithDetails {\n /** Fluid code module that implements the runtime factory needed to instantiate the container runtime. */\n module: IFluidModule;\n /**\n * Code details associated with the module. Represents a document schema this module supports.\n * If the code loader implements the {@link @fluidframework/core-interfaces#IFluidCodeDetailsComparer} interface,\n * it'll be called to determine whether the module code details satisfy the new code proposal in the quorum.\n */\n details: IFluidCodeDetails;\n}\n\n/**\n * Fluid code loader resolves a code module matching the document schema, i.e. code details, such as\n * a package name and package version range.\n */\nexport interface ICodeDetailsLoader\n extends Partial<IProvideFluidCodeDetailsComparer> {\n /**\n * Load the code module (package) that is capable to interact with the document.\n *\n * @param source - Code proposal that articulates the current schema the document is written in.\n * @returns - Code module entry point along with the code details associated with it.\n */\n load(source: IFluidCodeDetails): Promise<IFluidModuleWithDetails>;\n}\n\n/**\n* The interface returned from a IFluidCodeResolver which represents IFluidCodeDetails\n * that have been resolved and are ready to load\n */\nexport interface IResolvedFluidCodeDetails extends IFluidCodeDetails {\n /**\n * A resolved version of the Fluid package. All Fluid browser file entries should be absolute urls.\n */\n readonly resolvedPackage: Readonly<IFluidPackage>;\n /**\n * If not undefined, this id will be used to cache the entry point for the code package\n */\n readonly resolvedPackageCacheId: string | undefined;\n}\n\n/**\n * Fluid code resolvers take a Fluid code details, and resolve the\n * full Fluid package including absolute urls for the browser file entries.\n * The Fluid code resolver is coupled to a specific cdn and knows how to resolve\n * the code detail for loading from that cdn. This include resolving to the most recent\n * version of package that supports the provided code details.\n */\nexport interface IFluidCodeResolver {\n /**\n * Resolves a Fluid code details into a form that can be loaded\n * @param details - The Fluid code details to resolve\n * @returns - A IResolvedFluidCodeDetails where the\n * resolvedPackage's Fluid file entries are absolute urls, and\n * an optional resolvedPackageCacheId if the loaded package should be\n * cached.\n */\n resolveCodeDetails(details: IFluidCodeDetails): Promise<IResolvedFluidCodeDetails>;\n}\n\n/**\n * Code AllowListing Interface\n */\nexport interface ICodeAllowList {\n testSource(source: IResolvedFluidCodeDetails): Promise<boolean>;\n}\n\n/**\n * Events emitted by the Container \"upwards\" to the Loader and Host\n */\nexport interface IContainerEvents extends IEvent {\n (event: \"readonly\", listener: (readonly: boolean) => void): void;\n (event: \"connected\", listener: (clientId: string) => void);\n (event: \"codeDetailsProposed\", listener: (codeDetails: IFluidCodeDetails, proposal: ISequencedProposal) => void);\n (event: \"contextChanged\", listener: (codeDetails: IFluidCodeDetails) => void);\n (event: \"disconnected\" | \"attached\", listener: () => void);\n (event: \"closed\", listener: (error?: ICriticalContainerError) => void);\n (event: \"warning\", listener: (error: ContainerWarning) => void);\n (event: \"op\", listener: (message: ISequencedDocumentMessage) => void);\n (event: \"dirty\" | \"saved\", listener: (dirty: boolean) => void);\n}\n\n/**\n * Namespace for the different connection states a container can be in\n */\nexport namespace ConnectionState {\n /**\n * The document is no longer connected to the delta server\n */\n export type Disconnected = 0;\n\n /**\n * The document has an inbound connection but is still pending for outbound deltas\n */\n export type Connecting = 1;\n\n /**\n * The document is fully connected\n */\n export type Connected = 2;\n}\n\n/**\n * Type defining the different states of connectivity a container can be in\n */\nexport type ConnectionState = ConnectionState.Disconnected | ConnectionState.Connecting | ConnectionState.Connected;\n\n/**\n * The Host's view of the Container and its connection to storage\n */\nexport interface IContainer extends IEventProvider<IContainerEvents>, IFluidRouter {\n\n /**\n * The Delta Manager supporting the op stream for this Container\n */\n deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;\n\n /**\n * The collection of write clients which were connected as of the current sequence number.\n * Also contains a map of key-value pairs that must be agreed upon by all clients before being accepted.\n */\n getQuorum(): IQuorumClients;\n\n /**\n * Represents the resolved url to the Container\n */\n resolvedUrl: IResolvedUrl | undefined;\n\n /**\n * Indicates the attachment state of the container to a host service.\n */\n readonly attachState: AttachState;\n\n /**\n * Get the code details that are currently specified for the container.\n * @returns The current code details if any are specified, undefined if none are specified.\n */\n getSpecifiedCodeDetails(): IFluidCodeDetails | undefined;\n\n /**\n * Get the code details that were used to load the container.\n * @returns The code details that were used to load the container if it is loaded, undefined if it is not yet\n * loaded.\n */\n getLoadedCodeDetails(): IFluidCodeDetails | undefined;\n\n /**\n * Returns true if the container has been closed, otherwise false\n */\n readonly closed: boolean;\n\n /**\n * Returns true if the container is dirty, i.e. there are user changes that has not been saved\n * Closing container in this state results in data loss for user.\n * Container usually gets into this situation due to loss of connectivity.\n */\n readonly isDirty: boolean;\n\n /**\n * Closes the container\n */\n close(error?: ICriticalContainerError): void;\n\n /**\n * Closes the container and returns serialized local state intended to be\n * given to a newly loaded container\n */\n closeAndGetPendingLocalState(): string;\n\n /**\n * Propose new code details that define the code to be loaded\n * for this container's runtime. The returned promise will\n * be true when the proposal is accepted, and false if\n * the proposal is rejected.\n */\n proposeCodeDetails(codeDetails: IFluidCodeDetails): Promise<boolean>\n\n /**\n * Attaches the Container to the Container specified by the given Request.\n *\n * TODO - in the case of failure options should give a retry policy. Or some continuation function\n * that allows attachment to a secondary document.\n */\n attach(request: IRequest): Promise<void>;\n\n /**\n * Extract the snapshot from the detached container.\n */\n serialize(): string;\n\n /**\n * Get an absolute url for a provided container-relative request url.\n * If the container is not attached, this will return undefined.\n *\n * @param relativeUrl - A container-relative request URL\n */\n getAbsoluteUrl(relativeUrl: string): Promise<string | undefined>;\n\n /**\n * Issue a request against the container for a resource.\n * @param request - The request to be issued against the container\n */\n request(request: IRequest): Promise<IResponse>;\n\n /**\n * Provides the current connected state of the container\n */\n readonly connectionState: ConnectionState;\n\n /**\n * Boolean indicating whether the container is currently connected or not\n */\n readonly connected: boolean;\n\n /**\n * Dictates whether or not the current container will automatically attempt to reconnect to the delta stream\n * after receiving a disconnect event\n * @param reconnect - Boolean indicating if reconnect should automatically occur\n * @alpha\n */\n setAutoReconnect?(reconnect: boolean): void;\n\n /**\n * Have the container attempt to resume processing ops\n * @alpha\n */\n resume?(): void;\n\n /**\n * The audience information for all clients currently associated with the document in the current session\n */\n readonly audience: IAudience;\n\n /**\n * The server provided ID of the client.\n * Set once this.connected is true, otherwise undefined\n * @alpha\n */\n readonly clientId?: string | undefined;\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 */\n readonly readOnlyInfo: ReadOnlyInfo;\n\n /**\n * Allows the host to have the container force to be in read-only mode\n * @param readonly - Boolean that toggles if read-only policies will be enforced\n * @alpha\n */\n forceReadonly?(readonly: boolean);\n}\n\n/**\n * The Runtime's view of the Loader, used for loading Containers\n */\nexport interface ILoader extends IFluidRouter, Partial<IProvideLoader> {\n /**\n * Resolves the resource specified by the URL + headers contained in the request object\n * to the underlying container that will resolve the request.\n *\n * An analogy for this is resolve is a DNS resolve of a Fluid container. Request then executes\n * a request against the server found from the resolve step.\n */\n resolve(request: IRequest, pendingLocalState?: string): Promise<IContainer>;\n}\n\n/**\n * The Host's view of the Loader, used for loading Containers\n */\nexport interface IHostLoader extends ILoader {\n /**\n * Creates a new container using the specified chaincode but in an unattached state. While unattached all\n * updates will only be local until the user explicitly attaches the container to a service provider.\n */\n createDetachedContainer(codeDetails: IFluidCodeDetails): Promise<IContainer>;\n\n /**\n * Creates a new container using the specified snapshot but in an unattached state. While unattached all\n * updates will only be local until the user explicitly attaches the container to a service provider.\n */\n rehydrateDetachedContainerFromSnapshot(snapshot: string): Promise<IContainer>;\n}\n\nexport type ILoaderOptions = {\n [key in string | number]: any;\n} & {\n /**\n * Set caching behavior for the loader. If true, we will load a container from cache if one\n * with the same id/version exists or create a new container and cache it if it does not. If\n * false, always load a new container and don't cache it. If the container has already been\n * closed, it will not be cached. A cache option in the LoaderHeader for an individual\n * request will override the Loader's value.\n * Defaults to true.\n */\n cache?: boolean;\n\n /**\n * Provide the current Loader through the scope object when creating Containers. It is added\n * as the `ILoader` property, and will overwrite an existing property of the same name on the\n * scope. Useful for when the host wants to provide the current Loader's functionality to\n * individual Data Stores, which is typically expected when creating with a Loader.\n * Defaults to true.\n */\n provideScopeLoader?: boolean;\n\n // Below two are the options based on which we decide how often client needs to send noops in case of active\n // connection which is not sending any op. The end result is the \"AND\" of these 2 options. So the client\n // should hit the min time and count to send the noop.\n /**\n * Set min time(in ms) frequency with which noops would be sent in case of active connection which is\n * not sending any op.\n */\n noopTimeFrequency?: number;\n\n /**\n * Set min op frequency with which noops would be sent in case of active connection which is not sending any op.\n */\n noopCountFrequency?: number;\n\n /**\n * Max time(in ms) container will wait for a leave message of a disconnected client.\n */\n maxClientLeaveWaitTime?: number,\n};\n\n/**\n * Accepted header keys for requests coming to the Loader\n */\nexport enum LoaderHeader {\n /**\n * Override the Loader's default caching behavior for this container.\n */\n cache = \"fluid-cache\",\n\n clientDetails = \"fluid-client-details\",\n\n /**\n * Start the container in a paused, unconnected state. Defaults to false\n */\n loadMode = \"loadMode\",\n reconnect = \"fluid-reconnect\",\n sequenceNumber = \"fluid-sequence-number\",\n\n /**\n * One of the following:\n * null or \"null\": use ops, no snapshots\n * undefined: fetch latest snapshot\n * otherwise, version sha to load snapshot\n */\n version = \"version\",\n}\n\nexport interface IContainerLoadMode {\n opsBeforeReturn?:\n /*\n * No trailing ops are applied before container is returned.\n * Default value.\n */\n | undefined\n /*\n * Only cached trailing ops are applied before returning container.\n * Caching is optional and could be implemented by the driver.\n * If driver does not implement any kind of local caching strategy, this is same as above.\n * Driver may cache a lot of ops, so care needs to be exercised (see below).\n */\n | \"cached\"\n /*\n * All trailing ops in storage are fetched and applied before container is returned\n * This mode might have significant impact on boot speed (depends on storage perf characteristics)\n * Also there might be a lot of trailing ops and applying them might take time, so hosts are\n * recommended to have some progress UX / cancellation built into loading flow when using this option.\n */\n | \"all\"\n deltaConnection?:\n /*\n * Connection to delta stream is made only when Container.resume() call is made. Op processing\n * is paused (when container is returned from Loader.resolve()) until Container.resume() call is made.\n */\n | \"none\"\n /*\n * Connection to delta stream is made only when Container.resume() call is made.\n * Op fetching from storage is performed and ops are applied as they come in.\n * This is useful option if connection to delta stream is expensive and thus it's beneficial to move it\n * out from critical boot sequence, but it's beneficial to allow catch up to happen as fast as possible.\n */\n | \"delayed\"\n /*\n * Connection to delta stream is made right away.\n * Ops processing is enabled and ops are flowing through the system.\n * Default value.\n */\n | undefined\n}\n\n/**\n * Set of Request Headers that the Loader understands and may inspect or modify\n */\nexport interface ILoaderHeader {\n [LoaderHeader.cache]: boolean;\n [LoaderHeader.clientDetails]: IClientDetails;\n [LoaderHeader.loadMode]: IContainerLoadMode;\n [LoaderHeader.sequenceNumber]: number;\n [LoaderHeader.reconnect]: boolean;\n [LoaderHeader.version]: string | undefined;\n}\n\nexport interface IProvideLoader {\n readonly ILoader: ILoader;\n}\n\ndeclare module \"@fluidframework/core-interfaces\" {\n // eslint-disable-next-line @typescript-eslint/no-empty-interface\n export interface IRequestHeader extends Partial<ILoaderHeader> { }\n\n export interface IFluidObject {\n /**\n * @deprecated - use `FluidObject<ILoader>` instead\n */\n readonly ILoader?: ILoader;\n }\n}\n\nexport interface IPendingLocalState {\n url: string;\n pendingRuntimeState: unknown;\n}\n"]}
package/lib/runtime.d.ts CHANGED
@@ -105,14 +105,7 @@ export interface IContainerContext extends IDisposable {
105
105
  getSpecifiedCodeDetails?(): IFluidCodeDetails | undefined;
106
106
  readonly audience: IAudience | undefined;
107
107
  readonly loader: ILoader;
108
- /** @deprecated - Use `taggedLogger` if present. Otherwise, be sure to handle tagged data
109
- * before sending events to this logger. In time we will assume the presence of `taggedLogger`,
110
- * but in the meantime, current and older loader versions buttress loggers that do not support tags.
111
- * IContainerContext will retain both options, but hosts must now support tags as the loader
112
- * will soon plumb taggedLogger's events (potentially tagged) to the host's logger.
113
- */
114
- readonly logger?: ITelemetryBaseLogger;
115
- readonly taggedLogger?: ITelemetryBaseLogger;
108
+ readonly taggedLogger: ITelemetryBaseLogger;
116
109
  readonly serviceConfiguration: IClientConfiguration | undefined;
117
110
  pendingLocalState?: unknown;
118
111
  /**
@@ -122,7 +115,7 @@ export interface IContainerContext extends IDisposable {
122
115
  /**
123
116
  * @deprecated 0.56, will be removed in the next release
124
117
  */
125
- raiseContainerWarning(warning: ContainerWarning): void;
118
+ raiseContainerWarning?(warning: ContainerWarning): void;
126
119
  /**
127
120
  * Get an absolute url for a provided container-relative request.
128
121
  * @param relativeUrl - A relative request within the container
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACvF,OAAO,EACH,WAAW,EACX,iBAAiB,EACjB,YAAY,EACZ,QAAQ,EACR,SAAS,EACZ,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,EACH,oBAAoB,EACpB,cAAc,EACd,yBAAyB,EACzB,aAAa,EACb,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,gBAAgB,EAChB,cAAc,EACjB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AACpE,OAAO,EAAE,OAAO,EAA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;;;GAKG;AACH,MAAM,WAAW,eAAgB,SAAQ,sBAAsB;IAC3D;;;;;;OAMG;IACH,kBAAkB,CAAC,OAAO,EAAE,iBAAiB,EAAE,QAAQ,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;CACzF"}
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.js","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA2BH;;;GAGG;AACH,MAAM,CAAN,IAAY,WAiBX;AAjBD,WAAY,WAAW;IACnB;;;OAGG;IACH,oCAAqB,CAAA;IAErB;;OAEG;IACH,sCAAuB,CAAA;IAEvB;;;OAGG;IACH,oCAAqB,CAAA;AACzB,CAAC,EAjBW,WAAW,KAAX,WAAW,QAiBtB;AAED,2CAA2C;AAC3C,MAAM,CAAN,IAAY,SAIX;AAJD,WAAY,SAAS;IACjB,kCAAqB,CAAA;IACrB,gCAAmB,CAAA;IACnB,4BAAe,CAAA;AACnB,CAAC,EAJW,SAAS,KAAT,SAAS,QAIpB;AAwHD,MAAM,CAAC,MAAM,eAAe,GAAiC,iBAAiB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ITelemetryBaseLogger, IDisposable } from \"@fluidframework/common-definitions\";\nimport {\n FluidObject,\n IFluidCodeDetails,\n IFluidObject,\n IRequest,\n IResponse,\n} from \"@fluidframework/core-interfaces\";\nimport { IDocumentStorageService } from \"@fluidframework/driver-definitions\";\nimport {\n IClientConfiguration,\n IClientDetails,\n ISequencedDocumentMessage,\n ISnapshotTree,\n MessageType,\n ISummaryTree,\n IVersion,\n IDocumentMessage,\n IQuorumClients,\n} from \"@fluidframework/protocol-definitions\";\nimport { IAudience } from \"./audience\";\nimport { IDeltaManager } from \"./deltas\";\nimport { ICriticalContainerError, ContainerWarning } from \"./error\";\nimport { ILoader, ILoaderOptions } from \"./loader\";\n\n/**\n * The attachment state of some Fluid data (e.g. a container or data store), denoting whether it is uploaded to the\n * service. The transition from detached to attached state is a one-way transition.\n */\nexport enum AttachState {\n /**\n * In detached state, the data is only present on the local client's machine. It has not yet been uploaded\n * to the service.\n */\n Detached = \"Detached\",\n\n /**\n * In attaching state, the data has started the upload to the service, but has not yet completed.\n */\n Attaching = \"Attaching\",\n\n /**\n * In attached state, the data has completed upload to the service. It can be accessed by other clients after\n * reaching attached state.\n */\n Attached = \"Attached\",\n}\n\n// Represents the bind state of the entity.\nexport enum BindState {\n NotBound = \"NotBound\",\n Binding = \"Binding\",\n Bound = \"Bound\",\n}\n\n/**\n * The IRuntime represents an instantiation of a code package within a Container.\n * Primarily held by the ContainerContext to be able to interact with the running instance of the Container.\n */\nexport interface IRuntime extends IDisposable {\n\n /**\n * Executes a request against the runtime\n */\n request(request: IRequest): Promise<IResponse>;\n\n /**\n * Notifies the runtime of a change in the connection state\n */\n setConnectionState(connected: boolean, clientId?: string);\n\n /**\n * Processes the given op (message)\n */\n process(message: ISequencedDocumentMessage, local: boolean, context: any);\n\n /**\n * Processes the given signal\n */\n processSignal(message: any, local: boolean);\n\n /**\n * Create a summary. Used when attaching or serializing a detached container.\n *\n * @param blobRedirectTable - A table passed during the attach process. While detached, blob upload is supported\n * using IDs generated locally. After attach, these IDs cannot be used, so this table maps the old local IDs to the\n * new storage IDs so requests can be redirected.\n */\n createSummary(blobRedirectTable?: Map<string, string>): ISummaryTree;\n\n /**\n * Propagate the container state when container is attaching or attached.\n * @param attachState - State of the container.\n */\n setAttachState(attachState: AttachState.Attaching | AttachState.Attached): void;\n\n /**\n * Get pending local state in a serializable format to be given back to a newly loaded container\n */\n getPendingLocalState(): unknown;\n}\n\n/**\n * The ContainerContext is a proxy standing between the Container and the Container's IRuntime.\n * This allows the Container to terminate the connection to the IRuntime.\n *\n * Specifically, there is an event on Container, onContextChanged, which mean a new code proposal has been loaded,\n * so the old IRuntime is no longer valid, as its ContainerContext has been revoked,\n * and the Container has created a new ContainerContext.\n */\nexport interface IContainerContext extends IDisposable {\n readonly existing: boolean | undefined;\n readonly options: ILoaderOptions;\n readonly clientId: string | undefined;\n readonly clientDetails: IClientDetails;\n readonly storage: IDocumentStorageService;\n readonly connected: boolean;\n readonly baseSnapshot: ISnapshotTree | undefined;\n readonly submitFn: (type: MessageType, contents: any, batch: boolean, appData?: any) => number;\n readonly submitSignalFn: (contents: any) => void;\n readonly closeFn: (error?: ICriticalContainerError) => void;\n readonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;\n readonly quorum: IQuorumClients;\n /**\n * @deprecated This method is provided as a migration tool for customers currently reading the code details\n * from within the Container by directly accessing the Quorum proposals. The code details should not be accessed\n * from within the Container as this requires coupling between the container contents and the code loader.\n * Direct access to Quorum proposals will be removed in an upcoming release, and in a further future release this\n * migration tool will be removed.\n */\n getSpecifiedCodeDetails?(): IFluidCodeDetails | undefined;\n readonly audience: IAudience | undefined;\n readonly loader: ILoader;\n /** @deprecated - Use `taggedLogger` if present. Otherwise, be sure to handle tagged data\n * before sending events to this logger. In time we will assume the presence of `taggedLogger`,\n * but in the meantime, current and older loader versions buttress loggers that do not support tags.\n * IContainerContext will retain both options, but hosts must now support tags as the loader\n * will soon plumb taggedLogger's events (potentially tagged) to the host's logger.\n */\n readonly logger?: ITelemetryBaseLogger;\n // The logger implementation, which would support tagged events, should be provided by the loader.\n readonly taggedLogger?: ITelemetryBaseLogger;\n readonly serviceConfiguration: IClientConfiguration | undefined;\n pendingLocalState?: unknown;\n\n /**\n * Ambient services provided with the context\n */\n readonly scope: IFluidObject & FluidObject;\n\n /**\n * @deprecated 0.56, will be removed in the next release\n */\n raiseContainerWarning(warning: ContainerWarning): void;\n\n /**\n * Get an absolute url for a provided container-relative request.\n * @param relativeUrl - A relative request within the container\n *\n * TODO: Optional for backwards compatibility. Make non-optional in version 0.19\n */\n getAbsoluteUrl?(relativeUrl: string): Promise<string | undefined>;\n\n /**\n * Indicates the attachment state of the container to a host service.\n */\n readonly attachState: AttachState;\n\n getLoadedFromVersion(): IVersion | undefined;\n\n updateDirtyContainerState(dirty: boolean): void;\n}\n\nexport const IRuntimeFactory: keyof IProvideRuntimeFactory = \"IRuntimeFactory\";\n\nexport interface IProvideRuntimeFactory {\n readonly IRuntimeFactory: IRuntimeFactory;\n}\n\n/**\n * Exported module definition\n *\n * Provides the entry point for the ContainerContext to load the proper IRuntime\n * to start up the running instance of the Container.\n */\nexport interface IRuntimeFactory extends IProvideRuntimeFactory {\n /**\n * Instantiates a new IRuntime for the given IContainerContext to proxy to\n * This is the main entry point to the Container's business logic\n *\n * @param context - container context to be supplied to the runtime\n * @param existing - whether to instantiate for the first time or from an existing context\n */\n instantiateRuntime(context: IContainerContext, existing?: boolean): Promise<IRuntime>;\n}\n"]}
1
+ {"version":3,"file":"runtime.js","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA2BH;;;GAGG;AACH,MAAM,CAAN,IAAY,WAiBX;AAjBD,WAAY,WAAW;IACnB;;;OAGG;IACH,oCAAqB,CAAA;IAErB;;OAEG;IACH,sCAAuB,CAAA;IAEvB;;;OAGG;IACH,oCAAqB,CAAA;AACzB,CAAC,EAjBW,WAAW,KAAX,WAAW,QAiBtB;AAED,2CAA2C;AAC3C,MAAM,CAAN,IAAY,SAIX;AAJD,WAAY,SAAS;IACjB,kCAAqB,CAAA;IACrB,gCAAmB,CAAA;IACnB,4BAAe,CAAA;AACnB,CAAC,EAJW,SAAS,KAAT,SAAS,QAIpB;AAiHD,MAAM,CAAC,MAAM,eAAe,GAAiC,iBAAiB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ITelemetryBaseLogger, IDisposable } from \"@fluidframework/common-definitions\";\nimport {\n FluidObject,\n IFluidCodeDetails,\n IFluidObject,\n IRequest,\n IResponse,\n} from \"@fluidframework/core-interfaces\";\nimport { IDocumentStorageService } from \"@fluidframework/driver-definitions\";\nimport {\n IClientConfiguration,\n IClientDetails,\n ISequencedDocumentMessage,\n ISnapshotTree,\n MessageType,\n ISummaryTree,\n IVersion,\n IDocumentMessage,\n IQuorumClients,\n} from \"@fluidframework/protocol-definitions\";\nimport { IAudience } from \"./audience\";\nimport { IDeltaManager } from \"./deltas\";\nimport { ICriticalContainerError, ContainerWarning } from \"./error\";\nimport { ILoader, ILoaderOptions } from \"./loader\";\n\n/**\n * The attachment state of some Fluid data (e.g. a container or data store), denoting whether it is uploaded to the\n * service. The transition from detached to attached state is a one-way transition.\n */\nexport enum AttachState {\n /**\n * In detached state, the data is only present on the local client's machine. It has not yet been uploaded\n * to the service.\n */\n Detached = \"Detached\",\n\n /**\n * In attaching state, the data has started the upload to the service, but has not yet completed.\n */\n Attaching = \"Attaching\",\n\n /**\n * In attached state, the data has completed upload to the service. It can be accessed by other clients after\n * reaching attached state.\n */\n Attached = \"Attached\",\n}\n\n// Represents the bind state of the entity.\nexport enum BindState {\n NotBound = \"NotBound\",\n Binding = \"Binding\",\n Bound = \"Bound\",\n}\n\n/**\n * The IRuntime represents an instantiation of a code package within a Container.\n * Primarily held by the ContainerContext to be able to interact with the running instance of the Container.\n */\nexport interface IRuntime extends IDisposable {\n\n /**\n * Executes a request against the runtime\n */\n request(request: IRequest): Promise<IResponse>;\n\n /**\n * Notifies the runtime of a change in the connection state\n */\n setConnectionState(connected: boolean, clientId?: string);\n\n /**\n * Processes the given op (message)\n */\n process(message: ISequencedDocumentMessage, local: boolean, context: any);\n\n /**\n * Processes the given signal\n */\n processSignal(message: any, local: boolean);\n\n /**\n * Create a summary. Used when attaching or serializing a detached container.\n *\n * @param blobRedirectTable - A table passed during the attach process. While detached, blob upload is supported\n * using IDs generated locally. After attach, these IDs cannot be used, so this table maps the old local IDs to the\n * new storage IDs so requests can be redirected.\n */\n createSummary(blobRedirectTable?: Map<string, string>): ISummaryTree;\n\n /**\n * Propagate the container state when container is attaching or attached.\n * @param attachState - State of the container.\n */\n setAttachState(attachState: AttachState.Attaching | AttachState.Attached): void;\n\n /**\n * Get pending local state in a serializable format to be given back to a newly loaded container\n */\n getPendingLocalState(): unknown;\n}\n\n/**\n * The ContainerContext is a proxy standing between the Container and the Container's IRuntime.\n * This allows the Container to terminate the connection to the IRuntime.\n *\n * Specifically, there is an event on Container, onContextChanged, which mean a new code proposal has been loaded,\n * so the old IRuntime is no longer valid, as its ContainerContext has been revoked,\n * and the Container has created a new ContainerContext.\n */\nexport interface IContainerContext extends IDisposable {\n readonly existing: boolean | undefined;\n readonly options: ILoaderOptions;\n readonly clientId: string | undefined;\n readonly clientDetails: IClientDetails;\n readonly storage: IDocumentStorageService;\n readonly connected: boolean;\n readonly baseSnapshot: ISnapshotTree | undefined;\n readonly submitFn: (type: MessageType, contents: any, batch: boolean, appData?: any) => number;\n readonly submitSignalFn: (contents: any) => void;\n readonly closeFn: (error?: ICriticalContainerError) => void;\n readonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;\n readonly quorum: IQuorumClients;\n /**\n * @deprecated This method is provided as a migration tool for customers currently reading the code details\n * from within the Container by directly accessing the Quorum proposals. The code details should not be accessed\n * from within the Container as this requires coupling between the container contents and the code loader.\n * Direct access to Quorum proposals will be removed in an upcoming release, and in a further future release this\n * migration tool will be removed.\n */\n getSpecifiedCodeDetails?(): IFluidCodeDetails | undefined;\n readonly audience: IAudience | undefined;\n readonly loader: ILoader;\n // The logger implementation, which would support tagged events, should be provided by the loader.\n readonly taggedLogger: ITelemetryBaseLogger;\n readonly serviceConfiguration: IClientConfiguration | undefined;\n pendingLocalState?: unknown;\n\n /**\n * Ambient services provided with the context\n */\n readonly scope: IFluidObject & FluidObject;\n\n /**\n * @deprecated 0.56, will be removed in the next release\n */\n raiseContainerWarning?(warning: ContainerWarning): void;\n\n /**\n * Get an absolute url for a provided container-relative request.\n * @param relativeUrl - A relative request within the container\n *\n * TODO: Optional for backwards compatibility. Make non-optional in version 0.19\n */\n getAbsoluteUrl?(relativeUrl: string): Promise<string | undefined>;\n\n /**\n * Indicates the attachment state of the container to a host service.\n */\n readonly attachState: AttachState;\n\n getLoadedFromVersion(): IVersion | undefined;\n\n updateDirtyContainerState(dirty: boolean): void;\n}\n\nexport const IRuntimeFactory: keyof IProvideRuntimeFactory = \"IRuntimeFactory\";\n\nexport interface IProvideRuntimeFactory {\n readonly IRuntimeFactory: IRuntimeFactory;\n}\n\n/**\n * Exported module definition\n *\n * Provides the entry point for the ContainerContext to load the proper IRuntime\n * to start up the running instance of the Container.\n */\nexport interface IRuntimeFactory extends IProvideRuntimeFactory {\n /**\n * Instantiates a new IRuntime for the given IContainerContext to proxy to\n * This is the main entry point to the Container's business logic\n *\n * @param context - container context to be supplied to the runtime\n * @param existing - whether to instantiate for the first time or from an existing context\n */\n instantiateRuntime(context: IContainerContext, existing?: boolean): Promise<IRuntime>;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/container-definitions",
3
- "version": "0.46.0-50372",
3
+ "version": "0.47.1000",
4
4
  "description": "Fluid container definitions",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": "https://github.com/microsoft/FluidFramework",
@@ -38,12 +38,12 @@
38
38
  "dependencies": {
39
39
  "@fluidframework/common-definitions": "^0.20.0",
40
40
  "@fluidframework/core-interfaces": "^0.42.0",
41
- "@fluidframework/driver-definitions": "^0.44.0",
42
- "@fluidframework/protocol-definitions": "^0.1026.0"
41
+ "@fluidframework/driver-definitions": "^0.45.1000",
42
+ "@fluidframework/protocol-definitions": "^0.1027.1000"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@fluidframework/build-common": "^0.23.0",
46
- "@fluidframework/build-tools": "^0.2.49276",
46
+ "@fluidframework/build-tools": "^0.2.54658",
47
47
  "@fluidframework/container-definitions-0.39.8": "npm:@fluidframework/container-definitions@0.39.8",
48
48
  "@fluidframework/container-definitions-0.40.0": "npm:@fluidframework/container-definitions@0.40.0",
49
49
  "@fluidframework/container-definitions-0.41.0": "npm:@fluidframework/container-definitions@0.41.0",
@@ -51,7 +51,8 @@
51
51
  "@fluidframework/container-definitions-0.43.0": "npm:@fluidframework/container-definitions@0.43.0",
52
52
  "@fluidframework/container-definitions-0.44.0": "npm:@fluidframework/container-definitions@0.44.0",
53
53
  "@fluidframework/container-definitions-0.45.0": "npm:@fluidframework/container-definitions@0.45.0",
54
- "@fluidframework/eslint-config-fluid": "^0.25.0",
54
+ "@fluidframework/container-definitions-0.46.0": "npm:@fluidframework/container-definitions@0.46.0",
55
+ "@fluidframework/eslint-config-fluid": "^0.26.0",
55
56
  "@microsoft/api-extractor": "^7.16.1",
56
57
  "@rushstack/eslint-config": "^2.5.1",
57
58
  "@types/mocha": "^8.2.2",
@@ -72,7 +73,7 @@
72
73
  "typescript-formatter": "7.1.0"
73
74
  },
74
75
  "typeValidation": {
75
- "version": "0.46.0",
76
+ "version": "0.47.0",
76
77
  "broken": {
77
78
  "0.39.8": {
78
79
  "EnumDeclaration_ContainerErrorType": {
@@ -458,13 +459,60 @@
458
459
  "backCompat": false
459
460
  },
460
461
  "InterfaceDeclaration_IProvideRuntimeFactory": {
461
- "backCompat": false
462
+ "backCompat": false,
463
+ "forwardCompat": false
462
464
  },
463
465
  "InterfaceDeclaration_IRuntime": {
464
466
  "backCompat": false
465
467
  },
466
468
  "InterfaceDeclaration_IRuntimeFactory": {
469
+ "backCompat": false,
470
+ "forwardCompat": false
471
+ },
472
+ "InterfaceDeclaration_IContainer": {
473
+ "backCompat": false
474
+ },
475
+ "InterfaceDeclaration_IContainerContext": {
476
+ "backCompat": false,
477
+ "forwardCompat": false
478
+ },
479
+ "InterfaceDeclaration_IHostLoader": {
480
+ "backCompat": false
481
+ },
482
+ "InterfaceDeclaration_ILoader": {
483
+ "backCompat": false
484
+ },
485
+ "InterfaceDeclaration_IProvideLoader": {
486
+ "backCompat": false
487
+ },
488
+ "InterfaceDeclaration_IProxyLoaderFactory": {
489
+ "backCompat": false
490
+ }
491
+ },
492
+ "0.46.0": {
493
+ "InterfaceDeclaration_IContainerContext": {
494
+ "forwardCompat": false,
495
+ "backCompat": false
496
+ },
497
+ "InterfaceDeclaration_ICodeDetailsLoader": {
498
+ "backCompat": false
499
+ },
500
+ "InterfaceDeclaration_ICodeLoader": {
501
+ "backCompat": false
502
+ },
503
+ "InterfaceDeclaration_IFluidModule": {
504
+ "backCompat": false
505
+ },
506
+ "InterfaceDeclaration_IFluidModuleWithDetails": {
507
+ "backCompat": false
508
+ },
509
+ "InterfaceDeclaration_IProvideRuntimeFactory": {
510
+ "forwardCompat": false,
467
511
  "backCompat": false
512
+ },
513
+ "InterfaceDeclaration_IRuntimeFactory": {
514
+ "backCompat": false,
515
+ "forwardCompat": false
468
516
  }
469
517
  }
470
518
  }
package/src/error.ts CHANGED
@@ -35,7 +35,8 @@ export enum ContainerErrorType {
35
35
  usageError = "usageError",
36
36
 
37
37
  /**
38
- * Error indicating an client session has expired.
38
+ * Error indicating an client session has expired. Currently this only happens when GC is allowed on a document and
39
+ * aids in safely deleting unused objects.
39
40
  */
40
41
  clientSessionExpiredError = "clientSessionExpiredError",
41
42
  }
package/src/index.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  */
5
5
  export * from "./audience";
6
6
  export * from "./browserPackage";
7
- export * from "./legacy/chaincode";
7
+ export * from "./legacy";
8
8
  export * from "./deltas";
9
9
  export * from "./error";
10
10
  export * from "./loader";
File without changes
package/src/loader.ts CHANGED
@@ -14,9 +14,9 @@ import {
14
14
  import {
15
15
  IClientDetails,
16
16
  IDocumentMessage,
17
- IPendingProposal,
18
17
  IQuorumClients,
19
18
  ISequencedDocumentMessage,
19
+ ISequencedProposal,
20
20
  } from "@fluidframework/protocol-definitions";
21
21
  import { IResolvedUrl } from "@fluidframework/driver-definitions";
22
22
  import { IEvent, IEventProvider } from "@fluidframework/common-definitions";
@@ -114,7 +114,7 @@ export interface ICodeAllowList {
114
114
  export interface IContainerEvents extends IEvent {
115
115
  (event: "readonly", listener: (readonly: boolean) => void): void;
116
116
  (event: "connected", listener: (clientId: string) => void);
117
- (event: "codeDetailsProposed", listener: (codeDetails: IFluidCodeDetails, proposal: IPendingProposal) => void);
117
+ (event: "codeDetailsProposed", listener: (codeDetails: IFluidCodeDetails, proposal: ISequencedProposal) => void);
118
118
  (event: "contextChanged", listener: (codeDetails: IFluidCodeDetails) => void);
119
119
  (event: "disconnected" | "attached", listener: () => void);
120
120
  (event: "closed", listener: (error?: ICriticalContainerError) => void);
@@ -462,6 +462,7 @@ export interface IProvideLoader {
462
462
  }
463
463
 
464
464
  declare module "@fluidframework/core-interfaces" {
465
+ // eslint-disable-next-line @typescript-eslint/no-empty-interface
465
466
  export interface IRequestHeader extends Partial<ILoaderHeader> { }
466
467
 
467
468
  export interface IFluidObject {
package/src/runtime.ts CHANGED
@@ -136,15 +136,8 @@ export interface IContainerContext extends IDisposable {
136
136
  getSpecifiedCodeDetails?(): IFluidCodeDetails | undefined;
137
137
  readonly audience: IAudience | undefined;
138
138
  readonly loader: ILoader;
139
- /** @deprecated - Use `taggedLogger` if present. Otherwise, be sure to handle tagged data
140
- * before sending events to this logger. In time we will assume the presence of `taggedLogger`,
141
- * but in the meantime, current and older loader versions buttress loggers that do not support tags.
142
- * IContainerContext will retain both options, but hosts must now support tags as the loader
143
- * will soon plumb taggedLogger's events (potentially tagged) to the host's logger.
144
- */
145
- readonly logger?: ITelemetryBaseLogger;
146
139
  // The logger implementation, which would support tagged events, should be provided by the loader.
147
- readonly taggedLogger?: ITelemetryBaseLogger;
140
+ readonly taggedLogger: ITelemetryBaseLogger;
148
141
  readonly serviceConfiguration: IClientConfiguration | undefined;
149
142
  pendingLocalState?: unknown;
150
143
 
@@ -156,7 +149,7 @@ export interface IContainerContext extends IDisposable {
156
149
  /**
157
150
  * @deprecated 0.56, will be removed in the next release
158
151
  */
159
- raiseContainerWarning(warning: ContainerWarning): void;
152
+ raiseContainerWarning?(warning: ContainerWarning): void;
160
153
 
161
154
  /**
162
155
  * Get an absolute url for a provided container-relative request.
@@ -1 +0,0 @@
1
- {"version":3,"file":"chaincode.d.ts","sourceRoot":"","sources":["../../src/legacy/chaincode.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE7C;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,MAAM,0BAAkD,CAAC;AAE3F;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACvC,QAAQ,CAAC,mBAAmB,EAAE,mBAAmB,CAAC;CACrD;AAED;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,0BAA0B;IACnE,YAAY,EAAE;QAAE,CAAC,OAAO,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;CAC5C;AAED,OAAO,QAAQ,iCAAiC,CAAC;IAC7C,UAAiB,YAAY;QACzB,+DAA+D;QAC/D,QAAQ,CAAC,eAAe,CAAC,EAAE,eAAe,CAAC;QAC3C,mEAAmE;QACnE,QAAQ,CAAC,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;KACtD;CACJ"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"chaincode.js","sourceRoot":"","sources":["../../src/legacy/chaincode.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIH;;GAEG;AACU,QAAA,mBAAmB,GAAqC,qBAAqB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IRuntimeFactory } from \"../runtime\";\n\n/**\n * @deprecated - This will be removed in a later release.\n */\nexport const IFluidTokenProvider: keyof IProvideFluidTokenProvider = \"IFluidTokenProvider\";\n\n/**\n * @deprecated - This will be removed in a later release.\n */\nexport interface IProvideFluidTokenProvider {\n readonly IFluidTokenProvider: IFluidTokenProvider;\n}\n\n/**\n * @deprecated - This will be removed in a later release.\n */\nexport interface IFluidTokenProvider extends IProvideFluidTokenProvider {\n intelligence: { [service: string]: any };\n}\n\ndeclare module \"@fluidframework/core-interfaces\" {\n export interface IFluidObject {\n /** @deprecated - use `FluidObject<IRuntimeFactory>` instead */\n readonly IRuntimeFactory?: IRuntimeFactory;\n /** @deprecated - use `FluidObject<IFluidTokenProvider>` instead */\n readonly IFluidTokenProvider?: IFluidTokenProvider;\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"chaincode.d.ts","sourceRoot":"","sources":["../../src/legacy/chaincode.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE7C;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,MAAM,0BAAkD,CAAC;AAE3F;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACvC,QAAQ,CAAC,mBAAmB,EAAE,mBAAmB,CAAC;CACrD;AAED;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,0BAA0B;IACnE,YAAY,EAAE;QAAE,CAAC,OAAO,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;CAC5C;AAED,OAAO,QAAQ,iCAAiC,CAAC;IAC7C,UAAiB,YAAY;QACzB,+DAA+D;QAC/D,QAAQ,CAAC,eAAe,CAAC,EAAE,eAAe,CAAC;QAC3C,mEAAmE;QACnE,QAAQ,CAAC,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;KACtD;CACJ"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"chaincode.js","sourceRoot":"","sources":["../../src/legacy/chaincode.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAqC,qBAAqB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IRuntimeFactory } from \"../runtime\";\n\n/**\n * @deprecated - This will be removed in a later release.\n */\nexport const IFluidTokenProvider: keyof IProvideFluidTokenProvider = \"IFluidTokenProvider\";\n\n/**\n * @deprecated - This will be removed in a later release.\n */\nexport interface IProvideFluidTokenProvider {\n readonly IFluidTokenProvider: IFluidTokenProvider;\n}\n\n/**\n * @deprecated - This will be removed in a later release.\n */\nexport interface IFluidTokenProvider extends IProvideFluidTokenProvider {\n intelligence: { [service: string]: any };\n}\n\ndeclare module \"@fluidframework/core-interfaces\" {\n export interface IFluidObject {\n /** @deprecated - use `FluidObject<IRuntimeFactory>` instead */\n readonly IRuntimeFactory?: IRuntimeFactory;\n /** @deprecated - use `FluidObject<IFluidTokenProvider>` instead */\n readonly IFluidTokenProvider?: IFluidTokenProvider;\n }\n}\n"]}