@fluidframework/driver-utils 2.0.0-dev.4.4.0.162574 → 2.0.0-dev.5.3.2.178189
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 +22 -0
- package/dist/adapters/compression/compressionTypes.d.ts +17 -0
- package/dist/adapters/compression/compressionTypes.d.ts.map +1 -0
- package/dist/adapters/compression/compressionTypes.js +17 -0
- package/dist/adapters/compression/compressionTypes.js.map +1 -0
- package/dist/adapters/compression/documentServiceCompressionAdapter.d.ts +13 -0
- package/dist/adapters/compression/documentServiceCompressionAdapter.d.ts.map +1 -0
- package/dist/adapters/compression/documentServiceCompressionAdapter.js +23 -0
- package/dist/adapters/compression/documentServiceCompressionAdapter.js.map +1 -0
- package/dist/adapters/compression/documentServiceFactoryCompressionAdapter.d.ts +16 -0
- package/dist/adapters/compression/documentServiceFactoryCompressionAdapter.d.ts.map +1 -0
- package/dist/adapters/compression/documentServiceFactoryCompressionAdapter.js +36 -0
- package/dist/adapters/compression/documentServiceFactoryCompressionAdapter.js.map +1 -0
- package/dist/adapters/compression/index.d.ts +8 -0
- package/dist/adapters/compression/index.d.ts.map +1 -0
- package/dist/adapters/compression/index.js +15 -0
- package/dist/adapters/compression/index.js.map +1 -0
- package/dist/adapters/compression/summaryblob/documentStorageServiceSummaryBlobCompressionAdapter.d.ts +161 -0
- package/dist/adapters/compression/summaryblob/documentStorageServiceSummaryBlobCompressionAdapter.d.ts.map +1 -0
- package/dist/adapters/compression/summaryblob/documentStorageServiceSummaryBlobCompressionAdapter.js +365 -0
- package/dist/adapters/compression/summaryblob/documentStorageServiceSummaryBlobCompressionAdapter.js.map +1 -0
- package/dist/adapters/compression/summaryblob/index.d.ts +6 -0
- package/dist/adapters/compression/summaryblob/index.d.ts.map +1 -0
- package/dist/adapters/compression/summaryblob/index.js +11 -0
- package/dist/adapters/compression/summaryblob/index.js.map +1 -0
- package/dist/adapters/index.d.ts +7 -0
- package/dist/adapters/index.d.ts.map +1 -0
- package/dist/adapters/index.js +14 -0
- package/dist/adapters/index.js.map +1 -0
- package/dist/adapters/predefinedAdapters.d.ts +20 -0
- package/dist/adapters/predefinedAdapters.d.ts.map +1 -0
- package/dist/adapters/predefinedAdapters.js +51 -0
- package/dist/adapters/predefinedAdapters.js.map +1 -0
- package/dist/blob.d.ts +53 -0
- package/dist/blob.d.ts.map +1 -0
- package/dist/blob.js +62 -0
- package/dist/blob.js.map +1 -0
- package/dist/documentServiceFactoryProxy.d.ts +19 -0
- package/dist/documentServiceFactoryProxy.d.ts.map +1 -0
- package/dist/documentServiceFactoryProxy.js +27 -0
- package/dist/documentServiceFactoryProxy.js.map +1 -0
- package/dist/documentServiceProxy.d.ts +21 -0
- package/dist/documentServiceProxy.d.ts.map +1 -0
- package/dist/documentServiceProxy.js +36 -0
- package/dist/documentServiceProxy.js.map +1 -0
- package/dist/documentStorageServiceProxy.d.ts.map +1 -1
- package/dist/documentStorageServiceProxy.js +1 -0
- package/dist/documentStorageServiceProxy.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -4
- package/dist/index.js.map +1 -1
- package/dist/insecureUrlResolver.d.ts.map +1 -1
- package/dist/insecureUrlResolver.js +1 -2
- package/dist/insecureUrlResolver.js.map +1 -1
- package/dist/network.d.ts +3 -2
- package/dist/network.d.ts.map +1 -1
- package/dist/network.js +2 -1
- package/dist/network.js.map +1 -1
- package/dist/networkUtils.d.ts +3 -2
- package/dist/networkUtils.d.ts.map +1 -1
- package/dist/networkUtils.js +1 -1
- package/dist/networkUtils.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 +4 -3
- package/dist/parallelRequests.d.ts.map +1 -1
- package/dist/parallelRequests.js +4 -3
- package/dist/parallelRequests.js.map +1 -1
- package/dist/runWithRetry.d.ts +2 -2
- package/dist/runWithRetry.d.ts.map +1 -1
- package/dist/runWithRetry.js.map +1 -1
- package/dist/treeConversions.d.ts.map +1 -1
- package/dist/treeConversions.js +4 -4
- package/dist/treeConversions.js.map +1 -1
- package/dist/tsdoc-metadata.json +11 -0
- package/lib/adapters/compression/compressionTypes.d.ts +17 -0
- package/lib/adapters/compression/compressionTypes.d.ts.map +1 -0
- package/lib/adapters/compression/compressionTypes.js +14 -0
- package/lib/adapters/compression/compressionTypes.js.map +1 -0
- package/lib/adapters/compression/documentServiceCompressionAdapter.d.ts +13 -0
- package/lib/adapters/compression/documentServiceCompressionAdapter.d.ts.map +1 -0
- package/lib/adapters/compression/documentServiceCompressionAdapter.js +19 -0
- package/lib/adapters/compression/documentServiceCompressionAdapter.js.map +1 -0
- package/lib/adapters/compression/documentServiceFactoryCompressionAdapter.d.ts +16 -0
- package/lib/adapters/compression/documentServiceFactoryCompressionAdapter.d.ts.map +1 -0
- package/lib/adapters/compression/documentServiceFactoryCompressionAdapter.js +32 -0
- package/lib/adapters/compression/documentServiceFactoryCompressionAdapter.js.map +1 -0
- package/lib/adapters/compression/index.d.ts +8 -0
- package/lib/adapters/compression/index.d.ts.map +1 -0
- package/lib/adapters/compression/index.js +8 -0
- package/lib/adapters/compression/index.js.map +1 -0
- package/lib/adapters/compression/summaryblob/documentStorageServiceSummaryBlobCompressionAdapter.d.ts +161 -0
- package/lib/adapters/compression/summaryblob/documentStorageServiceSummaryBlobCompressionAdapter.d.ts.map +1 -0
- package/lib/adapters/compression/summaryblob/documentStorageServiceSummaryBlobCompressionAdapter.js +361 -0
- package/lib/adapters/compression/summaryblob/documentStorageServiceSummaryBlobCompressionAdapter.js.map +1 -0
- package/lib/adapters/compression/summaryblob/index.d.ts +6 -0
- package/lib/adapters/compression/summaryblob/index.d.ts.map +1 -0
- package/lib/adapters/compression/summaryblob/index.js +6 -0
- package/lib/adapters/compression/summaryblob/index.js.map +1 -0
- package/lib/adapters/index.d.ts +7 -0
- package/lib/adapters/index.d.ts.map +1 -0
- package/lib/adapters/index.js +7 -0
- package/lib/adapters/index.js.map +1 -0
- package/lib/adapters/predefinedAdapters.d.ts +20 -0
- package/lib/adapters/predefinedAdapters.d.ts.map +1 -0
- package/lib/adapters/predefinedAdapters.js +46 -0
- package/lib/adapters/predefinedAdapters.js.map +1 -0
- package/lib/blob.d.ts +53 -0
- package/lib/blob.d.ts.map +1 -0
- package/lib/blob.js +56 -0
- package/lib/blob.js.map +1 -0
- package/lib/documentServiceFactoryProxy.d.ts +19 -0
- package/lib/documentServiceFactoryProxy.d.ts.map +1 -0
- package/lib/documentServiceFactoryProxy.js +23 -0
- package/lib/documentServiceFactoryProxy.js.map +1 -0
- package/lib/documentServiceProxy.d.ts +21 -0
- package/lib/documentServiceProxy.d.ts.map +1 -0
- package/lib/documentServiceProxy.js +32 -0
- package/lib/documentServiceProxy.js.map +1 -0
- package/lib/documentStorageServiceProxy.d.ts.map +1 -1
- package/lib/documentStorageServiceProxy.js +1 -0
- package/lib/documentStorageServiceProxy.js.map +1 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -1
- package/lib/index.js.map +1 -1
- package/lib/insecureUrlResolver.d.ts.map +1 -1
- package/lib/insecureUrlResolver.js +2 -3
- package/lib/insecureUrlResolver.js.map +1 -1
- package/lib/network.d.ts +3 -2
- package/lib/network.d.ts.map +1 -1
- package/lib/network.js +2 -1
- package/lib/network.js.map +1 -1
- package/lib/networkUtils.d.ts +3 -2
- package/lib/networkUtils.d.ts.map +1 -1
- package/lib/networkUtils.js +1 -1
- package/lib/networkUtils.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 +4 -3
- package/lib/parallelRequests.d.ts.map +1 -1
- package/lib/parallelRequests.js +4 -3
- package/lib/parallelRequests.js.map +1 -1
- package/lib/runWithRetry.d.ts +2 -2
- package/lib/runWithRetry.d.ts.map +1 -1
- package/lib/runWithRetry.js.map +1 -1
- package/lib/treeConversions.d.ts.map +1 -1
- package/lib/treeConversions.js +1 -1
- package/lib/treeConversions.js.map +1 -1
- package/package.json +14 -17
- package/src/adapters/compression/compressionTypes.ts +19 -0
- package/src/adapters/compression/documentServiceCompressionAdapter.ts +25 -0
- package/src/adapters/compression/documentServiceFactoryCompressionAdapter.ts +62 -0
- package/src/adapters/compression/index.ts +12 -0
- package/src/adapters/compression/summaryblob/documentStorageServiceSummaryBlobCompressionAdapter.ts +446 -0
- package/src/adapters/compression/summaryblob/index.ts +9 -0
- package/src/adapters/index.ts +13 -0
- package/src/adapters/predefinedAdapters.ts +71 -0
- package/src/blob.ts +68 -0
- package/src/documentServiceFactoryProxy.ts +47 -0
- package/src/documentServiceProxy.ts +46 -0
- package/src/documentStorageServiceProxy.ts +1 -0
- package/src/index.ts +6 -1
- package/src/insecureUrlResolver.ts +4 -11
- package/src/network.ts +4 -2
- package/src/networkUtils.ts +4 -3
- package/src/packageVersion.ts +1 -1
- package/src/parallelRequests.ts +9 -8
- package/src/runWithRetry.ts +2 -2
- package/src/treeConversions.ts +1 -1
- package/dist/fluidResolvedUrl.d.ts +0 -16
- package/dist/fluidResolvedUrl.d.ts.map +0 -1
- package/dist/fluidResolvedUrl.js +0 -24
- package/dist/fluidResolvedUrl.js.map +0 -1
- package/lib/fluidResolvedUrl.d.ts +0 -16
- package/lib/fluidResolvedUrl.d.ts.map +0 -1
- package/lib/fluidResolvedUrl.js +0 -19
- package/lib/fluidResolvedUrl.js.map +0 -1
- package/src/fluidResolvedUrl.ts +0 -26
|
@@ -54,6 +54,7 @@ export class DocumentStorageServiceProxy implements IDocumentStorageService {
|
|
|
54
54
|
summary: ISummaryTree,
|
|
55
55
|
context: ISummaryContext,
|
|
56
56
|
): Promise<string> {
|
|
57
|
+
console.log(`Summary uploaded: ${JSON.stringify(summary).length} bytes`);
|
|
57
58
|
return this.internalStorageService.uploadSummaryWithContext(summary, context);
|
|
58
59
|
}
|
|
59
60
|
|
package/src/index.ts
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
export { buildSnapshotTree } from "./buildSnapshotTree";
|
|
7
|
+
export { BlobTreeEntry, TreeTreeEntry, AttachmentTreeEntry } from "./blob";
|
|
7
8
|
export { DocumentStorageServiceProxy } from "./documentStorageServiceProxy";
|
|
8
9
|
export { UsageError } from "./error";
|
|
9
|
-
export { ensureFluidResolvedUrl, isFluidResolvedUrl } from "./fluidResolvedUrl";
|
|
10
10
|
export { InsecureUrlResolver } from "./insecureUrlResolver";
|
|
11
11
|
export { canBeCoalescedByService, isRuntimeMessage, MessageType2 } from "./messageRecognition";
|
|
12
12
|
export {
|
|
@@ -49,3 +49,8 @@ export {
|
|
|
49
49
|
isCombinedAppAndProtocolSummary,
|
|
50
50
|
} from "./summaryForCreateNew";
|
|
51
51
|
export { convertSummaryTreeToSnapshotITree } from "./treeConversions";
|
|
52
|
+
export {
|
|
53
|
+
applyStorageCompression,
|
|
54
|
+
ICompressionStorageConfig,
|
|
55
|
+
blobHeadersBlobName,
|
|
56
|
+
} from "./adapters";
|
|
@@ -6,12 +6,7 @@
|
|
|
6
6
|
import { parse } from "url";
|
|
7
7
|
import { assert } from "@fluidframework/common-utils";
|
|
8
8
|
import { IRequest } from "@fluidframework/core-interfaces";
|
|
9
|
-
import {
|
|
10
|
-
IFluidResolvedUrl,
|
|
11
|
-
IResolvedUrl,
|
|
12
|
-
IUrlResolver,
|
|
13
|
-
DriverHeader,
|
|
14
|
-
} from "@fluidframework/driver-definitions";
|
|
9
|
+
import { IResolvedUrl, IUrlResolver, DriverHeader } from "@fluidframework/driver-definitions";
|
|
15
10
|
import Axios from "axios";
|
|
16
11
|
|
|
17
12
|
/**
|
|
@@ -98,7 +93,7 @@ export class InsecureUrlResolver implements IUrlResolver {
|
|
|
98
93
|
// the actual container ID will be generated by the driver.
|
|
99
94
|
// eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
|
|
100
95
|
if (!documentId) {
|
|
101
|
-
const createNewResponse:
|
|
96
|
+
const createNewResponse: IResolvedUrl = {
|
|
102
97
|
endpoints: {
|
|
103
98
|
deltaStorageUrl: `${this.ordererUrl}/deltas/${encodedTenantId}/new`,
|
|
104
99
|
ordererUrl: this.ordererUrl,
|
|
@@ -122,7 +117,7 @@ export class InsecureUrlResolver implements IUrlResolver {
|
|
|
122
117
|
const deltaStorageUrl = `${this.ordererUrl}/deltas/${encodedTenantId}/${encodedDocId}`;
|
|
123
118
|
const storageUrl = `${this.storageUrl}/repos/${encodedTenantId}`;
|
|
124
119
|
|
|
125
|
-
const response:
|
|
120
|
+
const response: IResolvedUrl = {
|
|
126
121
|
endpoints: {
|
|
127
122
|
deltaStorageUrl,
|
|
128
123
|
ordererUrl: this.ordererUrl,
|
|
@@ -137,9 +132,7 @@ export class InsecureUrlResolver implements IUrlResolver {
|
|
|
137
132
|
}
|
|
138
133
|
|
|
139
134
|
public async getAbsoluteUrl(resolvedUrl: IResolvedUrl, relativeUrl: string): Promise<string> {
|
|
140
|
-
const
|
|
141
|
-
|
|
142
|
-
const parsedUrl = parse(fluidResolvedUrl.url);
|
|
135
|
+
const parsedUrl = parse(resolvedUrl.url);
|
|
143
136
|
const [, , documentId] = parsedUrl.pathname?.split("/") ?? [];
|
|
144
137
|
// eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
|
|
145
138
|
assert(!!documentId, 0x273 /* "Invalid document id from parsed URL" */);
|
package/src/network.ts
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
ILocationRedirectionError,
|
|
12
12
|
IResolvedUrl,
|
|
13
13
|
} from "@fluidframework/driver-definitions";
|
|
14
|
-
import { ITelemetryProperties } from "@fluidframework/
|
|
14
|
+
import { ITelemetryProperties } from "@fluidframework/core-interfaces";
|
|
15
15
|
import { IFluidErrorBase, LoggingError } from "@fluidframework/telemetry-utils";
|
|
16
16
|
|
|
17
17
|
export enum OnlineStatus {
|
|
@@ -72,9 +72,11 @@ export class DeltaStreamConnectionForbiddenError
|
|
|
72
72
|
static readonly errorType = DriverErrorType.deltaStreamConnectionForbidden;
|
|
73
73
|
readonly errorType = DeltaStreamConnectionForbiddenError.errorType;
|
|
74
74
|
readonly canRetry = false;
|
|
75
|
+
readonly storageOnlyReason: string | undefined;
|
|
75
76
|
|
|
76
|
-
constructor(message: string, props: DriverErrorTelemetryProps) {
|
|
77
|
+
constructor(message: string, props: DriverErrorTelemetryProps, storageOnlyReason?: string) {
|
|
77
78
|
super(message, { ...props, statusCode: 400 });
|
|
79
|
+
this.storageOnlyReason = storageOnlyReason;
|
|
78
80
|
}
|
|
79
81
|
}
|
|
80
82
|
|
package/src/networkUtils.ts
CHANGED
|
@@ -3,17 +3,18 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { ITelemetryErrorEvent
|
|
6
|
+
import { ITelemetryErrorEvent } from "@fluidframework/core-interfaces";
|
|
7
|
+
import { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils";
|
|
7
8
|
import { isOnline, OnlineStatus, canRetryOnError } from "./network";
|
|
8
9
|
|
|
9
10
|
export function logNetworkFailure(
|
|
10
|
-
logger:
|
|
11
|
+
logger: ITelemetryLoggerExt,
|
|
11
12
|
event: ITelemetryErrorEvent,
|
|
12
13
|
error?: any,
|
|
13
14
|
) {
|
|
14
15
|
const newEvent = { ...event };
|
|
15
16
|
|
|
16
|
-
const errorOnlineProp = error
|
|
17
|
+
const errorOnlineProp = error?.online;
|
|
17
18
|
newEvent.online =
|
|
18
19
|
typeof errorOnlineProp === "string" ? errorOnlineProp : OnlineStatus[isOnline()];
|
|
19
20
|
|
package/src/packageVersion.ts
CHANGED
package/src/parallelRequests.ts
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
import { assert, Deferred, performance } from "@fluidframework/common-utils";
|
|
6
|
-
import {
|
|
7
|
-
import { PerformanceEvent } from "@fluidframework/telemetry-utils";
|
|
6
|
+
import { ITelemetryProperties } from "@fluidframework/core-interfaces";
|
|
7
|
+
import { ITelemetryLoggerExt, PerformanceEvent } from "@fluidframework/telemetry-utils";
|
|
8
8
|
import { ISequencedDocumentMessage } from "@fluidframework/protocol-definitions";
|
|
9
9
|
import { IDeltasFetchResult, IStream, IStreamResult } from "@fluidframework/driver-definitions";
|
|
10
10
|
import { getRetryDelayFromError, canRetryOnError, createGenericNetworkError } from "./network";
|
|
@@ -50,7 +50,7 @@ export class ParallelRequests<T> {
|
|
|
50
50
|
from: number,
|
|
51
51
|
private to: number | undefined,
|
|
52
52
|
private readonly payloadSize: number,
|
|
53
|
-
private readonly logger:
|
|
53
|
+
private readonly logger: ITelemetryLoggerExt,
|
|
54
54
|
private readonly requestCallback: (
|
|
55
55
|
request: number,
|
|
56
56
|
from: number,
|
|
@@ -309,9 +309,10 @@ export class ParallelRequests<T> {
|
|
|
309
309
|
if (to === this.latestRequested) {
|
|
310
310
|
// we can go after full chunk at the end if we received partial chunk, or more than asked
|
|
311
311
|
// Also if we got more than we asked to, we can actually use those ops!
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
from
|
|
312
|
+
while (payload.length !== 0) {
|
|
313
|
+
const data = payload.splice(0, requestedLength);
|
|
314
|
+
this.results.set(from, data);
|
|
315
|
+
from += data.length;
|
|
315
316
|
}
|
|
316
317
|
|
|
317
318
|
this.latestRequested = from;
|
|
@@ -409,7 +410,7 @@ async function getSingleOpBatch(
|
|
|
409
410
|
get: (telemetryProps: ITelemetryProperties) => Promise<IDeltasFetchResult>,
|
|
410
411
|
props: ITelemetryProperties,
|
|
411
412
|
strongTo: boolean,
|
|
412
|
-
logger:
|
|
413
|
+
logger: ITelemetryLoggerExt,
|
|
413
414
|
signal?: AbortSignal,
|
|
414
415
|
scenarioName?: string,
|
|
415
416
|
): Promise<{ partial: boolean; cancel: boolean; payload: ISequencedDocumentMessage[] }> {
|
|
@@ -540,7 +541,7 @@ export function requestOps(
|
|
|
540
541
|
fromTotal: number,
|
|
541
542
|
toTotal: number | undefined,
|
|
542
543
|
payloadSize: number,
|
|
543
|
-
logger:
|
|
544
|
+
logger: ITelemetryLoggerExt,
|
|
544
545
|
signal?: AbortSignal,
|
|
545
546
|
scenarioName?: string,
|
|
546
547
|
): IStream<ISequencedDocumentMessage[]> {
|
package/src/runWithRetry.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils";
|
|
7
7
|
import { delay, performance } from "@fluidframework/common-utils";
|
|
8
8
|
import { DriverErrorType } from "@fluidframework/driver-definitions";
|
|
9
9
|
import { canRetryOnError, getRetryDelayFromError } from "./network";
|
|
@@ -45,7 +45,7 @@ export interface IProgress {
|
|
|
45
45
|
export async function runWithRetry<T>(
|
|
46
46
|
api: (cancel?: AbortSignal) => Promise<T>,
|
|
47
47
|
fetchCallName: string,
|
|
48
|
-
logger:
|
|
48
|
+
logger: ITelemetryLoggerExt,
|
|
49
49
|
progress: IProgress,
|
|
50
50
|
): Promise<T> {
|
|
51
51
|
let result: T | undefined;
|
package/src/treeConversions.ts
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { Uint8ArrayToString, unreachableCase } from "@fluidframework/common-utils";
|
|
7
|
-
import { AttachmentTreeEntry, BlobTreeEntry, TreeTreeEntry } from "@fluidframework/protocol-base";
|
|
8
7
|
import { ISummaryTree, ITree, ITreeEntry, SummaryType } from "@fluidframework/protocol-definitions";
|
|
8
|
+
import { AttachmentTreeEntry, BlobTreeEntry, TreeTreeEntry } from "./blob";
|
|
9
9
|
import { isCombinedAppAndProtocolSummary } from "./summaryForCreateNew";
|
|
10
10
|
|
|
11
11
|
/**
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
*/
|
|
5
|
-
import { IResolvedUrl, IFluidResolvedUrl } from "@fluidframework/driver-definitions";
|
|
6
|
-
/**
|
|
7
|
-
* @deprecated In the next major release all IResolvedUrl will be IFluidResolvedUrl,
|
|
8
|
-
* so this method is no longer necessary.
|
|
9
|
-
*/
|
|
10
|
-
export declare const isFluidResolvedUrl: (resolved: IResolvedUrl | undefined) => resolved is IFluidResolvedUrl;
|
|
11
|
-
/**
|
|
12
|
-
* @deprecated In the next major release all IResolvedUrl will be IFluidResolvedUrl,
|
|
13
|
-
* so this method is no longer necessary.
|
|
14
|
-
*/
|
|
15
|
-
export declare function ensureFluidResolvedUrl(resolved: IResolvedUrl | undefined): asserts resolved is IFluidResolvedUrl;
|
|
16
|
-
//# sourceMappingURL=fluidResolvedUrl.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fluidResolvedUrl.d.ts","sourceRoot":"","sources":["../src/fluidResolvedUrl.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAErF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,aACpB,YAAY,GAAG,SAAS,kCAC2B,CAAC;AAE/D;;;GAGG;AACH,wBAAgB,sBAAsB,CACrC,QAAQ,EAAE,YAAY,GAAG,SAAS,GAChC,OAAO,CAAC,QAAQ,IAAI,iBAAiB,CAIvC"}
|
package/dist/fluidResolvedUrl.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
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.ensureFluidResolvedUrl = exports.isFluidResolvedUrl = void 0;
|
|
8
|
-
/**
|
|
9
|
-
* @deprecated In the next major release all IResolvedUrl will be IFluidResolvedUrl,
|
|
10
|
-
* so this method is no longer necessary.
|
|
11
|
-
*/
|
|
12
|
-
const isFluidResolvedUrl = (resolved) => (resolved === null || resolved === void 0 ? void 0 : resolved.type) === "fluid";
|
|
13
|
-
exports.isFluidResolvedUrl = isFluidResolvedUrl;
|
|
14
|
-
/**
|
|
15
|
-
* @deprecated In the next major release all IResolvedUrl will be IFluidResolvedUrl,
|
|
16
|
-
* so this method is no longer necessary.
|
|
17
|
-
*/
|
|
18
|
-
function ensureFluidResolvedUrl(resolved) {
|
|
19
|
-
if (!(0, exports.isFluidResolvedUrl)(resolved)) {
|
|
20
|
-
throw new Error(`resolved is not a Fluid url. Type: ${resolved === null || resolved === void 0 ? void 0 : resolved.type}`);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
exports.ensureFluidResolvedUrl = ensureFluidResolvedUrl;
|
|
24
|
-
//# sourceMappingURL=fluidResolvedUrl.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fluidResolvedUrl.js","sourceRoot":"","sources":["../src/fluidResolvedUrl.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIH;;;GAGG;AACI,MAAM,kBAAkB,GAAG,CACjC,QAAkC,EACF,EAAE,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,IAAI,MAAK,OAAO,CAAC;AAFlD,QAAA,kBAAkB,sBAEgC;AAE/D;;;GAGG;AACH,SAAgB,sBAAsB,CACrC,QAAkC;IAElC,IAAI,CAAC,IAAA,0BAAkB,EAAC,QAAQ,CAAC,EAAE;QAClC,MAAM,IAAI,KAAK,CAAC,sCAAsC,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,IAAI,EAAE,CAAC,CAAC;KACxE;AACF,CAAC;AAND,wDAMC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IResolvedUrl, IFluidResolvedUrl } from \"@fluidframework/driver-definitions\";\n\n/**\n * @deprecated In the next major release all IResolvedUrl will be IFluidResolvedUrl,\n * so this method is no longer necessary.\n */\nexport const isFluidResolvedUrl = (\n\tresolved: IResolvedUrl | undefined,\n): resolved is IFluidResolvedUrl => resolved?.type === \"fluid\";\n\n/**\n * @deprecated In the next major release all IResolvedUrl will be IFluidResolvedUrl,\n * so this method is no longer necessary.\n */\nexport function ensureFluidResolvedUrl(\n\tresolved: IResolvedUrl | undefined,\n): asserts resolved is IFluidResolvedUrl {\n\tif (!isFluidResolvedUrl(resolved)) {\n\t\tthrow new Error(`resolved is not a Fluid url. Type: ${resolved?.type}`);\n\t}\n}\n"]}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
*/
|
|
5
|
-
import { IResolvedUrl, IFluidResolvedUrl } from "@fluidframework/driver-definitions";
|
|
6
|
-
/**
|
|
7
|
-
* @deprecated In the next major release all IResolvedUrl will be IFluidResolvedUrl,
|
|
8
|
-
* so this method is no longer necessary.
|
|
9
|
-
*/
|
|
10
|
-
export declare const isFluidResolvedUrl: (resolved: IResolvedUrl | undefined) => resolved is IFluidResolvedUrl;
|
|
11
|
-
/**
|
|
12
|
-
* @deprecated In the next major release all IResolvedUrl will be IFluidResolvedUrl,
|
|
13
|
-
* so this method is no longer necessary.
|
|
14
|
-
*/
|
|
15
|
-
export declare function ensureFluidResolvedUrl(resolved: IResolvedUrl | undefined): asserts resolved is IFluidResolvedUrl;
|
|
16
|
-
//# sourceMappingURL=fluidResolvedUrl.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fluidResolvedUrl.d.ts","sourceRoot":"","sources":["../src/fluidResolvedUrl.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAErF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,aACpB,YAAY,GAAG,SAAS,kCAC2B,CAAC;AAE/D;;;GAGG;AACH,wBAAgB,sBAAsB,CACrC,QAAQ,EAAE,YAAY,GAAG,SAAS,GAChC,OAAO,CAAC,QAAQ,IAAI,iBAAiB,CAIvC"}
|
package/lib/fluidResolvedUrl.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @deprecated In the next major release all IResolvedUrl will be IFluidResolvedUrl,
|
|
7
|
-
* so this method is no longer necessary.
|
|
8
|
-
*/
|
|
9
|
-
export const isFluidResolvedUrl = (resolved) => (resolved === null || resolved === void 0 ? void 0 : resolved.type) === "fluid";
|
|
10
|
-
/**
|
|
11
|
-
* @deprecated In the next major release all IResolvedUrl will be IFluidResolvedUrl,
|
|
12
|
-
* so this method is no longer necessary.
|
|
13
|
-
*/
|
|
14
|
-
export function ensureFluidResolvedUrl(resolved) {
|
|
15
|
-
if (!isFluidResolvedUrl(resolved)) {
|
|
16
|
-
throw new Error(`resolved is not a Fluid url. Type: ${resolved === null || resolved === void 0 ? void 0 : resolved.type}`);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=fluidResolvedUrl.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fluidResolvedUrl.js","sourceRoot":"","sources":["../src/fluidResolvedUrl.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CACjC,QAAkC,EACF,EAAE,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,IAAI,MAAK,OAAO,CAAC;AAE/D;;;GAGG;AACH,MAAM,UAAU,sBAAsB,CACrC,QAAkC;IAElC,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,EAAE;QAClC,MAAM,IAAI,KAAK,CAAC,sCAAsC,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,IAAI,EAAE,CAAC,CAAC;KACxE;AACF,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IResolvedUrl, IFluidResolvedUrl } from \"@fluidframework/driver-definitions\";\n\n/**\n * @deprecated In the next major release all IResolvedUrl will be IFluidResolvedUrl,\n * so this method is no longer necessary.\n */\nexport const isFluidResolvedUrl = (\n\tresolved: IResolvedUrl | undefined,\n): resolved is IFluidResolvedUrl => resolved?.type === \"fluid\";\n\n/**\n * @deprecated In the next major release all IResolvedUrl will be IFluidResolvedUrl,\n * so this method is no longer necessary.\n */\nexport function ensureFluidResolvedUrl(\n\tresolved: IResolvedUrl | undefined,\n): asserts resolved is IFluidResolvedUrl {\n\tif (!isFluidResolvedUrl(resolved)) {\n\t\tthrow new Error(`resolved is not a Fluid url. Type: ${resolved?.type}`);\n\t}\n}\n"]}
|
package/src/fluidResolvedUrl.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import { IResolvedUrl, IFluidResolvedUrl } from "@fluidframework/driver-definitions";
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* @deprecated In the next major release all IResolvedUrl will be IFluidResolvedUrl,
|
|
10
|
-
* so this method is no longer necessary.
|
|
11
|
-
*/
|
|
12
|
-
export const isFluidResolvedUrl = (
|
|
13
|
-
resolved: IResolvedUrl | undefined,
|
|
14
|
-
): resolved is IFluidResolvedUrl => resolved?.type === "fluid";
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* @deprecated In the next major release all IResolvedUrl will be IFluidResolvedUrl,
|
|
18
|
-
* so this method is no longer necessary.
|
|
19
|
-
*/
|
|
20
|
-
export function ensureFluidResolvedUrl(
|
|
21
|
-
resolved: IResolvedUrl | undefined,
|
|
22
|
-
): asserts resolved is IFluidResolvedUrl {
|
|
23
|
-
if (!isFluidResolvedUrl(resolved)) {
|
|
24
|
-
throw new Error(`resolved is not a Fluid url. Type: ${resolved?.type}`);
|
|
25
|
-
}
|
|
26
|
-
}
|