Add checksum to manifest (#17368)

## Refactor app-dev state management and build utilities

- Store only `manifest` in `AppDevState` instead of full
`ManifestBuildResult`; add `sourcePath` to `FileStatus`
- Pass `sourcePaths` directly to watchers instead of
`ManifestBuildResult`
- Only reset `fileUploadStatus` for functions/components when their
source paths change
- Add pure `updateManifestChecksum` utility that returns a new manifest
without side effects
- Extract `processEsbuildResult` to deduplicate build result processing
between watchers
- Rename `serverlessFunctions` → `functions` in SDK code (API unchanged)
- Extract `writeManifestToOutput` to shared `manifest-writer.ts`
This commit is contained in:
Charles Bochet
2026-01-22 18:16:55 +01:00
committed by GitHub
parent 843fda7564
commit 210c66b5dd
25 changed files with 459 additions and 155 deletions
@@ -0,0 +1,20 @@
import { type ApplicationManifest } from 'twenty-shared/application';
// Replace dynamic checksum values with a placeholder for consistent comparisons
export const normalizeManifestForComparison = <
T extends Partial<ApplicationManifest>,
>(
manifest: T,
): T => ({
...manifest,
functions: manifest.functions?.map((fn) => ({
...fn,
builtHandlerChecksum: fn.builtHandlerChecksum ? '[checksum]' : null,
})),
frontComponents: manifest.frontComponents?.map((component) => ({
...component,
builtComponentChecksum: component.builtComponentChecksum
? '[checksum]'
: null,
})),
});