mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-26 23:28:43 +00:00
- services/data/stage.ts: stage(mode) throws on anything but dev or production, used by all three configs, build.ts and deploy.ts - packages/stats -> packages/data (@opencode/data-app, -core, -server) - StatsSyncWorkflow -> DataSyncWorkflow, instance ids data-hourly-/data-history-, Data* resource keys, data sync log lines - worker, route, workflow and cron names unchanged
10 lines
462 B
TypeScript
10 lines
462 B
TypeScript
import { R2Sql } from "@opencode/data-core/r2-sql"
|
|
import { layer } from "@opencode/data-core/runtime"
|
|
import { syncData } from "@opencode/data-core/stat-sync"
|
|
import { Effect, Layer } from "effect"
|
|
|
|
// Runs one sync pass in this process, for local use. Deployed stages run the
|
|
// same steps in the DataSyncWorkflow.
|
|
await Effect.runPromise(
|
|
syncData({ history: process.argv.includes("--history") }).pipe(Effect.provide(Layer.mergeAll(layer, R2Sql.layer))),
|
|
)
|