@rayondigital/nest-dapr 0.9.6 → 0.9.7

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.
@@ -49,9 +49,17 @@ let DaprLoader = DaprLoader_1 = class DaprLoader {
49
49
  onApplicationBootstrap() {
50
50
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
51
51
  return __awaiter(this, void 0, void 0, function* () {
52
+ if (this.options.disabled) {
53
+ this.logger.log('Dapr server is disabled');
54
+ return;
55
+ }
52
56
  (0, nest_actor_manager_1.patchActorManagerForNest)(this.moduleRef, this.options.actorOptions);
53
57
  yield this.daprServer.actor.init();
54
58
  this.loadDaprHandlers();
59
+ if (this.options.serverPort === '0') {
60
+ this.logger.log('Dapr server will not be started');
61
+ return;
62
+ }
55
63
  this.logger.log('Starting Dapr server');
56
64
  yield this.daprServer.start();
57
65
  this.logger.log('Dapr server started');
@@ -9,6 +9,7 @@ export interface DaprModuleOptions {
9
9
  clientOptions?: DaprClientOptions;
10
10
  onError?: (name: string, topicName: string, error: any) => DaprPubSubStatusEnum;
11
11
  actorOptions?: DaprModuleActorOptions;
12
+ disabled?: boolean;
12
13
  }
13
14
  export interface DaprModuleActorOptions {
14
15
  prefix?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rayondigital/nest-dapr",
3
- "version": "0.9.6",
3
+ "version": "0.9.7",
4
4
  "description": "Develop NestJs microservices using Dapr pubsub, actors and other bindings",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",