diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 00000000..699ed733 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,3 @@ +{ + "recommendations": ["biomejs.biome"] +} diff --git a/.vscode/settings.json b/.vscode/settings.json index d96a9807..122a1dc7 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,7 +1,23 @@ { + "editor.defaultFormatter": "biomejs.biome", "editor.formatOnSave": true, "editor.codeActionsOnSave": { "source.fixAll.biome": "explicit", "source.organizeImports.biome": "explicit" + }, + "[typescript]": { + "editor.defaultFormatter": "biomejs.biome" + }, + "[typescriptreact]": { + "editor.defaultFormatter": "biomejs.biome" + }, + "[javascript]": { + "editor.defaultFormatter": "biomejs.biome" + }, + "[json]": { + "editor.defaultFormatter": "biomejs.biome" + }, + "[jsonc]": { + "editor.defaultFormatter": "biomejs.biome" } } diff --git a/biome.json b/biome.json index 015170f6..db88f38c 100644 --- a/biome.json +++ b/biome.json @@ -60,7 +60,7 @@ "javascript": { "formatter": { "quoteStyle": "double", - "trailingCommas": "es5", + "trailingCommas": "all", "semicolons": "always" } } diff --git a/src/cli/commands/agents/pull.ts b/src/cli/commands/agents/pull.ts index 282bec85..623254db 100644 --- a/src/cli/commands/agents/pull.ts +++ b/src/cli/commands/agents/pull.ts @@ -21,7 +21,7 @@ async function pullAgentsAction(): Promise { { successMessage: "Agents fetched successfully", errorMessage: "Failed to fetch agents", - } + }, ); if (remoteAgents.items.length === 0) { @@ -36,7 +36,7 @@ async function pullAgentsAction(): Promise { { successMessage: "Agent files written successfully", errorMessage: "Failed to write agent files", - } + }, ); if (written.length > 0) { @@ -54,7 +54,7 @@ async function pullAgentsAction(): Promise { export function getAgentsPullCommand(context: CLIContext): Command { return new Command("pull") .description( - "Pull agents from Base44 to local files (replaces all local agent configs)" + "Pull agents from Base44 to local files (replaces all local agent configs)", ) .action(async () => { await runCommand(pullAgentsAction, { requireAuth: true }, context); diff --git a/src/cli/commands/agents/push.ts b/src/cli/commands/agents/push.ts index 8a55032d..92f4c0c7 100644 --- a/src/cli/commands/agents/push.ts +++ b/src/cli/commands/agents/push.ts @@ -12,7 +12,7 @@ async function pushAgentsAction(): Promise { log.info( agents.length === 0 ? "No local agents found - this will delete all remote agents" - : `Found ${agents.length} agents to push` + : `Found ${agents.length} agents to push`, ); const result = await runTask( @@ -23,7 +23,7 @@ async function pushAgentsAction(): Promise { { successMessage: "Agents pushed successfully", errorMessage: "Failed to push agents", - } + }, ); if (result.created.length > 0) { @@ -42,7 +42,7 @@ async function pushAgentsAction(): Promise { export function getAgentsPushCommand(context: CLIContext): Command { return new Command("push") .description( - "Push local agents to Base44 (replaces all remote agent configs)" + "Push local agents to Base44 (replaces all remote agent configs)", ) .action(async () => { await runCommand(pushAgentsAction, { requireAuth: true }, context); diff --git a/src/cli/commands/auth/login-flow.ts b/src/cli/commands/auth/login-flow.ts index 261a4fc0..01766e9f 100644 --- a/src/cli/commands/auth/login-flow.ts +++ b/src/cli/commands/auth/login-flow.ts @@ -24,12 +24,12 @@ async function generateAndDisplayDeviceCode(): Promise { { successMessage: "Device code generated", errorMessage: "Failed to generate device code", - } + }, ); log.info( `Verification code: ${theme.styles.bold(deviceCodeResponse.userCode)}` + - `\nPlease confirm this code at: ${deviceCodeResponse.verificationUri}` + `\nPlease confirm this code at: ${deviceCodeResponse.verificationUri}`, ); return deviceCodeResponse; @@ -38,7 +38,7 @@ async function generateAndDisplayDeviceCode(): Promise { async function waitForAuthentication( deviceCode: string, expiresIn: number, - interval: number + interval: number, ): Promise { let tokenResponse: TokenResponse | undefined; @@ -58,13 +58,13 @@ async function waitForAuthentication( { interval: interval * 1000, timeout: expiresIn * 1000, - } + }, ); }, { successMessage: "Authentication completed!", errorMessage: "Authentication failed", - } + }, ); } catch (error) { if (error instanceof Error && error.message.includes("timed out")) { @@ -82,7 +82,7 @@ async function waitForAuthentication( async function saveAuthData( response: TokenResponse, - userInfo: UserInfoResponse + userInfo: UserInfoResponse, ): Promise { const expiresAt = Date.now() + response.expiresIn * 1000; @@ -105,7 +105,7 @@ export async function login(): Promise { const token = await waitForAuthentication( deviceCodeResponse.deviceCode, deviceCodeResponse.expiresIn, - deviceCodeResponse.interval + deviceCodeResponse.interval, ); const userInfo = await getUserInfo(token.accessToken); diff --git a/src/cli/commands/auth/whoami.ts b/src/cli/commands/auth/whoami.ts index a1d9f77c..aad381c6 100644 --- a/src/cli/commands/auth/whoami.ts +++ b/src/cli/commands/auth/whoami.ts @@ -16,7 +16,7 @@ export function getWhoamiCommand(context: CLIContext): Command { await runCommand( whoami, { requireAuth: true, requireAppConfig: false }, - context + context, ); }); } diff --git a/src/cli/commands/entities/push.ts b/src/cli/commands/entities/push.ts index 7b08da72..caabb4e3 100644 --- a/src/cli/commands/entities/push.ts +++ b/src/cli/commands/entities/push.ts @@ -24,7 +24,7 @@ async function pushEntitiesAction(): Promise { { successMessage: "Entities pushed successfully", errorMessage: "Failed to push entities", - } + }, ); // Print the results @@ -49,6 +49,6 @@ export function getEntitiesPushCommand(context: CLIContext): Command { .description("Push local entities to Base44") .action(async () => { await runCommand(pushEntitiesAction, { requireAuth: true }, context); - }) + }), ); } diff --git a/src/cli/commands/functions/deploy.ts b/src/cli/commands/functions/deploy.ts index 1c5fa797..80f33ba1 100644 --- a/src/cli/commands/functions/deploy.ts +++ b/src/cli/commands/functions/deploy.ts @@ -18,7 +18,7 @@ async function deployFunctionsAction(): Promise { } log.info( - `Found ${functions.length} ${functions.length === 1 ? "function" : "functions"} to deploy` + `Found ${functions.length} ${functions.length === 1 ? "function" : "functions"} to deploy`, ); const result = await runTask( @@ -29,7 +29,7 @@ async function deployFunctionsAction(): Promise { { successMessage: "Functions deployed successfully", errorMessage: "Failed to deploy functions", - } + }, ); if (result.deployed.length > 0) { @@ -63,8 +63,8 @@ export function getFunctionsDeployCommand(context: CLIContext): Command { await runCommand( deployFunctionsAction, { requireAuth: true }, - context + context, ); - }) + }), ); } diff --git a/src/cli/commands/project/create.ts b/src/cli/commands/project/create.ts index ea1a26a8..20c3a4e5 100644 --- a/src/cli/commands/project/create.ts +++ b/src/cli/commands/project/create.ts @@ -54,7 +54,7 @@ function validateNonInteractiveFlags(command: Command): void { } async function createInteractive( - options: CreateOptions + options: CreateOptions, ): Promise { const templates = await listTemplates(); const templateOptions: Option