mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2024-11-16 10:28:33 -07:00
Make frontend non-experimental. https://github.com/Koenkk/zigbee2mqtt/issues/4266
This commit is contained in:
parent
546d6193a3
commit
4bb3ddcff2
@ -68,7 +68,7 @@ class Controller {
|
||||
this.extensions.push(new ExtensionBridge(...args, this.enableDisableExtension));
|
||||
}
|
||||
|
||||
if (settings.get().experimental.frontend) {
|
||||
if (settings.get().frontend) {
|
||||
this.extensions.push(new ExtensionFrontend(...args));
|
||||
}
|
||||
|
||||
|
@ -25,9 +25,9 @@ class Frontend extends Extension {
|
||||
this.onWebSocketConnection = this.onWebSocketConnection.bind(this);
|
||||
this.server = http.createServer(this.onRequest);
|
||||
this.server.on('upgrade', this.onUpgrade);
|
||||
this.developmentServer = settings.get().experimental.frontend.development_server;
|
||||
this.developmentServer = settings.get().frontend.development_server;
|
||||
this.development = !!this.developmentServer;
|
||||
this.port = settings.get().experimental.frontend.port || 8080;
|
||||
this.port = settings.get().frontend.port || 8080;
|
||||
this.retainedMessages = new Map();
|
||||
|
||||
if (this.development) {
|
||||
|
@ -84,7 +84,8 @@ describe('Frontend', () => {
|
||||
data.writeDefaultConfiguration();
|
||||
data.writeDefaultState();
|
||||
settings._reRead();
|
||||
settings.set(['experimental'], {new_api: true, frontend: {port: 8081}});
|
||||
settings.set(['experimental'], {new_api: true});
|
||||
settings.set(['frontend'], {port: 8081});
|
||||
settings.set(['homeassistant'], true);
|
||||
});
|
||||
|
||||
@ -177,7 +178,7 @@ describe('Frontend', () => {
|
||||
});
|
||||
|
||||
it('Development server', async () => {
|
||||
settings.set(['experimental', 'frontend'], {development_server: 'localhost:3001'});
|
||||
settings.set(['frontend'], {development_server: 'localhost:3001'});
|
||||
controller = new Controller();
|
||||
await controller.start();
|
||||
expect(mockHTTPProxy.variables.initParameter).toStrictEqual({ws: true});
|
||||
|
Loading…
Reference in New Issue
Block a user