html-reporter 9.10.2 → 9.11.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/build/hermione.js +2 -2
- package/build/hermione.js.map +1 -1
- package/build/lib/cli-commands/gui.js +2 -1
- package/build/lib/cli-commands/gui.js.map +1 -1
- package/build/lib/cli-commands/index.d.ts +5 -3
- package/build/lib/cli-commands/index.js +4 -2
- package/build/lib/cli-commands/index.js.map +1 -1
- package/build/lib/cli-commands/merge-reports.js +2 -1
- package/build/lib/cli-commands/merge-reports.js.map +1 -1
- package/build/lib/cli-commands/remove-unused-screens/index.js +2 -1
- package/build/lib/cli-commands/remove-unused-screens/index.js.map +1 -1
- package/build/lib/common-utils.d.ts +9 -8
- package/build/lib/common-utils.js +11 -11
- package/build/lib/common-utils.js.map +1 -1
- package/build/lib/config/custom-gui-asserts.d.ts +1 -1
- package/build/lib/config/custom-gui-asserts.js +28 -22
- package/build/lib/config/custom-gui-asserts.js.map +1 -1
- package/build/lib/config/index.d.ts +2 -21
- package/build/lib/config/index.js +84 -80
- package/build/lib/config/index.js.map +1 -1
- package/build/lib/constants/browser.d.ts +2 -2
- package/build/lib/constants/browser.js +6 -3
- package/build/lib/constants/browser.js.map +1 -1
- package/build/lib/constants/database.d.ts +32 -25
- package/build/lib/constants/database.js +29 -30
- package/build/lib/constants/database.js.map +1 -1
- package/build/lib/constants/defaults.d.ts +3 -18
- package/build/lib/constants/defaults.js +25 -21
- package/build/lib/constants/defaults.js.map +1 -1
- package/build/lib/constants/diff-modes.d.ts +41 -53
- package/build/lib/constants/diff-modes.js +3 -1
- package/build/lib/constants/diff-modes.js.map +1 -1
- package/build/lib/constants/index.d.ts +9 -0
- package/build/lib/constants/index.js +26 -0
- package/build/lib/constants/index.js.map +1 -0
- package/build/lib/constants/paths.d.ts +2 -2
- package/build/lib/constants/paths.js +5 -5
- package/build/lib/constants/paths.js.map +1 -1
- package/build/lib/constants/plugin-events.d.ts +5 -5
- package/build/lib/constants/plugin-events.js +9 -9
- package/build/lib/constants/plugin-events.js.map +1 -1
- package/build/lib/constants/save-formats.d.ts +3 -1
- package/build/lib/constants/save-formats.js +7 -4
- package/build/lib/constants/save-formats.js.map +1 -1
- package/build/lib/constants/test-statuses.d.ts +18 -8
- package/build/lib/constants/test-statuses.js +22 -11
- package/build/lib/constants/test-statuses.js.map +1 -1
- package/build/lib/constants/view-modes.d.ts +7 -5
- package/build/lib/constants/view-modes.js +11 -8
- package/build/lib/constants/view-modes.js.map +1 -1
- package/build/lib/db-utils/client.d.ts +6 -19
- package/build/lib/db-utils/client.js +1 -0
- package/build/lib/db-utils/client.js.map +1 -1
- package/build/lib/db-utils/common.d.ts +28 -10
- package/build/lib/db-utils/common.js +29 -20
- package/build/lib/db-utils/common.js.map +1 -1
- package/build/lib/db-utils/server.d.ts +6 -16
- package/build/lib/db-utils/server.js +73 -44
- package/build/lib/db-utils/server.js.map +1 -1
- package/build/lib/errors/db-not-initialized-error.d.ts +3 -0
- package/build/lib/errors/db-not-initialized-error.js +10 -0
- package/build/lib/errors/db-not-initialized-error.js.map +1 -0
- package/build/lib/gui/app.d.ts +32 -30
- package/build/lib/gui/index.js +26 -2
- package/build/lib/gui/index.js.map +1 -1
- package/build/lib/gui/tool-runner/index.d.ts +46 -60
- package/build/lib/gui/tool-runner/report-subscriber.js +2 -2
- package/build/lib/gui/tool-runner/report-subscriber.js.map +1 -1
- package/build/lib/local-images-saver.d.ts +2 -4
- package/build/lib/local-images-saver.js +6 -4
- package/build/lib/local-images-saver.js.map +1 -1
- package/build/lib/plugin-adapter.d.ts +14 -29
- package/build/lib/plugin-adapter.js +44 -15
- package/build/lib/plugin-adapter.js.map +1 -1
- package/build/lib/plugin-api.d.ts +31 -55
- package/build/lib/plugin-api.js +20 -12
- package/build/lib/plugin-api.js.map +1 -1
- package/build/lib/plugin-utils.d.ts +2 -3
- package/build/lib/plugin-utils.js +7 -4
- package/build/lib/plugin-utils.js.map +1 -1
- package/build/lib/report-builder/gui.d.ts +49 -34
- package/build/lib/report-builder/gui.js +1 -1
- package/build/lib/report-builder/gui.js.map +1 -1
- package/build/lib/report-builder/static.d.ts +31 -28
- package/build/lib/report-builder/static.js +47 -42
- package/build/lib/report-builder/static.js.map +1 -1
- package/build/lib/reporter-helpers.d.ts +2 -2
- package/build/lib/reporter-helpers.js +4 -4
- package/build/lib/reporter-helpers.js.map +1 -1
- package/build/lib/server-utils.d.ts +57 -40
- package/build/lib/server-utils.js +100 -102
- package/build/lib/server-utils.js.map +1 -1
- package/build/lib/sqlite-adapter.d.ts +66 -76
- package/build/lib/sqlite-adapter.js +59 -58
- package/build/lib/sqlite-adapter.js.map +1 -1
- package/build/lib/static/gui.min.css +1 -1
- package/build/lib/static/gui.min.js +16 -16
- package/build/lib/static/modules/utils.js +5 -5
- package/build/lib/static/modules/utils.js.map +1 -1
- package/build/lib/static/report.min.css +1 -1
- package/build/lib/static/report.min.js +16 -16
- package/build/lib/suite-adapter.d.ts +14 -13
- package/build/lib/suite-adapter.js +24 -19
- package/build/lib/suite-adapter.js.map +1 -1
- package/build/lib/test-adapter.d.ts +75 -109
- package/build/lib/test-adapter.js +105 -69
- package/build/lib/test-adapter.js.map +1 -1
- package/build/lib/tests-tree-builder/base.d.ts +81 -64
- package/build/lib/tests-tree-builder/base.js +22 -16
- package/build/lib/tests-tree-builder/base.js.map +1 -1
- package/build/lib/tests-tree-builder/gui.d.ts +35 -13
- package/build/lib/tests-tree-builder/gui.js +1 -1
- package/build/lib/tests-tree-builder/gui.js.map +1 -1
- package/build/lib/tests-tree-builder/static.d.ts +45 -51
- package/build/lib/tests-tree-builder/static.js +33 -30
- package/build/lib/tests-tree-builder/static.js.map +1 -1
- package/build/lib/types.d.ts +195 -0
- package/build/lib/types.js +3 -0
- package/build/lib/types.js.map +1 -0
- package/build/lib/workers/create-workers.d.ts +14 -2
- package/build/lib/workers/create-workers.js +5 -2
- package/build/lib/workers/create-workers.js.map +1 -1
- package/build/lib/workers/worker.d.ts +2 -1
- package/build/lib/workers/worker.js +11 -11
- package/build/lib/workers/worker.js.map +1 -1
- package/build/package.json +11 -4
- package/package.json +11 -4
|
@@ -1,53 +1,41 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
export { title_5 as title };
|
|
43
|
-
let description_5: string;
|
|
44
|
-
export { description_5 as description };
|
|
45
|
-
}
|
|
46
|
-
export namespace ONION_SKIN {
|
|
47
|
-
let id_6: string;
|
|
48
|
-
export { id_6 as id };
|
|
49
|
-
let title_6: string;
|
|
50
|
-
export { title_6 as title };
|
|
51
|
-
let description_6: string;
|
|
52
|
-
export { description_6 as description };
|
|
53
|
-
}
|
|
1
|
+
import { ValueOf } from 'type-fest';
|
|
2
|
+
export declare const DiffModes: {
|
|
3
|
+
readonly THREE_UP: {
|
|
4
|
+
readonly id: "3-up";
|
|
5
|
+
readonly title: "3-up";
|
|
6
|
+
readonly description: "images in column";
|
|
7
|
+
};
|
|
8
|
+
readonly THREE_UP_SCALED: {
|
|
9
|
+
readonly id: "3-up-scaled";
|
|
10
|
+
readonly title: "3-up scaled";
|
|
11
|
+
readonly description: "scaled images in row";
|
|
12
|
+
};
|
|
13
|
+
readonly THREE_UP_SCALED_TO_FIT: {
|
|
14
|
+
readonly id: "3-up-scaled-to-fit";
|
|
15
|
+
readonly title: "3-up scaled to fit";
|
|
16
|
+
readonly description: "scaled to browser height images in row";
|
|
17
|
+
};
|
|
18
|
+
readonly ONLY_DIFF: {
|
|
19
|
+
readonly id: "only-diff";
|
|
20
|
+
readonly title: "Only diff";
|
|
21
|
+
readonly description: "click on image to see area with diff";
|
|
22
|
+
};
|
|
23
|
+
readonly SWITCH: {
|
|
24
|
+
readonly id: "switch";
|
|
25
|
+
readonly title: "Switch";
|
|
26
|
+
readonly description: "click on image to switch";
|
|
27
|
+
};
|
|
28
|
+
readonly SWIPE: {
|
|
29
|
+
readonly id: "swipe";
|
|
30
|
+
readonly title: "Swipe";
|
|
31
|
+
readonly description: "move divider";
|
|
32
|
+
};
|
|
33
|
+
readonly ONION_SKIN: {
|
|
34
|
+
readonly id: "onion-skin";
|
|
35
|
+
readonly title: "Onion skin";
|
|
36
|
+
readonly description: "move slider";
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
export type DiffModes = typeof DiffModes;
|
|
40
|
+
export type DiffMode = ValueOf<DiffModes>;
|
|
41
|
+
export type DiffModeId = DiffModes[keyof DiffModes]['id'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diff-modes.js","sourceRoot":"","sources":["../../../lib/constants/diff-modes.
|
|
1
|
+
{"version":3,"file":"diff-modes.js","sourceRoot":"","sources":["../../../lib/constants/diff-modes.ts"],"names":[],"mappings":";;;AAEa,QAAA,SAAS,GAAG;IACrB,QAAQ,EAAE;QACN,EAAE,EAAE,MAAM;QACV,KAAK,EAAE,MAAM;QACb,WAAW,EAAE,kBAAkB;KAClC;IACD,eAAe,EAAE;QACb,EAAE,EAAE,aAAa;QACjB,KAAK,EAAE,aAAa;QACpB,WAAW,EAAE,sBAAsB;KACtC;IACD,sBAAsB,EAAE;QACpB,EAAE,EAAE,oBAAoB;QACxB,KAAK,EAAE,oBAAoB;QAC3B,WAAW,EAAE,wCAAwC;KACxD;IACD,SAAS,EAAE;QACP,EAAE,EAAE,WAAW;QACf,KAAK,EAAE,WAAW;QAClB,WAAW,EAAE,sCAAsC;KACtD;IACD,MAAM,EAAE;QACJ,EAAE,EAAE,QAAQ;QACZ,KAAK,EAAE,QAAQ;QACf,WAAW,EAAE,0BAA0B;KAC1C;IACD,KAAK,EAAE;QACH,EAAE,EAAE,OAAO;QACX,KAAK,EAAE,OAAO;QACd,WAAW,EAAE,cAAc;KAC9B;IACD,UAAU,EAAE;QACR,EAAE,EAAE,YAAY;QAChB,KAAK,EAAE,YAAY;QACnB,WAAW,EAAE,aAAa;KAC7B;CACK,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './browser';
|
|
2
|
+
export * from './database';
|
|
3
|
+
export * from './defaults';
|
|
4
|
+
export * from './diff-modes';
|
|
5
|
+
export * from './paths';
|
|
6
|
+
export * from './plugin-events';
|
|
7
|
+
export * from './save-formats';
|
|
8
|
+
export * from './test-statuses';
|
|
9
|
+
export * from './view-modes';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./browser"), exports);
|
|
18
|
+
__exportStar(require("./database"), exports);
|
|
19
|
+
__exportStar(require("./defaults"), exports);
|
|
20
|
+
__exportStar(require("./diff-modes"), exports);
|
|
21
|
+
__exportStar(require("./paths"), exports);
|
|
22
|
+
__exportStar(require("./plugin-events"), exports);
|
|
23
|
+
__exportStar(require("./save-formats"), exports);
|
|
24
|
+
__exportStar(require("./test-statuses"), exports);
|
|
25
|
+
__exportStar(require("./view-modes"), exports);
|
|
26
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/constants/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,6CAA2B;AAC3B,6CAA2B;AAC3B,+CAA6B;AAC7B,0CAAwB;AACxB,kDAAgC;AAChC,iDAA+B;AAC/B,kDAAgC;AAChC,+CAA6B"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export declare const IMAGES_PATH = "images";
|
|
2
|
+
export declare const ERROR_DETAILS_PATH = "error-details";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ERROR_DETAILS_PATH = exports.IMAGES_PATH = void 0;
|
|
4
|
+
exports.IMAGES_PATH = 'images';
|
|
5
|
+
exports.ERROR_DETAILS_PATH = 'error-details';
|
|
6
6
|
//# sourceMappingURL=paths.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paths.js","sourceRoot":"","sources":["../../../lib/constants/paths.
|
|
1
|
+
{"version":3,"file":"paths.js","sourceRoot":"","sources":["../../../lib/constants/paths.ts"],"names":[],"mappings":";;;AAAa,QAAA,WAAW,GAAG,QAAQ,CAAC;AACvB,QAAA,kBAAkB,GAAG,eAAe,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export
|
|
2
|
-
DATABASE_CREATED
|
|
3
|
-
TEST_SCREENSHOTS_SAVED
|
|
4
|
-
REPORT_SAVED
|
|
5
|
-
}
|
|
1
|
+
export declare enum PluginEvents {
|
|
2
|
+
DATABASE_CREATED = "databaseCreated",
|
|
3
|
+
TEST_SCREENSHOTS_SAVED = "testScreenshotsSaved",
|
|
4
|
+
REPORT_SAVED = "reportSaved"
|
|
5
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PluginEvents = void 0;
|
|
4
|
+
var PluginEvents;
|
|
5
|
+
(function (PluginEvents) {
|
|
6
|
+
PluginEvents["DATABASE_CREATED"] = "databaseCreated";
|
|
7
|
+
PluginEvents["TEST_SCREENSHOTS_SAVED"] = "testScreenshotsSaved";
|
|
8
|
+
PluginEvents["REPORT_SAVED"] = "reportSaved";
|
|
9
|
+
})(PluginEvents || (exports.PluginEvents = PluginEvents = {}));
|
|
10
10
|
//# sourceMappingURL=plugin-events.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-events.js","sourceRoot":"","sources":["../../../lib/constants/plugin-events.
|
|
1
|
+
{"version":3,"file":"plugin-events.js","sourceRoot":"","sources":["../../../lib/constants/plugin-events.ts"],"names":[],"mappings":";;;AAAA,IAAY,YAIX;AAJD,WAAY,YAAY;IACpB,oDAAoC,CAAA;IACpC,+DAA+C,CAAA;IAC/C,4CAA4B,CAAA;AAChC,CAAC,EAJW,YAAY,4BAAZ,YAAY,QAIvB"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SaveFormat = void 0;
|
|
4
|
+
var SaveFormat;
|
|
5
|
+
(function (SaveFormat) {
|
|
6
|
+
SaveFormat["SQLITE"] = "sqlite";
|
|
7
|
+
})(SaveFormat || (exports.SaveFormat = SaveFormat = {}));
|
|
5
8
|
//# sourceMappingURL=save-formats.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"save-formats.js","sourceRoot":"","sources":["../../../lib/constants/save-formats.
|
|
1
|
+
{"version":3,"file":"save-formats.js","sourceRoot":"","sources":["../../../lib/constants/save-formats.ts"],"names":[],"mappings":";;;AAAA,IAAY,UAEX;AAFD,WAAY,UAAU;IAClB,+BAAiB,CAAA;AACrB,CAAC,EAFW,UAAU,0BAAV,UAAU,QAErB"}
|
|
@@ -1,8 +1,18 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
export declare enum TestStatus {
|
|
2
|
+
IDLE = "idle",
|
|
3
|
+
QUEUED = "queued",
|
|
4
|
+
RUNNING = "running",
|
|
5
|
+
SUCCESS = "success",
|
|
6
|
+
FAIL = "fail",
|
|
7
|
+
ERROR = "error",
|
|
8
|
+
SKIPPED = "skipped",
|
|
9
|
+
UPDATED = "updated"
|
|
10
|
+
}
|
|
11
|
+
export declare const IDLE = TestStatus.IDLE;
|
|
12
|
+
export declare const QUEUED = TestStatus.QUEUED;
|
|
13
|
+
export declare const RUNNING = TestStatus.RUNNING;
|
|
14
|
+
export declare const SUCCESS = TestStatus.SUCCESS;
|
|
15
|
+
export declare const FAIL = TestStatus.FAIL;
|
|
16
|
+
export declare const ERROR = TestStatus.ERROR;
|
|
17
|
+
export declare const SKIPPED = TestStatus.SKIPPED;
|
|
18
|
+
export declare const UPDATED = TestStatus.UPDATED;
|
|
@@ -1,12 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UPDATED = exports.SKIPPED = exports.ERROR = exports.FAIL = exports.SUCCESS = exports.RUNNING = exports.QUEUED = exports.IDLE = exports.TestStatus = void 0;
|
|
4
|
+
var TestStatus;
|
|
5
|
+
(function (TestStatus) {
|
|
6
|
+
TestStatus["IDLE"] = "idle";
|
|
7
|
+
TestStatus["QUEUED"] = "queued";
|
|
8
|
+
TestStatus["RUNNING"] = "running";
|
|
9
|
+
TestStatus["SUCCESS"] = "success";
|
|
10
|
+
TestStatus["FAIL"] = "fail";
|
|
11
|
+
TestStatus["ERROR"] = "error";
|
|
12
|
+
TestStatus["SKIPPED"] = "skipped";
|
|
13
|
+
TestStatus["UPDATED"] = "updated";
|
|
14
|
+
})(TestStatus || (exports.TestStatus = TestStatus = {}));
|
|
15
|
+
exports.IDLE = TestStatus.IDLE;
|
|
16
|
+
exports.QUEUED = TestStatus.QUEUED;
|
|
17
|
+
exports.RUNNING = TestStatus.RUNNING;
|
|
18
|
+
exports.SUCCESS = TestStatus.SUCCESS;
|
|
19
|
+
exports.FAIL = TestStatus.FAIL;
|
|
20
|
+
exports.ERROR = TestStatus.ERROR;
|
|
21
|
+
exports.SKIPPED = TestStatus.SKIPPED;
|
|
22
|
+
exports.UPDATED = TestStatus.UPDATED;
|
|
12
23
|
//# sourceMappingURL=test-statuses.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-statuses.js","sourceRoot":"","sources":["../../../lib/constants/test-statuses.
|
|
1
|
+
{"version":3,"file":"test-statuses.js","sourceRoot":"","sources":["../../../lib/constants/test-statuses.ts"],"names":[],"mappings":";;;AAAA,IAAY,UASX;AATD,WAAY,UAAU;IAClB,2BAAa,CAAA;IACb,+BAAiB,CAAA;IACjB,iCAAmB,CAAA;IACnB,iCAAmB,CAAA;IACnB,2BAAa,CAAA;IACb,6BAAe,CAAA;IACf,iCAAmB,CAAA;IACnB,iCAAmB,CAAA;AACvB,CAAC,EATW,UAAU,0BAAV,UAAU,QASrB;AAEY,QAAA,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC;AACvB,QAAA,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;AAC3B,QAAA,OAAO,GAAG,UAAU,CAAC,OAAO,CAAC;AAC7B,QAAA,OAAO,GAAG,UAAU,CAAC,OAAO,CAAC;AAC7B,QAAA,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC;AACvB,QAAA,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC;AACzB,QAAA,OAAO,GAAG,UAAU,CAAC,OAAO,CAAC;AAC7B,QAAA,OAAO,GAAG,UAAU,CAAC,OAAO,CAAC"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
export declare enum ViewMode {
|
|
2
|
+
ALL = "all",
|
|
3
|
+
PASSED = "passed",
|
|
4
|
+
FAILED = "failed",
|
|
5
|
+
RETRIED = "retried",
|
|
6
|
+
SKIPPED = "skipped"
|
|
7
|
+
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ViewMode = void 0;
|
|
4
|
+
var ViewMode;
|
|
5
|
+
(function (ViewMode) {
|
|
6
|
+
ViewMode["ALL"] = "all";
|
|
7
|
+
ViewMode["PASSED"] = "passed";
|
|
8
|
+
ViewMode["FAILED"] = "failed";
|
|
9
|
+
ViewMode["RETRIED"] = "retried";
|
|
10
|
+
ViewMode["SKIPPED"] = "skipped";
|
|
11
|
+
})(ViewMode || (exports.ViewMode = ViewMode = {}));
|
|
9
12
|
//# sourceMappingURL=view-modes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"view-modes.js","sourceRoot":"","sources":["../../../lib/constants/view-modes.
|
|
1
|
+
{"version":3,"file":"view-modes.js","sourceRoot":"","sources":["../../../lib/constants/view-modes.ts"],"names":[],"mappings":";;;AAAA,IAAY,QAMX;AAND,WAAY,QAAQ;IAChB,uBAAW,CAAA;IACX,6BAAiB,CAAA;IACjB,6BAAiB,CAAA;IACjB,+BAAmB,CAAA;IACnB,+BAAmB,CAAA;AACvB,CAAC,EANW,QAAQ,wBAAR,QAAQ,QAMnB"}
|
|
@@ -1,19 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
closeDatabase: typeof closeDatabase;
|
|
8
|
-
selectAllQuery: (tableName: any) => string;
|
|
9
|
-
selectAllSuitesQuery: () => string;
|
|
10
|
-
createTablesQuery: () => string[];
|
|
11
|
-
compareDatabaseRowsByTimestamp: (row1: any, row2: any) => number;
|
|
12
|
-
handleDatabases: (dbJsonUrls: any, opts?: {}) => Promise<any[]>;
|
|
13
|
-
mergeTables: ({ db, dbPaths, getExistingTables }: {
|
|
14
|
-
db: any;
|
|
15
|
-
dbPaths: any;
|
|
16
|
-
getExistingTables?: (() => void) | undefined;
|
|
17
|
-
}) => void;
|
|
18
|
-
};
|
|
19
|
-
export = _exports;
|
|
1
|
+
export function fetchDataFromDatabases(dbJsonUrls: any): unknown;
|
|
2
|
+
export function mergeDatabases(dataForDbs: any): Promise<any>;
|
|
3
|
+
export function connectToDatabase(dbUrl: any): Promise<any>;
|
|
4
|
+
export function getMainDatabaseUrl(): URL;
|
|
5
|
+
export function getSuitesTableRows(db: any): any;
|
|
6
|
+
export function closeDatabase(db: any): void;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/* eslint-env browser */
|
|
3
3
|
const { isEmpty } = require('lodash');
|
|
4
|
+
/** @type Record<string, (...args: unknown[]) => unknown> */
|
|
4
5
|
const commonSqliteUtils = require('./common');
|
|
5
6
|
const { fetchFile, normalizeUrls } = require('../common-utils');
|
|
6
7
|
const { DB_SUITES_TABLE_NAME, LOCAL_DATABASE_NAME } = require('../constants/database');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../lib/db-utils/client.js"],"names":[],"mappings":"AAAA,YAAY,CAAC;AACb,wBAAwB;AAExB,MAAM,EAAC,OAAO,EAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AACpC,MAAM,iBAAiB,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAC9C,MAAM,EAAC,SAAS,EAAE,aAAa,EAAC,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAE9D,MAAM,EAAC,oBAAoB,EAAE,mBAAmB,EAAC,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC;AAErF,SAAS,sBAAsB,CAAC,UAAU;IACtC,MAAM,aAAa,GAAG,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;IAC1D,MAAM,WAAW,GAAG,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,CAAC,aAAa,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAEpE,MAAM,UAAU,GAAG,CAAC,SAAS,EAAE,kBAAkB,GAAG,SAAS,EAAE,EAAE;QAC7D,OAAO,EAAC,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,kBAAkB,EAAE,IAAI,EAAE,IAAI,EAAC,CAAC;IACpE,CAAC,CAAC;IAEF,MAAM,SAAS,GAAG,KAAK,EAAE,KAA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AI,OAAO,CAAC,YAAY,CAAC,EAAE;QACvB,OAAO;KACV;IAED,OAAO,YAAY,CAAC,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,8BAA8B,CAAC,CAAC;AACtF,CAAC;AAED,SAAS,YAAY,CAAC,EAAE,EAAE,SAAS;IAC/B,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,iBAAiB,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC;IAE5E,IAAI,CAAC,YAAY,EAAE;QACf,OAAO,CAAC,IAAI,CAAC,UAAU,SAAS,YAAY,CAAC,CAAC;QAE9C,OAAO,EAAE,CAAC;KACb;IAED,OAAO,YAAY,CAAC;AACxB,CAAC;AAED,SAAS,aAAa,CAAC,EAAE;IACrB,EAAE,CAAC,KAAK,EAAE,CAAC;AACf,CAAC;AAED,MAAM,CAAC,OAAO,GAAG;IACb,GAAG,iBAAiB;IACpB,sBAAsB;IACtB,cAAc;IACd,iBAAiB;IACjB,kBAAkB;IAClB,kBAAkB;IAClB,aAAa;CAChB,CAAC"}
|
|
@@ -1,10 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { DbUrlsJsonData, RawSuitesRow, ReporterConfig } from '../types';
|
|
2
|
+
import type { Database, Statement } from 'better-sqlite3';
|
|
3
|
+
export declare const selectAllQuery: (tableName: string) => string;
|
|
4
|
+
export declare const selectAllSuitesQuery: () => string;
|
|
5
|
+
export declare const createTablesQuery: () => string[];
|
|
6
|
+
export declare const compareDatabaseRowsByTimestamp: (row1: RawSuitesRow, row2: RawSuitesRow) => number;
|
|
7
|
+
export interface DbLoadResult {
|
|
8
|
+
url: string;
|
|
9
|
+
status: string;
|
|
10
|
+
data: null | unknown;
|
|
11
|
+
}
|
|
12
|
+
export interface HandleDatabasesOptions {
|
|
13
|
+
pluginConfig: ReporterConfig;
|
|
14
|
+
loadDbJsonUrl: (dbJsonUrl: string) => Promise<{
|
|
15
|
+
data: DbUrlsJsonData | null;
|
|
16
|
+
status?: string;
|
|
17
|
+
}>;
|
|
18
|
+
formatData?: (dbJsonUrl: string, status?: string) => DbLoadResult;
|
|
19
|
+
prepareUrls: (dbUrls: string[], baseUrls: string) => string[];
|
|
20
|
+
loadDbUrl: (dbUrl: string, opts: HandleDatabasesOptions) => Promise<DbLoadResult | string>;
|
|
21
|
+
}
|
|
22
|
+
export declare const handleDatabases: (dbJsonUrls: string[], opts: HandleDatabasesOptions) => Promise<(string | DbLoadResult)[]>;
|
|
23
|
+
export declare const mergeTables: ({ db, dbPaths, getExistingTables }: {
|
|
24
|
+
db: Database;
|
|
25
|
+
dbPaths: string[];
|
|
26
|
+
getExistingTables?: ((getTablesStatement: Statement<[
|
|
27
|
+
]>) => string[]) | undefined;
|
|
28
|
+
}) => void;
|
|
@@ -1,41 +1,49 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
exports.
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.mergeTables = exports.handleDatabases = exports.compareDatabaseRowsByTimestamp = exports.createTablesQuery = exports.selectAllSuitesQuery = exports.selectAllQuery = void 0;
|
|
7
|
+
const lodash_1 = __importDefault(require("lodash"));
|
|
8
|
+
const common_utils_1 = require("../common-utils");
|
|
9
|
+
const constants_1 = require("../constants");
|
|
10
|
+
const selectAllQuery = (tableName) => `SELECT * FROM ${tableName}`;
|
|
11
|
+
exports.selectAllQuery = selectAllQuery;
|
|
12
|
+
const selectAllSuitesQuery = () => (0, exports.selectAllQuery)(constants_1.DB_SUITES_TABLE_NAME);
|
|
13
|
+
exports.selectAllSuitesQuery = selectAllSuitesQuery;
|
|
14
|
+
const createTablesQuery = () => [
|
|
15
|
+
createTableQuery(constants_1.DB_SUITES_TABLE_NAME, constants_1.SUITES_TABLE_COLUMNS)
|
|
9
16
|
];
|
|
10
|
-
exports.
|
|
11
|
-
|
|
17
|
+
exports.createTablesQuery = createTablesQuery;
|
|
18
|
+
const compareDatabaseRowsByTimestamp = (row1, row2) => {
|
|
19
|
+
return row1[constants_1.DB_COLUMN_INDEXES.timestamp] - row2[constants_1.DB_COLUMN_INDEXES.timestamp];
|
|
12
20
|
};
|
|
13
|
-
exports.
|
|
14
|
-
|
|
21
|
+
exports.compareDatabaseRowsByTimestamp = compareDatabaseRowsByTimestamp;
|
|
22
|
+
const handleDatabases = async (dbJsonUrls, opts) => {
|
|
23
|
+
return lodash_1.default.flattenDeep(await Promise.all(dbJsonUrls.map(async (dbJsonUrl) => {
|
|
15
24
|
try {
|
|
16
25
|
const currentJsonResponse = await opts.loadDbJsonUrl(dbJsonUrl);
|
|
17
26
|
if (!currentJsonResponse.data) {
|
|
18
|
-
logger.warn(`Cannot get data from ${dbJsonUrl}`);
|
|
27
|
+
common_utils_1.logger.warn(`Cannot get data from ${dbJsonUrl}`);
|
|
19
28
|
return opts.formatData ? opts.formatData(dbJsonUrl, currentJsonResponse.status) : [];
|
|
20
29
|
}
|
|
21
|
-
// JSON format declare at lib/static/modules/actions.js
|
|
22
30
|
const { dbUrls, jsonUrls } = currentJsonResponse.data;
|
|
23
|
-
// paths from databaseUrls.json may be relative or absolute
|
|
24
31
|
const preparedDbUrls = opts.prepareUrls(dbUrls, dbJsonUrl);
|
|
25
32
|
const preparedDbJsonUrls = opts.prepareUrls(jsonUrls, dbJsonUrl);
|
|
26
33
|
return await Promise.all([
|
|
27
|
-
exports.handleDatabases(preparedDbJsonUrls, opts),
|
|
28
|
-
...preparedDbUrls.map(dbUrl => opts.loadDbUrl(dbUrl, opts))
|
|
34
|
+
(0, exports.handleDatabases)(preparedDbJsonUrls, opts),
|
|
35
|
+
...preparedDbUrls.map((dbUrl) => opts.loadDbUrl(dbUrl, opts))
|
|
29
36
|
]);
|
|
30
37
|
}
|
|
31
38
|
catch (e) {
|
|
32
|
-
logger.warn(`Error while downloading databases from ${dbJsonUrl}`, e);
|
|
39
|
+
common_utils_1.logger.warn(`Error while downloading databases from ${dbJsonUrl}`, e);
|
|
33
40
|
return opts.formatData ? opts.formatData(dbJsonUrl) : [];
|
|
34
41
|
}
|
|
35
42
|
})));
|
|
36
43
|
};
|
|
37
|
-
exports.
|
|
38
|
-
|
|
44
|
+
exports.handleDatabases = handleDatabases;
|
|
45
|
+
const mergeTables = ({ db, dbPaths, getExistingTables = () => [] }) => {
|
|
46
|
+
db.prepare(`PRAGMA page_size = ${constants_1.DB_MAX_AVAILABLE_PAGE_SIZE}`).run();
|
|
39
47
|
for (const dbPath of dbPaths) {
|
|
40
48
|
db.prepare(`ATTACH DATABASE '${dbPath}' AS attached`).run();
|
|
41
49
|
const getTablesStatement = db.prepare(`SELECT name FROM attached.sqlite_master WHERE type='table'`);
|
|
@@ -47,6 +55,7 @@ exports.mergeTables = ({ db, dbPaths, getExistingTables = () => { } }) => {
|
|
|
47
55
|
db.prepare(`DETACH attached`).run();
|
|
48
56
|
}
|
|
49
57
|
};
|
|
58
|
+
exports.mergeTables = mergeTables;
|
|
50
59
|
function createTableQuery(tableName, columns) {
|
|
51
60
|
const formattedColumns = columns
|
|
52
61
|
.map(({ name, type }) => `${name} ${type}`)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../lib/db-utils/common.
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../lib/db-utils/common.ts"],"names":[],"mappings":";;;;;;AAAA,oDAAuB;AACvB,kDAAuC;AACvC,4CAAuH;AAIhH,MAAM,cAAc,GAAG,CAAC,SAAiB,EAAU,EAAE,CAAC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C,yBAAyB,SAAS,2BAA2B,SAAS,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC;SAC9F;QAED,EAAE,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,GAAG,EAAE,CAAC;KACvC;AACL,CAAC,CAAC;AAhBW,QAAA,WAAW,eAgBtB;AAEF,SAAS,gBAAgB,CAAC,SAAiB,EAAE,OAAyC;IAClF,MAAM,gBAAgB,GAAG,OAAO;SAC3B,GAAG,CAAC,CAAC,EAAC,IAAI,EAAE,IAAI,EAAC,EAAE,EAAE,CAAC,GAAG,IAAI,IAAI,IAAI,EAAE,CAAC;SACxC,IAAI,CAAC,IAAI,CAAC,CAAC;IAEhB,OAAO,8BAA8B,SAAS,KAAK,gBAAgB,GAAG,CAAC;AAC3E,CAAC"}
|
|
@@ -1,16 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
createTablesQuery: () => string[];
|
|
8
|
-
compareDatabaseRowsByTimestamp: (row1: any, row2: any) => number;
|
|
9
|
-
handleDatabases: (dbJsonUrls: any, opts?: {}) => Promise<any[]>;
|
|
10
|
-
mergeTables: ({ db, dbPaths, getExistingTables }: {
|
|
11
|
-
db: any;
|
|
12
|
-
dbPaths: any;
|
|
13
|
-
getExistingTables?: (() => void) | undefined;
|
|
14
|
-
}) => void;
|
|
15
|
-
};
|
|
16
|
-
export = _exports;
|
|
1
|
+
import { DbLoadResult, HandleDatabasesOptions } from './common';
|
|
2
|
+
import { Tree } from '../tests-tree-builder/base';
|
|
3
|
+
export * from './common';
|
|
4
|
+
export declare function downloadDatabases(dbJsonUrls: string[], opts: HandleDatabasesOptions): Promise<(string | DbLoadResult)[]>;
|
|
5
|
+
export declare function mergeDatabases(srcDbPaths: string[], reportPath: string): Promise<void>;
|
|
6
|
+
export declare function getTestsTreeFromDatabase(dbPath: string): Tree;
|