• 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

70.27
/src/commands/gists/create-confirmation.ts
1
import { commands, env, window } from 'vscode';
1✔
2

3
import { GistCommands } from '../extension-commands';
1✔
4

5
const createConfirmation: CommandInitializer = (
1✔
6
  _config: Configuration,
7
  services: Services,
8
  utils: Utils
9
): [Command, CommandFn] => {
10
  const { logger } = services;
2✔
11

12
  const command = GistCommands.CreateConfirmation;
2✔
13

14
  enum CommandActions {
2✔
15
    OpenInBrowser = 'Open in Browser',
2✔
16
    CopyGistURL = 'Copy Gist URL to Clipboard'
2✔
17
  }
18

19
  const commandFn = async (gist: Gist): Promise<void> => {
2✔
20
    try {
2✔
21
      const { url } = gist;
2✔
22
      logger.info(`Now presenting ${gist.description}`);
1✔
23

24
      const selection = await window.showInformationMessage(
1✔
25
        'Gist Created',
26
        { title: CommandActions.OpenInBrowser },
27
        { title: CommandActions.CopyGistURL }
28
      );
29

30
      if (!selection) {
1!
31
        logger.info('User dismissed "Gist Created" dialog without action');
1✔
32

33
        return;
1✔
34
      }
35

36
      if (selection.title === CommandActions.OpenInBrowser) {
×
37
        commands.executeCommand(GistCommands.OpenInBrowser, gist);
×
38
        logger.info('Opening Gist in Browser');
×
39
      } else if (selection.title === CommandActions.CopyGistURL) {
×
40
        env.clipboard.writeText(url);
×
41
        logger.info('Copying Gist URL to Clipboard');
×
42
      }
43
    } catch (err) {
44
      const error: Error = err as Error;
1✔
45
      logger.error(`${command} > ${error && error.message}`);
1✔
46
      utils.notify.error(error.message);
1✔
47
    }
48
  };
49

50
  return [command, commandFn];
2✔
51
};
52

53
export { createConfirmation };
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