@promptbook/types 0.72.0-3 → 0.72.0-31

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.
Files changed (259) hide show
  1. package/README.md +11 -1
  2. package/esm/typings/src/_packages/browser.index.d.ts +3 -1
  3. package/esm/typings/src/_packages/cli.index.d.ts +20 -0
  4. package/esm/typings/src/_packages/core.index.d.ts +56 -28
  5. package/esm/typings/src/_packages/documents.index.d.ts +8 -0
  6. package/esm/typings/src/_packages/legacy-documents.index.d.ts +8 -0
  7. package/esm/typings/src/_packages/markdown-utils.index.d.ts +6 -0
  8. package/esm/typings/src/_packages/node.index.d.ts +18 -6
  9. package/esm/typings/src/_packages/pdf.index.d.ts +8 -0
  10. package/esm/typings/src/_packages/types.index.d.ts +57 -33
  11. package/esm/typings/src/_packages/utils.index.d.ts +2 -2
  12. package/esm/typings/src/_packages/website-crawler.index.d.ts +8 -0
  13. package/esm/typings/src/cli/cli-commands/about.d.ts +1 -1
  14. package/esm/typings/src/cli/cli-commands/hello.d.ts +2 -1
  15. package/esm/typings/src/cli/cli-commands/make.d.ts +1 -1
  16. package/esm/typings/src/cli/cli-commands/prettify.d.ts +2 -1
  17. package/esm/typings/src/cli/cli-commands/test-command.d.ts +13 -0
  18. package/esm/typings/src/cli/main.d.ts +1 -1
  19. package/esm/typings/src/cli/promptbookCli.d.ts +1 -1
  20. package/esm/typings/src/collection/PipelineCollection.d.ts +1 -1
  21. package/esm/typings/src/collection/SimplePipelineCollection.d.ts +2 -2
  22. package/esm/typings/src/collection/collectionToJson.d.ts +1 -1
  23. package/esm/typings/src/collection/constructors/createCollectionFromDirectory.d.ts +11 -6
  24. package/esm/typings/src/collection/constructors/createCollectionFromJson.d.ts +1 -1
  25. package/esm/typings/src/collection/constructors/createCollectionFromPromise.d.ts +1 -1
  26. package/esm/typings/src/collection/constructors/createCollectionFromUrl.d.ts +1 -1
  27. package/esm/typings/src/commands/EXPECT/expectCommandParser.d.ts +1 -1
  28. package/esm/typings/src/commands/FOREACH/ForeachJson.d.ts +5 -1
  29. package/esm/typings/src/commands/FOREACH/foreachCommandParser.d.ts +1 -1
  30. package/esm/typings/src/commands/FORMAT/formatCommandParser.d.ts +1 -1
  31. package/esm/typings/src/commands/JOKER/jokerCommandParser.d.ts +1 -1
  32. package/esm/typings/src/commands/KNOWLEDGE/knowledgeCommandParser.d.ts +1 -1
  33. package/esm/typings/src/commands/KNOWLEDGE/utils/sourceContentToName.d.ts +11 -0
  34. package/esm/typings/src/commands/KNOWLEDGE/utils/sourceContentToName.test.d.ts +4 -0
  35. package/esm/typings/src/commands/MODEL/modelCommandParser.d.ts +1 -1
  36. package/esm/typings/src/commands/PARAMETER/parameterCommandParser.d.ts +1 -1
  37. package/esm/typings/src/commands/PERSONA/personaCommandParser.d.ts +1 -1
  38. package/esm/typings/src/commands/POSTPROCESS/postprocessCommandParser.d.ts +1 -1
  39. package/esm/typings/src/commands/PROMPTBOOK_VERSION/promptbookVersionCommandParser.d.ts +1 -1
  40. package/esm/typings/src/commands/TEMPLATE/templateCommandParser.d.ts +1 -1
  41. package/esm/typings/src/commands/URL/urlCommandParser.d.ts +1 -1
  42. package/esm/typings/src/commands/X_ACTION/actionCommandParser.d.ts +1 -1
  43. package/esm/typings/src/commands/X_INSTRUMENT/instrumentCommandParser.d.ts +1 -1
  44. package/esm/typings/src/commands/_BOILERPLATE/boilerplateCommandParser.d.ts +1 -1
  45. package/esm/typings/src/commands/_common/types/CommandParser.d.ts +5 -5
  46. package/esm/typings/src/config.d.ts +35 -12
  47. package/esm/typings/src/conversion/pipelineStringToJson.d.ts +4 -15
  48. package/esm/typings/src/conversion/pipelineStringToJsonSync.d.ts +1 -1
  49. package/esm/typings/src/conversion/validation/_importPipeline.d.ts +1 -1
  50. package/esm/typings/src/conversion/validation/validatePipeline.d.ts +5 -5
  51. package/esm/typings/src/{knowledge/dialogs → dialogs}/callback/CallbackInterfaceTools.d.ts +2 -2
  52. package/esm/typings/src/{knowledge/dialogs → dialogs}/callback/CallbackInterfaceToolsOptions.d.ts +3 -3
  53. package/esm/typings/src/{knowledge/dialogs → dialogs}/simple-prompt/SimplePromptInterfaceTools.d.ts +6 -6
  54. package/esm/typings/src/errors/AbstractFormatError.d.ts +11 -0
  55. package/esm/typings/src/errors/KnowledgeScrapeError.d.ts +9 -0
  56. package/esm/typings/src/errors/MissingToolsError.d.ts +9 -0
  57. package/esm/typings/src/executables/$provideExecutablesForNode.d.ts +12 -0
  58. package/esm/typings/src/executables/apps/locateLibreoffice.d.ts +11 -0
  59. package/esm/typings/src/executables/apps/locatePandoc.d.ts +11 -0
  60. package/esm/typings/src/executables/locateApp.d.ts +33 -0
  61. package/esm/typings/src/executables/platforms/locateAppOnLinux.d.ts +12 -0
  62. package/esm/typings/src/executables/platforms/locateAppOnMacOs.d.ts +12 -0
  63. package/esm/typings/src/executables/platforms/locateAppOnWindows.d.ts +12 -0
  64. package/esm/typings/src/execution/{CommonExecutionToolsOptions.d.ts → CommonToolsOptions.d.ts} +1 -1
  65. package/esm/typings/src/execution/EmbeddingVector.d.ts +1 -1
  66. package/esm/typings/src/execution/Executables.d.ts +18 -0
  67. package/esm/typings/src/execution/ExecutionTools.d.ts +35 -9
  68. package/esm/typings/src/execution/FilesystemTools.d.ts +9 -0
  69. package/esm/typings/src/execution/LlmExecutionTools.d.ts +2 -2
  70. package/esm/typings/src/execution/PipelineExecutor.d.ts +1 -0
  71. package/esm/typings/src/execution/PipelineExecutorResult.d.ts +2 -2
  72. package/esm/typings/src/execution/assertsExecutionSuccessful.d.ts +3 -2
  73. package/esm/typings/src/execution/createPipelineExecutor/00-CreatePipelineExecutorOptions.d.ts +31 -5
  74. package/esm/typings/src/execution/createPipelineExecutor/00-createPipelineExecutor.d.ts +3 -0
  75. package/esm/typings/src/execution/createPipelineExecutor/10-executePipeline.d.ts +6 -12
  76. package/esm/typings/src/execution/createPipelineExecutor/20-executeTemplate.d.ts +7 -18
  77. package/esm/typings/src/execution/createPipelineExecutor/{30-executeFormatCells.d.ts → 30-executeFormatSubvalues.d.ts} +2 -6
  78. package/esm/typings/src/execution/createPipelineExecutor/40-executeAttempts.d.ts +9 -19
  79. package/esm/typings/src/execution/embeddingVectorToString.d.ts +1 -1
  80. package/esm/typings/src/execution/translation/automatic-translate/automatic-translators/LindatAutomaticTranslator.d.ts +11 -3
  81. package/esm/typings/src/execution/translation/automatic-translate/translateMessages.d.ts +4 -0
  82. package/esm/typings/src/execution/utils/$provideExecutionToolsForNode.d.ts +13 -0
  83. package/esm/typings/src/execution/utils/addUsage.d.ts +1 -1
  84. package/esm/typings/src/execution/utils/forEachAsync.d.ts +2 -1
  85. package/esm/typings/src/formats/_common/FormatDefinition.d.ts +2 -2
  86. package/esm/typings/src/formats/_common/FormatSubvalueDefinition.d.ts +3 -2
  87. package/esm/typings/src/formats/csv/CsvFormatError.d.ts +10 -0
  88. package/esm/typings/src/llm-providers/_common/{$llmToolsMetadataRegister.d.ts → register/$llmToolsMetadataRegister.d.ts} +4 -1
  89. package/esm/typings/src/llm-providers/_common/{$llmToolsRegister.d.ts → register/$llmToolsRegister.d.ts} +5 -2
  90. package/esm/typings/src/llm-providers/_common/{createLlmToolsFromConfigurationFromEnv.d.ts → register/$provideLlmToolsConfigurationFromEnv.d.ts} +3 -3
  91. package/esm/typings/src/llm-providers/_common/register/$provideLlmToolsForCli.d.ts +15 -0
  92. package/esm/typings/src/llm-providers/_common/{getLlmToolsForTestingAndScriptsAndPlayground.d.ts → register/$provideLlmToolsForTestingAndScriptsAndPlayground.d.ts} +4 -3
  93. package/esm/typings/src/llm-providers/_common/{createLlmToolsFromEnv.d.ts → register/$provideLlmToolsFromEnv.d.ts} +6 -5
  94. package/esm/typings/src/llm-providers/_common/{$registeredLlmToolsMessage.d.ts → register/$registeredLlmToolsMessage.d.ts} +5 -2
  95. package/esm/typings/src/llm-providers/_common/{LlmToolsConfiguration.d.ts → register/LlmToolsConfiguration.d.ts} +6 -5
  96. package/esm/typings/src/llm-providers/_common/{LlmToolsMetadata.d.ts → register/LlmToolsMetadata.d.ts} +5 -4
  97. package/esm/typings/src/llm-providers/_common/{LlmToolsOptions.d.ts → register/LlmToolsOptions.d.ts} +4 -1
  98. package/esm/typings/src/llm-providers/_common/{createLlmToolsFromConfiguration.d.ts → register/createLlmToolsFromConfiguration.d.ts} +12 -4
  99. package/esm/typings/src/llm-providers/_common/utils/cache/CacheLlmToolsOptions.d.ts +4 -1
  100. package/esm/typings/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +1 -1
  101. package/esm/typings/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionToolsOptions.d.ts +5 -5
  102. package/esm/typings/src/llm-providers/anthropic-claude/anthropic-claude-models.d.ts +1 -1
  103. package/esm/typings/src/llm-providers/anthropic-claude/playground/playground.d.ts +3 -2
  104. package/esm/typings/src/llm-providers/anthropic-claude/register-configuration.d.ts +4 -3
  105. package/esm/typings/src/llm-providers/anthropic-claude/register-constructor.d.ts +4 -3
  106. package/esm/typings/src/llm-providers/azure-openai/AzureOpenAiExecutionTools.d.ts +7 -1
  107. package/esm/typings/src/llm-providers/azure-openai/AzureOpenAiExecutionToolsOptions.d.ts +4 -3
  108. package/esm/typings/src/llm-providers/azure-openai/playground/playground.d.ts +1 -0
  109. package/esm/typings/src/llm-providers/azure-openai/register-configuration.d.ts +4 -3
  110. package/esm/typings/src/llm-providers/azure-openai/register-constructor.d.ts +4 -3
  111. package/esm/typings/src/llm-providers/langtail/LangtailExecutionTools.d.ts +1 -1
  112. package/esm/typings/src/llm-providers/langtail/playground/playground.d.ts +3 -0
  113. package/esm/typings/src/llm-providers/mocked/$fakeTextToExpectations.d.ts +1 -1
  114. package/esm/typings/src/llm-providers/mocked/MockedEchoLlmExecutionTools.d.ts +4 -4
  115. package/esm/typings/src/llm-providers/mocked/MockedFackedLlmExecutionTools.d.ts +4 -4
  116. package/esm/typings/src/llm-providers/multiple/MultipleLlmExecutionTools.d.ts +4 -4
  117. package/esm/typings/src/llm-providers/multiple/joinLlmExecutionTools.d.ts +1 -1
  118. package/esm/typings/src/llm-providers/multiple/playground/playground.d.ts +3 -0
  119. package/esm/typings/src/llm-providers/openai/OpenAiAssistantExecutionTools.d.ts +1 -2
  120. package/esm/typings/src/llm-providers/openai/OpenAiExecutionTools.d.ts +2 -2
  121. package/esm/typings/src/llm-providers/openai/OpenAiExecutionToolsOptions.d.ts +4 -4
  122. package/esm/typings/src/llm-providers/openai/openai-models.d.ts +1 -1
  123. package/esm/typings/src/llm-providers/openai/playground/playground.d.ts +2 -1
  124. package/esm/typings/src/llm-providers/openai/register-configuration.d.ts +5 -4
  125. package/esm/typings/src/llm-providers/openai/register-constructor.d.ts +5 -4
  126. package/esm/typings/src/llm-providers/remote/RemoteLlmExecutionTools.d.ts +4 -4
  127. package/esm/typings/src/llm-providers/remote/interfaces/PromptbookServer_ListModels_Request.d.ts +16 -7
  128. package/esm/typings/src/llm-providers/remote/interfaces/PromptbookServer_ListModels_Response.d.ts +4 -4
  129. package/esm/typings/src/llm-providers/remote/interfaces/PromptbookServer_Prompt_Request.d.ts +7 -13
  130. package/esm/typings/src/llm-providers/remote/interfaces/PromptbookServer_Prompt_Response.d.ts +3 -3
  131. package/esm/typings/src/llm-providers/remote/interfaces/RemoteLlmExecutionToolsOptions.d.ts +11 -16
  132. package/esm/typings/src/llm-providers/remote/interfaces/RemoteServerOptions.d.ts +24 -9
  133. package/esm/typings/src/llm-providers/remote/playground/playground.d.ts +3 -0
  134. package/esm/typings/src/llm-providers/remote/startRemoteServer.d.ts +1 -1
  135. package/esm/typings/src/personas/preparePersona.d.ts +3 -2
  136. package/esm/typings/src/prepare/PrepareAndScrapeOptions.d.ts +49 -0
  137. package/esm/typings/src/prepare/preparePipeline.d.ts +3 -2
  138. package/esm/typings/src/prepare/prepareTemplates.d.ts +4 -3
  139. package/esm/typings/src/scrapers/_common/Converter.d.ts +22 -0
  140. package/esm/typings/src/scrapers/_common/Scraper.d.ts +59 -0
  141. package/esm/typings/src/scrapers/_common/ScraperIntermediateSource.d.ts +11 -0
  142. package/esm/typings/src/{knowledge/prepare-knowledge → scrapers}/_common/prepareKnowledgePieces.d.ts +5 -4
  143. package/esm/typings/src/scrapers/_common/register/$provideFilesystemForNode.d.ts +11 -0
  144. package/esm/typings/src/scrapers/_common/register/$provideScrapersForBrowser.d.ts +12 -0
  145. package/esm/typings/src/scrapers/_common/register/$provideScrapersForNode.d.ts +15 -0
  146. package/esm/typings/src/scrapers/_common/register/$registeredScrapersMessage.d.ts +12 -0
  147. package/esm/typings/src/scrapers/_common/register/$scrapersMetadataRegister.d.ts +13 -0
  148. package/esm/typings/src/scrapers/_common/register/$scrapersRegister.d.ts +13 -0
  149. package/esm/typings/src/scrapers/_common/register/ScraperAndConverterMetadata.d.ts +41 -0
  150. package/esm/typings/src/scrapers/_common/register/ScraperConstructor.d.ts +12 -0
  151. package/esm/typings/src/scrapers/_common/utils/getScraperIntermediateSource.d.ts +34 -0
  152. package/esm/typings/src/scrapers/_common/utils/getScraperIntermediateSource.test.d.ts +4 -0
  153. package/esm/typings/src/scrapers/_common/utils/makeKnowledgeSourceHandler.d.ts +11 -0
  154. package/esm/typings/src/scrapers/document/DocumentScraper.d.ts +43 -0
  155. package/esm/typings/src/scrapers/document/DocumentScraper.test.d.ts +4 -0
  156. package/esm/typings/src/scrapers/document/createDocumentScraper.d.ts +20 -0
  157. package/esm/typings/src/scrapers/document/playground/document-scraper-playground.d.ts +5 -0
  158. package/esm/typings/src/scrapers/document/register-constructor.d.ts +13 -0
  159. package/esm/typings/src/scrapers/document/register-metadata.d.ts +24 -0
  160. package/esm/typings/src/scrapers/document-legacy/LegacyDocumentScraper.d.ts +43 -0
  161. package/esm/typings/src/scrapers/document-legacy/LegacyDocumentScraper.test.d.ts +4 -0
  162. package/esm/typings/src/scrapers/document-legacy/createLegacyDocumentScraper.d.ts +20 -0
  163. package/esm/typings/src/scrapers/document-legacy/playground/legacy-document-scraper-playground.d.ts +5 -0
  164. package/esm/typings/src/scrapers/document-legacy/register-constructor.d.ts +13 -0
  165. package/esm/typings/src/scrapers/document-legacy/register-metadata.d.ts +24 -0
  166. package/esm/typings/src/scrapers/markdown/MarkdownScraper.d.ts +29 -0
  167. package/esm/typings/src/scrapers/markdown/createMarkdownScraper.d.ts +20 -0
  168. package/esm/typings/src/scrapers/markdown/playground/markdown-scraper-playground.d.ts +5 -0
  169. package/esm/typings/src/scrapers/markdown/register-constructor.d.ts +13 -0
  170. package/esm/typings/src/scrapers/markdown/register-metadata.d.ts +24 -0
  171. package/esm/typings/src/scrapers/pdf/PdfScraper.d.ts +40 -0
  172. package/esm/typings/src/scrapers/pdf/createPdfScraper.d.ts +20 -0
  173. package/esm/typings/src/scrapers/pdf/playground/pdf-scraper-playground.d.ts +5 -0
  174. package/esm/typings/src/scrapers/pdf/register-constructor.d.ts +13 -0
  175. package/esm/typings/src/scrapers/pdf/register-metadata.d.ts +24 -0
  176. package/esm/typings/src/scrapers/website/WebsiteScraper.d.ts +50 -0
  177. package/esm/typings/src/scrapers/website/createWebsiteScraper.d.ts +20 -0
  178. package/esm/typings/src/scrapers/website/playground/website-scraper-playground.d.ts +5 -0
  179. package/esm/typings/src/scrapers/website/register-constructor.d.ts +13 -0
  180. package/esm/typings/src/scrapers/website/register-metadata.d.ts +24 -0
  181. package/esm/typings/src/scrapers/website/utils/createShowdownConverter.d.ts +7 -0
  182. package/esm/typings/src/scripting/javascript/JavascriptExecutionToolsOptions.d.ts +2 -2
  183. package/esm/typings/src/scripting/javascript/utils/preserve.d.ts +1 -1
  184. package/esm/typings/src/scripting/python/PythonExecutionTools.d.ts +3 -3
  185. package/esm/typings/src/scripting/typescript/TypescriptExecutionTools.d.ts +3 -3
  186. package/esm/typings/src/storage/{files-storage/FilesStorage.d.ts → file-cache-storage/FileCacheStorage.d.ts} +7 -5
  187. package/esm/typings/src/storage/file-cache-storage/FileCacheStorageOptions.d.ts +10 -0
  188. package/esm/typings/src/storage/{files-storage → file-cache-storage}/utils/nameToSubfolderPath.d.ts +2 -2
  189. package/esm/typings/src/storage/local-storage/getLocalStorage.d.ts +1 -1
  190. package/esm/typings/src/storage/local-storage/getSessionStorage.d.ts +1 -1
  191. package/esm/typings/src/storage/{utils → memory/utils}/PrefixStorage.d.ts +1 -1
  192. package/esm/typings/src/storage/{utils → memory/utils}/makePromptbookStorageFromWebStorage.d.ts +1 -1
  193. package/esm/typings/src/types/Arrayable.d.ts +1 -1
  194. package/esm/typings/src/types/IntermediateFilesStrategy.d.ts +7 -0
  195. package/esm/typings/src/types/PipelineJson/KnowledgePieceJson.d.ts +4 -4
  196. package/esm/typings/src/types/PipelineJson/KnowledgeSourceJson.d.ts +10 -3
  197. package/esm/typings/src/types/PipelineJson/ParameterJson.d.ts +1 -1
  198. package/esm/typings/src/types/PipelineJson/PersonaJson.d.ts +1 -1
  199. package/esm/typings/src/types/PipelineJson/PipelineJson.d.ts +2 -2
  200. package/esm/typings/src/types/PipelineJson/TemplateJsonCommon.d.ts +2 -2
  201. package/esm/typings/src/types/Prompt.d.ts +2 -1
  202. package/esm/typings/src/types/execution-report/ExecutionReportJson.d.ts +1 -4
  203. package/esm/typings/src/types/execution-report/executionReportJsonToString.d.ts +2 -1
  204. package/esm/typings/src/types/typeAliases.d.ts +27 -20
  205. package/esm/typings/src/utils/$Register.d.ts +20 -7
  206. package/esm/typings/src/utils/FromtoItems.d.ts +1 -1
  207. package/esm/typings/src/utils/arrayableToArray.d.ts +1 -1
  208. package/esm/typings/src/utils/emojis.d.ts +1 -1
  209. package/esm/typings/src/utils/execCommand/$execCommand.d.ts +14 -0
  210. package/esm/typings/src/utils/execCommand/$execCommands.d.ts +17 -0
  211. package/esm/typings/src/utils/execCommand/ExecCommandOptions.d.ts +19 -0
  212. package/esm/typings/src/utils/execCommand/execCommand.test.d.ts +1 -0
  213. package/esm/typings/src/utils/execCommand/execCommandNormalizeOptions.d.ts +10 -0
  214. package/esm/typings/src/utils/execCommand/execCommandNormalizeOptions.test.d.ts +1 -0
  215. package/esm/typings/src/utils/expectation-counters/countSentences.d.ts +1 -1
  216. package/esm/typings/src/utils/files/extensionToMimeType.d.ts +8 -0
  217. package/esm/typings/src/utils/files/extensionToMimeType.test.d.ts +1 -0
  218. package/esm/typings/src/utils/files/getFileExtension.d.ts +8 -0
  219. package/esm/typings/src/utils/files/getFileExtension.test.d.ts +1 -0
  220. package/esm/typings/src/utils/files/isDirectoryExisting.d.ts +14 -0
  221. package/esm/typings/src/utils/files/isDirectoryExisting.test.d.ts +1 -0
  222. package/esm/typings/src/utils/files/isExecutable.d.ts +11 -0
  223. package/esm/typings/src/utils/files/isFileExisting.d.ts +13 -0
  224. package/esm/typings/src/utils/files/isFileExisting.test.d.ts +1 -0
  225. package/esm/typings/src/utils/files/listAllFiles.d.ts +17 -0
  226. package/esm/typings/src/utils/files/listAllFiles.test.d.ts +1 -0
  227. package/esm/typings/src/utils/markdown/extractAllBlocksFromMarkdown.d.ts +1 -1
  228. package/esm/typings/src/utils/markdown/splitMarkdownIntoSections.d.ts +1 -1
  229. package/esm/typings/src/utils/normalization/IKeywords.d.ts +2 -2
  230. package/esm/typings/src/utils/normalization/parseKeywords.d.ts +2 -2
  231. package/esm/typings/src/utils/normalization/parseKeywordsFromString.d.ts +2 -2
  232. package/esm/typings/src/utils/normalization/searchKeywords.d.ts +2 -2
  233. package/esm/typings/src/utils/organization/TODO_USE.d.ts +1 -1
  234. package/esm/typings/src/utils/organization/keepUnused.d.ts +1 -1
  235. package/esm/typings/src/utils/random/$randomSeed.d.ts +1 -1
  236. package/esm/typings/src/utils/sets/intersection.d.ts +1 -1
  237. package/esm/typings/src/utils/sets/union.d.ts +1 -1
  238. package/esm/typings/src/utils/unwrapResult.d.ts +4 -4
  239. package/esm/typings/src/utils/validators/filePath/isValidFilePath.d.ts +2 -2
  240. package/package.json +3 -2
  241. package/esm/typings/src/execution/createPipelineExecutor/00-CreatePipelineExecutorSettings.d.ts +0 -40
  242. package/esm/typings/src/knowledge/prepare-knowledge/_common/Scraper.d.ts +0 -37
  243. package/esm/typings/src/knowledge/prepare-knowledge/markdown/playground/markdown-knowledge-playground.d.ts +0 -2
  244. package/esm/typings/src/knowledge/prepare-knowledge/markdown/prepareKnowledgeFromMarkdown.d.ts +0 -14
  245. package/esm/typings/src/knowledge/prepare-knowledge/pdf/prepareKnowledgeFromPdf.d.ts +0 -15
  246. package/esm/typings/src/llm-providers/_common/getLlmToolsForCli.d.ts +0 -22
  247. package/esm/typings/src/prepare/PrepareOptions.d.ts +0 -22
  248. package/esm/typings/src/storage/files-storage/FilesStorageOptions.d.ts +0 -10
  249. package/esm/typings/src/utils/files/$isDirectoryExisting.d.ts +0 -15
  250. package/esm/typings/src/utils/files/$isFileExisting.d.ts +0 -14
  251. package/esm/typings/src/utils/files/$listAllFiles.d.ts +0 -17
  252. /package/esm/typings/src/{knowledge/dialogs → dialogs}/user-interface-execution-tools.test.d.ts +0 -0
  253. /package/esm/typings/src/{knowledge/prepare-knowledge/_common/prepareKnowledgePieces.test.d.ts → executables/apps/locateLibreoffice.test.d.ts} +0 -0
  254. /package/esm/typings/src/{knowledge/prepare-knowledge/pdf/prepareKnowledgeFromPdf.test.d.ts → executables/apps/locatePandoc.test.d.ts} +0 -0
  255. /package/esm/typings/src/{storage/files-storage/utils/nameToSubfolderPath.test.d.ts → executables/locateApp.test.d.ts} +0 -0
  256. /package/esm/typings/src/{utils/files/$isDirectoryExisting.test.d.ts → scrapers/_common/prepareKnowledgePieces.test.d.ts} +0 -0
  257. /package/esm/typings/src/{knowledge/prepare-knowledge/markdown/prepareKnowledgeFromMarkdown.test.d.ts → scrapers/markdown/MarkdownScraper.test.d.ts} +0 -0
  258. /package/esm/typings/src/{utils/files/$isFileExisting.test.d.ts → scrapers/website/utils/createShowdownConverter.test.d.ts} +0 -0
  259. /package/esm/typings/src/{utils/files/$listAllFiles.test.d.ts → storage/file-cache-storage/utils/nameToSubfolderPath.test.d.ts} +0 -0
@@ -0,0 +1,14 @@
1
+ import type { ExecCommandOptions } from './ExecCommandOptions';
2
+ /**
3
+ * Run one command in a shell
4
+ *
5
+ * Note: There are 2 similar functions in the codebase:
6
+ * - `$execCommand` which runs a single command
7
+ * - `$execCommands` which runs multiple commands
8
+ *
9
+ * @public exported from `@promptbook/node`
10
+ */
11
+ export declare function $execCommand(options: ExecCommandOptions): Promise<string>;
12
+ /**
13
+ * Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
14
+ */
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Run multiple commands in a shell in sequence
3
+ *
4
+ * Note: There are 2 similar functions in the codebase:
5
+ * - `$execCommand` which runs a single command
6
+ * - `$execCommands` which runs multiple commands
7
+ *
8
+ * @public exported from `@promptbook/node`
9
+ */
10
+ export declare function $execCommands({ commands, cwd, crashOnError, }: {
11
+ readonly commands: string[];
12
+ readonly cwd: string;
13
+ readonly crashOnError?: boolean;
14
+ }): Promise<void>;
15
+ /**
16
+ * Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
17
+ */
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @deprecated Use sth from type-fest or move this to type helpers
3
+ */
4
+ type RequiredAndOptional<TBase, TRequired extends keyof TBase, TOptional extends keyof TBase> = Pick<TBase, TRequired> & Partial<Pick<TBase, TOptional>>;
5
+ /**
6
+ * Simple options for `execCommand`
7
+ */
8
+ export type ExecCommandOptions = string | RequiredAndOptional<ExecCommandOptionsAdvanced, 'command', 'args' | 'cwd' | 'crashOnError' | 'timeout'>;
9
+ /**
10
+ * Advanced options for `execCommand`
11
+ */
12
+ export type ExecCommandOptionsAdvanced = {
13
+ readonly command: string;
14
+ readonly args: string[];
15
+ readonly cwd: string;
16
+ readonly crashOnError: boolean;
17
+ readonly timeout: number;
18
+ };
19
+ export {};
@@ -0,0 +1,10 @@
1
+ import type { ExecCommandOptions } from './ExecCommandOptions';
2
+ import type { ExecCommandOptionsAdvanced } from './ExecCommandOptions';
3
+ /**
4
+ * Normalize options for `execCommand` and `execCommands`
5
+ *
6
+ * @private internal utility of `execCommand` and `execCommands`
7
+ */
8
+ export declare function execCommandNormalizeOptions(options: ExecCommandOptions): Pick<ExecCommandOptionsAdvanced, 'command' | 'args' | 'cwd' | 'crashOnError' | 'timeout'> & {
9
+ humanReadableCommand: string;
10
+ };
@@ -4,7 +4,7 @@ import type { ExpectationAmount } from '../../types/PipelineJson/Expectations';
4
4
  *
5
5
  * @public exported from `@promptbook/utils`
6
6
  */
7
- export declare function splitIntoSentences(text: string): Array<string>;
7
+ export declare function splitIntoSentences(text: string): ReadonlyArray<string>;
8
8
  /**
9
9
  * Counts number of sentences in the text
10
10
  *
@@ -0,0 +1,8 @@
1
+ import type { string_file_extension } from '../../types/typeAliases';
2
+ import type { string_mime_type } from '../../types/typeAliases';
3
+ /**
4
+ * Convert file extension to mime type
5
+ *
6
+ * @private within the repository
7
+ */
8
+ export declare function extensionToMimeType(value: string_file_extension): string_mime_type;
@@ -0,0 +1,8 @@
1
+ import type { string_filename } from '../../types/typeAliases';
2
+ import type { string_mime_type } from '../../types/typeAliases';
3
+ /**
4
+ * Get the file extension from a file name
5
+ *
6
+ * @private within the repository
7
+ */
8
+ export declare function getFileExtension(value: string_filename): string_mime_type | null;
@@ -0,0 +1,14 @@
1
+ import type { FilesystemTools } from '../../execution/FilesystemTools';
2
+ import type { string_dirname } from '../../types/typeAliases';
3
+ /**
4
+ * Checks if the directory exists
5
+ *
6
+ * @private within the repository
7
+ */
8
+ export declare function isDirectoryExisting(directoryPath: string_dirname, fs: FilesystemTools): Promise<boolean>;
9
+ /**
10
+ * Note: Not [~🟢~] because it is not directly dependent on `fs
11
+ * TODO: [🐠] This can be a validator - with variants that return true/false and variants that throw errors with meaningless messages
12
+ * TODO: [🧠][📂] "directory" vs "folder"
13
+ * TODO: [🖇] What about symlinks?
14
+ */
@@ -0,0 +1,11 @@
1
+ import type { FilesystemTools } from '../../execution/FilesystemTools';
2
+ /**
3
+ * Checks if the file is executable
4
+ *
5
+ * @private within the repository
6
+ */
7
+ export declare function isExecutable(path: string, fs: FilesystemTools): Promise<boolean>;
8
+ /**
9
+ * Note: Not [~🟢~] because it is not directly dependent on `fs
10
+ * TODO: [🖇] What about symlinks?
11
+ */
@@ -0,0 +1,13 @@
1
+ import type { FilesystemTools } from '../../execution/FilesystemTools';
2
+ import type { string_filename } from '../../types/typeAliases';
3
+ /**
4
+ * Checks if the file exists
5
+ *
6
+ * @private within the repository
7
+ */
8
+ export declare function isFileExisting(filename: string_filename, fs: FilesystemTools): Promise<boolean>;
9
+ /**
10
+ * Note: Not [~🟢~] because it is not directly dependent on `fs
11
+ * TODO: [🐠] This can be a validator - with variants that return true/false and variants that throw errors with meaningless messages
12
+ * TODO: [🖇] What about symlinks?
13
+ */
@@ -0,0 +1,17 @@
1
+ import type { FilesystemTools } from '../../execution/FilesystemTools';
2
+ import type { string_dirname } from '../../types/typeAliases';
3
+ import type { string_filename } from '../../types/typeAliases';
4
+ /**
5
+ * Reads all files in the directory
6
+ *
7
+ * @param path
8
+ * @param isRecursive
9
+ * @returns List of all files in the directory
10
+ * @private internal function of `createCollectionFromDirectory`
11
+ */
12
+ export declare function listAllFiles(path: string_dirname, isRecursive: boolean, fs: FilesystemTools): Promise<Array<string_filename>>;
13
+ /**
14
+ * TODO: [😶] Unite floder listing
15
+ * Note: Not [~🟢~] because it is not directly dependent on `fs
16
+ * TODO: [🖇] What about symlinks?
17
+ */
@@ -0,0 +1 @@
1
+ export {};
@@ -30,7 +30,7 @@ export type CodeBlock = {
30
30
  * @throws {ParseError} if block is not closed properly
31
31
  * @public exported from `@promptbook/markdown-utils`
32
32
  */
33
- export declare function extractAllBlocksFromMarkdown(markdown: string_markdown): Array<CodeBlock>;
33
+ export declare function extractAllBlocksFromMarkdown(markdown: string_markdown): ReadonlyArray<CodeBlock>;
34
34
  /**
35
35
  * TODO: Maybe name for `blockNotation` instead of '```' and '>'
36
36
  */
@@ -5,7 +5,7 @@ import type { string_markdown_section } from '../../types/typeAliases';
5
5
  *
6
6
  * @public exported from `@promptbook/markdown-utils`
7
7
  */
8
- export declare function splitMarkdownIntoSections(markdown: string_markdown): Array<string_markdown_section>;
8
+ export declare function splitMarkdownIntoSections(markdown: string_markdown): ReadonlyArray<string_markdown_section>;
9
9
  /**
10
10
  * TODO: [🏛] This can be part of markdown builder
11
11
  * Note: [🕞] In past (commit 42086e1603cbed506482997c00a8ee979af0a247) there was much more
@@ -2,7 +2,7 @@
2
2
  * Semantic helper
3
3
  *
4
4
  * Keyword is string without diacritics in lowercase [a-z1-9]
5
- * Words are splitted between multiple keywords @see IKeywords
5
+ * Words are splitted between multiple keywords @see Keywords
6
6
  *
7
7
  * For example `"keyword"`
8
8
  *
@@ -15,7 +15,7 @@ export type string_keyword = string;
15
15
  *
16
16
  * @public exported from `@promptbook/utils`
17
17
  */
18
- export type IKeywords = Set<string_keyword>;
18
+ export type Keywords = Set<string_keyword>;
19
19
  /**
20
20
  * TODO: [🌮] Keywords with weight
21
21
  */
@@ -1,5 +1,5 @@
1
1
  import type { really_unknown } from '../organization/really_unknown';
2
- import type { IKeywords } from './IKeywords';
2
+ import type { Keywords } from './IKeywords';
3
3
  /**
4
4
  * Parses keywords from any object and recursively walks through
5
5
  *
@@ -9,7 +9,7 @@ import type { IKeywords } from './IKeywords';
9
9
  * @returns {Set} of keywords without diacritics in lowercase
10
10
  * @public exported from `@promptbook/utils`
11
11
  */
12
- export declare function parseKeywords(input: really_unknown): IKeywords;
12
+ export declare function parseKeywords(input: really_unknown): Keywords;
13
13
  /**
14
14
  * Note: Not using spread in input param because of keeping second parameter for options
15
15
  * TODO: [🌺] Use some intermediate util splitWords
@@ -1,4 +1,4 @@
1
- import type { IKeywords } from './IKeywords';
1
+ import type { Keywords } from './IKeywords';
2
2
  /**
3
3
  * Parses keywords from a string
4
4
  *
@@ -6,4 +6,4 @@ import type { IKeywords } from './IKeywords';
6
6
  * @returns {Set} of keywords without diacritics in lowercase
7
7
  * @public exported from `@promptbook/utils`
8
8
  */
9
- export declare function parseKeywordsFromString(input: string): IKeywords;
9
+ export declare function parseKeywordsFromString(input: string): Keywords;
@@ -1,4 +1,4 @@
1
- import type { IKeywords } from './IKeywords';
1
+ import type { Keywords } from './IKeywords';
2
2
  /**
3
3
  * @@@
4
4
  *
@@ -7,4 +7,4 @@ import type { IKeywords } from './IKeywords';
7
7
  * @returns
8
8
  * @public exported from `@promptbook/utils`
9
9
  */
10
- export declare function searchKeywords(haystack: IKeywords, needle: IKeywords): boolean;
10
+ export declare function searchKeywords(haystack: Keywords, needle: Keywords): boolean;
@@ -9,4 +9,4 @@ import type { really_any } from './really_any';
9
9
  * @returns void
10
10
  * @private within the repository
11
11
  */
12
- export declare function TODO_USE(...value: Array<really_any>): void;
12
+ export declare function TODO_USE(...value: ReadonlyArray<really_any>): void;
@@ -13,4 +13,4 @@ import type { really_any } from './really_any';
13
13
  * @returns void
14
14
  * @private within the repository
15
15
  */
16
- export declare function keepUnused<TTypeToKeep1 = really_any, TTypeToKeep2 = really_any, TTypeToKeep3 = really_any>(...valuesToKeep: Array<really_any>): void;
16
+ export declare function keepUnused<TTypeToKeep1 = really_any, TTypeToKeep2 = really_any, TTypeToKeep3 = really_any>(...valuesToKeep: ReadonlyArray<really_any>): void;
@@ -3,7 +3,7 @@ import type { number_seed } from '../../types/typeAliases';
3
3
  * Generates random seed
4
4
  *
5
5
  * Note: `$` is used to indicate that this function is not a pure function - it is not deterministic
6
- * Warning: This function is not cryptographically secure (it uses Math.random internally)
6
+ * Warning: This function is NOT cryptographically secure (it uses Math.random internally)
7
7
  * @public exported from `@promptbook/utils`
8
8
  */
9
9
  export declare function $randomSeed(): number_seed;
@@ -4,4 +4,4 @@
4
4
  * @deprecated use new javascript set methods instead @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set
5
5
  * @public exported from `@promptbook/utils`
6
6
  */
7
- export declare function intersection<TItem>(...sets: Array<Set<TItem>>): Set<TItem>;
7
+ export declare function intersection<TItem>(...sets: ReadonlyArray<Set<TItem>>): Set<TItem>;
@@ -4,4 +4,4 @@
4
4
  * @deprecated use new javascript set methods instead @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set
5
5
  * @public exported from `@promptbook/utils`
6
6
  */
7
- export declare function union<TItem>(...sets: Array<Set<TItem>>): Set<TItem>;
7
+ export declare function union<TItem>(...sets: ReadonlyArray<Set<TItem>>): Set<TItem>;
@@ -1,11 +1,11 @@
1
1
  /**
2
2
  * Additional options for `unwrapResult`
3
3
  */
4
- interface UnwrapResultOptions {
4
+ type UnwrapResultOptions = {
5
5
  /**
6
6
  * If true, the text is trimmed before processing
7
7
  */
8
- isTrimmed?: boolean;
8
+ readonly isTrimmed?: boolean;
9
9
  /**
10
10
  * If true, the introduce sentence is removed
11
11
  *
@@ -15,8 +15,8 @@ interface UnwrapResultOptions {
15
15
  *
16
16
  * @default true
17
17
  */
18
- isIntroduceSentenceRemoved?: boolean;
19
- }
18
+ readonly isIntroduceSentenceRemoved?: boolean;
19
+ };
20
20
  /**
21
21
  * Removes quotes and optional introduce text from a string
22
22
  *
@@ -1,4 +1,4 @@
1
- import type { string_file_path } from '../../../types/typeAliases';
1
+ import type { string_filename } from '../../../types/typeAliases';
2
2
  import type { really_unknown } from '../../organization/really_unknown';
3
3
  /**
4
4
  * Tests if given string is valid URL.
@@ -6,4 +6,4 @@ import type { really_unknown } from '../../organization/really_unknown';
6
6
  * Note: This does not check if the file exists only if the path is valid
7
7
  * @public exported from `@promptbook/utils`
8
8
  */
9
- export declare function isValidFilePath(filePath: really_unknown): filePath is string_file_path;
9
+ export declare function isValidFilePath(filename: really_unknown): filename is string_filename;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/types",
3
- "version": "0.72.0-3",
3
+ "version": "0.72.0-31",
4
4
  "description": "Supercharge your use of large language models",
5
5
  "private": false,
6
6
  "sideEffects": false,
@@ -11,6 +11,7 @@
11
11
  "contributors": [
12
12
  "Pavol Hejný <me@pavolhejny.com> (https://www.pavolhejny.com/)"
13
13
  ],
14
+ "todo-0": "TODO: [❇️] Make better list of keywords",
14
15
  "keywords": [
15
16
  "ai",
16
17
  "llm",
@@ -49,6 +50,6 @@
49
50
  ],
50
51
  "typings": "./esm/typings/src/_packages/types.index.d.ts",
51
52
  "peerDependencies": {
52
- "@promptbook/core": "0.72.0-3"
53
+ "@promptbook/core": "0.72.0-31"
53
54
  }
54
55
  }
@@ -1,40 +0,0 @@
1
- import type { CsvSettings } from '../../formats/csv/CsvSettings';
2
- export type CreatePipelineExecutorSettings = {
3
- /**
4
- * When executor does not satisfy expectations it will be retried this amount of times
5
- *
6
- * @default MAX_EXECUTION_ATTEMPTS
7
- */
8
- readonly maxExecutionAttempts: number;
9
- /**
10
- * Maximum number of tasks running in parallel
11
- *
12
- * @default MAX_PARALLEL_COUNT
13
- */
14
- readonly maxParallelCount: number;
15
- /**
16
- * If true, the preparation logs additional information
17
- *
18
- * @default false
19
- */
20
- readonly isVerbose: boolean;
21
- /**
22
- * Settings for CSV format
23
- *
24
- * @default DEFAULT_CSV_SETTINGS
25
- */
26
- readonly csvSettings: CsvSettings;
27
- /**
28
- * If you pass fully prepared pipeline, this does not matter
29
- *
30
- * Otherwise:
31
- * If false or not set, warning is shown when pipeline is not prepared
32
- * If true, warning is suppressed
33
- *
34
- * @default false
35
- */
36
- readonly isNotPreparedWarningSupressed: boolean;
37
- };
38
- /**
39
- * TODO: [🤹‍♂️] More granular setting for limits of execution + better waiting for queue
40
- */
@@ -1,37 +0,0 @@
1
- import type { Promisable } from 'type-fest';
2
- import type { string_file_path } from '../../../types/typeAliases';
3
- import type { string_knowledge_source_link } from '../../../types/typeAliases';
4
- import type { string_markdown } from '../../../types/typeAliases';
5
- import type { string_markdown_text } from '../../../types/typeAliases';
6
- import type { string_mime_type } from '../../../types/typeAliases';
7
- import type { string_mime_type_with_wildcard } from '../../../types/typeAliases';
8
- import type { string_promptbook_documentation_url } from '../../../types/typeAliases';
9
- import type { really_unknown } from '../../../utils/organization/really_unknown';
10
- /**
11
- * @@@
12
- *
13
- * @private still an internal experimental
14
- */
15
- export type Scraper = {
16
- readonly description: string_markdown_text;
17
- readonly documentationUrl: string_promptbook_documentation_url;
18
- readonly examples: Array<string_file_path>;
19
- readonly mimeTypes: Array<string_mime_type_with_wildcard>;
20
- scrape(source: ScraperSourceOptions): Promisable<string_markdown>;
21
- };
22
- /**
23
- * @@@
24
- *
25
- * @private still an internal experimental
26
- */
27
- export type ScraperSourceOptions = {
28
- readonly source: string_knowledge_source_link;
29
- readonly mimeType: string_mime_type;
30
- asJson(): Promise<really_unknown>;
31
- asText(): Promise<really_unknown>;
32
- asBlob(): Promise<really_unknown>;
33
- };
34
- /**
35
- * TODO: [🐝] @@@ Annotate all
36
- * TODO: [🔼] Export via types
37
- */
@@ -1,14 +0,0 @@
1
- import type { PrepareOptions } from '../../../prepare/PrepareOptions';
2
- import type { KnowledgePiecePreparedJson } from '../../../types/PipelineJson/KnowledgePieceJson';
3
- import type { string_markdown } from '../../../types/typeAliases';
4
- /**
5
- * @@@
6
- *
7
- * @public exported from `@promptbook/core`
8
- */
9
- export declare function prepareKnowledgeFromMarkdown(knowledgeContent: string_markdown, options: PrepareOptions): Promise<Array<Omit<KnowledgePiecePreparedJson, 'sources' | 'preparationIds'>>>;
10
- /**
11
- * TODO: [🐝][🔼][main] !!! Export via `@promptbook/markdown`
12
- * TODO: [🪂] Do it in parallel 11:11
13
- * Note: No need to aggregate usage here, it is done by intercepting the llmTools
14
- */
@@ -1,15 +0,0 @@
1
- import type { PrepareOptions } from '../../../prepare/PrepareOptions';
2
- import type { KnowledgePiecePreparedJson } from '../../../types/PipelineJson/KnowledgePieceJson';
3
- import type { string_base64 } from '../../../types/typeAliases';
4
- /**
5
- * @@@
6
- *
7
- * @private still in development [🐝]
8
- */
9
- export declare function prepareKnowledgeFromPdf(content: string_base64, options: PrepareOptions): Promise<Array<Omit<KnowledgePiecePreparedJson, 'sources' | 'preparationIds'>>>;
10
- /**
11
- * TODO: [🐝][🔼][main] !!! Export via `@promptbook/pdf`
12
- * TODO: [🧺] In future, content can be alse File or Blob BUT for now for wider compatibility its only base64
13
- * @see https://stackoverflow.com/questions/14653349/node-js-cant-create-blobs
14
- * TODO: [🪂] Do it in parallel
15
- */
@@ -1,22 +0,0 @@
1
- import type { LlmExecutionToolsWithTotalUsage } from './utils/count-total-usage/LlmExecutionToolsWithTotalUsage';
2
- type GetLlmToolsForCliOptions = {
3
- /**
4
- * @@@
5
- *
6
- * @default false
7
- */
8
- isCacheReloaded?: boolean;
9
- };
10
- /**
11
- * Returns LLM tools for CLI
12
- *
13
- * @private within the repository - for CLI utils
14
- */
15
- export declare function getLlmToolsForCli(options?: GetLlmToolsForCliOptions): LlmExecutionToolsWithTotalUsage;
16
- export {};
17
- /**
18
- * Note: [🟡] This code should never be published outside of `@promptbook/cli`
19
- * TODO: [👷‍♂️] @@@ Manual about construction of llmTools
20
- * TODO: [🥃] Allow `ptbk make` without llm tools
21
- * TODO: This should be maybe not under `_common` but under `utils-internal` / `utils/internal`
22
- */
@@ -1,22 +0,0 @@
1
- import type { LlmExecutionTools } from '../execution/LlmExecutionTools';
2
- /**
3
- * Options for preparation of the pipeline
4
- */
5
- export type PrepareOptions = {
6
- /**
7
- * LLM tools
8
- */
9
- readonly llmTools: LlmExecutionTools;
10
- /**
11
- * Maximum number of tasks running in parallel
12
- *
13
- * @default MAX_PARALLEL_COUNT
14
- */
15
- readonly maxParallelCount?: number;
16
- /**
17
- * If true, the preparation logs additional information
18
- *
19
- * @default false
20
- */
21
- readonly isVerbose?: boolean;
22
- };
@@ -1,10 +0,0 @@
1
- import type { string_folder_path } from '../../types/typeAliases';
2
- /**
3
- * @@@
4
- */
5
- export type FilesStorageOptions = {
6
- /**
7
- * @@@
8
- */
9
- cacheFolderPath: string_folder_path;
10
- };
@@ -1,15 +0,0 @@
1
- import type { string_folder_path } from '../../types/typeAliases';
2
- /**
3
- * Checks if the directory exists
4
- *
5
- * Note: `$` is used to indicate that this function is not a pure function - it looks at the filesystem
6
- *
7
- * @private within the repository
8
- */
9
- export declare function $isDirectoryExisting(directoryPath: string_folder_path): Promise<boolean>;
10
- /**
11
- * Note: [🟢] This code should never be published outside of `@promptbook/node` and `@promptbook/cli` and `@promptbook/cli`
12
- * TODO: [🐠] This can be a validator - with variants that return true/false and variants that throw errors with meaningless messages
13
- * TODO: [🧠][📂] "directory" vs "folder"
14
- * TODO: [🖇] What about symlinks?
15
- */
@@ -1,14 +0,0 @@
1
- import type { string_file_path } from '../../types/typeAliases';
2
- /**
3
- * Checks if the file exists
4
- *
5
- * Note: `$` is used to indicate that this function is not a pure function - it looks at the filesystem
6
- *
7
- * @private within the repository
8
- */
9
- export declare function $isFileExisting(filePath: string_file_path): Promise<boolean>;
10
- /**
11
- * Note: [🟢] This code should never be published outside of `@promptbook/node` and `@promptbook/cli` and `@promptbook/cli`
12
- * TODO: [🐠] This can be a validator - with variants that return true/false and variants that throw errors with meaningless messages
13
- * TODO: [🖇] What about symlinks?
14
- */
@@ -1,17 +0,0 @@
1
- import type { string_file_path } from '../../types/typeAliases';
2
- import type { string_folder_path } from '../../types/typeAliases';
3
- /**
4
- * Reads all files in the directory
5
- *
6
- * Note: `$` is used to indicate that this function is not a pure function - it looks at the filesystem
7
- *
8
- * @param path
9
- * @param isRecursive
10
- * @returns List of all files in the directory
11
- * @private internal function of `createCollectionFromDirectory`
12
- */
13
- export declare function $listAllFiles(path: string_folder_path, isRecursive: boolean): Promise<Array<string_file_path>>;
14
- /**
15
- * Note: [🟢] This code should never be published outside of `@promptbook/node` and `@promptbook/cli` and `@promptbook/cli`
16
- * TODO: [🖇] What about symlinks?
17
- */