diff --git a/frontends/nextjs/src/components/misc/demos/IRCWebchat/functions/i-r-c-webchat.ts b/frontends/nextjs/src/components/misc/demos/IRCWebchat/functions/i-r-c-webchat.tsx similarity index 100% rename from frontends/nextjs/src/components/misc/demos/IRCWebchat/functions/i-r-c-webchat.ts rename to frontends/nextjs/src/components/misc/demos/IRCWebchat/functions/i-r-c-webchat.tsx diff --git a/frontends/nextjs/src/components/misc/demos/IRCWebchatDeclarative/functions/i-r-c-webchat-declarative.ts b/frontends/nextjs/src/components/misc/demos/IRCWebchatDeclarative/functions/i-r-c-webchat-declarative.tsx similarity index 100% rename from frontends/nextjs/src/components/misc/demos/IRCWebchatDeclarative/functions/i-r-c-webchat-declarative.ts rename to frontends/nextjs/src/components/misc/demos/IRCWebchatDeclarative/functions/i-r-c-webchat-declarative.tsx diff --git a/frontends/nextjs/src/components/misc/demos/dbal/dbal-demo.utils.ts b/frontends/nextjs/src/components/misc/demos/dbal/dbal-demo.utils.tsx similarity index 100% rename from frontends/nextjs/src/components/misc/demos/dbal/dbal-demo.utils.ts rename to frontends/nextjs/src/components/misc/demos/dbal/dbal-demo.utils.tsx diff --git a/frontends/nextjs/src/components/schema/level4/Tabs/functions/field-card.ts b/frontends/nextjs/src/components/schema/level4/Tabs/functions/field-card.tsx similarity index 100% rename from frontends/nextjs/src/components/schema/level4/Tabs/functions/field-card.ts rename to frontends/nextjs/src/components/schema/level4/Tabs/functions/field-card.tsx diff --git a/frontends/nextjs/src/components/schema/level4/Tabs/functions/schema-tabs.ts b/frontends/nextjs/src/components/schema/level4/Tabs/functions/schema-tabs.tsx similarity index 100% rename from frontends/nextjs/src/components/schema/level4/Tabs/functions/schema-tabs.ts rename to frontends/nextjs/src/components/schema/level4/Tabs/functions/schema-tabs.tsx diff --git a/frontends/nextjs/src/components/schema/level4/Tabs/functions/text-field.ts b/frontends/nextjs/src/components/schema/level4/Tabs/functions/text-field.tsx similarity index 100% rename from frontends/nextjs/src/components/schema/level4/Tabs/functions/text-field.ts rename to frontends/nextjs/src/components/schema/level4/Tabs/functions/text-field.tsx diff --git a/frontends/nextjs/src/components/workflow/editor/constants.ts b/frontends/nextjs/src/components/workflow/editor/constants.tsx similarity index 100% rename from frontends/nextjs/src/components/workflow/editor/constants.ts rename to frontends/nextjs/src/components/workflow/editor/constants.tsx diff --git a/frontends/nextjs/src/lib/dbal/core/client/dbal-integration/DbalIntegrationUtils.ts b/frontends/nextjs/src/lib/dbal/core/client/dbal-integration/DbalIntegrationUtils.ts index 8b13209e7..74ed6abaa 100644 --- a/frontends/nextjs/src/lib/dbal/core/client/dbal-integration/DbalIntegrationUtils.ts +++ b/frontends/nextjs/src/lib/dbal/core/client/dbal-integration/DbalIntegrationUtils.ts @@ -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) } diff --git a/frontends/nextjs/src/lib/dbal/core/client/dbal-integration/functions/delete.ts b/frontends/nextjs/src/lib/dbal/core/client/dbal-integration/functions/delete.ts index 22dd3784a..4dda88f64 100644 --- a/frontends/nextjs/src/lib/dbal/core/client/dbal-integration/functions/delete.ts +++ b/frontends/nextjs/src/lib/dbal/core/client/dbal-integration/functions/delete.ts @@ -1,5 +1,5 @@ import { DBALClient, type DBALConfig } from '@/dbal' -export async function delete(key: string): Promise { +export async function blobDeleteDuplicate(key: string): Promise { this.blobs.delete(key) } diff --git a/frontends/nextjs/src/lib/dbal/core/client/dbal-integration/functions/get-instance.ts b/frontends/nextjs/src/lib/dbal/core/client/dbal-integration/functions/get-instance.ts index b2083a387..08c07ec4a 100644 --- a/frontends/nextjs/src/lib/dbal/core/client/dbal-integration/functions/get-instance.ts +++ b/frontends/nextjs/src/lib/dbal/core/client/dbal-integration/functions/get-instance.ts @@ -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') } diff --git a/frontends/nextjs/src/lib/dbal/core/client/dbal-integration/functions/kv-get.ts b/frontends/nextjs/src/lib/dbal/core/client/dbal-integration/functions/kv-get.ts index e15adb579..03bad8a7a 100644 --- a/frontends/nextjs/src/lib/dbal/core/client/dbal-integration/functions/kv-get.ts +++ b/frontends/nextjs/src/lib/dbal/core/client/dbal-integration/functions/kv-get.ts @@ -1,8 +1,9 @@ import { DBALClient, type DBALConfig } from '@/dbal' -export async kvGet(key: string, tenantId = 'default', userId = 'system'): Promise { - 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(key: string, tenantId = 'default', userId = 'system'): Promise { + // 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') } diff --git a/frontends/nextjs/src/lib/dbal/core/client/dbal-integration/index.ts b/frontends/nextjs/src/lib/dbal/core/client/dbal-integration/index.ts index a1acde007..eb04e9f8b 100644 --- a/frontends/nextjs/src/lib/dbal/core/client/dbal-integration/index.ts +++ b/frontends/nextjs/src/lib/dbal/core/client/dbal-integration/index.ts @@ -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'