@fluidframework/driver-utils 2.0.0-internal.2.4.2 → 2.0.0-internal.2.4.3

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/index.d.ts CHANGED
@@ -21,7 +21,7 @@ export { PrefetchDocumentStorageService } from "./prefetchDocumentStorageService
21
21
  export { RateLimiter } from "./rateLimiter";
22
22
  export { readAndParse } from "./readAndParse";
23
23
  export { IProgress, runWithRetry } from "./runWithRetry";
24
- export { combineAppAndProtocolSummary, getDocAttributesFromProtocolSummary, getQuorumValuesFromProtocolSummary, } from "./summaryForCreateNew";
24
+ export { combineAppAndProtocolSummary, CombinedAppAndProtocolSummary, getDocAttributesFromProtocolSummary, getQuorumValuesFromProtocolSummary, isCombinedAppAndProtocolSummary, } from "./summaryForCreateNew";
25
25
  export { convertSummaryTreeToSnapshotITree } from "./treeConversions";
26
26
  export { convertSnapshotAndBlobsToSummaryTree, ISummaryTreeAssemblerProps, SummaryTreeAssembler } from "./treeUtils";
27
27
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AACrF,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAC;AACtF,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAChF,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,iBA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,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EACN,4BAA4B,EAC5B,6BAA6B,EAC7B,mCAAmC,EACnC,kCAAkC,EAClC,+BAA+B,GAC/B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,iCAAiC,EAAE,MAAM,mBAAmB,CAAC;AACtE,OAAO,EAAE,oCAAoC,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC"}
package/dist/index.js CHANGED
@@ -4,8 +4,8 @@
4
4
  * Licensed under the MIT License.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.convertSummaryTreeToSnapshotITree = exports.getQuorumValuesFromProtocolSummary = exports.getDocAttributesFromProtocolSummary = exports.combineAppAndProtocolSummary = exports.runWithRetry = exports.readAndParse = exports.RateLimiter = exports.PrefetchDocumentStorageService = exports.streamObserver = exports.streamFromMessages = exports.requestOps = exports.Queue = exports.ParallelRequests = exports.emptyMessageStream = exports.waitForConnectedState = 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.MultiUrlResolver = exports.configurableUrlResolver = exports.MultiDocumentServiceFactory = exports.MessageType2 = exports.isUnpackedRuntimeMessage = exports.isRuntimeMessage = exports.canBeCoalescedByService = exports.MapWithExpiration = exports.InsecureUrlResolver = exports.isFluidResolvedUrl = exports.ensureFluidResolvedUrl = exports.UsageError = exports.EmptyDocumentDeltaStorageService = exports.DocumentStorageServiceProxy = exports.buildSnapshotTree = exports.BlobCacheStorageService = exports.SnapshotExtractor = exports.BlobAggregationStorage = void 0;
8
- exports.SummaryTreeAssembler = exports.convertSnapshotAndBlobsToSummaryTree = void 0;
7
+ exports.isCombinedAppAndProtocolSummary = exports.getQuorumValuesFromProtocolSummary = exports.getDocAttributesFromProtocolSummary = exports.combineAppAndProtocolSummary = exports.runWithRetry = exports.readAndParse = exports.RateLimiter = exports.PrefetchDocumentStorageService = exports.streamObserver = exports.streamFromMessages = exports.requestOps = exports.Queue = exports.ParallelRequests = exports.emptyMessageStream = exports.waitForConnectedState = 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.MultiUrlResolver = exports.configurableUrlResolver = exports.MultiDocumentServiceFactory = exports.MessageType2 = exports.isUnpackedRuntimeMessage = exports.isRuntimeMessage = exports.canBeCoalescedByService = exports.MapWithExpiration = exports.InsecureUrlResolver = exports.isFluidResolvedUrl = exports.ensureFluidResolvedUrl = exports.UsageError = exports.EmptyDocumentDeltaStorageService = exports.DocumentStorageServiceProxy = exports.buildSnapshotTree = exports.BlobCacheStorageService = exports.SnapshotExtractor = exports.BlobAggregationStorage = void 0;
8
+ exports.SummaryTreeAssembler = exports.convertSnapshotAndBlobsToSummaryTree = exports.convertSummaryTreeToSnapshotITree = void 0;
9
9
  var blobAggregationStorage_1 = require("./blobAggregationStorage");
10
10
  Object.defineProperty(exports, "BlobAggregationStorage", { enumerable: true, get: function () { return blobAggregationStorage_1.BlobAggregationStorage; } });
11
11
  Object.defineProperty(exports, "SnapshotExtractor", { enumerable: true, get: function () { return blobAggregationStorage_1.SnapshotExtractor; } });
@@ -75,6 +75,7 @@ var summaryForCreateNew_1 = require("./summaryForCreateNew");
75
75
  Object.defineProperty(exports, "combineAppAndProtocolSummary", { enumerable: true, get: function () { return summaryForCreateNew_1.combineAppAndProtocolSummary; } });
76
76
  Object.defineProperty(exports, "getDocAttributesFromProtocolSummary", { enumerable: true, get: function () { return summaryForCreateNew_1.getDocAttributesFromProtocolSummary; } });
77
77
  Object.defineProperty(exports, "getQuorumValuesFromProtocolSummary", { enumerable: true, get: function () { return summaryForCreateNew_1.getQuorumValuesFromProtocolSummary; } });
78
+ Object.defineProperty(exports, "isCombinedAppAndProtocolSummary", { enumerable: true, get: function () { return summaryForCreateNew_1.isCombinedAppAndProtocolSummary; } });
78
79
  var treeConversions_1 = require("./treeConversions");
79
80
  Object.defineProperty(exports, "convertSummaryTreeToSnapshotITree", { enumerable: true, get: function () { return treeConversions_1.convertSummaryTreeToSnapshotITree; } });
80
81
  var treeUtils_1 = require("./treeUtils");
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;AAEH,mEAAqF;AAA5E,gIAAA,sBAAsB,OAAA;AAAE,2HAAA,iBAAiB,OAAA;AAClD,qEAAoE;AAA3D,kIAAA,uBAAuB,OAAA;AAChC,yDAAwD;AAA/C,sHAAA,iBAAiB,OAAA;AAC1B,6EAA4E;AAAnE,0IAAA,2BAA2B,OAAA;AACpC,uFAAsF;AAA7E,oJAAA,gCAAgC,OAAA;AACzC,iCAAqC;AAA5B,mGAAA,UAAU,OAAA;AACnB,uDAAgF;AAAvE,0HAAA,sBAAsB,OAAA;AAAE,sHAAA,kBAAkB,OAAA;AACnD,6DAA4D;AAAnD,0HAAA,mBAAmB,OAAA;AAC5B,yDAAwD;AAA/C,sHAAA,iBAAiB,OAAA;AAC1B,2DAK8B;AAJ7B,6HAAA,uBAAuB,OAAA;AACvB,sHAAA,gBAAgB,OAAA;AAChB,8HAA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ourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { BlobAggregationStorage, SnapshotExtractor } from \"./blobAggregationStorage\";\nexport { BlobCacheStorageService } from \"./blobCacheStorageService\";\nexport { buildSnapshotTree } from \"./buildSnapshotTree\";\nexport { DocumentStorageServiceProxy } from \"./documentStorageServiceProxy\";\nexport { EmptyDocumentDeltaStorageService } from \"./emptyDocumentDeltaStorageService\";\nexport { UsageError } from \"./error\";\nexport { ensureFluidResolvedUrl, isFluidResolvedUrl } from \"./fluidResolvedUrl\";\nexport { InsecureUrlResolver } from \"./insecureUrlResolver\";\nexport { MapWithExpiration } from \"./mapWithExpiration\";\nexport {\n\tcanBeCoalescedByService,\n\tisRuntimeMessage,\n\tisUnpackedRuntimeMessage,\n\tMessageType2,\n} from \"./messageRecognition\";\nexport { MultiDocumentServiceFactory } from \"./multiDocumentServiceFactory\";\nexport { configurableUrlResolver, MultiUrlResolver } from \"./multiUrlResolver\";\nexport {\n\tAuthorizationError,\n\tcanRetryOnError,\n\tcreateGenericNetworkError,\n\tcreateWriteError,\n\tDeltaStreamConnectionForbiddenError,\n\tDriverErrorTelemetryProps,\n\tFluidInvalidSchemaError,\n\tGenericNetworkError,\n\tgetRetryDelayFromError,\n\tgetRetryDelaySecondsFromError,\n\tIAnyDriverError,\n\tisOnline,\n\tLocationRedirectionError,\n\tNetworkErrorBasic,\n\tNonRetryableError,\n\tOnlineStatus,\n\tRetryableError,\n\tThrottlingError,\n} from \"./network\";\nexport { logNetworkFailure, waitForConnectedState } from \"./networkUtils\";\nexport {\n\temptyMessageStream,\n\tParallelRequests,\n\tQueue,\n\trequestOps,\n\tstreamFromMessages,\n\tstreamObserver,\n} from \"./parallelRequests\";\nexport { PrefetchDocumentStorageService } from \"./prefetchDocumentStorageService\";\nexport { RateLimiter } from \"./rateLimiter\";\nexport { readAndParse } from \"./readAndParse\";\nexport { IProgress, runWithRetry } from \"./runWithRetry\";\nexport {\n\tcombineAppAndProtocolSummary,\n\tgetDocAttributesFromProtocolSummary,\n\tgetQuorumValuesFromProtocolSummary,\n} from \"./summaryForCreateNew\";\nexport { convertSummaryTreeToSnapshotITree } from \"./treeConversions\";\nexport { convertSnapshotAndBlobsToSummaryTree, ISummaryTreeAssemblerProps, SummaryTreeAssembler } from \"./treeUtils\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;AAEH,mEAAqF;AAA5E,gIAAA,sBAAsB,OAAA;AAAE,2HAAA,iBAAiB,OAAA;AAClD,qEAAoE;AAA3D,kIAAA,uBAAuB,OAAA;AAChC,yDAAwD;AAA/C,sHAAA,iBAAiB,OAAA;AAC1B,6EAA4E;AAAnE,0IAAA,2BAA2B,OAAA;AACpC,uFAAsF;AAA7E,oJAAA,gCAAgC,OAAA;AACzC,iCAAqC;AAA5B,mGAAA,UAAU,OAAA;AACnB,uDAAgF;AAAvE,0HAAA,sBAAsB,OAAA;AAAE,sHAAA,kBAAkB,OAAA;AACnD,6DAA4D;AAAnD,0HAAA,mBAAmB,OAAA;AAC5B,yDAAwD;AAA/C,sHAAA,iBAAiB,OAAA;AAC1B,2DAK8B;AAJ7B,6HAAA,uBAAuB,OAAA;AACvB,sHAAA,gBAAgB,OAAA;AAChB,8HAAA,wBAAwB,OAAA;AACxB,kHAAA,YAAY,OAAA;AAEb,6EAA4E;AAAnE,0IAAA,2BAA2B,OAAA;AACpC,uDAA+E;AAAtE,2HAAA,uBAAuB,OAAA;AAAE,oHAAA,gBAAgB,OAAA;AAClD,qCAmBmB;AAlBlB,6GAAA,kBAAkB,OAAA;AAClB,0GAAA,eAAe,OAAA;AACf,oHAAA,yBAAyB,OAAA;AACzB,2GAAA,gBAAgB,OAAA;AAChB,8HAAA,mCAAmC,OAAA;AAEnC,kHAAA,uBAAuB,OAAA;AACvB,8GAAA,mBAAmB,OAAA;AACnB,iHAAA,sBAAsB,OAAA;AACtB,wHAAA,6BAA6B,OAAA;AAE7B,mGAAA,QAAQ,OAAA;AACR,mHAAA,wBAAwB,OAAA;AACxB,4GAAA,iBAAiB,OAAA;AACjB,4GAAA,iBAAiB,OAAA;AACjB,uGAAA,YAAY,OAAA;AACZ,yGAAA,cAAc,OAAA;AACd,0GAAA,eAAe,OAAA;AAEhB,+CAA0E;AAAjE,iHAAA,iBAAiB,OAAA;AAAE,qHAAA,qBAAqB,OAAA;AACjD,uDAO4B;AAN3B,sHAAA,kBAAkB,OAAA;AAClB,oHAAA,gBAAgB,OAAA;AAChB,yGAAA,KAAK,OAAA;AACL,8GAAA,UAAU,OAAA;AACV,sHAAA,kBAAkB,OAAA;AAClB,kHAAA,cAAc,OAAA;AAEf,mFAAkF;AAAzE,gJAAA,8BAA8B,OAAA;AACvC,6CAA4C;AAAnC,0GAAA,WAAW,OAAA;AACpB,+CAA8C;AAArC,4GAAA,YAAY,OAAA;AACrB,+CAAyD;AAArC,4GAAA,YAAY,OAAA;AAChC,6DAM+B;AAL9B,mIAAA,4BAA4B,OAAA;AAE5B,0IAAA,mCAAmC,OAAA;AACnC,yIAAA,kCAAkC,OAAA;AAClC,sIAAA,+BAA+B,OAAA;AAEhC,qDAAsE;AAA7D,oIAAA,iCAAiC,OAAA;AAC1C,yCAAqH;AAA5G,iIAAA,oCAAoC,OAAA;AAA8B,iHAAA,oBAAoB,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { BlobAggregationStorage, SnapshotExtractor } from \"./blobAggregationStorage\";\nexport { BlobCacheStorageService } from \"./blobCacheStorageService\";\nexport { buildSnapshotTree } from \"./buildSnapshotTree\";\nexport { DocumentStorageServiceProxy } from \"./documentStorageServiceProxy\";\nexport { EmptyDocumentDeltaStorageService } from \"./emptyDocumentDeltaStorageService\";\nexport { UsageError } from \"./error\";\nexport { ensureFluidResolvedUrl, isFluidResolvedUrl } from \"./fluidResolvedUrl\";\nexport { InsecureUrlResolver } from \"./insecureUrlResolver\";\nexport { MapWithExpiration } from \"./mapWithExpiration\";\nexport {\n\tcanBeCoalescedByService,\n\tisRuntimeMessage,\n\tisUnpackedRuntimeMessage,\n\tMessageType2,\n} from \"./messageRecognition\";\nexport { MultiDocumentServiceFactory } from \"./multiDocumentServiceFactory\";\nexport { configurableUrlResolver, MultiUrlResolver } from \"./multiUrlResolver\";\nexport {\n\tAuthorizationError,\n\tcanRetryOnError,\n\tcreateGenericNetworkError,\n\tcreateWriteError,\n\tDeltaStreamConnectionForbiddenError,\n\tDriverErrorTelemetryProps,\n\tFluidInvalidSchemaError,\n\tGenericNetworkError,\n\tgetRetryDelayFromError,\n\tgetRetryDelaySecondsFromError,\n\tIAnyDriverError,\n\tisOnline,\n\tLocationRedirectionError,\n\tNetworkErrorBasic,\n\tNonRetryableError,\n\tOnlineStatus,\n\tRetryableError,\n\tThrottlingError,\n} from \"./network\";\nexport { logNetworkFailure, waitForConnectedState } from \"./networkUtils\";\nexport {\n\temptyMessageStream,\n\tParallelRequests,\n\tQueue,\n\trequestOps,\n\tstreamFromMessages,\n\tstreamObserver,\n} from \"./parallelRequests\";\nexport { PrefetchDocumentStorageService } from \"./prefetchDocumentStorageService\";\nexport { RateLimiter } from \"./rateLimiter\";\nexport { readAndParse } from \"./readAndParse\";\nexport { IProgress, runWithRetry } from \"./runWithRetry\";\nexport {\n\tcombineAppAndProtocolSummary,\n\tCombinedAppAndProtocolSummary,\n\tgetDocAttributesFromProtocolSummary,\n\tgetQuorumValuesFromProtocolSummary,\n\tisCombinedAppAndProtocolSummary,\n} from \"./summaryForCreateNew\";\nexport { convertSummaryTreeToSnapshotITree } from \"./treeConversions\";\nexport { convertSnapshotAndBlobsToSummaryTree, ISummaryTreeAssemblerProps, SummaryTreeAssembler } from \"./treeUtils\";\n"]}
@@ -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.0.0-internal.2.4.2";
8
+ export declare const pkgVersion = "2.0.0-internal.2.4.3";
9
9
  //# sourceMappingURL=packageVersion.d.ts.map
@@ -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.0.0-internal.2.4.2";
11
+ exports.pkgVersion = "2.0.0-internal.2.4.3";
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,sBAAsB,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.0.0-internal.2.4.2\";\n"]}
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,sBAAsB,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.0.0-internal.2.4.3\";\n"]}
@@ -3,12 +3,30 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  import { ISummaryTree, ICommittedProposal, IDocumentAttributes } from "@fluidframework/protocol-definitions";
6
+ /**
7
+ * Defines the current layout of an .app + .protocol summary tree
8
+ * this is used internally for create new, and single commit summary
9
+ * @internal
10
+ */
11
+ export interface CombinedAppAndProtocolSummary extends ISummaryTree {
12
+ tree: {
13
+ [".app"]: ISummaryTree;
14
+ [".protocol"]: ISummaryTree;
15
+ };
16
+ }
17
+ /**
18
+ * Validates the current layout of an .app + .protocol summary tree
19
+ * this is used internally for create new, and single commit summary
20
+ * @internal
21
+ */
22
+ export declare function isCombinedAppAndProtocolSummary(summary: ISummaryTree | undefined): summary is CombinedAppAndProtocolSummary;
6
23
  /**
7
24
  * Combine the app summary and protocol summary in 1 tree.
8
25
  * @param appSummary - Summary of the app.
9
26
  * @param protocolSummary - Summary of the protocol.
27
+ * @internal
10
28
  */
11
- export declare function combineAppAndProtocolSummary(appSummary: ISummaryTree, protocolSummary: ISummaryTree): ISummaryTree;
29
+ export declare function combineAppAndProtocolSummary(appSummary: ISummaryTree, protocolSummary: ISummaryTree): CombinedAppAndProtocolSummary;
12
30
  /**
13
31
  * Extract the attributes from the protocol summary.
14
32
  * @param protocolSummary - protocol summary from which the values are to be extracted.
@@ -1 +1 @@
1
- {"version":3,"file":"summaryForCreateNew.d.ts","sourceRoot":"","sources":["../src/summaryForCreateNew.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACH,YAAY,EAGZ,kBAAkB,EAClB,mBAAmB,EACtB,MAAM,sCAAsC,CAAC;AAE9C;;;;GAIG;AACH,wBAAgB,4BAA4B,CACxC,UAAU,EAAE,YAAY,EACxB,eAAe,EAAE,YAAY,GAC9B,YAAY,CASd;AAED;;;GAGG;AACH,wBAAgB,mCAAmC,CAC/C,eAAe,EAAE,YAAY,GAC9B,mBAAmB,CAKrB;AAED;;;GAGG;AACH,wBAAgB,kCAAkC,CAC9C,eAAe,EAAE,YAAY,GAC9B,CAAC,MAAM,EAAE,kBAAkB,CAAC,EAAE,CAIhC"}
1
+ {"version":3,"file":"summaryForCreateNew.d.ts","sourceRoot":"","sources":["../src/summaryForCreateNew.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACH,YAAY,EAGZ,kBAAkB,EAClB,mBAAmB,EACtB,MAAM,sCAAsC,CAAC;AAE9C;;;;GAIG;AACH,MAAM,WAAW,6BAA8B,SAAQ,YAAY;IAClE,IAAI,EAAE;QACL,CAAC,MAAM,CAAC,EAAE,YAAY,CAAC;QACvB,CAAC,WAAW,CAAC,EAAE,YAAY,CAAC;KAC5B,CAAC;CACF;AAED;;;;GAIG;AACH,wBAAgB,+BAA+B,CAC9C,OAAO,EAAE,YAAY,GAAG,SAAS,GAC/B,OAAO,IAAI,6BAA6B,CAa1C;AAED;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAC3C,UAAU,EAAE,YAAY,EACxB,eAAe,EAAE,YAAY,GAC3B,6BAA6B,CAiB/B;AAED;;;GAGG;AACH,wBAAgB,mCAAmC,CAC/C,eAAe,EAAE,YAAY,GAC9B,mBAAmB,CAKrB;AAED;;;GAGG;AACH,wBAAgB,kCAAkC,CAC9C,eAAe,EAAE,YAAY,GAC9B,CAAC,MAAM,EAAE,kBAAkB,CAAC,EAAE,CAIhC"}
@@ -4,14 +4,37 @@
4
4
  * Licensed under the MIT License.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.getQuorumValuesFromProtocolSummary = exports.getDocAttributesFromProtocolSummary = exports.combineAppAndProtocolSummary = void 0;
7
+ exports.getQuorumValuesFromProtocolSummary = exports.getDocAttributesFromProtocolSummary = exports.combineAppAndProtocolSummary = exports.isCombinedAppAndProtocolSummary = void 0;
8
+ const common_utils_1 = require("@fluidframework/common-utils");
8
9
  const protocol_definitions_1 = require("@fluidframework/protocol-definitions");
10
+ /**
11
+ * Validates the current layout of an .app + .protocol summary tree
12
+ * this is used internally for create new, and single commit summary
13
+ * @internal
14
+ */
15
+ function isCombinedAppAndProtocolSummary(summary) {
16
+ var _a, _b, _c, _d;
17
+ if ((summary === null || summary === void 0 ? void 0 : summary.tree) === undefined ||
18
+ ((_b = (_a = summary.tree) === null || _a === void 0 ? void 0 : _a[".app"]) === null || _b === void 0 ? void 0 : _b.type) !== protocol_definitions_1.SummaryType.Tree ||
19
+ ((_d = (_c = summary.tree) === null || _c === void 0 ? void 0 : _c[".protocol"]) === null || _d === void 0 ? void 0 : _d.type) !== protocol_definitions_1.SummaryType.Tree) {
20
+ return false;
21
+ }
22
+ const treeKeys = Object.keys(summary.tree);
23
+ if (treeKeys.length !== 2) {
24
+ return false;
25
+ }
26
+ return true;
27
+ }
28
+ exports.isCombinedAppAndProtocolSummary = isCombinedAppAndProtocolSummary;
9
29
  /**
10
30
  * Combine the app summary and protocol summary in 1 tree.
11
31
  * @param appSummary - Summary of the app.
12
32
  * @param protocolSummary - Summary of the protocol.
33
+ * @internal
13
34
  */
14
35
  function combineAppAndProtocolSummary(appSummary, protocolSummary) {
36
+ (0, common_utils_1.assert)(!isCombinedAppAndProtocolSummary(appSummary), 0x5a8 /* app summary is already a combined tree! */);
37
+ (0, common_utils_1.assert)(!isCombinedAppAndProtocolSummary(protocolSummary), 0x5a9 /* protocol summary is already a combined tree! */);
15
38
  const createNewSummary = {
16
39
  type: protocol_definitions_1.SummaryType.Tree,
17
40
  tree: {
@@ -1 +1 @@
1
- {"version":3,"file":"summaryForCreateNew.js","sourceRoot":"","sources":["../src/summaryForCreateNew.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+EAM8C;AAE9C;;;;GAIG;AACH,SAAgB,4BAA4B,CACxC,UAAwB,EACxB,eAA6B;IAE7B,MAAM,gBAAgB,GAAiB;QACnC,IAAI,EAAE,kCAAW,CAAC,IAAI;QACtB,IAAI,EAAE;YACF,WAAW,EAAE,eAAe;YAC5B,MAAM,EAAE,UAAU;SACrB;KACJ,CAAC;IACF,OAAO,gBAAgB,CAAC;AAC5B,CAAC;AAZD,oEAYC;AAED;;;GAGG;AACH,SAAgB,mCAAmC,CAC/C,eAA6B;;IAE7B,MAAM,cAAc,GAAG,eAAe,CAAC,IAAI,CAAC,UAA0B,CAAC;IACvE,MAAM,kBAAkB,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAiB,CAAwB,CAAC;IAC/F,kBAAkB,CAAC,IAAI,GAAG,MAAA,kBAAkB,CAAC,IAAI,mCAAI,CAAC,CAAC;IACvD,OAAO,kBAAkB,CAAC;AAC9B,CAAC;AAPD,kFAOC;AAED;;;GAGG;AACH,SAAgB,kCAAkC,CAC9C,eAA6B;IAE7B,MAAM,gBAAgB,GAAG,eAAe,CAAC,IAAI,CAAC,YAA4B,CAAC;IAC3E,MAAM,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,OAAiB,CAAmC,CAAC;IACtG,OAAO,YAAY,CAAC;AACxB,CAAC;AAND,gFAMC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n ISummaryTree,\n SummaryType,\n ISummaryBlob,\n ICommittedProposal,\n IDocumentAttributes,\n} from \"@fluidframework/protocol-definitions\";\n\n/**\n * Combine the app summary and protocol summary in 1 tree.\n * @param appSummary - Summary of the app.\n * @param protocolSummary - Summary of the protocol.\n */\nexport function combineAppAndProtocolSummary(\n appSummary: ISummaryTree,\n protocolSummary: ISummaryTree,\n): ISummaryTree {\n const createNewSummary: ISummaryTree = {\n type: SummaryType.Tree,\n tree: {\n \".protocol\": protocolSummary,\n \".app\": appSummary,\n },\n };\n return createNewSummary;\n}\n\n/**\n * Extract the attributes from the protocol summary.\n * @param protocolSummary - protocol summary from which the values are to be extracted.\n */\nexport function getDocAttributesFromProtocolSummary(\n protocolSummary: ISummaryTree,\n): IDocumentAttributes {\n const attributesBlob = protocolSummary.tree.attributes as ISummaryBlob;\n const documentAttributes = JSON.parse(attributesBlob.content as string) as IDocumentAttributes;\n documentAttributes.term = documentAttributes.term ?? 1;\n return documentAttributes;\n}\n\n/**\n * Extract quorum values from the protocol summary.\n * @param protocolSummary - protocol summary from which the values are to be extracted.\n */\nexport function getQuorumValuesFromProtocolSummary(\n protocolSummary: ISummaryTree,\n): [string, ICommittedProposal][] {\n const quorumValuesBlob = protocolSummary.tree.quorumValues as ISummaryBlob;\n const quorumValues = JSON.parse(quorumValuesBlob.content as string) as [string, ICommittedProposal][];\n return quorumValues;\n}\n"]}
1
+ {"version":3,"file":"summaryForCreateNew.js","sourceRoot":"","sources":["../src/summaryForCreateNew.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+DAAsD;AACtD,+EAM8C;AAc9C;;;;GAIG;AACH,SAAgB,+BAA+B,CAC9C,OAAiC;;IAEjC,IACC,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,MAAK,SAAS;QAC3B,CAAA,MAAA,MAAA,OAAO,CAAC,IAAI,0CAAG,MAAM,CAAC,0CAAE,IAAI,MAAK,kCAAW,CAAC,IAAI;QACjD,CAAA,MAAA,MAAA,OAAO,CAAC,IAAI,0CAAG,WAAW,CAAC,0CAAE,IAAI,MAAK,kCAAW,CAAC,IAAI,EACrD;QACD,OAAO,KAAK,CAAC;KACb;IACD,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3C,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;QAC1B,OAAO,KAAK,CAAC;KACb;IACD,OAAO,IAAI,CAAC;AACb,CAAC;AAfD,0EAeC;AAED;;;;;GAKG;AACH,SAAgB,4BAA4B,CAC3C,UAAwB,EACxB,eAA6B;IAE7B,IAAA,qBAAM,EACL,CAAC,+BAA+B,CAAC,UAAU,CAAC,EAC5C,KAAK,CAAC,6CAA6C,CACnD,CAAC;IACF,IAAA,qBAAM,EACL,CAAC,+BAA+B,CAAC,eAAe,CAAC,EACjD,KAAK,CAAC,kDAAkD,CACxD,CAAC;IACF,MAAM,gBAAgB,GAAkC;QACvD,IAAI,EAAE,kCAAW,CAAC,IAAI;QACtB,IAAI,EAAE;YACL,WAAW,EAAE,eAAe;YAC5B,MAAM,EAAE,UAAU;SAClB;KACD,CAAC;IACF,OAAO,gBAAgB,CAAC;AACzB,CAAC;AApBD,oEAoBC;AAED;;;GAGG;AACH,SAAgB,mCAAmC,CAC/C,eAA6B;;IAE7B,MAAM,cAAc,GAAG,eAAe,CAAC,IAAI,CAAC,UAA0B,CAAC;IACvE,MAAM,kBAAkB,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAiB,CAAwB,CAAC;IAC/F,kBAAkB,CAAC,IAAI,GAAG,MAAA,kBAAkB,CAAC,IAAI,mCAAI,CAAC,CAAC;IACvD,OAAO,kBAAkB,CAAC;AAC9B,CAAC;AAPD,kFAOC;AAED;;;GAGG;AACH,SAAgB,kCAAkC,CAC9C,eAA6B;IAE7B,MAAM,gBAAgB,GAAG,eAAe,CAAC,IAAI,CAAC,YAA4B,CAAC;IAC3E,MAAM,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,OAAiB,CAAmC,CAAC;IACtG,OAAO,YAAY,CAAC;AACxB,CAAC;AAND,gFAMC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/common-utils\";\nimport {\n ISummaryTree,\n SummaryType,\n ISummaryBlob,\n ICommittedProposal,\n IDocumentAttributes,\n} from \"@fluidframework/protocol-definitions\";\n\n/**\n * Defines the current layout of an .app + .protocol summary tree\n * this is used internally for create new, and single commit summary\n * @internal\n */\nexport interface CombinedAppAndProtocolSummary extends ISummaryTree {\n\ttree: {\n\t\t[\".app\"]: ISummaryTree;\n\t\t[\".protocol\"]: ISummaryTree;\n\t};\n}\n\n/**\n * Validates the current layout of an .app + .protocol summary tree\n * this is used internally for create new, and single commit summary\n * @internal\n */\nexport function isCombinedAppAndProtocolSummary(\n\tsummary: ISummaryTree | undefined,\n): summary is CombinedAppAndProtocolSummary {\n\tif (\n\t\tsummary?.tree === undefined ||\n\t\tsummary.tree?.[\".app\"]?.type !== SummaryType.Tree ||\n\t\tsummary.tree?.[\".protocol\"]?.type !== SummaryType.Tree\n\t) {\n\t\treturn false;\n\t}\n\tconst treeKeys = Object.keys(summary.tree);\n\tif (treeKeys.length !== 2) {\n\t\treturn false;\n\t}\n\treturn true;\n}\n\n/**\n * Combine the app summary and protocol summary in 1 tree.\n * @param appSummary - Summary of the app.\n * @param protocolSummary - Summary of the protocol.\n * @internal\n */\nexport function combineAppAndProtocolSummary(\n\tappSummary: ISummaryTree,\n\tprotocolSummary: ISummaryTree,\n): CombinedAppAndProtocolSummary {\n\tassert(\n\t\t!isCombinedAppAndProtocolSummary(appSummary),\n\t\t0x5a8 /* app summary is already a combined tree! */,\n\t);\n\tassert(\n\t\t!isCombinedAppAndProtocolSummary(protocolSummary),\n\t\t0x5a9 /* protocol summary is already a combined tree! */,\n\t);\n\tconst createNewSummary: CombinedAppAndProtocolSummary = {\n\t\ttype: SummaryType.Tree,\n\t\ttree: {\n\t\t\t\".protocol\": protocolSummary,\n\t\t\t\".app\": appSummary,\n\t\t},\n\t};\n\treturn createNewSummary;\n}\n\n/**\n * Extract the attributes from the protocol summary.\n * @param protocolSummary - protocol summary from which the values are to be extracted.\n */\nexport function getDocAttributesFromProtocolSummary(\n protocolSummary: ISummaryTree,\n): IDocumentAttributes {\n const attributesBlob = protocolSummary.tree.attributes as ISummaryBlob;\n const documentAttributes = JSON.parse(attributesBlob.content as string) as IDocumentAttributes;\n documentAttributes.term = documentAttributes.term ?? 1;\n return documentAttributes;\n}\n\n/**\n * Extract quorum values from the protocol summary.\n * @param protocolSummary - protocol summary from which the values are to be extracted.\n */\nexport function getQuorumValuesFromProtocolSummary(\n protocolSummary: ISummaryTree,\n): [string, ICommittedProposal][] {\n const quorumValuesBlob = protocolSummary.tree.quorumValues as ISummaryBlob;\n const quorumValues = JSON.parse(quorumValuesBlob.content as string) as [string, ICommittedProposal][];\n return quorumValues;\n}\n"]}
package/lib/index.d.ts CHANGED
@@ -21,7 +21,7 @@ export { PrefetchDocumentStorageService } from "./prefetchDocumentStorageService
21
21
  export { RateLimiter } from "./rateLimiter";
22
22
  export { readAndParse } from "./readAndParse";
23
23
  export { IProgress, runWithRetry } from "./runWithRetry";
24
- export { combineAppAndProtocolSummary, getDocAttributesFromProtocolSummary, getQuorumValuesFromProtocolSummary, } from "./summaryForCreateNew";
24
+ export { combineAppAndProtocolSummary, CombinedAppAndProtocolSummary, getDocAttributesFromProtocolSummary, getQuorumValuesFromProtocolSummary, isCombinedAppAndProtocolSummary, } from "./summaryForCreateNew";
25
25
  export { convertSummaryTreeToSnapshotITree } from "./treeConversions";
26
26
  export { convertSnapshotAndBlobsToSummaryTree, ISummaryTreeAssemblerProps, SummaryTreeAssembler } from "./treeUtils";
27
27
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AACrF,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAC;AACtF,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAChF,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EACN,uBAAuB,EACvB,gBAAgB,EAChB,wBAAwB,EACxB,YAAY,GACZ,MAAM,sBAAsB,CAAC;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Y,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EACN,4BAA4B,EAC5B,6BAA6B,EAC7B,mCAAmC,EACnC,kCAAkC,EAClC,+BAA+B,GAC/B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,iCAAiC,EAAE,MAAM,mBAAmB,CAAC;AACtE,OAAO,EAAE,oCAAoC,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC"}
package/lib/index.js CHANGED
@@ -21,7 +21,7 @@ export { PrefetchDocumentStorageService } from "./prefetchDocumentStorageService
21
21
  export { RateLimiter } from "./rateLimiter";
22
22
  export { readAndParse } from "./readAndParse";
23
23
  export { runWithRetry } from "./runWithRetry";
24
- export { combineAppAndProtocolSummary, getDocAttributesFromProtocolSummary, getQuorumValuesFromProtocolSummary, } from "./summaryForCreateNew";
24
+ export { combineAppAndProtocolSummary, getDocAttributesFromProtocolSummary, getQuorumValuesFromProtocolSummary, isCombinedAppAndProtocolSummary, } from "./summaryForCreateNew";
25
25
  export { convertSummaryTreeToSnapshotITree } from "./treeConversions";
26
26
  export { convertSnapshotAndBlobsToSummaryTree, SummaryTreeAssembler } from "./treeUtils";
27
27
  //# 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,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AACrF,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAC;AACtF,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,sBAAsB,EAAE,kBAAk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contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { BlobAggregationStorage, SnapshotExtractor } from \"./blobAggregationStorage\";\nexport { BlobCacheStorageService } from \"./blobCacheStorageService\";\nexport { buildSnapshotTree } from \"./buildSnapshotTree\";\nexport { DocumentStorageServiceProxy } from \"./documentStorageServiceProxy\";\nexport { EmptyDocumentDeltaStorageService } from \"./emptyDocumentDeltaStorageService\";\nexport { UsageError } from \"./error\";\nexport { ensureFluidResolvedUrl, isFluidResolvedUrl } from \"./fluidResolvedUrl\";\nexport { InsecureUrlResolver } from \"./insecureUrlResolver\";\nexport { MapWithExpiration } from \"./mapWithExpiration\";\nexport {\n\tcanBeCoalescedByService,\n\tisRuntimeMessage,\n\tisUnpackedRuntimeMessage,\n\tMessageType2,\n} from \"./messageRecognition\";\nexport { MultiDocumentServiceFactory } from \"./multiDocumentServiceFactory\";\nexport { configurableUrlResolver, MultiUrlResolver } from \"./multiUrlResolver\";\nexport {\n\tAuthorizationError,\n\tcanRetryOnError,\n\tcreateGenericNetworkError,\n\tcreateWriteError,\n\tDeltaStreamConnectionForbiddenError,\n\tDriverErrorTelemetryProps,\n\tFluidInvalidSchemaError,\n\tGenericNetworkError,\n\tgetRetryDelayFromError,\n\tgetRetryDelaySecondsFromError,\n\tIAnyDriverError,\n\tisOnline,\n\tLocationRedirectionError,\n\tNetworkErrorBasic,\n\tNonRetryableError,\n\tOnlineStatus,\n\tRetryableError,\n\tThrottlingError,\n} from \"./network\";\nexport { logNetworkFailure, waitForConnectedState } from \"./networkUtils\";\nexport {\n\temptyMessageStream,\n\tParallelRequests,\n\tQueue,\n\trequestOps,\n\tstreamFromMessages,\n\tstreamObserver,\n} from \"./parallelRequests\";\nexport { PrefetchDocumentStorageService } from \"./prefetchDocumentStorageService\";\nexport { RateLimiter } from \"./rateLimiter\";\nexport { readAndParse } from \"./readAndParse\";\nexport { IProgress, runWithRetry } from \"./runWithRetry\";\nexport {\n\tcombineAppAndProtocolSummary,\n\tgetDocAttributesFromProtocolSummary,\n\tgetQuorumValuesFromProtocolSummary,\n} from \"./summaryForCreateNew\";\nexport { convertSummaryTreeToSnapshotITree } from \"./treeConversions\";\nexport { convertSnapshotAndBlobsToSummaryTree, ISummaryTreeAssemblerProps, SummaryTreeAssembler } from \"./treeUtils\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AACrF,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAC;AACtF,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAChF,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EACN,uBAAuB,EACvB,gBAAgB,EAChB,wBAAwB,EACxB,YAAY,GACZ,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC/E,OAAO,EACN,kBAAkB,EAClB,eAAe,EACf,yBAAyB,EACzB,gBAAgB,EAChB,mCAAmC,EAEnC,uBAAuB,EACvB,mBAAmB,EACnB,sBAAsB,EACtB,6BAA6B,EAE7B,QAAQ,EACR,wBAAwB,EACxB,iBAAiB,EACjB,iBAAiB,EACjB,YAAY,EACZ,cAAc,EACd,eAAe,GACf,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAC1E,OAAO,EACN,kBAAkB,EAClB,gBAAgB,EAChB,KAAK,EACL,UAAU,EACV,kBAAkB,EAClB,cAAc,GACd,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAClF,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAa,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EACN,4BAA4B,EAE5B,mCAAmC,EACnC,kCAAkC,EAClC,+BAA+B,GAC/B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,iCAAiC,EAAE,MAAM,mBAAmB,CAAC;AACtE,OAAO,EAAE,oCAAoC,EAA8B,oBAAoB,EAAE,MAAM,aAAa,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { BlobAggregationStorage, SnapshotExtractor } from \"./blobAggregationStorage\";\nexport { BlobCacheStorageService } from \"./blobCacheStorageService\";\nexport { buildSnapshotTree } from \"./buildSnapshotTree\";\nexport { DocumentStorageServiceProxy } from \"./documentStorageServiceProxy\";\nexport { EmptyDocumentDeltaStorageService } from \"./emptyDocumentDeltaStorageService\";\nexport { UsageError } from \"./error\";\nexport { ensureFluidResolvedUrl, isFluidResolvedUrl } from \"./fluidResolvedUrl\";\nexport { InsecureUrlResolver } from \"./insecureUrlResolver\";\nexport { MapWithExpiration } from \"./mapWithExpiration\";\nexport {\n\tcanBeCoalescedByService,\n\tisRuntimeMessage,\n\tisUnpackedRuntimeMessage,\n\tMessageType2,\n} from \"./messageRecognition\";\nexport { MultiDocumentServiceFactory } from \"./multiDocumentServiceFactory\";\nexport { configurableUrlResolver, MultiUrlResolver } from \"./multiUrlResolver\";\nexport {\n\tAuthorizationError,\n\tcanRetryOnError,\n\tcreateGenericNetworkError,\n\tcreateWriteError,\n\tDeltaStreamConnectionForbiddenError,\n\tDriverErrorTelemetryProps,\n\tFluidInvalidSchemaError,\n\tGenericNetworkError,\n\tgetRetryDelayFromError,\n\tgetRetryDelaySecondsFromError,\n\tIAnyDriverError,\n\tisOnline,\n\tLocationRedirectionError,\n\tNetworkErrorBasic,\n\tNonRetryableError,\n\tOnlineStatus,\n\tRetryableError,\n\tThrottlingError,\n} from \"./network\";\nexport { logNetworkFailure, waitForConnectedState } from \"./networkUtils\";\nexport {\n\temptyMessageStream,\n\tParallelRequests,\n\tQueue,\n\trequestOps,\n\tstreamFromMessages,\n\tstreamObserver,\n} from \"./parallelRequests\";\nexport { PrefetchDocumentStorageService } from \"./prefetchDocumentStorageService\";\nexport { RateLimiter } from \"./rateLimiter\";\nexport { readAndParse } from \"./readAndParse\";\nexport { IProgress, runWithRetry } from \"./runWithRetry\";\nexport {\n\tcombineAppAndProtocolSummary,\n\tCombinedAppAndProtocolSummary,\n\tgetDocAttributesFromProtocolSummary,\n\tgetQuorumValuesFromProtocolSummary,\n\tisCombinedAppAndProtocolSummary,\n} from \"./summaryForCreateNew\";\nexport { convertSummaryTreeToSnapshotITree } from \"./treeConversions\";\nexport { convertSnapshotAndBlobsToSummaryTree, ISummaryTreeAssemblerProps, SummaryTreeAssembler } from \"./treeUtils\";\n"]}
@@ -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.0.0-internal.2.4.2";
8
+ export declare const pkgVersion = "2.0.0-internal.2.4.3";
9
9
  //# sourceMappingURL=packageVersion.d.ts.map
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export const pkgName = "@fluidframework/driver-utils";
8
- export const pkgVersion = "2.0.0-internal.2.4.2";
8
+ export const pkgVersion = "2.0.0-internal.2.4.3";
9
9
  //# sourceMappingURL=packageVersion.js.map
@@ -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,sBAAsB,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.0.0-internal.2.4.2\";\n"]}
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,sBAAsB,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.0.0-internal.2.4.3\";\n"]}
@@ -3,12 +3,30 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  import { ISummaryTree, ICommittedProposal, IDocumentAttributes } from "@fluidframework/protocol-definitions";
6
+ /**
7
+ * Defines the current layout of an .app + .protocol summary tree
8
+ * this is used internally for create new, and single commit summary
9
+ * @internal
10
+ */
11
+ export interface CombinedAppAndProtocolSummary extends ISummaryTree {
12
+ tree: {
13
+ [".app"]: ISummaryTree;
14
+ [".protocol"]: ISummaryTree;
15
+ };
16
+ }
17
+ /**
18
+ * Validates the current layout of an .app + .protocol summary tree
19
+ * this is used internally for create new, and single commit summary
20
+ * @internal
21
+ */
22
+ export declare function isCombinedAppAndProtocolSummary(summary: ISummaryTree | undefined): summary is CombinedAppAndProtocolSummary;
6
23
  /**
7
24
  * Combine the app summary and protocol summary in 1 tree.
8
25
  * @param appSummary - Summary of the app.
9
26
  * @param protocolSummary - Summary of the protocol.
27
+ * @internal
10
28
  */
11
- export declare function combineAppAndProtocolSummary(appSummary: ISummaryTree, protocolSummary: ISummaryTree): ISummaryTree;
29
+ export declare function combineAppAndProtocolSummary(appSummary: ISummaryTree, protocolSummary: ISummaryTree): CombinedAppAndProtocolSummary;
12
30
  /**
13
31
  * Extract the attributes from the protocol summary.
14
32
  * @param protocolSummary - protocol summary from which the values are to be extracted.
@@ -1 +1 @@
1
- {"version":3,"file":"summaryForCreateNew.d.ts","sourceRoot":"","sources":["../src/summaryForCreateNew.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACH,YAAY,EAGZ,kBAAkB,EAClB,mBAAmB,EACtB,MAAM,sCAAsC,CAAC;AAE9C;;;;GAIG;AACH,wBAAgB,4BAA4B,CACxC,UAAU,EAAE,YAAY,EACxB,eAAe,EAAE,YAAY,GAC9B,YAAY,CASd;AAED;;;GAGG;AACH,wBAAgB,mCAAmC,CAC/C,eAAe,EAAE,YAAY,GAC9B,mBAAmB,CAKrB;AAED;;;GAGG;AACH,wBAAgB,kCAAkC,CAC9C,eAAe,EAAE,YAAY,GAC9B,CAAC,MAAM,EAAE,kBAAkB,CAAC,EAAE,CAIhC"}
1
+ {"version":3,"file":"summaryForCreateNew.d.ts","sourceRoot":"","sources":["../src/summaryForCreateNew.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACH,YAAY,EAGZ,kBAAkB,EAClB,mBAAmB,EACtB,MAAM,sCAAsC,CAAC;AAE9C;;;;GAIG;AACH,MAAM,WAAW,6BAA8B,SAAQ,YAAY;IAClE,IAAI,EAAE;QACL,CAAC,MAAM,CAAC,EAAE,YAAY,CAAC;QACvB,CAAC,WAAW,CAAC,EAAE,YAAY,CAAC;KAC5B,CAAC;CACF;AAED;;;;GAIG;AACH,wBAAgB,+BAA+B,CAC9C,OAAO,EAAE,YAAY,GAAG,SAAS,GAC/B,OAAO,IAAI,6BAA6B,CAa1C;AAED;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAC3C,UAAU,EAAE,YAAY,EACxB,eAAe,EAAE,YAAY,GAC3B,6BAA6B,CAiB/B;AAED;;;GAGG;AACH,wBAAgB,mCAAmC,CAC/C,eAAe,EAAE,YAAY,GAC9B,mBAAmB,CAKrB;AAED;;;GAGG;AACH,wBAAgB,kCAAkC,CAC9C,eAAe,EAAE,YAAY,GAC9B,CAAC,MAAM,EAAE,kBAAkB,CAAC,EAAE,CAIhC"}
@@ -2,13 +2,35 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
+ import { assert } from "@fluidframework/common-utils";
5
6
  import { SummaryType, } from "@fluidframework/protocol-definitions";
7
+ /**
8
+ * Validates the current layout of an .app + .protocol summary tree
9
+ * this is used internally for create new, and single commit summary
10
+ * @internal
11
+ */
12
+ export function isCombinedAppAndProtocolSummary(summary) {
13
+ var _a, _b, _c, _d;
14
+ if ((summary === null || summary === void 0 ? void 0 : summary.tree) === undefined ||
15
+ ((_b = (_a = summary.tree) === null || _a === void 0 ? void 0 : _a[".app"]) === null || _b === void 0 ? void 0 : _b.type) !== SummaryType.Tree ||
16
+ ((_d = (_c = summary.tree) === null || _c === void 0 ? void 0 : _c[".protocol"]) === null || _d === void 0 ? void 0 : _d.type) !== SummaryType.Tree) {
17
+ return false;
18
+ }
19
+ const treeKeys = Object.keys(summary.tree);
20
+ if (treeKeys.length !== 2) {
21
+ return false;
22
+ }
23
+ return true;
24
+ }
6
25
  /**
7
26
  * Combine the app summary and protocol summary in 1 tree.
8
27
  * @param appSummary - Summary of the app.
9
28
  * @param protocolSummary - Summary of the protocol.
29
+ * @internal
10
30
  */
11
31
  export function combineAppAndProtocolSummary(appSummary, protocolSummary) {
32
+ assert(!isCombinedAppAndProtocolSummary(appSummary), 0x5a8 /* app summary is already a combined tree! */);
33
+ assert(!isCombinedAppAndProtocolSummary(protocolSummary), 0x5a9 /* protocol summary is already a combined tree! */);
12
34
  const createNewSummary = {
13
35
  type: SummaryType.Tree,
14
36
  tree: {
@@ -1 +1 @@
1
- {"version":3,"file":"summaryForCreateNew.js","sourceRoot":"","sources":["../src/summaryForCreateNew.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAEH,WAAW,GAId,MAAM,sCAAsC,CAAC;AAE9C;;;;GAIG;AACH,MAAM,UAAU,4BAA4B,CACxC,UAAwB,EACxB,eAA6B;IAE7B,MAAM,gBAAgB,GAAiB;QACnC,IAAI,EAAE,WAAW,CAAC,IAAI;QACtB,IAAI,EAAE;YACF,WAAW,EAAE,eAAe;YAC5B,MAAM,EAAE,UAAU;SACrB;KACJ,CAAC;IACF,OAAO,gBAAgB,CAAC;AAC5B,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,mCAAmC,CAC/C,eAA6B;;IAE7B,MAAM,cAAc,GAAG,eAAe,CAAC,IAAI,CAAC,UAA0B,CAAC;IACvE,MAAM,kBAAkB,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAiB,CAAwB,CAAC;IAC/F,kBAAkB,CAAC,IAAI,GAAG,MAAA,kBAAkB,CAAC,IAAI,mCAAI,CAAC,CAAC;IACvD,OAAO,kBAAkB,CAAC;AAC9B,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,kCAAkC,CAC9C,eAA6B;IAE7B,MAAM,gBAAgB,GAAG,eAAe,CAAC,IAAI,CAAC,YAA4B,CAAC;IAC3E,MAAM,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,OAAiB,CAAmC,CAAC;IACtG,OAAO,YAAY,CAAC;AACxB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n ISummaryTree,\n SummaryType,\n ISummaryBlob,\n ICommittedProposal,\n IDocumentAttributes,\n} from \"@fluidframework/protocol-definitions\";\n\n/**\n * Combine the app summary and protocol summary in 1 tree.\n * @param appSummary - Summary of the app.\n * @param protocolSummary - Summary of the protocol.\n */\nexport function combineAppAndProtocolSummary(\n appSummary: ISummaryTree,\n protocolSummary: ISummaryTree,\n): ISummaryTree {\n const createNewSummary: ISummaryTree = {\n type: SummaryType.Tree,\n tree: {\n \".protocol\": protocolSummary,\n \".app\": appSummary,\n },\n };\n return createNewSummary;\n}\n\n/**\n * Extract the attributes from the protocol summary.\n * @param protocolSummary - protocol summary from which the values are to be extracted.\n */\nexport function getDocAttributesFromProtocolSummary(\n protocolSummary: ISummaryTree,\n): IDocumentAttributes {\n const attributesBlob = protocolSummary.tree.attributes as ISummaryBlob;\n const documentAttributes = JSON.parse(attributesBlob.content as string) as IDocumentAttributes;\n documentAttributes.term = documentAttributes.term ?? 1;\n return documentAttributes;\n}\n\n/**\n * Extract quorum values from the protocol summary.\n * @param protocolSummary - protocol summary from which the values are to be extracted.\n */\nexport function getQuorumValuesFromProtocolSummary(\n protocolSummary: ISummaryTree,\n): [string, ICommittedProposal][] {\n const quorumValuesBlob = protocolSummary.tree.quorumValues as ISummaryBlob;\n const quorumValues = JSON.parse(quorumValuesBlob.content as string) as [string, ICommittedProposal][];\n return quorumValues;\n}\n"]}
1
+ {"version":3,"file":"summaryForCreateNew.js","sourceRoot":"","sources":["../src/summaryForCreateNew.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAEH,WAAW,GAId,MAAM,sCAAsC,CAAC;AAc9C;;;;GAIG;AACH,MAAM,UAAU,+BAA+B,CAC9C,OAAiC;;IAEjC,IACC,CAAA,OAAO,a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;AACH,MAAM,UAAU,kCAAkC,CAC9C,eAA6B;IAE7B,MAAM,gBAAgB,GAAG,eAAe,CAAC,IAAI,CAAC,YAA4B,CAAC;IAC3E,MAAM,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,OAAiB,CAAmC,CAAC;IACtG,OAAO,YAAY,CAAC;AACxB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/common-utils\";\nimport {\n ISummaryTree,\n SummaryType,\n ISummaryBlob,\n ICommittedProposal,\n IDocumentAttributes,\n} from \"@fluidframework/protocol-definitions\";\n\n/**\n * Defines the current layout of an .app + .protocol summary tree\n * this is used internally for create new, and single commit summary\n * @internal\n */\nexport interface CombinedAppAndProtocolSummary extends ISummaryTree {\n\ttree: {\n\t\t[\".app\"]: ISummaryTree;\n\t\t[\".protocol\"]: ISummaryTree;\n\t};\n}\n\n/**\n * Validates the current layout of an .app + .protocol summary tree\n * this is used internally for create new, and single commit summary\n * @internal\n */\nexport function isCombinedAppAndProtocolSummary(\n\tsummary: ISummaryTree | undefined,\n): summary is CombinedAppAndProtocolSummary {\n\tif (\n\t\tsummary?.tree === undefined ||\n\t\tsummary.tree?.[\".app\"]?.type !== SummaryType.Tree ||\n\t\tsummary.tree?.[\".protocol\"]?.type !== SummaryType.Tree\n\t) {\n\t\treturn false;\n\t}\n\tconst treeKeys = Object.keys(summary.tree);\n\tif (treeKeys.length !== 2) {\n\t\treturn false;\n\t}\n\treturn true;\n}\n\n/**\n * Combine the app summary and protocol summary in 1 tree.\n * @param appSummary - Summary of the app.\n * @param protocolSummary - Summary of the protocol.\n * @internal\n */\nexport function combineAppAndProtocolSummary(\n\tappSummary: ISummaryTree,\n\tprotocolSummary: ISummaryTree,\n): CombinedAppAndProtocolSummary {\n\tassert(\n\t\t!isCombinedAppAndProtocolSummary(appSummary),\n\t\t0x5a8 /* app summary is already a combined tree! */,\n\t);\n\tassert(\n\t\t!isCombinedAppAndProtocolSummary(protocolSummary),\n\t\t0x5a9 /* protocol summary is already a combined tree! */,\n\t);\n\tconst createNewSummary: CombinedAppAndProtocolSummary = {\n\t\ttype: SummaryType.Tree,\n\t\ttree: {\n\t\t\t\".protocol\": protocolSummary,\n\t\t\t\".app\": appSummary,\n\t\t},\n\t};\n\treturn createNewSummary;\n}\n\n/**\n * Extract the attributes from the protocol summary.\n * @param protocolSummary - protocol summary from which the values are to be extracted.\n */\nexport function getDocAttributesFromProtocolSummary(\n protocolSummary: ISummaryTree,\n): IDocumentAttributes {\n const attributesBlob = protocolSummary.tree.attributes as ISummaryBlob;\n const documentAttributes = JSON.parse(attributesBlob.content as string) as IDocumentAttributes;\n documentAttributes.term = documentAttributes.term ?? 1;\n return documentAttributes;\n}\n\n/**\n * Extract quorum values from the protocol summary.\n * @param protocolSummary - protocol summary from which the values are to be extracted.\n */\nexport function getQuorumValuesFromProtocolSummary(\n protocolSummary: ISummaryTree,\n): [string, ICommittedProposal][] {\n const quorumValuesBlob = protocolSummary.tree.quorumValues as ISummaryBlob;\n const quorumValues = JSON.parse(quorumValuesBlob.content as string) as [string, ICommittedProposal][];\n return quorumValues;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/driver-utils",
3
- "version": "2.0.0-internal.2.4.2",
3
+ "version": "2.0.0-internal.2.4.3",
4
4
  "description": "Collection of utility functions for Fluid drivers",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -64,12 +64,12 @@
64
64
  "dependencies": {
65
65
  "@fluidframework/common-definitions": "^0.20.1",
66
66
  "@fluidframework/common-utils": "^1.0.0",
67
- "@fluidframework/core-interfaces": ">=2.0.0-internal.2.4.2 <2.0.0-internal.3.0.0",
68
- "@fluidframework/driver-definitions": ">=2.0.0-internal.2.4.2 <2.0.0-internal.3.0.0",
67
+ "@fluidframework/core-interfaces": ">=2.0.0-internal.2.4.3 <2.0.0-internal.3.0.0",
68
+ "@fluidframework/driver-definitions": ">=2.0.0-internal.2.4.3 <2.0.0-internal.3.0.0",
69
69
  "@fluidframework/gitresources": "^0.1038.2000",
70
70
  "@fluidframework/protocol-base": "^0.1038.2000",
71
71
  "@fluidframework/protocol-definitions": "^1.1.0",
72
- "@fluidframework/telemetry-utils": ">=2.0.0-internal.2.4.2 <2.0.0-internal.3.0.0",
72
+ "@fluidframework/telemetry-utils": ">=2.0.0-internal.2.4.3 <2.0.0-internal.3.0.0",
73
73
  "axios": "^0.26.0",
74
74
  "url": "^0.11.0",
75
75
  "uuid": "^8.3.1"
@@ -80,8 +80,8 @@
80
80
  "@fluidframework/build-tools": "^0.8.0",
81
81
  "@fluidframework/driver-utils-previous": "npm:@fluidframework/driver-utils@2.0.0-internal.2.4.0",
82
82
  "@fluidframework/eslint-config-fluid": "^2.0.0",
83
- "@fluidframework/mocha-test-setup": ">=2.0.0-internal.2.4.2 <2.0.0-internal.3.0.0",
84
- "@fluidframework/runtime-utils": ">=2.0.0-internal.2.4.2 <2.0.0-internal.3.0.0",
83
+ "@fluidframework/mocha-test-setup": ">=2.0.0-internal.2.4.3 <2.0.0-internal.3.0.0",
84
+ "@fluidframework/runtime-utils": ">=2.0.0-internal.2.4.3 <2.0.0-internal.3.0.0",
85
85
  "@microsoft/api-extractor": "^7.22.2",
86
86
  "@rushstack/eslint-config": "^2.5.1",
87
87
  "@types/mocha": "^9.1.1",
package/src/index.ts CHANGED
@@ -55,8 +55,10 @@ export { readAndParse } from "./readAndParse";
55
55
  export { IProgress, runWithRetry } from "./runWithRetry";
56
56
  export {
57
57
  combineAppAndProtocolSummary,
58
+ CombinedAppAndProtocolSummary,
58
59
  getDocAttributesFromProtocolSummary,
59
60
  getQuorumValuesFromProtocolSummary,
61
+ isCombinedAppAndProtocolSummary,
60
62
  } from "./summaryForCreateNew";
61
63
  export { convertSummaryTreeToSnapshotITree } from "./treeConversions";
62
64
  export { convertSnapshotAndBlobsToSummaryTree, ISummaryTreeAssemblerProps, SummaryTreeAssembler } from "./treeUtils";
@@ -6,4 +6,4 @@
6
6
  */
7
7
 
8
8
  export const pkgName = "@fluidframework/driver-utils";
9
- export const pkgVersion = "2.0.0-internal.2.4.2";
9
+ export const pkgVersion = "2.0.0-internal.2.4.3";
@@ -3,6 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
+ import { assert } from "@fluidframework/common-utils";
6
7
  import {
7
8
  ISummaryTree,
8
9
  SummaryType,
@@ -11,23 +12,66 @@ import {
11
12
  IDocumentAttributes,
12
13
  } from "@fluidframework/protocol-definitions";
13
14
 
15
+ /**
16
+ * Defines the current layout of an .app + .protocol summary tree
17
+ * this is used internally for create new, and single commit summary
18
+ * @internal
19
+ */
20
+ export interface CombinedAppAndProtocolSummary extends ISummaryTree {
21
+ tree: {
22
+ [".app"]: ISummaryTree;
23
+ [".protocol"]: ISummaryTree;
24
+ };
25
+ }
26
+
27
+ /**
28
+ * Validates the current layout of an .app + .protocol summary tree
29
+ * this is used internally for create new, and single commit summary
30
+ * @internal
31
+ */
32
+ export function isCombinedAppAndProtocolSummary(
33
+ summary: ISummaryTree | undefined,
34
+ ): summary is CombinedAppAndProtocolSummary {
35
+ if (
36
+ summary?.tree === undefined ||
37
+ summary.tree?.[".app"]?.type !== SummaryType.Tree ||
38
+ summary.tree?.[".protocol"]?.type !== SummaryType.Tree
39
+ ) {
40
+ return false;
41
+ }
42
+ const treeKeys = Object.keys(summary.tree);
43
+ if (treeKeys.length !== 2) {
44
+ return false;
45
+ }
46
+ return true;
47
+ }
48
+
14
49
  /**
15
50
  * Combine the app summary and protocol summary in 1 tree.
16
51
  * @param appSummary - Summary of the app.
17
52
  * @param protocolSummary - Summary of the protocol.
53
+ * @internal
18
54
  */
19
55
  export function combineAppAndProtocolSummary(
20
- appSummary: ISummaryTree,
21
- protocolSummary: ISummaryTree,
22
- ): ISummaryTree {
23
- const createNewSummary: ISummaryTree = {
24
- type: SummaryType.Tree,
25
- tree: {
26
- ".protocol": protocolSummary,
27
- ".app": appSummary,
28
- },
29
- };
30
- return createNewSummary;
56
+ appSummary: ISummaryTree,
57
+ protocolSummary: ISummaryTree,
58
+ ): CombinedAppAndProtocolSummary {
59
+ assert(
60
+ !isCombinedAppAndProtocolSummary(appSummary),
61
+ 0x5a8 /* app summary is already a combined tree! */,
62
+ );
63
+ assert(
64
+ !isCombinedAppAndProtocolSummary(protocolSummary),
65
+ 0x5a9 /* protocol summary is already a combined tree! */,
66
+ );
67
+ const createNewSummary: CombinedAppAndProtocolSummary = {
68
+ type: SummaryType.Tree,
69
+ tree: {
70
+ ".protocol": protocolSummary,
71
+ ".app": appSummary,
72
+ },
73
+ };
74
+ return createNewSummary;
31
75
  }
32
76
 
33
77
  /**