@promptbook/remote-server 0.85.0-0 → 0.85.0-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/esm/index.es.js +5653 -5599
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/_packages/utils.index.d.ts +2 -0
- package/esm/typings/src/execution/FilesystemTools.d.ts +1 -1
- package/esm/typings/src/remote-server/startRemoteServer.d.ts +2 -0
- package/esm/typings/src/remote-server/types/RemoteServerOptions.d.ts +6 -4
- package/esm/typings/src/utils/normalization/suffixUrl.d.ts +7 -0
- package/esm/typings/src/utils/normalization/suffixUrl.test.d.ts +1 -0
- package/package.json +2 -2
- package/umd/index.umd.js +5500 -5446
- package/umd/index.umd.js.map +1 -1
|
@@ -47,6 +47,7 @@ import { parseKeywords } from '../utils/normalization/parseKeywords';
|
|
|
47
47
|
import { parseKeywordsFromString } from '../utils/normalization/parseKeywordsFromString';
|
|
48
48
|
import { removeDiacritics } from '../utils/normalization/removeDiacritics';
|
|
49
49
|
import { searchKeywords } from '../utils/normalization/searchKeywords';
|
|
50
|
+
import { suffixUrl } from '../utils/normalization/suffixUrl';
|
|
50
51
|
import { titleToName } from '../utils/normalization/titleToName';
|
|
51
52
|
import { spaceTrim } from '../utils/organization/spaceTrim';
|
|
52
53
|
import { extractParameterNames } from '../utils/parameters/extractParameterNames';
|
|
@@ -128,6 +129,7 @@ export { parseKeywords };
|
|
|
128
129
|
export { parseKeywordsFromString };
|
|
129
130
|
export { removeDiacritics };
|
|
130
131
|
export { searchKeywords };
|
|
132
|
+
export { suffixUrl };
|
|
131
133
|
export { titleToName };
|
|
132
134
|
export { spaceTrim };
|
|
133
135
|
export { extractParameterNames };
|
|
@@ -11,6 +11,8 @@ import type { RemoteServerOptions } from './types/RemoteServerOptions';
|
|
|
11
11
|
*/
|
|
12
12
|
export declare function startRemoteServer<TCustomOptions = undefined>(options: RemoteServerOptions<TCustomOptions>): IDestroyable;
|
|
13
13
|
/**
|
|
14
|
+
* TODO: !!!!!!! CORS and security
|
|
15
|
+
* TODO: !!!!!!! Allow to pass tokem here
|
|
14
16
|
* TODO: [👩🏾🤝🧑🏾] Allow to pass custom fetch function here - PromptbookFetch
|
|
15
17
|
* TODO: Split this file into multiple functions - handler for each request
|
|
16
18
|
* TODO: Maybe use `$exportJson`
|
|
@@ -25,12 +25,14 @@ export type RemoteServerOptions<TCustomOptions> = CommonToolsOptions & {
|
|
|
25
25
|
*/
|
|
26
26
|
readonly port: number;
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* Root path of the server
|
|
29
29
|
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
30
|
+
* Note: This is useful when you reverse proxy the server without changing the path
|
|
31
|
+
*
|
|
32
|
+
* @default '/'
|
|
33
|
+
* @example '/api/promptbook/'
|
|
32
34
|
*/
|
|
33
|
-
readonly
|
|
35
|
+
readonly rootPath: string_uri;
|
|
34
36
|
} & (AnonymousRemoteServerOptions | ApplicationRemoteServerOptions<TCustomOptions> | (AnonymousRemoteServerOptions & ApplicationRemoteServerOptions<TCustomOptions>));
|
|
35
37
|
export type AnonymousRemoteServerOptions = {
|
|
36
38
|
/**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/remote-server",
|
|
3
|
-
"version": "0.85.0-
|
|
3
|
+
"version": "0.85.0-2",
|
|
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,
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"module": "./esm/index.es.js",
|
|
48
48
|
"typings": "./esm/typings/src/_packages/remote-server.index.d.ts",
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@promptbook/core": "0.85.0-
|
|
50
|
+
"@promptbook/core": "0.85.0-2"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"colors": "1.4.0",
|