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

nikelborm / fetch-github-folder / 12940791799

24 Jan 2025 12:33AM UTC coverage: 83.502% (+0.2%) from 83.261%
12940791799

push

github

nikelborm
quick save: Fri Jan 24 03:33:53 MSK 2025

73 of 82 branches covered (89.02%)

Branch coverage included in aggregate %.

7 of 10 new or added lines in 2 files covered. (70.0%)

504 of 609 relevant lines covered (82.76%)

4.21 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

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

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

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

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

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