@dashevo/dapi-grpc 3.1.0-dev.4 → 3.1.0-dev.6

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.
@@ -1,4 +1,11 @@
1
- const { promisify } = require('util');
1
+ // Inline promisify shim avoids requiring Node's `util` module so this file
2
+ // can be bundled for browsers without a polyfill. If the codegen template
3
+ // is regenerated, restore this shim.
4
+ function promisify(fn) {
5
+ return (...args) => new Promise((resolve, reject) => {
6
+ fn(...args, (err, result) => (err ? reject(err) : resolve(result)));
7
+ });
8
+ }
2
9
  const GrpcError = require('@dashevo/grpc-common/lib/server/error/GrpcError');
3
10
 
4
11
  const { CoreClient } = require('./core_pb_service');
@@ -1,5 +1,13 @@
1
1
  const { PlatformClient } = require('./platform_pb_service');
2
- const { promisify } = require('util');
2
+
3
+ // Inline promisify shim — avoids requiring Node's `util` module so this file
4
+ // can be bundled for browsers without a polyfill. If the codegen template
5
+ // is regenerated, restore this shim.
6
+ function promisify(fn) {
7
+ return (...args) => new Promise((resolve, reject) => {
8
+ fn(...args, (err, result) => (err ? reject(err) : resolve(result)));
9
+ });
10
+ }
3
11
 
4
12
  class PlatformPromiseClient {
5
13
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dashevo/dapi-grpc",
3
- "version": "3.1.0-dev.4",
3
+ "version": "3.1.0-dev.6",
4
4
  "description": "DAPI GRPC definition file and generated clients",
5
5
  "browser": "browser.js",
6
6
  "main": "node.js",
@@ -45,7 +45,7 @@
45
45
  },
46
46
  "homepage": "https://github.com/dashevo/dapi-grpc#readme",
47
47
  "dependencies": {
48
- "@dashevo/grpc-common": "3.1.0-dev.4",
48
+ "@dashevo/grpc-common": "3.1.0-dev.6",
49
49
  "@dashevo/protobufjs": "6.10.5",
50
50
  "@grpc/grpc-js": "^1.14.3",
51
51
  "@improbable-eng/grpc-web": "^0.15.0",