@fluidframework/file-driver 2.0.0-dev-rc.3.0.0.250606 → 2.0.0-dev-rc.3.0.0.254274
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/api-report/file-driver.api.md +14 -14
- package/dist/file-driver-alpha.d.ts +14 -14
- package/dist/file-driver-beta.d.ts +14 -14
- package/dist/file-driver-public.d.ts +14 -14
- package/dist/file-driver-untrimmed.d.ts +14 -14
- package/dist/fileDeltaStorageService.d.ts +1 -1
- package/dist/fileDeltaStorageService.d.ts.map +1 -1
- package/dist/fileDeltaStorageService.js +4 -4
- package/dist/fileDeltaStorageService.js.map +1 -1
- package/dist/fileDocumentDeltaConnection.d.ts +1 -1
- package/dist/fileDocumentDeltaConnection.d.ts.map +1 -1
- package/dist/fileDocumentDeltaConnection.js.map +1 -1
- package/dist/fileDocumentService.d.ts +1 -1
- package/dist/fileDocumentService.d.ts.map +1 -1
- package/dist/fileDocumentService.js.map +1 -1
- package/dist/fileDocumentServiceFactory.d.ts +1 -1
- package/dist/fileDocumentServiceFactory.d.ts.map +1 -1
- package/dist/fileDocumentServiceFactory.js.map +1 -1
- package/dist/fileDocumentStorageService.d.ts +6 -6
- package/dist/fileDocumentStorageService.d.ts.map +1 -1
- package/dist/fileDocumentStorageService.js +10 -10
- package/dist/fileDocumentStorageService.js.map +1 -1
- package/lib/file-driver-alpha.d.ts +14 -14
- package/lib/file-driver-beta.d.ts +14 -14
- package/lib/file-driver-public.d.ts +14 -14
- package/lib/file-driver-untrimmed.d.ts +14 -14
- package/lib/fileDeltaStorageService.d.ts +1 -1
- package/lib/fileDeltaStorageService.d.ts.map +1 -1
- package/lib/fileDeltaStorageService.js +2 -2
- package/lib/fileDeltaStorageService.js.map +1 -1
- package/lib/fileDocumentDeltaConnection.d.ts +1 -1
- package/lib/fileDocumentDeltaConnection.d.ts.map +1 -1
- package/lib/fileDocumentDeltaConnection.js.map +1 -1
- package/lib/fileDocumentService.d.ts +1 -1
- package/lib/fileDocumentService.d.ts.map +1 -1
- package/lib/fileDocumentService.js.map +1 -1
- package/lib/fileDocumentServiceFactory.d.ts +1 -1
- package/lib/fileDocumentServiceFactory.d.ts.map +1 -1
- package/lib/fileDocumentServiceFactory.js.map +1 -1
- package/lib/fileDocumentStorageService.d.ts +6 -6
- package/lib/fileDocumentStorageService.d.ts.map +1 -1
- package/lib/fileDocumentStorageService.js +3 -3
- package/lib/fileDocumentStorageService.js.map +1 -1
- package/lib/tsdoc-metadata.json +11 -0
- package/package.json +9 -21
- package/src/fileDeltaStorageService.ts +4 -3
- package/src/fileDocumentDeltaConnection.ts +2 -1
- package/src/fileDocumentService.ts +2 -1
- package/src/fileDocumentServiceFactory.ts +2 -1
- package/src/fileDocumentStorageService.ts +14 -4
- package/lib/test/types/validateFileDriverPrevious.generated.d.ts +0 -2
- package/lib/test/types/validateFileDriverPrevious.generated.d.ts.map +0 -1
- package/lib/test/types/validateFileDriverPrevious.generated.js +0 -26
- package/lib/test/types/validateFileDriverPrevious.generated.js.map +0 -1
|
@@ -9,27 +9,27 @@ import { ConnectionMode } from '@fluidframework/protocol-definitions';
|
|
|
9
9
|
import { IClientConfiguration } from '@fluidframework/protocol-definitions';
|
|
10
10
|
import { IConnected } from '@fluidframework/protocol-definitions';
|
|
11
11
|
import { IDisposable } from '@fluidframework/core-interfaces';
|
|
12
|
-
import { IDocumentDeltaConnection } from '@fluidframework/driver-definitions';
|
|
13
|
-
import { IDocumentDeltaConnectionEvents } from '@fluidframework/driver-definitions';
|
|
14
|
-
import { IDocumentDeltaStorageService } from '@fluidframework/driver-definitions';
|
|
12
|
+
import { IDocumentDeltaConnection } from '@fluidframework/driver-definitions/internal';
|
|
13
|
+
import { IDocumentDeltaConnectionEvents } from '@fluidframework/driver-definitions/internal';
|
|
14
|
+
import { IDocumentDeltaStorageService } from '@fluidframework/driver-definitions/internal';
|
|
15
15
|
import { IDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
16
|
-
import { IDocumentService } from '@fluidframework/driver-definitions';
|
|
17
|
-
import { IDocumentServiceFactory } from '@fluidframework/driver-definitions';
|
|
18
|
-
import { IDocumentStorageService } from '@fluidframework/driver-definitions';
|
|
19
|
-
import { IDocumentStorageServicePolicies } from '@fluidframework/driver-definitions';
|
|
20
|
-
import { IFileSnapshot } from '@fluidframework/replay-driver';
|
|
21
|
-
import { IResolvedUrl } from '@fluidframework/driver-definitions';
|
|
16
|
+
import { IDocumentService } from '@fluidframework/driver-definitions/internal';
|
|
17
|
+
import { IDocumentServiceFactory } from '@fluidframework/driver-definitions/internal';
|
|
18
|
+
import { IDocumentStorageService } from '@fluidframework/driver-definitions/internal';
|
|
19
|
+
import { IDocumentStorageServicePolicies } from '@fluidframework/driver-definitions/internal';
|
|
20
|
+
import { IFileSnapshot } from '@fluidframework/replay-driver/internal';
|
|
21
|
+
import { IResolvedUrl } from '@fluidframework/driver-definitions/internal';
|
|
22
22
|
import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
23
23
|
import { ISignalClient } from '@fluidframework/protocol-definitions';
|
|
24
24
|
import { ISignalMessage } from '@fluidframework/protocol-definitions';
|
|
25
|
-
import { ISnapshot } from '@fluidframework/driver-definitions';
|
|
26
|
-
import { ISnapshotFetchOptions } from '@fluidframework/driver-definitions';
|
|
27
|
-
import { IStream } from '@fluidframework/driver-definitions';
|
|
28
|
-
import { ISummaryContext } from '@fluidframework/driver-definitions';
|
|
25
|
+
import { ISnapshot } from '@fluidframework/driver-definitions/internal';
|
|
26
|
+
import { ISnapshotFetchOptions } from '@fluidframework/driver-definitions/internal';
|
|
27
|
+
import { IStream } from '@fluidframework/driver-definitions/internal';
|
|
28
|
+
import { ISummaryContext } from '@fluidframework/driver-definitions/internal';
|
|
29
29
|
import { ISummaryTree } from '@fluidframework/protocol-definitions';
|
|
30
30
|
import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
|
|
31
31
|
import { ITokenClaims } from '@fluidframework/protocol-definitions';
|
|
32
|
-
import { ReadDocumentStorageServiceBase } from '@fluidframework/replay-driver';
|
|
32
|
+
import { ReadDocumentStorageServiceBase } from '@fluidframework/replay-driver/internal';
|
|
33
33
|
import { TypedEventEmitter } from '@fluid-internal/client-utils';
|
|
34
34
|
|
|
35
35
|
// @internal
|
|
@@ -3,27 +3,27 @@ import { ConnectionMode } from '@fluidframework/protocol-definitions';
|
|
|
3
3
|
import { IClientConfiguration } from '@fluidframework/protocol-definitions';
|
|
4
4
|
import { IConnected } from '@fluidframework/protocol-definitions';
|
|
5
5
|
import { IDisposable } from '@fluidframework/core-interfaces';
|
|
6
|
-
import { IDocumentDeltaConnection } from '@fluidframework/driver-definitions';
|
|
7
|
-
import { IDocumentDeltaConnectionEvents } from '@fluidframework/driver-definitions';
|
|
8
|
-
import { IDocumentDeltaStorageService } from '@fluidframework/driver-definitions';
|
|
6
|
+
import { IDocumentDeltaConnection } from '@fluidframework/driver-definitions/internal';
|
|
7
|
+
import { IDocumentDeltaConnectionEvents } from '@fluidframework/driver-definitions/internal';
|
|
8
|
+
import { IDocumentDeltaStorageService } from '@fluidframework/driver-definitions/internal';
|
|
9
9
|
import { IDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
10
|
-
import { IDocumentService } from '@fluidframework/driver-definitions';
|
|
11
|
-
import { IDocumentServiceFactory } from '@fluidframework/driver-definitions';
|
|
12
|
-
import { IDocumentStorageService } from '@fluidframework/driver-definitions';
|
|
13
|
-
import { IDocumentStorageServicePolicies } from '@fluidframework/driver-definitions';
|
|
14
|
-
import { IFileSnapshot } from '@fluidframework/replay-driver';
|
|
15
|
-
import { IResolvedUrl } from '@fluidframework/driver-definitions';
|
|
10
|
+
import { IDocumentService } from '@fluidframework/driver-definitions/internal';
|
|
11
|
+
import { IDocumentServiceFactory } from '@fluidframework/driver-definitions/internal';
|
|
12
|
+
import { IDocumentStorageService } from '@fluidframework/driver-definitions/internal';
|
|
13
|
+
import { IDocumentStorageServicePolicies } from '@fluidframework/driver-definitions/internal';
|
|
14
|
+
import { IFileSnapshot } from '@fluidframework/replay-driver/internal';
|
|
15
|
+
import { IResolvedUrl } from '@fluidframework/driver-definitions/internal';
|
|
16
16
|
import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
17
17
|
import { ISignalClient } from '@fluidframework/protocol-definitions';
|
|
18
18
|
import { ISignalMessage } from '@fluidframework/protocol-definitions';
|
|
19
|
-
import { ISnapshot } from '@fluidframework/driver-definitions';
|
|
20
|
-
import { ISnapshotFetchOptions } from '@fluidframework/driver-definitions';
|
|
21
|
-
import { IStream } from '@fluidframework/driver-definitions';
|
|
22
|
-
import { ISummaryContext } from '@fluidframework/driver-definitions';
|
|
19
|
+
import { ISnapshot } from '@fluidframework/driver-definitions/internal';
|
|
20
|
+
import { ISnapshotFetchOptions } from '@fluidframework/driver-definitions/internal';
|
|
21
|
+
import { IStream } from '@fluidframework/driver-definitions/internal';
|
|
22
|
+
import { ISummaryContext } from '@fluidframework/driver-definitions/internal';
|
|
23
23
|
import { ISummaryTree } from '@fluidframework/protocol-definitions';
|
|
24
24
|
import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
|
|
25
25
|
import { ITokenClaims } from '@fluidframework/protocol-definitions';
|
|
26
|
-
import { ReadDocumentStorageServiceBase } from '@fluidframework/replay-driver';
|
|
26
|
+
import { ReadDocumentStorageServiceBase } from '@fluidframework/replay-driver/internal';
|
|
27
27
|
import { TypedEventEmitter } from '@fluid-internal/client-utils';
|
|
28
28
|
|
|
29
29
|
/* Excluded from this release type: FileDeltaStorageService */
|
|
@@ -3,27 +3,27 @@ import { ConnectionMode } from '@fluidframework/protocol-definitions';
|
|
|
3
3
|
import { IClientConfiguration } from '@fluidframework/protocol-definitions';
|
|
4
4
|
import { IConnected } from '@fluidframework/protocol-definitions';
|
|
5
5
|
import { IDisposable } from '@fluidframework/core-interfaces';
|
|
6
|
-
import { IDocumentDeltaConnection } from '@fluidframework/driver-definitions';
|
|
7
|
-
import { IDocumentDeltaConnectionEvents } from '@fluidframework/driver-definitions';
|
|
8
|
-
import { IDocumentDeltaStorageService } from '@fluidframework/driver-definitions';
|
|
6
|
+
import { IDocumentDeltaConnection } from '@fluidframework/driver-definitions/internal';
|
|
7
|
+
import { IDocumentDeltaConnectionEvents } from '@fluidframework/driver-definitions/internal';
|
|
8
|
+
import { IDocumentDeltaStorageService } from '@fluidframework/driver-definitions/internal';
|
|
9
9
|
import { IDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
10
|
-
import { IDocumentService } from '@fluidframework/driver-definitions';
|
|
11
|
-
import { IDocumentServiceFactory } from '@fluidframework/driver-definitions';
|
|
12
|
-
import { IDocumentStorageService } from '@fluidframework/driver-definitions';
|
|
13
|
-
import { IDocumentStorageServicePolicies } from '@fluidframework/driver-definitions';
|
|
14
|
-
import { IFileSnapshot } from '@fluidframework/replay-driver';
|
|
15
|
-
import { IResolvedUrl } from '@fluidframework/driver-definitions';
|
|
10
|
+
import { IDocumentService } from '@fluidframework/driver-definitions/internal';
|
|
11
|
+
import { IDocumentServiceFactory } from '@fluidframework/driver-definitions/internal';
|
|
12
|
+
import { IDocumentStorageService } from '@fluidframework/driver-definitions/internal';
|
|
13
|
+
import { IDocumentStorageServicePolicies } from '@fluidframework/driver-definitions/internal';
|
|
14
|
+
import { IFileSnapshot } from '@fluidframework/replay-driver/internal';
|
|
15
|
+
import { IResolvedUrl } from '@fluidframework/driver-definitions/internal';
|
|
16
16
|
import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
17
17
|
import { ISignalClient } from '@fluidframework/protocol-definitions';
|
|
18
18
|
import { ISignalMessage } from '@fluidframework/protocol-definitions';
|
|
19
|
-
import { ISnapshot } from '@fluidframework/driver-definitions';
|
|
20
|
-
import { ISnapshotFetchOptions } from '@fluidframework/driver-definitions';
|
|
21
|
-
import { IStream } from '@fluidframework/driver-definitions';
|
|
22
|
-
import { ISummaryContext } from '@fluidframework/driver-definitions';
|
|
19
|
+
import { ISnapshot } from '@fluidframework/driver-definitions/internal';
|
|
20
|
+
import { ISnapshotFetchOptions } from '@fluidframework/driver-definitions/internal';
|
|
21
|
+
import { IStream } from '@fluidframework/driver-definitions/internal';
|
|
22
|
+
import { ISummaryContext } from '@fluidframework/driver-definitions/internal';
|
|
23
23
|
import { ISummaryTree } from '@fluidframework/protocol-definitions';
|
|
24
24
|
import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
|
|
25
25
|
import { ITokenClaims } from '@fluidframework/protocol-definitions';
|
|
26
|
-
import { ReadDocumentStorageServiceBase } from '@fluidframework/replay-driver';
|
|
26
|
+
import { ReadDocumentStorageServiceBase } from '@fluidframework/replay-driver/internal';
|
|
27
27
|
import { TypedEventEmitter } from '@fluid-internal/client-utils';
|
|
28
28
|
|
|
29
29
|
/* Excluded from this release type: FileDeltaStorageService */
|
|
@@ -3,27 +3,27 @@ import { ConnectionMode } from '@fluidframework/protocol-definitions';
|
|
|
3
3
|
import { IClientConfiguration } from '@fluidframework/protocol-definitions';
|
|
4
4
|
import { IConnected } from '@fluidframework/protocol-definitions';
|
|
5
5
|
import { IDisposable } from '@fluidframework/core-interfaces';
|
|
6
|
-
import { IDocumentDeltaConnection } from '@fluidframework/driver-definitions';
|
|
7
|
-
import { IDocumentDeltaConnectionEvents } from '@fluidframework/driver-definitions';
|
|
8
|
-
import { IDocumentDeltaStorageService } from '@fluidframework/driver-definitions';
|
|
6
|
+
import { IDocumentDeltaConnection } from '@fluidframework/driver-definitions/internal';
|
|
7
|
+
import { IDocumentDeltaConnectionEvents } from '@fluidframework/driver-definitions/internal';
|
|
8
|
+
import { IDocumentDeltaStorageService } from '@fluidframework/driver-definitions/internal';
|
|
9
9
|
import { IDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
10
|
-
import { IDocumentService } from '@fluidframework/driver-definitions';
|
|
11
|
-
import { IDocumentServiceFactory } from '@fluidframework/driver-definitions';
|
|
12
|
-
import { IDocumentStorageService } from '@fluidframework/driver-definitions';
|
|
13
|
-
import { IDocumentStorageServicePolicies } from '@fluidframework/driver-definitions';
|
|
14
|
-
import { IFileSnapshot } from '@fluidframework/replay-driver';
|
|
15
|
-
import { IResolvedUrl } from '@fluidframework/driver-definitions';
|
|
10
|
+
import { IDocumentService } from '@fluidframework/driver-definitions/internal';
|
|
11
|
+
import { IDocumentServiceFactory } from '@fluidframework/driver-definitions/internal';
|
|
12
|
+
import { IDocumentStorageService } from '@fluidframework/driver-definitions/internal';
|
|
13
|
+
import { IDocumentStorageServicePolicies } from '@fluidframework/driver-definitions/internal';
|
|
14
|
+
import { IFileSnapshot } from '@fluidframework/replay-driver/internal';
|
|
15
|
+
import { IResolvedUrl } from '@fluidframework/driver-definitions/internal';
|
|
16
16
|
import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
17
17
|
import { ISignalClient } from '@fluidframework/protocol-definitions';
|
|
18
18
|
import { ISignalMessage } from '@fluidframework/protocol-definitions';
|
|
19
|
-
import { ISnapshot } from '@fluidframework/driver-definitions';
|
|
20
|
-
import { ISnapshotFetchOptions } from '@fluidframework/driver-definitions';
|
|
21
|
-
import { IStream } from '@fluidframework/driver-definitions';
|
|
22
|
-
import { ISummaryContext } from '@fluidframework/driver-definitions';
|
|
19
|
+
import { ISnapshot } from '@fluidframework/driver-definitions/internal';
|
|
20
|
+
import { ISnapshotFetchOptions } from '@fluidframework/driver-definitions/internal';
|
|
21
|
+
import { IStream } from '@fluidframework/driver-definitions/internal';
|
|
22
|
+
import { ISummaryContext } from '@fluidframework/driver-definitions/internal';
|
|
23
23
|
import { ISummaryTree } from '@fluidframework/protocol-definitions';
|
|
24
24
|
import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
|
|
25
25
|
import { ITokenClaims } from '@fluidframework/protocol-definitions';
|
|
26
|
-
import { ReadDocumentStorageServiceBase } from '@fluidframework/replay-driver';
|
|
26
|
+
import { ReadDocumentStorageServiceBase } from '@fluidframework/replay-driver/internal';
|
|
27
27
|
import { TypedEventEmitter } from '@fluid-internal/client-utils';
|
|
28
28
|
|
|
29
29
|
/* Excluded from this release type: FileDeltaStorageService */
|
|
@@ -3,27 +3,27 @@ import { ConnectionMode } from '@fluidframework/protocol-definitions';
|
|
|
3
3
|
import { IClientConfiguration } from '@fluidframework/protocol-definitions';
|
|
4
4
|
import { IConnected } from '@fluidframework/protocol-definitions';
|
|
5
5
|
import { IDisposable } from '@fluidframework/core-interfaces';
|
|
6
|
-
import { IDocumentDeltaConnection } from '@fluidframework/driver-definitions';
|
|
7
|
-
import { IDocumentDeltaConnectionEvents } from '@fluidframework/driver-definitions';
|
|
8
|
-
import { IDocumentDeltaStorageService } from '@fluidframework/driver-definitions';
|
|
6
|
+
import { IDocumentDeltaConnection } from '@fluidframework/driver-definitions/internal';
|
|
7
|
+
import { IDocumentDeltaConnectionEvents } from '@fluidframework/driver-definitions/internal';
|
|
8
|
+
import { IDocumentDeltaStorageService } from '@fluidframework/driver-definitions/internal';
|
|
9
9
|
import { IDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
10
|
-
import { IDocumentService } from '@fluidframework/driver-definitions';
|
|
11
|
-
import { IDocumentServiceFactory } from '@fluidframework/driver-definitions';
|
|
12
|
-
import { IDocumentStorageService } from '@fluidframework/driver-definitions';
|
|
13
|
-
import { IDocumentStorageServicePolicies } from '@fluidframework/driver-definitions';
|
|
14
|
-
import { IFileSnapshot } from '@fluidframework/replay-driver';
|
|
15
|
-
import { IResolvedUrl } from '@fluidframework/driver-definitions';
|
|
10
|
+
import { IDocumentService } from '@fluidframework/driver-definitions/internal';
|
|
11
|
+
import { IDocumentServiceFactory } from '@fluidframework/driver-definitions/internal';
|
|
12
|
+
import { IDocumentStorageService } from '@fluidframework/driver-definitions/internal';
|
|
13
|
+
import { IDocumentStorageServicePolicies } from '@fluidframework/driver-definitions/internal';
|
|
14
|
+
import { IFileSnapshot } from '@fluidframework/replay-driver/internal';
|
|
15
|
+
import { IResolvedUrl } from '@fluidframework/driver-definitions/internal';
|
|
16
16
|
import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
17
17
|
import { ISignalClient } from '@fluidframework/protocol-definitions';
|
|
18
18
|
import { ISignalMessage } from '@fluidframework/protocol-definitions';
|
|
19
|
-
import { ISnapshot } from '@fluidframework/driver-definitions';
|
|
20
|
-
import { ISnapshotFetchOptions } from '@fluidframework/driver-definitions';
|
|
21
|
-
import { IStream } from '@fluidframework/driver-definitions';
|
|
22
|
-
import { ISummaryContext } from '@fluidframework/driver-definitions';
|
|
19
|
+
import { ISnapshot } from '@fluidframework/driver-definitions/internal';
|
|
20
|
+
import { ISnapshotFetchOptions } from '@fluidframework/driver-definitions/internal';
|
|
21
|
+
import { IStream } from '@fluidframework/driver-definitions/internal';
|
|
22
|
+
import { ISummaryContext } from '@fluidframework/driver-definitions/internal';
|
|
23
23
|
import { ISummaryTree } from '@fluidframework/protocol-definitions';
|
|
24
24
|
import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
|
|
25
25
|
import { ITokenClaims } from '@fluidframework/protocol-definitions';
|
|
26
|
-
import { ReadDocumentStorageServiceBase } from '@fluidframework/replay-driver';
|
|
26
|
+
import { ReadDocumentStorageServiceBase } from '@fluidframework/replay-driver/internal';
|
|
27
27
|
import { TypedEventEmitter } from '@fluid-internal/client-utils';
|
|
28
28
|
|
|
29
29
|
/**
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import { IDocumentDeltaStorageService, IStream } from "@fluidframework/driver-definitions";
|
|
5
|
+
import { IDocumentDeltaStorageService, IStream } from "@fluidframework/driver-definitions/internal";
|
|
6
6
|
import * as api from "@fluidframework/protocol-definitions";
|
|
7
7
|
/**
|
|
8
8
|
* Provides access to the underlying delta storage on the local file storage for file driver.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fileDeltaStorageService.d.ts","sourceRoot":"","sources":["../src/fileDeltaStorageService.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"fileDeltaStorageService.d.ts","sourceRoot":"","sources":["../src/fileDeltaStorageService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAAE,4BAA4B,EAAE,OAAO,EAAE,MAAM,6CAA6C,CAAC;AAEpG,OAAO,KAAK,GAAG,MAAM,sCAAsC,CAAC;AAE5D;;;GAGG;AACH,qBAAa,uBAAwB,YAAW,4BAA4B;IAI/D,OAAO,CAAC,QAAQ,CAAC,IAAI;IAHjC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAkC;IAC3D,OAAO,CAAC,OAAO,CAAuC;gBAEzB,IAAI,EAAE,MAAM;IAkBlC,aAAa,CACnB,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,GAAG,SAAS,EACtB,WAAW,CAAC,EAAE,WAAW,EACzB,UAAU,CAAC,EAAE,OAAO,GAClB,OAAO,CAAC,GAAG,CAAC,yBAAyB,EAAE,CAAC;IAI3C,IAAW,GAAG,IAAI,SAAS,QAAQ,CAAC,GAAG,CAAC,yBAAyB,CAAC,EAAE,CAEnE;IAED;;;;;OAKG;IACI,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,GAAG,CAAC,yBAAyB,EAAE;CAmBlF"}
|
|
@@ -9,8 +9,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.FileDeltaStorageService = void 0;
|
|
11
11
|
const fs_1 = __importDefault(require("fs"));
|
|
12
|
-
const
|
|
13
|
-
const
|
|
12
|
+
const internal_1 = require("@fluidframework/core-utils/internal");
|
|
13
|
+
const internal_2 = require("@fluidframework/driver-utils/internal");
|
|
14
14
|
/**
|
|
15
15
|
* Provides access to the underlying delta storage on the local file storage for file driver.
|
|
16
16
|
* @internal
|
|
@@ -36,7 +36,7 @@ class FileDeltaStorageService {
|
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
fetchMessages(from, to, abortSignal, cachedOnly) {
|
|
39
|
-
return
|
|
39
|
+
return internal_2.emptyMessageStream;
|
|
40
40
|
}
|
|
41
41
|
get ops() {
|
|
42
42
|
return this.messages;
|
|
@@ -58,7 +58,7 @@ class FileDeltaStorageService {
|
|
|
58
58
|
return this.lastOps;
|
|
59
59
|
}
|
|
60
60
|
this.lastOps = this.messages.slice(readFrom, readTo);
|
|
61
|
-
(0,
|
|
61
|
+
(0, internal_1.assert)(this.lastOps[0].sequenceNumber === readFrom + 1, 0x091 /* "Retrieved ops' first sequence number has unexpected value!" */);
|
|
62
62
|
return this.lastOps;
|
|
63
63
|
}
|
|
64
64
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fileDeltaStorageService.js","sourceRoot":"","sources":["../src/fileDeltaStorageService.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;AAEH,4CAAoB;
|
|
1
|
+
{"version":3,"file":"fileDeltaStorageService.js","sourceRoot":"","sources":["../src/fileDeltaStorageService.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;AAEH,4CAAoB;AAEpB,kEAA6D;AAE7D,oEAA2E;AAG3E;;;GAGG;AACH,MAAa,uBAAuB;IAInC,YAA6B,IAAY;QAAZ,SAAI,GAAJ,IAAI,CAAQ;QAFjC,YAAO,GAAoC,EAAE,CAAC;QAGrD,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;QACnB,IAAI,OAAO,GAAG,CAAC,CAAC;QAChB,iDAAiD;QACjD,OAAO,IAAI,EAAE;YACZ,MAAM,QAAQ,GAAG,GAAG,IAAI,CAAC,IAAI,aAAa,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,OAAO,CAAC;YAC9E,IAAI,CAAC,YAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE;gBAC7B,IAAI,O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;QACrD,IAAA,iBAAM,EACL,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,cAAc,KAAK,QAAQ,GAAG,CAAC,EAC/C,KAAK,CAAC,kEAAkE,CACxE,CAAC;QACF,OAAO,IAAI,CAAC,OAAO,CAAC;IACrB,CAAC;CACD;AA5DD,0DA4DC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport fs from \"fs\";\n\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport { IDocumentDeltaStorageService, IStream } from \"@fluidframework/driver-definitions/internal\";\nimport { emptyMessageStream } from \"@fluidframework/driver-utils/internal\";\nimport * as api from \"@fluidframework/protocol-definitions\";\n\n/**\n * Provides access to the underlying delta storage on the local file storage for file driver.\n * @internal\n */\nexport class FileDeltaStorageService implements IDocumentDeltaStorageService {\n\tprivate readonly messages: api.ISequencedDocumentMessage[];\n\tprivate lastOps: api.ISequencedDocumentMessage[] = [];\n\n\tconstructor(private readonly path: string) {\n\t\tthis.messages = [];\n\t\tlet counter = 0;\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tconst filename = `${this.path}//messages${counter === 0 ? \"\" : counter}.json`;\n\t\t\tif (!fs.existsSync(filename)) {\n\t\t\t\tif (counter === 0) {\n\t\t\t\t\tthrow new Error(`file ${filename} not found`);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tconst data = fs.readFileSync(filename);\n\t\t\tthis.messages = this.messages.concat(JSON.parse(data.toString(\"utf-8\")));\n\t\t\tcounter++;\n\t\t}\n\t}\n\n\tpublic fetchMessages(\n\t\tfrom: number,\n\t\tto: number | undefined,\n\t\tabortSignal?: AbortSignal,\n\t\tcachedOnly?: boolean,\n\t): IStream<api.ISequencedDocumentMessage[]> {\n\t\treturn emptyMessageStream;\n\t}\n\n\tpublic get ops(): readonly Readonly<api.ISequencedDocumentMessage>[] {\n\t\treturn this.messages;\n\t}\n\n\t/**\n\t * Retrieve ops within the exclusive sequence number range.\n\t *\n\t * @param from - First op to be fetched.\n\t * @param to - Last op to be fetched. This is exclusive.\n\t */\n\tpublic getFromWebSocket(from: number, to: number): api.ISequencedDocumentMessage[] {\n\t\tconst readFrom = Math.max(from, 0); // Inclusive\n\t\tconst readTo = Math.min(to, this.messages.length); // Exclusive\n\n\t\tif (readFrom >= this.messages.length || readTo <= 0 || readFrom >= readTo) {\n\t\t\treturn [];\n\t\t}\n\n\t\t// Optimizations for multiple readers (replay tool)\n\t\tif (this.lastOps.length > 0 && this.lastOps[0].sequenceNumber === readFrom + 1) {\n\t\t\treturn this.lastOps;\n\t\t}\n\t\tthis.lastOps = this.messages.slice(readFrom, readTo);\n\t\tassert(\n\t\t\tthis.lastOps[0].sequenceNumber === readFrom + 1,\n\t\t\t0x091 /* \"Retrieved ops' first sequence number has unexpected value!\" */,\n\t\t);\n\t\treturn this.lastOps;\n\t}\n}\n"]}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { TypedEventEmitter } from "@fluid-internal/client-utils";
|
|
6
6
|
import { IDisposable } from "@fluidframework/core-interfaces";
|
|
7
|
-
import { IDocumentDeltaConnection, IDocumentDeltaConnectionEvents } from "@fluidframework/driver-definitions";
|
|
7
|
+
import { IDocumentDeltaConnection, IDocumentDeltaConnectionEvents } from "@fluidframework/driver-definitions/internal";
|
|
8
8
|
import { ConnectionMode, IClientConfiguration, IConnected, IDocumentMessage, ISequencedDocumentMessage, ISignalClient, ISignalMessage, ITokenClaims } from "@fluidframework/protocol-definitions";
|
|
9
9
|
import { FileDeltaStorageService } from "./fileDeltaStorageService.js";
|
|
10
10
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fileDocumentDeltaConnection.d.ts","sourceRoot":"","sources":["../src/fileDocumentDeltaConnection.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA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EAAE,uBAAuB,GAClD,OAAO,CAAC,yBAAyB,CAAC;IA0BrC,SAAgB,cAAc,SAAwB;IACtD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAW;gBAG5B,OAAO,EAAE,UAAU,EAC1B,2BAA2B,EAAE,uBAAuB;IAM9C,WAAW;IAIlB,IAAW,QAAQ,IAAI,MAAM,CAE5B;IAED,IAAW,IAAI,IAAI,cAAc,CAEhC;IAED,IAAW,MAAM,IAAI,YAAY,CAEhC;IAED,IAAW,QAAQ,IAAI,OAAO,CAE7B;IAED,IAAW,OAAO,IAAI,MAAM,CAE3B;IAED,IAAW,eAAe,IAAI,yBAAyB,EAAE,CAExD;IAED,IAAW,cAAc,IAAI,cAAc,EAAE,CAE5C;IAED,IAAW,cAAc,IAAI,aAAa,EAAE,CAE3C;IAED,IAAW,oBAAoB,IAAI,oBAAoB,CAEtD;IAEM,MAAM,CAAC,gBAAgB,EAAE,gBAAgB,EAAE,GAAG,IAAI;IAM5C,YAAY,CAAC,OAAO,EAAE,GAAG;IAEtC,OAAO,CAAC,SAAS,CAAS;IAC1B,IAAW,QAAQ,YAElB;IACM,OAAO;CAGd"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fileDocumentDeltaConnection.js","sourceRoot":"","sources":["../src/fileDocumentDeltaConnection.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+DAAiE;AAMjE,+EAU8C;
|
|
1
|
+
{"version":3,"file":"fileDocumentDeltaConnection.js","sourceRoot":"","sources":["../src/fileDocumentDeltaConnection.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+DAAiE;AAMjE,+EAU8C;AAI9C,MAAM,cAAc,GAAG,IAAI,CAAC;AAE5B,qFAAqF;AACrF,MAAM,oBAAoB,GAAG,EAAE,GAAG,IAAI,CAAC;AAEvC,MAAM,mBAAmB,GAAG,QAAQ,CAAC;AAErC,MAAM,gBAAgB,GAAG,aAAa,CAAC;AAEvC,MAAM,MAAM,G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C;IACvE,CAAC;IAEM,KAAK,CAAC,YAAY,CAAC,OAAY,IAAG,CAAC;IAG1C,IAAW,QAAQ;QAClB,OAAO,IAAI,CAAC,SAAS,CAAC;IACvB,CAAC;IACM,OAAO;QACb,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;IACvB,CAAC;CACD;AAxGD,8DAwGC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { TypedEventEmitter } from \"@fluid-internal/client-utils\";\nimport { IDisposable } from \"@fluidframework/core-interfaces\";\nimport {\n\tIDocumentDeltaConnection,\n\tIDocumentDeltaConnectionEvents,\n} from \"@fluidframework/driver-definitions/internal\";\nimport {\n\tConnectionMode,\n\tIClientConfiguration,\n\tIConnected,\n\tIDocumentMessage,\n\tISequencedDocumentMessage,\n\tISignalClient,\n\tISignalMessage,\n\tITokenClaims,\n\tScopeType,\n} from \"@fluidframework/protocol-definitions\";\n\nimport { FileDeltaStorageService } from \"./fileDeltaStorageService.js\";\n\nconst MaxBatchDeltas = 2000;\n\n// Since the replay service never actually sends messages the size below is arbitrary\nconst ReplayMaxMessageSize = 16 * 1024;\n\nconst fileProtocolVersion = \"^0.1.0\";\n\nconst replayDocumentId = \"replayDocId\";\n\nconst Claims: ITokenClaims = {\n\tdocumentId: replayDocumentId,\n\tscopes: [ScopeType.DocRead],\n\ttenantId: \"\",\n\tuser: {\n\t\tid: \"\",\n\t},\n\tiat: Math.round(new Date().getTime() / 1000),\n\texp: Math.round(new Date().getTime() / 1000) + 60 * 60, // 1 hour expiration\n\tver: \"1.0\",\n};\n\n/**\n * Replay service used to play ops using the delta connection.\n * @internal\n */\nexport class Replayer {\n\tprivate currentReplayOp = 0;\n\n\tconstructor(\n\t\tprivate readonly deltaConnection: ReplayFileDeltaConnection,\n\t\tprivate readonly documentStorageService: FileDeltaStorageService,\n\t) {}\n\n\tpublic get currentReplayedOp() {\n\t\treturn this.currentReplayOp;\n\t}\n\n\tpublic set currentReplayedOp(op: number) {\n\t\tthis.currentReplayOp = op;\n\t}\n\n\tpublic get ops(): readonly Readonly<ISequencedDocumentMessage>[] {\n\t\treturn this.documentStorageService.ops;\n\t}\n\n\t/**\n\t * Replay the ops upto a certain number.\n\t * @param replayTo - The last op number to be replayed.\n\t */\n\tpublic replay(replayTo: number) {\n\t\tlet totalReplayedOps = 0;\n\t\tlet done: boolean;\n\t\tdo {\n\t\t\tconst fetchToBatch = this.currentReplayOp + MaxBatchDeltas;\n\t\t\tconst fetchTo = Math.min(fetchToBatch, replayTo);\n\n\t\t\tconst fetchedOps = this.documentStorageService.getFromWebSocket(\n\t\t\t\tthis.currentReplayOp,\n\t\t\t\tfetchTo,\n\t\t\t);\n\n\t\t\tif (fetchedOps.length <= 0) {\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tthis.emit(fetchedOps);\n\t\t\t\ttotalReplayedOps += fetchedOps.length;\n\t\t\t\tthis.currentReplayOp += fetchedOps.length;\n\t\t\t\tdone = this.isDoneFetch(replayTo);\n\t\t\t}\n\t\t} while (!done);\n\t\treturn totalReplayedOps;\n\t}\n\n\tprivate isDoneFetch(replayTo: number) {\n\t\tif (replayTo >= 0) {\n\t\t\treturn this.currentReplayOp >= replayTo;\n\t\t}\n\t\treturn false;\n\t}\n\n\tprivate emit(ops: ISequencedDocumentMessage[]) {\n\t\t// Note: do not clone messages here!\n\t\t// If Replay Tool fails due to one container patching message in-place,\n\t\t// then same thing can happen in shipping product due to\n\t\t// socket reuse in ODSP between main and summarizer containers.\n\t\tthis.deltaConnection.emit(\"op\", replayDocumentId, ops);\n\t}\n}\n\n/**\n * @internal\n */\nexport class ReplayFileDeltaConnection\n\textends TypedEventEmitter<IDocumentDeltaConnectionEvents>\n\timplements IDocumentDeltaConnection, IDisposable\n{\n\t/**\n\t * Mimic the delta connection to replay ops on it.\n\t *\n\t * @param documentDeltaStorageService - The delta storage service to get ops from.\n\t * @returns Document delta connection.\n\t */\n\tpublic static async create(\n\t\tdocumentDeltaStorageService: FileDeltaStorageService,\n\t): Promise<ReplayFileDeltaConnection> {\n\t\tconst mode: ConnectionMode = \"read\";\n\t\tconst connection = {\n\t\t\tclaims: Claims,\n\t\t\tclientId: \"PseudoClientId\",\n\t\t\texisting: true,\n\t\t\tinitialMessages: [],\n\t\t\tinitialSignals: [],\n\t\t\tinitialClients: [],\n\t\t\tmaxMessageSize: ReplayMaxMessageSize,\n\t\t\tmode,\n\t\t\tserviceConfiguration: {\n\t\t\t\tblockSize: 64436,\n\t\t\t\tmaxMessageSize: ReplayMaxMessageSize,\n\t\t\t},\n\t\t\tsupportedVersions: [fileProtocolVersion],\n\t\t\tuser: null,\n\t\t\tversion: fileProtocolVersion,\n\t\t};\n\t\tconst deltaConnection = new ReplayFileDeltaConnection(\n\t\t\tconnection,\n\t\t\tdocumentDeltaStorageService,\n\t\t);\n\t\treturn deltaConnection;\n\t}\n\n\tpublic readonly maxMessageSize = ReplayMaxMessageSize;\n\tprivate readonly replayer: Replayer;\n\n\tpublic constructor(\n\t\tpublic details: IConnected,\n\t\tdocumentDeltaStorageService: FileDeltaStorageService,\n\t) {\n\t\tsuper();\n\t\tthis.replayer = new Replayer(this, documentDeltaStorageService);\n\t}\n\n\tpublic getReplayer() {\n\t\treturn this.replayer;\n\t}\n\n\tpublic get clientId(): string {\n\t\treturn this.details.clientId;\n\t}\n\n\tpublic get mode(): ConnectionMode {\n\t\treturn this.details.mode;\n\t}\n\n\tpublic get claims(): ITokenClaims {\n\t\treturn this.details.claims;\n\t}\n\n\tpublic get existing(): boolean {\n\t\treturn this.details.existing;\n\t}\n\n\tpublic get version(): string {\n\t\treturn this.details.version;\n\t}\n\n\tpublic get initialMessages(): ISequencedDocumentMessage[] {\n\t\treturn this.details.initialMessages;\n\t}\n\n\tpublic get initialSignals(): ISignalMessage[] {\n\t\treturn this.details.initialSignals;\n\t}\n\n\tpublic get initialClients(): ISignalClient[] {\n\t\treturn this.details.initialClients;\n\t}\n\n\tpublic get serviceConfiguration(): IClientConfiguration {\n\t\treturn this.details.serviceConfiguration;\n\t}\n\n\tpublic submit(documentMessages: IDocumentMessage[]): void {\n\t\t// ReplayFileDeltaConnection.submit() can't be called - client never sees its own join on,\n\t\t// and thus can never move to sending ops.\n\t\tthrow new Error(\"ReplayFileDeltaConnection.submit() can't be called\");\n\t}\n\n\tpublic async submitSignal(message: any) {}\n\n\tprivate _disposed = false;\n\tpublic get disposed() {\n\t\treturn this._disposed;\n\t}\n\tpublic dispose() {\n\t\tthis._disposed = true;\n\t}\n}\n"]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
import { TypedEventEmitter } from "@fluid-internal/client-utils";
|
|
6
|
-
import * as api from "@fluidframework/driver-definitions";
|
|
6
|
+
import * as api from "@fluidframework/driver-definitions/internal";
|
|
7
7
|
import { IClient } from "@fluidframework/protocol-definitions";
|
|
8
8
|
import { FileDeltaStorageService } from "./fileDeltaStorageService.js";
|
|
9
9
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fileDocumentService.d.ts","sourceRoot":"","sources":["../src/fileDocumentService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,KAAK,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"fileDocumentService.d.ts","sourceRoot":"","sources":["../src/fileDocumentService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,KAAK,GAAG,MAAM,6CAA6C,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AAE/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAEvE;;;GAGG;AAEH,qBAAa,mBACZ,SAAQ,iBAAiB,CAAC,GAAG,CAAC,sBAAsB,CACpD,YAAW,GAAG,CAAC,gBAAgB;aAGd,WAAW,EAAE,GAAG,CAAC,YAAY;IAC7C,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,eAAe;gBAHhB,WAAW,EAAE,GAAG,CAAC,YAAY,EAC5B,OAAO,EAAE,GAAG,CAAC,uBAAuB,EACpC,YAAY,EAAE,uBAAuB,EACrC,eAAe,EAAE,GAAG,CAAC,wBAAwB;IAKxD,OAAO;IAED,gBAAgB,IAAI,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC;IAIxD,qBAAqB,IAAI,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC;IAI/E;;;;;;OAMG;IACU,oBAAoB,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC;CAGzF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fileDocumentService.js","sourceRoot":"","sources":["../src/fileDocumentService.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+DAAiE;
|
|
1
|
+
{"version":3,"file":"fileDocumentService.js","sourceRoot":"","sources":["../src/fileDocumentService.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+DAAiE;AAMjE;;;GAGG;AACH,4CAA4C;AAC5C,MAAa,mBACZ,SAAQ,gCAA6C;IAGrD,YACiB,WAA6B,EAC5B,OAAoC,EACpC,YAAqC,EACrC,eAA6C;QAE9D,KAAK,EAAE,CAAC;QALQ,gBAAW,GAAX,WAAW,CAAkB;QAC5B,YAAO,GAAP,OAAO,CAA6B;QACpC,iBAAY,GAAZ,YAAY,CAAyB;QACrC,oBAAe,GAAf,eAAe,CAA8B;IAG/D,CAAC;IAEM,OAAO,KAAI,CAAC;IAEZ,KAAK,CAAC,gBAAgB;QAC5B,OAAO,IAAI,CAAC,OAAO,CAAC;IACrB,CAAC;IAEM,KAAK,CAAC,qBAAqB;QACjC,OAAO,IAAI,CAAC,YAAY,CAAC;IAC1B,CAAC;IAED;;;;;;OAMG;IACI,KAAK,CAAC,oBAAoB,CAAC,MAAe;QAChD,OAAO,IAAI,CAAC,eAAe,CAAC;IAC7B,CAAC;CACD;AAjCD,kDAiCC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { TypedEventEmitter } from \"@fluid-internal/client-utils\";\nimport * as api from \"@fluidframework/driver-definitions/internal\";\nimport { IClient } from \"@fluidframework/protocol-definitions\";\n\nimport { FileDeltaStorageService } from \"./fileDeltaStorageService.js\";\n\n/**\n * The DocumentService manages the different endpoints for connecting to\n * underlying storage for file document service.\n */\n// eslint-disable-next-line import/namespace\nexport class FileDocumentService\n\textends TypedEventEmitter<api.IDocumentServiceEvents>\n\timplements api.IDocumentService\n{\n\tconstructor(\n\t\tpublic readonly resolvedUrl: api.IResolvedUrl,\n\t\tprivate readonly storage: api.IDocumentStorageService,\n\t\tprivate readonly deltaStorage: FileDeltaStorageService,\n\t\tprivate readonly deltaConnection: api.IDocumentDeltaConnection,\n\t) {\n\t\tsuper();\n\t}\n\n\tpublic dispose() {}\n\n\tpublic async connectToStorage(): Promise<api.IDocumentStorageService> {\n\t\treturn this.storage;\n\t}\n\n\tpublic async connectToDeltaStorage(): Promise<api.IDocumentDeltaStorageService> {\n\t\treturn this.deltaStorage;\n\t}\n\n\t/**\n\t * Connects to a delta storage endpoint of provided documentService to get ops and then replaying\n\t * them so as to mimic a delta stream endpoint.\n\t *\n\t * @param client - Client that connects to socket.\n\t * @returns returns the delta stream service.\n\t */\n\tpublic async connectToDeltaStream(client: IClient): Promise<api.IDocumentDeltaConnection> {\n\t\treturn this.deltaConnection;\n\t}\n}\n"]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
import { ITelemetryBaseLogger } from "@fluidframework/core-interfaces";
|
|
6
|
-
import { IDocumentDeltaConnection, IDocumentService, IDocumentServiceFactory, IDocumentStorageService, IResolvedUrl } from "@fluidframework/driver-definitions";
|
|
6
|
+
import { IDocumentDeltaConnection, IDocumentService, IDocumentServiceFactory, IDocumentStorageService, IResolvedUrl } from "@fluidframework/driver-definitions/internal";
|
|
7
7
|
import { ISummaryTree } from "@fluidframework/protocol-definitions";
|
|
8
8
|
import { FileDeltaStorageService } from "./fileDeltaStorageService.js";
|
|
9
9
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fileDocumentServiceFactory.d.ts","sourceRoot":"","sources":["../src/fileDocumentServiceFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EACN,wBAAwB,EACxB,gBAAgB,EAChB,uBAAuB,EACvB,uBAAuB,EACvB,YAAY,EACZ,MAAM,
|
|
1
|
+
{"version":3,"file":"fileDocumentServiceFactory.d.ts","sourceRoot":"","sources":["../src/fileDocumentServiceFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EACN,wBAAwB,EACxB,gBAAgB,EAChB,uBAAuB,EACvB,uBAAuB,EACvB,YAAY,EACZ,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAEpE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAGvE;;;;GAIG;AACH,qBAAa,0BAA2B,YAAW,uBAAuB;IAExE,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,eAAe;gBAFf,OAAO,EAAE,uBAAuB,EAChC,YAAY,EAAE,uBAAuB,EACrC,eAAe,EAAE,wBAAwB;IAG3D;;;;;OAKG;IACU,qBAAqB,CACjC,WAAW,EAAE,YAAY,EACzB,MAAM,CAAC,EAAE,oBAAoB,EAC7B,kBAAkB,CAAC,EAAE,OAAO,GAC1B,OAAO,CAAC,gBAAgB,CAAC;IAUf,eAAe,CAC3B,gBAAgB,EAAE,YAAY,EAC9B,WAAW,EAAE,YAAY,EACzB,MAAM,CAAC,EAAE,oBAAoB,EAC7B,kBAAkB,CAAC,EAAE,OAAO,GAC1B,OAAO,CAAC,gBAAgB,CAAC;CAG5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fileDocumentServiceFactory.js","sourceRoot":"","sources":["../src/fileDocumentServiceFactory.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;
|
|
1
|
+
{"version":3,"file":"fileDocumentServiceFactory.js","sourceRoot":"","sources":["../src/fileDocumentServiceFactory.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAaH,qEAA+D;AAE/D;;;;GAIG;AACH,MAAa,0BAA0B;IACtC,YACkB,OAAgC,EAChC,YAAqC,EACrC,eAAyC;QAFzC,YAAO,GAAP,OAAO,CAAyB;QAChC,iBAAY,GAAZ,YAAY,CAAyB;QACrC,oBAAe,GAAf,eAAe,CAA0B;IACxD,CAAC;IAEJ;;;;;OAKG;IACI,KAAK,CAAC,qBAAqB,CACjC,WAAyB,EACzB,MAA6B,EAC7B,kBAA4B;QAE5B,OAAO,IAAI,4CAAmB,CAC7B,WAAW,EACX,IAAI,CAAC,OAAO,EACZ,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,eAAe,CACpB,CAAC;IACH,CAAC;IAED,8EAA8E;IACvE,KAAK,CAAC,eAAe,CAC3B,gBAA8B,EAC9B,WAAyB,EACzB,MAA6B,EAC7B,kBAA4B;QAE5B,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACpC,CAAC;CACD;AAnCD,gEAmCC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ITelemetryBaseLogger } from \"@fluidframework/core-interfaces\";\nimport {\n\tIDocumentDeltaConnection,\n\tIDocumentService,\n\tIDocumentServiceFactory,\n\tIDocumentStorageService,\n\tIResolvedUrl,\n} from \"@fluidframework/driver-definitions/internal\";\nimport { ISummaryTree } from \"@fluidframework/protocol-definitions\";\n\nimport { FileDeltaStorageService } from \"./fileDeltaStorageService.js\";\nimport { FileDocumentService } from \"./fileDocumentService.js\";\n\n/**\n * Factory for creating the file document service. Use this if you want to\n * use the local file storage as underlying storage.\n * @internal\n */\nexport class FileDocumentServiceFactory implements IDocumentServiceFactory {\n\tconstructor(\n\t\tprivate readonly storage: IDocumentStorageService,\n\t\tprivate readonly deltaStorage: FileDeltaStorageService,\n\t\tprivate readonly deltaConnection: IDocumentDeltaConnection,\n\t) {}\n\n\t/**\n\t * Creates the file document service if the path exists.\n\t *\n\t * @param fileURL - Path of directory containing ops/snapshots.\n\t * @returns file document service.\n\t */\n\tpublic async createDocumentService(\n\t\tresolvedUrl: IResolvedUrl,\n\t\tlogger?: ITelemetryBaseLogger,\n\t\tclientIsSummarizer?: boolean,\n\t): Promise<IDocumentService> {\n\t\treturn new FileDocumentService(\n\t\t\tresolvedUrl,\n\t\t\tthis.storage,\n\t\t\tthis.deltaStorage,\n\t\t\tthis.deltaConnection,\n\t\t);\n\t}\n\n\t// TODO: Issue-2109 Implement detach container api or put appropriate comment.\n\tpublic async createContainer(\n\t\tcreateNewSummary: ISummaryTree,\n\t\tresolvedUrl: IResolvedUrl,\n\t\tlogger?: ITelemetryBaseLogger,\n\t\tclientIsSummarizer?: boolean,\n\t): Promise<IDocumentService> {\n\t\tthrow new Error(\"Not implemented\");\n\t}\n}\n"]}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import { IDocumentStorageService, ISummaryContext } from "@fluidframework/driver-definitions";
|
|
5
|
+
import { IDocumentStorageService, ISummaryContext } from "@fluidframework/driver-definitions/internal";
|
|
6
6
|
import * as api from "@fluidframework/protocol-definitions";
|
|
7
|
-
import { IFileSnapshot, ReadDocumentStorageServiceBase } from "@fluidframework/replay-driver";
|
|
7
|
+
import { IFileSnapshot, ReadDocumentStorageServiceBase } from "@fluidframework/replay-driver/internal";
|
|
8
8
|
/**
|
|
9
9
|
* @internal
|
|
10
10
|
*/
|
|
@@ -57,8 +57,8 @@ export declare const FileSnapshotWriterClassFactory: <TBase extends ReaderConstr
|
|
|
57
57
|
getSnapshotTree(version?: api.IVersion): Promise<api.ISnapshotTree | null>;
|
|
58
58
|
uploadSummaryWithContext(summary: api.ISummaryTree, context: ISummaryContext): Promise<string>;
|
|
59
59
|
buildTree(snapshotTree: api.ISnapshotTree): Promise<api.ITree>;
|
|
60
|
-
readonly policies?: import("@fluidframework/driver-definitions").IDocumentStorageServicePolicies | undefined;
|
|
61
|
-
getSnapshot?(snapshotFetchOptions?: import("@fluidframework/driver-definitions").ISnapshotFetchOptions | undefined): Promise<import("@fluidframework/driver-definitions").ISnapshot>;
|
|
60
|
+
readonly policies?: import("@fluidframework/driver-definitions/internal").IDocumentStorageServicePolicies | undefined;
|
|
61
|
+
getSnapshot?(snapshotFetchOptions?: import("@fluidframework/driver-definitions/internal").ISnapshotFetchOptions | undefined): Promise<import("@fluidframework/driver-definitions/internal").ISnapshot>;
|
|
62
62
|
createBlob(file: ArrayBufferLike): Promise<api.ICreateBlobResponse>;
|
|
63
63
|
downloadSummary(handle: api.ISummaryHandle): Promise<api.ISummaryTree>;
|
|
64
64
|
readonly disposed?: boolean | undefined;
|
|
@@ -80,8 +80,8 @@ export declare const FluidFetchReaderFileSnapshotWriter: {
|
|
|
80
80
|
getSnapshotTree(version?: api.IVersion): Promise<api.ISnapshotTree | null>;
|
|
81
81
|
uploadSummaryWithContext(summary: api.ISummaryTree, context: ISummaryContext): Promise<string>;
|
|
82
82
|
buildTree(snapshotTree: api.ISnapshotTree): Promise<api.ITree>;
|
|
83
|
-
readonly policies?: import("@fluidframework/driver-definitions").IDocumentStorageServicePolicies | undefined;
|
|
84
|
-
getSnapshot?(snapshotFetchOptions?: import("@fluidframework/driver-definitions").ISnapshotFetchOptions | undefined): Promise<import("@fluidframework/driver-definitions").ISnapshot>;
|
|
83
|
+
readonly policies?: import("@fluidframework/driver-definitions/internal").IDocumentStorageServicePolicies | undefined;
|
|
84
|
+
getSnapshot?(snapshotFetchOptions?: import("@fluidframework/driver-definitions/internal").ISnapshotFetchOptions | undefined): Promise<import("@fluidframework/driver-definitions/internal").ISnapshot>;
|
|
85
85
|
createBlob(file: ArrayBufferLike): Promise<api.ICreateBlobResponse>;
|
|
86
86
|
downloadSummary(handle: api.ISummaryHandle): Promise<api.ISummaryTree>;
|
|
87
87
|
readonly disposed?: boolean | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fileDocumentStorageService.d.ts","sourceRoot":"","sources":["../src/fileDocumentStorageService.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"fileDocumentStorageService.d.ts","sourceRoot":"","sources":["../src/fileDocumentStorageService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,EACN,uBAAuB,EACvB,eAAe,EACf,MAAM,6CAA6C,CAAC;AAKrD,OAAO,KAAK,GAAG,MAAM,sCAAsC,CAAC;AAC5D,OAAO,EACN,aAAa,EACb,8BAA8B,EAC9B,MAAM,wCAAwC,CAAC;AAIhD;;GAEG;AACH,eAAO,MAAM,uBAAuB,qBAAqB,CAAC;AAK1D;;;GAGG;AACH,qBAAa,gBACZ,SAAQ,8BACR,YAAW,uBAAuB;IAKjC,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC;IAJ9B,SAAS,CAAC,OAAO,EAAE,GAAG,CAAC,aAAa,GAAG,IAAI,CAAQ;gBAGjC,IAAI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AAC;kCAkBnD,IAAI,QAAQ,GAAG,QAAQ,IAAI,aAAa,GAAG,IAAI,CAAC;0CAQ7E,IAAI,YAAY,WAChB,eAAe,GACtB,QAAQ,MAAM,CAAC;gCAcmB,IAAI,aAAa,GAAG,QAAQ,IAAI,KAAK,CAAC;;;;;;;;2BA+CqB,CAAC"}
|
|
@@ -33,10 +33,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
33
33
|
exports.FluidFetchReaderFileSnapshotWriter = exports.FileSnapshotWriterClassFactory = exports.FluidFetchReader = exports.FileStorageDocumentName = void 0;
|
|
34
34
|
const fs_1 = __importDefault(require("fs"));
|
|
35
35
|
const client_utils_1 = require("@fluid-internal/client-utils");
|
|
36
|
-
const
|
|
37
|
-
const
|
|
36
|
+
const internal_1 = require("@fluidframework/core-utils/internal");
|
|
37
|
+
const internal_2 = require("@fluidframework/driver-utils/internal");
|
|
38
38
|
const api = __importStar(require("@fluidframework/protocol-definitions"));
|
|
39
|
-
const
|
|
39
|
+
const internal_3 = require("@fluidframework/replay-driver/internal");
|
|
40
40
|
// This ID is used by replay tool as Document Id.
|
|
41
41
|
// We leverage it to figure out when container is asking for root document tree.
|
|
42
42
|
/**
|
|
@@ -49,7 +49,7 @@ const FileStorageVersionTreeId = "FileStorageTreeId";
|
|
|
49
49
|
* Document storage service for the file driver.
|
|
50
50
|
* @internal
|
|
51
51
|
*/
|
|
52
|
-
class FluidFetchReader extends
|
|
52
|
+
class FluidFetchReader extends internal_3.ReadDocumentStorageServiceBase {
|
|
53
53
|
constructor(path, versionName) {
|
|
54
54
|
super();
|
|
55
55
|
this.path = path;
|
|
@@ -62,8 +62,8 @@ class FluidFetchReader extends replay_driver_1.ReadDocumentStorageServiceBase {
|
|
|
62
62
|
*/
|
|
63
63
|
// eslint-disable-next-line @rushstack/no-new-null
|
|
64
64
|
async getSnapshotTree(version) {
|
|
65
|
-
(0,
|
|
66
|
-
(0,
|
|
65
|
+
(0, internal_1.assert)(version !== null, 0x092 /* "version input for reading snapshot tree is null!" */);
|
|
66
|
+
(0, internal_1.assert)(!version || version.treeId === FileStorageVersionTreeId, 0x093 /* "invalid version input for reading snapshot tree!" */);
|
|
67
67
|
let filename;
|
|
68
68
|
let rootTree = false;
|
|
69
69
|
if (!version || version.id === "latest") {
|
|
@@ -105,7 +105,7 @@ class FluidFetchReader extends replay_driver_1.ReadDocumentStorageServiceBase {
|
|
|
105
105
|
return [];
|
|
106
106
|
}
|
|
107
107
|
else if (this.versionName !== undefined) {
|
|
108
|
-
(0,
|
|
108
|
+
(0, internal_1.assert)(!!this.docTree, 0x094 /* "Missing snapshot tree!" */);
|
|
109
109
|
return [
|
|
110
110
|
{
|
|
111
111
|
id: versionId,
|
|
@@ -174,11 +174,11 @@ const FileSnapshotWriterClassFactory = (Base) => class extends Base {
|
|
|
174
174
|
return super.getSnapshotTree(version);
|
|
175
175
|
}
|
|
176
176
|
async uploadSummaryWithContext(summary, context) {
|
|
177
|
-
const tree = (0,
|
|
177
|
+
const tree = (0, internal_2.convertSummaryTreeToSnapshotITree)(summary);
|
|
178
178
|
// Remove tree IDs for easier comparison of snapshots
|
|
179
179
|
delete tree.id;
|
|
180
180
|
removeNullTreeIds(tree);
|
|
181
|
-
this.latestWriterTree = (0,
|
|
181
|
+
this.latestWriterTree = (0, internal_2.buildSnapshotTree)(tree.entries, this.blobsWriter);
|
|
182
182
|
const fileSnapshot = { tree, commits: {} };
|
|
183
183
|
this.onSnapshotHandler(fileSnapshot);
|
|
184
184
|
return "testHandleId";
|
|
@@ -218,7 +218,7 @@ function removeNullTreeIds(tree) {
|
|
|
218
218
|
removeNullTreeIds(node.value);
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
|
-
(0,
|
|
221
|
+
(0, internal_1.assert)(tree.id === undefined || tree.id === null, 0x096 /* "Trying to remove valid tree IDs in removeNullTreeIds()!" */);
|
|
222
222
|
delete tree.id;
|
|
223
223
|
}
|
|
224
224
|
/**
|