feat: infer the ETSI release from the CAP's uicc.toolkit import (v3.6.44)

The CAP details' Platform row named only the Java Card level; it now also
shows the ETSI/3GPP release the UICC API imports come from, with its basis
in brackets, e.g. 'Java Card >= 2.2.2 - ETSI REL-7 (uicc.toolkit 1.4) -
CAP format 2.1'.

capmem.ETSI_TOOLKIT_RELEASE maps the uicc.toolkit export version to the
release, sourced from the workspace corpus: sim-tools/ETSI-REL.md for the
prepared trees (api21_rel7_export_files carries uicc.toolkit 1.4 = the
REL-7 jar, api21_export_files 1.11 = the REL-12 jar) and
sim-tools/etsi/102241/README.md's package-version table for the rest
(1.0 -> REL-6/7, 1.3 -> REL-8, 1.5 -> REL-9, 1.12-1.14 -> REL-15..18; the
1.11 spec range is 13.01-14.02 but the tree the builds use is REL-12).
Exposed as requires_etsi_release/requires_etsi_basis in /api/cap-info and
the CLI; SIM-only CAPs (no uicc.toolkit) get no label.

Verified: RemMobileID -> REL-7 (uicc.toolkit 1.4), AlfaDSA -> REL-12
(uicc.toolkit 1.11).  sw cache simple-v317; tests: 531 Python / 677 Node.
This commit is contained in:
2026-09-29 23:17:27 +03:00
parent f21d47538f
commit 3d4e4e81f8
9 changed files with 74 additions and 6 deletions
+12
View File
@@ -148,6 +148,18 @@ test('capMemHtml shows the server platform requirement and int support', () => {
assert.ok(!out.includes('2.1.1/2.1.2'), out);
});
test('capMemHtml names the ETSI release the UICC API imports come from', () => {
const mem = memFixture();
mem.requires_java_card = '2.2.2';
mem.requires_etsi_release = 'REL-7';
mem.requires_etsi_basis = 'uicc.toolkit 1.4';
const out = capMemHtml(mem);
assert.ok(out.includes('Java Card \u2265 2.2.2 \u00b7 ETSI REL-7 (uicc.toolkit 1.4) \u00b7 CAP format 2.1'), out);
// a CAP without uicc.toolkit (or an unmapped version) shows no ETSI part
const noEtsi = capMemHtml(memFixture());
assert.ok(!noEtsi.includes('ETSI'), noEtsi);
});
test('capMemHtml falls back to the raw framework version outside the corpus', () => {
const mem = memFixture();
mem.imports = [{ aid: 'A0000000620101', minor: 0, major: 7, refs: 6 }];