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

nikelborm / fetch-github-folder / 12877771264

21 Jan 2025 12:28AM UTC coverage: 71.613% (+15.7%) from 55.882%
12877771264

push

github

nikelborm
quick save: Tue Jan 21 03:28:59 MSK 2025

69 of 78 branches covered (88.46%)

Branch coverage included in aggregate %.

2 of 2 new or added lines in 2 files covered. (100.0%)

41 existing lines in 5 files now uncovered.

486 of 697 relevant lines covered (69.73%)

3.46 hits per line

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

0.0
/fetch-github-folder.ts
1
#!/usr/bin/env node
×
2

UNCOV
3
import { make, run } from '@effect/cli/Command';
×
UNCOV
4
import { layer as NodeFileSystemLayer } from '@effect/platform-node-shared/NodeFileSystem';
×
UNCOV
5
import { layer as NodePathLayer } from '@effect/platform-node-shared/NodePath';
×
UNCOV
6
import { layer as NodeTerminalLayer } from '@effect/platform-node-shared/NodeTerminal';
×
UNCOV
7
import { runMain } from '@effect/platform-node-shared/NodeRuntime';
×
UNCOV
8
import { provide } from 'effect/Effect';
×
UNCOV
9
import { pipe } from 'effect/Function';
×
10
import {
11
  destinationPathCLIOptionBackedByEnv,
12
  downloadEntityFromRepo,
13
  gitRefCLIOptionBackedByEnv,
14
  OctokitLayer,
15
  pathToEntityInRepoCLIOptionBackedByEnv,
16
  provideSingleDownloadTargetConfig,
17
  repoNameCLIOptionBackedByEnv,
18
  repoOwnerCLIOptionBackedByEnv,
UNCOV
19
} from './src/index.js';
×
UNCOV
20
import { CliConfig } from '@effect/cli';
×
21

22
// Those values updated automatically. If you edit names of constants or
23
// move them to a different file, update ./scripts/build.sh
UNCOV
24
const PACKAGE_VERSION = '0.1.6';
×
UNCOV
25
const PACKAGE_NAME = 'fetch-github-folder';
×
26

UNCOV
27
const appCommand = make(
×
UNCOV
28
  'fetch-github-folder',
×
UNCOV
29
  {
×
UNCOV
30
    repo: {
×
UNCOV
31
      owner: repoOwnerCLIOptionBackedByEnv,
×
UNCOV
32
      name: repoNameCLIOptionBackedByEnv,
×
UNCOV
33
    },
×
UNCOV
34
    pathToEntityInRepo: pathToEntityInRepoCLIOptionBackedByEnv,
×
UNCOV
35
    localPathAtWhichEntityFromRepoWillBeAvailable:
×
36
      destinationPathCLIOptionBackedByEnv,
×
37
    gitRef: gitRefCLIOptionBackedByEnv,
×
UNCOV
38
  },
×
39
  config =>
×
40
    downloadEntityFromRepo.pipe(provideSingleDownloadTargetConfig(config)),
×
UNCOV
41
);
×
42

43
const cli = run(appCommand, {
×
44
  // those values will be filled automatically from package.json
UNCOV
45
  name: PACKAGE_NAME,
×
46
  version: PACKAGE_VERSION,
×
47
});
×
48

49
pipe(
×
UNCOV
50
  process.argv,
×
51
  cli,
×
52
  provide(NodeFileSystemLayer),
×
UNCOV
53
  provide(NodePathLayer),
×
UNCOV
54
  provide(NodeTerminalLayer),
×
UNCOV
55
  provide(CliConfig.layer({ showTypes: false })),
×
UNCOV
56
  provide(
×
57
    OctokitLayer({
×
58
      // auth: getEnvVarOrFail('GITHUB_ACCESS_TOKEN'),
UNCOV
59
    }),
×
UNCOV
60
  ),
×
UNCOV
61
  runMain,
×
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