@volumio/plugin-sdk 0.0.0-stage → 0.3.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/LICENSE +21 -0
- package/README.md +118 -2
- package/bin/volumio-plugin.js +158 -0
- package/package.json +37 -4
- package/registry/functions.json +93 -0
- package/registry/g2-baseline.json +485 -0
- package/schema/manifest.schema.json +95 -0
- package/src/audit.js +46 -0
- package/src/check.js +114 -0
- package/src/deploy.js +183 -0
- package/src/fromV1.js +54 -0
- package/src/g2/baseline.js +31 -0
- package/src/g2/gitleaks.toml +4 -0
- package/src/g2/index.js +18 -0
- package/src/g2/js.js +63 -0
- package/src/g2/rule.js +94 -0
- package/src/g2/secrets.js +85 -0
- package/src/g2/shell.js +145 -0
- package/src/index.js +3 -0
- package/src/init.js +60 -0
- package/src/licence.js +88 -0
- package/src/manifest.js +36 -0
- package/src/package.js +170 -0
- package/src/socketio.js +76 -0
- package/templates/generic/AGENTS.md +60 -0
- package/templates/generic/CLAUDE.md +2 -0
- package/templates/generic/LICENSE +21 -0
- package/templates/generic/README.md +13 -0
- package/templates/generic/UIConfig.json +23 -0
- package/templates/generic/VOLUMIO_API.md +91 -0
- package/templates/generic/config.json +3 -0
- package/templates/generic/gitignore +2 -0
- package/templates/generic/i18n/strings_en.json +8 -0
- package/templates/generic/index.js +81 -0
- package/templates/generic/install.sh +4 -0
- package/templates/generic/package.json +17 -0
- package/templates/generic/test/plugin.test.js +24 -0
- package/templates/generic/test/volumio.js +29 -0
- package/templates/generic/uninstall.sh +4 -0
- package/templates/generic/volumio-plugin.json +13 -0
- package/templates/music_service/UIConfig.json +23 -0
- package/templates/music_service/catalog.json +4 -0
- package/templates/music_service/config.json +3 -0
- package/templates/music_service/i18n/strings_en.json +8 -0
- package/templates/music_service/index.js +135 -0
- package/templates/music_service/test/music.test.js +52 -0
- package/templates/music_service/test/plugin.test.js +29 -0
- package/templates/music_service/volumio-plugin.json +13 -0
|
@@ -0,0 +1,485 @@
|
|
|
1
|
+
{
|
|
2
|
+
"80s80s": {
|
|
3
|
+
"G2.shell.set-e|install.sh": 1
|
|
4
|
+
},
|
|
5
|
+
"allo_relay_attenuator": {
|
|
6
|
+
"G2.js.shell|index.js": 13,
|
|
7
|
+
"G2.js.sync-exec|index.js": 3,
|
|
8
|
+
"G2.shell.set-e|install.sh": 1,
|
|
9
|
+
"G2.shell.sudoers|install.sh": 5,
|
|
10
|
+
"G2.shell.package-manager|install.sh": 7
|
|
11
|
+
},
|
|
12
|
+
"argon_one_up": {
|
|
13
|
+
"G2.js.shell|index.js": 9,
|
|
14
|
+
"G2.shell.set-e|install.sh": 1,
|
|
15
|
+
"G2.shell.package-manager|install.sh": 2,
|
|
16
|
+
"G2.shell.or-true|install.sh": 4,
|
|
17
|
+
"G2.shell.sudoers|install.sh": 1
|
|
18
|
+
},
|
|
19
|
+
"artwork_one": {
|
|
20
|
+
"G2.js.sync-exec|index.js": 1,
|
|
21
|
+
"G2.js.console-log|ui/assets/firebase-Bpe4sERF.js": 4,
|
|
22
|
+
"G2.js.console-log|ui/assets/hls-C2ZFWO1Z.js": 1,
|
|
23
|
+
"G2.shell.set-e|install.sh": 1,
|
|
24
|
+
"G2.secret|ui/assets/index-DDzmwuMK.js": 1
|
|
25
|
+
},
|
|
26
|
+
"audio_keepalive": {
|
|
27
|
+
"G2.js.shell|index.js": 1,
|
|
28
|
+
"G2.shell.set-e|install.sh": 1,
|
|
29
|
+
"G2.shell.sudoers|install.sh": 1,
|
|
30
|
+
"G2.shell.or-true|install.sh": 2
|
|
31
|
+
},
|
|
32
|
+
"audiophonics_evo_sabre": {
|
|
33
|
+
"G2.js.shell|index.js": 2,
|
|
34
|
+
"G2.shell.set-e|install.sh": 1,
|
|
35
|
+
"G2.shell.sudoers|install.sh": 1,
|
|
36
|
+
"G2.shell.or-true|install.sh": 10
|
|
37
|
+
},
|
|
38
|
+
"audiophonicsonoff": {
|
|
39
|
+
"G2.shell.set-e|install.sh": 1
|
|
40
|
+
},
|
|
41
|
+
"autostart": {
|
|
42
|
+
"G2.shell.set-e|install.sh": 1
|
|
43
|
+
},
|
|
44
|
+
"backup_restore": {
|
|
45
|
+
"G2.js.shell|index.js": 4,
|
|
46
|
+
"G2.js.console-log|index.js": 2,
|
|
47
|
+
"G2.shell.set-e|install.sh": 1
|
|
48
|
+
},
|
|
49
|
+
"bandcamp": {
|
|
50
|
+
"G2.shell.set-e|install.sh": 1
|
|
51
|
+
},
|
|
52
|
+
"Bluetoothremote": {
|
|
53
|
+
"G2.js.shell|index.js": 10,
|
|
54
|
+
"G2.shell.set-e|install.sh": 1,
|
|
55
|
+
"G2.shell.package-manager|install.sh": 1
|
|
56
|
+
},
|
|
57
|
+
"calmradio": {
|
|
58
|
+
"G2.js.console-log|index.js": 2,
|
|
59
|
+
"G2.shell.set-e|install.sh": 1
|
|
60
|
+
},
|
|
61
|
+
"controradio": {
|
|
62
|
+
"G2.shell.set-e|install.sh": 1
|
|
63
|
+
},
|
|
64
|
+
"display_configuration": {
|
|
65
|
+
"G2.shell.set-e|install.sh": 1,
|
|
66
|
+
"G2.shell.sudoers|install.sh": 1,
|
|
67
|
+
"G2.shell.package-manager|install.sh": 1,
|
|
68
|
+
"G2.shell.or-true|install.sh": 1
|
|
69
|
+
},
|
|
70
|
+
"dmd2_music": {
|
|
71
|
+
"G2.shell.set-e|install.sh": 1
|
|
72
|
+
},
|
|
73
|
+
"es9018k2m": {
|
|
74
|
+
"G2.js.sync-exec|index.js": 1,
|
|
75
|
+
"G2.js.shell|index.js": 2,
|
|
76
|
+
"G2.js.command-router-override|index.js": 2,
|
|
77
|
+
"G2.shell.set-e|install.sh": 1,
|
|
78
|
+
"G2.shell.package-manager|install.sh": 1,
|
|
79
|
+
"G2.shellcheck.SC3020|install.sh": 1
|
|
80
|
+
},
|
|
81
|
+
"example_plugin": {
|
|
82
|
+
"G2.shell.set-e|install.sh": 1,
|
|
83
|
+
"G2.shell.package-manager|install.sh": 1
|
|
84
|
+
},
|
|
85
|
+
"ferrum_streaming_control_technology": {
|
|
86
|
+
"G2.shell.set-e|install.sh": 1
|
|
87
|
+
},
|
|
88
|
+
"flightmode": {
|
|
89
|
+
"G2.js.shell|index.js": 2,
|
|
90
|
+
"G2.secret.generic-api-key|index.js": 1
|
|
91
|
+
},
|
|
92
|
+
"fusiondsp": {
|
|
93
|
+
"G2.shell.set-e|install.sh": 1,
|
|
94
|
+
"G2.shell.package-manager|install.sh": 1,
|
|
95
|
+
"G2.shell.download|install.sh": 4,
|
|
96
|
+
"G2.shellcheck.SC2164|install.sh": 7,
|
|
97
|
+
"G2.shellcheck.SC2242|install.sh": 1
|
|
98
|
+
},
|
|
99
|
+
"gpio_button_led": {
|
|
100
|
+
"G2.shell.set-e|install.sh": 1
|
|
101
|
+
},
|
|
102
|
+
"gpio_control": {
|
|
103
|
+
"G2.shell.set-e|install.sh": 1,
|
|
104
|
+
"G2.shell.package-manager|install.sh": 1
|
|
105
|
+
},
|
|
106
|
+
"gpio-buttons": {
|
|
107
|
+
"G2.shell.set-e|install.sh": 1
|
|
108
|
+
},
|
|
109
|
+
"httpcaller": {
|
|
110
|
+
"G2.js.console-log|index.js": 12,
|
|
111
|
+
"G2.shell.set-e|install.sh": 1
|
|
112
|
+
},
|
|
113
|
+
"ir_activity_led": {
|
|
114
|
+
"G2.js.shell|index.js": 1,
|
|
115
|
+
"G2.shell.set-e|install.sh": 1
|
|
116
|
+
},
|
|
117
|
+
"ir_controller": {
|
|
118
|
+
"G2.js.sync-exec|index.js": 1,
|
|
119
|
+
"G2.js.shell|index.js": 5,
|
|
120
|
+
"G2.shell.set-e|install.sh": 1,
|
|
121
|
+
"G2.shell.package-manager|install.sh": 1,
|
|
122
|
+
"G2.shellcheck.SC1090|install.sh": 1,
|
|
123
|
+
"G2.shellcheck.SC2174|install.sh": 1
|
|
124
|
+
},
|
|
125
|
+
"jellyfin": {
|
|
126
|
+
"G2.shell.set-e|install.sh": 1
|
|
127
|
+
},
|
|
128
|
+
"jellyfin_server": {
|
|
129
|
+
"G2.shellcheck.SC3044|install.sh": 2
|
|
130
|
+
},
|
|
131
|
+
"jp_radio": {
|
|
132
|
+
"G2.shell.set-e|install.sh": 1,
|
|
133
|
+
"G2.secret.generic-api-key|dist/lib/consts/radiko-urls.d.ts": 1,
|
|
134
|
+
"G2.secret.generic-api-key|dist/lib/consts/radiko-urls.js": 1,
|
|
135
|
+
"G2.secret.generic-api-key|dist/lib/consts/radiko-urls.js.map": 1,
|
|
136
|
+
"G2.secret.generic-api-key|src/lib/consts/radiko-urls.ts": 1
|
|
137
|
+
},
|
|
138
|
+
"just_oled": {
|
|
139
|
+
"G2.js.shell|index.js": 2,
|
|
140
|
+
"G2.js.sync-exec|index.js": 1,
|
|
141
|
+
"G2.js.process-exit|scripts/resync.js": 3,
|
|
142
|
+
"G2.js.console-log|scripts/resync.js": 1,
|
|
143
|
+
"G2.shell.set-e|install.sh": 1,
|
|
144
|
+
"G2.shell.sudoers|install.sh": 1,
|
|
145
|
+
"G2.shell.or-true|install.sh": 7,
|
|
146
|
+
"G2.shell.package-manager|install.sh": 1
|
|
147
|
+
},
|
|
148
|
+
"korean_radio_alarm": {
|
|
149
|
+
"G2.js.shell|index.js": 1,
|
|
150
|
+
"G2.shell.set-e|install.sh": 1,
|
|
151
|
+
"G2.secret.jwt|index.js": 1
|
|
152
|
+
},
|
|
153
|
+
"lastfm": {
|
|
154
|
+
"G2.js.console-log|index.js": 2,
|
|
155
|
+
"G2.js.console-log|lib/simple-lastfm/index.js": 8,
|
|
156
|
+
"G2.js.console-log|pausableTimer.js": 6,
|
|
157
|
+
"G2.shell.set-e|install.sh": 1
|
|
158
|
+
},
|
|
159
|
+
"lcd1602_vumeter": {
|
|
160
|
+
"G2.js.shell|index.js": 2,
|
|
161
|
+
"G2.js.sync-exec|index.js": 1,
|
|
162
|
+
"G2.shell.set-e|install.sh": 1,
|
|
163
|
+
"G2.shell.sudoers|install.sh": 1,
|
|
164
|
+
"G2.shell.or-true|install.sh": 5,
|
|
165
|
+
"G2.shell.package-manager|install.sh": 1
|
|
166
|
+
},
|
|
167
|
+
"lyrion": {
|
|
168
|
+
"G2.shellcheck.SC3044|install.sh": 2
|
|
169
|
+
},
|
|
170
|
+
"metaroon": {
|
|
171
|
+
"G2.js.shell|index.js": 2,
|
|
172
|
+
"G2.shell.set-e|install.sh": 1,
|
|
173
|
+
"G2.shell.package-manager|install.sh": 3,
|
|
174
|
+
"G2.shell.download|install.sh": 1,
|
|
175
|
+
"G2.shellcheck.SC2034|install.sh": 1,
|
|
176
|
+
"G2.shellcheck.SC2010|install.sh": 1
|
|
177
|
+
},
|
|
178
|
+
"minidlna": {
|
|
179
|
+
"G2.js.shell|index.js": 2,
|
|
180
|
+
"G2.shell.set-e|install.sh": 1,
|
|
181
|
+
"G2.shell.package-manager|install.sh": 1,
|
|
182
|
+
"G2.shellcheck.SC1090|install.sh": 1
|
|
183
|
+
},
|
|
184
|
+
"mixcloud": {
|
|
185
|
+
"G2.shell.set-e|install.sh": 1,
|
|
186
|
+
"G2.shell.package-manager|install.sh": 2
|
|
187
|
+
},
|
|
188
|
+
"moosbox": {
|
|
189
|
+
"G2.shell.set-e|install.sh": 1
|
|
190
|
+
},
|
|
191
|
+
"motherearthradio": {
|
|
192
|
+
"G2.shell.set-e|install.sh": 1
|
|
193
|
+
},
|
|
194
|
+
"mpd_oled": {
|
|
195
|
+
"G2.js.sync-exec|index.js": 3,
|
|
196
|
+
"G2.js.shell|index.js": 3,
|
|
197
|
+
"G2.shell.set-e|install.sh": 1,
|
|
198
|
+
"G2.shell.package-manager|install.sh": 1,
|
|
199
|
+
"G2.shellcheck.SC2164|install.sh": 1
|
|
200
|
+
},
|
|
201
|
+
"mpdantic": {
|
|
202
|
+
"G2.js.sync-exec|index.js": 1,
|
|
203
|
+
"G2.shell.set-e|install.sh": 1,
|
|
204
|
+
"G2.shell.sudoers|install.sh": 1,
|
|
205
|
+
"G2.shell.or-true|install.sh": 1
|
|
206
|
+
},
|
|
207
|
+
"mpdoutput": {
|
|
208
|
+
"G2.js.shell|index.js": 2,
|
|
209
|
+
"G2.shell.set-e|install.sh": 1,
|
|
210
|
+
"G2.shell.sudoers|install.sh": 1
|
|
211
|
+
},
|
|
212
|
+
"mqtt_client": {
|
|
213
|
+
"G2.shell.set-e|install.sh": 1,
|
|
214
|
+
"G2.shell.package-manager|install.sh": 1,
|
|
215
|
+
"G2.shellcheck.SC2164|install.sh": 1
|
|
216
|
+
},
|
|
217
|
+
"music_services_shield": {
|
|
218
|
+
"G2.js.shell|index.js": 3,
|
|
219
|
+
"G2.js.sync-exec|index.js": 2,
|
|
220
|
+
"G2.shell.set-e|install.sh": 1,
|
|
221
|
+
"G2.shell.package-manager|install.sh": 2,
|
|
222
|
+
"G2.shellcheck.SC2242|install.sh": 1
|
|
223
|
+
},
|
|
224
|
+
"my_dmd2_music": {
|
|
225
|
+
"G2.shell.set-e|install.sh": 1
|
|
226
|
+
},
|
|
227
|
+
"myb": {
|
|
228
|
+
"G2.shell.set-e|install.sh": 1
|
|
229
|
+
},
|
|
230
|
+
"now_playing": {
|
|
231
|
+
"G2.js.console-log|dist/app/client/build/static/js/main.70c84897.js": 8,
|
|
232
|
+
"G2.js.console-log|scripts/buildUIConfigSchema.js": 2,
|
|
233
|
+
"G2.js.console-log|src/app/client/build/static/js/main.70c84897.js": 8,
|
|
234
|
+
"G2.shell.set-e|install.sh": 1,
|
|
235
|
+
"G2.shell.package-manager|install.sh": 1,
|
|
236
|
+
"G2.shellcheck.SC2164|install.sh": 1
|
|
237
|
+
},
|
|
238
|
+
"oled_display_ssd1309": {
|
|
239
|
+
"G2.js.sync-exec|index.js": 1,
|
|
240
|
+
"G2.js.process-exit|index.js": 1,
|
|
241
|
+
"G2.shellcheck.SC3010|install.sh": 1
|
|
242
|
+
},
|
|
243
|
+
"outcast": {
|
|
244
|
+
"G2.shell.set-e|install.sh": 1,
|
|
245
|
+
"G2.shell.sudoers|install.sh": 1,
|
|
246
|
+
"G2.shell.or-true|install.sh": 1,
|
|
247
|
+
"G2.shell.package-manager|install.sh": 1
|
|
248
|
+
},
|
|
249
|
+
"pandora": {
|
|
250
|
+
"G2.shell.set-e|install.sh": 1,
|
|
251
|
+
"G2.secret.generic-api-key|pandora_handler.js": 2
|
|
252
|
+
},
|
|
253
|
+
"peppymeterbasic": {
|
|
254
|
+
"G2.js.shell|index.js": 6,
|
|
255
|
+
"G2.js.console-log|index.js": 4,
|
|
256
|
+
"G2.js.sync-exec|index.js": 4,
|
|
257
|
+
"G2.shell.set-e|install.sh": 1,
|
|
258
|
+
"G2.shell.package-manager|install.sh": 2,
|
|
259
|
+
"G2.shellcheck.SC2242|install.sh": 1,
|
|
260
|
+
"G2.shellcheck.SC3010|install.sh": 1
|
|
261
|
+
},
|
|
262
|
+
"peppyspectrum": {
|
|
263
|
+
"G2.js.shell|index.js": 6,
|
|
264
|
+
"G2.js.console-log|index.js": 4,
|
|
265
|
+
"G2.js.sync-exec|index.js": 4,
|
|
266
|
+
"G2.shell.set-e|install.sh": 1,
|
|
267
|
+
"G2.shell.package-manager|install.sh": 1,
|
|
268
|
+
"G2.shellcheck.SC2242|install.sh": 1,
|
|
269
|
+
"G2.shellcheck.SC3010|install.sh": 1
|
|
270
|
+
},
|
|
271
|
+
"personal_radio": {
|
|
272
|
+
"G2.shell.set-e|install.sh": 1
|
|
273
|
+
},
|
|
274
|
+
"pi_screen_setup": {
|
|
275
|
+
"G2.js.sync-exec|index.js": 2,
|
|
276
|
+
"G2.js.sync-exec|lib/privileged.js": 1,
|
|
277
|
+
"G2.shell.set-e|install.sh": 1,
|
|
278
|
+
"G2.shell.sudoers|install.sh": 1,
|
|
279
|
+
"G2.shell.or-true|install.sh": 2
|
|
280
|
+
},
|
|
281
|
+
"pirate_audio_screensaver": {
|
|
282
|
+
"G2.js.shell|index.js": 1,
|
|
283
|
+
"G2.shell.package-manager|install.sh": 2,
|
|
284
|
+
"G2.shell.or-true|install.sh": 1,
|
|
285
|
+
"G2.shellcheck.SC1007|install.sh": 1
|
|
286
|
+
},
|
|
287
|
+
"pirateaudio": {
|
|
288
|
+
"G2.js.shell|index.js": 3,
|
|
289
|
+
"G2.shell.set-e|install.sh": 1,
|
|
290
|
+
"G2.shell.package-manager|install.sh": 2
|
|
291
|
+
},
|
|
292
|
+
"player_status_led": {
|
|
293
|
+
"G2.shell.set-e|install.sh": 1
|
|
294
|
+
},
|
|
295
|
+
"plex": {
|
|
296
|
+
"G2.js.command-router-override|dist/volumio/adapter.js": 2,
|
|
297
|
+
"G2.shell.set-e|install.sh": 1,
|
|
298
|
+
"G2.shell.package-manager|install.sh": 1
|
|
299
|
+
},
|
|
300
|
+
"podcast": {
|
|
301
|
+
"G2.shell.set-e|install.sh": 1
|
|
302
|
+
},
|
|
303
|
+
"rad357pl": {
|
|
304
|
+
"G2.shell.set-e|install.sh": 1
|
|
305
|
+
},
|
|
306
|
+
"radio_browser": {
|
|
307
|
+
"G2.shell.set-e|install.sh": 1
|
|
308
|
+
},
|
|
309
|
+
"radio_fip": {
|
|
310
|
+
"G2.shell.package-manager|install.sh": 1
|
|
311
|
+
},
|
|
312
|
+
"radio_paradise": {
|
|
313
|
+
"G2.shell.set-e|install.sh": 1
|
|
314
|
+
},
|
|
315
|
+
"randomizer": {
|
|
316
|
+
"G2.shell.set-e|install.sh": 1
|
|
317
|
+
},
|
|
318
|
+
"raspdac_mini_lcd": {
|
|
319
|
+
"G2.js.shell|index.js": 3,
|
|
320
|
+
"G2.shell.set-e|install.sh": 1,
|
|
321
|
+
"G2.shell.sudoers|install.sh": 3,
|
|
322
|
+
"G2.shell.or-true|install.sh": 9
|
|
323
|
+
},
|
|
324
|
+
"recently_added": {
|
|
325
|
+
"G2.js.process-exit|index.js": 1,
|
|
326
|
+
"G2.shell.set-e|install.sh": 1
|
|
327
|
+
},
|
|
328
|
+
"remotepi": {
|
|
329
|
+
"G2.js.shell|index.js": 1,
|
|
330
|
+
"G2.shell.set-e|install.sh": 1,
|
|
331
|
+
"G2.shell.package-manager|install.sh": 2,
|
|
332
|
+
"G2.shellcheck.SC1090|install.sh": 1
|
|
333
|
+
},
|
|
334
|
+
"RoonBridge": {
|
|
335
|
+
"G2.js.shell|index.js": 3,
|
|
336
|
+
"G2.shell.set-e|install.sh": 1,
|
|
337
|
+
"G2.shell.package-manager|install.sh": 1,
|
|
338
|
+
"G2.shell.download|install.sh": 1,
|
|
339
|
+
"G2.shellcheck.SC2164|install.sh": 2,
|
|
340
|
+
"G2.shellcheck.SC2154|install.sh": 1,
|
|
341
|
+
"G2.shellcheck.SC2266|install.sh": 1
|
|
342
|
+
},
|
|
343
|
+
"roseaudiosys": {
|
|
344
|
+
"G2.shell.set-e|install.sh": 1
|
|
345
|
+
},
|
|
346
|
+
"rotaryencoder2": {
|
|
347
|
+
"G2.js.console-log|_test/test.js": 4,
|
|
348
|
+
"G2.js.console-log|_test/testsocket.js": 4,
|
|
349
|
+
"G2.js.shell|index.js": 3,
|
|
350
|
+
"G2.shell.set-e|install.sh": 1
|
|
351
|
+
},
|
|
352
|
+
"rp2": {
|
|
353
|
+
"G2.js.console-log|dist/lib/playback/MPVPlayer.js": 2,
|
|
354
|
+
"G2.js.console-log|scripts/buildUIConfigSchema.js": 2,
|
|
355
|
+
"G2.shell.set-e|install.sh": 1,
|
|
356
|
+
"G2.shell.package-manager|install.sh": 1
|
|
357
|
+
},
|
|
358
|
+
"rpi_eeprom_config": {
|
|
359
|
+
"G2.js.shell|index.js": 6,
|
|
360
|
+
"G2.shell.set-e|install.sh": 1,
|
|
361
|
+
"G2.shell.package-manager|install.sh": 4,
|
|
362
|
+
"G2.shell.sudoers|install.sh": 4
|
|
363
|
+
},
|
|
364
|
+
"rpi_eeprom_updater": {
|
|
365
|
+
"G2.js.sync-exec|index.js": 33,
|
|
366
|
+
"G2.shell.set-e|install.sh": 1,
|
|
367
|
+
"G2.shell.package-manager|install.sh": 2,
|
|
368
|
+
"G2.shell.sudoers|install.sh": 4
|
|
369
|
+
},
|
|
370
|
+
"rtlsdr_radio": {
|
|
371
|
+
"G2.js.sync-exec|index.js": 2,
|
|
372
|
+
"G2.js.console-log|lib/metadata.js": 22,
|
|
373
|
+
"G2.shell.set-e|install.sh": 1,
|
|
374
|
+
"G2.shell.package-manager|install.sh": 8,
|
|
375
|
+
"G2.shell.sudoers|install.sh": 2,
|
|
376
|
+
"G2.secret.generic-api-key|lib/metadata.js": 1
|
|
377
|
+
},
|
|
378
|
+
"scheduledrestart": {
|
|
379
|
+
"G2.js.shell|index.js": 1,
|
|
380
|
+
"G2.shell.set-e|install.sh": 1
|
|
381
|
+
},
|
|
382
|
+
"serialampcontroller": {
|
|
383
|
+
"G2.shell.set-e|install.sh": 1,
|
|
384
|
+
"G2.shell.package-manager|install.sh": 1
|
|
385
|
+
},
|
|
386
|
+
"SleepWakePlugin": {
|
|
387
|
+
"G2.shell.set-e|install.sh": 1
|
|
388
|
+
},
|
|
389
|
+
"soloist_connect": {
|
|
390
|
+
"G2.js.shell|index.js": 11,
|
|
391
|
+
"G2.js.sync-exec|index.js": 5,
|
|
392
|
+
"G2.shell.package-manager|install.sh": 2,
|
|
393
|
+
"G2.shell.or-true|install.sh": 1,
|
|
394
|
+
"G2.shell.sudoers|install.sh": 2
|
|
395
|
+
},
|
|
396
|
+
"soundcloud": {
|
|
397
|
+
"G2.js.console-log|scripts/buildUIConfigSchema.js": 2,
|
|
398
|
+
"G2.shell.set-e|install.sh": 1,
|
|
399
|
+
"G2.shell.package-manager|install.sh": 2
|
|
400
|
+
},
|
|
401
|
+
"spop": {
|
|
402
|
+
"G2.js.console-log|apiclient.js": 6,
|
|
403
|
+
"G2.js.shell|index.js": 3,
|
|
404
|
+
"G2.js.console-log|index.js": 1,
|
|
405
|
+
"G2.js.console-log|wsclient.js": 1,
|
|
406
|
+
"G2.shell.set-e|install.sh": 1,
|
|
407
|
+
"G2.shell.download|install.sh": 1
|
|
408
|
+
},
|
|
409
|
+
"squeezelite_mc": {
|
|
410
|
+
"G2.shell.set-e|install.sh": 1,
|
|
411
|
+
"G2.shellcheck.SC2242|install.sh": 2,
|
|
412
|
+
"G2.shellcheck.SC2046|install.sh": 1
|
|
413
|
+
},
|
|
414
|
+
"storage_manager": {
|
|
415
|
+
"G2.js.shell|index.js": 1,
|
|
416
|
+
"G2.shell.set-e|install.sh": 1,
|
|
417
|
+
"G2.shell.package-manager|install.sh": 4,
|
|
418
|
+
"G2.shell.or-true|install.sh": 2,
|
|
419
|
+
"G2.shell.sudoers|install.sh": 1
|
|
420
|
+
},
|
|
421
|
+
"stylish_player": {
|
|
422
|
+
"G2.js.console-log|app/assets/index-C9e7n1B3.js": 3,
|
|
423
|
+
"G2.js.sync-exec|index.js": 11,
|
|
424
|
+
"G2.js.shell|index.js": 2,
|
|
425
|
+
"G2.shell.set-e|install.sh": 1
|
|
426
|
+
},
|
|
427
|
+
"Systeminfo": {
|
|
428
|
+
"G2.js.shell|index.js": 25,
|
|
429
|
+
"G2.shell.set-e|install.sh": 1,
|
|
430
|
+
"G2.shell.package-manager|install.sh": 1,
|
|
431
|
+
"G2.shellcheck.SC2242|install.sh": 1
|
|
432
|
+
},
|
|
433
|
+
"touch_display": {
|
|
434
|
+
"G2.js.console-log|iframe_keyboard_bridge/content.js": 4,
|
|
435
|
+
"G2.js.shell|index.js": 22,
|
|
436
|
+
"G2.shell.set-e|install.sh": 1,
|
|
437
|
+
"G2.shell.package-manager|install.sh": 9,
|
|
438
|
+
"G2.shellcheck.SC1090|install.sh": 1
|
|
439
|
+
},
|
|
440
|
+
"unhappy_triggerhappy": {
|
|
441
|
+
"G2.js.shell|index.js": 2,
|
|
442
|
+
"G2.shell.set-e|install.sh": 1,
|
|
443
|
+
"G2.shell.sudoers|install.sh": 1,
|
|
444
|
+
"G2.shell.or-true|install.sh": 1
|
|
445
|
+
},
|
|
446
|
+
"unspike": {
|
|
447
|
+
"G2.js.shell|index.js": 2,
|
|
448
|
+
"G2.shell.set-e|install.sh": 1,
|
|
449
|
+
"G2.shell.sudoers|install.sh": 1,
|
|
450
|
+
"G2.shell.or-true|install.sh": 1
|
|
451
|
+
},
|
|
452
|
+
"volumio-stream-watchdog": {
|
|
453
|
+
"G2.js.command-router-override|index.js": 2,
|
|
454
|
+
"G2.shell.set-e|install.sh": 1
|
|
455
|
+
},
|
|
456
|
+
"volusonic": {
|
|
457
|
+
"G2.shell.set-e|install.sh": 1
|
|
458
|
+
},
|
|
459
|
+
"waveshare28": {
|
|
460
|
+
"G2.js.sync-exec|index.js": 2,
|
|
461
|
+
"G2.js.shell|index.js": 1,
|
|
462
|
+
"G2.shell.sudoers|install.sh": 2,
|
|
463
|
+
"G2.shell.or-true|install.sh": 1
|
|
464
|
+
},
|
|
465
|
+
"youtube2": {
|
|
466
|
+
"G2.js.console-log|scripts/buildUIConfigSchema.js": 2,
|
|
467
|
+
"G2.shell.set-e|install.sh": 1,
|
|
468
|
+
"G2.shell.package-manager|install.sh": 2,
|
|
469
|
+
"G2.shellcheck.SC3044|install.sh": 2,
|
|
470
|
+
"G2.shellcheck.SC2164|install.sh": 2
|
|
471
|
+
},
|
|
472
|
+
"ytcr": {
|
|
473
|
+
"G2.shell.set-e|install.sh": 1,
|
|
474
|
+
"G2.shell.package-manager|install.sh": 1,
|
|
475
|
+
"G2.shellcheck.SC3044|install.sh": 2,
|
|
476
|
+
"G2.shellcheck.SC2164|install.sh": 2
|
|
477
|
+
},
|
|
478
|
+
"ytmusic": {
|
|
479
|
+
"G2.js.console-log|scripts/buildUIConfigSchema.js": 2,
|
|
480
|
+
"G2.shell.set-e|install.sh": 1,
|
|
481
|
+
"G2.shell.package-manager|install.sh": 4,
|
|
482
|
+
"G2.shellcheck.SC3044|install.sh": 2,
|
|
483
|
+
"G2.shellcheck.SC2164|install.sh": 2
|
|
484
|
+
}
|
|
485
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://volumio.com/schemas/plugin/manifest-v2.json",
|
|
4
|
+
"title": "Volumio plugin manifest (volumio-plugin.json)",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["id", "version", "type", "function", "title", "description", "engines", "arch", "permissions", "license"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"$schema": { "type": "string" },
|
|
10
|
+
"id": {
|
|
11
|
+
"description": "On-device folder name. No hyphens: the crypter rejects them.",
|
|
12
|
+
"type": "string",
|
|
13
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9_]{1,63}$"
|
|
14
|
+
},
|
|
15
|
+
"version": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-[0-9A-Za-z.-]+)?$"
|
|
18
|
+
},
|
|
19
|
+
"type": {
|
|
20
|
+
"enum": ["audio_interface", "miscellanea", "music_service", "system_controller", "system_hardware", "user_interface"]
|
|
21
|
+
},
|
|
22
|
+
"function": {
|
|
23
|
+
"description": "Id from the closed function registry. One active plugin per function on a device.",
|
|
24
|
+
"type": "string",
|
|
25
|
+
"pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
|
|
26
|
+
},
|
|
27
|
+
"title": { "description": "Name shown in the store and the UI (v1 prettyName)", "type": "string", "minLength": 1, "maxLength": 80 },
|
|
28
|
+
"description": { "description": "What the plugin does (v1 details)", "type": "string", "minLength": 1 },
|
|
29
|
+
"icon": { "description": "Font Awesome class, as in v1", "type": "string", "minLength": 1 },
|
|
30
|
+
"changelog": { "type": "string" },
|
|
31
|
+
"bootPriority": { "description": "Start group, as v1 boot_priority. Default 100", "type": "integer", "minimum": 1, "maximum": 100 },
|
|
32
|
+
"engines": {
|
|
33
|
+
"type": "object",
|
|
34
|
+
"additionalProperties": false,
|
|
35
|
+
"required": ["volumio", "api"],
|
|
36
|
+
"properties": {
|
|
37
|
+
"volumio": { "description": "semver range", "type": "string", "minLength": 1 },
|
|
38
|
+
"api": { "description": "The plugin API the code is written for: 1, the one Volumio runs (kew promises, commandRouter)", "const": "1" }
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"arch": {
|
|
42
|
+
"type": "array",
|
|
43
|
+
"minItems": 1,
|
|
44
|
+
"uniqueItems": true,
|
|
45
|
+
"items": { "enum": ["armhf", "arm64", "amd64"] }
|
|
46
|
+
},
|
|
47
|
+
"permissions": {
|
|
48
|
+
"type": "array",
|
|
49
|
+
"uniqueItems": true,
|
|
50
|
+
"items": {
|
|
51
|
+
"anyOf": [
|
|
52
|
+
{ "enum": ["playback", "broadcast", "browse-source", "ui:toast", "ui:modal", "aampp", "spectrum"] },
|
|
53
|
+
{ "type": "string", "pattern": "^plugin:[A-Za-z0-9_]+\\.[A-Za-z0-9_]+$" }
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"network": {
|
|
58
|
+
"description": "Hosts the plugin talks to. Not enforced: transparency, G4 comparison, fault injection.",
|
|
59
|
+
"type": "array",
|
|
60
|
+
"uniqueItems": true,
|
|
61
|
+
"items": { "type": "string", "pattern": "^(\\*\\.)?[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$" }
|
|
62
|
+
},
|
|
63
|
+
"system": {
|
|
64
|
+
"type": "object",
|
|
65
|
+
"additionalProperties": false,
|
|
66
|
+
"properties": {
|
|
67
|
+
"apt": {
|
|
68
|
+
"type": "array",
|
|
69
|
+
"uniqueItems": true,
|
|
70
|
+
"items": { "type": "string", "pattern": "^[a-z0-9][a-z0-9+.-]+$" }
|
|
71
|
+
},
|
|
72
|
+
"services": {
|
|
73
|
+
"type": "array",
|
|
74
|
+
"uniqueItems": true,
|
|
75
|
+
"items": { "type": "string", "pattern": "^[A-Za-z0-9_@.-]+\\.(service|timer|socket)$" }
|
|
76
|
+
},
|
|
77
|
+
"writes": {
|
|
78
|
+
"type": "array",
|
|
79
|
+
"uniqueItems": true,
|
|
80
|
+
"items": { "type": "string", "pattern": "^/" }
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"settings": { "description": "Path to settings.schema.json, relative to the plugin root", "type": "string", "pattern": "^[^/]" },
|
|
85
|
+
"test": {
|
|
86
|
+
"type": "object",
|
|
87
|
+
"additionalProperties": false,
|
|
88
|
+
"properties": {
|
|
89
|
+
"credentials": { "type": "array", "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
|
|
90
|
+
"scenarios": { "type": "string", "pattern": "^[^/]" }
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"license": { "description": "SPDX identifier", "type": "string", "minLength": 1 }
|
|
94
|
+
}
|
|
95
|
+
}
|
package/src/audit.js
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { spawnSync } from 'node:child_process';
|
|
2
|
+
|
|
3
|
+
const BLOCKING = new Set(['high', 'critical']);
|
|
4
|
+
|
|
5
|
+
const unavailable = (report) => ({
|
|
6
|
+
rule: 'G2.audit.unavailable',
|
|
7
|
+
severity: 'warning',
|
|
8
|
+
file: 'package-lock.json',
|
|
9
|
+
message: `npm audit did not run${report?.error?.code ? `: ${report.error.code}` : ''}`,
|
|
10
|
+
fix: 'Run the build again when the npm registry is reachable',
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* G2: high and critical advisories on the production dependencies, from `npm audit --json`.
|
|
15
|
+
* An audit that could not run is a warning: an npm outage must not block every release.
|
|
16
|
+
* @param {{ vulnerabilities?: Record<string, { name: string, severity: string, range: string, fixAvailable: unknown, via: Array<string | { title?: string }> }>, error?: { code?: string } } | undefined} report
|
|
17
|
+
* @param {'v1' | 'v2' | undefined} source
|
|
18
|
+
*/
|
|
19
|
+
export function auditFindings(report, source) {
|
|
20
|
+
if (!report?.vulnerabilities) return [unavailable(report)];
|
|
21
|
+
return Object.values(report.vulnerabilities)
|
|
22
|
+
.filter((v) => BLOCKING.has(v.severity))
|
|
23
|
+
.map((v) => {
|
|
24
|
+
const advisories = [...new Set(v.via.filter((x) => typeof x === 'object').map((x) => x.title))];
|
|
25
|
+
const cause = advisories.length ? advisories.join('; ') : `through ${v.via.join(', ')}`;
|
|
26
|
+
return {
|
|
27
|
+
rule: 'G2.audit',
|
|
28
|
+
severity: source === 'v1' ? 'warning' : 'error',
|
|
29
|
+
file: 'package-lock.json',
|
|
30
|
+
message: `${v.name} ${v.range}: ${v.severity} (${cause})`,
|
|
31
|
+
fix: v.fixAvailable ? `npm audit fix, or update ${v.name}` : `Replace ${v.name}: there is no fixed version`,
|
|
32
|
+
};
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/** Runs npm audit on an installed package folder. npm exits non-zero when it finds advisories: the JSON is what counts. */
|
|
37
|
+
export function runAudit(dir, source) {
|
|
38
|
+
const run = spawnSync('npm', ['audit', '--omit=dev', '--json'], { cwd: dir, encoding: 'utf8' });
|
|
39
|
+
let report;
|
|
40
|
+
try {
|
|
41
|
+
report = JSON.parse(run.stdout);
|
|
42
|
+
} catch {
|
|
43
|
+
report = undefined;
|
|
44
|
+
}
|
|
45
|
+
return auditFindings(report, source);
|
|
46
|
+
}
|