@pick2me/shared 1.0.3 → 1.0.4
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/dist/auth/auth.js +1 -1
- package/dist/auth/index.d.ts +3 -3
- package/dist/auth/index.d.ts.map +1 -1
- package/dist/auth/index.js +2 -2
- package/dist/auth/verifyGatewayJwt.d.ts +2 -2
- package/dist/auth/verifyGatewayJwt.d.ts.map +1 -1
- package/dist/constants/index.d.ts +1 -1
- package/dist/constants/index.d.ts.map +1 -1
- package/dist/constants/index.js +1 -1
- package/dist/errors/errorHandler.js +1 -1
- package/dist/errors/index.d.ts +3 -3
- package/dist/errors/index.d.ts.map +1 -1
- package/dist/errors/index.js +3 -3
- package/dist/interfaces/common-response.d.ts +1 -1
- package/dist/interfaces/common-response.d.ts.map +1 -1
- package/dist/interfaces/index.d.ts +4 -4
- package/dist/interfaces/index.d.ts.map +1 -1
- package/dist/interfaces/index.js +4 -4
- package/dist/messaging/index.d.ts +3 -3
- package/dist/messaging/index.d.ts.map +1 -1
- package/dist/messaging/index.js +3 -3
- package/dist/messaging/rabbitmq.js +1 -1
- package/dist/messaging/rabbitmq.utils.js +1 -1
- package/dist/mongo/index.d.ts +3 -3
- package/dist/mongo/index.d.ts.map +1 -1
- package/dist/mongo/index.js +3 -3
- package/dist/mongo/mongo-base-repository.d.ts +1 -1
- package/dist/mongo/mongo-base-repository.d.ts.map +1 -1
- package/dist/redis/RedisService.d.ts +2 -2
- package/dist/redis/RedisService.d.ts.map +1 -1
- package/dist/redis/RedisService.js +3 -2
- package/dist/redis/client.d.ts +1 -1
- package/dist/redis/client.d.ts.map +1 -1
- package/dist/redis/client.js +1 -1
- package/dist/redis/index.d.ts +2 -2
- package/dist/redis/index.d.ts.map +1 -1
- package/dist/redis/index.js +2 -2
- package/dist/sql/index.d.ts +2 -2
- package/dist/sql/index.d.ts.map +1 -1
- package/dist/sql/index.js +2 -2
- package/dist/sql/sql-base-repository.d.ts +1 -1
- package/dist/sql/sql-base-repository.d.ts.map +1 -1
- package/dist/utils/index.d.ts +3 -3
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +3 -3
- package/package.json +1 -1
package/dist/auth/auth.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import jwt from "jsonwebtoken";
|
|
2
|
-
import { InternalError } from "../errors";
|
|
2
|
+
import { InternalError } from "../errors/index.js";
|
|
3
3
|
export function generateJwtToken(payload, secret, duration = "1h") {
|
|
4
4
|
const token = jwt.sign({ id: payload.id, role: payload.role }, secret, {
|
|
5
5
|
expiresIn: duration,
|
package/dist/auth/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from "./verifyGatewayJwt";
|
|
2
|
-
export type { AccessPayload } from "./types";
|
|
3
|
-
export * from "./auth";
|
|
1
|
+
export * from "./verifyGatewayJwt.js";
|
|
2
|
+
export type { AccessPayload } from "./types.js";
|
|
3
|
+
export * from "./auth.js";
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/auth/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,cAAc,WAAW,CAAC"}
|
package/dist/auth/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./verifyGatewayJwt";
|
|
2
|
-
export * from "./auth";
|
|
1
|
+
export * from "./verifyGatewayJwt.js";
|
|
2
|
+
export * from "./auth.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RequestHandler } from "express";
|
|
2
|
-
import { AccessPayload } from "./types";
|
|
3
|
-
import { IRole } from "../interfaces/common-types";
|
|
2
|
+
import { AccessPayload } from "./types.js";
|
|
3
|
+
import { IRole } from "../interfaces/common-types.js";
|
|
4
4
|
declare global {
|
|
5
5
|
namespace Express {
|
|
6
6
|
interface Request {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verifyGatewayJwt.d.ts","sourceRoot":"","sources":["../../src/auth/verifyGatewayJwt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmC,cAAc,EAAE,MAAM,SAAS,CAAC;AAE1E,OAAO,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"verifyGatewayJwt.d.ts","sourceRoot":"","sources":["../../src/auth/verifyGatewayJwt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmC,cAAc,EAAE,MAAM,SAAS,CAAC;AAE1E,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAEtD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,OAAO,CAAC;QAChB,UAAU,OAAO;YACf,WAAW,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;SACpC;KACF;CACF;AAED,wBAAgB,gBAAgB,CAAC,MAAM,qBAAO,EAAE,cAAc,EAAC,MAAM,EAAE,OAAO,CAAC,EAAE;IAAE,IAAI,CAAC,EAAE,KAAK,GAAG,KAAK,EAAE,CAAA;CAAE,GAAG,cAAc,CAgD3H"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./redis-keys";
|
|
1
|
+
export * from "./redis-keys.js";
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
|
package/dist/constants/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./redis-keys";
|
|
1
|
+
export * from "./redis-keys.js";
|
package/dist/errors/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { HttpError } from './HttpError';
|
|
2
|
-
export * from './HttpError';
|
|
3
|
-
export * from './errorHandler';
|
|
1
|
+
import { HttpError } from './HttpError.js';
|
|
2
|
+
export * from './HttpError.js';
|
|
3
|
+
export * from './errorHandler.js';
|
|
4
4
|
export declare const BadRequestError: (message?: string, opts?: any) => HttpError;
|
|
5
5
|
export declare const NotFoundError: (message?: string, opts?: any) => HttpError;
|
|
6
6
|
export declare const UnauthorizedError: (message?: string, opts?: any) => HttpError;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAElC,eAAO,MAAM,eAAe,GAAI,gBAAuB,EAAE,OAAO,GAAG,cACJ,CAAC;AAChE,eAAO,MAAM,aAAa,GAAI,gBAAqB,EAAE,OAAO,GAAG,cACF,CAAC;AAC9D,eAAO,MAAM,iBAAiB,GAAI,gBAAwB,EAAE,OAAO,GAAG,cACN,CAAC;AACjE,eAAO,MAAM,cAAc,GAAI,gBAAqB,EAAE,OAAO,GAAG,cACH,CAAC;AAC9D,eAAO,MAAM,aAAa,GAAI,gBAAiC,EAAE,OAAO,GAAG,cACI,CAAC;AAChF,eAAO,MAAM,aAAa,GAAI,gBAA0B,EAAE,OAAO,GAAG,cACF,CAAC"}
|
package/dist/errors/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { HttpError } from './HttpError';
|
|
2
|
-
export * from './HttpError';
|
|
3
|
-
export * from './errorHandler';
|
|
1
|
+
import { HttpError } from './HttpError.js';
|
|
2
|
+
export * from './HttpError.js';
|
|
3
|
+
export * from './errorHandler.js';
|
|
4
4
|
export const BadRequestError = (message = 'Bad request', opts) => new HttpError(400, message, { code: 'BAD_REQUEST', ...opts });
|
|
5
5
|
export const NotFoundError = (message = 'Not found', opts) => new HttpError(404, message, { code: 'NOT_FOUND', ...opts });
|
|
6
6
|
export const UnauthorizedError = (message = 'Unauthorized', opts) => new HttpError(401, message, { code: 'UNAUTHORIZED', ...opts });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common-response.d.ts","sourceRoot":"","sources":["../../src/interfaces/common-response.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"common-response.d.ts","sourceRoot":"","sources":["../../src/interfaces/common-response.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,MAAM,WAAW,SAAS;IACxB,MAAM,EAAC,UAAU,CAAC;IAClB,OAAO,EAAC,MAAM,CAAC;IACf,EAAE,CAAC,EAAC,MAAM,CAAC;IACX,QAAQ,CAAC,EAAC,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,SAAS,CAAC,CAAC;IAC1B,MAAM,EAAE,UAAU,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,IAAI,CAAC,EAAE,CAAC,GAAG,IAAI,GAAG,EAAE,GAAG,OAAO,CAAC;CAChC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from "./common-response";
|
|
2
|
-
export * from "./common-types";
|
|
3
|
-
export * from "./status-code";
|
|
4
|
-
export * from "./rabbit-event-types";
|
|
1
|
+
export * from "./common-response.js";
|
|
2
|
+
export * from "./common-types.js";
|
|
3
|
+
export * from "./status-code.js";
|
|
4
|
+
export * from "./rabbit-event-types.js";
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"AACA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"AACA,cAAc,sBAAsB,CAAA;AACpC,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA;AAChC,cAAc,yBAAyB,CAAA"}
|
package/dist/interfaces/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from "./common-response";
|
|
2
|
-
export * from "./common-types";
|
|
3
|
-
export * from "./status-code";
|
|
4
|
-
export * from "./rabbit-event-types";
|
|
1
|
+
export * from "./common-response.js";
|
|
2
|
+
export * from "./common-types.js";
|
|
3
|
+
export * from "./status-code.js";
|
|
4
|
+
export * from "./rabbit-event-types.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from "./rabbitmq.config";
|
|
2
|
-
export * from "./rabbitmq.utils";
|
|
3
|
-
export * from "./rabbitmq";
|
|
1
|
+
export * from "./rabbitmq.config.js";
|
|
2
|
+
export * from "./rabbitmq.utils.js";
|
|
3
|
+
export * from "./rabbitmq.js";
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/messaging/index.ts"],"names":[],"mappings":"AAEA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/messaging/index.ts"],"names":[],"mappings":"AAEA,cAAc,sBAAsB,CAAA;AACpC,cAAc,qBAAqB,CAAA;AACnC,cAAc,eAAe,CAAA"}
|
package/dist/messaging/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "./rabbitmq.config";
|
|
2
|
-
export * from "./rabbitmq.utils";
|
|
3
|
-
export * from "./rabbitmq";
|
|
1
|
+
export * from "./rabbitmq.config.js";
|
|
2
|
+
export * from "./rabbitmq.utils.js";
|
|
3
|
+
export * from "./rabbitmq.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { buildQueueNames } from './rabbitmq.config';
|
|
1
|
+
import { buildQueueNames } from './rabbitmq.config.js';
|
|
2
2
|
export async function setupQueueWithDLQ(channel, exchange, queueBaseName) {
|
|
3
3
|
const { main, retry, dlq } = buildQueueNames(queueBaseName);
|
|
4
4
|
//Make sure the DLQ/retry exchange exists
|
package/dist/mongo/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from "./i-mongo-base-repository";
|
|
2
|
-
export * from "./mongo-base-repository";
|
|
3
|
-
export * from "./connection";
|
|
1
|
+
export * from "./i-mongo-base-repository.js";
|
|
2
|
+
export * from "./mongo-base-repository.js";
|
|
3
|
+
export * from "./connection.js";
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mongo/index.ts"],"names":[],"mappings":"AACA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mongo/index.ts"],"names":[],"mappings":"AACA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iBAAiB,CAAC"}
|
package/dist/mongo/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "./i-mongo-base-repository";
|
|
2
|
-
export * from "./mongo-base-repository";
|
|
3
|
-
export * from "./connection";
|
|
1
|
+
export * from "./i-mongo-base-repository.js";
|
|
2
|
+
export * from "./mongo-base-repository.js";
|
|
3
|
+
export * from "./connection.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Document, Model, FilterQuery, UpdateQuery } from 'mongoose';
|
|
2
|
-
import { IMongoBaseRepository } from '../mongo/i-mongo-base-repository';
|
|
2
|
+
import { IMongoBaseRepository } from '../mongo/i-mongo-base-repository.js';
|
|
3
3
|
export declare class MongoBaseRepository<T extends Document> implements IMongoBaseRepository<T> {
|
|
4
4
|
private _model;
|
|
5
5
|
constructor(model: Model<T>);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mongo-base-repository.d.ts","sourceRoot":"","sources":["../../src/mongo/mongo-base-repository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"mongo-base-repository.d.ts","sourceRoot":"","sources":["../../src/mongo/mongo-base-repository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAG3E,qBACa,mBAAmB,CAAC,CAAC,SAAS,QAAQ,CAAE,YAAW,oBAAoB,CAAC,CAAC,CAAC;IACrF,OAAO,CAAC,MAAM,CAAW;gBAEb,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;IAIrB,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,UAAU,GAAE,MAAW,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;IAShE,OAAO,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE;QAC9C,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;KAC/B,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;IAQf,IAAI,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC;IASjD,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;IAW3C,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAUpC,QAAQ,CAAC,MAAM,GAAE,WAAW,CAAC,CAAC,CAAM,EAAE,UAAU,SAAK,GAAG,OAAO,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC;IAU7E,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,OAAO,GAAE,GAAQ,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;IAShF,SAAS,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,OAAO,GAAE,GAAQ,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;IAS/F,sBAAsB,CAC1B,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,EACtB,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,EACtB,OAAO,GAAE,GAAiC,GACzC,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;IAUZ,SAAS,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC;CAS1D"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import Redis from "ioredis";
|
|
2
|
-
import { Coordinates, NearbyDriver, OnlineDriverDetails } from "../interfaces/common-types";
|
|
2
|
+
import { Coordinates, NearbyDriver, OnlineDriverDetails } from "../interfaces/common-types.js";
|
|
3
3
|
export declare class RedisService {
|
|
4
4
|
private static instance;
|
|
5
5
|
private redis;
|
|
6
6
|
private constructor();
|
|
7
7
|
static init(url?: string): RedisService;
|
|
8
8
|
static getInstance(): RedisService;
|
|
9
|
-
raw(): Redis;
|
|
9
|
+
raw(): Redis.Redis;
|
|
10
10
|
ping(): Promise<"PONG">;
|
|
11
11
|
addBlacklistedToken(token: string, expSeconds: number): Promise<void>;
|
|
12
12
|
checkBlacklistedToken(token: string): Promise<boolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RedisService.d.ts","sourceRoot":"","sources":["../../src/redis/RedisService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"RedisService.d.ts","sourceRoot":"","sources":["../../src/redis/RedisService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,SAAS,CAAC;AAW5B,OAAO,EACL,WAAW,EACX,YAAY,EACZ,mBAAmB,EACpB,MAAM,+BAA+B,CAAC;AAEvC,qBAAa,YAAY;IACvB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAA6B;IACpD,OAAO,CAAC,KAAK,CAAc;IAE3B,OAAO;WAOO,IAAI,CAAC,GAAG,CAAC,EAAE,MAAM;WAYjB,WAAW,IAMC,YAAY;IAG/B,GAAG;IAKG,IAAI;IAKX,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI9D,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAKtD,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAMvD,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,UAAU,SAAK,GAAG,OAAO,CAAC,IAAI,CAAC;IAI5D,GAAG,CAAC,GAAG,EAAE,MAAM;IAIf,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAiBlD,OAAO,CAAC,eAAe;IAIV,YAAY,CACvB,QAAQ,EAAE,MAAM,EAChB,GAAG,SAAM,EACT,MAAM,UAAQ,EACd,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAyBlB,WAAW,CAAC,QAAQ,EAAE,MAAM;IAW5B,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,UAAQ;IAQ/C,eAAe,CAC1B,aAAa,EAAE,mBAAmB,EAClC,QAAQ,EAAE,WAAW,GACpB,OAAO,CAAC,IAAI,CAAC;IAoBH,sBAAsB,CACjC,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,mBAAmB,GAAG,IAAI,CAAC;IAuBzB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQnD,eAAe,CAC1B,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,WAAW,EACrB,MAAM,UAAQ,GACb,OAAO,CAAC,IAAI,CAAC;IAUH,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAItD,iBAAiB,CAC5B,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,KAAK,SAAK,GACT,OAAO,CAAC,YAAY,EAAE,CAAC;IA+Cb,oBAAoB,CAC/B,QAAQ,EAAE,MAAM,EAChB,UAAU,UAAQ,GACjB,OAAO,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAa7C,qBAAqB,CAChC,QAAQ,EAAE,MAAM,EAChB,QAAQ,CAAC,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,GACxD,OAAO,CAAC,IAAI,CAAC;IAqBH,wBAAwB,CACnC,QAAQ,EAAE,MAAM,EAChB,QAAQ,CAAC,EAAE,WAAW,GACrB,OAAO,CAAC,IAAI,CAAC;CAYjB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Redis from "ioredis";
|
|
2
|
-
import { GEO_KEY, GEO_KEY_RIDE, HEARTBEAT_PREFIX, IN_RIDE_HEARTBEAT_PREFIX, IN_RIDE_HEARTBEAT_PREFIX_DATA, ONLINE_DRIVER_DETAILS_PREFIX, } from "../constants/redis-keys";
|
|
2
|
+
import { GEO_KEY, GEO_KEY_RIDE, HEARTBEAT_PREFIX, IN_RIDE_HEARTBEAT_PREFIX, IN_RIDE_HEARTBEAT_PREFIX_DATA, ONLINE_DRIVER_DETAILS_PREFIX, } from "../constants/redis-keys.js";
|
|
3
3
|
export class RedisService {
|
|
4
4
|
static instance = null;
|
|
5
5
|
redis;
|
|
@@ -15,7 +15,8 @@ export class RedisService {
|
|
|
15
15
|
if (!url) {
|
|
16
16
|
throw new Error("REDIS_URL is not set. Provide url to RedisService.init(url).");
|
|
17
17
|
}
|
|
18
|
-
const
|
|
18
|
+
const RedisCtor = Redis;
|
|
19
|
+
const client = new RedisCtor(url);
|
|
19
20
|
this.instance = new RedisService(client);
|
|
20
21
|
return this.instance;
|
|
21
22
|
}
|
package/dist/redis/client.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RedisService } from "./RedisService";
|
|
1
|
+
import { RedisService } from "./RedisService.js";
|
|
2
2
|
export declare function createRedisService(redisUrl: string): RedisService;
|
|
3
3
|
export declare function getRedisService(): RedisService;
|
|
4
4
|
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/redis/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/redis/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,gBAElD;AAED,wBAAgB,eAAe,IAAI,YAAY,CAE9C"}
|
package/dist/redis/client.js
CHANGED
package/dist/redis/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "./client";
|
|
2
|
-
export * from "./RedisService";
|
|
1
|
+
export * from "./client.js";
|
|
2
|
+
export * from "./RedisService.js";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/redis/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/redis/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,mBAAmB,CAAA"}
|
package/dist/redis/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./client";
|
|
2
|
-
export * from "./RedisService";
|
|
1
|
+
export * from "./client.js";
|
|
2
|
+
export * from "./RedisService.js";
|
package/dist/sql/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "./i-sql-base-repository";
|
|
2
|
-
export * from "./sql-base-repository";
|
|
1
|
+
export * from "./i-sql-base-repository.js";
|
|
2
|
+
export * from "./sql-base-repository.js";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/sql/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sql/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sql/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC"}
|
package/dist/sql/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./i-sql-base-repository";
|
|
2
|
-
export * from "./sql-base-repository";
|
|
1
|
+
export * from "./i-sql-base-repository.js";
|
|
2
|
+
export * from "./sql-base-repository.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DeepPartial, Repository, DataSource, ObjectLiteral } from "typeorm";
|
|
2
|
-
import { ISqlBaseRepository } from "./i-sql-base-repository";
|
|
2
|
+
import { ISqlBaseRepository } from "./i-sql-base-repository.js";
|
|
3
3
|
export declare class SqlBaseRepository<T extends ObjectLiteral> implements ISqlBaseRepository<T> {
|
|
4
4
|
protected repo: Repository<T>;
|
|
5
5
|
constructor(entity: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sql-base-repository.d.ts","sourceRoot":"","sources":["../../src/sql/sql-base-repository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7E,OAAO,EAAE,kBAAkB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"sql-base-repository.d.ts","sourceRoot":"","sources":["../../src/sql/sql-base-repository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7E,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAEhE,qBACa,iBAAiB,CAAC,CAAC,SAAS,aAAa,CAAE,YAAW,kBAAkB,CAAC,CAAC,CAAC;IACtF,SAAS,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;gBAElB,MAAM,EAAE;QAAE,QAAQ,CAAC,CAAA;KAAE,EAAE,UAAU,EAAE,UAAU;IAGnD,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;IAQ7C,OAAO,CAAC,KAAK,GAAE,OAAO,CAAC,CAAC,CAAM,GAAG,OAAO,CAAC,CAAC,EAAE,GAAE,IAAI,CAAC;IAQnD,MAAM,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;IAW/C,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;IASvD,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAStC,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;CAO5C"}
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from "./envChecker";
|
|
2
|
-
export * from "./bcrypt";
|
|
3
|
-
export * from "./catchAsync";
|
|
1
|
+
export * from "./envChecker.js";
|
|
2
|
+
export * from "./bcrypt.js";
|
|
3
|
+
export * from "./catchAsync.js";
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AACA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AACA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA"}
|
package/dist/utils/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "./envChecker";
|
|
2
|
-
export * from "./bcrypt";
|
|
3
|
-
export * from "./catchAsync";
|
|
1
|
+
export * from "./envChecker.js";
|
|
2
|
+
export * from "./bcrypt.js";
|
|
3
|
+
export * from "./catchAsync.js";
|