MCPcopy Create free account
hub / github.com/Linen-dev/linen.dev / serializeSettings

Function serializeSettings

packages/serializers/src/settings.ts:70–97  ·  view source on GitHub ↗
(account: accounts)

Source from the content-addressed store, hash-verified

68}
69
70export function serializeSettings(account: accounts): Settings {
71 const communityType = getCommunityType(account);
72
73 return {
74 communityId: account.id,
75 prefix: communityMapping[communityType],
76 ...(account.redirectDomain && { redirectDomain: account.redirectDomain }),
77 communityUrl: account.communityUrl || '',
78 communityInviteUrl: buildInviteUrl(account, communityType),
79 communityName: getCommunityName(account),
80 name: account.name,
81 brandColor: account.brandColor || 'var(--color-navbar)',
82 homeUrl: account.homeUrl || 'https://linen.dev',
83 docsUrl: account.docsUrl || 'https://linen.dev',
84 logoUrl:
85 account.logoUrl ||
86 'https://static.main.linendev.com/logos/linen-white-logo.svg',
87 ...(account.premium &&
88 account.googleAnalyticsId && {
89 googleAnalyticsId: account.googleAnalyticsId,
90 }),
91 communityType: communityType,
92 ...(!!account.googleSiteVerification && {
93 googleSiteVerification: account.googleSiteVerification,
94 }),
95 chat: (account.chat as ChatType) || null,
96 };
97}

Callers 1

fetchCommonFunction · 0.90

Calls 3

getCommunityTypeFunction · 0.85
buildInviteUrlFunction · 0.85
getCommunityNameFunction · 0.70

Tested by

no test coverage detected