Skip to content
This repository was archived by the owner on Jan 19, 2026. It is now read-only.

Commit 76bf3aa

Browse files
committed
fix: add mapiclient initialization to migrations generate
1 parent c9ad2e5 commit 76bf3aa

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

  • src/commands/migrations/generate

src/commands/migrations/generate/index.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { session } from '../../../session';
99
import { fetchComponent } from '../../../commands/components';
1010
import { migrationsCommand } from '../command';
1111
import { generateMigration } from './actions';
12+
import { mapiClient } from '../../../api';
1213

1314
const program = getProgram();
1415

@@ -45,11 +46,16 @@ migrationsCommand
4546

4647
const { password, region } = state;
4748

49+
mapiClient({
50+
token: password,
51+
region,
52+
});
53+
4854
const spinner = new Spinner({
4955
verbose: !isVitest,
5056
}).start(`Generating migration for component ${componentName}...`);
5157
try {
52-
const component = await fetchComponent(space, componentName, password, region);
58+
const component = await fetchComponent(space, componentName);
5359

5460
if (!component) {
5561
spinner.failed(`Failed to fetch component ${componentName}. Make sure the component exists in your space.`);

0 commit comments

Comments
 (0)