@ham2k/extension-sdk 0.5.3 → 0.5.5
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/dist/index.d.ts +7 -1
- package/docs/distribution.md +30 -0
- package/docs/hooks.md +9 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @ham2k/extension-sdk 0.5.
|
|
1
|
+
// @ham2k/extension-sdk 0.5.5
|
|
2
2
|
/** Experimental v1 scene contract. All coordinates are in the scene's viewBox. */
|
|
3
3
|
export interface SvgScene {
|
|
4
4
|
version: 1;
|
|
@@ -235,6 +235,8 @@ export interface HookContext {
|
|
|
235
235
|
}
|
|
236
236
|
export interface HistoryForCallOptions {
|
|
237
237
|
refType?: string | string[];
|
|
238
|
+
refPrefix?: string | string[];
|
|
239
|
+
refsSegmentAware?: boolean;
|
|
238
240
|
operation?: string | string[];
|
|
239
241
|
excludeOperation?: string | string[];
|
|
240
242
|
fromDate?: string;
|
|
@@ -706,6 +708,10 @@ export interface CommandAction {
|
|
|
706
708
|
wpm: number;
|
|
707
709
|
};
|
|
708
710
|
showKeyer?: Record<string, never>;
|
|
711
|
+
setEnterSends?: {
|
|
712
|
+
on?: boolean;
|
|
713
|
+
running?: boolean;
|
|
714
|
+
};
|
|
709
715
|
updateQso?: Record<string, JSONValue>;
|
|
710
716
|
addQso?: Record<string, JSONValue>;
|
|
711
717
|
sendSpots?: {
|
package/docs/distribution.md
CHANGED
|
@@ -412,6 +412,36 @@ and the offer returns next launch. Twins that did arrive stay on disk, unused
|
|
|
412
412
|
until an upgrade completes — the built-in each one supersedes is what runs
|
|
413
413
|
meanwhile.
|
|
414
414
|
|
|
415
|
+
A bundle the engine will not evaluate takes the whole runtime with it, so the
|
|
416
|
+
upgrade puts that one aside — the boot names the bundle it died on — and
|
|
417
|
+
restarts once more. What boots then is the upgrade minus that extension, named
|
|
418
|
+
in the dialog in a sentence of its own. Refused rather than
|
|
419
|
+
withdrawn: the panel still lists it, badged, because the row is where an
|
|
420
|
+
operator sees that something they installed is doing nothing, and updating it
|
|
421
|
+
there is what lifts the refusal. Keyed by the VERSION that failed, so a fixed
|
|
422
|
+
release arrives as an ordinary update and clears it. Only an INSTALLED
|
|
423
|
+
extension is ever put aside; a built-in that
|
|
424
|
+
will not evaluate is a defect in the app, and skipping it would ship an
|
|
425
|
+
install quietly missing part of itself.
|
|
426
|
+
|
|
427
|
+
A refusal is kept even when putting the bundle aside did not get a runtime
|
|
428
|
+
back: it still will not evaluate, and an extension with no built-in behind it
|
|
429
|
+
is in the reverted set too, so re-admitting it there would kill the boot that
|
|
430
|
+
was about to give the operator everything back. Every dialog, and the notice
|
|
431
|
+
that stands in for one, names what stayed out — except a downloaded copy the
|
|
432
|
+
revert superseded, whose built-in is running again. Uninstalling clears the
|
|
433
|
+
record, so a reinstall of the same bytes gets its chance.
|
|
434
|
+
|
|
435
|
+
A refused extension is treated like a revoked one in everything else: it
|
|
436
|
+
keeps its switch, and its downloaded data expires on the same clock as any
|
|
437
|
+
extension the app is not loading.
|
|
438
|
+
|
|
439
|
+
What this does NOT cover is a failure that names no bundle. Only a bundle
|
|
440
|
+
that fails while it is being EVALUATED names itself: a kernel that will not
|
|
441
|
+
load, or an extension that throws while ACTIVATING, takes the generation down
|
|
442
|
+
under a name that is not a key. Those revert the whole upgrade as before, and
|
|
443
|
+
it is offered again at the next launch.
|
|
444
|
+
|
|
415
445
|
The upgrade restarts the extension runtime, which takes the footer items of
|
|
416
446
|
the generation going down with it: a data file's import raises an error rather
|
|
417
447
|
than returning into a torn-down runtime, so its progress line is cleared and
|
package/docs/hooks.md
CHANGED
|
@@ -64,7 +64,14 @@ hook method receives `(args, ctx)` where `ctx: HookContext` is:
|
|
|
64
64
|
`options` (`HistoryForCallOptions` in `types.ts`) narrow the history
|
|
65
65
|
before it is ordered and limited, so `{ refType: 'cwt' }` finds last
|
|
66
66
|
month's CWT exchange behind a week of POTA contacts. The filters are
|
|
67
|
-
`refType` (a ref in the QSO's own `refs`
|
|
67
|
+
`refType` (a ref in the QSO's own `refs` or its operation's, since an
|
|
68
|
+
activation's ref lives on the operation), `refPrefix` (such a ref whose
|
|
69
|
+
`ref` starts with it, ignoring ASCII case; with `refType`, the same ref
|
|
70
|
+
must pass both, so `{ refType: 'potaActivation', refPrefix: 'FR-' }` finds
|
|
71
|
+
every contact made activating a French park; an operation's refs are its
|
|
72
|
+
base ones unless `refsSegmentAware: true`, which reads them as they stood
|
|
73
|
+
at each contact, so a rove's second park or a contest that ended at a
|
|
74
|
+
break is seen), `operation`/`excludeOperation`,
|
|
68
75
|
`band`/`excludeBand`, `mode`/`excludeMode` (`SSB` also matches its
|
|
69
76
|
sidebands, and `CW`/`PHONE`/`DATA` match their whole family), whole UTC
|
|
70
77
|
days through `fromDate`/`toDate` or `fromDateMillis`/`toDateMillis`, and
|
|
@@ -844,7 +851,7 @@ interface CommandHook {
|
|
|
844
851
|
// CommandInterpretation: {expectsParams?, mixedCase?, error?, describe?, confirm?, commands?: CommandAction[]}
|
|
845
852
|
// CommandCatalogEntry: {command, describe, params?, category?, needsOperation?, expectsParams?, suggest?}
|
|
846
853
|
// CommandAction (closed set): {setVfo?, setPower?, updateQso?, addQso?,
|
|
847
|
-
// setKeyerSpeed?, showKeyer?, sendSpots?, syncAll?, updateSettings?, updateSetting?, openSettings?,
|
|
854
|
+
// setKeyerSpeed?, showKeyer?, setEnterSends?, sendSpots?, syncAll?, updateSettings?, updateSetting?, openSettings?,
|
|
848
855
|
// updateOperation?, markSegment?, setCallField?, reloadDataFiles?, devNotice?, devStatus?,
|
|
849
856
|
// devProgress?, devHammer?, devSplash?, devOnboard?, devTester?, devPopup?,
|
|
850
857
|
// devTimeTravel?, toggleExperiment?}
|