@promptbook/documents 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 +7 -7
- 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 +17 -17
- package/umd/index.umd.js.map +1 -1
package/esm/index.es.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { mkdir, rm, readFile } from 'fs/promises';
|
|
1
|
+
import { mkdir, rm, readFile } from 'node:fs/promises';
|
|
2
2
|
import spaceTrim$1, { spaceTrim } from 'spacetrim';
|
|
3
|
-
import { spawn } from 'child_process';
|
|
4
3
|
import colors from 'colors';
|
|
4
|
+
import { spawn } from 'node:child_process';
|
|
5
5
|
import { forTime } from 'waitasecond';
|
|
6
6
|
import { SHA256 } from 'crypto-js';
|
|
7
7
|
import hexEncoder from 'crypto-js/enc-hex';
|
|
8
|
-
import { basename, join, dirname } from 'path';
|
|
8
|
+
import { basename, join, dirname } from 'node:path';
|
|
9
9
|
import { format } from 'prettier';
|
|
10
10
|
import parserHtml from 'prettier/parser-html';
|
|
11
11
|
import { BehaviorSubject, concat, from } from 'rxjs';
|
|
@@ -28,7 +28,7 @@ var BOOK_LANGUAGE_VERSION = '1.0.0';
|
|
|
28
28
|
* @generated
|
|
29
29
|
* @see https://github.com/webgptorg/promptbook
|
|
30
30
|
*/
|
|
31
|
-
var PROMPTBOOK_ENGINE_VERSION = '0.
|
|
31
|
+
var PROMPTBOOK_ENGINE_VERSION = '0.85.0-1';
|
|
32
32
|
/**
|
|
33
33
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
34
34
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -2689,9 +2689,9 @@ function assertsTaskSuccessful(executionResult) {
|
|
|
2689
2689
|
function createTask(options) {
|
|
2690
2690
|
var taskType = options.taskType, taskProcessCallback = options.taskProcessCallback;
|
|
2691
2691
|
var taskId = "".concat(taskType.toLowerCase(), "-").concat($randomToken(256 /* <- TODO: !!! To global config */));
|
|
2692
|
-
var
|
|
2692
|
+
var partialResultSubject = new BehaviorSubject({});
|
|
2693
2693
|
var finalResultPromise = /* not await */ taskProcessCallback(function (newOngoingResult) {
|
|
2694
|
-
|
|
2694
|
+
partialResultSubject.next(newOngoingResult);
|
|
2695
2695
|
});
|
|
2696
2696
|
function asPromise(options) {
|
|
2697
2697
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -2716,7 +2716,7 @@ function createTask(options) {
|
|
|
2716
2716
|
taskId: taskId,
|
|
2717
2717
|
asPromise: asPromise,
|
|
2718
2718
|
asObservable: function () {
|
|
2719
|
-
return concat(
|
|
2719
|
+
return concat(partialResultSubject.asObservable(), from(asPromise({
|
|
2720
2720
|
isCrashedOnError: true,
|
|
2721
2721
|
})));
|
|
2722
2722
|
},
|