Skip to content

Commit

Permalink
v1 details.json structure
Browse files Browse the repository at this point in the history
  • Loading branch information
haithamAbuElnasr committed Feb 22, 2024
1 parent abb0c70 commit eab8a36
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/main/api/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/* eslint-disable no-console */
import fs from 'fs';
import path from 'path';
import { defaultToolObj } from '../util';

export const PROJECT_DIR = path.join(__dirname, '../../../projects');

Expand Down Expand Up @@ -37,6 +38,12 @@ export function createJsonFile(name: string, domain: string) {
const obj = {
name,
domain,
subFinder: defaultToolObj(),
liveDomains: defaultToolObj(),
screenWin: defaultToolObj(),
archive: defaultToolObj(),
waybackurls_js: defaultToolObj(),
waybackurls_parameter: defaultToolObj(),
};
const stringifyObj = JSON.stringify(obj);
try {
Expand Down
3 changes: 3 additions & 0 deletions src/main/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,6 @@ export function createDirIfNotExist(outputDir: string, dirname: string) {
console.error(err);
}
}
export function defaultToolObj(): { run: boolean; resulCount: number } {
return { run: false, resulCount: 0 };
}

0 comments on commit eab8a36

Please sign in to comment.