kopia lustrzana https://github.com/transitive-bullshit/chatgpt-api
fix: small ci fixes
rodzic
c32f94c05d
commit
7e05c66a74
|
@ -157,14 +157,17 @@ export async function upsertConsumer(
|
|||
.where(eq(schema.consumers.id, consumer.id))
|
||||
.returning()
|
||||
} else {
|
||||
;[consumer] = await db.insert(schema.consumers).values({
|
||||
plan,
|
||||
userId,
|
||||
projectId,
|
||||
deploymentId,
|
||||
token: await createConsumerToken(),
|
||||
_stripeCustomerId: stripeCustomer.id
|
||||
})
|
||||
;[consumer] = await db
|
||||
.insert(schema.consumers)
|
||||
.values({
|
||||
plan,
|
||||
userId,
|
||||
projectId,
|
||||
deploymentId,
|
||||
token: await createConsumerToken(),
|
||||
_stripeCustomerId: stripeCustomer.id
|
||||
})
|
||||
.returning()
|
||||
}
|
||||
|
||||
assert(consumer, 500, 'Error creating consumer')
|
||||
|
|
|
@ -35,9 +35,9 @@ export function initExitHooks({
|
|||
asyncExitHook(
|
||||
async function shutdownDbExitHook() {
|
||||
try {
|
||||
await db.$client.end({
|
||||
timeout: timeoutMs
|
||||
})
|
||||
if ('end' in db.$client) {
|
||||
await db.$client.end({ timeout: timeoutMs })
|
||||
}
|
||||
} catch {
|
||||
// TODO
|
||||
}
|
||||
|
|
|
@ -36,55 +36,12 @@
|
|||
"observability": {
|
||||
"enabled": true
|
||||
},
|
||||
|
||||
/**
|
||||
* Smart Placement
|
||||
* Docs: https://developers.cloudflare.com/workers/configuration/smart-placement/#smart-placement
|
||||
*/
|
||||
"placement": { "mode": "smart" },
|
||||
|
||||
"upload_source_maps": true,
|
||||
|
||||
"analytics_engine_datasets": [
|
||||
{
|
||||
"binding": "AE_USAGE_DATASET",
|
||||
"dataset": "agentic_api_gateway_usage"
|
||||
}
|
||||
],
|
||||
|
||||
/**
|
||||
* Environment Variables
|
||||
* https://developers.cloudflare.com/workers/wrangler/configuration/#environment-variables
|
||||
*/
|
||||
"env": {
|
||||
"dev": {
|
||||
"vars": {
|
||||
"ENVIRONMENT": "development",
|
||||
"AGENTIC_API_BASE_URL": "http://localhost:3001"
|
||||
}
|
||||
},
|
||||
"prod": {
|
||||
"vars": {
|
||||
"ENVIRONMENT": "production",
|
||||
"AGENTIC_API_BASE_URL": "https://api.agentic.so"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Note: Use secrets to store sensitive data.
|
||||
* https://developers.cloudflare.com/workers/configuration/secrets/
|
||||
*/
|
||||
|
||||
/**
|
||||
* Static Assets
|
||||
* https://developers.cloudflare.com/workers/static-assets/binding/
|
||||
*/
|
||||
// "assets": { "directory": "./public/", "binding": "ASSETS" },
|
||||
|
||||
/**
|
||||
* Service Bindings (communicate between multiple Workers)
|
||||
* https://developers.cloudflare.com/workers/wrangler/configuration/#service-bindings
|
||||
*/
|
||||
// "services": [{ "binding": "MY_SERVICE", "service": "my-service" }]
|
||||
]
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ export function registerDeployCommand({
|
|||
// publish it.
|
||||
const deployment = await oraPromise(
|
||||
client.createDeployment(config, {
|
||||
publish: !!opts.publish
|
||||
publish: opts.publish ? 'true' : 'false'
|
||||
}),
|
||||
{
|
||||
text: `Creating deployment for project "${config.name}"`,
|
||||
|
|
Ładowanie…
Reference in New Issue