@vestra-player/sdk 1.10.1 → 1.11.0-rc.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/CHANGELOG.md +22 -0
- package/bin/vestra-plugin.mjs +1 -131
- package/dist/api-requests.d.ts +1 -1
- package/dist/api-requests.js +9 -2
- package/dist/docs-tree.json.gz +0 -0
- package/dist/manifest.d.ts +0 -5
- package/dist/manifest.js +1 -8
- package/dist/mpv.js +1 -1
- package/dist/plugin/appearance.d.ts +2 -2
- package/dist/plugin/appearance.js +3 -3
- package/dist/plugin/connection.d.ts +38 -28
- package/dist/plugin/connection.js +101 -98
- package/dist/plugin/index.js +8 -6
- package/dist/plugin/passes.js +1 -1
- package/dist/plugin/player/events.d.ts +18 -9
- package/dist/plugin/player/events.js +36 -11
- package/dist/plugin/player.d.ts +45 -28
- package/dist/plugin/player.js +77 -68
- package/dist/plugin/scope.d.ts +2 -9
- package/dist/plugin/scope.js +22 -27
- package/dist/plugin/subtitles.d.ts +6 -1
- package/dist/plugin/subtitles.js +18 -2
- package/dist/plugin/testing/commands.js +1 -1
- package/dist/plugin/testing/facts.d.ts +46 -0
- package/dist/plugin/testing/facts.js +106 -0
- package/dist/plugin/testing/index.d.ts +12 -14
- package/dist/plugin/testing/index.js +52 -18
- package/dist/plugin/testing/media.js +6 -0
- package/dist/plugin/testing/revoke.d.ts +15 -0
- package/dist/plugin/testing/revoke.js +13 -0
- package/dist/plugin/testing/transport.js +8 -0
- package/dist/plugin/timeline.d.ts +2 -2
- package/dist/plugin/timeline.js +3 -3
- package/dist/plugin/types/base.d.ts +15 -15
- package/dist/plugin/types/commands.d.ts +8 -8
- package/dist/plugin/types/playback.d.ts +247 -116
- package/dist/plugin/types/plugin-wire.d.ts +2 -2
- package/dist/plugin/types/processing.d.ts +2 -3
- package/dist/plugin/types/subtitles.d.ts +9 -8
- package/dist/plugin/types/ui-layout.d.ts +32 -17
- package/dist/plugin/types/ui-locale.d.ts +9 -9
- package/dist/plugin/types/ui-shell.d.ts +7 -6
- package/dist/plugin/view/layout.d.ts +33 -1
- package/dist/plugin/view/layout.js +63 -34
- package/dist/plugin/window.d.ts +9 -1
- package/dist/plugin/window.js +14 -2
- package/dist/processing.d.ts +2 -2
- package/dist/request-queue.d.ts +7 -3
- package/dist/request-queue.js +19 -5
- package/dist/ts-plugin.d.ts +3 -4
- package/dist/ts-plugin.js +1 -1
- package/dist/wire.d.ts +1 -1
- package/dist/wire.js +1 -1
- package/llms.txt +3 -3
- package/package.json +2 -4
- package/capability-scan.json +0 -389
- package/dist/capability-scan.d.ts +0 -95
- package/dist/capability-scan.js +0 -249
- package/dist/member-uses.d.ts +0 -61
- package/dist/member-uses.js +0 -160
package/capability-scan.json
DELETED
|
@@ -1,389 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"about": "The capability scan's table (docs/reference/scan.md): which API members and which requests of the player's protocol cross a boundary the user should know about, by category. Hand-maintained: every method of the public API is in exactly one list, a category's or none's, and every request the SDK sends has a category by name or prefix (test/capability-scan.test.ts). `vestra-plugin scan` reports the categories a plugin uses. It changes nothing at run time; since SDK 1.9.0 it is the only disclosure (manifests declare nothing).",
|
|
3
|
-
"version": 1,
|
|
4
|
-
"categories": {
|
|
5
|
-
"player": {
|
|
6
|
-
"about": "Changes the user's own player settings, or the player beyond what the plugin itself contributes: shortcuts, theme, language, rendering mode, a restart, mpv driven directly.",
|
|
7
|
-
"members": [
|
|
8
|
-
"Appearance.set",
|
|
9
|
-
"Appearance.setLanguage",
|
|
10
|
-
"Bindings.reset",
|
|
11
|
-
"Bindings.set",
|
|
12
|
-
"Mpv.command",
|
|
13
|
-
"Mpv.set",
|
|
14
|
-
"Rendering.restartPlayer",
|
|
15
|
-
"Rendering.setPreference"
|
|
16
|
-
],
|
|
17
|
-
"requests": [
|
|
18
|
-
"appearance.set",
|
|
19
|
-
"appearance.setLanguage",
|
|
20
|
-
"bindings.reset",
|
|
21
|
-
"bindings.set",
|
|
22
|
-
"mpv.command",
|
|
23
|
-
"mpv.set",
|
|
24
|
-
"rendering.restart",
|
|
25
|
-
"rendering.setPreference"
|
|
26
|
-
]
|
|
27
|
-
},
|
|
28
|
-
"plugins": {
|
|
29
|
-
"about": "Acts on other plugins: installs, uninstalls, disables or reloads them, or runs any command, theirs included.",
|
|
30
|
-
"members": [
|
|
31
|
-
"Commands.run",
|
|
32
|
-
"PackageCandidate.install",
|
|
33
|
-
"Packages.reload",
|
|
34
|
-
"Packages.setEnabled",
|
|
35
|
-
"Packages.uninstall",
|
|
36
|
-
"Packages.validate",
|
|
37
|
-
"Packages.validateArchive"
|
|
38
|
-
],
|
|
39
|
-
"requests": ["commands.run", "packages.*"]
|
|
40
|
-
},
|
|
41
|
-
"clipboard": {
|
|
42
|
-
"about": "Reads or writes the system clipboard.",
|
|
43
|
-
"members": [
|
|
44
|
-
"Clipboard.readText",
|
|
45
|
-
"Clipboard.writeImage",
|
|
46
|
-
"Clipboard.writeText"
|
|
47
|
-
],
|
|
48
|
-
"requests": [
|
|
49
|
-
"clipboard.readText",
|
|
50
|
-
"clipboard.writeImage",
|
|
51
|
-
"clipboard.writeText"
|
|
52
|
-
]
|
|
53
|
-
},
|
|
54
|
-
"credentials": {
|
|
55
|
-
"about": "Reads or writes sign-in details in the system keychain.",
|
|
56
|
-
"members": ["Secrets.delete", "Secrets.get", "Secrets.set"],
|
|
57
|
-
"requests": ["secrets.delete", "secrets.get", "secrets.set"]
|
|
58
|
-
},
|
|
59
|
-
"camera": {
|
|
60
|
-
"about": "Uses a camera. No member of the API does today.",
|
|
61
|
-
"members": [],
|
|
62
|
-
"requests": []
|
|
63
|
-
},
|
|
64
|
-
"microphone": {
|
|
65
|
-
"about": "Records from a microphone. No member of the API does today.",
|
|
66
|
-
"members": [],
|
|
67
|
-
"requests": []
|
|
68
|
-
},
|
|
69
|
-
"screen": {
|
|
70
|
-
"about": "Captures the screen or other windows. No member of the API does today (a snapshot or an export is of the playing video).",
|
|
71
|
-
"members": [],
|
|
72
|
-
"requests": []
|
|
73
|
-
},
|
|
74
|
-
"notifications": {
|
|
75
|
-
"about": "Shows system notifications. No member of the API does today (a message on the video is the plugin's own).",
|
|
76
|
-
"members": [],
|
|
77
|
-
"requests": []
|
|
78
|
-
}
|
|
79
|
-
},
|
|
80
|
-
"none": {
|
|
81
|
-
"about": "Crosses no such boundary: the plugin's own contributions, the playback session, reading state.",
|
|
82
|
-
"members": [
|
|
83
|
-
"App.openWindow",
|
|
84
|
-
"App.system",
|
|
85
|
-
"BackdropSlot.onChange",
|
|
86
|
-
"Bindings.list",
|
|
87
|
-
"Bindings.onChange",
|
|
88
|
-
"Command.set",
|
|
89
|
-
"CommandOptions.run",
|
|
90
|
-
"Commands.add",
|
|
91
|
-
"Commands.keys",
|
|
92
|
-
"Commands.list",
|
|
93
|
-
"Condition.and",
|
|
94
|
-
"Condition.not",
|
|
95
|
-
"Condition.or",
|
|
96
|
-
"Dialogs.confirm",
|
|
97
|
-
"Dialogs.openDirectory",
|
|
98
|
-
"Dialogs.openFile",
|
|
99
|
-
"Dialogs.openFiles",
|
|
100
|
-
"Dialogs.saveFile",
|
|
101
|
-
"Disposable.dispose",
|
|
102
|
-
"DropHandler.drop",
|
|
103
|
-
"Drops.provide",
|
|
104
|
-
"ExportJob.cancel",
|
|
105
|
-
"ExportJob.onChange",
|
|
106
|
-
"ExportJob.refresh",
|
|
107
|
-
"FileResolverOptions.resolve",
|
|
108
|
-
"Host.run",
|
|
109
|
-
"I18n.error",
|
|
110
|
-
"I18n.list",
|
|
111
|
-
"I18n.resolve",
|
|
112
|
-
"I18n.text",
|
|
113
|
-
"JsonStore.flush",
|
|
114
|
-
"JsonStore.save",
|
|
115
|
-
"MainWindow.onChange",
|
|
116
|
-
"MainWindow.setAlwaysOnTop",
|
|
117
|
-
"MainWindow.setCursorAutoHide",
|
|
118
|
-
"MainWindow.setPictureInPicture",
|
|
119
|
-
"MainWindow.setVideoArea",
|
|
120
|
-
"Media.close",
|
|
121
|
-
"Media.onEnd",
|
|
122
|
-
"Media.ready",
|
|
123
|
-
"MediaCapture.capture",
|
|
124
|
-
"MediaCapture.export",
|
|
125
|
-
"MediaCapture.exportCheck",
|
|
126
|
-
"MediaSources.forget",
|
|
127
|
-
"MediaSources.get",
|
|
128
|
-
"MediaSources.list",
|
|
129
|
-
"MediaSources.locate",
|
|
130
|
-
"MediaSources.open",
|
|
131
|
-
"MediaSources.remember",
|
|
132
|
-
"Mpv.get",
|
|
133
|
-
"Mpv.observe",
|
|
134
|
-
"Osd.panel",
|
|
135
|
-
"Osd.show",
|
|
136
|
-
"OsdPanel.set",
|
|
137
|
-
"PackageChange.cancel",
|
|
138
|
-
"PackageChange.onChange",
|
|
139
|
-
"Packages.list",
|
|
140
|
-
"Packages.onChange",
|
|
141
|
-
"Palette.lead",
|
|
142
|
-
"PaletteLead.done",
|
|
143
|
-
"PaletteLead.onRun",
|
|
144
|
-
"PaletteLead.update",
|
|
145
|
-
"Panel.onChange",
|
|
146
|
-
"Panel.onDrop",
|
|
147
|
-
"Panel.setInteraction",
|
|
148
|
-
"Panel.show",
|
|
149
|
-
"Panel.showMenu",
|
|
150
|
-
"Panel.toggle",
|
|
151
|
-
"PanelSlot.activate",
|
|
152
|
-
"PanelSlot.onChange",
|
|
153
|
-
"PanelSlot.setVisible",
|
|
154
|
-
"PanelSlot.toggle",
|
|
155
|
-
"Panels.mount",
|
|
156
|
-
"Player.addAudioTrack",
|
|
157
|
-
"Player.audioDevices",
|
|
158
|
-
"Player.chapters",
|
|
159
|
-
"Player.close",
|
|
160
|
-
"Player.isCurrent",
|
|
161
|
-
"Player.next",
|
|
162
|
-
"Player.on",
|
|
163
|
-
"Player.onChange",
|
|
164
|
-
"Player.open",
|
|
165
|
-
"Player.openStream",
|
|
166
|
-
"Player.previous",
|
|
167
|
-
"Player.provideSequence",
|
|
168
|
-
"Player.read",
|
|
169
|
-
"Player.refresh",
|
|
170
|
-
"Player.restart",
|
|
171
|
-
"Player.scrub",
|
|
172
|
-
"Player.seek",
|
|
173
|
-
"Player.selectAudioTrack",
|
|
174
|
-
"Player.setAudioDevice",
|
|
175
|
-
"Player.setLoop",
|
|
176
|
-
"Player.setOutput",
|
|
177
|
-
"Player.setPaused",
|
|
178
|
-
"Player.setRate",
|
|
179
|
-
"Player.setStepSeek",
|
|
180
|
-
"Player.stats",
|
|
181
|
-
"Player.step",
|
|
182
|
-
"Player.stream",
|
|
183
|
-
"Player.subscribe",
|
|
184
|
-
"Plugin.trigger",
|
|
185
|
-
"Power.preventSleep",
|
|
186
|
-
"RenderOptions.onStatus",
|
|
187
|
-
"RenderOptions.set",
|
|
188
|
-
"Rendering.state",
|
|
189
|
-
"ResolvedStream.frame",
|
|
190
|
-
"ResolvedStream.started",
|
|
191
|
-
"Resolvers.add",
|
|
192
|
-
"Scope.add",
|
|
193
|
-
"Scope.audio.filter",
|
|
194
|
-
"Scope.onDispose",
|
|
195
|
-
"Scope.onError",
|
|
196
|
-
"Scope.scope",
|
|
197
|
-
"Scope.state",
|
|
198
|
-
"Scope.update",
|
|
199
|
-
"Scope.video.filter",
|
|
200
|
-
"Scope.video.motion",
|
|
201
|
-
"Scope.video.render",
|
|
202
|
-
"Scope.video.shaders",
|
|
203
|
-
"Scope.video.view",
|
|
204
|
-
"Scrub.end",
|
|
205
|
-
"Scrub.seek",
|
|
206
|
-
"SequenceProvider.next",
|
|
207
|
-
"SequenceProvider.previous",
|
|
208
|
-
"SessionStorage.delete",
|
|
209
|
-
"SessionStorage.get",
|
|
210
|
-
"SessionStorage.keys",
|
|
211
|
-
"SessionStorage.set",
|
|
212
|
-
"Settings.page",
|
|
213
|
-
"Settings.show",
|
|
214
|
-
"SidebarSlot.setDetached",
|
|
215
|
-
"Snapshot.export",
|
|
216
|
-
"StateStream.stop",
|
|
217
|
-
"Storage.json",
|
|
218
|
-
"Stream.onStop",
|
|
219
|
-
"Stream.stop",
|
|
220
|
-
"StreamOptions.frame",
|
|
221
|
-
"Subtitles.load",
|
|
222
|
-
"Subtitles.onChange",
|
|
223
|
-
"Subtitles.refresh",
|
|
224
|
-
"Subtitles.remove",
|
|
225
|
-
"Subtitles.select",
|
|
226
|
-
"Subtitles.setStyle",
|
|
227
|
-
"System.openPath",
|
|
228
|
-
"System.openUrl",
|
|
229
|
-
"System.reveal",
|
|
230
|
-
"Timeline.layer",
|
|
231
|
-
"TimelineLayer.set",
|
|
232
|
-
"TimelineLayer.setRanges",
|
|
233
|
-
"Tools.available",
|
|
234
|
-
"Tools.run",
|
|
235
|
-
"Trigger.enter",
|
|
236
|
-
"Trigger.firesOn",
|
|
237
|
-
"Trigger.leave",
|
|
238
|
-
"Trigger.off",
|
|
239
|
-
"Ui.image",
|
|
240
|
-
"Ui.markdown",
|
|
241
|
-
"Ui.remoteImage",
|
|
242
|
-
"VideoMotion.onChange",
|
|
243
|
-
"VideoMotion.set",
|
|
244
|
-
"VideoMotion.state",
|
|
245
|
-
"VideoShaders.clear",
|
|
246
|
-
"VideoShaders.onStatus",
|
|
247
|
-
"VideoShaders.set",
|
|
248
|
-
"VideoUpscaling.onChange",
|
|
249
|
-
"VideoUpscaling.set",
|
|
250
|
-
"VideoUpscaling.state",
|
|
251
|
-
"VideoView.onStatus",
|
|
252
|
-
"VideoView.set",
|
|
253
|
-
"View.bind",
|
|
254
|
-
"View.on",
|
|
255
|
-
"View.set",
|
|
256
|
-
"WebResolverOptions.resolve",
|
|
257
|
-
"When.audioDevice",
|
|
258
|
-
"When.audioTrack",
|
|
259
|
-
"When.can",
|
|
260
|
-
"When.duration",
|
|
261
|
-
"When.language",
|
|
262
|
-
"When.phase",
|
|
263
|
-
"When.position.in",
|
|
264
|
-
"When.rate",
|
|
265
|
-
"When.subtitleTrack",
|
|
266
|
-
"When.theme",
|
|
267
|
-
"When.time",
|
|
268
|
-
"When.volume",
|
|
269
|
-
"Window.close",
|
|
270
|
-
"Window.hide",
|
|
271
|
-
"Window.onClose",
|
|
272
|
-
"Window.show",
|
|
273
|
-
"Windows.create",
|
|
274
|
-
"Wire.on",
|
|
275
|
-
"Wire.request",
|
|
276
|
-
"Wire.view",
|
|
277
|
-
"WireCommand.update",
|
|
278
|
-
"WireCommands.register",
|
|
279
|
-
"WireView.write",
|
|
280
|
-
"WireView.writeRows"
|
|
281
|
-
],
|
|
282
|
-
"requests": [
|
|
283
|
-
"app.openWindow",
|
|
284
|
-
"app.system",
|
|
285
|
-
"audio.addTrack",
|
|
286
|
-
"audio.selectTrack",
|
|
287
|
-
"bindings.list",
|
|
288
|
-
"commands.keys",
|
|
289
|
-
"commands.list",
|
|
290
|
-
"commands.register",
|
|
291
|
-
"commands.unregister",
|
|
292
|
-
"commands.update",
|
|
293
|
-
"dialogs.confirm",
|
|
294
|
-
"dialogs.open",
|
|
295
|
-
"drops.listen",
|
|
296
|
-
"drops.provide",
|
|
297
|
-
"drops.withdraw",
|
|
298
|
-
"events.subscribe",
|
|
299
|
-
"events.unsubscribe",
|
|
300
|
-
"host.run",
|
|
301
|
-
"jobs.*",
|
|
302
|
-
"jobs.operation",
|
|
303
|
-
"jobs.state",
|
|
304
|
-
"layout.set",
|
|
305
|
-
"layout.state",
|
|
306
|
-
"media.sources.*",
|
|
307
|
-
"media.sources.open",
|
|
308
|
-
"mpv.get",
|
|
309
|
-
"mpv.observe",
|
|
310
|
-
"mpv.unobserve",
|
|
311
|
-
"osd.panel",
|
|
312
|
-
"osd.show",
|
|
313
|
-
"packages.list",
|
|
314
|
-
"palette.lead.clear",
|
|
315
|
-
"palette.lead.done",
|
|
316
|
-
"palette.lead.set",
|
|
317
|
-
"playback.set",
|
|
318
|
-
"playback.stats",
|
|
319
|
-
"player.audioDevices",
|
|
320
|
-
"player.chapters",
|
|
321
|
-
"player.setAudioDevice",
|
|
322
|
-
"player.setLoop",
|
|
323
|
-
"player.setStepSeek",
|
|
324
|
-
"player.step",
|
|
325
|
-
"power.preventSleep",
|
|
326
|
-
"processing.operation",
|
|
327
|
-
"processing.replace",
|
|
328
|
-
"processing.state",
|
|
329
|
-
"producer.ack",
|
|
330
|
-
"producer.ackInput",
|
|
331
|
-
"producer.declareInput",
|
|
332
|
-
"producer.prepare",
|
|
333
|
-
"producer.release",
|
|
334
|
-
"producer.state",
|
|
335
|
-
"rendering.state",
|
|
336
|
-
"sequence.set",
|
|
337
|
-
"sequence.step",
|
|
338
|
-
"settings.*",
|
|
339
|
-
"snapshot.*",
|
|
340
|
-
"snapshot.state",
|
|
341
|
-
"source.operation",
|
|
342
|
-
"source.state",
|
|
343
|
-
"source.submit",
|
|
344
|
-
"sourceResolvers.*",
|
|
345
|
-
"sourceResolvers.register",
|
|
346
|
-
"sourceResolvers.respond",
|
|
347
|
-
"sourceResolvers.unregister",
|
|
348
|
-
"storage.session.delete",
|
|
349
|
-
"storage.session.get",
|
|
350
|
-
"storage.session.keys",
|
|
351
|
-
"storage.session.set",
|
|
352
|
-
"subtitles.*",
|
|
353
|
-
"subtitles.state",
|
|
354
|
-
"system.openPath",
|
|
355
|
-
"system.openUrl",
|
|
356
|
-
"system.reveal",
|
|
357
|
-
"timeline.marks",
|
|
358
|
-
"timeline.set",
|
|
359
|
-
"timeline.setRanges",
|
|
360
|
-
"triggers.declare",
|
|
361
|
-
"triggers.off",
|
|
362
|
-
"triggers.set",
|
|
363
|
-
"ui.close",
|
|
364
|
-
"ui.interaction",
|
|
365
|
-
"ui.markdownScan",
|
|
366
|
-
"ui.menu",
|
|
367
|
-
"ui.mount",
|
|
368
|
-
"ui.open",
|
|
369
|
-
"ui.set",
|
|
370
|
-
"ui.setMount",
|
|
371
|
-
"ui.show",
|
|
372
|
-
"ui.unmount",
|
|
373
|
-
"video.motion.set",
|
|
374
|
-
"video.motion.state",
|
|
375
|
-
"video.render.release",
|
|
376
|
-
"video.render.set",
|
|
377
|
-
"video.shaders.set",
|
|
378
|
-
"video.upscaling.set",
|
|
379
|
-
"video.upscaling.state",
|
|
380
|
-
"video.view.release",
|
|
381
|
-
"video.view.set",
|
|
382
|
-
"window.setAlwaysOnTop",
|
|
383
|
-
"window.setCursorAutoHide",
|
|
384
|
-
"window.setPictureInPicture",
|
|
385
|
-
"window.setVideoArea",
|
|
386
|
-
"window.state"
|
|
387
|
-
]
|
|
388
|
-
}
|
|
389
|
-
}
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import type TS from "typescript";
|
|
2
|
-
/** @internal The scan's categories, in the order results list them. */
|
|
3
|
-
export declare const SCAN_CATEGORIES: readonly ["player", "plugins", "clipboard", "credentials", "camera", "microphone", "screen", "notifications"];
|
|
4
|
-
/** @internal One of {@link SCAN_CATEGORIES}. */
|
|
5
|
-
export type ScanCategory = (typeof SCAN_CATEGORIES)[number];
|
|
6
|
-
/** @internal The version of the result's format (`scan`). */
|
|
7
|
-
export declare const SCAN_FORMAT = 1;
|
|
8
|
-
/** @internal One list of `capability-scan.json`. */
|
|
9
|
-
export interface ScanList {
|
|
10
|
-
readonly about: string;
|
|
11
|
-
/** API members, `Interface.member` (`Clipboard.readText`, `Scope.video.filter`). */
|
|
12
|
-
readonly members: readonly string[];
|
|
13
|
-
/** Methods of the player's protocol, by name or prefix (`packages.*`). */
|
|
14
|
-
readonly requests: readonly string[];
|
|
15
|
-
}
|
|
16
|
-
/** @internal `capability-scan.json`. */
|
|
17
|
-
export interface ScanTable {
|
|
18
|
-
readonly about: string;
|
|
19
|
-
readonly version: number;
|
|
20
|
-
readonly categories: Readonly<Record<ScanCategory, ScanList>>;
|
|
21
|
-
readonly none: ScanList;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* `capability-scan.json`, read once from the package's root (one level
|
|
25
|
-
* above this module, in `src/` and in `dist/` alike).
|
|
26
|
-
*
|
|
27
|
-
* @internal
|
|
28
|
-
*/
|
|
29
|
-
export declare function scanTable(): ScanTable;
|
|
30
|
-
/** @internal Where the scan found a use, for people who check it. */
|
|
31
|
-
export interface ScanEvidence {
|
|
32
|
-
/** The API member used (`Clipboard.readText`); absent for a request by name. */
|
|
33
|
-
readonly member?: string;
|
|
34
|
-
/** The protocol method requested by name (`clipboard.readText`); absent for a member. */
|
|
35
|
-
readonly request?: string;
|
|
36
|
-
/** The file, relative to the plugin's directory, with `/`. */
|
|
37
|
-
readonly file: string;
|
|
38
|
-
/** 1-based line. */
|
|
39
|
-
readonly line: number;
|
|
40
|
-
/** `"types"`: found by type; `"names"`: found by name (best effort). */
|
|
41
|
-
readonly by: "types" | "names";
|
|
42
|
-
}
|
|
43
|
-
/** @internal A request by name the scan could not put in a category. */
|
|
44
|
-
export interface ScanUnchecked {
|
|
45
|
-
readonly file: string;
|
|
46
|
-
readonly line: number;
|
|
47
|
-
/** One line for people. */
|
|
48
|
-
readonly message: string;
|
|
49
|
-
}
|
|
50
|
-
/** @internal What a scan found, before `vestra-plugin scan` adds the plugin's identity. */
|
|
51
|
-
export interface ScanFindings {
|
|
52
|
-
/** The categories used, in {@link SCAN_CATEGORIES}' order. */
|
|
53
|
-
readonly uses: ScanCategory[];
|
|
54
|
-
/** Per used category, where: by file, line, then name. */
|
|
55
|
-
readonly evidence: Partial<Record<ScanCategory, ScanEvidence[]>>;
|
|
56
|
-
readonly unchecked: ScanUnchecked[];
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* The category of a request by name, as the player routes a method: the
|
|
60
|
-
* exact name first, then the first `prefix.*` entry it starts with.
|
|
61
|
-
* `null`: in `none`; `undefined`: the table does not know the method.
|
|
62
|
-
*
|
|
63
|
-
* @internal
|
|
64
|
-
*/
|
|
65
|
-
export declare function requestCategory(method: string, scan?: ScanTable): ScanCategory | null | undefined;
|
|
66
|
-
/** @internal What {@link scan} reads. */
|
|
67
|
-
export interface ScanOptions {
|
|
68
|
-
/** The plugin's TypeScript files, in `program`: scanned by type. */
|
|
69
|
-
readonly typed: readonly string[];
|
|
70
|
-
/** The plugin's JavaScript files, with their text: scanned by name. */
|
|
71
|
-
readonly named: readonly {
|
|
72
|
-
readonly file: string;
|
|
73
|
-
readonly text: string;
|
|
74
|
-
}[];
|
|
75
|
-
/** How the result names a file (relative to the plugin, with `/`). */
|
|
76
|
-
readonly relative?: (file: string) => string;
|
|
77
|
-
/** Default: `capability-scan.json`. */
|
|
78
|
-
readonly table?: ScanTable;
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* The categories a plugin's files use.
|
|
82
|
-
*
|
|
83
|
-
* `resolved` is `false` when there are TypeScript files and the program
|
|
84
|
-
* resolves no import of `@vestra-player/sdk` in them (the SDK is not
|
|
85
|
-
* installed where the plugin looks, or nothing imports it): the caller
|
|
86
|
-
* then scans those files by name too, or reports it.
|
|
87
|
-
*
|
|
88
|
-
* @param program - A program that has the `typed` files; `undefined` with
|
|
89
|
-
* none.
|
|
90
|
-
*
|
|
91
|
-
* @internal
|
|
92
|
-
*/
|
|
93
|
-
export declare function scan(ts: typeof TS, program: TS.Program | undefined, options: ScanOptions): ScanFindings & {
|
|
94
|
-
resolved: boolean;
|
|
95
|
-
};
|