mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-05-05 19:19:35 +00:00
Fix extracted TypeScript files: rename JSX files to .tsx, fix reserved keyword 'delete', add TODO for incorrectly extracted class methods
Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
This commit is contained in:
@@ -5,12 +5,11 @@ import { hasTenant } from './functions/has-tenant'
|
||||
import { getKey } from './functions/get-key'
|
||||
import { set } from './functions/set'
|
||||
import { get } from './functions/get'
|
||||
import { delete } from './functions/delete'
|
||||
import { blobDeleteDuplicate } from './functions/delete'
|
||||
import { listAdd } from './functions/list-add'
|
||||
import { listGet } from './functions/list-get'
|
||||
import { upload } from './functions/upload'
|
||||
import { download } from './functions/download'
|
||||
import { delete } from './functions/delete'
|
||||
import { list } from './functions/list'
|
||||
import { getMetadata } from './functions/get-metadata'
|
||||
import { getInstance } from './functions/get-instance'
|
||||
@@ -63,8 +62,8 @@ export class DbalIntegrationUtils {
|
||||
return await get(...args as any)
|
||||
}
|
||||
|
||||
static async delete(...args: any[]) {
|
||||
return await delete(...args as any)
|
||||
static async blobDeleteDuplicate(...args: any[]) {
|
||||
return await blobDeleteDuplicate(...args as any)
|
||||
}
|
||||
|
||||
static async listAdd(...args: any[]) {
|
||||
@@ -83,10 +82,6 @@ export class DbalIntegrationUtils {
|
||||
return await download(...args as any)
|
||||
}
|
||||
|
||||
static async delete(...args: any[]) {
|
||||
return await delete(...args as any)
|
||||
}
|
||||
|
||||
static async list(...args: any[]) {
|
||||
return await list(...args as any)
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { DBALClient, type DBALConfig } from '@/dbal'
|
||||
|
||||
export async function delete(key: string): Promise<void> {
|
||||
export async function blobDeleteDuplicate(key: string): Promise<void> {
|
||||
this.blobs.delete(key)
|
||||
}
|
||||
|
||||
+6
-5
@@ -1,8 +1,9 @@
|
||||
import { DBALClient, type DBALConfig } from '@/dbal'
|
||||
|
||||
export static getInstance(): DBALIntegration {
|
||||
if (!DBALIntegration.instance) {
|
||||
DBALIntegration.instance = new DBALIntegration()
|
||||
}
|
||||
return DBALIntegration.instance
|
||||
// Note: This was extracted from a class static method
|
||||
// The original `this` context is lost, so this function may not work correctly
|
||||
export function getInstance(): any {
|
||||
// Original code referenced DBALIntegration.instance which may not exist here
|
||||
// TODO: Review and fix this extraction
|
||||
throw new Error('getInstance was incorrectly extracted - needs manual review')
|
||||
}
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import { DBALClient, type DBALConfig } from '@/dbal'
|
||||
|
||||
export async kvGet<T = any>(key: string, tenantId = 'default', userId = 'system'): Promise<T | null> {
|
||||
if (!this.kvStore || !this.tenantManager) throw new Error('DBAL not initialized')
|
||||
const context = await this.tenantManager.getTenantContext(tenantId, userId)
|
||||
if (!context) throw new Error(`Tenant not found: ${tenantId}`)
|
||||
return this.kvStore.get(key, context) as T | null
|
||||
// Note: This was extracted from a class method
|
||||
// The original `this` context is lost, so this function may not work correctly
|
||||
export async function kvGet<T = any>(key: string, tenantId = 'default', userId = 'system'): Promise<T | null> {
|
||||
// Original code referenced this.kvStore and this.tenantManager which don't exist here
|
||||
// TODO: Review and fix this extraction
|
||||
throw new Error('kvGet was incorrectly extracted - needs manual review')
|
||||
}
|
||||
|
||||
@@ -6,12 +6,11 @@ export { hasTenant } from './functions/has-tenant'
|
||||
export { getKey } from './functions/get-key'
|
||||
export { set } from './functions/set'
|
||||
export { get } from './functions/get'
|
||||
export { delete } from './functions/delete'
|
||||
export { blobDeleteDuplicate } from './functions/delete'
|
||||
export { listAdd } from './functions/list-add'
|
||||
export { listGet } from './functions/list-get'
|
||||
export { upload } from './functions/upload'
|
||||
export { download } from './functions/download'
|
||||
export { delete } from './functions/delete'
|
||||
export { list } from './functions/list'
|
||||
export { getMetadata } from './functions/get-metadata'
|
||||
export { getInstance } from './functions/get-instance'
|
||||
|
||||
Reference in New Issue
Block a user