@openpalm/lib 0.11.2-rc.2 → 0.11.2-rc.3

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": "@openpalm/lib",
3
- "version": "0.11.2-rc.2",
3
+ "version": "0.11.2-rc.3",
4
4
  "license": "MPL-2.0",
5
5
  "type": "module",
6
6
  "description": "Shared control-plane library for OpenPalm — lifecycle, staging, secrets, channels, connections, scheduler",
@@ -40,7 +40,22 @@ export function readCoreCompose(): string {
40
40
  }
41
41
 
42
42
  export function readBundledStackAsset(name: string): string {
43
- return readFileSync(bundledAssetPath(`config/stack/${name}`), 'utf-8');
43
+ // The bundled `.openpalm` assets are resolved relative to import.meta.url,
44
+ // which does not survive bundling into the UI/Electron build (the path lands
45
+ // outside the packaged app). When OP_HOME is already seeded this fallback is
46
+ // never reached; when it is NOT (e.g. a fresh Electron first-run) the read
47
+ // fails. Degrade gracefully to "" so callers (addon profile/service lookups)
48
+ // return empty rather than throwing a 500 — the live OP_HOME assets are the
49
+ // source of truth once seeded.
50
+ try {
51
+ return readFileSync(bundledAssetPath(`config/stack/${name}`), 'utf-8');
52
+ } catch (err) {
53
+ logger.warn('bundled stack asset unavailable (returning empty)', {
54
+ name,
55
+ error: err instanceof Error ? err.message : String(err),
56
+ });
57
+ return '';
58
+ }
44
59
  }
45
60
 
46
61
  // ── OpenCode System Config ──────────────────────────────────────────