Skip to content

feat: add base44 validate command for resource config files#411

Open
base44-os-gremlins[bot] wants to merge 1 commit intomainfrom
feat/validate-command
Open

feat: add base44 validate command for resource config files#411
base44-os-gremlins[bot] wants to merge 1 commit intomainfrom
feat/validate-command

Conversation

@base44-os-gremlins
Copy link

Summary

  • Adds a new base44 validate command that discovers all resource config files in the project's base44/ folder and validates each against its Zod schema
  • Granular error collection: checks all files before exiting (no fail-fast), printing per-file pass/fail with field-level error details
  • CI-safe: exits with code 1 when any validation errors are found, 0 on success
  • No auth required: works without being logged in, useful for pre-push checks
  • Validates all four resource types: entities, functions, agents, connectors

Example output

✓ base44/config.jsonc
✓ base44/entities/customer.jsonc
✗ base44/functions/send-email/function.jsonc
  Function name cannot be empty
    → at name
✓ base44/agents/support.jsonc

2 files checked — 1 passed, 1 failed

Test plan

  • 9 integration tests added covering all resource types and edge cases
  • bun run typecheck passes
  • bun run lint passes (no new errors)
  • All 9 tests pass locally

Relates to

Goal #870: https://github.com/base44-dev/gremlins/issues/870

🤖 Generated with Claude Code

Adds a new \`base44 validate\` command that discovers all resource config
files in the project's base44/ folder and validates each against its Zod
schema, collecting all errors before exiting.

- Validates entities, functions, agents, and connectors
- Prints per-file pass/fail with field-level error details
- Exits with code 1 when any validation errors are found (CI-safe)
- Does not require authentication -- safe to run anywhere
- Includes 9 integration tests covering all resource types and edge cases

Relates to: https://github.com/base44-dev/gremlins/issues/870

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Contributor

🚀 Package Preview Available!


Install this PR's preview build with npm:

npm i @base44-preview/cli@0.0.44-pr.411.fe4049c

Prefer not to change any import paths? Install using npm alias so your code still imports base44:

npm i "base44@npm:@base44-preview/cli@0.0.44-pr.411.fe4049c"

Or add it to your package.json dependencies:

{
  "dependencies": {
    "base44": "npm:@base44-preview/cli@0.0.44-pr.411.fe4049c"
  }
}

Preview published to npm registry — try new features instantly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant