@fluidframework/container-loader 2.0.0-rc.3.0.8 → 2.0.0-rc.3.0.9
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/dist/container.d.ts.map +1 -1
- package/dist/container.js +8 -4
- package/dist/container.js.map +1 -1
- package/dist/memoryBlobStorage.d.ts +2 -2
- package/dist/memoryBlobStorage.d.ts.map +1 -1
- package/dist/memoryBlobStorage.js +3 -1
- package/dist/memoryBlobStorage.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/lib/container.d.ts.map +1 -1
- package/lib/container.js +8 -4
- package/lib/container.js.map +1 -1
- package/lib/memoryBlobStorage.d.ts +2 -2
- package/lib/memoryBlobStorage.d.ts.map +1 -1
- package/lib/memoryBlobStorage.js +3 -1
- package/lib/memoryBlobStorage.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/package.json +10 -10
- package/src/container.ts +11 -5
- package/src/memoryBlobStorage.ts +8 -4
- package/src/packageVersion.ts +1 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
import type { IDetachedBlobStorage } from "./loader.js";
|
|
6
|
-
export declare function serializeMemoryDetachedBlobStorage(detachedStorage: IDetachedBlobStorage): string | undefined;
|
|
7
|
-
export declare function tryInitializeMemoryDetachedBlobStorage(detachedStorage: IDetachedBlobStorage, attachmentBlobs: string): void;
|
|
6
|
+
export declare function serializeMemoryDetachedBlobStorage(detachedStorage: IDetachedBlobStorage | undefined): string | undefined;
|
|
7
|
+
export declare function tryInitializeMemoryDetachedBlobStorage(detachedStorage: IDetachedBlobStorage | undefined, attachmentBlobs: string): void;
|
|
8
8
|
export declare function createMemoryDetachedBlobStorage(): IDetachedBlobStorage;
|
|
9
9
|
//# sourceMappingURL=memoryBlobStorage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memoryBlobStorage.d.ts","sourceRoot":"","sources":["../src/memoryBlobStorage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAsBxD,wBAAgB,kCAAkC,CAEjD,eAAe,EAAE,oBAAoB,
|
|
1
|
+
{"version":3,"file":"memoryBlobStorage.d.ts","sourceRoot":"","sources":["../src/memoryBlobStorage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAsBxD,wBAAgB,kCAAkC,CAEjD,eAAe,EAAE,oBAAoB,GAAG,SAAS,GAC/C,MAAM,GAAG,SAAS,CAQpB;AAED,wBAAgB,sCAAsC,CAErD,eAAe,EAAE,oBAAoB,GAAG,SAAS,EACjD,eAAe,EAAE,MAAM,QAavB;AAGD,wBAAgB,+BAA+B,IAAI,oBAAoB,CAmBtE"}
|
package/lib/memoryBlobStorage.js
CHANGED
|
@@ -15,7 +15,9 @@ detachedStorage) {
|
|
|
15
15
|
export function serializeMemoryDetachedBlobStorage(
|
|
16
16
|
// eslint-disable-next-line import/no-deprecated
|
|
17
17
|
detachedStorage) {
|
|
18
|
-
if (detachedStorage
|
|
18
|
+
if (detachedStorage !== undefined &&
|
|
19
|
+
detachedStorage.size > 0 &&
|
|
20
|
+
isMemoryDetachedBlobStorage(detachedStorage)) {
|
|
19
21
|
return detachedStorage.serialize();
|
|
20
22
|
}
|
|
21
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memoryBlobStorage.js","sourceRoot":"","sources":["../src/memoryBlobStorage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9E,OAAO,EAAE,MAAM,EAAE,QAAQ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n */\n\nimport type { ICreateBlobResponse } from \"@fluidframework/protocol-definitions\";\nimport { bufferToString, stringToBuffer } from \"@fluid-internal/client-utils\";\nimport { assert, isObject } from \"@fluidframework/core-utils/internal\";\n// eslint-disable-next-line import/no-deprecated\nimport type { IDetachedBlobStorage } from \"./loader.js\";\n\nconst MemoryDetachedBlobStorageIdentifier = Symbol();\n\n// eslint-disable-next-line import/no-deprecated\ninterface MemoryDetachedBlobStorage extends IDetachedBlobStorage {\n\t[MemoryDetachedBlobStorageIdentifier]: typeof MemoryDetachedBlobStorageIdentifier;\n\tinitialize(attachmentBlobs: string[]): void;\n\tserialize(): string | undefined;\n}\n\nfunction isMemoryDetachedBlobStorage(\n\t// eslint-disable-next-line import/no-deprecated\n\tdetachedStorage: IDetachedBlobStorage | undefined,\n): detachedStorage is MemoryDetachedBlobStorage {\n\treturn (\n\t\tisObject(detachedStorage) &&\n\t\tMemoryDetachedBlobStorageIdentifier in detachedStorage &&\n\t\tdetachedStorage[MemoryDetachedBlobStorageIdentifier] === MemoryDetachedBlobStorageIdentifier\n\t);\n}\n\nexport function serializeMemoryDetachedBlobStorage(\n\t// eslint-disable-next-line import/no-deprecated\n\tdetachedStorage: IDetachedBlobStorage | undefined,\n): string | undefined {\n\tif (\n\t\tdetachedStorage !== undefined &&\n\t\tdetachedStorage.size > 0 &&\n\t\tisMemoryDetachedBlobStorage(detachedStorage)\n\t) {\n\t\treturn detachedStorage.serialize();\n\t}\n}\n\nexport function tryInitializeMemoryDetachedBlobStorage(\n\t// eslint-disable-next-line import/no-deprecated\n\tdetachedStorage: IDetachedBlobStorage | undefined,\n\tattachmentBlobs: string,\n) {\n\tif (!isMemoryDetachedBlobStorage(detachedStorage)) {\n\t\tthrow new Error(\n\t\t\t\"DetachedBlobStorage was not provided to the loader during serialize so cannot be provided during rehydrate.\",\n\t\t);\n\t}\n\n\tassert(detachedStorage.size === 0, \"Blob storage already initialized\");\n\tconst maybeAttachmentBlobs = JSON.parse(attachmentBlobs);\n\tassert(Array.isArray(maybeAttachmentBlobs), \"Invalid attachmentBlobs\");\n\n\tdetachedStorage.initialize(maybeAttachmentBlobs);\n}\n\n// eslint-disable-next-line import/no-deprecated\nexport function createMemoryDetachedBlobStorage(): IDetachedBlobStorage {\n\tconst blobs: ArrayBufferLike[] = [];\n\tconst storage: MemoryDetachedBlobStorage = {\n\t\t[MemoryDetachedBlobStorageIdentifier]: MemoryDetachedBlobStorageIdentifier,\n\t\tcreateBlob: async (file: ArrayBufferLike): Promise<ICreateBlobResponse> => ({\n\t\t\tid: `${blobs.push(file) - 1}`,\n\t\t}),\n\t\treadBlob: async (id: string): Promise<ArrayBufferLike> =>\n\t\t\tblobs[Number(id)] ?? Promise.reject(new Error(`Blob not found: ${id}`)),\n\t\tget size() {\n\t\t\treturn blobs.length;\n\t\t},\n\t\tgetBlobIds: (): string[] => blobs.map((_, i) => `${i}`),\n\t\tdispose: () => blobs.splice(0),\n\t\tserialize: () => JSON.stringify(blobs.map((b) => bufferToString(b, \"utf-8\"))),\n\t\tinitialize: (attachmentBlobs: string[]) =>\n\t\t\tblobs.push(...attachmentBlobs.map((maybeBlob) => stringToBuffer(maybeBlob, \"utf-8\"))),\n\t};\n\treturn storage;\n}\n"]}
|
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-loader";
|
|
8
|
-
export declare const pkgVersion = "2.0.0-rc.3.0.
|
|
8
|
+
export declare const pkgVersion = "2.0.0-rc.3.0.9";
|
|
9
9
|
//# sourceMappingURL=packageVersion.d.ts.map
|
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,kCAAkC,CAAC;AAC1D,MAAM,CAAC,MAAM,UAAU,GAAG,gBAAgB,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.0.0-rc.3.0.
|
|
1
|
+
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,kCAAkC,CAAC;AAC1D,MAAM,CAAC,MAAM,UAAU,GAAG,gBAAgB,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.0.0-rc.3.0.9\";\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/container-loader",
|
|
3
|
-
"version": "2.0.0-rc.3.0.
|
|
3
|
+
"version": "2.0.0-rc.3.0.9",
|
|
4
4
|
"description": "Fluid container loader",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -117,15 +117,15 @@
|
|
|
117
117
|
"temp-directory": "nyc/.nyc_output"
|
|
118
118
|
},
|
|
119
119
|
"dependencies": {
|
|
120
|
-
"@fluid-internal/client-utils": ">=2.0.0-rc.3.0.
|
|
121
|
-
"@fluidframework/container-definitions": ">=2.0.0-rc.3.0.
|
|
122
|
-
"@fluidframework/core-interfaces": ">=2.0.0-rc.3.0.
|
|
123
|
-
"@fluidframework/core-utils": ">=2.0.0-rc.3.0.
|
|
124
|
-
"@fluidframework/driver-definitions": ">=2.0.0-rc.3.0.
|
|
125
|
-
"@fluidframework/driver-utils": ">=2.0.0-rc.3.0.
|
|
120
|
+
"@fluid-internal/client-utils": ">=2.0.0-rc.3.0.9 <2.0.0-rc.3.1.0",
|
|
121
|
+
"@fluidframework/container-definitions": ">=2.0.0-rc.3.0.9 <2.0.0-rc.3.1.0",
|
|
122
|
+
"@fluidframework/core-interfaces": ">=2.0.0-rc.3.0.9 <2.0.0-rc.3.1.0",
|
|
123
|
+
"@fluidframework/core-utils": ">=2.0.0-rc.3.0.9 <2.0.0-rc.3.1.0",
|
|
124
|
+
"@fluidframework/driver-definitions": ">=2.0.0-rc.3.0.9 <2.0.0-rc.3.1.0",
|
|
125
|
+
"@fluidframework/driver-utils": ">=2.0.0-rc.3.0.9 <2.0.0-rc.3.1.0",
|
|
126
126
|
"@fluidframework/protocol-base": "^4.0.0",
|
|
127
127
|
"@fluidframework/protocol-definitions": "^3.2.0",
|
|
128
|
-
"@fluidframework/telemetry-utils": ">=2.0.0-rc.3.0.
|
|
128
|
+
"@fluidframework/telemetry-utils": ">=2.0.0-rc.3.0.9 <2.0.0-rc.3.1.0",
|
|
129
129
|
"@ungap/structured-clone": "^1.2.0",
|
|
130
130
|
"debug": "^4.3.4",
|
|
131
131
|
"double-ended-queue": "^2.1.0-0",
|
|
@@ -134,8 +134,8 @@
|
|
|
134
134
|
"devDependencies": {
|
|
135
135
|
"@arethetypeswrong/cli": "^0.15.2",
|
|
136
136
|
"@biomejs/biome": "^1.6.2",
|
|
137
|
-
"@fluid-internal/mocha-test-setup": ">=2.0.0-rc.3.0.
|
|
138
|
-
"@fluid-private/test-loader-utils": ">=2.0.0-rc.3.0.
|
|
137
|
+
"@fluid-internal/mocha-test-setup": ">=2.0.0-rc.3.0.9 <2.0.0-rc.3.1.0",
|
|
138
|
+
"@fluid-private/test-loader-utils": ">=2.0.0-rc.3.0.9 <2.0.0-rc.3.1.0",
|
|
139
139
|
"@fluid-tools/build-cli": "^0.37.0",
|
|
140
140
|
"@fluidframework/build-common": "^2.0.3",
|
|
141
141
|
"@fluidframework/build-tools": "^0.37.0",
|
package/src/container.ts
CHANGED
|
@@ -480,7 +480,7 @@ export class Container
|
|
|
480
480
|
private readonly scope: FluidObject;
|
|
481
481
|
private readonly subLogger: ITelemetryLoggerExt;
|
|
482
482
|
// eslint-disable-next-line import/no-deprecated
|
|
483
|
-
private readonly detachedBlobStorage: IDetachedBlobStorage;
|
|
483
|
+
private readonly detachedBlobStorage: IDetachedBlobStorage | undefined;
|
|
484
484
|
private readonly protocolHandlerBuilder: ProtocolHandlerBuilder;
|
|
485
485
|
private readonly client: IClient;
|
|
486
486
|
|
|
@@ -758,7 +758,6 @@ export class Container
|
|
|
758
758
|
// Tracking alternative ways to handle this in AB#4129.
|
|
759
759
|
this.options = { ...options };
|
|
760
760
|
this.scope = scope;
|
|
761
|
-
this.detachedBlobStorage = detachedBlobStorage ?? createMemoryDetachedBlobStorage();
|
|
762
761
|
this.protocolHandlerBuilder =
|
|
763
762
|
protocolHandlerBuilder ??
|
|
764
763
|
((
|
|
@@ -924,6 +923,12 @@ export class Container
|
|
|
924
923
|
this.mc.config.getBoolean("Fluid.Container.summarizeProtocolTree2") ??
|
|
925
924
|
options.summarizeProtocolTree;
|
|
926
925
|
|
|
926
|
+
this.detachedBlobStorage =
|
|
927
|
+
detachedBlobStorage ??
|
|
928
|
+
(this.mc.config.getBoolean("Fluid.Container.MemoryBlobStorageEnabled") === true
|
|
929
|
+
? createMemoryDetachedBlobStorage()
|
|
930
|
+
: undefined);
|
|
931
|
+
|
|
927
932
|
this.storageAdapter = new ContainerStorageAdapter(
|
|
928
933
|
this.detachedBlobStorage,
|
|
929
934
|
this.mc.logger,
|
|
@@ -1175,7 +1180,8 @@ export class Container
|
|
|
1175
1180
|
baseSnapshot,
|
|
1176
1181
|
snapshotBlobs,
|
|
1177
1182
|
pendingRuntimeState,
|
|
1178
|
-
hasAttachmentBlobs:
|
|
1183
|
+
hasAttachmentBlobs:
|
|
1184
|
+
this.detachedBlobStorage !== undefined && this.detachedBlobStorage.size > 0,
|
|
1179
1185
|
attachmentBlobs: serializeMemoryDetachedBlobStorage(this.detachedBlobStorage),
|
|
1180
1186
|
};
|
|
1181
1187
|
return JSON.stringify(detachedContainerState);
|
|
@@ -1293,7 +1299,7 @@ export class Container
|
|
|
1293
1299
|
const snapshotWithBlobs = await attachP;
|
|
1294
1300
|
this.serializedStateManager.setInitialSnapshot(snapshotWithBlobs);
|
|
1295
1301
|
if (!this.closed) {
|
|
1296
|
-
this.detachedBlobStorage
|
|
1302
|
+
this.detachedBlobStorage?.dispose?.();
|
|
1297
1303
|
this.handleDeltaConnectionArg(
|
|
1298
1304
|
{
|
|
1299
1305
|
fetchOpsFromStorage: false,
|
|
@@ -1792,7 +1798,7 @@ export class Container
|
|
|
1792
1798
|
tryInitializeMemoryDetachedBlobStorage(this.detachedBlobStorage, attachmentBlobs);
|
|
1793
1799
|
}
|
|
1794
1800
|
assert(
|
|
1795
|
-
this.detachedBlobStorage.size > 0,
|
|
1801
|
+
this.detachedBlobStorage !== undefined && this.detachedBlobStorage.size > 0,
|
|
1796
1802
|
0x250 /* "serialized container with attachment blobs must be rehydrated with detached blob storage" */,
|
|
1797
1803
|
);
|
|
1798
1804
|
}
|
package/src/memoryBlobStorage.ts
CHANGED
|
@@ -20,7 +20,7 @@ interface MemoryDetachedBlobStorage extends IDetachedBlobStorage {
|
|
|
20
20
|
|
|
21
21
|
function isMemoryDetachedBlobStorage(
|
|
22
22
|
// eslint-disable-next-line import/no-deprecated
|
|
23
|
-
detachedStorage: IDetachedBlobStorage,
|
|
23
|
+
detachedStorage: IDetachedBlobStorage | undefined,
|
|
24
24
|
): detachedStorage is MemoryDetachedBlobStorage {
|
|
25
25
|
return (
|
|
26
26
|
isObject(detachedStorage) &&
|
|
@@ -31,16 +31,20 @@ function isMemoryDetachedBlobStorage(
|
|
|
31
31
|
|
|
32
32
|
export function serializeMemoryDetachedBlobStorage(
|
|
33
33
|
// eslint-disable-next-line import/no-deprecated
|
|
34
|
-
detachedStorage: IDetachedBlobStorage,
|
|
34
|
+
detachedStorage: IDetachedBlobStorage | undefined,
|
|
35
35
|
): string | undefined {
|
|
36
|
-
if (
|
|
36
|
+
if (
|
|
37
|
+
detachedStorage !== undefined &&
|
|
38
|
+
detachedStorage.size > 0 &&
|
|
39
|
+
isMemoryDetachedBlobStorage(detachedStorage)
|
|
40
|
+
) {
|
|
37
41
|
return detachedStorage.serialize();
|
|
38
42
|
}
|
|
39
43
|
}
|
|
40
44
|
|
|
41
45
|
export function tryInitializeMemoryDetachedBlobStorage(
|
|
42
46
|
// eslint-disable-next-line import/no-deprecated
|
|
43
|
-
detachedStorage: IDetachedBlobStorage,
|
|
47
|
+
detachedStorage: IDetachedBlobStorage | undefined,
|
|
44
48
|
attachmentBlobs: string,
|
|
45
49
|
) {
|
|
46
50
|
if (!isMemoryDetachedBlobStorage(detachedStorage)) {
|
package/src/packageVersion.ts
CHANGED