diff --git a/.claude/settings.local.json b/.claude/settings.local.json index eb4393f93..2e9ece835 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -80,7 +80,8 @@ "Bash(if [ -f \"$file\" ])", "Bash(if ! head -1 \"$file\")", "Bash(for file in fakemui/fakemui/utils/useMediaQuery.js)", - "Bash(perl -pi -e:*)" + "Bash(perl -pi -e:*)", + "Bash(pkill:*)" ] }, "spinnerTipsEnabled": false diff --git a/dbal/development/src/core/entities/operations/system/package/index.ts b/dbal/development/src/core/entities/operations/system/package/index.ts index 9f63ccb99..afcf0d9e0 100644 --- a/dbal/development/src/core/entities/operations/system/package/index.ts +++ b/dbal/development/src/core/entities/operations/system/package/index.ts @@ -135,7 +135,12 @@ export const createInstalledPackageOperations = (adapter: DBALAdapter, tenantId? return deleteInstalledPackage(adapter, id) }, list: options => { + // For public packages, allow listing packages with tenantId: null const tenantFilter = resolveTenantFilter(tenantId, options?.filter) + if (!tenantFilter && !tenantId) { + // No configured tenant and no filter provided - allow listing public packages (tenantId: null) + return listInstalledPackages(adapter, { ...options, filter: { ...(options?.filter ?? {}), tenantId: null } }) + } if (!tenantFilter) { throw DBALError.validationError('Tenant ID is required', [{ field: 'tenantId', error: 'tenantId is required' }]) } diff --git a/frontends/nextjs/src/lib/packages/unified/get-packages-dir.ts b/frontends/nextjs/src/lib/packages/unified/get-packages-dir.ts index a1394ad5e..a5719b7e1 100644 --- a/frontends/nextjs/src/lib/packages/unified/get-packages-dir.ts +++ b/frontends/nextjs/src/lib/packages/unified/get-packages-dir.ts @@ -1,5 +1,10 @@ -import { join } from 'path' +import { join, resolve } from 'path' export function getPackagesDir(): string { - return join(process.cwd(), 'packages') + let cwd = process.cwd() + // If running from Next.js context, go up two levels to project root + if (cwd.endsWith('frontends/nextjs') || cwd.endsWith('frontends\\nextjs')) { + cwd = resolve(cwd, '../..') + } + return join(cwd, 'packages') }