@promptbook/node 0.85.0-8 → 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.
|
@@ -8,7 +8,6 @@ import type { Command as Program } from 'commander';
|
|
|
8
8
|
*/
|
|
9
9
|
export declare function $initializeAboutCommand(program: Program): void;
|
|
10
10
|
/**
|
|
11
|
-
* TODO: !!! Test this in `deno`
|
|
12
11
|
* TODO: [🗽] Unite branding and make single place for it
|
|
13
12
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
14
13
|
* Note: [🟡] Code in this file should never be published outside of `@promptbook/cli`
|
|
@@ -11,8 +11,7 @@ import type { RemoteServerOptions } from './types/RemoteServerOptions';
|
|
|
11
11
|
*/
|
|
12
12
|
export declare function startRemoteServer<TCustomOptions = undefined>(options: RemoteServerOptions<TCustomOptions>): IDestroyable;
|
|
13
13
|
/**
|
|
14
|
-
* TODO:
|
|
15
|
-
* TODO: !!!!!!! Allow to pass tokem here
|
|
14
|
+
* TODO: !! Add CORS and security - probbably via `helmet`
|
|
16
15
|
* TODO: [👩🏾🤝🧑🏾] Allow to pass custom fetch function here - PromptbookFetch
|
|
17
16
|
* TODO: Split this file into multiple functions - handler for each request
|
|
18
17
|
* TODO: Maybe use `$exportJson`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/node",
|
|
3
|
-
"version": "0.85.0-
|
|
3
|
+
"version": "0.85.0-9",
|
|
4
4
|
"description": "It's time for a paradigm shift. The future of software in plain English, French or Latin",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"module": "./esm/index.es.js",
|
|
48
48
|
"typings": "./esm/typings/src/_packages/node.index.d.ts",
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@promptbook/core": "0.85.0-
|
|
50
|
+
"@promptbook/core": "0.85.0-9"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"colors": "1.4.0",
|
package/umd/index.umd.js
CHANGED
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
* @generated
|
|
46
46
|
* @see https://github.com/webgptorg/promptbook
|
|
47
47
|
*/
|
|
48
|
-
var PROMPTBOOK_ENGINE_VERSION = '0.85.0-
|
|
48
|
+
var PROMPTBOOK_ENGINE_VERSION = '0.85.0-8';
|
|
49
49
|
/**
|
|
50
50
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
51
51
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -2060,18 +2060,16 @@
|
|
|
2060
2060
|
*/
|
|
2061
2061
|
function createTask(options) {
|
|
2062
2062
|
var taskType = options.taskType, taskProcessCallback = options.taskProcessCallback;
|
|
2063
|
-
var taskId = "".concat(taskType.toLowerCase().substring(0, 4), "-").concat($randomToken(8 /* <- TODO:
|
|
2063
|
+
var taskId = "".concat(taskType.toLowerCase().substring(0, 4), "-").concat($randomToken(8 /* <- TODO: To global config + Use Base58 to avoid simmilar char conflicts */));
|
|
2064
2064
|
var partialResultSubject = new rxjs.BehaviorSubject({});
|
|
2065
2065
|
var finalResultPromise = /* not await */ taskProcessCallback(function (newOngoingResult) {
|
|
2066
2066
|
partialResultSubject.next(newOngoingResult);
|
|
2067
2067
|
});
|
|
2068
2068
|
finalResultPromise
|
|
2069
2069
|
.catch(function (error) {
|
|
2070
|
-
// console.error('!!!!! Task failed:', error);
|
|
2071
2070
|
partialResultSubject.error(error);
|
|
2072
2071
|
})
|
|
2073
2072
|
.then(function (value) {
|
|
2074
|
-
// console.error('!!!!! Task finished:', value);
|
|
2075
2073
|
if (value) {
|
|
2076
2074
|
try {
|
|
2077
2075
|
assertsTaskSuccessful(value);
|
|
@@ -2093,9 +2091,7 @@
|
|
|
2093
2091
|
return [4 /*yield*/, finalResultPromise];
|
|
2094
2092
|
case 1:
|
|
2095
2093
|
finalResult = _b.sent();
|
|
2096
|
-
console.error('!!!!! finalResult:', finalResult);
|
|
2097
2094
|
if (isCrashedOnError) {
|
|
2098
|
-
console.error('!!!!! isCrashedOnError:', finalResult);
|
|
2099
2095
|
assertsTaskSuccessful(finalResult);
|
|
2100
2096
|
}
|
|
2101
2097
|
return [2 /*return*/, finalResult];
|