snow-flow 8.33.12 → 8.33.13
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 +1 -1
- package/scripts/postinstall.js +25 -37
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "snow-flow",
|
|
3
|
-
"version": "8.33.
|
|
3
|
+
"version": "8.33.13",
|
|
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",
|
package/scripts/postinstall.js
CHANGED
|
@@ -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
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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
|
-
|
|
71
|
-
|
|
72
|
-
fs.
|
|
73
|
-
|
|
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
|