mirror of
https://github.com/selfxyz/self.git
synced 2026-01-10 07:08:10 -05:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user