Improve script error dialogs #304
- Include the script's directory path #304. - Exclude Windows-specific instructions on non-Windows OS. - Standardize language across dialogs for consistency. Other supporting changes: - Add script diagnostics data collection from main process. - Document script file storage and execution tamper protection in SECURITY.md. - Remove redundant comment in `NodeReadbackFileWriter`. - Centralize error display for uniformity and simplicity. - Simpify `WindowVariablesValidator` to omit checks when not on the renderer process. - Improve and centralize Electron environment detection. - Use more emphatic language (don't worry) in error messages.
This commit is contained in:
26
tests/unit/shared/Stubs/ElectronEnvironmentDetectorStub.ts
Normal file
26
tests/unit/shared/Stubs/ElectronEnvironmentDetectorStub.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
import { ElectronEnvironmentDetector, ElectronProcessType } from '@/infrastructure/RuntimeEnvironment/Electron/ElectronEnvironmentDetector';
|
||||
|
||||
export class ElectronEnvironmentDetectorStub implements ElectronEnvironmentDetector {
|
||||
private isInsideElectron = true;
|
||||
|
||||
public process: ElectronProcessType = 'renderer';
|
||||
|
||||
public isRunningInsideElectron(): boolean {
|
||||
return this.isInsideElectron;
|
||||
}
|
||||
|
||||
public determineElectronProcessType(): ElectronProcessType {
|
||||
return this.process;
|
||||
}
|
||||
|
||||
public withNonElectronEnvironment(): this {
|
||||
this.isInsideElectron = false;
|
||||
return this;
|
||||
}
|
||||
|
||||
public withElectronEnvironment(process: ElectronProcessType): this {
|
||||
this.isInsideElectron = true;
|
||||
this.process = process;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user