@promptbook/cli 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
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
*
|
|
50
50
|
* @see https://github.com/webgptorg/promptbook
|
|
51
51
|
*/
|
|
52
|
-
var PROMPTBOOK_ENGINE_VERSION = '0.78.
|
|
52
|
+
var PROMPTBOOK_ENGINE_VERSION = '0.78.3';
|
|
53
53
|
/**
|
|
54
54
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
55
55
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -3840,20 +3840,32 @@
|
|
|
3840
3840
|
if (!(error instanceof ReferenceError)) {
|
|
3841
3841
|
throw error;
|
|
3842
3842
|
}
|
|
3843
|
-
var undefinedName = error.message.split(' ')[0];
|
|
3844
3843
|
/*
|
|
3845
3844
|
Note: Parsing the error
|
|
3845
|
+
🌟 Most devices:
|
|
3846
3846
|
[PipelineUrlError: thing is not defined]
|
|
3847
|
+
|
|
3848
|
+
🍏 iPhone`s Safari:
|
|
3849
|
+
[PipelineUrlError: Can't find variable: thing]
|
|
3847
3850
|
*/
|
|
3848
|
-
|
|
3851
|
+
var variableName = undefined;
|
|
3852
|
+
if (error.message.startsWith("Can't")) {
|
|
3853
|
+
// 🍏 Case
|
|
3854
|
+
variableName = error.message.split(' ').pop();
|
|
3855
|
+
}
|
|
3856
|
+
else {
|
|
3857
|
+
// 🌟 Case
|
|
3858
|
+
variableName = error.message.split(' ').shift();
|
|
3859
|
+
}
|
|
3860
|
+
if (variableName === undefined) {
|
|
3849
3861
|
throw error;
|
|
3850
3862
|
}
|
|
3851
|
-
if (script.includes(
|
|
3852
|
-
script = "const ".concat(
|
|
3863
|
+
if (script.includes(variableName + '(')) {
|
|
3864
|
+
script = "const ".concat(variableName, " = ()=>'';") + script;
|
|
3853
3865
|
}
|
|
3854
3866
|
else {
|
|
3855
|
-
variables.add(
|
|
3856
|
-
script = "const ".concat(
|
|
3867
|
+
variables.add(variableName);
|
|
3868
|
+
script = "const ".concat(variableName, " = '';") + script;
|
|
3857
3869
|
}
|
|
3858
3870
|
}
|
|
3859
3871
|
}
|