@promptbook/utils 0.40.0-0 → 0.40.0-1
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 +147 -96
- package/esm/index.es.js.map +1 -1
- package/esm/typings/_packages/core.index.d.ts +1 -1
- package/esm/typings/_packages/types.index.d.ts +4 -1
- 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/PromptbookSyntaxError.d.ts +7 -0
- package/esm/typings/errors/UnexpectedError.d.ts +7 -0
- package/esm/typings/execution/UserInterfaceTools.d.ts +1 -1
- package/{umd/typings → esm/typings/execution}/utils/replaceParameters.d.ts +3 -3
- package/esm/typings/utils/markdown/extractOneBlockFromMarkdown.d.ts +3 -0
- package/package.json +2 -2
- package/umd/index.umd.js +147 -96
- package/umd/index.umd.js.map +1 -1
- package/umd/typings/_packages/core.index.d.ts +1 -1
- package/umd/typings/_packages/types.index.d.ts +4 -1
- 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/PromptbookSyntaxError.d.ts +7 -0
- package/umd/typings/errors/UnexpectedError.d.ts +7 -0
- package/umd/typings/execution/UserInterfaceTools.d.ts +1 -1
- package/{esm/typings → umd/typings/execution}/utils/replaceParameters.d.ts +3 -3
- 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,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This error indicates that the promptbook object has valid syntax but contains logical errors (like circular dependencies)
|
|
3
|
+
*/
|
|
4
|
+
export declare class PromptbookLogicError extends Error {
|
|
5
|
+
readonly name = "PromptbookLogicError";
|
|
6
|
+
constructor(message: string);
|
|
7
|
+
}
|
|
@@ -6,7 +6,7 @@ import { number_integer, number_positive } from '../types/typeAliases';
|
|
|
6
6
|
*/
|
|
7
7
|
export type UserInterfaceTools = {
|
|
8
8
|
/**
|
|
9
|
-
* Asks the user to answer a free-text (
|
|
9
|
+
* Asks the user to answer a free-text (multi-line) question
|
|
10
10
|
*
|
|
11
11
|
* @param options the question to ask
|
|
12
12
|
* @returns the answer from the user
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Parameters } from '../../types/Parameters';
|
|
2
|
+
import { string_template } from '../../types/typeAliases';
|
|
3
3
|
/**
|
|
4
4
|
* Replaces parameters in template with values from parameters object
|
|
5
5
|
*
|
|
@@ -7,6 +7,6 @@ import { Parameters } from '../types/Parameters';
|
|
|
7
7
|
* @param parameters the object with parameters
|
|
8
8
|
* @returns the template with replaced parameters
|
|
9
9
|
*
|
|
10
|
-
* @private within the
|
|
10
|
+
* @private within the createPromptbookExecutor
|
|
11
11
|
*/
|
|
12
12
|
export declare function replaceParameters(template: string_template, parameters: Parameters): string;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|