snow-flow 8.33.12 → 8.33.14

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": "snow-flow",
3
- "version": "8.33.12",
3
+ "version": "8.33.14",
4
4
  "description": "ServiceNow development with SnowCode - 75+ LLM providers (Claude, GPT, Gemini, Llama, Mistral, DeepSeek, Groq, Ollama) • 393 Optimized Tools • 2 MCP Servers • Multi-agent orchestration • Use ANY AI coding assistant (ML tools moved to Enterprise)",
5
5
  "main": "dist/index.js",
6
6
  "type": "commonjs",
@@ -557,5 +557,8 @@
557
557
  "prettier --write",
558
558
  "git add"
559
559
  ]
560
+ },
561
+ "peerDependencies": {
562
+ "@groeimetai/snow-code": "^1.0.48"
560
563
  }
561
564
  }
@@ -5,13 +5,11 @@ try {
5
5
  const fs = require('fs');
6
6
  const path = require('path');
7
7
  const os = require('os');
8
- const { execSync } = require('child_process');
9
8
 
10
9
  console.log('🚀 Setting up Snow-Flow...');
11
10
 
12
11
  // Fix binary permissions (critical for containers/codespaces)
13
12
  try {
14
- const nodeModulesPath = path.join(__dirname, '..');
15
13
  const platforms = [
16
14
  'snow-code-darwin-arm64',
17
15
  'snow-code-darwin-x64',
@@ -20,16 +18,25 @@ try {
20
18
  'snow-code-windows-x64'
21
19
  ];
22
20
 
21
+ // Try both global and local node_modules locations
22
+ const locations = [
23
+ path.join(__dirname, '..', 'node_modules'),
24
+ path.join(process.cwd(), 'node_modules'),
25
+ path.join(os.homedir(), '.npm', '_npx', 'node_modules')
26
+ ];
27
+
23
28
  platforms.forEach(platform => {
24
- const binaryPath = path.join(nodeModulesPath, `@groeimetai/${platform}/bin/snow-code`);
25
- if (fs.existsSync(binaryPath)) {
26
- try {
27
- fs.chmodSync(binaryPath, 0o755);
28
- console.log(`✅ Fixed permissions for ${platform}`);
29
- } catch (err) {
30
- // Silently continue if chmod fails
29
+ locations.forEach(location => {
30
+ const binaryPath = path.join(location, '@groeimetai', platform, 'bin', 'snow-code');
31
+ if (fs.existsSync(binaryPath)) {
32
+ try {
33
+ fs.chmodSync(binaryPath, 0o755);
34
+ console.log(`✅ Fixed permissions for ${platform}`);
35
+ } catch (err) {
36
+ // Silently continue if chmod fails
37
+ }
31
38
  }
32
- }
39
+ });
33
40
  });
34
41
  } catch (error) {
35
42
  // Continue silently if permission fixing fails
@@ -39,38 +46,19 @@ try {
39
46
  const isGlobalInstall = process.env.npm_config_global === 'true' ||
40
47
  process.env.npm_config_global === true;
41
48
 
42
- // Check and update @groeimetai/snow-code peer dependency (always, even for global)
43
- try {
44
- const { updateSnowCode } = require('./update-snow-code.js');
45
-
46
- // Run the update check (async but we don't await in postinstall)
47
- updateSnowCode(true).then(result => {
48
- if (result.updated) {
49
- console.log(`✅ @groeimetai/snow-code ${result.message} (v${result.version})`);
50
- } else if (result.version) {
51
- console.log(`✅ @groeimetai/snow-code v${result.version} is up to date`);
52
- } else {
53
- console.log('⚠️ Could not update @groeimetai/snow-code');
54
- console.log(' Run: npm install -g @groeimetai/snow-code@latest');
55
- }
56
- }).catch(err => {
57
- // Silent fail - don't block installation
58
- console.log('⚠️ Could not auto-update @groeimetai/snow-code');
59
- console.log(' Run: npm install -g @groeimetai/snow-code@latest');
60
- });
61
- } catch (error) {
62
- // Continue silently if version check fails
63
- }
64
-
65
49
  if (isGlobalInstall) {
66
50
  console.log('✅ Snow-Flow installed globally');
67
51
  console.log('📁 Run "snow-flow init" in your project directory to initialize');
68
52
 
69
53
  // Create global config directory
70
- const globalConfigDir = path.join(os.homedir(), '.snow-flow');
71
- if (!fs.existsSync(globalConfigDir)) {
72
- fs.mkdirSync(globalConfigDir, { recursive: true });
73
- console.log(`✅ Created global config directory at ${globalConfigDir}`);
54
+ try {
55
+ const globalConfigDir = path.join(os.homedir(), '.snow-flow');
56
+ if (!fs.existsSync(globalConfigDir)) {
57
+ fs.mkdirSync(globalConfigDir, { recursive: true });
58
+ console.log(`✅ Created global config directory at ${globalConfigDir}`);
59
+ }
60
+ } catch (err) {
61
+ // Silently fail if can't create directory
74
62
  }
75
63
  } else {
76
64
  // Local installation - don't create directories automatically
@@ -24,6 +24,11 @@ async function syncSnowCodeVersion() {
24
24
  const packageJsonPath = path.join(__dirname, '..', 'package.json');
25
25
  const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
26
26
 
27
+ // Ensure peerDependencies exists
28
+ if (!packageJson.peerDependencies) {
29
+ packageJson.peerDependencies = {};
30
+ }
31
+
27
32
  // Get current peer dependency version
28
33
  const currentVersion = packageJson.peerDependencies['@groeimetai/snow-code'];
29
34