@fluidframework/debugger 2.0.0-internal.3.0.2 → 2.0.0-internal.3.2.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.
Files changed (39) hide show
  1. package/.eslintrc.js +9 -12
  2. package/README.md +33 -33
  3. package/api-extractor.json +2 -2
  4. package/dist/fluidDebugger.d.ts.map +1 -1
  5. package/dist/fluidDebugger.js.map +1 -1
  6. package/dist/fluidDebuggerController.d.ts.map +1 -1
  7. package/dist/fluidDebuggerController.js +5 -2
  8. package/dist/fluidDebuggerController.js.map +1 -1
  9. package/dist/fluidDebuggerUi.d.ts.map +1 -1
  10. package/dist/fluidDebuggerUi.js +11 -5
  11. package/dist/fluidDebuggerUi.js.map +1 -1
  12. package/dist/messageSchema.js.map +1 -1
  13. package/dist/sanitize.js.map +1 -1
  14. package/dist/sanitizer.d.ts.map +1 -1
  15. package/dist/sanitizer.js +9 -5
  16. package/dist/sanitizer.js.map +1 -1
  17. package/lib/fluidDebugger.d.ts.map +1 -1
  18. package/lib/fluidDebugger.js.map +1 -1
  19. package/lib/fluidDebuggerController.d.ts.map +1 -1
  20. package/lib/fluidDebuggerController.js +5 -2
  21. package/lib/fluidDebuggerController.js.map +1 -1
  22. package/lib/fluidDebuggerUi.d.ts.map +1 -1
  23. package/lib/fluidDebuggerUi.js +11 -5
  24. package/lib/fluidDebuggerUi.js.map +1 -1
  25. package/lib/messageSchema.js.map +1 -1
  26. package/lib/sanitize.js.map +1 -1
  27. package/lib/sanitizer.d.ts.map +1 -1
  28. package/lib/sanitizer.js +9 -5
  29. package/lib/sanitizer.js.map +1 -1
  30. package/package.json +33 -32
  31. package/prettier.config.cjs +1 -1
  32. package/src/fluidDebugger.ts +30 -30
  33. package/src/fluidDebuggerController.ts +348 -322
  34. package/src/fluidDebuggerUi.ts +306 -281
  35. package/src/messageSchema.ts +367 -367
  36. package/src/sanitize.ts +29 -29
  37. package/src/sanitizer.ts +699 -638
  38. package/tsconfig.esnext.json +6 -6
  39. package/tsconfig.json +10 -15
package/src/sanitize.ts CHANGED
@@ -20,47 +20,47 @@
20
20
 
21
21
  import fs from "fs";
22
22
  import process from "process";
23
- import {
24
- ISequencedDocumentMessage,
25
- } from "@fluidframework/protocol-definitions";
23
+ import { ISequencedDocumentMessage } from "@fluidframework/protocol-definitions";
26
24
  import { Sanitizer } from "./sanitizer";
27
25
 
28
26
  function printUsage() {
29
- console.log("Usage:");
30
- console.log(" node sanitize [--full | --noBail] <input>");
31
- console.log("Where");
32
- console.log(" [--full] - scrub fully (result cannot be loaded in Fluid Preview)");
33
- console.log(" [--noBail] - don't bail out when encountering an unknown message format (it won't be scrubbed");
34
- console.log(" <input> - file path to message.json - file downloaded by FluidFetch tool");
35
- console.log("Note: <input> is sanitized in place");
36
- process.exit(-1);
27
+ console.log("Usage:");
28
+ console.log(" node sanitize [--full | --noBail] <input>");
29
+ console.log("Where");
30
+ console.log(" [--full] - scrub fully (result cannot be loaded in Fluid Preview)");
31
+ console.log(
32
+ " [--noBail] - don't bail out when encountering an unknown message format (it won't be scrubbed",
33
+ );
34
+ console.log(" <input> - file path to message.json - file downloaded by FluidFetch tool");
35
+ console.log("Note: <input> is sanitized in place");
36
+ process.exit(-1);
37
37
  }
38
38
 
39
39
  function Sanitize(msgPath: string, fullScrub: boolean, noBail: boolean) {
40
- const input = fs.readFileSync(msgPath, { encoding: "utf-8" });
41
- const messages = JSON.parse(input) as ISequencedDocumentMessage[];
40
+ const input = fs.readFileSync(msgPath, { encoding: "utf-8" });
41
+ const messages = JSON.parse(input) as ISequencedDocumentMessage[];
42
42
 
43
- const sanitizer = new Sanitizer(messages, fullScrub, noBail, true);
44
- const cleanMessages = sanitizer.sanitize();
43
+ const sanitizer = new Sanitizer(messages, fullScrub, noBail, true);
44
+ const cleanMessages = sanitizer.sanitize();
45
45
 
46
- fs.writeFileSync(msgPath, JSON.stringify(cleanMessages, undefined, 2));
46
+ fs.writeFileSync(msgPath, JSON.stringify(cleanMessages, undefined, 2));
47
47
 
48
- console.log("Done.");
48
+ console.log("Done.");
49
49
  }
50
50
 
51
51
  function main() {
52
- if (process.argv.length === 3) {
53
- return Sanitize(process.argv[2], false, false);
54
- }
55
- if (process.argv.length === 4) {
56
- if (process.argv[2] === "--full") {
57
- return Sanitize(process.argv[3], true, false);
58
- }
59
- if (process.argv[2] === "--noBail") {
60
- return Sanitize(process.argv[3], false, true);
61
- }
62
- }
63
- printUsage();
52
+ if (process.argv.length === 3) {
53
+ return Sanitize(process.argv[2], false, false);
54
+ }
55
+ if (process.argv.length === 4) {
56
+ if (process.argv[2] === "--full") {
57
+ return Sanitize(process.argv[3], true, false);
58
+ }
59
+ if (process.argv[2] === "--noBail") {
60
+ return Sanitize(process.argv[3], false, true);
61
+ }
62
+ }
63
+ printUsage();
64
64
  }
65
65
 
66
66
  main();