flutter-skill 0.9.34 → 0.9.36

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/README.md CHANGED
@@ -440,7 +440,7 @@ Then batch multiple actions in one call:
440
440
 
441
441
  ```yaml
442
442
  dependencies:
443
- flutter_skill: ^0.9.34
443
+ flutter_skill: ^0.9.36
444
444
  ```
445
445
 
446
446
  ```dart
package/bin/cli.js CHANGED
@@ -85,6 +85,11 @@ async function main() {
85
85
 
86
86
  // Try to use existing native binary
87
87
  if (localBinaryPath && fs.existsSync(localBinaryPath)) {
88
+ // Always ensure the execute bit is set before spawning.
89
+ // postinstall chmodSync can silently fail on some npm configurations
90
+ // (e.g. restricted sandbox, npm run as root on certain macOS setups),
91
+ // leaving the binary present but not executable (EACCES).
92
+ try { fs.chmodSync(localBinaryPath, 0o755); } catch (_) {}
88
93
  runNativeBinary(localBinaryPath);
89
94
  return;
90
95
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "flutter-skill",
3
3
  "mcpName": "io.github.ai-dashboad/flutter-skill",
4
- "version": "0.9.34",
4
+ "version": "0.9.36",
5
5
  "description": "MCP Server for app automation - Give your AI Agent eyes and hands inside any app (Flutter, React, Web, Native)",
6
6
  "main": "index.js",
7
7
  "bin": {
@@ -57,7 +57,14 @@ function downloadBinary(url, destPath) {
57
57
  response.pipe(file);
58
58
  file.on('finish', () => {
59
59
  file.close();
60
- fs.chmodSync(destPath, 0o755);
60
+ try {
61
+ fs.chmodSync(destPath, 0o755);
62
+ } catch (chmodErr) {
63
+ // chmod failed — reject so the caller can log a warning instead
64
+ // of leaving a non-executable file behind silently.
65
+ reject(new Error(`Downloaded binary but could not set execute permission: ${chmodErr.message}`));
66
+ return;
67
+ }
61
68
  console.log('\n[flutter-skill] Native binary installed successfully!');
62
69
  resolve(destPath);
63
70
  });
@@ -78,6 +85,9 @@ async function main() {
78
85
  const localPath = path.join(binDir, `${binaryName}-v${VERSION}`);
79
86
 
80
87
  if (fs.existsSync(localPath)) {
88
+ // Re-apply execute permission in case a previous install left the binary
89
+ // without +x (e.g. chmod failed silently inside a restricted npm sandbox).
90
+ try { fs.chmodSync(localPath, 0o755); } catch (_) {}
81
91
  console.log('[flutter-skill] Native binary already installed');
82
92
  return;
83
93
  }