Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package Manager Setup command (Npm Pnpm Yarn Pip Pipenv Poetry Go Nuget Dotnet Docker Podman) #2738

Open
wants to merge 54 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 37 commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
7e2db95
Improve repositores code
sverdlov93 Oct 13, 2024
b3b2401
Merge branch 'dev' of https://github.com/jfrog/jfrog-cli into npm-login
sverdlov93 Oct 13, 2024
80a94c7
Improve repositores code
sverdlov93 Oct 13, 2024
9c7a467
Improve repositores code
sverdlov93 Oct 13, 2024
2d7a90c
Improve repositores code
sverdlov93 Oct 13, 2024
faa0521
Improve repositores code
sverdlov93 Oct 13, 2024
ee1c68d
Improve repositores code
sverdlov93 Oct 13, 2024
eb35483
Improve repositores code
sverdlov93 Oct 13, 2024
f3a4155
Improve repositores code
sverdlov93 Oct 13, 2024
fc3baac
Improve repositores code
sverdlov93 Oct 13, 2024
2af5a7b
Improve repositores code
sverdlov93 Oct 13, 2024
51d4f2d
Improve repositores code
sverdlov93 Oct 13, 2024
581e2ec
Improve repositores code
sverdlov93 Oct 13, 2024
c8e8ede
Improve repositores code
sverdlov93 Oct 25, 2024
8ad1862
Merge branch 'dev' of https://github.com/jfrog/jfrog-cli into npm-login
sverdlov93 Oct 25, 2024
0f89b37
Improve repositores code
sverdlov93 Oct 25, 2024
780cfb1
Improve repositores code
sverdlov93 Oct 25, 2024
b55d9f8
Merge branch 'dev' of https://github.com/jfrog/jfrog-cli into npm-login
sverdlov93 Oct 29, 2024
98cb97a
Improve repositores code
sverdlov93 Nov 3, 2024
67903cd
Merge branch 'dev' of https://github.com/jfrog/jfrog-cli into npm-login
sverdlov93 Nov 7, 2024
72c6dd7
Merge branch 'dev' of https://github.com/jfrog/jfrog-cli into npm-login
sverdlov93 Nov 19, 2024
20e2f2c
Improve upload archive progress bar
sverdlov93 Nov 20, 2024
b9c1bfc
Improve upload archive progress bar
sverdlov93 Nov 20, 2024
b0b118a
Improve upload archive progress bar
sverdlov93 Nov 20, 2024
f4caa49
Improve upload archive progress bar
sverdlov93 Nov 21, 2024
1035da0
Improve upload archive progress bar
sverdlov93 Nov 21, 2024
bf1d39b
Merge branch 'dev' into npm-login
sverdlov93 Nov 21, 2024
21f263f
Improve upload archive progress bar
sverdlov93 Nov 21, 2024
11e828e
Merge remote-tracking branch 'sverdlov93/npm-login' into npm-login
sverdlov93 Nov 21, 2024
7b84fd8
Merge branch 'dev' of https://github.com/jfrog/jfrog-cli into npm-login
sverdlov93 Dec 11, 2024
ab6d11b
Merge branch 'dev' of https://github.com/jfrog/jfrog-cli into npm-login
sverdlov93 Dec 24, 2024
c2c2298
Improve upload archive progress bar
sverdlov93 Jan 6, 2025
5e4eaf9
Improve upload archive progress bar
sverdlov93 Jan 6, 2025
662d621
Merge branch 'dev' of https://github.com/jfrog/jfrog-cli into npm-login
sverdlov93 Jan 6, 2025
3e7585d
Improve upload archive progress bar
sverdlov93 Jan 6, 2025
b7312fd
Improve upload archive progress bar
sverdlov93 Jan 6, 2025
7c4bd5e
Improve upload archive progress bar
sverdlov93 Jan 7, 2025
83787fc
Update docs/buildtools/setup/help.go
sverdlov93 Jan 8, 2025
d0ea1ba
Update buildtools/cli.go
sverdlov93 Jan 8, 2025
f3bb7e4
Update buildtools/cli.go
sverdlov93 Jan 8, 2025
651147c
Update buildtools/cli.go
sverdlov93 Jan 8, 2025
8b3633b
Update buildtools/cli.go
sverdlov93 Jan 8, 2025
058c344
Update utils/cliutils/commandsflags.go
sverdlov93 Jan 8, 2025
4ee0af5
Improve upload archive progress bar
sverdlov93 Jan 8, 2025
71d8654
Merge branch 'npm-login' of https://github.com/sverdlov93/jfrog-cli i…
sverdlov93 Jan 8, 2025
3fbc14f
Merge branch 'dev' of https://github.com/jfrog/jfrog-cli into npm-login
sverdlov93 Jan 8, 2025
17bda08
Improve upload archive progress bar
sverdlov93 Jan 8, 2025
1af6c2b
Improve upload archive progress bar
sverdlov93 Jan 8, 2025
5a82768
Improve upload archive progress bar
sverdlov93 Jan 8, 2025
8c1d1a3
Improve upload archive progress bar
sverdlov93 Jan 8, 2025
d1ae1d1
Improve upload archive progress bar
sverdlov93 Jan 8, 2025
5d54f3f
Improve upload archive progress bar
sverdlov93 Jan 8, 2025
25975fa
Improve upload archive progress bar
sverdlov93 Jan 9, 2025
6d09d6d
Merge branch 'dev' of https://github.com/jfrog/jfrog-cli into npm-login
sverdlov93 Jan 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 59 additions & 1 deletion buildtools/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ package buildtools
import (
"errors"
"fmt"
"github.com/jfrog/jfrog-cli-core/v2/artifactory/commands/setup"
"github.com/jfrog/jfrog-cli-core/v2/utils/ioutils"
"github.com/jfrog/jfrog-cli-security/utils/techutils"
setupdocs "github.com/jfrog/jfrog-cli/docs/buildtools/setup"
"os"
"strconv"
"strings"
Expand Down Expand Up @@ -65,11 +68,20 @@ import (
)

const (
buildToolsCategory = "Build Tools"
buildToolsCategory = "Package Managers:"
)

func GetCommands() []cli.Command {
return cliutils.GetSortedCommands(cli.CommandsByName{
{
Name: "setup",
Flags: cliutils.GetCommandFlags(cliutils.Setup),
Usage: setupdocs.GetDescription(),
HelpName: corecommon.CreateUsage("setup", setupdocs.GetDescription(), setupdocs.Usage),
ArgsUsage: common.CreateEnvVars(),
sverdlov93 marked this conversation as resolved.
Show resolved Hide resolved
BashComplete: corecommon.CreateBashCompletionFunc(),
sverdlov93 marked this conversation as resolved.
Show resolved Hide resolved
Action: setupCmd,
},
{
Name: "mvn-config",
Aliases: []string{"mvnc"},
Expand Down Expand Up @@ -929,6 +941,52 @@ func NpmPublishCmd(c *cli.Context) (err error) {
return
}

func setupCmd(c *cli.Context) (err error) {
var packageManager project.ProjectType
sverdlov93 marked this conversation as resolved.
Show resolved Hide resolved
packageManagerStr := c.Args().Get(0)
// If the package manager was provided as an argument, validate it.
if packageManagerStr != "" {
packageManager = project.FromString(packageManagerStr)
if !setup.IsSupportedPackageManager(packageManager) {
return errorutils.CheckErrorf("The package manager %s is not supported", packageManagerStr)
sverdlov93 marked this conversation as resolved.
Show resolved Hide resolved
}
} else {
// If the package manager wasn't provided as an argument, select it interactively.
packageManager, err = selectPackageManagerInteractively()
if err != nil {
return
}
}
setupCmd := setup.NewSetupCommand(packageManager)
artDetails, err := cliutils.CreateArtifactoryDetailsByFlags(c)
if err != nil {
return err
}
setupCmd.SetServerDetails(artDetails).SetRepoName(c.String("repo")).SetProjectKey(c.String(cliutils.Project))
sverdlov93 marked this conversation as resolved.
Show resolved Hide resolved
return commands.Exec(setupCmd)
}

func selectPackageManagerInteractively() (selectedPackageManager project.ProjectType, err error) {
allSupportedPackageManagers := setup.GetSupportedPackageManagersList()
var selected string
var selectableItems []ioutils.PromptItem
for _, packageManager := range allSupportedPackageManagers {
sverdlov93 marked this conversation as resolved.
Show resolved Hide resolved
selectableItems = append(selectableItems, ioutils.PromptItem{Option: packageManager.String(), TargetValue: &selected})
}
err = ioutils.SelectString(selectableItems, "Please select a package manager to set up:", false, func(item ioutils.PromptItem) {
*item.TargetValue = item.Option
selectedPackageManager = project.FromString(*item.TargetValue)
})
if err != nil {
return
}
if selectedPackageManager == -1 {
err = errorutils.CheckErrorf("No package manager was selected")
return
}
sverdlov93 marked this conversation as resolved.
Show resolved Hide resolved
return
}

func GetNpmConfigAndArgs(c *cli.Context) (configFilePath string, args []string, err error) {
configFilePath, err = getProjectConfigPathOrThrow(project.Npm, "npm", "npm-config")
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion buildtools/help.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ package buildtools

import (
corecommon "github.com/jfrog/jfrog-cli-core/v2/docs/common"
"github.com/jfrog/jfrog-cli/docs/artifactory/npmpublish"
"github.com/jfrog/jfrog-cli/docs/buildtools/dockerpull"
"github.com/jfrog/jfrog-cli/docs/buildtools/dockerpush"
"github.com/jfrog/jfrog-cli/docs/buildtools/npmci"
"github.com/jfrog/jfrog-cli/docs/buildtools/npminstall"
"github.com/jfrog/jfrog-cli/docs/buildtools/npmpublish"
"github.com/jfrog/jfrog-cli/docs/common"
"github.com/jfrog/jfrog-cli/utils/cliutils"
"github.com/urfave/cli"
Expand Down
16 changes: 16 additions & 0 deletions docs/buildtools/setup/help.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package setup

import (
"fmt"
"github.com/jfrog/jfrog-cli-core/v2/artifactory/commands/setup"
)

var Usage = []string{"setup [command options]",
"setup <package manager> [command options]"}

func GetDescription() string {
return fmt.Sprintf(
`An interactive command to set up your local package manager to work with JFrog Artifactory.
Supported package managers are: %v`,
sverdlov93 marked this conversation as resolved.
Show resolved Hide resolved
setup.GetSupportedPackageManagersList())
}
15 changes: 9 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,13 @@ require (
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
github.com/yusufpapurcu/wmi v1.2.3 // indirect
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect
go.opentelemetry.io/otel v1.31.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.31.0 // indirect
go.opentelemetry.io/otel/metric v1.31.0 // indirect
go.opentelemetry.io/otel/sdk v1.31.0 // indirect
go.opentelemetry.io/otel/trace v1.31.0 // indirect
go.opentelemetry.io/otel v1.33.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.33.0 // indirect
go.opentelemetry.io/otel/metric v1.33.0 // indirect
go.opentelemetry.io/otel/sdk v1.33.0 // indirect
go.opentelemetry.io/otel/trace v1.33.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.31.0 // indirect
golang.org/x/mod v0.22.0 // indirect
Expand All @@ -169,7 +170,9 @@ require (
gopkg.in/yaml.v3 v3.0.1 // indirect
)

// replace github.com/jfrog/jfrog-cli-core/v2 => github.com/eyalbe4/jfrog-cli-core/v2 v2.31.1-0.20241225194149-cc2e18e68ad8
replace github.com/jfrog/jfrog-cli-core/v2 => github.com/sverdlov93/jfrog-cli-core/v2 v2.0.2-0.20250106154202-a0afe89f81a2

// replace github.com/jfrog/jfrog-client-go => github.com/jfrog/jfrog-client-go v1.28.1-0.20250106143359-de902d8b8495

// replace github.com/jfrog/jfrog-cli-security => github.com/EyalDelarea/jfrog-cli-security v0.0.0-20241121103043-02719f295f02

Expand Down
63 changes: 31 additions & 32 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ github.com/gookit/color v1.5.4 h1:FZmqs7XOyGgCAxmWyPslpiok1k05wmY3SJTytgvYFs0=
github.com/gookit/color v1.5.4/go.mod h1:pZJOeOS8DM43rXbp4AZo1n9zCU2qjpcRko0b6/QJi9w=
github.com/grokify/mogo v0.64.12 h1:BNrZ1qBFuX4qu5722CW6qtqu/mrrsZ3bhKu/w1KowKg=
github.com/grokify/mogo v0.64.12/go.mod h1:lDhfYIiOhJo7C2U3aL00PlUU9gLvmTONi4MdIWoGmGM=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 h1:asbCHRVmodnJTuQ3qamDwqVOIjwqUPTYmYuemVOx+Ys=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0/go.mod h1:ggCgvZ2r7uOoQjOyu2Y1NhHmEPPzzuhWgcza5M1Ji1I=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.24.0 h1:TmHmbvxPmaegwhDubVz0lICL0J5Ka2vwTzhoePEXsGE=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.24.0/go.mod h1:qztMSjm835F2bXf+5HKAPIS5qsmQDqZna/PgVt4rWtI=
github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ=
github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48=
github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k=
Expand All @@ -173,8 +173,6 @@ github.com/jfrog/jfrog-apps-config v1.0.1 h1:mtv6k7g8A8BVhlHGlSveapqf4mJfonwvXYL
github.com/jfrog/jfrog-apps-config v1.0.1/go.mod h1:8AIIr1oY9JuH5dylz2S6f8Ym2MaadPLR6noCBO4C22w=
github.com/jfrog/jfrog-cli-artifactory v0.1.11 h1:tYGQpkGZVHwYxApKhMXgY1V25QaLFaTbjsoq0l3Bf4w=
github.com/jfrog/jfrog-cli-artifactory v0.1.11/go.mod h1:rVBTbanRnG9CXyAYRJ2O6h2fJMa+fsGB+3swUB/qEt0=
github.com/jfrog/jfrog-cli-core/v2 v2.57.5 h1:guVB/zPPtS8CWpNvAFPCxNvSgVra4TyX8lzs4V4+I/4=
github.com/jfrog/jfrog-cli-core/v2 v2.57.5/go.mod h1:LfKvCRXbvwgE0V6aX3/GabkzCedghXq0Y6lmsEuxr44=
github.com/jfrog/jfrog-cli-platform-services v1.5.0 h1:H0UNRvu8kBZD4koiBU13LpMx9PzrQ8ktlkv4zyIS+GE=
github.com/jfrog/jfrog-cli-platform-services v1.5.0/go.mod h1:/lQROHLtUsaTZDBohNC8cJNwUDntdzlxLR5DWeShaEQ=
github.com/jfrog/jfrog-cli-security v1.13.8 h1:bkEsFgQIpEoEJ1nzF2kQXsrOQ5Y/Nk5DWzM3NS+xHn8=
Expand Down Expand Up @@ -288,8 +286,8 @@ github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=
github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA=
github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII=
github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o=
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ=
Expand Down Expand Up @@ -338,6 +336,8 @@ github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOf
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8=
github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU=
github.com/sverdlov93/jfrog-cli-core/v2 v2.0.2-0.20250106154202-a0afe89f81a2 h1:BUWxB0EttLiNvbtpqOQdFRvTR4UD8UYLke3JsYzUm34=
github.com/sverdlov93/jfrog-cli-core/v2 v2.0.2-0.20250106154202-a0afe89f81a2/go.mod h1:LfKvCRXbvwgE0V6aX3/GabkzCedghXq0Y6lmsEuxr44=
github.com/terminalstatic/go-xsd-validate v0.1.5 h1:RqpJnf6HGE2CB/lZB1A8BYguk8uRtcvYAPLCF15qguo=
github.com/terminalstatic/go-xsd-validate v0.1.5/go.mod h1:18lsvYFofBflqCrvo1umpABZ99+GneNTw2kEEc8UPJw=
github.com/testcontainers/testcontainers-go v0.34.0 h1:5fbgF0vIN5u+nD3IWabQwRybuB4GY8G2HHgCkbMzMHo=
Expand Down Expand Up @@ -378,22 +378,24 @@ github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5t
github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw=
github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
github.com/zclconf/go-cty v1.10.0/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk=
go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA=
go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw=
go.opentelemetry.io/otel v1.31.0 h1:NsJcKPIW0D0H3NgzPDHmo0WW6SptzPdqg/L1zsIm2hY=
go.opentelemetry.io/otel v1.31.0/go.mod h1:O0C14Yl9FgkjqcCZAsE053C13OaddMYr/hz6clDkEJE=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.31.0 h1:K0XaT3DwHAcV4nKLzcQvwAgSyisUghWoY20I7huthMk=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.31.0/go.mod h1:B5Ki776z/MBnVha1Nzwp5arlzBbE3+1jk+pGmaP5HME=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.31.0 h1:lUsI2TYsQw2r1IASwoROaCnjdj2cvC2+Jbxvk6nHnWU=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.31.0/go.mod h1:2HpZxxQurfGxJlJDblybejHB6RX6pmExPNe517hREw4=
go.opentelemetry.io/otel/metric v1.31.0 h1:FSErL0ATQAmYHUIzSezZibnyVlft1ybhy4ozRPcF2fE=
go.opentelemetry.io/otel/metric v1.31.0/go.mod h1:C3dEloVbLuYoX41KpmAhOqNriGbA+qqH6PQ5E5mUfnY=
go.opentelemetry.io/otel/sdk v1.31.0 h1:xLY3abVHYZ5HSfOg3l2E5LUj2Cwva5Y7yGxnSW9H5Gk=
go.opentelemetry.io/otel/sdk v1.31.0/go.mod h1:TfRbMdhvxIIr/B2N2LQW2S5v9m3gOQ/08KsbbO5BPT0=
go.opentelemetry.io/otel/trace v1.31.0 h1:ffjsj1aRouKewfr85U2aGagJ46+MvodynlQ1HYdmJys=
go.opentelemetry.io/otel/trace v1.31.0/go.mod h1:TXZkRk7SM2ZQLtR6eoAWQFIHPvzQ06FJAsO1tJg480A=
go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0=
go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8=
go.opentelemetry.io/otel v1.33.0 h1:/FerN9bax5LoK51X/sI0SVYrjSE0/yUL7DpxW4K3FWw=
go.opentelemetry.io/otel v1.33.0/go.mod h1:SUUkR6csvUQl+yjReHu5uM3EtVV7MBm5FHKRlNx4I8I=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.33.0 h1:Vh5HayB/0HHfOQA7Ctx69E/Y/DcQSMPpKANYVMQ7fBA=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.33.0/go.mod h1:cpgtDBaqD/6ok/UG0jT15/uKjAY8mRA53diogHBg3UI=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.33.0 h1:wpMfgF8E1rkrT1Z6meFh1NDtownE9Ii3n3X2GJYjsaU=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.33.0/go.mod h1:wAy0T/dUbs468uOlkT31xjvqQgEVXv58BRFWEgn5v/0=
go.opentelemetry.io/otel/metric v1.33.0 h1:r+JOocAyeRVXD8lZpjdQjzMadVZp2M4WmQ+5WtEnklQ=
go.opentelemetry.io/otel/metric v1.33.0/go.mod h1:L9+Fyctbp6HFTddIxClbQkjtubW6O9QS3Ann/M82u6M=
go.opentelemetry.io/otel/sdk v1.33.0 h1:iax7M131HuAm9QkZotNHEfstof92xM+N8sr3uHXc2IM=
go.opentelemetry.io/otel/sdk v1.33.0/go.mod h1:A1Q5oi7/9XaMlIWzPSxLRWOI8nG3FnzHJNbiENQuihM=
go.opentelemetry.io/otel/trace v1.33.0 h1:cCJuF7LRjUFso9LPnEAHJDB2pqzp+hbO8eu1qqW2d/s=
go.opentelemetry.io/otel/trace v1.33.0/go.mod h1:uIcdVUZMpTAmz0tI1z04GoVSezK37CbGV4fr1f2nBck=
go.opentelemetry.io/proto/otlp v1.4.0 h1:TA9WRvW6zMwP+Ssb6fLoUIuirti1gGbP28GcKG1jgeg=
go.opentelemetry.io/proto/otlp v1.4.0/go.mod h1:PPBWZIP98o2ElSqI35IHfu7hIhSwvc5N38Jw8pXuGFY=
go.uber.org/mock v0.5.0 h1:KAMbZvZPyBPWgD14IrIQ38QCyjwpvVVV6K/bHl1IwQU=
go.uber.org/mock v0.5.0/go.mod h1:ge71pBPLYDk7QIi1LupWxdAykm7KIEFchiOqd6z7qMM=
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
Expand All @@ -407,8 +409,6 @@ golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDf
golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M=
golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U=
golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk=
golang.org/x/exp v0.0.0-20241108190413-2d47ceb2692f h1:XdNn9LlyWAhLVp6P/i8QYBW+hlyhrhei9uErw2B5GJo=
golang.org/x/exp v0.0.0-20241108190413-2d47ceb2692f/go.mod h1:D5SMRVC3C2/4+F/DB1wZsLRnSNimn2Sp/NPsCrsv8ak=
golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67 h1:1UoZQm6f0P/ZO0w1Ri+f+ifG/gXhegadRdwBIXEFWDo=
golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67/go.mod h1:qj5a5QZpwLU2NLQudwIN5koi3beDhSAlJwa67PuM98c=
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
Expand Down Expand Up @@ -507,24 +507,23 @@ golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roY
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
golang.org/x/tools v0.27.0 h1:qEKojBykQkQ4EynWy4S8Weg69NumxKdn40Fce3uc/8o=
golang.org/x/tools v0.27.0/go.mod h1:sUi0ZgbwW9ZPAq26Ekut+weQPR5eIM6GQLQ1Yjm1H0Q=
golang.org/x/tools v0.28.0 h1:WuB6qZ4RPCQo5aP3WdKZS7i595EdWqWR8vqJTlwTVK8=
golang.org/x/tools v0.28.0/go.mod h1:dcIOrVd3mfQKTgrDVQHqCPMWy6lnhfhtX3hLXYVLfRw=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
google.golang.org/genproto v0.0.0-20240930140551-af27646dc61f h1:mCJ6SGikSxVlt9scCayUl2dMq0msUgmBArqRY6umieI=
google.golang.org/genproto/googleapis/api v0.0.0-20241007155032-5fefd90f89a9 h1:T6rh4haD3GVYsgEfWExoCZA2o2FmbNyKpTuAxbEFPTg=
google.golang.org/genproto/googleapis/api v0.0.0-20241007155032-5fefd90f89a9/go.mod h1:wp2WsuBYj6j8wUdo3ToZsdxxixbvQNAHqVJrTgi5E5M=
google.golang.org/genproto/googleapis/rpc v0.0.0-20241007155032-5fefd90f89a9 h1:QCqS/PdaHTSWGvupk2F/ehwHtGc0/GYkT+3GAcR1CCc=
google.golang.org/genproto/googleapis/rpc v0.0.0-20241007155032-5fefd90f89a9/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI=
google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E=
google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA=
google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA=
google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
google.golang.org/genproto/googleapis/api v0.0.0-20241209162323-e6fa225c2576 h1:CkkIfIt50+lT6NHAVoRYEyAvQGFM7xEwXUUywFvEb3Q=
google.golang.org/genproto/googleapis/api v0.0.0-20241209162323-e6fa225c2576/go.mod h1:1R3kvZ1dtP3+4p4d3G8uJ8rFk/fWlScl38vanWACI08=
google.golang.org/genproto/googleapis/rpc v0.0.0-20241209162323-e6fa225c2576 h1:8ZmaLZE4XWrtU3MyClkYqqtl6Oegr3235h7jxsDyqCY=
google.golang.org/genproto/googleapis/rpc v0.0.0-20241209162323-e6fa225c2576/go.mod h1:5uTbfoYQed2U9p3KIj2/Zzm02PYhndfdmML0qC3q3FU=
google.golang.org/grpc v1.68.1 h1:oI5oTa11+ng8r8XMMN7jAOmWfPZWbYpCFaMUTACxkM0=
google.golang.org/grpc v1.68.1/go.mod h1:+q1XYFJjShcqn0QZHvCyeR4CXPA+llXIeUIfIe00waw=
google.golang.org/protobuf v1.35.2 h1:8Ar7bF+apOIoThw1EdZl0p1oWvMqTHmpA2fRTyZO8io=
google.golang.org/protobuf v1.35.2/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
Expand Down
16 changes: 12 additions & 4 deletions utils/cliutils/commandsflags.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,9 @@ import (

const (
// CLI base commands keys
Setup = "setup"
Intro = "intro"

// Artifactory's Commands Keys
DeleteConfig = "delete-config"
Upload = "upload"
Download = "download"
Move = "move"
Expand All @@ -35,6 +33,7 @@ const (
BuildAddGit = "build-add-git"
BuildCollectEnv = "build-collect-env"
GitLfsClean = "git-lfs-clean"
Setup = "setup"
Mvn = "mvn"
MvnConfig = "mvn-config"
CocoapodsConfig = "cocoapods-config"
Expand Down Expand Up @@ -108,8 +107,9 @@ const (
JpdDelete = "jpd-delete"

// Config commands keys
AddConfig = "config-add"
EditConfig = "config-edit"
AddConfig = "config-add"
EditConfig = "config-edit"
DeleteConfig = "delete-config"

// Project commands keys
InitProject = "project-init"
Expand Down Expand Up @@ -587,6 +587,7 @@ const (
lcDryRun = lifecyclePrefix + dryRun
lcIncludeRepos = lifecyclePrefix + IncludeRepos
lcExcludeRepos = lifecyclePrefix + ExcludeRepos
setupRepo = repo
)

var flagsMap = map[string]cli.Flag{
Expand Down Expand Up @@ -1723,6 +1724,10 @@ var flagsMap = map[string]cli.Flag{
Name: Reference,
Usage: "[Default: false] Generate a Reference Token (alias to Access Token) in addition to the full token (available from Artifactory 7.38.10)` `",
},
setupRepo: cli.StringFlag{
Name: repo,
Usage: "[Optional] Specifies the Artifactory repository name for the selected package manager, replacing the interactive repository selection.` `",
},
}

var commandFlags = map[string][]string{
Expand Down Expand Up @@ -2091,6 +2096,9 @@ var commandFlags = map[string][]string{
SyncStatus: {
branch, repository, serverId,
},
Setup: {
serverId, url, user, password, accessToken, Project, setupRepo,
sverdlov93 marked this conversation as resolved.
Show resolved Hide resolved
},
}

func GetCommandFlags(cmd string) []cli.Flag {
Expand Down
Loading