@promptbook/markdown-utils 0.89.0-3 → 0.89.0-5
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/esm/index.es.js +1 -1
- package/esm/typings/src/_packages/types.index.d.ts +2 -0
- package/esm/typings/src/remote-server/RemoteServer.d.ts +23 -0
- package/esm/typings/src/remote-server/startRemoteServer.d.ts +2 -2
- package/esm/typings/src/utils/organization/TODO_narrow.d.ts +6 -0
- package/package.json +1 -1
- package/umd/index.umd.js +1 -1
package/esm/index.es.js
CHANGED
|
@@ -25,7 +25,7 @@ const BOOK_LANGUAGE_VERSION = '1.0.0';
|
|
|
25
25
|
* @generated
|
|
26
26
|
* @see https://github.com/webgptorg/promptbook
|
|
27
27
|
*/
|
|
28
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.89.0-
|
|
28
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.89.0-5';
|
|
29
29
|
/**
|
|
30
30
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
31
31
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -112,6 +112,7 @@ import type { components } from '../playground/brjapp-api-schema';
|
|
|
112
112
|
import type { $defs } from '../playground/brjapp-api-schema';
|
|
113
113
|
import type { operations } from '../playground/brjapp-api-schema';
|
|
114
114
|
import type { PrepareAndScrapeOptions } from '../prepare/PrepareAndScrapeOptions';
|
|
115
|
+
import type { RemoteServer } from '../remote-server/RemoteServer';
|
|
115
116
|
import type { PromptbookServer_Identification } from '../remote-server/socket-types/_subtypes/PromptbookServer_Identification';
|
|
116
117
|
import type { PromptbookServer_ApplicationIdentification } from '../remote-server/socket-types/_subtypes/PromptbookServer_Identification';
|
|
117
118
|
import type { PromptbookServer_AnonymousIdentification } from '../remote-server/socket-types/_subtypes/PromptbookServer_Identification';
|
|
@@ -401,6 +402,7 @@ export type { components };
|
|
|
401
402
|
export type { $defs };
|
|
402
403
|
export type { operations };
|
|
403
404
|
export type { PrepareAndScrapeOptions };
|
|
405
|
+
export type { RemoteServer };
|
|
404
406
|
export type { PromptbookServer_Identification };
|
|
405
407
|
export type { PromptbookServer_ApplicationIdentification };
|
|
406
408
|
export type { PromptbookServer_AnonymousIdentification };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import type { IDestroyable } from 'destroyable';
|
|
3
|
+
import express from 'express';
|
|
4
|
+
import http from 'http';
|
|
5
|
+
import { DefaultEventsMap, Server } from 'socket.io';
|
|
6
|
+
import type { TODO_any } from '../utils/organization/TODO_any';
|
|
7
|
+
import type { TODO_narrow } from '../utils/organization/TODO_narrow';
|
|
8
|
+
export type RemoteServer = IDestroyable & {
|
|
9
|
+
/**
|
|
10
|
+
* HTTP server instance
|
|
11
|
+
*/
|
|
12
|
+
readonly httpServer: http.Server<TODO_any>;
|
|
13
|
+
/**
|
|
14
|
+
* Express application instance
|
|
15
|
+
*
|
|
16
|
+
* Note: This is useful for adding custom routes
|
|
17
|
+
*/
|
|
18
|
+
readonly expressApp: express.Express;
|
|
19
|
+
/**
|
|
20
|
+
* Socket.io server instance
|
|
21
|
+
*/
|
|
22
|
+
readonly socketIoServer: Server<TODO_narrow<DefaultEventsMap>, TODO_narrow<DefaultEventsMap>, TODO_narrow<DefaultEventsMap>, TODO_any>;
|
|
23
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { RemoteServer } from './RemoteServer';
|
|
2
2
|
import type { RemoteServerOptions } from './types/RemoteServerOptions';
|
|
3
3
|
/**
|
|
4
4
|
* Remote server is a proxy server that uses its execution tools internally and exposes the executor interface externally.
|
|
@@ -9,7 +9,7 @@ import type { RemoteServerOptions } from './types/RemoteServerOptions';
|
|
|
9
9
|
* @see https://github.com/webgptorg/promptbook#remote-server
|
|
10
10
|
* @public exported from `@promptbook/remote-server`
|
|
11
11
|
*/
|
|
12
|
-
export declare function startRemoteServer<TCustomOptions = undefined>(options: RemoteServerOptions<TCustomOptions>):
|
|
12
|
+
export declare function startRemoteServer<TCustomOptions = undefined>(options: RemoteServerOptions<TCustomOptions>): RemoteServer;
|
|
13
13
|
/**
|
|
14
14
|
* TODO: !! Add CORS and security - probbably via `helmet`
|
|
15
15
|
* TODO: [👩🏾🤝🧑🏾] Allow to pass custom fetch function here - PromptbookFetch
|
package/package.json
CHANGED
package/umd/index.umd.js
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
* @generated
|
|
26
26
|
* @see https://github.com/webgptorg/promptbook
|
|
27
27
|
*/
|
|
28
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.89.0-
|
|
28
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.89.0-5';
|
|
29
29
|
/**
|
|
30
30
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
31
31
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|