
Security News
OWASP 2025 Top 10 Adds Software Supply Chain Failures, Ranked Top Community Concern
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.
ember-rewind-stack
Advanced tools
Many applications have code that orchestrates a LOT of API calls. Particularly related to creation of complex solutions, it is quite reasonable to expect that one user action will result in 5 or more API calls, some of which will result in the creation of ancillary records/entities.
The question is - what happens when some critical path call fails in the middle of one of these giant chains?
Enter the rewind-stack-service, which allows you to manage multiple, possibly parallel, operation stacks. In the event of a failure, your .catch() block can ask the service for all the completed operations, and then take action to roll-back the changes.
ember install ember-rewind-stack
Only use this when you are orchestrating a lot of calls. If you are just issuing a single save operation, this is massive overkill. Basically, if you can't easily figure out how to clean things up in a .catch(), then consider using this.
| method | returns | description |
|---|---|---|
| addOperation (stackName, operationObj) | n/a | add an operation to a named stack. Creates the stack if it does not exist. Sets the .current to the passed in operation. If there is a .current, it is pushed into the stack's .completed array. A .startedAt property is added to the operation when pushed in. A .completedAt property is set when it's pushed into the .completed array. |
| completeOperation (stackName, options) | n/a | Moves the current operation onto the .completed array, adding the .completedAt property, and clearing the stack's .current property. The options are merged into the current operation, allowing useful stuff like itemId's to be added after an operation completes. |
| getCompleted (stackName) | array of completed operations, reversed | Used by exception handlers to rewind the completed actions |
| removeStack (stackName) | n/a | clean up a stack |
| getCurrent (stackName) | Current Operation Obj | Returns the current operation |
| getStack (stackName) | stack object | returns the entire stack object |
The operation object can be whatever you need it to be. The intent here is that you provide enough info in that object to allow you to un-do the operation.
{
"name": "create site item", // some sort of name that makes sense to you
"type": "create-item", // something that would make sense in a log
"cleanup": "remove-item", // a key for your clean up code to use...
"inputs": { // whatever your cleanup code needs...
"id": "3ef...", // in this case, to delete an item we need the id and owner
"owner": "dcadmin"
}
}
FAQs
Central rewind stack for Ember apps that work with chatty APIs.
We found that ember-rewind-stack demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.