@fluidframework/debugger 2.0.0-internal.3.0.1 → 2.0.0-internal.3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +9 -12
- package/README.md +33 -33
- package/api-extractor.json +2 -2
- package/dist/fluidDebugger.d.ts.map +1 -1
- package/dist/fluidDebugger.js.map +1 -1
- package/dist/fluidDebuggerController.d.ts.map +1 -1
- package/dist/fluidDebuggerController.js +5 -2
- package/dist/fluidDebuggerController.js.map +1 -1
- package/dist/fluidDebuggerUi.d.ts.map +1 -1
- package/dist/fluidDebuggerUi.js +11 -5
- package/dist/fluidDebuggerUi.js.map +1 -1
- package/dist/messageSchema.js.map +1 -1
- package/dist/sanitize.js.map +1 -1
- package/dist/sanitizer.d.ts.map +1 -1
- package/dist/sanitizer.js +9 -5
- package/dist/sanitizer.js.map +1 -1
- package/lib/fluidDebugger.d.ts.map +1 -1
- package/lib/fluidDebugger.js.map +1 -1
- package/lib/fluidDebuggerController.d.ts.map +1 -1
- package/lib/fluidDebuggerController.js +5 -2
- package/lib/fluidDebuggerController.js.map +1 -1
- package/lib/fluidDebuggerUi.d.ts.map +1 -1
- package/lib/fluidDebuggerUi.js +11 -5
- package/lib/fluidDebuggerUi.js.map +1 -1
- package/lib/messageSchema.js.map +1 -1
- package/lib/sanitize.js.map +1 -1
- package/lib/sanitizer.d.ts.map +1 -1
- package/lib/sanitizer.js +9 -5
- package/lib/sanitizer.js.map +1 -1
- package/package.json +68 -67
- package/prettier.config.cjs +1 -1
- package/src/fluidDebugger.ts +30 -30
- package/src/fluidDebuggerController.ts +348 -322
- package/src/fluidDebuggerUi.ts +306 -281
- package/src/messageSchema.ts +367 -367
- package/src/sanitize.ts +29 -29
- package/src/sanitizer.ts +699 -638
- package/tsconfig.esnext.json +6 -6
- package/tsconfig.json +10 -15
package/src/fluidDebugger.ts
CHANGED
|
@@ -10,36 +10,36 @@ import { DebuggerUI } from "./fluidDebuggerUi";
|
|
|
10
10
|
|
|
11
11
|
// eslint-disable-next-line @typescript-eslint/no-namespace
|
|
12
12
|
export namespace FluidDebugger {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
13
|
+
/**
|
|
14
|
+
* Creates document service wrapper that pops up Debugger window and allows user to play ops one by one.
|
|
15
|
+
* User can chose to start with any snapshot
|
|
16
|
+
* If pop-ups are disabled, we continue without debugger.
|
|
17
|
+
* @param documentService - original document service to use to fetch ops / snapshots.
|
|
18
|
+
*/
|
|
19
|
+
export async function createFromService(
|
|
20
|
+
documentService: IDocumentService,
|
|
21
|
+
): Promise<IDocumentService> {
|
|
22
|
+
const controller = createFluidDebugger();
|
|
23
|
+
if (!controller) {
|
|
24
|
+
return documentService;
|
|
25
|
+
}
|
|
26
|
+
return ReplayDocumentService.create(documentService, controller);
|
|
27
|
+
}
|
|
27
28
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
);
|
|
38
|
-
}
|
|
29
|
+
export async function createFromServiceFactory(
|
|
30
|
+
documentServiceFactory: IDocumentServiceFactory,
|
|
31
|
+
) {
|
|
32
|
+
const controller = createFluidDebugger();
|
|
33
|
+
if (!controller) {
|
|
34
|
+
return documentServiceFactory;
|
|
35
|
+
}
|
|
36
|
+
return new ReplayDocumentServiceFactory(documentServiceFactory, controller);
|
|
37
|
+
}
|
|
39
38
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
39
|
+
/**
|
|
40
|
+
* Binds DebuggerUI & DebugReplayController together
|
|
41
|
+
* These classes do not know each other and talk through interfaces
|
|
42
|
+
*/
|
|
43
|
+
const createFluidDebugger = () =>
|
|
44
|
+
DebugReplayController.create((controller) => DebuggerUI.create(controller));
|
|
45
45
|
}
|