Update migration and script tools for Supabase CLI integration

- Refactored `CreateMigration` method in `migrations.ts` to use `pnpm --filter web` for better command execution context.
- Added new Supabase CLI command descriptions in `scripts.ts` to facilitate access via the web project, enhancing usability and documentation.
This commit is contained in:
gbuomprisco
2025-09-17 20:20:06 +08:00
parent c719884cbd
commit f85035bd01
2 changed files with 9 additions and 2 deletions

View File

@@ -19,8 +19,8 @@ export class MigrationsTool {
);
}
static CreateMigration(path: string) {
return promisify(exec)(`supabase migration new ${path}`);
static CreateMigration(name: string) {
return promisify(exec)(`pnpm --filter web supabase migration new ${name}`);
}
static Diff() {

View File

@@ -202,6 +202,13 @@ export class ScriptsTool {
usage: 'Automatically align package versions across workspaces.',
importance: 'low',
},
'supabase:cli': {
category: 'database',
description: 'Access Supabase CLI commands via web project',
usage:
'Use with: pnpm --filter web supabase <command>. Examples: db diff, db push, gen types, etc.',
importance: 'high',
},
};
const scriptInfo = scriptDescriptions[scriptName] || {