feat(s3): add S3 create file/folder dialogs and in-place text editor; export mongodb plugin

This commit is contained in:
2026-01-25 12:56:56 +00:00
parent 07010376cb
commit 349b43612e
12 changed files with 860 additions and 20 deletions

View File

@@ -21,15 +21,9 @@ export async function registerMongoHandlers(
// Helper to create ObjectId filter
const createIdFilter = (documentId: string) => {
// Try to treat as ObjectId string - MongoDB driver will handle conversion
try {
// Import ObjectId from the mongodb package that smartdata uses
const { ObjectId } = require('mongodb');
if (ObjectId.isValid(documentId)) {
return { _id: new ObjectId(documentId) };
}
} catch {
// Fall through to string filter
const { ObjectId } = plugins.mongodb;
if (ObjectId.isValid(documentId)) {
return { _id: new ObjectId(documentId) };
}
return { _id: documentId };
};