@promptbook/pdf 0.75.1 → 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 -17
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/pipeline/PipelineInterface/PipelineInterface.d.ts +0 -4
- package/esm/typings/src/pipeline/PipelineInterface/getPipelineInterface.d.ts +1 -3
- package/esm/typings/src/pipeline/PipelineInterface/isPipelineImplementingInterface.d.ts +1 -4
- package/esm/typings/src/pipeline/PipelineInterface/isPipelineInterfacesEqual.d.ts +1 -4
- package/package.json +2 -2
- package/umd/index.umd.js +23 -17
- package/umd/index.umd.js.map +1 -1
|
@@ -20,7 +20,3 @@ export type PipelineInterface = {
|
|
|
20
20
|
*/
|
|
21
21
|
readonly outputParameters: ReadonlyArray<OutputParameterJson>;
|
|
22
22
|
};
|
|
23
|
-
/**
|
|
24
|
-
* TODO: [🧠][🤓] How to pass optional parameters - for example summary in FORMFACTOR Translator
|
|
25
|
-
* TODO: [🧠] Better name than `PipelineInterface` to avoid confusion with typescript `interface`
|
|
26
|
-
*/
|
|
@@ -3,11 +3,9 @@ import type { PipelineInterface } from './PipelineInterface';
|
|
|
3
3
|
/**
|
|
4
4
|
* @@@
|
|
5
5
|
*
|
|
6
|
+
* @deprecated https://github.com/webgptorg/promptbook/pull/186
|
|
6
7
|
* @see https://github.com/webgptorg/promptbook/discussions/171
|
|
7
8
|
*
|
|
8
9
|
* @public exported from `@promptbook/core`
|
|
9
10
|
*/
|
|
10
11
|
export declare function getPipelineInterface(pipeline: PipelineJson): PipelineInterface;
|
|
11
|
-
/**
|
|
12
|
-
* TODO: !!!!!! Write unit test
|
|
13
|
-
*/
|
|
@@ -18,12 +18,9 @@ export type IsPipelineImplementingInterfaceOptions = {
|
|
|
18
18
|
/**
|
|
19
19
|
* @@@
|
|
20
20
|
*
|
|
21
|
+
* @deprecated https://github.com/webgptorg/promptbook/pull/186
|
|
21
22
|
* @see https://github.com/webgptorg/promptbook/discussions/171
|
|
22
23
|
*
|
|
23
24
|
* @public exported from `@promptbook/core`
|
|
24
25
|
*/
|
|
25
26
|
export declare function isPipelineImplementingInterface(options: IsPipelineImplementingInterfaceOptions): boolean;
|
|
26
|
-
/**
|
|
27
|
-
* TODO: !!!!!! Test real implementing NOT equality
|
|
28
|
-
* TODO: !!!!!! Write unit test
|
|
29
|
-
*/
|
|
@@ -2,12 +2,9 @@ import type { PipelineInterface } from './PipelineInterface';
|
|
|
2
2
|
/**
|
|
3
3
|
* @@@
|
|
4
4
|
*
|
|
5
|
+
* @deprecated https://github.com/webgptorg/promptbook/pull/186
|
|
5
6
|
* @see https://github.com/webgptorg/promptbook/discussions/171
|
|
6
7
|
*
|
|
7
8
|
* @public exported from `@promptbook/core`
|
|
8
9
|
*/
|
|
9
10
|
export declare function isPipelineInterfacesEqual(pipelineInterface1: PipelineInterface, pipelineInterface2: PipelineInterface): boolean;
|
|
10
|
-
/**
|
|
11
|
-
* TODO: [🧠] !!! Return more states than true/false - 'IDENTICAL' |'IDENTICAL_UNPREPARED' | 'IDENTICAL_INTERFACE' | 'DIFFERENT'
|
|
12
|
-
* TODO: !!! Write unit test
|
|
13
|
-
*/
|
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
|
|
@@ -1165,7 +1165,6 @@
|
|
|
1165
1165
|
while (unresovedTasks.length > 0) {
|
|
1166
1166
|
_loop_3();
|
|
1167
1167
|
}
|
|
1168
|
-
// TODO: !!!!!! Test that pipeline interface implements declared formfactor interface
|
|
1169
1168
|
}
|
|
1170
1169
|
/**
|
|
1171
1170
|
* TODO: !! [🧞♀️] Do not allow joker + foreach
|
|
@@ -2869,16 +2868,16 @@
|
|
|
2869
2868
|
* Mixes registered scrapers from $scrapersMetadataRegister and $scrapersRegister
|
|
2870
2869
|
*/
|
|
2871
2870
|
var all = [];
|
|
2872
|
-
var _loop_1 = function (packageName, className) {
|
|
2871
|
+
var _loop_1 = function (packageName, className, mimeTypes, documentationUrl, isAvilableInBrowser) {
|
|
2873
2872
|
if (all.some(function (item) { return item.packageName === packageName && item.className === className; })) {
|
|
2874
2873
|
return "continue";
|
|
2875
2874
|
}
|
|
2876
|
-
all.push({ packageName: packageName, className: className });
|
|
2875
|
+
all.push({ packageName: packageName, className: className, mimeTypes: mimeTypes, documentationUrl: documentationUrl, isAvilableInBrowser: isAvilableInBrowser });
|
|
2877
2876
|
};
|
|
2878
2877
|
try {
|
|
2879
2878
|
for (var _c = __values($scrapersMetadataRegister.list()), _d = _c.next(); !_d.done; _d = _c.next()) {
|
|
2880
|
-
var _e = _d.value, packageName = _e.packageName, className = _e.className;
|
|
2881
|
-
_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);
|
|
2882
2881
|
}
|
|
2883
2882
|
}
|
|
2884
2883
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
@@ -2888,16 +2887,16 @@
|
|
|
2888
2887
|
}
|
|
2889
2888
|
finally { if (e_1) throw e_1.error; }
|
|
2890
2889
|
}
|
|
2891
|
-
var _loop_2 = function (packageName, className) {
|
|
2890
|
+
var _loop_2 = function (packageName, className, mimeTypes, documentationUrl, isAvilableInBrowser) {
|
|
2892
2891
|
if (all.some(function (item) { return item.packageName === packageName && item.className === className; })) {
|
|
2893
2892
|
return "continue";
|
|
2894
2893
|
}
|
|
2895
|
-
all.push({ packageName: packageName, className: className });
|
|
2894
|
+
all.push({ packageName: packageName, className: className, mimeTypes: mimeTypes, documentationUrl: documentationUrl, isAvilableInBrowser: isAvilableInBrowser });
|
|
2896
2895
|
};
|
|
2897
2896
|
try {
|
|
2898
2897
|
for (var _f = __values($scrapersRegister.list()), _g = _f.next(); !_g.done; _g = _f.next()) {
|
|
2899
|
-
var _h = _g.value, packageName = _h.packageName, className = _h.className;
|
|
2900
|
-
_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);
|
|
2901
2900
|
}
|
|
2902
2901
|
}
|
|
2903
2902
|
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
@@ -2927,29 +2926,33 @@
|
|
|
2927
2926
|
}
|
|
2928
2927
|
return spaceTrim__default["default"](function (block) { return "\n Available scrapers are:\n ".concat(block(metadata
|
|
2929
2928
|
.map(function (_a, i) {
|
|
2930
|
-
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;
|
|
2931
2930
|
var more;
|
|
2931
|
+
// TODO: Use documentationUrl
|
|
2932
2932
|
if (just(false)) {
|
|
2933
2933
|
more = '';
|
|
2934
2934
|
}
|
|
2935
2935
|
else if (!isMetadataAviailable && !isInstalled) {
|
|
2936
2936
|
// TODO: [�][�] Maybe do allow to do auto-install if package not registered and not found
|
|
2937
|
-
more = "(not installed and no metadata, looks like a unexpected behavior)";
|
|
2937
|
+
more = "*(not installed and no metadata, looks like a unexpected behavior)*";
|
|
2938
2938
|
}
|
|
2939
2939
|
else if (isMetadataAviailable && !isInstalled) {
|
|
2940
2940
|
// TODO: [�][�]
|
|
2941
|
-
more = "(not installed)";
|
|
2941
|
+
more = "*(not installed)*";
|
|
2942
2942
|
}
|
|
2943
2943
|
else if (!isMetadataAviailable && isInstalled) {
|
|
2944
|
-
more = "(no metadata, looks like a unexpected behavior)";
|
|
2944
|
+
more = "*(no metadata, looks like a unexpected behavior)*";
|
|
2945
2945
|
}
|
|
2946
2946
|
else if (isMetadataAviailable && isInstalled) {
|
|
2947
2947
|
more = "(installed)";
|
|
2948
2948
|
}
|
|
2949
2949
|
else {
|
|
2950
|
-
more = "(unknown state, looks like a unexpected behavior)";
|
|
2950
|
+
more = "*(unknown state, looks like a unexpected behavior)*";
|
|
2951
2951
|
}
|
|
2952
|
-
|
|
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);
|
|
2953
2956
|
})
|
|
2954
2957
|
.join('\n')), "\n "); });
|
|
2955
2958
|
}
|
|
@@ -3246,7 +3249,10 @@
|
|
|
3246
3249
|
return [7 /*endfinally*/];
|
|
3247
3250
|
case 9:
|
|
3248
3251
|
if (partialPieces === null) {
|
|
3249
|
-
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 "); }));
|
|
3250
3256
|
}
|
|
3251
3257
|
pieces = partialPieces.map(function (partialPiece) { return (__assign(__assign({}, partialPiece), { sources: [
|
|
3252
3258
|
{
|