@mbc-cqrs-serverless/core 1.3.1 → 1.3.3
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/README.md +0 -37
- package/dist/app.module.js +0 -2
- package/dist/app.module.js.map +1 -1
- package/dist/context/invoke.d.ts +0 -1
- package/dist/context/invoke.js.map +1 -1
- package/dist/context/user.d.ts +0 -4
- package/dist/context/user.js +0 -50
- package/dist/context/user.js.map +1 -1
- package/dist/decorators/constants.d.ts +0 -2
- package/dist/decorators/constants.js +1 -3
- package/dist/decorators/constants.js.map +1 -1
- package/dist/decorators/index.d.ts +0 -2
- package/dist/decorators/index.js +0 -2
- package/dist/decorators/index.js.map +1 -1
- package/dist/env.validation.d.ts +0 -19
- package/dist/env.validation.js +1 -22
- package/dist/env.validation.js.map +1 -1
- package/dist/guard/roles.guard.d.ts +1 -11
- package/dist/guard/roles.guard.js +8 -44
- package/dist/guard/roles.guard.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/dist/notifications/appsync.service.d.ts +2 -3
- package/dist/notifications/appsync.service.js +12 -20
- package/dist/notifications/appsync.service.js.map +1 -1
- package/dist/notifications/event/notification.event.handler.d.ts +5 -13
- package/dist/notifications/event/notification.event.handler.js +7 -31
- package/dist/notifications/event/notification.event.handler.js.map +1 -1
- package/dist/notifications/index.d.ts +0 -3
- package/dist/notifications/index.js +0 -3
- package/dist/notifications/index.js.map +1 -1
- package/dist/notifications/notification.module.js +2 -12
- package/dist/notifications/notification.module.js.map +1 -1
- package/dist/services/explorer.service.d.ts +0 -5
- package/dist/services/explorer.service.js +0 -9
- package/dist/services/explorer.service.js.map +1 -1
- package/package.json +2 -2
- package/dist/auth/auth.module.d.ts +0 -2
- package/dist/auth/auth.module.js +0 -30
- package/dist/auth/auth.module.js.map +0 -1
- package/dist/auth/authz-bootstrap.service.d.ts +0 -11
- package/dist/auth/authz-bootstrap.service.js +0 -47
- package/dist/auth/authz-bootstrap.service.js.map +0 -1
- package/dist/auth/group-role-resolver.interface.d.ts +0 -13
- package/dist/auth/group-role-resolver.interface.js +0 -3
- package/dist/auth/group-role-resolver.interface.js.map +0 -1
- package/dist/auth/group-role-resolver.registry.d.ts +0 -6
- package/dist/auth/group-role-resolver.registry.js +0 -26
- package/dist/auth/group-role-resolver.registry.js.map +0 -1
- package/dist/auth/index.d.ts +0 -4
- package/dist/auth/index.js +0 -21
- package/dist/auth/index.js.map +0 -1
- package/dist/decorators/group-role-resolver.decorator.d.ts +0 -9
- package/dist/decorators/group-role-resolver.decorator.js +0 -17
- package/dist/decorators/group-role-resolver.decorator.js.map +0 -1
- package/dist/decorators/notification-transport.decorator.d.ts +0 -6
- package/dist/decorators/notification-transport.decorator.js +0 -14
- package/dist/decorators/notification-transport.decorator.js.map +0 -1
- package/dist/notification-env.validation.d.ts +0 -8
- package/dist/notification-env.validation.js +0 -36
- package/dist/notification-env.validation.js.map +0 -1
- package/dist/notifications/appsync-events.service.d.ts +0 -44
- package/dist/notifications/appsync-events.service.js +0 -147
- package/dist/notifications/appsync-events.service.js.map +0 -1
- package/dist/notifications/enums/index.d.ts +0 -1
- package/dist/notifications/enums/index.js +0 -18
- package/dist/notifications/enums/index.js.map +0 -1
- package/dist/notifications/enums/notification-transport.enum.d.ts +0 -4
- package/dist/notifications/enums/notification-transport.enum.js +0 -9
- package/dist/notifications/enums/notification-transport.enum.js.map +0 -1
- package/dist/notifications/interfaces/index.d.ts +0 -1
- package/dist/notifications/interfaces/index.js +0 -18
- package/dist/notifications/interfaces/index.js.map +0 -1
- package/dist/notifications/interfaces/notification-transport.interface.d.ts +0 -7
- package/dist/notifications/interfaces/notification-transport.interface.js +0 -5
- package/dist/notifications/interfaces/notification-transport.interface.js.map +0 -1
- package/dist/services/mocks/group-role-resolver.mock.d.ts +0 -4
- package/dist/services/mocks/group-role-resolver.mock.js +0 -20
- package/dist/services/mocks/group-role-resolver.mock.js.map +0 -1
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
|
-
var AppSyncEventsService_1;
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.AppSyncEventsService = void 0;
|
|
17
|
-
const node_crypto_1 = require("node:crypto");
|
|
18
|
-
const sha256_js_1 = require("@aws-crypto/sha256-js");
|
|
19
|
-
const credential_provider_node_1 = require("@aws-sdk/credential-provider-node");
|
|
20
|
-
const common_1 = require("@nestjs/common");
|
|
21
|
-
const config_1 = require("@nestjs/config");
|
|
22
|
-
const protocol_http_1 = require("@smithy/protocol-http");
|
|
23
|
-
const signature_v4_1 = require("@smithy/signature-v4");
|
|
24
|
-
const node_fetch_1 = __importDefault(require("node-fetch"));
|
|
25
|
-
const decorators_1 = require("../decorators");
|
|
26
|
-
const enums_1 = require("./enums");
|
|
27
|
-
/** Default headers required for AppSync Events API requests */
|
|
28
|
-
const DEFAULT_HEADERS = {
|
|
29
|
-
accept: 'application/json, text/javascript',
|
|
30
|
-
'content-encoding': 'amz-1.0',
|
|
31
|
-
'content-type': 'application/json; charset=UTF-8',
|
|
32
|
-
};
|
|
33
|
-
let AppSyncEventsService = AppSyncEventsService_1 = class AppSyncEventsService {
|
|
34
|
-
constructor(config) {
|
|
35
|
-
this.config = config;
|
|
36
|
-
this.logger = new common_1.Logger(AppSyncEventsService_1.name);
|
|
37
|
-
const endpoint = config.get('APPSYNC_EVENTS_ENDPOINT');
|
|
38
|
-
this.namespace = config.get('APPSYNC_EVENTS_NAMESPACE') ?? 'default';
|
|
39
|
-
if (endpoint) {
|
|
40
|
-
this.url = new URL(endpoint);
|
|
41
|
-
// Region is parsed from the hostname automatically:
|
|
42
|
-
// <id>.appsync-api.<region>.amazonaws.com → region
|
|
43
|
-
// Falls back to AWS_REGION env var (always set in Lambda runtime).
|
|
44
|
-
const match = this.url.hostname.match(/\w+\.appsync-api\.([\w-]+)\.amazonaws\.com/);
|
|
45
|
-
const region = match?.[1] ?? process.env.AWS_REGION ?? 'ap-northeast-1';
|
|
46
|
-
this.signer = new signature_v4_1.SignatureV4({
|
|
47
|
-
credentials: (0, credential_provider_node_1.defaultProvider)(),
|
|
48
|
-
service: 'appsync',
|
|
49
|
-
region,
|
|
50
|
-
sha256: sha256_js_1.Sha256,
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Publish INotification to an AppSync Events channel via IAM SigV4.
|
|
56
|
-
*
|
|
57
|
-
* Channel structure (max 5 segments, seg 1 = namespace):
|
|
58
|
-
* /{namespace}/{tenantCode}/{action}/{sanitizedId}
|
|
59
|
-
*
|
|
60
|
-
* Client subscription options (wildcard /* catches all sub-channels):
|
|
61
|
-
* /{namespace}/{tenantCode}/* — all events for tenant
|
|
62
|
-
* /{namespace}/{tenantCode}/{action}/* — filtered by action
|
|
63
|
-
* /{namespace}/{tenantCode}/{action}/{id} — specific command
|
|
64
|
-
*
|
|
65
|
-
* Requires: Lambda execution role must have appsync:EventPublish permission.
|
|
66
|
-
*/
|
|
67
|
-
async sendMessage(notification) {
|
|
68
|
-
if (!this.url || !this.signer) {
|
|
69
|
-
this.logger.warn('APPSYNC_EVENTS_ENDPOINT not set, skipping');
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
const channel = this.resolveChannel(notification);
|
|
73
|
-
this.logger.debug(`sendMessage:: channel=${channel}`);
|
|
74
|
-
await this.postToChannel(channel, notification);
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Resolves the most specific channel path for a notification.
|
|
78
|
-
* Non-alphanumeric characters (e.g. #, @) are sanitized to dashes
|
|
79
|
-
* since AppSync Events channel segments only allow [a-zA-Z0-9-].
|
|
80
|
-
*/
|
|
81
|
-
resolveChannel(notification) {
|
|
82
|
-
const namespace = this.sanitizeSegment(this.namespace);
|
|
83
|
-
const tenantCode = this.sanitizeSegment(notification.tenantCode);
|
|
84
|
-
const action = this.sanitizeSegment(notification.action);
|
|
85
|
-
const id = this.sanitizeSegment(notification.id);
|
|
86
|
-
return `/${namespace}/${tenantCode}/${action}/${id}`;
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Formats a string to comply with AppSync Events API channel segment rules:
|
|
90
|
-
* 1. Only alphanumeric characters and dashes.
|
|
91
|
-
* 2. Cannot start or end with a dash.
|
|
92
|
-
* 3. Maximum length of 50 characters.
|
|
93
|
-
*/
|
|
94
|
-
sanitizeSegment(segment) {
|
|
95
|
-
if (!segment)
|
|
96
|
-
return 'none';
|
|
97
|
-
// Replace any non-alphanumeric character (like _, %, =) with a dash
|
|
98
|
-
let s = segment.replace(/[^a-zA-Z0-9]/g, '-');
|
|
99
|
-
// Truncate to AWS's strict 50 character limit
|
|
100
|
-
s = s.substring(0, 50);
|
|
101
|
-
// Strip out any dashes from the very beginning or end
|
|
102
|
-
s = s.replace(/^-+|-+$/g, '');
|
|
103
|
-
// Fallback if the string became empty after trimming
|
|
104
|
-
return s || 'none';
|
|
105
|
-
}
|
|
106
|
-
async postToChannel(channel, notification) {
|
|
107
|
-
const signedReq = await this.signRequest(channel, notification);
|
|
108
|
-
const res = await (0, node_fetch_1.default)(this.url.toString(), {
|
|
109
|
-
method: signedReq.method,
|
|
110
|
-
headers: signedReq.headers,
|
|
111
|
-
body: signedReq.body,
|
|
112
|
-
});
|
|
113
|
-
if (!res.ok) {
|
|
114
|
-
const text = await res.text();
|
|
115
|
-
throw new Error(`AppSync Events publish failed [${res.status}] on channel ${channel}: ${text}`);
|
|
116
|
-
}
|
|
117
|
-
this.logger.debug(`sendMessage:: published successfully to ${channel}`);
|
|
118
|
-
}
|
|
119
|
-
/**
|
|
120
|
-
* Builds and signs an HttpRequest for the given channel and notification.
|
|
121
|
-
* Separating signing from the fetch call makes each step independently testable.
|
|
122
|
-
*/
|
|
123
|
-
async signRequest(channel, notification) {
|
|
124
|
-
const body = JSON.stringify({
|
|
125
|
-
id: (0, node_crypto_1.randomUUID)(),
|
|
126
|
-
channel,
|
|
127
|
-
events: [JSON.stringify(notification)],
|
|
128
|
-
});
|
|
129
|
-
const httpRequest = new protocol_http_1.HttpRequest({
|
|
130
|
-
method: 'POST',
|
|
131
|
-
headers: {
|
|
132
|
-
...DEFAULT_HEADERS,
|
|
133
|
-
host: this.url.hostname,
|
|
134
|
-
},
|
|
135
|
-
body,
|
|
136
|
-
hostname: this.url.hostname,
|
|
137
|
-
path: this.url.pathname,
|
|
138
|
-
});
|
|
139
|
-
return this.signer.sign(httpRequest);
|
|
140
|
-
}
|
|
141
|
-
};
|
|
142
|
-
exports.AppSyncEventsService = AppSyncEventsService;
|
|
143
|
-
exports.AppSyncEventsService = AppSyncEventsService = AppSyncEventsService_1 = __decorate([
|
|
144
|
-
(0, decorators_1.NotificationTransport)(enums_1.NotificationTransports.APPSYNC_EVENT),
|
|
145
|
-
__metadata("design:paramtypes", [config_1.ConfigService])
|
|
146
|
-
], AppSyncEventsService);
|
|
147
|
-
//# sourceMappingURL=appsync-events.service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"appsync-events.service.js","sourceRoot":"","sources":["../../src/notifications/appsync-events.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAAwC;AAExC,qDAA8C;AAC9C,gFAAmE;AACnE,2CAAuC;AACvC,2CAA8C;AAC9C,yDAAmD;AACnD,uDAAkD;AAClD,4DAA8B;AAE9B,8CAAqD;AAErD,mCAAgD;AAGhD,+DAA+D;AAC/D,MAAM,eAAe,GAAG;IACtB,MAAM,EAAE,mCAAmC;IAC3C,kBAAkB,EAAE,SAAS;IAC7B,cAAc,EAAE,iCAAiC;CAClD,CAAA;AAGM,IAAM,oBAAoB,4BAA1B,MAAM,oBAAoB;IAO/B,YAA6B,MAAqB;QAArB,WAAM,GAAN,MAAM,CAAe;QANjC,WAAM,GAAG,IAAI,eAAM,CAAC,sBAAoB,CAAC,IAAI,CAAC,CAAA;QAO7D,MAAM,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAS,yBAAyB,CAAC,CAAA;QAC9D,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,GAAG,CAAS,0BAA0B,CAAC,IAAI,SAAS,CAAA;QAE5E,IAAI,QAAQ,EAAE,CAAC;YACb,IAAI,CAAC,GAAG,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAA;YAE5B,oDAAoD;YACpD,qDAAqD;YACrD,mEAAmE;YACnE,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,CACnC,4CAA4C,CAC7C,CAAA;YACD,MAAM,MAAM,GAAG,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,UAAU,IAAI,gBAAgB,CAAA;YAEvE,IAAI,CAAC,MAAM,GAAG,IAAI,0BAAW,CAAC;gBAC5B,WAAW,EAAE,IAAA,0CAAe,GAAE;gBAC9B,OAAO,EAAE,SAAS;gBAClB,MAAM;gBACN,MAAM,EAAE,kBAAM;aACf,CAAC,CAAA;QACJ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E,IAAI,CAAC,GAAI,CAAC,QAAQ;SACzB,CAAC,CAAA;QAEF,OAAO,IAAI,CAAC,MAAO,CAAC,IAAI,CAAC,WAAW,CAAyB,CAAA;IAC/D,CAAC;CACF,CAAA;AA5IY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,kCAAqB,EAAC,8BAAsB,CAAC,aAAa,CAAC;qCAQrB,sBAAa;GAPvC,oBAAoB,CA4IhC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './notification-transport.enum';
|
|
@@ -1,18 +0,0 @@
|
|
|
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("./notification-transport.enum"), exports);
|
|
18
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/notifications/enums/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gEAA6C"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NotificationTransports = void 0;
|
|
4
|
-
var NotificationTransports;
|
|
5
|
-
(function (NotificationTransports) {
|
|
6
|
-
NotificationTransports["APPSYNC_GRAPHQL"] = "appsync-graphql";
|
|
7
|
-
NotificationTransports["APPSYNC_EVENT"] = "appsync-event";
|
|
8
|
-
})(NotificationTransports || (exports.NotificationTransports = NotificationTransports = {}));
|
|
9
|
-
//# sourceMappingURL=notification-transport.enum.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"notification-transport.enum.js","sourceRoot":"","sources":["../../../src/notifications/enums/notification-transport.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,sBAGX;AAHD,WAAY,sBAAsB;IAChC,6DAAmC,CAAA;IACnC,yDAA+B,CAAA;AACjC,CAAC,EAHW,sBAAsB,sCAAtB,sBAAsB,QAGjC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './notification-transport.interface';
|
|
@@ -1,18 +0,0 @@
|
|
|
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("./notification-transport.interface"), exports);
|
|
18
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/notifications/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qEAAkD"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { INotification } from '../../interfaces';
|
|
2
|
-
export declare const NOTIFICATION_TRANSPORT = "NOTIFICATION_TRANSPORT";
|
|
3
|
-
export interface INotificationTransport {
|
|
4
|
-
name?: string;
|
|
5
|
-
sendMessage(notification: INotification): Promise<void>;
|
|
6
|
-
}
|
|
7
|
-
export type NotificationTransportMap = Map<string, INotificationTransport>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"notification-transport.interface.js","sourceRoot":"","sources":["../../../src/notifications/interfaces/notification-transport.interface.ts"],"names":[],"mappings":";;;AAEa,QAAA,sBAAsB,GAAG,wBAAwB,CAAA"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.MockGroupRoleResolver = void 0;
|
|
10
|
-
const decorators_1 = require("../../decorators");
|
|
11
|
-
let MockGroupRoleResolver = class MockGroupRoleResolver {
|
|
12
|
-
async resolveRoles() {
|
|
13
|
-
return [];
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
exports.MockGroupRoleResolver = MockGroupRoleResolver;
|
|
17
|
-
exports.MockGroupRoleResolver = MockGroupRoleResolver = __decorate([
|
|
18
|
-
(0, decorators_1.GroupRoleResolver)()
|
|
19
|
-
], MockGroupRoleResolver);
|
|
20
|
-
//# sourceMappingURL=group-role-resolver.mock.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"group-role-resolver.mock.js","sourceRoot":"","sources":["../../../src/services/mocks/group-role-resolver.mock.ts"],"names":[],"mappings":";;;;;;;;;AACA,iDAAoD;AAG7C,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAChC,KAAK,CAAC,YAAY;QAChB,OAAO,EAAE,CAAA;IACX,CAAC;CACF,CAAA;AAJY,sDAAqB;gCAArB,qBAAqB;IADjC,IAAA,8BAAiB,GAAE;GACP,qBAAqB,CAIjC"}
|