@mxtommy/kip 3.10.0-beta.29 → 3.10.0-beta.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/kip-plugin/src/index.ts +9 -6
- package/package.json +1 -1
- package/plugin/index.js +9 -6
- package/public/{chunk-JTSPAMFM.js → chunk-N7V3AYLN.js} +1 -1
- package/public/{chunk-ZUTCNHFI.js → chunk-PBRRH246.js} +9 -9
- package/public/{chunk-XHQ5SRIY.js → chunk-POB5R2D5.js} +1 -1
- package/public/{chunk-T6OT6PG2.js → chunk-SQKJQT3I.js} +1 -1
- package/public/{chunk-VIZFRKNS.js → chunk-VPQVFOYS.js} +1 -1
- package/public/index.html +1 -1
- package/public/{main-OGFT67F6.js → main-M6Z6Q7WJ.js} +3 -3
package/kip-plugin/src/index.ts
CHANGED
|
@@ -17,7 +17,8 @@ export default (server: ServerAPI): Plugin => {
|
|
|
17
17
|
server.debug(`Starting plugin with settings: ${JSON.stringify(settings)}`);
|
|
18
18
|
server.setPluginStatus(`Starting...`)
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
const p = server.getSelfPath('displays.*');
|
|
21
|
+
server.debug(`Self path for displays.*: ${p}`);
|
|
21
22
|
},
|
|
22
23
|
stop: () => {
|
|
23
24
|
server.debug(`Stopping plugin`);
|
|
@@ -64,9 +65,9 @@ export default (server: ServerAPI): Plugin => {
|
|
|
64
65
|
server.setPluginError(msg)
|
|
65
66
|
server.error(`Error in HandleMessage: ${error}`);
|
|
66
67
|
|
|
67
|
-
return res.status(
|
|
68
|
+
return res.status(400).json({
|
|
68
69
|
state: 'FAILED',
|
|
69
|
-
statusCode:
|
|
70
|
+
statusCode: 400,
|
|
70
71
|
message: (error as Error).message
|
|
71
72
|
});
|
|
72
73
|
}
|
|
@@ -103,9 +104,9 @@ export default (server: ServerAPI): Plugin => {
|
|
|
103
104
|
server.setPluginError(msg)
|
|
104
105
|
server.error(`Error in HandleMessage: ${error}`);
|
|
105
106
|
|
|
106
|
-
return res.status(
|
|
107
|
+
return res.status(400).json({
|
|
107
108
|
state: 'FAILED',
|
|
108
|
-
statusCode:
|
|
109
|
+
statusCode: 400,
|
|
109
110
|
message: (error as Error).message
|
|
110
111
|
});
|
|
111
112
|
}
|
|
@@ -124,8 +125,10 @@ export default (server: ServerAPI): Plugin => {
|
|
|
124
125
|
}
|
|
125
126
|
};
|
|
126
127
|
|
|
128
|
+
/*
|
|
129
|
+
* Replace all / with . and remove leading.
|
|
130
|
+
*/
|
|
127
131
|
function pathToDotNotation(path: string): string {
|
|
128
|
-
// Replace all / with . and remove leading .
|
|
129
132
|
return path.replace(/\//g, '.').replace(/^\./, '');
|
|
130
133
|
}
|
|
131
134
|
|
package/package.json
CHANGED
package/plugin/index.js
CHANGED
|
@@ -14,7 +14,8 @@ exports.default = (server) => {
|
|
|
14
14
|
start: (settings) => {
|
|
15
15
|
server.debug(`Starting plugin with settings: ${JSON.stringify(settings)}`);
|
|
16
16
|
server.setPluginStatus(`Starting...`);
|
|
17
|
-
|
|
17
|
+
const p = server.getSelfPath('displays.*');
|
|
18
|
+
server.debug(`Self path for displays.*: ${p}`);
|
|
18
19
|
},
|
|
19
20
|
stop: () => {
|
|
20
21
|
server.debug(`Stopping plugin`);
|
|
@@ -55,9 +56,9 @@ exports.default = (server) => {
|
|
|
55
56
|
const msg = `HandleMessage failed with errors!`;
|
|
56
57
|
server.setPluginError(msg);
|
|
57
58
|
server.error(`Error in HandleMessage: ${error}`);
|
|
58
|
-
return res.status(
|
|
59
|
+
return res.status(400).json({
|
|
59
60
|
state: 'FAILED',
|
|
60
|
-
statusCode:
|
|
61
|
+
statusCode: 400,
|
|
61
62
|
message: error.message
|
|
62
63
|
});
|
|
63
64
|
}
|
|
@@ -88,9 +89,9 @@ exports.default = (server) => {
|
|
|
88
89
|
const msg = `HandleMessage failed with errors!`;
|
|
89
90
|
server.setPluginError(msg);
|
|
90
91
|
server.error(`Error in HandleMessage: ${error}`);
|
|
91
|
-
return res.status(
|
|
92
|
+
return res.status(400).json({
|
|
92
93
|
state: 'FAILED',
|
|
93
|
-
statusCode:
|
|
94
|
+
statusCode: 400,
|
|
94
95
|
message: error.message
|
|
95
96
|
});
|
|
96
97
|
}
|
|
@@ -106,8 +107,10 @@ exports.default = (server) => {
|
|
|
106
107
|
server.setPluginStatus(`Providing remote display control`);
|
|
107
108
|
}
|
|
108
109
|
};
|
|
110
|
+
/*
|
|
111
|
+
* Replace all / with . and remove leading.
|
|
112
|
+
*/
|
|
109
113
|
function pathToDotNotation(path) {
|
|
110
|
-
// Replace all / with . and remove leading .
|
|
111
114
|
return path.replace(/\//g, '.').replace(/^\./, '');
|
|
112
115
|
}
|
|
113
116
|
return plugin;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as c}from"./chunk-WKDUEVL2.js";import{a as g}from"./chunk-
|
|
1
|
+
import{a as c}from"./chunk-WKDUEVL2.js";import{a as g}from"./chunk-VPQVFOYS.js";import"./chunk-GJ33QBJ6.js";import{g as a,i as r,w as l}from"./chunk-CKTYGHMF.js";import{eb as s,ra as t}from"./chunk-FW2LAMAA.js";var v=(()=>{class o{dialog=t(l);auth=t(a);appService=t(g);appSettingsService=t(r);connectionConfig=null;ngOnInit(){this.connectionConfig=this.appSettingsService.getConnectionConfig(),this.openUserCredentialModal("Sign in failed: Incorrect user/password. Enter valide credentials or access the Confifuration/Settings menu, validate the server URL or/and disable the user Sign in option")}openUserCredentialModal(e){this.dialog.open(c,{disableClose:!0,data:{user:this.connectionConfig.loginName,password:this.connectionConfig.loginPassword,error:e}}).afterClosed().subscribe(i=>{i===void 0||!i||(this.connectionConfig.loginName=i.user,this.connectionConfig.loginPassword=i.password,this.appSettingsService.setConnectionConfig(this.connectionConfig),this.serverLogin())})}serverLogin(e){this.auth.login({usr:this.connectionConfig.loginName,pwd:this.connectionConfig.loginPassword,newUrl:e}).then(()=>{this.appSettingsService.reloadApp()}).catch(n=>{n.status==401?(this.openUserCredentialModal("Sign in failed: Invalide user/password. Enter valide credentials"),console.log("[Setting-SignalK Component] Sign in failed: "+n.error.message)):n.status==404?(this.appService.sendSnackbarNotification("Sign in failed: Login API not found at URL. See connection detail status in Configuration/Settings",5e3,!1),console.log("[Setting-SignalK Component] Sign in failed: "+n.error.message)):n.status==0?(this.appService.sendSnackbarNotification("Sign in failed: Cannot reach server at Signal K URL. See connection detail status in Configuration/Settings",5e3,!1),console.log("[Setting-SignalK Component] Sign in failed: Cannot reach server at Signal K URL:"+n.message)):(this.appService.sendSnackbarNotification("Unknown authentication failure: "+JSON.stringify(n),5e3,!1),console.log("[Setting-SignalK Component] Unknown login error response: "+JSON.stringify(n)))})}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=s({type:o,selectors:[["app-widget-login"]],decls:0,vars:0,template:function(n,i){},encapsulation:2})}return o})();export{v as WidgetLoginComponent};
|