@promptbook/editable 0.84.0-0 → 0.84.0-11

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 (30) hide show
  1. package/README.md +1 -0
  2. package/esm/index.es.js +28 -4
  3. package/esm/index.es.js.map +1 -1
  4. package/esm/typings/src/_packages/cli.index.d.ts +8 -0
  5. package/esm/typings/src/_packages/core.index.d.ts +4 -0
  6. package/esm/typings/src/_packages/markitdown.index.d.ts +8 -0
  7. package/esm/typings/src/_packages/pdf.index.d.ts +6 -0
  8. package/esm/typings/src/_packages/utils.index.d.ts +4 -0
  9. package/esm/typings/src/_packages/wizzard.index.d.ts +8 -0
  10. package/esm/typings/src/constants.d.ts +1 -1
  11. package/esm/typings/src/executables/platforms/locateAppOnLinux.d.ts +1 -1
  12. package/esm/typings/src/executables/platforms/locateAppOnMacOs.d.ts +1 -1
  13. package/esm/typings/src/execution/assertsExecutionSuccessful.d.ts +3 -1
  14. package/esm/typings/src/pipeline/book-notation.d.ts +5 -0
  15. package/esm/typings/src/pipeline/prompt-notation.d.ts +31 -0
  16. package/esm/typings/src/pipeline/prompt-notation.test.d.ts +4 -0
  17. package/esm/typings/src/scrapers/_boilerplate/BoilerplateScraper.d.ts +43 -0
  18. package/esm/typings/src/scrapers/_boilerplate/createBoilerplateScraper.d.ts +20 -0
  19. package/esm/typings/src/scrapers/_boilerplate/playground/boilerplate-scraper-playground.d.ts +5 -0
  20. package/esm/typings/src/scrapers/_boilerplate/register-constructor.d.ts +15 -0
  21. package/esm/typings/src/scrapers/_boilerplate/register-metadata.d.ts +28 -0
  22. package/esm/typings/src/scrapers/markitdown/MarkitdownScraper.d.ts +50 -0
  23. package/esm/typings/src/scrapers/markitdown/createMarkitdownScraper.d.ts +22 -0
  24. package/esm/typings/src/scrapers/markitdown/playground/markitdown-scraper-playground.d.ts +5 -0
  25. package/esm/typings/src/scrapers/markitdown/register-constructor.d.ts +17 -0
  26. package/esm/typings/src/scrapers/markitdown/register-metadata.d.ts +28 -0
  27. package/esm/typings/src/types/typeAliases.d.ts +1 -1
  28. package/package.json +3 -3
  29. package/umd/index.umd.js +28 -4
  30. package/umd/index.umd.js.map +1 -1
package/README.md CHANGED
@@ -271,6 +271,7 @@ Or you can install them separately:
271
271
  - **[@promptbook/remote-client](https://www.npmjs.com/package/@promptbook/remote-client)** - Remote client for remote execution of promptbooks
272
272
  - **[@promptbook/remote-server](https://www.npmjs.com/package/@promptbook/remote-server)** - Remote server for remote execution of promptbooks
273
273
  - **[@promptbook/pdf](https://www.npmjs.com/package/@promptbook/pdf)** - Read knowledge from `.pdf` documents
274
+ - **[@promptbook/documents](https://www.npmjs.com/package/@promptbook/markitdown)** - Integration of [Markitdown by Microsoft](https://github.com/microsoft/markitdown)
274
275
  - **[@promptbook/documents](https://www.npmjs.com/package/@promptbook/documents)** - Read knowledge from documents like `.docx`, `.odt`,…
275
276
  - **[@promptbook/legacy-documents](https://www.npmjs.com/package/@promptbook/legacy-documents)** - Read knowledge from legacy documents like `.doc`, `.rtf`,…
276
277
  - **[@promptbook/website-crawler](https://www.npmjs.com/package/@promptbook/website-crawler)** - Crawl knowledge from the web
package/esm/index.es.js CHANGED
@@ -17,7 +17,7 @@ var BOOK_LANGUAGE_VERSION = '1.0.0';
17
17
  * @generated
18
18
  * @see https://github.com/webgptorg/promptbook
19
19
  */
20
- var PROMPTBOOK_ENGINE_VERSION = '0.83.0';
20
+ var PROMPTBOOK_ENGINE_VERSION = '0.84.0-10';
21
21
  /**
22
22
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
23
23
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -175,7 +175,7 @@ var NAME = "Promptbook";
175
175
  *
176
176
  * @public exported from `@promptbook/core`
177
177
  */
178
- var ADMIN_EMAIL = 'me@pavolhejny.com';
178
+ var ADMIN_EMAIL = 'pavol@ptbk.io';
179
179
  /**
180
180
  * Name of the responsible person for the Promptbook on GitHub
181
181
  *
@@ -366,7 +366,7 @@ var boilerplateCommandParser = {
366
366
  var NotYetImplementedError = /** @class */ (function (_super) {
367
367
  __extends(NotYetImplementedError, _super);
368
368
  function NotYetImplementedError(message) {
369
- var _this = _super.call(this, spaceTrim$1(function (block) { return "\n ".concat(block(message), "\n\n Note: This feature is not implemented yet but it will be soon.\n\n If you want speed up the implementation or just read more, look here:\n https://github.com/webgptorg/promptbook\n\n Or contact us on me@pavolhejny.com\n\n "); })) || this;
369
+ var _this = _super.call(this, spaceTrim$1(function (block) { return "\n ".concat(block(message), "\n\n Note: This feature is not implemented yet but it will be soon.\n\n If you want speed up the implementation or just read more, look here:\n https://github.com/webgptorg/promptbook\n\n Or contact us on pavol@ptbk.io\n\n "); })) || this;
370
370
  _this.name = 'NotYetImplementedError';
371
371
  Object.setPrototypeOf(_this, NotYetImplementedError.prototype);
372
372
  return _this;
@@ -1326,7 +1326,7 @@ function exportJson(options) {
1326
1326
  *
1327
1327
  * @private within the repository
1328
1328
  */
1329
- var REPLACING_NONCE = 'u$k42k%!V2zo34w7Fu#@QUHYPW';
1329
+ var REPLACING_NONCE = 'ptbkauk42kV2dzao34faw7FudQUHYPtW';
1330
1330
  /**
1331
1331
  * The names of the parameters that are reserved for special purposes
1332
1332
  *
@@ -3868,6 +3868,21 @@ function parseCommandVariant(input) {
3868
3868
  return null;
3869
3869
  }
3870
3870
 
3871
+ /**
3872
+ * Checks if value is valid email
3873
+ *
3874
+ * @public exported from `@promptbook/utils`
3875
+ */
3876
+ function isValidEmail(email) {
3877
+ if (typeof email !== 'string') {
3878
+ return false;
3879
+ }
3880
+ if (email.split('\n').length > 1) {
3881
+ return false;
3882
+ }
3883
+ return /^.+@.+\..+$/.test(email);
3884
+ }
3885
+
3871
3886
  /**
3872
3887
  * Function `validatePipelineString` will validate the if the string is a valid pipeline string
3873
3888
  * It does not check if the string is fully logically correct, but if it is a string that can be a pipeline string or the string looks completely different.
@@ -3881,6 +3896,15 @@ function validatePipelineString(pipelineString) {
3881
3896
  if (isValidJsonString(pipelineString)) {
3882
3897
  throw new ParseError('Expected a book, but got a JSON string');
3883
3898
  }
3899
+ else if (isValidUrl(pipelineString)) {
3900
+ throw new ParseError("Expected a book, but got just the URL \"".concat(pipelineString, "\""));
3901
+ }
3902
+ else if (isValidFilePath(pipelineString)) {
3903
+ throw new ParseError("Expected a book, but got just the file path \"".concat(pipelineString, "\""));
3904
+ }
3905
+ else if (isValidEmail(pipelineString)) {
3906
+ throw new ParseError("Expected a book, but got just the email \"".concat(pipelineString, "\""));
3907
+ }
3884
3908
  // <- TODO: Implement the validation + add tests when the pipeline logic considered as invalid
3885
3909
  return pipelineString;
3886
3910
  }