-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #135 from UiPath/feature/studio
Add support to analyze and package studio projects
- Loading branch information
Showing
49 changed files
with
2,341 additions
and
182 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,36 @@ | ||
package auth | ||
|
||
// BrowserLauncher interface for opening browser windows. | ||
type BrowserLauncher interface { | ||
Open(url string) error | ||
import ( | ||
"fmt" | ||
"time" | ||
|
||
"github.com/UiPath/uipathcli/utils" | ||
) | ||
|
||
// BrowserLauncher tries to open the default browser on the local system. | ||
type BrowserLauncher struct { | ||
Exec utils.ExecProcess | ||
} | ||
|
||
func (l BrowserLauncher) Open(url string) error { | ||
cmd := l.openBrowser(url) | ||
err := cmd.Start() | ||
if err != nil { | ||
return err | ||
} | ||
done := make(chan error) | ||
go func() { | ||
done <- cmd.Wait() | ||
}() | ||
|
||
select { | ||
case err := <-done: | ||
return err | ||
case <-time.After(5 * time.Second): | ||
return fmt.Errorf("Timed out waiting for browser to start") | ||
} | ||
} | ||
|
||
func NewBrowserLauncher() *BrowserLauncher { | ||
return &BrowserLauncher{utils.NewExecProcess()} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
//go:build darwin | ||
|
||
package auth | ||
|
||
import ( | ||
"github.com/UiPath/uipathcli/utils" | ||
) | ||
|
||
func (l BrowserLauncher) openBrowser(url string) utils.ExecCmd { | ||
return l.Exec.Command("open", url) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
//go:build linux | ||
|
||
package auth | ||
|
||
import ( | ||
"github.com/UiPath/uipathcli/utils" | ||
) | ||
|
||
func (l BrowserLauncher) openBrowser(url string) utils.ExecCmd { | ||
return l.Exec.Command("xdg-open", url) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
//go:build windows | ||
|
||
package auth | ||
|
||
import ( | ||
"github.com/UiPath/uipathcli/utils" | ||
) | ||
|
||
func (l BrowserLauncher) openBrowser(url string) utils.ExecCmd { | ||
return l.Exec.Command("rundll32", "url.dll,FileProtocolHandler", url) | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
openapi: 3.0.1 | ||
info: | ||
title: UiPath Studio | ||
description: UiPath Studio | ||
version: v1 | ||
servers: | ||
- url: https://cloud.uipath.com/{organization}/studio_/backend | ||
description: The production url | ||
variables: | ||
organization: | ||
description: The organization name (or id) | ||
default: my-org | ||
paths: | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.