@fluidframework/debugger 2.0.0-dev.2.3.0.115467 → 2.0.0-dev.4.1.0.148229
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 +1 -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 -10
- package/dist/sanitizer.js.map +1 -1
- package/lib/fluidDebugger.d.ts +1 -2
- 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 -10
- package/lib/sanitizer.js.map +1 -1
- package/lib/test/types/validateDebuggerPrevious.generated.js +4 -4
- package/lib/test/types/validateDebuggerPrevious.generated.js.map +1 -1
- package/package.json +33 -37
- 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 -643
- package/tsconfig.esnext.json +6 -6
- package/tsconfig.json +10 -15
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validateDebuggerPrevious.generated.js","sourceRoot":"","sources":["../../../src/test/types/validateDebuggerPrevious.generated.ts"],"names":[],"mappings":"AAwBA,
|
|
1
|
+
{"version":3,"file":"validateDebuggerPrevious.generated.js","sourceRoot":"","sources":["../../../src/test/types/validateDebuggerPrevious.generated.ts"],"names":[],"mappings":"AAwBA,kDAAkD,CAC9C,8CAA8C,EAAE,CAAC,CAAC;AAWtD,8CAA8C,CAC1C,kDAAkD,EAAE,CAAC,CAAC;AAW1D,uCAAuC,CACnC,mCAAmC,EAAE,CAAC,CAAC;AAW3C,mCAAmC,CAC/B,uCAAuC,EAAE,CAAC,CAAC;AAW/C,+DAA+D,CAC3D,2DAA2D,EAAE,CAAC,CAAC;AAWnE,2DAA2D,CACvD,+DAA+D,EAAE,CAAC,CAAC;AAWvE,sEAAsE,CAClE,kEAAkE,EAAE,CAAC,CAAC;AAW1E,kEAAkE,CAC9D,sEAAsE,EAAE,CAAC,CAAC;AAW9E,oDAAoD,CAChD,gDAAgD,EAAE,CAAC,CAAC;AAWxD,gDAAgD,CAC5C,oDAAoD,EAAE,CAAC,CAAC;AAW5D,4CAA4C,CACxC,wCAAwC,EAAE,CAAC,CAAC;AAWhD,wCAAwC,CACpC,4CAA4C,EAAE,CAAC,CAAC;AAWpD,kDAAkD,CAC9C,8CAA8C,EAAE,CAAC,CAAC;AAWtD,8CAA8C,CAC1C,kDAAkD,EAAE,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/*\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.\n * Generated by fluid-type-test-generator in @fluidframework/build-tools.\n */\nimport * as old from \"@fluidframework/debugger-previous\";\nimport * as current from \"../../index\";\n\ntype TypeOnly<T> = {\n [P in keyof T]: TypeOnly<T[P]>;\n};\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"ClassDeclaration_DebugReplayController\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_ClassDeclaration_DebugReplayController():\n TypeOnly<old.DebugReplayController>;\ndeclare function use_current_ClassDeclaration_DebugReplayController(\n use: TypeOnly<current.DebugReplayController>);\nuse_current_ClassDeclaration_DebugReplayController(\n get_old_ClassDeclaration_DebugReplayController());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"ClassDeclaration_DebugReplayController\": {\"backCompat\": false}\n*/\ndeclare function get_current_ClassDeclaration_DebugReplayController():\n TypeOnly<current.DebugReplayController>;\ndeclare function use_old_ClassDeclaration_DebugReplayController(\n use: TypeOnly<old.DebugReplayController>);\nuse_old_ClassDeclaration_DebugReplayController(\n get_current_ClassDeclaration_DebugReplayController());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"ClassDeclaration_DebuggerUI\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_ClassDeclaration_DebuggerUI():\n TypeOnly<old.DebuggerUI>;\ndeclare function use_current_ClassDeclaration_DebuggerUI(\n use: TypeOnly<current.DebuggerUI>);\nuse_current_ClassDeclaration_DebuggerUI(\n get_old_ClassDeclaration_DebuggerUI());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"ClassDeclaration_DebuggerUI\": {\"backCompat\": false}\n*/\ndeclare function get_current_ClassDeclaration_DebuggerUI():\n TypeOnly<current.DebuggerUI>;\ndeclare function use_old_ClassDeclaration_DebuggerUI(\n use: TypeOnly<old.DebuggerUI>);\nuse_old_ClassDeclaration_DebuggerUI(\n get_current_ClassDeclaration_DebuggerUI());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_FluidDebugger.createFromService\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_FunctionDeclaration_FluidDebugger_createFromService():\n TypeOnly<typeof old.FluidDebugger.createFromService>;\ndeclare function use_current_FunctionDeclaration_FluidDebugger_createFromService(\n use: TypeOnly<typeof current.FluidDebugger.createFromService>);\nuse_current_FunctionDeclaration_FluidDebugger_createFromService(\n get_old_FunctionDeclaration_FluidDebugger_createFromService());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_FluidDebugger.createFromService\": {\"backCompat\": false}\n*/\ndeclare function get_current_FunctionDeclaration_FluidDebugger_createFromService():\n TypeOnly<typeof current.FluidDebugger.createFromService>;\ndeclare function use_old_FunctionDeclaration_FluidDebugger_createFromService(\n use: TypeOnly<typeof old.FluidDebugger.createFromService>);\nuse_old_FunctionDeclaration_FluidDebugger_createFromService(\n get_current_FunctionDeclaration_FluidDebugger_createFromService());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_FluidDebugger.createFromServiceFactory\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_FunctionDeclaration_FluidDebugger_createFromServiceFactory():\n TypeOnly<typeof old.FluidDebugger.createFromServiceFactory>;\ndeclare function use_current_FunctionDeclaration_FluidDebugger_createFromServiceFactory(\n use: TypeOnly<typeof current.FluidDebugger.createFromServiceFactory>);\nuse_current_FunctionDeclaration_FluidDebugger_createFromServiceFactory(\n get_old_FunctionDeclaration_FluidDebugger_createFromServiceFactory());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_FluidDebugger.createFromServiceFactory\": {\"backCompat\": false}\n*/\ndeclare function get_current_FunctionDeclaration_FluidDebugger_createFromServiceFactory():\n TypeOnly<typeof current.FluidDebugger.createFromServiceFactory>;\ndeclare function use_old_FunctionDeclaration_FluidDebugger_createFromServiceFactory(\n use: TypeOnly<typeof old.FluidDebugger.createFromServiceFactory>);\nuse_old_FunctionDeclaration_FluidDebugger_createFromServiceFactory(\n get_current_FunctionDeclaration_FluidDebugger_createFromServiceFactory());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IDebuggerController\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_InterfaceDeclaration_IDebuggerController():\n TypeOnly<old.IDebuggerController>;\ndeclare function use_current_InterfaceDeclaration_IDebuggerController(\n use: TypeOnly<current.IDebuggerController>);\nuse_current_InterfaceDeclaration_IDebuggerController(\n get_old_InterfaceDeclaration_IDebuggerController());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IDebuggerController\": {\"backCompat\": false}\n*/\ndeclare function get_current_InterfaceDeclaration_IDebuggerController():\n TypeOnly<current.IDebuggerController>;\ndeclare function use_old_InterfaceDeclaration_IDebuggerController(\n use: TypeOnly<old.IDebuggerController>);\nuse_old_InterfaceDeclaration_IDebuggerController(\n get_current_InterfaceDeclaration_IDebuggerController());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IDebuggerUI\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_InterfaceDeclaration_IDebuggerUI():\n TypeOnly<old.IDebuggerUI>;\ndeclare function use_current_InterfaceDeclaration_IDebuggerUI(\n use: TypeOnly<current.IDebuggerUI>);\nuse_current_InterfaceDeclaration_IDebuggerUI(\n get_old_InterfaceDeclaration_IDebuggerUI());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IDebuggerUI\": {\"backCompat\": false}\n*/\ndeclare function get_current_InterfaceDeclaration_IDebuggerUI():\n TypeOnly<current.IDebuggerUI>;\ndeclare function use_old_InterfaceDeclaration_IDebuggerUI(\n use: TypeOnly<old.IDebuggerUI>);\nuse_old_InterfaceDeclaration_IDebuggerUI(\n get_current_InterfaceDeclaration_IDebuggerUI());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"TypeAliasDeclaration_debuggerUIFactory\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_TypeAliasDeclaration_debuggerUIFactory():\n TypeOnly<old.debuggerUIFactory>;\ndeclare function use_current_TypeAliasDeclaration_debuggerUIFactory(\n use: TypeOnly<current.debuggerUIFactory>);\nuse_current_TypeAliasDeclaration_debuggerUIFactory(\n get_old_TypeAliasDeclaration_debuggerUIFactory());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"TypeAliasDeclaration_debuggerUIFactory\": {\"backCompat\": false}\n*/\ndeclare function get_current_TypeAliasDeclaration_debuggerUIFactory():\n TypeOnly<current.debuggerUIFactory>;\ndeclare function use_old_TypeAliasDeclaration_debuggerUIFactory(\n use: TypeOnly<old.debuggerUIFactory>);\nuse_old_TypeAliasDeclaration_debuggerUIFactory(\n get_current_TypeAliasDeclaration_debuggerUIFactory());\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/debugger",
|
|
3
|
-
"version": "2.0.0-dev.
|
|
3
|
+
"version": "2.0.0-dev.4.1.0.148229",
|
|
4
4
|
"description": "Fluid Debugger - a tool to play through history of a file",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -14,6 +14,34 @@
|
|
|
14
14
|
"main": "dist/index.js",
|
|
15
15
|
"module": "lib/index.js",
|
|
16
16
|
"types": "dist/index.d.ts",
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"@fluidframework/common-utils": "^1.1.1",
|
|
19
|
+
"@fluidframework/driver-definitions": "2.0.0-dev.4.1.0.148229",
|
|
20
|
+
"@fluidframework/driver-utils": "2.0.0-dev.4.1.0.148229",
|
|
21
|
+
"@fluidframework/protocol-definitions": "^1.1.0",
|
|
22
|
+
"@fluidframework/replay-driver": "2.0.0-dev.4.1.0.148229",
|
|
23
|
+
"jsonschema": "^1.2.6"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"@fluid-tools/build-cli": "^0.13.1",
|
|
27
|
+
"@fluidframework/build-common": "^1.1.0",
|
|
28
|
+
"@fluidframework/build-tools": "^0.13.1",
|
|
29
|
+
"@fluidframework/debugger-previous": "npm:@fluidframework/debugger@2.0.0-internal.4.0.0",
|
|
30
|
+
"@fluidframework/eslint-config-fluid": "^2.0.0",
|
|
31
|
+
"@microsoft/api-extractor": "^7.34.4",
|
|
32
|
+
"@types/mocha": "^9.1.1",
|
|
33
|
+
"@types/node": "^14.18.38",
|
|
34
|
+
"concurrently": "^7.6.0",
|
|
35
|
+
"copyfiles": "^2.4.1",
|
|
36
|
+
"eslint": "~8.6.0",
|
|
37
|
+
"mocha": "^10.2.0",
|
|
38
|
+
"prettier": "~2.6.2",
|
|
39
|
+
"rimraf": "^4.4.0",
|
|
40
|
+
"typescript": "~4.5.5"
|
|
41
|
+
},
|
|
42
|
+
"typeValidation": {
|
|
43
|
+
"broken": {}
|
|
44
|
+
},
|
|
17
45
|
"scripts": {
|
|
18
46
|
"build": "concurrently npm:build:compile npm:lint && npm run build:docs",
|
|
19
47
|
"build:compile": "concurrently npm:typetests:gen npm:tsc npm:build:esnext",
|
|
@@ -26,44 +54,12 @@
|
|
|
26
54
|
"eslint": "eslint --format stylish src",
|
|
27
55
|
"eslint:fix": "eslint --format stylish src --fix --fix-type problem,suggestion,layout",
|
|
28
56
|
"format": "npm run prettier:fix",
|
|
29
|
-
"lint": "npm run eslint",
|
|
30
|
-
"lint:fix": "npm run eslint:fix",
|
|
57
|
+
"lint": "npm run prettier && npm run eslint",
|
|
58
|
+
"lint:fix": "npm run prettier:fix && npm run eslint:fix",
|
|
31
59
|
"prettier": "prettier --check . --ignore-path ../../../.prettierignore",
|
|
32
60
|
"prettier:fix": "prettier --write . --ignore-path ../../../.prettierignore",
|
|
33
61
|
"tsc": "tsc",
|
|
34
|
-
"typetests:gen": "
|
|
62
|
+
"typetests:gen": "fluid-type-test-generator",
|
|
35
63
|
"typetests:prepare": "flub generate typetests --prepare --dir . --pin"
|
|
36
|
-
},
|
|
37
|
-
"dependencies": {
|
|
38
|
-
"@fluidframework/common-utils": "^1.0.0",
|
|
39
|
-
"@fluidframework/driver-definitions": ">=2.0.0-dev.2.3.0.115467 <2.0.0-dev.3.0.0",
|
|
40
|
-
"@fluidframework/driver-utils": ">=2.0.0-dev.2.3.0.115467 <2.0.0-dev.3.0.0",
|
|
41
|
-
"@fluidframework/protocol-definitions": "^1.1.0",
|
|
42
|
-
"@fluidframework/replay-driver": ">=2.0.0-dev.2.3.0.115467 <2.0.0-dev.3.0.0",
|
|
43
|
-
"jsonschema": "^1.2.6"
|
|
44
|
-
},
|
|
45
|
-
"devDependencies": {
|
|
46
|
-
"@fluid-tools/build-cli": "^0.7.0",
|
|
47
|
-
"@fluidframework/build-common": "^1.1.0",
|
|
48
|
-
"@fluidframework/build-tools": "^0.7.0",
|
|
49
|
-
"@fluidframework/debugger-previous": "npm:@fluidframework/debugger@2.0.0-internal.2.2.0",
|
|
50
|
-
"@fluidframework/eslint-config-fluid": "^1.2.0",
|
|
51
|
-
"@microsoft/api-extractor": "^7.22.2",
|
|
52
|
-
"@rushstack/eslint-config": "^2.5.1",
|
|
53
|
-
"@types/mocha": "^9.1.1",
|
|
54
|
-
"@types/node": "^14.18.0",
|
|
55
|
-
"concurrently": "^6.2.0",
|
|
56
|
-
"copyfiles": "^2.4.1",
|
|
57
|
-
"eslint": "~8.6.0",
|
|
58
|
-
"mocha": "^10.0.0",
|
|
59
|
-
"prettier": "~2.6.2",
|
|
60
|
-
"rimraf": "^2.6.2",
|
|
61
|
-
"typescript": "~4.5.5"
|
|
62
|
-
},
|
|
63
|
-
"typeValidation": {
|
|
64
|
-
"version": "2.0.0-internal.2.3.0",
|
|
65
|
-
"baselineRange": ">=2.0.0-internal.2.2.0 <2.0.0-internal.2.3.0",
|
|
66
|
-
"baselineVersion": "2.0.0-internal.2.2.0",
|
|
67
|
-
"broken": {}
|
|
68
64
|
}
|
|
69
|
-
}
|
|
65
|
+
}
|
package/prettier.config.cjs
CHANGED
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
|
+
): Promise<IDocumentServiceFactory> {
|
|
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
|
}
|