@fluidframework/debugger 2.74.0-370705 → 2.80.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/CHANGELOG.md +8 -0
- package/dist/fluidDebugger.js.map +1 -1
- package/dist/fluidDebuggerController.d.ts.map +1 -1
- package/dist/fluidDebuggerController.js.map +1 -1
- package/dist/fluidDebuggerUi.d.ts.map +1 -1
- package/dist/fluidDebuggerUi.js.map +1 -1
- package/dist/sanitize.js.map +1 -1
- package/dist/sanitizer.d.ts.map +1 -1
- package/dist/sanitizer.js.map +1 -1
- package/eslint.config.mts +22 -0
- package/lib/fluidDebugger.js.map +1 -1
- package/lib/fluidDebuggerController.d.ts.map +1 -1
- package/lib/fluidDebuggerController.js.map +1 -1
- package/lib/fluidDebuggerUi.d.ts.map +1 -1
- package/lib/fluidDebuggerUi.js.map +1 -1
- package/lib/sanitize.js.map +1 -1
- package/lib/sanitizer.d.ts.map +1 -1
- package/lib/sanitizer.js.map +1 -1
- package/package.json +14 -13
- package/src/fluidDebugger.ts +1 -1
- package/src/fluidDebuggerController.ts +8 -8
- package/src/fluidDebuggerUi.ts +9 -9
- package/src/sanitize.ts +3 -3
- package/src/sanitizer.ts +10 -10
package/src/fluidDebuggerUi.ts
CHANGED
|
@@ -171,7 +171,7 @@ export class DebuggerUI {
|
|
|
171
171
|
return new DebuggerUI(controller, debuggerWindow);
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
-
private static formatDate(date: number) {
|
|
174
|
+
private static formatDate(date: number): string {
|
|
175
175
|
// Alternative - without timezone
|
|
176
176
|
// new Date().toLocaleString('default', { timeZone: 'UTC'}));
|
|
177
177
|
// new Date().toLocaleString('default', { year: 'numeric', month: 'short',
|
|
@@ -250,7 +250,7 @@ export class DebuggerUI {
|
|
|
250
250
|
controller.connectToUi(this);
|
|
251
251
|
}
|
|
252
252
|
|
|
253
|
-
private attachDownloadOpsListener(element: HTMLElement, anonymize: HTMLInputElement) {
|
|
253
|
+
private attachDownloadOpsListener(element: HTMLElement, anonymize: HTMLInputElement): void {
|
|
254
254
|
element.addEventListener("click", () => {
|
|
255
255
|
this.controller
|
|
256
256
|
.onDownloadOpsButtonClick(anonymize.checked)
|
|
@@ -263,7 +263,7 @@ export class DebuggerUI {
|
|
|
263
263
|
});
|
|
264
264
|
}
|
|
265
265
|
|
|
266
|
-
public addVersions(versions: IVersion[]) {
|
|
266
|
+
public addVersions(versions: IVersion[]): void {
|
|
267
267
|
if (this.selector) {
|
|
268
268
|
this.versions = versions;
|
|
269
269
|
for (const version of versions) {
|
|
@@ -277,7 +277,7 @@ export class DebuggerUI {
|
|
|
277
277
|
}
|
|
278
278
|
}
|
|
279
279
|
|
|
280
|
-
public updateVersion(index: number, version: IVersion, seqNumber: number) {
|
|
280
|
+
public updateVersion(index: number, version: IVersion, seqNumber: number): void {
|
|
281
281
|
if (this.selector) {
|
|
282
282
|
const option = this.selector[index] as HTMLOptionElement;
|
|
283
283
|
option.text = `${option.text}, seq = ${seqNumber}`;
|
|
@@ -285,7 +285,7 @@ export class DebuggerUI {
|
|
|
285
285
|
}
|
|
286
286
|
}
|
|
287
287
|
|
|
288
|
-
public versionSelected(seqNumber: number, version: IVersion | string) {
|
|
288
|
+
public versionSelected(seqNumber: number, version: IVersion | string): void {
|
|
289
289
|
const text =
|
|
290
290
|
typeof version === "string"
|
|
291
291
|
? `Playing ${version} file`
|
|
@@ -319,12 +319,12 @@ export class DebuggerUI {
|
|
|
319
319
|
this.attachDownloadOpsListener(opDownloadButton, anonymizeCheckbox);
|
|
320
320
|
}
|
|
321
321
|
|
|
322
|
-
public disableNextOpButton(disable: boolean) {
|
|
322
|
+
public disableNextOpButton(disable: boolean): void {
|
|
323
323
|
assert(!!this.buttonOps, 0x088 /* "Missing button ops button!" */);
|
|
324
324
|
this.buttonOps.disabled = disable;
|
|
325
325
|
}
|
|
326
326
|
|
|
327
|
-
public updateNextOpText(ops: ISequencedDocumentMessage[]) {
|
|
327
|
+
public updateNextOpText(ops: ISequencedDocumentMessage[]): void {
|
|
328
328
|
if (ops.length === 0) {
|
|
329
329
|
this.text1!.textContent = "";
|
|
330
330
|
this.text2!.textContent = "";
|
|
@@ -340,7 +340,7 @@ export class DebuggerUI {
|
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
342
|
|
|
343
|
-
public updateVersionText(versionCount: number) {
|
|
343
|
+
public updateVersionText(versionCount: number): void {
|
|
344
344
|
if (!this.wasVersionSelected) {
|
|
345
345
|
const text =
|
|
346
346
|
versionCount === 0 ? "" : `Fetching information about ${versionCount} snapshots...`;
|
|
@@ -348,7 +348,7 @@ export class DebuggerUI {
|
|
|
348
348
|
}
|
|
349
349
|
}
|
|
350
350
|
|
|
351
|
-
public updateLastOpText(lastKnownOp: number, stillLoading: boolean) {
|
|
351
|
+
public updateLastOpText(lastKnownOp: number, stillLoading: boolean): void {
|
|
352
352
|
const text = stillLoading
|
|
353
353
|
? `Last op (still loading): ${lastKnownOp}`
|
|
354
354
|
: `Document's last op seq#: ${lastKnownOp}`;
|
package/src/sanitize.ts
CHANGED
|
@@ -25,7 +25,7 @@ import { ISequencedDocumentMessage } from "@fluidframework/driver-definitions/in
|
|
|
25
25
|
|
|
26
26
|
import { Sanitizer } from "./sanitizer.js";
|
|
27
27
|
|
|
28
|
-
function printUsage() {
|
|
28
|
+
function printUsage(): void {
|
|
29
29
|
console.log("Usage:");
|
|
30
30
|
console.log(" node sanitize [--full | --noBail] <input>");
|
|
31
31
|
console.log("Where");
|
|
@@ -38,7 +38,7 @@ function printUsage() {
|
|
|
38
38
|
process.exit(-1);
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
function Sanitize(msgPath: string, fullScrub: boolean, noBail: boolean) {
|
|
41
|
+
function Sanitize(msgPath: string, fullScrub: boolean, noBail: boolean): void {
|
|
42
42
|
const input = fs.readFileSync(msgPath, { encoding: "utf-8" });
|
|
43
43
|
const messages = JSON.parse(input) as ISequencedDocumentMessage[];
|
|
44
44
|
|
|
@@ -50,7 +50,7 @@ function Sanitize(msgPath: string, fullScrub: boolean, noBail: boolean) {
|
|
|
50
50
|
console.log("Done.");
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
function main() {
|
|
53
|
+
function main(): void {
|
|
54
54
|
if (process.argv.length === 3) {
|
|
55
55
|
// Non null asserting here because of the length check above
|
|
56
56
|
return Sanitize(process.argv[2]!, false, false);
|
package/src/sanitizer.ts
CHANGED
|
@@ -83,7 +83,7 @@ class ChunkedOpProcessor {
|
|
|
83
83
|
readonly debug: boolean,
|
|
84
84
|
) {}
|
|
85
85
|
|
|
86
|
-
debugMsg(msg: any) {
|
|
86
|
+
debugMsg(msg: any): void {
|
|
87
87
|
if (this.debug) {
|
|
88
88
|
console.error(msg);
|
|
89
89
|
}
|
|
@@ -259,7 +259,7 @@ export class Sanitizer {
|
|
|
259
259
|
this.chunkProcessor = new ChunkedOpProcessor(this.objectMatchesSchema, debug);
|
|
260
260
|
}
|
|
261
261
|
|
|
262
|
-
debugMsg(msg: any) {
|
|
262
|
+
debugMsg(msg: any): void {
|
|
263
263
|
if (this.debug) {
|
|
264
264
|
console.error(msg);
|
|
265
265
|
}
|
|
@@ -386,7 +386,7 @@ export class Sanitizer {
|
|
|
386
386
|
return input;
|
|
387
387
|
}
|
|
388
388
|
|
|
389
|
-
fixJoin(message: any) {
|
|
389
|
+
fixJoin(message: any): void {
|
|
390
390
|
if (!this.objectMatchesSchema(message.contents, joinContentsSchema)) {
|
|
391
391
|
message.contents = this.replaceAny(message.contents);
|
|
392
392
|
}
|
|
@@ -408,7 +408,7 @@ export class Sanitizer {
|
|
|
408
408
|
}
|
|
409
409
|
}
|
|
410
410
|
|
|
411
|
-
fixPropose(message: any) {
|
|
411
|
+
fixPropose(message: any): void {
|
|
412
412
|
if (!this.objectMatchesSchema(message.contents, proposeContentsSchema)) {
|
|
413
413
|
message.contents = this.replaceAny(message.contents);
|
|
414
414
|
} else {
|
|
@@ -438,7 +438,7 @@ export class Sanitizer {
|
|
|
438
438
|
}
|
|
439
439
|
}
|
|
440
440
|
|
|
441
|
-
fixAttachEntries(entries: any[]) {
|
|
441
|
+
fixAttachEntries(entries: any[]): void {
|
|
442
442
|
entries.forEach((element) => {
|
|
443
443
|
// Tree type
|
|
444
444
|
if (element.value.entries) {
|
|
@@ -489,7 +489,7 @@ export class Sanitizer {
|
|
|
489
489
|
* under a "contents" key, whereas attach messages from within an op message have it
|
|
490
490
|
* under a "content" key
|
|
491
491
|
*/
|
|
492
|
-
fixAttach(message: any) {
|
|
492
|
+
fixAttach(message: any): void {
|
|
493
493
|
// Handle case where contents is stringified json
|
|
494
494
|
if (typeof message.contents === "string") {
|
|
495
495
|
try {
|
|
@@ -505,7 +505,7 @@ export class Sanitizer {
|
|
|
505
505
|
}
|
|
506
506
|
}
|
|
507
507
|
|
|
508
|
-
fixDeltaOp(deltaOp: any) {
|
|
508
|
+
fixDeltaOp(deltaOp: any): void {
|
|
509
509
|
deltaOp.seg =
|
|
510
510
|
typeof deltaOp.seg === "string"
|
|
511
511
|
? this.replaceText(deltaOp.seg)
|
|
@@ -519,7 +519,7 @@ export class Sanitizer {
|
|
|
519
519
|
* @param contents - The contents object for an op message. If it was a string in the
|
|
520
520
|
* message, it must have been converted to an object first
|
|
521
521
|
*/
|
|
522
|
-
fixOpContentsObject(contents: any) {
|
|
522
|
+
fixOpContentsObject(contents: any): void {
|
|
523
523
|
// do replacement
|
|
524
524
|
if (!this.objectMatchesSchema(contents, opContentsSchema)) {
|
|
525
525
|
this.replaceAny(contents);
|
|
@@ -602,7 +602,7 @@ export class Sanitizer {
|
|
|
602
602
|
}
|
|
603
603
|
}
|
|
604
604
|
|
|
605
|
-
fixOp(message: any) {
|
|
605
|
+
fixOp(message: any): void {
|
|
606
606
|
// handle case where contents is stringified json
|
|
607
607
|
let msgContents;
|
|
608
608
|
if (typeof message.contents === "string") {
|
|
@@ -665,7 +665,7 @@ export class Sanitizer {
|
|
|
665
665
|
* @param message - The top-level chunkedOp message or a top-level op message
|
|
666
666
|
* with a chunkedOp inside its contents
|
|
667
667
|
*/
|
|
668
|
-
fixChunkedOp(message: any) {
|
|
668
|
+
fixChunkedOp(message: any): void {
|
|
669
669
|
this.chunkProcessor.addMessage(message);
|
|
670
670
|
if (!this.chunkProcessor.hasAllMessages()) {
|
|
671
671
|
return;
|