@mondocinema/common 1.0.0 → 1.1.0
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/grpc/constants/grpc.constants.d.ts +2 -0
- package/dist/grpc/constants/grpc.constants.d.ts.map +1 -0
- package/dist/grpc/constants/grpc.constants.js +5 -0
- package/dist/grpc/constants/grpc.constants.js.map +1 -0
- package/dist/grpc/decorators/index.d.ts +2 -0
- package/dist/grpc/decorators/index.d.ts.map +1 -0
- package/dist/grpc/decorators/index.js +18 -0
- package/dist/grpc/decorators/index.js.map +1 -0
- package/dist/grpc/decorators/inject-grpc-client.decorator.d.ts +2 -0
- package/dist/grpc/decorators/inject-grpc-client.decorator.d.ts.map +1 -0
- package/dist/grpc/decorators/inject-grpc-client.decorator.js +8 -0
- package/dist/grpc/decorators/inject-grpc-client.decorator.js.map +1 -0
- package/dist/grpc/factory/grpc-client.factory.d.ts +8 -0
- package/dist/grpc/factory/grpc-client.factory.d.ts.map +1 -0
- package/dist/grpc/factory/grpc-client.factory.js +74 -0
- package/dist/grpc/factory/grpc-client.factory.js.map +1 -0
- package/dist/grpc/grpc.module.d.ts +6 -0
- package/dist/grpc/grpc.module.d.ts.map +1 -0
- package/dist/grpc/grpc.module.js +90 -0
- package/dist/grpc/grpc.module.js.map +1 -0
- package/dist/grpc/index.d.ts +3 -0
- package/dist/grpc/index.d.ts.map +1 -0
- package/dist/grpc/index.js +19 -0
- package/dist/grpc/index.js.map +1 -0
- package/dist/grpc/registry/grpc.registry.d.ts +18 -0
- package/dist/grpc/registry/grpc.registry.d.ts.map +1 -0
- package/dist/grpc/registry/grpc.registry.js +22 -0
- package/dist/grpc/registry/grpc.registry.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/utils/convert-enum.d.ts +2 -0
- package/dist/utils/convert-enum.d.ts.map +1 -0
- package/dist/utils/convert-enum.js +7 -0
- package/dist/utils/convert-enum.js.map +1 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +18 -0
- package/dist/utils/index.js.map +1 -0
- package/package.json +7 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grpc.constants.d.ts","sourceRoot":"","sources":["../../../lib/grpc/constants/grpc.constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grpc.constants.js","sourceRoot":"","sources":["../../../lib/grpc/constants/grpc.constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,kBAAkB,GAAG,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/grpc/decorators/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./inject-grpc-client.decorator"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/grpc/decorators/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iEAA+C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inject-grpc-client.decorator.d.ts","sourceRoot":"","sources":["../../../lib/grpc/decorators/inject-grpc-client.decorator.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,gBAAgB,GAAI,MAAM,MAAM,2CACL,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InjectGrpcClient = void 0;
|
|
4
|
+
const common_1 = require("@nestjs/common");
|
|
5
|
+
const grpc_constants_1 = require("../constants/grpc.constants");
|
|
6
|
+
const InjectGrpcClient = (name) => (0, common_1.Inject)(`${grpc_constants_1.GRPC_CLIENT_PREFIX}_${name}`);
|
|
7
|
+
exports.InjectGrpcClient = InjectGrpcClient;
|
|
8
|
+
//# sourceMappingURL=inject-grpc-client.decorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inject-grpc-client.decorator.js","sourceRoot":"","sources":["../../../lib/grpc/decorators/inject-grpc-client.decorator.ts"],"names":[],"mappings":";;;AAAA,2CAAwC;AAExC,gEAAiE;AAE1D,MAAM,gBAAgB,GAAG,CAAC,IAAY,EAAE,EAAE,CAChD,IAAA,eAAM,EAAC,GAAG,mCAAkB,IAAI,IAAI,EAAE,CAAC,CAAC;AAD5B,QAAA,gBAAgB,oBACY"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ClientGrpc, GrpcOptions } from "@nestjs/microservices";
|
|
2
|
+
export declare class GrpcClientFactory {
|
|
3
|
+
private clients;
|
|
4
|
+
createClient(options: GrpcOptions["options"]): import("@nestjs/microservices").ClientGrpcProxy;
|
|
5
|
+
register(token: string, client: ClientGrpc): void;
|
|
6
|
+
getClient<T extends ClientGrpc = ClientGrpc>(token: string): T;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=grpc-client.factory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grpc-client.factory.d.ts","sourceRoot":"","sources":["../../../lib/grpc/factory/grpc-client.factory.ts"],"names":[],"mappings":"AACA,OAAO,EACN,UAAU,EAEV,WAAW,EAEX,MAAM,uBAAuB,CAAC;AAE/B,qBACa,iBAAiB;IAC7B,OAAO,CAAC,OAAO,CAAiC;IAEhD,YAAY,CAAC,OAAO,EAAE,WAAW,CAAC,SAAS,CAAC;IAO5C,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU;IAI1C,SAAS,CAAC,CAAC,SAAS,UAAU,GAAG,UAAU,EAAE,KAAK,EAAE,MAAM,GAAG,CAAC;CAO9D"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
3
|
+
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
4
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
5
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
6
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
7
|
+
var _, done = false;
|
|
8
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
9
|
+
var context = {};
|
|
10
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
11
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
12
|
+
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
13
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
14
|
+
if (kind === "accessor") {
|
|
15
|
+
if (result === void 0) continue;
|
|
16
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
17
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
18
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
19
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
20
|
+
}
|
|
21
|
+
else if (_ = accept(result)) {
|
|
22
|
+
if (kind === "field") initializers.unshift(_);
|
|
23
|
+
else descriptor[key] = _;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
27
|
+
done = true;
|
|
28
|
+
};
|
|
29
|
+
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
|
30
|
+
var useValue = arguments.length > 2;
|
|
31
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
32
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
33
|
+
}
|
|
34
|
+
return useValue ? value : void 0;
|
|
35
|
+
};
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.GrpcClientFactory = void 0;
|
|
38
|
+
const common_1 = require("@nestjs/common");
|
|
39
|
+
const microservices_1 = require("@nestjs/microservices");
|
|
40
|
+
let GrpcClientFactory = (() => {
|
|
41
|
+
let _classDecorators = [(0, common_1.Injectable)()];
|
|
42
|
+
let _classDescriptor;
|
|
43
|
+
let _classExtraInitializers = [];
|
|
44
|
+
let _classThis;
|
|
45
|
+
var GrpcClientFactory = class {
|
|
46
|
+
static { _classThis = this; }
|
|
47
|
+
static {
|
|
48
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
|
|
49
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
50
|
+
GrpcClientFactory = _classThis = _classDescriptor.value;
|
|
51
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
52
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
53
|
+
}
|
|
54
|
+
clients = new Map();
|
|
55
|
+
createClient(options) {
|
|
56
|
+
return microservices_1.ClientProxyFactory.create({
|
|
57
|
+
transport: microservices_1.Transport.GRPC,
|
|
58
|
+
options,
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
register(token, client) {
|
|
62
|
+
this.clients.set(token, client);
|
|
63
|
+
}
|
|
64
|
+
getClient(token) {
|
|
65
|
+
const client = this.clients.get(token);
|
|
66
|
+
if (!client)
|
|
67
|
+
throw new Error(`gRPC client "${token}" not found`);
|
|
68
|
+
return client;
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
return GrpcClientFactory = _classThis;
|
|
72
|
+
})();
|
|
73
|
+
exports.GrpcClientFactory = GrpcClientFactory;
|
|
74
|
+
//# sourceMappingURL=grpc-client.factory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grpc-client.factory.js","sourceRoot":"","sources":["../../../lib/grpc/factory/grpc-client.factory.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,yDAK+B;IAGlB,iBAAiB;4BAD7B,IAAA,mBAAU,GAAE;;;;;;;;YACb,6KAqBC;;;YArBY,uDAAiB;;QACrB,OAAO,GAAG,IAAI,GAAG,EAAsB,CAAC;QAEhD,YAAY,CAAC,OAA+B;YAC3C,OAAO,kCAAkB,CAAC,MAAM,CAAC;gBAChC,SAAS,EAAE,yBAAS,CAAC,IAAI;gBACzB,OAAO;aACP,CAAC,CAAC;QACJ,CAAC;QAED,QAAQ,CAAC,KAAa,EAAE,MAAkB;YACzC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QACjC,CAAC;QAED,SAAS,CAAoC,KAAa;YACzD,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YAEvC,IAAI,CAAC,MAAM;gBAAE,MAAM,IAAI,KAAK,CAAC,gBAAgB,KAAK,aAAa,CAAC,CAAC;YAEjE,OAAO,MAAW,CAAC;QACpB,CAAC;;;;AApBW,8CAAiB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grpc.module.d.ts","sourceRoot":"","sources":["../../lib/grpc/grpc.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAoB,MAAM,gBAAgB,CAAC;AAKjE,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD,qBACa,UAAU;IACtB,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,KAAK,CAAC,MAAM,OAAO,YAAY,CAAC,GAAG,aAAa;CAiCzE"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
3
|
+
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
4
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
5
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
6
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
7
|
+
var _, done = false;
|
|
8
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
9
|
+
var context = {};
|
|
10
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
11
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
12
|
+
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
13
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
14
|
+
if (kind === "accessor") {
|
|
15
|
+
if (result === void 0) continue;
|
|
16
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
17
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
18
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
19
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
20
|
+
}
|
|
21
|
+
else if (_ = accept(result)) {
|
|
22
|
+
if (kind === "field") initializers.unshift(_);
|
|
23
|
+
else descriptor[key] = _;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
27
|
+
done = true;
|
|
28
|
+
};
|
|
29
|
+
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
|
30
|
+
var useValue = arguments.length > 2;
|
|
31
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
32
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
33
|
+
}
|
|
34
|
+
return useValue ? value : void 0;
|
|
35
|
+
};
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.GrpcModule = void 0;
|
|
38
|
+
const common_1 = require("@nestjs/common");
|
|
39
|
+
const config_1 = require("@nestjs/config");
|
|
40
|
+
const grpc_constants_1 = require("./constants/grpc.constants");
|
|
41
|
+
const grpc_client_factory_1 = require("./factory/grpc-client.factory");
|
|
42
|
+
const grpc_registry_1 = require("./registry/grpc.registry");
|
|
43
|
+
let GrpcModule = (() => {
|
|
44
|
+
let _classDecorators = [(0, common_1.Module)({})];
|
|
45
|
+
let _classDescriptor;
|
|
46
|
+
let _classExtraInitializers = [];
|
|
47
|
+
let _classThis;
|
|
48
|
+
var GrpcModule = class {
|
|
49
|
+
static { _classThis = this; }
|
|
50
|
+
static {
|
|
51
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
|
|
52
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
53
|
+
GrpcModule = _classThis = _classDescriptor.value;
|
|
54
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
55
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
56
|
+
}
|
|
57
|
+
static register(clients) {
|
|
58
|
+
return {
|
|
59
|
+
module: GrpcModule,
|
|
60
|
+
providers: [
|
|
61
|
+
grpc_client_factory_1.GrpcClientFactory,
|
|
62
|
+
...clients.map((token) => {
|
|
63
|
+
const cfg = grpc_registry_1.GRPC_CLIENTS[token];
|
|
64
|
+
return {
|
|
65
|
+
provide: `${grpc_constants_1.GRPC_CLIENT_PREFIX}_${token}`,
|
|
66
|
+
useFactory: (factory, config) => {
|
|
67
|
+
const url = config.getOrThrow(cfg.env);
|
|
68
|
+
const client = factory.createClient({
|
|
69
|
+
package: cfg.package,
|
|
70
|
+
protoPath: cfg.protoPath,
|
|
71
|
+
url,
|
|
72
|
+
});
|
|
73
|
+
factory.register(token, client);
|
|
74
|
+
return client;
|
|
75
|
+
},
|
|
76
|
+
inject: [grpc_client_factory_1.GrpcClientFactory, config_1.ConfigService],
|
|
77
|
+
};
|
|
78
|
+
}),
|
|
79
|
+
],
|
|
80
|
+
exports: [
|
|
81
|
+
grpc_client_factory_1.GrpcClientFactory,
|
|
82
|
+
...clients.map((token) => `${grpc_constants_1.GRPC_CLIENT_PREFIX}_${token}`),
|
|
83
|
+
],
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
return GrpcModule = _classThis;
|
|
88
|
+
})();
|
|
89
|
+
exports.GrpcModule = GrpcModule;
|
|
90
|
+
//# sourceMappingURL=grpc.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grpc.module.js","sourceRoot":"","sources":["../../lib/grpc/grpc.module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAAiE;AACjE,2CAA+C;AAE/C,+DAAgE;AAChE,uEAAkE;AAClE,4DAAwD;IAG3C,UAAU;4BADtB,IAAA,eAAM,EAAC,EAAE,CAAC;;;;;;;;YACX,6KAkCC;;;YAlCY,uDAAU;;QACtB,MAAM,CAAC,QAAQ,CAAC,OAAyC;YACxD,OAAO;gBACN,MAAM,EAAE,UAAU;gBAClB,SAAS,EAAE;oBACV,uCAAiB;oBACjB,GAAG,OAAO,CAAC,GAAG,CAAW,CAAC,KAAK,EAAE,EAAE;wBAClC,MAAM,GAAG,GAAG,4BAAY,CAAC,KAAK,CAAC,CAAC;wBAEhC,OAAO;4BACN,OAAO,EAAE,GAAG,mCAAkB,IAAI,KAAK,EAAE;4BACzC,UAAU,EAAE,CAAC,OAA0B,EAAE,MAAqB,EAAE,EAAE;gCACjE,MAAM,GAAG,GAAG,MAAM,CAAC,UAAU,CAAS,GAAG,CAAC,GAAG,CAAC,CAAC;gCAE/C,MAAM,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;oCACnC,OAAO,EAAE,GAAG,CAAC,OAAO;oCACpB,SAAS,EAAE,GAAG,CAAC,SAAS;oCACxB,GAAG;iCACH,CAAC,CAAC;gCAEH,OAAO,CAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;gCAEhC,OAAO,MAAM,CAAC;4BACf,CAAC;4BACD,MAAM,EAAE,CAAC,uCAAiB,EAAE,sBAAa,CAAC;yBAC1C,CAAC;oBACH,CAAC,CAAC;iBACF;gBACD,OAAO,EAAE;oBACR,uCAAiB;oBACjB,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,GAAG,mCAAkB,IAAI,KAAK,EAAE,CAAC;iBAC3D;aACD,CAAC;QACH,CAAC;;;;AAjCW,gCAAU"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/grpc/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./decorators"), exports);
|
|
18
|
+
__exportStar(require("./grpc.module"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/grpc/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,gDAA8B"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const GRPC_CLIENTS: {
|
|
2
|
+
readonly AUTH_PACKAGE: {
|
|
3
|
+
readonly package: "auth.v1";
|
|
4
|
+
readonly protoPath: string;
|
|
5
|
+
readonly env: "AUTH_GRPC_URL";
|
|
6
|
+
};
|
|
7
|
+
readonly ACCOUNT_PACKAGE: {
|
|
8
|
+
readonly package: "accounts.v1";
|
|
9
|
+
readonly protoPath: string;
|
|
10
|
+
readonly env: "AUTH_GRPC_URL";
|
|
11
|
+
};
|
|
12
|
+
readonly USERS_PACKAGE: {
|
|
13
|
+
readonly package: "users.v1";
|
|
14
|
+
readonly protoPath: string;
|
|
15
|
+
readonly env: "USERS_GRPC_URL";
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=grpc.registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grpc.registry.d.ts","sourceRoot":"","sources":["../../../lib/grpc/registry/grpc.registry.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;CAgBf,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GRPC_CLIENTS = void 0;
|
|
4
|
+
const contracts_1 = require("@mondocinema/contracts");
|
|
5
|
+
exports.GRPC_CLIENTS = {
|
|
6
|
+
AUTH_PACKAGE: {
|
|
7
|
+
package: "auth.v1",
|
|
8
|
+
protoPath: contracts_1.PROTO_PATHS.AUTH,
|
|
9
|
+
env: "AUTH_GRPC_URL",
|
|
10
|
+
},
|
|
11
|
+
ACCOUNT_PACKAGE: {
|
|
12
|
+
package: "accounts.v1",
|
|
13
|
+
protoPath: contracts_1.PROTO_PATHS.ACCOUNTS,
|
|
14
|
+
env: "AUTH_GRPC_URL",
|
|
15
|
+
},
|
|
16
|
+
USERS_PACKAGE: {
|
|
17
|
+
package: "users.v1",
|
|
18
|
+
protoPath: contracts_1.PROTO_PATHS.USERS,
|
|
19
|
+
env: "USERS_GRPC_URL",
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=grpc.registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grpc.registry.js","sourceRoot":"","sources":["../../../lib/grpc/registry/grpc.registry.ts"],"names":[],"mappings":";;;AAAA,sDAAqD;AAExC,QAAA,YAAY,GAAG;IAC3B,YAAY,EAAE;QACb,OAAO,EAAE,SAAS;QAClB,SAAS,EAAE,uBAAW,CAAC,IAAI;QAC3B,GAAG,EAAE,eAAe;KACpB;IACD,eAAe,EAAE;QAChB,OAAO,EAAE,aAAa;QACtB,SAAS,EAAE,uBAAW,CAAC,QAAQ;QAC/B,GAAG,EAAE,eAAe;KACpB;IACD,aAAa,EAAE;QACd,OAAO,EAAE,UAAU;QACnB,SAAS,EAAE,uBAAW,CAAC,KAAK;QAC5B,GAAG,EAAE,gBAAgB;KACrB;CACQ,CAAC"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -15,4 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./enums"), exports);
|
|
18
|
+
__exportStar(require("./grpc"), exports);
|
|
19
|
+
__exportStar(require("./utils"), exports);
|
|
18
20
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,yCAAuB;AACvB,0CAAwB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convert-enum.d.ts","sourceRoot":"","sources":["../../lib/utils/convert-enum.ts"],"names":[],"mappings":"AAAA,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,EAC3C,MAAM,EAAE,CAAC,EACT,KAAK,EAAE,MAAM,GACX,CAAC,CAAC,MAAM,CAAC,CAAC,CAEZ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convert-enum.js","sourceRoot":"","sources":["../../lib/utils/convert-enum.ts"],"names":[],"mappings":";;AAAA,kCAKC;AALD,SAAgB,WAAW,CAC1B,MAAS,EACT,KAAa;IAEb,OAAQ,MAAc,CAAC,KAAK,CAAC,CAAC;AAC/B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./convert-enum"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mondocinema/common",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Core shared components for MondoCinema microservices ecosystem",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -19,5 +19,11 @@
|
|
|
19
19
|
"@types/node": "^25.0.3",
|
|
20
20
|
"prettier": "^3.7.4",
|
|
21
21
|
"typescript": "^5.9.3"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@mondocinema/contracts": "^1.1.3",
|
|
25
|
+
"@nestjs/common": "^11.1.11",
|
|
26
|
+
"@nestjs/config": "^4.0.2",
|
|
27
|
+
"@nestjs/microservices": "^11.1.11"
|
|
22
28
|
}
|
|
23
29
|
}
|