@promptbook/remote-client 0.82.0-2 → 0.82.0
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/README.md +0 -4
- package/esm/index.es.js +19 -8
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/_packages/core.index.d.ts +2 -0
- package/esm/typings/src/config.d.ts +6 -0
- package/package.json +2 -2
- package/umd/index.umd.js +19 -8
- package/umd/index.umd.js.map +1 -1
package/README.md
CHANGED
|
@@ -23,10 +23,6 @@
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
<blockquote style="color: #ff8811">
|
|
27
|
-
<b>⚠ Warning:</b> This is a pre-release version of the library. It is not yet ready for production use. Please look at <a href="https://www.npmjs.com/package/@promptbook/core?activeTab=versions">latest stable release</a>.
|
|
28
|
-
</blockquote>
|
|
29
|
-
|
|
30
26
|
## 📦 Package `@promptbook/remote-client`
|
|
31
27
|
|
|
32
28
|
- Promptbooks are [divided into several](#-packages) packages, all are published from [single monorepo](https://github.com/webgptorg/promptbook).
|
package/esm/index.es.js
CHANGED
|
@@ -19,7 +19,7 @@ var BOOK_LANGUAGE_VERSION = '1.0.0';
|
|
|
19
19
|
* @generated
|
|
20
20
|
* @see https://github.com/webgptorg/promptbook
|
|
21
21
|
*/
|
|
22
|
-
var PROMPTBOOK_ENGINE_VERSION = '0.82.0-
|
|
22
|
+
var PROMPTBOOK_ENGINE_VERSION = '0.82.0-3';
|
|
23
23
|
/**
|
|
24
24
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
25
25
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -424,6 +424,12 @@ var ADMIN_GITHUB_NAME = 'hejny';
|
|
|
424
424
|
* @public exported from `@promptbook/core`
|
|
425
425
|
*/
|
|
426
426
|
var DEFAULT_BOOK_TITLE = "\u2728 Untitled Book";
|
|
427
|
+
/**
|
|
428
|
+
* When the title of task is not provided, the default title is used
|
|
429
|
+
*
|
|
430
|
+
* @public exported from `@promptbook/core`
|
|
431
|
+
*/
|
|
432
|
+
var DEFAULT_TASK_TITLE = "Task";
|
|
427
433
|
/**
|
|
428
434
|
* Timeout for the connections in milliseconds
|
|
429
435
|
*
|
|
@@ -550,11 +556,17 @@ var ALL_ERRORS = __assign(__assign({}, PROMPTBOOK_ERRORS), COMMON_JAVASCRIPT_ERR
|
|
|
550
556
|
* @public exported from `@promptbook/utils`
|
|
551
557
|
*/
|
|
552
558
|
function deserializeError(error) {
|
|
559
|
+
var name = error.name, stack = error.stack;
|
|
560
|
+
var message = error.message;
|
|
553
561
|
var ErrorClass = ALL_ERRORS[error.name];
|
|
554
562
|
if (ErrorClass === undefined) {
|
|
555
|
-
|
|
563
|
+
ErrorClass = Error;
|
|
564
|
+
message = "".concat(name, ": ").concat(message);
|
|
565
|
+
}
|
|
566
|
+
if (stack !== undefined && stack !== '') {
|
|
567
|
+
message = spaceTrim$1(function (block) { return "\n ".concat(block(message), "\n\n Original stack trace:\n ").concat(block(stack || ''), "\n "); });
|
|
556
568
|
}
|
|
557
|
-
return new ErrorClass(
|
|
569
|
+
return new ErrorClass(message);
|
|
558
570
|
}
|
|
559
571
|
|
|
560
572
|
/**
|
|
@@ -606,8 +618,7 @@ function preparePipelineOnRemoteServer(pipeline, options) {
|
|
|
606
618
|
var socket, preparedPipeline;
|
|
607
619
|
return __generator(this, function (_a) {
|
|
608
620
|
switch (_a.label) {
|
|
609
|
-
case 0:
|
|
610
|
-
return [4 /*yield*/, createRemoteClient(options)];
|
|
621
|
+
case 0: return [4 /*yield*/, createRemoteClient(options)];
|
|
611
622
|
case 1:
|
|
612
623
|
socket = _a.sent();
|
|
613
624
|
socket.emit('preparePipeline-request', {
|
|
@@ -627,7 +638,7 @@ function preparePipelineOnRemoteServer(pipeline, options) {
|
|
|
627
638
|
case 2:
|
|
628
639
|
preparedPipeline = _a.sent();
|
|
629
640
|
socket.disconnect();
|
|
630
|
-
// TODO:
|
|
641
|
+
// TODO: [🧠] Maybe do $exportJson
|
|
631
642
|
return [2 /*return*/, preparedPipeline];
|
|
632
643
|
}
|
|
633
644
|
});
|
|
@@ -5257,8 +5268,8 @@ function parsePipeline(pipelineString) {
|
|
|
5257
5268
|
isSectionTypeSet: false,
|
|
5258
5269
|
isTask: true,
|
|
5259
5270
|
taskType: undefined /* <- Note: [🍙] Putting here placeholder to keep `taskType` on top at final JSON */,
|
|
5260
|
-
name: getUniqueSectionName(section.title),
|
|
5261
|
-
title: section.title,
|
|
5271
|
+
name: getUniqueSectionName(section.title || DEFAULT_TASK_TITLE),
|
|
5272
|
+
title: section.title || DEFAULT_TASK_TITLE,
|
|
5262
5273
|
description: description_1,
|
|
5263
5274
|
content: content,
|
|
5264
5275
|
// <- TODO: [🍙] Some standard order of properties
|