mirror of https://github.com/buster-so/buster.git
initial commit of daytona package
This commit is contained in:
parent
2de702f425
commit
e8cd5473eb
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
|
||||
"extends": ["../../biome.json"],
|
||||
"files": {
|
||||
"include": ["src/**/*", "scripts/**/*"]
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
declare global {
|
||||
namespace NodeJS {
|
||||
interface ProcessEnv {
|
||||
NODE_ENV?: 'development' | 'production' | 'test';
|
||||
// Add your environment variables here
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export {};
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
"name": "@buster/sandbox",
|
||||
"version": "1.0.0",
|
||||
"type": "module",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"default": "./dist/index.js"
|
||||
},
|
||||
"./*": {
|
||||
"types": "./dist/*.d.ts",
|
||||
"default": "./dist/*.js"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"prebuild": "node scripts/validate-env.js",
|
||||
"build": "tsc",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"dev": "tsc --watch",
|
||||
"lint": "biome check",
|
||||
"test": "vitest run",
|
||||
"test:watch": "vitest watch",
|
||||
"test:coverage": "vitest run --coverage"
|
||||
},
|
||||
"dependencies": {
|
||||
"@buster/typescript-config": "workspace:*",
|
||||
"@buster/vitest-config": "workspace:*"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
#!/usr/bin/env node
|
||||
|
||||
// Load environment variables from .env file
|
||||
import { config } from 'dotenv';
|
||||
config();
|
||||
|
||||
// Build-time environment validation
|
||||
|
||||
console.info('🔍 Validating environment variables...');
|
||||
|
||||
const env = {
|
||||
NODE_ENV: process.env.NODE_ENV || 'development',
|
||||
// Add your required environment variables here
|
||||
// DATABASE_URL: process.env.DATABASE_URL,
|
||||
// API_KEY: process.env.API_KEY,
|
||||
};
|
||||
|
||||
let hasErrors = false;
|
||||
|
||||
for (const [envKey, value] of Object.entries(env)) {
|
||||
if (!value) {
|
||||
console.error(`❌ Missing required environment variable: ${envKey}`);
|
||||
hasErrors = true;
|
||||
} else {
|
||||
console.info(`✅ ${envKey} is set`);
|
||||
}
|
||||
}
|
||||
|
||||
if (hasErrors) {
|
||||
console.error('');
|
||||
console.error('❌ Build cannot continue with missing environment variables.');
|
||||
console.error('Please check your .env file and ensure all required variables are set.');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
console.info('✅ All required environment variables are present');
|
|
@ -0,0 +1 @@
|
|||
export * from './lib/index';
|
|
@ -0,0 +1,4 @@
|
|||
// Export your library functions here
|
||||
export const howdy = () => {
|
||||
return 'Hello from @buster/sandbox!';
|
||||
};
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"extends": "@buster/typescript-config/base.json",
|
||||
"compilerOptions": {
|
||||
"tsBuildInfoFile": "dist/.cache/tsbuildinfo.json",
|
||||
"outDir": "dist",
|
||||
"rootDir": "src"
|
||||
},
|
||||
"include": ["src/**/*", "env.d.ts"],
|
||||
"exclude": ["node_modules", "dist", "tests", "**/*.test.ts", "**/*.spec.ts"]
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
import { baseConfig } from '@buster/vitest-config';
|
||||
|
||||
export default baseConfig;
|
|
@ -800,6 +800,15 @@ importers:
|
|||
specifier: 'catalog:'
|
||||
version: 3.25.1
|
||||
|
||||
packages/sandbox:
|
||||
dependencies:
|
||||
'@buster/typescript-config':
|
||||
specifier: workspace:*
|
||||
version: link:../typescript-config
|
||||
'@buster/vitest-config':
|
||||
specifier: workspace:*
|
||||
version: link:../vitest-config
|
||||
|
||||
packages/server-shared:
|
||||
dependencies:
|
||||
'@buster/database':
|
||||
|
|
Loading…
Reference in New Issue