@promptbook/website-crawler 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.
- package/README.md +8 -2
- package/esm/index.es.js +85 -67
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/_packages/markdown-utils.index.d.ts +2 -0
- package/esm/typings/src/_packages/types.index.d.ts +2 -2
- package/esm/typings/src/execution/createPipelineExecutor/10-executePipeline.d.ts +1 -1
- package/esm/typings/src/execution/createPipelineExecutor/20-executeTask.d.ts +1 -1
- package/esm/typings/src/execution/createPipelineExecutor/40-executeAttempts.d.ts +1 -1
- package/esm/typings/src/formfactors/index.d.ts +1 -0
- package/esm/typings/src/formfactors/sheets/SheetsFormfactorDefinition.d.ts +1 -0
- package/esm/typings/src/prepare/PrepareAndScrapeOptions.d.ts +6 -4
- package/esm/typings/src/types/typeAliases.d.ts +10 -0
- package/package.json +2 -2
- package/umd/index.umd.js +85 -67
- package/umd/index.umd.js.map +1 -1
- package/esm/typings/src/_packages/langtail.index.d.ts +0 -6
- package/esm/typings/src/llm-providers/langtail/LangtailExecutionTools.d.ts +0 -17
- package/esm/typings/src/llm-providers/langtail/LangtailExecutionToolsOptions.d.ts +0 -13
- package/esm/typings/src/llm-providers/langtail/playground/playground.d.ts +0 -5
package/README.md
CHANGED
|
@@ -91,7 +91,7 @@ Promptbook project is ecosystem of multiple projects and tools, following is a l
|
|
|
91
91
|
<tr>
|
|
92
92
|
<td>Core</td>
|
|
93
93
|
<td>Promptbook Core is a description and documentation of the basic concepts, ideas and inner workings of how Promptbook should be implemented, and defines what features must be describable by book language.</td>
|
|
94
|
-
<td rowspan=2>https://
|
|
94
|
+
<td rowspan=2>https://github.com/webgptorg/book</td>
|
|
95
95
|
</tr>
|
|
96
96
|
<tr>
|
|
97
97
|
<td>Book language</td>
|
|
@@ -102,7 +102,7 @@ Promptbook project is ecosystem of multiple projects and tools, following is a l
|
|
|
102
102
|
<tr>
|
|
103
103
|
<td>Promptbook typescript project</td>
|
|
104
104
|
<td>Promptbook implementation in TypeScript released as multiple NPM packages</td>
|
|
105
|
-
<td>https://github.com/webgptorg/promptbook + Multiple packages on NPM</td>
|
|
105
|
+
<td>https://github.com/webgptorg/promptbook + <a href="https://www.npmjs.com/package/@promptbook/core#-packages-for-developers">Multiple packages published on NPM</a></td>
|
|
106
106
|
</tr>
|
|
107
107
|
<tr>
|
|
108
108
|
<td>Promptbook studio</td>
|
|
@@ -122,6 +122,12 @@ Promptbook project is ecosystem of multiple projects and tools, following is a l
|
|
|
122
122
|
</tbody>
|
|
123
123
|
</table>
|
|
124
124
|
|
|
125
|
+
Also we have a community of developers and users:
|
|
126
|
+
|
|
127
|
+
- [Discord](https://discord.gg/x3QWNaa89N)
|
|
128
|
+
- [Landing page](https://ptbk.io)
|
|
129
|
+
- [Github discussions](https://github.com/webgptorg/promptbook/discussions)
|
|
130
|
+
|
|
125
131
|
|
|
126
132
|
|
|
127
133
|
## ๐ Book language _(for prompt-engineer)_
|
package/esm/index.es.js
CHANGED
|
@@ -24,7 +24,7 @@ var BOOK_LANGUAGE_VERSION = '1.0.0';
|
|
|
24
24
|
*
|
|
25
25
|
* @see https://github.com/webgptorg/promptbook
|
|
26
26
|
*/
|
|
27
|
-
var PROMPTBOOK_ENGINE_VERSION = '0.75.
|
|
27
|
+
var PROMPTBOOK_ENGINE_VERSION = '0.75.9';
|
|
28
28
|
/**
|
|
29
29
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
30
30
|
* Note: [๐] Ignore a discrepancy between file name and entity name
|
|
@@ -454,6 +454,12 @@ var DEFAULT_CSV_SETTINGS = Object.freeze({
|
|
|
454
454
|
* @public exported from `@promptbook/core`
|
|
455
455
|
*/
|
|
456
456
|
var DEFAULT_IS_VERBOSE = false;
|
|
457
|
+
/**
|
|
458
|
+
* @@@
|
|
459
|
+
*
|
|
460
|
+
* @public exported from `@promptbook/core`
|
|
461
|
+
*/
|
|
462
|
+
var DEFAULT_IS_AUTO_INSTALLED = false;
|
|
457
463
|
/**
|
|
458
464
|
* @@@
|
|
459
465
|
*
|
|
@@ -5101,12 +5107,12 @@ function getReservedParametersForTask(options) {
|
|
|
5101
5107
|
*/
|
|
5102
5108
|
function executeTask(options) {
|
|
5103
5109
|
return __awaiter(this, void 0, void 0, function () {
|
|
5104
|
-
var currentTask, preparedPipeline, parametersToPass, tools, onProgress, $executionReport, pipelineIdentification,
|
|
5105
|
-
var e_1,
|
|
5106
|
-
return __generator(this, function (
|
|
5107
|
-
switch (
|
|
5110
|
+
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;
|
|
5111
|
+
var e_1, _f, _g;
|
|
5112
|
+
return __generator(this, function (_h) {
|
|
5113
|
+
switch (_h.label) {
|
|
5108
5114
|
case 0:
|
|
5109
|
-
currentTask = options.currentTask, preparedPipeline = options.preparedPipeline, parametersToPass = options.parametersToPass, tools = options.tools, onProgress = options.onProgress, $executionReport = options.$executionReport, pipelineIdentification = options.pipelineIdentification,
|
|
5115
|
+
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;
|
|
5110
5116
|
name = "pipeline-executor-frame-".concat(currentTask.name);
|
|
5111
5117
|
title = currentTask.title;
|
|
5112
5118
|
priority = preparedPipeline.tasks.length - preparedPipeline.tasks.indexOf(currentTask);
|
|
@@ -5121,7 +5127,7 @@ function executeTask(options) {
|
|
|
5121
5127
|
// <- [๐ธ]
|
|
5122
5128
|
})];
|
|
5123
5129
|
case 1:
|
|
5124
|
-
|
|
5130
|
+
_h.sent();
|
|
5125
5131
|
usedParameterNames = extractParameterNamesFromTask(currentTask);
|
|
5126
5132
|
dependentParameterNames = new Set(currentTask.dependentParameterNames);
|
|
5127
5133
|
// TODO: [๐ฉ๐พโ๐คโ๐ฉ๐ป] Use here `mapAvailableToExpectedParameters`
|
|
@@ -5132,15 +5138,15 @@ function executeTask(options) {
|
|
|
5132
5138
|
.map(function (name) { return "{".concat(name, "}"); })
|
|
5133
5139
|
.join(', '), "\n\n ").concat(block(pipelineIdentification), "\n\n "); }));
|
|
5134
5140
|
}
|
|
5135
|
-
|
|
5136
|
-
|
|
5141
|
+
_b = (_a = Object).freeze;
|
|
5142
|
+
_c = [{}];
|
|
5137
5143
|
return [4 /*yield*/, getReservedParametersForTask({
|
|
5138
5144
|
preparedPipeline: preparedPipeline,
|
|
5139
5145
|
task: currentTask,
|
|
5140
5146
|
pipelineIdentification: pipelineIdentification,
|
|
5141
5147
|
})];
|
|
5142
5148
|
case 2:
|
|
5143
|
-
definedParameters =
|
|
5149
|
+
definedParameters = _b.apply(_a, [__assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), parametersToPass])]);
|
|
5144
5150
|
definedParameterNames = new Set(Object.keys(definedParameters));
|
|
5145
5151
|
parameters = {};
|
|
5146
5152
|
_loop_1 = function (parameterName) {
|
|
@@ -5160,15 +5166,15 @@ function executeTask(options) {
|
|
|
5160
5166
|
try {
|
|
5161
5167
|
// Note: [2] Check that all used parameters are defined and removing unused parameters for this task
|
|
5162
5168
|
// TODO: [๐ฉ๐พโ๐คโ๐ฉ๐ป] Use here `mapAvailableToExpectedParameters`
|
|
5163
|
-
for (
|
|
5164
|
-
parameterName =
|
|
5169
|
+
for (_d = __values(Array.from(union(definedParameterNames, usedParameterNames, dependentParameterNames))), _e = _d.next(); !_e.done; _e = _d.next()) {
|
|
5170
|
+
parameterName = _e.value;
|
|
5165
5171
|
_loop_1(parameterName);
|
|
5166
5172
|
}
|
|
5167
5173
|
}
|
|
5168
5174
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
5169
5175
|
finally {
|
|
5170
5176
|
try {
|
|
5171
|
-
if (
|
|
5177
|
+
if (_e && !_e.done && (_f = _d.return)) _f.call(_d);
|
|
5172
5178
|
}
|
|
5173
5179
|
finally { if (e_1) throw e_1.error; }
|
|
5174
5180
|
}
|
|
@@ -5188,9 +5194,18 @@ function executeTask(options) {
|
|
|
5188
5194
|
tools: tools,
|
|
5189
5195
|
$executionReport: $executionReport,
|
|
5190
5196
|
pipelineIdentification: pipelineIdentification,
|
|
5197
|
+
maxExecutionAttempts: maxExecutionAttempts,
|
|
5198
|
+
maxParallelCount: maxParallelCount,
|
|
5199
|
+
csvSettings: csvSettings,
|
|
5200
|
+
isVerbose: isVerbose,
|
|
5201
|
+
rootDirname: rootDirname,
|
|
5202
|
+
cacheDirname: cacheDirname,
|
|
5203
|
+
intermediateFilesStrategy: intermediateFilesStrategy,
|
|
5204
|
+
isAutoInstalled: isAutoInstalled,
|
|
5205
|
+
isNotPreparedWarningSupressed: isNotPreparedWarningSupressed,
|
|
5191
5206
|
})];
|
|
5192
5207
|
case 3:
|
|
5193
|
-
resultString =
|
|
5208
|
+
resultString = _h.sent();
|
|
5194
5209
|
return [4 /*yield*/, onProgress({
|
|
5195
5210
|
name: name,
|
|
5196
5211
|
title: title,
|
|
@@ -5202,12 +5217,12 @@ function executeTask(options) {
|
|
|
5202
5217
|
// <- [๐ธ]
|
|
5203
5218
|
})];
|
|
5204
5219
|
case 4:
|
|
5205
|
-
|
|
5206
|
-
return [2 /*return*/, Object.freeze((
|
|
5207
|
-
|
|
5220
|
+
_h.sent();
|
|
5221
|
+
return [2 /*return*/, Object.freeze((_g = {},
|
|
5222
|
+
_g[currentTask.resultingParameterName] =
|
|
5208
5223
|
// <- Note: [๐ฉโ๐ฉโ๐ง] No need to detect parameter collision here because pipeline checks logic consistency during construction
|
|
5209
5224
|
resultString,
|
|
5210
|
-
|
|
5225
|
+
_g))];
|
|
5211
5226
|
}
|
|
5212
5227
|
});
|
|
5213
5228
|
});
|
|
@@ -5266,12 +5281,12 @@ function filterJustOutputParameters(options) {
|
|
|
5266
5281
|
*/
|
|
5267
5282
|
function executePipeline(options) {
|
|
5268
5283
|
return __awaiter(this, void 0, void 0, function () {
|
|
5269
|
-
var inputParameters, tools, onProgress, pipeline, setPreparedPipeline, pipelineIdentification, maxParallelCount, rootDirname,
|
|
5270
|
-
var e_1,
|
|
5271
|
-
return __generator(this, function (
|
|
5272
|
-
switch (
|
|
5284
|
+
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;
|
|
5285
|
+
var e_1, _e, e_2, _f;
|
|
5286
|
+
return __generator(this, function (_g) {
|
|
5287
|
+
switch (_g.label) {
|
|
5273
5288
|
case 0:
|
|
5274
|
-
inputParameters = options.inputParameters, tools = options.tools, onProgress = options.onProgress, pipeline = options.pipeline, setPreparedPipeline = options.setPreparedPipeline, pipelineIdentification = options.pipelineIdentification, maxParallelCount = options.maxParallelCount, rootDirname = options.rootDirname,
|
|
5289
|
+
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;
|
|
5275
5290
|
preparedPipeline = options.preparedPipeline;
|
|
5276
5291
|
if (!(preparedPipeline === undefined)) return [3 /*break*/, 2];
|
|
5277
5292
|
return [4 /*yield*/, preparePipeline(pipeline, tools, {
|
|
@@ -5280,9 +5295,9 @@ function executePipeline(options) {
|
|
|
5280
5295
|
maxParallelCount: maxParallelCount,
|
|
5281
5296
|
})];
|
|
5282
5297
|
case 1:
|
|
5283
|
-
preparedPipeline =
|
|
5298
|
+
preparedPipeline = _g.sent();
|
|
5284
5299
|
setPreparedPipeline(preparedPipeline);
|
|
5285
|
-
|
|
5300
|
+
_g.label = 2;
|
|
5286
5301
|
case 2:
|
|
5287
5302
|
errors = [];
|
|
5288
5303
|
warnings = [];
|
|
@@ -5295,17 +5310,17 @@ function executePipeline(options) {
|
|
|
5295
5310
|
promptExecutions: [],
|
|
5296
5311
|
};
|
|
5297
5312
|
isReturned = false;
|
|
5298
|
-
|
|
5313
|
+
_g.label = 3;
|
|
5299
5314
|
case 3:
|
|
5300
|
-
|
|
5301
|
-
|
|
5315
|
+
_g.trys.push([3, 9, 10, 11]);
|
|
5316
|
+
_a = __values(preparedPipeline.parameters.filter(function (_a) {
|
|
5302
5317
|
var isInput = _a.isInput;
|
|
5303
5318
|
return isInput;
|
|
5304
|
-
})),
|
|
5305
|
-
|
|
5319
|
+
})), _b = _a.next();
|
|
5320
|
+
_g.label = 4;
|
|
5306
5321
|
case 4:
|
|
5307
|
-
if (!!
|
|
5308
|
-
parameter =
|
|
5322
|
+
if (!!_b.done) return [3 /*break*/, 8];
|
|
5323
|
+
parameter = _b.value;
|
|
5309
5324
|
if (!(inputParameters[parameter.name] === undefined)) return [3 /*break*/, 7];
|
|
5310
5325
|
isReturned = true;
|
|
5311
5326
|
if (!(onProgress !== undefined)) return [3 /*break*/, 6];
|
|
@@ -5313,8 +5328,8 @@ function executePipeline(options) {
|
|
|
5313
5328
|
return [4 /*yield*/, forTime(IMMEDIATE_TIME)];
|
|
5314
5329
|
case 5:
|
|
5315
5330
|
// Note: Wait a short time to prevent race conditions
|
|
5316
|
-
|
|
5317
|
-
|
|
5331
|
+
_g.sent();
|
|
5332
|
+
_g.label = 6;
|
|
5318
5333
|
case 6: return [2 /*return*/, $asDeeplyFrozenSerializableJson("Unuccessful PipelineExecutorResult (with missing parameter {".concat(parameter.name, "}) PipelineExecutorResult"), {
|
|
5319
5334
|
isSuccessful: false,
|
|
5320
5335
|
errors: __spreadArray([
|
|
@@ -5327,24 +5342,24 @@ function executePipeline(options) {
|
|
|
5327
5342
|
preparedPipeline: preparedPipeline,
|
|
5328
5343
|
})];
|
|
5329
5344
|
case 7:
|
|
5330
|
-
|
|
5345
|
+
_b = _a.next();
|
|
5331
5346
|
return [3 /*break*/, 4];
|
|
5332
5347
|
case 8: return [3 /*break*/, 11];
|
|
5333
5348
|
case 9:
|
|
5334
|
-
e_1_1 =
|
|
5349
|
+
e_1_1 = _g.sent();
|
|
5335
5350
|
e_1 = { error: e_1_1 };
|
|
5336
5351
|
return [3 /*break*/, 11];
|
|
5337
5352
|
case 10:
|
|
5338
5353
|
try {
|
|
5339
|
-
if (
|
|
5354
|
+
if (_b && !_b.done && (_e = _a.return)) _e.call(_a);
|
|
5340
5355
|
}
|
|
5341
5356
|
finally { if (e_1) throw e_1.error; }
|
|
5342
5357
|
return [7 /*endfinally*/];
|
|
5343
5358
|
case 11:
|
|
5344
5359
|
_loop_1 = function (parameterName) {
|
|
5345
5360
|
var parameter;
|
|
5346
|
-
return __generator(this, function (
|
|
5347
|
-
switch (
|
|
5361
|
+
return __generator(this, function (_h) {
|
|
5362
|
+
switch (_h.label) {
|
|
5348
5363
|
case 0:
|
|
5349
5364
|
parameter = preparedPipeline.parameters.find(function (_a) {
|
|
5350
5365
|
var name = _a.name;
|
|
@@ -5361,8 +5376,8 @@ function executePipeline(options) {
|
|
|
5361
5376
|
return [4 /*yield*/, forTime(IMMEDIATE_TIME)];
|
|
5362
5377
|
case 2:
|
|
5363
5378
|
// Note: Wait a short time to prevent race conditions
|
|
5364
|
-
|
|
5365
|
-
|
|
5379
|
+
_h.sent();
|
|
5380
|
+
_h.label = 3;
|
|
5366
5381
|
case 3: return [2 /*return*/, { value: $asDeeplyFrozenSerializableJson(spaceTrim(function (block) { return "\n Unuccessful PipelineExecutorResult (with extra parameter {".concat(parameter.name, "}) PipelineExecutorResult\n\n ").concat(block(pipelineIdentification), "\n "); }), {
|
|
5367
5382
|
isSuccessful: false,
|
|
5368
5383
|
errors: __spreadArray([
|
|
@@ -5378,39 +5393,39 @@ function executePipeline(options) {
|
|
|
5378
5393
|
}
|
|
5379
5394
|
});
|
|
5380
5395
|
};
|
|
5381
|
-
|
|
5396
|
+
_g.label = 12;
|
|
5382
5397
|
case 12:
|
|
5383
|
-
|
|
5384
|
-
|
|
5385
|
-
|
|
5398
|
+
_g.trys.push([12, 17, 18, 19]);
|
|
5399
|
+
_c = __values(Object.keys(inputParameters)), _d = _c.next();
|
|
5400
|
+
_g.label = 13;
|
|
5386
5401
|
case 13:
|
|
5387
|
-
if (!!
|
|
5388
|
-
parameterName =
|
|
5402
|
+
if (!!_d.done) return [3 /*break*/, 16];
|
|
5403
|
+
parameterName = _d.value;
|
|
5389
5404
|
return [5 /*yield**/, _loop_1(parameterName)];
|
|
5390
5405
|
case 14:
|
|
5391
|
-
state_1 =
|
|
5406
|
+
state_1 = _g.sent();
|
|
5392
5407
|
if (typeof state_1 === "object")
|
|
5393
5408
|
return [2 /*return*/, state_1.value];
|
|
5394
|
-
|
|
5409
|
+
_g.label = 15;
|
|
5395
5410
|
case 15:
|
|
5396
|
-
|
|
5411
|
+
_d = _c.next();
|
|
5397
5412
|
return [3 /*break*/, 13];
|
|
5398
5413
|
case 16: return [3 /*break*/, 19];
|
|
5399
5414
|
case 17:
|
|
5400
|
-
e_2_1 =
|
|
5415
|
+
e_2_1 = _g.sent();
|
|
5401
5416
|
e_2 = { error: e_2_1 };
|
|
5402
5417
|
return [3 /*break*/, 19];
|
|
5403
5418
|
case 18:
|
|
5404
5419
|
try {
|
|
5405
|
-
if (
|
|
5420
|
+
if (_d && !_d.done && (_f = _c.return)) _f.call(_c);
|
|
5406
5421
|
}
|
|
5407
5422
|
finally { if (e_2) throw e_2.error; }
|
|
5408
5423
|
return [7 /*endfinally*/];
|
|
5409
5424
|
case 19:
|
|
5410
5425
|
parametersToPass = inputParameters;
|
|
5411
|
-
|
|
5426
|
+
_g.label = 20;
|
|
5412
5427
|
case 20:
|
|
5413
|
-
|
|
5428
|
+
_g.trys.push([20, 25, , 28]);
|
|
5414
5429
|
resovedParameterNames_1 = preparedPipeline.parameters
|
|
5415
5430
|
.filter(function (_a) {
|
|
5416
5431
|
var isInput = _a.isInput;
|
|
@@ -5425,8 +5440,8 @@ function executePipeline(options) {
|
|
|
5425
5440
|
loopLimit = LOOP_LIMIT;
|
|
5426
5441
|
_loop_2 = function () {
|
|
5427
5442
|
var currentTask, work_1;
|
|
5428
|
-
return __generator(this, function (
|
|
5429
|
-
switch (
|
|
5443
|
+
return __generator(this, function (_j) {
|
|
5444
|
+
switch (_j.label) {
|
|
5430
5445
|
case 0:
|
|
5431
5446
|
if (loopLimit-- < 0) {
|
|
5432
5447
|
// Note: Really UnexpectedError not LimitReachedError - this should be catched during validatePipeline
|
|
@@ -5462,7 +5477,7 @@ function executePipeline(options) {
|
|
|
5462
5477
|
if (!!currentTask) return [3 /*break*/, 3];
|
|
5463
5478
|
/* [๐คนโโ๏ธ] */ return [4 /*yield*/, Promise.race(resolving_1)];
|
|
5464
5479
|
case 2:
|
|
5465
|
-
/* [๐คนโโ๏ธ] */
|
|
5480
|
+
/* [๐คนโโ๏ธ] */ _j.sent();
|
|
5466
5481
|
return [3 /*break*/, 4];
|
|
5467
5482
|
case 3:
|
|
5468
5483
|
unresovedTasks_1 = unresovedTasks_1.filter(function (task) { return task !== currentTask; });
|
|
@@ -5487,24 +5502,24 @@ function executePipeline(options) {
|
|
|
5487
5502
|
// <- Note: Errors are catched here [3]
|
|
5488
5503
|
// 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
|
|
5489
5504
|
resolving_1.push(work_1);
|
|
5490
|
-
|
|
5505
|
+
_j.label = 4;
|
|
5491
5506
|
case 4: return [2 /*return*/];
|
|
5492
5507
|
}
|
|
5493
5508
|
});
|
|
5494
5509
|
};
|
|
5495
|
-
|
|
5510
|
+
_g.label = 21;
|
|
5496
5511
|
case 21:
|
|
5497
5512
|
if (!(unresovedTasks_1.length > 0)) return [3 /*break*/, 23];
|
|
5498
5513
|
return [5 /*yield**/, _loop_2()];
|
|
5499
5514
|
case 22:
|
|
5500
|
-
|
|
5515
|
+
_g.sent();
|
|
5501
5516
|
return [3 /*break*/, 21];
|
|
5502
5517
|
case 23: return [4 /*yield*/, Promise.all(resolving_1)];
|
|
5503
5518
|
case 24:
|
|
5504
|
-
|
|
5519
|
+
_g.sent();
|
|
5505
5520
|
return [3 /*break*/, 28];
|
|
5506
5521
|
case 25:
|
|
5507
|
-
error_1 =
|
|
5522
|
+
error_1 = _g.sent();
|
|
5508
5523
|
if (!(error_1 instanceof Error)) {
|
|
5509
5524
|
throw error_1;
|
|
5510
5525
|
}
|
|
@@ -5524,8 +5539,8 @@ function executePipeline(options) {
|
|
|
5524
5539
|
return [4 /*yield*/, forTime(IMMEDIATE_TIME)];
|
|
5525
5540
|
case 26:
|
|
5526
5541
|
// Note: Wait a short time to prevent race conditions
|
|
5527
|
-
|
|
5528
|
-
|
|
5542
|
+
_g.sent();
|
|
5543
|
+
_g.label = 27;
|
|
5529
5544
|
case 27: return [2 /*return*/, $asDeeplyFrozenSerializableJson('Unuccessful PipelineExecutorResult (with misc errors) PipelineExecutorResult', {
|
|
5530
5545
|
isSuccessful: false,
|
|
5531
5546
|
errors: __spreadArray([error_1], __read(errors), false).map(serializeError),
|
|
@@ -5552,8 +5567,8 @@ function executePipeline(options) {
|
|
|
5552
5567
|
return [4 /*yield*/, forTime(IMMEDIATE_TIME)];
|
|
5553
5568
|
case 29:
|
|
5554
5569
|
// Note: Wait a short time to prevent race conditions
|
|
5555
|
-
|
|
5556
|
-
|
|
5570
|
+
_g.sent();
|
|
5571
|
+
_g.label = 30;
|
|
5557
5572
|
case 30: return [2 /*return*/, $asDeeplyFrozenSerializableJson('Successful PipelineExecutorResult', {
|
|
5558
5573
|
isSuccessful: true,
|
|
5559
5574
|
errors: errors.map(serializeError),
|
|
@@ -5580,7 +5595,7 @@ function executePipeline(options) {
|
|
|
5580
5595
|
*/
|
|
5581
5596
|
function createPipelineExecutor(options) {
|
|
5582
5597
|
var _this = this;
|
|
5583
|
-
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 =
|
|
5598
|
+
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;
|
|
5584
5599
|
validatePipeline(pipeline);
|
|
5585
5600
|
var pipelineIdentification = (function () {
|
|
5586
5601
|
// Note: This is a ๐ implementation of [๐]
|
|
@@ -5620,6 +5635,9 @@ function createPipelineExecutor(options) {
|
|
|
5620
5635
|
isVerbose: isVerbose,
|
|
5621
5636
|
isNotPreparedWarningSupressed: isNotPreparedWarningSupressed,
|
|
5622
5637
|
rootDirname: rootDirname,
|
|
5638
|
+
cacheDirname: cacheDirname,
|
|
5639
|
+
intermediateFilesStrategy: intermediateFilesStrategy,
|
|
5640
|
+
isAutoInstalled: isAutoInstalled,
|
|
5623
5641
|
})];
|
|
5624
5642
|
});
|
|
5625
5643
|
}); };
|