bake canonical build harness (deterministic /ship for forks) [blog]

This commit is contained in:
vibeasite-bot
2026-08-22 05:55:46 +01:00
parent c5180ffec4
commit 828c7ab8a1
77 changed files with 6574 additions and 170 deletions
+21
View File
@@ -0,0 +1,21 @@
// ---------------------------------------------------------------------------
// AnyDB Client Stub — auto-included in every AUTO_DB React project
// ---------------------------------------------------------------------------
// When AnyDB is connected, this file is replaced by the real client
// generated by anydbService.getClientCode(). Until then, this stub
// returns empty results so components don't crash.
// ---------------------------------------------------------------------------
const STUB_COLLECTION = {
find: async (_filter?: any, _opts?: any) => ({ data: [], total: 0, page: 1, limit: 50, pages: 0 }),
insertOne: async (doc: any) => ({ ...doc, _id: `stub_${Date.now()}` }),
updateOne: async (_filter: any, _update: any) => ({ modifiedCount: 0 }),
deleteOne: async (_filter: any) => ({ deletedCount: 0 }),
aggregate: async (_pipeline: any[]) => [],
};
const anydb = {
collection: async (_name: string) => STUB_COLLECTION,
};
export default anydb;