Last active
January 5, 2021 15:27
-
-
Save wegry/eaec7d5a932e45e57578204a5df70f25 to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// To see it in action https://xstate.js.org/viz/ | |
// Since this snippet isn't functioning on its own, turn off some rules | |
/* eslint-disable new-cap, @typescript-eslint/ban-ts-comment */ | |
// @ts-nocheck | |
Machine({ | |
id: 'starting', | |
initial: 'starting', | |
states: { | |
build: { | |
initial: 'building', | |
type: 'parallel', | |
states: { | |
building: { | |
on: { | |
FAILURE: 'failed-building', | |
SUCCESS: 'built', | |
}, | |
}, | |
built: { | |
type: 'final', | |
}, | |
'failed-building': { | |
type: 'final', | |
}, | |
}, | |
}, | |
'failed-deploy': {}, | |
starting: { | |
on: {}, | |
}, | |
running: { | |
on: { | |
CONFIG_CHANGE: 'build', | |
ON_24HRS_SINCE_CREATION: 'stopped', | |
}, | |
}, | |
stopped: {}, | |
unknown: { | |
type: 'final', | |
}, | |
}, | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment