MCPcopy Create free account
hub / github.com/dailydotdev/apps / getBootURL

Function getBootURL

packages/shared/src/lib/boot.ts:118–133  ·  view source on GitHub ↗
(app: string, url?: string, pathname?: string)

Source from the content-addressed store, hash-verified

116};
117
118const getBootURL = (app: string, url?: string, pathname?: string) => {
119 const appRoute = app === 'companion' ? '/companion' : '';
120 const params = new URLSearchParams();
121 if (process.env.CURRENT_VERSION) {
122 params.append('v', process.env.CURRENT_VERSION);
123 }
124 if (url) {
125 params.append('url', url);
126 }
127 const referrer = getReferrerType(pathname);
128 if (referrer) {
129 params.append('referrer', referrer);
130 }
131
132 return `${apiUrl}/boot${appRoute}?${params}`;
133};
134
135const enrichBootWithFeatures = async (boot: Boot): Promise<Boot> => {
136 if (!boot.exp || !process.env.NEXT_PUBLIC_EXPERIMENTATION_KEY) {

Callers 1

getBootDataFunction · 0.85

Calls 1

getReferrerTypeFunction · 0.85

Tested by

no test coverage detected