@promptbook/cli 0.81.0-12 โ 0.81.0-13
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 +10 -7
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/_packages/templates.index.d.ts +2 -2
- package/esm/typings/src/other/templates/{getBookTemplate.d.ts โ getBookTemplates.d.ts} +3 -1
- package/package.json +1 -1
- package/umd/index.umd.js +10 -7
- package/umd/index.umd.js.map +1 -1
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.81.0-
|
|
42
|
+
var PROMPTBOOK_ENGINE_VERSION = '0.81.0-12';
|
|
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
|
|
@@ -308,6 +308,7 @@ var DEFAULT_MAX_EXECUTION_ATTEMPTS = 3; // <- TODO: [๐คนโโ๏ธ]
|
|
|
308
308
|
* @public exported from `@promptbook/core`
|
|
309
309
|
*/
|
|
310
310
|
var DEFAULT_BOOKS_DIRNAME = './books';
|
|
311
|
+
// <- TODO: [๐] Make also `BOOKS_DIRNAME_ALTERNATIVES`
|
|
311
312
|
/**
|
|
312
313
|
* Where to store the cache of executions for promptbook CLI
|
|
313
314
|
*
|
|
@@ -12262,7 +12263,7 @@ function executionReportJsonToString(executionReportJson, options) {
|
|
|
12262
12263
|
*/
|
|
12263
12264
|
function $getCompiledBook(tools, pipelineSource, options) {
|
|
12264
12265
|
return __awaiter(this, void 0, void 0, function () {
|
|
12265
|
-
var fs, fetch, filePathRaw, filePath, filePathCandidates, filePathCandidates_1, filePathCandidates_1_1, filePathCandidate, pipelineString, pipelineJson, e_1_1,
|
|
12266
|
+
var fs, fetch, filePathRaw, filePath, filePathCandidates, filePathCandidates_1, filePathCandidates_1_1, filePathCandidate, pipelineString, pipelineJson, e_1_1, rootDirnameBase, _loop_1, i, state_1, response_1, pipelineString, pipelineJson;
|
|
12266
12267
|
var e_1, _a;
|
|
12267
12268
|
var _this = this;
|
|
12268
12269
|
return __generator(this, function (_b) {
|
|
@@ -12311,12 +12312,14 @@ function $getCompiledBook(tools, pipelineSource, options) {
|
|
|
12311
12312
|
return [7 /*endfinally*/];
|
|
12312
12313
|
case 10:
|
|
12313
12314
|
if (!isValidPipelineUrl(pipelineSource)) return [3 /*break*/, 14];
|
|
12314
|
-
|
|
12315
|
+
rootDirnameBase = process.cwd();
|
|
12315
12316
|
_loop_1 = function (i) {
|
|
12316
|
-
var collection, pipeline;
|
|
12317
|
+
var rootDirname, collection, pipeline;
|
|
12317
12318
|
return __generator(this, function (_c) {
|
|
12318
12319
|
switch (_c.label) {
|
|
12319
|
-
case 0:
|
|
12320
|
+
case 0:
|
|
12321
|
+
rootDirname = join(rootDirnameBase, DEFAULT_BOOKS_DIRNAME /* <- TODO: [๐] Make here more candidates */);
|
|
12322
|
+
return [4 /*yield*/, createCollectionFromDirectory(rootDirname, tools, __assign({ isRecursive: true, rootDirname: rootDirname }, options))];
|
|
12320
12323
|
case 1:
|
|
12321
12324
|
collection = _c.sent();
|
|
12322
12325
|
return [4 /*yield*/, (function () { return __awaiter(_this, void 0, void 0, function () {
|
|
@@ -12344,10 +12347,10 @@ function $getCompiledBook(tools, pipelineSource, options) {
|
|
|
12344
12347
|
return [2 /*return*/, { value: pipeline }];
|
|
12345
12348
|
}
|
|
12346
12349
|
// Note: searches recursivelly for books
|
|
12347
|
-
if (isPathRoot(
|
|
12350
|
+
if (isPathRoot(rootDirnameBase)) {
|
|
12348
12351
|
return [2 /*return*/, "break"];
|
|
12349
12352
|
}
|
|
12350
|
-
|
|
12353
|
+
rootDirnameBase = join(rootDirnameBase, '..');
|
|
12351
12354
|
return [2 /*return*/];
|
|
12352
12355
|
}
|
|
12353
12356
|
});
|