@promptbook/pdf 0.85.0-0 → 0.85.0-2
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 +6 -6
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/_packages/utils.index.d.ts +2 -0
- package/esm/typings/src/execution/FilesystemTools.d.ts +1 -1
- package/esm/typings/src/remote-server/startRemoteServer.d.ts +2 -0
- package/esm/typings/src/remote-server/types/RemoteServerOptions.d.ts +6 -4
- package/esm/typings/src/utils/normalization/suffixUrl.d.ts +7 -0
- package/esm/typings/src/utils/normalization/suffixUrl.test.d.ts +1 -0
- package/package.json +2 -2
- package/umd/index.umd.js +16 -16
- package/umd/index.umd.js.map +1 -1
package/esm/index.es.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { mkdir, rm, readFile } from 'fs/promises';
|
|
1
|
+
import { mkdir, rm, readFile } from 'node:fs/promises';
|
|
2
2
|
import spaceTrim, { spaceTrim as spaceTrim$1 } from 'spacetrim';
|
|
3
3
|
import { SHA256 } from 'crypto-js';
|
|
4
4
|
import hexEncoder from 'crypto-js/enc-hex';
|
|
5
|
-
import { basename, join, dirname } from 'path';
|
|
5
|
+
import { basename, join, dirname } from 'node:path';
|
|
6
6
|
import { format } from 'prettier';
|
|
7
7
|
import parserHtml from 'prettier/parser-html';
|
|
8
8
|
import { BehaviorSubject, concat, from } from 'rxjs';
|
|
@@ -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.
|
|
29
|
+
var PROMPTBOOK_ENGINE_VERSION = '0.85.0-1';
|
|
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
|
|
@@ -2528,9 +2528,9 @@ function assertsTaskSuccessful(executionResult) {
|
|
|
2528
2528
|
function createTask(options) {
|
|
2529
2529
|
var taskType = options.taskType, taskProcessCallback = options.taskProcessCallback;
|
|
2530
2530
|
var taskId = "".concat(taskType.toLowerCase(), "-").concat($randomToken(256 /* <- TODO: !!! To global config */));
|
|
2531
|
-
var
|
|
2531
|
+
var partialResultSubject = new BehaviorSubject({});
|
|
2532
2532
|
var finalResultPromise = /* not await */ taskProcessCallback(function (newOngoingResult) {
|
|
2533
|
-
|
|
2533
|
+
partialResultSubject.next(newOngoingResult);
|
|
2534
2534
|
});
|
|
2535
2535
|
function asPromise(options) {
|
|
2536
2536
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -2555,7 +2555,7 @@ function createTask(options) {
|
|
|
2555
2555
|
taskId: taskId,
|
|
2556
2556
|
asPromise: asPromise,
|
|
2557
2557
|
asObservable: function () {
|
|
2558
|
-
return concat(
|
|
2558
|
+
return concat(partialResultSubject.asObservable(), from(asPromise({
|
|
2559
2559
|
isCrashedOnError: true,
|
|
2560
2560
|
})));
|
|
2561
2561
|
},
|