mx-cloud 0.0.8 → 0.0.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.
@@ -40,6 +40,7 @@ interface InterpreterOptions {
40
40
  activeId: (id: number) => void;
41
41
  debugMessage: (msg: string) => void;
42
42
  setActionType: (type: string) => void;
43
+ incrementScrapeListIndex: () => void;
43
44
  }>;
44
45
  }
45
46
  /**
@@ -402,7 +402,7 @@ class Interpreter extends events_1.EventEmitter {
402
402
  yield this.options.serializableCallback([mergedResult]);
403
403
  }),
404
404
  scrapeList: (config) => __awaiter(this, void 0, void 0, function* () {
405
- var _a;
405
+ var _a, _b;
406
406
  if ((_a = this.options.debugChannel) === null || _a === void 0 ? void 0 : _a.setActionType) {
407
407
  this.options.debugChannel.setActionType('scrapeList');
408
408
  }
@@ -411,6 +411,9 @@ class Interpreter extends events_1.EventEmitter {
411
411
  return;
412
412
  }
413
413
  yield this.ensureScriptsLoaded(page);
414
+ if ((_b = this.options.debugChannel) === null || _b === void 0 ? void 0 : _b.incrementScrapeListIndex) {
415
+ this.options.debugChannel.incrementScrapeListIndex();
416
+ }
414
417
  if (!config.pagination) {
415
418
  const scrapeResults = yield page.evaluate((cfg) => window.scrapeList(cfg), config);
416
419
  yield this.options.serializableCallback(scrapeResults);
@@ -547,6 +550,7 @@ class Interpreter extends events_1.EventEmitter {
547
550
  });
548
551
  allResults = allResults.concat(newResults);
549
552
  debugLog("Results collected:", allResults.length);
553
+ yield this.options.serializableCallback(allResults);
550
554
  });
551
555
  const checkLimit = () => {
552
556
  if (config.limit && allResults.length >= config.limit) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mx-cloud",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "description": "mx cloud",
5
5
  "main": "build/index.js",
6
6
  "typings": "build/index.d.ts",