@promptbook/cli 0.52.0-7 → 0.52.0-8

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
@@ -142,7 +142,7 @@ new Function("\n try {\n if (typeof WorkerGlobalScope !== 'undefined'
142
142
  /**
143
143
  * The version of the Promptbook library
144
144
  */
145
- var PROMPTBOOK_VERSION = '0.52.0-6';
145
+ var PROMPTBOOK_VERSION = '0.52.0-7';
146
146
 
147
147
  /**
148
148
  * This error indicates that the promptbook in a markdown format cannot be parsed into a valid promptbook object
@@ -1,4 +1,16 @@
1
+ import { string_folder_path } from '../../types/typeAliases';
1
2
  import { PromptbookLibrary } from '../PromptbookLibrary';
3
+ /**
4
+ * Options for `createPromptbookLibraryFromDirectory` function
5
+ */
6
+ type CreatePromptbookLibraryFromDirectoryOptions = {
7
+ /**
8
+ * If true, the directory is searched recursively for promptbooks
9
+ *
10
+ * @default true
11
+ */
12
+ isRecursive?: boolean;
13
+ };
2
14
  /**
3
15
  * Constructs Promptbook from given directory
4
16
  *
@@ -6,9 +18,12 @@ import { PromptbookLibrary } from '../PromptbookLibrary';
6
18
  * Note: The function does NOT return promise it returns the library directly which dynamically loads promptbooks when needed
7
19
  * SO during the construction syntax and logic sources IS NOT validated
8
20
  *
21
+ * @param path - path to the directory with promptbooks
22
+ * @param options - Misc options for the library
9
23
  * @returns PromptbookLibrary
10
24
  */
11
- export declare function createPromptbookLibraryFromDirectory(): PromptbookLibrary;
25
+ export declare function createPromptbookLibraryFromDirectory(path: string_folder_path, options?: CreatePromptbookLibraryFromDirectoryOptions): PromptbookLibrary;
26
+ export {};
12
27
  /***
13
28
  * TODO: [🍓][🚯] !!! Add to README and samples + maybe make `@promptbook/library` package
14
29
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/cli",
3
- "version": "0.52.0-7",
3
+ "version": "0.52.0-8",
4
4
  "description": "Library to supercharge your use of large language models",
5
5
  "private": false,
6
6
  "sideEffects": false,
@@ -52,7 +52,7 @@
52
52
  }
53
53
  ],
54
54
  "peerDependencies": {
55
- "@promptbook/core": "0.52.0-7"
55
+ "@promptbook/core": "0.52.0-8"
56
56
  },
57
57
  "main": "./umd/index.umd.js",
58
58
  "module": "./esm/index.es.js",
package/umd/index.umd.js CHANGED
@@ -146,7 +146,7 @@
146
146
  /**
147
147
  * The version of the Promptbook library
148
148
  */
149
- var PROMPTBOOK_VERSION = '0.52.0-6';
149
+ var PROMPTBOOK_VERSION = '0.52.0-7';
150
150
 
151
151
  /**
152
152
  * This error indicates that the promptbook in a markdown format cannot be parsed into a valid promptbook object
@@ -1,4 +1,16 @@
1
+ import { string_folder_path } from '../../types/typeAliases';
1
2
  import { PromptbookLibrary } from '../PromptbookLibrary';
3
+ /**
4
+ * Options for `createPromptbookLibraryFromDirectory` function
5
+ */
6
+ type CreatePromptbookLibraryFromDirectoryOptions = {
7
+ /**
8
+ * If true, the directory is searched recursively for promptbooks
9
+ *
10
+ * @default true
11
+ */
12
+ isRecursive?: boolean;
13
+ };
2
14
  /**
3
15
  * Constructs Promptbook from given directory
4
16
  *
@@ -6,9 +18,12 @@ import { PromptbookLibrary } from '../PromptbookLibrary';
6
18
  * Note: The function does NOT return promise it returns the library directly which dynamically loads promptbooks when needed
7
19
  * SO during the construction syntax and logic sources IS NOT validated
8
20
  *
21
+ * @param path - path to the directory with promptbooks
22
+ * @param options - Misc options for the library
9
23
  * @returns PromptbookLibrary
10
24
  */
11
- export declare function createPromptbookLibraryFromDirectory(): PromptbookLibrary;
25
+ export declare function createPromptbookLibraryFromDirectory(path: string_folder_path, options?: CreatePromptbookLibraryFromDirectoryOptions): PromptbookLibrary;
26
+ export {};
12
27
  /***
13
28
  * TODO: [🍓][🚯] !!! Add to README and samples + maybe make `@promptbook/library` package
14
29
  */