@promptbook/cli 0.81.0-13 → 0.81.0-14
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
|
@@ -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-13';
|
|
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
|
|
@@ -12319,8 +12319,13 @@ function $getCompiledBook(tools, pipelineSource, options) {
|
|
|
12319
12319
|
switch (_c.label) {
|
|
12320
12320
|
case 0:
|
|
12321
12321
|
rootDirname = join(rootDirnameBase, DEFAULT_BOOKS_DIRNAME /* <- TODO: [🕝] Make here more candidates */);
|
|
12322
|
-
return [4 /*yield*/,
|
|
12322
|
+
return [4 /*yield*/, isDirectoryExisting(rootDirname, fs)];
|
|
12323
12323
|
case 1:
|
|
12324
|
+
if (!(_c.sent())) {
|
|
12325
|
+
return [2 /*return*/, "continue-up_to_root"];
|
|
12326
|
+
}
|
|
12327
|
+
return [4 /*yield*/, createCollectionFromDirectory(rootDirname, tools, __assign({ isRecursive: true, rootDirname: rootDirname }, options))];
|
|
12328
|
+
case 2:
|
|
12324
12329
|
collection = _c.sent();
|
|
12325
12330
|
return [4 /*yield*/, (function () { return __awaiter(_this, void 0, void 0, function () {
|
|
12326
12331
|
var error_1;
|
|
@@ -12341,14 +12346,14 @@ function $getCompiledBook(tools, pipelineSource, options) {
|
|
|
12341
12346
|
}
|
|
12342
12347
|
});
|
|
12343
12348
|
}); })()];
|
|
12344
|
-
case
|
|
12349
|
+
case 3:
|
|
12345
12350
|
pipeline = _c.sent();
|
|
12346
12351
|
if (pipeline !== null) {
|
|
12347
12352
|
return [2 /*return*/, { value: pipeline }];
|
|
12348
12353
|
}
|
|
12349
12354
|
// Note: searches recursivelly for books
|
|
12350
12355
|
if (isPathRoot(rootDirnameBase)) {
|
|
12351
|
-
return [2 /*return*/, "break"];
|
|
12356
|
+
return [2 /*return*/, "break-up_to_root"];
|
|
12352
12357
|
}
|
|
12353
12358
|
rootDirnameBase = join(rootDirnameBase, '..');
|
|
12354
12359
|
return [2 /*return*/];
|
|
@@ -12364,8 +12369,10 @@ function $getCompiledBook(tools, pipelineSource, options) {
|
|
|
12364
12369
|
state_1 = _b.sent();
|
|
12365
12370
|
if (typeof state_1 === "object")
|
|
12366
12371
|
return [2 /*return*/, state_1.value];
|
|
12367
|
-
|
|
12368
|
-
return [3 /*break*/, 14];
|
|
12372
|
+
switch (state_1) {
|
|
12373
|
+
case "break-up_to_root": return [3 /*break*/, 14];
|
|
12374
|
+
case "continue-up_to_root": return [3 /*break*/, 13];
|
|
12375
|
+
}
|
|
12369
12376
|
_b.label = 13;
|
|
12370
12377
|
case 13:
|
|
12371
12378
|
i++;
|