@@ -8,14 +8,12 @@ const DISCORD_SUPPORT_BOT_TOKEN = new sst.Secret("DISCORD_SUPPORT_BOT_TOKEN")
88const DISCORD_SUPPORT_CHANNEL_ID = new sst . Secret ( "DISCORD_SUPPORT_CHANNEL_ID" )
99const FEISHU_APP_ID = new sst . Secret ( "FEISHU_APP_ID" )
1010const FEISHU_APP_SECRET = new sst . Secret ( "FEISHU_APP_SECRET" )
11- const bucket = new sst . cloudflare . Bucket ( "Bucket" )
1211
1312export const api = new sst . cloudflare . Worker ( "Api" , {
1413 domain : `api.${ domain } ` ,
1514 handler : "packages/function/src/api.ts" ,
1615 url : true ,
1716 link : [
18- bucket ,
1917 GITHUB_APP_ID ,
2018 GITHUB_APP_PRIVATE_KEY ,
2119 ADMIN_SECRET ,
@@ -28,19 +26,11 @@ export const api = new sst.cloudflare.Worker("Api", {
2826 worker : ( args ) => {
2927 args . logpush = true
3028 if ( $app . stage === "vimtor" || $app . stage === "adam" ) return
31- args . bindings = $resolve ( args . bindings ) . apply ( ( bindings ) => [
32- ...bindings ,
33- {
34- name : "SYNC_SERVER" ,
35- type : "durable_object_namespace" ,
36- className : "SyncServer" ,
37- } ,
38- ] )
29+ // Deleting the class erases every SyncServer Durable Object and its stored share data.
3930 args . migrations = {
40- // Note: when releasing the next tag, make sure all stages use tag v2
41- oldTag : $app . stage === "production" || $app . stage === "thdxr" ? "" : "v1" ,
42- newTag : $app . stage === "production" || $app . stage === "thdxr" ? "" : "v1" ,
43- //newSqliteClasses: ["SyncServer"],
31+ oldTag : $app . stage === "production" || $app . stage === "thdxr" ? undefined : "v1" ,
32+ newTag : "v2" ,
33+ deletedClasses : [ "SyncServer" ] ,
4434 }
4535 } ,
4636 } ,
0 commit comments