@dashevo/dapi-grpc 0.21.1 → 0.22.0-dev.3

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/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ # [0.21.1](https://github.com/dashevo/dapi-grpc/compare/v0.20.0...v0.21.0) (2021-10-12)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * cannot read properties of undefined (reading 'MethodInfo') ([#152](https://github.com/dashevo/dapi-grpc/pull/152))
7
+
8
+
9
+
1
10
  # [0.21.0](https://github.com/dashevo/dapi-grpc/compare/v0.20.0...v0.21.0) (2021-10-12)
2
11
 
3
12
 
package/browser.js CHANGED
@@ -2,9 +2,9 @@ const core = require('./clients/core/v0/web/core_grpc_web_pb');
2
2
  const platform = require('./clients/platform/v0/web/platform_grpc_web_pb');
3
3
 
4
4
  module.exports = {
5
- v0: Object.assign(
6
- { },
7
- core,
8
- platform,
9
- ),
5
+ v0: {
6
+
7
+ ...core,
8
+ ...platform,
9
+ },
10
10
  };
package/node.js CHANGED
@@ -34,13 +34,15 @@ const {
34
34
  module.exports = {
35
35
  getCoreDefinition,
36
36
  getPlatformDefinition,
37
- v0: Object.assign({
37
+ v0: {
38
38
  CorePromiseClient,
39
39
  PlatformPromiseClient,
40
- pbjs: Object.assign(
41
- {},
42
- pbjsCoreMessages,
43
- pbjsPlatformMessages,
44
- ),
45
- }, protocCoreMessages, protocPlatformMessages),
40
+ pbjs: {
41
+
42
+ ...pbjsCoreMessages,
43
+ ...pbjsPlatformMessages,
44
+ },
45
+ ...protocCoreMessages,
46
+ ...protocPlatformMessages,
47
+ },
46
48
  };
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@dashevo/dapi-grpc",
3
- "version": "0.21.1",
3
+ "version": "0.22.0-dev.3",
4
4
  "description": "DAPI GRPC definition file and generated clients",
5
5
  "browser": "browser.js",
6
6
  "main": "node.js",
7
7
  "scripts": {
8
- "build": "scripts/build.sh",
8
+ "build": "yarn exec scripts/build.sh",
9
9
  "lint": "eslint .",
10
- "prepublishOnly": "npm run build",
11
- "test": "npm run test:unit",
10
+ "prepublishOnly": "yarn run build",
11
+ "test": "yarn run test:unit",
12
12
  "test:unit": "mocha './test/unit/**/*.spec.js'"
13
13
  },
14
14
  "contributors": [
@@ -33,22 +33,23 @@
33
33
  },
34
34
  "homepage": "https://github.com/dashevo/dapi-grpc#readme",
35
35
  "dependencies": {
36
- "@dashevo/grpc-common": "^0.5.4",
37
- "@grpc/grpc-js": "^1.3.6",
36
+ "@dashevo/grpc-common": "~0.22.0-dev.3",
37
+ "@grpc/grpc-js": "^1.3.7",
38
38
  "google-protobuf": "^3.12.2",
39
39
  "grpc-web": "1.2.1",
40
+ "long": "^5.2.0",
40
41
  "protobufjs": "github:jawid-h/protobuf.js#fix/buffer-conversion"
41
42
  },
42
43
  "devDependencies": {
43
- "chai": "^4.2.0",
44
+ "chai": "^4.3.4",
44
45
  "chai-as-promised": "^7.1.1",
45
46
  "dirty-chai": "^2.0.1",
46
- "eslint": "^5.16.0",
47
- "eslint-config-airbnb-base": "^13.2.0",
48
- "eslint-plugin-import": "^2.21.1",
49
- "mocha": "^7.2.0",
47
+ "eslint": "^7.32.0",
48
+ "eslint-config-airbnb-base": "^14.2.1",
49
+ "eslint-plugin-import": "^2.24.2",
50
+ "mocha": "^9.1.2",
50
51
  "mocha-sinon": "^2.1.2",
51
- "sinon": "^7.5.0",
52
- "sinon-chai": "^3.5.0"
52
+ "sinon": "^11.1.2",
53
+ "sinon-chai": "^3.7.0"
53
54
  }
54
- }
55
+ }
package/scripts/build.sh CHANGED
@@ -43,7 +43,7 @@ rm -rf "$CORE_CLIENTS_PATH/nodejs/*_pbjs.js"
43
43
  cp "$CORE_WEB_OUT_PATH/core_pb.js" "$CORE_CLIENTS_PATH/nodejs/core_protoc.js"
44
44
 
45
45
  # Generate node message classes
46
- $PWD/node_modules/protobufjs/bin/pbjs \
46
+ pbjs \
47
47
  -t static-module \
48
48
  -w commonjs \
49
49
  -r core_root \
@@ -73,7 +73,7 @@ rm -rf "$PLATFORM_CLIENTS_PATH/nodejs/*_pbjs.js"
73
73
 
74
74
  cp "$PLATFORM_WEB_OUT_PATH/platform_pb.js" "$PLATFORM_CLIENTS_PATH/nodejs/platform_protoc.js"
75
75
 
76
- $PWD/node_modules/protobufjs/bin/pbjs \
76
+ pbjs \
77
77
  -t static-module \
78
78
  -w commonjs \
79
79
  -r platform_root \
@@ -1,4 +1,4 @@
1
- const { v0: { CorePromiseClient } } = require('../../../../../../');
1
+ const { v0: { CorePromiseClient } } = require('../../../../../..');
2
2
 
3
3
  describe('CorePromiseClient', () => {
4
4
  let corePromiseClient;
@@ -1,4 +1,4 @@
1
- const { v0: { PlatformPromiseClient } } = require('../../../../../../');
1
+ const { v0: { PlatformPromiseClient } } = require('../../../../../..');
2
2
 
3
3
  describe('PlatformPromiseClient', () => {
4
4
  let platformPromiseClient;
package/.editorconfig DELETED
@@ -1,9 +0,0 @@
1
- root = true
2
-
3
- [*]
4
- indent_style = space
5
- indent_size = 2
6
- charset = utf-8
7
- trim_trailing_whitespace = true
8
- insert_final_newline = true
9
- end_of_line = lf
@@ -1,38 +0,0 @@
1
- ---
2
- name: Bug report
3
- about: Create a report to help us improve
4
- title: ''
5
- labels: 'bug'
6
- assignees: ''
7
-
8
- ---
9
-
10
- <!--- Provide a general summary of the issue in the Title above -->
11
-
12
- ## Expected Behavior
13
- <!--- Tell us what should happen -->
14
-
15
- ## Current Behavior
16
- <!--- Tell us what happens instead of the expected behavior -->
17
-
18
- ## Possible Solution
19
- <!--- Not obligatory, but suggest a fix/reason for the bug -->
20
-
21
- ## Steps to Reproduce (for bugs)
22
- <!--- Provide a link to a live example, or an unambiguous set of steps to -->
23
- <!--- reproduce this bug. Include code to reproduce, if relevant -->
24
- 1.
25
- 2.
26
- 3.
27
- 4.
28
-
29
- ## Context
30
- <!--- How has this issue affected you? What are you trying to accomplish? -->
31
- <!--- Providing context helps us come up with a solution that is most useful in the real world -->
32
-
33
- ## Your Environment
34
- <!--- Include as many relevant details about the environment you experienced the bug in -->
35
- * Version used:
36
- * Environment name and version (e.g. Chrome 39, node.js 5.4):
37
- * Operating System and version (desktop, server, or mobile):
38
- * Link to your project:
@@ -1,27 +0,0 @@
1
- ---
2
- name: Feature request
3
- about: Suggest an idea for this project
4
- title: ''
5
- labels: 'enhancement'
6
- assignees: ''
7
-
8
- ---
9
-
10
- <!--- Provide a general summary of the feature request in the Title above -->
11
-
12
- ## Expected Behavior
13
- <!--- A clear and concise description of what you want to happen -->
14
-
15
- ## Current Behavior
16
- <!--- Explain the difference from current behavior -->
17
-
18
- ## Possible Solution
19
- <!--- Suggest ideas of how to implement the addition or change -->
20
-
21
- ## Alternatives Considered
22
- <!--- A clear and concise description of any alternative solutions or features you've considered -->
23
-
24
- ## Additional Context
25
- <!--- Add any other context or screenshots about the feature request here. -->
26
-
27
-
@@ -1,32 +0,0 @@
1
- <!--- Provide a general summary of your changes in the Title above -->
2
- <!--- Pull request titles must use the [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/#summary) format -->
3
-
4
- ## Issue being fixed or feature implemented
5
- <!--- Why is this change required? What problem does it solve? -->
6
- <!--- If it fixes an open issue, please link to the issue here. -->
7
-
8
-
9
- ## What was done?
10
- <!--- Describe your changes in detail -->
11
-
12
-
13
- ## How Has This Been Tested?
14
- <!--- Please describe in detail how you tested your changes. -->
15
- <!--- Include details of your testing environment, and the tests you ran to -->
16
- <!--- see how your change affects other areas of the code, etc. -->
17
-
18
-
19
- ## Breaking Changes
20
- <!--- Please describe any breaking changes your code introduces and verify that -->
21
- <!--- the title includes "!" following the conventional commit type (e.g. "feat!: ..."-->
22
-
23
-
24
- ## Checklist:
25
- <!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
26
- - [ ] I have performed a self-review of my own code
27
- - [ ] I have commented my code, particularly in hard-to-understand areas
28
- - [ ] I have added or updated relevant unit/integration/functional/e2e tests
29
- - [ ] I have made corresponding changes to the documentation
30
-
31
- **For repository code-owners and collaborators only**
32
- - [ ] I have assigned this pull request to a milestone
@@ -1,95 +0,0 @@
1
- name: Test and Release
2
-
3
- on:
4
- workflow_dispatch:
5
- schedule:
6
- - cron: '49 */160 * * *'
7
- release:
8
- types:
9
- - published
10
- pull_request:
11
- branches:
12
- - master
13
- - v[0-9]+.[0-9]+-dev
14
-
15
- jobs:
16
- test:
17
- name: Run DAPI GRPC tests
18
- runs-on: ubuntu-20.04
19
- timeout-minutes: 10
20
- steps:
21
- - uses: actions/checkout@v2
22
-
23
- - uses: actions/setup-node@v2
24
- with:
25
- node-version: '16'
26
-
27
- - name: Enable NPM cache
28
- uses: actions/cache@v2
29
- with:
30
- path: '~/.npm'
31
- key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
32
- restore-keys: |
33
- ${{ runner.os }}-node-
34
-
35
- - name: Check NPM package lock version is updated
36
- uses: dashevo/gh-action-check-package-lock@v1
37
-
38
- - name: Install NPM dependencies
39
- run: npm ci
40
-
41
- - name: Run build
42
- run: npm run build
43
-
44
- - name: Run ESLinter
45
- run: npm run lint
46
-
47
- - name: Run tests
48
- run: npm run test
49
-
50
- release:
51
- name: Release NPM package
52
- runs-on: ubuntu-20.04
53
- needs: test
54
- if: ${{ github.event_name == 'release' }}
55
- steps:
56
- - uses: actions/checkout@v2
57
-
58
- - uses: actions/setup-node@v2
59
- with:
60
- node-version: '16'
61
-
62
- - name: Check package version matches tag
63
- uses: geritol/match-tag-to-package-version@0.1.0
64
- env:
65
- TAG_PREFIX: refs/tags/v
66
-
67
- - name: Enable NPM cache
68
- uses: actions/cache@v2
69
- with:
70
- path: '~/.npm'
71
- key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
72
- restore-keys: |
73
- ${{ runner.os }}-node-
74
-
75
- - name: Install NPM dependencies
76
- run: npm ci
77
-
78
- - name: Run build
79
- run: npm run build
80
-
81
- - name: Set release tag
82
- uses: actions/github-script@v3
83
- id: tag
84
- with:
85
- result-encoding: string
86
- script: |
87
- const tag = context.payload.release.tag_name;
88
- const [, major, minor] = tag.match(/^v([0-9]+)\.([0-9]+)/);
89
- return (tag.includes('dev') ? `${major}.${minor}-dev` : 'latest');
90
-
91
- - name: Publish NPM package
92
- uses: JS-DevTools/npm-publish@v1
93
- with:
94
- token: ${{ secrets.NPM_TOKEN }}
95
- tag: ${{ steps.tag.outputs.result }}