@empiricalrun/test-gen 0.69.3 → 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 +12 -0
- package/dist/auth/cli-auth.d.ts.map +1 -1
- package/dist/auth/cli-auth.js +11 -5
- package/dist/recorder/temp-files.d.ts.map +1 -1
- package/dist/recorder/temp-files.js +1 -2
- package/dist/recorder/upload.d.ts.map +1 -1
- package/dist/recorder/upload.js +4 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @empiricalrun/test-gen
|
|
2
2
|
|
|
3
|
+
## 0.69.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 385cf7d: fix: ora needs dynamic import for nodejs 20
|
|
8
|
+
|
|
9
|
+
## 0.69.4
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 5ded95d: fix: move open to dynamic import
|
|
14
|
+
|
|
3
15
|
## 0.69.3
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-auth.d.ts","sourceRoot":"","sources":["../../src/auth/cli-auth.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cli-auth.d.ts","sourceRoot":"","sources":["../../src/auth/cli-auth.ts"],"names":[],"mappings":"AAmBA,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE;QACL,EAAE,EAAE,MAAM,CAAC;QACX,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IACF,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAsB,YAAY,IAAI,OAAO,CAAC,UAAU,CAAC,CAwKxD;AAED,wBAAsB,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAE5C;AAED,wBAAsB,aAAa,IAAI,OAAO,CAAC;IAC7C,aAAa,EAAE,OAAO,CAAC;IACvB,IAAI,CAAC,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;CACtC,CAAC,CAeD"}
|
package/dist/auth/cli-auth.js
CHANGED
|
@@ -8,7 +8,6 @@ exports.logout = logout;
|
|
|
8
8
|
exports.getAuthStatus = getAuthStatus;
|
|
9
9
|
const detect_port_1 = __importDefault(require("detect-port"));
|
|
10
10
|
const http_1 = require("http");
|
|
11
|
-
const open_1 = __importDefault(require("open"));
|
|
12
11
|
const url_1 = require("url");
|
|
13
12
|
const token_store_1 = require("./token-store");
|
|
14
13
|
const CLIENT_PORT_DEFAULT = 8080;
|
|
@@ -149,10 +148,17 @@ async function authenticate() {
|
|
|
149
148
|
const authUrl = `${appUrl}/auth/cli?redirect_uri=${encodeURIComponent(redirectUri)}`;
|
|
150
149
|
console.log("🔐 Opening browser for authentication...\n");
|
|
151
150
|
console.log(`If the browser doesn't open automatically, visit: ${authUrl}`);
|
|
152
|
-
(
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
151
|
+
(async () => {
|
|
152
|
+
try {
|
|
153
|
+
// Use dynamic import since 'open' is native ESM module
|
|
154
|
+
// https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
|
|
155
|
+
const { default: open } = await import("open");
|
|
156
|
+
await open(authUrl);
|
|
157
|
+
}
|
|
158
|
+
catch (err) {
|
|
159
|
+
// Ignoring error
|
|
160
|
+
}
|
|
161
|
+
})();
|
|
156
162
|
});
|
|
157
163
|
// Timeout after 10 minutes
|
|
158
164
|
setTimeout(() => {
|
|
@@ -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);
|