With Audit Log prototype
✓ Published0🌍 Public
RRestuta
Last edited Jan 15, 2019
Created on Jan 15, 2019
This example shows a JavaScript module that wraps step updates to collect and persist audit log records within a transaction. It defines factory functions, such as `stepFactory` and `withAuditLogCollector`, to intercept update operations, accumulate audit log records in a container, and execute them after the main update succeeds. The code uses a closure-based container with `getAll` and `add` methods, and async/await for handling promises. It demonstrates a composable pattern for injecting audit logging into existing command functions without altering their core logic.
AI-generated description