UNPKG

@clduab11/gemini-flow

Version:

Revolutionary AI agent swarm coordination platform with Google Services integration, multimedia processing, and production-ready monitoring. Features 8 Google AI services, quantum computing capabilities, and enterprise-grade security.

80 lines (66 loc) โ€ข 2.53 kB
#!/usr/bin/env node /** * Build script for Gemini Flow VSCode Extension */ const fs = require('fs'); const path = require('path'); const { execSync } = require('child_process'); console.log('๐Ÿš€ Building Gemini Flow VSCode Extension...'); // Check if TypeScript is installed try { execSync('tsc --version', { stdio: 'ignore' }); } catch (error) { console.error('โŒ TypeScript not found. Please install it globally: npm install -g typescript'); process.exit(1); } // Clean previous build const outDir = path.join(__dirname, 'out'); if (fs.existsSync(outDir)) { fs.rmSync(outDir, { recursive: true, force: true }); console.log('๐Ÿงน Cleaned previous build'); } // Compile TypeScript try { console.log('๐Ÿ”จ Compiling TypeScript...'); execSync('tsc -p ./', { stdio: 'inherit', cwd: __dirname }); console.log('โœ… TypeScript compilation completed'); } catch (error) { console.error('โŒ TypeScript compilation failed'); process.exit(1); } // Validate package.json const packageJsonPath = path.join(__dirname, 'package.json'); const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8')); console.log('๐Ÿ“‹ Validating package.json...'); // Check required fields const requiredFields = ['name', 'displayName', 'version', 'publisher', 'engines', 'main']; for (const field of requiredFields) { if (!packageJson[field]) { console.error(`โŒ Missing required field in package.json: ${field}`); process.exit(1); } } // Check if main file exists const mainFile = path.join(__dirname, packageJson.main); if (!fs.existsSync(mainFile)) { console.error(`โŒ Main file not found: ${packageJson.main}`); process.exit(1); } console.log('โœ… Package.json validation passed'); // Create VSIX package if vsce is available try { execSync('vsce --version', { stdio: 'ignore' }); console.log('๐Ÿ“ฆ Creating VSIX package...'); execSync('vsce package', { stdio: 'inherit', cwd: __dirname }); console.log('โœ… VSIX package created successfully'); } catch (error) { console.log('โ„น๏ธ VSCE not found. Skipping VSIX creation.'); console.log(' To create a VSIX package, install vsce: npm install -g @vscode/vsce'); } console.log('๐ŸŽ‰ Build completed successfully!'); console.log(''); console.log('Next steps:'); console.log('1. Test the extension by pressing F5 in VSCode'); console.log('2. Install vsce to create publishable packages: npm install -g @vscode/vsce'); console.log('3. Create VSIX package: vsce package'); console.log('4. Publish to marketplace: vsce publish');