@promptbook/node 0.77.0 → 0.77.1
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 +108 -49
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/_packages/core.index.d.ts +2 -2
- package/esm/typings/src/cli/test/ptbk.d.ts +1 -1
- package/esm/typings/src/errors/0-index.d.ts +46 -1
- package/esm/typings/src/errors/utils/ErrorJson.d.ts +2 -2
- package/esm/typings/src/llm-providers/_common/register/createLlmToolsFromConfiguration.test.d.ts +1 -0
- package/package.json +2 -2
- package/umd/index.umd.js +108 -49
- package/umd/index.umd.js.map +1 -1
|
@@ -35,7 +35,7 @@ import { validatePipeline } from '../conversion/validation/validatePipeline';
|
|
|
35
35
|
import { CallbackInterfaceTools } from '../dialogs/callback/CallbackInterfaceTools';
|
|
36
36
|
import type { CallbackInterfaceToolsOptions } from '../dialogs/callback/CallbackInterfaceToolsOptions';
|
|
37
37
|
import { BoilerplateError } from '../errors/0-BoilerplateError';
|
|
38
|
-
import {
|
|
38
|
+
import { PROMPTBOOK_ERRORS } from '../errors/0-index';
|
|
39
39
|
import { AbstractFormatError } from '../errors/AbstractFormatError';
|
|
40
40
|
import { CollectionError } from '../errors/CollectionError';
|
|
41
41
|
import { EnvironmentMismatchError } from '../errors/EnvironmentMismatchError';
|
|
@@ -150,7 +150,7 @@ export { validatePipeline };
|
|
|
150
150
|
export { CallbackInterfaceTools };
|
|
151
151
|
export type { CallbackInterfaceToolsOptions };
|
|
152
152
|
export { BoilerplateError };
|
|
153
|
-
export {
|
|
153
|
+
export { PROMPTBOOK_ERRORS };
|
|
154
154
|
export { AbstractFormatError };
|
|
155
155
|
export { CollectionError };
|
|
156
156
|
export { EnvironmentMismatchError };
|
|
@@ -18,7 +18,52 @@ import { UnexpectedError } from './UnexpectedError';
|
|
|
18
18
|
*
|
|
19
19
|
* @public exported from `@promptbook/core`
|
|
20
20
|
*/
|
|
21
|
-
export declare const
|
|
21
|
+
export declare const PROMPTBOOK_ERRORS: {
|
|
22
|
+
readonly AbstractFormatError: typeof AbstractFormatError;
|
|
23
|
+
readonly CsvFormatError: typeof CsvFormatError;
|
|
24
|
+
readonly CollectionError: typeof CollectionError;
|
|
25
|
+
readonly EnvironmentMismatchError: typeof EnvironmentMismatchError;
|
|
26
|
+
readonly ExpectError: typeof ExpectError;
|
|
27
|
+
readonly KnowledgeScrapeError: typeof KnowledgeScrapeError;
|
|
28
|
+
readonly LimitReachedError: typeof LimitReachedError;
|
|
29
|
+
readonly MissingToolsError: typeof MissingToolsError;
|
|
30
|
+
readonly NotFoundError: typeof NotFoundError;
|
|
31
|
+
readonly NotYetImplementedError: typeof NotYetImplementedError;
|
|
32
|
+
readonly ParseError: typeof ParseError;
|
|
33
|
+
readonly PipelineExecutionError: typeof PipelineExecutionError;
|
|
34
|
+
readonly PipelineLogicError: typeof PipelineLogicError;
|
|
35
|
+
readonly PipelineUrlError: typeof PipelineUrlError;
|
|
36
|
+
readonly UnexpectedError: typeof UnexpectedError;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Index of all javascript errors
|
|
40
|
+
*
|
|
41
|
+
* @private for internal usage
|
|
42
|
+
*/
|
|
43
|
+
export declare const COMMON_JAVASCRIPT_ERRORS: {
|
|
44
|
+
readonly Error: ErrorConstructor;
|
|
45
|
+
readonly EvalError: EvalErrorConstructor;
|
|
46
|
+
readonly RangeError: RangeErrorConstructor;
|
|
47
|
+
readonly ReferenceError: ReferenceErrorConstructor;
|
|
48
|
+
readonly SyntaxError: SyntaxErrorConstructor;
|
|
49
|
+
readonly TypeError: TypeErrorConstructor;
|
|
50
|
+
readonly URIError: URIErrorConstructor;
|
|
51
|
+
readonly AggregateError: AggregateErrorConstructor;
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Index of all errors
|
|
55
|
+
*
|
|
56
|
+
* @private for internal usage
|
|
57
|
+
*/
|
|
58
|
+
export declare const ALL_ERRORS: {
|
|
59
|
+
readonly Error: ErrorConstructor;
|
|
60
|
+
readonly EvalError: EvalErrorConstructor;
|
|
61
|
+
readonly RangeError: RangeErrorConstructor;
|
|
62
|
+
readonly ReferenceError: ReferenceErrorConstructor;
|
|
63
|
+
readonly SyntaxError: SyntaxErrorConstructor;
|
|
64
|
+
readonly TypeError: TypeErrorConstructor;
|
|
65
|
+
readonly URIError: URIErrorConstructor;
|
|
66
|
+
readonly AggregateError: AggregateErrorConstructor;
|
|
22
67
|
readonly AbstractFormatError: typeof AbstractFormatError;
|
|
23
68
|
readonly CsvFormatError: typeof CsvFormatError;
|
|
24
69
|
readonly CollectionError: typeof CollectionError;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ALL_ERRORS } from '../0-index';
|
|
2
2
|
/**
|
|
3
3
|
* Represents a serialized error or custom Promptbook error
|
|
4
4
|
*
|
|
@@ -8,7 +8,7 @@ export type ErrorJson = {
|
|
|
8
8
|
/**
|
|
9
9
|
* The type of the error
|
|
10
10
|
*/
|
|
11
|
-
readonly name: keyof typeof
|
|
11
|
+
readonly name: keyof typeof ALL_ERRORS;
|
|
12
12
|
/**
|
|
13
13
|
* The message of the error
|
|
14
14
|
*/
|
package/esm/typings/src/llm-providers/_common/register/createLlmToolsFromConfiguration.test.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/node",
|
|
3
|
-
"version": "0.77.
|
|
3
|
+
"version": "0.77.1",
|
|
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/node.index.d.ts",
|
|
56
56
|
"peerDependencies": {
|
|
57
|
-
"@promptbook/core": "0.77.
|
|
57
|
+
"@promptbook/core": "0.77.1"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
60
|
"colors": "1.4.0",
|
package/umd/index.umd.js
CHANGED
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
*
|
|
44
44
|
* @see https://github.com/webgptorg/promptbook
|
|
45
45
|
*/
|
|
46
|
-
var PROMPTBOOK_ENGINE_VERSION = '0.77.0
|
|
46
|
+
var PROMPTBOOK_ENGINE_VERSION = '0.77.0';
|
|
47
47
|
/**
|
|
48
48
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
49
49
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -2186,7 +2186,7 @@
|
|
|
2186
2186
|
*
|
|
2187
2187
|
* @public exported from `@promptbook/core`
|
|
2188
2188
|
*/
|
|
2189
|
-
var
|
|
2189
|
+
var PROMPTBOOK_ERRORS = {
|
|
2190
2190
|
AbstractFormatError: AbstractFormatError,
|
|
2191
2191
|
CsvFormatError: CsvFormatError,
|
|
2192
2192
|
CollectionError: CollectionError,
|
|
@@ -2204,6 +2204,35 @@
|
|
|
2204
2204
|
UnexpectedError: UnexpectedError,
|
|
2205
2205
|
// TODO: [🪑]> VersionMismatchError,
|
|
2206
2206
|
};
|
|
2207
|
+
/**
|
|
2208
|
+
* Index of all javascript errors
|
|
2209
|
+
*
|
|
2210
|
+
* @private for internal usage
|
|
2211
|
+
*/
|
|
2212
|
+
var COMMON_JAVASCRIPT_ERRORS = {
|
|
2213
|
+
Error: Error,
|
|
2214
|
+
EvalError: EvalError,
|
|
2215
|
+
RangeError: RangeError,
|
|
2216
|
+
ReferenceError: ReferenceError,
|
|
2217
|
+
SyntaxError: SyntaxError,
|
|
2218
|
+
TypeError: TypeError,
|
|
2219
|
+
URIError: URIError,
|
|
2220
|
+
AggregateError: AggregateError,
|
|
2221
|
+
/*
|
|
2222
|
+
Note: Not widely supported
|
|
2223
|
+
> InternalError,
|
|
2224
|
+
> ModuleError,
|
|
2225
|
+
> HeapError,
|
|
2226
|
+
> WebAssemblyCompileError,
|
|
2227
|
+
> WebAssemblyRuntimeError,
|
|
2228
|
+
*/
|
|
2229
|
+
};
|
|
2230
|
+
/**
|
|
2231
|
+
* Index of all errors
|
|
2232
|
+
*
|
|
2233
|
+
* @private for internal usage
|
|
2234
|
+
*/
|
|
2235
|
+
var ALL_ERRORS = __assign(__assign({}, PROMPTBOOK_ERRORS), COMMON_JAVASCRIPT_ERRORS);
|
|
2207
2236
|
/**
|
|
2208
2237
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
2209
2238
|
*/
|
|
@@ -2214,11 +2243,11 @@
|
|
|
2214
2243
|
* @public exported from `@promptbook/utils`
|
|
2215
2244
|
*/
|
|
2216
2245
|
function deserializeError(error) {
|
|
2217
|
-
|
|
2218
|
-
|
|
2246
|
+
var ErrorClass = ALL_ERRORS[error.name];
|
|
2247
|
+
if (ErrorClass === undefined) {
|
|
2248
|
+
return new Error("".concat(error.name, ": ").concat(error.message));
|
|
2219
2249
|
}
|
|
2220
|
-
|
|
2221
|
-
return new CustomError(error.message);
|
|
2250
|
+
return new ErrorClass(error.message);
|
|
2222
2251
|
}
|
|
2223
2252
|
|
|
2224
2253
|
/**
|
|
@@ -2292,8 +2321,8 @@
|
|
|
2292
2321
|
*/
|
|
2293
2322
|
function serializeError(error) {
|
|
2294
2323
|
var name = error.name, message = error.message, stack = error.stack;
|
|
2295
|
-
if (!
|
|
2296
|
-
|
|
2324
|
+
if (!Object.keys(ALL_ERRORS).includes(name)) {
|
|
2325
|
+
console.error(spaceTrim__default["default"](function (block) { return "\n \n Cannot serialize error with name \"".concat(name, "\"\n\n ").concat(block(stack || message), "\n \n "); }));
|
|
2297
2326
|
}
|
|
2298
2327
|
return {
|
|
2299
2328
|
name: name,
|
|
@@ -8170,7 +8199,7 @@
|
|
|
8170
8199
|
* @public exported from `@promptbook/core`
|
|
8171
8200
|
*/
|
|
8172
8201
|
function pipelineStringToJsonSync(pipelineString) {
|
|
8173
|
-
var e_1, _a, e_2, _b, e_3, _c, e_4, _d;
|
|
8202
|
+
var e_1, _a, e_2, _b, e_3, _c, e_4, _d, e_5, _e;
|
|
8174
8203
|
var $pipelineJson = {
|
|
8175
8204
|
title: undefined /* <- Note: [🍙] Putting here placeholder to keep `title` on top at final JSON */,
|
|
8176
8205
|
pipelineUrl: undefined /* <- Note: Putting here placeholder to keep `pipelineUrl` on top at final JSON */,
|
|
@@ -8199,7 +8228,7 @@
|
|
|
8199
8228
|
// =============================================================
|
|
8200
8229
|
// Note: 1️⃣ Parsing of the markdown into object
|
|
8201
8230
|
if (pipelineString.startsWith('#!')) {
|
|
8202
|
-
var
|
|
8231
|
+
var _f = __read(pipelineString.split('\n')), shebangLine_1 = _f[0], restLines = _f.slice(1);
|
|
8203
8232
|
if (!(shebangLine_1 || '').includes('ptbk')) {
|
|
8204
8233
|
throw new ParseError(spaceTrim.spaceTrim(function (block) { return "\n It seems that you try to parse a book file which has non-standard shebang line for book files:\n Shebang line must contain 'ptbk'\n\n You have:\n ".concat(block(shebangLine_1 || '(empty line)'), "\n\n It should look like this:\n #!/usr/bin/env ptbk\n\n ").concat(block(getPipelineIdentification()), "\n "); }));
|
|
8205
8234
|
}
|
|
@@ -8209,7 +8238,7 @@
|
|
|
8209
8238
|
pipelineString = flattenMarkdown(pipelineString) /* <- Note: [🥞] */;
|
|
8210
8239
|
pipelineString = pipelineString.replaceAll(/`\{(?<parameterName>[a-z0-9_]+)\}`/gi, '{$<parameterName>}');
|
|
8211
8240
|
pipelineString = pipelineString.replaceAll(/`->\s+\{(?<parameterName>[a-z0-9_]+)\}`/gi, '-> {$<parameterName>}');
|
|
8212
|
-
var
|
|
8241
|
+
var _g = __read(splitMarkdownIntoSections(pipelineString).map(parseMarkdownSection)), pipelineHead = _g[0], pipelineSections = _g.slice(1); /* <- Note: [🥞] */
|
|
8213
8242
|
if (pipelineHead === undefined) {
|
|
8214
8243
|
throw new UnexpectedError(spaceTrim.spaceTrim(function (block) { return "\n Pipeline head is not defined\n\n ".concat(block(getPipelineIdentification()), "\n\n This should never happen, because the pipeline already flattened\n "); }));
|
|
8215
8244
|
}
|
|
@@ -8300,11 +8329,41 @@
|
|
|
8300
8329
|
}
|
|
8301
8330
|
finally { if (e_1) throw e_1.error; }
|
|
8302
8331
|
}
|
|
8332
|
+
// =============================================================
|
|
8333
|
+
// Note: 4️⃣ Prepare unique section names with indexes when needed
|
|
8334
|
+
var sectionCounts = {};
|
|
8335
|
+
try {
|
|
8336
|
+
for (var pipelineSections_1 = __values(pipelineSections), pipelineSections_1_1 = pipelineSections_1.next(); !pipelineSections_1_1.done; pipelineSections_1_1 = pipelineSections_1.next()) {
|
|
8337
|
+
var section = pipelineSections_1_1.value;
|
|
8338
|
+
var name_1 = titleToName(section.title);
|
|
8339
|
+
if (sectionCounts[name_1] === undefined) {
|
|
8340
|
+
sectionCounts[name_1] = { count: 0, currentIndex: 0 };
|
|
8341
|
+
}
|
|
8342
|
+
sectionCounts[name_1].count++;
|
|
8343
|
+
}
|
|
8344
|
+
}
|
|
8345
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
8346
|
+
finally {
|
|
8347
|
+
try {
|
|
8348
|
+
if (pipelineSections_1_1 && !pipelineSections_1_1.done && (_b = pipelineSections_1.return)) _b.call(pipelineSections_1);
|
|
8349
|
+
}
|
|
8350
|
+
finally { if (e_2) throw e_2.error; }
|
|
8351
|
+
}
|
|
8352
|
+
var getUniqueSectionName = function (title) {
|
|
8353
|
+
var name = titleToName(title);
|
|
8354
|
+
var count = sectionCounts[name];
|
|
8355
|
+
if (count.count === 1) {
|
|
8356
|
+
return name;
|
|
8357
|
+
}
|
|
8358
|
+
var nameWithSuffix = "".concat(name, "-").concat(count.currentIndex);
|
|
8359
|
+
count.currentIndex++;
|
|
8360
|
+
return nameWithSuffix;
|
|
8361
|
+
};
|
|
8303
8362
|
var _loop_2 = function (section) {
|
|
8304
|
-
var
|
|
8363
|
+
var e_6, _m, e_7, _o;
|
|
8305
8364
|
// TODO: Parse section's description (the content out of the codeblock and lists)
|
|
8306
8365
|
var listItems_2 = extractAllListItemsFromMarkdown(section.content);
|
|
8307
|
-
var
|
|
8366
|
+
var _p = extractOneBlockFromMarkdown(section.content), language = _p.language, content = _p.content;
|
|
8308
8367
|
// TODO: [🎾][1] DRY description
|
|
8309
8368
|
var description_1 = section.content;
|
|
8310
8369
|
// Note: Remove codeblocks - TODO: [🎾]
|
|
@@ -8320,7 +8379,7 @@
|
|
|
8320
8379
|
isSectionTypeSet: false,
|
|
8321
8380
|
isTask: true,
|
|
8322
8381
|
taskType: undefined /* <- Note: [🍙] Putting here placeholder to keep `taskType` on top at final JSON */,
|
|
8323
|
-
name:
|
|
8382
|
+
name: getUniqueSectionName(section.title),
|
|
8324
8383
|
title: section.title,
|
|
8325
8384
|
description: description_1,
|
|
8326
8385
|
content: content,
|
|
@@ -8368,17 +8427,17 @@
|
|
|
8368
8427
|
};
|
|
8369
8428
|
try {
|
|
8370
8429
|
// TODO [♓️] List commands and before apply order them to achieve order-agnostic commands
|
|
8371
|
-
for (var commands_1 = (
|
|
8372
|
-
var
|
|
8430
|
+
for (var commands_1 = (e_6 = void 0, __values(commands)), commands_1_1 = commands_1.next(); !commands_1_1.done; commands_1_1 = commands_1.next()) {
|
|
8431
|
+
var _q = commands_1_1.value, listItem = _q.listItem, command = _q.command;
|
|
8373
8432
|
_loop_4(listItem, command);
|
|
8374
8433
|
}
|
|
8375
8434
|
}
|
|
8376
|
-
catch (
|
|
8435
|
+
catch (e_6_1) { e_6 = { error: e_6_1 }; }
|
|
8377
8436
|
finally {
|
|
8378
8437
|
try {
|
|
8379
|
-
if (commands_1_1 && !commands_1_1.done && (
|
|
8438
|
+
if (commands_1_1 && !commands_1_1.done && (_m = commands_1.return)) _m.call(commands_1);
|
|
8380
8439
|
}
|
|
8381
|
-
finally { if (
|
|
8440
|
+
finally { if (e_6) throw e_6.error; }
|
|
8382
8441
|
}
|
|
8383
8442
|
// TODO: [🍧] Should be done in SECTION command
|
|
8384
8443
|
if ($taskJson.taskType === 'SCRIPT_TASK') {
|
|
@@ -8392,8 +8451,8 @@
|
|
|
8392
8451
|
}
|
|
8393
8452
|
$taskJson.dependentParameterNames = Array.from(extractParameterNamesFromTask($taskJson));
|
|
8394
8453
|
try {
|
|
8395
|
-
for (var
|
|
8396
|
-
var parameterName =
|
|
8454
|
+
for (var _r = (e_7 = void 0, __values($taskJson.dependentParameterNames)), _s = _r.next(); !_s.done; _s = _r.next()) {
|
|
8455
|
+
var parameterName = _s.value;
|
|
8397
8456
|
// TODO: [🧠] This definition should be made first in the task
|
|
8398
8457
|
defineParam({
|
|
8399
8458
|
parameterName: parameterName,
|
|
@@ -8404,12 +8463,12 @@
|
|
|
8404
8463
|
});
|
|
8405
8464
|
}
|
|
8406
8465
|
}
|
|
8407
|
-
catch (
|
|
8466
|
+
catch (e_7_1) { e_7 = { error: e_7_1 }; }
|
|
8408
8467
|
finally {
|
|
8409
8468
|
try {
|
|
8410
|
-
if (
|
|
8469
|
+
if (_s && !_s.done && (_o = _r.return)) _o.call(_r);
|
|
8411
8470
|
}
|
|
8412
|
-
finally { if (
|
|
8471
|
+
finally { if (e_7) throw e_7.error; }
|
|
8413
8472
|
}
|
|
8414
8473
|
/*
|
|
8415
8474
|
// TODO: [🍧] This should be checked in `MODEL` command + better error message
|
|
@@ -8438,21 +8497,21 @@
|
|
|
8438
8497
|
};
|
|
8439
8498
|
try {
|
|
8440
8499
|
// =============================================================
|
|
8441
|
-
// Note:
|
|
8442
|
-
for (var
|
|
8443
|
-
var section =
|
|
8500
|
+
// Note: 5️⃣ Process each section of the pipeline
|
|
8501
|
+
for (var pipelineSections_2 = __values(pipelineSections), pipelineSections_2_1 = pipelineSections_2.next(); !pipelineSections_2_1.done; pipelineSections_2_1 = pipelineSections_2.next()) {
|
|
8502
|
+
var section = pipelineSections_2_1.value;
|
|
8444
8503
|
_loop_2(section);
|
|
8445
8504
|
}
|
|
8446
8505
|
}
|
|
8447
|
-
catch (
|
|
8506
|
+
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
8448
8507
|
finally {
|
|
8449
8508
|
try {
|
|
8450
|
-
if (
|
|
8509
|
+
if (pipelineSections_2_1 && !pipelineSections_2_1.done && (_c = pipelineSections_2.return)) _c.call(pipelineSections_2);
|
|
8451
8510
|
}
|
|
8452
|
-
finally { if (
|
|
8511
|
+
finally { if (e_3) throw e_3.error; }
|
|
8453
8512
|
}
|
|
8454
8513
|
// =============================================================
|
|
8455
|
-
// Note:
|
|
8514
|
+
// Note: 6️⃣ Mark parameters as INPUT if not explicitly set
|
|
8456
8515
|
if ($pipelineJson.parameters.every(function (parameter) { return !parameter.isInput; })) {
|
|
8457
8516
|
var _loop_3 = function (parameter) {
|
|
8458
8517
|
var isThisParameterResulting = $pipelineJson.tasks.some(function (task) { return task.resultingParameterName === parameter.name; });
|
|
@@ -8461,42 +8520,42 @@
|
|
|
8461
8520
|
}
|
|
8462
8521
|
};
|
|
8463
8522
|
try {
|
|
8464
|
-
for (var
|
|
8465
|
-
var parameter =
|
|
8523
|
+
for (var _h = __values($pipelineJson.parameters), _j = _h.next(); !_j.done; _j = _h.next()) {
|
|
8524
|
+
var parameter = _j.value;
|
|
8466
8525
|
_loop_3(parameter);
|
|
8467
8526
|
}
|
|
8468
8527
|
}
|
|
8469
|
-
catch (
|
|
8528
|
+
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
8470
8529
|
finally {
|
|
8471
8530
|
try {
|
|
8472
|
-
if (
|
|
8531
|
+
if (_j && !_j.done && (_d = _h.return)) _d.call(_h);
|
|
8473
8532
|
}
|
|
8474
|
-
finally { if (
|
|
8533
|
+
finally { if (e_4) throw e_4.error; }
|
|
8475
8534
|
}
|
|
8476
8535
|
}
|
|
8477
8536
|
// =============================================================
|
|
8478
|
-
// Note:
|
|
8537
|
+
// Note: 7️⃣ Mark all non-INPUT parameters as OUTPUT if any OUTPUT is not set
|
|
8479
8538
|
if ($pipelineJson.parameters.every(function (parameter) { return !parameter.isOutput; })) {
|
|
8480
8539
|
try {
|
|
8481
|
-
for (var
|
|
8482
|
-
var parameter =
|
|
8540
|
+
for (var _k = __values($pipelineJson.parameters), _l = _k.next(); !_l.done; _l = _k.next()) {
|
|
8541
|
+
var parameter = _l.value;
|
|
8483
8542
|
if (!parameter.isInput) {
|
|
8484
8543
|
parameter.isOutput = true;
|
|
8485
8544
|
}
|
|
8486
8545
|
}
|
|
8487
8546
|
}
|
|
8488
|
-
catch (
|
|
8547
|
+
catch (e_5_1) { e_5 = { error: e_5_1 }; }
|
|
8489
8548
|
finally {
|
|
8490
8549
|
try {
|
|
8491
|
-
if (
|
|
8550
|
+
if (_l && !_l.done && (_e = _k.return)) _e.call(_k);
|
|
8492
8551
|
}
|
|
8493
|
-
finally { if (
|
|
8552
|
+
finally { if (e_5) throw e_5.error; }
|
|
8494
8553
|
}
|
|
8495
8554
|
}
|
|
8496
8555
|
// =============================================================
|
|
8497
|
-
// Note:
|
|
8556
|
+
// Note: 8️⃣ Cleanup of undefined values
|
|
8498
8557
|
$pipelineJson.tasks.forEach(function (tasks) {
|
|
8499
|
-
var
|
|
8558
|
+
var e_8, _a;
|
|
8500
8559
|
try {
|
|
8501
8560
|
for (var _b = __values(Object.entries(tasks)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
8502
8561
|
var _d = __read(_c.value, 2), key = _d[0], value = _d[1];
|
|
@@ -8505,16 +8564,16 @@
|
|
|
8505
8564
|
}
|
|
8506
8565
|
}
|
|
8507
8566
|
}
|
|
8508
|
-
catch (
|
|
8567
|
+
catch (e_8_1) { e_8 = { error: e_8_1 }; }
|
|
8509
8568
|
finally {
|
|
8510
8569
|
try {
|
|
8511
8570
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
8512
8571
|
}
|
|
8513
|
-
finally { if (
|
|
8572
|
+
finally { if (e_8) throw e_8.error; }
|
|
8514
8573
|
}
|
|
8515
8574
|
});
|
|
8516
8575
|
$pipelineJson.parameters.forEach(function (parameter) {
|
|
8517
|
-
var
|
|
8576
|
+
var e_9, _a;
|
|
8518
8577
|
try {
|
|
8519
8578
|
for (var _b = __values(Object.entries(parameter)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
8520
8579
|
var _d = __read(_c.value, 2), key = _d[0], value = _d[1];
|
|
@@ -8523,12 +8582,12 @@
|
|
|
8523
8582
|
}
|
|
8524
8583
|
}
|
|
8525
8584
|
}
|
|
8526
|
-
catch (
|
|
8585
|
+
catch (e_9_1) { e_9 = { error: e_9_1 }; }
|
|
8527
8586
|
finally {
|
|
8528
8587
|
try {
|
|
8529
8588
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
8530
8589
|
}
|
|
8531
|
-
finally { if (
|
|
8590
|
+
finally { if (e_9) throw e_9.error; }
|
|
8532
8591
|
}
|
|
8533
8592
|
});
|
|
8534
8593
|
// =============================================================
|