@delight-rpc/electron 4.0.0 → 4.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/README.md CHANGED
@@ -248,6 +248,7 @@ function createServerInMain<IAPI extends object>(
248
248
  parameterValidators?: DelightRPC.ParameterValidators<IAPI>
249
249
  version?: `${number}.${number}.${number}`
250
250
  channel?: string
251
+ ownPropsOnly?: boolean
251
252
  }
252
253
  ): () => void
253
254
  ```
@@ -261,6 +262,7 @@ function createServerInRenderer<IAPI extends object>(
261
262
  parameterValidators?: DelightRPC.ParameterValidators<IAPI>
262
263
  version?: `${number}.${number}.${number}`
263
264
  channel?: string
265
+ ownPropsOnly?: boolean
264
266
  }
265
267
  ): () => void
266
268
  ```
package/lib/server.d.ts CHANGED
@@ -1,12 +1,14 @@
1
1
  import * as DelightRPC from 'delight-rpc';
2
2
  import Electron from 'electron';
3
- export declare function createServerInMain<IAPI extends object>(api: DelightRPC.ImplementationOf<IAPI>, port: Electron.MessagePortMain, { parameterValidators, version, channel }?: {
3
+ export declare function createServerInMain<IAPI extends object>(api: DelightRPC.ImplementationOf<IAPI>, port: Electron.MessagePortMain, { parameterValidators, version, channel, ownPropsOnly }?: {
4
4
  parameterValidators?: DelightRPC.ParameterValidators<IAPI>;
5
5
  version?: `${number}.${number}.${number}`;
6
6
  channel?: string;
7
+ ownPropsOnly?: boolean;
7
8
  }): () => void;
8
- export declare function createServerInRenderer<IAPI extends object>(api: DelightRPC.ImplementationOf<IAPI>, port: MessagePort, { parameterValidators, version, channel }?: {
9
+ export declare function createServerInRenderer<IAPI extends object>(api: DelightRPC.ImplementationOf<IAPI>, port: MessagePort, { parameterValidators, version, channel, ownPropsOnly }?: {
9
10
  parameterValidators?: DelightRPC.ParameterValidators<IAPI>;
10
11
  version?: `${number}.${number}.${number}`;
11
12
  channel?: string;
13
+ ownPropsOnly?: boolean;
12
14
  }): () => void;
package/lib/server.js CHANGED
@@ -26,7 +26,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.createServerInRenderer = exports.createServerInMain = void 0;
27
27
  const DelightRPC = __importStar(require("delight-rpc"));
28
28
  const prelude_1 = require("@blackglory/prelude");
29
- function createServerInMain(api, port, { parameterValidators, version, channel } = {}) {
29
+ function createServerInMain(api, port, { parameterValidators, version, channel, ownPropsOnly } = {}) {
30
30
  port.addListener('message', handler);
31
31
  return () => port.removeListener('message', handler);
32
32
  async function handler(event) {
@@ -35,7 +35,8 @@ function createServerInMain(api, port, { parameterValidators, version, channel }
35
35
  const result = await DelightRPC.createResponse(api, req, {
36
36
  parameterValidators,
37
37
  version,
38
- channel
38
+ channel,
39
+ ownPropsOnly
39
40
  });
40
41
  if ((0, prelude_1.isntNull)(result)) {
41
42
  port.postMessage(result);
@@ -44,7 +45,7 @@ function createServerInMain(api, port, { parameterValidators, version, channel }
44
45
  }
45
46
  }
46
47
  exports.createServerInMain = createServerInMain;
47
- function createServerInRenderer(api, port, { parameterValidators, version, channel } = {}) {
48
+ function createServerInRenderer(api, port, { parameterValidators, version, channel, ownPropsOnly } = {}) {
48
49
  port.addEventListener('message', handler);
49
50
  return () => port.removeEventListener('message', handler);
50
51
  async function handler(event) {
@@ -53,7 +54,8 @@ function createServerInRenderer(api, port, { parameterValidators, version, chann
53
54
  const result = await DelightRPC.createResponse(api, req, {
54
55
  parameterValidators,
55
56
  version,
56
- channel
57
+ channel,
58
+ ownPropsOnly
57
59
  });
58
60
  if ((0, prelude_1.isntNull)(result)) {
59
61
  port.postMessage(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,kBAAkB,CAChC,GAAsC,EACtC,IAA8B,EAC9B,EAAE,mBAAmB,EAAE,OAAO,EAAE,OAAO,KAInC,EAAE;IAEN,IAAI,CAAC,WA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KAAmB;QACxC,MAAM,GAAG,GAAG,KAAK,CAAC,IAAI,CAAA;QACtB,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,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAA;aACzB;SACF;IACH,CAAC;AACH,CAAC;AAhCD,wDAgCC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@delight-rpc/electron",
3
- "version": "4.0.0",
3
+ "version": "4.0.1",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "files": [
@@ -31,20 +31,20 @@
31
31
  },
32
32
  "devDependencies": {
33
33
  "@blackglory/jest-matchers": "^0.3.1",
34
- "@commitlint/cli": "^16.2.4",
35
- "@commitlint/config-conventional": "^16.2.4",
36
- "@types/jest": "^27.5.0",
37
- "@typescript-eslint/eslint-plugin": "^5.22.0",
38
- "@typescript-eslint/parser": "^5.22.0",
34
+ "@commitlint/cli": "^17.0.0",
35
+ "@commitlint/config-conventional": "^17.0.0",
36
+ "@types/jest": "^27.5.1",
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",
40
+ "delight-rpc": "^4.1.0",
41
41
  "electron": "^16.0.7",
42
- "eslint": "8.15.0",
42
+ "eslint": "8.16.0",
43
43
  "husky": "4",
44
44
  "jest": "^27.5.1",
45
45
  "npm-run-all": "^4.1.5",
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
  "tscpaths": "^0.0.9",
50
50
  "typescript": "^4.6.4"
@@ -53,10 +53,10 @@
53
53
  "@blackglory/errors": "^2.2.1",
54
54
  "@blackglory/prelude": "^0.1.1",
55
55
  "@delight-rpc/protocol": "^2.2.0",
56
- "extra-promise": "^1.0.2"
56
+ "extra-promise": "^2.0.0"
57
57
  },
58
58
  "peerDependencies": {
59
- "delight-rpc": "^4.0.0",
59
+ "delight-rpc": "^4.1.0",
60
60
  "electron": "^16.0.1"
61
61
  }
62
62
  }