Add ESLint to all packages and reorganize CLI
ESLint: - Add @macalinao/eslint-config and eslint to all packages/apps - Add lint scripts to all package.json files - Create eslint.config.js for all apps - Add lint task to turbo.json - Add @macalinao/eslint-config and @types/bun to catalog Biome: - Exclude docs/ from biome checks CLI Reorganization: - Restructure CLI to use route maps with one command per file - Move commands to routes/ directory structure - Use func property instead of async loaders - Route maps in _command.ts files for each directory Environment: - Use Bun.env instead of process.env for env vars - Add DATABASE_URL and PORT to turbo.json globalEnv Lint Fixes: - Fix nullish coalescing operator usage - Update deprecated Zod API (z.email() instead of .string().email()) - Fix import sorting Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
15
apps/cli/src/routes/auth/_command.ts
Normal file
15
apps/cli/src/routes/auth/_command.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { buildRouteMap } from "@stricli/core";
|
||||
import { loginCommand } from "./login.js";
|
||||
import { logoutCommand } from "./logout.js";
|
||||
import { statusCommand } from "./status.js";
|
||||
|
||||
export const authRouteMap = buildRouteMap({
|
||||
routes: {
|
||||
login: loginCommand,
|
||||
logout: logoutCommand,
|
||||
status: statusCommand,
|
||||
},
|
||||
docs: {
|
||||
brief: "Authentication commands",
|
||||
},
|
||||
});
|
||||
15
apps/cli/src/routes/auth/login.ts
Normal file
15
apps/cli/src/routes/auth/login.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import type { LocalContext } from "../../context.js";
|
||||
import { buildCommand } from "@stricli/core";
|
||||
|
||||
function login(this: LocalContext): void {
|
||||
console.log("Auth login command - Not implemented");
|
||||
console.log("This command will authenticate a user and store credentials");
|
||||
}
|
||||
|
||||
export const loginCommand = buildCommand({
|
||||
func: login,
|
||||
parameters: {},
|
||||
docs: {
|
||||
brief: "Login to RevIQ",
|
||||
},
|
||||
});
|
||||
15
apps/cli/src/routes/auth/logout.ts
Normal file
15
apps/cli/src/routes/auth/logout.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import type { LocalContext } from "../../context.js";
|
||||
import { buildCommand } from "@stricli/core";
|
||||
|
||||
function logout(this: LocalContext): void {
|
||||
console.log("Auth logout command - Not implemented");
|
||||
console.log("This command will clear stored authentication credentials");
|
||||
}
|
||||
|
||||
export const logoutCommand = buildCommand({
|
||||
func: logout,
|
||||
parameters: {},
|
||||
docs: {
|
||||
brief: "Logout from RevIQ",
|
||||
},
|
||||
});
|
||||
15
apps/cli/src/routes/auth/status.ts
Normal file
15
apps/cli/src/routes/auth/status.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import type { LocalContext } from "../../context.js";
|
||||
import { buildCommand } from "@stricli/core";
|
||||
|
||||
function status(this: LocalContext): void {
|
||||
console.log("Auth status command - Not implemented");
|
||||
console.log("This command will show current authentication status");
|
||||
}
|
||||
|
||||
export const statusCommand = buildCommand({
|
||||
func: status,
|
||||
parameters: {},
|
||||
docs: {
|
||||
brief: "Check authentication status",
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user