mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-18 11:40:39 +09:00
fix: update tests for SchemaConfigFields and comingSoon logic
- registry.test: fallback now uses SchemaConfigFields, not ProcessConfigFields - metadata.test: isEnabledAdapterType checks comingSoon first so intentionally withheld built-in adapters (process/http) stay disabled
This commit is contained in:
parent
d7a7bda209
commit
388650afc7
2 changed files with 10 additions and 7 deletions
|
|
@ -26,9 +26,11 @@ export function listKnownAdapterTypes(): string[] {
|
|||
* Unknown types (external adapters) are always considered enabled.
|
||||
*/
|
||||
export function isEnabledAdapterType(type: string): boolean {
|
||||
// Known external adapter — always valid
|
||||
if (listUIAdapters().some((a) => a.type === type)) return true;
|
||||
return !getAdapterDisplay(type).comingSoon;
|
||||
// Check display registry first — built-in adapters like process/http are
|
||||
// intentionally withheld even though they're registered as UI adapters.
|
||||
if (getAdapterDisplay(type).comingSoon) return false;
|
||||
// All other types (registered or external) are enabled.
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -37,8 +39,8 @@ export function isEnabledAdapterType(type: string): boolean {
|
|||
* any non-"coming soon" adapter from the display registry.
|
||||
*/
|
||||
export function isValidAdapterType(type: string): boolean {
|
||||
if (listUIAdapters().some((a) => a.type === type)) return true;
|
||||
return !getAdapterDisplay(type).comingSoon;
|
||||
if (getAdapterDisplay(type).comingSoon) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue