chore(biome): removed prettier, added biome (#407)

* chore: replace prettier with biome and add linting

* chore: update devcontainer settings to use biome for linting and remove eslint, prettier

* chore: update docker-compose to use Postgres 17-alpine and standardize quotes

* chore: fixed more BUT disabled most rules due to limit

* added additional rules, fixed linting & ts errors

* added additional rules

* rebased & linted

* fixed oauth

* updated biome & minor modifications

---------

Co-authored-by: Aditya Tripathi <aditya@climactic.co>
This commit is contained in:
Waleed Latif
2025-05-24 03:11:38 -07:00
committed by GitHub
parent 0c8a773e56
commit 8c268e23dd
717 changed files with 13333 additions and 11985 deletions

View File

@@ -1,6 +1,6 @@
import { NextRequest, NextResponse } from 'next/server'
import { FreestyleSandboxes } from 'freestyle-sandboxes'
import { createContext, Script } from 'vm'
import { FreestyleSandboxes } from 'freestyle-sandboxes'
import { type NextRequest, NextResponse } from 'next/server'
import { env } from '@/lib/env'
import { createLogger } from '@/lib/logs/console-logger'
@@ -63,7 +63,7 @@ export async function POST(req: NextRequest) {
// Extract internal parameters that shouldn't be passed to the execution context
const executionParams = { ...params }
delete executionParams._context
executionParams._context = undefined
// Resolve variables in the code with workflow environment variables
const resolvedCode = resolveCodeVariables(code, executionParams, envVars)
@@ -172,19 +172,17 @@ export async function POST(req: NextRequest) {
environmentVariables: envVars,
console: {
log: (...args: any[]) => {
const logMessage =
args
.map((arg) => (typeof arg === 'object' ? JSON.stringify(arg) : String(arg)))
.join(' ') + '\n'
const logMessage = `${args
.map((arg) => (typeof arg === 'object' ? JSON.stringify(arg) : String(arg)))
.join(' ')}\n`
stdout += logMessage
},
error: (...args: any[]) => {
const errorMessage =
args
.map((arg) => (typeof arg === 'object' ? JSON.stringify(arg) : String(arg)))
.join(' ') + '\n'
const errorMessage = `${args
.map((arg) => (typeof arg === 'object' ? JSON.stringify(arg) : String(arg)))
.join(' ')}\n`
logger.error(`[${requestId}] Code Console Error:`, errorMessage)
stdout += 'ERROR: ' + errorMessage
stdout += `ERROR: ${errorMessage}`
},
},
})
@@ -227,19 +225,17 @@ export async function POST(req: NextRequest) {
environmentVariables: envVars,
console: {
log: (...args: any[]) => {
const logMessage =
args
.map((arg) => (typeof arg === 'object' ? JSON.stringify(arg) : String(arg)))
.join(' ') + '\n'
const logMessage = `${args
.map((arg) => (typeof arg === 'object' ? JSON.stringify(arg) : String(arg)))
.join(' ')}\n`
stdout += logMessage
},
error: (...args: any[]) => {
const errorMessage =
args
.map((arg) => (typeof arg === 'object' ? JSON.stringify(arg) : String(arg)))
.join(' ') + '\n'
const errorMessage = `${args
.map((arg) => (typeof arg === 'object' ? JSON.stringify(arg) : String(arg)))
.join(' ')}\n`
logger.error(`[${requestId}] Code Console Error:`, errorMessage)
stdout += 'ERROR: ' + errorMessage
stdout += `ERROR: ${errorMessage}`
},
},
})