@promptbook/core 0.78.2 → 0.78.4
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 +2 -2
- package/esm/index.es.js +19 -7
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/_packages/types.index.d.ts +0 -2
- package/esm/typings/src/commands/_common/types/CommandType.d.ts +1 -1
- package/package.json +1 -1
- package/umd/index.umd.js +19 -7
- package/umd/index.umd.js.map +1 -1
|
@@ -6,7 +6,6 @@ import type { PipelineHeadCommandParser } from '../commands/_common/types/Comman
|
|
|
6
6
|
import type { PipelineTaskCommandParser } from '../commands/_common/types/CommandParser';
|
|
7
7
|
import type { CommandParserInput } from '../commands/_common/types/CommandParser';
|
|
8
8
|
import type { CommandType } from '../commands/_common/types/CommandType';
|
|
9
|
-
import type { CommandTypeOrAlias } from '../commands/_common/types/CommandType';
|
|
10
9
|
import type { CommandUsagePlace } from '../commands/_common/types/CommandUsagePlaces';
|
|
11
10
|
import type { ExpectCommand } from '../commands/EXPECT/ExpectCommand';
|
|
12
11
|
import type { ForeachJson } from '../commands/FOREACH/ForeachJson';
|
|
@@ -266,7 +265,6 @@ export type { PipelineHeadCommandParser };
|
|
|
266
265
|
export type { PipelineTaskCommandParser };
|
|
267
266
|
export type { CommandParserInput };
|
|
268
267
|
export type { CommandType };
|
|
269
|
-
export type { CommandTypeOrAlias };
|
|
270
268
|
export type { CommandUsagePlace };
|
|
271
269
|
export type { ExpectCommand };
|
|
272
270
|
export type { ForeachJson };
|
|
@@ -12,6 +12,6 @@ export type CommandType = Command['type'];
|
|
|
12
12
|
*
|
|
13
13
|
* This is a type of the command like "KNOWLEDGE" or "PERSONA"
|
|
14
14
|
*
|
|
15
|
-
|
|
15
|
+
ex--rt type CommandTypeOrAlias = Command['type'] | Command['aliasNames'] | Command['deprecatedNames'];
|
|
16
16
|
// <- TODO: [🧘] Implement
|
|
17
17
|
*/
|
package/package.json
CHANGED
package/umd/index.umd.js
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
*
|
|
26
26
|
* @see https://github.com/webgptorg/promptbook
|
|
27
27
|
*/
|
|
28
|
-
var PROMPTBOOK_ENGINE_VERSION = '0.78.
|
|
28
|
+
var PROMPTBOOK_ENGINE_VERSION = '0.78.3';
|
|
29
29
|
/**
|
|
30
30
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
31
31
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -2693,20 +2693,32 @@
|
|
|
2693
2693
|
if (!(error instanceof ReferenceError)) {
|
|
2694
2694
|
throw error;
|
|
2695
2695
|
}
|
|
2696
|
-
var undefinedName = error.message.split(' ')[0];
|
|
2697
2696
|
/*
|
|
2698
2697
|
Note: Parsing the error
|
|
2698
|
+
🌟 Most devices:
|
|
2699
2699
|
[PipelineUrlError: thing is not defined]
|
|
2700
|
+
|
|
2701
|
+
🍏 iPhone`s Safari:
|
|
2702
|
+
[PipelineUrlError: Can't find variable: thing]
|
|
2700
2703
|
*/
|
|
2701
|
-
|
|
2704
|
+
var variableName = undefined;
|
|
2705
|
+
if (error.message.startsWith("Can't")) {
|
|
2706
|
+
// 🍏 Case
|
|
2707
|
+
variableName = error.message.split(' ').pop();
|
|
2708
|
+
}
|
|
2709
|
+
else {
|
|
2710
|
+
// 🌟 Case
|
|
2711
|
+
variableName = error.message.split(' ').shift();
|
|
2712
|
+
}
|
|
2713
|
+
if (variableName === undefined) {
|
|
2702
2714
|
throw error;
|
|
2703
2715
|
}
|
|
2704
|
-
if (script.includes(
|
|
2705
|
-
script = "const ".concat(
|
|
2716
|
+
if (script.includes(variableName + '(')) {
|
|
2717
|
+
script = "const ".concat(variableName, " = ()=>'';") + script;
|
|
2706
2718
|
}
|
|
2707
2719
|
else {
|
|
2708
|
-
variables.add(
|
|
2709
|
-
script = "const ".concat(
|
|
2720
|
+
variables.add(variableName);
|
|
2721
|
+
script = "const ".concat(variableName, " = '';") + script;
|
|
2710
2722
|
}
|
|
2711
2723
|
}
|
|
2712
2724
|
}
|