dario-publish
v1.0.8
Published
A package for publishing functionality in the Dario Tools monorepo.
Readme
dario-publish
A package for publishing functionality in the Dario Tools monorepo.
Setup
Cloudflare API Token
To use this package, you need a Cloudflare API token with permissions to manage Cloudflare Pages.
Required Permissions:
- Account → Cloudflare Pages → Edit (or Write)
This permission allows the token to:
- Read existing Pages projects
- Create new Pages projects
- Create deployments
- Check deployment status
- Upload files to deployments
Steps to create the token:
- Go to Cloudflare API Tokens
- Click "Create Token"
- Choose one of these options:
- Option A (Recommended): Use the "Edit Cloudflare Workers" template (includes Pages permissions)
- Option B: Create a Custom Token with:
- Account → Cloudflare Pages → Edit
- Set Account Resources to your account
- Click "Continue to summary" → "Create Token"
- Copy the token immediately (it's only shown once)
Cloudflare Account ID
Your Account ID can be found:
- In the Cloudflare dashboard URL:
https://dash.cloudflare.com/{account_id}/... - Or go to Cloudflare Dashboard → select your account → the ID is in the sidebar
Environment Variables
Set these environment variables:
CLOUDFLARE_TOKEN- Your Cloudflare API tokenCLOUDFLARE_ACCOUNT_ID- Your Cloudflare account IDPUBLISH_API_KEY- API key for the publish endpointPLATFORM_API_URL- (Optional) Platform API URL (defaults tohttp://localhost:3000/api)
Development
# Build the package
pnpm build
# Watch mode
pnpm dev
# Type check
pnpm typecheck