@fluidframework/container-definitions 0.42.0-44121 → 0.42.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,6 +6,7 @@
6
6
 
7
7
  import { ConnectionMode } from '@fluidframework/protocol-definitions';
8
8
  import { EventEmitter } from 'events';
9
+ import { FluidObject } from '@fluidframework/core-interfaces';
9
10
  import { IClient } from '@fluidframework/protocol-definitions';
10
11
  import { IClientConfiguration } from '@fluidframework/protocol-definitions';
11
12
  import { IClientDetails } from '@fluidframework/protocol-definitions';
@@ -34,6 +35,7 @@ import { ISignalMessage } from '@fluidframework/protocol-definitions';
34
35
  import { ISnapshotTree } from '@fluidframework/protocol-definitions';
35
36
  import { ISummaryTree } from '@fluidframework/protocol-definitions';
36
37
  import { ITelemetryBaseLogger } from '@fluidframework/common-definitions';
38
+ import { ITelemetryProperties } from '@fluidframework/common-definitions';
37
39
  import { ITokenClaims } from '@fluidframework/protocol-definitions';
38
40
  import { ITree } from '@fluidframework/protocol-definitions';
39
41
  import { IVersion } from '@fluidframework/protocol-definitions';
@@ -169,7 +171,7 @@ export interface IContainerContext extends IDisposable {
169
171
  readonly quorum: IQuorum;
170
172
  // (undocumented)
171
173
  raiseContainerWarning(warning: ContainerWarning): void;
172
- readonly scope: IFluidObject;
174
+ readonly scope: IFluidObject & FluidObject;
173
175
  // (undocumented)
174
176
  readonly serviceConfiguration: IClientConfiguration | undefined;
175
177
  // (undocumented)
@@ -296,10 +298,12 @@ export interface IDeltaSender extends IProvideDeltaSender {
296
298
  }
297
299
 
298
300
  // @public
299
- export interface IErrorBase {
301
+ export interface IErrorBase extends Partial<Error> {
300
302
  readonly errorType: string;
301
- // (undocumented)
303
+ getTelemetryProperties?(): ITelemetryProperties;
302
304
  readonly message: string;
305
+ readonly name?: string;
306
+ readonly stack?: string;
303
307
  }
304
308
 
305
309
  // @public
@@ -327,7 +331,7 @@ export interface IFluidCodeResolver {
327
331
  // @public (undocumented)
328
332
  export interface IFluidModule {
329
333
  // (undocumented)
330
- fluidExport: IFluidObject & Partial<Readonly<IProvideFluidCodeDetailsComparer>>;
334
+ fluidExport: IFluidObject & FluidObject<IRuntimeFactory & IProvideFluidCodeDetailsComparer>;
331
335
  }
332
336
 
333
337
  // @public @deprecated (undocumented)
package/dist/error.d.ts CHANGED
@@ -2,6 +2,7 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
+ import { ITelemetryProperties } from "@fluidframework/common-definitions";
5
6
  /**
6
7
  * Different error types the Container may report out to the Host
7
8
  */
@@ -30,14 +31,29 @@ export declare enum ContainerErrorType {
30
31
  /**
31
32
  * Base interface for all errors and warnings at container level
32
33
  */
33
- export interface IErrorBase {
34
+ export interface IErrorBase extends Partial<Error> {
34
35
  /** errorType is a union of error types from
35
36
  * - container
36
37
  * - runtime
37
38
  * - drivers
38
39
  */
39
40
  readonly errorType: string;
41
+ /**
42
+ * See Error.message
43
+ * Privacy Note - This is a freeform string that we may not control in all cases (e.g. a dependency throws an error)
44
+ * If there are known cases where this contains privacy-sensitive data it will be tagged and included in the result
45
+ * of getTelemetryProperties. When logging, consider fetching it that way rather than straight from this field.
46
+ */
40
47
  readonly message: string;
48
+ /** See Error.name */
49
+ readonly name?: string;
50
+ /** See Error.stack */
51
+ readonly stack?: string;
52
+ /**
53
+ * Returns all properties of this error object that are either safe to log
54
+ * or explicitly tagged as containing privacy-sensitive data.
55
+ */
56
+ getTelemetryProperties?(): ITelemetryProperties;
41
57
  }
42
58
  /**
43
59
  * Represents warnings raised on container.
@@ -1 +1 @@
1
- {"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,oBAAY,kBAAkB;IAC1B;;OAEG;IACH,YAAY,iBAAiB;IAE7B;;OAEG;IACH,eAAe,oBAAoB;IAEnC;;OAEG;IACH,mBAAmB,wBAAwB;IAE3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B,0BAAkB,KAAlB,0BAAkB,QAyBzB","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Different error types the Container may report out to the Host\n */\nexport enum ContainerErrorType {\n /**\n * Some error, most likely an exception caught by runtime and propagated to container as critical error\n */\n genericError = \"genericError\",\n\n /**\n * Throttling error from server. Server is busy and is asking not to reconnect for some time\n */\n throttlingError = \"throttlingError\",\n\n /**\n * Data loss error detected by Container / DeltaManager. Likely points to storage issue.\n */\n dataCorruptionError = \"dataCorruptionError\",\n\n /**\n * Error encountered when processing an operation. May correlate with data corruption.\n */\n dataProcessingError = \"dataProcessingError\",\n\n /**\n * Error indicating an API is being used improperly resulting in an invalid operation.\n */\n usageError = \"usageError\",\n }\n\n/**\n * Base interface for all errors and warnings at container level\n */\nexport interface IErrorBase {\n /** errorType is a union of error types from\n * - container\n * - runtime\n * - drivers\n */\n readonly errorType: string;\n readonly message: string;\n}\n\n/**\n * Represents warnings raised on container.\n */\nexport interface ContainerWarning extends IErrorBase {\n /**\n * Whether this error has already been logged. Used to avoid logging errors twice.\n * Default is false.\n */\n logged?: boolean;\n}\n\n/**\n * Represents errors raised on container.\n */\nexport type ICriticalContainerError = IErrorBase;\n\n/**\n * Generic wrapper for an unrecognized/uncategorized error object\n */\nexport interface IGenericError extends IErrorBase {\n readonly errorType: ContainerErrorType.genericError;\n error?: any;\n}\n\n/**\n * Error indicating an API is being used improperly resulting in an invalid operation.\n */\n export interface IUsageError extends IErrorBase {\n readonly errorType: ContainerErrorType.usageError;\n}\n\n/**\n * Warning emitted when requests to storage are being throttled\n */\nexport interface IThrottlingWarning extends IErrorBase {\n readonly errorType: ContainerErrorType.throttlingError;\n readonly retryAfterSeconds: number;\n}\n"]}
1
+ {"version":3,"file":"error.js","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIH;;GAEG;AACH,IAAY,kBAyBP;AAzBL,WAAY,kBAAkB;IAC1B;;OAEG;IACH,mDAA6B,CAAA;IAE7B;;OAEG;IACH,yDAAmC,CAAA;IAEnC;;OAEG;IACH,iEAA2C,CAAA;IAE3C;;OAEG;IACH,iEAA2C,CAAA;IAE3C;;OAEG;IACF,+CAAyB,CAAA;AAC1B,CAAC,EAzBO,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAyBzB","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ITelemetryProperties } from \"@fluidframework/common-definitions\";\n\n/**\n * Different error types the Container may report out to the Host\n */\nexport enum ContainerErrorType {\n /**\n * Some error, most likely an exception caught by runtime and propagated to container as critical error\n */\n genericError = \"genericError\",\n\n /**\n * Throttling error from server. Server is busy and is asking not to reconnect for some time\n */\n throttlingError = \"throttlingError\",\n\n /**\n * Data loss error detected by Container / DeltaManager. Likely points to storage issue.\n */\n dataCorruptionError = \"dataCorruptionError\",\n\n /**\n * Error encountered when processing an operation. May correlate with data corruption.\n */\n dataProcessingError = \"dataProcessingError\",\n\n /**\n * Error indicating an API is being used improperly resulting in an invalid operation.\n */\n usageError = \"usageError\",\n }\n\n/**\n * Base interface for all errors and warnings at container level\n */\nexport interface IErrorBase extends Partial<Error> {\n /** errorType is a union of error types from\n * - container\n * - runtime\n * - drivers\n */\n readonly errorType: string;\n\n /**\n * See Error.message\n * Privacy Note - This is a freeform string that we may not control in all cases (e.g. a dependency throws an error)\n * If there are known cases where this contains privacy-sensitive data it will be tagged and included in the result\n * of getTelemetryProperties. When logging, consider fetching it that way rather than straight from this field.\n */\n readonly message: string;\n /** See Error.name */\n readonly name?: string;\n /** See Error.stack */\n readonly stack?: string;\n /**\n * Returns all properties of this error object that are either safe to log\n * or explicitly tagged as containing privacy-sensitive data.\n */\n getTelemetryProperties?(): ITelemetryProperties;\n}\n\n/**\n * Represents warnings raised on container.\n */\nexport interface ContainerWarning extends IErrorBase {\n /**\n * Whether this error has already been logged. Used to avoid logging errors twice.\n * Default is false.\n */\n logged?: boolean;\n}\n\n/**\n * Represents errors raised on container.\n */\nexport type ICriticalContainerError = IErrorBase;\n\n/**\n * Generic wrapper for an unrecognized/uncategorized error object\n */\nexport interface IGenericError extends IErrorBase {\n readonly errorType: ContainerErrorType.genericError;\n error?: any;\n}\n\n/**\n * Error indicating an API is being used improperly resulting in an invalid operation.\n */\n export interface IUsageError extends IErrorBase {\n readonly errorType: ContainerErrorType.usageError;\n}\n\n/**\n * Warning emitted when requests to storage are being throttled\n */\nexport interface IThrottlingWarning extends IErrorBase {\n readonly errorType: ContainerErrorType.throttlingError;\n readonly retryAfterSeconds: number;\n}\n"]}
@@ -2,8 +2,9 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import { IFluidObject, IProvideFluidCodeDetailsComparer } from "@fluidframework/core-interfaces";
5
+ import { FluidObject, IFluidObject, IProvideFluidCodeDetailsComparer } from "@fluidframework/core-interfaces";
6
+ import { IRuntimeFactory } from "./runtime";
6
7
  export interface IFluidModule {
7
- fluidExport: IFluidObject & Partial<Readonly<IProvideFluidCodeDetailsComparer>>;
8
+ fluidExport: IFluidObject & FluidObject<IRuntimeFactory & IProvideFluidCodeDetailsComparer>;
8
9
  }
9
10
  //# sourceMappingURL=fluidModule.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fluidModule.d.ts","sourceRoot":"","sources":["../src/fluidModule.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,gCAAgC,EAAE,MAAM,iCAAiC,CAAC;AAEjG,MAAM,WAAW,YAAY;IACzB,WAAW,EAAE,YAAY,GAAG,OAAO,CAAC,QAAQ,CAAC,gCAAgC,CAAC,CAAC,CAAC;CACnF"}
1
+ {"version":3,"file":"fluidModule.d.ts","sourceRoot":"","sources":["../src/fluidModule.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,gCAAgC,EAAE,MAAM,iCAAiC,CAAC;AAC9G,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAE5C,MAAM,WAAW,YAAY;IACzB,WAAW,EAAE,YAAY,GAAG,WAAW,CAAC,eAAe,GAAG,gCAAgC,CAAC,CAAC;CAC/F"}
@@ -1 +1 @@
1
- {"version":3,"file":"fluidModule.js","sourceRoot":"","sources":["../src/fluidModule.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IFluidObject, IProvideFluidCodeDetailsComparer } from \"@fluidframework/core-interfaces\";\n\nexport interface IFluidModule {\n fluidExport: IFluidObject & Partial<Readonly<IProvideFluidCodeDetailsComparer>>;\n}\n"]}
1
+ {"version":3,"file":"fluidModule.js","sourceRoot":"","sources":["../src/fluidModule.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { FluidObject, IFluidObject, IProvideFluidCodeDetailsComparer } from \"@fluidframework/core-interfaces\";\nimport { IRuntimeFactory } from \"./runtime\";\n\nexport interface IFluidModule {\n fluidExport: IFluidObject & FluidObject<IRuntimeFactory & IProvideFluidCodeDetailsComparer>;\n}\n"]}
package/dist/runtime.d.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  import { ITelemetryBaseLogger, IDisposable } from "@fluidframework/common-definitions";
6
- import { IFluidObject, IFluidConfiguration, IRequest, IResponse } from "@fluidframework/core-interfaces";
6
+ import { IFluidObject, IFluidConfiguration, IRequest, IResponse, FluidObject } from "@fluidframework/core-interfaces";
7
7
  import { IDocumentStorageService } from "@fluidframework/driver-definitions";
8
8
  import { IClientConfiguration, IClientDetails, IQuorum, ISequencedDocumentMessage, ISnapshotTree, ITree, MessageType, ISummaryTree, IVersion, IDocumentMessage } from "@fluidframework/protocol-definitions";
9
9
  import { IAudience } from "./audience";
@@ -116,7 +116,7 @@ export interface IContainerContext extends IDisposable {
116
116
  /**
117
117
  * Ambient services provided with the context
118
118
  */
119
- readonly scope: IFluidObject;
119
+ readonly scope: IFluidObject & FluidObject;
120
120
  raiseContainerWarning(warning: ContainerWarning): void;
121
121
  /**
122
122
  * Get an absolute url for a provided container-relative request.
@@ -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,YAAY,EACZ,mBAAmB,EACnB,QAAQ,EACR,SAAS,EACZ,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,EACH,oBAAoB,EACpB,cAAc,EACd,OAAO,EACP,yBAAyB,EACzB,aAAa,EACb,KAAK,EACL,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,gBAAgB,EACnB,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,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAEnD;;;GAGG;AACH,oBAAY,WAAW;IACnB;;;OAGG;IACH,QAAQ,aAAa;IAErB;;OAEG;IACH,SAAS,cAAc;IAEvB;;;OAGG;IACH,QAAQ,aAAa;CACxB;AAGD,oBAAY,SAAS;IACjB,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,KAAK,UAAU;CAClB;AAED;;;GAGG;AACH,MAAM,WAAW,QAAS,SAAQ,WAAW;IAEzC;;O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AC;CAC7C;AAED;;;;;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,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;AAoHY,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 IFluidObject,\n IFluidConfiguration,\n IRequest,\n IResponse,\n} from \"@fluidframework/core-interfaces\";\nimport { IDocumentStorageService } from \"@fluidframework/driver-definitions\";\nimport {\n IClientConfiguration,\n IClientDetails,\n IQuorum,\n ISequencedDocumentMessage,\n ISnapshotTree,\n ITree,\n MessageType,\n ISummaryTree,\n IVersion,\n IDocumentMessage,\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 * Snapshots the runtime\n */\n snapshot(tagMessage: string, fullTree?: boolean): Promise<ITree | null>;\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 id: string;\n readonly existing: boolean | undefined;\n readonly options: ILoaderOptions;\n readonly configuration: IFluidConfiguration;\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: IQuorum;\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;\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;;;AA4BH;;;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;AAoHY,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 IFluidObject,\n IFluidConfiguration,\n IRequest,\n IResponse,\n FluidObject,\n} from \"@fluidframework/core-interfaces\";\nimport { IDocumentStorageService } from \"@fluidframework/driver-definitions\";\nimport {\n IClientConfiguration,\n IClientDetails,\n IQuorum,\n ISequencedDocumentMessage,\n ISnapshotTree,\n ITree,\n MessageType,\n ISummaryTree,\n IVersion,\n IDocumentMessage,\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 * Snapshots the runtime\n */\n snapshot(tagMessage: string, fullTree?: boolean): Promise<ITree | null>;\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 id: string;\n readonly existing: boolean | undefined;\n readonly options: ILoaderOptions;\n readonly configuration: IFluidConfiguration;\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: IQuorum;\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 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
@@ -2,6 +2,7 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
+ import { ITelemetryProperties } from "@fluidframework/common-definitions";
5
6
  /**
6
7
  * Different error types the Container may report out to the Host
7
8
  */
@@ -30,14 +31,29 @@ export declare enum ContainerErrorType {
30
31
  /**
31
32
  * Base interface for all errors and warnings at container level
32
33
  */
33
- export interface IErrorBase {
34
+ export interface IErrorBase extends Partial<Error> {
34
35
  /** errorType is a union of error types from
35
36
  * - container
36
37
  * - runtime
37
38
  * - drivers
38
39
  */
39
40
  readonly errorType: string;
41
+ /**
42
+ * See Error.message
43
+ * Privacy Note - This is a freeform string that we may not control in all cases (e.g. a dependency throws an error)
44
+ * If there are known cases where this contains privacy-sensitive data it will be tagged and included in the result
45
+ * of getTelemetryProperties. When logging, consider fetching it that way rather than straight from this field.
46
+ */
40
47
  readonly message: string;
48
+ /** See Error.name */
49
+ readonly name?: string;
50
+ /** See Error.stack */
51
+ readonly stack?: string;
52
+ /**
53
+ * Returns all properties of this error object that are either safe to log
54
+ * or explicitly tagged as containing privacy-sensitive data.
55
+ */
56
+ getTelemetryProperties?(): ITelemetryProperties;
41
57
  }
42
58
  /**
43
59
  * Represents warnings raised on container.
@@ -1 +1 @@
1
- {"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,oBAAY,kBAAkB;IAC1B;;OAEG;IACH,YAAY,iBAAiB;IAE7B;;OAEG;IACH,eAAe,oBAAoB;IAEnC;;OAEG;IACH,mBAAmB,wBAAwB;IAE3C;;OAEG;IACH,mBAAmB,wBAAwB;IAE3C;;OAEG;IACF,UAAU,eAAe;CACzB;AAEL;;GAEG;AACH,MAAM,WAAW,UAAU;IACvB;;;;OAIG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,UAAU;IAChD;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,oBAAY,uBAAuB,GAAG,UAAU,CAAC;AAEjD;;GAEG;AACH,MAAM,WAAW,aAAc,SAAQ,UAAU;IAC7C,QAAQ,CAAC,SAAS,EAAE,kBAAkB,CAAC,YAAY,CAAC;IACpD,KAAK,CAAC,EAAE,GAAG,CAAC;CACf;AAED;;GAEG;AACF,MAAM,WAAW,WAAY,SAAQ,UAAU;IAC5C,QAAQ,CAAC,SAAS,EAAE,kBAAkB,CAAC,UAAU,CAAC;CACrD;AAED;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,UAAU;IAClD,QAAQ,CAAC,SAAS,EAAE,kBAAkB,CAAC,eAAe,CAAC;IACvD,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;CACtC"}
1
+ {"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAE1E;;GAEG;AACH,oBAAY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appings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,CAAN,IAAY,kBAyBP;AAzBL,WAAY,kBAAkB;IAC1B;;OAEG;IACH,mDAA6B,CAAA;IAE7B;;OAEG;IACH,yDAAmC,CAAA;IAEnC;;OAEG;IACH,iEAA2C,CAAA;IAE3C;;OAEG;IACH,iEAA2C,CAAA;IAE3C;;OAEG;IACF,+CAAyB,CAAA;AAC1B,CAAC,EAzBO,kBAAkB,KAAlB,kBAAkB,QAyBzB","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Different error types the Container may report out to the Host\n */\nexport enum ContainerErrorType {\n /**\n * Some error, most likely an exception caught by runtime and propagated to container as critical error\n */\n genericError = \"genericError\",\n\n /**\n * Throttling error from server. Server is busy and is asking not to reconnect for some time\n */\n throttlingError = \"throttlingError\",\n\n /**\n * Data loss error detected by Container / DeltaManager. Likely points to storage issue.\n */\n dataCorruptionError = \"dataCorruptionError\",\n\n /**\n * Error encountered when processing an operation. May correlate with data corruption.\n */\n dataProcessingError = \"dataProcessingError\",\n\n /**\n * Error indicating an API is being used improperly resulting in an invalid operation.\n */\n usageError = \"usageError\",\n }\n\n/**\n * Base interface for all errors and warnings at container level\n */\nexport interface IErrorBase {\n /** errorType is a union of error types from\n * - container\n * - runtime\n * - drivers\n */\n readonly errorType: string;\n readonly message: string;\n}\n\n/**\n * Represents warnings raised on container.\n */\nexport interface ContainerWarning extends IErrorBase {\n /**\n * Whether this error has already been logged. Used to avoid logging errors twice.\n * Default is false.\n */\n logged?: boolean;\n}\n\n/**\n * Represents errors raised on container.\n */\nexport type ICriticalContainerError = IErrorBase;\n\n/**\n * Generic wrapper for an unrecognized/uncategorized error object\n */\nexport interface IGenericError extends IErrorBase {\n readonly errorType: ContainerErrorType.genericError;\n error?: any;\n}\n\n/**\n * Error indicating an API is being used improperly resulting in an invalid operation.\n */\n export interface IUsageError extends IErrorBase {\n readonly errorType: ContainerErrorType.usageError;\n}\n\n/**\n * Warning emitted when requests to storage are being throttled\n */\nexport interface IThrottlingWarning extends IErrorBase {\n readonly errorType: ContainerErrorType.throttlingError;\n readonly retryAfterSeconds: number;\n}\n"]}
1
+ {"version":3,"file":"error.js","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;GAEG;AACH,MAAM,CAAN,IAAY,kBAyBP;AAzBL,WAAY,kBAAkB;IAC1B;;OAEG;IACH,mDAA6B,CAAA;IAE7B;;OAEG;IACH,yDAAmC,CAAA;IAEnC;;OAEG;IACH,iEAA2C,CAAA;IAE3C;;OAEG;IACH,iEAA2C,CAAA;IAE3C;;OAEG;IACF,+CAAyB,CAAA;AAC1B,CAAC,EAzBO,kBAAkB,KAAlB,kBAAkB,QAyBzB","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ITelemetryProperties } from \"@fluidframework/common-definitions\";\n\n/**\n * Different error types the Container may report out to the Host\n */\nexport enum ContainerErrorType {\n /**\n * Some error, most likely an exception caught by runtime and propagated to container as critical error\n */\n genericError = \"genericError\",\n\n /**\n * Throttling error from server. Server is busy and is asking not to reconnect for some time\n */\n throttlingError = \"throttlingError\",\n\n /**\n * Data loss error detected by Container / DeltaManager. Likely points to storage issue.\n */\n dataCorruptionError = \"dataCorruptionError\",\n\n /**\n * Error encountered when processing an operation. May correlate with data corruption.\n */\n dataProcessingError = \"dataProcessingError\",\n\n /**\n * Error indicating an API is being used improperly resulting in an invalid operation.\n */\n usageError = \"usageError\",\n }\n\n/**\n * Base interface for all errors and warnings at container level\n */\nexport interface IErrorBase extends Partial<Error> {\n /** errorType is a union of error types from\n * - container\n * - runtime\n * - drivers\n */\n readonly errorType: string;\n\n /**\n * See Error.message\n * Privacy Note - This is a freeform string that we may not control in all cases (e.g. a dependency throws an error)\n * If there are known cases where this contains privacy-sensitive data it will be tagged and included in the result\n * of getTelemetryProperties. When logging, consider fetching it that way rather than straight from this field.\n */\n readonly message: string;\n /** See Error.name */\n readonly name?: string;\n /** See Error.stack */\n readonly stack?: string;\n /**\n * Returns all properties of this error object that are either safe to log\n * or explicitly tagged as containing privacy-sensitive data.\n */\n getTelemetryProperties?(): ITelemetryProperties;\n}\n\n/**\n * Represents warnings raised on container.\n */\nexport interface ContainerWarning extends IErrorBase {\n /**\n * Whether this error has already been logged. Used to avoid logging errors twice.\n * Default is false.\n */\n logged?: boolean;\n}\n\n/**\n * Represents errors raised on container.\n */\nexport type ICriticalContainerError = IErrorBase;\n\n/**\n * Generic wrapper for an unrecognized/uncategorized error object\n */\nexport interface IGenericError extends IErrorBase {\n readonly errorType: ContainerErrorType.genericError;\n error?: any;\n}\n\n/**\n * Error indicating an API is being used improperly resulting in an invalid operation.\n */\n export interface IUsageError extends IErrorBase {\n readonly errorType: ContainerErrorType.usageError;\n}\n\n/**\n * Warning emitted when requests to storage are being throttled\n */\nexport interface IThrottlingWarning extends IErrorBase {\n readonly errorType: ContainerErrorType.throttlingError;\n readonly retryAfterSeconds: number;\n}\n"]}
@@ -2,8 +2,9 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import { IFluidObject, IProvideFluidCodeDetailsComparer } from "@fluidframework/core-interfaces";
5
+ import { FluidObject, IFluidObject, IProvideFluidCodeDetailsComparer } from "@fluidframework/core-interfaces";
6
+ import { IRuntimeFactory } from "./runtime";
6
7
  export interface IFluidModule {
7
- fluidExport: IFluidObject & Partial<Readonly<IProvideFluidCodeDetailsComparer>>;
8
+ fluidExport: IFluidObject & FluidObject<IRuntimeFactory & IProvideFluidCodeDetailsComparer>;
8
9
  }
9
10
  //# sourceMappingURL=fluidModule.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fluidModule.d.ts","sourceRoot":"","sources":["../src/fluidModule.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,gCAAgC,EAAE,MAAM,iCAAiC,CAAC;AAEjG,MAAM,WAAW,YAAY;IACzB,WAAW,EAAE,YAAY,GAAG,OAAO,CAAC,QAAQ,CAAC,gCAAgC,CAAC,CAAC,CAAC;CACnF"}
1
+ {"version":3,"file":"fluidModule.d.ts","sourceRoot":"","sources":["../src/fluidModule.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,gCAAgC,EAAE,MAAM,iCAAiC,CAAC;AAC9G,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAE5C,MAAM,WAAW,YAAY;IACzB,WAAW,EAAE,YAAY,GAAG,WAAW,CAAC,eAAe,GAAG,gCAAgC,CAAC,CAAC;CAC/F"}
@@ -1 +1 @@
1
- {"version":3,"file":"fluidModule.js","sourceRoot":"","sources":["../src/fluidModule.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IFluidObject, IProvideFluidCodeDetailsComparer } from \"@fluidframework/core-interfaces\";\n\nexport interface IFluidModule {\n fluidExport: IFluidObject & Partial<Readonly<IProvideFluidCodeDetailsComparer>>;\n}\n"]}
1
+ {"version":3,"file":"fluidModule.js","sourceRoot":"","sources":["../src/fluidModule.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { FluidObject, IFluidObject, IProvideFluidCodeDetailsComparer } from \"@fluidframework/core-interfaces\";\nimport { IRuntimeFactory } from \"./runtime\";\n\nexport interface IFluidModule {\n fluidExport: IFluidObject & FluidObject<IRuntimeFactory & IProvideFluidCodeDetailsComparer>;\n}\n"]}
package/lib/runtime.d.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  import { ITelemetryBaseLogger, IDisposable } from "@fluidframework/common-definitions";
6
- import { IFluidObject, IFluidConfiguration, IRequest, IResponse } from "@fluidframework/core-interfaces";
6
+ import { IFluidObject, IFluidConfiguration, IRequest, IResponse, FluidObject } from "@fluidframework/core-interfaces";
7
7
  import { IDocumentStorageService } from "@fluidframework/driver-definitions";
8
8
  import { IClientConfiguration, IClientDetails, IQuorum, ISequencedDocumentMessage, ISnapshotTree, ITree, MessageType, ISummaryTree, IVersion, IDocumentMessage } from "@fluidframework/protocol-definitions";
9
9
  import { IAudience } from "./audience";
@@ -116,7 +116,7 @@ export interface IContainerContext extends IDisposable {
116
116
  /**
117
117
  * Ambient services provided with the context
118
118
  */
119
- readonly scope: IFluidObject;
119
+ readonly scope: IFluidObject & FluidObject;
120
120
  raiseContainerWarning(warning: ContainerWarning): void;
121
121
  /**
122
122
  * Get an absolute url for a provided container-relative request.
@@ -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,YAAY,EACZ,mBAAmB,EACnB,QAAQ,EACR,SAAS,EACZ,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,EACH,oBAAoB,EACpB,cAAc,EACd,OAAO,EACP,yBAAyB,EACzB,aAAa,EACb,KAAK,EACL,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,gBAAgB,EACnB,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,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAEnD;;;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H,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAElC,oBAAoB,IAAI,QAAQ,GAAG,SAAS,CAAC;IAE7C,yBAAyB,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;CACnD;AAED,eAAO,MAAM,eAAe,EAAE,MAAM,sBAA0C,CAAC;AAE/E,MAAM,WAAW,sBAAsB;IACnC,QAAQ,CAAC,eAAe,EAAE,eAAe,CAAC;CAC7C;AAED;;;;;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;AAoHD,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 IFluidObject,\n IFluidConfiguration,\n IRequest,\n IResponse,\n} from \"@fluidframework/core-interfaces\";\nimport { IDocumentStorageService } from \"@fluidframework/driver-definitions\";\nimport {\n IClientConfiguration,\n IClientDetails,\n IQuorum,\n ISequencedDocumentMessage,\n ISnapshotTree,\n ITree,\n MessageType,\n ISummaryTree,\n IVersion,\n IDocumentMessage,\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 * Snapshots the runtime\n */\n snapshot(tagMessage: string, fullTree?: boolean): Promise<ITree | null>;\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 id: string;\n readonly existing: boolean | undefined;\n readonly options: ILoaderOptions;\n readonly configuration: IFluidConfiguration;\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: IQuorum;\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;\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;AA4BH;;;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;AAoHD,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 IFluidObject,\n IFluidConfiguration,\n IRequest,\n IResponse,\n FluidObject,\n} from \"@fluidframework/core-interfaces\";\nimport { IDocumentStorageService } from \"@fluidframework/driver-definitions\";\nimport {\n IClientConfiguration,\n IClientDetails,\n IQuorum,\n ISequencedDocumentMessage,\n ISnapshotTree,\n ITree,\n MessageType,\n ISummaryTree,\n IVersion,\n IDocumentMessage,\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 * Snapshots the runtime\n */\n snapshot(tagMessage: string, fullTree?: boolean): Promise<ITree | null>;\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 id: string;\n readonly existing: boolean | undefined;\n readonly options: ILoaderOptions;\n readonly configuration: IFluidConfiguration;\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: IQuorum;\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 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.42.0-44121",
3
+ "version": "0.42.0",
4
4
  "description": "Fluid container definitions",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": "https://github.com/microsoft/FluidFramework",
@@ -37,13 +37,13 @@
37
37
  },
38
38
  "dependencies": {
39
39
  "@fluidframework/common-definitions": "^0.20.0",
40
- "@fluidframework/core-interfaces": "^0.41.0-0",
41
- "@fluidframework/driver-definitions": "^0.42.0-0",
42
- "@fluidframework/protocol-definitions": "^0.1026.0-0"
40
+ "@fluidframework/core-interfaces": "^0.41.0",
41
+ "@fluidframework/driver-definitions": "^0.42.0",
42
+ "@fluidframework/protocol-definitions": "^0.1026.0"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@fluidframework/build-common": "^0.23.0",
46
- "@fluidframework/build-tools": "^0.2.43369",
46
+ "@fluidframework/build-tools": "^0.2.44421",
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",
package/src/error.ts CHANGED
@@ -3,6 +3,8 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
+ import { ITelemetryProperties } from "@fluidframework/common-definitions";
7
+
6
8
  /**
7
9
  * Different error types the Container may report out to the Host
8
10
  */
@@ -36,14 +38,30 @@ export enum ContainerErrorType {
36
38
  /**
37
39
  * Base interface for all errors and warnings at container level
38
40
  */
39
- export interface IErrorBase {
41
+ export interface IErrorBase extends Partial<Error> {
40
42
  /** errorType is a union of error types from
41
43
  * - container
42
44
  * - runtime
43
45
  * - drivers
44
46
  */
45
47
  readonly errorType: string;
48
+
49
+ /**
50
+ * See Error.message
51
+ * Privacy Note - This is a freeform string that we may not control in all cases (e.g. a dependency throws an error)
52
+ * If there are known cases where this contains privacy-sensitive data it will be tagged and included in the result
53
+ * of getTelemetryProperties. When logging, consider fetching it that way rather than straight from this field.
54
+ */
46
55
  readonly message: string;
56
+ /** See Error.name */
57
+ readonly name?: string;
58
+ /** See Error.stack */
59
+ readonly stack?: string;
60
+ /**
61
+ * Returns all properties of this error object that are either safe to log
62
+ * or explicitly tagged as containing privacy-sensitive data.
63
+ */
64
+ getTelemetryProperties?(): ITelemetryProperties;
47
65
  }
48
66
 
49
67
  /**
@@ -3,8 +3,9 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
- import { IFluidObject, IProvideFluidCodeDetailsComparer } from "@fluidframework/core-interfaces";
6
+ import { FluidObject, IFluidObject, IProvideFluidCodeDetailsComparer } from "@fluidframework/core-interfaces";
7
+ import { IRuntimeFactory } from "./runtime";
7
8
 
8
9
  export interface IFluidModule {
9
- fluidExport: IFluidObject & Partial<Readonly<IProvideFluidCodeDetailsComparer>>;
10
+ fluidExport: IFluidObject & FluidObject<IRuntimeFactory & IProvideFluidCodeDetailsComparer>;
10
11
  }
package/src/runtime.ts CHANGED
@@ -9,6 +9,7 @@ import {
9
9
  IFluidConfiguration,
10
10
  IRequest,
11
11
  IResponse,
12
+ FluidObject,
12
13
  } from "@fluidframework/core-interfaces";
13
14
  import { IDocumentStorageService } from "@fluidframework/driver-definitions";
14
15
  import {
@@ -150,7 +151,7 @@ export interface IContainerContext extends IDisposable {
150
151
  /**
151
152
  * Ambient services provided with the context
152
153
  */
153
- readonly scope: IFluidObject;
154
+ readonly scope: IFluidObject & FluidObject;
154
155
 
155
156
  raiseContainerWarning(warning: ContainerWarning): void;
156
157