Packages
Packages enable version control and dependency management at the project level by creating immutable snapshots of all components and their bound assets at a specific point in time. Each package uses semantic versioning and can be referenced by other projects.Key Concepts
| Concept | Description |
|---|---|
| Immutable Snapshots | Packages cannot be modified after creation |
| Semantic Versioning | Uses MAJOR.MINOR.PATCH format (e.g., 1.0.0) |
| Auto-Publishing | Creating a package publishes all draft/modified components |
| Asset Bundling | All component-bound assets are included |
| Dependency Resolution | Project dependencies are snapshotted |
What Happens When You Create a Package
- Draft components (never published) →
publishedstatus with version 1 - Modified components →
publishedstatus with incremented version - Published components (unchanged) → included at current version
- Collection structure is flattened (not preserved in packages)
- All bound assets are captured and included
Package Object
Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier (UUID) |
projectId | string | Source project ID |
version | string | Semantic version (e.g., 1.0.0) |
components | object[] | Array of component snapshots |
components[].id | string | Component ID |
components[].name | string | Component name |
components[].type | string | view or layout |
components[].version | number | Component version at time of capture |
assets | object[] | Array of bundled assets |
assets[].id | string | Asset ID |
assets[].name | string | Asset friendly name |
assets[].url | string | CDN URL |
assets[].componentId | string | Owning component ID |
dependencies | object[] | Snapshotted project dependencies |
compiled | object | Runtime-ready content |
compiled.components | object | Map of component names to compiled code |
compiled.assets | object | Map of component names to asset arrays |
metadata | object | Package metadata |
metadata.author | string | Creator |
metadata.description | string | Package description |
metadata.tags | string[] | Categories |
createdAt | string | Creation timestamp |
updatedAt | string | Last update timestamp |
Example Package
Package Creation Process
Version Assignment
| Previous Status | New Status | Version Change |
|---|---|---|
draft (never published) | published | null → 1 |
modified | published | n → n+1 |
published (unchanged) | published | No change |
