first-commit
ci / Validate workspace (push) Has been cancelled
landing-page-ci / Validate landing page (push) Has been cancelled
landing-page-deploy / Deploy landing page (push) Has been cancelled
github-metrics / Generate repository metrics SVG (push) Has been cancelled
refresh-contributors-wall / Refresh contributors wall cache bust (push) Waiting to run
ci / Validate workspace (push) Has been cancelled
landing-page-ci / Validate landing page (push) Has been cancelled
landing-page-deploy / Deploy landing page (push) Has been cancelled
github-metrics / Generate repository metrics SVG (push) Has been cancelled
refresh-contributors-wall / Refresh contributors wall cache bust (push) Waiting to run
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
import { join } from "node:path";
|
||||
|
||||
import { APP_KEYS } from "@open-design/sidecar-proto";
|
||||
|
||||
import type { PackagedConfig } from "./config.js";
|
||||
|
||||
export type PackagedNamespacePaths = {
|
||||
cacheRoot: string;
|
||||
desktopIdentityPath: string;
|
||||
desktopLogPath: string;
|
||||
dataRoot: string;
|
||||
desktopLogsRoot: string;
|
||||
electronSessionDataRoot: string;
|
||||
electronUserDataRoot: string;
|
||||
logsRoot: string;
|
||||
namespaceRoot: string;
|
||||
resourceRoot: string;
|
||||
runtimeRoot: string;
|
||||
};
|
||||
|
||||
export function resolvePackagedNamespacePaths(
|
||||
config: PackagedConfig,
|
||||
namespace = config.namespace,
|
||||
): PackagedNamespacePaths {
|
||||
const namespaceRoot = join(config.namespaceBaseRoot, namespace);
|
||||
|
||||
return {
|
||||
cacheRoot: join(namespaceRoot, "cache"),
|
||||
desktopIdentityPath: join(namespaceRoot, "runtime", "desktop-root.json"),
|
||||
desktopLogPath: join(namespaceRoot, "logs", APP_KEYS.DESKTOP, "latest.log"),
|
||||
dataRoot: join(namespaceRoot, "data"),
|
||||
desktopLogsRoot: join(namespaceRoot, "logs", APP_KEYS.DESKTOP),
|
||||
electronSessionDataRoot: join(namespaceRoot, "user-data", "session"),
|
||||
electronUserDataRoot: join(namespaceRoot, "user-data"),
|
||||
logsRoot: join(namespaceRoot, "logs"),
|
||||
namespaceRoot,
|
||||
resourceRoot: config.resourceRoot,
|
||||
runtimeRoot: join(namespaceRoot, "runtime"),
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user