@promptbook/core 0.40.0-0 → 0.40.0-10
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 +466 -188
- package/esm/index.es.js.map +1 -1
- package/esm/typings/_packages/core.index.d.ts +6 -2
- package/esm/typings/_packages/types.index.d.ts +1 -4
- package/esm/typings/_packages/utils.index.d.ts +5 -2
- package/esm/typings/config.d.ts +4 -0
- package/esm/typings/conversion/{_importPromptbook.d.ts → test/_importPromptbook.d.ts} +2 -2
- package/{umd/typings/conversion → esm/typings/conversion/test}/validatePromptbookJson.d.ts +1 -1
- package/{umd/typings → esm/typings/conversion}/utils/extractVariables.d.ts +2 -2
- package/esm/typings/conversion/utils/parseCommand.d.ts +8 -0
- package/{umd/typings → esm/typings/conversion}/utils/parseNumber.d.ts +2 -0
- package/esm/typings/errors/ExpectError.d.ts +2 -0
- package/esm/typings/errors/NotFoundError.d.ts +1 -1
- package/esm/typings/errors/PromptbookExecutionError.d.ts +7 -0
- package/esm/typings/errors/PromptbookLogicError.d.ts +7 -0
- package/esm/typings/errors/PromptbookReferenceError.d.ts +7 -0
- package/esm/typings/errors/PromptbookSyntaxError.d.ts +7 -0
- package/esm/typings/errors/UnexpectedError.d.ts +7 -0
- package/esm/typings/execution/UserInterfaceTools.d.ts +1 -1
- package/esm/typings/execution/createPromptbookExecutor.d.ts +1 -1
- package/{umd/typings → esm/typings/execution}/utils/replaceParameters.d.ts +3 -3
- package/esm/typings/library/PromptbookLibrary.d.ts +1 -1
- package/esm/typings/library/SimplePromptbookLibrary.d.ts +7 -13
- package/esm/typings/library/constructors/createPromptbookLibraryFromPromise.d.ts +7 -0
- package/esm/typings/library/constructors/createPromptbookLibraryFromSources.d.ts +16 -0
- package/esm/typings/library/constructors/createPromptbookSublibrary.d.ts +6 -0
- package/esm/typings/utils/markdown/extractOneBlockFromMarkdown.d.ts +3 -0
- package/package.json +2 -2
- package/umd/index.umd.js +468 -187
- package/umd/index.umd.js.map +1 -1
- package/umd/typings/_packages/core.index.d.ts +6 -2
- package/umd/typings/_packages/types.index.d.ts +1 -4
- package/umd/typings/_packages/utils.index.d.ts +5 -2
- package/umd/typings/config.d.ts +4 -0
- package/umd/typings/conversion/{_importPromptbook.d.ts → test/_importPromptbook.d.ts} +2 -2
- package/{esm/typings/conversion → umd/typings/conversion/test}/validatePromptbookJson.d.ts +1 -1
- package/{esm/typings → umd/typings/conversion}/utils/extractVariables.d.ts +2 -2
- package/umd/typings/conversion/utils/parseCommand.d.ts +8 -0
- package/{esm/typings → umd/typings/conversion}/utils/parseNumber.d.ts +2 -0
- package/umd/typings/errors/ExpectError.d.ts +2 -0
- package/umd/typings/errors/NotFoundError.d.ts +1 -1
- package/umd/typings/errors/PromptbookExecutionError.d.ts +7 -0
- package/umd/typings/errors/PromptbookLogicError.d.ts +7 -0
- package/umd/typings/errors/PromptbookReferenceError.d.ts +7 -0
- package/umd/typings/errors/PromptbookSyntaxError.d.ts +7 -0
- package/umd/typings/errors/UnexpectedError.d.ts +7 -0
- package/umd/typings/execution/UserInterfaceTools.d.ts +1 -1
- package/umd/typings/execution/createPromptbookExecutor.d.ts +1 -1
- package/{esm/typings → umd/typings/execution}/utils/replaceParameters.d.ts +3 -3
- package/umd/typings/library/PromptbookLibrary.d.ts +1 -1
- package/umd/typings/library/SimplePromptbookLibrary.d.ts +7 -13
- package/umd/typings/library/constructors/createPromptbookLibraryFromPromise.d.ts +7 -0
- package/umd/typings/library/constructors/createPromptbookLibraryFromSources.d.ts +16 -0
- package/umd/typings/library/constructors/createPromptbookSublibrary.d.ts +6 -0
- package/umd/typings/utils/markdown/extractOneBlockFromMarkdown.d.ts +3 -0
- package/esm/typings/conversion/parseCommand.d.ts +0 -6
- package/umd/typings/conversion/parseCommand.d.ts +0 -6
- /package/esm/typings/conversion/{promptbookStringToJson-syntaxErrors.test.d.ts → test/promptbookStringToJson-syntaxErrors.test.d.ts} +0 -0
- /package/esm/typings/conversion/{promptbookStringToJson.test.d.ts → test/promptbookStringToJson.test.d.ts} +0 -0
- /package/esm/typings/conversion/{validatePromptbookJson-logicErrors.test.d.ts → test/validatePromptbookJson-logicErrors.test.d.ts} +0 -0
- /package/esm/typings/conversion/{validatePromptbookJson.test.d.ts → test/validatePromptbookJson.test.d.ts} +0 -0
- /package/esm/typings/{utils → conversion/utils}/extractVariables.test.d.ts +0 -0
- /package/esm/typings/conversion/{parseCommand.test.d.ts → utils/parseCommand.test.d.ts} +0 -0
- /package/esm/typings/{utils → conversion/utils}/parseNumber.test.d.ts +0 -0
- /package/esm/typings/{utils → execution/utils}/replaceParameters.test.d.ts +0 -0
- /package/umd/typings/conversion/{promptbookStringToJson-syntaxErrors.test.d.ts → test/promptbookStringToJson-syntaxErrors.test.d.ts} +0 -0
- /package/umd/typings/conversion/{promptbookStringToJson.test.d.ts → test/promptbookStringToJson.test.d.ts} +0 -0
- /package/umd/typings/conversion/{validatePromptbookJson-logicErrors.test.d.ts → test/validatePromptbookJson-logicErrors.test.d.ts} +0 -0
- /package/umd/typings/conversion/{validatePromptbookJson.test.d.ts → test/validatePromptbookJson.test.d.ts} +0 -0
- /package/umd/typings/{utils → conversion/utils}/extractVariables.test.d.ts +0 -0
- /package/umd/typings/conversion/{parseCommand.test.d.ts → utils/parseCommand.test.d.ts} +0 -0
- /package/umd/typings/{utils → conversion/utils}/parseNumber.test.d.ts +0 -0
- /package/umd/typings/{utils → execution/utils}/replaceParameters.test.d.ts +0 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PromptbookJson, PromptbookString } from '../../_packages/types.index';
|
|
2
|
+
import { SimplePromptbookLibrary } from '../SimplePromptbookLibrary';
|
|
3
|
+
export declare function createPromptbookLibraryFromSources(...promptbookSources: Array<PromptbookJson | PromptbookString>): SimplePromptbookLibrary;
|
|
4
|
+
/**
|
|
5
|
+
* Constructs Promptbook from any sources
|
|
6
|
+
*
|
|
7
|
+
* Note: During the construction syntax and logic of all sources are validated
|
|
8
|
+
* Note: You can combine .ptbk.md and .ptbk.json files BUT it is not recommended
|
|
9
|
+
*
|
|
10
|
+
* @param promptbookSources contents of .ptbk.md or .ptbk.json files
|
|
11
|
+
* @param settings settings for creating executor functions
|
|
12
|
+
* @returns PromptbookLibrary
|
|
13
|
+
*/
|
|
14
|
+
/***
|
|
15
|
+
* TODO: !!! Annotate all + all to README and samples
|
|
16
|
+
*/
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { string_promptbook_url } from '../../types/typeAliases';
|
|
2
|
+
import { PromptbookLibrary } from '../PromptbookLibrary';
|
|
3
|
+
export declare function createPromptbookSublibrary(library: PromptbookLibrary, predicate: (url: string_promptbook_url) => boolean): PromptbookLibrary;
|
|
4
|
+
/***
|
|
5
|
+
* TODO: !!! Annotate all + all to README and samples
|
|
6
|
+
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/core",
|
|
3
|
-
"version": "0.40.0-
|
|
3
|
+
"version": "0.40.0-10",
|
|
4
4
|
"description": "Library to supercharge your use of large language models",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"homepage": "https://www.npmjs.com/package/@promptbook/core",
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"n12": "1.8.18",
|
|
38
|
-
"spacetrim": "0.11.
|
|
38
|
+
"spacetrim": "0.11.2"
|
|
39
39
|
},
|
|
40
40
|
"main": "./umd/index.umd.js",
|
|
41
41
|
"module": "./esm/index.es.js",
|