@promptbook/remote-server 0.81.0-11 → 0.81.0-12
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 +1 -1
- package/esm/index.es.js +1 -1
- package/esm/typings/src/_packages/utils.index.d.ts +2 -0
- package/esm/typings/src/other/templates/getBookTemplate.d.ts +3 -5
- package/esm/typings/src/scrapers/_common/utils/scraperFetch.d.ts +3 -0
- package/esm/typings/src/scripting/javascript/utils/preserve.d.ts +1 -0
- package/esm/typings/src/utils/validators/filePath/isPathRoot.d.ts +12 -0
- package/esm/typings/src/utils/validators/filePath/isPathRoot.test.d.ts +4 -0
- package/esm/typings/src/utils/validators/filePath/isValidFilePath.d.ts +3 -0
- package/esm/typings/src/wizzard/$getCompiledBook.d.ts +16 -0
- package/esm/typings/src/wizzard/wizzard.d.ts +3 -3
- package/package.json +2 -2
- package/umd/index.umd.js +1 -1
- package/esm/typings/src/scripting/javascript/utils/unknownToString.d.ts +0 -8
package/README.md
CHANGED
|
@@ -255,7 +255,7 @@ Or you can install them separately:
|
|
|
255
255
|
- **[@promptbook/editable](https://www.npmjs.com/package/@promptbook/editable)** - Editable book as native javascript object with imperative object API
|
|
256
256
|
- **[@promptbook/templates](https://www.npmjs.com/package/@promptbook/templates)** - Usefull templates and examples of books which can be used as a starting point
|
|
257
257
|
- **[@promptbook/types](https://www.npmjs.com/package/@promptbook/types)** - Just typescript types used in the library
|
|
258
|
-
- **[@promptbook/cli](https://www.npmjs.com/package/@promptbook/cli)** - Command line interface utilities for promptbooks
|
|
258
|
+
- ⭐ **[@promptbook/cli](https://www.npmjs.com/package/@promptbook/cli)** - Command line interface utilities for promptbooks
|
|
259
259
|
|
|
260
260
|
|
|
261
261
|
|
package/esm/index.es.js
CHANGED
|
@@ -17,7 +17,7 @@ var BOOK_LANGUAGE_VERSION = '1.0.0';
|
|
|
17
17
|
* @generated
|
|
18
18
|
* @see https://github.com/webgptorg/promptbook
|
|
19
19
|
*/
|
|
20
|
-
var PROMPTBOOK_ENGINE_VERSION = '0.81.0-
|
|
20
|
+
var PROMPTBOOK_ENGINE_VERSION = '0.81.0-11';
|
|
21
21
|
/**
|
|
22
22
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
23
23
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -68,6 +68,7 @@ import { trimCodeBlock } from '../utils/trimCodeBlock';
|
|
|
68
68
|
import { trimEndOfCodeBlock } from '../utils/trimEndOfCodeBlock';
|
|
69
69
|
import { unwrapResult } from '../utils/unwrapResult';
|
|
70
70
|
import { isValidEmail } from '../utils/validators/email/isValidEmail';
|
|
71
|
+
import { isPathRoot } from '../utils/validators/filePath/isPathRoot';
|
|
71
72
|
import { isValidFilePath } from '../utils/validators/filePath/isValidFilePath';
|
|
72
73
|
import { isValidJavascriptName } from '../utils/validators/javascriptName/isValidJavascriptName';
|
|
73
74
|
import { isValidPromptbookVersion } from '../utils/validators/semanticVersion/isValidPromptbookVersion';
|
|
@@ -147,6 +148,7 @@ export { trimCodeBlock };
|
|
|
147
148
|
export { trimEndOfCodeBlock };
|
|
148
149
|
export { unwrapResult };
|
|
149
150
|
export { isValidEmail };
|
|
151
|
+
export { isPathRoot };
|
|
150
152
|
export { isValidFilePath };
|
|
151
153
|
export { isValidJavascriptName };
|
|
152
154
|
export { isValidPromptbookVersion };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { PipelineCollection } from '../../collection/PipelineCollection';
|
|
2
1
|
import type { string_formfactor_name } from '../../formfactors/_common/string_formfactor_name';
|
|
3
2
|
import type { PipelineJson } from '../../pipeline/PipelineJson/PipelineJson';
|
|
4
3
|
/**
|
|
@@ -7,15 +6,14 @@ import type { PipelineJson } from '../../pipeline/PipelineJson/PipelineJson';
|
|
|
7
6
|
* @singleton
|
|
8
7
|
* @private internal cache of `getBookTemplate`
|
|
9
8
|
*/
|
|
10
|
-
export declare let
|
|
9
|
+
export declare let pipelines: Array<PipelineJson> | null;
|
|
11
10
|
/**
|
|
12
11
|
* Get template for new book
|
|
13
12
|
*
|
|
14
13
|
* @public exported from `@promptbook/templates`
|
|
15
14
|
*/
|
|
16
|
-
export declare function getBookTemplate(formfactorName: string_formfactor_name): PipelineJson
|
|
15
|
+
export declare function getBookTemplate(formfactorName: string_formfactor_name): ReadonlyArray<PipelineJson>;
|
|
17
16
|
/**
|
|
18
|
-
* TODO:
|
|
17
|
+
* TODO: Unit test
|
|
19
18
|
* TODO: [🧠] Which is the best place for this function
|
|
20
|
-
* TODO: !!!!!! `book string template notation
|
|
21
19
|
*/
|
|
@@ -5,3 +5,6 @@ import type { PromptbookFetch } from '../../../execution/PromptbookFetch';
|
|
|
5
5
|
* @private as default `fetch` function used in Promptbook scrapers
|
|
6
6
|
*/
|
|
7
7
|
export declare const scraperFetch: PromptbookFetch;
|
|
8
|
+
/**
|
|
9
|
+
* TODO: [🧠] Maybe rename because it is not used only for scrapers but also in `$getCompiledBook`
|
|
10
|
+
*/
|
|
@@ -9,5 +9,6 @@ import type { really_any } from '../../../utils/organization/really_any';
|
|
|
9
9
|
*/
|
|
10
10
|
export declare function preserve(func: (...params: ReadonlyArray<really_any>) => unknown): void;
|
|
11
11
|
/**
|
|
12
|
+
* TODO: Probbably remove in favour of `keepImported`
|
|
12
13
|
* TODO: !! [1] This maybe does memory leak
|
|
13
14
|
*/
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { string_dirname } from '../../../types/typeAliases';
|
|
2
|
+
import type { string_filename } from '../../../types/typeAliases';
|
|
3
|
+
/**
|
|
4
|
+
* Determines if the given path is a root path.
|
|
5
|
+
*
|
|
6
|
+
* Note: This does not check if the file exists only if the path is valid
|
|
7
|
+
* @public exported from `@promptbook/utils`
|
|
8
|
+
*/
|
|
9
|
+
export declare function isPathRoot(value: string_dirname | string_filename): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* TODO: [🍏] Make for MacOS paths
|
|
12
|
+
*/
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ExecutionTools } from '../execution/ExecutionTools';
|
|
2
|
+
import type { PipelineJson } from '../pipeline/PipelineJson/PipelineJson';
|
|
3
|
+
import type { PipelineString } from '../pipeline/PipelineString';
|
|
4
|
+
import type { PrepareAndScrapeOptions } from '../prepare/PrepareAndScrapeOptions';
|
|
5
|
+
import type { string_filename } from '../types/typeAliases';
|
|
6
|
+
import type { string_pipeline_url } from '../types/typeAliases';
|
|
7
|
+
/**
|
|
8
|
+
* @see ./wizzard.ts `getPipeline` method
|
|
9
|
+
*
|
|
10
|
+
* @private usable through `ptbk run` and `@prompbook/wizzard`
|
|
11
|
+
*/
|
|
12
|
+
export declare function $getCompiledBook(tools: Required<Pick<ExecutionTools, 'fs' | 'fetch'>>, pipelineSource: string_filename | string_pipeline_url | PipelineString, options?: PrepareAndScrapeOptions): Promise<PipelineJson>;
|
|
13
|
+
/**
|
|
14
|
+
* TODO: Write unit test
|
|
15
|
+
* Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
|
|
16
|
+
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Promisable } from 'type-fest';
|
|
2
|
-
import type { PipelineJson } from '../pipeline/PipelineJson/PipelineJson';
|
|
3
2
|
import type { ExecutionTools } from '../execution/ExecutionTools';
|
|
4
3
|
import type { PipelineExecutorResult } from '../execution/PipelineExecutorResult';
|
|
4
|
+
import type { PipelineJson } from '../pipeline/PipelineJson/PipelineJson';
|
|
5
5
|
import type { PipelineString } from '../pipeline/PipelineString';
|
|
6
6
|
import type { TaskProgress } from '../types/TaskProgress';
|
|
7
7
|
import type { InputParameters } from '../types/typeAliases';
|
|
@@ -23,7 +23,7 @@ declare class Wizzard {
|
|
|
23
23
|
*
|
|
24
24
|
* @param pipelineSource
|
|
25
25
|
*/
|
|
26
|
-
getExecutionTools(): Promise<ExecutionTools
|
|
26
|
+
getExecutionTools(): Promise<Required<Pick<ExecutionTools, 'fs' | 'fetch'>>>;
|
|
27
27
|
/**
|
|
28
28
|
* TODO: Make standalone function from this exported from node and used here and in `ptbk run`
|
|
29
29
|
* @@@!!!
|
|
@@ -34,7 +34,7 @@ declare class Wizzard {
|
|
|
34
34
|
*
|
|
35
35
|
* @param pipelineSource
|
|
36
36
|
*/
|
|
37
|
-
|
|
37
|
+
getCompiledBook(pipelineSource: string_filename | string_pipeline_url | PipelineString): Promise<PipelineJson>;
|
|
38
38
|
}
|
|
39
39
|
/**
|
|
40
40
|
* 🧙♂️ @@@
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/remote-server",
|
|
3
|
-
"version": "0.81.0-
|
|
3
|
+
"version": "0.81.0-12",
|
|
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/remote-server.index.d.ts",
|
|
56
56
|
"peerDependencies": {
|
|
57
|
-
"@promptbook/core": "0.81.0-
|
|
57
|
+
"@promptbook/core": "0.81.0-12"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
60
|
"colors": "1.4.0",
|
package/umd/index.umd.js
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
* @generated
|
|
25
25
|
* @see https://github.com/webgptorg/promptbook
|
|
26
26
|
*/
|
|
27
|
-
var PROMPTBOOK_ENGINE_VERSION = '0.81.0-
|
|
27
|
+
var PROMPTBOOK_ENGINE_VERSION = '0.81.0-11';
|
|
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
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { really_unknown } from '../../../utils/organization/really_unknown';
|
|
2
|
-
/**
|
|
3
|
-
* Converts anything to string that can be used for debugging and logging
|
|
4
|
-
*
|
|
5
|
-
* @param value String value for logging
|
|
6
|
-
* @private internal util
|
|
7
|
-
*/
|
|
8
|
-
export declare function unknownToString(value: really_unknown): string;
|