Files
pulse/frontend-modern/scripts/sync-public-docs.mjs
T
pulse-triage[bot] 63fcae0a3a Preserve partial PVE filesystem readings without widening helper access
Replace the rejected global host-network proposal with the unchanged private namespace on every platform, including native linux-386. Carry successful rows and omitted VMIDs through operation v2 without clearing degraded health or renewing omitted measurements; retain strict complete-only v1 compatibility. Restart the installer-owned helper only after isolated-unit and socket checks, and document the unresolved pmxcfs IPC limitation rather than claiming PVE recovery.

Change-source: pulse-maintainer
2026-10-05 18:22:01 +01:00

47 lines
1.8 KiB
JavaScript

import { copyFile, mkdir } from 'node:fs/promises';
import path from 'node:path';
import { fileURLToPath, pathToFileURL } from 'node:url';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const frontendRoot = path.resolve(__dirname, '..');
const repoRoot = path.resolve(frontendRoot, '..');
const targetDocsDir = path.join(frontendRoot, 'public', 'docs');
const shippedDocs = [
{ source: path.join(repoRoot, 'docs', 'README.md'), target: 'README.md' },
{
source: path.join(repoRoot, 'docs', 'MIGRATION_UNIFIED_NAV.md'),
target: 'MIGRATION_UNIFIED_NAV.md',
},
{ source: path.join(repoRoot, 'docs', 'PRIVACY.md'), target: 'PRIVACY.md' },
{ source: path.join(repoRoot, 'docs', 'CONFIGURATION.md'), target: 'CONFIGURATION.md' },
{ source: path.join(repoRoot, 'docs', 'UNIFIED_AGENT.md'), target: 'UNIFIED_AGENT.md' },
{ source: path.join(repoRoot, 'docs', 'AGENT_SECURITY.md'), target: 'AGENT_SECURITY.md' },
{ source: path.join(repoRoot, 'docs', 'PROXY_AUTH.md'), target: 'PROXY_AUTH.md' },
{ source: path.join(repoRoot, 'docs', 'TRUENAS.md'), target: 'TRUENAS.md' },
{ source: path.join(repoRoot, 'SECURITY.md'), target: 'SECURITY.md' },
{ source: path.join(repoRoot, 'TERMS.md'), target: 'TERMS.md' },
];
export async function syncPublicDocs() {
await mkdir(targetDocsDir, { recursive: true });
for (const { source, target } of shippedDocs) {
await copyFile(source, path.join(targetDocsDir, target));
}
console.log(`Synced shipped docs to ${targetDocsDir}`);
}
const isMainModule = process.argv[1]
? pathToFileURL(process.argv[1]).href === import.meta.url
: false;
if (isMainModule) {
syncPublicDocs().catch((error) => {
console.error(error instanceof Error ? error.message : String(error));
process.exit(1);
});
}