natureco-cli 2.13.0 → 2.13.2
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 +23 -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.13.
|
|
214
|
+
<div class="version-badge" id="version-badge">v2.13.2</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.13.
|
|
344
|
+
version: 'v2.13.2',
|
|
345
345
|
bots: cfg.bots || [],
|
|
346
346
|
telegramToken: cfg.telegramToken || null,
|
|
347
347
|
whatsappConnected: cfg.whatsappConnected || false,
|
package/src/commands/migrate.js
CHANGED
|
@@ -124,6 +124,10 @@ async function migrate(options) {
|
|
|
124
124
|
.replace(/C:\/\/\/\/Users\/\/\/\/user\/\/\/\//g, `${os.homedir()}/`)
|
|
125
125
|
.replace(/C:\/Users\/user\//g, `${os.homedir()}/`)
|
|
126
126
|
.replace(/C:\/Users\/user\//g, `${os.homedir()}/`)
|
|
127
|
+
// Double slash versions (escaped in strings)
|
|
128
|
+
.replace(/C:\/\/Users\/\/user\/\/\.natureco\/\//g, `${os.homedir()}/.natureco/`)
|
|
129
|
+
.replace(/C:\/\/Users\/\/user\/\//g, `${os.homedir()}/`)
|
|
130
|
+
.replace(/E:\/\/\.natureco\/\//g, `${os.homedir()}/.natureco/`)
|
|
127
131
|
// String literals with quotes
|
|
128
132
|
.replace(/'C:\/Users\/user\/\.natureco\//g, `'${os.homedir()}/.natureco/`)
|
|
129
133
|
.replace(/"C:\/Users\/user\/\.natureco\//g, `"${os.homedir()}/.natureco/`)
|
|
@@ -161,6 +165,21 @@ async function migrate(options) {
|
|
|
161
165
|
JSON.stringify(workspacePackageJson, null, 2)
|
|
162
166
|
);
|
|
163
167
|
|
|
168
|
+
// Copy .env file (check multiple locations)
|
|
169
|
+
const envSources = [
|
|
170
|
+
path.join(openclawDir, 'workspace', 'scripts', '.env'), // önce buraya bak
|
|
171
|
+
path.join(openclawDir, '.env') // sonra buna
|
|
172
|
+
];
|
|
173
|
+
const envDest = path.join(workspaceDir, '.env');
|
|
174
|
+
|
|
175
|
+
for (const envSource of envSources) {
|
|
176
|
+
if (fs.existsSync(envSource)) {
|
|
177
|
+
fs.copyFileSync(envSource, envDest);
|
|
178
|
+
console.log(chalk.green('✅ .env dosyası kopyalandı'));
|
|
179
|
+
break;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
164
183
|
// Install npm packages
|
|
165
184
|
console.log(chalk.yellow('\n📦 Workspace npm paketleri kuruluyor...\n'));
|
|
166
185
|
try {
|
|
@@ -229,6 +248,10 @@ async function migrate(options) {
|
|
|
229
248
|
.replace(/C:\/\/\/\/Users\/\/\/\/user\/\/\/\//g, `${os.homedir()}/`)
|
|
230
249
|
.replace(/C:\/Users\/user\//g, `${os.homedir()}/`)
|
|
231
250
|
.replace(/C:\/Users\/user\//g, `${os.homedir()}/`)
|
|
251
|
+
// Double slash versions (escaped in strings)
|
|
252
|
+
.replace(/C:\/\/Users\/\/user\/\/\.natureco\/\//g, `${os.homedir()}/.natureco/`)
|
|
253
|
+
.replace(/C:\/\/Users\/\/user\/\//g, `${os.homedir()}/`)
|
|
254
|
+
.replace(/E:\/\/\.natureco\/\//g, `${os.homedir()}/.natureco/`)
|
|
232
255
|
// String literals with quotes
|
|
233
256
|
.replace(/'C:\/Users\/user\/\.natureco\//g, `'${os.homedir()}/.natureco/`)
|
|
234
257
|
.replace(/"C:\/Users\/user\/\.natureco\//g, `"${os.homedir()}/.natureco/`)
|