mbkbucket 3.5.1 → 3.7.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.
Files changed (42) hide show
  1. package/.env.example +14 -14
  2. package/.mbkbucket.config.example.json +14 -14
  3. package/LICENSE +20 -20
  4. package/README.md +377 -350
  5. package/index.js +30 -30
  6. package/lib/cli.js +5 -4
  7. package/lib/public/bucketadmin.css +1695 -1420
  8. package/lib/public/bucketadmin.js +1229 -1229
  9. package/lib/public/mbkbucket-helper-demo.html +1184 -1184
  10. package/lib/public/mbkbucket-helper.css +1235 -1235
  11. package/lib/public/mbkbucket-helper.js +1557 -1557
  12. package/lib/src/app.js +109 -109
  13. package/lib/src/cli/auth-helper.js +141 -150
  14. package/lib/src/config/index.js +110 -112
  15. package/lib/src/config/validation.js +73 -73
  16. package/lib/src/controllers/api.controller.js +410 -410
  17. package/lib/src/controllers/dashboard.controller.js +49 -48
  18. package/lib/src/controllers/info.controller.js +33 -34
  19. package/lib/src/controllers/view.controller.js +231 -233
  20. package/lib/src/middleware/async-handler.js +19 -23
  21. package/lib/src/middleware/bucket-resolver.js +37 -37
  22. package/lib/src/middleware/error-handler.js +50 -54
  23. package/lib/src/middleware/rate-limiter.js +22 -22
  24. package/lib/src/middleware/security.js +21 -27
  25. package/lib/src/routes/api.routes.js +53 -40
  26. package/lib/src/routes/index.js +60 -21
  27. package/lib/src/routes/info.routes.js +9 -9
  28. package/lib/src/routes/view.routes.js +25 -20
  29. package/lib/src/services/s3.service.js +594 -603
  30. package/lib/src/utils/errors.js +46 -54
  31. package/lib/src/utils/helpers.js +212 -251
  32. package/lib/src/utils/logger.js +17 -17
  33. package/package.json +83 -83
  34. package/views/bucket.handlebars +196 -196
  35. package/views/bucketadmin_alerts.handlebars +15 -15
  36. package/views/bucketadmin_delete_modal.handlebars +36 -36
  37. package/views/bucketadmin_filelist_skeleton.handlebars +32 -32
  38. package/views/bucketadmin_newfolder_modal.handlebars +29 -29
  39. package/views/bucketadmin_preview_modal.handlebars +40 -40
  40. package/views/bucketadmin_upload_modal.handlebars +54 -54
  41. package/views/bucketadmincontent.handlebars +141 -141
  42. package/views/mbkbucket_info.handlebars +232 -232
@@ -1,233 +1,233 @@
1
- <!--
2
- * MBKBucket
3
- * Copyright (c) 2026 Muhammad Bin Khalid, MBKTech.org and contributors
4
- * Licensed under the MIT License.
5
- * Source: https://github.com/MIbnEKhalid/mbkbucket
6
- -->
7
-
8
- <!DOCTYPE html>
9
- <html lang="en">
10
-
11
- <head>
12
- <meta charset="UTF-8">
13
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
14
- <meta name="description"
15
- content="Log in to portal.mbktech.org to access your resources and manage projects securely.">
16
- <meta name="keywords" content="MBK Tech, Web-Portal, Web, Portal, Admin-Panel, Admin, login">
17
- <meta property="og:title" content="Version and Configuration Information | MBK Tech" />
18
- <meta property="og:image" content="https://mbktech.org/Assets/Images/Icon/logo.png" />
19
- <meta property="og:url" content="/mbkbucket/info">
20
- <title>Version and Configuration Information | MBK Tech Portal</title>
21
- <link rel="icon" type="image/svg+xml" href="/icon.svg">
22
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
23
- {{> sharedStyles}}
24
- <style>
25
- .info-box {
26
- background: rgba(10, 20, 20, 0.95);
27
- backdrop-filter: blur(10px);
28
- border-radius: var(--border-radius);
29
- padding: 2.5rem;
30
- width: 100%;
31
- max-width: 900px;
32
- box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
33
- border: 1px solid rgba(0, 184, 148, 0.2);
34
- position: relative;
35
- z-index: 2;
36
- transition: var(--transition);
37
- }
38
-
39
- .info-box:hover {
40
- box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
41
- border-color: rgba(0, 184, 148, 0.3);
42
- }
43
-
44
- .info-title {
45
- text-align: center;
46
- margin-bottom: 2rem;
47
- font-size: 2rem;
48
- position: relative;
49
- color: var(--light);
50
- }
51
-
52
- .info-title::after {
53
- content: '';
54
- position: absolute;
55
- bottom: -10px;
56
- left: 50%;
57
- transform: translateX(-50%);
58
- width: 100px;
59
- height: 4px;
60
- background-color: var(--accent);
61
- border-radius: 2px;
62
- }
63
-
64
- .info-section {
65
- margin-bottom: 2rem;
66
- padding: 1.5rem;
67
- border: 1px solid rgba(0, 184, 148, 0.2);
68
- border-radius: var(--border-radius);
69
- background-color: rgba(0, 0, 0, 0.2);
70
- transition: var(--transition);
71
- }
72
-
73
- .info-section:hover {
74
- border-color: rgba(0, 184, 148, 0.4);
75
- background-color: rgba(0, 0, 0, 0.3);
76
- }
77
-
78
- .info-section h2 {
79
- color: var(--accent);
80
- border-bottom: 2px solid rgba(0, 184, 148, 0.3);
81
- padding-bottom: 10px;
82
- margin-top: 0;
83
- margin-bottom: 1.5rem;
84
- font-size: 1.4rem;
85
- display: flex;
86
- align-items: center;
87
- gap: 10px;
88
- }
89
-
90
- .info-section h2 i {
91
- font-size: 1.2rem;
92
- }
93
-
94
- .info-row {
95
- display: flex;
96
- margin-bottom: 1rem;
97
- padding-bottom: 1rem;
98
- border-bottom: 1px solid rgba(0, 184, 148, 0.1);
99
- align-items: center;
100
- }
101
-
102
- .info-row:last-child {
103
- border-bottom: none;
104
- margin-bottom: 0;
105
- padding-bottom: 0;
106
- }
107
-
108
- .info-label {
109
- font-weight: 600;
110
- color: var(--text-light);
111
- min-width: 240px;
112
- font-size: 1rem;
113
- }
114
-
115
- .info-value {
116
- flex: 1;
117
- word-break: break-word;
118
- color: var(--text);
119
- font-size: 1rem;
120
- }
121
-
122
- .version-status {
123
- display: inline-flex;
124
- align-items: center;
125
- gap: 6px;
126
- padding: 4px 12px;
127
- border-radius: 20px;
128
- font-size: 0.85rem;
129
- font-weight: 600;
130
- margin-left: 10px;
131
- }
132
-
133
- .version-up-to-date {
134
- background: rgba(67, 233, 123, 0.2);
135
- color: var(--success);
136
- border: 1px solid var(--success);
137
- }
138
-
139
- .version-outdated {
140
- background: rgba(255, 118, 117, 0.2);
141
- color: var(--danger);
142
- border: 1px solid var(--danger);
143
- }
144
-
145
- .version-fetch-error {
146
- background: rgba(255, 209, 102, 0.2);
147
- color: var(--warning);
148
- border: 1px solid var(--warning);
149
- }
150
-
151
- @media (max-width: 768px) {
152
- .info-box {
153
- padding: 2rem;
154
- max-width: 100%;
155
- }
156
-
157
- .info-title {
158
- font-size: 1.8rem;
159
- }
160
-
161
- .info-row {
162
- flex-direction: column;
163
- align-items: flex-start;
164
- gap: 0.5rem;
165
- }
166
-
167
- .info-label {
168
- min-width: unset;
169
- }
170
-
171
- .info-section h2 {
172
- font-size: 1.2rem;
173
- }
174
- }
175
-
176
- @media (max-width: 576px) {
177
- .info-box {
178
- padding: 1.5rem;
179
- }
180
-
181
- .info-section {
182
- padding: 1rem;
183
- }
184
- }
185
- </style>
186
- </head>
187
-
188
- <body>
189
- <header>
190
- <div class="header-container">
191
- <a class="logo">
192
- <img src="/icon.svg" alt="Logo" class="logo-image" />
193
- <span class="logo-text">BK <span>Tech</span></span>
194
- <span class="logo-comp">{{#if APP_NAME}}{{APP_NAME}}{{else}}mbkbucket{{/if}}
195
- </a>
196
-
197
- {{> profilemenu}}
198
- </div>
199
- </header>
200
- <section class="login-container">
201
- <i class="fas fa-info-circle ai-element"></i>
202
- <i class="fas fa-cogs ai-element"></i>
203
- <i class="fas fa-server ai-element"></i>
204
- <i class="fas fa-code-branch ai-element"></i>
205
-
206
- <div class="info-box">
207
- <h1 class="info-title">System Information</h1>
208
-
209
- <div class="info-section">
210
- <h2><i class="fas fa-code-branch"></i> Version Information</h2>
211
- <div class="info-row">
212
- <div class="info-label">Current Version:</div>
213
- <div class="info-value" id="CurrentVersion">{{CurrentVersion}}</div>
214
- </div>
215
-
216
- <div class="info-row">
217
- <div class="info-label">Latest Version:</div>
218
- <div class="info-value">
219
- {{latestVersion}}
220
- {{#if (eq latestVersion CurrentVersion)}}
221
- <span class="version-status version-up-to-date">
222
- <i class="fas fa-check-circle"></i> Up to date
223
- </span>
224
- {{/if}}
225
- </div>
226
- </div>
227
- </div>
228
- </div>
229
- </section>
230
-
231
- </body>
232
-
1
+ <!--
2
+ * MBKBucket
3
+ * Copyright (c) 2026 Muhammad Bin Khalid, MBKTech.org and contributors
4
+ * Licensed under the MIT License.
5
+ * Source: https://github.com/MIbnEKhalid/mbkbucket
6
+ -->
7
+
8
+ <!DOCTYPE html>
9
+ <html lang="en">
10
+
11
+ <head>
12
+ <meta charset="UTF-8">
13
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
14
+ <meta name="description"
15
+ content="Log in to portal.mbktech.org to access your resources and manage projects securely.">
16
+ <meta name="keywords" content="MBK Tech, Web-Portal, Web, Portal, Admin-Panel, Admin, login">
17
+ <meta property="og:title" content="Version and Configuration Information | MBK Tech" />
18
+ <meta property="og:image" content="https://mbktech.org/Assets/Images/Icon/logo.png" />
19
+ <meta property="og:url" content="/mbkbucket/info">
20
+ <title>Version and Configuration Information | MBK Tech Portal</title>
21
+ <link rel="icon" type="image/svg+xml" href="/icon.svg">
22
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
23
+ {{> sharedStyles}}
24
+ <style>
25
+ .info-box {
26
+ background: rgba(10, 20, 20, 0.95);
27
+ backdrop-filter: blur(10px);
28
+ border-radius: var(--border-radius);
29
+ padding: 2.5rem;
30
+ width: 100%;
31
+ max-width: 900px;
32
+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
33
+ border: 1px solid rgba(0, 184, 148, 0.2);
34
+ position: relative;
35
+ z-index: 2;
36
+ transition: var(--transition);
37
+ }
38
+
39
+ .info-box:hover {
40
+ box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
41
+ border-color: rgba(0, 184, 148, 0.3);
42
+ }
43
+
44
+ .info-title {
45
+ text-align: center;
46
+ margin-bottom: 2rem;
47
+ font-size: 2rem;
48
+ position: relative;
49
+ color: var(--light);
50
+ }
51
+
52
+ .info-title::after {
53
+ content: '';
54
+ position: absolute;
55
+ bottom: -10px;
56
+ left: 50%;
57
+ transform: translateX(-50%);
58
+ width: 100px;
59
+ height: 4px;
60
+ background-color: var(--accent);
61
+ border-radius: 2px;
62
+ }
63
+
64
+ .info-section {
65
+ margin-bottom: 2rem;
66
+ padding: 1.5rem;
67
+ border: 1px solid rgba(0, 184, 148, 0.2);
68
+ border-radius: var(--border-radius);
69
+ background-color: rgba(0, 0, 0, 0.2);
70
+ transition: var(--transition);
71
+ }
72
+
73
+ .info-section:hover {
74
+ border-color: rgba(0, 184, 148, 0.4);
75
+ background-color: rgba(0, 0, 0, 0.3);
76
+ }
77
+
78
+ .info-section h2 {
79
+ color: var(--accent);
80
+ border-bottom: 2px solid rgba(0, 184, 148, 0.3);
81
+ padding-bottom: 10px;
82
+ margin-top: 0;
83
+ margin-bottom: 1.5rem;
84
+ font-size: 1.4rem;
85
+ display: flex;
86
+ align-items: center;
87
+ gap: 10px;
88
+ }
89
+
90
+ .info-section h2 i {
91
+ font-size: 1.2rem;
92
+ }
93
+
94
+ .info-row {
95
+ display: flex;
96
+ margin-bottom: 1rem;
97
+ padding-bottom: 1rem;
98
+ border-bottom: 1px solid rgba(0, 184, 148, 0.1);
99
+ align-items: center;
100
+ }
101
+
102
+ .info-row:last-child {
103
+ border-bottom: none;
104
+ margin-bottom: 0;
105
+ padding-bottom: 0;
106
+ }
107
+
108
+ .info-label {
109
+ font-weight: 600;
110
+ color: var(--text-light);
111
+ min-width: 240px;
112
+ font-size: 1rem;
113
+ }
114
+
115
+ .info-value {
116
+ flex: 1;
117
+ word-break: break-word;
118
+ color: var(--text);
119
+ font-size: 1rem;
120
+ }
121
+
122
+ .version-status {
123
+ display: inline-flex;
124
+ align-items: center;
125
+ gap: 6px;
126
+ padding: 4px 12px;
127
+ border-radius: 20px;
128
+ font-size: 0.85rem;
129
+ font-weight: 600;
130
+ margin-left: 10px;
131
+ }
132
+
133
+ .version-up-to-date {
134
+ background: rgba(67, 233, 123, 0.2);
135
+ color: var(--success);
136
+ border: 1px solid var(--success);
137
+ }
138
+
139
+ .version-outdated {
140
+ background: rgba(255, 118, 117, 0.2);
141
+ color: var(--danger);
142
+ border: 1px solid var(--danger);
143
+ }
144
+
145
+ .version-fetch-error {
146
+ background: rgba(255, 209, 102, 0.2);
147
+ color: var(--warning);
148
+ border: 1px solid var(--warning);
149
+ }
150
+
151
+ @media (max-width: 768px) {
152
+ .info-box {
153
+ padding: 2rem;
154
+ max-width: 100%;
155
+ }
156
+
157
+ .info-title {
158
+ font-size: 1.8rem;
159
+ }
160
+
161
+ .info-row {
162
+ flex-direction: column;
163
+ align-items: flex-start;
164
+ gap: 0.5rem;
165
+ }
166
+
167
+ .info-label {
168
+ min-width: unset;
169
+ }
170
+
171
+ .info-section h2 {
172
+ font-size: 1.2rem;
173
+ }
174
+ }
175
+
176
+ @media (max-width: 576px) {
177
+ .info-box {
178
+ padding: 1.5rem;
179
+ }
180
+
181
+ .info-section {
182
+ padding: 1rem;
183
+ }
184
+ }
185
+ </style>
186
+ </head>
187
+
188
+ <body>
189
+ <header>
190
+ <div class="header-container">
191
+ <a class="logo">
192
+ <img src="/icon.svg" alt="Logo" class="logo-image" />
193
+ <span class="logo-text">BK <span>Tech</span></span>
194
+ <span class="logo-comp">{{#if APP_NAME}}{{APP_NAME}}{{else}}mbkbucket{{/if}}
195
+ </a>
196
+
197
+ {{> profilemenu}}
198
+ </div>
199
+ </header>
200
+ <section class="login-container">
201
+ <i class="fas fa-info-circle ai-element"></i>
202
+ <i class="fas fa-cogs ai-element"></i>
203
+ <i class="fas fa-server ai-element"></i>
204
+ <i class="fas fa-code-branch ai-element"></i>
205
+
206
+ <div class="info-box">
207
+ <h1 class="info-title">System Information</h1>
208
+
209
+ <div class="info-section">
210
+ <h2><i class="fas fa-code-branch"></i> Version Information</h2>
211
+ <div class="info-row">
212
+ <div class="info-label">Current Version:</div>
213
+ <div class="info-value" id="CurrentVersion">{{CurrentVersion}}</div>
214
+ </div>
215
+
216
+ <div class="info-row">
217
+ <div class="info-label">Latest Version:</div>
218
+ <div class="info-value">
219
+ {{latestVersion}}
220
+ {{#if (eq latestVersion CurrentVersion)}}
221
+ <span class="version-status version-up-to-date">
222
+ <i class="fas fa-check-circle"></i> Up to date
223
+ </span>
224
+ {{/if}}
225
+ </div>
226
+ </div>
227
+ </div>
228
+ </div>
229
+ </section>
230
+
231
+ </body>
232
+
233
233
  </html>