Skip to main content
GET
Get Draft Package
The draft package endpoint returns a preview of what components and dependencies would be included if you created a new package right now. This is useful for understanding the current state before committing to a new version.

Path Parameters

string
required
Organization ID
string
required
Project ID

Query Parameters

boolean
default:"false"
Set to true to include resolved dependencies in the response

Response

Returns the draft package in the same format as the resolved package endpoint.
string
Always “draft” for the draft package
string
Always “draft” for the draft package
object
Map of component names to compiled JavaScript code
object
Always empty for draft packages
object
Map of dependency identifiers to their resolved content (only present if includeDependencies=true)

Example Response

The draft endpoint is read-only. It does not create or modify any data. It returns the same format as the resolved package endpoint, making it easy to switch between draft and published packages in client code.

Use Cases

Preview Components Before Publishing

Get the draft package to test components before creating a formal package:

Code Examples