@promptbook/pdf 0.85.0-7 → 0.85.0-9
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
|
* @generated
|
|
27
27
|
* @see https://github.com/webgptorg/promptbook
|
|
28
28
|
*/
|
|
29
|
-
var PROMPTBOOK_ENGINE_VERSION = '0.85.0-
|
|
29
|
+
var PROMPTBOOK_ENGINE_VERSION = '0.85.0-8';
|
|
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
|
|
@@ -2527,18 +2527,16 @@ function assertsTaskSuccessful(executionResult) {
|
|
|
2527
2527
|
*/
|
|
2528
2528
|
function createTask(options) {
|
|
2529
2529
|
var taskType = options.taskType, taskProcessCallback = options.taskProcessCallback;
|
|
2530
|
-
var taskId = "".concat(taskType.toLowerCase().substring(0, 4), "-").concat($randomToken(8 /* <- TODO:
|
|
2530
|
+
var taskId = "".concat(taskType.toLowerCase().substring(0, 4), "-").concat($randomToken(8 /* <- TODO: To global config + Use Base58 to avoid simmilar char conflicts */));
|
|
2531
2531
|
var partialResultSubject = new BehaviorSubject({});
|
|
2532
2532
|
var finalResultPromise = /* not await */ taskProcessCallback(function (newOngoingResult) {
|
|
2533
2533
|
partialResultSubject.next(newOngoingResult);
|
|
2534
2534
|
});
|
|
2535
2535
|
finalResultPromise
|
|
2536
2536
|
.catch(function (error) {
|
|
2537
|
-
// console.error('!!!!! Task failed:', error);
|
|
2538
2537
|
partialResultSubject.error(error);
|
|
2539
2538
|
})
|
|
2540
2539
|
.then(function (value) {
|
|
2541
|
-
// console.error('!!!!! Task finished:', value);
|
|
2542
2540
|
if (value) {
|
|
2543
2541
|
try {
|
|
2544
2542
|
assertsTaskSuccessful(value);
|
|
@@ -2560,9 +2558,7 @@ function createTask(options) {
|
|
|
2560
2558
|
return [4 /*yield*/, finalResultPromise];
|
|
2561
2559
|
case 1:
|
|
2562
2560
|
finalResult = _b.sent();
|
|
2563
|
-
console.error('!!!!! finalResult:', finalResult);
|
|
2564
2561
|
if (isCrashedOnError) {
|
|
2565
|
-
console.error('!!!!! isCrashedOnError:', finalResult);
|
|
2566
2562
|
assertsTaskSuccessful(finalResult);
|
|
2567
2563
|
}
|
|
2568
2564
|
return [2 /*return*/, finalResult];
|