Adds bitwarden
This commit is contained in:
parent
e798bb5e1f
commit
a301315f2a
8 changed files with 84 additions and 15 deletions
|
|
@ -392,7 +392,7 @@ class Orchestrator {
|
|||
this.#actFiles()
|
||||
|
||||
if (this.#support.isValid) {
|
||||
this.#support.update(this.#fileMap.values().toArray());
|
||||
this.#support.update([...this.#fileMap.values()]);
|
||||
}
|
||||
|
||||
await new Promise(resolve => setTimeout(resolve, 1000));
|
||||
|
|
@ -439,7 +439,7 @@ class Orchestrator {
|
|||
}
|
||||
await directory.close();
|
||||
|
||||
this.#fileMap.values()
|
||||
[...this.#fileMap.values()]
|
||||
.filter(fileContainer => !availableFiles.includes(fileContainer.filepath))
|
||||
.forEach(value => {
|
||||
this.#fileMap.set(value.filepath, {
|
||||
|
|
@ -473,7 +473,7 @@ class Orchestrator {
|
|||
/**
|
||||
* @type {Device}
|
||||
*/
|
||||
const selectedDevice = this.#devices.values().find((device) => device.name === deviceName) ?? { name: deviceName }
|
||||
const selectedDevice = [...this.#devices.values()].find((device) => device.name === deviceName) ?? { name: deviceName }
|
||||
|
||||
return {
|
||||
filepath: path,
|
||||
|
|
@ -499,7 +499,7 @@ class Orchestrator {
|
|||
deviceMap.get(value.device.name).push(value);
|
||||
}
|
||||
|
||||
const duplicates = deviceMap.values().filter(devices => devices.some(device => device.state !== 'invalid') && devices.length > 1);
|
||||
const duplicates = [...deviceMap.values()].filter(devices => devices.some(device => device.state !== 'invalid') && devices.length > 1);
|
||||
for (let duplicate of duplicates) {
|
||||
const container = duplicate[0];
|
||||
this.#notifications.sendNotification(
|
||||
|
|
@ -530,7 +530,7 @@ ${duplicate.map((file) => `- ${file.filepath}`).join('\n')}\`
|
|||
);
|
||||
}
|
||||
|
||||
const previousDuplicates = deviceMap.values().filter(devices => devices[0].state === 'invalid' && devices.length < 2);
|
||||
const previousDuplicates = [...deviceMap.values()].filter(devices => devices[0].state === 'invalid' && devices.length < 2);
|
||||
previousDuplicates.forEach((previousDuplicate) => {
|
||||
const duplicate = previousDuplicate[0];
|
||||
this.#fileMap.set(duplicate.filepath, {
|
||||
|
|
@ -539,7 +539,7 @@ ${duplicate.map((file) => `- ${file.filepath}`).join('\n')}\`
|
|||
})
|
||||
|
||||
this.#logger.log(
|
||||
`==> Marking device ${duplicate.device} as valid, due to having only one file`,
|
||||
`==> Marking device ${duplicate.device.name} as valid, due to having only one file`,
|
||||
'ORCHESTRATOR',
|
||||
'INFO'
|
||||
);
|
||||
|
|
@ -618,7 +618,7 @@ s
|
|||
|
||||
const message = this.#notifications.sendReplaceableNotification({
|
||||
summary: "Please wait...",
|
||||
message: Orchestrator.NOTIFICATION_STARTING.replace('{device}', file.device),
|
||||
message: Orchestrator.NOTIFICATION_STARTING.replace('{device}', file.device.name),
|
||||
urgency: "critical",
|
||||
});
|
||||
this.#logger.log(
|
||||
|
|
@ -709,15 +709,15 @@ s
|
|||
switch (reason) {
|
||||
default:
|
||||
case "GENERIC":
|
||||
notificationMessage = Orchestrator.NOTIFICATION_GENERIC_PROCESS_STOP.replace('{device}', file.device)
|
||||
notificationMessage = Orchestrator.NOTIFICATION_GENERIC_PROCESS_STOP.replace('{device}', file.device.name)
|
||||
logMessage = `Removing process for device '${file.device.name}' from file '${file.filepath}', due to unknown reason`
|
||||
break;
|
||||
case "REMOVED_FILE":
|
||||
notificationMessage = Orchestrator.NOTIFICATION_MISSING_FILE_PROCESS_STOP.replace('{device}', file.device)
|
||||
notificationMessage = Orchestrator.NOTIFICATION_MISSING_FILE_PROCESS_STOP.replace('{device}', file.device.name)
|
||||
logMessage = `Removing process for device '${file.device.name}' from file '${file.filepath}', due to a removed file`
|
||||
break;
|
||||
case "INVALID_FILE":
|
||||
notificationMessage = Orchestrator.NOTIFICATION_INVALID_FILE_PROCESS_STOP.replace('{device}', file.device)
|
||||
notificationMessage = Orchestrator.NOTIFICATION_INVALID_FILE_PROCESS_STOP.replace('{device}', file.device.name)
|
||||
logMessage = `Removing process for device '${file.device.name}' from file '${file.filepath}', due to a invalid file`
|
||||
break;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue