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

kenhowardpdx / vscode-gist / 328

pending completion
328

push

travis-ci-com

web-flow
chore(deps): bump json5 from 2.2.0 to 2.2.3

Bumps [json5](https://github.com/json5/json5) from 2.2.0 to 2.2.3.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v2.2.0...v2.2.3)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

158 of 235 branches covered (67.23%)

Branch coverage included in aggregate %.

580 of 644 relevant lines covered (90.06%)

3.51 hits per line

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

76.32
/src/commands/gists/update-access-key.ts
1
import { GistCommands } from '../extension-commands';
1✔
2

3
const updateAccessKey: CommandInitializer = (
1✔
4
  config: Configuration,
5
  services: Services,
6
  utils: Utils
7
): [Command, CommandFn] => {
8
  const { gists, logger, profiles } = services;
3✔
9

10
  const command = GistCommands.UpdateAccessKey;
3✔
11

12
  const commandFn = (): void => {
3✔
13
    try {
2✔
14
      const profile = profiles.get();
2✔
15
      if (profile) {
2✔
16
        let optionOverride: GistServiceOptions = {};
1✔
17
        const profileOptionOverride = config.get<{
1✔
18
          [profile: string]: GistServiceOptions;
19
        }>('profileOptions');
20

21
        if (
1!
22
          profileOptionOverride &&
1!
23
          Object.keys(profileOptionOverride).length > 0 &&
24
          profileOptionOverride[profile.name]
25
        ) {
26
          optionOverride = { ...profileOptionOverride[profile.name] };
×
27
        }
28
        const key = optionOverride.key || profile.key;
1✔
29
        const url = optionOverride.url || profile.url;
1✔
30
        const rejectUnauthorized = optionOverride.rejectUnauthorized || true;
1✔
31
        gists.configure({ key, url, rejectUnauthorized });
1✔
32
      } else {
33
        gists.configure({
1✔
34
          key: undefined,
35
          rejectUnauthorized: undefined,
36
          url: undefined
37
        });
38
      }
39
      logger.debug('updated access key');
2✔
40
    } catch (err) {
41
      const error: Error = err as Error;
×
42
      logger.error(`${command} > ${error && error.message}`);
×
43
      utils.notify.error('Could Not Update Access Key', error.message);
×
44
    }
45
  };
46

47
  return [command, commandFn];
3✔
48
};
49

50
export { updateAccessKey };
1✔
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