• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kiva / ui / 15857960360

24 Jun 2025 05:59PM UTC coverage: 52.572% (+4.7%) from 47.876%
15857960360

push

github

emuvente
fix: add alt text for user avatar

1787 of 3592 branches covered (49.75%)

Branch coverage included in aggregate %.

1 of 1 new or added line in 1 file covered. (100.0%)

289 existing lines in 18 files now uncovered.

2628 of 4806 relevant lines covered (54.68%)

281.14 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/server-entry.js
1
import fetch from 'make-fetch-happen';
2
import CookieStore from '#src/util/cookieStore';
3
import KvAuth0, { MockKvAuth0 } from '#src/util/KvAuth0';
4
import logFormatter from '#src/util/logFormatter';
5
import renderESI from '#src/server-esi-render';
6
import renderPage from '#src/server-app-render';
7

8
// custom fetch wrapper to log fetch requests
UNCOV
9
const customFetch = async (uri, options) => {
×
UNCOV
10
        const response = await fetch(uri, options);
×
11
        // Log the outgoing options
UNCOV
12
        logFormatter(`Fetch Options: ${uri}, Options: ${JSON.stringify(options)}`);
×
13

14
        // Log the full response
15
        // eslint-disable-next-line max-len
UNCOV
16
        logFormatter(`Server fetch: ${uri}, Status: ${response.status}, Headers: ${JSON.stringify(response.headers.raw())}`);
×
17

UNCOV
18
        return response;
×
19
};
20

21
// This exported function will be called by vue-render.
22
// This is where we perform data-prefetching to determine the
23
// state of our application before actually rendering it.
24
// Since data fetching is async, this function is expected to
25
// return a Promise that resolves to the rendered html and set cookies.
26
export default async context => {
27
        const {
28
                esi,
29
                config,
30
                cookies,
31
                user,
32
        } = context;
×
UNCOV
33
        const { accessToken, ...profile } = user;
×
34

35
        // Create cookie store with cookies passed from express middleware
UNCOV
36
        const cookieStore = new CookieStore(cookies);
×
37

38
        let kvAuth0;
39
        if (config.auth0.enable) {
×
40
                kvAuth0 = new KvAuth0({
×
41
                        accessToken,
42
                        checkFakeAuth: config.auth0.checkFakeAuth,
43
                        cookieStore,
44
                        domain: config.auth0.domain,
45
                        user: profile,
46
                });
47
        } else {
48
                kvAuth0 = MockKvAuth0;
×
49
        }
50

UNCOV
51
        const renderingOptions = {
×
52
                cookieStore,
53
                context,
54
                fetch: config?.apolloQueryFetchLogging ? customFetch : fetch,
×
55
                kvAuth0,
56
        };
57

58
        if (esi) {
×
UNCOV
59
                return renderESI(renderingOptions);
×
60
        }
61
        return renderPage(renderingOptions);
×
62
};
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc