@atls/nestjs-connectrpc 0.0.4 → 0.0.6

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
 
2
2
 
3
+ ## [0.0.5](https://github.com/atls/nestjs/compare/@atls/nestjs-connectrpc@0.0.4...@atls/nestjs-connectrpc@0.0.5) (2025-12-31)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+
9
+ * **packages:** linter errors ([204ce22](https://github.com/atls/nestjs/commit/204ce229e375b09ffd69d93e47c08bd1d1fbea1b))
10
+ * **packages:** linter errors ([d41854b](https://github.com/atls/nestjs/commit/d41854b94d5502ebf2b9e18d22cac33f98c8fc41))
11
+ * **packages:** tests ([ae0f308](https://github.com/atls/nestjs/commit/ae0f308e695cfe39b4e2d38b6a33be4f7e5a8821))
12
+
13
+
14
+
15
+
16
+
17
+ ## [0.0.4](https://github.com/atls/nestjs/compare/@atls/nestjs-connectrpc@0.0.4...@atls/nestjs-connectrpc@0.0.4) (2025-04-03)
18
+
19
+
20
+
21
+
22
+
23
+
3
24
  ## [0.0.4](https://github.com/atls/nestjs/compare/@atls/nestjs-connectrpc@0.0.3...@atls/nestjs-connectrpc@0.0.4) (2025-01-24)
4
25
 
5
26
 
@@ -27,7 +27,8 @@ export const AddMethodMetadata = (target, key, methodType, metadataKey) => {
27
27
  key: key.toString(),
28
28
  methodType,
29
29
  };
30
- const existingMethods = Reflect.getMetadata(metadataKey, target.constructor) || new Set();
30
+ const existingMethods = Reflect.getMetadata(metadataKey, target.constructor) ??
31
+ new Set();
31
32
  if (existingMethods.has(metadata))
32
33
  return;
33
34
  existingMethods.add(metadata);
@@ -1,6 +1,6 @@
1
- import type * as http from 'http';
2
- import type * as http2 from 'http2';
3
- import type * as https from 'https';
1
+ import type * as http from 'node:http';
2
+ import type * as http2 from 'node:http2';
3
+ import type * as https from 'node:https';
4
4
  import type { ConnectRouterOptions } from '@connectrpc/connect';
5
5
  import type { Observable } from 'rxjs';
6
6
  export interface ConnectRpcPattern {
@@ -1,8 +1,8 @@
1
1
  import type { ConnectRouter } from '@connectrpc/connect';
2
2
  import type { ServerTypeOptions } from './connectrpc.interfaces.js';
3
- import * as http from 'http';
4
- import * as http2 from 'http2';
5
- import * as https from 'https';
3
+ import * as http from 'node:http';
4
+ import * as http2 from 'node:http2';
5
+ import * as https from 'node:https';
6
6
  export declare class HTTPServer {
7
7
  private readonly options;
8
8
  private readonly router;
@@ -1,7 +1,7 @@
1
+ import * as http from 'node:http';
2
+ import * as http2 from 'node:http2';
3
+ import * as https from 'node:https';
1
4
  import { connectNodeAdapter } from '@connectrpc/connect-node';
2
- import * as http from 'http';
3
- import * as http2 from 'http2';
4
- import * as https from 'https';
5
5
  import { ServerProtocol } from './connectrpc.interfaces.js';
6
6
  export class HTTPServer {
7
7
  options;
@@ -3,11 +3,17 @@ import { Observable } from 'rxjs';
3
3
  export declare function isAsyncGenerator<T>(input: unknown): input is AsyncGenerator<T>;
4
4
  export declare function observableToAsyncGenerator<T>(observable: Observable<T>): AsyncGenerator<T>;
5
5
  export declare const isObservable: <T>(object: unknown) => object is Observable<T>;
6
+ type Subscriber = (observer: {
7
+ next?: (value: unknown) => void;
8
+ error?: (error: unknown) => void;
9
+ complete?: () => void;
10
+ }) => unknown;
6
11
  export declare const hasSubscribe: (object: unknown) => object is {
7
- subscribe: () => void;
12
+ subscribe: Subscriber;
8
13
  };
9
14
  export declare const hasToPromise: (object: unknown) => object is {
10
15
  toPromise: () => Promise<unknown>;
11
16
  };
12
17
  export declare const transformToObservable: <T>(resultOrDeferred: ResultOrDeferred<T>) => Observable<T>;
13
18
  export declare function toAsyncGenerator<T>(input: AsyncGenerator<T> | Observable<T>): AsyncGenerator<T>;
19
+ export {};
@@ -61,6 +61,7 @@ export const transformToObservable = (resultOrDeferred) => {
61
61
  }
62
62
  if (hasSubscribe(resultOrDeferred)) {
63
63
  return new Observable((subscriber) => {
64
+ ;
64
65
  resultOrDeferred.subscribe({
65
66
  next: (value) => {
66
67
  subscriber.next(value);
@@ -19,8 +19,7 @@ export const createServiceHandlersMap = (handlers, customMetadataStore) => {
19
19
  const serviceMetadata = customMetadataStore.get(service);
20
20
  if (!serviceMetadata)
21
21
  return;
22
- const methodProto = serviceMetadata.methods[rpc];
23
- if (!methodProto)
22
+ if (!(rpc in serviceMetadata.methods))
24
23
  return;
25
24
  serviceHandlersMap[service] ??= {};
26
25
  switch (streaming) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atls/nestjs-connectrpc",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "license": "BSD-3-Clause",
5
5
  "type": "module",
6
6
  "exports": {
@@ -24,8 +24,8 @@
24
24
  "@bufbuild/protobuf": "1.10.0",
25
25
  "@connectrpc/connect": "1.6.1",
26
26
  "@connectrpc/connect-node": "1.6.1",
27
- "@nestjs/common": "10.0.5",
28
- "@nestjs/core": "10.0.5",
27
+ "@nestjs/common": "10.4.1",
28
+ "@nestjs/core": "10.4.1",
29
29
  "@nestjs/microservices": "10.2.4",
30
30
  "@nestjs/platform-express": "10.2.4",
31
31
  "reflect-metadata": "0.2.2",