fix(deploy): add nginx healthcheck and ensure nginx listens on all interfaces

This commit is contained in:
Andres Santana
2026-09-25 11:08:53 -04:00
commit fd096a26ff
115 changed files with 22421 additions and 0 deletions
@@ -0,0 +1,33 @@
import { ParentMessage } from '../constants/messages.js';
import { undo, redo } from '../state/history-state.js';
import { notifyDraftStateChanged } from '../api/draft-snapshot.js';
/**
* Applies one undo/redo step and notifies the parent frame when an action ran.
* @param {'undo'|'redo'} direction
* @returns {object|null}
*/
function applySessionHistoryStep(direction) {
const action = direction === 'undo' ? undo() : redo();
if (!action) return null;
notifyDraftStateChanged(
direction === 'undo' ? ParentMessage.EDIT_UNDO_APPLIED : ParentMessage.EDIT_REDO_APPLIED,
{
editId: action.editId,
value: direction === 'undo' ? action.instruction.beforeContent : action.instruction.afterContent,
},
);
return action;
}
/** @returns {object|null} */
export function applySessionUndo() {
return applySessionHistoryStep('undo');
}
/** @returns {object|null} */
export function applySessionRedo() {
return applySessionHistoryStep('redo');
}