File tree Expand file tree Collapse file tree 2 files changed +8
-10
lines changed
Expand file tree Collapse file tree 2 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ async function run(argv:AnyObject) {
3838
3939
4040 if ( AppType !== "Customizable" ) {
41- stackname [ `stackName${ i } ` ] = util . makeid ( 2 )
41+ stackname [ `stackName${ i } ` ] = await util . makeid ( )
4242 let stack_name = stackname
4343 let stackName :string = stack_name [ `stackName${ i } ` ] ;
4444 if ( AppType === "CRUD" ) {
@@ -82,8 +82,7 @@ async function run(argv:AnyObject) {
8282 } while ( moreStack !== 'No' ) {
8383 template = { ...app_name , language } ;
8484 if ( stack_names !== null ) template = { ...template , Stacks : stack_names , StackParams} ;
85- if ( customStacks !== null )
86- template = { ...template , CustomStacks : customStacks } ;
85+ if ( customStacks !== null ) template = { ...template , CustomStacks : customStacks } ;
8786
8887 await rover_utilities . generationSAM ( ( { template} ) [ "template" ] ) ;
8988 }
Original file line number Diff line number Diff line change @@ -445,7 +445,6 @@ export let moreStack = async function(message:string){
445445
446446export let params = async function ( module :string ) {
447447 let choice :AnyObject = cliConfig . app . choices ;
448- let params :AnyObject = { }
449448 let name :AnyObject = { } ;
450449 let res :AnyObject = { } ;
451450if ( module === "CRUD" ) {
@@ -476,13 +475,13 @@ if(module==="CRUD"){
476475
477476 }
478477 }
479- return params = {
478+ return {
480479 res,
481480 name : name [ "name" ]
482481 }
483482
484483 } else {
485- return
484+ return { }
486485 }
487486
488487
@@ -519,7 +518,7 @@ export let langValue=async function () {
519518
520519}
521520
522- export let samValidate = function ( ) {
521+ export let samValidate = async function ( ) {
523522 try {
524523 let files :AnyArray = fs . readdirSync ( exec ( "pwd" ) . toString ( ) . replace ( "\n" , "" ) )
525524 let yamlfiles :AnyArray = [ ]
@@ -535,14 +534,14 @@ export let samValidate=function(){
535534 }
536535 } )
537536 if ( ! response . includes ( true ) ) {
538- throw ( "improper SAM Template file ")
537+ throw new Error ( " SAM Template error \n ")
539538 }
540539 } catch ( error ) {
541- throw ( "Not a SAM file : " + error )
540+ throw new Error ( "Not a SAM file or " + error )
542541 }
543542
544543}
545- export let makeid = function ( length ) {
544+ export let makeid = async function ( ) {
546545 const crypto = require ( 'crypto' ) ;
547546 return ( crypto . randomBytes ( 1 ) . toString ( "base64url" ) . replace ( / \d / g, 'd' ) ) . toLowerCase ( ) ;
548547}
You can’t perform that action at this time.
0 commit comments