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

UiPath / uipathcli / 14492428967

16 Apr 2025 12:13PM UTC coverage: 90.343% (-0.02%) from 90.362%
14492428967

push

github

thschmitt
Offline support for modules

Added new command `uipath config offline` which configures the uipathcli
for offline mode which is useful in air-gapped environments.

The offline command downloads all required modules (like uipcli) to a
folder called `modules` next to the executable.

Extended the uipathcli to check first in the local `modules` folder
before downloading the dependency from the configured remote url.

172 of 211 new or added lines in 6 files covered. (81.52%)

6240 of 6907 relevant lines covered (90.34%)

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