@promptbook/core 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 +18 -6
- 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 +1 -1
- package/umd/index.umd.js +18 -5
- package/umd/index.umd.js.map +1 -1
|
@@ -11,6 +11,7 @@ import { CLAIM } from '../config';
|
|
|
11
11
|
import { LOGO_LIGHT_SRC } from '../config';
|
|
12
12
|
import { LOGO_DARK_SRC } from '../config';
|
|
13
13
|
import { DEFAULT_BOOK_TITLE } from '../config';
|
|
14
|
+
import { DEFAULT_TASK_TITLE } from '../config';
|
|
14
15
|
import { MAX_FILENAME_LENGTH } from '../config';
|
|
15
16
|
import { DEFAULT_INTERMEDIATE_FILES_STRATEGY } from '../config';
|
|
16
17
|
import { DEFAULT_MAX_PARALLEL_COUNT } from '../config';
|
|
@@ -134,6 +135,7 @@ export { CLAIM };
|
|
|
134
135
|
export { LOGO_LIGHT_SRC };
|
|
135
136
|
export { LOGO_DARK_SRC };
|
|
136
137
|
export { DEFAULT_BOOK_TITLE };
|
|
138
|
+
export { DEFAULT_TASK_TITLE };
|
|
137
139
|
export { MAX_FILENAME_LENGTH };
|
|
138
140
|
export { DEFAULT_INTERMEDIATE_FILES_STRATEGY };
|
|
139
141
|
export { DEFAULT_MAX_PARALLEL_COUNT };
|
|
@@ -59,6 +59,12 @@ export declare const LOGO_DARK_SRC: string_url_image;
|
|
|
59
59
|
* @public exported from `@promptbook/core`
|
|
60
60
|
*/
|
|
61
61
|
export declare const DEFAULT_BOOK_TITLE = "\u2728 Untitled Book";
|
|
62
|
+
/**
|
|
63
|
+
* When the title of task is not provided, the default title is used
|
|
64
|
+
*
|
|
65
|
+
* @public exported from `@promptbook/core`
|
|
66
|
+
*/
|
|
67
|
+
export declare const DEFAULT_TASK_TITLE = "Task";
|
|
62
68
|
/**
|
|
63
69
|
* Warning message for the generated sections and files files
|
|
64
70
|
*
|
package/package.json
CHANGED
package/umd/index.umd.js
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
* @generated
|
|
28
28
|
* @see https://github.com/webgptorg/promptbook
|
|
29
29
|
*/
|
|
30
|
-
var PROMPTBOOK_ENGINE_VERSION = '0.82.0-
|
|
30
|
+
var PROMPTBOOK_ENGINE_VERSION = '0.82.0-3';
|
|
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
|
|
@@ -566,6 +566,12 @@
|
|
|
566
566
|
* @public exported from `@promptbook/core`
|
|
567
567
|
*/
|
|
568
568
|
var DEFAULT_BOOK_TITLE = "\u2728 Untitled Book";
|
|
569
|
+
/**
|
|
570
|
+
* When the title of task is not provided, the default title is used
|
|
571
|
+
*
|
|
572
|
+
* @public exported from `@promptbook/core`
|
|
573
|
+
*/
|
|
574
|
+
var DEFAULT_TASK_TITLE = "Task";
|
|
569
575
|
// <- TODO: [🧠] Better system for generator warnings - not always "code" and "by `@promptbook/cli`"
|
|
570
576
|
/**
|
|
571
577
|
* The maximum number of iterations for a loops
|
|
@@ -2150,11 +2156,17 @@
|
|
|
2150
2156
|
* @public exported from `@promptbook/utils`
|
|
2151
2157
|
*/
|
|
2152
2158
|
function deserializeError(error) {
|
|
2159
|
+
var name = error.name, stack = error.stack;
|
|
2160
|
+
var message = error.message;
|
|
2153
2161
|
var ErrorClass = ALL_ERRORS[error.name];
|
|
2154
2162
|
if (ErrorClass === undefined) {
|
|
2155
|
-
|
|
2163
|
+
ErrorClass = Error;
|
|
2164
|
+
message = "".concat(name, ": ").concat(message);
|
|
2165
|
+
}
|
|
2166
|
+
if (stack !== undefined && stack !== '') {
|
|
2167
|
+
message = spaceTrim__default["default"](function (block) { return "\n ".concat(block(message), "\n\n Original stack trace:\n ").concat(block(stack || ''), "\n "); });
|
|
2156
2168
|
}
|
|
2157
|
-
return new ErrorClass(
|
|
2169
|
+
return new ErrorClass(message);
|
|
2158
2170
|
}
|
|
2159
2171
|
|
|
2160
2172
|
/**
|
|
@@ -9434,8 +9446,8 @@
|
|
|
9434
9446
|
isSectionTypeSet: false,
|
|
9435
9447
|
isTask: true,
|
|
9436
9448
|
taskType: undefined /* <- Note: [🍙] Putting here placeholder to keep `taskType` on top at final JSON */,
|
|
9437
|
-
name: getUniqueSectionName(section.title),
|
|
9438
|
-
title: section.title,
|
|
9449
|
+
name: getUniqueSectionName(section.title || DEFAULT_TASK_TITLE),
|
|
9450
|
+
title: section.title || DEFAULT_TASK_TITLE,
|
|
9439
9451
|
description: description_1,
|
|
9440
9452
|
content: content,
|
|
9441
9453
|
// <- TODO: [🍙] Some standard order of properties
|
|
@@ -11329,6 +11341,7 @@
|
|
|
11329
11341
|
exports.DEFAULT_REMOTE_URL = DEFAULT_REMOTE_URL;
|
|
11330
11342
|
exports.DEFAULT_REMOTE_URL_PATH = DEFAULT_REMOTE_URL_PATH;
|
|
11331
11343
|
exports.DEFAULT_SCRAPE_CACHE_DIRNAME = DEFAULT_SCRAPE_CACHE_DIRNAME;
|
|
11344
|
+
exports.DEFAULT_TASK_TITLE = DEFAULT_TASK_TITLE;
|
|
11332
11345
|
exports.EXPECTATION_UNITS = EXPECTATION_UNITS;
|
|
11333
11346
|
exports.EnvironmentMismatchError = EnvironmentMismatchError;
|
|
11334
11347
|
exports.ExecutionReportStringOptionsDefaults = ExecutionReportStringOptionsDefaults;
|