sync
This commit is contained in:
@@ -272,13 +272,16 @@ new sst.cloudflare.x.SolidStart("Console", {
|
|||||||
new sst.Secret("CLOUDFLARE_API_TOKEN", process.env.CLOUDFLARE_API_TOKEN!),
|
new sst.Secret("CLOUDFLARE_API_TOKEN", process.env.CLOUDFLARE_API_TOKEN!),
|
||||||
]
|
]
|
||||||
: []),
|
: []),
|
||||||
|
// TODO
|
||||||
|
new sst.Secret("FOO"),
|
||||||
],
|
],
|
||||||
environment: {
|
environment: {
|
||||||
//VITE_DOCS_URL: web.url.apply((url) => url!),
|
//VITE_DOCS_URL: web.url.apply((url) => url!),
|
||||||
//VITE_API_URL: gateway.url.apply((url) => url!),
|
//VITE_API_URL: gateway.url.apply((url) => url!),
|
||||||
VITE_AUTH_URL: auth.url.apply((url) => url!),
|
VITE_AUTH_URL: auth.url.apply((url) => url!),
|
||||||
VITE_STRIPE_PUBLISHABLE_KEY: STRIPE_PUBLISHABLE_KEY.value,
|
VITE_STRIPE_PUBLISHABLE_KEY: STRIPE_PUBLISHABLE_KEY.value,
|
||||||
PLACEHOLDER: "keepalive",
|
// TODO
|
||||||
|
KEEPALIVE: "keepalive2",
|
||||||
},
|
},
|
||||||
transform: {
|
transform: {
|
||||||
server: {
|
server: {
|
||||||
|
|||||||
@@ -1,15 +1,23 @@
|
|||||||
|
// @ts-nocheck
|
||||||
|
import { env } from "cloudflare:workers"
|
||||||
import { createHash } from "crypto"
|
import { createHash } from "crypto"
|
||||||
import { ZenData } from "@opencode-ai/console-core/model.js"
|
import { ZenData } from "@opencode-ai/console-core/model.js"
|
||||||
|
|
||||||
export async function GET() {
|
export async function GET() {
|
||||||
const zenData = ZenData.list("full")
|
const zenData = ZenData.list("full")
|
||||||
return new Response(
|
return new Response(
|
||||||
JSON.stringify({
|
JSON.stringify(
|
||||||
hash: createHash("sha1").update(JSON.stringify(zenData)).digest("hex"),
|
{
|
||||||
timestamp: Date.now(),
|
hash: createHash("sha1").update(JSON.stringify(zenData)).digest("hex"),
|
||||||
check1: "alpha-di-k2.6" in zenData.models,
|
timestamp: Date.now(),
|
||||||
check2: "qwen3.6-plus-free" in zenData.models,
|
FOO: env.FOO,
|
||||||
}),
|
SST_RESOURCE_FOO: env.SST_RESOURCE_FOO,
|
||||||
|
check1: "alpha-di-k2.6" in zenData.models,
|
||||||
|
check2: "qwen3.6-plus-free" in zenData.models,
|
||||||
|
},
|
||||||
|
null,
|
||||||
|
2,
|
||||||
|
),
|
||||||
{
|
{
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
|
|||||||
@@ -5,12 +5,9 @@ export const Resource = new Proxy(
|
|||||||
{},
|
{},
|
||||||
{
|
{
|
||||||
get(_target, prop: string) {
|
get(_target, prop: string) {
|
||||||
console.log(`111 ${prop}`)
|
|
||||||
if (`SST_RESOURCE_${prop}` in env) {
|
if (`SST_RESOURCE_${prop}` in env) {
|
||||||
console.log(`222 ${prop}`)
|
|
||||||
// @ts-expect-error
|
// @ts-expect-error
|
||||||
const value = env[`SST_RESOURCE_${prop}`]
|
const value = env[`SST_RESOURCE_${prop}`]
|
||||||
console.log(`333 ${value}`)
|
|
||||||
return typeof value === "string" ? JSON.parse(value) : value
|
return typeof value === "string" ? JSON.parse(value) : value
|
||||||
} else if (prop === "App") {
|
} else if (prop === "App") {
|
||||||
// @ts-expect-error
|
// @ts-expect-error
|
||||||
|
|||||||
4
sst-env.d.ts
vendored
4
sst-env.d.ts
vendored
@@ -71,6 +71,10 @@ declare module "sst" {
|
|||||||
"type": "sst.sst.Secret"
|
"type": "sst.sst.Secret"
|
||||||
"value": string
|
"value": string
|
||||||
}
|
}
|
||||||
|
"FOO": {
|
||||||
|
"type": "sst.sst.Secret"
|
||||||
|
"value": string
|
||||||
|
}
|
||||||
"GITHUB_APP_ID": {
|
"GITHUB_APP_ID": {
|
||||||
"type": "sst.sst.Secret"
|
"type": "sst.sst.Secret"
|
||||||
"value": string
|
"value": string
|
||||||
|
|||||||
Reference in New Issue
Block a user