@fluidframework/container-loader 2.62.0-356644 → 2.62.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/api-extractor/api-extractor-lint-legacyAlpha.cjs.json +5 -0
  3. package/api-extractor/api-extractor-lint-legacyAlpha.esm.json +5 -0
  4. package/api-extractor/api-extractor.legacy.json +5 -1
  5. package/api-report/container-loader.legacy.alpha.api.md +212 -0
  6. package/dist/connectionManager.d.ts.map +1 -1
  7. package/dist/connectionManager.js +8 -72
  8. package/dist/connectionManager.js.map +1 -1
  9. package/dist/container.d.ts +9 -4
  10. package/dist/container.d.ts.map +1 -1
  11. package/dist/container.js +9 -1
  12. package/dist/container.js.map +1 -1
  13. package/dist/createAndLoadContainerUtils.d.ts +48 -0
  14. package/dist/createAndLoadContainerUtils.d.ts.map +1 -1
  15. package/dist/createAndLoadContainerUtils.js +14 -1
  16. package/dist/createAndLoadContainerUtils.js.map +1 -1
  17. package/dist/frozenServices.d.ts +44 -0
  18. package/dist/frozenServices.d.ts.map +1 -0
  19. package/dist/frozenServices.js +126 -0
  20. package/dist/frozenServices.js.map +1 -0
  21. package/dist/index.d.ts +2 -2
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js +3 -1
  24. package/dist/index.js.map +1 -1
  25. package/dist/legacyAlpha.d.ts +48 -0
  26. package/dist/packageVersion.d.ts +1 -1
  27. package/dist/packageVersion.d.ts.map +1 -1
  28. package/dist/packageVersion.js +1 -1
  29. package/dist/packageVersion.js.map +1 -1
  30. package/legacy/alpha.d.ts +11 -0
  31. package/lib/connectionManager.d.ts.map +1 -1
  32. package/lib/connectionManager.js +10 -74
  33. package/lib/connectionManager.js.map +1 -1
  34. package/lib/container.d.ts +9 -4
  35. package/lib/container.d.ts.map +1 -1
  36. package/lib/container.js +7 -0
  37. package/lib/container.js.map +1 -1
  38. package/lib/createAndLoadContainerUtils.d.ts +48 -0
  39. package/lib/createAndLoadContainerUtils.d.ts.map +1 -1
  40. package/lib/createAndLoadContainerUtils.js +12 -0
  41. package/lib/createAndLoadContainerUtils.js.map +1 -1
  42. package/lib/frozenServices.d.ts +44 -0
  43. package/lib/frozenServices.d.ts.map +1 -0
  44. package/lib/frozenServices.js +120 -0
  45. package/lib/frozenServices.js.map +1 -0
  46. package/lib/index.d.ts +2 -2
  47. package/lib/index.d.ts.map +1 -1
  48. package/lib/index.js +2 -2
  49. package/lib/index.js.map +1 -1
  50. package/lib/legacyAlpha.d.ts +48 -0
  51. package/lib/packageVersion.d.ts +1 -1
  52. package/lib/packageVersion.d.ts.map +1 -1
  53. package/lib/packageVersion.js +1 -1
  54. package/lib/packageVersion.js.map +1 -1
  55. package/package.json +26 -14
  56. package/src/connectionManager.ts +10 -92
  57. package/src/container.ts +12 -4
  58. package/src/createAndLoadContainerUtils.ts +66 -0
  59. package/src/frozenServices.ts +162 -0
  60. package/src/index.ts +3 -1
  61. package/src/packageVersion.ts +1 -1
@@ -115,4 +115,52 @@ export declare function rehydrateDetachedContainer(rehydrateDetachedContainerPro
115
115
  * @legacy @beta
116
116
  */
117
117
  export declare function loadExistingContainer(loadExistingContainerProps: ILoadExistingContainerProps): Promise<IContainer>;
118
+ /**
119
+ * Properties required to load a frozen container from pending state.
120
+ * @legacy @alpha
121
+ */
122
+ export interface ILoadFrozenContainerFromPendingStateProps {
123
+ /**
124
+ * The code loader handles loading the necessary code for running a container once it is loaded.
125
+ */
126
+ readonly codeLoader: ICodeDetailsLoader;
127
+ /**
128
+ * The url resolver used by the loader for resolving external urls into Fluid urls.
129
+ */
130
+ readonly urlResolver: IUrlResolver;
131
+ /**
132
+ * The request to resolve the container.
133
+ */
134
+ readonly request: IRequest;
135
+ /**
136
+ * Pending local state to be applied to the container.
137
+ */
138
+ readonly pendingLocalState: string;
139
+ /**
140
+ * A property bag of options/policies used by various layers to control features.
141
+ */
142
+ readonly options?: IContainerPolicies | undefined;
143
+ /**
144
+ * Scope is provided to all container and is a set of shared services for container's to integrate with their host environment.
145
+ */
146
+ readonly scope?: FluidObject | undefined;
147
+ /**
148
+ * The logger that all telemetry should be pushed to.
149
+ */
150
+ readonly logger?: ITelemetryBaseLogger | undefined;
151
+ /**
152
+ * The configuration provider which may be used to control features.
153
+ */
154
+ readonly configProvider?: IConfigProviderBase | undefined;
155
+ /**
156
+ * Client details provided in the override will be merged over the default client.
157
+ */
158
+ readonly clientDetailsOverride?: IClientDetails | undefined;
159
+ }
160
+ /**
161
+ * Loads a frozen container from pending local state.
162
+ * @param props - Properties required to load a frozen container from pending state.
163
+ * @legacy @alpha
164
+ */
165
+ export declare function loadFrozenContainerFromPendingState(props: ILoadFrozenContainerFromPendingStateProps): Promise<IContainer>;
118
166
  //# sourceMappingURL=createAndLoadContainerUtils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"createAndLoadContainerUtils.d.ts","sourceRoot":"","sources":["../src/createAndLoadContainerUtils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACX,UAAU,EACV,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,MAAM,gDAAgD,CAAC;AACxD,OAAO,KAAK,EACX,WAAW,EACX,mBAAmB,EACnB,QAAQ,EACR,oBAAoB,EACpB,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,KAAK,EACX,uBAAuB,EACvB,YAAY,EACZ,MAAM,6CAA6C,CAAC;AAGrD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAE5D;;;GAGG;AACH,MAAM,WAAW,4BAA4B;IAC5C;;;;OAIG;IACH,QAAQ,CAAC,WAAW,EAAE,YAAY,CAAC;IACnC;;;;OAIG;IACH,QAAQ,CAAC,sBAAsB,EAAE,uBAAuB,CAAC;IACzD;;;OAGG;IACH,QAAQ,CAAC,UAAU,EAAE,kBAAkB,CAAC;I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C;;OAEG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,oBAAoB,GAAG,SAAS,CAAC;IAEnD;;OAEG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,mBAAmB,GAAG,SAAS,CAAC;IAE1D;;OAEG;IACH,QAAQ,CAAC,qBAAqB,CAAC,EAAE,cAAc,GAAG,SAAS,CAAC;CAC5D;AAED;;;;GAIG;AACH,wBAAsB,mCAAmC,CACxD,KAAK,EAAE,yCAAyC,GAC9C,OAAO,CAAC,UAAU,CAAC,CAKrB"}
@@ -4,7 +4,8 @@
4
4
  * Licensed under the MIT License.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.loadExistingContainer = exports.rehydrateDetachedContainer = exports.createDetachedContainer = void 0;
7
+ exports.loadFrozenContainerFromPendingState = exports.loadExistingContainer = exports.rehydrateDetachedContainer = exports.createDetachedContainer = void 0;
8
+ const frozenServices_js_1 = require("./frozenServices.js");
8
9
  const loader_js_1 = require("./loader.js");
9
10
  /**
10
11
  * Creates a new container using the specified code details but in an unattached state. While unattached, all
@@ -44,4 +45,16 @@ async function loadExistingContainer(loadExistingContainerProps) {
44
45
  return loader.resolve(loadExistingContainerProps.request, loadExistingContainerProps.pendingLocalState);
45
46
  }
46
47
  exports.loadExistingContainer = loadExistingContainer;
48
+ /**
49
+ * Loads a frozen container from pending local state.
50
+ * @param props - Properties required to load a frozen container from pending state.
51
+ * @legacy @alpha
52
+ */
53
+ async function loadFrozenContainerFromPendingState(props) {
54
+ return loadExistingContainer({
55
+ ...props,
56
+ documentServiceFactory: new frozenServices_js_1.FrozenDocumentServiceFactory(),
57
+ });
58
+ }
59
+ exports.loadFrozenContainerFromPendingState = loadFrozenContainerFromPendingState;
47
60
  //# sourceMappingURL=createAndLoadContainerUtils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"createAndLoadContainerUtils.js","sourceRoot":"","sources":["../src/createAndLoadContainerUtils.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAoBH,2CAAqC;AAuGrC;;;;;GAKG;AACI,KAAK,UAAU,uBAAuB,CAC5C,4BAA2D;IAE3D,MAAM,MAAM,GAAG,IAAI,kBAAM,CAAC,4BAA4B,CAAC,CAAC;IACxD,OAAO,MAAM,CAAC,uBAAuB,CAAC,4BAA4B,CAAC,WAAW,EAAE;QAC/E,YAAY,EAAE,4BAA4B,CAAC,cAAc;QACzD,qBAAqB,EAAE,4BAA4B,CAAC,qBAAqB;KACzE,CAAC,CAAC;AACJ,CAAC;AARD,0DAQC;AAED;;;;;GAKG;AACI,KAAK,UAAU,0BAA0B,CAC/C,+BAAiE;IAEjE,MAAM,MAAM,GAAG,IAAI,kBAAM,CAAC,+BAA+B,CAAC,CAAC;IAC3D,OAAO,MAAM,CAAC,sCAAsC,CACnD,+BAA+B,CAAC,eAAe,EAC/C;QACC,YAAY,EAAE,+BAA+B,CAAC,cAAc;QAC5D,qBAAqB,EAAE,+BAA+B,CAAC,qBAAqB;KAC5E,CACD,CAAC;AACH,CAAC;AAXD,gEAWC;AAED;;;;GAIG;AACI,KAAK,UAAU,qBAAqB,CAC1C,0BAAuD;IAEvD,MAAM,MAAM,GAAG,IAAI,kBAAM,CAAC,0BAA0B,CAAC,CAAC;IACtD,OAAO,MAAM,CAAC,OAAO,CACpB,0BAA0B,CAAC,OAAO,EAClC,0BAA0B,CAAC,iBAAiB,CAC5C,CAAC;AACH,CAAC;AARD,sDAQC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tIContainer,\n\tICodeDetailsLoader,\n\tIFluidCodeDetails,\n\tIContainerPolicies,\n} from \"@fluidframework/container-definitions/internal\";\nimport type {\n\tFluidObject,\n\tIConfigProviderBase,\n\tIRequest,\n\tITelemetryBaseLogger,\n} from \"@fluidframework/core-interfaces\";\nimport type { IClientDetails } from \"@fluidframework/driver-definitions\";\nimport type {\n\tIDocumentServiceFactory,\n\tIUrlResolver,\n} from \"@fluidframework/driver-definitions/internal\";\n\nimport { Loader } from \"./loader.js\";\nimport type { ProtocolHandlerBuilder } from \"./protocol.js\";\n\n/**\n * Properties necessary for creating and loading a container.\n * @legacy @beta\n */\nexport interface ICreateAndLoadContainerProps {\n\t/**\n\t * The url resolver used by the loader for resolving external urls\n\t * into Fluid urls such that the container specified by the\n\t * external url can be loaded.\n\t */\n\treadonly urlResolver: IUrlResolver;\n\t/**\n\t * The document service factory take the Fluid url provided\n\t * by the resolved url and constructs all the necessary services\n\t * for communication with the container's server.\n\t */\n\treadonly documentServiceFactory: IDocumentServiceFactory;\n\t/**\n\t * The code loader handles loading the necessary code\n\t * for running a container once it is loaded.\n\t */\n\treadonly codeLoader: ICodeDetailsLoader;\n\n\t/**\n\t * A property bag of options/policies used by various layers\n\t * to control features\n\t */\n\treadonly options?: IContainerPolicies | undefined;\n\n\t/**\n\t * Scope is provided to all container and is a set of shared\n\t * services for container's to integrate with their host environment.\n\t */\n\treadonly scope?: FluidObject | undefined;\n\n\t/**\n\t * The logger that all telemetry should be pushed to.\n\t */\n\treadonly logger?: ITelemetryBaseLogger | undefined;\n\n\t/**\n\t * The configuration provider which may be used to control features.\n\t */\n\treadonly configProvider?: IConfigProviderBase | undefined;\n\n\t/**\n\t * Optional property for allowing the container to use a custom\n\t * protocol implementation for handling the quorum and/or the audience.\n\t */\n\treadonly protocolHandlerBuilder?: ProtocolHandlerBuilder | undefined;\n\n\t/**\n\t * Disables the Container from reconnecting if false, allows reconnect otherwise.\n\t */\n\treadonly allowReconnect?: boolean | undefined;\n\n\t/**\n\t * Client details provided in the override will be merged over the default client.\n\t */\n\treadonly clientDetailsOverride?: IClientDetails | undefined;\n}\n\n/**\n * Props used to load a container.\n * @legacy @beta\n */\nexport interface ILoadExistingContainerProps extends ICreateAndLoadContainerProps {\n\t/**\n\t * The request to resolve the container.\n\t */\n\treadonly request: IRequest;\n\n\t/**\n\t * Pending local state to be applied to the container.\n\t */\n\treadonly pendingLocalState?: string | undefined;\n}\n\n/**\n * Props used to create a detached container.\n * @legacy @beta\n */\nexport interface ICreateDetachedContainerProps extends ICreateAndLoadContainerProps {\n\t/**\n\t * The code details for the container to be created.\n\t */\n\treadonly codeDetails: IFluidCodeDetails;\n}\n\n/**\n * Props used to rehydrate a detached container.\n * @legacy @beta\n */\nexport interface IRehydrateDetachedContainerProps extends ICreateAndLoadContainerProps {\n\t/**\n\t * The serialized state returned by calling serialize on another container\n\t */\n\treadonly serializedState: string;\n}\n\n/**\n * Creates a new container using the specified code details 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 * @param createDetachedContainerProps - Services and properties necessary for creating detached container.\n * @legacy @beta\n */\nexport async function createDetachedContainer(\n\tcreateDetachedContainerProps: ICreateDetachedContainerProps,\n): Promise<IContainer> {\n\tconst loader = new Loader(createDetachedContainerProps);\n\treturn loader.createDetachedContainer(createDetachedContainerProps.codeDetails, {\n\t\tcanReconnect: createDetachedContainerProps.allowReconnect,\n\t\tclientDetailsOverride: createDetachedContainerProps.clientDetailsOverride,\n\t});\n}\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 * @param rehydrateDetachedContainerProps - Services and properties necessary for rehydrating detached container from a previously serialized container's state.\n * @legacy @beta\n */\nexport async function rehydrateDetachedContainer(\n\trehydrateDetachedContainerProps: IRehydrateDetachedContainerProps,\n): Promise<IContainer> {\n\tconst loader = new Loader(rehydrateDetachedContainerProps);\n\treturn loader.rehydrateDetachedContainerFromSnapshot(\n\t\trehydrateDetachedContainerProps.serializedState,\n\t\t{\n\t\t\tcanReconnect: rehydrateDetachedContainerProps.allowReconnect,\n\t\t\tclientDetailsOverride: rehydrateDetachedContainerProps.clientDetailsOverride,\n\t\t},\n\t);\n}\n\n/**\n * Loads a container with an existing snapshot from the service.\n * @param loadExistingContainerProps - Services and properties necessary for loading an existing container.\n * @legacy @beta\n */\nexport async function loadExistingContainer(\n\tloadExistingContainerProps: ILoadExistingContainerProps,\n): Promise<IContainer> {\n\tconst loader = new Loader(loadExistingContainerProps);\n\treturn loader.resolve(\n\t\tloadExistingContainerProps.request,\n\t\tloadExistingContainerProps.pendingLocalState,\n\t);\n}\n"]}
1
+ {"version":3,"file":"createAndLoadContainerUtils.js","sourceRoot":"","sources":["../src/createAndLoadContainerUtils.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAoBH,2DAAmE;AACnE,2CAAqC;AAuGrC;;;;;GAKG;AACI,KAAK,UAAU,uBAAuB,CAC5C,4BAA2D;IAE3D,MAAM,MAAM,GAAG,IAAI,kBAAM,CAAC,4BAA4B,CAAC,CAAC;IACxD,OAAO,MAAM,CAAC,uBAAuB,CAAC,4BAA4B,CAAC,WAAW,EAAE;QAC/E,YAAY,EAAE,4BAA4B,CAAC,cAAc;QACzD,qBAAqB,EAAE,4BAA4B,CAAC,qBAAqB;KACzE,CAAC,CAAC;AACJ,CAAC;AARD,0DAQC;AAED;;;;;GAKG;AACI,KAAK,UAAU,0BAA0B,CAC/C,+BAAiE;IAEjE,MAAM,MAAM,GAAG,IAAI,kBAAM,CAAC,+BAA+B,CAAC,CAAC;IAC3D,OAAO,MAAM,CAAC,sCAAsC,CACnD,+BAA+B,CAAC,eAAe,EAC/C;QACC,YAAY,EAAE,+BAA+B,CAAC,cAAc;QAC5D,qBAAqB,EAAE,+BAA+B,CAAC,qBAAqB;KAC5E,CACD,CAAC;AACH,CAAC;AAXD,gEAWC;AAED;;;;GAIG;AACI,KAAK,UAAU,qBAAqB,CAC1C,0BAAuD;IAEvD,MAAM,MAAM,GAAG,IAAI,kBAAM,CAAC,0BAA0B,CAAC,CAAC;IACtD,OAAO,MAAM,CAAC,OAAO,CACpB,0BAA0B,CAAC,OAAO,EAClC,0BAA0B,CAAC,iBAAiB,CAC5C,CAAC;AACH,CAAC;AARD,sDAQC;AAqDD;;;;GAIG;AACI,KAAK,UAAU,mCAAmC,CACxD,KAAgD;IAEhD,OAAO,qBAAqB,CAAC;QAC5B,GAAG,KAAK;QACR,sBAAsB,EAAE,IAAI,gDAA4B,EAAE;KAC1D,CAAC,CAAC;AACJ,CAAC;AAPD,kFAOC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tIContainer,\n\tICodeDetailsLoader,\n\tIFluidCodeDetails,\n\tIContainerPolicies,\n} from \"@fluidframework/container-definitions/internal\";\nimport type {\n\tFluidObject,\n\tIConfigProviderBase,\n\tIRequest,\n\tITelemetryBaseLogger,\n} from \"@fluidframework/core-interfaces\";\nimport type { IClientDetails } from \"@fluidframework/driver-definitions\";\nimport type {\n\tIDocumentServiceFactory,\n\tIUrlResolver,\n} from \"@fluidframework/driver-definitions/internal\";\n\nimport { FrozenDocumentServiceFactory } from \"./frozenServices.js\";\nimport { Loader } from \"./loader.js\";\nimport type { ProtocolHandlerBuilder } from \"./protocol.js\";\n\n/**\n * Properties necessary for creating and loading a container.\n * @legacy @beta\n */\nexport interface ICreateAndLoadContainerProps {\n\t/**\n\t * The url resolver used by the loader for resolving external urls\n\t * into Fluid urls such that the container specified by the\n\t * external url can be loaded.\n\t */\n\treadonly urlResolver: IUrlResolver;\n\t/**\n\t * The document service factory take the Fluid url provided\n\t * by the resolved url and constructs all the necessary services\n\t * for communication with the container's server.\n\t */\n\treadonly documentServiceFactory: IDocumentServiceFactory;\n\t/**\n\t * The code loader handles loading the necessary code\n\t * for running a container once it is loaded.\n\t */\n\treadonly codeLoader: ICodeDetailsLoader;\n\n\t/**\n\t * A property bag of options/policies used by various layers\n\t * to control features\n\t */\n\treadonly options?: IContainerPolicies | undefined;\n\n\t/**\n\t * Scope is provided to all container and is a set of shared\n\t * services for container's to integrate with their host environment.\n\t */\n\treadonly scope?: FluidObject | undefined;\n\n\t/**\n\t * The logger that all telemetry should be pushed to.\n\t */\n\treadonly logger?: ITelemetryBaseLogger | undefined;\n\n\t/**\n\t * The configuration provider which may be used to control features.\n\t */\n\treadonly configProvider?: IConfigProviderBase | undefined;\n\n\t/**\n\t * Optional property for allowing the container to use a custom\n\t * protocol implementation for handling the quorum and/or the audience.\n\t */\n\treadonly protocolHandlerBuilder?: ProtocolHandlerBuilder | undefined;\n\n\t/**\n\t * Disables the Container from reconnecting if false, allows reconnect otherwise.\n\t */\n\treadonly allowReconnect?: boolean | undefined;\n\n\t/**\n\t * Client details provided in the override will be merged over the default client.\n\t */\n\treadonly clientDetailsOverride?: IClientDetails | undefined;\n}\n\n/**\n * Props used to load a container.\n * @legacy @beta\n */\nexport interface ILoadExistingContainerProps extends ICreateAndLoadContainerProps {\n\t/**\n\t * The request to resolve the container.\n\t */\n\treadonly request: IRequest;\n\n\t/**\n\t * Pending local state to be applied to the container.\n\t */\n\treadonly pendingLocalState?: string | undefined;\n}\n\n/**\n * Props used to create a detached container.\n * @legacy @beta\n */\nexport interface ICreateDetachedContainerProps extends ICreateAndLoadContainerProps {\n\t/**\n\t * The code details for the container to be created.\n\t */\n\treadonly codeDetails: IFluidCodeDetails;\n}\n\n/**\n * Props used to rehydrate a detached container.\n * @legacy @beta\n */\nexport interface IRehydrateDetachedContainerProps extends ICreateAndLoadContainerProps {\n\t/**\n\t * The serialized state returned by calling serialize on another container\n\t */\n\treadonly serializedState: string;\n}\n\n/**\n * Creates a new container using the specified code details 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 * @param createDetachedContainerProps - Services and properties necessary for creating detached container.\n * @legacy @beta\n */\nexport async function createDetachedContainer(\n\tcreateDetachedContainerProps: ICreateDetachedContainerProps,\n): Promise<IContainer> {\n\tconst loader = new Loader(createDetachedContainerProps);\n\treturn loader.createDetachedContainer(createDetachedContainerProps.codeDetails, {\n\t\tcanReconnect: createDetachedContainerProps.allowReconnect,\n\t\tclientDetailsOverride: createDetachedContainerProps.clientDetailsOverride,\n\t});\n}\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 * @param rehydrateDetachedContainerProps - Services and properties necessary for rehydrating detached container from a previously serialized container's state.\n * @legacy @beta\n */\nexport async function rehydrateDetachedContainer(\n\trehydrateDetachedContainerProps: IRehydrateDetachedContainerProps,\n): Promise<IContainer> {\n\tconst loader = new Loader(rehydrateDetachedContainerProps);\n\treturn loader.rehydrateDetachedContainerFromSnapshot(\n\t\trehydrateDetachedContainerProps.serializedState,\n\t\t{\n\t\t\tcanReconnect: rehydrateDetachedContainerProps.allowReconnect,\n\t\t\tclientDetailsOverride: rehydrateDetachedContainerProps.clientDetailsOverride,\n\t\t},\n\t);\n}\n\n/**\n * Loads a container with an existing snapshot from the service.\n * @param loadExistingContainerProps - Services and properties necessary for loading an existing container.\n * @legacy @beta\n */\nexport async function loadExistingContainer(\n\tloadExistingContainerProps: ILoadExistingContainerProps,\n): Promise<IContainer> {\n\tconst loader = new Loader(loadExistingContainerProps);\n\treturn loader.resolve(\n\t\tloadExistingContainerProps.request,\n\t\tloadExistingContainerProps.pendingLocalState,\n\t);\n}\n\n/**\n * Properties required to load a frozen container from pending state.\n * @legacy @alpha\n */\nexport interface ILoadFrozenContainerFromPendingStateProps {\n\t/**\n\t * The code loader handles loading the necessary code for running a container once it is loaded.\n\t */\n\treadonly codeLoader: ICodeDetailsLoader;\n\n\t/**\n\t * The url resolver used by the loader for resolving external urls into Fluid urls.\n\t */\n\treadonly urlResolver: IUrlResolver;\n\n\t/**\n\t * The request to resolve the container.\n\t */\n\treadonly request: IRequest;\n\n\t/**\n\t * Pending local state to be applied to the container.\n\t */\n\treadonly pendingLocalState: string;\n\n\t/**\n\t * A property bag of options/policies used by various layers to control features.\n\t */\n\treadonly options?: IContainerPolicies | undefined;\n\n\t/**\n\t * Scope is provided to all container and is a set of shared services for container's to integrate with their host environment.\n\t */\n\treadonly scope?: FluidObject | undefined;\n\n\t/**\n\t * The logger that all telemetry should be pushed to.\n\t */\n\treadonly logger?: ITelemetryBaseLogger | undefined;\n\n\t/**\n\t * The configuration provider which may be used to control features.\n\t */\n\treadonly configProvider?: IConfigProviderBase | undefined;\n\n\t/**\n\t * Client details provided in the override will be merged over the default client.\n\t */\n\treadonly clientDetailsOverride?: IClientDetails | undefined;\n}\n\n/**\n * Loads a frozen container from pending local state.\n * @param props - Properties required to load a frozen container from pending state.\n * @legacy @alpha\n */\nexport async function loadFrozenContainerFromPendingState(\n\tprops: ILoadFrozenContainerFromPendingStateProps,\n): Promise<IContainer> {\n\treturn loadExistingContainer({\n\t\t...props,\n\t\tdocumentServiceFactory: new FrozenDocumentServiceFactory(),\n\t});\n}\n"]}
@@ -0,0 +1,44 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+ import { TypedEventEmitter } from "@fluid-internal/client-utils";
6
+ import type { IDisposable } from "@fluidframework/core-interfaces";
7
+ import { type ConnectionMode, type IClientConfiguration, type IDocumentDeltaConnection, type IDocumentDeltaConnectionEvents, type IDocumentMessage, type IDocumentService, type IDocumentServiceFactory, type IResolvedUrl, type ISequencedDocumentMessage, type ISignalClient, type ISignalMessage, type ITokenClaims } from "@fluidframework/driver-definitions/internal";
8
+ import type { IConnectionStateChangeReason } from "./contracts.js";
9
+ export declare class FrozenDocumentServiceFactory implements IDocumentServiceFactory {
10
+ createDocumentService(resolvedUrl: IResolvedUrl): Promise<IDocumentService>;
11
+ createContainer(): Promise<IDocumentService>;
12
+ }
13
+ /**
14
+ * Implementation of IDocumentDeltaConnection that does not support submitting
15
+ * or receiving ops. Used in storage-only mode and in frozen loads.
16
+ */
17
+ export declare class FrozenDeltaStream extends TypedEventEmitter<IDocumentDeltaConnectionEvents> implements IDocumentDeltaConnection, IDisposable {
18
+ readonly storageOnlyReason?: string | undefined;
19
+ readonly readonlyConnectionReason?: IConnectionStateChangeReason<import("@fluidframework/core-interfaces").IErrorBase> | undefined;
20
+ clientId: string;
21
+ claims: ITokenClaims;
22
+ mode: ConnectionMode;
23
+ existing: boolean;
24
+ maxMessageSize: number;
25
+ version: string;
26
+ initialMessages: ISequencedDocumentMessage[];
27
+ initialSignals: ISignalMessage[];
28
+ initialClients: ISignalClient[];
29
+ serviceConfiguration: IClientConfiguration;
30
+ checkpointSequenceNumber?: number | undefined;
31
+ /**
32
+ * Connection which is not connected to socket.
33
+ * @param storageOnlyReason - Reason on why the connection to delta stream is not allowed.
34
+ * @param readonlyConnectionReason - reason/error if any which lead to using FrozenDeltaStream.
35
+ */
36
+ constructor(storageOnlyReason?: string | undefined, readonlyConnectionReason?: IConnectionStateChangeReason<import("@fluidframework/core-interfaces").IErrorBase> | undefined);
37
+ submit(messages: IDocumentMessage[]): void;
38
+ submitSignal(message: unknown): void;
39
+ private _disposed;
40
+ get disposed(): boolean;
41
+ dispose(): void;
42
+ }
43
+ export declare function isFrozenDeltaStreamConnection(connection: unknown): connection is FrozenDeltaStream;
44
+ //# sourceMappingURL=frozenServices.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"frozenServices.d.ts","sourceRoot":"","sources":["../src/frozenServices.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAEN,KAAK,cAAc,EAEnB,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,8BAA8B,EAEnC,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EAErB,KAAK,uBAAuB,EAG5B,KAAK,YAAY,EACjB,KAAK,yBAAyB,EAC9B,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,MAAM,6CAA6C,CAAC;AAErD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,gBAAgB,CAAC;AAEnE,qBAAa,4BAA6B,YAAW,uBAAuB;IACrE,qBAAqB,CAAC,WAAW,EAAE,YAAY,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAG3E,eAAe,IAAI,OAAO,CAAC,gBAAgB,CAAC;CAGlD;AAuDD;;;GAGG;AACH,qBAAa,iBACZ,SAAQ,iBAAiB,CAAC,8BAA8B,CACxD,YAAW,wBAAwB,EAAE,WAAW;aA2B/B,iBAAiB,CAAC;aAClB,wBAAwB,CAAC;IA1B1C,QAAQ,SAA6B;IAErC,MAAM,eAEY;IAClB,IAAI,EAAE,cAAc,CAAU;IAC9B,QAAQ,EAAE,OAAO,CAAQ;IACzB,cAAc,EAAE,MAAM,CAAK;IAC3B,OAAO,EAAE,MAAM,CAAM;IACrB,eAAe,EAAE,yBAAyB,EAAE,CAAM;IAClD,cAAc,EAAE,cAAc,EAAE,CAAM;IACtC,cAAc,EAAE,aAAa,EAAE,CAE7B;IACF,oBAAoB,EAAE,oBAAoB,CAGxC;IACF,wBAAwB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAa;IAC1D;;;;OAIG;gBAEc,iBAAiB,CAAC,oBAAQ,EAC1B,wBAAwB,CAAC,gGAA8B;IAIxE,MAAM,CAAC,QAAQ,EAAE,gBAAgB,EAAE,GAAG,IAAI;IAY1C,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAOpC,OAAO,CAAC,SAAS,CAAS;IAC1B,IAAW,QAAQ,IAAI,OAAO,CAE7B;IACM,OAAO,IAAI,IAAI;CAGtB;AACD,wBAAgB,6BAA6B,CAC5C,UAAU,EAAE,OAAO,GACjB,UAAU,IAAI,iBAAiB,CAEjC"}
@@ -0,0 +1,126 @@
1
+ "use strict";
2
+ /*!
3
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
4
+ * Licensed under the MIT License.
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.isFrozenDeltaStreamConnection = exports.FrozenDeltaStream = exports.FrozenDocumentServiceFactory = void 0;
8
+ const client_utils_1 = require("@fluid-internal/client-utils");
9
+ const internal_1 = require("@fluidframework/driver-definitions/internal");
10
+ class FrozenDocumentServiceFactory {
11
+ async createDocumentService(resolvedUrl) {
12
+ return new FrozenDocumentService(resolvedUrl);
13
+ }
14
+ async createContainer() {
15
+ throw new Error("The FrozenDocumentServiceFactory cannot be used to create containers.");
16
+ }
17
+ }
18
+ exports.FrozenDocumentServiceFactory = FrozenDocumentServiceFactory;
19
+ class FrozenDocumentService extends client_utils_1.TypedEventEmitter {
20
+ constructor(resolvedUrl) {
21
+ super();
22
+ this.resolvedUrl = resolvedUrl;
23
+ this.policies = {
24
+ storageOnly: true,
25
+ };
26
+ }
27
+ async connectToStorage() {
28
+ return frozenDocumentStorageService;
29
+ }
30
+ async connectToDeltaStorage() {
31
+ return frozenDocumentDeltaStorageService;
32
+ }
33
+ async connectToDeltaStream(client) {
34
+ return new FrozenDeltaStream();
35
+ }
36
+ dispose() { }
37
+ }
38
+ const frozenDocumentStorageServiceHandler = () => {
39
+ throw new Error("Operations are not supported on the FrozenDocumentStorageService.");
40
+ };
41
+ const frozenDocumentStorageService = {
42
+ getSnapshotTree: frozenDocumentStorageServiceHandler,
43
+ getSnapshot: frozenDocumentStorageServiceHandler,
44
+ getVersions: frozenDocumentStorageServiceHandler,
45
+ createBlob: frozenDocumentStorageServiceHandler,
46
+ readBlob: frozenDocumentStorageServiceHandler,
47
+ uploadSummaryWithContext: frozenDocumentStorageServiceHandler,
48
+ downloadSummary: frozenDocumentStorageServiceHandler,
49
+ };
50
+ const frozenDocumentDeltaStorageService = {
51
+ fetchMessages: () => ({
52
+ read: async () => ({
53
+ done: true,
54
+ }),
55
+ }),
56
+ };
57
+ const clientFrozenDeltaStream = {
58
+ mode: "read",
59
+ details: { capabilities: { interactive: true } },
60
+ permission: [],
61
+ user: { id: "storage-only client" }, // we need some "fake" ID here.
62
+ scopes: [],
63
+ };
64
+ const clientIdFrozenDeltaStream = "storage-only client";
65
+ /**
66
+ * Implementation of IDocumentDeltaConnection that does not support submitting
67
+ * or receiving ops. Used in storage-only mode and in frozen loads.
68
+ */
69
+ class FrozenDeltaStream extends client_utils_1.TypedEventEmitter {
70
+ /**
71
+ * Connection which is not connected to socket.
72
+ * @param storageOnlyReason - Reason on why the connection to delta stream is not allowed.
73
+ * @param readonlyConnectionReason - reason/error if any which lead to using FrozenDeltaStream.
74
+ */
75
+ constructor(storageOnlyReason, readonlyConnectionReason) {
76
+ super();
77
+ this.storageOnlyReason = storageOnlyReason;
78
+ this.readonlyConnectionReason = readonlyConnectionReason;
79
+ this.clientId = clientIdFrozenDeltaStream;
80
+ // eslint-disable-next-line @typescript-eslint/consistent-type-assertions
81
+ this.claims = {
82
+ scopes: [internal_1.ScopeType.DocRead],
83
+ };
84
+ this.mode = "read";
85
+ this.existing = true;
86
+ this.maxMessageSize = 0;
87
+ this.version = "";
88
+ this.initialMessages = [];
89
+ this.initialSignals = [];
90
+ this.initialClients = [
91
+ { client: clientFrozenDeltaStream, clientId: clientIdFrozenDeltaStream },
92
+ ];
93
+ this.serviceConfiguration = {
94
+ maxMessageSize: 0,
95
+ blockSize: 0,
96
+ };
97
+ this.checkpointSequenceNumber = undefined;
98
+ this._disposed = false;
99
+ }
100
+ submit(messages) {
101
+ this.emit("nack", this.clientId, messages.map((operation) => {
102
+ return {
103
+ operation,
104
+ content: { message: "Cannot submit with storage-only connection", code: 403 },
105
+ };
106
+ }));
107
+ }
108
+ submitSignal(message) {
109
+ this.emit("nack", this.clientId, {
110
+ operation: message,
111
+ content: { message: "Cannot submit signal with storage-only connection", code: 403 },
112
+ });
113
+ }
114
+ get disposed() {
115
+ return this._disposed;
116
+ }
117
+ dispose() {
118
+ this._disposed = true;
119
+ }
120
+ }
121
+ exports.FrozenDeltaStream = FrozenDeltaStream;
122
+ function isFrozenDeltaStreamConnection(connection) {
123
+ return connection instanceof FrozenDeltaStream;
124
+ }
125
+ exports.isFrozenDeltaStreamConnection = isFrozenDeltaStreamConnection;
126
+ //# sourceMappingURL=frozenServices.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"frozenServices.js","sourceRoot":"","sources":["../src/frozenServ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S;gBACT,OAAO,EAAE,EAAE,OAAO,EAAE,4CAA4C,EAAE,IAAI,EAAE,GAAG,EAAE;aAC7E,CAAC;QACH,CAAC,CAAC,CACF,CAAC;IACH,CAAC;IACD,YAAY,CAAC,OAAgB;QAC5B,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,EAAE;YAChC,SAAS,EAAE,OAAO;YAClB,OAAO,EAAE,EAAE,OAAO,EAAE,mDAAmD,EAAE,IAAI,EAAE,GAAG,EAAE;SACpF,CAAC,CAAC;IACJ,CAAC;IAGD,IAAW,QAAQ;QAClB,OAAO,IAAI,CAAC,SAAS,CAAC;IACvB,CAAC;IACM,OAAO;QACb,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;IACvB,CAAC;CACD;AA5DD,8CA4DC;AACD,SAAgB,6BAA6B,CAC5C,UAAmB;IAEnB,OAAO,UAAU,YAAY,iBAAiB,CAAC;AAChD,CAAC;AAJD,sEAIC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { TypedEventEmitter } from \"@fluid-internal/client-utils\";\nimport type { IDisposable } from \"@fluidframework/core-interfaces\";\nimport {\n\tScopeType,\n\ttype ConnectionMode,\n\ttype IClient,\n\ttype IClientConfiguration,\n\ttype IDocumentDeltaConnection,\n\ttype IDocumentDeltaConnectionEvents,\n\ttype IDocumentDeltaStorageService,\n\ttype IDocumentMessage,\n\ttype IDocumentService,\n\ttype IDocumentServiceEvents,\n\ttype IDocumentServiceFactory,\n\ttype IDocumentServicePolicies,\n\ttype IDocumentStorageService,\n\ttype IResolvedUrl,\n\ttype ISequencedDocumentMessage,\n\ttype ISignalClient,\n\ttype ISignalMessage,\n\ttype ITokenClaims,\n} from \"@fluidframework/driver-definitions/internal\";\n\nimport type { IConnectionStateChangeReason } from \"./contracts.js\";\n\nexport class FrozenDocumentServiceFactory implements IDocumentServiceFactory {\n\tasync createDocumentService(resolvedUrl: IResolvedUrl): Promise<IDocumentService> {\n\t\treturn new FrozenDocumentService(resolvedUrl);\n\t}\n\tasync createContainer(): Promise<IDocumentService> {\n\t\tthrow new Error(\"The FrozenDocumentServiceFactory cannot be used to create containers.\");\n\t}\n}\n\nclass FrozenDocumentService\n\textends TypedEventEmitter<IDocumentServiceEvents>\n\timplements IDocumentService\n{\n\tconstructor(public readonly resolvedUrl: IResolvedUrl) {\n\t\tsuper();\n\t}\n\n\tpublic readonly policies: IDocumentServicePolicies = {\n\t\tstorageOnly: true,\n\t};\n\tasync connectToStorage(): Promise<IDocumentStorageService> {\n\t\treturn frozenDocumentStorageService;\n\t}\n\tasync connectToDeltaStorage(): Promise<IDocumentDeltaStorageService> {\n\t\treturn frozenDocumentDeltaStorageService;\n\t}\n\tasync connectToDeltaStream(client: IClient): Promise<IDocumentDeltaConnection> {\n\t\treturn new FrozenDeltaStream();\n\t}\n\tdispose(): void {}\n}\n\nconst frozenDocumentStorageServiceHandler = (): never => {\n\tthrow new Error(\"Operations are not supported on the FrozenDocumentStorageService.\");\n};\nconst frozenDocumentStorageService: IDocumentStorageService = {\n\tgetSnapshotTree: frozenDocumentStorageServiceHandler,\n\tgetSnapshot: frozenDocumentStorageServiceHandler,\n\tgetVersions: frozenDocumentStorageServiceHandler,\n\tcreateBlob: frozenDocumentStorageServiceHandler,\n\treadBlob: frozenDocumentStorageServiceHandler,\n\tuploadSummaryWithContext: frozenDocumentStorageServiceHandler,\n\tdownloadSummary: frozenDocumentStorageServiceHandler,\n};\n\nconst frozenDocumentDeltaStorageService: IDocumentDeltaStorageService = {\n\tfetchMessages: () => ({\n\t\tread: async () => ({\n\t\t\tdone: true,\n\t\t}),\n\t}),\n};\n\nconst clientFrozenDeltaStream: IClient = {\n\tmode: \"read\",\n\tdetails: { capabilities: { interactive: true } },\n\tpermission: [],\n\tuser: { id: \"storage-only client\" }, // we need some \"fake\" ID here.\n\tscopes: [],\n};\nconst clientIdFrozenDeltaStream: string = \"storage-only client\";\n\n/**\n * Implementation of IDocumentDeltaConnection that does not support submitting\n * or receiving ops. Used in storage-only mode and in frozen loads.\n */\nexport class FrozenDeltaStream\n\textends TypedEventEmitter<IDocumentDeltaConnectionEvents>\n\timplements IDocumentDeltaConnection, IDisposable\n{\n\tclientId = clientIdFrozenDeltaStream;\n\t// eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n\tclaims = {\n\t\tscopes: [ScopeType.DocRead],\n\t} as ITokenClaims;\n\tmode: ConnectionMode = \"read\";\n\texisting: boolean = true;\n\tmaxMessageSize: number = 0;\n\tversion: string = \"\";\n\tinitialMessages: ISequencedDocumentMessage[] = [];\n\tinitialSignals: ISignalMessage[] = [];\n\tinitialClients: ISignalClient[] = [\n\t\t{ client: clientFrozenDeltaStream, clientId: clientIdFrozenDeltaStream },\n\t];\n\tserviceConfiguration: IClientConfiguration = {\n\t\tmaxMessageSize: 0,\n\t\tblockSize: 0,\n\t};\n\tcheckpointSequenceNumber?: number | undefined = undefined;\n\t/**\n\t * Connection which is not connected to socket.\n\t * @param storageOnlyReason - Reason on why the connection to delta stream is not allowed.\n\t * @param readonlyConnectionReason - reason/error if any which lead to using FrozenDeltaStream.\n\t */\n\tconstructor(\n\t\tpublic readonly storageOnlyReason?: string,\n\t\tpublic readonly readonlyConnectionReason?: IConnectionStateChangeReason,\n\t) {\n\t\tsuper();\n\t}\n\tsubmit(messages: IDocumentMessage[]): void {\n\t\tthis.emit(\n\t\t\t\"nack\",\n\t\t\tthis.clientId,\n\t\t\tmessages.map((operation) => {\n\t\t\t\treturn {\n\t\t\t\t\toperation,\n\t\t\t\t\tcontent: { message: \"Cannot submit with storage-only connection\", code: 403 },\n\t\t\t\t};\n\t\t\t}),\n\t\t);\n\t}\n\tsubmitSignal(message: unknown): void {\n\t\tthis.emit(\"nack\", this.clientId, {\n\t\t\toperation: message,\n\t\t\tcontent: { message: \"Cannot submit signal with storage-only connection\", code: 403 },\n\t\t});\n\t}\n\n\tprivate _disposed = false;\n\tpublic get disposed(): boolean {\n\t\treturn this._disposed;\n\t}\n\tpublic dispose(): void {\n\t\tthis._disposed = true;\n\t}\n}\nexport function isFrozenDeltaStreamConnection(\n\tconnection: unknown,\n): connection is FrozenDeltaStream {\n\treturn connection instanceof FrozenDeltaStream;\n}\n"]}
package/dist/index.d.ts CHANGED
@@ -3,8 +3,8 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  export { ConnectionState } from "./connectionState.js";
6
- export { type IContainerExperimental, waitContainerToCatchUp } from "./container.js";
7
- export { createDetachedContainer, loadExistingContainer, rehydrateDetachedContainer, type ICreateAndLoadContainerProps, type ICreateDetachedContainerProps, type ILoadExistingContainerProps, type IRehydrateDetachedContainerProps, } from "./createAndLoadContainerUtils.js";
6
+ export { type ContainerAlpha, waitContainerToCatchUp, asLegacyAlpha } from "./container.js";
7
+ export { createDetachedContainer, loadExistingContainer, rehydrateDetachedContainer, loadFrozenContainerFromPendingState, type ICreateAndLoadContainerProps, type ICreateDetachedContainerProps, type ILoadExistingContainerProps, type IRehydrateDetachedContainerProps, type ILoadFrozenContainerFromPendingStateProps, } from "./createAndLoadContainerUtils.js";
8
8
  export { type ICodeDetailsLoader, type IFluidModuleWithDetails, type ILoaderProps, type ILoaderServices, Loader, } from "./loader.js";
9
9
  export { driverSupportRequirementsForLoader, loaderCoreCompatDetails, runtimeSupportRequirementsForLoader, loaderCompatDetailsForRuntime, } from "./loaderLayerCompatState.js";
10
10
  export { loadContainerPaused } from "./loadPaused.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,KAAK,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AACrF,OAAO,EACN,uBAAuB,EACvB,qBAAqB,EACrB,0BAA0B,EAC1B,KAAK,4BAA4B,EACjC,KAAK,6BAA6B,EACl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mCAAmC,EACnC,6BAA6B,GAC7B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EACN,0BAA0B,EAC1B,sCAAsC,GACtC,MAAM,2CAA2C,CAAC;AACnD,YAAY,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAC9E,OAAO,EACN,6BAA6B,EAC7B,KAAK,UAAU,GACf,MAAM,YAAY,CAAC;AACpB,YAAY,EACX,oBAAoB,EACpB,oBAAoB,EACpB,eAAe,EACf,qBAAqB,EACrB,uBAAuB,GACvB,MAAM,qBAAqB,CAAC"}
package/dist/index.js CHANGED
@@ -4,15 +4,17 @@
4
4
  * Licensed under the MIT License.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.tryParseCompatibleResolvedUrl = exports.resolveWithLocationRedirectionHandling = exports.isLocationRedirectionError = exports.loadContainerPaused = exports.loaderCompatDetailsForRuntime = exports.runtimeSupportRequirementsForLoader = exports.loaderCoreCompatDetails = exports.driverSupportRequirementsForLoader = exports.Loader = exports.rehydrateDetachedContainer = exports.loadExistingContainer = exports.createDetachedContainer = exports.waitContainerToCatchUp = exports.ConnectionState = void 0;
7
+ exports.tryParseCompatibleResolvedUrl = exports.resolveWithLocationRedirectionHandling = exports.isLocationRedirectionError = exports.loadContainerPaused = exports.loaderCompatDetailsForRuntime = exports.runtimeSupportRequirementsForLoader = exports.loaderCoreCompatDetails = exports.driverSupportRequirementsForLoader = exports.Loader = exports.loadFrozenContainerFromPendingState = exports.rehydrateDetachedContainer = exports.loadExistingContainer = exports.createDetachedContainer = exports.asLegacyAlpha = exports.waitContainerToCatchUp = exports.ConnectionState = void 0;
8
8
  var connectionState_js_1 = require("./connectionState.js");
9
9
  Object.defineProperty(exports, "ConnectionState", { enumerable: true, get: function () { return connectionState_js_1.ConnectionState; } });
10
10
  var container_js_1 = require("./container.js");
11
11
  Object.defineProperty(exports, "waitContainerToCatchUp", { enumerable: true, get: function () { return container_js_1.waitContainerToCatchUp; } });
12
+ Object.defineProperty(exports, "asLegacyAlpha", { enumerable: true, get: function () { return container_js_1.asLegacyAlpha; } });
12
13
  var createAndLoadContainerUtils_js_1 = require("./createAndLoadContainerUtils.js");
13
14
  Object.defineProperty(exports, "createDetachedContainer", { enumerable: true, get: function () { return createAndLoadContainerUtils_js_1.createDetachedContainer; } });
14
15
  Object.defineProperty(exports, "loadExistingContainer", { enumerable: true, get: function () { return createAndLoadContainerUtils_js_1.loadExistingContainer; } });
15
16
  Object.defineProperty(exports, "rehydrateDetachedContainer", { enumerable: true, get: function () { return createAndLoadContainerUtils_js_1.rehydrateDetachedContainer; } });
17
+ Object.defineProperty(exports, "loadFrozenContainerFromPendingState", { enumerable: true, get: function () { return createAndLoadContainerUtils_js_1.loadFrozenContainerFromPendingState; } });
16
18
  var loader_js_1 = require("./loader.js");
17
19
  Object.defineProperty(exports, "Loader", { enumerable: true, get: function () { return loader_js_1.Loader; } });
18
20
  var loaderLayerCompatState_js_1 = require("./loaderLayerCompatState.js");
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,2DAAuD;AAA9C,qHAAA,eAAe,OAAA;AACxB,+CAAqF;AAA/C,sHAAA,sBAAsB,OAAA;AAC5D,mFAQ0C;AAPzC,yIAAA,uBAAuB,OAAA;AACvB,uIAAA,qBAAqB,OAAA;AACrB,4IAAA,0BAA0B,OAAA;AAM3B,yCAMqB;AADpB,mGAAA,MAAM,OAAA;AAEP,yEAKqC;AAJpC,+IAAA,kCAAkC,OAAA;AAClC,oIAAA,uBAAuB,OAAA;AACvB,gJAAA,mCAAmC,OAAA;AACnC,0IAAA,6BAA6B,OAAA;AAE9B,iDAAsD;AAA7C,oHAAA,mBAAmB,OAAA;AAC5B,sEAGmD;AAFlD,sHAAA,0BAA0B,OAAA;AAC1B,kIAAA,sCAAsC,OAAA;AAGvC,uCAGoB;AAFnB,yHAAA,6BAA6B,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { ConnectionState } from \"./connectionState.js\";\nexport { type IContainerExperimental, waitContainerToCatchUp } from \"./container.js\";\nexport {\n\tcreateDetachedContainer,\n\tloadExistingContainer,\n\trehydrateDetachedContainer,\n\ttype ICreateAndLoadContainerProps,\n\ttype ICreateDetachedContainerProps,\n\ttype ILoadExistingContainerProps,\n\ttype IRehydrateDetachedContainerProps,\n} from \"./createAndLoadContainerUtils.js\";\nexport {\n\ttype ICodeDetailsLoader,\n\ttype IFluidModuleWithDetails,\n\ttype ILoaderProps,\n\ttype ILoaderServices,\n\tLoader,\n} from \"./loader.js\";\nexport {\n\tdriverSupportRequirementsForLoader,\n\tloaderCoreCompatDetails,\n\truntimeSupportRequirementsForLoader,\n\tloaderCompatDetailsForRuntime,\n} from \"./loaderLayerCompatState.js\";\nexport { loadContainerPaused } from \"./loadPaused.js\";\nexport {\n\tisLocationRedirectionError,\n\tresolveWithLocationRedirectionHandling,\n} from \"./location-redirection-utilities/index.js\";\nexport type { IProtocolHandler, ProtocolHandlerBuilder } from \"./protocol.js\";\nexport {\n\ttryParseCompatibleResolvedUrl,\n\ttype IParsedUrl,\n} from \"./utils.js\";\nexport type {\n\tIBaseProtocolHandler,\n\tIScribeProtocolState,\n\tIQuorumSnapshot,\n\tQuorumClientsSnapshot,\n\tQuorumProposalsSnapshot,\n} from \"./protocol/index.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,2DAAuD;AAA9C,qHAAA,eAAe,OAAA;AACxB,+CAA4F;AAA9D,sHAAA,sBAAsB,OAAA;AAAE,6GAAA,aAAa,OAAA;AACnE,mFAU0C;AATzC,yIAAA,uBAAuB,OAAA;AACvB,uIAAA,qBAAqB,OAAA;AACrB,4IAAA,0BAA0B,OAAA;AAC1B,qJAAA,mCAAmC,OAAA;AAOpC,yCAMqB;AADpB,mGAAA,MAAM,OAAA;AAEP,yEAKqC;AAJpC,+IAAA,kCAAkC,OAAA;AAClC,oIAAA,uBAAuB,OAAA;AACvB,gJAAA,mCAAmC,OAAA;AACnC,0IAAA,6BAA6B,OAAA;AAE9B,iDAAsD;AAA7C,oHAAA,mBAAmB,OAAA;AAC5B,sEAGmD;AAFlD,sHAAA,0BAA0B,OAAA;AAC1B,kIAAA,sCAAsC,OAAA;AAGvC,uCAGoB;AAFnB,yHAAA,6BAA6B,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { ConnectionState } from \"./connectionState.js\";\nexport { type ContainerAlpha, waitContainerToCatchUp, asLegacyAlpha } from \"./container.js\";\nexport {\n\tcreateDetachedContainer,\n\tloadExistingContainer,\n\trehydrateDetachedContainer,\n\tloadFrozenContainerFromPendingState,\n\ttype ICreateAndLoadContainerProps,\n\ttype ICreateDetachedContainerProps,\n\ttype ILoadExistingContainerProps,\n\ttype IRehydrateDetachedContainerProps,\n\ttype ILoadFrozenContainerFromPendingStateProps,\n} from \"./createAndLoadContainerUtils.js\";\nexport {\n\ttype ICodeDetailsLoader,\n\ttype IFluidModuleWithDetails,\n\ttype ILoaderProps,\n\ttype ILoaderServices,\n\tLoader,\n} from \"./loader.js\";\nexport {\n\tdriverSupportRequirementsForLoader,\n\tloaderCoreCompatDetails,\n\truntimeSupportRequirementsForLoader,\n\tloaderCompatDetailsForRuntime,\n} from \"./loaderLayerCompatState.js\";\nexport { loadContainerPaused } from \"./loadPaused.js\";\nexport {\n\tisLocationRedirectionError,\n\tresolveWithLocationRedirectionHandling,\n} from \"./location-redirection-utilities/index.js\";\nexport type { IProtocolHandler, ProtocolHandlerBuilder } from \"./protocol.js\";\nexport {\n\ttryParseCompatibleResolvedUrl,\n\ttype IParsedUrl,\n} from \"./utils.js\";\nexport type {\n\tIBaseProtocolHandler,\n\tIScribeProtocolState,\n\tIQuorumSnapshot,\n\tQuorumClientsSnapshot,\n\tQuorumProposalsSnapshot,\n} from \"./protocol/index.js\";\n"]}
@@ -0,0 +1,48 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ /*
7
+ * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
8
+ * Generated by "flub generate entrypoints" in @fluid-tools/build-cli.
9
+ */
10
+
11
+ export {
12
+ // #region @public APIs
13
+ ConnectionState,
14
+ // #endregion
15
+
16
+ // #region @legacyBeta APIs
17
+ IBaseProtocolHandler,
18
+ ICodeDetailsLoader,
19
+ ICreateAndLoadContainerProps,
20
+ ICreateDetachedContainerProps,
21
+ IFluidModuleWithDetails,
22
+ ILoadExistingContainerProps,
23
+ ILoaderProps,
24
+ ILoaderServices,
25
+ IParsedUrl,
26
+ IProtocolHandler,
27
+ IQuorumSnapshot,
28
+ IRehydrateDetachedContainerProps,
29
+ IScribeProtocolState,
30
+ Loader,
31
+ ProtocolHandlerBuilder,
32
+ QuorumClientsSnapshot,
33
+ QuorumProposalsSnapshot,
34
+ createDetachedContainer,
35
+ loadExistingContainer,
36
+ rehydrateDetachedContainer,
37
+ resolveWithLocationRedirectionHandling,
38
+ tryParseCompatibleResolvedUrl,
39
+ waitContainerToCatchUp,
40
+ // #endregion
41
+
42
+ // #region @legacyAlpha APIs
43
+ ContainerAlpha,
44
+ ILoadFrozenContainerFromPendingStateProps,
45
+ asLegacyAlpha,
46
+ loadFrozenContainerFromPendingState
47
+ // #endregion
48
+ } from "./index.js";
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export declare const pkgName = "@fluidframework/container-loader";
8
- export declare const pkgVersion = "2.62.0-356644";
8
+ export declare const pkgVersion = "2.62.0";
9
9
  //# sourceMappingURL=packageVersion.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageVersion.d.ts","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,OAAO,qCAAqC,CAAC;AAC1D,eAAO,MAAM,UAAU,kBAAkB,CAAC"}
1
+ {"version":3,"file":"packageVersion.d.ts","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,OAAO,qCAAqC,CAAC;AAC1D,eAAO,MAAM,UAAU,WAAW,CAAC"}
@@ -8,5 +8,5 @@
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.pkgVersion = exports.pkgName = void 0;
10
10
  exports.pkgName = "@fluidframework/container-loader";
11
- exports.pkgVersion = "2.62.0-356644";
11
+ exports.pkgVersion = "2.62.0";
12
12
  //# sourceMappingURL=packageVersion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,kCAAkC,CAAC;AAC7C,QAAA,UAAU,GAAG,eAAe,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/container-loader\";\nexport const pkgVersion = \"2.62.0-356644\";\n"]}
1
+ {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,kCAAkC,CAAC;AAC7C,QAAA,UAAU,GAAG,QAAQ,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/container-loader\";\nexport const pkgVersion = \"2.62.0\";\n"]}
@@ -0,0 +1,11 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ /*
7
+ * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
8
+ * Generated by "flub generate entrypoints" in @fluid-tools/build-cli.
9
+ */
10
+
11
+ export * from "../lib/legacyAlpha.js";
@@ -1 +1 @@
1
- {"version":3,"file":"connectionManager.d.ts","sourceRoot":"","sources":["../src/connectionManager.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AACrF,OAAO,KAAK,EACX,WAAW,EACX,YAAY,EACZ,MAAM,gDAAgD,CAAC;AACxD,OAAO,EAEN,KAAK,wBAAwB,EAE7B,MAAM,iCAAiC,CAAC;AAEzC,OAAO,KAAK,EACX,cAAc,EACd,OAAO,EACP,cAAc,EACd,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAGN,KAAK,gBAAgB,EAGrB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EAQrB,KAAK,yBAAyB,EAE9B,MAAM,6CAA6C,CAAC;AAYrD,OAAO,EACN,KAAK,mBAAmB,EAOxB,MAAM,0CAA0C,CAAC;AAElD,OAAO,EACN,KAAK,0BAA0B,EAC/B,KAAK,kBAAkB,EACvB,KAAK,6BAA6B,EAClC,KAAK,4BAA4B,EACjC,aAAa,EACb,MAAM,gBAAgB,CAAC;AAoIxB;;;;GAIG;AACH,qBAAa,iBAAkB,YAAW,kBAAkB;IAmN1D,OAAO,CAAC,QAAQ,CAAC,eAAe;aAChB,cAAc,EAAE,MAAM,OAAO;IAC7C,OAAO,CAAC,QAAQ,CAAC,MAAM;IAEvB,OAAO,CAAC,QA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AiBtB;;;;;OAKG;IACH,OAAO,CAAC,yBAAyB;IAyCjC;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAiBxB;;;;OAIG;IACH,OAAO,CAAC,4BAA4B;IAyJpC;;;;;;OAMG;IACH,OAAO,CAAC,gBAAgB;IAMxB;;;;;;OAMG;YACW,SAAS;IA8DhB,oBAAoB,CAC1B,OAAO,EAAE,IAAI,CAAC,gBAAgB,EAAE,sBAAsB,CAAC,GACrD,gBAAgB,GAAG,SAAS;IAuCxB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI;IAQ5D,YAAY,CAAC,QAAQ,EAAE,gBAAgB,EAAE,GAAG,IAAI;IA+BhD,0BAA0B,CAAC,OAAO,EAAE,yBAAyB,GAAG,IAAI;IAgD3E,OAAO,CAAC,QAAQ,CAAC,SAAS,CAMxB;IAEF,OAAO,CAAC,QAAQ,CAAC,aAAa,CAG5B;IAGF,OAAO,CAAC,QAAQ,CAAC,WAAW,CAkB1B;IAGF,OAAO,CAAC,QAAQ,CAAC,yBAAyB,CAIxC;IAEF,OAAO,CAAC,QAAQ,CAAC,YAAY,CAE3B;CACF"}
@@ -2,14 +2,15 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import { TypedEventEmitter, performanceNow } from "@fluid-internal/client-utils";
6
- import { LogLevel, } from "@fluidframework/core-interfaces";
5
+ import { performanceNow } from "@fluid-internal/client-utils";
6
+ import { LogLevel } from "@fluidframework/core-interfaces";
7
7
  import { assert } from "@fluidframework/core-utils/internal";
8
8
  import { DriverErrorTypes, MessageType, ScopeType, } from "@fluidframework/driver-definitions/internal";
9
9
  import { calculateMaxWaitTime, canRetryOnError, createGenericNetworkError, createWriteError, getRetryDelayFromError, isRuntimeMessage, logNetworkFailure, } from "@fluidframework/driver-utils/internal";
10
10
  import { GenericError, UsageError, formatTick, generateStack, isFluidError, normalizeError, } from "@fluidframework/telemetry-utils/internal";
11
11
  import { ReconnectMode, } from "./contracts.js";
12
12
  import { DeltaQueue } from "./deltaQueue.js";
13
+ import { FrozenDeltaStream, isFrozenDeltaStreamConnection } from "./frozenServices.js";
13
14
  import { SignalType } from "./protocol.js";
14
15
  import { isDeltaStreamConnectionForbiddenError } from "./utils.js";
15
16
  // We double this value in first try in when we calculate time to wait for in "calculateMaxWaitTime" function.
@@ -22,73 +23,6 @@ function getNackReconnectInfo(nackContent) {
22
23
  const retryAfterMs = nackContent.retryAfter === undefined ? undefined : nackContent.retryAfter * 1000;
23
24
  return createGenericNetworkError(message, { canRetry, retryAfterMs }, { statusCode: nackContent.code, driverVersion: undefined });
24
25
  }
25
- /**
26
- * Implementation of IDocumentDeltaConnection that does not support submitting
27
- * or receiving ops. Used in storage-only mode.
28
- */
29
- const clientNoDeltaStream = {
30
- mode: "read",
31
- details: { capabilities: { interactive: true } },
32
- permission: [],
33
- user: { id: "storage-only client" }, // we need some "fake" ID here.
34
- scopes: [],
35
- };
36
- const clientIdNoDeltaStream = "storage-only client";
37
- class NoDeltaStream extends TypedEventEmitter {
38
- /**
39
- * Connection which is not connected to socket.
40
- * @param storageOnlyReason - Reason on why the connection to delta stream is not allowed.
41
- * @param readonlyConnectionReason - reason/error if any which lead to using NoDeltaStream.
42
- */
43
- constructor(storageOnlyReason, readonlyConnectionReason) {
44
- super();
45
- this.storageOnlyReason = storageOnlyReason;
46
- this.readonlyConnectionReason = readonlyConnectionReason;
47
- this.clientId = clientIdNoDeltaStream;
48
- // eslint-disable-next-line @typescript-eslint/consistent-type-assertions
49
- this.claims = {
50
- scopes: [ScopeType.DocRead],
51
- };
52
- this.mode = "read";
53
- this.existing = true;
54
- this.maxMessageSize = 0;
55
- this.version = "";
56
- this.initialMessages = [];
57
- this.initialSignals = [];
58
- this.initialClients = [
59
- { client: clientNoDeltaStream, clientId: clientIdNoDeltaStream },
60
- ];
61
- this.serviceConfiguration = {
62
- maxMessageSize: 0,
63
- blockSize: 0,
64
- };
65
- this.checkpointSequenceNumber = undefined;
66
- this._disposed = false;
67
- }
68
- submit(messages) {
69
- this.emit("nack", this.clientId, messages.map((operation) => {
70
- return {
71
- operation,
72
- content: { message: "Cannot submit with storage-only connection", code: 403 },
73
- };
74
- }));
75
- }
76
- submitSignal(message) {
77
- this.emit("nack", this.clientId, {
78
- operation: message,
79
- content: { message: "Cannot submit signal with storage-only connection", code: 403 },
80
- });
81
- }
82
- get disposed() {
83
- return this._disposed;
84
- }
85
- dispose() {
86
- this._disposed = true;
87
- }
88
- }
89
- function isNoDeltaStreamConnection(connection) {
90
- return connection instanceof NoDeltaStream;
91
- }
92
26
  const waitForOnline = async () => {
93
27
  // Only wait if we have a strong signal that we're offline - otherwise assume we're online.
94
28
  if (globalThis.navigator?.onLine === false && globalThis.addEventListener !== undefined) {
@@ -197,7 +131,7 @@ export class ConnectionManager {
197
131
  get readOnlyInfo() {
198
132
  let storageOnly = false;
199
133
  let storageOnlyReason;
200
- if (isNoDeltaStreamConnection(this.connection)) {
134
+ if (isFrozenDeltaStreamConnection(this.connection)) {
201
135
  storageOnly = true;
202
136
  storageOnlyReason = this.connection.storageOnlyReason;
203
137
  }
@@ -416,7 +350,7 @@ export class ConnectionManager {
416
350
  this.props.establishConnectionHandler(reason);
417
351
  let connection;
418
352
  if (docService.policies?.storageOnly === true) {
419
- connection = new NoDeltaStream();
353
+ connection = new FrozenDeltaStream();
420
354
  this.setupNewSuccessfulConnection(connection, "read", reason);
421
355
  assert(this.pendingConnection === undefined, 0x2b3 /* "logic error" */);
422
356
  return;
@@ -474,7 +408,7 @@ export class ConnectionManager {
474
408
  connected: connection !== undefined && connection.disposed === false,
475
409
  }, undefined, LogLevel.verbose);
476
410
  if (isDeltaStreamConnectionForbiddenError(origError)) {
477
- connection = new NoDeltaStream(origError.storageOnlyReason, {
411
+ connection = new FrozenDeltaStream(origError.storageOnlyReason, {
478
412
  text: origError.message,
479
413
  error: origError,
480
414
  });
@@ -485,7 +419,7 @@ export class ConnectionManager {
485
419
  origError.errorType === DriverErrorTypes.outOfStorageError) {
486
420
  // If we get out of storage error from calling joinsession, then use the NoDeltaStream object so
487
421
  // that user can at least load the container.
488
- connection = new NoDeltaStream(undefined, {
422
+ connection = new FrozenDeltaStream(undefined, {
489
423
  text: origError.message,
490
424
  error: origError,
491
425
  });
@@ -677,7 +611,9 @@ export class ConnectionManager {
677
611
  });
678
612
  }
679
613
  assert(!readonlyPermission || this.connectionMode === "read", 0x0e8 /* "readonly perf with write connection" */);
680
- this.set_readonlyPermissions(readonlyPermission, oldReadonlyValue, isNoDeltaStreamConnection(connection) ? connection.readonlyConnectionReason : undefined);
614
+ this.set_readonlyPermissions(readonlyPermission, oldReadonlyValue, isFrozenDeltaStreamConnection(connection)
615
+ ? connection.readonlyConnectionReason
616
+ : undefined);
681
617
  if (this._disposed) {
682
618
  // Raise proper events, Log telemetry event and close connection.
683
619
  this.disconnectFromDeltaStream({ text: "ConnectionManager already closed" });