diff --git a/artifactory_test.go b/artifactory_test.go index 5dbc8370c..def0d586c 100644 --- a/artifactory_test.go +++ b/artifactory_test.go @@ -1805,7 +1805,7 @@ func checkIfServerIsUp(port, proxyScheme string, useClientCerts bool) error { func TestXrayScanBuild(t *testing.T) { initArtifactoryTest(t, "") - xrayServerPort := xray.StartXrayMockServer() + xrayServerPort := xray.StartXrayMockServer(t) serverUrl := "--url=http://localhost:" + strconv.Itoa(xrayServerPort) artifactoryCommandExecutor := coretests.NewJfrogCli(execMain, "jfrog rt", serverUrl+getArtifactoryTestCredentials()) assert.NoError(t, artifactoryCommandExecutor.Exec("build-scan", xray.CleanScanBuildName, "3")) diff --git a/buildtools/cli.go b/buildtools/cli.go index 019b5425c..334ec2181 100644 --- a/buildtools/cli.go +++ b/buildtools/cli.go @@ -50,6 +50,7 @@ import ( "github.com/jfrog/jfrog-cli/docs/buildtools/pipenvconfig" "github.com/jfrog/jfrog-cli/docs/buildtools/pipenvinstall" "github.com/jfrog/jfrog-cli/docs/buildtools/pipinstall" + "github.com/jfrog/jfrog-cli/docs/buildtools/pnpmconfig" "github.com/jfrog/jfrog-cli/docs/buildtools/poetry" "github.com/jfrog/jfrog-cli/docs/buildtools/poetryconfig" yarndocs "github.com/jfrog/jfrog-cli/docs/buildtools/yarn" @@ -330,6 +331,19 @@ func GetCommands() []cli.Command { return npmGenericCmd(c, cmdName, false) }, }, + { + Name: "pnpm-config", + Flags: cliutils.GetCommandFlags(cliutils.PnpmConfig), + Aliases: []string{"pnpmc"}, + Usage: pnpmconfig.GetDescription(), + HelpName: corecommon.CreateUsage("pnpm-config", pnpmconfig.GetDescription(), pnpmconfig.Usage), + ArgsUsage: common.CreateEnvVars(), + BashComplete: corecommon.CreateBashCompletionFunc(), + Category: buildToolsCategory, + Action: func(c *cli.Context) error { + return cliutils.CreateConfigCmd(c, project.Pnpm) + }, + }, { Name: "docker", Flags: cliutils.GetCommandFlags(cliutils.Docker), diff --git a/docs/buildtools/pnpmconfig/help.go b/docs/buildtools/pnpmconfig/help.go new file mode 100644 index 000000000..214dc232e --- /dev/null +++ b/docs/buildtools/pnpmconfig/help.go @@ -0,0 +1,7 @@ +package pnpmconfig + +var Usage = []string{"pnpm-config [command options]"} + +func GetDescription() string { + return "Generate pnpm configuration." +} diff --git a/go.mod b/go.mod index afddc100a..214ad95e4 100644 --- a/go.mod +++ b/go.mod @@ -130,11 +130,11 @@ require ( gopkg.in/yaml.v3 v3.0.1 // indirect ) -replace github.com/jfrog/jfrog-cli-core/v2 => github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20240214142246-bb1e61c953ac +replace github.com/jfrog/jfrog-cli-core/v2 => github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20240218115031-cc5c8b521695 -replace github.com/jfrog/jfrog-client-go => github.com/jfrog/jfrog-client-go v1.28.1-0.20240214141548-6691c4323f52 +replace github.com/jfrog/jfrog-client-go => github.com/jfrog/jfrog-client-go v1.28.1-0.20240218093454-1c352a93c23d -replace github.com/jfrog/jfrog-cli-security => github.com/jfrog/jfrog-cli-security v1.0.2-0.20240214091334-d8ecf2a2cf76 +replace github.com/jfrog/jfrog-cli-security => github.com/jfrog/jfrog-cli-security v1.0.2-0.20240215122147-517c589b5ada // replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20231220102935-c8776c613ad8 diff --git a/go.sum b/go.sum index 7d9b9eb17..914d3dd36 100644 --- a/go.sum +++ b/go.sum @@ -127,12 +127,12 @@ github.com/jfrog/gofrog v1.6.0 h1:jOwb37nHY2PnxePNFJ6e6279Pgkr3di05SbQQw47Mq8= github.com/jfrog/gofrog v1.6.0/go.mod h1:SZ1EPJUruxrVGndOzHd+LTiwWYKMlHqhKD+eu+v5Hqg= github.com/jfrog/jfrog-apps-config v1.0.1 h1:mtv6k7g8A8BVhlHGlSveapqf4mJfonwvXYLipdsOFMY= github.com/jfrog/jfrog-apps-config v1.0.1/go.mod h1:8AIIr1oY9JuH5dylz2S6f8Ym2MaadPLR6noCBO4C22w= -github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20240214142246-bb1e61c953ac h1:dOPjCfPHtCdpp2e3yGeZZ7EieFxvlY6E45XGVqto5Mg= -github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20240214142246-bb1e61c953ac/go.mod h1:xKh03WzFK7YlZtHNJdOzkMvFjyq75yeUWW5EKNKV2Qk= -github.com/jfrog/jfrog-cli-security v1.0.2-0.20240214091334-d8ecf2a2cf76 h1:VK5FPJgi1OpWxTvUyAzqyO6a1NSX0sjvQ1K5zwgXGUY= -github.com/jfrog/jfrog-cli-security v1.0.2-0.20240214091334-d8ecf2a2cf76/go.mod h1:39Y1SHOpaG8iNTEgBhRqaUBKHaiYrZ5Joa6OwPCFQ64= -github.com/jfrog/jfrog-client-go v1.28.1-0.20240214141548-6691c4323f52 h1:eDwEWEKfz9gigNJNF60ioZFG3R/33Qq2z+5lH/FfO9Q= -github.com/jfrog/jfrog-client-go v1.28.1-0.20240214141548-6691c4323f52/go.mod h1:fV5wrs86ihQkFKfMKpGxMbNf3mbVT4LUf320C1T9C2M= +github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20240218115031-cc5c8b521695 h1:sD6uaVqfbixV+a/shxDThH6JIjVqqPrbz0dr95NjCy4= +github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20240218115031-cc5c8b521695/go.mod h1:+azTP7jL4ebGF//oVz+kCsLOIFxBp/19McVB0KHwT8U= +github.com/jfrog/jfrog-cli-security v1.0.2-0.20240215122147-517c589b5ada h1:u+DG6qiSE1X4hdCYtCAC3Fn1765VguTRurm+tqrbRNk= +github.com/jfrog/jfrog-cli-security v1.0.2-0.20240215122147-517c589b5ada/go.mod h1:CQo/eRqwB+O31pCnJv6tdvrTLWP2K7fmK4k4Oh+gebQ= +github.com/jfrog/jfrog-client-go v1.28.1-0.20240218093454-1c352a93c23d h1:59C2AOjdp5Wp/WoeQZkOGbAtKnhY1a9YhrnAdeVbVYs= +github.com/jfrog/jfrog-client-go v1.28.1-0.20240218093454-1c352a93c23d/go.mod h1:fV5wrs86ihQkFKfMKpGxMbNf3mbVT4LUf320C1T9C2M= github.com/jszwec/csvutil v1.10.0 h1:upMDUxhQKqZ5ZDCs/wy+8Kib8rZR8I8lOR34yJkdqhI= github.com/jszwec/csvutil v1.10.0/go.mod h1:/E4ONrmGkwmWsk9ae9jpXnv9QT8pLHEPcCirMFhxG9I= github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= diff --git a/utils/cliutils/commandsflags.go b/utils/cliutils/commandsflags.go index d6233273b..a5fe38b87 100644 --- a/utils/cliutils/commandsflags.go +++ b/utils/cliutils/commandsflags.go @@ -51,6 +51,7 @@ const ( Npm = "npm" NpmInstallCi = "npm-install-ci" NpmPublish = "npm-publish" + PnpmConfig = "pnpm-config" YarnConfig = "yarn-config" Yarn = "yarn" NugetConfig = "nuget-config" @@ -1848,6 +1849,9 @@ var commandFlags = map[string][]string{ NpmPublish: { buildName, buildNumber, module, Project, npmDetailedSummary, xrayScan, xrOutput, }, + PnpmConfig: { + global, serverIdResolve, repoResolve, + }, YarnConfig: { global, serverIdResolve, repoResolve, },