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

skmtc / skmtc / 18428577923

11 Oct 2025 11:06AM UTC coverage: 37.834% (+0.04%) from 37.796%
18428577923

push

github

dmitrigrabov
Clean up cli

406 of 486 branches covered (83.54%)

Branch coverage included in aggregate %.

5 of 58 new or added lines in 13 files covered. (8.62%)

8 existing lines in 3 files now uncovered.

4175 of 11622 relevant lines covered (35.92%)

11.2 hits per line

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

20.0
/deno/cli/workspaces/runtime-logs.tsx
1
import React from 'react'
1✔
2
import { Command } from '@cliffy/command'
1✔
3
import * as Sentry from '@sentry/node'
1✔
4
import type { SkmtcRoot } from '@/lib/skmtc-root.ts'
5
import type { Project } from '@/lib/project.ts'
6
import { render } from 'ink'
1✔
7
import { App } from '@/components/App.tsx'
1✔
8
import { getRuntimeLogs } from '@/services/getRuntimeLogs.ts'
1✔
9

10
export const description = 'View runtime logs'
1✔
11

12
export const toRuntimeLogsCommand = (skmtcRoot: SkmtcRoot) => {
1✔
13
  return new Command()
×
14
    .description(description)
×
15
    .arguments('<project:string>')
×
16
    .action(async (_, projectName) => {
×
17
      const session = await skmtcRoot.manager.auth.toSession()
×
18

19
      render(
×
20
        <App
×
21
          skmtcRoot={skmtcRoot}
×
22
          session={session}
×
23
          view={{ page: 'runtime-logs', projectName }}
×
24
          interactive={false}
×
25
        />
26
      )
27
    })
×
28
}
1✔
29

30
type GenerateArgs = {
31
  project: Project
32
  skmtcRoot: SkmtcRoot
33
  accountName: string
34
  token: string
35
}
36

37
type GenerateOptions = {
38
  logSuccess?: string
39
}
40

41
export const runtimeLogs = async (
×
42
  { project, skmtcRoot, accountName, token }: GenerateArgs,
×
43
  { logSuccess }: GenerateOptions = {}
×
44
) => {
45
  try {
×
46
    await project.manifest.refresh()
×
47

48
    const manifest = project.manifest.contents
×
49

50
    if (!manifest) {
×
51
      throw new Error('Project has no manifest. Has generation been run?')
×
52
    }
×
53

54
    const runtimeLogs = await getRuntimeLogs({
×
55
      accountName,
×
56
      serverName: project.name,
×
57
      spanId: manifest.spanId,
×
58
      token
×
59
    })
×
60

61
    console.log('LOGS', runtimeLogs)
×
62

63
    // runtimeLogs.forEach(log => {
64
    //   try {
65
    //     const message = JSON.parse(log.message)
66
    //     console.error(message)
67
    //   } catch (error) {
68
    //     console.error(log.message)
69
    //   }
70
    // })
UNCOV
71
  } catch (error) {
×
72
    console.error(error)
×
73

74
    Sentry.captureException(error)
×
75

76
    await Sentry.flush()
×
NEW
77
  } finally {
×
NEW
78
    await skmtcRoot.manager.cleanup()
×
79
  }
×
80
}
×
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