@@ -353,18 +353,21 @@ const createTemplateVersionTar = async (
353
353
responses = { }
354
354
}
355
355
if ( ! responses . parse ) {
356
- responses . parse = [ {
357
- parse : { }
358
- } ]
356
+ responses . parse = [
357
+ {
358
+ parse : { } ,
359
+ } ,
360
+ ]
359
361
}
360
362
if ( ! responses . apply ) {
361
- responses . apply = [ {
362
- apply : { }
363
- } ]
363
+ responses . apply = [
364
+ {
365
+ apply : { } ,
366
+ } ,
367
+ ]
364
368
}
365
369
if ( ! responses . plan ) {
366
- responses . plan = responses . apply . map (
367
- response => {
370
+ responses . plan = responses . apply . map ( ( response ) => {
368
371
if ( response . log ) {
369
372
return response
370
373
}
@@ -374,7 +377,7 @@ const createTemplateVersionTar = async (
374
377
resources : response . apply ?. resources ?? [ ] ,
375
378
parameters : response . apply ?. parameters ?? [ ] ,
376
379
gitAuthProviders : response . apply ?. gitAuthProviders ?? [ ] ,
377
- }
380
+ } ,
378
381
}
379
382
} )
380
383
}
@@ -395,43 +398,45 @@ const createTemplateVersionTar = async (
395
398
396
399
const fillResource = ( resource : RecursivePartial < Resource > ) => {
397
400
if ( resource . agents ) {
398
- resource . agents = resource . agents ?. map ( ( agent : RecursivePartial < Agent > ) => {
399
- if ( agent . apps ) {
400
- agent . apps = agent . apps ?. map ( ( app : RecursivePartial < App > ) => {
401
- return {
402
- command : "" ,
403
- displayName : "example" ,
404
- external : false ,
405
- icon : "" ,
406
- sharingLevel : AppSharingLevel . PUBLIC ,
407
- slug : "example" ,
408
- subdomain : false ,
409
- url : "" ,
410
- ...app ,
411
- } as App
412
- } )
413
- }
414
- return {
415
- apps : [ ] ,
416
- architecture : "amd64" ,
417
- connectionTimeoutSeconds : 300 ,
418
- directory : "" ,
419
- env : { } ,
420
- id : randomUUID ( ) ,
421
- metadata : [ ] ,
422
- motdFile : "" ,
423
- name : "dev" ,
424
- operatingSystem : "linux" ,
425
- shutdownScript : "" ,
426
- shutdownScriptTimeoutSeconds : 0 ,
427
- startupScript : "" ,
428
- startupScriptBehavior : "" ,
429
- startupScriptTimeoutSeconds : 300 ,
430
- troubleshootingUrl : "" ,
431
- token : randomUUID ( ) ,
432
- ...agent ,
433
- } as Agent
434
- } )
401
+ resource . agents = resource . agents ?. map (
402
+ ( agent : RecursivePartial < Agent > ) => {
403
+ if ( agent . apps ) {
404
+ agent . apps = agent . apps ?. map ( ( app : RecursivePartial < App > ) => {
405
+ return {
406
+ command : "" ,
407
+ displayName : "example" ,
408
+ external : false ,
409
+ icon : "" ,
410
+ sharingLevel : AppSharingLevel . PUBLIC ,
411
+ slug : "example" ,
412
+ subdomain : false ,
413
+ url : "" ,
414
+ ...app ,
415
+ } as App
416
+ } )
417
+ }
418
+ return {
419
+ apps : [ ] ,
420
+ architecture : "amd64" ,
421
+ connectionTimeoutSeconds : 300 ,
422
+ directory : "" ,
423
+ env : { } ,
424
+ id : randomUUID ( ) ,
425
+ metadata : [ ] ,
426
+ motdFile : "" ,
427
+ name : "dev" ,
428
+ operatingSystem : "linux" ,
429
+ shutdownScript : "" ,
430
+ shutdownScriptTimeoutSeconds : 0 ,
431
+ startupScript : "" ,
432
+ startupScriptBehavior : "" ,
433
+ startupScriptTimeoutSeconds : 300 ,
434
+ troubleshootingUrl : "" ,
435
+ token : randomUUID ( ) ,
436
+ ...agent ,
437
+ } as Agent
438
+ } ,
439
+ )
435
440
}
436
441
return {
437
442
agents : [ ] ,
@@ -533,7 +538,7 @@ export const echoResponsesWithParameters = (
533
538
return {
534
539
parse : [
535
540
{
536
- parse : { }
541
+ parse : { } ,
537
542
} ,
538
543
] ,
539
544
plan : [
0 commit comments