- 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.
27 lines
754 B
TypeScript
27 lines
754 B
TypeScript
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;
|
|
}
|
|
}
|