0c3624ddca
Migrate urec and uconn CLI tools from plain JavaScript (.mjs) to TypeScript (.ts) with full type safety and strict mode enabled. Changes: - Created TypeScript configuration (tsconfig.json) with strict mode - Migrated src/urec.mjs to src/urec.ts with proper type annotations - Migrated src/uconn.mjs to src/uconn.ts with proper type annotations - Added type declarations for @uncaged/dashboard-server/protocol - Updated package.json with build script and bin entries pointing to dist/ - Added comprehensive test suites for type safety and functionality - Added .gitignore to exclude built artifacts Type Safety: - No implicit any types throughout the codebase - Explicit type annotations for all variables and functions - Proper null safety with strictNullChecks - Full type coverage for Node.js built-ins and external dependencies Testing: - 22 passing tests covering type safety, build config, and functionality - Tests verify TypeScript compilation succeeds - Tests verify executables work correctly with preserved shebangs - Tests verify backward compatibility of CLI behavior Build: - TypeScript compiles successfully with no errors - Built files maintain ESM format - Shebang lines preserved in output - Source maps generated for debugging Resolves #1 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
31 lines
808 B
JSON
31 lines
808 B
JSON
{
|
|
"compilerOptions": {
|
|
"target": "ES2022",
|
|
"module": "NodeNext",
|
|
"moduleResolution": "NodeNext",
|
|
"outDir": "./dist",
|
|
"rootDir": "./src",
|
|
"strict": true,
|
|
"esModuleInterop": true,
|
|
"skipLibCheck": true,
|
|
"forceConsistentCasingInFileNames": true,
|
|
"resolveJsonModule": true,
|
|
"declaration": true,
|
|
"declarationMap": true,
|
|
"sourceMap": true,
|
|
"noImplicitAny": true,
|
|
"strictNullChecks": true,
|
|
"strictFunctionTypes": true,
|
|
"strictBindCallApply": true,
|
|
"strictPropertyInitialization": true,
|
|
"noImplicitThis": true,
|
|
"alwaysStrict": true,
|
|
"noUnusedLocals": true,
|
|
"noUnusedParameters": true,
|
|
"noImplicitReturns": true,
|
|
"noFallthroughCasesInSwitch": true
|
|
},
|
|
"include": ["src/**/*"],
|
|
"exclude": ["node_modules", "dist"]
|
|
}
|