@fluidframework/container-runtime 2.70.0-360374 → 2.70.0-361092
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/api-report/container-runtime.legacy.beta.api.md +0 -3
- 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/index.d.ts +0 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/legacy.d.ts +0 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/summary/orderedClientElection.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/index.d.ts +0 -5
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/legacy.d.ts +0 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/summary/orderedClientElection.js.map +1 -1
- package/package.json +23 -37
- package/src/blobManager/blobManager.ts +27 -27
- package/src/blobManager/index.ts +1 -0
- package/src/containerRuntime.ts +55 -32
- package/src/index.ts +0 -6
- package/src/packageVersion.ts +1 -1
- package/src/summary/orderedClientElection.ts +1 -1
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/index.ts
CHANGED
|
@@ -20,12 +20,6 @@ export {
|
|
|
20
20
|
} from "./containerRuntime.js";
|
|
21
21
|
export type { ICompressionRuntimeOptions } from "./compressionDefinitions.js";
|
|
22
22
|
export { CompressionAlgorithms, disabledCompressionConfig } from "./compressionDefinitions.js";
|
|
23
|
-
export type {
|
|
24
|
-
/**
|
|
25
|
-
* @deprecated Import from `@fluidframework/runtime-definitions/legacy` instead.
|
|
26
|
-
*/
|
|
27
|
-
MinimumVersionForCollab,
|
|
28
|
-
} from "@fluidframework/runtime-definitions/internal";
|
|
29
23
|
export {
|
|
30
24
|
ContainerMessageType,
|
|
31
25
|
type UnknownContainerRuntimeMessage,
|
package/src/packageVersion.ts
CHANGED
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
import { summarizerClientType } from "./summarizerTypes.js";
|
|
28
28
|
|
|
29
29
|
// helper types for recursive readonly.
|
|
30
|
-
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
30
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type, @typescript-eslint/ban-types
|
|
31
31
|
export type ImmutablePrimitives = undefined | null | boolean | string | number | Function;
|
|
32
32
|
export type Immutable<T> = T extends ImmutablePrimitives
|
|
33
33
|
? T
|