blockmine 1.16.3 → 1.17.1

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 CHANGED
@@ -1,6 +1,33 @@
1
1
  # История версий
2
2
 
3
3
 
4
+ ### [1.17.1](https://github.com/blockmineJS/blockmine/compare/v1.17.0...v1.17.1) (2025-07-24)
5
+
6
+
7
+ ### 🐛 Исправления
8
+
9
+ * добавлена синхронизация статусов ботов каждые 10 секунд и обработка события 'bot_ready' ([c9e8bcc](https://github.com/blockmineJS/blockmine/commit/c9e8bcc5f1b31a122aa05b2bb65f3b4127dfb79a))
10
+ * исправление ошибок со скинами. вроде ([459d65b](https://github.com/blockmineJS/blockmine/commit/459d65ba40ec18da5d9a7402992c2cd6aa73a7d2))
11
+ * исправление ошибок со скинами. by сахарок ([433e5c6](https://github.com/blockmineJS/blockmine/commit/433e5c6222e385cfd0ba656c78eecd67f094b0ef))
12
+ * уменьшены лимиты логов для ботов. так много явно не надо ([d690dcd](https://github.com/blockmineJS/blockmine/commit/d690dcd5701603d455d105a2032f9262923cf5f0))
13
+
14
+ ## [1.17.0](https://github.com/blockmineJS/blockmine/compare/v1.16.3...v1.17.0) (2025-07-24)
15
+
16
+
17
+ ### 🐛 Исправления
18
+
19
+ * импорт ботов был улучшен. изменен, переделан, доделан, исправлен ([1a0983b](https://github.com/blockmineJS/blockmine/commit/1a0983bae10953edf1bf695a2451d21529642ce8))
20
+ * прокси теперь подключение теперь работает ([f2ed2b2](https://github.com/blockmineJS/blockmine/commit/f2ed2b2728860aabbed35cd6fc63473fd011550f))
21
+
22
+
23
+ ### ✨ Новые возможности
24
+
25
+ * добавлена функция скопировать полный код плагина в редакторе плагина ([91f7a21](https://github.com/blockmineJS/blockmine/commit/91f7a2171826eb59ca933005eaf48581469c0092))
26
+ * плагины теперь могут изменять обработчики при проблемах (нет прав, не тот тип чата и др) ([eeda006](https://github.com/blockmineJS/blockmine/commit/eeda00648e3319aee72995452364d33c1b41b77a))
27
+ * теперь ботов в левом сайдбар меню можно перемещать по позициям ([95ca8dc](https://github.com/blockmineJS/blockmine/commit/95ca8dcd11872e411bb6a5a74bcf981581e9cb51))
28
+ * теперь при большом кол ве ботов, слева появится прокрутка ботов ([4e3c05d](https://github.com/blockmineJS/blockmine/commit/4e3c05dfdcb354e90b42226bf6c4af84ef328612))
29
+ * улучшена обработка настроек плагинов с поддержкой группировки ([cfc24c6](https://github.com/blockmineJS/blockmine/commit/cfc24c60d92cac3a69098f16bacdf3fbbbee2e38))
30
+
4
31
  ### [1.16.3](https://github.com/blockmineJS/blockmine/compare/v1.16.2...v1.16.3) (2025-07-22)
5
32
 
6
33
 
@@ -0,0 +1,2 @@
1
+ -- AlterTable
2
+ ALTER TABLE "Bot" ADD COLUMN "sortOrder" INTEGER;
@@ -1,228 +1,229 @@
1
- generator client {
2
- provider = "prisma-client-js"
3
- }
4
-
5
- datasource db {
6
- provider = "sqlite"
7
- url = env("DATABASE_URL")
8
- }
9
-
10
- model Server {
11
- id Int @id @default(autoincrement())
12
- name String @unique
13
- host String
14
- port Int @default(25565)
15
- version String
16
- bots Bot[]
17
- }
18
-
19
- model Bot {
20
- id Int @id @default(autoincrement())
21
- username String @unique
22
- password String?
23
- prefix String? @default("@")
24
- note String?
25
- owners String? @default("")
26
-
27
- server Server @relation(fields: [serverId], references: [id])
28
- serverId Int
29
-
30
- proxyHost String?
31
- proxyPort Int?
32
- proxyUsername String?
33
- proxyPassword String?
34
-
35
- installedPlugins InstalledPlugin[]
36
- users User[]
37
- groups Group[]
38
- permissions Permission[]
39
- commands Command[]
40
- eventGraphs EventGraph[]
41
- pluginData PluginDataStore[]
42
-
43
- createdAt DateTime @default(now())
44
- updatedAt DateTime @updatedAt
45
- }
46
-
47
-
48
- model InstalledPlugin {
49
- id Int @id @default(autoincrement())
50
- botId Int
51
- bot Bot @relation(fields: [botId], references: [id], onDelete: Cascade)
52
- name String
53
- version String
54
- description String?
55
- sourceType String
56
- sourceUri String?
57
- path String
58
- isEnabled Boolean @default(true)
59
-
60
- manifest String?
61
- settings String? @default("{}")
62
-
63
- createdAt DateTime @default(now())
64
-
65
- commands Command[]
66
- eventGraphs EventGraph[]
67
-
68
- @@unique([botId, name])
69
- }
70
-
71
- model Command {
72
- id Int @id @default(autoincrement())
73
- botId Int
74
- bot Bot @relation(fields: [botId], references: [id], onDelete: Cascade)
75
- name String
76
- isEnabled Boolean @default(true)
77
- cooldown Int @default(0)
78
- aliases String @default("[]")
79
- description String?
80
- owner String?
81
- permissionId Int?
82
- permission Permission? @relation(fields: [permissionId], references: [id], onDelete: SetNull)
83
- allowedChatTypes String @default("[\"chat\", \"private\"]")
84
-
85
- isVisual Boolean @default(false)
86
- argumentsJson String? @default("[]")
87
- graphJson String? @default("null")
88
-
89
- pluginOwnerId Int?
90
- pluginOwner InstalledPlugin? @relation(fields: [pluginOwnerId], references: [id], onDelete: SetNull)
91
-
92
- @@unique([botId, name])
93
- }
94
-
95
- model EventGraph {
96
- id Int @id @default(autoincrement())
97
- botId Int
98
- bot Bot @relation(fields: [botId], references: [id], onDelete: Cascade)
99
- name String
100
- isEnabled Boolean @default(true)
101
- graphJson String? @default("null")
102
- variables String? @default("[]")
103
-
104
- triggers EventTrigger[]
105
-
106
- createdAt DateTime @default(now())
107
- updatedAt DateTime @updatedAt
108
-
109
- pluginOwnerId Int?
110
- pluginOwner InstalledPlugin? @relation(fields: [pluginOwnerId], references: [id], onDelete: SetNull)
111
-
112
- @@unique([botId, name])
113
- }
114
-
115
- model EventTrigger {
116
- id Int @id @default(autoincrement())
117
- graphId Int
118
- graph EventGraph @relation(fields: [graphId], references: [id], onDelete: Cascade)
119
- eventType String // e.g., "entitySpawn", "chat"
120
-
121
- @@unique([graphId, eventType])
122
- }
123
-
124
- model User {
125
- id Int @id @default(autoincrement())
126
- username String
127
- isBlacklisted Boolean @default(false)
128
- botId Int
129
- bot Bot @relation(fields: [botId], references: [id], onDelete: Cascade)
130
- groups UserGroup[]
131
-
132
- @@unique([botId, username])
133
- }
134
-
135
- model Group {
136
- id Int @id @default(autoincrement())
137
- name String
138
- owner String @default("system")
139
- botId Int
140
- bot Bot @relation(fields: [botId], references: [id], onDelete: Cascade)
141
- permissions GroupPermission[]
142
- users UserGroup[]
143
-
144
- @@unique([botId, name])
145
- }
146
-
147
- model Permission {
148
- id Int @id @default(autoincrement())
149
- name String
150
- description String?
151
- owner String @default("system")
152
- botId Int
153
- bot Bot @relation(fields: [botId], references: [id], onDelete: Cascade)
154
- groups GroupPermission[]
155
- commands Command[]
156
-
157
- @@unique([botId, name])
158
- }
159
-
160
-
161
- model UserGroup {
162
- user User @relation(fields: [userId], references: [id], onDelete: Cascade)
163
- userId Int
164
- group Group @relation(fields: [groupId], references: [id], onDelete: Cascade)
165
- groupId Int
166
-
167
- @@id([userId, groupId])
168
- }
169
-
170
- model GroupPermission {
171
- group Group @relation(fields: [groupId], references: [id], onDelete: Cascade)
172
- groupId Int
173
- permission Permission @relation(fields: [permissionId], references: [id], onDelete: Cascade)
174
- permissionId Int
175
-
176
- @@id([groupId, permissionId])
177
- }
178
-
179
-
180
-
181
- model ScheduledTask {
182
- id Int @id @default(autoincrement())
183
- name String
184
- cronPattern String?
185
- action String
186
- targetBotIds String // джсон массив ID ботов или "ALL"
187
- payload String? @default("{}") // джсон для доп данных, например, команды
188
- isEnabled Boolean @default(true)
189
- runOnStartup Boolean @default(false)
190
- lastRun DateTime?
191
- createdAt DateTime @default(now())
192
- updatedAt DateTime @updatedAt
193
- }
194
-
195
- model PanelUser {
196
- id Int @id @default(autoincrement())
197
- uuid String @unique @default(uuid())
198
- username String @unique
199
- passwordHash String
200
- role PanelRole @relation(fields: [roleId], references: [id])
201
- roleId Int
202
- createdAt DateTime @default(now())
203
- }
204
-
205
- // Роли пользователей (Admin, Moderator, Viewer)
206
- model PanelRole {
207
- id Int @id @default(autoincrement())
208
- name String @unique
209
-
210
- // Храним права как джсон строку. SQLite не поддерживает массивы.
211
- // Пример: '[\"bot:create\", \"bot:delete\", \"user:manage\"]'
212
- permissions String @default("[]")
213
- users PanelUser[]
214
- }
215
-
216
- model PluginDataStore {
217
- id Int @id @default(autoincrement())
218
- pluginName String
219
- botId Int
220
- key String
221
- value String // в виде json
222
- createdAt DateTime @default(now())
223
- updatedAt DateTime @updatedAt
224
-
225
- bot Bot @relation(fields: [botId], references: [id], onDelete: Cascade)
226
-
227
- @@unique([pluginName, botId, key])
228
- }
1
+ generator client {
2
+ provider = "prisma-client-js"
3
+ }
4
+
5
+ datasource db {
6
+ provider = "sqlite"
7
+ url = env("DATABASE_URL")
8
+ }
9
+
10
+ model Server {
11
+ id Int @id @default(autoincrement())
12
+ name String @unique
13
+ host String
14
+ port Int @default(25565)
15
+ version String
16
+ bots Bot[]
17
+ }
18
+
19
+ model Bot {
20
+ id Int @id @default(autoincrement())
21
+ username String @unique
22
+ password String?
23
+ prefix String? @default("@")
24
+ note String?
25
+ owners String? @default("")
26
+ sortOrder Int?
27
+
28
+ server Server @relation(fields: [serverId], references: [id])
29
+ serverId Int
30
+
31
+ proxyHost String?
32
+ proxyPort Int?
33
+ proxyUsername String?
34
+ proxyPassword String?
35
+
36
+ installedPlugins InstalledPlugin[]
37
+ users User[]
38
+ groups Group[]
39
+ permissions Permission[]
40
+ commands Command[]
41
+ eventGraphs EventGraph[]
42
+ pluginData PluginDataStore[]
43
+
44
+ createdAt DateTime @default(now())
45
+ updatedAt DateTime @updatedAt
46
+ }
47
+
48
+
49
+ model InstalledPlugin {
50
+ id Int @id @default(autoincrement())
51
+ botId Int
52
+ bot Bot @relation(fields: [botId], references: [id], onDelete: Cascade)
53
+ name String
54
+ version String
55
+ description String?
56
+ sourceType String
57
+ sourceUri String?
58
+ path String
59
+ isEnabled Boolean @default(true)
60
+
61
+ manifest String?
62
+ settings String? @default("{}")
63
+
64
+ createdAt DateTime @default(now())
65
+
66
+ commands Command[]
67
+ eventGraphs EventGraph[]
68
+
69
+ @@unique([botId, name])
70
+ }
71
+
72
+ model Command {
73
+ id Int @id @default(autoincrement())
74
+ botId Int
75
+ bot Bot @relation(fields: [botId], references: [id], onDelete: Cascade)
76
+ name String
77
+ isEnabled Boolean @default(true)
78
+ cooldown Int @default(0)
79
+ aliases String @default("[]")
80
+ description String?
81
+ owner String?
82
+ permissionId Int?
83
+ permission Permission? @relation(fields: [permissionId], references: [id], onDelete: SetNull)
84
+ allowedChatTypes String @default("[\"chat\", \"private\"]")
85
+
86
+ isVisual Boolean @default(false)
87
+ argumentsJson String? @default("[]")
88
+ graphJson String? @default("null")
89
+
90
+ pluginOwnerId Int?
91
+ pluginOwner InstalledPlugin? @relation(fields: [pluginOwnerId], references: [id], onDelete: SetNull)
92
+
93
+ @@unique([botId, name])
94
+ }
95
+
96
+ model EventGraph {
97
+ id Int @id @default(autoincrement())
98
+ botId Int
99
+ bot Bot @relation(fields: [botId], references: [id], onDelete: Cascade)
100
+ name String
101
+ isEnabled Boolean @default(true)
102
+ graphJson String? @default("null")
103
+ variables String? @default("[]")
104
+
105
+ triggers EventTrigger[]
106
+
107
+ createdAt DateTime @default(now())
108
+ updatedAt DateTime @updatedAt
109
+
110
+ pluginOwnerId Int?
111
+ pluginOwner InstalledPlugin? @relation(fields: [pluginOwnerId], references: [id], onDelete: SetNull)
112
+
113
+ @@unique([botId, name])
114
+ }
115
+
116
+ model EventTrigger {
117
+ id Int @id @default(autoincrement())
118
+ graphId Int
119
+ graph EventGraph @relation(fields: [graphId], references: [id], onDelete: Cascade)
120
+ eventType String // e.g., "entitySpawn", "chat"
121
+
122
+ @@unique([graphId, eventType])
123
+ }
124
+
125
+ model User {
126
+ id Int @id @default(autoincrement())
127
+ username String
128
+ isBlacklisted Boolean @default(false)
129
+ botId Int
130
+ bot Bot @relation(fields: [botId], references: [id], onDelete: Cascade)
131
+ groups UserGroup[]
132
+
133
+ @@unique([botId, username])
134
+ }
135
+
136
+ model Group {
137
+ id Int @id @default(autoincrement())
138
+ name String
139
+ owner String @default("system")
140
+ botId Int
141
+ bot Bot @relation(fields: [botId], references: [id], onDelete: Cascade)
142
+ permissions GroupPermission[]
143
+ users UserGroup[]
144
+
145
+ @@unique([botId, name])
146
+ }
147
+
148
+ model Permission {
149
+ id Int @id @default(autoincrement())
150
+ name String
151
+ description String?
152
+ owner String @default("system")
153
+ botId Int
154
+ bot Bot @relation(fields: [botId], references: [id], onDelete: Cascade)
155
+ groups GroupPermission[]
156
+ commands Command[]
157
+
158
+ @@unique([botId, name])
159
+ }
160
+
161
+
162
+ model UserGroup {
163
+ user User @relation(fields: [userId], references: [id], onDelete: Cascade)
164
+ userId Int
165
+ group Group @relation(fields: [groupId], references: [id], onDelete: Cascade)
166
+ groupId Int
167
+
168
+ @@id([userId, groupId])
169
+ }
170
+
171
+ model GroupPermission {
172
+ group Group @relation(fields: [groupId], references: [id], onDelete: Cascade)
173
+ groupId Int
174
+ permission Permission @relation(fields: [permissionId], references: [id], onDelete: Cascade)
175
+ permissionId Int
176
+
177
+ @@id([groupId, permissionId])
178
+ }
179
+
180
+
181
+
182
+ model ScheduledTask {
183
+ id Int @id @default(autoincrement())
184
+ name String
185
+ cronPattern String?
186
+ action String
187
+ targetBotIds String // джсон массив ID ботов или "ALL"
188
+ payload String? @default("{}") // джсон для доп данных, например, команды
189
+ isEnabled Boolean @default(true)
190
+ runOnStartup Boolean @default(false)
191
+ lastRun DateTime?
192
+ createdAt DateTime @default(now())
193
+ updatedAt DateTime @updatedAt
194
+ }
195
+
196
+ model PanelUser {
197
+ id Int @id @default(autoincrement())
198
+ uuid String @unique @default(uuid())
199
+ username String @unique
200
+ passwordHash String
201
+ role PanelRole @relation(fields: [roleId], references: [id])
202
+ roleId Int
203
+ createdAt DateTime @default(now())
204
+ }
205
+
206
+ // Роли пользователей (Admin, Moderator, Viewer)
207
+ model PanelRole {
208
+ id Int @id @default(autoincrement())
209
+ name String @unique
210
+
211
+ // Храним права как джсон строку. SQLite не поддерживает массивы.
212
+ // Пример: '[\"bot:create\", \"bot:delete\", \"user:manage\"]'
213
+ permissions String @default("[]")
214
+ users PanelUser[]
215
+ }
216
+
217
+ model PluginDataStore {
218
+ id Int @id @default(autoincrement())
219
+ pluginName String
220
+ botId Int
221
+ key String
222
+ value String // в виде json
223
+ createdAt DateTime @default(now())
224
+ updatedAt DateTime @updatedAt
225
+
226
+ bot Bot @relation(fields: [botId], references: [id], onDelete: Cascade)
227
+
228
+ @@unique([pluginName, botId, key])
229
+ }