r2-explorer 1.1.12 → 1.1.14

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 (23) hide show
  1. package/dashboard/assets/{AuthLayout.a658d9a1.js → AuthLayout.955e36f5.js} +1 -1
  2. package/dashboard/{spa/assets/EmailFilePage.a119cdf2.js → assets/EmailFilePage.3130c06a.js} +1 -1
  3. package/dashboard/{spa/assets/ErrorNotFound.eee74d45.js → assets/ErrorNotFound.7dd9edf0.js} +1 -1
  4. package/dashboard/{spa/assets/LoginPage.43f67aea.js → assets/LoginPage.a8b8d033.js} +1 -1
  5. package/dashboard/assets/{auth-store.b5edde02.js → auth-store.5386d3cd.js} +1 -1
  6. package/dashboard/assets/{auth.d68e1e7f.js → auth.39e2dc05.js} +1 -1
  7. package/dashboard/assets/{bus.ccf0fe02.js → bus.390b8ae9.js} +1 -1
  8. package/dashboard/assets/{index.ad530e3e.js → index.4cc7f192.js} +32 -32
  9. package/dashboard/index.html +1 -1
  10. package/dashboard/spa/assets/{AuthLayout.a658d9a1.js → AuthLayout.955e36f5.js} +1 -1
  11. package/dashboard/{assets/EmailFilePage.a119cdf2.js → spa/assets/EmailFilePage.3130c06a.js} +1 -1
  12. package/dashboard/{assets/ErrorNotFound.eee74d45.js → spa/assets/ErrorNotFound.7dd9edf0.js} +1 -1
  13. package/dashboard/{assets/LoginPage.43f67aea.js → spa/assets/LoginPage.a8b8d033.js} +1 -1
  14. package/dashboard/spa/assets/{auth-store.b5edde02.js → auth-store.5386d3cd.js} +1 -1
  15. package/dashboard/spa/assets/{auth.d68e1e7f.js → auth.39e2dc05.js} +1 -1
  16. package/dashboard/spa/assets/{bus.ccf0fe02.js → bus.390b8ae9.js} +1 -1
  17. package/dashboard/spa/assets/{index.ad530e3e.js → index.4cc7f192.js} +32 -32
  18. package/dashboard/spa/index.html +1 -1
  19. package/dist/index.d.mts +5 -0
  20. package/dist/index.d.ts +5 -0
  21. package/dist/index.js +7 -4
  22. package/dist/index.mjs +7 -4
  23. package/package.json +1 -1
@@ -33,7 +33,7 @@
33
33
  color: #333;
34
34
  font-size: 1.2rem;
35
35
  margin-bottom: 0.5rem;
36
- }</style> <script type="module" crossorigin src="/assets/index.ad530e3e.js"></script>
36
+ }</style> <script type="module" crossorigin src="/assets/index.4cc7f192.js"></script>
37
37
  <link rel="stylesheet" href="/assets/index.4aacbd79.css">
38
38
  </head><body><div id=q-app></div></body><script>var elem = document.getElementById('q-app')
39
39
  elem.innerHTML = `
package/dist/index.d.mts CHANGED
@@ -1,5 +1,9 @@
1
1
  import { ExecutionContext } from 'hono';
2
2
 
3
+ type BucketConfig = {
4
+ publicUrl?: string;
5
+ };
6
+
3
7
  type R2ExplorerConfig = {
4
8
  readonly?: boolean;
5
9
  cors?: boolean;
@@ -12,6 +16,7 @@ type R2ExplorerConfig = {
12
16
  | false;
13
17
  showHiddenFiles?: boolean;
14
18
  basicAuth?: BasicAuth | BasicAuth[];
19
+ buckets?: Record<string, BucketConfig>;
15
20
  };
16
21
 
17
22
  type AppEnv = {
package/dist/index.d.ts CHANGED
@@ -1,5 +1,9 @@
1
1
  import { ExecutionContext } from 'hono';
2
2
 
3
+ type BucketConfig = {
4
+ publicUrl?: string;
5
+ };
6
+
3
7
  type R2ExplorerConfig = {
4
8
  readonly?: boolean;
5
9
  cors?: boolean;
@@ -12,6 +16,7 @@ type R2ExplorerConfig = {
12
16
  | false;
13
17
  showHiddenFiles?: boolean;
14
18
  basicAuth?: BasicAuth | BasicAuth[];
19
+ buckets?: Record<string, BucketConfig>;
15
20
  };
16
21
 
17
22
  type AppEnv = {
package/dist/index.js CHANGED
@@ -1795,7 +1795,7 @@ async function readOnlyMiddleware(c, next) {
1795
1795
  }
1796
1796
 
1797
1797
  // package.json
1798
- var version = "1.1.12";
1798
+ var version = "1.1.14";
1799
1799
 
1800
1800
  // src/foundation/settings.ts
1801
1801
  var settings = {
@@ -2835,11 +2835,14 @@ var GetInfo = class extends import_chanfana17.OpenAPIRoute {
2835
2835
  summary: "Get server info"
2836
2836
  };
2837
2837
  async handle(c) {
2838
- const { basicAuth: basicAuth2, ...config } = c.get("config");
2838
+ const { basicAuth: basicAuth2, buckets: bucketsConfig, ...config } = c.get("config");
2839
2839
  const buckets = [];
2840
2840
  for (const [key, value] of Object.entries(c.env)) {
2841
- if (value && typeof value === "object" && "get" in value && "put" in value && "list" in value && typeof value.get === "function" && typeof value.put === "function" && typeof value.list === "function") {
2842
- buckets.push({ name: key });
2841
+ if (value.constructor.name === "R2Bucket") {
2842
+ buckets.push({
2843
+ name: key,
2844
+ publicUrl: bucketsConfig?.[key]?.publicUrl || null
2845
+ });
2843
2846
  }
2844
2847
  }
2845
2848
  return {
package/dist/index.mjs CHANGED
@@ -1764,7 +1764,7 @@ async function readOnlyMiddleware(c, next) {
1764
1764
  }
1765
1765
 
1766
1766
  // package.json
1767
- var version = "1.1.12";
1767
+ var version = "1.1.14";
1768
1768
 
1769
1769
  // src/foundation/settings.ts
1770
1770
  var settings = {
@@ -2804,11 +2804,14 @@ var GetInfo = class extends OpenAPIRoute17 {
2804
2804
  summary: "Get server info"
2805
2805
  };
2806
2806
  async handle(c) {
2807
- const { basicAuth: basicAuth2, ...config } = c.get("config");
2807
+ const { basicAuth: basicAuth2, buckets: bucketsConfig, ...config } = c.get("config");
2808
2808
  const buckets = [];
2809
2809
  for (const [key, value] of Object.entries(c.env)) {
2810
- if (value && typeof value === "object" && "get" in value && "put" in value && "list" in value && typeof value.get === "function" && typeof value.put === "function" && typeof value.list === "function") {
2811
- buckets.push({ name: key });
2810
+ if (value.constructor.name === "R2Bucket") {
2811
+ buckets.push({
2812
+ name: key,
2813
+ publicUrl: bucketsConfig?.[key]?.publicUrl || null
2814
+ });
2812
2815
  }
2813
2816
  }
2814
2817
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "r2-explorer",
3
- "version": "1.1.12",
3
+ "version": "1.1.14",
4
4
  "description": "A Google Drive Interface for your Cloudflare R2 Buckets",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",