@promptbook/pdf 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
@@ -20,7 +20,7 @@ var BOOK_LANGUAGE_VERSION = '1.0.0';
20
20
  *
21
21
  * @see https://github.com/webgptorg/promptbook
22
22
  */
23
- var PROMPTBOOK_ENGINE_VERSION = '0.75.2';
23
+ var PROMPTBOOK_ENGINE_VERSION = '0.75.4';
24
24
  /**
25
25
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
26
26
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -1797,6 +1797,42 @@ var PipelineExecutionError = /** @class */ (function (_super) {
1797
1797
  return PipelineExecutionError;
1798
1798
  }(Error));
1799
1799
 
1800
+ /**
1801
+ * This error indicates problems parsing the format value
1802
+ *
1803
+ * For example, when the format value is not a valid JSON or CSV
1804
+ * This is not thrown directly but in extended classes
1805
+ *
1806
+ * @public exported from `@promptbook/core`
1807
+ */
1808
+ var AbstractFormatError = /** @class */ (function (_super) {
1809
+ __extends(AbstractFormatError, _super);
1810
+ // Note: To allow instanceof do not put here error `name`
1811
+ // public readonly name = 'AbstractFormatError';
1812
+ function AbstractFormatError(message) {
1813
+ var _this = _super.call(this, message) || this;
1814
+ Object.setPrototypeOf(_this, AbstractFormatError.prototype);
1815
+ return _this;
1816
+ }
1817
+ return AbstractFormatError;
1818
+ }(Error));
1819
+
1820
+ /**
1821
+ * This error indicates problem with parsing of CSV
1822
+ *
1823
+ * @public exported from `@promptbook/core`
1824
+ */
1825
+ var CsvFormatError = /** @class */ (function (_super) {
1826
+ __extends(CsvFormatError, _super);
1827
+ function CsvFormatError(message) {
1828
+ var _this = _super.call(this, message) || this;
1829
+ _this.name = 'CsvFormatError';
1830
+ Object.setPrototypeOf(_this, CsvFormatError.prototype);
1831
+ return _this;
1832
+ }
1833
+ return CsvFormatError;
1834
+ }(AbstractFormatError));
1835
+
1800
1836
  /**
1801
1837
  * This error indicates that the pipeline collection cannot be propperly loaded
1802
1838
  *
@@ -1848,6 +1884,22 @@ var ExpectError = /** @class */ (function (_super) {
1848
1884
  return ExpectError;
1849
1885
  }(Error));
1850
1886
 
1887
+ /**
1888
+ * This error indicates that the promptbook can not retrieve knowledge from external sources
1889
+ *
1890
+ * @public exported from `@promptbook/core`
1891
+ */
1892
+ var KnowledgeScrapeError = /** @class */ (function (_super) {
1893
+ __extends(KnowledgeScrapeError, _super);
1894
+ function KnowledgeScrapeError(message) {
1895
+ var _this = _super.call(this, message) || this;
1896
+ _this.name = 'KnowledgeScrapeError';
1897
+ Object.setPrototypeOf(_this, KnowledgeScrapeError.prototype);
1898
+ return _this;
1899
+ }
1900
+ return KnowledgeScrapeError;
1901
+ }(Error));
1902
+
1851
1903
  /**
1852
1904
  * This error type indicates that some limit was reached
1853
1905
  *
@@ -1870,10 +1922,14 @@ var LimitReachedError = /** @class */ (function (_super) {
1870
1922
  * @public exported from `@promptbook/core`
1871
1923
  */
1872
1924
  var ERRORS = {
1873
- ExpectError: ExpectError,
1925
+ AbstractFormatError: AbstractFormatError,
1926
+ CsvFormatError: CsvFormatError,
1874
1927
  CollectionError: CollectionError,
1875
1928
  EnvironmentMismatchError: EnvironmentMismatchError,
1929
+ ExpectError: ExpectError,
1930
+ KnowledgeScrapeError: KnowledgeScrapeError,
1876
1931
  LimitReachedError: LimitReachedError,
1932
+ MissingToolsError: MissingToolsError,
1877
1933
  NotFoundError: NotFoundError,
1878
1934
  NotYetImplementedError: NotYetImplementedError,
1879
1935
  ParseError: ParseError,
@@ -2674,22 +2730,6 @@ function preparePersona(personaDescription, tools, options) {
2674
2730
  * TODO: [🏢] !! Check validity of `temperature` in pipeline
2675
2731
  */
2676
2732
 
2677
- /**
2678
- * This error indicates that the promptbook can not retrieve knowledge from external sources
2679
- *
2680
- * @public exported from `@promptbook/core`
2681
- */
2682
- var KnowledgeScrapeError = /** @class */ (function (_super) {
2683
- __extends(KnowledgeScrapeError, _super);
2684
- function KnowledgeScrapeError(message) {
2685
- var _this = _super.call(this, message) || this;
2686
- _this.name = 'KnowledgeScrapeError';
2687
- Object.setPrototypeOf(_this, KnowledgeScrapeError.prototype);
2688
- return _this;
2689
- }
2690
- return KnowledgeScrapeError;
2691
- }(Error));
2692
-
2693
2733
  /**
2694
2734
  * @@@
2695
2735
  *
@@ -2860,8 +2900,8 @@ var $scrapersRegister = new $Register('scraper_constructors');
2860
2900
  *
2861
2901
  * @private internal function of `createScrapersFromConfiguration` and `createScrapersFromEnv`
2862
2902
  */
2863
- function $registeredScrapersMessage() {
2864
- var e_1, _a, e_2, _b;
2903
+ function $registeredScrapersMessage(availableScrapers) {
2904
+ var e_1, _a, e_2, _b, e_3, _c;
2865
2905
  /**
2866
2906
  * Mixes registered scrapers from $scrapersMetadataRegister and $scrapersRegister
2867
2907
  */
@@ -2873,15 +2913,15 @@ function $registeredScrapersMessage() {
2873
2913
  all.push({ packageName: packageName, className: className, mimeTypes: mimeTypes, documentationUrl: documentationUrl, isAvilableInBrowser: isAvilableInBrowser });
2874
2914
  };
2875
2915
  try {
2876
- for (var _c = __values($scrapersMetadataRegister.list()), _d = _c.next(); !_d.done; _d = _c.next()) {
2877
- var _e = _d.value, packageName = _e.packageName, className = _e.className, mimeTypes = _e.mimeTypes, documentationUrl = _e.documentationUrl, isAvilableInBrowser = _e.isAvilableInBrowser;
2916
+ for (var _d = __values($scrapersMetadataRegister.list()), _e = _d.next(); !_e.done; _e = _d.next()) {
2917
+ var _f = _e.value, packageName = _f.packageName, className = _f.className, mimeTypes = _f.mimeTypes, documentationUrl = _f.documentationUrl, isAvilableInBrowser = _f.isAvilableInBrowser;
2878
2918
  _loop_1(packageName, className, mimeTypes, documentationUrl, isAvilableInBrowser);
2879
2919
  }
2880
2920
  }
2881
2921
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
2882
2922
  finally {
2883
2923
  try {
2884
- if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
2924
+ if (_e && !_e.done && (_a = _d.return)) _a.call(_d);
2885
2925
  }
2886
2926
  finally { if (e_1) throw e_1.error; }
2887
2927
  }
@@ -2892,18 +2932,31 @@ function $registeredScrapersMessage() {
2892
2932
  all.push({ packageName: packageName, className: className, mimeTypes: mimeTypes, documentationUrl: documentationUrl, isAvilableInBrowser: isAvilableInBrowser });
2893
2933
  };
2894
2934
  try {
2895
- for (var _f = __values($scrapersRegister.list()), _g = _f.next(); !_g.done; _g = _f.next()) {
2896
- var _h = _g.value, packageName = _h.packageName, className = _h.className, mimeTypes = _h.mimeTypes, documentationUrl = _h.documentationUrl, isAvilableInBrowser = _h.isAvilableInBrowser;
2935
+ for (var _g = __values($scrapersRegister.list()), _h = _g.next(); !_h.done; _h = _g.next()) {
2936
+ var _j = _h.value, packageName = _j.packageName, className = _j.className, mimeTypes = _j.mimeTypes, documentationUrl = _j.documentationUrl, isAvilableInBrowser = _j.isAvilableInBrowser;
2897
2937
  _loop_2(packageName, className, mimeTypes, documentationUrl, isAvilableInBrowser);
2898
2938
  }
2899
2939
  }
2900
2940
  catch (e_2_1) { e_2 = { error: e_2_1 }; }
2901
2941
  finally {
2902
2942
  try {
2903
- if (_g && !_g.done && (_b = _f.return)) _b.call(_f);
2943
+ if (_h && !_h.done && (_b = _g.return)) _b.call(_g);
2904
2944
  }
2905
2945
  finally { if (e_2) throw e_2.error; }
2906
2946
  }
2947
+ try {
2948
+ for (var availableScrapers_1 = __values(availableScrapers), availableScrapers_1_1 = availableScrapers_1.next(); !availableScrapers_1_1.done; availableScrapers_1_1 = availableScrapers_1.next()) {
2949
+ var metadata_1 = availableScrapers_1_1.value.metadata;
2950
+ all.push(metadata_1);
2951
+ }
2952
+ }
2953
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
2954
+ finally {
2955
+ try {
2956
+ if (availableScrapers_1_1 && !availableScrapers_1_1.done && (_c = availableScrapers_1.return)) _c.call(availableScrapers_1);
2957
+ }
2958
+ finally { if (e_3) throw e_3.error; }
2959
+ }
2907
2960
  var metadata = all.map(function (metadata) {
2908
2961
  var isMetadataAviailable = $scrapersMetadataRegister
2909
2962
  .list()
@@ -2917,42 +2970,44 @@ function $registeredScrapersMessage() {
2917
2970
  var packageName = _a.packageName, className = _a.className;
2918
2971
  return metadata.packageName === packageName && metadata.className === className;
2919
2972
  });
2920
- return __assign(__assign({}, metadata), { isMetadataAviailable: isMetadataAviailable, isInstalled: isInstalled });
2973
+ var isAvilableInTools = availableScrapers.some(function (_a) {
2974
+ var _b = _a.metadata, packageName = _b.packageName, className = _b.className;
2975
+ return metadata.packageName === packageName && metadata.className === className;
2976
+ });
2977
+ return __assign(__assign({}, metadata), { isMetadataAviailable: isMetadataAviailable, isInstalled: isInstalled, isAvilableInTools: isAvilableInTools });
2921
2978
  });
2922
2979
  if (metadata.length === 0) {
2923
- return "No scrapers are available";
2980
+ 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 ");
2924
2981
  }
2925
2982
  return spaceTrim$1(function (block) { return "\n Available scrapers are:\n ".concat(block(metadata
2926
2983
  .map(function (_a, i) {
2927
- var packageName = _a.packageName, className = _a.className, isMetadataAviailable = _a.isMetadataAviailable, isInstalled = _a.isInstalled, mimeTypes = _a.mimeTypes, isAvilableInBrowser = _a.isAvilableInBrowser;
2928
- var more;
2929
- // TODO: Use documentationUrl
2930
- if (just(false)) {
2931
- more = '';
2932
- }
2933
- else if (!isMetadataAviailable && !isInstalled) {
2934
- // TODO: [�][�] Maybe do allow to do auto-install if package not registered and not found
2935
- more = "*(not installed and no metadata, looks like a unexpected behavior)*";
2936
- }
2937
- else if (isMetadataAviailable && !isInstalled) {
2938
- // TODO: [�][�]
2939
- more = "*(not installed)*";
2940
- }
2941
- else if (!isMetadataAviailable && isInstalled) {
2942
- more = "*(no metadata, looks like a unexpected behavior)*";
2943
- }
2944
- else if (isMetadataAviailable && isInstalled) {
2945
- more = "(installed)";
2946
- }
2947
- else {
2948
- more = "*(unknown state, looks like a unexpected behavior)*";
2949
- }
2984
+ var packageName = _a.packageName, className = _a.className, isMetadataAviailable = _a.isMetadataAviailable, isInstalled = _a.isInstalled, mimeTypes = _a.mimeTypes, isAvilableInBrowser = _a.isAvilableInBrowser, isAvilableInTools = _a.isAvilableInTools;
2985
+ var more = [];
2986
+ // TODO: [🧠] Maybe use `documentationUrl`
2987
+ if (isMetadataAviailable) {
2988
+ more.push("\u2B1C Metadata registered");
2989
+ } // not else
2990
+ if (isInstalled) {
2991
+ more.push("\uD83D\uDFE9 Installed");
2992
+ } // not else
2993
+ if (isAvilableInTools) {
2994
+ more.push("\uD83D\uDFE6 Available in tools");
2995
+ } // not else
2996
+ if (!isMetadataAviailable && isInstalled) {
2997
+ more.push("When no metadata registered but scraper is installed, it is an unexpected behavior");
2998
+ } // not else
2999
+ if (!isInstalled && isAvilableInTools) {
3000
+ more.push("When the scraper is not installed but available in tools, it is an unexpected compatibility behavior");
3001
+ } // not else
2950
3002
  if (!isAvilableInBrowser) {
2951
- more += " *(not available in browser)*";
3003
+ more.push("Not usable in browser");
2952
3004
  }
2953
- return "".concat(i + 1, ") `").concat(className, "` from `").concat(packageName, "` compatible to scrape ").concat(mimeTypes.join(', '), " ").concat(more);
3005
+ var moreText = more.length === 0 ? '' : " *(".concat(more.join('; '), ")*");
3006
+ return "".concat(i + 1, ") `").concat(className, "` from `").concat(packageName, "` compatible to scrape ").concat(mimeTypes
3007
+ .map(function (mimeType) { return "\"".concat(mimeType, "\""); })
3008
+ .join(', ')).concat(moreText);
2954
3009
  })
2955
- .join('\n')), "\n "); });
3010
+ .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 "); });
2956
3011
  }
2957
3012
  /**
2958
3013
  * TODO: [®] DRY Register logic
@@ -3200,57 +3255,75 @@ function prepareKnowledgePieces(knowledgeSources, tools, options) {
3200
3255
  _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;
3201
3256
  knowledgePreparedUnflatten = new Array(knowledgeSources.length);
3202
3257
  return [4 /*yield*/, forEachAsync(knowledgeSources, { maxParallelCount: maxParallelCount }, function (knowledgeSource, index) { return __awaiter(_this, void 0, void 0, function () {
3203
- var partialPieces, sourceHandler, _a, _b, scraper, partialPiecesUnchecked, e_1_1, pieces;
3204
- var e_1, _c;
3205
- return __generator(this, function (_d) {
3206
- switch (_d.label) {
3258
+ var partialPieces, sourceHandler, scrapers, _loop_1, scrapers_1, scrapers_1_1, scraper, state_1, e_1_1, pieces;
3259
+ var e_1, _a;
3260
+ return __generator(this, function (_b) {
3261
+ switch (_b.label) {
3207
3262
  case 0:
3208
3263
  partialPieces = null;
3209
3264
  return [4 /*yield*/, makeKnowledgeSourceHandler(knowledgeSource, tools, { rootDirname: rootDirname, isVerbose: isVerbose })];
3210
3265
  case 1:
3211
- sourceHandler = _d.sent();
3212
- _d.label = 2;
3266
+ sourceHandler = _b.sent();
3267
+ scrapers = arrayableToArray(tools.scrapers);
3268
+ _loop_1 = function (scraper) {
3269
+ var partialPiecesUnchecked;
3270
+ return __generator(this, function (_c) {
3271
+ switch (_c.label) {
3272
+ case 0:
3273
+ if (!scraper.metadata.mimeTypes.includes(sourceHandler.mimeType)
3274
+ // <- TODO: [🦔] Implement mime-type wildcards
3275
+ ) {
3276
+ return [2 /*return*/, "continue"];
3277
+ }
3278
+ return [4 /*yield*/, scraper.scrape(sourceHandler)];
3279
+ case 1:
3280
+ partialPiecesUnchecked = _c.sent();
3281
+ if (partialPiecesUnchecked !== null) {
3282
+ partialPieces = __spreadArray([], __read(partialPiecesUnchecked), false);
3283
+ return [2 /*return*/, "break"];
3284
+ }
3285
+ 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
3286
+ .split('\n')
3287
+ .map(function (line) { return "> ".concat(line); })
3288
+ .join('\n')), "\n\n ").concat(block($registeredScrapersMessage(scrapers)), "\n\n\n "); }));
3289
+ return [2 /*return*/];
3290
+ }
3291
+ });
3292
+ };
3293
+ _b.label = 2;
3213
3294
  case 2:
3214
- _d.trys.push([2, 7, 8, 9]);
3215
- _a = __values(arrayableToArray(tools.scrapers)), _b = _a.next();
3216
- _d.label = 3;
3295
+ _b.trys.push([2, 7, 8, 9]);
3296
+ scrapers_1 = __values(scrapers), scrapers_1_1 = scrapers_1.next();
3297
+ _b.label = 3;
3217
3298
  case 3:
3218
- if (!!_b.done) return [3 /*break*/, 6];
3219
- scraper = _b.value;
3220
- if (!scraper.metadata.mimeTypes.includes(sourceHandler.mimeType)
3221
- // <- TODO: [🦔] Implement mime-type wildcards
3222
- ) {
3223
- return [3 /*break*/, 5];
3224
- }
3225
- return [4 /*yield*/, scraper.scrape(sourceHandler)];
3299
+ if (!!scrapers_1_1.done) return [3 /*break*/, 6];
3300
+ scraper = scrapers_1_1.value;
3301
+ return [5 /*yield**/, _loop_1(scraper)];
3226
3302
  case 4:
3227
- partialPiecesUnchecked = _d.sent();
3228
- if (partialPiecesUnchecked !== null) {
3229
- partialPieces = __spreadArray([], __read(partialPiecesUnchecked), false);
3230
- // <- TODO: [🪓] Here should be no need for spreading new array, just `partialPieces = partialPiecesUnchecked`
3303
+ state_1 = _b.sent();
3304
+ if (state_1 === "break")
3231
3305
  return [3 /*break*/, 6];
3232
- }
3233
- _d.label = 5;
3306
+ _b.label = 5;
3234
3307
  case 5:
3235
- _b = _a.next();
3308
+ scrapers_1_1 = scrapers_1.next();
3236
3309
  return [3 /*break*/, 3];
3237
3310
  case 6: return [3 /*break*/, 9];
3238
3311
  case 7:
3239
- e_1_1 = _d.sent();
3312
+ e_1_1 = _b.sent();
3240
3313
  e_1 = { error: e_1_1 };
3241
3314
  return [3 /*break*/, 9];
3242
3315
  case 8:
3243
3316
  try {
3244
- if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
3317
+ if (scrapers_1_1 && !scrapers_1_1.done && (_a = scrapers_1.return)) _a.call(scrapers_1);
3245
3318
  }
3246
3319
  finally { if (e_1) throw e_1.error; }
3247
3320
  return [7 /*endfinally*/];
3248
3321
  case 9:
3249
3322
  if (partialPieces === null) {
3250
- throw new KnowledgeScrapeError(spaceTrim$1(function (block) { return "\n Cannot scrape knowledge from source:\n \n > ".concat(block(knowledgeSource.sourceContent
3323
+ throw new KnowledgeScrapeError(spaceTrim$1(function (block) { return "\n Cannot scrape knowledge\n \n The source:\n > ".concat(block(knowledgeSource.sourceContent
3251
3324
  .split('\n')
3252
3325
  .map(function (line) { return "> ".concat(line); })
3253
- .join('\n')), "\n\n No scraper found for the mime type \"").concat(sourceHandler.mimeType, "\"\n\n ").concat(block($registeredScrapersMessage()), "\n\n\n "); }));
3326
+ .join('\n')), "\n\n No scraper found for the mime type \"").concat(sourceHandler.mimeType, "\"\n\n ").concat(block($registeredScrapersMessage(scrapers)), "\n\n\n "); }));
3254
3327
  }
3255
3328
  pieces = partialPieces.map(function (partialPiece) { return (__assign(__assign({}, partialPiece), { sources: [
3256
3329
  {
@@ -3676,42 +3749,6 @@ function union() {
3676
3749
  return union;
3677
3750
  }
3678
3751
 
3679
- /**
3680
- * This error indicates problems parsing the format value
3681
- *
3682
- * For example, when the format value is not a valid JSON or CSV
3683
- * This is not thrown directly but in extended classes
3684
- *
3685
- * @public exported from `@promptbook/core`
3686
- */
3687
- var AbstractFormatError = /** @class */ (function (_super) {
3688
- __extends(AbstractFormatError, _super);
3689
- // Note: To allow instanceof do not put here error `name`
3690
- // public readonly name = 'AbstractFormatError';
3691
- function AbstractFormatError(message) {
3692
- var _this = _super.call(this, message) || this;
3693
- Object.setPrototypeOf(_this, AbstractFormatError.prototype);
3694
- return _this;
3695
- }
3696
- return AbstractFormatError;
3697
- }(Error));
3698
-
3699
- /**
3700
- * This error indicates problem with parsing of CSV
3701
- *
3702
- * @public exported from `@promptbook/core`
3703
- */
3704
- var CsvFormatError = /** @class */ (function (_super) {
3705
- __extends(CsvFormatError, _super);
3706
- function CsvFormatError(message) {
3707
- var _this = _super.call(this, message) || this;
3708
- _this.name = 'CsvFormatError';
3709
- Object.setPrototypeOf(_this, CsvFormatError.prototype);
3710
- return _this;
3711
- }
3712
- return CsvFormatError;
3713
- }(AbstractFormatError));
3714
-
3715
3752
  /**
3716
3753
  * @@@
3717
3754
  *
@@ -3752,7 +3789,7 @@ var CsvFormatDefinition = {
3752
3789
  case 0:
3753
3790
  csv = parse(value, __assign(__assign({}, settings), MANDATORY_CSV_SETTINGS));
3754
3791
  if (csv.errors.length !== 0) {
3755
- 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 "); }));
3792
+ 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 "); }));
3756
3793
  }
3757
3794
  return [4 /*yield*/, Promise.all(csv.data.map(function (row, index) { return __awaiter(_this, void 0, void 0, function () {
3758
3795
  var _a, _b;
@@ -3790,7 +3827,7 @@ var CsvFormatDefinition = {
3790
3827
  case 0:
3791
3828
  csv = parse(value, __assign(__assign({}, settings), MANDATORY_CSV_SETTINGS));
3792
3829
  if (csv.errors.length !== 0) {
3793
- 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 "); }));
3830
+ 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 "); }));
3794
3831
  }
3795
3832
  return [4 /*yield*/, Promise.all(csv.data.map(function (row, rowIndex) { return __awaiter(_this, void 0, void 0, function () {
3796
3833
  var _this = this;