@everystack/cli 0.2.3 → 0.2.4

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.3",
3
+ "version": "0.2.4",
4
4
  "description": "CLI and OTA updates for Expo apps on everystack",
5
5
  "license": "AGPL-3.0-only",
6
6
  "publishConfig": {
@@ -412,8 +412,17 @@ async function loadAppConfig(): Promise<any> {
412
412
  // Handle Expo's function export pattern: export default () => ({ ... })
413
413
  if (typeof resolved === 'function') resolved = resolved();
414
414
  return resolved.expo || resolved;
415
- } catch {
416
- throw new Error('Could not find app.json or app.config.js');
415
+ } catch (e) {
416
+ const configPath = path.resolve('app.config.js');
417
+ try {
418
+ await fs.access(configPath);
419
+ // File exists but failed to import — surface the real error
420
+ throw new Error(`Failed to load app.config.js: ${e instanceof Error ? e.message : e}`);
421
+ } catch (accessErr) {
422
+ if (accessErr instanceof Error && accessErr.message.startsWith('Failed to load'))
423
+ throw accessErr;
424
+ throw new Error('Could not find app.json or app.config.js');
425
+ }
417
426
  }
418
427
  }
419
428
  }