@typerighter/rpc-server 0.37.1 → 0.38.0

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.
Files changed (2) hide show
  1. package/index.js +3 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -26,11 +26,12 @@ function resolveBin() {
26
26
  const bin = resolveBin();
27
27
 
28
28
  export class RpcServer extends EventEmitter {
29
- constructor({ root, addr, port } = {}) {
29
+ constructor({ root, addr, port, fresh } = {}) {
30
30
  super();
31
31
  this._root = root ?? process.cwd();
32
32
  this._addr = addr ?? "127.0.0.1";
33
33
  this._port = port ?? 0;
34
+ this._fresh = fresh ?? false;
34
35
  this._process = undefined;
35
36
  this._listening = false;
36
37
  this._resolvedAddress = undefined;
@@ -68,6 +69,7 @@ export class RpcServer extends EventEmitter {
68
69
  TYPEDOWN_RPC_ROOT: this._root,
69
70
  TYPEDOWN_RPC_ADDR: this._addr,
70
71
  TYPEDOWN_RPC_PORT: String(this._port),
72
+ ...(this._fresh ? { TYPEDOWN_NO_CACHE: "1" } : {}),
71
73
  },
72
74
  stdio: ["ignore", "pipe", "inherit"],
73
75
  // Detach so the server can save its cache after Node exits
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package",
3
3
  "name": "@typerighter/rpc-server",
4
- "version": "0.37.1",
4
+ "version": "0.38.0",
5
5
  "description": "Typedown RPC server binary.",
6
6
  "repository": {
7
7
  "type": "git",