@citec-spbu/common 1.1.7 → 1.1.9

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.
@@ -2,13 +2,52 @@ export declare const GRPC_CLIENTS: {
2
2
  readonly AUTH_PACKAGE: {
3
3
  readonly package: "auth.v1";
4
4
  readonly protoPath: string;
5
+ readonly loader: {
6
+ readonly includeDirs: [string];
7
+ readonly keepCase?: boolean;
8
+ readonly alternateCommentMode?: boolean;
9
+ readonly longs?: Function;
10
+ readonly enums?: Function;
11
+ readonly bytes?: Function;
12
+ readonly defaults?: boolean;
13
+ readonly arrays?: boolean;
14
+ readonly objects?: boolean;
15
+ readonly oneofs?: boolean;
16
+ readonly json?: boolean;
17
+ };
5
18
  };
6
19
  readonly ACCOUNT_PACKAGE: {
7
20
  readonly package: "account.v1";
8
21
  readonly protoPath: string;
22
+ readonly loader: {
23
+ keepCase?: boolean;
24
+ alternateCommentMode?: boolean;
25
+ longs?: Function;
26
+ enums?: Function;
27
+ bytes?: Function;
28
+ defaults?: boolean;
29
+ arrays?: boolean;
30
+ objects?: boolean;
31
+ oneofs?: boolean;
32
+ json?: boolean;
33
+ includeDirs?: string[];
34
+ };
9
35
  };
10
36
  readonly USERS_PACKAGE: {
11
37
  readonly package: "users.v1";
12
38
  readonly protoPath: string;
39
+ readonly loader: {
40
+ keepCase?: boolean;
41
+ alternateCommentMode?: boolean;
42
+ longs?: Function;
43
+ enums?: Function;
44
+ bytes?: Function;
45
+ defaults?: boolean;
46
+ arrays?: boolean;
47
+ objects?: boolean;
48
+ oneofs?: boolean;
49
+ json?: boolean;
50
+ includeDirs?: string[];
51
+ };
13
52
  };
14
53
  };
@@ -1,21 +1,35 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  exports.GRPC_CLIENTS = void 0;
4
7
  const contracts_1 = require("@citec-spbu/contracts");
5
8
  const account_1 = require("@citec-spbu/contracts/gen/ts/account");
6
9
  const auth_1 = require("@citec-spbu/contracts/gen/ts/auth");
7
10
  const users_1 = require("@citec-spbu/contracts/gen/ts/users");
11
+ const node_path_1 = __importDefault(require("node:path"));
12
+ const grpcLoader = {
13
+ keepCase: false,
14
+ longs: String,
15
+ enums: String,
16
+ defaults: true,
17
+ oneofs: true
18
+ };
8
19
  exports.GRPC_CLIENTS = {
9
20
  AUTH_PACKAGE: {
10
21
  package: auth_1.AUTH_V1_PACKAGE_NAME,
11
- protoPath: contracts_1.PROTO_PATHS.AUTH
22
+ protoPath: contracts_1.PROTO_PATHS.AUTH,
23
+ loader: { ...grpcLoader, includeDirs: [node_path_1.default.dirname(contracts_1.PROTO_PATHS.ACCOUNT)] }
12
24
  },
13
25
  ACCOUNT_PACKAGE: {
14
26
  package: account_1.ACCOUNT_V1_PACKAGE_NAME,
15
- protoPath: contracts_1.PROTO_PATHS.ACCOUNT
27
+ protoPath: contracts_1.PROTO_PATHS.ACCOUNT,
28
+ loader: grpcLoader
16
29
  },
17
30
  USERS_PACKAGE: {
18
31
  package: users_1.USERS_V1_PACKAGE_NAME,
19
- protoPath: contracts_1.PROTO_PATHS.USERS
32
+ protoPath: contracts_1.PROTO_PATHS.USERS,
33
+ loader: grpcLoader
20
34
  }
21
35
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@citec-spbu/common",
3
- "version": "1.1.7",
3
+ "version": "1.1.9",
4
4
  "description": "Core shared components for microservices",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",