feature/IO-3205-Paint-Scale-Integrations: Code Review Revisions
This commit is contained in:
@@ -26,7 +26,6 @@ nsis:
|
|||||||
shortcutName: ${productName}
|
shortcutName: ${productName}
|
||||||
uninstallDisplayName: ${productName}
|
uninstallDisplayName: ${productName}
|
||||||
createDesktopShortcut: always
|
createDesktopShortcut: always
|
||||||
perMachine: true # Ensure elevated privileges
|
|
||||||
include: "scripts/installer.nsh" # Reference NSIS script from scripts directory
|
include: "scripts/installer.nsh" # Reference NSIS script from scripts directory
|
||||||
mac:
|
mac:
|
||||||
entitlementsInherit: build/entitlements.mac.plist
|
entitlementsInherit: build/entitlements.mac.plist
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ nsis:
|
|||||||
shortcutName: ${productName}
|
shortcutName: ${productName}
|
||||||
uninstallDisplayName: ${productName}
|
uninstallDisplayName: ${productName}
|
||||||
createDesktopShortcut: always
|
createDesktopShortcut: always
|
||||||
perMachine: true # Ensure elevated privileges
|
|
||||||
include: "scripts/installer.nsh" # Reference NSIS script from scripts directory
|
include: "scripts/installer.nsh" # Reference NSIS script from scripts directory
|
||||||
mac:
|
mac:
|
||||||
entitlementsInherit: build/entitlements.mac.plist
|
entitlementsInherit: build/entitlements.mac.plist
|
||||||
|
|||||||
@@ -53,7 +53,8 @@ export async function ppgInputHandler(config: PaintScaleConfig): Promise<void> {
|
|||||||
await parseStringPromise(xmlContent);
|
await parseStringPromise(xmlContent);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
log.error(`Invalid XML in ${filePath}:`, error);
|
log.error(`Invalid XML in ${filePath}:`, error);
|
||||||
const errorPath = path.join(errorDir, path.basename(filePath));
|
const timestamp = Date.now().toString(); // similar to DateTime.Now.Ticks in C#
|
||||||
|
const errorPath = path.join(errorDir, `${timestamp}.xml`);
|
||||||
await fs.rename(filePath, errorPath);
|
await fs.rename(filePath, errorPath);
|
||||||
log.debug(`Moved invalid file to error: ${errorPath}`);
|
log.debug(`Moved invalid file to error: ${errorPath}`);
|
||||||
continue;
|
continue;
|
||||||
@@ -92,7 +93,8 @@ export async function ppgInputHandler(config: PaintScaleConfig): Promise<void> {
|
|||||||
if (response.status === 200) {
|
if (response.status === 200) {
|
||||||
log.info(`Successful upload of ${filePath}`);
|
log.info(`Successful upload of ${filePath}`);
|
||||||
// Move file to archive
|
// Move file to archive
|
||||||
const archivePath = path.join(archiveDir, path.basename(filePath));
|
const timestamp = Date.now().toString(); // generate new timestamp
|
||||||
|
const archivePath = path.join(archiveDir, `${timestamp}.xml`);
|
||||||
await fs.rename(filePath, archivePath);
|
await fs.rename(filePath, archivePath);
|
||||||
log.debug(`Moved file to archive: ${archivePath}`);
|
log.debug(`Moved file to archive: ${archivePath}`);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user