Commit Graph

1738 Commits

Author SHA1 Message Date
Anmol Sethi
c32d8b155f
heart.ts: Fix leak when server closes
This had me very confused for quite a while until I did a binary search
inspection on route/index.ts. Only with the heart.beat line commented
out did my tests pass without leaking.

They weren't leaking fds but just this heartbeat timer and node of
course prints just fds that are active when it detects some sort of leak
I guess and that made the whole thing very confusing. These fds are not
leaked and will close when node's event loop detects there are no more
callbacks to run.

no of handles 3

tcp stream {
  fd: 20,
  readable: false,
  writable: true,
  address: {},
  serverAddr: null
}

tcp stream {
  fd: 22,
  readable: false,
  writable: true,
  address: {},
  serverAddr: null
}

tcp stream {
  fd: 23,
  readable: true,
  writable: false,
  address: {},
  serverAddr: null
}

It kept printing the above text again and again for 60s and then the
test binary times out I think. I'm not sure if it was node printing the
stuff above or if it was a mocha thing. But it was really confusing...

cc @code-asher for thoughts on what was going on.

edit: It was the leaked-handles import in socket.test.ts!!!
Not sure if we should keep it, this was really confusing and misleading.
2021-01-20 02:06:44 -05:00
Anmol Sethi
5c06646f58
Formatting and linting fixes 2021-01-20 02:06:44 -05:00
Anmol Sethi
60233d0974
test/proxy.test.ts: Implement 2021-01-20 02:06:44 -05:00
Anmol Sethi
240c8e266e
test: Implement integration.ts for near full stack integration testing 2021-01-20 02:06:44 -05:00
Anmol Sethi
64e915de4a
test: Rename testutil.ts to httpserver.ts 2021-01-20 02:06:44 -05:00
Anmol Sethi
d3074278ca
app.ts: Fix createApp to log all http server errors
cc @code-asher
2021-01-20 02:06:43 -05:00
Anmol Sethi
8acb2aec11
plugin.test.ts: Switch to testutil.HttpServer 2021-01-20 02:06:43 -05:00
Anmol Sethi
ea1949e440
test: Add testutil.HttpServer
The goal is to remove supertest as it does not support typescript well
and there's really no good reason for the dependency. Also no websocket
testing support.
2021-01-20 02:06:43 -05:00
Anmol Sethi
9efcf7f3ce
FAQ.md: Document wds problem with create-react-app and pathProxy.ts 2021-01-20 02:06:43 -05:00
Anmol Sethi
ba4a24809c
routes/index.ts: Correctly register wsErrorHandler
express requires all 4 arguments to be declared for a error handler.
It's very unfortunate that our types do not handle this.
2021-01-20 02:06:43 -05:00
Anmol Sethi
497b01bffe
FAQ.md: Document --proxy-path-passthrough
And the concerns surrounding it.

Closes #2485
2021-01-20 02:06:43 -05:00
Anmol Sethi
f169e3ac66
pathProxy.ts: Implement --proxy-path-passthrough
Closes #2222
2021-01-20 02:06:43 -05:00
SPGoding
eae285cf93
Improve hashed-password FAQ (#2533) 2021-01-14 13:00:52 -06:00
Asher
39faceeee4
Merge pull request #2539 from cdr/callback-html 2021-01-11 16:19:08 -06:00
Anmol Sethi
07bc3d9774
Merge pull request #2551 from cdr/dark-mode-favicon-b1d7
favicon: Add dark mode support
2021-01-11 12:55:20 -05:00
Anmol Sethi
f15580b28a
favicon: Add dark mode support
Closes #2538

Works as expected on latest Firefox and Chromium.
2021-01-11 12:54:25 -05:00
Anmol Sethi
fa2aed6d46
gen_icons.sh: Document pwa-icon vs favicon having different design 2021-01-09 01:45:08 -05:00
Anmol Sethi
693fdbefb4
browser: Add favicon.afdesign
It requires git-lfs to pull down if you want to adjust the favicon and
also the affinity designer software available only on Windows and Mac.

Might be a good idea to switch to Figma at some point and commit a
.fig file.
2021-01-08 23:03:34 -05:00
Asher
cb11e1f750
Fix typings rsync 2021-01-08 10:37:47 -06:00
Sean Smith
9e4206aa41
Add typings to release bundle (#2544) 2021-01-06 14:25:58 -06:00
Joe Previte
5164f925ee
Merge pull request #2505 from cdr/docs-update-vscode
docs: add details to updating vscode section
2021-01-05 16:27:22 -07:00
Asher
05530db20e
Fix symlink_asar failing if link is broken
This can happen if you `yarn release` without keeping node modules.
2021-01-05 15:28:42 -06:00
Asher
aa05993cf0
Bundle callback.html into final build 2021-01-05 15:26:11 -06:00
Joe Previte
f599e1d72e
docs: add details to updating vscode section 2020-12-22 16:39:15 -07:00
Anmol Sethi
caee285240
Merge pull request #2489 from cdr/v3.8.0
v3.8.0
2020-12-18 15:52:53 -05:00
Anmol Sethi
c4610f7829
v3.8.0
🎅🏼
2020-12-18 15:09:55 -05:00
Anmol Sethi
4185675338
doc/ipad.md: Fix formatting 2020-12-18 15:09:43 -05:00
Asher
f763319bc3
Merge pull request #2160 from cdr/github-auth
Fix GitHub auth
2020-12-18 10:54:51 -08:00
Asher
c7baf5d04a
Merge pull request #2482 from cdr/asar
Symlink node_modules.asar to node_modules in lib/vscode
2020-12-18 10:54:36 -08:00
Joe Previte
7c6b132238
Merge pull request #2472 from AckerApple/patch-1
Update ipad.md
2020-12-18 11:29:22 -07:00
Oxylibrium
ceb8eb8f39
doc/npm.md: Update docs for Alpine Linux (#2479) 2020-12-18 18:08:36 +00:00
Anmol Sethi
cb446666fa
Merge pull request #2487 from cdr/proxy-docs-86d4
proxy-agent: Use proxy-from-env and add docs
2020-12-18 13:06:47 -05:00
Anmol Sethi
ea1b38737e
Merge pull request #2466 from cdr/freebsd-abe7
ci: Add support for FreeBSD to the build process
2020-12-18 13:04:11 -05:00
Jean-Yves LENHOF
0f2085bd27
release-image: Use more minimal packages #2462 2020-12-18 13:01:59 -05:00
Asher
5f7f7f1a92
Simplify query concatenation in URL callback
Cases in URLs like ?&a=b or ?a=b& appear to be handled just fine.
2020-12-18 11:31:25 -06:00
Mayank Soni
0811b27ba1
docs: Update nginx certbot to use python3 #2439 2020-12-18 12:22:39 -05:00
Asher
d14c2e5bb7
Swap negative check for positive check 2020-12-18 11:21:06 -06:00
Anmol Sethi
60c270aef5
cli: hashedPassword -> hashed-password (#2454)
Capital letters in the CLI are evil.

cc @code-asher
2020-12-18 12:20:38 -05:00
Asher
4255f9c152
Use full path for ignoring node_modules.asar
Co-authored-by: Anmol Sethi <hi@nhooyr.io>
2020-12-18 09:01:27 -08:00
Asher
3aa4ae4539
Clarify why we need node_modules.asar 2020-12-18 10:59:15 -06:00
Anmol Sethi
d3d44280a7
install.sh: Add echo_npm_postinstall
Updates #2349
2020-12-18 11:52:08 -05:00
Anmol Sethi
ffa24de5b1
doc/npm.md: Document npm module dependencies for FreeBSD 2020-12-18 11:52:08 -05:00
Anmol Sethi
2bafbdc32f
ci: Minor fixes for FreeBSD support 2020-12-18 11:52:08 -05:00
Anmol Sethi
003225d2cd
vscode: Remove electron dependency but keep types
Electron doesn't support FreeBSD.
2020-12-18 11:52:08 -05:00
Anmol Sethi
de112b15ed
clean.sh: Do not reset lib/vscode
Now that we've moved to the submodule, there is no need to reset changes
in there :)

cc @jsjoeio
2020-12-18 11:52:08 -05:00
Anmol Sethi
65ce3996ac
build: Do not let agent install fail the build
We don't have an agent for FreeBSD right now.
2020-12-18 11:52:08 -05:00
Anmol Sethi
cb72128448
doc/FAQ: Document proxy environment variables 2020-12-18 11:17:20 -05:00
Anmol Sethi
ae902b9dd1
proxy_agent: Use proxy-from-env for robustness
Now we support pretty much every variable under the sun along with
$NO_PROXY all correctly and with minimal code on our end.
2020-12-18 11:10:07 -05:00
Anmol Sethi
94b4ba131e
proxy_agent: Implement $HTTPS_PROXY
Just convention, see https://golang.org/pkg/net/http/#ProxyFromEnvironment
2020-12-18 10:39:31 -05:00
Anmol Sethi
ecb4d07364
proxy_agent: Improve documentation 2020-12-18 10:38:46 -05:00