Skip to content

Commit cef3350

Browse files
committed
formatting
1 parent f1e0350 commit cef3350

2 files changed

Lines changed: 22 additions & 6 deletions

File tree

src/deploy/functions/release/lifecycle.ts

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,19 @@ export async function executeLifecycleHooks(
6060
changeset.endpointsToDelete.length > 0,
6161
);
6262
if (!hasResourceModifications) {
63-
logLabeledBullet("functions", "No resources modified in codebase. Skipping afterUpdate lifecycle hook.");
63+
logLabeledBullet(
64+
"functions",
65+
"No resources modified in codebase. Skipping afterUpdate lifecycle hook.",
66+
);
6467
return false;
6568
}
6669
}
6770

6871
if (hook.task) {
69-
logLabeledBullet("functions", `Executing ${delta} lifecycle hook targeting: ${hook.task.function}...`);
72+
logLabeledBullet(
73+
"functions",
74+
`Executing ${delta} lifecycle hook targeting: ${hook.task.function}...`,
75+
);
7076
await executeTaskQueueHook(hook.task, wantBackend);
7177
return true;
7278
}
@@ -134,13 +140,20 @@ async function executeTaskQueueHook(
134140

135141
try {
136142
await cloudtasks.enqueueTask(queueName, task);
137-
logLabeledBullet("functions",
143+
logLabeledSuccess(
144+
"functions",
138145
`Successfully queued task for lifecycle hook ${taskHook.function} in queue ${queueName}.`,
139146
);
140-
logLabeledBullet("functions", `View logs for ${taskHook.function} at: ${getCloudConsoleLogUrl(targetEndpoint)}`);
147+
logLabeledBullet(
148+
"functions",
149+
`View logs for ${taskHook.function} at: ${getCloudConsoleLogUrl(targetEndpoint)}`,
150+
);
141151
} catch (err: unknown) {
142152
const errorMsg = err instanceof Error ? err.message : String(err);
143-
logLabeledWarning("functions", `Failed to enqueue task for lifecycle hook ${taskHook.function}: ${errorMsg}`);
153+
logLabeledWarning(
154+
"functions",
155+
`Failed to enqueue task for lifecycle hook ${taskHook.function}: ${errorMsg}`,
156+
);
144157
}
145158
}
146159

src/deploy/functions/validate.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,10 @@ function validateScheduledTimeout(ep: backend.Endpoint): void {
8383
}
8484

8585
/** Validate that the configuration for endpoints are valid. */
86-
export function endpointsAreValid(wantBackend: backend.Backend, existingBackend?: backend.Backend): void {
86+
export function endpointsAreValid(
87+
wantBackend: backend.Backend,
88+
existingBackend?: backend.Backend,
89+
): void {
8790
validateLifecycleHooks(wantBackend, existingBackend);
8891
const endpoints = backend.allEndpoints(wantBackend);
8992
functionIdsAreValid(endpoints);

0 commit comments

Comments
 (0)