Some checks failed
ci / Validate workspace (push) Successful in 12m32s
landing-page-ci / Validate landing page (push) Successful in 9m41s
landing-page-deploy / Deploy landing page (push) Failing after 5m23s
github-metrics / Generate repository metrics SVG (push) Has started running
refresh-contributors-wall / Refresh contributors wall cache bust (push) Has started running
This repository contains the open-design daemon CLI source code, built and packaged at https://helix-mind.ai/cli/open-design/latest.tgz for use by the HelixMind /design slash command. Licenses: Apache-2.0 (root) + MIT (skills/*)
29 lines
984 B
TypeScript
29 lines
984 B
TypeScript
import { mkdir } from "node:fs/promises";
|
|
|
|
import { app } from "electron";
|
|
|
|
import type { PackagedNamespacePaths } from "./paths.js";
|
|
|
|
export async function ensurePackagedNamespacePaths(
|
|
paths: PackagedNamespacePaths,
|
|
): Promise<void> {
|
|
await Promise.all([
|
|
mkdir(paths.namespaceRoot, { recursive: true }),
|
|
mkdir(paths.cacheRoot, { recursive: true }),
|
|
mkdir(paths.dataRoot, { recursive: true }),
|
|
mkdir(paths.logsRoot, { recursive: true }),
|
|
mkdir(paths.desktopLogsRoot, { recursive: true }),
|
|
mkdir(paths.runtimeRoot, { recursive: true }),
|
|
mkdir(paths.electronUserDataRoot, { recursive: true }),
|
|
mkdir(paths.electronSessionDataRoot, { recursive: true }),
|
|
]);
|
|
}
|
|
|
|
export function applyPackagedElectronPathOverrides(
|
|
paths: PackagedNamespacePaths,
|
|
): void {
|
|
app.setPath("userData", paths.electronUserDataRoot);
|
|
app.setPath("sessionData", paths.electronSessionDataRoot);
|
|
app.setPath("logs", paths.desktopLogsRoot);
|
|
}
|