@promptbook/legacy-documents 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/legacy-documents",
|
|
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/legacy-documents.index.d.ts",
|
|
56
56
|
"peerDependencies": {
|
|
57
|
-
"@promptbook/core": "0.75.
|
|
57
|
+
"@promptbook/core": "0.75.3"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
60
|
"colors": "1.4.0",
|
package/umd/index.umd.js
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
*
|
|
24
24
|
* @see https://github.com/webgptorg/promptbook
|
|
25
25
|
*/
|
|
26
|
-
var PROMPTBOOK_ENGINE_VERSION = '0.75.
|
|
26
|
+
var PROMPTBOOK_ENGINE_VERSION = '0.75.2';
|
|
27
27
|
/**
|
|
28
28
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
29
29
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -1885,7 +1885,6 @@
|
|
|
1885
1885
|
while (unresovedTasks.length > 0) {
|
|
1886
1886
|
_loop_3();
|
|
1887
1887
|
}
|
|
1888
|
-
// TODO: !!!!!! Test that pipeline interface implements declared formfactor interface
|
|
1889
1888
|
}
|
|
1890
1889
|
/**
|
|
1891
1890
|
* TODO: !! [🧞♀️] Do not allow joker + foreach
|
|
@@ -3168,16 +3167,16 @@
|
|
|
3168
3167
|
* Mixes registered scrapers from $scrapersMetadataRegister and $scrapersRegister
|
|
3169
3168
|
*/
|
|
3170
3169
|
var all = [];
|
|
3171
|
-
var _loop_1 = function (packageName, className) {
|
|
3170
|
+
var _loop_1 = function (packageName, className, mimeTypes, documentationUrl, isAvilableInBrowser) {
|
|
3172
3171
|
if (all.some(function (item) { return item.packageName === packageName && item.className === className; })) {
|
|
3173
3172
|
return "continue";
|
|
3174
3173
|
}
|
|
3175
|
-
all.push({ packageName: packageName, className: className });
|
|
3174
|
+
all.push({ packageName: packageName, className: className, mimeTypes: mimeTypes, documentationUrl: documentationUrl, isAvilableInBrowser: isAvilableInBrowser });
|
|
3176
3175
|
};
|
|
3177
3176
|
try {
|
|
3178
3177
|
for (var _c = __values($scrapersMetadataRegister.list()), _d = _c.next(); !_d.done; _d = _c.next()) {
|
|
3179
|
-
var _e = _d.value, packageName = _e.packageName, className = _e.className;
|
|
3180
|
-
_loop_1(packageName, className);
|
|
3178
|
+
var _e = _d.value, packageName = _e.packageName, className = _e.className, mimeTypes = _e.mimeTypes, documentationUrl = _e.documentationUrl, isAvilableInBrowser = _e.isAvilableInBrowser;
|
|
3179
|
+
_loop_1(packageName, className, mimeTypes, documentationUrl, isAvilableInBrowser);
|
|
3181
3180
|
}
|
|
3182
3181
|
}
|
|
3183
3182
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
@@ -3187,16 +3186,16 @@
|
|
|
3187
3186
|
}
|
|
3188
3187
|
finally { if (e_1) throw e_1.error; }
|
|
3189
3188
|
}
|
|
3190
|
-
var _loop_2 = function (packageName, className) {
|
|
3189
|
+
var _loop_2 = function (packageName, className, mimeTypes, documentationUrl, isAvilableInBrowser) {
|
|
3191
3190
|
if (all.some(function (item) { return item.packageName === packageName && item.className === className; })) {
|
|
3192
3191
|
return "continue";
|
|
3193
3192
|
}
|
|
3194
|
-
all.push({ packageName: packageName, className: className });
|
|
3193
|
+
all.push({ packageName: packageName, className: className, mimeTypes: mimeTypes, documentationUrl: documentationUrl, isAvilableInBrowser: isAvilableInBrowser });
|
|
3195
3194
|
};
|
|
3196
3195
|
try {
|
|
3197
3196
|
for (var _f = __values($scrapersRegister.list()), _g = _f.next(); !_g.done; _g = _f.next()) {
|
|
3198
|
-
var _h = _g.value, packageName = _h.packageName, className = _h.className;
|
|
3199
|
-
_loop_2(packageName, className);
|
|
3197
|
+
var _h = _g.value, packageName = _h.packageName, className = _h.className, mimeTypes = _h.mimeTypes, documentationUrl = _h.documentationUrl, isAvilableInBrowser = _h.isAvilableInBrowser;
|
|
3198
|
+
_loop_2(packageName, className, mimeTypes, documentationUrl, isAvilableInBrowser);
|
|
3200
3199
|
}
|
|
3201
3200
|
}
|
|
3202
3201
|
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
@@ -3226,29 +3225,33 @@
|
|
|
3226
3225
|
}
|
|
3227
3226
|
return spaceTrim__default["default"](function (block) { return "\n Available scrapers are:\n ".concat(block(metadata
|
|
3228
3227
|
.map(function (_a, i) {
|
|
3229
|
-
var packageName = _a.packageName, className = _a.className, isMetadataAviailable = _a.isMetadataAviailable, isInstalled = _a.isInstalled;
|
|
3228
|
+
var packageName = _a.packageName, className = _a.className, isMetadataAviailable = _a.isMetadataAviailable, isInstalled = _a.isInstalled, mimeTypes = _a.mimeTypes, isAvilableInBrowser = _a.isAvilableInBrowser;
|
|
3230
3229
|
var more;
|
|
3230
|
+
// TODO: Use documentationUrl
|
|
3231
3231
|
if (just(false)) {
|
|
3232
3232
|
more = '';
|
|
3233
3233
|
}
|
|
3234
3234
|
else if (!isMetadataAviailable && !isInstalled) {
|
|
3235
3235
|
// TODO: [�][�] Maybe do allow to do auto-install if package not registered and not found
|
|
3236
|
-
more = "(not installed and no metadata, looks like a unexpected behavior)";
|
|
3236
|
+
more = "*(not installed and no metadata, looks like a unexpected behavior)*";
|
|
3237
3237
|
}
|
|
3238
3238
|
else if (isMetadataAviailable && !isInstalled) {
|
|
3239
3239
|
// TODO: [�][�]
|
|
3240
|
-
more = "(not installed)";
|
|
3240
|
+
more = "*(not installed)*";
|
|
3241
3241
|
}
|
|
3242
3242
|
else if (!isMetadataAviailable && isInstalled) {
|
|
3243
|
-
more = "(no metadata, looks like a unexpected behavior)";
|
|
3243
|
+
more = "*(no metadata, looks like a unexpected behavior)*";
|
|
3244
3244
|
}
|
|
3245
3245
|
else if (isMetadataAviailable && isInstalled) {
|
|
3246
3246
|
more = "(installed)";
|
|
3247
3247
|
}
|
|
3248
3248
|
else {
|
|
3249
|
-
more = "(unknown state, looks like a unexpected behavior)";
|
|
3249
|
+
more = "*(unknown state, looks like a unexpected behavior)*";
|
|
3250
3250
|
}
|
|
3251
|
-
|
|
3251
|
+
if (!isAvilableInBrowser) {
|
|
3252
|
+
more += " *(not available in browser)*";
|
|
3253
|
+
}
|
|
3254
|
+
return "".concat(i + 1, ") `").concat(className, "` from `").concat(packageName, "` compatible to scrape ").concat(mimeTypes.join(', '), " ").concat(more);
|
|
3252
3255
|
})
|
|
3253
3256
|
.join('\n')), "\n "); });
|
|
3254
3257
|
}
|
|
@@ -3499,7 +3502,10 @@
|
|
|
3499
3502
|
return [7 /*endfinally*/];
|
|
3500
3503
|
case 9:
|
|
3501
3504
|
if (partialPieces === null) {
|
|
3502
|
-
throw new KnowledgeScrapeError(spaceTrim__default["default"](function (block) { return "\n Cannot scrape knowledge from source
|
|
3505
|
+
throw new KnowledgeScrapeError(spaceTrim__default["default"](function (block) { return "\n Cannot scrape knowledge from source:\n \n > ".concat(block(knowledgeSource.sourceContent
|
|
3506
|
+
.split('\n')
|
|
3507
|
+
.map(function (line) { return "> ".concat(line); })
|
|
3508
|
+
.join('\n')), "\n\n No scraper found for the mime type \"").concat(sourceHandler.mimeType, "\"\n\n ").concat(block($registeredScrapersMessage()), "\n\n\n "); }));
|
|
3503
3509
|
}
|
|
3504
3510
|
pieces = partialPieces.map(function (partialPiece) { return (__assign(__assign({}, partialPiece), { sources: [
|
|
3505
3511
|
{
|