diff options
| author | Dax Raad <[email protected]> | 2025-11-08 20:21:02 -0500 |
|---|---|---|
| committer | Dax Raad <[email protected]> | 2025-11-08 20:21:02 -0500 |
| commit | 4d20e1c3c6207cf6731ad8db9f92caf4ef31cb99 (patch) | |
| tree | 1c0b14810b8919e0d9dba022384da876717f8e2e /packages/function | |
| parent | 4bb7ea91271e85621a1394c70867ddc26be45631 (diff) | |
| parent | 969af4d54122b727d7251b2977f617424d08e4cb (diff) | |
| download | opencode-4d20e1c3c6207cf6731ad8db9f92caf4ef31cb99.tar.gz opencode-4d20e1c3c6207cf6731ad8db9f92caf4ef31cb99.zip | |
Merge remote-tracking branch 'origin/dev' into dev
Diffstat (limited to 'packages/function')
| -rw-r--r-- | packages/function/package.json | 2 | ||||
| -rw-r--r-- | packages/function/src/api.ts | 6 | ||||
| -rw-r--r-- | packages/function/sst-env.d.ts | 9 |
3 files changed, 11 insertions, 6 deletions
diff --git a/packages/function/package.json b/packages/function/package.json index 9eb02d591..004a5db0a 100644 --- a/packages/function/package.json +++ b/packages/function/package.json @@ -1,6 +1,6 @@ { "name": "@opencode-ai/function", - "version": "1.0.44", + "version": "1.0.46", "$schema": "https://json.schemastore.org/package.json", "private": true, "type": "module", diff --git a/packages/function/src/api.ts b/packages/function/src/api.ts index 3475f5d72..6f00dae9a 100644 --- a/packages/function/src/api.ts +++ b/packages/function/src/api.ts @@ -268,11 +268,7 @@ export default new Hono<{ Bindings: Env }>() // Verify permissions const userClient = new Octokit({ auth: token }) const { data: repoData } = await userClient.repos.get({ owner, repo }) - if ( - !repoData.permissions.admin && - !repoData.permissions.push && - !repoData.permissions.maintain - ) + if (!repoData.permissions.admin && !repoData.permissions.push && !repoData.permissions.maintain) throw new Error("User does not have write permissions") // Get installation token diff --git a/packages/function/sst-env.d.ts b/packages/function/sst-env.d.ts index ba4c5a623..bcd7c2650 100644 --- a/packages/function/sst-env.d.ts +++ b/packages/function/sst-env.d.ts @@ -22,6 +22,14 @@ declare module "sst" { type: "sst.sst.Secret" value: string } + CLOUDFLARE_API_TOKEN: { + type: "sst.sst.Secret" + value: string + } + CLOUDFLARE_DEFAULT_ACCOUNT_ID: { + type: "sst.sst.Secret" + value: string + } Console: { type: "sst.cloudflare.SolidStart" url: string @@ -96,6 +104,7 @@ declare module "sst" { AuthApi: cloudflare.Service AuthStorage: cloudflare.KVNamespace Bucket: cloudflare.R2Bucket + GatewayKv: cloudflare.KVNamespace LogProcessor: cloudflare.Service } } |
