@skrillex1224/android-toolkit 0.1.8 → 0.1.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skrillex1224/android-toolkit",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -93,7 +93,12 @@ export async function runScript(ctx, source, options = {}) {
93
93
  maxLines: Number(options.maxLines || 1200),
94
94
  outputPath: options.outputPath || ''
95
95
  });
96
- await recorder.waitForExit(Number(options.timeoutMs || 10000));
96
+ let waitError = null;
97
+ try {
98
+ await recorder.waitForEvent((event) => event?.type !== 'parse_error', Number(options.timeoutMs || 10000));
99
+ } catch (error) {
100
+ waitError = error;
101
+ }
97
102
  const result = await recorder.stop();
98
103
  const scriptEvents = result.events.filter((event) => event?.type !== 'parse_error');
99
104
  if (scriptEvents.length === 0) {
@@ -102,6 +107,7 @@ export async function runScript(ctx, source, options = {}) {
102
107
  duration: Logger.duration(startedAt),
103
108
  lineCount: result.lines.length
104
109
  });
110
+ if (waitError) throw waitError;
105
111
  throw new CrawlerError({
106
112
  message: `frida_script_failed: ${label} did not emit ${marker.trim()}`,
107
113
  code: Code.FridaUnavailable,