@@ -73,6 +73,22 @@ export default class AppDeploy extends Command {
7373 options : [ "enable" , "disable" ] ,
7474 env : "ECLOUD_RESOURCE_USAGE_MONITORING" ,
7575 } ) ,
76+ website : Flags . string ( {
77+ required : false ,
78+ description : "App website URL (optional)" ,
79+ } ) ,
80+ description : Flags . string ( {
81+ required : false ,
82+ description : "App description (optional)" ,
83+ } ) ,
84+ "x-url" : Flags . string ( {
85+ required : false ,
86+ description : "X (Twitter) profile URL (optional)" ,
87+ } ) ,
88+ image : Flags . string ( {
89+ required : false ,
90+ description : "Path to app icon/logo image - JPG/PNG, max 4MB, square recommended (optional)" ,
91+ } ) ,
7692 } ;
7793
7894 async run ( ) {
@@ -172,41 +188,64 @@ export default class AppDeploy extends Command {
172188
173189 // 11. Collect app profile while deployment is in progress (optional)
174190 if ( ! flags [ "skip-profile" ] ) {
175- this . log (
176- "\nDeployment confirmed onchain. While your instance provisions, set up a public profile:" ,
177- ) ;
191+ // Check if any profile flags were provided
192+ const hasProfileFlags = flags . website || flags . description || flags [ "x-url" ] || flags . image ;
193+
194+ let profile : {
195+ name : string ;
196+ website ?: string ;
197+ description ?: string ;
198+ xURL ?: string ;
199+ imagePath ?: string ;
200+ } | null = null ;
201+
202+ if ( hasProfileFlags ) {
203+ // Use flags directly if any were provided
204+ profile = {
205+ name : appName ,
206+ website : flags . website ,
207+ description : flags . description ,
208+ xURL : flags [ "x-url" ] ,
209+ imagePath : flags . image ,
210+ } ;
211+ } else {
212+ // Otherwise prompt interactively
213+ this . log (
214+ "\nDeployment confirmed onchain. While your instance provisions, set up a public profile:" ,
215+ ) ;
216+
217+ try {
218+ profile = ( await getAppProfileInteractive ( appName , true ) ) || null ;
219+ } catch {
220+ // Profile collection cancelled or failed - continue without profile
221+ logger . debug ( "Profile collection skipped or cancelled" ) ;
222+ }
223+ }
178224
179- try {
180- const profile = await getAppProfileInteractive ( appName , true ) ;
225+ if ( profile ) {
226+ // Upload profile if provided (non-blocking - warn on failure but don't fail deployment)
227+ logger . info ( "Uploading app profile..." ) ;
228+ try {
229+ const userApiClient = new UserApiClient ( environmentConfig , privateKey , rpcUrl ) ;
230+ await userApiClient . uploadAppProfile (
231+ res . appId as `0x${string } `,
232+ profile . name ,
233+ profile . website ,
234+ profile . description ,
235+ profile . xURL ,
236+ profile . imagePath ,
237+ ) ;
238+ logger . info ( "✓ Profile uploaded successfully" ) ;
181239
182- if ( profile ) {
183- // Upload profile if provided (non-blocking - warn on failure but don't fail deployment)
184- logger . info ( "Uploading app profile..." ) ;
240+ // Invalidate profile cache to ensure fresh data on next command
185241 try {
186- const userApiClient = new UserApiClient ( environmentConfig , privateKey , rpcUrl ) ;
187- await userApiClient . uploadAppProfile (
188- res . appId as `0x${string } `,
189- profile . name ,
190- profile . website ,
191- profile . description ,
192- profile . xURL ,
193- profile . imagePath ,
194- ) ;
195- logger . info ( "✓ Profile uploaded successfully" ) ;
196-
197- // Invalidate profile cache to ensure fresh data on next command
198- try {
199- invalidateProfileCache ( environment ) ;
200- } catch ( cacheErr : any ) {
201- logger . debug ( `Failed to invalidate profile cache: ${ cacheErr . message } ` ) ;
202- }
203- } catch ( uploadErr : any ) {
204- logger . warn ( `Failed to upload profile: ${ uploadErr . message } ` ) ;
242+ invalidateProfileCache ( environment ) ;
243+ } catch ( cacheErr : any ) {
244+ logger . debug ( `Failed to invalidate profile cache: ${ cacheErr . message } ` ) ;
205245 }
246+ } catch ( uploadErr : any ) {
247+ logger . warn ( `Failed to upload profile: ${ uploadErr . message } ` ) ;
206248 }
207- } catch {
208- // Profile collection cancelled or failed - continue without profile
209- logger . debug ( "Profile collection skipped or cancelled" ) ;
210249 }
211250 }
212251
0 commit comments