mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-06 00:27:24 +00:00
Add Nostr repos list
This commit is contained in:
7 files changed
+444
-9
No files matched your search
@@ -262,6 +262,25 @@ export class ProjectsManager {
|
||||
}
|
||||
}
|
||||
|
||||
async getNostrRepoAddress(projectId: string): Promise<string | null> {
|
||||
try {
|
||||
const projectPath = `${this.dir}/${projectId}`;
|
||||
const config = await git.getConfig({
|
||||
fs: this.fs,
|
||||
dir: projectPath,
|
||||
path: 'nostr.repo',
|
||||
});
|
||||
return config || null;
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
async isNostrEnabled(projectId: string): Promise<boolean> {
|
||||
const naddr = await this.getNostrRepoAddress(projectId);
|
||||
return naddr !== null;
|
||||
}
|
||||
|
||||
private async updateProjectLastModified(projectId: string): Promise<void> {
|
||||
try {
|
||||
const projectFile = `${this.dir}/${projectId}/.git/project.json`;
|
||||
|
||||
Reference in new issue
Block a user