@fluidframework/container-loader 0.45.4 → 0.46.2
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 +11 -31
- package/dist/container.js.map +1 -1
- package/dist/deltaManager.d.ts +5 -0
- package/dist/deltaManager.d.ts.map +1 -1
- package/dist/deltaManager.js +27 -9
- package/dist/deltaManager.js.map +1 -1
- package/dist/loader.d.ts.map +1 -1
- package/dist/loader.js +0 -5
- package/dist/loader.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/dist/retriableDocumentStorageService.js +1 -1
- package/dist/retriableDocumentStorageService.js.map +1 -1
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +1 -1
- package/dist/utils.js.map +1 -1
- package/lib/container.d.ts.map +1 -1
- package/lib/container.js +13 -33
- package/lib/container.js.map +1 -1
- package/lib/deltaManager.d.ts +5 -0
- package/lib/deltaManager.d.ts.map +1 -1
- package/lib/deltaManager.js +30 -12
- package/lib/deltaManager.js.map +1 -1
- package/lib/loader.d.ts.map +1 -1
- package/lib/loader.js +0 -5
- package/lib/loader.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/lib/retriableDocumentStorageService.js +2 -2
- package/lib/retriableDocumentStorageService.js.map +1 -1
- package/lib/utils.d.ts.map +1 -1
- package/lib/utils.js +2 -2
- package/lib/utils.js.map +1 -1
- package/package.json +7 -9
- package/src/container.ts +13 -19
- package/src/deltaManager.ts +34 -12
- package/src/loader.ts +0 -7
- package/src/packageVersion.ts +1 -1
- package/src/retriableDocumentStorageService.ts +2 -2
- package/src/utils.ts +8 -2
- package/dist/debug.d.ts +0 -7
- package/dist/debug.d.ts.map +0 -1
- package/dist/debug.js +0 -15
- package/dist/debug.js.map +0 -1
- package/lib/debug.d.ts +0 -7
- package/lib/debug.d.ts.map +0 -1
- package/lib/debug.js +0 -9
- package/lib/debug.js.map +0 -1
- package/src/debug.ts +0 -11
package/src/loader.ts
CHANGED
|
@@ -25,7 +25,6 @@ import {
|
|
|
25
25
|
IProxyLoaderFactory,
|
|
26
26
|
LoaderHeader,
|
|
27
27
|
} from "@fluidframework/container-definitions";
|
|
28
|
-
import { performance } from "@fluidframework/common-utils";
|
|
29
28
|
import { ChildLogger, DebugLogger, PerformanceEvent } from "@fluidframework/telemetry-utils";
|
|
30
29
|
import {
|
|
31
30
|
IDocumentServiceFactory,
|
|
@@ -41,7 +40,6 @@ import {
|
|
|
41
40
|
MultiDocumentServiceFactory,
|
|
42
41
|
} from "@fluidframework/driver-utils";
|
|
43
42
|
import { Container } from "./container";
|
|
44
|
-
import { debug } from "./debug";
|
|
45
43
|
import { IParsedUrl, parseUrl } from "./utils";
|
|
46
44
|
|
|
47
45
|
function canUseCache(request: IRequest): boolean {
|
|
@@ -318,8 +316,6 @@ export class Loader implements IHostLoader {
|
|
|
318
316
|
public get IFluidRouter(): IFluidRouter { return this; }
|
|
319
317
|
|
|
320
318
|
public async createDetachedContainer(codeDetails: IFluidCodeDetails): Promise<Container> {
|
|
321
|
-
debug(`Container creating in detached state: ${performance.now()} `);
|
|
322
|
-
|
|
323
319
|
const container = await Container.createDetached(
|
|
324
320
|
this,
|
|
325
321
|
codeDetails,
|
|
@@ -339,8 +335,6 @@ export class Loader implements IHostLoader {
|
|
|
339
335
|
}
|
|
340
336
|
|
|
341
337
|
public async rehydrateDetachedContainerFromSnapshot(snapshot: string): Promise<Container> {
|
|
342
|
-
debug(`Container creating in detached state: ${performance.now()} `);
|
|
343
|
-
|
|
344
338
|
return Container.rehydrateDetachedFromSnapshot(this, snapshot);
|
|
345
339
|
}
|
|
346
340
|
|
|
@@ -471,7 +465,6 @@ export class Loader implements IHostLoader {
|
|
|
471
465
|
request.headers[LoaderHeader.version] = parsed.version ?? request.headers[LoaderHeader.version];
|
|
472
466
|
|
|
473
467
|
const canCache = this.canCacheForRequest(request.headers);
|
|
474
|
-
debug(`${canCache} ${request.headers[LoaderHeader.version]}`);
|
|
475
468
|
|
|
476
469
|
return {
|
|
477
470
|
canCache,
|
package/src/packageVersion.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import { GenericError } from "@fluidframework/container-utils";
|
|
7
7
|
import {
|
|
8
8
|
IDocumentStorageService,
|
|
9
9
|
IDocumentStorageServicePolicies,
|
|
@@ -95,7 +95,7 @@ export class RetriableDocumentStorageService implements IDocumentStorageService,
|
|
|
95
95
|
if (this._disposed) {
|
|
96
96
|
return {
|
|
97
97
|
retry: false,
|
|
98
|
-
error:
|
|
98
|
+
error: new GenericError("storageServiceDisposedCannotRetry"),
|
|
99
99
|
};
|
|
100
100
|
}
|
|
101
101
|
return { retry: true, error: undefined };
|
package/src/utils.ts
CHANGED
|
@@ -5,7 +5,13 @@
|
|
|
5
5
|
|
|
6
6
|
import { parse } from "url";
|
|
7
7
|
import { v4 as uuid } from "uuid";
|
|
8
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
assert,
|
|
10
|
+
bufferToString,
|
|
11
|
+
stringToBuffer,
|
|
12
|
+
Uint8ArrayToArrayBuffer,
|
|
13
|
+
unreachableCase,
|
|
14
|
+
} from "@fluidframework/common-utils";
|
|
9
15
|
import { ISummaryTree, ISnapshotTree, SummaryType } from "@fluidframework/protocol-definitions";
|
|
10
16
|
|
|
11
17
|
// This is used when we rehydrate a container from the snapshot. Here we put the blob contents
|
|
@@ -77,7 +83,7 @@ function convertSummaryToSnapshotWithEmbeddedBlobContents(
|
|
|
77
83
|
const blobId = uuid();
|
|
78
84
|
treeNode.blobs[key] = blobId;
|
|
79
85
|
const contentBuffer = typeof summaryObject.content === "string" ?
|
|
80
|
-
stringToBuffer(summaryObject.content, "utf8") : summaryObject.content;
|
|
86
|
+
stringToBuffer(summaryObject.content, "utf8") : Uint8ArrayToArrayBuffer(summaryObject.content);
|
|
81
87
|
treeNode.blobsContents[blobId] = contentBuffer;
|
|
82
88
|
// 0.43 back-compat old runtime will still expect content in the blobs only.
|
|
83
89
|
// So need to put in blobs for now.
|
package/dist/debug.d.ts
DELETED
package/dist/debug.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"debug.d.ts","sourceRoot":"","sources":["../src/debug.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,aAAa,MAAM,OAAO,CAAC;AAGlC,eAAO,MAAM,KAAK,wBAA0C,CAAC"}
|
package/dist/debug.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*!
|
|
3
|
-
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
4
|
-
* Licensed under the MIT License.
|
|
5
|
-
*/
|
|
6
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
-
};
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.debug = void 0;
|
|
11
|
-
const debug_1 = __importDefault(require("debug"));
|
|
12
|
-
const packageVersion_1 = require("./packageVersion");
|
|
13
|
-
exports.debug = debug_1.default("fluid:container-loader");
|
|
14
|
-
exports.debug(`Package: ${packageVersion_1.pkgName} - Version: ${packageVersion_1.pkgVersion}`);
|
|
15
|
-
//# sourceMappingURL=debug.js.map
|
package/dist/debug.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"debug.js","sourceRoot":"","sources":["../src/debug.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;AAEH,kDAAkC;AAClC,qDAAuD;AAE1C,QAAA,KAAK,GAAG,eAAa,CAAC,wBAAwB,CAAC,CAAC;AAE7D,aAAK,CAAC,YAAY,wBAAO,eAAe,2BAAU,EAAE,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport registerDebug from \"debug\";\nimport { pkgName, pkgVersion } from \"./packageVersion\";\n\nexport const debug = registerDebug(\"fluid:container-loader\");\n\ndebug(`Package: ${pkgName} - Version: ${pkgVersion}`);\n"]}
|
package/lib/debug.d.ts
DELETED
package/lib/debug.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"debug.d.ts","sourceRoot":"","sources":["../src/debug.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,aAAa,MAAM,OAAO,CAAC;AAGlC,eAAO,MAAM,KAAK,wBAA0C,CAAC"}
|
package/lib/debug.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
*/
|
|
5
|
-
import registerDebug from "debug";
|
|
6
|
-
import { pkgName, pkgVersion } from "./packageVersion";
|
|
7
|
-
export const debug = registerDebug("fluid:container-loader");
|
|
8
|
-
debug(`Package: ${pkgName} - Version: ${pkgVersion}`);
|
|
9
|
-
//# sourceMappingURL=debug.js.map
|
package/lib/debug.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"debug.js","sourceRoot":"","sources":["../src/debug.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,aAAa,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEvD,MAAM,CAAC,MAAM,KAAK,GAAG,aAAa,CAAC,wBAAwB,CAAC,CAAC;AAE7D,KAAK,CAAC,YAAY,OAAO,eAAe,UAAU,EAAE,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport registerDebug from \"debug\";\nimport { pkgName, pkgVersion } from \"./packageVersion\";\n\nexport const debug = registerDebug(\"fluid:container-loader\");\n\ndebug(`Package: ${pkgName} - Version: ${pkgVersion}`);\n"]}
|
package/src/debug.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import registerDebug from "debug";
|
|
7
|
-
import { pkgName, pkgVersion } from "./packageVersion";
|
|
8
|
-
|
|
9
|
-
export const debug = registerDebug("fluid:container-loader");
|
|
10
|
-
|
|
11
|
-
debug(`Package: ${pkgName} - Version: ${pkgVersion}`);
|