Self-hosted project management for devs and their clients: tickets, time tracking, docs and meetings, with an AI assistant that cites its sources. AGPL-3.0.
Ruby agplai-assistantdockerdsgvogdprhotwireissue-trackerjira-alternativeknowledge-basellmmcp-servermeeting-notesopen-sourceproject-managementredmine-alternativeruby-on-railsself-hostedticketingtime-tracking
import { existsSync } from "node:fs"
import { pathToFileURL } from "node:url"
import { resolve as resolvePath } from "node:path"
const LIB = resolvePath("app/javascript/lib")
export async function resolve(specifier, context, nextResolve) {
if (!specifier.startsWith(".") && !specifier.startsWith("/") && !specifier.includes(":")) {
const candidate = resolvePath(LIB, `${specifier}.js`)
if (candidate.startsWith(LIB) && existsSync(candidate)) {
return { url: pathToFileURL(candidate).href, shortCircuit: true }
}
}
return nextResolve(specifier, context)
}