Skip to content

Commit

Permalink
debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
vipinpaul committed Nov 21, 2023
1 parent cfe478c commit f2022db
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions renderer/src/core/projects/updateAgSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
// }

export const updateAgSettings = async (username, projectName, data, font) => {
console.log(JSON.stringify(data.project[data.type.flavorType.flavor.name]));

Check warning on line 16 in renderer/src/core/projects/updateAgSettings.js

View workflow job for this annotation

GitHub Actions / Lint Run

Unexpected console statement

Check warning on line 16 in renderer/src/core/projects/updateAgSettings.js

View workflow job for this annotation

GitHub Actions / Lint Run

Unexpected console statement
logger.debug('updateAgSettings.js', 'In updateAgSettings');
const newpath = localStorage.getItem('userPath');
const fs = window.require('fs');
Expand All @@ -21,6 +22,7 @@ export const updateAgSettings = async (username, projectName, data, font) => {
const folder = path.join(newpath, packageInfo.name, 'users', username, 'projects', projectName, result[0]);
const settings = await fs.readFileSync(folder, 'utf8');
const setting = JSON.parse(settings);
setting.project[data.type.flavorType.flavor.name] = data.project[data.type.flavorType.flavor.name];
if (settings.version !== environment.AG_SETTING_VERSION) {
setting.version = environment.AG_SETTING_VERSION;
if (!setting.sync && !setting.sync?.services) {
Expand All @@ -34,7 +36,7 @@ export const updateAgSettings = async (username, projectName, data, font) => {
setting.project[data.type.flavorType.flavor.name].font = font || setting.project[data.type.flavorType.flavor.name].font;
}
}
setting.project[data.type.flavorType.flavor.name] = data.project[data.type.flavorType.flavor.name];
console.log(JSON.stringify(setting));

Check warning on line 39 in renderer/src/core/projects/updateAgSettings.js

View workflow job for this annotation

GitHub Actions / Lint Run

Unexpected console statement

Check warning on line 39 in renderer/src/core/projects/updateAgSettings.js

View workflow job for this annotation

GitHub Actions / Lint Run

Unexpected console statement
logger.debug('updateAgSettings.js', `Updating the ${environment.PROJECT_SETTING_FILE}`);
await fs.writeFileSync(folder, JSON.stringify(setting));
};
Expand All @@ -45,7 +47,6 @@ export const updateWebAgSettings = async (username, projectName, data) => {
const { data: settings } = await sbStorageDownload(folder);
let setting = {};
setting = JSON.parse(await settings.text());
setting.project[data.type.flavorType.flavor.name] = data.project[data.type.flavorType.flavor.name];
if (settings.version !== environment.AG_SETTING_VERSION) {
setting.version = environment.AG_SETTING_VERSION;
if (!setting.sync && !setting.sync?.services) {
Expand Down

0 comments on commit f2022db

Please sign in to comment.