snow-flow 8.30.13 → 8.30.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.30.13",
3
+ "version": "8.30.14",
4
4
  "description": "ServiceNow development with SnowCode - 75+ LLM providers (Claude, GPT, Gemini, Llama, Mistral, DeepSeek, Groq, Ollama) • 410 Optimized Tools • 2 MCP Servers • Native Predictive Intelligence builder • Multi-agent orchestration • Use ANY AI coding assistant",
5
5
  "main": "dist/index.js",
6
6
  "type": "commonjs",
@@ -28,7 +28,7 @@
28
28
  ],
29
29
  "scripts": {
30
30
  "build": "tsc --noEmitOnError false || true",
31
- "prepublishOnly": "npm run build",
31
+ "prepublishOnly": "node scripts/sync-snow-code-version.js && npm run build",
32
32
  "dev": "tsc --watch",
33
33
  "start": "node dist/index.js",
34
34
  "test": "jest",
@@ -0,0 +1,76 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * Automatically sync peerDependencies to latest @groeimetai/snow-code version
5
+ * Runs before publish to ensure users always get the latest snow-code
6
+ */
7
+
8
+ const { execSync } = require('child_process');
9
+ const fs = require('fs');
10
+ const path = require('path');
11
+
12
+ async function syncSnowCodeVersion() {
13
+ try {
14
+ console.log('🔍 Fetching latest @groeimetai/snow-code version from npm...');
15
+
16
+ // Fetch latest version from npm registry
17
+ const latestVersion = execSync('npm view @groeimetai/snow-code version', {
18
+ encoding: 'utf8'
19
+ }).trim();
20
+
21
+ console.log(`✅ Latest version: ${latestVersion}`);
22
+
23
+ // Read current package.json
24
+ const packageJsonPath = path.join(__dirname, '..', 'package.json');
25
+ const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
26
+
27
+ // Get current peer dependency version
28
+ const currentVersion = packageJson.peerDependencies['@groeimetai/snow-code'];
29
+
30
+ if (currentVersion === `^${latestVersion}`) {
31
+ console.log(`✓ Already up to date: ^${latestVersion}`);
32
+ return { updated: false, version: latestVersion };
33
+ }
34
+
35
+ // Update peerDependency to latest
36
+ packageJson.peerDependencies['@groeimetai/snow-code'] = `^${latestVersion}`;
37
+
38
+ // Write back to package.json
39
+ fs.writeFileSync(
40
+ packageJsonPath,
41
+ JSON.stringify(packageJson, null, 2) + '\n',
42
+ 'utf-8'
43
+ );
44
+
45
+ console.log(`✅ Updated peerDependency: ${currentVersion} → ^${latestVersion}`);
46
+
47
+ // Stage the change for git
48
+ try {
49
+ execSync('git add package.json', { cwd: path.join(__dirname, '..') });
50
+ console.log('✅ Staged package.json for commit');
51
+ } catch (err) {
52
+ // Git add might fail if not in a git repo, that's ok
53
+ }
54
+
55
+ return { updated: true, version: latestVersion };
56
+
57
+ } catch (error) {
58
+ console.error('❌ Failed to sync @groeimetai/snow-code version:', error.message);
59
+ console.error(' Continuing with current version...');
60
+ return { updated: false, error: error.message };
61
+ }
62
+ }
63
+
64
+ // Run if called directly
65
+ if (require.main === module) {
66
+ syncSnowCodeVersion().then(result => {
67
+ if (result.updated) {
68
+ console.log('\n🎉 Ready to publish with latest @groeimetai/snow-code dependency!');
69
+ } else if (result.error) {
70
+ console.log('\n⚠️ Could not auto-sync, but continuing...');
71
+ }
72
+ process.exit(0);
73
+ });
74
+ }
75
+
76
+ module.exports = { syncSnowCodeVersion };