Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(common): publish nestjs-grpc-reflection nestjs-proto-types #344

Merged
merged 1 commit into from
Jan 24, 2025

chore(common): publish nestjs-grpc-reflection nestjs-proto-types

76ea2da
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Merged

chore(common): publish nestjs-grpc-reflection nestjs-proto-types #344

chore(common): publish nestjs-grpc-reflection nestjs-proto-types
76ea2da
Select commit
Loading
Failed to load commit list.
GitHub Actions / Lint failed Jan 24, 2025 in 0s

Errors 236, Warnings 2

Found 236 errors and 2 warnings

Annotations

Check failure on line 29 in packages/nestjs-grpc-identity/integration/grpc-identity.test.ts

See this annotation in the file changed.

@github-actions github-actions / Lint

(@typescript-eslint/no-explicit-any): Unexpected any. Specify a different type.

Unexpected any. Specify a different type.
Raw output
  26 | describe('grpc identity', () => {
  27 |   let service: INestMicroservice
> 28 |   let client: any
     |               ^
  29 |
  30 |   beforeAll(async () => {
  31 |     const servicePort = await getPort()

Check failure on line 78 in packages/nestjs-grpc-identity/integration/grpc-identity.test.ts

See this annotation in the file changed.

@github-actions github-actions / Lint

(n/no-sync): Unexpected sync method: 'readFileSync'.

Unexpected sync method: 'readFileSync'.
Raw output
  75 |
  76 |   it(`check success`, async () => {
> 77 |     const privateKey = readFileSync(join(__dirname, 'src/.jwks.pem'), 'utf-8')
     |                        ^
  78 |
  79 |     const token = sign({ sub: 'test' }, privateKey, { algorithm: 'RS256' })
  80 |

Check failure on line 103 in packages/nestjs-grpc-identity/integration/grpc-identity.test.ts

See this annotation in the file changed.

@github-actions github-actions / Lint

(@typescript-eslint/no-explicit-any): Unexpected any. Specify a different type.

Unexpected any. Specify a different type.
Raw output
  100 |       await client.test({ id: 'test' }, metadata).toPromise()
  101 |     } catch (error) {
> 102 |       expect((error as any).code).toBe(status.UNAUTHENTICATED)
      |                        ^
  103 |     }
  104 |   })
  105 | })

Check failure on line 2 in packages/nestjs-grpc-reflection/proto/index.d.ts

See this annotation in the file changed.

@github-actions github-actions / Lint

(@typescript-eslint/no-explicit-any): Unexpected any. Specify a different type.

Unexpected any. Specify a different type.
Raw output
> 1 | export declare const serverReflectionPath: any
    |                                            ^
  2 |

Check warning on line 14 in packages/nestjs-proto-types/src/index.ts

See this annotation in the file changed.

@github-actions github-actions / Lint

(unknown): Unused eslint-disable directive (no problems were reported from '@typescript-eslint/prefer-ts-expect-error').

Unused eslint-disable directive (no problems were reported from '@typescript-eslint/prefer-ts-expect-error').
Raw output
  11 |  * @typedef {string} ProtoFile - Represents the imported `.proto` file as a string
  12 |  */
> 13 | // eslint-disable-next-line @typescript-eslint/prefer-ts-expect-error
     | ^
  14 | declare module '*.proto'
  15 |

Check failure on line 79 in packages/nestjs-batch-queue/integration/test/batch-queue.test.ts

See this annotation in the file changed.

@github-actions github-actions / Lint

(@typescript-eslint/no-explicit-any): Unexpected any. Specify a different type.

Unexpected any. Specify a different type.
Raw output
  76 |     channelWrapper.consume('test-queue', (msg) => {
  77 |       ;(async (): Promise<void> => {
> 78 |         const producer: Producer<any> = app.get(BATCH_QUEUE_PRODUCER)
     |                                  ^
  79 |         const parsed: { queueName: string; value: any } = JSON.parse(msg.content.toString())
  80 |         try {
  81 |           await producer.produce(parsed.queueName, parsed.value)

Check failure on line 80 in packages/nestjs-batch-queue/integration/test/batch-queue.test.ts

See this annotation in the file changed.

@github-actions github-actions / Lint

(@typescript-eslint/no-explicit-any): Unexpected any. Specify a different type.

Unexpected any. Specify a different type.
Raw output
  77 |       ;(async (): Promise<void> => {
  78 |         const producer: Producer<any> = app.get(BATCH_QUEUE_PRODUCER)
> 79 |         const parsed: { queueName: string; value: any } = JSON.parse(msg.content.toString())
     |                                                   ^
  80 |         try {
  81 |           await producer.produce(parsed.queueName, parsed.value)
  82 |           succesProduceCount += 1

Check failure on line 123 in packages/nestjs-batch-queue/integration/test/batch-queue.test.ts

See this annotation in the file changed.

@github-actions github-actions / Lint

(@typescript-eslint/no-non-null-assertion): Forbidden non-null assertion.

Forbidden non-null assertion.
Raw output
  120 |     await waitForConsumeCount(1, consumeBatchs)
  121 |     expect(consumeBatchs.length).toBe(1)
> 122 |     const result = consumeBatchs.pop()!
      |                    ^
  123 |     expect(result[0]).toBe('batch-queue')
  124 |     expect(result[1]).toEqual(['test-0-0'])
  125 |   })

Check failure on line 141 in packages/nestjs-batch-queue/integration/test/batch-queue.test.ts

See this annotation in the file changed.

@github-actions github-actions / Lint

(@typescript-eslint/no-non-null-assertion): Forbidden non-null assertion.

Forbidden non-null assertion.
Raw output
  138 |     await waitForConsumeCount(1, consumeBatchs)
  139 |     expect(consumeBatchs.length).toBe(1)
> 140 |     const result = consumeBatchs.pop()!
      |                    ^
  141 |     expect(result[0]).toBe('batch-queue')
  142 |     const expectMessages = []
  143 |     for (let i = 0; i < 9_000; i += 1) {

Check failure on line 163 in packages/nestjs-batch-queue/integration/test/batch-queue.test.ts

See this annotation in the file changed.

@github-actions github-actions / Lint

(@typescript-eslint/no-non-null-assertion): Forbidden non-null assertion.

Forbidden non-null assertion.
Raw output
  160 |     await waitForConsumeCount(1, consumeBatchs)
  161 |     expect(consumeBatchs.length).toBe(1)
> 162 |     const result = consumeBatchs.pop()!
      |                    ^
  163 |     expect(result[0]).toBe('batch-queue')
  164 |     const expectMessages = []
  165 |     for (let i = 0; i < 10_000; i += 1) {

Check failure on line 173 in packages/nestjs-batch-queue/integration/test/batch-queue.test.ts

See this annotation in the file changed.

@github-actions github-actions / Lint

(@typescript-eslint/no-explicit-any): Unexpected any. Specify a different type.

Unexpected any. Specify a different type.
Raw output
  170 |
  171 |   it('handle multiple queues', async () => {
> 172 |     const messages: Array<Promise<any>> = []
      |                                   ^
  173 |     const queues: Array<string> = ['queue-one', 'queue-two', 'queue-three']
  174 |     const expectedResults: Record<string, Array<string>> = {
  175 |       'queue-one': [],

Check failure on line 36 in packages/nestjs-batch-queue/src/batch-queue/batch-queue.test.ts

See this annotation in the file changed.

@github-actions github-actions / Lint

(@typescript-eslint/ban-ts-comment): Include a description after the "@ts-expect-error" directive to explain why the @ts-expect-error is necessary. The description must be 10 characters or longer.

Include a description after the "@ts-expect-error" directive to explain why the @ts-expect-error is necessary. The description must be 10 characters or longer.
Raw output
  33 |
  34 |   beforeEach(() => {
> 35 |     // @ts-expect-error
     |     ^
  36 |     processorFnMock = jest.fn()
  37 |   })
  38 |

Check failure on line 41 in packages/nestjs-batch-queue/src/batch-queue/batch-queue.test.ts

See this annotation in the file changed.

@github-actions github-actions / Lint

(@typescript-eslint/ban-ts-comment): Include a description after the "@ts-expect-error" directive to explain why the @ts-expect-error is necessary. The description must be 10 characters or longer.

Include a description after the "@ts-expect-error" directive to explain why the @ts-expect-error is necessary. The description must be 10 characters or longer.
Raw output
  38 |
  39 |   beforeEach(() => {
> 40 |     // @ts-expect-error
     |     ^
  41 |     checkManager = {
  42 |       getState: jest.fn().mockReturnValue(true) as CheckManager['getState'],
  43 |     }

Check failure on line 136 in packages/nestjs-batch-queue/src/batch-queue/batch-queue.ts

See this annotation in the file changed.

@github-actions github-actions / Lint

(@typescript-eslint/no-non-null-assertion): Forbidden non-null assertion.

Forbidden non-null assertion.
Raw output
  133 |       this.mutexes.set(queueName, new Mutex())
  134 |     }
> 135 |     return this.mutexes.get(queueName)!
      |            ^
  136 |   }
  137 | }
  138 |

Check failure on line 24 in packages/nestjs-batch-queue/src/module/batch-queue-module-options.interface.ts

See this annotation in the file changed.

@github-actions github-actions / Lint

(@typescript-eslint/no-explicit-any): Unexpected any. Specify a different type.

Unexpected any. Specify a different type.
Raw output
  21 |   useClass?: Type<BatchQueueOptionsFactory>
  22 |   useFactory?: (...args: Array<any>) => BatchQueueModuleOptions | Promise<BatchQueueModuleOptions>
> 23 |   inject?: Array<any>
     |                  ^
  24 | }
  25 |

Check failure on line 57 in packages/nestjs-batch-queue/src/module/batch-queue.module.ts

See this annotation in the file changed.

@github-actions github-actions / Lint

(@typescript-eslint/no-non-null-assertion): Forbidden non-null assertion.

Forbidden non-null assertion.
Raw output
  54 |     if (!(options.useExisting || options.useFactory)) {
  55 |       providers.push({
> 56 |         provide: options.useClass!,
     |                  ^
  57 |         useClass: options.useClass!,
  58 |       })
  59 |     }

Check failure on line 58 in packages/nestjs-batch-queue/src/module/batch-queue.module.ts

See this annotation in the file changed.

@github-actions github-actions / Lint

(@typescript-eslint/no-non-null-assertion): Forbidden non-null assertion.

Forbidden non-null assertion.
Raw output
  55 |       providers.push({
  56 |         provide: options.useClass!,
> 57 |         useClass: options.useClass!,
     |                   ^
  58 |       })
  59 |     }
  60 |     return providers

Check failure on line 77 in packages/nestjs-batch-queue/src/module/batch-queue.module.ts

See this annotation in the file changed.

@github-actions github-actions / Lint

(@typescript-eslint/no-non-null-assertion): Forbidden non-null assertion.

Forbidden non-null assertion.
Raw output
  74 |       useFactory: async (optionsFactory: BatchQueueOptionsFactory) =>
  75 |         optionsFactory.createBatchQueueOptions(),
> 76 |       inject: [options.useExisting! || options.useClass!],
     |                ^
  77 |     }
  78 |   }
  79 | }

Check failure on line 77 in packages/nestjs-batch-queue/src/module/batch-queue.module.ts

See this annotation in the file changed.

@github-actions github-actions / Lint

(@typescript-eslint/no-non-null-assertion): Forbidden non-null assertion.

Forbidden non-null assertion.
Raw output
  74 |       useFactory: async (optionsFactory: BatchQueueOptionsFactory) =>
  75 |         optionsFactory.createBatchQueueOptions(),
> 76 |       inject: [options.useExisting! || options.useClass!],
     |                                        ^
  77 |     }
  78 |   }
  79 | }

Check failure on line 29 in packages/nestjs-batch-queue/src/module/batch-queue.providers.ts

See this annotation in the file changed.

@github-actions github-actions / Lint

(@typescript-eslint/no-explicit-any): Unexpected any. Specify a different type.

Unexpected any. Specify a different type.
Raw output
  26 | ): Provider => ({
  27 |   provide: BATCH_QUEUE,
> 28 |   useFactory: (checkManager: CheckManager): BatchQueue<any> =>
     |                                                        ^
  29 |     new BatchQueue(batchQueueModuleOptions.core, checkManager),
  30 |   inject: [BATCH_QUEUE_CHECK_MANAGER],
  31 | })

Check failure on line 39 in packages/nestjs-batch-queue/src/module/batch-queue.providers.ts

See this annotation in the file changed.

@github-actions github-actions / Lint

(@typescript-eslint/no-explicit-any): Unexpected any. Specify a different type.

Unexpected any. Specify a different type.
Raw output
  36 |     batchQueueModuleOptions: BatchQueueModuleOptions,
  37 |     checkManager: CheckManager
> 38 |   ): BatchQueue<any> => new BatchQueue(batchQueueModuleOptions.core, checkManager),
     |                 ^
  39 |   inject: [BATCH_QUEUE_MODULE_OPTIONS, BATCH_QUEUE_CHECK_MANAGER],
  40 | })
  41 |

Check failure on line 45 in packages/nestjs-batch-queue/src/module/batch-queue.providers.ts

See this annotation in the file changed.

@github-actions github-actions / Lint

(@typescript-eslint/no-explicit-any): Unexpected any. Specify a different type.

Unexpected any. Specify a different type.
Raw output
  42 | export const createBatchQueueConsumerProvider = (): Provider => ({
  43 |   provide: BATCH_QUEUE_CONSUMER,
> 44 |   useFactory: (batchQueue: BatchQueue<any>): Consumer => new Consumer(batchQueue),
     |                                       ^
  45 |   inject: [BATCH_QUEUE],
  46 | })
  47 |

Check failure on line 51 in packages/nestjs-batch-queue/src/module/batch-queue.providers.ts

See this annotation in the file changed.

@github-actions github-actions / Lint

(@typescript-eslint/no-explicit-any): Unexpected any. Specify a different type.

Unexpected any. Specify a different type.
Raw output
  48 | export const createBatchQueueProducerProvider = (): Provider => ({
  49 |   provide: BATCH_QUEUE_PRODUCER,
> 50 |   useFactory: (batchQueue: BatchQueue<any>): Producer<any> => new Producer(batchQueue),
     |                                       ^
  51 |   inject: [BATCH_QUEUE],
  52 | })
  53 |

Check failure on line 51 in packages/nestjs-batch-queue/src/module/batch-queue.providers.ts

See this annotation in the file changed.

@github-actions github-actions / Lint

(@typescript-eslint/no-explicit-any): Unexpected any. Specify a different type.

Unexpected any. Specify a different type.
Raw output
  48 | export const createBatchQueueProducerProvider = (): Provider => ({
  49 |   provide: BATCH_QUEUE_PRODUCER,
> 50 |   useFactory: (batchQueue: BatchQueue<any>): Producer<any> => new Producer(batchQueue),
     |                                                       ^
  51 |   inject: [BATCH_QUEUE],
  52 | })
  53 |

Check failure on line 6 in packages/nestjs-batch-queue/src/proxy-clases/consumer.ts

See this annotation in the file changed.

@github-actions github-actions / Lint

(@typescript-eslint/no-explicit-any): Unexpected any. Specify a different type.

Unexpected any. Specify a different type.
Raw output
  3 |
  4 | export class Consumer {
> 5 |   constructor(private batchQueue: BatchQueue<any>) {}
    |                                              ^
  6 |
  7 |   /**
  8 |    * Delegates to {@link BatchQueue.processBatch}