flying-lobster 1.6.1 → 1.6.2

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.
Files changed (2) hide show
  1. package/bin/cli.js +21 -5
  2. package/package.json +1 -1
package/bin/cli.js CHANGED
@@ -56,12 +56,19 @@ function findBuiltApp(projectRoot) {
56
56
  function findBuiltDmg(projectRoot) {
57
57
  const distDir = path.join(projectRoot, 'dist');
58
58
 
59
- // Look for any .dmg file in dist
59
+ // Look for the most recent .dmg file in dist
60
60
  if (fs.existsSync(distDir)) {
61
- const files = fs.readdirSync(distDir);
62
- const dmg = files.find(f => f.endsWith('.dmg'));
63
- if (dmg) {
64
- return path.join(distDir, dmg);
61
+ const files = fs.readdirSync(distDir)
62
+ .filter(f => f.endsWith('.dmg') && !f.endsWith('.blockmap'))
63
+ .map(f => ({
64
+ name: f,
65
+ path: path.join(distDir, f),
66
+ mtime: fs.statSync(path.join(distDir, f)).mtime.getTime()
67
+ }))
68
+ .sort((a, b) => b.mtime - a.mtime); // newest first
69
+
70
+ if (files.length > 0) {
71
+ return files[0].path;
65
72
  }
66
73
  }
67
74
 
@@ -81,6 +88,15 @@ async function install() {
81
88
  await runCommand('npm', ['install', '--include=dev'], { cwd: projectRoot });
82
89
  }
83
90
 
91
+ // Clean up old DMGs to avoid confusion
92
+ const distDir = path.join(projectRoot, 'dist');
93
+ if (fs.existsSync(distDir)) {
94
+ const oldDmgs = fs.readdirSync(distDir).filter(f => f.endsWith('.dmg'));
95
+ oldDmgs.forEach(f => {
96
+ try { fs.unlinkSync(path.join(distDir, f)); } catch (e) {}
97
+ });
98
+ }
99
+
84
100
  // Build the DMG (standard Mac installer experience)
85
101
  try {
86
102
  await runCommand('npm', ['run', 'build'], { cwd: projectRoot });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flying-lobster",
3
- "version": "1.6.1",
3
+ "version": "1.6.2",
4
4
  "description": "Always-on-top chat window for OpenClaw gateways 🦞",
5
5
  "author": "Rootlab.ai",
6
6
  "license": "MIT",