mbkbucket 3.8.2 → 4.0.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/.env.example +15 -14
- package/README.md +561 -377
- package/index.js +32 -30
- package/lib/cli.js +154 -565
- package/lib/public/bucketadmin.css +2042 -1708
- package/lib/public/bucketadmin.js +1622 -1286
- package/lib/public/mbkbucket-helper-demo.html +4 -24
- package/lib/public/mbkbucket-helper.css +28 -34
- package/lib/public/mbkbucket-helper.js +4 -3
- package/lib/src/config/validation.js +86 -73
- package/lib/src/controllers/api.controller.js +459 -410
- package/lib/src/controllers/dashboard.controller.js +69 -49
- package/lib/src/controllers/info.controller.js +34 -3
- package/lib/src/controllers/view.controller.js +233 -231
- package/lib/src/core/storage/errors.js +62 -0
- package/lib/src/core/storage/gdrive-auth.js +193 -0
- package/lib/src/core/storage/gdrive-provider.js +656 -0
- package/lib/src/core/storage/index.js +14 -0
- package/lib/src/core/storage/models.js +80 -0
- package/lib/src/core/storage/path-strategy.js +65 -0
- package/lib/src/core/storage/s3-provider.js +491 -0
- package/lib/src/core/storage/storage-manager.js +203 -0
- package/lib/src/core/storage/storage-provider.js +217 -0
- package/lib/src/middleware/bucket-resolver.js +37 -37
- package/lib/src/routes/api.routes.js +5 -1
- package/lib/src/routes/index.js +60 -60
- package/lib/src/routes/view.routes.js +28 -25
- package/lib/src/services/s3.service.js +42 -594
- package/lib/src/services/storage.service.js +213 -0
- package/lib/src/utils/errors.js +56 -46
- package/package.json +11 -12
- package/views/bucket.hbs +47 -71
- package/views/bucketadmin_move_modal.hbs +35 -0
- package/views/bucketadmin_preview_modal.hbs +108 -40
- package/views/bucketadmincontent.hbs +193 -144
- package/views/mbkbucket_info.hbs +134 -232
- package/.mbkbucket.config.example.json +0 -14
- package/lib/src/cli/auth-helper.js +0 -141
package/index.js
CHANGED
|
@@ -1,31 +1,33 @@
|
|
|
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
|
-
import dotenv from "dotenv";
|
|
9
|
-
import { createApp } from "./lib/src/app.js";
|
|
10
|
-
import { checkVersion } from "./lib/src/config/index.js";
|
|
11
|
-
import { runHealthCheck } from "./lib/src/services/
|
|
12
|
-
import { createLogger } from "#logger";
|
|
13
|
-
|
|
14
|
-
dotenv.config();
|
|
15
|
-
|
|
16
|
-
const debugServer = createLogger('server');
|
|
17
|
-
const port = process.env.PORT || 3004;
|
|
18
|
-
const server = createApp();
|
|
19
|
-
|
|
20
|
-
if (process.env.NODE_ENV === "dev") {
|
|
21
|
-
await checkVersion();
|
|
22
|
-
await runHealthCheck();
|
|
23
|
-
server.listen(port, () => {
|
|
24
|
-
debugServer("Server running on http://localhost:%s", port);
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export * from "./lib/src/
|
|
29
|
-
export * from "./lib/src/
|
|
30
|
-
export
|
|
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
|
+
import dotenv from "dotenv";
|
|
9
|
+
import { createApp } from "./lib/src/app.js";
|
|
10
|
+
import { checkVersion } from "./lib/src/config/index.js";
|
|
11
|
+
import { runHealthCheck } from "./lib/src/services/storage.service.js";
|
|
12
|
+
import { createLogger } from "#logger";
|
|
13
|
+
|
|
14
|
+
dotenv.config();
|
|
15
|
+
|
|
16
|
+
const debugServer = createLogger('server');
|
|
17
|
+
const port = process.env.PORT || 3004;
|
|
18
|
+
const server = createApp();
|
|
19
|
+
|
|
20
|
+
if (process.env.NODE_ENV === "dev") {
|
|
21
|
+
await checkVersion();
|
|
22
|
+
await runHealthCheck();
|
|
23
|
+
server.listen(port, () => {
|
|
24
|
+
debugServer("Server running on http://localhost:%s", port);
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export * from "./lib/src/core/storage/index.js";
|
|
29
|
+
export * from "./lib/src/services/storage.service.js";
|
|
30
|
+
export * from "./lib/src/services/s3.service.js";
|
|
31
|
+
export * from "./lib/src/config/index.js";
|
|
32
|
+
export { default as bucket, createBucketRouter } from "./lib/src/routes/index.js";
|
|
31
33
|
export default server;
|