mirror of
https://github.com/hanzo-studio/studio-desktop.git
synced 2026-10-30 18:54:12 +00:00
- Replace all ComfyUI references with Hanzo Studio - Update comfy.org URLs to hanzo.ai/studio.hanzo.ai - Change comfyanonymous to hanzoai - Update Comfy-Org to hanzo-studio - Rename files and directories - Update package names and configurations - Update documentation and README files This is a comprehensive rebranding to align with Hanzo AI's product suite and company identity.
28 lines
1.0 KiB
TypeScript
28 lines
1.0 KiB
TypeScript
import { rename } from 'node:fs/promises';
|
|
|
|
import { assertPlaywrightEnabled } from './tests/integration/testExtensions';
|
|
import { FilePermission, addRandomSuffix, getHanzo StudioAppDataPath, pathExists } from './tests/shared/utils';
|
|
|
|
/** Backs up app data - in case this was run on a non-ephemeral machine. Does nothing in CI. */
|
|
async function globalSetup() {
|
|
console.log('+ Playwright globalSetup called');
|
|
assertPlaywrightEnabled();
|
|
|
|
if (process.env.COMFYUI_E2E_INDIVIDUAL_TEST_MODE === '1') return;
|
|
|
|
const appDataPath = getHanzo StudioAppDataPath();
|
|
await backupByRenaming(appDataPath);
|
|
}
|
|
|
|
/** Backs up a the provided app data path by appending a random suffix. */
|
|
async function backupByRenaming(appDataPath: string) {
|
|
if (!(await pathExists(appDataPath, FilePermission.Writable))) return;
|
|
|
|
const newPath = addRandomSuffix(appDataPath);
|
|
console.warn(`AppData exists! Moving ${appDataPath} to ${newPath}. Remove manually if you do not require it.`);
|
|
await rename(appDataPath, newPath);
|
|
return newPath;
|
|
}
|
|
|
|
export default globalSetup;
|