@promptbook/types 0.86.6 β 0.86.10
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 +3 -4
- package/esm/typings/src/conversion/archive/loadArchive.d.ts +16 -0
- package/esm/typings/src/conversion/archive/saveArchive.d.ts +18 -0
- package/esm/typings/src/conversion/validation/_importPipeline.d.ts +3 -10
- package/package.json +2 -2
- package/esm/typings/src/utils/editable/utils/stringifyPipelineJson.test.d.ts +0 -1
package/README.md
CHANGED
|
@@ -431,7 +431,7 @@ See [CHANGELOG.md](./CHANGELOG.md)
|
|
|
431
431
|
|
|
432
432
|
## π License
|
|
433
433
|
|
|
434
|
-
|
|
434
|
+
Promptbook project is under [BUSL 1.1 is an SPDX license](https://spdx.org/licenses/BUSL-1.1.html)
|
|
435
435
|
|
|
436
436
|
## π― Todos
|
|
437
437
|
|
|
@@ -439,7 +439,6 @@ See [TODO.md](./TODO.md)
|
|
|
439
439
|
|
|
440
440
|
|
|
441
441
|
|
|
442
|
-
|
|
443
442
|
## π€ Partners
|
|
444
443
|
|
|
445
444
|
<div style="display: flex; align-items: center; gap: 20px;">
|
|
@@ -456,6 +455,6 @@ See [TODO.md](./TODO.md)
|
|
|
456
455
|
|
|
457
456
|
## ποΈ Contributing
|
|
458
457
|
|
|
459
|
-
|
|
458
|
+
We are open to pull requests, feedback, and suggestions.
|
|
460
459
|
|
|
461
|
-
You can also β star the
|
|
460
|
+
You can also β star the project, [follow us on GitHub](https://github.com/hejny) or [various other social networks](https://www.pavolhejny.com/contact/).
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { PipelineJson } from '../../pipeline/PipelineJson/PipelineJson';
|
|
2
|
+
import type { string_filename } from '../../types/typeAliases';
|
|
3
|
+
import type { FilesystemTools } from '../../execution/FilesystemTools';
|
|
4
|
+
/**
|
|
5
|
+
* Loads the books from the archive file with `.bookc` extension
|
|
6
|
+
*
|
|
7
|
+
* @param filePath Path to the archive file with `.bookc` extension
|
|
8
|
+
* @param fs Filesystem tools
|
|
9
|
+
* @returns Pipelines loaded from the archive
|
|
10
|
+
*
|
|
11
|
+
* @private utility of Prompbook
|
|
12
|
+
*/
|
|
13
|
+
export declare function loadArchive(filePath: string_filename, fs: FilesystemTools): Promise<Array<PipelineJson>>;
|
|
14
|
+
/**
|
|
15
|
+
* Note: [π’] Code in this file should never be never released in packages that could be imported into browser environment
|
|
16
|
+
*/
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { PipelineJson } from '../../pipeline/PipelineJson/PipelineJson';
|
|
2
|
+
import type { string_filename } from '../../types/typeAliases';
|
|
3
|
+
import type { FilesystemTools } from '../../execution/FilesystemTools';
|
|
4
|
+
/**
|
|
5
|
+
* Saves the given books into an archive file with `.bookc` extension
|
|
6
|
+
*
|
|
7
|
+
* @param filePath Path to the archive file with `.bookc` extension
|
|
8
|
+
* @param books Pipelines to be saved in the archive
|
|
9
|
+
* @param fs Filesystem tools
|
|
10
|
+
*
|
|
11
|
+
* @private utility of Prompbook
|
|
12
|
+
*/
|
|
13
|
+
export declare function saveArchive(filePath: string_filename, collectionJson: ReadonlyArray<PipelineJson>, fs: FilesystemTools): Promise<void>;
|
|
14
|
+
/**
|
|
15
|
+
* TODO: Add metadata to zip
|
|
16
|
+
* TODO: Compression level and other zip options from config
|
|
17
|
+
* Note: [π’] Code in this file should never be never released in packages that could be imported into browser environment
|
|
18
|
+
*/
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { PipelineJson } from '../../pipeline/PipelineJson/PipelineJson';
|
|
2
2
|
import type { PipelineString } from '../../pipeline/PipelineString';
|
|
3
|
-
import type { string_json } from '../../types/typeAliases';
|
|
4
3
|
/**
|
|
5
4
|
* Import the pipeline.book or pipeline.bookc file
|
|
6
5
|
*
|
|
@@ -10,20 +9,14 @@ import type { string_json } from '../../types/typeAliases';
|
|
|
10
9
|
* @param path - The path to the file relative to examples/pipelines directory
|
|
11
10
|
* @private internal function of tests
|
|
12
11
|
*/
|
|
13
|
-
export declare function importPipelineWithoutPreparation(path: `${string}.book`): PipelineString
|
|
14
|
-
export declare function importPipelineWithoutPreparation(path: `${string}.bookc`): PipelineJson
|
|
12
|
+
export declare function importPipelineWithoutPreparation(path: `${string}.book`): Promise<PipelineString>;
|
|
13
|
+
export declare function importPipelineWithoutPreparation(path: `${string}.bookc`): Promise<PipelineJson>;
|
|
15
14
|
/**
|
|
16
15
|
* Import the pipeline.bookc file as parsed JSON
|
|
17
16
|
*
|
|
18
17
|
* @private internal function of tests
|
|
19
18
|
*/
|
|
20
|
-
export declare function importPipelineJson(path: `${string}.bookc`): PipelineJson
|
|
21
|
-
/**
|
|
22
|
-
* Import the pipeline.bookc file as string
|
|
23
|
-
*
|
|
24
|
-
* @private internal function of tests
|
|
25
|
-
*/
|
|
26
|
-
export declare function importPipelineJsonAsString(path: `${string}.bookc`): string_json<PipelineJson>;
|
|
19
|
+
export declare function importPipelineJson(path: `${string}.bookc`): Promise<PipelineJson>;
|
|
27
20
|
/**
|
|
28
21
|
* Note: [π] Ignore a discrepancy between file name and entity name
|
|
29
22
|
* Note: [β«] Code in this file should never be published in any package
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/types",
|
|
3
|
-
"version": "0.86.
|
|
3
|
+
"version": "0.86.10",
|
|
4
4
|
"description": "It's time for a paradigm shift. The future of software in plain English, French or Latin",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
@@ -45,6 +45,6 @@
|
|
|
45
45
|
"homepage": "https://ptbk.io/",
|
|
46
46
|
"typings": "./esm/typings/src/_packages/types.index.d.ts",
|
|
47
47
|
"peerDependencies": {
|
|
48
|
-
"@promptbook/core": "0.86.
|
|
48
|
+
"@promptbook/core": "0.86.10"
|
|
49
49
|
}
|
|
50
50
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|