Skip to content

Commit c3018e6

Browse files
Merge branch 'main' into chas/remove-screenshots
2 parents ac3d7ad + d5d7ba1 commit c3018e6

45 files changed

Lines changed: 4184 additions & 687 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## [1.82.1](https://github.com/trycompai/comp/compare/v1.82.0...v1.82.1) (2026-02-05)
2+
3+
4+
### Bug Fixes
5+
6+
* **api:** send task-assignee email to only new assignee, not to all admins ([#2107](https://github.com/trycompai/comp/issues/2107)) ([57593a6](https://github.com/trycompai/comp/commit/57593a6253f4768d02aad4eef8ca91bad1e967f3))
7+
18
# [1.82.0](https://github.com/trycompai/comp/compare/v1.81.0...v1.82.0) (2026-02-03)
29

310

apps/api/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"@react-email/components": "^0.0.41",
2727
"@trigger.dev/build": "4.0.6",
2828
"@trigger.dev/sdk": "4.0.6",
29-
"@trycompai/db": "1.3.21",
29+
"@trycompai/db": "1.3.22",
3030
"@trycompai/email": "workspace:*",
3131
"@upstash/redis": "^1.34.2",
3232
"@upstash/vector": "^1.2.2",
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
/**
2+
* Script to extract SVG badge icons from logos.tsx and encode them as base64 data URLs
3+
* Run with: bun run apps/api/scripts/encode-badge-icons.ts
4+
*/
5+
6+
const fs = require('fs');
7+
const path = require('path');
8+
9+
// Read the logos.tsx file
10+
const logosPath = path.join(__dirname, '../../app/src/app/(app)/[orgId]/trust/portal-settings/components/logos.tsx');
11+
const logosContent = fs.readFileSync(logosPath, 'utf-8');
12+
13+
// Extract SVG content for each icon
14+
function extractSvg(componentName: string): string | null {
15+
// Find the component export
16+
const regex = new RegExp(`export const ${componentName} = \\(props.*?\\) => \\(\\s*(<svg[\\s\\S]*?<\\/svg>)\\s*\\);`, 's');
17+
const match = logosContent.match(regex);
18+
19+
if (!match) {
20+
console.warn(`Warning: Could not find ${componentName}`);
21+
return null;
22+
}
23+
24+
return match[1]
25+
.replace(/\{props\}/g, '') // Remove {props} spread
26+
.replace(/\{\.\.\.props\}/g, '') // Remove {...props} spread
27+
.trim();
28+
}
29+
30+
// Badge components to extract
31+
const badges = [
32+
{ name: 'SOC2Type2', type: 'soc2', label: 'SOC 2' },
33+
{ name: 'ISO27001', type: 'iso27001', label: 'ISO 27001' },
34+
{ name: 'ISO42001', type: 'iso42001', label: 'ISO 42001' },
35+
{ name: 'GDPR', type: 'gdpr', label: 'GDPR' },
36+
{ name: 'HIPAA', type: 'hipaa', label: 'HIPAA' },
37+
{ name: 'PCIDSS', type: 'pci_dss', label: 'PCI DSS' },
38+
{ name: 'NEN7510', type: 'nen7510', label: 'NEN 7510' },
39+
{ name: 'ISO9001', type: 'iso9001', label: 'ISO 9001' },
40+
];
41+
42+
console.log('Extracting and encoding badge icons...\n');
43+
44+
const encodedBadges: Record<string, { icon: string; label: string }> = {};
45+
46+
for (const badge of badges) {
47+
const svgContent = extractSvg(badge.name);
48+
49+
if (svgContent) {
50+
// Encode as base64
51+
const base64 = Buffer.from(svgContent).toString('base64');
52+
const dataUrl = `data:image/svg+xml;base64,${base64}`;
53+
54+
encodedBadges[badge.type] = {
55+
icon: dataUrl,
56+
label: badge.label,
57+
};
58+
59+
console.log(`✓ ${badge.label} (${badge.name})`);
60+
}
61+
}
62+
63+
// Read the service file
64+
const servicePath = path.join(__dirname, '../src/trust-portal/trust-access.service.ts');
65+
let serviceContent = fs.readFileSync(servicePath, 'utf-8');
66+
67+
// Generate the new BADGE_ICON_MAP code
68+
const newMapCode = `const BADGE_ICON_MAP: Record<string, { icon: string; label: string }> = {
69+
${Object.entries(encodedBadges).map(([type, data]) =>
70+
` ${type}: {
71+
icon: '${data.icon}',
72+
label: '${data.label}',
73+
},`
74+
).join('\n')}
75+
};`;
76+
77+
// Replace the old BADGE_ICON_MAP with the new one
78+
const mapRegex = /const BADGE_ICON_MAP: Record<string, \{ icon: string; label: string \}> = \{[\s\S]*?\};/;
79+
80+
if (mapRegex.test(serviceContent)) {
81+
serviceContent = serviceContent.replace(mapRegex, newMapCode);
82+
fs.writeFileSync(servicePath, serviceContent, 'utf-8');
83+
console.log('\n✅ Successfully updated trust-access.service.ts with encoded badge icons!');
84+
} else {
85+
console.error('\n❌ Could not find BADGE_ICON_MAP in trust-access.service.ts');
86+
console.log('\nGenerated code:\n');
87+
console.log(newMapCode);
88+
}

0 commit comments

Comments
 (0)