Skip to content

Commit 0412773

Browse files
committed
More fmt
Signed-off-by: Spike Curtis <spike@coder.com>
1 parent d92608e commit 0412773

File tree

2 files changed

+54
-49
lines changed

2 files changed

+54
-49
lines changed

site/e2e/helpers.ts

Lines changed: 52 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -353,18 +353,21 @@ const createTemplateVersionTar = async (
353353
responses = {}
354354
}
355355
if (!responses.parse) {
356-
responses.parse = [{
357-
parse: {}
358-
}]
356+
responses.parse = [
357+
{
358+
parse: {},
359+
},
360+
]
359361
}
360362
if (!responses.apply) {
361-
responses.apply = [{
362-
apply: {}
363-
}]
363+
responses.apply = [
364+
{
365+
apply: {},
366+
},
367+
]
364368
}
365369
if (!responses.plan) {
366-
responses.plan = responses.apply.map(
367-
response => {
370+
responses.plan = responses.apply.map((response) => {
368371
if (response.log) {
369372
return response
370373
}
@@ -374,7 +377,7 @@ const createTemplateVersionTar = async (
374377
resources: response.apply?.resources ?? [],
375378
parameters: response.apply?.parameters ?? [],
376379
gitAuthProviders: response.apply?.gitAuthProviders ?? [],
377-
}
380+
},
378381
}
379382
})
380383
}
@@ -395,43 +398,45 @@ const createTemplateVersionTar = async (
395398

396399
const fillResource = (resource: RecursivePartial<Resource>) => {
397400
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+
)
435440
}
436441
return {
437442
agents: [],
@@ -533,7 +538,7 @@ export const echoResponsesWithParameters = (
533538
return {
534539
parse: [
535540
{
536-
parse: {}
541+
parse: {},
537542
},
538543
],
539544
plan: [

site/src/api/api.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -481,8 +481,8 @@ export function waitForBuild(build: TypesGen.WorkspaceBuild) {
481481
let latestJobInfo: TypesGen.ProvisionerJob | undefined = undefined
482482

483483
while (
484-
!["succeeded", "canceled"].some((status) =>
485-
latestJobInfo?.status.includes(status),
484+
!["succeeded", "canceled"].some(
485+
(status) => latestJobInfo?.status.includes(status),
486486
)
487487
) {
488488
const { job } = await getWorkspaceBuildByNumber(

0 commit comments

Comments
 (0)