decocms / decocms/blocks

deco-migrate template: css/fonts/meta/previewWrapper não estão em SiteSetupOptions

Open
#485 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
5
Forks
2
Avg merge
20h 12m
Merged PRs (30d)
36

Description

Gap encontrado: portal-davinci migration run (2026-08-20)

Fase

migrate-script → geração de src/setup.ts

Problema

O template em @decocms/blocks-cli/scripts/migrate/templates/setup.ts gera setup.ts com campos que não existem na interface SiteSetupOptions do @decocms/blocks:

  • css: appCss
  • fonts: []
  • meta: () => import(...)
  • previewWrapper: PreviewProviders

Isso resulta em 3+ erros TypeScript na fase build-green:

  • error TS2353: Object literal may only specify known properties, and 'meta' does not exist in type 'SiteSetupOptions'
  • error TS2578: Unused '@ts-expect-error' directive (o template usa @ts-ignore mas o generate usa @ts-expect-error)
Workaround usado nesta run

Cast do objeto para as any.

Fix necessário

Escolher um dos dois:

  1. Adicionar os campos css, fonts, previewWrapper, meta à SiteSetupOptions em @decocms/blocks
  2. Remover esses campos do template e usar setPreviewWrapper(PreviewProviders) separado + documentar como registrar CSS
Referências
  • node_modules/@decocms/blocks/src/setup.ts — interface atual sem esses campos
  • node_modules/@decocms/blocks-cli/scripts/migrate/templates/setup.ts — template que os gera

Transferida de decocms/parity#235 (bug de template do deco-migrate / @decocms/blocks-cli, fora do escopo do repo parity).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with node_modules/@decocms/blocks/src/setup.ts and the @decocms/blocks-cli/scripts/migrate/templates/setup.ts template. Compare the generated fields with SiteSetupOptions and resolve whether the interface or template should own them. Re-run the migration and build-green checks to confirm the generated setup.ts has no TypeScript errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.