Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

v0.18.5 #153

Merged
merged 27 commits into from
May 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
430f755
Bump golang.org/x/tools from 0.1.9 to 0.1.10
dependabot[bot] Mar 16, 2022
baff123
Bump github.com/stretchr/testify from 1.7.0 to 1.7.1
dependabot[bot] Mar 17, 2022
1a8e885
Bump github.com/gobuffalo/buffalo-pop/v3 from 3.0.2 to 3.0.3
dependabot[bot] Mar 18, 2022
d12b7c5
Bump github.com/gobuffalo/plush/v4 from 4.1.9 to 4.1.10
dependabot[bot] Mar 25, 2022
4dc2781
Bump github.com/gobuffalo/flect from 0.2.4 to 0.2.5
dependabot[bot] Apr 4, 2022
5b4b12e
Bump github.com/BurntSushi/toml from 1.0.0 to 1.1.0
dependabot[bot] Apr 5, 2022
0d576c4
Bump actions/stale from 4 to 5
dependabot[bot] Apr 11, 2022
60cb04f
Bump actions/setup-go from 2 to 3
dependabot[bot] Apr 11, 2022
e15e6f2
Bump github.com/spf13/viper from 1.10.1 to 1.11.0
dependabot[bot] Apr 14, 2022
ec5fb6a
Merge branch 'main' into development
paganotoni Apr 16, 2022
4134394
task: setting next version to ve v0.18.4
paganotoni Apr 16, 2022
9e5aa99
Bump github.com/gobuffalo/pop/v6 from 6.0.1 to 6.0.2
dependabot[bot] Apr 18, 2022
0b737ff
Bump github.com/google/go-cmp from 0.5.7 to 0.5.8
dependabot[bot] Apr 27, 2022
3e2efd9
internal/cmd/build: Enable passing of additional build flags to 'go b…
iaburton Apr 25, 2022
4e2c3f8
respect context in dev mode (auto refreshing)
sio4 May 2, 2022
54e5781
replaced markbates/refresh with gobuffalo/refresh
sio4 May 4, 2022
523b4bf
Bump github.com/gobuffalo/refresh from 1.13.0 to 1.13.1
dependabot[bot] May 6, 2022
7f25af4
Bump github.com/gobuffalo/plush/v4 from 4.1.10 to 4.1.11
dependabot[bot] May 6, 2022
bcee0f7
Merge branch 'main' into development
paganotoni May 10, 2022
6724e0e
Bump github.com/gobuffalo/plush/v4 from 4.1.10 to 4.1.11
dependabot[bot] May 10, 2022
5e7b005
Bump github.com/gobuffalo/refresh from 1.13.0 to 1.13.1
dependabot[bot] May 10, 2022
77fc765
replaced test action with starter/reusable workflow
sio4 May 14, 2022
d3cd95e
updated version of package here to fix #142
sio4 May 14, 2022
3439188
Remove depenceny on oncer
May 5, 2022
e65f870
Remove safe from dependencies
May 14, 2022
08c5f4b
once again, updated version of package here to fix #142
sio4 May 15, 2022
2c12ef1
Bump github.com/gobuffalo/pop/v6 from 6.0.2 to 6.0.3
dependabot[bot] May 16, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/standard-go-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Standard Test

on:
push:
branches: [ main ]
pull_request:

jobs:
call-standard-test:
name: Test
uses: gobuffalo/.github/.github/workflows/go-test.yml@v1
secrets: inherit
33 changes: 0 additions & 33 deletions .github/workflows/tests.yml

This file was deleted.

12 changes: 5 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,14 @@ require (
github.com/gobuffalo/events v1.4.2
github.com/gobuffalo/flect v0.2.5
github.com/gobuffalo/genny/v2 v2.0.9
github.com/gobuffalo/here v0.6.6 // indirect
github.com/gobuffalo/logger v1.0.6
github.com/gobuffalo/meta v0.3.1
github.com/gobuffalo/plush/v4 v4.1.10
github.com/gobuffalo/pop/v6 v6.0.2
github.com/gobuffalo/refresh v1.13.0
github.com/gobuffalo/plush/v4 v4.1.11
github.com/gobuffalo/pop/v6 v6.0.3
github.com/gobuffalo/refresh v1.13.1
github.com/google/go-cmp v0.5.8
github.com/markbates/grift v1.5.0
github.com/markbates/oncer v1.0.0
github.com/markbates/refresh v1.12.0
github.com/markbates/safe v1.0.1
github.com/markbates/sigtx v1.0.0
github.com/psanford/memfs v0.0.0-20210214183328-a001468d78ef
github.com/sirupsen/logrus v1.8.1
Expand All @@ -30,7 +28,7 @@ require (
github.com/spf13/viper v1.11.0
github.com/stretchr/testify v1.7.1
golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
golang.org/x/sync v0.0.0-20220513210516-0976fa681c29
golang.org/x/tools v0.1.10
gopkg.in/yaml.v2 v2.4.0
)
41 changes: 22 additions & 19 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,9 @@ github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo=
github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M=
github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI=
github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU=
github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI=
github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
Expand Down Expand Up @@ -182,8 +183,9 @@ github.com/gobuffalo/helpers v0.6.0/go.mod h1:pncVrer7x/KRvnL5aJABLAuT/RhKRR9klL
github.com/gobuffalo/helpers v0.6.4 h1:N9is8xgaotJzGIge1GoLYiWRpKZPqnS9RSty72OhIn8=
github.com/gobuffalo/helpers v0.6.4/go.mod h1:m2aOKsTl3KB0RUwwpxf3tykaaitujQ3irivqrlNAcJ0=
github.com/gobuffalo/here v0.4.0/go.mod h1:bTNk/uKZgycuB358iR0D32dI9kHBClBGpXjW2HVHkNo=
github.com/gobuffalo/here v0.6.5 h1:OjrFcVbQBXff4EN+/m2xa+i1Wy6lW+3fn9Jf+b5WDXY=
github.com/gobuffalo/here v0.6.5/go.mod h1:y6q8eG7YstM/DfOKKAyHV1plrNsuYS5dcIerm8Habas=
github.com/gobuffalo/here v0.6.6 h1:/o+jfSwe36pKQ577grsXGoMYql/zheiGwg1XFo3CBJU=
github.com/gobuffalo/here v0.6.6/go.mod h1:C4JZL5PsXWKzP/CAchaIzuUWlaae6CaAiMYQ0ieY62M=
github.com/gobuffalo/httptest v1.5.1/go.mod h1:uEeEFF2BRyTMNAATqFQAKYvpHrWWPNoJbIB3YPuANNM=
github.com/gobuffalo/logger v1.0.6 h1:nnZNpxYo0zx+Aj9RfMPBm+x9zAU2OayFh/xrAWi34HU=
github.com/gobuffalo/logger v1.0.6/go.mod h1:J31TBEHR1QLV2683OXTAItYIg8pv2JMHnF/quuAbMjs=
Expand All @@ -195,14 +197,14 @@ github.com/gobuffalo/packd v1.0.1 h1:U2wXfRr4E9DH8IdsDLlRFwTZTK7hLfq9qT/QHXGVe/0
github.com/gobuffalo/packd v1.0.1/go.mod h1:PP2POP3p3RXGz7Jh6eYEf93S7vA2za6xM7QT85L4+VY=
github.com/gobuffalo/plush/v4 v4.0.0/go.mod h1:ErFS3UxKqEb8fpFJT7lYErfN/Nw6vHGiDMTjxpk5bQ0=
github.com/gobuffalo/plush/v4 v4.1.9/go.mod h1:9OOII9uAM5pZnhWu1OkQnboXJjaWMQ7kcTl3zNcxvTM=
github.com/gobuffalo/plush/v4 v4.1.10 h1:sBTmJJ1Hpj4ExqC4NFmCvAgH6Iq6t58JaWvAl8NEAFc=
github.com/gobuffalo/plush/v4 v4.1.10/go.mod h1:9OOII9uAM5pZnhWu1OkQnboXJjaWMQ7kcTl3zNcxvTM=
github.com/gobuffalo/plush/v4 v4.1.11 h1:IOLBE07W0VkiraJf36x547l3q5Ek3osP9vHzN48wAh0=
github.com/gobuffalo/plush/v4 v4.1.11/go.mod h1:9OOII9uAM5pZnhWu1OkQnboXJjaWMQ7kcTl3zNcxvTM=
github.com/gobuffalo/pop/v6 v6.0.0/go.mod h1:5rd3OnViLhjteR8+0i/mT9Q4CzkTzCoR7tm/9mmAic4=
github.com/gobuffalo/pop/v6 v6.0.1/go.mod h1:5NO7ehmyRjRctnbMDhIqKkkg6zvdueufYltxErfp9BU=
github.com/gobuffalo/pop/v6 v6.0.2 h1:NuIMTwZ54aHK92ertwv3R2SepAvhTRlQj9/MLqO9Qdo=
github.com/gobuffalo/pop/v6 v6.0.2/go.mod h1:1g+AV0EDe0rUoy1I3yA3aa9N5+/uC5RxtGbxI0KNe4c=
github.com/gobuffalo/refresh v1.13.0 h1:jte5Ch/ZBO+APssLbwbbAr89D4crrYxg2KC5GVyImN4=
github.com/gobuffalo/refresh v1.13.0/go.mod h1:10LiYMO/b19hQVO8q+Z/nBXEBTDGF2u97RJpu82Uu58=
github.com/gobuffalo/pop/v6 v6.0.3 h1:nwA/SL7oSCbQRiIYaCSAf53dyp27qsj3PhsuNQkMVbw=
github.com/gobuffalo/pop/v6 v6.0.3/go.mod h1:UJ3ESOX8rKr2leurHKaIFPK61MtUraFqUe+N6t4sftc=
github.com/gobuffalo/refresh v1.13.1 h1:P5/F+aGusF2Jg829tVf/SSGBmMyaFQekYGFG+0t90Xw=
github.com/gobuffalo/refresh v1.13.1/go.mod h1:9kiOSpIPMKq67avFt3bkPHYIdzZSAsKwDr6TH5/etNk=
github.com/gobuffalo/tags/v3 v3.0.2/go.mod h1:ZQeN6TCTiwAFnS0dNcbDtSgZDwNKSpqajvVtt6mlYpA=
github.com/gobuffalo/tags/v3 v3.1.2 h1:68sHcwFFDstXyfbk5ovbGcQFDsupgVLs+lw1XZinHJw=
github.com/gobuffalo/tags/v3 v3.1.2/go.mod h1:o3ldUfKv50jxWAC8eZHXMm8dnKW3YvyZUMr0xqUcZTI=
Expand Down Expand Up @@ -362,8 +364,8 @@ github.com/jackc/pgconn v1.9.0/go.mod h1:YctiPyvzfU11JFxoXokUOOKQXQmDMoJL9vJzHH8
github.com/jackc/pgconn v1.9.1-0.20210724152538-d89c8390a530/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI=
github.com/jackc/pgconn v1.10.0/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI=
github.com/jackc/pgconn v1.10.1/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI=
github.com/jackc/pgconn v1.11.0 h1:HiHArx4yFbwl91X3qqIHtUFoiIfLNJXCQRsnzkiwwaQ=
github.com/jackc/pgconn v1.11.0/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI=
github.com/jackc/pgconn v1.12.1 h1:rsDFzIpRk7xT4B8FufgpCCeyjdNpKyghZeSefViE5W8=
github.com/jackc/pgconn v1.12.1/go.mod h1:ZkhRC59Llhrq3oSfrikvwQ5NaxYExr6twkdkMLaKono=
github.com/jackc/pgio v1.0.0 h1:g12B9UwVnzGhueNavwioyEEpAmqMe1E/BN9ES+8ovkE=
github.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8=
github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2/go.mod h1:fGZlG77KXmcq05nJLRkk0+p82V8B8Dw8KN2/V9c/OAE=
Expand All @@ -380,30 +382,31 @@ github.com/jackc/pgproto3/v2 v2.0.0-rc3/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvW
github.com/jackc/pgproto3/v2 v2.0.0-rc3.0.20190831210041-4c03ce451f29/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM=
github.com/jackc/pgproto3/v2 v2.0.6/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=
github.com/jackc/pgproto3/v2 v2.1.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=
github.com/jackc/pgproto3/v2 v2.2.0 h1:r7JypeP2D3onoQTCxWdTpCtJ4D+qpKr0TxvoyMhZ5ns=
github.com/jackc/pgproto3/v2 v2.2.0/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=
github.com/jackc/pgproto3/v2 v2.3.0 h1:brH0pCGBDkBW07HWlN/oSBXrmo3WB0UvZd1pIuDcL8Y=
github.com/jackc/pgproto3/v2 v2.3.0/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=
github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b h1:C8S2+VttkHFdOOCXJe+YGfa4vHYwlt4Zx+IVXQ97jYg=
github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E=
github.com/jackc/pgtype v0.0.0-20190421001408-4ed0de4755e0/go.mod h1:hdSHsc1V01CGwFsrv11mJRHWJ6aifDLfdV3aVjFF0zg=
github.com/jackc/pgtype v0.0.0-20190824184912-ab885b375b90/go.mod h1:KcahbBH1nCMSo2DXpzsoWOAfFkdEtEJpPbVLq8eE+mc=
github.com/jackc/pgtype v0.0.0-20190828014616-a8802b16cc59/go.mod h1:MWlu30kVJrUS8lot6TQqcg7mtthZ9T0EoIBFiJcmcyw=
github.com/jackc/pgtype v1.8.1-0.20210724151600-32e20a603178/go.mod h1:C516IlIV9NKqfsMCXTdChteoXmwgUceqaLfjg2e3NlM=
github.com/jackc/pgtype v1.8.1/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4=
github.com/jackc/pgtype v1.10.0 h1:ILnBWrRMSXGczYvmkYD6PsYyVFUNLTnIUJHHDLmqk38=
github.com/jackc/pgtype v1.10.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4=
github.com/jackc/pgtype v1.11.0 h1:u4uiGPz/1hryuXzyaBhSk6dnIyyG2683olG2OV+UUgs=
github.com/jackc/pgtype v1.11.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4=
github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08CZQyj1PVQBHy9XOp5p8/SHH6a0psbY9Y=
github.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM=
github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc=
github.com/jackc/pgx/v4 v4.12.1-0.20210724153913-640aa07df17c/go.mod h1:1QD0+tgSXP7iUjYm9C1NxKhny7lq6ee99u/z+IHFcgs=
github.com/jackc/pgx/v4 v4.13.0/go.mod h1:9P4X524sErlaxj0XSGZk7s+LD0eOyu1ZDUrrpznYDF0=
github.com/jackc/pgx/v4 v4.15.0 h1:B7dTkXsdILD3MF987WGGCcg+tvLW6bZJdEcqVFeU//w=
github.com/jackc/pgx/v4 v4.15.0/go.mod h1:D/zyOyXiaM1TmVWnOM18p0xdDtdakRBa0RsVGI3U3bw=
github.com/jackc/pgx/v4 v4.16.1 h1:JzTglcal01DrghUqt+PmzWsZx/Yh7SC/CTQmSBMTd0Y=
github.com/jackc/pgx/v4 v4.16.1/go.mod h1:SIhx0D5hoADaiXZVyv+3gSm3LCIIINTVO0PficsvWGQ=
github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
github.com/jackc/puddle v1.2.1/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
github.com/jmoiron/sqlx v1.3.4 h1:wv+0IJZfL5z0uZoUjlpKgHkgaFSYD+r9CfrXjEXsO7w=
github.com/jmoiron/sqlx v1.3.4/go.mod h1:2BljVx/86SuTyjE+aPYlHCTNvZrnJXghYGpNiXLBMCQ=
github.com/jmoiron/sqlx v1.3.5 h1:vFFPA71p1o5gAeqtEAwLU4dnX2napprKtHr7PYIcN3g=
github.com/jmoiron/sqlx v1.3.5/go.mod h1:nRVWtLre0KfCLJvgxzCsLVMogSvQ1zNJtpYr2Ccp0mQ=
github.com/joho/godotenv v1.4.0 h1:3l4+N6zfMWnkbPEXKng2o2/MR5mSwTrBih4ZEkkz1lg=
github.com/joho/godotenv v1.4.0/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4=
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
Expand Down Expand Up @@ -449,7 +452,6 @@ github.com/markbates/grift v1.5.0 h1:CZyK0k+8BdhQMgbwzuKMysC12y4tf9H004jAs/FutX4
github.com/markbates/grift v1.5.0/go.mod h1:1ssFm5gSGmzTkhi3Wfh/nqlU74J73TlAjoDMttQbpfY=
github.com/markbates/oncer v1.0.0 h1:E83IaVAHygyndzPimgUYJjbshhDTALZyXxvk9FOlQRY=
github.com/markbates/oncer v1.0.0/go.mod h1:Z59JA581E9GP6w96jai+TGqafHPW+cPfRxz2aSZ0mcI=
github.com/markbates/refresh v1.12.0 h1:vTgVPX4p77v26auBJhlgaTQ/adWAYSIcVYJvM63Nbpo=
github.com/markbates/refresh v1.12.0/go.mod h1:Vpwi1+q+2U1VxE7C0Ilj6r2/+TigRzQcLez6XM3bPLc=
github.com/markbates/safe v1.0.1 h1:yjZkbvRM6IzKj9tlu/zMJLS0n/V351OZWRnF3QfaUxI=
github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0=
Expand Down Expand Up @@ -781,8 +783,9 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220513210516-0976fa681c29 h1:w8s32wxx3sY+OjLlv9qltkLU5yvJzxjjgiHWLjdIcw4=
golang.org/x/sync v0.0.0-20220513210516-0976fa681c29/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
Expand Down
23 changes: 20 additions & 3 deletions internal/cmd/dev/dev.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
rg "github.com/gobuffalo/cli/internal/genny/refresh"
"github.com/gobuffalo/genny/v2"
"github.com/gobuffalo/meta"
"github.com/markbates/refresh/refresh"
"github.com/gobuffalo/refresh/refresh"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"golang.org/x/sync/errgroup"
Expand Down Expand Up @@ -87,7 +87,8 @@ func runDevScript(ctx context.Context, app meta.App) error {
}
cmd.Stderr = os.Stderr
cmd.Stdout = os.Stdout
return cmd.Run()

return contextAwareRun(ctx, cmd.Run)
}

func startDevServer(ctx context.Context, args []string) error {
Expand Down Expand Up @@ -117,5 +118,21 @@ func startDevServer(ctx context.Context, args []string) error {
}
r := refresh.NewWithContext(c, ctx)
r.CommandFlags = args
return r.Start()

return contextAwareRun(ctx, r.Start)
}

func contextAwareRun(ctx context.Context, f func() error) error {
var out = make(chan error)

go func() {
out <- f()
}()

select {
case <-ctx.Done():
return ctx.Err()
case err := <-out:
return err
}
}
6 changes: 4 additions & 2 deletions internal/cmd/plugins.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
package cmd

import (
"sync"

"github.com/gobuffalo/cli/internal/plugins"
"github.com/markbates/oncer"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)

var _plugs plugins.List
var initPlugsOnce sync.Once

func plugs() plugins.List {
oncer.Do("buffalo/cmd/plugins", func() {
initPlugsOnce.Do(func() {
var err error
_plugs, err = plugins.Available()
if err == nil {
Expand Down
23 changes: 20 additions & 3 deletions internal/genny/build/validate.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package build

import (
"errors"
"fmt"
"html/template"
"io/fs"
"strings"

"github.com/gobuffalo/genny/v2"
"github.com/gobuffalo/plush/v4"
"github.com/markbates/safe"
)

// TemplateValidator is given a file and returns an
Expand All @@ -17,7 +17,7 @@ import (
type TemplateValidator func(f genny.File) error

// ValidateTemplates returns a genny.RunFn that will walk the
// given box and run each of the files found through each of the
// given filesystem and run each of the files found through each of the
// template validators
func ValidateTemplates(fsys fs.FS, tvs []TemplateValidator) genny.RunFn {
if len(tvs) == 0 {
Expand All @@ -42,7 +42,7 @@ func ValidateTemplates(fsys fs.FS, tvs []TemplateValidator) genny.RunFn {
}
f := genny.NewFile(path, b)
for _, tv := range tvs {
err := safe.Run(func() {
err := safeRun(func() {
if err := tv(f); err != nil {
errs = append(errs, fmt.Sprintf("template error in file %s: %s", path, err.Error()))
}
Expand Down Expand Up @@ -85,3 +85,20 @@ func GoTemplateValidator(f genny.File) error {
_, err := t.Parse(f.String())
return err
}

// safeRun the function safely knowing that if it panics
// the panic will be caught and returned as an error
func safeRun(fn func()) (err error) {
defer func() {
if ex := recover(); ex != nil {
if e, ok := ex.(error); ok {
err = e
return
}
err = errors.New(fmt.Sprint(ex))
}
}()

fn()
return nil
}
41 changes: 20 additions & 21 deletions internal/plugins/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ import (
"os"
"os/exec"
"strings"
"sync"

"github.com/gobuffalo/envy"
"github.com/gobuffalo/events"
"github.com/markbates/oncer"
"github.com/markbates/safe"
)

const (
Expand All @@ -19,10 +18,12 @@ const (
EvtSetupFinished = "buffalo-plugins:setup:finished"
)

var loadPluginsOnce sync.Once

// Load will add listeners for any plugins that support "events"
func Load() error {
var errResult error
oncer.Do("events.LoadPlugins", func() {
loadPluginsOnce.Do(func() {
// don't send plugins events during testing
if envy.Get("GO_ENV", "development") == "test" {
return
Expand All @@ -41,25 +42,23 @@ func Load() error {
}

err := func(c Command) error {
return safe.RunE(func() error {
n := fmt.Sprintf("[PLUGIN] %s %s", c.Binary, c.Name)
fn := func(e events.Event) {
b, err := json.Marshal(e)
if err != nil {
fmt.Println("error trying to marshal event", e, err)
return
}
cmd := exec.Command(c.Binary, c.UseCommand, string(b))
cmd.Stderr = os.Stderr
cmd.Stdout = os.Stdout
cmd.Stdin = os.Stdin
if err := cmd.Run(); err != nil {
fmt.Println("error trying to send event", strings.Join(cmd.Args, " "), err)
}
n := fmt.Sprintf("[PLUGIN] %s %s", c.Binary, c.Name)
fn := func(e events.Event) {
b, err := json.Marshal(e)
if err != nil {
fmt.Println("error trying to marshal event", e, err)
return
}
cmd := exec.Command(c.Binary, c.UseCommand, string(b))
cmd.Stderr = os.Stderr
cmd.Stdout = os.Stdout
cmd.Stdin = os.Stdin
if err := cmd.Run(); err != nil {
fmt.Println("error trying to send event", strings.Join(cmd.Args, " "), err)
}
events.NamedListen(n, events.Filter(c.ListenFor, fn))
return nil
})
}
events.NamedListen(n, events.Filter(c.ListenFor, fn))
return nil
}(c)
if err != nil {
errResult = err
Expand Down
Loading