Skip to content

Commit 37d788d

Browse files
authored
Merge pull request #743 from getmaxun/develop
chore: release v0.0.22
2 parents e6df945 + 4b68efb commit 37d788d

File tree

28 files changed

+3315
-358
lines changed

28 files changed

+3315
-358
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ You can access the frontend at http://localhost:5173/ and backend at http://loca
110110
| `AIRTABLE_REDIRECT_URI` | No | Redirect URI for handling Airtable OAuth responses. | Airtable login will not work. |
111111
| `MAXUN_TELEMETRY` | No | Disables telemetry to stop sending anonymous usage data. Keeping it enabled helps us understand how the product is used and assess the impact of any new changes. Please keep it enabled. | Telemetry data will not be collected. |
112112

113-
113+
# How Do I Self-Host?
114+
Checkout community self hosting guide: https://docs.maxun.dev/self-host
114115

115116
# How Does It Work?
116117
Maxun lets you create custom robots which emulate user actions and extract data. A robot can perform any of the actions: <b>Capture List, Capture Text or Capture Screenshot. Once a robot is created, it will keep extracting data for you without manual intervention</b>
@@ -158,6 +159,9 @@ This project is in early stages of development. Your feedback is very important
158159
This project is licensed under <a href="./LICENSE">AGPLv3</a>.
159160
</p>
160161

162+
# Support Us
163+
Star the repository, contribute if you love what we’re building, or make a [one-time donation](https://bit.ly/maxun-oss). Every little bit helps us keep the lights on and the robots running.
164+
161165
# Contributors
162166
Thank you to the combined efforts of everyone who contributes!
163167

maxun-core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "maxun-core",
3-
"version": "0.0.21",
3+
"version": "0.0.22",
44
"description": "Core package for Maxun, responsible for data extraction",
55
"main": "build/index.js",
66
"typings": "build/index.d.ts",

maxun-core/src/interpret.ts

Lines changed: 36 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,31 +1169,36 @@ export default class Interpreter extends EventEmitter {
11691169
return;
11701170
}
11711171

1172-
let pageState = {};
1173-
try {
1174-
// Check if page is still valid before accessing state
1175-
if (p.isClosed()) {
1176-
this.log('Page was closed during execution', Level.WARN);
1177-
return;
1178-
}
1179-
1180-
pageState = await this.getState(p, workflowCopy, selectors);
1181-
selectors = [];
1182-
console.log("Empty selectors:", selectors)
1183-
} catch (e: any) {
1184-
this.log(`Failed to get page state: ${e.message}`, Level.ERROR);
1185-
// If state access fails, attempt graceful recovery
1186-
if (p.isClosed()) {
1187-
this.log('Browser has been closed, terminating workflow', Level.WARN);
1188-
return;
1189-
}
1190-
// For other errors, continue with empty state to avoid complete failure
1191-
pageState = { url: p.url(), selectors: [], cookies: {} };
1172+
if (workflowCopy.length === 0) {
1173+
this.log('All actions completed. Workflow finished.', Level.LOG);
1174+
return;
11921175
}
11931176

1194-
if (this.options.debug) {
1195-
this.log(`Current state is: \n${JSON.stringify(pageState, null, 2)}`, Level.WARN);
1196-
}
1177+
// let pageState = {};
1178+
// try {
1179+
// // Check if page is still valid before accessing state
1180+
// if (p.isClosed()) {
1181+
// this.log('Page was closed during execution', Level.WARN);
1182+
// return;
1183+
// }
1184+
1185+
// pageState = await this.getState(p, workflowCopy, selectors);
1186+
// selectors = [];
1187+
// console.log("Empty selectors:", selectors)
1188+
// } catch (e: any) {
1189+
// this.log(`Failed to get page state: ${e.message}`, Level.ERROR);
1190+
// // If state access fails, attempt graceful recovery
1191+
// if (p.isClosed()) {
1192+
// this.log('Browser has been closed, terminating workflow', Level.WARN);
1193+
// return;
1194+
// }
1195+
// // For other errors, continue with empty state to avoid complete failure
1196+
// pageState = { url: p.url(), selectors: [], cookies: {} };
1197+
// }
1198+
1199+
// if (this.options.debug) {
1200+
// this.log(`Current state is: \n${JSON.stringify(pageState, null, 2)}`, Level.WARN);
1201+
// }
11971202

11981203
// const actionId = workflow.findIndex((step) => {
11991204
// const isApplicable = this.applicable(step.where, pageState, usedActions);
@@ -1205,8 +1210,9 @@ export default class Interpreter extends EventEmitter {
12051210
// return isApplicable;
12061211
// });
12071212

1208-
actionId = this.getMatchingActionId(workflowCopy, pageState, usedActions);
1213+
// actionId = this.getMatchingActionId(workflowCopy, pageState, usedActions);
12091214

1215+
const actionId = workflowCopy.length - 1;
12101216
const action = workflowCopy[actionId];
12111217

12121218
console.log("MATCHED ACTION:", action);
@@ -1235,12 +1241,12 @@ export default class Interpreter extends EventEmitter {
12351241
console.log(`Action with ID ${action.id} removed from the workflow copy.`);
12361242

12371243
// const newSelectors = this.getPreviousSelectors(workflow, actionId);
1238-
const newSelectors = this.getSelectors(workflowCopy);
1239-
newSelectors.forEach(selector => {
1240-
if (!selectors.includes(selector)) {
1241-
selectors.push(selector);
1242-
}
1243-
});
1244+
// const newSelectors = this.getSelectors(workflowCopy);
1245+
// newSelectors.forEach(selector => {
1246+
// if (!selectors.includes(selector)) {
1247+
// selectors.push(selector);
1248+
// }
1249+
// });
12441250

12451251
// Reset loop iteration counter on successful action
12461252
loopIterations = 0;

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "maxun",
3-
"version": "0.0.21",
3+
"version": "0.0.22",
44
"author": "Maxun",
55
"license": "AGPL-3.0-or-later",
66
"dependencies": {
@@ -50,7 +50,7 @@
5050
"lodash": "^4.17.21",
5151
"loglevel": "^1.8.0",
5252
"loglevel-plugin-remote": "^0.6.8",
53-
"maxun-core": "^0.0.21",
53+
"maxun-core": "^0.0.22",
5454
"minio": "^8.0.1",
5555
"moment-timezone": "^0.5.45",
5656
"node-cron": "^3.0.3",

public/locales/de.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,9 @@
442442
"created_at": "Erstellungsdatum des Roboters",
443443
"errors": {
444444
"robot_not_found": "Roboterdetails konnten nicht gefunden werden. Bitte versuchen Sie es erneut."
445+
},
446+
"buttons": {
447+
"close": "Schließen"
445448
}
446449
},
447450
"robot_edit": {

public/locales/en.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,9 @@
442442
"created_at": "Robot Created At",
443443
"errors": {
444444
"robot_not_found": "Could not find robot details. Please try again."
445+
},
446+
"buttons": {
447+
"close": "Close"
445448
}
446449
},
447450
"robot_edit": {

public/locales/es.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,9 @@
460460
"created_at": "Fecha de Creación del Robot",
461461
"errors": {
462462
"robot_not_found": "No se pudieron encontrar los detalles del robot. Inténtelo de nuevo."
463+
},
464+
"buttons": {
465+
"close": "Cerrar"
463466
}
464467
},
465468
"robot_edit": {

public/locales/ja.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,9 @@
442442
"created_at": "作成日時",
443443
"errors": {
444444
"robot_not_found": "ロボットの詳細が見つかりませんでした。もう一度試してください。"
445+
},
446+
"buttons": {
447+
"close": "閉じる"
445448
}
446449
},
447450
"robot_edit": {

public/locales/tr.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,9 @@
442442
"created_at": "Oluşturulma",
443443
"errors": {
444444
"robot_not_found": "Robot bulunamadı. Tekrar deneyin."
445+
},
446+
"buttons": {
447+
"close": "Kapat"
445448
}
446449
},
447450
"robot_edit": {

public/locales/zh.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,9 @@
442442
"created_at": "机器人创建时间",
443443
"errors": {
444444
"robot_not_found": "无法找到机器人详细信息。请重试。"
445+
},
446+
"buttons": {
447+
"close": "关闭"
445448
}
446449
},
447450
"robot_edit": {

0 commit comments

Comments
 (0)