@promptbook/types 0.61.0-25 → 0.61.0-26

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 CHANGED
@@ -10,7 +10,7 @@ var EXPECTATION_UNITS = ['CHARACTERS', 'WORDS', 'SENTENCES', 'LINES', 'PARAGRAPH
10
10
  /**
11
11
  * The version of the Promptbook library
12
12
  */
13
- var PROMPTBOOK_VERSION = '0.61.0-24';
13
+ var PROMPTBOOK_VERSION = '0.61.0-25';
14
14
  // TODO: !!!! List here all the versions and annotate + put into script
15
15
 
16
16
  export { EXPECTATION_UNITS, PROMPTBOOK_VERSION };
@@ -1,6 +1,6 @@
1
1
  import { spaceTrim } from 'spacetrim';
2
2
  import { renderPromptbookMermaid } from '../conversion/prettify/renderPipelineMermaidOptions';
3
- import { extractParametersFromPromptTemplate } from '../conversion/utils/extractParametersFromPromptTemplate';
3
+ import { extractParameterNamesFromPromptTemplate } from '../conversion/utils/extractParameterNamesFromPromptTemplate';
4
4
  import { extractVariables } from '../conversion/utils/extractVariables';
5
5
  import { renameParameter } from '../conversion/utils/renameParameter';
6
6
  import { titleToName } from '../conversion/utils/titleToName';
@@ -15,7 +15,7 @@ import { countParagraphs } from '../utils/expectation-counters/countParagraphs';
15
15
  import { countSentences, splitIntoSentences } from '../utils/expectation-counters/countSentences';
16
16
  import { countWords } from '../utils/expectation-counters/countWords';
17
17
  import { CountUtils } from '../utils/expectation-counters/index';
18
- import { extractParameters } from '../utils/extractParameters';
18
+ import { extractParameterNames } from '../utils/extractParameterNames';
19
19
  import { DIACRITIC_VARIANTS_LETTERS } from '../utils/normalization/DIACRITIC_VARIANTS_LETTERS';
20
20
  import type { IKeywords, string_keyword } from '../utils/normalization/IKeywords';
21
21
  import { capitalize } from '../utils/normalization/capitalize';
@@ -55,7 +55,7 @@ import { isValidUrl } from '../utils/validators/url/isValidUrl';
55
55
  import { isValidUuid } from '../utils/validators/uuid/isValidUuid';
56
56
  import { PROMPTBOOK_VERSION } from '../version';
57
57
  export { forEachAsync, PROMPTBOOK_VERSION };
58
- export { extractParameters, extractVariables, replaceParameters, spaceTrim };
58
+ export { extractParameterNames, extractVariables, replaceParameters, spaceTrim };
59
59
  export { $currentDate, $randomSeed, extractBlock, // <- [🌻] + maybe export through `@promptbook/markdown-utils`
60
60
  isHostnameOnPrivateNetwork, isUrlOnPrivateNetwork, isValidFilePath, isValidJavascriptName, isValidJsonString, isValidPipelineUrl, isValidPromptbookVersion, isValidSemanticVersion, isValidUrl, isValidUuid, parseNumber, // <- [🌻]
61
61
  removeEmojis, removeQuotes, trimCodeBlock, trimEndOfCodeBlock, unwrapResult, };
@@ -70,7 +70,7 @@ export declare const normalizeTo: {
70
70
  };
71
71
  export { capitalize, decapitalize, DIACRITIC_VARIANTS_LETTERS, IKeywords, isValidKeyword, nameToUriPart, nameToUriParts, normalizeTo_camelCase, normalizeTo_PascalCase, normalizeTo_SCREAMING_CASE, normalizeTo_snake_case, normalizeToKebabCase, normalizeWhitespaces, parseKeywords, parseKeywordsFromString, removeDiacritics, searchKeywords, string_keyword, titleToName, };
72
72
  export type { string_camelCase, string_kebab_case, string_PascalCase, string_SCREAMING_CASE, string_snake_case };
73
- export { extractParametersFromPromptTemplate, renameParameter, renderPromptbookMermaid };
73
+ export { extractParameterNamesFromPromptTemplate, renameParameter, renderPromptbookMermaid };
74
74
  export { difference, intersection, union };
75
75
  /**
76
76
  * Note: [🕙] It does not make sence to have simple lower / UPPER case normalization
@@ -7,7 +7,7 @@ import type { string_parameter_name } from '../../types/typeAliases';
7
7
  * @returns the set of parameter names
8
8
  * @throws {ParsingError} if the script is invalid
9
9
  */
10
- export declare function extractParametersFromPromptTemplate(promptTemplate: Pick<PromptTemplateJson, 'title' | 'description' | 'blockType' | 'content' | 'preparedContent' | 'jokerParameterNames'>): Set<string_parameter_name>;
10
+ export declare function extractParameterNamesFromPromptTemplate(promptTemplate: Pick<PromptTemplateJson, 'title' | 'description' | 'blockType' | 'content' | 'preparedContent' | 'jokerParameterNames'>): Set<string_parameter_name>;
11
11
  /**
12
12
  * TODO: [🔣] If script require contentLanguage
13
13
  */
@@ -81,7 +81,7 @@ export type PipelineJson = {
81
81
  /**
82
82
  * TODO: [🍙] Make some standart order of json properties
83
83
  * TODO: [🧠] Maybe wrap all {parameterNames} in brackets for example { "resultingParameterName": "{foo}" }
84
- * Note: There was a proposal for multiple types of promptbook objects 78816ff33e2705ee1a187aa2eb8affd976d4ea1a
84
+ * Note: [💼] There was a proposal for multiple types of promptbook objects 78816ff33e2705ee1a187aa2eb8affd976d4ea1a
85
85
  * But then immediately reverted back to the single type
86
86
  * With knowledge as part of the promptbook and collection just as a collection of promptbooks
87
87
  */
@@ -6,7 +6,7 @@ import type { string_template } from '../types/typeAliases';
6
6
  * @param template the template with parameters in {curly} braces
7
7
  * @returns the list of parameter names
8
8
  */
9
- export declare function extractParameters(template: string_template): Set<string_parameter_name>;
9
+ export declare function extractParameterNames(template: string_template): Set<string_parameter_name>;
10
10
  /**
11
11
  * TODO: !!!!! Rename to extractParameterNames
12
- */
12
+ */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/types",
3
- "version": "0.61.0-25",
3
+ "version": "0.61.0-26",
4
4
  "description": "Supercharge your use of large language models",
5
5
  "private": false,
6
6
  "sideEffects": false,
@@ -45,7 +45,7 @@
45
45
  }
46
46
  ],
47
47
  "peerDependencies": {
48
- "@promptbook/core": "0.61.0-25"
48
+ "@promptbook/core": "0.61.0-26"
49
49
  },
50
50
  "main": "./umd/index.umd.js",
51
51
  "module": "./esm/index.es.js",
package/umd/index.umd.js CHANGED
@@ -16,7 +16,7 @@
16
16
  /**
17
17
  * The version of the Promptbook library
18
18
  */
19
- var PROMPTBOOK_VERSION = '0.61.0-24';
19
+ var PROMPTBOOK_VERSION = '0.61.0-25';
20
20
  // TODO: !!!! List here all the versions and annotate + put into script
21
21
 
22
22
  exports.EXPECTATION_UNITS = EXPECTATION_UNITS;
@@ -1,6 +1,6 @@
1
1
  import { spaceTrim } from 'spacetrim';
2
2
  import { renderPromptbookMermaid } from '../conversion/prettify/renderPipelineMermaidOptions';
3
- import { extractParametersFromPromptTemplate } from '../conversion/utils/extractParametersFromPromptTemplate';
3
+ import { extractParameterNamesFromPromptTemplate } from '../conversion/utils/extractParameterNamesFromPromptTemplate';
4
4
  import { extractVariables } from '../conversion/utils/extractVariables';
5
5
  import { renameParameter } from '../conversion/utils/renameParameter';
6
6
  import { titleToName } from '../conversion/utils/titleToName';
@@ -15,7 +15,7 @@ import { countParagraphs } from '../utils/expectation-counters/countParagraphs';
15
15
  import { countSentences, splitIntoSentences } from '../utils/expectation-counters/countSentences';
16
16
  import { countWords } from '../utils/expectation-counters/countWords';
17
17
  import { CountUtils } from '../utils/expectation-counters/index';
18
- import { extractParameters } from '../utils/extractParameters';
18
+ import { extractParameterNames } from '../utils/extractParameterNames';
19
19
  import { DIACRITIC_VARIANTS_LETTERS } from '../utils/normalization/DIACRITIC_VARIANTS_LETTERS';
20
20
  import type { IKeywords, string_keyword } from '../utils/normalization/IKeywords';
21
21
  import { capitalize } from '../utils/normalization/capitalize';
@@ -55,7 +55,7 @@ import { isValidUrl } from '../utils/validators/url/isValidUrl';
55
55
  import { isValidUuid } from '../utils/validators/uuid/isValidUuid';
56
56
  import { PROMPTBOOK_VERSION } from '../version';
57
57
  export { forEachAsync, PROMPTBOOK_VERSION };
58
- export { extractParameters, extractVariables, replaceParameters, spaceTrim };
58
+ export { extractParameterNames, extractVariables, replaceParameters, spaceTrim };
59
59
  export { $currentDate, $randomSeed, extractBlock, // <- [🌻] + maybe export through `@promptbook/markdown-utils`
60
60
  isHostnameOnPrivateNetwork, isUrlOnPrivateNetwork, isValidFilePath, isValidJavascriptName, isValidJsonString, isValidPipelineUrl, isValidPromptbookVersion, isValidSemanticVersion, isValidUrl, isValidUuid, parseNumber, // <- [🌻]
61
61
  removeEmojis, removeQuotes, trimCodeBlock, trimEndOfCodeBlock, unwrapResult, };
@@ -70,7 +70,7 @@ export declare const normalizeTo: {
70
70
  };
71
71
  export { capitalize, decapitalize, DIACRITIC_VARIANTS_LETTERS, IKeywords, isValidKeyword, nameToUriPart, nameToUriParts, normalizeTo_camelCase, normalizeTo_PascalCase, normalizeTo_SCREAMING_CASE, normalizeTo_snake_case, normalizeToKebabCase, normalizeWhitespaces, parseKeywords, parseKeywordsFromString, removeDiacritics, searchKeywords, string_keyword, titleToName, };
72
72
  export type { string_camelCase, string_kebab_case, string_PascalCase, string_SCREAMING_CASE, string_snake_case };
73
- export { extractParametersFromPromptTemplate, renameParameter, renderPromptbookMermaid };
73
+ export { extractParameterNamesFromPromptTemplate, renameParameter, renderPromptbookMermaid };
74
74
  export { difference, intersection, union };
75
75
  /**
76
76
  * Note: [🕙] It does not make sence to have simple lower / UPPER case normalization
@@ -7,7 +7,7 @@ import type { string_parameter_name } from '../../types/typeAliases';
7
7
  * @returns the set of parameter names
8
8
  * @throws {ParsingError} if the script is invalid
9
9
  */
10
- export declare function extractParametersFromPromptTemplate(promptTemplate: Pick<PromptTemplateJson, 'title' | 'description' | 'blockType' | 'content' | 'preparedContent' | 'jokerParameterNames'>): Set<string_parameter_name>;
10
+ export declare function extractParameterNamesFromPromptTemplate(promptTemplate: Pick<PromptTemplateJson, 'title' | 'description' | 'blockType' | 'content' | 'preparedContent' | 'jokerParameterNames'>): Set<string_parameter_name>;
11
11
  /**
12
12
  * TODO: [🔣] If script require contentLanguage
13
13
  */
@@ -81,7 +81,7 @@ export type PipelineJson = {
81
81
  /**
82
82
  * TODO: [🍙] Make some standart order of json properties
83
83
  * TODO: [🧠] Maybe wrap all {parameterNames} in brackets for example { "resultingParameterName": "{foo}" }
84
- * Note: There was a proposal for multiple types of promptbook objects 78816ff33e2705ee1a187aa2eb8affd976d4ea1a
84
+ * Note: [💼] There was a proposal for multiple types of promptbook objects 78816ff33e2705ee1a187aa2eb8affd976d4ea1a
85
85
  * But then immediately reverted back to the single type
86
86
  * With knowledge as part of the promptbook and collection just as a collection of promptbooks
87
87
  */
@@ -6,7 +6,7 @@ import type { string_template } from '../types/typeAliases';
6
6
  * @param template the template with parameters in {curly} braces
7
7
  * @returns the list of parameter names
8
8
  */
9
- export declare function extractParameters(template: string_template): Set<string_parameter_name>;
9
+ export declare function extractParameterNames(template: string_template): Set<string_parameter_name>;
10
10
  /**
11
11
  * TODO: !!!!! Rename to extractParameterNames
12
- */
12
+ */