- API client with Clover REST API v3 integration (OAuth2 + API key auth) - 50+ comprehensive tools across 10 categories: * Orders: list, get, create, update, delete, add/remove line items, discounts, payments, fire order * Inventory: items, categories, modifiers, stock management * Customers: CRUD, search, addresses, payment cards * Employees: CRUD, roles, shifts, clock in/out * Payments: list, get, refunds * Merchants: settings, devices, tender types * Discounts: CRUD operations * Taxes: CRUD, tax rates * Reports: sales summary, revenue by item/category, employee performance * Cash: cash drawer tracking and events - 18 React MCP apps with full UI: * Order management: dashboard, detail, grid * Inventory: dashboard, detail, category manager * Customer: detail, grid * Employee: dashboard, schedule * Payment history * Analytics: sales dashboard, revenue by item, revenue by category * Configuration: discount manager, tax manager, device manager * Cash drawer - Complete TypeScript types for Clover API - Pagination support with automatic result fetching - Comprehensive error handling - Full README with examples and setup guide
37 lines
1000 B
JavaScript
37 lines
1000 B
JavaScript
#!/usr/bin/env node
|
|
import { copyFileSync, mkdirSync, readdirSync, statSync } from 'fs';
|
|
import { join, dirname } from 'path';
|
|
import { fileURLToPath } from 'url';
|
|
|
|
const __filename = fileURLToPath(import.meta.url);
|
|
const __dirname = dirname(__filename);
|
|
|
|
const srcDir = join(__dirname, '..', 'src', 'ui');
|
|
const distDir = join(__dirname, '..', 'dist', 'ui');
|
|
|
|
function copyDir(src, dest) {
|
|
mkdirSync(dest, { recursive: true });
|
|
|
|
const entries = readdirSync(src);
|
|
|
|
for (const entry of entries) {
|
|
const srcPath = join(src, entry);
|
|
const destPath = join(dest, entry);
|
|
|
|
if (statSync(srcPath).isDirectory()) {
|
|
copyDir(srcPath, destPath);
|
|
} else if (entry.endsWith('.tsx') || entry.endsWith('.jsx')) {
|
|
copyFileSync(srcPath, destPath);
|
|
}
|
|
}
|
|
}
|
|
|
|
try {
|
|
console.log('Copying React apps to dist...');
|
|
copyDir(srcDir, distDir);
|
|
console.log('Assets copied successfully');
|
|
} catch (error) {
|
|
console.error('Error copying assets:', error);
|
|
process.exit(1);
|
|
}
|