mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
Improve TypeScript types and package naming in CLI generator
Adds proper type annotations for database and ORM parameters, simplifies package names in templates, and renames version utility function for clarity.
This commit is contained in:
11
apps/cli/src/utils/get-latest-cli-version.ts
Normal file
11
apps/cli/src/utils/get-latest-cli-version.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import path from "node:path";
|
||||
import fs from "fs-extra";
|
||||
import { PKG_ROOT } from "../constants";
|
||||
|
||||
export const getLatestCLIVersion = () => {
|
||||
const packageJsonPath = path.join(PKG_ROOT, "package.json");
|
||||
|
||||
const packageJsonContent = fs.readJSONSync(packageJsonPath);
|
||||
|
||||
return packageJsonContent.version ?? "1.0.0";
|
||||
};
|
||||
Reference in New Issue
Block a user