Compare commits

..

No commits in common. "main" and "v1.1.3" have entirely different histories.
main ... v1.1.3

6 changed files with 14 additions and 70 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "@teacinema/common", "name": "@teacinema/common",
"version": "1.7.0", "version": "1.1.3",
"description": "Common library for TeaCinema microservices", "description": "Common library for TeaCinema microservices",
"main": "dist/index.js", "main": "dist/index.js",
"types": "dist/index.d.ts", "types": "dist/index.d.ts",
@ -20,6 +20,6 @@
"@nestjs/common": "^11.1.16", "@nestjs/common": "^11.1.16",
"@nestjs/config": "^4.0.3", "@nestjs/config": "^4.0.3",
"@nestjs/microservices": "^11.1.16", "@nestjs/microservices": "^11.1.16",
"@teacinema/contracts": "^1.5.0" "@teacinema/contracts": "^1.1.3"
} }
} }

View File

@ -16,12 +16,7 @@ export class GrpcClientFactory {
}) { }) {
return ClientProxyFactory.create({ return ClientProxyFactory.create({
transport: Transport.GRPC, transport: Transport.GRPC,
options: { options
...options,
loader: {
longs: Number,
},
}
}) as ClientGrpc }) as ClientGrpc
} }
@ -38,4 +33,7 @@ export class GrpcClientFactory {
return client; return client;
} }
} }

View File

@ -15,45 +15,5 @@ export const GRPC_CLIENTS = {
package: 'users.v1', package: 'users.v1',
protoPath: PROTO_PATHS.USERS, protoPath: PROTO_PATHS.USERS,
env: 'USERS_GRPC_URL' env: 'USERS_GRPC_URL'
},
MEDIA_PACKAGE: {
package: 'media.v1',
protoPath: PROTO_PATHS.MEDIA,
env: 'MEDIA_GRPC_URL'
},
MOVIE_PACKAGE: {
package: 'movie.v1',
protoPath: PROTO_PATHS.MOVIE,
env: 'MOVIE_GRPC_URL'
},
CATEGORY_PACKAGE: {
package: 'category.v1',
protoPath: PROTO_PATHS.CATEGORY,
env: 'MOVIE_GRPC_URL'
},
THEATER_PACKAGE: {
package: 'theater.v1',
protoPath: PROTO_PATHS.THEATER,
env: 'THEATER_GRPC_URL'
},
HALL_PACKAGE: {
package: 'hall.v1',
protoPath: PROTO_PATHS.HALL,
env: 'THEATER_GRPC_URL'
},
SEAT_PACKAGE: {
package: 'seat.v1',
protoPath: PROTO_PATHS.SEAT,
env: 'THEATER_GRPC_URL'
},
SCREENING_PACKAGE: {
package: 'screening.v1',
protoPath: PROTO_PATHS.SCREENING,
env: 'SCREENING_GRPC_URL'
},
PAYMENT_PACKAGE: {
package: 'payment.v1',
protoPath: PROTO_PATHS.PAYMENT,
env: 'PAYMENT_GRPC_URL'
} }
} as const; } as const;

View File

@ -1,2 +1 @@
export * from './convert-enum.util' export * from './convert-enum.util'
export * from './timestamp-to-iso.util'

View File

@ -1,5 +0,0 @@
import { Timestamp } from '@teacinema/contracts/gen/ts/google/protobuf/timestamp'
export function timestampToISO(ts: Timestamp) {
return new Date(ts.seconds * 1000 + ts.nanos / 1_000_000).toISOString()
}

View File

@ -80,9 +80,9 @@
integrity sha512-k7vvKPbf7J2fZ5klGRD9AeKfUvojuZIQ3BT5u7Jfv+puwXkUBUT5PVyMDfJZpy30CBDXGMgw7fguK/lpOMBvgw== integrity sha512-k7vvKPbf7J2fZ5klGRD9AeKfUvojuZIQ3BT5u7Jfv+puwXkUBUT5PVyMDfJZpy30CBDXGMgw7fguK/lpOMBvgw==
"@bufbuild/protobuf@^2.0.0", "@bufbuild/protobuf@^2.10.2": "@bufbuild/protobuf@^2.0.0", "@bufbuild/protobuf@^2.10.2":
version "2.12.0" version "2.11.0"
resolved "https://registry.yarnpkg.com/@bufbuild/protobuf/-/protobuf-2.12.0.tgz#53225636a8fcebb2bd94998ad9d42f99f96add4d" resolved "https://registry.yarnpkg.com/@bufbuild/protobuf/-/protobuf-2.11.0.tgz#3ec3985c9074b23aea337957225fe15a0e845f8e"
integrity sha512-B/XlCaFIP8LOwzo+bz5uFzATYokcwCKQcghqnlfwSmM5eX/qTkvDBnDPs+gXtX/RyjxJ4DRikECcPJbyALA8FA== integrity sha512-sBXGT13cpmPR5BMgHE6UEEfEaShh5Ror6rfN3yEK5si7QVrtZg8LEPQb0VVhiLRUslD2yLnXtnRzG035J/mZXQ==
"@jridgewell/gen-mapping@^0.3.12": "@jridgewell/gen-mapping@^0.3.12":
version "0.3.13" version "0.3.13"
@ -135,15 +135,7 @@
dotenv-expand "12.0.3" dotenv-expand "12.0.3"
lodash "4.17.23" lodash "4.17.23"
"@nestjs/microservices@^11.1.12": "@nestjs/microservices@^11.1.12", "@nestjs/microservices@^11.1.16":
version "11.1.19"
resolved "https://registry.yarnpkg.com/@nestjs/microservices/-/microservices-11.1.19.tgz#0222ca2331a2a702df3b4dd6b7fd2fe7487fb39a"
integrity sha512-3Oja56ydTlSaui19/i7gYM0MMqz/w4UR2aqZeL4K8B+Fq0Ztg3zHb8et76atToJGpSCevJLEsoEMOMaGgzRwfg==
dependencies:
iterare "1.2.1"
tslib "2.8.1"
"@nestjs/microservices@^11.1.16":
version "11.1.16" version "11.1.16"
resolved "https://registry.yarnpkg.com/@nestjs/microservices/-/microservices-11.1.16.tgz#6f445c44adcee88af983830e0667c93ccefe2869" resolved "https://registry.yarnpkg.com/@nestjs/microservices/-/microservices-11.1.16.tgz#6f445c44adcee88af983830e0667c93ccefe2869"
integrity sha512-eG/ArIq0UJyR3i/GTYuApA4OZylhuLGacVaVT9mMxQgT7ZTpp5CZgOwLNdcUUdOS6qypK3waG1m2AC54xzdf0Q== integrity sha512-eG/ArIq0UJyR3i/GTYuApA4OZylhuLGacVaVT9mMxQgT7ZTpp5CZgOwLNdcUUdOS6qypK3waG1m2AC54xzdf0Q==
@ -151,10 +143,10 @@
iterare "1.2.1" iterare "1.2.1"
tslib "2.8.1" tslib "2.8.1"
"@teacinema/contracts@^1.5.0": "@teacinema/contracts@^1.1.3":
version "1.6.0" version "1.1.3"
resolved "https://git.ksv741.keenetic.pro/api/packages/teacinema/npm/%40teacinema%2Fcontracts/-/1.6.0/contracts-1.6.0.tgz#a6281f8d7e4d1ef8bea4f1dfe43f3f9c8ca799a8" resolved "https://git.ksv741.keenetic.pro/api/packages/teacinema/npm/%40teacinema%2Fcontracts/-/1.1.3/contracts-1.1.3.tgz#e08600a8dc09977dae35654d372e29e411029e33"
integrity sha512-6ywkJv166HZRv+c2/D6m5GGpOXX6qgV1bMfb1ei7k6EruRHMIjTSdLX1p1XwlENgfsdz9BrBK8LO2E7OgsphPQ== integrity sha512-kwcSh2YIxmoBJQ56L+tQpGj12ySwNwf9KRNcUqhPffLPO60PR5aiKA2eN2SfKc23TKp0YoSkdC9LWeor0a9Ysg==
dependencies: dependencies:
"@nestjs/microservices" "^11.1.12" "@nestjs/microservices" "^11.1.12"
protoc "33.4.0" protoc "33.4.0"