fix(format): Fixed formatting issues across multiple TypeScript files.

This commit is contained in:
2024-06-23 22:57:09 +02:00
parent ae46afdee6
commit b797fca1fc
16 changed files with 66 additions and 39 deletions

View File

@@ -73,7 +73,7 @@ export class Meta {
// write .meta.json to disk
plugins.smartfile.memory.toFsSync(
JSON.stringify(this.metaRepoData, null, 2),
this.filePaths.metaJson
this.filePaths.metaJson,
);
// write .gitignore to disk
plugins.smartfile.memory.toFsSync(await this.generateGitignore(), this.filePaths.gitIgnore);
@@ -104,12 +104,12 @@ export class Meta {
if (
preExistingFolderArg !== '.git' &&
!Object.keys(projects).find((projectFolder) =>
projectFolder.startsWith(preExistingFolderArg)
projectFolder.startsWith(preExistingFolderArg),
)
) {
const response = await plugins.smartinteraction.SmartInteract.getCliConfirmation(
`Do you want to delete superfluous directory >>${preExistingFolderArg}<< ?`,
true
true,
);
if (response) {
logger.log('warn', `Deleting >>${preExistingFolderArg}<<!`);
@@ -131,7 +131,7 @@ export class Meta {
logger.log('info', `found ${missingRepos.length} missing repos`);
for (const missingRepo of missingRepos) {
await this.smartshellInstance.exec(
`cd ${this.cwd} && git clone ${this.metaRepoData.projects[missingRepo]} ${missingRepo}`
`cd ${this.cwd} && git clone ${this.metaRepoData.projects[missingRepo]} ${missingRepo}`,
);
}
@@ -140,7 +140,7 @@ export class Meta {
logger.log('info', `persist changes with a git commit`);
await this.smartshellInstance.exec(
`cd ${this.cwd} && git add -A && git commit -m "updated structure"`
`cd ${this.cwd} && git add -A && git commit -m "updated structure"`,
);
await this.syncToRemote();
@@ -166,7 +166,7 @@ export class Meta {
JSON.stringify({
projects: {},
}),
this.filePaths.metaJson
this.filePaths.metaJson,
);
logger.log(`success`, `created a new .meta.json in directory ${this.cwd}`);
await plugins.smartfile.memory.toFs(
@@ -174,14 +174,14 @@ export class Meta {
name: this.dirName,
version: '1.0.0',
}),
this.filePaths.packageJson
this.filePaths.packageJson,
);
logger.log(`success`, `created a new package.json in directory ${this.cwd}`);
} else {
logger.log(`error`, `directory ${this.cwd} already has a .metaJson file. Doing nothing.`);
}
await this.smartshellInstance.exec(
`cd ${this.cwd} && git add -A && git commit -m "feat(project): init meta project for ${this.dirName}"`
`cd ${this.cwd} && git add -A && git commit -m "feat(project): init meta project for ${this.dirName}"`,
);
await this.updateLocalRepos();
}
@@ -203,7 +203,7 @@ export class Meta {
await this.sortMetaRepoData();
await this.writeToDisk();
await this.smartshellInstance.exec(
`cd ${this.cwd} && git add -A && git commit -m "feat(project): add ${projectNameArg}"`
`cd ${this.cwd} && git add -A && git commit -m "feat(project): add ${projectNameArg}"`,
);
await this.updateLocalRepos();
}