mx-cloud 0.0.7 → 0.0.8

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.
@@ -318,6 +318,7 @@ class Interpreter extends events_1.EventEmitter {
318
318
  */
319
319
  carryOutSteps(page, steps) {
320
320
  return __awaiter(this, void 0, void 0, function* () {
321
+ var _a;
321
322
  /**
322
323
  * Defines overloaded (or added) methods/actions usable in the workflow.
323
324
  * If a method overloads any existing method of the Page class, it accepts the same set
@@ -410,14 +411,14 @@ class Interpreter extends events_1.EventEmitter {
410
411
  return;
411
412
  }
412
413
  yield this.ensureScriptsLoaded(page);
413
- let scrapeResults = [];
414
414
  if (!config.pagination) {
415
- scrapeResults = yield page.evaluate((cfg) => window.scrapeList(cfg), config);
415
+ const scrapeResults = yield page.evaluate((cfg) => window.scrapeList(cfg), config);
416
+ yield this.options.serializableCallback(scrapeResults);
416
417
  }
417
418
  else {
418
- scrapeResults = yield this.handlePagination(page, config);
419
+ const scrapeResults = yield this.handlePagination(page, config);
420
+ yield this.options.serializableCallback(scrapeResults);
419
421
  }
420
- yield this.options.serializableCallback(scrapeResults);
421
422
  }),
422
423
  scrapeListAuto: (config) => __awaiter(this, void 0, void 0, function* () {
423
424
  var _a;
@@ -484,6 +485,9 @@ class Interpreter extends events_1.EventEmitter {
484
485
  yield wawActions[step.action](...(params !== null && params !== void 0 ? params : []));
485
486
  }
486
487
  else {
488
+ if ((_a = this.options.debugChannel) === null || _a === void 0 ? void 0 : _a.setActionType) {
489
+ this.options.debugChannel.setActionType(String(step.action));
490
+ }
487
491
  // Implements the dot notation for the "method name" in the workflow
488
492
  const levels = String(step.action).split('.');
489
493
  const methodName = levels[levels.length - 1];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mx-cloud",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "description": "mx cloud",
5
5
  "main": "build/index.js",
6
6
  "typings": "build/index.d.ts",