Skip to content

Plugin additions #2622

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 27 commits into from
Feb 10, 2021
Merged
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
5f1fab7
Re-export logger field for plugins
code-asher Jan 13, 2021
a8e9287
Re-export express for plugins
code-asher Jan 13, 2021
f6b04c7
Expose proxy server to plugins
code-asher Jan 19, 2021
fb37473
Load only test plugin during tests
code-asher Jan 19, 2021
055e0ef
Provide WsRouter to plugins
code-asher Jan 20, 2021
3c6fac9
Wait for inner process to exit
code-asher Jan 20, 2021
017b1cc
Add deinit for plugins
code-asher Jan 20, 2021
3211eb1
Expose log level to plugins
code-asher Jan 20, 2021
00cfd9b
Add working directory to plugin config
code-asher Jan 21, 2021
f136a60
Note that we immediately pause websockets
code-asher Jan 22, 2021
b13db31
Add health websocket
code-asher Jan 28, 2021
5505959
Expose websocket server to plugins
code-asher Jan 28, 2021
150513f
Export Logger type
code-asher Jan 28, 2021
36aad9b
Move global express args definition
code-asher Jan 30, 2021
22d1945
Expose replaceTemplates to plugins
code-asher Jan 28, 2021
c78f56b
Expose HttpError to plugins
code-asher Jan 29, 2021
2fe3d57
Mount plugins before bodyParser
code-asher Feb 9, 2021
3226d50
Rename papi to pluginApi
code-asher Feb 9, 2021
2879bd4
Add type alias for required modules
code-asher Feb 9, 2021
9647d65
Add code-server alias to eslint
code-asher Feb 9, 2021
b881117
Expand working directory comment
code-asher Feb 9, 2021
e098df0
Fix code-server module not being provided in Jest
code-asher Feb 9, 2021
e4e0ac4
Don't load plugins in tests
code-asher Feb 9, 2021
2b1b3e6
Add eslint import alias resolver
code-asher Feb 9, 2021
4f16087
Resolve code-server from the root
code-asher Feb 9, 2021
3f837d3
Fix tests failing due to collisions in release
code-asher Feb 10, 2021
de9491d
Mark code-server as a virtual module
code-asher Feb 10, 2021
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
2 changes: 1 addition & 1 deletion test/plugin.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import * as httpserver from "./httpserver"
const fsp = fs.promises

// Jest overrides `require` so our usual override doesn't work.
jest.mock("code-server", () => codeServer)
jest.mock("code-server", () => codeServer, { virtual: true })
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

virtual mocks – mocks of modules that don't exist anywhere in the system

🤯 TIL what a virtual mock is

Source

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haha yeah idk why it was passing locally without this for me though. 🤷


/**
* Use $LOG_LEVEL=debug to see debug logs.
Expand Down