492 Commits

Author SHA1 Message Date
Rick Yu 27096db642 Revert "FIX: Support working directories containing whitespace (#646)" (#665)
This reverts commit df13da5c21.
2024-10-16 12:15:59 +08:00
osteensco df13da5c21 FIX: Support working directories containing whitespace (#646)
* encapsulate paths with quotes to escape spaces

* encapsulate paths with quotes to escape spaces

* preprocess error in test
2024-10-09 22:29:44 +08:00
~ jesse ~ 0dfcd29786 feat: silent flag in .air.toml, suppressing all air prints (#641)
* feat: silent flag in .air.toml, suppressing all air prints

useful if the app being watched has structured outputs that are being
piped into subsequent program/s.

* update: add silent to air_example.toml
2024-09-25 19:49:57 +08:00
Rick Yu 9f5042d77c fix: broken code (#652) 2024-09-22 11:59:12 +08:00
zhb127 c75a2f5a07 feat: Make include_file overrule include_ext, fixes: #350, base_on: #358 (#416)
* feat: Make include_file overrule include_ext

* feat: Make include_file overrule include_ext unittest
2024-09-22 10:54:10 +08:00
dedalusj 7187d7f3a8 Set the Via header in proxy requests to origin and in client responses (#629)
* Set the Via header in proxy requests to origin and in client responses

* Remove pseudonym and use host only
2024-09-22 08:50:41 +08:00
8LWXpg 16db6321d7 fix color output (#551) 2024-09-22 01:00:18 +08:00
dengdajun b9384e5db8 fix the stop_on_error is false configuration does not work (#555) 2024-09-22 00:47:34 +08:00
Alexandra Fishova 6761441060 Use web page address when making request to reload proxy (#625)
* Use web page address when making request to reload proxy

Signed-off-by: Alexandra Fishova <yopoyka@yopoyka.com>

* Create event source with just a path because browser can handle address on its own.

Signed-off-by: Alexandra Fishova <yopoyka@yopoyka.com>

---------

Signed-off-by: Alexandra Fishova <yopoyka@yopoyka.com>
2024-09-22 00:34:32 +08:00
Greg Dietsche f4f7c3d44e fix proxy retry loop (#635)
This addresses two bugs:
1) The loop could exit with an error condition present and fail to
   inform the user.
2) On Windows 11, syscall.ECONNREFUSED is not returned. Instead we
   receive net.OpError with a message similar to:

"unable to reach app: Get "http://localhost:7000/": dial tcp [::1]:7000: connectex: No connection could be made because the target machine actively refused it."

The Fix:
Since the retry loop is short; just 1 second maximum, we retry until no
error happens. If an error does occur, we inform the user.
2024-09-22 00:26:02 +08:00
Rick Yu 90c8f9e86e docs: update banner (#651) 2024-09-21 22:48:15 +08:00
Rick Yu a63cff4e53 chore: bump go to 1.23 (#650) 2024-09-21 22:38:40 +08:00
Penn 6403f4d1e0 fix README_zh_cn go install command (#627) 2024-07-14 15:00:15 +08:00
dependabot[bot] d7d7c97638 build(deps): bump google.golang.org/protobuf from 1.31.0 to 1.33.0 (#547)
Bumps google.golang.org/protobuf from 1.31.0 to 1.33.0.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-05 17:45:22 +08:00
xiantang 6b61fa9b7d Implement graceful shutdown on Mac (#619)
* hold cleanup until procKilledCh signal

* signal to procKilledChan in existing deferred func

* without this can't exit when non zero exit code

it seems like `os.Exit(state.ExitCode())` belongs here... but unclear on intent of `e.config.Build.Rerun`

This at least lets you ctrl+c out of error condition instead of killing pid via external means.

* Revert "without this can't exit when non zero exit code"

This reverts commit fec348c04b755ff4571880191692081bc6b81841.

* use cleanup

* fix test case rerun

* upgrade gomod version

* remove unused `WaitGroup`

---------

Co-authored-by: Seth Brasile <seth.brasile@gmail.com>
2024-06-24 22:39:03 +08:00
Neemias 7d43628ab9 fix: fix proxy unmodified response when body tag is missing (#611)
Co-authored-by: Neemias Almeida <ndalmeida@bol.com>
2024-06-23 20:07:14 +08:00
xiantang 0febf6b943 fix https://github.com/air-verse/air/issues/583 panic on Windows 2024-06-23 20:05:28 +08:00
Wulu 6697b69f3a update Chinese README (#601)
* update Chinese README

* Update Chinese README based on review feedback

---------

Co-authored-by: xiantang <zhujingdi1998@gmail.com>
2024-06-11 18:13:17 +08:00
xiantang 42d73d7de0 Change project owner to air-verse (#607)
This reverts commit 613d2b313d.
2024-06-04 10:52:28 +08:00
xiantang 613d2b313d Revert "Change project owner to air-verse (#602)" (#606)
This reverts commit 32b22d6c7f.
2024-06-04 09:09:34 +08:00
xiantang 32b22d6c7f Change project owner to air-verse (#602) 2024-06-03 22:44:23 +08:00
ccoVeille 412be006ca fix typo (#595)
* chore: fix typo in code

* chore: fix tool names or registered trademarks

Docker
Codecov
Bash
Zsh

Also HTML is an acronym, so it has to be in uppercase

* documentation: fix Markdown fenced block identifier

some were using sh, zsh, most where using bash, some were missing

I updated to use shell everywhere
2024-05-30 23:11:27 +08:00
Neemias e3b6eafe8a fix: add golangci-lint setup action and fix lint issue (#592)
Co-authored-by: Neemias Almeida <ndalmeida@bol.com>
2024-05-28 17:21:09 +08:00
Neemias f6733207ad fix: fix proxy error handling and race conditions (#585)
* feat: improve proxy error handling and allow CORS

* fix: fix live proxy race condition

* fix: handle proxy stop error

* feat: add more tests for proxy

* fix: fix reviewer's comments

---------

Co-authored-by: Neemias Almeida <ndalmeida@bol.com>
2024-05-26 12:00:11 +08:00
Jon Reginbald Ivarsson 9f850571b5 Don't follow redirects (#586) 2024-05-24 14:41:40 +08:00
pctj101 3fa38699c2 Improve proxy documentation (#587) 2024-05-24 14:19:58 +08:00
xiantang 3f19370fe5 Fix ci lint (#579) 2024-05-05 22:57:11 +08:00
xiantang df2c137086 Update readme (#578)
* update README

* update issue link in readme
2024-05-05 22:38:30 +08:00
xiantang 2693efbf87 update README (#577) 2024-05-05 22:35:58 +08:00
Neemias 82848039bc Add live proxy feature (#512)
* fix: fix linter

* feat: add live proxy

* fix: fix live reload script injection for pages with partial updates

* fix: fix proxy for post method and include more tests

* fix: fix reload script

* Add fatal format message

---------

Co-authored-by: Neemias Almeida <ndalmeida@bol.com>
Co-authored-by: xiantang <zhujingdi1998@gmail.com>
2024-05-05 22:23:18 +08:00
youngwendy 23bee9507b chore: fix some typos in comments (#569)
Signed-off-by: youngwendy <clonefetch@outlook.com>
2024-04-28 20:45:40 +08:00
Rick Yu 70c53bd2c5 chore: update docs 2024-02-25 11:36:24 +08:00
Rick Yu c402493557 feat: improve smoke test (#538) 2024-02-25 11:28:14 +08:00
Rick Yu 3d408e92bd chore: upgrade actions (#537) 2024-02-25 11:19:07 +08:00
Rick Yu 3164beedb7 feat: bump deps and actions (#536) 2024-02-25 11:01:19 +08:00
Rick Yu ca162a8ba5 fix: broken golangci-lint tag 2024-02-21 11:46:54 +08:00
Tim Routowicz 076ad27daa chore: bump Go to 1.22 (#529)
* chore: bump Go to 1.22

* Fix go version
2024-02-21 11:19:42 +08:00
Steve M 5c818904fb Update README.md: fix typo (#520) 2024-02-01 12:13:30 +08:00
Lane Seppala 56d3d58ac3 Interpret value of kill_delay as milliseconds (#462)
* Interpret value of kill_delay as milliseconds

* Add tests for killDelay
2023-12-28 00:39:23 +08:00
Lukasz Dobrzanski bd33bda5c7 Fix liting; use golangci lint (#508)
* add base golangci-lint

* fix linting errors: unused var t, unexported-return

```
runner/util_test.go:237:34: unused-parameter: parameter 't' seems to be unused, consider removing or renaming it as _ (revive)
func TestGetStructureFieldTagMap(t *testing.T) {
```

```
main.go:54:1: exported function GetVersionInfo should have comment or be unexported
main.go:54:23: exported func GetVersionInfo returns unexported type main.versionInfo, which can be annoying to use
```
2023-12-18 10:51:29 +08:00
Lukas eb5b1b501b fix windows not receiving log (#389)
The old version did not print out any log.print or other log outputs under windows (in powershell/cmd/git bash) for us.
After that change it worked. It is just a hacky solution currently. Happily awaiting feedback if this is actually a soultion.

Thanks
2023-10-23 16:16:24 +08:00
xiantang 22545a2323 add document for : Question: how to do hot compile only and do not run anything? 2023-10-23 15:53:52 +08:00
xiantang 278965f07b refactor exit code logic to switch case 2023-10-23 15:38:36 +08:00
Shawn Poulson 6554a4a347 Report success or exit code from run step. (#380)
* Report success or exit code from run step.

* Editorconfig need not be root.

* change log message

* rollback editorconfig

---------

Co-authored-by: xiantang <zhujingdi1998@gmail.com>
2023-10-23 15:30:47 +08:00
Oleksandr Redko 7d171bd2e6 Fix "log.Fatalf will exit, defer file.Close() will not run" (#488) 2023-10-21 20:04:58 +08:00
Bo-Yi Wu b8f3808b4f feat: add Chinese translation for README.md (#487)
* feat: add Chinese translation for README.md

- Add a new file `README-zh_tw.md`
- Add a new line in `README.md` to include a link to the new file `README-zh_tw.md`

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* docs: update README file with improved Chinese translation and updated tool description

- Modify the Chinese translation of the README file
- Update the description of the Air tool in the README file
- Change the wording in the README file regarding the preferred installation method

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

---------

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2023-10-20 16:07:21 +08:00
Bo-Yi Wu 1a1ff4eded docs: update README.md file and improve installation instructions (#486)
- Fix a typo in the README.md file
- Update the command for installing air
- Add a new example for running a project in Docker
- Update the link for "Buy Me A Coffee" in the README.md file

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2023-10-20 11:46:54 +08:00
Oleksandr Redko 05e48a76c3 docs(readme): remove duplicated section (#485) 2023-10-20 11:46:23 +08:00
xiantang 0473ef85ef update README.md 2023-10-20 01:21:24 +08:00
reaper b70a96abf9 Update README.md (#441)
Co-authored-by: xiantang <zhujingdi1998@gmail.com>
2023-10-20 01:06:08 +08:00