@@ -2,6 +2,7 @@ const c = require('ansi-colors')
22const ask = require ( '../util/ask' )
33const Blueprint = require ( '../blueprint' )
44const Scaffold = require ( '@wmfs/tymly-scaffold' )
5+ const labelAndDescription = require ( '../util/label-and-description' )
56const selectInternalModel = require ( '../util/select-model' )
67const chooseCategories = require ( '../util/choose-categories' )
78const chooseRoles = require ( '../util/choose-roles' )
@@ -14,10 +15,20 @@ async function addStateMachine (options) {
1415
1516 const stateMachine = await selectMachine ( )
1617 if ( ! stateMachine ) return
18+
19+ console . log ( )
1720 const form = await selectForm ( blueprint )
1821 if ( ! form ) return
1922 const model = await selectModel ( form , blueprint )
2023 if ( ! model ) return
24+
25+ console . log ( )
26+ const { label, description } =
27+ await labelAndDescription (
28+ `${ _ . upperFirst ( stateMachine ) } ${ model } ` ,
29+ `${ _ . upperFirst ( stateMachine ) } ${ model } using ${ form . name } form.`
30+ )
31+
2132 const categories = await chooseCategories ( blueprint )
2233
2334 const roles = await chooseRoles ( blueprint )
@@ -27,6 +38,8 @@ async function addStateMachine (options) {
2738
2839 const scaffold = blueprint . scaffold
2940 scaffold . makeStateMachine ( {
41+ label : label ,
42+ description : description ,
3043 stateMachine : stateMachine ,
3144 namespace : blueprint . namespace ,
3245 modelName : model ,
0 commit comments