@promptbook/cli 0.69.0-10 → 0.69.0-12
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/README.md +0 -1
- package/esm/index.es.js +76 -64
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/_packages/core.index.d.ts +2 -0
- package/esm/typings/src/_packages/types.index.d.ts +4 -0
- package/esm/typings/src/config.d.ts +9 -2
- package/esm/typings/src/execution/createPipelineExecutor/00-CreatePipelineExecutorSettings.d.ts +7 -0
- package/esm/typings/src/formats/_common/FormatDefinition.d.ts +9 -6
- package/esm/typings/src/formats/_common/FormatSubvalueDefinition.d.ts +4 -3
- package/esm/typings/src/formats/csv/CsvFormatDefinition.d.ts +3 -1
- package/esm/typings/src/formats/csv/CsvSettings.d.ts +5 -0
- package/esm/typings/src/formats/index.d.ts +1 -1
- package/esm/typings/src/formats/json/JsonFormatDefinition.d.ts +3 -2
- package/esm/typings/src/formats/text/TextFormatDefinition.d.ts +3 -1
- package/esm/typings/src/formats/xml/XmlFormatDefinition.d.ts +3 -2
- package/esm/typings/src/utils/organization/{f.d.ts → empty_object.d.ts} +5 -1
- package/esm/typings/src/utils/organization/just_empty_object.d.ts +12 -0
- package/package.json +1 -1
- package/umd/index.umd.js +76 -64
- package/umd/index.umd.js.map +1 -1
- package/esm/typings/src/collection/constructors/createCollectionFromDirectory.test.d.ts +0 -1
package/umd/index.umd.js
CHANGED
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
/**
|
|
40
40
|
* The version of the Promptbook library
|
|
41
41
|
*/
|
|
42
|
-
var PROMPTBOOK_VERSION = '0.69.0-
|
|
42
|
+
var PROMPTBOOK_VERSION = '0.69.0-11';
|
|
43
43
|
// TODO: !!!! List here all the versions and annotate + put into script
|
|
44
44
|
|
|
45
45
|
/*! *****************************************************************************
|
|
@@ -521,6 +521,19 @@
|
|
|
521
521
|
*/
|
|
522
522
|
var DEFAULT_REMOTE_URL_PATH = '/promptbook/socket.io';
|
|
523
523
|
// <- TODO: [🧜♂️]
|
|
524
|
+
/**
|
|
525
|
+
* @@@
|
|
526
|
+
*
|
|
527
|
+
* @public exported from `@promptbook/core`
|
|
528
|
+
*/
|
|
529
|
+
var DEFAULT_CSV_SETTINGS = {
|
|
530
|
+
header: true,
|
|
531
|
+
delimiter: ',',
|
|
532
|
+
quoteChar: '"',
|
|
533
|
+
newline: '\n',
|
|
534
|
+
skipEmptyLines: true,
|
|
535
|
+
// encoding: 'utf8'
|
|
536
|
+
};
|
|
524
537
|
/**
|
|
525
538
|
* @@@
|
|
526
539
|
*
|
|
@@ -1069,7 +1082,7 @@
|
|
|
1069
1082
|
});
|
|
1070
1083
|
}
|
|
1071
1084
|
|
|
1072
|
-
var PipelineCollection = [{title:"Prepare Knowledge from Markdown",pipelineUrl:"https://promptbook.studio/promptbook/prepare-knowledge-from-markdown.ptbk.md",promptbookVersion:"0.69.0-
|
|
1085
|
+
var PipelineCollection = [{title:"Prepare Knowledge from Markdown",pipelineUrl:"https://promptbook.studio/promptbook/prepare-knowledge-from-markdown.ptbk.md",promptbookVersion:"0.69.0-11",parameters:[{name:"knowledgeContent",description:"Markdown document content",isInput:true,isOutput:false},{name:"knowledgePieces",description:"The knowledge JSON object",isInput:false,isOutput:true}],templates:[{templateType:"PROMPT_TEMPLATE",name:"knowledge",title:"Knowledge",content:"You are experienced data researcher, extract the important knowledge from the document.\n\n# Rules\n\n- Make pieces of information concise, clear, and easy to understand\n- One piece of information should be approximately 1 paragraph\n- Divide the paragraphs by markdown horizontal lines ---\n- Omit irrelevant information\n- Group redundant information\n- Write just extracted information, nothing else\n\n# The document\n\nTake information from this document:\n\n> {knowledgeContent}",resultingParameterName:"knowledgePieces",dependentParameterNames:["knowledgeContent"]}],knowledgeSources:[],knowledgePieces:[],personas:[],preparations:[],sourceFile:"./promptbook-collection/prepare-knowledge-from-markdown.ptbk.md"},{title:"Prepare Keywords",pipelineUrl:"https://promptbook.studio/promptbook/prepare-knowledge-keywords.ptbk.md",promptbookVersion:"0.69.0-11",parameters:[{name:"knowledgePieceContent",description:"The content",isInput:true,isOutput:false},{name:"keywords",description:"Keywords separated by comma",isInput:false,isOutput:true}],templates:[{templateType:"PROMPT_TEMPLATE",name:"knowledge",title:"Knowledge",content:"You are experienced data researcher, detect the important keywords in the document.\n\n# Rules\n\n- Write just keywords separated by comma\n\n# The document\n\nTake information from this document:\n\n> {knowledgePieceContent}",resultingParameterName:"keywords",dependentParameterNames:["knowledgePieceContent"]}],knowledgeSources:[],knowledgePieces:[],personas:[],preparations:[],sourceFile:"./promptbook-collection/prepare-knowledge-keywords.ptbk.md"},{title:"Prepare Title",pipelineUrl:"https://promptbook.studio/promptbook/prepare-knowledge-title.ptbk.md",promptbookVersion:"0.69.0-11",parameters:[{name:"knowledgePieceContent",description:"The content",isInput:true,isOutput:false},{name:"title",description:"The title of the document",isInput:false,isOutput:true}],templates:[{templateType:"PROMPT_TEMPLATE",name:"knowledge",title:"Knowledge",content:"You are experienced content creator, write best title for the document.\n\n# Rules\n\n- Write just title, nothing else\n- Title should be concise and clear\n- Write maximum 5 words for the title\n\n# The document\n\n> {knowledgePieceContent}",resultingParameterName:"title",expectations:{words:{min:1,max:8}},dependentParameterNames:["knowledgePieceContent"]}],knowledgeSources:[],knowledgePieces:[],personas:[],preparations:[],sourceFile:"./promptbook-collection/prepare-knowledge-title.ptbk.md"},{title:"Prepare Keywords",pipelineUrl:"https://promptbook.studio/promptbook/prepare-persona.ptbk.md",promptbookVersion:"0.69.0-11",parameters:[{name:"availableModelNames",description:"List of available model names separated by comma (,)",isInput:true,isOutput:false},{name:"personaDescription",description:"Description of the persona",isInput:true,isOutput:false},{name:"modelRequirements",description:"Specific requirements for the model",isInput:false,isOutput:true}],templates:[{templateType:"PROMPT_TEMPLATE",name:"make-model-requirements",title:"Make modelRequirements",content:"You are experienced AI engineer, you need to create virtual assistant.\nWrite\n\n## Sample\n\n```json\n{\n\"modelName\": \"gpt-4o\",\n\"systemMessage\": \"You are experienced AI engineer and helpfull assistant.\",\n\"temperature\": 0.7\n}\n```\n\n## Instructions\n\n- Your output format is JSON object\n- Write just the JSON object, no other text should be present\n- It contains the following keys:\n - `modelName`: The name of the model to use\n - `systemMessage`: The system message to provide context to the model\n - `temperature`: The sampling temperature to use\n\n### Key `modelName`\n\nPick from the following models:\n\n- {availableModelNames}\n\n### Key `systemMessage`\n\nThe system message is used to communicate instructions or provide context to the model at the beginning of a conversation. It is displayed in a different format compared to user messages, helping the model understand its role in the conversation. The system message typically guides the model's behavior, sets the tone, or specifies desired output from the model. By utilizing the system message effectively, users can steer the model towards generating more accurate and relevant responses.\n\nFor example:\n\n> You are an experienced AI engineer and helpful assistant.\n\n> You are a friendly and knowledgeable chatbot.\n\n### Key `temperature`\n\nThe sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use log probability to automatically increase the temperature until certain thresholds are hit.\n\nYou can pick a value between 0 and 2. For example:\n\n- `0.1`: Low temperature, extremely conservative and deterministic\n- `0.5`: Medium temperature, balanced between conservative and creative\n- `1.0`: High temperature, creative and bit random\n- `1.5`: Very high temperature, extremely creative and often chaotic and unpredictable\n- `2.0`: Maximum temperature, completely random and unpredictable, for some extreme creative use cases\n\n# The assistant\n\nTake this description of the persona:\n\n> {personaDescription}",resultingParameterName:"modelRequirements",format:"JSON",dependentParameterNames:["availableModelNames","personaDescription"]}],knowledgeSources:[],knowledgePieces:[],personas:[],preparations:[],sourceFile:"./promptbook-collection/prepare-persona.ptbk.md"}];
|
|
1073
1086
|
|
|
1074
1087
|
/**
|
|
1075
1088
|
* This error indicates that the promptbook in a markdown format cannot be parsed into a valid promptbook object
|
|
@@ -2809,57 +2822,61 @@
|
|
|
2809
2822
|
var CsvFormatDefinition = {
|
|
2810
2823
|
formatName: 'CSV',
|
|
2811
2824
|
aliases: ['SPREADSHEET', 'TABLE'],
|
|
2812
|
-
isValid: function (value, schema) {
|
|
2825
|
+
isValid: function (value, settings, schema) {
|
|
2826
|
+
// TODO: !!!!!! Implement CSV validation
|
|
2813
2827
|
TODO_USE(value /* <- TODO: Use value here */);
|
|
2828
|
+
TODO_USE(settings /* <- TODO: Use settings here */);
|
|
2814
2829
|
TODO_USE(schema /* <- TODO: Use schema here */);
|
|
2815
2830
|
return true;
|
|
2816
2831
|
},
|
|
2817
|
-
canBeValid: function (partialValue, schema) {
|
|
2832
|
+
canBeValid: function (partialValue, settings, schema) {
|
|
2818
2833
|
TODO_USE(partialValue /* <- TODO: Use partialValue here */);
|
|
2834
|
+
TODO_USE(settings /* <- TODO: Use settings here */);
|
|
2819
2835
|
TODO_USE(schema /* <- TODO: Use schema here */);
|
|
2820
2836
|
return true;
|
|
2821
2837
|
},
|
|
2822
|
-
heal: function (value, schema) {
|
|
2838
|
+
heal: function (value, settings, schema) {
|
|
2823
2839
|
TODO_USE(value /* <- TODO: Use partialValue here */);
|
|
2840
|
+
TODO_USE(settings /* <- TODO: Use settings here */);
|
|
2824
2841
|
TODO_USE(schema /* <- TODO: Use schema here */);
|
|
2825
2842
|
throw new Error('Not implemented');
|
|
2826
2843
|
},
|
|
2827
2844
|
subvalueDefinitions: [
|
|
2828
2845
|
{
|
|
2829
2846
|
subvalueName: 'ROW',
|
|
2830
|
-
mapValues: function (value, mapCallback) {
|
|
2847
|
+
mapValues: function (value, settings, mapCallback) {
|
|
2831
2848
|
return __awaiter(this, void 0, void 0, function () {
|
|
2832
2849
|
var csv, mappedData;
|
|
2850
|
+
var _this = this;
|
|
2833
2851
|
return __generator(this, function (_a) {
|
|
2834
2852
|
switch (_a.label) {
|
|
2835
2853
|
case 0:
|
|
2836
|
-
csv = papaparse.parse(value,
|
|
2837
|
-
header: true,
|
|
2838
|
-
delimiter: ',',
|
|
2839
|
-
quoteChar: '"',
|
|
2840
|
-
newline: '\r\n',
|
|
2841
|
-
skipEmptyLines: true,
|
|
2842
|
-
// encoding: 'utf8',
|
|
2843
|
-
// <- TODO: !!!!!! DEFAULT_CSV_OPTIONS
|
|
2844
|
-
// <- TODO: [🧠] How to define parsing options for formats, its different concept than schema
|
|
2845
|
-
});
|
|
2854
|
+
csv = papaparse.parse(value, settings);
|
|
2846
2855
|
if (csv.errors.length !== 0) {
|
|
2847
2856
|
throw new ParseError(// <- TODO: !!!!!! Split PipelineParseError and FormatParseError -> CsvParseError
|
|
2848
2857
|
spaceTrim__default["default"](function (block) { return "\n CSV parsing error\n\n ".concat(block(csv.errors.map(function (error) { return error.message; }).join('\n\n')), "\n "); }));
|
|
2849
2858
|
}
|
|
2850
|
-
return [4 /*yield*/, Promise.all(csv.data.map(function (row, index) {
|
|
2859
|
+
return [4 /*yield*/, Promise.all(csv.data.map(function (row, index) { return __awaiter(_this, void 0, void 0, function () {
|
|
2860
|
+
var _a;
|
|
2861
|
+
var _b;
|
|
2862
|
+
return __generator(this, function (_c) {
|
|
2863
|
+
switch (_c.label) {
|
|
2864
|
+
case 0:
|
|
2865
|
+
_a = [__assign({}, row)];
|
|
2866
|
+
_b = {};
|
|
2867
|
+
// <- TODO: !!!!!! Dynamic new column name and position
|
|
2868
|
+
// <- TODO: !!!!!! Check name collisions
|
|
2869
|
+
return [4 /*yield*/, mapCallback(row, index)];
|
|
2870
|
+
case 1: return [2 /*return*/, (__assign.apply(void 0, _a.concat([(_b.newColumn =
|
|
2871
|
+
// <- TODO: !!!!!! Dynamic new column name and position
|
|
2872
|
+
// <- TODO: !!!!!! Check name collisions
|
|
2873
|
+
_c.sent(), _b)])))];
|
|
2874
|
+
}
|
|
2875
|
+
});
|
|
2876
|
+
}); }))];
|
|
2851
2877
|
case 1:
|
|
2852
2878
|
mappedData = _a.sent();
|
|
2853
|
-
return [2 /*return*/, papaparse.unparse(mappedData,
|
|
2854
|
-
header: true,
|
|
2855
|
-
delimiter: ',',
|
|
2856
|
-
quoteChar: '"',
|
|
2857
|
-
newline: '\r\n',
|
|
2858
|
-
skipEmptyLines: true,
|
|
2859
|
-
// encoding: 'utf8',
|
|
2860
|
-
// <- TODO: !!!!!! DEFAULT_CSV_OPTIONS
|
|
2861
|
-
// <- TODO: [🧠] How to define parsing options for formats, its different concept than schema
|
|
2862
|
-
})];
|
|
2879
|
+
return [2 /*return*/, papaparse.unparse(mappedData, settings)];
|
|
2863
2880
|
}
|
|
2864
2881
|
});
|
|
2865
2882
|
});
|
|
@@ -2867,23 +2884,14 @@
|
|
|
2867
2884
|
},
|
|
2868
2885
|
{
|
|
2869
2886
|
subvalueName: 'CELL',
|
|
2870
|
-
mapValues: function (value, mapCallback) {
|
|
2887
|
+
mapValues: function (value, settings, mapCallback) {
|
|
2871
2888
|
return __awaiter(this, void 0, void 0, function () {
|
|
2872
2889
|
var csv, mappedData;
|
|
2873
2890
|
var _this = this;
|
|
2874
2891
|
return __generator(this, function (_a) {
|
|
2875
2892
|
switch (_a.label) {
|
|
2876
2893
|
case 0:
|
|
2877
|
-
csv = papaparse.parse(value,
|
|
2878
|
-
header: true,
|
|
2879
|
-
delimiter: ',',
|
|
2880
|
-
quoteChar: '"',
|
|
2881
|
-
newline: '\r\n',
|
|
2882
|
-
skipEmptyLines: true,
|
|
2883
|
-
// encoding: 'utf8',
|
|
2884
|
-
// <- TODO: !!!!!! DEFAULT_CSV_OPTIONS
|
|
2885
|
-
// <- TODO: [🧠] How to define parsing options for formats, its different concept than schema
|
|
2886
|
-
});
|
|
2894
|
+
csv = papaparse.parse(value, settings);
|
|
2887
2895
|
if (csv.errors.length !== 0) {
|
|
2888
2896
|
throw new ParseError(// <- TODO: !!!!!! Split PipelineParseError and FormatParseError -> CsvParseError
|
|
2889
2897
|
spaceTrim__default["default"](function (block) { return "\n CSV parsing error\n\n ".concat(block(csv.errors.map(function (error) { return error.message; }).join('\n\n')), "\n "); }));
|
|
@@ -2906,16 +2914,7 @@
|
|
|
2906
2914
|
}); }))];
|
|
2907
2915
|
case 1:
|
|
2908
2916
|
mappedData = _a.sent();
|
|
2909
|
-
return [2 /*return*/, papaparse.unparse(mappedData,
|
|
2910
|
-
header: true,
|
|
2911
|
-
delimiter: ',',
|
|
2912
|
-
quoteChar: '"',
|
|
2913
|
-
newline: '\r\n',
|
|
2914
|
-
skipEmptyLines: true,
|
|
2915
|
-
// encoding: 'utf8',
|
|
2916
|
-
// <- TODO: !!!!!! DEFAULT_CSV_OPTIONS
|
|
2917
|
-
// <- TODO: [🧠] How to define parsing options for formats, its different concept than schema
|
|
2918
|
-
})];
|
|
2917
|
+
return [2 /*return*/, papaparse.unparse(mappedData, settings)];
|
|
2919
2918
|
}
|
|
2920
2919
|
});
|
|
2921
2920
|
});
|
|
@@ -2960,17 +2959,20 @@
|
|
|
2960
2959
|
var JsonFormatDefinition = {
|
|
2961
2960
|
formatName: 'JSON',
|
|
2962
2961
|
mimeType: 'application/json',
|
|
2963
|
-
isValid: function (value, schema) {
|
|
2962
|
+
isValid: function (value, settings, schema) {
|
|
2964
2963
|
TODO_USE(schema /* <- TODO: Use schema here */);
|
|
2964
|
+
TODO_USE(settings /* <- TODO: Use settings here */);
|
|
2965
2965
|
return isValidJsonString(value);
|
|
2966
2966
|
},
|
|
2967
|
-
canBeValid: function (partialValue, schema) {
|
|
2967
|
+
canBeValid: function (partialValue, settings, schema) {
|
|
2968
2968
|
TODO_USE(partialValue /* <- TODO: Use partialValue here */);
|
|
2969
|
+
TODO_USE(settings /* <- TODO: Use settings here */);
|
|
2969
2970
|
TODO_USE(schema /* <- TODO: Use schema here */);
|
|
2970
2971
|
return true;
|
|
2971
2972
|
},
|
|
2972
|
-
heal: function (value, schema) {
|
|
2973
|
+
heal: function (value, settings, schema) {
|
|
2973
2974
|
TODO_USE(value /* <- TODO: Use partialValue here */);
|
|
2975
|
+
TODO_USE(settings /* <- TODO: Use settings here */);
|
|
2974
2976
|
TODO_USE(schema /* <- TODO: Use schema here */);
|
|
2975
2977
|
throw new Error('Not implemented');
|
|
2976
2978
|
},
|
|
@@ -2979,7 +2981,7 @@
|
|
|
2979
2981
|
/**
|
|
2980
2982
|
* TODO: [🧠] Maybe propper instance of object
|
|
2981
2983
|
* TODO: [0] Make string_serialized_json
|
|
2982
|
-
* TODO: [1] Make type for JSON Schema
|
|
2984
|
+
* TODO: [1] Make type for JSON Settings and Schema
|
|
2983
2985
|
* TODO: [🧠] What to use for validating JSONs - JSON Schema, ZoD, typescript types/interfaces,...?
|
|
2984
2986
|
* TODO: [🍓] In `JsonFormatDefinition` implement simple `isValid`
|
|
2985
2987
|
* TODO: [🍓] In `JsonFormatDefinition` implement partial `canBeValid`
|
|
@@ -3009,7 +3011,7 @@
|
|
|
3009
3011
|
subvalueDefinitions: [
|
|
3010
3012
|
{
|
|
3011
3013
|
subvalueName: 'LINE',
|
|
3012
|
-
mapValues: function (value, mapCallback) {
|
|
3014
|
+
mapValues: function (value, settings, mapCallback) {
|
|
3013
3015
|
return __awaiter(this, void 0, void 0, function () {
|
|
3014
3016
|
var lines, mappedLines;
|
|
3015
3017
|
return __generator(this, function (_a) {
|
|
@@ -3035,6 +3037,7 @@
|
|
|
3035
3037
|
],
|
|
3036
3038
|
};
|
|
3037
3039
|
/**
|
|
3040
|
+
* TODO: [1] Make type for XML Text and Schema
|
|
3038
3041
|
* TODO: [🧠][🤠] Here should be all words, characters, lines, paragraphs, pages aviable as subvalues
|
|
3039
3042
|
* TODO: [🍓] In `TextFormatDefinition` implement simple `isValid`
|
|
3040
3043
|
* TODO: [🍓] In `TextFormatDefinition` implement partial `canBeValid`
|
|
@@ -3051,18 +3054,21 @@
|
|
|
3051
3054
|
var XmlFormatDefinition = {
|
|
3052
3055
|
formatName: 'XML',
|
|
3053
3056
|
mimeType: 'application/xml',
|
|
3054
|
-
isValid: function (value, schema) {
|
|
3057
|
+
isValid: function (value, settings, schema) {
|
|
3055
3058
|
TODO_USE(value /* <- TODO: Use value here */);
|
|
3059
|
+
TODO_USE(settings /* <- TODO: Use settings here */);
|
|
3056
3060
|
TODO_USE(schema /* <- TODO: Use schema here */);
|
|
3057
3061
|
return true;
|
|
3058
3062
|
},
|
|
3059
|
-
canBeValid: function (partialValue, schema) {
|
|
3063
|
+
canBeValid: function (partialValue, settings, schema) {
|
|
3060
3064
|
TODO_USE(partialValue /* <- TODO: Use partialValue here */);
|
|
3065
|
+
TODO_USE(settings /* <- TODO: Use settings here */);
|
|
3061
3066
|
TODO_USE(schema /* <- TODO: Use schema here */);
|
|
3062
3067
|
return true;
|
|
3063
3068
|
},
|
|
3064
|
-
heal: function (value, schema) {
|
|
3069
|
+
heal: function (value, settings, schema) {
|
|
3065
3070
|
TODO_USE(value /* <- TODO: Use partialValue here */);
|
|
3071
|
+
TODO_USE(settings /* <- TODO: Use settings here */);
|
|
3066
3072
|
TODO_USE(schema /* <- TODO: Use schema here */);
|
|
3067
3073
|
throw new Error('Not implemented');
|
|
3068
3074
|
},
|
|
@@ -3071,7 +3077,7 @@
|
|
|
3071
3077
|
/**
|
|
3072
3078
|
* TODO: [🧠] Maybe propper instance of object
|
|
3073
3079
|
* TODO: [0] Make string_serialized_xml
|
|
3074
|
-
* TODO: [1] Make type for XML Schema
|
|
3080
|
+
* TODO: [1] Make type for XML Settings and Schema
|
|
3075
3081
|
* TODO: [🧠] What to use for validating XMLs - XSD,...
|
|
3076
3082
|
* TODO: [🍓] In `XmlFormatDefinition` implement simple `isValid`
|
|
3077
3083
|
* TODO: [🍓] In `XmlFormatDefinition` implement partial `canBeValid`
|
|
@@ -3889,12 +3895,12 @@
|
|
|
3889
3895
|
*/
|
|
3890
3896
|
function executeFormatCells(options) {
|
|
3891
3897
|
return __awaiter(this, void 0, void 0, function () {
|
|
3892
|
-
var template, jokerParameterNames, parameters, priority, pipelineIdentification, parameterValue, formatDefinition, subvalueDefinition, resultString;
|
|
3898
|
+
var template, jokerParameterNames, parameters, priority, pipelineIdentification, settings, parameterValue, formatDefinition, subvalueDefinition, formatSettings, resultString;
|
|
3893
3899
|
var _this = this;
|
|
3894
3900
|
return __generator(this, function (_a) {
|
|
3895
3901
|
switch (_a.label) {
|
|
3896
3902
|
case 0:
|
|
3897
|
-
template = options.template, jokerParameterNames = options.jokerParameterNames, parameters = options.parameters, priority = options.priority, pipelineIdentification = options.pipelineIdentification;
|
|
3903
|
+
template = options.template, jokerParameterNames = options.jokerParameterNames, parameters = options.parameters, priority = options.priority, pipelineIdentification = options.pipelineIdentification, settings = options.settings;
|
|
3898
3904
|
if (template.foreach === undefined) {
|
|
3899
3905
|
return [2 /*return*/, /* not await */ executeAttempts(options)];
|
|
3900
3906
|
}
|
|
@@ -3923,7 +3929,11 @@
|
|
|
3923
3929
|
.map(function (subvalueName) { return "- ".concat(subvalueName); })
|
|
3924
3930
|
.join('\n')), "\n\n [\u26F7] This should never happen because cell name should be validated during parsing\n\n ").concat(block(pipelineIdentification), "\n "); }));
|
|
3925
3931
|
}
|
|
3926
|
-
|
|
3932
|
+
if (formatDefinition.formatName === 'CSV') {
|
|
3933
|
+
formatSettings = settings.csvSettings;
|
|
3934
|
+
// <- TODO: !!!!!! More universal, make simmilar pattern for other formats for example \n vs \r\n in text
|
|
3935
|
+
}
|
|
3936
|
+
return [4 /*yield*/, subvalueDefinition.mapValues(parameterValue, formatSettings, function (subparameters, index) { return __awaiter(_this, void 0, void 0, function () {
|
|
3927
3937
|
var mappedParameters, allSubparameters, subresultString;
|
|
3928
3938
|
return __generator(this, function (_a) {
|
|
3929
3939
|
switch (_a.label) {
|
|
@@ -4558,7 +4568,7 @@
|
|
|
4558
4568
|
function createPipelineExecutor(options) {
|
|
4559
4569
|
var _this = this;
|
|
4560
4570
|
var pipeline = options.pipeline, tools = options.tools, _a = options.settings, settings = _a === void 0 ? {} : _a;
|
|
4561
|
-
var _b = settings.maxExecutionAttempts, maxExecutionAttempts = _b === void 0 ? MAX_EXECUTION_ATTEMPTS : _b, _c = settings.maxParallelCount, maxParallelCount = _c === void 0 ? MAX_PARALLEL_COUNT : _c, _d = settings.
|
|
4571
|
+
var _b = settings.maxExecutionAttempts, maxExecutionAttempts = _b === void 0 ? MAX_EXECUTION_ATTEMPTS : _b, _c = settings.maxParallelCount, maxParallelCount = _c === void 0 ? MAX_PARALLEL_COUNT : _c, _d = settings.csvSettings, csvSettings = _d === void 0 ? DEFAULT_CSV_SETTINGS : _d, _e = settings.isVerbose, isVerbose = _e === void 0 ? IS_VERBOSE : _e, _f = settings.isNotPreparedWarningSupressed, isNotPreparedWarningSupressed = _f === void 0 ? false : _f;
|
|
4562
4572
|
validatePipeline(pipeline);
|
|
4563
4573
|
var pipelineIdentification = (function () {
|
|
4564
4574
|
// Note: This is a 😐 implementation of [🚞]
|
|
@@ -4593,6 +4603,7 @@
|
|
|
4593
4603
|
settings: {
|
|
4594
4604
|
maxExecutionAttempts: maxExecutionAttempts,
|
|
4595
4605
|
maxParallelCount: maxParallelCount,
|
|
4606
|
+
csvSettings: csvSettings,
|
|
4596
4607
|
isVerbose: isVerbose,
|
|
4597
4608
|
isNotPreparedWarningSupressed: isNotPreparedWarningSupressed,
|
|
4598
4609
|
},
|
|
@@ -7341,7 +7352,7 @@
|
|
|
7341
7352
|
function extractOneBlockFromMarkdown(markdown) {
|
|
7342
7353
|
var codeBlocks = extractAllBlocksFromMarkdown(markdown);
|
|
7343
7354
|
if (codeBlocks.length !== 1) {
|
|
7344
|
-
throw new ParseError(spaceTrim__default["default"](function (block) { return "\n There should be exactly 1 code block, found ".concat(codeBlocks.length, " code blocks\n\n ").concat(block(codeBlocks.map(function (block, i) { return "Block ".concat(i + 1, ":\n").concat(block.content); }).join('\n\n\n')), "\n "); }));
|
|
7355
|
+
throw new ParseError(spaceTrim__default["default"](function (block) { return "\n There should be exactly 1 code block in template, found ".concat(codeBlocks.length, " code blocks\n\n ").concat(block(codeBlocks.map(function (block, i) { return "Block ".concat(i + 1, ":\n").concat(block.content); }).join('\n\n\n')), "\n "); }));
|
|
7345
7356
|
}
|
|
7346
7357
|
return codeBlocks[0];
|
|
7347
7358
|
}
|
|
@@ -8386,7 +8397,7 @@
|
|
|
8386
8397
|
var value = _a.value, isUncertain = _a.isUncertain;
|
|
8387
8398
|
return "".concat(isUncertain ? 'approximately ' : '').concat(Math.round(value * 100) / 100);
|
|
8388
8399
|
};
|
|
8389
|
-
if (usage.price.value > 0.
|
|
8400
|
+
if (usage.price.value > 0.01
|
|
8390
8401
|
// <- TODO: [🍓][🧞♂️][👩🏽🤝🧑🏻] Configure negligible value - default value to config + value to `UsageToHumanSettings`
|
|
8391
8402
|
) {
|
|
8392
8403
|
reportItems.push("Cost ".concat(uncertainNumberToHuman(usage.price), " USD"));
|
|
@@ -8395,7 +8406,8 @@
|
|
|
8395
8406
|
reportItems.push("Negligible cost");
|
|
8396
8407
|
}
|
|
8397
8408
|
var worktime = usageToWorktime(usage);
|
|
8398
|
-
if (worktime.value >
|
|
8409
|
+
if (worktime.value >
|
|
8410
|
+
1 / 60
|
|
8399
8411
|
// <- TODO: [🍓][🧞♂️][👩🏽🤝🧑🏻]
|
|
8400
8412
|
) {
|
|
8401
8413
|
reportItems.push("Saved ".concat(uncertainNumberToHuman(usageToWorktime(usage)), " hours of human time"));
|