Frank 5 месяцев назад
Родитель
Сommit
ca9b13e8a2

+ 3 - 0
bun.lock

@@ -114,6 +114,9 @@
         "@opencode-ai/console-core": "workspace:*",
         "@opencode-ai/console-resource": "workspace:*",
       },
+      "devDependencies": {
+        "@types/bun": "catalog:",
+      },
     },
     "packages/css": {
       "name": "@opencode-ai/css",

+ 1 - 0
packages/console/core/.gitignore

@@ -0,0 +1 @@
+script/scrap.ts

+ 3 - 0
packages/console/core/package.json

@@ -24,6 +24,9 @@
     "db": "sst shell drizzle-kit",
     "db-dev": "sst shell --stage dev -- drizzle-kit",
     "db-prod": "sst shell --stage production -- drizzle-kit",
+    "shell": "sst shell -- bun",
+    "shell-dev": "sst shell --stage dev -- bun",
+    "shell-prod": "sst shell --stage production -- bun",
     "update-models": "script/update-models.ts",
     "promote-models-to-dev": "script/promote-models.ts dev",
     "promote-models-to-prod": "script/promote-models.ts production",

+ 0 - 0
packages/console/scripts/src/reset.ts → packages/console/core/script/reset-db.ts


+ 0 - 1
packages/console/scripts/.gitignore

@@ -1 +0,0 @@
-src/scrap.ts

+ 0 - 16
packages/console/scripts/package.json

@@ -1,16 +0,0 @@
-{
-  "name": "@opencode-ai/console-scripts",
-  "version": "0.15.6",
-  "$schema": "https://json.schemastore.org/package.json",
-  "private": true,
-  "type": "module",
-  "scripts": {
-    "shell": "sst shell -- bun",
-    "shell-dev": "sst shell --stage dev -- bun",
-    "shell-prod": "sst shell --stage production -- bun"
-  },
-  "dependencies": {
-    "@opencode-ai/console-core": "workspace:*",
-    "@opencode-ai/console-resource": "workspace:*"
-  }
-}

+ 0 - 10
packages/console/scripts/src/backfill-usage-provider.ts

@@ -1,10 +0,0 @@
-import { Database, eq } from "@opencode-ai/console-core/drizzle/index.js"
-import { UsageTable } from "@opencode-ai/console-core/schema/billing.sql.js"
-
-await Database.use(async (tx) => {
-  await tx
-    .update(UsageTable)
-    .set({ model: "grok-code" })
-    .where(eq(UsageTable.model, "x-ai/grok-code-fast-1"))
-    .limit(90000)
-})

+ 0 - 9
packages/console/scripts/sst-env.d.ts

@@ -1,9 +0,0 @@
-/* This file is auto-generated by SST. Do not edit. */
-/* tslint:disable */
-/* eslint-disable */
-/* deno-fmt-ignore-file */
-
-/// <reference path="../../../sst-env.d.ts" />
-
-import "sst"
-export {}

+ 0 - 9
packages/console/scripts/tsconfig.json

@@ -1,9 +0,0 @@
-{
-  "$schema": "https://json.schemastore.org/tsconfig",
-  "extends": "@tsconfig/node22/tsconfig.json",
-  "compilerOptions": {
-    "module": "ESNext",
-    "moduleResolution": "bundler",
-    "types": ["@cloudflare/workers-types", "node"]
-  }
-}