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.
- package/build/interpret.d.ts +1 -0
- package/build/interpret.js +5 -1
- package/package.json +1 -1
package/build/interpret.d.ts
CHANGED
package/build/interpret.js
CHANGED
|
@@ -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) {
|