feat(n8n): add get-logs action

This commit is contained in:
zap
2026-03-12 16:45:19 +00:00
parent c1f851b451
commit aa0914f734
6 changed files with 90 additions and 22 deletions

View File

@@ -72,7 +72,7 @@ def main():
router = by_name['route-action'].get('parameters', {})
js_code = router.get('jsCode', '')
for snippet in ('append_log', 'notify', 'unknown_action', 'invalid_request', '$getWorkflowStaticData', 'actionLog', 'retained_entries', 'notify_text'):
for snippet in ('append_log', 'get_logs', 'notify', 'unknown_action', 'invalid_request', '$getWorkflowStaticData', 'actionLog', 'retained_entries', 'notify_text', 'entries.length', 'Math.min(50'):
if snippet not in js_code:
fail(f'route-action jsCode missing expected snippet: {snippet!r}')
@@ -102,7 +102,7 @@ def main():
print('OK: workflow asset structure looks consistent')
print(f'- workflow: {path}')
print(f'- nodes: {len(nodes)}')
print('- routes: append_log -> workflow static data, notify -> Telegram + Discord, fallback -> JSON error')
print('- routes: append_log + get_logs via workflow static data, notify via Telegram + Discord, fallback -> JSON error')
print('- samples: test-append-log.json, test-notify.json')