Migrate to electron-vite and electron-builder
- Switch from deprecated Vue CLI plugin to `electron-vite` (see nklayman/vue-cli-plugin-electron-builder#1982) - Update main/preload scripts to use `index.cjs` filenames to support `"type": "module"`, resolving crash issue (#233). This crash was related to Electron not supporting ESM (see electron/asar#249, electron/electron#21457). - This commit completes migration to Vite from Vue CLI (#230). Structure changes: - Introduce separate folders for Electron's main and preload processes. - Move TypeHelpers to `src/` to mark tit as accessible by the rest of the code. Config changes: - Make `vite.config.ts` reusable by Electron configuration. - On electron-builder, use `--publish` flag instead of `-p` for clarity. Tests: - Add log for preload script loading verification. - Implement runtime environment sanity checks. - Enhance logging in `check-desktop-runtime-errors`.
This commit is contained in:
22
tests/unit/shared/Stubs/ProjectInformationParserStub.ts
Normal file
22
tests/unit/shared/Stubs/ProjectInformationParserStub.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { parseProjectInformation } from '@/application/Parser/ProjectInformationParser';
|
||||
import { IAppMetadata } from '@/infrastructure/Metadata/IAppMetadata';
|
||||
import { IProjectInformation } from '@/domain/IProjectInformation';
|
||||
import { ProjectInformationStub } from './ProjectInformationStub';
|
||||
|
||||
export class ProjectInformationParserStub {
|
||||
public readonly arguments = new Array<IAppMetadata>();
|
||||
|
||||
private returnValue: IProjectInformation = new ProjectInformationStub();
|
||||
|
||||
public withReturnValue(value: IProjectInformation): this {
|
||||
this.returnValue = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public getStub(): typeof parseProjectInformation {
|
||||
return (metadata) => {
|
||||
this.arguments.push(metadata);
|
||||
return this.returnValue;
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user