@promptbook/openai 0.43.0 → 0.44.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/typings/_packages/utils.index.d.ts +30 -3
- package/esm/typings/errors/PromptbookNotFoundError.d.ts +7 -0
- package/esm/typings/errors/{ExpectError.d.ts → _ExpectError.d.ts} +1 -0
- package/esm/typings/utils/expectation-counters/countSentences.d.ts +4 -0
- package/esm/typings/utils/normalization/DIACRITIC_VARIANTS_LETTERS.d.ts +10 -0
- package/esm/typings/utils/normalization/IKeywords.d.ts +18 -0
- package/esm/typings/utils/normalization/capitalize.d.ts +5 -0
- package/esm/typings/utils/normalization/capitalize.test.d.ts +1 -0
- package/esm/typings/utils/normalization/decapitalize.d.ts +5 -0
- package/esm/typings/utils/normalization/decapitalize.test.d.ts +1 -0
- package/esm/typings/utils/normalization/isValidKeyword.d.ts +8 -0
- package/esm/typings/utils/normalization/isValidKeyword.test.d.ts +1 -0
- package/esm/typings/utils/normalization/nameToUriPart.d.ts +1 -0
- package/esm/typings/utils/normalization/nameToUriPart.test.d.ts +1 -0
- package/esm/typings/utils/normalization/nameToUriParts.d.ts +1 -0
- package/esm/typings/utils/normalization/nameToUriParts.test.d.ts +1 -0
- package/esm/typings/utils/normalization/normalize-to-kebab-case.d.ts +1 -0
- package/esm/typings/utils/normalization/normalize-to-kebab-case.test.d.ts +1 -0
- package/esm/typings/utils/normalization/normalizeTo_PascalCase.d.ts +1 -0
- package/esm/typings/utils/normalization/normalizeTo_PascalCase.test.d.ts +1 -0
- package/esm/typings/utils/normalization/normalizeTo_SCREAMING_CASE.d.ts +4 -0
- package/esm/typings/utils/normalization/normalizeTo_SCREAMING_CASE.test.d.ts +1 -0
- package/esm/typings/utils/normalization/normalizeTo_camelCase.d.ts +4 -0
- package/esm/typings/utils/normalization/normalizeTo_camelCase.test.d.ts +1 -0
- package/esm/typings/utils/normalization/normalizeTo_snake_case.d.ts +1 -0
- package/esm/typings/utils/normalization/normalizeTo_snake_case.test.d.ts +1 -0
- package/esm/typings/utils/normalization/normalizeWhitespaces.d.ts +4 -0
- package/esm/typings/utils/normalization/normalizeWhitespaces.test.d.ts +1 -0
- package/esm/typings/utils/normalization/parseKeywords.d.ts +14 -0
- package/esm/typings/utils/normalization/parseKeywords.test.d.ts +1 -0
- package/esm/typings/utils/normalization/parseKeywordsFromString.d.ts +8 -0
- package/esm/typings/utils/normalization/parseKeywordsFromString.test.d.ts +1 -0
- package/esm/typings/utils/normalization/removeDiacritics.d.ts +4 -0
- package/esm/typings/utils/normalization/removeDiacritics.test.d.ts +1 -0
- package/esm/typings/utils/normalization/searchKeywords.d.ts +5 -0
- package/esm/typings/utils/normalization/searchKeywords.test.d.ts +1 -0
- package/package.json +2 -2
- package/umd/typings/_packages/utils.index.d.ts +30 -3
- package/umd/typings/errors/PromptbookNotFoundError.d.ts +7 -0
- package/umd/typings/errors/{ExpectError.d.ts → _ExpectError.d.ts} +1 -0
- package/umd/typings/utils/expectation-counters/countSentences.d.ts +4 -0
- package/umd/typings/utils/normalization/DIACRITIC_VARIANTS_LETTERS.d.ts +10 -0
- package/umd/typings/utils/normalization/IKeywords.d.ts +18 -0
- package/umd/typings/utils/normalization/capitalize.d.ts +5 -0
- package/umd/typings/utils/normalization/capitalize.test.d.ts +1 -0
- package/umd/typings/utils/normalization/decapitalize.d.ts +5 -0
- package/umd/typings/utils/normalization/decapitalize.test.d.ts +1 -0
- package/umd/typings/utils/normalization/isValidKeyword.d.ts +8 -0
- package/umd/typings/utils/normalization/isValidKeyword.test.d.ts +1 -0
- package/umd/typings/utils/normalization/nameToUriPart.d.ts +1 -0
- package/umd/typings/utils/normalization/nameToUriPart.test.d.ts +1 -0
- package/umd/typings/utils/normalization/nameToUriParts.d.ts +1 -0
- package/umd/typings/utils/normalization/nameToUriParts.test.d.ts +1 -0
- package/umd/typings/utils/normalization/normalize-to-kebab-case.d.ts +1 -0
- package/umd/typings/utils/normalization/normalize-to-kebab-case.test.d.ts +1 -0
- package/umd/typings/utils/normalization/normalizeTo_PascalCase.d.ts +1 -0
- package/umd/typings/utils/normalization/normalizeTo_PascalCase.test.d.ts +1 -0
- package/umd/typings/utils/normalization/normalizeTo_SCREAMING_CASE.d.ts +4 -0
- package/umd/typings/utils/normalization/normalizeTo_SCREAMING_CASE.test.d.ts +1 -0
- package/umd/typings/utils/normalization/normalizeTo_camelCase.d.ts +4 -0
- package/umd/typings/utils/normalization/normalizeTo_camelCase.test.d.ts +1 -0
- package/umd/typings/utils/normalization/normalizeTo_snake_case.d.ts +1 -0
- package/umd/typings/utils/normalization/normalizeTo_snake_case.test.d.ts +1 -0
- package/umd/typings/utils/normalization/normalizeWhitespaces.d.ts +4 -0
- package/umd/typings/utils/normalization/normalizeWhitespaces.test.d.ts +1 -0
- package/umd/typings/utils/normalization/parseKeywords.d.ts +14 -0
- package/umd/typings/utils/normalization/parseKeywords.test.d.ts +1 -0
- package/umd/typings/utils/normalization/parseKeywordsFromString.d.ts +8 -0
- package/umd/typings/utils/normalization/parseKeywordsFromString.test.d.ts +1 -0
- package/umd/typings/utils/normalization/removeDiacritics.d.ts +4 -0
- package/umd/typings/utils/normalization/removeDiacritics.test.d.ts +1 -0
- package/umd/typings/utils/normalization/searchKeywords.d.ts +5 -0
- package/umd/typings/utils/normalization/searchKeywords.test.d.ts +1 -0
- package/esm/typings/errors/NotFoundError.d.ts +0 -7
- package/umd/typings/errors/NotFoundError.d.ts +0 -7
|
@@ -2,14 +2,14 @@ import { prettifyPromptbookString } from '../conversion/prettify/prettifyPromptb
|
|
|
2
2
|
import { parseNumber } from '../conversion/utils/parseNumber';
|
|
3
3
|
import { assertsExecutionSuccessful } from '../execution/assertsExecutionSuccessful';
|
|
4
4
|
import { replaceParameters } from '../execution/utils/replaceParameters';
|
|
5
|
-
import { ExecutionReportStringOptions, ExecutionReportStringOptionsDefaults } from '../types/execution-report/ExecutionReportStringOptions';
|
|
6
5
|
import { executionReportJsonToString } from '../types/execution-report/executionReportJsonToString';
|
|
6
|
+
import { ExecutionReportStringOptions, ExecutionReportStringOptionsDefaults } from '../types/execution-report/ExecutionReportStringOptions';
|
|
7
7
|
import { CountUtils } from '../utils/expectation-counters';
|
|
8
8
|
import { countCharacters } from '../utils/expectation-counters/countCharacters';
|
|
9
9
|
import { countLines } from '../utils/expectation-counters/countLines';
|
|
10
10
|
import { countPages } from '../utils/expectation-counters/countPages';
|
|
11
11
|
import { countParagraphs } from '../utils/expectation-counters/countParagraphs';
|
|
12
|
-
import { countSentences } from '../utils/expectation-counters/countSentences';
|
|
12
|
+
import { countSentences, splitIntoSentences } from '../utils/expectation-counters/countSentences';
|
|
13
13
|
import { countWords } from '../utils/expectation-counters/countWords';
|
|
14
14
|
import { isValidJsonString } from '../utils/isValidJsonString';
|
|
15
15
|
import { extractAllBlocksFromMarkdown } from '../utils/markdown/extractAllBlocksFromMarkdown';
|
|
@@ -17,16 +17,43 @@ import { extractAllListItemsFromMarkdown } from '../utils/markdown/extractAllLis
|
|
|
17
17
|
import { extractOneBlockFromMarkdown } from '../utils/markdown/extractOneBlockFromMarkdown';
|
|
18
18
|
import { removeContentComments } from '../utils/markdown/removeContentComments';
|
|
19
19
|
import { removeMarkdownFormatting } from '../utils/markdown/removeMarkdownFormatting';
|
|
20
|
+
import { capitalize } from '../utils/normalization/capitalize';
|
|
21
|
+
import { decapitalize } from '../utils/normalization/decapitalize';
|
|
22
|
+
import { DIACRITIC_VARIANTS_LETTERS } from '../utils/normalization/DIACRITIC_VARIANTS_LETTERS';
|
|
23
|
+
import { IKeywords, string_keyword } from '../utils/normalization/IKeywords';
|
|
24
|
+
import { isValidKeyword } from '../utils/normalization/isValidKeyword';
|
|
25
|
+
import { nameToUriPart } from '../utils/normalization/nameToUriPart';
|
|
26
|
+
import { nameToUriParts } from '../utils/normalization/nameToUriParts';
|
|
27
|
+
import { normalizeToKebabCase } from '../utils/normalization/normalize-to-kebab-case';
|
|
28
|
+
import { normalizeTo_camelCase } from '../utils/normalization/normalizeTo_camelCase';
|
|
29
|
+
import { normalizeTo_PascalCase } from '../utils/normalization/normalizeTo_PascalCase';
|
|
30
|
+
import { normalizeTo_SCREAMING_CASE } from '../utils/normalization/normalizeTo_SCREAMING_CASE';
|
|
31
|
+
import { normalizeTo_snake_case } from '../utils/normalization/normalizeTo_snake_case';
|
|
32
|
+
import { normalizeWhitespaces } from '../utils/normalization/normalizeWhitespaces';
|
|
33
|
+
import { parseKeywords } from '../utils/normalization/parseKeywords';
|
|
34
|
+
import { parseKeywordsFromString } from '../utils/normalization/parseKeywordsFromString';
|
|
35
|
+
import { removeDiacritics } from '../utils/normalization/removeDiacritics';
|
|
36
|
+
import { searchKeywords } from '../utils/normalization/searchKeywords';
|
|
20
37
|
import { extractBlock } from '../utils/postprocessing/extractBlock';
|
|
21
38
|
import { removeEmojis } from '../utils/removeEmojis';
|
|
22
39
|
import { removeQuotes } from '../utils/removeQuotes';
|
|
23
40
|
import { trimCodeBlock } from '../utils/trimCodeBlock';
|
|
24
41
|
import { trimEndOfCodeBlock } from '../utils/trimEndOfCodeBlock';
|
|
25
42
|
import { unwrapResult } from '../utils/unwrapResult';
|
|
26
|
-
export { assertsExecutionSuccessful,
|
|
43
|
+
export { assertsExecutionSuccessful, executionReportJsonToString, ExecutionReportStringOptions, ExecutionReportStringOptionsDefaults, extractAllBlocksFromMarkdown, // <- [🌻]
|
|
27
44
|
extractAllListItemsFromMarkdown, extractBlock, // <- [🌻]
|
|
28
45
|
extractOneBlockFromMarkdown, isValidJsonString, parseNumber, // <- [🌻]
|
|
29
46
|
prettifyPromptbookString, removeContentComments, removeEmojis, removeMarkdownFormatting, removeQuotes, replaceParameters, trimCodeBlock, trimEndOfCodeBlock, unwrapResult, };
|
|
47
|
+
export { countCharacters, countLines, countPages, countParagraphs, countSentences, CountUtils, countWords };
|
|
48
|
+
export { splitIntoSentences };
|
|
49
|
+
export declare const normalizeTo: {
|
|
50
|
+
camelCase: typeof normalizeTo_camelCase;
|
|
51
|
+
PascalCase: typeof normalizeTo_PascalCase;
|
|
52
|
+
'SCREAMING-CASE': typeof normalizeTo_SCREAMING_CASE;
|
|
53
|
+
snake_case: typeof normalizeTo_snake_case;
|
|
54
|
+
'kebab-case': typeof normalizeToKebabCase;
|
|
55
|
+
};
|
|
56
|
+
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, };
|
|
30
57
|
/**
|
|
31
58
|
* TODO: [🧠] Maybe create some indipendent package like `markdown-tools` from both here exported and @private utilities
|
|
32
59
|
*/
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This error occurs when some expectation is not met in the execution of the pipeline
|
|
3
3
|
*
|
|
4
|
+
* @private Always catched and rethrown as `PromptbookExecutionError`
|
|
4
5
|
* Note: This is a kindof subtype of PromptbookExecutionError
|
|
5
6
|
*/
|
|
6
7
|
export declare class ExpectError extends Error {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Map of letters from diacritic variant to diacritless variant
|
|
3
|
+
* Contains lowercase and uppercase separatelly
|
|
4
|
+
*
|
|
5
|
+
* > "á" => "a"
|
|
6
|
+
* > "ě" => "e"
|
|
7
|
+
* > "Ă" => "A"
|
|
8
|
+
* > ...
|
|
9
|
+
*/
|
|
10
|
+
export declare const DIACRITIC_VARIANTS_LETTERS: Record<string, string>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Semantic helper
|
|
3
|
+
*
|
|
4
|
+
* Keyword is string without diacritics in lowercase [a-z1-9]
|
|
5
|
+
* Words are splitted between multiple keywords @see IKeywords
|
|
6
|
+
*
|
|
7
|
+
* For example `"keyword"`
|
|
8
|
+
*/
|
|
9
|
+
export type string_keyword = string;
|
|
10
|
+
/**
|
|
11
|
+
* Semantic helper
|
|
12
|
+
* Set of keywords @see string_keyword
|
|
13
|
+
*
|
|
14
|
+
*/
|
|
15
|
+
export type IKeywords = Set<string_keyword>;
|
|
16
|
+
/**
|
|
17
|
+
* TODO: [🌮] Keywords with weight
|
|
18
|
+
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function nameToUriPart(name: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function nameToUriParts(name: string): string[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function normalizeToKebabCase(sentence: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function normalizeTo_PascalCase(sentence: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function normalizeTo_snake_case(sentence: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IKeywords } from './IKeywords';
|
|
2
|
+
/**
|
|
3
|
+
* Parses keywords from any object and recursively walks through
|
|
4
|
+
*
|
|
5
|
+
* Tip: If you want to parse multiple inputs, just wrap them in an array
|
|
6
|
+
*
|
|
7
|
+
* @param input of any kind
|
|
8
|
+
* @returns {Set} of keywords without diacritics in lowercase
|
|
9
|
+
*/
|
|
10
|
+
export declare function parseKeywords(input: unknown): IKeywords;
|
|
11
|
+
/**
|
|
12
|
+
* Note: Not using spread in input param because of keeping second parameter for options
|
|
13
|
+
* TODO: [🌺] Use some intermediate util splitWords
|
|
14
|
+
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/openai",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.44.0-1",
|
|
4
4
|
"description": "Library to supercharge your use of large language models",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"openai": "4.2.0"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
|
-
"@promptbook/core": "0.
|
|
41
|
+
"@promptbook/core": "0.44.0-1"
|
|
42
42
|
},
|
|
43
43
|
"main": "./umd/index.umd.js",
|
|
44
44
|
"module": "./esm/index.es.js",
|
|
@@ -2,14 +2,14 @@ import { prettifyPromptbookString } from '../conversion/prettify/prettifyPromptb
|
|
|
2
2
|
import { parseNumber } from '../conversion/utils/parseNumber';
|
|
3
3
|
import { assertsExecutionSuccessful } from '../execution/assertsExecutionSuccessful';
|
|
4
4
|
import { replaceParameters } from '../execution/utils/replaceParameters';
|
|
5
|
-
import { ExecutionReportStringOptions, ExecutionReportStringOptionsDefaults } from '../types/execution-report/ExecutionReportStringOptions';
|
|
6
5
|
import { executionReportJsonToString } from '../types/execution-report/executionReportJsonToString';
|
|
6
|
+
import { ExecutionReportStringOptions, ExecutionReportStringOptionsDefaults } from '../types/execution-report/ExecutionReportStringOptions';
|
|
7
7
|
import { CountUtils } from '../utils/expectation-counters';
|
|
8
8
|
import { countCharacters } from '../utils/expectation-counters/countCharacters';
|
|
9
9
|
import { countLines } from '../utils/expectation-counters/countLines';
|
|
10
10
|
import { countPages } from '../utils/expectation-counters/countPages';
|
|
11
11
|
import { countParagraphs } from '../utils/expectation-counters/countParagraphs';
|
|
12
|
-
import { countSentences } from '../utils/expectation-counters/countSentences';
|
|
12
|
+
import { countSentences, splitIntoSentences } from '../utils/expectation-counters/countSentences';
|
|
13
13
|
import { countWords } from '../utils/expectation-counters/countWords';
|
|
14
14
|
import { isValidJsonString } from '../utils/isValidJsonString';
|
|
15
15
|
import { extractAllBlocksFromMarkdown } from '../utils/markdown/extractAllBlocksFromMarkdown';
|
|
@@ -17,16 +17,43 @@ import { extractAllListItemsFromMarkdown } from '../utils/markdown/extractAllLis
|
|
|
17
17
|
import { extractOneBlockFromMarkdown } from '../utils/markdown/extractOneBlockFromMarkdown';
|
|
18
18
|
import { removeContentComments } from '../utils/markdown/removeContentComments';
|
|
19
19
|
import { removeMarkdownFormatting } from '../utils/markdown/removeMarkdownFormatting';
|
|
20
|
+
import { capitalize } from '../utils/normalization/capitalize';
|
|
21
|
+
import { decapitalize } from '../utils/normalization/decapitalize';
|
|
22
|
+
import { DIACRITIC_VARIANTS_LETTERS } from '../utils/normalization/DIACRITIC_VARIANTS_LETTERS';
|
|
23
|
+
import { IKeywords, string_keyword } from '../utils/normalization/IKeywords';
|
|
24
|
+
import { isValidKeyword } from '../utils/normalization/isValidKeyword';
|
|
25
|
+
import { nameToUriPart } from '../utils/normalization/nameToUriPart';
|
|
26
|
+
import { nameToUriParts } from '../utils/normalization/nameToUriParts';
|
|
27
|
+
import { normalizeToKebabCase } from '../utils/normalization/normalize-to-kebab-case';
|
|
28
|
+
import { normalizeTo_camelCase } from '../utils/normalization/normalizeTo_camelCase';
|
|
29
|
+
import { normalizeTo_PascalCase } from '../utils/normalization/normalizeTo_PascalCase';
|
|
30
|
+
import { normalizeTo_SCREAMING_CASE } from '../utils/normalization/normalizeTo_SCREAMING_CASE';
|
|
31
|
+
import { normalizeTo_snake_case } from '../utils/normalization/normalizeTo_snake_case';
|
|
32
|
+
import { normalizeWhitespaces } from '../utils/normalization/normalizeWhitespaces';
|
|
33
|
+
import { parseKeywords } from '../utils/normalization/parseKeywords';
|
|
34
|
+
import { parseKeywordsFromString } from '../utils/normalization/parseKeywordsFromString';
|
|
35
|
+
import { removeDiacritics } from '../utils/normalization/removeDiacritics';
|
|
36
|
+
import { searchKeywords } from '../utils/normalization/searchKeywords';
|
|
20
37
|
import { extractBlock } from '../utils/postprocessing/extractBlock';
|
|
21
38
|
import { removeEmojis } from '../utils/removeEmojis';
|
|
22
39
|
import { removeQuotes } from '../utils/removeQuotes';
|
|
23
40
|
import { trimCodeBlock } from '../utils/trimCodeBlock';
|
|
24
41
|
import { trimEndOfCodeBlock } from '../utils/trimEndOfCodeBlock';
|
|
25
42
|
import { unwrapResult } from '../utils/unwrapResult';
|
|
26
|
-
export { assertsExecutionSuccessful,
|
|
43
|
+
export { assertsExecutionSuccessful, executionReportJsonToString, ExecutionReportStringOptions, ExecutionReportStringOptionsDefaults, extractAllBlocksFromMarkdown, // <- [🌻]
|
|
27
44
|
extractAllListItemsFromMarkdown, extractBlock, // <- [🌻]
|
|
28
45
|
extractOneBlockFromMarkdown, isValidJsonString, parseNumber, // <- [🌻]
|
|
29
46
|
prettifyPromptbookString, removeContentComments, removeEmojis, removeMarkdownFormatting, removeQuotes, replaceParameters, trimCodeBlock, trimEndOfCodeBlock, unwrapResult, };
|
|
47
|
+
export { countCharacters, countLines, countPages, countParagraphs, countSentences, CountUtils, countWords };
|
|
48
|
+
export { splitIntoSentences };
|
|
49
|
+
export declare const normalizeTo: {
|
|
50
|
+
camelCase: typeof normalizeTo_camelCase;
|
|
51
|
+
PascalCase: typeof normalizeTo_PascalCase;
|
|
52
|
+
'SCREAMING-CASE': typeof normalizeTo_SCREAMING_CASE;
|
|
53
|
+
snake_case: typeof normalizeTo_snake_case;
|
|
54
|
+
'kebab-case': typeof normalizeToKebabCase;
|
|
55
|
+
};
|
|
56
|
+
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, };
|
|
30
57
|
/**
|
|
31
58
|
* TODO: [🧠] Maybe create some indipendent package like `markdown-tools` from both here exported and @private utilities
|
|
32
59
|
*/
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This error occurs when some expectation is not met in the execution of the pipeline
|
|
3
3
|
*
|
|
4
|
+
* @private Always catched and rethrown as `PromptbookExecutionError`
|
|
4
5
|
* Note: This is a kindof subtype of PromptbookExecutionError
|
|
5
6
|
*/
|
|
6
7
|
export declare class ExpectError extends Error {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Map of letters from diacritic variant to diacritless variant
|
|
3
|
+
* Contains lowercase and uppercase separatelly
|
|
4
|
+
*
|
|
5
|
+
* > "á" => "a"
|
|
6
|
+
* > "ě" => "e"
|
|
7
|
+
* > "Ă" => "A"
|
|
8
|
+
* > ...
|
|
9
|
+
*/
|
|
10
|
+
export declare const DIACRITIC_VARIANTS_LETTERS: Record<string, string>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Semantic helper
|
|
3
|
+
*
|
|
4
|
+
* Keyword is string without diacritics in lowercase [a-z1-9]
|
|
5
|
+
* Words are splitted between multiple keywords @see IKeywords
|
|
6
|
+
*
|
|
7
|
+
* For example `"keyword"`
|
|
8
|
+
*/
|
|
9
|
+
export type string_keyword = string;
|
|
10
|
+
/**
|
|
11
|
+
* Semantic helper
|
|
12
|
+
* Set of keywords @see string_keyword
|
|
13
|
+
*
|
|
14
|
+
*/
|
|
15
|
+
export type IKeywords = Set<string_keyword>;
|
|
16
|
+
/**
|
|
17
|
+
* TODO: [🌮] Keywords with weight
|
|
18
|
+
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function nameToUriPart(name: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function nameToUriParts(name: string): string[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function normalizeToKebabCase(sentence: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function normalizeTo_PascalCase(sentence: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function normalizeTo_snake_case(sentence: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IKeywords } from './IKeywords';
|
|
2
|
+
/**
|
|
3
|
+
* Parses keywords from any object and recursively walks through
|
|
4
|
+
*
|
|
5
|
+
* Tip: If you want to parse multiple inputs, just wrap them in an array
|
|
6
|
+
*
|
|
7
|
+
* @param input of any kind
|
|
8
|
+
* @returns {Set} of keywords without diacritics in lowercase
|
|
9
|
+
*/
|
|
10
|
+
export declare function parseKeywords(input: unknown): IKeywords;
|
|
11
|
+
/**
|
|
12
|
+
* Note: Not using spread in input param because of keeping second parameter for options
|
|
13
|
+
* TODO: [🌺] Use some intermediate util splitWords
|
|
14
|
+
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|