Skip to content

Commit 54389eb

Browse files
committed
format
1 parent d04dd80 commit 54389eb

4 files changed

Lines changed: 13 additions & 18 deletions

File tree

.github/workflows/deploy-preview-manually.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,3 @@ jobs:
2222
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
2323
CLOUDFLARE_SERVICE_TOKEN_CLIENT_ID: ${{ secrets.CLOUDFLARE_SERVICE_TOKEN_CLIENT_ID }}
2424
CLOUDFLARE_SERVICE_TOKEN_CLIENT_SECRET: ${{ secrets.CLOUDFLARE_SERVICE_TOKEN_CLIENT_SECRET }}
25-

backend/clients/projects-client.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,10 @@ export class ProjectsClient {
195195
this.bearerToken = bearerToken;
196196

197197
// Add Cloudflare Access headers if available in environment
198-
if (env.CLOUDFLARE_SERVICE_TOKEN_CLIENT_ID && env.CLOUDFLARE_SERVICE_TOKEN_CLIENT_SECRET) {
198+
if (
199+
env.CLOUDFLARE_SERVICE_TOKEN_CLIENT_ID &&
200+
env.CLOUDFLARE_SERVICE_TOKEN_CLIENT_SECRET
201+
) {
199202
this.cloudflareServiceToken = {
200203
clientId: env.CLOUDFLARE_SERVICE_TOKEN_CLIENT_ID,
201204
clientSecret: env.CLOUDFLARE_SERVICE_TOKEN_CLIENT_SECRET,
@@ -204,13 +207,10 @@ export class ProjectsClient {
204207
"ProjectsClient: Cloudflare Access headers configured (client ID present)"
205208
);
206209
} else {
207-
console.log(
208-
"ProjectsClient: Cloudflare Access headers not configured",
209-
{
210-
hasClientId: !!env.CLOUDFLARE_SERVICE_TOKEN_CLIENT_ID,
211-
hasClientSecret: !!env.CLOUDFLARE_SERVICE_TOKEN_CLIENT_SECRET,
212-
}
213-
);
210+
console.log("ProjectsClient: Cloudflare Access headers not configured", {
211+
hasClientId: !!env.CLOUDFLARE_SERVICE_TOKEN_CLIENT_ID,
212+
hasClientSecret: !!env.CLOUDFLARE_SERVICE_TOKEN_CLIENT_SECRET,
213+
});
214214
}
215215
}
216216

@@ -243,7 +243,8 @@ export class ProjectsClient {
243243
// Add Cloudflare Access headers if configured
244244
if (this.cloudflareServiceToken) {
245245
headers["CF-Access-Client-Id"] = this.cloudflareServiceToken.clientId;
246-
headers["CF-Access-Client-Secret"] = this.cloudflareServiceToken.clientSecret;
246+
headers["CF-Access-Client-Secret"] =
247+
this.cloudflareServiceToken.clientSecret;
247248
}
248249

249250
const response = await fetch(url, {
@@ -492,4 +493,3 @@ export class ProjectsClient {
492493
);
493494
}
494495
}
495-

backend/notebook-permissions/factory.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ import { NoPermissionsProvider } from "./no-permissions.ts";
33
import type { PermissionsProvider } from "./types.ts";
44
import { RuntError, ErrorType, type Env } from "../types.ts";
55
import { AnacondaPermissionsProvider } from "./anaconda-permissions.ts";
6-
import {
7-
ProjectsClient,
8-
} from "backend/clients/projects-client.ts";
6+
import { ProjectsClient } from "backend/clients/projects-client.ts";
97

108
// Re-export providers and types for convenience
119
export { LocalPermissionsProvider } from "./local-permissions.ts";
@@ -26,8 +24,7 @@ export function createPermissionsProvider(
2624
switch (serviceProvider) {
2725
case "anaconda":
2826
try {
29-
const client =
30-
projectsClient || new ProjectsClient(env, bearerToken);
27+
const client = projectsClient || new ProjectsClient(env, bearerToken);
3128
return new AnacondaPermissionsProvider(client, env.DB);
3229
} catch (error) {
3330
throw new RuntError(ErrorType.ServerMisconfigured, {

backend/utils/projects-utils.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ export async function createProjectIfNeeded(
1111
let useProjectsService = env.PERMISSIONS_PROVIDER === "anaconda";
1212
if (useProjectsService) {
1313
try {
14-
const client =
15-
projectsClient || new ProjectsClient(env, bearerToken);
14+
const client = projectsClient || new ProjectsClient(env, bearerToken);
1615

1716
const project = await client.createRandomlyNamedProject();
1817
projectId = project.id;

0 commit comments

Comments
 (0)