Add twenty sync command (#19413)

Add one shot app synchronisation `twenty sync command` command

Complementary with `twenty app dev` command which is watch mode

Fixes
https://discord.com/channels/1130383047699738754/1489644493106839663
This commit is contained in:
martmull
2026-04-08 11:26:42 +02:00
committed by GitHub
parent 8026451220
commit 90de1d4a34
11 changed files with 485 additions and 8 deletions
@@ -29,6 +29,9 @@ const mockApiService = {
}),
syncApplication: vi.fn().mockResolvedValue({ success: true, data: true }),
uploadFile: vi.fn().mockResolvedValue({ success: true, data: true }),
getSchema: vi
.fn()
.mockResolvedValue({ success: true, data: 'mock-core-schema' }),
};
vi.mock('@/cli/utilities/api/api-service', () => ({
@@ -43,6 +46,7 @@ vi.mock('@/cli/utilities/api/api-service', () => ({
createDevelopmentApplication = mockApiService.createDevelopmentApplication;
syncApplication = mockApiService.syncApplication;
uploadFile = mockApiService.uploadFile;
getSchema = mockApiService.getSchema;
},
}));
@@ -52,6 +56,12 @@ vi.mock('@/cli/utilities/file/file-uploader', () => ({
},
}));
vi.mock('@/cli/utilities/client/client-service', () => ({
ClientService: class {
generateCoreClient = vi.fn().mockResolvedValue(undefined);
},
}));
vi.mock('@/cli/utilities/dev/ui/components/dev-ui', () => ({
renderDevUI: vi.fn().mockResolvedValue({ unmount: vi.fn() }),
}));