Commit Graph

35 Commits

Author SHA1 Message Date
Joe Previte
8c2bb61af9
refactor: parse options with multiple = in cli
There was a case with the hashed-password which had multiple equal signs in the
value and it wasn't being parsed correctly. This uses a new function and adds a
few tests.
2021-06-08 14:33:17 -07:00
Joe Previte
91303d4e40
refactor: make ensureAuthenticated async 2021-06-08 14:33:14 -07:00
Asher
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
Asher
e7a527514a
Add authed context key 2021-05-03 15:00:54 -05:00
Asher
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
Asher
3fc556d4d5
Delegate authentication to plugins
Unfortunately since plugins can now override the root this is necessary
or just can't log in.
2021-02-12 16:50:23 -06:00
Asher
b881117762
Expand working directory comment 2021-02-09 13:35:34 -06:00
Asher
c78f56b334
Expose HttpError to plugins
This will let them throw and show nice errors more easily.
2021-02-09 13:09:38 -06:00
Asher
22d194515a
Expose replaceTemplates to plugins
This is mainly so they can get relative paths in their HTML, in
particular code-server's static base so they can use the favicon and
service worker.
2021-02-09 13:09:37 -06:00
Asher
150513fbc4
Export Logger type
So plugins can pass the logger around.
2021-02-09 13:09:35 -06:00
Asher
5505959f7e
Expose websocket server to plugins
Same reasoning used when exposing Express.
2021-02-09 13:09:34 -06:00
Asher
00cfd9bdf1
Add working directory to plugin config 2021-02-09 13:09:31 -06:00
Asher
3211eb1ce5
Expose log level to plugins
In case they need to map it to something else.
2021-02-09 13:09:30 -06:00
Asher
017b1cc633
Add deinit for plugins 2021-02-09 13:09:29 -06:00
Asher
055e0ef9ec
Provide WsRouter to plugins 2021-02-09 13:09:27 -06:00
Asher
f6b04c7c29
Expose proxy server to plugins 2021-02-09 12:19:39 -06:00
Asher
a8e928798b
Re-export express for plugins 2021-02-09 12:19:38 -06:00
Asher
5f1fab7d27
Re-export logger field for plugins 2021-02-09 12:19:36 -06:00
Anmol Sethi
277211c4ce
plugin: Make init and applications callbacks optional 2020-11-06 14:47:08 -05:00
Anmol Sethi
14f408a837
plugin: Plugin modules now export a single top level identifier
Makes typing much easier. Addresse's Will's last comment.
2020-11-06 10:13:01 -05:00
Anmol Sethi
8a8159c683
plugin: More review fixes
Next commit will address Will's comments about the typings being weird.
2020-11-06 10:13:01 -05:00
Anmol Sethi
af73b96313
routes/apps.ts: Add example output 2020-11-06 10:12:47 -05:00
Anmol Sethi
2a13d003d3
plugin.ts: Add homepageURL to plugin and application 2020-11-06 10:12:47 -05:00
Anmol Sethi
687094802e
plugin.ts: Make application endpoint paths absolute 2020-11-06 10:12:46 -05:00
Anmol Sethi
afff86ae9c
plugin.ts: Adjust to implement pluginapi.d.ts correctly 2020-11-06 10:12:46 -05:00
Anmol Sethi
fed545e67d
plugin.d.ts -> pluginapi.d.ts
More clear.
2020-11-06 10:12:46 -05:00
Anmol Sethi
6638daf6f0
plugin.d.ts: Add explicit path field and adjust types to reflect
See my discussion with Will in the PR.
2020-11-06 10:12:46 -05:00
Anmol Sethi
8d3a7721fe
plugin.d.ts: Document plugin priority correctly 2020-11-06 10:12:46 -05:00
Anmol Sethi
aa2cfa2c17
typings/plugin.d.ts: Create 2020-11-06 10:11:57 -05:00
Anmol Sethi
4aa15401c3
Format and lint 2020-02-14 20:00:19 -05:00
Asher
b29346ecdf
Implement new structure 2020-02-04 14:31:44 -06:00
Asher
a26844ea45
Add package.json for publishing API types 2019-09-04 11:47:50 -05:00
Asher
62719ab544
Clean up client API
- Don't use "any" for the API type.
- Remove everything from the Coder API that can eventually be done
  through the VS Code API.
- Move the event emission to our own client to minimize patching.
2019-07-31 17:22:15 -05:00
Asher
45d348b03d
Expose API on the client 2019-07-18 18:09:22 -05:00
Asher
2b2aa9a211
Add https server 2019-07-18 18:09:09 -05:00