This library is a set of tools that are supposed to make the user of the simulator a happier developer.
For the time being, it contains only one function, addMacro()
.
This function adds a Macro into the target resource's interaction pane in Wing Console. Every macro that is added is seen as a button on the right side panel.
The following code:
bring cloud;
bring simtools;
let bucket = new cloud.Bucket();
simtools.addMacro(bucket, "Clean", inflight () => {
for i in bucket.list() {
bucket.delete(i);
}
});
simtools.addMacro(bucket, "Populate", inflight () => {
for i in 1..10 {
bucket.put("{i}.txt", "This is {i}");
}
});
Will create two buttons on the Bucket resource on the right side panel:
- Clean
- Populate
npm i @winglibs/simtools
This library is licensed under the MIT License.