@midscene/core 0.8.3 → 0.8.4
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/lib/index.js +1 -1
- package/dist/lib/utils.js +8 -4
- package/package.json +2 -2
- package/report/index.html +2 -2
package/dist/lib/index.js
CHANGED
package/dist/lib/utils.js
CHANGED
|
@@ -272,7 +272,7 @@ function stringifyDumpData(data, indents) {
|
|
|
272
272
|
return JSON.stringify(data, replacerForPageObject, indents);
|
|
273
273
|
}
|
|
274
274
|
function getVersion() {
|
|
275
|
-
return "0.8.
|
|
275
|
+
return "0.8.4";
|
|
276
276
|
}
|
|
277
277
|
function debugLog(...message) {
|
|
278
278
|
const debugMode = getAIConfig(MIDSCENE_DEBUG_MODE);
|
|
@@ -285,19 +285,22 @@ function uploadTestInfoToServer({
|
|
|
285
285
|
testUrl
|
|
286
286
|
}) {
|
|
287
287
|
let repoUrl = "";
|
|
288
|
+
let userEmail = "";
|
|
288
289
|
const extraConfigString = getAIConfig(MIDSCENE_OPENAI_INIT_CONFIG_JSON);
|
|
289
290
|
const extraConfig = extraConfigString ? JSON.parse(extraConfigString) : {};
|
|
290
291
|
const serverUrl = extraConfig == null ? void 0 : extraConfig.REPORT_SERVER_URL;
|
|
291
292
|
try {
|
|
292
293
|
repoUrl = (0, import_node_child_process.execSync)("git config --get remote.origin.url").toString().trim();
|
|
294
|
+
userEmail = (0, import_node_child_process.execSync)("git config --get user.email").toString().trim();
|
|
293
295
|
} catch (error) {
|
|
294
|
-
debugLog("Failed to get git
|
|
296
|
+
debugLog("Failed to get git info:", error);
|
|
295
297
|
}
|
|
296
298
|
if (serverUrl && (repoUrl && repoUrl !== lastReportedRepoUrl || !repoUrl && testUrl)) {
|
|
297
299
|
debugLog("Uploading test info to server", {
|
|
298
300
|
serverUrl,
|
|
299
301
|
repoUrl,
|
|
300
|
-
testUrl
|
|
302
|
+
testUrl,
|
|
303
|
+
userEmail
|
|
301
304
|
});
|
|
302
305
|
fetch(serverUrl, {
|
|
303
306
|
method: "POST",
|
|
@@ -306,7 +309,8 @@ function uploadTestInfoToServer({
|
|
|
306
309
|
},
|
|
307
310
|
body: JSON.stringify({
|
|
308
311
|
repo_url: repoUrl,
|
|
309
|
-
test_url: testUrl
|
|
312
|
+
test_url: testUrl,
|
|
313
|
+
user_email: userEmail
|
|
310
314
|
})
|
|
311
315
|
}).then((response) => response.json()).then((data) => {
|
|
312
316
|
debugLog("Successfully uploaded test info to server:", data);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midscene/core",
|
|
3
3
|
"description": "An AI-powered automation SDK can control the page, perform assertions, and extract data in JSON format using natural language. See https://midscenejs.com/ for details.",
|
|
4
|
-
"version": "0.8.
|
|
4
|
+
"version": "0.8.4",
|
|
5
5
|
"repository": "https://github.com/web-infra-dev/midscene",
|
|
6
6
|
"homepage": "https://midscenejs.com/",
|
|
7
7
|
"jsnext:source": "./src/index.ts",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"openai": "4.57.1",
|
|
36
36
|
"optional": "0.1.4",
|
|
37
|
-
"@midscene/shared": "0.8.
|
|
37
|
+
"@midscene/shared": "0.8.4"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@modern-js/module-tools": "2.60.6",
|