Skip to content

Commit 1a58843

Browse files
authored
Merge pull request #1179 from opencrvs/release-v1.9.2
Release v1.9.2
2 parents e4d2a59 + 706e2f6 commit 1a58843

File tree

16 files changed

+633
-224
lines changed

16 files changed

+633
-224
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## 1.9.2
4+
5+
### New features
6+
7+
- Certificate templates now support multi-page SVGs using <g data-page="X">...</g>, allowing implementors to configure and render multi-page certificates.
8+
- Birth certificate PDF export now omits header, footer, and QR code; example SVG updated for security-paper templates.
9+
310
## 1.9.1
411

512
### Breaking changes
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Source: https://www.ssh-audit.com/hardening_guides.html#ubuntu_24_04_lts
22
# Restrict key exchange, cipher, and MAC algorithms, as per sshaudit.com hardening guide.
3-
KexAlgorithms [email protected],gss-curve25519-sha256-,curve25519-sha256,curve25519-sha256@libssh.org,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha256,gss-group16-sha512-,diffie-hellman-group16-sha512
3+
KexAlgorithms [email protected],curve25519-sha256,[email protected],diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512
44
Ciphers [email protected],[email protected],aes256-ctr,aes192-ctr,[email protected],aes128-ctr
55
66
RequiredRSASize 3072
77
HostKeyAlgorithms [email protected],[email protected],[email protected],[email protected],[email protected],ssh-ed25519,rsa-sha2-512,rsa-sha2-256
88
CASignatureAlgorithms [email protected],ssh-ed25519,rsa-sha2-512,rsa-sha2-256
9-
GSSAPIKexAlgorithms gss-curve25519-sha256-,gss-group16-sha512-
9+
#GSSAPIKexAlgorithms gss-curve25519-sha256-,gss-group16-sha512-
1010
HostbasedAcceptedAlgorithms [email protected],[email protected],[email protected],[email protected],[email protected],ssh-ed25519,rsa-sha2-512,rsa-sha2-256
11-
PubkeyAcceptedAlgorithms [email protected],[email protected],[email protected],[email protected],[email protected],ssh-ed25519,rsa-sha2-512,rsa-sha2-256
11+
PubkeyAcceptedAlgorithms [email protected],[email protected],[email protected],[email protected],[email protected],ssh-ed25519,rsa-sha2-512,rsa-sha2-256

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@opencrvs/countryconfig",
3-
"version": "1.9.1",
3+
"version": "1.9.2",
44
"description": "OpenCRVS country configuration for reference data",
55
"os": [
66
"darwin",
@@ -69,7 +69,7 @@
6969
"@hapi/boom": "^9.1.1",
7070
"@hapi/hapi": "^20.0.1",
7171
"@hapi/inert": "^6.0.3",
72-
"@opencrvs/toolkit": "1.9.0-rc.79b0f42",
72+
"@opencrvs/toolkit": "1.9.2",
7373
"@types/chalk": "^2.2.0",
7474
"@types/csv2json": "^1.4.0",
7575
"@types/fhir": "^0.0.30",

src/api/certificates/handler.ts

Lines changed: 50 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,24 @@ export interface ICertificateConfigData {
5050
| undefined
5151
}
5252

53+
const notoSansFont: Record<string, FontFamilyTypes> = {
54+
'Noto Sans': {
55+
normal: '/api/countryconfig/fonts/NotoSans-Regular.ttf',
56+
bold: '/api/countryconfig/fonts/NotoSans-Bold.ttf',
57+
italics: '/api/countryconfig/fonts/NotoSans-Regular.ttf',
58+
bolditalics: '/api/countryconfig/fonts/NotoSans-Regular.ttf'
59+
}
60+
}
61+
62+
const libreBaskervilleFont: Record<string, FontFamilyTypes> = {
63+
'Libre Baskerville': {
64+
normal: '/api/countryconfig/fonts/LibreBaskerville-Regular.ttf',
65+
bold: '/api/countryconfig/fonts/LibreBaskerville-Bold.ttf',
66+
italics: '/api/countryconfig/fonts/LibreBaskerville-Italic.ttf',
67+
bolditalics: '/api/countryconfig/fonts/LibreBaskerville-Regular.ttf'
68+
}
69+
}
70+
5371
export async function certificateHandler(request: Request, h: ResponseToolkit) {
5472
if (request.params.id) {
5573
const filePath = `${__dirname}/source/${request.params.id}`
@@ -71,14 +89,7 @@ export async function certificateHandler(request: Request, h: ResponseToolkit) {
7189
delayed: 15
7290
},
7391
svgUrl: '/api/countryconfig/certificates/birth-certificate.svg',
74-
fonts: {
75-
'Libre Baskerville': {
76-
normal: '/api/countryconfig/fonts/LibreBaskerville-Regular.ttf',
77-
bold: '/api/countryconfig/fonts/LibreBaskerville-Bold.ttf',
78-
italics: '/api/countryconfig/fonts/LibreBaskerville-Italic.ttf',
79-
bolditalics: '/api/countryconfig/fonts/LibreBaskerville-Regular.ttf'
80-
}
81-
}
92+
fonts: libreBaskervilleFont
8293
},
8394
{
8495
id: 'birth-certificate-certified-copy',
@@ -96,14 +107,7 @@ export async function certificateHandler(request: Request, h: ResponseToolkit) {
96107
},
97108
svgUrl:
98109
'/api/countryconfig/certificates/birth-certificate-certified-copy.svg',
99-
fonts: {
100-
'Noto Sans': {
101-
normal: '/api/countryconfig/fonts/NotoSans-Regular.ttf',
102-
bold: '/api/countryconfig/fonts/NotoSans-Bold.ttf',
103-
italics: '/api/countryconfig/fonts/NotoSans-Regular.ttf',
104-
bolditalics: '/api/countryconfig/fonts/NotoSans-Regular.ttf'
105-
}
106-
},
110+
fonts: notoSansFont,
107111
conditionals: [
108112
{
109113
type: 'SHOW',
@@ -127,14 +131,7 @@ export async function certificateHandler(request: Request, h: ResponseToolkit) {
127131
delayed: 18
128132
},
129133
svgUrl: '/api/countryconfig/certificates/birth-registration-receipt.svg',
130-
fonts: {
131-
'Noto Sans': {
132-
normal: '/api/countryconfig/fonts/NotoSans-Regular.ttf',
133-
bold: '/api/countryconfig/fonts/NotoSans-Bold.ttf',
134-
italics: '/api/countryconfig/fonts/NotoSans-Regular.ttf',
135-
bolditalics: '/api/countryconfig/fonts/NotoSans-Regular.ttf'
136-
}
137-
}
134+
fonts: notoSansFont
138135
},
139136
{
140137
id: 'death-certificate',
@@ -151,14 +148,7 @@ export async function certificateHandler(request: Request, h: ResponseToolkit) {
151148
delayed: 12
152149
},
153150
svgUrl: '/api/countryconfig/certificates/death-certificate.svg',
154-
fonts: {
155-
'Noto Sans': {
156-
normal: '/api/countryconfig/fonts/NotoSans-Regular.ttf',
157-
bold: '/api/countryconfig/fonts/NotoSans-Bold.ttf',
158-
italics: '/api/countryconfig/fonts/NotoSans-Regular.ttf',
159-
bolditalics: '/api/countryconfig/fonts/NotoSans-Regular.ttf'
160-
}
161-
}
151+
fonts: notoSansFont
162152
},
163153
{
164154
id: 'death-certificate-certified-copy',
@@ -176,14 +166,7 @@ export async function certificateHandler(request: Request, h: ResponseToolkit) {
176166
},
177167
svgUrl:
178168
'/api/countryconfig/certificates/death-certificate-certified-copy.svg',
179-
fonts: {
180-
'Noto Sans': {
181-
normal: '/api/countryconfig/fonts/NotoSans-Regular.ttf',
182-
bold: '/api/countryconfig/fonts/NotoSans-Bold.ttf',
183-
italics: '/api/countryconfig/fonts/NotoSans-Regular.ttf',
184-
bolditalics: '/api/countryconfig/fonts/NotoSans-Regular.ttf'
185-
}
186-
},
169+
fonts: notoSansFont,
187170
conditionals: [
188171
{
189172
type: 'SHOW',
@@ -207,14 +190,7 @@ export async function certificateHandler(request: Request, h: ResponseToolkit) {
207190
delayed: 13.5
208191
},
209192
svgUrl: '/api/countryconfig/certificates/marriage-certificate.svg',
210-
fonts: {
211-
'Noto Sans': {
212-
normal: '/api/countryconfig/fonts/NotoSans-Regular.ttf',
213-
bold: '/api/countryconfig/fonts/NotoSans-Bold.ttf',
214-
italics: '/api/countryconfig/fonts/NotoSans-Regular.ttf',
215-
bolditalics: '/api/countryconfig/fonts/NotoSans-Regular.ttf'
216-
}
217-
}
193+
fonts: notoSansFont
218194
},
219195
{
220196
id: 'marriage-certificate-certified-copy',
@@ -232,14 +208,7 @@ export async function certificateHandler(request: Request, h: ResponseToolkit) {
232208
},
233209
svgUrl:
234210
'/api/countryconfig/certificates/marriage-certificate-certified-copy.svg',
235-
fonts: {
236-
'Noto Sans': {
237-
normal: '/api/countryconfig/fonts/NotoSans-Regular.ttf',
238-
bold: '/api/countryconfig/fonts/NotoSans-Bold.ttf',
239-
italics: '/api/countryconfig/fonts/NotoSans-Regular.ttf',
240-
bolditalics: '/api/countryconfig/fonts/NotoSans-Regular.ttf'
241-
}
242-
}
211+
fonts: notoSansFont
243212
},
244213
{
245214
id: 'v2.birth-certificate',
@@ -257,14 +226,7 @@ export async function certificateHandler(request: Request, h: ResponseToolkit) {
257226
delayed: 18
258227
},
259228
svgUrl: '/api/countryconfig/certificates/v2.birth-certificate.svg',
260-
fonts: {
261-
'Libre Baskerville': {
262-
normal: '/api/countryconfig/fonts/LibreBaskerville-Regular.ttf',
263-
bold: '/api/countryconfig/fonts/LibreBaskerville-Bold.ttf',
264-
italics: '/api/countryconfig/fonts/LibreBaskerville-Italic.ttf',
265-
bolditalics: '/api/countryconfig/fonts/LibreBaskerville-Regular.ttf'
266-
}
267-
},
229+
fonts: notoSansFont,
268230
conditionals: [
269231
{
270232
type: 'SHOW',
@@ -289,14 +251,7 @@ export async function certificateHandler(request: Request, h: ResponseToolkit) {
289251
},
290252
svgUrl:
291253
'/api/countryconfig/certificates/v2.birth-certificate-certified-copy.svg',
292-
fonts: {
293-
'Libre Baskerville': {
294-
normal: '/api/countryconfig/fonts/LibreBaskerville-Regular.ttf',
295-
bold: '/api/countryconfig/fonts/LibreBaskerville-Bold.ttf',
296-
italics: '/api/countryconfig/fonts/LibreBaskerville-Italic.ttf',
297-
bolditalics: '/api/countryconfig/fonts/LibreBaskerville-Regular.ttf'
298-
}
299-
},
254+
fonts: libreBaskervilleFont,
300255
conditionals: [
301256
{
302257
type: 'SHOW',
@@ -325,14 +280,7 @@ export async function certificateHandler(request: Request, h: ResponseToolkit) {
325280
},
326281
svgUrl:
327282
'/api/countryconfig/certificates/v2.tennis-club-membership-certificate.svg',
328-
fonts: {
329-
'Noto Sans': {
330-
normal: '/api/countryconfig/fonts/NotoSans-Regular.ttf',
331-
bold: '/api/countryconfig/fonts/NotoSans-Bold.ttf',
332-
italics: '/api/countryconfig/fonts/NotoSans-Regular.ttf',
333-
bolditalics: '/api/countryconfig/fonts/NotoSans-Regular.ttf'
334-
}
335-
},
283+
fonts: notoSansFont,
336284
conditionals: [
337285
{
338286
type: 'SHOW',
@@ -358,14 +306,26 @@ export async function certificateHandler(request: Request, h: ResponseToolkit) {
358306
},
359307
svgUrl:
360308
'/api/countryconfig/certificates/v2.tennis-club-membership-certified-certificate.svg',
361-
fonts: {
362-
'Noto Sans': {
363-
normal: '/api/countryconfig/fonts/NotoSans-Regular.ttf',
364-
bold: '/api/countryconfig/fonts/NotoSans-Bold.ttf',
365-
italics: '/api/countryconfig/fonts/NotoSans-Regular.ttf',
366-
bolditalics: '/api/countryconfig/fonts/NotoSans-Regular.ttf'
367-
}
368-
}
309+
fonts: notoSansFont
310+
},
311+
{
312+
id: 'v2.tennis-club-membership-certificate-multipage',
313+
event: Event.TENNIS_CLUB_MEMBERSHIP,
314+
isV2Template: true,
315+
label: {
316+
id: 'certificates.tennis-club-membership.certificate.multipage',
317+
defaultMessage: 'Tennis Club Membership Certificate Multipage',
318+
description: 'The label for a tennis club membership certificate'
319+
},
320+
isDefault: false,
321+
fee: {
322+
onTime: 7,
323+
late: 10.6,
324+
delayed: 18
325+
},
326+
svgUrl:
327+
'/api/countryconfig/certificates/v2.tennis-club-membership-certificate-multipage.svg',
328+
fonts: libreBaskervilleFont
369329
},
370330
{
371331
id: 'v2.death-certificate',
@@ -383,14 +343,7 @@ export async function certificateHandler(request: Request, h: ResponseToolkit) {
383343
delayed: 18
384344
},
385345
svgUrl: '/api/countryconfig/certificates/v2.death-certificate.svg',
386-
fonts: {
387-
'Libre Baskerville': {
388-
normal: '/api/countryconfig/fonts/LibreBaskerville-Regular.ttf',
389-
bold: '/api/countryconfig/fonts/LibreBaskerville-Bold.ttf',
390-
italics: '/api/countryconfig/fonts/LibreBaskerville-Italic.ttf',
391-
bolditalics: '/api/countryconfig/fonts/LibreBaskerville-Regular.ttf'
392-
}
393-
}
346+
fonts: libreBaskervilleFont
394347
},
395348
{
396349
id: 'v2.death-certified-certificate',
@@ -409,14 +362,7 @@ export async function certificateHandler(request: Request, h: ResponseToolkit) {
409362
},
410363
svgUrl:
411364
'/api/countryconfig/certificates/v2.death-certificate-certified-copy.svg',
412-
fonts: {
413-
'Libre Baskerville': {
414-
normal: '/api/countryconfig/fonts/LibreBaskerville-Regular.ttf',
415-
bold: '/api/countryconfig/fonts/LibreBaskerville-Bold.ttf',
416-
italics: '/api/countryconfig/fonts/LibreBaskerville-Italic.ttf',
417-
bolditalics: '/api/countryconfig/fonts/LibreBaskerville-Regular.ttf'
418-
}
419-
}
365+
fonts: libreBaskervilleFont
420366
}
421367
]
422368
return certificateConfigs

0 commit comments

Comments
 (0)