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

Function getBootURL

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

Source from the content-addressed store, hash-verified

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