Add Nix flake for Zod-PocketBase dev environment and remove doc and

playground
This commit is contained in:
2025-10-05 14:51:00 +02:00
parent 41f083d69e
commit c15e42b967
69 changed files with 1190 additions and 16604 deletions

10
src/utils.ts Normal file
View File

@@ -0,0 +1,10 @@
import { sortBy } from "es-toolkit";
import type { CollectionModel } from "pocketbase";
import { getPocketbase } from "./sdk.js";
import type { Credentials } from "./config.ts";
export async function fetchCollections(credentials: Credentials): Promise<CollectionModel[]> {
const pocketbase = await getPocketbase(credentials);
const collections = await pocketbase.collections.getFullList();
return sortBy(collections, ["name"]);
}