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

Bump/remove multiple libraries #3313

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
41 changes: 21 additions & 20 deletions .github/license/LICENSE-WITH-3RD-PARTY-LICENSES
Original file line number Diff line number Diff line change
Expand Up @@ -840,34 +840,35 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

For vendor/gopkg.in/cheggaaa/pb.v1:

Copyright (c) 2012-2015, Sergey Cherepanov All rights reserved.
For vendor/github.com/cheggaaa/pb:
Copyright (c) 2012-2024, Sergey Cherepanov
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

* Neither the name of the author nor the names of its contributors may be used
* to endorse or promote products derived from this software without specific
* prior written permission.
* Neither the name of the author nor the names of its contributors may be
used to endorse or promote products derived from this software without
specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.

For vendor/github.com/sabhiram/go-gitignore:

Expand Down
5 changes: 2 additions & 3 deletions actor/v7action/progress_bar.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"os"
"time"

"gopkg.in/cheggaaa/pb.v1"
"github.com/cheggaaa/pb/v3"
)

//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . SimpleProgressBar
Expand Down Expand Up @@ -34,8 +34,7 @@ func (p *ProgressBar) Initialize(path string) (io.Reader, int64, error) {
return nil, 0, err
}

p.bar = pb.New(int(fileInfo.Size())).SetUnits(pb.U_BYTES)
p.bar.ShowTimeLeft = false
p.bar = pb.New(int(fileInfo.Size())).Set(pb.Bytes, true)
p.bar.Start()
return p.bar.NewProxyReader(file), fileInfo.Size(), nil

Expand Down
17 changes: 9 additions & 8 deletions api/cloudcontroller/ccv3/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ package ccv3

import (
"code.cloudfoundry.org/cli/api/cloudcontroller/ccerror"
"code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/internal"
ccv3internal "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/internal"
"code.cloudfoundry.org/cli/api/internal"
"code.cloudfoundry.org/cli/resources"
)

Expand All @@ -11,7 +12,7 @@ func (client *Client) CreateApplication(app resources.Application) (resources.Ap
var responseBody resources.Application

_, warnings, err := client.MakeRequest(RequestParams{
RequestName: internal.PostApplicationRequest,
RequestName: ccv3internal.PostApplicationRequest,
RequestBody: app,
ResponseBody: &responseBody,
})
Expand Down Expand Up @@ -42,7 +43,7 @@ func (client *Client) GetApplications(query ...Query) ([]resources.Application,
var apps []resources.Application

_, warnings, err := client.MakeListRequest(RequestParams{
RequestName: internal.GetApplicationsRequest,
RequestName: ccv3internal.GetApplicationsRequest,
Query: query,
ResponseBody: resources.Application{},
AppendToList: func(item interface{}) error {
Expand All @@ -59,7 +60,7 @@ func (client *Client) UpdateApplication(app resources.Application) (resources.Ap
var responseBody resources.Application

_, warnings, err := client.MakeRequest(RequestParams{
RequestName: internal.PatchApplicationRequest,
RequestName: ccv3internal.PatchApplicationRequest,
URIParams: internal.Params{"app_guid": app.GUID},
RequestBody: app,
ResponseBody: &responseBody,
Expand All @@ -72,7 +73,7 @@ func (client *Client) UpdateApplication(app resources.Application) (resources.Ap
func (client *Client) UpdateApplicationName(newAppName string, appGUID string) (resources.Application, Warnings, error) {
var responseBody resources.Application
_, warnings, err := client.MakeRequest(RequestParams{
RequestName: internal.PatchApplicationRequest,
RequestName: ccv3internal.PatchApplicationRequest,
URIParams: internal.Params{"app_guid": appGUID},
RequestBody: resources.ApplicationNameOnly{Name: newAppName},
ResponseBody: &responseBody,
Expand All @@ -86,7 +87,7 @@ func (client *Client) UpdateApplicationRestart(appGUID string) (resources.Applic
var responseBody resources.Application

_, warnings, err := client.MakeRequest(RequestParams{
RequestName: internal.PostApplicationActionRestartRequest,
RequestName: ccv3internal.PostApplicationActionRestartRequest,
URIParams: internal.Params{"app_guid": appGUID},
ResponseBody: &responseBody,
})
Expand All @@ -99,7 +100,7 @@ func (client *Client) UpdateApplicationStart(appGUID string) (resources.Applicat
var responseBody resources.Application

_, warnings, err := client.MakeRequest(RequestParams{
RequestName: internal.PostApplicationActionStartRequest,
RequestName: ccv3internal.PostApplicationActionStartRequest,
URIParams: internal.Params{"app_guid": appGUID},
ResponseBody: &responseBody,
})
Expand All @@ -112,7 +113,7 @@ func (client *Client) UpdateApplicationStop(appGUID string) (resources.Applicati
var responseBody resources.Application

_, warnings, err := client.MakeRequest(RequestParams{
RequestName: internal.PostApplicationActionStopRequest,
RequestName: ccv3internal.PostApplicationActionStopRequest,
URIParams: internal.Params{"app_guid": appGUID},
ResponseBody: &responseBody,
})
Expand Down
9 changes: 5 additions & 4 deletions api/cloudcontroller/ccv3/application_feature.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package ccv3

import (
"code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/internal"
ccv3internal "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/internal"
"code.cloudfoundry.org/cli/api/internal"
"code.cloudfoundry.org/cli/resources"
)

Expand All @@ -14,7 +15,7 @@ func (client *Client) GetAppFeature(appGUID string, featureName string) (resourc
var responseBody resources.ApplicationFeature

_, warnings, err := client.MakeRequest(RequestParams{
RequestName: internal.GetApplicationFeaturesRequest,
RequestName: ccv3internal.GetApplicationFeaturesRequest,
URIParams: internal.Params{"app_guid": appGUID, "name": featureName},
ResponseBody: &responseBody,
})
Expand All @@ -26,7 +27,7 @@ func (client *Client) GetSSHEnabled(appGUID string) (SSHEnabled, Warnings, error
var responseBody SSHEnabled

_, warnings, err := client.MakeRequest(RequestParams{
RequestName: internal.GetSSHEnabled,
RequestName: ccv3internal.GetSSHEnabled,
URIParams: internal.Params{"app_guid": appGUID},
ResponseBody: &responseBody,
})
Expand All @@ -37,7 +38,7 @@ func (client *Client) GetSSHEnabled(appGUID string) (SSHEnabled, Warnings, error
// UpdateAppFeature enables/disables the ability to ssh for a given application.
func (client *Client) UpdateAppFeature(appGUID string, enabled bool, featureName string) (Warnings, error) {
_, warnings, err := client.MakeRequest(RequestParams{
RequestName: internal.PatchApplicationFeaturesRequest,
RequestName: ccv3internal.PatchApplicationFeaturesRequest,
RequestBody: struct {
Enabled bool `json:"enabled"`
}{Enabled: enabled},
Expand Down
19 changes: 10 additions & 9 deletions api/cloudcontroller/ccv3/application_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import (
. "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3"
"code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/ccv3fakes"
"code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant"
"code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/internal"
ccv3internal "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/internal"
"code.cloudfoundry.org/cli/api/internal"
"code.cloudfoundry.org/cli/resources"
"code.cloudfoundry.org/cli/types"
. "github.com/onsi/ginkgo/v2"
Expand Down Expand Up @@ -279,7 +280,7 @@ var _ = Describe("Application", func() {
It("makes the correct request", func() {
Expect(requester.MakeRequestCallCount()).To(Equal(1))
actualParams := requester.MakeRequestArgsForCall(0)
Expect(actualParams.RequestName).To(Equal(internal.PostApplicationRequest))
Expect(actualParams.RequestName).To(Equal(ccv3internal.PostApplicationRequest))
Expect(actualParams.RequestBody).To(Equal(appToCreate))
_, ok := actualParams.ResponseBody.(*resources.Application)
Expect(ok).To(BeTrue())
Expand Down Expand Up @@ -365,7 +366,7 @@ var _ = Describe("Application", func() {
It("makes the correct request", func() {
Expect(requester.MakeListRequestCallCount()).To(Equal(1))
actualParams := requester.MakeListRequestArgsForCall(0)
Expect(actualParams.RequestName).To(Equal(internal.GetApplicationsRequest))
Expect(actualParams.RequestName).To(Equal(ccv3internal.GetApplicationsRequest))
Expect(actualParams.Query).To(Equal([]Query{
{Key: NameFilter, Values: []string{"some-app-name"}},
{Key: SpaceGUIDFilter, Values: []string{"some-space-guid"}},
Expand Down Expand Up @@ -467,7 +468,7 @@ var _ = Describe("Application", func() {
It("makes the correct request", func() {
Expect(requester.MakeListRequestCallCount()).To(Equal(1))
actualParams := requester.MakeListRequestArgsForCall(0)
Expect(actualParams.RequestName).To(Equal(internal.GetApplicationsRequest))
Expect(actualParams.RequestName).To(Equal(ccv3internal.GetApplicationsRequest))
Expect(actualParams.Query).To(Equal(filters))
_, ok := actualParams.ResponseBody.(resources.Application)
Expect(ok).To(BeTrue())
Expand Down Expand Up @@ -562,7 +563,7 @@ var _ = Describe("Application", func() {
It("makes the correct request", func() {
Expect(requester.MakeRequestCallCount()).To(Equal(1))
actualParams := requester.MakeRequestArgsForCall(0)
Expect(actualParams.RequestName).To(Equal(internal.PatchApplicationRequest))
Expect(actualParams.RequestName).To(Equal(ccv3internal.PatchApplicationRequest))
Expect(actualParams.URIParams).To(Equal(internal.Params{"app_guid": "some-app-guid"}))
Expect(actualParams.RequestBody).To(Equal(appToUpdate))
_, ok := actualParams.ResponseBody.(*resources.Application)
Expand Down Expand Up @@ -660,7 +661,7 @@ var _ = Describe("Application", func() {
It("makes the correct request", func() {
Expect(requester.MakeRequestCallCount()).To(Equal(1))
actualParams := requester.MakeRequestArgsForCall(0)
Expect(actualParams.RequestName).To(Equal(internal.PatchApplicationRequest))
Expect(actualParams.RequestName).To(Equal(ccv3internal.PatchApplicationRequest))
Expect(actualParams.URIParams).To(Equal(internal.Params{"app_guid": "some-app-guid"}))
Expect(actualParams.RequestBody).To(Equal(resources.ApplicationNameOnly{Name: newAppName}))
_, ok := actualParams.ResponseBody.(*resources.Application)
Expand Down Expand Up @@ -749,7 +750,7 @@ var _ = Describe("Application", func() {
It("makes the correct request", func() {
Expect(requester.MakeRequestCallCount()).To(Equal(1))
actualParams := requester.MakeRequestArgsForCall(0)
Expect(actualParams.RequestName).To(Equal(internal.PostApplicationActionStopRequest))
Expect(actualParams.RequestName).To(Equal(ccv3internal.PostApplicationActionStopRequest))
Expect(actualParams.URIParams).To(Equal(internal.Params{"app_guid": "some-app-guid"}))
_, ok := actualParams.ResponseBody.(*resources.Application)
Expect(ok).To(BeTrue())
Expand Down Expand Up @@ -832,7 +833,7 @@ var _ = Describe("Application", func() {
It("makes the correct request", func() {
Expect(requester.MakeRequestCallCount()).To(Equal(1))
actualParams := requester.MakeRequestArgsForCall(0)
Expect(actualParams.RequestName).To(Equal(internal.PostApplicationActionStartRequest))
Expect(actualParams.RequestName).To(Equal(ccv3internal.PostApplicationActionStartRequest))
Expect(actualParams.URIParams).To(Equal(internal.Params{"app_guid": "some-app-guid"}))
_, ok := actualParams.ResponseBody.(*resources.Application)
Expect(ok).To(BeTrue())
Expand Down Expand Up @@ -915,7 +916,7 @@ var _ = Describe("Application", func() {
It("makes the correct request", func() {
Expect(requester.MakeRequestCallCount()).To(Equal(1))
actualParams := requester.MakeRequestArgsForCall(0)
Expect(actualParams.RequestName).To(Equal(internal.PostApplicationActionRestartRequest))
Expect(actualParams.RequestName).To(Equal(ccv3internal.PostApplicationActionRestartRequest))
Expect(actualParams.URIParams).To(Equal(internal.Params{"app_guid": "some-app-guid"}))
_, ok := actualParams.ResponseBody.(*resources.Application)
Expect(ok).To(BeTrue())
Expand Down
7 changes: 4 additions & 3 deletions api/cloudcontroller/ccv3/build.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package ccv3

import (
"code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/internal"
apiinternal "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/internal"
"code.cloudfoundry.org/cli/api/internal"
"code.cloudfoundry.org/cli/resources"
)

Expand All @@ -11,7 +12,7 @@ func (client *Client) CreateBuild(build resources.Build) (resources.Build, Warni
var responseBody resources.Build

_, warnings, err := client.MakeRequest(RequestParams{
RequestName: internal.PostBuildRequest,
RequestName: apiinternal.PostBuildRequest,
RequestBody: build,
ResponseBody: &responseBody,
})
Expand All @@ -24,7 +25,7 @@ func (client *Client) GetBuild(guid string) (resources.Build, Warnings, error) {
var responseBody resources.Build

_, warnings, err := client.MakeRequest(RequestParams{
RequestName: internal.GetBuildRequest,
RequestName: apiinternal.GetBuildRequest,
URIParams: internal.Params{"build_guid": guid},
ResponseBody: &responseBody,
})
Expand Down
13 changes: 7 additions & 6 deletions api/cloudcontroller/ccv3/buildpack.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ package ccv3
import (
"io"

"code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/internal"
ccv3internal "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/internal"
"code.cloudfoundry.org/cli/api/cloudcontroller/uploads"
"code.cloudfoundry.org/cli/api/internal"
"code.cloudfoundry.org/cli/resources"
)

Expand All @@ -14,7 +15,7 @@ func (client *Client) CreateBuildpack(bp resources.Buildpack) (resources.Buildpa
var responseBody resources.Buildpack

_, warnings, err := client.MakeRequest(RequestParams{
RequestName: internal.PostBuildpackRequest,
RequestName: ccv3internal.PostBuildpackRequest,
RequestBody: bp,
ResponseBody: &responseBody,
})
Expand All @@ -25,7 +26,7 @@ func (client *Client) CreateBuildpack(bp resources.Buildpack) (resources.Buildpa
// DeleteBuildpack deletes the buildpack with the provided guid.
func (client Client) DeleteBuildpack(buildpackGUID string) (JobURL, Warnings, error) {
jobURL, warnings, err := client.MakeRequest(RequestParams{
RequestName: internal.DeleteBuildpackRequest,
RequestName: ccv3internal.DeleteBuildpackRequest,
URIParams: internal.Params{"buildpack_guid": buildpackGUID},
})

Expand All @@ -37,7 +38,7 @@ func (client *Client) GetBuildpacks(query ...Query) ([]resources.Buildpack, Warn
var buildpacks []resources.Buildpack

_, warnings, err := client.MakeListRequest(RequestParams{
RequestName: internal.GetBuildpacksRequest,
RequestName: ccv3internal.GetBuildpacksRequest,
Query: query,
ResponseBody: resources.Buildpack{},
AppendToList: func(item interface{}) error {
Expand All @@ -53,7 +54,7 @@ func (client Client) UpdateBuildpack(buildpack resources.Buildpack) (resources.B
var responseBody resources.Buildpack

_, warnings, err := client.MakeRequest(RequestParams{
RequestName: internal.PatchBuildpackRequest,
RequestName: ccv3internal.PatchBuildpackRequest,
URIParams: internal.Params{"buildpack_guid": buildpack.GUID},
RequestBody: buildpack,
ResponseBody: &responseBody,
Expand All @@ -73,7 +74,7 @@ func (client *Client) UploadBuildpack(buildpackGUID string, buildpackPath string
contentType, body, writeErrors := uploads.CreateMultipartBodyAndHeader(buildpack, buildpackPath, "bits")

responseLocation, warnings, err := client.MakeRequestUploadAsync(
internal.PostBuildpackBitsRequest,
ccv3internal.PostBuildpackBitsRequest,
internal.Params{"buildpack_guid": buildpackGUID},
contentType,
body,
Expand Down
7 changes: 4 additions & 3 deletions api/cloudcontroller/ccv3/ccv3fakes/fake_clock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading