import { PackageVersionResolutionError, resolvePackageVersion } from "./package-version.js";
const SERVER_PACKAGE_NAME = "@kong-link/server";
export class DaemonVersionResolutionError extends PackageVersionResolutionError {
}
export function resolveDaemonVersion(moduleUrl = import.meta.url) {
    try {
        return resolvePackageVersion({
            moduleUrl,
            packageName: SERVER_PACKAGE_NAME,
        });
    }
    catch (error) {
        if (error instanceof PackageVersionResolutionError) {
            throw new DaemonVersionResolutionError({
                moduleUrl,
                packageName: SERVER_PACKAGE_NAME,
            });
        }
        throw error;
    }
}
//# sourceMappingURL=daemon-version.js.map