@promptbook/remote-client 0.85.0-0 → 0.85.0-1
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 +2 -2
- package/esm/index.es.js.map +1 -1
- 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/package.json +2 -2
- package/umd/index.umd.js +6 -6
- package/umd/index.umd.js.map +1 -1
|
@@ -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
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/remote-client",
|
|
3
|
-
"version": "0.85.0-
|
|
3
|
+
"version": "0.85.0-1",
|
|
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-client.index.d.ts",
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@promptbook/core": "0.85.0-
|
|
50
|
+
"@promptbook/core": "0.85.0-1"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"crypto-js": "4.2.0",
|
package/umd/index.umd.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('spacetrim'), require('socket.io-client'), require('crypto-js'), require('crypto-js/enc-hex'), require('papaparse'), require('path')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', 'spacetrim', 'socket.io-client', 'crypto-js', 'crypto-js/enc-hex', 'papaparse', 'path'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["promptbook-remote-client"] = {}, global.spaceTrim, global.socket_ioClient, global.cryptoJs, global.hexEncoder, global.papaparse, global.
|
|
5
|
-
})(this, (function (exports, spaceTrim, socket_ioClient, cryptoJs, hexEncoder, papaparse,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('spacetrim'), require('socket.io-client'), require('crypto-js'), require('crypto-js/enc-hex'), require('papaparse'), require('node:path')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', 'spacetrim', 'socket.io-client', 'crypto-js', 'crypto-js/enc-hex', 'papaparse', 'node:path'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["promptbook-remote-client"] = {}, global.spaceTrim, global.socket_ioClient, global.cryptoJs, global.hexEncoder, global.papaparse, global.node_path));
|
|
5
|
+
})(this, (function (exports, spaceTrim, socket_ioClient, cryptoJs, hexEncoder, papaparse, node_path) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
* @generated
|
|
24
24
|
* @see https://github.com/webgptorg/promptbook
|
|
25
25
|
*/
|
|
26
|
-
var PROMPTBOOK_ENGINE_VERSION = '0.
|
|
26
|
+
var PROMPTBOOK_ENGINE_VERSION = '0.85.0-0';
|
|
27
27
|
/**
|
|
28
28
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
29
29
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -4957,7 +4957,7 @@
|
|
|
4957
4957
|
value = value.replace(/\.html$/, '');
|
|
4958
4958
|
}
|
|
4959
4959
|
else if (isValidFilePath(value)) {
|
|
4960
|
-
value =
|
|
4960
|
+
value = node_path.basename(value);
|
|
4961
4961
|
// Note: Keeping extension in the name
|
|
4962
4962
|
}
|
|
4963
4963
|
value = value.split('/').join('-');
|