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

UiPath / uipathcli / 14494471188

16 Apr 2025 01:52PM UTC coverage: 90.375% (-0.02%) from 90.391%
14494471188

push

github

web-flow
Merge pull request #181 from UiPath/feature/plugins-offline

Offline support for modules

179 of 220 new or added lines in 6 files covered. (81.36%)

6244 of 6909 relevant lines covered (90.37%)

1.01 hits per line

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

91.67
/commandline/offline_command_handler.go
1
package commandline
2

3
import (
4
        "fmt"
5
        "io"
6

7
        "github.com/UiPath/uipathcli/log"
8
        "github.com/UiPath/uipathcli/plugin"
9
)
10

11
// The offlineCommandHandler downloads all external resources to a local folder
12
// so that the uipathcli can be used without downloading any additional external
13
// dependencies. This can be useful in airgapped scenarios.
14
type offlineCommandHandler struct {
15
        StdOut io.Writer
16
        Logger log.Logger
17
}
18

19
func (h offlineCommandHandler) Execute() error {
1✔
20
        moduleManager := plugin.NewModuleManager(h.Logger)
1✔
21
        status, err := moduleManager.Offline()
1✔
22
        fmt.Fprint(h.StdOut, status+"\n\n")
1✔
23
        if err == nil {
2✔
24
                fmt.Fprint(h.StdOut, "Successfully downloaded all modules for offline mode!")
1✔
25
                return nil
1✔
26
        }
1✔
NEW
27
        return fmt.Errorf("Failed to download modules required for offline mode: %w", err)
×
28
}
29

30
func newOfflineCommandHandler(stdOut io.Writer, logger log.Logger) *offlineCommandHandler {
1✔
31
        return &offlineCommandHandler{stdOut, logger}
1✔
32
}
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