@promptbook/pdf 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 +2 -2
- 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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/pdf",
|
|
3
|
-
"version": "0.78.
|
|
3
|
+
"version": "0.78.4",
|
|
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/pdf.index.d.ts",
|
|
56
56
|
"peerDependencies": {
|
|
57
|
-
"@promptbook/core": "0.78.
|
|
57
|
+
"@promptbook/core": "0.78.4"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
60
|
"crypto-js": "4.2.0",
|
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.3';
|
|
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
|
|
@@ -3615,20 +3615,32 @@
|
|
|
3615
3615
|
if (!(error instanceof ReferenceError)) {
|
|
3616
3616
|
throw error;
|
|
3617
3617
|
}
|
|
3618
|
-
var undefinedName = error.message.split(' ')[0];
|
|
3619
3618
|
/*
|
|
3620
3619
|
Note: Parsing the error
|
|
3620
|
+
🌟 Most devices:
|
|
3621
3621
|
[PipelineUrlError: thing is not defined]
|
|
3622
|
+
|
|
3623
|
+
🍏 iPhone`s Safari:
|
|
3624
|
+
[PipelineUrlError: Can't find variable: thing]
|
|
3622
3625
|
*/
|
|
3623
|
-
|
|
3626
|
+
var variableName = undefined;
|
|
3627
|
+
if (error.message.startsWith("Can't")) {
|
|
3628
|
+
// 🍏 Case
|
|
3629
|
+
variableName = error.message.split(' ').pop();
|
|
3630
|
+
}
|
|
3631
|
+
else {
|
|
3632
|
+
// 🌟 Case
|
|
3633
|
+
variableName = error.message.split(' ').shift();
|
|
3634
|
+
}
|
|
3635
|
+
if (variableName === undefined) {
|
|
3624
3636
|
throw error;
|
|
3625
3637
|
}
|
|
3626
|
-
if (script.includes(
|
|
3627
|
-
script = "const ".concat(
|
|
3638
|
+
if (script.includes(variableName + '(')) {
|
|
3639
|
+
script = "const ".concat(variableName, " = ()=>'';") + script;
|
|
3628
3640
|
}
|
|
3629
3641
|
else {
|
|
3630
|
-
variables.add(
|
|
3631
|
-
script = "const ".concat(
|
|
3642
|
+
variables.add(variableName);
|
|
3643
|
+
script = "const ".concat(variableName, " = '';") + script;
|
|
3632
3644
|
}
|
|
3633
3645
|
}
|
|
3634
3646
|
}
|