@promptbook/core 0.75.0-4 → 0.75.2
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 +22 -16
- package/esm/index.es.js +30 -18
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/_packages/core.index.d.ts +6 -0
- package/esm/typings/src/_packages/utils.index.d.ts +2 -0
- package/esm/typings/src/config.d.ts +25 -0
- package/esm/typings/src/pipeline/PipelineInterface/PipelineInterface.d.ts +0 -4
- package/esm/typings/src/pipeline/PipelineInterface/getPipelineInterface.d.ts +1 -3
- package/esm/typings/src/pipeline/PipelineInterface/isPipelineImplementingInterface.d.ts +1 -4
- package/esm/typings/src/pipeline/PipelineInterface/isPipelineInterfacesEqual.d.ts +1 -4
- package/esm/typings/src/utils/organization/spaceTrim.d.ts +11 -0
- package/esm/typings/src/version.d.ts +1 -1
- package/package.json +1 -1
- package/umd/index.umd.js +32 -17
- package/umd/index.umd.js.map +1 -1
|
@@ -4,7 +4,10 @@ import { createCollectionFromJson } from '../collection/constructors/createColle
|
|
|
4
4
|
import { createCollectionFromPromise } from '../collection/constructors/createCollectionFromPromise';
|
|
5
5
|
import { createCollectionFromUrl } from '../collection/constructors/createCollectionFromUrl';
|
|
6
6
|
import { createSubcollection } from '../collection/constructors/createSubcollection';
|
|
7
|
+
import { NAME } from '../config';
|
|
7
8
|
import { CLAIM } from '../config';
|
|
9
|
+
import { LOGO_LIGHT_SRC } from '../config';
|
|
10
|
+
import { LOGO_DARK_SRC } from '../config';
|
|
8
11
|
import { DEFAULT_TITLE } from '../config';
|
|
9
12
|
import { MAX_FILENAME_LENGTH } from '../config';
|
|
10
13
|
import { DEFAULT_INTERMEDIATE_FILES_STRATEGY } from '../config';
|
|
@@ -113,7 +116,10 @@ export { createCollectionFromJson };
|
|
|
113
116
|
export { createCollectionFromPromise };
|
|
114
117
|
export { createCollectionFromUrl };
|
|
115
118
|
export { createSubcollection };
|
|
119
|
+
export { NAME };
|
|
116
120
|
export { CLAIM };
|
|
121
|
+
export { LOGO_LIGHT_SRC };
|
|
122
|
+
export { LOGO_DARK_SRC };
|
|
117
123
|
export { DEFAULT_TITLE };
|
|
118
124
|
export { MAX_FILENAME_LENGTH };
|
|
119
125
|
export { DEFAULT_INTERMEDIATE_FILES_STRATEGY };
|
|
@@ -44,6 +44,7 @@ import { parseKeywords } from '../utils/normalization/parseKeywords';
|
|
|
44
44
|
import { parseKeywordsFromString } from '../utils/normalization/parseKeywordsFromString';
|
|
45
45
|
import { removeDiacritics } from '../utils/normalization/removeDiacritics';
|
|
46
46
|
import { searchKeywords } from '../utils/normalization/searchKeywords';
|
|
47
|
+
import { spaceTrim } from '../utils/organization/spaceTrim';
|
|
47
48
|
import { extractParameterNames } from '../utils/parameters/extractParameterNames';
|
|
48
49
|
import { replaceParameters } from '../utils/parameters/replaceParameters';
|
|
49
50
|
import { parseNumber } from '../utils/parseNumber';
|
|
@@ -117,6 +118,7 @@ export { parseKeywords };
|
|
|
117
118
|
export { parseKeywordsFromString };
|
|
118
119
|
export { removeDiacritics };
|
|
119
120
|
export { searchKeywords };
|
|
121
|
+
export { spaceTrim };
|
|
120
122
|
export { extractParameterNames };
|
|
121
123
|
export { replaceParameters };
|
|
122
124
|
export { parseNumber };
|
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
import type { CsvSettings } from './formats/csv/CsvSettings';
|
|
2
2
|
import type { IntermediateFilesStrategy } from './types/IntermediateFilesStrategy';
|
|
3
|
+
import type { string_url_image } from './types/typeAliases';
|
|
3
4
|
/**
|
|
4
5
|
* Warning message for the generated sections and files files
|
|
5
6
|
*
|
|
6
7
|
* @private within the repository
|
|
7
8
|
*/
|
|
8
9
|
export declare const GENERATOR_WARNING = "\u26A0\uFE0F WARNING: This code has been generated so that any manual changes will be overwritten";
|
|
10
|
+
/**
|
|
11
|
+
* Name for the Promptbook
|
|
12
|
+
*
|
|
13
|
+
* TODO: [🗽] Unite branding and make single place for it
|
|
14
|
+
*
|
|
15
|
+
* @public exported from `@promptbook/core`
|
|
16
|
+
*/
|
|
17
|
+
export declare const NAME = "Promptbook";
|
|
9
18
|
/**
|
|
10
19
|
* Claim for the Promptbook
|
|
11
20
|
*
|
|
@@ -14,6 +23,22 @@ export declare const GENERATOR_WARNING = "\u26A0\uFE0F WARNING: This code has be
|
|
|
14
23
|
* @public exported from `@promptbook/core`
|
|
15
24
|
*/
|
|
16
25
|
export declare const CLAIM = "It's time for a paradigm shift. The future of software in plain English, French or Latin";
|
|
26
|
+
/**
|
|
27
|
+
* Logo for the light theme
|
|
28
|
+
*
|
|
29
|
+
* TODO: [🗽] Unite branding and make single place for it
|
|
30
|
+
*
|
|
31
|
+
* @public exported from `@promptbook/core`
|
|
32
|
+
*/
|
|
33
|
+
export declare const LOGO_LIGHT_SRC: string_url_image;
|
|
34
|
+
/**
|
|
35
|
+
* Logo for the dark theme
|
|
36
|
+
*
|
|
37
|
+
* TODO: [🗽] Unite branding and make single place for it
|
|
38
|
+
*
|
|
39
|
+
* @public exported from `@promptbook/core`
|
|
40
|
+
*/
|
|
41
|
+
export declare const LOGO_DARK_SRC: string_url_image;
|
|
17
42
|
/**
|
|
18
43
|
* When the title is not provided, the default title is used
|
|
19
44
|
*
|
|
@@ -20,7 +20,3 @@ export type PipelineInterface = {
|
|
|
20
20
|
*/
|
|
21
21
|
readonly outputParameters: ReadonlyArray<OutputParameterJson>;
|
|
22
22
|
};
|
|
23
|
-
/**
|
|
24
|
-
* TODO: [🧠][🤓] How to pass optional parameters - for example summary in FORMFACTOR Translator
|
|
25
|
-
* TODO: [🧠] Better name than `PipelineInterface` to avoid confusion with typescript `interface`
|
|
26
|
-
*/
|
|
@@ -3,11 +3,9 @@ import type { PipelineInterface } from './PipelineInterface';
|
|
|
3
3
|
/**
|
|
4
4
|
* @@@
|
|
5
5
|
*
|
|
6
|
+
* @deprecated https://github.com/webgptorg/promptbook/pull/186
|
|
6
7
|
* @see https://github.com/webgptorg/promptbook/discussions/171
|
|
7
8
|
*
|
|
8
9
|
* @public exported from `@promptbook/core`
|
|
9
10
|
*/
|
|
10
11
|
export declare function getPipelineInterface(pipeline: PipelineJson): PipelineInterface;
|
|
11
|
-
/**
|
|
12
|
-
* TODO: !!!!!! Write unit test
|
|
13
|
-
*/
|
|
@@ -18,12 +18,9 @@ export type IsPipelineImplementingInterfaceOptions = {
|
|
|
18
18
|
/**
|
|
19
19
|
* @@@
|
|
20
20
|
*
|
|
21
|
+
* @deprecated https://github.com/webgptorg/promptbook/pull/186
|
|
21
22
|
* @see https://github.com/webgptorg/promptbook/discussions/171
|
|
22
23
|
*
|
|
23
24
|
* @public exported from `@promptbook/core`
|
|
24
25
|
*/
|
|
25
26
|
export declare function isPipelineImplementingInterface(options: IsPipelineImplementingInterfaceOptions): boolean;
|
|
26
|
-
/**
|
|
27
|
-
* TODO: !!!!!! Test real implementing NOT equality
|
|
28
|
-
* TODO: !!!!!! Write unit test
|
|
29
|
-
*/
|
|
@@ -2,12 +2,9 @@ import type { PipelineInterface } from './PipelineInterface';
|
|
|
2
2
|
/**
|
|
3
3
|
* @@@
|
|
4
4
|
*
|
|
5
|
+
* @deprecated https://github.com/webgptorg/promptbook/pull/186
|
|
5
6
|
* @see https://github.com/webgptorg/promptbook/discussions/171
|
|
6
7
|
*
|
|
7
8
|
* @public exported from `@promptbook/core`
|
|
8
9
|
*/
|
|
9
10
|
export declare function isPipelineInterfacesEqual(pipelineInterface1: PipelineInterface, pipelineInterface2: PipelineInterface): boolean;
|
|
10
|
-
/**
|
|
11
|
-
* TODO: [🧠] !!! Return more states than true/false - 'IDENTICAL' |'IDENTICAL_UNPREPARED' | 'IDENTICAL_INTERFACE' | 'DIFFERENT'
|
|
12
|
-
* TODO: !!! Write unit test
|
|
13
|
-
*/
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { spaceTrim as spaceTrimReexported } from 'spacetrim';
|
|
2
|
+
/**
|
|
3
|
+
* Trims string from all 4 sides
|
|
4
|
+
*
|
|
5
|
+
* Note: This is a re-exported function from the `spacetrim` package which is
|
|
6
|
+
* Developed by same author @hejny as this package
|
|
7
|
+
*
|
|
8
|
+
* @public exported from `@promptbook/utils`
|
|
9
|
+
* @see https://github.com/hejny/spacetrim#usage
|
|
10
|
+
*/
|
|
11
|
+
export declare const spaceTrim: typeof spaceTrimReexported;
|
package/package.json
CHANGED
package/umd/index.umd.js
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
*
|
|
25
25
|
* @see https://github.com/webgptorg/promptbook
|
|
26
26
|
*/
|
|
27
|
-
var PROMPTBOOK_ENGINE_VERSION = '0.75.
|
|
27
|
+
var PROMPTBOOK_ENGINE_VERSION = '0.75.1';
|
|
28
28
|
/**
|
|
29
29
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
30
30
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -644,6 +644,14 @@
|
|
|
644
644
|
* @private within the repository
|
|
645
645
|
*/
|
|
646
646
|
var GENERATOR_WARNING = "\u26A0\uFE0F WARNING: This code has been generated so that any manual changes will be overwritten";
|
|
647
|
+
/**
|
|
648
|
+
* Name for the Promptbook
|
|
649
|
+
*
|
|
650
|
+
* TODO: [🗽] Unite branding and make single place for it
|
|
651
|
+
*
|
|
652
|
+
* @public exported from `@promptbook/core`
|
|
653
|
+
*/
|
|
654
|
+
var NAME = "Promptbook";
|
|
647
655
|
/**
|
|
648
656
|
* Claim for the Promptbook
|
|
649
657
|
*
|
|
@@ -653,6 +661,22 @@
|
|
|
653
661
|
*/
|
|
654
662
|
var CLAIM = "It's time for a paradigm shift. The future of software in plain English, French or Latin";
|
|
655
663
|
// <- TODO: [🐊] Pick the best claim
|
|
664
|
+
/**
|
|
665
|
+
* Logo for the light theme
|
|
666
|
+
*
|
|
667
|
+
* TODO: [🗽] Unite branding and make single place for it
|
|
668
|
+
*
|
|
669
|
+
* @public exported from `@promptbook/core`
|
|
670
|
+
*/
|
|
671
|
+
var LOGO_LIGHT_SRC = "https://promptbook.studio/_next/static/media/promptbook-logo.b21f0c70.png";
|
|
672
|
+
/**
|
|
673
|
+
* Logo for the dark theme
|
|
674
|
+
*
|
|
675
|
+
* TODO: [🗽] Unite branding and make single place for it
|
|
676
|
+
*
|
|
677
|
+
* @public exported from `@promptbook/core`
|
|
678
|
+
*/
|
|
679
|
+
var LOGO_DARK_SRC = "https://promptbook.studio/_next/static/media/promptbook-logo-white.09887cbc.png";
|
|
656
680
|
/**
|
|
657
681
|
* When the title is not provided, the default title is used
|
|
658
682
|
*
|
|
@@ -1266,7 +1290,6 @@
|
|
|
1266
1290
|
while (unresovedTasks.length > 0) {
|
|
1267
1291
|
_loop_3();
|
|
1268
1292
|
}
|
|
1269
|
-
// TODO: !!!!!! Test that pipeline interface implements declared formfactor interface
|
|
1270
1293
|
}
|
|
1271
1294
|
/**
|
|
1272
1295
|
* TODO: !! [🧞♀️] Do not allow joker + foreach
|
|
@@ -10033,6 +10056,7 @@
|
|
|
10033
10056
|
/**
|
|
10034
10057
|
* @@@
|
|
10035
10058
|
*
|
|
10059
|
+
* @deprecated https://github.com/webgptorg/promptbook/pull/186
|
|
10036
10060
|
* @see https://github.com/webgptorg/promptbook/discussions/171
|
|
10037
10061
|
*
|
|
10038
10062
|
* @public exported from `@promptbook/core`
|
|
@@ -10070,8 +10094,6 @@
|
|
|
10070
10094
|
var name2 = _b.name;
|
|
10071
10095
|
return name1.localeCompare(name2);
|
|
10072
10096
|
});
|
|
10073
|
-
// <- TODO: [🧠] Should we compare a descriptions?
|
|
10074
|
-
// <- TODO: [🧠][🛴] Maybe add type + expectations into the intefrace, like "a person name"
|
|
10075
10097
|
}
|
|
10076
10098
|
}
|
|
10077
10099
|
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
@@ -10083,29 +10105,23 @@
|
|
|
10083
10105
|
}
|
|
10084
10106
|
return $deepFreeze(pipelineInterface);
|
|
10085
10107
|
}
|
|
10086
|
-
/**
|
|
10087
|
-
* TODO: !!!!!! Write unit test
|
|
10088
|
-
*/
|
|
10089
10108
|
|
|
10090
10109
|
/**
|
|
10091
10110
|
* @@@
|
|
10092
10111
|
*
|
|
10112
|
+
* @deprecated https://github.com/webgptorg/promptbook/pull/186
|
|
10093
10113
|
* @see https://github.com/webgptorg/promptbook/discussions/171
|
|
10094
10114
|
*
|
|
10095
10115
|
* @public exported from `@promptbook/core`
|
|
10096
10116
|
*/
|
|
10097
10117
|
function isPipelineInterfacesEqual(pipelineInterface1, pipelineInterface2) {
|
|
10098
|
-
|
|
10099
|
-
return JSON.stringify(pipelineInterface1) === JSON.stringify(pipelineInterface2);
|
|
10118
|
+
return JSON.stringify(Object.keys(pipelineInterface1)) === JSON.stringify(Object.keys(pipelineInterface2));
|
|
10100
10119
|
}
|
|
10101
|
-
/**
|
|
10102
|
-
* TODO: [🧠] !!! Return more states than true/false - 'IDENTICAL' |'IDENTICAL_UNPREPARED' | 'IDENTICAL_INTERFACE' | 'DIFFERENT'
|
|
10103
|
-
* TODO: !!! Write unit test
|
|
10104
|
-
*/
|
|
10105
10120
|
|
|
10106
10121
|
/**
|
|
10107
10122
|
* @@@
|
|
10108
10123
|
*
|
|
10124
|
+
* @deprecated https://github.com/webgptorg/promptbook/pull/186
|
|
10109
10125
|
* @see https://github.com/webgptorg/promptbook/discussions/171
|
|
10110
10126
|
*
|
|
10111
10127
|
* @public exported from `@promptbook/core`
|
|
@@ -10114,10 +10130,6 @@
|
|
|
10114
10130
|
var pipeline = options.pipeline, pipelineInterface = options.pipelineInterface;
|
|
10115
10131
|
return isPipelineInterfacesEqual(getPipelineInterface(pipeline), pipelineInterface);
|
|
10116
10132
|
}
|
|
10117
|
-
/**
|
|
10118
|
-
* TODO: !!!!!! Test real implementing NOT equality
|
|
10119
|
-
* TODO: !!!!!! Write unit test
|
|
10120
|
-
*/
|
|
10121
10133
|
|
|
10122
10134
|
/**
|
|
10123
10135
|
* Metadata of the scraper
|
|
@@ -10378,6 +10390,8 @@
|
|
|
10378
10390
|
exports.GeneratorFormfactorDefinition = GeneratorFormfactorDefinition;
|
|
10379
10391
|
exports.GenericFormfactorDefinition = GenericFormfactorDefinition;
|
|
10380
10392
|
exports.KnowledgeScrapeError = KnowledgeScrapeError;
|
|
10393
|
+
exports.LOGO_DARK_SRC = LOGO_DARK_SRC;
|
|
10394
|
+
exports.LOGO_LIGHT_SRC = LOGO_LIGHT_SRC;
|
|
10381
10395
|
exports.LimitReachedError = LimitReachedError;
|
|
10382
10396
|
exports.MANDATORY_CSV_SETTINGS = MANDATORY_CSV_SETTINGS;
|
|
10383
10397
|
exports.MAX_FILENAME_LENGTH = MAX_FILENAME_LENGTH;
|
|
@@ -10386,6 +10400,7 @@
|
|
|
10386
10400
|
exports.MemoryStorage = MemoryStorage;
|
|
10387
10401
|
exports.MissingToolsError = MissingToolsError;
|
|
10388
10402
|
exports.MultipleLlmExecutionTools = MultipleLlmExecutionTools;
|
|
10403
|
+
exports.NAME = NAME;
|
|
10389
10404
|
exports.NonTaskSectionTypes = NonTaskSectionTypes;
|
|
10390
10405
|
exports.NotFoundError = NotFoundError;
|
|
10391
10406
|
exports.NotYetImplementedError = NotYetImplementedError;
|