@promptbook/core 0.56.0-3 → 0.56.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.
package/esm/index.es.js CHANGED
@@ -447,7 +447,7 @@ function union() {
447
447
  /**
448
448
  * The version of the Promptbook library
449
449
  */
450
- var PROMPTBOOK_VERSION = '0.56.0-2';
450
+ var PROMPTBOOK_VERSION = '0.56.0-4';
451
451
 
452
452
  /**
453
453
  * Parses the template and returns the list of all parameter names
@@ -3479,7 +3479,7 @@ function createPromptbookLibraryFromSources() {
3479
3479
  *
3480
3480
  * @param promptbookSourcesPromiseOrFactory
3481
3481
  * @returns PromptbookLibrary
3482
- * @private Just internal tool for other constructor functions
3482
+ * @deprecated Do not use, it will became internal tool for other constructor functions
3483
3483
  */
3484
3484
  function createPromptbookLibraryFromPromise(promptbookSourcesPromiseOrFactory) {
3485
3485
  var library;
@@ -3656,61 +3656,6 @@ function createPromptbookSublibrary(library, predicate) {
3656
3656
  };
3657
3657
  }
3658
3658
 
3659
- /**
3660
- * Detects if the code is running in a browser environment in main thread (Not in a web worker)
3661
- */
3662
- new Function("\n try {\n return this === window;\n } catch (e) {\n return false;\n }\n");
3663
- /**
3664
- * Detects if the code is running in a Node.js environment
3665
- */
3666
- var isRunningInNode = new Function("\n try {\n return this === global;\n } catch (e) {\n return false;\n }\n");
3667
- /**
3668
- * Detects if the code is running in a web worker
3669
- */
3670
- new Function("\n try {\n if (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope) {\n return true;\n } else {\n return false;\n }\n } catch (e) {\n return false;\n }\n");
3671
-
3672
- /**
3673
- * Returns the same value that is passed as argument.
3674
- * No side effects.
3675
- *
3676
- * Note: It can be usefull for leveling indentation
3677
- *
3678
- * @param value any values
3679
- * @returns the same values
3680
- */
3681
- function just(value) {
3682
- if (value === undefined) {
3683
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
3684
- return undefined;
3685
- }
3686
- return value;
3687
- }
3688
-
3689
- /**
3690
- * Just testing imports and compatibility
3691
- */
3692
- function justTestFsImport() {
3693
- return __awaiter(this, void 0, void 0, function () {
3694
- var files;
3695
- return __generator(this, function (_a) {
3696
- switch (_a.label) {
3697
- case 0:
3698
- if (!isRunningInNode()) {
3699
- throw new Error('Function `testFiles` can only be run in Node.js environment because it reads the file system.');
3700
- }
3701
- return [4 /*yield*/, require(just('glob-promise'))('/**/*')];
3702
- case 1:
3703
- files = _a.sent();
3704
- console.info('testFiles', { files: files });
3705
- return [2 /*return*/];
3706
- }
3707
- });
3708
- });
3709
- }
3710
- /**
3711
- * TODO: !!! Remove this file
3712
- */
3713
-
3714
3659
  /**
3715
3660
  * Format either small or big number
3716
3661
  *
@@ -3731,6 +3676,23 @@ function formatNumber(value) {
3731
3676
  return value.toString();
3732
3677
  }
3733
3678
 
3679
+ /**
3680
+ * Returns the same value that is passed as argument.
3681
+ * No side effects.
3682
+ *
3683
+ * Note: It can be usefull for leveling indentation
3684
+ *
3685
+ * @param value any values
3686
+ * @returns the same values
3687
+ */
3688
+ function just(value) {
3689
+ if (value === undefined) {
3690
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
3691
+ return undefined;
3692
+ }
3693
+ return value;
3694
+ }
3695
+
3734
3696
  /**
3735
3697
  * Create a markdown table from a 2D array of strings
3736
3698
  *
@@ -4014,5 +3976,5 @@ function executionReportJsonToString(executionReportJson, options) {
4014
3976
  * TODO: [🧠] Allow to filter out some parts of the report by options
4015
3977
  */
4016
3978
 
4017
- export { CallbackInterfaceTools, ExecutionReportStringOptionsDefaults, ExecutionTypes, ExpectError, MultipleLlmExecutionTools, PROMPTBOOK_VERSION, PromptbookExecutionError, PromptbookLibraryError, PromptbookLogicError, PromptbookNotFoundError, PromptbookReferenceError, PromptbookSyntaxError, SimplePromptInterfaceTools, SimplePromptbookLibrary, TemplateError, UnexpectedError, addUsage, assertsExecutionSuccessful, checkExpectations, createPromptbookExecutor, createPromptbookLibraryFromSources, createPromptbookLibraryFromUrl, createPromptbookSublibrary, executionReportJsonToString, isPassingExpectations, justTestFsImport, prettifyPromptbookString, promptbookJsonToString, promptbookStringToJson, usageToWorktime, validatePromptbookJson };
3979
+ export { CallbackInterfaceTools, ExecutionReportStringOptionsDefaults, ExecutionTypes, ExpectError, MultipleLlmExecutionTools, PROMPTBOOK_VERSION, PromptbookExecutionError, PromptbookLibraryError, PromptbookLogicError, PromptbookNotFoundError, PromptbookReferenceError, PromptbookSyntaxError, SimplePromptInterfaceTools, SimplePromptbookLibrary, TemplateError, UnexpectedError, addUsage, assertsExecutionSuccessful, checkExpectations, createPromptbookExecutor, createPromptbookLibraryFromPromise, createPromptbookLibraryFromSources, createPromptbookLibraryFromUrl, createPromptbookSublibrary, executionReportJsonToString, isPassingExpectations, prettifyPromptbookString, promptbookJsonToString, promptbookStringToJson, usageToWorktime, validatePromptbookJson };
4018
3980
  //# sourceMappingURL=index.es.js.map