@anchan828/nest-cloud-run-queue-worker 3.2.12 → 3.3.1

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.
@@ -29,18 +29,21 @@ let QueueWorkerExplorerService = class QueueWorkerExplorerService {
29
29
  }
30
30
  getWorkers() {
31
31
  const metadata = [];
32
- for (const classInstanceWrapper of this.discoveryService
33
- .getProviders()
34
- .filter((instanceWrapper) => instanceWrapper.instance?.constructor)) {
35
- const args = Reflect.getMetadata(constants_1.QUEUE_WORKER_DECORATOR, classInstanceWrapper.instance.constructor);
32
+ for (const classInstanceWrapper of this.discoveryService.getProviders()) {
33
+ const instance = classInstanceWrapper.instance;
34
+ const metatype = classInstanceWrapper.metatype;
35
+ if (!instance || !metatype) {
36
+ continue;
37
+ }
38
+ const args = Reflect.getMetadata(constants_1.QUEUE_WORKER_DECORATOR, instance.constructor);
36
39
  if (args && Array.isArray(args.names)) {
37
40
  if (args.enabled === false) {
38
41
  continue;
39
42
  }
40
43
  for (const name of args.names) {
41
44
  metadata.push({
42
- className: classInstanceWrapper.metatype.name,
43
- instance: classInstanceWrapper.instance,
45
+ className: metatype.name,
46
+ instance: instance,
44
47
  name,
45
48
  priority: args.priority || 0,
46
49
  processors: [],
@@ -26,18 +26,21 @@ let QueueWorkerExplorerService = class QueueWorkerExplorerService {
26
26
  }
27
27
  getWorkers() {
28
28
  const metadata = [];
29
- for (const classInstanceWrapper of this.discoveryService
30
- .getProviders()
31
- .filter((instanceWrapper) => instanceWrapper.instance?.constructor)) {
32
- const args = Reflect.getMetadata(QUEUE_WORKER_DECORATOR, classInstanceWrapper.instance.constructor);
29
+ for (const classInstanceWrapper of this.discoveryService.getProviders()) {
30
+ const instance = classInstanceWrapper.instance;
31
+ const metatype = classInstanceWrapper.metatype;
32
+ if (!instance || !metatype) {
33
+ continue;
34
+ }
35
+ const args = Reflect.getMetadata(QUEUE_WORKER_DECORATOR, instance.constructor);
33
36
  if (args && Array.isArray(args.names)) {
34
37
  if (args.enabled === false) {
35
38
  continue;
36
39
  }
37
40
  for (const name of args.names) {
38
41
  metadata.push({
39
- className: classInstanceWrapper.metatype.name,
40
- instance: classInstanceWrapper.instance,
42
+ className: metatype.name,
43
+ instance: instance,
41
44
  name,
42
45
  priority: args.priority || 0,
43
46
  processors: [],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anchan828/nest-cloud-run-queue-worker",
3
- "version": "3.2.12",
3
+ "version": "3.3.1",
4
4
  "description": "> TODO: description",
5
5
  "homepage": "https://github.com/anchan828/nest-cloud-run-queue/tree/master/packages/worker#readme",
6
6
  "bugs": {
@@ -33,19 +33,19 @@
33
33
  "watch": "tsc -w"
34
34
  },
35
35
  "dependencies": {
36
- "@anchan828/nest-cloud-run-queue-common": "^3.2.12"
36
+ "@anchan828/nest-cloud-run-queue-common": "^3.3.1"
37
37
  },
38
38
  "devDependencies": {
39
- "@nestjs/common": "10.4.15",
39
+ "@nestjs/common": "11.0.6",
40
40
  "rxjs": "7.8.1"
41
41
  },
42
42
  "peerDependencies": {
43
- "@nestjs/common": "^8.0.0 || ^9.0.0 || ^10.0.0"
43
+ "@nestjs/common": "^8.0.0 || ^9.0.0 || ^10.0.0 || ^11.0.0"
44
44
  },
45
45
  "publishConfig": {
46
46
  "access": "public"
47
47
  },
48
- "packageManager": "npm@10.9.2",
48
+ "packageManager": "npm@11.1.0",
49
49
  "exports": {
50
50
  ".": {
51
51
  "import": {
@@ -60,5 +60,5 @@
60
60
  "default": "./dist/cjs/index.js"
61
61
  }
62
62
  },
63
- "gitHead": "a6ec5455579563245a0fe89ca9221583af5a5ffc"
63
+ "gitHead": "65024daacd08f5064a8b011451306de015b9a9e3"
64
64
  }