@promptbook/markdown-utils 0.82.0-2 → 0.82.0-3

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 CHANGED
@@ -22,7 +22,7 @@ var BOOK_LANGUAGE_VERSION = '1.0.0';
22
22
  * @generated
23
23
  * @see https://github.com/webgptorg/promptbook
24
24
  */
25
- var PROMPTBOOK_ENGINE_VERSION = '0.82.0-1';
25
+ var PROMPTBOOK_ENGINE_VERSION = '0.82.0-2';
26
26
  /**
27
27
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
28
28
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -1974,11 +1974,17 @@ var ALL_ERRORS = __assign(__assign({}, PROMPTBOOK_ERRORS), COMMON_JAVASCRIPT_ERR
1974
1974
  * @public exported from `@promptbook/utils`
1975
1975
  */
1976
1976
  function deserializeError(error) {
1977
+ var name = error.name, stack = error.stack;
1978
+ var message = error.message;
1977
1979
  var ErrorClass = ALL_ERRORS[error.name];
1978
1980
  if (ErrorClass === undefined) {
1979
- return new Error("".concat(error.name, ": ").concat(error.message));
1981
+ ErrorClass = Error;
1982
+ message = "".concat(name, ": ").concat(message);
1980
1983
  }
1981
- return new ErrorClass(error.message);
1984
+ if (stack !== undefined && stack !== '') {
1985
+ message = spaceTrim(function (block) { return "\n ".concat(block(message), "\n\n Original stack trace:\n ").concat(block(stack || ''), "\n "); });
1986
+ }
1987
+ return new ErrorClass(message);
1982
1988
  }
1983
1989
 
1984
1990
  /**