@fluidframework/driver-utils 2.0.0-internal.6.1.1 → 2.0.0-internal.6.3.0
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 +8 -0
- package/README.md +4 -3
- package/dist/adapters/compression/summaryblob/documentStorageServiceSummaryBlobCompressionAdapter.d.ts.map +1 -1
- package/dist/adapters/compression/summaryblob/documentStorageServiceSummaryBlobCompressionAdapter.js +14 -13
- package/dist/adapters/compression/summaryblob/documentStorageServiceSummaryBlobCompressionAdapter.js.map +1 -1
- package/dist/adapters/predefinedAdapters.d.ts.map +1 -1
- package/dist/adapters/predefinedAdapters.js +2 -2
- package/dist/adapters/predefinedAdapters.js.map +1 -1
- package/dist/buildSnapshotTree.d.ts.map +1 -1
- package/dist/buildSnapshotTree.js +4 -3
- package/dist/buildSnapshotTree.js.map +1 -1
- package/dist/error.d.ts.map +1 -1
- package/dist/error.js +2 -0
- package/dist/error.js.map +1 -1
- package/dist/insecureUrlResolver.js +2 -2
- package/dist/insecureUrlResolver.js.map +1 -1
- package/dist/network.d.ts +1 -1
- package/dist/network.d.ts.map +1 -1
- package/dist/network.js +7 -1
- package/dist/network.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/parallelRequests.d.ts.map +1 -1
- package/dist/parallelRequests.js +33 -32
- package/dist/parallelRequests.js.map +1 -1
- package/dist/rateLimiter.js +2 -2
- package/dist/rateLimiter.js.map +1 -1
- package/dist/readAndParse.js +2 -2
- package/dist/readAndParse.js.map +1 -1
- package/dist/runWithRetry.d.ts.map +1 -1
- package/dist/runWithRetry.js +9 -8
- package/dist/runWithRetry.js.map +1 -1
- package/dist/treeConversions.d.ts.map +1 -1
- package/dist/treeConversions.js +4 -3
- package/dist/treeConversions.js.map +1 -1
- package/lib/adapters/compression/summaryblob/documentStorageServiceSummaryBlobCompressionAdapter.d.ts.map +1 -1
- package/lib/adapters/compression/summaryblob/documentStorageServiceSummaryBlobCompressionAdapter.js +2 -1
- package/lib/adapters/compression/summaryblob/documentStorageServiceSummaryBlobCompressionAdapter.js.map +1 -1
- package/lib/adapters/predefinedAdapters.d.ts.map +1 -1
- package/lib/adapters/predefinedAdapters.js +1 -1
- package/lib/adapters/predefinedAdapters.js.map +1 -1
- package/lib/buildSnapshotTree.d.ts.map +1 -1
- package/lib/buildSnapshotTree.js +2 -1
- package/lib/buildSnapshotTree.js.map +1 -1
- package/lib/error.d.ts.map +1 -1
- package/lib/error.js +2 -0
- package/lib/error.js.map +1 -1
- package/lib/insecureUrlResolver.js +1 -1
- package/lib/insecureUrlResolver.js.map +1 -1
- package/lib/network.d.ts +1 -1
- package/lib/network.d.ts.map +1 -1
- package/lib/network.js +10 -2
- package/lib/network.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/parallelRequests.d.ts.map +1 -1
- package/lib/parallelRequests.js +2 -1
- package/lib/parallelRequests.js.map +1 -1
- package/lib/rateLimiter.js +1 -1
- package/lib/rateLimiter.js.map +1 -1
- package/lib/readAndParse.js +1 -1
- package/lib/readAndParse.js.map +1 -1
- package/lib/runWithRetry.d.ts.map +1 -1
- package/lib/runWithRetry.js +4 -3
- package/lib/runWithRetry.js.map +1 -1
- package/lib/treeConversions.d.ts.map +1 -1
- package/lib/treeConversions.js +2 -1
- package/lib/treeConversions.js.map +1 -1
- package/package.json +17 -18
- package/src/adapters/compression/summaryblob/documentStorageServiceSummaryBlobCompressionAdapter.ts +2 -1
- package/src/adapters/predefinedAdapters.ts +3 -1
- package/src/buildSnapshotTree.ts +2 -1
- package/src/error.ts +2 -0
- package/src/insecureUrlResolver.ts +1 -1
- package/src/network.ts +9 -1
- package/src/packageVersion.ts +1 -1
- package/src/parallelRequests.ts +2 -1
- package/src/rateLimiter.ts +1 -1
- package/src/readAndParse.ts +1 -1
- package/src/runWithRetry.ts +4 -3
- package/src/treeConversions.ts +2 -1
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { parse } from "url";
|
|
7
|
-
import { assert } from "@fluidframework/
|
|
7
|
+
import { assert } from "@fluidframework/core-utils";
|
|
8
8
|
import { IRequest } from "@fluidframework/core-interfaces";
|
|
9
9
|
import { IResolvedUrl, IUrlResolver, DriverHeader } from "@fluidframework/driver-definitions";
|
|
10
10
|
import Axios from "axios";
|
package/src/network.ts
CHANGED
|
@@ -7,9 +7,11 @@ import {
|
|
|
7
7
|
IThrottlingWarning,
|
|
8
8
|
IDriverErrorBase,
|
|
9
9
|
IAuthorizationError,
|
|
10
|
+
// eslint-disable-next-line import/no-deprecated
|
|
10
11
|
DriverErrorType,
|
|
11
12
|
ILocationRedirectionError,
|
|
12
13
|
IResolvedUrl,
|
|
14
|
+
DriverErrorTypes,
|
|
13
15
|
} from "@fluidframework/driver-definitions";
|
|
14
16
|
import { ITelemetryProperties } from "@fluidframework/core-interfaces";
|
|
15
17
|
import { IFluidErrorBase, LoggingError } from "@fluidframework/telemetry-utils";
|
|
@@ -43,6 +45,7 @@ export type DriverErrorTelemetryProps = ITelemetryProperties & {
|
|
|
43
45
|
* Generic network error class.
|
|
44
46
|
*/
|
|
45
47
|
export class GenericNetworkError extends LoggingError implements IDriverErrorBase, IFluidErrorBase {
|
|
48
|
+
// eslint-disable-next-line import/no-deprecated
|
|
46
49
|
readonly errorType = DriverErrorType.genericNetworkError;
|
|
47
50
|
|
|
48
51
|
constructor(message: string, readonly canRetry: boolean, props: DriverErrorTelemetryProps) {
|
|
@@ -57,6 +60,7 @@ export class FluidInvalidSchemaError
|
|
|
57
60
|
extends LoggingError
|
|
58
61
|
implements IDriverErrorBase, IFluidErrorBase
|
|
59
62
|
{
|
|
63
|
+
// eslint-disable-next-line import/no-deprecated
|
|
60
64
|
readonly errorType = DriverErrorType.fluidInvalidSchema;
|
|
61
65
|
readonly canRetry = false;
|
|
62
66
|
|
|
@@ -69,6 +73,7 @@ export class DeltaStreamConnectionForbiddenError
|
|
|
69
73
|
extends LoggingError
|
|
70
74
|
implements IDriverErrorBase, IFluidErrorBase
|
|
71
75
|
{
|
|
76
|
+
// eslint-disable-next-line import/no-deprecated
|
|
72
77
|
static readonly errorType = DriverErrorType.deltaStreamConnectionForbidden;
|
|
73
78
|
readonly errorType = DeltaStreamConnectionForbiddenError.errorType;
|
|
74
79
|
readonly canRetry = false;
|
|
@@ -84,6 +89,7 @@ export class AuthorizationError
|
|
|
84
89
|
extends LoggingError
|
|
85
90
|
implements IAuthorizationError, IFluidErrorBase
|
|
86
91
|
{
|
|
92
|
+
// eslint-disable-next-line import/no-deprecated
|
|
87
93
|
readonly errorType = DriverErrorType.authorizationError;
|
|
88
94
|
readonly canRetry = false;
|
|
89
95
|
|
|
@@ -102,6 +108,7 @@ export class LocationRedirectionError
|
|
|
102
108
|
extends LoggingError
|
|
103
109
|
implements ILocationRedirectionError, IFluidErrorBase
|
|
104
110
|
{
|
|
111
|
+
// eslint-disable-next-line import/no-deprecated
|
|
105
112
|
readonly errorType = DriverErrorType.locationRedirection;
|
|
106
113
|
readonly canRetry = false;
|
|
107
114
|
|
|
@@ -142,6 +149,7 @@ export class RetryableError<T extends string> extends NetworkErrorBasic<T> {
|
|
|
142
149
|
* Throttling error class - used to communicate all throttling errors
|
|
143
150
|
*/
|
|
144
151
|
export class ThrottlingError extends LoggingError implements IThrottlingWarning, IFluidErrorBase {
|
|
152
|
+
// eslint-disable-next-line import/no-deprecated
|
|
145
153
|
readonly errorType = DriverErrorType.throttlingError;
|
|
146
154
|
readonly canRetry = true;
|
|
147
155
|
|
|
@@ -155,7 +163,7 @@ export class ThrottlingError extends LoggingError implements IThrottlingWarning,
|
|
|
155
163
|
}
|
|
156
164
|
|
|
157
165
|
export const createWriteError = (message: string, props: DriverErrorTelemetryProps) =>
|
|
158
|
-
new NonRetryableError(message,
|
|
166
|
+
new NonRetryableError(message, DriverErrorTypes.writeError, props);
|
|
159
167
|
|
|
160
168
|
export function createGenericNetworkError(
|
|
161
169
|
message: string,
|
package/src/packageVersion.ts
CHANGED
package/src/parallelRequests.ts
CHANGED
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
5
|
+
import { performance } from "@fluid-internal/client-utils";
|
|
6
6
|
import { ITelemetryProperties } from "@fluidframework/core-interfaces";
|
|
7
|
+
import { assert, Deferred } from "@fluidframework/core-utils";
|
|
7
8
|
import { ITelemetryLoggerExt, PerformanceEvent } from "@fluidframework/telemetry-utils";
|
|
8
9
|
import { ISequencedDocumentMessage } from "@fluidframework/protocol-definitions";
|
|
9
10
|
import { IDeltasFetchResult, IStream, IStreamResult } from "@fluidframework/driver-definitions";
|
package/src/rateLimiter.ts
CHANGED
package/src/readAndParse.ts
CHANGED
package/src/runWithRetry.ts
CHANGED
|
@@ -4,8 +4,9 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { ITelemetryLoggerExt, isFluidError } from "@fluidframework/telemetry-utils";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { performance } from "@fluid-internal/client-utils";
|
|
8
|
+
import { delay } from "@fluidframework/core-utils";
|
|
9
|
+
import { DriverErrorTypes } from "@fluidframework/driver-definitions";
|
|
9
10
|
import { canRetryOnError, getRetryDelayFromError } from "./network";
|
|
10
11
|
import { pkgVersion } from "./packageVersion";
|
|
11
12
|
import { NonRetryableError } from ".";
|
|
@@ -87,7 +88,7 @@ export async function runWithRetry<T>(
|
|
|
87
88
|
);
|
|
88
89
|
throw new NonRetryableError(
|
|
89
90
|
"runWithRetry was Aborted",
|
|
90
|
-
|
|
91
|
+
DriverErrorTypes.genericError,
|
|
91
92
|
{
|
|
92
93
|
driverVersion: pkgVersion,
|
|
93
94
|
fetchCallName,
|
package/src/treeConversions.ts
CHANGED
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { Uint8ArrayToString
|
|
6
|
+
import { Uint8ArrayToString } from "@fluid-internal/client-utils";
|
|
7
|
+
import { unreachableCase } from "@fluidframework/core-utils";
|
|
7
8
|
import { ISummaryTree, ITree, ITreeEntry, SummaryType } from "@fluidframework/protocol-definitions";
|
|
8
9
|
import { AttachmentTreeEntry, BlobTreeEntry, TreeTreeEntry } from "./blob";
|
|
9
10
|
import { isCombinedAppAndProtocolSummary } from "./summaryForCreateNew";
|