@ham2k/extension-tools 0.13.0 → 0.14.0
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/h2kext.mjs +12 -2
- package/package.json +1 -1
package/h2kext.mjs
CHANGED
|
@@ -41,8 +41,9 @@ import yazl from "yazl"
|
|
|
41
41
|
/// frozen, from the one copy of the log every extension shares, and adds the
|
|
42
42
|
/// `chasing` hook category; 10 adds the DX cluster connection — the
|
|
43
43
|
/// `requiresCluster*` grants, the `host.cluster*` calls and the `cluster`
|
|
44
|
-
/// hook category
|
|
45
|
-
|
|
44
|
+
/// hook category; 11 adds `n1mm-history:` data-file urls, and
|
|
45
|
+
/// `host.sendRadioRaw` with its `requiresRadioRaw` grant.
|
|
46
|
+
export const H2KEXT_API_VERSION = 11
|
|
46
47
|
|
|
47
48
|
/// The first API with `host.webSocket`. A manifest declaring `webSockets`
|
|
48
49
|
/// under an older one is refused: an older app would install it and fail only
|
|
@@ -60,6 +61,11 @@ export const CHASING_API_VERSION = 9
|
|
|
60
61
|
/// refused: an older app would install it and refuse every call it makes.
|
|
61
62
|
export const CLUSTER_API_VERSION = 10
|
|
62
63
|
|
|
64
|
+
/// The first API with `host.sendRadioRaw`. A manifest declaring
|
|
65
|
+
/// `requiresRadioRaw` under an older one is refused: an older app would
|
|
66
|
+
/// install it and refuse every raw command it sends.
|
|
67
|
+
export const RADIO_RAW_API_VERSION = 11
|
|
68
|
+
|
|
63
69
|
/// The first API with timers. The build points a bundle's bare `setTimeout`
|
|
64
70
|
/// and friends at the SDK's only from here on: an older app's kernel hands an
|
|
65
71
|
/// extension no timers, and a bundle declaring less says it runs there.
|
|
@@ -164,6 +170,7 @@ SHARED_MODULES_BY_API[7] = SHARED_MODULES_BY_API[6]
|
|
|
164
170
|
SHARED_MODULES_BY_API[8] = SHARED_MODULES_BY_API[7]
|
|
165
171
|
SHARED_MODULES_BY_API[9] = SHARED_MODULES_BY_API[8]
|
|
166
172
|
SHARED_MODULES_BY_API[10] = SHARED_MODULES_BY_API[9]
|
|
173
|
+
SHARED_MODULES_BY_API[11] = SHARED_MODULES_BY_API[10]
|
|
167
174
|
|
|
168
175
|
/// What a scaffolded extension declares on day one: the eight modules the SDK
|
|
169
176
|
/// barrel itself reaches, so a project that has written no code yet still
|
|
@@ -364,6 +371,9 @@ export function validateManifest(manifest, { source = MANIFEST_ENTRY, forceName
|
|
|
364
371
|
`'${clusterGrant ?? "cluster"}' needs 'api' ${CLUSTER_API_VERSION} or later — an app older than that would install this and refuse every cluster call it makes`,
|
|
365
372
|
)
|
|
366
373
|
}
|
|
374
|
+
if (manifest.requiresRadioRaw === true && Number.isInteger(manifest.api) && manifest.api < RADIO_RAW_API_VERSION) {
|
|
375
|
+
say(`'requiresRadioRaw' needs 'api' ${RADIO_RAW_API_VERSION} or later — an app older than that would install this and refuse every raw command it sends`)
|
|
376
|
+
}
|
|
367
377
|
|
|
368
378
|
// An extension with no category is CORE to the host: always enabled, and
|
|
369
379
|
// never listed in the Extensions panel. That is a status the app grants its
|