@promptbook/markdown-utils 0.78.2 → 0.78.3
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.
|
@@ -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
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
*
|
|
23
23
|
* @see https://github.com/webgptorg/promptbook
|
|
24
24
|
*/
|
|
25
|
-
var PROMPTBOOK_ENGINE_VERSION = '0.78.
|
|
25
|
+
var PROMPTBOOK_ENGINE_VERSION = '0.78.2';
|
|
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
|
|
@@ -3797,20 +3797,32 @@
|
|
|
3797
3797
|
if (!(error instanceof ReferenceError)) {
|
|
3798
3798
|
throw error;
|
|
3799
3799
|
}
|
|
3800
|
-
var undefinedName = error.message.split(' ')[0];
|
|
3801
3800
|
/*
|
|
3802
3801
|
Note: Parsing the error
|
|
3802
|
+
🌟 Most devices:
|
|
3803
3803
|
[PipelineUrlError: thing is not defined]
|
|
3804
|
+
|
|
3805
|
+
🍏 iPhone`s Safari:
|
|
3806
|
+
[PipelineUrlError: Can't find variable: thing]
|
|
3804
3807
|
*/
|
|
3805
|
-
|
|
3808
|
+
var variableName = undefined;
|
|
3809
|
+
if (error.message.startsWith("Can't")) {
|
|
3810
|
+
// 🍏 Case
|
|
3811
|
+
variableName = error.message.split(' ').pop();
|
|
3812
|
+
}
|
|
3813
|
+
else {
|
|
3814
|
+
// 🌟 Case
|
|
3815
|
+
variableName = error.message.split(' ').shift();
|
|
3816
|
+
}
|
|
3817
|
+
if (variableName === undefined) {
|
|
3806
3818
|
throw error;
|
|
3807
3819
|
}
|
|
3808
|
-
if (script.includes(
|
|
3809
|
-
script = "const ".concat(
|
|
3820
|
+
if (script.includes(variableName + '(')) {
|
|
3821
|
+
script = "const ".concat(variableName, " = ()=>'';") + script;
|
|
3810
3822
|
}
|
|
3811
3823
|
else {
|
|
3812
|
-
variables.add(
|
|
3813
|
-
script = "const ".concat(
|
|
3824
|
+
variables.add(variableName);
|
|
3825
|
+
script = "const ".concat(variableName, " = '';") + script;
|
|
3814
3826
|
}
|
|
3815
3827
|
}
|
|
3816
3828
|
}
|