@promptbook/cli 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 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/cli`
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
@@ -39,7 +39,7 @@ var BOOK_LANGUAGE_VERSION = '1.0.0';
39
39
  * @generated
40
40
  * @see https://github.com/webgptorg/promptbook
41
41
  */
42
- var PROMPTBOOK_ENGINE_VERSION = '0.82.0-1';
42
+ var PROMPTBOOK_ENGINE_VERSION = '0.82.0-3';
43
43
  /**
44
44
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
45
45
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -224,6 +224,12 @@ var CLAIM = "It's time for a paradigm shift. The future of software in plain Eng
224
224
  * @public exported from `@promptbook/core`
225
225
  */
226
226
  var DEFAULT_BOOK_TITLE = "\u2728 Untitled Book";
227
+ /**
228
+ * When the title of task is not provided, the default title is used
229
+ *
230
+ * @public exported from `@promptbook/core`
231
+ */
232
+ var DEFAULT_TASK_TITLE = "Task";
227
233
  /**
228
234
  * Warning message for the generated sections and files files
229
235
  *
@@ -3893,11 +3899,17 @@ var ALL_ERRORS = __assign(__assign({}, PROMPTBOOK_ERRORS), COMMON_JAVASCRIPT_ERR
3893
3899
  * @public exported from `@promptbook/utils`
3894
3900
  */
3895
3901
  function deserializeError(error) {
3902
+ var name = error.name, stack = error.stack;
3903
+ var message = error.message;
3896
3904
  var ErrorClass = ALL_ERRORS[error.name];
3897
3905
  if (ErrorClass === undefined) {
3898
- return new Error("".concat(error.name, ": ").concat(error.message));
3906
+ ErrorClass = Error;
3907
+ message = "".concat(name, ": ").concat(message);
3908
+ }
3909
+ if (stack !== undefined && stack !== '') {
3910
+ message = spaceTrim(function (block) { return "\n ".concat(block(message), "\n\n Original stack trace:\n ").concat(block(stack || ''), "\n "); });
3899
3911
  }
3900
- return new ErrorClass(error.message);
3912
+ return new ErrorClass(message);
3901
3913
  }
3902
3914
 
3903
3915
  /**
@@ -10055,8 +10067,8 @@ function parsePipeline(pipelineString) {
10055
10067
  isSectionTypeSet: false,
10056
10068
  isTask: true,
10057
10069
  taskType: undefined /* <- Note: [🍙] Putting here placeholder to keep `taskType` on top at final JSON */,
10058
- name: getUniqueSectionName(section.title),
10059
- title: section.title,
10070
+ name: getUniqueSectionName(section.title || DEFAULT_TASK_TITLE),
10071
+ title: section.title || DEFAULT_TASK_TITLE,
10060
10072
  description: description_1,
10061
10073
  content: content,
10062
10074
  // <- TODO: [🍙] Some standard order of properties