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:
parent
2130ad523a
commit
937153d611
@ -591,7 +591,7 @@ export async function deployToIgnition() {
|
|||||||
});
|
});
|
||||||
const result = await resp.json();
|
const result = await resp.json();
|
||||||
if (result.ok) {
|
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 {
|
} else {
|
||||||
alert(`Deploy failed: ${result.error}`);
|
alert(`Deploy failed: ${result.error}`);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -269,6 +269,12 @@ export default defineConfig({
|
|||||||
fs.mkdirSync(viewDir, { recursive: true });
|
fs.mkdirSync(viewDir, { recursive: true });
|
||||||
fs.writeFileSync(path.join(viewDir, 'view.json'), viewJson);
|
fs.writeFileSync(path.join(viewDir, 'view.json'), viewJson);
|
||||||
fs.writeFileSync(path.join(viewDir, 'resource.json'), resourceJson);
|
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.setHeader('Content-Type', 'application/json');
|
||||||
res.end(JSON.stringify({ ok: true, path: viewDir }));
|
res.end(JSON.stringify({ ok: true, path: viewDir }));
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user