Skip to content

site deploy (and all deploy commands) blocked by entity-name validation for snake_case names the platform accepts #543

Description

@jackc625

Summary

On CLI 0.0.55, every deploy command — base44 site deploy, base44 functions deploy, base44 deploy, and base44 functions pull — fails during project load if any entity's name contains an underscore (e.g. line_items). The check rejects names the Base44 platform itself already accepts and serves in production, so an existing app whose entities use snake_case names cannot deploy anything through the CLI.

Environment

  • base44 CLI: 0.0.55
  • Node: 22.16.0

Steps to reproduce

  1. A project with an entity whose name is snake_case, e.g. base44/entities/line-items.jsonc containing "name": "line_items" (such entities already exist and are served live).
  2. Run npx base44 site deploy.
  3. Fails before any upload with: Invalid entity file / Entity name must be alphanumeric only.

Root cause (from the bundled CLI)

readProjectConfig()readAllEntities()readEntityFile() runs EntitySchema.safeParse(), where EntitySchema.name is string().regex(/^[a-zA-Z0-9]+$/, "Entity name must be alphanumeric only"). All entities are validated eagerly on load, so one snake_case name aborts the whole command. Notably, site deploy calls readProjectConfig() before deploySite() even though it only archives/uploads the build output and never pushes entities — so it's blocked too. (exec, functions list, whoami don't call readProjectConfig, which is why they still work.)

Impact

Apps whose entities use snake_case names — which the platform accepts and serves — cannot deploy via the CLI at all. Renaming isn't a safe fix: name is the entity's identity (sync key, SDK accessor base44.entities.line_items, and frontend references) bound to live production data.

Regression

The validation appears to have been introduced around 0.0.30; 0.0.20 does not reject underscores.

Requested fix (any one)

  1. Accept entity names the platform accepts (allow underscores), or
  2. Skip entity-name validation for site deploy (it doesn't push entities), or
  3. Add an opt-out flag (e.g. --skip-entity-validation) for deploy commands.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions