@delight-rpc/child-process 0.4.1 → 0.4.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/README.md CHANGED
@@ -95,6 +95,7 @@ function createServer<IAPI extends object>(
95
95
  parameterValidators?: DelightRPC.ParameterValidators<IAPI>
96
96
  version?: `${number}.${number}.${number}`
97
97
  channel?: string
98
+ ownPropsOnly?: boolean
98
99
  }
99
100
  ): () => void
100
101
  ```
package/lib/server.d.ts CHANGED
@@ -1,8 +1,9 @@
1
1
  /// <reference types="node" />
2
2
  import * as DelightRPC from 'delight-rpc';
3
3
  import { ChildProcess } from 'child_process';
4
- export declare function createServer<IAPI extends object>(api: DelightRPC.ImplementationOf<IAPI>, process: ChildProcess | NodeJS.Process, { parameterValidators, version, channel }?: {
4
+ export declare function createServer<IAPI extends object>(api: DelightRPC.ImplementationOf<IAPI>, process: ChildProcess | NodeJS.Process, { parameterValidators, version, channel, ownPropsOnly }?: {
5
5
  parameterValidators?: DelightRPC.ParameterValidators<IAPI>;
6
6
  version?: `${number}.${number}.${number}`;
7
7
  channel?: string;
8
+ ownPropsOnly?: boolean;
8
9
  }): () => void;
package/lib/server.js CHANGED
@@ -26,7 +26,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.createServer = void 0;
27
27
  const DelightRPC = __importStar(require("delight-rpc"));
28
28
  const prelude_1 = require("@blackglory/prelude");
29
- function createServer(api, process, { parameterValidators, version, channel } = {}) {
29
+ function createServer(api, process, { parameterValidators, version, channel, ownPropsOnly } = {}) {
30
30
  process.on('message', handler);
31
31
  return () => process.off('message', handler);
32
32
  async function handler(req) {
@@ -34,7 +34,8 @@ function createServer(api, process, { parameterValidators, version, channel } =
34
34
  const result = await DelightRPC.createResponse(api, req, {
35
35
  parameterValidators,
36
36
  version,
37
- channel
37
+ channel,
38
+ ownPropsOnly
38
39
  });
39
40
  if ((0, prelude_1.isntNull)(result)) {
40
41
  process.send(result);
package/lib/server.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wDAAyC;AAEzC,iDAA8C;AAE9C,SAAgB,YAAY,CAC1B,GAAsC,EACtC,OAAsC,EACtC,EAAE,mBAAmB,EAAE,OAAO,EAAE,OAAO,KAInC,EAAE;IAEN,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,CAAC,CAAA;IAC9B,OAAO,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,CAAA;IAE5C,KAAK,UAAU,OAAO,CAAC,GAAQ;QAC7B,IAAI,UAAU,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,UAAU,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;YAC/D,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,cAAc,CAC5C,GAAG,EACH,GAAG,EACH;gBACE,mBAAmB;gBACnB,OAAO;gBACP,OAAO;aACR,CACF,CAAA;YAED,IAAI,IAAA,kBAAQ,EAAC,MAAM,CAAC,EAAE;gBACpB,OAAO,CAAC,IAAK,CAAC,MAAM,CAAC,CAAA;aACtB;SACF;IACH,CAAC;AACH,CAAC;AA7BD,oCA6BC"}
1
+ {"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wDAAyC;AAEzC,iDAA8C;AAE9C,SAAgB,YAAY,CAC1B,GAAsC,EACtC,OAAsC,EACtC,EAAE,mBAAmB,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY,KAKjD,EAAE;IAEN,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,CAAC,CAAA;IAC9B,OAAO,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,CAAA;IAE5C,KAAK,UAAU,OAAO,CAAC,GAAQ;QAC7B,IAAI,UAAU,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,UAAU,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;YAC/D,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,cAAc,CAC5C,GAAG,EACH,GAAG,EACH;gBACE,mBAAmB;gBACnB,OAAO;gBACP,OAAO;gBACP,YAAY;aACb,CACF,CAAA;YAED,IAAI,IAAA,kBAAQ,EAAC,MAAM,CAAC,EAAE;gBACpB,OAAO,CAAC,IAAK,CAAC,MAAM,CAAC,CAAA;aACtB;SACF;IACH,CAAC;AACH,CAAC;AA/BD,oCA+BC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@delight-rpc/child-process",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "files": [
@@ -30,21 +30,21 @@
30
30
  },
31
31
  "devDependencies": {
32
32
  "@blackglory/jest-matchers": "^0.3.1",
33
- "@commitlint/cli": "^16.2.4",
34
- "@commitlint/config-conventional": "^16.2.4",
35
- "@types/jest": "^27.5.0",
33
+ "@commitlint/cli": "^17.0.0",
34
+ "@commitlint/config-conventional": "^17.0.0",
35
+ "@types/jest": "^27.5.1",
36
36
  "@types/node": "14",
37
- "@typescript-eslint/eslint-plugin": "^5.22.0",
38
- "@typescript-eslint/parser": "^5.22.0",
37
+ "@typescript-eslint/eslint-plugin": "^5.25.0",
38
+ "@typescript-eslint/parser": "^5.25.0",
39
39
  "cross-env": "^7.0.3",
40
- "delight-rpc": "^4.0.0",
41
- "eslint": "8.15.0",
40
+ "delight-rpc": "^4.1.0",
41
+ "eslint": "8.16.0",
42
42
  "husky": "4",
43
43
  "jest": "^27.5.1",
44
44
  "npm-run-all": "^4.1.5",
45
45
  "return-style": "^1.0.0",
46
46
  "rimraf": "^3.0.2",
47
- "standard-version": "^9.3.2",
47
+ "standard-version": "^9.5.0",
48
48
  "ts-jest": "^27.1.4",
49
49
  "ts-node": "^10.7.0",
50
50
  "ts-patch": "^2.0.1",
@@ -55,9 +55,9 @@
55
55
  "@blackglory/errors": "^2.2.1",
56
56
  "@blackglory/prelude": "^0.1.1",
57
57
  "@delight-rpc/protocol": "^2.2.0",
58
- "extra-promise": "^1.0.2"
58
+ "extra-promise": "^2.0.0"
59
59
  },
60
60
  "peerDependencies": {
61
- "delight-rpc": "^4.0.0"
61
+ "delight-rpc": "^4.1.0"
62
62
  }
63
63
  }