@cryptotaxi247 / kubo / commits / eb97cf9e5

chore: bump to go-ipfs-cmds @ v0.11

Henrique Dias committed Apr 17, 2024 at 07:47 UTC eb97cf9e57ed95a0b4c1d6e0d6d60c8dc6b01e67
4 files changed +14 -13
core/corehttp/commands.go
+3 -2
@@ -124,9 +124,10 @@ func patchCORSVars(c *cmdsHttp.ServerConfig, addr net.Addr) {
124 func commandsOption(cctx oldcmds.Context, command *cmds.Command) ServeOption {
125 return func(n *core.IpfsNode, l net.Listener, mux *http.ServeMux) (*http.ServeMux, error) {
126 cfg := cmdsHttp.NewServerConfig()
127 - corsAllowedMethods := []string{http.MethodPost}
127
129 - cfg.SetAllowedMethods(corsAllowedMethods...)
128 + cfg.AddAllowedHeaders("Origin", "Accept", "Content-Type", "X-Requested-With")
129 + cfg.SetAllowedMethods(http.MethodPost)
130 +
131 cfg.APIPath = APIPath
132 rcfg, err := n.Repo.Config()
133 if err != nil {
go.mod
+3 -3
@@ -28,7 +28,7 @@ require (
28 github.com/ipfs/go-ds-leveldb v0.5.0
29 github.com/ipfs/go-ds-measure v0.2.0
30 github.com/ipfs/go-fs-lock v0.0.7
31 - github.com/ipfs/go-ipfs-cmds v0.10.0
31 + github.com/ipfs/go-ipfs-cmds v0.11.0
32 github.com/ipfs/go-ipld-cbor v0.1.0
33 github.com/ipfs/go-ipld-format v0.6.0
34 github.com/ipfs/go-ipld-git v0.1.1
@@ -207,10 +207,10 @@ require (
207 github.com/quic-go/quic-go v0.42.0 // indirect
208 github.com/quic-go/webtransport-go v0.7.0 // indirect
209 github.com/raulk/go-watchdog v1.3.0 // indirect
210 - github.com/rs/cors v1.7.0 // indirect
210 + github.com/rs/cors v1.10.1 // indirect
211 github.com/samber/lo v1.39.0 // indirect
212 github.com/spaolacci/murmur3 v1.1.0 // indirect
213 - github.com/texttheater/golang-levenshtein v0.0.0-20180516184445-d188e65d659e // indirect
213 + github.com/texttheater/golang-levenshtein v1.0.1 // indirect
214 github.com/tidwall/match v1.1.1 // indirect
215 github.com/tidwall/pretty v1.2.0 // indirect
216 github.com/ucarion/urlpath v0.0.0-20200424170820-7ccc79b76bbb // indirect
go.sum
+6 -6
@@ -374,8 +374,8 @@ github.com/ipfs/go-ipfs-blocksutil v0.0.1 h1:Eh/H4pc1hsvhzsQoMEP3Bke/aW5P5rVM1IW
374 github.com/ipfs/go-ipfs-blocksutil v0.0.1/go.mod h1:Yq4M86uIOmxmGPUHv/uI7uKqZNtLb449gwKqXjIsnRk=
375 github.com/ipfs/go-ipfs-chunker v0.0.5 h1:ojCf7HV/m+uS2vhUGWcogIIxiO5ubl5O57Q7NapWLY8=
376 github.com/ipfs/go-ipfs-chunker v0.0.5/go.mod h1:jhgdF8vxRHycr00k13FM8Y0E+6BoalYeobXmUyTreP8=
377 -github.com/ipfs/go-ipfs-cmds v0.10.0 h1:ZB4+RgYaH4UARfJY0uLKl5UXgApqnRjKbuCiJVcErYk=
378 -github.com/ipfs/go-ipfs-cmds v0.10.0/go.mod h1:sX5d7jkCft9XLPnkgEfXY0z2UBOB5g6fh/obBS0enJE=
377 +github.com/ipfs/go-ipfs-cmds v0.11.0 h1:6AsTKwbVxwzrOkq2x89e6jYMGxzYqjt/WbAam69HZQE=
378 +github.com/ipfs/go-ipfs-cmds v0.11.0/go.mod h1:DHp7YfJlOK+2IS07nk+hFmbKHK52tc29W38CaAgWHpk=
379 github.com/ipfs/go-ipfs-delay v0.0.0-20181109222059-70721b86a9a8/go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw=
380 github.com/ipfs/go-ipfs-delay v0.0.1 h1:r/UXYyRcddO6thwOnhiznIAiSvxMECGgtv35Xs1IeRQ=
381 github.com/ipfs/go-ipfs-delay v0.0.1/go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw=
@@ -793,8 +793,8 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR
793 github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
794 github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ=
795 github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog=
796 -github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik=
797 -github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU=
796 +github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo=
797 +github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU=
798 github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
799 github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
800 github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd/go.mod h1:hPqNNc0+uJM6H+SuU8sEs5K5IQeKccPqeSjfgcKGgPk=
@@ -873,8 +873,8 @@ github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpP
873 github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY=
874 github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc=
875 github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA=
876 -github.com/texttheater/golang-levenshtein v0.0.0-20180516184445-d188e65d659e h1:T5PdfK/M1xyrHwynxMIVMWLS7f/qHwfslZphxtGnw7s=
877 -github.com/texttheater/golang-levenshtein v0.0.0-20180516184445-d188e65d659e/go.mod h1:XDKHRm5ThF8YJjx001LtgelzsoaEcvnA7lVWz9EeX3g=
876 +github.com/texttheater/golang-levenshtein v1.0.1 h1:+cRNoVrfiwufQPhoMzB6N0Yf/Mqajr6t1lOv8GyGE2U=
877 +github.com/texttheater/golang-levenshtein v1.0.1/go.mod h1:PYAKrbF5sAiq9wd+H82hs7gNaen0CplQ9uvm6+enD/8=
878 github.com/tidwall/gjson v1.14.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
879 github.com/tidwall/gjson v1.14.4 h1:uo0p8EbA09J7RQaflQ1aBRffTR7xedD2bcIVSYxLnkM=
880 github.com/tidwall/gjson v1.14.4/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
test/sharness/t0150-clisuggest.sh
+2 -2
@@ -18,13 +18,13 @@ test_suggest() {
18 '
19
20 test_expect_success "test command fails" '
21 - test_must_fail ipfs lis 2>actual
21 + test_must_fail ipfs li 2>actual
22 '
23
24 test_expect_success "test multiple commands are suggested" '
25 grep "Did you mean any of these?" actual &&
26 grep "ls" actual &&
27 - grep "id" actual ||
27 + grep "log" actual ||
28 test_fsh cat actual
29 '
30