@promptbook/node 0.75.6 โ 0.75.9
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 +99 -67
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/_packages/types.index.d.ts +0 -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/prepare/PrepareAndScrapeOptions.d.ts +6 -4
- package/package.json +2 -2
- package/umd/index.umd.js +99 -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/esm/index.es.js
CHANGED
|
@@ -26,7 +26,7 @@ var BOOK_LANGUAGE_VERSION = '1.0.0';
|
|
|
26
26
|
*
|
|
27
27
|
* @see https://github.com/webgptorg/promptbook
|
|
28
28
|
*/
|
|
29
|
-
var PROMPTBOOK_ENGINE_VERSION = '0.75.
|
|
29
|
+
var PROMPTBOOK_ENGINE_VERSION = '0.75.8';
|
|
30
30
|
/**
|
|
31
31
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
32
32
|
* Note: [๐] Ignore a discrepancy between file name and entity name
|
|
@@ -389,6 +389,12 @@ var IMMEDIATE_TIME = 10;
|
|
|
389
389
|
* @public exported from `@promptbook/core`
|
|
390
390
|
*/
|
|
391
391
|
var MAX_FILENAME_LENGTH = 30;
|
|
392
|
+
/**
|
|
393
|
+
* Strategy for caching the intermediate results for knowledge sources
|
|
394
|
+
*
|
|
395
|
+
* @public exported from `@promptbook/core`
|
|
396
|
+
*/
|
|
397
|
+
var DEFAULT_INTERMEDIATE_FILES_STRATEGY = 'HIDE_AND_KEEP';
|
|
392
398
|
// <- TODO: [๐ก] Change to 'VISIBLE'
|
|
393
399
|
/**
|
|
394
400
|
* The maximum number of (LLM) tasks running in parallel
|
|
@@ -402,6 +408,14 @@ var DEFAULT_MAX_PARALLEL_COUNT = 5; // <- TODO: [๐คนโโ๏ธ]
|
|
|
402
408
|
* @public exported from `@promptbook/core`
|
|
403
409
|
*/
|
|
404
410
|
var DEFAULT_MAX_EXECUTION_ATTEMPTS = 3; // <- TODO: [๐คนโโ๏ธ]
|
|
411
|
+
/**
|
|
412
|
+
* Where to store the scrape cache
|
|
413
|
+
*
|
|
414
|
+
* Note: When the folder does not exist, it is created recursively
|
|
415
|
+
*
|
|
416
|
+
* @public exported from `@promptbook/core`
|
|
417
|
+
*/
|
|
418
|
+
var DEFAULT_SCRAPE_CACHE_DIRNAME = './.promptbook/scrape-cache';
|
|
405
419
|
/**
|
|
406
420
|
* The name of the builded pipeline collection made by CLI `ptbk make` and for lookup in `createCollectionFromDirectory`
|
|
407
421
|
*
|
|
@@ -460,6 +474,12 @@ var DEFAULT_CSV_SETTINGS = Object.freeze({
|
|
|
460
474
|
* @public exported from `@promptbook/core`
|
|
461
475
|
*/
|
|
462
476
|
var DEFAULT_IS_VERBOSE = false;
|
|
477
|
+
/**
|
|
478
|
+
* @@@
|
|
479
|
+
*
|
|
480
|
+
* @public exported from `@promptbook/core`
|
|
481
|
+
*/
|
|
482
|
+
var DEFAULT_IS_AUTO_INSTALLED = false;
|
|
463
483
|
/**
|
|
464
484
|
* @@@
|
|
465
485
|
*
|
|
@@ -3990,12 +4010,12 @@ function getReservedParametersForTask(options) {
|
|
|
3990
4010
|
*/
|
|
3991
4011
|
function executeTask(options) {
|
|
3992
4012
|
return __awaiter(this, void 0, void 0, function () {
|
|
3993
|
-
var currentTask, preparedPipeline, parametersToPass, tools, onProgress, $executionReport, pipelineIdentification,
|
|
3994
|
-
var e_1,
|
|
3995
|
-
return __generator(this, function (
|
|
3996
|
-
switch (
|
|
4013
|
+
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;
|
|
4014
|
+
var e_1, _f, _g;
|
|
4015
|
+
return __generator(this, function (_h) {
|
|
4016
|
+
switch (_h.label) {
|
|
3997
4017
|
case 0:
|
|
3998
|
-
currentTask = options.currentTask, preparedPipeline = options.preparedPipeline, parametersToPass = options.parametersToPass, tools = options.tools, onProgress = options.onProgress, $executionReport = options.$executionReport, pipelineIdentification = options.pipelineIdentification,
|
|
4018
|
+
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;
|
|
3999
4019
|
name = "pipeline-executor-frame-".concat(currentTask.name);
|
|
4000
4020
|
title = currentTask.title;
|
|
4001
4021
|
priority = preparedPipeline.tasks.length - preparedPipeline.tasks.indexOf(currentTask);
|
|
@@ -4010,7 +4030,7 @@ function executeTask(options) {
|
|
|
4010
4030
|
// <- [๐ธ]
|
|
4011
4031
|
})];
|
|
4012
4032
|
case 1:
|
|
4013
|
-
|
|
4033
|
+
_h.sent();
|
|
4014
4034
|
usedParameterNames = extractParameterNamesFromTask(currentTask);
|
|
4015
4035
|
dependentParameterNames = new Set(currentTask.dependentParameterNames);
|
|
4016
4036
|
// TODO: [๐ฉ๐พโ๐คโ๐ฉ๐ป] Use here `mapAvailableToExpectedParameters`
|
|
@@ -4021,15 +4041,15 @@ function executeTask(options) {
|
|
|
4021
4041
|
.map(function (name) { return "{".concat(name, "}"); })
|
|
4022
4042
|
.join(', '), "\n\n ").concat(block(pipelineIdentification), "\n\n "); }));
|
|
4023
4043
|
}
|
|
4024
|
-
|
|
4025
|
-
|
|
4044
|
+
_b = (_a = Object).freeze;
|
|
4045
|
+
_c = [{}];
|
|
4026
4046
|
return [4 /*yield*/, getReservedParametersForTask({
|
|
4027
4047
|
preparedPipeline: preparedPipeline,
|
|
4028
4048
|
task: currentTask,
|
|
4029
4049
|
pipelineIdentification: pipelineIdentification,
|
|
4030
4050
|
})];
|
|
4031
4051
|
case 2:
|
|
4032
|
-
definedParameters =
|
|
4052
|
+
definedParameters = _b.apply(_a, [__assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), parametersToPass])]);
|
|
4033
4053
|
definedParameterNames = new Set(Object.keys(definedParameters));
|
|
4034
4054
|
parameters = {};
|
|
4035
4055
|
_loop_1 = function (parameterName) {
|
|
@@ -4049,15 +4069,15 @@ function executeTask(options) {
|
|
|
4049
4069
|
try {
|
|
4050
4070
|
// Note: [2] Check that all used parameters are defined and removing unused parameters for this task
|
|
4051
4071
|
// TODO: [๐ฉ๐พโ๐คโ๐ฉ๐ป] Use here `mapAvailableToExpectedParameters`
|
|
4052
|
-
for (
|
|
4053
|
-
parameterName =
|
|
4072
|
+
for (_d = __values(Array.from(union(definedParameterNames, usedParameterNames, dependentParameterNames))), _e = _d.next(); !_e.done; _e = _d.next()) {
|
|
4073
|
+
parameterName = _e.value;
|
|
4054
4074
|
_loop_1(parameterName);
|
|
4055
4075
|
}
|
|
4056
4076
|
}
|
|
4057
4077
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
4058
4078
|
finally {
|
|
4059
4079
|
try {
|
|
4060
|
-
if (
|
|
4080
|
+
if (_e && !_e.done && (_f = _d.return)) _f.call(_d);
|
|
4061
4081
|
}
|
|
4062
4082
|
finally { if (e_1) throw e_1.error; }
|
|
4063
4083
|
}
|
|
@@ -4077,9 +4097,18 @@ function executeTask(options) {
|
|
|
4077
4097
|
tools: tools,
|
|
4078
4098
|
$executionReport: $executionReport,
|
|
4079
4099
|
pipelineIdentification: pipelineIdentification,
|
|
4100
|
+
maxExecutionAttempts: maxExecutionAttempts,
|
|
4101
|
+
maxParallelCount: maxParallelCount,
|
|
4102
|
+
csvSettings: csvSettings,
|
|
4103
|
+
isVerbose: isVerbose,
|
|
4104
|
+
rootDirname: rootDirname,
|
|
4105
|
+
cacheDirname: cacheDirname,
|
|
4106
|
+
intermediateFilesStrategy: intermediateFilesStrategy,
|
|
4107
|
+
isAutoInstalled: isAutoInstalled,
|
|
4108
|
+
isNotPreparedWarningSupressed: isNotPreparedWarningSupressed,
|
|
4080
4109
|
})];
|
|
4081
4110
|
case 3:
|
|
4082
|
-
resultString =
|
|
4111
|
+
resultString = _h.sent();
|
|
4083
4112
|
return [4 /*yield*/, onProgress({
|
|
4084
4113
|
name: name,
|
|
4085
4114
|
title: title,
|
|
@@ -4091,12 +4120,12 @@ function executeTask(options) {
|
|
|
4091
4120
|
// <- [๐ธ]
|
|
4092
4121
|
})];
|
|
4093
4122
|
case 4:
|
|
4094
|
-
|
|
4095
|
-
return [2 /*return*/, Object.freeze((
|
|
4096
|
-
|
|
4123
|
+
_h.sent();
|
|
4124
|
+
return [2 /*return*/, Object.freeze((_g = {},
|
|
4125
|
+
_g[currentTask.resultingParameterName] =
|
|
4097
4126
|
// <- Note: [๐ฉโ๐ฉโ๐ง] No need to detect parameter collision here because pipeline checks logic consistency during construction
|
|
4098
4127
|
resultString,
|
|
4099
|
-
|
|
4128
|
+
_g))];
|
|
4100
4129
|
}
|
|
4101
4130
|
});
|
|
4102
4131
|
});
|
|
@@ -4155,12 +4184,12 @@ function filterJustOutputParameters(options) {
|
|
|
4155
4184
|
*/
|
|
4156
4185
|
function executePipeline(options) {
|
|
4157
4186
|
return __awaiter(this, void 0, void 0, function () {
|
|
4158
|
-
var inputParameters, tools, onProgress, pipeline, setPreparedPipeline, pipelineIdentification, maxParallelCount, rootDirname,
|
|
4159
|
-
var e_1,
|
|
4160
|
-
return __generator(this, function (
|
|
4161
|
-
switch (
|
|
4187
|
+
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;
|
|
4188
|
+
var e_1, _e, e_2, _f;
|
|
4189
|
+
return __generator(this, function (_g) {
|
|
4190
|
+
switch (_g.label) {
|
|
4162
4191
|
case 0:
|
|
4163
|
-
inputParameters = options.inputParameters, tools = options.tools, onProgress = options.onProgress, pipeline = options.pipeline, setPreparedPipeline = options.setPreparedPipeline, pipelineIdentification = options.pipelineIdentification, maxParallelCount = options.maxParallelCount, rootDirname = options.rootDirname,
|
|
4192
|
+
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;
|
|
4164
4193
|
preparedPipeline = options.preparedPipeline;
|
|
4165
4194
|
if (!(preparedPipeline === undefined)) return [3 /*break*/, 2];
|
|
4166
4195
|
return [4 /*yield*/, preparePipeline(pipeline, tools, {
|
|
@@ -4169,9 +4198,9 @@ function executePipeline(options) {
|
|
|
4169
4198
|
maxParallelCount: maxParallelCount,
|
|
4170
4199
|
})];
|
|
4171
4200
|
case 1:
|
|
4172
|
-
preparedPipeline =
|
|
4201
|
+
preparedPipeline = _g.sent();
|
|
4173
4202
|
setPreparedPipeline(preparedPipeline);
|
|
4174
|
-
|
|
4203
|
+
_g.label = 2;
|
|
4175
4204
|
case 2:
|
|
4176
4205
|
errors = [];
|
|
4177
4206
|
warnings = [];
|
|
@@ -4184,17 +4213,17 @@ function executePipeline(options) {
|
|
|
4184
4213
|
promptExecutions: [],
|
|
4185
4214
|
};
|
|
4186
4215
|
isReturned = false;
|
|
4187
|
-
|
|
4216
|
+
_g.label = 3;
|
|
4188
4217
|
case 3:
|
|
4189
|
-
|
|
4190
|
-
|
|
4218
|
+
_g.trys.push([3, 9, 10, 11]);
|
|
4219
|
+
_a = __values(preparedPipeline.parameters.filter(function (_a) {
|
|
4191
4220
|
var isInput = _a.isInput;
|
|
4192
4221
|
return isInput;
|
|
4193
|
-
})),
|
|
4194
|
-
|
|
4222
|
+
})), _b = _a.next();
|
|
4223
|
+
_g.label = 4;
|
|
4195
4224
|
case 4:
|
|
4196
|
-
if (!!
|
|
4197
|
-
parameter =
|
|
4225
|
+
if (!!_b.done) return [3 /*break*/, 8];
|
|
4226
|
+
parameter = _b.value;
|
|
4198
4227
|
if (!(inputParameters[parameter.name] === undefined)) return [3 /*break*/, 7];
|
|
4199
4228
|
isReturned = true;
|
|
4200
4229
|
if (!(onProgress !== undefined)) return [3 /*break*/, 6];
|
|
@@ -4202,8 +4231,8 @@ function executePipeline(options) {
|
|
|
4202
4231
|
return [4 /*yield*/, forTime(IMMEDIATE_TIME)];
|
|
4203
4232
|
case 5:
|
|
4204
4233
|
// Note: Wait a short time to prevent race conditions
|
|
4205
|
-
|
|
4206
|
-
|
|
4234
|
+
_g.sent();
|
|
4235
|
+
_g.label = 6;
|
|
4207
4236
|
case 6: return [2 /*return*/, $asDeeplyFrozenSerializableJson("Unuccessful PipelineExecutorResult (with missing parameter {".concat(parameter.name, "}) PipelineExecutorResult"), {
|
|
4208
4237
|
isSuccessful: false,
|
|
4209
4238
|
errors: __spreadArray([
|
|
@@ -4216,24 +4245,24 @@ function executePipeline(options) {
|
|
|
4216
4245
|
preparedPipeline: preparedPipeline,
|
|
4217
4246
|
})];
|
|
4218
4247
|
case 7:
|
|
4219
|
-
|
|
4248
|
+
_b = _a.next();
|
|
4220
4249
|
return [3 /*break*/, 4];
|
|
4221
4250
|
case 8: return [3 /*break*/, 11];
|
|
4222
4251
|
case 9:
|
|
4223
|
-
e_1_1 =
|
|
4252
|
+
e_1_1 = _g.sent();
|
|
4224
4253
|
e_1 = { error: e_1_1 };
|
|
4225
4254
|
return [3 /*break*/, 11];
|
|
4226
4255
|
case 10:
|
|
4227
4256
|
try {
|
|
4228
|
-
if (
|
|
4257
|
+
if (_b && !_b.done && (_e = _a.return)) _e.call(_a);
|
|
4229
4258
|
}
|
|
4230
4259
|
finally { if (e_1) throw e_1.error; }
|
|
4231
4260
|
return [7 /*endfinally*/];
|
|
4232
4261
|
case 11:
|
|
4233
4262
|
_loop_1 = function (parameterName) {
|
|
4234
4263
|
var parameter;
|
|
4235
|
-
return __generator(this, function (
|
|
4236
|
-
switch (
|
|
4264
|
+
return __generator(this, function (_h) {
|
|
4265
|
+
switch (_h.label) {
|
|
4237
4266
|
case 0:
|
|
4238
4267
|
parameter = preparedPipeline.parameters.find(function (_a) {
|
|
4239
4268
|
var name = _a.name;
|
|
@@ -4250,8 +4279,8 @@ function executePipeline(options) {
|
|
|
4250
4279
|
return [4 /*yield*/, forTime(IMMEDIATE_TIME)];
|
|
4251
4280
|
case 2:
|
|
4252
4281
|
// Note: Wait a short time to prevent race conditions
|
|
4253
|
-
|
|
4254
|
-
|
|
4282
|
+
_h.sent();
|
|
4283
|
+
_h.label = 3;
|
|
4255
4284
|
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 "); }), {
|
|
4256
4285
|
isSuccessful: false,
|
|
4257
4286
|
errors: __spreadArray([
|
|
@@ -4267,39 +4296,39 @@ function executePipeline(options) {
|
|
|
4267
4296
|
}
|
|
4268
4297
|
});
|
|
4269
4298
|
};
|
|
4270
|
-
|
|
4299
|
+
_g.label = 12;
|
|
4271
4300
|
case 12:
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4301
|
+
_g.trys.push([12, 17, 18, 19]);
|
|
4302
|
+
_c = __values(Object.keys(inputParameters)), _d = _c.next();
|
|
4303
|
+
_g.label = 13;
|
|
4275
4304
|
case 13:
|
|
4276
|
-
if (!!
|
|
4277
|
-
parameterName =
|
|
4305
|
+
if (!!_d.done) return [3 /*break*/, 16];
|
|
4306
|
+
parameterName = _d.value;
|
|
4278
4307
|
return [5 /*yield**/, _loop_1(parameterName)];
|
|
4279
4308
|
case 14:
|
|
4280
|
-
state_1 =
|
|
4309
|
+
state_1 = _g.sent();
|
|
4281
4310
|
if (typeof state_1 === "object")
|
|
4282
4311
|
return [2 /*return*/, state_1.value];
|
|
4283
|
-
|
|
4312
|
+
_g.label = 15;
|
|
4284
4313
|
case 15:
|
|
4285
|
-
|
|
4314
|
+
_d = _c.next();
|
|
4286
4315
|
return [3 /*break*/, 13];
|
|
4287
4316
|
case 16: return [3 /*break*/, 19];
|
|
4288
4317
|
case 17:
|
|
4289
|
-
e_2_1 =
|
|
4318
|
+
e_2_1 = _g.sent();
|
|
4290
4319
|
e_2 = { error: e_2_1 };
|
|
4291
4320
|
return [3 /*break*/, 19];
|
|
4292
4321
|
case 18:
|
|
4293
4322
|
try {
|
|
4294
|
-
if (
|
|
4323
|
+
if (_d && !_d.done && (_f = _c.return)) _f.call(_c);
|
|
4295
4324
|
}
|
|
4296
4325
|
finally { if (e_2) throw e_2.error; }
|
|
4297
4326
|
return [7 /*endfinally*/];
|
|
4298
4327
|
case 19:
|
|
4299
4328
|
parametersToPass = inputParameters;
|
|
4300
|
-
|
|
4329
|
+
_g.label = 20;
|
|
4301
4330
|
case 20:
|
|
4302
|
-
|
|
4331
|
+
_g.trys.push([20, 25, , 28]);
|
|
4303
4332
|
resovedParameterNames_1 = preparedPipeline.parameters
|
|
4304
4333
|
.filter(function (_a) {
|
|
4305
4334
|
var isInput = _a.isInput;
|
|
@@ -4314,8 +4343,8 @@ function executePipeline(options) {
|
|
|
4314
4343
|
loopLimit = LOOP_LIMIT;
|
|
4315
4344
|
_loop_2 = function () {
|
|
4316
4345
|
var currentTask, work_1;
|
|
4317
|
-
return __generator(this, function (
|
|
4318
|
-
switch (
|
|
4346
|
+
return __generator(this, function (_j) {
|
|
4347
|
+
switch (_j.label) {
|
|
4319
4348
|
case 0:
|
|
4320
4349
|
if (loopLimit-- < 0) {
|
|
4321
4350
|
// Note: Really UnexpectedError not LimitReachedError - this should be catched during validatePipeline
|
|
@@ -4351,7 +4380,7 @@ function executePipeline(options) {
|
|
|
4351
4380
|
if (!!currentTask) return [3 /*break*/, 3];
|
|
4352
4381
|
/* [๐คนโโ๏ธ] */ return [4 /*yield*/, Promise.race(resolving_1)];
|
|
4353
4382
|
case 2:
|
|
4354
|
-
/* [๐คนโโ๏ธ] */
|
|
4383
|
+
/* [๐คนโโ๏ธ] */ _j.sent();
|
|
4355
4384
|
return [3 /*break*/, 4];
|
|
4356
4385
|
case 3:
|
|
4357
4386
|
unresovedTasks_1 = unresovedTasks_1.filter(function (task) { return task !== currentTask; });
|
|
@@ -4376,24 +4405,24 @@ function executePipeline(options) {
|
|
|
4376
4405
|
// <- Note: Errors are catched here [3]
|
|
4377
4406
|
// 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
|
|
4378
4407
|
resolving_1.push(work_1);
|
|
4379
|
-
|
|
4408
|
+
_j.label = 4;
|
|
4380
4409
|
case 4: return [2 /*return*/];
|
|
4381
4410
|
}
|
|
4382
4411
|
});
|
|
4383
4412
|
};
|
|
4384
|
-
|
|
4413
|
+
_g.label = 21;
|
|
4385
4414
|
case 21:
|
|
4386
4415
|
if (!(unresovedTasks_1.length > 0)) return [3 /*break*/, 23];
|
|
4387
4416
|
return [5 /*yield**/, _loop_2()];
|
|
4388
4417
|
case 22:
|
|
4389
|
-
|
|
4418
|
+
_g.sent();
|
|
4390
4419
|
return [3 /*break*/, 21];
|
|
4391
4420
|
case 23: return [4 /*yield*/, Promise.all(resolving_1)];
|
|
4392
4421
|
case 24:
|
|
4393
|
-
|
|
4422
|
+
_g.sent();
|
|
4394
4423
|
return [3 /*break*/, 28];
|
|
4395
4424
|
case 25:
|
|
4396
|
-
error_1 =
|
|
4425
|
+
error_1 = _g.sent();
|
|
4397
4426
|
if (!(error_1 instanceof Error)) {
|
|
4398
4427
|
throw error_1;
|
|
4399
4428
|
}
|
|
@@ -4413,8 +4442,8 @@ function executePipeline(options) {
|
|
|
4413
4442
|
return [4 /*yield*/, forTime(IMMEDIATE_TIME)];
|
|
4414
4443
|
case 26:
|
|
4415
4444
|
// Note: Wait a short time to prevent race conditions
|
|
4416
|
-
|
|
4417
|
-
|
|
4445
|
+
_g.sent();
|
|
4446
|
+
_g.label = 27;
|
|
4418
4447
|
case 27: return [2 /*return*/, $asDeeplyFrozenSerializableJson('Unuccessful PipelineExecutorResult (with misc errors) PipelineExecutorResult', {
|
|
4419
4448
|
isSuccessful: false,
|
|
4420
4449
|
errors: __spreadArray([error_1], __read(errors), false).map(serializeError),
|
|
@@ -4441,8 +4470,8 @@ function executePipeline(options) {
|
|
|
4441
4470
|
return [4 /*yield*/, forTime(IMMEDIATE_TIME)];
|
|
4442
4471
|
case 29:
|
|
4443
4472
|
// Note: Wait a short time to prevent race conditions
|
|
4444
|
-
|
|
4445
|
-
|
|
4473
|
+
_g.sent();
|
|
4474
|
+
_g.label = 30;
|
|
4446
4475
|
case 30: return [2 /*return*/, $asDeeplyFrozenSerializableJson('Successful PipelineExecutorResult', {
|
|
4447
4476
|
isSuccessful: true,
|
|
4448
4477
|
errors: errors.map(serializeError),
|
|
@@ -4469,7 +4498,7 @@ function executePipeline(options) {
|
|
|
4469
4498
|
*/
|
|
4470
4499
|
function createPipelineExecutor(options) {
|
|
4471
4500
|
var _this = this;
|
|
4472
|
-
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 =
|
|
4501
|
+
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;
|
|
4473
4502
|
validatePipeline(pipeline);
|
|
4474
4503
|
var pipelineIdentification = (function () {
|
|
4475
4504
|
// Note: This is a ๐ implementation of [๐]
|
|
@@ -4509,6 +4538,9 @@ function createPipelineExecutor(options) {
|
|
|
4509
4538
|
isVerbose: isVerbose,
|
|
4510
4539
|
isNotPreparedWarningSupressed: isNotPreparedWarningSupressed,
|
|
4511
4540
|
rootDirname: rootDirname,
|
|
4541
|
+
cacheDirname: cacheDirname,
|
|
4542
|
+
intermediateFilesStrategy: intermediateFilesStrategy,
|
|
4543
|
+
isAutoInstalled: isAutoInstalled,
|
|
4512
4544
|
})];
|
|
4513
4545
|
});
|
|
4514
4546
|
}); };
|