@mablhq/mabl-cli 1.58.7 → 1.58.15
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/api/featureSet.js +4 -0
- package/commands/commandUtil/util.js +13 -1
- package/commands/credentials/credentials_cmds/list.js +13 -3
- package/commands/tests/testsUtil.js +14 -11
- package/core/execution/TestResult.js +5 -1
- package/core/trainer/trainingSessions.js +16 -0
- package/execution/index.js +1 -1
- package/mablApi/index.js +1 -1
- package/package.json +3 -3
- package/util/TestOutputWriter.js +29 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mablhq/mabl-cli",
|
|
3
|
-
"version": "1.58.
|
|
3
|
+
"version": "1.58.15",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "The official mabl command line interface tool",
|
|
6
6
|
"main": "index.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"@opentelemetry/api": "1.3.0",
|
|
27
27
|
"@opentelemetry/resources": "1.11.0",
|
|
28
28
|
"@opentelemetry/sdk-metrics": "1.8.0",
|
|
29
|
-
"@playwright/test": "1.
|
|
29
|
+
"@playwright/test": "1.36.2",
|
|
30
30
|
"@types/fs-extra": "8.1.1",
|
|
31
31
|
"@types/serve-handler": "6.1.0",
|
|
32
32
|
"@types/tmp": "0.2.0",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"newman": "5.3.2",
|
|
76
76
|
"open": "6.4.0",
|
|
77
77
|
"ora": "4.0.4",
|
|
78
|
-
"playwright-core": "1.
|
|
78
|
+
"playwright-core": "1.36.2",
|
|
79
79
|
"pluralize": "8.0.0",
|
|
80
80
|
"pngjs": "6.0.0",
|
|
81
81
|
"portfinder": "1.0.28",
|
package/util/TestOutputWriter.js
CHANGED
|
@@ -26,13 +26,40 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.LocalTestOutputWriter = void 0;
|
|
30
|
+
const fs = __importStar(require("fs"));
|
|
29
31
|
const CloudStorageWriter_1 = __importDefault(require("./CloudStorageWriter"));
|
|
30
32
|
const murmurhash = __importStar(require("murmurhash"));
|
|
31
33
|
const loggingProvider_1 = require("../providers/logging/loggingProvider");
|
|
34
|
+
const path_1 = __importDefault(require("path"));
|
|
32
35
|
const HASH_PREFIX_LENGTH = 4;
|
|
33
36
|
const EXECUTION_OUTPUT_PATH_PREFIX = 'execution-output';
|
|
34
37
|
const MAX_PATH_LENGTH = 1024;
|
|
35
|
-
class
|
|
38
|
+
class LocalTestOutputWriter {
|
|
39
|
+
constructor(outputDir) {
|
|
40
|
+
this.outputDir = outputDir;
|
|
41
|
+
}
|
|
42
|
+
write(name, _contentType, data) {
|
|
43
|
+
const localPath = `${this.outputDir}/${name}`;
|
|
44
|
+
this.maybeCreateDirectory(localPath);
|
|
45
|
+
fs.writeFileSync(localPath, data);
|
|
46
|
+
return Promise.resolve(localPath);
|
|
47
|
+
}
|
|
48
|
+
writeObjectAsJson(name, data) {
|
|
49
|
+
const localPath = `${this.outputDir}/${name}`;
|
|
50
|
+
this.maybeCreateDirectory(localPath);
|
|
51
|
+
fs.writeFileSync(localPath, JSON.stringify(data));
|
|
52
|
+
return Promise.resolve(localPath);
|
|
53
|
+
}
|
|
54
|
+
maybeCreateDirectory(localPath) {
|
|
55
|
+
const directory = path_1.default.dirname(localPath);
|
|
56
|
+
if (!fs.existsSync(directory)) {
|
|
57
|
+
fs.mkdirSync(directory, { recursive: true });
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
exports.LocalTestOutputWriter = LocalTestOutputWriter;
|
|
62
|
+
class CloudOutputWriter {
|
|
36
63
|
constructor(projectId, workspaceId, applicationId, planId, planRunId, testRunId) {
|
|
37
64
|
this.storageWriter = new CloudStorageWriter_1.default(projectId, workspaceId);
|
|
38
65
|
this.applicationId = applicationId;
|
|
@@ -64,4 +91,4 @@ class TestOutputWriterImpl {
|
|
|
64
91
|
return murmurhash.v3(value).toString(36).substring(0, HASH_PREFIX_LENGTH);
|
|
65
92
|
}
|
|
66
93
|
}
|
|
67
|
-
exports.default =
|
|
94
|
+
exports.default = CloudOutputWriter;
|