@promptbook/node 0.75.3 → 0.75.5

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/esm/index.es.js CHANGED
@@ -26,7 +26,7 @@ var BOOK_LANGUAGE_VERSION = '1.0.0';
26
26
  *
27
27
  * @see https://github.com/webgptorg/promptbook
28
28
  */
29
- var PROMPTBOOK_ENGINE_VERSION = '0.75.2';
29
+ var PROMPTBOOK_ENGINE_VERSION = '0.75.4';
30
30
  /**
31
31
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
32
32
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -2009,6 +2009,42 @@ function createCollectionFromJson() {
2009
2009
  return new (SimplePipelineCollection.bind.apply(SimplePipelineCollection, __spreadArray([void 0], __read(promptbooks), false)))();
2010
2010
  }
2011
2011
 
2012
+ /**
2013
+ * This error indicates problems parsing the format value
2014
+ *
2015
+ * For example, when the format value is not a valid JSON or CSV
2016
+ * This is not thrown directly but in extended classes
2017
+ *
2018
+ * @public exported from `@promptbook/core`
2019
+ */
2020
+ var AbstractFormatError = /** @class */ (function (_super) {
2021
+ __extends(AbstractFormatError, _super);
2022
+ // Note: To allow instanceof do not put here error `name`
2023
+ // public readonly name = 'AbstractFormatError';
2024
+ function AbstractFormatError(message) {
2025
+ var _this = _super.call(this, message) || this;
2026
+ Object.setPrototypeOf(_this, AbstractFormatError.prototype);
2027
+ return _this;
2028
+ }
2029
+ return AbstractFormatError;
2030
+ }(Error));
2031
+
2032
+ /**
2033
+ * This error indicates problem with parsing of CSV
2034
+ *
2035
+ * @public exported from `@promptbook/core`
2036
+ */
2037
+ var CsvFormatError = /** @class */ (function (_super) {
2038
+ __extends(CsvFormatError, _super);
2039
+ function CsvFormatError(message) {
2040
+ var _this = _super.call(this, message) || this;
2041
+ _this.name = 'CsvFormatError';
2042
+ Object.setPrototypeOf(_this, CsvFormatError.prototype);
2043
+ return _this;
2044
+ }
2045
+ return CsvFormatError;
2046
+ }(AbstractFormatError));
2047
+
2012
2048
  /**
2013
2049
  * This error indicates that the pipeline collection cannot be propperly loaded
2014
2050
  *
@@ -2060,6 +2096,22 @@ var ExpectError = /** @class */ (function (_super) {
2060
2096
  return ExpectError;
2061
2097
  }(Error));
2062
2098
 
2099
+ /**
2100
+ * This error indicates that the promptbook can not retrieve knowledge from external sources
2101
+ *
2102
+ * @public exported from `@promptbook/core`
2103
+ */
2104
+ var KnowledgeScrapeError = /** @class */ (function (_super) {
2105
+ __extends(KnowledgeScrapeError, _super);
2106
+ function KnowledgeScrapeError(message) {
2107
+ var _this = _super.call(this, message) || this;
2108
+ _this.name = 'KnowledgeScrapeError';
2109
+ Object.setPrototypeOf(_this, KnowledgeScrapeError.prototype);
2110
+ return _this;
2111
+ }
2112
+ return KnowledgeScrapeError;
2113
+ }(Error));
2114
+
2063
2115
  /**
2064
2116
  * This error type indicates that some limit was reached
2065
2117
  *
@@ -2098,10 +2150,14 @@ var NotYetImplementedError = /** @class */ (function (_super) {
2098
2150
  * @public exported from `@promptbook/core`
2099
2151
  */
2100
2152
  var ERRORS = {
2101
- ExpectError: ExpectError,
2153
+ AbstractFormatError: AbstractFormatError,
2154
+ CsvFormatError: CsvFormatError,
2102
2155
  CollectionError: CollectionError,
2103
2156
  EnvironmentMismatchError: EnvironmentMismatchError,
2157
+ ExpectError: ExpectError,
2158
+ KnowledgeScrapeError: KnowledgeScrapeError,
2104
2159
  LimitReachedError: LimitReachedError,
2160
+ MissingToolsError: MissingToolsError,
2105
2161
  NotFoundError: NotFoundError,
2106
2162
  NotYetImplementedError: NotYetImplementedError,
2107
2163
  ParseError: ParseError,
@@ -2414,42 +2470,6 @@ function union() {
2414
2470
  return union;
2415
2471
  }
2416
2472
 
2417
- /**
2418
- * This error indicates problems parsing the format value
2419
- *
2420
- * For example, when the format value is not a valid JSON or CSV
2421
- * This is not thrown directly but in extended classes
2422
- *
2423
- * @public exported from `@promptbook/core`
2424
- */
2425
- var AbstractFormatError = /** @class */ (function (_super) {
2426
- __extends(AbstractFormatError, _super);
2427
- // Note: To allow instanceof do not put here error `name`
2428
- // public readonly name = 'AbstractFormatError';
2429
- function AbstractFormatError(message) {
2430
- var _this = _super.call(this, message) || this;
2431
- Object.setPrototypeOf(_this, AbstractFormatError.prototype);
2432
- return _this;
2433
- }
2434
- return AbstractFormatError;
2435
- }(Error));
2436
-
2437
- /**
2438
- * This error indicates problem with parsing of CSV
2439
- *
2440
- * @public exported from `@promptbook/core`
2441
- */
2442
- var CsvFormatError = /** @class */ (function (_super) {
2443
- __extends(CsvFormatError, _super);
2444
- function CsvFormatError(message) {
2445
- var _this = _super.call(this, message) || this;
2446
- _this.name = 'CsvFormatError';
2447
- Object.setPrototypeOf(_this, CsvFormatError.prototype);
2448
- return _this;
2449
- }
2450
- return CsvFormatError;
2451
- }(AbstractFormatError));
2452
-
2453
2473
  /**
2454
2474
  * @@@
2455
2475
  *
@@ -2490,7 +2510,7 @@ var CsvFormatDefinition = {
2490
2510
  case 0:
2491
2511
  csv = parse(value, __assign(__assign({}, settings), MANDATORY_CSV_SETTINGS));
2492
2512
  if (csv.errors.length !== 0) {
2493
- throw new CsvFormatError(spaceTrim$1(function (block) { return "\n CSV parsing error\n\n ".concat(block(csv.errors.map(function (error) { return error.message; }).join('\n\n')), "\n "); }));
2513
+ throw new CsvFormatError(spaceTrim$1(function (block) { return "\n CSV parsing error\n\n Error(s) from CSV parsing:\n ".concat(block(csv.errors.map(function (error) { return error.message; }).join('\n\n')), "\n\n The CSV data:\n ").concat(block(value), "\n "); }));
2494
2514
  }
2495
2515
  return [4 /*yield*/, Promise.all(csv.data.map(function (row, index) { return __awaiter(_this, void 0, void 0, function () {
2496
2516
  var _a, _b;
@@ -2528,7 +2548,7 @@ var CsvFormatDefinition = {
2528
2548
  case 0:
2529
2549
  csv = parse(value, __assign(__assign({}, settings), MANDATORY_CSV_SETTINGS));
2530
2550
  if (csv.errors.length !== 0) {
2531
- throw new CsvFormatError(spaceTrim$1(function (block) { return "\n CSV parsing error\n\n ".concat(block(csv.errors.map(function (error) { return error.message; }).join('\n\n')), "\n "); }));
2551
+ throw new CsvFormatError(spaceTrim$1(function (block) { return "\n CSV parsing error\n\n Error(s) from CSV parsing:\n ".concat(block(csv.errors.map(function (error) { return error.message; }).join('\n\n')), "\n\n The CSV data:\n ").concat(block(value), "\n "); }));
2532
2552
  }
2533
2553
  return [4 /*yield*/, Promise.all(csv.data.map(function (row, rowIndex) { return __awaiter(_this, void 0, void 0, function () {
2534
2554
  var _this = this;
@@ -4566,22 +4586,6 @@ function preparePersona(personaDescription, tools, options) {
4566
4586
  * TODO: [🏢] !! Check validity of `temperature` in pipeline
4567
4587
  */
4568
4588
 
4569
- /**
4570
- * This error indicates that the promptbook can not retrieve knowledge from external sources
4571
- *
4572
- * @public exported from `@promptbook/core`
4573
- */
4574
- var KnowledgeScrapeError = /** @class */ (function (_super) {
4575
- __extends(KnowledgeScrapeError, _super);
4576
- function KnowledgeScrapeError(message) {
4577
- var _this = _super.call(this, message) || this;
4578
- _this.name = 'KnowledgeScrapeError';
4579
- Object.setPrototypeOf(_this, KnowledgeScrapeError.prototype);
4580
- return _this;
4581
- }
4582
- return KnowledgeScrapeError;
4583
- }(Error));
4584
-
4585
4589
  /**
4586
4590
  * @@@
4587
4591
  *
@@ -4752,8 +4756,8 @@ var $scrapersRegister = new $Register('scraper_constructors');
4752
4756
  *
4753
4757
  * @private internal function of `createScrapersFromConfiguration` and `createScrapersFromEnv`
4754
4758
  */
4755
- function $registeredScrapersMessage() {
4756
- var e_1, _a, e_2, _b;
4759
+ function $registeredScrapersMessage(availableScrapers) {
4760
+ var e_1, _a, e_2, _b, e_3, _c;
4757
4761
  /**
4758
4762
  * Mixes registered scrapers from $scrapersMetadataRegister and $scrapersRegister
4759
4763
  */
@@ -4765,15 +4769,15 @@ function $registeredScrapersMessage() {
4765
4769
  all.push({ packageName: packageName, className: className, mimeTypes: mimeTypes, documentationUrl: documentationUrl, isAvilableInBrowser: isAvilableInBrowser });
4766
4770
  };
4767
4771
  try {
4768
- for (var _c = __values($scrapersMetadataRegister.list()), _d = _c.next(); !_d.done; _d = _c.next()) {
4769
- var _e = _d.value, packageName = _e.packageName, className = _e.className, mimeTypes = _e.mimeTypes, documentationUrl = _e.documentationUrl, isAvilableInBrowser = _e.isAvilableInBrowser;
4772
+ for (var _d = __values($scrapersMetadataRegister.list()), _e = _d.next(); !_e.done; _e = _d.next()) {
4773
+ var _f = _e.value, packageName = _f.packageName, className = _f.className, mimeTypes = _f.mimeTypes, documentationUrl = _f.documentationUrl, isAvilableInBrowser = _f.isAvilableInBrowser;
4770
4774
  _loop_1(packageName, className, mimeTypes, documentationUrl, isAvilableInBrowser);
4771
4775
  }
4772
4776
  }
4773
4777
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
4774
4778
  finally {
4775
4779
  try {
4776
- if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
4780
+ if (_e && !_e.done && (_a = _d.return)) _a.call(_d);
4777
4781
  }
4778
4782
  finally { if (e_1) throw e_1.error; }
4779
4783
  }
@@ -4784,18 +4788,31 @@ function $registeredScrapersMessage() {
4784
4788
  all.push({ packageName: packageName, className: className, mimeTypes: mimeTypes, documentationUrl: documentationUrl, isAvilableInBrowser: isAvilableInBrowser });
4785
4789
  };
4786
4790
  try {
4787
- for (var _f = __values($scrapersRegister.list()), _g = _f.next(); !_g.done; _g = _f.next()) {
4788
- var _h = _g.value, packageName = _h.packageName, className = _h.className, mimeTypes = _h.mimeTypes, documentationUrl = _h.documentationUrl, isAvilableInBrowser = _h.isAvilableInBrowser;
4791
+ for (var _g = __values($scrapersRegister.list()), _h = _g.next(); !_h.done; _h = _g.next()) {
4792
+ var _j = _h.value, packageName = _j.packageName, className = _j.className, mimeTypes = _j.mimeTypes, documentationUrl = _j.documentationUrl, isAvilableInBrowser = _j.isAvilableInBrowser;
4789
4793
  _loop_2(packageName, className, mimeTypes, documentationUrl, isAvilableInBrowser);
4790
4794
  }
4791
4795
  }
4792
4796
  catch (e_2_1) { e_2 = { error: e_2_1 }; }
4793
4797
  finally {
4794
4798
  try {
4795
- if (_g && !_g.done && (_b = _f.return)) _b.call(_f);
4799
+ if (_h && !_h.done && (_b = _g.return)) _b.call(_g);
4796
4800
  }
4797
4801
  finally { if (e_2) throw e_2.error; }
4798
4802
  }
4803
+ try {
4804
+ for (var availableScrapers_1 = __values(availableScrapers), availableScrapers_1_1 = availableScrapers_1.next(); !availableScrapers_1_1.done; availableScrapers_1_1 = availableScrapers_1.next()) {
4805
+ var metadata_1 = availableScrapers_1_1.value.metadata;
4806
+ all.push(metadata_1);
4807
+ }
4808
+ }
4809
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
4810
+ finally {
4811
+ try {
4812
+ if (availableScrapers_1_1 && !availableScrapers_1_1.done && (_c = availableScrapers_1.return)) _c.call(availableScrapers_1);
4813
+ }
4814
+ finally { if (e_3) throw e_3.error; }
4815
+ }
4799
4816
  var metadata = all.map(function (metadata) {
4800
4817
  var isMetadataAviailable = $scrapersMetadataRegister
4801
4818
  .list()
@@ -4809,42 +4826,44 @@ function $registeredScrapersMessage() {
4809
4826
  var packageName = _a.packageName, className = _a.className;
4810
4827
  return metadata.packageName === packageName && metadata.className === className;
4811
4828
  });
4812
- return __assign(__assign({}, metadata), { isMetadataAviailable: isMetadataAviailable, isInstalled: isInstalled });
4829
+ var isAvilableInTools = availableScrapers.some(function (_a) {
4830
+ var _b = _a.metadata, packageName = _b.packageName, className = _b.className;
4831
+ return metadata.packageName === packageName && metadata.className === className;
4832
+ });
4833
+ return __assign(__assign({}, metadata), { isMetadataAviailable: isMetadataAviailable, isInstalled: isInstalled, isAvilableInTools: isAvilableInTools });
4813
4834
  });
4814
4835
  if (metadata.length === 0) {
4815
- return "No scrapers are available";
4836
+ return spaceTrim$1("\n **No scrapers are available**\n\n This is a unexpected behavior, you are probably using some broken version of Promptbook\n At least there should be available the metadata of the scrapers\n ");
4816
4837
  }
4817
4838
  return spaceTrim$1(function (block) { return "\n Available scrapers are:\n ".concat(block(metadata
4818
4839
  .map(function (_a, i) {
4819
- var packageName = _a.packageName, className = _a.className, isMetadataAviailable = _a.isMetadataAviailable, isInstalled = _a.isInstalled, mimeTypes = _a.mimeTypes, isAvilableInBrowser = _a.isAvilableInBrowser;
4820
- var more;
4821
- // TODO: Use documentationUrl
4822
- if (just(false)) {
4823
- more = '';
4824
- }
4825
- else if (!isMetadataAviailable && !isInstalled) {
4826
- // TODO: [�][�] Maybe do allow to do auto-install if package not registered and not found
4827
- more = "*(not installed and no metadata, looks like a unexpected behavior)*";
4828
- }
4829
- else if (isMetadataAviailable && !isInstalled) {
4830
- // TODO: [�][�]
4831
- more = "*(not installed)*";
4832
- }
4833
- else if (!isMetadataAviailable && isInstalled) {
4834
- more = "*(no metadata, looks like a unexpected behavior)*";
4835
- }
4836
- else if (isMetadataAviailable && isInstalled) {
4837
- more = "(installed)";
4838
- }
4839
- else {
4840
- more = "*(unknown state, looks like a unexpected behavior)*";
4841
- }
4840
+ var packageName = _a.packageName, className = _a.className, isMetadataAviailable = _a.isMetadataAviailable, isInstalled = _a.isInstalled, mimeTypes = _a.mimeTypes, isAvilableInBrowser = _a.isAvilableInBrowser, isAvilableInTools = _a.isAvilableInTools;
4841
+ var more = [];
4842
+ // TODO: [🧠] Maybe use `documentationUrl`
4843
+ if (isMetadataAviailable) {
4844
+ more.push("\u2B1C Metadata registered");
4845
+ } // not else
4846
+ if (isInstalled) {
4847
+ more.push("\uD83D\uDFE9 Installed");
4848
+ } // not else
4849
+ if (isAvilableInTools) {
4850
+ more.push("\uD83D\uDFE6 Available in tools");
4851
+ } // not else
4852
+ if (!isMetadataAviailable && isInstalled) {
4853
+ more.push("When no metadata registered but scraper is installed, it is an unexpected behavior");
4854
+ } // not else
4855
+ if (!isInstalled && isAvilableInTools) {
4856
+ more.push("When the scraper is not installed but available in tools, it is an unexpected compatibility behavior");
4857
+ } // not else
4842
4858
  if (!isAvilableInBrowser) {
4843
- more += " *(not available in browser)*";
4859
+ more.push("Not usable in browser");
4844
4860
  }
4845
- return "".concat(i + 1, ") `").concat(className, "` from `").concat(packageName, "` compatible to scrape ").concat(mimeTypes.join(', '), " ").concat(more);
4861
+ var moreText = more.length === 0 ? '' : " *(".concat(more.join('; '), ")*");
4862
+ return "".concat(i + 1, ") `").concat(className, "` from `").concat(packageName, "` compatible to scrape ").concat(mimeTypes
4863
+ .map(function (mimeType) { return "\"".concat(mimeType, "\""); })
4864
+ .join(', ')).concat(moreText);
4846
4865
  })
4847
- .join('\n')), "\n "); });
4866
+ .join('\n')), "\n\n Legend:\n - \u2B1C **Metadata registered** means that Promptbook knows about the scraper, it is similar to registration in some registry\n - \uD83D\uDFE9 **Installed** means that you have imported package with particular scraper\n - \uD83D\uDFE6 **Available in tools** means that you have passed scraper as dependency into prepare or execution process\n\n "); });
4848
4867
  }
4849
4868
  /**
4850
4869
  * TODO: [®] DRY Register logic
@@ -5180,57 +5199,75 @@ function prepareKnowledgePieces(knowledgeSources, tools, options) {
5180
5199
  _a = options.maxParallelCount, maxParallelCount = _a === void 0 ? DEFAULT_MAX_PARALLEL_COUNT : _a, rootDirname = options.rootDirname, _b = options.isVerbose, isVerbose = _b === void 0 ? DEFAULT_IS_VERBOSE : _b;
5181
5200
  knowledgePreparedUnflatten = new Array(knowledgeSources.length);
5182
5201
  return [4 /*yield*/, forEachAsync(knowledgeSources, { maxParallelCount: maxParallelCount }, function (knowledgeSource, index) { return __awaiter(_this, void 0, void 0, function () {
5183
- var partialPieces, sourceHandler, _a, _b, scraper, partialPiecesUnchecked, e_1_1, pieces;
5184
- var e_1, _c;
5185
- return __generator(this, function (_d) {
5186
- switch (_d.label) {
5202
+ var partialPieces, sourceHandler, scrapers, _loop_1, scrapers_1, scrapers_1_1, scraper, state_1, e_1_1, pieces;
5203
+ var e_1, _a;
5204
+ return __generator(this, function (_b) {
5205
+ switch (_b.label) {
5187
5206
  case 0:
5188
5207
  partialPieces = null;
5189
5208
  return [4 /*yield*/, makeKnowledgeSourceHandler(knowledgeSource, tools, { rootDirname: rootDirname, isVerbose: isVerbose })];
5190
5209
  case 1:
5191
- sourceHandler = _d.sent();
5192
- _d.label = 2;
5210
+ sourceHandler = _b.sent();
5211
+ scrapers = arrayableToArray(tools.scrapers);
5212
+ _loop_1 = function (scraper) {
5213
+ var partialPiecesUnchecked;
5214
+ return __generator(this, function (_c) {
5215
+ switch (_c.label) {
5216
+ case 0:
5217
+ if (!scraper.metadata.mimeTypes.includes(sourceHandler.mimeType)
5218
+ // <- TODO: [🦔] Implement mime-type wildcards
5219
+ ) {
5220
+ return [2 /*return*/, "continue"];
5221
+ }
5222
+ return [4 /*yield*/, scraper.scrape(sourceHandler)];
5223
+ case 1:
5224
+ partialPiecesUnchecked = _c.sent();
5225
+ if (partialPiecesUnchecked !== null) {
5226
+ partialPieces = __spreadArray([], __read(partialPiecesUnchecked), false);
5227
+ return [2 /*return*/, "break"];
5228
+ }
5229
+ console.warn(spaceTrim$1(function (block) { return "\n Cannot scrape knowledge from source despite the scraper `".concat(scraper.metadata.className, "` supports the mime type \"").concat(sourceHandler.mimeType, "\".\n \n The source:\n > ").concat(block(knowledgeSource.sourceContent
5230
+ .split('\n')
5231
+ .map(function (line) { return "> ".concat(line); })
5232
+ .join('\n')), "\n\n ").concat(block($registeredScrapersMessage(scrapers)), "\n\n\n "); }));
5233
+ return [2 /*return*/];
5234
+ }
5235
+ });
5236
+ };
5237
+ _b.label = 2;
5193
5238
  case 2:
5194
- _d.trys.push([2, 7, 8, 9]);
5195
- _a = __values(arrayableToArray(tools.scrapers)), _b = _a.next();
5196
- _d.label = 3;
5239
+ _b.trys.push([2, 7, 8, 9]);
5240
+ scrapers_1 = __values(scrapers), scrapers_1_1 = scrapers_1.next();
5241
+ _b.label = 3;
5197
5242
  case 3:
5198
- if (!!_b.done) return [3 /*break*/, 6];
5199
- scraper = _b.value;
5200
- if (!scraper.metadata.mimeTypes.includes(sourceHandler.mimeType)
5201
- // <- TODO: [🦔] Implement mime-type wildcards
5202
- ) {
5203
- return [3 /*break*/, 5];
5204
- }
5205
- return [4 /*yield*/, scraper.scrape(sourceHandler)];
5243
+ if (!!scrapers_1_1.done) return [3 /*break*/, 6];
5244
+ scraper = scrapers_1_1.value;
5245
+ return [5 /*yield**/, _loop_1(scraper)];
5206
5246
  case 4:
5207
- partialPiecesUnchecked = _d.sent();
5208
- if (partialPiecesUnchecked !== null) {
5209
- partialPieces = __spreadArray([], __read(partialPiecesUnchecked), false);
5210
- // <- TODO: [🪓] Here should be no need for spreading new array, just `partialPieces = partialPiecesUnchecked`
5247
+ state_1 = _b.sent();
5248
+ if (state_1 === "break")
5211
5249
  return [3 /*break*/, 6];
5212
- }
5213
- _d.label = 5;
5250
+ _b.label = 5;
5214
5251
  case 5:
5215
- _b = _a.next();
5252
+ scrapers_1_1 = scrapers_1.next();
5216
5253
  return [3 /*break*/, 3];
5217
5254
  case 6: return [3 /*break*/, 9];
5218
5255
  case 7:
5219
- e_1_1 = _d.sent();
5256
+ e_1_1 = _b.sent();
5220
5257
  e_1 = { error: e_1_1 };
5221
5258
  return [3 /*break*/, 9];
5222
5259
  case 8:
5223
5260
  try {
5224
- if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
5261
+ if (scrapers_1_1 && !scrapers_1_1.done && (_a = scrapers_1.return)) _a.call(scrapers_1);
5225
5262
  }
5226
5263
  finally { if (e_1) throw e_1.error; }
5227
5264
  return [7 /*endfinally*/];
5228
5265
  case 9:
5229
5266
  if (partialPieces === null) {
5230
- throw new KnowledgeScrapeError(spaceTrim$1(function (block) { return "\n Cannot scrape knowledge from source:\n \n > ".concat(block(knowledgeSource.sourceContent
5267
+ throw new KnowledgeScrapeError(spaceTrim$1(function (block) { return "\n Cannot scrape knowledge\n \n The source:\n > ".concat(block(knowledgeSource.sourceContent
5231
5268
  .split('\n')
5232
5269
  .map(function (line) { return "> ".concat(line); })
5233
- .join('\n')), "\n\n No scraper found for the mime type \"").concat(sourceHandler.mimeType, "\"\n\n ").concat(block($registeredScrapersMessage()), "\n\n\n "); }));
5270
+ .join('\n')), "\n\n No scraper found for the mime type \"").concat(sourceHandler.mimeType, "\"\n\n ").concat(block($registeredScrapersMessage(scrapers)), "\n\n\n "); }));
5234
5271
  }
5235
5272
  pieces = partialPieces.map(function (partialPiece) { return (__assign(__assign({}, partialPiece), { sources: [
5236
5273
  {