@playwright-orchestrator/pg 1.3.0 → 1.3.2
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/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Option } from '@commander-js/extra-typings';
|
|
2
2
|
import { SYMBOLS } from '@playwright-orchestrator/core';
|
|
3
|
-
import { PostgreSQLAdapter } from './
|
|
3
|
+
import { PostgreSQLAdapter } from './pg-adapter.js';
|
|
4
4
|
import { PgShardHandler } from './pg-shard-handler.js';
|
|
5
5
|
import { PgInitializer } from './pg-initializer.js';
|
|
6
6
|
import { PgTestRunCreator } from './pg-test-run-creator.js';
|
|
@@ -11,5 +11,4 @@ export declare class PostgreSQLAdapter extends BaseAdapter {
|
|
|
11
11
|
getReportData(runId: string): Promise<TestRunReport>;
|
|
12
12
|
getTestEma(testId: string): Promise<number>;
|
|
13
13
|
saveTestResult({ runId, test, item, historyWindow, newEma }: SaveTestResultParams): Promise<void>;
|
|
14
|
-
private mapConfig;
|
|
15
14
|
}
|
|
@@ -30,11 +30,11 @@ let PostgreSQLAdapter = class PostgreSQLAdapter extends BaseAdapter {
|
|
|
30
30
|
this.testInfoHistoryTable = pg.escapeIdentifier(`${tableNamePrefix}_test_info_history`);
|
|
31
31
|
}
|
|
32
32
|
async getReportData(runId) {
|
|
33
|
-
const { rows: [
|
|
34
|
-
text: `SELECT
|
|
33
|
+
const { rows: [{ config }], } = await this.pool.query({
|
|
34
|
+
text: `SELECT config FROM ${this.configTable} WHERE id = $1`,
|
|
35
35
|
values: [runId],
|
|
36
36
|
});
|
|
37
|
-
if (!
|
|
37
|
+
if (!config)
|
|
38
38
|
throw new Error(`Run ${runId} not found`);
|
|
39
39
|
const { rows } = await this.pool.query({
|
|
40
40
|
text: `SELECT * FROM ${this.testsTable} WHERE run_id = $1`,
|
|
@@ -42,7 +42,7 @@ let PostgreSQLAdapter = class PostgreSQLAdapter extends BaseAdapter {
|
|
|
42
42
|
});
|
|
43
43
|
return {
|
|
44
44
|
runId,
|
|
45
|
-
config
|
|
45
|
+
config,
|
|
46
46
|
tests: rows.map(({ file, projects, line, character, report }) => ({
|
|
47
47
|
averageDuration: report?.ema ?? 0,
|
|
48
48
|
duration: report?.duration ?? 0,
|
|
@@ -125,13 +125,6 @@ let PostgreSQLAdapter = class PostgreSQLAdapter extends BaseAdapter {
|
|
|
125
125
|
client.release();
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
|
-
mapConfig(dbConfig) {
|
|
129
|
-
return {
|
|
130
|
-
...dbConfig.config,
|
|
131
|
-
updated: dbConfig.updated.getTime(),
|
|
132
|
-
status: dbConfig.status,
|
|
133
|
-
};
|
|
134
|
-
}
|
|
135
128
|
};
|
|
136
129
|
PostgreSQLAdapter = __decorate([
|
|
137
130
|
injectable(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@playwright-orchestrator/pg",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.2",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": "Rostyslav Kudrevatykh",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"commander": "^13.0.0",
|
|
18
18
|
"inversify": "^8.0.0-beta.0",
|
|
19
19
|
"pg": "^8.13.1",
|
|
20
|
-
"@playwright-orchestrator/core": "1.3.
|
|
20
|
+
"@playwright-orchestrator/core": "1.3.2"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@types/pg": "^8.11.0"
|