@@ -340,7 +340,7 @@ export const moreStack = async function (message: string) {
340340 return r [ "stack" ]
341341}
342342
343- export const params = async function ( module : string ) {
343+ export const paramss = async function ( module : string ) {
344344 const choice : Record < string , Array < string > | Array < Iroverdescription > > =
345345 cliConfig . app . choices
346346 let name : Record < string , string > = { }
@@ -397,3 +397,43 @@ export const params = async function (module: string) {
397397 return { }
398398 }
399399}
400+
401+ export const params = async function ( module : string ) {
402+ const { choices } = cliConfig . app
403+ const name : Record < string , string > = { }
404+ const res : IroverCLIparamModule = < IroverCLIparamModule > { }
405+ if ( module !== "CRUDModule" ) {
406+ return { }
407+ }
408+
409+ const modulesParams = moduleParams . CRUDModule [ "params" ] . params
410+
411+ if ( ! modulesParams . length ) {
412+ return { }
413+ }
414+
415+ for ( const param of modulesParams ) {
416+ if ( param . value === "choice" ) {
417+ const r = await inputType (
418+ param . key ,
419+ < Array < string > > choices [ param . key ] ,
420+ param . message
421+ )
422+ Object . assign ( res , r )
423+ } else if ( param . value === "multichoice" ) {
424+ const r = await multichoice ( param . key , < Array < string > > choices . methods , "" )
425+ Object . assign ( res , r )
426+ } else if ( param . key === "name" ) {
427+ const r = await inputString ( param . key , "" , false , param . message )
428+ name [ param . key ] = r [ param . key ]
429+ } else {
430+ const r = await inputString ( param . key , "" , false , param . message )
431+ Object . assign ( res , r )
432+ }
433+ }
434+
435+ return {
436+ res,
437+ name : name [ "name" ] ,
438+ }
439+ }
0 commit comments