feat(s3): add S3 create file/folder dialogs and in-place text editor; export mongodb plugin
This commit is contained in:
@@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@git.zone/tsview',
|
||||
version: '1.2.0',
|
||||
version: '1.3.0',
|
||||
description: 'A CLI tool for viewing S3 and MongoDB data with a web UI'
|
||||
}
|
||||
|
||||
@@ -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 };
|
||||
};
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -37,6 +37,10 @@ export {
|
||||
import * as s3 from '@aws-sdk/client-s3';
|
||||
export { s3 };
|
||||
|
||||
// MongoDB driver for ObjectId handling
|
||||
import * as mongodb from 'mongodb';
|
||||
export { mongodb };
|
||||
|
||||
// @api.global scope
|
||||
import * as typedrequest from '@api.global/typedrequest';
|
||||
import * as typedrequestInterfaces from '@api.global/typedrequest-interfaces';
|
||||
|
||||
Reference in New Issue
Block a user