Archived
1
0
Commit Graph

726 Commits

Author SHA1 Message Date
92bf2c9760 Add dev mode constant 2021-05-05 10:16:01 -05:00
8b2c78c4a4 Re-enable update tests 2021-05-04 13:29:42 -05:00
10babb4a0c Replace console with logger in sw register 2021-05-04 13:29:41 -05:00
a48ac5080b Share common util code with VS Code
This lets us re-use the normalized base path so when we expire/clear the
cookie we use the same base path.
2021-05-04 13:29:40 -05:00
49c26f70f7 Add logout route 2021-05-04 13:29:39 -05:00
e7a527514a Add authed context key 2021-05-03 15:00:54 -05:00
07d682392e Merge pull request #3169 from cdr/jsjoeio/add-terminal-e2e-test
feat(testing): add e2e tests for code-server and terminal
2021-04-26 15:16:06 -07:00
83746c8a1f refactor: remove null check in register.ts options.base
Inside registerServiceWorker, we were originally using the nullash coalescing
operator to check if options.base was null or undefined. However, I realized
this check is not necessary.

If you look at getOptions' return value, we return an object with a key "base"
which is of type "string". We get that value by calling resolveBase which always
returns a string.

As a result, we didn't need to check if options.base was null or undefined
because it never can be.
2021-04-23 17:09:03 -07:00
cb65590b98 refactor: move tmpdir into src/node/constants 2021-04-23 14:35:32 -07:00
b9c80b8520 Merge pull request #3178 from code-asher/connections
Minor connections refactor
2021-04-21 12:22:45 -05:00
f0bafa387f Move connection logic into connection class
- Moved everything I could into the class itself.
- Improve the logging situation a bit.
- Switch some trace logs to debug.
- Get debug port from message arguments.
2021-04-21 11:48:45 -05:00
f80d5c3764 refactor: rateLimiter.canTry logic to check >= 1 2021-04-19 13:14:19 -07:00
7a5042176e fix: update logic for removing token from limiter 2021-04-19 11:12:43 -07:00
a3f18d6158 refactor: change limiter.Try() to .removeToken() 2021-04-19 10:57:50 -07:00
d8e45057c7 refactor: update rateLimiter to check try
This changes adds a new method called `.canTry` to the rate limiter to check if
there are tokens remaining in the bucket.

It also adds suggestions from @oxy to make sure the user can brute force past
the rate limiter.
2021-04-19 10:40:59 -07:00
08521077f0 refactor(login): move rate limiter after successful login
Before, we weren't checking if a login was successful before counting it
against the rate limiter.

With this change, we only count unsuccessful logins against the rate limiter.

We did this because this was a bug but also because it caused problems with our
e2e tests hitting the rate limit.
2021-04-19 10:40:59 -07:00
4683d8a077 fix: update comment and export rateLimiter 2021-04-19 10:40:58 -07:00
101c2a01f1 Fix tsc watch restarting when it shouldn't
It seems reaching into lib/vscode for the types caused tsc to establish
watches that caused it to restart over and over while vscode was
building.

The strategy used here is to symlink it instead which is the same thing
we do for the proxy agent.
2021-04-01 10:58:56 -05:00
df6bfbbeaf feat: bump ts-node to 9.1.1 2021-03-30 16:46:49 -07:00
e4db80667e refactor: use stdio correctly in wrapper 2021-03-29 14:05:59 -07:00
18ace7b906 Don't send permessage-deflate header if not supported (#2993) 2021-03-29 12:59:36 -05:00
b04104cafe Merge branch 'main' into jsjoeio/upgrade-vscode-1.54 2021-03-22 10:43:39 -07:00
a8e2ede4f5 chore(deps): bump js-yaml from 3.14.0 to 4.0.0 (#2920)
* chore(deps): bump js-yaml from 3.14.0 to 4.0.0

Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 3.14.0 to 4.0.0.
- [Release notes](https://github.com/nodeca/js-yaml/releases)
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/3.14.0...4.0.0)

Signed-off-by: dependabot[bot] <support@github.com>

* fix(src/node): replace yaml.safeLoad with load

Also update @types/yaml to ^4.0.0.

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Akash Satheesan <akash@coder.com>
2021-03-18 16:30:10 -05:00
071c8e15fc Merge branch 'main' into jsjoeio/upgrade-vscode-1.54 2021-03-17 13:51:27 -07:00
45a1713767 Merge pull request #2906 from bpmct/rename-cloud
rename references of "coder could"
2021-03-17 18:28:14 +00:00
a097713829 remove references of coder could 2021-03-16 22:59:30 -04:00
0c2708302d refactor: remove --home flag/feature
We are removing this because it was removed upstream in PR~115599.
2021-03-16 14:25:28 -07:00
964ebe8d0a Replace fs-extra with fs.promises
Remove the Mac directory copy instead of refactoring it since we've had
this for a long time now and I think it's safe to assume that users
running code-server on Mac don't have the old directory anymore.
2021-03-16 12:51:08 -05:00
5a1f62a8fb Support permessage-deflate web socket extension (#2846) 2021-03-10 13:14:24 -06:00
f21433a130 Merge pull request #2823 from cdr/vapurrmaid/rm-updatecss
chore: Remove pages/update.css
2021-03-05 14:04:33 -07:00
925073db31 Merge pull request #2773 from cdr/upgrade-vscode-1.53
feat(vscode): update to version 1.53.2
2021-03-05 14:03:10 -07:00
9e2668ec75 chore: Remove pages/update.css
It appears the associated HTML for these styles was removed in
554b6d6fcf
2021-03-05 06:55:05 -05:00
4d3d1b844d Handle permessage-deflate on sockets
With this the extension host is working again.
2021-03-02 17:18:49 -06:00
36136fe70d chore: formatting 2021-02-26 15:46:31 -07:00
9ea18636d7 Merge branch 'master' into upgrade-vscode-1.53 2021-02-26 14:23:24 -07:00
5f3afbf7a9 fix: refactor performance in vscode.html 2021-02-26 14:16:46 -07:00
ee0973c05a feat: add logs to serviceWorker 2021-02-26 11:58:29 -07:00
027e8e5adf refactor: use LogModule from Asher in tests 2021-02-26 11:51:52 -07:00
a44a51462c refactor: use same syntax as logger spy 2021-02-26 11:51:52 -07:00
7ef630f7a4 refactor(register): use logError instead of logger 2021-02-26 11:51:52 -07:00
21f577d471 refactor: add handleRegisterServiceWorker fn 2021-02-26 11:51:52 -07:00
44b9874fbe feat: test failure to register service worker 2021-02-26 11:51:52 -07:00
a9f88affa9 refactor: use logger in serviceworker 2021-02-26 11:51:51 -07:00
72b05cacac refactor: create registerServiceWorker fn 2021-02-26 11:51:51 -07:00
077af0511e fix: Responsive Sign In Page (#2770) 2021-02-25 13:08:54 -06:00
47a05c998a Gate wtfnode behind WTF_NODE env var
After thinking about it some more it's probably mostly only useful to
see the output when the tests are hanging. Otherwise there's a lot of
noise about Jest child processes and pipes.
2021-02-22 13:41:12 -07:00
3fa460c244 refactor: create helpers.ts & add Cookie 2021-02-22 13:41:10 -07:00
d0eece3d8f refactor: add note to test.sh about --home 2021-02-22 13:41:10 -07:00
b02d2fb3cc feat: add cookie utils for e2e tests 2021-02-22 13:41:10 -07:00
2d8b785fb8 Fix health socket not getting client messages
Forgot to resume. Went ahead and did the same for the test plugin
although it only sends messages and doesn't receive any.
2021-02-16 15:01:46 -06:00