Initial import of zappier-customer-service from zapier monorepo

This commit is contained in:
George Lambert 2026-09-11 19:09:47 -04:00
commit 8adae77807
11 changed files with 547 additions and 0 deletions

16
src/staff-page.js Normal file
View file

@ -0,0 +1,16 @@
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');
}