blockmine 1.6.3 → 1.12.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.
@@ -0,0 +1 @@
1
+ npx --no -- commitlint --edit $1
@@ -0,0 +1 @@
1
+ # npm test
@@ -0,0 +1,17 @@
1
+ {
2
+ "header": "# История версий\n\n",
3
+ "types": [
4
+ { "type": "feat", "section": "✨ Новые возможности" },
5
+ { "type": "fix", "section": "🐛 Исправления" },
6
+ { "type": "perf", "section": "⚡ Производительность" },
7
+ { "type": "refactor", "section": "🛠 Рефакторинг" },
8
+ { "type": "build", "section": "🏗 Сборка" },
9
+ { "type": "chore", "hidden": true },
10
+ { "type": "docs", "hidden": true },
11
+ { "type": "style", "hidden": true },
12
+ { "type": "test", "hidden": true }
13
+ ],
14
+ "writerOpts": {
15
+ "commitPartial": "* {{#if scope}}**{{scope}}:** {{/if}}{{#if subject}}{{subject}}{{/if}} ([{{shortHash}}](https://github.com/blockmineJS/blockmine/commit/{{hash}})) - _{{authorName}}_\n"
16
+ }
17
+ }
package/CHANGELOG.md ADDED
@@ -0,0 +1,29 @@
1
+ # История версий
2
+
3
+
4
+ ## [1.12.0](https://github.com/blockmineJS/blockmine/compare/v1.11.5...v1.12.0) (2025-07-18)
5
+
6
+
7
+ ### ✨ Новые возможности
8
+
9
+ * плагины теперь могу делать свои странички что бы делать какие либо действия в панели ([2664c3c](https://github.com/blockmineJS/blockmine/commit/2664c3c1a02db4e650f8a5be7e96ebbcfe3ab0bb))
10
+ * плагины теперь могуть хранить ингформацию в базе данных ([edb12fd](https://github.com/blockmineJS/blockmine/commit/edb12fd365603bc72c82ad159ffd734cec265dcb))
11
+
12
+
13
+ ### 🛠 Рефакторинг
14
+
15
+ * очередь сообщений. теперь может принимать в себя массив и задержкой отправляет сообщения ([4f193c9](https://github.com/blockmineJS/blockmine/commit/4f193c9c1c76a53ff655e63f520aa83e16c35126))
16
+
17
+ ### [1.11.1](https://github.com/blockmineJS/blockmine/compare/v1.11.0...v1.11.1) (2025-07-17)
18
+
19
+
20
+ ### 🐛 Исправления
21
+
22
+ * test2 ([3ada981](https://github.com/blockmineJS/blockmine/commit/3ada981363de10b9d38cf34f5eb3a00ef527d6b2))
23
+
24
+ ## 1.11.0 (2025-07-17)
25
+
26
+
27
+ ### ✨ Новые возможности
28
+
29
+ * **commands:** Редизайн интерфейса управления командами ([f520049](https://github.com/blockmineJS/blockmine/commit/f520049196dad133ea7957398d512c0334e85917))
package/README.md CHANGED
@@ -33,7 +33,7 @@
33
33
  <td align="center">
34
34
  <p><strong>Управление командами</strong></p>
35
35
  <img src="./image/3.png" alt="Скриншот страницы управления" width="100%">
36
- <em>Настраивайте права, алиасы и кулдауны для каждой команды.</em>
36
+ <em>Настраивайте права алиасы и кулдауны для каждой команды.</em>
37
37
  </td>
38
38
  </tr>
39
39
  </table>
@@ -19,6 +19,7 @@
19
19
  },
20
20
  "dependencies": {
21
21
  "express-validator": "^7.2.1",
22
+
22
23
  "pino": "^9.7.0",
23
24
  "pino-pretty": "^13.0.0"
24
25
  }
@@ -0,0 +1,14 @@
1
+ -- CreateTable
2
+ CREATE TABLE "PluginDataStore" (
3
+ "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
4
+ "pluginName" TEXT NOT NULL,
5
+ "botId" INTEGER NOT NULL,
6
+ "key" TEXT NOT NULL,
7
+ "value" TEXT NOT NULL,
8
+ "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
9
+ "updatedAt" DATETIME NOT NULL,
10
+ CONSTRAINT "PluginDataStore_botId_fkey" FOREIGN KEY ("botId") REFERENCES "Bot" ("id") ON DELETE CASCADE ON UPDATE CASCADE
11
+ );
12
+
13
+ -- CreateIndex
14
+ CREATE UNIQUE INDEX "PluginDataStore_pluginName_botId_key_key" ON "PluginDataStore"("pluginName", "botId", "key");
@@ -1,204 +1,201 @@
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
-
42
- createdAt DateTime @default(now())
43
- updatedAt DateTime @updatedAt
44
- }
45
-
46
-
47
- model InstalledPlugin {
48
- id Int @id @default(autoincrement())
49
- botId Int
50
- bot Bot @relation(fields: [botId], references: [id], onDelete: Cascade)
51
- name String
52
- version String
53
- description String?
54
- sourceType String
55
- sourceUri String?
56
- path String
57
- isEnabled Boolean @default(true)
58
-
59
- manifest String?
60
- settings String? @default("{}")
61
-
62
- createdAt DateTime @default(now())
63
-
64
- @@unique([botId, name])
65
- }
66
-
67
- model Command {
68
- id Int @id @default(autoincrement())
69
- botId Int
70
- bot Bot @relation(fields: [botId], references: [id], onDelete: Cascade)
71
- name String
72
- isEnabled Boolean @default(true)
73
- cooldown Int @default(0)
74
- aliases String @default("[]")
75
- description String?
76
- owner String?
77
- permissionId Int?
78
- permission Permission? @relation(fields: [permissionId], references: [id], onDelete: SetNull)
79
- allowedChatTypes String @default("[\"chat\", \"private\"]")
80
-
81
- isVisual Boolean @default(false)
82
- argumentsJson String? @default("[]")
83
- graphJson String? @default("null")
84
-
85
- @@unique([botId, name])
86
- }
87
-
88
- model EventGraph {
89
- id Int @id @default(autoincrement())
90
- botId Int
91
- bot Bot @relation(fields: [botId], references: [id], onDelete: Cascade)
92
- name String
93
- isEnabled Boolean @default(true)
94
- graphJson String? @default("null")
95
- variables String? @default("[]")
96
-
97
- triggers EventTrigger[]
98
-
99
- createdAt DateTime @default(now())
100
- updatedAt DateTime @updatedAt
101
-
102
- @@unique([botId, name])
103
- }
104
-
105
- model EventTrigger {
106
- id Int @id @default(autoincrement())
107
- graphId Int
108
- graph EventGraph @relation(fields: [graphId], references: [id], onDelete: Cascade)
109
- eventType String // e.g., "entitySpawn", "chat"
110
-
111
- @@unique([graphId, eventType])
112
- }
113
-
114
- model User {
115
- id Int @id @default(autoincrement())
116
- username String
117
- isBlacklisted Boolean @default(false)
118
- botId Int
119
- bot Bot @relation(fields: [botId], references: [id], onDelete: Cascade)
120
- groups UserGroup[]
121
-
122
- @@unique([botId, username])
123
- }
124
-
125
- model Group {
126
- id Int @id @default(autoincrement())
127
- name String
128
- owner String @default("system")
129
- botId Int
130
- bot Bot @relation(fields: [botId], references: [id], onDelete: Cascade)
131
- permissions GroupPermission[]
132
- users UserGroup[]
133
-
134
- @@unique([botId, name])
135
- }
136
-
137
- model Permission {
138
- id Int @id @default(autoincrement())
139
- name String
140
- description String?
141
- owner String @default("system")
142
- botId Int
143
- bot Bot @relation(fields: [botId], references: [id], onDelete: Cascade)
144
- groups GroupPermission[]
145
- commands Command[]
146
-
147
- @@unique([botId, name])
148
- }
149
-
150
-
151
- model UserGroup {
152
- user User @relation(fields: [userId], references: [id], onDelete: Cascade)
153
- userId Int
154
- group Group @relation(fields: [groupId], references: [id], onDelete: Cascade)
155
- groupId Int
156
-
157
- @@id([userId, groupId])
158
- }
159
-
160
- model GroupPermission {
161
- group Group @relation(fields: [groupId], references: [id], onDelete: Cascade)
162
- groupId Int
163
- permission Permission @relation(fields: [permissionId], references: [id], onDelete: Cascade)
164
- permissionId Int
165
-
166
- @@id([groupId, permissionId])
167
- }
168
-
169
-
170
-
171
- model ScheduledTask {
172
- id Int @id @default(autoincrement())
173
- name String
174
- cronPattern String?
175
- action String
176
- targetBotIds String // джсон массив ID ботов или "ALL"
177
- payload String? @default("{}") // джсон для доп данных, например, команды
178
- isEnabled Boolean @default(true)
179
- runOnStartup Boolean @default(false)
180
- lastRun DateTime?
181
- createdAt DateTime @default(now())
182
- updatedAt DateTime @updatedAt
183
- }
184
-
185
- model PanelUser {
186
- id Int @id @default(autoincrement())
187
- uuid String @unique @default(uuid())
188
- username String @unique
189
- passwordHash String
190
- role PanelRole @relation(fields: [roleId], references: [id])
191
- roleId Int
192
- createdAt DateTime @default(now())
193
- }
194
-
195
- // Роли пользователей (Admin, Moderator, Viewer)
196
- model PanelRole {
197
- id Int @id @default(autoincrement())
198
- name String @unique
199
-
200
- // Храним права как джсон строку. SQLite не поддерживает массивы.
201
- // Пример: '["bot:create", "bot:delete", "user:manage"]'
202
- permissions String @default("[]")
203
- users PanelUser[]
204
- }
1
+ generator client {
2
+ provider = "prisma-client-js"
3
+ }
4
+
5
+ datasource db {
6
+ provider = "sqlite"
7
+ url = "file:C:\\Users\\user\\.blockmine\\blockmine.db"
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
+ serverId Int
26
+ proxyHost String?
27
+ proxyPort Int?
28
+ proxyUsername String?
29
+ proxyPassword String?
30
+ createdAt DateTime @default(now())
31
+ updatedAt DateTime @updatedAt
32
+ owners String? @default("")
33
+ server Server @relation(fields: [serverId], references: [id])
34
+ commands Command[]
35
+ eventGraphs EventGraph[]
36
+ groups Group[]
37
+ installedPlugins InstalledPlugin[]
38
+ permissions Permission[]
39
+ pluginData PluginDataStore[]
40
+ users User[]
41
+ }
42
+
43
+ model InstalledPlugin {
44
+ id Int @id @default(autoincrement())
45
+ botId Int
46
+ name String
47
+ version String
48
+ description String?
49
+ sourceType String
50
+ sourceUri String?
51
+ path String
52
+ isEnabled Boolean @default(true)
53
+ manifest String?
54
+ settings String? @default("{}")
55
+ createdAt DateTime @default(now())
56
+ bot Bot @relation(fields: [botId], references: [id], onDelete: Cascade)
57
+
58
+ @@unique([botId, name])
59
+ }
60
+
61
+ model Command {
62
+ id Int @id @default(autoincrement())
63
+ botId Int
64
+ name String
65
+ isEnabled Boolean @default(true)
66
+ cooldown Int @default(0)
67
+ aliases String @default("[]")
68
+ description String?
69
+ owner String?
70
+ permissionId Int?
71
+ allowedChatTypes String @default("[\"chat\", \"private\"]")
72
+ isVisual Boolean @default(false)
73
+ argumentsJson String? @default("[]")
74
+ graphJson String? @default("null")
75
+ permission Permission? @relation(fields: [permissionId], references: [id])
76
+ bot Bot @relation(fields: [botId], references: [id], onDelete: Cascade)
77
+
78
+ @@unique([botId, name])
79
+ }
80
+
81
+ model EventGraph {
82
+ id Int @id @default(autoincrement())
83
+ botId Int
84
+ name String
85
+ isEnabled Boolean @default(true)
86
+ graphJson String? @default("null")
87
+ createdAt DateTime @default(now())
88
+ updatedAt DateTime @updatedAt
89
+ variables String? @default("[]")
90
+ bot Bot @relation(fields: [botId], references: [id], onDelete: Cascade)
91
+ triggers EventTrigger[]
92
+
93
+ @@unique([botId, name])
94
+ }
95
+
96
+ model EventTrigger {
97
+ id Int @id @default(autoincrement())
98
+ graphId Int
99
+ eventType String
100
+ graph EventGraph @relation(fields: [graphId], references: [id], onDelete: Cascade)
101
+
102
+ @@unique([graphId, eventType])
103
+ }
104
+
105
+ model User {
106
+ id Int @id @default(autoincrement())
107
+ username String
108
+ isBlacklisted Boolean @default(false)
109
+ botId Int
110
+ bot Bot @relation(fields: [botId], references: [id], onDelete: Cascade)
111
+ groups UserGroup[]
112
+
113
+ @@unique([botId, username])
114
+ }
115
+
116
+ model Group {
117
+ id Int @id @default(autoincrement())
118
+ name String
119
+ owner String @default("system")
120
+ botId Int
121
+ bot Bot @relation(fields: [botId], references: [id], onDelete: Cascade)
122
+ permissions GroupPermission[]
123
+ users UserGroup[]
124
+
125
+ @@unique([botId, name])
126
+ }
127
+
128
+ model Permission {
129
+ id Int @id @default(autoincrement())
130
+ name String
131
+ description String?
132
+ owner String @default("system")
133
+ botId Int
134
+ commands Command[]
135
+ groups GroupPermission[]
136
+ bot Bot @relation(fields: [botId], references: [id], onDelete: Cascade)
137
+
138
+ @@unique([botId, name])
139
+ }
140
+
141
+ model UserGroup {
142
+ userId Int
143
+ groupId Int
144
+ group Group @relation(fields: [groupId], references: [id], onDelete: Cascade)
145
+ user User @relation(fields: [userId], references: [id], onDelete: Cascade)
146
+
147
+ @@id([userId, groupId])
148
+ }
149
+
150
+ model GroupPermission {
151
+ groupId Int
152
+ permissionId Int
153
+ permission Permission @relation(fields: [permissionId], references: [id], onDelete: Cascade)
154
+ group Group @relation(fields: [groupId], references: [id], onDelete: Cascade)
155
+
156
+ @@id([groupId, permissionId])
157
+ }
158
+
159
+ model ScheduledTask {
160
+ id Int @id @default(autoincrement())
161
+ name String
162
+ cronPattern String?
163
+ action String
164
+ targetBotIds String
165
+ payload String? @default("{}")
166
+ isEnabled Boolean @default(true)
167
+ runOnStartup Boolean @default(false)
168
+ lastRun DateTime?
169
+ createdAt DateTime @default(now())
170
+ updatedAt DateTime @updatedAt
171
+ }
172
+
173
+ model PanelUser {
174
+ id Int @id @default(autoincrement())
175
+ uuid String @unique @default(uuid())
176
+ username String @unique
177
+ passwordHash String
178
+ roleId Int
179
+ createdAt DateTime @default(now())
180
+ role PanelRole @relation(fields: [roleId], references: [id])
181
+ }
182
+
183
+ model PanelRole {
184
+ id Int @id @default(autoincrement())
185
+ name String @unique
186
+ permissions String @default("[]")
187
+ users PanelUser[]
188
+ }
189
+
190
+ model PluginDataStore {
191
+ id Int @id @default(autoincrement())
192
+ pluginName String
193
+ botId Int
194
+ key String
195
+ value String
196
+ createdAt DateTime @default(now())
197
+ updatedAt DateTime @updatedAt
198
+ bot Bot @relation(fields: [botId], references: [id], onDelete: Cascade)
199
+
200
+ @@unique([pluginName, botId, key])
201
+ }