Compare commits

...

27 Commits
v1.1.1 ... main

Author SHA1 Message Date
74ec9a9480 1.7.0
All checks were successful
Publish / Publish npm package action (push) Successful in 46s
2026-04-26 08:23:09 +03:00
b7491e9c2e feat: add payment to registry 2026-04-26 08:23:04 +03:00
cc2e93743d 1.6.1
All checks were successful
Publish / Publish npm package action (push) Successful in 39s
2026-04-25 08:53:33 +03:00
5f94d32e29 fix: fix deps 2026-04-25 08:53:27 +03:00
d82b1a7503 1.6.0
Some checks failed
Publish / Publish npm package action (push) Failing after 46s
2026-04-24 05:22:23 +03:00
4813ac90e3 feat: add screening rpc to registry 2026-04-24 05:22:14 +03:00
a12e45ac05 1.5.0
All checks were successful
Publish / Publish npm package action (push) Successful in 38s
2026-04-18 08:38:24 +03:00
b46040330c feat: add hall and seat package to registry 2026-04-18 08:38:17 +03:00
bd25e4ee7a 1.4.0
All checks were successful
Publish / Publish npm package action (push) Successful in 40s
2026-04-15 07:28:40 +03:00
851a030e1d feat: add theater grpc 2026-04-15 07:28:34 +03:00
dc1523ad83 1.3.2
All checks were successful
Publish / Publish npm package action (push) Successful in 39s
2026-04-12 09:02:17 +03:00
d629569ef3 fix: fix longs 2026-04-12 09:02:06 +03:00
57b6d19005 1.3.1
All checks were successful
Publish / Publish npm package action (push) Successful in 42s
2026-04-12 08:40:20 +03:00
ac1007c0dc fix: fix types 2026-04-12 08:40:15 +03:00
d328d47859 1.3.0
All checks were successful
Publish / Publish npm package action (push) Successful in 46s
2026-04-12 08:30:23 +03:00
39f32d02f9 feat: add timestamp to iso 2026-04-12 08:30:08 +03:00
726100b6a5 1.2.0
All checks were successful
Publish / Publish npm package action (push) Successful in 38s
2026-04-10 06:20:26 +03:00
050eabb52b feat: add movie grpc
Some checks failed
Publish / Publish npm package action (push) Failing after 35s
2026-04-10 06:19:28 +03:00
e3dcf3be52 1.1.6
All checks were successful
Publish / Publish npm package action (push) Successful in 38s
2026-04-03 06:04:15 +03:00
4724abe0a1 fix: upgrade contracts 2026-04-03 06:04:11 +03:00
5b6a87375a 1.1.5
All checks were successful
Publish / Publish npm package action (push) Successful in 50s
2026-04-03 05:50:21 +03:00
ca1b18f038 1.1.4
All checks were successful
Publish / Publish npm package action (push) Successful in 48s
2026-04-01 06:53:33 +03:00
58fe189d01 feat: add media grpc 2026-04-01 06:53:27 +03:00
4c325ed4f7 1.1.3
All checks were successful
Publish / Publish npm package action (push) Successful in 42s
2026-03-06 07:05:13 +03:00
3ba3fbe9e8 fix: little fixes 2026-03-06 07:05:08 +03:00
396a0e6402 1.1.2
All checks were successful
Publish / Publish npm package action (push) Successful in 46s
2026-03-06 06:58:01 +03:00
3cc0acc035 fix: fix config service import 2026-03-06 06:57:52 +03:00
7 changed files with 73 additions and 16 deletions

View File

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

View File

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

View File

@ -1,5 +1,5 @@
import { DynamicModule, Module } from '@nestjs/common'
import { ConfigService } from '@nestjs/config'
import { ConfigModule, ConfigService } from '@nestjs/config'
import { GRPC_CLIENT_PREFIX } from './constants/grpc.constants'
import { GrpcClientFactory } from './factory/grpc-client.factory'
@ -12,6 +12,7 @@ export class GrpcModule {
): DynamicModule {
return {
module: GrpcModule,
imports: [ConfigModule],
providers: [
GrpcClientFactory,
...clients.map(token => {

View File

@ -7,7 +7,7 @@ export const GRPC_CLIENTS = {
env: 'AUTH_GRPC_URL'
},
ACCOUNT_PACKAGE: {
package: 'auth.v1',
package: 'account.v1',
protoPath: PROTO_PATHS.ACCOUNT,
env: 'AUTH_GRPC_URL'
},
@ -15,5 +15,45 @@ export const GRPC_CLIENTS = {
package: 'users.v1',
protoPath: PROTO_PATHS.USERS,
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;

View File

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

View File

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