[FRONT COMPONENTS] Build front components from twenty apps for remote dom (#17566)

Modify the front components build to match the expected format for
remote dom execution in a worker.
This commit is contained in:
Raphaël Bosi
2026-01-30 15:09:08 +01:00
committed by GitHub
parent ffdbb57eaa
commit d624652e36
24 changed files with 842 additions and 81 deletions
@@ -4,7 +4,7 @@ import * as fs from 'fs';
import { globSync } from 'glob';
// @ts-ignore
import path from 'path';
import { Options } from 'prettier';
import { type Options } from 'prettier';
import slash from 'slash';
// @ts-ignore
import ts from 'typescript';
@@ -105,15 +105,7 @@ const partitionFileExportsByType = (declarations: DeclarationOccurrence[]) => {
const generateModuleIndexFiles = (exportByBarrel: ExportByBarrel[]) => {
return exportByBarrel.map<createTypeScriptFileArgs>(
({ barrel: { moduleDirectory, moduleName }, allFileExports }) => {
if (moduleName === 'front-component') {
return {
content: `export { FrontComponentRenderer } from './host/components/FrontComponentRenderer'`,
path: moduleDirectory,
filename: INDEX_FILENAME,
};
}
({ barrel: { moduleDirectory }, allFileExports }) => {
const content = allFileExports
.sort((a, b) => a.file.localeCompare(b.file))
.map(({ exports, file }) => {
@@ -4,10 +4,10 @@ import * as fs from 'fs';
import * as path from 'path';
import { IndentationText, Project, QuoteKind } from 'ts-morph';
import { ALLOWED_HTML_ELEMENTS } from '../../src/front-component/constants/AllowedHtmlElements';
import { COMMON_HTML_EVENTS } from '../../src/front-component/constants/CommonHtmlEvents';
import { EVENT_TO_REACT } from '../../src/front-component/constants/EventToReact';
import { HTML_COMMON_PROPERTIES } from '../../src/front-component/constants/HtmlCommonProperties';
import { ALLOWED_HTML_ELEMENTS } from '../../src/front-component-constants/AllowedHtmlElements';
import { COMMON_HTML_EVENTS } from '../../src/front-component-constants/CommonHtmlEvents';
import { EVENT_TO_REACT } from '../../src/front-component-constants/EventToReact';
import { HTML_COMMON_PROPERTIES } from '../../src/front-component-constants/HtmlCommonProperties';
import {
type ComponentSchema,