@promptbook/openai 0.62.1 → 0.63.0-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/index.es.js +48 -8
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/_packages/anthropic-claude.index.d.ts +3 -2
- package/esm/typings/src/_packages/azure-openai.index.d.ts +4 -2
- package/esm/typings/src/_packages/browser.index.d.ts +6 -0
- package/esm/typings/src/_packages/cli.index.d.ts +1 -7
- package/esm/typings/src/_packages/core.index.d.ts +87 -13
- package/esm/typings/src/_packages/execute-javascript.index.d.ts +5 -45
- package/esm/typings/src/_packages/fake-llm.index.d.ts +4 -5
- package/esm/typings/src/_packages/langtail.index.d.ts +4 -2
- package/esm/typings/src/_packages/markdown-utils.index.d.ts +23 -4
- package/esm/typings/src/_packages/node.index.d.ts +5 -2
- package/esm/typings/src/_packages/openai.index.d.ts +5 -2
- package/esm/typings/src/_packages/remote-client.index.d.ts +5 -2
- package/esm/typings/src/_packages/remote-server.index.d.ts +4 -2
- package/esm/typings/src/_packages/types.index.d.ts +441 -21
- package/esm/typings/src/_packages/utils.index.d.ts +84 -31
- package/esm/typings/src/cli/main.d.ts +12 -0
- package/esm/typings/src/collection/collectionToJson.d.ts +2 -0
- package/esm/typings/src/collection/constructors/createCollectionFromDirectory.d.ts +1 -0
- package/esm/typings/src/collection/constructors/createCollectionFromJson.d.ts +1 -0
- package/esm/typings/src/collection/constructors/createCollectionFromPromise.d.ts +1 -0
- package/esm/typings/src/collection/constructors/createCollectionFromUrl.d.ts +1 -1
- package/esm/typings/src/collection/constructors/createSubcollection.d.ts +1 -0
- package/esm/typings/src/commands/BLOCK/BlockTypes.d.ts +2 -0
- package/esm/typings/src/config.d.ts +27 -1
- package/esm/typings/src/conversion/pipelineJsonToString.d.ts +1 -0
- package/esm/typings/src/conversion/pipelineStringToJson.d.ts +6 -3
- package/esm/typings/src/conversion/pipelineStringToJsonSync.d.ts +4 -3
- package/esm/typings/src/conversion/prettify/prettifyPipelineString.d.ts +2 -0
- package/esm/typings/src/conversion/prettify/renderPipelineMermaidOptions.d.ts +2 -0
- package/esm/typings/src/conversion/utils/extractParameterNamesFromPromptTemplate.d.ts +1 -0
- package/esm/typings/src/conversion/utils/extractVariables.d.ts +1 -0
- package/esm/typings/src/conversion/utils/renameParameter.d.ts +1 -0
- package/esm/typings/src/conversion/utils/stringifyPipelineJson.d.ts +2 -0
- package/esm/typings/src/conversion/utils/titleToName.d.ts +6 -1
- package/esm/typings/src/conversion/validation/validatePipeline.d.ts +1 -0
- package/esm/typings/src/errors/CollectionError.d.ts +2 -0
- package/esm/typings/src/errors/EnvironmentMismatchError.d.ts +2 -0
- package/esm/typings/src/errors/LimitReachedError.d.ts +2 -0
- package/esm/typings/src/errors/NotFoundError.d.ts +2 -0
- package/esm/typings/src/errors/NotYetImplementedError.d.ts +2 -0
- package/esm/typings/src/errors/ParsingError.d.ts +2 -0
- package/esm/typings/src/errors/PipelineExecutionError.d.ts +2 -0
- package/esm/typings/src/errors/PipelineLogicError.d.ts +2 -0
- package/esm/typings/src/errors/ReferenceError.d.ts +2 -0
- package/esm/typings/src/errors/UnexpectedError.d.ts +2 -0
- package/esm/typings/src/errors/VersionMismatchError.d.ts +2 -0
- package/esm/typings/src/execution/assertsExecutionSuccessful.d.ts +1 -0
- package/esm/typings/src/execution/createPipelineExecutor.d.ts +1 -0
- package/esm/typings/src/execution/embeddingVectorToString.d.ts +2 -0
- package/esm/typings/src/execution/utils/addUsage.d.ts +3 -1
- package/esm/typings/src/execution/utils/checkExpectations.d.ts +2 -0
- package/esm/typings/src/execution/utils/forEachAsync.d.ts +1 -0
- package/esm/typings/src/execution/utils/usageToHuman.d.ts +2 -0
- package/esm/typings/src/execution/utils/usageToWorktime.d.ts +2 -0
- package/esm/typings/src/formats/_common/FormatDefinition.d.ts +2 -1
- package/esm/typings/src/formats/json/utils/isValidJsonString.d.ts +2 -0
- package/esm/typings/src/knowledge/dialogs/callback/CallbackInterfaceTools.d.ts +2 -0
- package/esm/typings/src/knowledge/dialogs/callback/CallbackInterfaceToolsOptions.d.ts +2 -0
- package/esm/typings/src/knowledge/dialogs/simple-prompt/SimplePromptInterfaceTools.d.ts +3 -1
- package/esm/typings/src/knowledge/prepare-knowledge/_common/Scraper.d.ts +10 -0
- package/esm/typings/src/knowledge/prepare-knowledge/_common/prepareKnowledgePieces.d.ts +1 -1
- package/esm/typings/src/knowledge/prepare-knowledge/markdown/prepareKnowledgeFromMarkdown.d.ts +2 -0
- package/esm/typings/src/llm-providers/_common/createLlmToolsFromEnv.d.ts +4 -1
- package/esm/typings/src/llm-providers/_common/utils/cache/cacheLlmTools.d.ts +1 -1
- package/esm/typings/src/llm-providers/_common/utils/count-total-usage/countTotalUsage.d.ts +1 -1
- package/esm/typings/src/llm-providers/_common/utils/count-total-usage/limitTotalUsage.d.ts +2 -1
- package/esm/typings/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +2 -0
- package/esm/typings/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionToolsOptions.d.ts +2 -1
- package/esm/typings/src/llm-providers/azure-openai/AzureOpenAiExecutionTools.d.ts +2 -0
- package/esm/typings/src/llm-providers/azure-openai/AzureOpenAiExecutionToolsOptions.d.ts +1 -0
- package/esm/typings/src/llm-providers/langtail/LangtailExecutionTools.d.ts +2 -0
- package/esm/typings/src/llm-providers/langtail/LangtailExecutionToolsOptions.d.ts +2 -0
- package/esm/typings/src/llm-providers/mocked/MockedEchoLlmExecutionTools.d.ts +2 -0
- package/esm/typings/src/llm-providers/mocked/MockedFackedLlmExecutionTools.d.ts +2 -0
- package/esm/typings/src/llm-providers/multiple/joinLlmExecutionTools.d.ts +2 -0
- package/esm/typings/src/llm-providers/openai/OpenAiExecutionTools.d.ts +2 -0
- package/esm/typings/src/llm-providers/openai/OpenAiExecutionToolsOptions.d.ts +2 -0
- package/esm/typings/src/llm-providers/openai/openai-models.d.ts +1 -0
- package/esm/typings/src/llm-providers/remote/RemoteLlmExecutionTools.d.ts +1 -0
- package/esm/typings/src/llm-providers/remote/RemoteLlmExecutionToolsOptions.d.ts +2 -0
- package/esm/typings/src/llm-providers/remote/interfaces/RemoteServerOptions.d.ts +7 -1
- package/esm/typings/src/llm-providers/remote/startRemoteServer.d.ts +1 -0
- package/esm/typings/src/personas/preparePersona.d.ts +1 -1
- package/esm/typings/src/postprocessing/utils/extractBlock.d.ts +5 -0
- package/esm/typings/src/prepare/isPipelinePrepared.d.ts +2 -1
- package/esm/typings/src/prepare/preparePipeline.d.ts +1 -1
- package/esm/typings/src/prepare/prepareTemplates.d.ts +2 -1
- package/esm/typings/src/prepare/unpreparePipeline.d.ts +2 -1
- package/esm/typings/src/scripting/javascript/JavascriptEvalExecutionTools.d.ts +2 -0
- package/esm/typings/src/scripting/javascript/JavascriptExecutionTools.d.ts +1 -0
- package/esm/typings/src/scripting/javascript/postprocessing-functions.d.ts +51 -0
- package/esm/typings/src/storage/_common/PromptbookStorage.d.ts +0 -1
- package/esm/typings/src/storage/files-storage/FilesStorage.d.ts +2 -1
- package/esm/typings/src/storage/files-storage/FilesStorageOptions.d.ts +0 -3
- package/esm/typings/src/storage/local-storage/getLocalStorage.d.ts +2 -1
- package/esm/typings/src/storage/local-storage/getSessionStorage.d.ts +2 -1
- package/esm/typings/src/storage/memory/MemoryStorage.d.ts +2 -3
- package/esm/typings/src/storage/utils/PrefixStorage.d.ts +2 -3
- package/esm/typings/src/types/ModelRequirements.d.ts +0 -1
- package/esm/typings/src/types/Prompt.d.ts +0 -1
- package/esm/typings/src/types/execution-report/ExecutionReportStringOptions.d.ts +4 -0
- package/esm/typings/src/types/execution-report/executionReportJsonToString.d.ts +2 -0
- package/esm/typings/src/types/typeAliases.d.ts +9 -2
- package/esm/typings/src/utils/currentDate.d.ts +1 -0
- package/esm/typings/src/utils/deepClone.d.ts +2 -1
- package/esm/typings/src/utils/deepFreeze.d.ts +1 -1
- package/esm/typings/src/utils/expectation-counters/countCharacters.d.ts +2 -0
- package/esm/typings/src/utils/expectation-counters/countLines.d.ts +2 -0
- package/esm/typings/src/utils/expectation-counters/countPages.d.ts +2 -0
- package/esm/typings/src/utils/expectation-counters/countParagraphs.d.ts +2 -0
- package/esm/typings/src/utils/expectation-counters/countSentences.d.ts +4 -0
- package/esm/typings/src/utils/expectation-counters/countWords.d.ts +2 -0
- package/esm/typings/src/utils/expectation-counters/index.d.ts +2 -0
- package/esm/typings/src/utils/extractParameterNames.d.ts +1 -0
- package/esm/typings/src/utils/isRunningInWhatever.d.ts +6 -3
- package/esm/typings/src/utils/markdown/addAutoGeneratedSection.d.ts +4 -1
- package/esm/typings/src/utils/markdown/createMarkdownChart.d.ts +1 -1
- package/esm/typings/src/utils/markdown/createMarkdownTable.d.ts +4 -1
- package/esm/typings/src/utils/markdown/escapeMarkdownBlock.d.ts +5 -0
- package/esm/typings/src/utils/markdown/extractAllBlocksFromMarkdown.d.ts +1 -1
- package/esm/typings/src/utils/markdown/extractAllListItemsFromMarkdown.d.ts +2 -1
- package/esm/typings/src/utils/markdown/extractOneBlockFromMarkdown.d.ts +1 -0
- package/esm/typings/src/utils/markdown/flattenMarkdown.d.ts +3 -0
- package/esm/typings/src/utils/markdown/parseMarkdownSection.d.ts +4 -0
- package/esm/typings/src/utils/markdown/removeContentComments.d.ts +1 -0
- package/esm/typings/src/utils/markdown/removeMarkdownFormatting.d.ts +1 -0
- package/esm/typings/src/utils/markdown/splitMarkdownIntoSections.d.ts +3 -0
- package/esm/typings/src/utils/normalization/DIACRITIC_VARIANTS_LETTERS.d.ts +2 -0
- package/esm/typings/src/utils/normalization/IKeywords.d.ts +3 -0
- package/esm/typings/src/utils/normalization/capitalize.d.ts +1 -0
- package/esm/typings/src/utils/normalization/decapitalize.d.ts +1 -0
- package/esm/typings/src/utils/normalization/isValidKeyword.d.ts +2 -0
- package/esm/typings/src/utils/normalization/nameToUriPart.d.ts +8 -0
- package/esm/typings/src/utils/normalization/nameToUriParts.d.ts +8 -0
- package/esm/typings/src/utils/normalization/normalize-to-kebab-case.d.ts +10 -0
- package/esm/typings/src/utils/normalization/normalizeTo_PascalCase.d.ts +9 -0
- package/esm/typings/src/utils/normalization/normalizeTo_SCREAMING_CASE.d.ts +10 -0
- package/esm/typings/src/utils/normalization/normalizeTo_camelCase.d.ts +11 -0
- package/esm/typings/src/utils/normalization/normalizeTo_snake_case.d.ts +9 -0
- package/esm/typings/src/utils/normalization/parseKeywords.d.ts +1 -0
- package/esm/typings/src/utils/normalization/parseKeywordsFromString.d.ts +1 -0
- package/esm/typings/src/utils/normalization/removeDiacritics.d.ts +7 -0
- package/esm/typings/src/utils/normalization/searchKeywords.d.ts +5 -0
- package/esm/typings/src/utils/parseNumber.d.ts +2 -1
- package/esm/typings/src/utils/random/randomSeed.d.ts +1 -0
- package/esm/typings/src/utils/removeEmojis.d.ts +1 -0
- package/esm/typings/src/utils/removeQuotes.d.ts +1 -0
- package/esm/typings/src/utils/replaceParameters.d.ts +1 -0
- package/esm/typings/src/utils/sets/difference.d.ts +1 -0
- package/esm/typings/src/utils/sets/intersection.d.ts +1 -0
- package/esm/typings/src/utils/sets/union.d.ts +1 -0
- package/esm/typings/src/utils/trimCodeBlock.d.ts +1 -0
- package/esm/typings/src/utils/trimEndOfCodeBlock.d.ts +2 -0
- package/esm/typings/src/utils/unwrapResult.d.ts +1 -0
- package/esm/typings/src/utils/validators/filePath/isValidFilePath.d.ts +1 -0
- package/esm/typings/src/utils/validators/javascriptName/isValidJavascriptName.d.ts +7 -0
- package/esm/typings/src/utils/validators/semanticVersion/isValidPromptbookVersion.d.ts +2 -0
- package/esm/typings/src/utils/validators/semanticVersion/isValidSemanticVersion.d.ts +2 -0
- package/esm/typings/src/utils/validators/url/isHostnameOnPrivateNetwork.d.ts +2 -0
- package/esm/typings/src/utils/validators/url/isUrlOnPrivateNetwork.d.ts +1 -0
- package/esm/typings/src/utils/validators/url/isValidPipelineUrl.d.ts +2 -0
- package/esm/typings/src/utils/validators/url/isValidUrl.d.ts +2 -0
- package/esm/typings/src/utils/validators/uuid/isValidUuid.d.ts +2 -0
- package/package.json +2 -2
- package/umd/index.umd.js +48 -8
- package/umd/index.umd.js.map +1 -1
- package/umd/typings/src/_packages/anthropic-claude.index.d.ts +3 -2
- package/umd/typings/src/_packages/azure-openai.index.d.ts +4 -2
- package/umd/typings/src/_packages/browser.index.d.ts +6 -0
- package/umd/typings/src/_packages/cli.index.d.ts +1 -7
- package/umd/typings/src/_packages/core.index.d.ts +87 -13
- package/umd/typings/src/_packages/execute-javascript.index.d.ts +5 -45
- package/umd/typings/src/_packages/fake-llm.index.d.ts +4 -5
- package/umd/typings/src/_packages/langtail.index.d.ts +4 -2
- package/umd/typings/src/_packages/markdown-utils.index.d.ts +23 -4
- package/umd/typings/src/_packages/node.index.d.ts +5 -2
- package/umd/typings/src/_packages/openai.index.d.ts +5 -2
- package/umd/typings/src/_packages/remote-client.index.d.ts +5 -2
- package/umd/typings/src/_packages/remote-server.index.d.ts +4 -2
- package/umd/typings/src/_packages/types.index.d.ts +441 -21
- package/umd/typings/src/_packages/utils.index.d.ts +84 -31
- package/umd/typings/src/cli/main.d.ts +12 -0
- package/umd/typings/src/collection/collectionToJson.d.ts +2 -0
- package/umd/typings/src/collection/constructors/createCollectionFromDirectory.d.ts +1 -0
- package/umd/typings/src/collection/constructors/createCollectionFromJson.d.ts +1 -0
- package/umd/typings/src/collection/constructors/createCollectionFromPromise.d.ts +1 -0
- package/umd/typings/src/collection/constructors/createCollectionFromUrl.d.ts +1 -1
- package/umd/typings/src/collection/constructors/createSubcollection.d.ts +1 -0
- package/umd/typings/src/commands/BLOCK/BlockTypes.d.ts +2 -0
- package/umd/typings/src/config.d.ts +27 -1
- package/umd/typings/src/conversion/pipelineJsonToString.d.ts +1 -0
- package/umd/typings/src/conversion/pipelineStringToJson.d.ts +6 -3
- package/umd/typings/src/conversion/pipelineStringToJsonSync.d.ts +4 -3
- package/umd/typings/src/conversion/prettify/prettifyPipelineString.d.ts +2 -0
- package/umd/typings/src/conversion/prettify/renderPipelineMermaidOptions.d.ts +2 -0
- package/umd/typings/src/conversion/utils/extractParameterNamesFromPromptTemplate.d.ts +1 -0
- package/umd/typings/src/conversion/utils/extractVariables.d.ts +1 -0
- package/umd/typings/src/conversion/utils/renameParameter.d.ts +1 -0
- package/umd/typings/src/conversion/utils/stringifyPipelineJson.d.ts +2 -0
- package/umd/typings/src/conversion/utils/titleToName.d.ts +6 -1
- package/umd/typings/src/conversion/validation/validatePipeline.d.ts +1 -0
- package/umd/typings/src/errors/CollectionError.d.ts +2 -0
- package/umd/typings/src/errors/EnvironmentMismatchError.d.ts +2 -0
- package/umd/typings/src/errors/LimitReachedError.d.ts +2 -0
- package/umd/typings/src/errors/NotFoundError.d.ts +2 -0
- package/umd/typings/src/errors/NotYetImplementedError.d.ts +2 -0
- package/umd/typings/src/errors/ParsingError.d.ts +2 -0
- package/umd/typings/src/errors/PipelineExecutionError.d.ts +2 -0
- package/umd/typings/src/errors/PipelineLogicError.d.ts +2 -0
- package/umd/typings/src/errors/ReferenceError.d.ts +2 -0
- package/umd/typings/src/errors/UnexpectedError.d.ts +2 -0
- package/umd/typings/src/errors/VersionMismatchError.d.ts +2 -0
- package/umd/typings/src/execution/assertsExecutionSuccessful.d.ts +1 -0
- package/umd/typings/src/execution/createPipelineExecutor.d.ts +1 -0
- package/umd/typings/src/execution/embeddingVectorToString.d.ts +2 -0
- package/umd/typings/src/execution/utils/addUsage.d.ts +3 -1
- package/umd/typings/src/execution/utils/checkExpectations.d.ts +2 -0
- package/umd/typings/src/execution/utils/forEachAsync.d.ts +1 -0
- package/umd/typings/src/execution/utils/usageToHuman.d.ts +2 -0
- package/umd/typings/src/execution/utils/usageToWorktime.d.ts +2 -0
- package/umd/typings/src/formats/_common/FormatDefinition.d.ts +2 -1
- package/umd/typings/src/formats/json/utils/isValidJsonString.d.ts +2 -0
- package/umd/typings/src/knowledge/dialogs/callback/CallbackInterfaceTools.d.ts +2 -0
- package/umd/typings/src/knowledge/dialogs/callback/CallbackInterfaceToolsOptions.d.ts +2 -0
- package/umd/typings/src/knowledge/dialogs/simple-prompt/SimplePromptInterfaceTools.d.ts +3 -1
- package/umd/typings/src/knowledge/prepare-knowledge/_common/Scraper.d.ts +10 -0
- package/umd/typings/src/knowledge/prepare-knowledge/_common/prepareKnowledgePieces.d.ts +1 -1
- package/umd/typings/src/knowledge/prepare-knowledge/markdown/prepareKnowledgeFromMarkdown.d.ts +2 -0
- package/umd/typings/src/llm-providers/_common/createLlmToolsFromEnv.d.ts +4 -1
- package/umd/typings/src/llm-providers/_common/utils/cache/cacheLlmTools.d.ts +1 -1
- package/umd/typings/src/llm-providers/_common/utils/count-total-usage/countTotalUsage.d.ts +1 -1
- package/umd/typings/src/llm-providers/_common/utils/count-total-usage/limitTotalUsage.d.ts +2 -1
- package/umd/typings/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +2 -0
- package/umd/typings/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionToolsOptions.d.ts +2 -1
- package/umd/typings/src/llm-providers/azure-openai/AzureOpenAiExecutionTools.d.ts +2 -0
- package/umd/typings/src/llm-providers/azure-openai/AzureOpenAiExecutionToolsOptions.d.ts +1 -0
- package/umd/typings/src/llm-providers/langtail/LangtailExecutionTools.d.ts +2 -0
- package/umd/typings/src/llm-providers/langtail/LangtailExecutionToolsOptions.d.ts +2 -0
- package/umd/typings/src/llm-providers/mocked/MockedEchoLlmExecutionTools.d.ts +2 -0
- package/umd/typings/src/llm-providers/mocked/MockedFackedLlmExecutionTools.d.ts +2 -0
- package/umd/typings/src/llm-providers/multiple/joinLlmExecutionTools.d.ts +2 -0
- package/umd/typings/src/llm-providers/openai/OpenAiExecutionTools.d.ts +2 -0
- package/umd/typings/src/llm-providers/openai/OpenAiExecutionToolsOptions.d.ts +2 -0
- package/umd/typings/src/llm-providers/openai/openai-models.d.ts +1 -0
- package/umd/typings/src/llm-providers/remote/RemoteLlmExecutionTools.d.ts +1 -0
- package/umd/typings/src/llm-providers/remote/RemoteLlmExecutionToolsOptions.d.ts +2 -0
- package/umd/typings/src/llm-providers/remote/interfaces/RemoteServerOptions.d.ts +7 -1
- package/umd/typings/src/llm-providers/remote/startRemoteServer.d.ts +1 -0
- package/umd/typings/src/personas/preparePersona.d.ts +1 -1
- package/umd/typings/src/postprocessing/utils/extractBlock.d.ts +5 -0
- package/umd/typings/src/prepare/isPipelinePrepared.d.ts +2 -1
- package/umd/typings/src/prepare/preparePipeline.d.ts +1 -1
- package/umd/typings/src/prepare/prepareTemplates.d.ts +2 -1
- package/umd/typings/src/prepare/unpreparePipeline.d.ts +2 -1
- package/umd/typings/src/scripting/javascript/JavascriptEvalExecutionTools.d.ts +2 -0
- package/umd/typings/src/scripting/javascript/JavascriptExecutionTools.d.ts +1 -0
- package/umd/typings/src/scripting/javascript/postprocessing-functions.d.ts +51 -0
- package/umd/typings/src/storage/_common/PromptbookStorage.d.ts +0 -1
- package/umd/typings/src/storage/files-storage/FilesStorage.d.ts +2 -1
- package/umd/typings/src/storage/files-storage/FilesStorageOptions.d.ts +0 -3
- package/umd/typings/src/storage/local-storage/getLocalStorage.d.ts +2 -1
- package/umd/typings/src/storage/local-storage/getSessionStorage.d.ts +2 -1
- package/umd/typings/src/storage/memory/MemoryStorage.d.ts +2 -3
- package/umd/typings/src/storage/utils/PrefixStorage.d.ts +2 -3
- package/umd/typings/src/types/ModelRequirements.d.ts +0 -1
- package/umd/typings/src/types/Prompt.d.ts +0 -1
- package/umd/typings/src/types/execution-report/ExecutionReportStringOptions.d.ts +4 -0
- package/umd/typings/src/types/execution-report/executionReportJsonToString.d.ts +2 -0
- package/umd/typings/src/types/typeAliases.d.ts +9 -2
- package/umd/typings/src/utils/currentDate.d.ts +1 -0
- package/umd/typings/src/utils/deepClone.d.ts +2 -1
- package/umd/typings/src/utils/deepFreeze.d.ts +1 -1
- package/umd/typings/src/utils/expectation-counters/countCharacters.d.ts +2 -0
- package/umd/typings/src/utils/expectation-counters/countLines.d.ts +2 -0
- package/umd/typings/src/utils/expectation-counters/countPages.d.ts +2 -0
- package/umd/typings/src/utils/expectation-counters/countParagraphs.d.ts +2 -0
- package/umd/typings/src/utils/expectation-counters/countSentences.d.ts +4 -0
- package/umd/typings/src/utils/expectation-counters/countWords.d.ts +2 -0
- package/umd/typings/src/utils/expectation-counters/index.d.ts +2 -0
- package/umd/typings/src/utils/extractParameterNames.d.ts +1 -0
- package/umd/typings/src/utils/isRunningInWhatever.d.ts +6 -3
- package/umd/typings/src/utils/markdown/addAutoGeneratedSection.d.ts +4 -1
- package/umd/typings/src/utils/markdown/createMarkdownChart.d.ts +1 -1
- package/umd/typings/src/utils/markdown/createMarkdownTable.d.ts +4 -1
- package/umd/typings/src/utils/markdown/escapeMarkdownBlock.d.ts +5 -0
- package/umd/typings/src/utils/markdown/extractAllBlocksFromMarkdown.d.ts +1 -1
- package/umd/typings/src/utils/markdown/extractAllListItemsFromMarkdown.d.ts +2 -1
- package/umd/typings/src/utils/markdown/extractOneBlockFromMarkdown.d.ts +1 -0
- package/umd/typings/src/utils/markdown/flattenMarkdown.d.ts +3 -0
- package/umd/typings/src/utils/markdown/parseMarkdownSection.d.ts +4 -0
- package/umd/typings/src/utils/markdown/removeContentComments.d.ts +1 -0
- package/umd/typings/src/utils/markdown/removeMarkdownFormatting.d.ts +1 -0
- package/umd/typings/src/utils/markdown/splitMarkdownIntoSections.d.ts +3 -0
- package/umd/typings/src/utils/normalization/DIACRITIC_VARIANTS_LETTERS.d.ts +2 -0
- package/umd/typings/src/utils/normalization/IKeywords.d.ts +3 -0
- package/umd/typings/src/utils/normalization/capitalize.d.ts +1 -0
- package/umd/typings/src/utils/normalization/decapitalize.d.ts +1 -0
- package/umd/typings/src/utils/normalization/isValidKeyword.d.ts +2 -0
- package/umd/typings/src/utils/normalization/nameToUriPart.d.ts +8 -0
- package/umd/typings/src/utils/normalization/nameToUriParts.d.ts +8 -0
- package/umd/typings/src/utils/normalization/normalize-to-kebab-case.d.ts +10 -0
- package/umd/typings/src/utils/normalization/normalizeTo_PascalCase.d.ts +9 -0
- package/umd/typings/src/utils/normalization/normalizeTo_SCREAMING_CASE.d.ts +10 -0
- package/umd/typings/src/utils/normalization/normalizeTo_camelCase.d.ts +11 -0
- package/umd/typings/src/utils/normalization/normalizeTo_snake_case.d.ts +9 -0
- package/umd/typings/src/utils/normalization/parseKeywords.d.ts +1 -0
- package/umd/typings/src/utils/normalization/parseKeywordsFromString.d.ts +1 -0
- package/umd/typings/src/utils/normalization/removeDiacritics.d.ts +7 -0
- package/umd/typings/src/utils/normalization/searchKeywords.d.ts +5 -0
- package/umd/typings/src/utils/parseNumber.d.ts +2 -1
- package/umd/typings/src/utils/random/randomSeed.d.ts +1 -0
- package/umd/typings/src/utils/removeEmojis.d.ts +1 -0
- package/umd/typings/src/utils/removeQuotes.d.ts +1 -0
- package/umd/typings/src/utils/replaceParameters.d.ts +1 -0
- package/umd/typings/src/utils/sets/difference.d.ts +1 -0
- package/umd/typings/src/utils/sets/intersection.d.ts +1 -0
- package/umd/typings/src/utils/sets/union.d.ts +1 -0
- package/umd/typings/src/utils/trimCodeBlock.d.ts +1 -0
- package/umd/typings/src/utils/trimEndOfCodeBlock.d.ts +2 -0
- package/umd/typings/src/utils/unwrapResult.d.ts +1 -0
- package/umd/typings/src/utils/validators/filePath/isValidFilePath.d.ts +1 -0
- package/umd/typings/src/utils/validators/javascriptName/isValidJavascriptName.d.ts +7 -0
- package/umd/typings/src/utils/validators/semanticVersion/isValidPromptbookVersion.d.ts +2 -0
- package/umd/typings/src/utils/validators/semanticVersion/isValidSemanticVersion.d.ts +2 -0
- package/umd/typings/src/utils/validators/url/isHostnameOnPrivateNetwork.d.ts +2 -0
- package/umd/typings/src/utils/validators/url/isUrlOnPrivateNetwork.d.ts +1 -0
- package/umd/typings/src/utils/validators/url/isValidPipelineUrl.d.ts +2 -0
- package/umd/typings/src/utils/validators/url/isValidUrl.d.ts +2 -0
- package/umd/typings/src/utils/validators/uuid/isValidUuid.d.ts +2 -0
|
@@ -5,5 +5,6 @@ import type { string_template } from '../types/typeAliases';
|
|
|
5
5
|
*
|
|
6
6
|
* @param template the template with parameters in {curly} braces
|
|
7
7
|
* @returns the list of parameter names
|
|
8
|
+
* @public exported from `@promptbook/utils`
|
|
8
9
|
*/
|
|
9
10
|
export declare function extractParameterNames(template: string_template): Set<string_parameter_name>;
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Detects if the code is running in a browser environment in main thread (Not in a web worker)
|
|
3
|
+
*
|
|
4
|
+
* @public exported from `@promptbook/utils`
|
|
3
5
|
*/
|
|
4
6
|
export declare const isRunningInBrowser: Function;
|
|
5
7
|
/**
|
|
6
8
|
* Detects if the code is running in a Node.js environment
|
|
9
|
+
*
|
|
10
|
+
* @public exported from `@promptbook/utils`
|
|
7
11
|
*/
|
|
8
12
|
export declare const isRunningInNode: Function;
|
|
9
13
|
/**
|
|
10
14
|
* Detects if the code is running in a web worker
|
|
15
|
+
*
|
|
16
|
+
* @public exported from `@promptbook/utils`
|
|
11
17
|
*/
|
|
12
18
|
export declare const isRunningInWebWorker: Function;
|
|
13
|
-
/**
|
|
14
|
-
* TODO: [🔼] !!! Export via `@promptbook/utils`
|
|
15
|
-
*/
|
|
@@ -3,9 +3,12 @@ import type { string_name } from '../../types/typeAliases';
|
|
|
3
3
|
/**
|
|
4
4
|
* Add or modify an auto-generated section in a markdown file
|
|
5
5
|
*
|
|
6
|
-
* @
|
|
6
|
+
* @public exported from `@promptbook/markdown-utils`
|
|
7
7
|
*/
|
|
8
8
|
export declare function addAutoGeneratedSection(content: string_markdown, options: {
|
|
9
9
|
readonly sectionName: string_name;
|
|
10
10
|
readonly sectionContent: string_markdown;
|
|
11
11
|
}): string_markdown;
|
|
12
|
+
/**
|
|
13
|
+
* TODO: [🏛] This can be part of markdown builder
|
|
14
|
+
*/
|
|
@@ -28,7 +28,7 @@ type CreateMarkdownChartOptions = {
|
|
|
28
28
|
/**
|
|
29
29
|
* Function createMarkdownChart will draw a chart in markdown from ⬛+🟦 tiles
|
|
30
30
|
*
|
|
31
|
-
* @
|
|
31
|
+
* @public exported from `@promptbook/markdown-utils`
|
|
32
32
|
*/
|
|
33
33
|
export declare function createMarkdownChart(options: CreateMarkdownChartOptions): string_markdown;
|
|
34
34
|
export {};
|
|
@@ -3,6 +3,9 @@ import type { string_markdown_text } from '../../types/typeAliases';
|
|
|
3
3
|
/**
|
|
4
4
|
* Create a markdown table from a 2D array of strings
|
|
5
5
|
*
|
|
6
|
-
* @
|
|
6
|
+
* @public exported from `@promptbook/markdown-utils`
|
|
7
7
|
*/
|
|
8
8
|
export declare function createMarkdownTable(table: Array<Array<string_markdown_text>>): string_markdown;
|
|
9
|
+
/**
|
|
10
|
+
* TODO: [🏛] This can be part of markdown builder
|
|
11
|
+
*/
|
|
@@ -2,5 +2,10 @@ import type { string_markdown_text } from '../../types/typeAliases';
|
|
|
2
2
|
/**
|
|
3
3
|
* Function escapeMarkdownBlock will escape markdown block if needed
|
|
4
4
|
* It is useful when you want have block in block
|
|
5
|
+
*
|
|
6
|
+
* @public exported from `@promptbook/markdown-utils`
|
|
5
7
|
*/
|
|
6
8
|
export declare function escapeMarkdownBlock(value: string_markdown_text): string_markdown_text;
|
|
9
|
+
/**
|
|
10
|
+
* TODO: [🏛] This can be part of markdown builder
|
|
11
|
+
*/
|
|
@@ -26,7 +26,7 @@ export type CodeBlock = {
|
|
|
26
26
|
*
|
|
27
27
|
* @param markdown any valid markdown
|
|
28
28
|
* @returns code blocks with language and content
|
|
29
|
-
*
|
|
29
|
+
* @public exported from `@promptbook/markdown-utils`
|
|
30
30
|
*/
|
|
31
31
|
export declare function extractAllBlocksFromMarkdown(markdown: string_markdown): Array<CodeBlock>;
|
|
32
32
|
/**
|
|
@@ -9,6 +9,7 @@ import type { string_markdown_text } from '../../types/typeAliases';
|
|
|
9
9
|
* Note: It can not work with html syntax and comments
|
|
10
10
|
*
|
|
11
11
|
* @param markdown any valid markdown
|
|
12
|
-
* @returns
|
|
12
|
+
* @returns @@@
|
|
13
|
+
* @public exported from `@promptbook/markdown-utils`
|
|
13
14
|
*/
|
|
14
15
|
export declare function extractAllListItemsFromMarkdown(markdown: string_markdown): string_markdown_text[];
|
|
@@ -12,6 +12,7 @@ import type { CodeBlock } from './extractAllBlocksFromMarkdown';
|
|
|
12
12
|
*
|
|
13
13
|
* @param markdown any valid markdown
|
|
14
14
|
* @returns code block with language and content
|
|
15
|
+
* @public exported from `@promptbook/markdown-utils`
|
|
15
16
|
*/
|
|
16
17
|
export declare function extractOneBlockFromMarkdown(markdown: string_markdown): CodeBlock;
|
|
17
18
|
/***
|
|
@@ -4,9 +4,12 @@ import type { string_markdown } from '../../types/typeAliases';
|
|
|
4
4
|
*
|
|
5
5
|
* - It always have h1 - if there is no h1 in the markdown, it will be added "# Untitled"
|
|
6
6
|
* - All other headings are normalized to h2
|
|
7
|
+
*
|
|
8
|
+
* @public exported from `@promptbook/markdown-utils`
|
|
7
9
|
*/
|
|
8
10
|
export declare function flattenMarkdown<TContent extends string_markdown>(markdown: TContent): TContent;
|
|
9
11
|
/**
|
|
12
|
+
* TODO: [🏛] This can be part of markdown builder
|
|
10
13
|
* Note: [🕞] In past (commit 42086e1603cbed506482997c00a8ee979af0a247) there was much more
|
|
11
14
|
* sophisticated implementation of this function through parsing markdown into JSON structure
|
|
12
15
|
* and flattening the actual structure
|
|
@@ -3,6 +3,8 @@ import type { string_markdown_section_content } from '../../types/typeAliases';
|
|
|
3
3
|
import type { string_markdown_text } from '../../types/typeAliases';
|
|
4
4
|
/**
|
|
5
5
|
* Parsed markdown section
|
|
6
|
+
*
|
|
7
|
+
* @public exported from `@promptbook/markdown-utils`
|
|
6
8
|
*/
|
|
7
9
|
export type MarkdownSection = {
|
|
8
10
|
/**
|
|
@@ -20,6 +22,8 @@ export type MarkdownSection = {
|
|
|
20
22
|
};
|
|
21
23
|
/**
|
|
22
24
|
* Parses markdown section to title its level and content
|
|
25
|
+
*
|
|
26
|
+
* @public exported from `@promptbook/markdown-utils`
|
|
23
27
|
*/
|
|
24
28
|
export declare function parseMarkdownSection(value: string_markdown_section): MarkdownSection;
|
|
25
29
|
/**
|
|
@@ -5,5 +5,6 @@ import type { string_markdown } from '../../types/typeAliases';
|
|
|
5
5
|
*
|
|
6
6
|
* @param {string} content - The string to remove comments from.
|
|
7
7
|
* @returns {string} The input string with all comments removed.
|
|
8
|
+
* @public exported from `@promptbook/markdown-utils`
|
|
8
9
|
*/
|
|
9
10
|
export declare function removeContentComments<TContent extends string_html | string_markdown>(content: TContent): TContent;
|
|
@@ -4,5 +4,6 @@ import type { string_markdown_text } from '../../types/typeAliases';
|
|
|
4
4
|
*
|
|
5
5
|
* @param {string} str - The string to remove Markdown tags from.
|
|
6
6
|
* @returns {string} The input string with all Markdown tags removed.
|
|
7
|
+
* @public exported from `@promptbook/markdown-utils`
|
|
7
8
|
*/
|
|
8
9
|
export declare function removeMarkdownFormatting(str: string_markdown_text): string;
|
|
@@ -2,9 +2,12 @@ import type { string_markdown } from '../../types/typeAliases';
|
|
|
2
2
|
import type { string_markdown_section } from '../../types/typeAliases';
|
|
3
3
|
/**
|
|
4
4
|
* Splits the markdown into sections by headings
|
|
5
|
+
*
|
|
6
|
+
* @public exported from `@promptbook/markdown-utils`
|
|
5
7
|
*/
|
|
6
8
|
export declare function splitMarkdownIntoSections(markdown: string_markdown): Array<string_markdown_section>;
|
|
7
9
|
/**
|
|
10
|
+
* TODO: [🏛] This can be part of markdown builder
|
|
8
11
|
* Note: [🕞] In past (commit 42086e1603cbed506482997c00a8ee979af0a247) there was much more
|
|
9
12
|
* sophisticated implementation of this function through parsing markdown into JSON structure
|
|
10
13
|
* and flattening the actual structure
|
|
@@ -5,12 +5,15 @@
|
|
|
5
5
|
* Words are splitted between multiple keywords @see IKeywords
|
|
6
6
|
*
|
|
7
7
|
* For example `"keyword"`
|
|
8
|
+
*
|
|
9
|
+
* @public exported from `@promptbook/utils`
|
|
8
10
|
*/
|
|
9
11
|
export type string_keyword = string;
|
|
10
12
|
/**
|
|
11
13
|
* Semantic helper
|
|
12
14
|
* Set of keywords @see string_keyword
|
|
13
15
|
*
|
|
16
|
+
* @public exported from `@promptbook/utils`
|
|
14
17
|
*/
|
|
15
18
|
export type IKeywords = Set<string_keyword>;
|
|
16
19
|
/**
|
|
@@ -3,6 +3,16 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @example 'hello-world'
|
|
5
5
|
* @example 'i-love-promptbook'
|
|
6
|
+
* @public exported from `@promptbook/utils`
|
|
6
7
|
*/
|
|
7
8
|
export type string_kebab_case = string;
|
|
9
|
+
/**
|
|
10
|
+
* @@@
|
|
11
|
+
*
|
|
12
|
+
* @param text @@@
|
|
13
|
+
* @returns @@@
|
|
14
|
+
* @example 'hello-world'
|
|
15
|
+
* @example 'i-love-promptbook'
|
|
16
|
+
* @public exported from `@promptbook/utils`
|
|
17
|
+
*/
|
|
8
18
|
export declare function normalizeToKebabCase(text: string): string_kebab_case;
|
|
@@ -3,6 +3,15 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @example 'HelloWorld'
|
|
5
5
|
* @example 'ILovePromptbook'
|
|
6
|
+
* @public exported from `@promptbook/utils`
|
|
6
7
|
*/
|
|
7
8
|
export type string_PascalCase = string;
|
|
9
|
+
/**
|
|
10
|
+
*
|
|
11
|
+
* @param text @public exported from `@promptbook/utils`
|
|
12
|
+
* @returns
|
|
13
|
+
* @example 'HelloWorld'
|
|
14
|
+
* @example 'ILovePromptbook'
|
|
15
|
+
* @public exported from `@promptbook/utils`
|
|
16
|
+
*/
|
|
8
17
|
export declare function normalizeTo_PascalCase(text: string): string_PascalCase;
|
|
@@ -3,8 +3,18 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @example 'HELLO_WORLD'
|
|
5
5
|
* @example 'I_LOVE_PROMPTBOOK'
|
|
6
|
+
* @public exported from `@promptbook/utils`
|
|
6
7
|
*/
|
|
7
8
|
export type string_SCREAMING_CASE = string;
|
|
9
|
+
/**
|
|
10
|
+
* @@@
|
|
11
|
+
*
|
|
12
|
+
* @param text @@@
|
|
13
|
+
* @returns @@@
|
|
14
|
+
* @example 'HELLO_WORLD'
|
|
15
|
+
* @example 'I_LOVE_PROMPTBOOK'
|
|
16
|
+
* @public exported from `@promptbook/utils`
|
|
17
|
+
*/
|
|
8
18
|
export declare function normalizeTo_SCREAMING_CASE(text: string): string_SCREAMING_CASE;
|
|
9
19
|
/**
|
|
10
20
|
* TODO: Tests
|
|
@@ -3,8 +3,19 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @example 'helloWorld'
|
|
5
5
|
* @example 'iLovePromptbook'
|
|
6
|
+
* @public exported from `@promptbook/utils`
|
|
6
7
|
*/
|
|
7
8
|
export type string_camelCase = string;
|
|
9
|
+
/**
|
|
10
|
+
* @@@
|
|
11
|
+
*
|
|
12
|
+
* @param text @@@
|
|
13
|
+
* @param _isFirstLetterCapital @@@
|
|
14
|
+
* @returns @@@
|
|
15
|
+
* @example 'helloWorld'
|
|
16
|
+
* @example 'iLovePromptbook'
|
|
17
|
+
* @public exported from `@promptbook/utils`
|
|
18
|
+
*/
|
|
8
19
|
export declare function normalizeTo_camelCase(text: string, _isFirstLetterCapital?: boolean): string_camelCase;
|
|
9
20
|
/**
|
|
10
21
|
* TODO: [🌺] Use some intermediate util splitWords
|
|
@@ -5,4 +5,13 @@
|
|
|
5
5
|
* @example 'i_love_promptbook'
|
|
6
6
|
*/
|
|
7
7
|
export type string_snake_case = string;
|
|
8
|
+
/**
|
|
9
|
+
* @@@
|
|
10
|
+
*
|
|
11
|
+
* @param text @@@
|
|
12
|
+
* @returns @@@
|
|
13
|
+
* @example 'hello_world'
|
|
14
|
+
* @example 'i_love_promptbook'
|
|
15
|
+
* @public exported from `@promptbook/utils`
|
|
16
|
+
*/
|
|
8
17
|
export declare function normalizeTo_snake_case(text: string): string_snake_case;
|
|
@@ -7,6 +7,7 @@ import type { IKeywords } from './IKeywords';
|
|
|
7
7
|
*
|
|
8
8
|
* @param input of any kind
|
|
9
9
|
* @returns {Set} of keywords without diacritics in lowercase
|
|
10
|
+
* @public exported from `@promptbook/utils`
|
|
10
11
|
*/
|
|
11
12
|
export declare function parseKeywords(input: really_unknown): IKeywords;
|
|
12
13
|
/**
|
|
@@ -7,9 +7,10 @@
|
|
|
7
7
|
* @returns parsed number
|
|
8
8
|
* @throws {ParsingError} if the value is not a number
|
|
9
9
|
*
|
|
10
|
-
* @
|
|
10
|
+
* @public exported from `@promptbook/utils`
|
|
11
11
|
*/
|
|
12
12
|
export declare function parseNumber(value: string | number): number;
|
|
13
13
|
/**
|
|
14
14
|
* TODO: Maybe use sth. like safe-eval in fraction/calculation case @see https://www.npmjs.com/package/safe-eval
|
|
15
|
+
* TODO: [🧠][🌻] Maybe export through `@promptbook/markdown-utils` not `@promptbook/utils`
|
|
15
16
|
*/
|
|
@@ -3,5 +3,6 @@ import type { number_seed } from '../../types/typeAliases';
|
|
|
3
3
|
* Generates random seed
|
|
4
4
|
*
|
|
5
5
|
* Warning: This function is not cryptographically secure (it uses Math.random internally)
|
|
6
|
+
* @public exported from `@promptbook/utils`
|
|
6
7
|
*/
|
|
7
8
|
export declare function $randomSeed(): number_seed;
|
|
@@ -7,5 +7,6 @@ import type { string_template } from '../types/typeAliases';
|
|
|
7
7
|
* @param parameters the object with parameters
|
|
8
8
|
* @returns the template with replaced parameters
|
|
9
9
|
* @throws {PipelineExecutionError} if parameter is not defined, not closed, or not opened
|
|
10
|
+
* @public exported from `@promptbook/utils`
|
|
10
11
|
*/
|
|
11
12
|
export declare function replaceParameters(template: string_template, parameters: Parameters): string;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Create difference set of two sets.
|
|
3
3
|
*
|
|
4
4
|
* @deprecated use new javascript set methods instead @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set
|
|
5
|
+
* @public exported from `@promptbook/utils`
|
|
5
6
|
*/
|
|
6
7
|
export declare function difference<TItem>(a: Set<TItem>, b: Set<TItem>, isEqual?: (a: TItem, b: TItem) => boolean): Set<TItem>;
|
|
7
8
|
/**
|
|
@@ -2,5 +2,6 @@
|
|
|
2
2
|
* Creates a new set with all elements that are present in all sets
|
|
3
3
|
*
|
|
4
4
|
* @deprecated use new javascript set methods instead @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set
|
|
5
|
+
* @public exported from `@promptbook/utils`
|
|
5
6
|
*/
|
|
6
7
|
export declare function intersection<TItem>(...sets: Array<Set<TItem>>): Set<TItem>;
|
|
@@ -2,5 +2,6 @@
|
|
|
2
2
|
* Creates a new set with all elements that are present in either set
|
|
3
3
|
*
|
|
4
4
|
* @deprecated use new javascript set methods instead @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set
|
|
5
|
+
* @public exported from `@promptbook/utils`
|
|
5
6
|
*/
|
|
6
7
|
export declare function union<TItem>(...sets: Array<Set<TItem>>): Set<TItem>;
|
|
@@ -3,5 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Note: This is usefull for post-processing of the result of the completion LLM model
|
|
5
5
|
* if you want to start code block in the prompt but you don't want to end it in the result.
|
|
6
|
+
*
|
|
7
|
+
* @public exported from `@promptbook/utils`
|
|
6
8
|
*/
|
|
7
9
|
export declare function trimEndOfCodeBlock(value: string): string;
|
|
@@ -28,6 +28,7 @@ interface UnwrapResultOptions {
|
|
|
28
28
|
*
|
|
29
29
|
* @param text optionally quoted text
|
|
30
30
|
* @returns text without quotes
|
|
31
|
+
* @public exported from `@promptbook/utils`
|
|
31
32
|
*/
|
|
32
33
|
export declare function unwrapResult(text: string, options?: UnwrapResultOptions): string;
|
|
33
34
|
export {};
|
|
@@ -4,5 +4,6 @@ import type { really_unknown } from '../../organization/really_unknown';
|
|
|
4
4
|
* Tests if given string is valid URL.
|
|
5
5
|
*
|
|
6
6
|
* Note: This does not check if the file exists only if the path is valid
|
|
7
|
+
* @public exported from `@promptbook/utils`
|
|
7
8
|
*/
|
|
8
9
|
export declare function isValidFilePath(filePath: really_unknown): filePath is string_file_path;
|
|
@@ -1,3 +1,10 @@
|
|
|
1
1
|
import type { string_javascript_name } from '../../../types/typeAliases';
|
|
2
2
|
import type { really_unknown } from '../../organization/really_unknown';
|
|
3
|
+
/**
|
|
4
|
+
* @@@
|
|
5
|
+
*
|
|
6
|
+
* @param javascriptName @@@
|
|
7
|
+
* @returns @@@
|
|
8
|
+
* @public exported from `@promptbook/utils`
|
|
9
|
+
*/
|
|
3
10
|
export declare function isValidJavascriptName(javascriptName: really_unknown): javascriptName is string_javascript_name;
|
|
@@ -9,5 +9,7 @@ import type { really_unknown } from '../../organization/really_unknown';
|
|
|
9
9
|
* Note: There are two simmilar functions:
|
|
10
10
|
* - `isValidSemanticVersion` which tests any semantic version
|
|
11
11
|
* - `isValidPromptbookVersion` *(this one)* which tests just Promptbook versions
|
|
12
|
+
*
|
|
13
|
+
* @public exported from `@promptbook/utils`
|
|
12
14
|
*/
|
|
13
15
|
export declare function isValidPromptbookVersion(version: really_unknown): version is string_promptbook_version;
|
|
@@ -6,5 +6,7 @@ import type { really_unknown } from '../../organization/really_unknown';
|
|
|
6
6
|
* Note: There are two simmilar functions:
|
|
7
7
|
* - `isValidSemanticVersion` which tests any semantic version
|
|
8
8
|
* - `isValidPromptbookVersion` *(this one)* which tests just Promptbook versions
|
|
9
|
+
*
|
|
10
|
+
* @public exported from `@promptbook/utils`
|
|
9
11
|
*/
|
|
10
12
|
export declare function isValidSemanticVersion(version: really_unknown): version is string_semantic_version;
|
|
@@ -5,5 +5,7 @@ import type { string_hostname } from '../../../types/typeAliases';
|
|
|
5
5
|
* Note: There are two simmilar functions:
|
|
6
6
|
* - `isUrlOnPrivateNetwork` which tests full URL
|
|
7
7
|
* - `isHostnameOnPrivateNetwork` *(this one)* which tests just hostname
|
|
8
|
+
*
|
|
9
|
+
* @public exported from `@promptbook/utils`
|
|
8
10
|
*/
|
|
9
11
|
export declare function isHostnameOnPrivateNetwork(hostname: string_hostname): boolean;
|
|
@@ -8,5 +8,6 @@ import type { string_url } from '../../../types/typeAliases';
|
|
|
8
8
|
*
|
|
9
9
|
* @param {string} ipAddress - The IP address to check.
|
|
10
10
|
* @returns {boolean} Returns true if the IP address is reserved for private networks or localhost, otherwise false.
|
|
11
|
+
* @public exported from `@promptbook/utils`
|
|
11
12
|
*/
|
|
12
13
|
export declare function isUrlOnPrivateNetwork(url: URL | string_url): boolean;
|
|
@@ -6,6 +6,8 @@ import type { really_unknown } from '../../organization/really_unknown';
|
|
|
6
6
|
* Note: There are two simmilar functions:
|
|
7
7
|
* - `isValidUrl` which tests any URL
|
|
8
8
|
* - `isValidPipelineUrl` *(this one)* which tests just pipeline URL
|
|
9
|
+
*
|
|
10
|
+
* @public exported from `@promptbook/utils`
|
|
9
11
|
*/
|
|
10
12
|
export declare function isValidPipelineUrl(url: really_unknown): url is string_pipeline_url;
|
|
11
13
|
/**
|
|
@@ -7,5 +7,7 @@ import type { really_unknown } from '../../organization/really_unknown';
|
|
|
7
7
|
* Note: There are two simmilar functions:
|
|
8
8
|
* - `isValidUrl` which tests any URL
|
|
9
9
|
* - `isValidPipelineUrl` *(this one)* which tests just promptbook URL
|
|
10
|
+
*
|
|
11
|
+
* @public exported from `@promptbook/utils`
|
|
10
12
|
*/
|
|
11
13
|
export declare function isValidUrl(url: really_unknown): url is string_url;
|
|
@@ -2,5 +2,7 @@ import type { string_uuid } from '../../../types/typeAliases';
|
|
|
2
2
|
import type { really_unknown } from '../../organization/really_unknown';
|
|
3
3
|
/**
|
|
4
4
|
* Checks if value is valid uuid
|
|
5
|
+
*
|
|
6
|
+
* @public exported from `@promptbook/utils`
|
|
5
7
|
*/
|
|
6
8
|
export declare function isValidUuid(value: really_unknown): value is string_uuid;
|