MCPcopy Index your code
hub / github.com/anomalyco/opencode / migrate

Function migrate

packages/desktop/src/main/migrate.ts:69–91  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

67}
68
69export function migrate() {
70 if (getStore().get(TAURI_MIGRATED_KEY)) {
71 log.log("tauri migration: already done, skipping")
72 return
73 }
74
75 const dir = tauriDir(tauriAppId())
76 log.log("tauri migration: starting", { dir })
77
78 if (!existsSync(dir)) {
79 log.log("tauri migration: no tauri data directory found, nothing to migrate")
80 getStore().set(TAURI_MIGRATED_KEY, true)
81 return
82 }
83
84 for (const filename of readdirSync(dir)) {
85 if (!filename.endsWith(".dat")) continue
86 migrateFile(join(dir, filename), filename)
87 }
88
89 log.log("tauri migration: complete")
90 getStore().set(TAURI_MIGRATED_KEY, true)
91}

Callers 1

index.tsFile · 0.90

Calls 8

getStoreFunction · 0.90
tauriDirFunction · 0.85
tauriAppIdFunction · 0.85
migrateFileFunction · 0.85
joinFunction · 0.85
getMethod · 0.65
logMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected