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

ckapps / overckd / 13656842746

31 May 2023 01:52PM CUT coverage: 20.328%. First build
13656842746

push

github

web-flow
Merge pull request #17 from ckapps/chore/update-deps

Chore/update deps

32 of 288 branches covered (11.11%)

Branch coverage included in aggregate %.

32 of 270 new or added lines in 73 files covered. (11.85%)

464 of 2152 relevant lines covered (21.56%)

0.76 hits per line

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

0.0
/packages/desktop-shell/src/config/load-paths.ts
1
import * as path from 'path';
×
2
import { isString } from '@overckd/domain/dist/core/string/';
×
3

4
import { AppPaths } from '../paths/config/app-paths.types';
5
import { DecodedAppConfigFile } from './app-config.types';
6

7
/**
8
 * @param yaml The parsed yaml file
9
 * @param defaults The defaults
10
 */
11
export function loadPaths(
×
12
  yaml: DecodedAppConfigFile,
13
  defaults: AppPaths,
14
): AppPaths {
15
  const { paths: pathsFromConfig = {} } = yaml;
×
16

17
  const fileRoot = path.resolve(yaml.pathRoot);
×
18

NEW
19
  const entries = Object.entries(defaults) as unknown as [
×
20
    keyof AppPaths,
21
    string,
22
  ][];
23

24
  return entries
×
25
    .map(([key, defaultPath]) => {
26
      const providedPath = pathsFromConfig[key];
×
27

28
      const resolvedPath = isString(providedPath)
×
29
        ? path.resolve(fileRoot, providedPath)
×
30
        : defaultPath;
31

32
      return [key, resolvedPath];
×
33
    })
34
    .reduce(
35
      (acc, [key, absolutePath]) => ({ ...acc, [key]: absolutePath }),
×
36
      defaults,
37
    );
38
}
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

© 2025 Coveralls, Inc