pypilot-autopilot-provider 1.1.0 → 1.1.2

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/app-icon.svg ADDED
@@ -0,0 +1,135 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <svg
3
+ viewBox="0 0 128 128"
4
+ role="img"
5
+ aria-label="Course Provider"
6
+ version="1.1"
7
+ id="svg50"
8
+ sodipodi:docname="app-icon.svg"
9
+ inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
10
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
11
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
12
+ xmlns:xlink="http://www.w3.org/1999/xlink"
13
+ xmlns="http://www.w3.org/2000/svg"
14
+ xmlns:svg="http://www.w3.org/2000/svg">
15
+ <sodipodi:namedview
16
+ id="namedview52"
17
+ pagecolor="#ffffff"
18
+ bordercolor="#000000"
19
+ borderopacity="0.25"
20
+ inkscape:showpageshadow="2"
21
+ inkscape:pageopacity="0.0"
22
+ inkscape:pagecheckerboard="0"
23
+ inkscape:deskcolor="#d1d1d1"
24
+ showgrid="false"
25
+ inkscape:zoom="4.6293397"
26
+ inkscape:cx="50.331152"
27
+ inkscape:cy="73.228586"
28
+ inkscape:window-width="1920"
29
+ inkscape:window-height="1012"
30
+ inkscape:window-x="0"
31
+ inkscape:window-y="0"
32
+ inkscape:window-maximized="1"
33
+ inkscape:current-layer="svg50" />
34
+ <defs
35
+ id="defs10">
36
+ <linearGradient
37
+ inkscape:collect="always"
38
+ id="linearGradient8751">
39
+ <stop
40
+ style="stop-color:#fff8df;stop-opacity:1;"
41
+ offset="0"
42
+ id="stop8747" />
43
+ <stop
44
+ style="stop-color:#469cb6;stop-opacity:0.92489004;"
45
+ offset="1"
46
+ id="stop8749" />
47
+ </linearGradient>
48
+ <linearGradient
49
+ id="sea"
50
+ x1="0"
51
+ y1="0"
52
+ x2="0"
53
+ y2="1">
54
+ <stop
55
+ offset="0"
56
+ stop-color="#1b6ea8"
57
+ id="stop2" />
58
+ <stop
59
+ offset="1"
60
+ stop-color="#0b3a5e"
61
+ id="stop4" />
62
+ </linearGradient>
63
+ <clipPath
64
+ id="card">
65
+ <rect
66
+ x="0"
67
+ y="0"
68
+ width="128"
69
+ height="128"
70
+ rx="22"
71
+ id="rect7" />
72
+ </clipPath>
73
+ <clipPath
74
+ id="clip0_103_3617">
75
+ <rect
76
+ width="512"
77
+ height="512"
78
+ fill="white"
79
+ id="rect322" />
80
+ </clipPath>
81
+ <clipPath
82
+ id="clip0_103_67">
83
+ <rect
84
+ width="512"
85
+ height="512"
86
+ fill="white"
87
+ id="rect2209" />
88
+ </clipPath>
89
+ <clipPath
90
+ id="clip0_103_6250">
91
+ <rect
92
+ width="512"
93
+ height="512"
94
+ fill="white"
95
+ id="rect3689" />
96
+ </clipPath>
97
+ <linearGradient
98
+ inkscape:collect="always"
99
+ xlink:href="#linearGradient8751"
100
+ id="linearGradient8753"
101
+ x1="14.405283"
102
+ y1="15.844027"
103
+ x2="111.4273"
104
+ y2="114.77638"
105
+ gradientUnits="userSpaceOnUse" />
106
+ </defs>
107
+ <rect
108
+ style="fill:url(#linearGradient8753);fill-opacity:1;stroke:#dde1de;stroke-width:0.794;stroke-linejoin:bevel;stroke-opacity:0.83649015;paint-order:stroke fill markers;stroke-dasharray:none"
109
+ id="rect1426"
110
+ width="126.94573"
111
+ height="126.79709"
112
+ x="0.65405494"
113
+ y="1.0181499"
114
+ ry="22.476601" />
115
+ <path
116
+ style="fill:none;fill-opacity:0.55069;stroke:#ff0b00;stroke-width:1.035;stroke-linejoin:bevel;stroke-dasharray:4.14,1.035;stroke-opacity:1;paint-order:stroke fill markers;stroke-dashoffset:0"
117
+ d="M 16.844401,106.11717 48.359738,63.262318 92.214901,29.314245 121.34941,22.186372 v 0"
118
+ id="path5417" />
119
+ <path
120
+ fill-rule="evenodd"
121
+ clip-rule="evenodd"
122
+ d="m 42.364518,33.552045 c 1.563583,-0.860218 3.564333,-0.302667 4.395158,1.22478 l 3.256284,5.98675 c 3.23988,-1.344375 6.816509,-2.089925 10.575747,-2.089925 3.759572,0 7.336533,0.745707 10.576777,2.090335 l 3.256482,-5.98716 c 0.830858,-1.527447 2.831609,-2.084998 4.395225,-1.22478 1.563616,0.860217 2.057092,2.790092 1.08439,4.23944 l -3.797353,5.657588 c 5.854777,4.032842 9.912289,10.288467 10.810092,17.468196 l 6.819193,-0.295276 c 1.803891,-0.078 3.310835,1.294163 3.310835,3.014665 0,1.720493 -1.506944,3.092661 -3.310835,3.014658 l -6.751916,-0.292431 c -0.729776,7.316526 -4.734594,13.723556 -10.601631,17.875426 l 3.521615,5.24706 c 0.972702,1.44923 0.479226,3.37911 -1.08439,4.23936 -1.563616,0.86024 -3.564367,0.30253 -4.395225,-1.2247 l -2.989693,-5.49655 c -3.310172,1.41543 -6.980261,2.20273 -10.843566,2.20273 -3.862971,0 -7.532729,-0.7873 -10.842635,-2.20242 l -2.989396,5.49624 c -0.830825,1.52723 -2.831575,2.08494 -4.395191,1.2247 -1.563583,-0.86025 -2.057258,-2.79013 -1.084422,-4.23936 l 3.521381,-5.24643 C 38.933743,80.083071 34.928661,73.675731 34.198653,66.358885 l -6.751849,0.292431 c -1.803627,0.07793 -3.310736,-1.294165 -3.310736,-3.014658 0,-1.720502 1.507109,-3.092669 3.310736,-3.014665 l 6.819259,0.295276 C 35.1638,53.737192 39.221777,47.481315 45.077082,43.448505 l -3.797019,-5.65702 c -0.972803,-1.449348 -0.479161,-3.379223 1.084455,-4.23944 z m 18.227189,49.334086 c 10.982096,0 19.884895,-8.48343 19.884895,-18.948202 0,-10.464812 -8.902799,-18.948209 -19.884895,-18.948209 -10.982127,0 -19.884894,8.483397 -19.884894,18.948209 0,10.464772 8.902767,18.948202 19.884894,18.948202 z"
123
+ fill="#373737"
124
+ id="path258"
125
+ style="fill:#ffd700;fill-opacity:1;stroke:#000000;stroke-width:3.23515;stroke-opacity:1" />
126
+ <path
127
+ d="M 68.37333,76.570071 66.146222,69.900305 H 55.726537 l -2.227108,6.669766 H 47.335111 L 57.476408,49.398337 h 6.880173 L 74.537647,76.570071 Z M 62.566941,58.796649 c -0.132559,-0.404228 -0.304901,-0.922146 -0.517008,-1.553754 -0.212104,-0.65687 -0.424211,-1.313742 -0.636315,-1.970614 -0.185593,-0.682134 -0.344672,-1.263213 -0.477239,-1.743235 -0.132559,0.505286 -0.304901,1.124262 -0.517006,1.856925 -0.212106,0.7074 -0.424212,1.389535 -0.636317,2.046407 -0.185593,0.631606 -0.331415,1.086364 -0.437468,1.364271 l -2.147568,6.518183 h 7.556259 z"
128
+ fill="#373737"
129
+ id="path260"
130
+ style="fill:#ffb72e;fill-opacity:0.55068952;stroke:#000000;stroke-width:0.835;stroke-dasharray:none;stroke-opacity:1" />
131
+ <path
132
+ style="fill:#80307d;fill-opacity:1;stroke:#d44d95;stroke-width:1.035;stroke-linejoin:bevel;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke fill markers"
133
+ d="M 19.510753,95.354767 29.661776,88.957684 26.245008,99.258761 Z"
134
+ id="path5550" />
135
+ </svg>
package/package.json CHANGED
@@ -1,8 +1,12 @@
1
1
  {
2
2
  "name": "pypilot-autopilot-provider",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "PyPilot autopilot provider plugin for Signal K server.",
5
5
  "main": "plugin/index.js",
6
+ "signalk": {
7
+ "displayName": "PyPilot Autopilot Provider",
8
+ "appIcon": "./app-icon.svg"
9
+ },
6
10
  "keywords": [
7
11
  "signalk-node-server-plugin",
8
12
  "pypilot"
@@ -19,23 +23,22 @@
19
23
  "build": "tsc",
20
24
  "build-declaration": "tsc --declaration --allowJs false",
21
25
  "watch": "npm run build -- -w",
22
- "test": "echo \"Error: no test specified\" && exit 1",
26
+ "test": "mocha",
23
27
  "start": "npm run build -- -w",
24
28
  "format": "prettier --write src/*",
25
29
  "prepublishOnly": "npm run format && npm run build",
26
30
  "prepack": "npm run format && npm run build"
27
31
  },
28
32
  "dependencies": {
33
+ "@signalk/server-api": "^2.28.0",
29
34
  "socket.io-client": "^4.4.1"
30
35
  },
31
36
  "devDependencies": {
32
- "@signalk/server-api": "^2.9.0",
33
37
  "@tsconfig/node20": "^20.1.6",
34
- "@types/baconjs": "^0.7.34",
35
38
  "@types/express": "^5.0.3",
36
39
  "@types/node-fetch": "^2.6.13",
37
- "prettier": "^2.5.1",
38
- "typescript": "^4.5.4"
40
+ "prettier": "^3.8.4",
41
+ "typescript": "^6.0.3"
39
42
  },
40
43
  "signalk-plugin-enabled-by-default": false
41
44
  }
package/plugin/pypilot.js CHANGED
@@ -258,7 +258,7 @@ const handlePyPilotValuesMsg = (data) => {
258
258
  // supported modes
259
259
  exports.apData.options.modes = Array.isArray(data['ap.mode']?.choices)
260
260
  ? data['ap.mode'].choices
261
- : pypilotModes ?? [];
261
+ : (pypilotModes ?? []);
262
262
  };
263
263
  // set autopilot state
264
264
  const apSetState = (state) => {