Add sync front component (#17748)

## Context
Allow twenty apps to sync front components
This commit is contained in:
Weiko
2026-02-09 00:00:23 +01:00
committed by GitHub
parent 40d7e740ef
commit 9aa63f7ddc
33 changed files with 643 additions and 97 deletions
@@ -11,6 +11,10 @@ type FrontComponentSeed = {
workspaceId: string;
universalIdentifier: string;
applicationId: string;
sourceComponentPath: string;
builtComponentPath: string;
componentName: string;
builtComponentChecksum: string;
};
type CommandMenuItemSeed = {
@@ -48,6 +52,10 @@ export const getFrontComponentAndCommandMenuItemDataSeeds = (
workspaceId,
universalIdentifier: frontComponentId,
applicationId,
sourceComponentPath: 'src/front-components/demo-app.tsx',
builtComponentPath: 'src/front-components/demo-app.mjs',
componentName: 'DemoApp',
builtComponentChecksum: '1234567890',
},
];
@@ -28,6 +28,10 @@ export const seedFrontComponentsAndCommandMenuItems = async ({
'workspaceId',
'universalIdentifier',
'applicationId',
'sourceComponentPath',
'builtComponentPath',
'componentName',
'builtComponentChecksum',
])
.values(
frontComponents.map((row) => ({
@@ -36,6 +40,10 @@ export const seedFrontComponentsAndCommandMenuItems = async ({
workspaceId: row.workspaceId,
universalIdentifier: row.universalIdentifier,
applicationId: row.applicationId,
sourceComponentPath: row.sourceComponentPath,
builtComponentPath: row.builtComponentPath,
componentName: row.componentName,
builtComponentChecksum: row.builtComponentChecksum,
})),
)
.orIgnore()