* Stage production icons for desktop builds and publish - add shared brand asset paths and a Windows .ico asset - stage Linux/Windows icons in desktop artifact builds - override and restore publish favicon during server CLI publish * 'blip' * Fix PR review issues for publish icon staging * Refactor brand assets and harden Windows desktop build setup * Apply remaining server orchestration updates * Fix production mac icon asset Co-authored-by: Theo Browne <[email protected]> --------- Co-authored-by: Cursor Agent <[email protected]> Co-authored-by: Theo Browne <[email protected]>
25 lines
656 B
TypeScript
25 lines
656 B
TypeScript
import fs from "node:fs";
|
|
import path from "node:path";
|
|
|
|
import { Effect, Logger } from "effect";
|
|
import * as Layer from "effect/Layer";
|
|
|
|
import { ServerConfig } from "./config";
|
|
|
|
export const ServerLoggerLive = Effect.gen(function* () {
|
|
const config = yield* ServerConfig;
|
|
|
|
const logDir = path.join(config.stateDir, "logs");
|
|
const logPath = path.join(logDir, "server.log");
|
|
|
|
yield* Effect.sync(() => {
|
|
fs.mkdirSync(logDir, { recursive: true });
|
|
});
|
|
|
|
const fileLogger = Logger.formatSimple.pipe(Logger.toFile(logPath));
|
|
|
|
return Logger.layer([Logger.defaultLogger, fileLogger], {
|
|
mergeWithExisting: false,
|
|
});
|
|
}).pipe(Layer.unwrap);
|