Skip to content

Commit c9deb7a

Browse files
Copilothotlong
andcommitted
fix: make manifest optional in ObjectStackDefinitionSchema to prevent white screen on Vercel deploy
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 8ff31fa commit c9deb7a

2 files changed

Lines changed: 14 additions & 3 deletions

File tree

packages/spec/src/stack.test.ts

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -411,8 +411,8 @@ describe('ObjectStackDefinitionSchema', () => {
411411
expect(() => ObjectStackDefinitionSchema.parse(definition)).not.toThrow();
412412
});
413413

414-
it('should require manifest field', () => {
415-
expect(() => ObjectStackDefinitionSchema.parse({})).toThrow();
414+
it('should accept definition without manifest (manifest is optional)', () => {
415+
expect(() => ObjectStackDefinitionSchema.parse({})).not.toThrow();
416416
});
417417
});
418418

@@ -525,6 +525,17 @@ describe('defineStack', () => {
525525
// No objects defined, so cross-ref validation is skipped
526526
expect(() => defineStack(config, { strict: true })).not.toThrow();
527527
});
528+
529+
it('should accept config without manifest (manifest is optional)', () => {
530+
const config = {
531+
objects: [
532+
{ name: 'task', fields: { title: { type: 'text' } } },
533+
],
534+
};
535+
const result = defineStack(config as any);
536+
expect(result.manifest).toBeUndefined();
537+
expect(result.objects).toHaveLength(1);
538+
});
528539
});
529540

530541
describe('defineStack - Field Name Validation', () => {

packages/spec/src/stack.zod.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ import { ConnectorSchema } from './integration/connector.zod';
7272
*/
7373
export const ObjectStackDefinitionSchema = z.object({
7474
/** System Configuration */
75-
manifest: ManifestSchema.describe('Project Package Configuration'),
75+
manifest: ManifestSchema.optional().describe('Project Package Configuration'),
7676
datasources: z.array(DatasourceSchema).optional().describe('External Data Connections'),
7777
translations: z.array(TranslationBundleSchema).optional().describe('I18n Translation Bundles'),
7878
i18n: TranslationConfigSchema.optional().describe('Internationalization configuration'),

0 commit comments

Comments
 (0)