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

nikelborm / fetch-github-folder / 14685764525

12 Mar 2025 08:34AM UTC coverage: 84.334% (+1.1%) from 83.239%
14685764525

push

github

nikelborm
actually fix tests

73 of 79 branches covered (92.41%)

Branch coverage included in aggregate %.

573 of 687 relevant lines covered (83.41%)

3.84 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

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';
×
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.20';
×
24
const PACKAGE_NAME = 'fetch-github-folder';
×
25

26
const appCommand = make(
×
27
  PACKAGE_NAME,
×
28
  {
×
29
    repo: {
×
30
      owner: repoOwnerCLIOptionBackedByEnv,
×
31
      name: repoNameCLIOptionBackedByEnv,
×
32
    },
×
33
    pathToEntityInRepo: pathToEntityInRepoCLIOptionBackedByEnv,
×
34
    localPathAtWhichEntityFromRepoWillBeAvailable:
×
35
      destinationPathCLIOptionBackedByEnv,
×
36
    gitRef: gitRefCLIOptionBackedByEnv,
×
37
  },
×
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