ObjectStackObjectStack

Deploy Bundle

Deploy Bundle protocol schemas

Deploy Bundle Protocol

Defines the schemas for metadata-driven deployment:

Schema Push → Zod Validate → Diff → DDL Sync → Register

This eliminates traditional CI/CD pipelines for schema changes.

A "deploy" is a bundle of metadata (objects, views, flows, permissions)

that is validated, diffed against the current state, and applied

as DDL migrations directly to the tenant database.

Target: 2-5 second deploys vs. 2-15 minute traditional Docker/CI/CD.

Source: packages/spec/src/system/deploy-bundle.zod.ts

TypeScript Usage

import { ChangeSchema, DeployBundle, DeployDiff, DeployManifest, DeployStatusEnum, DeployValidationIssue, DeployValidationResult, MigrationPlan, MigrationStatement } from '@objectstack/spec/system';
import type { Change, DeployBundle, DeployDiff, DeployManifest, DeployStatusEnum, DeployValidationIssue, DeployValidationResult, MigrationPlan, MigrationStatement } from '@objectstack/spec/system';

// Validate data
const result = ChangeSchema.parse(data);

ChangeSchema

Individual schema change

Properties

PropertyTypeRequiredDescription
entityTypeEnum<'object' | 'field' | 'index' | 'view' | 'flow' | 'permission'>Entity type
entityNamestringEntity name
parentEntitystringoptionalParent entity name
changeTypeEnum<'added' | 'modified' | 'removed'>Change type
oldValueanyoptionalPrevious value
newValueanyoptionalNew value

DeployBundle

Deploy bundle containing all metadata for deployment

Properties

PropertyTypeRequiredDescription
manifestObjectDeployment manifest
objectsRecord<string, any>[]Object definitions
viewsRecord<string, any>[]View definitions
flowsRecord<string, any>[]Flow definitions
permissionsRecord<string, any>[]Permission definitions
seedDataRecord<string, any>[]Seed data records

DeployDiff

Schema diff between current and desired state

Properties

PropertyTypeRequiredDescription
changesObject[]List of schema changes
summaryObjectChange summary counts
hasBreakingChangesbooleanWhether diff contains breaking changes

DeployManifest

Deployment manifest

Properties

PropertyTypeRequiredDescription
versionstringDeployment version
checksumstringoptionalSHA256 checksum
objectsstring[]Object names included
viewsstring[]View names included
flowsstring[]Flow names included
permissionsstring[]Permission names included
createdAtstringoptionalBundle creation time

DeployStatusEnum

Deployment lifecycle status

Allowed Values

  • validating
  • diffing
  • migrating
  • registering
  • ready
  • failed
  • rolling_back

DeployValidationIssue

Validation issue

Properties

PropertyTypeRequiredDescription
severityEnum<'error' | 'warning' | 'info'>Issue severity
pathstringEntity path (e.g., objects.project_task.fields.name)
messagestringIssue description
codestringoptionalValidation error code

DeployValidationResult

Bundle validation result

Properties

PropertyTypeRequiredDescription
validbooleanWhether the bundle is valid
issuesObject[]Validation issues
errorCountintegerNumber of errors
warningCountintegerNumber of warnings

MigrationPlan

Ordered migration plan

Properties

PropertyTypeRequiredDescription
statementsObject[]Ordered DDL statements
dialectstringTarget SQL dialect
reversiblebooleanWhether the plan can be fully rolled back
estimatedDurationMsintegeroptionalEstimated execution time

MigrationStatement

Single DDL migration statement

Properties

PropertyTypeRequiredDescription
sqlstringSQL DDL statement
reversiblebooleanWhether the statement can be reversed
rollbackSqlstringoptionalReverse SQL for rollback
orderintegerExecution order

On this page