mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-06 00:12:11 +00:00
chore: generate
This commit is contained in:
parent
3d6f90cb53
commit
ac2fa668cf
4 changed files with 18 additions and 18 deletions
|
|
@ -25,8 +25,8 @@ export namespace Key {
|
||||||
.where(
|
.where(
|
||||||
and(
|
and(
|
||||||
eq(KeyTable.workspaceID, Actor.workspace()),
|
eq(KeyTable.workspaceID, Actor.workspace()),
|
||||||
isNull(KeyTable.timeDeleted),
|
isNull(KeyTable.timeDeleted),
|
||||||
...(Actor.userRole() === "admin" ? [] : [eq(KeyTable.userID, Actor.userID())]),
|
...(Actor.userRole() === "admin" ? [] : [eq(KeyTable.userID, Actor.userID())]),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
.orderBy(sql`${KeyTable.name} DESC`),
|
.orderBy(sql`${KeyTable.name} DESC`),
|
||||||
|
|
@ -83,8 +83,8 @@ export namespace Key {
|
||||||
.where(
|
.where(
|
||||||
and(
|
and(
|
||||||
eq(KeyTable.id, input.id),
|
eq(KeyTable.id, input.id),
|
||||||
eq(KeyTable.workspaceID, Actor.workspace()),
|
eq(KeyTable.workspaceID, Actor.workspace()),
|
||||||
...(Actor.userRole() === "admin" ? [] : [eq(KeyTable.userID, Actor.userID())]),
|
...(Actor.userRole() === "admin" ? [] : [eq(KeyTable.userID, Actor.userID())]),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -211,7 +211,7 @@ for (const item of targets) {
|
||||||
execArgv: [`--user-agent=opencode/${Script.version}`, "--use-system-ca", "--"],
|
execArgv: [`--user-agent=opencode/${Script.version}`, "--use-system-ca", "--"],
|
||||||
windows: {},
|
windows: {},
|
||||||
},
|
},
|
||||||
files: (embeddedFileMap ? { "opencode-web-ui.gen.ts": embeddedFileMap } : {}),
|
files: embeddedFileMap ? { "opencode-web-ui.gen.ts": embeddedFileMap } : {},
|
||||||
entrypoints: [
|
entrypoints: [
|
||||||
"./src/index.ts",
|
"./src/index.ts",
|
||||||
parserWorker,
|
parserWorker,
|
||||||
|
|
|
||||||
|
|
@ -41,9 +41,9 @@ async function handlePluginAuth(plugin: { auth: PluginAuth }, provider: string,
|
||||||
const method = await prompts.select({
|
const method = await prompts.select({
|
||||||
message: "Login method",
|
message: "Login method",
|
||||||
options: plugin.auth.methods.map((x, index) => ({
|
options: plugin.auth.methods.map((x, index) => ({
|
||||||
label: x.label,
|
label: x.label,
|
||||||
value: index.toString(),
|
value: index.toString(),
|
||||||
})),
|
})),
|
||||||
})
|
})
|
||||||
if (prompts.isCancel(method)) throw new UI.CancelledError()
|
if (prompts.isCancel(method)) throw new UI.CancelledError()
|
||||||
index = parseInt(method)
|
index = parseInt(method)
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,16 @@
|
||||||
import type { Hooks, PluginInput } from "@opencode-ai/plugin"
|
import type { Hooks, PluginInput } from "@opencode-ai/plugin"
|
||||||
|
|
||||||
export async function CloudflareWorkersAuthPlugin(_input: PluginInput): Promise<Hooks> {
|
export async function CloudflareWorkersAuthPlugin(_input: PluginInput): Promise<Hooks> {
|
||||||
const prompts = (!process.env.CLOUDFLARE_ACCOUNT_ID
|
const prompts = !process.env.CLOUDFLARE_ACCOUNT_ID
|
||||||
? [
|
? [
|
||||||
{
|
{
|
||||||
type: "text" as const,
|
type: "text" as const,
|
||||||
key: "accountId",
|
key: "accountId",
|
||||||
message: "Enter your Cloudflare Account ID",
|
message: "Enter your Cloudflare Account ID",
|
||||||
placeholder: "e.g. 1234567890abcdef1234567890abcdef",
|
placeholder: "e.g. 1234567890abcdef1234567890abcdef",
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
: [])
|
: []
|
||||||
|
|
||||||
return {
|
return {
|
||||||
auth: {
|
auth: {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue