mbkbucket 3.2.0 → 3.3.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/src/app.js CHANGED
@@ -44,6 +44,13 @@ export function createApp() {
44
44
  server.get('/mbkbucket/bucketadmin.css', serveAsset('bucketadmin.css'));
45
45
  server.get('/mbkbucket/bucketadmin.js', serveAsset('bucketadmin.js'));
46
46
 
47
+ // Frontend helper utilities (drop-in for any HTML page)
48
+ server.get('/mbkbucket/mbkbucket-helper.css', serveAsset('mbkbucket-helper.css'));
49
+ server.get('/mbkbucket/mbkbucket-helper.js', serveAsset('mbkbucket-helper.js'));
50
+
51
+ // Helper component demo page (no auth — purely static HTML)
52
+ server.get('/mbkbucket/helper-demo', serveAsset('mbkbucket-helper-demo.html'));
53
+
47
54
  // Handlebars configuration
48
55
  server.engine("handlebars", engine({
49
56
  extname: ".handlebars",
@@ -44,9 +44,10 @@ function getDefaultBucketName() {
44
44
  }
45
45
 
46
46
  export function resolveBucketName(bucketName) {
47
- const candidate = (bucketName === undefined || bucketName === null)
47
+ const rawCandidate = (typeof bucketName === 'string') ? bucketName.trim() : bucketName;
48
+ const candidate = (rawCandidate === undefined || rawCandidate === null || rawCandidate === '')
48
49
  ? getDefaultBucketName()
49
- : String(bucketName).trim();
50
+ : String(rawCandidate);
50
51
 
51
52
  if (!candidate) {
52
53
  throw new Error('No bucket selected. Provide ?bucket=<name> or configure a default bucket in mbkautheVar.bucket.');