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

Function getBootURL

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

Source from the content-addressed store, hash-verified

111};
112
113const getBootURL = (app: string, url?: string, pathname?: string) => {
114 const appRoute = app === 'companion' ? '/companion' : '';
115 const params = new URLSearchParams();
116 if (process.env.CURRENT_VERSION) {
117 params.append('v', process.env.CURRENT_VERSION);
118 }
119 if (url) {
120 params.append('url', url);
121 }
122 const referrer = getReferrerType(pathname);
123 if (referrer) {
124 params.append('referrer', referrer);
125 }
126
127 return `${apiUrl}/boot${appRoute}?${params}`;
128};
129
130const enrichBootWithFeatures = async (boot: Boot): Promise<Boot> => {
131 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