@wenlarge/communication 1.1.13 → 1.1.14

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,11 +1,13 @@
1
1
  import { DynamicModule } from "@nestjs/common";
2
2
  export declare const EXECUTOR_HTTP_GRPC_CLIENT = "EXECUTOR_HTTP_GRPC_CLIENT";
3
+ export declare const EXECUTOR_WEBHOOK_GRPC_CLIENT = "EXECUTOR_WEBHOOK_GRPC_CLIENT";
3
4
  export interface GrpcClientModuleOptions {
4
5
  authServiceUrl: string;
5
6
  projectServiceUrl: string;
6
7
  workflowServiceUrl: string;
7
8
  executorCoreServiceUrl: string;
8
9
  executorHttpServiceUrl: string;
10
+ executorWebhookServiceUrl: string;
9
11
  }
10
12
  export declare class GrpcClientModule {
11
13
  static forRoot(options: GrpcClientModuleOptions): DynamicModule;
@@ -38,7 +38,7 @@ var __setFunctionName = (this && this.__setFunctionName) || function (f, name, p
38
38
  return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
39
39
  };
40
40
  Object.defineProperty(exports, "__esModule", { value: true });
41
- exports.GrpcClientModule = exports.EXECUTOR_HTTP_GRPC_CLIENT = void 0;
41
+ exports.GrpcClientModule = exports.EXECUTOR_WEBHOOK_GRPC_CLIENT = exports.EXECUTOR_HTTP_GRPC_CLIENT = void 0;
42
42
  const common_1 = require("@nestjs/common");
43
43
  const microservices_1 = require("@nestjs/microservices");
44
44
  const path_1 = require("path");
@@ -51,6 +51,7 @@ const workflow_config_1 = require("../config/workflow-config");
51
51
  const executor_core_1 = require("../generated/executor-core");
52
52
  const executor_core_config_1 = require("../config/executor-core-config");
53
53
  exports.EXECUTOR_HTTP_GRPC_CLIENT = "EXECUTOR_HTTP_GRPC_CLIENT";
54
+ exports.EXECUTOR_WEBHOOK_GRPC_CLIENT = "EXECUTOR_WEBHOOK_GRPC_CLIENT";
54
55
  let GrpcClientModule = (() => {
55
56
  let _classDecorators = [(0, common_1.Module)({})];
56
57
  let _classDescriptor;
@@ -58,7 +59,7 @@ let GrpcClientModule = (() => {
58
59
  let _classThis;
59
60
  var GrpcClientModule = _classThis = class {
60
61
  static forRoot(options) {
61
- var _a;
62
+ var _a, _b;
62
63
  return {
63
64
  module: GrpcClientModule,
64
65
  global: true,
@@ -144,6 +145,22 @@ let GrpcClientModule = (() => {
144
145
  },
145
146
  },
146
147
  },
148
+ {
149
+ name: exports.EXECUTOR_WEBHOOK_GRPC_CLIENT,
150
+ transport: microservices_1.Transport.GRPC,
151
+ options: {
152
+ package: executor_core_1.EXECUTOR_CORE_PACKAGE_NAME,
153
+ protoPath: executor_core_config_1.EXECUTOR_CORE_PROTO_PATH.map((p) => (0, path_1.join)(__dirname, "../../" + p)),
154
+ url: (_b = options.executorWebhookServiceUrl) !== null && _b !== void 0 ? _b : options.executorCoreServiceUrl,
155
+ loader: {
156
+ keepCase: true,
157
+ longs: String,
158
+ enums: String,
159
+ defaults: true,
160
+ oneofs: true,
161
+ },
162
+ },
163
+ },
147
164
  ]),
148
165
  ],
149
166
  exports: [microservices_1.ClientsModule],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wenlarge/communication",
3
- "version": "1.1.13",
3
+ "version": "1.1.14",
4
4
  "description": "Shared gRPC proto interfaces and generated clients for Wenlarge microservices.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",