This commit is contained in:
2026-01-16 16:03:47 +00:00
parent d4e5e104a0
commit e394c1b630
3 changed files with 14 additions and 3 deletions

View File

@@ -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

View File

@@ -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' }])
}

View File

@@ -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')
}