@promptbook/remote-server 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.
@@ -1,5 +1,5 @@
1
1
  /// <reference types="node" />
2
- import type fs from 'fs/promises';
2
+ import type fs from 'node:fs/promises';
3
3
  /**
4
4
  * Container for all the tools needed to manipulate with filesystem
5
5
  */
@@ -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
- * Path for the Socket.io server to listen
28
+ * Root path of the server
29
29
  *
30
- * @default '/socket.io'
31
- * @example '/promptbook/socket.io'
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 path: string_uri;
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-server",
3
- "version": "0.85.0-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-server.index.d.ts",
49
49
  "peerDependencies": {
50
- "@promptbook/core": "0.85.0-0"
50
+ "@promptbook/core": "0.85.0-1"
51
51
  },
52
52
  "dependencies": {
53
53
  "colors": "1.4.0",