@promptbook/pdf 0.75.2 → 0.75.3
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 +23 -16
- package/esm/index.es.js.map +1 -1
- package/package.json +2 -2
- package/umd/index.umd.js +23 -16
- package/umd/index.umd.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/pdf",
|
|
3
|
-
"version": "0.75.
|
|
3
|
+
"version": "0.75.3",
|
|
4
4
|
"description": "It's time for a paradigm shift. The future of software in plain English, French or Latin",
|
|
5
5
|
"--note-0": " <- [🐊]",
|
|
6
6
|
"private": false,
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"module": "./esm/index.es.js",
|
|
55
55
|
"typings": "./esm/typings/src/_packages/pdf.index.d.ts",
|
|
56
56
|
"peerDependencies": {
|
|
57
|
-
"@promptbook/core": "0.75.
|
|
57
|
+
"@promptbook/core": "0.75.3"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
60
|
"crypto-js": "4.2.0",
|
package/umd/index.umd.js
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
*
|
|
23
23
|
* @see https://github.com/webgptorg/promptbook
|
|
24
24
|
*/
|
|
25
|
-
var PROMPTBOOK_ENGINE_VERSION = '0.75.
|
|
25
|
+
var PROMPTBOOK_ENGINE_VERSION = '0.75.2';
|
|
26
26
|
/**
|
|
27
27
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
28
28
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -2868,16 +2868,16 @@
|
|
|
2868
2868
|
* Mixes registered scrapers from $scrapersMetadataRegister and $scrapersRegister
|
|
2869
2869
|
*/
|
|
2870
2870
|
var all = [];
|
|
2871
|
-
var _loop_1 = function (packageName, className) {
|
|
2871
|
+
var _loop_1 = function (packageName, className, mimeTypes, documentationUrl, isAvilableInBrowser) {
|
|
2872
2872
|
if (all.some(function (item) { return item.packageName === packageName && item.className === className; })) {
|
|
2873
2873
|
return "continue";
|
|
2874
2874
|
}
|
|
2875
|
-
all.push({ packageName: packageName, className: className });
|
|
2875
|
+
all.push({ packageName: packageName, className: className, mimeTypes: mimeTypes, documentationUrl: documentationUrl, isAvilableInBrowser: isAvilableInBrowser });
|
|
2876
2876
|
};
|
|
2877
2877
|
try {
|
|
2878
2878
|
for (var _c = __values($scrapersMetadataRegister.list()), _d = _c.next(); !_d.done; _d = _c.next()) {
|
|
2879
|
-
var _e = _d.value, packageName = _e.packageName, className = _e.className;
|
|
2880
|
-
_loop_1(packageName, className);
|
|
2879
|
+
var _e = _d.value, packageName = _e.packageName, className = _e.className, mimeTypes = _e.mimeTypes, documentationUrl = _e.documentationUrl, isAvilableInBrowser = _e.isAvilableInBrowser;
|
|
2880
|
+
_loop_1(packageName, className, mimeTypes, documentationUrl, isAvilableInBrowser);
|
|
2881
2881
|
}
|
|
2882
2882
|
}
|
|
2883
2883
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
@@ -2887,16 +2887,16 @@
|
|
|
2887
2887
|
}
|
|
2888
2888
|
finally { if (e_1) throw e_1.error; }
|
|
2889
2889
|
}
|
|
2890
|
-
var _loop_2 = function (packageName, className) {
|
|
2890
|
+
var _loop_2 = function (packageName, className, mimeTypes, documentationUrl, isAvilableInBrowser) {
|
|
2891
2891
|
if (all.some(function (item) { return item.packageName === packageName && item.className === className; })) {
|
|
2892
2892
|
return "continue";
|
|
2893
2893
|
}
|
|
2894
|
-
all.push({ packageName: packageName, className: className });
|
|
2894
|
+
all.push({ packageName: packageName, className: className, mimeTypes: mimeTypes, documentationUrl: documentationUrl, isAvilableInBrowser: isAvilableInBrowser });
|
|
2895
2895
|
};
|
|
2896
2896
|
try {
|
|
2897
2897
|
for (var _f = __values($scrapersRegister.list()), _g = _f.next(); !_g.done; _g = _f.next()) {
|
|
2898
|
-
var _h = _g.value, packageName = _h.packageName, className = _h.className;
|
|
2899
|
-
_loop_2(packageName, className);
|
|
2898
|
+
var _h = _g.value, packageName = _h.packageName, className = _h.className, mimeTypes = _h.mimeTypes, documentationUrl = _h.documentationUrl, isAvilableInBrowser = _h.isAvilableInBrowser;
|
|
2899
|
+
_loop_2(packageName, className, mimeTypes, documentationUrl, isAvilableInBrowser);
|
|
2900
2900
|
}
|
|
2901
2901
|
}
|
|
2902
2902
|
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
@@ -2926,29 +2926,33 @@
|
|
|
2926
2926
|
}
|
|
2927
2927
|
return spaceTrim__default["default"](function (block) { return "\n Available scrapers are:\n ".concat(block(metadata
|
|
2928
2928
|
.map(function (_a, i) {
|
|
2929
|
-
var packageName = _a.packageName, className = _a.className, isMetadataAviailable = _a.isMetadataAviailable, isInstalled = _a.isInstalled;
|
|
2929
|
+
var packageName = _a.packageName, className = _a.className, isMetadataAviailable = _a.isMetadataAviailable, isInstalled = _a.isInstalled, mimeTypes = _a.mimeTypes, isAvilableInBrowser = _a.isAvilableInBrowser;
|
|
2930
2930
|
var more;
|
|
2931
|
+
// TODO: Use documentationUrl
|
|
2931
2932
|
if (just(false)) {
|
|
2932
2933
|
more = '';
|
|
2933
2934
|
}
|
|
2934
2935
|
else if (!isMetadataAviailable && !isInstalled) {
|
|
2935
2936
|
// TODO: [�][�] Maybe do allow to do auto-install if package not registered and not found
|
|
2936
|
-
more = "(not installed and no metadata, looks like a unexpected behavior)";
|
|
2937
|
+
more = "*(not installed and no metadata, looks like a unexpected behavior)*";
|
|
2937
2938
|
}
|
|
2938
2939
|
else if (isMetadataAviailable && !isInstalled) {
|
|
2939
2940
|
// TODO: [�][�]
|
|
2940
|
-
more = "(not installed)";
|
|
2941
|
+
more = "*(not installed)*";
|
|
2941
2942
|
}
|
|
2942
2943
|
else if (!isMetadataAviailable && isInstalled) {
|
|
2943
|
-
more = "(no metadata, looks like a unexpected behavior)";
|
|
2944
|
+
more = "*(no metadata, looks like a unexpected behavior)*";
|
|
2944
2945
|
}
|
|
2945
2946
|
else if (isMetadataAviailable && isInstalled) {
|
|
2946
2947
|
more = "(installed)";
|
|
2947
2948
|
}
|
|
2948
2949
|
else {
|
|
2949
|
-
more = "(unknown state, looks like a unexpected behavior)";
|
|
2950
|
+
more = "*(unknown state, looks like a unexpected behavior)*";
|
|
2950
2951
|
}
|
|
2951
|
-
|
|
2952
|
+
if (!isAvilableInBrowser) {
|
|
2953
|
+
more += " *(not available in browser)*";
|
|
2954
|
+
}
|
|
2955
|
+
return "".concat(i + 1, ") `").concat(className, "` from `").concat(packageName, "` compatible to scrape ").concat(mimeTypes.join(', '), " ").concat(more);
|
|
2952
2956
|
})
|
|
2953
2957
|
.join('\n')), "\n "); });
|
|
2954
2958
|
}
|
|
@@ -3245,7 +3249,10 @@
|
|
|
3245
3249
|
return [7 /*endfinally*/];
|
|
3246
3250
|
case 9:
|
|
3247
3251
|
if (partialPieces === null) {
|
|
3248
|
-
throw new KnowledgeScrapeError(spaceTrim__default["default"](function (block) { return "\n Cannot scrape knowledge from source
|
|
3252
|
+
throw new KnowledgeScrapeError(spaceTrim__default["default"](function (block) { return "\n Cannot scrape knowledge from source:\n \n > ".concat(block(knowledgeSource.sourceContent
|
|
3253
|
+
.split('\n')
|
|
3254
|
+
.map(function (line) { return "> ".concat(line); })
|
|
3255
|
+
.join('\n')), "\n\n No scraper found for the mime type \"").concat(sourceHandler.mimeType, "\"\n\n ").concat(block($registeredScrapersMessage()), "\n\n\n "); }));
|
|
3249
3256
|
}
|
|
3250
3257
|
pieces = partialPieces.map(function (partialPiece) { return (__assign(__assign({}, partialPiece), { sources: [
|
|
3251
3258
|
{
|