@promptbook/core 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 +5 -5
- 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 +1 -1
- package/umd/index.umd.js +14 -14
- package/umd/index.umd.js.map +1 -1
package/esm/index.es.js
CHANGED
|
@@ -7,7 +7,7 @@ import { forTime } from 'waitasecond';
|
|
|
7
7
|
import { unparse, parse } from 'papaparse';
|
|
8
8
|
import hexEncoder from 'crypto-js/enc-hex';
|
|
9
9
|
import sha256 from 'crypto-js/sha256';
|
|
10
|
-
import { basename, join, dirname } from 'path';
|
|
10
|
+
import { basename, join, dirname } from 'node:path';
|
|
11
11
|
import { SHA256 } from 'crypto-js';
|
|
12
12
|
import { lookup, extension } from 'mime-types';
|
|
13
13
|
import moment from 'moment';
|
|
@@ -27,7 +27,7 @@ var BOOK_LANGUAGE_VERSION = '1.0.0';
|
|
|
27
27
|
* @generated
|
|
28
28
|
* @see https://github.com/webgptorg/promptbook
|
|
29
29
|
*/
|
|
30
|
-
var PROMPTBOOK_ENGINE_VERSION = '0.
|
|
30
|
+
var PROMPTBOOK_ENGINE_VERSION = '0.85.0-1';
|
|
31
31
|
/**
|
|
32
32
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
33
33
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -2375,9 +2375,9 @@ function assertsTaskSuccessful(executionResult) {
|
|
|
2375
2375
|
function createTask(options) {
|
|
2376
2376
|
var taskType = options.taskType, taskProcessCallback = options.taskProcessCallback;
|
|
2377
2377
|
var taskId = "".concat(taskType.toLowerCase(), "-").concat($randomToken(256 /* <- TODO: !!! To global config */));
|
|
2378
|
-
var
|
|
2378
|
+
var partialResultSubject = new BehaviorSubject({});
|
|
2379
2379
|
var finalResultPromise = /* not await */ taskProcessCallback(function (newOngoingResult) {
|
|
2380
|
-
|
|
2380
|
+
partialResultSubject.next(newOngoingResult);
|
|
2381
2381
|
});
|
|
2382
2382
|
function asPromise(options) {
|
|
2383
2383
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -2402,7 +2402,7 @@ function createTask(options) {
|
|
|
2402
2402
|
taskId: taskId,
|
|
2403
2403
|
asPromise: asPromise,
|
|
2404
2404
|
asObservable: function () {
|
|
2405
|
-
return concat(
|
|
2405
|
+
return concat(partialResultSubject.asObservable(), from(asPromise({
|
|
2406
2406
|
isCrashedOnError: true,
|
|
2407
2407
|
})));
|
|
2408
2408
|
},
|