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 { DeployBundleSchema, DeployDiffSchema, DeployManifestSchema, DeployStatusEnum, DeployValidationIssueSchema, DeployValidationResultSchema, MigrationPlanSchema, MigrationStatementSchema, SchemaChangeSchema } from '@objectstack/spec/system';
import type { DeployBundle, DeployDiff, DeployManifest, DeployValidationIssue, DeployValidationResult, MigrationPlan, MigrationStatement, SchemaChange } from '@objectstack/spec/system';

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

DeployBundle

Deploy bundle containing all metadata for deployment

Properties

PropertyTypeRequiredDescription
manifest{ version: string; checksum?: string; objects: string[]; views: string[]; … }Deployment manifest
objectsRecord<string, any>[]optional (default: [])Object definitions
viewsRecord<string, any>[]optional (default: [])View definitions
flowsRecord<string, any>[]optional (default: [])Flow definitions
permissionsRecord<string, any>[]optional (default: [])Permission definitions
seedDataRecord<string, any>[]optional (default: [])Seed data records

Nested Shape: DeployBundle.manifest

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

DeployDiff

Schema diff between current and desired state

Properties

PropertyTypeRequiredDescription
changes{ entityType: Enum<'object' | 'field' | 'index' | 'view' | 'flow' | 'permission'>; entityName: string; parentEntity?: string; changeType: Enum<'added' | 'modified' | 'removed'>; … }[]optional (default: [])List of schema changes
summary{ added: integer; modified: integer; removed: integer }Change summary counts
hasBreakingChangesbooleanoptional (default: false)Whether diff contains breaking changes

Nested Shape: DeployDiff.changes[number]

Individual schema change

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

Nested Shape: DeployDiff.summary

PropertyTypeRequiredDescription
addedintegeroptional (default: 0)Number of added entities
modifiedintegeroptional (default: 0)Number of modified entities
removedintegeroptional (default: 0)Number of removed entities

DeployManifest

Deployment manifest

Properties

PropertyTypeRequiredDescription
versionstringDeployment version
checksumstringoptionalSHA256 checksum
objectsstring[]optional (default: [])Object names included
viewsstring[]optional (default: [])View names included
flowsstring[]optional (default: [])Flow names included
permissionsstring[]optional (default: [])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
issues{ severity: Enum<'error' | 'warning' | 'info'>; path: string; message: string; code?: string }[]optional (default: [])Validation issues
errorCountintegeroptional (default: 0)Number of errors
warningCountintegeroptional (default: 0)Number of warnings

Nested Shape: DeployValidationResult.issues[number]

Validation issue

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

MigrationPlan

Ordered migration plan

Properties

PropertyTypeRequiredDescription
statements{ sql: string; reversible: boolean; rollbackSql?: string; order: integer }[]optional (default: [])Ordered DDL statements
dialectstringTarget SQL dialect
reversiblebooleanoptional (default: true)Whether the plan can be fully rolled back
estimatedDurationMsintegeroptionalEstimated execution time

Nested Shape: MigrationPlan.statements[number]

Single DDL migration statement

PropertyTypeRequiredDescription
sqlstringSQL DDL statement
reversiblebooleanoptional (default: true)Whether the statement can be reversed
rollbackSqlstringoptionalReverse SQL for rollback
orderintegerExecution order

MigrationStatement

Single DDL migration statement

Properties

PropertyTypeRequiredDescription
sqlstringSQL DDL statement
reversiblebooleanoptional (default: true)Whether the statement can be reversed
rollbackSqlstringoptionalReverse SQL for rollback
orderintegerExecution order

SchemaChange

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

On this page