@fluidframework/replay-driver 2.0.0-rc.2.0.2 → 2.0.0-rc.3.0.1

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.
Files changed (72) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/api-report/replay-driver.api.md +6 -6
  3. package/dist/emptyDeltaStorageService.d.ts +1 -1
  4. package/dist/emptyDeltaStorageService.d.ts.map +1 -1
  5. package/dist/emptyDeltaStorageService.js +2 -2
  6. package/dist/emptyDeltaStorageService.js.map +1 -1
  7. package/dist/public.d.ts +12 -0
  8. package/dist/replayController.d.ts +1 -1
  9. package/dist/replayController.d.ts.map +1 -1
  10. package/dist/replayController.js.map +1 -1
  11. package/dist/replayDocumentDeltaConnection.d.ts +2 -2
  12. package/dist/replayDocumentDeltaConnection.d.ts.map +1 -1
  13. package/dist/replayDocumentDeltaConnection.js +3 -3
  14. package/dist/replayDocumentDeltaConnection.js.map +1 -1
  15. package/dist/replayDocumentService.d.ts +1 -1
  16. package/dist/replayDocumentService.d.ts.map +1 -1
  17. package/dist/replayDocumentService.js +0 -1
  18. package/dist/replayDocumentService.js.map +1 -1
  19. package/dist/replayDocumentServiceFactory.d.ts +2 -2
  20. package/dist/replayDocumentServiceFactory.d.ts.map +1 -1
  21. package/dist/replayDocumentServiceFactory.js +2 -2
  22. package/dist/replayDocumentServiceFactory.js.map +1 -1
  23. package/dist/storageImplementations.d.ts +2 -2
  24. package/dist/storageImplementations.d.ts.map +1 -1
  25. package/dist/storageImplementations.js +5 -5
  26. package/dist/storageImplementations.js.map +1 -1
  27. package/internal.d.ts +11 -0
  28. package/lib/emptyDeltaStorageService.d.ts +1 -1
  29. package/lib/emptyDeltaStorageService.d.ts.map +1 -1
  30. package/lib/emptyDeltaStorageService.js +1 -1
  31. package/lib/emptyDeltaStorageService.js.map +1 -1
  32. package/lib/public.d.ts +12 -0
  33. package/lib/replayController.d.ts +1 -1
  34. package/lib/replayController.d.ts.map +1 -1
  35. package/lib/replayController.js.map +1 -1
  36. package/lib/replayDocumentDeltaConnection.d.ts +2 -2
  37. package/lib/replayDocumentDeltaConnection.d.ts.map +1 -1
  38. package/lib/replayDocumentDeltaConnection.js +2 -2
  39. package/lib/replayDocumentDeltaConnection.js.map +1 -1
  40. package/lib/replayDocumentService.d.ts +1 -1
  41. package/lib/replayDocumentService.d.ts.map +1 -1
  42. package/lib/replayDocumentService.js +0 -1
  43. package/lib/replayDocumentService.js.map +1 -1
  44. package/lib/replayDocumentServiceFactory.d.ts +2 -2
  45. package/lib/replayDocumentServiceFactory.d.ts.map +1 -1
  46. package/lib/replayDocumentServiceFactory.js +1 -1
  47. package/lib/replayDocumentServiceFactory.js.map +1 -1
  48. package/lib/storageImplementations.d.ts +2 -2
  49. package/lib/storageImplementations.d.ts.map +1 -1
  50. package/lib/storageImplementations.js +2 -2
  51. package/lib/storageImplementations.js.map +1 -1
  52. package/package.json +26 -43
  53. package/src/emptyDeltaStorageService.ts +2 -2
  54. package/src/replayController.ts +1 -1
  55. package/src/replayDocumentDeltaConnection.ts +5 -4
  56. package/src/replayDocumentService.ts +3 -2
  57. package/src/replayDocumentServiceFactory.ts +4 -3
  58. package/src/storageImplementations.ts +5 -4
  59. package/api-extractor-cjs.json +0 -8
  60. package/dist/replay-driver-alpha.d.ts +0 -33
  61. package/dist/replay-driver-beta.d.ts +0 -43
  62. package/dist/replay-driver-public.d.ts +0 -43
  63. package/dist/replay-driver-untrimmed.d.ts +0 -178
  64. package/lib/replay-driver-alpha.d.ts +0 -33
  65. package/lib/replay-driver-beta.d.ts +0 -43
  66. package/lib/replay-driver-public.d.ts +0 -43
  67. package/lib/replay-driver-untrimmed.d.ts +0 -178
  68. package/lib/test/types/validateReplayDriverPrevious.generated.d.ts +0 -2
  69. package/lib/test/types/validateReplayDriverPrevious.generated.d.ts.map +0 -1
  70. package/lib/test/types/validateReplayDriverPrevious.generated.js +0 -28
  71. package/lib/test/types/validateReplayDriverPrevious.generated.js.map +0 -1
  72. /package/{dist → lib}/tsdoc-metadata.json +0 -0
@@ -1,8 +0,0 @@
1
- {
2
- "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
- "extends": "../../../common/build/build-common/api-extractor-base.cjs.primary.json",
4
- // CJS is actually secondary; so, no report.
5
- "apiReport": {
6
- "enabled": false
7
- }
8
- }
@@ -1,33 +0,0 @@
1
- import * as api from '@fluidframework/protocol-definitions';
2
- import * as api_2 from '@fluidframework/driver-definitions';
3
- import { IClient } from '@fluidframework/protocol-definitions';
4
- import { IDocumentService } from '@fluidframework/driver-definitions';
5
- import { IDocumentServiceFactory } from '@fluidframework/driver-definitions';
6
- import { IDocumentStorageService } from '@fluidframework/driver-definitions';
7
- import { IResolvedUrl } from '@fluidframework/driver-definitions';
8
- import { ISnapshotTree } from '@fluidframework/protocol-definitions';
9
- import { ISummaryContext } from '@fluidframework/driver-definitions';
10
- import { ISummaryTree } from '@fluidframework/protocol-definitions';
11
- import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
12
- import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils';
13
- import { ITree } from '@fluidframework/protocol-definitions';
14
- import { IVersion } from '@fluidframework/protocol-definitions';
15
- import { TypedEventEmitter } from '@fluid-internal/client-utils';
16
-
17
- /* Excluded from this release type: FileSnapshotReader */
18
-
19
- /* Excluded from this release type: IFileSnapshot */
20
-
21
- /* Excluded from this release type: ReadDocumentStorageServiceBase */
22
-
23
- /* Excluded from this release type: ReplayController */
24
-
25
- /* Excluded from this release type: ReplayDocumentService */
26
-
27
- /* Excluded from this release type: ReplayDocumentServiceFactory */
28
-
29
- /* Excluded from this release type: SnapshotStorage */
30
-
31
- /* Excluded from this release type: StaticStorageDocumentServiceFactory */
32
-
33
- export { }
@@ -1,43 +0,0 @@
1
- import * as api from '@fluidframework/protocol-definitions';
2
- import * as api_2 from '@fluidframework/driver-definitions';
3
- import { IClient } from '@fluidframework/protocol-definitions';
4
- import { IDocumentService } from '@fluidframework/driver-definitions';
5
- import { IDocumentServiceFactory } from '@fluidframework/driver-definitions';
6
- import { IDocumentStorageService } from '@fluidframework/driver-definitions';
7
- import { IResolvedUrl } from '@fluidframework/driver-definitions';
8
- import { ISnapshotTree } from '@fluidframework/protocol-definitions';
9
- import { ISummaryContext } from '@fluidframework/driver-definitions';
10
- import { ISummaryTree } from '@fluidframework/protocol-definitions';
11
- import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
12
- import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils';
13
- import { ITree } from '@fluidframework/protocol-definitions';
14
- import { IVersion } from '@fluidframework/protocol-definitions';
15
- import { TypedEventEmitter } from '@fluid-internal/client-utils';
16
-
17
- /* Excluded from this release type: FileSnapshotReader */
18
-
19
- /* Excluded from this release type: IDocumentService */
20
-
21
- /* Excluded from this release type: IDocumentServiceFactory */
22
-
23
- /* Excluded from this release type: IDocumentStorageService */
24
-
25
- /* Excluded from this release type: IFileSnapshot */
26
-
27
- /* Excluded from this release type: IResolvedUrl */
28
-
29
- /* Excluded from this release type: ISummaryContext */
30
-
31
- /* Excluded from this release type: ReadDocumentStorageServiceBase */
32
-
33
- /* Excluded from this release type: ReplayController */
34
-
35
- /* Excluded from this release type: ReplayDocumentService */
36
-
37
- /* Excluded from this release type: ReplayDocumentServiceFactory */
38
-
39
- /* Excluded from this release type: SnapshotStorage */
40
-
41
- /* Excluded from this release type: StaticStorageDocumentServiceFactory */
42
-
43
- export { }
@@ -1,43 +0,0 @@
1
- import * as api from '@fluidframework/protocol-definitions';
2
- import * as api_2 from '@fluidframework/driver-definitions';
3
- import { IClient } from '@fluidframework/protocol-definitions';
4
- import { IDocumentService } from '@fluidframework/driver-definitions';
5
- import { IDocumentServiceFactory } from '@fluidframework/driver-definitions';
6
- import { IDocumentStorageService } from '@fluidframework/driver-definitions';
7
- import { IResolvedUrl } from '@fluidframework/driver-definitions';
8
- import { ISnapshotTree } from '@fluidframework/protocol-definitions';
9
- import { ISummaryContext } from '@fluidframework/driver-definitions';
10
- import { ISummaryTree } from '@fluidframework/protocol-definitions';
11
- import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
12
- import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils';
13
- import { ITree } from '@fluidframework/protocol-definitions';
14
- import { IVersion } from '@fluidframework/protocol-definitions';
15
- import { TypedEventEmitter } from '@fluid-internal/client-utils';
16
-
17
- /* Excluded from this release type: FileSnapshotReader */
18
-
19
- /* Excluded from this release type: IDocumentService */
20
-
21
- /* Excluded from this release type: IDocumentServiceFactory */
22
-
23
- /* Excluded from this release type: IDocumentStorageService */
24
-
25
- /* Excluded from this release type: IFileSnapshot */
26
-
27
- /* Excluded from this release type: IResolvedUrl */
28
-
29
- /* Excluded from this release type: ISummaryContext */
30
-
31
- /* Excluded from this release type: ReadDocumentStorageServiceBase */
32
-
33
- /* Excluded from this release type: ReplayController */
34
-
35
- /* Excluded from this release type: ReplayDocumentService */
36
-
37
- /* Excluded from this release type: ReplayDocumentServiceFactory */
38
-
39
- /* Excluded from this release type: SnapshotStorage */
40
-
41
- /* Excluded from this release type: StaticStorageDocumentServiceFactory */
42
-
43
- export { }
@@ -1,178 +0,0 @@
1
- import * as api from '@fluidframework/protocol-definitions';
2
- import * as api_2 from '@fluidframework/driver-definitions';
3
- import { IClient } from '@fluidframework/protocol-definitions';
4
- import { IDocumentService } from '@fluidframework/driver-definitions';
5
- import { IDocumentServiceFactory } from '@fluidframework/driver-definitions';
6
- import { IDocumentStorageService } from '@fluidframework/driver-definitions';
7
- import { IResolvedUrl } from '@fluidframework/driver-definitions';
8
- import { ISnapshotTree } from '@fluidframework/protocol-definitions';
9
- import { ISummaryContext } from '@fluidframework/driver-definitions';
10
- import { ISummaryTree } from '@fluidframework/protocol-definitions';
11
- import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
12
- import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils';
13
- import { ITree } from '@fluidframework/protocol-definitions';
14
- import { IVersion } from '@fluidframework/protocol-definitions';
15
- import { TypedEventEmitter } from '@fluid-internal/client-utils';
16
-
17
- /**
18
- * @internal
19
- */
20
- export declare class FileSnapshotReader extends ReadDocumentStorageServiceBase implements IDocumentStorageService {
21
- protected static readonly FileStorageVersionTreeId = "FileStorageTreeId";
22
- protected docId?: string;
23
- protected docTree: ISnapshotTree;
24
- protected blobs: Map<string, ArrayBufferLike>;
25
- protected readonly commits: {
26
- [key: string]: ITree;
27
- };
28
- protected readonly trees: {
29
- [key: string]: ISnapshotTree;
30
- };
31
- constructor(json: IFileSnapshot);
32
- getVersions(versionId: string | null, count: number): Promise<IVersion[]>;
33
- getSnapshotTree(versionRequested?: IVersion): Promise<ISnapshotTree | null>;
34
- readBlob(blobId: string): Promise<ArrayBufferLike>;
35
- }
36
-
37
- /**
38
- * Structure of snapshot on disk, when we store snapshot as single file
39
- * @internal
40
- */
41
- export declare interface IFileSnapshot {
42
- tree: ITree;
43
- commits: {
44
- [key: string]: ITree;
45
- };
46
- }
47
-
48
- /**
49
- * Partial implementation of IDocumentStorageService
50
- * @internal
51
- */
52
- export declare abstract class ReadDocumentStorageServiceBase implements IDocumentStorageService {
53
- abstract getVersions(versionId: string | null, count: number): Promise<api.IVersion[]>;
54
- abstract getSnapshotTree(version?: api.IVersion): Promise<api.ISnapshotTree | null>;
55
- abstract readBlob(blobId: string): Promise<ArrayBufferLike>;
56
- uploadSummaryWithContext(summary: api.ISummaryTree, context: ISummaryContext): Promise<string>;
57
- createBlob(file: ArrayBufferLike): Promise<api.ICreateBlobResponse>;
58
- downloadSummary(handle: api.ISummaryHandle): Promise<api.ISummaryTree>;
59
- }
60
-
61
- /**
62
- * Replay controller object
63
- * It controls where we start (snapshot, local file, no snapshots)
64
- * As well as dispatch of ops
65
- * @internal
66
- */
67
- export declare abstract class ReplayController extends ReadDocumentStorageServiceBase {
68
- /**
69
- * Initialize reply controller
70
- * @param documentService - the real document service
71
- * @returns Whether or not the controller should be used.
72
- * If `false` is returned, caller should fallback to original storage.
73
- */
74
- abstract initStorage(documentService: IDocumentService): Promise<boolean>;
75
- /**
76
- * Returns sequence number to start processing ops
77
- * Should be zero if not using snapshot, and snapshot seq# otherwise
78
- */
79
- abstract getStartingOpSequence(): Promise<number>;
80
- /**
81
- * Returns last op number to fetch from current op
82
- * Note: this API is called while replay() is in progress - next batch of ops is downloaded in parallel
83
- * @param currentOp - current op
84
- */
85
- abstract fetchTo(currentOp: number): number | undefined;
86
- /**
87
- * Returns true if no more ops should be processed (or downloaded for future processing).
88
- * It's called at end of each batch with latest op timestamp.
89
- * Also it's called when there are no more ops available (lastTimeStamp === undefined).
90
- * If false is returned and there are no more ops, request for more ops is made every 2 seconds.
91
- * Note: this API is called while replay() is in progress - next batch of ops is downloaded in parallel
92
- * @param currentOp - current op
93
- * @param lastTimeStamp - timestamp of last op (if more ops are available). Undefined otherwise.
94
- */
95
- abstract isDoneFetch(currentOp: number, lastTimeStamp?: number): boolean;
96
- /**
97
- * Replay batch of ops
98
- * NOTE: new batch of ops is fetched (fetchTo() & isDoneFetch() APIs are called) while this call is in flights
99
- * @param emitter - callback to emit ops
100
- * @param fetchedOps - ops to process
101
- */
102
- abstract replay(emitter: (op: api.ISequencedDocumentMessage[]) => void, fetchedOps: api.ISequencedDocumentMessage[]): Promise<void>;
103
- }
104
-
105
- /**
106
- * The Replay document service dummies out the snapshot and the delta storage.
107
- * Delta connection simulates the socket by fetching the ops from delta storage
108
- * and emitting them with a pre determined delay
109
- * @internal
110
- */
111
- export declare class ReplayDocumentService extends TypedEventEmitter<api_2.IDocumentServiceEvents> implements api_2.IDocumentService {
112
- private readonly controller;
113
- private readonly deltaStorage;
114
- static create(documentService: api_2.IDocumentService, controller: ReplayController): Promise<api_2.IDocumentService>;
115
- constructor(controller: api_2.IDocumentStorageService, deltaStorage: api_2.IDocumentDeltaConnection);
116
- dispose(): void;
117
- get resolvedUrl(): api_2.IResolvedUrl;
118
- /**
119
- * Connects to a storage endpoint for snapshot service and blobs.
120
- * @returns returns the dummy document storage service for replay driver.
121
- */
122
- connectToStorage(): Promise<api_2.IDocumentStorageService>;
123
- /**
124
- * Connects to a delta storage endpoint for getting ops between a range.
125
- * @returns returns the dummy document delta storage service for replay driver.
126
- */
127
- connectToDeltaStorage(): Promise<api_2.IDocumentDeltaStorageService>;
128
- /**
129
- * Connects to a delta storage endpoint of provided documentService to get ops and then replaying
130
- * them so as to mimic a delta stream endpoint.
131
- * @param client - Client that connects to socket.
132
- * @returns returns the delta stream service which replay ops from --from to --to arguments.
133
- */
134
- connectToDeltaStream(client: IClient): Promise<api_2.IDocumentDeltaConnection>;
135
- }
136
-
137
- /**
138
- * @internal
139
- */
140
- export declare class ReplayDocumentServiceFactory implements IDocumentServiceFactory {
141
- private readonly documentServiceFactory;
142
- private readonly controller;
143
- static create(from: number, to: number, documentServiceFactory: IDocumentServiceFactory): ReplayDocumentServiceFactory;
144
- constructor(documentServiceFactory: IDocumentServiceFactory, controller: ReplayController);
145
- /**
146
- * Creates a replay document service which uses the document service of provided
147
- * documentServiceFactory for connecting to delta stream endpoint.
148
- * @param resolvedUrl - URL to be used for connecting to endpoints.
149
- * @returns returns the requested document service
150
- */
151
- createDocumentService(resolvedUrl: IResolvedUrl, logger?: ITelemetryBaseLogger, clientIsSummarizer?: boolean): Promise<IDocumentService>;
152
- createContainer(createNewSummary: ISummaryTree, resolvedUrl: IResolvedUrl, logger?: ITelemetryBaseLogger, clientIsSummarizer?: boolean): Promise<IDocumentService>;
153
- }
154
-
155
- /**
156
- * @internal
157
- */
158
- export declare class SnapshotStorage extends ReadDocumentStorageServiceBase {
159
- protected readonly storage: IDocumentStorageService;
160
- protected readonly docTree: ISnapshotTree | null;
161
- protected docId?: string;
162
- constructor(storage: IDocumentStorageService, docTree: ISnapshotTree | null);
163
- getVersions(versionId: string | null, count: number): Promise<IVersion[]>;
164
- getSnapshotTree(versionRequested?: IVersion): Promise<ISnapshotTree | null>;
165
- readBlob(blobId: string): Promise<ArrayBufferLike>;
166
- }
167
-
168
- /**
169
- * @internal
170
- */
171
- export declare class StaticStorageDocumentServiceFactory implements IDocumentServiceFactory {
172
- protected readonly storage: IDocumentStorageService;
173
- constructor(storage: IDocumentStorageService);
174
- createDocumentService(fileURL: IResolvedUrl, logger?: ITelemetryLoggerExt, clientIsSummarizer?: boolean): Promise<IDocumentService>;
175
- createContainer(createNewSummary: ISummaryTree, resolvedUrl: IResolvedUrl, logger: ITelemetryLoggerExt, clientIsSummarizer?: boolean): Promise<IDocumentService>;
176
- }
177
-
178
- export { }
@@ -1,33 +0,0 @@
1
- import * as api from '@fluidframework/protocol-definitions';
2
- import * as api_2 from '@fluidframework/driver-definitions';
3
- import { IClient } from '@fluidframework/protocol-definitions';
4
- import { IDocumentService } from '@fluidframework/driver-definitions';
5
- import { IDocumentServiceFactory } from '@fluidframework/driver-definitions';
6
- import { IDocumentStorageService } from '@fluidframework/driver-definitions';
7
- import { IResolvedUrl } from '@fluidframework/driver-definitions';
8
- import { ISnapshotTree } from '@fluidframework/protocol-definitions';
9
- import { ISummaryContext } from '@fluidframework/driver-definitions';
10
- import { ISummaryTree } from '@fluidframework/protocol-definitions';
11
- import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
12
- import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils';
13
- import { ITree } from '@fluidframework/protocol-definitions';
14
- import { IVersion } from '@fluidframework/protocol-definitions';
15
- import { TypedEventEmitter } from '@fluid-internal/client-utils';
16
-
17
- /* Excluded from this release type: FileSnapshotReader */
18
-
19
- /* Excluded from this release type: IFileSnapshot */
20
-
21
- /* Excluded from this release type: ReadDocumentStorageServiceBase */
22
-
23
- /* Excluded from this release type: ReplayController */
24
-
25
- /* Excluded from this release type: ReplayDocumentService */
26
-
27
- /* Excluded from this release type: ReplayDocumentServiceFactory */
28
-
29
- /* Excluded from this release type: SnapshotStorage */
30
-
31
- /* Excluded from this release type: StaticStorageDocumentServiceFactory */
32
-
33
- export { }
@@ -1,43 +0,0 @@
1
- import * as api from '@fluidframework/protocol-definitions';
2
- import * as api_2 from '@fluidframework/driver-definitions';
3
- import { IClient } from '@fluidframework/protocol-definitions';
4
- import { IDocumentService } from '@fluidframework/driver-definitions';
5
- import { IDocumentServiceFactory } from '@fluidframework/driver-definitions';
6
- import { IDocumentStorageService } from '@fluidframework/driver-definitions';
7
- import { IResolvedUrl } from '@fluidframework/driver-definitions';
8
- import { ISnapshotTree } from '@fluidframework/protocol-definitions';
9
- import { ISummaryContext } from '@fluidframework/driver-definitions';
10
- import { ISummaryTree } from '@fluidframework/protocol-definitions';
11
- import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
12
- import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils';
13
- import { ITree } from '@fluidframework/protocol-definitions';
14
- import { IVersion } from '@fluidframework/protocol-definitions';
15
- import { TypedEventEmitter } from '@fluid-internal/client-utils';
16
-
17
- /* Excluded from this release type: FileSnapshotReader */
18
-
19
- /* Excluded from this release type: IDocumentService */
20
-
21
- /* Excluded from this release type: IDocumentServiceFactory */
22
-
23
- /* Excluded from this release type: IDocumentStorageService */
24
-
25
- /* Excluded from this release type: IFileSnapshot */
26
-
27
- /* Excluded from this release type: IResolvedUrl */
28
-
29
- /* Excluded from this release type: ISummaryContext */
30
-
31
- /* Excluded from this release type: ReadDocumentStorageServiceBase */
32
-
33
- /* Excluded from this release type: ReplayController */
34
-
35
- /* Excluded from this release type: ReplayDocumentService */
36
-
37
- /* Excluded from this release type: ReplayDocumentServiceFactory */
38
-
39
- /* Excluded from this release type: SnapshotStorage */
40
-
41
- /* Excluded from this release type: StaticStorageDocumentServiceFactory */
42
-
43
- export { }
@@ -1,43 +0,0 @@
1
- import * as api from '@fluidframework/protocol-definitions';
2
- import * as api_2 from '@fluidframework/driver-definitions';
3
- import { IClient } from '@fluidframework/protocol-definitions';
4
- import { IDocumentService } from '@fluidframework/driver-definitions';
5
- import { IDocumentServiceFactory } from '@fluidframework/driver-definitions';
6
- import { IDocumentStorageService } from '@fluidframework/driver-definitions';
7
- import { IResolvedUrl } from '@fluidframework/driver-definitions';
8
- import { ISnapshotTree } from '@fluidframework/protocol-definitions';
9
- import { ISummaryContext } from '@fluidframework/driver-definitions';
10
- import { ISummaryTree } from '@fluidframework/protocol-definitions';
11
- import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
12
- import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils';
13
- import { ITree } from '@fluidframework/protocol-definitions';
14
- import { IVersion } from '@fluidframework/protocol-definitions';
15
- import { TypedEventEmitter } from '@fluid-internal/client-utils';
16
-
17
- /* Excluded from this release type: FileSnapshotReader */
18
-
19
- /* Excluded from this release type: IDocumentService */
20
-
21
- /* Excluded from this release type: IDocumentServiceFactory */
22
-
23
- /* Excluded from this release type: IDocumentStorageService */
24
-
25
- /* Excluded from this release type: IFileSnapshot */
26
-
27
- /* Excluded from this release type: IResolvedUrl */
28
-
29
- /* Excluded from this release type: ISummaryContext */
30
-
31
- /* Excluded from this release type: ReadDocumentStorageServiceBase */
32
-
33
- /* Excluded from this release type: ReplayController */
34
-
35
- /* Excluded from this release type: ReplayDocumentService */
36
-
37
- /* Excluded from this release type: ReplayDocumentServiceFactory */
38
-
39
- /* Excluded from this release type: SnapshotStorage */
40
-
41
- /* Excluded from this release type: StaticStorageDocumentServiceFactory */
42
-
43
- export { }
@@ -1,178 +0,0 @@
1
- import * as api from '@fluidframework/protocol-definitions';
2
- import * as api_2 from '@fluidframework/driver-definitions';
3
- import { IClient } from '@fluidframework/protocol-definitions';
4
- import { IDocumentService } from '@fluidframework/driver-definitions';
5
- import { IDocumentServiceFactory } from '@fluidframework/driver-definitions';
6
- import { IDocumentStorageService } from '@fluidframework/driver-definitions';
7
- import { IResolvedUrl } from '@fluidframework/driver-definitions';
8
- import { ISnapshotTree } from '@fluidframework/protocol-definitions';
9
- import { ISummaryContext } from '@fluidframework/driver-definitions';
10
- import { ISummaryTree } from '@fluidframework/protocol-definitions';
11
- import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
12
- import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils';
13
- import { ITree } from '@fluidframework/protocol-definitions';
14
- import { IVersion } from '@fluidframework/protocol-definitions';
15
- import { TypedEventEmitter } from '@fluid-internal/client-utils';
16
-
17
- /**
18
- * @internal
19
- */
20
- export declare class FileSnapshotReader extends ReadDocumentStorageServiceBase implements IDocumentStorageService {
21
- protected static readonly FileStorageVersionTreeId = "FileStorageTreeId";
22
- protected docId?: string;
23
- protected docTree: ISnapshotTree;
24
- protected blobs: Map<string, ArrayBufferLike>;
25
- protected readonly commits: {
26
- [key: string]: ITree;
27
- };
28
- protected readonly trees: {
29
- [key: string]: ISnapshotTree;
30
- };
31
- constructor(json: IFileSnapshot);
32
- getVersions(versionId: string | null, count: number): Promise<IVersion[]>;
33
- getSnapshotTree(versionRequested?: IVersion): Promise<ISnapshotTree | null>;
34
- readBlob(blobId: string): Promise<ArrayBufferLike>;
35
- }
36
-
37
- /**
38
- * Structure of snapshot on disk, when we store snapshot as single file
39
- * @internal
40
- */
41
- export declare interface IFileSnapshot {
42
- tree: ITree;
43
- commits: {
44
- [key: string]: ITree;
45
- };
46
- }
47
-
48
- /**
49
- * Partial implementation of IDocumentStorageService
50
- * @internal
51
- */
52
- export declare abstract class ReadDocumentStorageServiceBase implements IDocumentStorageService {
53
- abstract getVersions(versionId: string | null, count: number): Promise<api.IVersion[]>;
54
- abstract getSnapshotTree(version?: api.IVersion): Promise<api.ISnapshotTree | null>;
55
- abstract readBlob(blobId: string): Promise<ArrayBufferLike>;
56
- uploadSummaryWithContext(summary: api.ISummaryTree, context: ISummaryContext): Promise<string>;
57
- createBlob(file: ArrayBufferLike): Promise<api.ICreateBlobResponse>;
58
- downloadSummary(handle: api.ISummaryHandle): Promise<api.ISummaryTree>;
59
- }
60
-
61
- /**
62
- * Replay controller object
63
- * It controls where we start (snapshot, local file, no snapshots)
64
- * As well as dispatch of ops
65
- * @internal
66
- */
67
- export declare abstract class ReplayController extends ReadDocumentStorageServiceBase {
68
- /**
69
- * Initialize reply controller
70
- * @param documentService - the real document service
71
- * @returns Whether or not the controller should be used.
72
- * If `false` is returned, caller should fallback to original storage.
73
- */
74
- abstract initStorage(documentService: IDocumentService): Promise<boolean>;
75
- /**
76
- * Returns sequence number to start processing ops
77
- * Should be zero if not using snapshot, and snapshot seq# otherwise
78
- */
79
- abstract getStartingOpSequence(): Promise<number>;
80
- /**
81
- * Returns last op number to fetch from current op
82
- * Note: this API is called while replay() is in progress - next batch of ops is downloaded in parallel
83
- * @param currentOp - current op
84
- */
85
- abstract fetchTo(currentOp: number): number | undefined;
86
- /**
87
- * Returns true if no more ops should be processed (or downloaded for future processing).
88
- * It's called at end of each batch with latest op timestamp.
89
- * Also it's called when there are no more ops available (lastTimeStamp === undefined).
90
- * If false is returned and there are no more ops, request for more ops is made every 2 seconds.
91
- * Note: this API is called while replay() is in progress - next batch of ops is downloaded in parallel
92
- * @param currentOp - current op
93
- * @param lastTimeStamp - timestamp of last op (if more ops are available). Undefined otherwise.
94
- */
95
- abstract isDoneFetch(currentOp: number, lastTimeStamp?: number): boolean;
96
- /**
97
- * Replay batch of ops
98
- * NOTE: new batch of ops is fetched (fetchTo() & isDoneFetch() APIs are called) while this call is in flights
99
- * @param emitter - callback to emit ops
100
- * @param fetchedOps - ops to process
101
- */
102
- abstract replay(emitter: (op: api.ISequencedDocumentMessage[]) => void, fetchedOps: api.ISequencedDocumentMessage[]): Promise<void>;
103
- }
104
-
105
- /**
106
- * The Replay document service dummies out the snapshot and the delta storage.
107
- * Delta connection simulates the socket by fetching the ops from delta storage
108
- * and emitting them with a pre determined delay
109
- * @internal
110
- */
111
- export declare class ReplayDocumentService extends TypedEventEmitter<api_2.IDocumentServiceEvents> implements api_2.IDocumentService {
112
- private readonly controller;
113
- private readonly deltaStorage;
114
- static create(documentService: api_2.IDocumentService, controller: ReplayController): Promise<api_2.IDocumentService>;
115
- constructor(controller: api_2.IDocumentStorageService, deltaStorage: api_2.IDocumentDeltaConnection);
116
- dispose(): void;
117
- get resolvedUrl(): api_2.IResolvedUrl;
118
- /**
119
- * Connects to a storage endpoint for snapshot service and blobs.
120
- * @returns returns the dummy document storage service for replay driver.
121
- */
122
- connectToStorage(): Promise<api_2.IDocumentStorageService>;
123
- /**
124
- * Connects to a delta storage endpoint for getting ops between a range.
125
- * @returns returns the dummy document delta storage service for replay driver.
126
- */
127
- connectToDeltaStorage(): Promise<api_2.IDocumentDeltaStorageService>;
128
- /**
129
- * Connects to a delta storage endpoint of provided documentService to get ops and then replaying
130
- * them so as to mimic a delta stream endpoint.
131
- * @param client - Client that connects to socket.
132
- * @returns returns the delta stream service which replay ops from --from to --to arguments.
133
- */
134
- connectToDeltaStream(client: IClient): Promise<api_2.IDocumentDeltaConnection>;
135
- }
136
-
137
- /**
138
- * @internal
139
- */
140
- export declare class ReplayDocumentServiceFactory implements IDocumentServiceFactory {
141
- private readonly documentServiceFactory;
142
- private readonly controller;
143
- static create(from: number, to: number, documentServiceFactory: IDocumentServiceFactory): ReplayDocumentServiceFactory;
144
- constructor(documentServiceFactory: IDocumentServiceFactory, controller: ReplayController);
145
- /**
146
- * Creates a replay document service which uses the document service of provided
147
- * documentServiceFactory for connecting to delta stream endpoint.
148
- * @param resolvedUrl - URL to be used for connecting to endpoints.
149
- * @returns returns the requested document service
150
- */
151
- createDocumentService(resolvedUrl: IResolvedUrl, logger?: ITelemetryBaseLogger, clientIsSummarizer?: boolean): Promise<IDocumentService>;
152
- createContainer(createNewSummary: ISummaryTree, resolvedUrl: IResolvedUrl, logger?: ITelemetryBaseLogger, clientIsSummarizer?: boolean): Promise<IDocumentService>;
153
- }
154
-
155
- /**
156
- * @internal
157
- */
158
- export declare class SnapshotStorage extends ReadDocumentStorageServiceBase {
159
- protected readonly storage: IDocumentStorageService;
160
- protected readonly docTree: ISnapshotTree | null;
161
- protected docId?: string;
162
- constructor(storage: IDocumentStorageService, docTree: ISnapshotTree | null);
163
- getVersions(versionId: string | null, count: number): Promise<IVersion[]>;
164
- getSnapshotTree(versionRequested?: IVersion): Promise<ISnapshotTree | null>;
165
- readBlob(blobId: string): Promise<ArrayBufferLike>;
166
- }
167
-
168
- /**
169
- * @internal
170
- */
171
- export declare class StaticStorageDocumentServiceFactory implements IDocumentServiceFactory {
172
- protected readonly storage: IDocumentStorageService;
173
- constructor(storage: IDocumentStorageService);
174
- createDocumentService(fileURL: IResolvedUrl, logger?: ITelemetryLoggerExt, clientIsSummarizer?: boolean): Promise<IDocumentService>;
175
- createContainer(createNewSummary: ISummaryTree, resolvedUrl: IResolvedUrl, logger: ITelemetryLoggerExt, clientIsSummarizer?: boolean): Promise<IDocumentService>;
176
- }
177
-
178
- export { }
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=validateReplayDriverPrevious.generated.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"validateReplayDriverPrevious.generated.d.ts","sourceRoot":"","sources":["../../../src/test/types/validateReplayDriverPrevious.generated.ts"],"names":[],"mappings":""}
@@ -1,28 +0,0 @@
1
- use_current_ClassDeclaration_FileSnapshotReader(get_old_ClassDeclaration_FileSnapshotReader());
2
- use_old_ClassDeclaration_FileSnapshotReader(
3
- // @ts-expect-error compatibility expected to be broken
4
- get_current_ClassDeclaration_FileSnapshotReader());
5
- use_current_InterfaceDeclaration_IFileSnapshot(get_old_InterfaceDeclaration_IFileSnapshot());
6
- use_old_InterfaceDeclaration_IFileSnapshot(get_current_InterfaceDeclaration_IFileSnapshot());
7
- use_current_ClassDeclaration_ReadDocumentStorageServiceBase(get_old_ClassDeclaration_ReadDocumentStorageServiceBase());
8
- use_old_ClassDeclaration_ReadDocumentStorageServiceBase(
9
- // @ts-expect-error compatibility expected to be broken
10
- get_current_ClassDeclaration_ReadDocumentStorageServiceBase());
11
- use_current_ClassDeclaration_ReplayController(get_old_ClassDeclaration_ReplayController());
12
- use_old_ClassDeclaration_ReplayController(
13
- // @ts-expect-error compatibility expected to be broken
14
- get_current_ClassDeclaration_ReplayController());
15
- use_current_ClassDeclaration_ReplayDocumentService(
16
- // @ts-expect-error compatibility expected to be broken
17
- get_old_ClassDeclaration_ReplayDocumentService());
18
- use_old_ClassDeclaration_ReplayDocumentService(get_current_ClassDeclaration_ReplayDocumentService());
19
- use_current_ClassDeclaration_ReplayDocumentServiceFactory(get_old_ClassDeclaration_ReplayDocumentServiceFactory());
20
- use_old_ClassDeclaration_ReplayDocumentServiceFactory(get_current_ClassDeclaration_ReplayDocumentServiceFactory());
21
- use_current_ClassDeclaration_SnapshotStorage(get_old_ClassDeclaration_SnapshotStorage());
22
- use_old_ClassDeclaration_SnapshotStorage(
23
- // @ts-expect-error compatibility expected to be broken
24
- get_current_ClassDeclaration_SnapshotStorage());
25
- use_current_ClassDeclaration_StaticStorageDocumentServiceFactory(get_old_ClassDeclaration_StaticStorageDocumentServiceFactory());
26
- use_old_ClassDeclaration_StaticStorageDocumentServiceFactory(get_current_ClassDeclaration_StaticStorageDocumentServiceFactory());
27
- export {};
28
- //# sourceMappingURL=validateReplayDriverPrevious.generated.js.map