@fluidframework/container-loader 0.54.2 → 0.56.0-49831
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +1 -1
- package/dist/connectionStateHandler.d.ts +1 -0
- package/dist/connectionStateHandler.d.ts.map +1 -1
- package/dist/connectionStateHandler.js +11 -2
- package/dist/connectionStateHandler.js.map +1 -1
- package/dist/container.d.ts +6 -12
- package/dist/container.d.ts.map +1 -1
- package/dist/container.js +50 -58
- package/dist/container.js.map +1 -1
- package/dist/containerContext.d.ts +11 -3
- package/dist/containerContext.d.ts.map +1 -1
- package/dist/containerContext.js +12 -6
- package/dist/containerContext.js.map +1 -1
- package/dist/containerStorageAdapter.d.ts +1 -1
- package/dist/containerStorageAdapter.d.ts.map +1 -1
- package/dist/containerStorageAdapter.js.map +1 -1
- package/dist/deltaManager.d.ts +0 -11
- package/dist/deltaManager.d.ts.map +1 -1
- package/dist/deltaManager.js +0 -13
- package/dist/deltaManager.js.map +1 -1
- package/dist/deltaManagerProxy.d.ts +0 -1
- package/dist/deltaManagerProxy.d.ts.map +1 -1
- package/dist/deltaManagerProxy.js +0 -3
- package/dist/deltaManagerProxy.js.map +1 -1
- package/dist/loader.d.ts +3 -3
- package/dist/loader.d.ts.map +1 -1
- package/dist/loader.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.d.ts.map +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/retriableDocumentStorageService.d.ts +1 -1
- package/dist/retriableDocumentStorageService.d.ts.map +1 -1
- package/dist/retriableDocumentStorageService.js.map +1 -1
- package/lib/connectionStateHandler.d.ts +1 -0
- package/lib/connectionStateHandler.d.ts.map +1 -1
- package/lib/connectionStateHandler.js +11 -2
- package/lib/connectionStateHandler.js.map +1 -1
- package/lib/container.d.ts +6 -12
- package/lib/container.d.ts.map +1 -1
- package/lib/container.js +52 -60
- package/lib/container.js.map +1 -1
- package/lib/containerContext.d.ts +11 -3
- package/lib/containerContext.d.ts.map +1 -1
- package/lib/containerContext.js +12 -6
- package/lib/containerContext.js.map +1 -1
- package/lib/containerStorageAdapter.d.ts +1 -1
- package/lib/containerStorageAdapter.d.ts.map +1 -1
- package/lib/containerStorageAdapter.js.map +1 -1
- package/lib/deltaManager.d.ts +0 -11
- package/lib/deltaManager.d.ts.map +1 -1
- package/lib/deltaManager.js +0 -13
- package/lib/deltaManager.js.map +1 -1
- package/lib/deltaManagerProxy.d.ts +0 -1
- package/lib/deltaManagerProxy.d.ts.map +1 -1
- package/lib/deltaManagerProxy.js +0 -3
- package/lib/deltaManagerProxy.js.map +1 -1
- package/lib/loader.d.ts +3 -3
- package/lib/loader.d.ts.map +1 -1
- package/lib/loader.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.d.ts.map +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/retriableDocumentStorageService.d.ts +1 -1
- package/lib/retriableDocumentStorageService.d.ts.map +1 -1
- package/lib/retriableDocumentStorageService.js.map +1 -1
- package/package.json +19 -18
- package/src/connectionStateHandler.ts +13 -3
- package/src/container.ts +71 -69
- package/src/containerContext.ts +18 -9
- package/src/containerStorageAdapter.ts +1 -1
- package/src/deltaManager.ts +0 -14
- package/src/deltaManagerProxy.ts +0 -4
- package/src/loader.ts +3 -3
- package/src/packageVersion.ts +1 -1
- package/src/retriableDocumentStorageService.ts +1 -1
package/src/containerContext.ts
CHANGED
|
@@ -34,13 +34,14 @@ import {
|
|
|
34
34
|
IClientDetails,
|
|
35
35
|
IDocumentMessage,
|
|
36
36
|
IQuorum,
|
|
37
|
+
IQuorumClients,
|
|
37
38
|
ISequencedDocumentMessage,
|
|
38
39
|
ISignalMessage,
|
|
39
40
|
ISnapshotTree,
|
|
40
|
-
ITree,
|
|
41
|
-
MessageType,
|
|
42
41
|
ISummaryTree,
|
|
42
|
+
ITree,
|
|
43
43
|
IVersion,
|
|
44
|
+
MessageType,
|
|
44
45
|
} from "@fluidframework/protocol-definitions";
|
|
45
46
|
import { PerformanceEvent } from "@fluidframework/telemetry-utils";
|
|
46
47
|
import { assert, LazyPromise } from "@fluidframework/common-utils";
|
|
@@ -100,10 +101,6 @@ export class ContainerContext implements IContainerContext {
|
|
|
100
101
|
return this.taggedLogger;
|
|
101
102
|
}
|
|
102
103
|
|
|
103
|
-
public get id(): string {
|
|
104
|
-
return this.container.id;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
104
|
public get clientId(): string | undefined {
|
|
108
105
|
return this.container.clientId;
|
|
109
106
|
}
|
|
@@ -132,6 +129,9 @@ export class ContainerContext implements IContainerContext {
|
|
|
132
129
|
return this.container.options;
|
|
133
130
|
}
|
|
134
131
|
|
|
132
|
+
/**
|
|
133
|
+
* @deprecated 0.55 - Configuration is not recommended to be used and will be removed in an upcoming release.
|
|
134
|
+
*/
|
|
135
135
|
public get configuration(): IFluidConfiguration {
|
|
136
136
|
const config: Partial<IFluidConfiguration> = {
|
|
137
137
|
scopes: this.container.scopes,
|
|
@@ -163,6 +163,9 @@ export class ContainerContext implements IContainerContext {
|
|
|
163
163
|
|
|
164
164
|
public get codeDetails() { return this._codeDetails; }
|
|
165
165
|
|
|
166
|
+
private readonly _quorum: IQuorum;
|
|
167
|
+
public get quorum(): IQuorumClients { return this._quorum; }
|
|
168
|
+
|
|
166
169
|
private readonly _fluidModuleP: Promise<IFluidModuleWithDetails>;
|
|
167
170
|
|
|
168
171
|
constructor(
|
|
@@ -172,7 +175,7 @@ export class ContainerContext implements IContainerContext {
|
|
|
172
175
|
private readonly _codeDetails: IFluidCodeDetails,
|
|
173
176
|
private readonly _baseSnapshot: ISnapshotTree | undefined,
|
|
174
177
|
public readonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>,
|
|
175
|
-
|
|
178
|
+
quorum: IQuorum,
|
|
176
179
|
public readonly loader: ILoader,
|
|
177
180
|
public readonly raiseContainerWarning: (warning: ContainerWarning) => void,
|
|
178
181
|
public readonly submitFn: (type: MessageType, contents: any, batch: boolean, appData: any) => number,
|
|
@@ -184,6 +187,7 @@ export class ContainerContext implements IContainerContext {
|
|
|
184
187
|
public readonly pendingLocalState?: unknown,
|
|
185
188
|
|
|
186
189
|
) {
|
|
190
|
+
this._quorum = quorum;
|
|
187
191
|
this.taggedLogger = container.subLogger;
|
|
188
192
|
this._fluidModuleP = new LazyPromise<IFluidModuleWithDetails>(
|
|
189
193
|
async () => this.loadCodeModule(_codeDetails),
|
|
@@ -191,8 +195,13 @@ export class ContainerContext implements IContainerContext {
|
|
|
191
195
|
this.attachListener();
|
|
192
196
|
}
|
|
193
197
|
|
|
198
|
+
/**
|
|
199
|
+
* @deprecated - Temporary migratory API, to be removed when customers no longer need it. When removed,
|
|
200
|
+
* ContainerContext should only take an IQuorumClients rather than an IQuorum. See IContainerContext for more
|
|
201
|
+
* details.
|
|
202
|
+
*/
|
|
194
203
|
public getSpecifiedCodeDetails(): IFluidCodeDetails | undefined {
|
|
195
|
-
return (this.
|
|
204
|
+
return (this._quorum.get("code") ?? this._quorum.get("code2")) as IFluidCodeDetails | undefined;
|
|
196
205
|
}
|
|
197
206
|
|
|
198
207
|
public dispose(error?: Error): void {
|
|
@@ -202,7 +211,7 @@ export class ContainerContext implements IContainerContext {
|
|
|
202
211
|
this._disposed = true;
|
|
203
212
|
|
|
204
213
|
this.runtime.dispose(error);
|
|
205
|
-
this.
|
|
214
|
+
this._quorum.dispose();
|
|
206
215
|
this.deltaManager.dispose();
|
|
207
216
|
}
|
|
208
217
|
|
|
@@ -66,7 +66,7 @@ export class ContainerStorageAdapter implements IDocumentStorageService {
|
|
|
66
66
|
return this.storageGetter().readBlob(id);
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
public async getVersions(versionId: string, count: number): Promise<IVersion[]> {
|
|
69
|
+
public async getVersions(versionId: string | null, count: number): Promise<IVersion[]> {
|
|
70
70
|
return this.storageGetter().getVersions(versionId, count);
|
|
71
71
|
}
|
|
72
72
|
|
package/src/deltaManager.ts
CHANGED
|
@@ -182,20 +182,6 @@ export class DeltaManager<TConnectionManager extends IConnectionManager>
|
|
|
182
182
|
public get readOnlyInfo() { return this.connectionManager.readOnlyInfo; }
|
|
183
183
|
public get clientDetails() { return this.connectionManager.clientDetails; }
|
|
184
184
|
|
|
185
|
-
/**
|
|
186
|
-
* Tells if container is in read-only mode.
|
|
187
|
-
* Data stores should listen for "readonly" notifications and disallow user
|
|
188
|
-
* making changes to data stores.
|
|
189
|
-
* Readonly state can be because of no storage write permission,
|
|
190
|
-
* or due to host forcing readonly mode for container.
|
|
191
|
-
* It is undefined if we have not yet established websocket connection
|
|
192
|
-
* and do not know if user has write access to a file.
|
|
193
|
-
* @deprecated - use readOnlyInfo
|
|
194
|
-
*/
|
|
195
|
-
public get readonly() {
|
|
196
|
-
return this.readOnlyInfo.readonly;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
185
|
public submit(type: MessageType, contents: any, batch = false, metadata?: any) {
|
|
200
186
|
// Start adding trace for the op.
|
|
201
187
|
const traces: ITrace[] = [
|
package/src/deltaManagerProxy.ts
CHANGED
|
@@ -129,10 +129,6 @@ export class DeltaManagerProxy
|
|
|
129
129
|
return this.deltaManager.active;
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
-
public get readonly(): boolean | undefined {
|
|
133
|
-
return this.deltaManager.readonly;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
132
|
public get readOnlyInfo(): ReadOnlyInfo {
|
|
137
133
|
return this.deltaManager.readOnlyInfo;
|
|
138
134
|
}
|
package/src/loader.ts
CHANGED
|
@@ -130,7 +130,7 @@ function createCachedResolver(resolver: IUrlResolver) {
|
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
export interface ILoaderOptions extends ILoaderOptions1{
|
|
133
|
-
summarizeProtocolTree?:
|
|
133
|
+
summarizeProtocolTree?: boolean,
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
/**
|
|
@@ -179,7 +179,7 @@ export interface ILoaderProps {
|
|
|
179
179
|
readonly urlResolver: IUrlResolver;
|
|
180
180
|
/**
|
|
181
181
|
* The document service factory take the Fluid url provided
|
|
182
|
-
* by the resolved url and
|
|
182
|
+
* by the resolved url and constructs all the necessary services
|
|
183
183
|
* for communication with the container's server.
|
|
184
184
|
*/
|
|
185
185
|
readonly documentServiceFactory: IDocumentServiceFactory;
|
|
@@ -235,7 +235,7 @@ export interface ILoaderServices {
|
|
|
235
235
|
readonly urlResolver: IUrlResolver;
|
|
236
236
|
/**
|
|
237
237
|
* The document service factory take the Fluid url provided
|
|
238
|
-
* by the resolved url and
|
|
238
|
+
* by the resolved url and constructs all the necessary services
|
|
239
239
|
* for communication with the container's server.
|
|
240
240
|
*/
|
|
241
241
|
readonly documentServiceFactory: IDocumentServiceFactory;
|
package/src/packageVersion.ts
CHANGED
|
@@ -55,7 +55,7 @@ export class RetriableDocumentStorageService implements IDocumentStorageService,
|
|
|
55
55
|
);
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
public async getVersions(versionId: string, count: number): Promise<IVersion[]> {
|
|
58
|
+
public async getVersions(versionId: string | null, count: number): Promise<IVersion[]> {
|
|
59
59
|
return this.runWithRetry(
|
|
60
60
|
async () => this.internalStorageService.getVersions(versionId, count),
|
|
61
61
|
"storage_getVersions",
|