natureco-cli 2.12.8 → 2.12.9
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/src/commands/dashboard.js +2 -2
- package/src/commands/migrate.js +33 -0
package/package.json
CHANGED
|
@@ -211,7 +211,7 @@ body::before{
|
|
|
211
211
|
<div class="header-bot-name" id="header-bot-name">Nature Bot</div>
|
|
212
212
|
<div class="header-bot-model" id="header-bot-model">NatureCo</div>
|
|
213
213
|
</div>
|
|
214
|
-
<div class="version-badge" id="version-badge">v2.12.
|
|
214
|
+
<div class="version-badge" id="version-badge">v2.12.9</div>
|
|
215
215
|
</div>
|
|
216
216
|
<div class="messages" id="messages"></div>
|
|
217
217
|
<div class="input-area">
|
|
@@ -341,7 +341,7 @@ function dashboard(action) {
|
|
|
341
341
|
apiKey: cfg.apiKey,
|
|
342
342
|
defaultBot: cfg.defaultBot,
|
|
343
343
|
defaultBotId: cfg.defaultBotId,
|
|
344
|
-
version: 'v2.12.
|
|
344
|
+
version: 'v2.12.9',
|
|
345
345
|
bots: cfg.bots || [],
|
|
346
346
|
telegramToken: cfg.telegramToken || null,
|
|
347
347
|
whatsappConnected: cfg.whatsappConnected || false,
|
package/src/commands/migrate.js
CHANGED
|
@@ -2,6 +2,7 @@ const fs = require('fs');
|
|
|
2
2
|
const path = require('path');
|
|
3
3
|
const os = require('os');
|
|
4
4
|
const chalk = require('chalk');
|
|
5
|
+
const { execSync } = require('child_process');
|
|
5
6
|
const { getConfig, setConfig } = require('../utils/config');
|
|
6
7
|
|
|
7
8
|
/**
|
|
@@ -130,6 +131,38 @@ async function migrate(options) {
|
|
|
130
131
|
fs.writeFileSync(destPath, content);
|
|
131
132
|
report.scripts++;
|
|
132
133
|
}
|
|
134
|
+
|
|
135
|
+
// Create package.json for workspace scripts
|
|
136
|
+
const workspaceDir = path.join(os.homedir(), '.natureco', 'workspace', 'scripts');
|
|
137
|
+
const workspacePackageJson = {
|
|
138
|
+
name: "natureco-workspace",
|
|
139
|
+
version: "1.0.0",
|
|
140
|
+
description: "NatureCo workspace scripts",
|
|
141
|
+
dependencies: {
|
|
142
|
+
"dotenv": "^16.0.0",
|
|
143
|
+
"axios": "^1.0.0",
|
|
144
|
+
"node-fetch": "^2.6.0",
|
|
145
|
+
"googleapis": "^118.0.0",
|
|
146
|
+
"playwright": "^1.40.0",
|
|
147
|
+
"twitter-api-v2": "^1.15.0",
|
|
148
|
+
"openai": "^4.0.0"
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
fs.writeFileSync(
|
|
153
|
+
path.join(workspaceDir, 'package.json'),
|
|
154
|
+
JSON.stringify(workspacePackageJson, null, 2)
|
|
155
|
+
);
|
|
156
|
+
|
|
157
|
+
// Install npm packages
|
|
158
|
+
console.log(chalk.yellow('\n📦 Workspace npm paketleri kuruluyor...\n'));
|
|
159
|
+
try {
|
|
160
|
+
execSync('npm install', { cwd: workspaceDir, stdio: 'inherit' });
|
|
161
|
+
console.log(chalk.green('\n✅ npm paketleri kuruldu\n'));
|
|
162
|
+
} catch (err) {
|
|
163
|
+
console.log(chalk.yellow('\n⚠️ npm install başarısız, manuel olarak çalıştırın:\n'));
|
|
164
|
+
console.log(chalk.cyan(` cd ${workspaceDir} && npm install\n`));
|
|
165
|
+
}
|
|
133
166
|
}
|
|
134
167
|
} catch (err) {
|
|
135
168
|
console.log(chalk.gray('⚠️ Workspace scripts migration atlandı:', err.message));
|