@promptbook/markdown-utils 0.61.0-7
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/README.md +698 -0
- package/esm/index.es.js +479 -0
- package/esm/index.es.js.map +1 -0
- package/esm/typings/promptbook-collection/index.d.ts +82 -0
- package/esm/typings/src/_packages/anthropic-claude.index.d.ts +5 -0
- package/esm/typings/src/_packages/azure-openai.index.d.ts +4 -0
- package/esm/typings/src/_packages/cli.index.d.ts +10 -0
- package/esm/typings/src/_packages/core.index.d.ts +44 -0
- package/esm/typings/src/_packages/execute-javascript.index.d.ts +48 -0
- package/esm/typings/src/_packages/fake-llm.index.d.ts +7 -0
- package/esm/typings/src/_packages/langtail.index.d.ts +4 -0
- package/esm/typings/src/_packages/markdown-utils.index.d.ts +17 -0
- package/esm/typings/src/_packages/node.index.d.ts +4 -0
- package/esm/typings/src/_packages/openai.index.d.ts +5 -0
- package/esm/typings/src/_packages/remote-client.index.d.ts +5 -0
- package/esm/typings/src/_packages/remote-server.index.d.ts +4 -0
- package/esm/typings/src/_packages/types.index.d.ts +38 -0
- package/esm/typings/src/_packages/utils.index.d.ts +74 -0
- package/esm/typings/src/cli/cli-commands/hello.d.ts +7 -0
- package/esm/typings/src/cli/cli-commands/make.d.ts +7 -0
- package/esm/typings/src/cli/cli-commands/prettify.d.ts +7 -0
- package/esm/typings/src/cli/promptbookCli.d.ts +9 -0
- package/esm/typings/src/collection/PipelineCollection.d.ts +25 -0
- package/esm/typings/src/collection/SimplePipelineCollection.d.ts +38 -0
- package/esm/typings/src/collection/collectionToJson.d.ts +11 -0
- package/esm/typings/src/collection/collectionToJson.test.d.ts +7 -0
- package/esm/typings/src/collection/constructors/createCollectionFromDirectory.d.ts +47 -0
- package/esm/typings/src/collection/constructors/createCollectionFromDirectory.test.d.ts +1 -0
- package/esm/typings/src/collection/constructors/createCollectionFromJson.d.ts +12 -0
- package/esm/typings/src/collection/constructors/createCollectionFromJson.test.d.ts +1 -0
- package/esm/typings/src/collection/constructors/createCollectionFromPromise.d.ts +22 -0
- package/esm/typings/src/collection/constructors/createCollectionFromPromise.test.d.ts +1 -0
- package/esm/typings/src/collection/constructors/createCollectionFromUrl.d.ts +29 -0
- package/esm/typings/src/collection/constructors/createSubcollection.d.ts +12 -0
- package/esm/typings/src/collection/constructors/justTestFsImport.d.ts +7 -0
- package/esm/typings/src/commands/BLOCK/BlockCommand.d.ts +11 -0
- package/esm/typings/src/commands/BLOCK/BlockTypes.d.ts +13 -0
- package/esm/typings/src/commands/BLOCK/blockCommand.test.d.ts +1 -0
- package/esm/typings/src/commands/BLOCK/blockCommandParser.d.ts +9 -0
- package/esm/typings/src/commands/EXPECT/ExpectAmountCommand.d.ts +14 -0
- package/esm/typings/src/commands/EXPECT/ExpectCommand.d.ts +9 -0
- package/esm/typings/src/commands/EXPECT/ExpectFormatCommand.d.ts +7 -0
- package/esm/typings/src/commands/EXPECT/expectCommand.test.d.ts +1 -0
- package/esm/typings/src/commands/EXPECT/expectCommandParser.d.ts +9 -0
- package/esm/typings/src/commands/JOKER/JokerCommand.d.ts +11 -0
- package/esm/typings/src/commands/JOKER/jokerCommand.test.d.ts +1 -0
- package/esm/typings/src/commands/JOKER/jokerCommandParser.d.ts +9 -0
- package/esm/typings/src/commands/KNOWLEDGE/KnowledgeCommand.d.ts +12 -0
- package/esm/typings/src/commands/KNOWLEDGE/knowledgeCommand.test.d.ts +1 -0
- package/esm/typings/src/commands/KNOWLEDGE/knowledgeCommandParser.d.ts +9 -0
- package/esm/typings/src/commands/MODEL/ModelCommand.d.ts +13 -0
- package/esm/typings/src/commands/MODEL/modelCommand.test.d.ts +1 -0
- package/esm/typings/src/commands/MODEL/modelCommandParser.d.ts +9 -0
- package/esm/typings/src/commands/PARAMETER/ParameterCommand.d.ts +15 -0
- package/esm/typings/src/commands/PARAMETER/parameterCommand.test.d.ts +1 -0
- package/esm/typings/src/commands/PARAMETER/parameterCommandParser.d.ts +9 -0
- package/esm/typings/src/commands/PERSONA/PersonaCommand.d.ts +11 -0
- package/esm/typings/src/commands/PERSONA/personaCommand.test.d.ts +1 -0
- package/esm/typings/src/commands/PERSONA/personaCommandParser.d.ts +9 -0
- package/esm/typings/src/commands/POSTPROCESS/PostprocessCommand.d.ts +11 -0
- package/esm/typings/src/commands/POSTPROCESS/postprocessCommand.test.d.ts +1 -0
- package/esm/typings/src/commands/POSTPROCESS/postprocessCommandParser.d.ts +9 -0
- package/esm/typings/src/commands/PROMPTBOOK_VERSION/PromptbookVersionCommand.d.ts +11 -0
- package/esm/typings/src/commands/PROMPTBOOK_VERSION/promptbookVersionCommand.test.d.ts +1 -0
- package/esm/typings/src/commands/PROMPTBOOK_VERSION/promptbookVersionCommandParser.d.ts +9 -0
- package/esm/typings/src/commands/URL/UrlCommand.d.ts +10 -0
- package/esm/typings/src/commands/URL/urlCommand.test.d.ts +1 -0
- package/esm/typings/src/commands/URL/urlCommandParser.d.ts +9 -0
- package/esm/typings/src/commands/X_ACTION/ActionCommand.d.ts +9 -0
- package/esm/typings/src/commands/X_ACTION/actionCommand.test.d.ts +1 -0
- package/esm/typings/src/commands/X_ACTION/actionCommandParser.d.ts +9 -0
- package/esm/typings/src/commands/X_INSTRUMENT/InstrumentCommand.d.ts +9 -0
- package/esm/typings/src/commands/X_INSTRUMENT/instrumentCommand.test.d.ts +1 -0
- package/esm/typings/src/commands/X_INSTRUMENT/instrumentCommandParser.d.ts +9 -0
- package/esm/typings/src/commands/_BOILERPLATE/BoilerplateCommand.d.ts +10 -0
- package/esm/typings/src/commands/_BOILERPLATE/boilerplateCommand.test.d.ts +1 -0
- package/esm/typings/src/commands/_BOILERPLATE/boilerplateCommandParser.d.ts +12 -0
- package/esm/typings/src/commands/_common/parseCommand.d.ts +12 -0
- package/esm/typings/src/commands/_common/parseCommand.test.d.ts +1 -0
- package/esm/typings/src/commands/_common/types/Command.d.ts +6 -0
- package/esm/typings/src/commands/_common/types/CommandParser.d.ts +36 -0
- package/esm/typings/src/commands/_common/types/CommandUsagePlaces.d.ts +9 -0
- package/esm/typings/src/commands/index.d.ts +4 -0
- package/esm/typings/src/config.d.ts +16 -0
- package/esm/typings/src/conversion/pipelineJsonToString.d.ts +14 -0
- package/esm/typings/src/conversion/pipelineStringToJson.d.ts +31 -0
- package/esm/typings/src/conversion/pipelineStringToJson.test.d.ts +1 -0
- package/esm/typings/src/conversion/pipelineStringToJsonSync.d.ts +25 -0
- package/esm/typings/src/conversion/pipelineStringToJsonSync.test.d.ts +1 -0
- package/esm/typings/src/conversion/prettify/PrettifyOptions.d.ts +13 -0
- package/esm/typings/src/conversion/prettify/prettifyPipelineString.d.ts +10 -0
- package/esm/typings/src/conversion/prettify/renderPipelineMermaidOptions.d.ts +25 -0
- package/esm/typings/src/conversion/utils/extractParametersFromPromptTemplate.d.ts +13 -0
- package/esm/typings/src/conversion/utils/extractParametersFromPromptTemplate.test.d.ts +1 -0
- package/esm/typings/src/conversion/utils/extractVariables.d.ts +13 -0
- package/esm/typings/src/conversion/utils/extractVariables.test.d.ts +1 -0
- package/esm/typings/src/conversion/utils/renameParameter.d.ts +25 -0
- package/esm/typings/src/conversion/utils/renameParameter.test.d.ts +1 -0
- package/esm/typings/src/conversion/utils/titleToName.d.ts +4 -0
- package/esm/typings/src/conversion/utils/titleToName.test.d.ts +1 -0
- package/esm/typings/src/conversion/validation/_importPipeline.d.ts +13 -0
- package/esm/typings/src/conversion/validation/pipelineStringToJson-syntaxErrors.test.d.ts +1 -0
- package/esm/typings/src/conversion/validation/validatePipeline-logicErrors.test.d.ts +4 -0
- package/esm/typings/src/conversion/validation/validatePipeline.d.ts +27 -0
- package/esm/typings/src/conversion/validation/validatePipeline.test.d.ts +1 -0
- package/esm/typings/src/errors/CollectionError.d.ts +7 -0
- package/esm/typings/src/errors/NotFoundError.d.ts +7 -0
- package/esm/typings/src/errors/NotYetImplementedError.d.ts +7 -0
- package/esm/typings/src/errors/ParsingError.d.ts +7 -0
- package/esm/typings/src/errors/PipelineExecutionError.d.ts +7 -0
- package/esm/typings/src/errors/PipelineLogicError.d.ts +7 -0
- package/esm/typings/src/errors/ReferenceError.d.ts +7 -0
- package/esm/typings/src/errors/UnexpectedError.d.ts +7 -0
- package/esm/typings/src/errors/_ExpectError.d.ts +10 -0
- package/esm/typings/src/execution/CommonExecutionToolsOptions.d.ts +9 -0
- package/esm/typings/src/execution/EmbeddingVector.d.ts +8 -0
- package/esm/typings/src/execution/ExecutionTools.d.ts +33 -0
- package/esm/typings/src/execution/LlmExecutionTools.d.ts +70 -0
- package/esm/typings/src/execution/PipelineExecutor.d.ts +42 -0
- package/esm/typings/src/execution/PromptResult.d.ts +114 -0
- package/esm/typings/src/execution/ScriptExecutionTools.d.ts +38 -0
- package/esm/typings/src/execution/UserInterfaceTools.d.ts +46 -0
- package/esm/typings/src/execution/addPromptResultUsage.test.d.ts +1 -0
- package/esm/typings/src/execution/assertsExecutionSuccessful.d.ts +11 -0
- package/esm/typings/src/execution/createPipelineExecutor.d.ts +42 -0
- package/esm/typings/src/execution/embeddingVectorToString.d.ts +5 -0
- package/esm/typings/src/execution/translation/automatic-translate/automatic-translators/AutomaticTranslator.d.ts +4 -0
- package/esm/typings/src/execution/translation/automatic-translate/automatic-translators/DebugAutomaticTranslator.d.ts +9 -0
- package/esm/typings/src/execution/translation/automatic-translate/automatic-translators/FakeAutomaticTranslator.d.ts +5 -0
- package/esm/typings/src/execution/translation/automatic-translate/automatic-translators/LindatAutomaticTranslator.d.ts +11 -0
- package/esm/typings/src/execution/translation/automatic-translate/automatic-translators/TranslatorOptions.d.ts +4 -0
- package/esm/typings/src/execution/translation/automatic-translate/automatic-translators/utils/extractMultiplicatedOccurrence.d.ts +7 -0
- package/esm/typings/src/execution/translation/automatic-translate/automatic-translators/utils/extractMultiplicatedOccurrence.test.d.ts +1 -0
- package/esm/typings/src/execution/translation/automatic-translate/translateMessages.d.ts +5 -0
- package/esm/typings/src/execution/utils/addUsage.d.ts +7 -0
- package/esm/typings/src/execution/utils/addUsage.test.d.ts +1 -0
- package/esm/typings/src/execution/utils/checkExpectations.d.ts +25 -0
- package/esm/typings/src/execution/utils/checkExpectations.test.d.ts +1 -0
- package/esm/typings/src/execution/utils/computeUsageCounts.d.ts +10 -0
- package/esm/typings/src/execution/utils/forEachAsync.d.ts +18 -0
- package/esm/typings/src/execution/utils/replaceParameters.d.ts +13 -0
- package/esm/typings/src/execution/utils/replaceParameters.test.d.ts +1 -0
- package/esm/typings/src/execution/utils/uncertainNumber.d.ts +9 -0
- package/esm/typings/src/execution/utils/usageToWorktime.d.ts +10 -0
- package/esm/typings/src/execution/utils/usageToWorktime.test.d.ts +1 -0
- package/esm/typings/src/expectations/drafts/isDomainNameFree.d.ts +6 -0
- package/esm/typings/src/expectations/drafts/isGithubNameFree.d.ts +6 -0
- package/esm/typings/src/formats/_common/FormatDefinition.d.ts +69 -0
- package/esm/typings/src/formats/csv/ListFormatDefinition.d.ts +11 -0
- package/esm/typings/src/formats/index.d.ts +4 -0
- package/esm/typings/src/formats/json/JsonFormatDefinition.d.ts +15 -0
- package/esm/typings/src/formats/json/utils/isValidJsonString.d.ts +4 -0
- package/esm/typings/src/formats/json/utils/isValidJsonString.test.d.ts +1 -0
- package/esm/typings/src/formats/list/ListFormatDefinition.d.ts +13 -0
- package/esm/typings/src/formats/xml/XmlFormatDefinition.d.ts +15 -0
- package/esm/typings/src/knowledge/dialogs/callback/CallbackInterfaceTools.d.ts +15 -0
- package/esm/typings/src/knowledge/dialogs/callback/CallbackInterfaceToolsOptions.d.ts +12 -0
- package/esm/typings/src/knowledge/dialogs/simple-prompt/SimplePromptInterfaceTools.d.ts +17 -0
- package/esm/typings/src/knowledge/dialogs/user-interface-execution-tools.test.d.ts +1 -0
- package/esm/typings/src/knowledge/prepare-knowledge/markdown/playground/markdown-knowledge-playground.d.ts +2 -0
- package/esm/typings/src/knowledge/prepare-knowledge/markdown/prepareKnowledgeFromMarkdown.d.ts +26 -0
- package/esm/typings/src/knowledge/prepare-knowledge/markdown/prepareKnowledgeFromMarkdown.test.d.ts +1 -0
- package/esm/typings/src/knowledge/prepare-knowledge/pdf/prepareKnowledgeFromPdf.d.ts +19 -0
- package/esm/typings/src/knowledge/prepare-knowledge/pdf/prepareKnowledgeFromPdf.test.d.ts +1 -0
- package/esm/typings/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +48 -0
- package/esm/typings/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionToolsOptions.d.ts +8 -0
- package/esm/typings/src/llm-providers/anthropic-claude/anthropic-claude-models.d.ts +22 -0
- package/esm/typings/src/llm-providers/anthropic-claude/playground/playground.d.ts +2 -0
- package/esm/typings/src/llm-providers/azure-openai/AzureOpenAiExecutionTools.d.ts +47 -0
- package/esm/typings/src/llm-providers/azure-openai/AzureOpenAiExecutionToolsOptions.d.ts +35 -0
- package/esm/typings/src/llm-providers/azure-openai/playground/playground.d.ts +2 -0
- package/esm/typings/src/llm-providers/langtail/LangtailExecutionTools.d.ts +12 -0
- package/esm/typings/src/llm-providers/langtail/LangtailExecutionToolsOptions.d.ts +11 -0
- package/esm/typings/src/llm-providers/langtail/playground/playground.d.ts +2 -0
- package/esm/typings/src/llm-providers/mocked/MockedEchoLlmExecutionTools.d.ts +34 -0
- package/esm/typings/src/llm-providers/mocked/MockedFackedLlmExecutionTools.d.ts +38 -0
- package/esm/typings/src/llm-providers/mocked/fakeTextToExpectations.d.ts +14 -0
- package/esm/typings/src/llm-providers/mocked/test/fakeTextToExpectations.test.d.ts +1 -0
- package/esm/typings/src/llm-providers/mocked/test/faked-completion.test.d.ts +1 -0
- package/esm/typings/src/llm-providers/mocked/test/joker.test.d.ts +4 -0
- package/esm/typings/src/llm-providers/mocked/test/mocked-chat.test.d.ts +5 -0
- package/esm/typings/src/llm-providers/mocked/test/mocked-completion.test.d.ts +4 -0
- package/esm/typings/src/llm-providers/multiple/MultipleLlmExecutionTools.d.ts +50 -0
- package/esm/typings/src/llm-providers/multiple/joinLlmExecutionTools.d.ts +16 -0
- package/esm/typings/src/llm-providers/multiple/playground/playground.d.ts +2 -0
- package/esm/typings/src/llm-providers/openai/OpenAiExecutionTools.d.ts +65 -0
- package/esm/typings/src/llm-providers/openai/OpenAiExecutionToolsOptions.d.ts +18 -0
- package/esm/typings/src/llm-providers/openai/computeOpenaiUsage.d.ts +14 -0
- package/esm/typings/src/llm-providers/openai/computeUsage.d.ts +16 -0
- package/esm/typings/src/llm-providers/openai/computeUsage.test.d.ts +1 -0
- package/esm/typings/src/llm-providers/openai/openai-models.d.ts +27 -0
- package/esm/typings/src/llm-providers/openai/playground/playground.d.ts +2 -0
- package/esm/typings/src/llm-providers/remote/RemoteLlmExecutionTools.d.ts +52 -0
- package/esm/typings/src/llm-providers/remote/RemoteLlmExecutionToolsOptions.d.ts +24 -0
- package/esm/typings/src/llm-providers/remote/interfaces/Promptbook_Server_Error.d.ts +11 -0
- package/esm/typings/src/llm-providers/remote/interfaces/Promptbook_Server_Progress.d.ts +12 -0
- package/esm/typings/src/llm-providers/remote/interfaces/Promptbook_Server_Request.d.ts +17 -0
- package/esm/typings/src/llm-providers/remote/interfaces/Promptbook_Server_Response.d.ts +12 -0
- package/esm/typings/src/llm-providers/remote/interfaces/RemoteServerOptions.d.ts +28 -0
- package/esm/typings/src/llm-providers/remote/startRemoteServer.d.ts +19 -0
- package/esm/typings/src/personas/personaToModelRequirements.d.ts +6 -0
- package/esm/typings/src/scripting/_test/custom-function-async.test.ts.test.d.ts +1 -0
- package/esm/typings/src/scripting/_test/custom-function-missing.test.d.ts +1 -0
- package/esm/typings/src/scripting/_test/custom-function-with-dependencies.test.d.ts +1 -0
- package/esm/typings/src/scripting/_test/custom-function.test.d.ts +1 -0
- package/esm/typings/src/scripting/_test/postprocessing.test.d.ts +1 -0
- package/esm/typings/src/scripting/_test/script-execution-errors.test.d.ts +1 -0
- package/esm/typings/src/scripting/_test/script-execution-tools.test.d.ts +1 -0
- package/esm/typings/src/scripting/javascript/JavascriptEvalExecutionTools.d.ts +20 -0
- package/esm/typings/src/scripting/javascript/JavascriptEvalExecutionTools.test.d.ts +4 -0
- package/esm/typings/src/scripting/javascript/JavascriptExecutionTools.d.ts +7 -0
- package/esm/typings/src/scripting/javascript/JavascriptExecutionToolsOptions.d.ts +26 -0
- package/esm/typings/src/scripting/javascript/utils/preserve.d.ts +12 -0
- package/esm/typings/src/scripting/javascript/utils/unknownToString.d.ts +7 -0
- package/esm/typings/src/scripting/python/PythonExecutionTools.d.ts +16 -0
- package/esm/typings/src/scripting/typescript/TypescriptExecutionTools.d.ts +16 -0
- package/esm/typings/src/types/Arrayable.d.ts +10 -0
- package/esm/typings/src/types/ModelRequirements.d.ts +43 -0
- package/esm/typings/src/types/Parameters.d.ts +14 -0
- package/esm/typings/src/types/PipelineJson/Expectations.d.ts +28 -0
- package/esm/typings/src/types/PipelineJson/KnowledgeJson.d.ts +6 -0
- package/esm/typings/src/types/PipelineJson/LlmTemplateJson.d.ts +16 -0
- package/esm/typings/src/types/PipelineJson/MaterialKnowledgePieceJson.d.ts +28 -0
- package/esm/typings/src/types/PipelineJson/PipelineJson.d.ts +61 -0
- package/esm/typings/src/types/PipelineJson/PromptDialogJson.d.ts +7 -0
- package/esm/typings/src/types/PipelineJson/PromptTemplateJson.d.ts +9 -0
- package/esm/typings/src/types/PipelineJson/PromptTemplateJsonCommon.d.ts +77 -0
- package/esm/typings/src/types/PipelineJson/PromptTemplateParameterJson.d.ts +26 -0
- package/esm/typings/src/types/PipelineJson/ScriptJson.d.ts +14 -0
- package/esm/typings/src/types/PipelineJson/SimpleTemplateJson.d.ts +7 -0
- package/esm/typings/src/types/PipelineString.d.ts +12 -0
- package/esm/typings/src/types/Prompt.d.ts +65 -0
- package/esm/typings/src/types/ScriptLanguage.d.ts +9 -0
- package/esm/typings/src/types/TaskProgress.d.ts +43 -0
- package/esm/typings/src/types/execution-report/ExecutionReportJson.d.ts +58 -0
- package/esm/typings/src/types/execution-report/ExecutionReportString.d.ts +16 -0
- package/esm/typings/src/types/execution-report/ExecutionReportStringOptions.d.ts +21 -0
- package/esm/typings/src/types/execution-report/config.d.ts +8 -0
- package/esm/typings/src/types/execution-report/countWorkingDuration.d.ts +7 -0
- package/esm/typings/src/types/execution-report/countWorkingDuration.test.d.ts +1 -0
- package/esm/typings/src/types/execution-report/executionReportJsonToString.d.ts +11 -0
- package/esm/typings/src/types/typeAliasEmoji.d.ts +9 -0
- package/esm/typings/src/types/typeAliases.d.ts +480 -0
- package/esm/typings/src/utils/FromtoItems.d.ts +19 -0
- package/esm/typings/src/utils/arrayableToArray.d.ts +11 -0
- package/esm/typings/src/utils/arrayableToArray.test.d.ts +1 -0
- package/esm/typings/src/utils/emojis.d.ts +23 -0
- package/esm/typings/src/utils/expectation-counters/countCharacters.d.ts +5 -0
- package/esm/typings/src/utils/expectation-counters/countCharacters.test.d.ts +1 -0
- package/esm/typings/src/utils/expectation-counters/countLines.d.ts +5 -0
- package/esm/typings/src/utils/expectation-counters/countLines.test.d.ts +1 -0
- package/esm/typings/src/utils/expectation-counters/countPages.d.ts +5 -0
- package/esm/typings/src/utils/expectation-counters/countPages.test.d.ts +1 -0
- package/esm/typings/src/utils/expectation-counters/countParagraphs.d.ts +5 -0
- package/esm/typings/src/utils/expectation-counters/countParagraphs.test.d.ts +1 -0
- package/esm/typings/src/utils/expectation-counters/countSentences.d.ts +9 -0
- package/esm/typings/src/utils/expectation-counters/countSentences.test.d.ts +1 -0
- package/esm/typings/src/utils/expectation-counters/countWords.d.ts +5 -0
- package/esm/typings/src/utils/expectation-counters/countWords.test.d.ts +1 -0
- package/esm/typings/src/utils/expectation-counters/index.d.ts +6 -0
- package/esm/typings/src/utils/extractParameters.d.ts +9 -0
- package/esm/typings/src/utils/extractParameters.test.d.ts +1 -0
- package/esm/typings/src/utils/formatNumber.d.ts +6 -0
- package/esm/typings/src/utils/formatNumber.test.d.ts +1 -0
- package/esm/typings/src/utils/getCurrentIsoDate.d.ts +7 -0
- package/esm/typings/src/utils/isRunningInWhatever.d.ts +12 -0
- package/esm/typings/src/utils/just.d.ts +10 -0
- package/esm/typings/src/utils/markdown/addAutoGeneratedSection.d.ts +11 -0
- package/esm/typings/src/utils/markdown/addAutoGeneratedSection.test.d.ts +1 -0
- package/esm/typings/src/utils/markdown/createMarkdownChart.d.ts +41 -0
- package/esm/typings/src/utils/markdown/createMarkdownChart.test.d.ts +1 -0
- package/esm/typings/src/utils/markdown/createMarkdownTable.d.ts +8 -0
- package/esm/typings/src/utils/markdown/createMarkdownTable.test.d.ts +1 -0
- package/esm/typings/src/utils/markdown/escapeMarkdownBlock.d.ts +6 -0
- package/esm/typings/src/utils/markdown/escapeMarkdownBlock.test.d.ts +1 -0
- package/esm/typings/src/utils/markdown/extractAllBlocksFromMarkdown.d.ts +27 -0
- package/esm/typings/src/utils/markdown/extractAllBlocksFromMarkdown.test.d.ts +1 -0
- package/esm/typings/src/utils/markdown/extractAllListItemsFromMarkdown.d.ts +14 -0
- package/esm/typings/src/utils/markdown/extractAllListItemsFromMarkdown.test.d.ts +1 -0
- package/esm/typings/src/utils/markdown/extractOneBlockFromMarkdown.d.ts +19 -0
- package/esm/typings/src/utils/markdown/extractOneBlockFromMarkdown.test.d.ts +1 -0
- package/esm/typings/src/utils/markdown/flattenMarkdown.d.ts +14 -0
- package/esm/typings/src/utils/markdown/flattenMarkdown.test.d.ts +1 -0
- package/esm/typings/src/utils/markdown/parseMarkdownSection.d.ts +30 -0
- package/esm/typings/src/utils/markdown/parseMarkdownSection.test.d.ts +1 -0
- package/esm/typings/src/utils/markdown/prettifyMarkdown.d.ts +9 -0
- package/esm/typings/src/utils/markdown/prettifyMarkdown.test.d.ts +1 -0
- package/esm/typings/src/utils/markdown/removeContentComments.d.ts +9 -0
- package/esm/typings/src/utils/markdown/removeContentComments.test.d.ts +1 -0
- package/esm/typings/src/utils/markdown/removeMarkdownFormatting.d.ts +8 -0
- package/esm/typings/src/utils/markdown/removeMarkdownFormatting.test.d.ts +1 -0
- package/esm/typings/src/utils/markdown/splitMarkdownIntoSections.d.ts +12 -0
- package/esm/typings/src/utils/markdown/splitMarkdownIntoSections.test.d.ts +1 -0
- package/esm/typings/src/utils/normalization/DIACRITIC_VARIANTS_LETTERS.d.ts +10 -0
- package/esm/typings/src/utils/normalization/IKeywords.d.ts +18 -0
- package/esm/typings/src/utils/normalization/capitalize.d.ts +5 -0
- package/esm/typings/src/utils/normalization/capitalize.test.d.ts +1 -0
- package/esm/typings/src/utils/normalization/decapitalize.d.ts +5 -0
- package/esm/typings/src/utils/normalization/decapitalize.test.d.ts +1 -0
- package/esm/typings/src/utils/normalization/isValidKeyword.d.ts +8 -0
- package/esm/typings/src/utils/normalization/isValidKeyword.test.d.ts +1 -0
- package/esm/typings/src/utils/normalization/nameToUriPart.d.ts +1 -0
- package/esm/typings/src/utils/normalization/nameToUriPart.test.d.ts +1 -0
- package/esm/typings/src/utils/normalization/nameToUriParts.d.ts +1 -0
- package/esm/typings/src/utils/normalization/nameToUriParts.test.d.ts +1 -0
- package/esm/typings/src/utils/normalization/normalize-to-kebab-case.d.ts +8 -0
- package/esm/typings/src/utils/normalization/normalize-to-kebab-case.test.d.ts +1 -0
- package/esm/typings/src/utils/normalization/normalizeTo_PascalCase.d.ts +8 -0
- package/esm/typings/src/utils/normalization/normalizeTo_PascalCase.test.d.ts +1 -0
- package/esm/typings/src/utils/normalization/normalizeTo_SCREAMING_CASE.d.ts +16 -0
- package/esm/typings/src/utils/normalization/normalizeTo_SCREAMING_CASE.test.d.ts +1 -0
- package/esm/typings/src/utils/normalization/normalizeTo_camelCase.d.ts +11 -0
- package/esm/typings/src/utils/normalization/normalizeTo_camelCase.test.d.ts +1 -0
- package/esm/typings/src/utils/normalization/normalizeTo_snake_case.d.ts +8 -0
- package/esm/typings/src/utils/normalization/normalizeTo_snake_case.test.d.ts +1 -0
- package/esm/typings/src/utils/normalization/normalizeWhitespaces.d.ts +4 -0
- package/esm/typings/src/utils/normalization/normalizeWhitespaces.test.d.ts +1 -0
- package/esm/typings/src/utils/normalization/parseKeywords.d.ts +14 -0
- package/esm/typings/src/utils/normalization/parseKeywords.test.d.ts +1 -0
- package/esm/typings/src/utils/normalization/parseKeywordsFromString.d.ts +8 -0
- package/esm/typings/src/utils/normalization/parseKeywordsFromString.test.d.ts +1 -0
- package/esm/typings/src/utils/normalization/removeDiacritics.d.ts +4 -0
- package/esm/typings/src/utils/normalization/removeDiacritics.test.d.ts +1 -0
- package/esm/typings/src/utils/normalization/searchKeywords.d.ts +5 -0
- package/esm/typings/src/utils/normalization/searchKeywords.test.d.ts +1 -0
- package/esm/typings/src/utils/parseNumber.d.ts +15 -0
- package/esm/typings/src/utils/parseNumber.test.d.ts +1 -0
- package/esm/typings/src/utils/postprocessing/extractBlock.d.ts +12 -0
- package/esm/typings/src/utils/removeEmojis.d.ts +7 -0
- package/esm/typings/src/utils/removeEmojis.test.d.ts +1 -0
- package/esm/typings/src/utils/removeQuotes.d.ts +13 -0
- package/esm/typings/src/utils/removeQuotes.test.d.ts +1 -0
- package/esm/typings/src/utils/sets/difference.d.ts +6 -0
- package/esm/typings/src/utils/sets/difference.test.d.ts +1 -0
- package/esm/typings/src/utils/sets/intersection.d.ts +6 -0
- package/esm/typings/src/utils/sets/intersection.test.d.ts +1 -0
- package/esm/typings/src/utils/sets/union.d.ts +6 -0
- package/esm/typings/src/utils/sets/union.test.d.ts +1 -0
- package/esm/typings/src/utils/trimCodeBlock.d.ts +8 -0
- package/esm/typings/src/utils/trimCodeBlock.test.d.ts +1 -0
- package/esm/typings/src/utils/trimEndOfCodeBlock.d.ts +7 -0
- package/esm/typings/src/utils/trimEndOfCodeBlock.test.d.ts +1 -0
- package/esm/typings/src/utils/unwrapResult.d.ts +36 -0
- package/esm/typings/src/utils/unwrapResult.test.d.ts +1 -0
- package/esm/typings/src/utils/validators/email/isValidEmail.d.ts +5 -0
- package/esm/typings/src/utils/validators/email/isValidEmail.test.d.ts +1 -0
- package/esm/typings/src/utils/validators/filePath/isValidFilePath.d.ts +7 -0
- package/esm/typings/src/utils/validators/filePath/isValidFilePath.test.d.ts +1 -0
- package/esm/typings/src/utils/validators/javascriptName/isValidJavascriptName.d.ts +2 -0
- package/esm/typings/src/utils/validators/javascriptName/isValidJavascriptName.test.d.ts +1 -0
- package/esm/typings/src/utils/validators/semanticVersion/isValidPromptbookVersion.d.ts +12 -0
- package/esm/typings/src/utils/validators/semanticVersion/isValidPromptbookVersion.test.d.ts +1 -0
- package/esm/typings/src/utils/validators/semanticVersion/isValidSemanticVersion.d.ts +9 -0
- package/esm/typings/src/utils/validators/semanticVersion/isValidSemanticVersion.test.d.ts +1 -0
- package/esm/typings/src/utils/validators/url/isHostnameOnPrivateNetwork.d.ts +9 -0
- package/esm/typings/src/utils/validators/url/isHostnameOnPrivateNetwork.test.d.ts +1 -0
- package/esm/typings/src/utils/validators/url/isUrlOnPrivateNetwork.d.ts +12 -0
- package/esm/typings/src/utils/validators/url/isUrlOnPrivateNetwork.test.d.ts +1 -0
- package/esm/typings/src/utils/validators/url/isValidPipelineUrl.d.ts +12 -0
- package/esm/typings/src/utils/validators/url/isValidPipelineUrl.test.d.ts +1 -0
- package/esm/typings/src/utils/validators/url/isValidUrl.d.ts +10 -0
- package/esm/typings/src/utils/validators/url/isValidUrl.test.d.ts +1 -0
- package/esm/typings/src/utils/validators/uuid/isValidUuid.d.ts +5 -0
- package/esm/typings/src/utils/validators/uuid/isValidUuid.test.d.ts +1 -0
- package/esm/typings/src/version.d.ts +6 -0
- package/package.json +55 -0
- package/umd/index.umd.js +502 -0
- package/umd/index.umd.js.map +1 -0
- package/umd/typings/promptbook-collection/index.d.ts +82 -0
- package/umd/typings/src/_packages/anthropic-claude.index.d.ts +5 -0
- package/umd/typings/src/_packages/azure-openai.index.d.ts +4 -0
- package/umd/typings/src/_packages/cli.index.d.ts +10 -0
- package/umd/typings/src/_packages/core.index.d.ts +44 -0
- package/umd/typings/src/_packages/execute-javascript.index.d.ts +48 -0
- package/umd/typings/src/_packages/fake-llm.index.d.ts +7 -0
- package/umd/typings/src/_packages/langtail.index.d.ts +4 -0
- package/umd/typings/src/_packages/markdown-utils.index.d.ts +17 -0
- package/umd/typings/src/_packages/node.index.d.ts +4 -0
- package/umd/typings/src/_packages/openai.index.d.ts +5 -0
- package/umd/typings/src/_packages/remote-client.index.d.ts +5 -0
- package/umd/typings/src/_packages/remote-server.index.d.ts +4 -0
- package/umd/typings/src/_packages/types.index.d.ts +38 -0
- package/umd/typings/src/_packages/utils.index.d.ts +74 -0
- package/umd/typings/src/cli/cli-commands/hello.d.ts +7 -0
- package/umd/typings/src/cli/cli-commands/make.d.ts +7 -0
- package/umd/typings/src/cli/cli-commands/prettify.d.ts +7 -0
- package/umd/typings/src/cli/promptbookCli.d.ts +9 -0
- package/umd/typings/src/collection/PipelineCollection.d.ts +25 -0
- package/umd/typings/src/collection/SimplePipelineCollection.d.ts +38 -0
- package/umd/typings/src/collection/collectionToJson.d.ts +11 -0
- package/umd/typings/src/collection/collectionToJson.test.d.ts +7 -0
- package/umd/typings/src/collection/constructors/createCollectionFromDirectory.d.ts +47 -0
- package/umd/typings/src/collection/constructors/createCollectionFromDirectory.test.d.ts +1 -0
- package/umd/typings/src/collection/constructors/createCollectionFromJson.d.ts +12 -0
- package/umd/typings/src/collection/constructors/createCollectionFromJson.test.d.ts +1 -0
- package/umd/typings/src/collection/constructors/createCollectionFromPromise.d.ts +22 -0
- package/umd/typings/src/collection/constructors/createCollectionFromPromise.test.d.ts +1 -0
- package/umd/typings/src/collection/constructors/createCollectionFromUrl.d.ts +29 -0
- package/umd/typings/src/collection/constructors/createSubcollection.d.ts +12 -0
- package/umd/typings/src/collection/constructors/justTestFsImport.d.ts +7 -0
- package/umd/typings/src/commands/BLOCK/BlockCommand.d.ts +11 -0
- package/umd/typings/src/commands/BLOCK/BlockTypes.d.ts +13 -0
- package/umd/typings/src/commands/BLOCK/blockCommand.test.d.ts +1 -0
- package/umd/typings/src/commands/BLOCK/blockCommandParser.d.ts +9 -0
- package/umd/typings/src/commands/EXPECT/ExpectAmountCommand.d.ts +14 -0
- package/umd/typings/src/commands/EXPECT/ExpectCommand.d.ts +9 -0
- package/umd/typings/src/commands/EXPECT/ExpectFormatCommand.d.ts +7 -0
- package/umd/typings/src/commands/EXPECT/expectCommand.test.d.ts +1 -0
- package/umd/typings/src/commands/EXPECT/expectCommandParser.d.ts +9 -0
- package/umd/typings/src/commands/JOKER/JokerCommand.d.ts +11 -0
- package/umd/typings/src/commands/JOKER/jokerCommand.test.d.ts +1 -0
- package/umd/typings/src/commands/JOKER/jokerCommandParser.d.ts +9 -0
- package/umd/typings/src/commands/KNOWLEDGE/KnowledgeCommand.d.ts +12 -0
- package/umd/typings/src/commands/KNOWLEDGE/knowledgeCommand.test.d.ts +1 -0
- package/umd/typings/src/commands/KNOWLEDGE/knowledgeCommandParser.d.ts +9 -0
- package/umd/typings/src/commands/MODEL/ModelCommand.d.ts +13 -0
- package/umd/typings/src/commands/MODEL/modelCommand.test.d.ts +1 -0
- package/umd/typings/src/commands/MODEL/modelCommandParser.d.ts +9 -0
- package/umd/typings/src/commands/PARAMETER/ParameterCommand.d.ts +15 -0
- package/umd/typings/src/commands/PARAMETER/parameterCommand.test.d.ts +1 -0
- package/umd/typings/src/commands/PARAMETER/parameterCommandParser.d.ts +9 -0
- package/umd/typings/src/commands/PERSONA/PersonaCommand.d.ts +11 -0
- package/umd/typings/src/commands/PERSONA/personaCommand.test.d.ts +1 -0
- package/umd/typings/src/commands/PERSONA/personaCommandParser.d.ts +9 -0
- package/umd/typings/src/commands/POSTPROCESS/PostprocessCommand.d.ts +11 -0
- package/umd/typings/src/commands/POSTPROCESS/postprocessCommand.test.d.ts +1 -0
- package/umd/typings/src/commands/POSTPROCESS/postprocessCommandParser.d.ts +9 -0
- package/umd/typings/src/commands/PROMPTBOOK_VERSION/PromptbookVersionCommand.d.ts +11 -0
- package/umd/typings/src/commands/PROMPTBOOK_VERSION/promptbookVersionCommand.test.d.ts +1 -0
- package/umd/typings/src/commands/PROMPTBOOK_VERSION/promptbookVersionCommandParser.d.ts +9 -0
- package/umd/typings/src/commands/URL/UrlCommand.d.ts +10 -0
- package/umd/typings/src/commands/URL/urlCommand.test.d.ts +1 -0
- package/umd/typings/src/commands/URL/urlCommandParser.d.ts +9 -0
- package/umd/typings/src/commands/X_ACTION/ActionCommand.d.ts +9 -0
- package/umd/typings/src/commands/X_ACTION/actionCommand.test.d.ts +1 -0
- package/umd/typings/src/commands/X_ACTION/actionCommandParser.d.ts +9 -0
- package/umd/typings/src/commands/X_INSTRUMENT/InstrumentCommand.d.ts +9 -0
- package/umd/typings/src/commands/X_INSTRUMENT/instrumentCommand.test.d.ts +1 -0
- package/umd/typings/src/commands/X_INSTRUMENT/instrumentCommandParser.d.ts +9 -0
- package/umd/typings/src/commands/_BOILERPLATE/BoilerplateCommand.d.ts +10 -0
- package/umd/typings/src/commands/_BOILERPLATE/boilerplateCommand.test.d.ts +1 -0
- package/umd/typings/src/commands/_BOILERPLATE/boilerplateCommandParser.d.ts +12 -0
- package/umd/typings/src/commands/_common/parseCommand.d.ts +12 -0
- package/umd/typings/src/commands/_common/parseCommand.test.d.ts +1 -0
- package/umd/typings/src/commands/_common/types/Command.d.ts +6 -0
- package/umd/typings/src/commands/_common/types/CommandParser.d.ts +36 -0
- package/umd/typings/src/commands/_common/types/CommandUsagePlaces.d.ts +9 -0
- package/umd/typings/src/commands/index.d.ts +4 -0
- package/umd/typings/src/config.d.ts +16 -0
- package/umd/typings/src/conversion/pipelineJsonToString.d.ts +14 -0
- package/umd/typings/src/conversion/pipelineStringToJson.d.ts +31 -0
- package/umd/typings/src/conversion/pipelineStringToJson.test.d.ts +1 -0
- package/umd/typings/src/conversion/pipelineStringToJsonSync.d.ts +25 -0
- package/umd/typings/src/conversion/pipelineStringToJsonSync.test.d.ts +1 -0
- package/umd/typings/src/conversion/prettify/PrettifyOptions.d.ts +13 -0
- package/umd/typings/src/conversion/prettify/prettifyPipelineString.d.ts +10 -0
- package/umd/typings/src/conversion/prettify/renderPipelineMermaidOptions.d.ts +25 -0
- package/umd/typings/src/conversion/utils/extractParametersFromPromptTemplate.d.ts +13 -0
- package/umd/typings/src/conversion/utils/extractParametersFromPromptTemplate.test.d.ts +1 -0
- package/umd/typings/src/conversion/utils/extractVariables.d.ts +13 -0
- package/umd/typings/src/conversion/utils/extractVariables.test.d.ts +1 -0
- package/umd/typings/src/conversion/utils/renameParameter.d.ts +25 -0
- package/umd/typings/src/conversion/utils/renameParameter.test.d.ts +1 -0
- package/umd/typings/src/conversion/utils/titleToName.d.ts +4 -0
- package/umd/typings/src/conversion/utils/titleToName.test.d.ts +1 -0
- package/umd/typings/src/conversion/validation/_importPipeline.d.ts +13 -0
- package/umd/typings/src/conversion/validation/pipelineStringToJson-syntaxErrors.test.d.ts +1 -0
- package/umd/typings/src/conversion/validation/validatePipeline-logicErrors.test.d.ts +4 -0
- package/umd/typings/src/conversion/validation/validatePipeline.d.ts +27 -0
- package/umd/typings/src/conversion/validation/validatePipeline.test.d.ts +1 -0
- package/umd/typings/src/errors/CollectionError.d.ts +7 -0
- package/umd/typings/src/errors/NotFoundError.d.ts +7 -0
- package/umd/typings/src/errors/NotYetImplementedError.d.ts +7 -0
- package/umd/typings/src/errors/ParsingError.d.ts +7 -0
- package/umd/typings/src/errors/PipelineExecutionError.d.ts +7 -0
- package/umd/typings/src/errors/PipelineLogicError.d.ts +7 -0
- package/umd/typings/src/errors/ReferenceError.d.ts +7 -0
- package/umd/typings/src/errors/UnexpectedError.d.ts +7 -0
- package/umd/typings/src/errors/_ExpectError.d.ts +10 -0
- package/umd/typings/src/execution/CommonExecutionToolsOptions.d.ts +9 -0
- package/umd/typings/src/execution/EmbeddingVector.d.ts +8 -0
- package/umd/typings/src/execution/ExecutionTools.d.ts +33 -0
- package/umd/typings/src/execution/LlmExecutionTools.d.ts +70 -0
- package/umd/typings/src/execution/PipelineExecutor.d.ts +42 -0
- package/umd/typings/src/execution/PromptResult.d.ts +114 -0
- package/umd/typings/src/execution/ScriptExecutionTools.d.ts +38 -0
- package/umd/typings/src/execution/UserInterfaceTools.d.ts +46 -0
- package/umd/typings/src/execution/addPromptResultUsage.test.d.ts +1 -0
- package/umd/typings/src/execution/assertsExecutionSuccessful.d.ts +11 -0
- package/umd/typings/src/execution/createPipelineExecutor.d.ts +42 -0
- package/umd/typings/src/execution/embeddingVectorToString.d.ts +5 -0
- package/umd/typings/src/execution/translation/automatic-translate/automatic-translators/AutomaticTranslator.d.ts +4 -0
- package/umd/typings/src/execution/translation/automatic-translate/automatic-translators/DebugAutomaticTranslator.d.ts +9 -0
- package/umd/typings/src/execution/translation/automatic-translate/automatic-translators/FakeAutomaticTranslator.d.ts +5 -0
- package/umd/typings/src/execution/translation/automatic-translate/automatic-translators/LindatAutomaticTranslator.d.ts +11 -0
- package/umd/typings/src/execution/translation/automatic-translate/automatic-translators/TranslatorOptions.d.ts +4 -0
- package/umd/typings/src/execution/translation/automatic-translate/automatic-translators/utils/extractMultiplicatedOccurrence.d.ts +7 -0
- package/umd/typings/src/execution/translation/automatic-translate/automatic-translators/utils/extractMultiplicatedOccurrence.test.d.ts +1 -0
- package/umd/typings/src/execution/translation/automatic-translate/translateMessages.d.ts +5 -0
- package/umd/typings/src/execution/utils/addUsage.d.ts +7 -0
- package/umd/typings/src/execution/utils/addUsage.test.d.ts +1 -0
- package/umd/typings/src/execution/utils/checkExpectations.d.ts +25 -0
- package/umd/typings/src/execution/utils/checkExpectations.test.d.ts +1 -0
- package/umd/typings/src/execution/utils/computeUsageCounts.d.ts +10 -0
- package/umd/typings/src/execution/utils/forEachAsync.d.ts +18 -0
- package/umd/typings/src/execution/utils/replaceParameters.d.ts +13 -0
- package/umd/typings/src/execution/utils/replaceParameters.test.d.ts +1 -0
- package/umd/typings/src/execution/utils/uncertainNumber.d.ts +9 -0
- package/umd/typings/src/execution/utils/usageToWorktime.d.ts +10 -0
- package/umd/typings/src/execution/utils/usageToWorktime.test.d.ts +1 -0
- package/umd/typings/src/expectations/drafts/isDomainNameFree.d.ts +6 -0
- package/umd/typings/src/expectations/drafts/isGithubNameFree.d.ts +6 -0
- package/umd/typings/src/formats/_common/FormatDefinition.d.ts +69 -0
- package/umd/typings/src/formats/csv/ListFormatDefinition.d.ts +11 -0
- package/umd/typings/src/formats/index.d.ts +4 -0
- package/umd/typings/src/formats/json/JsonFormatDefinition.d.ts +15 -0
- package/umd/typings/src/formats/json/utils/isValidJsonString.d.ts +4 -0
- package/umd/typings/src/formats/json/utils/isValidJsonString.test.d.ts +1 -0
- package/umd/typings/src/formats/list/ListFormatDefinition.d.ts +13 -0
- package/umd/typings/src/formats/xml/XmlFormatDefinition.d.ts +15 -0
- package/umd/typings/src/knowledge/dialogs/callback/CallbackInterfaceTools.d.ts +15 -0
- package/umd/typings/src/knowledge/dialogs/callback/CallbackInterfaceToolsOptions.d.ts +12 -0
- package/umd/typings/src/knowledge/dialogs/simple-prompt/SimplePromptInterfaceTools.d.ts +17 -0
- package/umd/typings/src/knowledge/dialogs/user-interface-execution-tools.test.d.ts +1 -0
- package/umd/typings/src/knowledge/prepare-knowledge/markdown/playground/markdown-knowledge-playground.d.ts +2 -0
- package/umd/typings/src/knowledge/prepare-knowledge/markdown/prepareKnowledgeFromMarkdown.d.ts +26 -0
- package/umd/typings/src/knowledge/prepare-knowledge/markdown/prepareKnowledgeFromMarkdown.test.d.ts +1 -0
- package/umd/typings/src/knowledge/prepare-knowledge/pdf/prepareKnowledgeFromPdf.d.ts +19 -0
- package/umd/typings/src/knowledge/prepare-knowledge/pdf/prepareKnowledgeFromPdf.test.d.ts +1 -0
- package/umd/typings/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +48 -0
- package/umd/typings/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionToolsOptions.d.ts +8 -0
- package/umd/typings/src/llm-providers/anthropic-claude/anthropic-claude-models.d.ts +22 -0
- package/umd/typings/src/llm-providers/anthropic-claude/playground/playground.d.ts +2 -0
- package/umd/typings/src/llm-providers/azure-openai/AzureOpenAiExecutionTools.d.ts +47 -0
- package/umd/typings/src/llm-providers/azure-openai/AzureOpenAiExecutionToolsOptions.d.ts +35 -0
- package/umd/typings/src/llm-providers/azure-openai/playground/playground.d.ts +2 -0
- package/umd/typings/src/llm-providers/langtail/LangtailExecutionTools.d.ts +12 -0
- package/umd/typings/src/llm-providers/langtail/LangtailExecutionToolsOptions.d.ts +11 -0
- package/umd/typings/src/llm-providers/langtail/playground/playground.d.ts +2 -0
- package/umd/typings/src/llm-providers/mocked/MockedEchoLlmExecutionTools.d.ts +34 -0
- package/umd/typings/src/llm-providers/mocked/MockedFackedLlmExecutionTools.d.ts +38 -0
- package/umd/typings/src/llm-providers/mocked/fakeTextToExpectations.d.ts +14 -0
- package/umd/typings/src/llm-providers/mocked/test/fakeTextToExpectations.test.d.ts +1 -0
- package/umd/typings/src/llm-providers/mocked/test/faked-completion.test.d.ts +1 -0
- package/umd/typings/src/llm-providers/mocked/test/joker.test.d.ts +4 -0
- package/umd/typings/src/llm-providers/mocked/test/mocked-chat.test.d.ts +5 -0
- package/umd/typings/src/llm-providers/mocked/test/mocked-completion.test.d.ts +4 -0
- package/umd/typings/src/llm-providers/multiple/MultipleLlmExecutionTools.d.ts +50 -0
- package/umd/typings/src/llm-providers/multiple/joinLlmExecutionTools.d.ts +16 -0
- package/umd/typings/src/llm-providers/multiple/playground/playground.d.ts +2 -0
- package/umd/typings/src/llm-providers/openai/OpenAiExecutionTools.d.ts +65 -0
- package/umd/typings/src/llm-providers/openai/OpenAiExecutionToolsOptions.d.ts +18 -0
- package/umd/typings/src/llm-providers/openai/computeOpenaiUsage.d.ts +14 -0
- package/umd/typings/src/llm-providers/openai/computeUsage.d.ts +16 -0
- package/umd/typings/src/llm-providers/openai/computeUsage.test.d.ts +1 -0
- package/umd/typings/src/llm-providers/openai/openai-models.d.ts +27 -0
- package/umd/typings/src/llm-providers/openai/playground/playground.d.ts +2 -0
- package/umd/typings/src/llm-providers/remote/RemoteLlmExecutionTools.d.ts +52 -0
- package/umd/typings/src/llm-providers/remote/RemoteLlmExecutionToolsOptions.d.ts +24 -0
- package/umd/typings/src/llm-providers/remote/interfaces/Promptbook_Server_Error.d.ts +11 -0
- package/umd/typings/src/llm-providers/remote/interfaces/Promptbook_Server_Progress.d.ts +12 -0
- package/umd/typings/src/llm-providers/remote/interfaces/Promptbook_Server_Request.d.ts +17 -0
- package/umd/typings/src/llm-providers/remote/interfaces/Promptbook_Server_Response.d.ts +12 -0
- package/umd/typings/src/llm-providers/remote/interfaces/RemoteServerOptions.d.ts +28 -0
- package/umd/typings/src/llm-providers/remote/startRemoteServer.d.ts +19 -0
- package/umd/typings/src/personas/personaToModelRequirements.d.ts +6 -0
- package/umd/typings/src/scripting/_test/custom-function-async.test.ts.test.d.ts +1 -0
- package/umd/typings/src/scripting/_test/custom-function-missing.test.d.ts +1 -0
- package/umd/typings/src/scripting/_test/custom-function-with-dependencies.test.d.ts +1 -0
- package/umd/typings/src/scripting/_test/custom-function.test.d.ts +1 -0
- package/umd/typings/src/scripting/_test/postprocessing.test.d.ts +1 -0
- package/umd/typings/src/scripting/_test/script-execution-errors.test.d.ts +1 -0
- package/umd/typings/src/scripting/_test/script-execution-tools.test.d.ts +1 -0
- package/umd/typings/src/scripting/javascript/JavascriptEvalExecutionTools.d.ts +20 -0
- package/umd/typings/src/scripting/javascript/JavascriptEvalExecutionTools.test.d.ts +4 -0
- package/umd/typings/src/scripting/javascript/JavascriptExecutionTools.d.ts +7 -0
- package/umd/typings/src/scripting/javascript/JavascriptExecutionToolsOptions.d.ts +26 -0
- package/umd/typings/src/scripting/javascript/utils/preserve.d.ts +12 -0
- package/umd/typings/src/scripting/javascript/utils/unknownToString.d.ts +7 -0
- package/umd/typings/src/scripting/python/PythonExecutionTools.d.ts +16 -0
- package/umd/typings/src/scripting/typescript/TypescriptExecutionTools.d.ts +16 -0
- package/umd/typings/src/types/Arrayable.d.ts +10 -0
- package/umd/typings/src/types/ModelRequirements.d.ts +43 -0
- package/umd/typings/src/types/Parameters.d.ts +14 -0
- package/umd/typings/src/types/PipelineJson/Expectations.d.ts +28 -0
- package/umd/typings/src/types/PipelineJson/KnowledgeJson.d.ts +6 -0
- package/umd/typings/src/types/PipelineJson/LlmTemplateJson.d.ts +16 -0
- package/umd/typings/src/types/PipelineJson/MaterialKnowledgePieceJson.d.ts +28 -0
- package/umd/typings/src/types/PipelineJson/PipelineJson.d.ts +61 -0
- package/umd/typings/src/types/PipelineJson/PromptDialogJson.d.ts +7 -0
- package/umd/typings/src/types/PipelineJson/PromptTemplateJson.d.ts +9 -0
- package/umd/typings/src/types/PipelineJson/PromptTemplateJsonCommon.d.ts +77 -0
- package/umd/typings/src/types/PipelineJson/PromptTemplateParameterJson.d.ts +26 -0
- package/umd/typings/src/types/PipelineJson/ScriptJson.d.ts +14 -0
- package/umd/typings/src/types/PipelineJson/SimpleTemplateJson.d.ts +7 -0
- package/umd/typings/src/types/PipelineString.d.ts +12 -0
- package/umd/typings/src/types/Prompt.d.ts +65 -0
- package/umd/typings/src/types/ScriptLanguage.d.ts +9 -0
- package/umd/typings/src/types/TaskProgress.d.ts +43 -0
- package/umd/typings/src/types/execution-report/ExecutionReportJson.d.ts +58 -0
- package/umd/typings/src/types/execution-report/ExecutionReportString.d.ts +16 -0
- package/umd/typings/src/types/execution-report/ExecutionReportStringOptions.d.ts +21 -0
- package/umd/typings/src/types/execution-report/config.d.ts +8 -0
- package/umd/typings/src/types/execution-report/countWorkingDuration.d.ts +7 -0
- package/umd/typings/src/types/execution-report/countWorkingDuration.test.d.ts +1 -0
- package/umd/typings/src/types/execution-report/executionReportJsonToString.d.ts +11 -0
- package/umd/typings/src/types/typeAliasEmoji.d.ts +9 -0
- package/umd/typings/src/types/typeAliases.d.ts +480 -0
- package/umd/typings/src/utils/FromtoItems.d.ts +19 -0
- package/umd/typings/src/utils/arrayableToArray.d.ts +11 -0
- package/umd/typings/src/utils/arrayableToArray.test.d.ts +1 -0
- package/umd/typings/src/utils/emojis.d.ts +23 -0
- package/umd/typings/src/utils/expectation-counters/countCharacters.d.ts +5 -0
- package/umd/typings/src/utils/expectation-counters/countCharacters.test.d.ts +1 -0
- package/umd/typings/src/utils/expectation-counters/countLines.d.ts +5 -0
- package/umd/typings/src/utils/expectation-counters/countLines.test.d.ts +1 -0
- package/umd/typings/src/utils/expectation-counters/countPages.d.ts +5 -0
- package/umd/typings/src/utils/expectation-counters/countPages.test.d.ts +1 -0
- package/umd/typings/src/utils/expectation-counters/countParagraphs.d.ts +5 -0
- package/umd/typings/src/utils/expectation-counters/countParagraphs.test.d.ts +1 -0
- package/umd/typings/src/utils/expectation-counters/countSentences.d.ts +9 -0
- package/umd/typings/src/utils/expectation-counters/countSentences.test.d.ts +1 -0
- package/umd/typings/src/utils/expectation-counters/countWords.d.ts +5 -0
- package/umd/typings/src/utils/expectation-counters/countWords.test.d.ts +1 -0
- package/umd/typings/src/utils/expectation-counters/index.d.ts +6 -0
- package/umd/typings/src/utils/extractParameters.d.ts +9 -0
- package/umd/typings/src/utils/extractParameters.test.d.ts +1 -0
- package/umd/typings/src/utils/formatNumber.d.ts +6 -0
- package/umd/typings/src/utils/formatNumber.test.d.ts +1 -0
- package/umd/typings/src/utils/getCurrentIsoDate.d.ts +7 -0
- package/umd/typings/src/utils/isRunningInWhatever.d.ts +12 -0
- package/umd/typings/src/utils/just.d.ts +10 -0
- package/umd/typings/src/utils/markdown/addAutoGeneratedSection.d.ts +11 -0
- package/umd/typings/src/utils/markdown/addAutoGeneratedSection.test.d.ts +1 -0
- package/umd/typings/src/utils/markdown/createMarkdownChart.d.ts +41 -0
- package/umd/typings/src/utils/markdown/createMarkdownChart.test.d.ts +1 -0
- package/umd/typings/src/utils/markdown/createMarkdownTable.d.ts +8 -0
- package/umd/typings/src/utils/markdown/createMarkdownTable.test.d.ts +1 -0
- package/umd/typings/src/utils/markdown/escapeMarkdownBlock.d.ts +6 -0
- package/umd/typings/src/utils/markdown/escapeMarkdownBlock.test.d.ts +1 -0
- package/umd/typings/src/utils/markdown/extractAllBlocksFromMarkdown.d.ts +27 -0
- package/umd/typings/src/utils/markdown/extractAllBlocksFromMarkdown.test.d.ts +1 -0
- package/umd/typings/src/utils/markdown/extractAllListItemsFromMarkdown.d.ts +14 -0
- package/umd/typings/src/utils/markdown/extractAllListItemsFromMarkdown.test.d.ts +1 -0
- package/umd/typings/src/utils/markdown/extractOneBlockFromMarkdown.d.ts +19 -0
- package/umd/typings/src/utils/markdown/extractOneBlockFromMarkdown.test.d.ts +1 -0
- package/umd/typings/src/utils/markdown/flattenMarkdown.d.ts +14 -0
- package/umd/typings/src/utils/markdown/flattenMarkdown.test.d.ts +1 -0
- package/umd/typings/src/utils/markdown/parseMarkdownSection.d.ts +30 -0
- package/umd/typings/src/utils/markdown/parseMarkdownSection.test.d.ts +1 -0
- package/umd/typings/src/utils/markdown/prettifyMarkdown.d.ts +9 -0
- package/umd/typings/src/utils/markdown/prettifyMarkdown.test.d.ts +1 -0
- package/umd/typings/src/utils/markdown/removeContentComments.d.ts +9 -0
- package/umd/typings/src/utils/markdown/removeContentComments.test.d.ts +1 -0
- package/umd/typings/src/utils/markdown/removeMarkdownFormatting.d.ts +8 -0
- package/umd/typings/src/utils/markdown/removeMarkdownFormatting.test.d.ts +1 -0
- package/umd/typings/src/utils/markdown/splitMarkdownIntoSections.d.ts +12 -0
- package/umd/typings/src/utils/markdown/splitMarkdownIntoSections.test.d.ts +1 -0
- package/umd/typings/src/utils/normalization/DIACRITIC_VARIANTS_LETTERS.d.ts +10 -0
- package/umd/typings/src/utils/normalization/IKeywords.d.ts +18 -0
- package/umd/typings/src/utils/normalization/capitalize.d.ts +5 -0
- package/umd/typings/src/utils/normalization/capitalize.test.d.ts +1 -0
- package/umd/typings/src/utils/normalization/decapitalize.d.ts +5 -0
- package/umd/typings/src/utils/normalization/decapitalize.test.d.ts +1 -0
- package/umd/typings/src/utils/normalization/isValidKeyword.d.ts +8 -0
- package/umd/typings/src/utils/normalization/isValidKeyword.test.d.ts +1 -0
- package/umd/typings/src/utils/normalization/nameToUriPart.d.ts +1 -0
- package/umd/typings/src/utils/normalization/nameToUriPart.test.d.ts +1 -0
- package/umd/typings/src/utils/normalization/nameToUriParts.d.ts +1 -0
- package/umd/typings/src/utils/normalization/nameToUriParts.test.d.ts +1 -0
- package/umd/typings/src/utils/normalization/normalize-to-kebab-case.d.ts +8 -0
- package/umd/typings/src/utils/normalization/normalize-to-kebab-case.test.d.ts +1 -0
- package/umd/typings/src/utils/normalization/normalizeTo_PascalCase.d.ts +8 -0
- package/umd/typings/src/utils/normalization/normalizeTo_PascalCase.test.d.ts +1 -0
- package/umd/typings/src/utils/normalization/normalizeTo_SCREAMING_CASE.d.ts +16 -0
- package/umd/typings/src/utils/normalization/normalizeTo_SCREAMING_CASE.test.d.ts +1 -0
- package/umd/typings/src/utils/normalization/normalizeTo_camelCase.d.ts +11 -0
- package/umd/typings/src/utils/normalization/normalizeTo_camelCase.test.d.ts +1 -0
- package/umd/typings/src/utils/normalization/normalizeTo_snake_case.d.ts +8 -0
- package/umd/typings/src/utils/normalization/normalizeTo_snake_case.test.d.ts +1 -0
- package/umd/typings/src/utils/normalization/normalizeWhitespaces.d.ts +4 -0
- package/umd/typings/src/utils/normalization/normalizeWhitespaces.test.d.ts +1 -0
- package/umd/typings/src/utils/normalization/parseKeywords.d.ts +14 -0
- package/umd/typings/src/utils/normalization/parseKeywords.test.d.ts +1 -0
- package/umd/typings/src/utils/normalization/parseKeywordsFromString.d.ts +8 -0
- package/umd/typings/src/utils/normalization/parseKeywordsFromString.test.d.ts +1 -0
- package/umd/typings/src/utils/normalization/removeDiacritics.d.ts +4 -0
- package/umd/typings/src/utils/normalization/removeDiacritics.test.d.ts +1 -0
- package/umd/typings/src/utils/normalization/searchKeywords.d.ts +5 -0
- package/umd/typings/src/utils/normalization/searchKeywords.test.d.ts +1 -0
- package/umd/typings/src/utils/parseNumber.d.ts +15 -0
- package/umd/typings/src/utils/parseNumber.test.d.ts +1 -0
- package/umd/typings/src/utils/postprocessing/extractBlock.d.ts +12 -0
- package/umd/typings/src/utils/removeEmojis.d.ts +7 -0
- package/umd/typings/src/utils/removeEmojis.test.d.ts +1 -0
- package/umd/typings/src/utils/removeQuotes.d.ts +13 -0
- package/umd/typings/src/utils/removeQuotes.test.d.ts +1 -0
- package/umd/typings/src/utils/sets/difference.d.ts +6 -0
- package/umd/typings/src/utils/sets/difference.test.d.ts +1 -0
- package/umd/typings/src/utils/sets/intersection.d.ts +6 -0
- package/umd/typings/src/utils/sets/intersection.test.d.ts +1 -0
- package/umd/typings/src/utils/sets/union.d.ts +6 -0
- package/umd/typings/src/utils/sets/union.test.d.ts +1 -0
- package/umd/typings/src/utils/trimCodeBlock.d.ts +8 -0
- package/umd/typings/src/utils/trimCodeBlock.test.d.ts +1 -0
- package/umd/typings/src/utils/trimEndOfCodeBlock.d.ts +7 -0
- package/umd/typings/src/utils/trimEndOfCodeBlock.test.d.ts +1 -0
- package/umd/typings/src/utils/unwrapResult.d.ts +36 -0
- package/umd/typings/src/utils/unwrapResult.test.d.ts +1 -0
- package/umd/typings/src/utils/validators/email/isValidEmail.d.ts +5 -0
- package/umd/typings/src/utils/validators/email/isValidEmail.test.d.ts +1 -0
- package/umd/typings/src/utils/validators/filePath/isValidFilePath.d.ts +7 -0
- package/umd/typings/src/utils/validators/filePath/isValidFilePath.test.d.ts +1 -0
- package/umd/typings/src/utils/validators/javascriptName/isValidJavascriptName.d.ts +2 -0
- package/umd/typings/src/utils/validators/javascriptName/isValidJavascriptName.test.d.ts +1 -0
- package/umd/typings/src/utils/validators/semanticVersion/isValidPromptbookVersion.d.ts +12 -0
- package/umd/typings/src/utils/validators/semanticVersion/isValidPromptbookVersion.test.d.ts +1 -0
- package/umd/typings/src/utils/validators/semanticVersion/isValidSemanticVersion.d.ts +9 -0
- package/umd/typings/src/utils/validators/semanticVersion/isValidSemanticVersion.test.d.ts +1 -0
- package/umd/typings/src/utils/validators/url/isHostnameOnPrivateNetwork.d.ts +9 -0
- package/umd/typings/src/utils/validators/url/isHostnameOnPrivateNetwork.test.d.ts +1 -0
- package/umd/typings/src/utils/validators/url/isUrlOnPrivateNetwork.d.ts +12 -0
- package/umd/typings/src/utils/validators/url/isUrlOnPrivateNetwork.test.d.ts +1 -0
- package/umd/typings/src/utils/validators/url/isValidPipelineUrl.d.ts +12 -0
- package/umd/typings/src/utils/validators/url/isValidPipelineUrl.test.d.ts +1 -0
- package/umd/typings/src/utils/validators/url/isValidUrl.d.ts +10 -0
- package/umd/typings/src/utils/validators/url/isValidUrl.test.d.ts +1 -0
- package/umd/typings/src/utils/validators/uuid/isValidUuid.d.ts +5 -0
- package/umd/typings/src/utils/validators/uuid/isValidUuid.test.d.ts +1 -0
- package/umd/typings/src/version.d.ts +6 -0
package/esm/index.es.js
ADDED
|
@@ -0,0 +1,479 @@
|
|
|
1
|
+
import spaceTrim$1, { spaceTrim } from 'spacetrim';
|
|
2
|
+
|
|
3
|
+
/*! *****************************************************************************
|
|
4
|
+
Copyright (c) Microsoft Corporation.
|
|
5
|
+
|
|
6
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
7
|
+
purpose with or without fee is hereby granted.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
10
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
11
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
12
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
13
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
14
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
15
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
16
|
+
***************************************************************************** */
|
|
17
|
+
|
|
18
|
+
function __values(o) {
|
|
19
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
20
|
+
if (m) return m.call(o);
|
|
21
|
+
if (o && typeof o.length === "number") return {
|
|
22
|
+
next: function () {
|
|
23
|
+
if (o && i >= o.length) o = void 0;
|
|
24
|
+
return { value: o && o[i++], done: !o };
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function __read(o, n) {
|
|
31
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
32
|
+
if (!m) return o;
|
|
33
|
+
var i = m.call(o), r, ar = [], e;
|
|
34
|
+
try {
|
|
35
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
36
|
+
}
|
|
37
|
+
catch (error) { e = { error: error }; }
|
|
38
|
+
finally {
|
|
39
|
+
try {
|
|
40
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
41
|
+
}
|
|
42
|
+
finally { if (e) throw e.error; }
|
|
43
|
+
}
|
|
44
|
+
return ar;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function __spreadArray(to, from, pack) {
|
|
48
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
49
|
+
if (ar || !(i in from)) {
|
|
50
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
51
|
+
ar[i] = from[i];
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Removes HTML or Markdown comments from a string.
|
|
59
|
+
*
|
|
60
|
+
* @param {string} content - The string to remove comments from.
|
|
61
|
+
* @returns {string} The input string with all comments removed.
|
|
62
|
+
*/
|
|
63
|
+
function removeContentComments(content) {
|
|
64
|
+
return spaceTrim(content.replace(/<!--(.*?)-->/gs, ''));
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Add or modify an auto-generated section in a markdown file
|
|
69
|
+
*
|
|
70
|
+
* @private within the package
|
|
71
|
+
*/
|
|
72
|
+
function addAutoGeneratedSection(content, options) {
|
|
73
|
+
var sectionName = options.sectionName, sectionContent = options.sectionContent;
|
|
74
|
+
var warningLine = "<!-- \u26A0\uFE0F WARNING: This section was auto-generated -->";
|
|
75
|
+
var sectionRegex = new RegExp("<!--".concat(sectionName, "-->([\\s\\S]*?)<!--/").concat(sectionName, "-->"), 'g');
|
|
76
|
+
var sectionMatch = content.match(sectionRegex);
|
|
77
|
+
if (sectionMatch) {
|
|
78
|
+
return content.replace(sectionRegex, spaceTrim(function (block) { return "\n <!--".concat(sectionName, "-->\n ").concat(block(warningLine), "\n ").concat(block(sectionContent), "\n <!--/").concat(sectionName, "-->\n "); }));
|
|
79
|
+
}
|
|
80
|
+
var placeForSection = removeContentComments(content).match(/^##.*$/im);
|
|
81
|
+
if (!placeForSection) {
|
|
82
|
+
throw new Error("No place where to put the section <!--".concat(sectionName, "-->"));
|
|
83
|
+
}
|
|
84
|
+
var _a = __read(placeForSection, 1), heading = _a[0];
|
|
85
|
+
return content.replace(heading, "<!--".concat(sectionName, "-->\n").concat(warningLine, "\n").concat(sectionContent, "\n<!--/").concat(sectionName, "-->\n\n").concat(heading));
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Format either small or big number
|
|
90
|
+
*
|
|
91
|
+
* @private within the package
|
|
92
|
+
*/
|
|
93
|
+
function formatNumber(value) {
|
|
94
|
+
if (value === 0) {
|
|
95
|
+
return '0';
|
|
96
|
+
}
|
|
97
|
+
for (var exponent = 0; exponent < 15; exponent++) {
|
|
98
|
+
var factor = Math.pow(10, exponent);
|
|
99
|
+
var valueRounded = Math.round(value * factor) / factor;
|
|
100
|
+
if (Math.abs(value - valueRounded) / value <
|
|
101
|
+
0.001 /* <- TODO: Pass as option, pass to executionReportJsonToString as option */) {
|
|
102
|
+
return valueRounded.toFixed(exponent);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
return value.toString();
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Removes emojis from a string and fix whitespaces
|
|
110
|
+
*
|
|
111
|
+
* @param text with emojis
|
|
112
|
+
* @returns text without emojis
|
|
113
|
+
*/
|
|
114
|
+
function removeEmojis(text) {
|
|
115
|
+
// Replace emojis (and also ZWJ sequence) with hyphens
|
|
116
|
+
text = text.replace(/(\p{Extended_Pictographic})\p{Modifier_Symbol}/gu, '$1');
|
|
117
|
+
text = text.replace(/(\p{Extended_Pictographic})[\u{FE00}-\u{FE0F}]/gu, '$1');
|
|
118
|
+
text = text.replace(/(\p{Extended_Pictographic})(\u{200D}\p{Extended_Pictographic})*/gu, '$1');
|
|
119
|
+
text = text.replace(/\p{Extended_Pictographic}/gu, '');
|
|
120
|
+
return text;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Create a markdown table from a 2D array of strings
|
|
125
|
+
*
|
|
126
|
+
* @private within the package
|
|
127
|
+
*/
|
|
128
|
+
function createMarkdownTable(table) {
|
|
129
|
+
var columnWidths = table.reduce(function (widths, row) {
|
|
130
|
+
row.forEach(function (cell, columnIndex) {
|
|
131
|
+
var cellLength = cell.length;
|
|
132
|
+
if (!widths[columnIndex] || cellLength > widths[columnIndex]) {
|
|
133
|
+
widths[columnIndex] = cellLength;
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
return widths;
|
|
137
|
+
}, []);
|
|
138
|
+
var header = "| ".concat(table[0]
|
|
139
|
+
.map(function (cell, columnIndex) { return cell.padEnd(columnWidths[columnIndex]); })
|
|
140
|
+
.join(' | '), " |");
|
|
141
|
+
var separator = "|".concat(columnWidths.map(function (width) { return '-'.repeat(width + 2); }).join('|'), "|");
|
|
142
|
+
var rows = table.slice(1).map(function (row) {
|
|
143
|
+
var paddedRow = row.map(function (cell, columnIndex) {
|
|
144
|
+
return cell.padEnd(columnWidths[columnIndex]);
|
|
145
|
+
});
|
|
146
|
+
return "| ".concat(paddedRow.join(' | '), " |");
|
|
147
|
+
});
|
|
148
|
+
return __spreadArray([header, separator], __read(rows), false).join('\n');
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Function createMarkdownChart will draw a chart in markdown from ⬛+🟦 tiles
|
|
153
|
+
*
|
|
154
|
+
* @private within the package
|
|
155
|
+
*/
|
|
156
|
+
function createMarkdownChart(options) {
|
|
157
|
+
var e_1, _a;
|
|
158
|
+
var nameHeader = options.nameHeader, valueHeader = options.valueHeader, items = options.items, width = options.width, unitName = options.unitName;
|
|
159
|
+
var from = Math.min.apply(Math, __spreadArray([], __read(items.map(function (item) { return item.from; })), false));
|
|
160
|
+
var to = Math.max.apply(Math, __spreadArray([], __read(items.map(function (item) { return item.to; })), false));
|
|
161
|
+
var scale = width / (to - from);
|
|
162
|
+
var table = [[nameHeader, valueHeader]];
|
|
163
|
+
try {
|
|
164
|
+
for (var items_1 = __values(items), items_1_1 = items_1.next(); !items_1_1.done; items_1_1 = items_1.next()) {
|
|
165
|
+
var item = items_1_1.value;
|
|
166
|
+
var before = Math.round((item.from - from) * scale);
|
|
167
|
+
var during = Math.round((item.to - item.from) * scale);
|
|
168
|
+
var after = width - before - during;
|
|
169
|
+
table.push([removeEmojis(item.title).trim(), '░'.repeat(before) + '█'.repeat(during) + '░'.repeat(after)]);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
173
|
+
finally {
|
|
174
|
+
try {
|
|
175
|
+
if (items_1_1 && !items_1_1.done && (_a = items_1.return)) _a.call(items_1);
|
|
176
|
+
}
|
|
177
|
+
finally { if (e_1) throw e_1.error; }
|
|
178
|
+
}
|
|
179
|
+
var legend = "_Note: Each \u2588 represents ".concat(formatNumber(1 / scale), " ").concat(unitName, ", width of ").concat(valueHeader.toLowerCase(), " is ").concat(formatNumber(to - from), " ").concat(unitName, " = ").concat(width, " squares_");
|
|
180
|
+
return createMarkdownTable(table) + '\n\n' + legend;
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* TODO: Maybe use Mermain Gant Diagrams
|
|
184
|
+
* @see https://jojozhuang.github.io/tutorial/mermaid-cheat-sheet/
|
|
185
|
+
*/
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Function escapeMarkdownBlock will escape markdown block if needed
|
|
189
|
+
* It is useful when you want have block in block
|
|
190
|
+
*/
|
|
191
|
+
function escapeMarkdownBlock(value) {
|
|
192
|
+
return value.replace(/```/g, '\\`\\`\\`');
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Makes first letter of a string uppercase
|
|
197
|
+
*
|
|
198
|
+
*/
|
|
199
|
+
function capitalize(word) {
|
|
200
|
+
return word.substring(0, 1).toUpperCase() + word.substring(1);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Extracts all code blocks from markdown.
|
|
205
|
+
*
|
|
206
|
+
* Note: There are 3 simmilar function:
|
|
207
|
+
* - `extractBlock` just extracts the content of the code block which is also used as build-in function for postprocessing
|
|
208
|
+
* - `extractOneBlockFromMarkdown` extracts exactly one code block with language of the code block
|
|
209
|
+
* - `extractAllBlocksFromMarkdown` extracts all code blocks with language of the code block
|
|
210
|
+
*
|
|
211
|
+
* @param markdown any valid markdown
|
|
212
|
+
* @returns code blocks with language and content
|
|
213
|
+
*
|
|
214
|
+
*/
|
|
215
|
+
function extractAllBlocksFromMarkdown(markdown) {
|
|
216
|
+
var e_1, _a;
|
|
217
|
+
var codeBlocks = [];
|
|
218
|
+
var lines = markdown.split('\n');
|
|
219
|
+
var currentCodeBlock = null;
|
|
220
|
+
try {
|
|
221
|
+
for (var lines_1 = __values(lines), lines_1_1 = lines_1.next(); !lines_1_1.done; lines_1_1 = lines_1.next()) {
|
|
222
|
+
var line = lines_1_1.value;
|
|
223
|
+
if (line.startsWith('```')) {
|
|
224
|
+
var language = line.slice(3).trim() || null;
|
|
225
|
+
if (currentCodeBlock === null) {
|
|
226
|
+
currentCodeBlock = { language: language, content: '' };
|
|
227
|
+
}
|
|
228
|
+
else {
|
|
229
|
+
if (language !== null) {
|
|
230
|
+
// [🌻]
|
|
231
|
+
throw new Error("".concat(capitalize(currentCodeBlock.language || 'the'), " code block was not closed and already opening new ").concat(language, " code block"));
|
|
232
|
+
}
|
|
233
|
+
codeBlocks.push(currentCodeBlock);
|
|
234
|
+
currentCodeBlock = null;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
else if (currentCodeBlock !== null) {
|
|
238
|
+
if (currentCodeBlock.content !== '') {
|
|
239
|
+
currentCodeBlock.content += '\n';
|
|
240
|
+
}
|
|
241
|
+
currentCodeBlock.content += line.split('\\`\\`\\`').join('```') /* <- TODO: Maybe make propper unescape */;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
246
|
+
finally {
|
|
247
|
+
try {
|
|
248
|
+
if (lines_1_1 && !lines_1_1.done && (_a = lines_1.return)) _a.call(lines_1);
|
|
249
|
+
}
|
|
250
|
+
finally { if (e_1) throw e_1.error; }
|
|
251
|
+
}
|
|
252
|
+
if (currentCodeBlock !== null) {
|
|
253
|
+
// [🌻]
|
|
254
|
+
throw new Error("".concat(capitalize(currentCodeBlock.language || 'the'), " code block was not closed at the end of the markdown"));
|
|
255
|
+
}
|
|
256
|
+
return codeBlocks;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* Utility function to extract all list items from markdown
|
|
261
|
+
*
|
|
262
|
+
* Note: It works with both ul and ol
|
|
263
|
+
* Note: It omits list items in code blocks
|
|
264
|
+
* Note: It flattens nested lists
|
|
265
|
+
* Note: It can not work with html syntax and comments
|
|
266
|
+
*
|
|
267
|
+
* @param markdown any valid markdown
|
|
268
|
+
* @returns
|
|
269
|
+
*/
|
|
270
|
+
function extractAllListItemsFromMarkdown(markdown) {
|
|
271
|
+
var e_1, _a;
|
|
272
|
+
var lines = markdown.split('\n');
|
|
273
|
+
var listItems = [];
|
|
274
|
+
var isInCodeBlock = false;
|
|
275
|
+
try {
|
|
276
|
+
for (var lines_1 = __values(lines), lines_1_1 = lines_1.next(); !lines_1_1.done; lines_1_1 = lines_1.next()) {
|
|
277
|
+
var line = lines_1_1.value;
|
|
278
|
+
var trimmedLine = line.trim();
|
|
279
|
+
if (trimmedLine.startsWith('```')) {
|
|
280
|
+
isInCodeBlock = !isInCodeBlock;
|
|
281
|
+
}
|
|
282
|
+
if (!isInCodeBlock && (trimmedLine.startsWith('-') || trimmedLine.match(/^\d+\./))) {
|
|
283
|
+
var listItem = trimmedLine.replace(/^-|\d+\./, '').trim();
|
|
284
|
+
listItems.push(listItem);
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
289
|
+
finally {
|
|
290
|
+
try {
|
|
291
|
+
if (lines_1_1 && !lines_1_1.done && (_a = lines_1.return)) _a.call(lines_1);
|
|
292
|
+
}
|
|
293
|
+
finally { if (e_1) throw e_1.error; }
|
|
294
|
+
}
|
|
295
|
+
return listItems;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* Extracts exactly ONE code block from markdown.
|
|
300
|
+
*
|
|
301
|
+
* Note: If there are multiple or no code blocks the function throws an error
|
|
302
|
+
*
|
|
303
|
+
* Note: There are 3 simmilar function:
|
|
304
|
+
* - `extractBlock` just extracts the content of the code block which is also used as build-in function for postprocessing
|
|
305
|
+
* - `extractOneBlockFromMarkdown` extracts exactly one code block with language of the code block
|
|
306
|
+
* - `extractAllBlocksFromMarkdown` extracts all code blocks with language of the code block
|
|
307
|
+
*
|
|
308
|
+
* @param markdown any valid markdown
|
|
309
|
+
* @returns code block with language and content
|
|
310
|
+
*/
|
|
311
|
+
function extractOneBlockFromMarkdown(markdown) {
|
|
312
|
+
var codeBlocks = extractAllBlocksFromMarkdown(markdown);
|
|
313
|
+
if (codeBlocks.length !== 1) {
|
|
314
|
+
// TODO: Report more specific place where the error happened
|
|
315
|
+
throw new Error(/* <- [🌻] */ 'There should be exactly one code block in the markdown');
|
|
316
|
+
}
|
|
317
|
+
return codeBlocks[0];
|
|
318
|
+
}
|
|
319
|
+
/***
|
|
320
|
+
* TODO: [🍓][🌻] !!! Decide of this is internal util, external util OR validator/postprocessor
|
|
321
|
+
*/
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* Parses markdown section to title its level and content
|
|
325
|
+
*/
|
|
326
|
+
function parseMarkdownSection(value) {
|
|
327
|
+
var _a, _b;
|
|
328
|
+
var lines = value.split('\n');
|
|
329
|
+
if (!lines[0].startsWith('#')) {
|
|
330
|
+
throw new Error('Markdown section must start with heading');
|
|
331
|
+
}
|
|
332
|
+
var title = lines[0].replace(/^#+\s*/, '');
|
|
333
|
+
var level = (_b = (_a = lines[0].match(/^#+/)) === null || _a === void 0 ? void 0 : _a[0].length) !== null && _b !== void 0 ? _b : 0;
|
|
334
|
+
var content = spaceTrim$1(lines.slice(1).join('\n'));
|
|
335
|
+
if (level < 1 || level > 6) {
|
|
336
|
+
throw new Error('Markdown section must have heading level between 1 and 6');
|
|
337
|
+
}
|
|
338
|
+
return { title: title, level: level, content: content };
|
|
339
|
+
}
|
|
340
|
+
/**
|
|
341
|
+
* Note: [🕞] In past (commit 42086e1603cbed506482997c00a8ee979af0a247) there was much more
|
|
342
|
+
* sophisticated implementation of this function through parsing markdown into JSON structure
|
|
343
|
+
* and flattening the actual structure
|
|
344
|
+
* NOW we are working just with markdown string and its good enough
|
|
345
|
+
*/
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* Splits the markdown into sections by headings
|
|
349
|
+
*/
|
|
350
|
+
function splitMarkdownIntoSections(markdown) {
|
|
351
|
+
var e_1, _a;
|
|
352
|
+
var lines = markdown.split('\n');
|
|
353
|
+
var sections = [];
|
|
354
|
+
var currentType = 'MARKDOWN';
|
|
355
|
+
var buffer = [];
|
|
356
|
+
var finishSection = function () {
|
|
357
|
+
if (buffer.length === 0) {
|
|
358
|
+
return;
|
|
359
|
+
}
|
|
360
|
+
var section = spaceTrim$1(buffer.join('\n'));
|
|
361
|
+
if (section === '') {
|
|
362
|
+
return;
|
|
363
|
+
}
|
|
364
|
+
if (!section.startsWith('#')) {
|
|
365
|
+
section = "# Untitled\n\n".concat(section);
|
|
366
|
+
}
|
|
367
|
+
sections.push(section);
|
|
368
|
+
buffer = [];
|
|
369
|
+
};
|
|
370
|
+
try {
|
|
371
|
+
for (var lines_1 = __values(lines), lines_1_1 = lines_1.next(); !lines_1_1.done; lines_1_1 = lines_1.next()) {
|
|
372
|
+
var line = lines_1_1.value;
|
|
373
|
+
if (currentType === 'MARKDOWN') {
|
|
374
|
+
if (line.startsWith('#')) {
|
|
375
|
+
finishSection();
|
|
376
|
+
}
|
|
377
|
+
buffer.push(line);
|
|
378
|
+
if (line.startsWith('```')) {
|
|
379
|
+
currentType = 'CODE_BLOCK';
|
|
380
|
+
}
|
|
381
|
+
else if (line.includes('<!--')) {
|
|
382
|
+
currentType = 'COMMENT';
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
else if (currentType === 'CODE_BLOCK') {
|
|
386
|
+
buffer.push(line);
|
|
387
|
+
if (line.startsWith('```')) {
|
|
388
|
+
currentType = 'MARKDOWN';
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
else if (currentType === 'COMMENT') {
|
|
392
|
+
buffer.push(line);
|
|
393
|
+
if (line.includes('-->')) {
|
|
394
|
+
currentType = 'MARKDOWN';
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
400
|
+
finally {
|
|
401
|
+
try {
|
|
402
|
+
if (lines_1_1 && !lines_1_1.done && (_a = lines_1.return)) _a.call(lines_1);
|
|
403
|
+
}
|
|
404
|
+
finally { if (e_1) throw e_1.error; }
|
|
405
|
+
}
|
|
406
|
+
finishSection();
|
|
407
|
+
return sections;
|
|
408
|
+
}
|
|
409
|
+
/**
|
|
410
|
+
* Note: [🕞] In past (commit 42086e1603cbed506482997c00a8ee979af0a247) there was much more
|
|
411
|
+
* sophisticated implementation of this function through parsing markdown into JSON structure
|
|
412
|
+
* and flattening the actual structure
|
|
413
|
+
* NOW we are working just with markdown string and its good enough
|
|
414
|
+
*/
|
|
415
|
+
|
|
416
|
+
/**
|
|
417
|
+
* Normalizes the markdown by flattening the structure
|
|
418
|
+
*
|
|
419
|
+
* - It always have h1 - if there is no h1 in the markdown, it will be added "# Untitled"
|
|
420
|
+
* - All other headings are normalized to h2
|
|
421
|
+
*/
|
|
422
|
+
function flattenMarkdown(markdown) {
|
|
423
|
+
var e_1, _a;
|
|
424
|
+
var sections = splitMarkdownIntoSections(markdown);
|
|
425
|
+
if (sections.length === 0) {
|
|
426
|
+
return '# Untitled';
|
|
427
|
+
}
|
|
428
|
+
var flattenedMarkdown = '';
|
|
429
|
+
var parsedSections = sections.map(parseMarkdownSection);
|
|
430
|
+
var firstSection = parsedSections.shift();
|
|
431
|
+
if (firstSection.level === 1) {
|
|
432
|
+
flattenedMarkdown += "# ".concat(firstSection.title) + "\n\n";
|
|
433
|
+
flattenedMarkdown += firstSection.content + "\n\n"; // <- [🧠] Maybe 3 new lines?
|
|
434
|
+
}
|
|
435
|
+
else {
|
|
436
|
+
parsedSections.unshift(firstSection);
|
|
437
|
+
flattenedMarkdown += "# Untitled" + "\n\n"; // <- [🧠] Maybe 3 new lines?
|
|
438
|
+
}
|
|
439
|
+
try {
|
|
440
|
+
for (var parsedSections_1 = __values(parsedSections), parsedSections_1_1 = parsedSections_1.next(); !parsedSections_1_1.done; parsedSections_1_1 = parsedSections_1.next()) {
|
|
441
|
+
var _b = parsedSections_1_1.value, title = _b.title, content = _b.content;
|
|
442
|
+
flattenedMarkdown += "## ".concat(title) + "\n\n";
|
|
443
|
+
flattenedMarkdown += content + "\n\n"; // <- [🧠] Maybe 3 new lines?
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
447
|
+
finally {
|
|
448
|
+
try {
|
|
449
|
+
if (parsedSections_1_1 && !parsedSections_1_1.done && (_a = parsedSections_1.return)) _a.call(parsedSections_1);
|
|
450
|
+
}
|
|
451
|
+
finally { if (e_1) throw e_1.error; }
|
|
452
|
+
}
|
|
453
|
+
return spaceTrim$1(flattenedMarkdown);
|
|
454
|
+
}
|
|
455
|
+
/**
|
|
456
|
+
* Note: [🕞] In past (commit 42086e1603cbed506482997c00a8ee979af0a247) there was much more
|
|
457
|
+
* sophisticated implementation of this function through parsing markdown into JSON structure
|
|
458
|
+
* and flattening the actual structure
|
|
459
|
+
* NOW we are working just with markdown string and its good enough
|
|
460
|
+
*/
|
|
461
|
+
|
|
462
|
+
/**
|
|
463
|
+
* Removes Markdown formatting tags from a string.
|
|
464
|
+
*
|
|
465
|
+
* @param {string} str - The string to remove Markdown tags from.
|
|
466
|
+
* @returns {string} The input string with all Markdown tags removed.
|
|
467
|
+
*/
|
|
468
|
+
function removeMarkdownFormatting(str) {
|
|
469
|
+
// Remove bold formatting
|
|
470
|
+
str = str.replace(/\*\*(.*?)\*\*/g, '$1');
|
|
471
|
+
// Remove italic formatting
|
|
472
|
+
str = str.replace(/\*(.*?)\*/g, '$1');
|
|
473
|
+
// Remove code formatting
|
|
474
|
+
str = str.replace(/`(.*?)`/g, '$1');
|
|
475
|
+
return str;
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
export { addAutoGeneratedSection, createMarkdownChart, createMarkdownTable, escapeMarkdownBlock, extractAllBlocksFromMarkdown, extractAllListItemsFromMarkdown, extractOneBlockFromMarkdown, flattenMarkdown, parseMarkdownSection, removeContentComments, removeMarkdownFormatting, splitMarkdownIntoSections };
|
|
479
|
+
//# sourceMappingURL=index.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.es.js","sources":["../../../node_modules/tslib/tslib.es6.js","../../../../src/utils/markdown/removeContentComments.ts","../../../../src/utils/markdown/addAutoGeneratedSection.ts","../../../../src/utils/formatNumber.ts","../../../../src/utils/removeEmojis.ts","../../../../src/utils/markdown/createMarkdownTable.ts","../../../../src/utils/markdown/createMarkdownChart.ts","../../../../src/utils/markdown/escapeMarkdownBlock.ts","../../../../src/utils/normalization/capitalize.ts","../../../../src/utils/markdown/extractAllBlocksFromMarkdown.ts","../../../../src/utils/markdown/extractAllListItemsFromMarkdown.ts","../../../../src/utils/markdown/extractOneBlockFromMarkdown.ts","../../../../src/utils/markdown/parseMarkdownSection.ts","../../../../src/utils/markdown/splitMarkdownIntoSections.ts","../../../../src/utils/markdown/flattenMarkdown.ts","../../../../src/utils/markdown/removeMarkdownFormatting.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"names":["spaceTrim"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAyGA;AACO,SAAS,QAAQ,CAAC,CAAC,EAAE;AAC5B,IAAI,IAAI,CAAC,GAAG,OAAO,MAAM,KAAK,UAAU,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;AAClF,IAAI,IAAI,CAAC,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAC5B,IAAI,IAAI,CAAC,IAAI,OAAO,CAAC,CAAC,MAAM,KAAK,QAAQ,EAAE,OAAO;AAClD,QAAQ,IAAI,EAAE,YAAY;AAC1B,YAAY,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC;AAC/C,YAAY,OAAO,EAAE,KAAK,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;AACpD,SAAS;AACT,KAAK,CAAC;AACN,IAAI,MAAM,IAAI,SAAS,CAAC,CAAC,GAAG,yBAAyB,GAAG,iCAAiC,CAAC,CAAC;AAC3F,CAAC;AACD;AACO,SAAS,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE;AAC7B,IAAI,IAAI,CAAC,GAAG,OAAO,MAAM,KAAK,UAAU,IAAI,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;AAC/D,IAAI,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC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AO,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAC;;IAG1C,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;;IAGtC,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;IAEpC,OAAO,GAAG,CAAC;AACf;;;;"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
declare const _default: ({
|
|
2
|
+
title: string;
|
|
3
|
+
pipelineUrl: string;
|
|
4
|
+
promptbookVersion: string;
|
|
5
|
+
parameters: {
|
|
6
|
+
name: string;
|
|
7
|
+
description: string;
|
|
8
|
+
isInput: boolean;
|
|
9
|
+
isOutput: boolean;
|
|
10
|
+
}[];
|
|
11
|
+
promptTemplates: {
|
|
12
|
+
name: string;
|
|
13
|
+
title: string;
|
|
14
|
+
dependentParameterNames: string[];
|
|
15
|
+
blockType: string;
|
|
16
|
+
modelRequirements: {
|
|
17
|
+
modelVariant: string;
|
|
18
|
+
modelName: string;
|
|
19
|
+
};
|
|
20
|
+
content: string;
|
|
21
|
+
resultingParameterName: string;
|
|
22
|
+
}[];
|
|
23
|
+
knowledge: {
|
|
24
|
+
name: string;
|
|
25
|
+
title: string;
|
|
26
|
+
content: string;
|
|
27
|
+
keywords: string[];
|
|
28
|
+
index: {
|
|
29
|
+
modelName: string;
|
|
30
|
+
position: number[];
|
|
31
|
+
}[];
|
|
32
|
+
sources: {
|
|
33
|
+
title: string;
|
|
34
|
+
href: string;
|
|
35
|
+
}[];
|
|
36
|
+
}[];
|
|
37
|
+
sourceFile: string;
|
|
38
|
+
} | {
|
|
39
|
+
title: string;
|
|
40
|
+
pipelineUrl: string;
|
|
41
|
+
promptbookVersion: string;
|
|
42
|
+
parameters: {
|
|
43
|
+
name: string;
|
|
44
|
+
description: string;
|
|
45
|
+
isInput: boolean;
|
|
46
|
+
isOutput: boolean;
|
|
47
|
+
}[];
|
|
48
|
+
promptTemplates: {
|
|
49
|
+
name: string;
|
|
50
|
+
title: string;
|
|
51
|
+
dependentParameterNames: string[];
|
|
52
|
+
blockType: string;
|
|
53
|
+
expectations: {
|
|
54
|
+
words: {
|
|
55
|
+
min: number;
|
|
56
|
+
max: number;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
modelRequirements: {
|
|
60
|
+
modelVariant: string;
|
|
61
|
+
modelName: string;
|
|
62
|
+
};
|
|
63
|
+
content: string;
|
|
64
|
+
resultingParameterName: string;
|
|
65
|
+
}[];
|
|
66
|
+
knowledge: {
|
|
67
|
+
name: string;
|
|
68
|
+
title: string;
|
|
69
|
+
content: string;
|
|
70
|
+
keywords: string[];
|
|
71
|
+
index: {
|
|
72
|
+
modelName: string;
|
|
73
|
+
position: number[];
|
|
74
|
+
}[];
|
|
75
|
+
sources: {
|
|
76
|
+
title: string;
|
|
77
|
+
href: string;
|
|
78
|
+
}[];
|
|
79
|
+
}[];
|
|
80
|
+
sourceFile: string;
|
|
81
|
+
})[];
|
|
82
|
+
export default _default;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { AnthropicClaudeExecutionTools } from '../llm-providers/anthropic-claude/AnthropicClaudeExecutionTools';
|
|
2
|
+
import type { AnthropicClaudeExecutionToolsOptions } from '../llm-providers/anthropic-claude/AnthropicClaudeExecutionToolsOptions';
|
|
3
|
+
import { PROMPTBOOK_VERSION } from '../version';
|
|
4
|
+
export { PROMPTBOOK_VERSION };
|
|
5
|
+
export { AnthropicClaudeExecutionTools, AnthropicClaudeExecutionToolsOptions };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { AzureOpenAiExecutionTools } from '../llm-providers/azure-openai/AzureOpenAiExecutionTools';
|
|
2
|
+
import type { AzureOpenAiExecutionToolsOptions } from '../llm-providers/azure-openai/AzureOpenAiExecutionToolsOptions';
|
|
3
|
+
import { PROMPTBOOK_VERSION } from '../version';
|
|
4
|
+
export { AzureOpenAiExecutionTools, AzureOpenAiExecutionToolsOptions, PROMPTBOOK_VERSION };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { promptbookCli } from '../cli/promptbookCli';
|
|
2
|
+
import { PROMPTBOOK_VERSION } from '../version';
|
|
3
|
+
export { PROMPTBOOK_VERSION };
|
|
4
|
+
/**
|
|
5
|
+
* Hidden utilities which should not be used by external consumers.
|
|
6
|
+
*/
|
|
7
|
+
declare const __CLI: {
|
|
8
|
+
__initialize: typeof promptbookCli;
|
|
9
|
+
};
|
|
10
|
+
export { __CLI };
|