diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index b4fb49353..3628f6c62 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -27,7 +27,7 @@ jobs: uses: docker/setup-buildx-action@v3 - name: Local docker build (non-root image) - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v6 with: context: . file: ./Dockerfile @@ -42,7 +42,7 @@ jobs: tags: openfaas/faas-cli:${{ github.sha }} - name: Test for multi-arch build - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v6 with: context: . file: ./Dockerfile diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 971e96ad8..000000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,434 +0,0 @@ -# Change Log - -## [Unreleased](https://github.com/openfaas/faas-cli/tree/HEAD) - -[Full Changelog](https://github.com/openfaas/faas-cli/compare/0.4.31...HEAD) - -**Closed issues:** - -- `faas-cli deploy` needs to reset constraints array after each function deploy in stack YAML [\#218](https://github.com/openfaas/faas-cli/issues/218) - -## [0.4.31](https://github.com/openfaas/faas-cli/tree/0.4.31) (2017-11-11) -[Full Changelog](https://github.com/openfaas/faas-cli/compare/0.4.3b...0.4.31) - -**Implemented enhancements:** - -- Proposal: Set default gateway value for executable [\#196](https://github.com/openfaas/faas-cli/issues/196) -- Version logo colour clashes with Powershell blue background [\#149](https://github.com/openfaas/faas-cli/issues/149) -- Proposal: Default to a 'well-known' named stack file [\#71](https://github.com/openfaas/faas-cli/issues/71) - -**Fixed bugs:** - -- `faas-cli new --help` shows a --name flag [\#151](https://github.com/openfaas/faas-cli/issues/151) - -**Closed issues:** - -- Separate version from command version [\#208](https://github.com/openfaas/faas-cli/issues/208) -- Versioning [\#204](https://github.com/openfaas/faas-cli/issues/204) -- Add `--all` option to `faas-cli rm` to quickly remove all functions [\#203](https://github.com/openfaas/faas-cli/issues/203) -- Use strict parsing for --gateway flag [\#185](https://github.com/openfaas/faas-cli/issues/185) -- Proposal Enable basic auth for CLI [\#178](https://github.com/openfaas/faas-cli/issues/178) -- python3 template proposal [\#163](https://github.com/openfaas/faas-cli/issues/163) -- Create and manage .gitignore file for function templates [\#127](https://github.com/openfaas/faas-cli/issues/127) -- Add tests for a dummy endpoint [\#45](https://github.com/openfaas/faas-cli/issues/45) - -**Merged pull requests:** - -- Don't re-use constraints for each function [\#219](https://github.com/openfaas/faas-cli/pull/219) ([alexellis](https://github.com/alexellis)) -- Command Version Separation [\#209](https://github.com/openfaas/faas-cli/pull/209) ([Lewiscowles1986](https://github.com/Lewiscowles1986)) -- build\_test: Update the Copyright [\#206](https://github.com/openfaas/faas-cli/pull/206) ([nenadilic84](https://github.com/nenadilic84)) -- Scan for license compliance during build [\#205](https://github.com/openfaas/faas-cli/pull/205) ([alexellis](https://github.com/alexellis)) - -## [0.4.3b](https://github.com/openfaas/faas-cli/tree/0.4.3b) (2017-11-04) -[Full Changelog](https://github.com/openfaas/faas-cli/compare/0.4.30...0.4.3b) - -## [0.4.30](https://github.com/openfaas/faas-cli/tree/0.4.30) (2017-11-04) -[Full Changelog](https://github.com/openfaas/faas-cli/compare/0.4.3a...0.4.30) - -## [0.4.3a](https://github.com/openfaas/faas-cli/tree/0.4.3a) (2017-11-03) -[Full Changelog](https://github.com/openfaas/faas-cli/compare/0.4.3...0.4.3a) - -## [0.4.3](https://github.com/openfaas/faas-cli/tree/0.4.3) (2017-11-03) -[Full Changelog](https://github.com/openfaas/faas-cli/compare/0.4.20...0.4.3) - -**Closed issues:** - -- derek test this [\#193](https://github.com/openfaas/faas-cli/issues/193) -- Dependency resolution within template Dockerfiles [\#191](https://github.com/openfaas/faas-cli/issues/191) - -**Merged pull requests:** - -- Restore Stefan as author of commits in Git [\#202](https://github.com/openfaas/faas-cli/pull/202) ([alexellis](https://github.com/alexellis)) -- Update tests for invalid --gateway URL to use got/want in error message [\#199](https://github.com/openfaas/faas-cli/pull/199) ([ericstoekl](https://github.com/ericstoekl)) -- Add error handling for calls to http.NewRequest\(\) in package proxy [\#198](https://github.com/openfaas/faas-cli/pull/198) ([ericstoekl](https://github.com/ericstoekl)) -- Enable non-zero-exit in case of an error while running "build" [\#195](https://github.com/openfaas/faas-cli/pull/195) ([nenadilic84](https://github.com/nenadilic84)) -- Update deletion error handling [\#192](https://github.com/openfaas/faas-cli/pull/192) ([alexellis](https://github.com/alexellis)) -- \[Testing\] Support Basic Auth for multiple gateways [\#182](https://github.com/openfaas/faas-cli/pull/182) ([stefanprodan](https://github.com/stefanprodan)) - -## [0.4.20](https://github.com/openfaas/faas-cli/tree/0.4.20) (2017-10-27) -[Full Changelog](https://github.com/openfaas/faas-cli/compare/0.4.19c...0.4.20) - -**Fixed bugs:** - -- The CLI is setting fprocess to `node index.js` on deploy by default, ignoring the value set in images [\#169](https://github.com/openfaas/faas-cli/issues/169) - -**Closed issues:** - -- faas-cli build to select architecture automatically [\#176](https://github.com/openfaas/faas-cli/issues/176) -- curl / faas-cli etc hangs with IPv6 entry for localhost [\#164](https://github.com/openfaas/faas-cli/issues/164) - -## [0.4.19c](https://github.com/openfaas/faas-cli/tree/0.4.19c) (2017-10-26) -[Full Changelog](https://github.com/openfaas/faas-cli/compare/0.4.19b...0.4.19c) - -## [0.4.19b](https://github.com/openfaas/faas-cli/tree/0.4.19b) (2017-10-26) -[Full Changelog](https://github.com/openfaas/faas-cli/compare/0.4.19...0.4.19b) - -**Merged pull requests:** - -- Fix permissions for Node.js [\#188](https://github.com/openfaas/faas-cli/pull/188) ([alexellis](https://github.com/alexellis)) - -## [0.4.19](https://github.com/openfaas/faas-cli/tree/0.4.19) (2017-10-23) -[Full Changelog](https://github.com/openfaas/faas-cli/compare/0.4.18d...0.4.19) - -**Fixed bugs:** - -- Homebrew test block fails with 0.4.18c [\#175](https://github.com/openfaas/faas-cli/issues/175) - -**Merged pull requests:** - -- Add label support [\#184](https://github.com/openfaas/faas-cli/pull/184) ([alexellis](https://github.com/alexellis)) -- Mile high commit - adds --query flag to CLI, but not to YAML [\#173](https://github.com/openfaas/faas-cli/pull/173) ([alexellis](https://github.com/alexellis)) -- Add timeouts for HTTP clients [\#165](https://github.com/openfaas/faas-cli/pull/165) ([alexellis](https://github.com/alexellis)) -- \[WIP\] non-root user for NodeJS template [\#83](https://github.com/openfaas/faas-cli/pull/83) ([austinfrey](https://github.com/austinfrey)) - -## [0.4.18d](https://github.com/openfaas/faas-cli/tree/0.4.18d) (2017-10-16) -[Full Changelog](https://github.com/openfaas/faas-cli/compare/0.4.18c...0.4.18d) - -**Merged pull requests:** - -- Add test coverage to gateway URL overriding [\#177](https://github.com/openfaas/faas-cli/pull/177) ([alexellis](https://github.com/alexellis)) - -## [0.4.18c](https://github.com/openfaas/faas-cli/tree/0.4.18c) (2017-10-16) -[Full Changelog](https://github.com/openfaas/faas-cli/compare/0.4.18b...0.4.18c) - -**Merged pull requests:** - -- Fixes --gateway override which was ignored when using YAML [\#174](https://github.com/openfaas/faas-cli/pull/174) ([alexellis](https://github.com/alexellis)) -- Remove language default and fix command flags [\#170](https://github.com/openfaas/faas-cli/pull/170) ([johnmccabe](https://github.com/johnmccabe)) - -## [0.4.18b](https://github.com/openfaas/faas-cli/tree/0.4.18b) (2017-10-12) -[Full Changelog](https://github.com/openfaas/faas-cli/compare/0.4.18a...0.4.18b) - -## [0.4.18a](https://github.com/openfaas/faas-cli/tree/0.4.18a) (2017-10-12) -[Full Changelog](https://github.com/openfaas/faas-cli/compare/0.4.18...0.4.18a) - -**Closed issues:** - -- faas-cli deploy -f sample.yml failing to start [\#156](https://github.com/openfaas/faas-cli/issues/156) -- faas-cli: not deploying to my pi swarm [\#148](https://github.com/openfaas/faas-cli/issues/148) -- Golang Template Dockerfile tests Vendor Package [\#146](https://github.com/openfaas/faas-cli/issues/146) -- Fail "build" if Docker CLI throws an error [\#138](https://github.com/openfaas/faas-cli/issues/138) -- Proposal: Add template for golang functions [\#79](https://github.com/openfaas/faas-cli/issues/79) - -**Merged pull requests:** - -- Add named secrets [\#161](https://github.com/openfaas/faas-cli/pull/161) ([alexellis](https://github.com/alexellis)) -- Golang ARMHF template [\#160](https://github.com/openfaas/faas-cli/pull/160) ([alexellis](https://github.com/alexellis)) -- Add missing deps to vendor.conf [\#158](https://github.com/openfaas/faas-cli/pull/158) ([johnmccabe](https://github.com/johnmccabe)) -- Fix environment file example [\#157](https://github.com/openfaas/faas-cli/pull/157) ([developius](https://github.com/developius)) -- Replace console.log with process.stdout.write for Node templates [\#153](https://github.com/openfaas/faas-cli/pull/153) ([developius](https://github.com/developius)) -- Update asciinema demo [\#152](https://github.com/openfaas/faas-cli/pull/152) ([developius](https://github.com/developius)) -- Use green logo on windows [\#150](https://github.com/openfaas/faas-cli/pull/150) ([johnmccabe](https://github.com/johnmccabe)) -- Amend golang template Dockerfile so that go test ignores vendor fixes \#146 [\#147](https://github.com/openfaas/faas-cli/pull/147) ([rgee0](https://github.com/rgee0)) - -## [0.4.18](https://github.com/openfaas/faas-cli/tree/0.4.18) (2017-10-06) -[Full Changelog](https://github.com/openfaas/faas-cli/compare/0.4.18-alpha1...0.4.18) - -## [0.4.18-alpha1](https://github.com/openfaas/faas-cli/tree/0.4.18-alpha1) (2017-10-06) -[Full Changelog](https://github.com/openfaas/faas-cli/compare/0.4.18-alpha...0.4.18-alpha1) - -**Closed issues:** - -- Error deploying faas-cli [\#144](https://github.com/openfaas/faas-cli/issues/144) - -**Merged pull requests:** - -- Add Go template capability for creating functions [\#145](https://github.com/openfaas/faas-cli/pull/145) ([nicholasjackson](https://github.com/nicholasjackson)) -- Default to stack.yml when no --yaml flag given [\#126](https://github.com/openfaas/faas-cli/pull/126) ([nicholasjackson](https://github.com/nicholasjackson)) - -## [0.4.18-alpha](https://github.com/openfaas/faas-cli/tree/0.4.18-alpha) (2017-10-05) -[Full Changelog](https://github.com/openfaas/faas-cli/compare/0.4.17...0.4.18-alpha) - -**Implemented enhancements:** - -- Print error message when --filter or --regex returns no matches [\#124](https://github.com/openfaas/faas-cli/issues/124) - -**Closed issues:** - -- How do I monitor resource utilization? [\#140](https://github.com/openfaas/faas-cli/issues/140) -- Hacktoberfest: Alter verb invoke to take positional argument [\#134](https://github.com/openfaas/faas-cli/issues/134) -- Add colour to "faas-cli new" command [\#129](https://github.com/openfaas/faas-cli/issues/129) -- Use multi-stage build and dotnet publish for C\# [\#53](https://github.com/openfaas/faas-cli/issues/53) - -**Merged pull requests:** - -- Error checking for cli exec-commands [\#139](https://github.com/openfaas/faas-cli/pull/139) ([shorsher](https://github.com/shorsher)) -- Update .gitignore when generating templates [\#137](https://github.com/openfaas/faas-cli/pull/137) ([viveksyngh](https://github.com/viveksyngh)) -- Alter-invoke-verb [\#135](https://github.com/openfaas/faas-cli/pull/135) ([gardlt](https://github.com/gardlt)) - -## [0.4.17](https://github.com/openfaas/faas-cli/tree/0.4.17) (2017-10-01) -[Full Changelog](https://github.com/openfaas/faas-cli/compare/0.4.16...0.4.17) - -**Closed issues:** - -- Hacktoberfest - move from --name parameter to positional arg [\#133](https://github.com/openfaas/faas-cli/issues/133) - -**Merged pull requests:** - -- Change to positional name for `new` function [\#132](https://github.com/openfaas/faas-cli/pull/132) ([alexellis](https://github.com/alexellis)) - -## [0.4.16](https://github.com/openfaas/faas-cli/tree/0.4.16) (2017-09-29) -[Full Changelog](https://github.com/openfaas/faas-cli/compare/0.4.16-alpha...0.4.16) - -**Closed issues:** - -- Proposal - Include `ls` alias for faas-cli list [\#122](https://github.com/openfaas/faas-cli/issues/122) -- Canonical repository URL does not match Go import [\#116](https://github.com/openfaas/faas-cli/issues/116) -- faas-cli push made it so that I couldn't update my container [\#114](https://github.com/openfaas/faas-cli/issues/114) - -**Merged pull requests:** - -- Push in parallel [\#142](https://github.com/openfaas/faas-cli/pull/142) ([alexellis](https://github.com/alexellis)) -- Print error message when no matches are found by --filter or --regex flag [\#125](https://github.com/openfaas/faas-cli/pull/125) ([ericstoekl](https://github.com/ericstoekl)) -- Use PUT verb for function updates and update messages [\#123](https://github.com/openfaas/faas-cli/pull/123) ([johnmccabe](https://github.com/johnmccabe)) - -## [0.4.16-alpha](https://github.com/openfaas/faas-cli/tree/0.4.16-alpha) (2017-09-25) -[Full Changelog](https://github.com/openfaas/faas-cli/compare/0.4.15a...0.4.16-alpha) - -**Merged pull requests:** - -- Updated contributing.md with new openfaas path [\#119](https://github.com/openfaas/faas-cli/pull/119) ([tripdubroot](https://github.com/tripdubroot)) -- Add `ls` alias for `faas-cli list` command [\#118](https://github.com/openfaas/faas-cli/pull/118) ([ericstoekl](https://github.com/ericstoekl)) -- Migrate all imports/references to OpenFaaS org [\#117](https://github.com/openfaas/faas-cli/pull/117) ([johnmccabe](https://github.com/johnmccabe)) - -## [0.4.15a](https://github.com/openfaas/faas-cli/tree/0.4.15a) (2017-09-24) -[Full Changelog](https://github.com/openfaas/faas-cli/compare/0.4.15...0.4.15a) - -**Merged pull requests:** - -- Add update flag for existing deployments [\#111](https://github.com/openfaas/faas-cli/pull/111) ([alexellis](https://github.com/alexellis)) - -## [0.4.15](https://github.com/openfaas/faas-cli/tree/0.4.15) (2017-09-23) -[Full Changelog](https://github.com/openfaas/faas-cli/compare/0.4.15-alpha1...0.4.15) - -**Merged pull requests:** - -- Allow environment\_file in YAML files [\#110](https://github.com/openfaas/faas-cli/pull/110) ([alexellis](https://github.com/alexellis)) - -## [0.4.15-alpha1](https://github.com/openfaas/faas-cli/tree/0.4.15-alpha1) (2017-09-22) -[Full Changelog](https://github.com/openfaas/faas-cli/compare/0.4.15-alpha...0.4.15-alpha1) - -## [0.4.15-alpha](https://github.com/openfaas/faas-cli/tree/0.4.15-alpha) (2017-09-22) -[Full Changelog](https://github.com/openfaas/faas-cli/compare/0.4.14...0.4.15-alpha) - -**Implemented enhancements:** - -- Proposal - filter functions in stacks [\#60](https://github.com/openfaas/faas-cli/issues/60) - -**Closed issues:** - -- Proposal: Use constant to declare default gateway [\#101](https://github.com/openfaas/faas-cli/issues/101) -- Cli: open ./template/python: no such file or directory error [\#99](https://github.com/openfaas/faas-cli/issues/99) -- CLI can't successfully deploy to 'custom' named stack [\#96](https://github.com/openfaas/faas-cli/issues/96) -- Proposal - automate adding cli binaries to Github release on tag [\#67](https://github.com/openfaas/faas-cli/issues/67) -- Support overriding function's Dockerfile [\#15](https://github.com/openfaas/faas-cli/issues/15) - -**Merged pull requests:** - -- Parallel build functionality [\#113](https://github.com/openfaas/faas-cli/pull/113) ([alexellis](https://github.com/alexellis)) -- Tests with mocked server & tests for commands and proxy directories [\#112](https://github.com/openfaas/faas-cli/pull/112) ([itscaro](https://github.com/itscaro)) -- Support ARM64 for Packet [\#109](https://github.com/openfaas/faas-cli/pull/109) ([alexellis](https://github.com/alexellis)) -- Add tag into version command and shorten SHA1 [\#104](https://github.com/openfaas/faas-cli/pull/104) ([itscaro](https://github.com/itscaro)) - -## [0.4.14](https://github.com/openfaas/faas-cli/tree/0.4.14) (2017-09-15) -[Full Changelog](https://github.com/openfaas/faas-cli/compare/0.4.14-alpha...0.4.14) - -**Closed issues:** - -- Proposal: Improve version command [\#105](https://github.com/openfaas/faas-cli/issues/105) -- Proposal: Do a gofmt verification before build [\#95](https://github.com/openfaas/faas-cli/issues/95) -- Add Clojure as supported language [\#89](https://github.com/openfaas/faas-cli/issues/89) - -**Merged pull requests:** - -- Use constant for default gateway strings [\#102](https://github.com/openfaas/faas-cli/pull/102) ([itscaro](https://github.com/itscaro)) -- Allow to override the network name from CLI [\#100](https://github.com/openfaas/faas-cli/pull/100) ([itscaro](https://github.com/itscaro)) -- Make gofmt fail builds [\#93](https://github.com/openfaas/faas-cli/pull/93) ([itscaro](https://github.com/itscaro)) - -## [0.4.14-alpha](https://github.com/openfaas/faas-cli/tree/0.4.14-alpha) (2017-09-12) -[Full Changelog](https://github.com/openfaas/faas-cli/compare/0.4.13-alpha...0.4.14-alpha) - -**Fixed bugs:** - -- build action template download/extraction fails on Windows [\#94](https://github.com/openfaas/faas-cli/issues/94) - -**Closed issues:** - -- Calling function created with `csharp` template results in error [\#90](https://github.com/openfaas/faas-cli/issues/90) -- publish function api to kong [\#88](https://github.com/openfaas/faas-cli/issues/88) - -## [0.4.13-alpha](https://github.com/openfaas/faas-cli/tree/0.4.13-alpha) (2017-09-08) -[Full Changelog](https://github.com/openfaas/faas-cli/compare/0.4.12...0.4.13-alpha) - -**Implemented enhancements:** - -- Proposal: Add 'invoke' command to the CLI [\#74](https://github.com/openfaas/faas-cli/issues/74) -- Proposal: Add init/new/create commands to the CLI [\#70](https://github.com/openfaas/faas-cli/issues/70) - -**Merged pull requests:** - -- \[WIP\] Use multi-stage build for CSharp [\#82](https://github.com/openfaas/faas-cli/pull/82) ([rorpage](https://github.com/rorpage)) - -## [0.4.12](https://github.com/openfaas/faas-cli/tree/0.4.12) (2017-09-05) -[Full Changelog](https://github.com/openfaas/faas-cli/compare/0.4.11...0.4.12) - -**Implemented enhancements:** - -- Proposal: Add 'list' command to the CLI [\#73](https://github.com/openfaas/faas-cli/issues/73) - -**Merged pull requests:** - -- Added basic filter functionality with regex search in stack.ParseYAML [\#78](https://github.com/openfaas/faas-cli/pull/78) ([ericstoekl](https://github.com/ericstoekl)) -- Assorted minor fixes while testing new faas-cli subcommands [\#77](https://github.com/openfaas/faas-cli/pull/77) ([johnmccabe](https://github.com/johnmccabe)) - -## [0.4.11](https://github.com/openfaas/faas-cli/tree/0.4.11) (2017-09-04) -[Full Changelog](https://github.com/openfaas/faas-cli/compare/0.4.10...0.4.11) - -**Merged pull requests:** - -- `new` cmd [\#75](https://github.com/openfaas/faas-cli/pull/75) ([alexellis](https://github.com/alexellis)) - -## [0.4.10](https://github.com/openfaas/faas-cli/tree/0.4.10) (2017-09-04) -[Full Changelog](https://github.com/openfaas/faas-cli/compare/0.4.9...0.4.10) - -**Fixed bugs:** - -- GitCommit in commands package not being updated at build time [\#62](https://github.com/openfaas/faas-cli/issues/62) -- Issue - function sub-folders are not copied recursively [\#59](https://github.com/openfaas/faas-cli/issues/59) - -**Closed issues:** - -- Proposal: auto-completion / Cobra CLI [\#17](https://github.com/openfaas/faas-cli/issues/17) - -**Merged pull requests:** - -- Build and deploy all platforms to Github on tag - fixes \#67 [\#68](https://github.com/openfaas/faas-cli/pull/68) ([johnmccabe](https://github.com/johnmccabe)) -- Remove master.zip file after building function with faas-cli build [\#66](https://github.com/openfaas/faas-cli/pull/66) ([ericstoekl](https://github.com/ericstoekl)) -- Fix importpath in Go linker -X ldflag - fixes \#62 [\#63](https://github.com/openfaas/faas-cli/pull/63) ([johnmccabe](https://github.com/johnmccabe)) -- Added recusion to handler copy + debugPrint fn [\#61](https://github.com/openfaas/faas-cli/pull/61) ([rgee0](https://github.com/rgee0)) - -## [0.4.9](https://github.com/openfaas/faas-cli/tree/0.4.9) (2017-08-31) -[Full Changelog](https://github.com/openfaas/faas-cli/compare/0.4.9-beta...0.4.9) - -**Closed issues:** - -- Update fwatchdog to 0.6.1 and update command help message [\#56](https://github.com/openfaas/faas-cli/issues/56) - -## [0.4.9-beta](https://github.com/openfaas/faas-cli/tree/0.4.9-beta) (2017-08-27) -[Full Changelog](https://github.com/openfaas/faas-cli/compare/0.4.9-alpha...0.4.9-beta) - -## [0.4.9-alpha](https://github.com/openfaas/faas-cli/tree/0.4.9-alpha) (2017-08-27) -[Full Changelog](https://github.com/openfaas/faas-cli/compare/0.4.8...0.4.9-alpha) - -**Closed issues:** - -- Should have - "Custom" template type [\#29](https://github.com/openfaas/faas-cli/issues/29) - -**Merged pull requests:** - -- Merge header notice from MIT to newly refactored files [\#58](https://github.com/openfaas/faas-cli/pull/58) ([alexellis](https://github.com/alexellis)) -- Update fwatchdog to 0.6.1 and correct help message for "action" option [\#57](https://github.com/openfaas/faas-cli/pull/57) ([itscaro](https://github.com/itscaro)) - -## [0.4.8](https://github.com/openfaas/faas-cli/tree/0.4.8) (2017-08-27) -[Full Changelog](https://github.com/openfaas/faas-cli/compare/0.4.7...0.4.8) - -**Closed issues:** - -- on faas-cli -action deploy: dial tcp 127.0.0.1:8080: getsockopt: connection refused [\#49](https://github.com/openfaas/faas-cli/issues/49) -- Docs using ./faas-cli instead of faas-cli [\#48](https://github.com/openfaas/faas-cli/issues/48) -- Refactor: app.go into separate packages/files [\#43](https://github.com/openfaas/faas-cli/issues/43) -- Enhancement - CLI should support function deletion [\#42](https://github.com/openfaas/faas-cli/issues/42) -- Bump Golang version to 1.8.x [\#40](https://github.com/openfaas/faas-cli/issues/40) - -**Merged pull requests:** - -- Allow Dockerfile language [\#52](https://github.com/openfaas/faas-cli/pull/52) ([alexellis](https://github.com/alexellis)) -- Update to Golang 1.8.3 [\#51](https://github.com/openfaas/faas-cli/pull/51) ([alexellis](https://github.com/alexellis)) -- Migrate CLI to Cobra and add initial bash completion : fixes \#17 [\#50](https://github.com/openfaas/faas-cli/pull/50) ([johnmccabe](https://github.com/johnmccabe)) -- Refactor app.go into packages/files [\#44](https://github.com/openfaas/faas-cli/pull/44) ([alexellis](https://github.com/alexellis)) -- Enable -delete as an action [\#41](https://github.com/openfaas/faas-cli/pull/41) ([alexellis](https://github.com/alexellis)) -- Migrate dependency management from glide to vndr [\#39](https://github.com/openfaas/faas-cli/pull/39) ([johnmccabe](https://github.com/johnmccabe)) -- Added syntax highlighting [\#38](https://github.com/openfaas/faas-cli/pull/38) ([morsik](https://github.com/morsik)) -- Update get.sh to determine latest full release from Github [\#37](https://github.com/openfaas/faas-cli/pull/37) ([johnmccabe](https://github.com/johnmccabe)) -- Add bump-formula-pr to Brew update steps [\#36](https://github.com/openfaas/faas-cli/pull/36) ([johnmccabe](https://github.com/johnmccabe)) - -## [0.4.7](https://github.com/openfaas/faas-cli/tree/0.4.7) (2017-08-16) -[Full Changelog](https://github.com/openfaas/faas-cli/compare/0.4.5-b...0.4.7) - -**Merged pull requests:** - -- Add ARM dockerfiles [\#35](https://github.com/openfaas/faas-cli/pull/35) ([alexellis](https://github.com/alexellis)) -- Enable CSharp template with .NET 2.0 standard [\#34](https://github.com/openfaas/faas-cli/pull/34) ([alexellis](https://github.com/alexellis)) - -## [0.4.5-b](https://github.com/openfaas/faas-cli/tree/0.4.5-b) (2017-08-10) -[Full Changelog](https://github.com/openfaas/faas-cli/compare/0.4.6...0.4.5-b) - -## [0.4.6](https://github.com/openfaas/faas-cli/tree/0.4.6) (2017-08-10) -[Full Changelog](https://github.com/openfaas/faas-cli/compare/0.4.5...0.4.6) - -**Merged pull requests:** - -- Restore pulling templates behaviour [\#31](https://github.com/openfaas/faas-cli/pull/31) ([alexellis](https://github.com/alexellis)) -- Add Ruby template [\#26](https://github.com/openfaas/faas-cli/pull/26) ([alexellis](https://github.com/alexellis)) - -## [0.4.5](https://github.com/openfaas/faas-cli/tree/0.4.5) (2017-08-08) -[Full Changelog](https://github.com/openfaas/faas-cli/compare/0.4...0.4.5) - -**Closed issues:** - -- Templating should use the --squash parameter for docker build [\#23](https://github.com/openfaas/faas-cli/issues/23) -- -action build should copy sub-folders into template [\#18](https://github.com/openfaas/faas-cli/issues/18) -- cli hanging on deploy command [\#16](https://github.com/openfaas/faas-cli/issues/16) -- faas-cli --help should give some fully worked examples [\#14](https://github.com/openfaas/faas-cli/issues/14) -- Idea - Utility script for installation from binary [\#11](https://github.com/openfaas/faas-cli/issues/11) - -**Merged pull requests:** - -- Update samples to have DNS-sanitized names [\#25](https://github.com/openfaas/faas-cli/pull/25) ([alexellis](https://github.com/alexellis)) -- Added squash flag & associated fixes [\#24](https://github.com/openfaas/faas-cli/pull/24) ([rgee0](https://github.com/rgee0)) -- Added copyTree function and replaced the template copyFiles calls [\#21](https://github.com/openfaas/faas-cli/pull/21) ([rgee0](https://github.com/rgee0)) -- Adding instructions to install faas-cli [\#20](https://github.com/openfaas/faas-cli/pull/20) ([jmkhael](https://github.com/jmkhael)) - -## [0.4](https://github.com/openfaas/faas-cli/tree/0.4) (2017-06-23) -[Full Changelog](https://github.com/openfaas/faas-cli/compare/0.3...0.4) - -## [0.3](https://github.com/openfaas/faas-cli/tree/0.3) (2017-06-23) -[Full Changelog](https://github.com/openfaas/faas-cli/compare/0.2...0.3) - -## [0.2](https://github.com/openfaas/faas-cli/tree/0.2) (2017-06-01) -[Full Changelog](https://github.com/openfaas/faas-cli/compare/0.1-alpha...0.2) - -**Merged pull requests:** - -- Add -skipBuild flag for non-built images [\#10](https://github.com/openfaas/faas-cli/pull/10) ([alexellis](https://github.com/alexellis)) -- Add 'push' action and -f for URLs [\#9](https://github.com/openfaas/faas-cli/pull/9) ([alexellis](https://github.com/alexellis)) -- Merge samples master [\#7](https://github.com/openfaas/faas-cli/pull/7) ([alexellis](https://github.com/alexellis)) -- Rename samples [\#6](https://github.com/openfaas/faas-cli/pull/6) ([alexellis](https://github.com/alexellis)) -- Support YAML [\#5](https://github.com/openfaas/faas-cli/pull/5) ([alexellis](https://github.com/alexellis)) -- Move from exec/bash to Go native copy/mkdir commands. [\#4](https://github.com/openfaas/faas-cli/pull/4) ([alexellis](https://github.com/alexellis)) -- Support Python as a target language, Node as default. [\#1](https://github.com/openfaas/faas-cli/pull/1) ([alexellis](https://github.com/alexellis)) - -## [0.1-alpha](https://github.com/openfaas/faas-cli/tree/0.1-alpha) (2017-04-14) - - -\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)* \ No newline at end of file diff --git a/README.md b/README.md index 6d93eb85d..6938a1dfc 100644 --- a/README.md +++ b/README.md @@ -90,7 +90,7 @@ The main commands supported by the CLI are: The default gateway URL of `127.0.0.1:8080` can be overridden in three places including an environmental variable. * 1st priority `--gateway` flag -* 2nd priority `--yaml` / `-f` flag or `stack.yml` if in current directory +* 2nd priority `--yaml` / `-f` flag or `stack.yaml` if in current directory * 3rd priority `OPENFAAS_URL` environmental variable For Kubernetes users you may want to set this in your `.bash_rc` file: @@ -293,7 +293,7 @@ A YAML stack file groups functions together and also saves on typing. You can define individual functions or a set of them within a YAML file. This makes the CLI easier to use and means you can use this file to deploy to your OpenFaaS instance. By default the faas-cli will attempt to load `stack.yaml` from the current directory. -Here is an example file using the `stack.yml` file included in the repository. +Here is an example file using the `stack.yaml` file included in the repository. ```yaml provider: @@ -317,10 +317,10 @@ $ faas-cli build > `-f` specifies the file or URL to download your YAML file from. The long version of the `-f` flag is: `--yaml`. -You can also download over HTTP(s): +You can also download over HTTP(s), for example: ```sh -$ faas-cli build -f https://raw.githubusercontent.com/openfaas/faas-cli/master/stack.yml +$ faas-cli build -f https://raw.githubusercontent.com/openfaas/store-functions/master/stack.yml ``` Docker along with a Python template will be used to build an image named alexellis2/faas-urlping. diff --git a/build_integration_test.sh b/build_integration_test.sh index 3c90c4c66..898dfad71 100755 --- a/build_integration_test.sh +++ b/build_integration_test.sh @@ -53,7 +53,7 @@ def handle(event, context): } EOF - eval $cli build -f $function_name.yml + eval $cli build -f stack.yaml } wait_for_function_up() { diff --git a/commands/build.go b/commands/build.go index 6c5e7dae7..f03a27199 100644 --- a/commands/build.go +++ b/commands/build.go @@ -56,9 +56,9 @@ func init() { buildCmd.Flags().Var(&tagFormat, "tag", "Override latest tag on function Docker image, accepts 'digest', 'sha', 'branch', or 'describe', or 'latest'") buildCmd.Flags().StringArrayVar(&buildLabels, "build-label", []string{}, "Add a label for Docker image (LABEL=VALUE)") buildCmd.Flags().StringArrayVar(©Extra, "copy-extra", []string{}, "Extra paths that will be copied into the function build context") - buildCmd.Flags().BoolVar(&envsubst, "envsubst", true, "Substitute environment variables in stack.yml file") + buildCmd.Flags().BoolVar(&envsubst, "envsubst", true, "Substitute environment variables in stack.yaml file") buildCmd.Flags().BoolVar(&quietBuild, "quiet", false, "Perform a quiet build, without showing output from Docker") - buildCmd.Flags().BoolVar(&disableStackPull, "disable-stack-pull", false, "Disables the template configuration in the stack.yml") + buildCmd.Flags().BoolVar(&disableStackPull, "disable-stack-pull", false, "Disables the template configuration in the stack.yaml") buildCmd.Flags().BoolVar(&forcePull, "pull", false, "Force a re-pull of base images in template during build, useful for publishing images") // Set bash-completion. @@ -88,16 +88,16 @@ var buildCmd = &cobra.Command{ the "--yaml" flag (which may contain multiple function definitions), or directly via flags.`, Example: ` faas-cli build -f https://domain/path/myfunctions.yml - faas-cli build -f ./stack.yml --no-cache --build-arg NPM_VERSION=0.2.2 - faas-cli build -f ./stack.yml --build-option dev - faas-cli build -f ./stack.yml --tag sha - faas-cli build -f ./stack.yml --tag branch - faas-cli build -f ./stack.yml --tag describe - faas-cli build -f ./stack.yml --filter "*gif*" - faas-cli build -f ./stack.yml --regex "fn[0-9]_.*" - faas-cli build --image=my_image --lang=python --handler=/path/to/fn/ + faas-cli build -f stack.yaml --no-cache --build-arg NPM_VERSION=0.2.2 + faas-cli build -f stack.yaml --build-option dev + faas-cli build -f stack.yaml --tag sha + faas-cli build -f stack.yaml --tag branch + faas-cli build -f stack.yaml --tag describe + faas-cli build -f stack.yaml --filter "*gif*" + faas-cli build -f stack.yaml --regex "fn[0-9]_.*" + faas-cli build --image=my_image --lang=python --handler=/path/to/fn/ \ --name=my_fn --squash - faas-cli build -f ./stack.yml --build-label org.label-schema.label-name="value"`, + faas-cli build -f stack.yaml --build-label org.label-schema.label-name="value"`, PreRunE: preRunBuild, RunE: runBuild, } diff --git a/commands/deploy.go b/commands/deploy.go index dd882a6c0..b678c64ed 100644 --- a/commands/deploy.go +++ b/commands/deploy.go @@ -69,7 +69,7 @@ func init() { deployCmd.Flags().Var(&tagFormat, "tag", "Override latest tag on function Docker image, accepts 'latest', 'sha', 'branch', or 'describe'") deployCmd.Flags().BoolVar(&tlsInsecure, "tls-no-verify", false, "Disable TLS validation") - deployCmd.Flags().BoolVar(&envsubst, "envsubst", true, "Substitute environment variables in stack.yml file") + deployCmd.Flags().BoolVar(&envsubst, "envsubst", true, "Substitute environment variables in stack.yaml file") deployCmd.Flags().StringVarP(&token, "token", "k", "", "Pass a JWT token to use instead of basic auth") // Set bash-completion. _ = deployCmd.Flags().SetAnnotation("handler", cobra.BashCompSubdirsInDir, []string{}) @@ -113,16 +113,16 @@ var deployCmd = &cobra.Command{ the "--yaml" flag (which may contain multiple function definitions), or directly via flags. Note: --replace and --update are mutually exclusive.`, Example: ` faas-cli deploy -f https://domain/path/myfunctions.yml - faas-cli deploy -f ./stack.yml - faas-cli deploy -f ./stack.yml --label canary=true - faas-cli deploy -f ./stack.yml --annotation user=true - faas-cli deploy -f ./stack.yml --filter "*gif*" --secret dockerhuborg - faas-cli deploy -f ./stack.yml --regex "fn[0-9]_.*" - faas-cli deploy -f ./stack.yml --replace=false --update=true - faas-cli deploy -f ./stack.yml --replace=true --update=false - faas-cli deploy -f ./stack.yml --tag sha - faas-cli deploy -f ./stack.yml --tag branch - faas-cli deploy -f ./stack.yml --tag describe + faas-cli deploy -f stack.yaml + faas-cli deploy -f stack.yaml --label canary=true + faas-cli deploy -f stack.yaml --annotation user=true + faas-cli deploy -f stack.yaml --filter "*gif*" --secret dockerhuborg + faas-cli deploy -f stack.yaml --regex "fn[0-9]_.*" + faas-cli deploy -f stack.yaml --replace=false --update=true + faas-cli deploy -f stack.yaml --replace=true --update=false + faas-cli deploy -f stack.yaml --tag sha + faas-cli deploy -f stack.yaml --tag branch + faas-cli deploy -f stack.yaml --tag describe faas-cli deploy --image=alexellis/faas-url-ping --name=url-ping faas-cli deploy --image=my_image --name=my_fn --handler=/path/to/fn/ --gateway=http://remote-site.com:8080 --lang=python diff --git a/commands/describe.go b/commands/describe.go index e9d57bd19..7d0f09101 100644 --- a/commands/describe.go +++ b/commands/describe.go @@ -26,7 +26,7 @@ func init() { describeCmd.Flags().StringVar(&functionName, "name", "", "Name of the function") describeCmd.Flags().StringVarP(&gateway, "gateway", "g", defaultGateway, "Gateway URL starting with http(s)://") describeCmd.Flags().BoolVar(&tlsInsecure, "tls-no-verify", false, "Disable TLS validation") - describeCmd.Flags().BoolVar(&envsubst, "envsubst", true, "Substitute environment variables in stack.yml file") + describeCmd.Flags().BoolVar(&envsubst, "envsubst", true, "Substitute environment variables in stack.yaml file") describeCmd.Flags().StringVarP(&token, "token", "k", "", "Pass a JWT token to use instead of basic auth") describeCmd.Flags().StringVarP(&functionNamespace, "namespace", "n", "", "Namespace of the function") describeCmd.Flags().BoolVarP(&verbose, "verbose", "v", false, "Enable verbose output") diff --git a/commands/generate.go b/commands/generate.go index 3b551976d..ed942b60d 100644 --- a/commands/generate.go +++ b/commands/generate.go @@ -48,7 +48,7 @@ func init() { generateCmd.Flags().StringVar(&api, "api", defaultAPIVersion, "CRD API version e.g openfaas.com/v1, serving.knative.dev/v1") generateCmd.Flags().StringVarP(&crdFunctionNamespace, "namespace", "n", "openfaas-fn", "Kubernetes namespace for functions") generateCmd.Flags().Var(&tagFormat, "tag", "Override latest tag on function Docker image, accepts 'digest', 'latest', 'sha', 'branch', 'describe'") - generateCmd.Flags().BoolVar(&envsubst, "envsubst", true, "Substitute environment variables in stack.yml file") + generateCmd.Flags().BoolVar(&envsubst, "envsubst", true, "Substitute environment variables in stack.yaml file") generateCmd.Flags().StringVar(&desiredArch, "arch", "x86_64", "Desired image arch. (Default x86_64)") generateCmd.Flags().StringArrayVar(&annotationArgs, "annotation", []string{}, "Any annotations you want to add (to store functions only)") generateCmd.Flags().StringArrayVar(&labelArgs, "label", []string{}, "Any labels you want to add (to store functions only)") @@ -57,14 +57,14 @@ func init() { } var generateCmd = &cobra.Command{ - Use: "generate --api=openfaas.com/v1 --yaml stack.yml --tag sha --namespace=openfaas-fn", + Use: "generate --api=openfaas.com/v1 --yaml stack.yaml --tag sha --namespace=openfaas-fn", Short: "Generate Kubernetes CRD YAML file", Long: `The generate command creates kubernetes CRD YAML file for functions`, - Example: `faas-cli generate --api=openfaas.com/v1 --yaml stack.yml | kubectl apply -f - -faas-cli generate --api=openfaas.com/v1 -f stack.yml -faas-cli generate --api=serving.knative.dev/v1 -f stack.yml -faas-cli generate --api=openfaas.com/v1 --namespace openfaas-fn -f stack.yml -faas-cli generate --api=openfaas.com/v1 -f stack.yml --tag branch -n openfaas-fn`, + Example: `faas-cli generate --api=openfaas.com/v1 --yaml stack.yaml | kubectl apply -f - +faas-cli generate --api=openfaas.com/v1 -f stack.yaml +faas-cli generate --api=serving.knative.dev/v1 -f stack.yaml +faas-cli generate --api=openfaas.com/v1 --namespace openfaas-fn -f stack.yaml +faas-cli generate --api=openfaas.com/v1 -f stack.yaml --tag branch -n openfaas-fn`, PreRunE: preRunGenerate, RunE: runGenerate, } @@ -183,8 +183,10 @@ func runGenerate(cmd *cobra.Command, args []string) error { } } else { fmt.Println( - `"stack.yml" file not found in the current directory. -Use "--yaml" to pass a file or "--from-store" to generate using function store.`) + `No "stack.yaml" or "stack.yml" file was found in the current directory. +Use "--yaml" / "-f" to specify a custom filename. + +Alternatively, to generate a definition for store functions, use "--from-store"`) os.Exit(1) } diff --git a/commands/invoke.go b/commands/invoke.go index 77716ff83..f5eaeeb9a 100644 --- a/commands/invoke.go +++ b/commands/invoke.go @@ -5,6 +5,7 @@ package commands import ( "bytes" + "crypto" "encoding/hex" "fmt" "io" @@ -14,7 +15,7 @@ import ( "runtime" "strings" - "github.com/alexellis/hmac" + "github.com/alexellis/hmac/v2" "github.com/openfaas/faas-cli/stack" "github.com/openfaas/faas-cli/version" "github.com/spf13/cobra" @@ -51,7 +52,7 @@ func init() { invokeCmd.Flags().StringVar(&sigHeader, "sign", "", "name of HTTP request header to hold the signature") invokeCmd.Flags().StringVar(&key, "key", "", "key to be used to sign the request (must be used with --sign)") - invokeCmd.Flags().BoolVar(&envsubst, "envsubst", true, "Substitute environment variables in stack.yml file") + invokeCmd.Flags().BoolVar(&envsubst, "envsubst", true, "Substitute environment variables in stack.yaml file") faasCmd.AddCommand(invokeCmd) } @@ -205,10 +206,10 @@ func runInvoke(cmd *cobra.Command, args []string) error { } func generateSignature(message []byte, key string) string { - hash := hmac.Sign(message, []byte(key)) + hash := hmac.Sign(message, []byte(key), crypto.SHA256.New) signature := hex.EncodeToString(hash) - return fmt.Sprintf(`%s=%s`, "sha1", string(signature[:])) + return fmt.Sprintf(`%s=%s`, "sha256", string(signature[:])) } func missingSignFlag(header string, key string) bool { diff --git a/commands/invoke_test.go b/commands/invoke_test.go index d2d3961cf..aaf1b3739 100644 --- a/commands/invoke_test.go +++ b/commands/invoke_test.go @@ -98,19 +98,19 @@ func Test_generateHeader(t *testing.T) { name: "Empty key", message: []byte("This is a message"), key: "", - want: "sha1=cdefd604e685e5c8b31fbcf6621a6e8282770dfe", + want: "sha256=7fb67a61acd7a9fa2541bbde51cef1bd4086a5a3acec0a0c821b40e06e824cfc", }, { name: "Key with empty message", message: []byte(""), key: "KeySet", - want: "sha1=33dcd94ffaf13fce58615585c030c1a39d100b3c", + want: "sha256=51846d8900847a40a129743c98742c83a56c3cbc4f5aec188d7eb2de629d11df", }, { name: "Empty key and message", message: []byte(""), key: "", - want: "sha1=fbdb1d1b18aa6c08324b7d64b71fb76370690e1d", + want: "sha256=b613679a0814d9ec772f95d778c35fc5ff1697c493715653c6c712144292c5ad", }, } for _, test := range tests { diff --git a/commands/list.go b/commands/list.go index 28a52538d..33fb3bf94 100644 --- a/commands/list.go +++ b/commands/list.go @@ -29,7 +29,7 @@ func init() { listCmd.Flags().BoolVarP(&verboseList, "verbose", "v", false, "Verbose output for the function list") listCmd.Flags().BoolVar(&tlsInsecure, "tls-no-verify", false, "Disable TLS validation") - listCmd.Flags().BoolVar(&envsubst, "envsubst", true, "Substitute environment variables in stack.yml file") + listCmd.Flags().BoolVar(&envsubst, "envsubst", true, "Substitute environment variables in stack.yaml file") listCmd.Flags().StringVarP(&token, "token", "k", "", "Pass a JWT token to use instead of basic auth") listCmd.Flags().StringVar(&sortOrder, "sort", "name", "Sort the functions by \"name\" or \"invocations\"") diff --git a/commands/local_run.go b/commands/local_run.go index 3e3d6cd88..9cb5a6bb5 100644 --- a/commands/local_run.go +++ b/commands/local_run.go @@ -63,8 +63,8 @@ services deployed within your OpenFaaS cluster.`, # Run on a random port faas-cli local-run -p 0 - # Use a custom YAML file other than stack.yml - faas-cli local-run stronghash -f ./stronghash.yml + # Use a custom YAML file other than stack.yaml + faas-cli local-run stronghash -f ./stronghash.yaml `, PreRunE: func(cmd *cobra.Command, args []string) error { if len(args) > 1 { @@ -133,7 +133,7 @@ func localRunExec(cmd *cobra.Command, args []string, ctx context.Context) error } // AE: I found that the `localrun` command will do a build of all functions in -// the stack.yml if no argument is given and there is > 1 function in +// the stack.yaml if no argument is given and there is > 1 function in // the file, then it will exit with an error when it comes to the run step func localBuild(cmd *cobra.Command, args []string) error { if err := preRunBuild(cmd, args); err != nil { diff --git a/commands/new_function.go b/commands/new_function.go index 894f5c7b6..c83819f67 100644 --- a/commands/new_function.go +++ b/commands/new_function.go @@ -52,7 +52,7 @@ var newFunctionCmd = &cobra.Command{ Long: `The new command creates a new function based upon hello-world in the given language or type in --list for a list of languages available.`, Example: ` faas-cli new chatbot --lang node - faas-cli new chatbot --lang node --append stack.yml + faas-cli new chatbot --lang node --append bots.yaml faas-cli new text-parser --lang python --quiet faas-cli new text-parser --lang python --gateway http://mydomain:8080 faas-cli new --list`, @@ -97,6 +97,10 @@ func preRunNewFunction(cmd *cobra.Command, args []string) error { return err } + if len(yamlFile) == 0 && len(appendFile) == 0 { + yamlFile = defaultYAML + } + return nil } @@ -160,7 +164,7 @@ Download templates: appendMode := len(appendFile) > 0 if appendMode { - if (strings.HasSuffix(appendFile, ".yml") || strings.HasSuffix(appendFile, ".yaml")) == false { + if !(strings.HasSuffix(appendFile, ".yml") || strings.HasSuffix(appendFile, ".yaml")) { return fmt.Errorf("when appending to a stack the suffix should be .yml or .yaml") } @@ -168,11 +172,8 @@ Download templates: return fmt.Errorf("unable to find file: %s - %s", appendFile, statErr.Error()) } - var duplicateError error - duplicateError = duplicateFunctionName(functionName, appendFile) - - if duplicateError != nil { - return duplicateError + if err := duplicateFunctionName(functionName, appendFile); err != nil { + return err } fileName = appendFile @@ -180,7 +181,7 @@ Download templates: } else { gateway = getGatewayURL(gateway, defaultGateway, gateway, os.Getenv(openFaaSURLEnvironment)) - fileName = functionName + ".yml" + fileName = yamlFile outputMsg = fmt.Sprintf("Stack file written: %s\n", fileName) } @@ -192,14 +193,14 @@ Download templates: return fmt.Errorf("folder: %s already exists", handlerDir) } - _, err := os.Stat(fileName) - if err == nil && appendMode == false { - return fmt.Errorf("file: %s already exists", fileName) + if _, err := os.Stat(fileName); err == nil && !appendMode { + return fmt.Errorf("file: %s already exists. Try \"faas-cli new --append %s\" instead", fileName, fileName) } if err := os.Mkdir(handlerDir, 0700); err != nil { return fmt.Errorf("folder: could not create %s : %s", handlerDir, err) } + fmt.Printf("Folder: %s created.\n", handlerDir) if err := updateGitignore(); err != nil { diff --git a/commands/new_function_test.go b/commands/new_function_test.go index 09fdf9df4..53a2c4faf 100644 --- a/commands/new_function_test.go +++ b/commands/new_function_test.go @@ -5,6 +5,7 @@ package commands import ( "os" + "path" "reflect" "regexp" "strings" @@ -47,15 +48,20 @@ type NewFunctionTest struct { dirName string expectedImage string expectedMsg string + + stackYaml string + wantStackYaml string } -var NewFunctionTests = []NewFunctionTest{ +var newFunctionTests = []NewFunctionTest{ { - title: "new_1", + title: "new-test-1", funcName: "new-test-1", - funcLang: "ruby", + funcLang: "dockerfile", expectedImage: "new-test-1:latest", expectedMsg: SuccessMsg, + stackYaml: "new-test-1.yml", + wantStackYaml: "new-test-1.yml", }, { title: "lowercase-dockerfile", @@ -63,13 +69,17 @@ var NewFunctionTests = []NewFunctionTest{ funcLang: "dockerfile", expectedImage: "lowercase-dockerfile:latest", expectedMsg: SuccessMsg, + stackYaml: "lowercase-dockerfile.yml", + wantStackYaml: "lowercase-dockerfile.yml", }, { - title: "uppercase-dockerfile", - funcName: "uppercase-dockerfile", + title: "stack.yaml as default", + funcName: "default-stack", funcLang: "dockerfile", - expectedImage: "uppercase-dockerfile:latest", + expectedImage: "default-stack:latest", expectedMsg: SuccessMsg, + stackYaml: "", + wantStackYaml: "stack.yaml", }, { title: "func-with-prefix", @@ -78,6 +88,8 @@ var NewFunctionTests = []NewFunctionTest{ funcLang: "dockerfile", expectedImage: "username/func-with-prefix:latest", expectedMsg: SuccessMsg, + stackYaml: "func-with-prefix.yml", + wantStackYaml: "func-with-prefix.yml", }, { title: "func-with-whitespace-only-prefix", @@ -86,6 +98,8 @@ var NewFunctionTests = []NewFunctionTest{ funcLang: "dockerfile", expectedImage: "func-with-whitespace-only-prefix:latest", expectedMsg: SuccessMsg, + stackYaml: "func-with-whitespace-only-prefix.yml", + wantStackYaml: "func-with-whitespace-only-prefix.yml", }, { title: "long-name-with-hyphens", @@ -95,30 +109,40 @@ var NewFunctionTests = []NewFunctionTest{ funcLang: "dockerfile", expectedImage: "long-name-with-hyphens:latest", expectedMsg: SuccessMsg, + stackYaml: "long-name-with-hyphens.yml", + wantStackYaml: "long-name-with-hyphens.yml", }, { - title: "invalid_1", - funcName: "new-test-invalid-1", - funcLang: "docker", - expectedMsg: LangNotExistsOutput, + title: "template_not_found", + funcName: "template_not_found", + funcLang: "docker", + expectedMsg: LangNotExistsOutput, + stackYaml: "template_not_found.yml", + wantStackYaml: "template_not_found.yml", }, { - title: "test_Uppercase", - funcName: "test_Uppercase", - funcLang: "dockerfile", - expectedMsg: IncludeUpperCase, + title: "test_Uppercase", + funcName: "test_Uppercase", + funcLang: "dockerfile", + expectedMsg: IncludeUpperCase, + stackYaml: "test_Uppercase.yml", + wantStackYaml: "test_Uppercase.yml", }, { - title: "no-function-name", - funcName: "", - funcLang: "--lang node", - expectedMsg: NoFunctionName, + title: "no-function-name", + funcName: "", + funcLang: "--lang node", + expectedMsg: NoFunctionName, + stackYaml: "", + wantStackYaml: "no-function-name.yml", }, { - title: "no-language", - funcName: "no-language", - funcLang: "", - expectedMsg: NoLanguage, + title: "no-language", + funcName: "no-language", + funcLang: "", + expectedMsg: NoLanguage, + stackYaml: "no-language.yml", + wantStackYaml: "no-language.yml", }, } @@ -127,31 +151,71 @@ func runNewFunctionTest(t *testing.T, nft NewFunctionTest) { funcLang := nft.funcLang dirName := nft.dirName imagePrefix := nft.prefix + var funcYAML string - funcYAML = funcName + ".yml" + + if len(nft.stackYaml) > 0 { + funcYAML = nft.stackYaml + } else { + funcYAML = defaultYAML + } cmdParameters := []string{ "new", "--lang=" + funcLang, "--gateway=" + defaultGateway, - "--prefix=" + imagePrefix, } + if len(imagePrefix) > 0 { + cmdParameters = append(cmdParameters, "--prefix="+imagePrefix) + } + if len(dirName) != 0 { cmdParameters = append(cmdParameters, "--handler="+dirName) } else { dirName = funcName } + + if len(funcYAML) > 0 && nft.stackYaml != defaultYAML { + cmdParameters = append(cmdParameters, "--yaml="+funcYAML) + } + if len(funcName) != 0 { cmdParameters = append(cmdParameters, funcName) } + if nft.stackYaml == "" { + t.Logf("Cmd: %+v", cmdParameters) + } + faasCmd.SetArgs(cmdParameters) - execErr := faasCmd.Execute() + if err := faasCmd.Execute(); err != nil { + + if nft.expectedMsg != "" && nft.expectedMsg != SuccessMsg { + // Validate new function output + if found, err := regexp.MatchString(nft.expectedMsg, err.Error()); err != nil || !found { + t.Logf("No match for:\n%s\nin\n%s\n", err, nft.expectedMsg) + } + } else { + t.Fatalf("Error: %v", err) + } + } + if nft.expectedMsg == SuccessMsg { + cwd, _ := os.Getwd() + + handlerPath := path.Join(cwd, dirName) + if len(nft.stackYaml) == 0 { + t.Logf("Should have a function created in folder: %s", handlerPath) + t.Logf("Should have a function created in folder: %s", nft.stackYaml) + } // Make sure that the folder and file was created: - if _, err := os.Stat("./" + dirName); err != nil && os.IsNotExist(err) { - t.Fatalf("%s/ directory was not created", dirName) + if _, err := os.Stat(handlerPath); err != nil { + if os.IsNotExist(err) { + t.Fatalf("%s/ directory was not created", handlerPath) + } else { + t.Fatalf("Error: %v", err) + } } // Check that the Dockerfile was created @@ -162,7 +226,7 @@ func runNewFunctionTest(t *testing.T, nft NewFunctionTest) { } if _, err := os.Stat(funcYAML); err != nil && os.IsNotExist(err) { - t.Fatalf("\"%s\" yaml file was not created", funcYAML) + t.Fatalf("%s was not created", funcYAML) } // Make sure that the information in the YAML file is correct: @@ -189,13 +253,7 @@ func runNewFunctionTest(t *testing.T, nft NewFunctionTest) { if !reflect.DeepEqual(services.Functions[funcName], testServices.Functions[funcName]) { t.Fatalf("YAML `functions` section was not created correctly for file %s, got %v", funcYAML, services.Functions[funcName]) } - } else { - // Validate new function output - if found, err := regexp.MatchString(nft.expectedMsg, execErr.Error()); err != nil || !found { - t.Fatalf("No match for:\n%s\nin\n%s\n", execErr, nft.expectedMsg) - } } - } func Test_newFunctionTests(t *testing.T) { @@ -203,10 +261,34 @@ func Test_newFunctionTests(t *testing.T) { templatePullLocalTemplateRepo(t) defer tearDownFetchTemplates(t) - for _, testcase := range NewFunctionTests { + cwd, _ := os.Getwd() + for _, testcase := range newFunctionTests { t.Run(testcase.title, func(t *testing.T) { - defer tearDownNewFunction(t, testcase.funcName) + + name := testcase.funcName + wantStackYaml := testcase.wantStackYaml + // Clean-up functions and stack.yaml files created by the tests + // These should be removed at the end of the function's execution + defer tearDownNewFunction(t, name, wantStackYaml) + + // Remove any left over stack.yaml files from a previous run + os.Remove(path.Join(cwd, wantStackYaml)) + + // Clean-up any existing handler folder before running + // only do this for tests that are meant to pass and create + // a valid folder + handlerDir := testcase.dirName + if len(handlerDir) == 0 { + handlerDir = testcase.funcName + } + + if testcase.expectedMsg == SuccessMsg { + os.Remove(path.Join(cwd, handlerDir)) + } + runNewFunctionTest(t, testcase) + + defer os.Remove(path.Join(cwd, testcase.wantStackYaml)) }) } } @@ -319,16 +401,18 @@ func Test_duplicateFunctionName(t *testing.T) { const functionName = "samplefunc" const functionLang = "dockerfile" + const functionYaml = functionName + ".yml" templatePullLocalTemplateRepo(t) defer tearDownFetchTemplates(t) - defer tearDownNewFunction(t, functionName) + defer tearDownNewFunction(t, functionName, functionYaml) // Create function parameters := []string{ "new", functionName, "--lang=" + functionLang, + "--yaml=" + functionYaml, } faasCmd.SetArgs(parameters) faasCmd.Execute() @@ -347,11 +431,12 @@ func Test_backfillTemplates(t *testing.T) { resetForTest() const functionName = "samplefunc" const functionLang = "dockerfile" + const functionYaml = "samplefunc.yml" // Delete cached templates localTemplateRepository := setupLocalTemplateRepo(t) defer os.RemoveAll(localTemplateRepository) - defer tearDownNewFunction(t, functionName) + defer tearDownNewFunction(t, functionName, functionYaml) os.Setenv(templateURLEnvironment, localTemplateRepository) defer os.Unsetenv(templateURLEnvironment) @@ -360,7 +445,9 @@ func Test_backfillTemplates(t *testing.T) { "new", functionName, "--lang=" + functionLang, + "--yaml=" + functionYaml, } + faasCmd.SetArgs(parameters) err := faasCmd.Execute() if err != nil { @@ -368,7 +455,7 @@ func Test_backfillTemplates(t *testing.T) { } } -func tearDownNewFunction(t *testing.T, functionName string) { +func tearDownNewFunction(t *testing.T, functionName, functionStackYml string) { if _, err := os.Stat(".gitignore"); err == nil { if err := os.Remove(".gitignore"); err != nil { t.Log(err) @@ -383,12 +470,18 @@ func tearDownNewFunction(t *testing.T, functionName string) { t.Log(err) } } - functionYaml := functionName + ".yml" - if _, err := os.Stat(functionYaml); err == nil { - if err := os.Remove(functionYaml); err != nil { - t.Log(err) + + if len(functionStackYml) == 0 { + functionYaml := functionName + ".yml" + if _, err := os.Stat(functionYaml); err == nil { + if err := os.Remove(functionYaml); err != nil { + t.Log(err) + } } + } else { + os.RemoveAll(functionStackYml) } + handlerDir = "" } diff --git a/commands/publish.go b/commands/publish.go index 0c697e7bd..ed380b71d 100644 --- a/commands/publish.go +++ b/commands/publish.go @@ -44,9 +44,9 @@ func init() { publishCmd.Flags().Var(&tagFormat, "tag", "Override latest tag on function Docker image, accepts 'latest', 'sha', 'branch', or 'describe'") publishCmd.Flags().StringArrayVar(&buildLabels, "build-label", []string{}, "Add a label for Docker image (LABEL=VALUE)") publishCmd.Flags().StringArrayVar(©Extra, "copy-extra", []string{}, "Extra paths that will be copied into the function build context") - publishCmd.Flags().BoolVar(&envsubst, "envsubst", true, "Substitute environment variables in stack.yml file") + publishCmd.Flags().BoolVar(&envsubst, "envsubst", true, "Substitute environment variables in stack.yaml file") publishCmd.Flags().BoolVar(&quietBuild, "quiet", false, "Perform a quiet build, without showing output from Docker") - publishCmd.Flags().BoolVar(&disableStackPull, "disable-stack-pull", false, "Disables the template configuration in the stack.yml") + publishCmd.Flags().BoolVar(&disableStackPull, "disable-stack-pull", false, "Disables the template configuration in the stack.yaml") publishCmd.Flags().StringVar(&platforms, "platforms", "linux/amd64", "A set of platforms to publish") publishCmd.Flags().StringArrayVar(&extraTags, "extra-tag", []string{}, "Additional extra image tag") publishCmd.Flags().BoolVar(&resetQemu, "reset-qemu", false, "Runs \"docker run multiarch/qemu-user-static --reset -p yes\" to enable multi-arch builds. Compatible with AMD64 machines only.") diff --git a/commands/push.go b/commands/push.go index cf6e7ecaa..0e5fa27ea 100644 --- a/commands/push.go +++ b/commands/push.go @@ -23,7 +23,7 @@ func init() { pushCmd.Flags().IntVar(¶llel, "parallel", 1, "Push images in parallel to depth specified.") pushCmd.Flags().Var(&tagFormat, "tag", "Override latest tag on function Docker image, accepts 'digest', 'latest', 'sha', 'branch', 'describe'") - pushCmd.Flags().BoolVar(&envsubst, "envsubst", true, "Substitute environment variables in stack.yml file") + pushCmd.Flags().BoolVar(&envsubst, "envsubst", true, "Substitute environment variables in stack.yaml file") pushCmd.Flags().BoolVar(&quietBuild, "quiet", false, "Perform a quiet build, without showing output from Docker") } @@ -37,13 +37,13 @@ config to a remote repository. These container images must already be present in your local image cache.`, Example: ` faas-cli push -f https://domain/path/myfunctions.yml - faas-cli push -f ./stack.yml - faas-cli push -f ./stack.yml --parallel 4 - faas-cli push -f ./stack.yml --filter "*gif*" - faas-cli push -f ./stack.yml --regex "fn[0-9]_.*" - faas-cli push -f ./stack.yml --tag sha - faas-cli push -f ./stack.yml --tag branch - faas-cli push -f ./stack.yml --tag describe`, + faas-cli push -f stack.yaml + faas-cli push -f stack.yaml --parallel 4 + faas-cli push -f stack.yaml --filter "*gif*" + faas-cli push -f stack.yaml --regex "fn[0-9]_.*" + faas-cli push -f stack.yaml --tag sha + faas-cli push -f stack.yaml --tag branch + faas-cli push -f stack.yaml --tag describe`, RunE: runPush, } diff --git a/commands/remove.go b/commands/remove.go index 1c2f1c88a..6ec995e23 100644 --- a/commands/remove.go +++ b/commands/remove.go @@ -17,7 +17,7 @@ func init() { // Setup flags that are used by multiple commands (variables defined in faas.go) removeCmd.Flags().StringVarP(&gateway, "gateway", "g", defaultGateway, "Gateway URL starting with http(s)://") removeCmd.Flags().BoolVar(&tlsInsecure, "tls-no-verify", false, "Disable TLS validation") - removeCmd.Flags().BoolVar(&envsubst, "envsubst", true, "Substitute environment variables in stack.yml file") + removeCmd.Flags().BoolVar(&envsubst, "envsubst", true, "Substitute environment variables in stack.yaml file") removeCmd.Flags().StringVarP(&token, "token", "k", "", "Pass a JWT token to use instead of basic auth") removeCmd.Flags().StringVarP(&functionNamespace, "namespace", "n", "", "Namespace of the function") @@ -34,9 +34,9 @@ var removeCmd = &cobra.Command{ using the "--yaml" flag (which may contain multiple function definitions), or by explicitly specifying a function name.`, Example: ` faas-cli remove -f https://domain/path/myfunctions.yml - faas-cli remove -f ./stack.yml - faas-cli remove -f ./stack.yml --filter "*gif*" - faas-cli remove -f ./stack.yml --regex "fn[0-9]_.*" + faas-cli remove -f stack.yaml + faas-cli remove -f stack.yaml --filter "*gif*" + faas-cli remove -f stack.yaml --regex "fn[0-9]_.*" faas-cli remove url-ping faas-cli remove img2ansi --gateway==http://remote-site.com:8080`, RunE: runDelete, diff --git a/commands/stack.yml b/commands/stack.yml deleted file mode 100644 index e9cbc1a21..000000000 --- a/commands/stack.yml +++ /dev/null @@ -1,50 +0,0 @@ -provider: - name: openfaas - gateway: http://127.0.0.1:8080 - -functions: - url-ping: - annotations: - test: true - labels: - com.openfaas.scale.min: 1 - com.openfaas.scale.max: 1 - lang: python - handler: ./sample/url-ping - image: ${DOCKER_USER:-alexellis2}/url-ping:0.3 - environment: - debug: true - # requests: - # memory: 32Mi - # limits: - # memory: 64Mi - - # skip_build is useful for deploying pre-existing images from stack.yml - stronghash: - skip_build: true - image: ghcr.io/openfaas/alpine:latest - fprocess: "sha512sum" - environment: - fprocess: sha512sum - secrets: - - test1 - - test2 - - nodejs-echo: - lang: node - handler: ./sample/nodejs-echo - image: ${DOCKER_USER:-alexellis2}/nodejs-echo:0.2 - - # Example usage: - # - # curl 127.0.0.1:8080/function/shrink-image --data-binary @big.png > smaller.png - shrink-image: - lang: dockerfile - handler: ./sample/imagemagick - image: ${DOCKER_USER:-alexellis2}/imagemagick-resizer:0.3 - fprocess: "convert - -resize 50% fd:1" - - ruby-echo: - lang: ruby - handler: ./sample/ruby-echo - image: ${DOCKER_USER:-alexellis2}/ruby-echo:0.3 \ No newline at end of file diff --git a/commands/version.go b/commands/version.go index 52c980026..f730193cb 100644 --- a/commands/version.go +++ b/commands/version.go @@ -29,7 +29,7 @@ func init() { versionCmd.Flags().BoolVar(&shortVersion, "short-version", false, "Just print Git SHA") versionCmd.Flags().StringVarP(&gateway, "gateway", "g", defaultGateway, "Gateway URL starting with http(s)://") versionCmd.Flags().BoolVar(&tlsInsecure, "tls-no-verify", false, "Disable TLS validation") - versionCmd.Flags().BoolVar(&envsubst, "envsubst", true, "Substitute environment variables in stack.yml file") + versionCmd.Flags().BoolVar(&envsubst, "envsubst", true, "Substitute environment variables in stack.yaml file") versionCmd.Flags().BoolVar(&warnUpdate, "warn-update", true, "Check for new version and warn about updating") diff --git a/commands/watch.go b/commands/watch.go index 80012af12..31cb9ca27 100644 --- a/commands/watch.go +++ b/commands/watch.go @@ -19,7 +19,7 @@ import ( "github.com/spf13/cobra" ) -// watchLoop will watch for changes to function handler files and the stack.yml +// watchLoop will watch for changes to function handler files and the stack.yaml // then call onChange when a change is detected func watchLoop(cmd *cobra.Command, args []string, onChange func(cmd *cobra.Command, args []string, ctx context.Context) error) error { diff --git a/deploy_samples.sh b/deploy_samples.sh deleted file mode 100755 index 2cb263fa2..000000000 --- a/deploy_samples.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh - -./faas-cli deploy --yaml ./stack.yml - -sleep 5 - -# Get sample image for resizer function. -curl -SL https://raw.githubusercontent.com/openfaas/faas/master/sample-functions/ResizeImageMagick/gordon.png > gordon.png - -echo "Testing nodejs-echo" -curl -sd "This was the input string." http://127.0.0.1:8080/function/nodejs-echo -echo - -echo "Testing url-ping" -curl -sd "https://shop.pimoroni.com" http://127.0.0.1:8080/function/url-ping -echo - -echo "Testing shrink-image" -curl -d "" http://127.0.0.1:8080/function/shrink-image --data-binary @gordon.png > small_gordon.png -echo diff --git a/go.mod b/go.mod index baf42d947..f6f1d11dd 100644 --- a/go.mod +++ b/go.mod @@ -1,24 +1,23 @@ module github.com/openfaas/faas-cli -go 1.23 +go 1.23.0 toolchain go1.23.3 require ( github.com/Masterminds/semver v1.5.0 - github.com/alexellis/arkade v0.0.0-20241106114343-b0cf2fbdb998 + github.com/alexellis/arkade v0.0.0-20250120150820-889135fd0412 github.com/alexellis/go-execute/v2 v2.2.1 - github.com/alexellis/hmac v1.3.0 github.com/alexellis/hmac/v2 v2.0.0 github.com/bep/debounce v1.2.1 github.com/drone/envsubst v1.0.3 github.com/fsnotify/fsnotify v1.8.0 - github.com/go-git/go-git/v5 v5.12.0 + github.com/go-git/go-git/v5 v5.13.2 github.com/google/go-cmp v0.6.0 - github.com/google/go-containerregistry v0.20.2 + github.com/google/go-containerregistry v0.20.3 github.com/mitchellh/go-homedir v1.1.0 github.com/mitchellh/go-wordwrap v1.0.1 - github.com/moby/term v0.5.0 + github.com/moby/term v0.5.2 github.com/morikuni/aec v1.0.0 github.com/openfaas/faas-provider v0.25.4 github.com/openfaas/faas/gateway v0.0.0-20241209094132-4e20249bc070 @@ -32,20 +31,20 @@ require ( ) require ( - github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect + github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c // indirect github.com/VividCortex/ewma v1.2.0 // indirect github.com/cheggaaa/pb/v3 v3.1.5 // indirect github.com/containerd/stargz-snapshotter/estargz v0.16.3 // indirect - github.com/docker/cli v27.4.1+incompatible // indirect + github.com/docker/cli v27.5.0+incompatible // indirect github.com/docker/distribution v2.8.3+incompatible // indirect github.com/docker/docker-credential-helpers v0.8.2 // indirect github.com/fatih/color v1.18.0 // indirect github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect - github.com/go-git/go-billy/v5 v5.6.0 // indirect + github.com/go-git/go-billy/v5 v5.6.2 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect github.com/klauspost/compress v1.17.11 // indirect - github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-colorable v0.1.14 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.16 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect @@ -53,9 +52,8 @@ require ( github.com/opencontainers/image-spec v1.1.0 // indirect github.com/rivo/uniseg v0.4.7 // indirect github.com/sirupsen/logrus v1.9.3 // indirect - github.com/stretchr/testify v1.10.0 // indirect - github.com/vbatts/tar-split v0.11.6 // indirect - golang.org/x/net v0.33.0 // indirect - golang.org/x/sys v0.28.0 // indirect + github.com/vbatts/tar-split v0.11.7 // indirect + golang.org/x/net v0.34.0 // indirect + golang.org/x/sys v0.29.0 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect ) diff --git a/go.sum b/go.sum index 7e59d39f2..e0adfc77a 100644 --- a/go.sum +++ b/go.sum @@ -1,15 +1,13 @@ -github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= -github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= +github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c h1:udKWzYgxTojEKWjV8V+WSxDXJ4NFATAsZjh8iIbsQIg= +github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/VividCortex/ewma v1.2.0 h1:f58SaIzcDXrSy3kWaHNvuJgJ3Nmz59Zji6XoJR/q1ow= github.com/VividCortex/ewma v1.2.0/go.mod h1:nz4BbCtbLyFDeC9SUHbtcT5644juEuWfUAUnGx7j5l4= -github.com/alexellis/arkade v0.0.0-20241106114343-b0cf2fbdb998 h1:Bv4+RuafrJMDniG5bpy7EB/nZ/gsN+al8PpulLvQL64= -github.com/alexellis/arkade v0.0.0-20241106114343-b0cf2fbdb998/go.mod h1:na4mIMGtiby6rjuzXMDtrmuGwaakDBntz52rSseKfkA= +github.com/alexellis/arkade v0.0.0-20250120150820-889135fd0412 h1:Mfz0UJqz+o6uECgt342uNEfabkrFJLGv6FSdiVFEuG8= +github.com/alexellis/arkade v0.0.0-20250120150820-889135fd0412/go.mod h1:Wk94jjYg7qrHZ2UMXPoF/mEUwen4bm3DYqW98nZe2vw= github.com/alexellis/go-execute/v2 v2.2.1 h1:4Ye3jiCKQarstODOEmqDSRCqxMHLkC92Bhse743RdOI= github.com/alexellis/go-execute/v2 v2.2.1/go.mod h1:FMdRnUTiFAmYXcv23txrp3VYZfLo24nMpiIneWgKHTQ= -github.com/alexellis/hmac v1.3.0 h1:DJl5wfuhwj2IjG9XRXzPY6bHZYrwrARFTotpxX3KS08= -github.com/alexellis/hmac v1.3.0/go.mod h1:WmZwlIfB7EQaDuiScnQoMSs3K+1UalW/7ExXP3Cc2zU= github.com/alexellis/hmac/v2 v2.0.0 h1:/sH/UJxDXPpJorUeg2DudeKSeUrWPF32Yamw2TiDoOQ= github.com/alexellis/hmac/v2 v2.0.0/go.mod h1:O7hZZgTfh5fp5+vAamzodZPlbw+aQK+nnrrJNHsEvL0= github.com/bep/debounce v1.2.1 h1:v67fRdBA9UQu2NhLFXrSg0Brw7CexQekrBwDMM8bzeY= @@ -24,8 +22,8 @@ github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/docker/cli v27.4.1+incompatible h1:VzPiUlRJ/xh+otB75gva3r05isHMo5wXDfPRi5/b4hI= -github.com/docker/cli v27.4.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/cli v27.5.0+incompatible h1:aMphQkcGtpHixwwhAXJT1rrK/detk2JIvDaFkLctbGM= +github.com/docker/cli v27.5.0+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk= github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker-credential-helpers v0.8.2 h1:bX3YxiGzFP5sOXWc3bTPEXdEaZSeVMrFgOr3T+zrFAo= @@ -38,15 +36,15 @@ github.com/fsnotify/fsnotify v1.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/ github.com/fsnotify/fsnotify v1.8.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic= -github.com/go-git/go-billy/v5 v5.6.0 h1:w2hPNtoehvJIxR00Vb4xX94qHQi/ApZfX+nBE2Cjio8= -github.com/go-git/go-billy/v5 v5.6.0/go.mod h1:sFDq7xD3fn3E0GOwUSZqHo9lrkmx8xJhA0ZrfvjBRGM= -github.com/go-git/go-git/v5 v5.12.0 h1:7Md+ndsjrzZxbddRDZjF14qK+NN56sy6wkqaVrjZtys= -github.com/go-git/go-git/v5 v5.12.0/go.mod h1:FTM9VKtnI2m65hNI/TenDDDnUf2Q9FHnXYjuz9i5OEY= +github.com/go-git/go-billy/v5 v5.6.2 h1:6Q86EsPXMa7c3YZ3aLAQsMA0VlWmy43r6FHqa/UNbRM= +github.com/go-git/go-billy/v5 v5.6.2/go.mod h1:rcFC2rAsp/erv7CMz9GczHcuD0D32fWzH+MJAU+jaUU= +github.com/go-git/go-git/v5 v5.13.2 h1:7O7xvsK7K+rZPKW6AQR1YyNhfywkv7B8/FsP3ki6Zv0= +github.com/go-git/go-git/v5 v5.13.2/go.mod h1:hWdW5P4YZRjmpGHwRH2v3zkWcNl6HeXaXQEMGb3NJ9A= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-containerregistry v0.20.2 h1:B1wPJ1SN/S7pB+ZAimcciVD+r+yV/l/DSArMxlbwseo= -github.com/google/go-containerregistry v0.20.2/go.mod h1:z38EKdKh4h7IP2gSfUUqEvalZBqs6AoLeWfUy34nQC8= +github.com/google/go-containerregistry v0.20.3 h1:oNx7IdTI936V8CQRveCjaxOiegWwvM7kqkbXTpyiovI= +github.com/google/go-containerregistry v0.20.3/go.mod h1:w00pIgBRDVUDFM6bq+Qx8lwNWK+cxgCuX1vd3PIBDNI= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= @@ -57,9 +55,8 @@ github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= -github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= -github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE= +github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= @@ -69,8 +66,8 @@ github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= -github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= -github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= +github.com/moby/term v0.5.2 h1:6qk3FJAFDs6i/q3W/pQ97SX192qKfZgGjCQqfCJkgzQ= +github.com/moby/term v0.5.2/go.mod h1:d3djjFCrjnB+fl8NJux+EJzu0msscUP+f8it8hPkFLc= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= @@ -107,20 +104,19 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/vbatts/tar-split v0.11.6 h1:4SjTW5+PU11n6fZenf2IPoV8/tz3AaYHMWjf23envGs= -github.com/vbatts/tar-split v0.11.6/go.mod h1:dqKNtesIOr2j2Qv3W/cHjnvk9I8+G7oAkFDFN6TCBEI= +github.com/vbatts/tar-split v0.11.7 h1:ixZ93pO/GmvaZw4Vq9OwmfZK/kc2zKdPfu0B+gYqs3U= +github.com/vbatts/tar-split v0.11.7/go.mod h1:eF6B6i6ftWQcDqEn3/iGFRFRo8cBIMSJVOpnNdfTMFA= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= -golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I= -golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4= +golang.org/x/net v0.34.0 h1:Mb7Mrk043xzHgnRM88suvJFwzVrRfHEHJEl5/71CKw0= +golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k= golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= -golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU= +golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/stack/schema.go b/stack/schema.go index fcaeca326..5ee87cb10 100644 --- a/stack/schema.go +++ b/stack/schema.go @@ -67,12 +67,12 @@ type Function struct { BuildSecrets map[string]string `yaml:"build_secrets,omitempty"` } -// Configuration for the stack.yml file +// Configuration for the stack.yaml file type Configuration struct { StackConfig StackConfiguration `yaml:"configuration"` } -// StackConfiguration for the overall stack.yml +// StackConfiguration for the overall stack.yaml type StackConfiguration struct { TemplateConfigs []TemplateSource `yaml:"templates"` diff --git a/vendor/github.com/Azure/go-ansiterm/osc_string_state.go b/vendor/github.com/Azure/go-ansiterm/osc_string_state.go index 593b10ab6..194d5e9c9 100644 --- a/vendor/github.com/Azure/go-ansiterm/osc_string_state.go +++ b/vendor/github.com/Azure/go-ansiterm/osc_string_state.go @@ -11,21 +11,13 @@ func (oscState oscStringState) Handle(b byte) (s state, e error) { return nextState, err } - switch { - case isOscStringTerminator(b): + // There are several control characters and sequences which can + // terminate an OSC string. Most of them are handled by the baseState + // handler. The ANSI_BEL character is a special case which behaves as a + // terminator only for an OSC string. + if b == ANSI_BEL { return oscState.parser.ground, nil } return oscState, nil } - -// See below for OSC string terminators for linux -// http://man7.org/linux/man-pages/man4/console_codes.4.html -func isOscStringTerminator(b byte) bool { - - if b == ANSI_BEL || b == 0x5C { - return true - } - - return false -} diff --git a/vendor/github.com/alexellis/arkade/pkg/get/get.go b/vendor/github.com/alexellis/arkade/pkg/get/get.go index c0784a9d4..c60cf281a 100644 --- a/vendor/github.com/alexellis/arkade/pkg/get/get.go +++ b/vendor/github.com/alexellis/arkade/pkg/get/get.go @@ -167,7 +167,7 @@ func (tool Tool) GetURL(os, arch, version string, quiet bool) (string, error) { if len(version) == 0 { if !quiet { - log.Printf("Looking up version for %s", tool.Name) + log.Printf("Looking up version for: %s", tool.Name) } var releaseType string diff --git a/vendor/github.com/alexellis/hmac/LICENSE b/vendor/github.com/alexellis/hmac/LICENSE deleted file mode 100644 index e547e747a..000000000 --- a/vendor/github.com/alexellis/hmac/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2017 Alex Ellis - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -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. diff --git a/vendor/github.com/alexellis/hmac/README.md b/vendor/github.com/alexellis/hmac/README.md deleted file mode 100644 index e190b39a8..000000000 --- a/vendor/github.com/alexellis/hmac/README.md +++ /dev/null @@ -1,32 +0,0 @@ -# hmac - -Validate HMAC in Golang. - -## Who uses it? - -[GitHub](https://developer.github.com/webhooks/securing/), Patreon and some other parties will use HMAC signing with their outgoing webhooks so that you can verify the webhook is from the expected sender. - -## How it works: - -HMAC uses a symmetric key that both sender/receiver share ahead of time. The sender will generate a hash when wanting to transmit a message - this data is sent along with the payload. The recipient will then sign payload with the shared key and if the hash matches then the payload is assumed to be from the sender. - -[Read more on Wikipedia](https://en.wikipedia.org/wiki/HMAC) - -# Documentation - -[![](https://godoc.org/github.com/alexellis/hmac?status.svg)](http://godoc.org/github.com/alexellis/hmac) - -## Example: - -``` -import "github.com/alexellis/hmac" - -... -var input []byte -var signature string -var secret string - -valid := hmac.Validate(input, signature, secret) - -fmt.Printf("Valid HMAC? %t\n") -``` diff --git a/vendor/github.com/alexellis/hmac/pkg.go b/vendor/github.com/alexellis/hmac/pkg.go deleted file mode 100644 index e10a37470..000000000 --- a/vendor/github.com/alexellis/hmac/pkg.go +++ /dev/null @@ -1,58 +0,0 @@ -package hmac - -import ( - "crypto/hmac" - "crypto/sha1" - "encoding/hex" - "fmt" -) - -// CheckMAC verifies hash checksum -func CheckMAC(message, messageMAC, key []byte) bool { - mac := hmac.New(sha1.New, key) - mac.Write(message) - expectedMAC := mac.Sum(nil) - - return hmac.Equal(messageMAC, expectedMAC) -} - -// Sign a message with the key and return bytes. -// Note: for human readable output see encoding/hex and -// encode string functions. -func Sign(message, key []byte) []byte { - mac := hmac.New(sha1.New, key) - mac.Write(message) - signed := mac.Sum(nil) - return signed -} - -// Validate validate an encodedHash taken -// from GitHub via X-Hub-Signature HTTP Header. -// Note: if using another source, just add a 5 letter prefix such as "sha1=" -func Validate(bytesIn []byte, encodedHash string, secretKey string) error { - var validated error - - if len(encodedHash) > 5 { - - hashingMethod := encodedHash[:5] - if hashingMethod != "sha1=" { - return fmt.Errorf("unexpected hashing method: %s", hashingMethod) - } - - messageMAC := encodedHash[5:] // first few chars are: sha1= - messageMACBuf, _ := hex.DecodeString(messageMAC) - - res := CheckMAC(bytesIn, []byte(messageMACBuf), []byte(secretKey)) - if res == false { - validated = fmt.Errorf("invalid message digest or secret") - } - } else { - return fmt.Errorf("invalid encodedHash, should have at least 5 characters") - } - - return validated -} - -func init() { - -} diff --git a/vendor/github.com/go-git/go-git/v5/plumbing/format/gitignore/dir.go b/vendor/github.com/go-git/go-git/v5/plumbing/format/gitignore/dir.go index aca5d0dbd..92df5a3de 100644 --- a/vendor/github.com/go-git/go-git/v5/plumbing/format/gitignore/dir.go +++ b/vendor/github.com/go-git/go-git/v5/plumbing/format/gitignore/dir.go @@ -64,6 +64,10 @@ func ReadPatterns(fs billy.Filesystem, path []string) (ps []Pattern, err error) for _, fi := range fis { if fi.IsDir() && fi.Name() != gitDir { + if NewMatcher(ps).Match(append(path, fi.Name()), true) { + continue + } + var subps []Pattern subps, err = ReadPatterns(fs, append(path, fi.Name())) if err != nil { diff --git a/vendor/github.com/google/go-containerregistry/internal/redact/redact.go b/vendor/github.com/google/go-containerregistry/internal/redact/redact.go index b2e3f186c..6d4757007 100644 --- a/vendor/github.com/google/go-containerregistry/internal/redact/redact.go +++ b/vendor/github.com/google/go-containerregistry/internal/redact/redact.go @@ -51,7 +51,7 @@ func Error(err error) error { if perr != nil { return err // If the URL can't be parsed, just return the original error. } - uerr.URL = URL(u).String() // Update the URL to the redacted URL. + uerr.URL = URL(u) // Update the URL to the redacted URL. return uerr } @@ -73,7 +73,7 @@ var paramAllowlist = map[string]struct{}{ } // URL redacts potentially sensitive query parameter values from the URL's query string. -func URL(u *url.URL) *url.URL { +func URL(u *url.URL) string { qs := u.Query() for k, v := range qs { for i := range v { @@ -85,5 +85,5 @@ func URL(u *url.URL) *url.URL { } r := *u r.RawQuery = qs.Encode() - return &r + return r.Redacted() } diff --git a/vendor/github.com/google/go-containerregistry/pkg/authn/keychain.go b/vendor/github.com/google/go-containerregistry/pkg/authn/keychain.go index f4c452bdc..6e8814d80 100644 --- a/vendor/github.com/google/go-containerregistry/pkg/authn/keychain.go +++ b/vendor/github.com/google/go-containerregistry/pkg/authn/keychain.go @@ -84,7 +84,7 @@ func (dk *defaultKeychain) Resolve(target Resource) (Authenticator, error) { } // Resolve implements Keychain. -func (dk *defaultKeychain) ResolveContext(ctx context.Context, target Resource) (Authenticator, error) { +func (dk *defaultKeychain) ResolveContext(_ context.Context, target Resource) (Authenticator, error) { dk.mu.Lock() defer dk.mu.Unlock() @@ -204,7 +204,7 @@ func (w wrapper) Resolve(r Resource) (Authenticator, error) { return w.ResolveContext(context.Background(), r) } -func (w wrapper) ResolveContext(ctx context.Context, r Resource) (Authenticator, error) { +func (w wrapper) ResolveContext(_ context.Context, r Resource) (Authenticator, error) { u, p, err := w.h.Get(r.RegistryStr()) if err != nil { return Anonymous, nil diff --git a/vendor/github.com/google/go-containerregistry/pkg/crane/append.go b/vendor/github.com/google/go-containerregistry/pkg/crane/append.go index f1c2ef69a..0997322df 100644 --- a/vendor/github.com/google/go-containerregistry/pkg/crane/append.go +++ b/vendor/github.com/google/go-containerregistry/pkg/crane/append.go @@ -18,7 +18,9 @@ import ( "fmt" "os" + comp "github.com/google/go-containerregistry/internal/compression" "github.com/google/go-containerregistry/internal/windows" + "github.com/google/go-containerregistry/pkg/compression" v1 "github.com/google/go-containerregistry/pkg/v1" "github.com/google/go-containerregistry/pkg/v1/mutate" "github.com/google/go-containerregistry/pkg/v1/stream" @@ -50,13 +52,11 @@ func Append(base v1.Image, paths ...string) (v1.Image, error) { } baseMediaType, err := base.MediaType() - if err != nil { return nil, fmt.Errorf("getting base image media type: %w", err) } layerType := types.DockerLayer - if baseMediaType == types.OCIManifestSchema1 { layerType = types.OCILayer } @@ -90,6 +90,21 @@ func getLayer(path string, layerType types.MediaType) (v1.Layer, error) { return stream.NewLayer(f, stream.WithMediaType(layerType)), nil } + // This is dumb but the tarball package assumes things about mediaTypes that aren't true + // and doesn't have enough context to know what the right default is. + f, err = os.Open(path) + if err != nil { + return nil, err + } + defer f.Close() + z, _, err := comp.PeekCompression(f) + if err != nil { + return nil, err + } + if z == compression.ZStd { + layerType = types.OCILayerZStd + } + return tarball.LayerFromFile(path, tarball.WithMediaType(layerType)) } diff --git a/vendor/github.com/google/go-containerregistry/pkg/name/ref.go b/vendor/github.com/google/go-containerregistry/pkg/name/ref.go index 912ab3301..0a0486772 100644 --- a/vendor/github.com/google/go-containerregistry/pkg/name/ref.go +++ b/vendor/github.com/google/go-containerregistry/pkg/name/ref.go @@ -44,7 +44,7 @@ func ParseReference(s string, opts ...Option) (Reference, error) { if d, err := NewDigest(s, opts...); err == nil { return d, nil } - return nil, newErrBadName("could not parse reference: " + s) + return nil, newErrBadName("could not parse reference: %s", s) } type stringConst string diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/mutate/mutate.go b/vendor/github.com/google/go-containerregistry/pkg/v1/mutate/mutate.go index 1a24b10d7..4207740c3 100644 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/mutate/mutate.go +++ b/vendor/github.com/google/go-containerregistry/pkg/v1/mutate/mutate.go @@ -21,6 +21,7 @@ import ( "errors" "fmt" "io" + "maps" "path/filepath" "strings" "time" @@ -165,16 +166,16 @@ func Annotations(f partial.WithRawManifest, anns map[string]string) partial.With if img, ok := f.(v1.Image); ok { return &image{ base: img, - annotations: anns, + annotations: maps.Clone(anns), } } if idx, ok := f.(v1.ImageIndex); ok { return &index{ base: idx, - annotations: anns, + annotations: maps.Clone(anns), } } - return arbitraryRawManifest{a: f, anns: anns} + return arbitraryRawManifest{a: f, anns: maps.Clone(anns)} } type arbitraryRawManifest struct { diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/referrers.go b/vendor/github.com/google/go-containerregistry/pkg/v1/remote/referrers.go index 48e3835f9..4bc6f70a8 100644 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/referrers.go +++ b/vendor/github.com/google/go-containerregistry/pkg/v1/remote/referrers.go @@ -61,7 +61,7 @@ func (f *fetcher) fetchReferrers(ctx context.Context, filter map[string]string, } defer resp.Body.Close() - if err := transport.CheckError(resp, http.StatusOK, http.StatusNotFound, http.StatusBadRequest); err != nil { + if err := transport.CheckError(resp, http.StatusOK, http.StatusNotFound, http.StatusBadRequest, http.StatusNotAcceptable); err != nil { return nil, err } diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/bearer.go b/vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/bearer.go index be3bec9c3..ea652d4ae 100644 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/bearer.go +++ b/vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/bearer.go @@ -24,8 +24,10 @@ import ( "net/http" "net/url" "strings" + "sync" authchallenge "github.com/docker/distribution/registry/client/auth/challenge" + "github.com/google/go-containerregistry/internal/redact" "github.com/google/go-containerregistry/pkg/authn" "github.com/google/go-containerregistry/pkg/logs" @@ -98,6 +100,7 @@ func fromChallenge(reg name.Registry, auth authn.Authenticator, t http.RoundTrip } type bearerTransport struct { + mx sync.RWMutex // Wrapped by bearerTransport. inner http.RoundTripper // Basic credentials that we exchange for bearer tokens. @@ -139,7 +142,10 @@ func (bt *bearerTransport) RoundTrip(in *http.Request) (*http.Response, error) { // the registry with which we are interacting. // In case of redirect http.Client can use an empty Host, check URL too. if matchesHost(bt.registry.RegistryStr(), in, bt.scheme) { - hdr := fmt.Sprintf("Bearer %s", bt.bearer.RegistryToken) + bt.mx.RLock() + localToken := bt.bearer.RegistryToken + bt.mx.RUnlock() + hdr := fmt.Sprintf("Bearer %s", localToken) in.Header.Set("Authorization", hdr) } return bt.inner.RoundTrip(in) @@ -156,11 +162,12 @@ func (bt *bearerTransport) RoundTrip(in *http.Request) (*http.Response, error) { res.Body.Close() newScopes := []string{} + bt.mx.Lock() + got := stringSet(bt.scopes) for _, wac := range challenges { // TODO(jonjohnsonjr): Should we also update "realm" or "service"? if want, ok := wac.Parameters["scope"]; ok { // Add any scopes that we don't already request. - got := stringSet(bt.scopes) if _, ok := got[want]; !ok { newScopes = append(newScopes, want) } @@ -172,6 +179,7 @@ func (bt *bearerTransport) RoundTrip(in *http.Request) (*http.Response, error) { // otherwise the registry might just ignore it :/ newScopes = append(newScopes, bt.scopes...) bt.scopes = newScopes + bt.mx.Unlock() // TODO(jonjohnsonjr): Teach transport.Error about "error" and "error_description" from challenge. @@ -196,7 +204,9 @@ func (bt *bearerTransport) refresh(ctx context.Context) error { } if auth.RegistryToken != "" { + bt.mx.Lock() bt.bearer.RegistryToken = auth.RegistryToken + bt.mx.Unlock() return nil } @@ -212,7 +222,9 @@ func (bt *bearerTransport) refresh(ctx context.Context) error { // Find a token to turn into a Bearer authenticator if response.Token != "" { + bt.mx.Lock() bt.bearer.RegistryToken = response.Token + bt.mx.Unlock() } // If we obtained a refresh token from the oauth flow, use that for refresh() now. @@ -306,7 +318,9 @@ func (bt *bearerTransport) refreshOauth(ctx context.Context) ([]byte, error) { } v := url.Values{} + bt.mx.RLock() v.Set("scope", strings.Join(bt.scopes, " ")) + bt.mx.RUnlock() if bt.service != "" { v.Set("service", bt.service) } @@ -362,7 +376,9 @@ func (bt *bearerTransport) refreshBasic(ctx context.Context) ([]byte, error) { client := http.Client{Transport: b} v := u.Query() + bt.mx.RLock() v["scope"] = bt.scopes + bt.mx.RUnlock() v.Set("service", bt.service) u.RawQuery = v.Encode() diff --git a/vendor/github.com/mattn/go-colorable/colorable_appengine.go b/vendor/github.com/mattn/go-colorable/colorable_appengine.go deleted file mode 100644 index 416d1bbbf..000000000 --- a/vendor/github.com/mattn/go-colorable/colorable_appengine.go +++ /dev/null @@ -1,38 +0,0 @@ -//go:build appengine -// +build appengine - -package colorable - -import ( - "io" - "os" - - _ "github.com/mattn/go-isatty" -) - -// NewColorable returns new instance of Writer which handles escape sequence. -func NewColorable(file *os.File) io.Writer { - if file == nil { - panic("nil passed instead of *os.File to NewColorable()") - } - - return file -} - -// NewColorableStdout returns new instance of Writer which handles escape sequence for stdout. -func NewColorableStdout() io.Writer { - return os.Stdout -} - -// NewColorableStderr returns new instance of Writer which handles escape sequence for stderr. -func NewColorableStderr() io.Writer { - return os.Stderr -} - -// EnableColorsStdout enable colors if possible. -func EnableColorsStdout(enabled *bool) func() { - if enabled != nil { - *enabled = true - } - return func() {} -} diff --git a/vendor/github.com/mattn/go-colorable/colorable_others.go b/vendor/github.com/mattn/go-colorable/colorable_others.go index 766d94603..c1a78aa94 100644 --- a/vendor/github.com/mattn/go-colorable/colorable_others.go +++ b/vendor/github.com/mattn/go-colorable/colorable_others.go @@ -1,5 +1,5 @@ -//go:build !windows && !appengine -// +build !windows,!appengine +//go:build !windows || appengine +// +build !windows appengine package colorable diff --git a/vendor/github.com/mattn/go-colorable/colorable_windows.go b/vendor/github.com/mattn/go-colorable/colorable_windows.go index 1846ad5ab..2df7b8598 100644 --- a/vendor/github.com/mattn/go-colorable/colorable_windows.go +++ b/vendor/github.com/mattn/go-colorable/colorable_windows.go @@ -11,7 +11,7 @@ import ( "strconv" "strings" "sync" - "syscall" + syscall "golang.org/x/sys/windows" "unsafe" "github.com/mattn/go-isatty" @@ -73,7 +73,7 @@ type consoleCursorInfo struct { } var ( - kernel32 = syscall.NewLazyDLL("kernel32.dll") + kernel32 = syscall.NewLazySystemDLL("kernel32.dll") procGetConsoleScreenBufferInfo = kernel32.NewProc("GetConsoleScreenBufferInfo") procSetConsoleTextAttribute = kernel32.NewProc("SetConsoleTextAttribute") procSetConsoleCursorPosition = kernel32.NewProc("SetConsoleCursorPosition") @@ -87,8 +87,8 @@ var ( procCreateConsoleScreenBuffer = kernel32.NewProc("CreateConsoleScreenBuffer") ) -// Writer provides colorable Writer to the console -type Writer struct { +// writer provides colorable Writer to the console +type writer struct { out io.Writer handle syscall.Handle althandle syscall.Handle @@ -98,7 +98,7 @@ type Writer struct { mutex sync.Mutex } -// NewColorable returns new instance of Writer which handles escape sequence from File. +// NewColorable returns new instance of writer which handles escape sequence from File. func NewColorable(file *os.File) io.Writer { if file == nil { panic("nil passed instead of *os.File to NewColorable()") @@ -112,17 +112,17 @@ func NewColorable(file *os.File) io.Writer { var csbi consoleScreenBufferInfo handle := syscall.Handle(file.Fd()) procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi))) - return &Writer{out: file, handle: handle, oldattr: csbi.attributes, oldpos: coord{0, 0}} + return &writer{out: file, handle: handle, oldattr: csbi.attributes, oldpos: coord{0, 0}} } return file } -// NewColorableStdout returns new instance of Writer which handles escape sequence for stdout. +// NewColorableStdout returns new instance of writer which handles escape sequence for stdout. func NewColorableStdout() io.Writer { return NewColorable(os.Stdout) } -// NewColorableStderr returns new instance of Writer which handles escape sequence for stderr. +// NewColorableStderr returns new instance of writer which handles escape sequence for stderr. func NewColorableStderr() io.Writer { return NewColorable(os.Stderr) } @@ -434,7 +434,7 @@ func atoiWithDefault(s string, def int) (int, error) { } // Write writes data on console -func (w *Writer) Write(data []byte) (n int, err error) { +func (w *writer) Write(data []byte) (n int, err error) { w.mutex.Lock() defer w.mutex.Unlock() var csbi consoleScreenBufferInfo @@ -560,7 +560,7 @@ loop: } procSetConsoleCursorPosition.Call(uintptr(handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition))) case 'E': - n, err = strconv.Atoi(buf.String()) + n, err = atoiWithDefault(buf.String(), 1) if err != nil { continue } @@ -569,7 +569,7 @@ loop: csbi.cursorPosition.y += short(n) procSetConsoleCursorPosition.Call(uintptr(handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition))) case 'F': - n, err = strconv.Atoi(buf.String()) + n, err = atoiWithDefault(buf.String(), 1) if err != nil { continue } diff --git a/vendor/github.com/moby/term/term_unix.go b/vendor/github.com/moby/term/term_unix.go index 2ec7706a1..579ce5530 100644 --- a/vendor/github.com/moby/term/term_unix.go +++ b/vendor/github.com/moby/term/term_unix.go @@ -81,7 +81,7 @@ func setRawTerminal(fd uintptr) (*State, error) { return makeRaw(fd) } -func setRawTerminalOutput(fd uintptr) (*State, error) { +func setRawTerminalOutput(uintptr) (*State, error) { return nil, nil } diff --git a/vendor/github.com/vbatts/tar-split/archive/tar/format.go b/vendor/github.com/vbatts/tar-split/archive/tar/format.go index 1f89d0c59..60977980c 100644 --- a/vendor/github.com/vbatts/tar-split/archive/tar/format.go +++ b/vendor/github.com/vbatts/tar-split/archive/tar/format.go @@ -143,6 +143,10 @@ const ( blockSize = 512 // Size of each block in a tar stream nameSize = 100 // Max length of the name field in USTAR format prefixSize = 155 // Max length of the prefix field in USTAR format + + // Max length of a special file (PAX header, GNU long name or link). + // This matches the limit used by libarchive. + maxSpecialFileSize = 1 << 20 ) // blockPadding computes the number of bytes needed to pad offset up to the diff --git a/vendor/github.com/vbatts/tar-split/archive/tar/reader.go b/vendor/github.com/vbatts/tar-split/archive/tar/reader.go index 6a6b3e018..248a7ccb1 100644 --- a/vendor/github.com/vbatts/tar-split/archive/tar/reader.go +++ b/vendor/github.com/vbatts/tar-split/archive/tar/reader.go @@ -144,7 +144,7 @@ func (tr *Reader) next() (*Header, error) { continue // This is a meta header affecting the next header case TypeGNULongName, TypeGNULongLink: format.mayOnlyBe(FormatGNU) - realname, err := io.ReadAll(tr) + realname, err := readSpecialFile(tr) if err != nil { return nil, err } @@ -338,7 +338,7 @@ func mergePAX(hdr *Header, paxHdrs map[string]string) (err error) { // parsePAX parses PAX headers. // If an extended header (type 'x') is invalid, ErrHeader is returned func parsePAX(r io.Reader) (map[string]string, error) { - buf, err := io.ReadAll(r) + buf, err := readSpecialFile(r) if err != nil { return nil, err } @@ -889,6 +889,16 @@ func tryReadFull(r io.Reader, b []byte) (n int, err error) { return n, err } +// readSpecialFile is like io.ReadAll except it returns +// ErrFieldTooLong if more than maxSpecialFileSize is read. +func readSpecialFile(r io.Reader) ([]byte, error) { + buf, err := io.ReadAll(io.LimitReader(r, maxSpecialFileSize+1)) + if len(buf) > maxSpecialFileSize { + return nil, ErrFieldTooLong + } + return buf, err +} + // discard skips n bytes in r, reporting an error if unable to do so. func discard(tr *Reader, n int64) error { var seekSkipped, copySkipped int64 diff --git a/vendor/golang.org/x/sys/unix/syscall_dragonfly.go b/vendor/golang.org/x/sys/unix/syscall_dragonfly.go index 97cb916f2..be8c00207 100644 --- a/vendor/golang.org/x/sys/unix/syscall_dragonfly.go +++ b/vendor/golang.org/x/sys/unix/syscall_dragonfly.go @@ -246,6 +246,18 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e return sendfile(outfd, infd, offset, count) } +func Dup3(oldfd, newfd, flags int) error { + if oldfd == newfd || flags&^O_CLOEXEC != 0 { + return EINVAL + } + how := F_DUP2FD + if flags&O_CLOEXEC != 0 { + how = F_DUP2FD_CLOEXEC + } + _, err := fcntl(oldfd, how, newfd) + return err +} + /* * Exposed directly */ diff --git a/vendor/golang.org/x/sys/windows/dll_windows.go b/vendor/golang.org/x/sys/windows/dll_windows.go index 4e613cf63..3ca814f54 100644 --- a/vendor/golang.org/x/sys/windows/dll_windows.go +++ b/vendor/golang.org/x/sys/windows/dll_windows.go @@ -43,8 +43,8 @@ type DLL struct { // LoadDLL loads DLL file into memory. // // Warning: using LoadDLL without an absolute path name is subject to -// DLL preloading attacks. To safely load a system DLL, use LazyDLL -// with System set to true, or use LoadLibraryEx directly. +// DLL preloading attacks. To safely load a system DLL, use [NewLazySystemDLL], +// or use [LoadLibraryEx] directly. func LoadDLL(name string) (dll *DLL, err error) { namep, err := UTF16PtrFromString(name) if err != nil { @@ -271,6 +271,9 @@ func (d *LazyDLL) NewProc(name string) *LazyProc { } // NewLazyDLL creates new LazyDLL associated with DLL file. +// +// Warning: using NewLazyDLL without an absolute path name is subject to +// DLL preloading attacks. To safely load a system DLL, use [NewLazySystemDLL]. func NewLazyDLL(name string) *LazyDLL { return &LazyDLL{Name: name} } @@ -410,7 +413,3 @@ func loadLibraryEx(name string, system bool) (*DLL, error) { } return &DLL{Name: name, Handle: h}, nil } - -type errString string - -func (s errString) Error() string { return string(s) } diff --git a/vendor/modules.txt b/vendor/modules.txt index 6b0653917..2caf73581 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1,4 +1,4 @@ -# github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 +# github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c ## explicit; go 1.16 github.com/Azure/go-ansiterm github.com/Azure/go-ansiterm/winterm @@ -8,8 +8,8 @@ github.com/Masterminds/semver # github.com/VividCortex/ewma v1.2.0 ## explicit; go 1.12 github.com/VividCortex/ewma -# github.com/alexellis/arkade v0.0.0-20241106114343-b0cf2fbdb998 -## explicit; go 1.22.0 +# github.com/alexellis/arkade v0.0.0-20250120150820-889135fd0412 +## explicit; go 1.23.0 github.com/alexellis/arkade/pkg github.com/alexellis/arkade/pkg/archive github.com/alexellis/arkade/pkg/config @@ -18,9 +18,6 @@ github.com/alexellis/arkade/pkg/get # github.com/alexellis/go-execute/v2 v2.2.1 ## explicit; go 1.20 github.com/alexellis/go-execute/v2 -# github.com/alexellis/hmac v1.3.0 -## explicit; go 1.16 -github.com/alexellis/hmac # github.com/alexellis/hmac/v2 v2.0.0 ## explicit; go 1.16 github.com/alexellis/hmac/v2 @@ -35,7 +32,7 @@ github.com/cheggaaa/pb/v3/termutil ## explicit; go 1.22.0 github.com/containerd/stargz-snapshotter/estargz github.com/containerd/stargz-snapshotter/estargz/errorutil -# github.com/docker/cli v27.4.1+incompatible +# github.com/docker/cli v27.5.0+incompatible ## explicit github.com/docker/cli/cli/config github.com/docker/cli/cli/config/configfile @@ -66,11 +63,11 @@ github.com/go-git/gcfg github.com/go-git/gcfg/scanner github.com/go-git/gcfg/token github.com/go-git/gcfg/types -# github.com/go-git/go-billy/v5 v5.6.0 -## explicit; go 1.20 +# github.com/go-git/go-billy/v5 v5.6.2 +## explicit; go 1.21 github.com/go-git/go-billy/v5 -# github.com/go-git/go-git/v5 v5.12.0 -## explicit; go 1.19 +# github.com/go-git/go-git/v5 v5.13.2 +## explicit; go 1.21 github.com/go-git/go-git/v5/internal/path_util github.com/go-git/go-git/v5/plumbing/format/config github.com/go-git/go-git/v5/plumbing/format/gitignore @@ -82,8 +79,8 @@ github.com/google/go-cmp/cmp/internal/diff github.com/google/go-cmp/cmp/internal/flags github.com/google/go-cmp/cmp/internal/function github.com/google/go-cmp/cmp/internal/value -# github.com/google/go-containerregistry v0.20.2 -## explicit; go 1.18 +# github.com/google/go-containerregistry v0.20.3 +## explicit; go 1.23.0 github.com/google/go-containerregistry/internal/and github.com/google/go-containerregistry/internal/compression github.com/google/go-containerregistry/internal/estargz @@ -127,8 +124,10 @@ github.com/klauspost/compress/internal/cpuinfo github.com/klauspost/compress/internal/snapref github.com/klauspost/compress/zstd github.com/klauspost/compress/zstd/internal/xxhash -# github.com/mattn/go-colorable v0.1.13 -## explicit; go 1.15 +# github.com/magefile/mage v1.14.0 +## explicit; go 1.12 +# github.com/mattn/go-colorable v0.1.14 +## explicit; go 1.18 github.com/mattn/go-colorable # github.com/mattn/go-isatty v0.0.20 ## explicit; go 1.15 @@ -142,7 +141,7 @@ github.com/mitchellh/go-homedir # github.com/mitchellh/go-wordwrap v1.0.1 ## explicit; go 1.14 github.com/mitchellh/go-wordwrap -# github.com/moby/term v0.5.0 +# github.com/moby/term v0.5.2 ## explicit; go 1.18 github.com/moby/term github.com/moby/term/windows @@ -189,18 +188,16 @@ github.com/spf13/cobra # github.com/spf13/pflag v1.0.5 ## explicit; go 1.12 github.com/spf13/pflag -# github.com/stretchr/testify v1.10.0 -## explicit; go 1.17 -# github.com/vbatts/tar-split v0.11.6 +# github.com/vbatts/tar-split v0.11.7 ## explicit; go 1.17 github.com/vbatts/tar-split/archive/tar -# golang.org/x/net v0.33.0 +# golang.org/x/net v0.34.0 ## explicit; go 1.18 golang.org/x/net/context # golang.org/x/sync v0.10.0 ## explicit; go 1.18 golang.org/x/sync/errgroup -# golang.org/x/sys v0.28.0 +# golang.org/x/sys v0.29.0 ## explicit; go 1.18 golang.org/x/sys/unix golang.org/x/sys/windows