@promptbook/utils 0.23.1 → 0.24.0-0

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 (61) hide show
  1. package/esm/index.es.js +161 -3
  2. package/esm/index.es.js.map +1 -1
  3. package/esm/typings/_packages/types.index.d.ts +2 -2
  4. package/esm/typings/_packages/utils.index.d.ts +11 -1
  5. package/esm/typings/conversion/parseCommand.d.ts +2 -2
  6. package/esm/typings/execution/PromptResult.d.ts +1 -1
  7. package/esm/typings/types/Command.d.ts +17 -4
  8. package/esm/typings/types/PromptTemplatePipelineJson/PromptTemplateJson.d.ts +21 -2
  9. package/esm/typings/types/execution-report/ExecutionReportJson.d.ts +19 -0
  10. package/esm/typings/types/execution-report/ExecutionReportString.d.ts +16 -0
  11. package/esm/typings/types/execution-report/executionReportJsonToString.d.ts +6 -0
  12. package/esm/typings/types/typeAliases.d.ts +3 -1
  13. package/esm/typings/utils/expectation-counters/countCharacters.d.ts +5 -0
  14. package/esm/typings/utils/expectation-counters/countCharacters.test.d.ts +1 -0
  15. package/esm/typings/utils/expectation-counters/countLines.d.ts +5 -0
  16. package/esm/typings/utils/expectation-counters/countLines.test.d.ts +1 -0
  17. package/esm/typings/utils/expectation-counters/countPages.d.ts +5 -0
  18. package/esm/typings/utils/expectation-counters/countPages.test.d.ts +1 -0
  19. package/esm/typings/utils/expectation-counters/countParagraphs.d.ts +5 -0
  20. package/esm/typings/utils/expectation-counters/countParagraphs.test.d.ts +1 -0
  21. package/esm/typings/utils/expectation-counters/countSentences.d.ts +5 -0
  22. package/esm/typings/utils/expectation-counters/countSentences.test.d.ts +1 -0
  23. package/esm/typings/utils/expectation-counters/countWords.d.ts +5 -0
  24. package/esm/typings/utils/expectation-counters/countWords.test.d.ts +1 -0
  25. package/esm/typings/utils/expectation-counters/index.d.ts +5 -0
  26. package/esm/typings/utils/parseNumber.d.ts +10 -0
  27. package/esm/typings/utils/parseNumber.test.d.ts +1 -0
  28. package/esm/typings/utils/trimCodeBlock.d.ts +8 -0
  29. package/esm/typings/utils/trimCodeBlock.test.d.ts +1 -0
  30. package/esm/typings/utils/trimEndOfCodeBlock.d.ts +2 -1
  31. package/package.json +4 -4
  32. package/umd/index.umd.js +169 -1
  33. package/umd/index.umd.js.map +1 -1
  34. package/umd/typings/_packages/types.index.d.ts +2 -2
  35. package/umd/typings/_packages/utils.index.d.ts +11 -1
  36. package/umd/typings/conversion/parseCommand.d.ts +2 -2
  37. package/umd/typings/execution/PromptResult.d.ts +1 -1
  38. package/umd/typings/types/Command.d.ts +17 -4
  39. package/umd/typings/types/PromptTemplatePipelineJson/PromptTemplateJson.d.ts +21 -2
  40. package/umd/typings/types/execution-report/ExecutionReportJson.d.ts +19 -0
  41. package/umd/typings/types/execution-report/ExecutionReportString.d.ts +16 -0
  42. package/umd/typings/types/execution-report/executionReportJsonToString.d.ts +6 -0
  43. package/umd/typings/types/typeAliases.d.ts +3 -1
  44. package/umd/typings/utils/expectation-counters/countCharacters.d.ts +5 -0
  45. package/umd/typings/utils/expectation-counters/countCharacters.test.d.ts +1 -0
  46. package/umd/typings/utils/expectation-counters/countLines.d.ts +5 -0
  47. package/umd/typings/utils/expectation-counters/countLines.test.d.ts +1 -0
  48. package/umd/typings/utils/expectation-counters/countPages.d.ts +5 -0
  49. package/umd/typings/utils/expectation-counters/countPages.test.d.ts +1 -0
  50. package/umd/typings/utils/expectation-counters/countParagraphs.d.ts +5 -0
  51. package/umd/typings/utils/expectation-counters/countParagraphs.test.d.ts +1 -0
  52. package/umd/typings/utils/expectation-counters/countSentences.d.ts +5 -0
  53. package/umd/typings/utils/expectation-counters/countSentences.test.d.ts +1 -0
  54. package/umd/typings/utils/expectation-counters/countWords.d.ts +5 -0
  55. package/umd/typings/utils/expectation-counters/countWords.test.d.ts +1 -0
  56. package/umd/typings/utils/expectation-counters/index.d.ts +5 -0
  57. package/umd/typings/utils/parseNumber.d.ts +10 -0
  58. package/umd/typings/utils/parseNumber.test.d.ts +1 -0
  59. package/umd/typings/utils/trimCodeBlock.d.ts +8 -0
  60. package/umd/typings/utils/trimCodeBlock.test.d.ts +1 -0
  61. package/umd/typings/utils/trimEndOfCodeBlock.d.ts +2 -1
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * Function trimEndOfCodeBlock will remove ending code block from the string if it is present.
3
3
  *
4
- * This is usefull for post-processing of the result of the completion LLM model if you want to start code block in the prompt but you don't want to end it in the result.
4
+ * Note: This is usefull for post-processing of the result of the completion LLM model
5
+ * if you want to start code block in the prompt but you don't want to end it in the result.
5
6
  */
6
7
  export declare function trimEndOfCodeBlock(value: string): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/utils",
3
- "version": "0.23.1",
3
+ "version": "0.24.0-0",
4
4
  "description": "Library to supercharge your use of large language models",
5
5
  "private": false,
6
6
  "sideEffects": false,
@@ -34,11 +34,11 @@
34
34
  },
35
35
  "homepage": "https://www.npmjs.com/package/@promptbook/core",
36
36
  "dependencies": {
37
- "n12": "1.8.17",
38
- "spacetrim": "0.9.20"
37
+ "n12": "1.8.18",
38
+ "spacetrim": "0.9.21"
39
39
  },
40
40
  "peerDependencies": {
41
- "@promptbook/core": "0.23.1"
41
+ "@promptbook/core": "0.24.0-0"
42
42
  },
43
43
  "main": "./umd/index.umd.js",
44
44
  "module": "./esm/index.es.js",
package/umd/index.umd.js CHANGED
@@ -8,6 +8,15 @@
8
8
 
9
9
  var spaceTrim__default = /*#__PURE__*/_interopDefaultLegacy(spaceTrim);
10
10
 
11
+ /**
12
+ * Converts execution report from JSON to string format
13
+ */
14
+ function executionReportJsonToString(executionReportJson) {
15
+ var executionReportString = '!!!!!!!!!!!!!';
16
+ executionReportString += executionReportJson.length;
17
+ return executionReportString;
18
+ }
19
+
11
20
  /**
12
21
  * All possible emoji chars like "🍆", "🍡", "🍤"...
13
22
  * Note: this will be needed to update annually - now updated at 2022-01-19
@@ -48,6 +57,74 @@
48
57
  * TODO: Mirror from Collboard or some common library
49
58
  */
50
59
 
60
+ /**
61
+ * Counts number of characters in the text
62
+ */
63
+ function countCharacters(text) {
64
+ // Remove null characters
65
+ text = text.replace(/\0/g, '');
66
+ // Replace emojis (and also ZWJ sequence) with hyphens
67
+ text = text.replace(/(\p{Emoji})\p{Modifier_Symbol}/gu, '$1');
68
+ text = text.replace(/(\p{Emoji})[\u{FE00}-\u{FE0F}]/gu, '$1');
69
+ text = text.replace(/\p{Emoji}(\u{200D}\p{Emoji})*/gu, '-');
70
+ return text.length;
71
+ }
72
+
73
+ /**
74
+ * Counts number of lines in the text
75
+ */
76
+ function countLines(text) {
77
+ if (text === '') {
78
+ return 0;
79
+ }
80
+ return text.split('\n').length;
81
+ }
82
+
83
+ /**
84
+ * Counts number of pages in the text
85
+ */
86
+ function countPages(text) {
87
+ var sentencesPerPage = 5; // Assuming each page has 5 sentences
88
+ var sentences = text.split(/[.!?]+/).filter(function (sentence) { return sentence.trim() !== ''; });
89
+ var pageCount = Math.ceil(sentences.length / sentencesPerPage);
90
+ return pageCount;
91
+ }
92
+
93
+ /**
94
+ * Counts number of paragraphs in the text
95
+ */
96
+ function countParagraphs(text) {
97
+ return text.split(/\n\s*\n/).filter(function (paragraph) { return paragraph.trim() !== ''; }).length;
98
+ }
99
+
100
+ /**
101
+ * Counts number of sentences in the text
102
+ */
103
+ function countSentences(text) {
104
+ return text.split(/[.!?]+/).filter(function (sentence) { return sentence.trim() !== ''; }).length;
105
+ }
106
+
107
+ /**
108
+ * Counts number of words in the text
109
+ */
110
+ function countWords(text) {
111
+ text = text.replace(/[\p{Emoji}]/gu, 'a');
112
+ text = n12.removeDiacritics(text);
113
+ return text.split(/[^a-zа-я0-9]+/i).filter(function (word) { return word.length > 0; }).length;
114
+ }
115
+
116
+ /**
117
+ * Index of all counter functions
118
+ */
119
+ var CountUtils = {
120
+ CHARACTERS: countCharacters,
121
+ WORDS: countWords,
122
+ SENTENCES: countSentences,
123
+ PARAGRAPHS: countParagraphs,
124
+ LINES: countLines,
125
+ PAGES: countPages,
126
+ };
127
+
51
128
  /**
52
129
  * Function isValidJsonString will tell you if the string is valid JSON or not
53
130
  */
@@ -242,6 +319,68 @@
242
319
  return str;
243
320
  }
244
321
 
322
+ /**
323
+ * Function parseNumber will parse number from string
324
+ *
325
+ * Unlike Number.parseInt, Number.parseFloat it will never ever result in NaN
326
+ * Note: it also works only with decimal numbers
327
+ */
328
+ function parseNumber(value) {
329
+ var originalValue = value;
330
+ if (typeof value === 'number') {
331
+ value = value.toString(); // <- TODO: Maybe more efficient way to do this
332
+ }
333
+ if (typeof value !== 'string') {
334
+ return 0;
335
+ }
336
+ value = value.trim();
337
+ if (value.startsWith('+')) {
338
+ return parseNumber(value.substring(1));
339
+ }
340
+ if (value.startsWith('-')) {
341
+ var number = parseNumber(value.substring(1));
342
+ if (number === 0) {
343
+ return 0; // <- Note: To prevent -0
344
+ }
345
+ return -number;
346
+ }
347
+ value = value.replace(/,/g, '.');
348
+ value = value.toUpperCase();
349
+ if (value === '') {
350
+ return 0;
351
+ }
352
+ if (value === '♾' || value.startsWith('INF')) {
353
+ return Infinity;
354
+ }
355
+ if (value.includes('/')) {
356
+ var _a = __read(value.split('/'), 2), numerator_ = _a[0], denominator_ = _a[1];
357
+ var numerator = parseNumber(numerator_);
358
+ var denominator = parseNumber(denominator_);
359
+ if (denominator === 0) {
360
+ throw new Error("Unable to parse number from \"".concat(originalValue, "\" because denominator is zero"));
361
+ }
362
+ return numerator / denominator;
363
+ }
364
+ if (/^(NAN|NULL|NONE|UNDEFINED|ZERO|NO.*)$/.test(value)) {
365
+ return 0;
366
+ }
367
+ if (value.includes('E')) {
368
+ var _b = __read(value.split('E'), 2), significand = _b[0], exponent = _b[1];
369
+ return parseNumber(significand) * Math.pow(10, parseNumber(exponent));
370
+ }
371
+ if (!/^[0-9.]+$/.test(value) || value.split('.').length > 2) {
372
+ throw new Error("Unable to parse number from \"".concat(originalValue, "\""));
373
+ }
374
+ var num = parseFloat(value);
375
+ if (isNaN(num)) {
376
+ throw new Error("Unexpected NaN when parsing number from \"".concat(originalValue, "\""));
377
+ }
378
+ return num;
379
+ }
380
+ /**
381
+ * TODO: Maybe use sth. like safe-eval in fraction/calculation case @see https://www.npmjs.com/package/safe-eval
382
+ */
383
+
245
384
  /**
246
385
  * Removes emojis from a string and fix whitespaces
247
386
  *
@@ -340,10 +479,29 @@
340
479
  return replacedTemplate;
341
480
  }
342
481
 
482
+ /**
483
+ * Function trimCodeBlock will trim starting and ending code block from the string if it is present.
484
+ *
485
+ * Note: This is usefull for post-processing of the result of the chat LLM model
486
+ * when the model wraps the result in the (markdown) code block.
487
+ *
488
+ */
489
+ function trimCodeBlock(value) {
490
+ value = spaceTrim__default["default"](value);
491
+ if (!/^```[a-z]*(.*)```$/is.test(value)) {
492
+ return value;
493
+ }
494
+ value = value.replace(/^```[a-z]*/i, '');
495
+ value = value.replace(/```$/i, '');
496
+ value = spaceTrim__default["default"](value);
497
+ return value;
498
+ }
499
+
343
500
  /**
344
501
  * Function trimEndOfCodeBlock will remove ending code block from the string if it is present.
345
502
  *
346
- * This is usefull for post-processing of the result of the completion LLM model if you want to start code block in the prompt but you don't want to end it in the result.
503
+ * Note: This is usefull for post-processing of the result of the completion LLM model
504
+ * if you want to start code block in the prompt but you don't want to end it in the result.
347
505
  */
348
506
  function trimEndOfCodeBlock(value) {
349
507
  value = spaceTrim__default["default"](value);
@@ -423,17 +581,27 @@
423
581
  * TODO: [🧠] Should this also unwrap the (parenthesis)
424
582
  */
425
583
 
584
+ exports.CountUtils = CountUtils;
426
585
  exports.EMOJIS = EMOJIS;
427
586
  exports.EMOJIS_IN_CATEGORIES = EMOJIS_IN_CATEGORIES;
587
+ exports.countCharacters = countCharacters;
588
+ exports.countLines = countLines;
589
+ exports.countPages = countPages;
590
+ exports.countParagraphs = countParagraphs;
591
+ exports.countSentences = countSentences;
592
+ exports.countWords = countWords;
593
+ exports.executionReportJsonToString = executionReportJsonToString;
428
594
  exports.extractAllBlocksFromMarkdown = extractAllBlocksFromMarkdown;
429
595
  exports.extractAllListItemsFromMarkdown = extractAllListItemsFromMarkdown;
430
596
  exports.extractOneBlockFromMarkdown = extractOneBlockFromMarkdown;
431
597
  exports.isValidJsonString = isValidJsonString;
598
+ exports.parseNumber = parseNumber;
432
599
  exports.removeContentComments = removeContentComments;
433
600
  exports.removeEmojis = removeEmojis;
434
601
  exports.removeMarkdownFormatting = removeMarkdownFormatting;
435
602
  exports.removeQuotes = removeQuotes;
436
603
  exports.replaceParameters = replaceParameters;
604
+ exports.trimCodeBlock = trimCodeBlock;
437
605
  exports.trimEndOfCodeBlock = trimEndOfCodeBlock;
438
606
  exports.unwrapResult = unwrapResult;
439
607
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.umd.js","sources":["../../../src/utils/emojis.ts","../../../src/utils/isValidJsonString.ts","../../../node_modules/tslib/tslib.es6.js","../../../src/utils/markdown/extractAllBlocksFromMarkdown.ts","../../../src/utils/markdown/extractAllListItemsFromMarkdown.ts","../../../src/utils/markdown/extractOneBlockFromMarkdown.ts","../../../src/utils/markdown/removeContentComments.ts","../../../src/utils/markdown/removeMarkdownFormatting.ts","../../../src/utils/removeEmojis.ts","../../../src/utils/removeQuotes.ts","../../../src/utils/replaceParameters.ts","../../../src/utils/trimEndOfCodeBlock.ts","../../../src/utils/unwrapResult.ts"],"sourcesContent":[null,null,"/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n",null,null,null,null,null,null,null,null,null,null],"names":["capitalize","spaceTrim"],"mappings":";;;;;;;;;;IAEA;;;;;;QAMa,oBAAoB,GAA6C;QAC1E,OAAO,EACH,uVAAuV,CAAC,KAAK,CACzV,GAAG,CACsB;QAEjC,yBAAyB,EACrB,iKAAiK,CAAC,KAAK,CACnK,GAAG,CACsB;QAEjC,oBAAoB,EAChB,22CAA22C,CAAC,KAAK,CAC72C,GAAG,CACsB;QAEjC,0BAA0B,EACtB,sJAAsJ,CAAC,KAAK,CACxJ,GAAG,CACsB;QAEjC,aAAa,EACT,g3DAAg3D,CAAC,KAAK,CACl3D,GAAG,CACsB;QAEjC,oBAAoB,EAChB,g3DAAg3D,CAAC,KAAK,CACl3D,GAAG,CACsB;QAEjC,cAAc,EACV,g3DAAg3D,CAAC,KAAK,CACl3D,GAAG,CACsB;QAEjC,mBAAmB,EACf,g3DAAg3D,CAAC,KAAK,CACl3D,GAAG,CACsB;QAEjC,cAAc,EACV,k3DAAk3D,CAAC,KAAK,CACp3D,GAAG,CACsB;QAEjC,kBAAkB,EACd,ylBAAylB,CAAC,KAAK,CAC3lB,GAAG,CACsB;QAEjC,cAAc,EACV,kXAAkX,CAAC,KAAK,CACpX,GAAG,CACsB;QAEjC,qBAAqB,EACjB,6bAA6b,CAAC,KAAK,CAC/b,GAAG,CACsB;QAEjC,iBAAiB,EACb,6XAA6X,CAAC,KAAK,CAC/X,GAAG,CACsB;QAEjC,OAAO,EACH,qoBAAqo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AK,EAAE,0BAA0B,EAAE,KAAK,EAAE,CAAC,CAAC;SAC9F;aAAM;YACH,OAAO,aAAa,CAAC;SACxB;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.umd.js","sources":["../../../src/types/execution-report/executionReportJsonToString.ts","../../../src/utils/emojis.ts","../../../src/utils/expectation-counters/countCharacters.ts","../../../src/utils/expectation-counters/countLines.ts","../../../src/utils/expectation-counters/countPages.ts","../../../src/utils/expectation-counters/countParagraphs.ts","../../../src/utils/expectation-counters/countSentences.ts","../../../src/utils/expectation-counters/countWords.ts","../../../src/utils/expectation-counters/index.ts","../../../src/utils/isValidJsonString.ts","../../../node_modules/tslib/tslib.es6.js","../../../src/utils/markdown/extractAllBlocksFromMarkdown.ts","../../../src/utils/markdown/extractAllListItemsFromMarkdown.ts","../../../src/utils/markdown/extractOneBlockFromMarkdown.ts","../../../src/utils/markdown/removeContentComments.ts","../../../src/utils/markdown/removeMarkdownFormatting.ts","../../../src/utils/parseNumber.ts","../../../src/utils/removeEmojis.ts","../../../src/utils/removeQuotes.ts","../../../src/utils/replaceParameters.ts","../../../src/utils/trimCodeBlock.ts","../../../src/utils/trimEndOfCodeBlock.ts","../../../src/utils/unwrapResult.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,"/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n",null,null,null,null,null,null,null,null,null,null,null,null],"names":["removeDiacritics","capitalize","spaceTrim"],"mappings":";;;;;;;;;;IAGA;;;aAGgB,2BAA2B,CAAC,mBAAwC;QAChF,IAAI,qBAAqB,GAAG,eAAe,CAAC;QAE5C,qBAAqB,IAAI,mBAAmB,CAAC,MAAM,CAAC;QAEpD,OAAO,qBAA8C,CAAC;IAC1D;;ICVA;;;;;;QAMa,oBAAoB,GAA6C;QAC1E,OAAO,EACH,uVAAuV,CAAC,KAAK,CACzV,GAAG,CACsB;QAEjC,yBAAyB,EACrB,iKAAiK,CAAC,KAAK,CACnK,GAAG,CACsB;QAEjC,oBAAoB,EAChB,22CAA22C,CAAC,KAAK,CAC72C,GAAG,CACsB;QAEjC,0BAA0B,EACtB,sJAAsJ,CAAC,KAAK,CACxJ,GAAG,CACsB;QAEjC,aAAa,EACT,g3DAAg3D,CAAC,KAAK,CACl3D,GAAG,CACsB;QAEjC,oBAAoB,EAChB,g3DAAg3D,CAAC,KAAK,CACl3D,GAAG,CACsB;QAEjC,cAAc,EACV,g3DAAg3D,CAAC,KAAK,CACl3D,GAAG,CACsB;QAEjC,mBAAmB,EACf,g3DAAg3D,CAAC,KAAK,CACl3D,GAAG,CACsB;QAEjC,cAAc,EACV,k3DAAk3D,CAAC,KAAK,CACp3D,GAAG,CACsB;QAEjC,kBAAkB,EACd,ylBAAylB,CAAC,KAAK,CAC3lB,GAAG,CACsB;QAEjC,cAAc,EACV,kXAAkX,CAAC,KAAK,CACpX,GAAG,CACsB;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C,GAAG,EAAE,GAAG,CAAC;YACV,CAAC,GAAG,EAAE,GAAG,CAAC;YACV,CAAC,GAAG,EAAE,GAAG,CAAC;YACV,CAAC,GAAG,EAAE,GAAG,CAAC;YACV,CAAC,GAAG,EAAE,GAAG,CAAC;SAEjB,CAAC,IAAI,CAAC,UAAC,EAAsB;gBAAtB,KAAA,aAAsB,EAArB,UAAU,QAAA,EAAE,QAAQ,QAAA;YACzB,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE;gBACvC,OAAO,KAAK,CAAC;aAChB;YAED,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;gBACnC,OAAO,KAAK,CAAC;aAChB;YAED,IAAI,YAAY,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;gBACvE,OAAO,KAAK,CAAC;aAChB;YAED,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,YAAY,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;gBACvE,OAAO,KAAK,CAAC;aAChB;YAED,OAAO,IAAI,CAAC;SACf,CAAC,EACJ;YACE,OAAO,YAAY,CAAC,YAAY,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,0BAA0B,EAAE,KAAK,EAAE,CAAC,CAAC;SAC9F;aAAM;YACH,OAAO,aAAa,CAAC;SACxB;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -9,7 +9,7 @@ import { ExecutionType } from '../types/ExecutionTypes';
9
9
  import { ModelRequirements, ModelVariant } from '../types/ModelRequirements';
10
10
  import { Parameters } from '../types/Parameters';
11
11
  import { Prompt } from '../types/Prompt';
12
- import { PromptTemplateJson } from '../types/PromptTemplatePipelineJson/PromptTemplateJson';
12
+ import { EXPECTATION_UNITS, ExpectationAmount, ExpectationUnit, PromptTemplateJson } from '../types/PromptTemplatePipelineJson/PromptTemplateJson';
13
13
  import { PromptTemplateParameterJson } from '../types/PromptTemplatePipelineJson/PromptTemplateParameterJson';
14
14
  import { PromptTemplatePipelineJson } from '../types/PromptTemplatePipelineJson/PromptTemplatePipelineJson';
15
15
  import { PromptTemplatePipelineString } from '../types/PromptTemplatePipelineString';
@@ -17,7 +17,7 @@ import { ScriptLanguage } from '../types/ScriptLanguage';
17
17
  import { TaskProgress } from '../types/TaskProgress';
18
18
  import { string_char_emoji } from '../types/typeAliasEmoji';
19
19
  import { ILicense, IPersonProfile, IRepository, client_id, number_bytes, number_days, number_gigabytes, number_hours, number_integer, number_kilobytes, number_likeness, number_megabytes, number_miliseconds, number_minutes, number_months, number_negative, number_percent, number_positive, number_seconds, number_terabytes, number_weeks, number_years, string_attribute, string_attribute_value_scope, string_business_category_name, string_char, string_chat_prompt, string_color, string_completion_prompt, string_css, string_css_class, string_css_property, string_css_selector, string_css_value, string_data_url, string_domain, string_email, string_file_absolute_path, string_file_extension, string_file_path, string_file_relative_path, string_filename, string_folder_absolute_path, string_folder_path, string_folder_relative_path, string_host, string_hostname, string_href, string_html, string_javascript, string_javascript_name, string_license, string_license_token, string_markdown, string_markdown_text, string_mime_type, string_mime_type_with_wildcard, string_model_name, string_name, string_page, string_password, string_person_fullname, string_person_profile, string_pgp_key, string_prompt, string_protocol, string_ptbk_url, string_ptbk_url_with_hashtemplate, string_script, string_sha256, string_ssh_key, string_svg, string_tdl, string_template, string_text_prompt, string_title, string_token, string_translate_language, string_translate_name, string_translate_name_not_normalized, string_uri, string_uri_part, string_uriid, string_url, string_url_image, string_version, string_version_dependency, string_xml } from '../types/typeAliases';
20
- export { CommonExecutionToolsOptions, ExecutionTools, ExecutionType, ILicense, IPersonProfile, IRepository, ModelRequirements, ModelVariant, NaturalExecutionTools, Parameters, Prompt, PromptChatResult, PromptCommonResult, PromptCompletionResult, PromptResult, PromptTemplateJson, PromptTemplateParameterJson, PromptTemplatePipelineJson, PromptTemplatePipelineString, PtpExecutor, ScriptExecutionTools, ScriptExecutionToolsExecuteOptions, ScriptLanguage, TaskProgress, UserInterfaceTools, UserInterfaceToolsPromptDialogOptions, client_id, number_bytes, number_days, number_gigabytes, number_hours, number_integer, number_kilobytes, number_likeness, number_megabytes, number_miliseconds, number_minutes, number_months, number_negative, number_percent, number_positive, number_seconds, number_terabytes, number_weeks, number_years, string_attribute, string_attribute_value_scope, string_business_category_name, string_char, string_char_emoji, string_chat_prompt, string_color, string_completion_prompt, string_css, string_css_class, string_css_property, string_css_selector, string_css_value, string_data_url, string_domain, string_email, string_file_absolute_path, string_file_extension, string_file_path, string_file_relative_path, string_filename, string_folder_absolute_path, string_folder_path, string_folder_relative_path, string_host, string_hostname, string_href, string_html, string_javascript, string_javascript_name, string_license, string_license_token, string_markdown, string_markdown_text, string_mime_type, string_mime_type_with_wildcard, string_model_name, string_name, string_page, string_password, string_person_fullname, string_person_profile, string_pgp_key, string_prompt, string_protocol, string_ptbk_url, string_ptbk_url_with_hashtemplate, string_script, string_sha256, string_ssh_key, string_svg, string_tdl, string_template, string_text_prompt, string_title, string_token, string_translate_language, string_translate_name, string_translate_name_not_normalized, string_uri, string_uri_part, string_uriid, string_url, string_url_image, string_version, string_version_dependency, string_xml, };
20
+ export { CommonExecutionToolsOptions, EXPECTATION_UNITS, ExecutionTools, ExecutionType, ExpectationAmount, ExpectationUnit, ILicense, IPersonProfile, IRepository, ModelRequirements, ModelVariant, NaturalExecutionTools, Parameters, Prompt, PromptChatResult, PromptCommonResult, PromptCompletionResult, PromptResult, PromptTemplateJson, PromptTemplateParameterJson, PromptTemplatePipelineJson, PromptTemplatePipelineString, PtpExecutor, ScriptExecutionTools, ScriptExecutionToolsExecuteOptions, ScriptLanguage, TaskProgress, UserInterfaceTools, UserInterfaceToolsPromptDialogOptions, client_id, number_bytes, number_days, number_gigabytes, number_hours, number_integer, number_kilobytes, number_likeness, number_megabytes, number_miliseconds, number_minutes, number_months, number_negative, number_percent, number_positive, number_seconds, number_terabytes, number_weeks, number_years, string_attribute, string_attribute_value_scope, string_business_category_name, string_char, string_char_emoji, string_chat_prompt, string_color, string_completion_prompt, string_css, string_css_class, string_css_property, string_css_selector, string_css_value, string_data_url, string_domain, string_email, string_file_absolute_path, string_file_extension, string_file_path, string_file_relative_path, string_filename, string_folder_absolute_path, string_folder_path, string_folder_relative_path, string_host, string_hostname, string_href, string_html, string_javascript, string_javascript_name, string_license, string_license_token, string_markdown, string_markdown_text, string_mime_type, string_mime_type_with_wildcard, string_model_name, string_name, string_page, string_password, string_person_fullname, string_person_profile, string_pgp_key, string_prompt, string_protocol, string_ptbk_url, string_ptbk_url_with_hashtemplate, string_script, string_sha256, string_ssh_key, string_svg, string_tdl, string_template, string_text_prompt, string_title, string_token, string_translate_language, string_translate_name, string_translate_name_not_normalized, string_uri, string_uri_part, string_uriid, string_url, string_url_image, string_version, string_version_dependency, string_xml, };
21
21
  /**
22
22
  * TODO: !!! Filter out all the types that are not used in the library
23
23
  */
@@ -1,13 +1,23 @@
1
+ import { executionReportJsonToString } from '../types/execution-report/executionReportJsonToString';
1
2
  import { EMOJIS, EMOJIS_IN_CATEGORIES } from '../utils/emojis';
3
+ import { CountUtils } from '../utils/expectation-counters';
4
+ import { countCharacters } from '../utils/expectation-counters/countCharacters';
5
+ import { countLines } from '../utils/expectation-counters/countLines';
6
+ import { countPages } from '../utils/expectation-counters/countPages';
7
+ import { countParagraphs } from '../utils/expectation-counters/countParagraphs';
8
+ import { countSentences } from '../utils/expectation-counters/countSentences';
9
+ import { countWords } from '../utils/expectation-counters/countWords';
2
10
  import { isValidJsonString } from '../utils/isValidJsonString';
3
11
  import { extractAllBlocksFromMarkdown } from '../utils/markdown/extractAllBlocksFromMarkdown';
4
12
  import { extractAllListItemsFromMarkdown } from '../utils/markdown/extractAllListItemsFromMarkdown';
5
13
  import { extractOneBlockFromMarkdown } from '../utils/markdown/extractOneBlockFromMarkdown';
6
14
  import { removeContentComments } from '../utils/markdown/removeContentComments';
7
15
  import { removeMarkdownFormatting } from '../utils/markdown/removeMarkdownFormatting';
16
+ import { parseNumber } from '../utils/parseNumber';
8
17
  import { removeEmojis } from '../utils/removeEmojis';
9
18
  import { removeQuotes } from '../utils/removeQuotes';
10
19
  import { replaceParameters } from '../utils/replaceParameters';
20
+ import { trimCodeBlock } from '../utils/trimCodeBlock';
11
21
  import { trimEndOfCodeBlock } from '../utils/trimEndOfCodeBlock';
12
22
  import { unwrapResult } from '../utils/unwrapResult';
13
- export { EMOJIS, EMOJIS_IN_CATEGORIES, extractAllBlocksFromMarkdown, extractAllListItemsFromMarkdown, extractOneBlockFromMarkdown, isValidJsonString, removeContentComments, removeEmojis, removeMarkdownFormatting, removeQuotes, replaceParameters, trimEndOfCodeBlock, unwrapResult, };
23
+ export { CountUtils, EMOJIS, EMOJIS_IN_CATEGORIES, countCharacters, countLines, countPages, countParagraphs, countSentences, countWords, executionReportJsonToString, extractAllBlocksFromMarkdown, extractAllListItemsFromMarkdown, extractOneBlockFromMarkdown, isValidJsonString, parseNumber, removeContentComments, removeEmojis, removeMarkdownFormatting, removeQuotes, replaceParameters, trimCodeBlock, trimEndOfCodeBlock, unwrapResult, };
@@ -1,5 +1,5 @@
1
- import { string_markdown_text } from '.././types/typeAliases';
2
- import { Command } from '../types/Command';
1
+ import type { string_markdown_text } from '.././types/typeAliases';
2
+ import type { Command } from '../types/Command';
3
3
  /**
4
4
  * Parses one line of ul/ol to command
5
5
  */
@@ -1,4 +1,4 @@
1
- import { string_model_name } from '.././types/typeAliases';
1
+ import type { string_model_name } from '.././types/typeAliases';
2
2
  /**
3
3
  * Prompt result is the simplest concept of execution.
4
4
  * It is the result of executing one prompt _(NOT a template)_.
@@ -1,11 +1,12 @@
1
- import { string_markdown_text, string_name, string_version } from '.././types/typeAliases';
2
- import { ExecutionType } from './ExecutionTypes';
3
- import { ModelRequirements } from './ModelRequirements';
1
+ import type { string_markdown_text, string_name, string_version } from '.././types/typeAliases';
2
+ import type { ExecutionType } from './ExecutionTypes';
3
+ import type { ModelRequirements } from './ModelRequirements';
4
+ import type { ExpectationAmount, ExpectationUnit } from './PromptTemplatePipelineJson/PromptTemplateJson';
4
5
  /**
5
6
  * Command is one piece of the prompt template which adds some logic to the prompt template or the whole pipeline.
6
7
  * It is parsed from the markdown from ul/ol items - one command per one item.
7
8
  */
8
- export type Command = PtbkUrlCommand | PtbkVersionCommand | ExecuteCommand | ModelCommand | ParameterCommand | PostprocessCommand;
9
+ export type Command = PtbkUrlCommand | PtbkVersionCommand | ExecuteCommand | ModelCommand | ParameterCommand | PostprocessCommand | ExpectCommand;
9
10
  /**
10
11
  * PtpVersion command tells which version is .ptp file using
11
12
  *
@@ -63,3 +64,15 @@ export interface PostprocessCommand {
63
64
  readonly type: 'POSTPROCESS';
64
65
  readonly functionName: string_name;
65
66
  }
67
+ /**
68
+ * Expect command describes the desired output of the prompt template (after post-processing)
69
+ * It can set limits for the maximum/minimum length of the output, measured in characters, words, sentences, paragraphs,...
70
+ *
71
+ * Note: LLMs work with tokens, not characters, but in Promptbooks we want to use some human-recognisable and cross-model interoperable units.
72
+ */
73
+ export interface ExpectCommand {
74
+ readonly type: 'EXPECT';
75
+ readonly sign: 'EXACTLY' | 'MINIMUM' | 'MAXIMUM';
76
+ readonly unit: ExpectationUnit;
77
+ readonly amount: ExpectationAmount;
78
+ }
@@ -1,4 +1,4 @@
1
- import { string_javascript, string_markdown, string_name, string_prompt, string_template } from '../.././types/typeAliases';
1
+ import { number_integer, number_positive_or_zero, string_javascript, string_markdown, string_name, string_prompt, string_template } from '../.././types/typeAliases';
2
2
  import { ExecutionType } from '../ExecutionTypes';
3
3
  import { ModelRequirements } from '../ModelRequirements';
4
4
  import { ScriptLanguage } from '../ScriptLanguage';
@@ -9,14 +9,33 @@ export type PromptTemplateJson = NaturalTemplateJson | SimpleTemplateJson | Scri
9
9
  /**
10
10
  * Template for prompt to LLM
11
11
  */
12
- interface NaturalTemplateJson extends PromptTemplateJsonCommon {
12
+ export interface NaturalTemplateJson extends PromptTemplateJsonCommon {
13
13
  readonly executionType: 'PROMPT_TEMPLATE';
14
+ /**
15
+ * Expectations for the answer
16
+ */
17
+ readonly expectations: Partial<Record<Lowercase<ExpectationUnit>, {
18
+ min?: ExpectationAmount;
19
+ max?: ExpectationAmount;
20
+ }>>;
14
21
  /**
15
22
  * Requirements for the model
16
23
  * - This is required only for executionType PROMPT_TEMPLATE
17
24
  */
18
25
  readonly modelRequirements?: ModelRequirements;
19
26
  }
27
+ /**
28
+ * Units of text measurement
29
+ */
30
+ export declare const EXPECTATION_UNITS: readonly ["CHARACTERS", "WORDS", "SENTENCES", "PARAGRAPHS", "LINES", "PAGES"];
31
+ /**
32
+ * Unit of text measurement
33
+ */
34
+ export type ExpectationUnit = (typeof EXPECTATION_UNITS)[number];
35
+ /**
36
+ * Amount of text measurement
37
+ */
38
+ export type ExpectationAmount = number_integer & number_positive_or_zero;
20
39
  /**
21
40
  * Template for simple concatenation of strings
22
41
  */
@@ -0,0 +1,19 @@
1
+ import type { PromptResult } from '../../execution/PromptResult';
2
+ import { Prompt } from '../Prompt';
3
+ /**
4
+ * ExecutionReport is result of executing one promptbook
5
+ * It is kind of a variant of the promptbook usefull for debugging, logging and transparency for users.
6
+ *
7
+ * It can have 2 formats:
8
+ * - **.md file** created from the **JSON** format
9
+ * - _(this)_ **JSON** format
10
+ *
11
+ * @see https://github.com/webgptorg/promptbook#execution-report
12
+ */
13
+ export type ExecutionReportJson = Array<{
14
+ prompt: Omit<Prompt, 'ptbkUrl' | 'parameters'>;
15
+ result: PromptResult;
16
+ }>;
17
+ /**
18
+ * TODO: [🧠] What is the best shape of ExecutionReportJson
19
+ */
@@ -0,0 +1,16 @@
1
+ /**
2
+ * ExecutionReport is result of executing one promptbook
3
+ * It is kind of a variant of the promptbook usefull for debugging, logging and transparency for users.
4
+ *
5
+ * It can have 2 formats:
6
+ * - _(this)_ **.md file** created from the **JSON** format
7
+ * - **JSON** format
8
+ *
9
+ * @see https://github.com/webgptorg/promptbook#execution-report
10
+ */
11
+ export type ExecutionReportString = string & {
12
+ readonly _type: 'ExecutionReportString';
13
+ };
14
+ /**
15
+ * TODO: Better validation or remove branded type and make it just string
16
+ */
@@ -0,0 +1,6 @@
1
+ import type { ExecutionReportJson } from './ExecutionReportJson';
2
+ import type { ExecutionReportString } from './ExecutionReportString';
3
+ /**
4
+ * Converts execution report from JSON to string format
5
+ */
6
+ export declare function executionReportJsonToString(executionReportJson: ExecutionReportJson): ExecutionReportString;
@@ -406,6 +406,8 @@ export type string_ssh_key = string;
406
406
  export type string_pgp_key = string;
407
407
  export type number_positive = number;
408
408
  export type number_negative = number;
409
+ export type number_positive_or_zero = number;
410
+ export type number_negative_or_zero = number;
409
411
  export type number_integer = number;
410
412
  /**
411
413
  * Semantic helper;
@@ -429,7 +431,7 @@ export type number_days = number;
429
431
  export type number_weeks = number;
430
432
  export type number_months = number;
431
433
  export type number_years = number;
432
- export type number_bytes = number_positive & number_integer;
434
+ export type number_bytes = number_integer & number_positive;
433
435
  export type number_kilobytes = number_positive;
434
436
  export type number_megabytes = number_positive;
435
437
  export type number_gigabytes = number_positive;
@@ -0,0 +1,5 @@
1
+ import type { ExpectationAmount } from '../../types/PromptTemplatePipelineJson/PromptTemplateJson';
2
+ /**
3
+ * Counts number of characters in the text
4
+ */
5
+ export declare function countCharacters(text: string): ExpectationAmount;
@@ -0,0 +1,5 @@
1
+ import type { ExpectationAmount } from '../../types/PromptTemplatePipelineJson/PromptTemplateJson';
2
+ /**
3
+ * Counts number of lines in the text
4
+ */
5
+ export declare function countLines(text: string): ExpectationAmount;
@@ -0,0 +1,5 @@
1
+ import type { ExpectationAmount } from '../../types/PromptTemplatePipelineJson/PromptTemplateJson';
2
+ /**
3
+ * Counts number of pages in the text
4
+ */
5
+ export declare function countPages(text: string): ExpectationAmount;
@@ -0,0 +1,5 @@
1
+ import type { ExpectationAmount } from '../../types/PromptTemplatePipelineJson/PromptTemplateJson';
2
+ /**
3
+ * Counts number of paragraphs in the text
4
+ */
5
+ export declare function countParagraphs(text: string): ExpectationAmount;
@@ -0,0 +1,5 @@
1
+ import type { ExpectationAmount } from '../../types/PromptTemplatePipelineJson/PromptTemplateJson';
2
+ /**
3
+ * Counts number of sentences in the text
4
+ */
5
+ export declare function countSentences(text: string): ExpectationAmount;