@cityofzion/bs-electron 0.1.0 → 0.1.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/dist/utils.js CHANGED
@@ -15,7 +15,9 @@ function getPropertiesAndMethods(object) {
15
15
  const keyString = String(key);
16
16
  if (typeof object[key] === 'function') {
17
17
  try {
18
- const funcResponse = object[key].call(object, {});
18
+ // Get the number of parameters of the function to call it with empty objects
19
+ const params = Array.from({ length: object[key].length }, () => ({}));
20
+ const funcResponse = object[key].call(object, ...params);
19
21
  if (funcResponse instanceof Promise) {
20
22
  funcResponse.catch(() => { }).then(() => { });
21
23
  asyncMethods.add(keyString);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cityofzion/bs-electron",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "repository": "https://github.com/CityOfZion/blockchain-services",
5
5
  "author": "Coz",
6
6
  "license": "MIT",
@@ -9,7 +9,6 @@
9
9
  ],
10
10
  "dependencies": {
11
11
  "lodash.clonedeep": "~4.5.0",
12
- "cpy-cli": "~5.0.0",
13
12
  "@cityofzion/blockchain-service": "0.11.0"
14
13
  },
15
14
  "devDependencies": {
@@ -26,7 +25,7 @@
26
25
  "@electron-toolkit/preload": "*"
27
26
  },
28
27
  "scripts": {
29
- "build": "tsc && cpy package.json dist/",
28
+ "build": "tsc",
30
29
  "lint": "eslint .",
31
30
  "format": "eslint --fix"
32
31
  }
package/dist/package.json DELETED
@@ -1,33 +0,0 @@
1
- {
2
- "name": "@cityofzion/bs-electron",
3
- "version": "0.1.0",
4
- "repository": "https://github.com/CityOfZion/blockchain-services",
5
- "author": "Coz",
6
- "license": "MIT",
7
- "files": [
8
- "/dist"
9
- ],
10
- "scripts": {
11
- "build": "tsc && cpy package.json dist/",
12
- "lint": "eslint .",
13
- "format": "eslint --fix"
14
- },
15
- "dependencies": {
16
- "@cityofzion/blockchain-service": "workspace:*",
17
- "lodash.clonedeep": "~4.5.0",
18
- "cpy-cli": "~5.0.0"
19
- },
20
- "devDependencies": {
21
- "@types/node": "~20.2.5",
22
- "@typescript-eslint/eslint-plugin": "^6.5.0",
23
- "@typescript-eslint/parser": "^6.5.0",
24
- "eslint": "^8.48.0",
25
- "ts-node": "10.9.1",
26
- "typescript": "4.9.5",
27
- "@types/lodash.clonedeep": "~4.5.9"
28
- },
29
- "peerDependencies": {
30
- "electron": "*",
31
- "@electron-toolkit/preload": "*"
32
- }
33
- }