Promote AgentCompany-New to the repository root and retire the old app
The legacy application - its src, tests, landing site, promo assets, docs, release tooling, CI workflows, and root configs - leaves the tree; it stays reachable in history. Everything under AgentCompany-New moves up unchanged: same package name, so the production userData/database path is untouched, and e2e/build scripts already resolved paths relative to the project. The developer cred.txt stays gitignored at its new location. Full verify:ci passes from the new root.
This commit is contained in:
1 parent
2350f744e3
commit
07d0b4587d
1904 files changed
+1133
-282075
No files matched your search
@@ -1,34 +0,0 @@
|
||||
import type { CounterDatabase, PagesHandler } from "../types";
|
||||
import { DOWNLOAD_COUNT_SEED } from "../../lib/downloads";
|
||||
|
||||
interface Env {
|
||||
DOWNLOAD_COUNTER_DB: CounterDatabase;
|
||||
}
|
||||
|
||||
async function readDownloadCount(db: CounterDatabase) {
|
||||
const result = await db
|
||||
.prepare(`
|
||||
SELECT
|
||||
COALESCE(
|
||||
(SELECT value FROM download_counter_settings WHERE key = 'base_downloads'),
|
||||
?
|
||||
) + COUNT(*) AS downloads
|
||||
FROM unique_download_windows
|
||||
`)
|
||||
.bind(DOWNLOAD_COUNT_SEED)
|
||||
.first<{ downloads: number }>();
|
||||
|
||||
return result?.downloads ?? DOWNLOAD_COUNT_SEED;
|
||||
}
|
||||
|
||||
export const onRequestGet: PagesHandler<Env> = async (context) => {
|
||||
const downloads = await readDownloadCount(context.env.DOWNLOAD_COUNTER_DB);
|
||||
return Response.json(
|
||||
{ downloads },
|
||||
{
|
||||
headers: {
|
||||
"Cache-Control": "no-store",
|
||||
},
|
||||
},
|
||||
);
|
||||
};
|
||||
Reference in new issue
Block a user