@@ -71,7 +71,6 @@ function getOutputPath(explicitOutput: string | undefined, options: Pick<InitOpt
7171type PromptResult = {
7272 idlPath : string ;
7373 jsPath ?: string ;
74- rustCrate ?: string ;
7574 rustPath ?: string ;
7675 scripts : string [ ] ;
7776} ;
@@ -117,19 +116,13 @@ async function getPromptResult(
117116 } ,
118117 {
119118 initial : defaults . jsPath ,
120- message : '[js] Where should the JavaScript code be generated ?' ,
119+ message : '[js] Where is the JavaScript client package located ?' ,
121120 name : 'jsPath' ,
122121 type : hasScript ( 'js' ) ,
123122 } ,
124123 {
125- initial : defaults . rustCrate ,
124+ initial : defaults . rustPath ,
126125 message : '[rust] Where is the Rust client crate located?' ,
127- name : 'rustCrate' ,
128- type : hasScript ( 'rust' ) ,
129- } ,
130- {
131- initial : ( prev : string ) => `${ prev } /src/generated` ,
132- message : '[rust] Where should the Rust code be generated?' ,
133126 name : 'rustPath' ,
134127 type : hasScript ( 'rust' ) ,
135128 } ,
@@ -141,9 +134,8 @@ async function getPromptResult(
141134function getDefaultPromptResult ( ) : PromptResult {
142135 return {
143136 idlPath : 'program/idl.json' ,
144- jsPath : 'clients/js/src/generated' ,
145- rustCrate : 'clients/rust' ,
146- rustPath : 'clients/rust/src/generated' ,
137+ jsPath : 'clients/js' ,
138+ rustPath : 'clients/rust' ,
147139 scripts : [ 'js' , 'rust' ] ,
148140 } ;
149141}
@@ -185,7 +177,7 @@ function getConfigFromPromptResult(result: PromptResult): Config {
185177 if ( result . scripts . includes ( 'rust' ) ) {
186178 scripts . rust = {
187179 from : '@codama/renderers-rust' ,
188- args : [ result . rustPath , { crateFolder : result . rustCrate , formatCode : true } ] ,
180+ args : [ result . rustPath , { formatCode : true } ] ,
189181 } ;
190182 }
191183 return { idl : result . idlPath , before : [ ] , scripts } ;
0 commit comments