Touch project.json on deploy to help trigger Ignition rescan

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
igurielidze 2026-03-30 23:03:15 +04:00
parent 2130ad523a
commit 937153d611
2 changed files with 7 additions and 1 deletions

View File

@ -591,7 +591,7 @@ export async function deployToIgnition() {
});
const result = await resp.json();
if (result.ok) {
alert(`Deployed to Ignition!\n${result.path}`);
alert(`Deployed to Ignition!\n${result.path}\n\nNote: You may need to restart the Ignition Gateway service or re-open the project in Designer for the view to appear.`);
} else {
alert(`Deploy failed: ${result.error}`);
}

View File

@ -269,6 +269,12 @@ export default defineConfig({
fs.mkdirSync(viewDir, { recursive: true });
fs.writeFileSync(path.join(viewDir, 'view.json'), viewJson);
fs.writeFileSync(path.join(viewDir, 'resource.json'), resourceJson);
// Touch project.json to signal modification
const projectJson = path.join(ignitionBase, projectName, 'project.json');
if (fs.existsSync(projectJson)) {
const now = new Date();
fs.utimesSync(projectJson, now, now);
}
res.setHeader('Content-Type', 'application/json');
res.end(JSON.stringify({ ok: true, path: viewDir }));
} catch (err: any) {