mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-11-15 21:29:27 +00:00
chore(deps): Updated to Theia 1.39.0 (#2144)
- update Theia to `1.39.0`, - remove the application packager and fix the security vulnerabilities, - bundle the backed application with `webpack`, and - enhance the developer docs. Co-authored-by: Akos Kitta <a.kitta@arduino.cc> Co-authored-by: per1234 <accounts@perglass.com> Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
This commit is contained in:
@@ -1,22 +1,20 @@
|
||||
import * as path from 'node:path';
|
||||
import * as express from '@theia/core/shared/express';
|
||||
import { injectable } from '@theia/core/shared/inversify';
|
||||
import { BackendApplicationContribution } from '@theia/core/lib/node/backend-application';
|
||||
import express from '@theia/core/shared/express';
|
||||
import { injectable } from '@theia/core/shared/inversify';
|
||||
import path from 'node:path';
|
||||
import { arduinoPlotterWebAppPath } from '../resources';
|
||||
|
||||
@injectable()
|
||||
export class PlotterBackendContribution
|
||||
implements BackendApplicationContribution
|
||||
{
|
||||
configure(app: express.Application): void {
|
||||
const index = require.resolve(
|
||||
'arduino-serial-plotter-webapp/build/index.html'
|
||||
);
|
||||
app.use(express.static(path.join(index, '..')));
|
||||
app.use(express.static(arduinoPlotterWebAppPath));
|
||||
app.get('/plotter', (req, res) => {
|
||||
console.log(
|
||||
`Serving serial plotter on http://${req.headers.host}${req.url}`
|
||||
);
|
||||
res.sendFile(index);
|
||||
res.sendFile(path.join(arduinoPlotterWebAppPath, 'index.html'));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user