@fluidframework/container-runtime 2.63.0 → 2.70.0-360753
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/container-runtime.test-files.tar +0 -0
- package/dist/blobManager/blobManager.d.ts +11 -11
- package/dist/blobManager/blobManager.d.ts.map +1 -1
- package/dist/blobManager/blobManager.js +16 -16
- package/dist/blobManager/blobManager.js.map +1 -1
- package/dist/blobManager/index.d.ts +1 -1
- package/dist/blobManager/index.d.ts.map +1 -1
- package/dist/blobManager/index.js.map +1 -1
- package/dist/containerRuntime.d.ts +40 -25
- package/dist/containerRuntime.d.ts.map +1 -1
- package/dist/containerRuntime.js +24 -16
- package/dist/containerRuntime.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/lib/blobManager/blobManager.d.ts +11 -11
- package/lib/blobManager/blobManager.d.ts.map +1 -1
- package/lib/blobManager/blobManager.js +16 -16
- package/lib/blobManager/blobManager.js.map +1 -1
- package/lib/blobManager/index.d.ts +1 -1
- package/lib/blobManager/index.d.ts.map +1 -1
- package/lib/blobManager/index.js.map +1 -1
- package/lib/containerRuntime.d.ts +40 -25
- package/lib/containerRuntime.d.ts.map +1 -1
- package/lib/containerRuntime.js +24 -16
- package/lib/containerRuntime.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/package.json +19 -38
- package/src/blobManager/blobManager.ts +27 -27
- package/src/blobManager/index.ts +1 -0
- package/src/containerRuntime.ts +55 -32
- package/src/packageVersion.ts +1 -1
package/lib/packageVersion.d.ts
CHANGED
|
@@ -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-runtime";
|
|
8
|
-
export declare const pkgVersion = "2.
|
|
8
|
+
export declare const pkgVersion = "2.70.0-360753";
|
|
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,sCAAsC,CAAC;AAC3D,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"packageVersion.d.ts","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,OAAO,sCAAsC,CAAC;AAC3D,eAAO,MAAM,UAAU,kBAAkB,CAAC"}
|
package/lib/packageVersion.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,mCAAmC,CAAC;AAC3D,MAAM,CAAC,MAAM,UAAU,GAAG,
|
|
1
|
+
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,mCAAmC,CAAC;AAC3D,MAAM,CAAC,MAAM,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-runtime\";\nexport const pkgVersion = \"2.70.0-360753\";\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/container-runtime",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.70.0-360753",
|
|
4
4
|
"description": "Fluid container runtime",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -119,18 +119,18 @@
|
|
|
119
119
|
"temp-directory": "nyc/.nyc_output"
|
|
120
120
|
},
|
|
121
121
|
"dependencies": {
|
|
122
|
-
"@fluid-internal/client-utils": "
|
|
123
|
-
"@fluidframework/container-definitions": "
|
|
124
|
-
"@fluidframework/container-runtime-definitions": "
|
|
125
|
-
"@fluidframework/core-interfaces": "
|
|
126
|
-
"@fluidframework/core-utils": "
|
|
127
|
-
"@fluidframework/datastore": "
|
|
128
|
-
"@fluidframework/driver-definitions": "
|
|
129
|
-
"@fluidframework/driver-utils": "
|
|
130
|
-
"@fluidframework/id-compressor": "
|
|
131
|
-
"@fluidframework/runtime-definitions": "
|
|
132
|
-
"@fluidframework/runtime-utils": "
|
|
133
|
-
"@fluidframework/telemetry-utils": "
|
|
122
|
+
"@fluid-internal/client-utils": "2.70.0-360753",
|
|
123
|
+
"@fluidframework/container-definitions": "2.70.0-360753",
|
|
124
|
+
"@fluidframework/container-runtime-definitions": "2.70.0-360753",
|
|
125
|
+
"@fluidframework/core-interfaces": "2.70.0-360753",
|
|
126
|
+
"@fluidframework/core-utils": "2.70.0-360753",
|
|
127
|
+
"@fluidframework/datastore": "2.70.0-360753",
|
|
128
|
+
"@fluidframework/driver-definitions": "2.70.0-360753",
|
|
129
|
+
"@fluidframework/driver-utils": "2.70.0-360753",
|
|
130
|
+
"@fluidframework/id-compressor": "2.70.0-360753",
|
|
131
|
+
"@fluidframework/runtime-definitions": "2.70.0-360753",
|
|
132
|
+
"@fluidframework/runtime-utils": "2.70.0-360753",
|
|
133
|
+
"@fluidframework/telemetry-utils": "2.70.0-360753",
|
|
134
134
|
"@tylerbu/sorted-btree-es6": "^1.8.0",
|
|
135
135
|
"double-ended-queue": "^2.1.0-0",
|
|
136
136
|
"lz4js": "^0.2.0",
|
|
@@ -140,16 +140,16 @@
|
|
|
140
140
|
"devDependencies": {
|
|
141
141
|
"@arethetypeswrong/cli": "^0.17.1",
|
|
142
142
|
"@biomejs/biome": "~1.9.3",
|
|
143
|
-
"@fluid-internal/mocha-test-setup": "
|
|
144
|
-
"@fluid-private/stochastic-test-utils": "
|
|
145
|
-
"@fluid-private/test-pairwise-generator": "
|
|
143
|
+
"@fluid-internal/mocha-test-setup": "2.70.0-360753",
|
|
144
|
+
"@fluid-private/stochastic-test-utils": "2.70.0-360753",
|
|
145
|
+
"@fluid-private/test-pairwise-generator": "2.70.0-360753",
|
|
146
146
|
"@fluid-tools/benchmark": "^0.51.0",
|
|
147
147
|
"@fluid-tools/build-cli": "^0.58.3",
|
|
148
148
|
"@fluidframework/build-common": "^2.0.3",
|
|
149
149
|
"@fluidframework/build-tools": "^0.58.3",
|
|
150
|
-
"@fluidframework/container-runtime-previous": "npm:@fluidframework/container-runtime@2.
|
|
150
|
+
"@fluidframework/container-runtime-previous": "npm:@fluidframework/container-runtime@2.63.0",
|
|
151
151
|
"@fluidframework/eslint-config-fluid": "^6.0.0",
|
|
152
|
-
"@fluidframework/test-runtime-utils": "
|
|
152
|
+
"@fluidframework/test-runtime-utils": "2.70.0-360753",
|
|
153
153
|
"@microsoft/api-extractor": "7.52.11",
|
|
154
154
|
"@types/double-ended-queue": "^2.1.0",
|
|
155
155
|
"@types/lz4js": "^0.2.0",
|
|
@@ -168,26 +168,7 @@
|
|
|
168
168
|
"typescript": "~5.4.5"
|
|
169
169
|
},
|
|
170
170
|
"typeValidation": {
|
|
171
|
-
"broken": {
|
|
172
|
-
"Interface_ContainerRuntimeOptions": {
|
|
173
|
-
"backCompat": false
|
|
174
|
-
},
|
|
175
|
-
"Interface_ISummaryRuntimeOptions": {
|
|
176
|
-
"backCompat": false
|
|
177
|
-
},
|
|
178
|
-
"Interface_LoadContainerRuntimeParams": {
|
|
179
|
-
"backCompat": false
|
|
180
|
-
},
|
|
181
|
-
"TypeAlias_IContainerRuntimeOptions": {
|
|
182
|
-
"backCompat": false
|
|
183
|
-
},
|
|
184
|
-
"TypeAlias_ISummaryConfiguration": {
|
|
185
|
-
"backCompat": false
|
|
186
|
-
},
|
|
187
|
-
"Variable_DefaultSummaryConfiguration": {
|
|
188
|
-
"backCompat": false
|
|
189
|
-
}
|
|
190
|
-
},
|
|
171
|
+
"broken": {},
|
|
191
172
|
"entrypoint": "legacy"
|
|
192
173
|
},
|
|
193
174
|
"scripts": {
|
|
@@ -168,7 +168,7 @@ interface UploadedBlob {
|
|
|
168
168
|
|
|
169
169
|
/**
|
|
170
170
|
* A blob tracked by BlobManager that has been uploaded to storage and is in the process of sending
|
|
171
|
-
* a BlobAttach
|
|
171
|
+
* a BlobAttach message and waiting for the ack.
|
|
172
172
|
*/
|
|
173
173
|
interface AttachingBlob {
|
|
174
174
|
state: "attaching";
|
|
@@ -179,7 +179,7 @@ interface AttachingBlob {
|
|
|
179
179
|
}
|
|
180
180
|
|
|
181
181
|
/**
|
|
182
|
-
* A blob tracked by BlobManager that has been uploaded to storage and its BlobAttach
|
|
182
|
+
* A blob tracked by BlobManager that has been uploaded to storage and its BlobAttach message has been
|
|
183
183
|
* ack'd. It is fully shared and available to all clients, and is no longer considered pending.
|
|
184
184
|
*/
|
|
185
185
|
interface AttachedBlob {
|
|
@@ -205,7 +205,7 @@ type LocalBlobRecord =
|
|
|
205
205
|
* Omits attached blobs since they are fully uploaded and don't need to be saved and restored.
|
|
206
206
|
* Omits uploading and attaching states since upon restore we will need to restart those processes.
|
|
207
207
|
*/
|
|
208
|
-
type SerializableLocalBlobRecord =
|
|
208
|
+
export type SerializableLocalBlobRecord =
|
|
209
209
|
| (Omit<LocalOnlyBlob, "blob"> & { blob: string })
|
|
210
210
|
| (Omit<UploadedBlob, "blob"> & { blob: string });
|
|
211
211
|
|
|
@@ -259,7 +259,7 @@ export class BlobManager {
|
|
|
259
259
|
*/
|
|
260
260
|
private readonly pendingOnlyLocalIds: Set<string> = new Set();
|
|
261
261
|
|
|
262
|
-
private readonly
|
|
262
|
+
private readonly sendBlobAttachMessage: (localId: string, storageId: string) => void;
|
|
263
263
|
|
|
264
264
|
private readonly routeContext: IFluidHandleContext;
|
|
265
265
|
private readonly storage: Pick<IContainerStorageService, "createBlob" | "readBlob">;
|
|
@@ -280,16 +280,16 @@ export class BlobManager {
|
|
|
280
280
|
blobManagerLoadInfo: IBlobManagerLoadInfo;
|
|
281
281
|
readonly storage: Pick<IContainerStorageService, "createBlob" | "readBlob">;
|
|
282
282
|
/**
|
|
283
|
-
* Submit a BlobAttach
|
|
284
|
-
* deleted. The BlobAttach
|
|
283
|
+
* Submit a BlobAttach message. When a blob is uploaded, there is a short grace period before which the blob is
|
|
284
|
+
* deleted. The BlobAttach message notifies the server that blob is in use. The server will then not delete the
|
|
285
285
|
* the blob as long as it is listed as referenced in future summaries. The summarizing client will know to
|
|
286
|
-
* include the storage ID in the summary when it sees the
|
|
286
|
+
* include the storage ID in the summary when it sees the message.
|
|
287
287
|
*
|
|
288
|
-
* The
|
|
289
|
-
* knowledge of which they cannot request the blob from storage. It's important that this
|
|
290
|
-
* before any
|
|
288
|
+
* The message will also include a local ID to inform all clients of the relation to the storage ID, without
|
|
289
|
+
* knowledge of which they cannot request the blob from storage. It's important that this message is sequenced
|
|
290
|
+
* before any messages that reference the local ID, otherwise, an invalid handle could be added to the document.
|
|
291
291
|
*/
|
|
292
|
-
|
|
292
|
+
sendBlobAttachMessage: (localId: string, storageId: string) => void;
|
|
293
293
|
// Called when a blob node is requested. blobPath is the path of the blob's node in GC's graph.
|
|
294
294
|
// blobPath's format - `/<basePath>/<localId>`.
|
|
295
295
|
readonly blobRequested: (blobPath: string) => void;
|
|
@@ -305,7 +305,7 @@ export class BlobManager {
|
|
|
305
305
|
routeContext,
|
|
306
306
|
blobManagerLoadInfo,
|
|
307
307
|
storage,
|
|
308
|
-
|
|
308
|
+
sendBlobAttachMessage,
|
|
309
309
|
blobRequested,
|
|
310
310
|
isBlobDeleted,
|
|
311
311
|
runtime,
|
|
@@ -315,7 +315,7 @@ export class BlobManager {
|
|
|
315
315
|
} = props;
|
|
316
316
|
this.routeContext = routeContext;
|
|
317
317
|
this.storage = storage;
|
|
318
|
-
this.
|
|
318
|
+
this.sendBlobAttachMessage = sendBlobAttachMessage;
|
|
319
319
|
this.blobRequested = blobRequested;
|
|
320
320
|
this.isBlobDeleted = isBlobDeleted;
|
|
321
321
|
this.runtime = runtime;
|
|
@@ -404,7 +404,7 @@ export class BlobManager {
|
|
|
404
404
|
// Handles for detached blobs are not payload pending, though they should also always be present
|
|
405
405
|
// in the localBlobCache and therefore should never need to refer to storage.
|
|
406
406
|
assert(payloadPending, 0x11f /* "requesting unknown blobs" */);
|
|
407
|
-
// If we didn't find it in the redirectTable and it's payloadPending, assume the attach
|
|
407
|
+
// If we didn't find it in the redirectTable and it's payloadPending, assume the attach message is coming
|
|
408
408
|
// eventually and wait. We do this even if the local client doesn't have the blob payloadPending flag
|
|
409
409
|
// enabled, in case a remote client does have it enabled. This wait may be infinite if the uploading
|
|
410
410
|
// client failed the upload and doesn't exist anymore.
|
|
@@ -559,7 +559,7 @@ export class BlobManager {
|
|
|
559
559
|
* rejects on error during upload or if the signal is aborted.
|
|
560
560
|
*
|
|
561
561
|
* Most of the time this should be expected to exit in uploaded state, but if we are loading from pending
|
|
562
|
-
* state we may see an attach
|
|
562
|
+
* state we may see an attach message from the client that generated the pending state, which can complete the
|
|
563
563
|
* attach while the upload is outstanding.
|
|
564
564
|
*/
|
|
565
565
|
const ensureUploaded = async (): Promise<void> => {
|
|
@@ -640,7 +640,7 @@ export class BlobManager {
|
|
|
640
640
|
const localBlobRecord = this.localBlobCache.get(localId);
|
|
641
641
|
if (localBlobRecord?.state === "attached") {
|
|
642
642
|
// In normal creation flows, the blob will be in uploaded state here. But if we are loading from pending
|
|
643
|
-
// state and see an attach
|
|
643
|
+
// state and see an attach message from the client that generated the pending state, we may have reached
|
|
644
644
|
// attached state in the middle of the upload attempt. In that case there's no more work to do and we
|
|
645
645
|
// can just return.
|
|
646
646
|
return true;
|
|
@@ -678,7 +678,7 @@ export class BlobManager {
|
|
|
678
678
|
resolve(true);
|
|
679
679
|
}
|
|
680
680
|
};
|
|
681
|
-
// Although we already checked for TTL expiry above, the
|
|
681
|
+
// Although we already checked for TTL expiry above, the message we're about to send may later be asked
|
|
682
682
|
// to resubmit. Before we resubmit, we check again for TTL expiry - this listener is how we learn if
|
|
683
683
|
// we discovered expiry in the resubmit flow.
|
|
684
684
|
const onBlobExpired = (_localId: string): void => {
|
|
@@ -702,7 +702,7 @@ export class BlobManager {
|
|
|
702
702
|
this.internalEvents.on("processedBlobAttach", onProcessedBlobAttach);
|
|
703
703
|
this.internalEvents.on("blobExpired", onBlobExpired);
|
|
704
704
|
signal?.addEventListener("abort", onSignalAbort);
|
|
705
|
-
this.
|
|
705
|
+
this.sendBlobAttachMessage(localId, localBlobRecord.storageId);
|
|
706
706
|
});
|
|
707
707
|
}
|
|
708
708
|
};
|
|
@@ -721,16 +721,16 @@ export class BlobManager {
|
|
|
721
721
|
};
|
|
722
722
|
|
|
723
723
|
/**
|
|
724
|
-
* Resubmit a BlobAttach op. Used to add storage IDs to
|
|
724
|
+
* Resubmit a BlobAttach op. Used to add storage IDs to messages that were
|
|
725
725
|
* submitted to runtime while disconnected.
|
|
726
|
-
* @param metadata -
|
|
726
|
+
* @param metadata - message metadata containing storage and/or local IDs
|
|
727
727
|
*/
|
|
728
728
|
public reSubmit(metadata: Record<string, unknown> | undefined): void {
|
|
729
729
|
assert(isBlobMetadata(metadata), 0xc01 /* Expected blob metadata for a BlobAttach op */);
|
|
730
730
|
const { localId, blobId: storageId } = metadata;
|
|
731
731
|
// Any blob that we're actively trying to advance to attached state must be in attaching state.
|
|
732
732
|
// Decline to resubmit for anything else.
|
|
733
|
-
// For example, we might be asked to resubmit stashed
|
|
733
|
+
// For example, we might be asked to resubmit stashed messages for blobs that never had their handle
|
|
734
734
|
// attached - these won't have a localBlobCache entry because we filter them out when generating
|
|
735
735
|
// pending state. We shouldn't try to attach them since they won't be accessible to the customer
|
|
736
736
|
// and would just be considered garbage immediately.
|
|
@@ -742,7 +742,7 @@ export class BlobManager {
|
|
|
742
742
|
this.localBlobCache.set(localId, { state: "localOnly", blob: localBlobRecord.blob });
|
|
743
743
|
this.internalEvents.emit("blobExpired", localId);
|
|
744
744
|
} else {
|
|
745
|
-
this.
|
|
745
|
+
this.sendBlobAttachMessage(localId, storageId);
|
|
746
746
|
}
|
|
747
747
|
}
|
|
748
748
|
}
|
|
@@ -759,9 +759,9 @@ export class BlobManager {
|
|
|
759
759
|
state: "attached",
|
|
760
760
|
blob: maybeLocalBlobRecord.blob,
|
|
761
761
|
};
|
|
762
|
-
// Processing a blob attach
|
|
762
|
+
// Processing a blob attach message is authoritative and may stomp on any existing state. Other
|
|
763
763
|
// callsites that update localBlobCache entries must take proper caution to handle the case
|
|
764
|
-
// that a blob attach
|
|
764
|
+
// that a blob attach message is processed concurrently.
|
|
765
765
|
this.localBlobCache.set(localId, attachedBlobRecord);
|
|
766
766
|
// Note there may or may not be an entry in pendingBlobsWithAttachedHandles for this localId,
|
|
767
767
|
// in particular for the non-payloadPending case since we should be reaching this point
|
|
@@ -824,7 +824,7 @@ export class BlobManager {
|
|
|
824
824
|
const localId = getLocalIdFromGCNodePath(route);
|
|
825
825
|
// If the blob hasn't already been deleted, log an error because this should never happen.
|
|
826
826
|
// If the blob has already been deleted, log a telemetry event. This can happen because multiple GC
|
|
827
|
-
// sweep
|
|
827
|
+
// sweep messages can contain the same data store. It would be interesting to track how often this happens.
|
|
828
828
|
const alreadyDeleted = this.isBlobDeleted(route);
|
|
829
829
|
const storageId = this.redirectTable.get(localId);
|
|
830
830
|
if (storageId === undefined) {
|
|
@@ -947,8 +947,8 @@ export class BlobManager {
|
|
|
947
947
|
// We downgrade uploading blobs to localOnly, and attaching blobs to uploaded. In the case of
|
|
948
948
|
// uploading blobs, we don't have a way to retrieve the eventual storageId so the upload will
|
|
949
949
|
// need to be restarted anyway. In the case of attaching blobs, we can't know whether the
|
|
950
|
-
// BlobAttach
|
|
951
|
-
// remain prepared to handle seeing the ack of the original
|
|
950
|
+
// BlobAttach message will eventually be ack'd. So we assume we'll need to send another message, but also
|
|
951
|
+
// remain prepared to handle seeing the ack of the original message after loading from pending state.
|
|
952
952
|
pendingBlobs[localId] =
|
|
953
953
|
localBlobRecord.state === "localOnly" || localBlobRecord.state === "uploading"
|
|
954
954
|
? {
|
package/src/blobManager/index.ts
CHANGED
package/src/containerRuntime.ts
CHANGED
|
@@ -730,7 +730,9 @@ export interface LoadContainerRuntimeParams {
|
|
|
730
730
|
*/
|
|
731
731
|
existing: boolean;
|
|
732
732
|
/**
|
|
733
|
-
* Additional options to be passed to the runtime
|
|
733
|
+
* Additional options to be passed to the runtime.
|
|
734
|
+
* @remarks
|
|
735
|
+
* Defaults to `{}`.
|
|
734
736
|
*/
|
|
735
737
|
runtimeOptions?: IContainerRuntimeOptions;
|
|
736
738
|
/**
|
|
@@ -829,37 +831,60 @@ export class ContainerRuntime
|
|
|
829
831
|
{
|
|
830
832
|
/**
|
|
831
833
|
* Load the stores from a snapshot and returns the runtime.
|
|
832
|
-
* @param params - An object housing the runtime properties
|
|
833
|
-
*
|
|
834
|
-
*
|
|
835
|
-
*
|
|
836
|
-
*
|
|
837
|
-
*
|
|
838
|
-
*
|
|
839
|
-
*
|
|
840
|
-
*
|
|
841
|
-
*
|
|
842
|
-
* - provideEntryPoint - Promise that resolves to an object which will act as entryPoint for the Container.
|
|
843
|
-
* - minVersionForCollab - Minimum version of the FF runtime that this runtime supports collaboration with.
|
|
844
|
-
* This object should provide all the functionality that the Container is expected to provide to the loader layer.
|
|
834
|
+
* @param params - An object housing the runtime properties.
|
|
835
|
+
* {@link LoadContainerRuntimeParams} except internal, while still having layer compat obligations.
|
|
836
|
+
* @privateRemarks
|
|
837
|
+
* Despite this being `@internal`, `@fluidframework/test-utils` uses it in `createTestContainerRuntimeFactory` and assumes multiple versions of the package expose the same API.
|
|
838
|
+
*
|
|
839
|
+
* Also note that `mixinAttributor` from `@fluid-experimental/attributor` overrides this function:
|
|
840
|
+
* that will have to be updated if changing the signature of this function as well.
|
|
841
|
+
*
|
|
842
|
+
* Assuming these usages are updated appropriately,
|
|
843
|
+
* `loadRuntime` could be removed (replaced by `loadRuntime2` which could be renamed back to `loadRuntime`).
|
|
845
844
|
*/
|
|
846
|
-
public static async loadRuntime(
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
845
|
+
public static async loadRuntime(
|
|
846
|
+
params: LoadContainerRuntimeParams & {
|
|
847
|
+
/**
|
|
848
|
+
* Constructor to use to create the ContainerRuntime instance.
|
|
849
|
+
* @remarks
|
|
850
|
+
* Defaults to {@link ContainerRuntime}.
|
|
851
|
+
*/
|
|
852
|
+
containerRuntimeCtor?: typeof ContainerRuntime;
|
|
853
|
+
},
|
|
854
|
+
): Promise<ContainerRuntime> {
|
|
855
|
+
return ContainerRuntime.loadRuntime2({
|
|
856
|
+
...params,
|
|
857
|
+
registry: new FluidDataStoreRegistry(params.registryEntries),
|
|
858
|
+
});
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
/**
|
|
862
|
+
* Load the stores from a snapshot and returns the runtime.
|
|
863
|
+
* @remarks
|
|
864
|
+
* Same as {@link ContainerRuntime.loadRuntime},
|
|
865
|
+
* but with `registry` instead of `registryEntries` and more `runtimeOptions`.
|
|
866
|
+
*/
|
|
867
|
+
public static async loadRuntime2(
|
|
868
|
+
params: Omit<LoadContainerRuntimeParams, "registryEntries" | "runtimeOptions"> & {
|
|
869
|
+
/**
|
|
870
|
+
* Mapping from data store types to their corresponding factories.
|
|
871
|
+
*/
|
|
872
|
+
registry: IFluidDataStoreRegistry;
|
|
873
|
+
/**
|
|
874
|
+
* Constructor to use to create the ContainerRuntime instance.
|
|
875
|
+
* @remarks
|
|
876
|
+
* Defaults to {@link ContainerRuntime}.
|
|
877
|
+
*/
|
|
878
|
+
containerRuntimeCtor?: typeof ContainerRuntime;
|
|
879
|
+
/**
|
|
880
|
+
* {@link LoadContainerRuntimeParams.runtimeOptions}, except with additional internal only options.
|
|
881
|
+
*/
|
|
882
|
+
runtimeOptions?: IContainerRuntimeOptionsInternal;
|
|
883
|
+
},
|
|
884
|
+
): Promise<ContainerRuntime> {
|
|
860
885
|
const {
|
|
861
886
|
context,
|
|
862
|
-
|
|
887
|
+
registry,
|
|
863
888
|
existing,
|
|
864
889
|
requestHandler,
|
|
865
890
|
provideEntryPoint,
|
|
@@ -959,8 +984,6 @@ export class ContainerRuntime
|
|
|
959
984
|
? runtimeOptions.enableRuntimeIdCompressor
|
|
960
985
|
: defaultConfigs.enableRuntimeIdCompressor;
|
|
961
986
|
|
|
962
|
-
const registry = new FluidDataStoreRegistry(registryEntries);
|
|
963
|
-
|
|
964
987
|
const tryFetchBlob = async <T>(blobName: string): Promise<T | undefined> => {
|
|
965
988
|
const blobId = context.baseSnapshot?.blobs[blobName];
|
|
966
989
|
if (context.baseSnapshot !== undefined && blobId !== undefined) {
|
|
@@ -1916,7 +1939,7 @@ export class ContainerRuntime
|
|
|
1916
1939
|
routeContext: this.handleContext,
|
|
1917
1940
|
blobManagerLoadInfo,
|
|
1918
1941
|
storage: this.storage,
|
|
1919
|
-
|
|
1942
|
+
sendBlobAttachMessage: (localId: string, blobId: string) => {
|
|
1920
1943
|
if (!this.disposed) {
|
|
1921
1944
|
this.submit(
|
|
1922
1945
|
{ type: ContainerMessageType.BlobAttach, contents: undefined },
|
package/src/packageVersion.ts
CHANGED