@fluidframework/driver-utils 2.62.0-356644 → 2.63.0-358419
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/CHANGELOG.md +4 -0
- package/dist/cacheUtils.d.ts +22 -0
- package/dist/cacheUtils.d.ts.map +1 -0
- package/dist/cacheUtils.js +28 -0
- package/dist/cacheUtils.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.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/cacheUtils.d.ts +22 -0
- package/lib/cacheUtils.d.ts.map +1 -0
- package/lib/cacheUtils.js +24 -0
- package/lib/cacheUtils.js.map +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.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 +8 -8
- package/src/cacheUtils.ts +27 -0
- package/src/index.ts +1 -0
- package/src/packageVersion.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
import type { FiveDaysMs, ICacheEntry } from "@fluidframework/driver-definitions/internal";
|
|
6
|
+
/**
|
|
7
|
+
* Must be less than IDocumentStorageServicePolicies.maximumCacheDurationMs policy of 5 days.
|
|
8
|
+
* That policy is the outward expression and this value is the implementation - using a larger value
|
|
9
|
+
* would violate that statement of the driver's behavior.
|
|
10
|
+
* Other parts of the system (such as Garbage Collection) depend on that policy being properly implemented.
|
|
11
|
+
*
|
|
12
|
+
* @internal
|
|
13
|
+
*/
|
|
14
|
+
export declare const maximumCacheDurationMs: FiveDaysMs;
|
|
15
|
+
/**
|
|
16
|
+
* Api to generate a cache key from cache entry.
|
|
17
|
+
* @param entry - cache entry from which a cache key is generated
|
|
18
|
+
* @returns The key for cache.
|
|
19
|
+
* @internal
|
|
20
|
+
*/
|
|
21
|
+
export declare function getKeyForCacheEntry(entry: ICacheEntry): string;
|
|
22
|
+
//# sourceMappingURL=cacheUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cacheUtils.d.ts","sourceRoot":"","sources":["../src/cacheUtils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,6CAA6C,CAAC;AAE3F;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,EAAE,UAAwB,CAAC;AAE9D;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAG9D"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*!
|
|
3
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
4
|
+
* Licensed under the MIT License.
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.getKeyForCacheEntry = exports.maximumCacheDurationMs = void 0;
|
|
8
|
+
/**
|
|
9
|
+
* Must be less than IDocumentStorageServicePolicies.maximumCacheDurationMs policy of 5 days.
|
|
10
|
+
* That policy is the outward expression and this value is the implementation - using a larger value
|
|
11
|
+
* would violate that statement of the driver's behavior.
|
|
12
|
+
* Other parts of the system (such as Garbage Collection) depend on that policy being properly implemented.
|
|
13
|
+
*
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
|
+
exports.maximumCacheDurationMs = 432_000_000; // 5 days in ms
|
|
17
|
+
/**
|
|
18
|
+
* Api to generate a cache key from cache entry.
|
|
19
|
+
* @param entry - cache entry from which a cache key is generated
|
|
20
|
+
* @returns The key for cache.
|
|
21
|
+
* @internal
|
|
22
|
+
*/
|
|
23
|
+
function getKeyForCacheEntry(entry) {
|
|
24
|
+
const version = entry.file.fileVersion !== undefined ? `_${entry.file.fileVersion}` : "";
|
|
25
|
+
return `${entry.file.docId}${version}_${entry.type}_${entry.key}`;
|
|
26
|
+
}
|
|
27
|
+
exports.getKeyForCacheEntry = getKeyForCacheEntry;
|
|
28
|
+
//# sourceMappingURL=cacheUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cacheUtils.js","sourceRoot":"","sources":["../src/cacheUtils.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIH;;;;;;;GAOG;AACU,QAAA,sBAAsB,GAAe,WAAW,CAAC,CAAC,eAAe;AAE9E;;;;;GAKG;AACH,SAAgB,mBAAmB,CAAC,KAAkB;IACrD,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,WAAW,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IACzF,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,GAAG,OAAO,IAAI,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,GAAG,EAAE,CAAC;AACnE,CAAC;AAHD,kDAGC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { FiveDaysMs, ICacheEntry } from \"@fluidframework/driver-definitions/internal\";\n\n/**\n * Must be less than IDocumentStorageServicePolicies.maximumCacheDurationMs policy of 5 days.\n * That policy is the outward expression and this value is the implementation - using a larger value\n * would violate that statement of the driver's behavior.\n * Other parts of the system (such as Garbage Collection) depend on that policy being properly implemented.\n *\n * @internal\n */\nexport const maximumCacheDurationMs: FiveDaysMs = 432_000_000; // 5 days in ms\n\n/**\n * Api to generate a cache key from cache entry.\n * @param entry - cache entry from which a cache key is generated\n * @returns The key for cache.\n * @internal\n */\nexport function getKeyForCacheEntry(entry: ICacheEntry): string {\n\tconst version = entry.file.fileVersion !== undefined ? `_${entry.file.fileVersion}` : \"\";\n\treturn `${entry.file.docId}${version}_${entry.type}_${entry.key}`;\n}\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -20,4 +20,5 @@ export { convertSummaryTreeToSnapshotITree } from "./treeConversions.js";
|
|
|
20
20
|
export { applyStorageCompression, ICompressionStorageConfig, SummaryCompressionAlgorithm, blobHeadersBlobName, } from "./adapters/index.js";
|
|
21
21
|
export { getSnapshotTree, isInstanceOfISnapshot } from "./storageUtils.js";
|
|
22
22
|
export { buildGitTreeHierarchy, getGitMode, getGitType } from "./protocol/index.js";
|
|
23
|
+
export { getKeyForCacheEntry, maximumCacheDurationMs } from "./cacheUtils.js";
|
|
23
24
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAC9E,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EACN,uBAAuB,EACvB,gBAAgB,GAChB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACN,kBAAkB,EAClB,eAAe,EACf,yBAAyB,EACzB,gBAAgB,EAChB,mCAAmC,EACnC,yBAAyB,EACzB,uBAAuB,EACvB,mBAAmB,EACnB,sBAAsB,EACtB,6BAA6B,EAC7B,QAAQ,EACR,wBAAwB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ED
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.getGitType = exports.getGitMode = exports.buildGitTreeHierarchy = exports.isInstanceOfISnapshot = exports.getSnapshotTree = exports.blobHeadersBlobName = exports.SummaryCompressionAlgorithm = exports.applyStorageCompression = exports.convertSummaryTreeToSnapshotITree = exports.isCombinedAppAndProtocolSummary = exports.getQuorumValuesFromProtocolSummary = exports.getDocAttributesFromProtocolSummary = exports.runWithRetry = exports.calculateMaxWaitTime = exports.readAndParse = exports.RateLimiter = exports.PrefetchDocumentStorageService = exports.streamObserver = exports.streamFromMessages = exports.requestOps = exports.Queue = exports.ParallelRequests = exports.emptyMessageStream = exports.logNetworkFailure = exports.ThrottlingError = exports.RetryableError = exports.OnlineStatus = exports.NonRetryableError = exports.NetworkErrorBasic = exports.LocationRedirectionError = exports.isOnline = exports.getRetryDelaySecondsFromError = exports.getRetryDelayFromError = exports.GenericNetworkError = exports.FluidInvalidSchemaError = exports.DeltaStreamConnectionForbiddenError = exports.createWriteError = exports.createGenericNetworkError = exports.canRetryOnError = exports.AuthorizationError = exports.isRuntimeMessage = exports.canBeCoalescedByService = exports.InsecureUrlResolver = exports.UsageError = exports.DocumentStorageServiceProxy = exports.AttachmentTreeEntry = exports.TreeTreeEntry = exports.BlobTreeEntry = exports.buildSnapshotTree = void 0;
|
|
7
|
+
exports.getKeyForCacheEntry = exports.getGitType = exports.getGitMode = exports.buildGitTreeHierarchy = exports.isInstanceOfISnapshot = exports.getSnapshotTree = exports.blobHeadersBlobName = exports.SummaryCompressionAlgorithm = exports.applyStorageCompression = exports.convertSummaryTreeToSnapshotITree = exports.isCombinedAppAndProtocolSummary = exports.getQuorumValuesFromProtocolSummary = exports.getDocAttributesFromProtocolSummary = exports.runWithRetry = exports.calculateMaxWaitTime = exports.readAndParse = exports.RateLimiter = exports.PrefetchDocumentStorageService = exports.streamObserver = exports.streamFromMessages = exports.requestOps = exports.Queue = exports.ParallelRequests = exports.emptyMessageStream = exports.logNetworkFailure = exports.ThrottlingError = exports.RetryableError = exports.OnlineStatus = exports.NonRetryableError = exports.NetworkErrorBasic = exports.LocationRedirectionError = exports.isOnline = exports.getRetryDelaySecondsFromError = exports.getRetryDelayFromError = exports.GenericNetworkError = exports.FluidInvalidSchemaError = exports.DeltaStreamConnectionForbiddenError = exports.createWriteError = exports.createGenericNetworkError = exports.canRetryOnError = exports.AuthorizationError = exports.isRuntimeMessage = exports.canBeCoalescedByService = exports.InsecureUrlResolver = exports.UsageError = exports.DocumentStorageServiceProxy = exports.AttachmentTreeEntry = exports.TreeTreeEntry = exports.BlobTreeEntry = exports.buildSnapshotTree = void 0;
|
|
8
|
+
exports.maximumCacheDurationMs = void 0;
|
|
8
9
|
var buildSnapshotTree_js_1 = require("./buildSnapshotTree.js");
|
|
9
10
|
Object.defineProperty(exports, "buildSnapshotTree", { enumerable: true, get: function () { return buildSnapshotTree_js_1.buildSnapshotTree; } });
|
|
10
11
|
var blob_js_1 = require("./blob.js");
|
|
@@ -72,4 +73,7 @@ var index_js_2 = require("./protocol/index.js");
|
|
|
72
73
|
Object.defineProperty(exports, "buildGitTreeHierarchy", { enumerable: true, get: function () { return index_js_2.buildGitTreeHierarchy; } });
|
|
73
74
|
Object.defineProperty(exports, "getGitMode", { enumerable: true, get: function () { return index_js_2.getGitMode; } });
|
|
74
75
|
Object.defineProperty(exports, "getGitType", { enumerable: true, get: function () { return index_js_2.getGitType; } });
|
|
76
|
+
var cacheUtils_js_1 = require("./cacheUtils.js");
|
|
77
|
+
Object.defineProperty(exports, "getKeyForCacheEntry", { enumerable: true, get: function () { return cacheUtils_js_1.getKeyForCacheEntry; } });
|
|
78
|
+
Object.defineProperty(exports, "maximumCacheDurationMs", { enumerable: true, get: function () { return cacheUtils_js_1.maximumCacheDurationMs; } });
|
|
75
79
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;AAEH,+DAA2D;AAAlD,yHAAA,iBAAiB,OAAA;AAC1B,qCAA8E;AAArE,wGAAA,aAAa,OAAA;AAAE,wGAAA,aAAa,OAAA;AAAE,8GAAA,mBAAmB,OAAA;AAC1D,mFAA+E;AAAtE,6IAAA,2BAA2B,OAAA;AACpC,uCAAwC;AAA/B,sGAAA,UAAU,OAAA;AACnB,mEAA+D;AAAtD,6HAAA,mBAAmB,OAAA;AAC5B,iEAGiC;AAFhC,gIAAA,uBAAuB,OAAA;AACvB,yHAAA,gBAAgB,OAAA;AAEjB,2CAkBsB;AAjBrB,gHAAA,kBAAkB,OAAA;AAClB,6GAAA,eAAe,OAAA;AACf,uHAAA,yBAAyB,OAAA;AACzB,8GAAA,gBAAgB,OAAA;AAChB,iIAAA,mCAAmC,OAAA;AAEnC,qHAAA,uBAAuB,OAAA;AACvB,iHAAA,mBAAmB,OAAA;AACnB,oHAAA,sBAAsB,OAAA;AACtB,2HAAA,6BAA6B,OAAA;AAC7B,sGAAA,QAAQ,OAAA;AACR,sHAAA,wBAAwB,OAAA;AACxB,+GAAA,iBAAiB,OAAA;AACjB,+GAAA,iBAAiB,OAAA;AACjB,0GAAA,YAAY,OAAA;AACZ,4GAAA,cAAc,OAAA;AACd,6GAAA,eAAe,OAAA;AAEhB,qDAAsD;AAA7C,oHAAA,iBAAiB,OAAA;AAC1B,6DAO+B;AAN9B,yHAAA,kBAAkB,OAAA;AAClB,uHAAA,gBAAgB,OAAA;AAChB,4GAAA,KAAK,OAAA;AACL,iHAAA,UAAU,OAAA;AACV,yHAAA,kBAAkB,OAAA;AAClB,qHAAA,cAAc,OAAA;AAEf,yFAAqF;AAA5E,mJAAA,8BAA8B,OAAA;AACvC,mDAA+C;AAAtC,6GAAA,WAAW,OAAA;AACpB,qDAAiD;AAAxC,+GAAA,YAAY,OAAA;AACrB,qDAAkF;AAAzE,uHAAA,oBAAoB,OAAA;AAAa,+GAAA,YAAY,OAAA;AACtD,mEAKkC;AAHjC,6IAAA,mCAAmC,OAAA;AACnC,4IAAA,kCAAkC,OAAA;AAClC,yIAAA,+BAA+B,OAAA;AAEhC,2DAAyE;AAAhE,uIAAA,iCAAiC,OAAA;AAC1C,gDAK6B;AAJ5B,mHAAA,uBAAuB,OAAA;AAEvB,uHAAA,2BAA2B,OAAA;AAC3B,+GAAA,mBAAmB,OAAA;AAEpB,qDAA2E;AAAlE,kHAAA,eAAe,OAAA;AAAE,wHAAA,qBAAqB,OAAA;AAC/C,gDAAoF;AAA3E,iHAAA,qBAAqB,OAAA;AAAE,sGAAA,UAAU,OAAA;AAAE,sGAAA,UAAU,OAAA;AACtD,iDAA8E;AAArE,oHAAA,mBAAmB,OAAA;AAAE,uHAAA,sBAAsB,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { buildSnapshotTree } from \"./buildSnapshotTree.js\";\nexport { BlobTreeEntry, TreeTreeEntry, AttachmentTreeEntry } from \"./blob.js\";\nexport { DocumentStorageServiceProxy } from \"./documentStorageServiceProxy.js\";\nexport { UsageError } from \"./error.js\";\nexport { InsecureUrlResolver } from \"./insecureUrlResolver.js\";\nexport {\n\tcanBeCoalescedByService,\n\tisRuntimeMessage,\n} from \"./messageRecognition.js\";\nexport {\n\tAuthorizationError,\n\tcanRetryOnError,\n\tcreateGenericNetworkError,\n\tcreateWriteError,\n\tDeltaStreamConnectionForbiddenError,\n\tDriverErrorTelemetryProps,\n\tFluidInvalidSchemaError,\n\tGenericNetworkError,\n\tgetRetryDelayFromError,\n\tgetRetryDelaySecondsFromError,\n\tisOnline,\n\tLocationRedirectionError,\n\tNetworkErrorBasic,\n\tNonRetryableError,\n\tOnlineStatus,\n\tRetryableError,\n\tThrottlingError,\n} from \"./network.js\";\nexport { logNetworkFailure } from \"./networkUtils.js\";\nexport {\n\temptyMessageStream,\n\tParallelRequests,\n\tQueue,\n\trequestOps,\n\tstreamFromMessages,\n\tstreamObserver,\n} from \"./parallelRequests.js\";\nexport { PrefetchDocumentStorageService } from \"./prefetchDocumentStorageService.js\";\nexport { RateLimiter } from \"./rateLimiter.js\";\nexport { readAndParse } from \"./readAndParse.js\";\nexport { calculateMaxWaitTime, IProgress, runWithRetry } from \"./runWithRetry.js\";\nexport {\n\tCombinedAppAndProtocolSummary,\n\tgetDocAttributesFromProtocolSummary,\n\tgetQuorumValuesFromProtocolSummary,\n\tisCombinedAppAndProtocolSummary,\n} from \"./summaryForCreateNew.js\";\nexport { convertSummaryTreeToSnapshotITree } from \"./treeConversions.js\";\nexport {\n\tapplyStorageCompression,\n\tICompressionStorageConfig,\n\tSummaryCompressionAlgorithm,\n\tblobHeadersBlobName,\n} from \"./adapters/index.js\";\nexport { getSnapshotTree, isInstanceOfISnapshot } from \"./storageUtils.js\";\nexport { buildGitTreeHierarchy, getGitMode, getGitType } from \"./protocol/index.js\";\nexport { getKeyForCacheEntry, maximumCacheDurationMs } from \"./cacheUtils.js\";\n"]}
|
package/dist/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/driver-utils";
|
|
8
|
-
export declare const pkgVersion = "2.
|
|
8
|
+
export declare const pkgVersion = "2.63.0-358419";
|
|
9
9
|
//# sourceMappingURL=packageVersion.d.ts.map
|
package/dist/packageVersion.js
CHANGED
|
@@ -8,5 +8,5 @@
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.pkgVersion = exports.pkgName = void 0;
|
|
10
10
|
exports.pkgName = "@fluidframework/driver-utils";
|
|
11
|
-
exports.pkgVersion = "2.
|
|
11
|
+
exports.pkgVersion = "2.63.0-358419";
|
|
12
12
|
//# sourceMappingURL=packageVersion.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,8BAA8B,CAAC;AACzC,QAAA,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/driver-utils\";\nexport const pkgVersion = \"2.
|
|
1
|
+
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,8BAA8B,CAAC;AACzC,QAAA,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/driver-utils\";\nexport const pkgVersion = \"2.63.0-358419\";\n"]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
import type { FiveDaysMs, ICacheEntry } from "@fluidframework/driver-definitions/internal";
|
|
6
|
+
/**
|
|
7
|
+
* Must be less than IDocumentStorageServicePolicies.maximumCacheDurationMs policy of 5 days.
|
|
8
|
+
* That policy is the outward expression and this value is the implementation - using a larger value
|
|
9
|
+
* would violate that statement of the driver's behavior.
|
|
10
|
+
* Other parts of the system (such as Garbage Collection) depend on that policy being properly implemented.
|
|
11
|
+
*
|
|
12
|
+
* @internal
|
|
13
|
+
*/
|
|
14
|
+
export declare const maximumCacheDurationMs: FiveDaysMs;
|
|
15
|
+
/**
|
|
16
|
+
* Api to generate a cache key from cache entry.
|
|
17
|
+
* @param entry - cache entry from which a cache key is generated
|
|
18
|
+
* @returns The key for cache.
|
|
19
|
+
* @internal
|
|
20
|
+
*/
|
|
21
|
+
export declare function getKeyForCacheEntry(entry: ICacheEntry): string;
|
|
22
|
+
//# sourceMappingURL=cacheUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cacheUtils.d.ts","sourceRoot":"","sources":["../src/cacheUtils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,6CAA6C,CAAC;AAE3F;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,EAAE,UAAwB,CAAC;AAE9D;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAG9D"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Must be less than IDocumentStorageServicePolicies.maximumCacheDurationMs policy of 5 days.
|
|
7
|
+
* That policy is the outward expression and this value is the implementation - using a larger value
|
|
8
|
+
* would violate that statement of the driver's behavior.
|
|
9
|
+
* Other parts of the system (such as Garbage Collection) depend on that policy being properly implemented.
|
|
10
|
+
*
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
export const maximumCacheDurationMs = 432_000_000; // 5 days in ms
|
|
14
|
+
/**
|
|
15
|
+
* Api to generate a cache key from cache entry.
|
|
16
|
+
* @param entry - cache entry from which a cache key is generated
|
|
17
|
+
* @returns The key for cache.
|
|
18
|
+
* @internal
|
|
19
|
+
*/
|
|
20
|
+
export function getKeyForCacheEntry(entry) {
|
|
21
|
+
const version = entry.file.fileVersion !== undefined ? `_${entry.file.fileVersion}` : "";
|
|
22
|
+
return `${entry.file.docId}${version}_${entry.type}_${entry.key}`;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=cacheUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cacheUtils.js","sourceRoot":"","sources":["../src/cacheUtils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAe,WAAW,CAAC,CAAC,eAAe;AAE9E;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CAAC,KAAkB;IACrD,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,WAAW,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IACzF,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,GAAG,OAAO,IAAI,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,GAAG,EAAE,CAAC;AACnE,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { FiveDaysMs, ICacheEntry } from \"@fluidframework/driver-definitions/internal\";\n\n/**\n * Must be less than IDocumentStorageServicePolicies.maximumCacheDurationMs policy of 5 days.\n * That policy is the outward expression and this value is the implementation - using a larger value\n * would violate that statement of the driver's behavior.\n * Other parts of the system (such as Garbage Collection) depend on that policy being properly implemented.\n *\n * @internal\n */\nexport const maximumCacheDurationMs: FiveDaysMs = 432_000_000; // 5 days in ms\n\n/**\n * Api to generate a cache key from cache entry.\n * @param entry - cache entry from which a cache key is generated\n * @returns The key for cache.\n * @internal\n */\nexport function getKeyForCacheEntry(entry: ICacheEntry): string {\n\tconst version = entry.file.fileVersion !== undefined ? `_${entry.file.fileVersion}` : \"\";\n\treturn `${entry.file.docId}${version}_${entry.type}_${entry.key}`;\n}\n"]}
|
package/lib/index.d.ts
CHANGED
|
@@ -20,4 +20,5 @@ export { convertSummaryTreeToSnapshotITree } from "./treeConversions.js";
|
|
|
20
20
|
export { applyStorageCompression, ICompressionStorageConfig, SummaryCompressionAlgorithm, blobHeadersBlobName, } from "./adapters/index.js";
|
|
21
21
|
export { getSnapshotTree, isInstanceOfISnapshot } from "./storageUtils.js";
|
|
22
22
|
export { buildGitTreeHierarchy, getGitMode, getGitType } from "./protocol/index.js";
|
|
23
|
+
export { getKeyForCacheEntry, maximumCacheDurationMs } from "./cacheUtils.js";
|
|
23
24
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAC9E,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EACN,uBAAuB,EACvB,gBAAgB,GAChB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACN,kBAAkB,EAClB,eAAe,EACf,yBAAyB,EACzB,gBAAgB,EAChB,mCAAmC,EACnC,yBAAyB,EACzB,uBAAuB,EACvB,mBAAmB,EACnB,sBAAsB,EACtB,6BAA6B,EAC7B,QAAQ,EACR,wBAAwB,EACxB,iBAAiB,EACjB,iBAAiB,EACjB,YAAY,EACZ,cAAc,EACd,eAAe,GACf,MAA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
|
export { applyStorageCompression, SummaryCompressionAlgorithm, blobHeadersBlobName, } from "./adapters/index.js";
|
|
21
21
|
export { getSnapshotTree, isInstanceOfISnapshot } from "./storageUtils.js";
|
|
22
22
|
export { buildGitTreeHierarchy, getGitMode, getGitType } from "./protocol/index.js";
|
|
23
|
+
export { getKeyForCacheEntry, maximumCacheDurationMs } from "./cacheUtils.js";
|
|
23
24
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAC9E,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EACN,uBAAuB,EACvB,gBAAgB,GAChB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACN,kBAAkB,EAClB,eAAe,EACf,yBAAyB,EACzB,gBAAgB,EAChB,mCAAmC,EAEnC,uBAAuB,EACvB,mBAAmB,EACnB,sBAAsB,EACtB,6BAA6B,EAC7B,QAAQ,EACR,wBAAwB,EACxB,iBAAiB,EACjB,iBAAiB,EACjB,YAAY,EACZ,cAAc,EACd,eAAe,GACf,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EACN,kBAAkB,EAClB,gBAAgB,EAChB,KAAK,EACL,UAAU,EACV,kBAAkB,EAClB,cAAc,GACd,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,8BAA8B,EAAE,MAAM,qCAAqC,CAAC;AACrF,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,oBAAoB,EAAa,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAClF,OAAO,EAEN,mCAAmC,EACnC,kCAAkC,EAClC,+BAA+B,GAC/B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,iCAAiC,EAAE,MAAM,sBAAsB,CAAC;AACzE,OAAO,EACN,uBAAuB,EAEvB,2BAA2B,EAC3B,mBAAmB,GACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { buildSnapshotTree } from \"./buildSnapshotTree.js\";\nexport { BlobTreeEntry, TreeTreeEntry, AttachmentTreeEntry } from \"./blob.js\";\nexport { DocumentStorageServiceProxy } from \"./documentStorageServiceProxy.js\";\nexport { UsageError } from \"./error.js\";\nexport { InsecureUrlResolver } from \"./insecureUrlResolver.js\";\nexport {\n\tcanBeCoalescedByService,\n\tisRuntimeMessage,\n} from \"./messageRecognition.js\";\nexport {\n\tAuthorizationError,\n\tcanRetryOnError,\n\tcreateGenericNetworkError,\n\tcreateWriteError,\n\tDeltaStreamConnectionForbiddenError,\n\tDriverErrorTelemetryProps,\n\tFluidInvalidSchemaError,\n\tGenericNetworkError,\n\tgetRetryDelayFromError,\n\tgetRetryDelaySecondsFromError,\n\tisOnline,\n\tLocationRedirectionError,\n\tNetworkErrorBasic,\n\tNonRetryableError,\n\tOnlineStatus,\n\tRetryableError,\n\tThrottlingError,\n} from \"./network.js\";\nexport { logNetworkFailure } from \"./networkUtils.js\";\nexport {\n\temptyMessageStream,\n\tParallelRequests,\n\tQueue,\n\trequestOps,\n\tstreamFromMessages,\n\tstreamObserver,\n} from \"./parallelRequests.js\";\nexport { PrefetchDocumentStorageService } from \"./prefetchDocumentStorageService.js\";\nexport { RateLimiter } from \"./rateLimiter.js\";\nexport { readAndParse } from \"./readAndParse.js\";\nexport { calculateMaxWaitTime, IProgress, runWithRetry } from \"./runWithRetry.js\";\nexport {\n\tCombinedAppAndProtocolSummary,\n\tgetDocAttributesFromProtocolSummary,\n\tgetQuorumValuesFromProtocolSummary,\n\tisCombinedAppAndProtocolSummary,\n} from \"./summaryForCreateNew.js\";\nexport { convertSummaryTreeToSnapshotITree } from \"./treeConversions.js\";\nexport {\n\tapplyStorageCompression,\n\tICompressionStorageConfig,\n\tSummaryCompressionAlgorithm,\n\tblobHeadersBlobName,\n} from \"./adapters/index.js\";\nexport { getSnapshotTree, isInstanceOfISnapshot } from \"./storageUtils.js\";\nexport { buildGitTreeHierarchy, getGitMode, getGitType } from \"./protocol/index.js\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAC9E,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EACN,uBAAuB,EACvB,gBAAgB,GAChB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACN,kBAAkB,EAClB,eAAe,EACf,yBAAyB,EACzB,gBAAgB,EAChB,mCAAmC,EAEnC,uBAAuB,EACvB,mBAAmB,EACnB,sBAAsB,EACtB,6BAA6B,EAC7B,QAAQ,EACR,wBAAwB,EACxB,iBAAiB,EACjB,iBAAiB,EACjB,YAAY,EACZ,cAAc,EACd,eAAe,GACf,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EACN,kBAAkB,EAClB,gBAAgB,EAChB,KAAK,EACL,UAAU,EACV,kBAAkB,EAClB,cAAc,GACd,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,8BAA8B,EAAE,MAAM,qCAAqC,CAAC;AACrF,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,oBAAoB,EAAa,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAClF,OAAO,EAEN,mCAAmC,EACnC,kCAAkC,EAClC,+BAA+B,GAC/B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,iCAAiC,EAAE,MAAM,sBAAsB,CAAC;AACzE,OAAO,EACN,uBAAuB,EAEvB,2BAA2B,EAC3B,mBAAmB,GACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACpF,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { buildSnapshotTree } from \"./buildSnapshotTree.js\";\nexport { BlobTreeEntry, TreeTreeEntry, AttachmentTreeEntry } from \"./blob.js\";\nexport { DocumentStorageServiceProxy } from \"./documentStorageServiceProxy.js\";\nexport { UsageError } from \"./error.js\";\nexport { InsecureUrlResolver } from \"./insecureUrlResolver.js\";\nexport {\n\tcanBeCoalescedByService,\n\tisRuntimeMessage,\n} from \"./messageRecognition.js\";\nexport {\n\tAuthorizationError,\n\tcanRetryOnError,\n\tcreateGenericNetworkError,\n\tcreateWriteError,\n\tDeltaStreamConnectionForbiddenError,\n\tDriverErrorTelemetryProps,\n\tFluidInvalidSchemaError,\n\tGenericNetworkError,\n\tgetRetryDelayFromError,\n\tgetRetryDelaySecondsFromError,\n\tisOnline,\n\tLocationRedirectionError,\n\tNetworkErrorBasic,\n\tNonRetryableError,\n\tOnlineStatus,\n\tRetryableError,\n\tThrottlingError,\n} from \"./network.js\";\nexport { logNetworkFailure } from \"./networkUtils.js\";\nexport {\n\temptyMessageStream,\n\tParallelRequests,\n\tQueue,\n\trequestOps,\n\tstreamFromMessages,\n\tstreamObserver,\n} from \"./parallelRequests.js\";\nexport { PrefetchDocumentStorageService } from \"./prefetchDocumentStorageService.js\";\nexport { RateLimiter } from \"./rateLimiter.js\";\nexport { readAndParse } from \"./readAndParse.js\";\nexport { calculateMaxWaitTime, IProgress, runWithRetry } from \"./runWithRetry.js\";\nexport {\n\tCombinedAppAndProtocolSummary,\n\tgetDocAttributesFromProtocolSummary,\n\tgetQuorumValuesFromProtocolSummary,\n\tisCombinedAppAndProtocolSummary,\n} from \"./summaryForCreateNew.js\";\nexport { convertSummaryTreeToSnapshotITree } from \"./treeConversions.js\";\nexport {\n\tapplyStorageCompression,\n\tICompressionStorageConfig,\n\tSummaryCompressionAlgorithm,\n\tblobHeadersBlobName,\n} from \"./adapters/index.js\";\nexport { getSnapshotTree, isInstanceOfISnapshot } from \"./storageUtils.js\";\nexport { buildGitTreeHierarchy, getGitMode, getGitType } from \"./protocol/index.js\";\nexport { getKeyForCacheEntry, maximumCacheDurationMs } from \"./cacheUtils.js\";\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/driver-utils";
|
|
8
|
-
export declare const pkgVersion = "2.
|
|
8
|
+
export declare const pkgVersion = "2.63.0-358419";
|
|
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,8BAA8B,CAAC;AACtD,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/driver-utils\";\nexport const pkgVersion = \"2.
|
|
1
|
+
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,8BAA8B,CAAC;AACtD,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/driver-utils\";\nexport const pkgVersion = \"2.63.0-358419\";\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/driver-utils",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.63.0-358419",
|
|
4
4
|
"description": "Collection of utility functions for Fluid drivers",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -69,11 +69,11 @@
|
|
|
69
69
|
"temp-directory": "nyc/.nyc_output"
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
|
-
"@fluid-internal/client-utils": "2.
|
|
73
|
-
"@fluidframework/core-interfaces": "2.
|
|
74
|
-
"@fluidframework/core-utils": "2.
|
|
75
|
-
"@fluidframework/driver-definitions": "2.
|
|
76
|
-
"@fluidframework/telemetry-utils": "2.
|
|
72
|
+
"@fluid-internal/client-utils": "2.63.0-358419",
|
|
73
|
+
"@fluidframework/core-interfaces": "2.63.0-358419",
|
|
74
|
+
"@fluidframework/core-utils": "2.63.0-358419",
|
|
75
|
+
"@fluidframework/driver-definitions": "2.63.0-358419",
|
|
76
|
+
"@fluidframework/telemetry-utils": "2.63.0-358419",
|
|
77
77
|
"axios": "^1.8.4",
|
|
78
78
|
"lz4js": "^0.2.0",
|
|
79
79
|
"uuid": "^11.1.0"
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"devDependencies": {
|
|
82
82
|
"@arethetypeswrong/cli": "^0.17.1",
|
|
83
83
|
"@biomejs/biome": "~1.9.3",
|
|
84
|
-
"@fluid-internal/mocha-test-setup": "2.
|
|
84
|
+
"@fluid-internal/mocha-test-setup": "2.63.0-358419",
|
|
85
85
|
"@fluid-tools/build-cli": "^0.58.3",
|
|
86
86
|
"@fluidframework/build-common": "^2.0.3",
|
|
87
87
|
"@fluidframework/build-tools": "^0.58.3",
|
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
"test": "npm run test:mocha",
|
|
146
146
|
"test:coverage": "c8 npm test",
|
|
147
147
|
"test:mocha": "npm run test:mocha:esm && echo skipping cjs to avoid overhead - npm run test:mocha:cjs",
|
|
148
|
-
"test:mocha:cjs": "cross-env
|
|
148
|
+
"test:mocha:cjs": "cross-env FLUID_TEST_MODULE_SYSTEM=CJS mocha",
|
|
149
149
|
"test:mocha:esm": "mocha",
|
|
150
150
|
"test:mocha:verbose": "cross-env FLUID_TEST_VERBOSE=1 npm run test:mocha",
|
|
151
151
|
"tsc": "fluid-tsc commonjs --project ./tsconfig.cjs.json && copyfiles -f ../../../common/build/build-common/src/cjs/package.json ./dist",
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { FiveDaysMs, ICacheEntry } from "@fluidframework/driver-definitions/internal";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Must be less than IDocumentStorageServicePolicies.maximumCacheDurationMs policy of 5 days.
|
|
10
|
+
* That policy is the outward expression and this value is the implementation - using a larger value
|
|
11
|
+
* would violate that statement of the driver's behavior.
|
|
12
|
+
* Other parts of the system (such as Garbage Collection) depend on that policy being properly implemented.
|
|
13
|
+
*
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
|
+
export const maximumCacheDurationMs: FiveDaysMs = 432_000_000; // 5 days in ms
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Api to generate a cache key from cache entry.
|
|
20
|
+
* @param entry - cache entry from which a cache key is generated
|
|
21
|
+
* @returns The key for cache.
|
|
22
|
+
* @internal
|
|
23
|
+
*/
|
|
24
|
+
export function getKeyForCacheEntry(entry: ICacheEntry): string {
|
|
25
|
+
const version = entry.file.fileVersion !== undefined ? `_${entry.file.fileVersion}` : "";
|
|
26
|
+
return `${entry.file.docId}${version}_${entry.type}_${entry.key}`;
|
|
27
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -59,3 +59,4 @@ export {
|
|
|
59
59
|
} from "./adapters/index.js";
|
|
60
60
|
export { getSnapshotTree, isInstanceOfISnapshot } from "./storageUtils.js";
|
|
61
61
|
export { buildGitTreeHierarchy, getGitMode, getGitType } from "./protocol/index.js";
|
|
62
|
+
export { getKeyForCacheEntry, maximumCacheDurationMs } from "./cacheUtils.js";
|
package/src/packageVersion.ts
CHANGED