@tamyla/clodo-framework 3.0.4 → 3.0.6
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/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [3.0.6](https://github.com/tamylaa/clodo-framework/compare/v3.0.5...v3.0.6) (2025-10-14)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* use database name instead of binding name for D1 migrations ([6b22b25](https://github.com/tamylaa/clodo-framework/commit/6b22b25e95bebb4f9728835bd881d71dd90cdba6))
|
|
7
|
+
|
|
8
|
+
## [3.0.5](https://github.com/tamylaa/clodo-framework/compare/v3.0.4...v3.0.5) (2025-10-14)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* add missing join import in clodo-service.js ([5e0d7c6](https://github.com/tamylaa/clodo-framework/commit/5e0d7c6ce3262454138f39b4e44d0d24dc7bcb65))
|
|
14
|
+
|
|
1
15
|
## [3.0.4](https://github.com/tamylaa/clodo-framework/compare/v3.0.3...v3.0.4) (2025-10-14)
|
|
2
16
|
|
|
3
17
|
|
package/bin/clodo-service.js
CHANGED
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
import { Command } from 'commander';
|
|
16
16
|
import { createInterface } from 'readline';
|
|
17
17
|
import chalk from 'chalk';
|
|
18
|
+
import { join } from 'path';
|
|
18
19
|
import { ServiceOrchestrator } from '../dist/service-management/ServiceOrchestrator.js';
|
|
19
20
|
import { InputCollector } from '../dist/service-management/InputCollector.js';
|
|
20
21
|
|
|
@@ -395,9 +395,11 @@ export class DatabaseOrchestrator {
|
|
|
395
395
|
}
|
|
396
396
|
console.log(` ✅ Database ${databaseName} validated`);
|
|
397
397
|
|
|
398
|
-
// Use
|
|
399
|
-
const command = this.buildMigrationCommand(
|
|
398
|
+
// Use DATABASE name for wrangler command
|
|
399
|
+
const command = this.buildMigrationCommand(databaseName, environment, isRemote);
|
|
400
400
|
console.log(` 📋 Migration command: ${command}`);
|
|
401
|
+
console.log(` 📁 Command will run from: ${this.projectRoot}`);
|
|
402
|
+
console.log(` 📁 Current working directory: ${process.cwd()}`);
|
|
401
403
|
const output = await this.executeWithRetry(command, 120000, this.projectRoot); // 2 minute timeout
|
|
402
404
|
|
|
403
405
|
// Parse migration output
|
|
@@ -646,11 +648,11 @@ export class DatabaseOrchestrator {
|
|
|
646
648
|
|
|
647
649
|
// Command builders and utility methods
|
|
648
650
|
|
|
649
|
-
buildMigrationCommand(
|
|
650
|
-
// Use
|
|
651
|
-
// Wrangler expects: "npx wrangler d1 migrations apply
|
|
652
|
-
// NOT: "npx wrangler d1 migrations apply
|
|
653
|
-
let command = `npx wrangler d1 migrations apply ${
|
|
651
|
+
buildMigrationCommand(databaseName, environment, isRemote) {
|
|
652
|
+
// Use DATABASE name, NOT binding name
|
|
653
|
+
// Wrangler expects: "npx wrangler d1 migrations apply database-name --local"
|
|
654
|
+
// NOT: "npx wrangler d1 migrations apply binding-name --local"
|
|
655
|
+
let command = `npx wrangler d1 migrations apply ${databaseName}`;
|
|
654
656
|
|
|
655
657
|
// For remote environments, add --remote flag
|
|
656
658
|
// For local development, use --local
|
|
@@ -294,6 +294,8 @@ export class MultiDomainOrchestrator {
|
|
|
294
294
|
|
|
295
295
|
// CRITICAL: Update wrangler.toml BEFORE attempting migrations
|
|
296
296
|
console.log(` 📝 Configuring wrangler.toml for database...`);
|
|
297
|
+
console.log(` 📁 Service path: ${this.servicePath}`);
|
|
298
|
+
console.log(` 📁 Current working directory: ${process.cwd()}`);
|
|
297
299
|
try {
|
|
298
300
|
// Ensure environment section exists
|
|
299
301
|
await this.wranglerConfigManager.ensureEnvironment(this.environment);
|
|
@@ -305,6 +307,7 @@ export class MultiDomainOrchestrator {
|
|
|
305
307
|
database_id: databaseId
|
|
306
308
|
});
|
|
307
309
|
console.log(` ✅ wrangler.toml updated with database configuration`);
|
|
310
|
+
console.log(` 📄 wrangler.toml location: ${this.wranglerConfigManager.configPath}`);
|
|
308
311
|
} catch (configError) {
|
|
309
312
|
console.warn(` ⚠️ Failed to update wrangler.toml: ${configError.message}`);
|
|
310
313
|
console.warn(` 💡 You may need to manually add database configuration`);
|