@fluidframework/debugger 2.0.0-dev-rc.3.0.0.254513 → 2.0.0-dev-rc.3.0.0.254866

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.
@@ -0,0 +1,13 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ /*
7
+ * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
8
+ * Generated by "flub generate entrypoints" in @fluidframework/build-tools.
9
+ */
10
+ export {
11
+ // alpha APIs
12
+ FluidDebugger
13
+ } from "./index.js";
package/dist/beta.d.ts ADDED
@@ -0,0 +1,9 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ /*
7
+ * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
8
+ * Generated by "flub generate entrypoints" in @fluidframework/build-tools.
9
+ */
@@ -0,0 +1,9 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ /*
7
+ * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
8
+ * Generated by "flub generate entrypoints" in @fluidframework/build-tools.
9
+ */
package/lib/alpha.d.ts ADDED
@@ -0,0 +1,13 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ /*
7
+ * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
8
+ * Generated by "flub generate entrypoints" in @fluidframework/build-tools.
9
+ */
10
+ export {
11
+ // alpha APIs
12
+ FluidDebugger
13
+ } from "./index.js";
package/lib/beta.d.ts ADDED
@@ -0,0 +1,9 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ /*
7
+ * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
8
+ * Generated by "flub generate entrypoints" in @fluidframework/build-tools.
9
+ */
@@ -0,0 +1,9 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ /*
7
+ * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
8
+ * Generated by "flub generate entrypoints" in @fluidframework/build-tools.
9
+ */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/debugger",
3
- "version": "2.0.0-dev-rc.3.0.0.254513",
3
+ "version": "2.0.0-dev-rc.3.0.0.254866",
4
4
  "description": "Fluid Debugger - a tool to play through history of a file",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -15,21 +15,21 @@
15
15
  "exports": {
16
16
  ".": {
17
17
  "import": {
18
- "types": "./lib/debugger-public.d.ts",
18
+ "types": "./lib/public.d.ts",
19
19
  "default": "./lib/index.js"
20
20
  },
21
21
  "require": {
22
- "types": "./dist/debugger-public.d.ts",
22
+ "types": "./dist/public.d.ts",
23
23
  "default": "./dist/index.js"
24
24
  }
25
25
  },
26
26
  "./alpha": {
27
27
  "import": {
28
- "types": "./lib/debugger-alpha.d.ts",
28
+ "types": "./lib/alpha.d.ts",
29
29
  "default": "./lib/index.js"
30
30
  },
31
31
  "require": {
32
- "types": "./dist/debugger-alpha.d.ts",
32
+ "types": "./dist/alpha.d.ts",
33
33
  "default": "./dist/index.js"
34
34
  }
35
35
  },
@@ -45,13 +45,13 @@
45
45
  }
46
46
  },
47
47
  "main": "dist/index.js",
48
- "types": "./dist/debugger-public.d.ts",
48
+ "types": "./dist/public.d.ts",
49
49
  "dependencies": {
50
- "@fluidframework/core-utils": "2.0.0-dev-rc.3.0.0.254513",
51
- "@fluidframework/driver-definitions": "2.0.0-dev-rc.3.0.0.254513",
52
- "@fluidframework/driver-utils": "2.0.0-dev-rc.3.0.0.254513",
50
+ "@fluidframework/core-utils": "2.0.0-dev-rc.3.0.0.254866",
51
+ "@fluidframework/driver-definitions": "2.0.0-dev-rc.3.0.0.254866",
52
+ "@fluidframework/driver-utils": "2.0.0-dev-rc.3.0.0.254866",
53
53
  "@fluidframework/protocol-definitions": "^3.2.0",
54
- "@fluidframework/replay-driver": "2.0.0-dev-rc.3.0.0.254513",
54
+ "@fluidframework/replay-driver": "2.0.0-dev-rc.3.0.0.254866",
55
55
  "jsonschema": "^1.2.6"
56
56
  },
57
57
  "devDependencies": {
@@ -72,14 +72,6 @@
72
72
  },
73
73
  "fluidBuild": {
74
74
  "tasks": {
75
- "build:docs": {
76
- "dependsOn": [
77
- "...",
78
- "api-extractor:commonjs",
79
- "api-extractor:esnext"
80
- ],
81
- "script": false
82
- },
83
75
  "tsc": [
84
76
  "...",
85
77
  "typetests:gen"
@@ -95,11 +87,11 @@
95
87
  },
96
88
  "scripts": {
97
89
  "api": "fluid-build . --task api",
98
- "api-extractor:commonjs": "api-extractor run --config ./api-extractor-cjs.json",
99
- "api-extractor:esnext": "api-extractor run --local",
90
+ "api-extractor:commonjs": "flub generate entrypoints --outDir ./dist",
91
+ "api-extractor:esnext": "flub generate entrypoints --outDir ./lib",
100
92
  "build": "fluid-build . --task build",
101
93
  "build:compile": "fluid-build . --task compile",
102
- "build:docs": "fluid-build . --task api",
94
+ "build:docs": "api-extractor run --local",
103
95
  "build:esnext": "tsc --project ./tsconfig.json",
104
96
  "check:are-the-types-wrong": "attw --pack . --entrypoints .",
105
97
  "check:prettier": "prettier --check . --cache --ignore-path ../../../.prettierignore",
@@ -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,36 +0,0 @@
1
- import { Deferred } from '@fluidframework/core-utils/internal';
2
- import { IDocumentService } from '@fluidframework/driver-definitions/internal';
3
- import { IDocumentServiceFactory } from '@fluidframework/driver-definitions/internal';
4
- import { IDocumentStorageService } from '@fluidframework/driver-definitions/internal';
5
- import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
6
- import { ISnapshotTree } from '@fluidframework/protocol-definitions';
7
- import { IVersion } from '@fluidframework/protocol-definitions';
8
- import { ReadDocumentStorageServiceBase } from '@fluidframework/replay-driver/internal';
9
- import { ReplayController } from '@fluidframework/replay-driver/internal';
10
-
11
- /* Excluded from this release type: DebuggerUI */
12
-
13
- /* Excluded from this release type: debuggerUIFactory */
14
-
15
- /* Excluded from this release type: DebugReplayController */
16
-
17
- /**
18
- * @alpha
19
- */
20
- export declare namespace FluidDebugger {
21
- /* Excluded from this release type: createFromService */
22
- /**
23
- * @alpha
24
- */
25
- export function createFromServiceFactory(documentServiceFactory: IDocumentServiceFactory): Promise<IDocumentServiceFactory>;
26
- }
27
-
28
- /* Excluded from this release type: IDebuggerController */
29
-
30
- /* Excluded from this release type: IDebuggerUI */
31
-
32
- /* Excluded from this release type: ReadDocumentStorageServiceBase */
33
-
34
- /* Excluded from this release type: ReplayController */
35
-
36
- export { }
@@ -1,35 +0,0 @@
1
- import { Deferred } from '@fluidframework/core-utils/internal';
2
- import { IDocumentService } from '@fluidframework/driver-definitions/internal';
3
- import { IDocumentServiceFactory } from '@fluidframework/driver-definitions/internal';
4
- import { IDocumentStorageService } from '@fluidframework/driver-definitions/internal';
5
- import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
6
- import { ISnapshotTree } from '@fluidframework/protocol-definitions';
7
- import { IVersion } from '@fluidframework/protocol-definitions';
8
- import { ReadDocumentStorageServiceBase } from '@fluidframework/replay-driver/internal';
9
- import { ReplayController } from '@fluidframework/replay-driver/internal';
10
-
11
- /* Excluded from this release type: DebuggerUI */
12
-
13
- /* Excluded from this release type: debuggerUIFactory */
14
-
15
- /* Excluded from this release type: DebugReplayController */
16
-
17
- /* Excluded from this release type: Deferred */
18
-
19
- /* Excluded from this release type: FluidDebugger */
20
-
21
- /* Excluded from this release type: IDebuggerController */
22
-
23
- /* Excluded from this release type: IDebuggerUI */
24
-
25
- /* Excluded from this release type: IDocumentService */
26
-
27
- /* Excluded from this release type: IDocumentServiceFactory */
28
-
29
- /* Excluded from this release type: IDocumentStorageService */
30
-
31
- /* Excluded from this release type: ReadDocumentStorageServiceBase */
32
-
33
- /* Excluded from this release type: ReplayController */
34
-
35
- export { }
@@ -1,35 +0,0 @@
1
- import { Deferred } from '@fluidframework/core-utils/internal';
2
- import { IDocumentService } from '@fluidframework/driver-definitions/internal';
3
- import { IDocumentServiceFactory } from '@fluidframework/driver-definitions/internal';
4
- import { IDocumentStorageService } from '@fluidframework/driver-definitions/internal';
5
- import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
6
- import { ISnapshotTree } from '@fluidframework/protocol-definitions';
7
- import { IVersion } from '@fluidframework/protocol-definitions';
8
- import { ReadDocumentStorageServiceBase } from '@fluidframework/replay-driver/internal';
9
- import { ReplayController } from '@fluidframework/replay-driver/internal';
10
-
11
- /* Excluded from this release type: DebuggerUI */
12
-
13
- /* Excluded from this release type: debuggerUIFactory */
14
-
15
- /* Excluded from this release type: DebugReplayController */
16
-
17
- /* Excluded from this release type: Deferred */
18
-
19
- /* Excluded from this release type: FluidDebugger */
20
-
21
- /* Excluded from this release type: IDebuggerController */
22
-
23
- /* Excluded from this release type: IDebuggerUI */
24
-
25
- /* Excluded from this release type: IDocumentService */
26
-
27
- /* Excluded from this release type: IDocumentServiceFactory */
28
-
29
- /* Excluded from this release type: IDocumentStorageService */
30
-
31
- /* Excluded from this release type: ReadDocumentStorageServiceBase */
32
-
33
- /* Excluded from this release type: ReplayController */
34
-
35
- export { }
@@ -1,193 +0,0 @@
1
- import { Deferred } from '@fluidframework/core-utils/internal';
2
- import { IDocumentService } from '@fluidframework/driver-definitions/internal';
3
- import { IDocumentServiceFactory } from '@fluidframework/driver-definitions/internal';
4
- import { IDocumentStorageService } from '@fluidframework/driver-definitions/internal';
5
- import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
6
- import { ISnapshotTree } from '@fluidframework/protocol-definitions';
7
- import { IVersion } from '@fluidframework/protocol-definitions';
8
- import { ReadDocumentStorageServiceBase } from '@fluidframework/replay-driver/internal';
9
- import { ReplayController } from '@fluidframework/replay-driver/internal';
10
-
11
- /**
12
- * @internal
13
- */
14
- export declare class DebuggerUI {
15
- private readonly controller;
16
- private readonly debuggerWindow;
17
- static create(controller: IDebuggerController): DebuggerUI | null;
18
- private static formatDate;
19
- protected selector?: HTMLSelectElement;
20
- protected versionText: HTMLDivElement;
21
- protected buttonOps?: HTMLButtonElement;
22
- protected text1?: HTMLDivElement;
23
- protected text2?: HTMLDivElement;
24
- protected text3?: HTMLDivElement;
25
- protected lastOpText?: HTMLDivElement;
26
- protected wasVersionSelected: boolean;
27
- protected versions: IVersion[];
28
- protected documentClosed: boolean;
29
- protected constructor(controller: IDebuggerController, debuggerWindow: Window);
30
- private attachDownloadOpsListener;
31
- addVersions(versions: IVersion[]): void;
32
- updateVersion(index: number, version: IVersion, seqNumber: number): void;
33
- versionSelected(seqNumber: number, version: IVersion | string): void;
34
- disableNextOpButton(disable: boolean): void;
35
- updateNextOpText(ops: ISequencedDocumentMessage[]): void;
36
- updateVersionText(versionCount: number): void;
37
- updateLastOpText(lastKnownOp: number, stillLoading: boolean): void;
38
- private download;
39
- }
40
-
41
- /**
42
- * @internal
43
- */
44
- export declare type debuggerUIFactory = (controller: IDebuggerController) => IDebuggerUI | null;
45
-
46
- /**
47
- * Replay controller that uses pop-up window to control op playback
48
- * @internal
49
- */
50
- export declare class DebugReplayController extends ReplayController implements IDebuggerController {
51
- static create(createUi: debuggerUIFactory): DebugReplayController | null;
52
- protected static readonly WindowClosedSeq = -1;
53
- protected static seqFromTree(documentStorageService: IDocumentStorageService, tree: ISnapshotTree | null): Promise<number>;
54
- protected ui: IDebuggerUI;
55
- protected stepsDeferred?: Deferred<number>;
56
- protected startSeqDeferred: Deferred<number>;
57
- protected retryFetchOpsOnEndOfFile: boolean;
58
- protected documentService?: IDocumentService;
59
- protected documentStorageService?: IDocumentStorageService;
60
- protected versions: IVersion[];
61
- protected stepsToPlay: number;
62
- protected lastOpReached: boolean;
63
- protected versionCount: number;
64
- protected storage?: ReadDocumentStorageServiceBase;
65
- private shouldUseController;
66
- connectToUi(ui: IDebuggerUI): void;
67
- onClose(): void;
68
- onVersionSelection(version: IVersion): Promise<void>;
69
- onOpButtonClick(steps: number): void;
70
- onSnapshotFileSelection(file: File): void;
71
- onDownloadOpsButtonClick(anonymize: boolean): Promise<string>;
72
- private fetchOpsFromDeltaStorage;
73
- fetchTo(currentOp: number): number | undefined;
74
- isSelectionMade(): boolean;
75
- downloadVersionInfo(documentStorageService: IDocumentStorageService, prevRequest: Promise<void>, index: number, version: IVersion): Promise<void>;
76
- initStorage(documentService: IDocumentService): Promise<boolean>;
77
- readBlob(blobId: string): Promise<ArrayBufferLike>;
78
- getVersions(versionId: string | null, count: number): Promise<IVersion[]>;
79
- getSnapshotTree(versionRequested?: IVersion): Promise<ISnapshotTree | null>;
80
- getStartingOpSequence(): Promise<number>;
81
- /**
82
- * Return true if we are done processing ops
83
- */
84
- isDoneFetch(currentOp: number, lastTimeStamp?: number): boolean;
85
- replay(emitter: (op: ISequencedDocumentMessage[]) => void, fetchedOps: ISequencedDocumentMessage[]): Promise<void>;
86
- protected resolveStorage(seq: number, storage: ReadDocumentStorageServiceBase, version: IVersion | string): void;
87
- }
88
-
89
- /**
90
- * @alpha
91
- */
92
- export declare namespace FluidDebugger {
93
- /**
94
- * Creates document service wrapper that pops up Debugger window and allows user to play ops one by one.
95
- * User can chose to start with any snapshot
96
- * If pop-ups are disabled, we continue without debugger.
97
- * @param documentService - original document service to use to fetch ops / snapshots.
98
- * @internal
99
- */
100
- export function createFromService(documentService: IDocumentService): Promise<IDocumentService>;
101
- /**
102
- * @alpha
103
- */
104
- export function createFromServiceFactory(documentServiceFactory: IDocumentServiceFactory): Promise<IDocumentServiceFactory>;
105
- }
106
-
107
- /**
108
- * @internal
109
- */
110
- export declare interface IDebuggerController {
111
- /**
112
- * Initialization. UI layers calls into controller to connect the two.
113
- * @param ui - UI layer
114
- */
115
- connectToUi(ui: IDebuggerUI): any;
116
- /**
117
- * Called by UI layer when debugger window is closed by user
118
- * If called before user makes selection of snapshot/file, original
119
- * document service is returned to loader (instead of debugger service) and normal document load continues.
120
- */
121
- onClose(): void;
122
- /**
123
- * UI Layer notifies about selection of version to continue.
124
- * On successful load, versionSelected() is called.
125
- * @param version - Snapshot version to start from.
126
- */
127
- onVersionSelection(version: IVersion): void;
128
- /**
129
- * UI Layer notifies about selection of version to continue.
130
- * On successful load, versionSelected() is called.
131
- * @param version - File to load snapshot from
132
- */
133
- onSnapshotFileSelection(file: File): void;
134
- /**
135
- * "next op" button is clicked in the UI
136
- * @param steps - number of ops to play.
137
- */
138
- onOpButtonClick(steps: number): void;
139
- /**
140
- * "Download ops" option is clicked in the UI. Returns JSON of the full opStream when available.
141
- * @param anonymize - anonymize the ops json using the sanitization tool
142
- */
143
- onDownloadOpsButtonClick(anonymize: boolean): Promise<string>;
144
- }
145
-
146
- /**
147
- * @internal
148
- */
149
- export declare interface IDebuggerUI {
150
- /**
151
- * Version information is provided.
152
- * Expect updates (information about seq#, timestamp) through updateVersion() calls
153
- */
154
- addVersions(version: IVersion[]): void;
155
- /**
156
- * Call when new version is downloaded from storage
157
- * Expect multiple callbacks.
158
- */
159
- updateVersion(index: number, version: IVersion, seqNumber: number): void;
160
- /**
161
- * Called in response to successful onVersionSelection() or onSnapshotFileSelection() call
162
- * and provides extra information about selection.
163
- * It expected that UI layer would change its mode as result of this call, i.e. switch to
164
- * displaying op playback controls (if this is supported)
165
- * Note: There maybe no call to versionSelected() in response to onSnapshotFileSelection() call
166
- * if file does not exist, has wrong name of wrong format.
167
- * @param version - version, file name, or undefined if playing ops.
168
- */
169
- versionSelected(seqNumber: number, version: IVersion | string): void;
170
- /**
171
- * Called by controller in response to new ops being downloaded
172
- * Called with disable = true if there are no (currently) ops to play
173
- */
174
- disableNextOpButton(disable: boolean): void;
175
- /**
176
- * Called by controller when new ops arrive (or we are done playing previous batch)
177
- * Indicates next batch of ops that would be played when UI calls controller's onOpButtonClick()
178
- * Called with ops=[] when there are no ops to play.
179
- */
180
- updateNextOpText(ops: ISequencedDocumentMessage[]): void;
181
- /**
182
- * Called periodically when new versions are downloaded from server
183
- */
184
- updateVersionText(versionsLeft: number): void;
185
- /**
186
- * Called periodically to notify about last known op
187
- * @param lastKnownOp - seq number of last known op. -1 if can't play ops in this mode (load from file)
188
- * @param stillLoading - true if we did not reach yet the end of the stream
189
- */
190
- updateLastOpText(lastKnownOp: number, stillLoading: boolean): void;
191
- }
192
-
193
- export { }
@@ -1,11 +0,0 @@
1
- // This file is read by tools that parse documentation comments conforming to the TSDoc standard.
2
- // It should be published with your NPM package. It should not be tracked by Git.
3
- {
4
- "tsdocVersion": "0.12",
5
- "toolPackages": [
6
- {
7
- "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.42.3"
9
- }
10
- ]
11
- }
@@ -1,36 +0,0 @@
1
- import { Deferred } from '@fluidframework/core-utils/internal';
2
- import { IDocumentService } from '@fluidframework/driver-definitions/internal';
3
- import { IDocumentServiceFactory } from '@fluidframework/driver-definitions/internal';
4
- import { IDocumentStorageService } from '@fluidframework/driver-definitions/internal';
5
- import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
6
- import { ISnapshotTree } from '@fluidframework/protocol-definitions';
7
- import { IVersion } from '@fluidframework/protocol-definitions';
8
- import { ReadDocumentStorageServiceBase } from '@fluidframework/replay-driver/internal';
9
- import { ReplayController } from '@fluidframework/replay-driver/internal';
10
-
11
- /* Excluded from this release type: DebuggerUI */
12
-
13
- /* Excluded from this release type: debuggerUIFactory */
14
-
15
- /* Excluded from this release type: DebugReplayController */
16
-
17
- /**
18
- * @alpha
19
- */
20
- export declare namespace FluidDebugger {
21
- /* Excluded from this release type: createFromService */
22
- /**
23
- * @alpha
24
- */
25
- export function createFromServiceFactory(documentServiceFactory: IDocumentServiceFactory): Promise<IDocumentServiceFactory>;
26
- }
27
-
28
- /* Excluded from this release type: IDebuggerController */
29
-
30
- /* Excluded from this release type: IDebuggerUI */
31
-
32
- /* Excluded from this release type: ReadDocumentStorageServiceBase */
33
-
34
- /* Excluded from this release type: ReplayController */
35
-
36
- export { }
@@ -1,35 +0,0 @@
1
- import { Deferred } from '@fluidframework/core-utils/internal';
2
- import { IDocumentService } from '@fluidframework/driver-definitions/internal';
3
- import { IDocumentServiceFactory } from '@fluidframework/driver-definitions/internal';
4
- import { IDocumentStorageService } from '@fluidframework/driver-definitions/internal';
5
- import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
6
- import { ISnapshotTree } from '@fluidframework/protocol-definitions';
7
- import { IVersion } from '@fluidframework/protocol-definitions';
8
- import { ReadDocumentStorageServiceBase } from '@fluidframework/replay-driver/internal';
9
- import { ReplayController } from '@fluidframework/replay-driver/internal';
10
-
11
- /* Excluded from this release type: DebuggerUI */
12
-
13
- /* Excluded from this release type: debuggerUIFactory */
14
-
15
- /* Excluded from this release type: DebugReplayController */
16
-
17
- /* Excluded from this release type: Deferred */
18
-
19
- /* Excluded from this release type: FluidDebugger */
20
-
21
- /* Excluded from this release type: IDebuggerController */
22
-
23
- /* Excluded from this release type: IDebuggerUI */
24
-
25
- /* Excluded from this release type: IDocumentService */
26
-
27
- /* Excluded from this release type: IDocumentServiceFactory */
28
-
29
- /* Excluded from this release type: IDocumentStorageService */
30
-
31
- /* Excluded from this release type: ReadDocumentStorageServiceBase */
32
-
33
- /* Excluded from this release type: ReplayController */
34
-
35
- export { }
@@ -1,35 +0,0 @@
1
- import { Deferred } from '@fluidframework/core-utils/internal';
2
- import { IDocumentService } from '@fluidframework/driver-definitions/internal';
3
- import { IDocumentServiceFactory } from '@fluidframework/driver-definitions/internal';
4
- import { IDocumentStorageService } from '@fluidframework/driver-definitions/internal';
5
- import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
6
- import { ISnapshotTree } from '@fluidframework/protocol-definitions';
7
- import { IVersion } from '@fluidframework/protocol-definitions';
8
- import { ReadDocumentStorageServiceBase } from '@fluidframework/replay-driver/internal';
9
- import { ReplayController } from '@fluidframework/replay-driver/internal';
10
-
11
- /* Excluded from this release type: DebuggerUI */
12
-
13
- /* Excluded from this release type: debuggerUIFactory */
14
-
15
- /* Excluded from this release type: DebugReplayController */
16
-
17
- /* Excluded from this release type: Deferred */
18
-
19
- /* Excluded from this release type: FluidDebugger */
20
-
21
- /* Excluded from this release type: IDebuggerController */
22
-
23
- /* Excluded from this release type: IDebuggerUI */
24
-
25
- /* Excluded from this release type: IDocumentService */
26
-
27
- /* Excluded from this release type: IDocumentServiceFactory */
28
-
29
- /* Excluded from this release type: IDocumentStorageService */
30
-
31
- /* Excluded from this release type: ReadDocumentStorageServiceBase */
32
-
33
- /* Excluded from this release type: ReplayController */
34
-
35
- export { }
@@ -1,193 +0,0 @@
1
- import { Deferred } from '@fluidframework/core-utils/internal';
2
- import { IDocumentService } from '@fluidframework/driver-definitions/internal';
3
- import { IDocumentServiceFactory } from '@fluidframework/driver-definitions/internal';
4
- import { IDocumentStorageService } from '@fluidframework/driver-definitions/internal';
5
- import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
6
- import { ISnapshotTree } from '@fluidframework/protocol-definitions';
7
- import { IVersion } from '@fluidframework/protocol-definitions';
8
- import { ReadDocumentStorageServiceBase } from '@fluidframework/replay-driver/internal';
9
- import { ReplayController } from '@fluidframework/replay-driver/internal';
10
-
11
- /**
12
- * @internal
13
- */
14
- export declare class DebuggerUI {
15
- private readonly controller;
16
- private readonly debuggerWindow;
17
- static create(controller: IDebuggerController): DebuggerUI | null;
18
- private static formatDate;
19
- protected selector?: HTMLSelectElement;
20
- protected versionText: HTMLDivElement;
21
- protected buttonOps?: HTMLButtonElement;
22
- protected text1?: HTMLDivElement;
23
- protected text2?: HTMLDivElement;
24
- protected text3?: HTMLDivElement;
25
- protected lastOpText?: HTMLDivElement;
26
- protected wasVersionSelected: boolean;
27
- protected versions: IVersion[];
28
- protected documentClosed: boolean;
29
- protected constructor(controller: IDebuggerController, debuggerWindow: Window);
30
- private attachDownloadOpsListener;
31
- addVersions(versions: IVersion[]): void;
32
- updateVersion(index: number, version: IVersion, seqNumber: number): void;
33
- versionSelected(seqNumber: number, version: IVersion | string): void;
34
- disableNextOpButton(disable: boolean): void;
35
- updateNextOpText(ops: ISequencedDocumentMessage[]): void;
36
- updateVersionText(versionCount: number): void;
37
- updateLastOpText(lastKnownOp: number, stillLoading: boolean): void;
38
- private download;
39
- }
40
-
41
- /**
42
- * @internal
43
- */
44
- export declare type debuggerUIFactory = (controller: IDebuggerController) => IDebuggerUI | null;
45
-
46
- /**
47
- * Replay controller that uses pop-up window to control op playback
48
- * @internal
49
- */
50
- export declare class DebugReplayController extends ReplayController implements IDebuggerController {
51
- static create(createUi: debuggerUIFactory): DebugReplayController | null;
52
- protected static readonly WindowClosedSeq = -1;
53
- protected static seqFromTree(documentStorageService: IDocumentStorageService, tree: ISnapshotTree | null): Promise<number>;
54
- protected ui: IDebuggerUI;
55
- protected stepsDeferred?: Deferred<number>;
56
- protected startSeqDeferred: Deferred<number>;
57
- protected retryFetchOpsOnEndOfFile: boolean;
58
- protected documentService?: IDocumentService;
59
- protected documentStorageService?: IDocumentStorageService;
60
- protected versions: IVersion[];
61
- protected stepsToPlay: number;
62
- protected lastOpReached: boolean;
63
- protected versionCount: number;
64
- protected storage?: ReadDocumentStorageServiceBase;
65
- private shouldUseController;
66
- connectToUi(ui: IDebuggerUI): void;
67
- onClose(): void;
68
- onVersionSelection(version: IVersion): Promise<void>;
69
- onOpButtonClick(steps: number): void;
70
- onSnapshotFileSelection(file: File): void;
71
- onDownloadOpsButtonClick(anonymize: boolean): Promise<string>;
72
- private fetchOpsFromDeltaStorage;
73
- fetchTo(currentOp: number): number | undefined;
74
- isSelectionMade(): boolean;
75
- downloadVersionInfo(documentStorageService: IDocumentStorageService, prevRequest: Promise<void>, index: number, version: IVersion): Promise<void>;
76
- initStorage(documentService: IDocumentService): Promise<boolean>;
77
- readBlob(blobId: string): Promise<ArrayBufferLike>;
78
- getVersions(versionId: string | null, count: number): Promise<IVersion[]>;
79
- getSnapshotTree(versionRequested?: IVersion): Promise<ISnapshotTree | null>;
80
- getStartingOpSequence(): Promise<number>;
81
- /**
82
- * Return true if we are done processing ops
83
- */
84
- isDoneFetch(currentOp: number, lastTimeStamp?: number): boolean;
85
- replay(emitter: (op: ISequencedDocumentMessage[]) => void, fetchedOps: ISequencedDocumentMessage[]): Promise<void>;
86
- protected resolveStorage(seq: number, storage: ReadDocumentStorageServiceBase, version: IVersion | string): void;
87
- }
88
-
89
- /**
90
- * @alpha
91
- */
92
- export declare namespace FluidDebugger {
93
- /**
94
- * Creates document service wrapper that pops up Debugger window and allows user to play ops one by one.
95
- * User can chose to start with any snapshot
96
- * If pop-ups are disabled, we continue without debugger.
97
- * @param documentService - original document service to use to fetch ops / snapshots.
98
- * @internal
99
- */
100
- export function createFromService(documentService: IDocumentService): Promise<IDocumentService>;
101
- /**
102
- * @alpha
103
- */
104
- export function createFromServiceFactory(documentServiceFactory: IDocumentServiceFactory): Promise<IDocumentServiceFactory>;
105
- }
106
-
107
- /**
108
- * @internal
109
- */
110
- export declare interface IDebuggerController {
111
- /**
112
- * Initialization. UI layers calls into controller to connect the two.
113
- * @param ui - UI layer
114
- */
115
- connectToUi(ui: IDebuggerUI): any;
116
- /**
117
- * Called by UI layer when debugger window is closed by user
118
- * If called before user makes selection of snapshot/file, original
119
- * document service is returned to loader (instead of debugger service) and normal document load continues.
120
- */
121
- onClose(): void;
122
- /**
123
- * UI Layer notifies about selection of version to continue.
124
- * On successful load, versionSelected() is called.
125
- * @param version - Snapshot version to start from.
126
- */
127
- onVersionSelection(version: IVersion): void;
128
- /**
129
- * UI Layer notifies about selection of version to continue.
130
- * On successful load, versionSelected() is called.
131
- * @param version - File to load snapshot from
132
- */
133
- onSnapshotFileSelection(file: File): void;
134
- /**
135
- * "next op" button is clicked in the UI
136
- * @param steps - number of ops to play.
137
- */
138
- onOpButtonClick(steps: number): void;
139
- /**
140
- * "Download ops" option is clicked in the UI. Returns JSON of the full opStream when available.
141
- * @param anonymize - anonymize the ops json using the sanitization tool
142
- */
143
- onDownloadOpsButtonClick(anonymize: boolean): Promise<string>;
144
- }
145
-
146
- /**
147
- * @internal
148
- */
149
- export declare interface IDebuggerUI {
150
- /**
151
- * Version information is provided.
152
- * Expect updates (information about seq#, timestamp) through updateVersion() calls
153
- */
154
- addVersions(version: IVersion[]): void;
155
- /**
156
- * Call when new version is downloaded from storage
157
- * Expect multiple callbacks.
158
- */
159
- updateVersion(index: number, version: IVersion, seqNumber: number): void;
160
- /**
161
- * Called in response to successful onVersionSelection() or onSnapshotFileSelection() call
162
- * and provides extra information about selection.
163
- * It expected that UI layer would change its mode as result of this call, i.e. switch to
164
- * displaying op playback controls (if this is supported)
165
- * Note: There maybe no call to versionSelected() in response to onSnapshotFileSelection() call
166
- * if file does not exist, has wrong name of wrong format.
167
- * @param version - version, file name, or undefined if playing ops.
168
- */
169
- versionSelected(seqNumber: number, version: IVersion | string): void;
170
- /**
171
- * Called by controller in response to new ops being downloaded
172
- * Called with disable = true if there are no (currently) ops to play
173
- */
174
- disableNextOpButton(disable: boolean): void;
175
- /**
176
- * Called by controller when new ops arrive (or we are done playing previous batch)
177
- * Indicates next batch of ops that would be played when UI calls controller's onOpButtonClick()
178
- * Called with ops=[] when there are no ops to play.
179
- */
180
- updateNextOpText(ops: ISequencedDocumentMessage[]): void;
181
- /**
182
- * Called periodically when new versions are downloaded from server
183
- */
184
- updateVersionText(versionsLeft: number): void;
185
- /**
186
- * Called periodically to notify about last known op
187
- * @param lastKnownOp - seq number of last known op. -1 if can't play ops in this mode (load from file)
188
- * @param stillLoading - true if we did not reach yet the end of the stream
189
- */
190
- updateLastOpText(lastKnownOp: number, stillLoading: boolean): void;
191
- }
192
-
193
- export { }