2023-01-11 13:57:28 +00:00
|
|
|
const PROJECT_URL = 'https://github.com/cloudflare/wildebeest'
|
|
|
|
const ONE_CLICK_BASE_URL = 'https://deploy.workers.cloudflare.com'
|
|
|
|
const FIELDS = [
|
|
|
|
{
|
2023-01-11 18:16:11 +00:00
|
|
|
name: 'Zone ID',
|
2023-01-11 13:57:28 +00:00
|
|
|
secret: 'CF_ZONE_ID',
|
2023-01-11 18:16:11 +00:00
|
|
|
descr: 'Get your Zone ID from the Cloudflare Dashboard',
|
2023-01-11 13:57:28 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Domain',
|
|
|
|
secret: 'CF_DEPLOY_DOMAIN',
|
|
|
|
descr: 'Domain on which your instance will be running',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Instance title',
|
|
|
|
secret: 'INSTANCE_TITLE',
|
|
|
|
descr: 'Title of your instance',
|
|
|
|
},
|
|
|
|
{
|
2023-01-11 18:16:11 +00:00
|
|
|
name: 'Administrator Email',
|
2023-01-11 13:57:28 +00:00
|
|
|
secret: 'ADMIN_EMAIL',
|
2023-01-11 18:16:11 +00:00
|
|
|
descr: 'An Email address that can be messaged regarding inquiries or issues',
|
2023-01-11 13:57:28 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Instance description',
|
|
|
|
secret: 'INSTANCE_DESCR',
|
|
|
|
descr: 'A short, plain-text description of your instance',
|
|
|
|
},
|
|
|
|
]
|
|
|
|
|
|
|
|
const fields = FIELDS.map((x) => JSON.stringify(x))
|
|
|
|
.map((v) => `fields=${v}`)
|
|
|
|
.join('&')
|
|
|
|
const url = new URL(`/?url=${PROJECT_URL}&authed=true&${fields}`, ONE_CLICK_BASE_URL)
|
|
|
|
console.log(url.href)
|