master-zapier-plan-draft/packages/zappier-customer-service/src/staff-page.js
George Lambert d8efffe8be
Some checks are pending
offline / test (push) Waiting to run
Close the last three UI leftovers: shared staff HTML, cookie domain, stock Swagger label.
verae-staff-ui holds one review template for CS and access-staff.
Staff cookies take STAFF_COOKIE_DOMAIN for a reverse-proxy host.
/docs stays vendor Swagger with an integrator banner only.
2026-09-11 18:22:57 -04:00

16 lines
528 B
JavaScript

import fs from 'node:fs';
import path from 'node:path';
import { pathToFileURL } from 'node:url';
export async function staffPageHtml(opts, fallbackPath) {
const sibling = path.join(path.dirname(fallbackPath), '..', '..', 'verae-staff-ui', 'src', 'load.js');
try {
if (fs.existsSync(sibling)) {
const { loadReviewHtml } = await import(pathToFileURL(sibling).href);
return loadReviewHtml(opts, fallbackPath);
}
} catch {
/* standalone clone */
}
return fs.readFileSync(fallbackPath, 'utf8');
}