mirror of
https://github.com/linsa-io/linsa.git
synced 2026-01-12 12:20:23 +01:00
Update pnpm lock with new dependencies and add flow test project with setup, dev, and test scripts
This commit is contained in:
12
testing/flow-test/packages/web/.env.example
Normal file
12
testing/flow-test/packages/web/.env.example
Normal file
@@ -0,0 +1,12 @@
|
||||
# Flow Test Environment
|
||||
# These will be pulled from 1focus on setup
|
||||
|
||||
# API Keys (pulled from 1focus)
|
||||
API_KEY=
|
||||
OPENROUTER_API_KEY=
|
||||
|
||||
# Local secrets (generated on setup)
|
||||
SECRET_KEY=
|
||||
|
||||
# Database (optional)
|
||||
DATABASE_URL=
|
||||
38
testing/flow-test/packages/web/index.js
Normal file
38
testing/flow-test/packages/web/index.js
Normal file
@@ -0,0 +1,38 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
|
||||
// Load .env
|
||||
const envPath = path.join(__dirname, '.env')
|
||||
if (fs.existsSync(envPath)) {
|
||||
const envContent = fs.readFileSync(envPath, 'utf8')
|
||||
envContent.split('\n').forEach(line => {
|
||||
if (line && !line.startsWith('#')) {
|
||||
const [key, ...valueParts] = line.split('=')
|
||||
if (key) {
|
||||
process.env[key.trim()] = valueParts.join('=').trim()
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
console.log('=== Flow Test Dev Server ===')
|
||||
console.log('')
|
||||
console.log('Environment loaded:')
|
||||
|
||||
const envVars = Object.keys(process.env)
|
||||
.filter(k => !k.startsWith('_') && !k.startsWith('npm_') && !['PATH', 'HOME', 'USER', 'SHELL', 'TERM', 'LANG', 'PWD', 'OLDPWD', 'SHLVL'].includes(k))
|
||||
.sort()
|
||||
|
||||
envVars.forEach(key => {
|
||||
const value = process.env[key]
|
||||
const display = value && value.length > 20 ? value.slice(0, 20) + '...' : value
|
||||
console.log(` ${key}: ${display || '(empty)'}`)
|
||||
})
|
||||
|
||||
console.log('')
|
||||
console.log('Server running... (Ctrl+C to stop)')
|
||||
|
||||
// Keep alive
|
||||
setInterval(() => {}, 1000)
|
||||
9
testing/flow-test/packages/web/package.json
Normal file
9
testing/flow-test/packages/web/package.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"name": "flow-test-web",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "node index.js",
|
||||
"start": "node index.js"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user