@tdxvolt/volt-client-grpc 0.18.4 → 0.18.5

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/lib/index.cjs CHANGED
@@ -12,7 +12,6 @@ var path = require('path');
12
12
  var Protobuf = require('protobufjs');
13
13
  var camelCase = require('lodash.camelcase');
14
14
  var descriptor = require('protobufjs/ext/descriptor/index.js');
15
- var IdempotencyLevel = require('@grpc/proto-loader');
16
15
  var bent = require('bent');
17
16
  var jwt = require('jsonwebtoken');
18
17
  var uuid = require('uuid');
@@ -28,7 +27,6 @@ var path__default = /*#__PURE__*/_interopDefaultLegacy(path);
28
27
  var Protobuf__default = /*#__PURE__*/_interopDefaultLegacy(Protobuf);
29
28
  var camelCase__default = /*#__PURE__*/_interopDefaultLegacy(camelCase);
30
29
  var descriptor__default = /*#__PURE__*/_interopDefaultLegacy(descriptor);
31
- var IdempotencyLevel__default = /*#__PURE__*/_interopDefaultLegacy(IdempotencyLevel);
32
30
  var bent__default = /*#__PURE__*/_interopDefaultLegacy(bent);
33
31
  var jwt__default = /*#__PURE__*/_interopDefaultLegacy(jwt);
34
32
 
@@ -362,7 +360,7 @@ const {
362
360
  publicKeyToPem: publicKeyToPem$2
363
361
  } = js.voltUtils;
364
362
 
365
- const log$6 = debug__default["default"]("volt-client-grpc:volt-credential");
363
+ const log$5 = debug__default["default"]("volt-client-grpc:volt-credential");
366
364
 
367
365
  class VoltCredential {
368
366
  constructor(config, configPath) {
@@ -456,13 +454,13 @@ class VoltCredential {
456
454
  createKey() {
457
455
  if (this._cryptoCache.key) {
458
456
  // Already have key data in the cache in pem format => create fully-formed pki instances.
459
- log$6("createKey - key already exists");
457
+ log$5("createKey - key already exists");
460
458
  return Promise.resolve(this.getKey());
461
459
  } else {
462
- log$6("creating key");
460
+ log$5("creating key");
463
461
  this._cryptoCache.key = JSON.parse(createSigningKey()).private_pem;
464
462
  const key = keyFromPem$2(this._cryptoCache.key);
465
- log$6("successfully created key");
463
+ log$5("successfully created key");
466
464
  return Promise.resolve(key);
467
465
  }
468
466
  }
@@ -479,7 +477,7 @@ class VoltCredential {
479
477
  return this._cryptoCache;
480
478
  })
481
479
  .catch((err) => {
482
- log$6("failure initialising crypto [%s]", err.message);
480
+ log$5("failure initialising crypto [%s]", err.message);
483
481
  return Promise.reject(err);
484
482
  });
485
483
  }
@@ -544,6 +542,8 @@ class VoltCredential {
544
542
  *
545
543
  */
546
544
 
545
+ const IDEMPOTENCY_UNKNOWN = "IDEMPOTENCY_UNKNOWN";
546
+
547
547
  const descriptorOptions = {
548
548
  longs: String,
549
549
  enums: String,
@@ -619,7 +619,7 @@ function mapMethodOptions(options) {
619
619
  },
620
620
  {
621
621
  deprecated: false,
622
- idempotency_level: IdempotencyLevel__default["default"].IDEMPOTENCY_UNKNOWN,
622
+ idempotency_level: IDEMPOTENCY_UNKNOWN,
623
623
  uninterpreted_option: []
624
624
  }
625
625
  );
@@ -3693,7 +3693,7 @@ message SubscribeWireResponse {
3693
3693
  `;
3694
3694
  const voltProtos = [sqlite, sqlite_database_api, sqlite_server_api, proxy_api, relay_api, sync, discovery_api, file, file_api, remote, spark_api, ssi, ssi_api, status, terminal_api, volt, volt_api, wire_api];
3695
3695
 
3696
- const log$5 = debug__default["default"]("volt-client-grpc:proto-utils");
3696
+ debug__default["default"]("volt-client-grpc:proto-utils");
3697
3697
 
3698
3698
  const voltServices = [
3699
3699
  constants.serviceType.voltAPI,
@@ -3718,7 +3718,6 @@ function getServiceDescriptors(service) {
3718
3718
  let root = new Protobuf__default["default"].Root();
3719
3719
  for (let protoFile of service.service_description.proto_file) {
3720
3720
  Protobuf__default["default"].parse(protoFile.protobuf, root, defaultLoaderOptions);
3721
- log$5("parsed proto file %s", protoFile.file_path);
3722
3721
  }
3723
3722
 
3724
3723
  // Create a package definition from the root object.
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.18.4",
6
+ "version": "0.18.5",
7
7
  "description": "tdx Volt library for nodejs clients",
8
8
  "type": "module",
9
9
  "exports": {
@@ -37,7 +37,6 @@
37
37
  "author": "toby.ealden@gmail.com",
38
38
  "license": "ISC",
39
39
  "dependencies": {
40
- "@grpc/proto-loader": "^0.7.13",
41
40
  "@tdxvolt/volt-client-web": "^0.18.1",
42
41
  "bent": "^7.3.12",
43
42
  "builtin-modules": "^3.3.0",
@@ -17,7 +17,8 @@
17
17
  import camelCase from "lodash.camelcase";
18
18
  import Protobuf from "protobufjs";
19
19
  import descriptor from "protobufjs/ext/descriptor/index.js";
20
- import IdempotencyLevel from "@grpc/proto-loader";
20
+
21
+ const IDEMPOTENCY_UNKNOWN = "IDEMPOTENCY_UNKNOWN";
21
22
 
22
23
  const descriptorOptions = {
23
24
  longs: String,
@@ -94,7 +95,7 @@ function mapMethodOptions(options) {
94
95
  },
95
96
  {
96
97
  deprecated: false,
97
- idempotency_level: IdempotencyLevel.IDEMPOTENCY_UNKNOWN,
98
+ idempotency_level: IDEMPOTENCY_UNKNOWN,
98
99
  uninterpreted_option: []
99
100
  }
100
101
  );
@@ -29,7 +29,6 @@ function getServiceDescriptors(service) {
29
29
  let root = new protobuf.Root();
30
30
  for (let protoFile of service.service_description.proto_file) {
31
31
  protobuf.parse(protoFile.protobuf, root, defaultLoaderOptions);
32
- log("parsed proto file %s", protoFile.file_path);
33
32
  }
34
33
 
35
34
  // Create a package definition from the root object.