ballrush-core 0.6.0 → 0.6.2
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/domain/achievement.d.ts +64 -0
- package/dist/domain/achievement.js +146 -0
- package/dist/domain/index.d.ts +1 -0
- package/dist/domain/index.js +1 -0
- package/dist/domain/season.d.ts +8 -2
- package/dist/domain/season.js +13 -3
- package/dist/index.d.ts +7 -1
- package/dist/index.js +9 -1
- package/dist/mongo/index.d.ts +1 -0
- package/dist/mongo/index.js +1 -0
- package/dist/mongo/schemas/achievement.schema.d.ts +21 -0
- package/dist/mongo/schemas/achievement.schema.js +67 -0
- package/dist/mongo/schemas/season.schema.d.ts +2 -1
- package/dist/mongo/schemas/season.schema.js +8 -0
- package/dist/ports/achievements.repository.d.ts +45 -0
- package/dist/ports/achievements.repository.js +2 -0
- package/dist/ports/index.d.ts +1 -0
- package/dist/ports/index.js +1 -0
- package/dist/repositories/index.d.ts +1 -0
- package/dist/repositories/index.js +1 -0
- package/dist/repositories/mongo/achievement.mapper.d.ts +4 -0
- package/dist/repositories/mongo/achievement.mapper.js +35 -0
- package/dist/repositories/mongo/achievement.repository.d.ts +20 -0
- package/dist/repositories/mongo/achievement.repository.js +180 -0
- package/dist/repositories/mongo/season.mapper.js +2 -0
- package/dist/repositories/mongo/season.repository.js +4 -8
- package/package.json +2 -1
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { AchievementType } from "../types";
|
|
2
|
+
export type AchievementScope = "event" | "season" | "lifetime";
|
|
3
|
+
export interface AchievementTranslation {
|
|
4
|
+
title: string;
|
|
5
|
+
description: string;
|
|
6
|
+
}
|
|
7
|
+
export interface AchievementTranslations {
|
|
8
|
+
[language: string]: AchievementTranslation;
|
|
9
|
+
}
|
|
10
|
+
export declare class Achievement {
|
|
11
|
+
private readonly achievementId;
|
|
12
|
+
private readonly type;
|
|
13
|
+
private readonly scope;
|
|
14
|
+
private title;
|
|
15
|
+
private description;
|
|
16
|
+
private translations;
|
|
17
|
+
private icon;
|
|
18
|
+
private algorithm;
|
|
19
|
+
private isActive;
|
|
20
|
+
private createdAt;
|
|
21
|
+
private updatedAt;
|
|
22
|
+
private constructor();
|
|
23
|
+
static create(params: {
|
|
24
|
+
achievementId: string;
|
|
25
|
+
type: AchievementType;
|
|
26
|
+
scope: AchievementScope;
|
|
27
|
+
title: string;
|
|
28
|
+
description: string;
|
|
29
|
+
translations?: AchievementTranslations;
|
|
30
|
+
icon: string;
|
|
31
|
+
algorithm: string;
|
|
32
|
+
isActive?: boolean;
|
|
33
|
+
createdAt?: Date;
|
|
34
|
+
updatedAt?: Date;
|
|
35
|
+
}): Achievement;
|
|
36
|
+
getAchievementId(): string;
|
|
37
|
+
getType(): AchievementType;
|
|
38
|
+
getScope(): AchievementScope;
|
|
39
|
+
getTitle(): string;
|
|
40
|
+
getDescription(): string;
|
|
41
|
+
getTranslations(): AchievementTranslations;
|
|
42
|
+
getTranslation(language: string): AchievementTranslation | undefined;
|
|
43
|
+
getIcon(): string;
|
|
44
|
+
getAlgorithm(): string;
|
|
45
|
+
getIsActive(): boolean;
|
|
46
|
+
getCreatedAt(): Date;
|
|
47
|
+
getUpdatedAt(): Date;
|
|
48
|
+
setTitle(title: string): void;
|
|
49
|
+
setDescription(description: string): void;
|
|
50
|
+
setTranslations(translations: AchievementTranslations): void;
|
|
51
|
+
addTranslation(language: string, translation: AchievementTranslation): void;
|
|
52
|
+
removeTranslation(language: string): void;
|
|
53
|
+
setIcon(icon: string): void;
|
|
54
|
+
setAlgorithm(algorithm: string): void;
|
|
55
|
+
setIsActive(isActive: boolean): void;
|
|
56
|
+
/**
|
|
57
|
+
* Получить локализованное название
|
|
58
|
+
*/
|
|
59
|
+
getLocalizedTitle(language: string): string;
|
|
60
|
+
/**
|
|
61
|
+
* Получить локализованное описание
|
|
62
|
+
*/
|
|
63
|
+
getLocalizedDescription(language: string): string;
|
|
64
|
+
}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Achievement = void 0;
|
|
4
|
+
class Achievement {
|
|
5
|
+
constructor(achievementId, type, scope, title, description, translations, icon, algorithm, isActive, createdAt, updatedAt) {
|
|
6
|
+
this.achievementId = achievementId;
|
|
7
|
+
this.type = type;
|
|
8
|
+
this.scope = scope;
|
|
9
|
+
this.title = title;
|
|
10
|
+
this.description = description;
|
|
11
|
+
this.translations = translations;
|
|
12
|
+
this.icon = icon;
|
|
13
|
+
this.algorithm = algorithm;
|
|
14
|
+
this.isActive = isActive;
|
|
15
|
+
this.createdAt = createdAt;
|
|
16
|
+
this.updatedAt = updatedAt;
|
|
17
|
+
}
|
|
18
|
+
static create(params) {
|
|
19
|
+
if (!params.achievementId) {
|
|
20
|
+
throw new Error("Achievement creation failed: achievementId is required");
|
|
21
|
+
}
|
|
22
|
+
if (!params.type || (params.type !== "team" && params.type !== "personal")) {
|
|
23
|
+
throw new Error("Achievement creation failed: type must be 'team' or 'personal'");
|
|
24
|
+
}
|
|
25
|
+
if (!params.scope || !["event", "season", "lifetime"].includes(params.scope)) {
|
|
26
|
+
throw new Error("Achievement creation failed: scope must be 'event', 'season', or 'lifetime'");
|
|
27
|
+
}
|
|
28
|
+
if (!params.title) {
|
|
29
|
+
throw new Error("Achievement creation failed: title is required");
|
|
30
|
+
}
|
|
31
|
+
if (!params.description) {
|
|
32
|
+
throw new Error("Achievement creation failed: description is required");
|
|
33
|
+
}
|
|
34
|
+
if (!params.icon) {
|
|
35
|
+
throw new Error("Achievement creation failed: icon is required");
|
|
36
|
+
}
|
|
37
|
+
if (!params.algorithm) {
|
|
38
|
+
throw new Error("Achievement creation failed: algorithm is required");
|
|
39
|
+
}
|
|
40
|
+
const now = new Date();
|
|
41
|
+
return new Achievement(params.achievementId, params.type, params.scope, params.title, params.description, params.translations ?? {}, params.icon, params.algorithm, params.isActive ?? true, params.createdAt ?? now, params.updatedAt ?? now);
|
|
42
|
+
}
|
|
43
|
+
// ---- GETTERS
|
|
44
|
+
getAchievementId() {
|
|
45
|
+
return this.achievementId;
|
|
46
|
+
}
|
|
47
|
+
getType() {
|
|
48
|
+
return this.type;
|
|
49
|
+
}
|
|
50
|
+
getScope() {
|
|
51
|
+
return this.scope;
|
|
52
|
+
}
|
|
53
|
+
getTitle() {
|
|
54
|
+
return this.title;
|
|
55
|
+
}
|
|
56
|
+
getDescription() {
|
|
57
|
+
return this.description;
|
|
58
|
+
}
|
|
59
|
+
getTranslations() {
|
|
60
|
+
return { ...this.translations };
|
|
61
|
+
}
|
|
62
|
+
getTranslation(language) {
|
|
63
|
+
return this.translations[language];
|
|
64
|
+
}
|
|
65
|
+
getIcon() {
|
|
66
|
+
return this.icon;
|
|
67
|
+
}
|
|
68
|
+
getAlgorithm() {
|
|
69
|
+
return this.algorithm;
|
|
70
|
+
}
|
|
71
|
+
getIsActive() {
|
|
72
|
+
return this.isActive;
|
|
73
|
+
}
|
|
74
|
+
getCreatedAt() {
|
|
75
|
+
return this.createdAt;
|
|
76
|
+
}
|
|
77
|
+
getUpdatedAt() {
|
|
78
|
+
return this.updatedAt;
|
|
79
|
+
}
|
|
80
|
+
// ---- SETTERS
|
|
81
|
+
setTitle(title) {
|
|
82
|
+
if (!title) {
|
|
83
|
+
throw new Error("title cannot be empty");
|
|
84
|
+
}
|
|
85
|
+
this.title = title;
|
|
86
|
+
this.updatedAt = new Date();
|
|
87
|
+
}
|
|
88
|
+
setDescription(description) {
|
|
89
|
+
if (!description) {
|
|
90
|
+
throw new Error("description cannot be empty");
|
|
91
|
+
}
|
|
92
|
+
this.description = description;
|
|
93
|
+
this.updatedAt = new Date();
|
|
94
|
+
}
|
|
95
|
+
setTranslations(translations) {
|
|
96
|
+
this.translations = { ...translations };
|
|
97
|
+
this.updatedAt = new Date();
|
|
98
|
+
}
|
|
99
|
+
addTranslation(language, translation) {
|
|
100
|
+
if (!language) {
|
|
101
|
+
throw new Error("language cannot be empty");
|
|
102
|
+
}
|
|
103
|
+
if (!translation.title || !translation.description) {
|
|
104
|
+
throw new Error("translation must have both title and description");
|
|
105
|
+
}
|
|
106
|
+
this.translations[language] = { ...translation };
|
|
107
|
+
this.updatedAt = new Date();
|
|
108
|
+
}
|
|
109
|
+
removeTranslation(language) {
|
|
110
|
+
delete this.translations[language];
|
|
111
|
+
this.updatedAt = new Date();
|
|
112
|
+
}
|
|
113
|
+
setIcon(icon) {
|
|
114
|
+
if (!icon) {
|
|
115
|
+
throw new Error("icon cannot be empty");
|
|
116
|
+
}
|
|
117
|
+
this.icon = icon;
|
|
118
|
+
this.updatedAt = new Date();
|
|
119
|
+
}
|
|
120
|
+
setAlgorithm(algorithm) {
|
|
121
|
+
if (!algorithm) {
|
|
122
|
+
throw new Error("algorithm cannot be empty");
|
|
123
|
+
}
|
|
124
|
+
this.algorithm = algorithm;
|
|
125
|
+
this.updatedAt = new Date();
|
|
126
|
+
}
|
|
127
|
+
setIsActive(isActive) {
|
|
128
|
+
this.isActive = isActive;
|
|
129
|
+
this.updatedAt = new Date();
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Получить локализованное название
|
|
133
|
+
*/
|
|
134
|
+
getLocalizedTitle(language) {
|
|
135
|
+
const translation = this.getTranslation(language);
|
|
136
|
+
return translation?.title ?? this.title;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Получить локализованное описание
|
|
140
|
+
*/
|
|
141
|
+
getLocalizedDescription(language) {
|
|
142
|
+
const translation = this.getTranslation(language);
|
|
143
|
+
return translation?.description ?? this.description;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
exports.Achievement = Achievement;
|
package/dist/domain/index.d.ts
CHANGED
package/dist/domain/index.js
CHANGED
package/dist/domain/season.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export type SeasonStatus = 'upcoming' | 'in_progress' | 'ended';
|
|
2
|
+
export type SeasonType = 'system' | 'group';
|
|
2
3
|
export declare class Season {
|
|
3
4
|
private seasonId;
|
|
4
5
|
private name;
|
|
@@ -7,12 +8,13 @@ export declare class Season {
|
|
|
7
8
|
private endDate;
|
|
8
9
|
private status;
|
|
9
10
|
private isPublic;
|
|
11
|
+
private seasonType;
|
|
10
12
|
private description?;
|
|
11
13
|
private groupId?;
|
|
12
14
|
private createdBy?;
|
|
13
15
|
private createdAt?;
|
|
14
16
|
private updatedAt?;
|
|
15
|
-
constructor(seasonId: string, name: string, year: number, startDate: Date, endDate: Date, status: SeasonStatus, isPublic: boolean, description?: string | undefined, groupId?: number | undefined, createdBy?: number | undefined, createdAt?: Date | undefined, updatedAt?: Date | undefined);
|
|
17
|
+
constructor(seasonId: string, name: string, year: number, startDate: Date, endDate: Date, status: SeasonStatus, isPublic: boolean, seasonType: SeasonType, description?: string | undefined, groupId?: number | undefined, createdBy?: number | undefined, createdAt?: Date | undefined, updatedAt?: Date | undefined);
|
|
16
18
|
static create(p: {
|
|
17
19
|
seasonId: string;
|
|
18
20
|
name: string;
|
|
@@ -20,7 +22,8 @@ export declare class Season {
|
|
|
20
22
|
startDate: Date;
|
|
21
23
|
endDate: Date;
|
|
22
24
|
status?: SeasonStatus;
|
|
23
|
-
isPublic
|
|
25
|
+
isPublic: boolean;
|
|
26
|
+
seasonType: SeasonType;
|
|
24
27
|
description?: string;
|
|
25
28
|
groupId?: number;
|
|
26
29
|
createdBy?: number;
|
|
@@ -50,6 +53,7 @@ export declare class Season {
|
|
|
50
53
|
getEndDate(): Date;
|
|
51
54
|
getStatus(): SeasonStatus;
|
|
52
55
|
getIsPublic(): boolean;
|
|
56
|
+
getSeasonType(): SeasonType;
|
|
53
57
|
getDescription(): string | undefined;
|
|
54
58
|
getGroupId(): number | undefined;
|
|
55
59
|
getCreatedBy(): number | undefined;
|
|
@@ -61,6 +65,7 @@ export declare class Season {
|
|
|
61
65
|
setEndDate(endDate: Date): void;
|
|
62
66
|
setStatus(status: SeasonStatus): void;
|
|
63
67
|
setIsPublic(isPublic: boolean): void;
|
|
68
|
+
setSeasonType(seasonType: SeasonType): void;
|
|
64
69
|
setDescription(description?: string): void;
|
|
65
70
|
setGroupId(groupId?: number): void;
|
|
66
71
|
setCreatedBy(createdBy?: number): void;
|
|
@@ -72,6 +77,7 @@ export declare class Season {
|
|
|
72
77
|
endDate: Date;
|
|
73
78
|
status: SeasonStatus;
|
|
74
79
|
isPublic: boolean;
|
|
80
|
+
seasonType: SeasonType;
|
|
75
81
|
description: string | undefined;
|
|
76
82
|
groupId: number | undefined;
|
|
77
83
|
createdBy: number | undefined;
|
package/dist/domain/season.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Season = void 0;
|
|
4
4
|
class Season {
|
|
5
|
-
constructor(seasonId, name, year, startDate, endDate, status, isPublic, description, groupId, createdBy, createdAt, updatedAt) {
|
|
5
|
+
constructor(seasonId, name, year, startDate, endDate, status, isPublic, seasonType, description, groupId, createdBy, createdAt, updatedAt) {
|
|
6
6
|
this.seasonId = seasonId;
|
|
7
7
|
this.name = name;
|
|
8
8
|
this.year = year;
|
|
@@ -10,6 +10,7 @@ class Season {
|
|
|
10
10
|
this.endDate = endDate;
|
|
11
11
|
this.status = status;
|
|
12
12
|
this.isPublic = isPublic;
|
|
13
|
+
this.seasonType = seasonType;
|
|
13
14
|
this.description = description;
|
|
14
15
|
this.groupId = groupId;
|
|
15
16
|
this.createdBy = createdBy;
|
|
@@ -29,10 +30,13 @@ class Season {
|
|
|
29
30
|
throw new Error("endDate is required");
|
|
30
31
|
if (p.startDate >= p.endDate)
|
|
31
32
|
throw new Error("startDate must be before endDate");
|
|
33
|
+
if (p.isPublic === undefined)
|
|
34
|
+
throw new Error("isPublic is required");
|
|
35
|
+
if (!p.seasonType)
|
|
36
|
+
throw new Error("seasonType is required");
|
|
32
37
|
// Если статус не указан, вычисляем автоматически
|
|
33
38
|
const status = p.status ?? Season.calculateStatusFromDates(p.startDate, p.endDate);
|
|
34
|
-
return new Season(p.seasonId, p.name, p.year, p.startDate, p.endDate, status, p.isPublic
|
|
35
|
-
p.description, p.groupId, p.createdBy, p.createdAt ?? new Date(), p.updatedAt ?? new Date());
|
|
39
|
+
return new Season(p.seasonId, p.name, p.year, p.startDate, p.endDate, status, p.isPublic, p.seasonType, p.description, p.groupId, p.createdBy, p.createdAt ?? new Date(), p.updatedAt ?? new Date());
|
|
36
40
|
}
|
|
37
41
|
/**
|
|
38
42
|
* Вычисляет статус сезона на основе дат
|
|
@@ -71,6 +75,7 @@ class Season {
|
|
|
71
75
|
getEndDate() { return this.endDate; }
|
|
72
76
|
getStatus() { return this.status; }
|
|
73
77
|
getIsPublic() { return this.isPublic; }
|
|
78
|
+
getSeasonType() { return this.seasonType; }
|
|
74
79
|
getDescription() { return this.description; }
|
|
75
80
|
getGroupId() { return this.groupId; }
|
|
76
81
|
getCreatedBy() { return this.createdBy; }
|
|
@@ -109,6 +114,10 @@ class Season {
|
|
|
109
114
|
this.isPublic = isPublic;
|
|
110
115
|
this.updatedAt = new Date();
|
|
111
116
|
}
|
|
117
|
+
setSeasonType(seasonType) {
|
|
118
|
+
this.seasonType = seasonType;
|
|
119
|
+
this.updatedAt = new Date();
|
|
120
|
+
}
|
|
112
121
|
setDescription(description) {
|
|
113
122
|
this.description = description;
|
|
114
123
|
this.updatedAt = new Date();
|
|
@@ -130,6 +139,7 @@ class Season {
|
|
|
130
139
|
endDate: this.endDate,
|
|
131
140
|
status: this.status,
|
|
132
141
|
isPublic: this.isPublic,
|
|
142
|
+
seasonType: this.seasonType,
|
|
133
143
|
description: this.description,
|
|
134
144
|
groupId: this.groupId,
|
|
135
145
|
createdBy: this.createdBy,
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
export * from "./types";
|
|
2
2
|
export * from "./utils";
|
|
3
|
-
export
|
|
3
|
+
export { Achievement, AchievementScope, AchievementTranslation, AchievementTranslations } from "./domain/achievement";
|
|
4
|
+
export * from "./domain/user";
|
|
5
|
+
export * from "./domain/group";
|
|
6
|
+
export * from "./domain/event";
|
|
7
|
+
export * from "./domain/event-template";
|
|
8
|
+
export * from "./domain/stat-group";
|
|
9
|
+
export * from "./domain/season";
|
|
4
10
|
export * from "./ports";
|
|
5
11
|
export * from "./mongo";
|
|
6
12
|
export * from "./repositories";
|
package/dist/index.js
CHANGED
|
@@ -14,9 +14,17 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.Achievement = void 0;
|
|
17
18
|
__exportStar(require("./types"), exports);
|
|
18
19
|
__exportStar(require("./utils"), exports);
|
|
19
|
-
|
|
20
|
+
var achievement_1 = require("./domain/achievement");
|
|
21
|
+
Object.defineProperty(exports, "Achievement", { enumerable: true, get: function () { return achievement_1.Achievement; } });
|
|
22
|
+
__exportStar(require("./domain/user"), exports);
|
|
23
|
+
__exportStar(require("./domain/group"), exports);
|
|
24
|
+
__exportStar(require("./domain/event"), exports);
|
|
25
|
+
__exportStar(require("./domain/event-template"), exports);
|
|
26
|
+
__exportStar(require("./domain/stat-group"), exports);
|
|
27
|
+
__exportStar(require("./domain/season"), exports);
|
|
20
28
|
__exportStar(require("./ports"), exports);
|
|
21
29
|
__exportStar(require("./mongo"), exports);
|
|
22
30
|
__exportStar(require("./repositories"), exports);
|
package/dist/mongo/index.d.ts
CHANGED
package/dist/mongo/index.js
CHANGED
|
@@ -27,3 +27,4 @@ __exportStar(require("./schemas/stat-user-profile.schema"), exports);
|
|
|
27
27
|
__exportStar(require("./schemas/stat-user-match-history.schema"), exports);
|
|
28
28
|
__exportStar(require("./schemas/stat-event.schema"), exports);
|
|
29
29
|
__exportStar(require("./schemas/season.schema"), exports);
|
|
30
|
+
__exportStar(require("./schemas/achievement.schema"), exports);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Schema } from "mongoose";
|
|
2
|
+
import { AchievementType } from "../../types";
|
|
3
|
+
import { AchievementScope, AchievementTranslations } from "../../domain/achievement";
|
|
4
|
+
export interface AchievementDoc {
|
|
5
|
+
_id: string;
|
|
6
|
+
type: AchievementType;
|
|
7
|
+
scope: AchievementScope;
|
|
8
|
+
title: string;
|
|
9
|
+
description: string;
|
|
10
|
+
translations: AchievementTranslations;
|
|
11
|
+
icon: string;
|
|
12
|
+
algorithm: string;
|
|
13
|
+
isActive: boolean;
|
|
14
|
+
createdAt: Date;
|
|
15
|
+
updatedAt: Date;
|
|
16
|
+
}
|
|
17
|
+
export declare function createAchievementSchema(): Schema<AchievementDoc, import("mongoose").Model<AchievementDoc, any, any, any, import("mongoose").Document<unknown, any, AchievementDoc> & AchievementDoc & Required<{
|
|
18
|
+
_id: string;
|
|
19
|
+
}>, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, AchievementDoc, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<AchievementDoc>> & import("mongoose").FlatRecord<AchievementDoc> & Required<{
|
|
20
|
+
_id: string;
|
|
21
|
+
}>>;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createAchievementSchema = createAchievementSchema;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
function createAchievementSchema() {
|
|
6
|
+
const schema = new mongoose_1.Schema({
|
|
7
|
+
_id: {
|
|
8
|
+
type: String,
|
|
9
|
+
required: true,
|
|
10
|
+
},
|
|
11
|
+
type: {
|
|
12
|
+
type: String,
|
|
13
|
+
enum: ["team", "personal"],
|
|
14
|
+
required: true,
|
|
15
|
+
index: true,
|
|
16
|
+
},
|
|
17
|
+
scope: {
|
|
18
|
+
type: String,
|
|
19
|
+
enum: ["event", "season", "lifetime"],
|
|
20
|
+
required: true,
|
|
21
|
+
index: true,
|
|
22
|
+
},
|
|
23
|
+
title: {
|
|
24
|
+
type: String,
|
|
25
|
+
required: true,
|
|
26
|
+
},
|
|
27
|
+
description: {
|
|
28
|
+
type: String,
|
|
29
|
+
required: true,
|
|
30
|
+
},
|
|
31
|
+
translations: {
|
|
32
|
+
type: mongoose_1.Schema.Types.Mixed,
|
|
33
|
+
required: false,
|
|
34
|
+
default: {},
|
|
35
|
+
},
|
|
36
|
+
icon: {
|
|
37
|
+
type: String,
|
|
38
|
+
required: true,
|
|
39
|
+
},
|
|
40
|
+
algorithm: {
|
|
41
|
+
type: String,
|
|
42
|
+
required: true,
|
|
43
|
+
},
|
|
44
|
+
isActive: {
|
|
45
|
+
type: Boolean,
|
|
46
|
+
required: true,
|
|
47
|
+
default: true,
|
|
48
|
+
index: true,
|
|
49
|
+
},
|
|
50
|
+
createdAt: {
|
|
51
|
+
type: Date,
|
|
52
|
+
default: Date.now,
|
|
53
|
+
},
|
|
54
|
+
updatedAt: {
|
|
55
|
+
type: Date,
|
|
56
|
+
default: Date.now,
|
|
57
|
+
},
|
|
58
|
+
}, {
|
|
59
|
+
collection: "achievements",
|
|
60
|
+
timestamps: true,
|
|
61
|
+
});
|
|
62
|
+
// Compound indexes для оптимизации запросов
|
|
63
|
+
schema.index({ type: 1, isActive: 1 }); // Для поиска активных достижений по типу
|
|
64
|
+
schema.index({ scope: 1, isActive: 1 }); // Для поиска активных достижений по scope
|
|
65
|
+
schema.index({ type: 1, scope: 1, isActive: 1 }); // Комбинированный индекс
|
|
66
|
+
return schema;
|
|
67
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "mongoose";
|
|
2
|
-
import { SeasonStatus } from "../../domain/season";
|
|
2
|
+
import { SeasonStatus, SeasonType } from "../../domain/season";
|
|
3
3
|
export interface SeasonDoc {
|
|
4
4
|
seasonId: string;
|
|
5
5
|
name: string;
|
|
@@ -8,6 +8,7 @@ export interface SeasonDoc {
|
|
|
8
8
|
endDate: Date;
|
|
9
9
|
status: SeasonStatus;
|
|
10
10
|
isPublic: boolean;
|
|
11
|
+
seasonType: SeasonType;
|
|
11
12
|
description?: string;
|
|
12
13
|
groupId?: number;
|
|
13
14
|
createdBy?: number;
|
|
@@ -43,6 +43,13 @@ function createSeasonSchema() {
|
|
|
43
43
|
default: true,
|
|
44
44
|
index: true
|
|
45
45
|
},
|
|
46
|
+
seasonType: {
|
|
47
|
+
type: String,
|
|
48
|
+
enum: ['system', 'group'],
|
|
49
|
+
required: true,
|
|
50
|
+
default: 'system',
|
|
51
|
+
index: true
|
|
52
|
+
},
|
|
46
53
|
description: {
|
|
47
54
|
type: String,
|
|
48
55
|
required: false
|
|
@@ -68,6 +75,7 @@ function createSeasonSchema() {
|
|
|
68
75
|
timestamps: true, // Автоматически обновляет createdAt и updatedAt
|
|
69
76
|
});
|
|
70
77
|
// Compound indexes для оптимизации запросов
|
|
78
|
+
schema.index({ seasonType: 1, status: 1 }); // Для поиска системных/групповых сезонов
|
|
71
79
|
schema.index({ isPublic: 1, status: 1 }); // Для поиска публичных активных сезонов
|
|
72
80
|
schema.index({ groupId: 1, status: 1 }); // Для поиска сезонов группы
|
|
73
81
|
schema.index({ year: 1, status: 1 }); // Для поиска по году и статусу
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Achievement } from "../domain/achievement";
|
|
2
|
+
import { AchievementType } from "../types";
|
|
3
|
+
import { AchievementScope } from "../domain/achievement";
|
|
4
|
+
export interface AchievementsRepository {
|
|
5
|
+
/**
|
|
6
|
+
* Получить достижение по ID
|
|
7
|
+
*/
|
|
8
|
+
findById(achievementId: string): Promise<Achievement | null>;
|
|
9
|
+
/**
|
|
10
|
+
* Получить все достижения
|
|
11
|
+
*/
|
|
12
|
+
findAll(): Promise<Achievement[]>;
|
|
13
|
+
/**
|
|
14
|
+
* Получить активные достижения
|
|
15
|
+
*/
|
|
16
|
+
findActive(): Promise<Achievement[]>;
|
|
17
|
+
/**
|
|
18
|
+
* Получить достижения по типу
|
|
19
|
+
*/
|
|
20
|
+
findByType(type: AchievementType, activeOnly?: boolean): Promise<Achievement[]>;
|
|
21
|
+
/**
|
|
22
|
+
* Получить достижения по scope
|
|
23
|
+
*/
|
|
24
|
+
findByScope(scope: AchievementScope, activeOnly?: boolean): Promise<Achievement[]>;
|
|
25
|
+
/**
|
|
26
|
+
* Получить достижения по типу и scope
|
|
27
|
+
*/
|
|
28
|
+
findByTypeAndScope(type: AchievementType, scope: AchievementScope, activeOnly?: boolean): Promise<Achievement[]>;
|
|
29
|
+
/**
|
|
30
|
+
* Создать новое достижение
|
|
31
|
+
*/
|
|
32
|
+
create(achievement: Achievement): Promise<Achievement>;
|
|
33
|
+
/**
|
|
34
|
+
* Обновить достижение
|
|
35
|
+
*/
|
|
36
|
+
update(achievement: Achievement): Promise<Achievement | null>;
|
|
37
|
+
/**
|
|
38
|
+
* Удалить достижение
|
|
39
|
+
*/
|
|
40
|
+
delete(achievementId: string): Promise<void>;
|
|
41
|
+
/**
|
|
42
|
+
* Проверить существование достижения
|
|
43
|
+
*/
|
|
44
|
+
exists(achievementId: string): Promise<boolean>;
|
|
45
|
+
}
|
package/dist/ports/index.d.ts
CHANGED
package/dist/ports/index.js
CHANGED
|
@@ -27,3 +27,4 @@ __exportStar(require("./stat-user-profile.repository"), exports);
|
|
|
27
27
|
__exportStar(require("./stat-user-match-history.repository"), exports);
|
|
28
28
|
__exportStar(require("./stat-event.repository"), exports);
|
|
29
29
|
__exportStar(require("./seasons.repository"), exports);
|
|
30
|
+
__exportStar(require("./achievements.repository"), exports);
|
|
@@ -27,3 +27,4 @@ __exportStar(require("./mongo/stat-user-profile.repository"), exports);
|
|
|
27
27
|
__exportStar(require("./mongo/stat-user-match-history.repository"), exports);
|
|
28
28
|
__exportStar(require("./mongo/stat-event.repository"), exports);
|
|
29
29
|
__exportStar(require("./mongo/season.repository"), exports);
|
|
30
|
+
__exportStar(require("./mongo/achievement.repository"), exports);
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toDomain = toDomain;
|
|
4
|
+
exports.toDoc = toDoc;
|
|
5
|
+
const achievement_1 = require("../../domain/achievement");
|
|
6
|
+
function toDomain(doc) {
|
|
7
|
+
return achievement_1.Achievement.create({
|
|
8
|
+
achievementId: doc._id,
|
|
9
|
+
type: doc.type,
|
|
10
|
+
scope: doc.scope,
|
|
11
|
+
title: doc.title,
|
|
12
|
+
description: doc.description,
|
|
13
|
+
translations: doc.translations,
|
|
14
|
+
icon: doc.icon,
|
|
15
|
+
algorithm: doc.algorithm,
|
|
16
|
+
isActive: doc.isActive,
|
|
17
|
+
createdAt: doc.createdAt,
|
|
18
|
+
updatedAt: doc.updatedAt,
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
function toDoc(achievement) {
|
|
22
|
+
return {
|
|
23
|
+
_id: achievement.getAchievementId(),
|
|
24
|
+
type: achievement.getType(),
|
|
25
|
+
scope: achievement.getScope(),
|
|
26
|
+
title: achievement.getTitle(),
|
|
27
|
+
description: achievement.getDescription(),
|
|
28
|
+
translations: achievement.getTranslations(),
|
|
29
|
+
icon: achievement.getIcon(),
|
|
30
|
+
algorithm: achievement.getAlgorithm(),
|
|
31
|
+
isActive: achievement.getIsActive(),
|
|
32
|
+
createdAt: achievement.getCreatedAt(),
|
|
33
|
+
updatedAt: achievement.getUpdatedAt(),
|
|
34
|
+
};
|
|
35
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Model } from "mongoose";
|
|
2
|
+
import type { AchievementsRepository } from "../../ports/achievements.repository";
|
|
3
|
+
import type { AchievementDoc } from "../../mongo";
|
|
4
|
+
import { Achievement } from "../../domain/achievement";
|
|
5
|
+
import { AchievementType } from "../../types";
|
|
6
|
+
import { AchievementScope } from "../../domain/achievement";
|
|
7
|
+
export declare class MongoAchievementsRepository implements AchievementsRepository {
|
|
8
|
+
private readonly AchievementModel;
|
|
9
|
+
constructor(AchievementModel: Model<AchievementDoc>);
|
|
10
|
+
findById(achievementId: string): Promise<Achievement | null>;
|
|
11
|
+
findAll(): Promise<Achievement[]>;
|
|
12
|
+
findActive(): Promise<Achievement[]>;
|
|
13
|
+
findByType(type: AchievementType, activeOnly?: boolean): Promise<Achievement[]>;
|
|
14
|
+
findByScope(scope: AchievementScope, activeOnly?: boolean): Promise<Achievement[]>;
|
|
15
|
+
findByTypeAndScope(type: AchievementType, scope: AchievementScope, activeOnly?: boolean): Promise<Achievement[]>;
|
|
16
|
+
create(achievement: Achievement): Promise<Achievement>;
|
|
17
|
+
update(achievement: Achievement): Promise<Achievement | null>;
|
|
18
|
+
delete(achievementId: string): Promise<void>;
|
|
19
|
+
exists(achievementId: string): Promise<boolean>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MongoAchievementsRepository = void 0;
|
|
4
|
+
const achievement_mapper_1 = require("./achievement.mapper");
|
|
5
|
+
const errors_1 = require("../../errors");
|
|
6
|
+
class MongoAchievementsRepository {
|
|
7
|
+
constructor(AchievementModel) {
|
|
8
|
+
this.AchievementModel = AchievementModel;
|
|
9
|
+
}
|
|
10
|
+
async findById(achievementId) {
|
|
11
|
+
try {
|
|
12
|
+
if (!achievementId) {
|
|
13
|
+
throw new errors_1.ValidationError("Achievement", "achievementId", achievementId, "achievementId is required");
|
|
14
|
+
}
|
|
15
|
+
const doc = await this.AchievementModel.findById(achievementId).lean();
|
|
16
|
+
return doc ? (0, achievement_mapper_1.toDomain)(doc) : null;
|
|
17
|
+
}
|
|
18
|
+
catch (error) {
|
|
19
|
+
if (error instanceof errors_1.ValidationError) {
|
|
20
|
+
throw error;
|
|
21
|
+
}
|
|
22
|
+
throw new errors_1.QueryError("findById", "Achievement", achievementId, error);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
async findAll() {
|
|
26
|
+
try {
|
|
27
|
+
const docs = await this.AchievementModel.find().lean();
|
|
28
|
+
return docs.map((doc) => (0, achievement_mapper_1.toDomain)(doc));
|
|
29
|
+
}
|
|
30
|
+
catch (error) {
|
|
31
|
+
throw new errors_1.QueryError("findAll", "Achievement", "all", error);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
async findActive() {
|
|
35
|
+
try {
|
|
36
|
+
const docs = await this.AchievementModel.find({ isActive: true }).lean();
|
|
37
|
+
return docs.map((doc) => (0, achievement_mapper_1.toDomain)(doc));
|
|
38
|
+
}
|
|
39
|
+
catch (error) {
|
|
40
|
+
throw new errors_1.QueryError("findActive", "Achievement", "active", error);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
async findByType(type, activeOnly = false) {
|
|
44
|
+
try {
|
|
45
|
+
if (!type || (type !== "team" && type !== "personal")) {
|
|
46
|
+
throw new errors_1.ValidationError("Achievement", "type", type, "type must be 'team' or 'personal'");
|
|
47
|
+
}
|
|
48
|
+
const query = { type };
|
|
49
|
+
if (activeOnly) {
|
|
50
|
+
query.isActive = true;
|
|
51
|
+
}
|
|
52
|
+
const docs = await this.AchievementModel.find(query).lean();
|
|
53
|
+
return docs.map((doc) => (0, achievement_mapper_1.toDomain)(doc));
|
|
54
|
+
}
|
|
55
|
+
catch (error) {
|
|
56
|
+
if (error instanceof errors_1.ValidationError) {
|
|
57
|
+
throw error;
|
|
58
|
+
}
|
|
59
|
+
throw new errors_1.QueryError("findByType", "Achievement", type, error);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
async findByScope(scope, activeOnly = false) {
|
|
63
|
+
try {
|
|
64
|
+
if (!scope || !["event", "season", "lifetime"].includes(scope)) {
|
|
65
|
+
throw new errors_1.ValidationError("Achievement", "scope", scope, "scope must be 'event', 'season', or 'lifetime'");
|
|
66
|
+
}
|
|
67
|
+
const query = { scope };
|
|
68
|
+
if (activeOnly) {
|
|
69
|
+
query.isActive = true;
|
|
70
|
+
}
|
|
71
|
+
const docs = await this.AchievementModel.find(query).lean();
|
|
72
|
+
return docs.map((doc) => (0, achievement_mapper_1.toDomain)(doc));
|
|
73
|
+
}
|
|
74
|
+
catch (error) {
|
|
75
|
+
if (error instanceof errors_1.ValidationError) {
|
|
76
|
+
throw error;
|
|
77
|
+
}
|
|
78
|
+
throw new errors_1.QueryError("findByScope", "Achievement", scope, error);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
async findByTypeAndScope(type, scope, activeOnly = false) {
|
|
82
|
+
try {
|
|
83
|
+
if (!type || (type !== "team" && type !== "personal")) {
|
|
84
|
+
throw new errors_1.ValidationError("Achievement", "type", type, "type must be 'team' or 'personal'");
|
|
85
|
+
}
|
|
86
|
+
if (!scope || !["event", "season", "lifetime"].includes(scope)) {
|
|
87
|
+
throw new errors_1.ValidationError("Achievement", "scope", scope, "scope must be 'event', 'season', or 'lifetime'");
|
|
88
|
+
}
|
|
89
|
+
const query = { type, scope };
|
|
90
|
+
if (activeOnly) {
|
|
91
|
+
query.isActive = true;
|
|
92
|
+
}
|
|
93
|
+
const docs = await this.AchievementModel.find(query).lean();
|
|
94
|
+
return docs.map((doc) => (0, achievement_mapper_1.toDomain)(doc));
|
|
95
|
+
}
|
|
96
|
+
catch (error) {
|
|
97
|
+
if (error instanceof errors_1.ValidationError) {
|
|
98
|
+
throw error;
|
|
99
|
+
}
|
|
100
|
+
throw new errors_1.QueryError("findByTypeAndScope", "Achievement", `${type}-${scope}`, error);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
async create(achievement) {
|
|
104
|
+
try {
|
|
105
|
+
if (!achievement) {
|
|
106
|
+
throw new errors_1.ValidationError("Achievement", "achievement", achievement, "achievement object is required");
|
|
107
|
+
}
|
|
108
|
+
const achievementId = achievement.getAchievementId();
|
|
109
|
+
if (!achievementId) {
|
|
110
|
+
throw new errors_1.ValidationError("Achievement", "achievementId", achievementId, "achievementId is required");
|
|
111
|
+
}
|
|
112
|
+
const write = (0, achievement_mapper_1.toDoc)(achievement);
|
|
113
|
+
const saved = await new this.AchievementModel(write).save();
|
|
114
|
+
return (0, achievement_mapper_1.toDomain)(saved.toObject());
|
|
115
|
+
}
|
|
116
|
+
catch (error) {
|
|
117
|
+
if (error instanceof errors_1.ValidationError) {
|
|
118
|
+
throw error;
|
|
119
|
+
}
|
|
120
|
+
// Check for duplicate key error
|
|
121
|
+
if (error?.code === 11000) {
|
|
122
|
+
throw new errors_1.DuplicateEntityError("Achievement", achievement.getAchievementId(), error);
|
|
123
|
+
}
|
|
124
|
+
throw new errors_1.QueryError("create", "Achievement", achievement.getAchievementId(), error);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
async update(achievement) {
|
|
128
|
+
try {
|
|
129
|
+
if (!achievement) {
|
|
130
|
+
throw new errors_1.ValidationError("Achievement", "achievement", achievement, "achievement object is required");
|
|
131
|
+
}
|
|
132
|
+
const achievementId = achievement.getAchievementId();
|
|
133
|
+
if (!achievementId) {
|
|
134
|
+
throw new errors_1.ValidationError("Achievement", "achievementId", achievementId, "achievementId is required");
|
|
135
|
+
}
|
|
136
|
+
const write = (0, achievement_mapper_1.toDoc)(achievement);
|
|
137
|
+
const doc = await this.AchievementModel.findByIdAndUpdate(achievementId, { $set: write }, { new: true }).lean();
|
|
138
|
+
return doc ? (0, achievement_mapper_1.toDomain)(doc) : null;
|
|
139
|
+
}
|
|
140
|
+
catch (error) {
|
|
141
|
+
if (error instanceof errors_1.ValidationError) {
|
|
142
|
+
throw error;
|
|
143
|
+
}
|
|
144
|
+
throw new errors_1.QueryError("update", "Achievement", achievement.getAchievementId(), error);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
async delete(achievementId) {
|
|
148
|
+
try {
|
|
149
|
+
if (!achievementId) {
|
|
150
|
+
throw new errors_1.ValidationError("Achievement", "achievementId", achievementId, "achievementId is required");
|
|
151
|
+
}
|
|
152
|
+
const result = await this.AchievementModel.findByIdAndDelete(achievementId);
|
|
153
|
+
if (!result) {
|
|
154
|
+
throw new errors_1.EntityNotFoundError("Achievement", achievementId, "delete");
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
catch (error) {
|
|
158
|
+
if (error instanceof errors_1.ValidationError || error instanceof errors_1.EntityNotFoundError) {
|
|
159
|
+
throw error;
|
|
160
|
+
}
|
|
161
|
+
throw new errors_1.QueryError("delete", "Achievement", achievementId, error);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
async exists(achievementId) {
|
|
165
|
+
try {
|
|
166
|
+
if (!achievementId) {
|
|
167
|
+
throw new errors_1.ValidationError("Achievement", "achievementId", achievementId, "achievementId is required");
|
|
168
|
+
}
|
|
169
|
+
const count = await this.AchievementModel.countDocuments({ _id: achievementId });
|
|
170
|
+
return count > 0;
|
|
171
|
+
}
|
|
172
|
+
catch (error) {
|
|
173
|
+
if (error instanceof errors_1.ValidationError) {
|
|
174
|
+
throw error;
|
|
175
|
+
}
|
|
176
|
+
throw new errors_1.QueryError("exists", "Achievement", achievementId, error);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
exports.MongoAchievementsRepository = MongoAchievementsRepository;
|
|
@@ -12,6 +12,7 @@ function toDomain(doc) {
|
|
|
12
12
|
endDate: new Date(doc.endDate),
|
|
13
13
|
status: doc.status,
|
|
14
14
|
isPublic: doc.isPublic,
|
|
15
|
+
seasonType: doc.seasonType,
|
|
15
16
|
description: doc.description,
|
|
16
17
|
groupId: doc.groupId,
|
|
17
18
|
createdBy: doc.createdBy,
|
|
@@ -28,6 +29,7 @@ function toDoc(entity) {
|
|
|
28
29
|
endDate: entity.getEndDate(),
|
|
29
30
|
status: entity.getStatus(),
|
|
30
31
|
isPublic: entity.getIsPublic(),
|
|
32
|
+
seasonType: entity.getSeasonType(),
|
|
31
33
|
description: entity.getDescription(),
|
|
32
34
|
groupId: entity.getGroupId(),
|
|
33
35
|
createdBy: entity.getCreatedBy(),
|
|
@@ -23,7 +23,7 @@ class MongoSeasonsRepository {
|
|
|
23
23
|
}
|
|
24
24
|
async getPublicSeasons() {
|
|
25
25
|
try {
|
|
26
|
-
const docs = await this.Model.find({
|
|
26
|
+
const docs = await this.Model.find({ seasonType: 'system' }).sort({ year: -1, startDate: -1 }).lean();
|
|
27
27
|
return docs.map(d => (0, season_mapper_1.toDomain)(d));
|
|
28
28
|
}
|
|
29
29
|
catch (error) {
|
|
@@ -35,12 +35,8 @@ class MongoSeasonsRepository {
|
|
|
35
35
|
if (!groupId || groupId === 0) {
|
|
36
36
|
throw new errors_1.ValidationError('Season', 'groupId', groupId, 'must be a non-zero number');
|
|
37
37
|
}
|
|
38
|
-
// Возвращаем публичные сезоны + сезоны конкретной группы
|
|
39
38
|
const docs = await this.Model.find({
|
|
40
|
-
|
|
41
|
-
{ isPublic: true },
|
|
42
|
-
{ groupId: groupId }
|
|
43
|
-
]
|
|
39
|
+
groupId: groupId
|
|
44
40
|
}).sort({ year: -1, startDate: -1 }).lean();
|
|
45
41
|
return docs.map(d => (0, season_mapper_1.toDomain)(d));
|
|
46
42
|
}
|
|
@@ -178,7 +174,7 @@ class MongoSeasonsRepository {
|
|
|
178
174
|
throw new errors_1.ValidationError('Season', 'groupId', groupId, 'must be a non-zero number');
|
|
179
175
|
}
|
|
180
176
|
filter.$or = [
|
|
181
|
-
{
|
|
177
|
+
{ seasonType: 'system' },
|
|
182
178
|
{ groupId: groupId }
|
|
183
179
|
];
|
|
184
180
|
}
|
|
@@ -199,7 +195,7 @@ class MongoSeasonsRepository {
|
|
|
199
195
|
throw new errors_1.ValidationError('Season', 'groupId', groupId, 'must be a non-zero number');
|
|
200
196
|
}
|
|
201
197
|
filter.$or = [
|
|
202
|
-
{
|
|
198
|
+
{ seasonType: 'system' },
|
|
203
199
|
{ groupId: groupId }
|
|
204
200
|
];
|
|
205
201
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ballrush-core",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@types/jest": "^30.0.0",
|
|
31
|
+
"baseline-browser-mapping": "^2.8.30",
|
|
31
32
|
"jest": "^30.1.3",
|
|
32
33
|
"mongoose": "^7.8.7",
|
|
33
34
|
"rimraf": "^5.0.0",
|