@promptbook/pdf 0.75.6 โ†’ 0.75.10

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.
@@ -8,6 +8,7 @@ import type { string_markdown } from '../types/typeAliases';
8
8
  import type { string_markdown_section } from '../types/typeAliases';
9
9
  import type { string_markdown_section_content } from '../types/typeAliases';
10
10
  import type { string_markdown_text } from '../types/typeAliases';
11
+ import type { string_markdown_codeblock_language } from '../types/typeAliases';
11
12
  import { addAutoGeneratedSection } from '../utils/markdown/addAutoGeneratedSection';
12
13
  import { createMarkdownChart } from '../utils/markdown/createMarkdownChart';
13
14
  import { createMarkdownTable } from '../utils/markdown/createMarkdownTable';
@@ -31,6 +32,7 @@ export type { string_markdown };
31
32
  export type { string_markdown_section };
32
33
  export type { string_markdown_section_content };
33
34
  export type { string_markdown_text };
35
+ export type { string_markdown_codeblock_language };
34
36
  export { addAutoGeneratedSection };
35
37
  export { createMarkdownChart };
36
38
  export { createMarkdownTable };
@@ -55,7 +55,6 @@ import type { AnthropicClaudeExecutionToolsOptions } from '../llm-providers/anth
55
55
  import type { AnthropicClaudeExecutionToolsDirectOptions } from '../llm-providers/anthropic-claude/AnthropicClaudeExecutionToolsOptions';
56
56
  import type { AnthropicClaudeExecutionToolsProxiedOptions } from '../llm-providers/anthropic-claude/AnthropicClaudeExecutionToolsOptions';
57
57
  import type { AzureOpenAiExecutionToolsOptions } from '../llm-providers/azure-openai/AzureOpenAiExecutionToolsOptions';
58
- import type { LangtailExecutionToolsOptions } from '../llm-providers/langtail/LangtailExecutionToolsOptions';
59
58
  import type { OpenAiAssistantExecutionToolsOptions } from '../llm-providers/openai/OpenAiAssistantExecutionToolsOptions';
60
59
  import type { OpenAiExecutionToolsOptions } from '../llm-providers/openai/OpenAiExecutionToolsOptions';
61
60
  import type { PromptbookServer_Error } from '../llm-providers/remote/interfaces/PromptbookServer_Error';
@@ -151,6 +150,7 @@ import type { string_markdown } from '../types/typeAliases';
151
150
  import type { string_markdown_section } from '../types/typeAliases';
152
151
  import type { string_markdown_section_content } from '../types/typeAliases';
153
152
  import type { string_markdown_text } from '../types/typeAliases';
153
+ import type { string_markdown_codeblock_language } from '../types/typeAliases';
154
154
  import type { string_promptbook_documentation_url } from '../types/typeAliases';
155
155
  import type { string_domain } from '../types/typeAliases';
156
156
  import type { string_tdl } from '../types/typeAliases';
@@ -309,7 +309,6 @@ export type { AnthropicClaudeExecutionToolsOptions };
309
309
  export type { AnthropicClaudeExecutionToolsDirectOptions };
310
310
  export type { AnthropicClaudeExecutionToolsProxiedOptions };
311
311
  export type { AzureOpenAiExecutionToolsOptions };
312
- export type { LangtailExecutionToolsOptions };
313
312
  export type { OpenAiAssistantExecutionToolsOptions };
314
313
  export type { OpenAiExecutionToolsOptions };
315
314
  export type { PromptbookServer_Error };
@@ -405,6 +404,7 @@ export type { string_markdown };
405
404
  export type { string_markdown_section };
406
405
  export type { string_markdown_section_content };
407
406
  export type { string_markdown_text };
407
+ export type { string_markdown_codeblock_language };
408
408
  export type { string_promptbook_documentation_url };
409
409
  export type { string_domain };
410
410
  export type { string_tdl };
@@ -9,7 +9,7 @@ import type { CreatePipelineExecutorOptions } from './00-CreatePipelineExecutorO
9
9
  *
10
10
  * @private internal type of `executePipeline`
11
11
  */
12
- type ExecutePipelineOptions = CreatePipelineExecutorOptions & {
12
+ type ExecutePipelineOptions = Required<CreatePipelineExecutorOptions> & {
13
13
  /**
14
14
  * @@@
15
15
  */
@@ -10,7 +10,7 @@ import type { CreatePipelineExecutorOptions } from './00-CreatePipelineExecutorO
10
10
  *
11
11
  * @private internal type of `executeTask`
12
12
  */
13
- type executeSingleTaskOptions = CreatePipelineExecutorOptions & {
13
+ type executeSingleTaskOptions = Required<CreatePipelineExecutorOptions> & {
14
14
  /**
15
15
  * @@@
16
16
  */
@@ -11,7 +11,7 @@ import type { CreatePipelineExecutorOptions } from './00-CreatePipelineExecutorO
11
11
  *
12
12
  * @private internal type of `executeAttempts`
13
13
  */
14
- export type ExecuteAttemptsOptions = Omit<CreatePipelineExecutorOptions, 'pipeline'> & {
14
+ export type ExecuteAttemptsOptions = Required<Omit<CreatePipelineExecutorOptions, 'pipeline'>> & {
15
15
  /**
16
16
  * @@@
17
17
  */
@@ -74,6 +74,7 @@ export declare const FORMFACTOR_DEFINITIONS: readonly [{
74
74
  };
75
75
  }, {
76
76
  readonly name: "SHEETS";
77
+ readonly aliasNames: readonly ["SHEETS", "SHEET"];
77
78
  readonly description: "@@@";
78
79
  readonly documentationUrl: "https://github.com/webgptorg/promptbook/discussions/176";
79
80
  readonly pipelineInterface: {
@@ -5,6 +5,7 @@
5
5
  */
6
6
  export declare const SheetsFormfactorDefinition: {
7
7
  readonly name: "SHEETS";
8
+ readonly aliasNames: readonly ["SHEETS", "SHEET"];
8
9
  readonly description: "@@@";
9
10
  readonly documentationUrl: "https://github.com/webgptorg/promptbook/discussions/176";
10
11
  readonly pipelineInterface: {
@@ -10,7 +10,7 @@ export type PrepareAndScrapeOptions = {
10
10
  * Note: When the pipeline is not created from files, it is `null`
11
11
  * Note: This folder must exist (=it is not created recursively)
12
12
  *
13
- * @default process.cwd()
13
+ * @default null or `process.cwd()` when created via `$provide...` function in node
14
14
  */
15
15
  readonly rootDirname?: string_dirname | null;
16
16
  /**
@@ -18,7 +18,7 @@ export type PrepareAndScrapeOptions = {
18
18
  *
19
19
  * Note: When the folder does not exist, it is created recursively
20
20
  *
21
- * @default SCRAPE_CACHE_DIRNAME
21
+ * @default DEFAULT_SCRAPE_CACHE_DIRNAME
22
22
  */
23
23
  readonly cacheDirname?: string_dirname;
24
24
  /**
@@ -30,17 +30,19 @@ export type PrepareAndScrapeOptions = {
30
30
  /**
31
31
  * Maximum number of tasks running in parallel
32
32
  *
33
- * @default MAX_PARALLEL_COUNT
33
+ * @default DEFAULT_MAX_PARALLEL_COUNT
34
34
  */
35
35
  readonly maxParallelCount?: number;
36
36
  /**
37
37
  * If true, the missing software is automatically installed
38
+ *
39
+ * @default DEFAULT_IS_AUTO_INSTALLED
38
40
  */
39
41
  readonly isAutoInstalled?: boolean;
40
42
  /**
41
43
  * If true, the preparation logs additional information
42
44
  *
43
- * @default false
45
+ * @default DEFAULT_IS_VERBOSE
44
46
  */
45
47
  readonly isVerbose?: boolean;
46
48
  };
@@ -208,6 +208,16 @@ export type string_markdown_section_content = string;
208
208
  * @public exported from `@promptbook/markdown-utils`
209
209
  */
210
210
  export type string_markdown_text = string;
211
+ /**
212
+ * Semantic helper
213
+ *
214
+ * Markdown code block language
215
+ *
216
+ * For example ```js -> `"js"`
217
+ *
218
+ * @public exported from `@promptbook/markdown-utils`
219
+ */
220
+ export type string_markdown_codeblock_language = 'book' | 'markdown' | 'text' | 'javascript' | 'css' | 'json';
211
221
  /**
212
222
  * @@@
213
223
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/pdf",
3
- "version": "0.75.6",
3
+ "version": "0.75.10",
4
4
  "description": "It's time for a paradigm shift. The future of software in plain English, French or Latin",
5
5
  "--note-0": " <- [๐ŸŠ]",
6
6
  "private": false,
@@ -54,7 +54,7 @@
54
54
  "module": "./esm/index.es.js",
55
55
  "typings": "./esm/typings/src/_packages/pdf.index.d.ts",
56
56
  "peerDependencies": {
57
- "@promptbook/core": "0.75.6"
57
+ "@promptbook/core": "0.75.10"
58
58
  },
59
59
  "dependencies": {
60
60
  "crypto-js": "4.2.0",
package/umd/index.umd.js CHANGED
@@ -22,7 +22,7 @@
22
22
  *
23
23
  * @see https://github.com/webgptorg/promptbook
24
24
  */
25
- var PROMPTBOOK_ENGINE_VERSION = '0.75.5';
25
+ var PROMPTBOOK_ENGINE_VERSION = '0.75.9';
26
26
  /**
27
27
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
28
28
  * Note: [๐Ÿ’ž] Ignore a discrepancy between file name and entity name
@@ -653,6 +653,12 @@
653
653
  * @private within the repository - too low-level in comparison with other `MAX_...`
654
654
  */
655
655
  var IMMEDIATE_TIME = 10;
656
+ /**
657
+ * Strategy for caching the intermediate results for knowledge sources
658
+ *
659
+ * @public exported from `@promptbook/core`
660
+ */
661
+ var DEFAULT_INTERMEDIATE_FILES_STRATEGY = 'HIDE_AND_KEEP';
656
662
  // <- TODO: [๐Ÿ˜ก] Change to 'VISIBLE'
657
663
  /**
658
664
  * The maximum number of (LLM) tasks running in parallel
@@ -666,6 +672,14 @@
666
672
  * @public exported from `@promptbook/core`
667
673
  */
668
674
  var DEFAULT_MAX_EXECUTION_ATTEMPTS = 3; // <- TODO: [๐Ÿคนโ€โ™‚๏ธ]
675
+ /**
676
+ * Where to store the scrape cache
677
+ *
678
+ * Note: When the folder does not exist, it is created recursively
679
+ *
680
+ * @public exported from `@promptbook/core`
681
+ */
682
+ var DEFAULT_SCRAPE_CACHE_DIRNAME = './.promptbook/scrape-cache';
669
683
  /**
670
684
  * Nonce which is used for replacing things in strings
671
685
  *
@@ -718,6 +732,12 @@
718
732
  * @public exported from `@promptbook/core`
719
733
  */
720
734
  var DEFAULT_IS_VERBOSE = false;
735
+ /**
736
+ * @@@
737
+ *
738
+ * @public exported from `@promptbook/core`
739
+ */
740
+ var DEFAULT_IS_AUTO_INSTALLED = false;
721
741
  /**
722
742
  * @@@
723
743
  *
@@ -4991,12 +5011,12 @@
4991
5011
  */
4992
5012
  function executeTask(options) {
4993
5013
  return __awaiter(this, void 0, void 0, function () {
4994
- var currentTask, preparedPipeline, parametersToPass, tools, onProgress, $executionReport, pipelineIdentification, _a, maxExecutionAttempts, name, title, priority, usedParameterNames, dependentParameterNames, definedParameters, _b, _c, _d, definedParameterNames, parameters, _loop_1, _e, _f, parameterName, maxAttempts, jokerParameterNames, preparedContent, resultString;
4995
- var e_1, _g, _h;
4996
- return __generator(this, function (_j) {
4997
- switch (_j.label) {
5014
+ var currentTask, preparedPipeline, parametersToPass, tools, onProgress, $executionReport, pipelineIdentification, maxExecutionAttempts, maxParallelCount, csvSettings, isVerbose, rootDirname, cacheDirname, intermediateFilesStrategy, isAutoInstalled, isNotPreparedWarningSupressed, name, title, priority, usedParameterNames, dependentParameterNames, definedParameters, _a, _b, _c, definedParameterNames, parameters, _loop_1, _d, _e, parameterName, maxAttempts, jokerParameterNames, preparedContent, resultString;
5015
+ var e_1, _f, _g;
5016
+ return __generator(this, function (_h) {
5017
+ switch (_h.label) {
4998
5018
  case 0:
4999
- currentTask = options.currentTask, preparedPipeline = options.preparedPipeline, parametersToPass = options.parametersToPass, tools = options.tools, onProgress = options.onProgress, $executionReport = options.$executionReport, pipelineIdentification = options.pipelineIdentification, _a = options.maxExecutionAttempts, maxExecutionAttempts = _a === void 0 ? DEFAULT_MAX_EXECUTION_ATTEMPTS : _a;
5019
+ currentTask = options.currentTask, preparedPipeline = options.preparedPipeline, parametersToPass = options.parametersToPass, tools = options.tools, onProgress = options.onProgress, $executionReport = options.$executionReport, pipelineIdentification = options.pipelineIdentification, maxExecutionAttempts = options.maxExecutionAttempts, maxParallelCount = options.maxParallelCount, csvSettings = options.csvSettings, isVerbose = options.isVerbose, rootDirname = options.rootDirname, cacheDirname = options.cacheDirname, intermediateFilesStrategy = options.intermediateFilesStrategy, isAutoInstalled = options.isAutoInstalled, isNotPreparedWarningSupressed = options.isNotPreparedWarningSupressed;
5000
5020
  name = "pipeline-executor-frame-".concat(currentTask.name);
5001
5021
  title = currentTask.title;
5002
5022
  priority = preparedPipeline.tasks.length - preparedPipeline.tasks.indexOf(currentTask);
@@ -5011,7 +5031,7 @@
5011
5031
  // <- [๐Ÿธ]
5012
5032
  })];
5013
5033
  case 1:
5014
- _j.sent();
5034
+ _h.sent();
5015
5035
  usedParameterNames = extractParameterNamesFromTask(currentTask);
5016
5036
  dependentParameterNames = new Set(currentTask.dependentParameterNames);
5017
5037
  // TODO: [๐Ÿ‘ฉ๐Ÿพโ€๐Ÿคโ€๐Ÿ‘ฉ๐Ÿป] Use here `mapAvailableToExpectedParameters`
@@ -5022,15 +5042,15 @@
5022
5042
  .map(function (name) { return "{".concat(name, "}"); })
5023
5043
  .join(', '), "\n\n ").concat(block(pipelineIdentification), "\n\n "); }));
5024
5044
  }
5025
- _c = (_b = Object).freeze;
5026
- _d = [{}];
5045
+ _b = (_a = Object).freeze;
5046
+ _c = [{}];
5027
5047
  return [4 /*yield*/, getReservedParametersForTask({
5028
5048
  preparedPipeline: preparedPipeline,
5029
5049
  task: currentTask,
5030
5050
  pipelineIdentification: pipelineIdentification,
5031
5051
  })];
5032
5052
  case 2:
5033
- definedParameters = _c.apply(_b, [__assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), parametersToPass])]);
5053
+ definedParameters = _b.apply(_a, [__assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), parametersToPass])]);
5034
5054
  definedParameterNames = new Set(Object.keys(definedParameters));
5035
5055
  parameters = {};
5036
5056
  _loop_1 = function (parameterName) {
@@ -5050,15 +5070,15 @@
5050
5070
  try {
5051
5071
  // Note: [2] Check that all used parameters are defined and removing unused parameters for this task
5052
5072
  // TODO: [๐Ÿ‘ฉ๐Ÿพโ€๐Ÿคโ€๐Ÿ‘ฉ๐Ÿป] Use here `mapAvailableToExpectedParameters`
5053
- for (_e = __values(Array.from(union(definedParameterNames, usedParameterNames, dependentParameterNames))), _f = _e.next(); !_f.done; _f = _e.next()) {
5054
- parameterName = _f.value;
5073
+ for (_d = __values(Array.from(union(definedParameterNames, usedParameterNames, dependentParameterNames))), _e = _d.next(); !_e.done; _e = _d.next()) {
5074
+ parameterName = _e.value;
5055
5075
  _loop_1(parameterName);
5056
5076
  }
5057
5077
  }
5058
5078
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
5059
5079
  finally {
5060
5080
  try {
5061
- if (_f && !_f.done && (_g = _e.return)) _g.call(_e);
5081
+ if (_e && !_e.done && (_f = _d.return)) _f.call(_d);
5062
5082
  }
5063
5083
  finally { if (e_1) throw e_1.error; }
5064
5084
  }
@@ -5078,9 +5098,18 @@
5078
5098
  tools: tools,
5079
5099
  $executionReport: $executionReport,
5080
5100
  pipelineIdentification: pipelineIdentification,
5101
+ maxExecutionAttempts: maxExecutionAttempts,
5102
+ maxParallelCount: maxParallelCount,
5103
+ csvSettings: csvSettings,
5104
+ isVerbose: isVerbose,
5105
+ rootDirname: rootDirname,
5106
+ cacheDirname: cacheDirname,
5107
+ intermediateFilesStrategy: intermediateFilesStrategy,
5108
+ isAutoInstalled: isAutoInstalled,
5109
+ isNotPreparedWarningSupressed: isNotPreparedWarningSupressed,
5081
5110
  })];
5082
5111
  case 3:
5083
- resultString = _j.sent();
5112
+ resultString = _h.sent();
5084
5113
  return [4 /*yield*/, onProgress({
5085
5114
  name: name,
5086
5115
  title: title,
@@ -5092,12 +5121,12 @@
5092
5121
  // <- [๐Ÿธ]
5093
5122
  })];
5094
5123
  case 4:
5095
- _j.sent();
5096
- return [2 /*return*/, Object.freeze((_h = {},
5097
- _h[currentTask.resultingParameterName] =
5124
+ _h.sent();
5125
+ return [2 /*return*/, Object.freeze((_g = {},
5126
+ _g[currentTask.resultingParameterName] =
5098
5127
  // <- Note: [๐Ÿ‘ฉโ€๐Ÿ‘ฉโ€๐Ÿ‘ง] No need to detect parameter collision here because pipeline checks logic consistency during construction
5099
5128
  resultString,
5100
- _h))];
5129
+ _g))];
5101
5130
  }
5102
5131
  });
5103
5132
  });
@@ -5156,12 +5185,12 @@
5156
5185
  */
5157
5186
  function executePipeline(options) {
5158
5187
  return __awaiter(this, void 0, void 0, function () {
5159
- var inputParameters, tools, onProgress, pipeline, setPreparedPipeline, pipelineIdentification, maxParallelCount, rootDirname, _a, isVerbose, preparedPipeline, errors, warnings, executionReport, isReturned, _b, _c, parameter, e_1_1, _loop_1, _d, _e, parameterName, state_1, e_2_1, parametersToPass, resovedParameterNames_1, unresovedTasks_1, resolving_1, loopLimit, _loop_2, error_1, usage_1, outputParameters_1, usage, outputParameters;
5160
- var e_1, _f, e_2, _g;
5161
- return __generator(this, function (_h) {
5162
- switch (_h.label) {
5188
+ var inputParameters, tools, onProgress, pipeline, setPreparedPipeline, pipelineIdentification, maxParallelCount, rootDirname, isVerbose, preparedPipeline, errors, warnings, executionReport, isReturned, _a, _b, parameter, e_1_1, _loop_1, _c, _d, parameterName, state_1, e_2_1, parametersToPass, resovedParameterNames_1, unresovedTasks_1, resolving_1, loopLimit, _loop_2, error_1, usage_1, outputParameters_1, usage, outputParameters;
5189
+ var e_1, _e, e_2, _f;
5190
+ return __generator(this, function (_g) {
5191
+ switch (_g.label) {
5163
5192
  case 0:
5164
- inputParameters = options.inputParameters, tools = options.tools, onProgress = options.onProgress, pipeline = options.pipeline, setPreparedPipeline = options.setPreparedPipeline, pipelineIdentification = options.pipelineIdentification, maxParallelCount = options.maxParallelCount, rootDirname = options.rootDirname, _a = options.isVerbose, isVerbose = _a === void 0 ? DEFAULT_IS_VERBOSE : _a;
5193
+ inputParameters = options.inputParameters, tools = options.tools, onProgress = options.onProgress, pipeline = options.pipeline, setPreparedPipeline = options.setPreparedPipeline, pipelineIdentification = options.pipelineIdentification, maxParallelCount = options.maxParallelCount, rootDirname = options.rootDirname, isVerbose = options.isVerbose;
5165
5194
  preparedPipeline = options.preparedPipeline;
5166
5195
  if (!(preparedPipeline === undefined)) return [3 /*break*/, 2];
5167
5196
  return [4 /*yield*/, preparePipeline(pipeline, tools, {
@@ -5170,9 +5199,9 @@
5170
5199
  maxParallelCount: maxParallelCount,
5171
5200
  })];
5172
5201
  case 1:
5173
- preparedPipeline = _h.sent();
5202
+ preparedPipeline = _g.sent();
5174
5203
  setPreparedPipeline(preparedPipeline);
5175
- _h.label = 2;
5204
+ _g.label = 2;
5176
5205
  case 2:
5177
5206
  errors = [];
5178
5207
  warnings = [];
@@ -5185,17 +5214,17 @@
5185
5214
  promptExecutions: [],
5186
5215
  };
5187
5216
  isReturned = false;
5188
- _h.label = 3;
5217
+ _g.label = 3;
5189
5218
  case 3:
5190
- _h.trys.push([3, 9, 10, 11]);
5191
- _b = __values(preparedPipeline.parameters.filter(function (_a) {
5219
+ _g.trys.push([3, 9, 10, 11]);
5220
+ _a = __values(preparedPipeline.parameters.filter(function (_a) {
5192
5221
  var isInput = _a.isInput;
5193
5222
  return isInput;
5194
- })), _c = _b.next();
5195
- _h.label = 4;
5223
+ })), _b = _a.next();
5224
+ _g.label = 4;
5196
5225
  case 4:
5197
- if (!!_c.done) return [3 /*break*/, 8];
5198
- parameter = _c.value;
5226
+ if (!!_b.done) return [3 /*break*/, 8];
5227
+ parameter = _b.value;
5199
5228
  if (!(inputParameters[parameter.name] === undefined)) return [3 /*break*/, 7];
5200
5229
  isReturned = true;
5201
5230
  if (!(onProgress !== undefined)) return [3 /*break*/, 6];
@@ -5203,8 +5232,8 @@
5203
5232
  return [4 /*yield*/, waitasecond.forTime(IMMEDIATE_TIME)];
5204
5233
  case 5:
5205
5234
  // Note: Wait a short time to prevent race conditions
5206
- _h.sent();
5207
- _h.label = 6;
5235
+ _g.sent();
5236
+ _g.label = 6;
5208
5237
  case 6: return [2 /*return*/, $asDeeplyFrozenSerializableJson("Unuccessful PipelineExecutorResult (with missing parameter {".concat(parameter.name, "}) PipelineExecutorResult"), {
5209
5238
  isSuccessful: false,
5210
5239
  errors: __spreadArray([
@@ -5217,24 +5246,24 @@
5217
5246
  preparedPipeline: preparedPipeline,
5218
5247
  })];
5219
5248
  case 7:
5220
- _c = _b.next();
5249
+ _b = _a.next();
5221
5250
  return [3 /*break*/, 4];
5222
5251
  case 8: return [3 /*break*/, 11];
5223
5252
  case 9:
5224
- e_1_1 = _h.sent();
5253
+ e_1_1 = _g.sent();
5225
5254
  e_1 = { error: e_1_1 };
5226
5255
  return [3 /*break*/, 11];
5227
5256
  case 10:
5228
5257
  try {
5229
- if (_c && !_c.done && (_f = _b.return)) _f.call(_b);
5258
+ if (_b && !_b.done && (_e = _a.return)) _e.call(_a);
5230
5259
  }
5231
5260
  finally { if (e_1) throw e_1.error; }
5232
5261
  return [7 /*endfinally*/];
5233
5262
  case 11:
5234
5263
  _loop_1 = function (parameterName) {
5235
5264
  var parameter;
5236
- return __generator(this, function (_j) {
5237
- switch (_j.label) {
5265
+ return __generator(this, function (_h) {
5266
+ switch (_h.label) {
5238
5267
  case 0:
5239
5268
  parameter = preparedPipeline.parameters.find(function (_a) {
5240
5269
  var name = _a.name;
@@ -5251,8 +5280,8 @@
5251
5280
  return [4 /*yield*/, waitasecond.forTime(IMMEDIATE_TIME)];
5252
5281
  case 2:
5253
5282
  // Note: Wait a short time to prevent race conditions
5254
- _j.sent();
5255
- _j.label = 3;
5283
+ _h.sent();
5284
+ _h.label = 3;
5256
5285
  case 3: return [2 /*return*/, { value: $asDeeplyFrozenSerializableJson(spaceTrim.spaceTrim(function (block) { return "\n Unuccessful PipelineExecutorResult (with extra parameter {".concat(parameter.name, "}) PipelineExecutorResult\n\n ").concat(block(pipelineIdentification), "\n "); }), {
5257
5286
  isSuccessful: false,
5258
5287
  errors: __spreadArray([
@@ -5268,39 +5297,39 @@
5268
5297
  }
5269
5298
  });
5270
5299
  };
5271
- _h.label = 12;
5300
+ _g.label = 12;
5272
5301
  case 12:
5273
- _h.trys.push([12, 17, 18, 19]);
5274
- _d = __values(Object.keys(inputParameters)), _e = _d.next();
5275
- _h.label = 13;
5302
+ _g.trys.push([12, 17, 18, 19]);
5303
+ _c = __values(Object.keys(inputParameters)), _d = _c.next();
5304
+ _g.label = 13;
5276
5305
  case 13:
5277
- if (!!_e.done) return [3 /*break*/, 16];
5278
- parameterName = _e.value;
5306
+ if (!!_d.done) return [3 /*break*/, 16];
5307
+ parameterName = _d.value;
5279
5308
  return [5 /*yield**/, _loop_1(parameterName)];
5280
5309
  case 14:
5281
- state_1 = _h.sent();
5310
+ state_1 = _g.sent();
5282
5311
  if (typeof state_1 === "object")
5283
5312
  return [2 /*return*/, state_1.value];
5284
- _h.label = 15;
5313
+ _g.label = 15;
5285
5314
  case 15:
5286
- _e = _d.next();
5315
+ _d = _c.next();
5287
5316
  return [3 /*break*/, 13];
5288
5317
  case 16: return [3 /*break*/, 19];
5289
5318
  case 17:
5290
- e_2_1 = _h.sent();
5319
+ e_2_1 = _g.sent();
5291
5320
  e_2 = { error: e_2_1 };
5292
5321
  return [3 /*break*/, 19];
5293
5322
  case 18:
5294
5323
  try {
5295
- if (_e && !_e.done && (_g = _d.return)) _g.call(_d);
5324
+ if (_d && !_d.done && (_f = _c.return)) _f.call(_c);
5296
5325
  }
5297
5326
  finally { if (e_2) throw e_2.error; }
5298
5327
  return [7 /*endfinally*/];
5299
5328
  case 19:
5300
5329
  parametersToPass = inputParameters;
5301
- _h.label = 20;
5330
+ _g.label = 20;
5302
5331
  case 20:
5303
- _h.trys.push([20, 25, , 28]);
5332
+ _g.trys.push([20, 25, , 28]);
5304
5333
  resovedParameterNames_1 = preparedPipeline.parameters
5305
5334
  .filter(function (_a) {
5306
5335
  var isInput = _a.isInput;
@@ -5315,8 +5344,8 @@
5315
5344
  loopLimit = LOOP_LIMIT;
5316
5345
  _loop_2 = function () {
5317
5346
  var currentTask, work_1;
5318
- return __generator(this, function (_k) {
5319
- switch (_k.label) {
5347
+ return __generator(this, function (_j) {
5348
+ switch (_j.label) {
5320
5349
  case 0:
5321
5350
  if (loopLimit-- < 0) {
5322
5351
  // Note: Really UnexpectedError not LimitReachedError - this should be catched during validatePipeline
@@ -5352,7 +5381,7 @@
5352
5381
  if (!!currentTask) return [3 /*break*/, 3];
5353
5382
  /* [๐Ÿคนโ€โ™‚๏ธ] */ return [4 /*yield*/, Promise.race(resolving_1)];
5354
5383
  case 2:
5355
- /* [๐Ÿคนโ€โ™‚๏ธ] */ _k.sent();
5384
+ /* [๐Ÿคนโ€โ™‚๏ธ] */ _j.sent();
5356
5385
  return [3 /*break*/, 4];
5357
5386
  case 3:
5358
5387
  unresovedTasks_1 = unresovedTasks_1.filter(function (task) { return task !== currentTask; });
@@ -5377,24 +5406,24 @@
5377
5406
  // <- Note: Errors are catched here [3]
5378
5407
  // TODO: BUT if in multiple tasks are errors, only the first one is catched so maybe we should catch errors here and save them to errors array here
5379
5408
  resolving_1.push(work_1);
5380
- _k.label = 4;
5409
+ _j.label = 4;
5381
5410
  case 4: return [2 /*return*/];
5382
5411
  }
5383
5412
  });
5384
5413
  };
5385
- _h.label = 21;
5414
+ _g.label = 21;
5386
5415
  case 21:
5387
5416
  if (!(unresovedTasks_1.length > 0)) return [3 /*break*/, 23];
5388
5417
  return [5 /*yield**/, _loop_2()];
5389
5418
  case 22:
5390
- _h.sent();
5419
+ _g.sent();
5391
5420
  return [3 /*break*/, 21];
5392
5421
  case 23: return [4 /*yield*/, Promise.all(resolving_1)];
5393
5422
  case 24:
5394
- _h.sent();
5423
+ _g.sent();
5395
5424
  return [3 /*break*/, 28];
5396
5425
  case 25:
5397
- error_1 = _h.sent();
5426
+ error_1 = _g.sent();
5398
5427
  if (!(error_1 instanceof Error)) {
5399
5428
  throw error_1;
5400
5429
  }
@@ -5414,8 +5443,8 @@
5414
5443
  return [4 /*yield*/, waitasecond.forTime(IMMEDIATE_TIME)];
5415
5444
  case 26:
5416
5445
  // Note: Wait a short time to prevent race conditions
5417
- _h.sent();
5418
- _h.label = 27;
5446
+ _g.sent();
5447
+ _g.label = 27;
5419
5448
  case 27: return [2 /*return*/, $asDeeplyFrozenSerializableJson('Unuccessful PipelineExecutorResult (with misc errors) PipelineExecutorResult', {
5420
5449
  isSuccessful: false,
5421
5450
  errors: __spreadArray([error_1], __read(errors), false).map(serializeError),
@@ -5442,8 +5471,8 @@
5442
5471
  return [4 /*yield*/, waitasecond.forTime(IMMEDIATE_TIME)];
5443
5472
  case 29:
5444
5473
  // Note: Wait a short time to prevent race conditions
5445
- _h.sent();
5446
- _h.label = 30;
5474
+ _g.sent();
5475
+ _g.label = 30;
5447
5476
  case 30: return [2 /*return*/, $asDeeplyFrozenSerializableJson('Successful PipelineExecutorResult', {
5448
5477
  isSuccessful: true,
5449
5478
  errors: errors.map(serializeError),
@@ -5470,7 +5499,7 @@
5470
5499
  */
5471
5500
  function createPipelineExecutor(options) {
5472
5501
  var _this = this;
5473
- var pipeline = options.pipeline, tools = options.tools, _a = options.maxExecutionAttempts, maxExecutionAttempts = _a === void 0 ? DEFAULT_MAX_EXECUTION_ATTEMPTS : _a, _b = options.maxParallelCount, maxParallelCount = _b === void 0 ? DEFAULT_MAX_PARALLEL_COUNT : _b, _c = options.csvSettings, csvSettings = _c === void 0 ? DEFAULT_CSV_SETTINGS : _c, _d = options.isVerbose, isVerbose = _d === void 0 ? DEFAULT_IS_VERBOSE : _d, _e = options.isNotPreparedWarningSupressed, isNotPreparedWarningSupressed = _e === void 0 ? false : _e, _f = options.rootDirname, rootDirname = _f === void 0 ? null : _f;
5502
+ var pipeline = options.pipeline, tools = options.tools, _a = options.maxExecutionAttempts, maxExecutionAttempts = _a === void 0 ? DEFAULT_MAX_EXECUTION_ATTEMPTS : _a, _b = options.maxParallelCount, maxParallelCount = _b === void 0 ? DEFAULT_MAX_PARALLEL_COUNT : _b, _c = options.csvSettings, csvSettings = _c === void 0 ? DEFAULT_CSV_SETTINGS : _c, _d = options.isVerbose, isVerbose = _d === void 0 ? DEFAULT_IS_VERBOSE : _d, _e = options.isNotPreparedWarningSupressed, isNotPreparedWarningSupressed = _e === void 0 ? false : _e, _f = options.cacheDirname, cacheDirname = _f === void 0 ? DEFAULT_SCRAPE_CACHE_DIRNAME : _f, _g = options.intermediateFilesStrategy, intermediateFilesStrategy = _g === void 0 ? DEFAULT_INTERMEDIATE_FILES_STRATEGY : _g, _h = options.isAutoInstalled, isAutoInstalled = _h === void 0 ? DEFAULT_IS_AUTO_INSTALLED : _h, _j = options.rootDirname, rootDirname = _j === void 0 ? null : _j;
5474
5503
  validatePipeline(pipeline);
5475
5504
  var pipelineIdentification = (function () {
5476
5505
  // Note: This is a ๐Ÿ˜ implementation of [๐Ÿšž]
@@ -5510,6 +5539,9 @@
5510
5539
  isVerbose: isVerbose,
5511
5540
  isNotPreparedWarningSupressed: isNotPreparedWarningSupressed,
5512
5541
  rootDirname: rootDirname,
5542
+ cacheDirname: cacheDirname,
5543
+ intermediateFilesStrategy: intermediateFilesStrategy,
5544
+ isAutoInstalled: isAutoInstalled,
5513
5545
  })];
5514
5546
  });
5515
5547
  }); };