Adds /api/health, ntfy notify on config save, /admin/analytics charts, and deploy smoke for miniprogram config/API. Co-authored-by: Cursor <cursoragent@cursor.com>
18 lines
548 B
TypeScript
18 lines
548 B
TypeScript
import { existsSync } from "fs";
|
|
import path from "path";
|
|
|
|
/**
|
|
* Resolve VIP content files under portal (apps/nomadvip) or standalone (app/data).
|
|
*/
|
|
export function resolveVipDataFile(...segments: string[]): string {
|
|
const candidates = [
|
|
path.join(process.cwd(), "apps", "nomadvip", "app", "data", ...segments),
|
|
path.join(process.cwd(), "app", "data", ...segments),
|
|
path.join(process.cwd(), "apps", "nomadvip", "app", ...segments),
|
|
];
|
|
for (const p of candidates) {
|
|
if (existsSync(p)) return p;
|
|
}
|
|
return candidates[0];
|
|
}
|