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:
@@ -19,8 +19,8 @@ export class MigrationsTool {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
static CreateMigration(path: string) {
|
static CreateMigration(name: string) {
|
||||||
return promisify(exec)(`supabase migration new ${path}`);
|
return promisify(exec)(`pnpm --filter web supabase migration new ${name}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Diff() {
|
static Diff() {
|
||||||
|
|||||||
@@ -202,6 +202,13 @@ export class ScriptsTool {
|
|||||||
usage: 'Automatically align package versions across workspaces.',
|
usage: 'Automatically align package versions across workspaces.',
|
||||||
importance: 'low',
|
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] || {
|
const scriptInfo = scriptDescriptions[scriptName] || {
|
||||||
|
|||||||
Reference in New Issue
Block a user