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

Add pnpm-config command #2444

Merged
merged 4 commits into from
Feb 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion artifactory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down
14 changes: 14 additions & 0 deletions buildtools/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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),
Expand Down
7 changes: 7 additions & 0 deletions docs/buildtools/pnpmconfig/help.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package pnpmconfig

var Usage = []string{"pnpm-config [command options]"}

func GetDescription() string {
return "Generate pnpm configuration."
}
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
4 changes: 4 additions & 0 deletions utils/cliutils/commandsflags.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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,
},
Expand Down
Loading