@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
package/esm/index.es.js CHANGED
@@ -1,6 +1,15 @@
1
- import { capitalize } from 'n12';
1
+ import { removeDiacritics, capitalize } from 'n12';
2
2
  import spaceTrim from 'spacetrim';
3
3
 
4
+ /**
5
+ * Converts execution report from JSON to string format
6
+ */
7
+ function executionReportJsonToString(executionReportJson) {
8
+ var executionReportString = '!!!!!!!!!!!!!';
9
+ executionReportString += executionReportJson.length;
10
+ return executionReportString;
11
+ }
12
+
4
13
  /**
5
14
  * All possible emoji chars like "🍆", "🍡", "🍤"...
6
15
  * Note: this will be needed to update annually - now updated at 2022-01-19
@@ -41,6 +50,74 @@ var EMOJIS = new Set(Object.values(EMOJIS_IN_CATEGORIES).flat());
41
50
  * TODO: Mirror from Collboard or some common library
42
51
  */
43
52
 
53
+ /**
54
+ * Counts number of characters in the text
55
+ */
56
+ function countCharacters(text) {
57
+ // Remove null characters
58
+ text = text.replace(/\0/g, '');
59
+ // Replace emojis (and also ZWJ sequence) with hyphens
60
+ text = text.replace(/(\p{Emoji})\p{Modifier_Symbol}/gu, '$1');
61
+ text = text.replace(/(\p{Emoji})[\u{FE00}-\u{FE0F}]/gu, '$1');
62
+ text = text.replace(/\p{Emoji}(\u{200D}\p{Emoji})*/gu, '-');
63
+ return text.length;
64
+ }
65
+
66
+ /**
67
+ * Counts number of lines in the text
68
+ */
69
+ function countLines(text) {
70
+ if (text === '') {
71
+ return 0;
72
+ }
73
+ return text.split('\n').length;
74
+ }
75
+
76
+ /**
77
+ * Counts number of pages in the text
78
+ */
79
+ function countPages(text) {
80
+ var sentencesPerPage = 5; // Assuming each page has 5 sentences
81
+ var sentences = text.split(/[.!?]+/).filter(function (sentence) { return sentence.trim() !== ''; });
82
+ var pageCount = Math.ceil(sentences.length / sentencesPerPage);
83
+ return pageCount;
84
+ }
85
+
86
+ /**
87
+ * Counts number of paragraphs in the text
88
+ */
89
+ function countParagraphs(text) {
90
+ return text.split(/\n\s*\n/).filter(function (paragraph) { return paragraph.trim() !== ''; }).length;
91
+ }
92
+
93
+ /**
94
+ * Counts number of sentences in the text
95
+ */
96
+ function countSentences(text) {
97
+ return text.split(/[.!?]+/).filter(function (sentence) { return sentence.trim() !== ''; }).length;
98
+ }
99
+
100
+ /**
101
+ * Counts number of words in the text
102
+ */
103
+ function countWords(text) {
104
+ text = text.replace(/[\p{Emoji}]/gu, 'a');
105
+ text = removeDiacritics(text);
106
+ return text.split(/[^a-zа-я0-9]+/i).filter(function (word) { return word.length > 0; }).length;
107
+ }
108
+
109
+ /**
110
+ * Index of all counter functions
111
+ */
112
+ var CountUtils = {
113
+ CHARACTERS: countCharacters,
114
+ WORDS: countWords,
115
+ SENTENCES: countSentences,
116
+ PARAGRAPHS: countParagraphs,
117
+ LINES: countLines,
118
+ PAGES: countPages,
119
+ };
120
+
44
121
  /**
45
122
  * Function isValidJsonString will tell you if the string is valid JSON or not
46
123
  */
@@ -235,6 +312,68 @@ function removeMarkdownFormatting(str) {
235
312
  return str;
236
313
  }
237
314
 
315
+ /**
316
+ * Function parseNumber will parse number from string
317
+ *
318
+ * Unlike Number.parseInt, Number.parseFloat it will never ever result in NaN
319
+ * Note: it also works only with decimal numbers
320
+ */
321
+ function parseNumber(value) {
322
+ var originalValue = value;
323
+ if (typeof value === 'number') {
324
+ value = value.toString(); // <- TODO: Maybe more efficient way to do this
325
+ }
326
+ if (typeof value !== 'string') {
327
+ return 0;
328
+ }
329
+ value = value.trim();
330
+ if (value.startsWith('+')) {
331
+ return parseNumber(value.substring(1));
332
+ }
333
+ if (value.startsWith('-')) {
334
+ var number = parseNumber(value.substring(1));
335
+ if (number === 0) {
336
+ return 0; // <- Note: To prevent -0
337
+ }
338
+ return -number;
339
+ }
340
+ value = value.replace(/,/g, '.');
341
+ value = value.toUpperCase();
342
+ if (value === '') {
343
+ return 0;
344
+ }
345
+ if (value === '♾' || value.startsWith('INF')) {
346
+ return Infinity;
347
+ }
348
+ if (value.includes('/')) {
349
+ var _a = __read(value.split('/'), 2), numerator_ = _a[0], denominator_ = _a[1];
350
+ var numerator = parseNumber(numerator_);
351
+ var denominator = parseNumber(denominator_);
352
+ if (denominator === 0) {
353
+ throw new Error("Unable to parse number from \"".concat(originalValue, "\" because denominator is zero"));
354
+ }
355
+ return numerator / denominator;
356
+ }
357
+ if (/^(NAN|NULL|NONE|UNDEFINED|ZERO|NO.*)$/.test(value)) {
358
+ return 0;
359
+ }
360
+ if (value.includes('E')) {
361
+ var _b = __read(value.split('E'), 2), significand = _b[0], exponent = _b[1];
362
+ return parseNumber(significand) * Math.pow(10, parseNumber(exponent));
363
+ }
364
+ if (!/^[0-9.]+$/.test(value) || value.split('.').length > 2) {
365
+ throw new Error("Unable to parse number from \"".concat(originalValue, "\""));
366
+ }
367
+ var num = parseFloat(value);
368
+ if (isNaN(num)) {
369
+ throw new Error("Unexpected NaN when parsing number from \"".concat(originalValue, "\""));
370
+ }
371
+ return num;
372
+ }
373
+ /**
374
+ * TODO: Maybe use sth. like safe-eval in fraction/calculation case @see https://www.npmjs.com/package/safe-eval
375
+ */
376
+
238
377
  /**
239
378
  * Removes emojis from a string and fix whitespaces
240
379
  *
@@ -333,10 +472,29 @@ function replaceParameters(template, parameters) {
333
472
  return replacedTemplate;
334
473
  }
335
474
 
475
+ /**
476
+ * Function trimCodeBlock will trim starting and ending code block from the string if it is present.
477
+ *
478
+ * Note: This is usefull for post-processing of the result of the chat LLM model
479
+ * when the model wraps the result in the (markdown) code block.
480
+ *
481
+ */
482
+ function trimCodeBlock(value) {
483
+ value = spaceTrim(value);
484
+ if (!/^```[a-z]*(.*)```$/is.test(value)) {
485
+ return value;
486
+ }
487
+ value = value.replace(/^```[a-z]*/i, '');
488
+ value = value.replace(/```$/i, '');
489
+ value = spaceTrim(value);
490
+ return value;
491
+ }
492
+
336
493
  /**
337
494
  * Function trimEndOfCodeBlock will remove ending code block from the string if it is present.
338
495
  *
339
- * 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.
496
+ * Note: This is usefull for post-processing of the result of the completion LLM model
497
+ * if you want to start code block in the prompt but you don't want to end it in the result.
340
498
  */
341
499
  function trimEndOfCodeBlock(value) {
342
500
  value = spaceTrim(value);
@@ -416,5 +574,5 @@ function unwrapResult(text, options) {
416
574
  * TODO: [🧠] Should this also unwrap the (parenthesis)
417
575
  */
418
576
 
419
- export { EMOJIS, EMOJIS_IN_CATEGORIES, extractAllBlocksFromMarkdown, extractAllListItemsFromMarkdown, extractOneBlockFromMarkdown, isValidJsonString, removeContentComments, removeEmojis, removeMarkdownFormatting, removeQuotes, replaceParameters, trimEndOfCodeBlock, unwrapResult };
577
+ 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 };
420
578
  //# sourceMappingURL=index.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es.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":[],"mappings":";;;AAEA;;;;;;IAMa,oBAAoB,GAA6C;IAC1E,OAAO,EACH,uVAAuV,CAAC,KAAK,CACzV,GAAG,CACsB;IAEjC,yBAAyB,EACrB,iKAAiK,CAAC,KAAK,CACnK,GAAG,CACsB;IAEjC,oBAAoB,EAChB,22CAA22C,CAAC,KAAK,CAC72C,GAAG,CACsB;IAEjC,0BAA0B,EACtB,sJAAsJ,CAAC,KAAK,CACxJ,GAAG,CACsB;IAEjC,aAAa,EACT,g3DAAg3D,CAAC,KAAK,CACl3D,GAAG,CACsB;IAEjC,oBAAoB,EAChB,g3DAAg3D,CAAC,KAAK,CACl3D,GAAG,CACsB;IAEjC,cAAc,EACV,g3DAAg3D,CAAC,KAAK,CACl3D,GAAG,CACsB;IAEjC,mBAAmB,EACf,g3DAAg3D,CAAC,KAAK,CACl3D,GAAG,CACsB;IAEjC,cAAc,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,EAAE;YACvE,OAAO,KAAK,CAAC;SAChB;QAED,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,YAAY,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;YACvE,OAAO,KAAK,CAAC;SAChB;QAED,OAAO,IAAI,CAAC;KACf,CAAC,EACJ;QACE,OAAO,YAAY,CAAC,YAAY,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,0BAA0B,EAAE,KAAK,EAAE,CAAC,CAAC;KAC9F;SAAM;QACH,OAAO,aAAa,CAAC;KACxB;AACL,CAAC;AAED;;;;;;"}
1
+ {"version":3,"file":"index.es.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":[],"mappings":";;;AAGA;;;SAGgB,2BAA2B,CAAC,mBAAwC;IAChF,IAAI,qBAAqB,GAAG,eAAe,CAAC;IAE5C,qBAAqB,IAAI,mBAAmB,CAAC,MAAM,CAAC;IAEpD,OAAO,qBAA8C,CAAC;AAC1D;;ACVA;;;;;;IAMa,oBAAoB,GAA6C;IAC1E,OAAO,EACH,uVAAuV,CAAC,KAAK,CACzV,GAAG,CACsB;IAEjC,yBAAyB,EACrB,iKAAiK,CAAC,KAAK,CACnK,GAAG,CACsB;IAEjC,oBAAoB,EAChB,22CAA22C,CAAC,KAAK,CAC72C,GAAG,CACsB;IAEjC,0BAA0B,EACtB,sJAAsJ,CAAC,KAAK,CACxJ,GAAG,CACsB;IAEjC,aAAa,EACT,g3DAAg3D,CAAC,KAAK,CACl3D,GAAG,CACsB;IAEjC,oBAAoB,EAChB,g3DAAg3D,CAAC,KAAK,CACl3D,GAAG,CACsB;IAEjC,cAAc,EACV,g3DAAg3D,CAAC,KAAK,CACl3D,GAAG,CACsB;IAEjC,mBAAmB,EACf,g3DAAg3D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Y,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;;IAIhD,IAEQ;QACI,CAAC,GAAG,EAAE,GAAG,CAAC;QACV,CAAC,GAAG,EAAE,GAAG,CAAC;QACV,CAAC,GAAG,EAAE,GAAG,CAAC;QACV,CAAC,GAAG,EAAE,GAAG,CAAC;QACV,CAAC,GAAG,EAAE,GAAG,CAAC;QACV,CAAC,GAAG,EAAE,GAAG,CAAC;QACV,CAAC,GAAG,EAAE,GAAG,CAAC;KAEjB,CAAC,IAAI,CAAC,UAAC,EAAsB;YAAtB,KAAA,aAAsB,EAArB,UAAU,QAAA,EAAE,QAAQ,QAAA;QACzB,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE;YACvC,OAAO,KAAK,CAAC;SAChB;QAED,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;YACnC,OAAO,KAAK,CAAC;SAChB;QAED,IAAI,YAAY,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;YACvE,OAAO,KAAK,CAAC;SAChB;QAED,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,YAAY,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;YACvE,OAAO,KAAK,CAAC;SAChB;QAED,OAAO,IAAI,CAAC;KACf,CAAC,EACJ;QACE,OAAO,YAAY,CAAC,YAAY,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,0BAA0B,EAAE,KAAK,EAAE,CAAC,CAAC;KAC9F;SAAM;QACH,OAAO,aAAa,CAAC;KACxB;AACL,CAAC;AAED;;;;;;"}
@@ -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;
@@ -0,0 +1,5 @@
1
+ import type { ExpectationAmount } from '../../types/PromptTemplatePipelineJson/PromptTemplateJson';
2
+ /**
3
+ * Counts number of words in the text
4
+ */
5
+ export declare function countWords(text: string): ExpectationAmount;
@@ -0,0 +1,5 @@
1
+ import type { ExpectationAmount, ExpectationUnit } from '../../types/PromptTemplatePipelineJson/PromptTemplateJson';
2
+ /**
3
+ * Index of all counter functions
4
+ */
5
+ export declare const CountUtils: Record<ExpectationUnit, (text: string) => ExpectationAmount>;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Function parseNumber will parse number from string
3
+ *
4
+ * Unlike Number.parseInt, Number.parseFloat it will never ever result in NaN
5
+ * Note: it also works only with decimal numbers
6
+ */
7
+ export declare function parseNumber(value: string | number): number;
8
+ /**
9
+ * TODO: Maybe use sth. like safe-eval in fraction/calculation case @see https://www.npmjs.com/package/safe-eval
10
+ */
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Function trimCodeBlock will trim starting and ending code block from the string if it is present.
3
+ *
4
+ * Note: This is usefull for post-processing of the result of the chat LLM model
5
+ * when the model wraps the result in the (markdown) code block.
6
+ *
7
+ */
8
+ export declare function trimCodeBlock(value: string): string;
@@ -0,0 +1 @@
1
+ export {};