SELF-702: Refactor navigation structure and dev utilities (#994)

* Refactor navigation and dev screens

* refactor: rename passport screens to document

* fixes

* add missing header

* fixes

* type files
This commit is contained in:
Justin Hernandez
2025-08-30 21:00:21 -07:00
committed by GitHub
parent e3b5e2ebe4
commit 520c05d4fc
47 changed files with 220 additions and 333 deletions

View File

@@ -151,7 +151,19 @@ function fixLicenseHeader(filePath) {
const lines = content.split('\n');
const headerInfo = findLicenseHeaderIndex(lines);
if (headerInfo.index !== -1 && headerInfo.valid) {
if (headerInfo.index === -1) {
// No header exists - add the canonical header
const newLines = [
...CANONICAL_HEADER_LINES,
'', // Add newline after header
...lines,
];
const fixedContent = newLines.join('\n');
writeFileSync(filePath, fixedContent, 'utf8');
return true;
}
if (headerInfo.valid) {
const headerEndIndex = headerInfo.endIndex;
if (lines[headerEndIndex + 1] !== '') {
// Insert empty line after license header