@everystack/cli 0.2.26 → 0.2.27

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": "@everystack/cli",
3
- "version": "0.2.26",
3
+ "version": "0.2.27",
4
4
  "description": "CLI and OTA updates for Expo apps on everystack",
5
5
  "license": "AGPL-3.0-only",
6
6
  "publishConfig": {
@@ -294,6 +294,19 @@ export async function discoverConfig(
294
294
  );
295
295
  }
296
296
 
297
+ // Media bucket fallback: if not found via naming convention (custom/pre-existing bucket),
298
+ // try reading from .sst/outputs.json where sst.config.ts return values land.
299
+ let mediaBucket = bucketsResult.mediaBucket;
300
+ if (!mediaBucket) {
301
+ try {
302
+ const raw = await fs.readFile(path.resolve('.sst', 'outputs.json'), 'utf8');
303
+ const outputs = JSON.parse(raw);
304
+ if (outputs.mediaBucket) mediaBucket = outputs.mediaBucket;
305
+ } catch {
306
+ // outputs.json not available — non-fatal
307
+ }
308
+ }
309
+
297
310
  return {
298
311
  baseUrl: lambdaResult.routerUrl || '',
299
312
  region,
@@ -302,7 +315,7 @@ export async function discoverConfig(
302
315
  workerFunctionName: workerFn,
303
316
  updatesBucket: bucketsResult.updatesBucket,
304
317
  clientBundlesBucket: bucketsResult.clientBundlesBucket,
305
- mediaBucket: bucketsResult.mediaBucket,
318
+ mediaBucket,
306
319
  kvsArn: cfResult.kvsArn,
307
320
  distributionId,
308
321
  };