@application-kit/audit-log 0.0.0-stage → 0.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/CHANGELOG.md +17 -0
- package/LICENSE +21 -0
- package/README.md +52 -2
- package/dist/cjs/audit-log.wire.d.ts +10 -0
- package/dist/cjs/audit-log.wire.js +2 -0
- package/dist/cjs/constants.d.ts +8 -0
- package/dist/cjs/constants.js +4 -0
- package/dist/cjs/index.d.ts +2 -0
- package/dist/cjs/index.js +18 -0
- package/dist/cjs/nest/application/index.d.ts +2 -0
- package/dist/cjs/nest/application/index.js +18 -0
- package/dist/cjs/nest/application/ports/audit-log-read.interface.d.ts +3 -0
- package/dist/cjs/nest/application/ports/audit-log-read.interface.js +2 -0
- package/dist/cjs/nest/application/ports/audit-log-write.interface.d.ts +4 -0
- package/dist/cjs/nest/application/ports/audit-log-write.interface.js +2 -0
- package/dist/cjs/nest/application/ports/index.d.ts +2 -0
- package/dist/cjs/nest/application/ports/index.js +18 -0
- package/dist/cjs/nest/application/queries/dtos/audit-record.dto.d.ts +21 -0
- package/dist/cjs/nest/application/queries/dtos/audit-record.dto.js +24 -0
- package/dist/cjs/nest/application/queries/dtos/index.d.ts +1 -0
- package/dist/cjs/nest/application/queries/dtos/index.js +17 -0
- package/dist/cjs/nest/application/queries/get-audit-records.query.d.ts +6 -0
- package/dist/cjs/nest/application/queries/get-audit-records.query.js +7 -0
- package/dist/cjs/nest/application/queries/handlers/get-audit-records.handler.d.ts +9 -0
- package/dist/cjs/nest/application/queries/handlers/get-audit-records.handler.js +35 -0
- package/dist/cjs/nest/application/queries/handlers/index.d.ts +1 -0
- package/dist/cjs/nest/application/queries/handlers/index.js +17 -0
- package/dist/cjs/nest/application/queries/index.d.ts +3 -0
- package/dist/cjs/nest/application/queries/index.js +19 -0
- package/dist/cjs/nest/audit-log-consumers.module.d.ts +2 -0
- package/dist/cjs/nest/audit-log-consumers.module.js +22 -0
- package/dist/cjs/nest/audit-log-request-facts.module.d.ts +2 -0
- package/dist/cjs/nest/audit-log-request-facts.module.js +22 -0
- package/dist/cjs/nest/audit-log-web.module.d.ts +8 -0
- package/dist/cjs/nest/audit-log-web.module.js +39 -0
- package/dist/cjs/nest/audit-log.module.d.ts +2 -0
- package/dist/cjs/nest/audit-log.module.js +37 -0
- package/dist/cjs/nest/constants.d.ts +3 -0
- package/dist/cjs/nest/constants.js +6 -0
- package/dist/cjs/nest/domain/audit-record.d.ts +15 -0
- package/dist/cjs/nest/domain/audit-record.js +15 -0
- package/dist/cjs/nest/domain/index.d.ts +1 -0
- package/dist/cjs/nest/domain/index.js +17 -0
- package/dist/cjs/nest/index.d.ts +11 -0
- package/dist/cjs/nest/index.js +27 -0
- package/dist/cjs/nest/infrastructure/database/index.d.ts +1 -0
- package/dist/cjs/nest/infrastructure/database/index.js +17 -0
- package/dist/cjs/nest/infrastructure/database/typeorm/entities/audit-record.entity.d.ts +11 -0
- package/dist/cjs/nest/infrastructure/database/typeorm/entities/audit-record.entity.js +69 -0
- package/dist/cjs/nest/infrastructure/database/typeorm/entities/index.d.ts +1 -0
- package/dist/cjs/nest/infrastructure/database/typeorm/entities/index.js +17 -0
- package/dist/cjs/nest/infrastructure/database/typeorm/index.d.ts +5 -0
- package/dist/cjs/nest/infrastructure/database/typeorm/index.js +21 -0
- package/dist/cjs/nest/infrastructure/database/typeorm/mappers/audit-record.mapper.d.ts +10 -0
- package/dist/cjs/nest/infrastructure/database/typeorm/mappers/audit-record.mapper.js +35 -0
- package/dist/cjs/nest/infrastructure/database/typeorm/mappers/index.d.ts +1 -0
- package/dist/cjs/nest/infrastructure/database/typeorm/mappers/index.js +17 -0
- package/dist/cjs/nest/infrastructure/database/typeorm/migrations/audit-records-append-only.migration.d.ts +6 -0
- package/dist/cjs/nest/infrastructure/database/typeorm/migrations/audit-records-append-only.migration.js +28 -0
- package/dist/cjs/nest/infrastructure/database/typeorm/migrations/index.d.ts +1 -0
- package/dist/cjs/nest/infrastructure/database/typeorm/migrations/index.js +17 -0
- package/dist/cjs/nest/infrastructure/database/typeorm/orm.d.ts +6 -0
- package/dist/cjs/nest/infrastructure/database/typeorm/orm.js +9 -0
- package/dist/cjs/nest/infrastructure/database/typeorm/repositories/audit-record.repository.d.ts +14 -0
- package/dist/cjs/nest/infrastructure/database/typeorm/repositories/audit-record.repository.js +47 -0
- package/dist/cjs/nest/infrastructure/database/typeorm/repositories/index.d.ts +1 -0
- package/dist/cjs/nest/infrastructure/database/typeorm/repositories/index.js +17 -0
- package/dist/cjs/nest/infrastructure/index.d.ts +1 -0
- package/dist/cjs/nest/infrastructure/index.js +17 -0
- package/dist/cjs/nest/libs/audit-request-context.d.ts +25 -0
- package/dist/cjs/nest/libs/audit-request-context.js +23 -0
- package/dist/cjs/nest/libs/index.d.ts +1 -0
- package/dist/cjs/nest/libs/index.js +17 -0
- package/dist/cjs/nest/policy-handlers.d.ts +2 -0
- package/dist/cjs/nest/policy-handlers.js +5 -0
- package/dist/cjs/nest/user-interface/consumers/audit-facts.dto.d.ts +6 -0
- package/dist/cjs/nest/user-interface/consumers/audit-facts.dto.js +40 -0
- package/dist/cjs/nest/user-interface/consumers/audited-fact.dto.d.ts +5 -0
- package/dist/cjs/nest/user-interface/consumers/audited-fact.dto.js +30 -0
- package/dist/cjs/nest/user-interface/consumers/index.d.ts +3 -0
- package/dist/cjs/nest/user-interface/consumers/index.js +19 -0
- package/dist/cjs/nest/user-interface/consumers/record-audit-fact.handler.d.ts +13 -0
- package/dist/cjs/nest/user-interface/consumers/record-audit-fact.handler.js +44 -0
- package/dist/cjs/nest/user-interface/controllers/graphql/audit-records/audit-record-item.type.d.ts +11 -0
- package/dist/cjs/nest/user-interface/controllers/graphql/audit-records/audit-record-item.type.js +59 -0
- package/dist/cjs/nest/user-interface/controllers/graphql/audit-records/audit-records.resolver.d.ts +8 -0
- package/dist/cjs/nest/user-interface/controllers/graphql/audit-records/audit-records.resolver.js +58 -0
- package/dist/cjs/nest/user-interface/controllers/graphql/audit-records/audit-records.type.d.ts +8 -0
- package/dist/cjs/nest/user-interface/controllers/graphql/audit-records/audit-records.type.js +36 -0
- package/dist/cjs/nest/user-interface/controllers/graphql/audit-records/index.d.ts +3 -0
- package/dist/cjs/nest/user-interface/controllers/graphql/audit-records/index.js +19 -0
- package/dist/cjs/nest/user-interface/controllers/graphql/index.d.ts +1 -0
- package/dist/cjs/nest/user-interface/controllers/graphql/index.js +17 -0
- package/dist/cjs/nest/user-interface/controllers/index.d.ts +1 -0
- package/dist/cjs/nest/user-interface/controllers/index.js +17 -0
- package/dist/cjs/nest/user-interface/index.d.ts +3 -0
- package/dist/cjs/nest/user-interface/index.js +19 -0
- package/dist/cjs/nest/user-interface/interceptors/audit-request-context.interceptor.d.ts +8 -0
- package/dist/cjs/nest/user-interface/interceptors/audit-request-context.interceptor.js +36 -0
- package/dist/cjs/nest/user-interface/interceptors/index.d.ts +1 -0
- package/dist/cjs/nest/user-interface/interceptors/index.js +17 -0
- package/dist/cjs/package.json +3 -0
- package/dist/cjs/testing/audit-log-read.fake.d.ts +14 -0
- package/dist/cjs/testing/audit-log-read.fake.js +16 -0
- package/dist/cjs/testing/audit-log-write.fake.d.ts +8 -0
- package/dist/cjs/testing/audit-log-write.fake.js +18 -0
- package/dist/cjs/testing/index.d.ts +2 -0
- package/dist/cjs/testing/index.js +18 -0
- package/dist/esm/audit-log.wire.d.ts +10 -0
- package/dist/esm/audit-log.wire.js +1 -0
- package/dist/esm/constants.d.ts +8 -0
- package/dist/esm/constants.js +1 -0
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/nest/application/index.d.ts +2 -0
- package/dist/esm/nest/application/index.js +2 -0
- package/dist/esm/nest/application/ports/audit-log-read.interface.d.ts +3 -0
- package/dist/esm/nest/application/ports/audit-log-read.interface.js +1 -0
- package/dist/esm/nest/application/ports/audit-log-write.interface.d.ts +4 -0
- package/dist/esm/nest/application/ports/audit-log-write.interface.js +1 -0
- package/dist/esm/nest/application/ports/index.d.ts +2 -0
- package/dist/esm/nest/application/ports/index.js +2 -0
- package/dist/esm/nest/application/queries/dtos/audit-record.dto.d.ts +21 -0
- package/dist/esm/nest/application/queries/dtos/audit-record.dto.js +20 -0
- package/dist/esm/nest/application/queries/dtos/index.d.ts +1 -0
- package/dist/esm/nest/application/queries/dtos/index.js +1 -0
- package/dist/esm/nest/application/queries/get-audit-records.query.d.ts +6 -0
- package/dist/esm/nest/application/queries/get-audit-records.query.js +3 -0
- package/dist/esm/nest/application/queries/handlers/get-audit-records.handler.d.ts +9 -0
- package/dist/esm/nest/application/queries/handlers/get-audit-records.handler.js +32 -0
- package/dist/esm/nest/application/queries/handlers/index.d.ts +1 -0
- package/dist/esm/nest/application/queries/handlers/index.js +1 -0
- package/dist/esm/nest/application/queries/index.d.ts +3 -0
- package/dist/esm/nest/application/queries/index.js +3 -0
- package/dist/esm/nest/audit-log-consumers.module.d.ts +2 -0
- package/dist/esm/nest/audit-log-consumers.module.js +19 -0
- package/dist/esm/nest/audit-log-request-facts.module.d.ts +2 -0
- package/dist/esm/nest/audit-log-request-facts.module.js +19 -0
- package/dist/esm/nest/audit-log-web.module.d.ts +8 -0
- package/dist/esm/nest/audit-log-web.module.js +36 -0
- package/dist/esm/nest/audit-log.module.d.ts +2 -0
- package/dist/esm/nest/audit-log.module.js +34 -0
- package/dist/esm/nest/constants.d.ts +3 -0
- package/dist/esm/nest/constants.js +3 -0
- package/dist/esm/nest/domain/audit-record.d.ts +15 -0
- package/dist/esm/nest/domain/audit-record.js +11 -0
- package/dist/esm/nest/domain/index.d.ts +1 -0
- package/dist/esm/nest/domain/index.js +1 -0
- package/dist/esm/nest/index.d.ts +11 -0
- package/dist/esm/nest/index.js +11 -0
- package/dist/esm/nest/infrastructure/database/index.d.ts +1 -0
- package/dist/esm/nest/infrastructure/database/index.js +1 -0
- package/dist/esm/nest/infrastructure/database/typeorm/entities/audit-record.entity.d.ts +11 -0
- package/dist/esm/nest/infrastructure/database/typeorm/entities/audit-record.entity.js +66 -0
- package/dist/esm/nest/infrastructure/database/typeorm/entities/index.d.ts +1 -0
- package/dist/esm/nest/infrastructure/database/typeorm/entities/index.js +1 -0
- package/dist/esm/nest/infrastructure/database/typeorm/index.d.ts +5 -0
- package/dist/esm/nest/infrastructure/database/typeorm/index.js +5 -0
- package/dist/esm/nest/infrastructure/database/typeorm/mappers/audit-record.mapper.d.ts +10 -0
- package/dist/esm/nest/infrastructure/database/typeorm/mappers/audit-record.mapper.js +31 -0
- package/dist/esm/nest/infrastructure/database/typeorm/mappers/index.d.ts +1 -0
- package/dist/esm/nest/infrastructure/database/typeorm/mappers/index.js +1 -0
- package/dist/esm/nest/infrastructure/database/typeorm/migrations/audit-records-append-only.migration.d.ts +6 -0
- package/dist/esm/nest/infrastructure/database/typeorm/migrations/audit-records-append-only.migration.js +24 -0
- package/dist/esm/nest/infrastructure/database/typeorm/migrations/index.d.ts +1 -0
- package/dist/esm/nest/infrastructure/database/typeorm/migrations/index.js +1 -0
- package/dist/esm/nest/infrastructure/database/typeorm/orm.d.ts +6 -0
- package/dist/esm/nest/infrastructure/database/typeorm/orm.js +6 -0
- package/dist/esm/nest/infrastructure/database/typeorm/repositories/audit-record.repository.d.ts +14 -0
- package/dist/esm/nest/infrastructure/database/typeorm/repositories/audit-record.repository.js +44 -0
- package/dist/esm/nest/infrastructure/database/typeorm/repositories/index.d.ts +1 -0
- package/dist/esm/nest/infrastructure/database/typeorm/repositories/index.js +1 -0
- package/dist/esm/nest/infrastructure/index.d.ts +1 -0
- package/dist/esm/nest/infrastructure/index.js +1 -0
- package/dist/esm/nest/libs/audit-request-context.d.ts +25 -0
- package/dist/esm/nest/libs/audit-request-context.js +18 -0
- package/dist/esm/nest/libs/index.d.ts +1 -0
- package/dist/esm/nest/libs/index.js +1 -0
- package/dist/esm/nest/policy-handlers.d.ts +2 -0
- package/dist/esm/nest/policy-handlers.js +1 -0
- package/dist/esm/nest/user-interface/consumers/audit-facts.dto.d.ts +6 -0
- package/dist/esm/nest/user-interface/consumers/audit-facts.dto.js +36 -0
- package/dist/esm/nest/user-interface/consumers/audited-fact.dto.d.ts +5 -0
- package/dist/esm/nest/user-interface/consumers/audited-fact.dto.js +26 -0
- package/dist/esm/nest/user-interface/consumers/index.d.ts +3 -0
- package/dist/esm/nest/user-interface/consumers/index.js +3 -0
- package/dist/esm/nest/user-interface/consumers/record-audit-fact.handler.d.ts +13 -0
- package/dist/esm/nest/user-interface/consumers/record-audit-fact.handler.js +41 -0
- package/dist/esm/nest/user-interface/controllers/graphql/audit-records/audit-record-item.type.d.ts +11 -0
- package/dist/esm/nest/user-interface/controllers/graphql/audit-records/audit-record-item.type.js +56 -0
- package/dist/esm/nest/user-interface/controllers/graphql/audit-records/audit-records.resolver.d.ts +8 -0
- package/dist/esm/nest/user-interface/controllers/graphql/audit-records/audit-records.resolver.js +55 -0
- package/dist/esm/nest/user-interface/controllers/graphql/audit-records/audit-records.type.d.ts +8 -0
- package/dist/esm/nest/user-interface/controllers/graphql/audit-records/audit-records.type.js +33 -0
- package/dist/esm/nest/user-interface/controllers/graphql/audit-records/index.d.ts +3 -0
- package/dist/esm/nest/user-interface/controllers/graphql/audit-records/index.js +3 -0
- package/dist/esm/nest/user-interface/controllers/graphql/index.d.ts +1 -0
- package/dist/esm/nest/user-interface/controllers/graphql/index.js +1 -0
- package/dist/esm/nest/user-interface/controllers/index.d.ts +1 -0
- package/dist/esm/nest/user-interface/controllers/index.js +1 -0
- package/dist/esm/nest/user-interface/index.d.ts +3 -0
- package/dist/esm/nest/user-interface/index.js +3 -0
- package/dist/esm/nest/user-interface/interceptors/audit-request-context.interceptor.d.ts +8 -0
- package/dist/esm/nest/user-interface/interceptors/audit-request-context.interceptor.js +33 -0
- package/dist/esm/nest/user-interface/interceptors/index.d.ts +1 -0
- package/dist/esm/nest/user-interface/interceptors/index.js +1 -0
- package/dist/esm/testing/audit-log-read.fake.d.ts +14 -0
- package/dist/esm/testing/audit-log-read.fake.js +12 -0
- package/dist/esm/testing/audit-log-write.fake.d.ts +8 -0
- package/dist/esm/testing/audit-log-write.fake.js +14 -0
- package/dist/esm/testing/index.d.ts +2 -0
- package/dist/esm/testing/index.js +2 -0
- package/package.json +125 -3
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
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;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { IsOptional, IsString, IsUUID } from 'class-validator';
|
|
11
|
+
export class AuditFactsDto {
|
|
12
|
+
actorId;
|
|
13
|
+
actorRole;
|
|
14
|
+
ip;
|
|
15
|
+
userAgent;
|
|
16
|
+
}
|
|
17
|
+
__decorate([
|
|
18
|
+
IsOptional(),
|
|
19
|
+
IsUUID(),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], AuditFactsDto.prototype, "actorId", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
IsOptional(),
|
|
24
|
+
IsString(),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], AuditFactsDto.prototype, "actorRole", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
IsOptional(),
|
|
29
|
+
IsString(),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], AuditFactsDto.prototype, "ip", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
IsOptional(),
|
|
34
|
+
IsString(),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], AuditFactsDto.prototype, "userAgent", void 0);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
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;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { Type } from 'class-transformer';
|
|
11
|
+
import { IsOptional, IsUUID, ValidateNested } from 'class-validator';
|
|
12
|
+
import { AuditFactsDto } from './audit-facts.dto.js';
|
|
13
|
+
export class AuditedFactDto {
|
|
14
|
+
facts;
|
|
15
|
+
id;
|
|
16
|
+
}
|
|
17
|
+
__decorate([
|
|
18
|
+
IsOptional(),
|
|
19
|
+
Type(() => AuditFactsDto),
|
|
20
|
+
ValidateNested(),
|
|
21
|
+
__metadata("design:type", AuditFactsDto)
|
|
22
|
+
], AuditedFactDto.prototype, "facts", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
IsUUID(),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], AuditedFactDto.prototype, "id", void 0);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { AuditLogWriteInterface } from '../../application/ports/audit-log-write.interface.js';
|
|
2
|
+
import type { AuditFactsDto } from './audit-facts.dto.js';
|
|
3
|
+
export interface AuditFactInterface {
|
|
4
|
+
action: string;
|
|
5
|
+
eventId: null | string;
|
|
6
|
+
facts: AuditFactsDto | undefined;
|
|
7
|
+
subjectId: string;
|
|
8
|
+
}
|
|
9
|
+
export declare class RecordAuditFactHandler {
|
|
10
|
+
private readonly auditLog;
|
|
11
|
+
constructor(auditLog: AuditLogWriteInterface);
|
|
12
|
+
record(fact: AuditFactInterface): Promise<void>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
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;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
11
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
|
+
};
|
|
13
|
+
import { Inject, Injectable } from '@nestjs/common';
|
|
14
|
+
import { AUDIT_LOG_WRITE_PORT } from '../../constants.js';
|
|
15
|
+
import { AuditRecord } from '../../domain/audit-record.js';
|
|
16
|
+
const known = (value) => value ?? null;
|
|
17
|
+
let RecordAuditFactHandler = class RecordAuditFactHandler {
|
|
18
|
+
auditLog;
|
|
19
|
+
constructor(auditLog) {
|
|
20
|
+
this.auditLog = auditLog;
|
|
21
|
+
}
|
|
22
|
+
async record(fact) {
|
|
23
|
+
const { action, eventId, facts, subjectId } = fact;
|
|
24
|
+
const { actorId, actorRole, ip, userAgent } = facts ?? {};
|
|
25
|
+
await this.auditLog.append(AuditRecord.create({
|
|
26
|
+
action,
|
|
27
|
+
actorId: known(actorId),
|
|
28
|
+
actorRole: known(actorRole),
|
|
29
|
+
eventId,
|
|
30
|
+
ip: known(ip),
|
|
31
|
+
subjectId,
|
|
32
|
+
userAgent: known(userAgent),
|
|
33
|
+
}));
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
RecordAuditFactHandler = __decorate([
|
|
37
|
+
Injectable(),
|
|
38
|
+
__param(0, Inject(AUDIT_LOG_WRITE_PORT)),
|
|
39
|
+
__metadata("design:paramtypes", [Object])
|
|
40
|
+
], RecordAuditFactHandler);
|
|
41
|
+
export { RecordAuditFactHandler };
|
package/dist/esm/nest/user-interface/controllers/graphql/audit-records/audit-record-item.type.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { AuditRecordWireInterface } from '../../../../../audit-log.wire.js';
|
|
2
|
+
export declare class AuditRecordItemType implements AuditRecordWireInterface<Date> {
|
|
3
|
+
action: string;
|
|
4
|
+
actorId: null | string;
|
|
5
|
+
actorRole: null | string;
|
|
6
|
+
createdAt: Date;
|
|
7
|
+
id: string;
|
|
8
|
+
ip: null | string;
|
|
9
|
+
subjectId: string;
|
|
10
|
+
userAgent: null | string;
|
|
11
|
+
}
|
package/dist/esm/nest/user-interface/controllers/graphql/audit-records/audit-record-item.type.js
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
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;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { Field, ObjectType } from '@nestjs/graphql';
|
|
11
|
+
let AuditRecordItemType = class AuditRecordItemType {
|
|
12
|
+
action;
|
|
13
|
+
actorId;
|
|
14
|
+
actorRole;
|
|
15
|
+
createdAt;
|
|
16
|
+
id;
|
|
17
|
+
ip;
|
|
18
|
+
subjectId;
|
|
19
|
+
userAgent;
|
|
20
|
+
};
|
|
21
|
+
__decorate([
|
|
22
|
+
Field(() => String),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], AuditRecordItemType.prototype, "action", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
Field(() => String, { nullable: true }),
|
|
27
|
+
__metadata("design:type", Object)
|
|
28
|
+
], AuditRecordItemType.prototype, "actorId", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
Field(() => String, { nullable: true }),
|
|
31
|
+
__metadata("design:type", Object)
|
|
32
|
+
], AuditRecordItemType.prototype, "actorRole", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
Field(),
|
|
35
|
+
__metadata("design:type", Date)
|
|
36
|
+
], AuditRecordItemType.prototype, "createdAt", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
Field(() => String),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], AuditRecordItemType.prototype, "id", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
Field(() => String, { nullable: true }),
|
|
43
|
+
__metadata("design:type", Object)
|
|
44
|
+
], AuditRecordItemType.prototype, "ip", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
Field(() => String),
|
|
47
|
+
__metadata("design:type", String)
|
|
48
|
+
], AuditRecordItemType.prototype, "subjectId", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
Field(() => String, { nullable: true }),
|
|
51
|
+
__metadata("design:type", Object)
|
|
52
|
+
], AuditRecordItemType.prototype, "userAgent", void 0);
|
|
53
|
+
AuditRecordItemType = __decorate([
|
|
54
|
+
ObjectType('AuditRecordItem')
|
|
55
|
+
], AuditRecordItemType);
|
|
56
|
+
export { AuditRecordItemType };
|
package/dist/esm/nest/user-interface/controllers/graphql/audit-records/audit-records.resolver.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Payload } from '@application-kit/graphql';
|
|
2
|
+
import { QueryBus } from '@nestjs/cqrs';
|
|
3
|
+
import { AuditRecordsType } from './audit-records.type.js';
|
|
4
|
+
export declare class AuditRecordsResolver {
|
|
5
|
+
private readonly queryBus;
|
|
6
|
+
constructor(queryBus: QueryBus);
|
|
7
|
+
auditRecords(payload: Payload): Promise<AuditRecordsType>;
|
|
8
|
+
}
|
package/dist/esm/nest/user-interface/controllers/graphql/audit-records/audit-records.resolver.js
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
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;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
11
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
|
+
};
|
|
13
|
+
import { CheckPolicies } from '@application-kit/authorization/nest';
|
|
14
|
+
import { Payload } from '@application-kit/graphql';
|
|
15
|
+
import { QueryBus } from '@nestjs/cqrs';
|
|
16
|
+
import { Args, Query, Resolver } from '@nestjs/graphql';
|
|
17
|
+
import { GetAuditRecordsQuery, } from '../../../../application/queries/get-audit-records.query.js';
|
|
18
|
+
import { requireAuditLogAccess } from '../../../../policy-handlers.js';
|
|
19
|
+
import { AuditRecordsType, } from './audit-records.type.js';
|
|
20
|
+
let AuditRecordsResolver = class AuditRecordsResolver {
|
|
21
|
+
queryBus;
|
|
22
|
+
constructor(queryBus) {
|
|
23
|
+
this.queryBus = queryBus;
|
|
24
|
+
}
|
|
25
|
+
async auditRecords(payload) {
|
|
26
|
+
const result = await this.queryBus.execute(new GetAuditRecordsQuery(payload.paginator, payload.filters, payload.sorting));
|
|
27
|
+
return {
|
|
28
|
+
cursor: result.cursor,
|
|
29
|
+
data: result.data.map((record) => ({
|
|
30
|
+
action: record.action,
|
|
31
|
+
actorId: record.actorId,
|
|
32
|
+
actorRole: record.actorRole,
|
|
33
|
+
createdAt: record.createdAt,
|
|
34
|
+
id: record.id,
|
|
35
|
+
ip: record.ip,
|
|
36
|
+
subjectId: record.subjectId,
|
|
37
|
+
userAgent: record.userAgent,
|
|
38
|
+
})),
|
|
39
|
+
totalRecords: result.totalRecords,
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
__decorate([
|
|
44
|
+
Query(() => AuditRecordsType),
|
|
45
|
+
__param(0, Args()),
|
|
46
|
+
__metadata("design:type", Function),
|
|
47
|
+
__metadata("design:paramtypes", [Payload]),
|
|
48
|
+
__metadata("design:returntype", Promise)
|
|
49
|
+
], AuditRecordsResolver.prototype, "auditRecords", null);
|
|
50
|
+
AuditRecordsResolver = __decorate([
|
|
51
|
+
CheckPolicies(requireAuditLogAccess),
|
|
52
|
+
Resolver(),
|
|
53
|
+
__metadata("design:paramtypes", [QueryBus])
|
|
54
|
+
], AuditRecordsResolver);
|
|
55
|
+
export { AuditRecordsResolver };
|
package/dist/esm/nest/user-interface/controllers/graphql/audit-records/audit-records.type.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ListingResponseInterface } from '@application-kit/graphql';
|
|
2
|
+
import { CursorOutputType } from '@application-kit/graphql';
|
|
3
|
+
import { AuditRecordItemType } from './audit-record-item.type.js';
|
|
4
|
+
export declare class AuditRecordsType implements ListingResponseInterface<AuditRecordItemType> {
|
|
5
|
+
cursor: CursorOutputType;
|
|
6
|
+
data: AuditRecordItemType[];
|
|
7
|
+
totalRecords: number;
|
|
8
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
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;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { CursorOutputType } from '@application-kit/graphql';
|
|
11
|
+
import { Field, ObjectType } from '@nestjs/graphql';
|
|
12
|
+
import { AuditRecordItemType, } from './audit-record-item.type.js';
|
|
13
|
+
let AuditRecordsType = class AuditRecordsType {
|
|
14
|
+
cursor;
|
|
15
|
+
data;
|
|
16
|
+
totalRecords;
|
|
17
|
+
};
|
|
18
|
+
__decorate([
|
|
19
|
+
Field(() => CursorOutputType),
|
|
20
|
+
__metadata("design:type", CursorOutputType)
|
|
21
|
+
], AuditRecordsType.prototype, "cursor", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
Field(() => [AuditRecordItemType]),
|
|
24
|
+
__metadata("design:type", Array)
|
|
25
|
+
], AuditRecordsType.prototype, "data", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
Field(() => Number),
|
|
28
|
+
__metadata("design:type", Number)
|
|
29
|
+
], AuditRecordsType.prototype, "totalRecords", void 0);
|
|
30
|
+
AuditRecordsType = __decorate([
|
|
31
|
+
ObjectType('AuditRecords')
|
|
32
|
+
], AuditRecordsType);
|
|
33
|
+
export { AuditRecordsType };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './audit-records/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './audit-records/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './graphql/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './graphql/index.js';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CallHandler, ExecutionContext, NestInterceptor } from '@nestjs/common';
|
|
2
|
+
import type { Observable } from 'rxjs';
|
|
3
|
+
import type { AuditRequestFactsResolver } from '../../libs/audit-request-context.js';
|
|
4
|
+
export declare class AuditRequestContextInterceptor implements NestInterceptor {
|
|
5
|
+
private readonly resolveRequestFacts;
|
|
6
|
+
constructor(resolveRequestFacts: AuditRequestFactsResolver);
|
|
7
|
+
intercept(context: ExecutionContext, next: CallHandler): Observable<unknown>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
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;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
11
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
|
+
};
|
|
13
|
+
import { resolveExecutionRequest } from '@application-kit/authorization/nest';
|
|
14
|
+
import { Inject, Injectable } from '@nestjs/common';
|
|
15
|
+
import { Observable as RxObservable } from 'rxjs';
|
|
16
|
+
import { AUDIT_REQUEST_FACTS_RESOLVER } from '../../constants.js';
|
|
17
|
+
import { runWithAuditRequest } from '../../libs/audit-request-context.js';
|
|
18
|
+
let AuditRequestContextInterceptor = class AuditRequestContextInterceptor {
|
|
19
|
+
resolveRequestFacts;
|
|
20
|
+
constructor(resolveRequestFacts) {
|
|
21
|
+
this.resolveRequestFacts = resolveRequestFacts;
|
|
22
|
+
}
|
|
23
|
+
intercept(context, next) {
|
|
24
|
+
const request = resolveExecutionRequest(context);
|
|
25
|
+
return new RxObservable((subscriber) => runWithAuditRequest(request, this.resolveRequestFacts, () => next.handle().subscribe(subscriber)));
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
AuditRequestContextInterceptor = __decorate([
|
|
29
|
+
Injectable(),
|
|
30
|
+
__param(0, Inject(AUDIT_REQUEST_FACTS_RESOLVER)),
|
|
31
|
+
__metadata("design:paramtypes", [Function])
|
|
32
|
+
], AuditRequestContextInterceptor);
|
|
33
|
+
export { AuditRequestContextInterceptor };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './audit-request-context.interceptor.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './audit-request-context.interceptor.js';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { FilterInterface, ListingResultInterface, PaginatorInterface, SortingInterface } from '@application-kit/typeorm/listing';
|
|
2
|
+
import type { AuditLogReadInterface } from '../nest/application/ports/audit-log-read.interface.js';
|
|
3
|
+
import type { AuditRecordDto } from '../nest/application/queries/dtos/audit-record.dto.js';
|
|
4
|
+
export interface ListingCallInterface {
|
|
5
|
+
filters: FilterInterface[] | undefined;
|
|
6
|
+
paginator: PaginatorInterface;
|
|
7
|
+
sorting: SortingInterface[] | undefined;
|
|
8
|
+
}
|
|
9
|
+
export declare class FakeAuditLogRead implements AuditLogReadInterface {
|
|
10
|
+
readonly calls: ListingCallInterface[];
|
|
11
|
+
private records;
|
|
12
|
+
list(paginator: PaginatorInterface, sorting?: SortingInterface[], filters?: FilterInterface[]): Promise<ListingResultInterface<AuditRecordDto>>;
|
|
13
|
+
store(records: AuditRecordDto[]): void;
|
|
14
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export class FakeAuditLogRead {
|
|
2
|
+
calls = [];
|
|
3
|
+
records = [];
|
|
4
|
+
async list(paginator, sorting, filters) {
|
|
5
|
+
await Promise.resolve();
|
|
6
|
+
this.calls.push({ filters, paginator, sorting });
|
|
7
|
+
return { cursor: { next: null, prev: null }, data: this.records, totalRecords: this.records.length };
|
|
8
|
+
}
|
|
9
|
+
store(records) {
|
|
10
|
+
this.records = records;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AuditLogWriteInterface } from '../nest/application/ports/audit-log-write.interface.js';
|
|
2
|
+
import type { AuditRecord } from '../nest/domain/audit-record.js';
|
|
3
|
+
export declare class FakeAuditLogWrite implements AuditLogWriteInterface {
|
|
4
|
+
readonly records: AuditRecord[];
|
|
5
|
+
private failure;
|
|
6
|
+
append(record: AuditRecord): Promise<void>;
|
|
7
|
+
failWith(error: Error): void;
|
|
8
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export class FakeAuditLogWrite {
|
|
2
|
+
records = [];
|
|
3
|
+
failure = null;
|
|
4
|
+
async append(record) {
|
|
5
|
+
await Promise.resolve();
|
|
6
|
+
if (this.failure !== null) {
|
|
7
|
+
throw this.failure;
|
|
8
|
+
}
|
|
9
|
+
this.records.push(record);
|
|
10
|
+
}
|
|
11
|
+
failWith(error) {
|
|
12
|
+
this.failure = error;
|
|
13
|
+
}
|
|
14
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,128 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@application-kit/audit-log",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Журнал аудита для NestJS: append-only таблица с триггерами, запись из событий, чтение через GraphQL, факты запроса для outbox; роли, действия и гранты приносит приложение",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"audit-log",
|
|
7
|
+
"nestjs",
|
|
8
|
+
"typeorm"
|
|
9
|
+
],
|
|
10
|
+
"homepage": "https://gitlab.com/application-kit/application-kit/-/tree/main/packages/audit-log",
|
|
11
|
+
"bugs": "https://gitlab.com/application-kit/application-kit/-/issues",
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "https://gitlab.com/application-kit/application-kit.git",
|
|
15
|
+
"directory": "packages/audit-log"
|
|
16
|
+
},
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"author": {
|
|
19
|
+
"name": "application-kit"
|
|
20
|
+
},
|
|
21
|
+
"sideEffects": false,
|
|
22
|
+
"type": "module",
|
|
23
|
+
"exports": {
|
|
24
|
+
".": {
|
|
25
|
+
"import": {
|
|
26
|
+
"types": "./dist/esm/index.d.ts",
|
|
27
|
+
"default": "./dist/esm/index.js"
|
|
28
|
+
},
|
|
29
|
+
"require": {
|
|
30
|
+
"types": "./dist/cjs/index.d.ts",
|
|
31
|
+
"default": "./dist/cjs/index.js"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"./nest": {
|
|
35
|
+
"import": {
|
|
36
|
+
"types": "./dist/esm/nest/index.d.ts",
|
|
37
|
+
"default": "./dist/esm/nest/index.js"
|
|
38
|
+
},
|
|
39
|
+
"require": {
|
|
40
|
+
"types": "./dist/cjs/nest/index.d.ts",
|
|
41
|
+
"default": "./dist/cjs/nest/index.js"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"./package.json": "./package.json",
|
|
45
|
+
"./testing": {
|
|
46
|
+
"import": {
|
|
47
|
+
"types": "./dist/esm/testing/index.d.ts",
|
|
48
|
+
"default": "./dist/esm/testing/index.js"
|
|
49
|
+
},
|
|
50
|
+
"require": {
|
|
51
|
+
"types": "./dist/cjs/testing/index.d.ts",
|
|
52
|
+
"default": "./dist/cjs/testing/index.js"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"main": "./dist/cjs/index.js",
|
|
57
|
+
"module": "./dist/esm/index.js",
|
|
58
|
+
"types": "./dist/cjs/index.d.ts",
|
|
59
|
+
"files": [
|
|
60
|
+
"dist"
|
|
61
|
+
],
|
|
62
|
+
"scripts": {
|
|
63
|
+
"build": "rm -rf ./dist && node ../../scripts/barrels.mjs create ./src --entry-only=nest,testing && tsc --project tsconfig.build.json && tsc --project tsconfig.build.cjs.json && node ../../scripts/barrels.mjs clean ./src && node ../../scripts/mark-cjs.mjs ./dist/cjs",
|
|
64
|
+
"lint:tsc": "tsc --noEmit --pretty --project .",
|
|
65
|
+
"test:mutation": "stryker run",
|
|
66
|
+
"test:unit": "vitest run"
|
|
67
|
+
},
|
|
68
|
+
"dependencies": {
|
|
69
|
+
"@application-kit/authorization": "^0.5.0",
|
|
70
|
+
"@application-kit/graphql": "^0.7.0",
|
|
71
|
+
"@application-kit/transaction-outbox": "^0.4.0",
|
|
72
|
+
"@application-kit/typeorm": "^0.5.1"
|
|
73
|
+
},
|
|
74
|
+
"devDependencies": {
|
|
75
|
+
"@application-kit/testing": "^0.10.0",
|
|
76
|
+
"@casl/ability": "^7.0.1",
|
|
77
|
+
"@libs-for-dev/nestjs-ddd-library": "1.4.0",
|
|
78
|
+
"@libs-for-dev/typeorm-plural-naming-strategy": "^1.4.0",
|
|
79
|
+
"@nestjs/common": "^11.2.7",
|
|
80
|
+
"@nestjs/core": "^11.2.7",
|
|
81
|
+
"@nestjs/cqrs": "^11.0.3",
|
|
82
|
+
"@nestjs/graphql": "^13.4.5",
|
|
83
|
+
"@nestjs/testing": "^11.2.7",
|
|
84
|
+
"@nestjs/typeorm": "^12.0.2",
|
|
85
|
+
"@stryker-mutator/core": "^10.0.0",
|
|
86
|
+
"@stryker-mutator/vitest-runner": "^10.0.0",
|
|
87
|
+
"@types/node": "^26.2.0",
|
|
88
|
+
"class-transformer": "^0.5.1",
|
|
89
|
+
"class-validator": "^0.15.1",
|
|
90
|
+
"fast-equals": "^6.0.2",
|
|
91
|
+
"graphql": "^17.0.2",
|
|
92
|
+
"nestjs-pino": "^4.6.1",
|
|
93
|
+
"oxide.ts": "^1.1.0",
|
|
94
|
+
"pg": "^8.23.0",
|
|
95
|
+
"pino": "^10.3.1",
|
|
96
|
+
"pino-http": "^11.0.0",
|
|
97
|
+
"reflect-metadata": "^0.2.2",
|
|
98
|
+
"rxjs": "^7.8.2",
|
|
99
|
+
"testcontainers": "12.1.0",
|
|
100
|
+
"typeorm": "^1.1.0",
|
|
101
|
+
"typescript": "^6.0.3",
|
|
102
|
+
"ui7": "^0.2.3",
|
|
103
|
+
"vitest": "^4.1.11"
|
|
104
|
+
},
|
|
105
|
+
"peerDependencies": {
|
|
106
|
+
"@casl/ability": "^7.0.0",
|
|
107
|
+
"@libs-for-dev/nestjs-ddd-library": "^1.4.0",
|
|
108
|
+
"@nestjs/common": "^11.0.0",
|
|
109
|
+
"@nestjs/core": "^11.0.0",
|
|
110
|
+
"@nestjs/cqrs": "^11.0.0",
|
|
111
|
+
"@nestjs/graphql": "^13.0.0",
|
|
112
|
+
"@nestjs/typeorm": "^11.0.3 || ^12.0.0",
|
|
113
|
+
"class-transformer": "^0.5.1",
|
|
114
|
+
"class-validator": "^0.15.1",
|
|
115
|
+
"graphql": "^16.0.0 || ^17.0.0",
|
|
116
|
+
"nestjs-pino": "^4.6.1",
|
|
117
|
+
"oxide.ts": "^1.1.0",
|
|
118
|
+
"reflect-metadata": "^0.2.2",
|
|
119
|
+
"rxjs": "^7.8.2",
|
|
120
|
+
"typeorm": "^1.0.0"
|
|
121
|
+
},
|
|
122
|
+
"engines": {
|
|
123
|
+
"node": ">=24"
|
|
124
|
+
},
|
|
125
|
+
"publishConfig": {
|
|
126
|
+
"access": "public"
|
|
127
|
+
}
|
|
6
128
|
}
|