@empiricalrun/test-gen 0.69.4 → 0.69.5
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
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"temp-files.d.ts","sourceRoot":"","sources":["../../src/recorder/temp-files.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,GAAG,CAAC;IACT,SAAS,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,SAAS,CAAC;IACzC,UAAU,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,SAAS,CAAC;IAC1C,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B,CAAC;AAEF,wBAAgB,uBAAuB,CACrC,eAAe,EAAE,iBAAiB,GACjC,MAAM,
|
|
1
|
+
{"version":3,"file":"temp-files.d.ts","sourceRoot":"","sources":["../../src/recorder/temp-files.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,GAAG,CAAC;IACT,SAAS,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,SAAS,CAAC;IACzC,UAAU,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,SAAS,CAAC;IAC1C,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B,CAAC;AAEF,wBAAgB,uBAAuB,CACrC,eAAe,EAAE,iBAAiB,GACjC,MAAM,CA8BR;AAqBD,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,oBAAoB,EAAE,MAAM,iBAkB7B;AAED,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,MAAM,EACf,oBAAoB,EAAE,MAAM,iBAS7B"}
|
|
@@ -32,7 +32,6 @@ function getTempTestFileLocation(selectedProject) {
|
|
|
32
32
|
...testMatchPattern,
|
|
33
33
|
...testIgnorePattern.map((p) => `!${p}`),
|
|
34
34
|
];
|
|
35
|
-
console.log("Generated patterns:", patterns);
|
|
36
35
|
const common = (0, glob_1.generateMatchingString)(patterns);
|
|
37
36
|
if (!common) {
|
|
38
37
|
throw new Error("Could not generate a valid test file location. Please check your testMatch and testIgnore patterns.");
|
|
@@ -81,6 +80,6 @@ async function deleteTempTestFile(repoDir, tempFileRelativePath) {
|
|
|
81
80
|
logger_1.logger.debug("Temporary test file deleted:", tempFilePath);
|
|
82
81
|
}
|
|
83
82
|
else {
|
|
84
|
-
logger_1.logger.
|
|
83
|
+
logger_1.logger.debug("Temporary test file does not exist. Skipping deletion.");
|
|
85
84
|
}
|
|
86
85
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload.d.ts","sourceRoot":"","sources":["../../src/recorder/upload.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"upload.d.ts","sourceRoot":"","sources":["../../src/recorder/upload.ts"],"names":[],"mappings":"AAaA,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAoBjE;AA6FD,wBAAsB,uBAAuB,CAC3C,UAAU,EAAE,MAAM,EAAE,EACpB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,IAAI,GAAG,MAAM,EAAE,CAAC,CAiB1B"}
|
package/dist/recorder/upload.js
CHANGED
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.extractVideoAttachments = extractVideoAttachments;
|
|
7
7
|
exports.uploadVideosWithSpinner = uploadVideosWithSpinner;
|
|
8
8
|
const fs_1 = __importDefault(require("fs"));
|
|
9
|
-
const ora_1 = __importDefault(require("ora"));
|
|
10
9
|
const path_1 = __importDefault(require("path"));
|
|
11
10
|
const utils_1 = require("../artifacts/utils");
|
|
12
11
|
const api_client_1 = require("../auth/api-client");
|
|
@@ -105,7 +104,10 @@ async function uploadVideos(videoPaths, testSlug) {
|
|
|
105
104
|
}
|
|
106
105
|
}
|
|
107
106
|
async function uploadVideosWithSpinner(videoPaths, testName) {
|
|
108
|
-
|
|
107
|
+
// Use dynamic imports to avoid issues with ESM modules
|
|
108
|
+
// https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
|
|
109
|
+
const ora = (await import("ora")).default;
|
|
110
|
+
const uploadSpinner = ora("Uploading video recordings...").start();
|
|
109
111
|
try {
|
|
110
112
|
const slugifiedTestName = `${(0, slug_1.slugify)(testName)}-${Math.random().toString(36).substring(2, 8)}`;
|
|
111
113
|
const uploaded = await uploadVideos(videoPaths, slugifiedTestName);
|