UNPKG

mongoku

Version:

[![CI](https://github.com/huggingface/Mongoku/actions/workflows/ci.yml/badge.svg)](https://github.com/huggingface/Mongoku/actions/workflows/ci.yml)

43 lines (38 loc) 2.1 kB
import { g as getMongo, a as getCollectionJson } from './mongo-B92d7zNj.js'; import './shared-server-BmU87nph.js'; import './logger-PfH_grbh.js'; import 'async_hooks'; import 'node:util'; import 'dns/promises'; import 'mongodb'; import 'url'; import 'node:fs'; import 'node:os'; import 'node:path'; const load = async ({ params }) => { const mongo = await getMongo(); const client = mongo.getClient(params.server); const db = client.db(params.database); const collections = (await db.listCollections().toArray()).sort((a, b) => a.name.localeCompare(b.name)); const collectionsWithDetails = collections.map((c) => ({ name: c.name, type: c.type, details: getCollectionJson(db.collection(c.name), c.type).catch(() => null) })); return { collections: collectionsWithDetails }; }; var _page_server_ts = /*#__PURE__*/Object.freeze({ __proto__: null, load: load }); const index = 10; let component_cache; const component = async () => component_cache ??= (await import('./_page.svelte-BeiSosXN.js')).default; const server_id = "src/routes/servers/[server]/databases/[database]/collections/+page.server.ts"; const imports = ["_app/immutable/nodes/10.eB7zuikE.js","_app/immutable/chunks/DaMh_eeB.js","_app/immutable/chunks/IwGwbOe7.js","_app/immutable/chunks/BDGd1aqF.js","_app/immutable/chunks/DFXj4NOH.js","_app/immutable/chunks/951V-MIZ.js","_app/immutable/chunks/CCOVnadf.js","_app/immutable/chunks/DqxUmOYD.js","_app/immutable/chunks/CmI1igJD.js","_app/immutable/chunks/Dzt_TFtX.js","_app/immutable/chunks/C6P2UOyZ.js","_app/immutable/chunks/YMZQSnF3.js","_app/immutable/chunks/v8XDA7ui.js","_app/immutable/chunks/BUO1EOQu.js","_app/immutable/chunks/CkMoyTwc.js","_app/immutable/chunks/Z7BFksgg.js","_app/immutable/chunks/9xpgPu5N.js","_app/immutable/chunks/8tf5Lvl3.js","_app/immutable/chunks/CKvueigk.js","_app/immutable/chunks/BN_N9-2s.js"]; const stylesheets = ["_app/immutable/assets/Modal.CZgFKXkP.css"]; const fonts = []; export { component, fonts, imports, index, _page_server_ts as server, server_id, stylesheets }; //# sourceMappingURL=10-Censc2uj.js.map