@a83/orbiter-admin 0.3.0 → 0.3.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@a83/orbiter-admin",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Standalone admin server for Orbiter CMS",
5
5
  "type": "module",
6
6
  "main": "./src/server.js",
@@ -26,7 +26,7 @@
26
26
  "directory": "packages/admin"
27
27
  },
28
28
  "dependencies": {
29
- "@a83/orbiter-core": "^0.2.0",
29
+ "@a83/orbiter-core": "^0.3.1",
30
30
  "@hono/node-server": "^1.14.4",
31
31
  "hono": "^4.7.11"
32
32
  }
@@ -371,6 +371,7 @@
371
371
  <option value="blob" ${(get('media.backend')||'blob')==='blob' ? 'selected':''}>blob — SQLite BLOB (default)</option>
372
372
  <option value="local" ${get('media.backend')==='local' ? 'selected':''}>local — filesystem</option>
373
373
  <option value="github" ${get('media.backend')==='github' ? 'selected':''}>github — GitHub + jsDelivr CDN</option>
374
+ <option value="s3" ${get('media.backend')==='s3' ? 'selected':''}>s3 — S3-compatible (AWS, R2, B2, MinIO)</option>
374
375
  </select>
375
376
  </div>
376
377
 
@@ -381,6 +382,33 @@
381
382
  </div>
382
383
  </div>
383
384
 
385
+ <div id="media-s3-fields" style="display:none">
386
+ <div class="setting-row">
387
+ <div><div class="setting-label">Bucket</div></div>
388
+ <input class="input" name="media.s3_bucket" value="${get('media.s3_bucket')}" placeholder="my-media-bucket" />
389
+ </div>
390
+ <div class="setting-row">
391
+ <div><div class="setting-label">Region</div><div class="setting-desc">AWS region or "auto" for R2</div></div>
392
+ <input class="input" name="media.s3_region" value="${get('media.s3_region')||'auto'}" placeholder="eu-central-1" />
393
+ </div>
394
+ <div class="setting-row">
395
+ <div><div class="setting-label">Endpoint</div><div class="setting-desc">Custom endpoint for R2, B2, MinIO — leave blank for AWS</div></div>
396
+ <input class="input" name="media.s3_endpoint" value="${get('media.s3_endpoint')}" placeholder="https://xxxx.r2.cloudflarestorage.com" />
397
+ </div>
398
+ <div class="setting-row">
399
+ <div><div class="setting-label">Access Key ID</div></div>
400
+ <input class="input" type="password" name="media.s3_access_key" value="${get('media.s3_access_key')}" autocomplete="off" placeholder="Access key ID" />
401
+ </div>
402
+ <div class="setting-row">
403
+ <div><div class="setting-label">Secret Access Key</div></div>
404
+ <input class="input" type="password" name="media.s3_secret_key" value="${get('media.s3_secret_key')}" autocomplete="off" placeholder="Secret access key" />
405
+ </div>
406
+ <div class="setting-row">
407
+ <div><div class="setting-label">Public URL</div><div class="setting-desc">Base URL for serving files, e.g. your R2 public domain or CDN</div></div>
408
+ <input class="input" name="media.s3_public_url" value="${get('media.s3_public_url')}" placeholder="https://media.example.com" />
409
+ </div>
410
+ </div>
411
+
384
412
  <div id="media-github-fields" style="display:none">
385
413
  <div class="setting-row">
386
414
  <div><div class="setting-label">GitHub token</div><div class="setting-desc">Uses the token from the GitHub section above if left blank</div></div>
@@ -588,6 +616,7 @@
588
616
  function updateMediaFields() {
589
617
  const v = document.getElementById('media-backend-select')?.value ?? 'blob';
590
618
  document.getElementById('media-local-fields').style.display = v === 'local' ? '' : 'none';
619
+ document.getElementById('media-s3-fields').style.display = v === 's3' ? '' : 'none';
591
620
  document.getElementById('media-github-fields').style.display = v === 'github' ? '' : 'none';
592
621
  }
593
622
  document.getElementById('media-backend-select')?.addEventListener('change', updateMediaFields);
@@ -613,6 +642,12 @@
613
642
  ['media.github_repo', fd.get('media.github_repo')],
614
643
  ['media.github_branch', fd.get('media.github_branch')],
615
644
  ['media.github_dir', fd.get('media.github_dir')],
645
+ ['media.s3_bucket', fd.get('media.s3_bucket')],
646
+ ['media.s3_region', fd.get('media.s3_region')],
647
+ ['media.s3_endpoint', fd.get('media.s3_endpoint')],
648
+ ['media.s3_access_key', fd.get('media.s3_access_key')],
649
+ ['media.s3_secret_key', fd.get('media.s3_secret_key')],
650
+ ['media.s3_public_url', fd.get('media.s3_public_url')],
616
651
  ['api.enabled', fd.get('api.enabled') ? '1' : '0'],
617
652
  ['api.token', fd.get('api.token')],
618
653
  ]);
@@ -9,6 +9,7 @@ const ALLOWED_KEYS = [
9
9
  'github.token', 'github.repo', 'github.branch',
10
10
  'media.backend', 'media.local_path',
11
11
  'media.github_token', 'media.github_repo', 'media.github_branch', 'media.github_dir',
12
+ 'media.s3_bucket', 'media.s3_region', 'media.s3_endpoint', 'media.s3_access_key', 'media.s3_secret_key', 'media.s3_public_url',
12
13
  'api.enabled', 'api.token',
13
14
  'dashboard.notes', 'dashboard.todos',
14
15
  'ui.theme',